File: //var/packages/UniversalViewer/target/dist/assets/index-jogTwPg_.js
import{a9 as _l,I as FL,x as Jue,aa as lb,ab as Yc,ac as ma,ad as G1,ae as VL,af as Zue,ag as JJ,ah as nf,ai as Que,aj as ZJ,ak as ehe,al as ef,am as QJ,an as rU,ao as the,ap as nhe,aq as rhe,ar as ihe,as as ohe,at as mx,au as ahe,av as sf,aw as she,ax as lhe,ay as uhe,az as hhe,aA as che,aB as dhe,J as fhe,d as eZ,c as tZ,o as RL,u as Ko,r as iU,l as ghe,k as phe,m as mhe,n as vhe,C as yhe}from"../uv.main.XdP33zSa.js";import{c as whe,S as bhe,U as Che,u as _he,_ as She,a as Ihe,b as xhe}from"./main-DSX4C9Cv.js";import{u as The}from"./usePaperFloat-QHga-gfl.js";import"./ZoomFloatingBar.vue_vue_type_script_setup_true_lang-DOYCzXq-.js";import{c as khe,d as Rhe,u as Ehe,a as Ahe}from"./store-Cp9cHOFm.js";import{P as Mhe}from"./handler-Z295YBgO.js";import{M as Dhe}from"./item-DBlKVj6T.js";import{d as Ohe}from"./codepage-Bc0X_7fV.js";import"./modulepreload-polyfill-B5Qt9EMX.js";import"./item-B5SDe0MM.js";import"./handler-CIFn3Nrq.js";import"./officeItem-DyDugwZR.js";function Nhe(x,M){for(var k=0;k<M.length;k++){const F=M[k];if(typeof F!="string"&&!Array.isArray(F)){for(const B in F)if(B!=="default"&&!(B in x)){const G=Object.getOwnPropertyDescriptor(F,B);G&&Object.defineProperty(x,B,G.get?G:{enumerable:!0,get:()=>F[B]})}}}return Object.freeze(Object.defineProperty(x,Symbol.toStringTag,{value:"Module"}))}var tO={exports:{}},nO,oU;function nZ(){return oU||(oU=1,nO={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),nO}var rO={exports:{}},iO,aU;function Phe(){return aU||(aU=1,iO=function(M){return!M||typeof M=="string"?!1:M instanceof Array||Array.isArray(M)||M.length>=0&&(M.splice instanceof Function||Object.getOwnPropertyDescriptor(M,M.length-1)&&M.constructor.name!=="String")}),iO}var sU;function Bhe(){if(sU)return rO.exports;sU=1;var x=Phe(),M=Array.prototype.concat,k=Array.prototype.slice,F=rO.exports=function(G){for(var E=[],A=0,u=G.length;A<u;A++){var o=G[A];x(o)?E=M.call(E,k.call(o)):E.push(o)}return E};return F.wrap=function(B){return function(){return B(F(arguments))}},rO.exports}var lU;function Lhe(){if(lU)return tO.exports;lU=1;var x=nZ(),M=Bhe(),k=Object.hasOwnProperty,F=Object.create(null);for(var B in x)k.call(x,B)&&(F[x[B]]=B);var G=tO.exports={to:{},get:{}};G.get=function(u){var o=u.substring(0,3).toLowerCase(),S,_;switch(o){case"hsl":S=G.get.hsl(u),_="hsl";break;case"hwb":S=G.get.hwb(u),_="hwb";break;default:S=G.get.rgb(u),_="rgb";break}return S?{model:_,value:S}:null},G.get.rgb=function(u){if(!u)return null;var o=/^#([a-f0-9]{3,4})$/i,S=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,_=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,p=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,f=/^(\w+)$/,y=[0,0,0,1],d,v,b;if(d=u.match(S)){for(b=d[2],d=d[1],v=0;v<3;v++){var s=v*2;y[v]=parseInt(d.slice(s,s+2),16)}b&&(y[3]=parseInt(b,16)/255)}else if(d=u.match(o)){for(d=d[1],b=d[3],v=0;v<3;v++)y[v]=parseInt(d[v]+d[v],16);b&&(y[3]=parseInt(b+b,16)/255)}else if(d=u.match(_)){for(v=0;v<3;v++)y[v]=parseInt(d[v+1],0);d[4]&&(d[5]?y[3]=parseFloat(d[4])*.01:y[3]=parseFloat(d[4]))}else if(d=u.match(p)){for(v=0;v<3;v++)y[v]=Math.round(parseFloat(d[v+1])*2.55);d[4]&&(d[5]?y[3]=parseFloat(d[4])*.01:y[3]=parseFloat(d[4]))}else return(d=u.match(f))?d[1]==="transparent"?[0,0,0,0]:k.call(x,d[1])?(y=x[d[1]],y[3]=1,y):null:null;for(v=0;v<3;v++)y[v]=E(y[v],0,255);return y[3]=E(y[3],0,1),y},G.get.hsl=function(u){if(!u)return null;var o=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,S=u.match(o);if(S){var _=parseFloat(S[4]),p=(parseFloat(S[1])%360+360)%360,f=E(parseFloat(S[2]),0,100),y=E(parseFloat(S[3]),0,100),d=E(isNaN(_)?1:_,0,1);return[p,f,y,d]}return null},G.get.hwb=function(u){if(!u)return null;var o=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,S=u.match(o);if(S){var _=parseFloat(S[4]),p=(parseFloat(S[1])%360+360)%360,f=E(parseFloat(S[2]),0,100),y=E(parseFloat(S[3]),0,100),d=E(isNaN(_)?1:_,0,1);return[p,f,y,d]}return null},G.to.hex=function(){var u=M(arguments);return"#"+A(u[0])+A(u[1])+A(u[2])+(u[3]<1?A(Math.round(u[3]*255)):"")},G.to.rgb=function(){var u=M(arguments);return u.length<4||u[3]===1?"rgb("+Math.round(u[0])+", "+Math.round(u[1])+", "+Math.round(u[2])+")":"rgba("+Math.round(u[0])+", "+Math.round(u[1])+", "+Math.round(u[2])+", "+u[3]+")"},G.to.rgb.percent=function(){var u=M(arguments),o=Math.round(u[0]/255*100),S=Math.round(u[1]/255*100),_=Math.round(u[2]/255*100);return u.length<4||u[3]===1?"rgb("+o+"%, "+S+"%, "+_+"%)":"rgba("+o+"%, "+S+"%, "+_+"%, "+u[3]+")"},G.to.hsl=function(){var u=M(arguments);return u.length<4||u[3]===1?"hsl("+u[0]+", "+u[1]+"%, "+u[2]+"%)":"hsla("+u[0]+", "+u[1]+"%, "+u[2]+"%, "+u[3]+")"},G.to.hwb=function(){var u=M(arguments),o="";return u.length>=4&&u[3]!==1&&(o=", "+u[3]),"hwb("+u[0]+", "+u[1]+"%, "+u[2]+"%"+o+")"},G.to.keyword=function(u){return F[u.slice(0,3)]};function E(u,o,S){return Math.min(Math.max(o,u),S)}function A(u){var o=Math.round(u).toString(16).toUpperCase();return o.length<2?"0"+o:o}return tO.exports}var oO,uU;function rZ(){if(uU)return oO;uU=1;const x=nZ(),M={};for(const B of Object.keys(x))M[x[B]]=B;const k={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};oO=k;for(const B of Object.keys(k)){if(!("channels"in k[B]))throw new Error("missing channels property: "+B);if(!("labels"in k[B]))throw new Error("missing channel labels property: "+B);if(k[B].labels.length!==k[B].channels)throw new Error("channel and label counts mismatch: "+B);const{channels:G,labels:E}=k[B];delete k[B].channels,delete k[B].labels,Object.defineProperty(k[B],"channels",{value:G}),Object.defineProperty(k[B],"labels",{value:E})}k.rgb.hsl=function(B){const G=B[0]/255,E=B[1]/255,A=B[2]/255,u=Math.min(G,E,A),o=Math.max(G,E,A),S=o-u;let _,p;o===u?_=0:G===o?_=(E-A)/S:E===o?_=2+(A-G)/S:A===o&&(_=4+(G-E)/S),_=Math.min(_*60,360),_<0&&(_+=360);const f=(u+o)/2;return o===u?p=0:f<=.5?p=S/(o+u):p=S/(2-o-u),[_,p*100,f*100]},k.rgb.hsv=function(B){let G,E,A,u,o;const S=B[0]/255,_=B[1]/255,p=B[2]/255,f=Math.max(S,_,p),y=f-Math.min(S,_,p),d=function(v){return(f-v)/6/y+1/2};return y===0?(u=0,o=0):(o=y/f,G=d(S),E=d(_),A=d(p),S===f?u=A-E:_===f?u=1/3+G-A:p===f&&(u=2/3+E-G),u<0?u+=1:u>1&&(u-=1)),[u*360,o*100,f*100]},k.rgb.hwb=function(B){const G=B[0],E=B[1];let A=B[2];const u=k.rgb.hsl(B)[0],o=1/255*Math.min(G,Math.min(E,A));return A=1-1/255*Math.max(G,Math.max(E,A)),[u,o*100,A*100]},k.rgb.cmyk=function(B){const G=B[0]/255,E=B[1]/255,A=B[2]/255,u=Math.min(1-G,1-E,1-A),o=(1-G-u)/(1-u)||0,S=(1-E-u)/(1-u)||0,_=(1-A-u)/(1-u)||0;return[o*100,S*100,_*100,u*100]};function F(B,G){return(B[0]-G[0])**2+(B[1]-G[1])**2+(B[2]-G[2])**2}return k.rgb.keyword=function(B){const G=M[B];if(G)return G;let E=1/0,A;for(const u of Object.keys(x)){const o=x[u],S=F(B,o);S<E&&(E=S,A=u)}return A},k.keyword.rgb=function(B){return x[B]},k.rgb.xyz=function(B){let G=B[0]/255,E=B[1]/255,A=B[2]/255;G=G>.04045?((G+.055)/1.055)**2.4:G/12.92,E=E>.04045?((E+.055)/1.055)**2.4:E/12.92,A=A>.04045?((A+.055)/1.055)**2.4:A/12.92;const u=G*.4124+E*.3576+A*.1805,o=G*.2126+E*.7152+A*.0722,S=G*.0193+E*.1192+A*.9505;return[u*100,o*100,S*100]},k.rgb.lab=function(B){const G=k.rgb.xyz(B);let E=G[0],A=G[1],u=G[2];E/=95.047,A/=100,u/=108.883,E=E>.008856?E**(1/3):7.787*E+16/116,A=A>.008856?A**(1/3):7.787*A+16/116,u=u>.008856?u**(1/3):7.787*u+16/116;const o=116*A-16,S=500*(E-A),_=200*(A-u);return[o,S,_]},k.hsl.rgb=function(B){const G=B[0]/360,E=B[1]/100,A=B[2]/100;let u,o,S;if(E===0)return S=A*255,[S,S,S];A<.5?u=A*(1+E):u=A+E-A*E;const _=2*A-u,p=[0,0,0];for(let f=0;f<3;f++)o=G+1/3*-(f-1),o<0&&o++,o>1&&o--,6*o<1?S=_+(u-_)*6*o:2*o<1?S=u:3*o<2?S=_+(u-_)*(2/3-o)*6:S=_,p[f]=S*255;return p},k.hsl.hsv=function(B){const G=B[0];let E=B[1]/100,A=B[2]/100,u=E;const o=Math.max(A,.01);A*=2,E*=A<=1?A:2-A,u*=o<=1?o:2-o;const S=(A+E)/2,_=A===0?2*u/(o+u):2*E/(A+E);return[G,_*100,S*100]},k.hsv.rgb=function(B){const G=B[0]/60,E=B[1]/100;let A=B[2]/100;const u=Math.floor(G)%6,o=G-Math.floor(G),S=255*A*(1-E),_=255*A*(1-E*o),p=255*A*(1-E*(1-o));switch(A*=255,u){case 0:return[A,p,S];case 1:return[_,A,S];case 2:return[S,A,p];case 3:return[S,_,A];case 4:return[p,S,A];case 5:return[A,S,_]}},k.hsv.hsl=function(B){const G=B[0],E=B[1]/100,A=B[2]/100,u=Math.max(A,.01);let o,S;S=(2-E)*A;const _=(2-E)*u;return o=E*u,o/=_<=1?_:2-_,o=o||0,S/=2,[G,o*100,S*100]},k.hwb.rgb=function(B){const G=B[0]/360;let E=B[1]/100,A=B[2]/100;const u=E+A;let o;u>1&&(E/=u,A/=u);const S=Math.floor(6*G),_=1-A;o=6*G-S,(S&1)!==0&&(o=1-o);const p=E+o*(_-E);let f,y,d;switch(S){default:case 6:case 0:f=_,y=p,d=E;break;case 1:f=p,y=_,d=E;break;case 2:f=E,y=_,d=p;break;case 3:f=E,y=p,d=_;break;case 4:f=p,y=E,d=_;break;case 5:f=_,y=E,d=p;break}return[f*255,y*255,d*255]},k.cmyk.rgb=function(B){const G=B[0]/100,E=B[1]/100,A=B[2]/100,u=B[3]/100,o=1-Math.min(1,G*(1-u)+u),S=1-Math.min(1,E*(1-u)+u),_=1-Math.min(1,A*(1-u)+u);return[o*255,S*255,_*255]},k.xyz.rgb=function(B){const G=B[0]/100,E=B[1]/100,A=B[2]/100;let u,o,S;return u=G*3.2406+E*-1.5372+A*-.4986,o=G*-.9689+E*1.8758+A*.0415,S=G*.0557+E*-.204+A*1.057,u=u>.0031308?1.055*u**(1/2.4)-.055:u*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,S=S>.0031308?1.055*S**(1/2.4)-.055:S*12.92,u=Math.min(Math.max(0,u),1),o=Math.min(Math.max(0,o),1),S=Math.min(Math.max(0,S),1),[u*255,o*255,S*255]},k.xyz.lab=function(B){let G=B[0],E=B[1],A=B[2];G/=95.047,E/=100,A/=108.883,G=G>.008856?G**(1/3):7.787*G+16/116,E=E>.008856?E**(1/3):7.787*E+16/116,A=A>.008856?A**(1/3):7.787*A+16/116;const u=116*E-16,o=500*(G-E),S=200*(E-A);return[u,o,S]},k.lab.xyz=function(B){const G=B[0],E=B[1],A=B[2];let u,o,S;o=(G+16)/116,u=E/500+o,S=o-A/200;const _=o**3,p=u**3,f=S**3;return o=_>.008856?_:(o-16/116)/7.787,u=p>.008856?p:(u-16/116)/7.787,S=f>.008856?f:(S-16/116)/7.787,u*=95.047,o*=100,S*=108.883,[u,o,S]},k.lab.lch=function(B){const G=B[0],E=B[1],A=B[2];let u;u=Math.atan2(A,E)*360/2/Math.PI,u<0&&(u+=360);const S=Math.sqrt(E*E+A*A);return[G,S,u]},k.lch.lab=function(B){const G=B[0],E=B[1],u=B[2]/360*2*Math.PI,o=E*Math.cos(u),S=E*Math.sin(u);return[G,o,S]},k.rgb.ansi16=function(B,G=null){const[E,A,u]=B;let o=G===null?k.rgb.hsv(B)[2]:G;if(o=Math.round(o/50),o===0)return 30;let S=30+(Math.round(u/255)<<2|Math.round(A/255)<<1|Math.round(E/255));return o===2&&(S+=60),S},k.hsv.ansi16=function(B){return k.rgb.ansi16(k.hsv.rgb(B),B[2])},k.rgb.ansi256=function(B){const G=B[0],E=B[1],A=B[2];return G===E&&E===A?G<8?16:G>248?231:Math.round((G-8)/247*24)+232:16+36*Math.round(G/255*5)+6*Math.round(E/255*5)+Math.round(A/255*5)},k.ansi16.rgb=function(B){let G=B%10;if(G===0||G===7)return B>50&&(G+=3.5),G=G/10.5*255,[G,G,G];const E=(~~(B>50)+1)*.5,A=(G&1)*E*255,u=(G>>1&1)*E*255,o=(G>>2&1)*E*255;return[A,u,o]},k.ansi256.rgb=function(B){if(B>=232){const o=(B-232)*10+8;return[o,o,o]}B-=16;let G;const E=Math.floor(B/36)/5*255,A=Math.floor((G=B%36)/6)/5*255,u=G%6/5*255;return[E,A,u]},k.rgb.hex=function(B){const E=(((Math.round(B[0])&255)<<16)+((Math.round(B[1])&255)<<8)+(Math.round(B[2])&255)).toString(16).toUpperCase();return"000000".substring(E.length)+E},k.hex.rgb=function(B){const G=B.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!G)return[0,0,0];let E=G[0];G[0].length===3&&(E=E.split("").map(_=>_+_).join(""));const A=parseInt(E,16),u=A>>16&255,o=A>>8&255,S=A&255;return[u,o,S]},k.rgb.hcg=function(B){const G=B[0]/255,E=B[1]/255,A=B[2]/255,u=Math.max(Math.max(G,E),A),o=Math.min(Math.min(G,E),A),S=u-o;let _,p;return S<1?_=o/(1-S):_=0,S<=0?p=0:u===G?p=(E-A)/S%6:u===E?p=2+(A-G)/S:p=4+(G-E)/S,p/=6,p%=1,[p*360,S*100,_*100]},k.hsl.hcg=function(B){const G=B[1]/100,E=B[2]/100,A=E<.5?2*G*E:2*G*(1-E);let u=0;return A<1&&(u=(E-.5*A)/(1-A)),[B[0],A*100,u*100]},k.hsv.hcg=function(B){const G=B[1]/100,E=B[2]/100,A=G*E;let u=0;return A<1&&(u=(E-A)/(1-A)),[B[0],A*100,u*100]},k.hcg.rgb=function(B){const G=B[0]/360,E=B[1]/100,A=B[2]/100;if(E===0)return[A*255,A*255,A*255];const u=[0,0,0],o=G%1*6,S=o%1,_=1-S;let p=0;switch(Math.floor(o)){case 0:u[0]=1,u[1]=S,u[2]=0;break;case 1:u[0]=_,u[1]=1,u[2]=0;break;case 2:u[0]=0,u[1]=1,u[2]=S;break;case 3:u[0]=0,u[1]=_,u[2]=1;break;case 4:u[0]=S,u[1]=0,u[2]=1;break;default:u[0]=1,u[1]=0,u[2]=_}return p=(1-E)*A,[(E*u[0]+p)*255,(E*u[1]+p)*255,(E*u[2]+p)*255]},k.hcg.hsv=function(B){const G=B[1]/100,E=B[2]/100,A=G+E*(1-G);let u=0;return A>0&&(u=G/A),[B[0],u*100,A*100]},k.hcg.hsl=function(B){const G=B[1]/100,A=B[2]/100*(1-G)+.5*G;let u=0;return A>0&&A<.5?u=G/(2*A):A>=.5&&A<1&&(u=G/(2*(1-A))),[B[0],u*100,A*100]},k.hcg.hwb=function(B){const G=B[1]/100,E=B[2]/100,A=G+E*(1-G);return[B[0],(A-G)*100,(1-A)*100]},k.hwb.hcg=function(B){const G=B[1]/100,A=1-B[2]/100,u=A-G;let o=0;return u<1&&(o=(A-u)/(1-u)),[B[0],u*100,o*100]},k.apple.rgb=function(B){return[B[0]/65535*255,B[1]/65535*255,B[2]/65535*255]},k.rgb.apple=function(B){return[B[0]/255*65535,B[1]/255*65535,B[2]/255*65535]},k.gray.rgb=function(B){return[B[0]/100*255,B[0]/100*255,B[0]/100*255]},k.gray.hsl=function(B){return[0,0,B[0]]},k.gray.hsv=k.gray.hsl,k.gray.hwb=function(B){return[0,100,B[0]]},k.gray.cmyk=function(B){return[0,0,0,B[0]]},k.gray.lab=function(B){return[B[0],0,0]},k.gray.hex=function(B){const G=Math.round(B[0]/100*255)&255,A=((G<<16)+(G<<8)+G).toString(16).toUpperCase();return"000000".substring(A.length)+A},k.rgb.gray=function(B){return[(B[0]+B[1]+B[2])/3/255*100]},oO}var aO,hU;function Fhe(){if(hU)return aO;hU=1;const x=rZ();function M(){const G={},E=Object.keys(x);for(let A=E.length,u=0;u<A;u++)G[E[u]]={distance:-1,parent:null};return G}function k(G){const E=M(),A=[G];for(E[G].distance=0;A.length;){const u=A.pop(),o=Object.keys(x[u]);for(let S=o.length,_=0;_<S;_++){const p=o[_],f=E[p];f.distance===-1&&(f.distance=E[u].distance+1,f.parent=u,A.unshift(p))}}return E}function F(G,E){return function(A){return E(G(A))}}function B(G,E){const A=[E[G].parent,G];let u=x[E[G].parent][G],o=E[G].parent;for(;E[o].parent;)A.unshift(E[o].parent),u=F(x[E[o].parent][o],u),o=E[o].parent;return u.conversion=A,u}return aO=function(G){const E=k(G),A={},u=Object.keys(E);for(let o=u.length,S=0;S<o;S++){const _=u[S];E[_].parent!==null&&(A[_]=B(_,E))}return A},aO}var sO,cU;function Vhe(){if(cU)return sO;cU=1;const x=rZ(),M=Fhe(),k={},F=Object.keys(x);function B(E){const A=function(...u){const o=u[0];return o==null?o:(o.length>1&&(u=o),E(u))};return"conversion"in E&&(A.conversion=E.conversion),A}function G(E){const A=function(...u){const o=u[0];if(o==null)return o;o.length>1&&(u=o);const S=E(u);if(typeof S=="object")for(let _=S.length,p=0;p<_;p++)S[p]=Math.round(S[p]);return S};return"conversion"in E&&(A.conversion=E.conversion),A}return F.forEach(E=>{k[E]={},Object.defineProperty(k[E],"channels",{value:x[E].channels}),Object.defineProperty(k[E],"labels",{value:x[E].labels});const A=M(E);Object.keys(A).forEach(o=>{const S=A[o];k[E][o]=G(S),k[E][o].raw=B(S)})}),sO=k,sO}function tl(x){"@babel/helpers - typeof";return tl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(M){return typeof M}:function(M){return M&&typeof Symbol=="function"&&M.constructor===Symbol&&M!==Symbol.prototype?"symbol":typeof M},tl(x)}function yn(x){if(x===null||x===!0||x===!1)return NaN;var M=Number(x);return isNaN(M)?M:M<0?Math.ceil(M):Math.floor(M)}function Ze(x,M){if(M.length<x)throw new TypeError(x+" argument"+(x>1?"s":"")+" required, but only "+M.length+" present")}function lt(x){Ze(1,arguments);var M=Object.prototype.toString.call(x);return x instanceof Date||tl(x)==="object"&&M==="[object Date]"?new Date(x.getTime()):typeof x=="number"||M==="[object Number]"?new Date(x):((typeof x=="string"||M==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function rc(x,M){Ze(2,arguments);var k=lt(x),F=yn(M);return isNaN(F)?new Date(NaN):(F&&k.setDate(k.getDate()+F),k)}function vb(x,M){Ze(2,arguments);var k=lt(x),F=yn(M);if(isNaN(F))return new Date(NaN);if(!F)return k;var B=k.getDate(),G=new Date(k.getTime());G.setMonth(k.getMonth()+F+1,0);var E=G.getDate();return B>=E?G:(k.setFullYear(G.getFullYear(),G.getMonth(),B),k)}function Lm(x,M){if(Ze(2,arguments),!M||tl(M)!=="object")return new Date(NaN);var k=M.years?yn(M.years):0,F=M.months?yn(M.months):0,B=M.weeks?yn(M.weeks):0,G=M.days?yn(M.days):0,E=M.hours?yn(M.hours):0,A=M.minutes?yn(M.minutes):0,u=M.seconds?yn(M.seconds):0,o=lt(x),S=F||k?vb(o,F+k*12):o,_=G||B?rc(S,G+B*7):S,p=A+E*60,f=u+p*60,y=f*1e3,d=new Date(_.getTime()+y);return d}function Fm(x){Ze(1,arguments);var M=lt(x),k=M.getDay();return k===0||k===6}function HL(x){return Ze(1,arguments),lt(x).getDay()===0}function iZ(x){return Ze(1,arguments),lt(x).getDay()===6}function oZ(x,M){Ze(2,arguments);var k=lt(x),F=Fm(k),B=yn(M);if(isNaN(B))return new Date(NaN);var G=k.getHours(),E=B<0?-1:1,A=yn(B/5);k.setDate(k.getDate()+A*7);for(var u=Math.abs(B%5);u>0;)k.setDate(k.getDate()+E),Fm(k)||(u-=1);return F&&Fm(k)&&B!==0&&(iZ(k)&&k.setDate(k.getDate()+(E<0?2:-1)),HL(k)&&k.setDate(k.getDate()+(E<0?1:-2))),k.setHours(G),k}function yb(x,M){Ze(2,arguments);var k=lt(x).getTime(),F=yn(M);return new Date(k+F)}var Hhe=36e5;function $L(x,M){Ze(2,arguments);var k=yn(M);return yb(x,k*Hhe)}var aZ={};function sa(){return aZ}function $he(x){aZ=x}function ku(x,M){var k,F,B,G,E,A,u,o;Ze(1,arguments);var S=sa(),_=yn((k=(F=(B=(G=M?.weekStartsOn)!==null&&G!==void 0?G:M==null||(E=M.locale)===null||E===void 0||(A=E.options)===null||A===void 0?void 0:A.weekStartsOn)!==null&&B!==void 0?B:S.weekStartsOn)!==null&&F!==void 0?F:(u=S.locale)===null||u===void 0||(o=u.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&k!==void 0?k:0);if(!(_>=0&&_<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=lt(x),f=p.getDay(),y=(f<_?7:0)+f-_;return p.setDate(p.getDate()-y),p.setHours(0,0,0,0),p}function Jc(x){return Ze(1,arguments),ku(x,{weekStartsOn:1})}function Ig(x){Ze(1,arguments);var M=lt(x),k=M.getFullYear(),F=new Date(0);F.setFullYear(k+1,0,4),F.setHours(0,0,0,0);var B=Jc(F),G=new Date(0);G.setFullYear(k,0,4),G.setHours(0,0,0,0);var E=Jc(G);return M.getTime()>=B.getTime()?k+1:M.getTime()>=E.getTime()?k:k-1}function of(x){Ze(1,arguments);var M=Ig(x),k=new Date(0);k.setFullYear(M,0,4),k.setHours(0,0,0,0);var F=Jc(k);return F}function nl(x){var M=new Date(Date.UTC(x.getFullYear(),x.getMonth(),x.getDate(),x.getHours(),x.getMinutes(),x.getSeconds(),x.getMilliseconds()));return M.setUTCFullYear(x.getFullYear()),x.getTime()-M.getTime()}function $m(x){Ze(1,arguments);var M=lt(x);return M.setHours(0,0,0,0),M}var zhe=864e5;function nc(x,M){Ze(2,arguments);var k=$m(x),F=$m(M),B=k.getTime()-nl(k),G=F.getTime()-nl(F);return Math.round((B-G)/zhe)}function sZ(x,M){Ze(2,arguments);var k=lt(x),F=yn(M),B=nc(k,of(k)),G=new Date(0);return G.setFullYear(F,0,4),G.setHours(0,0,0,0),k=of(G),k.setDate(k.getDate()+B),k}function lZ(x,M){Ze(2,arguments);var k=yn(M);return sZ(x,Ig(x)+k)}var Whe=6e4;function zL(x,M){Ze(2,arguments);var k=yn(M);return yb(x,k*Whe)}function WL(x,M){Ze(2,arguments);var k=yn(M),F=k*3;return vb(x,F)}function uZ(x,M){Ze(2,arguments);var k=yn(M);return yb(x,k*1e3)}function vx(x,M){Ze(2,arguments);var k=yn(M),F=k*7;return rc(x,F)}function hZ(x,M){Ze(2,arguments);var k=yn(M);return vb(x,k*12)}function Uhe(x,M,k){Ze(2,arguments);var F=lt(x?.start).getTime(),B=lt(x?.end).getTime(),G=lt(M?.start).getTime(),E=lt(M?.end).getTime();if(!(F<=B&&G<=E))throw new RangeError("Invalid interval");return k!=null&&k.inclusive?F<=E&&G<=B:F<E&&G<B}function cZ(x){Ze(1,arguments);var M;if(x&&typeof x.forEach=="function")M=x;else if(tl(x)==="object"&&x!==null)M=Array.prototype.slice.call(x);else return new Date(NaN);var k;return M.forEach(function(F){var B=lt(F);(k===void 0||k<B||isNaN(Number(B)))&&(k=B)}),k||new Date(NaN)}function dZ(x){Ze(1,arguments);var M;if(x&&typeof x.forEach=="function")M=x;else if(tl(x)==="object"&&x!==null)M=Array.prototype.slice.call(x);else return new Date(NaN);var k;return M.forEach(function(F){var B=lt(F);(k===void 0||k>B||isNaN(B.getDate()))&&(k=B)}),k||new Date(NaN)}function Ghe(x,M){var k=M.start,F=M.end;return Ze(2,arguments),dZ([cZ([x,k]),F])}function jhe(x,M){Ze(2,arguments);var k=lt(x);if(isNaN(Number(k)))return NaN;var F=k.getTime(),B;M==null?B=[]:typeof M.forEach=="function"?B=M:B=Array.prototype.slice.call(M);var G,E;return B.forEach(function(A,u){var o=lt(A);if(isNaN(Number(o))){G=NaN,E=NaN;return}var S=Math.abs(F-o.getTime());(G==null||S<Number(E))&&(G=u,E=S)}),G}function qhe(x,M){Ze(2,arguments);var k=lt(x);if(isNaN(Number(k)))return new Date(NaN);var F=k.getTime(),B;M==null?B=[]:typeof M.forEach=="function"?B=M:B=Array.prototype.slice.call(M);var G,E;return B.forEach(function(A){var u=lt(A);if(isNaN(Number(u))){G=new Date(NaN),E=NaN;return}var o=Math.abs(F-u.getTime());(G==null||o<Number(E))&&(G=u,E=o)}),G}function ah(x,M){Ze(2,arguments);var k=lt(x),F=lt(M),B=k.getTime()-F.getTime();return B<0?-1:B>0?1:B}function Yhe(x,M){Ze(2,arguments);var k=lt(x),F=lt(M),B=k.getTime()-F.getTime();return B>0?-1:B<0?1:B}var UL=7,fZ=365.2425,gZ=Math.pow(10,8)*24*60*60*1e3,Ag=6e4,Mg=36e5,yx=1e3,Khe=-gZ,GL=60,jL=3,qL=12,YL=4,wb=3600,bx=60,Cx=wb*24,pZ=Cx*7,KL=Cx*fZ,XL=KL/12,mZ=XL*3;function Xhe(x){Ze(1,arguments);var M=x/UL;return Math.floor(M)}function bb(x,M){Ze(2,arguments);var k=$m(x),F=$m(M);return k.getTime()===F.getTime()}function vZ(x){return Ze(1,arguments),x instanceof Date||tl(x)==="object"&&Object.prototype.toString.call(x)==="[object Date]"}function Zc(x){if(Ze(1,arguments),!vZ(x)&&typeof x!="number")return!1;var M=lt(x);return!isNaN(Number(M))}function Jhe(x,M){Ze(2,arguments);var k=lt(x),F=lt(M);if(!Zc(k)||!Zc(F))return NaN;var B=nc(k,F),G=B<0?-1:1,E=yn(B/7),A=E*5;for(F=rc(F,E*7);!bb(k,F);)A+=Fm(F)?0:G,F=rc(F,G);return A===0?0:A}function yZ(x,M){return Ze(2,arguments),Ig(x)-Ig(M)}var Zhe=6048e5;function Qhe(x,M){Ze(2,arguments);var k=Jc(x),F=Jc(M),B=k.getTime()-nl(k),G=F.getTime()-nl(F);return Math.round((B-G)/Zhe)}function ZI(x,M){Ze(2,arguments);var k=lt(x),F=lt(M),B=k.getFullYear()-F.getFullYear(),G=k.getMonth()-F.getMonth();return B*12+G}function EL(x){Ze(1,arguments);var M=lt(x),k=Math.floor(M.getMonth()/3)+1;return k}function GI(x,M){Ze(2,arguments);var k=lt(x),F=lt(M),B=k.getFullYear()-F.getFullYear(),G=EL(k)-EL(F);return B*4+G}var ece=6048e5;function QI(x,M,k){Ze(2,arguments);var F=ku(x,k),B=ku(M,k),G=F.getTime()-nl(F),E=B.getTime()-nl(B);return Math.round((G-E)/ece)}function ub(x,M){Ze(2,arguments);var k=lt(x),F=lt(M);return k.getFullYear()-F.getFullYear()}function dU(x,M){var k=x.getFullYear()-M.getFullYear()||x.getMonth()-M.getMonth()||x.getDate()-M.getDate()||x.getHours()-M.getHours()||x.getMinutes()-M.getMinutes()||x.getSeconds()-M.getSeconds()||x.getMilliseconds()-M.getMilliseconds();return k<0?-1:k>0?1:k}function JL(x,M){Ze(2,arguments);var k=lt(x),F=lt(M),B=dU(k,F),G=Math.abs(nc(k,F));k.setDate(k.getDate()-B*G);var E=+(dU(k,F)===-B),A=B*(G-E);return A===0?0:A}function _x(x,M){return Ze(2,arguments),lt(x).getTime()-lt(M).getTime()}var fU={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(M){return M<0?Math.ceil(M):Math.floor(M)}},tce="trunc";function Xm(x){return x?fU[x]:fU[tce]}function ex(x,M,k){Ze(2,arguments);var F=_x(x,M)/Mg;return Xm(k?.roundingMethod)(F)}function wZ(x,M){Ze(2,arguments);var k=yn(M);return lZ(x,-k)}function nce(x,M){Ze(2,arguments);var k=lt(x),F=lt(M),B=ah(k,F),G=Math.abs(yZ(k,F));k=wZ(k,B*G);var E=+(ah(k,F)===-B),A=B*(G-E);return A===0?0:A}function tx(x,M,k){Ze(2,arguments);var F=_x(x,M)/Ag;return Xm(k?.roundingMethod)(F)}function ZL(x){Ze(1,arguments);var M=lt(x);return M.setHours(23,59,59,999),M}function QL(x){Ze(1,arguments);var M=lt(x),k=M.getMonth();return M.setFullYear(M.getFullYear(),k+1,0),M.setHours(23,59,59,999),M}function bZ(x){Ze(1,arguments);var M=lt(x);return ZL(M).getTime()===QL(M).getTime()}function Sx(x,M){Ze(2,arguments);var k=lt(x),F=lt(M),B=ah(k,F),G=Math.abs(ZI(k,F)),E;if(G<1)E=0;else{k.getMonth()===1&&k.getDate()>27&&k.setDate(30),k.setMonth(k.getMonth()-B*G);var A=ah(k,F)===-B;bZ(lt(x))&&G===1&&ah(x,F)===1&&(A=!1),E=B*(G-Number(A))}return E===0?0:E}function rce(x,M,k){Ze(2,arguments);var F=Sx(x,M)/3;return Xm(k?.roundingMethod)(F)}function Vm(x,M,k){Ze(2,arguments);var F=_x(x,M)/1e3;return Xm(k?.roundingMethod)(F)}function ice(x,M,k){Ze(2,arguments);var F=JL(x,M)/7;return Xm(k?.roundingMethod)(F)}function CZ(x,M){Ze(2,arguments);var k=lt(x),F=lt(M),B=ah(k,F),G=Math.abs(ub(k,F));k.setFullYear(1584),F.setFullYear(1584);var E=ah(k,F)===-B,A=B*(G-Number(E));return A===0?0:A}function _Z(x,M){var k;Ze(1,arguments);var F=x||{},B=lt(F.start),G=lt(F.end),E=G.getTime();if(!(B.getTime()<=E))throw new RangeError("Invalid interval");var A=[],u=B;u.setHours(0,0,0,0);var o=Number((k=M?.step)!==null&&k!==void 0?k:1);if(o<1||isNaN(o))throw new RangeError("`options.step` must be a number greater than 1");for(;u.getTime()<=E;)A.push(lt(u)),u.setDate(u.getDate()+o),u.setHours(0,0,0,0);return A}function oce(x,M){var k;Ze(1,arguments);var F=x||{},B=lt(F.start),G=lt(F.end),E=B.getTime(),A=G.getTime();if(!(E<=A))throw new RangeError("Invalid interval");var u=[],o=B;o.setMinutes(0,0,0);var S=Number((k=M?.step)!==null&&k!==void 0?k:1);if(S<1||isNaN(S))throw new RangeError("`options.step` must be a number greater than 1");for(;o.getTime()<=A;)u.push(lt(o)),o=$L(o,S);return u}function nx(x){Ze(1,arguments);var M=lt(x);return M.setSeconds(0,0),M}function ace(x,M){var k;Ze(1,arguments);var F=nx(lt(x.start)),B=lt(x.end),G=F.getTime(),E=B.getTime();if(G>=E)throw new RangeError("Invalid interval");var A=[],u=F,o=Number((k=M?.step)!==null&&k!==void 0?k:1);if(o<1||isNaN(o))throw new RangeError("`options.step` must be a number equal to or greater than 1");for(;u.getTime()<=E;)A.push(lt(u)),u=zL(u,o);return A}function sce(x){Ze(1,arguments);var M=x||{},k=lt(M.start),F=lt(M.end),B=F.getTime(),G=[];if(!(k.getTime()<=B))throw new RangeError("Invalid interval");var E=k;for(E.setHours(0,0,0,0),E.setDate(1);E.getTime()<=B;)G.push(lt(E)),E.setMonth(E.getMonth()+1);return G}function hb(x){Ze(1,arguments);var M=lt(x),k=M.getMonth(),F=k-k%3;return M.setMonth(F,1),M.setHours(0,0,0,0),M}function lce(x){Ze(1,arguments);var M=x||{},k=lt(M.start),F=lt(M.end),B=F.getTime();if(!(k.getTime()<=B))throw new RangeError("Invalid interval");var G=hb(k),E=hb(F);B=E.getTime();for(var A=[],u=G;u.getTime()<=B;)A.push(lt(u)),u=WL(u,1);return A}function uce(x,M){Ze(1,arguments);var k=x||{},F=lt(k.start),B=lt(k.end),G=B.getTime();if(!(F.getTime()<=G))throw new RangeError("Invalid interval");var E=ku(F,M),A=ku(B,M);E.setHours(15),A.setHours(15),G=A.getTime();for(var u=[],o=E;o.getTime()<=G;)o.setHours(0),u.push(lt(o)),o=vx(o,1),o.setHours(15);return u}function eF(x){Ze(1,arguments);for(var M=_Z(x),k=[],F=0;F<M.length;){var B=M[F++];Fm(B)&&(k.push(B),HL(B)&&(F=F+5))}return k}function Ix(x){Ze(1,arguments);var M=lt(x);return M.setDate(1),M.setHours(0,0,0,0),M}function hce(x){Ze(1,arguments);var M=Ix(x);if(isNaN(M.getTime()))throw new RangeError("The passed date is invalid");var k=QL(x);return eF({start:M,end:k})}function SZ(x){Ze(1,arguments);var M=lt(x),k=M.getFullYear();return M.setFullYear(k+1,0,0),M.setHours(23,59,59,999),M}function tF(x){Ze(1,arguments);var M=lt(x),k=new Date(0);return k.setFullYear(M.getFullYear(),0,1),k.setHours(0,0,0,0),k}function cce(x){Ze(1,arguments);var M=tF(x),k=SZ(x);return eF({start:M,end:k})}function dce(x){Ze(1,arguments);var M=x||{},k=lt(M.start),F=lt(M.end),B=F.getTime();if(!(k.getTime()<=B))throw new RangeError("Invalid interval");var G=[],E=k;for(E.setHours(0,0,0,0),E.setMonth(0,1);E.getTime()<=B;)G.push(lt(E)),E.setFullYear(E.getFullYear()+1);return G}function fce(x){Ze(1,arguments);var M=lt(x),k=M.getFullYear(),F=9+Math.floor(k/10)*10;return M.setFullYear(F,11,31),M.setHours(23,59,59,999),M}function gce(x){Ze(1,arguments);var M=lt(x);return M.setMinutes(59,59,999),M}function IZ(x,M){var k,F,B,G,E,A,u,o;Ze(1,arguments);var S=sa(),_=yn((k=(F=(B=(G=M?.weekStartsOn)!==null&&G!==void 0?G:M==null||(E=M.locale)===null||E===void 0||(A=E.options)===null||A===void 0?void 0:A.weekStartsOn)!==null&&B!==void 0?B:S.weekStartsOn)!==null&&F!==void 0?F:(u=S.locale)===null||u===void 0||(o=u.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&k!==void 0?k:0);if(!(_>=0&&_<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=lt(x),f=p.getDay(),y=(f<_?-7:0)+6-(f-_);return p.setDate(p.getDate()+y),p.setHours(23,59,59,999),p}function pce(x){return Ze(1,arguments),IZ(x,{weekStartsOn:1})}function mce(x){Ze(1,arguments);var M=Ig(x),k=new Date(0);k.setFullYear(M+1,0,4),k.setHours(0,0,0,0);var F=Jc(k);return F.setMilliseconds(F.getMilliseconds()-1),F}function vce(x){Ze(1,arguments);var M=lt(x);return M.setSeconds(59,999),M}function yce(x){Ze(1,arguments);var M=lt(x),k=M.getMonth(),F=k-k%3+3;return M.setMonth(F,0),M.setHours(23,59,59,999),M}function wce(x){Ze(1,arguments);var M=lt(x);return M.setMilliseconds(999),M}function bce(){return ZL(Date.now())}function Cce(){var x=new Date,M=x.getFullYear(),k=x.getMonth(),F=x.getDate(),B=new Date(0);return B.setFullYear(M,k,F+1),B.setHours(23,59,59,999),B}function _ce(){var x=new Date,M=x.getFullYear(),k=x.getMonth(),F=x.getDate(),B=new Date(0);return B.setFullYear(M,k,F-1),B.setHours(23,59,59,999),B}function zm(x,M){Ze(2,arguments);var k=yn(M);return yb(x,-k)}var Sce=864e5;function Ice(x){Ze(1,arguments);var M=lt(x),k=M.getTime();M.setUTCMonth(0,1),M.setUTCHours(0,0,0,0);var F=M.getTime(),B=k-F;return Math.floor(B/Sce)+1}function Wm(x){Ze(1,arguments);var M=1,k=lt(x),F=k.getUTCDay(),B=(F<M?7:0)+F-M;return k.setUTCDate(k.getUTCDate()-B),k.setUTCHours(0,0,0,0),k}function xZ(x){Ze(1,arguments);var M=lt(x),k=M.getUTCFullYear(),F=new Date(0);F.setUTCFullYear(k+1,0,4),F.setUTCHours(0,0,0,0);var B=Wm(F),G=new Date(0);G.setUTCFullYear(k,0,4),G.setUTCHours(0,0,0,0);var E=Wm(G);return M.getTime()>=B.getTime()?k+1:M.getTime()>=E.getTime()?k:k-1}function xce(x){Ze(1,arguments);var M=xZ(x),k=new Date(0);k.setUTCFullYear(M,0,4),k.setUTCHours(0,0,0,0);var F=Wm(k);return F}var Tce=6048e5;function TZ(x){Ze(1,arguments);var M=lt(x),k=Wm(M).getTime()-xce(M).getTime();return Math.round(k/Tce)+1}function xg(x,M){var k,F,B,G,E,A,u,o;Ze(1,arguments);var S=sa(),_=yn((k=(F=(B=(G=M?.weekStartsOn)!==null&&G!==void 0?G:M==null||(E=M.locale)===null||E===void 0||(A=E.options)===null||A===void 0?void 0:A.weekStartsOn)!==null&&B!==void 0?B:S.weekStartsOn)!==null&&F!==void 0?F:(u=S.locale)===null||u===void 0||(o=u.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&k!==void 0?k:0);if(!(_>=0&&_<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=lt(x),f=p.getUTCDay(),y=(f<_?7:0)+f-_;return p.setUTCDate(p.getUTCDate()-y),p.setUTCHours(0,0,0,0),p}function nF(x,M){var k,F,B,G,E,A,u,o;Ze(1,arguments);var S=lt(x),_=S.getUTCFullYear(),p=sa(),f=yn((k=(F=(B=(G=M?.firstWeekContainsDate)!==null&&G!==void 0?G:M==null||(E=M.locale)===null||E===void 0||(A=E.options)===null||A===void 0?void 0:A.firstWeekContainsDate)!==null&&B!==void 0?B:p.firstWeekContainsDate)!==null&&F!==void 0?F:(u=p.locale)===null||u===void 0||(o=u.options)===null||o===void 0?void 0:o.firstWeekContainsDate)!==null&&k!==void 0?k:1);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=new Date(0);y.setUTCFullYear(_+1,0,f),y.setUTCHours(0,0,0,0);var d=xg(y,M),v=new Date(0);v.setUTCFullYear(_,0,f),v.setUTCHours(0,0,0,0);var b=xg(v,M);return S.getTime()>=d.getTime()?_+1:S.getTime()>=b.getTime()?_:_-1}function kce(x,M){var k,F,B,G,E,A,u,o;Ze(1,arguments);var S=sa(),_=yn((k=(F=(B=(G=M?.firstWeekContainsDate)!==null&&G!==void 0?G:M==null||(E=M.locale)===null||E===void 0||(A=E.options)===null||A===void 0?void 0:A.firstWeekContainsDate)!==null&&B!==void 0?B:S.firstWeekContainsDate)!==null&&F!==void 0?F:(u=S.locale)===null||u===void 0||(o=u.options)===null||o===void 0?void 0:o.firstWeekContainsDate)!==null&&k!==void 0?k:1),p=nF(x,M),f=new Date(0);f.setUTCFullYear(p,0,_),f.setUTCHours(0,0,0,0);var y=xg(f,M);return y}var Rce=6048e5;function kZ(x,M){Ze(1,arguments);var k=lt(x),F=xg(k,M).getTime()-kce(k,M).getTime();return Math.round(F/Rce)+1}function sr(x,M){for(var k=x<0?"-":"",F=Math.abs(x).toString();F.length<M;)F="0"+F;return k+F}var Gc={y:function(M,k){var F=M.getUTCFullYear(),B=F>0?F:1-F;return sr(k==="yy"?B%100:B,k.length)},M:function(M,k){var F=M.getUTCMonth();return k==="M"?String(F+1):sr(F+1,2)},d:function(M,k){return sr(M.getUTCDate(),k.length)},a:function(M,k){var F=M.getUTCHours()/12>=1?"pm":"am";switch(k){case"a":case"aa":return F.toUpperCase();case"aaa":return F;case"aaaaa":return F[0];case"aaaa":default:return F==="am"?"a.m.":"p.m."}},h:function(M,k){return sr(M.getUTCHours()%12||12,k.length)},H:function(M,k){return sr(M.getUTCHours(),k.length)},m:function(M,k){return sr(M.getUTCMinutes(),k.length)},s:function(M,k){return sr(M.getUTCSeconds(),k.length)},S:function(M,k){var F=k.length,B=M.getUTCMilliseconds(),G=Math.floor(B*Math.pow(10,F-3));return sr(G,k.length)}},Rm={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ece={G:function(M,k,F){var B=M.getUTCFullYear()>0?1:0;switch(k){case"G":case"GG":case"GGG":return F.era(B,{width:"abbreviated"});case"GGGGG":return F.era(B,{width:"narrow"});case"GGGG":default:return F.era(B,{width:"wide"})}},y:function(M,k,F){if(k==="yo"){var B=M.getUTCFullYear(),G=B>0?B:1-B;return F.ordinalNumber(G,{unit:"year"})}return Gc.y(M,k)},Y:function(M,k,F,B){var G=nF(M,B),E=G>0?G:1-G;if(k==="YY"){var A=E%100;return sr(A,2)}return k==="Yo"?F.ordinalNumber(E,{unit:"year"}):sr(E,k.length)},R:function(M,k){var F=xZ(M);return sr(F,k.length)},u:function(M,k){var F=M.getUTCFullYear();return sr(F,k.length)},Q:function(M,k,F){var B=Math.ceil((M.getUTCMonth()+1)/3);switch(k){case"Q":return String(B);case"QQ":return sr(B,2);case"Qo":return F.ordinalNumber(B,{unit:"quarter"});case"QQQ":return F.quarter(B,{width:"abbreviated",context:"formatting"});case"QQQQQ":return F.quarter(B,{width:"narrow",context:"formatting"});case"QQQQ":default:return F.quarter(B,{width:"wide",context:"formatting"})}},q:function(M,k,F){var B=Math.ceil((M.getUTCMonth()+1)/3);switch(k){case"q":return String(B);case"qq":return sr(B,2);case"qo":return F.ordinalNumber(B,{unit:"quarter"});case"qqq":return F.quarter(B,{width:"abbreviated",context:"standalone"});case"qqqqq":return F.quarter(B,{width:"narrow",context:"standalone"});case"qqqq":default:return F.quarter(B,{width:"wide",context:"standalone"})}},M:function(M,k,F){var B=M.getUTCMonth();switch(k){case"M":case"MM":return Gc.M(M,k);case"Mo":return F.ordinalNumber(B+1,{unit:"month"});case"MMM":return F.month(B,{width:"abbreviated",context:"formatting"});case"MMMMM":return F.month(B,{width:"narrow",context:"formatting"});case"MMMM":default:return F.month(B,{width:"wide",context:"formatting"})}},L:function(M,k,F){var B=M.getUTCMonth();switch(k){case"L":return String(B+1);case"LL":return sr(B+1,2);case"Lo":return F.ordinalNumber(B+1,{unit:"month"});case"LLL":return F.month(B,{width:"abbreviated",context:"standalone"});case"LLLLL":return F.month(B,{width:"narrow",context:"standalone"});case"LLLL":default:return F.month(B,{width:"wide",context:"standalone"})}},w:function(M,k,F,B){var G=kZ(M,B);return k==="wo"?F.ordinalNumber(G,{unit:"week"}):sr(G,k.length)},I:function(M,k,F){var B=TZ(M);return k==="Io"?F.ordinalNumber(B,{unit:"week"}):sr(B,k.length)},d:function(M,k,F){return k==="do"?F.ordinalNumber(M.getUTCDate(),{unit:"date"}):Gc.d(M,k)},D:function(M,k,F){var B=Ice(M);return k==="Do"?F.ordinalNumber(B,{unit:"dayOfYear"}):sr(B,k.length)},E:function(M,k,F){var B=M.getUTCDay();switch(k){case"E":case"EE":case"EEE":return F.day(B,{width:"abbreviated",context:"formatting"});case"EEEEE":return F.day(B,{width:"narrow",context:"formatting"});case"EEEEEE":return F.day(B,{width:"short",context:"formatting"});case"EEEE":default:return F.day(B,{width:"wide",context:"formatting"})}},e:function(M,k,F,B){var G=M.getUTCDay(),E=(G-B.weekStartsOn+8)%7||7;switch(k){case"e":return String(E);case"ee":return sr(E,2);case"eo":return F.ordinalNumber(E,{unit:"day"});case"eee":return F.day(G,{width:"abbreviated",context:"formatting"});case"eeeee":return F.day(G,{width:"narrow",context:"formatting"});case"eeeeee":return F.day(G,{width:"short",context:"formatting"});case"eeee":default:return F.day(G,{width:"wide",context:"formatting"})}},c:function(M,k,F,B){var G=M.getUTCDay(),E=(G-B.weekStartsOn+8)%7||7;switch(k){case"c":return String(E);case"cc":return sr(E,k.length);case"co":return F.ordinalNumber(E,{unit:"day"});case"ccc":return F.day(G,{width:"abbreviated",context:"standalone"});case"ccccc":return F.day(G,{width:"narrow",context:"standalone"});case"cccccc":return F.day(G,{width:"short",context:"standalone"});case"cccc":default:return F.day(G,{width:"wide",context:"standalone"})}},i:function(M,k,F){var B=M.getUTCDay(),G=B===0?7:B;switch(k){case"i":return String(G);case"ii":return sr(G,k.length);case"io":return F.ordinalNumber(G,{unit:"day"});case"iii":return F.day(B,{width:"abbreviated",context:"formatting"});case"iiiii":return F.day(B,{width:"narrow",context:"formatting"});case"iiiiii":return F.day(B,{width:"short",context:"formatting"});case"iiii":default:return F.day(B,{width:"wide",context:"formatting"})}},a:function(M,k,F){var B=M.getUTCHours(),G=B/12>=1?"pm":"am";switch(k){case"a":case"aa":return F.dayPeriod(G,{width:"abbreviated",context:"formatting"});case"aaa":return F.dayPeriod(G,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return F.dayPeriod(G,{width:"narrow",context:"formatting"});case"aaaa":default:return F.dayPeriod(G,{width:"wide",context:"formatting"})}},b:function(M,k,F){var B=M.getUTCHours(),G;switch(B===12?G=Rm.noon:B===0?G=Rm.midnight:G=B/12>=1?"pm":"am",k){case"b":case"bb":return F.dayPeriod(G,{width:"abbreviated",context:"formatting"});case"bbb":return F.dayPeriod(G,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return F.dayPeriod(G,{width:"narrow",context:"formatting"});case"bbbb":default:return F.dayPeriod(G,{width:"wide",context:"formatting"})}},B:function(M,k,F){var B=M.getUTCHours(),G;switch(B>=17?G=Rm.evening:B>=12?G=Rm.afternoon:B>=4?G=Rm.morning:G=Rm.night,k){case"B":case"BB":case"BBB":return F.dayPeriod(G,{width:"abbreviated",context:"formatting"});case"BBBBB":return F.dayPeriod(G,{width:"narrow",context:"formatting"});case"BBBB":default:return F.dayPeriod(G,{width:"wide",context:"formatting"})}},h:function(M,k,F){if(k==="ho"){var B=M.getUTCHours()%12;return B===0&&(B=12),F.ordinalNumber(B,{unit:"hour"})}return Gc.h(M,k)},H:function(M,k,F){return k==="Ho"?F.ordinalNumber(M.getUTCHours(),{unit:"hour"}):Gc.H(M,k)},K:function(M,k,F){var B=M.getUTCHours()%12;return k==="Ko"?F.ordinalNumber(B,{unit:"hour"}):sr(B,k.length)},k:function(M,k,F){var B=M.getUTCHours();return B===0&&(B=24),k==="ko"?F.ordinalNumber(B,{unit:"hour"}):sr(B,k.length)},m:function(M,k,F){return k==="mo"?F.ordinalNumber(M.getUTCMinutes(),{unit:"minute"}):Gc.m(M,k)},s:function(M,k,F){return k==="so"?F.ordinalNumber(M.getUTCSeconds(),{unit:"second"}):Gc.s(M,k)},S:function(M,k){return Gc.S(M,k)},X:function(M,k,F,B){var G=B._originalDate||M,E=G.getTimezoneOffset();if(E===0)return"Z";switch(k){case"X":return pU(E);case"XXXX":case"XX":return bg(E);case"XXXXX":case"XXX":default:return bg(E,":")}},x:function(M,k,F,B){var G=B._originalDate||M,E=G.getTimezoneOffset();switch(k){case"x":return pU(E);case"xxxx":case"xx":return bg(E);case"xxxxx":case"xxx":default:return bg(E,":")}},O:function(M,k,F,B){var G=B._originalDate||M,E=G.getTimezoneOffset();switch(k){case"O":case"OO":case"OOO":return"GMT"+gU(E,":");case"OOOO":default:return"GMT"+bg(E,":")}},z:function(M,k,F,B){var G=B._originalDate||M,E=G.getTimezoneOffset();switch(k){case"z":case"zz":case"zzz":return"GMT"+gU(E,":");case"zzzz":default:return"GMT"+bg(E,":")}},t:function(M,k,F,B){var G=B._originalDate||M,E=Math.floor(G.getTime()/1e3);return sr(E,k.length)},T:function(M,k,F,B){var G=B._originalDate||M,E=G.getTime();return sr(E,k.length)}};function gU(x,M){var k=x>0?"-":"+",F=Math.abs(x),B=Math.floor(F/60),G=F%60;if(G===0)return k+String(B);var E=M;return k+String(B)+E+sr(G,2)}function pU(x,M){if(x%60===0){var k=x>0?"-":"+";return k+sr(Math.abs(x)/60,2)}return bg(x,M)}function bg(x,M){var k=M||"",F=x>0?"-":"+",B=Math.abs(x),G=sr(Math.floor(B/60),2),E=sr(B%60,2);return F+G+k+E}var mU=function(M,k){switch(M){case"P":return k.date({width:"short"});case"PP":return k.date({width:"medium"});case"PPP":return k.date({width:"long"});case"PPPP":default:return k.date({width:"full"})}},RZ=function(M,k){switch(M){case"p":return k.time({width:"short"});case"pp":return k.time({width:"medium"});case"ppp":return k.time({width:"long"});case"pppp":default:return k.time({width:"full"})}},Ace=function(M,k){var F=M.match(/(P+)(p+)?/)||[],B=F[1],G=F[2];if(!G)return mU(M,k);var E;switch(B){case"P":E=k.dateTime({width:"short"});break;case"PP":E=k.dateTime({width:"medium"});break;case"PPP":E=k.dateTime({width:"long"});break;case"PPPP":default:E=k.dateTime({width:"full"});break}return E.replace("{{date}}",mU(B,k)).replace("{{time}}",RZ(G,k))},AL={p:RZ,P:Ace},Mce=["D","DD"],Dce=["YY","YYYY"];function EZ(x){return Mce.indexOf(x)!==-1}function AZ(x){return Dce.indexOf(x)!==-1}function rx(x,M,k){if(x==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(M,"`) for formatting years to the input `").concat(k,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(x==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(M,"`) for formatting years to the input `").concat(k,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(x==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(M,"`) for formatting days of the month to the input `").concat(k,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(x==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(M,"`) for formatting days of the month to the input `").concat(k,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Oce={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Nce=function(M,k,F){var B,G=Oce[M];return typeof G=="string"?B=G:k===1?B=G.one:B=G.other.replace("{{count}}",k.toString()),F!=null&&F.addSuffix?F.comparison&&F.comparison>0?"in "+B:B+" ago":B};function lO(x){return function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},k=M.width?String(M.width):x.defaultWidth,F=x.formats[k]||x.formats[x.defaultWidth];return F}}var Pce={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Bce={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Lce={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Fce={date:lO({formats:Pce,defaultWidth:"full"}),time:lO({formats:Bce,defaultWidth:"full"}),dateTime:lO({formats:Lce,defaultWidth:"full"})},Vce={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Hce=function(M,k,F,B){return Vce[M]};function Ww(x){return function(M,k){var F=k!=null&&k.context?String(k.context):"standalone",B;if(F==="formatting"&&x.formattingValues){var G=x.defaultFormattingWidth||x.defaultWidth,E=k!=null&&k.width?String(k.width):G;B=x.formattingValues[E]||x.formattingValues[G]}else{var A=x.defaultWidth,u=k!=null&&k.width?String(k.width):x.defaultWidth;B=x.values[u]||x.values[A]}var o=x.argumentCallback?x.argumentCallback(M):M;return B[o]}}var $ce={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},zce={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Wce={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Uce={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Gce={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},jce={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},qce=function(M,k){var F=Number(M),B=F%100;if(B>20||B<10)switch(B%10){case 1:return F+"st";case 2:return F+"nd";case 3:return F+"rd"}return F+"th"},Yce={ordinalNumber:qce,era:Ww({values:$ce,defaultWidth:"wide"}),quarter:Ww({values:zce,defaultWidth:"wide",argumentCallback:function(M){return M-1}}),month:Ww({values:Wce,defaultWidth:"wide"}),day:Ww({values:Uce,defaultWidth:"wide"}),dayPeriod:Ww({values:Gce,defaultWidth:"wide",formattingValues:jce,defaultFormattingWidth:"wide"})};function Uw(x){return function(M){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},F=k.width,B=F&&x.matchPatterns[F]||x.matchPatterns[x.defaultMatchWidth],G=M.match(B);if(!G)return null;var E=G[0],A=F&&x.parsePatterns[F]||x.parsePatterns[x.defaultParseWidth],u=Array.isArray(A)?Xce(A,function(_){return _.test(E)}):Kce(A,function(_){return _.test(E)}),o;o=x.valueCallback?x.valueCallback(u):u,o=k.valueCallback?k.valueCallback(o):o;var S=M.slice(E.length);return{value:o,rest:S}}}function Kce(x,M){for(var k in x)if(x.hasOwnProperty(k)&&M(x[k]))return k}function Xce(x,M){for(var k=0;k<x.length;k++)if(M(x[k]))return k}function Jce(x){return function(M){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},F=M.match(x.matchPattern);if(!F)return null;var B=F[0],G=M.match(x.parsePattern);if(!G)return null;var E=x.valueCallback?x.valueCallback(G[0]):G[0];E=k.valueCallback?k.valueCallback(E):E;var A=M.slice(B.length);return{value:E,rest:A}}}var Zce=/^(\d+)(th|st|nd|rd)?/i,Qce=/\d+/i,ede={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},tde={any:[/^b/i,/^(a|c)/i]},nde={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},rde={any:[/1/i,/2/i,/3/i,/4/i]},ide={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},ode={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},ade={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},sde={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},lde={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},ude={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},hde={ordinalNumber:Jce({matchPattern:Zce,parsePattern:Qce,valueCallback:function(M){return parseInt(M,10)}}),era:Uw({matchPatterns:ede,defaultMatchWidth:"wide",parsePatterns:tde,defaultParseWidth:"any"}),quarter:Uw({matchPatterns:nde,defaultMatchWidth:"wide",parsePatterns:rde,defaultParseWidth:"any",valueCallback:function(M){return M+1}}),month:Uw({matchPatterns:ide,defaultMatchWidth:"wide",parsePatterns:ode,defaultParseWidth:"any"}),day:Uw({matchPatterns:ade,defaultMatchWidth:"wide",parsePatterns:sde,defaultParseWidth:"any"}),dayPeriod:Uw({matchPatterns:lde,defaultMatchWidth:"any",parsePatterns:ude,defaultParseWidth:"any"})},Jm={code:"en-US",formatDistance:Nce,formatLong:Fce,formatRelative:Hce,localize:Yce,match:hde,options:{weekStartsOn:0,firstWeekContainsDate:1}},cde=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,dde=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,fde=/^'([^]*?)'?$/,gde=/''/g,pde=/[a-zA-Z]/;function MZ(x,M,k){var F,B,G,E,A,u,o,S,_,p,f,y,d,v,b,s,l,w;Ze(2,arguments);var I=String(M),C=sa(),h=(F=(B=k?.locale)!==null&&B!==void 0?B:C.locale)!==null&&F!==void 0?F:Jm,c=yn((G=(E=(A=(u=k?.firstWeekContainsDate)!==null&&u!==void 0?u:k==null||(o=k.locale)===null||o===void 0||(S=o.options)===null||S===void 0?void 0:S.firstWeekContainsDate)!==null&&A!==void 0?A:C.firstWeekContainsDate)!==null&&E!==void 0?E:(_=C.locale)===null||_===void 0||(p=_.options)===null||p===void 0?void 0:p.firstWeekContainsDate)!==null&&G!==void 0?G:1);if(!(c>=1&&c<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var m=yn((f=(y=(d=(v=k?.weekStartsOn)!==null&&v!==void 0?v:k==null||(b=k.locale)===null||b===void 0||(s=b.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&d!==void 0?d:C.weekStartsOn)!==null&&y!==void 0?y:(l=C.locale)===null||l===void 0||(w=l.options)===null||w===void 0?void 0:w.weekStartsOn)!==null&&f!==void 0?f:0);if(!(m>=0&&m<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!h.localize)throw new RangeError("locale must contain localize property");if(!h.formatLong)throw new RangeError("locale must contain formatLong property");var T=lt(x);if(!Zc(T))throw new RangeError("Invalid time value");var D=nl(T),O=zm(T,D),N={firstWeekContainsDate:c,weekStartsOn:m,locale:h,_originalDate:T},z=I.match(dde).map(function(H){var $=H[0];if($==="p"||$==="P"){var V=AL[$];return V(H,h.formatLong)}return H}).join("").match(cde).map(function(H){if(H==="''")return"'";var $=H[0];if($==="'")return mde(H);var V=Ece[$];if(V)return!(k!=null&&k.useAdditionalWeekYearTokens)&&AZ(H)&&rx(H,M,String(x)),!(k!=null&&k.useAdditionalDayOfYearTokens)&&EZ(H)&&rx(H,M,String(x)),V(O,H,h.localize,N);if($.match(pde))throw new RangeError("Format string contains an unescaped latin alphabet character `"+$+"`");return H}).join("");return z}function mde(x){var M=x.match(fde);return M?M[1].replace(gde,"'"):x}function Cb(x,M){if(x==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var k in M)Object.prototype.hasOwnProperty.call(M,k)&&(x[k]=M[k]);return x}function DZ(x){return Cb({},x)}var vU=1440,vde=2520,uO=43200,yde=86400;function OZ(x,M,k){var F,B;Ze(2,arguments);var G=sa(),E=(F=(B=k?.locale)!==null&&B!==void 0?B:G.locale)!==null&&F!==void 0?F:Jm;if(!E.formatDistance)throw new RangeError("locale must contain formatDistance property");var A=ah(x,M);if(isNaN(A))throw new RangeError("Invalid time value");var u=Cb(DZ(k),{addSuffix:!!k?.addSuffix,comparison:A}),o,S;A>0?(o=lt(M),S=lt(x)):(o=lt(x),S=lt(M));var _=Vm(S,o),p=(nl(S)-nl(o))/1e3,f=Math.round((_-p)/60),y;if(f<2)return k!=null&&k.includeSeconds?_<5?E.formatDistance("lessThanXSeconds",5,u):_<10?E.formatDistance("lessThanXSeconds",10,u):_<20?E.formatDistance("lessThanXSeconds",20,u):_<40?E.formatDistance("halfAMinute",0,u):_<60?E.formatDistance("lessThanXMinutes",1,u):E.formatDistance("xMinutes",1,u):f===0?E.formatDistance("lessThanXMinutes",1,u):E.formatDistance("xMinutes",f,u);if(f<45)return E.formatDistance("xMinutes",f,u);if(f<90)return E.formatDistance("aboutXHours",1,u);if(f<vU){var d=Math.round(f/60);return E.formatDistance("aboutXHours",d,u)}else{if(f<vde)return E.formatDistance("xDays",1,u);if(f<uO){var v=Math.round(f/vU);return E.formatDistance("xDays",v,u)}else if(f<yde)return y=Math.round(f/uO),E.formatDistance("aboutXMonths",y,u)}if(y=Sx(S,o),y<12){var b=Math.round(f/uO);return E.formatDistance("xMonths",b,u)}else{var s=y%12,l=Math.floor(y/12);return s<3?E.formatDistance("aboutXYears",l,u):s<9?E.formatDistance("overXYears",l,u):E.formatDistance("almostXYears",l+1,u)}}var yU=1e3*60,ix=60*24,wU=ix*30,bU=ix*365;function NZ(x,M,k){var F,B,G;Ze(2,arguments);var E=sa(),A=(F=(B=k?.locale)!==null&&B!==void 0?B:E.locale)!==null&&F!==void 0?F:Jm;if(!A.formatDistance)throw new RangeError("locale must contain localize.formatDistance property");var u=ah(x,M);if(isNaN(u))throw new RangeError("Invalid time value");var o=Cb(DZ(k),{addSuffix:!!k?.addSuffix,comparison:u}),S,_;u>0?(S=lt(M),_=lt(x)):(S=lt(x),_=lt(M));var p=String((G=k?.roundingMethod)!==null&&G!==void 0?G:"round"),f;if(p==="floor")f=Math.floor;else if(p==="ceil")f=Math.ceil;else if(p==="round")f=Math.round;else throw new RangeError("roundingMethod must be 'floor', 'ceil' or 'round'");var y=_.getTime()-S.getTime(),d=y/yU,v=nl(_)-nl(S),b=(y-v)/yU,s=k?.unit,l;if(s?l=String(s):d<1?l="second":d<60?l="minute":d<ix?l="hour":b<wU?l="day":b<bU?l="month":l="year",l==="second"){var w=f(y/1e3);return A.formatDistance("xSeconds",w,o)}else if(l==="minute"){var I=f(d);return A.formatDistance("xMinutes",I,o)}else if(l==="hour"){var C=f(d/60);return A.formatDistance("xHours",C,o)}else if(l==="day"){var h=f(b/ix);return A.formatDistance("xDays",h,o)}else if(l==="month"){var c=f(b/wU);return c===12&&s!=="month"?A.formatDistance("xYears",1,o):A.formatDistance("xMonths",c,o)}else if(l==="year"){var m=f(b/bU);return A.formatDistance("xYears",m,o)}throw new RangeError("unit must be 'second', 'minute', 'hour', 'day', 'month' or 'year'")}function wde(x,M){return Ze(1,arguments),OZ(x,Date.now(),M)}function bde(x,M){return Ze(1,arguments),NZ(x,Date.now(),M)}var Cde=["years","months","weeks","days","hours","minutes","seconds"];function _de(x,M){var k,F,B,G,E;if(arguments.length<1)throw new TypeError("1 argument required, but only ".concat(arguments.length," present"));var A=sa(),u=(k=(F=M?.locale)!==null&&F!==void 0?F:A.locale)!==null&&k!==void 0?k:Jm,o=(B=M?.format)!==null&&B!==void 0?B:Cde,S=(G=M?.zero)!==null&&G!==void 0?G:!1,_=(E=M?.delimiter)!==null&&E!==void 0?E:" ";if(!u.formatDistance)return"";var p=o.reduce(function(f,y){var d="x".concat(y.replace(/(^.)/,function(b){return b.toUpperCase()})),v=x[y];return typeof v=="number"&&(S||x[y])?f.concat(u.formatDistance(d,v)):f},[]).join(_);return p}function Sde(x,M){var k,F;Ze(1,arguments);var B=lt(x);if(isNaN(B.getTime()))throw new RangeError("Invalid time value");var G=String((k=M?.format)!==null&&k!==void 0?k:"extended"),E=String((F=M?.representation)!==null&&F!==void 0?F:"complete");if(G!=="extended"&&G!=="basic")throw new RangeError("format must be 'extended' or 'basic'");if(E!=="date"&&E!=="time"&&E!=="complete")throw new RangeError("representation must be 'date', 'time', or 'complete'");var A="",u="",o=G==="extended"?"-":"",S=G==="extended"?":":"";if(E!=="time"){var _=sr(B.getDate(),2),p=sr(B.getMonth()+1,2),f=sr(B.getFullYear(),4);A="".concat(f).concat(o).concat(p).concat(o).concat(_)}if(E!=="date"){var y=B.getTimezoneOffset();if(y!==0){var d=Math.abs(y),v=sr(Math.floor(d/60),2),b=sr(d%60,2),s=y<0?"+":"-";u="".concat(s).concat(v,":").concat(b)}else u="Z";var l=sr(B.getHours(),2),w=sr(B.getMinutes(),2),I=sr(B.getSeconds(),2),C=A===""?"":"T",h=[l,w,I].join(S);A="".concat(A).concat(C).concat(h).concat(u)}return A}function Ide(x,M){var k,F;if(arguments.length<1)throw new TypeError("1 argument required, but only ".concat(arguments.length," present"));var B=lt(x);if(!Zc(B))throw new RangeError("Invalid time value");var G=String((k=M?.format)!==null&&k!==void 0?k:"extended"),E=String((F=M?.representation)!==null&&F!==void 0?F:"complete");if(G!=="extended"&&G!=="basic")throw new RangeError("format must be 'extended' or 'basic'");if(E!=="date"&&E!=="time"&&E!=="complete")throw new RangeError("representation must be 'date', 'time', or 'complete'");var A="",u=G==="extended"?"-":"",o=G==="extended"?":":"";if(E!=="time"){var S=sr(B.getDate(),2),_=sr(B.getMonth()+1,2),p=sr(B.getFullYear(),4);A="".concat(p).concat(u).concat(_).concat(u).concat(S)}if(E!=="date"){var f=sr(B.getHours(),2),y=sr(B.getMinutes(),2),d=sr(B.getSeconds(),2),v=A===""?"":" ";A="".concat(A).concat(v).concat(f).concat(o).concat(y).concat(o).concat(d)}return A}function xde(x){if(Ze(1,arguments),tl(x)!=="object")throw new Error("Duration must be an object");var M=x.years,k=M===void 0?0:M,F=x.months,B=F===void 0?0:F,G=x.days,E=G===void 0?0:G,A=x.hours,u=A===void 0?0:A,o=x.minutes,S=o===void 0?0:o,_=x.seconds,p=_===void 0?0:_;return"P".concat(k,"Y").concat(B,"M").concat(E,"DT").concat(u,"H").concat(S,"M").concat(p,"S")}function Tde(x,M){var k;if(arguments.length<1)throw new TypeError("1 arguments required, but only ".concat(arguments.length," present"));var F=lt(x);if(!Zc(F))throw new RangeError("Invalid time value");var B=Number((k=M?.fractionDigits)!==null&&k!==void 0?k:0);if(!(B>=0&&B<=3))throw new RangeError("fractionDigits must be between 0 and 3 inclusively");var G=sr(F.getDate(),2),E=sr(F.getMonth()+1,2),A=F.getFullYear(),u=sr(F.getHours(),2),o=sr(F.getMinutes(),2),S=sr(F.getSeconds(),2),_="";if(B>0){var p=F.getMilliseconds(),f=Math.floor(p*Math.pow(10,B-3));_="."+sr(f,B)}var y="",d=F.getTimezoneOffset();if(d!==0){var v=Math.abs(d),b=sr(yn(v/60),2),s=sr(v%60,2),l=d<0?"+":"-";y="".concat(l).concat(b,":").concat(s)}else y="Z";return"".concat(A,"-").concat(E,"-").concat(G,"T").concat(u,":").concat(o,":").concat(S).concat(_).concat(y)}var kde=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Rde=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Ede(x){if(arguments.length<1)throw new TypeError("1 arguments required, but only ".concat(arguments.length," present"));var M=lt(x);if(!Zc(M))throw new RangeError("Invalid time value");var k=kde[M.getUTCDay()],F=sr(M.getUTCDate(),2),B=Rde[M.getUTCMonth()],G=M.getUTCFullYear(),E=sr(M.getUTCHours(),2),A=sr(M.getUTCMinutes(),2),u=sr(M.getUTCSeconds(),2);return"".concat(k,", ").concat(F," ").concat(B," ").concat(G," ").concat(E,":").concat(A,":").concat(u," GMT")}function Ade(x,M,k){var F,B,G,E,A,u,o,S,_,p;Ze(2,arguments);var f=lt(x),y=lt(M),d=sa(),v=(F=(B=k?.locale)!==null&&B!==void 0?B:d.locale)!==null&&F!==void 0?F:Jm,b=yn((G=(E=(A=(u=k?.weekStartsOn)!==null&&u!==void 0?u:k==null||(o=k.locale)===null||o===void 0||(S=o.options)===null||S===void 0?void 0:S.weekStartsOn)!==null&&A!==void 0?A:d.weekStartsOn)!==null&&E!==void 0?E:(_=d.locale)===null||_===void 0||(p=_.options)===null||p===void 0?void 0:p.weekStartsOn)!==null&&G!==void 0?G:0);if(!v.localize)throw new RangeError("locale must contain localize property");if(!v.formatLong)throw new RangeError("locale must contain formatLong property");if(!v.formatRelative)throw new RangeError("locale must contain formatRelative property");var s=nc(f,y);if(isNaN(s))throw new RangeError("Invalid time value");var l;s<-6?l="other":s<-1?l="lastWeek":s<0?l="yesterday":s<1?l="today":s<2?l="tomorrow":s<7?l="nextWeek":l="other";var w=zm(f,nl(f)),I=zm(y,nl(y)),C=v.formatRelative(l,w,I,{locale:v,weekStartsOn:b});return MZ(f,C,{locale:v,weekStartsOn:b})}function Mde(x){Ze(1,arguments);var M=yn(x);return lt(M*1e3)}function PZ(x){Ze(1,arguments);var M=lt(x),k=M.getDate();return k}function xx(x){Ze(1,arguments);var M=lt(x),k=M.getDay();return k}function Dde(x){Ze(1,arguments);var M=lt(x),k=nc(M,tF(M)),F=k+1;return F}function BZ(x){Ze(1,arguments);var M=lt(x),k=M.getFullYear(),F=M.getMonth(),B=new Date(0);return B.setFullYear(k,F+1,0),B.setHours(0,0,0,0),B.getDate()}function LZ(x){Ze(1,arguments);var M=lt(x),k=M.getFullYear();return k%400===0||k%4===0&&k%100!==0}function Ode(x){Ze(1,arguments);var M=lt(x);return String(new Date(M))==="Invalid Date"?NaN:LZ(M)?366:365}function Nde(x){Ze(1,arguments);var M=lt(x),k=M.getFullYear(),F=Math.floor(k/10)*10;return F}function Pde(){return Cb({},sa())}function Bde(x){Ze(1,arguments);var M=lt(x),k=M.getHours();return k}function FZ(x){Ze(1,arguments);var M=lt(x),k=M.getDay();return k===0&&(k=7),k}var Lde=6048e5;function VZ(x){Ze(1,arguments);var M=lt(x),k=Jc(M).getTime()-of(M).getTime();return Math.round(k/Lde)+1}var Fde=6048e5;function Vde(x){Ze(1,arguments);var M=of(x),k=of(vx(M,60)),F=k.valueOf()-M.valueOf();return Math.round(F/Fde)}function Hde(x){Ze(1,arguments);var M=lt(x),k=M.getMilliseconds();return k}function $de(x){Ze(1,arguments);var M=lt(x),k=M.getMinutes();return k}function zde(x){Ze(1,arguments);var M=lt(x),k=M.getMonth();return k}var Wde=24*60*60*1e3;function Ude(x,M){Ze(2,arguments);var k=x||{},F=M||{},B=lt(k.start).getTime(),G=lt(k.end).getTime(),E=lt(F.start).getTime(),A=lt(F.end).getTime();if(!(B<=G&&E<=A))throw new RangeError("Invalid interval");var u=B<A&&E<G;if(!u)return 0;var o=E<B?B:E,S=A>G?G:A,_=S-o;return Math.ceil(_/Wde)}function Gde(x){Ze(1,arguments);var M=lt(x),k=M.getSeconds();return k}function HZ(x){Ze(1,arguments);var M=lt(x),k=M.getTime();return k}function jde(x){return Ze(1,arguments),Math.floor(HZ(x)/1e3)}function $Z(x,M){var k,F,B,G,E,A,u,o;Ze(1,arguments);var S=lt(x),_=S.getFullYear(),p=sa(),f=yn((k=(F=(B=(G=M?.firstWeekContainsDate)!==null&&G!==void 0?G:M==null||(E=M.locale)===null||E===void 0||(A=E.options)===null||A===void 0?void 0:A.firstWeekContainsDate)!==null&&B!==void 0?B:p.firstWeekContainsDate)!==null&&F!==void 0?F:(u=p.locale)===null||u===void 0||(o=u.options)===null||o===void 0?void 0:o.firstWeekContainsDate)!==null&&k!==void 0?k:1);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=new Date(0);y.setFullYear(_+1,0,f),y.setHours(0,0,0,0);var d=ku(y,M),v=new Date(0);v.setFullYear(_,0,f),v.setHours(0,0,0,0);var b=ku(v,M);return S.getTime()>=d.getTime()?_+1:S.getTime()>=b.getTime()?_:_-1}function ox(x,M){var k,F,B,G,E,A,u,o;Ze(1,arguments);var S=sa(),_=yn((k=(F=(B=(G=M?.firstWeekContainsDate)!==null&&G!==void 0?G:M==null||(E=M.locale)===null||E===void 0||(A=E.options)===null||A===void 0?void 0:A.firstWeekContainsDate)!==null&&B!==void 0?B:S.firstWeekContainsDate)!==null&&F!==void 0?F:(u=S.locale)===null||u===void 0||(o=u.options)===null||o===void 0?void 0:o.firstWeekContainsDate)!==null&&k!==void 0?k:1),p=$Z(x,M),f=new Date(0);f.setFullYear(p,0,_),f.setHours(0,0,0,0);var y=ku(f,M);return y}var qde=6048e5;function zZ(x,M){Ze(1,arguments);var k=lt(x),F=ku(k,M).getTime()-ox(k,M).getTime();return Math.round(F/qde)+1}function Yde(x,M){var k,F,B,G,E,A,u,o;Ze(1,arguments);var S=sa(),_=yn((k=(F=(B=(G=M?.weekStartsOn)!==null&&G!==void 0?G:M==null||(E=M.locale)===null||E===void 0||(A=E.options)===null||A===void 0?void 0:A.weekStartsOn)!==null&&B!==void 0?B:S.weekStartsOn)!==null&&F!==void 0?F:(u=S.locale)===null||u===void 0||(o=u.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&k!==void 0?k:0);if(!(_>=0&&_<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=PZ(x);if(isNaN(p))return NaN;var f=xx(Ix(x)),y=_-f;y<=0&&(y+=7);var d=p-y;return Math.ceil(d/7)+1}function WZ(x){Ze(1,arguments);var M=lt(x),k=M.getMonth();return M.setFullYear(M.getFullYear(),k+1,0),M.setHours(0,0,0,0),M}function Kde(x,M){return Ze(1,arguments),QI(WZ(x),Ix(x),M)+1}function Xde(x){return Ze(1,arguments),lt(x).getFullYear()}function Jde(x){return Ze(1,arguments),Math.floor(x*Mg)}function Zde(x){return Ze(1,arguments),Math.floor(x*GL)}function Qde(x){return Ze(1,arguments),Math.floor(x*wb)}function efe(x){Ze(1,arguments);var M=lt(x.start),k=lt(x.end);if(isNaN(M.getTime()))throw new RangeError("Start Date is invalid");if(isNaN(k.getTime()))throw new RangeError("End Date is invalid");var F={};F.years=Math.abs(CZ(k,M));var B=ah(k,M),G=Lm(M,{years:B*F.years});F.months=Math.abs(Sx(k,G));var E=Lm(G,{months:B*F.months});F.days=Math.abs(JL(k,E));var A=Lm(E,{days:B*F.days});F.hours=Math.abs(ex(k,A));var u=Lm(A,{hours:B*F.hours});F.minutes=Math.abs(tx(k,u));var o=Lm(u,{minutes:B*F.minutes});return F.seconds=Math.abs(Vm(k,o)),F}function tfe(x,M,k){var F;Ze(1,arguments);var B;return nfe(M)?B=M:k=M,new Intl.DateTimeFormat((F=k)===null||F===void 0?void 0:F.locale,B).format(x)}function nfe(x){return x!==void 0&&!("locale"in x)}function rfe(x,M,k){Ze(2,arguments);var F=0,B,G=lt(x),E=lt(M);if(k!=null&&k.unit)B=k?.unit,B==="second"?F=Vm(G,E):B==="minute"?F=tx(G,E):B==="hour"?F=ex(G,E):B==="day"?F=nc(G,E):B==="week"?F=QI(G,E):B==="month"?F=ZI(G,E):B==="quarter"?F=GI(G,E):B==="year"&&(F=ub(G,E));else{var A=Vm(G,E);Math.abs(A)<bx?(F=Vm(G,E),B="second"):Math.abs(A)<wb?(F=tx(G,E),B="minute"):Math.abs(A)<Cx&&Math.abs(nc(G,E))<1?(F=ex(G,E),B="hour"):Math.abs(A)<pZ&&(F=nc(G,E))&&Math.abs(F)<7?B="day":Math.abs(A)<XL?(F=QI(G,E),B="week"):Math.abs(A)<mZ?(F=ZI(G,E),B="month"):Math.abs(A)<KL&&GI(G,E)<4?(F=GI(G,E),B="quarter"):(F=ub(G,E),B="year")}var u=new Intl.RelativeTimeFormat(k?.locale,{localeMatcher:k?.localeMatcher,numeric:k?.numeric||"auto",style:k?.style});return u.format(F,B)}function ife(x,M){Ze(2,arguments);var k=lt(x),F=lt(M);return k.getTime()>F.getTime()}function ofe(x,M){Ze(2,arguments);var k=lt(x),F=lt(M);return k.getTime()<F.getTime()}function afe(x,M){Ze(2,arguments);var k=lt(x),F=lt(M);return k.getTime()===F.getTime()}function sfe(x,M,k){if(arguments.length<3)throw new TypeError("3 argument required, but only "+arguments.length+" present");var F=new Date(x,M,k);return F.getFullYear()===x&&F.getMonth()===M&&F.getDate()===k}function lfe(x){return Ze(1,arguments),lt(x).getDate()===1}function ufe(x){return Ze(1,arguments),lt(x).getDay()===5}function hfe(x){return Ze(1,arguments),lt(x).getTime()>Date.now()}function CU(x,M){(M==null||M>x.length)&&(M=x.length);for(var k=0,F=Array(M);k<M;k++)F[k]=x[k];return F}function cfe(x,M){if(x){if(typeof x=="string")return CU(x,M);var k={}.toString.call(x).slice(8,-1);return k==="Object"&&x.constructor&&(k=x.constructor.name),k==="Map"||k==="Set"?Array.from(x):k==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(k)?CU(x,M):void 0}}function _U(x,M){var k=typeof Symbol<"u"&&x[Symbol.iterator]||x["@@iterator"];if(!k){if(Array.isArray(x)||(k=cfe(x))||M){k&&(x=k);var F=0,B=function(){};return{s:B,n:function(){return F>=x.length?{done:!0}:{done:!1,value:x[F++]}},e:function(o){throw o},f:B}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var G,E=!0,A=!1;return{s:function(){k=k.call(x)},n:function(){var o=k.next();return E=o.done,o},e:function(o){A=!0,G=o},f:function(){try{E||k.return==null||k.return()}finally{if(A)throw G}}}}function Yn(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}function ML(x,M){return ML=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(k,F){return k.__proto__=F,k},ML(x,M)}function bi(x,M){if(typeof M!="function"&&M!==null)throw new TypeError("Super expression must either be null or a function");x.prototype=Object.create(M&&M.prototype,{constructor:{value:x,writable:!0,configurable:!0}}),Object.defineProperty(x,"prototype",{writable:!1}),M&&ML(x,M)}function ax(x){return ax=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(M){return M.__proto__||Object.getPrototypeOf(M)},ax(x)}function UZ(){try{var x=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(UZ=function(){return!!x})()}function dfe(x,M){if(M&&(tl(M)=="object"||typeof M=="function"))return M;if(M!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Yn(x)}function Ci(x){var M=UZ();return function(){var k,F=ax(x);if(M){var B=ax(this).constructor;k=Reflect.construct(F,arguments,B)}else k=F.apply(this,arguments);return dfe(this,k)}}function ui(x,M){if(!(x instanceof M))throw new TypeError("Cannot call a class as a function")}function ffe(x,M){if(tl(x)!="object"||!x)return x;var k=x[Symbol.toPrimitive];if(k!==void 0){var F=k.call(x,M);if(tl(F)!="object")return F;throw new TypeError("@@toPrimitive must return a primitive value.")}return(M==="string"?String:Number)(x)}function GZ(x){var M=ffe(x,"string");return tl(M)=="symbol"?M:M+""}function gfe(x,M){for(var k=0;k<M.length;k++){var F=M[k];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(x,GZ(F.key),F)}}function hi(x,M,k){return M&&gfe(x.prototype,M),Object.defineProperty(x,"prototype",{writable:!1}),x}function zn(x,M,k){return(M=GZ(M))in x?Object.defineProperty(x,M,{value:k,enumerable:!0,configurable:!0,writable:!0}):x[M]=k,x}var pfe=10,jZ=function(){function x(){ui(this,x),zn(this,"priority",void 0),zn(this,"subPriority",0)}return hi(x,[{key:"validate",value:function(k,F){return!0}}]),x}(),mfe=function(x){bi(k,x);var M=Ci(k);function k(F,B,G,E,A){var u;return ui(this,k),u=M.call(this),u.value=F,u.validateValue=B,u.setValue=G,u.priority=E,A&&(u.subPriority=A),u}return hi(k,[{key:"validate",value:function(B,G){return this.validateValue(B,this.value,G)}},{key:"set",value:function(B,G,E){return this.setValue(B,G,this.value,E)}}]),k}(jZ),vfe=function(x){bi(k,x);var M=Ci(k);function k(){var F;ui(this,k);for(var B=arguments.length,G=new Array(B),E=0;E<B;E++)G[E]=arguments[E];return F=M.call.apply(M,[this].concat(G)),zn(Yn(F),"priority",pfe),zn(Yn(F),"subPriority",-1),F}return hi(k,[{key:"set",value:function(B,G){if(G.timestampIsSet)return B;var E=new Date(0);return E.setFullYear(B.getUTCFullYear(),B.getUTCMonth(),B.getUTCDate()),E.setHours(B.getUTCHours(),B.getUTCMinutes(),B.getUTCSeconds(),B.getUTCMilliseconds()),E}}]),k}(jZ),Mi=function(){function x(){ui(this,x),zn(this,"incompatibleTokens",void 0),zn(this,"priority",void 0),zn(this,"subPriority",void 0)}return hi(x,[{key:"run",value:function(k,F,B,G){var E=this.parse(k,F,B,G);return E?{setter:new mfe(E.value,this.validate,this.set,this.priority,this.subPriority),rest:E.rest}:null}},{key:"validate",value:function(k,F,B){return!0}}]),x}(),yfe=function(x){bi(k,x);var M=Ci(k);function k(){var F;ui(this,k);for(var B=arguments.length,G=new Array(B),E=0;E<B;E++)G[E]=arguments[E];return F=M.call.apply(M,[this].concat(G)),zn(Yn(F),"priority",140),zn(Yn(F),"incompatibleTokens",["R","u","t","T"]),F}return hi(k,[{key:"parse",value:function(B,G,E){switch(G){case"G":case"GG":case"GGG":return E.era(B,{width:"abbreviated"})||E.era(B,{width:"narrow"});case"GGGGG":return E.era(B,{width:"narrow"});case"GGGG":default:return E.era(B,{width:"wide"})||E.era(B,{width:"abbreviated"})||E.era(B,{width:"narrow"})}}},{key:"set",value:function(B,G,E){return G.era=E,B.setUTCFullYear(E,0,1),B.setUTCHours(0,0,0,0),B}}]),k}(Mi),Xo={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},ec={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Jo(x,M){return x&&{value:M(x.value),rest:x.rest}}function ko(x,M){var k=M.match(x);return k?{value:parseInt(k[0],10),rest:M.slice(k[0].length)}:null}function tc(x,M){var k=M.match(x);if(!k)return null;if(k[0]==="Z")return{value:0,rest:M.slice(1)};var F=k[1]==="+"?1:-1,B=k[2]?parseInt(k[2],10):0,G=k[3]?parseInt(k[3],10):0,E=k[5]?parseInt(k[5],10):0;return{value:F*(B*Mg+G*Ag+E*yx),rest:M.slice(k[0].length)}}function qZ(x){return ko(Xo.anyDigitsSigned,x)}function Ho(x,M){switch(x){case 1:return ko(Xo.singleDigit,M);case 2:return ko(Xo.twoDigits,M);case 3:return ko(Xo.threeDigits,M);case 4:return ko(Xo.fourDigits,M);default:return ko(new RegExp("^\\d{1,"+x+"}"),M)}}function sx(x,M){switch(x){case 1:return ko(Xo.singleDigitSigned,M);case 2:return ko(Xo.twoDigitsSigned,M);case 3:return ko(Xo.threeDigitsSigned,M);case 4:return ko(Xo.fourDigitsSigned,M);default:return ko(new RegExp("^-?\\d{1,"+x+"}"),M)}}function rF(x){switch(x){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function YZ(x,M){var k=M>0,F=k?M:1-M,B;if(F<=50)B=x||100;else{var G=F+50,E=Math.floor(G/100)*100,A=x>=G%100;B=x+E-(A?100:0)}return k?B:1-B}function KZ(x){return x%400===0||x%4===0&&x%100!==0}var wfe=function(x){bi(k,x);var M=Ci(k);function k(){var F;ui(this,k);for(var B=arguments.length,G=new Array(B),E=0;E<B;E++)G[E]=arguments[E];return F=M.call.apply(M,[this].concat(G)),zn(Yn(F),"priority",130),zn(Yn(F),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),F}return hi(k,[{key:"parse",value:function(B,G,E){var A=function(o){return{year:o,isTwoDigitYear:G==="yy"}};switch(G){case"y":return Jo(Ho(4,B),A);case"yo":return Jo(E.ordinalNumber(B,{unit:"year"}),A);default:return Jo(Ho(G.length,B),A)}}},{key:"validate",value:function(B,G){return G.isTwoDigitYear||G.year>0}},{key:"set",value:function(B,G,E){var A=B.getUTCFullYear();if(E.isTwoDigitYear){var u=YZ(E.year,A);return B.setUTCFullYear(u,0,1),B.setUTCHours(0,0,0,0),B}var o=!("era"in G)||G.era===1?E.year:1-E.year;return B.setUTCFullYear(o,0,1),B.setUTCHours(0,0,0,0),B}}]),k}(Mi),bfe=function(x){bi(k,x);var M=Ci(k);function k(){var F;ui(this,k);for(var B=arguments.length,G=new Array(B),E=0;E<B;E++)G[E]=arguments[E];return F=M.call.apply(M,[this].concat(G)),zn(Yn(F),"priority",130),zn(Yn(F),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),F}return hi(k,[{key:"parse",value:function(B,G,E){var A=function(o){return{year:o,isTwoDigitYear:G==="YY"}};switch(G){case"Y":return Jo(Ho(4,B),A);case"Yo":return Jo(E.ordinalNumber(B,{unit:"year"}),A);default:return Jo(Ho(G.length,B),A)}}},{key:"validate",value:function(B,G){return G.isTwoDigitYear||G.year>0}},{key:"set",value:function(B,G,E,A){var u=nF(B,A);if(E.isTwoDigitYear){var o=YZ(E.year,u);return B.setUTCFullYear(o,0,A.firstWeekContainsDate),B.setUTCHours(0,0,0,0),xg(B,A)}var S=!("era"in G)||G.era===1?E.year:1-E.year;return B.setUTCFullYear(S,0,A.firstWeekContainsDate),B.setUTCHours(0,0,0,0),xg(B,A)}}]),k}(Mi),Cfe=function(x){bi(k,x);var M=Ci(k);function k(){var F;ui(this,k);for(var B=arguments.length,G=new Array(B),E=0;E<B;E++)G[E]=arguments[E];return F=M.call.apply(M,[this].concat(G)),zn(Yn(F),"priority",130),zn(Yn(F),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),F}return hi(k,[{key:"parse",value:function(B,G){return sx(G==="R"?4:G.length,B)}},{key:"set",value:function(B,G,E){var A=new Date(0);return A.setUTCFullYear(E,0,4),A.setUTCHours(0,0,0,0),Wm(A)}}]),k}(Mi),_fe=function(x){bi(k,x);var M=Ci(k);function k(){var F;ui(this,k);for(var B=arguments.length,G=new Array(B),E=0;E<B;E++)G[E]=arguments[E];return F=M.call.apply(M,[this].concat(G)),zn(Yn(F),"priority",130),zn(Yn(F),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),F}return hi(k,[{key:"parse",value:function(B,G){return sx(G==="u"?4:G.length,B)}},{key:"set",value:function(B,G,E){return B.setUTCFullYear(E,0,1),B.setUTCHours(0,0,0,0),B}}]),k}(Mi),Sfe=function(x){bi(k,x);var M=Ci(k);function k(){var F;ui(this,k);for(var B=arguments.length,G=new Array(B),E=0;E<B;E++)G[E]=arguments[E];return F=M.call.apply(M,[this].concat(G)),zn(Yn(F),"priority",120),zn(Yn(F),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),F}return hi(k,[{key:"parse",value:function(B,G,E){switch(G){case"Q":case"QQ":return Ho(G.length,B);case"Qo":return E.ordinalNumber(B,{unit:"quarter"});case"QQQ":return E.quarter(B,{width:"abbreviated",context:"formatting"})||E.quarter(B,{width:"narrow",context:"formatting"});case"QQQQQ":return E.quarter(B,{width:"narrow",context:"formatting"});case"QQQQ":default:return E.quarter(B,{width:"wide",context:"formatting"})||E.quarter(B,{width:"abbreviated",context:"formatting"})||E.quarter(B,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(B,G){return G>=1&&G<=4}},{key:"set",value:function(B,G,E){return B.setUTCMonth((E-1)*3,1),B.setUTCHours(0,0,0,0),B}}]),k}(Mi),Ife=function(x){bi(k,x);var M=Ci(k);function k(){var F;ui(this,k);for(var B=arguments.length,G=new Array(B),E=0;E<B;E++)G[E]=arguments[E];return F=M.call.apply(M,[this].concat(G)),zn(Yn(F),"priority",120),zn(Yn(F),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),F}return hi(k,[{key:"parse",value:function(B,G,E){switch(G){case"q":case"qq":return Ho(G.length,B);case"qo":return E.ordinalNumber(B,{unit:"quarter"});case"qqq":return E.quarter(B,{width:"abbreviated",context:"standalone"})||E.quarter(B,{width:"narrow",context:"standalone"});case"qqqqq":return E.quarter(B,{width:"narrow",context:"standalone"});case"qqqq":default:return E.quarter(B,{width:"wide",context:"standalone"})||E.quarter(B,{width:"abbreviated",context:"standalone"})||E.quarter(B,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(B,G){return G>=1&&G<=4}},{key:"set",value:function(B,G,E){return B.setUTCMonth((E-1)*3,1),B.setUTCHours(0,0,0,0),B}}]),k}(Mi),xfe=function(x){bi(k,x);var M=Ci(k);function k(){var F;ui(this,k);for(var B=arguments.length,G=new Array(B),E=0;E<B;E++)G[E]=arguments[E];return F=M.call.apply(M,[this].concat(G)),zn(Yn(F),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),zn(Yn(F),"priority",110),F}return hi(k,[{key:"parse",value:function(B,G,E){var A=function(o){return o-1};switch(G){case"M":return Jo(ko(Xo.month,B),A);case"MM":return Jo(Ho(2,B),A);case"Mo":return Jo(E.ordinalNumber(B,{unit:"month"}),A);case"MMM":return E.month(B,{width:"abbreviated",context:"formatting"})||E.month(B,{width:"narrow",context:"formatting"});case"MMMMM":return E.month(B,{width:"narrow",context:"formatting"});case"MMMM":default:return E.month(B,{width:"wide",context:"formatting"})||E.month(B,{width:"abbreviated",context:"formatting"})||E.month(B,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(B,G){return G>=0&&G<=11}},{key:"set",value:function(B,G,E){return B.setUTCMonth(E,1),B.setUTCHours(0,0,0,0),B}}]),k}(Mi),Tfe=function(x){bi(k,x);var M=Ci(k);function k(){var F;ui(this,k);for(var B=arguments.length,G=new Array(B),E=0;E<B;E++)G[E]=arguments[E];return F=M.call.apply(M,[this].concat(G)),zn(Yn(F),"priority",110),zn(Yn(F),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),F}return hi(k,[{key:"parse",value:function(B,G,E){var A=function(o){return o-1};switch(G){case"L":return Jo(ko(Xo.month,B),A);case"LL":return Jo(Ho(2,B),A);case"Lo":return Jo(E.ordinalNumber(B,{unit:"month"}),A);case"LLL":return E.month(B,{width:"abbreviated",context:"standalone"})||E.month(B,{width:"narrow",context:"standalone"});case"LLLLL":return E.month(B,{width:"narrow",context:"standalone"});case"LLLL":default:return E.month(B,{width:"wide",context:"standalone"})||E.month(B,{width:"abbreviated",context:"standalone"})||E.month(B,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(B,G){return G>=0&&G<=11}},{key:"set",value:function(B,G,E){return B.setUTCMonth(E,1),B.setUTCHours(0,0,0,0),B}}]),k}(Mi);function kfe(x,M,k){Ze(2,arguments);var F=lt(x),B=yn(M),G=kZ(F,k)-B;return F.setUTCDate(F.getUTCDate()-G*7),F}var Rfe=function(x){bi(k,x);var M=Ci(k);function k(){var F;ui(this,k);for(var B=arguments.length,G=new Array(B),E=0;E<B;E++)G[E]=arguments[E];return F=M.call.apply(M,[this].concat(G)),zn(Yn(F),"priority",100),zn(Yn(F),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),F}return hi(k,[{key:"parse",value:function(B,G,E){switch(G){case"w":return ko(Xo.week,B);case"wo":return E.ordinalNumber(B,{unit:"week"});default:return Ho(G.length,B)}}},{key:"validate",value:function(B,G){return G>=1&&G<=53}},{key:"set",value:function(B,G,E,A){return xg(kfe(B,E,A),A)}}]),k}(Mi);function Efe(x,M){Ze(2,arguments);var k=lt(x),F=yn(M),B=TZ(k)-F;return k.setUTCDate(k.getUTCDate()-B*7),k}var Afe=function(x){bi(k,x);var M=Ci(k);function k(){var F;ui(this,k);for(var B=arguments.length,G=new Array(B),E=0;E<B;E++)G[E]=arguments[E];return F=M.call.apply(M,[this].concat(G)),zn(Yn(F),"priority",100),zn(Yn(F),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),F}return hi(k,[{key:"parse",value:function(B,G,E){switch(G){case"I":return ko(Xo.week,B);case"Io":return E.ordinalNumber(B,{unit:"week"});default:return Ho(G.length,B)}}},{key:"validate",value:function(B,G){return G>=1&&G<=53}},{key:"set",value:function(B,G,E){return Wm(Efe(B,E))}}]),k}(Mi),Mfe=[31,28,31,30,31,30,31,31,30,31,30,31],Dfe=[31,29,31,30,31,30,31,31,30,31,30,31],Ofe=function(x){bi(k,x);var M=Ci(k);function k(){var F;ui(this,k);for(var B=arguments.length,G=new Array(B),E=0;E<B;E++)G[E]=arguments[E];return F=M.call.apply(M,[this].concat(G)),zn(Yn(F),"priority",90),zn(Yn(F),"subPriority",1),zn(Yn(F),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),F}return hi(k,[{key:"parse",value:function(B,G,E){switch(G){case"d":return ko(Xo.date,B);case"do":return E.ordinalNumber(B,{unit:"date"});default:return Ho(G.length,B)}}},{key:"validate",value:function(B,G){var E=B.getUTCFullYear(),A=KZ(E),u=B.getUTCMonth();return A?G>=1&&G<=Dfe[u]:G>=1&&G<=Mfe[u]}},{key:"set",value:function(B,G,E){return B.setUTCDate(E),B.setUTCHours(0,0,0,0),B}}]),k}(Mi),Nfe=function(x){bi(k,x);var M=Ci(k);function k(){var F;ui(this,k);for(var B=arguments.length,G=new Array(B),E=0;E<B;E++)G[E]=arguments[E];return F=M.call.apply(M,[this].concat(G)),zn(Yn(F),"priority",90),zn(Yn(F),"subpriority",1),zn(Yn(F),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),F}return hi(k,[{key:"parse",value:function(B,G,E){switch(G){case"D":case"DD":return ko(Xo.dayOfYear,B);case"Do":return E.ordinalNumber(B,{unit:"date"});default:return Ho(G.length,B)}}},{key:"validate",value:function(B,G){var E=B.getUTCFullYear(),A=KZ(E);return A?G>=1&&G<=366:G>=1&&G<=365}},{key:"set",value:function(B,G,E){return B.setUTCMonth(0,E),B.setUTCHours(0,0,0,0),B}}]),k}(Mi);function iF(x,M,k){var F,B,G,E,A,u,o,S;Ze(2,arguments);var _=sa(),p=yn((F=(B=(G=(E=k?.weekStartsOn)!==null&&E!==void 0?E:k==null||(A=k.locale)===null||A===void 0||(u=A.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&G!==void 0?G:_.weekStartsOn)!==null&&B!==void 0?B:(o=_.locale)===null||o===void 0||(S=o.options)===null||S===void 0?void 0:S.weekStartsOn)!==null&&F!==void 0?F:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=lt(x),y=yn(M),d=f.getUTCDay(),v=y%7,b=(v+7)%7,s=(b<p?7:0)+y-d;return f.setUTCDate(f.getUTCDate()+s),f}var Pfe=function(x){bi(k,x);var M=Ci(k);function k(){var F;ui(this,k);for(var B=arguments.length,G=new Array(B),E=0;E<B;E++)G[E]=arguments[E];return F=M.call.apply(M,[this].concat(G)),zn(Yn(F),"priority",90),zn(Yn(F),"incompatibleTokens",["D","i","e","c","t","T"]),F}return hi(k,[{key:"parse",value:function(B,G,E){switch(G){case"E":case"EE":case"EEE":return E.day(B,{width:"abbreviated",context:"formatting"})||E.day(B,{width:"short",context:"formatting"})||E.day(B,{width:"narrow",context:"formatting"});case"EEEEE":return E.day(B,{width:"narrow",context:"formatting"});case"EEEEEE":return E.day(B,{width:"short",context:"formatting"})||E.day(B,{width:"narrow",context:"formatting"});case"EEEE":default:return E.day(B,{width:"wide",context:"formatting"})||E.day(B,{width:"abbreviated",context:"formatting"})||E.day(B,{width:"short",context:"formatting"})||E.day(B,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(B,G){return G>=0&&G<=6}},{key:"set",value:function(B,G,E,A){return B=iF(B,E,A),B.setUTCHours(0,0,0,0),B}}]),k}(Mi),Bfe=function(x){bi(k,x);var M=Ci(k);function k(){var F;ui(this,k);for(var B=arguments.length,G=new Array(B),E=0;E<B;E++)G[E]=arguments[E];return F=M.call.apply(M,[this].concat(G)),zn(Yn(F),"priority",90),zn(Yn(F),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),F}return hi(k,[{key:"parse",value:function(B,G,E,A){var u=function(S){var _=Math.floor((S-1)/7)*7;return(S+A.weekStartsOn+6)%7+_};switch(G){case"e":case"ee":return Jo(Ho(G.length,B),u);case"eo":return Jo(E.ordinalNumber(B,{unit:"day"}),u);case"eee":return E.day(B,{width:"abbreviated",context:"formatting"})||E.day(B,{width:"short",context:"formatting"})||E.day(B,{width:"narrow",context:"formatting"});case"eeeee":return E.day(B,{width:"narrow",context:"formatting"});case"eeeeee":return E.day(B,{width:"short",context:"formatting"})||E.day(B,{width:"narrow",context:"formatting"});case"eeee":default:return E.day(B,{width:"wide",context:"formatting"})||E.day(B,{width:"abbreviated",context:"formatting"})||E.day(B,{width:"short",context:"formatting"})||E.day(B,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(B,G){return G>=0&&G<=6}},{key:"set",value:function(B,G,E,A){return B=iF(B,E,A),B.setUTCHours(0,0,0,0),B}}]),k}(Mi),Lfe=function(x){bi(k,x);var M=Ci(k);function k(){var F;ui(this,k);for(var B=arguments.length,G=new Array(B),E=0;E<B;E++)G[E]=arguments[E];return F=M.call.apply(M,[this].concat(G)),zn(Yn(F),"priority",90),zn(Yn(F),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),F}return hi(k,[{key:"parse",value:function(B,G,E,A){var u=function(S){var _=Math.floor((S-1)/7)*7;return(S+A.weekStartsOn+6)%7+_};switch(G){case"c":case"cc":return Jo(Ho(G.length,B),u);case"co":return Jo(E.ordinalNumber(B,{unit:"day"}),u);case"ccc":return E.day(B,{width:"abbreviated",context:"standalone"})||E.day(B,{width:"short",context:"standalone"})||E.day(B,{width:"narrow",context:"standalone"});case"ccccc":return E.day(B,{width:"narrow",context:"standalone"});case"cccccc":return E.day(B,{width:"short",context:"standalone"})||E.day(B,{width:"narrow",context:"standalone"});case"cccc":default:return E.day(B,{width:"wide",context:"standalone"})||E.day(B,{width:"abbreviated",context:"standalone"})||E.day(B,{width:"short",context:"standalone"})||E.day(B,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(B,G){return G>=0&&G<=6}},{key:"set",value:function(B,G,E,A){return B=iF(B,E,A),B.setUTCHours(0,0,0,0),B}}]),k}(Mi);function Ffe(x,M){Ze(2,arguments);var k=yn(M);k%7===0&&(k=k-7);var F=1,B=lt(x),G=B.getUTCDay(),E=k%7,A=(E+7)%7,u=(A<F?7:0)+k-G;return B.setUTCDate(B.getUTCDate()+u),B}var Vfe=function(x){bi(k,x);var M=Ci(k);function k(){var F;ui(this,k);for(var B=arguments.length,G=new Array(B),E=0;E<B;E++)G[E]=arguments[E];return F=M.call.apply(M,[this].concat(G)),zn(Yn(F),"priority",90),zn(Yn(F),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),F}return hi(k,[{key:"parse",value:function(B,G,E){var A=function(o){return o===0?7:o};switch(G){case"i":case"ii":return Ho(G.length,B);case"io":return E.ordinalNumber(B,{unit:"day"});case"iii":return Jo(E.day(B,{width:"abbreviated",context:"formatting"})||E.day(B,{width:"short",context:"formatting"})||E.day(B,{width:"narrow",context:"formatting"}),A);case"iiiii":return Jo(E.day(B,{width:"narrow",context:"formatting"}),A);case"iiiiii":return Jo(E.day(B,{width:"short",context:"formatting"})||E.day(B,{width:"narrow",context:"formatting"}),A);case"iiii":default:return Jo(E.day(B,{width:"wide",context:"formatting"})||E.day(B,{width:"abbreviated",context:"formatting"})||E.day(B,{width:"short",context:"formatting"})||E.day(B,{width:"narrow",context:"formatting"}),A)}}},{key:"validate",value:function(B,G){return G>=1&&G<=7}},{key:"set",value:function(B,G,E){return B=Ffe(B,E),B.setUTCHours(0,0,0,0),B}}]),k}(Mi),Hfe=function(x){bi(k,x);var M=Ci(k);function k(){var F;ui(this,k);for(var B=arguments.length,G=new Array(B),E=0;E<B;E++)G[E]=arguments[E];return F=M.call.apply(M,[this].concat(G)),zn(Yn(F),"priority",80),zn(Yn(F),"incompatibleTokens",["b","B","H","k","t","T"]),F}return hi(k,[{key:"parse",value:function(B,G,E){switch(G){case"a":case"aa":case"aaa":return E.dayPeriod(B,{width:"abbreviated",context:"formatting"})||E.dayPeriod(B,{width:"narrow",context:"formatting"});case"aaaaa":return E.dayPeriod(B,{width:"narrow",context:"formatting"});case"aaaa":default:return E.dayPeriod(B,{width:"wide",context:"formatting"})||E.dayPeriod(B,{width:"abbreviated",context:"formatting"})||E.dayPeriod(B,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(B,G,E){return B.setUTCHours(rF(E),0,0,0),B}}]),k}(Mi),$fe=function(x){bi(k,x);var M=Ci(k);function k(){var F;ui(this,k);for(var B=arguments.length,G=new Array(B),E=0;E<B;E++)G[E]=arguments[E];return F=M.call.apply(M,[this].concat(G)),zn(Yn(F),"priority",80),zn(Yn(F),"incompatibleTokens",["a","B","H","k","t","T"]),F}return hi(k,[{key:"parse",value:function(B,G,E){switch(G){case"b":case"bb":case"bbb":return E.dayPeriod(B,{width:"abbreviated",context:"formatting"})||E.dayPeriod(B,{width:"narrow",context:"formatting"});case"bbbbb":return E.dayPeriod(B,{width:"narrow",context:"formatting"});case"bbbb":default:return E.dayPeriod(B,{width:"wide",context:"formatting"})||E.dayPeriod(B,{width:"abbreviated",context:"formatting"})||E.dayPeriod(B,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(B,G,E){return B.setUTCHours(rF(E),0,0,0),B}}]),k}(Mi),zfe=function(x){bi(k,x);var M=Ci(k);function k(){var F;ui(this,k);for(var B=arguments.length,G=new Array(B),E=0;E<B;E++)G[E]=arguments[E];return F=M.call.apply(M,[this].concat(G)),zn(Yn(F),"priority",80),zn(Yn(F),"incompatibleTokens",["a","b","t","T"]),F}return hi(k,[{key:"parse",value:function(B,G,E){switch(G){case"B":case"BB":case"BBB":return E.dayPeriod(B,{width:"abbreviated",context:"formatting"})||E.dayPeriod(B,{width:"narrow",context:"formatting"});case"BBBBB":return E.dayPeriod(B,{width:"narrow",context:"formatting"});case"BBBB":default:return E.dayPeriod(B,{width:"wide",context:"formatting"})||E.dayPeriod(B,{width:"abbreviated",context:"formatting"})||E.dayPeriod(B,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(B,G,E){return B.setUTCHours(rF(E),0,0,0),B}}]),k}(Mi),Wfe=function(x){bi(k,x);var M=Ci(k);function k(){var F;ui(this,k);for(var B=arguments.length,G=new Array(B),E=0;E<B;E++)G[E]=arguments[E];return F=M.call.apply(M,[this].concat(G)),zn(Yn(F),"priority",70),zn(Yn(F),"incompatibleTokens",["H","K","k","t","T"]),F}return hi(k,[{key:"parse",value:function(B,G,E){switch(G){case"h":return ko(Xo.hour12h,B);case"ho":return E.ordinalNumber(B,{unit:"hour"});default:return Ho(G.length,B)}}},{key:"validate",value:function(B,G){return G>=1&&G<=12}},{key:"set",value:function(B,G,E){var A=B.getUTCHours()>=12;return A&&E<12?B.setUTCHours(E+12,0,0,0):!A&&E===12?B.setUTCHours(0,0,0,0):B.setUTCHours(E,0,0,0),B}}]),k}(Mi),Ufe=function(x){bi(k,x);var M=Ci(k);function k(){var F;ui(this,k);for(var B=arguments.length,G=new Array(B),E=0;E<B;E++)G[E]=arguments[E];return F=M.call.apply(M,[this].concat(G)),zn(Yn(F),"priority",70),zn(Yn(F),"incompatibleTokens",["a","b","h","K","k","t","T"]),F}return hi(k,[{key:"parse",value:function(B,G,E){switch(G){case"H":return ko(Xo.hour23h,B);case"Ho":return E.ordinalNumber(B,{unit:"hour"});default:return Ho(G.length,B)}}},{key:"validate",value:function(B,G){return G>=0&&G<=23}},{key:"set",value:function(B,G,E){return B.setUTCHours(E,0,0,0),B}}]),k}(Mi),Gfe=function(x){bi(k,x);var M=Ci(k);function k(){var F;ui(this,k);for(var B=arguments.length,G=new Array(B),E=0;E<B;E++)G[E]=arguments[E];return F=M.call.apply(M,[this].concat(G)),zn(Yn(F),"priority",70),zn(Yn(F),"incompatibleTokens",["h","H","k","t","T"]),F}return hi(k,[{key:"parse",value:function(B,G,E){switch(G){case"K":return ko(Xo.hour11h,B);case"Ko":return E.ordinalNumber(B,{unit:"hour"});default:return Ho(G.length,B)}}},{key:"validate",value:function(B,G){return G>=0&&G<=11}},{key:"set",value:function(B,G,E){var A=B.getUTCHours()>=12;return A&&E<12?B.setUTCHours(E+12,0,0,0):B.setUTCHours(E,0,0,0),B}}]),k}(Mi),jfe=function(x){bi(k,x);var M=Ci(k);function k(){var F;ui(this,k);for(var B=arguments.length,G=new Array(B),E=0;E<B;E++)G[E]=arguments[E];return F=M.call.apply(M,[this].concat(G)),zn(Yn(F),"priority",70),zn(Yn(F),"incompatibleTokens",["a","b","h","H","K","t","T"]),F}return hi(k,[{key:"parse",value:function(B,G,E){switch(G){case"k":return ko(Xo.hour24h,B);case"ko":return E.ordinalNumber(B,{unit:"hour"});default:return Ho(G.length,B)}}},{key:"validate",value:function(B,G){return G>=1&&G<=24}},{key:"set",value:function(B,G,E){var A=E<=24?E%24:E;return B.setUTCHours(A,0,0,0),B}}]),k}(Mi),qfe=function(x){bi(k,x);var M=Ci(k);function k(){var F;ui(this,k);for(var B=arguments.length,G=new Array(B),E=0;E<B;E++)G[E]=arguments[E];return F=M.call.apply(M,[this].concat(G)),zn(Yn(F),"priority",60),zn(Yn(F),"incompatibleTokens",["t","T"]),F}return hi(k,[{key:"parse",value:function(B,G,E){switch(G){case"m":return ko(Xo.minute,B);case"mo":return E.ordinalNumber(B,{unit:"minute"});default:return Ho(G.length,B)}}},{key:"validate",value:function(B,G){return G>=0&&G<=59}},{key:"set",value:function(B,G,E){return B.setUTCMinutes(E,0,0),B}}]),k}(Mi),Yfe=function(x){bi(k,x);var M=Ci(k);function k(){var F;ui(this,k);for(var B=arguments.length,G=new Array(B),E=0;E<B;E++)G[E]=arguments[E];return F=M.call.apply(M,[this].concat(G)),zn(Yn(F),"priority",50),zn(Yn(F),"incompatibleTokens",["t","T"]),F}return hi(k,[{key:"parse",value:function(B,G,E){switch(G){case"s":return ko(Xo.second,B);case"so":return E.ordinalNumber(B,{unit:"second"});default:return Ho(G.length,B)}}},{key:"validate",value:function(B,G){return G>=0&&G<=59}},{key:"set",value:function(B,G,E){return B.setUTCSeconds(E,0),B}}]),k}(Mi),Kfe=function(x){bi(k,x);var M=Ci(k);function k(){var F;ui(this,k);for(var B=arguments.length,G=new Array(B),E=0;E<B;E++)G[E]=arguments[E];return F=M.call.apply(M,[this].concat(G)),zn(Yn(F),"priority",30),zn(Yn(F),"incompatibleTokens",["t","T"]),F}return hi(k,[{key:"parse",value:function(B,G){var E=function(u){return Math.floor(u*Math.pow(10,-G.length+3))};return Jo(Ho(G.length,B),E)}},{key:"set",value:function(B,G,E){return B.setUTCMilliseconds(E),B}}]),k}(Mi),Xfe=function(x){bi(k,x);var M=Ci(k);function k(){var F;ui(this,k);for(var B=arguments.length,G=new Array(B),E=0;E<B;E++)G[E]=arguments[E];return F=M.call.apply(M,[this].concat(G)),zn(Yn(F),"priority",10),zn(Yn(F),"incompatibleTokens",["t","T","x"]),F}return hi(k,[{key:"parse",value:function(B,G){switch(G){case"X":return tc(ec.basicOptionalMinutes,B);case"XX":return tc(ec.basic,B);case"XXXX":return tc(ec.basicOptionalSeconds,B);case"XXXXX":return tc(ec.extendedOptionalSeconds,B);case"XXX":default:return tc(ec.extended,B)}}},{key:"set",value:function(B,G,E){return G.timestampIsSet?B:new Date(B.getTime()-E)}}]),k}(Mi),Jfe=function(x){bi(k,x);var M=Ci(k);function k(){var F;ui(this,k);for(var B=arguments.length,G=new Array(B),E=0;E<B;E++)G[E]=arguments[E];return F=M.call.apply(M,[this].concat(G)),zn(Yn(F),"priority",10),zn(Yn(F),"incompatibleTokens",["t","T","X"]),F}return hi(k,[{key:"parse",value:function(B,G){switch(G){case"x":return tc(ec.basicOptionalMinutes,B);case"xx":return tc(ec.basic,B);case"xxxx":return tc(ec.basicOptionalSeconds,B);case"xxxxx":return tc(ec.extendedOptionalSeconds,B);case"xxx":default:return tc(ec.extended,B)}}},{key:"set",value:function(B,G,E){return G.timestampIsSet?B:new Date(B.getTime()-E)}}]),k}(Mi),Zfe=function(x){bi(k,x);var M=Ci(k);function k(){var F;ui(this,k);for(var B=arguments.length,G=new Array(B),E=0;E<B;E++)G[E]=arguments[E];return F=M.call.apply(M,[this].concat(G)),zn(Yn(F),"priority",40),zn(Yn(F),"incompatibleTokens","*"),F}return hi(k,[{key:"parse",value:function(B){return qZ(B)}},{key:"set",value:function(B,G,E){return[new Date(E*1e3),{timestampIsSet:!0}]}}]),k}(Mi),Qfe=function(x){bi(k,x);var M=Ci(k);function k(){var F;ui(this,k);for(var B=arguments.length,G=new Array(B),E=0;E<B;E++)G[E]=arguments[E];return F=M.call.apply(M,[this].concat(G)),zn(Yn(F),"priority",20),zn(Yn(F),"incompatibleTokens","*"),F}return hi(k,[{key:"parse",value:function(B){return qZ(B)}},{key:"set",value:function(B,G,E){return[new Date(E),{timestampIsSet:!0}]}}]),k}(Mi),ege={G:new yfe,y:new wfe,Y:new bfe,R:new Cfe,u:new _fe,Q:new Sfe,q:new Ife,M:new xfe,L:new Tfe,w:new Rfe,I:new Afe,d:new Ofe,D:new Nfe,E:new Pfe,e:new Bfe,c:new Lfe,i:new Vfe,a:new Hfe,b:new $fe,B:new zfe,h:new Wfe,H:new Ufe,K:new Gfe,k:new jfe,m:new qfe,s:new Yfe,S:new Kfe,X:new Xfe,x:new Jfe,t:new Zfe,T:new Qfe},tge=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,nge=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,rge=/^'([^]*?)'?$/,ige=/''/g,oge=/\S/,age=/[a-zA-Z]/;function XZ(x,M,k,F){var B,G,E,A,u,o,S,_,p,f,y,d,v,b,s,l,w,I;Ze(3,arguments);var C=String(x),h=String(M),c=sa(),m=(B=(G=F?.locale)!==null&&G!==void 0?G:c.locale)!==null&&B!==void 0?B:Jm;if(!m.match)throw new RangeError("locale must contain match property");var T=yn((E=(A=(u=(o=F?.firstWeekContainsDate)!==null&&o!==void 0?o:F==null||(S=F.locale)===null||S===void 0||(_=S.options)===null||_===void 0?void 0:_.firstWeekContainsDate)!==null&&u!==void 0?u:c.firstWeekContainsDate)!==null&&A!==void 0?A:(p=c.locale)===null||p===void 0||(f=p.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&E!==void 0?E:1);if(!(T>=1&&T<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var D=yn((y=(d=(v=(b=F?.weekStartsOn)!==null&&b!==void 0?b:F==null||(s=F.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&v!==void 0?v:c.weekStartsOn)!==null&&d!==void 0?d:(w=c.locale)===null||w===void 0||(I=w.options)===null||I===void 0?void 0:I.weekStartsOn)!==null&&y!==void 0?y:0);if(!(D>=0&&D<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(h==="")return C===""?lt(k):new Date(NaN);var O={firstWeekContainsDate:T,weekStartsOn:D,locale:m},N=[new vfe],z=h.match(nge).map(function(ne){var le=ne[0];if(le in AL){var fe=AL[le];return fe(ne,m.formatLong)}return ne}).join("").match(tge),H=[],$=_U(z),V;try{var P=function(){var le=V.value;!(F!=null&&F.useAdditionalWeekYearTokens)&&AZ(le)&&rx(le,h,x),!(F!=null&&F.useAdditionalDayOfYearTokens)&&EZ(le)&&rx(le,h,x);var fe=le[0],we=ege[fe];if(we){var pe=we.incompatibleTokens;if(Array.isArray(pe)){var ve=H.find(function(Ee){return pe.includes(Ee.token)||Ee.token===fe});if(ve)throw new RangeError("The format string mustn't contain `".concat(ve.fullToken,"` and `").concat(le,"` at the same time"))}else if(we.incompatibleTokens==="*"&&H.length>0)throw new RangeError("The format string mustn't contain `".concat(le,"` and any other token at the same time"));H.push({token:fe,fullToken:le});var be=we.run(C,le,m.match,O);if(!be)return{v:new Date(NaN)};N.push(be.setter),C=be.rest}else{if(fe.match(age))throw new RangeError("Format string contains an unescaped latin alphabet character `"+fe+"`");if(le==="''"?le="'":fe==="'"&&(le=sge(le)),C.indexOf(le)===0)C=C.slice(le.length);else return{v:new Date(NaN)}}};for($.s();!(V=$.n()).done;){var U=P();if(tl(U)==="object")return U.v}}catch(ne){$.e(ne)}finally{$.f()}if(C.length>0&&oge.test(C))return new Date(NaN);var Y=N.map(function(ne){return ne.priority}).sort(function(ne,le){return le-ne}).filter(function(ne,le,fe){return fe.indexOf(ne)===le}).map(function(ne){return N.filter(function(le){return le.priority===ne}).sort(function(le,fe){return fe.subPriority-le.subPriority})}).map(function(ne){return ne[0]}),Z=lt(k);if(isNaN(Z.getTime()))return new Date(NaN);var X=zm(Z,nl(Z)),J={},q=_U(Y),te;try{for(q.s();!(te=q.n()).done;){var re=te.value;if(!re.validate(X,O))return new Date(NaN);var ie=re.set(X,J,O);Array.isArray(ie)?(X=ie[0],Cb(J,ie[1])):X=ie}}catch(ne){q.e(ne)}finally{q.f()}return X}function sge(x){return x.match(rge)[1].replace(ige,"'")}function lge(x,M,k){return Ze(2,arguments),Zc(XZ(x,M,new Date,k))}function uge(x){return Ze(1,arguments),lt(x).getDay()===1}function hge(x){return Ze(1,arguments),lt(x).getTime()<Date.now()}function DL(x){Ze(1,arguments);var M=lt(x);return M.setMinutes(0,0,0),M}function JZ(x,M){Ze(2,arguments);var k=DL(x),F=DL(M);return k.getTime()===F.getTime()}function oF(x,M,k){Ze(2,arguments);var F=ku(x,k),B=ku(M,k);return F.getTime()===B.getTime()}function ZZ(x,M){return Ze(2,arguments),oF(x,M,{weekStartsOn:1})}function cge(x,M){Ze(2,arguments);var k=of(x),F=of(M);return k.getTime()===F.getTime()}function QZ(x,M){Ze(2,arguments);var k=nx(x),F=nx(M);return k.getTime()===F.getTime()}function eQ(x,M){Ze(2,arguments);var k=lt(x),F=lt(M);return k.getFullYear()===F.getFullYear()&&k.getMonth()===F.getMonth()}function tQ(x,M){Ze(2,arguments);var k=hb(x),F=hb(M);return k.getTime()===F.getTime()}function OL(x){Ze(1,arguments);var M=lt(x);return M.setMilliseconds(0),M}function nQ(x,M){Ze(2,arguments);var k=OL(x),F=OL(M);return k.getTime()===F.getTime()}function rQ(x,M){Ze(2,arguments);var k=lt(x),F=lt(M);return k.getFullYear()===F.getFullYear()}function dge(x){return Ze(1,arguments),JZ(Date.now(),x)}function fge(x){return Ze(1,arguments),ZZ(x,Date.now())}function gge(x){return Ze(1,arguments),QZ(Date.now(),x)}function pge(x){return Ze(1,arguments),eQ(Date.now(),x)}function mge(x){return Ze(1,arguments),tQ(Date.now(),x)}function vge(x){return Ze(1,arguments),nQ(Date.now(),x)}function yge(x,M){return Ze(1,arguments),oF(x,Date.now(),M)}function wge(x){return Ze(1,arguments),rQ(x,Date.now())}function bge(x){return Ze(1,arguments),lt(x).getDay()===4}function Cge(x){return Ze(1,arguments),bb(x,Date.now())}function _ge(x){return Ze(1,arguments),bb(x,rc(Date.now(),1))}function Sge(x){return Ze(1,arguments),lt(x).getDay()===2}function Ige(x){return Ze(1,arguments),lt(x).getDay()===3}function xge(x,M){Ze(2,arguments);var k=lt(x).getTime(),F=lt(M.start).getTime(),B=lt(M.end).getTime();if(!(F<=B))throw new RangeError("Invalid interval");return k>=F&&k<=B}function Tx(x,M){Ze(2,arguments);var k=yn(M);return rc(x,-k)}function Tge(x){return Ze(1,arguments),bb(x,Tx(Date.now(),1))}function kge(x){Ze(1,arguments);var M=lt(x),k=M.getFullYear(),F=9+Math.floor(k/10)*10;return M.setFullYear(F+1,0,0),M.setHours(0,0,0,0),M}function iQ(x,M){var k,F,B,G,E,A,u,o;Ze(1,arguments);var S=sa(),_=yn((k=(F=(B=(G=M?.weekStartsOn)!==null&&G!==void 0?G:M==null||(E=M.locale)===null||E===void 0||(A=E.options)===null||A===void 0?void 0:A.weekStartsOn)!==null&&B!==void 0?B:S.weekStartsOn)!==null&&F!==void 0?F:(u=S.locale)===null||u===void 0||(o=u.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&k!==void 0?k:0);if(!(_>=0&&_<=6))throw new RangeError("weekStartsOn must be between 0 and 6");var p=lt(x),f=p.getDay(),y=(f<_?-7:0)+6-(f-_);return p.setHours(0,0,0,0),p.setDate(p.getDate()+y),p}function Rge(x){return Ze(1,arguments),iQ(x,{weekStartsOn:1})}function Ege(x){Ze(1,arguments);var M=Ig(x),k=new Date(0);k.setFullYear(M+1,0,4),k.setHours(0,0,0,0);var F=Jc(k);return F.setDate(F.getDate()-1),F}function Age(x){Ze(1,arguments);var M=lt(x),k=M.getMonth(),F=k-k%3+3;return M.setMonth(F,0),M.setHours(0,0,0,0),M}function Mge(x){Ze(1,arguments);var M=lt(x),k=M.getFullYear();return M.setFullYear(k+1,0,0),M.setHours(0,0,0,0),M}var Dge=/(\w)\1*|''|'(''|[^'])+('|$)|./g,Oge=/^'([^]*?)'?$/,Nge=/''/g,Pge=/[a-zA-Z]/;function Bge(x,M){Ze(2,arguments);var k=lt(x);if(!Zc(k))throw new RangeError("Invalid time value");var F=nl(k),B=zm(k,F),G=M.match(Dge);if(!G)return"";var E=G.map(function(A){if(A==="''")return"'";var u=A[0];if(u==="'")return Lge(A);var o=Gc[u];if(o)return o(B,A);if(u.match(Pge))throw new RangeError("Format string contains an unescaped latin alphabet character `"+u+"`");return A}).join("");return E}function Lge(x){var M=x.match(Oge);return M?M[1].replace(Nge,"'"):x}var SU=365.2425;function Fge(x){var M=x.years,k=x.months,F=x.weeks,B=x.days,G=x.hours,E=x.minutes,A=x.seconds;Ze(1,arguments);var u=0;M&&(u+=M*SU),k&&(u+=k*(SU/12)),F&&(u+=F*7),B&&(u+=B);var o=u*24*60*60;return G&&(o+=G*60*60),E&&(o+=E*60),A&&(o+=A),Math.round(o*1e3)}function Vge(x){Ze(1,arguments);var M=x/Mg;return Math.floor(M)}function Hge(x){Ze(1,arguments);var M=x/Ag;return Math.floor(M)}function $ge(x){Ze(1,arguments);var M=x/yx;return Math.floor(M)}function zge(x){Ze(1,arguments);var M=x/GL;return Math.floor(M)}function Wge(x){return Ze(1,arguments),Math.floor(x*Ag)}function Uge(x){return Ze(1,arguments),Math.floor(x*bx)}function Gge(x){Ze(1,arguments);var M=x/jL;return Math.floor(M)}function jge(x){Ze(1,arguments);var M=x/qL;return Math.floor(M)}function lf(x,M){Ze(2,arguments);var k=M-xx(x);return k<=0&&(k+=7),rc(x,k)}function qge(x){return Ze(1,arguments),lf(x,5)}function Yge(x){return Ze(1,arguments),lf(x,1)}function Kge(x){return Ze(1,arguments),lf(x,6)}function Xge(x){return Ze(1,arguments),lf(x,0)}function Jge(x){return Ze(1,arguments),lf(x,4)}function Zge(x){return Ze(1,arguments),lf(x,2)}function Qge(x){return Ze(1,arguments),lf(x,3)}function epe(x,M){var k;Ze(1,arguments);var F=yn((k=M?.additionalDigits)!==null&&k!==void 0?k:2);if(F!==2&&F!==1&&F!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof x=="string"||Object.prototype.toString.call(x)==="[object String]"))return new Date(NaN);var B=ipe(x),G;if(B.date){var E=ope(B.date,F);G=ape(E.restDateString,E.year)}if(!G||isNaN(G.getTime()))return new Date(NaN);var A=G.getTime(),u=0,o;if(B.time&&(u=spe(B.time),isNaN(u)))return new Date(NaN);if(B.timezone){if(o=lpe(B.timezone),isNaN(o))return new Date(NaN)}else{var S=new Date(A+u),_=new Date(0);return _.setFullYear(S.getUTCFullYear(),S.getUTCMonth(),S.getUTCDate()),_.setHours(S.getUTCHours(),S.getUTCMinutes(),S.getUTCSeconds(),S.getUTCMilliseconds()),_}return new Date(A+u+o)}var j1={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},tpe=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,npe=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,rpe=/^([+-])(\d{2})(?::?(\d{2}))?$/;function ipe(x){var M={},k=x.split(j1.dateTimeDelimiter),F;if(k.length>2)return M;if(/:/.test(k[0])?F=k[0]:(M.date=k[0],F=k[1],j1.timeZoneDelimiter.test(M.date)&&(M.date=x.split(j1.timeZoneDelimiter)[0],F=x.substr(M.date.length,x.length))),F){var B=j1.timezone.exec(F);B?(M.time=F.replace(B[1],""),M.timezone=B[1]):M.time=F}return M}function ope(x,M){var k=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+M)+"})|(\\d{2}|[+-]\\d{"+(2+M)+"})$)"),F=x.match(k);if(!F)return{year:NaN,restDateString:""};var B=F[1]?parseInt(F[1]):null,G=F[2]?parseInt(F[2]):null;return{year:G===null?B:G*100,restDateString:x.slice((F[1]||F[2]).length)}}function ape(x,M){if(M===null)return new Date(NaN);var k=x.match(tpe);if(!k)return new Date(NaN);var F=!!k[4],B=Gw(k[1]),G=Gw(k[2])-1,E=Gw(k[3]),A=Gw(k[4]),u=Gw(k[5])-1;if(F)return fpe(M,A,u)?upe(M,A,u):new Date(NaN);var o=new Date(0);return!cpe(M,G,E)||!dpe(M,B)?new Date(NaN):(o.setUTCFullYear(M,G,Math.max(B,E)),o)}function Gw(x){return x?parseInt(x):1}function spe(x){var M=x.match(npe);if(!M)return NaN;var k=hO(M[1]),F=hO(M[2]),B=hO(M[3]);return gpe(k,F,B)?k*Mg+F*Ag+B*1e3:NaN}function hO(x){return x&&parseFloat(x.replace(",","."))||0}function lpe(x){if(x==="Z")return 0;var M=x.match(rpe);if(!M)return 0;var k=M[1]==="+"?-1:1,F=parseInt(M[2]),B=M[3]&&parseInt(M[3])||0;return ppe(F,B)?k*(F*Mg+B*Ag):NaN}function upe(x,M,k){var F=new Date(0);F.setUTCFullYear(x,0,4);var B=F.getUTCDay()||7,G=(M-1)*7+k+1-B;return F.setUTCDate(F.getUTCDate()+G),F}var hpe=[31,null,31,30,31,30,31,31,30,31,30,31];function oQ(x){return x%400===0||x%4===0&&x%100!==0}function cpe(x,M,k){return M>=0&&M<=11&&k>=1&&k<=(hpe[M]||(oQ(x)?29:28))}function dpe(x,M){return M>=1&&M<=(oQ(x)?366:365)}function fpe(x,M,k){return M>=1&&M<=53&&k>=0&&k<=6}function gpe(x,M,k){return x===24?M===0&&k===0:k>=0&&k<60&&M>=0&&M<60&&x>=0&&x<25}function ppe(x,M){return M>=0&&M<=59}function mpe(x){if(Ze(1,arguments),typeof x=="string"){var M=x.match(/(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2}):(\d{2})(?:\.(\d{0,7}))?(?:Z|(.)(\d{2}):?(\d{2})?)?/);return M?new Date(Date.UTC(+M[1],+M[2]-1,+M[3],+M[4]-(+M[9]||0)*(M[8]=="-"?-1:1),+M[5]-(+M[10]||0)*(M[8]=="-"?-1:1),+M[6],+((M[7]||"0")+"00").substring(0,3))):new Date(NaN)}return lt(x)}function uf(x,M){Ze(2,arguments);var k=xx(x)-M;return k<=0&&(k+=7),Tx(x,k)}function vpe(x){return Ze(1,arguments),uf(x,5)}function ype(x){return Ze(1,arguments),uf(x,1)}function wpe(x){return Ze(1,arguments),uf(x,6)}function bpe(x){return Ze(1,arguments),uf(x,0)}function Cpe(x){return Ze(1,arguments),uf(x,4)}function _pe(x){return Ze(1,arguments),uf(x,2)}function Spe(x){return Ze(1,arguments),uf(x,3)}function Ipe(x){return Ze(1,arguments),Math.floor(x*jL)}function xpe(x){Ze(1,arguments);var M=x/YL;return Math.floor(M)}function Tpe(x,M){var k;if(arguments.length<1)throw new TypeError("1 argument required, but only none provided present");var F=yn((k=M?.nearestTo)!==null&&k!==void 0?k:1);if(F<1||F>30)throw new RangeError("`options.nearestTo` must be between 1 and 30");var B=lt(x),G=B.getSeconds(),E=B.getMinutes()+G/60,A=Xm(M?.roundingMethod),u=A(E/F)*F,o=E%F,S=Math.round(o/F)*F;return new Date(B.getFullYear(),B.getMonth(),B.getDate(),B.getHours(),u+S)}function kpe(x){Ze(1,arguments);var M=x/wb;return Math.floor(M)}function Rpe(x){return Ze(1,arguments),x*yx}function Epe(x){Ze(1,arguments);var M=x/bx;return Math.floor(M)}function aF(x,M){Ze(2,arguments);var k=lt(x),F=yn(M),B=k.getFullYear(),G=k.getDate(),E=new Date(0);E.setFullYear(B,F,15),E.setHours(0,0,0,0);var A=BZ(E);return k.setMonth(F,Math.min(G,A)),k}function Ape(x,M){if(Ze(2,arguments),tl(M)!=="object"||M===null)throw new RangeError("values parameter must be an object");var k=lt(x);return isNaN(k.getTime())?new Date(NaN):(M.year!=null&&k.setFullYear(M.year),M.month!=null&&(k=aF(k,M.month)),M.date!=null&&k.setDate(yn(M.date)),M.hours!=null&&k.setHours(yn(M.hours)),M.minutes!=null&&k.setMinutes(yn(M.minutes)),M.seconds!=null&&k.setSeconds(yn(M.seconds)),M.milliseconds!=null&&k.setMilliseconds(yn(M.milliseconds)),k)}function Mpe(x,M){Ze(2,arguments);var k=lt(x),F=yn(M);return k.setDate(F),k}function Dpe(x,M,k){var F,B,G,E,A,u,o,S;Ze(2,arguments);var _=sa(),p=yn((F=(B=(G=(E=k?.weekStartsOn)!==null&&E!==void 0?E:k==null||(A=k.locale)===null||A===void 0||(u=A.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&G!==void 0?G:_.weekStartsOn)!==null&&B!==void 0?B:(o=_.locale)===null||o===void 0||(S=o.options)===null||S===void 0?void 0:S.weekStartsOn)!==null&&F!==void 0?F:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=lt(x),y=yn(M),d=f.getDay(),v=y%7,b=(v+7)%7,s=7-p,l=y<0||y>6?y-(d+s)%7:(b+s)%7-(d+s)%7;return rc(f,l)}function Ope(x,M){Ze(2,arguments);var k=lt(x),F=yn(M);return k.setMonth(0),k.setDate(F),k}function Npe(x){Ze(1,arguments);var M={},k=sa();for(var F in k)Object.prototype.hasOwnProperty.call(k,F)&&(M[F]=k[F]);for(var B in x)Object.prototype.hasOwnProperty.call(x,B)&&(x[B]===void 0?delete M[B]:M[B]=x[B]);$he(M)}function Ppe(x,M){Ze(2,arguments);var k=lt(x),F=yn(M);return k.setHours(F),k}function Bpe(x,M){Ze(2,arguments);var k=lt(x),F=yn(M),B=FZ(k),G=F-B;return rc(k,G)}function Lpe(x,M){Ze(2,arguments);var k=lt(x),F=yn(M),B=VZ(k)-F;return k.setDate(k.getDate()-B*7),k}function Fpe(x,M){Ze(2,arguments);var k=lt(x),F=yn(M);return k.setMilliseconds(F),k}function Vpe(x,M){Ze(2,arguments);var k=lt(x),F=yn(M);return k.setMinutes(F),k}function Hpe(x,M){Ze(2,arguments);var k=lt(x),F=yn(M),B=Math.floor(k.getMonth()/3)+1,G=F-B;return aF(k,k.getMonth()+G*3)}function $pe(x,M){Ze(2,arguments);var k=lt(x),F=yn(M);return k.setSeconds(F),k}function zpe(x,M,k){Ze(2,arguments);var F=lt(x),B=yn(M),G=zZ(F,k)-B;return F.setDate(F.getDate()-G*7),F}function Wpe(x,M,k){var F,B,G,E,A,u,o,S;Ze(2,arguments);var _=sa(),p=yn((F=(B=(G=(E=k?.firstWeekContainsDate)!==null&&E!==void 0?E:k==null||(A=k.locale)===null||A===void 0||(u=A.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&G!==void 0?G:_.firstWeekContainsDate)!==null&&B!==void 0?B:(o=_.locale)===null||o===void 0||(S=o.options)===null||S===void 0?void 0:S.firstWeekContainsDate)!==null&&F!==void 0?F:1),f=lt(x),y=yn(M),d=nc(f,ox(f,k)),v=new Date(0);return v.setFullYear(y,0,p),v.setHours(0,0,0,0),f=ox(v,k),f.setDate(f.getDate()+d),f}function Upe(x,M){Ze(2,arguments);var k=lt(x),F=yn(M);return isNaN(k.getTime())?new Date(NaN):(k.setFullYear(F),k)}function Gpe(x){Ze(1,arguments);var M=lt(x),k=M.getFullYear(),F=Math.floor(k/10)*10;return M.setFullYear(F,0,1),M.setHours(0,0,0,0),M}function jpe(){return $m(Date.now())}function qpe(){var x=new Date,M=x.getFullYear(),k=x.getMonth(),F=x.getDate(),B=new Date(0);return B.setFullYear(M,k,F+1),B.setHours(0,0,0,0),B}function Ype(){var x=new Date,M=x.getFullYear(),k=x.getMonth(),F=x.getDate(),B=new Date(0);return B.setFullYear(M,k,F-1),B.setHours(0,0,0,0),B}function aQ(x,M){Ze(2,arguments);var k=yn(M);return vb(x,-k)}function Kpe(x,M){if(Ze(2,arguments),!M||tl(M)!=="object")return new Date(NaN);var k=M.years?yn(M.years):0,F=M.months?yn(M.months):0,B=M.weeks?yn(M.weeks):0,G=M.days?yn(M.days):0,E=M.hours?yn(M.hours):0,A=M.minutes?yn(M.minutes):0,u=M.seconds?yn(M.seconds):0,o=aQ(x,F+k*12),S=Tx(o,G+B*7),_=A+E*60,p=u+_*60,f=p*1e3,y=new Date(S.getTime()-f);return y}function Xpe(x,M){Ze(2,arguments);var k=yn(M);return oZ(x,-k)}function Jpe(x,M){Ze(2,arguments);var k=yn(M);return $L(x,-k)}function Zpe(x,M){Ze(2,arguments);var k=yn(M);return zL(x,-k)}function Qpe(x,M){Ze(2,arguments);var k=yn(M);return WL(x,-k)}function eme(x,M){Ze(2,arguments);var k=yn(M);return uZ(x,-k)}function tme(x,M){Ze(2,arguments);var k=yn(M);return vx(x,-k)}function nme(x,M){Ze(2,arguments);var k=yn(M);return hZ(x,-k)}function rme(x){return Ze(1,arguments),Math.floor(x*UL)}function ime(x){return Ze(1,arguments),Math.floor(x*qL)}function ome(x){return Ze(1,arguments),Math.floor(x*YL)}const ame=Object.freeze(Object.defineProperty({__proto__:null,add:Lm,addBusinessDays:oZ,addDays:rc,addHours:$L,addISOWeekYears:lZ,addMilliseconds:yb,addMinutes:zL,addMonths:vb,addQuarters:WL,addSeconds:uZ,addWeeks:vx,addYears:hZ,areIntervalsOverlapping:Uhe,clamp:Ghe,closestIndexTo:jhe,closestTo:qhe,compareAsc:ah,compareDesc:Yhe,daysInWeek:UL,daysInYear:fZ,daysToWeeks:Xhe,differenceInBusinessDays:Jhe,differenceInCalendarDays:nc,differenceInCalendarISOWeekYears:yZ,differenceInCalendarISOWeeks:Qhe,differenceInCalendarMonths:ZI,differenceInCalendarQuarters:GI,differenceInCalendarWeeks:QI,differenceInCalendarYears:ub,differenceInDays:JL,differenceInHours:ex,differenceInISOWeekYears:nce,differenceInMilliseconds:_x,differenceInMinutes:tx,differenceInMonths:Sx,differenceInQuarters:rce,differenceInSeconds:Vm,differenceInWeeks:ice,differenceInYears:CZ,eachDayOfInterval:_Z,eachHourOfInterval:oce,eachMinuteOfInterval:ace,eachMonthOfInterval:sce,eachQuarterOfInterval:lce,eachWeekOfInterval:uce,eachWeekendOfInterval:eF,eachWeekendOfMonth:hce,eachWeekendOfYear:cce,eachYearOfInterval:dce,endOfDay:ZL,endOfDecade:fce,endOfHour:gce,endOfISOWeek:pce,endOfISOWeekYear:mce,endOfMinute:vce,endOfMonth:QL,endOfQuarter:yce,endOfSecond:wce,endOfToday:bce,endOfTomorrow:Cce,endOfWeek:IZ,endOfYear:SZ,endOfYesterday:_ce,format:MZ,formatDistance:OZ,formatDistanceStrict:NZ,formatDistanceToNow:wde,formatDistanceToNowStrict:bde,formatDuration:_de,formatISO:Sde,formatISO9075:Ide,formatISODuration:xde,formatRFC3339:Tde,formatRFC7231:Ede,formatRelative:Ade,fromUnixTime:Mde,getDate:PZ,getDay:xx,getDayOfYear:Dde,getDaysInMonth:BZ,getDaysInYear:Ode,getDecade:Nde,getDefaultOptions:Pde,getHours:Bde,getISODay:FZ,getISOWeek:VZ,getISOWeekYear:Ig,getISOWeeksInYear:Vde,getMilliseconds:Hde,getMinutes:$de,getMonth:zde,getOverlappingDaysInIntervals:Ude,getQuarter:EL,getSeconds:Gde,getTime:HZ,getUnixTime:jde,getWeek:zZ,getWeekOfMonth:Yde,getWeekYear:$Z,getWeeksInMonth:Kde,getYear:Xde,hoursToMilliseconds:Jde,hoursToMinutes:Zde,hoursToSeconds:Qde,intervalToDuration:efe,intlFormat:tfe,intlFormatDistance:rfe,isAfter:ife,isBefore:ofe,isDate:vZ,isEqual:afe,isExists:sfe,isFirstDayOfMonth:lfe,isFriday:ufe,isFuture:hfe,isLastDayOfMonth:bZ,isLeapYear:LZ,isMatch:lge,isMonday:uge,isPast:hge,isSameDay:bb,isSameHour:JZ,isSameISOWeek:ZZ,isSameISOWeekYear:cge,isSameMinute:QZ,isSameMonth:eQ,isSameQuarter:tQ,isSameSecond:nQ,isSameWeek:oF,isSameYear:rQ,isSaturday:iZ,isSunday:HL,isThisHour:dge,isThisISOWeek:fge,isThisMinute:gge,isThisMonth:pge,isThisQuarter:mge,isThisSecond:vge,isThisWeek:yge,isThisYear:wge,isThursday:bge,isToday:Cge,isTomorrow:_ge,isTuesday:Sge,isValid:Zc,isWednesday:Ige,isWeekend:Fm,isWithinInterval:xge,isYesterday:Tge,lastDayOfDecade:kge,lastDayOfISOWeek:Rge,lastDayOfISOWeekYear:Ege,lastDayOfMonth:WZ,lastDayOfQuarter:Age,lastDayOfWeek:iQ,lastDayOfYear:Mge,lightFormat:Bge,max:cZ,maxTime:gZ,milliseconds:Fge,millisecondsInHour:Mg,millisecondsInMinute:Ag,millisecondsInSecond:yx,millisecondsToHours:Vge,millisecondsToMinutes:Hge,millisecondsToSeconds:$ge,min:dZ,minTime:Khe,minutesInHour:GL,minutesToHours:zge,minutesToMilliseconds:Wge,minutesToSeconds:Uge,monthsInQuarter:jL,monthsInYear:qL,monthsToQuarters:Gge,monthsToYears:jge,nextDay:lf,nextFriday:qge,nextMonday:Yge,nextSaturday:Kge,nextSunday:Xge,nextThursday:Jge,nextTuesday:Zge,nextWednesday:Qge,parse:XZ,parseISO:epe,parseJSON:mpe,previousDay:uf,previousFriday:vpe,previousMonday:ype,previousSaturday:wpe,previousSunday:bpe,previousThursday:Cpe,previousTuesday:_pe,previousWednesday:Spe,quartersInYear:YL,quartersToMonths:Ipe,quartersToYears:xpe,roundToNearestMinutes:Tpe,secondsInDay:Cx,secondsInHour:wb,secondsInMinute:bx,secondsInMonth:XL,secondsInQuarter:mZ,secondsInWeek:pZ,secondsInYear:KL,secondsToHours:kpe,secondsToMilliseconds:Rpe,secondsToMinutes:Epe,set:Ape,setDate:Mpe,setDay:Dpe,setDayOfYear:Ope,setDefaultOptions:Npe,setHours:Ppe,setISODay:Bpe,setISOWeek:Lpe,setISOWeekYear:sZ,setMilliseconds:Fpe,setMinutes:Vpe,setMonth:aF,setQuarter:Hpe,setSeconds:$pe,setWeek:zpe,setWeekYear:Wpe,setYear:Upe,startOfDay:$m,startOfDecade:Gpe,startOfHour:DL,startOfISOWeek:Jc,startOfISOWeekYear:of,startOfMinute:nx,startOfMonth:Ix,startOfQuarter:hb,startOfSecond:OL,startOfToday:jpe,startOfTomorrow:qpe,startOfWeek:ku,startOfWeekYear:ox,startOfYear:tF,startOfYesterday:Ype,sub:Kpe,subBusinessDays:Xpe,subDays:Tx,subHours:Jpe,subISOWeekYears:wZ,subMilliseconds:zm,subMinutes:Zpe,subMonths:aQ,subQuarters:Qpe,subSeconds:eme,subWeeks:tme,subYears:nme,toDate:lt,weeksToDays:rme,yearsToMonths:ime,yearsToQuarters:ome},Symbol.toStringTag,{value:"Module"}));var IU={},jw,xU;function ic(){if(xU)return jw;xU=1;var x=function(M){return M&&M.Math===Math&&M};return jw=x(typeof globalThis=="object"&&globalThis)||x(typeof window=="object"&&window)||x(typeof self=="object"&&self)||x(typeof _l=="object"&&_l)||x(typeof jw=="object"&&jw)||function(){return this}()||Function("return this")(),jw}var cO={},dO,TU;function hf(){return TU||(TU=1,dO=function(x){try{return!!x()}catch{return!0}}),dO}var fO,kU;function cf(){if(kU)return fO;kU=1;var x=hf();return fO=!x(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),fO}var gO,RU;function sQ(){if(RU)return gO;RU=1;var x=hf();return gO=!x(function(){var M=(function(){}).bind();return typeof M!="function"||M.hasOwnProperty("prototype")}),gO}var pO,EU;function sF(){if(EU)return pO;EU=1;var x=sQ(),M=Function.prototype.call;return pO=x?M.bind(M):function(){return M.apply(M,arguments)},pO}var mO={},AU;function sme(){if(AU)return mO;AU=1;var x={}.propertyIsEnumerable,M=Object.getOwnPropertyDescriptor,k=M&&!x.call({1:2},1);return mO.f=k?function(B){var G=M(this,B);return!!G&&G.enumerable}:x,mO}var vO,MU;function lQ(){return MU||(MU=1,vO=function(x,M){return{enumerable:!(x&1),configurable:!(x&2),writable:!(x&4),value:M}}),vO}var yO,DU;function Qc(){if(DU)return yO;DU=1;var x=sQ(),M=Function.prototype,k=M.call,F=x&&M.bind.bind(k,k);return yO=x?F:function(B){return function(){return k.apply(B,arguments)}},yO}var wO,OU;function uQ(){if(OU)return wO;OU=1;var x=Qc(),M=x({}.toString),k=x("".slice);return wO=function(F){return k(M(F),8,-1)},wO}var bO,NU;function lme(){if(NU)return bO;NU=1;var x=Qc(),M=hf(),k=uQ(),F=Object,B=x("".split);return bO=M(function(){return!F("z").propertyIsEnumerable(0)})?function(G){return k(G)==="String"?B(G,""):F(G)}:F,bO}var CO,PU;function hQ(){return PU||(PU=1,CO=function(x){return x==null}),CO}var _O,BU;function cQ(){if(BU)return _O;BU=1;var x=hQ(),M=TypeError;return _O=function(k){if(x(k))throw new M("Can't call method on "+k);return k},_O}var SO,LU;function lF(){if(LU)return SO;LU=1;var x=lme(),M=cQ();return SO=function(k){return x(M(k))},SO}var IO,FU;function oc(){if(FU)return IO;FU=1;var x=typeof document=="object"&&document.all;return IO=typeof x>"u"&&x!==void 0?function(M){return typeof M=="function"||M===x}:function(M){return typeof M=="function"},IO}var xO,VU;function _b(){if(VU)return xO;VU=1;var x=oc();return xO=function(M){return typeof M=="object"?M!==null:x(M)},xO}var TO,HU;function dQ(){if(HU)return TO;HU=1;var x=ic(),M=oc(),k=function(F){return M(F)?F:void 0};return TO=function(F,B){return arguments.length<2?k(x[F]):x[F]&&x[F][B]},TO}var kO,$U;function ume(){if($U)return kO;$U=1;var x=Qc();return kO=x({}.isPrototypeOf),kO}var RO,zU;function hme(){return zU||(zU=1,RO=typeof navigator<"u"&&String(navigator.userAgent)||""),RO}var EO,WU;function cme(){if(WU)return EO;WU=1;var x=ic(),M=hme(),k=x.process,F=x.Deno,B=k&&k.versions||F&&F.version,G=B&&B.v8,E,A;return G&&(E=G.split("."),A=E[0]>0&&E[0]<4?1:+(E[0]+E[1])),!A&&M&&(E=M.match(/Edge\/(\d+)/),(!E||E[1]>=74)&&(E=M.match(/Chrome\/(\d+)/),E&&(A=+E[1]))),EO=A,EO}var AO,UU;function fQ(){if(UU)return AO;UU=1;var x=cme(),M=hf(),k=ic(),F=k.String;return AO=!!Object.getOwnPropertySymbols&&!M(function(){var B=Symbol("symbol detection");return!F(B)||!(Object(B)instanceof Symbol)||!Symbol.sham&&x&&x<41}),AO}var MO,GU;function gQ(){if(GU)return MO;GU=1;var x=fQ();return MO=x&&!Symbol.sham&&typeof Symbol.iterator=="symbol",MO}var DO,jU;function pQ(){if(jU)return DO;jU=1;var x=dQ(),M=oc(),k=ume(),F=gQ(),B=Object;return DO=F?function(G){return typeof G=="symbol"}:function(G){var E=x("Symbol");return M(E)&&k(E.prototype,B(G))},DO}var OO,qU;function mQ(){if(qU)return OO;qU=1;var x=String;return OO=function(M){try{return x(M)}catch{return"Object"}},OO}var NO,YU;function dme(){if(YU)return NO;YU=1;var x=oc(),M=mQ(),k=TypeError;return NO=function(F){if(x(F))return F;throw new k(M(F)+" is not a function")},NO}var PO,KU;function fme(){if(KU)return PO;KU=1;var x=dme(),M=hQ();return PO=function(k,F){var B=k[F];return M(B)?void 0:x(B)},PO}var BO,XU;function gme(){if(XU)return BO;XU=1;var x=sF(),M=oc(),k=_b(),F=TypeError;return BO=function(B,G){var E,A;if(G==="string"&&M(E=B.toString)&&!k(A=x(E,B))||M(E=B.valueOf)&&!k(A=x(E,B))||G!=="string"&&M(E=B.toString)&&!k(A=x(E,B)))return A;throw new F("Can't convert object to primitive value")},BO}var LO={exports:{}},FO,JU;function pme(){return JU||(JU=1,FO=!1),FO}var VO,ZU;function uF(){if(ZU)return VO;ZU=1;var x=ic(),M=Object.defineProperty;return VO=function(k,F){try{M(x,k,{value:F,configurable:!0,writable:!0})}catch{x[k]=F}return F},VO}var QU;function hF(){if(QU)return LO.exports;QU=1;var x=pme(),M=ic(),k=uF(),F="__core-js_shared__",B=LO.exports=M[F]||k(F,{});return(B.versions||(B.versions=[])).push({version:"3.37.1",mode:x?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE",source:"https://github.com/zloirock/core-js"}),LO.exports}var HO,eG;function vQ(){if(eG)return HO;eG=1;var x=hF();return HO=function(M,k){return x[M]||(x[M]=k||{})},HO}var $O,tG;function yQ(){if(tG)return $O;tG=1;var x=cQ(),M=Object;return $O=function(k){return M(x(k))},$O}var zO,nG;function Dg(){if(nG)return zO;nG=1;var x=Qc(),M=yQ(),k=x({}.hasOwnProperty);return zO=Object.hasOwn||function(B,G){return k(M(B),G)},zO}var WO,rG;function wQ(){if(rG)return WO;rG=1;var x=Qc(),M=0,k=Math.random(),F=x(1 .toString);return WO=function(B){return"Symbol("+(B===void 0?"":B)+")_"+F(++M+k,36)},WO}var UO,iG;function mme(){if(iG)return UO;iG=1;var x=ic(),M=vQ(),k=Dg(),F=wQ(),B=fQ(),G=gQ(),E=x.Symbol,A=M("wks"),u=G?E.for||E:E&&E.withoutSetter||F;return UO=function(o){return k(A,o)||(A[o]=B&&k(E,o)?E[o]:u("Symbol."+o)),A[o]},UO}var GO,oG;function vme(){if(oG)return GO;oG=1;var x=sF(),M=_b(),k=pQ(),F=fme(),B=gme(),G=mme(),E=TypeError,A=G("toPrimitive");return GO=function(u,o){if(!M(u)||k(u))return u;var S=F(u,A),_;if(S){if(o===void 0&&(o="default"),_=x(S,u,o),!M(_)||k(_))return _;throw new E("Can't convert object to primitive value")}return o===void 0&&(o="number"),B(u,o)},GO}var jO,aG;function bQ(){if(aG)return jO;aG=1;var x=vme(),M=pQ();return jO=function(k){var F=x(k,"string");return M(F)?F:F+""},jO}var qO,sG;function yme(){if(sG)return qO;sG=1;var x=ic(),M=_b(),k=x.document,F=M(k)&&M(k.createElement);return qO=function(B){return F?k.createElement(B):{}},qO}var YO,lG;function CQ(){if(lG)return YO;lG=1;var x=cf(),M=hf(),k=yme();return YO=!x&&!M(function(){return Object.defineProperty(k("div"),"a",{get:function(){return 7}}).a!==7}),YO}var uG;function _Q(){if(uG)return cO;uG=1;var x=cf(),M=sF(),k=sme(),F=lQ(),B=lF(),G=bQ(),E=Dg(),A=CQ(),u=Object.getOwnPropertyDescriptor;return cO.f=x?u:function(S,_){if(S=B(S),_=G(_),A)try{return u(S,_)}catch{}if(E(S,_))return F(!M(k.f,S,_),S[_])},cO}var KO={},XO,hG;function wme(){if(hG)return XO;hG=1;var x=cf(),M=hf();return XO=x&&M(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),XO}var JO,cG;function SQ(){if(cG)return JO;cG=1;var x=_b(),M=String,k=TypeError;return JO=function(F){if(x(F))return F;throw new k(M(F)+" is not an object")},JO}var dG;function cF(){if(dG)return KO;dG=1;var x=cf(),M=CQ(),k=wme(),F=SQ(),B=bQ(),G=TypeError,E=Object.defineProperty,A=Object.getOwnPropertyDescriptor,u="enumerable",o="configurable",S="writable";return KO.f=x?k?function(p,f,y){if(F(p),f=B(f),F(y),typeof p=="function"&&f==="prototype"&&"value"in y&&S in y&&!y[S]){var d=A(p,f);d&&d[S]&&(p[f]=y.value,y={configurable:o in y?y[o]:d[o],enumerable:u in y?y[u]:d[u],writable:!1})}return E(p,f,y)}:E:function(p,f,y){if(F(p),f=B(f),F(y),M)try{return E(p,f,y)}catch{}if("get"in y||"set"in y)throw new G("Accessors not supported");return"value"in y&&(p[f]=y.value),p},KO}var ZO,fG;function IQ(){if(fG)return ZO;fG=1;var x=cf(),M=cF(),k=lQ();return ZO=x?function(F,B,G){return M.f(F,B,k(1,G))}:function(F,B,G){return F[B]=G,F},ZO}var QO={exports:{}},eN,gG;function bme(){if(gG)return eN;gG=1;var x=cf(),M=Dg(),k=Function.prototype,F=x&&Object.getOwnPropertyDescriptor,B=M(k,"name"),G=B&&(function(){}).name==="something",E=B&&(!x||x&&F(k,"name").configurable);return eN={EXISTS:B,PROPER:G,CONFIGURABLE:E},eN}var tN,pG;function Cme(){if(pG)return tN;pG=1;var x=Qc(),M=oc(),k=hF(),F=x(Function.toString);return M(k.inspectSource)||(k.inspectSource=function(B){return F(B)}),tN=k.inspectSource,tN}var nN,mG;function _me(){if(mG)return nN;mG=1;var x=ic(),M=oc(),k=x.WeakMap;return nN=M(k)&&/native code/.test(String(k)),nN}var rN,vG;function Sme(){if(vG)return rN;vG=1;var x=vQ(),M=wQ(),k=x("keys");return rN=function(F){return k[F]||(k[F]=M(F))},rN}var iN,yG;function xQ(){return yG||(yG=1,iN={}),iN}var oN,wG;function Ime(){if(wG)return oN;wG=1;var x=_me(),M=ic(),k=_b(),F=IQ(),B=Dg(),G=hF(),E=Sme(),A=xQ(),u="Object already initialized",o=M.TypeError,S=M.WeakMap,_,p,f,y=function(s){return f(s)?p(s):_(s,{})},d=function(s){return function(l){var w;if(!k(l)||(w=p(l)).type!==s)throw new o("Incompatible receiver, "+s+" required");return w}};if(x||G.state){var v=G.state||(G.state=new S);v.get=v.get,v.has=v.has,v.set=v.set,_=function(s,l){if(v.has(s))throw new o(u);return l.facade=s,v.set(s,l),l},p=function(s){return v.get(s)||{}},f=function(s){return v.has(s)}}else{var b=E("state");A[b]=!0,_=function(s,l){if(B(s,b))throw new o(u);return l.facade=s,F(s,b,l),l},p=function(s){return B(s,b)?s[b]:{}},f=function(s){return B(s,b)}}return oN={set:_,get:p,has:f,enforce:y,getterFor:d},oN}var bG;function xme(){if(bG)return QO.exports;bG=1;var x=Qc(),M=hf(),k=oc(),F=Dg(),B=cf(),G=bme().CONFIGURABLE,E=Cme(),A=Ime(),u=A.enforce,o=A.get,S=String,_=Object.defineProperty,p=x("".slice),f=x("".replace),y=x([].join),d=B&&!M(function(){return _(function(){},"length",{value:8}).length!==8}),v=String(String).split("String"),b=QO.exports=function(s,l,w){p(S(l),0,7)==="Symbol("&&(l="["+f(S(l),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),w&&w.getter&&(l="get "+l),w&&w.setter&&(l="set "+l),(!F(s,"name")||G&&s.name!==l)&&(B?_(s,"name",{value:l,configurable:!0}):s.name=l),d&&w&&F(w,"arity")&&s.length!==w.arity&&_(s,"length",{value:w.arity});try{w&&F(w,"constructor")&&w.constructor?B&&_(s,"prototype",{writable:!1}):s.prototype&&(s.prototype=void 0)}catch{}var I=u(s);return F(I,"source")||(I.source=y(v,typeof l=="string"?l:"")),s};return Function.prototype.toString=b(function(){return k(this)&&o(this).source||E(this)},"toString"),QO.exports}var aN,CG;function Tme(){if(CG)return aN;CG=1;var x=oc(),M=cF(),k=xme(),F=uF();return aN=function(B,G,E,A){A||(A={});var u=A.enumerable,o=A.name!==void 0?A.name:G;if(x(E)&&k(E,o,A),A.global)u?B[G]=E:F(G,E);else{try{A.unsafe?B[G]&&(u=!0):delete B[G]}catch{}u?B[G]=E:M.f(B,G,{value:E,enumerable:!1,configurable:!A.nonConfigurable,writable:!A.nonWritable})}return B},aN}var sN={},lN,_G;function kme(){if(_G)return lN;_G=1;var x=Math.ceil,M=Math.floor;return lN=Math.trunc||function(F){var B=+F;return(B>0?M:x)(B)},lN}var uN,SG;function TQ(){if(SG)return uN;SG=1;var x=kme();return uN=function(M){var k=+M;return k!==k||k===0?0:x(k)},uN}var hN,IG;function Rme(){if(IG)return hN;IG=1;var x=TQ(),M=Math.max,k=Math.min;return hN=function(F,B){var G=x(F);return G<0?M(G+B,0):k(G,B)},hN}var cN,xG;function Eme(){if(xG)return cN;xG=1;var x=TQ(),M=Math.min;return cN=function(k){var F=x(k);return F>0?M(F,9007199254740991):0},cN}var dN,TG;function kQ(){if(TG)return dN;TG=1;var x=Eme();return dN=function(M){return x(M.length)},dN}var fN,kG;function Ame(){if(kG)return fN;kG=1;var x=lF(),M=Rme(),k=kQ(),F=function(B){return function(G,E,A){var u=x(G),o=k(u);if(o===0)return!B&&-1;var S=M(A,o),_;if(B&&E!==E){for(;o>S;)if(_=u[S++],_!==_)return!0}else for(;o>S;S++)if((B||S in u)&&u[S]===E)return B||S||0;return!B&&-1}};return fN={includes:F(!0),indexOf:F(!1)},fN}var gN,RG;function Mme(){if(RG)return gN;RG=1;var x=Qc(),M=Dg(),k=lF(),F=Ame().indexOf,B=xQ(),G=x([].push);return gN=function(E,A){var u=k(E),o=0,S=[],_;for(_ in u)!M(B,_)&&M(u,_)&&G(S,_);for(;A.length>o;)M(u,_=A[o++])&&(~F(S,_)||G(S,_));return S},gN}var pN,EG;function Dme(){return EG||(EG=1,pN=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),pN}var AG;function Ome(){if(AG)return sN;AG=1;var x=Mme(),M=Dme(),k=M.concat("length","prototype");return sN.f=Object.getOwnPropertyNames||function(B){return x(B,k)},sN}var mN={},MG;function Nme(){return MG||(MG=1,mN.f=Object.getOwnPropertySymbols),mN}var vN,DG;function Pme(){if(DG)return vN;DG=1;var x=dQ(),M=Qc(),k=Ome(),F=Nme(),B=SQ(),G=M([].concat);return vN=x("Reflect","ownKeys")||function(A){var u=k.f(B(A)),o=F.f;return o?G(u,o(A)):u},vN}var yN,OG;function Bme(){if(OG)return yN;OG=1;var x=Dg(),M=Pme(),k=_Q(),F=cF();return yN=function(B,G,E){for(var A=M(G),u=F.f,o=k.f,S=0;S<A.length;S++){var _=A[S];!x(B,_)&&!(E&&x(E,_))&&u(B,_,o(G,_))}},yN}var wN,NG;function Lme(){if(NG)return wN;NG=1;var x=hf(),M=oc(),k=/#|\.prototype\./,F=function(u,o){var S=G[B(u)];return S===A?!0:S===E?!1:M(o)?x(o):!!o},B=F.normalize=function(u){return String(u).replace(k,".").toLowerCase()},G=F.data={},E=F.NATIVE="N",A=F.POLYFILL="P";return wN=F,wN}var bN,PG;function Fme(){if(PG)return bN;PG=1;var x=ic(),M=_Q().f,k=IQ(),F=Tme(),B=uF(),G=Bme(),E=Lme();return bN=function(A,u){var o=A.target,S=A.global,_=A.stat,p,f,y,d,v,b;if(S?f=x:_?f=x[o]||B(o,{}):f=x[o]&&x[o].prototype,f)for(y in u){if(v=u[y],A.dontCallGetSet?(b=M(f,y),d=b&&b.value):d=f[y],p=E(S?y:o+(_?".":"#")+y,A.forced),!p&&d!==void 0){if(typeof v==typeof d)continue;G(v,d)}(A.sham||d&&d.sham)&&k(v,"sham",!0),F(f,y,v,A)}},bN}var CN,BG;function Vme(){if(BG)return CN;BG=1;var x=uQ();return CN=Array.isArray||function(k){return x(k)==="Array"},CN}var _N,LG;function Hme(){if(LG)return _N;LG=1;var x=cf(),M=Vme(),k=TypeError,F=Object.getOwnPropertyDescriptor,B=x&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(G){return G instanceof TypeError}}();return _N=B?function(G,E){if(M(G)&&!F(G,"length").writable)throw new k("Cannot set read only .length");return G.length=E}:function(G,E){return G.length=E},_N}var SN,FG;function $me(){if(FG)return SN;FG=1;var x=mQ(),M=TypeError;return SN=function(k,F){if(!delete k[F])throw new M("Cannot delete property "+x(F)+" of "+x(k))},SN}var IN,VG;function zme(){if(VG)return IN;VG=1;var x=TypeError,M=9007199254740991;return IN=function(k){if(k>M)throw x("Maximum allowed index exceeded");return k},IN}var HG;function RQ(){if(HG)return IU;HG=1;var x=Fme(),M=yQ(),k=kQ(),F=Hme(),B=$me(),G=zme(),E=[].unshift(0)!==1,A=function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(o){return o instanceof TypeError}},u=E||!A();return x({target:"Array",proto:!0,arity:1,forced:u},{unshift:function(S){var _=M(this),p=k(_),f=arguments.length;if(f){G(p+f);for(var y=p;y--;){var d=y+f;y in _?_[d]=_[y]:B(_,d)}for(var v=0;v<f;v++)_[v]=arguments[v]}return F(_,p+f)}}),IU}const{useComponentStore:lx,useZoomableStore:dF}=whe("xlsx"),EQ=khe("xlsx-password");class W0e extends bhe{static itemType=FL.XLSX;_passwordValidator;constructor(M){super(M),this._passwordValidator=new Mhe(EQ)}getComponentStore(){return lx()}getZoomableStore(){return dF()}_switchStateIdle(M,k){return this._passwordValidator.switchStateIdle(),super._switchStateIdle(M,k)}loadPreview(M,k){return this._passwordValidator.validatePassword(k).then(F=>F&&this.isIdActive(M)?k.handlePreview():null)}}class U0e extends Dhe{static type=FL.XLSX;static previewableSize=10*1024*1024;static previewableExtensions=["xlsx","ods","csv"];constructor(M){super(M),this.imageURLHandler=(k,F)=>this.getImageHandler(F)}async writeBlob(M){if(this.getFileExt()==="csv"){const k=await M.arrayBuffer(),F=new Uint8Array(k),B=await Ohe(F);B.toLowerCase()!=="utf-8"&&(M=new Blob([new TextEncoder().encode(Jue(B,F))],{type:"text/csv"}))}return super.writeBlob(M)}getImagePaths(M){const k=new Set;for(const F of M.index.order){const B=M[F].drawing;for(const G of B)G.type==="img"&&k.add(G.path)}return k}}var ab={exports:{}},xN={exports:{}},TN={};/**
* @vue/compiler-core v3.5.12
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/const Um=Symbol(""),Hm=Symbol(""),kx=Symbol(""),cb=Symbol(""),fF=Symbol(""),af=Symbol(""),gF=Symbol(""),pF=Symbol(""),Rx=Symbol(""),Ex=Symbol(""),Zm=Symbol(""),Ax=Symbol(""),mF=Symbol(""),Mx=Symbol(""),Dx=Symbol(""),Ox=Symbol(""),Nx=Symbol(""),Px=Symbol(""),Bx=Symbol(""),vF=Symbol(""),yF=Symbol(""),Sb=Symbol(""),db=Symbol(""),Lx=Symbol(""),Fx=Symbol(""),Gm=Symbol(""),Qm=Symbol(""),Vx=Symbol(""),ux=Symbol(""),AQ=Symbol(""),hx=Symbol(""),fb=Symbol(""),MQ=Symbol(""),DQ=Symbol(""),Hx=Symbol(""),OQ=Symbol(""),NQ=Symbol(""),$x=Symbol(""),wF=Symbol(""),Tg={[Um]:"Fragment",[Hm]:"Teleport",[kx]:"Suspense",[cb]:"KeepAlive",[fF]:"BaseTransition",[af]:"openBlock",[gF]:"createBlock",[pF]:"createElementBlock",[Rx]:"createVNode",[Ex]:"createElementVNode",[Zm]:"createCommentVNode",[Ax]:"createTextVNode",[mF]:"createStaticVNode",[Mx]:"resolveComponent",[Dx]:"resolveDynamicComponent",[Ox]:"resolveDirective",[Nx]:"resolveFilter",[Px]:"withDirectives",[Bx]:"renderList",[vF]:"renderSlot",[yF]:"createSlots",[Sb]:"toDisplayString",[db]:"mergeProps",[Lx]:"normalizeClass",[Fx]:"normalizeStyle",[Gm]:"normalizeProps",[Qm]:"guardReactiveProps",[Vx]:"toHandlers",[ux]:"camelize",[AQ]:"capitalize",[hx]:"toHandlerKey",[fb]:"setBlockTracking",[MQ]:"pushScopeId",[DQ]:"popScopeId",[Hx]:"withCtx",[OQ]:"unref",[NQ]:"isRef",[$x]:"withMemo",[wF]:"isMemoSame"};function PQ(x){Object.getOwnPropertySymbols(x).forEach(M=>{Tg[M]=x[M]})}const Wme={HTML:0,0:"HTML",SVG:1,1:"SVG",MATH_ML:2,2:"MATH_ML"},Ume={ROOT:0,0:"ROOT",ELEMENT:1,1:"ELEMENT",TEXT:2,2:"TEXT",COMMENT:3,3:"COMMENT",SIMPLE_EXPRESSION:4,4:"SIMPLE_EXPRESSION",INTERPOLATION:5,5:"INTERPOLATION",ATTRIBUTE:6,6:"ATTRIBUTE",DIRECTIVE:7,7:"DIRECTIVE",COMPOUND_EXPRESSION:8,8:"COMPOUND_EXPRESSION",IF:9,9:"IF",IF_BRANCH:10,10:"IF_BRANCH",FOR:11,11:"FOR",TEXT_CALL:12,12:"TEXT_CALL",VNODE_CALL:13,13:"VNODE_CALL",JS_CALL_EXPRESSION:14,14:"JS_CALL_EXPRESSION",JS_OBJECT_EXPRESSION:15,15:"JS_OBJECT_EXPRESSION",JS_PROPERTY:16,16:"JS_PROPERTY",JS_ARRAY_EXPRESSION:17,17:"JS_ARRAY_EXPRESSION",JS_FUNCTION_EXPRESSION:18,18:"JS_FUNCTION_EXPRESSION",JS_CONDITIONAL_EXPRESSION:19,19:"JS_CONDITIONAL_EXPRESSION",JS_CACHE_EXPRESSION:20,20:"JS_CACHE_EXPRESSION",JS_BLOCK_STATEMENT:21,21:"JS_BLOCK_STATEMENT",JS_TEMPLATE_LITERAL:22,22:"JS_TEMPLATE_LITERAL",JS_IF_STATEMENT:23,23:"JS_IF_STATEMENT",JS_ASSIGNMENT_EXPRESSION:24,24:"JS_ASSIGNMENT_EXPRESSION",JS_SEQUENCE_EXPRESSION:25,25:"JS_SEQUENCE_EXPRESSION",JS_RETURN_STATEMENT:26,26:"JS_RETURN_STATEMENT"},Gme={ELEMENT:0,0:"ELEMENT",COMPONENT:1,1:"COMPONENT",SLOT:2,2:"SLOT",TEMPLATE:3,3:"TEMPLATE"},jme={NOT_CONSTANT:0,0:"NOT_CONSTANT",CAN_SKIP_PATCH:1,1:"CAN_SKIP_PATCH",CAN_CACHE:2,2:"CAN_CACHE",CAN_STRINGIFY:3,3:"CAN_STRINGIFY"},va={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function BQ(x,M=""){return{type:0,source:M,children:x,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:va}}function jm(x,M,k,F,B,G,E,A=!1,u=!1,o=!1,S=va){return x&&(A?(x.helper(af),x.helper(Eg(x.inSSR,o))):x.helper(Rg(x.inSSR,o)),E&&x.helper(Px)),{type:13,tag:M,props:k,children:F,patchFlag:B,dynamicProps:G,directives:E,isBlock:A,disableTracking:u,isComponent:o,loc:S}}function rf(x,M=va){return{type:17,loc:M,elements:x}}function ql(x,M=va){return{type:15,loc:M,properties:x}}function Vo(x,M){return{type:16,loc:va,key:ma(x)?Mr(x,!0):x,value:M}}function Mr(x,M=!1,k=va,F=0){return{type:4,loc:k,content:x,isStatic:M,constType:M?3:F}}function qme(x,M){return{type:5,loc:M,content:ma(x)?Mr(x,!1,M):x}}function Tu(x,M=va){return{type:8,loc:M,children:x}}function aa(x,M=[],k=va){return{type:14,loc:k,callee:x,arguments:M}}function kg(x,M=void 0,k=!1,F=!1,B=va){return{type:18,params:x,returns:M,newline:k,isSlot:F,loc:B}}function cx(x,M,k,F=!0){return{type:19,test:x,consequent:M,alternate:k,newline:F,loc:va}}function LQ(x,M,k=!1){return{type:20,index:x,value:M,needPauseTracking:k,needArraySpread:!1,loc:va}}function FQ(x){return{type:21,body:x,loc:va}}function Yme(x){return{type:22,elements:x,loc:va}}function Kme(x,M,k){return{type:23,test:x,consequent:M,alternate:k,loc:va}}function Xme(x,M){return{type:24,left:x,right:M,loc:va}}function Jme(x){return{type:25,expressions:x,loc:va}}function Zme(x){return{type:26,returns:x,loc:va}}function Rg(x,M){return x||M?Rx:Ex}function Eg(x,M){return x||M?gF:pF}function zx(x,{helper:M,removeHelper:k,inSSR:F}){x.isBlock||(x.isBlock=!0,k(Rg(F,x.isComponent)),M(af),M(Eg(F,x.isComponent)))}const $G=new Uint8Array([123,123]),zG=new Uint8Array([125,125]);function WG(x){return x>=97&&x<=122||x>=65&&x<=90}function jl(x){return x===32||x===10||x===9||x===12||x===13}function Yd(x){return x===47||x===62||jl(x)}function dx(x){const M=new Uint8Array(x.length);for(let k=0;k<x.length;k++)M[k]=x.charCodeAt(k);return M}const Os={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])};class Qme{constructor(M,k){this.stack=M,this.cbs=k,this.state=1,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=1,this.inRCDATA=!1,this.inXML=!1,this.inVPre=!1,this.newlines=[],this.mode=0,this.delimiterOpen=$G,this.delimiterClose=zG,this.delimiterIndex=-1,this.currentSequence=void 0,this.sequenceIndex=0}get inSFCRoot(){return this.mode===2&&this.stack.length===0}reset(){this.state=1,this.mode=0,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=1,this.inRCDATA=!1,this.currentSequence=void 0,this.newlines.length=0,this.delimiterOpen=$G,this.delimiterClose=zG}getPos(M){let k=1,F=M+1;for(let B=this.newlines.length-1;B>=0;B--){const G=this.newlines[B];if(M>G){k=B+2,F=M-G;break}}return{column:F,line:k,offset:M}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(M){M===60?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):!this.inVPre&&M===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(M))}stateInterpolationOpen(M){if(M===this.delimiterOpen[this.delimiterIndex])if(this.delimiterIndex===this.delimiterOpen.length-1){const k=this.index+1-this.delimiterOpen.length;k>this.sectionStart&&this.cbs.ontext(this.sectionStart,k),this.state=3,this.sectionStart=k}else this.delimiterIndex++;else this.inRCDATA?(this.state=32,this.stateInRCDATA(M)):(this.state=1,this.stateText(M))}stateInterpolation(M){M===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(M))}stateInterpolationClose(M){M===this.delimiterClose[this.delimiterIndex]?this.delimiterIndex===this.delimiterClose.length-1?(this.cbs.oninterpolation(this.sectionStart,this.index+1),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(M))}stateSpecialStartSequence(M){const k=this.sequenceIndex===this.currentSequence.length;if(!(k?Yd(M):(M|32)===this.currentSequence[this.sequenceIndex]))this.inRCDATA=!1;else if(!k){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=6,this.stateInTagName(M)}stateInRCDATA(M){if(this.sequenceIndex===this.currentSequence.length){if(M===62||jl(M)){const k=this.index-this.currentSequence.length;if(this.sectionStart<k){const F=this.index;this.index=k,this.cbs.ontext(this.sectionStart,k),this.index=F}this.sectionStart=k+2,this.stateInClosingTagName(M),this.inRCDATA=!1;return}this.sequenceIndex=0}(M|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===Os.TitleEnd||this.currentSequence===Os.TextareaEnd&&!this.inSFCRoot?!this.inVPre&&M===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(M)):this.fastForwardTo(60)&&(this.sequenceIndex=1):this.sequenceIndex=+(M===60)}stateCDATASequence(M){M===Os.Cdata[this.sequenceIndex]?++this.sequenceIndex===Os.Cdata.length&&(this.state=28,this.currentSequence=Os.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=23,this.stateInDeclaration(M))}fastForwardTo(M){for(;++this.index<this.buffer.length;){const k=this.buffer.charCodeAt(this.index);if(k===10&&this.newlines.push(this.index),k===M)return!0}return this.index=this.buffer.length-1,!1}stateInCommentLike(M){M===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===Os.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index-2):this.cbs.oncomment(this.sectionStart,this.index-2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=1):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):M!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}startSpecial(M,k){this.enterRCDATA(M,k),this.state=31}enterRCDATA(M,k){this.inRCDATA=!0,this.currentSequence=M,this.sequenceIndex=k}stateBeforeTagName(M){M===33?(this.state=22,this.sectionStart=this.index+1):M===63?(this.state=24,this.sectionStart=this.index+1):WG(M)?(this.sectionStart=this.index,this.mode===0?this.state=6:this.inSFCRoot?this.state=34:this.inXML?this.state=6:M===116?this.state=30:this.state=M===115?29:6):M===47?this.state=8:(this.state=1,this.stateText(M))}stateInTagName(M){Yd(M)&&this.handleTagName(M)}stateInSFCRootTagName(M){if(Yd(M)){const k=this.buffer.slice(this.sectionStart,this.index);k!=="template"&&this.enterRCDATA(dx("</"+k),0),this.handleTagName(M)}}handleTagName(M){this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(M)}stateBeforeClosingTagName(M){jl(M)||(M===62?(this.state=1,this.sectionStart=this.index+1):(this.state=WG(M)?9:27,this.sectionStart=this.index))}stateInClosingTagName(M){(M===62||jl(M))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=10,this.stateAfterClosingTagName(M))}stateAfterClosingTagName(M){M===62&&(this.state=1,this.sectionStart=this.index+1)}stateBeforeAttrName(M){M===62?(this.cbs.onopentagend(this.index),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):M===47?this.state=7:M===60&&this.peek()===47?(this.cbs.onopentagend(this.index),this.state=5,this.sectionStart=this.index):jl(M)||this.handleAttrStart(M)}handleAttrStart(M){M===118&&this.peek()===45?(this.state=13,this.sectionStart=this.index):M===46||M===58||M===64||M===35?(this.cbs.ondirname(this.index,this.index+1),this.state=14,this.sectionStart=this.index+1):(this.state=12,this.sectionStart=this.index)}stateInSelfClosingTag(M){M===62?(this.cbs.onselfclosingtag(this.index),this.state=1,this.sectionStart=this.index+1,this.inRCDATA=!1):jl(M)||(this.state=11,this.stateBeforeAttrName(M))}stateInAttrName(M){(M===61||Yd(M))&&(this.cbs.onattribname(this.sectionStart,this.index),this.handleAttrNameEnd(M))}stateInDirName(M){M===61||Yd(M)?(this.cbs.ondirname(this.sectionStart,this.index),this.handleAttrNameEnd(M)):M===58?(this.cbs.ondirname(this.sectionStart,this.index),this.state=14,this.sectionStart=this.index+1):M===46&&(this.cbs.ondirname(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDirArg(M){M===61||Yd(M)?(this.cbs.ondirarg(this.sectionStart,this.index),this.handleAttrNameEnd(M)):M===91?this.state=15:M===46&&(this.cbs.ondirarg(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDynamicDirArg(M){M===93?this.state=14:(M===61||Yd(M))&&(this.cbs.ondirarg(this.sectionStart,this.index+1),this.handleAttrNameEnd(M))}stateInDirModifier(M){M===61||Yd(M)?(this.cbs.ondirmodifier(this.sectionStart,this.index),this.handleAttrNameEnd(M)):M===46&&(this.cbs.ondirmodifier(this.sectionStart,this.index),this.sectionStart=this.index+1)}handleAttrNameEnd(M){this.sectionStart=this.index,this.state=17,this.cbs.onattribnameend(this.index),this.stateAfterAttrName(M)}stateAfterAttrName(M){M===61?this.state=18:M===47||M===62?(this.cbs.onattribend(0,this.sectionStart),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(M)):jl(M)||(this.cbs.onattribend(0,this.sectionStart),this.handleAttrStart(M))}stateBeforeAttrValue(M){M===34?(this.state=19,this.sectionStart=this.index+1):M===39?(this.state=20,this.sectionStart=this.index+1):jl(M)||(this.sectionStart=this.index,this.state=21,this.stateInAttrValueNoQuotes(M))}handleInAttrValue(M,k){(M===k||this.fastForwardTo(k))&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(k===34?3:2,this.index+1),this.state=11)}stateInAttrValueDoubleQuotes(M){this.handleInAttrValue(M,34)}stateInAttrValueSingleQuotes(M){this.handleInAttrValue(M,39)}stateInAttrValueNoQuotes(M){jl(M)||M===62?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(1,this.index),this.state=11,this.stateBeforeAttrName(M)):(M===39||M===60||M===61||M===96)&&this.cbs.onerr(18,this.index)}stateBeforeDeclaration(M){M===91?(this.state=26,this.sequenceIndex=0):this.state=M===45?25:23}stateInDeclaration(M){(M===62||this.fastForwardTo(62))&&(this.state=1,this.sectionStart=this.index+1)}stateInProcessingInstruction(M){(M===62||this.fastForwardTo(62))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeComment(M){M===45?(this.state=28,this.currentSequence=Os.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=23}stateInSpecialComment(M){(M===62||this.fastForwardTo(62))&&(this.cbs.oncomment(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeSpecialS(M){M===Os.ScriptEnd[3]?this.startSpecial(Os.ScriptEnd,4):M===Os.StyleEnd[3]?this.startSpecial(Os.StyleEnd,4):(this.state=6,this.stateInTagName(M))}stateBeforeSpecialT(M){M===Os.TitleEnd[3]?this.startSpecial(Os.TitleEnd,4):M===Os.TextareaEnd[3]?this.startSpecial(Os.TextareaEnd,4):(this.state=6,this.stateInTagName(M))}startEntity(){}stateInEntity(){}parse(M){for(this.buffer=M;this.index<this.buffer.length;){const k=this.buffer.charCodeAt(this.index);switch(k===10&&this.newlines.push(this.index),this.state){case 1:{this.stateText(k);break}case 2:{this.stateInterpolationOpen(k);break}case 3:{this.stateInterpolation(k);break}case 4:{this.stateInterpolationClose(k);break}case 31:{this.stateSpecialStartSequence(k);break}case 32:{this.stateInRCDATA(k);break}case 26:{this.stateCDATASequence(k);break}case 19:{this.stateInAttrValueDoubleQuotes(k);break}case 12:{this.stateInAttrName(k);break}case 13:{this.stateInDirName(k);break}case 14:{this.stateInDirArg(k);break}case 15:{this.stateInDynamicDirArg(k);break}case 16:{this.stateInDirModifier(k);break}case 28:{this.stateInCommentLike(k);break}case 27:{this.stateInSpecialComment(k);break}case 11:{this.stateBeforeAttrName(k);break}case 6:{this.stateInTagName(k);break}case 34:{this.stateInSFCRootTagName(k);break}case 9:{this.stateInClosingTagName(k);break}case 5:{this.stateBeforeTagName(k);break}case 17:{this.stateAfterAttrName(k);break}case 20:{this.stateInAttrValueSingleQuotes(k);break}case 18:{this.stateBeforeAttrValue(k);break}case 8:{this.stateBeforeClosingTagName(k);break}case 10:{this.stateAfterClosingTagName(k);break}case 29:{this.stateBeforeSpecialS(k);break}case 30:{this.stateBeforeSpecialT(k);break}case 21:{this.stateInAttrValueNoQuotes(k);break}case 7:{this.stateInSelfClosingTag(k);break}case 23:{this.stateInDeclaration(k);break}case 22:{this.stateBeforeDeclaration(k);break}case 25:{this.stateBeforeComment(k);break}case 24:{this.stateInProcessingInstruction(k);break}case 33:{this.stateInEntity();break}}this.index++}this.cleanup(),this.finish()}cleanup(){this.sectionStart!==this.index&&(this.state===1||this.state===32&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===19||this.state===20||this.state===21)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}finish(){this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){const M=this.buffer.length;this.sectionStart>=M||(this.state===28?this.currentSequence===Os.CdataEnd?this.cbs.oncdata(this.sectionStart,M):this.cbs.oncomment(this.sectionStart,M):this.state===6||this.state===11||this.state===18||this.state===17||this.state===12||this.state===13||this.state===14||this.state===15||this.state===16||this.state===20||this.state===19||this.state===21||this.state===9||this.cbs.ontext(this.sectionStart,M))}emitCodePoint(M,k){}}const eve={COMPILER_IS_ON_ELEMENT:"COMPILER_IS_ON_ELEMENT",COMPILER_V_BIND_SYNC:"COMPILER_V_BIND_SYNC",COMPILER_V_BIND_OBJECT_ORDER:"COMPILER_V_BIND_OBJECT_ORDER",COMPILER_V_ON_NATIVE:"COMPILER_V_ON_NATIVE",COMPILER_V_IF_V_FOR_PRECEDENCE:"COMPILER_V_IF_V_FOR_PRECEDENCE",COMPILER_NATIVE_TEMPLATE:"COMPILER_NATIVE_TEMPLATE",COMPILER_INLINE_TEMPLATE:"COMPILER_INLINE_TEMPLATE",COMPILER_FILTERS:"COMPILER_FILTERS"},tve={COMPILER_IS_ON_ELEMENT:{message:'Platform-native elements with "is" prop will no longer be treated as components in Vue 3 unless the "is" value is explicitly prefixed with "vue:".',link:"https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html"},COMPILER_V_BIND_SYNC:{message:x=>`.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${x}.sync\` should be changed to \`v-model:${x}\`.`,link:"https://v3-migration.vuejs.org/breaking-changes/v-model.html"},COMPILER_V_BIND_OBJECT_ORDER:{message:'v-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.',link:"https://v3-migration.vuejs.org/breaking-changes/v-bind.html"},COMPILER_V_ON_NATIVE:{message:".native modifier for v-on has been removed as is no longer necessary.",link:"https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html"},COMPILER_V_IF_V_FOR_PRECEDENCE:{message:"v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with <template> tags or use a computed property that filters v-for data source.",link:"https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html"},COMPILER_NATIVE_TEMPLATE:{message:"<template> with no special directives will render as a native template element instead of its inner content in Vue 3."},COMPILER_INLINE_TEMPLATE:{message:'"inline-template" has been removed in Vue 3.',link:"https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html"},COMPILER_FILTERS:{message:'filters have been removed in Vue 3. The "|" symbol will be treated as native JavaScript bitwise OR operator. Use method calls or computed properties instead.',link:"https://v3-migration.vuejs.org/breaking-changes/filters.html"}};function NL(x,{compatConfig:M}){const k=M&&M[x];return x==="MODE"?k||3:k}function Sg(x,M){const k=NL("MODE",M),F=NL(x,M);return k===3?F===!0:F!==!1}function qm(x,M,k,...F){return Sg(x,M)}function nve(x,M,k,...F){if(NL(x,M)==="suppress-warning")return;const{message:G,link:E}=tve[x],A=`(deprecation ${x}) ${typeof G=="function"?G(...F):G}${E?`
Details: ${E}`:""}`,u=new SyntaxError(A);u.code=x,k&&(u.loc=k),M.onWarn(u)}function bF(x){throw x}function VQ(x){}function ho(x,M,k,F){const B=`https://vuejs.org/error-reference/#compiler-${x}`,G=new SyntaxError(String(B));return G.code=x,G.loc=M,G}const rve={ABRUPT_CLOSING_OF_EMPTY_COMMENT:0,0:"ABRUPT_CLOSING_OF_EMPTY_COMMENT",CDATA_IN_HTML_CONTENT:1,1:"CDATA_IN_HTML_CONTENT",DUPLICATE_ATTRIBUTE:2,2:"DUPLICATE_ATTRIBUTE",END_TAG_WITH_ATTRIBUTES:3,3:"END_TAG_WITH_ATTRIBUTES",END_TAG_WITH_TRAILING_SOLIDUS:4,4:"END_TAG_WITH_TRAILING_SOLIDUS",EOF_BEFORE_TAG_NAME:5,5:"EOF_BEFORE_TAG_NAME",EOF_IN_CDATA:6,6:"EOF_IN_CDATA",EOF_IN_COMMENT:7,7:"EOF_IN_COMMENT",EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT:8,8:"EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT",EOF_IN_TAG:9,9:"EOF_IN_TAG",INCORRECTLY_CLOSED_COMMENT:10,10:"INCORRECTLY_CLOSED_COMMENT",INCORRECTLY_OPENED_COMMENT:11,11:"INCORRECTLY_OPENED_COMMENT",INVALID_FIRST_CHARACTER_OF_TAG_NAME:12,12:"INVALID_FIRST_CHARACTER_OF_TAG_NAME",MISSING_ATTRIBUTE_VALUE:13,13:"MISSING_ATTRIBUTE_VALUE",MISSING_END_TAG_NAME:14,14:"MISSING_END_TAG_NAME",MISSING_WHITESPACE_BETWEEN_ATTRIBUTES:15,15:"MISSING_WHITESPACE_BETWEEN_ATTRIBUTES",NESTED_COMMENT:16,16:"NESTED_COMMENT",UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME:17,17:"UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME",UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE:18,18:"UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE",UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME:19,19:"UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME",UNEXPECTED_NULL_CHARACTER:20,20:"UNEXPECTED_NULL_CHARACTER",UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME:21,21:"UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME",UNEXPECTED_SOLIDUS_IN_TAG:22,22:"UNEXPECTED_SOLIDUS_IN_TAG",X_INVALID_END_TAG:23,23:"X_INVALID_END_TAG",X_MISSING_END_TAG:24,24:"X_MISSING_END_TAG",X_MISSING_INTERPOLATION_END:25,25:"X_MISSING_INTERPOLATION_END",X_MISSING_DIRECTIVE_NAME:26,26:"X_MISSING_DIRECTIVE_NAME",X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END:27,27:"X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END",X_V_IF_NO_EXPRESSION:28,28:"X_V_IF_NO_EXPRESSION",X_V_IF_SAME_KEY:29,29:"X_V_IF_SAME_KEY",X_V_ELSE_NO_ADJACENT_IF:30,30:"X_V_ELSE_NO_ADJACENT_IF",X_V_FOR_NO_EXPRESSION:31,31:"X_V_FOR_NO_EXPRESSION",X_V_FOR_MALFORMED_EXPRESSION:32,32:"X_V_FOR_MALFORMED_EXPRESSION",X_V_FOR_TEMPLATE_KEY_PLACEMENT:33,33:"X_V_FOR_TEMPLATE_KEY_PLACEMENT",X_V_BIND_NO_EXPRESSION:34,34:"X_V_BIND_NO_EXPRESSION",X_V_ON_NO_EXPRESSION:35,35:"X_V_ON_NO_EXPRESSION",X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET:36,36:"X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET",X_V_SLOT_MIXED_SLOT_USAGE:37,37:"X_V_SLOT_MIXED_SLOT_USAGE",X_V_SLOT_DUPLICATE_SLOT_NAMES:38,38:"X_V_SLOT_DUPLICATE_SLOT_NAMES",X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN:39,39:"X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN",X_V_SLOT_MISPLACED:40,40:"X_V_SLOT_MISPLACED",X_V_MODEL_NO_EXPRESSION:41,41:"X_V_MODEL_NO_EXPRESSION",X_V_MODEL_MALFORMED_EXPRESSION:42,42:"X_V_MODEL_MALFORMED_EXPRESSION",X_V_MODEL_ON_SCOPE_VARIABLE:43,43:"X_V_MODEL_ON_SCOPE_VARIABLE",X_V_MODEL_ON_PROPS:44,44:"X_V_MODEL_ON_PROPS",X_INVALID_EXPRESSION:45,45:"X_INVALID_EXPRESSION",X_KEEP_ALIVE_INVALID_CHILDREN:46,46:"X_KEEP_ALIVE_INVALID_CHILDREN",X_PREFIX_ID_NOT_SUPPORTED:47,47:"X_PREFIX_ID_NOT_SUPPORTED",X_MODULE_MODE_NOT_SUPPORTED:48,48:"X_MODULE_MODE_NOT_SUPPORTED",X_CACHE_HANDLER_NOT_SUPPORTED:49,49:"X_CACHE_HANDLER_NOT_SUPPORTED",X_SCOPE_ID_NOT_SUPPORTED:50,50:"X_SCOPE_ID_NOT_SUPPORTED",X_VNODE_HOOKS:51,51:"X_VNODE_HOOKS",X_V_BIND_INVALID_SAME_NAME_ARGUMENT:52,52:"X_V_BIND_INVALID_SAME_NAME_ARGUMENT",__EXTEND_POINT__:53,53:"__EXTEND_POINT__"},ive={0:"Illegal comment.",1:"CDATA section is allowed only in XML context.",2:"Duplicate attribute.",3:"End tag cannot have attributes.",4:"Illegal '/' in tags.",5:"Unexpected EOF in tag.",6:"Unexpected EOF in CDATA section.",7:"Unexpected EOF in comment.",8:"Unexpected EOF in script.",9:"Unexpected EOF in tag.",10:"Incorrectly closed comment.",11:"Incorrectly opened comment.",12:"Illegal tag name. Use '<' to print '<'.",13:"Attribute value was expected.",14:"End tag name was expected.",15:"Whitespace was expected.",16:"Unexpected '<!--' in comment.",17:`Attribute name cannot contain U+0022 ("), U+0027 ('), and U+003C (<).`,18:"Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).",19:"Attribute name cannot start with '='.",21:"'<?' is allowed only in XML context.",20:"Unexpected null character.",22:"Illegal '/' in tags.",23:"Invalid end tag.",24:"Element is missing end tag.",25:"Interpolation end sign was not found.",27:"End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.",26:"Legal directive name was expected.",28:"v-if/v-else-if is missing expression.",29:"v-if/else branches must use unique keys.",30:"v-else/v-else-if has no adjacent v-if or v-else-if.",31:"v-for is missing expression.",32:"v-for has invalid expression.",33:"<template v-for> key should be placed on the <template> tag.",34:"v-bind is missing expression.",52:"v-bind with same-name shorthand only allows static argument.",35:"v-on is missing expression.",36:"Unexpected custom directive on <slot> outlet.",37:"Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.",38:"Duplicate slot names found. ",39:"Extraneous children found when component already has explicitly named default slot. These children will be ignored.",40:"v-slot can only be used on components or <template> tags.",41:"v-model is missing expression.",42:"v-model value must be a valid JavaScript member expression.",43:"v-model cannot be used on v-for or v-slot scope variables because they are not writable.",44:`v-model cannot be used on a prop, because local prop bindings are not writable.
Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,45:"Error parsing JavaScript expression: ",46:"<KeepAlive> expects exactly one child component.",51:"@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.",47:'"prefixIdentifiers" option is not supported in this build of compiler.',48:"ES module mode is not supported in this build of compiler.",49:'"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.',50:'"scopeId" option is only supported in module mode.',53:""};function ove(x,M,k=!1,F=[],B=Object.create(null)){}function ave(x,M,k){return!1}function sve(x,M){if(x&&(x.type==="ObjectProperty"||x.type==="ArrayPattern")){let k=M.length;for(;k--;){const F=M[k];if(F.type==="AssignmentExpression")return!0;if(F.type!=="ObjectProperty"&&!F.type.endsWith("Pattern"))break}}return!1}function lve(x){let M=x.length;for(;M--;){const k=x[M];if(k.type==="NewExpression")return!0;if(k.type!=="MemberExpression")break}return!1}function uve(x,M){for(const k of x.params)for(const F of qc(k))M(F)}function hve(x,M){for(const k of x.body)if(k.type==="VariableDeclaration"){if(k.declare)continue;for(const F of k.declarations)for(const B of qc(F.id))M(B)}else if(k.type==="FunctionDeclaration"||k.type==="ClassDeclaration"){if(k.declare||!k.id)continue;M(k.id)}else cve(k)&&dve(k,!0,M)}function cve(x){return x.type==="ForOfStatement"||x.type==="ForInStatement"||x.type==="ForStatement"}function dve(x,M,k){const F=x.type==="ForStatement"?x.init:x.left;if(F&&F.type==="VariableDeclaration"&&(F.kind==="var"&&M))for(const B of F.declarations)for(const G of qc(B.id))k(G)}function qc(x,M=[]){switch(x.type){case"Identifier":M.push(x);break;case"MemberExpression":let k=x;for(;k.type==="MemberExpression";)k=k.object;M.push(k);break;case"ObjectPattern":for(const F of x.properties)F.type==="RestElement"?qc(F.argument,M):qc(F.value,M);break;case"ArrayPattern":x.elements.forEach(F=>{F&&qc(F,M)});break;case"RestElement":qc(x.argument,M);break;case"AssignmentPattern":qc(x.left,M);break}return M}const fve=x=>/Function(?:Expression|Declaration)$|Method$/.test(x.type),HQ=x=>x&&(x.type==="ObjectProperty"||x.type==="ObjectMethod")&&!x.computed,gve=(x,M)=>HQ(M)&&M.key===x,$Q=["TSAsExpression","TSTypeAssertion","TSNonNullExpression","TSInstantiationExpression","TSSatisfiesExpression"];function zQ(x){return $Q.includes(x.type)?zQ(x.expression):x}const el=x=>x.type===4&&x.isStatic;function CF(x){switch(x){case"Teleport":case"teleport":return Hm;case"Suspense":case"suspense":return kx;case"KeepAlive":case"keep-alive":return cb;case"BaseTransition":case"base-transition":return fF}}const pve=/^\d|[^\$\w\xA0-\uFFFF]/,Ib=x=>!pve.test(x),mve=/[A-Za-z_$\xA0-\uFFFF]/,vve=/[\.\?\w$\xA0-\uFFFF]/,yve=/\s+[.[]\s*|\s*[.[]\s+/g,WQ=x=>x.type===4?x.content:x.loc.source,UQ=x=>{const M=WQ(x).trim().replace(yve,A=>A.trim());let k=0,F=[],B=0,G=0,E=null;for(let A=0;A<M.length;A++){const u=M.charAt(A);switch(k){case 0:if(u==="[")F.push(k),k=1,B++;else if(u==="(")F.push(k),k=2,G++;else if(!(A===0?mve:vve).test(u))return!1;break;case 1:u==="'"||u==='"'||u==="`"?(F.push(k),k=3,E=u):u==="["?B++:u==="]"&&(--B||(k=F.pop()));break;case 2:if(u==="'"||u==='"'||u==="`")F.push(k),k=3,E=u;else if(u==="(")G++;else if(u===")"){if(A===M.length-1)return!1;--G||(k=F.pop())}break;case 3:u===E&&(k=F.pop(),E=null);break}}return!B&&!G},wve=lb,_F=UQ,bve=/^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/,GQ=x=>bve.test(WQ(x)),Cve=lb,jQ=GQ;function _ve(x,M,k=M.length){return qQ({offset:x.offset,line:x.line,column:x.column},M,k)}function qQ(x,M,k=M.length){let F=0,B=-1;for(let G=0;G<k;G++)M.charCodeAt(G)===10&&(F++,B=G);return x.offset+=k,x.line+=F,x.column=B===-1?x.column+k:k-B,x}function Sve(x,M){if(!x)throw new Error(M||"unexpected compiler condition")}function Sl(x,M,k=!1){for(let F=0;F<x.props.length;F++){const B=x.props[F];if(B.type===7&&(k||B.exp)&&(ma(M)?B.name===M:M.test(B.name)))return B}}function xb(x,M,k=!1,F=!1){for(let B=0;B<x.props.length;B++){const G=x.props[B];if(G.type===6){if(k)continue;if(G.name===M&&(G.value||F))return G}else if(G.name==="bind"&&(G.exp||F)&&tf(G.arg,M))return G}}function tf(x,M){return!!(x&&el(x)&&x.content===M)}function YQ(x){return x.props.some(M=>M.type===7&&M.name==="bind"&&(!M.arg||M.arg.type!==4||!M.arg.isStatic))}function jI(x){return x.type===5||x.type===2}function SF(x){return x.type===7&&x.name==="slot"}function Ym(x){return x.type===1&&x.tagType===3}function gb(x){return x.type===1&&x.tagType===2}const Ive=new Set([Gm,Qm]);function KQ(x,M=[]){if(x&&!ma(x)&&x.type===14){const k=x.callee;if(!ma(k)&&Ive.has(k))return KQ(x.arguments[0],M.concat(x))}return[x,M]}function pb(x,M,k){let F,B=x.type===13?x.props:x.arguments[2],G=[],E;if(B&&!ma(B)&&B.type===14){const A=KQ(B);B=A[0],G=A[1],E=G[G.length-1]}if(B==null||ma(B))F=ql([M]);else if(B.type===14){const A=B.arguments[0];!ma(A)&&A.type===15?UG(M,A)||A.properties.unshift(M):B.callee===Vx?F=aa(k.helper(db),[ql([M]),B]):B.arguments.unshift(ql([M])),!F&&(F=B)}else B.type===15?(UG(M,B)||B.properties.unshift(M),F=B):(F=aa(k.helper(db),[ql([M]),B]),E&&E.callee===Qm&&(E=G[G.length-2]));x.type===13?E?E.arguments[0]=F:x.props=F:E?E.arguments[0]=F:x.arguments[2]=F}function UG(x,M){let k=!1;if(x.key.type===4){const F=x.key.content;k=M.properties.some(B=>B.key.type===4&&B.key.content===F)}return k}function Km(x,M){return`_${M}_${x.replace(/[^\w]/g,(k,F)=>k==="-"?"_":x.charCodeAt(F).toString())}`}function oh(x,M){if(!x||Object.keys(M).length===0)return!1;switch(x.type){case 1:for(let k=0;k<x.props.length;k++){const F=x.props[k];if(F.type===7&&(oh(F.arg,M)||oh(F.exp,M)))return!0}return x.children.some(k=>oh(k,M));case 11:return oh(x.source,M)?!0:x.children.some(k=>oh(k,M));case 9:return x.branches.some(k=>oh(k,M));case 10:return oh(x.condition,M)?!0:x.children.some(k=>oh(k,M));case 4:return!x.isStatic&&Ib(x.content)&&!!M[x.content];case 8:return x.children.some(k=>ZJ(k)&&oh(k,M));case 5:case 12:return oh(x.content,M);case 2:case 3:case 20:return!1;default:return!1}}function XQ(x){return x.type===14&&x.callee===$x?x.arguments[1].returns:x}const JQ=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/,ZQ={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:G1,isPreTag:G1,isIgnoreNewlineTag:G1,isCustomElement:G1,onError:bF,onWarn:VQ,comments:!1,prefixIdentifiers:!1};let Ai=ZQ,mb=null,Kc="",Ns=null,pi=null,Cl="",jc=-1,Cg=-1,IF=0,Qd=!1,PL=null;const vo=[],Fo=new Qme(vo,{onerr:$c,ontext(x,M){q1(ss(x,M),x,M)},ontextentity(x,M,k){q1(x,M,k)},oninterpolation(x,M){if(Qd)return q1(ss(x,M),x,M);let k=x+Fo.delimiterOpen.length,F=M-Fo.delimiterClose.length;for(;jl(Kc.charCodeAt(k));)k++;for(;jl(Kc.charCodeAt(F-1));)F--;let B=ss(k,F);B.includes("&")&&(B=Ai.decodeEntities(B,!1)),BL({type:5,content:YI(B,!1,Yo(k,F)),loc:Yo(x,M)})},onopentagname(x,M){const k=ss(x,M);Ns={type:1,tag:k,ns:Ai.getNamespace(k,vo[0],Ai.ns),tagType:0,props:[],children:[],loc:Yo(x-1,M),codegenNode:void 0}},onopentagend(x){jG(x)},onclosetag(x,M){const k=ss(x,M);if(!Ai.isVoidTag(k)){let F=!1;for(let B=0;B<vo.length;B++)if(vo[B].tag.toLowerCase()===k.toLowerCase()){F=!0,B>0&&$c(24,vo[0].loc.start.offset);for(let E=0;E<=B;E++){const A=vo.shift();qI(A,M,E<B)}break}F||$c(23,QQ(x,60))}},onselfclosingtag(x){const M=Ns.tag;Ns.isSelfClosing=!0,jG(x),vo[0]&&vo[0].tag===M&&qI(vo.shift(),x)},onattribname(x,M){pi={type:6,name:ss(x,M),nameLoc:Yo(x,M),value:void 0,loc:Yo(x)}},ondirname(x,M){const k=ss(x,M),F=k==="."||k===":"?"bind":k==="@"?"on":k==="#"?"slot":k.slice(2);if(!Qd&&F===""&&$c(26,x),Qd||F==="")pi={type:6,name:k,nameLoc:Yo(x,M),value:void 0,loc:Yo(x)};else if(pi={type:7,name:F,rawName:k,exp:void 0,arg:void 0,modifiers:k==="."?[Mr("prop")]:[],loc:Yo(x)},F==="pre"){Qd=Fo.inVPre=!0,PL=Ns;const B=Ns.props;for(let G=0;G<B.length;G++)B[G].type===7&&(B[G]=Pve(B[G]))}},ondirarg(x,M){if(x===M)return;const k=ss(x,M);if(Qd)pi.name+=k,_g(pi.nameLoc,M);else{const F=k[0]!=="[";pi.arg=YI(F?k:k.slice(1,-1),F,Yo(x,M),F?3:0)}},ondirmodifier(x,M){const k=ss(x,M);if(Qd)pi.name+="."+k,_g(pi.nameLoc,M);else if(pi.name==="slot"){const F=pi.arg;F&&(F.content+="."+k,_g(F.loc,M))}else{const F=Mr(k,!0,Yo(x,M));pi.modifiers.push(F)}},onattribdata(x,M){Cl+=ss(x,M),jc<0&&(jc=x),Cg=M},onattribentity(x,M,k){Cl+=x,jc<0&&(jc=M),Cg=k},onattribnameend(x){const M=pi.loc.start.offset,k=ss(M,x);pi.type===7&&(pi.rawName=k),Ns.props.some(F=>(F.type===7?F.rawName:F.name)===k)&&$c(2,M)},onattribend(x,M){if(Ns&&pi){if(_g(pi.loc,M),x!==0)if(Cl.includes("&")&&(Cl=Ai.decodeEntities(Cl,!0)),pi.type===6)pi.name==="class"&&(Cl=t3(Cl).trim()),x===1&&!Cl&&$c(13,M),pi.value={type:2,content:Cl,loc:x===1?Yo(jc,Cg):Yo(jc-1,Cg+1)},Fo.inSFCRoot&&Ns.tag==="template"&&pi.name==="lang"&&Cl&&Cl!=="html"&&Fo.enterRCDATA(dx("</template"),0);else{let k=0;pi.exp=YI(Cl,!1,Yo(jc,Cg),0,k),pi.name==="for"&&(pi.forParseResult=Tve(pi.exp));let F=-1;pi.name==="bind"&&(F=pi.modifiers.findIndex(B=>B.content==="sync"))>-1&&qm("COMPILER_V_BIND_SYNC",Ai,pi.loc,pi.rawName)&&(pi.name="model",pi.modifiers.splice(F,1))}(pi.type!==7||pi.name!=="pre")&&Ns.props.push(pi)}Cl="",jc=Cg=-1},oncomment(x,M){Ai.comments&&BL({type:3,content:ss(x,M),loc:Yo(x-4,M+3)})},onend(){const x=Kc.length;for(let M=0;M<vo.length;M++)qI(vo[M],x-1),$c(24,vo[M].loc.start.offset)},oncdata(x,M){vo[0].ns!==0?q1(ss(x,M),x,M):$c(1,x-9)},onprocessinginstruction(x){(vo[0]?vo[0].ns:Ai.ns)===0&&$c(21,x-1)}}),GG=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,xve=/^\(|\)$/g;function Tve(x){const M=x.loc,k=x.content,F=k.match(JQ);if(!F)return;const[,B,G]=F,E=(_,p,f=!1)=>{const y=M.start.offset+p,d=y+_.length;return YI(_,!1,Yo(y,d),0,f?1:0)},A={source:E(G.trim(),k.indexOf(G,B.length)),value:void 0,key:void 0,index:void 0,finalized:!1};let u=B.trim().replace(xve,"").trim();const o=B.indexOf(u),S=u.match(GG);if(S){u=u.replace(GG,"").trim();const _=S[1].trim();let p;if(_&&(p=k.indexOf(_,o+u.length),A.key=E(_,p,!0)),S[2]){const f=S[2].trim();f&&(A.index=E(f,k.indexOf(f,A.key?p+_.length:o+u.length),!0))}}return u&&(A.value=E(u,o,!0)),A}function ss(x,M){return Kc.slice(x,M)}function jG(x){Fo.inSFCRoot&&(Ns.innerLoc=Yo(x+1,x+1)),BL(Ns);const{tag:M,ns:k}=Ns;k===0&&Ai.isPreTag(M)&&IF++,Ai.isVoidTag(M)?qI(Ns,x):(vo.unshift(Ns),(k===1||k===2)&&(Fo.inXML=!0)),Ns=null}function q1(x,M,k){{const G=vo[0]&&vo[0].tag;G!=="script"&&G!=="style"&&x.includes("&")&&(x=Ai.decodeEntities(x,!1))}const F=vo[0]||mb,B=F.children[F.children.length-1];B&&B.type===2?(B.content+=x,_g(B.loc,k)):F.children.push({type:2,content:x,loc:Yo(M,k)})}function qI(x,M,k=!1){k?_g(x.loc,QQ(M,60)):_g(x.loc,kve(M,62)+1),Fo.inSFCRoot&&(x.children.length?x.innerLoc.end=Yc({},x.children[x.children.length-1].loc.end):x.innerLoc.end=Yc({},x.innerLoc.start),x.innerLoc.source=ss(x.innerLoc.start.offset,x.innerLoc.end.offset));const{tag:F,ns:B,children:G}=x;if(Qd||(F==="slot"?x.tagType=2:qG(x)?x.tagType=3:Eve(x)&&(x.tagType=1)),Fo.inRCDATA||(x.children=e3(G)),B===0&&Ai.isIgnoreNewlineTag(F)){const E=G[0];E&&E.type===2&&(E.content=E.content.replace(/^\r?\n/,""))}B===0&&Ai.isPreTag(F)&&IF--,PL===x&&(Qd=Fo.inVPre=!1,PL=null),Fo.inXML&&(vo[0]?vo[0].ns:Ai.ns)===0&&(Fo.inXML=!1);{const E=x.props;if(!Fo.inSFCRoot&&Sg("COMPILER_NATIVE_TEMPLATE",Ai)&&x.tag==="template"&&!qG(x)){const u=vo[0]||mb,o=u.children.indexOf(x);u.children.splice(o,1,...x.children)}const A=E.find(u=>u.type===6&&u.name==="inline-template");A&&qm("COMPILER_INLINE_TEMPLATE",Ai,A.loc)&&x.children.length&&(A.value={type:2,content:ss(x.children[0].loc.start.offset,x.children[x.children.length-1].loc.end.offset),loc:A.loc})}}function kve(x,M){let k=x;for(;Kc.charCodeAt(k)!==M&&k<Kc.length-1;)k++;return k}function QQ(x,M){let k=x;for(;Kc.charCodeAt(k)!==M&&k>=0;)k--;return k}const Rve=new Set(["if","else","else-if","for","slot"]);function qG({tag:x,props:M}){if(x==="template"){for(let k=0;k<M.length;k++)if(M[k].type===7&&Rve.has(M[k].name))return!0}return!1}function Eve({tag:x,props:M}){if(Ai.isCustomElement(x))return!1;if(x==="component"||Ave(x.charCodeAt(0))||CF(x)||Ai.isBuiltInComponent&&Ai.isBuiltInComponent(x)||Ai.isNativeTag&&!Ai.isNativeTag(x))return!0;for(let k=0;k<M.length;k++){const F=M[k];if(F.type===6){if(F.name==="is"&&F.value){if(F.value.content.startsWith("vue:"))return!0;if(qm("COMPILER_IS_ON_ELEMENT",Ai,F.loc))return!0}}else if(F.name==="bind"&&tf(F.arg,"is")&&qm("COMPILER_IS_ON_ELEMENT",Ai,F.loc))return!0}return!1}function Ave(x){return x>64&&x<91}const Mve=/\r\n/g;function e3(x,M){const k=Ai.whitespace!=="preserve";let F=!1;for(let B=0;B<x.length;B++){const G=x[B];if(G.type===2)if(IF)G.content=G.content.replace(Mve,`
`);else if(Dve(G.content)){const E=x[B-1]&&x[B-1].type,A=x[B+1]&&x[B+1].type;!E||!A||k&&(E===3&&(A===3||A===1)||E===1&&(A===3||A===1&&Ove(G.content)))?(F=!0,x[B]=null):G.content=" "}else k&&(G.content=t3(G.content))}return F?x.filter(Boolean):x}function Dve(x){for(let M=0;M<x.length;M++)if(!jl(x.charCodeAt(M)))return!1;return!0}function Ove(x){for(let M=0;M<x.length;M++){const k=x.charCodeAt(M);if(k===10||k===13)return!0}return!1}function t3(x){let M="",k=!1;for(let F=0;F<x.length;F++)jl(x.charCodeAt(F))?k||(M+=" ",k=!0):(M+=x[F],k=!1);return M}function BL(x){(vo[0]||mb).children.push(x)}function Yo(x,M){return{start:Fo.getPos(x),end:M==null?M:Fo.getPos(M),source:M==null?M:ss(x,M)}}function Nve(x){return Yo(x.start.offset,x.end.offset)}function _g(x,M){x.end=Fo.getPos(M),x.source=ss(x.start.offset,M)}function Pve(x){const M={type:6,name:x.rawName,nameLoc:Yo(x.loc.start.offset,x.loc.start.offset+x.rawName.length),value:void 0,loc:x.loc};if(x.exp){const k=x.exp.loc;k.end.offset<x.loc.end.offset&&(k.start.offset--,k.start.column--,k.end.offset++,k.end.column++),M.value={type:2,content:x.exp.content,loc:k}}return M}function YI(x,M=!1,k,F=0,B=0){return Mr(x,M,k,F)}function $c(x,M,k){Ai.onError(ho(x,Yo(M,M)))}function Bve(){Fo.reset(),Ns=null,pi=null,Cl="",jc=-1,Cg=-1,vo.length=0}function xF(x,M){if(Bve(),Kc=x,Ai=Yc({},ZQ),M){let B;for(B in M)M[B]!=null&&(Ai[B]=M[B])}Fo.mode=Ai.parseMode==="html"?1:Ai.parseMode==="sfc"?2:0,Fo.inXML=Ai.ns===1||Ai.ns===2;const k=M&&M.delimiters;k&&(Fo.delimiterOpen=dx(k[0]),Fo.delimiterClose=dx(k[1]));const F=mb=BQ([],x);return Fo.parse(Kc),F.loc=Yo(0,x.length),F.children=e3(F.children),mb=null,F}function Lve(x,M){KI(x,void 0,M,n3(x,x.children[0]))}function n3(x,M){const{children:k}=x;return k.length===1&&M.type===1&&!gb(M)}function KI(x,M,k,F=!1,B=!1){const{children:G}=x,E=[];for(let S=0;S<G.length;S++){const _=G[S];if(_.type===1&&_.tagType===0){const p=F?0:Il(_,k);if(p>0){if(p>=2){_.codegenNode.patchFlag=-1,E.push(_);continue}}else{const f=_.codegenNode;if(f.type===13){const y=f.patchFlag;if((y===void 0||y===512||y===1)&&i3(_,k)>=2){const d=o3(_);d&&(f.props=k.hoist(d))}f.dynamicProps&&(f.dynamicProps=k.hoist(f.dynamicProps))}}}else if(_.type===12&&(F?0:Il(_,k))>=2){E.push(_);continue}if(_.type===1){const p=_.tagType===1;p&&k.scopes.vSlot++,KI(_,x,k,!1,B),p&&k.scopes.vSlot--}else if(_.type===11)KI(_,x,k,_.children.length===1,!0);else if(_.type===9)for(let p=0;p<_.branches.length;p++)KI(_.branches[p],x,k,_.branches[p].children.length===1,B)}let A=!1;if(E.length===G.length&&x.type===1){if(x.tagType===0&&x.codegenNode&&x.codegenNode.type===13&&ef(x.codegenNode.children))x.codegenNode.children=u(rf(x.codegenNode.children)),A=!0;else if(x.tagType===1&&x.codegenNode&&x.codegenNode.type===13&&x.codegenNode.children&&!ef(x.codegenNode.children)&&x.codegenNode.children.type===15){const S=o(x.codegenNode,"default");S&&(S.returns=u(rf(S.returns)),A=!0)}else if(x.tagType===3&&M&&M.type===1&&M.tagType===1&&M.codegenNode&&M.codegenNode.type===13&&M.codegenNode.children&&!ef(M.codegenNode.children)&&M.codegenNode.children.type===15){const S=Sl(x,"slot",!0),_=S&&S.arg&&o(M.codegenNode,S.arg);_&&(_.returns=u(rf(_.returns)),A=!0)}}if(!A)for(const S of E)S.codegenNode=k.cache(S.codegenNode);function u(S){const _=k.cache(S);return B&&k.hmr&&(_.needArraySpread=!0),_}function o(S,_){if(S.children&&!ef(S.children)&&S.children.type===15){const p=S.children.properties.find(f=>f.key===_||f.key.content===_);return p&&p.value}}E.length&&k.transformHoist&&k.transformHoist(G,k,x)}function Il(x,M){const{constantCache:k}=M;switch(x.type){case 1:if(x.tagType!==0)return 0;const F=k.get(x);if(F!==void 0)return F;const B=x.codegenNode;if(B.type!==13||B.isBlock&&x.tag!=="svg"&&x.tag!=="foreignObject"&&x.tag!=="math")return 0;if(B.patchFlag===void 0){let E=3;const A=i3(x,M);if(A===0)return k.set(x,0),0;A<E&&(E=A);for(let u=0;u<x.children.length;u++){const o=Il(x.children[u],M);if(o===0)return k.set(x,0),0;o<E&&(E=o)}if(E>1)for(let u=0;u<x.props.length;u++){const o=x.props[u];if(o.type===7&&o.name==="bind"&&o.exp){const S=Il(o.exp,M);if(S===0)return k.set(x,0),0;S<E&&(E=S)}}if(B.isBlock){for(let u=0;u<x.props.length;u++)if(x.props[u].type===7)return k.set(x,0),0;M.removeHelper(af),M.removeHelper(Eg(M.inSSR,B.isComponent)),B.isBlock=!1,M.helper(Rg(M.inSSR,B.isComponent))}return k.set(x,E),E}else return k.set(x,0),0;case 2:case 3:return 3;case 9:case 11:case 10:return 0;case 5:case 12:return Il(x.content,M);case 4:return x.constType;case 8:let G=3;for(let E=0;E<x.children.length;E++){const A=x.children[E];if(ma(A)||VL(A))continue;const u=Il(A,M);if(u===0)return 0;u<G&&(G=u)}return G;case 20:return 2;default:return 0}}const Fve=new Set([Lx,Fx,Gm,Qm]);function r3(x,M){if(x.type===14&&!ma(x.callee)&&Fve.has(x.callee)){const k=x.arguments[0];if(k.type===4)return Il(k,M);if(k.type===14)return r3(k,M)}return 0}function i3(x,M){let k=3;const F=o3(x);if(F&&F.type===15){const{properties:B}=F;for(let G=0;G<B.length;G++){const{key:E,value:A}=B[G],u=Il(E,M);if(u===0)return u;u<k&&(k=u);let o;if(A.type===4?o=Il(A,M):A.type===14?o=r3(A,M):o=0,o===0)return o;o<k&&(k=o)}}return k}function o3(x){const M=x.codegenNode;if(M.type===13)return M.props}function a3(x,{filename:M="",prefixIdentifiers:k=!1,hoistStatic:F=!1,hmr:B=!1,cacheHandlers:G=!1,nodeTransforms:E=[],directiveTransforms:A={},transformHoist:u=null,isBuiltInComponent:o=lb,isCustomElement:S=lb,expressionPlugins:_=[],scopeId:p=null,slotted:f=!0,ssr:y=!1,inSSR:d=!1,ssrCssVars:v="",bindingMetadata:b=Que,inline:s=!1,isTS:l=!1,onError:w=bF,onWarn:I=VQ,compatConfig:C}){const h=M.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),c={filename:M,selfName:h&&JJ(nf(h[1])),prefixIdentifiers:k,hoistStatic:F,hmr:B,cacheHandlers:G,nodeTransforms:E,directiveTransforms:A,transformHoist:u,isBuiltInComponent:o,isCustomElement:S,expressionPlugins:_,scopeId:p,slotted:f,ssr:y,inSSR:d,ssrCssVars:v,bindingMetadata:b,inline:s,isTS:l,onError:w,onWarn:I,compatConfig:C,root:x,helpers:new Map,components:new Set,directives:new Set,hoists:[],imports:[],cached:[],constantCache:new WeakMap,temps:0,identifiers:Object.create(null),scopes:{vFor:0,vSlot:0,vPre:0,vOnce:0},parent:null,grandParent:null,currentNode:x,childIndex:0,inVOnce:!1,helper(m){const T=c.helpers.get(m)||0;return c.helpers.set(m,T+1),m},removeHelper(m){const T=c.helpers.get(m);if(T){const D=T-1;D?c.helpers.set(m,D):c.helpers.delete(m)}},helperString(m){return`_${Tg[c.helper(m)]}`},replaceNode(m){c.parent.children[c.childIndex]=c.currentNode=m},removeNode(m){const T=c.parent.children,D=m?T.indexOf(m):c.currentNode?c.childIndex:-1;!m||m===c.currentNode?(c.currentNode=null,c.onNodeRemoved()):c.childIndex>D&&(c.childIndex--,c.onNodeRemoved()),c.parent.children.splice(D,1)},onNodeRemoved:lb,addIdentifiers(m){},removeIdentifiers(m){},hoist(m){ma(m)&&(m=Mr(m)),c.hoists.push(m);const T=Mr(`_hoisted_${c.hoists.length}`,!1,m.loc,2);return T.hoisted=m,T},cache(m,T=!1){const D=LQ(c.cached.length,m,T);return c.cached.push(D),D}};return c.filters=new Set,c}function s3(x,M){const k=a3(x,M);Tb(x,k),M.hoistStatic&&Lve(x,k),M.ssr||Vve(x,k),x.helpers=new Set([...k.helpers.keys()]),x.components=[...k.components],x.directives=[...k.directives],x.imports=k.imports,x.hoists=k.hoists,x.temps=k.temps,x.cached=k.cached,x.transformed=!0,x.filters=[...k.filters]}function Vve(x,M){const{helper:k}=M,{children:F}=x;if(F.length===1){const B=F[0];if(n3(x,B)&&B.codegenNode){const G=B.codegenNode;G.type===13&&zx(G,M),x.codegenNode=G}else x.codegenNode=B}else if(F.length>1){let B=64;x.codegenNode=jm(M,k(Um),void 0,x.children,B,void 0,void 0,!0,void 0,!1)}}function Hve(x,M){let k=0;const F=()=>{k--};for(;k<x.children.length;k++){const B=x.children[k];ma(B)||(M.grandParent=M.parent,M.parent=x,M.childIndex=k,M.onNodeRemoved=F,Tb(B,M))}}function Tb(x,M){M.currentNode=x;const{nodeTransforms:k}=M,F=[];for(let G=0;G<k.length;G++){const E=k[G](x,M);if(E&&(ef(E)?F.push(...E):F.push(E)),M.currentNode)x=M.currentNode;else return}switch(x.type){case 3:M.ssr||M.helper(Zm);break;case 5:M.ssr||M.helper(Sb);break;case 9:for(let G=0;G<x.branches.length;G++)Tb(x.branches[G],M);break;case 10:case 11:case 1:case 0:Hve(x,M);break}M.currentNode=x;let B=F.length;for(;B--;)F[B]()}function TF(x,M){const k=ma(x)?F=>F===x:F=>x.test(F);return(F,B)=>{if(F.type===1){const{props:G}=F;if(F.tagType===3&&G.some(SF))return;const E=[];for(let A=0;A<G.length;A++){const u=G[A];if(u.type===7&&k(u.name)){G.splice(A,1),A--;const o=M(F,u,B);o&&E.push(o)}}return E}}}const Wx="/*@__PURE__*/",l3=x=>`${Tg[x]}: _${Tg[x]}`;function $ve(x,{mode:M="function",prefixIdentifiers:k=M==="module",sourceMap:F=!1,filename:B="template.vue.html",scopeId:G=null,optimizeImports:E=!1,runtimeGlobalName:A="Vue",runtimeModuleName:u="vue",ssrRuntimeModuleName:o="vue/server-renderer",ssr:S=!1,isTS:_=!1,inSSR:p=!1}){const f={mode:M,prefixIdentifiers:k,sourceMap:F,filename:B,scopeId:G,optimizeImports:E,runtimeGlobalName:A,runtimeModuleName:u,ssrRuntimeModuleName:o,ssr:S,isTS:_,inSSR:p,source:x.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper(d){return`_${Tg[d]}`},push(d,v=-2,b){f.code+=d},indent(){y(++f.indentLevel)},deindent(d=!1){d?--f.indentLevel:y(--f.indentLevel)},newline(){y(f.indentLevel)}};function y(d){f.push(`
`+" ".repeat(d),0)}return f}function u3(x,M={}){const k=$ve(x,M);M.onContextCreated&&M.onContextCreated(k);const{mode:F,push:B,prefixIdentifiers:G,indent:E,deindent:A,newline:u,scopeId:o,ssr:S}=k,_=Array.from(x.helpers),p=_.length>0,f=!G&&F!=="module";zve(x,k);const d=S?"ssrRender":"render",b=(S?["_ctx","_push","_parent","_attrs"]:["_ctx","_cache"]).join(", ");if(B(`function ${d}(${b}) {`),E(),f&&(B("with (_ctx) {"),E(),p&&(B(`const { ${_.map(l3).join(", ")} } = _Vue
`,-1),u())),x.components.length&&(kN(x.components,"component",k),(x.directives.length||x.temps>0)&&u()),x.directives.length&&(kN(x.directives,"directive",k),x.temps>0&&u()),x.filters&&x.filters.length&&(u(),kN(x.filters,"filter",k),u()),x.temps>0){B("let ");for(let s=0;s<x.temps;s++)B(`${s>0?", ":""}_temp${s}`)}return(x.components.length||x.directives.length||x.temps)&&(B(`
`,0),u()),S||B("return "),x.codegenNode?Ps(x.codegenNode,k):B("null"),f&&(A(),B("}")),A(),B("}"),{ast:x,code:k.code,preamble:"",map:k.map?k.map.toJSON():void 0}}function zve(x,M){const{ssr:k,prefixIdentifiers:F,push:B,newline:G,runtimeModuleName:E,runtimeGlobalName:A,ssrRuntimeModuleName:u}=M,o=A,S=Array.from(x.helpers);if(S.length>0&&(B(`const _Vue = ${o}
`,-1),x.hoists.length)){const _=[Rx,Ex,Zm,Ax,mF].filter(p=>S.includes(p)).map(l3).join(", ");B(`const { ${_} } = _Vue
`,-1)}Wve(x.hoists,M),G(),B("return ")}function kN(x,M,{helper:k,push:F,newline:B,isTS:G}){const E=k(M==="filter"?Nx:M==="component"?Mx:Ox);for(let A=0;A<x.length;A++){let u=x[A];const o=u.endsWith("__self");o&&(u=u.slice(0,-6)),F(`const ${Km(u,M)} = ${E}(${JSON.stringify(u)}${o?", true":""})${G?"!":""}`),A<x.length-1&&B()}}function Wve(x,M){if(!x.length)return;M.pure=!0;const{push:k,newline:F}=M;F();for(let B=0;B<x.length;B++){const G=x[B];G&&(k(`const _hoisted_${B+1} = `),Ps(G,M),F())}M.pure=!1}function kF(x,M){const k=x.length>3||!1;M.push("["),k&&M.indent(),kb(x,M,k),k&&M.deindent(),M.push("]")}function kb(x,M,k=!1,F=!0){const{push:B,newline:G}=M;for(let E=0;E<x.length;E++){const A=x[E];ma(A)?B(A,-3):ef(A)?kF(A,M):Ps(A,M),E<x.length-1&&(k?(F&&B(","),G()):F&&B(", "))}}function Ps(x,M){if(ma(x)){M.push(x,-3);return}if(VL(x)){M.push(M.helper(x));return}switch(x.type){case 1:case 9:case 11:Ps(x.codegenNode,M);break;case 2:Uve(x,M);break;case 4:h3(x,M);break;case 5:Gve(x,M);break;case 12:Ps(x.codegenNode,M);break;case 8:c3(x,M);break;case 3:qve(x,M);break;case 13:Yve(x,M);break;case 14:Xve(x,M);break;case 15:Jve(x,M);break;case 17:Zve(x,M);break;case 18:Qve(x,M);break;case 19:eye(x,M);break;case 20:tye(x,M);break;case 21:kb(x.body,M,!0,!1);break}}function Uve(x,M){M.push(JSON.stringify(x.content),-3,x)}function h3(x,M){const{content:k,isStatic:F}=x;M.push(F?JSON.stringify(k):k,-3,x)}function Gve(x,M){const{push:k,helper:F,pure:B}=M;B&&k(Wx),k(`${F(Sb)}(`),Ps(x.content,M),k(")")}function c3(x,M){for(let k=0;k<x.children.length;k++){const F=x.children[k];ma(F)?M.push(F,-3):Ps(F,M)}}function jve(x,M){const{push:k}=M;if(x.type===8)k("["),c3(x,M),k("]");else if(x.isStatic){const F=Ib(x.content)?x.content:JSON.stringify(x.content);k(F,-2,x)}else k(`[${x.content}]`,-3,x)}function qve(x,M){const{push:k,helper:F,pure:B}=M;B&&k(Wx),k(`${F(Zm)}(${JSON.stringify(x.content)})`,-3,x)}function Yve(x,M){const{push:k,helper:F,pure:B}=M,{tag:G,props:E,children:A,patchFlag:u,dynamicProps:o,directives:S,isBlock:_,disableTracking:p,isComponent:f}=x;let y;u&&(y=String(u)),S&&k(F(Px)+"("),_&&k(`(${F(af)}(${p?"true":""}), `),B&&k(Wx);const d=_?Eg(M.inSSR,f):Rg(M.inSSR,f);k(F(d)+"(",-2,x),kb(Kve([G,E,A,y,o]),M),k(")"),_&&k(")"),S&&(k(", "),Ps(S,M),k(")"))}function Kve(x){let M=x.length;for(;M--&&x[M]==null;);return x.slice(0,M+1).map(k=>k||"null")}function Xve(x,M){const{push:k,helper:F,pure:B}=M,G=ma(x.callee)?x.callee:F(x.callee);B&&k(Wx),k(G+"(",-2,x),kb(x.arguments,M),k(")")}function Jve(x,M){const{push:k,indent:F,deindent:B,newline:G}=M,{properties:E}=x;if(!E.length){k("{}",-2,x);return}const A=E.length>1||!1;k(A?"{":"{ "),A&&F();for(let u=0;u<E.length;u++){const{key:o,value:S}=E[u];jve(o,M),k(": "),Ps(S,M),u<E.length-1&&(k(","),G())}A&&B(),k(A?"}":" }")}function Zve(x,M){kF(x.elements,M)}function Qve(x,M){const{push:k,indent:F,deindent:B}=M,{params:G,returns:E,body:A,newline:u,isSlot:o}=x;o&&k(`_${Tg[Hx]}(`),k("(",-2,x),ef(G)?kb(G,M):G&&Ps(G,M),k(") => "),(u||A)&&(k("{"),F()),E?(u&&k("return "),ef(E)?kF(E,M):Ps(E,M)):A&&Ps(A,M),(u||A)&&(B(),k("}")),o&&(x.isNonScopedSlot&&k(", undefined, true"),k(")"))}function eye(x,M){const{test:k,consequent:F,alternate:B,newline:G}=x,{push:E,indent:A,deindent:u,newline:o}=M;if(k.type===4){const _=!Ib(k.content);_&&E("("),h3(k,M),_&&E(")")}else E("("),Ps(k,M),E(")");G&&A(),M.indentLevel++,G||E(" "),E("? "),Ps(F,M),M.indentLevel--,G&&o(),G||E(" "),E(": ");const S=B.type===19;S||M.indentLevel++,Ps(B,M),S||M.indentLevel--,G&&u(!0)}function tye(x,M){const{push:k,helper:F,indent:B,deindent:G,newline:E}=M,{needPauseTracking:A,needArraySpread:u}=x;u&&k("[...("),k(`_cache[${x.index}] || (`),A&&(B(),k(`${F(fb)}(-1),`),E(),k("(")),k(`_cache[${x.index}] = `),Ps(x.value,M),A&&(k(`).cacheIndex = ${x.index},`),E(),k(`${F(fb)}(1),`),E(),k(`_cache[${x.index}]`),G()),k(")"),u&&k(")]")}new RegExp("\\b"+"arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield".split(",").join("\\b|\\b")+"\\b");const nye=(x,M)=>{if(x.type===5)x.content=XI(x.content,M);else if(x.type===1)for(let k=0;k<x.props.length;k++){const F=x.props[k];if(F.type===7&&F.name!=="for"){const B=F.exp,G=F.arg;B&&B.type===4&&!(F.name==="on"&&G)&&(F.exp=XI(B,M,F.name==="slot")),G&&G.type===4&&!G.isStatic&&(F.arg=XI(G,M))}}};function XI(x,M,k=!1,F=!1,B=Object.create(M.identifiers)){return x}function d3(x){return ma(x)?x:x.type===4?x.content:x.children.map(d3).join("")}const rye=TF(/^(if|else|else-if)$/,(x,M,k)=>f3(x,M,k,(F,B,G)=>{const E=k.parent.children;let A=E.indexOf(F),u=0;for(;A-->=0;){const o=E[A];o&&o.type===9&&(u+=o.branches.length)}return()=>{if(G)F.codegenNode=KG(B,u,k);else{const o=iye(F.codegenNode);o.alternate=KG(B,u+F.branches.length-1,k)}}}));function f3(x,M,k,F){if(M.name!=="else"&&(!M.exp||!M.exp.content.trim())){const B=M.exp?M.exp.loc:x.loc;k.onError(ho(28,M.loc)),M.exp=Mr("true",!1,B)}if(M.name==="if"){const B=YG(x,M),G={type:9,loc:Nve(x.loc),branches:[B]};if(k.replaceNode(G),F)return F(G,B,!0)}else{const B=k.parent.children;let G=B.indexOf(x);for(;G-->=-1;){const E=B[G];if(E&&E.type===3){k.removeNode(E);continue}if(E&&E.type===2&&!E.content.trim().length){k.removeNode(E);continue}if(E&&E.type===9){M.name==="else-if"&&E.branches[E.branches.length-1].condition===void 0&&k.onError(ho(30,x.loc)),k.removeNode();const A=YG(x,M);E.branches.push(A);const u=F&&F(E,A,!1);Tb(A,k),u&&u(),k.currentNode=null}else k.onError(ho(30,x.loc));break}}}function YG(x,M){const k=x.tagType===3;return{type:10,loc:x.loc,condition:M.name==="else"?void 0:M.exp,children:k&&!Sl(x,"for")?x.children:[x],userKey:xb(x,"key"),isTemplateIf:k}}function KG(x,M,k){return x.condition?cx(x.condition,XG(x,M,k),aa(k.helper(Zm),['""',"true"])):XG(x,M,k)}function XG(x,M,k){const{helper:F}=k,B=Vo("key",Mr(`${M}`,!1,va,2)),{children:G}=x,E=G[0];if(G.length!==1||E.type!==1)if(G.length===1&&E.type===11){const u=E.codegenNode;return pb(u,B,k),u}else return jm(k,F(Um),ql([B]),G,64,void 0,void 0,!0,!1,!1,x.loc);else{const u=E.codegenNode,o=XQ(u);return o.type===13&&zx(o,k),pb(o,B,k),u}}function iye(x){for(;;)if(x.type===19)if(x.alternate.type===19)x=x.alternate;else return x;else x.type===20&&(x=x.value)}const g3=(x,M,k)=>{const{modifiers:F,loc:B}=x,G=x.arg;let{exp:E}=x;if(E&&E.type===4&&!E.content.trim()&&(E=void 0),!E){if(G.type!==4||!G.isStatic)return k.onError(ho(52,G.loc)),{props:[Vo(G,Mr("",!0,B))]};p3(x),E=x.exp}return G.type!==4?(G.children.unshift("("),G.children.push(') || ""')):G.isStatic||(G.content=`${G.content} || ""`),F.some(A=>A.content==="camel")&&(G.type===4?G.isStatic?G.content=nf(G.content):G.content=`${k.helperString(ux)}(${G.content})`:(G.children.unshift(`${k.helperString(ux)}(`),G.children.push(")"))),k.inSSR||(F.some(A=>A.content==="prop")&&JG(G,"."),F.some(A=>A.content==="attr")&&JG(G,"^")),{props:[Vo(G,E)]}},p3=(x,M)=>{const k=x.arg,F=nf(k.content);x.exp=Mr(F,!1,k.loc)},JG=(x,M)=>{x.type===4?x.isStatic?x.content=M+x.content:x.content=`\`${M}\${${x.content}}\``:(x.children.unshift(`'${M}' + (`),x.children.push(")"))},oye=TF("for",(x,M,k)=>{const{helper:F,removeHelper:B}=k;return m3(x,M,k,G=>{const E=aa(F(Bx),[G.source]),A=Ym(x),u=Sl(x,"memo"),o=xb(x,"key",!1,!0);o&&o.type===7&&!o.exp&&p3(o);const S=o&&(o.type===6?o.value?Mr(o.value.content,!0):void 0:o.exp),_=o&&S?Vo("key",S):null,p=G.source.type===4&&G.source.constType>0,f=p?64:o?128:256;return G.codegenNode=jm(k,F(Um),void 0,E,f,void 0,void 0,!0,!p,!1,x.loc),()=>{let y;const{children:d}=G,v=d.length!==1||d[0].type!==1,b=gb(x)?x:A&&x.children.length===1&&gb(x.children[0])?x.children[0]:null;if(b?(y=b.codegenNode,A&&_&&pb(y,_,k)):v?y=jm(k,F(Um),_?ql([_]):void 0,x.children,64,void 0,void 0,!0,void 0,!1):(y=d[0].codegenNode,A&&_&&pb(y,_,k),y.isBlock!==!p&&(y.isBlock?(B(af),B(Eg(k.inSSR,y.isComponent))):B(Rg(k.inSSR,y.isComponent))),y.isBlock=!p,y.isBlock?(F(af),F(Eg(k.inSSR,y.isComponent))):F(Rg(k.inSSR,y.isComponent))),u){const s=kg(fx(G.parseResult,[Mr("_cached")]));s.body=FQ([Tu(["const _memo = (",u.exp,")"]),Tu(["if (_cached",...S?[" && _cached.key === ",S]:[],` && ${k.helperString(wF)}(_cached, _memo)) return _cached`]),Tu(["const _item = ",y]),Mr("_item.memo = _memo"),Mr("return _item")]),E.arguments.push(s,Mr("_cache"),Mr(String(k.cached.length))),k.cached.push(null)}else E.arguments.push(kg(fx(G.parseResult),y,!0))}})});function m3(x,M,k,F){if(!M.exp){k.onError(ho(31,M.loc));return}const B=M.forParseResult;if(!B){k.onError(ho(32,M.loc));return}RF(B);const{addIdentifiers:G,removeIdentifiers:E,scopes:A}=k,{source:u,value:o,key:S,index:_}=B,p={type:11,loc:M.loc,source:u,valueAlias:o,keyAlias:S,objectIndexAlias:_,parseResult:B,children:Ym(x)?x.children:[x]};k.replaceNode(p),A.vFor++;const f=F&&F(p);return()=>{A.vFor--,f&&f()}}function RF(x,M){x.finalized||(x.finalized=!0)}function fx({value:x,key:M,index:k},F=[]){return aye([x,M,k,...F])}function aye(x){let M=x.length;for(;M--&&!x[M];);return x.slice(0,M+1).map((k,F)=>k||Mr("_".repeat(F+1),!1))}const ZG=Mr("undefined",!1),v3=(x,M)=>{if(x.type===1&&(x.tagType===1||x.tagType===3)){const k=Sl(x,"slot");if(k)return k.exp,M.scopes.vSlot++,()=>{M.scopes.vSlot--}}},sye=(x,M)=>{let k;if(Ym(x)&&x.props.some(SF)&&(k=Sl(x,"for"))){const F=k.forParseResult;if(F){RF(F);const{value:B,key:G,index:E}=F,{addIdentifiers:A,removeIdentifiers:u}=M;return B&&A(B),G&&A(G),E&&A(E),()=>{B&&u(B),G&&u(G),E&&u(E)}}}},lye=(x,M,k,F)=>kg(x,k,!1,!0,k.length?k[0].loc:F);function y3(x,M,k=lye){M.helper(Hx);const{children:F,loc:B}=x,G=[],E=[];let A=M.scopes.vSlot>0||M.scopes.vFor>0;const u=Sl(x,"slot",!0);if(u){const{arg:v,exp:b}=u;v&&!el(v)&&(A=!0),G.push(Vo(v||Mr("default",!0),k(b,void 0,F,B)))}let o=!1,S=!1;const _=[],p=new Set;let f=0;for(let v=0;v<F.length;v++){const b=F[v];let s;if(!Ym(b)||!(s=Sl(b,"slot",!0))){b.type!==3&&_.push(b);continue}if(u){M.onError(ho(37,s.loc));break}o=!0;const{children:l,loc:w}=b,{arg:I=Mr("default",!0),exp:C,loc:h}=s;let c;el(I)?c=I?I.content:"default":A=!0;const m=Sl(b,"for"),T=k(C,m,l,w);let D,O;if(D=Sl(b,"if"))A=!0,E.push(cx(D.exp,Y1(I,T,f++),ZG));else if(O=Sl(b,/^else(-if)?$/,!0)){let N=v,z;for(;N--&&(z=F[N],z.type===3););if(z&&Ym(z)&&Sl(z,/^(else-)?if$/)){let H=E[E.length-1];for(;H.alternate.type===19;)H=H.alternate;H.alternate=O.exp?cx(O.exp,Y1(I,T,f++),ZG):Y1(I,T,f++)}else M.onError(ho(30,O.loc))}else if(m){A=!0;const N=m.forParseResult;N?(RF(N),E.push(aa(M.helper(Bx),[N.source,kg(fx(N),Y1(I,T),!0)]))):M.onError(ho(32,m.loc))}else{if(c){if(p.has(c)){M.onError(ho(38,h));continue}p.add(c),c==="default"&&(S=!0)}G.push(Vo(I,T))}}if(!u){const v=(b,s)=>{const l=k(b,void 0,s,B);return M.compatConfig&&(l.isNonScopedSlot=!0),Vo("default",l)};o?_.length&&_.some(b=>w3(b))&&(S?M.onError(ho(39,_[0].loc)):G.push(v(void 0,_))):G.push(v(void 0,F))}const y=A?2:JI(x.children)?3:1;let d=ql(G.concat(Vo("_",Mr(y+"",!1))),B);return E.length&&(d=aa(M.helper(yF),[d,rf(E)])),{slots:d,hasDynamicSlots:A}}function Y1(x,M,k){const F=[Vo("name",x),Vo("fn",M)];return k!=null&&F.push(Vo("key",Mr(String(k),!0))),ql(F)}function JI(x){for(let M=0;M<x.length;M++){const k=x[M];switch(k.type){case 1:if(k.tagType===2||JI(k.children))return!0;break;case 9:if(JI(k.branches))return!0;break;case 10:case 11:if(JI(k.children))return!0;break}}return!1}function w3(x){return x.type!==2&&x.type!==12?!0:x.type===2?!!x.content.trim():w3(x.content)}const b3=new WeakMap,C3=(x,M)=>function(){if(x=M.currentNode,!(x.type===1&&(x.tagType===0||x.tagType===1)))return;const{tag:F,props:B}=x,G=x.tagType===1;let E=G?_3(x,M):`"${F}"`;const A=ZJ(E)&&E.callee===Dx;let u,o,S=0,_,p,f,y=A||E===Hm||E===kx||!G&&(F==="svg"||F==="foreignObject"||F==="math");if(B.length>0){const d=EF(x,M,void 0,G,A);u=d.props,S=d.patchFlag,p=d.dynamicPropNames;const v=d.directives;f=v&&v.length?rf(v.map(b=>S3(b,M))):void 0,d.shouldUseBlock&&(y=!0)}if(x.children.length>0)if(E===cb&&(y=!0,S|=1024),G&&E!==Hm&&E!==cb){const{slots:v,hasDynamicSlots:b}=y3(x,M);o=v,b&&(S|=1024)}else if(x.children.length===1&&E!==Hm){const v=x.children[0],b=v.type,s=b===5||b===8;s&&Il(v,M)===0&&(S|=1),s||b===2?o=v:o=x.children}else o=x.children;p&&p.length&&(_=hye(p)),x.codegenNode=jm(M,E,u,o,S===0?void 0:S,_,f,!!y,!1,G,x.loc)};function _3(x,M,k=!1){let{tag:F}=x;const B=LL(F),G=xb(x,"is",!1,!0);if(G)if(B||Sg("COMPILER_IS_ON_ELEMENT",M)){let A;if(G.type===6?A=G.value&&Mr(G.value.content,!0):(A=G.exp,A||(A=Mr("is",!1,G.arg.loc))),A)return aa(M.helper(Dx),[A])}else G.type===6&&G.value.content.startsWith("vue:")&&(F=G.value.content.slice(4));const E=CF(F)||M.isBuiltInComponent(F);return E?(k||M.helper(E),E):(M.helper(Mx),M.components.add(F),Km(F,"component"))}function EF(x,M,k=x.props,F,B,G=!1){const{tag:E,loc:A,children:u}=x;let o=[];const S=[],_=[],p=u.length>0;let f=!1,y=0,d=!1,v=!1,b=!1,s=!1,l=!1,w=!1;const I=[],C=T=>{o.length&&(S.push(ql(QG(o),A)),o=[]),T&&S.push(T)},h=()=>{M.scopes.vFor>0&&o.push(Vo(Mr("ref_for",!0),Mr("true")))},c=({key:T,value:D})=>{if(el(T)){const O=T.content,N=QJ(O);if(N&&(!F||B)&&O.toLowerCase()!=="onclick"&&O!=="onUpdate:modelValue"&&!rU(O)&&(s=!0),N&&rU(O)&&(w=!0),N&&D.type===14&&(D=D.arguments[0]),D.type===20||(D.type===4||D.type===8)&&Il(D,M)>0)return;O==="ref"?d=!0:O==="class"?v=!0:O==="style"?b=!0:O!=="key"&&!I.includes(O)&&I.push(O),F&&(O==="class"||O==="style")&&!I.includes(O)&&I.push(O)}else l=!0};for(let T=0;T<k.length;T++){const D=k[T];if(D.type===6){const{loc:O,name:N,nameLoc:z,value:H}=D;let $=!0;if(N==="ref"&&(d=!0,h()),N==="is"&&(LL(E)||H&&H.content.startsWith("vue:")||Sg("COMPILER_IS_ON_ELEMENT",M)))continue;o.push(Vo(Mr(N,!0,z),Mr(H?H.content:"",$,H?H.loc:O)))}else{const{name:O,arg:N,exp:z,loc:H,modifiers:$}=D,V=O==="bind",P=O==="on";if(O==="slot"){F||M.onError(ho(40,H));continue}if(O==="once"||O==="memo"||O==="is"||V&&tf(N,"is")&&(LL(E)||Sg("COMPILER_IS_ON_ELEMENT",M))||P&&G)continue;if((V&&tf(N,"key")||P&&p&&tf(N,"vue:before-update"))&&(f=!0),V&&tf(N,"ref")&&h(),!N&&(V||P)){if(l=!0,z)if(V){if(h(),C(),Sg("COMPILER_V_BIND_OBJECT_ORDER",M)){S.unshift(z);continue}S.push(z)}else C({type:14,loc:H,callee:M.helper(Vx),arguments:F?[z]:[z,"true"]});else M.onError(ho(V?34:35,H));continue}V&&$.some(Y=>Y.content==="prop")&&(y|=32);const U=M.directiveTransforms[O];if(U){const{props:Y,needRuntime:Z}=U(D,x,M);!G&&Y.forEach(c),P&&N&&!el(N)?C(ql(Y,A)):o.push(...Y),Z&&(_.push(D),VL(Z)&&b3.set(D,Z))}else Zue(O)||(_.push(D),p&&(f=!0))}}let m;if(S.length?(C(),S.length>1?m=aa(M.helper(db),S,A):m=S[0]):o.length&&(m=ql(QG(o),A)),l?y|=16:(v&&!F&&(y|=2),b&&!F&&(y|=4),I.length&&(y|=8),s&&(y|=32)),!f&&(y===0||y===32)&&(d||w||_.length>0)&&(y|=512),!M.inSSR&&m)switch(m.type){case 15:let T=-1,D=-1,O=!1;for(let H=0;H<m.properties.length;H++){const $=m.properties[H].key;el($)?$.content==="class"?T=H:$.content==="style"&&(D=H):$.isHandlerKey||(O=!0)}const N=m.properties[T],z=m.properties[D];O?m=aa(M.helper(Gm),[m]):(N&&!el(N.value)&&(N.value=aa(M.helper(Lx),[N.value])),z&&(b||z.value.type===4&&z.value.content.trim()[0]==="["||z.value.type===17)&&(z.value=aa(M.helper(Fx),[z.value])));break;case 14:break;default:m=aa(M.helper(Gm),[aa(M.helper(Qm),[m])]);break}return{props:m,directives:_,patchFlag:y,dynamicPropNames:I,shouldUseBlock:f}}function QG(x){const M=new Map,k=[];for(let F=0;F<x.length;F++){const B=x[F];if(B.key.type===8||!B.key.isStatic){k.push(B);continue}const G=B.key.content,E=M.get(G);E?(G==="style"||G==="class"||QJ(G))&&uye(E,B):(M.set(G,B),k.push(B))}return k}function uye(x,M){x.value.type===17?x.value.elements.push(M.value):x.value=rf([x.value,M.value],x.loc)}function S3(x,M){const k=[],F=b3.get(x);F?k.push(M.helperString(F)):(M.helper(Ox),M.directives.add(x.name),k.push(Km(x.name,"directive")));const{loc:B}=x;if(x.exp&&k.push(x.exp),x.arg&&(x.exp||k.push("void 0"),k.push(x.arg)),Object.keys(x.modifiers).length){x.arg||(x.exp||k.push("void 0"),k.push("void 0"));const G=Mr("true",!1,B);k.push(ql(x.modifiers.map(E=>Vo(E,G)),B))}return rf(k,x.loc)}function hye(x){let M="[";for(let k=0,F=x.length;k<F;k++)M+=JSON.stringify(x[k]),k<F-1&&(M+=", ");return M+"]"}function LL(x){return x==="component"||x==="Component"}const cye=(x,M)=>{if(gb(x)){const{children:k,loc:F}=x,{slotName:B,slotProps:G}=I3(x,M),E=[M.prefixIdentifiers?"_ctx.$slots":"$slots",B,"{}","undefined","true"];let A=2;G&&(E[2]=G,A=3),k.length&&(E[3]=kg([],k,!1,!1,F),A=4),M.scopeId&&!M.slotted&&(A=5),E.splice(A),x.codegenNode=aa(M.helper(vF),E,F)}};function I3(x,M){let k='"default"',F;const B=[];for(let G=0;G<x.props.length;G++){const E=x.props[G];if(E.type===6)E.value&&(E.name==="name"?k=JSON.stringify(E.value.content):(E.name=nf(E.name),B.push(E)));else if(E.name==="bind"&&tf(E.arg,"name")){if(E.exp)k=E.exp;else if(E.arg&&E.arg.type===4){const A=nf(E.arg.content);k=E.exp=Mr(A,!1,E.arg.loc)}}else E.name==="bind"&&E.arg&&el(E.arg)&&(E.arg.content=nf(E.arg.content)),B.push(E)}if(B.length>0){const{props:G,directives:E}=EF(x,M,B,!1,!1);F=G,E.length&&M.onError(ho(36,E[0].loc))}return{slotName:k,slotProps:F}}const AF=(x,M,k,F)=>{const{loc:B,modifiers:G,arg:E}=x;!x.exp&&!G.length&&k.onError(ho(35,B));let A;if(E.type===4)if(E.isStatic){let _=E.content;_.startsWith("vue:")&&(_=`vnode-${_.slice(4)}`);const p=M.tagType!==0||_.startsWith("vnode")||!/[A-Z]/.test(_)?ehe(nf(_)):`on:${_}`;A=Mr(p,!0,E.loc)}else A=Tu([`${k.helperString(hx)}(`,E,")"]);else A=E,A.children.unshift(`${k.helperString(hx)}(`),A.children.push(")");let u=x.exp;u&&!u.content.trim()&&(u=void 0);let o=k.cacheHandlers&&!u&&!k.inVOnce;if(u){const _=_F(u),p=!(_||jQ(u)),f=u.content.includes(";");(p||o&&_)&&(u=Tu([`${p?"$event":"(...args)"} => ${f?"{":"("}`,u,f?"}":")"]))}let S={props:[Vo(A,u||Mr("() => {}",!1,B))]};return F&&(S=F(S)),o&&(S.props[0].value=k.cache(S.props[0].value)),S.props.forEach(_=>_.key.isHandlerKey=!0),S},dye=(x,M)=>{if(x.type===0||x.type===1||x.type===11||x.type===10)return()=>{const k=x.children;let F,B=!1;for(let G=0;G<k.length;G++){const E=k[G];if(jI(E)){B=!0;for(let A=G+1;A<k.length;A++){const u=k[A];if(jI(u))F||(F=k[G]=Tu([E],E.loc)),F.children.push(" + ",u),k.splice(A,1),A--;else{F=void 0;break}}}}if(!(!B||k.length===1&&(x.type===0||x.type===1&&x.tagType===0&&!x.props.find(G=>G.type===7&&!M.directiveTransforms[G.name])&&x.tag!=="template")))for(let G=0;G<k.length;G++){const E=k[G];if(jI(E)||E.type===8){const A=[];(E.type!==2||E.content!==" ")&&A.push(E),!M.ssr&&Il(E,M)===0&&A.push("1"),k[G]={type:12,content:E,loc:E.loc,codegenNode:aa(M.helper(Ax),A)}}}}},ej=new WeakSet,fye=(x,M)=>{if(x.type===1&&Sl(x,"once",!0))return ej.has(x)||M.inVOnce||M.inSSR?void 0:(ej.add(x),M.inVOnce=!0,M.helper(fb),()=>{M.inVOnce=!1;const k=M.currentNode;k.codegenNode&&(k.codegenNode=M.cache(k.codegenNode,!0))})},MF=(x,M,k)=>{const{exp:F,arg:B}=x;if(!F)return k.onError(ho(41,x.loc)),K1();const G=F.loc.source.trim(),E=F.type===4?F.content:G,A=k.bindingMetadata[G];if(A==="props"||A==="props-aliased")return k.onError(ho(44,F.loc)),K1();if(!E.trim()||!_F(F))return k.onError(ho(42,F.loc)),K1();const u=B||Mr("modelValue",!0),o=B?el(B)?`onUpdate:${nf(B.content)}`:Tu(['"onUpdate:" + ',B]):"onUpdate:modelValue";let S;const _=k.isTS?"($event: any)":"$event";S=Tu([`${_} => ((`,F,") = $event)"]);const p=[Vo(u,x.exp),Vo(o,S)];if(x.modifiers.length&&M.tagType===1){const f=x.modifiers.map(d=>d.content).map(d=>(Ib(d)?d:JSON.stringify(d))+": true").join(", "),y=B?el(B)?`${B.content}Modifiers`:Tu([B,' + "Modifiers"']):"modelModifiers";p.push(Vo(y,Mr(`{ ${f} }`,!1,x.loc,2)))}return K1(p)};function K1(x=[]){return{props:x}}const gye=/[\w).+\-_$\]]/,pye=(x,M)=>{Sg("COMPILER_FILTERS",M)&&(x.type===5?gx(x.content,M):x.type===1&&x.props.forEach(k=>{k.type===7&&k.name!=="for"&&k.exp&&gx(k.exp,M)}))};function gx(x,M){if(x.type===4)tj(x,M);else for(let k=0;k<x.children.length;k++){const F=x.children[k];typeof F=="object"&&(F.type===4?tj(F,M):F.type===8?gx(x,M):F.type===5&&gx(F.content,M))}}function tj(x,M){const k=x.content;let F=!1,B=!1,G=!1,E=!1,A=0,u=0,o=0,S=0,_,p,f,y,d=[];for(f=0;f<k.length;f++)if(p=_,_=k.charCodeAt(f),F)_===39&&p!==92&&(F=!1);else if(B)_===34&&p!==92&&(B=!1);else if(G)_===96&&p!==92&&(G=!1);else if(E)_===47&&p!==92&&(E=!1);else if(_===124&&k.charCodeAt(f+1)!==124&&k.charCodeAt(f-1)!==124&&!A&&!u&&!o)y===void 0?(S=f+1,y=k.slice(0,f).trim()):v();else{switch(_){case 34:B=!0;break;case 39:F=!0;break;case 96:G=!0;break;case 40:o++;break;case 41:o--;break;case 91:u++;break;case 93:u--;break;case 123:A++;break;case 125:A--;break}if(_===47){let b=f-1,s;for(;b>=0&&(s=k.charAt(b),s===" ");b--);(!s||!gye.test(s))&&(E=!0)}}y===void 0?y=k.slice(0,f).trim():S!==0&&v();function v(){d.push(k.slice(S,f).trim()),S=f+1}if(d.length){for(f=0;f<d.length;f++)y=mye(y,d[f],M);x.content=y,x.ast=void 0}}function mye(x,M,k){k.helper(Nx);const F=M.indexOf("(");if(F<0)return k.filters.add(M),`${Km(M,"filter")}(${x})`;{const B=M.slice(0,F),G=M.slice(F+1);return k.filters.add(B),`${Km(B,"filter")}(${x}${G!==")"?","+G:G}`}}const nj=new WeakSet,vye=(x,M)=>{if(x.type===1){const k=Sl(x,"memo");return!k||nj.has(x)?void 0:(nj.add(x),()=>{const F=x.codegenNode||M.currentNode.codegenNode;F&&F.type===13&&(x.tagType!==1&&zx(F,M),x.codegenNode=aa(M.helper($x),[k.exp,kg(void 0,F),"_cache",String(M.cached.length)]),M.cached.push(null))})}};function x3(x){return[[fye,rye,vye,oye,pye,cye,C3,v3,dye],{on:AF,bind:g3,model:MF}]}function T3(x,M={}){const k=M.onError||bF,F=M.mode==="module";M.prefixIdentifiers===!0?k(ho(47)):F&&k(ho(48));const B=!1;M.cacheHandlers&&k(ho(49)),M.scopeId&&!F&&k(ho(50));const G=Yc({},M,{prefixIdentifiers:B}),E=ma(x)?xF(x,G):x,[A,u]=x3();return s3(E,Yc({},G,{nodeTransforms:[...A,...M.nodeTransforms||[]],directiveTransforms:Yc({},u,M.directiveTransforms||{})})),u3(E,G)}const yye={DATA:"data",PROPS:"props",PROPS_ALIASED:"props-aliased",SETUP_LET:"setup-let",SETUP_CONST:"setup-const",SETUP_REACTIVE_CONST:"setup-reactive-const",SETUP_MAYBE_REF:"setup-maybe-ref",SETUP_REF:"setup-ref",OPTIONS:"options",LITERAL_CONST:"literal-const"},k3=()=>({props:[]});/**
* @vue/compiler-dom v3.5.12
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/const DF=Symbol(""),OF=Symbol(""),NF=Symbol(""),PF=Symbol(""),px=Symbol(""),BF=Symbol(""),LF=Symbol(""),FF=Symbol(""),VF=Symbol(""),HF=Symbol("");PQ({[DF]:"vModelRadio",[OF]:"vModelCheckbox",[NF]:"vModelText",[PF]:"vModelSelect",[px]:"vModelDynamic",[BF]:"withModifiers",[LF]:"withKeys",[FF]:"vShow",[VF]:"Transition",[HF]:"TransitionGroup"});let Em;function wye(x,M=!1){return Em||(Em=document.createElement("div")),M?(Em.innerHTML=`<div foo="${x.replace(/"/g,""")}">`,Em.children[0].getAttribute("foo")):(Em.innerHTML=x,Em.textContent)}const $F={parseMode:"html",isVoidTag:ihe,isNativeTag:x=>the(x)||nhe(x)||rhe(x),isPreTag:x=>x==="pre",isIgnoreNewlineTag:x=>x==="pre"||x==="textarea",decodeEntities:wye,isBuiltInComponent:x=>{if(x==="Transition"||x==="transition")return VF;if(x==="TransitionGroup"||x==="transition-group")return HF},getNamespace(x,M,k){let F=M?M.ns:k;if(M&&F===2)if(M.tag==="annotation-xml"){if(x==="svg")return 1;M.props.some(B=>B.type===6&&B.name==="encoding"&&B.value!=null&&(B.value.content==="text/html"||B.value.content==="application/xhtml+xml"))&&(F=0)}else/^m(?:[ions]|text)$/.test(M.tag)&&x!=="mglyph"&&x!=="malignmark"&&(F=0);else M&&F===1&&(M.tag==="foreignObject"||M.tag==="desc"||M.tag==="title")&&(F=0);if(F===0){if(x==="svg")return 1;if(x==="math")return 2}return F}},R3=x=>{x.type===1&&x.props.forEach((M,k)=>{M.type===6&&M.name==="style"&&M.value&&(x.props[k]={type:7,name:"bind",arg:Mr("style",!0,M.loc),exp:bye(M.value.content,M.loc),modifiers:[],loc:M.loc})})},bye=(x,M)=>{const k=ohe(x);return Mr(JSON.stringify(k),!1,M,3)};function Xc(x,M){return ho(x,M)}const Cye={X_V_HTML_NO_EXPRESSION:53,53:"X_V_HTML_NO_EXPRESSION",X_V_HTML_WITH_CHILDREN:54,54:"X_V_HTML_WITH_CHILDREN",X_V_TEXT_NO_EXPRESSION:55,55:"X_V_TEXT_NO_EXPRESSION",X_V_TEXT_WITH_CHILDREN:56,56:"X_V_TEXT_WITH_CHILDREN",X_V_MODEL_ON_INVALID_ELEMENT:57,57:"X_V_MODEL_ON_INVALID_ELEMENT",X_V_MODEL_ARG_ON_ELEMENT:58,58:"X_V_MODEL_ARG_ON_ELEMENT",X_V_MODEL_ON_FILE_INPUT_ELEMENT:59,59:"X_V_MODEL_ON_FILE_INPUT_ELEMENT",X_V_MODEL_UNNECESSARY_VALUE:60,60:"X_V_MODEL_UNNECESSARY_VALUE",X_V_SHOW_NO_EXPRESSION:61,61:"X_V_SHOW_NO_EXPRESSION",X_TRANSITION_INVALID_CHILDREN:62,62:"X_TRANSITION_INVALID_CHILDREN",X_IGNORED_SIDE_EFFECT_TAG:63,63:"X_IGNORED_SIDE_EFFECT_TAG",__EXTEND_POINT__:64,64:"__EXTEND_POINT__"},_ye={53:"v-html is missing expression.",54:"v-html will override element children.",55:"v-text is missing expression.",56:"v-text will override element children.",57:"v-model can only be used on <input>, <textarea> and <select> elements.",58:"v-model argument is not supported on plain elements.",59:"v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.",60:"Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.",61:"v-show is missing expression.",62:"<Transition> expects exactly one child element or component.",63:"Tags with side effect (<script> and <style>) are ignored in client component templates."},Sye=(x,M,k)=>{const{exp:F,loc:B}=x;return F||k.onError(Xc(53,B)),M.children.length&&(k.onError(Xc(54,B)),M.children.length=0),{props:[Vo(Mr("innerHTML",!0,B),F||Mr("",!0))]}},Iye=(x,M,k)=>{const{exp:F,loc:B}=x;return F||k.onError(Xc(55,B)),M.children.length&&(k.onError(Xc(56,B)),M.children.length=0),{props:[Vo(Mr("textContent",!0),F?Il(F,k)>0?F:aa(k.helperString(Sb),[F],B):Mr("",!0))]}},xye=(x,M,k)=>{const F=MF(x,M,k);if(!F.props.length||M.tagType===1)return F;x.arg&&k.onError(Xc(58,x.arg.loc));const{tag:B}=M,G=k.isCustomElement(B);if(B==="input"||B==="textarea"||B==="select"||G){let E=NF,A=!1;if(B==="input"||G){const u=xb(M,"type");if(u){if(u.type===7)E=px;else if(u.value)switch(u.value.content){case"radio":E=DF;break;case"checkbox":E=OF;break;case"file":A=!0,k.onError(Xc(59,x.loc));break}}else YQ(M)&&(E=px)}else B==="select"&&(E=PF);A||(F.needRuntime=k.helper(E))}else k.onError(Xc(57,x.loc));return F.props=F.props.filter(E=>!(E.key.type===4&&E.key.content==="modelValue")),F},Tye=mx("passive,once,capture"),kye=mx("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),Rye=mx("left,right"),E3=mx("onkeyup,onkeydown,onkeypress"),Eye=(x,M,k,F)=>{const B=[],G=[],E=[];for(let A=0;A<M.length;A++){const u=M[A].content;u==="native"&&qm("COMPILER_V_ON_NATIVE",k)||Tye(u)?E.push(u):Rye(u)?el(x)?E3(x.content.toLowerCase())?B.push(u):G.push(u):(B.push(u),G.push(u)):kye(u)?G.push(u):B.push(u)}return{keyModifiers:B,nonKeyModifiers:G,eventOptionModifiers:E}},rj=(x,M)=>el(x)&&x.content.toLowerCase()==="onclick"?Mr(M,!0):x.type!==4?Tu(["(",x,`) === "onClick" ? "${M}" : (`,x,")"]):x,Aye=(x,M,k)=>AF(x,M,k,F=>{const{modifiers:B}=x;if(!B.length)return F;let{key:G,value:E}=F.props[0];const{keyModifiers:A,nonKeyModifiers:u,eventOptionModifiers:o}=Eye(G,B,k,x.loc);if(u.includes("right")&&(G=rj(G,"onContextmenu")),u.includes("middle")&&(G=rj(G,"onMouseup")),u.length&&(E=aa(k.helper(BF),[E,JSON.stringify(u)])),A.length&&(!el(G)||E3(G.content.toLowerCase()))&&(E=aa(k.helper(LF),[E,JSON.stringify(A)])),o.length){const S=o.map(JJ).join("");G=el(G)?Mr(`${G.content}${S}`,!0):Tu(["(",G,`) + "${S}"`])}return{props:[Vo(G,E)]}}),Mye=(x,M,k)=>{const{exp:F,loc:B}=x;return F||k.onError(Xc(61,B)),{props:[],needRuntime:k.helper(FF)}},Dye=(x,M)=>{x.type===1&&x.tagType===0&&(x.tag==="script"||x.tag==="style")&&M.removeNode()},A3=[R3],M3={cloak:k3,html:Sye,text:Iye,model:xye,on:Aye,show:Mye};function Oye(x,M={}){return T3(x,Yc({},$F,M,{nodeTransforms:[Dye,...A3,...M.nodeTransforms||[]],directiveTransforms:Yc({},M3,M.directiveTransforms||{}),transformHoist:null}))}function Nye(x,M={}){return xF(x,Yc({},$F,M))}const Pye=Object.freeze(Object.defineProperty({__proto__:null,BASE_TRANSITION:fF,BindingTypes:yye,CAMELIZE:ux,CAPITALIZE:AQ,CREATE_BLOCK:gF,CREATE_COMMENT:Zm,CREATE_ELEMENT_BLOCK:pF,CREATE_ELEMENT_VNODE:Ex,CREATE_SLOTS:yF,CREATE_STATIC:mF,CREATE_TEXT:Ax,CREATE_VNODE:Rx,CompilerDeprecationTypes:eve,ConstantTypes:jme,DOMDirectiveTransforms:M3,DOMErrorCodes:Cye,DOMErrorMessages:_ye,DOMNodeTransforms:A3,ElementTypes:Gme,ErrorCodes:rve,FRAGMENT:Um,GUARD_REACTIVE_PROPS:Qm,IS_MEMO_SAME:wF,IS_REF:NQ,KEEP_ALIVE:cb,MERGE_PROPS:db,NORMALIZE_CLASS:Lx,NORMALIZE_PROPS:Gm,NORMALIZE_STYLE:Fx,Namespaces:Wme,NodeTypes:Ume,OPEN_BLOCK:af,POP_SCOPE_ID:DQ,PUSH_SCOPE_ID:MQ,RENDER_LIST:Bx,RENDER_SLOT:vF,RESOLVE_COMPONENT:Mx,RESOLVE_DIRECTIVE:Ox,RESOLVE_DYNAMIC_COMPONENT:Dx,RESOLVE_FILTER:Nx,SET_BLOCK_TRACKING:fb,SUSPENSE:kx,TELEPORT:Hm,TO_DISPLAY_STRING:Sb,TO_HANDLERS:Vx,TO_HANDLER_KEY:hx,TRANSITION:VF,TRANSITION_GROUP:HF,TS_NODE_TYPES:$Q,UNREF:OQ,V_MODEL_CHECKBOX:OF,V_MODEL_DYNAMIC:px,V_MODEL_RADIO:DF,V_MODEL_SELECT:PF,V_MODEL_TEXT:NF,V_ON_WITH_KEYS:LF,V_ON_WITH_MODIFIERS:BF,V_SHOW:FF,WITH_CTX:Hx,WITH_DIRECTIVES:Px,WITH_MEMO:$x,advancePositionWithClone:_ve,advancePositionWithMutation:qQ,assert:Sve,baseCompile:T3,baseParse:xF,buildDirectiveArgs:S3,buildProps:EF,buildSlots:y3,checkCompatEnabled:qm,compile:Oye,convertToBlock:zx,createArrayExpression:rf,createAssignmentExpression:Xme,createBlockStatement:FQ,createCacheExpression:LQ,createCallExpression:aa,createCompilerError:ho,createCompoundExpression:Tu,createConditionalExpression:cx,createDOMCompilerError:Xc,createForLoopParams:fx,createFunctionExpression:kg,createIfStatement:Kme,createInterpolation:qme,createObjectExpression:ql,createObjectProperty:Vo,createReturnStatement:Zme,createRoot:BQ,createSequenceExpression:Jme,createSimpleExpression:Mr,createStructuralDirectiveTransform:TF,createTemplateLiteral:Yme,createTransformContext:a3,createVNodeCall:jm,errorMessages:ive,extractIdentifiers:qc,findDir:Sl,findProp:xb,forAliasRE:JQ,generate:u3,generateCodeFrame:ahe,getBaseTransformPreset:x3,getConstantType:Il,getMemoedVNodeCall:XQ,getVNodeBlockHelper:Eg,getVNodeHelper:Rg,hasDynamicKeyVBind:YQ,hasScopeRef:oh,helperNameMap:Tg,injectProp:pb,isCoreComponent:CF,isFnExpression:jQ,isFnExpressionBrowser:GQ,isFnExpressionNode:Cve,isFunctionType:fve,isInDestructureAssignment:sve,isInNewExpression:lve,isMemberExpression:_F,isMemberExpressionBrowser:UQ,isMemberExpressionNode:wve,isReferencedIdentifier:ave,isSimpleIdentifier:Ib,isSlotOutlet:gb,isStaticArgOf:tf,isStaticExp:el,isStaticProperty:HQ,isStaticPropertyKey:gve,isTemplateNode:Ym,isText:jI,isVSlot:SF,locStub:va,noopDirectiveTransform:k3,parse:Nye,parserOptions:$F,processExpression:XI,processFor:m3,processIf:f3,processSlotOutlet:I3,registerRuntimeHelpers:PQ,resolveComponentType:_3,stringifyExpression:d3,toValidAssetId:Km,trackSlotScopes:v3,trackVForSlotScopes:sye,transform:s3,transformBind:g3,transformElement:C3,transformExpression:nye,transformModel:MF,transformOn:AF,transformStyle:R3,traverseNode:Tb,unwrapTSNode:zQ,walkBlockDeclarations:hve,walkFunctionParams:uve,walkIdentifiers:ove,warnDeprecation:nve},Symbol.toStringTag,{value:"Module"})),Bye=sf(Pye),Lye=sf(she),Fye=sf(lhe);/**
* vue v3.5.12
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/var ij;function Vye(){return ij||(ij=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Bye,k=Lye,F=Fye;function B(u){var o=Object.create(null);if(u)for(var S in u)o[S]=u[S];return o.default=u,Object.freeze(o)}var G=B(k);const E=Object.create(null);function A(u,o){if(!F.isString(u))if(u.nodeType)u=u.innerHTML;else return F.NOOP;const S=F.genCacheKey(u,o),_=E[S];if(_)return _;if(u[0]==="#"){const d=document.querySelector(u);u=d?d.innerHTML:""}const p=F.extend({hoistStatic:!0,onError:void 0,onWarn:F.NOOP},o);!p.isCustomElement&&typeof customElements<"u"&&(p.isCustomElement=d=>!!customElements.get(d));const{code:f}=M.compile(u,p),y=new Function("Vue",f)(G);return y._rc=!0,E[S]=y}k.registerRuntimeCompiler(A),x.compile=A,Object.keys(k).forEach(function(u){u!=="default"&&!Object.prototype.hasOwnProperty.call(x,u)&&(x[u]=k[u])})}(TN)),TN}var oj;function ht(){return oj||(oj=1,xN.exports=Vye()),xN.exports}var RN={},dg={},aj;function Og(){if(aj)return dg;aj=1,Object.defineProperty(dg,"__esModule",{value:!0});const x=!1,M=!1,k=!1,F="10.17.0";return dg.__DEV__=x,dg.__E2E__=k,dg.__TEST__=M,dg.__VERSION__=F,dg}var EN={},fg={},sj;function Xn(){if(sj)return fg;sj=1,Object.defineProperty(fg,"__esModule",{value:!0});const x={mounted:"mounted",updated:"updated",unmounted:"unmounted"};function M(B){return B}const k={beforeUnmount:"beforeUnmount",unmounted:"unmounted"},F=B=>B.config.globalProperties;return fg.componentHooks=k,fg.defineDirective=M,fg.directiveHooks=x,fg.getGlobalProperties=F,fg}var AN={},Hr={},lj;function Kt(){if(lj)return Hr;lj=1,Object.defineProperty(Hr,"__esModule",{value:!0});function x(J,q){q=q.replace(/\[(\w+)\]/g,".$1"),q=q.replace(/^\./,"");const te=q.split(".");for(let re=0,ie=te.length;re<ie;++re){const ne=te[re];if(ne in J)J=J[ne];else return}return J}function M(J){let q=window[`page${J?"Y":"X"}Offset`];const te=`scroll${J?"Top":"Left"}`;if(typeof q!="number"){const re=window.document;q=re.documentElement[te],typeof q!="number"&&(q=re.body[te])}return q}function k(J){let q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:document.body;const te={top:J.clientTop,left:J.clientLeft};return F(J.getBoundingClientRect(),te,q)}function F(J,q){let te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:document.body;const re=te.getBoundingClientRect();let ie,ne;return te===document.body?(ie=M(!0),ne=M()):(ie=te.scrollTop-re.top,ne=te.scrollLeft-re.left),{top:J.top+ie,left:J.left+ne,right:J.right+ne,bottom:J.bottom+ie}}function B(J,q){return J.hasOwnProperty.call(J,q)}function G(J,q){for(let te=0,re=J.length;te<re;te++)if(J[te]==q)return!0;return!1}function E(J){return typeof J=="string"}function A(J){return Object.prototype.toString.call(J)==="[object Function]"||Object.prototype.toString.call(J)==="[object AsyncFunction]"}function u(J){return!!J&&Object.prototype.toString.call(J)==="[object Object]"}function o(J){return typeof J=="boolean"}function S(J){return typeof J=="number"}function _(J){return S(J)?!0:E(J)?parseInt(J,10).toString().padStart(J.length,"0")===J:!1}function p(J){const q=parseInt(J,10);return O(q)?0:q}function f(J){return/[\d.\-+]+\s*([^\d]+)/.test(J)}function y(J){let q,te;return!(u(J)===!1||(q=J.constructor,typeof q!="function")||(te=q.prototype,u(te)===!1)||Object.prototype.hasOwnProperty.call(te,"isPrototypeOf")===!1)}function d(J){return J instanceof DOMRect}function v(J){return typeof J<"u"}function b(J){return E(J)&&J.trim().length===0}function s(J){return E(J)&&J.trim().length>0}function l(J){return J&&J.nodeType===1&&toString.call(J).indexOf("Element")>-1}function w(J){return Array.isArray(J)&&J.length>0}function I(J){return Array.isArray(J)}function C(J){return y(J)&&(!!J.template||A(J.render)||s(J.el)||l(J.el)||C(J.extends)||!!(J.mixins&&w(J.mixins)&&J.mixins.some(q=>C(q))))}function h(J){return"$"in J}function c(J,q){for(q&&!E(q)&&q.name&&(q=q.name);J;){if("$options"in J&&J.$options.name==q||"name"in J&&J.name===q)return!0;if("$options"in J&&J.$options.extends)J=J.$options.extends;else return!1}return!1}function m(J){return typeof J=="object"&&J!==null}function T(J){return Object.prototype.toString.apply(J)==="[object Date]"}function D(J,q){if(typeof J!=typeof q)return!1;if(T(J)||T(q))return!T(q)||!T(J)?!1:J.getTime()===q.getTime();if(m(J)&&m(q)){const te=Object.keys(J),re=Object.keys(q);if(te.length!==re.length)return!1;for(const ie of te)if(Object.prototype.hasOwnProperty.call(q,ie)){if(D(J[ie],q[ie])===!1)return!1}else return!1;return!0}return J===q}function O(J){return Number.isNaN(J)}function N(){}function z(J,q,te){const re=Math.min(q,te),ie=Math.max(q,te);return Math.min(Math.max(J,re),ie)}function H(J){for(var q=arguments.length,te=new Array(q>1?q-1:0),re=1;re<q;re++)te[re-1]=arguments[re];if(te.length===1&&y(te[0])){const ie=te[0];return J.replace(/\${(\w+)}/g,(ne,le)=>ie[le]??ne)}return J.replace(/\{(\d+)\}/g,(ie,ne)=>te[ne])}function $(J,q){const te=J.getBoundingClientRect(),re=q.getBoundingClientRect();return te.top<re.top||te.bottom>re.bottom||te.right>re.right||te.left<re.left}function V(J,q,te){return(J-q)/(te-q)}function P(J){return A(J)&&"componentName"in J?J.componentName:"name"in J?J.name:J.$options.name}const U={render(){return null}};function Y(J){const q=function(ne){if(/^\[[^\]]+\]\(/.test(ne)){const le=/^\[([^\]]+)\]/.exec(ne);if(le)return le[1]}return ne},te=/[\s·/_\\,:;.()[\]]+/g,re=/&/g,ie=/--+/g;return J=q(J),J=J.toLowerCase(),J=J.split(" ").join("-"),J=J.split(/\t/).join("--"),J=J.split(/<\/?[^>]+>/).join(""),J=J.split(/[|$&`~=\\/@+*!?({[\]})<>=.,;:'"^]/).join(""),J=J.split(/[。?!,、;:“”【】()〔〕[]﹃﹄“ ”‘’﹁﹂—…-~《》〈〉「」]/).join(""),J=J.replace(te,"-").replace(re,"-and-").replace(ie,"-"),J}function Z(J,q){const te=J.indexOf(q);return te>=0&&J.splice(te,1),J}function X(J){return new Promise(q=>{setTimeout(q,J)})}return Hr.arrayHas=G,Hr.clampValue=z,Hr.formatString=H,Hr.getComponentName=P,Hr.getOffset=k,Hr.getOffsetByRect=F,Hr.getPropByString=x,Hr.getScroll=M,Hr.hasOwn=B,Hr.isArray=I,Hr.isBoolean=o,Hr.isDOMRect=d,Hr.isDate=T,Hr.isDefined=v,Hr.isElement=l,Hr.isEmptyString=b,Hr.isEqual=D,Hr.isExtendVueComponent=c,Hr.isFunction=A,Hr.isNaN=O,Hr.isNonEmptyArray=w,Hr.isNonEmptyString=s,Hr.isNumber=S,Hr.isNumberLike=_,Hr.isNumberUnit=f,Hr.isObject=u,Hr.isObjectLike=m,Hr.isOutOf=$,Hr.isPlainObject=y,Hr.isString=E,Hr.isVueComponent=C,Hr.isVueInstance=h,Hr.noop=N,Hr.normalize=V,Hr.removeItems=Z,Hr.sleep=X,Hr.slugify=Y,Hr.tryParseInt=p,Hr.voidElement=U,Hr}var X1={},uj;function rl(){if(uj)return X1;uj=1,Object.defineProperty(X1,"__esModule",{value:!0});const x=typeof window>"u";return X1.isServer=x,X1}var hj;function ci(){return hj||(hj=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Kt(),k=rl(),F=ht();function B(E){return M.isEmptyString(E)||!M.isDefined(E)}var G=F.defineComponent({beforeCreate(){this.$i18n?this._i18n=this.$i18n:this._i18n=function(E,A){let u="";return k.isServer||(window&&window._T&&(u=window._T(E,A)),B(u)&&(u=`${E}:${A}`)),u}}});x.default=G}(AN)),AN}var MN={},zc={},qw={},gg={},cj;function Hye(){if(cj)return gg;cj=1,Object.defineProperty(gg,"__esModule",{value:!0}),gg.VueInstance=void 0;let x="v";function M(k){gg.VueInstance=k}return gg.componentNamePrefix=x,gg.setVueInstance=M,gg}var dj;function gn(){if(dj)return qw;dj=1,Object.defineProperty(qw,"__esModule",{value:!0});var x=Hye(),M=Kt();return qw.makePlugin=void 0,qw.makePlugin=function(){let{components:k=[]}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},F=arguments.length>1?arguments[1]:void 0;return{install:function B(G){if(!B.installed){if(k=M.isArray(k)?k:[k],k){for(const o of k)if(o){const S=`${x.componentNamePrefix}${M.getComponentName(o)}`;G.component(S)||G.component(S,o)}}for(var E=arguments.length,A=new Array(E>1?E-1:0),u=1;u<E;u++)A[u-1]=arguments[u];F?.(G,...A)}}}},qw}var bl={},fj;function Ur(){if(fj)return bl;fj=1,Object.defineProperty(bl,"__esModule",{value:!0});var x=Og();function M(){return/jsDebug=script/.test(window.location.search)||x.__DEV__}function k(f,y,d){return G(`'${f}' is deprecated, use '${y}' instead.`,d)}function F(){console.log(...arguments)}function B(f,y){console.table(f,y)}function G(f,y){x.__TEST__?u(`[DEPRECATED] ${f}`,y):M()?o(`[DEPRECATED] ${f}`,y):S(`[DEPRECATED] ${f}`,y)}function E(f,y){if(M()){for(var d=arguments.length,v=new Array(d>2?d-2:0),b=2;b<d;b++)v[b-2]=arguments[b];o(`${f}`,y,...v)}}function A(f,y){if(M()){for(var d=arguments.length,v=new Array(d>2?d-2:0),b=2;b<d;b++)v[b-2]=arguments[b];S(`${f}`,y,...v)}}function u(f,y){for(var d=arguments.length,v=new Array(d>2?d-2:0),b=2;b<d;b++)v[b-2]=arguments[b];console.log(_(f,y),...v)}function o(f,y){for(var d=arguments.length,v=new Array(d>2?d-2:0),b=2;b<d;b++)v[b-2]=arguments[b];console.error(_(f,y),...v)}function S(f,y){for(var d=arguments.length,v=new Array(d>2?d-2:0),b=2;b<d;b++)v[b-2]=arguments[b];console.warn(_(f,y),...v)}function _(f,y){return`[SynoVueComponents] ${f}`+(y?p():"")}function p(f){return""}return bl.consoleError=o,bl.consoleLog=u,bl.consoleWarn=S,bl.deprecate=k,bl.deprecateMessage=G,bl.generateComponentTrace=p,bl.isDebug=M,bl.log=F,bl.remind=E,bl.remindWarn=A,bl.tableLog=B,bl}var J1={},Z1={},Yw={},gj;function D3(){if(gj)return Yw;gj=1,Object.defineProperty(Yw,"__esModule",{value:!0});var x=ht();function M(F,B,G){F.provide(B,G)}function k(F,B){return x.inject(F)}return Yw.inject=k,Yw.provide=M,Yw}var pj;function O3(){if(pj)return Z1;pj=1,Object.defineProperty(Z1,"__esModule",{value:!0});var x=D3();function M(k,F,B){return x.provide(k,B,F),()=>x.inject(B)}return Z1.makeInject=M,Z1}var mj;function ed(){if(mj)return J1;mj=1,Object.defineProperty(J1,"__esModule",{value:!0});var x=O3(),M=Xn();function k(F,B,G,E){const A=E??Symbol(B),u=x.makeInject(F,G,A),o=M.getGlobalProperties(F);return o&&(o[B]=G),u}return J1.makeManager=k,J1}var Q1={},vj;function td(){if(vj)return Q1;vj=1,Object.defineProperty(Q1,"__esModule",{value:!0});var x=Og();function M(k){return x.__DEV__?Symbol(k):Symbol()}return Q1.makeSymbol=M,Q1}var yj;function zF(){if(yj)return zc;yj=1,Object.defineProperty(zc,"__esModule",{value:!0});var x=gn(),M=Ur(),k=ed(),F=td(),B=ht();const G={BKG:"bkg-img",SVG:"svg",FOLLOW_MANAGER:"follow-manager",UNKNOWN:"unknown"};class E{static icons=Object.create(null);static register(S,_){this.icons[S]=_}register(){E.register(...arguments)}constructor(){let{iconType:S=G.BKG,icons:_=[]}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Object.values(G).includes(S)||M.remind(`iconType ${S} is not valid type, please choose one of ${JSON.stringify(Object.values(G))}`),this.info=B.reactive({iconType:G.UNKNOWN}),this.registerIcons=_,this.registered=!1,this.iconType=S}set iconType(S){if(this.info.iconType=S,S===G.SVG&&!this.registered){for(const _ of this.registerIcons)this.register(_.name,_.component);this.registered=!0}}get iconType(){return this.info.iconType}get(S){if(S)return E.icons[S]}get icons(){return E.icons}}const A=F.makeSymbol("iconManager");zc.useIconManager=()=>{M.consoleError("you are not install IconManagerPlugin yet, please install it first")};const u=x.makePlugin({},function(o){let S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};zc.useIconManager=k.makeManager(o,"$iconManager",new E(S),A)});return zc.ICON_TYPE=G,zc.IconManager=E,zc.IconManagerPlugin=u,zc.iconSymbol=A,zc}var DN={},ON={},eS={},Kw={},wj;function fr(){if(wj)return Kw;wj=1,Object.defineProperty(Kw,"__esModule",{value:!0});var x=Kt(),M=ht();function k(B){let G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return M.defineComponent({provide(){const E=G.reduce((A,u)=>{let o,S;return x.isObject(u)?(o=u.expose,S=u.internal):(o=u,S=u),A[o]=this[S],A},{});return{[B]:{register:this.register,unregister:this.unregister,instance:this,...E}}},data:()=>({}),methods:{register:x.noop,unregister:x.noop}})}function F(B){return M.defineComponent({inject:{[B]:{default:x.noop}},data:()=>({})})}return Kw.inject=F,Kw.provide=k,Kw}var sb={exports:{}};/**
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/var $ye=sb.exports,bj;function _i(){return bj||(bj=1,function(x,M){(function(){var k,F="4.17.21",B=200,G="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",E="Expected a function",A="Invalid `variable` option passed into `_.template`",u="__lodash_hash_undefined__",o=500,S="__lodash_placeholder__",_=1,p=2,f=4,y=1,d=2,v=1,b=2,s=4,l=8,w=16,I=32,C=64,h=128,c=256,m=512,T=30,D="...",O=800,N=16,z=1,H=2,$=3,V=1/0,P=9007199254740991,U=17976931348623157e292,Y=NaN,Z=4294967295,X=Z-1,J=Z>>>1,q=[["ary",h],["bind",v],["bindKey",b],["curry",l],["curryRight",w],["flip",m],["partial",I],["partialRight",C],["rearg",c]],te="[object Arguments]",re="[object Array]",ie="[object AsyncFunction]",ne="[object Boolean]",le="[object Date]",fe="[object DOMException]",we="[object Error]",pe="[object Function]",ve="[object GeneratorFunction]",be="[object Map]",Ee="[object Number]",Re="[object Null]",Ne="[object Object]",Le="[object Promise]",Se="[object Proxy]",Ie="[object RegExp]",_e="[object Set]",Ae="[object String]",ue="[object Symbol]",ke="[object Undefined]",Pe="[object WeakMap]",Ve="[object WeakSet]",je="[object ArrayBuffer]",it="[object DataView]",rt="[object Float32Array]",mt="[object Float64Array]",yt="[object Int8Array]",st="[object Int16Array]",Qe="[object Int32Array]",At="[object Uint8Array]",Xt="[object Uint8ClampedArray]",cn="[object Uint16Array]",Sn="[object Uint32Array]",Vn=/\b__p \+= '';/g,bn=/\b(__p \+=) '' \+/g,En=/(__e\(.*?\)|\b__t\)) \+\n'';/g,pn=/&(?:amp|lt|gt|quot|#39);/g,Un=/[&<>"']/g,Pn=RegExp(pn.source),On=RegExp(Un.source),Ht=/<%-([\s\S]+?)%>/g,Mt=/<%([\s\S]+?)%>/g,Gt=/<%=([\s\S]+?)%>/g,Bt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ge=/^\w*$/,et=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,vt=/[\\^$.*+?()[\]{}|]/g,wt=RegExp(vt.source),Ct=/^\s+/,bt=/\s/,Rt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Lt=/\{\n\/\* \[wrapped with (.+)\] \*/,Dt=/,? & /,Jt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,zt=/[()=,{}\[\]\/\s]/,nn=/\\(\\)?/g,An=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,lr=/\w*$/,$r=/^[-+]0x[0-9a-f]+$/i,ri=/^0b[01]+$/i,zi=/^\[object .+?Constructor\]$/,ba=/^0o[0-7]+$/i,Ro=/^(?:0|[1-9]\d*)$/,no=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,il=/($^)/,Rl=/['\n\r\u2028\u2029\\]/g,Fa="\\ud800-\\udfff",Va="\\u0300-\\u036f",Au="\\ufe20-\\ufe2f",us="\\u20d0-\\u20ff",ea=Va+Au+us,Ha="\\u2700-\\u27bf",Mu="a-z\\xdf-\\xf6\\xf8-\\xff",hh="\\xac\\xb1\\xd7\\xf7",Du="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",qi="\\u2000-\\u206f",$a=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",hs="A-Z\\xc0-\\xd6\\xd8-\\xde",ch="\\ufe0e\\ufe0f",di=hh+Du+qi+$a,za="['’]",Bs="["+Fa+"]",Ls="["+di+"]",Eo="["+ea+"]",ol="\\d+",al="["+Ha+"]",Fs="["+Mu+"]",Wa="[^"+Fa+di+ol+Ha+Mu+hs+"]",Jl="\\ud83c[\\udffb-\\udfff]",uc="(?:"+Eo+"|"+Jl+")",sl="[^"+Fa+"]",Ou="(?:\\ud83c[\\udde6-\\uddff]){2}",El="[\\ud800-\\udbff][\\udc00-\\udfff]",Al="["+hs+"]",Vs="\\u200d",Or="(?:"+Fs+"|"+Wa+")",dh="(?:"+Al+"|"+Wa+")",fh="(?:"+za+"(?:d|ll|m|re|s|t|ve))?",fi="(?:"+za+"(?:D|LL|M|RE|S|T|VE))?",Ao=uc+"?",Zl="["+ch+"]?",od="(?:"+Vs+"(?:"+[sl,Ou,El].join("|")+")"+Zl+Ao+")*",Ql="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",hc="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",cs=Zl+Ao+od,Nu="(?:"+[al,Ou,El].join("|")+")"+cs,ll="(?:"+[sl+Eo+"?",Eo,Ou,El,Bs].join("|")+")",Ca=RegExp(za,"g"),cc=RegExp(Eo,"g"),Pu=RegExp(Jl+"(?="+Jl+")|"+ll+cs,"g"),gh=RegExp([Al+"?"+Fs+"+"+fh+"(?="+[Ls,Al,"$"].join("|")+")",dh+"+"+fi+"(?="+[Ls,Al+Or,"$"].join("|")+")",Al+"?"+Or+"+"+fh,Al+"+"+fi,hc,Ql,ol,Nu].join("|"),"g"),dc=RegExp("["+Vs+Fa+ea+ch+"]"),yo=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Zr=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],_a=-1,ii={};ii[rt]=ii[mt]=ii[yt]=ii[st]=ii[Qe]=ii[At]=ii[Xt]=ii[cn]=ii[Sn]=!0,ii[te]=ii[re]=ii[je]=ii[ne]=ii[it]=ii[le]=ii[we]=ii[pe]=ii[be]=ii[Ee]=ii[Ne]=ii[Ie]=ii[_e]=ii[Ae]=ii[Pe]=!1;var Qr={};Qr[te]=Qr[re]=Qr[je]=Qr[it]=Qr[ne]=Qr[le]=Qr[rt]=Qr[mt]=Qr[yt]=Qr[st]=Qr[Qe]=Qr[be]=Qr[Ee]=Qr[Ne]=Qr[Ie]=Qr[_e]=Qr[Ae]=Qr[ue]=Qr[At]=Qr[Xt]=Qr[cn]=Qr[Sn]=!0,Qr[we]=Qr[pe]=Qr[Pe]=!1;var eu={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},ph={"&":"&","<":"<",">":">",'"':""","'":"'"},mh={"&":"&","<":"<",">":">",""":'"',"'":"'"},Ml={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},fc=parseFloat,gc=parseInt,pc=typeof _l=="object"&&_l&&_l.Object===Object&&_l,wo=typeof self=="object"&&self&&self.Object===Object&&self,zr=pc||wo||Function("return this")(),Ua=M&&!M.nodeType&&M,la=Ua&&!0&&x&&!x.nodeType&&x,Ga=la&&la.exports===Ua,Sa=Ga&&pc.process,Mo=function(){try{var nt=la&&la.require&&la.require("util").types;return nt||Sa&&Sa.binding&&Sa.binding("util")}catch{}}(),ds=Mo&&Mo.isArrayBuffer,fs=Mo&&Mo.isDate,Dl=Mo&&Mo.isMap,gr=Mo&&Mo.isRegExp,Xe=Mo&&Mo.isSet,co=Mo&&Mo.isTypedArray;function Do(nt,_t,ft){switch(ft.length){case 0:return nt.call(_t);case 1:return nt.call(_t,ft[0]);case 2:return nt.call(_t,ft[0],ft[1]);case 3:return nt.call(_t,ft[0],ft[1],ft[2])}return nt.apply(_t,ft)}function ot(nt,_t,ft,Ot){for(var Yt=-1,Cn=nt==null?0:nt.length;++Yt<Cn;){var Fn=nt[Yt];_t(Ot,Fn,ft(Fn),nt)}return Ot}function It(nt,_t){for(var ft=-1,Ot=nt==null?0:nt.length;++ft<Ot&&_t(nt[ft],ft,nt)!==!1;);return nt}function mc(nt,_t){for(var ft=nt==null?0:nt.length;ft--&&_t(nt[ft],ft,nt)!==!1;);return nt}function Bu(nt,_t){for(var ft=-1,Ot=nt==null?0:nt.length;++ft<Ot;)if(!_t(nt[ft],ft,nt))return!1;return!0}function gs(nt,_t){for(var ft=-1,Ot=nt==null?0:nt.length,Yt=0,Cn=[];++ft<Ot;){var Fn=nt[ft];_t(Fn,ft,nt)&&(Cn[Yt++]=Fn)}return Cn}function ps(nt,_t){var ft=nt==null?0:nt.length;return!!ft&&Pl(nt,_t,0)>-1}function vh(nt,_t,ft){for(var Ot=-1,Yt=nt==null?0:nt.length;++Ot<Yt;)if(ft(_t,nt[Ot]))return!0;return!1}function Wn(nt,_t){for(var ft=-1,Ot=nt==null?0:nt.length,Yt=Array(Ot);++ft<Ot;)Yt[ft]=_t(nt[ft],ft,nt);return Yt}function ua(nt,_t){for(var ft=-1,Ot=_t.length,Yt=nt.length;++ft<Ot;)nt[Yt+ft]=_t[ft];return nt}function ja(nt,_t,ft,Ot){var Yt=-1,Cn=nt==null?0:nt.length;for(Ot&&Cn&&(ft=nt[++Yt]);++Yt<Cn;)ft=_t(ft,nt[Yt],Yt,nt);return ft}function Pi(nt,_t,ft,Ot){var Yt=nt==null?0:nt.length;for(Ot&&Yt&&(ft=nt[--Yt]);Yt--;)ft=_t(ft,nt[Yt],Yt,nt);return ft}function ms(nt,_t){for(var ft=-1,Ot=nt==null?0:nt.length;++ft<Ot;)if(_t(nt[ft],ft,nt))return!0;return!1}var Yi=Fu("length");function Ol(nt){return nt.split("")}function Nl(nt){return nt.match(Jt)||[]}function Bi(nt,_t,ft){var Ot;return ft(nt,function(Yt,Cn,Fn){if(_t(Yt,Cn,Fn))return Ot=Cn,!1}),Ot}function Lu(nt,_t,ft,Ot){for(var Yt=nt.length,Cn=ft+(Ot?1:-1);Ot?Cn--:++Cn<Yt;)if(_t(nt[Cn],Cn,nt))return Cn;return-1}function Pl(nt,_t,ft){return _t===_t?Rr(nt,_t,ft):Lu(nt,tu,ft)}function ul(nt,_t,ft,Ot){for(var Yt=ft-1,Cn=nt.length;++Yt<Cn;)if(Ot(nt[Yt],_t))return Yt;return-1}function tu(nt){return nt!==nt}function Ia(nt,_t){var ft=nt==null?0:nt.length;return ft?ta(nt,_t)/ft:Y}function Fu(nt){return function(_t){return _t==null?k:_t[nt]}}function vs(nt){return function(_t){return nt==null?k:nt[_t]}}function Ki(nt,_t,ft,Ot,Yt){return Yt(nt,function(Cn,Fn,kn){ft=Ot?(Ot=!1,Cn):_t(ft,Cn,Fn,kn)}),ft}function mi(nt,_t){var ft=nt.length;for(nt.sort(_t);ft--;)nt[ft]=nt[ft].value;return nt}function ta(nt,_t){for(var ft,Ot=-1,Yt=nt.length;++Ot<Yt;){var Cn=_t(nt[Ot]);Cn!==k&&(ft=ft===k?Cn:ft+Cn)}return ft}function na(nt,_t){for(var ft=-1,Ot=Array(nt);++ft<nt;)Ot[ft]=_t(ft);return Ot}function ge(nt,_t){return Wn(_t,function(ft){return[ft,nt[ft]]})}function ae(nt){return nt&&nt.slice(0,_r(nt)+1).replace(Ct,"")}function de(nt){return function(_t){return nt(_t)}}function Ce(nt,_t){return Wn(_t,function(ft){return nt[ft]})}function De(nt,_t){return nt.has(_t)}function He(nt,_t){for(var ft=-1,Ot=nt.length;++ft<Ot&&Pl(_t,nt[ft],0)>-1;);return ft}function Ye(nt,_t){for(var ft=nt.length;ft--&&Pl(_t,nt[ft],0)>-1;);return ft}function ut(nt,_t){for(var ft=nt.length,Ot=0;ft--;)nt[ft]===_t&&++Ot;return Ot}var dt=vs(eu),Nt=vs(ph);function tn(nt){return"\\"+Ml[nt]}function qt(nt,_t){return nt==null?k:nt[_t]}function Vt(nt){return dc.test(nt)}function Mn(nt){return yo.test(nt)}function Bn(nt){for(var _t,ft=[];!(_t=nt.next()).done;)ft.push(_t.value);return ft}function Kn(nt){var _t=-1,ft=Array(nt.size);return nt.forEach(function(Ot,Yt){ft[++_t]=[Yt,Ot]}),ft}function Jn(nt,_t){return function(ft){return nt(_t(ft))}}function vn(nt,_t){for(var ft=-1,Ot=nt.length,Yt=0,Cn=[];++ft<Ot;){var Fn=nt[ft];(Fn===_t||Fn===S)&&(nt[ft]=S,Cn[Yt++]=ft)}return Cn}function Nr(nt){var _t=-1,ft=Array(nt.size);return nt.forEach(function(Ot){ft[++_t]=Ot}),ft}function Jr(nt){var _t=-1,ft=Array(nt.size);return nt.forEach(function(Ot){ft[++_t]=[Ot,Ot]}),ft}function Rr(nt,_t,ft){for(var Ot=ft-1,Yt=nt.length;++Ot<Yt;)if(nt[Ot]===_t)return Ot;return-1}function si(nt,_t,ft){for(var Ot=ft+1;Ot--;)if(nt[Ot]===_t)return Ot;return Ot}function Wr(nt){return Vt(nt)?Li(nt):Yi(nt)}function Pr(nt){return Vt(nt)?ro(nt):Ol(nt)}function _r(nt){for(var _t=nt.length;_t--&&bt.test(nt.charAt(_t)););return _t}var vi=vs(mh);function Li(nt){for(var _t=Pu.lastIndex=0;Pu.test(nt);)++_t;return _t}function ro(nt){return nt.match(Pu)||[]}function ur(nt){return nt.match(gh)||[]}var Dn=function nt(_t){_t=_t==null?zr:br.defaults(zr.Object(),_t,br.pick(zr,Zr));var ft=_t.Array,Ot=_t.Date,Yt=_t.Error,Cn=_t.Function,Fn=_t.Math,kn=_t.Object,hr=_t.RegExp,pr=_t.String,ir=_t.TypeError,Er=ft.prototype,oi=Cn.prototype,rn=kn.prototype,qn=_t["__core-js_shared__"],Ln=oi.toString,In=rn.hasOwnProperty,Gr=0,io=function(){var j=/[^.]+$/.exec(qn&&qn.keys&&qn.keys.IE_PROTO||"");return j?"Symbol(src)_1."+j:""}(),bo=rn.toString,Wi=Ln.call(kn),Fi=zr._,Hs=hr("^"+Ln.call(In).replace(vt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ra=Ga?_t.Buffer:k,Vi=_t.Symbol,qa=_t.Uint8Array,Ya=ra?ra.allocUnsafe:k,Gn=Jn(kn.getPrototypeOf,kn),Xi=kn.create,Ft=rn.propertyIsEnumerable,fo=Er.splice,hl=Vi?Vi.isConcatSpreadable:k,$o=Vi?Vi.iterator:k,ha=Vi?Vi.toStringTag:k,xa=function(){try{var j=_c(kn,"defineProperty");return j({},"",{}),j}catch{}}(),ad=_t.clearTimeout!==zr.clearTimeout&&_t.clearTimeout,ys=Ot&&Ot.now!==zr.Date.now&&Ot.now,Ji=_t.setTimeout!==zr.setTimeout&&_t.setTimeout,nu=Fn.ceil,pf=Fn.floor,iv=kn.getOwnPropertySymbols,Bl=ra?ra.isBuffer:k,$s=_t.isFinite,Pb=Er.join,IT=Jn(kn.keys,kn),zo=Fn.max,Oo=Fn.min,xT=Ot.now,TT=_t.parseInt,ov=Fn.random,ru=Er.reverse,ws=_c(_t,"DataView"),rr=_c(_t,"Map"),sd=_c(_t,"Promise"),iu=_c(_t,"Set"),yh=_c(_t,"WeakMap"),bs=_c(kn,"create"),ld=yh&&new yh,wh={},Fg=Th(ws),kT=Th(rr),RT=Th(sd),Bb=Th(iu),Lb=Th(yh),Vg=Vi?Vi.prototype:k,mf=Vg?Vg.valueOf:k,av=Vg?Vg.toString:k;function $e(j){if(ao(j)&&!Tr(j)&&!(j instanceof jr)){if(j instanceof cl)return j;if(In.call(j,"__wrapped__"))return S0(j)}return new cl(j)}var ud=function(){function j(){}return function(ee){if(!Gi(ee))return{};if(Xi)return Xi(ee);j.prototype=ee;var ce=new j;return j.prototype=k,ce}}();function Hg(){}function cl(j,ee){this.__wrapped__=j,this.__actions__=[],this.__chain__=!!ee,this.__index__=0,this.__values__=k}$e.templateSettings={escape:Ht,evaluate:Mt,interpolate:Gt,variable:"",imports:{_:$e}},$e.prototype=Hg.prototype,$e.prototype.constructor=$e,cl.prototype=ud(Hg.prototype),cl.prototype.constructor=cl;function jr(j){this.__wrapped__=j,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Z,this.__views__=[]}function Fb(){var j=new jr(this.__wrapped__);return j.__actions__=Ts(this.__actions__),j.__dir__=this.__dir__,j.__filtered__=this.__filtered__,j.__iteratees__=Ts(this.__iteratees__),j.__takeCount__=this.__takeCount__,j.__views__=Ts(this.__views__),j}function ET(){if(this.__filtered__){var j=new jr(this);j.__dir__=-1,j.__filtered__=!0}else j=this.clone(),j.__dir__*=-1;return j}function AT(){var j=this.__wrapped__.value(),ee=this.__dir__,ce=Tr(j),xe=ee<0,Be=ce?j.length:0,Ue=Mv(0,Be,this.__views__),Je=Ue.start,tt=Ue.end,ct=tt-Je,$t=xe?tt:Je-1,Wt=this.__iteratees__,Qt=Wt.length,Tn=0,Qn=Oo(ct,this.__takeCount__);if(!ce||!xe&&Be==ct&&Qn==ct)return yv(j,this.__actions__);var tr=[];e:for(;ct--&&Tn<Qn;){$t+=ee;for(var Fr=-1,cr=j[$t];++Fr<Qt;){var Kr=Wt[Fr],ni=Kr.iteratee,qs=Kr.type,es=ni(cr);if(qs==H)cr=es;else if(!es){if(qs==z)continue e;break e}}tr[Tn++]=cr}return tr}jr.prototype=ud(Hg.prototype),jr.prototype.constructor=jr;function vc(j){var ee=-1,ce=j==null?0:j.length;for(this.clear();++ee<ce;){var xe=j[ee];this.set(xe[0],xe[1])}}function MT(){this.__data__=bs?bs(null):{},this.size=0}function dl(j){var ee=this.has(j)&&delete this.__data__[j];return this.size-=ee?1:0,ee}function Vb(j){var ee=this.__data__;if(bs){var ce=ee[j];return ce===u?k:ce}return In.call(ee,j)?ee[j]:k}function yc(j){var ee=this.__data__;return bs?ee[j]!==k:In.call(ee,j)}function Hb(j,ee){var ce=this.__data__;return this.size+=this.has(j)?0:1,ce[j]=bs&&ee===k?u:ee,this}vc.prototype.clear=MT,vc.prototype.delete=dl,vc.prototype.get=Vb,vc.prototype.has=yc,vc.prototype.set=Hb;function Co(j){var ee=-1,ce=j==null?0:j.length;for(this.clear();++ee<ce;){var xe=j[ee];this.set(xe[0],xe[1])}}function oo(){this.__data__=[],this.size=0}function DT(j){var ee=this.__data__,ce=Vu(ee,j);if(ce<0)return!1;var xe=ee.length-1;return ce==xe?ee.pop():fo.call(ee,ce,1),--this.size,!0}function OT(j){var ee=this.__data__,ce=Vu(ee,j);return ce<0?k:ee[ce][1]}function vf(j){return Vu(this.__data__,j)>-1}function $g(j,ee){var ce=this.__data__,xe=Vu(ce,j);return xe<0?(++this.size,ce.push([j,ee])):ce[xe][1]=ee,this}Co.prototype.clear=oo,Co.prototype.delete=DT,Co.prototype.get=OT,Co.prototype.has=vf,Co.prototype.set=$g;function ca(j){var ee=-1,ce=j==null?0:j.length;for(this.clear();++ee<ce;){var xe=j[ee];this.set(xe[0],xe[1])}}function sv(){this.size=0,this.__data__={hash:new vc,map:new(rr||Co),string:new vc}}function $b(j){var ee=Af(this,j).delete(j);return this.size-=ee?1:0,ee}function Cs(j){return Af(this,j).get(j)}function yf(j){return Af(this,j).has(j)}function zg(j,ee){var ce=Af(this,j),xe=ce.size;return ce.set(j,ee),this.size+=ce.size==xe?0:1,this}ca.prototype.clear=sv,ca.prototype.delete=$b,ca.prototype.get=Cs,ca.prototype.has=yf,ca.prototype.set=zg;function bh(j){var ee=-1,ce=j==null?0:j.length;for(this.__data__=new ca;++ee<ce;)this.add(j[ee])}function hd(j){return this.__data__.set(j,u),this}function _s(j){return this.__data__.has(j)}bh.prototype.add=bh.prototype.push=hd,bh.prototype.has=_s;function Ta(j){var ee=this.__data__=new Co(j);this.size=ee.size}function zb(){this.__data__=new Co,this.size=0}function cd(j){var ee=this.__data__,ce=ee.delete(j);return this.size=ee.size,ce}function NT(j){return this.__data__.get(j)}function Wb(j){return this.__data__.has(j)}function PT(j,ee){var ce=this.__data__;if(ce instanceof Co){var xe=ce.__data__;if(!rr||xe.length<B-1)return xe.push([j,ee]),this.size=++ce.size,this;ce=this.__data__=new ca(xe)}return ce.set(j,ee),this.size=ce.size,this}Ta.prototype.clear=zb,Ta.prototype.delete=cd,Ta.prototype.get=NT,Ta.prototype.has=Wb,Ta.prototype.set=PT;function Ub(j,ee){var ce=Tr(j),xe=!ce&&Vl(j),Be=!ce&&!xe&&gu(j),Ue=!ce&&!xe&&!Be&&Tc(j),Je=ce||xe||Be||Ue,tt=Je?na(j.length,pr):[],ct=tt.length;for(var $t in j)(ee||In.call(j,$t))&&!(Je&&($t=="length"||Be&&($t=="offset"||$t=="parent")||Ue&&($t=="buffer"||$t=="byteLength"||$t=="byteOffset")||Uu($t,ct)))&&tt.push($t);return tt}function Wg(j){var ee=j.length;return ee?j[_n(0,ee-1)]:k}function BT(j,ee){return ip(Ts(j),Ch(ee,0,j.length))}function Ka(j){return ip(Ts(j))}function zs(j,ee,ce){(ce!==k&&!gl(j[ee],ce)||ce===k&&!(ee in j))&&Is(j,ee,ce)}function ou(j,ee,ce){var xe=j[ee];(!(In.call(j,ee)&&gl(xe,ce))||ce===k&&!(ee in j))&&Is(j,ee,ce)}function Vu(j,ee){for(var ce=j.length;ce--;)if(gl(j[ce][0],ee))return ce;return-1}function Gb(j,ee,ce,xe){return su(j,function(Be,Ue,Je){ee(xe,Be,ce(Be),Je)}),xe}function Ss(j,ee){return j&&uu(ee,ia(ee),j)}function wc(j,ee){return j&&uu(ee,Rs(ee),j)}function Is(j,ee,ce){ee=="__proto__"&&xa?xa(j,ee,{configurable:!0,enumerable:!0,value:ce,writable:!0}):j[ee]=ce}function wf(j,ee){for(var ce=-1,xe=ee.length,Be=ft(xe),Ue=j==null;++ce<xe;)Be[ce]=Ue?k:ay(j,ee[ce]);return Be}function Ch(j,ee,ce){return j===j&&(ce!==k&&(j=j<=ce?j:ce),ee!==k&&(j=j>=ee?j:ee)),j}function Ws(j,ee,ce,xe,Be,Ue){var Je,tt=ee&_,ct=ee&p,$t=ee&f;if(ce&&(Je=Be?ce(j,xe,Be,Ue):ce(j)),Je!==k)return Je;if(!Gi(j))return j;var Wt=Tr(j);if(Wt){if(Je=XT(j),!tt)return Ts(j,Je)}else{var Qt=xr(j),Tn=Qt==pe||Qt==ve;if(gu(j))return _v(j,tt);if(Qt==Ne||Qt==te||Tn&&!Be){if(Je=ct||Tn?{}:v0(j),!tt)return ct?zT(j,wc(Je,j)):$T(j,Ss(Je,j))}else{if(!Qr[Qt])return Be?j:{};Je=Ov(j,Qt,tt)}}Ue||(Ue=new Ta);var Qn=Ue.get(j);if(Qn)return Qn;Ue.set(j,Je),Z0(j)?j.forEach(function(cr){Je.add(Ws(cr,ee,ce,cr,j,Ue))}):Rh(j)&&j.forEach(function(cr,Kr){Je.set(Kr,Ws(cr,ee,ce,Kr,j,Ue))});var tr=$t?ct?kv:Tv:ct?Rs:ia,Fr=Wt?k:tr(j);return It(Fr||j,function(cr,Kr){Fr&&(Kr=cr,cr=j[Kr]),ou(Je,Kr,Ws(cr,ee,ce,Kr,j,Ue))}),Je}function lv(j){var ee=ia(j);return function(ce){return au(ce,j,ee)}}function au(j,ee,ce){var xe=ce.length;if(j==null)return!xe;for(j=kn(j);xe--;){var Be=ce[xe],Ue=ee[Be],Je=j[Be];if(Je===k&&!(Be in j)||!Ue(Je))return!1}return!0}function uv(j,ee,ce){if(typeof j!="function")throw new ir(E);return wd(function(){j.apply(k,ce)},ee)}function _h(j,ee,ce,xe){var Be=-1,Ue=ps,Je=!0,tt=j.length,ct=[],$t=ee.length;if(!tt)return ct;ce&&(ee=Wn(ee,de(ce))),xe?(Ue=vh,Je=!1):ee.length>=B&&(Ue=De,Je=!1,ee=new bh(ee));e:for(;++Be<tt;){var Wt=j[Be],Qt=ce==null?Wt:ce(Wt);if(Wt=xe||Wt!==0?Wt:0,Je&&Qt===Qt){for(var Tn=$t;Tn--;)if(ee[Tn]===Qt)continue e;ct.push(Wt)}else Ue(ee,Qt,xe)||ct.push(Wt)}return ct}var su=a0(Ll),hv=a0(Cf,!0);function Ug(j,ee){var ce=!0;return su(j,function(xe,Be,Ue){return ce=!!ee(xe,Be,Ue),ce}),ce}function bf(j,ee,ce){for(var xe=-1,Be=j.length;++xe<Be;){var Ue=j[xe],Je=ee(Ue);if(Je!=null&&(tt===k?Je===Je&&!js(Je):ce(Je,tt)))var tt=Je,ct=Ue}return ct}function jb(j,ee,ce,xe){var Be=j.length;for(ce=Br(ce),ce<0&&(ce=-ce>Be?0:Be+ce),xe=xe===k||xe>Be?Be:Br(xe),xe<0&&(xe+=Be),xe=ce>xe?0:tC(xe);ce<xe;)j[ce++]=ee;return j}function cv(j,ee){var ce=[];return su(j,function(xe,Be,Ue){ee(xe,Be,Ue)&&ce.push(xe)}),ce}function da(j,ee,ce,xe,Be){var Ue=-1,Je=j.length;for(ce||(ce=ZT),Be||(Be=[]);++Ue<Je;){var tt=j[Ue];ee>0&&ce(tt)?ee>1?da(tt,ee-1,ce,xe,Be):ua(Be,tt):xe||(Be[Be.length]=tt)}return Be}var Gg=ks(),qb=ks(!0);function Ll(j,ee){return j&&Gg(j,ee,ia)}function Cf(j,ee){return j&&qb(j,ee,ia)}function _f(j,ee){return gs(ee,function(ce){return ju(j[ce])})}function Sh(j,ee){ee=xs(ee,j);for(var ce=0,xe=ee.length;j!=null&&ce<xe;)j=j[hu(ee[ce++])];return ce&&ce==xe?j:k}function Yb(j,ee,ce){var xe=ee(j);return Tr(j)?xe:ua(xe,ce(j))}function Xa(j){return j==null?j===k?ke:Re:ha&&ha in kn(j)?YT(j):ok(j)}function Sf(j,ee){return j>ee}function Kb(j,ee){return j!=null&&In.call(j,ee)}function LT(j,ee){return j!=null&&ee in kn(j)}function dv(j,ee,ce){return j>=Oo(ee,ce)&&j<zo(ee,ce)}function fv(j,ee,ce){for(var xe=ce?vh:ps,Be=j[0].length,Ue=j.length,Je=Ue,tt=ft(Ue),ct=1/0,$t=[];Je--;){var Wt=j[Je];Je&&ee&&(Wt=Wn(Wt,de(ee))),ct=Oo(Wt.length,ct),tt[Je]=!ce&&(ee||Be>=120&&Wt.length>=120)?new bh(Je&&Wt):k}Wt=j[0];var Qt=-1,Tn=tt[0];e:for(;++Qt<Be&&$t.length<ct;){var Qn=Wt[Qt],tr=ee?ee(Qn):Qn;if(Qn=ce||Qn!==0?Qn:0,!(Tn?De(Tn,tr):xe($t,tr,ce))){for(Je=Ue;--Je;){var Fr=tt[Je];if(!(Fr?De(Fr,tr):xe(j[Je],tr,ce)))continue e}Tn&&Tn.push(tr),$t.push(Qn)}}return $t}function xn(j,ee,ce,xe){return Ll(j,function(Be,Ue,Je){ee(xe,ce(Be),Ue,Je)}),xe}function lu(j,ee,ce){ee=xs(ee,j),j=C0(j,ee);var xe=j==null?j:j[hu(fl(ee))];return xe==null?k:Do(xe,j,ce)}function Hu(j){return ao(j)&&Xa(j)==te}function Ii(j){return ao(j)&&Xa(j)==je}function Xb(j){return ao(j)&&Xa(j)==le}function Fe(j,ee,ce,xe,Be){return j===ee?!0:j==null||ee==null||!ao(j)&&!ao(ee)?j!==j&&ee!==ee:Ui(j,ee,ce,xe,Fe,Be)}function Ui(j,ee,ce,xe,Be,Ue){var Je=Tr(j),tt=Tr(ee),ct=Je?re:xr(j),$t=tt?re:xr(ee);ct=ct==te?Ne:ct,$t=$t==te?Ne:$t;var Wt=ct==Ne,Qt=$t==Ne,Tn=ct==$t;if(Tn&&gu(j)){if(!gu(ee))return!1;Je=!0,Wt=!1}if(Tn&&!Wt)return Ue||(Ue=new Ta),Je||Tc(j)?m0(j,ee,ce,xe,Be,Ue):jT(j,ee,ct,ce,xe,Be,Ue);if(!(ce&y)){var Qn=Wt&&In.call(j,"__wrapped__"),tr=Qt&&In.call(ee,"__wrapped__");if(Qn||tr){var Fr=Qn?j.value():j,cr=tr?ee.value():ee;return Ue||(Ue=new Ta),Be(Fr,cr,ce,xe,Ue)}}return Tn?(Ue||(Ue=new Ta),qT(j,ee,ce,xe,Be,Ue)):!1}function gv(j){return ao(j)&&xr(j)==be}function Hn(j,ee,ce,xe){var Be=ce.length,Ue=Be,Je=!xe;if(j==null)return!Ue;for(j=kn(j);Be--;){var tt=ce[Be];if(Je&&tt[2]?tt[1]!==j[tt[0]]:!(tt[0]in j))return!1}for(;++Be<Ue;){tt=ce[Be];var ct=tt[0],$t=j[ct],Wt=tt[1];if(Je&&tt[2]){if($t===k&&!(ct in j))return!1}else{var Qt=new Ta;if(xe)var Tn=xe($t,Wt,ct,j,ee,Qt);if(!(Tn===k?Fe(Wt,$t,y|d,xe,Qt):Tn))return!1}}return!0}function jn(j){if(!Gi(j)||ek(j))return!1;var ee=ju(j)?Hs:zi;return ee.test(Th(j))}function ei(j){return ao(j)&&Xa(j)==Ie}function pv(j){return ao(j)&&xr(j)==_e}function mr(j){return ao(j)&&Lf(j.length)&&!!ii[Xa(j)]}function xt(j){return typeof j=="function"?j:j==null?Es:typeof j=="object"?Tr(j)?jg(j[0],j[1]):Jb(j):mC(j)}function If(j){if(!yd(j))return IT(j);var ee=[];for(var ce in kn(j))In.call(j,ce)&&ce!="constructor"&&ee.push(ce);return ee}function Lr(j){if(!Gi(j))return ik(j);var ee=yd(j),ce=[];for(var xe in j)xe=="constructor"&&(ee||!In.call(j,xe))||ce.push(xe);return ce}function dd(j,ee){return j<ee}function ka(j,ee){var ce=-1,xe=Aa(j)?ft(j.length):[];return su(j,function(Be,Ue,Je){xe[++ce]=ee(Be,Ue,Je)}),xe}function Jb(j){var ee=Ev(j);return ee.length==1&&ee[0][2]?w0(ee[0][0],ee[0][1]):function(ce){return ce===j||Hn(ce,j,ee)}}function jg(j,ee){return Nv(j)&&y0(ee)?w0(hu(j),ee):function(ce){var xe=ay(ce,j);return xe===k&&xe===ee?sy(ce,j):Fe(ee,xe,y|d)}}function Fl(j,ee,ce,xe,Be){j!==ee&&Gg(ee,function(Ue,Je){if(Be||(Be=new Ta),Gi(Ue))Ra(j,ee,Je,ce,Fl,xe,Be);else{var tt=xe?xe(Pv(j,Je),Ue,Je+"",j,ee,Be):k;tt===k&&(tt=Ue),zs(j,Je,tt)}},Rs)}function Ra(j,ee,ce,xe,Be,Ue,Je){var tt=Pv(j,ce),ct=Pv(ee,ce),$t=Je.get(ct);if($t){zs(j,ce,$t);return}var Wt=Ue?Ue(tt,ct,ce+"",j,ee,Je):k,Qt=Wt===k;if(Qt){var Tn=Tr(ct),Qn=!Tn&&gu(ct),tr=!Tn&&!Qn&&Tc(ct);Wt=ct,Tn||Qn||tr?Tr(tt)?Wt=tt:_o(tt)?Wt=Ts(tt):Qn?(Qt=!1,Wt=_v(ct,!0)):tr?(Qt=!1,Wt=n0(ct,!0)):Wt=[]:xd(ct)||Vl(ct)?(Wt=tt,Vl(tt)?Wt=nC(tt):(!Gi(tt)||ju(tt))&&(Wt=v0(ct))):Qt=!1}Qt&&(Je.set(ct,Wt),Be(Wt,ct,xe,Ue,Je),Je.delete(ct)),zs(j,ce,Wt)}function Ih(j,ee){var ce=j.length;if(ce)return ee+=ee<0?ce:0,Uu(ee,ce)?j[ee]:k}function yi(j,ee,ce){ee.length?ee=Wn(ee,function(Ue){return Tr(Ue)?function(Je){return Sh(Je,Ue.length===1?Ue[0]:Ue)}:Ue}):ee=[Es];var xe=-1;ee=Wn(ee,de(or()));var Be=ka(j,function(Ue,Je,tt){var ct=Wn(ee,function($t){return $t(Ue)});return{criteria:ct,index:++xe,value:Ue}});return mi(Be,function(Ue,Je){return HT(Ue,Je,ce)})}function bc(j,ee){return fd(j,ee,function(ce,xe){return sy(j,xe)})}function fd(j,ee,ce){for(var xe=-1,Be=ee.length,Ue={};++xe<Be;){var Je=ee[xe],tt=Sh(j,Je);ce(tt,Je)&&Zi(Ue,xs(Je,j),tt)}return Ue}function Zb(j){return function(ee){return Sh(ee,j)}}function xf(j,ee,ce,xe){var Be=xe?ul:Pl,Ue=-1,Je=ee.length,tt=j;for(j===ee&&(ee=Ts(ee)),ce&&(tt=Wn(j,de(ce)));++Ue<Je;)for(var ct=0,$t=ee[Ue],Wt=ce?ce($t):$t;(ct=Be(tt,Wt,ct,xe))>-1;)tt!==j&&fo.call(tt,ct,1),fo.call(j,ct,1);return j}function gd(j,ee){for(var ce=j?ee.length:0,xe=ce-1;ce--;){var Be=ee[ce];if(ce==xe||Be!==Ue){var Ue=Be;Uu(Be)?fo.call(j,Be,1):Cc(j,Be)}}return j}function _n(j,ee){return j+pf(ov()*(ee-j+1))}function Ea(j,ee,ce,xe){for(var Be=-1,Ue=zo(nu((ee-j)/(ce||1)),0),Je=ft(Ue);Ue--;)Je[xe?Ue:++Be]=j,j+=ce;return Je}function Ja(j,ee){var ce="";if(!j||ee<1||ee>P)return ce;do ee%2&&(ce+=j),ee=pf(ee/2),ee&&(j+=j);while(ee);return ce}function Zn(j,ee){return Bv(b0(j,ee,Es),j+"")}function xi(j){return Wg(Ku(j))}function wn(j,ee){var ce=Ku(j);return ip(ce,Ch(ee,0,ce.length))}function Zi(j,ee,ce,xe){if(!Gi(j))return j;ee=xs(ee,j);for(var Be=-1,Ue=ee.length,Je=Ue-1,tt=j;tt!=null&&++Be<Ue;){var ct=hu(ee[Be]),$t=ce;if(ct==="__proto__"||ct==="constructor"||ct==="prototype")return j;if(Be!=Je){var Wt=tt[ct];$t=xe?xe(Wt,ct,tt):k,$t===k&&($t=Gi(Wt)?Wt:Uu(ee[Be+1])?[]:{})}ou(tt,ct,$t),tt=tt[ct]}return j}var Za=ld?function(j,ee){return ld.set(j,ee),j}:Es,$u=xa?function(j,ee){return xa(j,"toString",{configurable:!0,enumerable:!1,value:dy(ee),writable:!0})}:Es;function Qb(j){return ip(Ku(j))}function Us(j,ee,ce){var xe=-1,Be=j.length;ee<0&&(ee=-ee>Be?0:Be+ee),ce=ce>Be?Be:ce,ce<0&&(ce+=Be),Be=ee>ce?0:ce-ee>>>0,ee>>>=0;for(var Ue=ft(Be);++xe<Be;)Ue[xe]=j[xe+ee];return Ue}function qg(j,ee){var ce;return su(j,function(xe,Be,Ue){return ce=ee(xe,Be,Ue),!ce}),!!ce}function Tf(j,ee,ce){var xe=0,Be=j==null?xe:j.length;if(typeof ee=="number"&&ee===ee&&Be<=J){for(;xe<Be;){var Ue=xe+Be>>>1,Je=j[Ue];Je!==null&&!js(Je)&&(ce?Je<=ee:Je<ee)?xe=Ue+1:Be=Ue}return Be}return Yg(j,ee,Es,ce)}function Yg(j,ee,ce,xe){var Be=0,Ue=j==null?0:j.length;if(Ue===0)return 0;ee=ce(ee);for(var Je=ee!==ee,tt=ee===null,ct=js(ee),$t=ee===k;Be<Ue;){var Wt=pf((Be+Ue)/2),Qt=ce(j[Wt]),Tn=Qt!==k,Qn=Qt===null,tr=Qt===Qt,Fr=js(Qt);if(Je)var cr=xe||tr;else $t?cr=tr&&(xe||Tn):tt?cr=tr&&Tn&&(xe||!Qn):ct?cr=tr&&Tn&&!Qn&&(xe||!Fr):Qn||Fr?cr=!1:cr=xe?Qt<=ee:Qt<ee;cr?Be=Wt+1:Ue=Wt}return Oo(Ue,X)}function mv(j,ee){for(var ce=-1,xe=j.length,Be=0,Ue=[];++ce<xe;){var Je=j[ce],tt=ee?ee(Je):Je;if(!ce||!gl(tt,ct)){var ct=tt;Ue[Be++]=Je===0?0:Je}}return Ue}function vv(j){return typeof j=="number"?j:js(j)?Y:+j}function Gs(j){if(typeof j=="string")return j;if(Tr(j))return Wn(j,Gs)+"";if(js(j))return av?av.call(j):"";var ee=j+"";return ee=="0"&&1/j==-1/0?"-0":ee}function xh(j,ee,ce){var xe=-1,Be=ps,Ue=j.length,Je=!0,tt=[],ct=tt;if(ce)Je=!1,Be=vh;else if(Ue>=B){var $t=ee?null:UT(j);if($t)return Nr($t);Je=!1,Be=De,ct=new bh}else ct=ee?[]:tt;e:for(;++xe<Ue;){var Wt=j[xe],Qt=ee?ee(Wt):Wt;if(Wt=ce||Wt!==0?Wt:0,Je&&Qt===Qt){for(var Tn=ct.length;Tn--;)if(ct[Tn]===Qt)continue e;ee&&ct.push(Qt),tt.push(Wt)}else Be(ct,Qt,ce)||(ct!==tt&&ct.push(Qt),tt.push(Wt))}return tt}function Cc(j,ee){return ee=xs(ee,j),j=C0(j,ee),j==null||delete j[hu(fl(ee))]}function kf(j,ee,ce,xe){return Zi(j,ee,ce(Sh(j,ee)),xe)}function ti(j,ee,ce,xe){for(var Be=j.length,Ue=xe?Be:-1;(xe?Ue--:++Ue<Be)&&ee(j[Ue],Ue,j););return ce?Us(j,xe?0:Ue,xe?Ue+1:Be):Us(j,xe?Ue+1:0,xe?Be:Ue)}function yv(j,ee){var ce=j;return ce instanceof jr&&(ce=ce.value()),ja(ee,function(xe,Be){return Be.func.apply(Be.thisArg,ua([xe],Be.args))},ce)}function wv(j,ee,ce){var xe=j.length;if(xe<2)return xe?xh(j[0]):[];for(var Be=-1,Ue=ft(xe);++Be<xe;)for(var Je=j[Be],tt=-1;++tt<xe;)tt!=Be&&(Ue[Be]=_h(Ue[Be]||Je,j[tt],ee,ce));return xh(da(Ue,1),ee,ce)}function Rf(j,ee,ce){for(var xe=-1,Be=j.length,Ue=ee.length,Je={};++xe<Be;){var tt=xe<Ue?ee[xe]:k;ce(Je,j[xe],tt)}return Je}function bv(j){return _o(j)?j:[]}function Cv(j){return typeof j=="function"?j:Es}function xs(j,ee){return Tr(j)?j:Nv(j,ee)?[j]:bd(wi(j))}var $n=Zn;function zu(j,ee,ce){var xe=j.length;return ce=ce===k?xe:ce,!ee&&ce>=xe?j:Us(j,ee,ce)}var e0=ad||function(j){return zr.clearTimeout(j)};function _v(j,ee){if(ee)return j.slice();var ce=j.length,xe=Ya?Ya(ce):new j.constructor(ce);return j.copy(xe),xe}function Sv(j){var ee=new j.constructor(j.byteLength);return new qa(ee).set(new qa(j)),ee}function t0(j,ee){var ce=ee?Sv(j.buffer):j.buffer;return new j.constructor(ce,j.byteOffset,j.byteLength)}function FT(j){var ee=new j.constructor(j.source,lr.exec(j));return ee.lastIndex=j.lastIndex,ee}function VT(j){return mf?kn(mf.call(j)):{}}function n0(j,ee){var ce=ee?Sv(j.buffer):j.buffer;return new j.constructor(ce,j.byteOffset,j.length)}function r0(j,ee){if(j!==ee){var ce=j!==k,xe=j===null,Be=j===j,Ue=js(j),Je=ee!==k,tt=ee===null,ct=ee===ee,$t=js(ee);if(!tt&&!$t&&!Ue&&j>ee||Ue&&Je&&ct&&!tt&&!$t||xe&&Je&&ct||!ce&&ct||!Be)return 1;if(!xe&&!Ue&&!$t&&j<ee||$t&&ce&&Be&&!xe&&!Ue||tt&&ce&&Be||!Je&&Be||!ct)return-1}return 0}function HT(j,ee,ce){for(var xe=-1,Be=j.criteria,Ue=ee.criteria,Je=Be.length,tt=ce.length;++xe<Je;){var ct=r0(Be[xe],Ue[xe]);if(ct){if(xe>=tt)return ct;var $t=ce[xe];return ct*($t=="desc"?-1:1)}}return j.index-ee.index}function i0(j,ee,ce,xe){for(var Be=-1,Ue=j.length,Je=ce.length,tt=-1,ct=ee.length,$t=zo(Ue-Je,0),Wt=ft(ct+$t),Qt=!xe;++tt<ct;)Wt[tt]=ee[tt];for(;++Be<Je;)(Qt||Be<Ue)&&(Wt[ce[Be]]=j[Be]);for(;$t--;)Wt[tt++]=j[Be++];return Wt}function o0(j,ee,ce,xe){for(var Be=-1,Ue=j.length,Je=-1,tt=ce.length,ct=-1,$t=ee.length,Wt=zo(Ue-tt,0),Qt=ft(Wt+$t),Tn=!xe;++Be<Wt;)Qt[Be]=j[Be];for(var Qn=Be;++ct<$t;)Qt[Qn+ct]=ee[ct];for(;++Je<tt;)(Tn||Be<Ue)&&(Qt[Qn+ce[Je]]=j[Be++]);return Qt}function Ts(j,ee){var ce=-1,xe=j.length;for(ee||(ee=ft(xe));++ce<xe;)ee[ce]=j[ce];return ee}function uu(j,ee,ce,xe){var Be=!ce;ce||(ce={});for(var Ue=-1,Je=ee.length;++Ue<Je;){var tt=ee[Ue],ct=xe?xe(ce[tt],j[tt],tt,ce,j):k;ct===k&&(ct=j[tt]),Be?Is(ce,tt,ct):ou(ce,tt,ct)}return ce}function $T(j,ee){return uu(j,Av(j),ee)}function zT(j,ee){return uu(j,rp(j),ee)}function Kg(j,ee){return function(ce,xe){var Be=Tr(ce)?ot:Gb,Ue=ee?ee():{};return Be(ce,j,or(xe,2),Ue)}}function pd(j){return Zn(function(ee,ce){var xe=-1,Be=ce.length,Ue=Be>1?ce[Be-1]:k,Je=Be>2?ce[2]:k;for(Ue=j.length>3&&typeof Ue=="function"?(Be--,Ue):k,Je&&Qa(ce[0],ce[1],Je)&&(Ue=Be<3?k:Ue,Be=1),ee=kn(ee);++xe<Be;){var tt=ce[xe];tt&&j(ee,tt,xe,Ue)}return ee})}function a0(j,ee){return function(ce,xe){if(ce==null)return ce;if(!Aa(ce))return j(ce,xe);for(var Be=ce.length,Ue=ee?Be:-1,Je=kn(ce);(ee?Ue--:++Ue<Be)&&xe(Je[Ue],Ue,Je)!==!1;);return ce}}function ks(j){return function(ee,ce,xe){for(var Be=-1,Ue=kn(ee),Je=xe(ee),tt=Je.length;tt--;){var ct=Je[j?tt:++Be];if(ce(Ue[ct],ct,Ue)===!1)break}return ee}}function WT(j,ee,ce){var xe=ee&v,Be=Ef(j);function Ue(){var Je=this&&this!==zr&&this instanceof Ue?Be:j;return Je.apply(xe?ce:this,arguments)}return Ue}function s0(j){return function(ee){ee=wi(ee);var ce=Vt(ee)?Pr(ee):k,xe=ce?ce[0]:ee.charAt(0),Be=ce?zu(ce,1).join(""):ee.slice(1);return xe[j]()+Be}}function md(j){return function(ee){return ja(gC(dC(ee).replace(Ca,"")),j,"")}}function Ef(j){return function(){var ee=arguments;switch(ee.length){case 0:return new j;case 1:return new j(ee[0]);case 2:return new j(ee[0],ee[1]);case 3:return new j(ee[0],ee[1],ee[2]);case 4:return new j(ee[0],ee[1],ee[2],ee[3]);case 5:return new j(ee[0],ee[1],ee[2],ee[3],ee[4]);case 6:return new j(ee[0],ee[1],ee[2],ee[3],ee[4],ee[5]);case 7:return new j(ee[0],ee[1],ee[2],ee[3],ee[4],ee[5],ee[6])}var ce=ud(j.prototype),xe=j.apply(ce,ee);return Gi(xe)?xe:ce}}function l0(j,ee,ce){var xe=Ef(j);function Be(){for(var Ue=arguments.length,Je=ft(Ue),tt=Ue,ct=vd(Be);tt--;)Je[tt]=arguments[tt];var $t=Ue<3&&Je[0]!==ct&&Je[Ue-1]!==ct?[]:vn(Je,ct);if(Ue-=$t.length,Ue<ce)return d0(j,ee,Xg,Be.placeholder,k,Je,$t,k,k,ce-Ue);var Wt=this&&this!==zr&&this instanceof Be?xe:j;return Do(Wt,this,Je)}return Be}function u0(j){return function(ee,ce,xe){var Be=kn(ee);if(!Aa(ee)){var Ue=or(ce,3);ee=ia(ee),ce=function(tt){return Ue(Be[tt],tt,Be)}}var Je=j(ee,ce,xe);return Je>-1?Be[Ue?ee[Je]:Je]:k}}function h0(j){return Di(function(ee){var ce=ee.length,xe=ce,Be=cl.prototype.thru;for(j&&ee.reverse();xe--;){var Ue=ee[xe];if(typeof Ue!="function")throw new ir(E);if(Be&&!Je&&np(Ue)=="wrapper")var Je=new cl([],!0)}for(xe=Je?xe:ce;++xe<ce;){Ue=ee[xe];var tt=np(Ue),ct=tt=="wrapper"?Rv(Ue):k;ct&&Ti(ct[0])&&ct[1]==(h|l|I|c)&&!ct[4].length&&ct[9]==1?Je=Je[np(ct[0])].apply(Je,ct[3]):Je=Ue.length==1&&Ti(Ue)?Je[tt]():Je.thru(Ue)}return function(){var $t=arguments,Wt=$t[0];if(Je&&$t.length==1&&Tr(Wt))return Je.plant(Wt).value();for(var Qt=0,Tn=ce?ee[Qt].apply(this,$t):Wt;++Qt<ce;)Tn=ee[Qt].call(this,Tn);return Tn}})}function Xg(j,ee,ce,xe,Be,Ue,Je,tt,ct,$t){var Wt=ee&h,Qt=ee&v,Tn=ee&b,Qn=ee&(l|w),tr=ee&m,Fr=Tn?k:Ef(j);function cr(){for(var Kr=arguments.length,ni=ft(Kr),qs=Kr;qs--;)ni[qs]=arguments[qs];if(Qn)var es=vd(cr),Ys=ut(ni,es);if(xe&&(ni=i0(ni,xe,Be,Qn)),Ue&&(ni=o0(ni,Ue,Je,Qn)),Kr-=Ys,Qn&&Kr<$t){var So=vn(ni,es);return d0(j,ee,Xg,cr.placeholder,ce,ni,So,tt,ct,$t-Kr)}var Hl=Qt?ce:this,Ks=Tn?Hl[j]:j;return Kr=ni.length,tt?ni=ak(ni,tt):tr&&Kr>1&&ni.reverse(),Wt&&ct<Kr&&(ni.length=ct),this&&this!==zr&&this instanceof cr&&(Ks=Fr||Ef(Ks)),Ks.apply(Hl,ni)}return cr}function c0(j,ee){return function(ce,xe){return xn(ce,j,ee(xe),{})}}function Jg(j,ee){return function(ce,xe){var Be;if(ce===k&&xe===k)return ee;if(ce!==k&&(Be=ce),xe!==k){if(Be===k)return xe;typeof ce=="string"||typeof xe=="string"?(ce=Gs(ce),xe=Gs(xe)):(ce=vv(ce),xe=vv(xe)),Be=j(ce,xe)}return Be}}function Iv(j){return Di(function(ee){return ee=Wn(ee,de(or())),Zn(function(ce){var xe=this;return j(ee,function(Be){return Do(Be,xe,ce)})})})}function Zg(j,ee){ee=ee===k?" ":Gs(ee);var ce=ee.length;if(ce<2)return ce?Ja(ee,j):ee;var xe=Ja(ee,nu(j/Wr(ee)));return Vt(ee)?zu(Pr(xe),0,j).join(""):xe.slice(0,j)}function Qg(j,ee,ce,xe){var Be=ee&v,Ue=Ef(j);function Je(){for(var tt=-1,ct=arguments.length,$t=-1,Wt=xe.length,Qt=ft(Wt+ct),Tn=this&&this!==zr&&this instanceof Je?Ue:j;++$t<Wt;)Qt[$t]=xe[$t];for(;ct--;)Qt[$t++]=arguments[++tt];return Do(Tn,Be?ce:this,Qt)}return Je}function ep(j){return function(ee,ce,xe){return xe&&typeof xe!="number"&&Qa(ee,ce,xe)&&(ce=xe=k),ee=Yu(ee),ce===k?(ce=ee,ee=0):ce=Yu(ce),xe=xe===k?ee<ce?1:-1:Yu(xe),Ea(ee,ce,xe,j)}}function tp(j){return function(ee,ce){return typeof ee=="string"&&typeof ce=="string"||(ee=so(ee),ce=so(ce)),j(ee,ce)}}function d0(j,ee,ce,xe,Be,Ue,Je,tt,ct,$t){var Wt=ee&l,Qt=Wt?Je:k,Tn=Wt?k:Je,Qn=Wt?Ue:k,tr=Wt?k:Ue;ee|=Wt?I:C,ee&=~(Wt?C:I),ee&s||(ee&=-4);var Fr=[j,ee,Be,Qn,Qt,tr,Tn,tt,ct,$t],cr=ce.apply(k,Fr);return Ti(j)&&Qi(cr,Fr),cr.placeholder=xe,_0(cr,j,ee)}function xv(j){var ee=Fn[j];return function(ce,xe){if(ce=so(ce),xe=xe==null?0:Oo(Br(xe),292),xe&&$s(ce)){var Be=(wi(ce)+"e").split("e"),Ue=ee(Be[0]+"e"+(+Be[1]+xe));return Be=(wi(Ue)+"e").split("e"),+(Be[0]+"e"+(+Be[1]-xe))}return ee(ce)}}var UT=iu&&1/Nr(new iu([,-0]))[1]==V?function(j){return new iu(j)}:py;function f0(j){return function(ee){var ce=xr(ee);return ce==be?Kn(ee):ce==_e?Jr(ee):ge(ee,j(ee))}}function Wu(j,ee,ce,xe,Be,Ue,Je,tt){var ct=ee&b;if(!ct&&typeof j!="function")throw new ir(E);var $t=xe?xe.length:0;if($t||(ee&=-97,xe=Be=k),Je=Je===k?Je:zo(Br(Je),0),tt=tt===k?tt:Br(tt),$t-=Be?Be.length:0,ee&C){var Wt=xe,Qt=Be;xe=Be=k}var Tn=ct?k:Rv(j),Qn=[j,ee,ce,xe,Be,Wt,Qt,Ue,Je,tt];if(Tn&&rk(Qn,Tn),j=Qn[0],ee=Qn[1],ce=Qn[2],xe=Qn[3],Be=Qn[4],tt=Qn[9]=Qn[9]===k?ct?0:j.length:zo(Qn[9]-$t,0),!tt&&ee&(l|w)&&(ee&=-25),!ee||ee==v)var tr=WT(j,ee,ce);else ee==l||ee==w?tr=l0(j,ee,tt):(ee==I||ee==(v|I))&&!Be.length?tr=Qg(j,ee,ce,xe):tr=Xg.apply(k,Qn);var Fr=Tn?Za:Qi;return _0(Fr(tr,Qn),j,ee)}function g0(j,ee,ce,xe){return j===k||gl(j,rn[ce])&&!In.call(xe,ce)?ee:j}function p0(j,ee,ce,xe,Be,Ue){return Gi(j)&&Gi(ee)&&(Ue.set(ee,j),Fl(j,ee,k,p0,Ue),Ue.delete(ee)),j}function GT(j){return xd(j)?k:j}function m0(j,ee,ce,xe,Be,Ue){var Je=ce&y,tt=j.length,ct=ee.length;if(tt!=ct&&!(Je&&ct>tt))return!1;var $t=Ue.get(j),Wt=Ue.get(ee);if($t&&Wt)return $t==ee&&Wt==j;var Qt=-1,Tn=!0,Qn=ce&d?new bh:k;for(Ue.set(j,ee),Ue.set(ee,j);++Qt<tt;){var tr=j[Qt],Fr=ee[Qt];if(xe)var cr=Je?xe(Fr,tr,Qt,ee,j,Ue):xe(tr,Fr,Qt,j,ee,Ue);if(cr!==k){if(cr)continue;Tn=!1;break}if(Qn){if(!ms(ee,function(Kr,ni){if(!De(Qn,ni)&&(tr===Kr||Be(tr,Kr,ce,xe,Ue)))return Qn.push(ni)})){Tn=!1;break}}else if(!(tr===Fr||Be(tr,Fr,ce,xe,Ue))){Tn=!1;break}}return Ue.delete(j),Ue.delete(ee),Tn}function jT(j,ee,ce,xe,Be,Ue,Je){switch(ce){case it:if(j.byteLength!=ee.byteLength||j.byteOffset!=ee.byteOffset)return!1;j=j.buffer,ee=ee.buffer;case je:return!(j.byteLength!=ee.byteLength||!Ue(new qa(j),new qa(ee)));case ne:case le:case Ee:return gl(+j,+ee);case we:return j.name==ee.name&&j.message==ee.message;case Ie:case Ae:return j==ee+"";case be:var tt=Kn;case _e:var ct=xe&y;if(tt||(tt=Nr),j.size!=ee.size&&!ct)return!1;var $t=Je.get(j);if($t)return $t==ee;xe|=d,Je.set(j,ee);var Wt=m0(tt(j),tt(ee),xe,Be,Ue,Je);return Je.delete(j),Wt;case ue:if(mf)return mf.call(j)==mf.call(ee)}return!1}function qT(j,ee,ce,xe,Be,Ue){var Je=ce&y,tt=Tv(j),ct=tt.length,$t=Tv(ee),Wt=$t.length;if(ct!=Wt&&!Je)return!1;for(var Qt=ct;Qt--;){var Tn=tt[Qt];if(!(Je?Tn in ee:In.call(ee,Tn)))return!1}var Qn=Ue.get(j),tr=Ue.get(ee);if(Qn&&tr)return Qn==ee&&tr==j;var Fr=!0;Ue.set(j,ee),Ue.set(ee,j);for(var cr=Je;++Qt<ct;){Tn=tt[Qt];var Kr=j[Tn],ni=ee[Tn];if(xe)var qs=Je?xe(ni,Kr,Tn,ee,j,Ue):xe(Kr,ni,Tn,j,ee,Ue);if(!(qs===k?Kr===ni||Be(Kr,ni,ce,xe,Ue):qs)){Fr=!1;break}cr||(cr=Tn=="constructor")}if(Fr&&!cr){var es=j.constructor,Ys=ee.constructor;es!=Ys&&"constructor"in j&&"constructor"in ee&&!(typeof es=="function"&&es instanceof es&&typeof Ys=="function"&&Ys instanceof Ys)&&(Fr=!1)}return Ue.delete(j),Ue.delete(ee),Fr}function Di(j){return Bv(b0(j,k,k0),j+"")}function Tv(j){return Yb(j,ia,Av)}function kv(j){return Yb(j,Rs,rp)}var Rv=ld?function(j){return ld.get(j)}:py;function np(j){for(var ee=j.name+"",ce=wh[ee],xe=In.call(wh,ee)?ce.length:0;xe--;){var Be=ce[xe],Ue=Be.func;if(Ue==null||Ue==j)return Be.name}return ee}function vd(j){var ee=In.call($e,"placeholder")?$e:j;return ee.placeholder}function or(){var j=$e.iteratee||fy;return j=j===fy?xt:j,arguments.length?j(arguments[0],arguments[1]):j}function Af(j,ee){var ce=j.__data__;return QT(ee)?ce[typeof ee=="string"?"string":"hash"]:ce.map}function Ev(j){for(var ee=ia(j),ce=ee.length;ce--;){var xe=ee[ce],Be=j[xe];ee[ce]=[xe,Be,y0(Be)]}return ee}function _c(j,ee){var ce=qt(j,ee);return jn(ce)?ce:k}function YT(j){var ee=In.call(j,ha),ce=j[ha];try{j[ha]=k;var xe=!0}catch{}var Be=bo.call(j);return xe&&(ee?j[ha]=ce:delete j[ha]),Be}var Av=iv?function(j){return j==null?[]:(j=kn(j),gs(iv(j),function(ee){return Ft.call(j,ee)}))}:my,rp=iv?function(j){for(var ee=[];j;)ua(ee,Av(j)),j=Gn(j);return ee}:my,xr=Xa;(ws&&xr(new ws(new ArrayBuffer(1)))!=it||rr&&xr(new rr)!=be||sd&&xr(sd.resolve())!=Le||iu&&xr(new iu)!=_e||yh&&xr(new yh)!=Pe)&&(xr=function(j){var ee=Xa(j),ce=ee==Ne?j.constructor:k,xe=ce?Th(ce):"";if(xe)switch(xe){case Fg:return it;case kT:return be;case RT:return Le;case Bb:return _e;case Lb:return Pe}return ee});function Mv(j,ee,ce){for(var xe=-1,Be=ce.length;++xe<Be;){var Ue=ce[xe],Je=Ue.size;switch(Ue.type){case"drop":j+=Je;break;case"dropRight":ee-=Je;break;case"take":ee=Oo(ee,j+Je);break;case"takeRight":j=zo(j,ee-Je);break}}return{start:j,end:ee}}function KT(j){var ee=j.match(Lt);return ee?ee[1].split(Dt):[]}function Dv(j,ee,ce){ee=xs(ee,j);for(var xe=-1,Be=ee.length,Ue=!1;++xe<Be;){var Je=hu(ee[xe]);if(!(Ue=j!=null&&ce(j,Je)))break;j=j[Je]}return Ue||++xe!=Be?Ue:(Be=j==null?0:j.length,!!Be&&Lf(Be)&&Uu(Je,Be)&&(Tr(j)||Vl(j)))}function XT(j){var ee=j.length,ce=new j.constructor(ee);return ee&&typeof j[0]=="string"&&In.call(j,"index")&&(ce.index=j.index,ce.input=j.input),ce}function v0(j){return typeof j.constructor=="function"&&!yd(j)?ud(Gn(j)):{}}function Ov(j,ee,ce){var xe=j.constructor;switch(ee){case je:return Sv(j);case ne:case le:return new xe(+j);case it:return t0(j,ce);case rt:case mt:case yt:case st:case Qe:case At:case Xt:case cn:case Sn:return n0(j,ce);case be:return new xe;case Ee:case Ae:return new xe(j);case Ie:return FT(j);case _e:return new xe;case ue:return VT(j)}}function JT(j,ee){var ce=ee.length;if(!ce)return j;var xe=ce-1;return ee[xe]=(ce>1?"& ":"")+ee[xe],ee=ee.join(ce>2?", ":" "),j.replace(Rt,`{
/* [wrapped with `+ee+`] */
`)}function ZT(j){return Tr(j)||Vl(j)||!!(hl&&j&&j[hl])}function Uu(j,ee){var ce=typeof j;return ee=ee??P,!!ee&&(ce=="number"||ce!="symbol"&&Ro.test(j))&&j>-1&&j%1==0&&j<ee}function Qa(j,ee,ce){if(!Gi(ce))return!1;var xe=typeof ee;return(xe=="number"?Aa(ce)&&Uu(ee,ce.length):xe=="string"&&ee in ce)?gl(ce[ee],j):!1}function Nv(j,ee){if(Tr(j))return!1;var ce=typeof j;return ce=="number"||ce=="symbol"||ce=="boolean"||j==null||js(j)?!0:Ge.test(j)||!Bt.test(j)||ee!=null&&j in kn(ee)}function QT(j){var ee=typeof j;return ee=="string"||ee=="number"||ee=="symbol"||ee=="boolean"?j!=="__proto__":j===null}function Ti(j){var ee=np(j),ce=$e[ee];if(typeof ce!="function"||!(ee in jr.prototype))return!1;if(j===ce)return!0;var xe=Rv(ce);return!!xe&&j===xe[0]}function ek(j){return!!io&&io in j}var tk=qn?ju:vy;function yd(j){var ee=j&&j.constructor,ce=typeof ee=="function"&&ee.prototype||rn;return j===ce}function y0(j){return j===j&&!Gi(j)}function w0(j,ee){return function(ce){return ce==null?!1:ce[j]===ee&&(ee!==k||j in kn(ce))}}function nk(j){var ee=mp(j,function(xe){return ce.size===o&&ce.clear(),xe}),ce=ee.cache;return ee}function rk(j,ee){var ce=j[1],xe=ee[1],Be=ce|xe,Ue=Be<(v|b|h),Je=xe==h&&ce==l||xe==h&&ce==c&&j[7].length<=ee[8]||xe==(h|c)&&ee[7].length<=ee[8]&&ce==l;if(!(Ue||Je))return j;xe&v&&(j[2]=ee[2],Be|=ce&v?0:s);var tt=ee[3];if(tt){var ct=j[3];j[3]=ct?i0(ct,tt,ee[4]):tt,j[4]=ct?vn(j[3],S):ee[4]}return tt=ee[5],tt&&(ct=j[5],j[5]=ct?o0(ct,tt,ee[6]):tt,j[6]=ct?vn(j[5],S):ee[6]),tt=ee[7],tt&&(j[7]=tt),xe&h&&(j[8]=j[8]==null?ee[8]:Oo(j[8],ee[8])),j[9]==null&&(j[9]=ee[9]),j[0]=ee[0],j[1]=Be,j}function ik(j){var ee=[];if(j!=null)for(var ce in kn(j))ee.push(ce);return ee}function ok(j){return bo.call(j)}function b0(j,ee,ce){return ee=zo(ee===k?j.length-1:ee,0),function(){for(var xe=arguments,Be=-1,Ue=zo(xe.length-ee,0),Je=ft(Ue);++Be<Ue;)Je[Be]=xe[ee+Be];Be=-1;for(var tt=ft(ee+1);++Be<ee;)tt[Be]=xe[Be];return tt[ee]=ce(Je),Do(j,this,tt)}}function C0(j,ee){return ee.length<2?j:Sh(j,Us(ee,0,-1))}function ak(j,ee){for(var ce=j.length,xe=Oo(ee.length,ce),Be=Ts(j);xe--;){var Ue=ee[xe];j[xe]=Uu(Ue,ce)?Be[Ue]:k}return j}function Pv(j,ee){if(!(ee==="constructor"&&typeof j[ee]=="function")&&ee!="__proto__")return j[ee]}var Qi=Lv(Za),wd=Ji||function(j,ee){return zr.setTimeout(j,ee)},Bv=Lv($u);function _0(j,ee,ce){var xe=ee+"";return Bv(j,JT(xe,sk(KT(xe),ce)))}function Lv(j){var ee=0,ce=0;return function(){var xe=xT(),Be=N-(xe-ce);if(ce=xe,Be>0){if(++ee>=O)return arguments[0]}else ee=0;return j.apply(k,arguments)}}function ip(j,ee){var ce=-1,xe=j.length,Be=xe-1;for(ee=ee===k?xe:ee;++ce<ee;){var Ue=_n(ce,Be),Je=j[Ue];j[Ue]=j[ce],j[ce]=Je}return j.length=ee,j}var bd=nk(function(j){var ee=[];return j.charCodeAt(0)===46&&ee.push(""),j.replace(et,function(ce,xe,Be,Ue){ee.push(Be?Ue.replace(nn,"$1"):xe||ce)}),ee});function hu(j){if(typeof j=="string"||js(j))return j;var ee=j+"";return ee=="0"&&1/j==-1/0?"-0":ee}function Th(j){if(j!=null){try{return Ln.call(j)}catch{}try{return j+""}catch{}}return""}function sk(j,ee){return It(q,function(ce){var xe="_."+ce[0];ee&ce[1]&&!ps(j,xe)&&j.push(xe)}),j.sort()}function S0(j){if(j instanceof jr)return j.clone();var ee=new cl(j.__wrapped__,j.__chain__);return ee.__actions__=Ts(j.__actions__),ee.__index__=j.__index__,ee.__values__=j.__values__,ee}function op(j,ee,ce){(ce?Qa(j,ee,ce):ee===k)?ee=1:ee=zo(Br(ee),0);var xe=j==null?0:j.length;if(!xe||ee<1)return[];for(var Be=0,Ue=0,Je=ft(nu(xe/ee));Be<xe;)Je[Ue++]=Us(j,Be,Be+=ee);return Je}function lk(j){for(var ee=-1,ce=j==null?0:j.length,xe=0,Be=[];++ee<ce;){var Ue=j[ee];Ue&&(Be[xe++]=Ue)}return Be}function I0(){var j=arguments.length;if(!j)return[];for(var ee=ft(j-1),ce=arguments[0],xe=j;xe--;)ee[xe-1]=arguments[xe];return ua(Tr(ce)?Ts(ce):[ce],da(ee,1))}var uk=Zn(function(j,ee){return _o(j)?_h(j,da(ee,1,_o,!0)):[]}),hk=Zn(function(j,ee){var ce=fl(ee);return _o(ce)&&(ce=k),_o(j)?_h(j,da(ee,1,_o,!0),or(ce,2)):[]}),ck=Zn(function(j,ee){var ce=fl(ee);return _o(ce)&&(ce=k),_o(j)?_h(j,da(ee,1,_o,!0),k,ce):[]});function dk(j,ee,ce){var xe=j==null?0:j.length;return xe?(ee=ce||ee===k?1:Br(ee),Us(j,ee<0?0:ee,xe)):[]}function fk(j,ee,ce){var xe=j==null?0:j.length;return xe?(ee=ce||ee===k?1:Br(ee),ee=xe-ee,Us(j,0,ee<0?0:ee)):[]}function gk(j,ee){return j&&j.length?ti(j,or(ee,3),!0,!0):[]}function pk(j,ee){return j&&j.length?ti(j,or(ee,3),!0):[]}function mk(j,ee,ce,xe){var Be=j==null?0:j.length;return Be?(ce&&typeof ce!="number"&&Qa(j,ee,ce)&&(ce=0,xe=Be),jb(j,ee,ce,xe)):[]}function x0(j,ee,ce){var xe=j==null?0:j.length;if(!xe)return-1;var Be=ce==null?0:Br(ce);return Be<0&&(Be=zo(xe+Be,0)),Lu(j,or(ee,3),Be)}function T0(j,ee,ce){var xe=j==null?0:j.length;if(!xe)return-1;var Be=xe-1;return ce!==k&&(Be=Br(ce),Be=ce<0?zo(xe+Be,0):Oo(Be,xe-1)),Lu(j,or(ee,3),Be,!0)}function k0(j){var ee=j==null?0:j.length;return ee?da(j,1):[]}function vk(j){var ee=j==null?0:j.length;return ee?da(j,V):[]}function yk(j,ee){var ce=j==null?0:j.length;return ce?(ee=ee===k?1:Br(ee),da(j,ee)):[]}function wk(j){for(var ee=-1,ce=j==null?0:j.length,xe={};++ee<ce;){var Be=j[ee];xe[Be[0]]=Be[1]}return xe}function R0(j){return j&&j.length?j[0]:k}function bk(j,ee,ce){var xe=j==null?0:j.length;if(!xe)return-1;var Be=ce==null?0:Br(ce);return Be<0&&(Be=zo(xe+Be,0)),Pl(j,ee,Be)}function Ck(j){var ee=j==null?0:j.length;return ee?Us(j,0,-1):[]}var E0=Zn(function(j){var ee=Wn(j,bv);return ee.length&&ee[0]===j[0]?fv(ee):[]}),A0=Zn(function(j){var ee=fl(j),ce=Wn(j,bv);return ee===fl(ce)?ee=k:ce.pop(),ce.length&&ce[0]===j[0]?fv(ce,or(ee,2)):[]}),_k=Zn(function(j){var ee=fl(j),ce=Wn(j,bv);return ee=typeof ee=="function"?ee:k,ee&&ce.pop(),ce.length&&ce[0]===j[0]?fv(ce,k,ee):[]});function Sk(j,ee){return j==null?"":Pb.call(j,ee)}function fl(j){var ee=j==null?0:j.length;return ee?j[ee-1]:k}function Ik(j,ee,ce){var xe=j==null?0:j.length;if(!xe)return-1;var Be=xe;return ce!==k&&(Be=Br(ce),Be=Be<0?zo(xe+Be,0):Oo(Be,xe-1)),ee===ee?si(j,ee,Be):Lu(j,tu,Be,!0)}function xk(j,ee){return j&&j.length?Ih(j,Br(ee)):k}var Fv=Zn(ap);function ap(j,ee){return j&&j.length&&ee&&ee.length?xf(j,ee):j}function Vv(j,ee,ce){return j&&j.length&&ee&&ee.length?xf(j,ee,or(ce,2)):j}function M0(j,ee,ce){return j&&j.length&&ee&&ee.length?xf(j,ee,k,ce):j}var Tk=Di(function(j,ee){var ce=j==null?0:j.length,xe=wf(j,ee);return gd(j,Wn(ee,function(Be){return Uu(Be,ce)?+Be:Be}).sort(r0)),xe});function D0(j,ee){var ce=[];if(!(j&&j.length))return ce;var xe=-1,Be=[],Ue=j.length;for(ee=or(ee,3);++xe<Ue;){var Je=j[xe];ee(Je,xe,j)&&(ce.push(Je),Be.push(xe))}return gd(j,Be),ce}function Hv(j){return j==null?j:ru.call(j)}function kk(j,ee,ce){var xe=j==null?0:j.length;return xe?(ce&&typeof ce!="number"&&Qa(j,ee,ce)?(ee=0,ce=xe):(ee=ee==null?0:Br(ee),ce=ce===k?xe:Br(ce)),Us(j,ee,ce)):[]}function O0(j,ee){return Tf(j,ee)}function Rk(j,ee,ce){return Yg(j,ee,or(ce,2))}function $v(j,ee){var ce=j==null?0:j.length;if(ce){var xe=Tf(j,ee);if(xe<ce&&gl(j[xe],ee))return xe}return-1}function fa(j,ee){return Tf(j,ee,!0)}function go(j,ee,ce){return Yg(j,ee,or(ce,2),!0)}function kh(j,ee){var ce=j==null?0:j.length;if(ce){var xe=Tf(j,ee,!0)-1;if(gl(j[xe],ee))return xe}return-1}function zv(j){return j&&j.length?mv(j):[]}function N0(j,ee){return j&&j.length?mv(j,or(ee,2)):[]}function P0(j){var ee=j==null?0:j.length;return ee?Us(j,1,ee):[]}function Wv(j,ee,ce){return j&&j.length?(ee=ce||ee===k?1:Br(ee),Us(j,0,ee<0?0:ee)):[]}function B0(j,ee,ce){var xe=j==null?0:j.length;return xe?(ee=ce||ee===k?1:Br(ee),ee=xe-ee,Us(j,ee<0?0:ee,xe)):[]}function Wo(j,ee){return j&&j.length?ti(j,or(ee,3),!1,!0):[]}function cu(j,ee){return j&&j.length?ti(j,or(ee,3)):[]}var Uv=Zn(function(j){return xh(da(j,1,_o,!0))}),Ek=Zn(function(j){var ee=fl(j);return _o(ee)&&(ee=k),xh(da(j,1,_o,!0),or(ee,2))}),Cd=Zn(function(j){var ee=fl(j);return ee=typeof ee=="function"?ee:k,xh(da(j,1,_o,!0),k,ee)});function L0(j){return j&&j.length?xh(j):[]}function F0(j,ee){return j&&j.length?xh(j,or(ee,2)):[]}function Ak(j,ee){return ee=typeof ee=="function"?ee:k,j&&j.length?xh(j,k,ee):[]}function Gv(j){if(!(j&&j.length))return[];var ee=0;return j=gs(j,function(ce){if(_o(ce))return ee=zo(ce.length,ee),!0}),na(ee,function(ce){return Wn(j,Fu(ce))})}function V0(j,ee){if(!(j&&j.length))return[];var ce=Gv(j);return ee==null?ce:Wn(ce,function(xe){return Do(ee,k,xe)})}var sp=Zn(function(j,ee){return _o(j)?_h(j,ee):[]}),Mk=Zn(function(j){return wv(gs(j,_o))}),Mf=Zn(function(j){var ee=fl(j);return _o(ee)&&(ee=k),wv(gs(j,_o),or(ee,2))}),Dk=Zn(function(j){var ee=fl(j);return ee=typeof ee=="function"?ee:k,wv(gs(j,_o),k,ee)}),Ok=Zn(Gv);function Nk(j,ee){return Rf(j||[],ee||[],ou)}function Pk(j,ee){return Rf(j||[],ee||[],Zi)}var Bk=Zn(function(j){var ee=j.length,ce=ee>1?j[ee-1]:k;return ce=typeof ce=="function"?(j.pop(),ce):k,V0(j,ce)});function jv(j){var ee=$e(j);return ee.__chain__=!0,ee}function Lk(j,ee){return ee(j),j}function Df(j,ee){return ee(j)}var Fk=Di(function(j){var ee=j.length,ce=ee?j[0]:0,xe=this.__wrapped__,Be=function(Ue){return wf(Ue,j)};return ee>1||this.__actions__.length||!(xe instanceof jr)||!Uu(ce)?this.thru(Be):(xe=xe.slice(ce,+ce+(ee?1:0)),xe.__actions__.push({func:Df,args:[Be],thisArg:k}),new cl(xe,this.__chain__).thru(function(Ue){return ee&&!Ue.length&&Ue.push(k),Ue}))});function Vk(){return jv(this)}function lp(){return new cl(this.value(),this.__chain__)}function Hk(){this.__values__===k&&(this.__values__=qu(this.value()));var j=this.__index__>=this.__values__.length,ee=j?k:this.__values__[this.__index__++];return{done:j,value:ee}}function qv(){return this}function Yv(j){for(var ee,ce=this;ce instanceof Hg;){var xe=S0(ce);xe.__index__=0,xe.__values__=k,ee?Be.__wrapped__=xe:ee=xe;var Be=xe;ce=ce.__wrapped__}return Be.__wrapped__=j,ee}function Kv(){var j=this.__wrapped__;if(j instanceof jr){var ee=j;return this.__actions__.length&&(ee=new jr(this)),ee=ee.reverse(),ee.__actions__.push({func:Df,args:[Hv],thisArg:k}),new cl(ee,this.__chain__)}return this.thru(Hv)}function Of(){return yv(this.__wrapped__,this.__actions__)}var Sc=Kg(function(j,ee,ce){In.call(j,ce)?++j[ce]:Is(j,ce,1)});function H0(j,ee,ce){var xe=Tr(j)?Bu:Ug;return ce&&Qa(j,ee,ce)&&(ee=k),xe(j,or(ee,3))}function $k(j,ee){var ce=Tr(j)?gs:cv;return ce(j,or(ee,3))}var _d=u0(x0),du=u0(T0);function zk(j,ee){return da(Pf(j,ee),1)}function up(j,ee){return da(Pf(j,ee),V)}function Wk(j,ee,ce){return ce=ce===k?1:Br(ce),da(Pf(j,ee),ce)}function Ic(j,ee){var ce=Tr(j)?It:su;return ce(j,or(ee,3))}function hp(j,ee){var ce=Tr(j)?mc:hv;return ce(j,or(ee,3))}var cp=Kg(function(j,ee,ce){In.call(j,ce)?j[ce].push(ee):Is(j,ce,[ee])});function Uk(j,ee,ce,xe){j=Aa(j)?j:Ku(j),ce=ce&&!xe?Br(ce):0;var Be=j.length;return ce<0&&(ce=zo(Be+ce,0)),_p(j)?ce<=Be&&j.indexOf(ee,ce)>-1:!!Be&&Pl(j,ee,ce)>-1}var $0=Zn(function(j,ee,ce){var xe=-1,Be=typeof ee=="function",Ue=Aa(j)?ft(j.length):[];return su(j,function(Je){Ue[++xe]=Be?Do(ee,Je,ce):lu(Je,ee,ce)}),Ue}),Nf=Kg(function(j,ee,ce){Is(j,ce,ee)});function Pf(j,ee){var ce=Tr(j)?Wn:ka;return ce(j,or(ee,3))}function Gk(j,ee,ce,xe){return j==null?[]:(Tr(ee)||(ee=ee==null?[]:[ee]),ce=xe?k:ce,Tr(ce)||(ce=ce==null?[]:[ce]),yi(j,ee,ce))}var Gu=Kg(function(j,ee,ce){j[ce?0:1].push(ee)},function(){return[[],[]]});function jk(j,ee,ce){var xe=Tr(j)?ja:Ki,Be=arguments.length<3;return xe(j,or(ee,4),ce,Be,su)}function qk(j,ee,ce){var xe=Tr(j)?Pi:Ki,Be=arguments.length<3;return xe(j,or(ee,4),ce,Be,hv)}function Yk(j,ee){var ce=Tr(j)?gs:cv;return ce(j,vp(or(ee,3)))}function Kk(j){var ee=Tr(j)?Wg:xi;return ee(j)}function Xk(j,ee,ce){(ce?Qa(j,ee,ce):ee===k)?ee=1:ee=Br(ee);var xe=Tr(j)?BT:wn;return xe(j,ee)}function dp(j){var ee=Tr(j)?Ka:Qb;return ee(j)}function Jk(j){if(j==null)return 0;if(Aa(j))return _p(j)?Wr(j):j.length;var ee=xr(j);return ee==be||ee==_e?j.size:If(j).length}function Xv(j,ee,ce){var xe=Tr(j)?ms:qg;return ce&&Qa(j,ee,ce)&&(ee=k),xe(j,or(ee,3))}var Jv=Zn(function(j,ee){if(j==null)return[];var ce=ee.length;return ce>1&&Qa(j,ee[0],ee[1])?ee=[]:ce>2&&Qa(ee[0],ee[1],ee[2])&&(ee=[ee[0]]),yi(j,da(ee,1),[])}),fp=ys||function(){return zr.Date.now()};function Zk(j,ee){if(typeof ee!="function")throw new ir(E);return j=Br(j),function(){if(--j<1)return ee.apply(this,arguments)}}function z0(j,ee,ce){return ee=ce?k:ee,ee=j&&ee==null?j.length:ee,Wu(j,h,k,k,k,k,ee)}function Sd(j,ee){var ce;if(typeof ee!="function")throw new ir(E);return j=Br(j),function(){return--j>0&&(ce=ee.apply(this,arguments)),j<=1&&(ee=k),ce}}var gp=Zn(function(j,ee,ce){var xe=v;if(ce.length){var Be=vn(ce,vd(gp));xe|=I}return Wu(j,xe,ee,ce,Be)}),W0=Zn(function(j,ee,ce){var xe=v|b;if(ce.length){var Be=vn(ce,vd(W0));xe|=I}return Wu(ee,xe,j,ce,Be)});function U0(j,ee,ce){ee=ce?k:ee;var xe=Wu(j,l,k,k,k,k,k,ee);return xe.placeholder=U0.placeholder,xe}function G0(j,ee,ce){ee=ce?k:ee;var xe=Wu(j,w,k,k,k,k,k,ee);return xe.placeholder=G0.placeholder,xe}function pp(j,ee,ce){var xe,Be,Ue,Je,tt,ct,$t=0,Wt=!1,Qt=!1,Tn=!0;if(typeof j!="function")throw new ir(E);ee=so(ee)||0,Gi(ce)&&(Wt=!!ce.leading,Qt="maxWait"in ce,Ue=Qt?zo(so(ce.maxWait)||0,ee):Ue,Tn="trailing"in ce?!!ce.trailing:Tn);function Qn(So){var Hl=xe,Ks=Be;return xe=Be=k,$t=So,Je=j.apply(Ks,Hl),Je}function tr(So){return $t=So,tt=wd(Kr,ee),Wt?Qn(So):Je}function Fr(So){var Hl=So-ct,Ks=So-$t,_C=ee-Hl;return Qt?Oo(_C,Ue-Ks):_C}function cr(So){var Hl=So-ct,Ks=So-$t;return ct===k||Hl>=ee||Hl<0||Qt&&Ks>=Ue}function Kr(){var So=fp();if(cr(So))return ni(So);tt=wd(Kr,Fr(So))}function ni(So){return tt=k,Tn&&xe?Qn(So):(xe=Be=k,Je)}function qs(){tt!==k&&e0(tt),$t=0,xe=ct=Be=tt=k}function es(){return tt===k?Je:ni(fp())}function Ys(){var So=fp(),Hl=cr(So);if(xe=arguments,Be=this,ct=So,Hl){if(tt===k)return tr(ct);if(Qt)return e0(tt),tt=wd(Kr,ee),Qn(ct)}return tt===k&&(tt=wd(Kr,ee)),Je}return Ys.cancel=qs,Ys.flush=es,Ys}var Qk=Zn(function(j,ee){return uv(j,1,ee)}),fu=Zn(function(j,ee,ce){return uv(j,so(ee)||0,ce)});function eR(j){return Wu(j,m)}function mp(j,ee){if(typeof j!="function"||ee!=null&&typeof ee!="function")throw new ir(E);var ce=function(){var xe=arguments,Be=ee?ee.apply(this,xe):xe[0],Ue=ce.cache;if(Ue.has(Be))return Ue.get(Be);var Je=j.apply(this,xe);return ce.cache=Ue.set(Be,Je)||Ue,Je};return ce.cache=new(mp.Cache||ca),ce}mp.Cache=ca;function vp(j){if(typeof j!="function")throw new ir(E);return function(){var ee=arguments;switch(ee.length){case 0:return!j.call(this);case 1:return!j.call(this,ee[0]);case 2:return!j.call(this,ee[0],ee[1]);case 3:return!j.call(this,ee[0],ee[1],ee[2])}return!j.apply(this,ee)}}function tR(j){return Sd(2,j)}var nR=$n(function(j,ee){ee=ee.length==1&&Tr(ee[0])?Wn(ee[0],de(or())):Wn(da(ee,1),de(or()));var ce=ee.length;return Zn(function(xe){for(var Be=-1,Ue=Oo(xe.length,ce);++Be<Ue;)xe[Be]=ee[Be].call(this,xe[Be]);return Do(j,this,xe)})}),yp=Zn(function(j,ee){var ce=vn(ee,vd(yp));return Wu(j,I,k,ee,ce)}),j0=Zn(function(j,ee){var ce=vn(ee,vd(j0));return Wu(j,C,k,ee,ce)}),Bf=Di(function(j,ee){return Wu(j,c,k,k,k,ee)});function rR(j,ee){if(typeof j!="function")throw new ir(E);return ee=ee===k?ee:Br(ee),Zn(j,ee)}function iR(j,ee){if(typeof j!="function")throw new ir(E);return ee=ee==null?0:zo(Br(ee),0),Zn(function(ce){var xe=ce[ee],Be=zu(ce,0,ee);return xe&&ua(Be,xe),Do(j,this,Be)})}function q0(j,ee,ce){var xe=!0,Be=!0;if(typeof j!="function")throw new ir(E);return Gi(ce)&&(xe="leading"in ce?!!ce.leading:xe,Be="trailing"in ce?!!ce.trailing:Be),pp(j,ee,{leading:xe,maxWait:ee,trailing:Be})}function oR(j){return z0(j,1)}function aR(j,ee){return yp(Cv(ee),j)}function sR(){if(!arguments.length)return[];var j=arguments[0];return Tr(j)?j:[j]}function lR(j){return Ws(j,f)}function Zv(j,ee){return ee=typeof ee=="function"?ee:k,Ws(j,f,ee)}function uR(j){return Ws(j,_|f)}function hR(j,ee){return ee=typeof ee=="function"?ee:k,Ws(j,_|f,ee)}function cR(j,ee){return ee==null||au(j,ee,ia(ee))}function gl(j,ee){return j===ee||j!==j&&ee!==ee}var Qv=tp(Sf),dR=tp(function(j,ee){return j>=ee}),Vl=Hu(function(){return arguments}())?Hu:function(j){return ao(j)&&In.call(j,"callee")&&!Ft.call(j,"callee")},Tr=ft.isArray,fR=ds?de(ds):Ii;function Aa(j){return j!=null&&Lf(j.length)&&!ju(j)}function _o(j){return ao(j)&&Aa(j)}function Y0(j){return j===!0||j===!1||ao(j)&&Xa(j)==ne}var gu=Bl||vy,gR=fs?de(fs):Xb;function Id(j){return ao(j)&&j.nodeType===1&&!xd(j)}function ey(j){if(j==null)return!0;if(Aa(j)&&(Tr(j)||typeof j=="string"||typeof j.splice=="function"||gu(j)||Tc(j)||Vl(j)))return!j.length;var ee=xr(j);if(ee==be||ee==_e)return!j.size;if(yd(j))return!If(j).length;for(var ce in j)if(In.call(j,ce))return!1;return!0}function pR(j,ee){return Fe(j,ee)}function K0(j,ee,ce){ce=typeof ce=="function"?ce:k;var xe=ce?ce(j,ee):k;return xe===k?Fe(j,ee,k,ce):!!xe}function wp(j){if(!ao(j))return!1;var ee=Xa(j);return ee==we||ee==fe||typeof j.message=="string"&&typeof j.name=="string"&&!xd(j)}function bp(j){return typeof j=="number"&&$s(j)}function ju(j){if(!Gi(j))return!1;var ee=Xa(j);return ee==pe||ee==ve||ee==ie||ee==Se}function ty(j){return typeof j=="number"&&j==Br(j)}function Lf(j){return typeof j=="number"&&j>-1&&j%1==0&&j<=P}function Gi(j){var ee=typeof j;return j!=null&&(ee=="object"||ee=="function")}function ao(j){return j!=null&&typeof j=="object"}var Rh=Dl?de(Dl):gv;function X0(j,ee){return j===ee||Hn(j,ee,Ev(ee))}function ny(j,ee,ce){return ce=typeof ce=="function"?ce:k,Hn(j,ee,Ev(ee),ce)}function mR(j){return J0(j)&&j!=+j}function vR(j){if(tk(j))throw new Yt(G);return jn(j)}function yR(j){return j===null}function ry(j){return j==null}function J0(j){return typeof j=="number"||ao(j)&&Xa(j)==Ee}function xd(j){if(!ao(j)||Xa(j)!=Ne)return!1;var ee=Gn(j);if(ee===null)return!0;var ce=In.call(ee,"constructor")&&ee.constructor;return typeof ce=="function"&&ce instanceof ce&&Ln.call(ce)==Wi}var xc=gr?de(gr):ei;function Cp(j){return ty(j)&&j>=-9007199254740991&&j<=P}var Z0=Xe?de(Xe):pv;function _p(j){return typeof j=="string"||!Tr(j)&&ao(j)&&Xa(j)==Ae}function js(j){return typeof j=="symbol"||ao(j)&&Xa(j)==ue}var Tc=co?de(co):mr;function wR(j){return j===k}function Q0(j){return ao(j)&&xr(j)==Pe}function bR(j){return ao(j)&&Xa(j)==Ve}var iy=tp(dd),eC=tp(function(j,ee){return j<=ee});function qu(j){if(!j)return[];if(Aa(j))return _p(j)?Pr(j):Ts(j);if($o&&j[$o])return Bn(j[$o]());var ee=xr(j),ce=ee==be?Kn:ee==_e?Nr:Ku;return ce(j)}function Yu(j){if(!j)return j===0?j:0;if(j=so(j),j===V||j===-1/0){var ee=j<0?-1:1;return ee*U}return j===j?j:0}function Br(j){var ee=Yu(j),ce=ee%1;return ee===ee?ce?ee-ce:ee:0}function tC(j){return j?Ch(Br(j),0,Z):0}function so(j){if(typeof j=="number")return j;if(js(j))return Y;if(Gi(j)){var ee=typeof j.valueOf=="function"?j.valueOf():j;j=Gi(ee)?ee+"":ee}if(typeof j!="string")return j===0?j:+j;j=ae(j);var ce=ri.test(j);return ce||ba.test(j)?gc(j.slice(2),ce?2:8):$r.test(j)?Y:+j}function nC(j){return uu(j,Rs(j))}function CR(j){return j?Ch(Br(j),-9007199254740991,P):j===0?j:0}function wi(j){return j==null?"":Gs(j)}var _R=pd(function(j,ee){if(yd(ee)||Aa(ee)){uu(ee,ia(ee),j);return}for(var ce in ee)In.call(ee,ce)&&ou(j,ce,ee[ce])}),rC=pd(function(j,ee){uu(ee,Rs(ee),j)}),Td=pd(function(j,ee,ce,xe){uu(ee,Rs(ee),j,xe)}),Sp=pd(function(j,ee,ce,xe){uu(ee,ia(ee),j,xe)}),iC=Di(wf);function kc(j,ee){var ce=ud(j);return ee==null?ce:Ss(ce,ee)}var oC=Zn(function(j,ee){j=kn(j);var ce=-1,xe=ee.length,Be=xe>2?ee[2]:k;for(Be&&Qa(ee[0],ee[1],Be)&&(xe=1);++ce<xe;)for(var Ue=ee[ce],Je=Rs(Ue),tt=-1,ct=Je.length;++tt<ct;){var $t=Je[tt],Wt=j[$t];(Wt===k||gl(Wt,rn[$t])&&!In.call(j,$t))&&(j[$t]=Ue[$t])}return j}),oy=Zn(function(j){return j.push(k,p0),Do(Ec,k,j)});function aC(j,ee){return Bi(j,or(ee,3),Ll)}function SR(j,ee){return Bi(j,or(ee,3),Cf)}function sC(j,ee){return j==null?j:Gg(j,or(ee,3),Rs)}function lo(j,ee){return j==null?j:qb(j,or(ee,3),Rs)}function IR(j,ee){return j&&Ll(j,or(ee,3))}function xR(j,ee){return j&&Cf(j,or(ee,3))}function TR(j){return j==null?[]:_f(j,ia(j))}function kR(j){return j==null?[]:_f(j,Rs(j))}function ay(j,ee,ce){var xe=j==null?k:Sh(j,ee);return xe===k?ce:xe}function RR(j,ee){return j!=null&&Dv(j,ee,Kb)}function sy(j,ee){return j!=null&&Dv(j,ee,LT)}var ER=c0(function(j,ee,ce){ee!=null&&typeof ee.toString!="function"&&(ee=bo.call(ee)),j[ee]=ce},dy(Es)),AR=c0(function(j,ee,ce){ee!=null&&typeof ee.toString!="function"&&(ee=bo.call(ee)),In.call(j,ee)?j[ee].push(ce):j[ee]=[ce]},or),MR=Zn(lu);function ia(j){return Aa(j)?Ub(j):If(j)}function Rs(j){return Aa(j)?Ub(j,!0):Lr(j)}function DR(j,ee){var ce={};return ee=or(ee,3),Ll(j,function(xe,Be,Ue){Is(ce,ee(xe,Be,Ue),xe)}),ce}function ly(j,ee){var ce={};return ee=or(ee,3),Ll(j,function(xe,Be,Ue){Is(ce,Be,ee(xe,Be,Ue))}),ce}var Rc=pd(function(j,ee,ce){Fl(j,ee,ce)}),Ec=pd(function(j,ee,ce,xe){Fl(j,ee,ce,xe)}),OR=Di(function(j,ee){var ce={};if(j==null)return ce;var xe=!1;ee=Wn(ee,function(Ue){return Ue=xs(Ue,j),xe||(xe=Ue.length>1),Ue}),uu(j,kv(j),ce),xe&&(ce=Ws(ce,_|p|f,GT));for(var Be=ee.length;Be--;)Cc(ce,ee[Be]);return ce});function NR(j,ee){return lC(j,vp(or(ee)))}var PR=Di(function(j,ee){return j==null?{}:bc(j,ee)});function lC(j,ee){if(j==null)return{};var ce=Wn(kv(j),function(xe){return[xe]});return ee=or(ee),fd(j,ce,function(xe,Be){return ee(xe,Be[0])})}function BR(j,ee,ce){ee=xs(ee,j);var xe=-1,Be=ee.length;for(Be||(Be=1,j=k);++xe<Be;){var Ue=j==null?k:j[hu(ee[xe])];Ue===k&&(xe=Be,Ue=ce),j=ju(Ue)?Ue.call(j):Ue}return j}function LR(j,ee,ce){return j==null?j:Zi(j,ee,ce)}function FR(j,ee,ce,xe){return xe=typeof xe=="function"?xe:k,j==null?j:Zi(j,ee,ce,xe)}var uC=f0(ia),hC=f0(Rs);function VR(j,ee,ce){var xe=Tr(j),Be=xe||gu(j)||Tc(j);if(ee=or(ee,4),ce==null){var Ue=j&&j.constructor;Be?ce=xe?new Ue:[]:Gi(j)?ce=ju(Ue)?ud(Gn(j)):{}:ce={}}return(Be?It:Ll)(j,function(Je,tt,ct){return ee(ce,Je,tt,ct)}),ce}function HR(j,ee){return j==null?!0:Cc(j,ee)}function Ip(j,ee,ce){return j==null?j:kf(j,ee,Cv(ce))}function Eh(j,ee,ce,xe){return xe=typeof xe=="function"?xe:k,j==null?j:kf(j,ee,Cv(ce),xe)}function Ku(j){return j==null?[]:Ce(j,ia(j))}function kd(j){return j==null?[]:Ce(j,Rs(j))}function $R(j,ee,ce){return ce===k&&(ce=ee,ee=k),ce!==k&&(ce=so(ce),ce=ce===ce?ce:0),ee!==k&&(ee=so(ee),ee=ee===ee?ee:0),Ch(so(j),ee,ce)}function zR(j,ee,ce){return ee=Yu(ee),ce===k?(ce=ee,ee=0):ce=Yu(ce),j=so(j),dv(j,ee,ce)}function WR(j,ee,ce){if(ce&&typeof ce!="boolean"&&Qa(j,ee,ce)&&(ee=ce=k),ce===k&&(typeof ee=="boolean"?(ce=ee,ee=k):typeof j=="boolean"&&(ce=j,j=k)),j===k&&ee===k?(j=0,ee=1):(j=Yu(j),ee===k?(ee=j,j=0):ee=Yu(ee)),j>ee){var xe=j;j=ee,ee=xe}if(ce||j%1||ee%1){var Be=ov();return Oo(j+Be*(ee-j+fc("1e-"+((Be+"").length-1))),ee)}return _n(j,ee)}var UR=md(function(j,ee,ce){return ee=ee.toLowerCase(),j+(ce?cC(ee):ee)});function cC(j){return cy(wi(j).toLowerCase())}function dC(j){return j=wi(j),j&&j.replace(no,dt).replace(cc,"")}function GR(j,ee,ce){j=wi(j),ee=Gs(ee);var xe=j.length;ce=ce===k?xe:Ch(Br(ce),0,xe);var Be=ce;return ce-=ee.length,ce>=0&&j.slice(ce,Be)==ee}function jR(j){return j=wi(j),j&&On.test(j)?j.replace(Un,Nt):j}function qR(j){return j=wi(j),j&&wt.test(j)?j.replace(vt,"\\$&"):j}var YR=md(function(j,ee,ce){return j+(ce?"-":"")+ee.toLowerCase()}),KR=md(function(j,ee,ce){return j+(ce?" ":"")+ee.toLowerCase()}),XR=s0("toLowerCase");function fC(j,ee,ce){j=wi(j),ee=Br(ee);var xe=ee?Wr(j):0;if(!ee||xe>=ee)return j;var Be=(ee-xe)/2;return Zg(pf(Be),ce)+j+Zg(nu(Be),ce)}function uy(j,ee,ce){j=wi(j),ee=Br(ee);var xe=ee?Wr(j):0;return ee&&xe<ee?j+Zg(ee-xe,ce):j}function JR(j,ee,ce){j=wi(j),ee=Br(ee);var xe=ee?Wr(j):0;return ee&&xe<ee?Zg(ee-xe,ce)+j:j}function ZR(j,ee,ce){return ce||ee==null?ee=0:ee&&(ee=+ee),TT(wi(j).replace(Ct,""),ee||0)}function hy(j,ee,ce){return(ce?Qa(j,ee,ce):ee===k)?ee=1:ee=Br(ee),Ja(wi(j),ee)}function QR(){var j=arguments,ee=wi(j[0]);return j.length<3?ee:ee.replace(j[1],j[2])}var eE=md(function(j,ee,ce){return j+(ce?"_":"")+ee.toLowerCase()});function tE(j,ee,ce){return ce&&typeof ce!="number"&&Qa(j,ee,ce)&&(ee=ce=k),ce=ce===k?Z:ce>>>0,ce?(j=wi(j),j&&(typeof ee=="string"||ee!=null&&!xc(ee))&&(ee=Gs(ee),!ee&&Vt(j))?zu(Pr(j),0,ce):j.split(ee,ce)):[]}var nE=md(function(j,ee,ce){return j+(ce?" ":"")+cy(ee)});function rE(j,ee,ce){return j=wi(j),ce=ce==null?0:Ch(Br(ce),0,j.length),ee=Gs(ee),j.slice(ce,ce+ee.length)==ee}function iE(j,ee,ce){var xe=$e.templateSettings;ce&&Qa(j,ee,ce)&&(ee=k),j=wi(j),ee=Td({},ee,xe,g0);var Be=Td({},ee.imports,xe.imports,g0),Ue=ia(Be),Je=Ce(Be,Ue),tt,ct,$t=0,Wt=ee.interpolate||il,Qt="__p += '",Tn=hr((ee.escape||il).source+"|"+Wt.source+"|"+(Wt===Gt?An:il).source+"|"+(ee.evaluate||il).source+"|$","g"),Qn="//# sourceURL="+(In.call(ee,"sourceURL")?(ee.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++_a+"]")+`
`;j.replace(Tn,function(cr,Kr,ni,qs,es,Ys){return ni||(ni=qs),Qt+=j.slice($t,Ys).replace(Rl,tn),Kr&&(tt=!0,Qt+=`' +
__e(`+Kr+`) +
'`),es&&(ct=!0,Qt+=`';
`+es+`;
__p += '`),ni&&(Qt+=`' +
((__t = (`+ni+`)) == null ? '' : __t) +
'`),$t=Ys+cr.length,cr}),Qt+=`';
`;var tr=In.call(ee,"variable")&&ee.variable;if(!tr)Qt=`with (obj) {
`+Qt+`
}
`;else if(zt.test(tr))throw new Yt(A);Qt=(ct?Qt.replace(Vn,""):Qt).replace(bn,"$1").replace(En,"$1;"),Qt="function("+(tr||"obj")+`) {
`+(tr?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(tt?", __e = _.escape":"")+(ct?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+Qt+`return __p
}`;var Fr=pC(function(){return Cn(Ue,Qn+"return "+Qt).apply(k,Je)});if(Fr.source=Qt,wp(Fr))throw Fr;return Fr}function oE(j){return wi(j).toLowerCase()}function aE(j){return wi(j).toUpperCase()}function sE(j,ee,ce){if(j=wi(j),j&&(ce||ee===k))return ae(j);if(!j||!(ee=Gs(ee)))return j;var xe=Pr(j),Be=Pr(ee),Ue=He(xe,Be),Je=Ye(xe,Be)+1;return zu(xe,Ue,Je).join("")}function lE(j,ee,ce){if(j=wi(j),j&&(ce||ee===k))return j.slice(0,_r(j)+1);if(!j||!(ee=Gs(ee)))return j;var xe=Pr(j),Be=Ye(xe,Pr(ee))+1;return zu(xe,0,Be).join("")}function uE(j,ee,ce){if(j=wi(j),j&&(ce||ee===k))return j.replace(Ct,"");if(!j||!(ee=Gs(ee)))return j;var xe=Pr(j),Be=He(xe,Pr(ee));return zu(xe,Be).join("")}function hE(j,ee){var ce=T,xe=D;if(Gi(ee)){var Be="separator"in ee?ee.separator:Be;ce="length"in ee?Br(ee.length):ce,xe="omission"in ee?Gs(ee.omission):xe}j=wi(j);var Ue=j.length;if(Vt(j)){var Je=Pr(j);Ue=Je.length}if(ce>=Ue)return j;var tt=ce-Wr(xe);if(tt<1)return xe;var ct=Je?zu(Je,0,tt).join(""):j.slice(0,tt);if(Be===k)return ct+xe;if(Je&&(tt+=ct.length-tt),xc(Be)){if(j.slice(tt).search(Be)){var $t,Wt=ct;for(Be.global||(Be=hr(Be.source,wi(lr.exec(Be))+"g")),Be.lastIndex=0;$t=Be.exec(Wt);)var Qt=$t.index;ct=ct.slice(0,Qt===k?tt:Qt)}}else if(j.indexOf(Gs(Be),tt)!=tt){var Tn=ct.lastIndexOf(Be);Tn>-1&&(ct=ct.slice(0,Tn))}return ct+xe}function cE(j){return j=wi(j),j&&Pn.test(j)?j.replace(pn,vi):j}var dE=md(function(j,ee,ce){return j+(ce?" ":"")+ee.toUpperCase()}),cy=s0("toUpperCase");function gC(j,ee,ce){return j=wi(j),ee=ce?k:ee,ee===k?Mn(j)?ur(j):Nl(j):j.match(ee)||[]}var pC=Zn(function(j,ee){try{return Do(j,k,ee)}catch(ce){return wp(ce)?ce:new Yt(ce)}}),fE=Di(function(j,ee){return It(ee,function(ce){ce=hu(ce),Is(j,ce,gp(j[ce],j))}),j});function gE(j){var ee=j==null?0:j.length,ce=or();return j=ee?Wn(j,function(xe){if(typeof xe[1]!="function")throw new ir(E);return[ce(xe[0]),xe[1]]}):[],Zn(function(xe){for(var Be=-1;++Be<ee;){var Ue=j[Be];if(Do(Ue[0],this,xe))return Do(Ue[1],this,xe)}})}function pE(j){return lv(Ws(j,_))}function dy(j){return function(){return j}}function mE(j,ee){return j==null||j!==j?ee:j}var vE=h0(),yE=h0(!0);function Es(j){return j}function fy(j){return xt(typeof j=="function"?j:Ws(j,_))}function Ff(j){return Jb(Ws(j,_))}function wE(j,ee){return jg(j,Ws(ee,_))}var bE=Zn(function(j,ee){return function(ce){return lu(ce,j,ee)}}),CE=Zn(function(j,ee){return function(ce){return lu(j,ce,ee)}});function gy(j,ee,ce){var xe=ia(ee),Be=_f(ee,xe);ce==null&&!(Gi(ee)&&(Be.length||!xe.length))&&(ce=ee,ee=j,j=this,Be=_f(ee,ia(ee)));var Ue=!(Gi(ce)&&"chain"in ce)||!!ce.chain,Je=ju(j);return It(Be,function(tt){var ct=ee[tt];j[tt]=ct,Je&&(j.prototype[tt]=function(){var $t=this.__chain__;if(Ue||$t){var Wt=j(this.__wrapped__),Qt=Wt.__actions__=Ts(this.__actions__);return Qt.push({func:ct,args:arguments,thisArg:j}),Wt.__chain__=$t,Wt}return ct.apply(j,ua([this.value()],arguments))})}),j}function _E(){return zr._===this&&(zr._=Fi),this}function py(){}function SE(j){return j=Br(j),Zn(function(ee){return Ih(ee,j)})}var IE=Iv(Wn),xE=Iv(Bu),TE=Iv(ms);function mC(j){return Nv(j)?Fu(hu(j)):Zb(j)}function vC(j){return function(ee){return j==null?k:Sh(j,ee)}}var kE=ep(),RE=ep(!0);function my(){return[]}function vy(){return!1}function Ah(){return{}}function EE(){return""}function AE(){return!0}function ME(j,ee){if(j=Br(j),j<1||j>P)return[];var ce=Z,xe=Oo(j,Z);ee=or(ee),j-=Z;for(var Be=na(xe,ee);++ce<j;)ee(ce);return Be}function DE(j){return Tr(j)?Wn(j,hu):js(j)?[j]:Ts(bd(wi(j)))}function OE(j){var ee=++Gr;return wi(j)+ee}var yC=Jg(function(j,ee){return j+ee},0),NE=xv("ceil"),PE=Jg(function(j,ee){return j/ee},1),yy=xv("floor");function BE(j){return j&&j.length?bf(j,Es,Sf):k}function LE(j,ee){return j&&j.length?bf(j,or(ee,2),Sf):k}function FE(j){return Ia(j,Es)}function VE(j,ee){return Ia(j,or(ee,2))}function HE(j){return j&&j.length?bf(j,Es,dd):k}function $E(j,ee){return j&&j.length?bf(j,or(ee,2),dd):k}var zE=Jg(function(j,ee){return j*ee},1),wy=xv("round"),wC=Jg(function(j,ee){return j-ee},0);function bC(j){return j&&j.length?ta(j,Es):0}function CC(j,ee){return j&&j.length?ta(j,or(ee,2)):0}return $e.after=Zk,$e.ary=z0,$e.assign=_R,$e.assignIn=rC,$e.assignInWith=Td,$e.assignWith=Sp,$e.at=iC,$e.before=Sd,$e.bind=gp,$e.bindAll=fE,$e.bindKey=W0,$e.castArray=sR,$e.chain=jv,$e.chunk=op,$e.compact=lk,$e.concat=I0,$e.cond=gE,$e.conforms=pE,$e.constant=dy,$e.countBy=Sc,$e.create=kc,$e.curry=U0,$e.curryRight=G0,$e.debounce=pp,$e.defaults=oC,$e.defaultsDeep=oy,$e.defer=Qk,$e.delay=fu,$e.difference=uk,$e.differenceBy=hk,$e.differenceWith=ck,$e.drop=dk,$e.dropRight=fk,$e.dropRightWhile=gk,$e.dropWhile=pk,$e.fill=mk,$e.filter=$k,$e.flatMap=zk,$e.flatMapDeep=up,$e.flatMapDepth=Wk,$e.flatten=k0,$e.flattenDeep=vk,$e.flattenDepth=yk,$e.flip=eR,$e.flow=vE,$e.flowRight=yE,$e.fromPairs=wk,$e.functions=TR,$e.functionsIn=kR,$e.groupBy=cp,$e.initial=Ck,$e.intersection=E0,$e.intersectionBy=A0,$e.intersectionWith=_k,$e.invert=ER,$e.invertBy=AR,$e.invokeMap=$0,$e.iteratee=fy,$e.keyBy=Nf,$e.keys=ia,$e.keysIn=Rs,$e.map=Pf,$e.mapKeys=DR,$e.mapValues=ly,$e.matches=Ff,$e.matchesProperty=wE,$e.memoize=mp,$e.merge=Rc,$e.mergeWith=Ec,$e.method=bE,$e.methodOf=CE,$e.mixin=gy,$e.negate=vp,$e.nthArg=SE,$e.omit=OR,$e.omitBy=NR,$e.once=tR,$e.orderBy=Gk,$e.over=IE,$e.overArgs=nR,$e.overEvery=xE,$e.overSome=TE,$e.partial=yp,$e.partialRight=j0,$e.partition=Gu,$e.pick=PR,$e.pickBy=lC,$e.property=mC,$e.propertyOf=vC,$e.pull=Fv,$e.pullAll=ap,$e.pullAllBy=Vv,$e.pullAllWith=M0,$e.pullAt=Tk,$e.range=kE,$e.rangeRight=RE,$e.rearg=Bf,$e.reject=Yk,$e.remove=D0,$e.rest=rR,$e.reverse=Hv,$e.sampleSize=Xk,$e.set=LR,$e.setWith=FR,$e.shuffle=dp,$e.slice=kk,$e.sortBy=Jv,$e.sortedUniq=zv,$e.sortedUniqBy=N0,$e.split=tE,$e.spread=iR,$e.tail=P0,$e.take=Wv,$e.takeRight=B0,$e.takeRightWhile=Wo,$e.takeWhile=cu,$e.tap=Lk,$e.throttle=q0,$e.thru=Df,$e.toArray=qu,$e.toPairs=uC,$e.toPairsIn=hC,$e.toPath=DE,$e.toPlainObject=nC,$e.transform=VR,$e.unary=oR,$e.union=Uv,$e.unionBy=Ek,$e.unionWith=Cd,$e.uniq=L0,$e.uniqBy=F0,$e.uniqWith=Ak,$e.unset=HR,$e.unzip=Gv,$e.unzipWith=V0,$e.update=Ip,$e.updateWith=Eh,$e.values=Ku,$e.valuesIn=kd,$e.without=sp,$e.words=gC,$e.wrap=aR,$e.xor=Mk,$e.xorBy=Mf,$e.xorWith=Dk,$e.zip=Ok,$e.zipObject=Nk,$e.zipObjectDeep=Pk,$e.zipWith=Bk,$e.entries=uC,$e.entriesIn=hC,$e.extend=rC,$e.extendWith=Td,gy($e,$e),$e.add=yC,$e.attempt=pC,$e.camelCase=UR,$e.capitalize=cC,$e.ceil=NE,$e.clamp=$R,$e.clone=lR,$e.cloneDeep=uR,$e.cloneDeepWith=hR,$e.cloneWith=Zv,$e.conformsTo=cR,$e.deburr=dC,$e.defaultTo=mE,$e.divide=PE,$e.endsWith=GR,$e.eq=gl,$e.escape=jR,$e.escapeRegExp=qR,$e.every=H0,$e.find=_d,$e.findIndex=x0,$e.findKey=aC,$e.findLast=du,$e.findLastIndex=T0,$e.findLastKey=SR,$e.floor=yy,$e.forEach=Ic,$e.forEachRight=hp,$e.forIn=sC,$e.forInRight=lo,$e.forOwn=IR,$e.forOwnRight=xR,$e.get=ay,$e.gt=Qv,$e.gte=dR,$e.has=RR,$e.hasIn=sy,$e.head=R0,$e.identity=Es,$e.includes=Uk,$e.indexOf=bk,$e.inRange=zR,$e.invoke=MR,$e.isArguments=Vl,$e.isArray=Tr,$e.isArrayBuffer=fR,$e.isArrayLike=Aa,$e.isArrayLikeObject=_o,$e.isBoolean=Y0,$e.isBuffer=gu,$e.isDate=gR,$e.isElement=Id,$e.isEmpty=ey,$e.isEqual=pR,$e.isEqualWith=K0,$e.isError=wp,$e.isFinite=bp,$e.isFunction=ju,$e.isInteger=ty,$e.isLength=Lf,$e.isMap=Rh,$e.isMatch=X0,$e.isMatchWith=ny,$e.isNaN=mR,$e.isNative=vR,$e.isNil=ry,$e.isNull=yR,$e.isNumber=J0,$e.isObject=Gi,$e.isObjectLike=ao,$e.isPlainObject=xd,$e.isRegExp=xc,$e.isSafeInteger=Cp,$e.isSet=Z0,$e.isString=_p,$e.isSymbol=js,$e.isTypedArray=Tc,$e.isUndefined=wR,$e.isWeakMap=Q0,$e.isWeakSet=bR,$e.join=Sk,$e.kebabCase=YR,$e.last=fl,$e.lastIndexOf=Ik,$e.lowerCase=KR,$e.lowerFirst=XR,$e.lt=iy,$e.lte=eC,$e.max=BE,$e.maxBy=LE,$e.mean=FE,$e.meanBy=VE,$e.min=HE,$e.minBy=$E,$e.stubArray=my,$e.stubFalse=vy,$e.stubObject=Ah,$e.stubString=EE,$e.stubTrue=AE,$e.multiply=zE,$e.nth=xk,$e.noConflict=_E,$e.noop=py,$e.now=fp,$e.pad=fC,$e.padEnd=uy,$e.padStart=JR,$e.parseInt=ZR,$e.random=WR,$e.reduce=jk,$e.reduceRight=qk,$e.repeat=hy,$e.replace=QR,$e.result=BR,$e.round=wy,$e.runInContext=nt,$e.sample=Kk,$e.size=Jk,$e.snakeCase=eE,$e.some=Xv,$e.sortedIndex=O0,$e.sortedIndexBy=Rk,$e.sortedIndexOf=$v,$e.sortedLastIndex=fa,$e.sortedLastIndexBy=go,$e.sortedLastIndexOf=kh,$e.startCase=nE,$e.startsWith=rE,$e.subtract=wC,$e.sum=bC,$e.sumBy=CC,$e.template=iE,$e.times=ME,$e.toFinite=Yu,$e.toInteger=Br,$e.toLength=tC,$e.toLower=oE,$e.toNumber=so,$e.toSafeInteger=CR,$e.toString=wi,$e.toUpper=aE,$e.trim=sE,$e.trimEnd=lE,$e.trimStart=uE,$e.truncate=hE,$e.unescape=cE,$e.uniqueId=OE,$e.upperCase=dE,$e.upperFirst=cy,$e.each=Ic,$e.eachRight=hp,$e.first=R0,gy($e,function(){var j={};return Ll($e,function(ee,ce){In.call($e.prototype,ce)||(j[ce]=ee)}),j}(),{chain:!1}),$e.VERSION=F,It(["bind","bindKey","curry","curryRight","partial","partialRight"],function(j){$e[j].placeholder=$e}),It(["drop","take"],function(j,ee){jr.prototype[j]=function(ce){ce=ce===k?1:zo(Br(ce),0);var xe=this.__filtered__&&!ee?new jr(this):this.clone();return xe.__filtered__?xe.__takeCount__=Oo(ce,xe.__takeCount__):xe.__views__.push({size:Oo(ce,Z),type:j+(xe.__dir__<0?"Right":"")}),xe},jr.prototype[j+"Right"]=function(ce){return this.reverse()[j](ce).reverse()}}),It(["filter","map","takeWhile"],function(j,ee){var ce=ee+1,xe=ce==z||ce==$;jr.prototype[j]=function(Be){var Ue=this.clone();return Ue.__iteratees__.push({iteratee:or(Be,3),type:ce}),Ue.__filtered__=Ue.__filtered__||xe,Ue}}),It(["head","last"],function(j,ee){var ce="take"+(ee?"Right":"");jr.prototype[j]=function(){return this[ce](1).value()[0]}}),It(["initial","tail"],function(j,ee){var ce="drop"+(ee?"":"Right");jr.prototype[j]=function(){return this.__filtered__?new jr(this):this[ce](1)}}),jr.prototype.compact=function(){return this.filter(Es)},jr.prototype.find=function(j){return this.filter(j).head()},jr.prototype.findLast=function(j){return this.reverse().find(j)},jr.prototype.invokeMap=Zn(function(j,ee){return typeof j=="function"?new jr(this):this.map(function(ce){return lu(ce,j,ee)})}),jr.prototype.reject=function(j){return this.filter(vp(or(j)))},jr.prototype.slice=function(j,ee){j=Br(j);var ce=this;return ce.__filtered__&&(j>0||ee<0)?new jr(ce):(j<0?ce=ce.takeRight(-j):j&&(ce=ce.drop(j)),ee!==k&&(ee=Br(ee),ce=ee<0?ce.dropRight(-ee):ce.take(ee-j)),ce)},jr.prototype.takeRightWhile=function(j){return this.reverse().takeWhile(j).reverse()},jr.prototype.toArray=function(){return this.take(Z)},Ll(jr.prototype,function(j,ee){var ce=/^(?:filter|find|map|reject)|While$/.test(ee),xe=/^(?:head|last)$/.test(ee),Be=$e[xe?"take"+(ee=="last"?"Right":""):ee],Ue=xe||/^find/.test(ee);Be&&($e.prototype[ee]=function(){var Je=this.__wrapped__,tt=xe?[1]:arguments,ct=Je instanceof jr,$t=tt[0],Wt=ct||Tr(Je),Qt=function(Kr){var ni=Be.apply($e,ua([Kr],tt));return xe&&Tn?ni[0]:ni};Wt&&ce&&typeof $t=="function"&&$t.length!=1&&(ct=Wt=!1);var Tn=this.__chain__,Qn=!!this.__actions__.length,tr=Ue&&!Tn,Fr=ct&&!Qn;if(!Ue&&Wt){Je=Fr?Je:new jr(this);var cr=j.apply(Je,tt);return cr.__actions__.push({func:Df,args:[Qt],thisArg:k}),new cl(cr,Tn)}return tr&&Fr?j.apply(this,tt):(cr=this.thru(Qt),tr?xe?cr.value()[0]:cr.value():cr)})}),It(["pop","push","shift","sort","splice","unshift"],function(j){var ee=Er[j],ce=/^(?:push|sort|unshift)$/.test(j)?"tap":"thru",xe=/^(?:pop|shift)$/.test(j);$e.prototype[j]=function(){var Be=arguments;if(xe&&!this.__chain__){var Ue=this.value();return ee.apply(Tr(Ue)?Ue:[],Be)}return this[ce](function(Je){return ee.apply(Tr(Je)?Je:[],Be)})}}),Ll(jr.prototype,function(j,ee){var ce=$e[ee];if(ce){var xe=ce.name+"";In.call(wh,xe)||(wh[xe]=[]),wh[xe].push({name:ee,func:ce})}}),wh[Xg(k,b).name]=[{name:"wrapper",func:k}],jr.prototype.clone=Fb,jr.prototype.reverse=ET,jr.prototype.value=AT,$e.prototype.at=Fk,$e.prototype.chain=Vk,$e.prototype.commit=lp,$e.prototype.next=Hk,$e.prototype.plant=Yv,$e.prototype.reverse=Kv,$e.prototype.toJSON=$e.prototype.valueOf=$e.prototype.value=Of,$e.prototype.first=$e.prototype.head,$o&&($e.prototype[$o]=qv),$e},br=Dn();la?((la.exports=br)._=br,Ua._=br):zr._=br}).call($ye)}(sb,sb.exports)),sb.exports}var Cj;function Ng(){if(Cj)return eS;Cj=1,Object.defineProperty(eS,"__esModule",{value:!0});var x=fr(),M=_i(),k=ht();function F(B){return k.defineComponent({mixins:[x.inject("config-provider")],props:{configConsumer:{type:String,default:void 0},disableConfigOverride:{type:Object,default:()=>({})}},data:()=>({}),computed:{componentProviderConfigValue(){return M.merge({},this?.["config-provider"]?.instance?.[B]?.all?.value,this?.["config-provider"]?.instance?.[B]?.[this.innerConfigConsumer]?.value)},managerProviderConfigValue(){return M.merge(this.$configManager?.props?.[B]?.[this.innerConfigConsumer]?.value,this.$configManager?.props?.[B]?.all?.value)},configValue(){return M.merge(this.managerProviderConfigValue,this.componentProviderConfigValue)},innerConfigConsumer(){return""}},methods:{getConfigValue(G){return this.disableConfigOverride?.[G]?this[G]:this.configValue?.[G]??this[G]}}})}return eS.useConfigConsumer=F,eS}var tS={},_j;function ac(){if(_j)return tS;_j=1,Object.defineProperty(tS,"__esModule",{value:!0});function x(M){return M}return tS.definePropType=x,tS}var Sj;function zye(){return Sj||(Sj=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Ur(),k=zF(),F=Kt(),B=Ng(),G=ac(),E=ht();const A=["normal","thin-rect"];var u=E.defineComponent({name:"Icon",mixins:[B.useConfigConsumer("icon")],props:{svgIcon:{type:G.definePropType(Object),default:()=>null},name:{type:String,default:void 0},size:{type:G.definePropType([String,Array]),default:"normal",validator(o){return F.isArray(o)||A.includes(o)}},type:{type:G.definePropType(String),default:k.ICON_TYPE.FOLLOW_MANAGER,validator(o){return Object.values(k.ICON_TYPE).includes(o)}},svgIconSet:{type:[Boolean,String],default:!1},sprite:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},ariaHidden:{type:Boolean,default:!0},ariaLabel:{type:String,default:void 0}},computed:{innerAriaHidden(){return F.isString(this.ariaLabel)&&this.ariaLabel.length>0?!1:this.ariaHidden},innerSize(){return this.getConfigValue("size")},innerSvgIconSet(){return this.getConfigValue("svgIconSet")},innerSvgIcon(){return this.getConfigValue("svgIcon")},innerType(){const o=this.getConfigValue("type");return o===k.ICON_TYPE.FOLLOW_MANAGER?this.$iconManager.iconType:o},innerSprite(){return this.getConfigValue("sprite")},innerDisabled(){return this.getConfigValue("disabled")},innerConfigConsumer(){return this.configConsumer||this.name},iconCls(){return["v-icon",...this.name?[this.name]:[],{[`icon-${this.innerSvgIconSet}`]:this.isSvg&&this.innerSvgIconSet,[`v-icon-size-${this.innerSize}`]:!this.isSvg&&!F.isArray(this.innerSize),disabled:this.innerDisabled,"is-svg":this.isSvg,"is-bkg":this.isBkg}]},iconStyle(){return{width:F.isArray(this.innerSize)?`${this.innerSize[0]}px`:void 0,height:F.isArray(this.innerSize)?`${this.innerSize[1]}px`:void 0}},isSvg(){return this.innerType===k.ICON_TYPE.SVG},isBkg(){return this.innerType===k.ICON_TYPE.BKG},svgComponent(){const o=this.innerSvgIcon??this.$iconManager.get(this.name);return o||M.remind(`${this.name} icon is not registered into icon manager.`),o},svgProps(){return{width:F.isArray(this.innerSize)?+this.innerSize[0]:void 0,height:F.isArray(this.innerSize)?+this.innerSize[1]:void 0}},isComponentSvg(){return F.isVueComponent(this.svgComponent)},isHtmlSvg(){return F.isString(this.svgComponent)}},beforeCreate(){this.$iconManager||M.remind("please import and use IconManagerPlugin when you are in tree-shaking mode or svg icon will unavailable.")},methods:{focus(){this.$el?.focus()}}});x.default=u}(ON)),ON}var NN={},Ij;function St(){return Ij||(Ij=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=(k,F)=>{const B=k.__vccOpts||k;for(const[G,E]of F)B[G]=E;return B};x.default=M}(NN)),NN}var xj;function ls(){return xj||(xj=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=zye(),k=ht(),F=St();const B=["syno-id","aria-hidden","aria-label","innerHTML"],G=["syno-id","aria-hidden","aria-label"];function E(u,o,S,_,p,f){return u.isSvg&&!u.innerSprite&&u.isHtmlSvg?(k.openBlock(),k.createElementBlock("i",{key:0,class:k.normalizeClass(u.iconCls),style:k.normalizeStyle(u.iconStyle),"syno-id":u.synoId,"aria-hidden":u.innerAriaHidden,"aria-label":u.ariaLabel,innerHTML:u.svgComponent},null,14,B)):(k.openBlock(),k.createElementBlock("i",{key:1,class:k.normalizeClass(u.iconCls),style:k.normalizeStyle(u.iconStyle),"syno-id":u.synoId,"aria-hidden":u.innerAriaHidden,"aria-label":u.ariaLabel},[u.isSvg&&!u.innerSprite&&u.isComponentSvg?(k.openBlock(),k.createBlock(k.resolveDynamicComponent(u.svgComponent),k.normalizeProps(k.mergeProps({key:0},u.svgProps)),null,16)):k.createCommentVNode("",!0),k.renderSlot(u.$slots,"default")],14,G))}var A=F.default(M.default,[["render",E]]);x.default=A}(DN)),DN}var Tj;function vr(){return Tj||(Tj=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=zF(),k=ls();function F(G,E){M.IconManager.register(G,E)}var B={components:{vIcon:k.default},props:{iconType:{type:String,default:M.ICON_TYPE.FOLLOW_MANAGER}},computed:{innerIconType(){return this.iconType===M.ICON_TYPE.FOLLOW_MANAGER?this.$iconManager.iconType:this.iconType},useSvgIcon(){return this.innerIconType===M.ICON_TYPE.SVG},useBkgIcon(){return this.innerIconType===M.ICON_TYPE.BKG}}};x.default=B,x.register=F}(MN)),MN}var Et={},kj;function kr(){if(kj)return Et;kj=1,Object.defineProperty(Et,"__esModule",{value:!0});let x={render:()=>null},M={render:()=>null},k={render:()=>null},F={render:()=>null},B={render:()=>null},G={render:()=>null},E={render:()=>null},A={render:()=>null},u={render:()=>null},o={render:()=>null},S={render:()=>null},_={render:()=>null},p={render:()=>null},f={render:()=>null},y={render:()=>null},d={render:()=>null},v={render:()=>null},b={render:()=>null},s={render:()=>null},l={render:()=>null},w={render:()=>null},I={render:()=>null},C={render:()=>null},h={render:()=>null},c={render:()=>null},m={render:()=>null},T={render:()=>null},D={render:()=>null},O={render:()=>null},N={render:()=>null},z={render:()=>null},H={render:()=>null},$={render:()=>null},V={render:()=>null},P={render:()=>null},U={render:()=>null},Y={render:()=>null},Z={render:()=>null},X={render:()=>null},J={render:()=>null},q={render:()=>null},te={render:()=>null},re={render:()=>null},ie={render:()=>null},ne={render:()=>null},le={render:()=>null},fe={render:()=>null},we={render:()=>null},pe={render:()=>null},ve={render:()=>null},be={render:()=>null},Ee={render:()=>null},Re={render:()=>null},Ne={render:()=>null},Le={render:()=>null},Se={render:()=>null},Ie={render:()=>null},_e={render:()=>null},Ae={render:()=>null},ue={render:()=>null},ke={render:()=>null},Pe={render:()=>null},Ve={render:()=>null},je={render:()=>null},it={render:()=>null},rt={render:()=>null},mt={render:()=>null},yt={render:()=>null},st={render:()=>null},Qe={render:()=>null},At={render:()=>null},Xt={render:()=>null},cn={render:()=>null},Sn={render:()=>null},Vn={render:()=>null},bn={render:()=>null},En={render:()=>null},pn={render:()=>null},Un={render:()=>null},Pn={render:()=>null},On={render:()=>null},Ht={render:()=>null},Mt={render:()=>null},Gt={render:()=>null},Bt={render:()=>null},Ge={render:()=>null},et={render:()=>null},vt={render:()=>null},wt={render:()=>null},Ct={render:()=>null},bt={render:()=>null},Rt={render:()=>null},Lt={render:()=>null},Dt={render:()=>null},Jt={render:()=>null},zt={render:()=>null},nn={render:()=>null},An={render:()=>null},lr={render:()=>null},$r={render:()=>null},ri={render:()=>null},zi={render:()=>null},ba={render:()=>null},Ro={render:()=>null},no={render:()=>null},il={render:()=>null},Rl={render:()=>null},Fa={render:()=>null},Va={render:()=>null},Au={render:()=>null},us={render:()=>null},ea={render:()=>null},Ha={render:()=>null},Mu={render:()=>null},hh={render:()=>null},Du={render:()=>null},qi={render:()=>null},$a={render:()=>null},hs={render:()=>null},ch={render:()=>null},di={render:()=>null},za={render:()=>null},Bs={render:()=>null},Ls={render:()=>null},Eo={render:()=>null},ol={render:()=>null},al={render:()=>null},Fs={render:()=>null};return Et.vIconAboutTickBlue=it,Et.vIconAdjust=l,Et.vIconAdvancedFilter=Bt,Et.vIconAdvancedFilterHover=Ge,Et.vIconAdvancedFilterNormal=et,Et.vIconAdvancedFilterOn=vt,Et.vIconAdvancedSearch=wt,Et.vIconAdvancedSearchHover=Ct,Et.vIconAdvancedSearchNormal=bt,Et.vIconAdvancedSearchOn=Rt,Et.vIconBetaLabelBlue=rt,Et.vIconBreadcrumbSlash=x,Et.vIconBreadcrumbSlash1=Qe,Et.vIconBtReturn=At,Et.vIconButtonArrowDown=M,Et.vIconCalendar=w,Et.vIconCardIcnAxS=Xt,Et.vIconCardIcnJcbS=cn,Et.vIconCardIcnMasterS=Sn,Et.vIconCardIcnOthersS=Vn,Et.vIconCardIcnRemittanceS=bn,Et.vIconCardIcnSepaS=En,Et.vIconCardIcnUnionpayS=pn,Et.vIconCardIcnVisaS=Un,Et.vIconCheckbox=Lt,Et.vIconCheckboxCheckedDisable=Dt,Et.vIconCheckboxCheckedError=Jt,Et.vIconCheckboxCheckedHover=zt,Et.vIconCheckboxCheckedNormal=nn,Et.vIconCheckboxIndeterminateDisable=An,Et.vIconCheckboxIndeterminateError=lr,Et.vIconCheckboxIndeterminateHover=$r,Et.vIconCheckboxIndeterminateNormal=ri,Et.vIconCheckboxUncheckedDisable=zi,Et.vIconCheckboxUncheckedError=ba,Et.vIconCheckboxUncheckedHover=Ro,Et.vIconCheckboxUncheckedNormal=no,Et.vIconChevronDown=I,Et.vIconChevronFirst=C,Et.vIconChevronLast=h,Et.vIconChevronLeft=c,Et.vIconChevronLeftDouble=m,Et.vIconChevronRight=T,Et.vIconChevronRightDouble=D,Et.vIconChevronUp=O,Et.vIconClear=N,Et.vIconColorPickerTransparentBg=Mt,Et.vIconColorReset=z,Et.vIconCopy=H,Et.vIconCut=$,Et.vIconDataviewChevronDown=V,Et.vIconDataviewChevronUp=P,Et.vIconDelete=U,Et.vIconEdit=Y,Et.vIconEditMenuMore=k,Et.vIconEmptyDefault=On,Et.vIconError=di,Et.vIconExpandTableChevronDown=F,Et.vIconExpandTableChevronUp=B,Et.vIconExpandTableHdd=G,Et.vIconEye=Z,Et.vIconEyeSlash=X,Et.vIconFilter=J,Et.vIconFolder=q,Et.vIconFolder1=hh,Et.vIconHamburger=te,Et.vIconHome=re,Et.vIconInfo=za,Et.vIconInputSteppersDown=E,Et.vIconInputSteppersUp=A,Et.vIconLabelDropdown=u,Et.vIconLabelRemove=o,Et.vIconLogoStorage=Pn,Et.vIconMinus=ie,Et.vIconMinusS=ne,Et.vIconMore=le,Et.vIconNormal=Bs,Et.vIconNotifyTrayIconImportant=mt,Et.vIconNotifyTrayIconSuggestion=yt,Et.vIconNotifyTrayIconTips=st,Et.vIconOverview=Ht,Et.vIconPaintBucket=fe,Et.vIconPen=we,Et.vIconPlus=pe,Et.vIconPlusS=ve,Et.vIconProcessing=Ls,Et.vIconRadio=il,Et.vIconRadioSelectedDisable=Rl,Et.vIconRadioSelectedError=Fa,Et.vIconRadioSelectedHover=Va,Et.vIconRadioSelectedNormal=Au,Et.vIconRadioUnselectedDisable=us,Et.vIconRadioUnselectedError=ea,Et.vIconRadioUnselectedHover=Ha,Et.vIconRadioUnselectedNormal=Mu,Et.vIconRefresh=be,Et.vIconScheduleTableColorClear=Gt,Et.vIconSearch=Ee,Et.vIconSettings=Re,Et.vIconSort=Ne,Et.vIconStatusError=Du,Et.vIconStatusInfo=qi,Et.vIconStatusNormal=$a,Et.vIconStatusProcessing=hs,Et.vIconStatusWarning=ch,Et.vIconSubmenuTriangleRight=S,Et.vIconTableDraggableL=_,Et.vIconTableDraggableS=p,Et.vIconTableHeaderMenu=f,Et.vIconTableSortDown=y,Et.vIconTableSortUp=d,Et.vIconTick=Le,Et.vIconToastClose=v,Et.vIconTreeArrowDown=b,Et.vIconTreeArrowRight=s,Et.vIconTriangleDown=Se,Et.vIconViewList=Ie,Et.vIconViewThumbnail=_e,Et.vIconViewTile=Ae,Et.vIconWarning=Eo,Et.vIconWhitetip=ol,Et.vIconWhitetipSmall=al,Et.vIconWhitetipSmallWhite=Fs,Et.vIconWintoolClose=ue,Et.vIconWintoolFullscreen=ke,Et.vIconWintoolHelp=Pe,Et.vIconWintoolMinimize=Ve,Et.vIconWintoolUnfullscreen=je,Et}var nS={},Rj;function N3(){if(Rj)return nS;Rj=1,Object.defineProperty(nS,"__esModule",{value:!0});const x="notification_inject";return nS.NOTIFICATION_INJECT_SYMBOL=x,nS}var Ej;function Wye(){return Ej||(Ej=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Xn(),k=ci(),F=Kt(),B=vr(),G=kr(),E=ht(),A=St(),u=N3();B.register("notify-tray-icon-tips",G.vIconNotifyTrayIconTips),B.register("notify-tray-icon-suggestion",G.vIconNotifyTrayIconSuggestion),B.register("notify-tray-icon-important",G.vIconNotifyTrayIconImportant);const o=E.defineComponent({name:"Notification",mixins:[k.default,B.default],inject:{[u.NOTIFICATION_INJECT_SYMBOL]:{default:F.noop}},props:{activeDuration:{type:Number,default:5e3,validator:s=>s>=0},easeOutDuration:{type:Number,default:500,validator:s=>s>=0},title:{type:String,default:""},body:{type:String,default:""},icon:{type:String,default:"",validator:s=>["","tips","suggestion","important"].includes(s)},fbar:{type:Boolean,default:!1},hasCancelBtn:{type:Boolean,default:!0},hasConfirmBtn:{type:Boolean,default:!0},cancel:{type:Function,default:F.noop},confirm:{type:Function,default:F.noop},cancelText:{type:String,default:void 0},confirmText:{type:String,default:void 0},beforeClose:{type:Function,default:F.noop},onClose:{type:Function,default:void 0}},data(){return{isShow:!1,isLeave:!1,visible:"visible",onDestroy:F.noop}},computed:{containerStyle(){return{visibility:this.visible}},panelCls(){return{show:this.isShow,leave:this.isLeave}},iconCls(){return["v-notification-icon",`v-notification-icon-${this.icon}`]}},[M.componentHooks.beforeUnmount](){SYNO.SDS.StatusNotifier.on("taskBarPanelShow",this.close,this)},created(){this[u.NOTIFICATION_INJECT_SYMBOL]&&(this[u.NOTIFICATION_INJECT_SYMBOL].notification=this)},mounted(){this.$refs.panel.style.top=`${-1*this.getHeight()-6}px`},methods:{setDestroyCallback(s){this.onDestroy=s},onClickMessage(s){SYNO.SDS.Utils.Notify.BindEvent(s)},async onClickClose(){if(await this.beforeClose()===!1)return!1;this.onClose&&this.onClose(),SYNO.SDS.NotifyMgr.unregister(this)},getIconType(){return this.icon?`notify-tray-icon-${this.icon}`:""},getHeight(){if(this.$el){let s=this.$el.style.display==="none";return Math.max(this.$el.offsetHeight,s?0:this.$el.clientHeight)||0}},setTop(s){this.$el&&(this.$el.style.top=`${s}px`)},show(){SYNO.SDS.NotifyMgr.register(this)},close(){this.isLeave=!0,window.setTimeout(()=>{SYNO.SDS.NotifyMgr.unregister(this)},this.easeOutDuration)},_show(){this.isShow=!0,this.activeDuration>0&&setTimeout(()=>{this.close()},this.activeDuration)},setVisible(s){this.visible=s?"visible":"hidden"}}}),S={class:"v-notification-wrapper"},_={class:"v-notification-body-wrapper"},p=["innerHTML"],f=["innerHTML"],y={key:0,class:"v-notification-footer-wrapper"},d=["syno-id"];function v(s,l,w,I,C,h){const c=E.resolveComponent("v-icon"),m=E.resolveComponent("v-button");return E.openBlock(),E.createElementBlock("div",{class:"v-notification-container",style:E.normalizeStyle(s.containerStyle)},[E.createElementVNode("div",{ref:"panel",class:E.normalizeClass(["v-notification-panel",s.panelCls])},[E.createVNode(c,{class:"close-btn",name:"window-tool-close",onClick:s.onClickClose,"svg-icon-set":"set22"},null,8,["onClick"]),E.renderSlot(s.$slots,"wrapper",{},()=>[E.createElementVNode("div",S,[E.renderSlot(s.$slots,"icon",{},()=>[s.icon?(E.openBlock(),E.createBlock(c,{key:0,class:"v-notification-icon",name:s.getIconType()},null,8,["name"])):E.createCommentVNode("",!0)]),E.createElementVNode("div",_,[E.createElementVNode("div",{class:"v-notification-title",innerHTML:s.title},null,8,p),E.renderSlot(s.$slots,"body",{},()=>[E.createElementVNode("div",{class:"v-notification-body",onClick:l[0]||(l[0]=function(){return s.onClickMessage&&s.onClickMessage(...arguments)}),innerHTML:s.body},null,8,f)])])])]),E.renderSlot(s.$slots,"footer",{},()=>[s.fbar?(E.openBlock(),E.createElementBlock("div",y,[s.hasCancelBtn?(E.openBlock(),E.createElementBlock("a",{key:0,"syno-id":`${s.synoId}-fbar-cancel`,class:"v-notification-footer-skip-btn",onClick:l[1]||(l[1]=function(){return s.cancel&&s.cancel(...arguments)})},E.toDisplayString(s.cancelText||s._i18n("common","skip")),9,d)):E.createCommentVNode("",!0),s.hasConfirmBtn?(E.openBlock(),E.createBlock(m,{key:1,"syno-id":`${s.synoId}-fbar-commit`,type:"footbar",suffix:"main",onClick:s.confirm},{default:E.withCtx(()=>[E.createTextVNode(E.toDisplayString(s.confirmText||s._i18n("common","enable")),1)]),_:1},8,["syno-id","onClick"])):E.createCommentVNode("",!0)])):E.createCommentVNode("",!0)])],2)],4)}var b=A.default(o,[["render",v]]);x.default=b}(EN)),EN}var PN={},Aj;function P3(){return Aj||(Aj=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=vr(),k=Kt(),F=kr(),B=ht(),G=St();M.register("adv-grid-sort-down",F.vIconTableSortDown),M.register("adv-grid-sort-up",F.vIconTableSortUp);const E={ASC:"ASC",DESC:"DESC",UNKNOWN:"UNKNOWN"},A=B.defineComponent({name:"AdvancePanelGrid",props:{columns:{type:Array,default:()=>[]},data:{type:Array,default:()=>[]},localSortFunc:{type:Function,default:void 0}},emits:["update:sort"],data:()=>({activeHoverActionRows:new Set,sort:{columnIndex:-1,order:E.ASC}}),computed:{isEmpty(){return this.data.length===0},innerData(){const{columnIndex:h,order:c}=this.sort;if(h===-1)return[...this.data];const m=this.columns[h],T=this.localSortFunc?this.localSortFunc(m):void 0;return[...this.data].sort(T??((D,O)=>{const N=D[m.field],z=O[m.field];if(N!==z){if(c===E.DESC)return N<z?1:-1;if(c===E.ASC)return N<z?-1:1}return 0}))}},methods:{isSortable(h){return!(h?.sort?.disable??!0)},getTableHeadCls(h){return{"head-cell":!0,"disable-sort":!this.isSortable(h)}},hasSortIcon(h){return this.sort.columnIndex===h},getSortIconCls(h){return{activate:this.hasSortIcon(h)}},getSortIconName(h,c){let m=E.UNKNOWN;return c!==this.sort.columnIndex?m=h?.sort?.defaultOrder??E.ASC:m=this.sort.order,m===E.ASC?"adv-grid-sort-up":"adv-grid-sort-down"},onSort(h,c){if(!this.isSortable(h))return;let m=E.UNKNOWN;c!==this.sort.columnIndex?m=h?.sort?.defaultOrder??E.ASC:m=this.sort.order===E.ASC?E.DESC:E.ASC,this.sort={columnIndex:c,order:m}},getCellTooltip(h){return h?.tooltip??!1},getHeaderTip(h){return k.isString(h.tip)?h.tip:!1},getHeaderTipSlotName(h){return`${h.field}.tip`},getCellSlotName(h){return h?.slot??"default-cell"},useCellSlot(h){return!!h.slot},getCellHtml(h){return h?.html??!1},getCellContent(h){return k.isString(h)?h:h?.content??""},getRowHoverActionSlotName(h){return`${h.field}-row-hover-action`},hasRowHoverAction(h){return this.columns.length>0&&this.columns.length-1===h},getRowHoverActionCls(h){return{"keep-activate":this.activeHoverActionRows.has(h)}},activateHoverAction(h){return()=>{this.activeHoverActionRows.add(h),this.activeHoverActionRows=new Set(this.activeHoverActionRows)}},deactivateHoverAction(h){return()=>{this.activeHoverActionRows.delete(h),this.activeHoverActionRows=new Set(this.activeHoverActionRows)}}}}),u={class:"adv-grid"},o={class:"adv-grid-thead"},S={role:"row",class:"table-head-row"},_=["onClick"],p={class:"head-cell-content"},f={class:"adv-grid-body"},y={key:0,class:"empty-body"},d=["colspan"],v={class:"empty-body-content"},b={class:"cell-wrapper"},s={class:"cell"},l=["innerHTML"],w={key:0,class:"row-hover-action"};function I(h,c,m,T,D,O){const N=B.resolveComponent("v-icon"),z=B.resolveComponent("v-whitetip"),H=B.resolveDirective("tooltip");return B.openBlock(),B.createElementBlock("table",u,[B.createElementVNode("thead",o,[B.createElementVNode("tr",S,[(B.openBlock(!0),B.createElementBlock(B.Fragment,null,B.renderList(h.columns,($,V)=>(B.openBlock(),B.createElementBlock("th",{class:"table-head",key:V},[B.withDirectives((B.openBlock(),B.createElementBlock("div",{class:B.normalizeClass(h.getTableHeadCls($)),onClick:P=>h.onSort($,V)},[B.createElementVNode("div",p,B.toDisplayString($.title),1),h.isSortable($)?(B.openBlock(),B.createBlock(N,{key:0,class:B.normalizeClass(["sort-icon",h.getSortIconCls(V)]),name:h.getSortIconName($,V),"svg-icon-set":"set02"},null,8,["class","name"])):B.createCommentVNode("",!0),$.tip?(B.openBlock(),B.createBlock(z,{key:1,size:"small",class:"head-cell-tip",content:h.getHeaderTip($),"has-margin":!1,type:"white"},{default:B.withCtx(()=>[B.renderSlot(h.$slots,h.getHeaderTipSlotName($))]),_:2},1032,["content"])):B.createCommentVNode("",!0)],10,_)),[[H,h.getCellTooltip($)]])]))),128))])]),B.createElementVNode("tbody",f,[h.isEmpty?(B.openBlock(),B.createElementBlock("tr",y,[B.createElementVNode("td",{colspan:h.columns.length},[B.createElementVNode("div",v,[B.renderSlot(h.$slots,"empty-body")])],8,d)])):B.createCommentVNode("",!0),(B.openBlock(!0),B.createElementBlock(B.Fragment,null,B.renderList(h.innerData,($,V)=>(B.openBlock(),B.createElementBlock("tr",{role:"row",class:B.normalizeClass(["table-row",h.getRowHoverActionCls(V)]),key:V},[(B.openBlock(!0),B.createElementBlock(B.Fragment,null,B.renderList(h.columns,(P,U)=>(B.openBlock(),B.createElementBlock("td",{class:"table-cell",key:U},[B.createElementVNode("div",b,[B.withDirectives((B.openBlock(),B.createElementBlock("div",s,[B.renderSlot(h.$slots,h.getCellSlotName($[P.field]),{cell:$[P.field]},()=>[h.getCellHtml($[P.field])?(B.openBlock(),B.createElementBlock("div",{key:0,innerHTML:h.getCellHtml($[P.field])},null,8,l)):B.createCommentVNode("",!0),B.createTextVNode(" "+B.toDisplayString(h.getCellContent($[P.field])),1)])])),[[H,h.getCellTooltip($[P.field])]]),h.hasRowHoverAction(U)?(B.openBlock(),B.createElementBlock("div",w,[B.renderSlot(h.$slots,"row-hover-action",{item:$,column:P,index:V,activate:h.activateHoverAction(V),deactivate:h.deactivateHoverAction(V)})])):B.createCommentVNode("",!0)])]))),128))],2))),128))])])}var C=G.default(A,[["render",I]]);x.default=C}(PN)),PN}var BN={},Mj;function B3(){return Mj||(Mj=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Ur(),k=ht(),F=St();const B=k.defineComponent({name:"AdvancePanelForm",props:{fields:{type:Array,default:()=>[]}},computed:{formCls(){return["adv-form",{mobile:this.isMobile}]},isMobile(){return this.$breakpointManager?this.$breakpointManager.mobile:(M.remind("please import and use BreakpointManagerPlugin when you are in tree-shaking mode or breakpoint will not active."),!1)}},methods:{getValueCls(u){return{"multiple-line":u.multipleLine}}}}),G={class:"adv-form-label"};function E(u,o,S,_,p,f){return k.openBlock(),k.createElementBlock("div",{class:k.normalizeClass(u.formCls)},[(k.openBlock(!0),k.createElementBlock(k.Fragment,null,k.renderList(u.fields,y=>(k.openBlock(),k.createElementBlock(k.Fragment,{key:y.name},[k.createElementVNode("div",G,[k.renderSlot(u.$slots,`${y.name}-label`)]),k.createElementVNode("div",{class:k.normalizeClass([u.getValueCls(y),"adv-form-value"])},[k.renderSlot(u.$slots,`${y.name}-value`)],2)],64))),128))],2)}var A=F.default(B,[["render",E]]);x.default=A}(BN)),BN}var LN={},Dj;function L3(){return Dj||(Dj=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=ht(),k=St();const F=M.defineComponent({name:"AdvancePanelColumns",props:{columns:{type:Array,default:()=>[]}}}),B={class:"adv-columns"};function G(A,u,o,S,_,p){return M.openBlock(),M.createElementBlock("div",B,[(M.openBlock(!0),M.createElementBlock(M.Fragment,null,M.renderList(A.columns,(f,y)=>(M.openBlock(),M.createElementBlock("div",{class:"adv-column",key:y},[M.renderSlot(A.$slots,f.name)]))),128))])}var E=k.default(F,[["render",G]]);x.default=E}(LN)),LN}var FN={},Xw={};const Uye=sf(uhe);var Oj;function Yl(){if(Oj)return Xw;Oj=1,Object.defineProperty(Xw,"__esModule",{value:!0});var x=Uye;function M(E){return E&&typeof E=="object"&&"default"in E?E:{default:E}}var k=M(x);const F=function(E){for(const A of E)for(const u of A.target.__syno_resize_listeners__||[])u.fn.apply(u.scope||u.fn,[A])},B=function(E,A,u){return E.__syno_resize_listeners__||(E.__syno_resize_listeners__=[],E.__syno_resize__=new k.default(F),E.__syno_resize__.observe(E)),E.__syno_resize_listeners__.push({fn:A,scope:u}),()=>G(E,A)},G=function(E,A){!E||!E.__syno_resize_listeners__||(E.__syno_resize_listeners__=E.__syno_resize_listeners__.filter(u=>A!==u.fn),E.__syno_resize_listeners__.length<=0&&(E.__syno_resize__?.disconnect(),E.__syno_resize__=null,E.__syno_resize_listeners__=null))};return Xw.addResizeListener=B,Xw.removeResizeListener=G,Xw}var Yr={},nh={},Nj;function Pg(){if(Nj)return nh;Nj=1,Object.defineProperty(nh,"__esModule",{value:!0});var x=rl();let M=!x.isServer&&"navigator"in window?window.navigator.userAgent.toLowerCase():"node",k=function(f){return f.test(M)},F=x.isServer?null:document,B=x.isServer||F===null?void 0:"documentMode"in F&&F.documentMode;x.isServer||F==null||F.compatMode=="CSS1Compat";let G=k(/opera/),E=k(/\bchrome\b/),A=k(/webkit/),u=!E&&k(/safari/);u&&k(/applewebkit\/4/),u&&k(/version\/3/),u&&k(/version\/4/);let o=!G&&k(/msie/);o&&(k(/msie 7/)||B==7),o&&k(/msie 8/)&&B!=7,o&&k(/msie 9/);let S=!A&&k(/gecko/);S&&k(/rv:1\.8/),S&&k(/rv:1\.9/),k(/windows|win32/);let _=k(/macintosh|mac os x/);k(/adobeair/),k(/linux/),/^https/i.test(x.isServer?"http":window.location.protocol);function p(f,y){const v=new RegExp("Version/([0-9._]+).*Safari").exec(M);try{if(v)switch(f){case"=":return parseFloat(v[1])===y;case">":return parseFloat(v[1])>y;case">=":return parseFloat(v[1])>=y;case"<":return parseFloat(v[1])<y;case"<=":return parseFloat(v[1])<=y;default:return!1}return!1}catch{return!1}}return nh.isChrome=E,nh.isGecko=S,nh.isIE=o,nh.isMac=_,nh.isOpera=G,nh.isSafari=u,nh.isSafariAndVersionMatch=p,nh.isWebKit=A,nh}const Gye=sf(hhe);var Pj;function Dr(){if(Pj)return Yr;Pj=1,Object.defineProperty(Yr,"__esModule",{value:!0});var x=Pg(),M=Kt(),k=Og(),F=Gye;function B(ne){return ne&&typeof ne=="object"&&"default"in ne?ne:{default:ne}}var G=B(F);function E(ne,le){return Element.prototype.matches.call(ne,le)}function A(ne,le){return ne.closest(le)}function u(ne,le){let fe=ne.getBoundingClientRect(),we=le.getBoundingClientRect();return!(fe.right<we.left||fe.left>we.right||fe.bottom<we.top||fe.top>we.bottom)}function o(ne,le,fe){let we=M.isElement(ne)?ne.getBoundingClientRect():ne;return we.right>=le&&we.left<=le&&we.bottom>=fe&&we.top<=fe}function S(ne,le){return ne.right<le.right&&ne.left>le.left&&ne.top>le.top&&ne.bottom<le.bottom}function _(ne,le,fe){let we=ne&&ne.style;if(we)if(fe==null){let pe={};return document.defaultView&&document.defaultView.getComputedStyle&&(pe=document.defaultView.getComputedStyle(ne,"")),le===void 0?pe:pe[le]}else le&&(!(le in we)&&le.indexOf("webkit")===-1&&(le="-webkit-"+le),we[le]=fe+(typeof fe=="string"?"":"px"))}function p(ne,le,fe){let we=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},pe=we.offsetX??0,ve=we.offsetY??0;_(ne,"left",`${le+pe}px`),_(ne,"top",`${fe+ve}px`)}function f(ne,le,fe){let we=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};M.isArray(le)||(le=[le]);const pe=[];for(const ve of le)ne.addEventListener(ve,fe,we),pe.push(()=>{d(ne,ve,fe,we)});return()=>{for(const ve of pe)ve()}}function y(ne,le,fe){let we=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};we.once=!0,M.isArray(le)||(le=[le]);const pe=[];for(const ve of le)ne.addEventListener(ve,fe,we),pe.push(()=>{d(ne,ve,fe,we)});return()=>{for(const ve of pe)ve()}}function d(ne,le,fe){let we=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};ne.removeEventListener(le,fe,we)}function v(ne,le){let fe,we;le&&(fe=le.scrollTop,we=le.scrollLeft),ne?.focus({preventScroll:!0}),le&&le.scrollTo&&typeof fe=="number"&&typeof we=="number"&&le.scrollTo(fe,we)}function b(ne,le){return G.default(ne,{behavior:"auto",inline:"nearest",block:"nearest",...le})}function s(ne){const le=ne.getBoundingClientRect();return w(le)||I(le)||C(le)||h(le)}function l(){return window.innerHeight||document.documentElement.clientHeight}function w(ne){return ne.bottom>(window.innerHeight||document.documentElement.clientHeight)}function I(ne){return ne.top<0}function C(ne){return ne.right>(window.innerWidth||document.documentElement.clientWidth)}function h(ne){return ne.left<0}function c(ne){return x.isGecko?ne.relatedTarget:ne.relatedTarget??document.activeElement}function m(ne){return ne.offsetParent===null}function T(ne,le){return ne.classList.contains?ne.classList.contains(le):ne.className.indexOf(le)>=0}function D(ne,le){if(ne.classList.add)for(const fe of le.split(" "))ne.classList.add(fe);else ne.className.indexOf(le)<0&&(ne.className+=` ${le}`)}function O(ne,le){ne.classList.remove?ne.classList.remove(le):ne.className.indexOf(le)>=0&&(ne.className=ne.className.replace(le,""))}function N(ne){return k.__TEST__?!0:!!(ne.offsetWidth||ne.offsetHeight||ne.getClientRects().length)}function z(ne){let le;return typeof Event=="function"?le=new Event(ne):(le=document.createEvent("Event"),le.initEvent(ne,!0,!0)),le}function H(ne){return window.requestAnimationFrame?window.requestAnimationFrame(ne):setTimeout(ne,16)}function $(ne){return ne&&String(ne).replace(/&/g,"&").replace(/>/g,">").replace(/</g,"<").replace(/"/g,""").replace(/\s/g," ")}function V(ne){return ne&&String(ne).replace(/>/g,">").replace(/</g,"<").replace(/"/g,'"').replace(/&/g,"&").replace(/ /g," ")}function P(ne){let le=document.createElement("div");return le.innerHTML=ne,le.textContent||le.innerText||""}function U(){return document.body.clientWidth}function Y(){return document.body.clientHeight}function Z(ne){return ne.replace(/[^a-z0-9\-_:.]|^[^a-z]+/gi,"")}let X;function J(ne){X=X??document.createElement("canvas");const le=_(ne,"font-size"),fe=_(ne,"font-family"),we=X.getContext("2d");return we&&(we.font=`${le} ${fe}`),we?.measureText(ne.value)}function q(ne){const le=_(ne,"overflow-y");return["scroll","auto","overlay"].includes(le)}function te(ne){const le=[];let fe=ne;for(;fe;)(document.documentElement===fe||q(fe))&&le.push(fe),fe=fe.parentNode;return le}function re(ne){let le=ne;for(;le;){if(document.documentElement===le||q(le))return le;le=le.parentNode}return le}function ie(ne){return ne[0]<0||ne[1]<0||ne[0]>window.innerWidth||ne[1]>window.innerHeight}return Yr.addClass=D,Yr.alignElWithMouse=p,Yr.createEvent=z,Yr.css=_,Yr.domifyId=Z,Yr.findParentBySelector=A,Yr.focusWithoutScroll=v,Yr.getAllScrollContainer=te,Yr.getFocusElement=c,Yr.getPageHeight=l,Yr.getScrollContainer=re,Yr.getViewportHeight=Y,Yr.getViewportWidth=U,Yr.hasClass=T,Yr.html2Text=P,Yr.htmlDecode=V,Yr.htmlEncode=$,Yr.intersectWithPoint=o,Yr.intersects=u,Yr.isElementOutOfBoundary=s,Yr.isHidden=m,Yr.isOutofWindow=ie,Yr.isRectInRect=S,Yr.isRectOverBottom=w,Yr.isRectOverLeft=h,Yr.isRectOverRight=C,Yr.isRectOverTop=I,Yr.isScroll=q,Yr.isVisible=N,Yr.matchSelector=E,Yr.measureText=J,Yr.off=d,Yr.on=f,Yr.once=y,Yr.raf=H,Yr.removeClass=O,Yr.scrollTo=b,Yr}var Bj;function WF(){return Bj||(Bj=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Xn(),k=Yl(),F=Dr(),B=ht(),G=St();const E={TOP:"top",BOTTOM:"bottom"},A=B.defineComponent({name:"Affix",props:{target:{type:Function,default:()=>document.documentElement},scrollContainers:{type:Array,default:()=>[]},offsetTop:{type:Number,default:0},offsetBottom:{type:Number,default:0},fix:{type:String,default:E.TOP},innerClass:{type:Object,default:()=>({})},innerStyle:{type:Object,default:()=>({})}},data(){return{fixed:!1,placeholderRect:void 0,top:0}},computed:{fixedTop(){return this.fix===E.TOP},fixedBottom(){return this.fix===E.BOTTOM},placeholderStyle(){return{width:`${this.placeholderRect.width}px`,height:`${this.placeholderRect.height}px`}},_innerStyle(){let _=this.innerStyle;return this.fixed&&(_={..._,position:"fixed",width:`${this.placeholderRect.width}px`,height:`${this.placeholderRect.height}px`}),(this.fixedTop||this.fixedBottom)&&(_.top=`${this.top}px`),_}},mounted(){this.disposedFn=[],this.$nextTick(()=>{const _=this.scrollContainers?.length>0?this.scrollContainers:F.getAllScrollContainer(this.$el);this.disposedFn.push(k.addResizeListener(this.$refs.inner,()=>{this.updatePos()}));for(const p of _)this.disposedFn.push(F.on(p,"scroll",()=>this.updatePos()));this.updatePos()})},[M.componentHooks.beforeUnmount](){for(const _ of this.disposedFn)_?.()},methods:{updatePos(){this.fixed=!1,this.$nextTick(()=>{const p=(this.target?.()??document.documentElement).getBoundingClientRect(),f=this.$refs.inner.getBoundingClientRect();this.placeholderRect=f,this.fixedTop?f.top<p.top+this.offsetTop&&(this.fixed=E.TOP,this.top=p.top+this.offsetTop):this.fixedBottom&&f.bottom>p.bottom-this.offsetBottom&&(this.fixed=E.BOTTOM,this.top=p.bottom-this.offsetBottom-f.height)})}}}),u={class:"affix-wrapper"};function o(_,p,f,y,d,v){return B.openBlock(),B.createElementBlock("div",u,[_.fixed?(B.openBlock(),B.createElementBlock("div",{key:0,class:"affix-placeholder",style:B.normalizeStyle(_.placeholderStyle)},null,4)):B.createCommentVNode("",!0),B.createElementVNode("div",{ref:"inner",class:B.normalizeClass(["affix-inner",_.innerClass]),style:B.normalizeStyle(_._innerStyle)},[B.renderSlot(_.$slots,"default")],6)])}var S=G.default(A,[["render",o]]);x.default=S}(FN)),FN}var VN={},Am={};const jye=sf(che);var Lj;function ln(){if(Lj)return Am;Lj=1,Object.defineProperty(Am,"__esModule",{value:!0});var x=Og(),M=jye;function k(o){return o&&typeof o=="object"&&"default"in o?o:{default:o}}var F=k(M);const B=new WeakMap;x.__DEV__&&(window.SVC_EVENTS_REGISTRY_MAP=B);function G(o){let S=B.get(o);return S||B.set(o,S=F.default()),S}const E=(o,S,_)=>(G(o).on(S,f=>{_(...f)}),()=>A(o,S,_)),A=(o,S,_)=>{G(o).off(S,_)},u=function(o,S){for(var _=arguments.length,p=new Array(_>2?_-2:0),f=2;f<_;f++)p[f-2]=arguments[f];G(o).emit(S,p),o.$emit(S,...p)};return Am.$emit=u,Am.$off=A,Am.$on=E,Am}var HN={},$N={},Fj;function sc(){return Fj||(Fj=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=ht();const k=!1,F=!0;function B(G){const E=o=>{const S=[o],_=[];for(;S.length>0;){const p=S.shift(),f=p?.component?.proxy;if(f&&_.push(f),Array.isArray(p?.children)&&S.push(...p?.children),p?.component?.subTree){const y=p?.component.subTree;S.push(y)}}return _},A=G.$.subTree;let u=[];return A&&(u=E(A)),u}x.getChildren=B,x.isVue2=k,x.isVue3=F,Object.keys(M).forEach(function(G){G!=="default"&&!x.hasOwnProperty(G)&&Object.defineProperty(x,G,{enumerable:!0,get:function(){return M[G]}})})}($N)),$N}var Vj;function Zo(){return Vj||(Vj=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=ln(),k=sc();function F(E,A,u){for(const o of k.getChildren(this))o.$options.name===E&&M.$emit(o,...[A].concat(u))}function B(E,A,u,o,S){let _=this.$parent||this.$root;const p=y=>o?y[o.key]===o.value:!0,f=y=>S?S===y.$options.name:!1;for(;_&&!f(_);){if(_.$options.name===E&&p(_)){M.$emit(_,...[A].concat(u));return}_=_.$parent}}var G={methods:{dispatch(){for(var E=arguments.length,A=new Array(E),u=0;u<E;u++)A[u]=arguments[u];B.apply(this,A)},broadcast(){for(var E=arguments.length,A=new Array(E),u=0;u<E;u++)A[u]=arguments[u];F.apply(this,A)}}};x.broadcast=F,x.default=G,x.dispatch=B}(HN)),HN}var zN={},Mm={},Hj;function Si(){if(Hj)return Mm;Hj=1,Object.defineProperty(Mm,"__esModule",{value:!0});var x=sc();function M(B,G){return!!k(B)?.[G]}function k(B){return x.isVue3?B.$slots:B.$scopedSlots}function F(B,G){const E=k(G)??{};return Object.keys(E).reduce((A,u)=>(u.startsWith(B)&&A.push({name:u.replace(B,""),exposeName:u}),A),[])}return Mm.getPrefixSlots=F,Mm.getSlots=k,Mm.hasSlot=M,Mm}var WN={},rS={},$j;function Ux(){if($j)return rS;$j=1,Object.defineProperty(rS,"__esModule",{value:!0});var x=Kt();function M(k){if(x.isArray(k)&&k.length>1)throw new Error("expect only one child");return k[0]}return rS.ensureOnlyChild=M,rS}var zj;function UF(){return zj||(zj=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Xn(),k=fr(),F=Ux(),B=sc(),G=Si(),E=Ur(),A=ht(),u=A.defineComponent({name:"ButtonDropdown",mixins:[k.inject("button")],emits:["update:is-open"],data(){return{dropdownItem:null}},async mounted(){E.remind("button-dropdown is deprecated, please use button with dropdown slot directly instead"),this.button&&(this.button.register(this),await this.$nextTick(),this.getDropdownItem())},[M.componentHooks.beforeUnmount](){this.button&&this.button.unregister(this),this.dropdownItem&&(this.dropdownItem=null)},methods:{getDropdownItem(){const o=F.ensureOnlyChild(B.getChildren(this));this.dropdownItem=o,this.button.instance?.$el&&this.dropdownItem?.setTriggerButton?.(this.button.instance.$el),this.dropdownItem.$on("update:is-open",S=>this.$emit("update:is-open",S))}},render(){return G.getSlots(this)?.default()}});x.default=u}(WN)),WN}var UN={},iS={},Wj;function F3(){if(Wj)return iS;Wj=1,Object.defineProperty(iS,"__esModule",{value:!0});var x=sc();function M(k,F){return x.isVue2?F?.context:k?.instance}return iS.getInstance=M,iS}var Uj;function Ru(){return Uj||(Uj=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Dr(),k=Kt(),F=Xn(),B=sc(),G=F3();const E="__synoclickoutside__";let A=[],u=[],o=0;function S(l){u=A.slice();for(let w of u)w[E]&&w[E].documentHandler(l)}let _=!1;function p(){_||(M.on(document.documentElement,"mousedown",l=>{S(l)}),M.on(document.documentElement,"touchstart",l=>{S(l)}),_=!0)}function f(l,w){return l.some(I=>I?"$el"in I?I.$el.contains(w):I.contains(w):!1)}function y(l,w){const I=G.getInstance(w,l),C=w.arg,c=w.modifiers.children&&I?B.getChildren(I):[];if(C){let m=k.isFunction(C)?C(l,w):C;m=k.isArray(m)?m:[m],c.push(...m)}return c}function d(l,w,I){return function(C){let h=[];I&&(h=y(I,w),!(!C.target||l.contains(C.target)||f(h,C.target))&&l[E].bindingFn&&l[E].bindingFn())}}function v(l,w,I){l[E]||(A.push(l),l[E]={id:++o,documentHandler:d(l,w,I),bindingFn:w.value})}function b(l){if(l[E]){for(let w=0;w<A.length;w++)if(A[w][E].id===l[E].id){A.splice(w,1);break}l[E]=null}}var s=F.defineDirective({[F.directiveHooks.mounted](l,w,I){p(),w.value!==!1&&v(l,w,I)},[F.directiveHooks.updated](l,w,I){if(w.value===!1){b(l);return}l[E]?(l[E].documentHandler=d(l,w,I),l[E].bindingFn=w.value):v(l,w,I)},[F.directiveHooks.unmounted](l){b(l)}});x.CLICK_OUTSIDE_CTX=E,x.default=s,x.doHandler=S}(UN)),UN}var GN={},jN={},qN={},oS={},Jw={},Zw={},Gj;function nd(){if(Gj)return Zw;Gj=1,Object.defineProperty(Zw,"__esModule",{value:!0});function x(k,F,B){return k[F]=B,B}function M(k,F){delete k[F]}return Zw.del=M,Zw.set=x,Zw}var jj;function qye(){if(jj)return Jw;jj=1,Object.defineProperty(Jw,"__esModule",{value:!0});var x=nd(),M=ht();function k(){let B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const G=M.reactive({});function E(S){const{to:_,from:p,content:f,order:y=1/0}=S;if(!_||!p||!f)return;G[_]||x.set(G,_,{});const d=G[_],v={to:_,from:p,content:f,order:y};x.set(d,p,v)}function A(S){const{to:_,from:p}=S;if(!_||!p)return;const f=G[_];f&&(x.del(f,p),f.size||x.del(G,_))}function u(S,_){const p=G[S];if(!p)return[];const f=Object.values(p)??[];return _?f.sort((y,d)=>(y?.order??0)-(d?.order??0)):f.length>0?[f[f.length-1]]:[]}const o={open:E,close:A,transports:G,getContentForTarget:u};return B?M.readonly(o):o}const F=k();return Jw.createWormhole=k,Jw.wormhole=F,Jw}var qj;function V3(){if(qj)return oS;qj=1,Object.defineProperty(oS,"__esModule",{value:!0});var x=qye();function M(){return x.wormhole}return oS.useWormhole=M,oS}var Qw={},Kd={},Yj;function H3(){if(Yj)return Kd;Yj=1,Object.defineProperty(Kd,"__esModule",{value:!0});var x=gn(),M=ed(),k=Kt(),F=Ur(),B=td();class G{constructor(o){this.baseZIndex=o.baseZIndex||2e4,this.popupContainer=o.popupContainer,this.tipContainer=o.tipContainer,this.zIndex=this.baseZIndex,this.acquireCount=0}getPopupContainer(){return k.isString(this.popupContainer)?this.popupContainer:this.popupContainer?.()}getTipContainerEl(){let o;return k.isFunction(this.tipContainer)&&(o=this.tipContainer?.()),k.isString(this.tipContainer)&&(o=this.tipContainer),k.isString(o)?document.querySelector(o):o}acquireZIndex(){return this.acquireCount++,++this.zIndex}releaseZIndex(){this.acquireCount--,this.acquireCount<=0&&(this.acquireCount=0,this.zIndex=this.baseZIndex)}}const E=B.makeSymbol("popupManager");Kd.usePopupManager=()=>{F.consoleError("you are not install PopupManagerPlugin yet, please install it first")};const A=x.makePlugin({},function(u){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Kd.usePopupManager=M.makeManager(u,"$popupManager",new G(o),E)});return Kd.PopupManager=G,Kd.PopupManagerPlugin=A,Kd.popupSymbol=E,Kd}var pg={},Kj;function rd(){if(Kj)return pg;Kj=1,Object.defineProperty(pg,"__esModule",{value:!0});var x=_i(),M=ht();function k(E){E=Object.assign({props:{},on:{},nativeOn:{},domProps:{},attrs:{},scopedSlots:{}},E);const{props:A,on:u,nativeOn:o,domProps:S,attrs:_,scopedSlots:p,...f}=E,y={...f};if(A)for(const[d,v]of Object.entries(A))y[d]=v;if(u)for(const[d,v]of Object.entries(u))y[`on${x.upperFirst(x.camelCase(d))}`]=v;if(o)for(const[d,v]of Object.entries(o))y[`on${x.upperFirst(x.camelCase(d))}`]=v;if(S)for(const[d,v]of Object.entries(S))y[d]=v;if(_)for(const[d,v]of Object.entries(_))y[d]=v;return delete y.directives,y}function F(E){return E}function B(E,A){const u=[];for(const o of A)u.push([M.resolveDirective(o.name),o.value,o.argument,o.modifiers]);return M.withDirectives(E,u)}function G(E,A,u){{const o=k(A);if(A.scopedSlots){if(u)throw new Error("h function will confuse with children and slots together");u=A.scopedSlots}let S=M.h(E,o,u);return A.directives&&(S=B(S,A.directives)),S}}return pg.h=G,pg.transDirective=B,pg.transRawProps=k,pg.transSlots=F,pg}var eb={},aS={},Xj;function Yye(){if(Xj)return aS;Xj=1,Object.defineProperty(aS,"__esModule",{value:!0});var x=Kt();function M(k){return k=x.isFunction(k)?k?.():k,x.isString(k)?document.querySelector(k):k}return aS.getMountElement=M,aS}var Qs={},Jj;function $3(){if(Jj)return Qs;Jj=1,Object.defineProperty(Qs,"__esModule",{value:!0});var x=gn(),M=ed(),k=Dr(),F=Kt(),B=Ur(),G=rl(),E=Og(),A=td();const u=/^([a-z]+)?->([a-z]+)?$/;function o(w){return k.css(w,"overflow")==="hidden"}function S(w,I){if(F.isElement(w)){const C=w.getBoundingClientRect();return{top:C.top,left:C.left,width:C.width,height:C.height}}else{if(F.isObject(w)||F.isDOMRect(w))return{top:w.top,left:w.left,width:w.width,height:w.height};if(F.isArray(w))return{left:I[0],top:I[1],width:0,height:0}}return w}function _(w){return w==="t"?"top":w==="b"?"bottom":w==="l"?"left":w==="r"?"right":w}function p(w){const I={...w,right:0,bottom:0};return F.isNumber(w.left)&&F.isNumber(w.width)&&(I.right=w.left+w.width),F.isNumber(w.top)&&F.isNumber(w.height)&&(I.bottom=w.top+w.height),I}function f(w,I,C,h){let c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:["none"],{constrainMinSize:m=0}=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},T="end",D="none",O="none";const N=C+I>w.size,z=C<w.scrollBeginPoint;if(c.includes("shift"))O="shift",(z||N)&&(D="shift",T=z?"begin":"end");else if(c.includes("constrain-size")){let H=I;O="constrain-size",N&&(H=w.size-C-h,T="end"),z&&(H=I+C-h,T="begin"),H>=m&&(z||N)&&(D="constrain-size")}else c.includes("swap")&&(O="swap",(z||N)&&(D="swap",T=z?"begin":"end"));return{method:D,over:T,pickMethod:O}}function y(w,I,C,h,c,m,T){const D={size:C,pos:h,offset:m,pushOffset:T};return I.method==="constrain-size"?I.over==="end"?D.size=w.size-h-T:I.over==="begin"&&(D.size=C+h-T,D.pos=T):I.method==="shift"?I.over==="end"?D.pos=w.size-Math.ceil(C)-T:I.over==="begin"&&(D.pos=w.scrollBeginPoint+T):I.method==="swap"&&(D.offset=m=-m,I.over==="end"?D.pos=c.begin-C+w.scrollBeginPoint+m-w.beginPoint:I.over==="begin"&&(D.pos=c.end+m-w.beginPoint)),D}function d(w,I,C,h){let c={size:I,pos:C};return C+I>w&&(c.size=w-C-h),C<0&&(c.size=I+C-h,c.pos=0+h),c}function v(w){let I=0,C=0,h=0,c=0;if(w===document.body)I=document.body.clientWidth,C=document.body.clientHeight;else{const m=w.getBoundingClientRect();k.css(w,"position")==="static"&&B.remind("[AlignManager] if container box did not generate containing block due to position is static, it will caused align wrong position"),I=m.width,C=m.height,h=m.top,c=m.left}return{containerWidth:I,containerHeight:C,containerTop:h,containerLeft:c}}class b{constructor(){G.isServer||(this.doc=document.documentElement,this.body=document.body,!o(this.doc)&&!o(this.body)&&!E.__TEST__&&B.remind("html or body should have overflow hidden, or it will make alignment offset glitch."))}getScroll(I){return I===this.doc||I===this.body?[window.pageXOffset??this.body?.scrollLeft??0,window.pageYOffset??this.body?.scrollTop??0]:[I.scrollLeft,I.scrollTop]}getConstrainToXY(I,C){let h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{left:0,top:0,right:0,bottom:0},c,m,T=0,D=0;if(!I||!C||(I==this.doc||I===document.body?(c=document.body.clientWidth,m=document.body.clientHeight):(c=I.clientWidth,m=I.clientHeight),!c||!m))return!1;let O={left:C.scrollLeft,top:C.scrollTop};T+=h.left+O.left,D+=h.top+O.top,c-=h.right,m-=h.bottom;let N=T+c,z=D+m,H=C.getBoundingClientRect(),$=H.x,V=H.y,P=C.offsetWidth,U=C.offsetHeight,Y=!1;return $<T&&($=T,Y=!0),V+U>z&&(V=z-U,Y=!0),$+P>N&&($=N-P,Y=!0),V<D&&(V=D,Y=!0),Y?[$,V]:!1}getArrowPlacement(I){const C=I.match(u);if(!C)throw new Error("anchor should be xx->xx or xx->");const h=_(C[1]?C[1].charAt(1):""),c=_(C[1]?C[1].charAt(0):""),m=_(C[2]?C[2].charAt(1):""),T=_(C[2]?C[2].charAt(0):"");return c!==T?`${c}-${h}`:h!==m?`${h}-${c}`:`${c}-${h}`}getAlignToXYv2(I,C,h){let c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[0,0],m=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,T=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,D=arguments.length>6&&arguments[6]!==void 0?arguments[6]:null,{pushXOffset:O=0,pushYOffset:N=0,constrainWidth:z=!1,constrainHeight:H=!1,constrainMinWidth:$=0,constrainMinHeight:V=0}=arguments.length>7&&arguments[7]!==void 0?arguments[7]:{};D=D??this.body,c=[...c];const P=h.match(u);if(!P||P.length===0)throw new Error("anchor should be xx->xx or xx->");if(!D)throw new Error("containerEl should not be null");const U=this.getAnchorXY(I,P[1],!1,D),Y=this.getAnchorXY(C,P[2],T,D),Z=p(S(I,U)),X=p(S(C,Y)),{width:J,height:q}=Z;let te=P[1]?P[1].charAt(1):"",re=P[1]?P[1].charAt(0):"",ie=P[2]?P[2].charAt(1):"",ne=P[2]?P[2].charAt(0):"";const{containerWidth:le,containerHeight:fe,containerTop:we,containerLeft:pe}=v(D);let ve=Y[0]-U[0]+c[0],be=Y[1]-U[1]+c[1],Ee={x:ve,y:be};if(m){const Re=this.getScroll(D),Ne=te==="r"&&ie==="l"||te==="l"&&ie==="r",Le=re==="t"&&ne==="b"||re==="b"&&ne==="t";let Se=Ne?["swap"]:["shift"],Ie=Le?["swap"]:["shift"];z&&Se.push("constrain-size"),H&&Ie.push("constrain-size");let _e,Ae,ue={size:J,pos:ve,offset:c[0],pushOffset:O},ke={size:q,pos:be,offset:c[1],pushOffset:N};for(;(_e=f({scrollBeginPoint:Re[0],size:le+Re[0]},ue.size,ue.pos,ue.pushOffset,Se,{constrainMinSize:$})).method!=="none"||Se.length>0;)Se=F.removeItems(Se,_e.pickMethod),ue=y({scrollBeginPoint:Re[0],size:le+Re[0],beginPoint:pe},_e,ue.size,ue.pos,{begin:X.left,end:X.right},ue.offset,ue.pushOffset),_e.method==="swap"?[te,ie]=[ie,te]:_e.method==="constrain-size"&&(Ee.constrainWidth=ue.size);for(;(Ae=f({scrollBeginPoint:Re[1],size:fe+Re[1]},ke.size,ke.pos,ke.pushOffset,Ie,{constrainMinSize:V})).method!=="none"||Ie.length>0;)Ie=F.removeItems(Ie,Ae.pickMethod),ke=y({scrollBeginPoint:Re[1],size:fe+Re[1],beginPoint:we},Ae,ke.size,ke.pos,{begin:X.top,end:X.bottom},ke.offset,ke.pushOffset),Ae.method==="swap"?[te,ie]=[ie,te]:Ae.method==="constrain-size"&&(Ee.constrainHeight=ke.size);Ee.x=ue.pos,Ee.y=ke.pos}return Ee.anchor=`${re}${te}->${ne}${ie}`,Ee.arrowPlacement=this.getArrowPlacement(Ee.anchor),Ee}getAlignToXY(I,C,h){let c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[0,0],m=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,T=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,D=arguments.length>6&&arguments[6]!==void 0?arguments[6]:null,O=arguments.length>7?arguments[7]:void 0;const{x:N,y:z}=this.getAlignToXYv2(I,C,h,c,m,T,D,O);return[N,z]}getAnchorXY(I,C){let h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,c=arguments.length>3?arguments[3]:void 0;if(!C){const[V,P]=this.getScroll(c);if(F.isArray(I)&&F.isNumber(I[0])&&F.isNumber(I[1]))return[I[0]+V,I[1]+P];if("left"in I&&"top"in I&&F.isNumber(I.left)&&F.isNumber(I.top))return[I.left+V,I.top+P]}const m=V=>"width"in V&&F.isNumber(V.width)?V.width:"offsetWidth"in V&&F.isNumber(V.offsetWidth)?V.offsetWidth:0,T=V=>"height"in V&&F.isNumber(V.height)?V.height:"offsetHeight"in V&&F.isNumber(V.offsetHeight)?V.offsetHeight:0,D=V=>"getBoundingClientRect"in V?V.getBoundingClientRect():"left"in V&&"top"in V&&F.isNumber(V.left)&&F.isNumber(V.top)?{left:V.left,top:V.top,width:m(V),height:T(V)}:{left:0,top:0,width:0,height:0},O=m(I),N=T(I),z={c:[O*.5,N*.5],t:[O*.5,0],b:[O*.5,N],l:[0,N*.5],r:[O,N*.5],tl:[0,0],bl:[0,N],br:[O,N],tr:[O,0]};let H=z[C][0],$=z[C][1];if(h){const V=D(I),P=this.getXY(V,c);H+=P[0],$+=P[1]}return[H,$]}getXY(I,C){const[h,c]=this.getScroll(C),m=C.getBoundingClientRect(),{left:T=0,top:D=0}=I;return[T+h-m.left,D+c-m.top]}}const s=A.makeSymbol("alignManager");Qs.useAlignManager=()=>{B.consoleError("you are not install AlignManagerPlugin yet, please install it first")};const l=x.makePlugin({},w=>{Qs.useAlignManager=M.makeManager(w,"$alignManager",new b,s)});return Qs.ANCHOR_REGEX=u,Qs.AlignManager=b,Qs.AlignManagerPlugin=l,Qs.alignSymbol=s,Qs.constrain=y,Qs.constrainSize=d,Qs.fillRect=p,Qs.getConstrainWay=f,Qs.getContainerBox=v,Qs.toFullName=_,Qs}var Zj;function Kye(){if(Zj)return eb;Zj=1,Object.defineProperty(eb,"__esModule",{value:!0});var x=Kt(),M=Yye(),k=$3(),F=Ur(),B=ht();function G(A,u){let{alignEl:o}=u;return B.computed(()=>{let{alignment:S,anchor:_}=B.unref(A);return S=S??{},{alignOffset:x.isObject(S)?S.offset??[0,0]:[0,0],alignPos:x.isString(S)?S:S.pos??"tl->bl",alignOpts:x.isString(S)?void 0:S.opts,alignEl:B.unref(o),anchor:B.unref(_)}})}function E(A){let{props:u,alignEl:o,onAligned:S=x.noop}=A;const _=k.useAlignManager(),p=G(u,{alignEl:o}),f=B.computed(()=>M.getMountElement(B.unref(u).mountTo)),y=B.reactive({position:[void 0,void 0],constrainWidth:!1,constrainHeight:!1}),d=B.computed(()=>({left:x.isDefined(y.position[0])?`${y.position[0]}px`:void 0,top:x.isDefined(y.position[1])?`${y.position[1]}px`:void 0,maxWidth:y.constrainWidth?`${y.constrainWidth}px`:void 0,maxHeight:y.constrainHeight?`${y.constrainHeight}px`:void 0})),v=()=>{let{alignOffset:b,alignPos:s,alignOpts:l,alignEl:w,anchor:I}=B.unref(p);if(!I||!f.value||!w)return y;if(!_)return F.remind("AlignManager is not found, please make sure you have installed it."),y;const C=_.getAlignToXYv2(w,I,s,b,!0,!0,f.value,l);y.position=[C.x,C.y],y.constrainHeight=C.constrainHeight?C.constrainHeight:!1,y.constrainWidth=C.constrainWidth?C.constrainWidth:!1,B.nextTick(()=>{S?.(C)})};return B.watchPostEffect(()=>{v()}),{alignStyle:d,result:y,mountTo:f,doAlign:v}}return eb.getAlignProps=G,eb.useAlign=E,eb}var Qj;function z3(){if(Qj)return Qw;Qj=1,Object.defineProperty(Qw,"__esModule",{value:!0});var x=H3(),M=rd(),k=Kye(),F=ht();function B(E){const A=x.usePopupManager(),u=F.ref(),o=F.computed(()=>({zIndex:u.value}));return F.onMounted(()=>{const{acquireZIndex:S}=F.unref(E);u.value=S?A?.acquireZIndex():void 0}),F.onBeforeUnmount(()=>{const{acquireZIndex:S}=F.unref(E);S&&A?.releaseZIndex()}),o}function G(E){let{props:A,onAligned:u}=E;const o=F.ref(),{alignStyle:S,mountTo:_,doAlign:p}=k.useAlign({props:A,alignEl:o,onAligned:u}),f=B(A),y=F.computed(()=>[F.unref(A)?.innerClass??{},F.unref(A)?.customClass??{}]),d=F.computed(()=>[F.unref(A)?.innerStyle??{},F.unref(A)?.customStyle??{}]);return{render(v){return M.h("div",{ref:o,class:["vue-portal-target",...y.value],style:[S.value,f.value,...d.value]},v?.()??[])},doAlign:p,mountTo:_}}return Qw.usePopupStyle=B,Qw.useTargetContent=G,Qw}var eq;function GF(){return eq||(eq=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=V3(),k=z3(),F=ht(),B=ac(),G=F.defineComponent({name:"PortalTarget",props:{multiple:{type:Boolean,default:!1},name:{type:String,required:!0},slotProps:{type:Object,default:()=>({})},mountTo:{type:B.definePropType([String,HTMLElement,Function]),default:void 0},acquireZIndex:{type:Boolean,default:!1},customClass:{type:B.definePropType([String,Array,Object]),default:()=>[]},customStyle:{type:B.definePropType([String,Array,Object]),default:()=>[]}},emits:["change","aligned"],setup(E,A){let{emit:u,slots:o,expose:S}=A;const _=F.reactive({innerStyle:void 0,innerClass:void 0,anchor:void 0,alignment:void 0}),p=M.useWormhole(),f=F.computed(()=>{const l=p.getContentForTarget(E.name,E.multiple).map(w=>w.content(E.slotProps)).flat(1);return{vnodes:l,vnodesFn:()=>l}}),{render:y,doAlign:d}=k.useTargetContent({props:F.computed(()=>({..._,...E})),onAligned(b){u("aligned",b)}}),v=b=>{Object.assign(_,b)};return F.watch(f,b=>{let{vnodes:s}=b;const l=s.length>0,w=p.transports[E.name],I=w?[...Object.keys(w)]:[];u("change",{hasContent:l,sources:I})},{flush:"post"}),S({doAlign:d,updateData:v}),()=>f.value.vnodes.length?y(f.value.vnodesFn):o.default?.()}});x.default=G}(qN)),qN}var tq;function Xye(){return tq||(tq=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=GF(),k=Kt(),F=Ru(),B=ln(),G=Xn(),E=ht(),A=St();const u={HINT:"hint",INFO:"info",ERROR:"error",CUSTOM:"custom"},o={HOVER:"hover",CLICK:"click",LONG_PRESS:"long-press",FOCUS:"focus",CUSTOM:"custom"},S=[o.CLICK,o.LONG_PRESS,o.FOCUS],_=9,p=E.defineComponent({directives:{clickoutside:F.default},components:{vPortalTarget:M.default},props:{attachToElement:{type:[HTMLElement,Boolean],default:!1},arrow:{type:Boolean,default:!1},extraElement:{type:HTMLElement,default:void 0},tipContainer:{type:Function,default:k.noop},portalName:{type:String,default:""},triggerAction:{type:String,default:"hover",validator(s){return Object.values(o).includes(s)}},interactive:{type:Boolean,default:!1},usePortal:{type:Boolean,default:!1},type:{type:String,default:u.HINT,validator(s){return Object.values(u).includes(s)}}},data(){return{x:0,y:0,arrowPlacement:"",opacity:0,showTooltip:!1,visible:!1,isActive:!1,zIndex:void 0,overflowOnly:!1,content:"",isHtml:!1,delay:300,cls:"",offset:[20,20],align:"tl->tl",bgOpacity:1,disabled:!1,onActivate:k.noop,onDeactivate:k.noop,transitionTime:[500,100],dismissTime:500,hideWhenClickOutside:void 0}},computed:{innerHideWhenClickOutside(){return k.isDefined(this.hideWhenClickOutside)?this.hideWhenClickOutside:S.includes(this.triggerAction)},innerOffset(){if(this.arrow){const s=this.$alignManager.getArrowPlacement(this.align);if(s.startsWith("top"))return[this.offset[0],this.offset[1]+_];if(s.startsWith("bottom"))return[this.offset[0],this.offset[1]-_];if(s.startsWith("left"))return[this.offset[0]+_,this.offset[1]];if(s.startsWith("right"))return[this.offset[0]-_,this.offset[1]]}return this.offset},tooltipStyle(){return{left:`${this.x}px`,top:`${this.y}px`,opacity:this.opacity,transition:`opacity ${this.transitionTime[0]}ms`,visibility:this.visible?"visible":"hidden",zIndex:this.zIndex}},tooltipCls(){return[this.cls,"v-tooltip-directive",this.type,{"has-arrow":this.arrow,interactive:this.interactive}]}},watch:{disabled(s){s&&this.hide()}},mounted(){this.zIndex=this.$popupManager?.acquireZIndex()},[G.componentHooks.beforeUnmount](){this.$popupManager?.releaseZIndex()},methods:{onMouseEnter(s){this.interactive&&this.triggerAction===o.HOVER&&B.$emit(this,"trigger-show",s)},onMouseLeave(s){this.interactive&&this.triggerAction===o.HOVER&&B.$emit(this,"trigger-hide",s)},onClickoutside(){this.innerHideWhenClickOutside&&B.$emit(this,"trigger-hide")},shouldShow(s){if(this.overflowOnly){let l=s;if(k.isFunction(this.overflowOnly)&&(l=this.overflowOnly(s)||s),l&&l.offsetWidth>=l.scrollWidth&&l.offsetHeight>=l.scrollHeight)return!1}return!0},removeFromContainer(){this.$el&&this.$el.parentNode&&this.$el.parentNode.removeChild(this.$el)},mountOnContainer(s){(this.tipContainer?.()??this.$popupManager?.getTipContainerEl()??document.body).appendChild(this.$el)},show(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=null),this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=null),!this.disabled&&(this.onActivate&&this.onActivate(),this.showTooltip=!0,this.$nextTick(()=>{this.showTimeout=setTimeout(async()=>{const w=this.tipContainer?.()??this.$popupManager?.getTipContainerEl()??document.body;this.x=0,this.y=0,this.visible=!1,await this.$nextTick();const I=this.attachToElement?this.attachToElement:{left:s,top:l},{x:C,y:h,arrowPlacement:c}=this.$alignManager.getAlignToXYv2(this.$el,I,this.align,this.innerOffset,!0,!0,w);this.arrowPlacement=c,this.x=C,this.y=h,this.visible=!0,this.opacity=this.bgOpacity},this.delay)}))},hide(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=null),this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=null),this.opacity=0,this.hideTimeout=setTimeout(()=>{this.onDeactivate&&this.onDeactivate(),this.showTooltip=!1},this.dismissTime)}}}),f=["data-placement"],y={key:2},d=["innerHTML"];function v(s,l,w,I,C,h){const c=E.resolveComponent("v-portal-target"),m=E.resolveDirective("clickoutside");return s.showTooltip?E.withDirectives((E.openBlock(),E.createElementBlock("div",{key:0,class:E.normalizeClass(s.tooltipCls),style:E.normalizeStyle(s.tooltipStyle),onMouseenter:l[0]||(l[0]=function(){return s.onMouseEnter&&s.onMouseEnter(...arguments)}),onMouseleave:l[1]||(l[1]=function(){return s.onMouseLeave&&s.onMouseLeave(...arguments)})},[s.arrow?(E.openBlock(),E.createElementBlock("i",{key:0,class:"tooltip-arrow","data-placement":s.arrowPlacement},null,8,f)):E.createCommentVNode("",!0),s.usePortal?(E.openBlock(),E.createBlock(c,{key:1,name:s.portalName,"custom-class":"tip-portal"},null,8,["name"])):s.isHtml?(E.openBlock(),E.createElementBlock("span",{key:3,innerHTML:s.content},null,8,d)):(E.openBlock(),E.createElementBlock("span",y,E.toDisplayString(s.content),1))],38)),[[m,s.onClickoutside,s.extraElement]]):E.createCommentVNode("",!0)}var b=A.default(p,[["render",v]]);x.default=b}(jN)),jN}var tb={},nq;function Gx(){if(nq)return tb;nq=1,Object.defineProperty(tb,"__esModule",{value:!0});var x=rl(),M=Kt();const k=x.isServer?!1:window&&"IntersectionObserver"in window,F=function(E){for(const A of E)for(let u of A.target.__syno_intersection_listeners__||[])M.isDefined(A.isVisible)||(A.isVisible=A.isIntersecting),u.fn.apply(u.scope||u.fn,[A])},B=function(E,A,u,o){if(k)return E.__syno_intersection_listeners__||(E.__syno_intersection_listeners__=[],E.__syno_intersection__=new IntersectionObserver(F,o),E.__syno_intersection__.observe(E)),E.__syno_intersection_listeners__.push({fn:A,scope:u}),()=>G(E,A)},G=function(E,A){k&&(!E||!E.__syno_intersection_listeners__||(E.__syno_intersection_listeners__=E.__syno_intersection_listeners__.filter(u=>A!==u.fn),E.__syno_intersection_listeners__.length<=0&&(E.__syno_intersection__?.disconnect(),delete E.__syno_intersection__,delete E.__syno_intersection_listeners__)))};return tb.addIntersectionListener=B,tb.removeIntersectionListener=G,tb}var sS={},rq;function W3(){if(rq)return sS;rq=1,Object.defineProperty(sS,"__esModule",{value:!0});var x=Dr();const M=500,k=function(F,B,G){const E=A=>{const u=A.timeStamp,o=A;let S=!0;const _=window.setTimeout(()=>{B.apply(G||window,[o]),S=!1},M);x.on(F,"touchmove",()=>{S=!1,window.clearTimeout(_)}),x.once(F,"touchend",p=>{window.clearTimeout(_),p.timeStamp-u>M&&S&&B.apply(G||window,[o])})};return x.on(F,"touchstart",E),()=>x.off(F,"touchstart",E)};return sS.addLongPressEvent=k,sS}var Lo={},YN={},iq;function Rb(){return iq||(iq=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=(()=>{if(typeof window<"u")return window})();x.default=M}(YN)),YN}var oq;function Qo(){if(oq)return Lo;oq=1,Object.defineProperty(Lo,"__esModule",{value:!0});var x=Pg(),M=Rb(),k=Kt();const F={enter:13,tab:9,delete:46,esc:27,space:32,up:38,down:40,left:37,right:39,end:35,home:36,backspace:8,insert:45,pageup:33,pagedown:34};function B(c){return c?x.isMac?c.metaKey:c.ctrlKey:!1}function G(c,m){return m.includes(c.key)}function E(c){return c?c.code?c.code==="Space":c.keyCode===F.space:!1}function A(c){return c?c.shiftKey:!1}function u(c){return c.key?["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(c.key):[F.up,F.down,F.left,F.right].includes(c.keyCode)}function o(c){return f(c)}function S(c){return y(c)}function _(c){return c.key?c.key==="ArrowUp"||c.key==="Up"||c.key==="up":c.keyCode===F.up}function p(c){return c.key?c.key==="ArrowDown"||c.key==="Down"||c.key==="down":c.keyCode===F.down}function f(c){return c.key?c.key==="ArrowLeft"||c.key==="Left"||c.key==="left":c.keyCode===F.left}function y(c){return c.key?c.key==="ArrowRight"||c.key==="Right"||c.key==="right":c.keyCode===F.right}function d(c){return c.key?c.key==="Enter"||c.key==="enter":c.keyCode===F.enter}function v(c){return c.key?c.key==="Escape"||c.key==="Esc"||c.key==="esc":c.keyCode===F.esc}function b(c){return c.key?c.key==="Backspace"||c.key==="backspace":c.keyCode===F.backspace}function s(c){return c.key?c.key==="Delete"||c.key==="delete":c.keyCode===F.delete}function l(c,m,T,D){const O=T.eventInterface,N=T.bubbles,z=T.cancelable,H=typeof window[O]=="function"?window[O]:window.Event;return new H(c,Object.assign({},D,{bubbles:N,cancelable:z,keyCode:F[m]}))}function w(c,m){const T=c.split("."),D=T[0],O=T[1],z=l(D,O,{eventInterface:"Event",cancelable:!0,bubbles:!0},m),H=Object.getPrototypeOf(z);return Object.keys(m||{}).forEach(function($){const V=Object.getOwnPropertyDescriptor(H,$);!(V&&V.set===void 0)&&(z[$]=m[$])}),z}function I(c){return k.isDefined(M.default?.TouchEvent)&&c instanceof TouchEvent}function C(c){return I(c)?[c.targetTouches[0].pageX,c.targetTouches[0].pageY]:[c.pageX,c.pageY]}function h(c){return k.isDefined(M.default?.MouseEvent)&&c instanceof MouseEvent}return Lo.createDOMEvent=w,Lo.getEventPageXY=C,Lo.isArrowKey=u,Lo.isBackspace=b,Lo.isCtrl=B,Lo.isDelete=s,Lo.isDownArrow=p,Lo.isEnter=d,Lo.isEsc=v,Lo.isKeyInCharacters=G,Lo.isLeftArrow=f,Lo.isMouseEvent=h,Lo.isNextArrow=S,Lo.isPrevArrow=o,Lo.isRightArrow=y,Lo.isShift=A,Lo.isSpace=E,Lo.isTouchEvent=I,Lo.isUpArrow=_,Lo}var nb={},Xd={},aq;function id(){if(aq)return Xd;aq=1,Object.defineProperty(Xd,"__esModule",{value:!0});const x="window_mgr_inject",M="AppWindow",k="Window",F="ModalWindow",B=[0,16];return Xd.AppWindowName=M,Xd.ModalWindowName=F,Xd.WINDOW_INJECT_SYMBOL=x,Xd.WindowName=k,Xd.toastOffset=B,Xd}var sq;function jx(){if(sq)return nb;sq=1,Object.defineProperty(nb,"__esModule",{value:!0});var x=Kt(),M=id(),k=ht();function F(G,E){let A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},u,o=x.noop,S=document.createDocumentFragment();{const _=k.createVNode(E,A);_.appContext=G._context,k.render(_,S),u=_.component?.proxy,o=()=>{k.render(null,S)}}return{component:u,destroyFn:o,anchorEl:S}}function B(G,E,A){{const u=k.createApp(G,E);u.config.globalProperties=A.config.globalProperties;const{reload:o,...S}=A._context;return delete S.provides[M.WINDOW_INJECT_SYMBOL],Object.assign(u._context,S),u}}return nb.createChildApp=B,nb.mountInstance=F,nb}var lq;function ya(){return lq||(lq=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Xye(),k=Xn(),F=Dr(),B=Gx(),G=W3(),E=Qo(),A=Kt(),u=ln(),o=jx();function S(C){let h=C?.currentTarget??C?.target??null,c=C?.touches?.[0]?.clientX??C?.clientX??0,m=C?.touches?.[0]?.clientY??C?.clientY??0;return{target:h,x:c,y:m}}function _(C,h){let c={};A.isString(C.value)?c.content=C.value:A.isObject(C.value)?c=C.value:C.value===!1&&(c.disabled=!0),A.isDefined(c.isHtml)||(c.isHtml=A.isDefined(C.modifiers.html)?C.modifiers.html:!1);const m=h.ctx.appContext.config.globalProperties.$breakpointManager;return!A.isDefined(c.triggerAction)&&m?.mobile&&(c.triggerAction="long-press"),c}function p(C,h,c){const m=_(h,c);return m.attachToElement===!0&&(m.attachToElement=C),m.extraElement=C,m}function f(C,h){if(!C._tooltip)return!1;if(A.isObject(h))for(const c in h)A.hasOwn(h,c)&&!A.hasOwn(C._tooltip.$props,c)&&(C._tooltip[c]=h[c]);return!0}function y(C,h,c){const m=C._svc_tooltip_props_data??{};if(m.disabled)return;const{component:T,destroyFn:D}=o.mountInstance(h.ctx.appContext.app,M.default,m);C._tooltip=T,C._tootlip_destroy_fn=D,u.$on(C._tooltip,"trigger-show",C._svc_tooltip_e_show_cb),u.$on(C._tooltip,"trigger-hide",C._svc_tooltip_e_hide_cb),f(C,m)}function d(C,h,c,m){if((h._svc_tooltip_props_data??{}).disabled===!0)return;h._tooltip||y(h,m);const{x:D,y:O}=S(C);h._tooltip.shouldShow(h)&&(h._tooltip.isActive=!0,h._tooltip.mountOnContainer(),h._tooltip.show(D,O))}function v(C,h,c,m){if((h._svc_tooltip_props_data??{}).disabled===!0)return;h._tooltip||y(h,m);const{x:D,y:O}=S(C);if(h._tooltip.shouldShow(h)){if(!h._tooltip.isActive){d(C,h,c,m);return}h._tooltip.show(D,O)}}function b(C){const h=C._tooltip;h&&(h.isActive=!1,window.setTimeout(()=>{h&&(h.isActive||s(C))},h.transitionTime[1]))}function s(C){const h=C._tooltip;h&&(h.removeFromContainer(),h.hide(),C._tootlip_destroy_fn?.(),C._tooltip=null)}function l(C,h,c,m){let T=[];if(C._svc_tooltip_e_show_cb=D=>{d(D,C,c,m)},C._svc_tooltip_e_hide_cb=()=>{b(C)},C._svc_tooltip_e_move_cb=D=>{v(D,C,c,m)},C._svc_tooltip_e_intersection_cb=D=>{D.target===C&&!D.isVisible&&b(C)},!h.triggerAction||h.triggerAction==="hover")F.on(C,"mouseenter",C._svc_tooltip_e_show_cb),F.on(C,"mouseleave",C._svc_tooltip_e_hide_cb),F.on(C,"mousemove",C._svc_tooltip_e_move_cb),T.push(()=>F.off(C,"mouseenter",C._svc_tooltip_e_show_cb)),T.push(()=>F.off(C,"mouseleave",C._svc_tooltip_e_hide_cb)),T.push(()=>F.off(C,"mousemove",C._svc_tooltip_e_move_cb));else if(h.triggerAction==="click"){const D=N=>{C._svc_tooltip_e_show_cb(N)},O=N=>{E.isSpace(N)&&(C._tooltip?.isActive?C._svc_tooltip_e_hide_cb():C._svc_tooltip_e_show_cb(N),N.preventDefault(),N.stopPropagation())};F.on(C,"click",D),F.on(C,"keydown",O),T.push(()=>F.off(C,"click",D)),T.push(()=>F.off(C,"keydown",O))}else if(h.triggerAction==="long-press"){const D=N=>{C._svc_tooltip_e_show_cb(N)},O=G.addLongPressEvent(C,D);T.push(O)}else if(h.triggerAction==="focus"){const D=O=>{C._svc_tooltip_e_show_cb(O)};T.push(F.on(C,"focus",D))}T.push(B.addIntersectionListener(C,C._svc_tooltip_e_intersection_cb,C)),C._tooltip_disposed_fns=T}function w(C){if(C._tooltip_disposed_fns){for(const h of C._tooltip_disposed_fns)h?.();delete C._tooltip_disposed_fns}s(C)}var I={[k.directiveHooks.mounted](C,h,c){const m=p(C,h,c);C._svc_tooltip_props_data=m,l(C,m,h,c)},[k.directiveHooks.updated](C,h,c){const m=p(C,h,c),T=C._svc_tooltip_props_data;f(C,m),T&&!A.isEqual(T.triggerAction,m.triggerAction)&&(w(C),l(C,m,h,c)),C._svc_tooltip_props_data=m,C._tooltip&&!F.isVisible(C)&&b(C)},[k.directiveHooks.unmounted](C){w(C)}};x.default=I}(GN)),GN}var KN={},XN={},rh={},uq;function qx(){if(uq)return rh;uq=1,Object.defineProperty(rh,"__esModule",{value:!0});var x=Kt();const M=['a[href]:not([tabindex^="-"])','area[href]:not([tabindex^="-"])','input:not([type="hidden"]):not([type="radio"]):not([disabled]):not([tabindex^="-"])','input[type="radio"]:not([disabled]):not([tabindex^="-"])','select:not([disabled]):not([tabindex^="-"])','textarea:not([disabled]):not([tabindex^="-"])','button:not([disabled]):not([tabindex^="-"])','iframe:not([tabindex^="-"])','audio[controls]:not([tabindex^="-"])','video[controls]:not([tabindex^="-"])','[contenteditable]:not([tabindex^="-"])','[tabindex]:not([tabindex^="-"])'];function k(o){return Array.from(o.querySelectorAll(M.join(","))).filter(S=>u(S))}function F(o){let S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:document.activeElement;const _=k(o),p=S?_.indexOf(S):-1,f=_[p+1];return f&&A(f)}function B(o){let S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:document.activeElement;const _=k(o),p=S?_.indexOf(S):-1,f=_[p-1];return f&&A(f)}function G(o){for(let S=0;S<o.childNodes.length;S++){const _=o.childNodes[S];if(A(_)||G(_))return!0}return!1}function E(o){for(let S=o.childNodes.length-1;S>=0;S--){const _=o.childNodes[S];if(A(_)||E(_))return!0}return!1}function A(o){return!(o instanceof HTMLElement)||!u(o)?!1:(o&&"focus"in o&&x.isFunction(o.focus)&&o.focus(),document.activeElement===o)}function u(o){if(o.getAttribute("tabIndex")!==null)return!0;if("disabled"in o&&o.disabled)return!1;switch(o.nodeName){case"A":return"href"in o&&!!o.href&&"ref"in o&&o.ref!=="ignore";case"INPUT":return"type"in o&&o.type!=="hidden"&&o.type!=="file";case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}}return rh.FOCUSABLE_SELECTORS=M,rh.attemptFocus=A,rh.focusFirstDescendant=G,rh.focusLastDescendant=E,rh.focusNextDescendant=F,rh.focusPreviousDescendant=B,rh.isFocusable=u,rh.obtainFocusableElements=k,rh}var hq;function Bg(){return hq||(hq=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=qx(),k=ln(),F=ht(),B=St();const G=F.defineComponent({name:"TrapFocus",props:{selfFocusable:{type:Boolean,default:!1},focusLast:{type:Boolean,default:!1},bodyClass:{type:Array,default:()=>[]}},emits:["focus"],computed:{innerBodyClass(){return["v-trap-focus-body",...this.bodyClass]}},methods:{focus(){if(!this.$el?.contains(document.activeElement)){if(this.selfFocusable){this.focusTrapper(),k.$emit(this,"focus");return}this.focusLast?this.focusLastDescendantInBody():this.focusFirstDescendantInBody(),k.$emit(this,"focus")}},focusTrapper(){this.$refs.trapper&&this.$refs.trapper.focus()},focusFirstDescendantInBody(){this.$refs.body&&M.focusFirstDescendant(this.$refs.body)},focusLastDescendantInBody(){this.$refs.body&&M.focusLastDescendant(this.$refs.body)}}});function E(u,o,S,_,p,f){return F.openBlock(),F.createElementBlock("div",{ref:"trapper",tabindex:"-1",onFocus:o[2]||(o[2]=function(){return u.focus&&u.focus(...arguments)})},[F.createElementVNode("div",{class:"v-trap-focus-indicator",tabindex:"0",onFocus:o[0]||(o[0]=function(){return u.focusLastDescendantInBody&&u.focusLastDescendantInBody(...arguments)})},null,32),F.createElementVNode("div",{class:F.normalizeClass(u.innerBodyClass),ref:"body"},[F.renderSlot(u.$slots,"default")],2),F.renderSlot(u.$slots,"alert-last"),F.createElementVNode("div",{class:"v-trap-focus-indicator",tabindex:"0",onFocus:o[1]||(o[1]=function(){return u.focusFirstDescendantInBody&&u.focusFirstDescendantInBody(...arguments)})},null,32)],544)}var A=B.default(G,[["render",E]]);x.default=A}(XN)),XN}var JN={},ZN={},cq;function Jye(){return cq||(cq=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Xn(),k=Dr(),F=Yl(),B=fr(),G=_i(),E=Kt(),A=ln(),u=Qo(),o=ht(),S=ac();const _=500;var p=o.defineComponent({name:"Scrollbar",mixins:[B.provide("adaptive-container")],props:{viewTag:{type:String,default:"div"},hasPadding:{type:Boolean,default:!1},viewStyle:{type:S.definePropType([String,Array,Object]),default:""},viewClass:{type:S.definePropType([String,Array,Object]),default:""},innerStyle:{type:S.definePropType([String,Array,Object]),default:""},innerClass:{type:S.definePropType([String,Array,Object]),default:""},minYRailHeight:{type:Number,default:0},minYBarHeight:{type:Number,default:12},minXRailWidth:{type:Number,default:0},minXBarWidth:{type:Number,default:12},showXRail:{type:Boolean,default:!0},showYRail:{type:Boolean,default:!0},activeAdaptiveScrollbar:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},barHiddenUnderBreakpoint:{type:S.definePropType([String,Boolean]),default:"xxs"},overscroll:{type:[String,Boolean],default:!1}},emits:["scroll","reach-top","reach-bottom","not-reach-top","not-reach-bottom","reach-left","reach-right","not-reach-left","not-reach-right","bar-pointer-down","rail-pointer-down"],data(){return{disposedSwallowClick:null,viewCachedRect:null,hideBarWhenUnderBreakpoint:null,yBarHeight:0,yBarTop:0,xBarWidth:0,xBarLeft:0,yRailExists:!1,xRailExists:!1,reachTop:!0,reachLeft:!0,reachBottom:!1,reachRight:!1,yRailHeight:void 0,xRailWidth:void 0,barHidden:!1,keepBarShowing:!1}},computed:{wrapperCls(){const f=this.xRailExists,y=this.yRailExists;return["v-scrollbar",{disabled:this.disabled,"with-padding":this.hasPadding,"is-active":f||y,"x-active":f,"y-active":y,"reach-top":this.reachTop,"reach-bottom":this.reachBottom,"reach-left":this.reachLeft,"reach-right":this.reachRight,[`overscroll-${this.overscroll}`]:this.overscroll}]},yBarStyle(){return{height:`${this.yBarHeight}px`,top:`${this.yBarTop}px`}},xBarStyle(){return{width:`${this.xBarWidth}px`,left:`${this.xBarLeft}px`}},realMinYBarHeight(){return this.$scrollbar?.minLength||this.minYBarHeight},realMinXBarWidth(){return this.$scrollbar?.minLength||this.minXBarWidth},hasYRail(){return this.yRailExists&&this.showYRail},hasXRail(){return this.xRailExists&&this.showXRail},xRailStyle(){return{width:`${this.xRailWidth}px`,minWidth:`${this.minXRailWidth}px`}},yRailStyle(){return{height:`${this.yRailHeight}px`,minHeight:`${this.minYRailHeight}px`}},barCls(){return{hidden:this.barHidden&&!this.keepBarShowing}}},watch:{async hasXRail(){await this.$nextTick(),this.updateRail()},async hasYRail(){await this.$nextTick(),this.updateRail()}},created(){this.hideBarWhenUnderBreakpoint=G.debounce(()=>{this.barHiddenUnderBreakpoint&&this.$breakpointManager.lessAndEqThan(this.barHiddenUnderBreakpoint)&&(this.barHidden=!0)},_)},mounted(){F.addResizeListener(this.$refs.inner,this.updateScroll,this),F.addResizeListener(this.$refs.view,this.onViewResize,this),this.updateRail(),this.hideBarWhenUnderBreakpoint?.()},[M.componentHooks.beforeUnmount](){F.removeResizeListener(this.$refs.inner,this.updateScroll),F.removeResizeListener(this.$refs.view,this.onViewResize)},methods:{showBar(){this.barHidden=!1},updateRail(){const f=this.viewCachedRect?.height??(this.$refs?.view).offsetHeight,y=this.viewCachedRect?.width??(this.$refs?.view).offsetWidth,d=this.$refs["y-rail"]?parseInt(k.css(this.$refs["y-rail"],"marginTop"),10):0,v=this.$refs["y-rail"]?parseInt(k.css(this.$refs["y-rail"],"marginBottom"),10):0,b=this.$refs["x-rail"]?parseInt(k.css(this.$refs["x-rail"],"marginRight"),10):0,s=this.$refs["x-rail"]?parseInt(k.css(this.$refs["x-rail"],"marginLeft"),10):0;this.yRailHeight=f-d-v,this.xRailWidth=y-s-b},onViewResize(){const f=this.$refs.view;f&&(this.viewCachedRect={height:f.offsetHeight,width:f.offsetWidth},this.updateRail(),this.updateScroll())},getAdaptiveContainer(){return this.activeAdaptiveScrollbar?this.$refs.inner:null},getScrollEl(){return this.$refs.view},isReachTop(){return this.$refs.view.scrollTop===0},isReachBottom(){const f=this.$refs.view,y=this.viewCachedRect?.height??f.offsetHeight,d=f.scrollTop,v=f.scrollHeight,b=v-y-1;return d>=b||v<=y},isReachRight(){const f=this.$refs.view,y=this.viewCachedRect?.width??f.offsetWidth,d=f.scrollLeft,v=f.scrollWidth,b=v-y-1;return d>=b||v<=y},isReachLeft(){return this.$refs.view.scrollLeft===0},updateScroll(){this.showBar(),k.raf(()=>{const f=this.$refs.view;if(!f)return;const y=this.viewCachedRect?.height??f.offsetHeight,d=this.viewCachedRect?.width??f.offsetWidth,v=this.yRailHeight??y,b=this.xRailWidth??d,s=f.scrollHeight,l=f.scrollTop,w=f.scrollWidth,I=f.scrollLeft,C=this.isReachLeft(),h=this.isReachRight(),c=this.isReachTop(),m=this.isReachBottom();h?A.$emit(this,"reach-right"):A.$emit(this,"not-reach-right"),C?A.$emit(this,"reach-left"):A.$emit(this,"not-reach-left"),c?A.$emit(this,"reach-top"):A.$emit(this,"not-reach-top"),m?A.$emit(this,"reach-bottom"):A.$emit(this,"not-reach-bottom"),this.yRailExists=s>y,this.xRailExists=w>d,this.yBarHeight=Math.max(v*y/s,this.realMinYBarHeight),this.yBarTop=(v-this.yBarHeight)*l/(s-y),this.reachTop=c,this.reachBottom=m,this.xBarWidth=Math.max(b*d/w,this.realMinXBarWidth),this.xBarLeft=(b-this.xBarWidth)*I/(w-d),this.reachLeft=C,this.reachRight=h,this.hideBarWhenUnderBreakpoint?.()})},update(){this.updateScroll()},handleScroll(f){this.disabled||(this.updateScroll(),A.$emit(this,"scroll",f))},onBarPointerDown(f,y){if(this.disabled)return;const d=this.$refs.view,v=d.offsetHeight,b=d.offsetWidth,s=d.scrollHeight,l=d.scrollWidth,w=d.scrollTop,I=d.scrollLeft,C=u.getEventPageXY(f),h=document.onselectstart,c=document.ondragstart;document.onselectstart=()=>!1,document.ondragstart=()=>!1,this.swallowClick(),this.keepBarShowing=!0;const m=D=>{D.preventDefault(),k.raf(()=>{const O=this.$refs.view;if(!O)return;const[N,z]=u.getEventPageXY(D),H=N-C[0],$=z-C[1];if(y==="y"){const V=v,P=(s-v)/(V-this.yBarHeight);O.scrollTop=w+$*P}else if(y==="x"){const V=b,P=(l-b)/(V-this.xBarWidth);O.scrollLeft=I+H*P}})},T=D=>{D.stopPropagation(),k.off(document.documentElement,"touchmove",m),k.off(document.documentElement,"mousemove",m),document.onselectstart=h,document.ondragstart=c,window.setTimeout(()=>{this.disposedSwallowClick?.(),delete this.disposedSwallowClick},0),this.keepBarShowing=!1,this.hideBarWhenUnderBreakpoint?.()};k.on(document.documentElement,"touchmove",m,{passive:!1}),k.on(document.documentElement,"mousemove",m),k.once(document.documentElement,"touchend",T),k.once(document.documentElement,"mouseup",T),A.$emit(this,"bar-pointer-down",f,y)},swallowClick(){this.disposedSwallowClick||(this.disposedSwallowClick=k.on(document.documentElement,"click",f=>f.stopPropagation(),{capture:!0}))},onRailPointerDown(f,y){if(this.disabled)return;const d=this.$refs.view,v=d.offsetHeight,b=d.offsetWidth,s=f.target?.getBoundingClientRect(),l=d.scrollHeight,w=d.scrollWidth,I=u.getEventPageXY(f);if(this.showBar(),this.hideBarWhenUnderBreakpoint?.(),y==="y"){const C=I[1]-s.top-this.yBarHeight/2;d.scrollTop=C*l/v}else if(y==="x"){const C=I[0]-s.left-this.xBarWidth/2;d.scrollLeft=C*w/b}A.$emit(this,"rail-pointer-down",f,y)},ensureVisible(f){let y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;k.scrollTo(f,{scrollMode:"if-needed",behavior:y?"smooth":"auto"})},getScrollTop(){const f=this.$refs.view;let y=f.scrollTop;const d=this.viewCachedRect?.height??f.offsetHeight,v=f.scrollHeight;return y+d>v&&(y=v-d),y},getScrollLeft(){return this.$refs.view.scrollLeft},setScroll(f,y){const d=this.$refs.view;d&&(E.isDefined(f)&&(d.scrollLeft=f),E.isDefined(y)&&(d.scrollTop=y))},resetScrollTop(){this.$refs.view.scrollTop=0},resetScrollLeft(){this.$refs.view.scrollLeft=0}}});x.default=p}(ZN)),ZN}var dq;function wa(){return dq||(dq=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Jye(),k=ht(),F=St();function B(E,A,u,o,S,_){return k.openBlock(),k.createElementBlock("div",{ref:"scrollbar",class:k.normalizeClass(E.wrapperCls)},[(k.openBlock(),k.createBlock(k.resolveDynamicComponent(E.viewTag),{ref:"view",class:k.normalizeClass(["v-scrollbar-view",E.viewClass]),style:k.normalizeStyle(E.viewStyle),onScrollPassive:E.handleScroll},{default:k.withCtx(()=>[k.createElementVNode("div",{class:k.normalizeClass(["v-scrollbar-inner",E.innerClass]),ref:"inner",style:k.normalizeStyle(E.innerStyle)},[k.renderSlot(E.$slots,"default")],6)]),_:3},40,["class","style","onScrollPassive"])),E.hasYRail?(k.openBlock(),k.createElementBlock("div",{key:0,ref:"y-rail",class:"y-rail rail",onTouchstart:A[2]||(A[2]=p=>E.onRailPointerDown(p,"y")),onMousedown:A[3]||(A[3]=k.withModifiers(p=>E.onRailPointerDown(p,"y"),["stop"])),style:k.normalizeStyle(E.yRailStyle)},[k.createElementVNode("div",{class:k.normalizeClass(["y-bar bar",E.barCls]),ref:"y-bar",style:k.normalizeStyle(E.yBarStyle),onTouchstart:A[0]||(A[0]=k.withModifiers(p=>E.onBarPointerDown(p,"y"),["stop"])),onMousedown:A[1]||(A[1]=k.withModifiers(p=>E.onBarPointerDown(p,"y"),["stop"]))},null,38)],36)):k.createCommentVNode("",!0),E.hasXRail?(k.openBlock(),k.createElementBlock("div",{key:1,ref:"x-rail",class:"x-rail rail",onTouchstart:A[6]||(A[6]=p=>E.onRailPointerDown(p,"x")),onMousedown:A[7]||(A[7]=k.withModifiers(p=>E.onRailPointerDown(p,"x"),["stop"])),style:k.normalizeStyle(E.xRailStyle)},[k.createElementVNode("div",{class:k.normalizeClass(["x-bar bar",E.barCls]),ref:"x-bar",style:k.normalizeStyle(E.xBarStyle),onTouchstart:A[4]||(A[4]=k.withModifiers(p=>E.onBarPointerDown(p,"x"),["stop"])),onMousedown:A[5]||(A[5]=k.withModifiers(p=>E.onBarPointerDown(p,"x"),["stop"]))},null,38)],36)):k.createCommentVNode("",!0)],2)}var G=F.default(M.default,[["render",B]]);x.default=G}(JN)),JN}var QN={},eP={},Dm={},fq;function Zye(){if(fq)return Dm;fq=1,Object.defineProperty(Dm,"__esModule",{value:!0});function x(F){return{name:F.to,acquireZIndex:F.acquireZIndex,mountTo:F.mountTo}}function M(F){return{innerStyle:F.targetStyle,innerClass:F.targetClass,anchor:F.anchor,alignment:F.alignment}}function k(F,B){throw new Error("mount portal target only for vue2")}return Dm.getPortalTargetData=M,Dm.getPortalTargetProps=x,Dm.mountPortalTarget=k,Dm}var lS={},gq;function Qye(){if(gq)return lS;gq=1,Object.defineProperty(lS,"__esModule",{value:!0});var x=ac();const M={disabled:{type:Boolean,default:!1},name:{type:String,default:()=>String(Math.round(Math.random()*1e7))},order:{type:Number,default:0},slotProps:{type:x.definePropType(Object),default:()=>({})},to:{type:String,default:()=>String(Math.round(Math.random()*1e7))},mountTo:{type:x.definePropType([String,HTMLElement,Function]),default:void 0},alignment:{type:[String,Object],default:void 0},anchor:{type:[Object,HTMLElement],default:void 0},acquireZIndex:{type:Boolean,default:!1},targetClass:{type:x.definePropType([String,Object,Array]),default:void 0},targetStyle:{type:x.definePropType([String,Object,Array]),default:void 0}};return lS.portalProps=M,lS}var pq;function Lg(){return pq||(pq=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=sc(),k=rd(),F=V3(),B=z3(),G=Zye(),E=Qye(),A=ht();function u(S,_,p){const f=F.useWormhole();let y=null,d=A.ref(null),v=A.ref(null);A.getCurrentInstance()?.proxy?.$parent;function b(){const{to:w,name:I,order:C,mountTo:h}=S;_.default?f.open({to:w,from:I,order:C,content:_.default}):s()}function s(w){f.close({to:w??S.to,from:S.name}),y?.()}function l(){const{portalTarget:w,doAlign:I,destroyFn:C,update:h}=G.mountPortalTarget();return d.value=w,v&&(v.value=I),C}return A.onMounted(()=>{S.disabled||b()}),A.onUpdated(()=>{S.disabled?s():b()}),A.onBeforeUnmount(()=>{s()}),A.watch(()=>S.mountTo,()=>{y?.(),y=l()}),A.watch(()=>S.to,(w,I)=>{S.disabled||(I&&I!==w&&s(I),b())}),{portalTarget:d,doAlign:v}}var o=A.defineComponent({name:"Portal",props:E.portalProps,emits:["aligned"],setup(S,_){let{slots:p,emit:f,expose:y}=_;const d=v=>f("aligned",v);if(S.mountTo&&M.isVue3){const v=A.computed(()=>({...G.getPortalTargetProps(S),...G.getPortalTargetData(S)})),{render:b,mountTo:s,doAlign:l}=B.useTargetContent({props:v,onAligned:d});return y({doAlign:l}),()=>{if(S.disabled&&p?.default)return p.default(S.slotProps);if(p?.default)return k.h(A.Teleport,{props:{to:s.value}},[b(()=>p?.default?.(S.slotProps)??[])])}}else{const{portalTarget:v,doAlign:b}=u(S,p);y({portalTarget:v,doAlign:b})}return()=>S.disabled&&p.default?p.default(S.slotProps):null}});x.default=o,x.usePortal=u}(eP)),eP}var mq;function xl(){return mq||(mq=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Dr(),k=Kt(),F=Ur(),B=rl(),G=Lg(),E=fr(),A=Ng(),u=ht(),o=ac();function S(f){return k.isFunction(f)&&(f=f()),k.isString(f)?document.querySelector(f):f}const _={root:"root",ancestor:"ancestor",manager:"manager",config:"config"};var p=u.defineComponent({components:{vPortal:G.default},mixins:[E.inject("adaptive-container-root"),E.inject("adaptive-container"),A.useConfigConsumer("hasPopupContainer")],props:{popupContainer:{type:o.definePropType([Function,String,HTMLElement]),default:void 0},useAdaptiveContainer:{type:[Array,Boolean],default:()=>[_.root,_.ancestor,_.manager,_.config]}},data:()=>({}),computed:{innerUseAdaptiveContainer(){let f=this.getConfigValue("useAdaptiveContainer");return f===!1?f=[_.root,_.manager,_.config]:f===!0&&(f=[_.root,_.ancestor,_.manager,_.config]),f},innerPopupContainer(){return this.getConfigValue("popupContainer")}},mounted(){this.$popupManager||F.remind("without popup manager, z-index will not be adatpive and will not have global popup container injected")},methods:{getRootContainerEl(){const f=this["adaptive-container-root"]?.instance,y=f?.forceUseAdaptiveContainer?.(),d=f?.getAdaptiveContainer?.();return{container:S(d),type:_.root,force:y}},getAncestorContainerEl(){const f=this["adaptive-container"]?.instance,y=f?.forceUseAdaptiveContainer?.(),d=f?.getAdaptiveContainer?.();return{container:S(d),type:_.ancestor,force:y}},getManagerContainerEl(){const f=this.$popupManager?.getPopupContainer();return{container:f?S(f):null,type:_.manager,force:!1}},getConfigContainerEl(){return{container:this.innerPopupContainer?S(this.innerPopupContainer):null,type:_.config,force:!1}},getContainerEl(){if(B.isServer)return null;const f=[this.getConfigContainerEl(),this.getAncestorContainerEl(),this.getRootContainerEl(),this.getManagerContainerEl()];let y=null;for(const{container:d,force:v,type:b}of f){if(v)return d??document.body;this.innerUseAdaptiveContainer.includes(b)&&d&&!y&&(y=d)}return y??document.body},outOfContainer(f){const y=this.getContainerEl(),d=f?.getBoundingClientRect(),v=y?.getBoundingClientRect();return d&&v?!M.isRectInRect(d,v):!0},outOfContainerHeight(f){const y=this.getContainerEl(),d=f.getBoundingClientRect(),v=y&&y.getBoundingClientRect();return v?d.top<v.top||d.bottom>v.bottom:!1}}});x.RetrieveContainerKeys=_,x.default=p,x.getElement=S}(QN)),QN}var vq;function Eu(){return vq||(vq=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Xn(),k=Bg(),F=Zo(),B=fr(),G=Kt(),E=wa(),A=xl(),u=Qo(),o=ln(),S=ht(),_=St();const p=S.defineComponent({name:"Menu",components:{vScrollbar:E.default,vTrapFocus:k.default},mixins:[F.default,B.provide("menu"),B.inject("menu"),B.inject("sub-menu-item"),B.inject("trigger-action"),A.default],props:{width:{type:[Number,String],default:170,validator:d=>typeof d=="string"?d==="auto":!0},alignment:{type:String,default:"tl->tr"},defaultAlignment:{type:Object,default:()=>({pos:"tl->tr"})},height:{type:Number,default:void 0},useScrollbar:{type:Boolean,default:!1},position:{type:Array,default:()=>[0,0]},isOpen:{type:Boolean,default:!0},isRoot:{type:Boolean,default:!0},closeOnSelect:{type:Boolean,default:void 0},emitEventOnly:{type:Boolean,default:!1},zIndex:{type:Number,default:15e3},autoFocus:{type:[Boolean,Number],default:!0},onClose:{type:Function,default:void 0},triggerAction:{type:Object,default:()=>{}},focusTriggerWhenClosed:{type:[Boolean,Function],default:!0}},emits:["item-select","item-change","item-created","item-hover","item-hover-out","item-removed","group-created","select","change","menu-closed","menu-opened","close-menu","mouseenter","mouseleave"],data(){return{activeIndex:0,items:[],groups:[],subMenus:[],parentMenuItem:null,triggerButton:null,showIcon:!1,isOver:!1,isOutOfBound:!1,forceScroll:void 0,forceHeight:void 0,forceWidth:void 0}},computed:{menuCls(){return["v-menu",{"v-menu-icon-menu":this.showIcon}]},menuStyle(){let d=this.height?`${this.height}px`:"auto",v=G.isString(this.width)?this.width:`${+this.width}px`;return G.isDefined(this.forceHeight)&&(d=`${this.forceHeight}px`),G.isDefined(this.forceWidth)&&(v=`${this.forceWidth}px`),{height:d,width:v,left:`${this.position[0]}px`,top:`${this.position[1]}px`,zIndex:this.zIndex}}},watch:{isOpen:{immediate:!0,async handler(d){d===!0&&this.autoActiveItem()}},isOver:{handler(d){this.isRoot||d===!1&&this.tryCloseMenu()}}},created(){o.$on(this,"item-created",d=>{this.items.push(d),(d.icon||d.type==="checkbox"||d.type==="select")&&(this.showIcon=!0)}),o.$on(this,"item-hover",d=>{const v=this.items.indexOf(d);v>=0&&this.activeItemByIndex(v)}),o.$on(this,"item-hover-out",d=>{this.deactiveItem(d)}),o.$on(this,"item-removed",d=>{this.items=this.items.filter(v=>v!==d)}),o.$on(this,"group-created",d=>{this.groups.push(d)}),o.$on(this,"select",(d,v)=>{if(!this.isRoot){this.dispatch("Menu","select",[d,v]);return}this.emitEventOnly===!1&&d.setSelected(v),o.$emit(this,"item-select",d,v),this.canCloseOnSelect(d)&&this.closeMenu(d)}),o.$on(this,"change",(d,v,b)=>{if(!this.isRoot){this.dispatch("Menu","change",[d,v,b]);return}o.$emit(this,"item-change",d,v,b)})},mounted(){this.isRoot?this.getTriggerAction()?.register?.(this):(this.menu?.register(this),this["sub-menu-item"]?.register?.(this)),o.$emit(this,"menu-opened")},[M.componentHooks.beforeUnmount](){this.isRoot?this.getTriggerAction()?.unregister?.(this):(this.menu?.unregister(this),this["sub-menu-item"]?.unregister(this)),o.$emit(this,"menu-closed")},methods:{async autoActiveItem(){G.isNumber(this.autoFocus)?(await S.nextTick(),this.activeItemByIndex(this.autoFocus)):this.autoFocus&&(await S.nextTick(),this.tryActiveFirstItem())},getDefaultAlignment(){return this.defaultAlignment},canCloseOnSelect(d){return G.isDefined(d.closeOnSelect)?G.isFunction(d.closeOnSelect)?d.closeOnSelect():d.closeOnSelect:G.isDefined(this.closeOnSelect)?this.closeOnSelect:d.type==="item"},canClose(){return this.subMenus?!this.isOver&&this.subMenus.every(d=>d.canClose()):!this.isOver},tryCloseMenu(){this.parentMenuItem&&this.parentMenuItem.tryCloseMenu()},getTriggerAction(){return this.triggerAction?this.triggerAction:this["trigger-action"]},async closeMenu(d){if(this.subMenus)for(const v of this.subMenus)await v.closeMenu();if(this.onClose?.(),this.isRoot){const v=this.getTriggerAction();v?.closeDropdown?.(),await this.$nextTick();const b=d?.focusTriggerWhenClosed??this.focusTriggerWhenClosed;b===!0?v?.focusTrigger?.():G.isFunction(b)&&b()}o.$emit(this,"close-menu")},register(d){if(d.$options.name==="Menu"){if(d.isRoot)return;this.subMenus.push(d)}else d.$options.name==="MenuSubmenu"&&(d.parentMenu=this)},unregister(d){const v=this.subMenus.indexOf(d);v>-1&&this.subMenus.splice(v,1)},withinSubMenuEl(d){return this.subMenus.some(v=>v.contains(d))},onMouseEnter(){this.isOver=!0,o.$emit(this,"mouseenter")},onMouseLeave(){this.isOver=!1,o.$emit(this,"mouseleave")},async onArrowKeydown(d){u.isUpArrow(d)?this.activePrevItem():u.isDownArrow(d)?this.activeNextItem():u.isRightArrow(d)||u.isEnter(d)?this.items[this.activeIndex]&&this.items[this.activeIndex].hasChildMenu&&this.items[this.activeIndex].openChildMenuWithFocus():u.isLeftArrow(d)&&(this.parentMenuItem?.$el?.focus(),await this.closeMenu())},tryActiveFirstItem(){for(let d=0,v=this.items.length;d<v;d++)if(this.items[d].activatable)return this.activeItemByIndex(d)},activePrevItem(){if(this.activeIndex===-1)return this.tryActiveFirstItem();for(let d=this.activeIndex-1;d>=0;d--)if(this.items[d].activatable)return this.activeItemByIndex(d)},activeNextItem(){if(this.activeIndex===-1)return this.tryActiveFirstItem();for(let d=this.activeIndex+1;d<this.items.length;d++)if(this.items[d].activatable)return this.activeItemByIndex(d)},activeItemByIndex(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:-1;if(d<0||this.items.length<=d)return;const v=this.items[d];this.activeItem(v,d)},activeItem(d,v){d&&(this.activeIndex!==-1&&this.items[this.activeIndex].deactivate(),d.activate(),this.activeIndex=v)},deactiveItem(d){d&&(d.deactivate(),this.activeIndex=-1)},async tryConstrain(d){d.constrainHeight&&(this.forceHeight=d.constrainHeight,this.forceScroll=!0,await S.nextTick(),await this.autoActiveItem()),d.constrainWidth&&(this.forceWidth=d.constrainWidth)}}});function f(d,v,b,s,l,w){const I=S.resolveComponent("v-scrollbar"),C=S.resolveComponent("v-trap-focus"),h=S.resolveDirective("syno-id");return S.withDirectives((S.openBlock(),S.createBlock(C,{ref:"menu",style:S.normalizeStyle(d.menuStyle),class:S.normalizeClass(d.menuCls),tabindex:"-1",role:"listbox",onMouseenter:d.onMouseEnter,onMouseleave:d.onMouseLeave,onKeydown:[S.withKeys(S.withModifiers(d.onArrowKeydown,["prevent"]),["up","native"]),S.withKeys(S.withModifiers(d.onArrowKeydown,["prevent"]),["down","native"]),S.withKeys(S.withModifiers(d.onArrowKeydown,["prevent"]),["right","native"]),S.withKeys(S.withModifiers(d.onArrowKeydown,["prevent"]),["left","native"]),S.withKeys(S.withModifiers(d.onArrowKeydown,["prevent"]),["enter","native"]),v[0]||(v[0]=S.withKeys(S.withModifiers(c=>d.closeMenu(),["prevent","stop"]),["esc","native"]))]},{default:S.withCtx(()=>[S.renderSlot(d.$slots,"top-actions"),d.forceScroll||d.useScrollbar?(S.openBlock(),S.createBlock(I,{key:0,"active-adaptive-scrollbar":!1},{default:S.withCtx(()=>[S.renderSlot(d.$slots,"default")]),_:3})):S.renderSlot(d.$slots,"default",{key:1}),S.renderSlot(d.$slots,"bottom-actions")]),_:3},8,["style","class","onMouseenter","onMouseleave","onKeydown"])),[[S.vShow,d.isOpen],[h]])}var y=_.default(p,[["render",f]]);x.default=y}(KN)),KN}var tP={},uS={},yq;function jF(){if(yq)return uS;yq=1,Object.defineProperty(uS,"__esModule",{value:!0});const x={Enter:"enter",Done:"done",Go:"go",Next:"next",Previous:"previous",Search:"search",Send:"send"};return uS.EnterHint=x,uS}var wq;function Tl(){return wq||(wq=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=sc(),k=Zo(),F=ln(),B=Xn(),G=jF(),E=Kt(),A=Qo(),u=fr(),o=ht(),S=o.defineComponent({mixins:[k.default,u.inject("data-table"),u.inject("form-controls-group")],props:{subscribeField:{type:String,default:void 0},activeFormItem:{type:Boolean,default:!0},enterKey:{type:String,default:G.EnterHint.Enter,validator(_){return _?Object.values(G.EnterHint).includes(_):!0}},boundaryComponentName:{type:String,default:M.isVue3?"Portal":"PortalTarget"}},emits:["focus-next-field","focus-prev-field","blur"],data(){return{validateByField:!1,disabledKey:"disabled"}},mounted(){const _=this["form-controls-group"]?.instance?.deactiveChildrenFormItems?.();if(_){const p=E.isFunction(_)?_():_;if(E.isBoolean(p)){if(p)return}else if(E.isExtendVueComponent(this,p))return}if(this.activeFormItem){if(this.subscribeField){this.dispatch("FormItem","form.register",[this,this.subscribeField],{key:"registerKey",value:this.subscribeField},this.boundaryComponentName);return}this["data-table"]&&this["data-table"].register(this,()=>{this.inDataTableBehavior()}),this.dispatch("FormItem","form.register",[this,this.subscribeField],!1,this.boundaryComponentName)}},[B.componentHooks.beforeUnmount](){if(this.activeFormItem){if(this.subscribeField){this.dispatch("FormItem","form.unregister",[this,this.subscribeField],{key:"registerKey",value:this.subscribeField},this.boundaryComponentName);return}this.dispatch("FormItem","form.unregister",[this,this.subscribeField],!1,this.boundaryComponentName)}},methods:{handleEnterKeyHint(_){A.isEnter(_)&&(this.enterKey===G.EnterHint.Next?F.$emit(this,"focus-next-field"):this.enterKey===G.EnterHint.Previous&&F.$emit(this,"focus-prev-field"))},validate(){},inDataTableBehavior(){},onBlur(_){F.$emit(this,"blur",_)}}});x.default=S}(tP)),tP}var bq;function La(){return bq||(bq=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=_i(),k=Xn(),F=Kt(),B=Si(),G=UF(),E=Ru(),A=ya(),u=Eu(),o=xl(),S=Zo(),_=Ur(),p=fr(),f=Tl(),y=vr(),d=kr(),v=ln(),b=ht(),s=St();y.register("btn-arrow",d.vIconButtonArrowDown);function l(N){return F.isFunction(N.isMenu)&&N.isMenu()}function w(N){return F.isExtendVueComponent(N,u.default)}function I(N){return F.isExtendVueComponent(N,G.default)}const C={NORMAL:"normal",SMALL:"small"},h=b.defineComponent({name:"Button",directives:{clickoutside:E.default,tooltip:A.default},mixins:[S.default,o.default,p.provide("trigger-action",["closeDropdown",{expose:"focusTrigger",internal:"focus"}]),f.default,p.inject("breakpoint-buttons-group"),y.default],props:{type:{type:String,default:"",validator:N=>["","footbar","dropdown","styleless-dropdown","styleless","styleless-icon","split","border","border-dropdown","border-split","footbar-border","footbar-border-dropdown","welcome","round","round-border"].includes(N)},size:{type:String,default:C.NORMAL,validator:N=>Object.values(C).includes(N)},display:{type:String,default:"text",validator(N){return["text","icon","icon-text"].includes(N)}},suffix:{type:String,default:"grey"},htmlType:{type:String,default:"button"},disabled:{type:Boolean,default:!1},icon:{type:String,default:void 0},alignment:{type:Object,default:()=>({})},menuAlign:{type:String,default:"tl->bl"},menuConstrainHeight:{type:Boolean,default:!1},tooltip:{type:[Object,String,Boolean],default:!1},dropdownOffset:{type:Array,default:()=>[0,1]},useBreakpoint:{type:Boolean,default:!0},name:{type:String,default:""},mobileBreakpoint:{type:[String,Boolean],default:"xxs"},active:{type:Boolean,default:!1},getExtraElements:{type:Function,default:void 0}},emits:["click","dropdown-show","dropdown-open","dropdown-close","click-dropdown"],data:()=>({prefixCls:"v-btn",clickTimer:null,hasDropdownSlot:!1,dropdownShown:!1,pressed:!1,dropdownItem:null}),computed:{isMobile(){return!this.$breakpointManager&&this.mobileBreakpoint?(_.remind("please import and use BreakpointManagerPlugin when you are in tree-shaking mode or breakpoint will not active."),!1):this.mobileBreakpoint&&this.$breakpointManager?.lessAndEqThan(this.mobileBreakpoint)},isStyleless(){return this.type.includes("styleless")},isDropdown(){return this.type.includes("dropdown")},hasDropdown(){return this.isDropdown||this.isSplitMode},isSplitMode(){return this.type.includes("split")},isBorder(){return this.type.includes("border")},dropdownSvgIconSet(){return this.isBorder?"set13":this.isStyleless||this.suffix=="grey"||this.suffix==="cancel"?"set01":"set02"},btnClassObj(){let{prefixCls:N,type:z,suffix:H,icon:$}=this;const V={};return V[N]=!0,z!==""&&(V[`${N}-${z}`]=z),V[`${N}-styleless`]=this.isStyleless,V[`${N}-${H}`]=H,V[`${N}-${this.size}`]=this.size,V[`${N}-menu-shown`]=this.dropdownShown,V[`${N}-pressed`]=this.pressed,V[`${N}-active`]=this.active,V[`${N}-dropdown`]=this.hasDropdown,V[`${N}-split`]=this.isSplitMode,V[`${N}-dropdown-shown`]=this.dropdownShown,V[`${N}-disabled`]=this.disabled,V.mobile=this.isMobile,V[`${N}-display-${this.display}`]=!0,V[$]=!!$,V},ariaLabel(){return this.icon?this.getTip()&&this.getTip().content||this.name:!1},innerAlignment(){return M.merge({pos:this.menuAlign,offset:this.dropdownOffset,opts:{constrainHeight:this.menuConstrainHeight}},this.alignment)}},watch:{dropdownShown:{async handler(N){v.$emit(this,"dropdown-show",N),N===!0?v.$emit(this,"dropdown-open",N):v.$emit(this,"dropdown-close",N)},immediate:!0}},mounted(){this["breakpoint-buttons-group"]&&this.useBreakpoint&&this["breakpoint-buttons-group"].register(this),this.hasDropdownSlot=B.hasSlot(this,"dropdown")},[k.componentHooks.beforeUnmount](){this["breakpoint-buttons-group"]&&this.useBreakpoint&&this["breakpoint-buttons-group"].unregister(this),this.clearDropdownItem()},methods:{innerGetExtraElements(){let N=this.getExtraElements?.()??[];return N=F.isArray(N)?N:[N],[this.$el,...N]},focus(){this.$el?.focus()},closeDropdown(){this.dropdownShown=!1},hasDefaultSlot(){return B.hasSlot(this,"default")},hasIconSlot(){return B.hasSlot(this,"icon")},onClickoutside(){this.closeDropdown()},getTip(){return this.tooltip===!1?!1:F.isObject(this.tooltip)?this.tooltip:{content:this.tooltip}},setDropdownItem(N){this.clearDropdownItem(),this.dropdownItem=N},clearDropdownItem(){this.disposedDropdownItemFn?.(),this.dropdownItem&&(this.dropdownItem=null)},register(N){let z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:()=>{};(w(N)||l(N)||I(N))&&(this.setDropdownItem(N),z(this))},unregister(N){N&&this.dropdownItem===N&&this.clearDropdownItem(N)},handleClick(N){this.disabled||(N.stopPropagation(),this.hasDropdownSlot&&(this.isSplitMode?this.dropdownShown=!1:this.dropdownShown=!this.dropdownShown),this.dispatch("ButtonGroup","button.click",this),v.$emit(this,"click",N))},handleDropdownBtnClick(N){this.disabled||this.isSplitMode&&(N.stopPropagation(),this.dropdownShown=!this.dropdownShown,v.$emit(this,"click-dropdown",N))},setPressed(N){this.pressed=N},onDropdownAligned(N){this.dropdownItem?.tryConstrain(N)}}}),c=["type","aria-haspopup","aria-expanded","aria-disabled","aria-label","role"],m={key:0,class:"v-btn-content"},T=b.createElementVNode("i",{class:"split-div"},null,-1);function D(N,z,H,$,V,P){const U=b.resolveComponent("v-icon"),Y=b.resolveComponent("v-portal"),Z=b.resolveDirective("tooltip"),X=b.resolveDirective("clickoutside"),J=b.resolveDirective("syno-id");return b.withDirectives((b.openBlock(),b.createElementBlock("button",{type:N.htmlType,class:b.normalizeClass(N.btnClassObj),"aria-haspopup":N.hasDropdown,"aria-expanded":N.dropdownShown,"aria-disabled":N.disabled,"aria-label":N.ariaLabel,role:N.hasDropdown?"combobox":"button",onClick:z[0]||(z[0]=function(){return N.handleClick&&N.handleClick(...arguments)}),onKeydown:z[1]||(z[1]=b.withKeys(b.withModifiers(q=>N.dropdownShown=!0,["stop"]),["down"]))},[N.hasDefaultSlot()||N.hasIconSlot()?b.withDirectives((b.openBlock(),b.createElementBlock("span",{key:0,class:b.normalizeClass(`${N.prefixCls}-text`)},[b.renderSlot(N.$slots,"icon",{disabled:"disabled"}),N.hasDefaultSlot()?(b.openBlock(),b.createElementBlock("span",m,[b.renderSlot(N.$slots,"default")])):b.createCommentVNode("",!0),N.isDropdown?(b.openBlock(),b.createBlock(U,{key:1,class:b.normalizeClass(N.prefixCls+"-dropdown-btn"),name:"btn-arrow",onClick:N.handleDropdownBtnClick,"svg-icon-set":N.dropdownSvgIconSet},null,8,["class","onClick","svg-icon-set"])):b.createCommentVNode("",!0)],2)),[[Z,N.getTip()]]):b.createCommentVNode("",!0),N.isSplitMode?(b.openBlock(),b.createElementBlock(b.Fragment,{key:1},[T,b.createVNode(U,{class:b.normalizeClass(N.prefixCls+"-dropdown-btn split-btn"),name:"btn-arrow",onClick:N.handleDropdownBtnClick,"svg-icon-set":N.dropdownSvgIconSet},null,8,["class","onClick","svg-icon-set"])],64)):b.createCommentVNode("",!0),N.dropdownShown?(b.openBlock(),b.createBlock(Y,{key:2,"mount-to":N.getContainerEl(),ref:"portal",onAligned:N.onDropdownAligned,"acquire-z-index":"",alignment:N.innerAlignment,anchor:N.$el},{default:b.withCtx(()=>[b.withDirectives((b.openBlock(),b.createElementBlock("div",{class:b.normalizeClass(N.prefixCls+"-dropdown"),ref:"dropdown"},[b.renderSlot(N.$slots,"dropdown",{closeDropdown:N.closeDropdown,focusTrigger:N.focus})],2)),[[X,N.onClickoutside,N.innerGetExtraElements(),{children:!0}]])]),_:3},8,["mount-to","onAligned","alignment","anchor"])):b.createCommentVNode("",!0)],42,c)),[[J]])}var O=s.default(h,[["render",D]]);x.default=O}(zN)),zN}var nP={},hS={},Cq;function ev(){if(Cq)return hS;Cq=1,Object.defineProperty(hS,"__esModule",{value:!0});var x=sc();function M(k){return x.isVue2?k._uid:k.$.uid}return hS.getUid=M,hS}var _q;function kl(){return _q||(_q=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Xn(),k=fr(),F=Ur(),B=ln(),G=ev(),E=ht(),A=St();const u=E.defineComponent({name:"Layout",mixins:[k.provide("layout"),k.inject("layout"),k.inject("layout-container")],props:{tag:{type:String,default:"div"},type:{type:String,default:"none"},order:{type:Number,default:0},customLayoutStyles:{type:Object,default:()=>({})}},emits:["keydown"],data(){return{children:[],parent:null,sibling:null,active:!0}},computed:{layoutData(){return this.$layoutManager?this.$layoutManager.getLayoutData(this):{}},currentLayoutStyles(){const{styles:_}=this.layoutData;let p={},f={};for(let[y,d]of Object.entries(this.customLayoutStyles))p[d]=_[y];for(const[y,d]of Object.entries(_))f[`--svc-${y}`]=d;return{...f,...p}},currentClass(){return["v-layout",{"pass-through":this.passThrough},"layout-"+this.type.replace(".","-")]},passThrough(){const{props:_}=this.layoutData;return!!_?.["pass-through"]}},mounted(){if(this.$layoutManager&&(this.layout&&(this.layout.register(this),this.parent=this.layout.instance,this.sibling=this.parent.children),this["layout-container"])){const _=this["layout-container"].instance;B.$on(_,"activate",this.onContainerActivate),B.$on(_,"deactivate",this.onContainerDeactivate)}},[M.componentHooks.beforeUnmount](){if(this.layout&&this.layout.unregister(this),this["layout-container"]){const _=this["layout-container"].instance;B.$off(_,"activate",this.onContainerActivate),B.$off(_,"deactivate",this.onContainerDeactivate)}},methods:{onContainerActivate(){this.active=!0},onContainerDeactivate(){this.active=!1},register(_){this.children=this.children||[],this.children.push(_)},unregister(_){const p=this.children.findIndex(f=>G.getUid(f)===G.getUid(_));this.children.splice(p,1)},getSiblingIndex(){return this.sibling?this.sibling.filter(p=>p.active).sort((p,f)=>p.order>f.order?1:p.order<f.order?-1:0).findIndex(p=>G.getUid(p)===G.getUid(this)):-1},onKeydown(_){B.$emit(this,"keydown",_)},onClick(_){this.$layoutManager.debug&&(_.stopPropagation(),F.log("Layout on this element ",this.$el,"with below paths: "),F.tableLog(this.$layoutManager.getLayoutData(this).paths))}}});function o(_,p,f,y,d,v){return E.openBlock(),E.createBlock(E.resolveDynamicComponent(_.tag),{style:E.normalizeStyle(_.currentLayoutStyles),class:E.normalizeClass(_.currentClass),onClick:_.onClick,onKeydown:_.onKeydown},{default:E.withCtx(()=>[E.renderSlot(_.$slots,"default")]),_:3},40,["style","class","onClick","onKeydown"])}var S=A.default(u,[["render",o]]);x.default=S}(nP)),nP}var rP={},Wc={},Sq;function Yx(){if(Sq)return Wc;Sq=1,Object.defineProperty(Wc,"__esModule",{value:!0});var x=rd(),M=_i();function k(u,o){return u.attrs[`on${M.upperFirst(M.camelCase(o))}`]}function F(u){return u.slots??{}}function B(u){return u.attrs}function G(u){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:["slots"];const S=F(u);let _;{const{slots:p,emit:f,...y}=u;_={...y,attrs:B(u)}}return Object.keys(S).length>0&&o.includes("slots")&&(_.scopedSlots=S),_}function E(u,o){for(var S=arguments.length,_=new Array(S>2?S-2:0),p=2;p<S;p++)_[p-2]=arguments[p];u.emit(o,..._)}function A(u){for(var o=arguments.length,S=new Array(o>1?o-1:0),_=1;_<o;_++)S[_-1]=arguments[_];return x.h(...S)}return Wc.emit=E,Wc.getAttrs=B,Wc.getListener=k,Wc.getSlots=F,Wc.getTransparentRawProps=G,Wc.h=A,Wc}var Iq;function Kx(){return Iq||(Iq=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Yx(),k=dhe(),F=Kt();const B=["class","style"],G={parseTags:{type:Array,default(){return["br","li","ul","ol","a","span","b","p"]}},allowAttrs:{type:Array,default(){return[]}},linkTags:{type:Array,default(){return["a","span"]}},text:{type:String,default:""}};function E(S,_){const{name:p,rawProps:f,children:y}=_;return F.isString(_)?_:M.h(S,p,f,y.map(d=>E(S,d)))}const A=(S,_,p)=>{const f=(b,s,l)=>{const w=Object.entries(s).reduce((I,C)=>{let[h,c]=C;return(_.allowAttrs.includes(h)||B.includes(h))&&(I[h]=c),I},{});return l?{name:b,rawProps:{attrs:w,on:{click:()=>{M.emit(p,"click-link",s["link-id"],w)}}},children:[]}:{name:b,rawProps:{attrs:w},children:[]}},y=[],d=[];return new k.Parser({onopentag(b,s){if(!_.parseTags.includes(b))return;const l=y.length>0?y[y.length-1]:null,w=f(b,s,_.allowAttrs,_.linkTags.includes(b));l?l.children.push(w):d.push(w),y.push(w)},ontext(b){const s=y.length>0?y[y.length-1]:null;s?s.children.push(b):d.push(b)},onclosetag(b){_.parseTags.includes(b)&&y.pop()}}).write(_.text),d.map(b=>E(S,b))};let u;u=function(_,p){return A(void 0,_,p)},u.componentName="RichText",u.props=G,u.emits=["click-link"];var o=u;x.default=o}(rP)),rP}var cS={},xq;function Kl(){if(xq)return cS;xq=1,Object.defineProperty(cS,"__esModule",{value:!0});var x=Ux(),M=ht();function k(F){{const B=(G,E)=>{let{attrs:A,slots:u}=E;return G.wrap?M.h(F,A,u):G.multiple?u.default?.():x.ensureOnlyChild(u.default())};return B.componentName="WithWrap",B.props=["wrap","multiple"],B}}return cS.withWrap=k,cS}var Tq;function U3(){return Tq||(Tq=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=ln(),k=Zo(),F=ci(),B=Kt(),G=La(),E=kl(),A=fr(),u=vr(),o=Kx(),S=kr(),_=WF(),p=Kl(),f=_i(),y=ht(),d=St();u.register("alert-bar-close",S.vIconToastClose),u.register("alert-bar-status-info",S.vIconStatusInfo),u.register("alert-bar-status-processing",S.vIconStatusProcessing),u.register("alert-bar-status-normal",S.vIconStatusNormal),u.register("alert-bar-status-warning",S.vIconStatusWarning),u.register("alert-bar-status-error",S.vIconStatusError);function v(w){switch(w){case"gery":return"info";case"blue":return"processing";case"green":return"normal";case"orange":return"warning";case"red":return"error";default:return"info"}}const b=y.defineComponent({name:"AlertBar",components:{withAffix:p.withWrap(_.default),vButton:G.default,vLayout:E.default,vRichText:o.default},mixins:[k.default,F.default,u.default,A.inject("alert-bar-container")],props:{affix:{type:[Boolean,Object],default:!1},suffix:{type:String,default:"grey"},showClose:{type:Boolean,default:void 0},onClick:{type:Function,default:B.noop},text:{type:String,default:""},actionType:{type:[Boolean,String],default:!1},actionText:{type:String,default:"close"},actionCls:{type:String,default:""},textCls:{type:String,default:""},onClickActionBtn:{type:Function,default:B.noop},icon:{type:[Boolean,String,Object],default:!1}},emits:["close"],data:()=>({prefix:"v-alert-bar"}),computed:{innerAffixBind(){const w=B.isBoolean(this.affix)?{}:this.affix;return{target:this["alert-bar-container"]?()=>this["alert-bar-container"]?.instance?.getScrollEl():void 0,...w}},innerShowClose(){return B.isBoolean(this.showClose)?this.showClose:!1},wrapCls(){return[this.prefix,`${this.prefix}-${this.suffix}`,{"has-icon":this.hasIcon,"has-btn":this.hasActionButton,"has-link":this.hasActionLink,"has-close":this.innerShowClose}]},extendedActionBtnCls(){return[`${this.prefix}-action`,"right",this.actionCls]},extendedActionLinkCls(){return[`${this.prefix}-action`,"right",`${this.prefix}-action__link`,this.actionCls,{"has-close":this.innerShowClose}]},extendedTextCls(){return[`${this.prefix}-text`,this.textCls,{"has-btn":this.hasActionButton,"has-link":this.hasActionLink,"has-icon":this.hasIcon,"has-close":this.innerShowClose}]},hasIcon(){return!!this.icon},innerIcon(){const w="alert-bar-status",I=B.isString(this.icon)?this.icon:v(this.suffix);return f.merge({name:`${w}-${I}`},B.isObject(this.icon)?this.icon:{})},hasActionButton(){return this.actionType==="button"},hasActionLink(){return this.actionType==="link"}},methods:{onClose(){M.$emit(this,"close")}}});function s(w,I,C,h,c,m){const T=y.resolveComponent("v-icon"),D=y.resolveComponent("v-rich-text"),O=y.resolveComponent("v-button"),N=y.resolveComponent("v-layout"),z=y.resolveComponent("with-affix"),H=y.resolveDirective("syno-id");return y.openBlock(),y.createBlock(z,y.mergeProps({wrap:w.affix},w.innerAffixBind),{default:y.withCtx(()=>[y.withDirectives((y.openBlock(),y.createBlock(N,{type:"alert-bar"},{default:y.withCtx(()=>[y.createElementVNode("div",{class:y.normalizeClass(w.wrapCls),tabindex:"-1"},[w.hasIcon?(y.openBlock(),y.createBlock(T,y.mergeProps({key:0},w.innerIcon,{class:"alert-bar-status-icon"}),null,16)):y.createCommentVNode("",!0),y.createElementVNode("div",{tabindex:"0",class:y.normalizeClass(w.extendedTextCls),onClick:I[0]||(I[0]=function(){return w.onClick&&w.onClick(...arguments)})},[y.renderSlot(w.$slots,"text",{},()=>[y.createVNode(D,{text:w.text,"allow-attrs":["href","target"]},null,8,["text"])])],2),w.hasActionButton?(y.openBlock(),y.createBlock(O,{key:1,"syno-id":`${w.synoId}-action-button`,class:y.normalizeClass(w.extendedActionBtnCls),suffix:w.suffix,size:"small",onClick:I[1]||(I[1]=()=>w.onClickActionBtn(this))},{default:y.withCtx(()=>[y.createTextVNode(y.toDisplayString(w.actionText),1)]),_:1},8,["syno-id","class","suffix"])):y.createCommentVNode("",!0),w.hasActionLink?(y.openBlock(),y.createElementBlock("button",{key:2,class:y.normalizeClass(w.extendedActionLinkCls),onClick:I[2]||(I[2]=()=>w.onClickActionBtn(this))},y.toDisplayString(w.actionText),3)):y.createCommentVNode("",!0),w.innerShowClose?(y.openBlock(),y.createBlock(T,{key:3,tabindex:"0",name:"alert-bar-close",class:y.normalizeClass(`${w.prefix}-close right`),size:[20,20],role:"button","aria-label":w._i18n("common","close"),onClick:w.onClose,"svg-icon-set":"set21"},null,8,["class","aria-label","onClick"])):y.createCommentVNode("",!0)],2)]),_:3})),[[H]])]),_:3},16,["wrap"])}var l=d.default(b,[["render",s]]);x.default=l}(VN)),VN}var iP={},oP={},dS={},kq;function ewe(){if(kq)return dS;kq=1,Object.defineProperty(dS,"__esModule",{value:!0});function x(M){const k=M.split(" ");return k.length>0?((k.shift()||"").charAt(0)+(k?.pop()?.charAt(0)??"")).toUpperCase():""}return dS.initName=x,dS}var Rq;function Xx(){return Rq||(Rq=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=La(),k=ewe(),F=vr(),B=ht(),G=St();const E=["#CF272D","#FFFFFF","#CF5600","#FFFFFF","#D1970F","#A67003","#18AD90","#FFFFFF","#FFFFFF","#0890C2","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#252AB8","#FFFFFF","#0067E6","#FFFFFF"],A=["#FFC3BD","#FF968F","#FFC987","#FFAB52","#FFEE99","#FFD447","#A5FADE","#26D4AC","#18AD90","#65DFF7","#8CCBFF","#2789F2","#003B99","#00304D","#A5B5FA","#252AB8","#91F0FF","#4E65E6"],u=B.defineComponent({name:"Avatar",components:{vButton:M.default},mixins:[F.default],props:{size:{type:String,default:"normal"},username:{type:String,default:"Red Huang"},showAccountSwitcher:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},computed:{initialName(){return k.initName(this.username)},avatarCls(){return[`v-avatar--${this.size}`]},avatarStyle(){return{"--bkg-color":A[this.username.length%A.length],"--front-color":E[this.username.length%E.length]}}}}),o={key:0,class:"rounded-icon"};function S(p,f,y,d,v,b){const s=B.resolveComponent("v-icon"),l=B.resolveComponent("v-button"),w=B.resolveDirective("syno-id");return B.withDirectives((B.openBlock(),B.createBlock(l,{"syno-id":`${p.synoId}-button`,class:B.normalizeClass(["v-avatar",p.avatarCls]),display:"icon",type:"styleless",style:B.normalizeStyle(p.avatarStyle),"menu-align":"tr->br",disabled:p.disabled},{dropdown:B.withCtx(()=>[B.renderSlot(p.$slots,"dropdown")]),default:B.withCtx(()=>[B.createTextVNode(B.toDisplayString(p.initialName)+" ",1),p.showAccountSwitcher?(B.openBlock(),B.createElementBlock("div",o,[B.createVNode(s,{name:"avatar-user",sprite:""})])):B.createCommentVNode("",!0)]),_:3},8,["syno-id","style","class","disabled"])),[[w]])}var _=G.default(u,[["render",S]]);x.default=_}(oP)),oP}var aP={},Eq;function Eb(){return Eq||(Eq=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=ht(),k=St();const F=["none","regular","dense"],B=["row","column"],G=["start","end","baseline","center","stretch"],E=["space-between","space-around","space-evenly"],A=M.defineComponent({name:"Space",props:{alignItem:{type:String,default:"center",validator(S){return G.includes(S)}},justifyContent:{type:String,default:"center",validator(S){return G.includes(S)||E.includes(S)}},direction:{type:String,default:"row",validator(S){return B.includes(S)}},spacing:{type:String,default:"regular",validator(S){return F.includes(S)}}},data(){return{}},computed:{wrapperCls(){return["v-space",`direction-${this.direction}`,`align-${this.alignItem}`,`justify-content-${this.justifyContent}`,`spacing-${this.spacing}`]}}});function u(S,_,p,f,y,d){return M.openBlock(),M.createElementBlock("div",{class:M.normalizeClass(S.wrapperCls)},[M.renderSlot(S.$slots,"default")],2)}var o=k.default(A,[["render",u]]);x.default=o}(aP)),aP}var sP={},Aq;function lc(){return Aq||(Aq=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Xn(),k=Zo(),F=Kt(),B=_i(),G=vr(),E=kr(),A=ln(),u=ht(),o=St();G.register("menu-item-tick",E.vIconTick),G.register("menu-item-untick",F.voidElement);const S=u.defineComponent({name:"MenuItem",mixins:[k.default,G.default],props:{id:{type:String,default:void 0},title:{type:String,default:void 0},desc:{type:String,default:void 0},icon:{type:[String,Object],default:void 0},iconType:{type:String,default:void 0},type:{type:String,default:"item"},disabled:{type:Boolean,default:void 0},selected:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},closeOnSelect:{type:[Boolean,Function],default:void 0},tooltip:{type:[String,Object],default:()=>{}},useHtml:{type:Boolean,default:!1},focusTriggerWhenClosed:{type:[Boolean,Function],default:void 0}},emits:["click","update:selected","selected","changed"],data(){return{isGroupItem:!1,innerSelected:this.selected,innerDisabled:this.disabled||!1,active:!1}},computed:{iconProps(){const d=this.getIconType();if(F.isObject(this.icon))return this.icon;let v=F.isString(this.icon)?{name:this.icon}:{};return d==="checkbox"?(v.name="menu-item-checkbox",v.sprite=!0):d==="select"&&(v={name:this.innerSelected?"menu-item-tick":"menu-item-untick",svgIconSet:"set03"}),v},role(){return this.type==="checkbox"?"checkbox":this.type==="select"?"option":"menuitem"},ariaChecked(){return this.type!=="checkbox"?!1:!!this.innerSelected},ariaSelected(){return this.type!=="select"?!1:!this.innerSelected},showIcon(){const d=this.getIconType();return this.icon||d==="checkbox"||d==="select"},iconCls(){const d=this.getIconType();return["v-icon","icon--left",{[`v-icon--${d}`]:d==="checkbox"||d==="select","v-checkbox-icon":d==="checkbox"}]},itemCls(){const d=this.getIconType();return["v-menu-item",{"v-menu-item-disabled disabled":this.innerDisabled,"v-checkbox-wrapper v-menu-item-checkbox":d==="checkbox","v-menu-item-checkbox-checked checked":d==="checkbox"&&this.innerSelected,"v-menu-item-checkbox-indeterminate indeterminate":this.indeterminate,"v-menu-item-select":d==="select","v-menu-item-select-selected selected":d==="select"&&this.innerSelected,active:this.active}]},activatable(){return!this.innerDisabled},mergedTooltip(){const d=F.isString(this.tooltip)?{content:this.tooltip,overflowOnly:!1}:this.tooltip;return B.merge({content:this.desc?`${this.title} ${this.desc}`:this.title,overflowOnly:()=>this.$refs.text},d)}},watch:{selected(d){if(this.indeterminate){this.innerSelected=!1;return}this.innerSelected=d},indeterminate(){this.indeterminate&&(this.innerSelected=!1)},disabled:{handler(d){this.innerDisabled=d},immediate:!0}},created(){this.$parent.$options.name==="MenuGroup"&&(this.isGroupItem=!0),this.dispatch("MenuGroup","item-created",this),this.dispatch("Menu","item-created",this)},[M.componentHooks.beforeUnmount](){this.dispatch("MenuGroup","item-removed",this),this.dispatch("Menu","item-removed",this)},methods:{getIconType(){return F.isDefined(this.iconType)?this.iconType:this.type},onClick(d){if(this.innerDisabled)return;A.$emit(this,"click",d);const v=this.type==="item"?!0:!this.innerSelected;this.isGroupItem?this.dispatch("MenuGroup","select",[this,v]):this.dispatch("Menu","select",[this,v])},setSelected(d){if(d===this.innerSelected||this.indeterminate)return;const v=this.innerSelected;this.innerSelected=d,(this.type==="checkbox"||this.type==="select")&&this.dispatch("Menu","change",[this,d,v]),A.$emit(this,"update:selected",d,v),A.$emit(this,"changed",d,v),this.innerSelected&&A.$emit(this,"selected",d,v)},setDisabled(d){this.disabled!==void 0||d===this.innerDisabled||(this.innerDisabled=d)},onMouseEnter(d){this.dispatch("Menu","item-hover",this)},onMouseLeave(d){this.dispatch("Menu","item-hover-out",this)},activate(){this.$el.focus(),this.active=!0},deactivate(){this.active=!1}}}),_=["role","aria-checked","aria-selected","tabindex"],p=["innerHTML"];function f(d,v,b,s,l,w){const I=u.resolveComponent("v-icon"),C=u.resolveDirective("tooltip"),h=u.resolveDirective("syno-id");return u.withDirectives((u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(d.itemCls),role:d.role,"aria-checked":d.ariaChecked,"aria-selected":d.ariaSelected,tabindex:d.activatable?"0":"",onClick:v[0]||(v[0]=u.withModifiers(c=>d.onClick(c),["prevent"])),onKeydown:[v[1]||(v[1]=u.withKeys(u.withModifiers(c=>d.onClick(c),["prevent"]),["enter"])),v[2]||(v[2]=u.withKeys(u.withModifiers(c=>d.onClick(c),["prevent"]),["space"]))],onMouseenter:v[3]||(v[3]=function(){return d.onMouseEnter&&d.onMouseEnter(...arguments)}),onMouseleave:v[4]||(v[4]=function(){return d.onMouseLeave&&d.onMouseLeave(...arguments)})},[u.renderSlot(d.$slots,"default",{},()=>[d.showIcon?(u.openBlock(),u.createBlock(I,u.mergeProps({key:0,class:d.iconCls},d.iconProps),null,16,["class"])):u.createCommentVNode("",!0),u.renderSlot(d.$slots,"title",{},()=>[d.useHtml?(u.openBlock(),u.createElementBlock("span",{key:0,ref:"text",innerHTML:d.title,class:"title"},null,8,p)):(u.openBlock(),u.createElementBlock("span",{key:1,ref:"text",class:"title"},u.toDisplayString(d.title),513))]),d.desc?(u.openBlock(),u.createElementBlock("span",{key:1,ref:"desc",class:"desc"},u.toDisplayString(d.desc),513)):u.createCommentVNode("",!0)])],42,_)),[[C,d.mergedTooltip],[h]])}var y=o.default(S,[["render",f]]);x.default=y}(sP)),sP}var lP={},Mq;function qF(){return Mq||(Mq=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Zo(),k=ln(),F=ht(),B=St();const G=F.defineComponent({name:"MenuGroup",mixins:[M.default],props:{title:{type:String,default:void 0},singleSelect:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},data(){return{items:[]}},computed:{groupCls(){return["v-menu-group",{"v-menu-group-disabled":this.disabled}]}},watch:{disabled(o){this.setDisableAll(o)}},created(){k.$on(this,"item-created",o=>{o.setDisabled(this.disabled),this.items.push(o)}),k.$on(this,"select",(o,S)=>{this.singleSelect?(this.onSingleSelect(o),this.dispatch("Menu","select",[o,!0])):this.dispatch("Menu","select",[o,S])}),this.dispatch("Menu","group-created",this)},methods:{onSingleSelect(o){for(let S of this.items)S!==o?S.setSelected(!1):S.setSelected(!0)},setDisableAll(o){for(let S of this.items)S.setDisabled&&S.setDisabled(o)}}}),E={key:0,class:"v-menu-group-title"};function A(o,S,_,p,f,y){return F.openBlock(),F.createElementBlock("div",{class:F.normalizeClass(o.groupCls)},[F.renderSlot(o.$slots,"title",{},()=>[o.title?(F.openBlock(),F.createElementBlock("div",E,F.toDisplayString(o.title),1)):F.createCommentVNode("",!0)]),F.renderSlot(o.$slots,"default")],2)}var u=B.default(G,[["render",A]]);x.default=u}(lP)),lP}var uP={},Dq;function Jx(){return Dq||(Dq=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=ht(),k=St();const F=M.defineComponent({name:"MenuDivider"}),B={class:"v-menu-item-divider"};function G(A,u,o,S,_,p){const f=M.resolveDirective("syno-id");return M.withDirectives((M.openBlock(),M.createElementBlock("div",B,null,512)),[[f]])}var E=k.default(F,[["render",G]]);x.default=E}(uP)),uP}var hP={},cP={},dP={},mg={},Oq;function Ni(){if(Oq)return mg;Oq=1,Object.defineProperty(mg,"__esModule",{value:!0});var x=sc();function M(G){return x.isVue2?G?.$options?.model?.event??"input":"update:model-value"}function k(G){return"modelValue"}function F(G){return G[k()]}const B={value(G){return"modelValue"}};return mg.componentsProps=B,mg.getModelEventName=M,mg.getModelPropName=k,mg.getModelValue=F,mg}var Nq;function Zx(){return Nq||(Nq=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Kt(),k=ya(),F=Qo(),B=vr(),G=kr(),E=ln(),A=Ni(),u=ht(),o=St();B.register("select-adjust",G.vIconAdjust),B.register("select-dropdown",G.vIconTriangleDown),B.register("select-clear",G.vIconClear);const S=u.defineComponent({name:"SelectInput",directives:{tooltip:k.default},mixins:[B.default],props:{clearIconCls:{type:Array,default:()=>[]},searchIconCls:{type:Array,default:()=>[]},allowClear:{type:Boolean,default:!1},allowEdit:{type:Boolean,default:!1},[A.componentsProps.value()]:{type:String,default:""},inputTooltip:{type:Object,default:()=>({disabled:!0})},clearable:{type:Boolean,default:!1},hideTrigger:{type:Boolean,default:void 0},placeholder:{type:String,default:""},inputAttrs:{type:Object,default:()=>{}},openDropdown:{type:Function,default:M.noop},toggleDropdown:{type:Function,default:M.noop},closeDropdown:{type:Function,default:M.noop},advanced:{type:Boolean,default:!1},rightAdvanceIcon:{type:Boolean,default:!1},displayField:{type:String,default:"label"},valueField:{type:String,default:"value"},triggerQueryAction:{type:String,default:"all"},autoOpenDropdownCharCount:{type:Number,default:-1},toggleDropdownOnClick:{type:Boolean,default:!0},mode:{type:String,default:"normal"},selectedOption:{type:Object,default:()=>({})},displayTextFormat:{type:Object,default(){return{key:void 0,group:"{group}:{option}",option:"{option}",delimiter:","}}},displayMode:{type:String,default:"none",validator(s){return["text","none","html"].includes(s)}},groupOptions:{type:Object,default:()=>({})},enterKeyHint:{type:String,default:void 0},disabled:{type:Boolean,default:!1}},emits:["click-icon","click-advanced-icon","keydown","focus","blur","clear","update:model-value","arrow-up","arrow-down","key-enter","key-esc"],data(){return{focused:!1}},computed:{textDisplayCls(){return["v-select2-text-display","v-select2-input",{placeholder:this.showPlaceholder}]},showPlaceholder(){return!this.display},display(){let{group:s,option:l,key:w}=this.displayTextFormat;const I=this.selectedOption;if(!I)return"";M.isDefined(w)||(w=this.displayField);let C="";return I.inGroup?(C=s.replace("{group}",this.groupOptions[I.inGroup][w]||""),C=C.replace("{option}",I[w]||"")):C=l.replace("{option}",I[w]||""),C},isTextDisplayMode(){return this.displayMode==="text"},isHtmlDisplayMode(){return this.displayMode==="html"},isLabelDisplayMode(){return this.displayMode==="label"},isNoneDisplayMode(){return this.displayMode==="none"},innerVal(){return A.getModelValue(this)}},methods:{canOpenDropdown(s){return!(this.autoOpenDropdownCharCount!==-1&&this.autoOpenDropdownCharCount>this.getInputEl().value.length)},getInputEl(){return this.$refs.input},onInput(s){this.canOpenDropdown()?this.openDropdown("keyword"):this.closeDropdown(),E.$emit(this,A.getModelEventName(this),s.target.value)},onKeyDown(s){this.advanced||(F.isEnter(s)?(E.$emit(this,"key-enter"),s.preventDefault()):F.isEsc(s)?(E.$emit(this,"key-esc"),this.closeDropdown()):F.isUpArrow(s)?(E.$emit(this,"arrow-up"),s.preventDefault()):F.isDownArrow(s)&&(E.$emit(this,"arrow-down"),s.preventDefault()),E.$emit(this,"keydown",s))},onClick(){this.toggleDropdownOnClick&&this.toggleDropdown(this.triggerQueryAction)},focus(){this.$refs.input.focus()},selectInput(){this.$refs.input&&this.$refs.input.select&&this.$refs.input.select()},onFocus(s){this.focused=!0,E.$emit(this,"focus",s)},onBlur(s){this.focused=!1,E.$emit(this,"blur",s)},onClear(s){E.$emit(this,"clear"),this.focus(),s.preventDefault()}}}),_={class:"input-wrapper"},p={class:"v-select-ul-wrap"},f=["data-placeholder"],y=["innerHTML"],d=["value","enterkeyhint","placeholder"];function v(s,l,w,I,C,h){const c=u.resolveComponent("v-icon"),m=u.resolveDirective("tooltip");return u.openBlock(),u.createElementBlock("div",_,[u.createElementVNode("div",{ref:"icon",class:"v-select2-icon",onClick:l[0]||(l[0]=u.withModifiers(T=>s.$emit("click-icon"),["stop"]))},[u.renderSlot(s.$slots,"icon")],512),u.createElementVNode("ul",p,[s.isTextDisplayMode||s.isHtmlDisplayMode?u.withDirectives((u.openBlock(),u.createElementBlock("div",{key:0,ref:"input",class:u.normalizeClass([s.textDisplayCls,"v-select2-text-display v-select2-input"]),"data-placeholder":s.placeholder,tabindex:"-1",onFocus:l[1]||(l[1]=function(){return s.onFocus&&s.onFocus(...arguments)}),onBlur:l[2]||(l[2]=function(){return s.onBlur&&s.onBlur(...arguments)}),onKeydown:l[3]||(l[3]=u.withModifiers(function(){return s.onKeyDown&&s.onKeyDown(...arguments)},["stop"]))},[s.isHtmlDisplayMode?(u.openBlock(),u.createElementBlock("div",{key:0,innerHTML:s.showPlaceholder?s.placeholder:s.display},null,8,y)):s.isTextDisplayMode?(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[u.createTextVNode(u.toDisplayString(s.showPlaceholder?s.placeholder:s.display),1)],64)):u.createCommentVNode("",!0)],42,f)),[[m,{overflowOnly:!0,content:s.display}]]):s.isNoneDisplayMode?u.withDirectives((u.openBlock(),u.createElementBlock("input",u.mergeProps({key:1,ref:"input"},s.inputAttrs,{value:s.innerVal,enterkeyhint:s.enterKeyHint,class:"v-select2-input",onInput:l[4]||(l[4]=function(){return s.onInput&&s.onInput(...arguments)}),onFocus:l[5]||(l[5]=function(){return s.onFocus&&s.onFocus(...arguments)}),onBlur:l[6]||(l[6]=function(){return s.onBlur&&s.onBlur(...arguments)}),onKeydown:l[7]||(l[7]=u.withModifiers(function(){return s.onKeyDown&&s.onKeyDown(...arguments)},["stop"])),onClick:l[8]||(l[8]=u.withModifiers(function(){return s.onClick&&s.onClick(...arguments)},["stop"])),placeholder:s.placeholder}),null,16,d)),[[m,s.inputTooltip]]):u.createCommentVNode("",!0)]),u.renderSlot(s.$slots,"clear-icon",{},()=>[s.allowClear&&s.focused?(u.openBlock(),u.createBlock(c,{key:0,name:"select-clear",class:u.normalizeClass(s.clearIconCls),onMousedown:u.withModifiers(s.onClear,["stop"]),"svg-icon-set":"set25"},null,8,["class","onMousedown"])):u.createCommentVNode("",!0)]),s.rightAdvanceIcon?(u.openBlock(),u.createBlock(c,{key:0,name:"select-adjust",class:u.normalizeClass(s.searchIconCls),onClick:l[9]||(l[9]=T=>s.$emit("click-advanced-icon")),"svg-icon-set":"set13",disabled:s.disabled},null,8,["class","disabled"])):u.createCommentVNode("",!0),s.hideTrigger?u.createCommentVNode("",!0):u.renderSlot(s.$slots,"dropdown-icon",{key:1},()=>[u.createVNode(c,{name:"select-dropdown",class:"v-select2-dropdown-icon","svg-icon-set":"set12"})]),u.renderSlot(s.$slots,"right")])}var b=o.default(S,[["render",v]]);x.default=b}(dP)),dP}var fP={},gP={},Pq;function sh(){return Pq||(Pq=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=ya(),k=ls(),F=Kt(),B=ln(),G=ht(),E=St();const A=G.defineComponent({name:"SelectBaseOption",components:{vIcon:k.default},directives:{tooltip:M.default},props:{id:{type:String,default:void 0},option:{type:Object,default:()=>({})},display:{type:String,default:void 0},value:{type:[Number,String,Boolean],default:void 0},selectable:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},activated:{type:Boolean,default:!1},customClass:{type:[Array,Object,String],default:void 0},isSelected:{type:Boolean,default:void 0},tooltip:{type:[Boolean,Object],default:!1},active:{type:Function,default:F.noop},hover:{type:Function,default:F.noop},hoverOut:{type:Function,default:F.noop},toggle:{type:Function,default:F.noop},synoId:{type:String,default:""},useSynoId:{type:Boolean,default:!0}},emits:["click","active","hover","mouseenter","hover-out","mouseleave"],computed:{innerCls(){return["v-select2-dropdown-menu-item",this.customClass?this.customClass:"",{unselectable:this.selectable===!1,disabled:this.disabled,activated:this.activated,"is-selected":this.isSelected,"has-icon":!!this.option.icon}]},mergedTooltip(){if(this.tooltip===!1)return!1;const p=Object.assign({},this.tooltip);return p.overflowOnly===!0&&(p.overflowOnly=()=>this.$refs.text),p},innerIcon(){return F.isObject(this.option.icon)?this.option.icon:{name:this.option.icon}}},methods:{onClick(p){this.active(),B.$emit(this,"active",p),B.$emit(this,"click",p)},onHover(p){this.hover(),B.$emit(this,"hover",p),B.$emit(this,"mouseenter",p)},onHoverOut(p){this.hoverOut(),B.$emit(this,"hover-out",p),B.$emit(this,"mouseleave",p)}}}),u=["id","syno-id","aria-selected"],o={key:1,class:"item-desc"};function S(p,f,y,d,v,b){const s=G.resolveComponent("v-portal"),l=G.resolveComponent("v-icon"),w=G.resolveDirective("tooltip");return G.withDirectives((G.openBlock(),G.createElementBlock("li",{id:p.id,"syno-id":`${p.synoId}-option-${p.value}`,style:{"user-select":"none"},class:G.normalizeClass(p.innerCls),role:"option","aria-selected":p.activated,onClick:f[0]||(f[0]=function(){return p.onClick&&p.onClick(...arguments)}),onMouseenter:f[1]||(f[1]=function(){return p.onHover&&p.onHover(...arguments)}),onMouseleave:f[2]||(f[2]=function(){return p.onHoverOut&&p.onHoverOut(...arguments)})},[p.mergedTooltip.usePortal?(G.openBlock(),G.createBlock(s,{key:0,name:p.mergedTooltip.portalName,to:p.mergedTooltip.portalName},{default:G.withCtx(()=>[G.renderSlot(p.$slots,"tooltip-portal",{option:p.option})]),_:3},8,["name","to"])):G.createCommentVNode("",!0),G.renderSlot(p.$slots,"inner-option",{option:p.option},()=>[p.option.icon?(G.openBlock(),G.createBlock(l,G.mergeProps({key:0,class:"item-icon"},p.innerIcon),null,16)):G.createCommentVNode("",!0),G.createElementVNode("span",{ref:"text",class:"option-text"},G.toDisplayString(p.display),513),p.option.desc?(G.openBlock(),G.createElementBlock("span",o,G.toDisplayString(p.option.desc),1)):G.createCommentVNode("",!0)])],42,u)),[[w,p.mergedTooltip]])}var _=E.default(A,[["render",S]]);x.default=_}(gP)),gP}var pP={},Bq;function YF(){return Bq||(Bq=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=ya(),k=sh(),F=kr(),B=vr(),G=Kt(),E=_i(),A=ht(),u=St();B.register("select-option-tick",F.vIconTick),B.register("select-option-untick",G.voidElement);const o=A.defineComponent({name:"SelectTickOption",directives:{tooltip:M.default},extends:k.default,mixins:[B.default],computed:{innerTickIcon(){return E.merge({name:this.isSelected?"select-option-tick":"select-option-untick",svgIconSet:"set03"},this.option?.tickIcon??{})},innerCls(){return["v-select2-dropdown-menu-item tick",this.customClass?this.customClass:"",{unselectable:this.selectable===!1,disabled:this.disabled,activated:this.activated,"is-selected":this.isSelected}]}}}),S=["id","syno-id","aria-selected"];function _(f,y,d,v,b,s){const l=A.resolveComponent("v-portal"),w=A.resolveComponent("v-icon"),I=A.resolveDirective("tooltip");return A.withDirectives((A.openBlock(),A.createElementBlock("li",{id:f.id,"syno-id":`${f.synoId}-option-${f.value}`,style:{"user-select":"none"},class:A.normalizeClass(f.innerCls),unselectable:"unselectable",role:"option","aria-selected":f.activated,onClick:y[0]||(y[0]=function(){return f.onClick&&f.onClick(...arguments)}),onMouseenter:y[1]||(y[1]=function(){return f.onHover&&f.onHover(...arguments)}),onMouseleave:y[2]||(y[2]=function(){return f.onHoverOut&&f.onHoverOut(...arguments)})},[f.mergedTooltip.usePortal?(A.openBlock(),A.createBlock(l,{key:0,name:f.mergedTooltip.portalName,to:f.mergedTooltip.portalName},{default:A.withCtx(()=>[A.renderSlot(f.$slots,"tooltip-portal",{option:f.option})]),_:3},8,["name","to"])):A.createCommentVNode("",!0),A.renderSlot(f.$slots,"inner-option",{option:f.option},()=>[A.createVNode(w,A.normalizeProps(A.guardReactiveProps(f.innerTickIcon)),null,16),f.option.icon?(A.openBlock(),A.createBlock(w,A.mergeProps({key:0,class:"item-icon"},f.innerIcon),null,16)):A.createCommentVNode("",!0),A.createElementVNode("span",{ref:"text",class:"option-text"},A.toDisplayString(f.display),513)])],42,S)),[[I,f.mergedTooltip]])}var p=u.default(o,[["render",_]]);x.default=p}(pP)),pP}var mP={},Lq;function KF(){return Lq||(Lq=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=ya(),k=sh(),F=ln(),B=ht(),G=St();const E=B.defineComponent({name:"SelectCheckOption",directives:{tooltip:M.default},extends:k.default,emits:["toggle"],computed:{innerCls(){return["v-select2-dropdown-menu-item check",this.customClass?this.customClass:"",{unselectable:this.selectable===!1,disabled:this.disabled,activated:this.activated,"is-selected":this.isSelected}]}},methods:{onToggle(S){this.toggle(),F.$emit(this,"toggle",S)}}}),A=["id","syno-id","aria-selected"];function u(S,_,p,f,y,d){const v=B.resolveComponent("v-portal"),b=B.resolveComponent("v-icon"),s=B.resolveDirective("tooltip");return B.withDirectives((B.openBlock(),B.createElementBlock("li",{id:S.id,"syno-id":`${S.synoId}-option-${S.value}`,style:{"user-select":"none"},class:B.normalizeClass(S.innerCls),unselectable:"unselectable",role:"option","aria-selected":S.activated,onClick:_[0]||(_[0]=function(){return S.onToggle&&S.onToggle(...arguments)}),onMouseenter:_[1]||(_[1]=function(){return S.onHover&&S.onHover(...arguments)}),onMouseleave:_[2]||(_[2]=function(){return S.onHoverOut&&S.onHoverOut(...arguments)})},[S.mergedTooltip.usePortal?(B.openBlock(),B.createBlock(v,{key:0,name:S.mergedTooltip.portalName,to:S.mergedTooltip.portalName},{default:B.withCtx(()=>[B.renderSlot(S.$slots,"tooltip-portal",{option:S.option})]),_:3},8,["name","to"])):B.createCommentVNode("",!0),B.renderSlot(S.$slots,"inner-option",{option:S.option},()=>[B.createVNode(b,{name:"checkbox-icon",sprite:""}),S.option.icon?(B.openBlock(),B.createBlock(b,B.mergeProps({key:0,class:"item-icon"},S.innerIcon),null,16)):B.createCommentVNode("",!0),B.createElementVNode("span",{ref:"text",class:"option-text"},B.toDisplayString(S.display),513)])],42,A)),[[s,S.mergedTooltip]])}var o=G.default(E,[["render",u]]);x.default=o}(mP)),mP}var vP={},Fq;function Qx(){return Fq||(Fq=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=sh(),k=ht(),F=St();const B=k.defineComponent({name:"SelectDividerOption",extends:M.default,methods:{}}),G={class:"v-select2-dropdown-divider"};function E(u,o,S,_,p,f){return k.openBlock(),k.createElementBlock("div",G)}var A=F.default(B,[["render",E]]);x.default=A}(vP)),vP}var yP={},Vq;function XF(){return Vq||(Vq=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=sh(),k=ht(),F=St();const B=k.defineComponent({name:"SelectNoMatchOption",extends:M.default,data(){return{}},computed:{innerCls(){return["v-select2-dropdown-menu-item","not-found"]},mergedTooltip(){return{content:this.display,overflowOnly:!0}}},methods:{}});function G(A,u,o,S,_,p){const f=k.resolveDirective("tooltip");return k.withDirectives((k.openBlock(),k.createElementBlock("li",{class:k.normalizeClass(A.innerCls)},[k.createTextVNode(k.toDisplayString(A.display),1)],2)),[[f,A.mergedTooltip]])}var E=F.default(B,[["render",G]]);x.default=E}(yP)),yP}var wP={},Hq;function JF(){return Hq||(Hq=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=sh(),k=ht(),F=St();const B=k.defineComponent({name:"SelectGroupOption",extends:M.default,computed:{innerCls(){return["v-select2-dropdown-menu-item-group-label",{unselectable:this.selectable===!1,[this.customClass]:!!this.customClass}]}},methods:{}}),G=["syno-id"];function E(u,o,S,_,p,f){return k.openBlock(),k.createElementBlock("li",{class:k.normalizeClass(u.innerCls),"syno-id":`${u.synoId}-option-${u.value}`},k.toDisplayString(u.display),11,G)}var A=F.default(B,[["render",E]]);x.default=A}(wP)),wP}var bP={},$q;function ZF(){return $q||($q=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Xn(),k=ln(),F=wa(),B=Gx(),G=Yl(),E=Kt(),A=Dr(),u=ht(),o=St();const S=u.defineComponent({name:"VirtualScrollbar",extends:F.default,props:{itemSize:{type:Number,default:void 0},total:{type:Number,default:0},updateBufferItemsNum:{type:Number,default:5},bufferItemsNum:{type:Number,default:10},bufferSize:{type:Number,default:200}},emits:["visible"],data:()=>({bufferStart:0,bufferEnd:0,virtualTotalSize:0,visibleStart:0,visibleEnd:0}),computed:{offsetHeight(){return this.visibleStart*+this.itemSize},offsetStyle(){return{transform:`translateY(${this.offsetHeight}px)`,position:"static"}},ghostStyle(){return{height:this.virtualTotalSize+"px",top:0,left:0,width:"1px",position:"absolute"}}},watch:{total(){this.$nextTick(()=>{this.updateVisible(),this.updateScroll()})},bufferItemsNum(){this.$nextTick(()=>{this.updateVisible(),this.updateScroll()})},itemSize(){this.$nextTick(()=>{this.updateVisible(),this.updateScroll()})}},created(){this.$_scrollTop=void 0},mounted(){this.$nextTick(()=>{B.addIntersectionListener(this.$el,this.onVisibleChanged),G.addResizeListener(this.$refs.view,this.onScrollViewportChanged)})},[M.componentHooks.beforeUnmount](){B.removeIntersectionListener(this.$el,this.onVisibleChanged),G.removeResizeListener(this.$refs.view,this.onScrollViewportChanged)},methods:{onScrollViewportChanged(y){this.$_scrollViewportHeight=y.contentRect.height},onVisibleChanged(y){(y.isVisible||y.boundingClientRect.width!==0||y.boundingClientRect.height!==0)&&(this.handleVirtualScroll({checkScrollSticky:!1}),k.$emit(this,"visible"),this.$nextTick(()=>{this.updateScroll()}))},getBuffer(y){let d=y;d<0&&(d=0);const v=d+this.$_scrollViewportHeight;return{bufferStart:d,bufferEnd:v}},findAnchor(y,d){let v=0,b=0,s=0;return v=Math.max(Math.min(~~(y/+this.itemSize),this.total),0),b=Math.max(Math.min(~~(d/+this.itemSize),this.total),0),s=this.total*+this.itemSize,v=E.clampValue(v-this.bufferItemsNum,0,this.total-1),b=E.clampValue(b+this.bufferItemsNum,0,this.total-1),{start:v,end:b,total:s}},getVisibleItems(y,d){return this.bufferStart=y,this.bufferEnd=d,this.findAnchor(this.bufferStart,this.bufferEnd)},isScrollSticky(y,d,v){let b=(this.visibleStart+this.updateBufferItemsNum)*+this.itemSize,s=(this.visibleEnd-this.updateBufferItemsNum)*+this.itemSize;return y>this.$_scrollTop&&v>=s||y<this.$_scrollTop&&d<=b},handleVirtualScroll(){let{checkScrollSticky:y=!0}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const d=this.$refs.view.scrollTop,{bufferStart:v,bufferEnd:b}=this.getBuffer(d);if(!y||this.isScrollSticky(d,v,b)){const{start:s,end:l,total:w}=this.getVisibleItems(v,b);this.renderVisibleItems(s,l,w)}this.$_scrollTop=d},updateVisible(){this.handleVirtualScroll({checkScrollSticky:!1})},renderVisibleItems(y,d,v){this.visibleStart=y,this.visibleEnd=d,this.virtualTotalSize=v},handleScroll(y){y.type==="scroll"&&this.handleVirtualScroll(),F.default.methods.handleScroll.apply(this,arguments)},scrollToIndex(y){const d=this.itemSize*y;this.$refs.view.scrollTop=d,this.handleVirtualScroll()},ensureVisible(y){let d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;A.scrollTo(y,{scrollMode:"if-needed",behavior:d?"smooth":"auto"})}}}),_={class:"v-scrollbar-inner",ref:"inner"};function p(y,d,v,b,s,l){return u.openBlock(),u.createElementBlock("div",{ref:"scrollbar",class:u.normalizeClass(y.wrapperCls)},[(u.openBlock(),u.createBlock(u.resolveDynamicComponent(y.viewTag),{ref:"view",class:u.normalizeClass(["v-scrollbar-view",y.viewClass]),style:u.normalizeStyle(y.viewStyle),onScrollPassive:y.handleScroll},{default:u.withCtx(()=>[u.createElementVNode("div",_,[u.createElementVNode("div",{class:"v-scrollbar-virtual-wrapper",style:u.normalizeStyle(y.offsetStyle)},[u.renderSlot(y.$slots,"default",{start:y.visibleStart,end:y.visibleEnd})],4),u.createElementVNode("div",{style:u.normalizeStyle(y.ghostStyle)},null,4)],512)]),_:3},40,["class","style","onScrollPassive"])),y.yRailExists?(u.openBlock(),u.createElementBlock("div",{key:0,ref:"y-rail",class:"y-rail rail",onTouchstart:d[2]||(d[2]=w=>y.onRailPointerDown(w,"y")),onMousedown:d[3]||(d[3]=w=>y.onRailPointerDown(w,"y")),style:u.normalizeStyle(y.yRailStyle)},[u.createElementVNode("div",{class:"y-bar bar",ref:"y-bar",style:u.normalizeStyle(y.yBarStyle),onTouchstart:d[0]||(d[0]=u.withModifiers(w=>y.onBarPointerDown(w,"y"),["stop"])),onMousedown:d[1]||(d[1]=u.withModifiers(w=>y.onBarPointerDown(w,"y"),["stop"]))},null,36)],36)):u.createCommentVNode("",!0),y.xRailExists?(u.openBlock(),u.createElementBlock("div",{key:1,ref:"x-rail",class:"x-rail rail",onTouchstart:d[6]||(d[6]=w=>y.onRailPointerDown(w,"x")),onMousedown:d[7]||(d[7]=w=>y.onRailPointerDown(w,"x")),style:u.normalizeStyle(y.xRailStyle)},[u.createElementVNode("div",{class:"x-bar bar",ref:"x-bar",style:u.normalizeStyle(y.xBarStyle),onTouchstart:d[4]||(d[4]=u.withModifiers(w=>y.onBarPointerDown(w,"x"),["stop"])),onMousedown:d[5]||(d[5]=u.withModifiers(w=>y.onBarPointerDown(w,"x"),["stop"]))},null,36)],36)):u.createCommentVNode("",!0)],2)}var f=o.default(S,[["render",p]]);x.default=f}(bP)),bP}var CP={},zq;function df(){return zq||(zq=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=ht(),k=St();const F=M.defineComponent({name:"SpinIcon"}),B={class:"v-spin-icon"},E=[M.createElementVNode("i",null,[M.createElementVNode("i")],-1)];function A(o,S,_,p,f,y){return M.openBlock(),M.createElementBlock("div",B,E)}var u=k.default(F,[["render",A]]);x.default=u}(CP)),CP}var _P={},Wq;function QF(){return Wq||(Wq=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});let M=0;var k={beforeCreate(){this.uuid=M.toString(),M++}};x.default=k}(_P)),_P}var fS={},Uq;function eT(){if(Uq)return fS;Uq=1,Object.defineProperty(fS,"__esModule",{value:!0});const x={TICK:"tick",CHECK:"check",BASE:"base"};return fS.OPTION_TYPE=x,fS}var Gq;function twe(){return Gq||(Gq=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=sh(),k=YF(),F=KF(),B=Qx(),G=XF(),E=JF(),A=Kt(),u=wa(),o=ZF(),S=df(),_=QF(),p=ln(),f=Si(),y=ci(),d=eT(),v=Ur(),b=ht(),s=St();const l=16,w=b.defineComponent({name:"SelectDropdown",components:{vBaseOption:M.default,vDividerOption:B.default,SpinIcon:S.default,vGroupOption:E.default,vNoMatchOption:G.default},mixins:[_.default,y.default],props:{virtualScrollbar:{type:Boolean,default:!1},virtualItemHeight:{type:Number,default:28},virtualBufferSize:{type:Number,default:200},options:{type:Array,default:()=>[]},advanced:{type:Boolean,default:!1},dropdownCls:{type:Array,default:()=>[]},loading:{type:Boolean,default:!1},maxHeight:{type:[Number,String],default:184},notFoundText:{type:String,default:void 0},value:{type:[Array,Number,String,Boolean],default:""},displayField:{type:String,default:"label"},valueField:{type:String,default:"value"},getOptionTooltip:{type:Function,required:!0},loadingText:{type:String,default:void 0},useOptionSlot:{type:[Boolean,String],default:void 0},showNotFound:{type:Boolean,default:!0},defaultOption:{type:[Function,String],default:d.OPTION_TYPE.BASE}},emits:["blur","hover-index","select","toggle","shown"],data(){let m=0;return A.isArray(this.value)||(m=this.findActiveIndexByValue(this.value),m===-1&&(m=0)),{activeIndex:m,visible:!1}},computed:{innerNotFoundText(){return this.notFoundText??this._i18n("search","no_search_result")},scrollbar(){return this.virtualScrollbar?o.default:u.default},optionsNum(){return this.showNotFound&&(!this.options||this.options.length===0)||this.loading?1:this.options.length},dropdownMenuWrapperStyle(){return this.virtualScrollbar?{visibility:this.visible?"visible":"hidden"}:{}},hasTopActionsSlot(){return f.hasSlot(this,"top-actions")},hasBottomActionsSlot(){return f.hasSlot(this,"bottom-actions")},listStyles(){return{maxHeight:A.isNumber(this.maxHeight)?`${this.maxHeight-l}px`:this.maxHeight}}},watch:{options(){this.virtualScrollbar&&this.$nextTick(()=>this.resetScroll()),this.moveActiveIndex("none")===!1&&this.moveActiveIndex("none",0)},loading(){this.virtualScrollbar&&this.$nextTick(()=>this.$refs.scrollbar.updateVisible())},activeIndex:{handler(m){this.$nextTick(()=>{p.$emit(this,"hover-index",m)})},immediate:!0}},mounted(){p.$on(this,"shown",this.onShown)},methods:{onShown(){this.virtualScrollbar||(this.$refs?.scrollbar?.ensureVisible(this.$el),this.moveActiveIndex("none"))},onScrollbarVisible(){p.$emit(this,"scrollbar-visible"),this.$nextTick(()=>{this.visible=!0,this.moveActiveIndex("none")})},getVisibleOptions(m,T){let D=this.options.map((O,N)=>({index:N,option:O}));return this.virtualScrollbar&&(D=D.slice(m,T+1)),D},closeDropdown(){p.$emit(this,"close-dropdown")},clearSelection(){this.activeIndex=-1},useComponent(m){if(A.isDefined(m.useComponent))return A.isFunction(m.useComponent)?m.useComponent():m.useComponent;if(A.isString(this.defaultOption)){if(this.defaultOption===d.OPTION_TYPE.BASE)return M.default;if(this.defaultOption===d.OPTION_TYPE.TICK)return k.default;if(this.defaultOption===d.OPTION_TYPE.CHECK)return F.default}return this.defaultOption?.()},getSlot(m){return m.useSlot||this.useOptionSlot},useSlot(m){return A.isDefined(m.useSlot)?!!m.useSlot:!!this.useOptionSlot},getOptionClass(m){return m.child&&v.deprecate("option.child","option.indent",this),{[m.class]:!!m.class,indent:m.child||m.indent}},isOptionSelectable(m){const T=this.options[m];return!T||T==="-"||T.type==="group-label"?!1:A.isDefined(T.selectable)?T.selectable:!0},isOptionSelected(m){return Array.isArray(this.value)?this.value.includes(m[this.valueField]):m[this.valueField]===this.value},findActiveIndexByValue(m){return this.options.findIndex(T=>T[this.valueField]===m)},setActiveIndex(m){let{ensureVisible:T=!0}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m<0||m>=this.options.length||(this.activeIndex=m,T&&this.$nextTick(()=>this.ensureActiveIndexVisible()))},moveActiveIndex(m){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.activeIndex;if(m==="up"){for(let D=T-1;D>=0;D--)if(this.isOptionSelectable(D))return this.setActiveIndex(D)}else if(m==="down"){for(let D=T+1,O=this.options.length;D<O;D++)if(this.isOptionSelectable(D))return this.setActiveIndex(D)}else{for(let D=T,O=this.options.length;D<O;D++)if(this.isOptionSelectable(D))return this.setActiveIndex(D);this.clearSelection()}return!1},async ensureActiveIndexVisible(){const m=this.activeIndex,T=this.options[m];this.virtualScrollbar&&(this.$refs.scrollbar.scrollToIndex(m),await this.$nextTick());const D=this.$refs.dropdownMenu?.querySelector("#"+this.getOptionId(T));D&&this.$refs.scrollbar&&this.$refs.scrollbar.ensureVisible(D)},setActiveIndexByValue(m){this.activeIndex=this.options.findIndex(T=>T[this.valueField]===m)},getActiveIndex(){return this.activeIndex<0||this.options.length<=this.activeIndex?-1:this.activeIndex},getActiveOptionAria(){const m=this.getActiveOption();return m?this.getOptionId(m):""},getActiveOption(){return this.activeIndex<0||this.options.length<=this.activeIndex?null:this.options[this.activeIndex]},onHoverOption(m){this.activeIndex=m},onClickOption(m,T){if(T===-1){this.clearSelection();return}m.selectable!==!1&&p.$emit(this,"select",T,m)},onToggleOption(m,T){if(T===-1){this.clearSelection();return}m.selectable!==!1&&p.$emit(this,"toggle",T,m)},focus(){this.$refs.dropdown.focus()},resetScroll(){this.$refs.scrollbar&&(this.$refs.scrollbar.resetScrollTop(),this.$refs.scrollbar.update())},getOptionId(m){return A.slugify(`option-${m[this.valueField]}-${this.uuid}`)}}}),I=["syno-id"],C={key:0,class:"v-select2-dropdown-loading-text",role:"menuitem","aria-selected":"false"};function h(m,T,D,O,N,z){const H=b.resolveComponent("spin-icon"),$=b.resolveComponent("v-no-match-option"),V=b.resolveComponent("v-divider-option"),P=b.resolveComponent("v-group-option");return b.openBlock(),b.createElementBlock("div",{ref:"dropdown",tabindex:-1,class:"v-select2-dropdown-menu-wrapper",style:b.normalizeStyle(m.dropdownMenuWrapperStyle),onBlur:T[2]||(T[2]=U=>m.$emit("blur",U))},[b.renderSlot(m.$slots,"dropdown",{options:m.options},()=>[b.createElementVNode("div",{"syno-id":`${m.synoId}-dropdown-menu`,class:b.normalizeClass(m.dropdownCls)},[m.hasTopActionsSlot?(b.openBlock(),b.createElementBlock("div",{key:0,onMouseenter:T[0]||(T[0]=U=>m.clearSelection())},[b.renderSlot(m.$slots,"top-actions")],32)):b.createCommentVNode("",!0),(b.openBlock(),b.createBlock(b.resolveDynamicComponent(m.scrollbar),{onVisible:m.onScrollbarVisible,ref:"scrollbar",virtual:m.virtualScrollbar,"item-size":m.virtualItemHeight,total:m.optionsNum,"buffer-size":m.virtualBufferSize},{default:b.withCtx(U=>{let{start:Y,end:Z}=U;return[b.createElementVNode("ul",{ref:"dropdownMenu",class:"v-select2-dropdown-menu",role:"listbox",style:b.normalizeStyle(m.listStyles)},[b.renderSlot(m.$slots,"before-options"),m.loading?(b.openBlock(),b.createElementBlock("li",C,[b.createVNode(H),b.createTextVNode(" "+b.toDisplayString(m.loadingText),1)])):(b.openBlock(),b.createElementBlock(b.Fragment,{key:1},[m.showNotFound&&(!m.options||m.options.length===0)?b.renderSlot(m.$slots,"notfound-item",{key:0},()=>[(b.openBlock(),b.createBlock($,{key:"option-no-match",display:m.innerNotFoundText},null,8,["display"]))]):b.createCommentVNode("",!0),(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(m.getVisibleOptions(Y,Z),X=>{let{option:J,index:q}=X;return b.openBlock(),b.createElementBlock(b.Fragment,null,[m.useSlot(J)?b.renderSlot(m.$slots,m.getSlot(J),{key:0,option:J,id:m.getOptionId(J),synoId:`${m.synoId}-option-${J[m.valueField]}`,display:J[m.displayField],value:J[m.valueField],disabled:J.disabled,activated:q===m.activeIndex,customClass:m.getOptionClass(J),isSelected:m.isOptionSelected(J),selectable:m.isOptionSelectable(q),tooltip:m.getOptionTooltip(J),active:()=>m.onClickOption(J,q),toggle:()=>m.onToggleOption(J,q),hover:()=>m.onHoverOption(q)}):J==="-"?(b.openBlock(),b.createBlock(V,{key:`option-divider-${q}`})):J.type==="group-label"?(b.openBlock(),b.createBlock(P,{display:J[m.displayField],key:J[m.displayField]},null,8,["display"])):(b.openBlock(),b.createBlock(b.resolveDynamicComponent(m.useComponent(J)),{ref_for:!0,ref:`option-${q}`,option:J,key:J[m.valueField],"syno-id":m.synoId,id:m.getOptionId(J),value:J[m.valueField],display:J[m.displayField],disabled:J.disabled,activated:q===m.activeIndex,"custom-class":m.getOptionClass(J),selectable:m.isOptionSelectable(q),"is-selected":m.isOptionSelected(J),tooltip:m.getOptionTooltip(J),active:()=>m.onClickOption(J,q),toggle:()=>m.onToggleOption(J,q),hover:()=>m.onHoverOption(q)},{"tooltip-portal":b.withCtx(te=>{let{option:re}=te;return[b.renderSlot(m.$slots,"tooltip-portal",{option:re})]}),"inner-option":b.withCtx(te=>{let{option:re}=te;return[b.renderSlot(m.$slots,"inner-option",{option:re})]}),_:2},1032,["option","syno-id","id","value","display","disabled","activated","custom-class","selectable","is-selected","tooltip","active","toggle","hover"]))],64)}),256))],64)),b.renderSlot(m.$slots,"after-options")],4)]}),_:3},40,["onVisible","virtual","item-size","total","buffer-size"])),m.hasBottomActionsSlot?(b.openBlock(),b.createElementBlock("div",{key:1,onMouseenter:T[1]||(T[1]=U=>m.clearSelection())},[b.renderSlot(m.$slots,"bottom-actions")],32)):b.createCommentVNode("",!0)],10,I)])],36)}var c=s.default(w,[["render",h]]);x.default=c}(fP)),fP}var gS={},jq;function lh(){if(jq)return gS;jq=1,Object.defineProperty(gS,"__esModule",{value:!0});function x(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(M){let k=Math.random()*16|0;return(M=="x"?k:k&3|8).toString(16)})}return gS.uuid=x,gS}var qq;function tT(){return qq||(qq=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Xn(),k=Kt(),F=Si(),B=ci(),G=Tl(),E=xl(),A=ya(),u=Ru(),o=Zx(),S=twe(),_=_i(),p=Yl(),f=jF(),y=vr(),d=fr(),v=kr(),b=Ni(),s=ln(),l=lh(),w=eT(),I=ht();y.register("select-search",v.vIconSearch),y.register("select-filter",v.vIconFilter);const C={MENU:"menu",PANEL:"panel"};var c=I.defineComponent({name:"BaseSelect",directives:{clickoutside:u.default,tooltip:A.default},components:{vSelectInput:o.default,vSelectDropdown:S.default},mixins:[B.default,G.default,E.default,y.default,d.provide("trigger-action",[{expose:"closeDropdown",internal:"closeAdvancedPanel"}])],props:{[b.componentsProps.value()]:{type:[Array,Number,String,Boolean],default:void 0},width:{type:[Number,String],default:250},maxHeight:{type:[Number,String],default:200},dropdownWidth:{type:[String,Number],default:void 0},dropdownOffset:{type:Array,default:()=>[0,1]},customDropdownCls:{type:String,default:""},disabled:{type:Boolean,default:!1},filter:{type:Function,default:void 0},search:{type:Function,default:void 0},align:{type:String,default:"tl->bl"},minSearchChar:{type:[Number,String],default:1},loadingText:{type:String,default:void 0},notFoundText:{type:String,default:void 0},tooltip:{type:Boolean,default:!1},mapOptionToTooltip:{type:Function,default:null},shouldMenuClose:{type:Function,default:()=>!0},options:{type:[Object,Array],default:()=>[]},groupOptions:{type:Object,default:()=>{}},clearable:{type:Boolean,default:!1},editable:{type:Boolean,default:void 0},hideTrigger:{type:Boolean,default:void 0},position:{type:String,default:"absolute"},displayField:{type:String,default:"label"},valueField:{type:String,default:"value"},closeOnSelect:{type:Boolean,default:!0},placeholder:{type:String,default:""},nullValue:{type:[String,Array],default:null},inputScrollable:{type:Boolean,default:!1},inputTooltip:{type:Object,default:()=>({disabled:!0})},useOptionSlot:{type:[Boolean,String],default:void 0},triggerQueryAction:{type:String,default:"all"},caseSensitive:{type:Boolean,default:!1},virtualScrollbar:{type:Boolean,default:!1},virtualItemHeight:{type:Number,default:28},virtualBufferSize:{type:Number,default:200},showNotFound:{type:Boolean,default:!0},showDropdown:{type:Boolean,default:!0},displayTextFormat:{type:Object,default:()=>({})},displayMode:{type:String,default:"none",validator(m){return["label","text","none"].includes(m)}},advanced:{type:[Boolean,Object],default:!1},searchIconActive:{type:Boolean,default:!1},defaultOption:{type:[Function,String],default:w.OPTION_TYPE.BASE},enterKey:{type:String,default:void 0,validator(m){return m?Object.values(f.EnterHint).includes(m):!0}},customIcon:{type:String,default:void 0,validator(m){return["search","filter","custom","none"].includes(m)}}},emits:["display-changed","is-active","update:model-value","input","internal-select","select","focus","blur","clear","dropdown-hidden","dropdown-shown","close-dropdown","click-icon","click-advanced-icon"],data(){return{id:l.uuid(),activeDescendant:null,isFocused:!1,dropdownStyle:{},loading:!1,show:!1,showAdvanced:!1,dropItemNodeList:[],display:"",currentQueryAction:"all",visibleOptions:[],searchOptions:[],defaultChildOptionIndent:!0}},computed:{innerLoadingText(){return this.loadingText??this._i18n("uicommon","searching")},innerNotFoundText(){return this.notFoundText??this._i18n("search","no_search_result")},innerAdvancedType(){return k.isObject(this.advanced)?this.advanced?.type??C.PANEL:C.PANEL},hasAdvancedPanel(){return this.innerAdvancedType===C.PANEL},hasAdvancedMenu(){return this.innerAdvancedType===C.MENU},alignment(){return k.isObject(this.align)?_.merge({offset:this.dropdownOffset},this.align):{pos:this.align,offset:this.dropdownOffset}},wrapStyles(){return{}},mergedDisplayTextFormat(){return _.merge({group:"{group}:{option}",option:"{option}",delimiter:this._i18n("common","comma")},this.displayTextFormat)},currentOptions(){return this.isSearchMode?this.transformGroupOptions(this.searchOptions):this.transformGroupOptions(this.options)},allowClear(){return this.clearable&&!!this.display},allowEdit(){return k.isDefined(this.editable)?this.editable:!!(this.search||this.filter)},_hideTrigger(){return k.isDefined(this.hideTrigger)?this.hideTrigger:!!(this.search||this.filter)},innerCustomIcon(){return this.customIcon?this.customIcon:this.search?"search":this.filter?"filter":"none"},inputAttrs(){return{disabled:this.disabled,readonly:!this.allowEdit,autocomplete:"off","aria-autocomplete":"list","aria-haspopup":"listbox","aria-activedescendant":this.activeDescendant,"aria-expanded":this.show}},wrapCls(){return{"v-select2-wrapper":!0,"has-icon":this.hasIcon(),"is-advanced":this.advanceIconPos==="left"&&!this.hasIconSlot(),disabled:this.disabled,focused:this.isFocused,pressed:this.show||this.showAdvanced,readonly:!this.allowEdit,"allow-clear":this.allowClear,"hide-trigger":this._hideTrigger,"right-advanced-icon":this.advanceIconPos==="right"}},dropdownCls(){return["v-select2-dropdown",this.customDropdownCls]},clearIconCls(){return["v-select2-clear-icon",{"hide-trigger":this._hideTrigger,"has-right-advanced-icon":this.advanceIconPos==="right"}]},advanceIconPos(){return k.isBoolean(this.advanced)?this.advanced?"left":"none":this.advanced?.icon??"left"},searchIcon(){let m={};return this.advanceIconPos==="left"?(m.sprite=!0,this.innerCustomIcon=="search"?m.name="select-advanced-search":this.innerCustomIcon=="filter"&&(m.name="select-advanced-filter")):(m.svgIconSet="set01",this.innerCustomIcon=="search"?m.name="select-search":this.innerCustomIcon=="filter"&&(m.name="select-filter")),m},searchIconCls(){return[{normal:this.innerCustomIcon==="search",advanced:this.advanceIconPos==="left",disabled:!this.hasIcon(),"show-advanced-panel":this.showAdvanced,active:this.searchIconActive}]},isActive(){return this.show||this.isFocused},selectedOption(){return this.currentOptions.find(m=>m[this.valueField]===b.getModelValue(this))},isSearchMode(){return this.search},autoOpenDropdownCharCount(){return this.isSearchMode?+this.minSearchChar:-1},inputMode(){return this.search?"search":"normal"},innerGroupOptions(){return this.currentOptions.reduce((m,T)=>(T.type==="group-label"&&(m[T[this.valueField]]=T),m),{})},enterKeyHint(){return k.isDefined(this.enterKey)?this.enterKey:this.isSearchMode?f.EnterHint.Search:f.EnterHint.Enter}},watch:{options:{handler(m){this.isSearchMode&&(this.searchOptions=m)},immediate:!0},currentOptions(m){this.doQuery(this.currentQueryAction)},display(m){this.currentQueryAction="keyword",this.doQuery(this.currentQueryAction),s.$emit(this,"display-changed",m)},show:{async handler(m){m?s.$emit(this,"dropdown-shown"):s.$emit(this,"dropdown-hidden"),await this.repositionMenu(),await this.$nextTick(),this.$refs.dropdown&&s.$emit(this.$refs.dropdown,"shown")},immediate:!0},isActive:{handler(m){s.$emit(this,"is-active",m)}}},created(){this._searchingDebounce=_.debounce(this.searching,250)},mounted(){p.addResizeListener(this.$el,this.onInputWidthChanged,this),this.onInputWidthChanged()},[M.componentHooks.beforeUnmount](){p.removeResizeListener(this.$el,this.onInputWidthChanged)},methods:{onInputWidthChanged(){const{width:m}=this.$el.getBoundingClientRect();let T=this.dropdownWidth??m;T=k.isString(T)?T:`${T}px`,this.dropdownStyle={width:T}},hasIcon(){return this.innerCustomIcon!=="none"||this.hasIconSlot()},hasIconSlot(){return F.hasSlot(this,"icon")},transformGroupOptions(m){if(k.isObject(m)){let T=[];for(let D in m)m.hasOwnProperty(D)&&(T.push({type:"group-label",[this.valueField]:D,[this.displayField]:D,...this.groupOptions?.[D]??{}}),T=T.concat(m[D].options.map(O=>({...O,indent:this.groupOptions?.[D]?.indent??this.defaultChildOptionIndent,inGroup:D}))));return T}return m},setLoading(m){this.loading=m},isEmptyStateValue(m){return Array.isArray(this.nullValue)&&this.nullValue.includes(m)||this.nullValue===m},getOptionTooltip(){let m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},T=this.mapOptionToTooltip?this.mapOptionToTooltip(m):m[this.displayField];if(k.isString(T))T={content:T};else if(T===!1)return!1;return{delay:300,bgOpacity:1,offset:[25,25],attachToElement:!0,overflowOnly:!0,content:m[this.displayField],...T}},getValidOptions(){return this.currentOptions.filter(m=>m.hide!==!0)},getVisibleOptions(){let m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"all";if(this.filter)return this.filter(this.display,this.currentOptions,m);let T=Object.create(null),D=0,O=this.currentOptions.filter(N=>{if(N.hide)return!1;if(N==="-")return!0;let z=!1;if((this.search||!this.allowEdit||!this.display||N.type==="group-label")&&(z=!0),m==="keyword"){let H=N[this.displayField],$=this.display;this.caseSensitive||(H=H.toUpperCase(),$=$.toUpperCase()),H.includes($)&&(z=!0)}else m==="all"&&(z=!0);return k.isFunction(N.filter)&&(z=N.filter(this.display,N,D,{query:m})),z&&(D++,N.inGroup&&(T[N.inGroup]=!0)),z});return O=O.filter(N=>N.type==="group-label"?!!T[N[this.valueField]]:!0),this.filterLegalDividerOption(O)},doQuery(){let m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"all";this.visibleOptions=this.getVisibleOptions(m),this.repositionMenu()},register(m){(arguments.length>1&&arguments[1]!==void 0?arguments[1]:()=>{})(this)},unregister(m){(arguments.length>1&&arguments[1]!==void 0?arguments[1]:()=>{})(this)},filterLegalDividerOption(m){let T=null,D=!1,O=[];for(let N=0;N<m.length;N++){let z=m[N];z!=="-"?(D&&T&&O.push(T),D=!0,O.push(z),T=null):T=z}return O},clickOutside(){this.closeDropdown(),this.advanced&&this.closeAdvancedPanel()},doSearch(m){!this.search||m.length<this.minSearchChar||(this.loading=!0,this._searchingDebounce(m))},async searching(m){this.$options._searchingDefer=this.$options._searchingDefer||Promise.resolve(),this.$options._searchingDefer=this.$options._searchingDefer.then(async()=>{this.loading=!0;const T=await this.search(m);T&&(this.searchOptions=T),this.loading=!1})},async repositionMenu(){await this.$nextTick(),!(!this.$el||!this.$refs.dropdown||!this.$refs.dropdown.$el)&&this.show&&this.$refs.portal?.doAlign()},focusInput(){this.$refs.input&&this.$refs.input.focus()},onClick(){this._hideTrigger||(this.$refs.input.focus(),this.toggleDropdown(this.triggerQueryAction))},openDropdown(m){return this.show?!1:(m&&(this.currentQueryAction=m),this.doQuery(this.currentQueryAction),this.show=!0,!0)},closeDropdown(){this.show&&(this.shouldMenuClose&&!this.shouldMenuClose()||(this.show=!1,s.$emit(this,"close-dropdown")))},toggleDropdown(m){this.disabled||(this.allowEdit&&this.$refs.input.getInputEl()?.focus(),this.show?this.closeDropdown():this.openDropdown(m))},openAdvancedPanel(){this.showAdvanced=!0,this.closeDropdown()},closeAdvancedPanel(){this.showAdvanced=!1},toggleAdvancedPanel(){this.disabled||(this.showAdvanced?this.closeAdvancedPanel():this.openAdvancedPanel())},onClickIcon(){s.$emit(this,"click-icon"),this.advanced&&this.toggleAdvancedPanel()},onClickAdvancedIcon(){s.$emit(this,"click-advanced-icon"),this.toggleAdvancedPanel()},onEnter(){if(this.$refs.dropdown){const m=this.$refs.dropdown.getActiveIndex();this.select(m)}},onArrow(){let m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";this.advanced||(this.openDropdown(),this.$refs.dropdown&&this.$refs.dropdown.moveActiveIndex(m))},clear(){this.display="";const m=this.findOptions(this.display);s.$emit(this,"clear"),s.$emit(this,b.getModelEventName(this),m&&m[this.valueField])},canCloseOnSelect(m){return k.isDefined(m.closeOnSelect)?m.closeOnSelect:this.closeOnSelect},select(){let m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:-1;if(m<0||this.visibleOptions.length<=m)return;const T=this.visibleOptions[m];s.$emit(this,"internal-select",m),s.$emit(this,"select",T),this.canCloseOnSelect(T)&&(this.closeDropdown(),this.$refs.input.focus())},onScrollbarVisible(){this.repositionMenu()},onHoverIndexChanged(){this.activeDescendant=this.$refs.dropdown&&this.$refs.dropdown.getActiveOptionAria()},inDataTableBehavior(){this.$el.addEventListener("mousedown",m=>{m.stopPropagation(),u.doHandler(m)}),this.$el.addEventListener("keydown",m=>m.stopPropagation())},setDisplay(m){this.display=m},onFocus(m){this.isFocused=!0,s.$emit(this,"focus",m)},onBlur(m){this.isFocused=!1,s.$emit(this,"blur",m)}}});x.default=c}(cP)),cP}var Yq;function Ab(){return Yq||(Yq=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Dr(),k=tT(),F=Kt(),B=Ni(),G=Si(),E=ln(),A=eT(),u=ht(),o=St();function S(d){return typeof d<"u"&&d!==""}const _=u.defineComponent({name:"SingleSelect",extends:k.default,props:{forceSelection:{type:Boolean,default:!1},selectOnFocus:{type:Boolean,default:!0},displayMode:{type:String,default:"none",validator(d){return["text","none","html"].includes(d)}},defaultOption:{type:[Function,String],default:A.OPTION_TYPE.BASE}},data(){return{lastSelectedOption:void 0,defaultChildOptionIndent:!0}},computed:{selectedOption(){const d=B.getModelValue(this);return this.isEmptyStateValue(d)?null:this.currentOptions.find(v=>S(d)&&v[this.valueField]===d)},wrapStyles(){return{width:F.isNumberLike(this.width)?`${this.width}px`:this.width}},innerValue(){return B.getModelValue(this)}},watch:{display(d){this.doSearch(d)},currentOptions:{immediate:!0,deep:!0,handler(){const d=this.selectedOption;d&&!this.search&&(this.display=d[this.displayField])}},[B.componentsProps.value()]:{immediate:!0,handler(d){if(!F.isDefined(d)&&this.clearable&&this.tryRememberLastSelectedOption(null),this.isEmptyStateValue(d)){E.$emit(this,B.getModelEventName(this),null),this.display="",this.tryRememberLastSelectedOption(null);return}S(d)&&this.$refs.dropdown&&this.$refs.dropdown.setActiveIndexByValue(d);const v=this.selectedOption;this.tryRememberLastSelectedOption(v),v&&(this.display=v[this.displayField])}}},methods:{getSlots(){return G.getSlots(this)},findOptions(d){return this.getValidOptions().filter(v=>v.type!=="group-label").find(v=>d&&v[this.displayField]===d)},tryRememberLastSelectedOption(d){this.lastSelectedOption=d},handleForceSelection(d){return this.display===""&&this.clearable||d?!1:(this.lastSelectedOption?this.display=this.lastSelectedOption[this.displayField]:this.display="",!0)},onFocus(d){this.advanced&&this.closeAdvancedPanel(),k.default.methods.onFocus.apply(this,arguments)},onBlur(d){const v=M.getFocusElement(d);if(k.default.methods.onBlur.apply(this,arguments),this.$refs.dropdown&&this.$refs.dropdown.$el.contains(v)||this.$el.contains(v)||this.selectedOption&&this.display===this.selectedOption[this.displayField]||!this.allowEdit)return;const b=this.findOptions(this.display);this.forceSelection?this.handleForceSelection(b)===!1&&E.$emit(this,B.getModelEventName(this),b&&b[this.valueField]):E.$emit(this,B.getModelEventName(this),b&&b[this.valueField])},select(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:-1;if(d<0||this.visibleOptions.length<=d||this.selectedOptionIndex===d)return;const v=this.visibleOptions[d];v==="-"||v.disabled||(this.display=v[this.displayField],E.$emit(this,B.getModelEventName(this),v[this.valueField]),k.default.methods.select.apply(this,arguments))},openDropdown(d){const v=this.selectOnFocus&&this.allowEdit;k.default.methods.openDropdown.apply(this,arguments)&&v&&d==="all"&&this.$refs.input.selectInput()},async openAdvancedPanel(){k.default.methods.openAdvancedPanel.apply(this,arguments)},closeAdvancedPanel(){k.default.methods.closeAdvancedPanel.apply(this,arguments)}}}),p={key:1,class:"v-select2-advanced"};function f(d,v,b,s,l,w){const I=u.resolveComponent("v-icon"),C=u.resolveComponent("v-select-input"),h=u.resolveComponent("v-portal"),c=u.resolveComponent("v-select-dropdown"),m=u.resolveDirective("clickoutside"),T=u.resolveDirective("syno-id");return u.withDirectives((u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(d.wrapCls),style:u.normalizeStyle(d.wrapStyles),onClick:v[3]||(v[3]=function(){return d.onClick&&d.onClick(...arguments)})},[u.renderSlot(d.$slots,"input",{hasIcon:d.hasIcon(),searchIconCls:d.searchIconCls},()=>[u.createVNode(C,{ref:"input",onClickIcon:d.onClickIcon,onClickAdvancedIcon:d.onClickAdvancedIcon,"input-tooltip":d.inputTooltip,placeholder:d.placeholder,disabled:d.disabled,modelValue:d.display,"onUpdate:modelValue":v[0]||(v[0]=D=>d.display=D),"selected-option":d.selectedOption,"input-attrs":d.inputAttrs,"open-dropdown":d.openDropdown,"toggle-dropdown":d.toggleDropdown,"close-dropdown":d.closeDropdown,advanced:!!d.advanced,"right-advance-icon":d.advanceIconPos==="right","search-icon-cls":d.searchIconCls,"clear-icon-cls":d.clearIconCls,"allow-clear":d.allowClear,"hide-trigger":d._hideTrigger,"display-field":d.displayField,"value-field":d.valueField,"trigger-query-action":d.triggerQueryAction,"auto-open-dropdown-char-count":d.autoOpenDropdownCharCount,"toggle-dropdown-on-click":!d.isSearchMode,"display-mode":d.displayMode,"display-text-format":d.mergedDisplayTextFormat,"group-options":d.innerGroupOptions,"enter-key-hint":d.enterKeyHint,onClear:d.clear,onArrowUp:v[1]||(v[1]=D=>d.onArrow("up")),onArrowDown:v[2]||(v[2]=D=>d.onArrow("down")),onKeyEnter:d.onEnter,onFocus:d.onFocus,onBlur:d.onBlur},{icon:u.withCtx(()=>[u.renderSlot(d.$slots,"icon",{disabled:d.disabled,class:u.normalizeClass(d.searchIconCls)},()=>[d.hasIcon()?(u.openBlock(),u.createBlock(I,u.mergeProps({key:0,class:d.searchIconCls,disabled:d.disabled},d.searchIcon),null,16,["class","disabled"])):u.createCommentVNode("",!0)])]),right:u.withCtx(()=>[u.renderSlot(d.$slots,"input-right")]),_:3},8,["onClickIcon","onClickAdvancedIcon","input-tooltip","placeholder","disabled","modelValue","selected-option","input-attrs","open-dropdown","toggle-dropdown","close-dropdown","advanced","right-advance-icon","search-icon-cls","clear-icon-cls","allow-clear","hide-trigger","display-field","value-field","trigger-query-action","auto-open-dropdown-char-count","toggle-dropdown-on-click","display-mode","display-text-format","group-options","enter-key-hint","onClear","onKeyEnter","onFocus","onBlur"])]),d.showAdvanced&&d.advanced?(u.openBlock(),u.createBlock(h,{ref:"advanced-portal",key:"advanced","mount-to":d.getContainerEl(),anchor:d.$el,alignment:d.alignment},{default:u.withCtx(()=>[d.hasAdvancedMenu?u.renderSlot(d.$slots,"advanced-menu",{key:0}):d.hasAdvancedPanel?(u.openBlock(),u.createElementBlock("div",p,[u.renderSlot(d.$slots,"advanced-panel",{display:d.display})])):u.createCommentVNode("",!0)]),_:3},8,["mount-to","anchor","alignment"])):u.createCommentVNode("",!0),d.show&&d.showDropdown?(u.openBlock(),u.createBlock(h,{ref:"portal",key:"dropdown","mount-to":d.getContainerEl(),anchor:d.$el,"acquire-z-index":"",alignment:d.alignment},{default:u.withCtx(()=>[u.renderSlot(d.$slots,"dropdown",{style:u.normalizeStyle(d.dropdownStyle),synoId:d.synoId,options:d.visibleOptions,useOptionSlot:d.useOptionSlot,advanced:!!d.advanced,dropdownCls:d.dropdownCls,loading:d.loading,loadingText:d.innerLoadingText,maxHeight:+d.maxHeight,notFoundText:d.innerNotFoundText,value:d.innerValue,valueField:d.valueField,displayField:d.displayField,getOptionTooltip:d.getOptionTooltip,virtualScrollbar:d.virtualScrollbar,virtualItemHeight:d.virtualItemHeight,virtualBufferSize:d.virtualBufferSize,showNotFound:d.showNotFound,defaultOption:d.defaultOption},()=>[u.createVNode(c,{ref:"dropdown",style:u.normalizeStyle(d.dropdownStyle),"syno-id":d.synoId,options:d.visibleOptions,"use-option-slot":d.useOptionSlot,advanced:!!d.advanced,"dropdown-cls":d.dropdownCls,loading:d.loading,"loading-text":d.innerLoadingText,"max-height":+d.maxHeight,"not-found-text":d.innerNotFoundText,value:d.innerValue,"value-field":d.valueField,"display-field":d.displayField,"get-option-tooltip":d.getOptionTooltip,"virtual-scrollbar":d.virtualScrollbar,"virtual-item-height":d.virtualItemHeight,"virtual-buffer-size":d.virtualBufferSize,"show-not-found":d.showNotFound,"default-option":d.defaultOption,onCloseDropdown:d.closeDropdown,onHoverIndex:d.onHoverIndexChanged,onSelect:d.select,onScrollbarVisible:d.onScrollbarVisible},u.createSlots({_:2},[u.renderList(d.getSlots(),(D,O)=>({name:O,fn:u.withCtx(N=>[u.renderSlot(d.$slots,O,u.normalizeProps(u.guardReactiveProps(N)))])}))]),1032,["style","syno-id","options","use-option-slot","advanced","dropdown-cls","loading","loading-text","max-height","not-found-text","value","value-field","display-field","get-option-tooltip","virtual-scrollbar","virtual-item-height","virtual-buffer-size","show-not-found","default-option","onCloseDropdown","onHoverIndex","onSelect","onScrollbarVisible"])])]),_:3},8,["mount-to","anchor","alignment"])):u.createCommentVNode("",!0)],6)),[[m,d.clickOutside,void 0,{children:!0}],[T]])}var y=o.default(_,[["render",f]]);x.default=y}(hP)),hP}var SP={},IP={},Kq;function e5(){return Kq||(Kq=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=fr(),k=ht(),F=St();const B=k.defineComponent({name:"OverflowListItem",mixins:[M.inject("overflow-list")],data(){return{visible:!0}},methods:{hide(){this.visible=!1},show(){this.visible=!0}}}),G={key:0,class:"v-overflow-item"};function E(u,o,S,_,p,f){return u.visible?(k.openBlock(),k.createElementBlock("div",G,[k.renderSlot(u.$slots,"default")])):k.createCommentVNode("",!0)}var A=F.default(B,[["render",E]]);x.default=A}(IP)),IP}var Xq;function nT(){return Xq||(Xq=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Xn(),k=Yl(),F=e5(),B=fr(),G=Kt(),E=ht(),A=St();const u={START:"start",FROM:"from"},o=E.defineComponent({name:"OverflowList",components:{vOverflowListItem:F.default},mixins:[B.provide("overflow-list")],props:{collapseDirection:{type:String,validator(d){return Object.values(u).includes(d)},default:u.END},items:{type:Array,default:()=>[]},minVisibleItemsNum:{type:Number,default:0}},data(){return{visibleItems:[]}},computed:{isCollapsedFromStart(){return this.collapseDirection===u.START},isCollapsedFromEnd(){return this.collapseDirection===u.END},isOverflowing(){return this.visibleItems.length<this.items.length},overflowItems(){return this.items.slice(this.visibleItems.length)}},watch:{items:{handler(d,v){G.isEqual(d,v)||(this.showAllItems(),this.$nextTick(()=>{this.onMeasure()}))},immediate:!0}},mounted(){this.disposeFn=k.addResizeListener(this.$el,this.onResize,this),this.prevWidth=this.$el.getBoundingClientRect().width,this.$nextTick(()=>{this.showAllItems(),this.onMeasure()})},[M.componentHooks.beforeUnmount](){this.disposeFn?.()},methods:{onResize(d){d.contentRect.width>this.prevWidth&&this.showAllItems(),this.prevWidth=d.contentRect.width,this.onMeasure()},showAllItems(){this.visibleItems=this.items.slice()},onMeasure(){this.measuring=this.measuring??Promise.resolve(),this.measuring=this.measuring.then(()=>this.remeasure())},getItemKey(d,v){return d.id??v},remeasure(){return(this.$refs.measure?.getBoundingClientRect()?.width??0)<.8&&this.visibleItems.length>this.minVisibleItemsNum?(this.isCollapsedFromEnd?this.visibleItems.pop():this.isCollapsedFromStart&&this.visibleItems.shift(),this.$nextTick().then(()=>this.remeasure())):Promise.resolve()}}}),S={class:"v-overflow-list"},_={key:0,class:"v-overflow-list-spacer",ref:"measure"},p={key:3,class:"v-overflow-list-spacer",ref:"measure"};function f(d,v,b,s,l,w){const I=E.resolveComponent("v-overflow-list-item");return E.openBlock(),E.createElementBlock("div",S,[d.isCollapsedFromStart?(E.openBlock(),E.createElementBlock("i",_,null,512)):E.createCommentVNode("",!0),E.renderSlot(d.$slots,"overflow-start-anchor",{visibleItems:d.visibleItems,overflowItems:d.overflowItems}),d.isOverflowing&&d.isCollapsedFromStart?E.renderSlot(d.$slots,"overflow-item",{key:1,visibleItems:d.visibleItems,overflowItems:d.overflowItems}):E.createCommentVNode("",!0),(E.openBlock(!0),E.createElementBlock(E.Fragment,null,E.renderList(d.visibleItems,(C,h)=>(E.openBlock(),E.createBlock(I,{key:d.getItemKey(C,h)},{default:E.withCtx(()=>[E.renderSlot(d.$slots,"default",{item:C,visibleIndex:h,visibleItems:d.visibleItems,overflowItems:d.overflowItems})]),_:2},1024))),128)),d.isOverflowing&&d.isCollapsedFromEnd?E.renderSlot(d.$slots,"overflow-item",{key:2,visibleItems:d.visibleItems,overflowItems:d.overflowItems}):E.createCommentVNode("",!0),E.renderSlot(d.$slots,"overflow-end-anchor",{visibleItems:d.visibleItems,overflowItems:d.overflowItems}),d.isCollapsedFromEnd?(E.openBlock(),E.createElementBlock("i",p,null,512)):E.createCommentVNode("",!0)])}var y=A.default(o,[["render",f]]);x.default=y}(SP)),SP}var xP={},Jq;function nwe(){return Jq||(Jq=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=ln(),k=Xx(),F=La(),B=Eb(),G=Eu(),E=lc(),A=ci(),u=ht(),o=St();const S=u.defineComponent({components:{vAvatar:k.default,vButton:F.default,vSpace:B.default,vMenu:G.default,vMenuItem:E.default},mixins:[A.default],props:{username:{type:String,default:""},email:{type:String,default:"example@synology.com"}},emits:["click-manage-profile"],methods:{onClickManagerProfile(){M.$emit(this,"click-manage-profile")}}}),_={class:"app-profile-menu__info-wrapper"},p={class:"app-profile-menu__name"},f={class:"app-profile-menu__email"};function y(v,b,s,l,w,I){const C=u.resolveComponent("v-avatar"),h=u.resolveComponent("v-button"),c=u.resolveComponent("v-space"),m=u.resolveComponent("v-menu-item"),T=u.resolveComponent("v-menu");return u.openBlock(),u.createBlock(T,{class:"app-profile-menu",width:300},{default:u.withCtx(()=>[u.createVNode(m,{class:"profile-menu-item"},{default:u.withCtx(()=>[u.createVNode(c,{class:"profile-menu-item__wrapper",direction:"column",spacing:"none"},{default:u.withCtx(()=>[u.createVNode(C,{class:"app-profile-menu__avatar",username:v.username,size:"large",disabled:""},null,8,["username"]),u.createElementVNode("div",_,[u.createElementVNode("div",p,u.toDisplayString(v.username),1),u.createElementVNode("div",f,u.toDisplayString(v.email),1)]),u.createVNode(c,{class:"app-profile-menu__actions"},{default:u.withCtx(()=>[u.createVNode(h,{onClick:v.onClickManagerProfile},{default:u.withCtx(()=>[u.createTextVNode(u.toDisplayString(v._i18n("common","synology_account_settings")),1)]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1}),u.renderSlot(v.$slots,"profile-menu-items")]),_:3})}var d=o.default(S,[["render",y]]);x.default=d}(xP)),xP}var Zq;function G3(){return Zq||(Zq=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=ln(),k=Xx(),F=Eb(),B=Eu(),G=lc(),E=qF(),A=Jx(),u=La(),o=Ab(),S=nT(),_=ls(),p=nwe(),f=ci(),y=vr(),d=Ur(),v=kr(),b=Si(),s=ht(),l=St();y.register("app-bar-hamburger",v.vIconHamburger),y.register("app-bar-more",v.vIconMore);const w=s.defineComponent({name:"AppBar",components:{vAvatar:k.default,vSpace:F.default,vMenu:B.default,vMenuItem:G.default,vMenuDivider:A.default,vMenuGroup:E.default,vButton:u.default,vSingleSelect:o.default,vOverflowList:S.default,vIcon:_.default,vAppProfileMenu:p.default},mixins:[f.default,y.default],props:{hasAvatar:{type:Boolean,default:!0},hasSignin:{type:Boolean,default:!1},hasLaunch:{type:Boolean,default:!0},hasRegionSelector:{type:Boolean,default:!0},hasMore:{type:Boolean,default:!1},service:{type:Object,default:()=>({})},serviceItems:{type:Array,default:()=>[]},serviceItemsNotBuy:{type:Array,default:()=>[]},region:{type:String,default:""},regionOptions:{type:Array,default:()=>[]},username:{type:String,default:""},email:{type:String,default:""},showHamburgerIcon:{type:Boolean,default:!1},mobileBreakpoint:{type:[Boolean,String],default:"xxs"},toolbarButtons:{type:Array,default:()=>[]}},emits:["click-signin","click-service-item","select-region","click-hamburger","click-logo","click-more-products","click-manage-profile"],data:()=>({}),computed:{isMobile(){return!this.$breakpointManager&&this.mobileBreakpoint?(d.remind("please import and use BreakpointManagerPlugin when you are in tree-shaking mode or breakpoint will not active."),!1):this.mobileBreakpoint&&this.$breakpointManager?.lessAndEqThan(this.mobileBreakpoint)},appClass(){return{"v-app-bar--mobile":this.isMobile}},appIconStyle(){return{backgroundImage:`url("${this.service.iconUrl}")`}},innerRegionOptions(){return[{type:"group-label",title:this._i18n("common","data_center"),regionCode:"data-center"},...this.regionOptions.map(T=>({inGroup:"data-center",...T}))]}},methods:{getSlots(){return b.getSlots(this)},onClickHamburgerIcon(){M.$emit(this,"click-hamburger")},onClickLogo(){M.$emit(this,"click-logo")},onClickMoreProducts(){M.$emit(this,"click-more-products")},onClickServiceItem(T){M.$emit(this,"click-service-item",T)},getServiceIconStyle(T){return{backgroundImage:`url("${T.iconUrl}")`}},onSelectRegion(T){M.$emit(this,"select-region",T)},onClickSignin(){M.$emit(this,"click-signin")}}}),I={class:"v-app-bar__app-name"},C={class:"v-app-bar-launch-menu-item__title"},h={class:"v-app-bar-launch-menu-item__title"};function c(T,D,O,N,z,H){const $=s.resolveComponent("v-icon"),V=s.resolveComponent("v-space"),P=s.resolveComponent("v-single-select"),U=s.resolveComponent("v-overflow-list"),Y=s.resolveComponent("v-button"),Z=s.resolveComponent("v-menu-item"),X=s.resolveComponent("v-menu-group"),J=s.resolveComponent("v-menu-divider"),q=s.resolveComponent("v-menu"),te=s.resolveComponent("v-app-profile-menu"),re=s.resolveComponent("v-avatar"),ie=s.resolveDirective("syno-id");return s.withDirectives((s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["v-app-bar",T.appClass])},[T.showHamburgerIcon?(s.openBlock(),s.createBlock($,{key:0,class:"v-app-bar__hamburger",name:"app-bar-hamburger","svg-icon-set":"set13",onClick:T.onClickHamburgerIcon},null,8,["onClick"])):s.createCommentVNode("",!0),s.createVNode(V,{class:"v-app-bar__title",onClick:T.onClickLogo},{default:s.withCtx(()=>[s.createVNode($,{size:[32,32],class:"v-app-bar__app-icon",style:s.normalizeStyle(T.appIconStyle),sprite:""},null,8,["style"]),s.createElementVNode("span",I,[s.renderSlot(T.$slots,"app-name",{},()=>[s.createTextVNode(s.toDisplayString(T.service.name),1)])]),s.renderSlot(T.$slots,"subtitle")]),_:3},8,["onClick"]),T.isMobile?s.createCommentVNode("",!0):(s.openBlock(),s.createBlock(V,{key:1,class:"v-app-bar__navbar-items-group"},{default:s.withCtx(()=>[s.renderSlot(T.$slots,"navbar-items")]),_:3})),s.createVNode(V,{class:"v-app-bar__right-toolbar","justify-content":"end"},{default:s.withCtx(()=>[!T.isMobile&&T.hasRegionSelector?(s.openBlock(),s.createBlock(P,{key:0,"syno-id":`${T.synoId}-single-select-region`,"value-field":"regionCode","display-field":"title",width:220,options:T.innerRegionOptions,value:T.region,onSelect:T.onSelectRegion},null,8,["syno-id","options","value","onSelect"])):s.createCommentVNode("",!0),s.createVNode(V,{class:"v-app-bar__toolbar-buttons","justify-content":"end"},{default:s.withCtx(()=>[s.renderSlot(T.$slots,"toolbar-buttons",{},()=>[s.createVNode(U,{items:T.toolbarButtons,class:"v-app-bar__toolbar-overflow-list","collapse-direction":"start"},{default:s.withCtx(ne=>[s.renderSlot(T.$slots,"toolbar-buttons-item",s.normalizeProps(s.guardReactiveProps(ne)))]),"overflow-item":s.withCtx(ne=>[s.renderSlot(T.$slots,"toolbar-buttons-overflow-item",s.normalizeProps(s.guardReactiveProps(ne)))]),_:3},8,["items"])]),T.hasMore?(s.openBlock(),s.createBlock(Y,{key:0,"syno-id":`${T.synoId}-more-button`,display:"icon",type:"styleless",class:"v-app-bar-icon-button","menu-align":"tr->br"},{dropdown:s.withCtx(()=>[s.renderSlot(T.$slots,"more-dropdown")]),default:s.withCtx(()=>[s.createVNode($,{name:"app-bar-more",class:"v-app-bar__more"})]),_:3},8,["syno-id"])):s.createCommentVNode("",!0),!T.isMobile&&T.hasLaunch?(s.openBlock(),s.createBlock(Y,{key:1,"syno-id":`${T.synoId}-launch-button`,display:"icon",type:"styleless",class:"v-app-bar-icon-button","menu-align":"tr->br"},{dropdown:s.withCtx(()=>[s.renderSlot(T.$slots,"launch-dropdown",{},()=>[T.serviceItems.concat(T.serviceItemsNotBuy).length>0?(s.openBlock(),s.createBlock(q,{key:0,class:"v-app-bar-launch-menu",width:270,"syno-id":`${T.synoId}-launch-menu`},{"bottom-actions":s.withCtx(()=>[s.createElementVNode("div",{class:"v-app-bar-launch-menu__action v-app-bar-launch-menu__more-product",onClick:D[0]||(D[0]=function(){return T.onClickMoreProducts&&T.onClickMoreProducts(...arguments)})},s.toDisplayString(T._i18n("common","more_products")),1)]),default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(T.serviceItems,(ne,le)=>(s.openBlock(),s.createBlock(Z,{class:"v-app-bar-launch-menu__item v-app-bar-launch-menu-item","syno-id":`${T.synoId}-service-menu-item-${le}`,id:ne.id,key:ne.id,onClick:fe=>T.onClickServiceItem(ne)},{default:s.withCtx(()=>[s.createVNode($,{class:"v-app-bar-launch-menu-item__icon",style:s.normalizeStyle(T.getServiceIconStyle(ne)),sprite:""},null,8,["style"]),s.createElementVNode("span",C,s.toDisplayString(ne.title),1)]),_:2},1032,["syno-id","id","onClick"]))),128)),s.createVNode(X,{title:T._i18n("common","explore"),class:"v-app-bar-launch-menu-item-group","syno-id":`${T.synoId}-launch-menu-group`},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(T.serviceItemsNotBuy,(ne,le)=>(s.openBlock(),s.createBlock(Z,{class:"v-app-bar-launch-menu__item v-app-bar-launch-menu-item","syno-id":`${T.synoId}-service-not-buy-menu-item-${le}`,id:ne.id,key:ne.id,onClick:fe=>T.onClickServiceItem(ne)},{default:s.withCtx(()=>[s.createVNode($,{class:"v-app-bar-launch-menu-item__icon",style:s.normalizeStyle(T.getServiceIconStyle(ne)),sprite:""},null,8,["style"]),s.createElementVNode("span",h,s.toDisplayString(ne.title),1)]),_:2},1032,["syno-id","id","onClick"]))),128))]),_:1},8,["title","syno-id"]),s.createVNode(J)]),_:1},8,["syno-id"])):s.createCommentVNode("",!0)])]),default:s.withCtx(()=>[s.createVNode($,{name:"v-app-bar__launch",sprite:""})]),_:3},8,["syno-id"])):s.createCommentVNode("",!0),T.hasAvatar?(s.openBlock(),s.createBlock(re,{key:2,"syno-id":`${T.synoId}-avatar`,username:T.username,size:"small"},{dropdown:s.withCtx(()=>[s.createVNode(te,{username:T.username,email:T.email,onClickManageProfile:D[1]||(D[1]=ne=>T.$emit("click-manage-profile"))},s.createSlots({_:2},[s.renderList(T.getSlots(),(ne,le)=>({name:le,fn:s.withCtx(fe=>[s.renderSlot(T.$slots,le,s.normalizeProps(s.guardReactiveProps(fe)))])}))]),1032,["username","email"])]),_:3},8,["syno-id","username"])):s.createCommentVNode("",!0),T.hasSignin?(s.openBlock(),s.createBlock(Y,{key:3,"syno-id":`${T.synoId}-signin-button`,suffix:"main",onClick:T.onClickSignin},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(T._i18n("common","sign_in")),1)]),_:1},8,["syno-id","onClick"])):s.createCommentVNode("",!0)]),_:3})]),_:3})],2)),[[ie]])}var m=l.default(w,[["render",c]]);x.default=m}(iP)),iP}var TP={},Qq;function j3(){return Qq||(Qq=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=ht(),k=St();const F=M.defineComponent({name:"NavbarItem",props:{buttonType:{type:String,default:""},name:{type:String,default:"Item"},active:{type:Boolean,default:!1}},computed:{btnClass(){return{active:this.active}}}});function B(E,A,u,o,S,_){const p=M.resolveComponent("v-button"),f=M.resolveDirective("syno-id");return M.withDirectives((M.openBlock(),M.createBlock(p,{"syno-id":`${E.synoId}-navbar-button`,class:M.normalizeClass(["v-navbar-item",E.btnClass]),type:E.buttonType,display:"text"},{dropdown:M.withCtx(()=>[M.renderSlot(E.$slots,"dropdown")]),default:M.withCtx(()=>[M.createTextVNode(M.toDisplayString(E.name)+" ",1)]),_:3},8,["syno-id","class","type"])),[[f]])}var G=k.default(F,[["render",B]]);x.default=G}(TP)),TP}var kP={},vg={},e4;function ff(){if(e4)return vg;e4=1,Object.defineProperty(vg,"__esModule",{value:!0});var x=Kt();function M(){return window?.Ext}function k(){return window?.SYNO}function F(G){const E=k()?.API?.RequestPromise;return E(G)}function B(G,E,A){const u=E.split(/[-.]/),o=A.split(/[-.]/);for(let S=0,_=Math.max(u.length,o.length);S<_;S++){const p=u[S]??"0",f=o[S]??"0",[y,d]=[x.tryParseInt(p),x.tryParseInt(f)];if(y>d)return G===">"||G===">=";if(y<d)return G==="<"||G==="<="}return G==="="||G===">="||G==="<="}return vg.comparePackageVersion=B,vg.getExtjs=M,vg.getSYNO=k,vg.requestWebAPI=F,vg}var t4;function q3(){return t4||(t4=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Xn(),k=ln(),F=Si(),B=ev(),G=Kt(),E=fr(),A=ff(),u=ht();const o="app_instance_inject";var S=u.defineComponent({name:"AppInstance",mixins:[E.provide("app-instance")],inject:{[o]:{default:G.noop}},props:{shouldLaunch:{type:Function,default:void 0},canOpen:{type:[Function,Boolean],default:!0},fullsize:{type:Boolean,default:!1},className:{type:String,default:void 0,required:!0}},emits:["openparamchanged"],data:()=>({windowState:void 0,fromRestore:void 0,autoStart:void 0,autoCenter:void 0,isMainApp:!1,notifyMsg:!0,initialized:!1,trayItem:void 0,appTrayItemName:void 0,onDestroy:G.noop}),created(){this.id=B.getUid(this),this[o]&&(this[o].app=this)},mounted(){this.register()},[M.componentHooks.beforeUnmount](){this.fullsize===!0&&SYNO.SDS.StatusNotifier.fireEvent("fullsizeappdestroy"),this.jsConfig&&this.jsConfig.upgradeApp===!0&&SYNO.SDS.StatusNotifier.fireEvent("upgradeappdestroy"),this.taskButton&&(this.taskButton.destroy(),this.taskButton=null),this.items=null,this.window=null,this.trayItem=null,this.appItem=null,this.unregister()},methods:{setDestroyCallback(_){this.onDestroy=_},setAppWindow(_){this.window=_},destroy(){this.onDestroy?.()},getJsConfig(){return this.jsConfig},init(_,p,f){if(this.shouldLaunch?.()===!1){this.onDestroy?.();return}if(!this.initialized){if(_S&&_S("standalone")){const y=_S("standaloneAppName");this.jsConfig.jsID===y?this.isMainApp=!0:this.jsConfig.jsID===A.getSYNO()?.SDS?.Config?.FnMap?.[y]?.config?.launchApp?this.isMainApp=!0:this.isMainApp=!1}this.addWindowItem(_,p,f),this.addTrayItem(_),this.addAppItem(_),this.initialized=!0}},shouldNotifyMsg(){return this.notifyMsg},addWindowItem(_,p,f){this.window&&(this.addItem(this.window),this.window.setParams(Object.assign({appInstance:this,fromRestore:_.fromRestore,autoStart:_.autoStart,autoCenter:_.autoCenter},_.windowState||{}),p,f))},addTrayItem(_){const p=A.getExtjs();if(!this.trayItem&&this.appTrayItemName&&p){let f=p.getClassByName(this.appTrayItemName);this.trayItem=new f(p.apply({appInstance:this})),this.addItem(this.trayItem),this.trayItem.open(_)}},addAppItem(_){const p=A.getExtjs();if(!this.appItem&&this.appItemName&&p){let f=p.getClassByName(this.appItemName);this.appItem=new f(p.apply({appInstance:this})),this.addItem(this.appItem),this.appItem.open(_)}},addItem(_){_.instance=this,this.items=this.items||[],this.items.push(_)},removeItem(_){_.instance=null,this.items=this.items||[];let p=this.items.indexOf(_);p!==-1&&this.items.splice(p,1),this.checkAlive()},checkAlive(){(!this.items||this.items.length===0)&&this.onDestroy?.()},register(){this.jsConfig=SYNO.SDS.Config.FnMap[this.className].config,SYNO.SDS.AppMgr&&SYNO.SDS.AppMgr.register(this)},unregister(){SYNO.SDS.AppMgr&&SYNO.SDS.AppMgr.unregister(this)},setTaskButton(_){this.taskButton=_},beforeInit(_){let{taskButton:p}=_;this.setTaskButton(p)},setParams(_){this.windowState=_.windowState,this.fromRestore=_.fromRestore,this.autoStart=_.autoStart,this.autoCenter=_.autoCenter,this.initialized||this.init(_,this.jsConfig,_.manager)},getUserSettings(_){if(SYNO.SDS.UserSettings)return SYNO.SDS.UserSettings.getProperty(this.getJsConfig().jsID,_)},setUserSettings(_,p){if(SYNO.SDS.UserSettings)return SYNO.SDS.UserSettings.setProperty(this.getJsConfig().jsID,_,p)},getStateParam(){let _={windowState:{}};return this.window&&(_=Object.assign(_,{windowState:this.window.getStateParam()},this.window.openConfig)),_},async open(_){this.initialized||((G.isFunction(this.canOpen)?await this.canOpen():this.canOpen)||this.onDestroy?.(),this.setParams(_));const p=this.items||[];for(const f of p)f.open?.()},setOpenParam(_){k.$emit(this,"openparamchanged",this,_)}},render(){return F.getSlots(this).default?.()}});x.APP_INSTANCE_INJECT_SYMBOL=o,x.default=S}(kP)),kP}var RP={},EP={},AP={},n4;function Y3(){return n4||(n4=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=_i(),k=Kt(),F=ff(),B=ht(),G=B.defineComponent({emits:["show"],data:()=>({active:!1}),async mounted(){this.defaultFocus&&B.nextTick(()=>{this.focus()})},methods:{isVisible(){return!this.hidden},getTitle(){return this.currentTitle},show(E,A,u){A=A||k.noop,this.hidden=!1,this.toFront({focus:this.defaultFocus?"default":!1}),B.nextTick(()=>{A?.apply(u??this)})},focus(){this.$refs.trapFocus&&this.$refs.trapFocus.focus()},toFront(){let{focus:E="default"}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},A=this.manager;A&&(A.bringToFront(this)&&E==="default"||E==="force")&&window.setTimeout(()=>{this.focus()},0)},alignTo(E){},getWidth(){return this.getCurrentWidth()},getHeight(){return this.getCurrentHeight()},setPosition(E,A){this.left=E,this.top=A},getSize(){return{width:this.width,height:this.height}},getGroupWinAccessTime(E){const A=u=>E?E(u.id):u._lastAccess;return[this,...M.get(this,"modalWins",[])].reduce((u,o)=>Math.max(u,A(o)||0),0)},getTopWin(){let E=this;for(;E.owner;)if(E=E.owner,F.getExtjs()?.Window&&E instanceof F.getExtjs().Window)return E.getTopWin();return E},getMountEl(){let E=this.getTopWin();return F.getExtjs()?.Window&&E instanceof F.getExtjs().Window?E.el.dom.parentElement:E._isVue&&E.$el.parentElement?E.$el.parentElement:document.querySelector("#sds-desktop")||document.querySelector("body")},setActive(E){this.active=E;let A=this.getTopWin(),u;if(F.getExtjs()?.Window&&A instanceof F.getExtjs().Window,u=A.taskButton,this.active){u&&u.setState("active");for(let o of this.modalWins)o.hideForMinimize&&(delete o.hideForMinimize,o.show());F.getSYNO()?.SDS?.StatusNotifier&&SYNO.SDS.StatusNotifier.fireEvent("windowActivate",this)}else u&&u.setState("deactive")},afterShow(){this.$emit("show")},isModalized(){return this.modal},maximize(){return this.onMaximize()},restore(){return this.onRestore()},destroy(){this.$destroy()},close(E){return this.onClose(E)},minimize(){return this.onMinimize()},getEl(){return{dom:this.$el,getSize:this.getSize}}}});x.default=G}(AP)),AP}var MP={},r4;function t5(){return r4||(r4=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Lg(),k=Dr(),F=fr(),B=ln(),G=ht(),E=St();function A(_,p,f,y,d){let v=p-_;return f+v<y?y-f:f+v>d?d-f:v}const u=G.defineComponent({name:"Resizable",components:{vPortal:M.default},mixins:[F.inject("window")],props:{windowProperty:{type:Object,default:()=>({})}},emits:["resize-end"],data:()=>({prefixCls:"v-window-resizable",isResizing:!1,top:void 0,left:void 0,startTop:void 0,startLeft:void 0,width:void 0,height:void 0,currentWidth:void 0,currentHeight:void 0,direction:void 0,startX:void 0,startY:void 0,diffX:void 0,diffY:void 0,minWidth:void 0,minHeight:void 0,maxHeight:void 0,maxWidth:void 0,maximized:void 0,isFit:void 0,constrainRect:void 0,resizeHandles:void 0}),computed:{horizontal(){return this.direction?this.direction.indexOf("w")!==-1?"w":this.direction.indexOf("e")!==-1?"e":null:null},vertical(){return this.direction?this.direction.indexOf("s")!==-1?"s":this.direction.indexOf("n")!==-1?"n":null:null},ghostStyle(){return{top:`${this.top}px`,left:`${this.left}px`,width:`${this.currentWidth+this.diffX}px`,height:`${this.currentHeight+this.diffY}px`}},maskStyle(){return{cursor:`${this.direction}-resize`}}},watch:{windowProperty:{immediate:!0,deep:!0,handler(_){this.top=+_.top,this.left=+_.left,this.width=_.width,this.height=_.height,this.minWidth=+_.minWidth,this.minHeight=+_.minHeight,this.maxWidth=+_.maxWidth,this.maxHeight=+_.maxHeight,this.maximized=_.maximized,this.constrainRect=_.constrainRect,this.resizeHandles=_.resizeHandles,this.isFit=_.isFit}}},methods:{getMountEl(){return this.window.instance.$el.parentNode??document.body},mouseMove(_){let{pageX:p,pageY:f}=_;const y=this.getMountEl().getBoundingClientRect();f<y.top&&(f=y.top),p<y.left&&(p=y.left),this.horizontal==="e"?this.diffX=A(this.startX,p,this.currentWidth,this.minWidth,this.maxWidth):this.horizontal==="w"&&(this.diffX=A(p,this.startX,this.currentWidth,this.minWidth,this.maxWidth),this.left=this.startLeft-this.diffX),this.vertical==="s"?this.diffY=A(this.startY,f,this.currentHeight,this.minHeight,this.maxHeight):this.vertical==="n"&&(this.diffY=A(f,this.startY,this.currentHeight,this.minHeight,this.maxHeight),this.top=this.startTop-this.diffY)},mouseUp(){this.isResizing=!1,B.$emit(this,"resize-end",{top:this.top,left:this.left,width:this.currentWidth+this.diffX,height:this.currentHeight+this.diffY})},mouseDown(_,p){let f;this.currentWidth=this.width==="auto"?this.window.instance.getCurrentWidth():+this.width,this.currentHeight=this.height==="auto"?this.window.instance.getCurrentHeight():+this.height,this.direction=_,this.isResizing=!0,this.startX=p.pageX,this.startY=p.pageY,this.diffX=this.diffY=0,this.startTop=this.top,this.startLeft=this.left,k.once(document,"mouseup",()=>{this.mouseUp(),f?.()}),f=k.on(document,"mousemove",y=>this.mouseMove(y))}}});function o(_,p,f,y,d,v){const b=G.resolveComponent("v-portal");return _.isFit?G.createCommentVNode("",!0):(G.openBlock(),G.createElementBlock("div",{key:0,class:G.normalizeClass(_.prefixCls)},[_.isResizing?(G.openBlock(),G.createBlock(b,{key:0,"mount-to":_.getMountEl},{default:G.withCtx(()=>[G.createElementVNode("div",{class:G.normalizeClass(`${_.prefixCls}-ghost`),style:G.normalizeStyle(_.ghostStyle),ref:"ghost"},null,6),G.createElementVNode("div",{class:G.normalizeClass(`${_.prefixCls}-resizing-mask`),style:G.normalizeStyle(_.maskStyle),ref:"resizing-mask"},null,6)]),_:1},8,["mount-to"])):G.createCommentVNode("",!0),["all","nw"].some(s=>_.resizeHandles.includes(s))?(G.openBlock(),G.createElementBlock("div",{key:1,class:G.normalizeClass(`handler ${_.prefixCls}-nw`),onMousedown:p[0]||(p[0]=s=>_.mouseDown("nw",s))},null,34)):G.createCommentVNode("",!0),["all","ne"].some(s=>_.resizeHandles.includes(s))?(G.openBlock(),G.createElementBlock("div",{key:2,class:G.normalizeClass(`handler ${_.prefixCls}-ne`),onMousedown:p[1]||(p[1]=s=>_.mouseDown("ne",s))},null,34)):G.createCommentVNode("",!0),["all","sw"].some(s=>_.resizeHandles.includes(s))?(G.openBlock(),G.createElementBlock("div",{key:3,class:G.normalizeClass(`handler ${_.prefixCls}-sw`),onMousedown:p[2]||(p[2]=s=>_.mouseDown("sw",s))},null,34)):G.createCommentVNode("",!0),["all","se"].some(s=>_.resizeHandles.includes(s))?(G.openBlock(),G.createElementBlock("div",{key:4,class:G.normalizeClass(`handler ${_.prefixCls}-se`),onMousedown:p[3]||(p[3]=s=>_.mouseDown("se",s))},null,34)):G.createCommentVNode("",!0),["all","n"].some(s=>_.resizeHandles.includes(s))?(G.openBlock(),G.createElementBlock("div",{key:5,class:G.normalizeClass(`handler ${_.prefixCls}-n`),onMousedown:p[4]||(p[4]=s=>_.mouseDown("n",s))},null,34)):G.createCommentVNode("",!0),["all","s"].some(s=>_.resizeHandles.includes(s))?(G.openBlock(),G.createElementBlock("div",{key:6,class:G.normalizeClass(`handler ${_.prefixCls}-s`),onMousedown:p[5]||(p[5]=s=>_.mouseDown("s",s))},null,34)):G.createCommentVNode("",!0),["all","w"].some(s=>_.resizeHandles.includes(s))?(G.openBlock(),G.createElementBlock("div",{key:7,class:G.normalizeClass(`handler ${_.prefixCls}-w`),onMousedown:p[6]||(p[6]=s=>_.mouseDown("w",s))},null,34)):G.createCommentVNode("",!0),["all","e"].some(s=>_.resizeHandles.includes(s))?(G.openBlock(),G.createElementBlock("div",{key:8,class:G.normalizeClass(`handler ${_.prefixCls}-e`),onMousedown:p[7]||(p[7]=s=>_.mouseDown("e",s))},null,34)):G.createCommentVNode("",!0)],2))}var S=E.default(u,[["render",o]]);x.default=S}(MP)),MP}var DP={},i4;function K3(){return i4||(i4=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Xn(),k=ln(),F=Dr(),B=fr(),G=ht(),E=St();function A(p,f){return f-p}const u=5,o=G.defineComponent({name:"Draggable",mixins:[B.inject("window")],props:{windowProperty:{type:Object,default:()=>({})},prefixCls:{type:String,default:void 0}},emits:["dragging","drag-end","window.header"],data:()=>({isDragging:!1,top:void 0,left:void 0,startTop:void 0,startLeft:void 0,width:void 0,height:void 0,currentWidth:void 0,currentHeight:void 0,diffX:void 0,diffY:void 0,maximized:void 0,isFit:void 0,constrainRect:void 0,headerEl:void 0}),computed:{ghostCls(){const p=["v-window-draggable"];return this.prefixCls?p.concat(this.prefixCls):p},ghostStyle(){return{top:`${this.top}px`,left:`${this.left}px`,width:`${this.currentWidth}px`,height:`${this.currentHeight}px`}}},watch:{windowProperty:{deep:!0,immediate:!0,handler(p){this.top=+p.top,this.left=+p.left,this.width=p.width,this.height=p.height,this.maximized=p.maximized,this.constrainRect=p.constrainRect,this.isFit=p.isFit}},async isDragging(p){if(k.$emit(this,"dragging",p),await G.nextTick(),p){const f=this.window.instance.$el.parentNode||document.body;if(!f)return;const y=this.headerEl.cloneNode(!0);this.$refs.ghost.appendChild(y),f.appendChild(this.$refs.ghost)}}},async mounted(){await G.nextTick(),this.window.instance.$refs.header?.$el&&(this.headerEl=this.window.instance.$refs.header?.$el,this.disposedFn=F.on(this.headerEl,"mousedown",p=>this.mouseDown(p)))},[M.componentHooks.beforeUnmount](){this.disposedFn?.()},methods:{mouseMove(p){let{pageX:f,pageY:y,clientX:d,clientY:v}=p;if(F.isOutofWindow([d,v])||Math.max(Math.abs(f-this.startX),Math.abs(y-this.startY))<u/window.devicePixelRatio)return;this.isDragging||(this.isDragging=!0),this.diffX=A(this.startX,f),this.diffY=A(this.startY,y);let b=this.startTop+this.diffY,s=this.startLeft+this.diffX;b<=this.constrainRect.top&&(this.diffY=this.constrainRect.top-this.startTop,b=this.constrainRect.top),F.css(this.$refs.ghost,"top",`${b}px`),F.css(this.$refs.ghost,"left",`${s}px`)},mouseUp(){this.isDragging=!1,this.$nextTick(()=>{this.activeElement&&(this.activeElement.focus(),delete this.activeElement)}),this.$emit("drag-end",{top:this.startTop+this.diffY,left:this.startLeft+this.diffX})},mouseDown(p){if(this.isFit)return;let f;this.activeElement=document.activeElement,this.currentWidth=this.width==="auto"?this.window.instance.getCurrentWidth():+this.width,this.currentHeight=this.height==="auto"?this.window.instance.getCurrentHeight():+this.height,this.startX=p.pageX,this.startY=p.pageY,this.startTop=this.top,this.startLeft=this.left,this.diffX=this.diffY=0,F.once(document,"mouseup",()=>{this.mouseUp(),f?.()}),f=F.on(document,"mousemove",y=>this.mouseMove(y))}}});function S(p,f,y,d,v,b){return p.isDragging?(G.openBlock(),G.createElementBlock("div",{key:0,class:G.normalizeClass(p.ghostCls),ref:"ghost",style:G.normalizeStyle(p.ghostStyle)},null,6)):G.createCommentVNode("",!0)}var _=E.default(o,[["render",S]]);x.default=_}(DP)),DP}var OP={},NP={},o4;function rT(){return o4||(o4=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=vr(),k=ln(),F=ls(),B=kr(),G=ht(),E=St();M.register("window-tool-close",B.vIconWintoolClose),M.register("window-tool-maximize",B.vIconWintoolFullscreen),M.register("window-tool-restore",B.vIconWintoolUnfullscreen),M.register("window-tool-help",B.vIconWintoolHelp),M.register("window-tool-minimize",B.vIconWintoolMinimize);const A=G.defineComponent({name:"WindowHeaderToolWrapper",components:{vIcon:F.default},props:{showHelp:{type:Boolean,default:!1},showMinimize:{type:Boolean,default:!0},showMaximize:{type:Boolean,default:!0},showFullscreen:{type:Boolean,default:!1},showClose:{type:Boolean,default:!0},maximized:{type:Boolean,default:!1},darkTheme:{type:Boolean,default:!1}},emits:["help","minimzie","restore","maximize","close"],methods:{onClickHelp(){k.$emit(this,"help")},onClickMinimize(){k.$emit(this,"minimize")},onClickRestore(){k.$emit(this,"restore")},onClickMaximize(){k.$emit(this,"maximize")},onClickClose(){k.$emit(this,"close")}}});function u(S,_,p,f,y,d){const v=G.resolveComponent("v-icon");return G.openBlock(),G.createElementBlock("div",{class:G.normalizeClass(["window-header-tool-wrapper",S.darkTheme?"dark":"light"])},[S.showHelp?(G.openBlock(),G.createBlock(v,{key:0,class:"tool help",name:"window-tool-help",onClick:S.onClickHelp,"svg-icon-set":S.darkTheme?"set23":"set21"},null,8,["onClick","svg-icon-set"])):G.createCommentVNode("",!0),S.showMinimize?(G.openBlock(),G.createBlock(v,{key:1,class:"tool minimize",name:"window-tool-minimize",onClick:S.onClickMinimize,"svg-icon-set":"set21"},null,8,["onClick"])):G.createCommentVNode("",!0),S.showMaximize&&S.maximized?(G.openBlock(),G.createBlock(v,{key:2,class:"tool restore",name:"window-tool-restore",onClick:S.onClickRestore,"svg-icon-set":"set21"},null,8,["onClick"])):G.createCommentVNode("",!0),S.showMaximize&&!S.maximized?(G.openBlock(),G.createBlock(v,{key:3,class:"tool maximize",name:"window-tool-maximize",onClick:S.onClickMaximize,"svg-icon-set":"set21"},null,8,["onClick"])):G.createCommentVNode("",!0),S.showClose?(G.openBlock(),G.createBlock(v,{key:4,class:"tool close",name:"window-tool-close",onClick:S.onClickClose,"svg-icon-set":S.darkTheme?"set23":"set22"},null,8,["onClick","svg-icon-set"])):G.createCommentVNode("",!0)],2)}var o=E.default(A,[["render",u]]);x.default=o}(NP)),NP}var a4;function iT(){return a4||(a4=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Zo(),k=rT(),F=ln(),B=ht(),G=St();const E=B.defineComponent({name:"WindowHeader",components:{vWindowHeaderToolWrapper:k.default},mixins:[M.default],props:{showHelp:{type:Boolean,default:!1},showMinimize:{type:Boolean,default:!0},showMaximize:{type:Boolean,default:!0},showFullscreen:{type:Boolean,default:!1},showClose:{type:Boolean,default:!0},iconUrl:{type:String,default:void 0},title:{type:String,default:void 0},maximized:{type:Boolean,default:!1},showAppIcon:{type:Boolean,default:!0},isModalized:{type:Boolean,default:!1},isWizard:{type:Boolean,default:!1},darkTheme:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1},inMobile:{type:Boolean,default:!1}},emits:["fullscreen","help","minimize","restore","maximize","close"],data:()=>({prefixCls:"v-window-header"}),computed:{wrapperCls(){return[`${this.prefixCls}-wrapper`,{"modal-win":this.isModalized,"wizard-win":this.isWizard,draggable:this.draggable,"mobile-fit":this.inMobile}]},iconStyle(){let o={};return this.iconUrl&&(o.backgroundImage=`url(${this.iconUrl})`),o},titleTooltip(){return{content:this.title,overflowOnly:!0}}},methods:{onDblClick(){this.maximized?F.$emit(this,"restore"):F.$emit(this,"maximize")},getTitleEl(){return this.$refs.title}}});function A(o,S,_,p,f,y){const d=B.resolveComponent("v-window-header-tool-wrapper"),v=B.resolveDirective("tooltip");return B.openBlock(),B.createElementBlock("div",{class:B.normalizeClass(o.wrapperCls),onDblclick:S[6]||(S[6]=function(){return o.onDblClick&&o.onDblClick(...arguments)})},[o.showAppIcon?(B.openBlock(),B.createElementBlock("div",{key:0,class:"app-icon",style:B.normalizeStyle(o.iconStyle)},null,4)):B.createCommentVNode("",!0),B.createElementVNode("div",{class:B.normalizeClass(o.prefixCls+"-text")},[B.withDirectives((B.openBlock(),B.createElementBlock("div",{class:B.normalizeClass(o.prefixCls+"-title"),ref:"title"},[B.createTextVNode(B.toDisplayString(o.title),1)],2)),[[v,o.titleTooltip]]),B.renderSlot(o.$slots,"sub-title")],2),B.createVNode(d,{"dark-theme":o.darkTheme,"show-fullscreen":o.showFullscreen,"show-help":o.showHelp,"show-minimize":o.showMinimize,"show-maximize":o.showMaximize,"show-close":o.showClose,maximized:o.maximized,onFullscreen:S[0]||(S[0]=b=>o.$emit("fullscreen")),onHelp:S[1]||(S[1]=b=>o.$emit("help")),onMinimize:S[2]||(S[2]=b=>o.$emit("minimize")),onRestore:S[3]||(S[3]=b=>o.$emit("restore")),onMaximize:S[4]||(S[4]=b=>o.$emit("maximize")),onClose:S[5]||(S[5]=b=>o.$emit("close"))},null,8,["dark-theme","show-fullscreen","show-help","show-minimize","show-maximize","show-close","maximized"])],34)}var u=G.default(E,[["render",A]]);x.default=u}(OP)),OP}var pS={},PP={},s4;function n5(){return s4||(s4=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Zo(),k=ci(),F=xl(),B=Kt(),G=Kl(),E=vr(),A=kr(),u=ht(),o=St();E.register("toast-close",A.vIconToastClose);const S="t->t",_=3e3,p=u.defineComponent({name:"Toast",components:{withTransition:G.withWrap(u.Transition)},mixins:[M.default,k.default,F.default,E.default],props:{showClose:{type:Boolean,default:void 0},delay:{type:[Number,String,Boolean],default:_},onClick:{type:Function,default:B.noop},text:{type:String,default:""},actionBtnText:{type:String,default:""},actionBtnCls:{type:String,default:""},textCls:{type:String,default:""},onClickActionBtn:{type:Function,default:B.noop},animate:{type:[Boolean,String],default:!1},icon:{type:[String,Boolean],default:!1},interactive:{type:Boolean,default:!1},onDestroy:{type:Function,default:B.noop}},data:()=>({prefix:"v-toast",left:0,top:0,destroyTimer:null}),computed:{innerShowClose(){return B.isBoolean(this.showClose)?this.showClose:!!this.interactive},toastStyle(){return{left:this.left+"px",top:this.top+"px"}},wrapCls(){return[this.prefix,{"has-icon":this.hasIcon,"has-close":this.innerShowClose}]},extendedActionBtnCls(){return[`${this.prefix}-action-btn`,this.actionBtnCls]},extendedTextCls(){return[`${this.prefix}-text`,this.textCls]},delayTime(){return this.delay===!0?_:this.delay},delayDestroy(){return this.delay!==!1},hasIcon(){return!!this.icon},transitionName(){return B.isString(this.animate)?this.animate:"fadeInUp"},hasAnimate(){return!!this.animate}},mounted(){this.delayDestroy&&(this.destroyTimer=window.setTimeout(()=>this.destroy(),this.delayTime))},methods:{destroy(){this.onDestroy?.(),this.$el&&this.$el.parentNode&&this.$el.parentNode.removeChild(this.$el)},doAlign(d){let v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const b=v?.anchorEl??d,s=v?.offset,l=v?.align??S,w=B.isBoolean(v?.constrainMode)?v?.constrainMode:!0,I=B.isBoolean(v?.absoluteMode)?v?.absoluteMode:!0,C=this.$alignManager.getAlignToXYv2(this.$refs.root,b,l,s,w,I,this.getContainerEl());this.left=C.x,this.top=C.y},onMouseEnter(){this.interactive&&this.destroyTimer&&(window.clearTimeout(this.destroyTimer),this.destroyTimer=null)},onMouseLeave(){!this.delayDestroy||!this.interactive||(this.destroyTimer&&window.clearTimeout(this.destroyTimer),this.destroyTimer=window.setTimeout(()=>this.destroy(),this.delayTime))}}});function f(d,v,b,s,l,w){const I=u.resolveComponent("v-icon"),C=u.resolveComponent("with-transition");return u.openBlock(),u.createBlock(C,{wrap:d.hasAnimate,name:d.transitionName,appear:""},{default:u.withCtx(()=>[u.createElementVNode("div",{class:u.normalizeClass(d.wrapCls),style:u.normalizeStyle(d.toastStyle),onMouseenter:v[2]||(v[2]=function(){return d.onMouseEnter&&d.onMouseEnter(...arguments)}),onMouseleave:v[3]||(v[3]=function(){return d.onMouseLeave&&d.onMouseLeave(...arguments)}),ref:"root"},[d.hasIcon?(u.openBlock(),u.createBlock(I,{key:0,name:d.icon},null,8,["name"])):u.createCommentVNode("",!0),u.createElementVNode("div",{class:u.normalizeClass(d.extendedTextCls),onClick:v[0]||(v[0]=function(){return d.onClick&&d.onClick(...arguments)})},u.toDisplayString(d.text),3),d.actionBtnText?(u.openBlock(),u.createElementBlock("button",{key:1,class:u.normalizeClass(d.extendedActionBtnCls),onClick:v[1]||(v[1]=()=>d.onClickActionBtn(this))},u.toDisplayString(d.actionBtnText),3)):u.createCommentVNode("",!0),d.innerShowClose?(u.openBlock(),u.createBlock(I,{key:2,name:"toast-close",class:u.normalizeClass(`${d.prefix}-close-btn`),role:"button","aria-label":d._i18n("common","close"),onClick:d.destroy,"svg-icon-set":"set24"},null,8,["class","aria-label","onClick"])):u.createCommentVNode("",!0)],38)]),_:1},8,["wrap","name"])}var y=o.default(p,[["render",f]]);x.default=y}(PP)),PP}var l4;function Mb(){if(l4)return pS;l4=1,Object.defineProperty(pS,"__esModule",{value:!0});var x=jx(),M=n5();const k=function(F,B,G,E){let A,u,o;return{destroyFn:A,component:u,anchorEl:o}=x.mountInstance(F,M.default,{onDestroy:()=>A?.(),...G}),B.appendChild(o),u.doAlign(B,E),u};return pS.openToast=k,pS}var BP={},LP={},u4;function r5(){return u4||(u4=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=df(),k=ht(),F=St();const B=k.defineComponent({name:"SpinInner",components:{SpinIcon:M.default},props:{prefix:{type:String,default:"v-spin"},tip:{type:String,default:void 0},showIcon:{type:Boolean,default:!0}},computed:{textClasses(){return[`${this.prefix}-text`,{"has-icon":this.showIcon}]},wrapClasses(){return[this.prefix]}}});function G(A,u,o,S,_,p){const f=k.resolveComponent("spin-icon");return k.openBlock(),k.createElementBlock("div",{class:k.normalizeClass(A.wrapClasses)},[k.createElementVNode("div",{class:k.normalizeClass(A.textClasses)},[k.renderSlot(A.$slots,"default",{},()=>[k.createTextVNode(k.toDisplayString(A.tip),1)])],2),A.showIcon?k.renderSlot(A.$slots,"icon",{key:0},()=>[k.createVNode(f)]):k.createCommentVNode("",!0)],2)}var E=F.default(B,[["render",G]]);x.default=E}(LP)),LP}var h4;function tv(){return h4||(h4=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Si(),k=r5(),F=ht(),B=St();const G=F.defineComponent({name:"Spin",components:{vSpinInner:k.default},props:{type:{type:String,default:"circle"},maskStyle:{type:Object,default:()=>{}},onlyMask:{type:Boolean,default:!1},spinning:{type:Boolean,default:!1},mask:{type:Boolean,default:!0},delay:{type:Number,default:0},size:{type:String,default:void 0},tip:{type:String,default:void 0},showIcon:{type:Boolean,default:!0}},data(){return{prefix:"v-spin",delayedShow:!1}},computed:{wrapperClass(){return[`${this.prefix}-wrapper`,this.type]}},watch:{spinning(o){o===!0&&(this.delayedShow=!1,this.delayedTimeout())}},mounted(){this.delayedTimeout()},methods:{delayedTimeout(){this.delay>0?window.setTimeout(()=>{this.delayedShow=!0},this.delay):this.delayedShow=!0},getSpinInnerSlots(){return M.getPrefixSlots("inner-",this)}}}),E={key:1,class:"loader-inner"};function A(o,S,_,p,f,y){const d=F.resolveComponent("v-spin-inner");return F.openBlock(),F.createElementBlock("div",{class:F.normalizeClass(o.wrapperClass)},[o.type==="circle"?(F.openBlock(),F.createElementBlock(F.Fragment,{key:0},[F.withDirectives(F.createElementVNode("div",{class:F.normalizeClass(o.prefix+"-wrapper-masking"),style:F.normalizeStyle(o.maskStyle)},null,6),[[F.vShow,o.mask&&o.delayedShow&&o.spinning]]),F.renderSlot(o.$slots,"default"),o.delayedShow&&o.spinning&&!o.onlyMask?F.renderSlot(o.$slots,"spin-inner",{key:0},()=>[F.createVNode(d,{tip:o.tip,prefix:o.prefix,delay:o.delay,"show-icon":o.showIcon},F.createSlots({_:2},[F.renderList(o.getSpinInnerSlots(),v=>{let{name:b,exposeName:s}=v;return{name:b,fn:F.withCtx(l=>[F.renderSlot(o.$slots,s,F.normalizeProps(F.guardReactiveProps(l)))])}})]),1032,["tip","prefix","delay","show-icon"])]):F.createCommentVNode("",!0)],64)):o.type==="large-dots"?(F.openBlock(),F.createElementBlock("div",E)):F.createCommentVNode("",!0)],2)}var u=B.default(G,[["render",A]]);x.default=u}(BP)),BP}var rb={},c4;function X3(){if(c4)return rb;c4=1,Object.defineProperty(rb,"__esModule",{value:!0});var x=rl(),M=Ur(),k=jx(),F=D3(),B=id();function G(A){return x.isServer?null:A.$el?.parentNode}function E(A,u){let{parentApp:o,containerEl:S,onDestroy:_}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},p,f,y,d;const v=s=>{let{payload:l}=s;p.unmount(),_?.({payload:l})};if(A.mount&&A.unmount&&(d=p=A),!p){if(!o)return M.consoleError("parentApp is required when app is not provided"),{app:p,rootComponent:y,win:f};d=p=k.createChildApp(A,u,o)}const b=document.createDocumentFragment();{const s={window:void 0};F.provide(d,B.WINDOW_INJECT_SYMBOL,s),y=p.mount(b),S.appendChild(b),f=s.window,f.setDestroyCallback(v)}return{app:p,rootComponent:y,win:f}}return rb.createWindow=E,rb.getContainerEl=G,rb}var d4;function oT(){return d4||(d4=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Xn(),k=ln(),F=Bg(),B=Ng(),G=Zo(),E=ci(),A=lh(),u=Y3(),o=fr(),S=t5(),_=K3(),p=iT(),f=Kt(),y=Ur(),d=Dr(),v=rl(),b=Mb(),s=tv(),l=kl(),w=X3(),I=Pg(),C=Yl(),h=ff(),c=id(),m=_i(),T=ht();const D=100,O={FIT:"xxs",CENTER:"sm"},N={OWNER:Symbol("owner"),STATUS:Symbol("status")},z={EXTJS:"extjs",VUE:"vue"};function H(P,U){P.removeModalWindow(U),P.unmask(),U.owner=null}var V=T.defineComponent({name:c.WindowName,components:{vResizable:S.default,vDraggable:_.default,vWindowHeader:p.default,vTrapFocus:F.default,vSpin:s.default,vLayout:l.default},mixins:[G.default,u.default,E.default,o.provide("window"),o.provide("adaptive-container-root"),B.useConfigConsumer("window")],inject:{[c.WINDOW_INJECT_SYMBOL]:{default:f.noop}},props:{id:{type:String,default(){return`syno-${A.uuid()}`}},inline:{type:Boolean,default:!1},toggleGrayOverlay:{type:Boolean,default:!0},closable:{type:Boolean,default:!0},minimizable:{type:Boolean,default:!0},maximizable:{type:Boolean,default:!0},width:{type:[String,Number],default:300},height:{type:[String,Number],default:300},minWidth:{type:[String,Number],default:void 0},minHeight:{type:[String,Number],default:void 0},maxWidth:{type:[String,Number],default:void 0},maxHeight:{type:[String,Number],default:void 0},showHelp:{type:Boolean,default:!1},showMinimize:{type:Boolean,default:!0},showMaximize:{type:Boolean,default:!0},showFullscreen:{type:Boolean,default:!1},showClose:{type:Boolean,default:!0},beforeClose:{type:Function,default:f.noop},beforeMinimize:{type:Function,default:f.noop},beforeMaximize:{type:Function,default:f.noop},maximizeHook:{type:Function,default:f.noop},minimizeHook:{type:Function,default:f.noop},restoreHook:{type:Function,default:f.noop},fullscreenHook:{type:Function,default:f.noop},closeHook:{type:Function,default:f.noop},title:{type:String,default:void 0},resizable:{type:Boolean,default:!1},resizeHandles:{type:String,default:"all"},draggable:{type:Boolean,default:!0},helpParams:{type:String,default:void 0},alwaysOnTop:{type:[Boolean,Function],default:!1},isSkipActive:{type:[Boolean,Function],default:!1},customCls:{type:String,default:""},type:{type:String,validator(P){return["launch","component"].includes(P)},default:"launch"},layoutType:{type:String,default:"none"},layoutOrder:{type:Number,default:0},mobileBreakpoint:{type:[String,Boolean,Object],default:()=>({fit:O.FIT,center:O.CENTER})},stickyCenter:{type:Boolean,default:!1},defaultFocus:{type:Boolean,default:!0},closeByEscKey:{type:Boolean,default:!0}},emits:["resize","close","zindex-changed","window-resize","hide","maximize","restore"],data(){return{name:void 0,prefixCls:"v-window",closeDisabled:!1,isFit:!1,currentTitle:void 0,initialized:!1,iconUrl:void 0,formalTitle:void 0,top:0,left:0,currentWidth:0,currentHeight:0,dragging:!1,hidden:!0,maximized:!1,noShadow:!1,autoWidth:!1,autoHeight:!1,isMobile:!1,isStandalone:!1,isFullsize:!1,isStandaloneMainWindow:!1,lastFocusElement:v.isServer?null:document.activeElement,forceAlwaysOnTop:!1,containerMasked:!1,constrainRect:{left:0,right:0,bottom:0,top:0},maskStack:[],statusMaskInfo:{opacity:void 0,text:this._i18n("common","loading")},maskInfo:{opacity:void 0,text:this._i18n("common","loading")},onDestroy:f.noop,svc:!0}},computed:{isLastMaskByOwner(){return this.lastMaskLayer?.type===N.OWNER},lastMaskLayer(){return this.maskStack[this.maskStack.length-1]},innerConfigConsumer(){return this.configConsumer||this.name},innerDraggable(){return this.getConfigValue("draggable")},blinkWhenTouched(){return this.isLastMaskByOwner},showWindow(){return this.isComponentType||!this.hidden&&!this.dragging},maskInnerCls(){return`${this.prefixCls}-mask-inner`},maskCls(){return`${this.prefixCls}-mask`},maskStyle(){return{opacity:this.lastMaskLayer?.opacity,backgroundColor:"#FFFFFF"}},windowCls(){return[this.prefixCls,{"active-win":this.active,"deactive-win":!this.active,"no-shadow":this.noShadow,"is-safari":I.isSafari,"auto-height":this.autoHeight,"mobile-fit":this.inFitBreakpoint}]},headerProps(){return{inMobile:this.inFitBreakpoint,showHelp:this.showHelp,showFullscreen:this.showFullscreen,showMaximize:this.inFitBreakpoint||this.isStandaloneMainWindow?!1:this.showMaximize,showMinimize:this.isStandalone?!1:this.showMinimize,showClose:this.isStandaloneMainWindow?!1:this.showClose,draggable:this.innerDraggable,iconUrl:this.iconUrl,title:this.currentTitle,maximized:this.maximized}},windowProperty(){return{top:this.top,left:this.left,width:this.autoWidth?"auto":this.currentWidth,height:this.autoHeight?"auto":this.currentHeight,minWidth:this.minWidth,minHeight:this.minHeight,maxWidth:this.maxWidth,maxHeight:this.maxHeight,maximized:this.maximized,hidden:this.hidden,constrainRect:this.constrainRect,resizeHandles:this.resizeHandles,isFit:this.isFit}},windowStyle(){const P=this.isFit==="width"||this.isFit==="both",U=this.isFit==="height"||this.isFit==="both";return{position:this.isComponentType?"relative":"absolute",width:!P&&this.autoWidth?"auto":`${this.currentWidth}px`,height:!U&&this.autoHeight?"auto":`${this.currentHeight}px`,minWidth:P?"auto":this.minWidth?`${this.minWidth}px`:!1,minHeight:P?"auto":this.minHeight?`${this.minHeight}px`:!1,maxWidth:U?"none":this.maxWidth?`${this.maxWidth}px`:!1,maxHeight:U?"none":this.maxHeight?`${this.maxHeight}px`:!1,top:`${this.top}px`,left:`${this.left}px`}},isComponentType(){return this.type==="component"},canMinimize(){return this.minimizable},isFixSizeMode(){return this.hidden||!!this.isFit},inFitBreakpoint(){return this.inBreakpoint("fit",O.FIT)},inCenterBreakpoint(){return this.inBreakpoint("center",O.CENTER)},inMobileBreakpoint(){return this.inFitBreakpoint||this.inCenterBreakpoint},isMasking(){return this.maskStack.length>0}},watch:{title:{immediate:!0,handler(P){this.currentTitle=P}},hidden:{async handler(P){P?this.setActive(!1):(this.setActive(!0),this.toFront({focus:this.defaultFocus?"default":!1}),this.afterShow(),await this.$nextTick(),this.setIntrinsicSize())}},width:{immediate:!0,async handler(P){P==="auto"?(this.autoWidth=!0,await this.$nextTick(),this.setIntrinsicWidth()):(this.currentWidth=+P,this.autoWidth=!1)}},height:{immediate:!0,async handler(P){P==="auto"?(this.autoHeight=!0,await this.$nextTick(),this.setIntrinsicHeight()):(this.currentHeight=+P,this.autoHeight=!1)}},isComponentType:{immediate:!0,handler(P){P&&!this.initialized&&this.init()}}},[M.componentHooks.beforeUnmount](){this.modalWins=[],this.messageBox?.doClose(),this.messageBox=null,this.unWindowResize?.(),this.unResize?.(),this.unBreakpointWatch?.()},created(){this.modalWins=[],this[c.WINDOW_INJECT_SYMBOL]&&(this[c.WINDOW_INJECT_SYMBOL].window=this)},async mounted(){const P=m.debounce(()=>{this.onWindowResize(),this.onSticky(),k.$emit(this,"window-resize")},0);this.unResize=C.addResizeListener(this.getWindowEl(),this.onSticky,this),this.unWindowResize=d.on(window,"resize",P),this.unBreakpointWatch=this.$watch(()=>this.$breakpointManager.current,()=>{P()}),await this.$nextTick(),this.initDraggable()},methods:{getWindowEl(){return this.$refs._window?.$el??this.$refs._window},getAdaptiveContainer(){return this.appInstance?.fullsize?document.body:null},setDestroyCallback(P){this.onDestroy=P},registerManager(P){return P?this.manager=P:this.$windowManager.isActive()&&(this.manager=this.$windowManager),this.manager?.register(this),()=>{this.manager?.unregister(this)}},pushModalWindow(P){this.modalWins.push(P)},inBreakpoint(P,U){return!this.$breakpointManager&&this.mobileBreakpoint?(y.remind("please import and use BreakpointManagerPlugin when you are in tree-shaking mode or breakpoint will not active."),!1):f.isString(this.mobileBreakpoint)?this.mobileBreakpoint&&this.$breakpointManager?.lessAndEqThan(this.mobileBreakpoint):f.isObject(this.mobileBreakpoint)?this.mobileBreakpoint?.[P]!==!1&&this.$breakpointManager?.lessAndEqThan(this.mobileBreakpoint?.[P]??U):this.mobileBreakpoint},init(P,U){this.constrainRect=this.getConstrainRect(),this.initialized=!0,this.appInstance=U},getConstrainRect(){const P=w.getContainerEl(this);if(!P)return{top:0,left:0,bottom:0,right:0};const{top:U,left:Y,bottom:Z,right:X}=P.getBoundingClientRect();return{top:U,left:Y,bottom:Z,right:X}},async doBreakpointFit(){this.inFitBreakpoint?await this.fitContainerWithTaskbar():this.inCenterBreakpoint&&await this.fitContainer({padding:[this.manager.densePadding,0],fit:"width",pos:"center"})},onSticky(){this.stickyCenter&&this.alignCenterToContainer()},onWindowResize(){this.isComponentType||(this.isFullsize?this.fitContainer():this.maximized?this.fitContainerWithTaskbar():this.inMobileBreakpoint?this.doBreakpointFit():(this.doConstrain(),this.restoreSizePos()))},setIntrinsicSize(){this.setIntrinsicHeight(),this.setIntrinsicWidth()},setIntrinsicHeight(){this.isFixSizeMode||(this.currentHeight=this.getWindowEl().offsetHeight)},setIntrinsicWidth(){this.isFixSizeMode||(this.currentWidth=this.getWindowEl().offsetWidth)},doUnmaskContainer(){this.manager.unmaskContainer&&this.manager.unmaskContainer(this.id),this.containerMasked=!1},doMaskContainer(P){this.manager.maskContainer&&this.manager.maskContainer(this.id,P),this.containerMasked=!0},tryConstrainHeight(P){let{isFullsize:U=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const Y=this.getCurrentHeight();let Z=this.getFullHeight(P,{withinTaskbar:U});Z<this.minHeight&&(Z=this.minHeight),this.constrainHeight(Z,Y)},constrainHeight(P,U){this.hidden||U>P&&(this.autoHeight=!1,this.currentHeight=P)},doConstrain(){let P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:w.getContainerEl(this);const U=this.$alignManager.getConstrainToXY(P,this.getWindowEl());f.isArray(U)&&(U[0]!==this.left||U[1]!==this.top)&&this.setPosition(U[0],U[1]),this.tryConstrainHeight(P,{isFullsize:!0})},getCurrentWidth(){const P=this.getWindowEl();return this.autoWidth===!0?P?.offsetWidth:this.currentWidth},getCurrentHeight(){const P=this.getWindowEl();return this.autoHeight===!0?P?.offsetHeight:this.currentHeight},setForceAlwaysOnTop(P){this.forceAlwaysOnTop=P},isAlwaysOnTop(){return this.forceAlwaysOnTop?!0:f.isBoolean(this.alwaysOnTop)?this.alwaysOnTop:this.alwaysOnTop()},initDraggable(){this.broadcast("Draggable","window.header",this.$refs.header)},setDragging(P){this.dragging=P},onDragEnd(P){let{top:U,left:Y}=P;this.top=U,this.left=Y},onResizeEnd(P){let{top:U,left:Y,width:Z,height:X}=P;this.currentWidth=Z,this.currentHeight=X,this.autoWidth=!1,this.autoHeight=!1,this.top=U,this.left=Y,k.$emit(this,"resize",{top:U,left:Y,width:Z,height:X}),this.$nextTick(()=>{k.$emit(this,"window-resize")})},async onEsc(P){return this.closeByEscKey?(P.stopPropagation(),P.preventDefault(),this.onClose()):!1},async onClose(){let{forceClose:P=!1,payload:U={}}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(this.closable===!1||P!==!0&&await this.beforeClose()===!1)return!1;await this.doClose({payload:U})},whenClosed(){return this._closedDefer=this._closedDefer||new Promise((P,U)=>{this._closedResolver=P})},async doClose(){let{payload:P={}}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(this.closeHook(),await this.onMinimize()===!1){this.hidden=!0;for(let U of this.modalWins)U.onMinimize();k.$emit(this,"hide")}k.$emit(this,"close",{payload:P}),this._closedResolver?.(P),this.onDestroy?.({payload:P})},async onMinimize(){if(this.isStandalone||!this.canMinimize||await this.beforeMinimize()===!1)return!1;this.minimizeHook(),this.hidden=!0,k.$emit(this,"hide"),h.getSYNO()?.SDS?.StatusNotifier&&h.getSYNO()?.SDS.StatusNotifier.fireEvent("windowMinimize",this);for(let P of this.modalWins)P.hideForMinimize=!0,P.onMinimize()},onFullsize(){this.left=0,this.top=0,this.isFullsize=!0,this.fitContainer()},doMaximize(){this.inFitBreakpoint||this.isStandaloneMainWindow||this.onMaximize()},doMinimize(){this.onMinimize()},doFullscreen(){this.onFullscreen()},doRestore(){this.inFitBreakpoint||this.isStandaloneMainWindow||this.onRestore()},onMaximize(){this.maximizable&&this.beforeMaximize()!==!1&&(this.maximizeHook(),!this.maximized&&(this.fitContainerWithTaskbar(),this.maximized=!0,h.getSYNO()?.SDS?.StatusNotifier&&h.getSYNO()?.SDS.StatusNotifier.fireEvent("windowBeforeMaximize",this),k.$emit(this,"maximize"),this.$nextTick(()=>{k.$emit(this,"window-resize")})))},getFullHeight(P){let{withinTaskbar:U=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const Y=P.clientHeight;return!U&&h.getSYNO()?.SDS?.TaskBar?.height?Y-h.getSYNO()?.SDS.TaskBar.height():Y},fitContainerWithTaskbar(){let U=0;h.getSYNO()?.SDS?.TaskBar&&(U=h.getSYNO()?.SDS.TaskBar.height()),this.fitContainer({pos:[0,U]})},storeSizeAndPos(){this._storeSizeAndPosProps={width:this.currentWidth,height:this.currentHeight,top:this.top,left:this.left}},getStoreSizeAndPos(){return this._storeSizeAndPosProps},async fitContainer(){let{padding:P=[0,0],pos:U="center",fit:Y="both"}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const Z=w.getContainerEl(this);this.isFit||this.storeSizeAndPos(),this.isFit=Y,f.isArray(U)&&(this.left=U[0],this.top=U[1]);const X=Y==="both"||Y==="width",J=Y==="both"||Y==="height";X?(this.currentWidth=Z.clientWidth-P[0]*2,f.isArray(U)&&(this.currentWidth-=U[0])):this.currentWidth=this.getStoreSizeAndPos().width,J?(this.currentHeight=Z.clientHeight-P[1]*2,f.isArray(U)&&(this.currentHeight-=U[1])):this.currentHeight=this.getStoreSizeAndPos().height,await this.$nextTick(),U==="center"&&this.alignCenterToContainer(),await this.$nextTick()},restoreSizePos(){const P=this.getStoreSizeAndPos();if(this.isFit&&P){const{width:U,height:Y,top:Z,left:X}=P;this.currentWidth=U,this.currentHeight=Y,this.top=Z,this.left=X}this.isFit=!1},onHelp(){},onRestore(){this.isStandalone||(this.restoreHook(),this.restoreSizePos(),this.maximized=!1,h.getSYNO()?.SDS?.StatusNotifier&&h.getSYNO()?.SDS.StatusNotifier.fireEvent("windowRestore",this),k.$emit(this,"restore"),this.$nextTick(()=>{k.$emit(this,"window-resize")}))},onFullscreen(){this.fullscreenHook()},getStateParam:function(){let P={};return(this.maximized||this.hidden)&&(P.maximized=this.maximized,P.minimized=this.hidden),P},setStatus(P,U){const Y=this.maskStack.findIndex(Z=>Z.type===N.STATUS);Y!==-1&&this.maskStack.splice(Y,1),this.maskStack.push({opacity:P,text:U,type:N.STATUS})},setStatusBusy(P,U){P=f.isNumber(P)?P:.4,U=U||this._i18n("common","loading"),this.setStatus(P,U)},clearStatus(){const P=this.maskStack.findIndex(U=>U.type===N.STATUS);P!==-1&&this.maskStack.splice(P,1)},mask(P){this.maskStack.push({opacity:P,text:void 0,type:N.OWNER})},unmask(){const P=this.maskStack.findLastIndex(U=>U.type===N.OWNER);P!==-1&&this.maskStack.splice(P,1)},onMaskMouseDown(){this.blinkWhenTouched&&this.blinkModalChild()},blinkModalChild(){if(!this.manager)return;this.modalWins.sort(this.manager.sortWindows);let P=this.modalWins[this.modalWins.length-1];if(!P){this.modal&&(this.toFront({focus:"force"}),this.blinkShadow(3));return}P.blinkModalChild()},blinkShadow(P){P<=0||(this.noShadow=!0,window.setTimeout(()=>{this.noShadow=!1,window.setTimeout(()=>{this.blinkShadow(--P)},D)},D))},openWindow(P){let U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.lastFocusElement=document.activeElement,h.getExtjs()&&P instanceof h.getExtjs().Window)return P.owner=this,{type:z.EXTJS,...this.openExtWindow(P)};const{win:Z,app:X,rootComponent:J}=w.createWindow(P,U,{parentApp:this.$.appContext.app,containerEl:this.getMountEl(),onDestroy:q=>{this.lastFocusElement?.focus?.(),Y?.onDestroy?.(q)},...Y});return h.getSYNO()?.SDS?.Desktop&&J&&h.getSYNO()?.SDS.Desktop.appendChild(J),this.alwaysOnTop&&Z.setForceAlwaysOnTop(!0),Z.setOwner(this),Z.init(this.manager,this.instance,Y),{window:Z,component:J,app:X,type:z.VUE}},onExtWindowHide(P){P.hideForMinimize||H(this,P),this.lastFocusElement&&this.lastFocusElement.focus()},onExtWindowDestroy(P){H(this,P),this.lastFocusElement&&this.lastFocusElement.focus()},onExtWindowShow(P){P.owner||(P.owner=this),this.modalWins.includes(P)||this.pushModalWindow(P),this.isLastMaskByOwner||this.mask(0)},openExtWindow(P){return this.lastFocusElement=document.activeElement,P.on("beforedestroy",()=>{this.onExtWindowDestroy(P)}),P.on("show",()=>{this.onExtWindowShow(P)}),P.on("hide",()=>{this.onExtWindowHide(P)}),P.alignTo(this.getWindowEl(),"c-c"),P.onOpenByVue(),{window:P}},openModalWindow(P){let U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Y=arguments.length>2?arguments[2]:void 0;this.lastFocusElement=document.activeElement;let Z=this.openWindow(P,U,Y);return Z.type===z.VUE&&this.pushModalWindow(Z.window),Z},removeModalWindow(P){let U=this.modalWins.indexOf(P);U!==-1&&this.modalWins.splice(U,1)},alignCenterToContainer(){let P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[0,0];const U=w.getContainerEl(this);this.alignCenterToElement(U,U,P)},alignToElement(P,U,Y){let Z=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},X=arguments.length>4&&arguments[4]!==void 0?arguments[4]:w.getContainerEl(this);const J=this.getWindowEl().getBoundingClientRect();J.width=this.autoWidth?J.width:this.currentWidth,J.height=this.autoHeight?J.height:this.currentHeight;const q=this.$alignManager.getAlignToXYv2(J,P,U,Y,!0,!0,X,Z);this.left=q.x,this.top=q.y,T.nextTick(()=>{this.doConstrain(X)})},alignCenterToElement(P){let U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:w.getContainerEl(this),Y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[0,0];this.alignToElement(P,"c->c",Y,U)},getMsgBox(P){let U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.messageBox?this.messageBox:(P=P||this.$messageWindow,this.messageBox=this.openWindow(P,{synoId:`${this.synoId}-msgbox`,...U},Y).window,this.pushModalWindow(this.messageBox),this.messageBox)},showAboutWindow(){let P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},U,Y;if(P.className)try{U=h.getSYNO()?.SDS.Config.FnMap[P.className].config}catch{throw new Error(`Failed to get jsConfig of ${P.className}`)}else U=this.jsConfig;if(!U)throw new Error("Cannot find jsConfig");try{Y=h.getSYNO()?.SDS.UIFeatures.IconSizeManager.getIconPath(`${encodeURI(U.jsBaseURL)}/${U.icon||U.icon_32}`,"desktop")}catch{throw new Error("Failed to get icon path")}const Z=window._S,X=this.openWindow(this.$aboutWindow,{name:U.title,customName:Array.isArray(U.customAboutTitle)?U.customAboutTitle:null,icon:Y,copyrightYear:U.buildTime?U.buildTime.split("-")[0]:Z&&Z("builddate")?Z("builddate").split("/")[0]:"",desc:P.desc,isBeta:P.isBeta,swapNameAndDesc:P.swapNameAndDesc}).window;this.pushModalWindow(X)},setZIndex(P){const U=this.getWindowEl();U&&d.css(U,"zIndex",`${P}`),k.$emit(this,"zindex-changed",P)},getZIndex(){const P=this.getWindowEl();return P?d.css(P,"zIndex"):0},getToastBox(P){let U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const Z=this.getWindowEl();return U=m.merge({text:P},U),b.openToast(this.$.appContext.app,Z,U,m.merge({constrainMode:!1,absoluteMode:!1,anchorEl:Z,offset:c.toastOffset,align:"t->t"},Y))},open(){this.show()}}});x.default=V}(EP)),EP}var FP={},VP={},f4;function nv(){return f4||(f4=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Xn(),k=oT(),F=kl(),B=Kt(),G=ff(),E=ht(),A=St(),u=id();const o=E.defineComponent({name:u.ModalWindowName,components:{vLayout:F.default},extends:k.default,props:{minimizable:{type:Boolean,default:!0},maximizable:{type:Boolean,default:!1},showHelp:{type:Boolean,default:!1},showMinimize:{type:Boolean,default:!1},showMaximize:{type:Boolean,default:!1},showFullscreen:{type:Boolean,default:!1},showClose:{type:Boolean,default:!0},maskContainer:{type:[Boolean,Object],default:!0},headerCls:{type:String,default:""},bodyCls:{type:String,default:""},darkTheme:{type:Boolean,default:!1},showHeader:{type:Boolean,default:!0},layoutType:{type:String,default:"modal"}},data:()=>({modal:!0,hidden:!0,ownerMasked:!1,isExtOwner:!1,ownerMinimizable:!1,autoAlignAfterInit:!0}),computed:{extendedBodyCls(){return[this.prefixCls+"-body",this.bodyCls]},canMinimize(){return this.minimizable||this.ownerMinimizable}},[M.componentHooks.beforeUnmount](){this.manager&&this.containerMasked&&this.doUnmaskContainer(),this.unregisterManager?.()},methods:{init(y,d){let v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.unregisterManager=this.registerManager(y),this.maskOwner(),this.hidden=!1,this.isComponentType||E.nextTick(()=>{this.align(v.align??{}),E.nextTick(()=>this.onWindowResize())}),k.default.methods.init.apply(this,arguments)},maskOwner(){if(!this.isComponentType){if(!this.owner){this.manager&&this.maskContainer&&this.doMaskContainer(B.isObject(this.maskContainer)?this.maskContainer:void 0);return}this.owner.mask(0,null,null,!0),this.ownerMasked=!0}},align(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},d;this.isExtOwner&&this.owner.el.dom?d=this.owner.el.dom:this.owner&&this.owner.$el&&(d=this.owner.$el);const v=y.el??d,b=y.anchor??"c->c",s=y.offset??[0,0];this.alignToElement(v,b,s,y)},alignCenterToOwner(){let y;if(this.isExtOwner&&this.owner.el.dom?y=this.owner.el.dom:this.owner&&this.owner.$el&&(y=this.owner.$el),y)return this.alignCenterToElement(y)},setOwner(y){G.getExtjs()?.Window&&y instanceof G.getExtjs().Window&&(this.isExtOwner=!0),this.ownerMinimizable=y.minimizable,this.owner=y},hideFromOwner(){return this.owner?(this.isExtOwner?this.owner?.modalWin?.remove?.(this):this.owner?.removeModalWindow?.(this),this.ownerMasked&&(this.owner.unmask(!0),this.ownerMasked=!1),!0):!1},async doClose(){this.hideFromOwner()&&(this.owner=null),await k.default.methods.doClose.apply(this,arguments)},hasOwnerWin(y){let d=this;for(;d;){if(d===y)return!0;d=d.owner}return!1},setZIndex(y){k.default.methods.setZIndex.apply(this,arguments)}}}),S=["aria-label"],_={class:"focus-last-alert",tabindex:"0",role:"alert"};function p(y,d,v,b,s,l){const w=E.resolveComponent("v-window-header"),I=E.resolveComponent("v-trap-focus"),C=E.resolveComponent("v-resizable"),h=E.resolveComponent("v-draggable"),c=E.resolveComponent("v-spin"),m=E.resolveComponent("v-layout"),T=E.resolveDirective("syno-id");return E.withDirectives((E.openBlock(),E.createBlock(m,{class:E.normalizeClass(y.windowCls),style:E.normalizeStyle(y.windowStyle),ref:"_window",onMousedown:d[1]||(d[1]=D=>y.toFront()),onKeydown:E.withKeys(y.onEsc,["native","esc"]),type:`window.${y.layoutType}`,order:y.layoutOrder},{default:E.withCtx(()=>[E.renderSlot(y.$slots,"fullsize-window-mask"),y.showHeader?(E.openBlock(),E.createBlock(w,E.mergeProps({key:0,ref:"header"},y.headerProps,{onClose:y.onClose,onMinimize:y.onMinimize,onMaximize:y.onMaximize,onFullscreen:y.onFullscreen,onRestore:y.onRestore,"is-modalized":"","show-app-icon":!1,class:y.headerCls,"dark-theme":y.darkTheme}),null,16,["onClose","onMinimize","onMaximize","onFullscreen","onRestore","class","dark-theme"])):E.createCommentVNode("",!0),E.createVNode(I,{class:E.normalizeClass(y.extendedBodyCls),ref:"trapFocus"},{"alert-last":E.withCtx(()=>[E.createElementVNode("div",_,E.toDisplayString(y._i18n("desktop","window_last_hint")),1)]),default:E.withCtx(()=>[E.createElementVNode("div",{class:"v-trap-focus-indicator",tabindex:"0",role:"dialog","aria-label":y.currentTitle},null,8,S),E.renderSlot(y.$slots,"default")]),_:3},8,["class"]),y.resizable?(E.openBlock(),E.createBlock(C,{key:1,"window-property":y.windowProperty,onResizeEnd:y.onResizeEnd},null,8,["window-property","onResizeEnd"])):E.createCommentVNode("",!0),y.innerDraggable&&!y.isComponentType?(E.openBlock(),E.createBlock(h,{key:2,"window-property":y.windowProperty,onDragging:y.setDragging,onDragEnd:y.onDragEnd},null,8,["window-property","onDragging","onDragEnd"])):E.createCommentVNode("",!0),y.isMasking?(E.openBlock(),E.createElementBlock("div",{key:3,onMousedown:d[0]||(d[0]=E.withModifiers(function(){return y.onMaskMouseDown&&y.onMaskMouseDown(...arguments)},["stop"])),class:E.normalizeClass(y.maskCls)},[E.createVNode(c,{"only-mask":!y.lastMaskLayer.text,tip:y.lastMaskLayer.text,spinning:y.isMasking,"mask-style":y.maskStyle},null,8,["only-mask","tip","spinning","mask-style"])],34)):E.createCommentVNode("",!0)]),_:3},8,["class","style","onKeydown","type","order"])),[[E.vShow,y.showWindow],[T]])}var f=A.default(o,[["render",p]]);x.default=f}(VP)),VP}var HP={},Uc={},g4;function J3(){if(g4)return Uc;g4=1,Object.defineProperty(Uc,"__esModule",{value:!0});var x=gn(),M=ed(),k=Ur(),F=td(),B=ac();const G={icon:{type:B.definePropType(Object),default:()=>({})},hasPopupContainer:{type:B.definePropType(Object),default:()=>({})},window:{type:B.definePropType(Object),default:()=>({})},tabs:{type:B.definePropType(Object),default:()=>({})},dataTable:{type:B.definePropType(Object),default:()=>({})}};class E{constructor(S){let{props:_}=S;this.props=_??{}}}const A=F.makeSymbol("configManager");Uc.useConfigManager=()=>{k.consoleError("you are not install ConfigManagerPlugin yet, please install it first")};const u=x.makePlugin({},function(o){let S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Uc.useConfigManager=M.makeManager(o,"$configManager",new E(S),A)});return Uc.ConfigManager=E,Uc.ConfigManagerPlugin=u,Uc.configProps=G,Uc.configSymbol=A,Uc}var p4;function i5(){return p4||(p4=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=fr(),k=J3(),F=Si(),B=ht(),E=B.defineComponent({name:"ConfigProvider",mixins:[M.provide("config-provider")],props:k.configProps,render(){return F.getSlots(this).default?.()}});x.default=E}(HP)),HP}var m4;function o5(){return m4||(m4=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=nv(),k=df(),F=ci(),B=vr(),G=kr(),E=Kt(),A=Rb(),u=ff(),o=i5(),S=ht(),_=St();B.register("about-beta-label-blue",G.vIconBetaLabelBlue),B.register("about-tick-blue",G.vIconAboutTickBlue);const p={FETCHING:Symbol("fetching"),UPDATE_AVAILABLE:Symbol("update_available"),FAILED:Symbol("failed"),UP_TO_DATE:Symbol("up_to_date"),UNKNOWN:Symbol("unknown")},f=S.defineComponent({name:"AboutWindowV2",components:{vSpinIcon:k.default,vConfigProvider:o.default},extends:M.default,mixins:[F.default,B.default],props:{width:{type:[String,Number],default:700},height:{type:[String,Number],default:"auto"},draggable:{type:Boolean,default:!1},maskContainer:{type:[Boolean,Object],default:!0},tagline:{type:String,default:""},icon:{type:String,default:""},copyrightYear:{type:String,default:new Date().getFullYear().toString()},tosUrl:{type:String,default:"https://www.synology.com/company/legal"},privacyUrl:{type:String,default:"https://www.synology.com/company/legal/privacy"},beta:{type:Boolean,default:!1},title:{type:String,default:""},subscript:{type:[Boolean,String],default:!1},subTitle:{type:[Boolean,String],default:!1},version:{type:String,default:""},fetchVersion:{type:Function,default:E.noop},releaseNotesUrl:{type:String,default:""}},data(){return{fetchStatus:p.FETCHING,iconConfig:{all:{value:{type:"svg"}}}}},computed:{isFetchFailed(){return this.fetchStatus===p.FAILED},isFetching(){return this.fetchStatus===p.FETCHING},isUpToDate(){return this.fetchStatus===p.UP_TO_DATE},isUpdateAvailable(){return this.fetchStatus===p.UPDATE_AVAILABLE},versionStatusText(){return this.fetchStatus===p.FETCHING?`${this._i18n("about","check_for_update")}`:this.fetchStatus==p.UPDATE_AVAILABLE?this._i18n("about","update_available"):this.fetchStatus==p.FAILED?"":this.fetchStatus==p.UP_TO_DATE?this._i18n("about","update_up_to_date"):""},aboutWindowCls(){return["v-about-window-v2",...this.windowCls]},aboutHeaderProps(){return{...this.headerProps,title:""}},iconStyle(){return{backgroundImage:this.icon?`url(${this.icon})`:""}},aboutMaskContainer(){return this.maskContainer?{...this.maskContainer,maskCls:["v-about-window-v2-mask"]}:!1}},mounted(){this.hasVersionInfo()&&this.tryFetching()},methods:{async tryFetching(){const{newVersion:q,betaVersion:te}=await this.fetchVersion?.()??{};let re=null;q&&te?re=u.comparePackageVersion(">",q,te)?q:te:re=q??te,re?u.comparePackageVersion(">",re,this.version)?this.fetchStatus=p.UPDATE_AVAILABLE:u.comparePackageVersion("<=",re,this.version)?this.fetchStatus=p.UP_TO_DATE:this.fetchStatus=p.UNKNOWN:this.fetchStatus=p.FAILED},hasVersionInfo(){return A.default?._S?.("is_admin")},maskOwner(){this.isComponentType||this.manager&&this.maskContainer&&this.doMaskContainer(this.aboutMaskContainer)}}}),y=["aria-label"],d={class:"v-about-window-v2-body-wrapper"},v={class:"page-wrapper"},b={class:"icon-wrapper"},s={class:"content-wrapper"},l={class:"title-wrapper"},w={class:"title"},I={key:0,class:"subscript"},C={class:"badge-wrapper"},h={key:0,class:"sub-title"},c={key:1,class:"version-wrapper"},m={key:0,class:"version-status"},T={class:"version-num"},D=["href"],O={class:"tagline-wrapper"},N=S.createElementVNode("div",{class:"divider"},null,-1),z={class:"footer-wrapper"},H={class:"footer-content"},$={class:"content-row"},V=["href"],P=S.createElementVNode("i",{class:"ellipsis"},null,-1),U=["href"],Y={class:"content-row copyright"},Z={class:"focus-last-alert",tabindex:"0",role:"alert"};function X(q,te,re,ie,ne,le){const fe=S.resolveComponent("v-window-header"),we=S.resolveComponent("v-icon"),pe=S.resolveComponent("v-whitetip"),ve=S.resolveComponent("v-spin-icon"),be=S.resolveComponent("v-trap-focus"),Ee=S.resolveComponent("v-resizable"),Re=S.resolveComponent("v-draggable"),Ne=S.resolveComponent("v-spin"),Le=S.resolveComponent("v-layout"),Se=S.resolveComponent("v-config-provider"),Ie=S.resolveDirective("syno-id");return S.openBlock(),S.createBlock(Se,{icon:q.iconConfig},{default:S.withCtx(()=>[S.withDirectives((S.openBlock(),S.createBlock(Le,{class:S.normalizeClass(q.aboutWindowCls),style:S.normalizeStyle(q.windowStyle),ref:"_window",onMousedown:te[1]||(te[1]=_e=>q.toFront()),onKeydown:S.withKeys(q.onEsc,["native","esc"]),type:`window.${q.layoutType}`,order:q.layoutOrder},{default:S.withCtx(()=>[q.showHeader?(S.openBlock(),S.createBlock(fe,S.mergeProps({key:0,ref:"header"},q.aboutHeaderProps,{onClose:q.onClose,onMinimize:q.onMinimize,onMaximize:q.onMaximize,onFullscreen:q.onFullscreen,onRestore:q.onRestore,"is-modalized":"","show-app-icon":!1,class:q.headerCls}),null,16,["onClose","onMinimize","onMaximize","onFullscreen","onRestore","class"])):S.createCommentVNode("",!0),S.createVNode(be,{class:S.normalizeClass(q.extendedBodyCls),ref:"trapFocus"},{"alert-last":S.withCtx(()=>[S.createElementVNode("div",Z,S.toDisplayString(q._i18n("desktop","window_last_hint")),1)]),default:S.withCtx(()=>[S.createElementVNode("div",{class:"v-trap-focus-indicator",tabindex:"0",role:"dialog","aria-label":q.currentTitle},null,8,y),S.createElementVNode("div",d,[S.createElementVNode("div",v,[S.createElementVNode("div",b,[S.createVNode(we,{name:"app-icon",size:[72,72],style:S.normalizeStyle(q.iconStyle),type:"bkg-img","disable-config-override":{type:!0}},null,8,["style"])]),S.createElementVNode("div",s,[S.createElementVNode("div",l,[S.createElementVNode("div",w,[S.createTextVNode(S.toDisplayString(q.title)+" ",1),q.subscript?(S.openBlock(),S.createElementBlock("span",I,S.toDisplayString(q.subscript),1)):S.createCommentVNode("",!0)]),S.createElementVNode("div",C,[S.renderSlot(q.$slots,"badge",{},()=>[q.beta?(S.openBlock(),S.createBlock(we,{key:0,name:"about-beta-label-blue"})):S.createCommentVNode("",!0)])])]),q.subTitle?(S.openBlock(),S.createElementBlock("div",h,S.toDisplayString(q.subTitle),1)):S.createCommentVNode("",!0),q.hasVersionInfo()?(S.openBlock(),S.createElementBlock("div",c,[q.isFetchFailed?S.createCommentVNode("",!0):(S.openBlock(),S.createElementBlock("div",m,[S.createElementVNode("span",null,S.toDisplayString(q.versionStatusText),1),q.isUpdateAvailable?(S.openBlock(),S.createBlock(pe,{key:0,content:q._i18n("about","update_package_tip"),"tooltip-options":{isHtml:!0},size:"small"},null,8,["content"])):q.isUpToDate?(S.openBlock(),S.createBlock(we,{key:1,name:"about-tick-blue"})):q.isFetching?(S.openBlock(),S.createBlock(ve,{key:2,class:"about-window-v2-spin-icon"})):S.createCommentVNode("",!0)])),S.createElementVNode("div",T,[S.createTextVNode(S.toDisplayString(q._i18n("update","version"))+": "+S.toDisplayString(q.version)+" (",1),S.createElementVNode("a",{class:"release-notes link",href:q.releaseNotesUrl,target:"_blank"},S.toDisplayString(q._i18n("update","update_dsm_release_note")),9,D),S.createTextVNode(") ")])])):S.createCommentVNode("",!0),S.createElementVNode("div",O,S.toDisplayString(q.tagline),1)])]),N,S.createElementVNode("div",z,[S.createElementVNode("div",H,[S.createElementVNode("div",$,[S.createElementVNode("a",{class:"link terms",href:q.tosUrl,target:"_blank"},S.toDisplayString(q._i18n("common","terms_of_service")),9,V),P,S.createElementVNode("a",{class:"link privacy",href:q.privacyUrl,target:"_blank"},S.toDisplayString(q._i18n("common","privacy_statements")),9,U)]),S.createElementVNode("div",Y,S.toDisplayString(q._i18n("copyright","copyright").replace("{0}",q.copyrightYear)),1)])])])]),_:3},8,["class"]),q.resizable?(S.openBlock(),S.createBlock(Ee,{key:1,"window-property":q.windowProperty,onResizeEnd:q.onResizeEnd},null,8,["window-property","onResizeEnd"])):S.createCommentVNode("",!0),q.innerDraggable&&!q.isComponentType?(S.openBlock(),S.createBlock(Re,{key:2,"window-property":q.windowProperty,onDragging:q.setDragging,onDragEnd:q.onDragEnd},null,8,["window-property","onDragging","onDragEnd"])):S.createCommentVNode("",!0),q.isMasking?(S.openBlock(),S.createElementBlock("div",{key:3,onMousedown:te[0]||(te[0]=S.withModifiers(function(){return q.onMaskMouseDown&&q.onMaskMouseDown(...arguments)},["stop"])),class:S.normalizeClass(q.maskCls)},[S.createVNode(Ne,{"only-mask":!q.lastMaskLayer.text,tip:q.lastMaskLayer.text,spinning:q.isMasking,"mask-style":q.maskStyle},null,8,["only-mask","tip","spinning","mask-style"])],34)):S.createCommentVNode("",!0)]),_:3},8,["class","style","onKeydown","type","order"])),[[S.vShow,q.showWindow],[Ie]])]),_:3},8,["icon"])}var J=_.default(f,[["render",X]]);x.default=J}(FP)),FP}var $P={},v4;function a5(){return v4||(v4=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=ln(),k=iT(),F=rT(),B=vr(),G=Rb(),E=kr(),A=ht(),u=St();B.register("app-window-header-hamburger",E.vIconHamburger);const o=A.defineComponent({name:"AppWindowHeader",components:{vWindowHeaderToolWrapper:F.default},extends:k.default,mixins:[B.default],props:{isStandalone:{type:Boolean,default:!1},showHamburgerIcon:{type:Boolean,default:!1}},emits:["help","fullscreen","minimize","restore","maximize","close","click-hamburger-icon"],data:()=>({user:""}),computed:{wrapperCls(){return[`${this.prefixCls}-wrapper`,{standalone:this.isStandalone,"modal-win":this.isModalized,"wizard-win":this.isWizard,draggable:this.draggable,mobile:this.inMobile}]}},mounted(){this.user=G.default._S?.("user")},methods:{isLogoutVisible(){return G.default._S?.("rewrite_mode")&&this.showHelp},isBannerVisible(){return!this.isStandalone||G.default._S?.("remove_banner")!=="true"},isHelpVisibleInTool(){return this.isStandalone?!1:this.showHelp},onLogout(){SYNO.SDS.StatusNotifier.fireEvent("logout"),window.onbeforeunload=SYNO.SDS.onBasicBeforeUnload;try{SYNO.SDS.Utils.Logout.action()}catch{}},onClickHamburgerIcon(){M.$emit(this,"click-hamburger-icon")}}});function S(p,f,y,d,v,b){const s=A.resolveComponent("v-icon"),l=A.resolveComponent("v-menu-item"),w=A.resolveComponent("v-menu"),I=A.resolveComponent("v-button"),C=A.resolveComponent("v-window-header-tool-wrapper"),h=A.resolveDirective("tooltip");return p.isBannerVisible()?(A.openBlock(),A.createElementBlock("div",{key:0,class:A.normalizeClass(p.wrapperCls),onDblclick:f[7]||(f[7]=function(){return p.onDblClick&&p.onDblClick(...arguments)})},[p.showHamburgerIcon?(A.openBlock(),A.createBlock(s,{key:0,name:"app-window-header-hamburger","svg-icon-set":"set13",onClick:p.onClickHamburgerIcon},null,8,["onClick"])):A.createCommentVNode("",!0),p.showAppIcon?(A.openBlock(),A.createElementBlock("div",{key:1,class:"app-icon",style:A.normalizeStyle(p.iconStyle)},null,4)):A.createCommentVNode("",!0),A.createElementVNode("div",{class:A.normalizeClass(p.prefixCls+"-text")},[A.withDirectives((A.openBlock(),A.createElementBlock("div",{class:A.normalizeClass(p.prefixCls+"-title")},[A.createTextVNode(A.toDisplayString(p.title),1)],2)),[[h,p.titleTooltip]]),A.renderSlot(p.$slots,"sub-title")],2),p.isStandalone?(A.openBlock(),A.createBlock(I,{key:2,type:"dropdown","menu-align":"tr->br",class:"user-menu-btn","syno-id":`${p.synoId}-user-menu-btn`},{dropdown:A.withCtx(()=>[p.isLogoutVisible()||p.showHelp?(A.openBlock(),A.createBlock(w,{key:0,width:"auto","syno-id":`${p.synoId}-user-menu`},{default:A.withCtx(()=>[p.isLogoutVisible()?(A.openBlock(),A.createBlock(l,{key:0,onClick:p.onLogout,title:p.$i18n("common","logout"),"syno-id":`${p.synoId}-user-menu-logout`},null,8,["onClick","title","syno-id"])):A.createCommentVNode("",!0),p.showHelp?(A.openBlock(),A.createBlock(l,{key:1,onClick:f[0]||(f[0]=c=>p.$emit("help")),title:p.$i18n("common","alt_help"),"syno-id":`${p.synoId}-user-menu-help`},null,8,["title","syno-id"])):A.createCommentVNode("",!0)]),_:1},8,["syno-id"])):A.createCommentVNode("",!0)]),default:A.withCtx(()=>[A.createTextVNode(A.toDisplayString(p.user)+" ",1)]),_:1},8,["syno-id"])):A.createCommentVNode("",!0),A.createVNode(C,{"dark-theme":p.darkTheme,"show-fullscreen":p.showFullscreen,"show-help":p.isHelpVisibleInTool(),"show-minimize":p.showMinimize,"show-maximize":p.showMaximize,"show-close":p.showClose,maximized:p.maximized,onFullscreen:f[1]||(f[1]=c=>p.$emit("fullscreen")),onHelp:f[2]||(f[2]=c=>p.$emit("help")),onMinimize:f[3]||(f[3]=c=>p.$emit("minimize")),onRestore:f[4]||(f[4]=c=>p.$emit("restore")),onMaximize:f[5]||(f[5]=c=>p.$emit("maximize")),onClose:f[6]||(f[6]=c=>p.$emit("close"))},null,8,["dark-theme","show-fullscreen","show-help","show-minimize","show-maximize","show-close","maximized"])],34)):A.createCommentVNode("",!0)}var _=u.default(o,[["render",S]]);x.default=_}($P)),$P}var y4;function aT(){return y4||(y4=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Xn(),k=ln(),F=oT(),B=o5(),G=a5(),E=Kt(),A=Ur(),u=kl(),o=fr(),S=Rb(),_=ff(),p=ht(),f=St(),y=id();function d(h){const c=S.default._S?.("builddate");return h.buildTime?h.buildTime.split("-")[0]:c?c.split("/")[0]:0}function v(h){return S.default._S?S.default._S("standalone")&&h&&h.isMainApp:!1}function b(h,c){return h.left<c.left||h.right>c.right?!0:h.top<c.top||h.bottom>c.bottom}const s=p.defineComponent({name:y.AppWindowName,components:{vAppWindowHeader:G.default,vLayout:u.default},extends:F.default,mixins:[o.inject("app-instance")],props:{defaultMaximized:{type:Boolean,default:!1},showHelp:{type:Boolean,default:!0},windowName:{type:String,default:void 0},toggleMinimizable:{type:Boolean,default:!0},hasTaskButton:{type:Boolean,default:!0},layoutType:{type:String,default:"app"},maskContainer:{type:[Boolean,Object],default:!1},showHamburgerIcon:{type:Boolean,default:!1}},emits:["click-hamburger-icon"],data:()=>({moveDirty:!1,resizeDirty:!1,autoRestoreSizePos:!0,isStandaloneMainWindow:!1,top:void 0,left:void 0}),computed:{headerProps(){return{inMobile:this.inMobileBreakpoint,showHelp:this.showHelp,showFullscreen:this.showFullscreen,showMaximize:this.inFitBreakpoint||this.isStandaloneMainWindow?!1:this.showMaximize,showMinimize:this.isStandalone?!1:this.showMinimize,showClose:this.isStandaloneMainWindow?!1:this.showClose,draggable:this.draggable,iconUrl:this.iconUrl,title:this.currentTitle,maximized:this.maximized,isStandalone:this.isStandaloneMainWindow}}},created(){this["app-instance"]?.instance.setAppWindow(this)},[M.componentHooks.beforeUnmount](){this.taskButton&&(this.taskButton.destroy(),this.taskButton=null),this.manager&&this.containerMasked&&this.doUnmaskContainer()},methods:{onClickHamburgerIcon(){k.$emit(this,"click-hamburger-icon")},getInstance(){return this.instance},getJsID(){let h=this.getInstance();if(h)return h.jsConfig.jsID},applySizeAndPos(h,c){const m=!this.isStandalone&&this.getInstance()&&(h.autoStart===!0||h.fromRestore!==!0&&h.autoRestoreSizePos!==!1&&c.autoRestoreSizePos!==!1);c?.alwaysCenter?this.manager.centerWindow(this,{withOffset:!0}):m&&this.applyRestoreSizePos(),h?.autoCenter!==!1?this.centerItIfOutOfBound():this.constrainXYInBound()},init(h,c,m){this.initialized||(this.unregisterManager=this.registerManager(m),this.isStandaloneMainWindow=v(this.getInstance()),this.isStandalone=S.default._S?.("standalone"),this.isMobile=S.default._S?.("isMobile"),this.jsConfig=c,this.autoStart=h?.autoStart,this.toggleMinimizable!==!1&&(this.iconUrl=this.getIcon()),this.isStandaloneMainWindow&&this.applyStandaloneSettings(),this.isMobile&&this.applyMobileSettings(),this.initTaskButton(),this.currentTitle=_.getSYNO()?.SDS?.UIString?.GetLocalizedString?.(h?.title??c?.title,this.getJsID())??h?.title??c?.title,this.hidden=!1,this.initialized=!0,F.default.methods.init.apply(this,[m,this.getInstance()]),this.isComponentType||this.applySizeAndPos(h,c),this.maskContainer&&this.doMaskContainer(E.isObject(this.maskContainer)?this.maskContainer:void 0),this.$nextTick(()=>{this.onWindowResize()}))},constrainXYInBound(){this.top<0?this.top=0:this.top+this.currentHeight>this.constrainRect.bottom&&(this.top=this.constrainRect.bottom-this.currentHeight),this.left<0?this.left=0:this.left+this.currentWidth>this.constrainRect.right&&(this.left=this.constrainRect.right-this.currentWidth)},centerItIfOutOfBound(){let h={top:this.top,left:this.left,bottom:this.top+this.currentHeight,right:this.left+this.currentWidth};this.manager&&b(h,this.constrainRect)&&this.manager.centerWindow(this)},initTaskButton(){this.getInstance()?.getJsConfig()?.hideTaskBtn!==!0&&!S.default._S?.("standalone")&&this.toggleMinimizable&&this.hasTaskButton&&(this.taskButton=this.getInstance()?.taskButton,this.taskButton&&(this.taskButton.init(this),this.taskButton.setState("deactive")))},setParams(h,c,m){this.autoRestoreSizePos=E.isDefined(h.autoRestoreSizePos)?h.autoRestoreSizePos:this.autoRestoreSizePos,this.initialized||this.init(h,c,m)},applyFavIcon(){const h=["FavHeaderV7_small","FavHeaderV7_medium","FavHeaderV7_large"];for(const c of h){const m=this.getIcon(c),T=SYNO.SDS.UIFeatures.IconSizeManager.getRes(c);SYNO.SDS.Utils.addFavIconLink(m,"image/png",`${T}x${T}`)}},applyStandaloneSettings(){this.applyFavIcon(),this.onMaximize()},applyMobileSettings(){this.onMaximize()},getIcon(h){const c=this.jsConfig?.icon||this.jsConfig?.icon_16;if(!c||!SYNO.SDS.UIFeatures.IconSizeManager)return;let m=this.jsConfig.jsBaseURL+"/"+c;h||(this.isStandalone?h="StandaloneHeader":h="Header");let T=SYNO.SDS.UIFeatures.IconSizeManager.getIconPath(m,h);return this.jsConfig.version&&(T=`${T}&app_version=${this.jsConfig.version}`),T},async onClose(){if(this.isStandalone||await F.default.methods.onClose.apply(this,arguments)===!1)return!1},async doClose(){const h=this.getInstance();await F.default.methods.doClose.apply(this,arguments),h&&h.removeItem(this)},updateTaskButton(h){this.taskButton&&this.taskButton.updateActionState(h)},getSizeAndPosition(){let h={};if(this.maximized){const{width:c,height:m,top:T,left:D}=this.getStoreSizeAndPos();h={width:c,height:m,top:T,left:D}}else h={left:this.left,top:this.top,width:this.currentWidth,height:this.currentHeight};return h},storeSizeAndPos(){const h=this.getInstance().getUserSettings("restoreSizePos")??{},c={width:h.width,height:h.height,top:h.top??h.pageY,left:h.left??h.pageX};this._storeSizeAndPosProps={width:c.width??this.currentWidth,height:c.height??this.currentHeight,top:c.top??this.top,left:c.left??this.left}},saveRestoreData(){let h=this.getInstance().getUserSettings("restoreSizePos"),c=Object.assign(this.getSizeAndPosition(),{fromRestore:!0,maximized:this.maximized});h&&(this.moveDirty?this.moveDirty=!1:(h.pageX&&(c.left=h.pageX),h.pageY&&(c.top=h.pageY)),this.resizeDirty?this.resizeDirty=!1:(h.width&&(c.width=h.width),h.height&&(c.height=h.height))),this.getInstance().setUserSettings("restoreSizePos",c)},applyRestoreSizePos(){let h=this.getInstance().getUserSettings("restoreSizePos")||{};return E.isDefined(this.minWidth)&&E.isDefined(h.width)&&h.width<+this.minWidth&&(h.width=+this.minWidth),E.isDefined(this.minHeight)&&E.isDefined(h.height)&&h.height<+this.minHeight&&(h.height=+this.minHeight),this.resizable&&(h.width&&(this.currentWidth=h.width),h.height&&(this.currentHeight=h.height)),this.getInstance().fullsize?this.onFullsize():!E.isDefined(h.maximized)&&this.defaultMaximized?this.onMaximize():E.isDefined(h.maximized)&&h.maximized?this.onMaximize():h.top&&h.left?(this.top=h.top,this.left=h.left):this.manager.centerWindow(this,{withOffset:!0}),h},restoreSizePos(){const h=this.getStoreSizeAndPos();if(this.isFit&&h){const{width:c,height:m,top:T,left:D}=h;E.isDefined(c)&&E.isDefined(m)?(this.currentWidth=c,this.currentHeight=m):(this.currentWidth=this.width,this.currentHeight=this.height),!E.isDefined(T)&&!E.isDefined(D)?this.manager?.centerWindow(this):(this.top=T,this.left=D)}this.isFit=!1},onDragEnd(){F.default.methods.onDragEnd.apply(this,arguments),this.moveDirty=!0,this.saveRestoreData()},onResizeEnd(){F.default.methods.onResizeEnd.apply(this,arguments),this.resizeDirty=!0,this.saveRestoreData()},onMaximize(){F.default.methods.onMaximize.apply(this,arguments),this.updateTaskButton("maximize")},onMinimize(){S.default._S("standalone")||this.minimizable&&(F.default.methods.onMinimize.apply(this,arguments),this.updateTaskButton("minimize"))},onRestore(){F.default.methods.onRestore.apply(this,arguments),this.updateTaskButton("restore")},doMaximize(){F.default.methods.doMaximize.apply(this,arguments),this.saveRestoreData()},doMinimize(){F.default.methods.doMinimize.apply(this,arguments),this.saveRestoreData()},doRestore(){F.default.methods.doRestore.apply(this,arguments),this.saveRestoreData()},getHelpParams(){let h=this.getJsID(),c=this.helpParams;return E.isString(c)&&c&&(h+=":"+c),h},onHelp(){const h=this.getHelpParams();S.default._S("standalone")?SYNO.SDS.WindowLaunch("SYNO.SDS.HelpBrowser.Application",{topic:h}):SYNO.SDS.AppLaunch("SYNO.SDS.HelpBrowser.Application",{topic:h},!1)},getOpenConfig(){},showAboutWindowV2(){let h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const c=this.getIcon("About"),m=_.getSYNO()?.SDS?.Packages.getPkgId(this.jsConfig.jsID),T=()=>Promise.all([_.requestWebAPI({api:"SYNO.Core.Package.Server",method:"list",version:2,params:{filter_ids:[m]}}),_.requestWebAPI({api:"SYNO.Core.Package.Info",method:"get",version:1})]).then(O=>{let[{packages:N,beta_packages:z},{config:H}]=O;return{newVersion:N?.[0]?.version,betaVersion:H.blBetaChannel?z?.[0]?.version:null}}).catch(O=>(A.consoleError(O),{newVersion:null,betaVersion:null})),D=this.openWindow(B.default,{title:this.currentTitle,icon:c,version:this.jsConfig.version,copyrightYear:d(this.jsConfig),fetchVersion:T,synoId:`${this.jsConfig.jsID}-about-winodw-v2`,...h}).window;this.pushModalWindow(D)}}}),l=["aria-label"],w={class:"focus-last-alert",tabindex:"0",role:"alert"};function I(h,c,m,T,D,O){const N=p.resolveComponent("v-app-window-header"),z=p.resolveComponent("v-trap-focus"),H=p.resolveComponent("v-resizable"),$=p.resolveComponent("v-draggable"),V=p.resolveComponent("v-spin"),P=p.resolveComponent("v-layout"),U=p.resolveDirective("syno-id");return p.withDirectives((p.openBlock(),p.createBlock(P,{class:p.normalizeClass(h.windowCls),style:p.normalizeStyle(h.windowStyle),ref:"_window",onMousedown:c[1]||(c[1]=Y=>h.toFront()),onKeydown:p.withKeys(h.onEsc,["esc","native"]),type:`window.${h.layoutType}`,order:h.layoutOrder},{default:p.withCtx(()=>[p.createVNode(N,p.mergeProps({ref:"header"},h.headerProps,{onClose:h.onClose,onMinimize:h.doMinimize,onMaximize:h.doMaximize,onFullscreen:h.doFullscreen,onRestore:h.doRestore,onHelp:h.onHelp,"syno-id":`${h.synoId}-header`,"show-hamburger-icon":h.showHamburgerIcon,onClickHamburgerIcon:h.onClickHamburgerIcon}),null,16,["onClose","onMinimize","onMaximize","onFullscreen","onRestore","onHelp","syno-id","show-hamburger-icon","onClickHamburgerIcon"]),p.createVNode(z,{ref:"trapFocus",class:p.normalizeClass(h.prefixCls+"-body")},{"alert-last":p.withCtx(()=>[p.createElementVNode("div",w,p.toDisplayString(h._i18n("desktop","window_last_hint")),1)]),default:p.withCtx(()=>[p.createElementVNode("div",{class:"v-trap-focus-indicator",tabindex:"0",role:"application","aria-label":h.currentTitle},null,8,l),p.renderSlot(h.$slots,"default")]),_:3},8,["class"]),h.resizable?(p.openBlock(),p.createBlock(H,{key:0,"window-property":h.windowProperty,onResizeEnd:h.onResizeEnd},null,8,["window-property","onResizeEnd"])):p.createCommentVNode("",!0),h.innerDraggable&&!h.isComponentType?(p.openBlock(),p.createBlock($,{key:1,"window-property":h.windowProperty,onDragging:h.setDragging,onDragEnd:h.onDragEnd},null,8,["window-property","onDragging","onDragEnd"])):p.createCommentVNode("",!0),h.isMasking?(p.openBlock(),p.createElementBlock("div",{key:2,onMousedown:c[0]||(c[0]=p.withModifiers(function(){return h.onMaskMouseDown&&h.onMaskMouseDown(...arguments)},["stop"])),class:p.normalizeClass(h.maskCls)},[p.createVNode(V,{"only-mask":!h.lastMaskLayer.text,tip:h.lastMaskLayer.text,spinning:h.isMasking,"mask-style":h.maskStyle},null,8,["only-mask","tip","spinning","mask-style"])],34)):p.createCommentVNode("",!0),p.renderSlot(h.$slots,"wrapper-mask")]),_:3},8,["class","style","onKeydown","type","order"])),[[p.vShow,h.showWindow],[U]])}var C=f.default(s,[["render",I]]);x.default=C}(RP)),RP}var zP={},WP={},w4;function s5(){return w4||(w4=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=fr(),k=Kt(),F=Qo(),B=wa(),G=ln(),E=Ni(),A=ev(),u=Kl(),o=ht(),S=St();const _=o.defineComponent({name:"ModuleList",components:{withScrollbar:u.withWrap(B.default)},mixins:[M.provide("module-list")],props:{[E.componentsProps.value()]:{type:String,default:void 0},beforeSelect:{type:Function,default:k.noop},scrollbar:{type:[Boolean,Object],default:!0}},emits:["selected","update:model-value","input"],data(){return{prefixCls:"v-module-list",options:[]}},computed:{hasScrollbar(){return!!this.scrollbar},scrollbarProps(){return k.isObject(this.scrollbar)?this.scrollbar:{}}},methods:{async onBeforeSelect(y,d){if(y===d)return!0;if(await this.beforeSelect(y,d)===!1)return!1},async onOptionSelected(y,d,v){const b=this[E.componentsProps.value()];if(await this.onBeforeSelect(y,b)===!1)return!1;this.targetOption=d,G.$emit(this,E.getModelEventName(this),y,v),G.$emit(this,"selected",y,v)},register(y){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:()=>{};const v=E.getModelValue(this);G.$on(y,"selected",this.onOptionSelected),v===E.getModelValue(y)&&y.innerSelectable&&(this.targetOption=y),this.options.push(y),d(this)},async selectModule(y,d){const v=this.options.find(b=>E.getModelValue(b)===y);if(y===null&&!v){G.$emit(this,E.getModelEventName(this),null,d),G.$emit(this,"selected",null,d);return}return v?.onSelect(null,d)},unregister(y){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:()=>{};G.$off(y,"selected",this.onOptionSelected),this.options=this.options.filter(v=>A.getUid(v)!==A.getUid(y)),d(this)},onArrowKeydown(y){if(!this.targetOption)return;const d=[...this.$el.querySelectorAll(".module-item-option:not(.non-selectable)")];let v=d.findIndex(s=>this.targetOption.$el?.contains(s));if(v===-1)return;const b=F.isUpArrow(y)?-1:F.isDownArrow(y)?1:0;v=k.clampValue(v+b,0,d.length-1),d[v].focus(),d[v].click()},focus(){this.$el?.focus()}}});function p(y,d,v,b,s,l){const w=o.resolveComponent("with-scrollbar");return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(y.prefixCls),onKeydown:[d[0]||(d[0]=o.withKeys(o.withModifiers(function(){return y.onArrowKeydown&&y.onArrowKeydown(...arguments)},["prevent"]),["up"])),d[1]||(d[1]=o.withKeys(o.withModifiers(function(){return y.onArrowKeydown&&y.onArrowKeydown(...arguments)},["prevent"]),["down"]))],role:"list"},[o.createVNode(w,o.mergeProps({wrap:y.hasScrollbar},y.scrollbarProps),{default:o.withCtx(()=>[o.renderSlot(y.$slots,"default")]),_:3},16,["wrap"])],34)}var f=S.default(_,[["render",p]]);x.default=f}(WP)),WP}var b4;function Z3(){return b4||(b4=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Xn(),k=ln(),F=aT(),B=oT(),G=kl(),E=s5(),A=fr(),u=Kl(),o=Si(),S=Kt(),_=ht(),p=St();const f={FIT:"sm",CENTER:!1},y=_.defineComponent({name:"PageListAppWindow",components:{vModuleList:E.default,vLayout:G.default,withTransition:u.withWrap("transition")},extends:F.default,mixins:[A.provide("page-list-app-window")],props:{mobileBreakpoint:{type:[String,Boolean,Object],default:()=>({fit:f.FIT,center:f.CENTER})},module:{type:String,default:void 0},layoutType:{type:String,default:"page-list-app"},moduleListLayoutType:{type:String,default:"auto"},showModules:{type:[Boolean,String],default:"auto"},showHamburgerIcon:{type:[Boolean,String],default:"auto"}},emits:["selected-module","module.changed"],data:()=>({selectedVal:void 0,innerShowModules:!1}),computed:{innerShowHanmburgerIcon(){return this.showHamburgerIcon==="auto"?this.inFitBreakpoint:this.showHamburgerIcon},innerModuleListLayoutType(){return this.moduleListLayoutType==="auto"?o.hasSlot(this,"module-list-toolbar-wrapper")?"toolbar":"panel":this.moduleListLayoutType},windowCls(){return[this.prefixCls,"v-page-list-app-window",{"active-win":this.active,"deactive-win":!this.active,"no-shadow":this.noShadow,"mobile-fit":this.inFitBreakpoint}]},hasModules(){return S.isBoolean(this.showModules)?this.showModules:!this.inFitBreakpoint||this.innerShowModules},maskContentStyle(){return{opacity:this.lastMaskLayer?.opacity,backgroundColor:"#FFFFFF"}}},watch:{module:{async handler(C){await this.$nextTick(),this.selectModule(C)},immediate:!0}},created(){k.$on(this,"module.changed",C=>{this.currentModule=C})},[M.componentHooks.beforeUnmount](){k.$off(this,"module.changed")},methods:{onModuleListValueChanged(C,h){this.selectedVal=C,k.$emit(this,"selected-module",C,h),this.innerShowModules=!1},selectModule(C){let h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.$refs["module-list"]?.selectModule(C,h)},onClickHamburgerIcon(){this.innerShowModules=!this.innerShowModules},onClickModuleListMask(){this.innerShowModules=!1},async onPageListAppWindowBeforeClose(){return this.currentModule&&await this.currentModule.canLeave()===!1?this.currentModule.customLeaveLostChangeDialog?this.customLeaveLostChangeDialog():this.showConfirmLostChangedDialog():!0},async onClose(){if(this.isStandalone||await this.onPageListAppWindowBeforeClose()===!1||await B.default.methods.onClose.apply(this,arguments)===!1)return!1},async onBeforeSelectModule(C,h){return this.currentModule&&await this.currentModule.canLeave()===!1?this.showConfirmLostChangedDialog():!0},async showConfirmLostChangedDialog(){const C=await this.getMsgBox().confirmLostChange();return C==="dont_save"?await this.currentModule.confirmDontSave()!==!1:C==="save"?await this.currentModule.confirmSave()!==!1:!1},getHelpParams(){let C=this.helpParams,h;return S.isDefined(this.currentModule?.helpParams)&&(C=S.isFunction(this.currentModule?.helpParams)?this.currentModule.helpParams?.():this.currentModule.helpParams),S.isDefined(this.currentModule?.helpTopic)&&(h=S.isFunction(this.currentModule?.helpTopic)?this.currentModule.helpTopic?.():this.currentModule.helpTopic),h||(h=this.getJsID()),S.isString(C)&&C&&(h+=":"+C),h},setStatusBusy(C,h){h=h||this._i18n("common","loading"),this.setStatus(C,h)},focusModules(){this.$refs["module-list"]?.focus()}}}),d=["aria-label"],v={class:"page-list-app-top-bar"},b={class:"page-list-app-main"},s={key:0,class:"container"},l={class:"focus-last-alert",tabindex:"0",role:"alert"};function w(C,h,c,m,T,D){const O=_.resolveComponent("v-app-window-header"),N=_.resolveComponent("v-module-list"),z=_.resolveComponent("v-layout"),H=_.resolveComponent("with-transition"),$=_.resolveComponent("v-spin"),V=_.resolveComponent("v-trap-focus"),P=_.resolveComponent("v-resizable"),U=_.resolveComponent("v-draggable"),Y=_.resolveDirective("syno-id");return _.withDirectives((_.openBlock(),_.createBlock(z,{class:_.normalizeClass(C.windowCls),style:_.normalizeStyle(C.windowStyle),ref:"_window",onMousedown:h[2]||(h[2]=Z=>C.toFront()),onKeydown:_.withKeys(C.onEsc,["esc","native"]),type:`window.${C.layoutType}`},{default:_.withCtx(()=>[_.createVNode(O,_.mergeProps({ref:"header"},C.headerProps,{onClose:C.onClose,onMinimize:C.doMinimize,onMaximize:C.doMaximize,onFullscreen:C.doFullscreen,onRestore:C.doRestore,onHelp:C.onHelp,"show-hamburger-icon":C.innerShowHanmburgerIcon,onClickHamburgerIcon:C.onClickHamburgerIcon}),null,16,["onClose","onMinimize","onMaximize","onFullscreen","onRestore","onHelp","show-hamburger-icon","onClickHamburgerIcon"]),_.createVNode(V,{ref:"trapFocus",class:_.normalizeClass(C.prefixCls+"-body"),"body-class":["page-list-app-window-trap-body"]},{"alert-last":_.withCtx(()=>[_.createElementVNode("div",l,_.toDisplayString(C._i18n("desktop","window_last_hint")),1)]),default:_.withCtx(()=>[_.createElementVNode("div",{class:"v-trap-focus-indicator",tabindex:"0",role:"application","aria-label":C.currentTitle},null,8,d),_.createElementVNode("div",v,[_.renderSlot(C.$slots,"top-bar")]),_.createElementVNode("div",b,[_.createVNode(H,{wrap:C.inFitBreakpoint,name:"slide"},{default:_.withCtx(()=>[_.withDirectives(_.createVNode(z,{class:"module-list-layout",type:`module-list.${C.innerModuleListLayoutType}`},{default:_.withCtx(()=>[_.renderSlot(C.$slots,"module-list-toolbar-wrapper"),_.createVNode(N,{ref:"module-list",value:C.selectedVal,"model-value":C.selectedVal,onInput:C.onModuleListValueChanged,"onUpdate:modelValue":C.onModuleListValueChanged,"before-select":C.onBeforeSelectModule,tabindex:"0","aria-label":C.currentTitle},{default:_.withCtx(()=>[_.renderSlot(C.$slots,"module-options")]),_:3},8,["value","model-value","onInput","onUpdate:modelValue","before-select","aria-label"])]),_:3},8,["type"]),[[_.vShow,C.hasModules]])]),_:3},8,["wrap"]),_.createVNode(_.Transition,{name:"fade"},{default:_.withCtx(()=>[C.hasModules?(_.openBlock(),_.createElementBlock("div",{key:0,class:"module-list-mask",onClick:h[0]||(h[0]=function(){return C.onClickModuleListMask&&C.onClickModuleListMask(...arguments)})})):_.createCommentVNode("",!0)]),_:1}),(_.openBlock(),_.createElementBlock("div",s,[_.renderSlot(C.$slots,"default"),C.isMasking?(_.openBlock(),_.createBlock($,{key:0,"only-mask":!C.lastMaskLayer.text,class:"page-list-container-spin",tip:C.lastMaskLayer.text,spinning:C.isMasking,"mask-style":C.maskContentStyle},null,8,["only-mask","tip","spinning","mask-style"])):_.createCommentVNode("",!0)]))])]),_:3},8,["class"]),C.resizable?(_.openBlock(),_.createBlock(P,{key:0,"window-property":C.windowProperty,onResizeEnd:C.onResizeEnd},null,8,["window-property","onResizeEnd"])):_.createCommentVNode("",!0),C.innerDraggable&&!C.isComponentType?(_.openBlock(),_.createBlock(U,{key:1,"window-property":C.windowProperty,onDragging:C.setDragging,onDragEnd:C.onDragEnd},null,8,["window-property","onDragging","onDragEnd"])):_.createCommentVNode("",!0),C.isMasking?(_.openBlock(),_.createElementBlock("div",{key:2,onMousedown:h[1]||(h[1]=_.withModifiers(function(){return C.onMaskMouseDown&&C.onMaskMouseDown(...arguments)},["stop"])),class:_.normalizeClass(C.maskCls)},null,34)):_.createCommentVNode("",!0),_.renderSlot(C.$slots,"wrapper-mask")]),_:3},8,["class","style","onKeydown","type"])),[[_.vShow,C.showWindow],[Y]])}var I=p.default(y,[["render",w]]);x.default=I}(zP)),zP}var UP={},C4;function Q3(){return C4||(C4=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Xn(),k=Ni(),F=ln(),B=fr(),G=Kt(),E=ht(),A=St();const u=E.defineComponent({name:"PageListModule",mixins:[B.inject("page-list-app-window")],props:{[k.componentsProps.value()]:{type:String,default:void 0,required:!0},canLeave:{type:Function,default:G.noop},customLeaveLostChangeDialog:{type:Function,default:void 0},confirmSave:{type:Function,default:G.noop},confirmDontSave:{type:Function,default:G.noop},confirmCancel:{type:Function,default:G.noop},helpParams:{type:[String,Function],default:void 0},helpTopic:{type:[String,Function],default:void 0}},emits:["module-focus","module.changed","activated","deactivated","module.changed","activated","deactivated"],data:()=>({innerCls:"page-list-module",activated:!1}),mounted(){this.appWindow=this["page-list-app-window"]?.instance,this.disposedFn=[F.$on(this.appWindow,"selected-module",this.onCurrentModuleChanged)],this.onCurrentModuleChanged(this.appWindow.selectedVal)},[M.componentHooks.beforeUnmount](){for(const _ of this.disposedFn)_?.();delete this.appWindow},methods:{onCurrentModuleChanged(_,p){const f=k.getModelValue(this)===_;if(this.activated===f){this.activated&&F.$emit(this,"module-focus",p);return}this.activated=f,this.activated?(F.$emit(this.appWindow,"module.changed",this),F.$emit(this,"activated",p)):F.$emit(this,"deactivated",p)}}});function o(_,p,f,y,d,v){return _.activated?(E.openBlock(),E.createElementBlock("div",{key:0,class:E.normalizeClass(_.innerCls)},[E.renderSlot(_.$slots,"default")],2)):E.createCommentVNode("",!0)}var S=A.default(u,[["render",o]]);x.default=S}(UP)),UP}var GP={},_4;function eee(){return _4||(_4=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=aT(),k=Pg(),F=Mb(),B=_i(),G=fr(),E=ht(),A=St(),u=id();const o=24,S=E.defineComponent({name:"AppWizardWindow",extends:M.default,mixins:[G.provide("wizard-window")],props:{width:{type:[String,Number],default:480},minWidth:{type:[String,Number],default:420},height:{type:[String,Number],default:"auto"},showClose:{type:Boolean,default:!0},minimizable:{type:Boolean,default:!1},maximizable:{type:Boolean,default:!1},showHelp:{type:Boolean,default:!0},showMinimize:{type:Boolean,default:!1},showMaximize:{type:Boolean,default:!1},showFullscreen:{type:Boolean,default:!1},layoutType:{type:String,default:"wizard"}},emits:["wizard.currentStep","wizard.stepScroll"],data(){return{subTitle:void 0,subTitleOpacity:0}},computed:{innerSubTitle(){return this.inFitBreakpoint?this.subTitle:` - ${this.subTitle}`},windowCls(){return[this.prefixCls,"v-wizard-window",{"active-win":this.active,"deactive-win":!this.active,"no-shadow":this.noShadow,"is-safari":k.isSafari,"auto-height":this.autoHeight,"mobile-fit":this.inFitBreakpoint}]},subTitleStyle(){return{opacity:this.subTitleOpacity}}},methods:{setCurrentStep(v){this.subTitle=v.headline,this.focus()},onHeadlineIntersection(v){this.headerTitleWidth=this.$refs.header.getTitleEl()?.offsetWidth},onStepScrolled(v){this.subTitleOpacity=v?Math.min(v,o)/o:0},getToastBox(v){let b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};b=B.merge({text:v},b),F.openToast(this.$.appContext.app,this.$el,b,B.merge({constrainMode:!1,absoluteMode:!1,offset:u.toastOffset,align:"t->t"},s))},tryConstrainHeight(){return!0},clearStatusBusy(){this.clearStatus()}}}),_=["id"],p=["aria-label"],f={class:"focus-last-alert",tabindex:"0",role:"alert"};function y(v,b,s,l,w,I){const C=E.resolveComponent("v-window-header"),h=E.resolveComponent("v-trap-focus"),c=E.resolveComponent("v-draggable"),m=E.resolveComponent("v-spin"),T=E.resolveComponent("v-layout"),D=E.resolveDirective("syno-id");return E.withDirectives((E.openBlock(),E.createBlock(T,{type:`window.${v.layoutType}`,class:E.normalizeClass(v.windowCls),style:E.normalizeStyle(v.windowStyle),ref:"_window",onMousedown:b[1]||(b[1]=O=>v.toFront()),onKeydown:E.withKeys(v.onEsc,["esc","native"]),order:v.layoutOrder},{default:E.withCtx(()=>[E.createVNode(C,E.mergeProps({ref:"header"},v.headerProps,{"is-modalized":"","is-wizard":"","show-app-icon":!1,"dark-theme":"","show-help":v.showHelp,onHelp:v.onHelp,onClose:v.onClose}),{"sub-title":E.withCtx(()=>[v.inFitBreakpoint?E.createCommentVNode("",!0):(E.openBlock(),E.createElementBlock("div",{key:0,id:`${v.id}-subtitle`,class:"sub-wrapper",style:E.normalizeStyle(v.subTitleStyle)},E.toDisplayString(v.innerSubTitle),13,_))]),_:1},16,["show-help","onHelp","onClose"]),v.inFitBreakpoint?(E.openBlock(),E.createElementBlock("div",{key:0,class:"headline-transform",style:E.normalizeStyle(v.subTitleStyle)},[E.createElementVNode("div",{class:"headline-text",style:E.normalizeStyle(v.headlineStyle)},E.toDisplayString(v.innerSubTitle),5)],4)):E.createCommentVNode("",!0),E.createVNode(h,{ref:"trapFocus",class:E.normalizeClass(v.prefixCls+"-body")},{"alert-last":E.withCtx(()=>[E.createElementVNode("div",f,E.toDisplayString(v._i18n("desktop","window_last_hint")),1)]),default:E.withCtx(()=>[E.createElementVNode("div",{class:"v-trap-focus-indicator",tabindex:"0",role:"application","aria-label":v.currentTitle},null,8,p),E.renderSlot(v.$slots,"default")]),_:3},8,["class"]),v.innerDraggable?(E.openBlock(),E.createBlock(c,{key:1,"prefix-cls":"v-wizard-window","window-property":v.windowProperty,onDragging:v.setDragging,onDragEnd:v.onDragEnd},null,8,["window-property","onDragging","onDragEnd"])):E.createCommentVNode("",!0),v.isMasking?(E.openBlock(),E.createElementBlock("div",{key:2,onMousedown:b[0]||(b[0]=E.withModifiers(function(){return v.onMaskMouseDown&&v.onMaskMouseDown(...arguments)},["stop"])),class:E.normalizeClass(v.maskCls)},[E.createVNode(m,{"only-mask":!v.lastMaskLayer.text,tip:v.lastMaskLayer.text,spinning:v.isMasking,"mask-style":v.maskStyle},null,8,["only-mask","tip","spinning","mask-style"])],34)):E.createCommentVNode("",!0)]),_:3},8,["type","class","style","onKeydown","order"])),[[E.vShow,v.showWindow],[D]])}var d=A.default(S,[["render",y]]);x.default=d}(GP)),GP}var jP={},S4;function tee(){return S4||(S4=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Xn(),k=ln(),F=La(),B=Eu(),G=lc(),E=ya(),A=kr(),u=vr(),o=Yl(),S=Kt(),_=ht(),p=St();u.register("breadcrumb-slash",A.vIconBreadcrumbSlash),u.register("action-dropdown",A.vIconTriangleDown);const f=_.defineComponent({name:"Breadcrumb",components:{vButton:F.default,vMenu:B.default,vMenuItem:G.default},directives:{tooltip:E.default,iconify:u.default},props:{items:{type:Array,required:!0,default:()=>[]},actionMenuItems:{type:[Array,Boolean],default:!1}},emits:["click-item"],data(){return{displayItems:[]}},computed:{hasActionMenu(){return this.actionMenuItems===!0||S.isArray(this.actionMenuItems)&&this.actionMenuItems.length>0},innerActionMenuItems(){return S.isBoolean(this.actionMenuItems)?[]:this.actionMenuItems}},watch:{actionMenuItems(){this.genFeasibleDisplayItems()},items(){this.genFeasibleDisplayItems()}},mounted(){this.genFeasibleDisplayItems(),o.addResizeListener(this.$el,this.genFeasibleDisplayItems,this)},[M.componentHooks.beforeUnmount](){o.removeResizeListener(this.$el,this.genFeasibleDisplayItems)},methods:{async isWidthFit(){return await this.$nextTick(),(this.$refs.measure?.getBoundingClientRect()?.width??0)>0},async genFeasibleDisplayItems(){const s=m=>({...m,type:"normal"}),l=m=>({display:"/",type:"divider",id:`v-breadcrumb-divider-${m}`}),w=m=>({...m,type:"action",items:this.innerActionMenuItems}),I=m=>({display:"...",type:"compressed",id:"v-breadcrumb-compressed",items:m}),C=[],h=[],c=[];for(let m=0;m<this.items.length;m++){const T=this.items[m];m===this.items.length-1&&this.hasActionMenu?C.push(w(T)):m===0||m===this.items.length-1?C.push(s(T)):c.push(s(T))}for(;;){const m=[];C[0]&&m.push(C[0]),h.length>0&&(m.push(l(m.length)),m.push(I(h)));for(const T of c)m.push(l(m.length)),m.push(T);if(C[1]&&(m.push(l(m.length)),m.push(C[1])),this.displayItems=m,await this.isWidthFit())break;if(c.length>0)h.push(c.shift());else if(C[0]&&!C[0].ellipsis)C[0].ellipsis=!0;else if(C[1]&&!C[1].ellipsis)C[1].ellipsis=!0;else break}},getItemClass(s){const{type:l,ellipsis:w}=s,I=["item"];switch(w&&I.push("ellipsis"),l){case"normal":I.push("normal");break;case"action":I.push("action");break;case"compressed":I.push("compressed");break;case"divider":I.push("divider");break}return I},getItemTooltip(s){return s.type!=="divider"&&s.type!=="compressed"?{content:s.display}:!1},onClickItem(s){s.type==="compressed"||s.type==="action"||k.$emit(this,"click-item",s)}}}),y={class:"v-breadcrumb"},d={ref:"measure",class:"v-breadcrumb-spacer"};function v(s,l,w,I,C,h){const c=_.resolveComponent("v-icon"),m=_.resolveComponent("v-menu-item"),T=_.resolveComponent("v-menu"),D=_.resolveComponent("v-button"),O=_.resolveComponent("v-menu-divider"),N=_.resolveDirective("tooltip"),z=_.resolveDirective("syno-id");return _.withDirectives((_.openBlock(),_.createElementBlock("div",y,[(_.openBlock(!0),_.createElementBlock(_.Fragment,null,_.renderList(s.displayItems,(H,$)=>(_.openBlock(),_.createElementBlock(_.Fragment,{key:$},[H.type==="divider"?(_.openBlock(),_.createBlock(c,{key:`slash-${$}`,name:"breadcrumb-slash",class:_.normalizeClass(s.getItemClass(H))},null,8,["class"])):H.type==="compressed"?_.withDirectives((_.openBlock(),_.createBlock(D,{"syno-id":`${s.synoId}-compressed-button-${$}`,key:`compressed-button-${$}`,type:"styleless",class:_.normalizeClass(s.getItemClass(H)),onClick:V=>s.onClickItem(H)},{dropdown:_.withCtx(()=>[_.createVNode(T,{width:200,"syno-id":`${s.synoId}-compressed-menu`},{default:_.withCtx(()=>[(_.openBlock(!0),_.createElementBlock(_.Fragment,null,_.renderList(H.items,V=>(_.openBlock(),_.createBlock(m,{"syno-id":`${s.synoId}-compressed-menu-item-${V.id}`,key:`compressed-${V.id}`,tooltip:V.display,title:V.display,onClick:P=>s.onClickItem(V)},null,8,["syno-id","tooltip","title","onClick"]))),128))]),_:2},1032,["syno-id"])]),default:_.withCtx(()=>[_.createElementVNode("span",null,_.toDisplayString(H.display),1)]),_:2},1032,["syno-id","class","onClick"])),[[N,s.getItemTooltip(H)]]):H.type==="action"?_.withDirectives((_.openBlock(),_.createBlock(D,{"syno-id":`${s.synoId}-action-button-${$}`,key:`action-button-${$}`,type:"styleless",class:_.normalizeClass(s.getItemClass(H)),onClick:V=>s.onClickItem(H)},{dropdown:_.withCtx(()=>[_.renderSlot(s.$slots,"action-menu-dropdown",{items:H.items},()=>[_.createVNode(T,{width:200,"syno-id":`${s.synoId}-action-menu`},{default:_.withCtx(()=>[(_.openBlock(!0),_.createElementBlock(_.Fragment,null,_.renderList(H.items,(V,P)=>(_.openBlock(),_.createElementBlock(_.Fragment,{key:P},[V==="-"?(_.openBlock(),_.createBlock(O,{"syno-id":`${s.synoId}-action-menu-divider-${P}`,key:`action-divider-${P}`},null,8,["syno-id"])):(_.openBlock(),_.createBlock(m,{"syno-id":`${s.synoId}-action-menu-item-${V.id}`,key:`action-${V.id}`,title:V.display,tooltip:V.display,onClick:U=>s.onClickItem(V)},null,8,["syno-id","title","tooltip","onClick"]))],64))),128))]),_:2},1032,["syno-id"])])]),default:_.withCtx(()=>[_.createElementVNode("span",null,_.toDisplayString(H.display),1),_.createVNode(c,{name:"action-dropdown","svg-icon-set":"set13"})]),_:2},1032,["syno-id","class","onClick"])),[[N,s.getItemTooltip(H)]]):_.withDirectives((_.openBlock(),_.createBlock(D,{"syno-id":`${s.synoId}-remain-button-${$}`,key:H.id,type:"styleless",class:_.normalizeClass(s.getItemClass(H)),onClick:V=>s.onClickItem(H)},{default:_.withCtx(()=>[_.createElementVNode("span",null,_.toDisplayString(H.display),1)]),_:2},1032,["syno-id","class","onClick"])),[[N,s.getItemTooltip(H)]])],64))),128)),_.createElementVNode("div",d,null,512)])),[[z]])}var b=p.default(f,[["render",v]]);x.default=b}(jP)),jP}var qP={},I4;function nee(){return I4||(I4=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=ht(),k=St();const F=M.defineComponent({name:"ButtonGroup"}),B={class:"v-btn-group"};function G(A,u,o,S,_,p){const f=M.resolveDirective("syno-id");return M.withDirectives((M.openBlock(),M.createElementBlock("div",B,[M.renderSlot(A.$slots,"default")])),[[f]])}var E=k.default(F,[["render",G]]);x.default=E}(qP)),qP}var YP={},x4;function ree(){return x4||(x4=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=ht(),k=St();const F=M.defineComponent({name:"ButtonSplit"}),B={class:"v-button-split"};function G(A,u,o,S,_,p){return M.openBlock(),M.createElementBlock("div",B)}var E=k.default(F,[["render",G]]);x.default=E}(YP)),YP}var KP={},T4;function iee(){return T4||(T4=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=fr(),k=La(),F=Eb(),B=vr(),G=kr(),E=ev(),A=ht(),u=St();B.register("buttons-group-more",G.vIconMore);const o=A.defineComponent({name:"BreakpointButtonsGroup",components:{vButton:k.default,vSpace:F.default},mixins:[M.provide("breakpoint-buttons-group"),B.default],props:{dense:{type:Boolean,default:!1},menuAlign:{type:String,default:"tr->br"}},data(){return{buttons:[]}},computed:{spacing(){return this.dense?"dense":"regular"},wrapperCls(){return{dense:this.dense}},names(){return this.buttons.map(p=>p.name)}},methods:{register(p){this.buttons.push(p)},unregister(p){this.buttons.splice(this.buttons.findIndex(f=>E.getUid(f)===E.getUid(p)),1)},getUid(p){return E.getUid(p)}}});function S(p,f,y,d,v,b){const s=A.resolveComponent("v-icon"),l=A.resolveComponent("v-menu-item"),w=A.resolveComponent("v-menu"),I=A.resolveComponent("v-button"),C=A.resolveComponent("v-space");return A.openBlock(),A.createElementBlock("div",{class:A.normalizeClass(["breakpoint-buttons-group",p.wrapperCls])},[p.$breakpointManager.mobile?A.renderSlot(p.$slots,"mobile",{key:0,names:p.names},()=>[A.createVNode(I,{type:"styleless",class:"breakpoint-buttons-group-more-button","use-breakpoint":!1,"menu-align":p.menuAlign,display:"icon"},{dropdown:A.withCtx(()=>[A.createVNode(w,null,{default:A.withCtx(()=>[(A.openBlock(!0),A.createElementBlock(A.Fragment,null,A.renderList(p.buttons,h=>(A.openBlock(),A.createBlock(l,{key:p.getUid(h),title:h.name,disabled:h.disabled,onClick:h.handleClick},null,8,["title","disabled","onClick"]))),128))]),_:1})]),default:A.withCtx(()=>[A.createVNode(s,{name:"buttons-group-more","svg-icon-set":"set13"})]),_:1},8,["menu-align"])]):A.createCommentVNode("",!0),A.withDirectives(A.createVNode(C,{"justify-content":"start",spacing:p.spacing},{default:A.withCtx(()=>[A.renderSlot(p.$slots,"default")]),_:3},8,["spacing"]),[[A.vShow,!p.$breakpointManager.mobile]])],2)}var _=u.default(o,[["render",S]]);x.default=_}(KP)),KP}var XP={},JP={},k4;function uh(){return k4||(k4=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Dr(),k=ln(),F=ht(),B=St();const G=F.defineComponent({name:"SlideUpDownTransition",emits:["before-enter","enter","after-enter","before-leave","leave","after-leave"],methods:{onBeforeEnter(u){u.dataset||(u.dataset={}),u.dataset.overflow=M.css(u,"overflow"),u.dataset.paddingTop=u.dataset.paddingTop?u.dataset.paddingTop:M.css(u,"padding-top"),u.dataset.paddingBottom=u.dataset.paddingBottom?u.dataset.paddingBottom:M.css(u,"padding-bottom"),this.reflow=u.scrollHeight,M.css(u,"max-height",0),M.css(u,"padding-top",0),M.css(u,"padding-bottom",0),this.reflow=u.scrollHeight,k.$emit(this,"before-enter",u)},onEnter(u){u.scrollHeight!==0?M.css(u,"max-height",`${u.scrollHeight}px`):M.css(u,"max-height",""),M.css(u,"padding-top",u.dataset.paddingTop),M.css(u,"padding-bottom",u.dataset.paddingBottom),M.css(u,"overflow","hidden"),k.$emit(this,"enter",u)},onAfterEnter(u){M.css(u,"max-height",""),u.removeAttribute("data-padding-top"),u.removeAttribute("data-padding-bottom"),k.$emit(this,"after-enter",u)},onBeforeLeave(u){u.dataset||(u.dataset={}),M.css(u,"max-height",`${u.scrollHeight}px`),u.dataset.overflow=M.css(u,"overflow"),u.dataset.paddingTop=u.dataset.paddingTop?u.dataset.paddingTop:M.css(u,"padding-top"),u.dataset.paddingBottom=u.dataset.paddingBottom?u.dataset.paddingBottom:M.css(u,"padding-bottom"),M.css(u,"overflow","hidden"),k.$emit(this,"before-leave",u)},onLeave(u){u.scrollHeight!==0&&(M.css(u,"max-height","0"),M.css(u,"padding-top","0"),M.css(u,"padding-bottom","0")),k.$emit(this,"leave",u)},onAfterLeave(u){M.css(u,"max-height",""),M.css(u,"padding-top",u.dataset.paddingTop),M.css(u,"padding-bottom",u.dataset.paddingBottom),M.css(u,"overflow",u.dataset.overflow),u.removeAttribute("data-padding-top"),u.removeAttribute("data-padding-bottom"),u.removeAttribute("overflow"),k.$emit(this,"after-leave",u)}}});function E(u,o,S,_,p,f){return F.openBlock(),F.createBlock(F.Transition,{name:"slide-up-down",onBeforeEnter:u.onBeforeEnter,onEnter:u.onEnter,onAfterEnter:u.onAfterEnter,onBeforeLeave:u.onBeforeLeave,onLeave:u.onLeave,onAfterLeave:u.onAfterLeave},{default:F.withCtx(()=>[F.renderSlot(u.$slots,"default")]),_:3},8,["onBeforeEnter","onEnter","onAfterEnter","onBeforeLeave","onLeave","onAfterLeave"])}var A=B.default(G,[["render",E]]);x.default=A}(JP)),JP}var R4;function oee(){return R4||(R4=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=uh(),k=vr(),F=kl(),B=kr(),G=Kl(),E=ht(),A=St();k.register("card-arrow-up",B.vIconChevronUp),k.register("card-arrow-down",B.vIconChevronDown);const u=E.defineComponent({name:"Card",components:{vLayout:F.default,withSlideTransition:G.withWrap(M.default)},mixins:[k.default],props:{layoutType:{type:String,default:"regular"},layoutOrder:{type:Number,default:0},hasHeader:{type:Boolean,default:!0},title:{type:String,default:void 0},expandable:{type:Boolean,default:!1},expanded:{type:Boolean,default:!0}},data:()=>({innerExpanded:!0}),computed:{},watch:{expanded:{handler(d){this.innerExpanded=d},immediate:!0}},methods:{toggleExpand(){this.innerExpanded=!this.innerExpanded}}}),o={key:0,class:"v-card-header"},S={class:"v-card-title"},_={class:"actions-wrapper"},p={key:0,class:"v-card-body"};function f(d,v,b,s,l,w){const I=E.resolveComponent("v-icon"),C=E.resolveComponent("with-slide-transition"),h=E.resolveComponent("v-layout");return E.openBlock(),E.createBlock(h,{class:"v-card-wrapper",type:`card.${d.layoutType}${d.hasHeader?"-has-header":""}`,order:d.layoutOrder},{default:E.withCtx(()=>[d.hasHeader?(E.openBlock(),E.createElementBlock("div",o,[E.createElementVNode("div",S,[E.renderSlot(d.$slots,"title",{},()=>[E.createTextVNode(E.toDisplayString(d.title),1)])]),E.createElementVNode("div",_,[E.renderSlot(d.$slots,"header-actions"),d.expandable?(E.openBlock(),E.createBlock(I,{key:0,name:d.innerExpanded?"card-arrow-up":"card-arrow-down",onClick:d.toggleExpand,"svg-icon-set":"set31"},null,8,["name","onClick"])):E.createCommentVNode("",!0)])])):E.createCommentVNode("",!0),E.createVNode(C,{wrap:d.expandable},{default:E.withCtx(()=>[d.innerExpanded?(E.openBlock(),E.createElementBlock("div",p,[E.renderSlot(d.$slots,"body")])):E.createCommentVNode("",!0)]),_:3},8,["wrap"])]),_:3},8,["type","order"])}var y=A.default(u,[["render",f]]);x.default=y}(XP)),XP}var ZP={},E4;function rv(){return E4||(E4=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Tl(),k=vr(),F=Ni(),B=lh(),G=ln(),E=ht(),A=St();const u=E.defineComponent({name:"Checkbox",mixins:[M.default,k.default],props:{stopPropagation:{type:Boolean,default:!1},[F.componentsProps.value()]:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},id:{type:String,default(){return`syno-${B.uuid()}`}},name:{type:String,default:void 0},labelColor:{type:String,default:"normal",validator(p){return["normal","red"].includes(p)}}},emits:["change","focus","blur","update:model-value"],data(){return{prefixCls:"v-checkbox",isFocused:!1}},computed:{innerValue(){return F.getModelValue(this)},wrapperCls(){return[`${this.prefixCls}-wrapper`,{checked:!this.indeterminate&&this.innerValue===!0,indeterminate:this.indeterminate,disabled:this.disabled,focused:this.isFocused}]},labelCls(){return[`${this.prefixCls}-label`,{[`label-color-${this.labelColor}`]:!0}]}},methods:{onChange(p){const f=this.indeterminate?!0:!this.innerValue;G.$emit(this,F.getModelEventName(this),f),G.$emit(this,"change",f,p)},onFocus(){this.$refs.input.focus()},onFocusInput(){this.isFocused=!0,G.$emit(this,"focus",this)},onBlurInput(){this.isFocused=!1,G.$emit(this,"blur",this)},onClick(p){this.stopPropagation&&p.stopPropagation(),!this.disabled&&this.onChange(p)},onDblClick(p){this.stopPropagation&&p.stopPropagation()}}}),o=["aria-checked","aria-labelledby","value","checked","disabled","id","name"];function S(p,f,y,d,v,b){const s=E.resolveComponent("v-icon"),l=E.resolveDirective("syno-id");return E.withDirectives((E.openBlock(),E.createElementBlock("div",{class:E.normalizeClass(p.wrapperCls),onClick:f[4]||(f[4]=function(){return p.onClick&&p.onClick(...arguments)}),onDblclick:f[5]||(f[5]=function(){return p.onDblClick&&p.onDblClick(...arguments)}),tabindex:"-1",onFocus:f[6]||(f[6]=function(){return p.onFocus&&p.onFocus(...arguments)})},[E.createVNode(s,{name:"checkbox",class:E.normalizeClass(p.prefixCls+"-icon"),sprite:""},null,8,["class"]),E.createElementVNode("input",{ref:"input",type:"checkbox",role:"checkbox","aria-checked":p.innerValue?"true":"false","aria-labelledby":p.id,class:E.normalizeClass(p.prefixCls+"-input"),value:p.innerValue,checked:p.innerValue,disabled:p.disabled,id:p.id,name:p.name,onChange:f[0]||(f[0]=function(){return p.onChange&&p.onChange(...arguments)}),onClick:f[1]||(f[1]=E.withModifiers(()=>{},["stop"])),onFocus:f[2]||(f[2]=function(){return p.onFocusInput&&p.onFocusInput(...arguments)}),onBlur:f[3]||(f[3]=function(){return p.onBlurInput&&p.onBlurInput(...arguments)})},null,42,o),E.createElementVNode("label",{class:E.normalizeClass(p.labelCls)},[E.renderSlot(p.$slots,"default")],2)],34)),[[l]])}var _=A.default(u,[["render",S]]);x.default=_}(ZP)),ZP}var QP={},e2={},t2={},A4;function l5(){return A4||(A4=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=ht(),k=St();const F=M.defineComponent({name:"Divider"}),B={class:"v-divider"};function G(A,u,o,S,_,p){return M.openBlock(),M.createElementBlock("div",B)}var E=k.default(F,[["render",G]]);x.default=E}(t2)),t2}var n2={},M4;function u5(){return M4||(M4=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Lhe(),k=Vhe();function F(l){return l&&typeof l=="object"&&"default"in l?l:{default:l}}var B=F(M),G=F(k);const E=["#FFFFFF","#FFE0E0","#FFEFD9","#FFFAC7","#D1FFD9","#CCFFF6","#E0F0FF","#E0E4FF","#F0E0FF","#FFE0F0","#F2F2F2","#FAB6B6","#FADBAF","#FAF29B","#A7FAB5","#96FAE9","#B4D7FA","#BBC4FA","#D8B6FA","#FAB6D8","#D9D9D9","#FA8484","#FAC170","#FAEC4B","#62F57A","#5CE6CF","#70B5FA","#8998FA","#BF84FA","#FA84BF","#A6A6A6","#E64C4C","#E69E39","#E6D517","#20D93F","#1DC4A8","#2F8DEB","#5266EB","#984CE6","#E64C99","#666666","#BF0F0F","#BF7000","#B3A400","#00A61C","#00997F","#0063C7","#142DCC","#6E10CC","#BF0F67","#333333","#730000","#734300","#736900","#007313","#007360","#004285","#00138C","#4A0094","#730039"],A=["#000000","#FF0000","#FF9500","#FFEA00","#19FA3E","#00FAE5","#0582FF","#1A38FF","#8C1AFF","#FF1A8C"],u=[].slice,o=["keyword","gray","hex"],S={};for(const l of Object.keys(G.default))S[u.call(G.default[l].labels).sort().join("")]=l;const _={};function p(l,w){if(!(this instanceof p))return new p(l,w);if(w&&w in o&&(w=null),w&&!(w in G.default))throw new Error("Unknown model: "+w);let I,C;if(l==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(l instanceof p)this.model=l.model,this.color=l.color.slice(),this.valpha=l.valpha;else if(typeof l=="string"){const h=B.default.get(l);if(h===null)throw new Error("Unable to parse color from string: "+l);this.model=h.model,C=G.default[this.model].channels,this.color=h.value.slice(0,C),this.valpha=typeof h.value[C]=="number"?h.value[C]:1}else if(l.length>0){this.model=w||"rgb",C=G.default[this.model].channels;const h=u.call(l,0,C);this.color=s(h,C),this.valpha=typeof l[C]=="number"?l[C]:1}else if(typeof l=="number")this.model="rgb",this.color=[l>>16&255,l>>8&255,l&255],this.valpha=1;else{this.valpha=1;const h=Object.keys(l);"alpha"in l&&(h.splice(h.indexOf("alpha"),1),this.valpha=typeof l.alpha=="number"?l.alpha:0);const c=h.sort().join("");if(!(c in S))throw new Error("Unable to parse color from object: "+JSON.stringify(l));this.model=S[c];const m=G.default[this.model].labels,T=[];for(I=0;I<m.length;I++)T.push(l[m[I]]);this.color=s(T)}if(_[this.model])for(C=G.default[this.model].channels,I=0;I<C;I++){const h=_[this.model][I];h&&(this.color[I]=h(this.color[I]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}p.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(l){let w=this.model in B.default.to?this:this.rgb();w=w.round(typeof l=="number"?l:1);const I=w.valpha===1?w.color:w.color.concat(this.valpha);return B.default.to[w.model](I)},percentString(l){const w=this.rgb().round(typeof l=="number"?l:1),I=w.valpha===1?w.color:w.color.concat(this.valpha);return B.default.to.rgb.percent(I)},array(){return this.valpha===1?this.color.slice():this.color.concat(this.valpha)},object(){const l={},w=G.default[this.model].channels,I=G.default[this.model].labels;for(let C=0;C<w;C++)l[I[C]]=this.color[C];return this.valpha!==1&&(l.alpha=this.valpha),l},unitArray(){const l=this.rgb().color;return l[0]/=255,l[1]/=255,l[2]/=255,this.valpha!==1&&l.push(this.valpha),l},unitObject(){const l=this.rgb().object();return l.r/=255,l.g/=255,l.b/=255,this.valpha!==1&&(l.alpha=this.valpha),l},round(l){return l=Math.max(l||0,0),new p(this.color.map(y(l)).concat(this.valpha),this.model)},alpha(l){return arguments.length>0?new p(this.color.concat(Math.max(0,Math.min(1,l))),this.model):this.valpha},red:d("rgb",0,v(255)),green:d("rgb",1,v(255)),blue:d("rgb",2,v(255)),hue:d(["hsl","hsv","hsl","hwb","hcg"],0,l=>(l%360+360)%360),saturationl:d("hsl",1,v(100)),lightness:d("hsl",2,v(100)),saturationv:d("hsv",1,v(100)),value:d("hsv",2,v(100)),chroma:d("hcg",1,v(100)),gray:d("hcg",2,v(100)),white:d("hwb",1,v(100)),wblack:d("hwb",2,v(100)),cyan:d("cmyk",0,v(100)),magenta:d("cmyk",1,v(100)),yellow:d("cmyk",2,v(100)),black:d("cmyk",3,v(100)),x:d("xyz",0,v(100)),y:d("xyz",1,v(100)),z:d("xyz",2,v(100)),l:d("lab",0,v(100)),a:d("lab",1),b:d("lab",2),keyword(l){return arguments.length>0?new p(l):G.default[this.model].keyword(this.color)},hex(l){return arguments.length>0?new p(l):B.default.to.hex(this.rgb().round().color)},hexa(l){if(arguments.length>0)return new p(l);const w=this.rgb().round().color;let I=Math.round(this.valpha*255).toString(16).toUpperCase();return I.length===1&&(I="0"+I),B.default.to.hex(w)+I},rgbNumber(){const l=this.rgb().color;return(l[0]&255)<<16|(l[1]&255)<<8|l[2]&255},luminosity(){const l=this.rgb().color,w=[];for(const[I,C]of l.entries()){const h=C/255;w[I]=h<=.03928?h/12.92:((h+.055)/1.055)**2.4}return .2126*w[0]+.7152*w[1]+.0722*w[2]},contrast(l){const w=this.luminosity(),I=l.luminosity();return w>I?(w+.05)/(I+.05):(I+.05)/(w+.05)},level(l){const w=this.contrast(l);return w>=7.1?"AAA":w>=4.5?"AA":""},isDark(){const l=this.rgb().color;return(l[0]*299+l[1]*587+l[2]*114)/1e3<128},isLight(){return!this.isDark()},negate(){const l=this.rgb();for(let w=0;w<3;w++)l.color[w]=255-l.color[w];return l},lighten(l){const w=this.hsl();return w.color[2]+=w.color[2]*l,w},darken(l){const w=this.hsl();return w.color[2]-=w.color[2]*l,w},saturate(l){const w=this.hsl();return w.color[1]+=w.color[1]*l,w},desaturate(l){const w=this.hsl();return w.color[1]-=w.color[1]*l,w},whiten(l){const w=this.hwb();return w.color[1]+=w.color[1]*l,w},blacken(l){const w=this.hwb();return w.color[2]+=w.color[2]*l,w},grayscale(){const l=this.rgb().color,w=l[0]*.3+l[1]*.59+l[2]*.11;return p.rgb(w,w,w)},fade(l){return this.alpha(this.valpha-this.valpha*l)},opaquer(l){return this.alpha(this.valpha+this.valpha*l)},rotate(l){const w=this.hsl();let I=w.color[0];return I=(I+l)%360,I=I<0?360+I:I,w.color[0]=I,w},mix(l,w){if(!l||!l.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof l);const I=l.rgb(),C=this.rgb(),h=w===void 0?.5:w,c=2*h-1,m=I.alpha()-C.alpha(),T=((c*m===-1?c:(c+m)/(1+c*m))+1)/2,D=1-T;return p.rgb(T*I.red()+D*C.red(),T*I.green()+D*C.green(),T*I.blue()+D*C.blue(),I.alpha()*h+C.alpha()*(1-h))}};for(const l of Object.keys(G.default)){if(o.includes(l))continue;const w=G.default[l].channels;p.prototype[l]=function(){if(this.model===l)return new p(this);if(arguments.length>0)return new p(arguments,l);const I=typeof arguments[w]=="number"?w:this.valpha;return new p(b(G.default[this.model][l].raw(this.color)).concat(I),l)},p[l]=function(I){return typeof I=="number"&&(I=s(u.call(arguments),w)),new p(I,l)}}function f(l,w){return Number(l.toFixed(w))}function y(l){return function(w){return f(w,l)}}function d(l,w,I){l=Array.isArray(l)?l:[l];for(const C of l)(_[C]||(_[C]=[]))[w]=I;return l=l[0],function(C){let h;return arguments.length>0?(I&&(C=I(C)),h=this[l](),h.color[w]=C,h):(h=this[l]().color[w],I&&(h=I(h)),h)}}function v(l){return function(w){return Math.max(0,Math.min(l,w))}}function b(l){return Array.isArray(l)?l:[l]}function s(l,w){for(let I=0;I<w;I++)typeof l[I]!="number"&&(l[I]=0);return l}x.COMMON_COLORS=A,x.DEFAULT_COLORS=E,x.default=p}(n2)),n2}var D4;function h5(){return D4||(D4=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=ln(),k=Bg(),F=Kt(),B=l5(),G=ci(),E=u5(),A=vr(),u=kr(),o=Si(),S=ht(),_=St();A.register("color-picker-reset",u.vIconColorReset),A.register("color-picker-custom",u.vIconPaintBucket);const p=30;function f(H,$){return H.color===$.color&&H.alpha===$.alpha}const y=S.defineComponent({name:"ColorPickerDropdown",components:{vTrapFocus:k.default,vDivider:B.default},mixins:[G.default,A.default],props:{customDropdownCls:{type:String,default:""},commonOptions:{type:Array,default:()=>E.COMMON_COLORS},options:{type:Array,default:()=>E.DEFAULT_COLORS},customOptions:{type:Array,default:()=>[]},hasCustom:{type:Boolean,default:!0},filterSameColor:{type:Boolean,default:!1},currentColor:{type:Object,default:()=>({})}},emits:["close-dropdown","select","reset","show-custom"],data(){return{activeIndex:-1}},computed:{hasTopDivider(){return this.hasCustom||o.hasSlot(this,"top-custom")||o.hasSlot(this,"bottom-custom")},hasBottomDivider(){return o.hasSlot(this,"bottom")},dropdownStyle(){return{overflow:"hidden"}},dropdownCls(){return["v-color-picker-dropdown","v-select-dropdown-placement-bottomLeft",this.customDropdownCls]},colorWrapperCls(){return["default-color-wrapper"]},innerOptions(){return this.options.map(H=>({color:H,alpha:1}))},innerCommonOptions(){return this.commonOptions.map(H=>({color:H,alpha:1}))},innerCustomOptions(){return this.customOptions.slice(0,p).map($=>F.isObject($)?$:{color:$,alpha:1}).filter($=>this.filterSameColor?![...this.innerOptions,...this.innerCommonOptions].some(V=>f(V,$)):!0)},allOptions(){return this.innerCommonOptions.concat(this.innerOptions).concat(this.innerCustomOptions)}},watch:{currentColor:{handler(){this.activeIndex=this.currentColor?this.allOptions.findIndex(H=>H.color===this.currentColor.color&&H.alpha===this.currentColor.alpha):-1},immediate:!0}},methods:{commonColorItemCls(H){return["color-item",{activated:this.activeIndex===H}]},colorItemCls(H){return H+=this.commonOptions.length,["color-item",{activated:this.activeIndex===H}]},customColorItemCls(H){return H+=this.commonOptions.length+this.options.length,["color-item",{activated:this.activeIndex===H}]},colorBlockCls(H){return{"has-border":E.default(H.color).hex()==="#FFFFFF"}},colorBlockStyle(H){return{"user-select":"none","background-color":E.default(H.color).alpha(F.isNumber(H.alpha)?H.alpha:1).string()}},closeDropdown(H){M.$emit(this,"close-dropdown",H)},reset(){M.$emit(this,"reset"),this.closeDropdown()},arrowSelect(H,$){const V=F.clampValue(this.activeIndex+H+$*10,0,this.allOptions.length-1);this.select(V)},clearSelection(){this.select(-1)},select(H){const $=this.allOptions[H];this.activeIndex=H,M.$emit(this,"select",H,$)},onClickButtonOption(H){this.select(H),this.closeDropdown()},onClickCustom(){M.$emit(this,"show-custom")}}}),d=["syno-id"],v={class:"reset-button-wrapper"},b=["syno-id"],s=["aria-activedescendant"],l=["syno-id","id","onClick"],w={class:"color-block"},I=["aria-activedescendant"],C=["syno-id","id","onClick"],h={class:"color-block"},c={key:1,class:"custom-button-wrapper"},m=["syno-id"],T={key:2,class:"custom-color-wrapper"},D=["syno-id","onClick"],O={class:"color-block"};function N(H,$,V,P,U,Y){const Z=S.resolveComponent("v-icon"),X=S.resolveComponent("v-divider"),J=S.resolveComponent("v-trap-focus"),q=S.resolveDirective("auto-focus");return S.openBlock(),S.createElementBlock("div",{ref:"dropdown","syno-id":`${H.synoId}-dropdown-menu`,style:S.normalizeStyle(H.dropdownStyle),class:S.normalizeClass(H.dropdownCls),onKeydown:$[12]||($[12]=S.withKeys(function(){return H.closeDropdown&&H.closeDropdown(...arguments)},["esc"]))},[S.createVNode(J,{ref:"dropdownTrapFocus"},{default:S.withCtx(()=>[S.createElementVNode("div",v,[S.createVNode(Z,{name:"color-picker-reset","svg-icon-set":"set01"}),S.createElementVNode("button",{"syno-id":`${H.synoId}-reset-btn`,class:"reset color-picker-button",onClick:$[0]||($[0]=te=>H.reset())},S.toDisplayString(H._i18n("common","reset")),9,b)]),S.createVNode(X),S.withDirectives((S.openBlock(),S.createElementBlock("ul",{class:"common-color-wrapper",role:"menu",tabindex:"0","aria-activedescendant":`option-${H.activeIndex}`,onKeydown:[$[1]||($[1]=S.withKeys(S.withModifiers(te=>H.arrowSelect(0,-1),["prevent"]),["up"])),$[2]||($[2]=S.withKeys(S.withModifiers(te=>H.arrowSelect(-1,0),["prevent"]),["left"])),$[3]||($[3]=S.withKeys(S.withModifiers(te=>H.arrowSelect(0,1),["prevent"]),["down"])),$[4]||($[4]=S.withKeys(S.withModifiers(te=>H.arrowSelect(1,0),["prevent"]),["right"])),$[5]||($[5]=S.withKeys(S.withModifiers(function(){return H.closeDropdown&&H.closeDropdown(...arguments)},["prevent"]),["enter"]))]},[(S.openBlock(!0),S.createElementBlock(S.Fragment,null,S.renderList(H.innerCommonOptions,(te,re)=>(S.openBlock(),S.createElementBlock("li",{key:re,"syno-id":`${H.synoId}-option-${te.color}`,id:`options-${re}`,class:S.normalizeClass(H.commonColorItemCls(re)),role:"menuitem","aria-selected":"false",onClick:ie=>H.onClickButtonOption(re)},[S.createElementVNode("i",w,[S.createElementVNode("i",{class:S.normalizeClass(["cover",H.colorBlockCls(te)]),style:S.normalizeStyle(H.colorBlockStyle(te))},null,6)])],10,l))),128))],40,s)),[[q]]),S.createVNode(X),S.createElementVNode("ul",{class:S.normalizeClass(H.colorWrapperCls),role:"menu",tabindex:"0","aria-activedescendant":`option-${H.activeIndex}`,onKeydown:[$[6]||($[6]=S.withKeys(S.withModifiers(te=>H.arrowSelect(0,-1),["prevent"]),["up"])),$[7]||($[7]=S.withKeys(S.withModifiers(te=>H.arrowSelect(-1,0),["prevent"]),["left"])),$[8]||($[8]=S.withKeys(S.withModifiers(te=>H.arrowSelect(0,1),["prevent"]),["down"])),$[9]||($[9]=S.withKeys(S.withModifiers(te=>H.arrowSelect(1,0),["prevent"]),["right"])),$[10]||($[10]=S.withKeys(S.withModifiers(function(){return H.closeDropdown&&H.closeDropdown(...arguments)},["prevent"]),["enter"]))]},[(S.openBlock(!0),S.createElementBlock(S.Fragment,null,S.renderList(H.innerOptions,(te,re)=>(S.openBlock(),S.createElementBlock("li",{key:re,"syno-id":`${H.synoId}-option-${te.color}`,id:`options-${re}`,class:S.normalizeClass(H.colorItemCls(re)),role:"menuitem","aria-selected":"false",onClick:ie=>H.onClickButtonOption(re+H.commonOptions.length)},[S.createElementVNode("i",h,[S.createElementVNode("i",{class:S.normalizeClass(["cover",H.colorBlockCls(te)]),style:S.normalizeStyle(H.colorBlockStyle(te))},null,6)])],10,C))),128))],42,I),H.hasTopDivider?(S.openBlock(),S.createBlock(X,{key:0})):S.createCommentVNode("",!0),S.renderSlot(H.$slots,"top-custom"),H.hasCustom?(S.openBlock(),S.createElementBlock("div",c,[S.createVNode(Z,{name:"color-picker-custom","svg-icon-set":"set01"}),S.createElementVNode("button",{"syno-id":`${H.synoId}-custom-btn`,class:"custom color-picker-button",onClick:$[11]||($[11]=te=>H.onClickCustom())},S.toDisplayString(H._i18n("common","custom")),9,m)])):S.createCommentVNode("",!0),S.renderSlot(H.$slots,"bottom-custom"),H.innerCustomOptions.length>0?(S.openBlock(),S.createElementBlock("ul",T,[(S.openBlock(!0),S.createElementBlock(S.Fragment,null,S.renderList(H.innerCustomOptions,(te,re)=>(S.openBlock(),S.createElementBlock("li",{key:re,"syno-id":`${H.synoId}-option-${te.color}`,class:S.normalizeClass(H.customColorItemCls(re)),role:"menuitem","aria-selected":"false",onClick:ie=>H.onClickButtonOption(re+H.commonOptions.length+H.options.length)},[S.createElementVNode("i",O,[S.createElementVNode("i",{class:S.normalizeClass(["cover",H.colorBlockCls(te)]),style:S.normalizeStyle(H.colorBlockStyle(te))},null,6)])],10,D))),128))])):S.createCommentVNode("",!0),H.hasBottomDivider?(S.openBlock(),S.createBlock(X,{key:3})):S.createCommentVNode("",!0),S.renderSlot(H.$slots,"bottom")]),_:3},512)],46,d)}var z=_.default(y,[["render",N]]);x.default=z}(e2)),e2}var O4;function aee(){return O4||(O4=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Ni(),k=ln(),F=Zo(),B=lh(),G=Tl(),E=xl(),A=ci(),u=Ru(),o=h5(),S=u5(),_=vr(),p=kr(),f=ht(),y=St();_.register("color-picker-dropdown",p.vIconButtonArrowDown);const d=f.defineComponent({name:"ColorPicker",components:{vColorPickerDropdown:o.default},directives:{clickoutside:u.default},mixins:[F.default,A.default,G.default,E.default,_.default],props:{align:{type:String,default:"tl->bl"},dropdownOffset:{type:Array,default:()=>[0,1]},alignOptions:{type:Object,default:()=>{}},disabled:{type:Boolean,default:!1},[M.componentsProps.value()]:{type:String,default:""},alpha:{type:Number,default:1},customDropdownCls:{type:String,default:""},options:{type:Array,default:()=>S.DEFAULT_COLORS},commonOptions:{type:Array,default:()=>S.COMMON_COLORS},customOptions:{type:Array,default:()=>[]},position:{type:String,default:"absolute"},dropdownWidth:{type:String,default:"234px"},id:{type:String,default(){return`syno-${B.uuid()}`}},name:{type:String,default:""},hasCustom:{type:Boolean,default:!0},filterSameColor:{type:Boolean,default:!1}},emits:["select","showcustom","update:model-value"],data(){return{prefix:"v-select",orgValue:"",isFocused:!1,found:!1,show:!1,container:null,activeIndex:-1}},computed:{currentColor(){return{color:M.getModelValue(this),alpha:this.alpha}},alignment(){return{pos:this.align,offset:this.dropdownOffset,opts:this.alignOptions}},wrapCls(){return[`${this.prefix}-wrapper v-color-picker-wrapper`,{disabled:this.disabled,focused:this.isFocused||this.show}]},dropdownCls(){return[`${this.prefix}-dropdown`,"v-color-picker-dropdown",`${this.prefix}-dropdown-placement-bottomLeft`,this.customDropdownCls]},iconStyle(){const w=this.currentColor;return{backgroundColor:S.default(w.color||"#FFFFFF").alpha(w.alpha).string()}}},watch:{show:{async handler(w){w||this.$refs.colorPickerBtn&&this.$refs.colorPickerBtn.focus()}}},mounted(){this.orgValue=M.getModelValue(this)||""},methods:{clickOutside(){this.show=!1},reset(){k.$emit(this,"input",this.orgValue)},showCustom(){this.show=!1,k.$emit(this,"showcustom")},showDropdown(){this.show=!0},closeDropdown(w){this.show=!1},toggleDropdown(){this.disabled||(this.show?this.closeDropdown():this.showDropdown())},updateActiveIndex(w){return this.$refs.dropdown?.updateActiveIndex(w)},clearSelection(){return this.activeIndex=-1,this.$refs.dropdown?.clearSelection()},select(w,I){const C=I?I.color:"";k.$emit(this,M.getModelEventName(this),C),k.$emit(this,"select",I)}}}),v=["aria-expanded"],b=["name"];function s(w,I,C,h,c,m){const T=f.resolveComponent("v-icon"),D=f.resolveComponent("v-color-picker-dropdown"),O=f.resolveComponent("v-portal"),N=f.resolveDirective("syno-id"),z=f.resolveDirective("clickoutside");return f.withDirectives((f.openBlock(),f.createElementBlock("div",{ref:"colorPickerBtn",class:f.normalizeClass(w.wrapCls),tabindex:"0",role:"combobox","aria-haspopup":"true","aria-expanded":w.show,onClick:I[0]||(I[0]=function(){return w.toggleDropdown&&w.toggleDropdown(...arguments)}),onKeydown:[I[1]||(I[1]=f.withKeys(f.withModifiers(function(){return w.showDropdown&&w.showDropdown(...arguments)},["prevent","stop"]),["enter"])),I[2]||(I[2]=f.withKeys(f.withModifiers(function(){return w.showDropdown&&w.showDropdown(...arguments)},["prevent","stop"]),["down"]))],onFocus:I[3]||(I[3]=H=>w.isFocused=!0),onBlur:I[4]||(I[4]=H=>w.isFocused=!1)},[f.withDirectives((f.openBlock(),f.createElementBlock("span",{ref:"colorIcon",class:f.normalizeClass(w.prefix+"-color-icon"),style:f.normalizeStyle(w.iconStyle),name:w.name},[f.createElementVNode("i",{class:"cover",style:f.normalizeStyle(w.iconStyle)},null,4)],14,b)),[[N]]),f.createVNode(T,{name:"color-picker-dropdown",class:f.normalizeClass(w.prefix+"-dropdown-icon"),"svg-icon-set":"set01"},null,8,["class"]),w.show?(f.openBlock(),f.createBlock(O,{key:0,"mount-to":w.getContainerEl(),alignment:w.alignment,anchor:w.$el,"acquire-z-index":""},{default:f.withCtx(()=>[f.createVNode(D,{"syno-id":w.synoId,"filter-same-color":w.filterSameColor,"has-custom":w.hasCustom,options:w.options,"current-color":w.currentColor,"common-options":w.commonOptions,"custom-options":w.customOptions,ref:"dropdown",onSelect:w.select,onCloseDropdown:w.closeDropdown,onReset:w.reset,onShowCustom:w.showCustom},f.createSlots({_:2},[f.renderList(w.$slots,(H,$)=>({name:$,fn:f.withCtx(V=>[f.renderSlot(w.$slots,$,f.normalizeProps(f.guardReactiveProps(V)))])}))]),1032,["syno-id","filter-same-color","has-custom","options","current-color","common-options","custom-options","onSelect","onCloseDropdown","onReset","onShowCustom"])]),_:3},8,["mount-to","alignment","anchor"])):f.createCommentVNode("",!0)],42,v)),[[z,w.clickOutside,void 0,{children:!0}]])}var l=y.default(d,[["render",s]]);x.default=l}(QP)),QP}var r2={},i2={},o2={},N4;function sT(){return N4||(N4=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=df(),k=ci(),F=vr(),B=ya(),G=kr(),E=ht(),A=St();F.register("status-error",G.vIconStatusError),F.register("status-normal",G.vIconStatusNormal);const u=E.defineComponent({name:"StatusBar",components:{SpinIcon:M.default},directives:{tooltip:B.default},mixins:[k.default,F.default],props:{state:{type:String,default:""},successText:{type:String,default:void 0},errorText:{type:String,default:void 0},loadingText:{type:String,default:void 0},text:{type:String,default:void 0},show:{type:Boolean,default:!1},autoHide:{type:Boolean,default:!0}},data:()=>({successState:void 0,errorState:void 0,loadingState:void 0}),computed:{innerSuccessText(){return this.successText??this._i18n("common","setting_applied")},innerErrorText(){return this.errorText??this._i18n("common","error_system")},innerLoadingText(){return this.loadingText??this._i18n("common","loading")},stateBarCls(){return this.state==="success"?"success":this.state==="error"?"error":"loading"},currentText(){return this.state==="success"?this.innerSuccessText:this.state==="error"?this.innerErrorText:this.innerLoadingText}}}),o={class:"status-text"};function S(p,f,y,d,v,b){const s=E.resolveComponent("v-icon"),l=E.resolveComponent("spin-icon"),w=E.resolveDirective("tooltip");return E.openBlock(),E.createBlock(E.Transition,{name:"fade"},{default:E.withCtx(()=>[E.withDirectives(E.createElementVNode("div",{class:E.normalizeClass(["v-status-bar",p.stateBarCls])},[E.withDirectives((E.openBlock(),E.createElementBlock("div",o,[p.useSvgIcon?(E.openBlock(),E.createElementBlock(E.Fragment,{key:0},[p.state==="success"?(E.openBlock(),E.createBlock(s,{key:0,name:"status-normal"})):p.state==="error"?(E.openBlock(),E.createBlock(s,{key:1,name:"status-error"})):(E.openBlock(),E.createBlock(l,{key:2,class:"status-icon"}))],64)):(E.openBlock(),E.createElementBlock(E.Fragment,{key:1},[p.state!=="loading"?(E.openBlock(),E.createBlock(s,{key:0,name:"status-icon"})):(E.openBlock(),E.createBlock(l,{key:1,class:"status-icon"}))],64)),E.createTextVNode(" "+E.toDisplayString(p.currentText),1)])),[[w,{overflowOnly:!0,content:p.currentText}]])],2),[[E.vShow,p.show]])]),_:1})}var _=A.default(u,[["render",S]]);x.default=_}(o2)),o2}var a2={},P4;function lT(){return P4||(P4=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=ht(),k=St();const F=M.defineComponent({name:"Toolbar",data(){return{}}}),B={class:"v-toolbar"},G={class:"main-wrapper"},E={class:"right-wrapper"};function A(o,S,_,p,f,y){return M.openBlock(),M.createElementBlock("div",B,[M.createElementVNode("div",G,[M.renderSlot(o.$slots,"default")]),M.createElementVNode("div",E,[M.renderSlot(o.$slots,"right")])])}var u=k.default(F,[["render",A]]);x.default=u}(a2)),a2}var s2={},l2={},B4;function c5(){return B4||(B4=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Eu(),k=Zo(),F=xl(),B=fr(),G=Dr(),E=Kt(),A=_i(),u=vr(),o=kr(),S=ln(),_=Si(),p=Xn(),f=ht(),y=St();u.register("menu-submenu-triangle-right",o.vIconSubmenuTriangleRight);const d=f.defineComponent({name:"MenuSubmenu",components:{vMenu:M.default},mixins:[k.default,B.provide("sub-menu-item"),B.inject("menu"),F.default,u.default],props:{title:{type:String,default:void 0},desc:{type:String,default:void 0},icon:{type:[String,Object],default:void 0},disabled:{type:Boolean,default:!1},width:{type:[Number,String],default:188,validator:s=>typeof s=="string"?s==="auto":!0},height:{type:Number,default:void 0},useScrollbar:{type:Boolean,default:!1},zIndex:{type:Number,default:15e3},tooltip:{type:[String,Object],default:()=>{}},constrainHeight:{type:Boolean,default:!1},onClose:{type:Function,default:void 0},arrowIcon:{type:Boolean,default:!0},alignment:{type:[Object,String],default:()=>({})}},emits:["reposition-done","menu-opened","menu-closed"],data(){return{isOpen:!1,subPosX:0,subPosY:0,isOver:!1,hasChildMenu:!0,parentMenu:null,active:!1,menuStyle:{top:0,left:0,zIndex:void 0}}},computed:{innerAlignment(){const s=A.merge({pos:"tl->tr",opts:{constrainHeight:!1}},this.menu?.instance?.getDefaultAlignment()??{},{opts:{constrainHeight:this.constrainHeight}});return E.isObject(this.alignment)?A.merge(s,this.alignment):A.merge(s,{pos:this.alignment})},showIcon(){return this.icon},iconProps(){if(E.isObject(this.icon))return this.icon;let s=E.isString(this.icon)?{name:this.icon}:{};return this.type==="checkbox"?s={name:"menu-item-checkbox",sprite:!0}:this.type==="select"&&(s={name:this.innerSelected?"menu-item-tick":"menu-item-untick",svgIconSet:"set03"}),s},iconCls(){return["v-icon","icon--left"]},titleCls(){return["v-menu-submenu-title",{"v-menu-submenu-disabled":this.disabled}]},itemCls(){return["v-menu-submenu",{"v-menu-submenu-open":this.isOpen,active:this.active}]},activatable(){return!this.disabled},innerTooltip(){const s=E.isString(this.tooltip)?{content:this.tooltip,overflowOnly:!1}:this.tooltip;return A.merge({content:this.desc?`${this.title} ${this.desc}`:this.title,overflowOnly:()=>this.$refs.text},s)}},watch:{isOver:{handler(s){s===!1&&this.tryCloseMenu()}}},created(){this.dispatch("Menu","item-created",this)},mounted(){this.menu.register(this)},[p.componentHooks.beforeUnmount](){this.menu.unregister(this),this.dispatch("Menu","item-removed",this)},methods:{innerOnClose(){this.isOpen=!1,this.onClose?.()},getSlots(){return _.getSlots(this)},register(s){s.parentMenuItem=this},unregister(s){delete s.parentMenuItem},canClose(){return this.$refs.childMenu?!this.isOver&&this.$refs.childMenu.canClose():!this.isOver},tryCloseMenu(){window.setTimeout(()=>{this.canClose()&&(this.closeMenu(),this.parentMenu&&this.parentMenu.tryCloseMenu())},0)},closeMenu(){this.$refs.childMenu?.closeMenu()},async openChildMenu(){return this.isOver=!0,this.disabled||(this.isOpen=!0),await this.$nextTick()},async openChildMenuWithFocus(){await this.openChildMenu(),S.$on(this,"reposition-done",()=>{G.focusWithoutScroll(this.$refs.childMenu.$refs.menu.$el)})},onMouseEnter(s){this.dispatch("Menu","item-hover",this),this.openChildMenu()},onMouseLeave(s){this.dispatch("Menu","item-hover-out",this)},activate(){this.$el.focus(),this.active=!0},deactivate(){this.active=!1,this.isOver=!1},onMenuAligned(s){this.$refs.childMenu.tryConstrain(s),S.$emit(this,"reposition-done")},onMenuOpened(){S.$emit(this,"menu-opened")},onMenuClosed(){S.$emit(this,"menu-closed")}}});function v(s,l,w,I,C,h){const c=f.resolveComponent("v-icon"),m=f.resolveComponent("v-menu"),T=f.resolveComponent("v-portal"),D=f.resolveDirective("tooltip"),O=f.resolveDirective("syno-id");return f.withDirectives((f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(s.itemCls),tabindex:"0",onMouseenter:l[0]||(l[0]=function(){return s.onMouseEnter&&s.onMouseEnter(...arguments)}),onMouseleave:l[1]||(l[1]=function(){return s.onMouseLeave&&s.onMouseLeave(...arguments)})},[f.createElementVNode("div",{ref:"title-wrapper",class:f.normalizeClass(s.titleCls)},[f.renderSlot(s.$slots,"title",{},()=>[s.showIcon?(f.openBlock(),f.createBlock(c,f.mergeProps({key:0,class:s.iconCls},s.iconProps),null,16,["class"])):f.createCommentVNode("",!0),f.createElementVNode("span",{ref:"text",class:"title"},f.toDisplayString(s.title),513),s.desc?(f.openBlock(),f.createElementBlock("span",{key:1,ref:"desc",class:"desc"},f.toDisplayString(s.desc),513)):f.createCommentVNode("",!0)]),s.arrowIcon?(f.openBlock(),f.createBlock(c,{key:0,name:"menu-submenu-triangle-right","svg-icon-set":"set01",size:"thin-rect"})):f.createCommentVNode("",!0)],2),s.isOpen?(f.openBlock(),f.createBlock(T,{key:0,"mount-to":s.getContainerEl(),ref:"portal",anchor:s.$el,alignment:s.innerAlignment,"acquire-z-index":"",onAligned:s.onMenuAligned},{default:f.withCtx(()=>[f.createVNode(m,{ref:"childMenu",width:s.width,height:s.height,"use-scrollbar":s.useScrollbar,"is-root":!1,"z-index":s.zIndex,"syno-id":`${s.synoId}-child-menu`,"on-close":s.innerOnClose,"default-alignment":s.innerAlignment,onMenuOpened:s.onMenuOpened,onMenuClosed:s.onMenuClosed},f.createSlots({_:2},[f.renderList(s.getSlots(),(N,z)=>({name:z,fn:f.withCtx(H=>[f.renderSlot(s.$slots,z,f.normalizeProps(f.guardReactiveProps(H)))])}))]),1032,["width","height","use-scrollbar","z-index","syno-id","on-close","default-alignment","onMenuOpened","onMenuClosed"])]),_:3},8,["mount-to","anchor","alignment","onAligned"])):f.createCommentVNode("",!0)],34)),[[D,s.innerTooltip],[O]])}var b=y.default(d,[["render",v]]);x.default=b}(l2)),l2}var L4;function d5(){return L4||(L4=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=ln(),k=ci(),F=lT(),B=nT(),G=Eu(),E=lc(),A=c5(),u=Jx(),o=ht(),S=St();const _={DIVIDER:"divider",DROPDOWN:"dropdown"},p={DIVIDER:"divider"},f=o.defineComponent({name:"OverflowToolbar",components:{vOverflowList:B.default,vMenu:G.default,vMenuItem:E.default,vMenuSubmenu:A.default,vMenuDivider:u.default},extends:F.default,mixins:[k.default],props:{items:{type:Array,default:()=>[]},minVisibleItemsNum:{type:Number,default:1},getMoreButtonText:{type:Function,default:void 0},moreMenu:{type:Object,default:()=>({})}},emits:["click-item"],data(){return{}},computed:{},methods:{getInnerMoreButtonText(s){return this.getMoreButtonText?this.getMoreButtonText(s):s.visibleItems.length<=0?this._i18n("common","action"):this._i18n("common","more")},isDropdown(s){return s.type===_.DROPDOWN},isDivider(s){return s.type===_.DIVIDER},isDividerMenuItem(s){return s.type===p.DIVIDER},getButtonType(s){return s.type==="basic"?"":s.type},getItemId(s){return s.id??s.title},getItemSynoId(s){return`${this.synoId}-${this.getItemId(s)}`},onClickItem(s){this.isDropdown(s)||M.$emit(this,"click-item",s)},getMenuBind(s){return s.menuBind??s.bind}}}),y={class:"v-toolbar v-overflow-toolbar"},d={class:"right-wrapper"};function v(s,l,w,I,C,h){const c=o.resolveComponent("v-button-split"),m=o.resolveComponent("v-menu-divider"),T=o.resolveComponent("v-menu-item"),D=o.resolveComponent("v-menu"),O=o.resolveComponent("v-button"),N=o.resolveComponent("v-menu-submenu"),z=o.resolveComponent("v-overflow-list"),H=o.resolveDirective("syno-id");return o.withDirectives((o.openBlock(),o.createElementBlock("div",y,[o.createVNode(z,{items:s.items,"min-visible-items-num":s.minVisibleItemsNum},o.createSlots({default:o.withCtx($=>{let{item:V}=$;return[o.renderSlot(s.$slots,V.slot,{item:V},()=>[s.isDivider(V)?(o.openBlock(),o.createBlock(c,o.normalizeProps(o.mergeProps({key:0},V.bind)),null,16)):(o.openBlock(),o.createBlock(O,o.mergeProps({key:1,type:s.getButtonType(V)},V.bind,{onClick:P=>s.onClickItem(V),"syno-id":s.getItemSynoId(V)}),o.createSlots({default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(V.title)+" ",1)]),_:2},[V.menuItems||V.slot?{name:"dropdown",fn:o.withCtx(()=>[o.createVNode(D,o.mergeProps({"syno-id":`${s.getItemSynoId(V)}-menu`},V.menu),{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(V.menuItems,P=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[s.isDividerMenuItem(P)?(o.openBlock(),o.createBlock(m,o.mergeProps({key:0},s.getMenuBind(P),{key:P.id,"syno-id":s.getItemSynoId(P),onClick:U=>s.onClickItem(P)}),null,16,["syno-id","onClick"])):(o.openBlock(),o.createBlock(T,o.mergeProps({key:1},s.getMenuBind(P),{key:P.id,"syno-id":s.getItemSynoId(P),title:P.title,onClick:U=>s.onClickItem(P)}),null,16,["syno-id","title","onClick"]))],64))),256))]),_:2},1040,["syno-id"])]),key:"0"}:void 0]),1040,["type","onClick","syno-id"]))])]}),"overflow-item":o.withCtx($=>[o.renderSlot(s.$slots,"overflow-item",o.normalizeProps(o.guardReactiveProps($)),()=>[o.createVNode(O,{type:"dropdown","syno-id":`${s.synoId}-more`},{dropdown:o.withCtx(()=>[o.createVNode(D,o.mergeProps({"syno-id":`${s.synoId}-more-menu`},s.moreMenu),{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList($.overflowItems,(V,P)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[V.menuItems?(o.openBlock(),o.createBlock(N,o.mergeProps({title:V.title,key:V.id,"syno-id":`${s.getItemSynoId(V)}-submenu`},s.getMenuBind(V)),{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(V.menuItems,U=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[s.isDividerMenuItem(U)?(o.openBlock(),o.createBlock(m,o.mergeProps({key:0},s.getMenuBind(U),{key:U.id,"syno-id":s.getItemSynoId(U),onClick:Y=>s.onClickItem(U)}),null,16,["syno-id","onClick"])):(o.openBlock(),o.createBlock(T,o.mergeProps({key:1},s.getMenuBind(U),{key:U.id,"syno-id":s.getItemSynoId(U),title:U.title,onClick:Y=>s.onClickItem(U)}),null,16,["syno-id","title","onClick"]))],64))),256))]),_:2},1040,["title","syno-id"])):s.isDivider(V)?P>0?(o.openBlock(),o.createBlock(m,o.mergeProps({key:2},s.getMenuBind(V),{key:V.id,"syno-id":`divider-${P}`}),null,16,["syno-id"])):o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(T,o.mergeProps({key:1},s.getMenuBind(V),{key:V.id,"syno-id":s.getItemSynoId(V),title:V.title,onClick:U=>s.onClickItem(V)}),null,16,["syno-id","title","onClick"]))],64))),256))]),_:2},1040,["syno-id"])]),default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(s.getInnerMoreButtonText($))+" ",1)]),_:2},1032,["syno-id"])])]),_:2},[o.renderList(["overflow-start-anchor","overflow-end-anchor"],$=>({name:$,fn:o.withCtx(V=>[o.renderSlot(s.$slots,$,o.normalizeProps(o.guardReactiveProps(V)))])}))]),1032,["items","min-visible-items-num"]),o.createElementVNode("div",d,[o.renderSlot(s.$slots,"right")])])),[[H]])}var b=S.default(f,[["render",v]]);x.default=b}(s2)),s2}var F4;function uT(){return F4||(F4=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=ln(),k=La(),F=tv(),B=sT(),G=ci(),E=Si(),A=Kt(),u=kl(),o=lT(),S=d5(),_=wa(),p=Pg(),f=Ur(),y=Kl(),d=fr(),v=ht(),b=St();const s={BASIC:"basic",OVERFLOW:"overflow",NONE:"none"},l=20,w={ROW:"row"},I=v.defineComponent({name:"Panel",components:{vButton:k.default,vSpin:F.default,vStatusBar:B.default,vLayout:u.default,vScrollbar:_.default,withTransitionGroup:y.withWrap(v.TransitionGroup)},mixins:[G.default,d.provide("alert-bar-container")],props:{loadingText:{type:String,default:void 0},tbar:{type:[Boolean,Object],default:!1},fbar:{type:[Boolean,Object],default:!0},hasTbar:{type:Boolean,default:!1},hasFbar:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},successText:{type:String,default:void 0},errorText:{type:String,default:void 0},showStatusBar:{type:Boolean,default:!1},autoHideStatusBar:{type:Boolean,default:!0},autoHideTimer:{type:Number,default:5e3},statusBarState:{type:String,default:"loading"},loadingType:{type:String,default:"spin"},cancel:{type:Function,default:()=>{}},cancelBtnDisabled:{type:Boolean,default:!1},confirm:{type:Function,default:()=>{}},confirmBtnDisabled:{type:Boolean,default:!1},useDefaultTBar:{type:Boolean,default:!0},tbarBorder:{type:Boolean,default:!1},cancelText:{type:String,default:void 0},confirmText:{type:String,default:void 0},fluidFooter:{type:Boolean,default:!0},layoutType:{type:String,default:"content"},layoutOrder:{type:Number,default:0},mobileBreakpoint:{type:[String,Boolean],default:"xxs"},footerDirection:{type:Object,default(){return{mobile:w.ROW,desktop:w.ROW}}},detectScroll:{type:Boolean,default:!1},scrollbarOption:{type:Object,default:()=>({})}},emits:["update:show-status-bar","click-toolbar-item","click-toolbar-item"],data:()=>({prefixCls:"v-panel",reachYEnd:!0,reachYStart:!0,toolbarShown:!0,$_scroll:0}),computed:{hasConfirmButton(){return A.isObject(this.fbar)?A.isBoolean(this.fbar.confirm)?this.fbar.confirm:!0:!!this.fbar},hasCancelButton(){return A.isObject(this.fbar)?A.isBoolean(this.fbar.cancel)?this.fbar.cancel:!0:!!this.fbar},confirmBinding(){return A.isObject(this.fbar)&&A.isObject(this.fbar.confirm)?this.fbar.confirm:{}},cancelBinding(){return A.isObject(this.fbar)&&A.isObject(this.fbar.cancel)?this.fbar.cancel:{}},innerLoadingText(){return this.loadingText??this._i18n("common","loading")},innerSuccessText(){return this.successText??this._i18n("common","setting_applied")},innerErrorText(){return this.errorText??this._i18n("common","error_system")},hasToolbarTransition(){return!!this.tbar?.transition},toolbarScrollTransition(){return this.tbar?.transition?.action==="scroll"},transitionToolbarName(){return this.tbar?.transition?.name??"slide-toolbar"},toolbarComponent(){return this.toolbarType===s.BASIC?o.default:S.default},toolbarType(){return A.isObject(this.tbar)?this.tbar.type:this.tbar===!0?s.BASIC:this.hasTbar?(f.deprecate("hasTbar","tbar",this),s.BASIC):s.NONE},useFooter(){return this.hasFbar!==!0?(f.deprecate("hasFbar","fbar",this),this.hasFbar):this.fbar},useToolbar(){return this.toolbarScrollTransition?this.toolbarShown:this.useBasicToolbar||this.useOverflowToolbar},useBasicToolbar(){return this.toolbarType===s.BASIC},useOverflowToolbar(){return this.toolbarType===s.OVERFLOW},tbarCls(){let c=this.tbar?.defaultStyle!==!1;return this.useDefaultTBar===!1&&(f.deprecate("useDefaultTBar","tbar.defaultStyle",this),c=this.useDefaultTBar),this.tbarBorder&&f.deprecate("tbarBorder","tbar.border",this),["tbar-wrapper",{"default-tbar":c,"tbar-has-border":this.tbar?.border||this.tbarBorder}]},footerCls(){return this.isMobile?this.footerDirection?.mobile??w.ROW:this.footerDirection?.desktop??w.ROW},bodyWrapperCls(){return["layout-body-wrapper",{"reach-y-start":this.detectScroll&&this.reachYStart,"reach-y-end":this.detectScroll&&this.reachYEnd}]},panelCls(){return["v-panel",{mobile:this.isMobile}]},bodyWrapper(){return{"flex-bug":p.isSafariAndVersionMatch("<",17)}},fbarCls(){return["fbar-wrapper",{"fbar-wrapper--fluid":this.fluidFooter,"reach-y-start":this.detectScroll&&this.reachYStart,"reach-y-end":this.detectScroll&&this.reachYEnd}]},isSpinType(){return this.loadingType==="spin"},panelBodyStyle(){return{"--panel-in-tabs-padding-top":this.useToolbar?"8px":"0"}},isMobile(){return!this.$breakpointManager&&this.mobileBreakpoint?(f.remind("please import and use BreakpointManagerPlugin when you are in tree-shaking mode or breakpoint will not active."),!1):this.mobileBreakpoint&&this.$breakpointManager?.lessAndEqThan(this.mobileBreakpoint)}},watch:{statusBarState(c){this.delayHideStatusBar()},showStatusBar(c){this.delayHideStatusBar()}},async mounted(){await this.$nextTick(),this.detectReachStartEnd()},methods:{hasScrollBodySlot(){return E.hasSlot(this,"scroll-body")},hasContentBodySlot(){return E.hasSlot(this,"content-body")},delayHideStatusBar(){!this.autoHideStatusBar||this.statusBarState==="loading"||window.setTimeout(()=>{M.$emit(this,"update:show-status-bar",!1)},this.autoHideTimer)},detectReachStartEnd(){if(this.detectScroll){const c=this.$refs.scrollbar.getScrollEl(),m=c.scrollTop;this.reachYStart=m===0,this.reachYEnd=c.scrollHeight<=c.offsetHeight||m===c.scrollHeight-c.offsetHeight}},determineToolbarShownWhenScroll(){const c=this.$refs.scrollbar?.getScrollTop()??0;Math.abs(c-this.$data.$_scroll)>l&&(c>this.$data.$_scroll?this.toolbarShown=!1:this.toolbarShown=!0,this.$data.$_scroll=c)},handleScroll(c){this.toolbarScrollTransition&&this.determineToolbarShownWhenScroll(),this.detectReachStartEnd()},getScrollEl(){return this.$refs.scrollbar?.getScrollEl()},onClickToolbarItem(c){M.$emit(this,"click-toolbar-item",c)}}});function C(c,m,T,D,O,N){const z=v.resolveComponent("v-layout"),H=v.resolveComponent("v-scrollbar"),$=v.resolveComponent("with-transition-group"),V=v.resolveComponent("v-status-bar"),P=v.resolveComponent("v-button"),U=v.resolveComponent("v-spin"),Y=v.resolveDirective("syno-id");return v.withDirectives((v.openBlock(),v.createBlock(z,{class:v.normalizeClass(c.panelCls),type:`panel.${c.layoutType}`,order:c.layoutOrder},{default:v.withCtx(()=>[v.createVNode(U,{class:v.normalizeClass(c.prefixCls+"-wrapper"),tip:c.innerLoadingText,spinning:c.loading,"only-mask":!c.isSpinType},{"spin-inner":v.withCtx(()=>[v.renderSlot(c.$slots,"spin-inner")]),default:v.withCtx(()=>[v.createVNode(z,{class:v.normalizeClass(c.bodyWrapperCls),type:"panel-body",style:v.normalizeStyle(c.panelBodyStyle),"custom-layout-styles":{"layout-padding-top":"--svc-panel-layout-padding-top"}},{default:v.withCtx(()=>[v.createVNode($,{wrap:c.hasToolbarTransition,name:c.transitionToolbarName,multiple:!0,tag:"div",class:"layout-body-wrapper-transition"},{default:v.withCtx(()=>[v.renderSlot(c.$slots,"tbar-wrapper",{},()=>[c.useToolbar?(v.openBlock(),v.createBlock(v.resolveDynamicComponent(c.toolbarComponent),{key:"toolbar",class:v.normalizeClass(c.tbarCls),items:c.tbar.items,"min-visible-items-num":c.tbar.minVisibleItemsNum,onClickItem:c.onClickToolbarItem,"syno-id":`${c.synoId}-toolbar`,"get-more-button-text":c.tbar.getMoreButtonText,"more-menu":c.tbar.moreMenu},v.createSlots({right:v.withCtx(()=>[v.renderSlot(c.$slots,"tbar-right")]),default:v.withCtx(()=>[v.renderSlot(c.$slots,"tbar")]),_:2},[v.renderList(["overflow-start-anchor","overflow-end-anchor"],Z=>({name:Z,fn:v.withCtx(X=>[v.renderSlot(c.$slots,Z,v.normalizeProps(v.guardReactiveProps(X)))])}))]),1064,["class","items","min-visible-items-num","onClickItem","syno-id","get-more-button-text","more-menu"])):v.createCommentVNode("",!0)]),v.createElementVNode("div",{class:v.normalizeClass(["body-wrapper",c.bodyWrapper]),key:"body-wrapper"},[v.renderSlot(c.$slots,"body"),c.hasScrollBodySlot()?(v.openBlock(),v.createBlock(H,v.mergeProps({key:0},c.scrollbarOption,{onScroll:c.handleScroll,ref:"scrollbar"}),{default:v.withCtx(()=>[v.createVNode(z,{type:c.useToolbar?"toolbar-content":"content"},{default:v.withCtx(()=>[v.renderSlot(c.$slots,"scroll-body")]),_:3},8,["type"])]),_:3},16,["onScroll"])):v.createCommentVNode("",!0),c.hasContentBodySlot()?(v.openBlock(),v.createBlock(z,{key:1,type:c.useToolbar?"toolbar-content":"content"},{default:v.withCtx(()=>[v.renderSlot(c.$slots,"content-body")]),_:3},8,["type"])):v.createCommentVNode("",!0)],2)]),_:3},8,["wrap","name"])]),_:3},8,["class","style"]),c.useFooter?(v.openBlock(),v.createBlock(z,{key:0,class:v.normalizeClass(c.fbarCls),type:"panel-fbar"},{default:v.withCtx(()=>[c.loadingType==="statusbar"?v.renderSlot(c.$slots,"status-bar",{key:0},()=>[v.createVNode(V,{state:c.statusBarState,show:c.showStatusBar,"success-text":c.innerSuccessText,"error-text":c.innerErrorText,"loading-text":c.innerLoadingText},null,8,["state","show","success-text","error-text","loading-text"])]):v.createCommentVNode("",!0),v.renderSlot(c.$slots,"fbar",{},()=>[v.createElementVNode("div",{class:v.normalizeClass(["default pull-right button-region",c.footerCls])},[c.hasCancelButton?(v.openBlock(),v.createBlock(P,v.mergeProps({key:0,"syno-id":`${c.synoId}-fbar-cancel`,type:"footbar",suffix:"cancel",onClick:c.cancel,disabled:c.cancelBtnDisabled},c.cancelBinding),{default:v.withCtx(()=>[v.createTextVNode(v.toDisplayString(c.cancelText||c._i18n("common","cancel")),1)]),_:1},16,["syno-id","onClick","disabled"])):v.createCommentVNode("",!0),c.hasConfirmButton?(v.openBlock(),v.createBlock(P,v.mergeProps({key:1,"syno-id":`${c.synoId}-fbar-commit`,type:"footbar",suffix:"main",onClick:c.confirm,disabled:c.confirmBtnDisabled},c.confirmBinding),{default:v.withCtx(()=>[v.createTextVNode(v.toDisplayString(c.confirmText||c._i18n("common","commit")),1)]),_:1},16,["syno-id","onClick","disabled"])):v.createCommentVNode("",!0)],2)])]),_:3},8,["class"])):v.createCommentVNode("",!0)]),_:3},8,["class","tip","spinning","only-mask"])]),_:3},8,["class","type","order"])),[[Y]])}var h=b.default(I,[["render",C]]);x.default=h}(i2)),i2}var u2={},h2={},V4;function rwe(){return V4||(V4=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Dr(),k=rl();const F=typeof Map=="function"?new Map:function(){const o=[],S=[];return{has(_){return o.indexOf(_)>-1},get(_){return S[o.indexOf(_)]},set(_,p){o.indexOf(_)===-1&&(o.push(_),S.push(p))},delete(_){const p=o.indexOf(_);p>-1&&(o.splice(p,1),S.splice(p,1))}}}();function B(o){if(!o||!o.nodeName||o.nodeName!=="TEXTAREA"||F.has(o))return;let S=null,_=null,p=null;function f(){const l=window.getComputedStyle(o,null);l.resize==="vertical"?o.style.resize="none":l.resize==="both"&&(o.style.resize="horizontal"),l.boxSizing==="content-box"?S=-(parseFloat(l.paddingTop)+parseFloat(l.paddingBottom)):S=parseFloat(l.borderTopWidth)+parseFloat(l.borderBottomWidth),isNaN(S)&&(S=0),v()}function y(l){const w=[];for(;l&&l.parentNode&&l.parentNode instanceof Element;)l.parentNode.scrollTop&&w.push({node:l.parentNode,scrollTop:l.parentNode.scrollTop}),l=l.parentNode;return w}function d(){if(o.scrollHeight===0)return;const l=y(o),w=document.documentElement&&document.documentElement.scrollTop;o.style.height="",o.style.height=o.scrollHeight+S+"px",_=o.clientWidth,l.forEach(I=>{I.node.scrollTop=I.scrollTop}),w&&(document.documentElement.scrollTop=w)}function v(){d();const l=Math.round(parseFloat(o.style.height)),w=window.getComputedStyle(o,null);var I=w.boxSizing==="content-box"?Math.round(parseFloat(w.height)):o.offsetHeight;if(I<l?w.overflowY==="hidden"&&(d(),I=w.boxSizing==="content-box"?Math.round(parseFloat(window.getComputedStyle(o,null).height)):o.offsetHeight):w.overflowY!=="hidden"&&(d(),I=w.boxSizing==="content-box"?Math.round(parseFloat(window.getComputedStyle(o,null).height)):o.offsetHeight),p!==I){p=I;const h=M.createEvent("autosize:resized");try{o.dispatchEvent(h)}catch{}}const C=M.createEvent("autosize:updated");try{o.dispatchEvent(C)}catch{}}const b=()=>{o.clientWidth!==_&&v()},s=(l=>{window.removeEventListener("resize",b,!1),o.removeEventListener("input",v,!1),o.removeEventListener("keyup",v,!1),o.removeEventListener("autosize:destroy",s,!1),o.removeEventListener("autosize:update",v,!1),Object.keys(l).forEach(w=>{o.style[w]=l[w]}),F.delete(o)}).bind(o,{height:o.style.height,resize:o.style.resize,overflowY:o.style.overflowY,overflowX:o.style.overflowX,wordWrap:o.style.wordWrap});o.addEventListener("autosize:destroy",s,!1),window.addEventListener("resize",b,!1),o.addEventListener("keyup",v,!1),o.addEventListener("autosize:update",v,!1),o.style.overflowX="hidden",o.style.wordWrap="break-word",F.set(o,{destroy:s,update:v}),f()}function G(o){const S=F.get(o);S&&S.destroy()}function E(o){const S=F.get(o);S&&S.update()}let A=null;k.isServer?(A=o=>o,A.destroy=o=>o,A.update=o=>o):(A=(o,S)=>(o&&Array.prototype.forEach.call(o.length?o:[o],_=>B(_)),o),A.destroy=o=>(o&&Array.prototype.forEach.call(o.length?o:[o],G),o),A.update=o=>(o&&Array.prototype.forEach.call(o.length?o:[o],E),o));var u=A;x.default=u}(h2)),h2}var H4;function gf(){return H4||(H4=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=_i(),k=rwe(),F=Zo(),B=lh(),G=Tl(),E=ci(),A=wa(),u=Lg(),o=Si(),S=ln(),_=Ni(),p=Kt(),f=Dr(),y=vr(),d=Ur(),v=kr(),b=ya(),s=ht(),l=St();y.register("input-clear",v.vIconClear),y.register("input-eye",v.vIconEye),y.register("input-eye-slash",v.vIconEyeSlash),y.register("input-password-rule-tick",v.vIconTick);const w=1,I=100,C=250,h=s.defineComponent({name:"Input",components:{vScrollbar:A.default,vPortal:u.default},directives:{tooltip:b.default},mixins:[F.default,G.default,y.default,E.default],props:{type:{type:String,default:"text"},id:{type:String,default(){return`syno-${B.uuid()}`}},[_.componentsProps.value()]:{type:[String,Number],default:void 0},placeholder:{type:[String,Number],default:void 0},disabled:{type:Boolean,default:!1},autosize:{type:[Boolean,Object],default:!1},strengthChecker:{type:[Function,Boolean],default:!1},mask:{type:[RegExp,Function],default:null},numberOnly:{type:Boolean,default:!1},defaultShowStrengthChecker:{type:Boolean,default:!1},maxlength:{type:Number,default:void 0},readonly:{type:Boolean,default:!1},focusClass:{type:[Boolean,String],default:"focused"},disableHoverStyle:{type:Boolean,default:!1},fitContainer:{type:Boolean,default:!0},autocomplete:{type:String,default:"off"},showPasswordVisibilityIcon:{type:Boolean,default:!0},clearable:{type:Boolean,default:!1},selectOnFocus:{type:Boolean,default:!1},passwordPortalName:{type:String,default:()=>"password-portal"+String(Math.round(Math.random()*1e7))},passwordRules:{type:Array,default:()=>[]},mobileBreakpoint:{type:[String,Boolean],default:"xxs"},inputAttrs:{type:Object,default:()=>({})}},emits:["focus","blur","strength-check","paste","keydown","clear","click","keyup","update:model-value","input"],data(){const re=this[_.componentsProps.value()];return{composing:!1,showPasswordInfoInMobile:!1,prefixCls:"v-textfield",currentValue:re??"",isFocused:!1,isInvalid:!1,showStrength:this.defaultShowStrengthChecker,strength:"",strengthText:this._i18n("common","password_strength"),maskPassword:!0,passwordRulesChecked:[]}},computed:{isMobile(){return!this.$breakpointManager&&this.mobileBreakpoint?(d.remind("please import and use BreakpointManagerPlugin when you are in tree-shaking mode or breakpoint will not active."),!1):this.mobileBreakpoint&&this.$breakpointManager?.lessAndEqThan(this.mobileBreakpoint)},hasPasswordInfo(){return this.type==="password"&&(this.passwordRules.length>0||!!this.strengthChecker)},hasPasswordRules(){return this.passwordRules.length>0},textareaRows(){return this.autosize?.minRows??2},textareaStyle(){const re=this.autosize?.lineHeight??18;return{maxHeight:this.autosize?.maxRows?`${this.autosize.maxRows*re+10}px`:"auto"}},inputType(){return this.type==="password"?this.maskPassword?"password":"text":this.type},wrapperCls(){return[`${this.prefixCls}-wrapper`,{[this.focusClass]:!!this.focusClass&&this.isFocused,"disabled-hover":this.disableHoverStyle,disabled:this.disabled,invalid:this.isInvalid}]},inputWrapperCls(){return[`${this.prefixCls}-input-wrapper`,{password:this.type==="password","mask-password":this.maskPassword}]},textareaWrapperCls(){return[`${this.prefixCls}-textarea-wrapper`,{"auto-size":this.autosize},{"fit-container":this.fitContainer}]},inputContainerCls(){return{textarea:this.type==="textarea","only-suffix-icons":this.hasSuffixIcons&&!o.hasSlot(this,"suffix")}},inputCls(){return[this.type==="textarea"?`${this.prefixCls}-textarea`:`${this.prefixCls}-input`,{"fit-container":this.fitContainer}]},strengthCheckerCls(){return[`${this.prefixCls}-strength`,`${this.strength}`]},isPasswordType(){return this.type==="password"},showClear(){return this.clearable&&this.currentValue},showPasswordIcon(){return this.isPasswordType&&this.showPasswordVisibilityIcon},hasPrefix(){return o.hasSlot(this,"prefix")},hasSuffixIcons(){return this.showClear||this.showPasswordIcon||o.hasSlot(this,"suffix-icons")},hasSuffix(){return this.hasSuffixIcons||o.hasSlot(this,"suffix")},suffixIconCount(){let re=0;return this.showClear&&re++,this.showPasswordIcon&&re++,re},suffixIconsCls(){return{}},suffixWrapperCls(){return{"has-suffix-icons":this.hasSuffixIcons}},passwordTipOpts(){return this.hasPasswordInfo&&!this.isMobile?{portalName:this.passwordPortalName,type:"info",cls:"password-info-tip",triggerAction:"custom",hideWhenClickOutside:!0,usePortal:!0,attachToElement:!0,arrow:!0,align:"tl->tr",offset:[0,0]}:!1}},watch:{strengthChecker:{handler(){this.strengthChecker&&this.checkStrength()},immediate:!0},passwordRules:{handler(){this.hasPasswordRules&&this.checkPasswordRules()},immediate:!0},async[_.componentsProps.value()](re){this.currentValue=re,this.hasPasswordRules&&this.checkPasswordRules(),this.strengthChecker&&this.checkStrength()}},created(){this.checkStrengthDebounced=M.debounce(()=>{this.checkStrength()},C)},async mounted(){await this.$nextTick(),this.type==="textarea"&&(this.autosize?k.default(this.$refs.textarea):this.updateTextFieldHeight())},methods:{onMouseDown(re){const ie=this.$refs.scrollbar.getScrollEl(),ne=re.clientY,le=re.offsetY,fe=ie.clientHeight-re.offsetY;let we;const pe=be=>{let Ee=be.clientY>ne?1:-1,Re=Math.abs(be.clientY-ne),Ne=0;Ee===1&&Re>=fe?Ne=Re-fe:Ee===-1&&Re>=le&&(Ne=le-Re),Ne=w*Ne,ie.scrollTop+=Ne,we&&window.clearInterval(we),we=window.setInterval(()=>{ie.scrollTop+=Ne},I)},ve=be=>{f.off(document,"mousemove",pe),window.clearInterval(we)};f.once(document,"mouseup",ve),f.on(document,"mousemove",pe)},onCompositionStart(){this.composing=!0},onCompositionEnd(re){this.composing=!1,this.onInput(re)},updateTextFieldHeight(){if(this.$refs.textarea){const re=this.$refs.textarea.scrollTop;f.css(this.$refs["fake-textarea"],"height",`${this.$refs.textarea.scrollHeight}px`),this.$refs.scrollbar.update(),this.$refs.scrollbar.getScrollEl().scrollTop=re}},onScroll(){!this.$refs.textarea||!this.$refs.scrollbar||(this.$refs.textarea.scrollTop=this.$refs.scrollbar?.getScrollTop())},setFocus(){let re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(this.$refs.input||this.$refs.textarea).focus(re)},setBlur(){(this.$refs.input||this.$refs.textarea).blur()},selectText(){(this.$refs.input||this.$refs.textarea).select()},setInputValue(re){this.$refs.input&&(this.$refs.input.value=re)},onMouseWheel(re){const ie=re.deltaY,ne=this.$refs.scrollbar?.getScrollEl();ne&&(ne.scrollTop+=ie)},onInput(re){if(this.composing===!0)return;let ie=re.target.value;(this.mask||this.numberOnly)&&(ie=this.filterMaskValue(ie),this.setInputValue(ie)),S.$emit(this,_.getModelEventName(this),ie),this.checkStrengthDebounced()},onFocus(){this.hasPasswordInfo&&(this.$refs?.["input-container"]?._svc_tooltip_e_show_cb?.(),this.showPasswordInfoInMobile=!0),this.isFocused=!0,this.selectOnFocus&&this.selectInput(),S.$emit(this,"focus",this)},selectInput(){(this.type==="textarea"?this.$refs.textarea:this.$refs.input).select()},onBlur(re){this.showPasswordInfoInMobile&&(this.showPasswordInfoInMobile=!1),this.isFocused=!1,S.$emit(this,"blur",this,re)},async checkStrength(){if(!this.strengthChecker)return;const{strength:re,strengthText:ie}=await this.strengthChecker(this.currentValue);this.strength=re,this.strengthText=ie,this.showStrength=!0,S.$emit(this,"strength-check",{strength:re,strengthText:ie})},async checkPasswordRules(){this.passwordRulesChecked=await Promise.all(this.passwordRules.map(re=>re?.check?.(this.currentValue)))},filterMaskValue(re){return this.mask&&(p.isFunction(this.mask)?re=this.mask(re):re=re.replace(this.mask,"")),this.numberOnly&&(re=re.substr(0,1)==="-"?"-"+re.substr(1).replace(/[^\d]/g,"").replace(/^0*/,""):re.replace(/[^\d]/g,"").replace(/^0+(?!$)/,""),p.isNumberLike(re)&&(re=+re)),re},onPaste(){S.$emit(this,"paste",event),this.type==="textarea"&&!this.autosize&&this.updateTextFieldHeight()},onKeyUp(re){this.type==="textarea"&&!this.autosize&&this.updateTextFieldHeight(),this.$emit("keyup",re)},onKeyDown(re){this.handleEnterKeyHint(re),S.$emit(this,"keydown",re)},onClickVisibilityIcon(){this.disabled||(this.maskPassword=!this.maskPassword)},async onClear(re){this.disabled||(S.$emit(this,_.getModelEventName(this),""),S.$emit(this,"clear",re),await this.$nextTick(),this.updateTextFieldHeight(),this.setFocus())},copyValue(){return(this.type==="textarea"?this.$refs.textarea:this.$refs.input).select(),document.execCommand("Copy")},cutValue(){return(this.type==="textarea"?this.$refs.textarea:this.$refs.input).select(),document.execCommand("Copy")&&this.onClear()},inDataTableBehavior(){this.$el.addEventListener("mousedown",re=>re.stopPropagation()),this.$el.addEventListener("keydown",re=>re.stopPropagation())},getRuleItemCls(re,ie){return["rule-checked-item",{checked:this.passwordRulesChecked[ie]}]},onClick(re){S.$emit(this,"click",re)}}}),c={class:"strength-text"},m=s.createElementVNode("div",{class:"strength-line"},[s.createElementVNode("div",{class:"strength-cover"})],-1),T={key:1,class:"v-input-password-rules"},D={class:"rule-header"},O={class:"rule-wrapper"},N={class:"rule-text"},z=["id","placeholder","disabled","value","readonly","maxlength","enterkeyhint","rows"],H=["id","type","placeholder","disabled","value","enterkeyhint","autocomplete","readonly","maxlength","aria-describedby"],$={class:"fake-textarea",ref:"fake-textarea"},V={key:1,class:"password-rule-wrapper"},P={class:"strength-text"},U=s.createElementVNode("div",{class:"strength-line"},[s.createElementVNode("div",{class:"strength-cover"})],-1),Y={key:1,class:"v-input-password-rules"},Z={class:"rule-header"},X={class:"rule-wrapper"},J={class:"rule-text"};function q(re,ie,ne,le,fe,we){const pe=s.resolveComponent("v-icon"),ve=s.resolveComponent("v-portal"),be=s.resolveComponent("v-scrollbar"),Ee=s.resolveDirective("tooltip"),Re=s.resolveDirective("syno-id");return s.withDirectives((s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(re.wrapperCls),onClick:ie[19]||(ie[19]=function(){return re.onClick&&re.onClick(...arguments)})},[s.withDirectives((s.openBlock(),s.createElementBlock("div",{ref:"input-container",class:s.normalizeClass(["input-container",re.inputContainerCls])},[re.hasPasswordInfo?(s.openBlock(),s.createBlock(ve,{key:0,name:re.passwordPortalName,to:re.passwordPortalName},{default:s.withCtx(()=>[re.strengthChecker?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass([re.strengthCheckerCls,"v-input-strength-wrapper"])},[s.createElementVNode("div",c,s.toDisplayString(re.strengthText||re._i18n("common","password_strength")),1),m],2)):s.createCommentVNode("",!0),re.hasPasswordRules?(s.openBlock(),s.createElementBlock("div",T,[s.renderSlot(re.$slots,"password-rule-header",{},()=>[s.createElementVNode("div",D,s.toDisplayString(re._i18n("common","password_must"))+" "+s.toDisplayString(re._i18n("common","colon")),1)]),s.createElementVNode("div",O,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(re.passwordRules,(Ne,Le)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(re.getRuleItemCls(Ne,Le)),key:Le},[s.createVNode(pe,{name:"input-password-rule-tick"}),s.createElementVNode("div",N,s.toDisplayString(Ne.text),1)],2))),128))])])):s.createCommentVNode("",!0)]),_:3},8,["name","to"])):s.createCommentVNode("",!0),re.type==="textarea"?(s.openBlock(),s.createElementBlock("div",{key:1,class:s.normalizeClass(re.textareaWrapperCls)},[re.type==="textarea"?(s.openBlock(),s.createElementBlock("textarea",{key:0,id:re.id,class:s.normalizeClass(re.inputCls),placeholder:re.placeholder,disabled:re.disabled,value:re.currentValue,readonly:re.readonly,maxlength:re.maxlength,enterkeyhint:re.enterKey,onInput:ie[0]||(ie[0]=function(){return re.onInput&&re.onInput(...arguments)}),onCompositionstart:ie[1]||(ie[1]=function(){return re.onCompositionStart&&re.onCompositionStart(...arguments)}),onCompositionend:ie[2]||(ie[2]=function(){return re.onCompositionEnd&&re.onCompositionEnd(...arguments)}),onKeyup:ie[3]||(ie[3]=function(){return re.onKeyUp&&re.onKeyUp(...arguments)}),onKeydown:ie[4]||(ie[4]=function(){return re.onKeyDown&&re.onKeyDown(...arguments)}),onPaste:ie[5]||(ie[5]=function(){return re.onPaste&&re.onPaste(...arguments)}),"onAutosize:updated":ie[6]||(ie[6]=function(){return re.updateTextFieldHeight&&re.updateTextFieldHeight(...arguments)}),onMousewheel:ie[7]||(ie[7]=s.withModifiers(function(){return re.onMouseWheel&&re.onMouseWheel(...arguments)},["stop"])),onMousedown:ie[8]||(ie[8]=function(){return re.onMouseDown&&re.onMouseDown(...arguments)}),onBlur:ie[9]||(ie[9]=function(){return re.onBlur&&re.onBlur(...arguments)}),onFocus:ie[10]||(ie[10]=function(){return re.onFocus&&re.onFocus(...arguments)}),ref:"textarea",rows:re.textareaRows,style:s.normalizeStyle(re.textareaStyle)},null,46,z)):s.createCommentVNode("",!0),re.hasSuffix?(s.openBlock(),s.createElementBlock("span",{key:1,class:s.normalizeClass(["suffix-wrapper",re.suffixWrapperCls])},[re.showClear?(s.openBlock(),s.createBlock(pe,{key:0,name:"input-clear",onClick:s.withModifiers(re.onClear,["stop"]),"svg-icon-set":"set25"},null,8,["onClick"])):s.createCommentVNode("",!0),re.showPasswordIcon?(s.openBlock(),s.createBlock(pe,{key:1,name:re.maskPassword?"input-eye":"input-eye-slash",class:"password-icon",onClick:s.withModifiers(re.onClickVisibilityIcon,["stop"]),"svg-icon-set":"set13"},null,8,["name","onClick"])):s.createCommentVNode("",!0),s.renderSlot(re.$slots,"suffix-icons")],2)):s.createCommentVNode("",!0)],2)):(s.openBlock(),s.createElementBlock("div",{key:2,class:s.normalizeClass(re.inputWrapperCls)},[re.hasPrefix?(s.openBlock(),s.createElementBlock("span",{key:0,class:s.normalizeClass(["prefix-wrapper",re.suffixWrapperCls])},[s.renderSlot(re.$slots,"prefix")],2)):s.createCommentVNode("",!0),s.createElementVNode("input",s.mergeProps({id:re.id,type:re.inputType,class:re.inputCls,placeholder:re.placeholder,disabled:re.disabled,value:re.currentValue,enterkeyhint:re.enterKey,autocomplete:re.autocomplete,readonly:re.readonly},re.inputAttrs,{onInput:ie[11]||(ie[11]=function(){return re.onInput&&re.onInput(...arguments)}),onCompositionstart:ie[12]||(ie[12]=function(){return re.onCompositionStart&&re.onCompositionStart(...arguments)}),onCompositionend:ie[13]||(ie[13]=function(){return re.onCompositionEnd&&re.onCompositionEnd(...arguments)}),onKeyup:ie[14]||(ie[14]=function(){return re.onKeyUp&&re.onKeyUp(...arguments)}),onKeydown:ie[15]||(ie[15]=function(){return re.onKeyDown&&re.onKeyDown(...arguments)}),onPaste:ie[16]||(ie[16]=function(){return re.onPaste&&re.onPaste(...arguments)}),maxlength:re.maxlength,"aria-describedby":re.strengthChecker&&`${re.id}-strength`,ref:"input",onBlur:ie[17]||(ie[17]=function(){return re.onBlur&&re.onBlur(...arguments)}),onFocus:ie[18]||(ie[18]=function(){return re.onFocus&&re.onFocus(...arguments)})}),null,16,H),re.hasSuffix?(s.openBlock(),s.createElementBlock("span",{key:1,class:s.normalizeClass(["suffix-wrapper",re.suffixWrapperCls])},[re.showClear?(s.openBlock(),s.createBlock(pe,{key:0,name:"input-clear",class:"clear-icon",onClick:s.withModifiers(re.onClear,["stop"]),"svg-icon-set":"set25"},null,8,["onClick"])):s.createCommentVNode("",!0),re.showPasswordIcon?(s.openBlock(),s.createBlock(pe,{key:1,name:re.maskPassword?"input-eye":"input-eye-slash",class:"password-icon",onClick:s.withModifiers(re.onClickVisibilityIcon,["stop"]),"svg-icon-set":"set13"},null,8,["name","onClick"])):s.createCommentVNode("",!0),s.renderSlot(re.$slots,"suffix-icons"),s.renderSlot(re.$slots,"suffix")],2)):s.createCommentVNode("",!0)],2))],2)),[[Ee,re.passwordTipOpts]]),re.type==="textarea"?(s.openBlock(),s.createBlock(be,{key:0,ref:"scrollbar",class:"textarea-fake-scrollbar",onScroll:re.onScroll,"has-padding":"",disabled:re.disabled},{default:s.withCtx(()=>[s.createElementVNode("div",$,null,512)]),_:1},8,["onScroll","disabled"])):s.createCommentVNode("",!0),re.hasPasswordInfo&&re.showPasswordInfoInMobile&&re.isMobile?(s.openBlock(),s.createElementBlock("div",V,[re.strengthChecker?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass([re.strengthCheckerCls,"v-input-strength-wrapper"])},[s.createElementVNode("div",P,s.toDisplayString(re.strengthText||re._i18n("common","password_strength")),1),U],2)):s.createCommentVNode("",!0),re.hasPasswordRules?(s.openBlock(),s.createElementBlock("div",Y,[s.createElementVNode("div",Z,s.toDisplayString(re._i18n("common","password_must")),1),s.createElementVNode("div",X,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(re.passwordRules,(Ne,Le)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(re.getRuleItemCls(Ne,Le)),key:Le},[s.createVNode(pe,{name:"input-password-rule-tick"}),s.createElementVNode("div",J,s.toDisplayString(Ne.text),1)],2))),128))])])):s.createCommentVNode("",!0)])):s.createCommentVNode("",!0)],2)),[[Re]])}var te=l.default(h,[["render",q]]);x.default=te}(u2)),u2}var $4;function f5(){return $4||($4=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Xn(),k=ln(),F=Zo(),B=QF(),G=Dr(),E=Yl(),A=Kt(),u=uT(),o=gf(),S=u5(),_=ht(),p=St();const f=_.defineComponent({name:"ColorCustomPanel",components:{vPanel:u.default,vInput:o.default},mixins:[F.default,B.default],props:{initial:{type:String,default:"#FFFFFF"},initAlpha:{type:[Number,String],default:1},colorWrapperStyle:{type:Object,default:()=>{}},hasAlpha:{type:Boolean,default:!1}},emits:["colorselected","colorselectcanceled"],data(){return{prefixCls:"v-color-custom-panel",currentColor:S.default(),inputRValue:0,inputGValue:0,inputBValue:0,inputAValue:0,inputHex:"",joe:null,hue:0,alpha:1,saturation:0,value:0,areaPointerStyle:{top:0,left:0},alphaPointerStyle:{top:0},huePointerStyle:{top:0}}},computed:{alphaCoverStyle(){return{"--current-color":this.currentColor.hex()}},colorAreaStyle(){return{backgroundColor:S.default().saturationv(100).value(100).hue(this.hue).rgb().string()}},minimapColorStyle(){return{backgroundColor:this.currentColor.string()}}},watch:{initial:{async handler(D){this.currentColor=S.default(D).alpha(this.initAlpha),this.hue=this.currentColor.hue(),this.saturation=this.currentColor.saturationv(),this.value=this.currentColor.value(),this.alpha=+this.initAlpha,await this.$nextTick(),this.alignPointer(),this.updateColor()},immediate:!0},alpha(){this.updateColor()},hue(){this.updateColor()},value(){this.updateColor()},saturation(){this.updateColor()}},mounted(){E.addResizeListener(this.$el,this.alignPointer,this)},[M.componentHooks.beforeUnmount](){E.removeResizeListener(this.$el,this.alignPointer)},methods:{alignPointer(){this.setHuePointer(this.hue),this.setAreaPointer(this.saturation,this.value),this.setAlphaPointer(this.alpha)},updateColor(){this.currentColor=S.default().hue(this.hue).saturationv(this.saturation).value(this.value).alpha(this.alpha),this.alphaPointerStyle.backgroundColor=this.currentColor.rgb().string(),this.huePointerStyle.backgroundColor=S.default().saturationv(100).value(100).hue(this.hue).hex(),this.areaPointerStyle.backgroundColor=this.currentColor.hex(),this.inputRValue=Math.round(this.currentColor.red()),this.inputBValue=Math.round(this.currentColor.blue()),this.inputGValue=Math.round(this.currentColor.green()),this.inputAValue=Math.round(this.alpha*100),this.inputHex=this.currentColor.hex()},confirm(){k.$emit(this,"colorselected",this.currentColor.hex(),this.alpha)},cancel(){k.$emit(this,"colorselectcanceled")},setAlphaPointer(){let D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.alpha;if(!this.hasAlpha)return;const N=this.setPointerPosition(0,1,this.$refs.alpha.getBoundingClientRect(),!0)(D);this.alphaPointerStyle.top=`${N}px`},setHuePointer(){let D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.hue;const N=this.setPointerPosition(0,360,this.$refs.hue.getBoundingClientRect())(D);this.huePointerStyle.top=`${N}px`},setAreaPointer(D,O){const N=this.$refs.area.getBoundingClientRect(),z=A.normalize(D,0,100),H=A.normalize(O,0,100);this.areaPointerStyle.left=`${z*N.width}px`,this.areaPointerStyle.top=`${(1-H)*N.height}px`},setPointerPosition(D,O,N,z){return H=>{const $=A.normalize(H,D,O);return z?N.height-$*N.height:$*N.height}},onAlphaBarMouseDown(D){const O=this.$refs.area.getBoundingClientRect(),N=O.y,z=H=>{let $=H.clientY-N;$=A.clampValue($,0,O.height),this.alpha=1-A.normalize($,0,O.height),G.raf(()=>{this.alphaPointerStyle.top=`${$}px`})};G.on(document,"mousemove",z),G.once(document,"mouseup",()=>{G.off(document,"mousemove",z)})},onHueBarMouseDown(D){const O=this.$refs.hue.getBoundingClientRect(),N=O.y,z=H=>{let $=H.clientY-N;$=A.clampValue($,0,O.height);const V=A.normalize($,0,O.height);this.hue=V*360,G.raf(()=>{this.huePointerStyle.top=`${$}px`})};G.on(document,"mousemove",z),G.once(document,"mouseup",()=>{G.off(document,"mousemove",z)})},onColorAreaMouseDown(D){const O=this.$refs.area.getBoundingClientRect(),N=O.x,z=O.y,H=$=>{let V=$.clientX-N,P=$.clientY-z;V=A.clampValue(V,0,O.width),P=A.clampValue(P,0,O.height);const U=A.normalize(V,0,O.width),Y=A.normalize(P,0,O.height);this.saturation=U*100,this.value=(1-Y)*100,G.raf(()=>{this.areaPointerStyle={left:`${V}px`,top:`${P}px`,backgroundColor:this.currentColor.hex()}})};G.on(document,"mousemove",H),G.once(document,"mouseup",()=>{G.off(document,"mousemove",H)})},onInputHexBlur(D,O){const N=O.target.value;try{this.currentColor=S.default(N).alpha(this.alpha),this.hue=this.currentColor.hue(),this.saturation=this.currentColor.saturationv(),this.value=this.currentColor.value(),this.setHuePointer(this.hue),this.setAreaPointer(this.saturation,this.value),this.setAlphaPointer(this.alpha)}catch{}},onInput(D,O){this.currentColor=this.currentColor[D](O),this.hue=this.currentColor.hue(),this.value=this.currentColor.value(),this.saturation=this.currentColor.saturationv(),this.setHuePointer(this.hue),this.setAreaPointer(this.saturation,this.value)},onInputAlpha(D){this.currentColor=this.currentColor.alpha(D/100),this.alpha=this.currentColor.alpha(),this.setAlphaPointer(this.alpha)}}}),y=_.createElementVNode("div",{class:"color-bg cover-right"},null,-1),d=_.createElementVNode("div",{class:"color-bg cover-bottom"},null,-1),v={class:"color-bar"},b={class:"display-area"},s={class:"minimap"},l={class:"form"},w={class:"r-value field"},I={class:"g-value field"},C={class:"b-value field"},h={key:0,class:"a-value field"},c={class:"real-value field"};function m(D,O,N,z,H,$){const V=_.resolveComponent("v-input"),P=_.resolveComponent("v-panel");return _.openBlock(),_.createBlock(P,{confirm:D.confirm,cancel:D.cancel,class:_.normalizeClass(D.prefixCls),"fluid-footer":!0,"syno-id":D.synoId},{body:_.withCtx(()=>[_.createElementVNode("div",{class:"color-wrapper",style:_.normalizeStyle(D.colorWrapperStyle)},[_.createElementVNode("div",{ref:"area",class:"color-area",onMousedown:O[0]||(O[0]=function(){return D.onColorAreaMouseDown&&D.onColorAreaMouseDown(...arguments)}),style:_.normalizeStyle(D.colorAreaStyle)},[y,d,_.createElementVNode("div",{class:"pointer",style:_.normalizeStyle(D.areaPointerStyle)},null,4)],36),_.createElementVNode("div",v,[_.createElementVNode("div",{ref:"hue",class:"hue bar",onMousedown:O[1]||(O[1]=function(){return D.onHueBarMouseDown&&D.onHueBarMouseDown(...arguments)})},[_.createElementVNode("div",{class:"pointer",style:_.normalizeStyle(D.huePointerStyle)},null,4)],544),D.hasAlpha?(_.openBlock(),_.createElementBlock("div",{key:0,ref:"alpha",class:"alpha bar",onMousedown:O[2]||(O[2]=function(){return D.onAlphaBarMouseDown&&D.onAlphaBarMouseDown(...arguments)})},[_.createElementVNode("div",{class:"cover",style:_.normalizeStyle(D.alphaCoverStyle)},null,4),_.createElementVNode("div",{class:"pointer",style:_.normalizeStyle(D.alphaPointerStyle)},null,4)],544)):_.createCommentVNode("",!0)]),_.createElementVNode("div",b,[_.createElementVNode("div",s,[_.createElementVNode("div",{class:"minimap-color",style:_.normalizeStyle(D.minimapColorStyle)},null,4)]),_.createElementVNode("div",l,[_.createElementVNode("div",w,[_.createTextVNode(" R: "),_.createVNode(V,{value:D.inputRValue,onInput:O[3]||(O[3]=U=>D.onInput("red",U))},null,8,["value"])]),_.createElementVNode("div",I,[_.createTextVNode(" G: "),_.createVNode(V,{value:D.inputGValue,onInput:O[4]||(O[4]=U=>D.onInput("green",U))},null,8,["value"])]),_.createElementVNode("div",C,[_.createTextVNode(" B: "),_.createVNode(V,{value:D.inputBValue,onInput:O[5]||(O[5]=U=>D.onInput("blue",U))},null,8,["value"])]),D.hasAlpha?(_.openBlock(),_.createElementBlock("div",h,[_.createTextVNode(" A: "),_.createVNode(V,{value:D.inputAValue,onInput:D.onInputAlpha},null,8,["value","onInput"])])):_.createCommentVNode("",!0),_.createElementVNode("div",c,[_.createVNode(V,{value:D.inputHex,onBlur:D.onInputHexBlur},null,8,["value","onBlur"])])])])],4)]),_:1},8,["confirm","cancel","class","syno-id"])}var T=p.default(f,[["render",m]]);x.default=T}(r2)),r2}var c2={},z4;function see(){return z4||(z4=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=ln(),k=f5(),F=ci(),B=ht(),G=St();const E=B.defineComponent({name:"ColorCustomWindow",components:{vColorCustomPanel:k.default},mixins:[F.default],props:{},emits:["color-selected","color-select-cancelled"],data(){return{}},methods:{onCancel(){M.$emit(this,"color-select-cancelled"),this.$refs.window.close({payload:{action:"color-select-cancelled"}})},onColorSelected(o){M.$emit(this,"color-selected",o),this.$refs.window.close({payload:{action:"color-selected",color:o}})}}});function A(o,S,_,p,f,y){const d=B.resolveComponent("v-color-custom-panel"),v=B.resolveComponent("v-modal-window");return B.openBlock(),B.createBlock(v,{title:o._i18n("personal_settings","customize_color"),width:458,height:370,"show-close":!1,"show-maximize":!1,resizable:!1,"show-minimize":!1,"syno-id":o.synoId,ref:"window"},{default:B.withCtx(()=>[B.createVNode(d,{onColorselected:o.onColorSelected,onColorselectcanceled:o.onCancel,"syno-id":`${o.synoId}-panel`},null,8,["onColorselected","onColorselectcanceled","syno-id"])]),_:1},8,["title","syno-id"])}var u=G.default(E,[["render",A]]);x.default=u}(c2)),c2}var d2={},W4;function lee(){return W4||(W4=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Ni(),k=ln(),F=gf(),B=La(),G=ls(),E=kr(),A=ci(),u=vr(),o=ht(),S=St();u.register("copy",E.vIconCopy),u.register("cut",E.vIconCut);const _=o.defineComponent({name:"CopyCutField",components:{vInput:F.default,vButton:B.default,vIcon:G.default},mixins:[u.default,A.default],props:{[M.componentsProps.value()]:{type:String,default:""},type:{type:String,default:"copy",validator:y=>["copy","cut"].includes(y)},readonly:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},inputType:{type:String,default:"text"},autosize:{type:[Boolean,Object],default:!1}},emits:["input-focused","action-success","action-failed","update:model-value"],data(){return{prefix:"v-copy-cut-field"}},computed:{innerDisabled(){return this.disabled||!M.getModelValue(this)},wrapperCls(){return[`${this.prefix}-wrapper`]},inputCls(){return[`${this.prefix}-input`]},buttonCls(){return[`${this.prefix}-button`,this.type,{disabled:this.innerDisabled}]},tipContent(){return this.type==="copy"?this._i18n("uicommon","copy"):this._i18n("uicommon","cut")},innerValue(){return M.getModelValue(this)}},methods:{onInputValueChange(y){k.$emit(this,M.getModelEventName(this),y)},onInputFocus(y){k.$emit(this,"input-focused",y)},onClickButton(){(this.type==="copy"?this.$refs.input.copyValue():this.$refs.input.cutValue())?k.$emit(this,"action-success",M.getModelValue(this)):k.$emit(this,"action-failed")}}});function p(y,d,v,b,s,l){const w=o.resolveComponent("v-input"),I=o.resolveComponent("v-icon"),C=o.resolveComponent("v-button");return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(y.wrapperCls)},[o.createVNode(w,{"syno-id":"v-copy-cut-field-input",ref:"input",class:o.normalizeClass(y.inputCls),name:"input",readonly:y.readonly,value:y.innerValue,"model-value":y.innerValue,disabled:y.disabled,onInput:y.onInputValueChange,"onUpdate:modelValue":y.onInputValueChange,onFocus:y.onInputFocus,type:y.inputType,autosize:y.autosize,"fit-container":""},null,8,["class","readonly","value","model-value","disabled","onInput","onUpdate:modelValue","onFocus","type","autosize"]),o.createVNode(C,{"syno-id":"v-copy-cut-field-button",display:"icon",disabled:y.innerDisabled,onClick:y.onClickButton,tooltip:y.tipContent},{icon:o.withCtx(()=>[o.createVNode(I,{type:y.iconType,name:y.type,class:o.normalizeClass(y.buttonCls),"svg-icon-set":"set01"},null,8,["type","name","class"])]),_:1},8,["disabled","onClick","tooltip"])],2)}var f=S.default(_,[["render",p]]);x.default=f}(d2)),d2}var f2={},g2={},ib={},U4;function hT(){if(U4)return ib;U4=1,Object.defineProperty(ib,"__esModule",{value:!0});var x=Kt();function M(F){return x.isBoolean(F.disableSort)?F.disableSort:!!F.action}function k(F,B){let G=F.findIndex(E=>E.pivot);return G===-1&&(G=B),{id:G,column:F[G]}}return ib.getPivotColumn=k,ib.isColumnDisableSort=M,ib}var G4;function iwe(){return G4||(G4=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Xn(),k=nd(),F=ln(),B=Dr(),G=Ur(),E=Kt(),A=hT(),u=ht();const o=100,S=10,_=/(\d+)%/;function p(c,m){const T=+c.el.dataset.width,D=T+m,O=c.getMinWidth();return D<=O&&(m=-(T-O)),m}function f(c,m){const T=+c.el.dataset.width;return Math.ceil(T+m)}function y(c,m){c.el.dataset.width=m}function d(c,m){let D=c.findIndex(N=>N.id===m)+1,O=c[D];for(;O&&O.data.hide===!0;)O=c[++D];return O}function v(c,m){let D=c.findIndex(N=>N.id===m)-1,O=c[D];for(;O&&O.data.hide===!0;)O=c[--D];return O}function b(c){let m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{visible:!1,noFixed:!1,omitColumns:[]};return c.filter(T=>m.visible&&T.data.hide||m.noFixed&&T.data.width?!1:!(m.omitColumns&&m.omitColumns.includes(T.id)))}function s(c){let m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{onlyVisible:!1,noFixedColumns:!1,omitColumns:[]};return c=b(c,{visible:m.onlyVisible,noFixed:m.noFixedColumns,omitColumns:m.omitColumns}),c.reduce((T,D)=>(T+=D.getCurrentWidth(),T),0)}function l(c,m,T){return(T-c)/m}function w(c,m){let T=c.getCurrentWidth(),D=1;m<0&&(D=-1,m=Math.abs(m));const O=Math.floor(T+D*Math.floor(m*T)),N=c.getMinWidth();return y(c,Math.max(N,O)),N>O?N-O:0}function I(c,m,T){let D=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{omitFixedColumns:!1,omitColumns:[]},O=s(c,{onlyVisible:!0}),N=s(c,{onlyVisible:!0,noFixedColumns:D.omitFixedColumns,omitColumns:D.omitColumns}),z=O-N,H=l(O,N,T),$=b(c,{visible:!0,noFixed:D.omitFixedColumns,omitColumns:D.omitColumns});if(T===0||T<z)return;let V=[],P=[];for(const U of $){const Y=w(U,H);Y>0?H+=H>0?Y/T:-(Y/T):V.push(U.id)}if(P=D.omitColumns&&D.omitColumns.length>=1?D.omitColumns:[],P=P.concat(V),O=s(c,{onlyVisible:!0}),O>T){let U=O-T;for(const Y of P){const Z=m[Y];if(Z&&U>0){let X=U,J=+Z.el.dataset.width-X;const q=Z.getMinWidth();q>J&&(J=q,X=q-+Z.el.dataset.width),U-=X,y(Z,J)}}}else if(O<T){let U=T-O;const Y=Object.keys($).length;let Z=Math.floor(U/Y);U=U%Y;for(let X of $){const J=X.getMinWidth();let q=Math.max(J,+X.el.dataset.width+Z+(U>0?1:0));y(X,q),U>0&&U--}}return!0}function C(c,m){let T=_.exec(c);return T&&T[1]?Math.floor(m*+T[1]/100):+c}var h=u.defineComponent({emits:["column-resize"],data(){return{colsData:{}}},mounted(){this.$_container=this.takeContainer(),this.$_resizeLeftMarker=this.createResizeIndicator(this.$_container),this.$_resizeRightMarker=this.createResizeIndicator(this.$_container),this.$_resizeIndicator=this.createResizeIndicator(this.$_container)},[M.componentHooks.beforeUnmount](){this.removeResizeIndicator(this.$_container,this.$_resizeLeftMarker),this.removeResizeIndicator(this.$_container,this.$_resizeRightMarker),this.removeResizeIndicator(this.$_container,this.$_resizeIndicator)},methods:{adjustResizeIndicatorStyleByMouseMoveEvent(c,m,T){const D=this.$_cols,O=this.$_container.getBoundingClientRect(),N=d(D,T.id),z=v(D,T.id),H=z&&z.headerEl?z.headerEl.getBoundingClientRect().right-O.left:0,$=N&&N.headerEl?N.headerEl.getBoundingClientRect().right-O.left:O.width,V=N.getMinWidth(),P=T.getMinWidth(),U=H+P,Y=$-V,Z=Math.min(Math.max(U,c.clientX-O.left),Y);function X(J,q){J.style.left=`${q}px`,B.removeClass(J,"col-resizable-indicator--hidden")}X(this.$_resizeLeftMarker,H),X(this.$_resizeRightMarker,$),X(this.$_resizeIndicator,Z)},removeResizeIndicator(c,m){m&&c.removeChild(m)},createResizeIndicator(c){const m=document.createElement("div");return B.addClass(m,"col-resizable-indicator"),B.addClass(m,"col-resizable-indicator--hidden"),c.appendChild(m),m},takeCols(){let c=[...this.$refs["header-col-group"].querySelectorAll("col")];const T=[...this.$refs.theader.querySelectorAll("th")].reduce((z,H)=>(z[H.getAttribute("name")]=H,z),{}),D=this.currentColumns.reduce((z,H)=>(z[H[this.fieldInfo.columnKey]]=H,z),{}),O=this;c=c.map(z=>({id:z.getAttribute("name"),el:z,headerEl:T[z.getAttribute("name")],data:D[z.getAttribute("name")],getWidth(H){const $=C(this.data.defaultWidth,H);return C(this.data.width,H)||$||this.headerEl.clientWidth||o},getCurrentWidth(){return+this.el.dataset.width||o},getMinWidth(){const{action:H,tip:$,title:V,field:P,minWidth:U}=this.data,Y=O.groupInfo;if(Y.action&&Y.actionField===P)return 84;const Z=B.hasClass(this.headerEl,"is-draggable")&&B.hasClass(this.headerEl,"cell-first"),X=B.hasClass(this.headerEl,"last-th-cell");let J=0;return Z&&(J+=16),X&&(J+=17),U?(J+=U,J):(V&&(J+=24),H&&(J+=28),$&&(J+=26),A.isColumnDisableSort(this.data)||(J+=12),J+16)},canResize:!1}));const N=c.reduce((z,H)=>(z[H.id]=H,z),{});return{cols:c,colsMap:N}},takeContainer(){return this.$refs.container},applyColsWidth(c,m){for(const T of c)if(T.el){const D=this.colsData[T.id];let O=E.isDefined(D)?+D:T.getWidth(m);O<T.getMinWidth()&&(O=T.getMinWidth()),T.el.dataset.width=O}return!0},buildCols(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{applyHeadersWidth:!1,containerWidth:void 0,omitColumns:[],forceFit:!1};if(!this.$refs.theader)return;const{cols:m,colsMap:T}=this.takeCols();let D=this.takeContainer();const O=E.isDefined(c.containerWidth)?c.containerWidth:D.clientWidth;c.applyHeadersWidth&&O>0&&this.applyColsWidth(m,O);let N=s(m,this.currentColumns,{onlyVisible:!0});(c.forceFit||N!==this.tableWidth||c.containerWidth)&&I(m,T,O,{omitFixedColumns:c.applyHeadersWidth,omitColumns:c.omitColumns}),this.renderColumns(m,c),this.tableWidth=s(m,this.currentColumns,{onlyVisible:!0}),this.$refs.scrollbar&&this.$refs.scrollbar.update(),this.$_cols=m,this.$_colsMap=T},onHeaderCellMouseMove(c,m,T){c._isGroup&&c._subColumns.length>0&&(m=c._subColumns[c._subColumns.length-1][this.fieldInfo.columnKey]);let D=T.target;for(;D&&D.tagName!=="TH";)D=D.parentNode;const O=this.$_colsMap?.[m];if(!O)return;D.getBoundingClientRect().right-T.pageX<S?(B.css(D,"cursor","col-resize"),D._canResize=!0,O.canResize=!0):(B.css(D,"cursor",""),D._canResize=!1,O.canResize=!1)},onHeaderCellMouseDown(c,m,T,D){c._isGroup&&c._subColumns.length>0&&(m=c._subColumns[c._subColumns.length-1][this.fieldInfo.columnKey]);const O=this.$_colsMap?.[m];if(!O||!O.canResize||D.button!==0)return;O.headerEl._resizing=!0,D.stopPropagation();const N=document.onselectstart,z=document.ondragstart;document.onselectstart=()=>!1,document.ondragstart=()=>!1;let H={startX:D.clientX,dragging:!0,diff:0};const $=P=>{P.stopPropagation(),H.dragging&&(H.diff=Math.ceil(P.clientX-H.startX),this.adjustResizeIndicatorStyleByMouseMoveEvent(P,T,O))},V=P=>{P.stopPropagation(),H.dragging=!1,B.off(document,"mousemove",$);let U=d(this.$_cols,m),Y=p(O,H.diff);Y=-p(U,-Y);let Z=f(O,Y),X=f(U,-Y);y(O,Z),y(U,X),this.renderColumn(O),this.renderColumn(U),B.addClass(this.$_resizeIndicator,"col-resizable-indicator--hidden"),B.addClass(this.$_resizeLeftMarker,"col-resizable-indicator--hidden"),B.addClass(this.$_resizeRightMarker,"col-resizable-indicator--hidden"),document.onselectstart=N,document.ondragstart=z,delete O.headerEl._resizing,F.$emit(this,"column-resize",this.colsData)};B.once(document,"mouseup",V),B.on(document,"mousemove",$)},renderColumn(c){c.el.setAttribute("width",c.el.dataset.width),k.set(this.colsData,c.id,c.el.dataset.width)},renderColumns(c,m){!m.applyHeadersWidth&&Object.keys(this.colsData).length===0&&G.consoleError("should apply headers width before render it. or you will get wrong width on col");for(let T of c)this.renderColumn(T)}}});x.default=h}(g2)),g2}var p2={},Jh={},j4;function g5(){if(j4)return Jh;j4=1,Object.defineProperty(Jh,"__esModule",{value:!0});var x=Dr(),M=Kt(),k=lh(),F=gn(),B=Xn(),G=Qo(),E=ed(),A=Ur(),u=td();function o(b,s,l){b[s]?l[s]=b[s]:l[s]||(l[s]=M.noop)}const S=.1,_=100;class p{constructor(s){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.id=k.uuid(),this.el=s,this.payload=w,this.isOver=l.isOver??!1,this.applyOpts(l),this.__synoDD=!0,this.isTarget=!0,this.isNotifyTarget=!0,this.order=l.order??10}applyOpts(s){s.extDDGroup&&window.Ext&&window.Ext.dd.DDM.regDragDrop(this,s.extDDGroup),o(s,"notifyEnter",this),o(s,"notifyDrop",this),o(s,"notifyOver",this),o(s,"notifyOut",this),o(s,"notifyValidDrop",this),o(s,"notifyInvalidDrop",this)}isLocked(){return!1}getEl(){return this.el}notifyEnter(s,l,w){}notifyDrop(s,l,w){}notifyOver(s,l,w){}notifyOut(s,l){}notifyValidDrop(s,l,w){}notifyInvalidDrop(s,l,w){}}class f{constructor(s){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.el=s,this.manager=null,this.isDragging=!1,this.isEnteringZone=!1,this.targetZones=[],this.applyOpts(l),this.payload=w,this.autoScrollElement=M.isDefined(l.autoScrollElement)?l.autoScrollElement:!1}setAutoScrollElement(s){this.autoScrollElement=s}applyOpts(s){o(s,"onDragEnter",this),o(s,"onDragOver",this),o(s,"onDragOut",this),o(s,"onDrag",this),o(s,"onBeforeDrag",this),o(s,"onBeforeDrop",this),o(s,"onBeforeDragOut",this),o(s,"onBeforeDragOver",this),o(s,"onBeforeDragEnter",this),o(s,"onDrop",this),o(s,"onValidDrop",this),o(s,"onInvalidDrop",this),o(s,"startDrag",this),o(s,"endDrag",this),this.getTargetEl=s.getTargetEl,this.getTargetContent=s.getTargetContent,this.renderGhost=s.renderGhost,this._alignOffset={x:s.offsetX||20,y:s.offsetY||20},this._ghostCls=s.ghostCls||"x-dd-drag-proxy",this.validStatusCls=s.validGhostCls||"dd-valid",this.invalidStatusCls=s.invalidGhostCls||"dd-invalid"}isDraggable(){return this.el?._markDraggable}get alignOffset(){return this._alignOffset}set ghostCls(s){this._ghostCls=s}get ghostCls(){return this._ghostCls}getValidStatusCls(){return this.validStatusCls}getInvalidStatusCls(){return this.invalidStatusCls}set el(s){if(this._el){for(const l of this._el?._disposePointEventFns??[])l?.();delete this._el._markDraggable,delete this._el._ddTarget}s&&(s._markDraggable=!0,s._ddTarget=this,s._disposePointEventFns=[x.on(s,"mousedown",l=>this.handleMouseDown(l)),x.on(s,"long-press",l=>this.handleMouseDown(l))]),this._el=s}get el(){return this._el}addMetaProp(s,l){this._meta||(this._meta={}),this._meta[s]=l}getMetaProp(s){return this._meta?this._meta[s]:null}handleMouseDown(s){if(!(s&&G.isMouseEvent(s)&&s.button!==0)&&this.isDragging!==!0)return this.manager?.handleMouseDown(s,this)}registerDragZones(s){Array.isArray(s)||(s=[s]);for(const l of s)this.registerDragZone(l)}registerDragZone(s){this.isDragZoneRegistered(s)||(this.targetZones.push(s),this.targetZones=this.targetZones.sort((l,w)=>w.order-l.order))}isDragZoneRegistered(s){return this.targetZones.includes(s)}unregisterDragZones(s){Array.isArray(s)||(s=[s]);for(const l of s)this.unregisterDragZone(l)}unregisterDragZone(s){const l=this.targetZones.indexOf(s);l>-1&&this.targetZones.splice(l,1)}getTargetZones(){return this.targetZones}purge(){for(const s of this._el?._disposePointEventFns??[])s?.();this.manager=null,delete this.el?._markDraggable,delete this.el?._ddTarget,delete this.el?._disposePointEventFns,delete this._el}_startDrag(s,l){this.isDragging=!0,this.startDrag(s,l,this),this.el&&(this.el.__isDragging=!0)}_endDrag(){this.isDragging=!1,this.endDrag(this),setTimeout(()=>{this.el&&(this.el.__isDragging=!1)},0)}_onDragEnter(s,l){if(this.isEnteringZone)return;if(this.isEnteringZone=!0,this.enteredZone=l,this.onBeforeDragEnter(s,l)===!1)return!1;const w=this.onDragEnter(s,l,this);w!==!1&&M.isString(w)&&this.manager?.updateGhostCls(w)}_onDragOut(s,l){if(this.isEnteringZone=!1,delete this.enteredZone,this.onBeforeDragOut(s,l)===!1)return!1;const w=this.onDragOut(s,l,this);w!==!1&&M.isString(w)&&this.manager?.updateGhostCls(w)}_onDragOver(s,l){if(this.onBeforeDragOver(s,l)===!1)return!1;const w=this.onDragOver(s,l,this);w!==!1&&M.isString(w)&&this.manager?.updateGhostCls(w)}_onDrag(s){if(this.autoScrollElement&&!G.isTouchEvent(s)){let l=["none","none"],w=[0,0];this._keepScrolling&&(window.clearInterval(this._keepScrolling),this._keepScrolling=null);const I=(c,m)=>{this.autoScrollElement&&(c[0]==="left"?this.autoScrollElement.scrollLeft-=m[0]*S:c[0]==="right"&&(this.autoScrollElement.scrollLeft+=m[0]*S),c[1]==="top"?this.autoScrollElement.scrollTop-=m[1]*S:c[1]==="bottom"&&(this.autoScrollElement.scrollTop+=m[1]*S))},C=(c,m)=>{this._keepScrolling=window.setInterval(()=>{I(c,m)},_),I(c,m)},h=this.autoScrollElement.getBoundingClientRect();s.clientX<h.left?(w[0]=Math.abs(s.clientX-h.left),l[0]="left"):s.clientX>h.right&&(w[0]=Math.abs(s.clientX-h.right),l[0]="right"),s.clientY<h.top?(w[1]=Math.abs(s.clientY-h.top),l[1]="top"):s.clientY>h.bottom&&(w[1]=Math.abs(s.clientY-h.bottom),l[1]="bottom"),C(l,w)}this.onDrag(s,this)}_onDrop(s,l){this._keepScrolling&&(window.clearInterval(this._keepScrolling),this._keepScrolling=null),this.onBeforeDrop(s)!==!1&&(this.onDrop(s,l,this),this.isEnteringZone&&this.enteredZone?(this.onValidDrop(s,this.enteredZone,this),this.enteredZone.notifyValidDrop(s,this.enteredZone,this)):(this.onInvalidDrop(s,l,this),l&&l.notifyInvalidDrop(s,l,this)),this.isEnteringZone=!1)}onDragEnter(s,l,w){}onDragOver(s,l,w){}onDragOut(s,l,w){}onDrag(s,l){}startDrag(s,l,w){}onBeforeDrop(s){}onBeforeDragOut(s,l){}onBeforeDragOver(s,l){}onBeforeDragEnter(s,l){}onBeforeDrag(s,l){}onDrop(s,l,w){}onValidDrop(s,l,w){}onInvalidDrop(s,l,w){}beforeEndDrag(){}endDrag(s){}on(s,l){return x.on(this.el,s,l)}off(s,l){return x.off(this.el,s,l)}}class y{constructor(){this.startX=0,this.startY=0,this.startThreshold=10,this.globalDragStart=null,this.globalSelectStart=null,delete this.currentDragTarget,this.preEnterZone=null,this._disposePointEventFns=[],this._ghostStatusCls="",delete this.ghostEl}isDraggable(s){return s.isDraggable()}hideGhost(){this.ghostEl&&x.css(this.ghostEl,"display","none"),this._ghostStatusCls=""}unhideGhost(){this.ghostEl&&x.css(this.ghostEl,"display","block")}setGhostClass(s){this.ghostEl&&(this.ghostEl.className="",s.ghostCls&&x.addClass(this.ghostEl,s.ghostCls),x.addClass(this.ghostEl,"v-dd-ghost"))}updateValidGhostCls(){this.currentDragTarget&&this.updateGhostCls(this.currentDragTarget.getValidStatusCls())}updateInvalidGhostCls(){this.currentDragTarget&&this.updateGhostCls(this.currentDragTarget.getInvalidStatusCls())}updateGhostCls(s){!s||s===this._ghostStatusCls||(this.ghostEl&&(M.isNonEmptyString(this._ghostStatusCls)&&x.removeClass(this.ghostEl,this._ghostStatusCls),x.addClass(this.ghostEl,s)),this._ghostStatusCls=s)}destroyGhost(){this.ghostEl&&(this._destroyGhost?.(),this.ghostEl?.parentNode?.removeChild(this.ghostEl),delete this.ghostEl)}createGhost(){if(this.ghostEl)return;let s=document.body,l=document.createElement("div");return x.css(l,"position","absolute"),x.css(l,"cursor","move"),x.css(l,"zIndex","999999"),x.css(l,"backgroundColor","white"),s.insertBefore(l,s.firstChild),this.ghostEl=l,this.ghostEl}destroyDragTarget(s){s.purge()}registerDragTarget(s){s.manager=this}isOverDragZones(s,l){if(!this.ghostEl)return null;let w=this.currentDragTarget?.getTargetZones();if(!w)return null;const I=w.map(C=>C.el.getBoundingClientRect());for(const[C,h]of I.entries()){const c=w[C];if(c.isOver&&c.isOver(s,h,this.currentDragTarget)||x.intersectWithPoint(h,l[0],l[1])&&c.el.contains(s.target))return c}return null}handleMouseMove(s){s.preventDefault();let l,w,I,C;if(G.isTouchEvent(s)?(l=s.touches[0].pageX,w=s.touches[0].pageY,I=s.touches[0].clientX,C=s.touches[0].clientY):(l=s.pageX,w=s.pageY,I=s.clientX,C=s.clientY),!this.currentDragTarget||Math.max(Math.abs(l-this.startX),Math.abs(w-this.startY))<this.startThreshold)return!0;this.currentDragTarget.isDragging||this.startDrag(l,w),this.ghostEl&&x.alignElWithMouse(this.ghostEl,l,w,{offsetX:this.currentDragTarget?.alignOffset?.x,offsetY:this.currentDragTarget?.alignOffset?.y}),this.currentDragTarget._onDrag(s);let h=this.isOverDragZones(s,[I,C]);h?(this.updateValidGhostCls(),this.currentDragTarget.isEnteringZone&&(this.currentDragTarget._onDragOver(s,h),h.notifyOver(s,this,this.currentDragTarget),this.preEnterZone!==h&&(this.currentDragTarget.enteredZone?.notifyOut(s,this.currentDragTarget),this.currentDragTarget._onDragOut(s,this.preEnterZone??null))),this.currentDragTarget.isEnteringZone||(this.currentDragTarget._onDragEnter(s,h),h.notifyEnter(s,this,this.currentDragTarget))):(this.updateInvalidGhostCls(),this.currentDragTarget.isEnteringZone&&(this.currentDragTarget.enteredZone?.notifyOut(s,this.currentDragTarget),this.currentDragTarget._onDragOut(s,this.preEnterZone))),this.preEnterZone=h}handleMouseDown(s,l){let w,I;if(G.isTouchEvent(s)?(w=s.touches[0].pageX,I=s.touches[0].pageY):(w=s.pageX,I=s.pageY),this.currentDragTarget&&this.handleMouseUp(s),this.currentDragTarget=l,this.currentDragTarget.onBeforeDrag(s,this.currentDragTarget)===!1){delete this.currentDragTarget;return}this._disposePointEventFns=[x.on(document.documentElement,"mousemove",C=>this.handleMouseMove(C)),x.on(document.documentElement,"touchmove",C=>this.handleMouseMove(C),{passive:!1}),x.once(document.documentElement,"mouseup",C=>this.handleMouseUp(C)),x.once(document.documentElement,"touchend",C=>this.handleMouseUp(C))],this.startX=w,this.startY=I}setGhostHtml(s){this.ghostEl&&(this.ghostEl.innerHTML=s)}startDrag(s,l){this.currentDragTarget&&(this.globalSelectStart=document.onselectstart,this.globalDragStart=document.ondragstart,document.onselectstart=()=>!1,document.ondragstart=()=>!1,this.createGhost(),this.setGhostClass(this.currentDragTarget),this.currentDragTarget._startDrag(s,l),this.ghostEl&&(this.currentDragTarget.renderGhost&&(this._destroyGhost=this.currentDragTarget.renderGhost(this.ghostEl)),this.currentDragTarget.getTargetContent?this.ghostEl.innerHTML=this.currentDragTarget.getTargetContent(this.currentDragTarget):this.currentDragTarget.getTargetEl&&this.ghostEl.appendChild(this.currentDragTarget.getTargetEl()),x.alignElWithMouse(this.ghostEl,s,l,{offsetX:this.currentDragTarget?.alignOffset?.x,offsetY:this.currentDragTarget?.alignOffset?.y})))}handleMouseUp(s){if(this.currentDragTarget){G.isMouseEvent(s)&&this.handleMouseMove(s),this.startX=0,this.startY=0,this.destroyGhost(),this.stopDrag(s);for(const l of this._disposePointEventFns??[])l?.();this._disposePointEventFns=[]}}stopDrag(s){document.onselectstart=this.globalSelectStart,document.ondragstart=this.globalDragStart,this.globalSelectStart=null,this.globalDragStart=null,this.currentDragTarget&&(this.preEnterZone&&this.preEnterZone.notifyDrop(s,this,this.currentDragTarget),this.currentDragTarget._onDrop(s,this.preEnterZone),this.currentDragTarget.beforeEndDrag(),this.currentDragTarget._endDrag(),delete this.currentDragTarget,this.preEnterZone=null)}stopEvents(s){s.stopPropagation(),s.preventDefault()}}const d=u.makeSymbol("dragDropManager");Jh.useDragDropManager=()=>{A.consoleError("you are not install DragDropManagerPlugin yet, please install it first")};const v=F.makePlugin({},b=>{Jh.useDragDropManager=E.makeManager(b,"$ddm",new y,d);const s=B.getGlobalProperties(b);s&&(s.$DragZone=p,s.$DragDropTarget=f)});return Jh.DragDropManager=y,Jh.DragDropManagerPlugin=v,Jh.DragDropTarget=f,Jh.DragZone=p,Jh.dragDropSymbol=d,Jh}var m2={},q4;function p5(){return q4||(q4=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Kt(),k=ls(),F=Kx(),B=ht(),G=St();const E={name:"Ghost",components:{vIcon:k.default,vRichText:F.default},props:{nums:{type:[Number,String,Boolean],default:!1},icon:{type:[Boolean,Object],default:!1},title:{type:String,default:""}},data(){return{}},computed:{showIcon(){return!!this.icon},iconProps(){return M.isObject(this.icon)?this.icon:{}},showNums(){return M.isBoolean(this.nums)?this.nums:+this.nums>=2},innerNums(){return+this.nums>99?"99+":this.nums}}},A={class:"v-ghost"},u={class:"ghost-title-wrapper"},o={class:"ghost-title"},S={key:0,class:"ghost-dot-nums"};function _(f,y,d,v,b,s){const l=B.resolveComponent("v-icon"),w=B.resolveComponent("v-rich-text");return B.openBlock(),B.createElementBlock("div",A,[B.renderSlot(f.$slots,"default",{},()=>[B.createElementVNode("div",u,[s.showIcon?(B.openBlock(),B.createBlock(l,B.normalizeProps(B.mergeProps({key:0},s.iconProps)),null,16)):B.createCommentVNode("",!0),B.createElementVNode("div",o,[B.renderSlot(f.$slots,"title",{},()=>[B.createVNode(w,{text:d.title},null,8,["text"])])])]),s.showNums?(B.openBlock(),B.createElementBlock("i",S,B.toDisplayString(s.innerNums),1)):B.createCommentVNode("",!0)])])}var p=G.default(E,[["render",_]]);x.default=p}(m2)),m2}var Y4;function uee(){return Y4||(Y4=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Dr(),k=g5(),F=Kt(),B=hT(),G=jx(),E=p5(),A=Qo(),u=ht();const o={ALWAYS:"always",HOVER:"hover",NEVER:"never"},S=3,_=3,p={TOP:"INSERT_TOP",BOTTOM:"INSERT_BOTTOM",INNER:"INSERT_INNER",UNKNOWN:"INSERT_UNKNOWN"};function f(O){const N=document.createElement("div");return M.addClass(N,"data-table-draggable-indicator"),O.appendChild(N),N._svcContainer=O,N}function y(O){O?.parentNode?.removeChild(O)}function d(O,N){N===p.INNER&&M.hasClass(O,"landed-inner")||N===p.TOP&&M.hasClass(O,"landed-up")||N===p.BOTTOM&&M.hasClass(O,"landed-down")||(M.removeClass(O,"landed-down"),M.removeClass(O,"landed-up"),M.removeClass(O,"landed-inner"),N===p.BOTTOM?M.addClass(O,"landed-down"):N===p.TOP?M.addClass(O,"landed-up"):N===p.INNER&&M.addClass(O,"landed-inner"))}function v(O,N,z){const{width:H,height:$}=O.getBoundingClientRect(),{offsetTop:V,offsetLeft:P}=O;d(N,z),M.css(N,"left",`${P}px`),M.css(N,"top",`${V}px`),M.css(N,"width",`${H}px`),M.css(N,"height",`${$}px`)}function b(O){M.css(O,"display","block")}function s(O){M.css(O,"display","none")}function l(O,N,z){this.$_draggingIndicator=f(this.$refs["table-body"]),this.rowDraggableStates.isDragging=!0;let H;const $=z.payload.index,V=Array.from(this.selectIndexes);V.includes($)?H=V:(this.selectRow($,{ensureRowVisible:!0,forceSelect:!1}),H=[$]),this.rowDraggableStates.draggingIndexes=H.sort(),this.rowDraggableStates.triggerIndex=$}function w(O){y(this.$_draggingIndicator),delete this.$_draggingIndicator,this.rowDraggableStates.isDragging=!1,this.rowDraggableStates.draggingIndexes=[],this.rowDraggableStates.triggerIndex=-1}function I(O,N,z,H){const $=N.getBoundingClientRect(),V=[O[0]-$.x,O[1]-$.y];return this.isItemDraggable(z)?this.allowReorder?this.canLandedRowInner(z)?V[1]>$.height-_?p.BOTTOM:V[1]<S?p.TOP:this.rowDraggableStates.draggingIndexes.includes(H)?p.UNKNOWN:p.INNER:V[1]>$.height/2?p.BOTTOM:p.TOP:this.canLandedRowInner(z)&&!this.rowDraggableStates.draggingIndexes.includes(H)?p.INNER:p.UNKNOWN:p.UNKNOWN}function C(O,N,z,H,$){const V=I.call(this,O,N,z,H);if(H<0||H>=this.current.legnth)return{insertType:p.UNKNOWN,landedIndex:-1};if($.includes(H)){if(V===p.TOP){if(H-1>=0&&!$.includes(H))return{insertType:p.BOTTOM,landedIndex:H-1}}else if(V===p.BOTTOM&&H+1<this.current.length&&!$.includes(H))return{insertType:p.TOP,landedIndex:H+1};return{insertType:p.UNKNOWN,landedIndex:H}}return{insertType:V,landedIndex:H}}function h(O){let N,z;A.isTouchEvent(O)?(N=O.touches[0].clientX,z=O.touches[0].clientY):(N=O.clientX,z=O.clientY);const H=document.elementFromPoint(N,z),$=M.findParentBySelector(H,"tr");if(!$)return;const V=+$.getAttribute("index"),{insertType:P,landedIndex:U}=C.call(this,[N,z],$,this.getRow(V),V,this.rowDraggableStates.draggingIndexes);this.rowDraggableStates.insertType=P,this.rowDraggableStates.landedIndex=U,b(this.$_draggingIndicator),v.call(this,$,this.$_draggingIndicator,P)}function c(O){let{draggingIndexes:N,insertType:z,landedIndex:H}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},$=N.map(Y=>O[Y]),V=O[H],P=O.slice();if($.length===0)return P;for(const Y of N.reverse())P.splice(Y,1);const U=P.findIndex(Y=>Y===V);return z===p.BOTTOM?P.splice(U+1,0,...$):P.splice(U,0,...$),P}function m(){const{draggingIndexes:O,insertType:N}=this.rowDraggableStates;O.length===0||N===p.UNKNOWN||(F.isDefined(this.customActionOnValidDrop)?this.current=this.customActionOnValidDrop(this.current,this.rowDraggableStates):(N===p.TOP||N===p.BOTTOM)&&(this.current=c(this.current,this.rowDraggableStates)),this.clearSelection(),this.$emit("drop",{data:this.current,draggableStates:this.rowDraggableStates}),this.$emit("reorder",{data:this.current}))}function T(){s(this.$_draggingIndicator)}var D=u.defineComponent({props:{getDraggingGhostProps:{type:Function,default:void 0}},emits:["reorder","drop"],data(){return{rowDraggableStates:{isDragging:!1,draggingIndexes:[],triggerIndex:-1,landedIndex:-1,insertType:p.UNKNOWN}}},computed:{allowRowDrop(){return F.isObject(this.isDraggable)?this.isDraggable.allowRowDrop??!1:!1},allowReorder(){return F.isObject(this.isDraggable)?this.isDraggable.allowReorder??!0:this.isDraggable}},methods:{getLandedClass(O){if(!this.rowDraggableStates)return[];const{landedIndex:N,insertType:z,isDragging:H}=this.rowDraggableStates,$=["is-landed"];return H===!1||N!==O?[]:(z===p.BOTTOM?$.push("landed-down"):z===p.TOP?$.push("landed-up"):z===p.INNER?$.push("landed-inner"):$.push("landed-unknown"),$)},getDraggingClass(O){return!this.rowDraggableStates||this.rowDraggableStates.isDragging===!1?[]:this.rowDraggableStates.draggingIndexes.includes(O)?["is-dragging"]:[]},renderDraggingGhost(O){const{column:N}=B.getPivotColumn(this.columns,0),{draggingIndexes:z,triggerIndex:H}=this.rowDraggableStates,$=this.current[H],V=this.getDraggingGhostProps?.(N.field,$,H)??{},{destroyFn:P,anchorEl:U}=G.mountInstance(this.$.appContext.app,E.default,{nums:z.length,title:this.getCellValue(N.field,$,H),...V});return O.appendChild(U),P},buildDraggableCols(){let O=this.$refs.content&&[...this.$refs.content.querySelectorAll("table")];if(!O)return;let N=new k.DragZone(O[0]);for(const{index:z,item:H}of this.currentVisible){let $=this.$refs[`row-${z}`]?.[0];if($=$?.$el??$,$){if($._ddTarget){const V=$._ddTarget;V.payload={index:z};continue}}else continue;if(!this.isItemDisabled(H)&&this.isItemDraggable(H)){const V=new k.DragDropTarget($,{renderGhost:P=>this.renderDraggingGhost(P),startDrag:l.bind(this),endDrag:w.bind(this),onDragOver:h.bind(this),onDragOut:T.bind(this),onValidDrop:m.bind(this),ghostCls:"v-table-dd-ghost"},{index:z});V.registerDragZone(N),this.$ddm.registerDragTarget(V)}}},canLandedRowInner(O){return O?.[this.fieldInfo.rowInfo]?.allowDrop??this.allowRowDrop}}});x.DRAG_ICON_SHOWN=o,x.default=D}(p2)),p2}var v2={},K4;function owe(){return K4||(K4=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Dr(),k=g5(),F=ht();const B=[-4,-9];function G(l,w){if(w.el._resizing||w.el._canResize)return!1}function E(l,w,I){this.colDraggableStates.isDragging=!0,this.colDraggableStates.draggingIndex=I.payload.index,this.colDraggableStates.draggingKey=I.payload.key,this.$_topMoveableIndicator=v(document.body,"top"),this.$_bottomMoveableIndicator=v(document.body,"bottom")}function A(l){window.setTimeout(()=>{this.colDraggableStates={isDragging:!1,draggingIndex:-1,landedIndex:-1,draggingKey:null,landedKey:null},b([this.$_topMoveableIndicator,this.$_bottomMoveableIndicator])},0)}function u(l,w){const{x:I,y:C}=w.getBoundingClientRect();return[l.pageX-I,l.pageY-C]}function o(l,w){const I=w?M.removeClass:M.addClass;for(const C of l)I(C,"col-moveable-indicator--hidden")}function S(l,w){let I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"top",C=arguments.length>3?arguments[3]:void 0,{top:h,right:c,left:m,bottom:T}=l.getBoundingClientRect();const[D,O]=this.$alignManager.getScroll(document.body);let N=0;l.getAttribute("is-group")&&(N=20),m=(C==="before"?m:c)+B[0]+D,h=(I==="top"?h:T+w.offsetWidth+N)+B[1]+O,M.css(w,"left",`${m}px`),M.css(w,"top",`${h}px`)}function _(l){const w=document.elementFromPoint(l.clientX,l.clientY);let I=M.findParentBySelector(w,"th");if(!I||!I._markDraggable)return;let C="before",h=I.cellIndex,c=I;const{width:m}=I.getBoundingClientRect();if(u(l,I)[0]>m/2){C="after";const T=y(this.columns,I.getAttribute("name"),this.fieldInfo.columnKey);T.col?(I=this.$options.headersMap[T.col[this.fieldInfo.columnKey]],h=T.index):(I=null,h=T.index)}if(this.colDraggableStates.landedIndex=h,this.colDraggableStates.position=C,this.colDraggableStates.landedKey=I?I.getAttribute("name"):"n/a",this.colDraggableStates.draggingKey===this.colDraggableStates.landedKey)return o([this.$_topMoveableIndicator,this.$_bottomMoveableIndicator],!1),!1;o([this.$_topMoveableIndicator,this.$_bottomMoveableIndicator],!0),S.call(this,c,this.$_topMoveableIndicator,"top",C),S.call(this,c,this.$_bottomMoveableIndicator,"bottom",C)}function p(l,w,I){let C=l[w],h=l.slice(),c=w;return C&&(h.splice(I,0,C),I<w&&c++,h.splice(c,1)),h}function f(l){return l.hide||l.groupKey}function y(l,w,I){let C=l.findIndex(c=>c[I]===w),h=l[++C];for(;h&&f(h);)h=l[++C];return{col:h,index:C}}function d(){let{draggingIndex:l,landedIndex:w,draggingKey:I,landedKey:C}=this.colDraggableStates;if(l===-1||w===-1)return;const h=this.columns.findIndex(T=>T[this.fieldInfo.columnKey]===I);let c=-1;w===this.columns.length?c=w:c=this.columns.findIndex(T=>T[this.fieldInfo.columnKey]===C);let m=this.columns.slice();m=p(m,h,c),this.$emit("update:columns",m)}function v(l,w){const I=document.createElement("div");return M.addClass(I,"col-moveable-indicator"),M.addClass(I,w),l.appendChild(I),I}function b(l){for(const w of l)w&&w.parentNode&&w.parentNode.removeChild(w)}var s=F.defineComponent({emits:["update:columns"],data(){return{colDraggableStates:{isDragging:!1,draggingIndex:-1,landedIndex:-1}}},methods:{removeMoveableColsDD(){if(this.$options.moveableDD){for(const l of this.$options.moveableDD)l.purge();this.$options.moveableDD=[]}},buildMoveableCols(){this.removeMoveableColsDD(),this.$options.moveableDD=this.$options.moveableDD||[];const l=this.$refs.theader;if(!l)return;let w=this.isGroupHeadMode?this.firstColumnRow:this.currentVisibleColumns,I=w.length,C=new k.DragZone(l);this.$options.headersMap=[...this.$refs.theader.querySelectorAll("th")].reduce((h,c)=>(h[c.getAttribute("name")]=c,h),{});for(let h=0;h<I;h++){const c=w[h],m=this.getHeaderCell(h);if(!m||f(c))continue;let T=new k.DragDropTarget(m,{onBeforeDrag:G.bind(this),startDrag:E.bind(this),endDrag:A.bind(this),onDragOver:_.bind(this),onValidDrop:d.bind(this),ghostCls:"v-table-dd-ghost col-moveable-ghost",getTargetContent:(function(){return`
<div class="col-moveable">
<div class="dd-drop-icon"></div>
<div class="col-desc">
${m.innerText}
</div>
</div>`}).bind(this)},{index:h,key:c[this.fieldInfo.columnKey]});T.registerDragZone(C),this.$ddm.registerDragTarget(T),this.$options.moveableDD.push(T)}}}});x.default=s}(v2)),v2}var y2={},Jd={},X4;function cT(){if(X4)return Jd;X4=1,Object.defineProperty(Jd,"__esModule",{value:!0});var x=Kt(),M=Qo();const k={toggle:"toggle",select:"select","select-keep":"select-keep",range:"range","range-keep":"range-keep"};function F(A){return A===k.range||A===k["range-keep"]}function B(A){return A===k.select||A===k["select-keep"]}function G(A){let{isCtrlMode:u=M.isCtrl(A),isShiftMode:o=M.isShift(A)}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return o?u?k["range-keep"]:k.range:u?k.toggle:k.select}function E(){let{toggle:A="toggleItem",selectRange:u,isMultipleSelected:o="isMultipleSelected",select:S="selectItem",getItemValue:_="getItemValue",isItemDisabled:p="isItemDisabled",itemsKey:f="selectedItems"}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{data(){return{lastSelectIndex:-1,lastSelectRangeIndex:-1,[f]:new Set,forceSelectedItems:new Set}},methods:{clearSelection(){let{force:y=!1}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return y?(this[f]=new Set,this.forceSelectedItems=new Set):this[f]=new Set(this.forceSelectedItems),!0},resetSelectIndex(){this.lastSelectIndex=this.lastSelectRangeIndex=-1},addSelectedItem(y){let{forceSelect:d=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const v=this[_](y);if(d)this.forceSelectedItems.add(v);else if(this[p](y))return!1;return this[f].add(v),!0},removeSelectedItem(y){let{forceSelect:d=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const v=this[_](y);if(d)this.forceSelectedItems.delete(v);else if(this[p](y))return!1;return this[f].delete(v),!0},isItemSelected(y){const d=this[_](y);return this[f].has(d)},selectItems(y){for(const d of y)this.addSelectedItem(d);this[f]=new Set(this[f])},selectItemsRange(y,d,v){let{keepSelection:b=!1}=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};b||this.clearSelection();const s=x.clampValue(Math.min(y,d),0,v.length-1),l=x.clampValue(Math.max(y,d),0,v.length-1);return this.selectItems(v.slice(s,l+1)),this.lastSelectRangeIndex=d,!0},onClickItem(y,d,v){let{selectStrategy:b}=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},s=arguments.length>4?arguments[4]:void 0;const l=this[o]();if(b=b??G(y),F(b)&&this.lastSelectIndex!==-1&&l){const w=b===k["range-keep"];return this[u](w?this.lastSelectRangeIndex:this.lastSelectIndex,d,{keepSelection:w},s)}else{if(b===k.toggle&&l)return this[A](v,d,s);{const w=b===k["select-keep"];return this[S](v,d,{keepSelection:w,...s})}}},toggleItem(y,d){let{forceSelect:v=!1}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.isItemSelected(y)?this.removeSelectedItem(y,{forceSelect:v}):(this.addSelectedItem(y,{forceSelect:v}),this.lastSelectIndex=this.lastSelectRangeIndex=d),this[f]=new Set(this[f]),!0},selectItem(y,d){let{forceSelect:v=!1,keepSelection:b=!1}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!v&&this[p](y)?!1:(b||this.clearSelection(),this.addSelectedItem(y,{forceSelect:v}),this.lastSelectIndex=this.lastSelectRangeIndex=d,!0)}}}}return Jd.SelectStrategy=k,Jd.eventToSelectStrategy=G,Jd.isSelectOneStrategy=B,Jd.isSelectRangeStrategy=F,Jd.selectable=E,Jd}var J4;function awe(){return J4||(J4=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Dr(),k=Qo(),F=Kt(),B=cT(),G=ln(),E=ht();function A(S,_){return S>=0&&S<_.length}function u(S){return F.isArray(S)?S.map(_=>u(_)):S?.$el??S}var o=E.defineComponent({mixins:[B.selectable({toggle:"toggleRowItem",selectRange:"selectRange",select:"selectRowItem",getItemValue:"getItemValue",isItemDisabled:"isRowUnselectable",itemsKey:"selectIndexes"})],props:{multipleSelected:{type:Boolean,default:!1}},emits:["rowclick","rowclear"],data(){return{hoverIndex:null}},computed:{innerMultipleSelected(){return this.innerSelectionMode==="checkbox"||this.innerSelectionMode==="file-list"?!0:this.multipleSelected}},watch:{hoverIndex(S,_){M.raf(()=>{let p=u(this.$refs[`row-${S}`]),f=u(this.$refs[`row-${_}`]);this.groupTable&&(p=u(this.$refs.groupNode.$refs[`row-${S}`]),f=u(this.$refs.groupNode.$refs[`row-${_}`])),this.toggleHoverRow("row-hover",p,f),this.toggleHoverRow("row-hover",this.$refs[`expandable-row-${S}`],this.$refs[`expandable-row-${_}`])})}},methods:{isMultipleSelected(){return this.innerMultipleSelected},toggleHoverRow(S,_,p){_=_&&_[0],p=p&&p[0],p&&M.removeClass(p,S),_&&M.addClass(_,S)},ensureRowVisible(S){const _=u(this.$refs[`row-${S}`]);_&&_[0]&&this.$refs.scrollbar.ensureVisible(_[0])},getItemValue(S){return S.index},selectRowItem(S,_,p){let{index:f}=S;return this.selectRow(f,p)},toggleRowItem(S,_,p){let{index:f}=S;return this.toggleRow(f,p)},toggleRow(S){let{ensureRowVisible:_=!0,forceSelect:p}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return _&&this.ensureRowVisible(S),this.toggleItem({index:S},S,{ensureRowVisible:_,forceSelect:p})},selectRow(S){let{ensureRowVisible:_=!0,forceSelect:p,keepSelection:f=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return _&&this.ensureRowVisible(S),this.selectItem({index:S},S,{ensureRowVisible:_,forceSelect:p,keepSelection:f})},selectPrevRow(){A(this.lastSelectIndex-1,this.current)&&this.selectRow(this.lastSelectIndex-1)},selectNextRow(){A(this.lastSelectIndex+1,this.current)&&this.selectRow(this.lastSelectIndex-1)},defaultSelect(){if(this.clearSelection(),this.defaultSelected===!0){let S=!1,_=-1,p=this.getAllRange({filter:!1});for(const f of p)this.isRowDefaultSelected(f)&&(this.clickRow(f,null,{selectStrategy:B.SelectStrategy["select-keep"],forceSelect:this.isRowUnselectable({index:f})}),S=!0),_===-1&&this.isRowSelectable(f)&&(_=f);S||this.clickRow(_,null);return}if(this.innerMultipleSelected){const S=F.isArray(this.defaultSelected)?this.defaultSelected:[this.defaultSelected];for(const _ of S)this.clickRow(_,null,{selectStrategy:B.SelectStrategy["select-keep"],forceSelect:this.isRowUnselectable({index:_})})}else this.clickRow(this.defaultSelected,null)},clearSelectedRows(){this.clearSelection(),G.$emit(this,"rowclear")},clickRow(S,_){let{selectStrategy:p=void 0,forceSelect:f=!1,isCtrlMode:y=!1}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},d={},v=!1;if(this.innerMultipleSelected){p=p??B.eventToSelectStrategy(_,{isCtrlMode:k.isCtrl(_)||this.innerSelectionMode==="checkbox"||y}),v=this.onClickItem(_,S,{index:S},{selectStrategy:p},{forceSelect:f});const b=Array.from(this.selectIndexes);d={indexes:b,rows:this.getRows(b)}}else{p=p??B.eventToSelectStrategy(_);const b=p===B.SelectStrategy["select-keep"];v=this.selectRow(S,{keepSelection:b});const s=Array.from(this.selectIndexes);d={index:s[0],row:this.getRow(s[0])}}return v&&(G.$emit(this,"rowclick",d),this.$nextTick(()=>{this.toggleHoverRow("row-hover",u(this.$refs[`row-${this.hoverIndex}`]),null),this.toggleHoverRow("row-hover",this.$refs[`expandable-row-${this.hoverIndex}`],null)})),{result:v,payload:d}},getRow(S){if(F.isNumber(S))return this.current?this.current[S]:null;if(F.isString(S)){const[_,p]=S.split(":"),f=this.categories.find(y=>y.key===_);return f?f.items[p]:null}return null},getRows(S){return S.map(_=>this.getRow(_))},unselectCategory(S){if(this.innerMultipleSelected){for(const[_]of S.items.entries()){const p=`${S.key}:${_}`;this.selectIndexes.delete(p)}this.selectIndexes=new Set(this.selectIndexes)}},selectCategory(S){if(this.innerMultipleSelected){for(const[_]of S.items.entries()){const p=`${S.key}:${_}`;this.selectIndexes.add(p)}this.selectIndexes=new Set(this.selectIndexes)}},selectAll(){if(this.innerMultipleSelected){let S=this.getAllRange({filter:this.filtered});if(this.autoPagination){const _=(this.currentPageNum-1)*this.currentPageSize;S=S.slice(_,_+this.currentPageSize)}this.clearSelection(),this.selectRows(S)}},selectRows(S){let{forceSelect:_,ensureRowVisible:p=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.innerMultipleSelected&&S.length>1)throw new Error("selectRows with multiple indexes only work in multiple-selected mode");for(const f of S)this.isRowSelectable(f)&&this.addSelectedItem({index:f},{forceSelect:_});p&&S.length>0&&this.ensureRowVisible(S[S.length-1]),this.selectIndexes=new Set(this.selectIndexes)},deselectRows(S){let{forceSelect:_}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(const p of S)this.isRowSelectable({index:p})&&this.removeSelectedItem({index:p},{forceSelect:_});this.selectIndexes=new Set(this.selectIndexes)},selectRange(S,_){let{keepSelection:p=!1,forceSelect:f=!1}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};p||this.clearSelection();let y="add";this.isSelectionMode&&this.isItemSelected({index:_})&&(y="remove");const d=this.getVisibleRange(S,_);return y==="add"?this.selectRows(d,{forceSelect:f}):this.deselectRows(d,{forceSelect:f}),this.lastSelectRangeIndex=_,!0},getIndex(S){if(this.groupTable){const[_,p]=S.split(":");return[this.categories.findIndex(y=>y.key===_),+p]}return S},getAllRange(){let{filter:S=!1}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},_=[];if(this.groupTable)for(const p of this.categories){const f=this.getItems(p.items,{filter:S});_=_.concat(f.map(y=>{let{index:d}=y;return`${p.key}:${d}`}))}else _=this.getItems(this.current,{filter:S}).map(f=>{let{index:y}=f;return y});return _},getVisibleRange(S,_){if(this.groupTable){const y=this.categories;let d=[],[v,b]=this.getIndex(S),[s,l]=this.getIndex(_);(v===s?b<l:v<s)||([v,s]=[s,v],[b,l]=[l,b]);for(let I=v;I<=s;I++){const C=this.getItems(y[I].items,{filter:this.filtered});let h,c;I===v?h=b:h=0,I===s?c=l:c=y[I].items.length-1;const m=C.findIndex(D=>{let{index:O}=D;return O===h}),T=C.findIndex(D=>{let{index:O}=D;return O===c});d=d.concat(C.slice(m,T+1).map(D=>{let{index:O}=D;return`${y[I].key}:${O}`}))}return d}S>_&&([S,_]=[_,S]);const p=this.currentPagingData.findIndex(y=>{let{index:d}=y;return d===S}),f=this.currentPagingData.findIndex(y=>{let{index:d}=y;return d===_});return this.currentPagingData.slice(p,f+1).map(y=>{let{index:d}=y;return d})},hoverRow(S){this.hoverIndex=S},getSelectedRowClass(S){return this.isItemSelected({index:S})?["row-selected"]:[]},getRowClass(S,_){let p={"row-disabled":this.isItemDisabled&&this.isItemDisabled(_)},f=this.customRowClasses||[];if(_[this.fieldInfo.rowInfo]&&_[this.fieldInfo.rowInfo].customClasses){const y=_[this.fieldInfo.rowInfo].customClasses;(Array.isArray(y)||F.isString(y))&&(f=f.concat(y))}return["row",p].concat(f).concat(this.getSelectedRowClass(S))},isRowUnselectable(S){let{index:_}=S;return!this.isRowSelectable(_)},isRowDefaultSelected(S){const _=this.getRow(S);return _?!!_?.[this.fieldInfo.rowInfo]?.defaultSelected:!1},isRowForceSelected(S){return this.isRowUnselectable({index:S})&&this.selectIndexes.has(S)},isRowSelectable(S){let _=this.getRow(S);return _?!_[this.fieldInfo.rowInfo]||!_[this.fieldInfo.rowInfo].unselectable:!0}}});x.default=o}(y2)),y2}var w2={},Z4;function m5(){return Z4||(Z4=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Ni(),k=ln(),F=ci(),B=df(),G=Kt(),E=ya(),A=vr(),u=_i(),o=Ab(),S=ls(),_=kr(),p=ht(),f=St();A.register("pagination-first",_.vIconChevronFirst),A.register("pagination-last",_.vIconChevronLast),A.register("pagination-right",_.vIconChevronRight),A.register("pagination-right-double",_.vIconChevronRightDouble),A.register("pagination-left",_.vIconChevronLeft),A.register("pagination-left-double",_.vIconChevronLeftDouble),A.register("pagination-refresh",_.vIconRefresh);const y=5,d={HIDE_PER_PAGE:"sm",HIDE_TOTAL_ITEMS:"xxs",LESS:"sm"},v=["start","end","total","filteredCount","selectedCount"],b=p.defineComponent({name:"Pagination",components:{SpinIcon:B.default,vIcon:S.default,vSingleSelect:o.default},directives:{tooltip:E.default,iconify:A.default},mixins:[F.default],props:{[M.componentsProps.value()]:{type:Number,default:1},total:{type:[Number,String],default:0},start:{type:[Number,String],default:0},end:{type:[Number,String],default:0},selectedCount:{type:[Number,String],default:0},filteredCount:{type:[Number,String],default:0},switchPage:{type:Boolean,default:!0},pageShiftUnit:{type:Number,default:5},pageSize:{type:Number,default:10},showTotal:{type:Boolean,default:!0},hideRefreshBtn:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},itemsPerPage:{type:[Boolean,Array],default:!1},mode:{type:String,default:"normal",validator(c){return["normal","less"].includes(c)}},hasFirstBtn:{type:Boolean,default:!0},hasLastBtn:{type:Boolean,default:!0},hasNext:{type:Boolean,default:void 0},hasPrev:{type:Boolean,default:void 0},endless:{type:Boolean,default:!1},mobileBreakpoint:{type:[Object,Boolean],default:()=>({"hide-per-page":d.HIDE_PER_PAGE,"hide-total-items":d.HIDE_TOTAL_ITEMS,less:d.LESS})},totalTextMode:{type:String,validator:c=>["total","range","filter","select"].includes(c),default:"total"},totalTextFormat:{type:Object,default:()=>({})},beforeSwitchPage:{type:Function,default:void 0}},emits:["update:page-size","update:model-value","change","change-page","refresh"],data(){return{current:M.getModelValue(this),prefixCls:"v-pagination",activeBtn:void 0}},computed:{innerTotalTextFormat(){return u.merge(this.totalTextFormat,{total:"{total} {items}",range:"{start}-{end} {items}",filter:"{filteredCount} {items}",select:`<span class="selected-item">{selectedCount}</span> / {total} {items} ${this._i18n("common","selected")}`})},currentPageShiftUnit(){return this.lessMode?1:this.pageShiftUnit},prevBtnIconName(){return this.currentPageShiftUnit===1?"pagination-left":"pagination-left-double"},nextBtnIconName(){return this.currentPageShiftUnit===1?"pagination-right":"pagination-right-double"},prevBtnClass(){return[this.prefixCls+"-prev",{disabled:!this._hasPrev(),single:this.currentPageShiftUnit===1}]},nextBtnClass(){return[this.prefixCls+"-next",{disabled:!this._hasNext(),single:this.currentPageShiftUnit===1}]},prevLabel(){return this._i18n("uicommon","pre_x_pages").replace("{0}",this.currentPageShiftUnit)},nextLabel(){return this._i18n("uicommon","next_x_pages").replace("{0}",this.currentPageShiftUnit)},wrapperCls(){return[this.prefixCls,{less:this.lessMode,"rwd--less":this.isLessByRWD}]},isPerPageHidden(){return this.mobileBreakpoint&&this.$breakpointManager?.lessAndEqThan(this.mobileBreakpoint?.["hide-per-page"]??d.HIDE_PER_PAGE)},isTotalItemsHidden(){return this.mobileBreakpoint&&this.$breakpointManager?.lessAndEqThan(this.mobileBreakpoint?.["hide-total-items"]??d.HIDE_TOTAL_ITEMS)},isLessByRWD(){return this.mobileBreakpoint&&this.$breakpointManager?.lessAndEqThan(this.mobileBreakpoint?.less??d.LESS)},lessMode(){return this.mode==="less"||this.isLessByRWD},currentPageSize:{get(){return this.pageSize},set(c){c!==this.pageSize&&(k.$emit(this,"update:page-size",c),k.$emit(this,M.getModelEventName(this),1))}},allPages(){const c=this.totalTextMode==="filter"?this.filteredCount:this.total;return Math.ceil(c/this.pageSize)},pageList(){if(this.lessMode)return[this.current];const c=[],m=this.pageLeft,T=this.pageRight;for(let D=m;D<=T;D++)c.push(D);return c},pageLeft(){return this.allPages<y?1:this.current-2},pageRight(){return this.allPages<y?this.allPages:this.current+2},totalText(){let m=this.innerTotalTextFormat[this.totalTextMode];for(const T of v)if(G.isDefined(this[T])){const D=G.isFunction(this[T])?this[T](this):this[T];m=m.replace(`{${T}}`,D)}return m=m.replace("{items}",this.getItemsText(this.totalTextMode)),m}},watch:{current(c){k.$emit(this,M.getModelEventName(this),c),k.$emit(this,"change",c)},[M.componentsProps.value()](c){this.current=c},allPages(){this._outOfRange(M.getModelValue(this))&&(this.current=1)}},methods:{getItemsText(c){let m=!1;return c==="total"?m=+this.total==1:c==="range"?m=+this.start==+this.end:c==="filter"?m=+this.filteredCount==1:c==="select"&&(m=+this.selectedCount==1),m?this._i18n("uicommon","item"):this._i18n("uicommon","items")},getPageButtonClass(c){return[this.prefixCls+"-item",this.prefixCls+"-item-"+c,this.current==c?this.prefixCls+"-item-active":"",this._outOfRange(c)?this.prefixCls+"-item-ghost":""]},async _handleChange(c){await this.beforeSwitchPage?.({pageNum:c,pageSize:this.currentPageSize})!==!1&&(c=Math.max(c,1),this.endless||(c=Math.min(c,this.allPages)),k.$emit(this,"change-page",{pageNum:c}),this._isValid(c)&&(this.current=c,await this.$nextTick(),this.$refs.page[c-this.pageLeft]?.focus()))},_handleRefresh(){k.$emit(this,"refresh")},_prev(){this._hasPrev()&&this._handleChange(this.current-this.currentPageShiftUnit)},_first(){this._handleChange(1)},_last(){this._handleChange(this.allPages)},_next(){this._hasNext()&&this._handleChange(this.current+this.currentPageShiftUnit)},_hasPrev(){return G.isDefined(this.hasPrev)?this.hasPrev:this.current>1},_hasNext(){return G.isDefined(this.hasNext)?this.hasNext:this.endless?!0:this.current<this.allPages},_isValid(c){return G.isNumber(c)&&c!==this.current},_outOfRange(c){return this.endless?c<1:c<1||c>this.allPages},async activateBtnByArrowKeydown(c){["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(c.key)&&(c.preventDefault(),["ArrowUp","ArrowLeft"].includes(c.key)&&await this.setActiveBtnToLeft(),["ArrowDown","ArrowRight"].includes(c.key)&&await this.setActiveBtnToRight(),this.focusActiveBtn())},async setActiveBtnToLeft(){await this.$nextTick();const c=[this.$refs.firstBtn,this.$refs.prevBtn,...this.$refs.page,this.$refs.nextBtn,this.$refs.lastBtn].filter(D=>D.tabIndex===0);let m=c.indexOf(this.activeBtn);m===-1&&(m=c.length);const T=Math.max(0,m-1);this.activeBtn=c[T]},async setActiveBtnToRight(){await this.$nextTick();const c=[this.$refs.firstBtn,this.$refs.prevBtn,...this.$refs.page,this.$refs.nextBtn,this.$refs.lastBtn].filter(D=>D.tabIndex===0),m=c.indexOf(this.activeBtn),T=Math.min(m+1,c.length-1);this.activeBtn=c[T]},focusActiveBtn(){this.activeBtn&&this.activeBtn.focus()}}}),s=["tabindex","aria-pressed","aria-label","syno-id","onFocus","onClick","onKeydown"],l={key:0,class:"items-per-page-wrapper"},w={class:"items-per-page-text"},I=["innerHTML"];function C(c,m,T,D,O,N){const z=p.resolveComponent("v-icon"),H=p.resolveComponent("v-single-select"),$=p.resolveComponent("spin-icon"),V=p.resolveDirective("tooltip"),P=p.resolveDirective("syno-id");return p.withDirectives((p.openBlock(),p.createElementBlock("div",{class:p.normalizeClass(c.wrapperCls)},[p.createElementVNode("div",{class:p.normalizeClass(c.prefixCls+"-left")},[c.switchPage?(p.openBlock(),p.createElementBlock("ul",{key:0,class:"left-paging",onKeydown:m[12]||(m[12]=function(){return c.activateBtnByArrowKeydown&&c.activateBtnByArrowKeydown(...arguments)})},[c.hasFirstBtn?p.withDirectives((p.openBlock(),p.createBlock(z,{key:0,ref:"firstBtn",role:"button",name:"pagination-first","svg-icon-set":"set13",tabindex:c._hasPrev()?0:-1,"aria-label":c._i18n("extlang","firstpage"),class:p.normalizeClass([c.prefixCls+"-first",c._hasPrev()?"":"disabled"]),"syno-id":`${c.synoId}-pagination-first`,onFocus:m[0]||(m[0]=U=>c.activeBtn=c.$refs.firstBtn),onClick:m[1]||(m[1]=U=>c._first()),onKeyup:m[2]||(m[2]=p.withKeys(p.withModifiers(U=>c._first(),["prevent"]),["native","enter"]))},null,8,["tabindex","aria-label","class","syno-id"])),[[V,c._i18n("extlang","firstpage")]]):p.createCommentVNode("",!0),p.withDirectives(p.createVNode(z,{ref:"prevBtn",role:"button","svg-icon-set":"set13",name:c.prevBtnIconName,tabindex:c._hasPrev()?0:-1,"aria-label":c.prevLabel,class:p.normalizeClass(c.prevBtnClass),onFocus:m[3]||(m[3]=U=>c.activeBtn=c.$refs.prevBtn),onClick:m[4]||(m[4]=U=>c._prev()),onKeyup:m[5]||(m[5]=p.withKeys(p.withModifiers(U=>c._prev(),["prevent"]),["native","enter"])),"syno-id":`${c.synoId}-pagination-prev`},null,8,["name","tabindex","aria-label","class","syno-id"]),[[V,c.prevLabel]]),(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(c.pageList,(U,Y)=>(p.openBlock(),p.createElementBlock("li",{ref_for:!0,ref:"page",role:"button",key:`${U}-${Y}`,class:p.normalizeClass(c.getPageButtonClass(U)),tabindex:c._outOfRange(U)?-1:0,"aria-pressed":c.current==U,"aria-label":c._i18n("uicommon","goto_page").replace("{0}",U),"syno-id":`${c.synoId}-pagination-${Y}`,onFocus:Z=>c.activeBtn=c.$refs.page[Y],onClick:Z=>c._handleChange(U),onKeydown:p.withKeys(p.withModifiers(Z=>c._handleChange(U),["prevent"]),["enter"])},p.toDisplayString(c._outOfRange(U)?"":U),43,s))),128)),p.withDirectives(p.createVNode(z,{ref:"nextBtn",role:"button","svg-icon-set":"set13",name:c.nextBtnIconName,tabindex:c._hasNext()?0:-1,"aria-label":c.nextLabel,class:p.normalizeClass(c.nextBtnClass),"syno-id":`${c.synoId}-pagination-next`,onFocus:m[6]||(m[6]=U=>c.activeBtn=c.$refs.nextBtn),onClick:m[7]||(m[7]=U=>c._next()),onKeyup:m[8]||(m[8]=p.withKeys(p.withModifiers(U=>c._next(),["prevent"]),["native","enter"]))},null,8,["name","tabindex","aria-label","class","syno-id"]),[[V,c.nextLabel]]),c.hasLastBtn&&!c.endless?p.withDirectives((p.openBlock(),p.createBlock(z,{key:1,ref:"lastBtn",role:"button",name:"pagination-last","svg-icon-set":"set13",tabindex:c._hasNext()?0:-1,"aria-label":c._i18n("extlang","lastpage"),class:p.normalizeClass([c.prefixCls+"-last",c._hasNext()?"":"disabled"]),"syno-id":`${c.synoId}-pagination-last`,onFocus:m[9]||(m[9]=U=>c.activeBtn=c.$refs.lastBtn),onClick:m[10]||(m[10]=U=>c._last()),onKeyup:m[11]||(m[11]=p.withKeys(p.withModifiers(U=>c._last(),["prevent"]),["native","enter"]))},null,8,["tabindex","aria-label","class","syno-id"])),[[V,c._i18n("extlang","lastpage")]]):p.createCommentVNode("",!0)],32)):p.createCommentVNode("",!0)],2),p.renderSlot(c.$slots,"right-wrapper",{},()=>[p.createElementVNode("div",{class:p.normalizeClass(c.prefixCls+"-right")},[c.isPerPageHidden?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock(p.Fragment,{key:0},[c.itemsPerPage?(p.openBlock(),p.createElementBlock("div",l,[p.createElementVNode("span",w,p.toDisplayString(c._i18n("common","items_perpage")),1),p.createVNode(H,{width:98,"syno-id":`${c.synoId}-per-page-select`,options:c.itemsPerPage,modelValue:c.currentPageSize,"onUpdate:modelValue":m[13]||(m[13]=U=>c.currentPageSize=U)},null,8,["syno-id","options","modelValue"])])):p.createCommentVNode("",!0),p.renderSlot(c.$slots,"right")],64)),c.showTotal&&!c.endless&&!c.isTotalItemsHidden?p.renderSlot(c.$slots,"total",{key:1},()=>[p.createElementVNode("div",{class:p.normalizeClass(c.prefixCls+"-total"),innerHTML:c.totalText},null,10,I)]):p.createCommentVNode("",!0),c.loading?(p.openBlock(),p.createBlock($,{key:2})):p.withDirectives((p.openBlock(),p.createBlock(z,{key:3,role:"button",tabindex:"0",name:"pagination-refresh",class:"v-pagination-refresh","svg-icon-set":"set13","aria-label":c._i18n("common","refresh"),"syno-id":`${c.synoId}-pagination-refresh`,onClick:m[14]||(m[14]=U=>c._handleRefresh()),onKeyup:m[15]||(m[15]=p.withKeys(p.withModifiers(U=>c._handleRefresh(),["prevent"]),["native","enter"]))},null,8,["aria-label","syno-id"])),[[p.vShow,!c.hideRefreshBtn]])],2)])],2)),[[P]])}var h=f.default(b,[["render",C]]);x.default=h}(w2)),w2}var b2={},C2={},Q4;function v5(){return Q4||(Q4=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=ht(),k=M.defineComponent({name:"SlideUpDown",props:{expand:{type:Boolean,default:!1},duration:{type:Number,default:240},tag:{type:String,default:"div"}},emits:["update:expand","expand","collapse","before-expand","before-collapse"],data(){return{prefix:"v-slide-up-down",style:{},inTransition:!1}},watch:{expand(F,B){if(this.inTransition){this.$emit("update:expand",B);return}this.doLayout(F,!0)}},mounted(){this.doLayout(this.expand,!1)},methods:{async setHeight(F,B,G){this.style={height:F},G&&await this.$nextTick(),this.forceRelayout=this.$refs.wrapper.scrollHeight,this.style={height:B,overflow:"hidden","transition-property":"height","transition-timing-function":"ease","transition-duration":this.duration+"ms"},F===B&&this.onTransitionEnd()},onTransitionEnd(){this.inTransition&&(this.inTransition=!1),this.expand?(this.style={},this.$emit("expand")):(this.style={height:"0px",overflow:"hidden"},this.$emit("collapse"))},doLayout(F){let B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;B&&(this.inTransition=!0),F?(this.$emit("before-expand"),B?this.setHeight("0px",`${this.$refs.wrapper.scrollHeight}px`,!0):this.setHeight("0px","auto",!1)):(this.$emit("before-collapse"),this.setHeight(`${this.$refs.wrapper.scrollHeight}px`,"0px",B))}},render(F){return F(this.tag,{style:this.style,ref:"wrapper",attrs:{"aria-hidden":!this.expand},directives:[{name:"syno-id"}],on:{transitionend:this.onTransitionEnd}},this.$slots.default)}});x.default=k}(C2)),C2}var eY;function swe(){return eY||(eY=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=v5(),k=ht(),F=St();const B=k.defineComponent({name:"TreeNode",components:{vSlideUpDown:M.default},props:{node:{type:Object,required:!0},columns:{type:Array,required:!0},index:{type:Number,required:!0},level:{type:Number,required:!0},defaultExpand:{type:Boolean,default:!1}},data(){return{prefix:"v-table-tree-node",currentExpand:this.defaultExpand||this.node.expanded||!1}},computed:{expandable(){return!this.node.leaf&&this.node.children}},methods:{toggle(){this.expandable&&(this.currentExpand=!this.currentExpand)}}}),G=["syno-id"],E={class:"cell-content"},A={class:"cell-text"},u={class:"tree-child"};function o(_,p,f,y,d,v){const b=k.resolveComponent("tree-node",!0),s=k.resolveComponent("v-slide-up-down");return k.openBlock(),k.createElementBlock("div",{class:k.normalizeClass(_.prefix+"-ct")},[k.createElementVNode("table",{class:k.normalizeClass(_.prefix+"-table")},[k.createElementVNode("tr",null,[(k.openBlock(!0),k.createElementBlock(k.Fragment,null,k.renderList(_.columns,(l,w)=>(k.openBlock(),k.createElementBlock("td",{key:w,"syno-id":`${_.synoId}-td-${w}`},[k.renderSlot(_.$slots,"td",{content:_.node[l.field],column:l,index:_.index,cindex:w,node:_.node},()=>[k.createElementVNode("div",E,[w===0?(k.openBlock(),k.createElementBlock("span",{key:0,class:k.normalizeClass("cell-indent-"+_.level)},null,2)):k.createCommentVNode("",!0),w===0?(k.openBlock(),k.createElementBlock("span",{key:1,class:k.normalizeClass(["cell-expandable",{show:_.expandable,expand:_.currentExpand,collapse:!_.currentExpand}]),onClick:p[0]||(p[0]=I=>_.toggle())},null,2)):k.createCommentVNode("",!0),k.createElementVNode("span",A,[!l.fn&&!l.field?(k.openBlock(),k.createElementBlock(k.Fragment,{key:0},[k.createTextVNode(k.toDisplayString(_.node[l.field]),1)],64)):l.fn?(k.openBlock(),k.createElementBlock(k.Fragment,{key:1},[k.createTextVNode(k.toDisplayString(l.fn(_.node,this)),1)],64)):(k.openBlock(),k.createElementBlock(k.Fragment,{key:2},[k.createTextVNode(k.toDisplayString(_.node[l.field]),1)],64))])])])],8,G))),128))])],2),k.createVNode(s,{expand:_.currentExpand,"syno-id":`${_.synoId}-slide-up-down`},{default:k.withCtx(()=>[k.createElementVNode("div",u,[(k.openBlock(!0),k.createElementBlock(k.Fragment,null,k.renderList(_.node.children,(l,w)=>(k.openBlock(),k.createElementBlock(k.Fragment,null,[!_.node.leaf&&_.node.children?(k.openBlock(),k.createBlock(b,{key:w,node:l,columns:_.columns,index:w,level:_.level+1,"syno-id":`${_.synoId}-${w}`},null,8,["node","columns","index","level","syno-id"])):k.createCommentVNode("",!0)],64))),256))])]),_:1},8,["expand","syno-id"])],2)}var S=F.default(B,[["render",o]]);x.default=S}(b2)),b2}var _2={},S2={},tY;function hee(){return tY||(tY=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Yx();const k={columns:{type:Array,default:()=>[],required:!0},columnIdField:{type:String,default:void 0,required:!0},followHeadColGroup:{type:Boolean,default:!1},colsData:{type:Object,default:()=>{}}};let F;const B=(E,A,u)=>{const o=M.getTransparentRawProps(u);return M.h(E,"colgroup",o,A.columns.map(S=>{const _=S[A.columnIdField];return M.h(E,"col",{attrs:{name:_,width:A.followHeadColGroup?A.colsData[_]:!1},key:S[A.columnIdField]})}))};F=(E,A)=>B(void 0,E,A),F.props=k;var G=F;x.default=G}(S2)),S2}var I2={},x2={},nY;function lwe(){return nY||(nY=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Xn(),k=ln(),F=Si(),B=Ur(),G=Dr(),E=ht(),A=E.defineComponent({name:"Expansion",props:{expand:{type:Boolean,default:!1},active:{type:Boolean,default:!1},duration:{type:Number,default:240}},emits:["expand","collapse"],data(){return{}},watch:{expand(){this.active&&this.doLayout(!0)}},mounted(){this.$nextTick(()=>{this.doLayout(!1),G.on(this.$el,"transitionend",this.onTransitionEnd)})},[M.componentHooks.beforeUnmount](){},methods:{setHeight(u,o,S){S&&(G.css(this.$el,"height",u),G.css(this.$el,"transition",`height ease ${this.duration}ms`),this.forceRelayout=this.$el.scrollHeight),G.css(this.$el,"height",o)},onTransitionEnd(u){this.expand?k.$emit(this,"expand"):k.$emit(this,"collapse")},doLayout(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;const o=this.$el.scrollHeight;this.$nextTick(()=>{if(u){G.css(this.$el,"height","auto");const S=this.$el.scrollHeight;this.setHeight(`${o}px`,`${S}px`,!0)}else this.setHeight(`${o}px`,"auto",!1)})}},render(){const u=F.getSlots(this).default();if(!u||!u.length)return;if(u.length>1){B.consoleError("basic expansion component should only handle one child");return}return u[0]}});x.default=A}(x2)),x2}var T2={},rY;function dT(){return rY||(rY=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=vr(),k=fr(),F=Tl(),B=Ni(),G=ln(),E=lh(),A=ht(),u=St();const o=A.defineComponent({name:"Radio",mixins:[k.inject("radio-group"),M.default,F.default],model:{prop:"model",event:"input"},props:{stopPropagation:{type:Boolean,default:!1},value:{type:[String,Number,Boolean],default:""},[B.componentsProps.value("model")]:{type:[String,Number,Boolean],default:""},disabled:{type:Boolean,default:!1},id:{type:String,default(){return`syno-${E.uuid()}`}},name:{type:String,default:""},labelColor:{type:String,default:"normal",validator(f){return["normal","red"].includes(f)}}},emits:["focus","blur","click","update:model-value","input"],data(){return{prefixCls:"v-radio",isGroup:!1,isFocused:!1,disabledKey:"innerDisabled"}},computed:{wrapperCls(){return[`${this.prefixCls}-wrapper`,{checked:this.isChecked,disabled:this.innerDisabled,focused:this.isFocused}]},labelCls(){return[`${this.prefixCls}-label`,{[`label-color-${this.labelColor}`]:!0}]},innerModel:{get(){return this.isGroup?this["radio-group"]?.instance.innerValue:this[B.getModelPropName()]},set(f){this.isGroup?this["radio-group"]?.instance.change(f):G.$emit(this,B.getModelEventName(this),f)}},isChecked(){return this.innerModel===this.value},innerDisabled(){return this.isGroup?this["radio-group"]?.instance.disabled||this.disabled:this.disabled}},created(){this["radio-group"]&&(this.isGroup=!0)},methods:{onFocus(){this.$refs.input.focus()},onFocusInput(){this.isFocused=!0,G.$emit(this,"focus",this)},onBlurInput(){this.isFocused=!1,G.$emit(this,"blur",this)},onClick(f){this.stopPropagation&&f.stopPropagation(),!this.innerDisabled&&(G.$emit(this,"click",f,this),this.innerModel!==this.value&&(this.innerModel=this.value))},onDblClick(f){this.stopPropagation&&f.stopPropagation()}}}),S=["id","disabled","name","tabindex","aria-checked","value"];function _(f,y,d,v,b,s){const l=A.resolveComponent("v-icon"),w=A.resolveDirective("syno-id");return A.withDirectives((A.openBlock(),A.createElementBlock("div",{class:A.normalizeClass(f.wrapperCls),onClick:y[4]||(y[4]=function(){return f.onClick&&f.onClick(...arguments)}),onDblclick:y[5]||(y[5]=function(){return f.onDblClick&&f.onDblClick(...arguments)}),tabindex:"-1",onFocus:y[6]||(y[6]=function(){return f.onFocus&&f.onFocus(...arguments)})},[A.createVNode(l,{name:"radio",class:"v-radio-icon",sprite:""}),A.withDirectives(A.createElementVNode("input",{ref:"input",type:"radio",id:f.id,class:A.normalizeClass(f.prefixCls+"-input"),disabled:f.innerDisabled,name:f.name,tabindex:f.isChecked?0:-1,"aria-checked":f.isChecked?"true":"false",value:f.value,"onUpdate:modelValue":y[0]||(y[0]=I=>f.innerModel=I),onClick:y[1]||(y[1]=A.withModifiers(()=>{},["stop"])),onFocus:y[2]||(y[2]=function(){return f.onFocusInput&&f.onFocusInput(...arguments)}),onBlur:y[3]||(y[3]=function(){return f.onBlurInput&&f.onBlurInput(...arguments)})},null,42,S),[[A.vModelRadio,f.innerModel]]),A.createElementVNode("label",{class:A.normalizeClass(f.labelCls)},[A.renderSlot(f.$slots,"default")],2)],34)),[[w]])}var p=u.default(o,[["render",_]]);x.default=p}(T2)),T2}var iY;function cee(){return iY||(iY=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Ni(),k=lwe(),F=rv(),B=dT(),G=ls(),E=vr(),A=uee(),u=Yx(),o=Kt(),S=kr();E.register("data-table-draggable-s",S.vIconTableDraggableS),E.register("data-table-expand-up",S.vIconExpandTableChevronUp),E.register("data-table-expand-down",S.vIconExpandTableChevronDown);function _(m){return o.isObject(m.isDraggable)?(m.isDraggable?.showIcon??A.DRAG_ICON_SHOWN.ALWAYS)!==A.DRAG_ICON_SHOWN.NEVER:!!m.isDraggable}function p(m){return o.isObject(m.isDraggable)?(m.isDraggable?.showIcon??A.DRAG_ICON_SHOWN.ALWAYS)===A.DRAG_ICON_SHOWN.HOVER:!1}function f(m,T,D){return T.action==="enable"||T.action==="checkbox"?u.h(m,F.default,{props:{synoId:`${T.synoId??D.attrs?.["syno-id"]??""}-checkbox`,[M.componentsProps.value()]:T.value,stopPropagation:!0,disabled:T.isActionDisabled},on:{change:u.getListener(D,"action-change")}}):T.action==="radio"?u.h(m,B.default,{props:{synoId:`${T.synoId??D.attrs?.["syno-id"]??""}-radio`,[M.componentsProps.value("model")]:T.value,value:!0,stopPropagation:!0,disabled:T.isActionDisabled},on:{click:u.getListener(D,"action-change")}}):null}function y(m,T,D){return u.h(m,"div",{class:["cell","action-cell"],directives:[{name:"tooltip",value:T.tooltip}]},[f(m,T,D)])}function d(m,T,D){if(T.getHtml)return u.h(m,"div",{class:["html-content"],domProps:{innerHTML:T.getHtml(T.item)}});if(!(T.useFieldSlot&&u.getSlots(D).td))return T.contentFn?T.contentFn(T.item):T.value}function v(m,T,D){return u.h(m,"div",{class:T.hoverActionCls,on:{dblclick:O=>O.stopPropagation()}},u.getSlots(D)["row-hover-action"]({item:T.item,activate:T.hoverActionActivate,deactivate:T.hoverActionDeactivate}))}function b(m,T,D){const O=[];if(T.expandable&&T.expand){const N=T.hasExpandSlot?T.expandSlot:"basic-expand-default",z=u.getSlots(D)[N];z&&O.push(z({row:T.item,data:T.value}))}else{const N=u.getSlots(D)[T.fieldSlot],z=N?N({data:T.value,row:T.item,update:T.updateItem,initialData:T.initialValue}):d(m,T,D);O.push(z)}return u.h(m,"div",{class:["cell","content-cell"],directives:[{name:"tooltip",value:T.tooltip}]},O)}function s(m,T,D){return u.h(m,k.default,{props:{active:T.expandable,expand:T.expand},scopedSlots:{default:()=>[l(m,T,D)]}})}function l(m,T,D){const O=[];T.showExpandIcon&&O.push(u.h(m,G.default,{class:["expand-icon",T.expandIconCls],props:{name:T.expand?"data-table-expand-up":"data-table-expand-down",svgIconSet:"set32"},nativeOn:{click:z=>{z.stopPropagation(),u.getListener(D,"toggle-expand")?.()}}}));const N=T.action?y(m,T,D):b(m,T,D);return O.push(N),T.hasHoverAction&&u.getSlots(D)["row-hover-action"]&&O.push(v(m,T,D)),u.h(m,"div",{class:["inner-cell"]},O)}function w(m,T){return u.h(m,G.default,{class:{"show-icon-only-hover":p(T)},props:{svgIconSet:"set26",name:"data-table-draggable-s"}})}function I(m,T,D){let O=[];T.hidden||(O=[T.expandable?s(m,T,D):l(m,T,D)],T.cindex===0&&_(T)&&O.push(w(m,T)));const N=u.getTransparentRawProps(D,[]);return N.attrs={"syno-id":T.synoId,...N.attrs},u.h(m,"td",N,O)}const C={column:{type:Object,default:()=>({})},value:{type:[String,Number,Boolean,Object,Array],default:void 0},initialValue:{type:[String,Number,Boolean,Object,Array],default:void 0},item:{type:Object,default:()=>({})},fieldKey:{type:String,default:void 0},index:{type:Number,default:0},cindex:{type:Number,default:0},expandable:{type:Boolean,default:!1},hasExpandSlot:{type:Boolean,default:!1},expandSlot:{type:String,default:void 0},expand:{type:Boolean,default:!1},showExpandIcon:{type:Boolean,default:!1},action:{type:String,default:void 0},isActionDisabled:{type:Boolean,default:!1},tooltip:{type:[String,Boolean,Object],default:void 0},useFieldSlot:{type:Boolean,default:!1},fieldSlot:{type:String,default:void 0},contentFn:{type:Function,default:void 0},getHtml:{type:Function,default:void 0},hoverActionCls:{type:[Object,Array],default:()=>({})},hoverActionActivate:{type:Function,default:void 0},hoverActionDeactivate:{type:Function,default:void 0},hasHoverAction:{type:Boolean,default:!1},updateItem:{type:Function,default:void 0},hidden:{type:Boolean,default:!1},isDraggable:{type:[Boolean,Object],default:!1}};let h;h=(m,T)=>I(void 0,m,T),h.props=C;var c=h;x.default=c,x.tableCellProps=C}(I2)),I2}var oY;function uwe(){return oY||(oY=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Xn(),k=nd(),F=ln(),B=Si(),G=ya(),E=uh(),A=hee(),u=cee(),o=fr(),S=vr(),_=kr(),p=ht(),f=St();S.register("data-table-chevron-up",_.vIconChevronUp),S.register("data-table-chevron-down",_.vIconChevronDown);const y=p.defineComponent({name:"GroupNode",components:{vTableCell:u.default,vSlideUpDownTransition:E.default,vColGroup:A.default},directives:{tooltip:G.default},mixins:[o.inject("data-table"),S.default],props:{categories:{type:Array,default:()=>[]},groupInfo:{type:Object,default:()=>{}},fieldInfo:{type:Object,default(){return{itemKey:"id",rowInfo:"_rowInfo"}}}},emits:["category-action"],data(){return{actionSortDirection:"ASC",prefix:"v-table-group-node",categoryExpandRecord:{},$_categories:[],visibleItems:{}}},computed:{table(){return this["data-table"].instance},rowClass(){return[{"with-border":this.groupInfo.rowBorder}]},containerClass(){return[`${this.prefix}-ct`,{expandable:this.groupInfo.expandable}]},titleClass(){return[`${this.prefix}-group-title`,{"with-border":this.groupInfo.titleBorder,expandable:this.groupInfo.expandable}]},tableClass(){return[{[`${this.prefix}-table`]:!0}]},currentCategories:{set(w){for(const I of w)this.categoryExpandRecord.hasOwnProperty(I.key)||k.set(this.categoryExpandRecord,I.key,this.groupInfo.defaultExpand);for(const I of w)for(const C of this.table.currentVisibleColumns)C.field===this.groupInfo.actionField&&this.setCategoryEnableState(C,I);this.$data.$_categories=w.sort(this.getCategoriesSortFn())},get(w){return this.table.filtered?this.$data.$_categories.filter(I=>this.isCategoryFilter(I)):this.$data.$_categories}}},watch:{categories:{handler(w){this.currentCategories=w.slice()},immediate:!0}},created(){this.activeIndexes={}},mounted(){this.unwatch=this.$watch(()=>[this.table.visibleStart,this.table.visibleEnd],()=>{this.updateCategoryVisibleItems(this.table.visibleStart,this.table.visibleEnd)},{immediate:!0})},[M.componentHooks.beforeUnmount](){this.unwatch?.()},methods:{getSlots(){return B.getSlots(this)},getCategoriesSortFn(){return this.table.sortColumn&&this.table.sortColumn.field===this.groupInfo.actionField?(w,I)=>{let C=w.enableIndeterminate?1:w.enableState?2:0,h=I.enableIndeterminate?1:I.enableState?2:0;if(C!==h){if(this.table.sortColumn.sort==="DESC")return C<h?1:-1;if(this.table.sortColumn.sort==="ASC")return C<h?-1:1}return 0}:this.groupInfo.sortCategoryFn},setActiveCell(w,I,C){let h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-2,c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1,m=null;return h<-1||(h===-1?m=this.table.getHeaderCell(c):m=this.getCell(C,h,c),c<0||this.table.currentColumns.length<=c)?!1:(this.activeIndexes.prevCell&&this.activeIndexes.prevCell.setAttribute("tabindex","-1"),m&&m.setAttribute("tabindex","0"),this.activeIndexes={row:h,col:c,categoryIndex:C,category:I,prevCell:m},!0)},focusActiveCell(){const{row:w,col:I,categoryIndex:C}=this.activeIndexes;if(w<-1||I<0||this.table.currentColumns.length<=I)return!1;let h;return w===-1?h=this.table.getHeaderCell(I):h=this.getCell(C,w,I),h&&h.focus(),h===document.activeElement},setActiveCellWithFocus(w,I,C){let h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-2,c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;if(this.setActiveCell(w,I,C,h,c))return I?this.table.clickRow(`${I.key}:${h}`,w):this.table.clearSelectedRows(),this.focusActiveCell(w)},getCell(w,I,C){const h=this.$refs[`cell-${w}-${I}-${C}`];return h&&h[0]},selectCellByKeydown(w){if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(w.key))return;let{row:I,col:C,categoryIndex:h,category:c}=this.activeIndexes;w.preventDefault();let m=I,T=C;return w.key==="ArrowUp"&&(m=I-1),w.key==="ArrowDown"&&(m=I+1),w.key==="ArrowLeft"&&(T=C-1),w.key==="ArrowRight"&&(T=C+1),c?m<0?(h-=1,c=this.currentCategories[h],m=c?c.items.length-1:-1):m>c.items.length-1&&(h+=1,m=0,c=this.currentCategories[h]):(h=0,c=this.currentCategories[h]),this.setActiveCellWithFocus(w,c,h,m,T)},toggleCategory(w){if(this.groupInfo.expandable===!1)return;let I=this.categoryExpandRecord[w]||!1;I=!I,k.set(this.categoryExpandRecord,w,I),this.table.virtualScroll&&(this.table.handleScroll({checkScrollSticky:!1}),this.updateCategoryVisibleItems(this.table.visibleStart,this.table.visibleEnd))},itemAction(w,I,C,h,c,m){return this.groupInfo.actionField===c.field&&this.$nextTick(()=>this.setCategoryEnableState(c,m)),this.table.itemAction(w,I,C,h,c,m)},setCategoriesEnableState(w){for(const I of this.categories)this.setCategoryEnableState(w,I)},setCategoryEnableState(w,I){if(this.groupInfo.actionField!==w.field)return;let C=!1,h=!1;const c=Object.entries(I.items);if(c){for(let[m,T]of c)this.table.isActionDisabled(T,w)||this.table.isActionHidden(T,w)||(this.table.getCellValue(w.field,T,m,I.key)===!0?C=!0:h=!0);C&&h?I.enableIndeterminate=!0:C?(I.enableState=!0,I.enableIndeterminate=!1):(I.enableState=!1,I.enableIndeterminate=!1)}},categoryAction(w){const I=!w.enableState,C=this.table.getColumnByField(this.groupInfo.actionField)??this.table.selectionActionColumn;if(k.set(w,"enableState",I),k.set(w,"enableIndeterminate",!1),this.table.isSelectionModeColumn(C)&&(I?this.table.selectCategory(w):this.table.unselectCategory(w)),w&&w.items)for(const h of w.items)this.table.isActionDisabled(h,C)||this.table.isActionHidden(h,C)||(h[this.groupInfo.actionField]=I);this.table.setHeadState(C),F.$emit(this,"category-action",{column:C,category:w,enableState:I})},getContentCellClasses(w,I,C,h){let c=this.table.getContentCellClasses(w,I,C,h);return(I.align||"left")==="left"&&!I.action&&C===0&&c.push("group-indent"),c},getVirtualGroupStyle(w){return this.table.virtualScroll?this.categoryExpandRecord[w.key]?{height:`${w.items.length*this.table.virtualRowHeight}px`}:{height:0}:!1},updateCategoryVisibleItems(w,I){let C=0,h={};for(const c of this.currentCategories){const m=this.categoryExpandRecord[c.key]?c.items.length:0;let T=C+m;w<=T&&I>=C&&(h[c.key]={start:w<C?0:w-C,end:I>T?m:I-C}),C+=m+1}this.visibleItems=h},getTableOffsetStyle(w){return this.table.virtualScroll?{transform:`translateY(${(this.visibleItems[w.key]?.start??0)*+this.table.virtualRowHeight}px`}:!1},isCategoryFilter(w){return this.table.getItems(w.items,{filter:this.table.filtered}).length>0},getVisibleItems(w){const I=this.table.getItems(w.items,{filter:this.table.filtered});if(this.table.virtualScroll){const C=this.visibleItems[w.key]?.start??0,h=this.visibleItems[w.key]?.end??0;return I.slice(C,h)}return I},updateItem(w,I,C){return h=>{this.currentCategories[w].items[I][C]=h}}}}),d=["onClick"],v={class:"content"},b=["syno-id"];function s(w,I,C,h,c,m){const T=p.resolveComponent("v-icon"),D=p.resolveComponent("v-checkbox"),O=p.resolveComponent("v-col-group"),N=p.resolveComponent("v-table-cell"),z=p.resolveComponent("v-slide-up-down-transition"),H=p.resolveDirective("tooltip");return p.openBlock(),p.createElementBlock("div",{class:p.normalizeClass(w.containerClass)},[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(w.currentCategories,($,V)=>(p.openBlock(),p.createElementBlock("div",{class:p.normalizeClass(w.prefix+"-group"),key:$.key},[p.createElementVNode("div",{class:p.normalizeClass(w.titleClass),onClick:P=>w.toggleCategory($.key)},[w.groupInfo.expandable?(p.openBlock(),p.createBlock(T,{key:0,"syno-id":`${w.synoId}-group-${$.key}-arrow`,class:"arrow group-expand-icon",name:w.categoryExpandRecord[$.key]===!0?"data-table-chevron-up":"data-table-chevron-down","svg-icon-set":"set31"},null,8,["syno-id","name"])):p.createCommentVNode("",!0),w.groupInfo.action==="enable"?(p.openBlock(),p.createBlock(D,{key:1,"syno-id":`${w.synoId}-group-checkbox`,value:$.enableState,"model-value":$.enableState,indeterminate:$.enableIndeterminate,onChange:P=>w.categoryAction($),"stop-propagation":""},null,8,["syno-id","value","model-value","indeterminate","onChange"])):p.createCommentVNode("",!0),p.createElementVNode("span",v,[p.renderSlot(w.$slots,"group-title",{category:$},()=>[p.createTextVNode(p.toDisplayString($.key),1)])])],10,d),p.createVNode(z,null,{default:p.withCtx(()=>[w.categoryExpandRecord[$.key]===!0?(p.openBlock(),p.createElementBlock("div",{key:0,class:p.normalizeClass(`${w.prefix}-table-wrapper`),"syno-id":`${w.synoId}-group-${$.key}-slideUpDown`,style:p.normalizeStyle(w.getVirtualGroupStyle($))},[p.createElementVNode("table",{class:p.normalizeClass(w.tableClass),onMouseleave:I[0]||(I[0]=function(){return w.table.onMouseLeave&&w.table.onMouseLeave(...arguments)}),style:p.normalizeStyle(w.getTableOffsetStyle($))},[p.createVNode(O,{ref_for:!0,ref:"body-col-group",columns:w.table.isGroupHeadMode?w.table.flattenColumns:w.table.currentVisibleColumns,"column-id-field":w.table.fieldInfo.columnKey,"cols-data":w.table.colsData,"follow-head-col-group":""},null,8,["columns","column-id-field","cols-data"]),p.createElementVNode("tbody",null,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(w.getVisibleItems($),P=>{let{item:U,index:Y}=P;return p.withDirectives((p.openBlock(),p.createBlock(p.resolveDynamicComponent(w.table.useBodyRow()),{item:U,index:Y,categroy:$,"syno-id":`${w.synoId}-tr-${Y}`,ref_for:!0,ref:`row-${$.key}:${Y}`,key:`${$.key}:${Y}`,onClick:Z=>w.table.clickRow(`${$.key}:${Y}`,Z),onDblclick:Z=>w.table.rowDblClick(`${$.key}:${Y}`,U,Z),onMouseover:Z=>w.table.hoverRow(`${$.key}:${Y}`),class:p.normalizeClass(w.table.getRowClass(`${$.key}:${Y}`,U).concat(w.rowClass))},{default:p.withCtx(()=>[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(w.table.isGroupHeadMode?w.table.flattenColumns:w.table.currentVisibleColumns,(Z,X)=>(p.openBlock(),p.createBlock(N,{role:"cell",ref_for:!0,ref:`cell-${V}-${Y}-${X}`,"syno-id":`${w.synoId}-td-${U[w.table.fieldInfo.rowKey]}-${Z[w.table.fieldInfo.columnKey]}`,key:Z[w.table.fieldInfo.columnKey],value:w.table.getCellValue(Z.field,U,Y,$.key),item:U,class:p.normalizeClass(w.getContentCellClasses(Y,Z,X,U)),tabindex:"-1","aria-colindex":X+1,"field-key":Z.fieldKey,index:Y,cindex:X,expandable:w.table.isBasicExpandable,"has-expand-slot":w.table.hasBasicExpandSlot(Z),"expand-slot":w.table.getBasicExpandSlot(Z),expand:w.table.expandState[U[w.table.fieldInfo.rowKey]],"show-expand-icon":w.table.expandable&&Z[w.table.fieldInfo.columnKey]===w.table.firstVisibleColumnId,action:Z.action,"is-action-disabled":w.table.isActionDisabled(U,Z),tooltip:w.table.getCellTooltip(Z,U),"use-field-slot":Z.useSlot||!Z.fn&&!Z.field,"field-slot":w.table.getFieldSlotName(Z),"content-fn":Z.fn,"get-html":Z.getHtml,"hover-action-cls":w.table.rowHoverActionCls(U[w.table.fieldInfo.rowKey]),"hover-action-activate":w.table.activateHoverAction(U),"hover-action-deactivate":w.table.deactivateHoverAction(U),"has-hover-action":w.table.isLastVisibleCell(Z),"update-item":w.updateItem(V,Y,Z.field),column:Z,hidden:w.table.getCellHidden(Z,U),onFocus:J=>w.setActiveCell(J,$,V,Y,X),onClick:J=>w.table.onCellClick(U,Z,Y,X,J),onContextmenu:J=>w.table.onCellContextMenu(U,Z,`${$.key}:${Y}`,X,J),onActionChange:(J,q)=>w.itemAction(J,q,Y,U,Z,$),onToggleExpand:J=>w.table.toggleRowExpand(U)},p.createSlots({_:2},[p.renderList(w.getSlots(),(J,q)=>({name:q,fn:p.withCtx(te=>[p.renderSlot(w.$slots,q,p.normalizeProps(p.guardReactiveProps(te)))])}))]),1032,["syno-id","value","item","class","aria-colindex","field-key","index","cindex","expandable","has-expand-slot","expand-slot","expand","show-expand-icon","action","is-action-disabled","tooltip","use-field-slot","field-slot","content-fn","get-html","hover-action-cls","hover-action-activate","hover-action-deactivate","has-hover-action","update-item","column","hidden","onFocus","onClick","onContextmenu","onActionChange","onToggleExpand"]))),128))]),_:2},1064,["item","index","categroy","syno-id","onClick","onDblclick","onMouseover","class"])),[[H,w.table.getRowTooltip(U)]])}),128))])],38)],14,b)):p.createCommentVNode("",!0)]),_:2},1024)],2))),128))],2)}var l=f.default(y,[["render",s]]);x.default=l}(_2)),_2}var k2={},aY;function hwe(){return aY||(aY=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Xn(),k=Gx(),F=Yl(),B=Kt(),G=Dr(),E=Ur(),A=ht();function u(S,_){let p=0,f=_.length;for(;p<f;){let y=p+~~((f-p)/2);S<=_[y].acc?f=y:p=y+1}return p}var o=A.defineComponent({props:{virtualScroll:{type:Boolean,default:!1},virtualRowHeight:{type:[Number,String],default:29},virtualMobileCardRowHeight:{type:[Number,String],default:272},updateBufferItemsNum:{type:Number,default:5},bufferItemsNum:{type:Number,default:10},bufferSize:{type:Number,default:200}},data:()=>({sizes:[],bufferStart:0,bufferEnd:0,virtualTotalSize:0,visibleStart:0,visibleEnd:0}),computed:{innerRowHeight(){return this.isMobile?+this.virtualMobileCardRowHeight:+this.virtualRowHeight},size(){return this.groupTable?this.categories.reduce((S,_)=>(S+=_.items.length+1,S),0):this.currentPagingData.length},tableOffsetStyle(){return this.virtualScroll?this.autoRowHeight?{transform:`translateY(${this.sizes[this.visibleStart]?this.sizes[this.visibleStart].acc:0}px)`}:{transform:`translateY(${this.visibleStart*this.innerRowHeight}px`}:{}},virtualBodyStyle(){return{height:this.virtualTotalSize+"px",top:0,left:0,width:"1px",position:"absolute"}}},watch:{isMobile:{handler(){this.$_cachedSizes={},this.handleScroll({checkScrollSticky:!1,autoFocusWhenRender:!0})}},virtualScroll:{async handler(S){S?(await this.$nextTick(),this.onScrollViewportChanged(),this.intersectionListener=k.addIntersectionListener(this.$el,this.onVisibleChanged),this.$refs.scrollbar&&(this.resizeListener=F.addResizeListener(this.$refs.scrollbar.$el,this.onScrollViewportChanged)),this.updateSizes(),this.handleScroll({checkScrollSticky:!1,autoFocusWhenRender:!0})):(this.intersectionListener?.(),this.resizeListener?.())},immediate:!0},isEmpty(S){S?this.resizeListener?.():this.$refs.scrollbar&&this.virtualScroll&&(this.resizeListener=F.addResizeListener(this.$refs.scrollbar.$el,this.onScrollViewportChanged))},current:{async handler(){await this.$nextTick(),!(!this.$refs.scrollbar||!this.virtualScroll)&&(this.updateSizes(),this.handleScroll({checkScrollSticky:!1,autoFocusWhenRender:!0}))},immediate:!0}},created(){this.$_scrollTop=void 0,this.$_scrollViewportHeight=0,this.$_cachedSizes={}},mounted(){this.virtualScroll&&this.groupTable&&this.autoRowHeight&&E.remind("group table only support virtual scroll with fixed size currently",this)},[M.componentHooks.beforeUnmount](){this.intersectionListener?.(),this.resizeListener?.()},methods:{onScrollViewportChanged(S){this.$_scrollViewportHeight=S?.contentRect?.height??this.$refs.scrollbar?.$el?.offsetHeight},updateSizes(){let S=0;this.sizes=this.current.reduce((_,p)=>(_.push({item:p,acc:S}),S+=this.$_cachedSizes[p[this.fieldInfo.rowKey]]??this.innerRowHeight,_),[])},onVisibleChanged(S){S.isVisible&&this.handleScroll({checkScrollSticky:!1})},findAnchor(S,_){let p=0,f=0,y=0,d;const v=this.size;if(this.autoRowHeight){if(this.sizes.length>0){for(p=Math.max(Math.min(u(S,this.sizes),this.sizes.length),0),f=p,d=this.sizes.length;f<d&&this.sizes[f].acc<_;f++);y=this.sizes[this.sizes.length-1].acc}}else p=Math.max(Math.min(~~(S/this.innerRowHeight),v),0),f=Math.max(Math.min(~~(_/this.innerRowHeight),v),0),y=v*this.innerRowHeight;return p=B.clampValue(p-this.bufferItemsNum,0,v-1),f=B.clampValue(f+this.bufferItemsNum,0,v-1),{start:p,end:f,total:y}},getVisibleItems(S,_){return this.bufferStart=S,this.bufferEnd=_,this.findAnchor(this.bufferStart,this.bufferEnd)},isScrollSticky(S,_,p){const f=this.sizes[B.clampValue(this.visibleStart+this.updateBufferItemsNum,0,this.sizes.length-1)],y=this.sizes[B.clampValue(this.visibleEnd-this.updateBufferItemsNum,0,this.sizes.length-1)];let d,v;return this.autoRowHeight?(v=f.acc,d=y.acc):(v=(this.visibleStart+this.updateBufferItemsNum)*this.innerRowHeight,d=(this.visibleEnd-this.updateBufferItemsNum)*this.innerRowHeight),S>this.$_scrollTop&&p>=d||S<this.$_scrollTop&&_<=v},getBuffer(S){let _=S;_<0&&(_=0);const p=_+this.$_scrollViewportHeight;return{bufferStart:_,bufferEnd:p}},handleScroll(){let{checkScrollSticky:S=!0,autoFocusWhenRender:_=!0}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.$refs.scrollbar||this.autoRowHeight&&this.sizes.length<=0)return;const p=this.$refs.scrollbar.getScrollTop(),{bufferStart:f,bufferEnd:y}=this.getBuffer(p);if(!S||this.isScrollSticky(p,f,y)){const{start:d,end:v,total:b}=this.getVisibleItems(f,y);this.renderVisibleItems(d,v,b,{autoFocus:_})}this.$_scrollTop=p},renderVisibleItems(S,_,p){let{autoFocus:f=!0}=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};this.visibleStart=B.clampValue(S,0,this.sizes.length-1),this.visibleEnd=B.clampValue(_,0,this.sizes.length-1),this.virtualTotalSize=p,this.autoRowHeight&&G.raf(()=>{this.$nextTick(()=>{for(let y=this.visibleStart;y<=this.visibleEnd;y++){const d=this.current[y];let v=this.$refs[`row-${y}`]?.[0];v=v?.$el??v,v&&(this.$_cachedSizes[d[this.fieldInfo.rowKey]]=v.offsetHeight)}this.updateSizes()})}),f&&this.$nextTick(()=>{this.focusActiveCell()})}}});x.default=o}(k2)),k2}var R2={},E2={},sY;function fT(){return sY||(sY=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Xn(),k=Lg(),F=ls(),B=fr(),G=ya(),E=Kt(),A=Ur(),u=ln(),o=Si(),S=ht(),_=St();const p={NORMAL:"normal",WHITE:"white"},f=S.defineComponent({name:"Whitetip",components:{vPortal:k.default,vIcon:F.default},directives:{tooltip:G.default},mixins:[B.inject("form-item")],props:{disabled:{type:Boolean,default:!1},content:{type:[String,Boolean],default:""},delay:{type:Number,default:300},tooltipOptions:{type:Object,default:()=>({})},forceSimple:{type:Boolean,default:!1},portalName:{type:String,default:()=>"whitetip-"+String(Math.round(Math.random()*1e7))},size:{type:String,default:void 0,validator:v=>["normal","small",void 0].includes(v)},type:{type:String,default:p.NORMAL},transitionTime:{type:Array,default(){return[500,100]}},triggerAction:{type:String,default:"adaptive",validator(v){return["hover","click","adaptive"].includes(v)}},hasPadding:{type:Boolean,default:!0},hasMargin:{type:Boolean,default:void 0},mobileBreakpoint:{type:[String,Boolean],default:void 0},tipContainer:{type:Function,default:E.noop}},data(){return{isFieldDisabled:void 0}},computed:{innerHasMargin(){return E.isDefined(this.hasMargin)?this.hasMargin:!this?.["form-item"]?.instance?.inFlexForm},iconCls(){return{"has-margin":this.innerHasMargin,[this.type]:!0}},isMobile(){return this.$breakpointManager?E.isDefined(this.mobileBreakpoint)?E.isString(this.mobileBreakpoint)?this.$breakpointManager.lessAndEqThan(this.mobileBreakpoint):this.mobileBreakpoint:this.$breakpointManager.mobile:(A.remind("please import and use BreakpointManagerPlugin when you are in tree-shaking mode or breakpoint will not active."),!1)},innerTriggerAction(){return this.triggerAction==="adaptive"?this.isMobile?"click":"hover":this.triggerAction},currentDisabled(){return this.disabled||this.isFieldDisabled},innerSize(){return E.isDefined(this.size)?this.size:this?.["form-item"]?.instance?.inFlexForm||this.type===p.WHITE?"small":"normal"},whiteTipCls(){return{"v-whitetip-wrapper":!0,disabled:this.currentDisabled,[this.innerSize]:!0}}},created(){this._unregister=this.registerFormItemOnCreated()},[M.componentHooks.beforeUnmount](){this._unregister()},methods:{useSlot(){return o.hasSlot(this,"default")&&this.content!==!1?(A.remind("please proivde content props as false when you are using default slot. "),!0):this.content===!1},getExtraElements(){return this.$refs.tooltip?._tooltip},hideTooltip(){this.$refs.tooltip?._svc_tooltip_e_hide_cb?.()},onActivate(){u.$emit(this,"activate")},onDeactivate(){u.$emit(this,"deactivate")},tipOpts(){let v={content:this.content,cls:"v-whitetip-tooltip text-tip",delay:this.delay,bgOpacity:1,offset:[25,25],attachToElement:!0,interactive:!0,onActivate:this.onActivate,onDeactivate:this.onDeactivate,transitionTime:this.transitionTime,triggerAction:this.innerTriggerAction,tipContainer:this.tipContainer};return this.useSlot()&&(this.forceSimple||(v.cls="v-whitetip-tooltip complex-tip"),v.usePortal=!0,v.portalName=this.portalName),this.hasPadding===!1&&(v.cls="v-whitetip-tooltip no-padding"),Object.assign(v,this.tooltipOptions),v},registerFormItemOnCreated(){if(!this["form-item"])return E.noop;let v;return this["form-item"].register(this,b=>{v=b.$watch("isFieldDisabled",s=>this.isFieldDisabled=s,{immediate:!0})}),()=>{v(),this["form-item"].unregister(this)}}}});function y(v,b,s,l,w,I){const C=S.resolveComponent("v-icon"),h=S.resolveComponent("v-portal"),c=S.resolveDirective("tooltip");return S.withDirectives((S.openBlock(),S.createElementBlock("div",{ref:"tooltip",class:S.normalizeClass(v.whiteTipCls),tabindex:"-1"},[S.renderSlot(v.$slots,"custom",{disabled:v.currentDisabled},()=>[S.createVNode(C,{class:S.normalizeClass(["v-whitetip-icon",v.iconCls]),sprite:""},null,8,["class"])]),S.createVNode(h,{name:v.portalName,to:v.portalName},{default:S.withCtx(()=>[S.renderSlot(v.$slots,"default")]),_:3},8,["name","to"])],2)),[[c,v.tipOpts()]])}var d=_.default(f,[["render",y]]);x.default=d}(E2)),E2}var lY;function cwe(){return lY||(lY=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=lh(),k=Kt(),F=rv(),B=fT(),G=ls(),E=vr(),A=kr(),u=ln(),o=ht(),S=St();E.register("data-table-sort-down",A.vIconTableSortDown),E.register("data-table-sort-up",A.vIconTableSortUp);const _=o.defineComponent({name:"TableHeaderCell",components:{vCheckbox:F.default,vWhitetip:B.default,vIcon:G.default},props:{columnKey:{type:[String,Number],default:M.uuid()},column:{type:Object,default:()=>{}},synoId:{type:String,default:""},tooltip:{type:[Boolean,String,Object],default:!1},cindex:{type:Number,default:-1},isActionDisabled:{type:Boolean,default:!1},disableSort:{type:Boolean,default:!1},sorting:{type:Boolean,default:!1}},emits:["action-change","sort","mousedown","mousemove","focus"],computed:{sortIconName(){let s=this.column.sort;return this.sorting||(s=this.column.defaultSortOrder??"ASC"),s==="ASC"?"data-table-sort-up":"data-table-sort-down"}},methods:{isActionCell(s){return k.isDefined(s.headerAction)&&s.headerAction==="none"?!1:!!s.action},getHeaderTip(s){return k.isString(s.tip)?s.tip:!1},getHeaderTipSlotName(s){return`${s.field||s.fieldKey}.tip`},getHeaderSlotName(s){return`${s.field||s.fieldKey}.th`},onClickSort(){u.$emit(this,"sort")},onActionChange(){u.$emit(this,"action-change")}}}),p=["name","syno-id","aria-sort","aria-colindex"],f={class:"inner-cell"},y={key:0,class:"cell-title"},d={class:"cell-title"};function v(s,l,w,I,C,h){const c=o.resolveComponent("v-checkbox"),m=o.resolveComponent("v-icon"),T=o.resolveComponent("v-whitetip"),D=o.resolveDirective("tooltip");return o.withDirectives((o.openBlock(),o.createElementBlock("th",{name:s.columnKey,"syno-id":s.synoId,role:"columnheader",tabindex:"-1","aria-sort":s.column.sort==="ASC"&&"ascending"||s.column.sort==="DESC"&&"descending"||"none","aria-colindex":s.cindex+1,onMousedown:l[3]||(l[3]=O=>s.$emit("mousedown",O)),onMousemove:l[4]||(l[4]=O=>s.$emit("mousemove",O)),onFocus:l[5]||(l[5]=O=>s.$emit("focus",O))},[o.createElementVNode("div",f,[s.isActionCell(s.column)?(o.openBlock(),o.createElementBlock("div",{key:0,class:"action-cell cell",onClick:l[1]||(l[1]=function(){return s.onClickSort&&s.onClickSort(...arguments)})},[s.column.action==="enable"||s.column.action==="checkbox"?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createVNode(c,{"syno-id":`${s.synoId}-head-action`,value:s.column.enableState,"model-value":s.column.enableState,indeterminate:s.column.enableIndeterminate,onChange:l[0]||(l[0]=O=>s.onActionChange()),disabled:s.isActionDisabled,"stop-propagation":""},null,8,["syno-id","value","model-value","indeterminate","disabled"]),s.column.title?(o.openBlock(),o.createElementBlock("span",y,o.toDisplayString(s.column.title),1)):o.createCommentVNode("",!0),s.disableSort?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(m,{key:1,class:"v-table-column-sorter",name:s.column.sort==="ASC"?"data-table-sort-up":"data-table-sort-down","svg-icon-set":"set16"},null,8,["name"]))],64)):o.createCommentVNode("",!0),s.column.tip?(o.openBlock(),o.createBlock(T,{key:1,size:"small",content:s.getHeaderTip(s.column)},{default:o.withCtx(()=>[o.renderSlot(s.$slots,s.getHeaderTipSlotName(s.column))]),_:3},8,["content"])):o.createCommentVNode("",!0)])):(o.openBlock(),o.createElementBlock("div",{key:1,class:"head-cell cell",onClick:l[2]||(l[2]=function(){return s.onClickSort&&s.onClickSort(...arguments)})},[o.renderSlot(s.$slots,"th",{title:s.column.title,column:s.column,cindex:s.cindex},()=>[o.renderSlot(s.$slots,s.getHeaderSlotName(s.column),{title:s.column.title,column:s.column,cindex:s.cindex},()=>[o.createElementVNode("span",d,o.toDisplayString(s.column.title),1)])]),s.disableSort?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(m,{key:0,class:"v-table-column-sorter",name:s.sortIconName,"svg-icon-set":"set16"},null,8,["name"])),s.column.tip?(o.openBlock(),o.createBlock(T,{key:1,size:"small",content:s.getHeaderTip(s.column)},{default:o.withCtx(()=>[o.renderSlot(s.$slots,s.getHeaderTipSlotName(s.column))]),_:3},8,["content"])):o.createCommentVNode("",!0)]))])],40,p)),[[D,s.tooltip]])}var b=S.default(_,[["render",v]]);x.default=b}(R2)),R2}var A2={},uY;function dwe(){return uY||(uY=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=rd(),k=Si(),F=Kt(),B=fT(),G=uh(),E=Ur(),A=ci(),u=vr(),o=ls(),S=kr(),_=ln(),p=hT(),f=ht();u.register("data-table-mobile-chevron-up",S.vIconChevronUp),u.register("data-table-mobile-chevron-down",S.vIconChevronDown);function y(C){const c=k.getSlots(C)["mobile-header-actions"];if(c)return M.h("div",{class:"action-wrapper"},c({row:C.value}))}function d(C,h){return M.h(o.default,{class:["header-expand-arrow"],props:{name:C?"data-table-mobile-chevron-up":"data-table-mobile-chevron-down",svgIconSet:"set31"},nativeOn:{click:h}})}function v(C){const{id:h,column:c}=p.getPivotColumn(C.columns),m=[],T=k.getSlots(C)["mobile-header"];return T?m.push(T({row:C.value})):c&&m.push(s(C,c,h)),m.length>0?M.h("div",{class:"header-wrapper",on:{click:C.toggleExpand}},[C.hasSlider?d(C.expanded,C.toggleExpand):null,M.h("div",{class:"header-title"},m),y(C)]):null}function b(C){const c=k.getSlots(C)["mobile-desc"];return c?M.h("div",{class:"desc-wrapper"},c({row:C.value})):null}function s(C,h,c){const m=C.getFieldSlotName(h),T=`mobile-${m}`,D=C.value,O=C.getCellValue(h.field,D,c),N=k.getSlots(C)[T],z=k.getSlots(C)[m];return N?N({data:O,row:D,update:C.updateItem(C.index,h.field)}):z?z({data:O,row:D,update:C.updateItem(C.index,h.field)}):h.getHtml?M.h("div",{staticClass:"html-content",domProps:{innerHTML:h.getHtml(D)}}):h.fn?h.fn(D):O}function l(C,h,c,m){let T=c.title;F.isString(c.patchColon)?T+=c.patchColon:c.patchColon!==!1&&(T+=h._i18n("common","pure_colon"));let D=[T];if(c.tip){const z=k.getSlots(h)[`${c.field}.tip`];F.isString(c.tip)?D.push(C(B.default,{props:{size:"small",content:c.tip}})):z&&D.push(C(B.default,{props:{size:"small"},scopedSlots:{default:z}}))}const O=C("div",{class:"mobile-label"},D),N=C("div",{class:"mobile-value"},[s(h,c,m)]);return[O,N]}function w(C){const h=C.columns.filter(m=>m.mobile!==!1),c=M.h("div",{class:["field-wrapper",`field-align-${C.currentFieldAlignment}`]},h.map((m,T)=>l(M.h,C,m,T)));return M.h("div",{class:"content-wrapper"},[c])}var I=f.defineComponent({mixins:[A.default,u.default],props:{columns:{type:Array,default:()=>[]},index:{type:Number,default:0},updateItem:{type:Function,default:void 0},value:{type:Object,default:()=>({})},getCellValue:{type:Function,default:void 0},getFieldSlotName:{type:Function,default:void 0},getHeaderTipSlotName:{type:Function,default:void 0},fieldAlignment:{type:[String,Object],default:"adaptive",validator(C){return F.isObject(C)?!0:["adaptive","horizontal","vertical"].includes(C)}},mobileRowCollapsible:{type:[Boolean,Object],default:!0}},emits:["rowclick"],data(){return{expanded:F.isObject(this.mobileRowCollapsible)?this.mobileRowCollapsible.defaultExpanded:!1}},computed:{hasSlider(){return!!this.mobileRowCollapsible},isCollapsible(){const{column:C}=p.getPivotColumn(this.columns);return this.hasSlider&&(k.hasSlot(this,"mobile-header")||!!C)},isSlideContainDescription(){return F.isObject(this.mobileRowCollapsible)?this.mobileRowCollapsible.containDesc:!1},isFieldAlignmentAdaptive(){return this.fieldAlignment==="adaptive"?!0:F.isObject(this.fieldAlignment)?this.fieldAlignment.strategy==="adaptive":!1},currentFieldAlignment(){if(this.isFieldAlignmentAdaptive){if(!this.$breakpointManager){E.remind("please import and use BreakpointManagerPlugin when you are in tree-shaking mode or breakpoint will not active.");return}const C=this.fieldAlignment.breakpoint??"xxs";return this.$breakpointManager.lessAndEqThan(C)?"vertical":"horizontal"}return this.fieldAlignment}},methods:{toggleExpand(C){C.stopPropagation(),this.expanded=!this.expanded}},render(){const C=v(this),h=b(this),c=w(this);let m=[C,h,c];if(this.isCollapsible){m=[C];let T=[];this.isSlideContainDescription?T.push(h):m.push(h),T.push(c);const D=this.expanded||!C?M.h("div",{},T):null;m.push(M.h(G.default,{},[D]))}return M.h("div",{class:["mobile-row-card-wrapper",{collapsible:this.isCollapsible}],on:{click:()=>_.$emit(this,"rowclick",{index:this.index,row:this.value})}},m)}});x.default=I}(A2)),A2}var hY;function dee(){return hY||(hY=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Xn(),k=ln(),F=Si(),B=iwe(),G=uee(),E=owe(),A=awe(),u=Eu(),o=lc(),S=m5(),_=swe(),p=uwe(),f=wa(),y=La(),d=tv(),v=uh(),b=ya(),s=lh(),l=Ur(),w=ci(),I=Kt(),C=nd(),h=fr(),c=Yl(),m=_i(),T=hwe(),D=hee(),O=cee(),N=cwe(),z=dwe(),H=hT(),$=vr(),V=kr(),P=Ng(),U=Kl(),Y=Qo(),Z=Dr(),X=ht(),J=St();$.register("data-table-header-menu",V.vIconTableHeaderMenu);const q={LOCAL:"local",CUSTOM:"custom"},te={STICKY:"sticky",HOVER:"hover"},re="__actionable_selection_mode__",ie="__file_list_selection_mode__",ne="selection-mode",le=20,fe=X.defineComponent({name:"DataTable",components:{vTableCell:O.default,vTableHeaderCell:N.default,vPagination:S.default,vSpin:d.default,vTreeNode:_.default,vGroupNode:p.default,vButton:y.default,vScrollbar:f.default,vMenu:u.default,vMenuItem:o.default,vColGroup:D.default,vSlideUpDownTransition:v.default,vMobileRowCard:z.default,withTransition:U.withWrap(X.Transition)},directives:{tooltip:b.default},mixins:[G.default,E.default,B.default,A.default,w.default,h.provide("data-table"),h.provide("form-controller"),h.inject("form"),T.default,$.default,P.useConfigConsumer("dataTable")],props:{expandable:{type:[Boolean,Object],default:!1},customRowClasses:{type:Array,default:()=>[]},enableHdMenu:{type:[Boolean,String],default:!0},loadingText:{type:String,default:void 0},data:{type:Function,default:void 0},isDraggable:{type:[Boolean,Object],default:!1},total:{type:Number,default:void 0},showTotal:{type:Boolean,default:!0},currentData:{type:Array,default:()=>[]},columns:{type:Array,required:!0},pagination:{type:[Boolean,Object],default:!1},showPagingBar:{type:[Boolean,String],default:!0},hideRefreshBtn:{type:Boolean,default:!1},responseParamsName:{type:Object,default(){return{total:"total",results:"items"}}},autoRowHeight:{type:Boolean,default:!1},hideHeader:{type:Boolean,default:!1},groupTable:{type:Boolean,default:!1},groupInfo:{type:Object,default:()=>({})},treeOption:{type:Object,default(){return{}}},pageNum:{type:Number,default:1},pageSize:{type:Number,default:10},itemsPerPage:{type:[Boolean,Array],default:!1},emptyText:{type:String,default:void 0},sortInfoKey:{type:Object,default(){return{by:"sort_by",order:"sort_direction"}}},autoScrollVisibleWhenSort:{type:Boolean,default:!0},sortMethod:{type:String,default:q.LOCAL},isLocalSort:{type:Boolean,default:!0},isCustomSort:{type:Boolean,default:!1},localSortFunc:{type:Function,default:null},minColumns:{type:[Number,String],default:3},fieldInfo:{type:Object,default(){return{columnKey:"_id",itemKey:"id",rowInfo:"_rowInfo",rowKey:"_key",expandableKey:"_expandableKey"}}},columnMoveable:{type:Boolean,default:!1},selectionMode:{type:String,default:"none",validator(ue){return ue==="normal"&&l.consoleError("selection mode property should used `none` instead of `normal`"),["none","checkbox","radio","file-list"].includes(ue)}},selectionModeColumn:{type:Object,default:()=>({})},loadingType:{type:[String,Object],default:()=>"spin",validator(ue){return I.isObject(ue)?!0:["spin","refresh"].indexOf(ue)!==-1}},beforeSort:{type:Function,default:I.noop},beforeRefresh:{type:Function,default:I.noop},beforeSwitchPage:{type:Function,default:I.noop},customActionOnValidDrop:{type:Function,default:void 0},defaultSelected:{type:[Boolean,Array,Number,String],default:!1},hasCover:{type:Boolean,default:!1},mobileRowCollapsible:{type:[Boolean,Object],default:!0},mobileFieldAlignment:{type:[String,Object],default:"adaptive",validator(ue){return I.isObject(ue)?!0:["adaptive","horizontal","vertical"].includes(ue)}},mobileBreakpoint:{type:[String,Boolean],default:void 0},paginationBreakpoint:{type:[Object,Boolean],default:void 0},cellTooltipDefaultProps:{type:Object,default:()=>({})},activeAdaptiveScrollbar:{type:Boolean,default:!0},hoverActionKeepActivate:{type:Boolean,default:!1},totalTextFormat:{type:Object,default:()=>({})},totalTextMode:{type:String,validator:ue=>["auto","total","range","filter","select"].includes(ue),default:"auto"},pageStart:{type:[Number,String],default:void 0},pageEnd:{type:[Number,String],default:void 0},selectedCount:{type:[Number,String],default:void 0},filteredCount:{type:[Number,String],default:void 0},defaultBodyRow:{type:[Object,Function,String],default:"tr"}},emits:["update:page-num","pagination-animate-show","local-sorted","sort","on-sort-click","update:current-data","dataloaded","head-action","column-display","action","rowdblclick","selected-change","cell-click","rowclick","on-rowclick","contextmenu","cell-contextmenu","update:page-size","switch-page","refresh","scroll","reach-top","reach-bottom","not-reach-top","not-reach-bottom"],data(){return{currentTotal:this.total,prefix:"v-table",defaultCurrent:1,currentLoading:!1,sortInfo:{},sortColumn:null,currentPageNum:this.pageNum,currentPageSize:null,paramsName:{},categories:[],categoriesMap:{},activeHoverActionRows:new Set,currentColumns:[],selectionActionColumn:null,$_current:[],$_initData:void 0,$_hasData:!1,minVisible:0,maxVisible:0,containerStyle:{width:"100%"},expandState:{},firstColumnRow:[],secondColumnRow:[],flattenColumns:[],filterFields:{},filtered:!1,paginationAnimationShow:!1,$_paginationScroll:0}},computed:{innerSpinBinding(){if(I.isObject(this.loadingType)){const{type:ue,...ke}=this.loadingType;return ue==="spin"?m.merge({spinning:this.currentLoading,tip:this.innerLoadingText},ke):{}}return{spinning:this.loadingType==="spin"&&this.currentLoading,tip:this.innerLoadingText}},innerPaginationLoading(){return I.isObject(this.loadingType)?this.loadingType.type==="refresh"?I.isDefined(this.loadingType.spinning)?this.loadingType.spinning:this.currentLoading:!1:this.loadingType==="refresh"&&this.currentLoading},innerLoadingText(){return this.loadingText??this._i18n("common","loading")},innerTotalTextFormat(){return m.merge(this.totalTextFormat,{total:`{total} ${this._i18n("uicommon","items")}`,range:`{start}-{end} ${this._i18n("uicommon","items")}`,filter:`{filteredCount} ${this._i18n("uicommon","items")}`,select:`<span class="selected-item">{selectedCount}</span> / {total} ${this._i18n("uicommon","items")} ${this._i18n("common","selected")}`})},showDraggableIndicator(){return I.isObject(this.isDraggable)?this.isDraggable?.showIcon!==G.DRAG_ICON_SHOWN.NEVER:!!this.isDraggable},innerPaginationBreakpoint(){if(this.paginationBreakpoint)return this.paginationBreakpoint;if(I.isBoolean(this.mobileBreakpoint))return this.mobileBreakpoint},canSwitchPage(){return I.isObject(this.pagination)?this.pagination.switchPage===!0:this.pagination},autoPagination(){return I.isObject(this.pagination)?this.pagination.data==="pagination":!1},innerConfigConsumer(){return this.configConsumer},innerSelectionMode(){return this.getConfigValue("selectionMode")},innerPageStart(){return I.isDefined(this.pageStart)?this.pageStart:(this.currentPageNum-1)*this.currentPageSize},innerPageEnd(){return I.isDefined(this.pageEnd)?this.pageEnd:this.currentPageNum*this.currentPageSize},innerSelectedCount(){return I.isDefined(this.selectedCount)?this.selectedCount:this.selectIndexes.size},innerFilteredCount(){return I.isDefined(this.filteredCount)?this.filteredCount:this.filtered?this.currentFilteredData.length:this.currentTotal},innerTotalTextMode(){return this.totalTextMode==="auto"?this.filtered?"filter":this.isSelectionMode&&this.innerSelectedCount>0?"select":"total":this.totalTextMode},tableHeaderCls(){return[`${this.prefix}-header`,{"group-header":this.hasGroupHeader}]},isBasicExpandable(){return I.isBoolean(this.expandable)?this.expandable:I.isObject(this.expandable)&&this.expandable.type==="basic"},isAdvanceExpandable(){return I.isObject(this.expandable)&&this.expandable.type==="advance"},animateShowPagingBar(){return this.isStickyPagination?this.paginationAnimationShow:!0},havePagingBar(){return this.showPagingBar===!0||this.isStickyPagination},isGroupHeadMode(){return this.currentVisibleColumns.some(ue=>ue.type==="group")},hasGroupHeader(){return this.isGroupHeadMode?this.firstColumnRow.some(ue=>ue._isGroup):!1},currentVisibleColumns(){return this.currentColumns.filter(ue=>!ue.hide)},lastVisibleColumnId(){const ue=ke=>ke.length<=0?null:ke[ke.length-1];if(this.isGroupHeadMode){let ke=[];const Pe=ue(this.firstColumnRow);return ke.push(Pe[this.fieldInfo.columnKey]),Pe._subColumns&&ke.push(ue(Pe._subColumns)[this.fieldInfo.columnKey]),ke}return[ue(this.currentVisibleColumns)[this.fieldInfo.columnKey]]},firstVisibleColumnId(){const ue=this.currentVisibleColumns;return ue.length<=0?null:ue[0][this.fieldInfo.columnKey]},firstNonActionVisibleColumnId(){const ue=this.currentVisibleColumns;if(ue.length<=0)return null;for(let ke=0,Pe=ue.length;ke<Pe;ke++){const Ve=ue[ke];if(!Ve.action)return Ve[this.fieldInfo.columnKey]}return null},showEmptyText(){return!!this.emptyText},contentClass(){return["v-table-content",{"auto-row-height":this.autoRowHeight,expandable:!!this.expandable}]},hdMenuItems(){return this.currentColumns.filter(ue=>!ue.hideMenuItem&&ue.type!=="group")},tableCls(){return[this.prefix,{mobile:this.isMobile,"hide-header":this.hideHeader,"show-cover-bottom-border":this.showPagingBar==="border-cover"}]},paginationCls(){return{"sticky-scroll":this.isStickyPagination}},current:{get:function(){return this.$data.$_current||[]},set:function(ue){if(this.$data.$_current=ue,!!ue){this.isSelectionMode&&this.clearSelectedRows(),this.groupTable===!0&&this.groupingCategory(ue),this.expandable&&this.setDefaultRowExpand(ue),this.$nextTick(()=>{this.buildCols({applyHeadersWidth:!0}),this.isDraggable&&this.buildDraggableCols()});for(let ke of this.currentColumns)ke.action&&this.setHeadState(ke)}}},currentFilteredData(){return this.getItems(this.current,{filter:this.filtered})},currentPagingData(){let ue=this.currentFilteredData;if(this.autoPagination){const ke=(this.currentPageNum-1)*this.currentPageSize;ue=ue.slice(ke,ke+this.currentPageSize)}return ue},currentVisible(){let ue=this.currentPagingData;return this.virtualScroll&&(ue=ue.slice(this.visibleStart,this.visibleEnd+1)),ue},activeColumns(){return this.currentColumns.filter(ue=>!ue.hide)},isAllColumnHide(){return this.currentVisibleColumns.length===0},mergeGroupInfo(){return Object.assign({defaultExpand:!0,rowBorder:!0,titleBorder:!0,expandable:!0,sortCategoryFn(ue,ke){return ue<ke?-1:ue>ke?1:0}},this.groupInfo)},isEmpty(){return this.currentTotal<=0},isEmptyWithFilteredData(){return I.isDefined(this.filteredCount)?this.filteredCount<=0:this.filtered?this.currentFilteredData.length<=0:!1},isHdMenuShowInStickyMode(){return(this.enableHdMenu===!0||this.enableHdMenu===te.STICKY)&&this.hdMenuItems.length>0},isHdMenuShowInHoverMode(){return this.enableHdMenu===te.HOVER},isFilesListSelectionMode(){return this.innerSelectionMode==="file-list"},isActionableSelectionMode(){return this.innerSelectionMode==="checkbox"||this.innerSelectionMode==="radio"},isSelectionMode(){return this.isFilesListSelectionMode||this.isActionableSelectionMode},indentExpandCellCount(){const ue=this.currentVisibleColumns;let ke=0,Pe;for(ke=0,Pe=ue.length;ke<Pe&&ue[ke].action;ke++);return ke},isMobile(){return this.$breakpointManager?I.isDefined(this.mobileBreakpoint)?I.isString(this.mobileBreakpoint)?this.$breakpointManager.lessAndEqThan(this.mobileBreakpoint):this.mobileBreakpoint:this.$breakpointManager.mobile:(l.remind("please import and use BreakpointManagerPlugin when you are in tree-shaking mode or breakpoint will not active."),!1)},isStickyPagination(){return this.showPagingBar==="sticky-scroll"}},watch:{defaultSelected(ue){this.$nextTick(()=>{this.tryDefaultSelect()})},pageSize:{immediate:!0,handler(ue){this.currentPageSize=ue}},pageNum(ue){this.currentPageNum=ue},currentPageNum(ue){this.$refs.scrollbar&&(this.$refs.scrollbar?.resetScrollTop(),this.$nextTick(()=>{this.handleStickyPagination()})),k.$emit(this,"update:page-num",ue),this.form&&this.resetField(),this.data&&this.loadData()},isMobile(ue){ue||this.$nextTick(()=>{this.buildCols({applyHeadersWidth:!0,forceFit:!0})})},isEmpty(){this.$nextTick(()=>{this.buildCols({applyHeadersWidth:!0,forceFit:!0}),this.isDraggable&&this.buildDraggableCols()})},columns:{immediate:!0,handler(ue){this.setCurrentColumns(ue)}},selectionMode:{handler(ue){this.setCurrentColumns(this.columns)}},selectionModeColumn:{handler(ue){this.setCurrentColumns(this.columns)}},currentVisible:{handler(ue){this.isDraggable&&this.$nextTick(()=>{this.buildDraggableCols()})}},currentVisibleColumns:{immediate:!0,handler(ue){this.columnMoveable&&this.$nextTick(()=>{this.buildMoveableCols()}),this.isGroupHeadMode&&this.convertGroupColumns()}},isGroupHeadMode:{handler(ue){this.secondColumnRow=[],this.flattenColumns=[],ue&&this.convertGroupColumns()}},total(ue){this.setTotal(ue)},currentData:{immediate:!0,handler(ue){I.isDefined(this.total)||this.setTotal(ue.length),this.setData(ue),this.sort()}},selectIndexes(ue){this.rowSelectionChange(ue),this.saveSelections()},lastSelectIndex(ue){this.saveSelections()}},created(){this.activeIndexes={row:-1,col:0},this.paramsName=Object.assign({},{total:"total",results:"items"},this.responseParamsName),this.getSortInfo(),this.loadData()},async mounted(){this.disposedFns=[],this.form&&this.disposedFns.push(this.form.instance?.addFormController(this)),await this.$nextTick(),this.isDraggable&&this.buildDraggableCols(),this.columnMoveable&&this.buildMoveableCols(),this.disposedFns.push(c.addResizeListener(this.$el,this.updateContainerWidth,this))},updated(){},[M.componentHooks.beforeUnmount](){for(const ue of this.disposedFns)ue()},methods:{getSlots(){return F.getSlots(this)},useBodyRow(){return I.isFunction(this.defaultBodyRow)?this.defaultBodyRow():this.defaultBodyRow},getPureTableData(ue){return ue.map(ke=>m.omit(ke,[this.fieldInfo.rowKey,this.fieldInfo.rowInfo]))},onScrollContentTouchEnd(){this.isStickyPagination&&window.setTimeout(()=>{this.scrollContentSwipeFailed=!1},0)},onScrollContentTouchStart(){if(!this.isStickyPagination)return;(this.$refs.scrollbar?.isReachBottom()??!1)||(this.scrollContentSwipeFailed=!0)},onScrollContentSwipe(ue){!this.isStickyPagination||ue.axis!=="vertical"||this.scrollContentSwipeFailed||(this.paginationAnimationShow=!0,k.$emit(this,"pagination-animate-show",!0,{action:"swipe"}))},filter(){let{fields:ue}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.filtered=!0,this.filterFields=ue,this.$nextTick(()=>{this.virtualScroll&&this.handleScroll({checkScrollSticky:!1,autoFocusWhenRender:!1}),this.$refs.scrollbar?.update(),this.$refs.scrollbar?.resetScrollTop()})},clearFilter(){this.filtered=!1,this.$nextTick(()=>{this.virtualScroll&&this.handleScroll({checkScrollSticky:!1,autoFocusWhenRender:!1}),this.$refs.scrollbar?.update(),this.$refs.scrollbar?.resetScrollTop()})},isColumnDisableSort(ue){return H.isColumnDisableSort(ue)},isColumnSorting(ue){return this.sortColumn===ue},setCurrentColumns(ue){this.currentColumns=ue.slice();for(let ke of this.currentColumns)ke[this.fieldInfo.columnKey]=ke[this.fieldInfo.columnKey]||s.uuid(),ke.sort&&(this.sortColumn=ke),ke.action&&this.groupTable&&(ke.disableSort=!0);if(this.isSelectionMode){const ke=this.isFilesListSelectionMode?ie:re,Pe=this.isFilesListSelectionMode?"checkbox":this.innerSelectionMode;this.selectionActionColumn=m.merge({[this.fieldInfo.columnKey]:ke,action:Pe,field:ke,className:ne,fieldClassName:ne,width:44,align:"center",disableSort:!0,hideMenuItem:!0},this.selectionModeColumn),this.currentColumns.splice(0,0,this.selectionActionColumn)}this.$nextTick(()=>{this.buildCols({applyHeadersWidth:!0})})},getFlattenColumns(ue){return ue.reduce((ke,Pe)=>(Pe._isGroup?ke=ke.concat(Pe._subColumns):ke.push(Pe),ke),[])},getSecondColumns(ue){return ue.reduce((ke,Pe)=>(Pe._isGroup&&(ke=ke.concat(Pe._subColumns)),ke),[])},convertGroupColumns(){if(!this.isGroupHeadMode)return;let ue=Object.create(null);this.groupColumns=this.groupColumns??this.currentColumns.reduce((Pe,Ve)=>((Ve.type==="group"||Ve.field)&&(Pe[Ve.field]=Ve),Pe),{});const ke=this.currentVisibleColumns.reduce((Pe,Ve)=>{if(Ve.type==="group"){let je=ue[Ve.field]||(ue[Ve.field]={[this.fieldInfo.columnKey]:Ve.field,_isGroup:!0,_subColumns:[],disableSort:!0,align:"center",_rowSpan:1,_colSpan:0});Object.assign(je,Ve),Pe.push(je)}else if(Ve.groupKey){let je=ue[Ve.groupKey]||(ue[Ve.groupKey]={[this.fieldInfo.columnKey]:Ve.groupKey,_subColumns:[],disableSort:!0,_isGroup:!0,align:"center",_rowSpan:1,_colSpan:0});je._subColumns.push(Ve),je._colSpan++}else Pe.push({_isGroup:!1,...Ve,_colSpan:1,_rowSpan:2});return Pe},[]);this.firstColumnRow=ke.filter(Pe=>!(Pe.type==="group"&&Pe._subColumns.length===0)),this.secondColumnRow=this.getSecondColumns(this.firstColumnRow),this.flattenColumns=this.getFlattenColumns(this.firstColumnRow)},isHeadActionDisabled(ue){return this.current.every(ke=>!!(this.isActionHidden(ke,ue)||this.isActionDisabled(ke,ue)))},getFieldSlotName(ue){return ue.field||ue.fieldKey},getBasicExpandSlot(ue){return`basic-expand-${this.getFieldSlotName(ue)}`},hasBasicExpandSlot(ue){return F.hasSlot(this,this.getBasicExpandSlot(ue))},getAdvanceExpandSlot(ue){return`${ue[this.fieldInfo.expandableKey]}`},hasAdvanceExpandSlot(ue){return ue[this.fieldInfo.expandableKey]?F.hasSlot(this,this.getAdvanceExpandSlot(ue)):!1},register(ue){(arguments.length>1&&arguments[1]!==void 0?arguments[1]:()=>{})(this)},unregister(ue){(arguments.length>1&&arguments[1]!==void 0?arguments[1]:()=>{})(this)},isDirty(){const ue=this.getPureTableData(this.current);return!I.isEqual(this.$data.$_initData,ue)},async updateContainerWidth(ue){if(ue.contentRect.width>0){const ke=Math.floor(ue.contentRect.width);await this.$nextTick(),this.buildCols({applyHeadersWidth:!0,containerWidth:ke}),this.handleStickyPagination()}},localSort(){!this.$data.$_hasData||!this.sortColumn||!this.sortColumn.sort||(this.sortData(this.current),this.sortData(this.$data.$_initData),k.$emit(this,"local-sorted",{sortColumn:this.sortColumn,sortInfo:this.sortInfo,sortedData:this.current}))},sortData(ue){if(!this.sortColumn||!this.sortColumn.sort)return;const ke=this.sortColumn,Ve=(this.localSortFunc?this.localSortFunc(ke):null)||((je,it)=>{let rt,mt,yt=this.isActionDisabled(je,ke),st=this.isActionDisabled(it,ke);if(ke.fn)rt=ke.fn(je),mt=ke.fn(it);else if(ke.getHtml)rt=ke.getHtml(je),mt=ke.getHtml(it);else if(this.groupTable){const Qe=this.categoriesMap[je[this.groupInfo.category]]||[],At=this.categoriesMap[it[this.groupInfo.category]]||[];rt=this.getCellValue(ke.field,je,Qe.indexOf(je),je[this.groupInfo.category]),mt=this.getCellValue(ke.field,it,At.indexOf(it),it[this.groupInfo.category])}else rt=this.getCellValue(ke.field,je,this.current.indexOf(je)),mt=this.getCellValue(ke.field,it,this.current.indexOf(it));if(ke.action&&!(yt&&st)){if(yt)return ke.sort==="ASC"?-1:1;if(st)return ke.sort==="ASC"?1:-1}if(rt!==mt){if(ke.sort==="DESC")return rt<mt?1:-1;if(ke.sort==="ASC")return rt<mt?-1:1}return 0});ue.sort((je,it)=>Ve(je,it))},saveSelections(){this.storeSelections={lastSelectionItem:this.getRow(this.lastSelectIndex),selectionItems:Array.from(this.selectIndexes).map(ue=>this.getRow(ue))}},restoreSelections(){if(!this.storeSelections)return;const{selectionItem:ue,lastSelectionItem:ke,selectionItems:Pe}=this.storeSelections;this.mappingSelectionByKey(ue,ke,Pe,this.autoScrollVisibleWhenSort)},mappingSelectionByKey(ue,ke,Pe,Ve){this.lastSelectIndex=this.restoreSelectionByKey(ke),this.selectIndexes=new Set(Pe.map(je=>this.restoreSelectionByKey(je))),this.selectIndexes.delete(-1),this.selectIndex!==-1&&Ve&&this.ensureRowVisible(this.selectIndex)},restoreSelectionByKey(ue){if(!ue)return-1;if(this.groupTable){const Pe=(this.categoriesMap[ue[this.groupInfo.category]]||[]).findIndex(Ve=>{if(Ve)return Ve[this.fieldInfo.rowKey]===ue[this.fieldInfo.rowKey]});return`${ue[this.groupInfo.category]}:${Pe}`}return this.current.findIndex(ke=>{if(ke)return ke[this.fieldInfo.rowKey]===ue[this.fieldInfo.rowKey]})},deprecatedSort(ue){l.deprecate("isCustomSort and isLocalSort","sortMethod",this),this.isCustomSort===!0?k.$emit(this,"sort",{sortColumn:this.sortColumn,sortInfo:this.sortInfo}):this.isLocalSort?this.localSort():this.loadData()},onSort(ue){k.$emit(this,"on-sort-click",{sortColumn:ue,sortInfo:this.sortInfo}),this.sort(ue)},sort(ue){if(!this.colDraggableStates?.isDragging&&!(ue&&this.isColumnDisableSort(ue))&&(ue&&this.isDraggable&&l.consoleError("is-draggable combined with sort may cause error, maybe you dont need sort",this),this.beforeSort({column:ue,isDirty:this.isDirty()})!==!1)){if(this.setCurrentSort(ue),this.isCustomSort===!0||this.isLocalSort===!1)return this.deprecatedSort(ue);this.sortMethod===q.CUSTOM&&ue?k.$emit(this,"sort",{sortColumn:this.sortColumn,sortInfo:this.sortInfo}):this.sortMethod===q.LOCAL?this.localSort():this.loadData(),this.groupTable===!0&&this.groupingCategory(this.current),this.restoreSelections()}},setCurrentSort(ue){if(!ue)return;let ke="ASC";for(const Pe of this.currentColumns)ue!==Pe&&C.set(Pe,"sort",null);switch(ue.sort){case"ASC":ke="DESC";break;case"DESC":ke="ASC";break;default:ke=ue.defaultSortOrder??"ASC";break}C.set(ue,"sort",ke),this.sortInfo[this.sortInfoKey.by]=ue.field,this.sortInfo[this.sortInfoKey.order]=ke,this.sortColumn=ue},getSortInfo(){for(const ue of this.currentColumns)typeof ue.sort=="string"&&(this.sortInfo[this.sortInfoKey.by]=ue.field,this.sortInfo[this.sortInfoKey.order]=ue.sort);return this.sortInfo},getHeaderTooltip(ue){return ue.headerTooltip?ue.headerTooltip===!0?ue.title:ue.headerTooltip:!1},setLoading(ue){this.currentLoading=ue},commit(){const ue=m.cloneDeep(this.getPureTableData(this.current));this.$data.$_initData=ue},resetField(){k.$emit(this,"update:current-data",m.cloneDeep(this.$data.$_initData)),this.form?.instance?.validate()},resetItems(ue){I.isArray(ue)||(ue=[ue]);const ke=ue.map(Ve=>this.$data.$_initData.findIndex(je=>je[this.fieldInfo.itemKey]===Ve)),Pe=m.cloneDeep(this.getPureTableData(this.current));for(const Ve of ke)Pe[Ve]=m.cloneDeep(this.$data.$_initData[Ve]);k.$emit(this,"update:current-data",Pe),this.form?.instance?.validate()},getDirtyRows(){const ue=this.getPureTableData(this.current),ke=[];for(const[Pe,Ve]of this.$data.$_initData.entries())I.isEqual(Ve,ue[Pe])||ke.push(ue[Pe]);return ke},loadData(){if(!this.data)return;this.setLoading(!0);const ue=Object.assign({},this.sortInfo);ue.start=0,ue.offset=(this.currentPageNum-1)*this.currentPageSize,ue.limit=this.currentPageSize,this.data(ue).then(Pe=>{if(!Pe){this.currentLoading=!1,this.clearSelectedRows();return}const Ve={items:[],total:-1};this.paramsName.results&&(Ve.items=I.getPropByString(Pe,this.paramsName.results)),this.paramsName.total&&(Ve.total=I.getPropByString(Pe,this.paramsName.total)),Ve.total=Ve.total||Ve.items.length,this.setData(Ve.items,Ve.total),this.setTotal(Ve.total),k.$emit(this,"dataloaded",this.current.slice()),this.clearSelectedRows(),this.setLoading(!1)}).catch(Pe=>{l.consoleError(Pe),this.setLoading(!1)})},groupingCategory(ue){const ke=Object.create(null);for(let Ve of ue){const je=Ve[this.groupInfo.category];ke[je]||(ke[je]=[]),ke[je].push(Ve)}const Pe=Object.keys(ke);this.categoriesMap=ke,this.categories=Pe.map(Ve=>({key:Ve,enableState:!1,enableIndeterminate:!1,items:ke[Ve]}))},isSelectionModeColumn(ue){return ue[this.fieldInfo.columnKey]===re||ue[this.fieldInfo.columnKey]===ie},headAction(ue){let ke=!ue.enableState;if(C.set(ue,"enableState",ke),C.set(ue,"enableIndeterminate",!1),this.current)if(this.isSelectionModeColumn(ue))ke?this.selectAll():this.clearSelectedRows();else for(let Pe of this.current)this.isActionDisabled(Pe,ue)||this.isActionHidden(Pe,ue)||(Pe[ue.field]=ke);if(this.groupTable)for(const Pe of this.categories)this.$refs.groupNode&&this.$refs.groupNode.setCategoryEnableState(ue,Pe);k.$emit(this,"head-action",{column:ue})},setHeadState(ue){let ke=!1,Pe=!1,Ve;if(this.groupTable?Ve=this.categories.reduce((je,it,rt)=>(je=je.concat(it.items.map((mt,yt)=>[`${it.key}:${yt}`,mt])),je),[]):this.current&&(Ve=this.current.entries()),Ve){for(let[je,it]of Ve)this.isActionDisabled(it,ue)||this.isActionHidden(it,ue)||(this.getCellValue(ue.field,it,je)===!0?ke=!0:Pe=!0);ke&&Pe?C.set(ue,"enableIndeterminate",!0):ke?(C.set(ue,"enableState",!0),C.set(ue,"enableIndeterminate",!1)):(C.set(ue,"enableState",!1),C.set(ue,"enableIndeterminate",!1))}},toggleColumnDisplayState(ue,ke){const Pe=this.getColumnByField(ue,"all");if(C.set(Pe,"hide",!ke),k.$emit(this,"column-display",{column:Pe,state:ke}),this.isAllColumnHide){C.set(Pe,"hide",!1),k.$emit(this,"column-display",{column:Pe,state:!1});return}this.$nextTick(()=>{this.buildCols({applyHeadersWidth:!0,forceFit:!0,omitColumns:[Pe[this.fieldInfo.columnKey]]})})},itemAction(ue,ke,Pe,Ve,je,it){Pe=it?`${it.key}:${Pe}`:Pe,this.isSelectionModeColumn(je)?(this.clickRow(Pe,ke,{isCtrlMode:!0}),this.$nextTick(()=>{this.setHeadState(je)})):(Ve[je.field]=!Ve[je.field],this.setHeadState(je)),k.$emit(this,"action",{index:Pe,row:Ve,column:je,category:it})},rowDblClick(ue,ke,Pe){this.expandable&&this.toggleRowExpand(ke),k.$emit(this,"rowdblclick",ue,ke,Pe)},rowSelectionChange(ue){ue=Array.from(ue),k.$emit(this,"selected-change",{indexes:ue,rows:this.getRows(ue)}),this.selectionActionColumn&&this.$nextTick(()=>{this.setHeadState(this.selectionActionColumn),this.groupTable&&this.$refs.groupNode&&this.$refs.groupNode.setCategoriesEnableState(this.selectionActionColumn)})},getRowClasses(ue,ke){let Pe=[];return this.getRowClass&&(Pe=Pe.concat(this.getRowClass(ue,ke))),this.getDraggingClass&&(Pe=Pe.concat(this.getDraggingClass(ue))),this.getLandedClass&&(Pe=Pe.concat(this.getLandedClass(ue))),this.isAdvanceExpandable&&Pe.push("advance"),this.expandState[ke[this.fieldInfo.rowKey]]&&Pe.push("expanded"),Pe},getAdvanceExpandedRowClasses(ue,ke){return[{"row-disabled":this.isItemDisabled&&this.isItemDisabled(ke),expanded:this.expandState[ke[this.fieldInfo.rowKey]]}].concat(this.getSelectedRowClass(ue))},getCellClasses(ue,ke,Pe,Ve){let je=[];return Pe===0&&je.push("cell-first"),this.showDraggableIndicator&&(je.push("is-draggable"),Ve&&Ve[this.fieldInfo.rowInfo]&&Ve[this.fieldInfo.rowInfo].draggable===!1&&je.push("disable-drag")),ke.align&&je.push(`cell-${ke.align||"left"}`),ke.textSelectable&&je.push("text-selectable"),je},isLastVisibleCell(ue){return this.lastVisibleColumnId.includes(ue[this.fieldInfo.columnKey])},isLastVisibleGroupSecondRowCell(ue){return this.firstColumnRow.some(ke=>ke._subColumns?ke._subColumns[ke._subColumns.length-1].field===ue.field:!1)},getHeaderCellClasses(ue,ke){let Pe=this.getCellClasses(-1,ue,ke);return ue.className&&Pe.push(ue.className),this.isLastVisibleCell(ue)&&Pe.push("last-th-cell"),this.isColumnDisableSort(ue)&&Pe.push("disable-sort"),ue.sort&&Pe.push("sorting"),ue._isGroup?Pe.push("group"):ue.groupKey&&this.isLastVisibleGroupSecondRowCell(ue)&&Pe.push("last-th-visible-sec-row-cell"),Pe},hasExpandIcon(ue){return this.expandable&&ue[this.fieldInfo.columnKey]===this.firstNonActionVisibleColumnId},getContentCellClasses(ue,ke,Pe,Ve){let je=this.getCellClasses(ue,ke,Pe,Ve),it=this.isLastVisibleCell(ke);if(ke.fieldClassName&&je.push(ke.fieldClassName),it&&je.push("last-td-cell"),this.hasExpandIcon(ke)&&je.push("has-expand-icon"),Ve[this.fieldInfo.rowInfo]&&Ve[this.fieldInfo.rowInfo].customClasses){const rt=Ve[this.fieldInfo.rowInfo].customClasses;I.isObject(rt)&&rt[ke.field||ke.fieldKey]&&(je=je.concat(rt[ke.field||ke.fieldKey]))}return je},refresh(){this.beforeRefresh({isDirty:this.isDirty()})!==!1&&(this.$refs.scrollbar&&this.$refs.scrollbar.$el&&(this.$refs.scrollbar.$el.scrollTop=0),k.$emit(this,"refresh"),this.form&&this.resetField(),this.data&&this.loadData())},reload(){this.currentPageNum===1?this.loadData():this.currentPageNum=1},onMouseLeave(){this.hoverIndex=null},setTotal(ue){this.currentTotal=ue},setData(){let ue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];this.$data.$_hasData=!0,ue=ue.slice(),I.isDefined(this.$data.$_initData)||(this.$data.$_initData=m.cloneDeep(this.getPureTableData(ue)));for(const ke of ue)ke[this.fieldInfo.rowKey]=ke[this.fieldInfo.itemKey]||s.uuid();this.current=ue,this.hoverIndex>=this.current.length&&(this.hoverIndex=null),this.$nextTick(()=>{this.tryDefaultSelect()})},tryDefaultSelect(){this.defaultSelected!==!1&&!this.isEmpty&&this.defaultSelect()},handleStickyPagination(){if(!this.isStickyPagination)return;const ue=this.$refs.scrollbar?.getScrollTop()??0,ke=this.$refs.scrollbar?.isReachTop()??!0,Pe=Math.abs(ue-this.$data.$_paginationScroll);ke?(this.paginationAnimationShow=!0,k.$emit(this,"pagination-animate-show",!0,{action:"scroll"})):Pe>le&&(ue>this.$data.$_paginationScroll?(this.paginationAnimationShow=!1,k.$emit(this,"pagination-animate-show",!1,{action:"scroll"})):(this.paginationAnimationShow=!0,k.$emit(this,"pagination-animate-show",!0,{action:"scroll"})),this.$data.$_paginationScroll=ue)},onScroll(ue){if(this.$emit("scroll",ue),this.virtualScroll){this.handleScroll();return}this.handleStickyPagination(ue)},onCellClick(ue,ke,Pe,Ve,je){k.$emit(this,"cell-click",ue,ke,Pe,Ve,je)},onMobileRowClick(ue){k.$emit(this,"rowclick",ue),k.$emit(this,"on-rowclick",ue)},onRowClick(ue,ke){const{result:Pe,payload:Ve}=this.clickRow(ue,ke);Pe&&k.$emit(this,"on-rowclick",Ve)},onCellContextMenu(ue,ke,Pe,Ve,je){this.isItemSelected({index:Pe})||this.clickRow(Pe,je);const it=Array.from(this.selectIndexes);k.$emit(this,"contextmenu",{indexes:it,rows:this.getRows(it),event:je}),k.$emit(this,"cell-contextmenu",ue,ke,Pe,Ve,je)},getHeaderCell(ue){return this.$refs[`header-${ue}`]?.[0]?.$el},getCell(ue,ke){const Pe=this.$refs[`cell-${ue}-${ke}`];return Pe&&Pe[0]},focusActiveCell(){const{row:ue,col:ke}=this.activeIndexes;if(ue<-1||this.current.length<=ue||ke<0||this.currentColumns.length<=ke)return!1;let Pe;return ue===-1?Pe=this.getHeaderCell(ke):Pe=this.getCell(ue,ke),Z.focusWithoutScroll(Pe),Pe===document.activeElement},setActiveCell(ue){let ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:-2,Pe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:-1,Ve=null;return ke<-1||this.current.length<=ke||(ke===-1?Ve=this.getHeaderCell(Pe):Ve=this.getCell(ke,Pe),Pe<0||this.currentColumns.length<=Pe)?!1:(this.activeIndexes.prevCell&&this.activeIndexes.prevCell.setAttribute("tabindex","-1"),Ve&&Ve.setAttribute("tabindex","0"),this.activeIndexes={row:ke,col:Pe,prevCell:Ve},!0)},setActiveCellWithFocus(ue){let ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:-2,Pe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:-1;if(this.setActiveCell(ue,ke,Pe))return this.onRowClick(ke,ue),this.focusActiveCell(ue)},selectCellByKeydown(ue){if(this.groupTable){this.$refs.groupNode&&this.$refs.groupNode.selectCellByKeydown(ue);return}if(!Y.isArrowKey(ue))return;const{row:ke,col:Pe}=this.activeIndexes;if(ue.preventDefault(),Y.isUpArrow(ue))return this.setActiveCellWithFocus(ue,ke-1,Pe);if(Y.isDownArrow(ue))return this.setActiveCellWithFocus(ue,ke+1,Pe);if(Y.isLeftArrow(ue))return this.setActiveCellWithFocus(ue,ke,Pe-1);if(Y.isRightArrow(ue))return this.setActiveCellWithFocus(ue,ke,Pe+1)},isItemDraggable(ue){return!ue[this.fieldInfo.rowInfo]||ue[this.fieldInfo.rowInfo].draggable!==!1},getRowTooltip(ue){return this.isItemDisabled(ue)&&ue[this.fieldInfo.rowInfo]&&ue[this.fieldInfo.rowInfo].disabledTooltip?ue[this.fieldInfo.rowInfo].disabledTooltip:ue[this.fieldInfo.rowInfo]&&ue[this.fieldInfo.rowInfo].tooltip?ue[this.fieldInfo.rowInfo].tooltip:!1},isItemDisabled(ue){return ue[this.fieldInfo.rowInfo]&&ue[this.fieldInfo.rowInfo].disabled===!0},isActionDisabled(ue,ke){if(this.isSelectionModeColumn(ke))return ue[this.fieldInfo.rowInfo]&&ue[this.fieldInfo.rowInfo].unselectable;let Pe;return I.isObject(ue.disabled)?Pe=ue.disabled[ke.field]:Pe=ue.disabled,this.isItemDisabled(ue)||Pe},isActionHidden(ue,ke){return I.isObject(ue.hidden)?ue.hidden[ke.field]:!1},updateItem(ue,ke){return Pe=>{this.current[ue][ke]=Pe}},getInitialValue(ue,ke){if(this.$data.$_initData)return this.$data.$_initData?.[ue]?.[ke]},activateHoverAction(ue){return()=>{this.activeHoverActionRows.add(ue[this.fieldInfo.rowKey]),this.activeHoverActionRows=new Set(this.activeHoverActionRows)}},deactivateHoverAction(ue){return()=>{this.activeHoverActionRows.delete(ue[this.fieldInfo.rowKey]),this.activeHoverActionRows=new Set(this.activeHoverActionRows)}},rowHoverActionCls(ue){return["row-hover-action",{"keep-activate":this.activeHoverActionRows.has(ue)||this.hoverActionKeepActivate}]},getHeaderTip(ue){return I.isString(ue.tip)?ue.tip:""},getHeaderTipSlotName(ue){return`${ue.field||ue.fieldKey}.tip`},showHeaderTip(ue){return!!ue.tip},getPaginationPrefixSlot(){return F.getPrefixSlots("pagination-",this)},setDefaultRowExpand(ue){for(const ke of ue)ke[this.fieldInfo.rowInfo]&&ke[this.fieldInfo.rowInfo].defaultExpand&&this.setRowExpand(ke,!0)},setRowExpand(ue,ke){C.set(this.expandState,ue[this.fieldInfo.rowKey],ke)},toggleRowExpand(ue){const ke=this.expandState[ue[this.fieldInfo.rowKey]];this.setRowExpand(ue,!ke)},getCellHidden(ue,ke){if(I.isObject(ke.hidden))return ke.hidden[ue.field]},getCellValue(ue,ke,Pe,Ve){return ue===re||ue===ie?(Pe=Ve?`${Ve}:${Pe}`:Pe,this.selectIndexes.has(Pe)):ke[ue]},getCellTooltip(ue,ke){let Pe;return!ue.tooltip||ue.useSlot||this.isItemDisabled(ke)?!1:(I.isFunction(ue.tooltip)?Pe=ue.tooltip.apply(this,[ke]):ue.fn?Pe=ue.fn(ke,this):Pe=ke[ue.field],I.isObject(Pe)?{...this.cellTooltipDefaultProps,...Pe}:{...this.cellTooltipDefaultProps,content:Pe})},setPageSize(ue){this.currentPageSize=ue,k.$emit(this,"update:page-size",ue)},setCurrentPageNum(ue){this.currentPageNum=ue,k.$emit(this,"switch-page",{pageNumber:ue,pageSize:this.currentPageSize})},getColumnByField(ue){return((arguments.length>1&&arguments[1]!==void 0?arguments[1]:"visible")==="visible"?this.currentVisibleColumns:this.currentColumns).find(Ve=>Ve.field===ue)},getItems(ue){let{filter:ke=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return ue.reduce((Pe,Ve,je)=>{let it=!0;if(ke)for(const rt of this.filterFields){it=!0;for(const[mt,yt]of Object.entries(rt))it=it&&yt.test(Ve[mt]);if(it)return Pe.push({index:je,item:Ve}),Pe}else Pe.push({index:je,item:Ve});return Pe},[])},onScrollEvent(ue,ke){k.$emit(this,ue,ke)},innerBeforeSwitchPage(){let{pageNum:ue,pageSize:ke}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.beforeSwitchPage?.({pageNumber:ue,pageSize:ke,isDirty:this.isDirty()})},getEmptySlotName(){return this.isEmptyWithFilteredData?"empty-area-in-filtered-data":"empty-area"}}}),we={key:0,class:"cover-wrapper"},pe=["aria-rowcount","aria-colcount"],ve=["syno-id"],be={key:0,role:"row",class:"second-column-row"},Ee={class:"hd-menu-btn-wrapper"},Re={key:0,class:"empty-wrapper"},Ne={key:1,class:"mobile-body"},Le=["onClick","onDblclick","onMouseover"],Se=["colspan"],Ie={key:0,class:"expandable-slide-up-down"};function _e(ue,ke,Pe,Ve,je,it){const rt=X.resolveComponent("v-col-group"),mt=X.resolveComponent("v-table-header-cell"),yt=X.resolveComponent("v-icon"),st=X.resolveComponent("v-menu-item"),Qe=X.resolveComponent("v-menu"),At=X.resolveComponent("v-button"),Xt=X.resolveComponent("v-group-node"),cn=X.resolveComponent("v-mobile-row-card"),Sn=X.resolveComponent("v-table-cell"),Vn=X.resolveComponent("v-slide-up-down-transition"),bn=X.resolveComponent("v-scrollbar"),En=X.resolveComponent("v-pagination"),pn=X.resolveComponent("with-transition"),Un=X.resolveComponent("v-spin"),Pn=X.resolveDirective("tooltip"),On=X.resolveDirective("syno-id");return X.openBlock(),X.createBlock(Un,X.mergeProps({class:`${ue.prefix}-wrapper`},ue.innerSpinBinding),{"spin-inner":X.withCtx(()=>[X.renderSlot(ue.$slots,"spin-inner")]),default:X.withCtx(()=>[ue.hasCover?(X.openBlock(),X.createElementBlock("div",we,[X.renderSlot(ue.$slots,"cover")])):X.createCommentVNode("",!0),X.withDirectives((X.openBlock(),X.createElementBlock("div",{ref:"container",role:"grid",style:X.normalizeStyle(ue.containerStyle),class:X.normalizeClass(ue.tableCls),"aria-rowcount":ue.current.length,"aria-colcount":ue.currentColumns.length,onKeydown:ke[6]||(ke[6]=function(){return ue.selectCellByKeydown&&ue.selectCellByKeydown(...arguments)})},[ue.isMobile?X.createCommentVNode("",!0):(X.openBlock(),X.createElementBlock("div",{key:0,class:X.normalizeClass(ue.tableHeaderCls),ref:"table-header"},[X.createElementVNode("table",{"syno-id":`${ue.synoId}-header`,ref:"theader",role:"none"},[X.createVNode(rt,{ref:"header-col-group",columns:ue.isGroupHeadMode?ue.flattenColumns:ue.currentVisibleColumns,"column-id-field":ue.fieldInfo.columnKey},null,8,["columns","column-id-field"]),X.createElementVNode("thead",{class:X.normalizeClass(ue.prefix+"-thead"),role:"none"},[X.createElementVNode("tr",{role:"row",class:X.normalizeClass(["row",ue.hasGroupHeader?"first-column-row":""])},[(X.openBlock(!0),X.createElementBlock(X.Fragment,null,X.renderList(ue.isGroupHeadMode?ue.firstColumnRow:ue.currentVisibleColumns,(Ht,Mt)=>(X.openBlock(),X.createElementBlock(X.Fragment,null,[Ht.hide?X.createCommentVNode("",!0):(X.openBlock(),X.createBlock(mt,{"column-key":Ht[ue.fieldInfo.columnKey],column:Ht,cindex:Mt,key:Ht[ue.fieldInfo.columnKey],ref_for:!0,ref:"header-"+Mt,"syno-id":`${ue.synoId}-th-${Mt}`,class:X.normalizeClass(ue.getHeaderCellClasses(Ht,Mt)),colspan:ue.isGroupHeadMode?Ht._colSpan:1,rowspan:ue.isGroupHeadMode?Ht._rowSpan:1,tooltip:ue.getHeaderTooltip(Ht),"is-group":Ht._isGroup,"is-action-disabled":ue.isHeadActionDisabled(Ht),"disable-sort":ue.isColumnDisableSort(Ht),sorting:ue.isColumnSorting(Ht),onActionChange:Gt=>ue.headAction(Ht),onSort:Gt=>ue.onSort(Ht),onFocus:Gt=>ue.setActiveCell(Gt,-1,Mt),onMousedown:Gt=>ue.onHeaderCellMouseDown(Ht,`${Ht[ue.fieldInfo.columnKey]}`,Mt,Gt),onMousemove:Gt=>ue.onHeaderCellMouseMove(Ht,`${Ht[ue.fieldInfo.columnKey]}`,Gt)},X.createSlots({_:2},[X.renderList(ue.getSlots(),(Gt,Bt)=>({name:Bt,fn:X.withCtx(Ge=>[X.renderSlot(ue.$slots,Bt,X.normalizeProps(X.guardReactiveProps(Ge)))])}))]),1032,["column-key","column","cindex","syno-id","class","colspan","rowspan","tooltip","is-group","is-action-disabled","disable-sort","sorting","onActionChange","onSort","onFocus","onMousedown","onMousemove"]))],64))),256))],2),ue.isGroupHeadMode&&ue.secondColumnRow.length>0?(X.openBlock(),X.createElementBlock("tr",be,[(X.openBlock(!0),X.createElementBlock(X.Fragment,null,X.renderList(ue.secondColumnRow,(Ht,Mt)=>(X.openBlock(),X.createElementBlock(X.Fragment,null,[Ht.hide?X.createCommentVNode("",!0):(X.openBlock(),X.createBlock(mt,{"column-key":Ht[ue.fieldInfo.columnKey],column:Ht,cindex:Mt,key:Ht[ue.fieldInfo.columnKey],"syno-id":`${ue.synoId}-th-${Mt}`,class:X.normalizeClass(ue.getHeaderCellClasses(Ht,Mt)),colspan:ue.isGroupHeadMode?Ht._colSpan:1,rowspan:ue.isGroupHeadMode?Ht._rowSpan:1,tooltip:ue.getHeaderTooltip(Ht),"is-action-disabled":ue.isHeadActionDisabled(Ht),"disable-sort":ue.isColumnDisableSort(Ht),sorting:ue.isColumnSorting(Ht),onActionChange:Gt=>ue.headAction(Ht),onSort:Gt=>ue.onSort(Ht),onFocus:Gt=>ue.setActiveCell(Gt,-1,Mt),onMousedown:Gt=>ue.onHeaderCellMouseDown(Ht,`${Ht[ue.fieldInfo.columnKey]}`,Mt,Gt),onMousemove:Gt=>ue.onHeaderCellMouseMove(Ht,`${Ht[ue.fieldInfo.columnKey]}`,Gt)},X.createSlots({_:2},[X.renderList(ue.getSlots(),(Gt,Bt)=>({name:Bt,fn:X.withCtx(Ge=>[X.renderSlot(ue.$slots,Bt,X.normalizeProps(X.guardReactiveProps(Ge)))])}))]),1032,["column-key","column","cindex","syno-id","class","colspan","rowspan","tooltip","is-action-disabled","disable-sort","sorting","onActionChange","onSort","onFocus","onMousedown","onMousemove"]))],64))),256))])):X.createCommentVNode("",!0)],2)],8,ve),X.createElementVNode("div",Ee,[ue.isHdMenuShowInStickyMode?(X.openBlock(),X.createBlock(At,{key:0,"syno-id":`${ue.synoId}-show-menu`,class:X.normalizeClass(ue.prefix+"-header-hd-menu"),"menu-align":"tr->br",type:"styleless","dropdown-offset":[2,0],"menu-constrain-height":""},{icon:X.withCtx(()=>[X.createVNode(yt,{name:"data-table-header-menu",class:"hd-menu-icon","svg-icon-set":"set16"})]),dropdown:X.withCtx(Ht=>[X.createVNode(Qe,{class:"v-table__menu","is-open":Ht.menuShow,width:"auto","syno-id":`${ue.synoId}-menu`},{default:X.withCtx(()=>[(X.openBlock(!0),X.createElementBlock(X.Fragment,null,X.renderList(ue.hdMenuItems,Mt=>(X.openBlock(),X.createBlock(st,{key:Mt[ue.fieldInfo.columnKey],title:Mt.title?Mt.title:"",type:"checkbox",selected:!Mt.hide,onChanged:Gt=>ue.toggleColumnDisplayState(Mt.field,Gt),"syno-id":`${ue.synoId}-menu-item`},null,8,["title","selected","onChanged","syno-id"]))),128))]),_:2},1032,["is-open","syno-id"])]),_:1},8,["syno-id","class"])):X.createCommentVNode("",!0)])],2)),ue.isEmpty||ue.isEmptyWithFilteredData?(X.openBlock(),X.createElementBlock("div",{key:1,class:X.normalizeClass(ue.prefix+"-empty-body")},[X.renderSlot(ue.$slots,ue.getEmptySlotName(),{},()=>[ue.showEmptyText?(X.openBlock(),X.createElementBlock("div",Re,X.toDisplayString(ue.emptyText),1)):X.createCommentVNode("",!0)])],2)):(X.openBlock(),X.createBlock(bn,{key:2,ref:"scrollbar",onScroll:ue.onScroll,"active-adaptive-scrollbar":ue.activeAdaptiveScrollbar,onSwipe:ue.onScrollContentSwipe,onTouchstart:ue.onScrollContentTouchStart,onTouchend:ue.onScrollContentTouchEnd,onReachBottom:ke[2]||(ke[2]=Ht=>ue.onScrollEvent("reach-bottom",Ht)),onReachTop:ke[3]||(ke[3]=Ht=>ue.onScrollEvent("reach-bottom",Ht)),onNotReachBottom:ke[4]||(ke[4]=Ht=>ue.onScrollEvent("not-reach-bottom",Ht)),onNotReachTop:ke[5]||(ke[5]=Ht=>ue.onScrollEvent("not-reach-bottom",Ht))},{default:X.withCtx(()=>[X.createElementVNode("div",{ref:"content",class:X.normalizeClass(ue.contentClass)},[ue.groupTable?(X.openBlock(),X.createElementBlock("div",{key:0,class:X.normalizeClass(ue.prefix+"-body")},[X.createVNode(Xt,{"syno-id":`${ue.synoId}-gn`,ref:"groupNode","multiple-selected":ue.innerMultipleSelected,categories:ue.categories,columns:ue.currentColumns,"group-info":ue.mergeGroupInfo},X.createSlots({_:2},[X.renderList(ue.getSlots(),(Ht,Mt)=>({name:Mt,fn:X.withCtx(Gt=>[X.renderSlot(ue.$slots,Mt,X.normalizeProps(X.guardReactiveProps(Gt)))])}))]),1032,["syno-id","multiple-selected","categories","columns","group-info"])],2)):ue.isMobile?(X.openBlock(),X.createElementBlock("div",Ne,[X.createElementVNode("div",{onMouseleave:ke[0]||(ke[0]=function(){return ue.onMouseLeave&&ue.onMouseLeave(...arguments)}),role:"none",style:X.normalizeStyle(ue.tableOffsetStyle)},[(X.openBlock(!0),X.createElementBlock(X.Fragment,null,X.renderList(ue.currentVisible,Ht=>{let{item:Mt,index:Gt}=Ht;return X.openBlock(),X.createBlock(cn,{key:Mt[ue.fieldInfo.rowKey],columns:ue.isGroupHeadMode?ue.flattenColumns:ue.currentVisibleColumns,value:Mt,index:Gt,"get-cell-value":ue.getCellValue,"get-header-tip-slot-name":ue.getHeaderTipSlotName,"get-field-slot-name":ue.getFieldSlotName,"mobile-row-collapsible":ue.mobileRowCollapsible,"update-item":ue.updateItem,"field-alignment":ue.mobileFieldAlignment,onRowclick:ue.onMobileRowClick},X.createSlots({_:2},[X.renderList(ue.getSlots(),(Bt,Ge)=>({name:Ge,fn:X.withCtx(et=>[X.renderSlot(ue.$slots,Ge,X.normalizeProps(X.guardReactiveProps(et)))])}))]),1032,["columns","value","index","get-cell-value","get-header-tip-slot-name","get-field-slot-name","mobile-row-collapsible","update-item","field-alignment","onRowclick"])}),128))],36),ue.virtualScroll?(X.openBlock(),X.createElementBlock("div",{key:0,style:X.normalizeStyle(ue.virtualBodyStyle)},null,4)):X.createCommentVNode("",!0)])):(X.openBlock(),X.createElementBlock("div",{key:2,class:X.normalizeClass(ue.prefix+"-body"),ref:"table-body"},[X.createElementVNode("table",{ref:"tbody",onMouseleave:ke[1]||(ke[1]=function(){return ue.onMouseLeave&&ue.onMouseLeave(...arguments)}),role:"none",style:X.normalizeStyle(ue.tableOffsetStyle)},[X.createVNode(rt,{ref:"body-col-group",columns:ue.isGroupHeadMode?ue.flattenColumns:ue.currentVisibleColumns,"column-id-field":ue.fieldInfo.columnKey,"cols-data":ue.colsData,"follow-head-col-group":""},null,8,["columns","column-id-field","cols-data"]),X.withDirectives(X.createElementVNode("tbody",{class:X.normalizeClass(ue.prefix+"-tbody"),role:"none"},[(X.openBlock(!0),X.createElementBlock(X.Fragment,null,X.renderList(ue.currentVisible,Ht=>{let{item:Mt,index:Gt}=Ht;return X.openBlock(),X.createElementBlock(X.Fragment,{key:Mt[ue.fieldInfo.rowKey]},[X.withDirectives((X.openBlock(),X.createBlock(X.resolveDynamicComponent(ue.useBodyRow()),{ref_for:!0,ref:`row-${Gt}`,"syno-id":`${ue.synoId}-tr-${Gt}`,item:Mt,index:Gt,class:X.normalizeClass(ue.getRowClasses(Gt,Mt)),role:"row","aria-rowindex":Gt+1,onMouseover:Bt=>ue.hoverRow(Gt),onClick:Bt=>ue.onRowClick(Gt,Bt),onDblclick:Bt=>ue.rowDblClick(Gt,Mt,Bt)},{default:X.withCtx(()=>[(X.openBlock(!0),X.createElementBlock(X.Fragment,null,X.renderList(ue.isGroupHeadMode?ue.flattenColumns:ue.currentVisibleColumns,(Bt,Ge)=>(X.openBlock(),X.createBlock(Sn,{role:"cell",ref_for:!0,ref:`cell-${Gt}-${Ge}`,"syno-id":`${ue.synoId}-td-${Mt[ue.fieldInfo.rowKey]}-${Bt[ue.fieldInfo.columnKey]}`,key:Bt[ue.fieldInfo.columnKey],value:ue.getCellValue(Bt.field,Mt,Gt),item:Mt,class:X.normalizeClass(ue.getContentCellClasses(Gt,Bt,Ge,Mt)),tabindex:"-1","aria-colindex":Ge+1,"field-key":Bt.fieldKey,index:Gt,cindex:Ge,expandable:ue.isBasicExpandable,"has-expand-slot":ue.hasBasicExpandSlot(Bt),"expand-slot":ue.getBasicExpandSlot(Bt),expand:ue.expandState[Mt[ue.fieldInfo.rowKey]],"show-expand-icon":ue.hasExpandIcon(Bt),action:Bt.action,"is-action-disabled":ue.isActionDisabled(Mt,Bt),tooltip:ue.getCellTooltip(Bt,Mt),"use-field-slot":Bt.useSlot||!Bt.fn&&!Bt.field,"field-slot":ue.getFieldSlotName(Bt),"content-fn":Bt.fn,"get-html":Bt.getHtml,"hover-action-cls":ue.rowHoverActionCls(Mt[ue.fieldInfo.rowKey]),"hover-action-activate":ue.activateHoverAction(Mt),"hover-action-deactivate":ue.deactivateHoverAction(Mt),"has-hover-action":ue.isLastVisibleCell(Bt),"update-item":ue.updateItem(Gt,Bt.field),"initial-value":ue.getInitialValue(Gt,Bt.field),column:Bt,hidden:ue.getCellHidden(Bt,Mt),"is-draggable":ue.isDraggable,onFocus:et=>ue.setActiveCell(et,Gt,Ge),onClick:et=>ue.onCellClick(Mt,Bt,Gt,Ge,et),onContextmenu:et=>ue.onCellContextMenu(Mt,Bt,Gt,Ge,et),onActionChange:(et,vt)=>ue.itemAction(et,vt,Gt,Mt,Bt),onToggleExpand:et=>ue.toggleRowExpand(Mt)},X.createSlots({_:2},[X.renderList(ue.getSlots(),(et,vt)=>({name:vt,fn:X.withCtx(wt=>[X.renderSlot(ue.$slots,vt,X.normalizeProps(X.guardReactiveProps(wt)))])}))]),1032,["syno-id","value","item","class","aria-colindex","field-key","index","cindex","expandable","has-expand-slot","expand-slot","expand","show-expand-icon","action","is-action-disabled","tooltip","use-field-slot","field-slot","content-fn","get-html","hover-action-cls","hover-action-activate","hover-action-deactivate","has-hover-action","update-item","initial-value","column","hidden","is-draggable","onFocus","onClick","onContextmenu","onActionChange","onToggleExpand"]))),128))]),_:2},1064,["syno-id","item","index","class","aria-rowindex","onMouseover","onClick","onDblclick"])),[[Pn,ue.getRowTooltip(Mt)]]),ue.isAdvanceExpandable?(X.openBlock(),X.createElementBlock("tr",{key:`${Mt[ue.fieldInfo.rowKey]}-expandable`,ref_for:!0,ref:`expandable-row-${Gt}`,class:X.normalizeClass(["expandable-row",ue.getAdvanceExpandedRowClasses(Gt,Mt)]),onClick:Bt=>ue.onRowClick(Gt,Bt),onDblclick:Bt=>ue.rowDblClick(Gt,Mt,Bt),onMouseover:Bt=>ue.hoverRow(Gt)},[(X.openBlock(!0),X.createElementBlock(X.Fragment,null,X.renderList(ue.indentExpandCellCount,Bt=>(X.openBlock(),X.createElementBlock("td",{class:"indent-cell",key:Bt}))),128)),X.createElementVNode("td",{class:"expandable-cell",colspan:ue.currentVisibleColumns.length-ue.indentExpandCellCount},[X.createVNode(Vn,{"syno-id":`${ue.synoId}-slide-up-down`},{default:X.withCtx(()=>[ue.expandState[Mt[ue.fieldInfo.rowKey]]?(X.openBlock(),X.createElementBlock("div",Ie,[ue.hasAdvanceExpandSlot(Mt)?X.renderSlot(ue.$slots,ue.getAdvanceExpandSlot(Mt),{key:0,item:Mt}):X.renderSlot(ue.$slots,"advance-expand-default",{key:1,item:Mt})])):X.createCommentVNode("",!0)]),_:2},1032,["syno-id"])],8,Se)],42,Le)):X.createCommentVNode("",!0)],64)}),128))],2),[[X.vShow,!ue.isEmpty]])],36),ue.virtualScroll?(X.openBlock(),X.createElementBlock("div",{key:0,style:X.normalizeStyle(ue.virtualBodyStyle)},null,4)):X.createCommentVNode("",!0)],2))],2)]),_:3},8,["onScroll","active-adaptive-scrollbar","onSwipe","onTouchstart","onTouchend"]))],46,pe)),[[On]]),X.createVNode(pn,{wrap:ue.isStickyPagination,name:"slide"},{default:X.withCtx(()=>[ue.havePagingBar?X.withDirectives((X.openBlock(),X.createBlock(En,{key:0,ref:"pagination","mobile-breakpoint":ue.innerPaginationBreakpoint,class:X.normalizeClass(ue.paginationCls),value:ue.currentPageNum,"model-value":ue.currentPageNum,"onUpdate:modelValue":ue.setCurrentPageNum,"onUpdate:pageSize":ue.setPageSize,onInput:ue.setCurrentPageNum,"page-size":ue.currentPageSize,start:ue.innerPageStart,end:ue.innerPageEnd,"selected-count":ue.innerSelectedCount,"filtered-count":ue.innerFilteredCount,total:ue.currentTotal,"show-total":ue.showTotal,"total-text-format":ue.innerTotalTextFormat,"total-text-mode":ue.innerTotalTextMode,"items-per-page":ue.itemsPerPage,"switch-page":ue.canSwitchPage,"before-switch-page":ue.innerBeforeSwitchPage,"hide-refresh-btn":ue.hideRefreshBtn,loading:ue.innerPaginationLoading,onRefresh:ke[7]||(ke[7]=Ht=>ue.refresh()),"syno-id":`${ue.synoId}-paging`},X.createSlots({_:2},[X.renderList(ue.getPaginationPrefixSlot(),Ht=>{let{name:Mt,exposeName:Gt}=Ht;return{name:Mt,fn:X.withCtx(Bt=>[X.renderSlot(ue.$slots,Gt,X.normalizeProps(X.guardReactiveProps(Bt)))])}})]),1032,["mobile-breakpoint","class","value","model-value","onUpdate:modelValue","onUpdate:pageSize","onInput","page-size","start","end","selected-count","filtered-count","total","show-total","total-text-format","total-text-mode","items-per-page","switch-page","before-switch-page","hide-refresh-btn","loading","syno-id"])),[[X.vShow,ue.animateShowPagingBar]]):X.createCommentVNode("",!0)]),_:3},8,["wrap"])]),_:3},16,["class"])}var Ae=J.default(fe,[["render",_e]]);x.default=Ae}(f2)),f2}var M2={},cY;function fee(){return cY||(cY=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=ln(),k=wa(),F=Kt(),B=Ur(),G=Qo(),E=qx(),A=cT(),u=ht(),o=St();const S=u.defineComponent({name:"DataView",components:{vScrollbar:k.default},mixins:[A.selectable({selectRange:"selectRange"})],props:{items:{type:Array,default:()=>[]},idProperty:{type:String,default:"id"},singleSelect:{type:Boolean,default:!0},scrollbar:{type:Object,default:()=>({})},defaultSelected:{type:[Boolean,Array],default:!1},focusInner:{type:Boolean,default:!0}},emits:["contextmenu","selectionchange","selected-change","rowclear"],data(){return{prefix:"v-data-view"}},computed:{},watch:{defaultSelected:{handler(y){if(F.isArray(y)){if(this.singleSelect&&y.length>1){B.remind("The 'defaultSelected' prop can't be an array with length greater than one when 'singleSelect' is true.",this),this.selectItems([this.items[y[0]]]);return}this.selectItems(y.map(d=>this.items[d]))}},immediate:!0},selectedItems:{handler(){this.onSelectionChanged()}}},created(){this.items.forEach((y,d)=>{F.isDefined(y[this.idProperty])||(y[this.idProperty]=d)})},methods:{onSelectionChanged(){const y=new Map;for(const[v,b]of this.items.entries())y.set(this.getItemValue(b),v);const d=Array.from(this.selectedItems).map((v,b)=>y.get(v));M.$emit(this,"selectionchange",this.singleSelect?d?.[0]:d),M.$emit(this,"selected-change",Array.from(this.selectedItems))},isMultipleSelected(){return!this.singleSelect},clearSelectedRows(){this.clearSelection(),M.$emit(this,"rowclear")},onContextMenu(y,d,v){M.$emit(this,"contextmenu",y,d,v)},getItemValue(y){return y[this.idProperty]},isItemDisabled(y){return y.disabled},onKeyDown(y){G.isUpArrow(y)||G.isLeftArrow(y)?(y.preventDefault(),y.stopPropagation(),this.selectPrev(y)):(G.isDownArrow(y)||G.isRightArrow(y))&&(y.preventDefault(),y.stopPropagation(),this.selectNext(y))},selectRange(y,d){let{keepSelection:v=!1}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.selectItemsRange(y,d,this.items,{keepSelection:v})},selectPrev(y){const d=this.lastSelectRangeIndex-1;if(d<0)return;const v=this.items[d];this.clickItem(y,d,v),this.focusItem(v[this.idProperty])},selectNext(y){const d=this.lastSelectRangeIndex+1;if(d>this.items.length-1)return;const v=this.items[d];this.clickItem(y,d,v),this.focusItem(v[this.idProperty])},getItemCls(y){return[`${this.prefix}-item-wrap`,{[`${this.prefix}-item-selected`]:this.isItemSelected(y)}]},ensureItemVisible(y){if(!y)return!1;this.$refs.scrollbar.ensureVisible(this.$refs[`item-${y[this.idProperty]}`]?.[0])},clickItem(y,d,v){this.onClickItem(y,d,v)},focusItem(y){const d=y[this.idProperty];this.$refs[`item-${d}`]?.[0]?.focus()},onFocusItem(y){const d=y[this.idProperty],v=this.$refs[`item-${d}`]?.[0];this.focusInner&&E.focusFirstDescendant(v)}}}),_=["syno-id","onClick","onFocus","onContextmenu"];function p(y,d,v,b,s,l){const w=u.resolveComponent("v-scrollbar"),I=u.resolveDirective("syno-id");return u.withDirectives((u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(y.prefix)},[u.renderSlot(y.$slots,"outer-spin"),u.renderSlot(y.$slots,"before"),u.createElementVNode("div",{class:u.normalizeClass(`${y.prefix}-body`)},[u.createVNode(w,u.mergeProps({ref:"scrollbar"},y.scrollbar),{default:u.withCtx(()=>[u.renderSlot(y.$slots,"inner-spin"),u.createElementVNode("div",{ref:"content",tabindex:"0",onKeydown:d[0]||(d[0]=C=>y.onKeyDown(C))},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(y.items,(C,h)=>(u.openBlock(),u.createElementBlock("div",{key:C[y.idProperty],ref_for:!0,ref:`item-${C[y.idProperty]}`,"syno-id":`${y.synoId}-${h}`,onClick:c=>y.onClickItem(c,h,C),onFocus:c=>y.onFocusItem(C),class:u.normalizeClass(y.getItemCls(C)),onContextmenu:c=>y.onContextMenu(C,h,c),tabindex:"-1"},[u.renderSlot(y.$slots,"item",{item:C,index:h,disabled:C.disabled})],42,_))),128))],544)]),_:3},16)],2),u.renderSlot(y.$slots,"after")],2)),[[I]])}var f=o.default(S,[["render",p]]);x.default=f}(M2)),M2}var Om={},dY;function Db(){if(dY)return Om;dY=1,Object.defineProperty(Om,"__esModule",{value:!0});const x=["m/d/Y","d/m/Y","Y-m-d","d.m.Y","d-m-Y"],M=["h:i a","H:i"];function k(F){return F=F.replace(/m/g,"MM"),F=F.replace(/d/g,"dd"),F=F.replace(/Y/g,"yyyy"),F=F.replace(/h/g,"hh"),F=F.replace(/H/g,"HH"),F=F.replace(/i/g,"mm"),F=F.replace(/a/g,"aaa"),F}return Om.convertToDateFnFormat=k,Om.dateFormats=x,Om.timeFormats=M,Om}var ob={};const Ob=sf(ame);var fY;function gT(){if(fY)return ob;fY=1,Object.defineProperty(ob,"__esModule",{value:!0});var x=Ob,M=Db();function k(B){let G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";const A=E?`${G} ${E}`:G;if(!F(B,G,E))return!1;const u=M.convertToDateFnFormat(A);return x.parse(B,u,new Date)}function F(B){let G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";const A=E?`${G} ${E}`:G,u=M.convertToDateFnFormat(A);return x.isMatch(B,u)}return ob.isValidDateString=F,ob.parseStringToDate=k,ob}var Nm={},gY;function y5(){if(gY)return Nm;gY=1,Object.defineProperty(Nm,"__esModule",{value:!0});var x=Db(),M=Ob;function k(G,E,A){return F(G,E)+" "+B(G,A)}function F(G,E){if(!(G instanceof Date))throw"need to be Date Object";const A=x.convertToDateFnFormat(E);return M.format(G,A)}function B(G,E){if(!(G instanceof Date))throw"need to be Date Object";const A=x.convertToDateFnFormat(E);return M.format(G,A)}return Nm.toDateString=F,Nm.toDateTimeString=k,Nm.toTimeString=B,Nm}var D2={},O2={},yg={},pY;function fwe(){if(pY)return yg;pY=1,Object.defineProperty(yg,"__esModule",{value:!0});const x=Math.pow(10,6)*24*60*60*1e3,M=-x,k=new Date(x),F=new Date(M);return yg.maxDate=k,yg.maxTime=x,yg.minDate=F,yg.minTime=M,yg}var mY;function pT(){return mY||(mY=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Ni(),k=ln(),F=La(),B=Ab(),G=rv(),E=Bg(),A=Eu(),u=lc(),o=ci(),S=fr(),_=Ru(),p=Ob,f=fwe(),y=Kt(),d=vr(),v=xl(),b=kr(),s=ht(),l=St();d.register("date-picker-down",b.vIconTriangleDown),d.register("date-picker-left",b.vIconChevronLeft),d.register("date-picker-right",b.vIconChevronRight);const w=7,I=s.defineComponent({name:"DatePickerMenu",components:{vButton:F.default,vSingleSelect:B.default,vCheckbox:G.default,vTrapFocus:E.default,vMenu:A.default,vMenuItem:u.default},directives:{clickoutside:_.default},mixins:[o.default,d.default,v.default,S.inject("date-picker")],props:{[M.componentsProps.value()]:{type:Date,default:void 0},isOpen:{type:Boolean,default:!1},timeChecked:{type:Boolean,default:!1},enableHour24:{type:Boolean,default:!1},timeOptional:{type:Boolean,default:!0},todayText:{type:String,default:void 0},resetText:{type:String,default:void 0},addTimeText:{type:String,default:void 0},clearText:{type:String,default:void 0},allowBlank:{type:Boolean,default:!1},showTime:{type:Boolean,default:!1},maxTime:{type:Date,default:()=>f.maxDate},minTime:{type:Date,default:()=>f.minDate},yearsRange:{type:Array,default:void 0,validator:P=>P?!(P.length!==2||!P.every(U=>Number.isInteger(U))||P[0]>P[1]):!0},startWeekDay:{type:Number,default:0},showResetButton:{type:Boolean,default:!0},showClearButton:{type:Boolean,default:!0},showTodayButton:{type:Boolean,default:!0},dateDots:{type:Array,default:()=>[]},isDisableDate:{type:Function,default:void 0},todayDisabled:{type:Boolean,default:void 0},closeOnSelect:{type:Boolean,default:void 0}},emits:["change","update:model-value","update:is-open","select-date","update:time-checked"],data(){const P=M.getModelValue(this),U=P instanceof Date?p.toDate(P):void 0,Y=P instanceof Date?p.toDate(P):new Date;return{showYear:!1,showMonth:!1,originalValue:U,activeDate:Y}},computed:{prefix(){return"v-dt"},ariaLabelledby(){return`date-${p.startOfDay(this.activeDate).getTime()}`},ariaLabelLastMonth(){const P=this.getAriaLabelMonthBtnFromOffset(-1);return`${this._i18n("common","last_month")} ${P}`},ariaLabelNextMonth(){const P=this.getAriaLabelMonthBtnFromOffset(1);return`${this._i18n("common","next_month")} ${P}`},givenYears(){return this.yearsRange?new Array(this.yearsRange[1]-this.yearsRange[0]+1).fill(0).map((P,U)=>U).map(P=>this.yearsRange[0]+P).map(P=>({year:P,text:P})):null},defaultYears(){const P=this.activeDate.getFullYear();return new Array(11).fill(0).map((U,Y)=>Y-5).map(U=>P+U).map(U=>({year:U,text:U}))},years(){return this.givenYears||this.defaultYears},months(){return[{text:this._i18n("extlang","jan"),month:1},{text:this._i18n("extlang","feb"),month:2},{text:this._i18n("extlang","mar"),month:3},{text:this._i18n("extlang","apr"),month:4},{text:this._i18n("extlang","may"),month:5},{text:this._i18n("extlang","jun"),month:6},{text:this._i18n("extlang","jul"),month:7},{text:this._i18n("extlang","aug"),month:8},{text:this._i18n("extlang","sep"),month:9},{text:this._i18n("extlang","oct"),month:10},{text:this._i18n("extlang","nov"),month:11},{text:this._i18n("extlang","dec"),month:12}]},week(){const P=this._i18n("uicommon","schedule_abbre_sun").substr(0,1),U=this._i18n("uicommon","schedule_abbre_mon").substr(0,1),Y=this._i18n("uicommon","schedule_abbre_tue").substr(0,1),Z=this._i18n("uicommon","schedule_abbre_wed").substr(0,1),X=this._i18n("uicommon","schedule_abbre_thu").substr(0,1),J=this._i18n("uicommon","schedule_abbre_fri").substr(0,1),q=this._i18n("uicommon","schedule_abbre_sat").substr(0,1);return this.startWeekDay===6?[q,P,U,Y,Z,X,J]:this.startWeekDay===1?[U,Y,Z,X,J,q,P]:[P,U,Y,Z,X,J,q]},dates(){const P=[],U=p.startOfDay(new Date),Y=p.startOfDay(M.getModelValue(this)||this.activeDate),Z=p.startOfDay(this.activeDate),X=p.startOfMonth(Z),J=p.endOfMonth(Z),q=(X.getDay()-this.startWeekDay+w)%w,te=p.subDays(X,q);let re=0;for(let ie=0;ie<6;ie++)for(let ne=0;ne<7;ne++){const le=p.addDays(te,re);let fe="";const we=p.isSameDay(le,Z),pe=!this._isDisableDate(le),ve=p.isSameDay(le,Y),be=p.isSameDay(le,U),Ee=p.isWithinInterval(le,{start:X,end:J});fe+=we?"active ":"",fe+=pe?"enabled ":"disabled ",fe+=ve?"selected ":"",fe+=be?"today ":"",fe+=Ee?"":"other-month";let Re={time:le.getTime(),text:le.getDate(),status:fe};P.push(Re),re++}return P},today(){return this.getDateTimeByOnlyDate(p.startOfDay(new Date))},hourOptions(){return this.enableHour24?new Array(24).fill(0).map((P,U)=>({label:`${U}`,value:U})):new Array(12).fill(0).map((P,U)=>({label:`${U+1}`,value:(U+1)%12}))},minuteOptions(){return new Array(60).fill(0).map((P,U)=>({label:`${U}`.padStart(2,"0"),value:U}))},ampmOptions(){return[{label:"AM",value:"am"},{label:"PM",value:"pm"}]},maxHour24or12(){return this.enableHour24?24:12},activeHour:{get(){const P=M.getModelValue(this);return P?P.getHours()%this.maxHour24or12:0},set(P){const U=p.startOfDay(this.activeDate),Y=this.enableHour24||this.activeAmPm==="am"?P:P+12;U.setHours(Y),this._emitDate(U)}},activeMinute:{get(){const P=M.getModelValue(this);return P?P.getMinutes():0},set(P){const U=p.toDate(this.activeDate);U.setMinutes(P),this._emitDate(U)}},activeAmPm:{get(){const P=M.getModelValue(this);return P?P.getHours()<12?"am":"pm":"am"},set(P){if(this.enableHour24)return;const U=p.toDate(this.activeDate),Y=P==="am"?this.activeHour:this.activeHour+12;U.setHours(Y),this._emitDate(U)}},yearActiveIndex(){return this.years.findIndex(P=>this.activeDate.getFullYear()===P.year)},monthActiveIndex(){return this.activeDate.getMonth()},hasResetButton(){return!this.allowBlank&&this.showTime&&this.showResetButton},hasClearButton(){return this.allowBlank&&this.showClearButton},dotsSet(){return new Set(this.dateDots.map(P=>p.startOfDay(P).getTime()))},isTodayDisabled(){return y.isBoolean(this.todayDisabled)?this.todayDisabled:this._isDisableDate(this.today)}},watch:{isOpen:{handler(P){P===!0?this.mountToContainer():this.closeDropdowns()},immediate:!0},[M.componentsProps.value()]:{immediate:!0,handler(P){const Y=P||new Date;this.activeDate=this.showTime?Y:p.startOfDay(Y)}}},methods:{_isDisableDate(P){return!(y.isFunction(this.isDisableDate)?!this.isDisableDate(P):p.isWithinInterval(P,{start:this.minTime,end:this.maxTime}))},getYearBtn(){return this.$refs.yearBtn},getMonthBtn(){return this.$refs.monthBtn},_emitDate(P){let U=P;U&&(this.maxTime&&(U=U<this.maxTime?U:this.maxTime),this.minTime&&(U=U>this.minTime?U:this.minTime),this.showTime||(U=p.startOfDay(U))),k.$emit(this,M.getModelEventName(this),U),k.$emit(this,"change",U)},focusDatePickerTable(){this.$refs.datePicker.focus()},getExtraElements(){return[this.$refs.hourSelect,this.$refs.minuteSelect,this.$refs.ampmSelect,this.$refs.yearMenu,this.$refs.monthMenu]},umountFromContainer(){const P=this.getContainerEl();P&&P.removeChild(this.$el)},closeDropdowns(){this.showYear=!1,this.showMonth=!1},tryClose(){this.close()},close(){k.$emit(this,"update:is-open",!1)},getAriaLabelMonthBtnFromOffset(){let P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;const U=p.addMonths(this.activeDate,P),Y=this.months[U.getMonth()].text;return`${U.getFullYear()} ${Y}`},getLongDateString(){let P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const U=this.activeDate.getFullYear(),Y=this.months[this.activeDate.getMonth()].text,Z=P.text;return`${U} ${Y} ${Z}`},getDateSynoId(P){let U=this.dates[P].time;return`${this.synoId}-${U}`},getDateTimeByOnlyDate(){let P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Date;if(!this.showTime)return P;const U=this.enableHour24||this.activeAmPm==="am"?this.activeHour:this.activeHour+12;return P.setHours(U),P.setMinutes(this.activeMinute),P.setSeconds(0),P.setMilliseconds(0),P},onYearSelect(P){this.selectYear(P)},onYearMenuClose(){this.$refs.yearBtn?.focus(),this.showYear=!1},onMonthSelect(P){this.selectMonth(P)},onMonthMenuClose(){this.$refs.monthBtn?.focus(),this.showMonth=!1},closeYearPicker(){this.showYear=!1},focusYearPickerButton(){this.$refs.yearBtn?.focus()},toggleYearPicker(P){this.showYear=!this.showYear},closeMonthPicker(){this.showMonth=!1},focusMonthPickerButton(){this.$refs.monthBtn?.focus()},toggleMonthPicker(P){this.showMonth=!this.showMonth},async onPrevMonthClick(){this.changeMonth(-1),await this.$nextTick(),this.$refs.prevMonthBtn.focus()},async onNextMonthClick(){this.changeMonth(1),await this.$nextTick(),this.$refs.nextMonthBtn.focus()},selectYear(P){isNaN(P)||(this.activeDate=p.setYear(this.activeDate,P))},selectMonth(P){isNaN(P)||(this.activeDate=p.setMonth(this.activeDate,P-1))},selectDate(P){const U=M.getModelValue(this);if(this._isDisableDate(new Date(P))||U&&p.isSameDay(U,P))return;const Y=this.getDateTimeByOnlyDate(new Date(P));this._emitDate(Y),k.$emit(this,"select-date",Y),this.closeOnSelect&&this.tryClose()},selectDateByItem(){let P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.closeDropdowns(),this.selectDate(P.time)},selectActiveDateAndClose(){this.selectDate(this.activeDate)},selectToday(){this.selectMonth(this.today.getMonth()+1),this.selectYear(this.today.getFullYear()),this._isDisableDate(this.today)||this._emitDate(this.getDateTimeByOnlyDate(p.startOfDay(this.today)))},changeDate(){let P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.activeDate=p.addDays(this.activeDate,P)},changeMonth(){let P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.activeDate=p.addMonths(this.activeDate,P)},changeYear(){let P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.activeDate=p.addYears(this.activeDate,P)},resetValue(){let P;this.originalValue&&(P=this.isShowTime?this.originalValue:p.startOfDay(this.originalValue)),this._emitDate(P)},clearValue(){this._emitDate(void 0),this.close()},hasDot(P){return this.dotsSet.has(P)}}}),C=["aria-labelledby"],h=["syno-id"],c=["title","onClick"],m=["id","syno-id","aria-label"],T={key:0,class:"dot"},D={class:"button-wrapper"},O={class:"left"},N={class:"right"},z=s.createElementVNode("div",{class:"separator"},":",-1),H=s.createElementVNode("div",{class:"separator empty"},null,-1);function $(P,U,Y,Z,X,J){const q=s.resolveComponent("v-icon"),te=s.resolveComponent("v-menu-item"),re=s.resolveComponent("v-menu"),ie=s.resolveComponent("v-portal"),ne=s.resolveComponent("v-button"),le=s.resolveComponent("v-checkbox"),fe=s.resolveComponent("v-single-select"),we=s.resolveComponent("v-trap-focus"),pe=s.resolveDirective("clickoutside"),ve=s.resolveDirective("syno-id");return s.withDirectives((s.openBlock(),s.createBlock(we,{class:s.normalizeClass([P.prefix+"-dropdown","v-select2-dropdown"]),onMousedown:U[21]||(U[21]=be=>be.preventDefault())},{default:s.withCtx(()=>[s.createElementVNode("div",{class:s.normalizeClass(P.prefix+"-date-panel")},[s.createElementVNode("div",{class:s.normalizeClass(P.prefix+"-header")},[s.createElementVNode("div",{class:s.normalizeClass([P.prefix+"-year-picker",{expanded:P.showYear}]),role:"button",ref:"yearBtn",tabindex:"0","aria-haspopup":"listbox",onClick:U[0]||(U[0]=be=>P.toggleYearPicker(be)),onKeydown:U[1]||(U[1]=s.withKeys(s.withModifiers(be=>P.toggleYearPicker(be),["prevent"]),["enter"]))},[s.createTextVNode(s.toDisplayString(P.activeDate.getFullYear())+" ",1),s.createVNode(q,{name:"date-picker-down","svg-icon-set":"set13"}),P.showYear?(s.openBlock(),s.createBlock(ie,{key:0,alignment:"tl->bl","mount-to":P.getContainerEl(),anchor:P.$refs.yearBtn,"acquire-z-index":""},{default:s.withCtx(()=>[s.withDirectives((s.openBlock(),s.createBlock(re,{"syno-id":`${P.synoId}-year-menu`,class:s.normalizeClass([P.prefix+"-inner-panel","year-panel"]),"trigger-action":{closeDropdown:P.closeYearPicker,focusTrigger:P.focusYearPickerButton},"use-scrollbar":"","close-on-select":"",ref:"yearMenu",height:212,width:"auto","auto-focus":P.yearActiveIndex,onMenuClose:P.onYearMenuClose},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(P.years,be=>(s.openBlock(),s.createBlock(te,{onClick:Ee=>P.onYearSelect(be.year),title:be.text.toString(),key:be.year,"syno-id":be.year.toString()},null,8,["onClick","title","syno-id"]))),128))]),_:1},8,["syno-id","class","trigger-action","auto-focus","onMenuClose"])),[[pe,P.closeYearPicker,P.getYearBtn]])]),_:1},8,["mount-to","anchor"])):s.createCommentVNode("",!0)],34),s.createElementVNode("div",{class:s.normalizeClass([P.prefix+"-month-picker",{expanded:P.showMonth}]),role:"button",ref:"monthBtn",tabindex:"0","aria-haspopup":"listbox",onClick:U[2]||(U[2]=be=>P.toggleMonthPicker(be)),onKeydown:U[3]||(U[3]=s.withKeys(s.withModifiers(be=>P.toggleMonthPicker(be),["prevent"]),["enter"]))},[s.createTextVNode(s.toDisplayString(P.months[P.activeDate.getMonth()].text)+" ",1),s.createVNode(q,{name:"date-picker-down","svg-icon-set":"set13"}),P.showMonth?(s.openBlock(),s.createBlock(ie,{key:0,alignment:"tl->bl","mount-to":P.getContainerEl(),anchor:P.$refs.monthBtn,"acquire-z-index":""},{default:s.withCtx(()=>[s.withDirectives((s.openBlock(),s.createBlock(re,{"syno-id":`${P.synoId}-month-menu`,class:s.normalizeClass([P.prefix+"-inner-panel","month-panel"]),"trigger-action":{closeDropdown:P.closeMonthPicker,focusTrigger:P.focusMonthPickerButton},"use-scrollbar":"","close-on-select":"",ref:"monthMenu",height:212,width:"auto","auto-focus":P.monthActiveIndex,onMenuClose:P.onMonthMenuClose},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(P.months,be=>(s.openBlock(),s.createBlock(te,{onClick:Ee=>P.onMonthSelect(be.month),title:be.text.toString(),key:be.month,"syno-id":be.month.toString()},null,8,["onClick","title","syno-id"]))),128))]),_:1},8,["syno-id","class","trigger-action","auto-focus","onMenuClose"])),[[pe,P.closeMonthPicker,P.getMonthBtn]])]),_:1},8,["mount-to","anchor"])):s.createCommentVNode("",!0)],34),(s.openBlock(),s.createBlock(q,{ref:"prevMonthBtn",name:"date-picker-left",key:`prev-month-${P.activeDate.getMonth()}`,class:s.normalizeClass(P.prefix+"-prev-month-btn"),role:"button",tabindex:"0","svg-icon-set":"set13","aria-label":P.ariaLabelLastMonth,onClick:P.onPrevMonthClick,onKeydown:s.withKeys(s.withModifiers(P.onPrevMonthClick,["prevent"]),["enter","native"])},null,8,["class","aria-label","onClick","onKeydown"])),(s.openBlock(),s.createBlock(q,{ref:"nextMonthBtn",name:"date-picker-right",key:`next-month-${P.activeDate.getMonth()}`,class:s.normalizeClass(P.prefix+"-next-month-btn"),role:"button",tabindex:"0","svg-icon-set":"set13","aria-label":P.ariaLabelNextMonth,onClick:P.onNextMonthClick,onKeydown:s.withKeys(s.withModifiers(P.onNextMonthClick,["prevent"]),["enter","native"])},null,8,["class","aria-label","onClick","onKeydown"]))],2),s.createElementVNode("div",{class:s.normalizeClass(P.prefix+"-body")},[s.createElementVNode("table",{ref:"datePicker",class:s.normalizeClass(P.prefix+"-table"),cellspacing:"0",role:"grid",tabindex:"0","aria-labelledby":P.ariaLabelledby,onKeydown:[U[4]||(U[4]=s.withKeys(s.withModifiers(be=>P.changeDate(-1),["exact","prevent"]),["left"])),U[5]||(U[5]=s.withKeys(s.withModifiers(be=>P.changeDate(1),["exact","prevent"]),["right"])),U[6]||(U[6]=s.withKeys(s.withModifiers(be=>P.changeDate(-7),["exact","prevent"]),["up"])),U[7]||(U[7]=s.withKeys(s.withModifiers(be=>P.changeDate(7),["exact","prevent"]),["down"])),U[8]||(U[8]=s.withKeys(s.withModifiers(be=>P.changeMonth(be,-1),["ctrl","prevent"]),["left"])),U[9]||(U[9]=s.withKeys(s.withModifiers(be=>P.changeMonth(be,1),["ctrl","prevent"]),["right"])),U[10]||(U[10]=s.withKeys(s.withModifiers(be=>P.changeYear(-1),["ctrl","prevent","stop"]),["up"])),U[11]||(U[11]=s.withKeys(s.withModifiers(be=>P.changeYear(1),["ctrl","prevent","stop"]),["down"]))],onKeyup:U[12]||(U[12]=s.withKeys(s.withModifiers(be=>P.selectActiveDateAndClose(),["exact","prevent","stop"]),["enter"]))},[s.createElementVNode("thead",null,[s.createElementVNode("tr",null,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(P.week,(be,Ee)=>(s.openBlock(),s.createElementBlock("th",{"syno-id":`${P.synoId}-${be}`,class:s.normalizeClass(P.prefix+"-column-header"),key:Ee},[s.createElementVNode("span",{class:s.normalizeClass(P.prefix+"-column-header-inner")},s.toDisplayString(be),3)],10,h))),128))])]),s.createElementVNode("tbody",{class:s.normalizeClass(P.prefix+"-tbody")},[(s.openBlock(),s.createElementBlock(s.Fragment,null,s.renderList(6,be=>s.createElementVNode("tr",{key:be},[P.dates.length>0?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},s.renderList(7,Ee=>s.createElementVNode("td",{title:P.dates[(be-1)*7+Ee-1].title,class:s.normalizeClass(P.prefix+"-cell"),onClick:Re=>P.selectDateByItem(P.dates[(be-1)*7+Ee-1]),key:`date-${P.dates[(be-1)*7+Ee-1].time}`},[s.renderSlot(P.$slots,`date-${be}-${Ee}`,{},()=>[s.createElementVNode("div",{id:`date-${P.dates[(be-1)*7+Ee-1].time}`,"syno-id":P.getDateSynoId((be-1)*7+Ee-1),class:s.normalizeClass([P.prefix+"-date",P.dates[(be-1)*7+Ee-1].status]),"aria-label":P.getLongDateString(P.dates[(be-1)*7+Ee-1])},[P.hasDot(P.dates[(be-1)*7+Ee-1].time)?(s.openBlock(),s.createElementBlock("i",T)):s.createCommentVNode("",!0),s.createTextVNode(" "+s.toDisplayString(P.dates[(be-1)*7+Ee-1].text),1)],10,m)])],10,c)),64)):s.createCommentVNode("",!0)])),64))],2)],42,C)],2)],2),s.createElementVNode("div",{class:s.normalizeClass(P.prefix+"-footer")},[s.createElementVNode("div",D,[s.createElementVNode("div",O,[P.showTodayButton?(s.openBlock(),s.createBlock(ne,{key:0,"syno-id":`${P.synoId}-today-btn`,disabled:P.isTodayDisabled,onClick:U[13]||(U[13]=s.withModifiers(be=>P.selectToday(be),["stop"]))},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(P.todayText||P._i18n("extlang","todayText")),1)]),_:1},8,["syno-id","disabled"])):s.createCommentVNode("",!0)]),s.createElementVNode("div",N,[P.hasResetButton?(s.openBlock(),s.createBlock(ne,{key:0,"syno-id":`${P.synoId}-reset-btn`,onClick:U[14]||(U[14]=s.withModifiers(be=>P.resetValue(be),["stop"]))},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(P.resetText||P._i18n("common","reset")),1)]),_:1},8,["syno-id"])):P.hasClearButton?(s.openBlock(),s.createBlock(ne,{key:1,"syno-id":`${P.synoId}-clear-btn`,onClick:U[15]||(U[15]=s.withModifiers(be=>P.clearValue(be),["stop"]))},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(P.clearText||P._i18n("common","clean")),1)]),_:1},8,["syno-id"])):s.createCommentVNode("",!0)])]),P.showTime?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(P.prefix+"-time-wrapper")},[P.timeOptional?(s.openBlock(),s.createBlock(le,{key:0,"syno-id":`${P.synoId}-time-checkbox`,value:P.timeChecked,"model-value":P.timeChecked,onInput:U[16]||(U[16]=be=>P.$emit("update:time-checked",be)),"onUpdate:modelValue":U[17]||(U[17]=be=>P.$emit("update:time-checked",be))},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(P.addTimeText||P._i18n("uicommon","add_time")),1)]),_:1},8,["syno-id","value","model-value"])):s.createCommentVNode("",!0),s.createElementVNode("div",{class:s.normalizeClass(P.prefix+"-select-wrapper")},[s.createVNode(fe,{"syno-id":`${P.synoId}-hour-select`,modelValue:P.activeHour,"onUpdate:modelValue":U[18]||(U[18]=be=>P.activeHour=be),name:"hour",editable:"",options:P.hourOptions,"force-selection":"",ref:"hourSelect",class:s.normalizeClass({"enable-24hr":P.enableHour24}),disabled:P.timeOptional&&!P.timeChecked,"custom-dropdown-cls":`${P.prefix}-inner-select-menu`},null,8,["syno-id","modelValue","options","class","disabled","custom-dropdown-cls"]),z,s.createVNode(fe,{"syno-id":`${P.synoId}-min-select`,modelValue:P.activeMinute,"onUpdate:modelValue":U[19]||(U[19]=be=>P.activeMinute=be),name:"minute",editable:"","force-selection":"",options:P.minuteOptions,ref:"minuteSelect",class:s.normalizeClass({"enable-24hr":P.enableHour24}),disabled:P.timeOptional&&!P.timeChecked,"custom-dropdown-cls":`${P.prefix}-inner-select-menu`},null,8,["syno-id","modelValue","options","class","disabled","custom-dropdown-cls"]),P.enableHour24?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[H,s.createVNode(fe,{"syno-id":`${P.synoId}-ampm-select`,modelValue:P.activeAmPm,"onUpdate:modelValue":U[20]||(U[20]=be=>P.activeAmPm=be),name:"ampm",readonly:"true",options:P.ampmOptions,ref:"ampmSelect",disabled:P.timeOptional&&!P.timeChecked,"custom-dropdown-cls":`${P.prefix}-inner-select-menu`},null,8,["syno-id","modelValue","options","disabled","custom-dropdown-cls"])],64))],2)],2)):s.createCommentVNode("",!0)],2)]),_:3},8,["class"])),[[ve]])}var V=l.default(I,[["render",$]]);x.default=V}(O2)),O2}var vY;function gee(){return vY||(vY=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Ni(),k=ln(),F=_i(),B=Ru(),G=pT(),E=ci(),A=Tl(),u=xl(),o=fr(),S=Db(),_=gT(),p=y5(),f=Ur(),y=Kt(),d=Dr(),v=vr(),b=kr(),s=Ob,l=ht(),w=St();v.register("date-picker-calendar",b.vIconCalendar);const I=l.defineComponent({name:"DatePicker",directives:{clickoutside:B.default},components:{vDatePickerMenu:G.default},mixins:[E.default,A.default,o.provide("date-picker"),u.default,v.default],props:{...F.omit(G.default.props,["isOpen","timeChecked"]),[M.componentsProps.value()]:{type:Date,default:void 0},timeOptional:{type:Boolean,default:!0},showTime:{type:Boolean,default:!1},defaultTimeChecked:{type:Boolean,default:!1},placeholder:{type:String,default:()=>""},dateFormat:{type:String,default:S.dateFormats[0]},timeFormat:{type:String,default:S.timeFormats[0]},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},editable:{type:Boolean,default:!1},name:{type:String,default:void 0},align:{type:String,default:"tl->bl"},dropdownOffset:{type:Array,default:()=>[0,0]},showResetButton:{type:Boolean,default:!0},showClearButton:{type:Boolean,default:!0},showTodayButton:{type:Boolean,default:!0},dateDots:{type:Array,default:()=>[]},closeOnSelect:{type:Boolean,default:void 0}},emits:["change","select-date","text-changed","update:model-value","input","menu-shown","menu-hidden"],data(){return{show:!1,isFocused:!1,timeChecked:this.defaultTimeChecked,label:void 0,validateByField:{event:"text-changed"}}},computed:{innerValue(){return M.getModelValue(this)},_closeOnSelect(){return y.isBoolean(this.closeOnSelect)?this.closeOnSelect:!this.showTime},prefix(){return"v-dt"},isTimeVisible(){return this.showTime&&(this.timeOptional&&this.timeChecked||!this.timeOptional)},wrapCls(){return[`${this.prefix}-picker v-select2-wrapper`,{disabled:this.disabled},{focused:this.isFocused},{pressed:this.show}]},inputCls(){return[`${this.prefix}-input`,"v-select2-input"]},innerMinTime(){const m=[];if(this.yearsRange){const T=new Date(this.yearsRange[0],0,1);m.push(T)}if(this.minTime){const T=s.startOfDay(this.minTime);m.push(T)}return new Date(Math.max(...m.map(T=>T.getTime())))},innerMaxTime(){const m=[];if(this.yearsRange){const T=new Date(this.yearsRange[1]+1,0,0);m.push(T)}if(this.maxTime){const T=s.endOfDay(this.maxTime);m.push(T)}return new Date(Math.min(...m.map(T=>T.getTime())))},alignment(){return{pos:this.align,offset:this.dropdownOffset}}},watch:{show:{async handler(m){m===!0?(k.$emit(this,"menu-shown"),await this.$nextTick(),this.$refs.dropdown.focusDatePickerTable()):(k.$emit(this,"menu-hidden"),this.$refs.input&&this.$refs.input.focus())},immediate:!0},[M.componentsProps.value()]:{handler(m){this.updateLabel()},immediate:!0},isTimeVisible:{handler(m){this.updateLabel()},immediate:!0},dateFormat:{handler(m){this.updateLabel()}},timeFormat:{handler(m){this.updateLabel()}}},mounted(){this.editable&&this.showTime&&f.consoleError("Cannot set `editable` with `showTime` together, this is violate ux guideline",this)},methods:{onClick(){this.editable||this.toggleDialog()},updateLabel(){this.innerValue?this.label=this.isTimeVisible?p.toDateTimeString(this.innerValue,this.dateFormat,this.timeFormat):p.toDateString(this.innerValue,this.dateFormat):this.label=""},getExtraElements(){return[this.$refs.dropdown]},selectInput(){this.$refs.input&&this.$refs.input.select()},toggleDialog(){this.show?this.closeDialog():this.openDialog()},openDialog(){this.show=!0},closeDialog(){this.show=!1},updateDialogOpenState(m){this.show=m},onInput(m){this.show&&this.closeDialog(),k.$emit(this,"text-changed",m)},register(m){(arguments.length>1&&arguments[1]!==void 0?arguments[1]:()=>{})(this)},unregister(m){(arguments.length>1&&arguments[1]!==void 0?arguments[1]:()=>{})(this)},parseString(m){return _.parseStringToDate(m,this.dateFormat,this.isTimeVisible?this.timeFormat:void 0)},onBlur(m){const T=d.getFocusElement(m);this.isFocused=!1;let D=null;this.$refs.dropdown&&this.$refs.dropdown.$el.contains(T)||this.$el.contains(T)||!this.$refs.input||this.label&&(D=this.parseString(this.label),D===!1)||(k.$emit(this,M.getModelEventName(this),D),k.$emit(this,"change",D))},validate(m){const T=this.$refs.input&&this.$refs.input.value;if(!T){if(this.allowBlank)return;throw{errors:[{message:y.formatString(this._i18n("extlang","fieldblank"),this.$refs.input.value,this.dateFormat)}]}}const D=this.parseString(T);if(D===!1)throw{errors:[{message:y.formatString(this._i18n("extlang","invaliddate"),this.$refs.input.value,this.dateFormat)}]};if(D.getTime()<this.innerMinTime.getTime())throw{errors:[{message:y.formatString(this._i18n("error","error_invalid_min_date"),p.toDateString(this.innerMinTime,this.dateFormat))}]};if(D.getTime()>this.innerMaxTime.getTime())throw{errors:[{message:y.formatString(this._i18n("error","error_invalid_max_date"),p.toDateString(this.innerMaxTime,this.dateFormat))}]}}}}),C=["disabled","readonly","name","placeholder"];function h(m,T,D,O,N,z){const H=l.resolveComponent("v-icon"),$=l.resolveComponent("v-date-picker-menu"),V=l.resolveComponent("v-portal"),P=l.resolveDirective("syno-id"),U=l.resolveDirective("clickoutside");return l.withDirectives((l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(m.wrapCls)},[l.withDirectives(l.createElementVNode("input",{ref:"input",class:l.normalizeClass(m.inputCls),disabled:m.disabled,readonly:!m.editable,name:m.name,"onUpdate:modelValue":T[0]||(T[0]=Y=>m.label=Y),placeholder:m.placeholder,onClick:T[1]||(T[1]=function(){return m.onClick&&m.onClick(...arguments)}),onInput:T[2]||(T[2]=function(){return m.onInput&&m.onInput(...arguments)}),onKeyup:T[3]||(T[3]=l.withKeys(l.withModifiers(Y=>m.toggleDialog(),["prevent"]),["down"])),onFocus:T[4]||(T[4]=Y=>m.isFocused=!0),onBlur:T[5]||(T[5]=function(){return m.onBlur&&m.onBlur(...arguments)})},null,42,C),[[l.vModelText,m.label],[P]]),l.createVNode(H,{name:"date-picker-calendar",class:"v-dt-dropdown-icon v-select2-dropdown-icon","svg-icon-set":"set12",disabled:m.disabled,onClick:T[6]||(T[6]=Y=>!m.disabled&&m.toggleDialog())},null,8,["disabled"]),m.show?(l.openBlock(),l.createBlock(V,{key:0,"mount-to":m.getContainerEl(),"acquire-z-index":"",alignment:m.alignment,anchor:m.$el},{default:l.withCtx(()=>[l.createVNode($,{ref:"dropdown","use-adaptive-container":m.useAdaptiveContainer,"popup-container":m.popupContainer,"syno-id":`${m.synoId}-menu`,"time-checked":m.timeChecked,"onUpdate:timeChecked":T[7]||(T[7]=Y=>m.timeChecked=Y),"enable-hour24":m.enableHour24,"time-optional":m.timeOptional,"today-text":m.todayText,"reset-text":m.resetText,"add-time-text":m.addTimeText,"clear-text":m.clearText,"allow-blank":m.allowBlank,"show-time":m.showTime,"max-time":m.innerMaxTime,"min-time":m.innerMinTime,"years-range":m.yearsRange,"model-value":m.innerValue,value:m.innerValue,"show-clear-button":m.showClearButton,"show-reset-button":m.showResetButton,"show-today-button":m.showTodayButton,"date-dots":m.dateDots,"is-disable-date":m.isDisableDate,"today-disabled":m.todayDisabled,"close-on-select":m._closeOnSelect,onInput:T[8]||(T[8]=Y=>m.$emit("input",Y)),"onUpdate:modelValue":T[9]||(T[9]=Y=>m.$emit("update:model-value",Y)),onChange:T[10]||(T[10]=Y=>m.$emit("change",Y)),onSelectDate:T[11]||(T[11]=Y=>m.$emit("select-date",Y)),onKeydown:l.withKeys(l.withModifiers(m.closeDialog,["prevent"]),["native","esc"]),"onUpdate:isOpen":m.updateDialogOpenState},null,8,["use-adaptive-container","popup-container","syno-id","time-checked","enable-hour24","time-optional","today-text","reset-text","add-time-text","clear-text","allow-blank","show-time","max-time","min-time","years-range","model-value","value","show-clear-button","show-reset-button","show-today-button","date-dots","is-disable-date","today-disabled","close-on-select","onKeydown","onUpdate:isOpen"])]),_:1},8,["mount-to","alignment","anchor"])):l.createCommentVNode("",!0)],2)),[[U,m.closeDialog,void 0,{children:!0}]])}var c=w.default(I,[["render",h]]);x.default=c}(D2)),D2}var N2={},yY;function w5(){return yY||(yY=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Xn(),k=ln(),F=_i(),B=Si(),G=Ux(),E=Dr(),A=Kt(),u=ht(),o=u.defineComponent({name:"DragTarget",props:{getDragZone:{type:Function,default:void 0},payload:{type:Object,default:()=>({})},dragProps:{type:Object,default:()=>({})},autoScrollElement:{type:[Boolean,HTMLElement],default:!1}},emits:["drag-enter","drag-over","drag-out","drag","before-drag","before-drop","before-drag-out","before-drag-over","before-drag-enter","drop","valid-drop","invalid-drop","start-drag","end-drag"],computed:{mergedDragProps(){var S=this;return F.merge({onDragEnter:function(){for(var _=arguments.length,p=new Array(_),f=0;f<_;f++)p[f]=arguments[f];k.$emit(S,"drag-enter",...p)},onDragOver:function(){for(var _=arguments.length,p=new Array(_),f=0;f<_;f++)p[f]=arguments[f];k.$emit(S,"drag-over",...p)},onDragOut:function(){for(var _=arguments.length,p=new Array(_),f=0;f<_;f++)p[f]=arguments[f];k.$emit(S,"drag-out",...p)},onDrag:function(){for(var _=arguments.length,p=new Array(_),f=0;f<_;f++)p[f]=arguments[f];k.$emit(S,"drag",...p)},onBeforeDrag:function(){for(var _=arguments.length,p=new Array(_),f=0;f<_;f++)p[f]=arguments[f];k.$emit(S,"before-drag",...p)},onBeforeDrop:function(){for(var _=arguments.length,p=new Array(_),f=0;f<_;f++)p[f]=arguments[f];k.$emit(S,"before-drop",...p)},onBeforeDragOut:function(){for(var _=arguments.length,p=new Array(_),f=0;f<_;f++)p[f]=arguments[f];k.$emit(S,"before-drag-out",...p)},onBeforeDragOver:function(){for(var _=arguments.length,p=new Array(_),f=0;f<_;f++)p[f]=arguments[f];k.$emit(S,"before-drag-over",...p)},onBeforeDragEnter:function(){for(var _=arguments.length,p=new Array(_),f=0;f<_;f++)p[f]=arguments[f];k.$emit(S,"before-drag-enter",...p)},onDrop:function(){for(var _=arguments.length,p=new Array(_),f=0;f<_;f++)p[f]=arguments[f];k.$emit(S,"drop",...p)},onValidDrop:function(){for(var _=arguments.length,p=new Array(_),f=0;f<_;f++)p[f]=arguments[f];k.$emit(S,"valid-drop",...p)},onInvalidDrop:function(){for(var _=arguments.length,p=new Array(_),f=0;f<_;f++)p[f]=arguments[f];k.$emit(S,"invalid-drop",...p)},startDrag:function(){for(var _=arguments.length,p=new Array(_),f=0;f<_;f++)p[f]=arguments[f];k.$emit(S,"start-drag",...p)},endDrag:function(){for(var _=arguments.length,p=new Array(_),f=0;f<_;f++)p[f]=arguments[f];k.$emit(S,"end-drag",...p)},ghostCls:"v-dd-target",getTargetContent:()=>this.$el.outerHTML},this.dragProps)}},async mounted(){this.createDDTarget()},[M.componentHooks.beforeUnmount](){this.removeDDTarget()},methods:{getDragTarget(){return this.ddTarget},createDDTarget(){this.$el&&(this.ddTarget=new this.$DragDropTarget(this.$el,this.mergedDragProps,this.payload),this.$ddm.registerDragTarget(this.ddTarget),this.getDragZone&&this.autoRegisterDragZone(),this.autoScrollElement===!0?this.autoRegisterScrollElement():A.isElement(this.autoScrollElement)&&this.setAutoScrollElement(this.autoScrollElement))},autoRegisterDragZone(){const S=this.getDragZone?.();S&&this.registerDragZone(S)},autoRegisterScrollElement(){const S=E.getScrollContainer(this.$el);this.setAutoScrollElement(S)},removeDDTarget(){this.ddTarget&&(this.$ddm.destroyDragTarget(this.ddTarget),delete this.ddTarget)},registerDragZone(S){const _=S.getDragZone?.()??S;this.ddTarget.registerDragZone(_)},setAutoScrollElement(S){this.ddTarget.setAutoScrollElement(S)}},render(){return G.ensureOnlyChild(B.getSlots(this)?.default?.())}});x.default=o}(N2)),N2}var P2={},wY;function pee(){return wY||(wY=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Xn(),k=ln(),F=Si(),B=Ux(),G=_i(),E=ht(),A=E.defineComponent({name:"DragZone",props:{payload:{type:Object,default:()=>({})},dragProps:{type:Object,default:()=>({})}},emits:["enter","drop","over","out","valid-drop","invalid-drop"],computed:{mergedDragProps(){var u=this;return G.merge({notifyEnter:function(){for(var o=arguments.length,S=new Array(o),_=0;_<o;_++)S[_]=arguments[_];k.$emit(u,"enter",...S)},notifyDrop:function(){for(var o=arguments.length,S=new Array(o),_=0;_<o;_++)S[_]=arguments[_];k.$emit(u,"drop",...S)},notifyOver:function(){for(var o=arguments.length,S=new Array(o),_=0;_<o;_++)S[_]=arguments[_];k.$emit(u,"over",...S)},notifyOut:function(){for(var o=arguments.length,S=new Array(o),_=0;_<o;_++)S[_]=arguments[_];k.$emit(u,"out",...S)},notifyValidDrop:function(){for(var o=arguments.length,S=new Array(o),_=0;_<o;_++)S[_]=arguments[_];k.$emit(u,"valid-drop",...S)},notifyInvalidDrop:function(){for(var o=arguments.length,S=new Array(o),_=0;_<o;_++)S[_]=arguments[_];k.$emit(u,"invalid-drop",...S)},order:10},this.dragProps)}},mounted(){this.createDragZone()},[M.componentHooks.beforeUnmount](){this.removeDragZone()},methods:{createDragZone(){this.dragZone=new this.$DragZone(this.$el,this.mergedDragProps,this.payload)},removeDragZone(){delete this.dragZone},getDragZone(){return this.dragZone}},render(){return B.ensureOnlyChild(F.getSlots(this)?.default?.())}});x.default=A}(P2)),P2}var B2={},bY;function mee(){return bY||(bY=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Xn(),k=ln(),F=Kt(),B=ht(),G=St();function E(d,v,b){let s=d;const l=["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"].find(w=>F.isFunction(s[w]));if(!F.isFunction(s[l]))return!1;do{if(s[l](v))return!0;if(s===b)return!1;s=s.parentNode}while(s);return!1}const A={mouse:{move:"mousemove",stop:"mouseup"},touch:{start:"touchstart",move:"touchmove",stop:"touchend"}},u={userSelect:"none",MozUserSelect:"none",WebkitUserSelect:"none",MsUserSelect:"none"},o={userSelect:"auto",MozUserSelect:"auto",WebkitUserSelect:"auto",MsUserSelect:"auto"};let S=A.mouse;const _=B.defineComponent({replace:!0,name:"DraggableResizable",props:{debug:{type:Boolean,default:!1},className:{type:String,default:"vdr"},classNameDraggable:{type:String,default:"draggable"},classNameResizable:{type:String,default:"resizable"},classNameDragging:{type:String,default:"dragging"},classNameResizing:{type:String,default:"resizing"},classNameActive:{type:String,default:"active"},classNameHandle:{type:String,default:"v-handle"},disableUserSelect:{type:Boolean,default:!0},enableNativeDrag:{type:Boolean,default:!1},preventDeactivation:{type:Boolean,default:!1},active:{type:Boolean,default:!1},draggable:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},lockAspectRatio:{type:Boolean,default:!1},w:{type:Number,default:200,validator:d=>d>0},h:{type:Number,default:200,validator:d=>d>0},minWidth:{type:Number,default:0,validator:d=>d>=0},minHeight:{type:Number,default:0,validator:d=>d>=0},maxWidth:{type:Number,default:null,validator:d=>d>=0},maxHeight:{type:Number,default:null,validator:d=>d>=0},x:{type:Number,default:0,validator:d=>typeof d=="number"},y:{type:Number,default:0,validator:d=>typeof d=="number"},z:{type:[String,Number],default:"auto",validator:d=>typeof d=="string"?d==="auto":d>=0},handles:{type:Array,default:()=>["tl","tm","tr","mr","br","bm","bl","ml"],validator:d=>{const v=new Set(["tl","tm","tr","mr","br","bm","bl","ml"]);return new Set(d.filter(b=>v.has(b))).size===d.length}},dragHandle:{type:String,default:null},dragCancel:{type:String,default:null},axis:{type:String,default:"both",validator:d=>["x","y","both"].includes(d)},grid:{type:Array,default:()=>[1,1]},parent:{type:[Boolean,String],default:!1},onDragStart:{type:Function,default:null},onResizeStart:{type:Function,default:null}},emits:["update:active","dragging","resizing","resizestop","dragstop","activated","deactivated"],data(){return{rawWidth:this.w,rawHeight:this.h,rawLeft:this.x,rawTop:this.y,rawRight:null,rawBottom:null,left:this.x,top:this.y,right:null,bottom:null,aspectFactor:this.w/this.h,parentWidth:null,parentHeight:null,minW:this.minWidth,minH:this.minHeight,maxW:this.maxWidth,maxH:this.maxHeight,handle:null,enabled:this.active,resizing:!1,dragging:!1,zIndex:this.z}},computed:{style(){let d={top:`${this.top}px`,left:`${this.left}px`,zIndex:this.zIndex,...this.dragging&&this.disableUserSelect?u:o};return this.draggable&&(d.position="absolute"),this.resizable&&this.actualHandles.forEach(v=>{(v.includes("b")||v.includes("t"))&&(d.height=`${this.height}px`),(v.includes("l")||v.includes("r"))&&(d.width=`${this.width}px`)}),d},actualHandles(){return this.resizable?this.handles:[]},width(){return this.parentWidth-this.left-this.right},height(){return this.parentHeight-this.top-this.bottom},resizingOnX(){return!!this.handle&&(this.handle.includes("l")||this.handle.includes("r"))},resizingOnY(){return!!this.handle&&(this.handle.includes("t")||this.handle.includes("b"))},isCornerHandle(){return!!this.handle&&["tl","tr","br","bl"].includes(this.handle)}},watch:{active(d){this.enabled=d,d?k.$emit(this,"activated"):k.$emit(this,"deactivated")},z(d){(d>=0||d==="auto")&&(this.zIndex=d)},rawLeft(d){const v=this.bounds,b=this.aspectFactor,s=this.lockAspectRatio,l=this.left,w=this.top;v.minLeft!==null&&d<v.minLeft?d=v.minLeft:v.maxLeft!==null&&v.maxLeft<d&&(d=v.maxLeft),s&&this.resizingOnX&&(this.rawTop=w-(l-d)/b),this.left=d},rawRight(d){const v=this.bounds,b=this.aspectFactor,s=this.lockAspectRatio,l=this.right,w=this.bottom;v.minRight!==null&&d<v.minRight?d=v.minRight:v.maxRight!==null&&v.maxRight<d&&(d=v.maxRight),s&&this.resizingOnX&&(this.rawBottom=w-(l-d)/b),this.right=d},rawTop(d){const v=this.bounds,b=this.aspectFactor,s=this.lockAspectRatio,l=this.left,w=this.top;v.minTop!==null&&d<v.minTop?d=v.minTop:v.maxTop!==null&&v.maxTop<d&&(d=v.maxTop),s&&this.resizingOnY&&(this.rawLeft=l-(w-d)*b),this.top=d},rawBottom(d){const v=this.bounds,b=this.aspectFactor,s=this.lockAspectRatio,l=this.right,w=this.bottom;v.minBottom!==null&&d<v.minBottom?d=v.minBottom:v.maxBottom!==null&&v.maxBottom<d&&(d=v.maxBottom),s&&this.resizingOnY&&(this.rawRight=l-(w-d)*b),this.bottom=d},x(){if(this.resizing||this.dragging)return;this.parent&&(this.bounds=this.calcDragLimits());const d=this.x-this.left;d%this.grid[0]===0&&(this.rawLeft=this.x,this.rawRight=this.right-d)},y(){if(this.resizing||this.dragging)return;this.parent&&(this.bounds=this.calcDragLimits());const d=this.y-this.top;d%this.grid[1]===0&&(this.rawTop=this.y,this.rawBottom=this.bottom-d)},lockAspectRatio(d){d?this.aspectFactor=this.width/this.height:this.aspectFactor=void 0},minWidth(d){d>0&&d<=this.width&&(this.minW=d)},minHeight(d){d>0&&d<=this.height&&(this.minH=d)},maxWidth(d){this.maxW=d},maxHeight(d){this.maxH=d},w(){if(this.resizing||this.dragging)return;this.parent&&(this.bounds=this.calcResizeLimits());const d=this.width-this.w;d%this.grid[0]===0&&(this.rawRight=this.right+d)},h(){if(this.resizing||this.dragging)return;this.parent&&(this.bounds=this.calcResizeLimits());const d=this.height-this.h;d%this.grid[1]===0&&(this.rawBottom=this.bottom+d)}},created:function(){this.resetBoundsAndMouseState()},mounted(){this.enableNativeDrag||(this.$el.ondragstart=()=>!1),[this.parentWidth,this.parentHeight]=this.getParentSize(),this.rawRight=this.parentWidth-this.rawWidth-this.rawLeft,this.rawBottom=this.parentHeight-this.rawHeight-this.rawTop,document.body.addEventListener("mousedown",this.deselect),document.body.addEventListener("touchend",this.deselect),document.body.addEventListener("touchcancel",this.deselect),window.addEventListener("resize",this.checkParentSize)},[M.componentHooks.beforeUnmount](){document.body.removeEventListener("mousedown",this.deselect),document.body.removeEventListener("touchstart",this.handleUp),document.body.removeEventListener("mousemove",this.move),document.body.removeEventListener("touchmove",this.move),document.body.removeEventListener("mouseup",this.handleUp),document.body.removeEventListener("tochend",this.deselect),document.body.removeEventListener("touchcancel",this.deselect),window.removeEventListener("resize",this.checkParentSize)},methods:{resetBoundsAndMouseState(){this.mouseClickPosition={mouseX:0,mouseY:0,x:0,y:0,w:0,h:0,top:0,left:0},this.bounds={minLeft:null,maxLeft:null,minRight:null,maxRight:null,minTop:null,maxTop:null,minBottom:null,maxBottom:null}},checkParentSize(){if(this.parent){const[d,v]=this.getParentSize(),b=this.parentWidth-d,s=this.parentHeight-v;this.rawRight-=b,this.rawBottom-=s,this.parentWidth=d,this.parentHeight=v}},getParentSize(){const d=this.parent;if(d===!0){const v=this.$el.parentNode,b=window.getComputedStyle(v,null);let s=parseInt(b.getPropertyValue("width"),10),l=parseInt(b.getPropertyValue("height"),10);return s=isNaN(s)?v.offsetWidth:s,l=isNaN(l)?v.offsetHeight:l,[s,l]}if(typeof d=="string"){const v=document.querySelector(d);if(!(v instanceof HTMLElement))throw new Error(`The selector ${d} does not match any element`);return[v.offsetWidth,v.offsetHeight]}return[null,null]},elementTouchDown(d){S=A.touch,this.elementDown(d)},elementDown(d){const v=d.target||d.srcElement;if(this.$el.contains(v)){if(this.onDragStart&&this.onDragStart(d)===!1||this.dragHandle&&!E(v,this.dragHandle,this.$el)||this.dragCancel&&E(v,this.dragCancel,this.$el))return;this.enabled||(this.enabled=!0,k.$emit(this,"activated"),k.$emit(this,"update:active",!0)),this.draggable&&(this.dragging=!0),this.mouseClickPosition.mouseX=d.touches?d.touches[0].pageX:d.pageX,this.mouseClickPosition.mouseY=d.touches?d.touches[0].pageY:d.pageY,this.mouseClickPosition.left=this.left,this.mouseClickPosition.right=this.right,this.mouseClickPosition.top=this.top,this.mouseClickPosition.bottom=this.bottom,this.parent&&(this.bounds=this.calcDragLimits()),document.body.addEventListener(S.move,this.move),document.body.addEventListener(S.stop,this.handleUp)}},calcDragLimits(){return{minLeft:(this.parentWidth+this.left)%this.grid[0],maxLeft:Math.floor((this.parentWidth-this.width-this.left)/this.grid[0])*this.grid[0]+this.left,minRight:(this.parentWidth+this.right)%this.grid[0],maxRight:Math.floor((this.parentWidth-this.width-this.right)/this.grid[0])*this.grid[0]+this.right,minTop:(this.parentHeight+this.top)%this.grid[1],maxTop:Math.floor((this.parentHeight-this.height-this.top)/this.grid[1])*this.grid[1]+this.top,minBottom:(this.parentHeight+this.bottom)%this.grid[1],maxBottom:Math.floor((this.parentHeight-this.height-this.bottom)/this.grid[1])*this.grid[1]+this.bottom}},deselect(d){const v=d.target||d.srcElement,b=new RegExp(this.className+"-([trmbl]{2})","");!this.$el.contains(v)&&!b.test(v.className)&&(this.enabled&&!this.preventDeactivation&&(this.enabled=!1,k.$emit(this,"deactivated"),k.$emit(this,"update:active",!1)),document.body.removeEventListener(S.move,this.handleMove))},handleTouchDown(d,v){S=A.touch,this.handleDown(d,v)},handleDown(d,v){this.onResizeStart&&this.onResizeStart(d,v)===!1||(v.stopPropagation&&v.stopPropagation(),this.lockAspectRatio&&!d.includes("m")?this.handle="m"+d.substring(1):this.handle=d,this.resizing=!0,this.mouseClickPosition.mouseX=v.touches?v.touches[0].pageX:v.pageX,this.mouseClickPosition.mouseY=v.touches?v.touches[0].pageY:v.pageY,this.mouseClickPosition.left=this.left,this.mouseClickPosition.right=this.right,this.mouseClickPosition.top=this.top,this.mouseClickPosition.bottom=this.bottom,this.bounds=this.calcResizeLimits(),document.body.addEventListener(S.move,this.handleMove),document.body.addEventListener(S.stop,this.handleUp))},calcResizeLimits(){let d=this.minW,v=this.minH,b=this.maxW,s=this.maxH;const l=this.aspectFactor,[w,I]=this.grid,C=this.width,h=this.height,c=this.left,m=this.top,T=this.right,D=this.bottom;this.lockAspectRatio&&(d/v>l?v=d/l:d=l*v,b&&s?(b=Math.min(b,l*s),s=Math.min(s,b/l)):b?s=b/l:s&&(b=l*s)),b=b-b%w,s=s-s%I;const O={minLeft:null,maxLeft:null,minTop:null,maxTop:null,minRight:null,maxRight:null,minBottom:null,maxBottom:null};return this.parent?(O.minLeft=(this.parentWidth+c)%w,O.maxLeft=c+Math.floor((C-d)/w)*w,O.minTop=(this.parentHeight+m)%I,O.maxTop=m+Math.floor((h-v)/I)*I,O.minRight=(this.parentWidth+T)%w,O.maxRight=T+Math.floor((C-d)/w)*w,O.minBottom=(this.parentHeight+D)%I,O.maxBottom=D+Math.floor((h-v)/I)*I,b&&(O.minLeft=Math.max(O.minLeft,this.parentWidth-T-b),O.minRight=Math.max(O.minRight,this.parentWidth-c-b)),s&&(O.minTop=Math.max(O.minTop,this.parentHeight-D-s),O.minBottom=Math.max(O.minBottom,this.parentHeight-m-s)),this.lockAspectRatio&&(O.minLeft=Math.max(O.minLeft,c-m*l),O.minTop=Math.max(O.minTop,m-c/l),O.minRight=Math.max(O.minRight,T-D*l),O.minBottom=Math.max(O.minBottom,D-T/l))):(O.minLeft=null,O.maxLeft=c+Math.floor((C-d)/w)*w,O.minTop=null,O.maxTop=m+Math.floor((h-v)/I)*I,O.minRight=null,O.maxRight=T+Math.floor((C-d)/w)*w,O.minBottom=null,O.maxBottom=D+Math.floor((h-v)/I)*I,b&&(O.minLeft=-(T+b),O.minRight=-(c+b)),s&&(O.minTop=-(D+s),O.minBottom=-(m+s)),this.lockAspectRatio&&b&&s&&(O.minLeft=Math.min(O.minLeft,-(T+b)),O.minTop=Math.min(O.minTop,-(s+D)),O.minRight=Math.min(O.minRight,-c-b),O.minBottom=Math.min(O.minBottom,-m-s))),O},move(d){this.resizing?this.handleMove(d):this.dragging&&this.elementMove(d)},elementMove(d){const v=this.axis,b=this.mouseClickPosition,s=v&&v!=="y"?b.mouseX-(d.touches?d.touches[0].pageX:d.pageX):0,l=v&&v!=="x"?b.mouseY-(d.touches?d.touches[0].pageY:d.pageY):0,[w,I]=this.snapToGrid(this.grid,s,l);!w&&!I||(this.rawTop=b.top-I,this.rawBottom=b.bottom+I,this.rawLeft=b.left-w,this.rawRight=b.right+w,k.$emit(this,"dragging",this.left,this.top))},handleMove(d){const v=this.handle,b=this.mouseClickPosition,s=b.mouseX-(d.touches?d.touches[0].pageX:d.pageX),l=b.mouseY-(d.touches?d.touches[0].pageY:d.pageY),[w,I]=this.snapToGrid(this.grid,s,l);!w&&!I||(v.includes("b")?this.rawBottom=b.bottom+I:v.includes("t")&&(this.rawTop=b.top-I),v.includes("r")?this.rawRight=b.right+w:v.includes("l")&&(this.rawLeft=b.left-w),k.$emit(this,"resizing",this.left,this.top,this.width,this.height))},handleUp(d){this.handle=null,this.resetBoundsAndMouseState(),this.rawTop=this.top,this.rawBottom=this.bottom,this.rawLeft=this.left,this.rawRight=this.right,this.resizing&&(this.resizing=!1,k.$emit(this,"resizestop",this.left,this.top,this.width,this.height)),this.dragging&&(this.dragging=!1,k.$emit(this,"dragstop",this.left,this.top)),document.body.removeEventListener(S.move,this.handleMove)},snapToGrid(d,v,b){const s=Math.round(v/d[0])*d[0],l=Math.round(b/d[1])*d[1];return[s,l]}}}),p=["onMousedown","onTouchstart"];function f(d,v,b,s,l,w){const I=B.resolveDirective("syno-id");return B.withDirectives((B.openBlock(),B.createElementBlock("div",{style:B.normalizeStyle(d.style),class:B.normalizeClass([{[d.classNameActive]:d.enabled,[d.classNameDragging]:d.dragging,[d.classNameResizing]:d.resizing,[d.classNameDraggable]:d.draggable,[d.classNameResizable]:d.resizable},d.className]),onMousedown:v[0]||(v[0]=function(){return d.elementDown&&d.elementDown(...arguments)}),onTouchstart:v[1]||(v[1]=function(){return d.elementTouchDown&&d.elementTouchDown(...arguments)})},[(B.openBlock(!0),B.createElementBlock(B.Fragment,null,B.renderList(d.actualHandles,C=>(B.openBlock(),B.createElementBlock("div",{key:C,class:B.normalizeClass([d.classNameHandle,d.classNameHandle+"-"+C]),style:B.normalizeStyle({display:d.enabled?"block":"none"}),onMousedown:B.withModifiers(h=>d.handleDown(C,h),["stop","prevent"]),onTouchstart:B.withModifiers(h=>d.handleTouchDown(C,h),["stop","prevent"])},[B.renderSlot(d.$slots,C)],46,p))),128)),B.renderSlot(d.$slots,"default")],38)),[[I]])}var y=G.default(_,[["render",f]]);x.default=y}(B2)),B2}var L2={},F2={},CY;function b5(){return CY||(CY=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=ln(),k=vr(),F=kr(),B=ht(),G=St();k.register("edit-menu-more",F.vIconEditMenuMore);const E=B.defineComponent({name:"EditMenuItem",mixins:[k.default],props:{hasMore:{type:Boolean,default:!1}},emits:["click"],data(){return{}},computed:{wrapperCls(){return["v-edit-menu-item",{"has-more":this.hasMore}]}},methods:{onClick(_){M.$emit(this,"click",_)}}}),A={class:"edit-menu-text"},u={key:0,class:"more-btn-wrapper"};function o(_,p,f,y,d,v){const b=B.resolveComponent("v-icon");return B.openBlock(),B.createElementBlock("div",{class:B.normalizeClass(_.wrapperCls),onClick:p[0]||(p[0]=function(){return _.onClick&&_.onClick(...arguments)})},[B.createElementVNode("span",A,[B.renderSlot(_.$slots,"default")]),_.hasMore?(B.openBlock(),B.createElementBlock("div",u,[B.createVNode(b,{size:"thin-rect",name:"edit-menu-more","svg-icon-set":"set02"})])):B.createCommentVNode("",!0)],2)}var S=G.default(E,[["render",o]]);x.default=S}(F2)),F2}var _Y;function vee(){return _Y||(_Y=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=ln(),k=wa(),F=fr(),B=Kt(),G=b5(),E=ht(),A=St();const u=E.defineComponent({name:"EditMenu",components:{vEditMenuItem:G.default,vScrollbar:k.default},mixins:[F.provide("edit-menu")],props:{items:{type:Array,default:()=>[]}},emits:["click-item","switch-items","switch-items"],data(){return{reachRight:!1,reachLeft:!1,innerItems:[]}},computed:{wrapperCls(){return["v-edit-menu"]}},watch:{items:{handler(f){this.innerItems=f},immediate:!0}},methods:{useSlot(f){if(B.isDefined(f.useSlot))return!!f.useSlot},getSlot(f){return f.useSlot},onReachRight(f){this.reachRight=f},onReachLeft(f){this.reachLeft=f},onReachCenter(){this.reachRight=!1,this.reachLeft=!1},onClickItem(f){f.subItems&&(this.innerItems=f.subItems),M.$emit(this,"click-item",f),M.$emit(this,"switch-items",f.subItems)}}}),o={key:0,class:"prev-filter gradient-filter"},S={key:1,class:"next-filter gradient-filter"};function _(f,y,d,v,b,s){const l=E.resolveComponent("v-edit-menu-item"),w=E.resolveComponent("v-scrollbar");return f.innerItems.length>0?(E.openBlock(),E.createElementBlock("div",{key:0,class:E.normalizeClass(f.wrapperCls)},[E.createVNode(w,{"show-x-rail":!1,onReachRight:y[0]||(y[0]=I=>f.onReachRight(!0)),onReachLeft:y[1]||(y[1]=I=>f.onReachLeft(!0)),onNotReachRight:y[2]||(y[2]=I=>f.onReachRight(!1)),onNotReachLeft:y[3]||(y[3]=I=>f.onReachLeft(!1)),"inner-class":"edit-menu-scrollbar-inner"},{default:E.withCtx(()=>[(E.openBlock(!0),E.createElementBlock(E.Fragment,null,E.renderList(f.innerItems,I=>(E.openBlock(),E.createElementBlock(E.Fragment,null,[f.useSlot(I)?E.renderSlot(f.$slots,f.getSlot(I),{key:0}):(E.openBlock(),E.createBlock(l,{key:I.value,onClick:C=>f.onClickItem(I),"has-more":!!I.subItems},{default:E.withCtx(()=>[E.createTextVNode(E.toDisplayString(I.display),1)]),_:2},1032,["onClick","has-more"]))],64))),256))]),_:3}),f.reachLeft?E.createCommentVNode("",!0):(E.openBlock(),E.createElementBlock("i",o)),f.reachRight?E.createCommentVNode("",!0):(E.openBlock(),E.createElementBlock("i",S))],2)):E.createCommentVNode("",!0)}var p=A.default(u,[["render",_]]);x.default=p}(L2)),L2}var V2={},SY;function yee(){return SY||(SY=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=ln(),k=La(),F=ci(),B=vr(),G=ht(),E=St();const A=G.defineComponent({name:"EmptyView",components:{vButton:k.default},mixins:[F.default,B.default],props:{icon:{type:Object,default:()=>({name:"empty-view-default",sprite:!0})},iconClass:{type:String,default:""},text:{type:String,default:void 0},hideText:{type:Boolean,default:!1},actionText:{type:String,default:void 0},hideIcon:{type:Boolean,default:!1},hideAction:{type:Boolean,default:!1},hideTitle:{type:Boolean,default:!0},actionBtnSuffix:{type:String,default:"main"}},emits:["action-click"],computed:{innerText(){return this.text??this._i18n("common","no_item")},innerActionText(){return this.actionText??this._i18n("common","create")}},methods:{onActionClick(d){M.$emit(this,"action-click",d)}}}),u={class:"v-empty-view"},o={class:"v-empty-view-box"},S={key:1,class:"v-empty-view-title"},_={key:2,class:"v-empty-view-text"},p={key:3,class:"v-empty-view-action"};function f(d,v,b,s,l,w){const I=G.resolveComponent("v-icon"),C=G.resolveComponent("v-button"),h=G.resolveComponent("v-space");return G.openBlock(),G.createElementBlock("div",u,[G.createElementVNode("div",o,[d.hideIcon?G.createCommentVNode("",!0):(G.openBlock(),G.createBlock(I,G.mergeProps({key:0},d.icon,{class:["v-empty-view-icon",d.iconClass]}),null,16,["class"])),d.hideTitle?G.createCommentVNode("",!0):(G.openBlock(),G.createElementBlock("div",S,[G.renderSlot(d.$slots,"title")])),d.hideText?G.createCommentVNode("",!0):(G.openBlock(),G.createElementBlock("p",_,[G.renderSlot(d.$slots,"default",{},()=>[G.createTextVNode(G.toDisplayString(d.innerText),1)])])),d.hideAction?G.createCommentVNode("",!0):(G.openBlock(),G.createElementBlock("div",p,[G.createVNode(h,{spacing:"dense"},{default:G.withCtx(()=>[G.renderSlot(d.$slots,"action",{},()=>[G.createVNode(C,{"syno-id":`${d.synoId}-default-button`,suffix:d.actionBtnSuffix,onClick:d.onActionClick},{default:G.withCtx(()=>[G.createTextVNode(G.toDisplayString(d.innerActionText),1)]),_:1},8,["syno-id","suffix","onClick"])])]),_:3})]))])])}var y=E.default(A,[["render",f]]);x.default=y}(V2)),V2}var H2={},$2={},IY;function gwe(){return IY||(IY=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=ln(),k=Si(),F=uh(),B=ya(),G=vr(),E=kr(),A=Kt(),u=Qo(),o=Ur(),S=ht(),_=ac();G.register("expandable-item-up",E.vIconDataviewChevronUp),G.register("expandable-item-down",E.vIconDataviewChevronDown);var p=S.defineComponent({name:"ExpandableItem",components:{vSlideUpDownTransition:F.default},directives:{tooltip:B.default},mixins:[G.default],props:{icon:{type:[String,Boolean],default:!1},statusIcon:{type:[String,Boolean],default:!1},statusIconCls:{type:String,default:void 0},summary:{type:_.definePropType([String,Object]),default:void 0},summaryStatus:{type:String,default:void 0},summaryStatusTip:{type:[String,Object],default:void 0},title:{type:_.definePropType([String,Object]),default:void 0},titleTip:{type:[String,Object],default:void 0},desc:{type:String,default:void 0},descTip:{type:[String,Object],default:void 0},enableTitleTip:{type:Boolean,default:!1},enableStatusTip:{type:Boolean,default:!1},expanded:{type:Boolean,default:!0},expandable:{type:Boolean,default:void 0},disabled:{type:[Object,Boolean],default:!1}},emits:["change","update:expanded"],data(){return{innerExpanded:!1}},computed:{innerStatusIcon(){return this.statusIconCls&&o.deprecate("statusIconCls","statusIcon",this),this.statusIcon??this.statusIconCls},disabledExpand(){return A.isObject(this.disabled)?(this.disabled.allowExpand??!1)===!1:this.disabled===!0},deprecatedSummary(){if(this.summaryStatus||this.summaryStatusTip||this.enableStatusTip){o.deprecate("summaryStatus","summary",this),o.deprecate("summaryStatusTip","summary",this),o.deprecate("enableStatusTip","summary",this);const f=this.enableStatusTip?this.summaryStatusTip??this.summaryStatus:!1;return{text:this.summaryStatus,tip:f}}return null},wrapCls(){return["v-expandable-item","item-wrap",{"item-expanded":this.innerExpanded,"item-collapsed":!this.innerExpanded,"disabled-detail":!!this.disabled,"disabled-all":this.disabledExpand}]},toggleCls(){return{expanded:this.innerExpanded}},innerTitle(){return A.isObject(this.title)?this.title?.text:this.title},innerTitleTip(){if(!A.isObject(this.title))return!1;const f=this.title.tip===!0?this.innerTitle:this.title.tip;return f?A.isObject(f)?f:{content:f,overflowOnly:!0}:!1},innerSummary(){return this.deprecatedSummary?this.deprecatedSummary:this.summary},innerSummaryText(){return A.isObject(this.innerSummary)?this.innerSummary?.text:this.innerSummary},innerSummaryTip(){if(!A.isObject(this.innerSummary))return!1;const f=this.innerSummary.tip===!0?this.innerSummaryText:this.innerSummary.tip;return f?A.isObject(f)?f:{content:f,overflowOnly:!0}:!1},innerExpandable(){return this.expandable??this.hasDetailSlot()}},watch:{expanded:{handler(f){this.disabledExpand?this.innerExpanded=!1:this.innerExpanded=f},immediate:!0},disabledExpand(f){f&&(this.innerExpanded=!1)}},methods:{onDblClick(){this.toggleItem()},hasDetailSlot(){return k.hasSlot(this,"detail")},toggleItem(){!this.innerExpandable||this.disabledExpand||(this.innerExpanded=!this.innerExpanded,M.$emit(this,"update:expanded",this.innerExpanded))},onKeyDown(f){(u.isEnter(f)||u.isSpace(f))&&(f.preventDefault(),this.toggleItem())}}});x.default=p}($2)),$2}var xY;function wee(){return xY||(xY=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=gwe(),k=ht(),F=St();const B={class:"item-summary"},G={class:"icon-wrapper"},E={class:"main-wrapper"},A={class:"title-wrapper"},u=["innerHTML"],o={class:"item-status-wrapper"},S=["innerHTML"],_={key:0,class:"item-detail",ref:"detail"};function p(y,d,v,b,s,l){const w=k.resolveComponent("v-icon"),I=k.resolveComponent("v-slide-up-down-transition"),C=k.resolveDirective("tooltip"),h=k.resolveDirective("syno-id");return k.withDirectives((k.openBlock(),k.createElementBlock("div",{class:k.normalizeClass(y.wrapCls),onDblclick:d[1]||(d[1]=function(){return y.onDblClick&&y.onDblClick(...arguments)}),tabindex:"-1",onKeypress:d[2]||(d[2]=function(){return y.onKeyDown&&y.onKeyDown(...arguments)})},[k.createElementVNode("div",B,[k.createElementVNode("div",G,[k.renderSlot(y.$slots,"icon",{},()=>[y.icon?(k.openBlock(),k.createBlock(w,{key:0,class:"item-icon",name:y.icon,"svg-icon-set":"set06",disabled:!!y.disabled},{default:k.withCtx(()=>[k.renderSlot(y.$slots,"icon-status",{},()=>[y.innerStatusIcon?(k.openBlock(),k.createBlock(w,{key:0,class:"item-status-icon",name:y.innerStatusIcon,"svg-icon-set":"set02"},null,8,["name"])):k.createCommentVNode("",!0)])]),_:3},8,["name","disabled"])):k.createCommentVNode("",!0)])]),k.createElementVNode("div",E,[k.createElementVNode("div",A,[k.renderSlot(y.$slots,"title",{},()=>[k.withDirectives(k.createElementVNode("span",{class:"item-title",innerHTML:y.innerTitle},null,8,u),[[C,y.innerTitleTip]])])]),k.createElementVNode("div",o,[k.renderSlot(y.$slots,"status",{},()=>[k.withDirectives(k.createElementVNode("div",{class:"item-status",innerHTML:y.innerSummaryText},null,8,S),[[C,y.innerSummaryTip]])])])]),k.renderSlot(y.$slots,"block"),y.innerExpandable?(k.openBlock(),k.createElementBlock("div",{key:0,class:k.normalizeClass(["toggle-wrapper",y.toggleCls]),onClick:d[0]||(d[0]=k.withModifiers(function(){return y.toggleItem&&y.toggleItem(...arguments)},["stop"]))},[k.renderSlot(y.$slots,"toggle-icon",{},()=>[k.createVNode(w,{class:"item-toggle-img",name:y.innerExpanded?"expandable-item-up":"expandable-item-down",disabled:!!y.disabledExpand,"svg-icon-set":"set33"},null,8,["name","disabled"])])],2)):k.createCommentVNode("",!0)]),k.createVNode(I,null,{default:k.withCtx(()=>[y.innerExpanded&&y.hasDetailSlot()?(k.openBlock(),k.createElementBlock("div",_,[k.renderSlot(y.$slots,"detail")],512)):k.createCommentVNode("",!0)]),_:3})],34)),[[h]])}var f=F.default(M.default,[["render",p]]);x.default=f}(H2)),H2}var z2={},TY;function bee(){return TY||(TY=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=uh(),k=kl(),F=vr(),B=kr(),G=ht(),E=St();F.register("fieldset-chevron-up",B.vIconChevronUp),F.register("fieldset-chevron-down",B.vIconChevronDown);const A={CLICK:"click",DBLCLICK:"dblclick",NONE:"none"},u=G.defineComponent({name:"Fieldset",components:{vSlideUpDownTransition:M.default,vLayout:k.default},mixins:[F.default],props:{layoutOrder:{type:Number,default:0},prefixCls:{type:String,default:"v-fieldset"},collapsible:{type:Boolean,default:!0},collapseTriggerEvent:{type:String,default:A.CLICK,validator:p=>Object.values(A).includes(p)},collapseIcon:{type:String,default:"left",validator:p=>["left","none"].includes(p)},collapsed:{type:Boolean,default:!1},title:{type:String,default:""},titleHtml:{type:String,default:void 0}},emits:["collapsestatechange","update:collapsed","beforebodyenter","afterbodyenter","beforebodyleave","afterbodyleave","header-click","header-dblclick"],data(){return{isCollapsed:this.collapsed}},computed:{titleWrapperCls(){return[`${this.prefixCls}-title-wrapper`]},fieldsetCls(){return[this.prefixCls,{collapsible:this.collapsible,collapsed:this.isCollapsed}]},iconName(){return this.isCollapsed?"fieldset-chevron-down":"fieldset-chevron-up"}},watch:{collapsed(p){this.isCollapsed=p}},methods:{onClick(){this.$emit("header-click"),this.collapseTriggerEvent===A.CLICK&&this.toggleCollapse()},onDblClick(){this.$emit("header-dblclick"),this.collapseTriggerEvent===A.DBLCLICK&&this.toggleCollapse()},toggleCollapse(){this.collapsible&&(this.isCollapsed=!this.isCollapsed,this.$emit("collapsestatechange",this.isCollapsed),this.$emit("update:collapsed",this.isCollapsed))},onBeforeEnter(p){this.$emit("beforebodyenter",p)},onAfterEnter(p){this.$emit("afterbodyenter",p)},onBeforeLeave(p){this.$emit("beforebodyleave",p)},onAfterLeave(p){this.$emit("afterbodyleave",p)}}}),o=["innerHTML"];function S(p,f,y,d,v,b){const s=G.resolveComponent("v-icon"),l=G.resolveComponent("v-layout"),w=G.resolveComponent("v-slide-up-down-transition");return G.openBlock(),G.createBlock(l,{class:G.normalizeClass(p.fieldsetCls),role:"group","aria-label":p.title,tabindex:"0",type:"fieldset",order:p.layoutOrder},{default:G.withCtx(()=>[G.createElementVNode("div",{class:G.normalizeClass(p.titleWrapperCls),onClick:f[0]||(f[0]=function(){return p.onClick&&p.onClick(...arguments)}),onDblclick:f[1]||(f[1]=function(){return p.onDblClick&&p.onDblClick(...arguments)})},[G.renderSlot(p.$slots,"collapse-icon",{},()=>[p.collapsible&&p.collapseIcon!=="none"?(G.openBlock(),G.createBlock(s,{key:0,class:"v-fieldset-collapse-icon",name:p.iconName,"svg-icon-set":"set15"},null,8,["name"])):G.createCommentVNode("",!0)]),G.renderSlot(p.$slots,"title",{},()=>[p.titleHtml?(G.openBlock(),G.createElementBlock("div",{key:0,class:G.normalizeClass(p.prefixCls+"-title"),innerHTML:p.titleHtml},null,10,o)):(G.openBlock(),G.createElementBlock("div",{key:1,class:G.normalizeClass(p.prefixCls+"-title")},G.toDisplayString(p.title),3))])],34),G.createVNode(w,{"syno-id":`${p.prefixCls}-slide-up-down`},{default:G.withCtx(()=>[G.withDirectives(G.createVNode(l,{ref:"body",class:G.normalizeClass(p.prefixCls+"-body"),type:"fieldset-body"},{default:G.withCtx(()=>[G.renderSlot(p.$slots,"default")]),_:3},8,["class"]),[[G.vShow,!p.isCollapsed]])]),_:3},8,["syno-id"])]),_:3},8,["class","aria-label","order"])}var _=E.default(u,[["render",S]]);x.default=_}(z2)),z2}var W2={},kY;function Cee(){return kY||(kY=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=ln(),k=ya(),F=ci(),B=Zo(),G=Tl(),E=Kt(),A=La(),u=ls(),o=gf(),S=kr(),_=vr(),p=ht(),f=St();_.register("file-button-upload",S.vIconFolder);const y=p.defineComponent({name:"FileButton",directives:{tooltip:k.default},components:{vButton:A.default,vInput:o.default,vIcon:u.default},mixins:[B.default,F.default,G.default,_.default],props:{buttonOnly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},fileName:{type:[String,Array],default:void 0},accept:{type:String,default:""},webkitdirectory:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},display:{type:String,default:"input-button",validator(s){return["input-button","input-icon","icon-in-input","button","icon"].includes(s)}},icon:{type:[String,Object],default:"file-button-upload"},tooltip:{type:Function,default:void 0},placeholder:{type:String,default:void 0},clearable:{type:Boolean,default:!1}},emits:["change","files","update:file-name"],data:()=>({prefixCls:"v-file-btn",files:[],valueKey:"fileName"}),computed:{innerIcon(){return E.isObject(this.icon)?this.icon:{name:this.icon,svgIconSet:"set01"}},textFieldCls(){return["file-textfield",{"icon-in-input":this.isIconInInput,clearable:this.clearable}]},fileButtonWrapperCls(){return[this.prefixCls,{disabled:this.disabled}]},displayText(){return E.isArray(this.fileName)?this.fileName.length?E.formatString(this._i18n("uicommon","files_selected"),this.fileName.length):"":this.fileName},buttonDisplay(){return this.display==="input-icon"||this.display==="icon"?"icon":"text"},hasButton(){return this.display==="input-button"||this.display==="input-icon"||this.display==="button"||this.display==="icon"},hasInput(){return this.display==="input-button"||this.display==="input-icon"||this.display==="icon-in-input"},isIconInInput(){return this.display==="icon-in-input"}},methods:{getTip(){const s=E.isArray(this.fileName)?this.fileName:this.fileName?[this.fileName]:[];return s.length===0?!1:this.tooltip?this.tooltip(this.files):{content:s.join(`${this._i18n("common","comma")} `)}},getFile(){const s=this.getFileList();return s?s[0]:null},getFileList(){return this.files},onClick(){this.disabled||this.$refs.fileInput.click()},onClear(){this.files=[],M.$emit(this,"change",""),M.$emit(this,"files",this.files)},onFileChange(s){this.files=[...s.target.files],this.$refs.fileInput.value=null;const l=this.files.map(w=>w.name);M.$emit(this,"files",this.files),this.multiple?(M.$emit(this,"change",l),M.$emit(this,"update:file-name",l)):(M.$emit(this,"change",l[0]),M.$emit(this,"update:file-name",l[0]))}}}),d=["accept","multiple","webkitdirectory"];function v(s,l,w,I,C,h){const c=p.resolveComponent("v-icon"),m=p.resolveComponent("v-input"),T=p.resolveComponent("v-button"),D=p.resolveDirective("syno-id"),O=p.resolveDirective("tooltip");return p.withDirectives((p.openBlock(),p.createElementBlock("div",{class:p.normalizeClass(s.fileButtonWrapperCls)},[s.hasInput?(p.openBlock(),p.createBlock(m,{key:0,name:"file-button",class:p.normalizeClass(s.textFieldCls),placeholder:s.placeholder,"model-value":s.displayText,value:s.displayText,"syno-id":`${s.synoId}-input`,clearable:s.clearable,onClick:l[0]||(l[0]=N=>s.isIconInInput&&s.onClick()),onClear:s.onClear,readonly:"",disabled:s.disabled},p.createSlots({_:2},[s.isIconInInput?{name:"suffix-icons",fn:p.withCtx(()=>[p.createVNode(c,p.normalizeProps(p.guardReactiveProps(s.innerIcon)),null,16)]),key:"0"}:void 0]),1032,["class","placeholder","model-value","value","syno-id","clearable","onClear","disabled"])):p.createCommentVNode("",!0),p.createElementVNode("input",{ref:"fileInput",class:"file-input",type:"file",onChange:l[1]||(l[1]=function(){return s.onFileChange&&s.onFileChange(...arguments)}),accept:s.accept,multiple:s.multiple,webkitdirectory:s.webkitdirectory},null,40,d),s.hasButton?(p.openBlock(),p.createBlock(T,{key:1,onClick:s.onClick,disabled:s.disabled,"syno-id":`${s.synoId}-btn`,display:s.buttonDisplay},{icon:p.withCtx(()=>[s.buttonDisplay==="icon"?(p.openBlock(),p.createBlock(c,p.normalizeProps(p.mergeProps({key:0},s.innerIcon)),null,16)):p.createCommentVNode("",!0)]),default:p.withCtx(()=>[s.buttonDisplay==="text"?(p.openBlock(),p.createElementBlock(p.Fragment,{key:0},[p.createTextVNode(p.toDisplayString(s._i18n("uicommon","browse")),1)],64)):p.createCommentVNode("",!0)]),_:1},8,["onClick","disabled","syno-id","display"])):p.createCommentVNode("",!0)],2)),[[D],[O,s.getTip()]])}var b=f.default(y,[["render",v]]);x.default=b}(W2)),W2}var U2={},RY;function C5(){return RY||(RY=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=fr(),k=qx(),F=Kt(),B=Ur(),G=kl(),E=ln(),A=ht(),u=St();const o={HORIZONTAL:"horizontal",VERTICAL:"vertical"},S=A.defineComponent({name:"Form",components:{vLayout:G.default},mixins:[M.provide("form")],props:{flex:{type:[Boolean,String],default:!1},layoutOrder:{type:Number,default:0},model:{type:Object,default:()=>({})},rules:{type:Object,default:()=>({})},direction:{type:[Object,String],default:()=>({xxs:o.VERTICAL,xxxl:o.HORIZONTAL})},validateMessageDisplayMode:{type:String,validator(f){return["popup","text"].includes(f)},default:"popup"}},emits:["submit","validated","form.removeField","form.addField"],data:()=>({prefix:"v-form",fields:[],controllers:[]}),computed:{innerDirection(){return F.isObject(this.direction)?this.$breakpointManager?this.$breakpointManager.getSuitableValue(this.direction):(B.remind("please import and use BreakpointManagerPlugin when you are in tree-shaking mode or breakpoint will not active."),o.HORIZONTAL):this.direction},wrapClasses(){return{[this.prefix]:!0,[`${this.prefix}-${this.innerDirection}`]:!0}}},watch:{async rules(){await this.validate()}},created(){E.$on(this,"form.addField",f=>{f&&this.addField(f)}),E.$on(this,"form.removeField",f=>{f&&this.removeField(f)})},methods:{addField(f){return this.fields.push(f),()=>this.removeField(f)},removeField(f){this.fields=F.removeItems(this.fields,f)},addFormController(f){return this.controllers.push(f),()=>F.removeItems(this.controllers,f)},register(f){(arguments.length>1&&arguments[1]!==void 0?arguments[1]:()=>{})(this)},unregister(f){(arguments.length>1&&arguments[1]!==void 0?arguments[1]:()=>{})(this)},onSubmit(f){E.$emit(this,"submit",f)},findField(f){if(!f)return null;for(let y of this.fields)if(y.prop===f)return y;return null},resetFields(){for(const f of this.controllers)f.resetField?.();this.fields.forEach(f=>{f.inFormController?.()||f.resetField()})},async validate(f){let{autoScroll:y=!0}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const d=await Promise.all(this.fields.map(async b=>({error:await b?.validate?.(f),field:b}))),v=d.find(b=>b.error);return y&&v&&v.field&&(v.field.ensureVisible(),v.field.showPopup()),E.$emit(this,"validated",{valid:!v,errResults:d}),!v},async validateField(f){const y=this.fields.find(d=>d.prop===f);if(!y)throw new Error("must call validateField with valid prop string!");await y.validate("")},isDirty(){let f=!1;for(const y of this.controllers)f=f||y.isDirty?.();return f||this.fields.some(y=>y.isInTable?.()?!1:F.isFunction(y.isDirty)?y.isDirty():y.isDirty)},commit(){for(const f of this.controllers)f.commit?.();this.fields.forEach(f=>{f.commit()})},focusNextField(){k.focusNextDescendant(this.$el)},focusPrevField(){k.focusPreviousDescendant(this.$el)}}});function _(f,y,d,v,b,s){const l=A.resolveComponent("v-layout"),w=A.resolveDirective("syno-id");return A.withDirectives((A.openBlock(),A.createBlock(l,{tag:"form",onSubmit:A.withModifiers(f.onSubmit,["prevent"]),class:A.normalizeClass(f.wrapClasses),type:"form",order:f.layoutOrder},{default:A.withCtx(()=>[A.renderSlot(f.$slots,"default")]),_:3},8,["onSubmit","class","order"])),[[w]])}var p=u.default(S,[["render",_]]);x.default=p}(U2)),U2}var G2={};const pwe=sf(Rhe);var j2={},EY;function mT(){return EY||(EY=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=xl(),k=ht(),F=St();const B=k.defineComponent({name:"Popup",mixins:[M.default],props:{disable:{type:Boolean,default:!1},type:{type:String,default:"error"},content:{type:String,default:""},tipOptions:{type:Object,default:()=>({})}},data:()=>({isShow:!1}),computed:{innerTipOpts(){return{content:this.content,attachToElement:!0,offset:[0,0],align:"bl->tl",type:this.type,arrow:!0,disabled:this.disable,...this.tipOptions}}},methods:{showPopup(){this.$refs.tip?._svc_tooltip_e_show_cb?.()},hidePopup(){this.$refs.tip?._svc_tooltip_e_hide_cb?.()}}}),G={ref:"tip"};function E(u,o,S,_,p,f){const y=k.resolveDirective("tooltip");return k.withDirectives((k.openBlock(),k.createElementBlock("div",G,[k.renderSlot(u.$slots,"default")])),[[y,u.innerTipOpts]])}var A=F.default(B,[["render",E]]);x.default=A}(j2)),j2}var q2={},AY;function vT(){return AY||(AY=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Kt(),k=fr(),F=ht(),B=St();const G=F.defineComponent({name:"Col",mixins:[k.inject("grid"),k.inject("row")],props:{flex:{type:[String,Number,Object],default:"none"}},computed:{layout(){return this.grid?.instance?"grid":this.row?.instance?"row":!1},colStyle(){let u={};const o=M.isObject(this.flex)?this.$breakpointManager.getSuitableValue(this.flex):this.flex;return M.isNumberLike(o)||(u.flex=o),M.isNumberUnit(o)&&(u.width=o,u["flex-grow"]=0,u["flex-shrink"]=0),u},colCls(){let u=[];const o=M.isObject(this.flex)?this.$breakpointManager.getSuitableValue(this.flex):this.flex;return M.isNumberLike(o)?u.push(`v-col-${o}`):(o==="auto"||o==="none")&&u.push(`v-col-${o}`),[{[`in-${this.layout}-layout`]:!!this.layout},"v-col",...u]}}});function E(u,o,S,_,p,f){return F.openBlock(),F.createElementBlock("div",{class:F.normalizeClass(u.colCls),style:F.normalizeStyle(u.colStyle)},[F.renderSlot(u.$slots,"default")],6)}var A=B.default(G,[["render",E]]);x.default=A}(q2)),q2}var MY;function _5(){return MY||(MY=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Xn(),k=Si(),F=_i(),B=pwe,G=Zo(),E=ci(),A=fr(),u=mT(),o=Kt(),S=Dr(),_=vT(),p=Kl(),f=ln(),y=Ni(),d=ht(),v=St();function b(m){return m&&typeof m=="object"&&"default"in m?m:{default:m}}var s=b(B);const l="disabled",w=d.defineComponent({name:"FormItem",components:{vPopup:u.default,withCol:p.withWrap(_.default)},mixins:[E.default,G.default,A.inject("form-controller"),A.provide("form-item"),A.inject("form-multiple-item"),A.inject("form")],props:{prop:{type:String,default:void 0},label:{type:String,default:void 0},disableLabel:{type:Boolean,default:!1},disableDescription:{type:Boolean,default:!1},validateDisabledField:{type:Boolean,default:!1},disableValidation:{type:Boolean,default:!1},hideValidateMessage:{type:Boolean,default:!1},hideValidateStatusCls:{type:Boolean,default:!1},rules:{type:[Object,Array],default:void 0},help:{type:String,default:void 0},validateStatus:{type:String,default:void 0},defaultValidateTrigger:{type:String,default:"blur"},immediateValidate:{type:Boolean,default:!1},showMessage:{type:Boolean,default:!0},hideLabel:{type:Boolean,default:!1},textonly:{type:Boolean,default:!1},indent:{type:[Number,String],default:0},validateDebouncedTimer:{type:Number,default:250},registerKey:{type:String,default:void 0},validateMessageDisplayMode:{type:String,validator(m){return["popup","text","form"].includes(m)},default:"form"},fixInitialValue:{type:String,default:void 0},wrapperFlex:{type:[String,Number,Object],default:void 0},controlFlex:{type:[String,Number,Object],default:void 0},labelFlex:{type:[String,Number,Object],default:void 0}},emits:["validated","validating","update:model-value","form.register","form.unregister"],data(){return{field:null,unwatchers:null,formPrefix:"v-form",prefixCls:"v-form-item",innerValidateStatus:this.validateStatus,validateMessage:this.help,fieldDisabled:!1,validator:{},innerInitialValue:void 0,fieldValue:void 0,labelFor:"",isComposite:!1}},computed:{inFlexMultipleFormItem(){return this["form-multiple-item"]?.instance?.inFlexForm},inFlexForm(){return!!this.form?.instance?.flex},itemCls(){return[this.prefixCls,{"is-composite":this.isComposite,"hide-label":this.hideLabel,[`${this.prefixCls}-with-help`]:this.validateMessage}]},itemStyle(){return{"--indent":+this.indent}},labelCls(){return[`${this.prefixCls}-label`,{disabled:this.isFieldDisabled||this.disableLabel}]},innerHideLabel(){return!!(this.hideLabel||this.form?.instance?.innerDirection==="vertical"&&!o.isDefined(this.label)&&!k.hasSlot(this,"label"))},innerControlFlex(){return this.form?.instance?.innerDirection==="vertical"?!1:o.isDefined(this.controlFlex)?this.controlFlex:this.inFlexMultipleFormItem?"auto":!1},innerLabelFlex(){return this.form?.instance?.innerDirection==="vertical"?!1:o.isDefined(this.labelFlex)?this.labelFlex:!1},controlCls(){const m={error:"has-error",warning:"has-warning",success:"has-success",validating:"is-validating"}[this.innerValidateStatus];return[`${this.prefixCls}-control`,{[m]:m&&!this.hideValidateStatusCls,"v-form-displayfield":this.textonly}]},labelStyle(){return{...this.getFlexStyle(this.innerLabelFlex)}},controlStyle(){return{...this.getFlexStyle(this.innerControlFlex)}},isFieldDisabled(){return!!this.fieldDisabled},shouldValidate(){return!(this.disableValidation||!this.validateDisabledField&&this.isFieldDisabled)},isPopupDisabled(){return!(o.isDefined(this.validateMessage)&&this.validateMessage!=="")||this.hideValidateMessage||!this.shouldValidate||this.validateMessageTextMode},isDirty(){return!o.isEqual(this.innerInitialValue,this.fieldValue)},validateMessageTextMode(){return this.currentValidateDisdplayMode=="text"},currentValidateDisdplayMode(){return this.validateMessageDisplayMode!=="form"?this.validateMessageDisplayMode:this.form?.instance.validateMessageDisplayMode?this.form?.instance.validateMessageDisplayMode:"popup"},descriptionCls(){return{disabled:this.isFieldDisabled||this.disableDescription}}},watch:{fixInitialValue:{handler(m){this.innerInitialValue=m},immediate:!0},help(m){this.validateMessage=m,this.innerValidateStatus=m?"error":""},validateStatus(m){this.innerValidateStatus=m}},created(){var m=this;f.$on(this,"form.register",this.onFieldRegister),f.$on(this,"form.unregister",this.onFieldUnregister),this.validateDebounced=F.debounce(function(T){for(var D=arguments.length,O=new Array(D>1?D-1:0),N=1;N<D;N++)O[N-1]=arguments[N];m.validate(T,...O)},this.validateDebouncedTimer)},mounted(){this.dispatch("Form","form.addField",[this]),this["form-multiple-item"]&&(this.isComposite=this["form-multiple-item"].isComposite,this["form-multiple-item"].register(this))},[M.componentHooks.beforeUnmount](){this.dispatch("Form","form.removeField",[this]),this["form-multiple-item"]&&this["form-multiple-item"].unregister(this)},methods:{async showPopup(m){this.validateDebounced&&this.validateDebounced.cancel(),this.$refs.popup&&(this.setInvalid(m,"error"),await this.$nextTick(),this.$refs.popup.showPopup())},hidePopup(){this.validateDebounced&&this.validateDebounced.cancel(),this.$refs.popup&&this.$refs.popup.hidePopup()},async validate(m){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},D=arguments.length>2?arguments[2]:void 0,O=null;if(this.validateDebounced&&this.validateDebounced.cancel(),this.innerValidateStatus="",O=this.getFilteredRule(m),D&&(O=O.concat(D)),!this.field||!this.field.validateByField){if(!this.prop)return this.validateMessage="",f.$emit(this,"validated",{message:this.validateMessage,status:this.innerValidateStatus}),this.validateMessage;if(!O||O.length===0||!this.shouldValidate)return this.validateMessage="",f.$emit(this,"validated",{message:this.validateMessage,status:this.innerValidateStatus}),this.validateMessage}this.innerValidateStatus="validating",f.$emit(this,"validating");try{if(this.field?.validateByField&&await this.field?.validate?.(T?.event),O.length>0){const N={[this.prop]:this.fieldValue},z=new s.default({[this.prop]:O});z.messages({required:()=>this._i18n("extlang","fieldblank"),whitespace:()=>this._i18n("extlang","fieldblank")}),await z.validate(N,{firstFields:!0,suppressWarning:!0})}this.innerValidateStatus="success",this.validateMessage=""}catch({errors:N}){N&&(this.innerValidateStatus="error",this.validateMessage=N[0].message)}return f.$emit(this,"validated",{message:this.validateMessage,status:this.innerValidateStatus}),this.validateMessage},inFormController(){return!!this["form-controller"]},resetField(){this.innerValidateStatus="",this.validateMessage="",this.field&&f.$emit(this.field,y.getModelEventName(this.field),this.innerInitialValue)},commit(){this["form-controller"]||(this.innerInitialValue=this.fieldValue)},getRules(){const m=this.form?.instance?.rules?.[this.prop]??[],T=this.rules??[];return[].concat(T).concat(m)},getFilteredRule(m){return this.getRules().filter(T=>{const D=T.trigger??this.defaultValidateTrigger;return!o.isDefined(m)||m===null?!0:o.isArray(D)?D.some(O=>O.includes(m)):D.includes(m)})},setInvalid(m,T){T?this.innerValidateStatus=T:this.innerValidateStatus="error",o.isDefined(m)&&(this.validateMessage=m)},ensureVisible(){S.scrollTo(this.$el,{scrollMode:"if-needed"})},resetInvalid(){this.innerValidateStatus="",this.validateMessage=""},watchField(m){const T=m.valueKey??y.getModelPropName(),D=m.disabledKey??l;this.field=m,this.labelFor=m.id,o.isDefined(this.fixInitialValue)||(this.innerInitialValue=m[T]),this.fieldValue=m[T];let O=[m.$watch(T,this.onFieldChange,{immediate:!0}),m.$watch(T,N=>{this.onFieldShouldValidate(N,"change")},{immediate:this.immediateValidate}),m.$watch(D,N=>{this.onFieldDisable(N),(this.immediateValidate||N)&&this.onFieldShouldValidate(N,this.defaultValidateTrigger)},{immediate:!0}),f.$on(m,"blur",this.onFieldBlur),f.$on(m,"keyup",this.onFieldKeyUp),f.$on(m,"focus-next-field",this.onFocusNextField),f.$on(m,"focus-prev-field",this.onFocusPreviousField)];m.validateByField&&O.push(f.$on(m,m.validateByField.event,this.onFieldCustomEvent)),this.unwatchers=O},unwatchField(m){if(f.$off(m,"blur",this.onFieldBlur),f.$off(m,"keyup",this.onFieldKeyUp),f.$off(m,"focus-next-field",this.onFocusNextField),f.$off(m,"focus-prev-field",this.onFocusPreviousField),m.validateByField&&f.$off(m,m.validateByField.event,this.onFieldCustomEvent),this.unwatchers){for(const T of this.unwatchers)T();this.unwatchers=null}},onFocusNextField(){this.form?.instance.focusNextField()},onFocusPreviousField(){this.form?.instance.focusPrevField()},onFieldRegister(m,T){(T||this.registerKey)&&this.registerKey!==T||(this.field&&this.onFieldUnregister(this.field),this.watchField(m))},onFieldUnregister(m,T){(T||this.registerKey)&&this.registerKey!==T||(this.unwatchField(m),this.field=null)},onFieldCustomEvent(m){return this.validateDebounced("",{triggerByField:!0,event:m})},onFieldBlur(){return this.validateDebounced("blur")},onFieldKeyUp(){},onFieldShouldValidate(m,T){return this.validateDebounced(T)},onFieldDisable(m){this.fieldDisabled=m},onFieldChange(m){this.fieldValue=m},register(m){(arguments.length>1&&arguments[1]!==void 0?arguments[1]:()=>{})(this)},unregister(m){(arguments.length>1&&arguments[1]!==void 0?arguments[1]:()=>{})(this)},hasDescriptionSlot(){return k.hasSlot(this,"description")},getFlexStyle(m){let T={};const D=o.isObject(m)?this.$breakpointManager.getSuitableValue(m):m;return D===!1?{}:(o.isNumberLike(D)||(T.flex=D),o.isNumberUnit(D)&&(T.width=D,T["flex-grow"]=0,T["flex-shrink"]=0),T)}}}),I=["for"],C={key:0,class:"validate-message"};function h(m,T,D,O,N,z){const H=d.resolveComponent("v-popup"),$=d.resolveComponent("with-col");return d.openBlock(),d.createBlock($,{wrap:m.inFlexMultipleFormItem,flex:m.wrapperFlex},{default:d.withCtx(()=>[d.createElementVNode("div",{class:d.normalizeClass(m.itemCls),style:d.normalizeStyle(m.itemStyle)},[d.renderSlot(m.$slots,"before"),!m.innerHideLabel&&!m.isComposite?(d.openBlock(),d.createElementBlock("div",{key:0,class:d.normalizeClass(m.labelCls),style:d.normalizeStyle(m.labelStyle)},[d.renderSlot(m.$slots,"label",{label:m.label,for:m.labelFor},()=>[d.renderSlot(m.$slots,"label-before"),m.label?(d.openBlock(),d.createElementBlock("label",{key:0,for:m.labelFor},d.toDisplayString(m.label),9,I)):d.createCommentVNode("",!0),d.renderSlot(m.$slots,"label-after")])],6)):d.createCommentVNode("",!0),d.createElementVNode("div",{class:"v-form-item-input",style:d.normalizeStyle(m.controlStyle)},[d.createElementVNode("div",{class:d.normalizeClass(m.controlCls)},[d.createVNode(H,{ref:"popup",type:"error",disable:m.isPopupDisabled,content:m.validateMessage},{default:d.withCtx(()=>[d.renderSlot(m.$slots,"default")]),_:3},8,["disable","content"])],2),d.renderSlot(m.$slots,"status",{},()=>[m.validateMessageTextMode&&m.validateMessage?(d.openBlock(),d.createElementBlock("div",C,d.toDisplayString(m.validateMessage),1)):d.createCommentVNode("",!0)]),m.hasDescriptionSlot()?(d.openBlock(),d.createElementBlock("div",{key:0,class:d.normalizeClass(["item-description",m.descriptionCls])},[d.renderSlot(m.$slots,"description")],2)):d.createCommentVNode("",!0)],4),d.renderSlot(m.$slots,"after")],6)]),_:3},8,["wrap","flex"])}var c=v.default(w,[["render",h]]);x.default=c}(G2)),G2}var Y2={},K2={},DY;function S5(){return DY||(DY=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Kt(),k=fr(),F=ht(),B=St();const G={START:"start"},E={MAX_CONTENT:"max-content"},A=F.defineComponent({name:"Grid",mixins:[k.provide("grid")],props:{gap:{type:[Object,String,Array,Number],default:void 0},columns:{type:[Number,String,Object],default:24},rows:{type:[Number,String],default:1},gridTemplateColumns:{type:[String,Object,Array],default:"1fr"},gridTemplateRows:{type:[String,Object],default:"1fr"},align:{type:[String,Object],default:G.START},justify:{type:[String,Object],default:G.START}},computed:{gapStyle(){const S=M.isObject(this.gap)?this.$breakpointManager.getSuitableValue(this.gap):this.gap,_=M.isArray(S)?S[0]:S;return{"--v-grid-row-gap":M.isArray(S)?S[1]:S,"--v-grid-col-gap":_}},innerColumns(){return M.isObject(this.columns)?this.$breakpointManager.getSuitableValue(this.columns):this.columns},innerRows(){return M.isObject(this.rows)?this.$breakpointManager.getSuitableValue(this.rows):this.rows},innerGridTemplateRows(){let S=M.isObject(this.gridTemplateRows)?this.$breakpointManager.getSuitableValue(this.gridTemplateRows):this.gridTemplateRows;return S===E.MAX_CONTENT?"repeat(var(--v-grid-rows), minmax(0, max-content))":M.isArray(S)?S.join(" "):`repeat(var(--v-grid-rows), ${S})`},innerGridTemplateColumns(){let S=M.isObject(this.gridTemplateColumns)?this.$breakpointManager.getSuitableValue(this.gridTemplateColumns):this.gridTemplateColumns;return S===E.MAX_CONTENT?"repeat(var(--v-grid-columns), minmax(0, max-content))":M.isArray(S)?S.join(" "):`repeat(var(--v-grid-columns), ${S})`},innerAlign(){return M.isObject(this.align)?this.$breakpointManager.getSuitableValue(this.align):this.align},innerJustify(){return M.isObject(this.justify)?this.$breakpointManager.getSuitableValue(this.justify):this.justify},gridStyle(){return{...this.gapStyle,"--v-grid-columns":this.innerColumns,"--v-grid-rows":this.innerRows,"--grid-template-columns":this.innerGridTemplateColumns,"--grid-template-rows":this.innerGridTemplateRows,"--grid-align":this.innerAlign,"--grid-justify":this.innerJustify}}}});function u(S,_,p,f,y,d){return F.openBlock(),F.createElementBlock("div",{class:"v-grid",style:F.normalizeStyle(S.gridStyle)},[F.renderSlot(S.$slots,"default")],4)}var o=B.default(A,[["render",u]]);x.default=o}(K2)),K2}var X2={},OY;function yT(){return OY||(OY=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Kt(),k=fr(),F=ht(),B=St();const G=["start","end","baseline","center","stretch"],E=F.defineComponent({name:"Row",mixins:[k.provide("row")],props:{align:{type:[String,Object],default:"start",validator(o){return M.isString(o)?G.includes(o):!0}},justify:{type:[String,Object],default:"start",validator(o){return M.isString(o)?G.includes(o):!0}},gap:{type:[Object,String,Array,Number],default:void 0},flexWrap:{type:[Object,Boolean],default:!1}},computed:{innerFlexWrap(){return M.isObject(this.flexWrap)?this.$breakpointManager.getSuitableValue(this.flexWrap):this.flexWrap},innerAlign(){return M.isObject(this.align)?this.$breakpointManager.getSuitableValue(this.align):this.align},innerJustify(){return M.isObject(this.justify)?this.$breakpointManager.getSuitableValue(this.justify):this.justify},rowCls(){return["v-row",{wrap:this.innerFlexWrap,[`align-${this.innerAlign}`]:this.innerAlign,[`justify-content-${this.innerJustify}`]:this.innerJustify}]},rowStyle(){let o={};const S=M.isObject(this.gap)?this.$breakpointManager.getSuitableValue(this.gap):this.gap,_=M.isArray(S)?S[0]:S,p=M.isArray(S)?S[1]:S;return o={"--v-row-horizontal-gap":_,"--v-row-vertical-gap":p},o}}});function A(o,S,_,p,f,y){return F.openBlock(),F.createElementBlock("div",{class:F.normalizeClass(o.rowCls),style:F.normalizeStyle(o.rowStyle)},[F.renderSlot(o.$slots,"default")],6)}var u=B.default(E,[["render",A]]);x.default=u}(X2)),X2}var NY;function _ee(){return NY||(NY=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=fr(),k=Kl(),F=Kt(),B=S5(),G=yT(),E=ht(),A=St();const u="follow-form",o=E.defineComponent({name:"FormMultipleItem",components:{withGrid:k.withWrap(B.default),withRow:k.withWrap(G.default)},mixins:[M.provide("form-multiple-item",["isComposite"]),M.inject("form")],props:{label:{type:String,default:void 0},disableLabel:{type:Boolean,default:!1},hideLabel:{type:Boolean,default:!1},marginSize:{type:String,default:"small"},indent:{type:[Number,String],default:0},gap:{type:[Object,String,Array,Number],default:()=>["6px","6px"]},flexWrap:{type:[Object,Boolean],default:!1},flexAlign:{type:[Object,Boolean],default:void 0},flexJustify:{type:[Object,Boolean],default:void 0},flex:{type:String,default:u},labelFlex:{type:[String,Number,Object],default:void 0},itemsWrapperFlex:{type:[String,Number,Object],default:void 0}},data(){return{prefixCls:"v-form",isComposite:!0,fields:[]}},computed:{inFlexForm(){return this.inGridLayoutForm||this.inRowLayoutForm},inGridLayoutForm(){return this.flex===u?this.form?.instance?.flex==="grid":this.flex==="grid"},inRowLayoutForm(){return this.flex===u?this.form?.instance?.flex==="row"||this.form?.instance?.flex===!0:this.flex==="row"||this.flex===!0},innerJustify(){return this.flexJustify},innerAlign(){return F.isDefined(this.flexAlign)?this.flexAlign:this.inFlexForm?"center":!1},itemsCls(){return[`${this.prefixCls}-multi-item`,{small:this.marginSize==="small",large:this.marginSize==="large",none:this.marginSize==="none"}]},itemsWrapperCls(){return`${this.prefixCls}-multi-item-wrapper`},wrapperCls(){return[`${this.prefixCls}-multi-wrapper`,{"flex-form-multiple-item":this.inFlexForm,"hide-label":this.hideLabel}]},wrapperStyle(){return{"--indent":+this.indent}},labelCls(){return[`${this.prefixCls}-item-label`,{disabled:this.isDisabled()||this.disableLabel}]},itemsWrapperStyle(){return{...this.getFlexStyle(this.itemsWrapperFlex)}},labelStyle(){return{...this.getFlexStyle(this.labelFlex)}}},methods:{register(f){this.fields=this.fields||[],this.fields.push(f)},unregister(f){this.fields=F.removeItems(this.fields,f)},isDirty(){return this.fields.some(f=>f.isDirty)},isDisabled(){return this.fields.every(f=>f.isFieldDisabled)},getFlexStyle(f){let y={};const d=F.isObject(f)?this.$breakpointManager.getSuitableValue(f):f;return d===!1?{}:(F.isNumberLike(d)||(y.flex=d),F.isNumberUnit(d)&&(y.width=d,y["flex-grow"]=0,y["flex-shrink"]=0),y)}}}),S={key:0};function _(f,y,d,v,b,s){const l=E.resolveComponent("with-row"),w=E.resolveComponent("with-grid");return E.openBlock(),E.createElementBlock("div",{class:E.normalizeClass(f.wrapperCls),style:E.normalizeStyle(f.wrapperStyle)},[f.hideLabel?E.createCommentVNode("",!0):(E.openBlock(),E.createElementBlock("div",{key:0,class:E.normalizeClass(f.labelCls),style:E.normalizeStyle(f.labelStyle)},[E.renderSlot(f.$slots,"label",{label:f.label},()=>[E.renderSlot(f.$slots,"label-before"),f.label?(E.openBlock(),E.createElementBlock("label",S,E.toDisplayString(f.label),1)):E.createCommentVNode("",!0),E.renderSlot(f.$slots,"label-after")])],6)),E.createElementVNode("div",{class:E.normalizeClass(f.itemsWrapperCls),style:E.normalizeStyle(f.itemsWrapperStyle)},[E.createElementVNode("div",{class:E.normalizeClass(f.itemsCls)},[E.createVNode(w,{wrap:f.inGridLayoutForm,gap:f.gap},{default:E.withCtx(()=>[E.createVNode(l,{wrap:f.inRowLayoutForm,gap:f.gap,"flex-wrap":f.flexWrap,align:f.innerAlign,justify:f.innerJustify},{default:E.withCtx(()=>[E.renderSlot(f.$slots,"default")]),_:3},8,["wrap","gap","flex-wrap","align","justify"])]),_:3},8,["wrap","gap"])],2)],6)],6)}var p=A.default(o,[["render",_]]);x.default=p}(Y2)),Y2}var J2={},PY;function See(){return PY||(PY=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Xn(),k=fr(),F=vT(),B=yT(),G=vr(),E=kr(),A=Kt(),u=_i(),o=ci(),S=ln(),_=ht(),p=St();G.register("incremental-form-multiple-item-plus",E.vIconPlus),G.register("incremental-form-multiple-item-minus",E.vIconMinus);const f="6px",y=_.defineComponent({name:"IncrementalFormMultipleItem",components:{vCol:F.default,vRow:B.default},mixins:[k.provide("form-multiple-item",["isComposite"]),G.default,k.inject("form"),o.default],props:{label:{type:String,default:void 0},disableLabel:{type:Boolean,default:!1},hideLabel:{type:Boolean,default:!1},indent:{type:Number,default:0},items:{type:Array,default:()=>[]},minItemsLength:{type:Number,default:0},maxItemsLength:{type:Number,default:void 0},addText:{type:String,default:void 0},disabledAddButton:{type:Boolean,default:void 0},disabledRemoveButton:{type:Boolean,default:!1},gap:{type:[Object,String,Array],default:()=>[f,f]},columns:{type:Number,default:24},labelFlex:{type:[String,Number,Object],default:void 0},itemsWrapperFlex:{type:[String,Number,Object],default:void 0}},emits:["update:items","remove-item"],data(){return{prefixCls:"v-form",isComposite:!0,initialItems:[],fields:[]}},computed:{innerAddText(){return this.addText??this._i18n("common","add_field")},itemsCls(){return[`${this.prefixCls}-multi-item`]},itemsWrapperCls(){return`${this.prefixCls}-multi-item-wrapper`},wrapperCls(){return{"hide-label":this.hideLabel}},wrapperStyle(){return{"--indent":+this.indent}},labelCls(){return[`${this.prefixCls}-item-label`,{disabled:this.isDisabled()||this.disableLabel}]},isRemoveDisabled(){return this.disabledRemoveButton||this.items.length<=this.minItemsLength},innerDisabledAddButton(){return A.isDefined(this.disabledAddButton)?this.disabledAddButton:A.isNumber(this.maxItemsLength)&&this.items.length>=this.maxItemsLength},itemsWrapperStyle(){return{...this.getFlexStyle(this.itemsWrapperFlex)}},labelStyle(){return{...this.getFlexStyle(this.labelFlex)}}},mounted(){this.commit(),this.removeFn=this.form?.instance?.addField(this)},[M.componentHooks.beforeUnmount](){this.removeFn?.()},methods:{register(l){this.fields=this.fields||[],this.fields.push(l)},unregister(l){this.fields=A.removeItems(this.fields,l)},commit(){this.initialItems=u.cloneDeep(this.items)},resetField(){S.$emit(this,"update:items",u.cloneDeep(this.initialItems))},isDirty(){return!A.isEqual(this.initialItems,this.items)},isDisabled(){return this.fields.every(l=>l.isFieldDisabled)},onRemoveField(l){S.$emit(this,"update:items",this.items.filter(w=>w!==l)),S.$emit(this,"remove-item",l)},onAddField(){S.$emit(this,"add-item")},getFlexStyle(l){let w={};const I=A.isObject(l)?this.$breakpointManager.getSuitableValue(l):l;return I===!1?{}:(A.isNumberLike(I)||(w.flex=I),A.isNumberUnit(I)&&(w.width=I,w["flex-grow"]=0,w["flex-shrink"]=0),w)}}}),d={key:0},v={class:"actions-wrapper"};function b(l,w,I,C,h,c){const m=_.resolveComponent("v-icon"),T=_.resolveComponent("v-button"),D=_.resolveComponent("v-col"),O=_.resolveComponent("v-row"),N=_.resolveDirective("syno-id");return _.withDirectives((_.openBlock(),_.createElementBlock("div",{class:_.normalizeClass(["v-form-incremental-wrapper v-form-multi-wrapper",l.wrapperCls]),style:_.normalizeStyle(l.wrapperStyle)},[l.hideLabel?_.createCommentVNode("",!0):(_.openBlock(),_.createElementBlock("div",{key:0,class:_.normalizeClass(l.labelCls),style:_.normalizeStyle(l.labelStyle)},[_.renderSlot(l.$slots,"label",{label:l.label},()=>[_.renderSlot(l.$slots,"label-before"),l.label?(_.openBlock(),_.createElementBlock("label",d,_.toDisplayString(l.label),1)):_.createCommentVNode("",!0),_.renderSlot(l.$slots,"label-after")])],6)),_.createElementVNode("div",{class:_.normalizeClass(l.itemsWrapperCls),style:_.normalizeStyle(l.itemsWrapperStyle)},[_.createElementVNode("div",{class:_.normalizeClass(l.itemsCls)},[(_.openBlock(!0),_.createElementBlock(_.Fragment,null,_.renderList(l.items,(z,H)=>(_.openBlock(),_.createBlock(O,{key:H,"flex-wrap":!1,gap:l.gap,class:"v-form-incremental-row"},{default:_.withCtx(()=>[_.renderSlot(l.$slots,"default",{item:z}),_.createVNode(D,{flex:"none"},{default:_.withCtx(()=>[_.renderSlot(l.$slots,"remove-field",{disabled:l.isRemoveDisabled,item:z},()=>[_.createVNode(T,{"syno-id":`${l.synoId}-remove-${H}`,display:"icon",onClick:$=>l.onRemoveField(z),disabled:l.isRemoveDisabled},{icon:_.withCtx(()=>[_.createVNode(m,{name:"incremental-form-multiple-item-minus","svg-icon-set":"set01"})]),_:2},1032,["syno-id","onClick","disabled"])])]),_:2},1024)]),_:2},1032,["gap"]))),128))],2),_.createElementVNode("div",v,[_.renderSlot(l.$slots,"actions",{disabledAdd:l.innerDisabledAddButton},()=>[_.createVNode(T,{"syno-id":`${l.synoId}-add`,display:"icon-text",onClick:l.onAddField,disabled:l.innerDisabledAddButton},{icon:_.withCtx(()=>[_.createVNode(m,{name:"incremental-form-multiple-item-plus","svg-icon-set":"set01"})]),default:_.withCtx(()=>[_.createTextVNode(" "+_.toDisplayString(l.innerAddText),1)]),_:1},8,["syno-id","onClick","disabled"])])])],6)],6)),[[N]])}var s=p.default(y,[["render",b]]);x.default=s}(J2)),J2}var Z2={},BY;function Iee(){return BY||(BY=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=ht(),k=St();const F=M.defineComponent({name:"HighlightBox",components:{},mixins:[],props:{color:{type:String,default:"blue"},hideInnerCls:{type:Boolean,default:!1}},data:()=>({prefixCls:"v-highlight-box"}),computed:{wrapperCls(){return[this.prefixCls,`${this.prefixCls}-${this.color}`]},innerCls(){return[{[`${this.prefixCls}-inner`]:!this.hideInnerCls}]}}});function B(E,A,u,o,S,_){return M.openBlock(),M.createElementBlock("div",{class:M.normalizeClass(E.wrapperCls)},[M.createElementVNode("div",{class:M.normalizeClass(E.innerCls)},[M.renderSlot(E.$slots,"default")],2)],2)}var G=k.default(F,[["render",B]]);x.default=G}(Z2)),Z2}var Q2={},eB={},LY;function mwe(){return LY||(LY=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Xn(),k=ln(),F=Dr(),B=ht(),G=St();const E=B.defineComponent({props:{height:{type:[String,Number],default:214},minHeight:{type:[String,Number],default:40},maxHeight:{type:[String,Number],default:1e3},enable:{type:Boolean,default:!1}},emits:["resize-end"],data(){return{}},computed:{indicatorStyle(){return{top:0,left:0}},indicatorClass(){return{enabled:this.enable}}},mounted(){this.removeListener=this.register()},[M.componentHooks.beforeUnmount](){this.removeListener?.()},methods:{createIndicator(_){const{width:p,top:f,left:y}=this.$refs.indicator.getBoundingClientRect(),[d,v]=this.$alignManager.getScroll(document.body),b=document.createElement("div");return F.css(b,"width",`${p}px`),F.css(b,"left",`${y+d}px`),F.css(b,"top",`${f+v}px`),F.addClass(b,"info-board-dragging-indicator"),_.appendChild(b),b},moveIndicator(_,p){let{y:f}=p;const[,y]=this.$alignManager.getScroll(document.body);F.css(_,"top",`${f+y}px`)},removeIndicator(_){_&&_.parentNode&&_.parentNode.removeChild(_)},register(){let _={start:0,dragging:!1,diff:0},p=null;const f=v=>{v.stopPropagation(),_.dragging&&(_.diff=v.clientY-_.start,_.diff>0?_.diff=Math.min(+this.height-+this.minHeight,_.diff):_.diff=-Math.min(+this.maxHeight-+this.height,Math.abs(_.diff)),this.moveIndicator(p,{y:_.start+_.diff}))},y=v=>{v.stopPropagation(),_.dragging&&(F.off(document,"mousemove",f),this.removeIndicator(p),k.$emit(this,"resize-end",{newHeight:this.height-_.diff})),_.dragging=!1,_.start=0,_.diff=0},d=v=>{this.enable&&(p=this.createIndicator(document.body),v.stopPropagation(),document.onselectstart=()=>!1,document.ondragstart=()=>!1,_.start=v.clientY,_.dragging=!0,F.once(document,"mouseup",y),F.on(document,"mousemove",f))};return F.on(this.$refs.indicator,"mousedown",d),()=>F.off(this.$refs.indicator,"mousedown",d)}}}),u=[B.createElementVNode("div",{class:"ghost"},null,-1)];function o(_,p,f,y,d,v){return B.openBlock(),B.createElementBlock("div",{ref:"indicator",class:B.normalizeClass(["info-board-indicator",_.indicatorClass]),style:B.normalizeStyle(_.indicatorStyle)},u,6)}var S=G.default(E,[["render",o]]);x.default=S}(eB)),eB}var FY;function xee(){return FY||(FY=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=mwe(),k=fr(),F=wa(),B=vr(),G=kr(),E=ht(),A=St();B.register("info-board-up",G.vIconChevronUp),B.register("info-board-down",G.vIconChevronDown);const u=E.defineComponent({name:"InfoBoard",components:{vInfoBoardDraggable:M.default,vScrollbar:F.default},mixins:[k.provide("info-board"),B.default],props:{title:{type:String,default:"title"},defaultExpand:{type:Boolean,default:!1},height:{type:[String,Number],default:216},minHeight:{type:[String,Number],default:42},maxHeight:{type:[String,Number],default:1e3},isEmpty:{type:Boolean,default:!1}},data(){return{expand:!1,currentHeight:this.height}},computed:{contentStyle(){return{height:`${this.currentHeight}px`}},borderClass(){return{expanded:this.expand}},iconName(){return this.expand?"info-board-down":"info-board-up"}},watch:{defaultExpand:{handler(d){this.expand=d},immediate:!0},height:{handler(d){this.currentHeight=d},immediate:!0}},methods:{onResizeEnd(d){let{newHeight:v}=d;this.currentHeight=v},onToggleExpand(){this.expand=!this.expand}}}),o={ref:"title",class:"board-title"},S={class:"title"},_={key:0,class:"board-content"},p={key:0,class:"empty"};function f(d,v,b,s,l,w){const I=E.resolveComponent("v-info-board-draggable"),C=E.resolveComponent("v-icon"),h=E.resolveComponent("v-scrollbar"),c=E.resolveComponent("v-slide-up-down-transition"),m=E.resolveDirective("syno-id");return E.withDirectives((E.openBlock(),E.createElementBlock("div",{class:E.normalizeClass(["info-board-wrapper",d.borderClass])},[E.createVNode(I,{height:d.currentHeight,"min-height":d.minHeight,"max-height":d.maxHeight,enable:d.expand,onResizeEnd:d.onResizeEnd},null,8,["height","min-height","max-height","enable","onResizeEnd"]),E.createElementVNode("div",o,[E.createElementVNode("span",S,[E.renderSlot(d.$slots,"title",{},()=>[E.createTextVNode(E.toDisplayString(d.title),1)])]),E.createVNode(C,{name:d.iconName,class:"expand-icon",onClick:d.onToggleExpand,"svg-icon-set":"set14"},null,8,["name","onClick"])],512),E.createVNode(c,null,{default:E.withCtx(()=>[d.expand?(E.openBlock(),E.createElementBlock("div",_,[E.createElementVNode("div",{class:"border-content-inner",style:E.normalizeStyle(d.contentStyle)},[d.isEmpty?(E.openBlock(),E.createElementBlock("div",p,[E.renderSlot(d.$slots,"empty")])):(E.openBlock(),E.createBlock(h,{key:1},{default:E.withCtx(()=>[E.renderSlot(d.$slots,"default",{},()=>[E.createTextVNode(" defualt content ")])]),_:3}))],4)])):E.createCommentVNode("",!0)]),_:3})],2)),[[m]])}var y=A.default(u,[["render",f]]);x.default=y}(Q2)),Q2}var tB={},VY;function Tee(){return VY||(VY=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=ht(),k=St();const F=M.defineComponent({name:"InfoMask",mixins:[],props:{active:{type:Boolean,default:!0}},data(){return{}}}),B={class:"v-info-mask-wrapper"},G={key:0,class:"v-info-mask"},E={class:"info-content-wrapper"},A={class:"info-content"};function u(S,_,p,f,y,d){return M.openBlock(),M.createElementBlock("div",B,[M.renderSlot(S.$slots,"inner"),S.active?(M.openBlock(),M.createElementBlock("div",G,[M.createElementVNode("div",E,[M.createElementVNode("div",A,[M.renderSlot(S.$slots,"default")])])])):M.createCommentVNode("",!0)])}var o=k.default(F,[["render",u]]);x.default=o}(tB)),tB}var nB={},rB={},HY;function I5(){return HY||(HY=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Dr(),k=Kt(),F=Xn();const B=150;var G={[F.directiveHooks.mounted](E,A){const u=k.isFunction(A.value)?A.value:k.noop,o=()=>{let S=!1;const _=()=>{S=!0,u()===!1&&p()},p=()=>{window.clearInterval(f),S||_()},f=window.setInterval(()=>{_()},B);M.once(document,"mouseup",p)};M.on(E,"mousedown",o)}};x.default=G}(rB)),rB}var $Y;function kee(){return $Y||($Y=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Ni(),k=ln(),F=ls(),B=Kt(),G=Qo(),E=I5(),A=Ru(),u=Eu(),o=lc(),S=Tl(),_=xl(),p=vr(),f=kr(),y=ht(),d=St();p.register("input-steppers-plus",f.vIconPlusS),p.register("input-steppers-minus",f.vIconMinusS),p.register("input-steppers-up",f.vIconInputSteppersUp),p.register("input-steppers-down",f.vIconInputSteppersDown);const v=["up-down","right-left"],b=y.defineComponent({name:"InputSteppers",directives:{pressing:E.default,clickoutside:A.default},components:{vIcon:F.default,vMenu:u.default,vMenuItem:o.default},mixins:[_.default,S.default,p.default],props:{controlsType:{type:String,default:"right-left",validator(O){return v.includes(O)}},width:{type:Number,default:120},hasDivider:{type:Boolean,default:!0},alignment:{type:Object,default:()=>({pos:"tl->bl",offset:[0,1]})},[M.componentsProps.value()]:{type:Number,default:0},min:{type:[Number,String],default:Number.MIN_SAFE_INTEGER},max:{type:[Number,String],default:Number.MAX_SAFE_INTEGER},step:{type:[Number,String],default:1},menu:{type:Array,default:()=>[]},disabled:{type:Boolean,default:!1},selectOnFocus:{type:Boolean,default:!0},patchNum:{type:Function,default:void 0}},emits:["update:model-value"],data(){return{innerValue:0,showMenu:!1}},computed:{isUpDownControlsType(){return this.controlsType==="up-down"},isRightLeftControlsType(){return this.controlsType==="right-left"},wrapperStyle(){return{width:`${this.width}px`}},isPlusDisabled(){return+this.innerValue>=+this.max},isMinusDisabled(){return+this.innerValue<=+this.min},plusIconCls(){return{disabled:this.isPlusDisabled||this.disabled}},minusIconCls(){return{disabled:this.isMinusDisabled||this.disabled}},wrapperCls(){return["v-input-steppers-wrapper",this.controlsType,{"has-divider":this.hasDivider,disabled:this.disabled,"show-menu":this.showMenu}]},hasMenu(){return this.menu.length>0}},watch:{[M.componentsProps.value()]:{handler(O){this.innerValue=O},immediate:!0}},methods:{onFocus(){this.showMenu=!0,this.isFocused=!0,this.selectOnFocus&&this.$refs.input?.select()},onBlur(){this.applyValue(parseFloat(this.$refs.input.value))},applyValue(O){if((!B.isNumber(O)||isNaN(O))&&(O=this.innerValue),B.isFunction(this.patchNum)){const N=this.patchNum(O);N===!1?O=this.innerValue:O=N}this.setValue(O)},onClickoutside(){this.showMenu=!1},onMinus(){if(this.showMenu=!1,this.disabled||this.isMinusDisabled)return!1;this.applyValue(this.innerValue-+this.step)},onPlus(){if(this.showMenu=!1,this.disabled||this.isPlusDisabled)return!1;this.applyValue(this.innerValue+ +this.step)},setValue(O){const N=B.clampValue(O,+this.min,+this.max);this.$refs.input.value=N,N!==this.innerValue&&k.$emit(this,M.getModelEventName(this),N)},selectValue(O){this.setValue(O)},onKeyDown(O){this.showMenu=!1,G.isUpArrow(O)?(O.preventDefault(),this.onPlus()):G.isDownArrow(O)?(O.preventDefault(),this.onMinus()):G.isEnter(O)&&this.applyValue(parseFloat(this.$refs.input.value))}}}),s={key:0,class:"border-minus-wrapper"},l={key:0,class:"stepper-border border-minus"},w=["value","disabled","step"],I={key:1,class:"border-plus-wrapper"},C={key:0,class:"stepper-border border-plus"},h={key:2,class:"up-down-wrapper"},c=y.createElementVNode("div",{class:"stepper-border"},null,-1),m={class:"up-down-icon-wrapper"};function T(O,N,z,H,$,V){const P=y.resolveComponent("v-icon"),U=y.resolveComponent("v-menu-item"),Y=y.resolveComponent("v-menu"),Z=y.resolveComponent("v-portal"),X=y.resolveDirective("pressing"),J=y.resolveDirective("clickoutside");return y.openBlock(),y.createElementBlock("div",{class:y.normalizeClass(O.wrapperCls),style:y.normalizeStyle(O.wrapperStyle)},[O.isRightLeftControlsType?(y.openBlock(),y.createElementBlock("div",s,[y.withDirectives(y.createVNode(P,{class:y.normalizeClass(["input-steppers-icon",O.minusIconCls]),name:"input-steppers-minus","svg-icon-set":"set13"},null,8,["class"]),[[X,O.onMinus]]),O.hasDivider?(y.openBlock(),y.createElementBlock("div",l)):y.createCommentVNode("",!0)])):y.createCommentVNode("",!0),y.withDirectives(y.createElementVNode("input",{ref:"input",type:"number",class:"number",value:O.innerValue,disabled:O.disabled,step:O.step,onBlur:N[0]||(N[0]=function(){return O.onBlur&&O.onBlur(...arguments)}),onFocus:N[1]||(N[1]=function(){return O.onFocus&&O.onFocus(...arguments)}),onKeydown:N[2]||(N[2]=function(){return O.onKeyDown&&O.onKeyDown(...arguments)})},null,40,w),[[J,O.onClickoutside,void 0,{children:!0}]]),O.isRightLeftControlsType?(y.openBlock(),y.createElementBlock("div",I,[O.hasDivider?(y.openBlock(),y.createElementBlock("div",C)):y.createCommentVNode("",!0),y.withDirectives(y.createVNode(P,{class:y.normalizeClass(["input-steppers-icon",O.plusIconCls]),name:"input-steppers-plus","svg-icon-set":"set13"},null,8,["class"]),[[X,O.onPlus]])])):y.createCommentVNode("",!0),O.isUpDownControlsType?(y.openBlock(),y.createElementBlock("div",h,[c,y.createElementVNode("div",m,[O.useSvgIcon?(y.openBlock(),y.createElementBlock(y.Fragment,{key:0},[y.withDirectives(y.createVNode(P,{class:y.normalizeClass(["input-steppers-icon",O.plusIconCls]),name:"input-steppers-up","svg-icon-set":"set13"},null,8,["class"]),[[X,O.onPlus]]),y.withDirectives(y.createVNode(P,{class:y.normalizeClass(["input-steppers-icon",O.minusIconCls]),name:"input-steppers-down","svg-icon-set":"set13"},null,8,["class"]),[[X,O.onMinus]])],64)):(y.openBlock(),y.createElementBlock(y.Fragment,{key:1},[y.withDirectives(y.createVNode(P,{class:y.normalizeClass(["input-steppers-icon",O.plusIconCls]),name:"input-steppers-plus"},null,8,["class"]),[[X,O.onPlus]]),y.withDirectives(y.createVNode(P,{class:y.normalizeClass(["input-steppers-icon",O.minusIconCls]),name:"input-steppers-minus"},null,8,["class"]),[[X,O.onMinus]])],64))])])):y.createCommentVNode("",!0),O.hasMenu&&O.showMenu?(y.openBlock(),y.createBlock(Z,{key:3,"mount-to":O.getContainerEl(),ref:"portal","acquire-z-index":"",alignment:O.alignment,anchor:O.$el},{default:y.withCtx(()=>[y.createVNode(Y,{width:O.width,onMenuClose:N[3]||(N[3]=q=>O.showMenu=!1)},{default:y.withCtx(()=>[(y.openBlock(!0),y.createElementBlock(y.Fragment,null,y.renderList(O.menu,q=>(y.openBlock(),y.createBlock(U,{type:"select",key:q.value,title:`${q.title}`,selected:O.innerValue===q.value,"close-on-select":"",onSelected:te=>O.selectValue(q.value)},null,8,["title","selected","onSelected"]))),128))]),_:1},8,["width"])]),_:1},8,["mount-to","alignment","anchor"])):y.createCommentVNode("",!0)],6)}var D=d.default(b,[["render",T]]);x.default=D}(nB)),nB}var iB={},zY;function Ree(){return zY||(zY=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Xn(),k=Ni(),F=fr(),B=Kt(),G=Si(),E=ls(),A=kr(),u=uh(),o=_i(),S=vr(),_=ln(),p=ht(),f=St();S.register("module-list-section-arrow-up",A.vIconChevronUp),S.register("module-list-section-arrow-down",A.vIconChevronDown),S.register("module-list-option-overview",A.vIconOverview);const y=p.defineComponent({name:"ModuleListOption",components:{vIcon:E.default,vSlideUpDownTransition:u.default},mixins:[F.inject("module-list"),F.inject("module-list-option"),F.provide("module-list-option"),S.default],props:{display:{type:String,default:""},[k.componentsProps.value()]:{required:!0,type:String,default:""},beforeSelect:{type:Function,default:B.noop},size:{type:String,default:"normal",validator:function(w){return["normal","small"].includes(w)}},hasIcon:{type:Boolean,default:!0},icon:{type:Object,default:()=>({})},disabled:{type:Boolean,default:!1},collapsible:{type:Boolean,default:!1},collapsed:{type:Boolean,default:!1},indent:{type:[Number,String],default:void 0},selectable:{type:Boolean,default:void 0}},emits:["collapsed","selected","selected"],data(){return{activated:!1,innerCollapsed:!1,subModuleActivated:!1,isSubModule:!1}},computed:{innerIndent(){return B.isDefined(this.indent)?+this.indent:this.isSubModule?1:0},innerIcon(){return o.merge({name:"module-list-option-overview",svgIconSet:"set05"},this.icon)},optionCls(){return["module-item-option",`module-item-option-${this.size}`,{"non-selectable":!this.innerSelectable,activated:this.activated,disabled:this.disabled,collapsible:this.collapsible,"has-indent":this.innerIndent>0,"sub-module-activated":this.subModuleActivated&&this.innerCollapsed,"has-action":this.collapsible||G.hasSlot(this,"action")}]},wrapperStyle(){return{"--indent":this.innerIndent}},wrapperCls(){return["module-item-wrapper","module-item-option-wrapper",{"is-sub-module":this.isSubModule}]},innerSelectable(){return B.isDefined(this.selectable)?this.selectable:!this.collapsible}},watch:{collapsed:{handler(w){this.innerCollapsed=w},immediate:!0}},created(){this.subModules=[]},mounted(){this.unwatchers=[],this["module-list"]&&this["module-list"].register(this,w=>{this.unwatchers.push(w.$watch(k.getModelPropName(),this.onCurrentSelectedChanged,{immediate:!0}))}),this["module-list-option"]&&(this.isSubModule=!0,this.removeSelfFromParentModule=this["module-list-option"].instance?.appendSubModule(this))},[M.componentHooks.beforeUnmount](){if(this["module-list"]){this["module-list"].unregister(this);for(const w of this.unwatchers)w()}this.removeSelfFromParentModule?.()},methods:{hasAction(){return this.collapsible||G.hasSlot(this,"action")},appendSubModule(w){return this.subModules=this.subModules??[],this.subModules.push(w),()=>{B.removeItems(this.subModules,w)}},onCurrentSelectedChanged(w){this.innerSelectable&&(this.activated=w===k.getModelValue(this)),this.subModuleActivated=this.subModules.some(I=>k.getModelValue(I)===w)},async onBeforeSelect(){if(this.activated)return!0;if(await this.beforeSelect()===!1)return!1},async onSelect(w,I){if(this.collapsible&&(this.innerCollapsed=!this.innerCollapsed,_.$emit(this,"collapsed",this.innerCollapsed)),this.innerSelectable){if(this.disabled||await this.onBeforeSelect()===!1)return!1;_.$emit(this,"selected",k.getModelValue(this),this,I)}}}}),d={class:"module-item-text"},v={key:1,class:"action-wrapper"},b={key:0,class:"sub-module-options"};function s(w,I,C,h,c,m){const T=p.resolveComponent("v-icon"),D=p.resolveComponent("v-slide-up-down-transition");return p.openBlock(),p.createElementBlock("div",{class:p.normalizeClass(w.wrapperCls),style:p.normalizeStyle(w.wrapperStyle)},[p.createElementVNode("li",{class:p.normalizeClass(w.optionCls),onClick:I[0]||(I[0]=function(){return w.onSelect&&w.onSelect(...arguments)}),tabindex:"-1",role:"menuitem"},[w.hasIcon?(p.openBlock(),p.createBlock(T,p.mergeProps({key:0,class:"module-item-icon"},w.innerIcon),{default:p.withCtx(()=>[p.renderSlot(w.$slots,"icon-inner")]),_:3},16)):p.createCommentVNode("",!0),p.renderSlot(w.$slots,"text",{},()=>[p.createElementVNode("div",d,p.toDisplayString(w.display),1)]),w.hasAction()?(p.openBlock(),p.createElementBlock("div",v,[p.renderSlot(w.$slots,"action"),w.collapsible?(p.openBlock(),p.createBlock(T,{key:0,name:w.innerCollapsed?"module-list-section-arrow-down":"module-list-section-arrow-up",class:"module-item-arrow","svg-icon-set":"set31"},null,8,["name"])):p.createCommentVNode("",!0)])):p.createCommentVNode("",!0)],2),p.createVNode(D,null,{default:p.withCtx(()=>[w.innerCollapsed?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("div",b,[p.renderSlot(w.$slots,"default")]))]),_:3})],6)}var l=f.default(y,[["render",s]]);x.default=l}(iB)),iB}var oB={},WY;function Eee(){return WY||(WY=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Xn(),k=fr(),F=vr(),B=kr(),G=Kt(),E=Si(),A=ht(),u=St();F.register("module-list-section-arrow-up",B.vIconChevronUp),F.register("module-list-section-arrow-down",B.vIconChevronDown);const o=A.defineComponent({name:"ModuleListSection",mixins:[F.default,k.inject("module-list-option")],props:{display:{type:String,default:""},collapsible:{type:Boolean,default:!0},collapsed:{type:Boolean,default:!1},indent:{type:[Number,String],default:void 0}},data(){return{innerCollapsed:!1,isSubModule:!1}},computed:{innerIndent(){return G.isDefined(this.indent)?+this.indent:this.isSubModule?1:0},wrapperCls(){return["module-item-wrapper","module-item-section",{collapsed:this.innerCollapsed,collapsible:this.collapsible,"has-indent":this.innerIndent>0,"is-sub-module":this.isSubModule}]},wrapperStyle(){return{"--indent":this.innerIndent}}},watch:{collapsed:{handler(b){this.innerCollapsed=b},immediate:!0}},mounted(){this["module-list-option"]&&(this.isSubModule=!0)},[M.componentHooks.beforeUnmount](){this.removeSelfFromParentModule?.()},methods:{hasActionSlot(){return E.hasSlot(this,"action")},onClick(){this.innerCollapsed=!this.innerCollapsed}}}),S=["aria-label"],_={class:"module-item"},p={class:"module-section-item-text"},f={key:0,class:"action-wrapper"},y={key:0,class:"module-options"};function d(b,s,l,w,I,C){const h=A.resolveComponent("v-icon"),c=A.resolveComponent("v-slide-up-down-transition");return A.openBlock(),A.createElementBlock("li",{class:A.normalizeClass(b.wrapperCls),style:A.normalizeStyle(b.wrapperStyle),role:"group","aria-label":b.display},[A.createElementVNode("div",_,[A.createElementVNode("div",{class:"module-item-content",onClick:s[0]||(s[0]=m=>b.collapsible&&b.onClick())},[b.collapsible?(A.openBlock(),A.createBlock(h,{key:0,name:b.innerCollapsed?"module-list-section-arrow-down":"module-list-section-arrow-up",class:"module-item-arrow","svg-icon-set":"set31"},null,8,["name"])):A.createCommentVNode("",!0),A.renderSlot(b.$slots,"text",{},()=>[A.createElementVNode("div",p,A.toDisplayString(b.display),1)])]),b.hasActionSlot()?(A.openBlock(),A.createElementBlock("div",f,[A.renderSlot(b.$slots,"action")])):A.createCommentVNode("",!0)]),A.createVNode(c,null,{default:A.withCtx(()=>[b.innerCollapsed?A.createCommentVNode("",!0):(A.openBlock(),A.createElementBlock("div",y,[A.renderSlot(b.$slots,"default")]))]),_:3})],14,S)}var v=u.default(o,[["render",d]]);x.default=v}(oB)),oB}var aB={},UY;function Aee(){return UY||(UY=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=ht(),k=St();const F=M.defineComponent({name:"ModuleListDivider"}),B={class:"module-list-divider"};function G(A,u,o,S,_,p){return M.openBlock(),M.createElementBlock("div",B)}var E=k.default(F,[["render",G]]);x.default=E}(aB)),aB}var sB={},GY;function Mee(){return GY||(GY=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Xn(),k=Yl(),F=ht(),B=St();const G=F.defineComponent({name:"OverflowText",props:{content:{type:String,required:!0,default:""},tailLength:{type:Number,default:0},tailBeginWith:{type:String,default:null}},data(){return{displayContent:""}},watch:{content:{immediate:!0,handler(){this.genDisplayContent()}}},mounted(){this.disposeFn=k.addResizeListener(this.$el,this.genDisplayContent,this)},[M.componentHooks.beforeUnmount](){this.disposeFn?.()},methods:{async genDisplayContent(){const _=this.content.length-this.tailLength,p=this.content.includes(this.tailBeginWith)?this.content.lastIndexOf(this.tailBeginWith):this.content.length,f=Math.min(_,p);let y=this.content.slice(0,f),d=this.content.slice(f);for(this.displayContent=y+d,await this.$nextTick();(this.$refs.measure?.getBoundingClientRect()?.width??0)<.8&&(y.length>0||d.length>0);)y.length>0?y=y.slice(0,-1):d.length>0&&(d=d.slice(1)),this.displayContent=`${y}...${d}`,await this.$nextTick()}}}),E={class:"v-overflow-text"},A={class:"v-overflow-text-content"},u={class:"v-overflow-text-spacer",ref:"measure"};function o(_,p,f,y,d,v){return F.openBlock(),F.createElementBlock("div",E,[F.createElementVNode("div",A,F.toDisplayString(_.displayContent),1),F.createElementVNode("div",u,null,512)])}var S=B.default(G,[["render",o]]);x.default=S}(sB)),sB}var lB={},jY;function x5(){return jY||(jY=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Xn(),k=Kt(),F=Yl(),B=Dr(),G=ht(),E=St();const A="#FFFFFF",u=.9,o=G.defineComponent({name:"ProgressBar",props:{title:{type:[String,Boolean],default:""},percentText:{type:[String,Boolean],default:""},percent:{type:[String,Number,Array],default:0},segmentBorder:{type:Object,default:()=>({})},info:{type:[String,Boolean],default:""},paused:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},wait:{type:Boolean,default:!1}},data(){return{hiddenSegment:new Set}},computed:{hasTitle(){return this.title!==!1},hasPercentText(){return this.percentText!==!1},hasInfo(){return this.info!==!1},isMultipleSegments(){return k.isArray(this.percent)},segments(){return this.percent.filter(s=>!this.hiddenSegment.has(s.id))},titleTip(){return{overflowOnly:!0,content:this.title}},progressOuterClass(){return{disabled:this.disabled}},progressPercentClass(){return{"progress-bar-inner":!0,paused:this.paused,"progress-bar-inner--waiting":this.wait,"progress-bar-inner--full":parseInt(this.percent,10)>=100}},progressPercentStyle(){return{width:`${k.clampValue(+this.percent,0,100)}%`}}},watch:{percent:{handler(s){this.onResize()},immediate:!0}},mounted(){this.$options.disposedFn=F.addResizeListener(this.$el,this.onResize.bind(this))},[M.componentHooks.beforeUnmount](){this.$options.disposedFn?.()},methods:{async onResize(){if(this.isMultipleSegments){this.hiddenSegment=new Set,await this.$nextTick();for(const s of this.segments){const l=this.$refs[`seg-${s.id}`]?.[0],w=l?.getBoundingClientRect(),I=parseInt(B.css(l,"border-right-width"),10);w&&w.width<u+I&&this.hiddenSegment.add(s.id)}this.hiddenSegment=new Set(this.hiddenSegment)}},getSegmentBorderSize(s){return(s.border??this.segmentBorder??{})?.size??0},getSegmentBorderColor(s){return(s.border??this.segmentBorder??{})?.color??A},getSegmentStyle(s){return{width:`${k.clampValue(+s.value,0,100)}%`,backgroundColor:s.color,"--border-size":`${this.getSegmentBorderSize(s)}px`,"--border-color":this.getSegmentBorderColor(s)}}}}),S={class:"progress-wrapper"},_={key:0,class:"progress-title-wrapper"},p={key:0,class:"progress-title"},f={key:1,class:"progress-percent"},y={key:0,class:"segments-outer"},d={key:1,class:"progress-info"};function v(s,l,w,I,C,h){const c=G.resolveDirective("tooltip");return G.openBlock(),G.createElementBlock("div",S,[s.hasTitle||s.hasPercentText?(G.openBlock(),G.createElementBlock("div",_,[s.hasTitle?G.withDirectives((G.openBlock(),G.createElementBlock("div",p,[G.createTextVNode(G.toDisplayString(s.title),1)])),[[c,s.titleTip]]):G.createCommentVNode("",!0),s.hasPercentText?(G.openBlock(),G.createElementBlock("div",f,G.toDisplayString(s.percentText),1)):G.createCommentVNode("",!0)])):G.createCommentVNode("",!0),G.createElementVNode("div",{class:G.normalizeClass(["progress-bar-outer",s.progressOuterClass])},[s.isMultipleSegments?(G.openBlock(),G.createElementBlock("div",y,[(G.openBlock(!0),G.createElementBlock(G.Fragment,null,G.renderList(s.segments,m=>(G.openBlock(),G.createElementBlock("div",{key:m.id||m.color,class:"segment-inner",style:G.normalizeStyle(s.getSegmentStyle(m)),ref_for:!0,ref:`seg-${m.id}`},null,4))),128))])):(G.openBlock(),G.createElementBlock("div",{key:1,class:G.normalizeClass(s.progressPercentClass),style:G.normalizeStyle(s.progressPercentStyle)},null,6))],2),s.hasInfo?(G.openBlock(),G.createElementBlock("div",d,G.toDisplayString(s.info),1)):G.createCommentVNode("",!0)])}var b=E.default(o,[["render",v]]);x.default=b}(lB)),lB}var uB={},qY;function Dee(){return qY||(qY=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=dT(),k=lh(),F=Tl(),B=fr(),G=Ni(),E=ln(),A=ht(),u=St();const o=A.defineComponent({name:"RadioGroup",components:{vRadio:M.default},mixins:[F.default,B.provide("radio-group"),B.provide("form-controls-group")],props:{[G.componentsProps.value()]:{type:[String,Number,Boolean],default:""},data:{type:Array,default:()=>[]},disabled:{type:Boolean,default:!1},size:{type:String,default:""},name:{type:String,default(){return`syno-${k.uuid()}`}},deactiveChildrenFormItems:{type:Function,default:()=>M.default}},emits:["change","update:model-value"],data(){return{prefixCls:"v-radio-group",hasSlot:!1,selectValue:"",model:""}},computed:{ariaLabelledby(){const f=this.data.find(y=>y.value===this.innerValue);return f&&this.getRadioId(f.value)},wrapperCls(){return[this.prefixCls]},innerValue(){return G.getModelValue(this)}},mounted(){this.$slots&&this.$slots.default&&(this.hasSlot=!0)},created(){if(this.model=this.innerValue,this.disabled)for(const f of this.data)f.disabled=!0},methods:{change(f){this.model=f,E.$emit(this,G.getModelEventName(this),f),E.$emit(this,"change",f)},getRadioSynoId(f){return`${this.synoId}-${f}`},getRadioId(f){return`${this.name}-${f}`}}}),S=["aria-labelledby"];function _(f,y,d,v,b,s){const l=A.resolveComponent("v-radio"),w=A.resolveDirective("syno-id");return A.withDirectives((A.openBlock(),A.createElementBlock("div",{class:A.normalizeClass(f.wrapperCls),role:"radiogroup","aria-labelledby":f.ariaLabelledby,onBlur:y[0]||(y[0]=function(){return f.onBlur&&f.onBlur(...arguments)}),tabindex:"-1"},[A.renderSlot(f.$slots,"default"),f.hasSlot?A.createCommentVNode("",!0):(A.openBlock(!0),A.createElementBlock(A.Fragment,{key:0},A.renderList(f.data,I=>(A.openBlock(),A.createBlock(l,{"syno-id":f.getRadioSynoId(I.value),id:f.getRadioId(I.value),key:f.getRadioId(I.value),disabled:I.disabled,value:I.value,name:f.name},{default:A.withCtx(()=>[A.createTextVNode(A.toDisplayString(I.text),1)]),_:2},1032,["syno-id","id","disabled","value","name"]))),128))],42,S)),[[w]])}var p=u.default(o,[["render",_]]);x.default=p}(uB)),uB}var hB={},YY;function Oee(){return YY||(YY=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Ni(),k=ln(),F=Tl(),B=ci(),G=Kt(),E=sh(),A=Qx(),u=ht(),o=St();const S=u.defineComponent({name:"ScheduleField",components:{vSelectBaseOption:E.default,vSelectDividerOption:A.default},mixins:[B.default,F.default],props:{[M.componentsProps.value()]:{type:Array,default:()=>[]},emptyValue:{type:[Boolean,Array],default:()=>[0,1,2,3,4,5,6]},disabled:{type:Boolean,default:!1}},emits:["update:model-value"],data(){return{actions:["daily","weekend","weekdays"],activated:{daily:!1,weekend:!1,weekdays:!1},days:[{label:this._i18n("uicommon","schedule_sun"),value:0,abbre_label:this._i18n("uicommon","schedule_abbre_sun")},{label:this._i18n("uicommon","schedule_mon"),value:1,abbre_label:this._i18n("uicommon","schedule_abbre_mon")},{label:this._i18n("uicommon","schedule_tue"),value:2,abbre_label:this._i18n("uicommon","schedule_abbre_tue")},{label:this._i18n("uicommon","schedule_wed"),value:3,abbre_label:this._i18n("uicommon","schedule_abbre_wed")},{label:this._i18n("uicommon","schedule_thu"),value:4,abbre_label:this._i18n("uicommon","schedule_abbre_thu")},{label:this._i18n("uicommon","schedule_fri"),value:5,abbre_label:this._i18n("uicommon","schedule_abbre_fri")},{label:this._i18n("uicommon","schedule_sat"),value:6,abbre_label:this._i18n("uicommon","schedule_abbre_sat")}]}},computed:{displayText(){const f=new Set(M.getModelValue(this));return f.size===7?this._i18n("uicommon","schedule_daily"):f.size===2&&f.has(0)&&f.has(6)?this._i18n("uicommon","schedule_weekend"):f.size===5&&!f.has(0)&&!f.has(6)?this._i18n("uicommon","schedule_weekdays"):M.getModelValue(this).slice().map(d=>this.days[d].abbre_label).join(this._i18n("common","comma"))},innerValue(){return M.getModelValue(this)}},methods:{onInput(f){k.$emit(this,M.getModelEventName(this),f.sort())},setActive(f,y){this.activated[f]=y},onActionClick(f){f==="daily"?k.$emit(this,M.getModelEventName(this),[0,1,2,3,4,5,6]):f==="weekend"?k.$emit(this,M.getModelEventName(this),[0,6]):k.$emit(this,M.getModelEventName(this),[1,2,3,4,5])},onCloseDropdown(){if(this.emptyValue&&M.getModelValue(this).length===0){const f=G.isArray(this.emptyValue)?this.emptyValue.slice():[0,1,2,3,4,5,6];k.$emit(this,M.getModelEventName(this),f)}}}});function _(f,y,d,v,b,s){const l=u.resolveComponent("v-select-base-option"),w=u.resolveComponent("v-select-divider-option"),I=u.resolveComponent("v-multiple-select");return u.openBlock(),u.createBlock(I,{"syno-id":f.synoId,class:"schedule-field","display-mode":"text",value:f.innerValue,"model-value":f.innerValue,options:f.days,"display-text":f.displayText,disabled:f.disabled,"active-form-item":!1,"max-height":"none",onInput:f.onInput,"onUpdate:modelValue":f.onInput,onCloseDropdown:f.onCloseDropdown},{"top-actions":u.withCtx(()=>[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(f.actions,C=>(u.openBlock(),u.createBlock(l,{key:C,class:"schedule-base-option",option:{icon:{name:"schedule",sprite:!0}},display:f._i18n("uicommon",`schedule_${C}`),onHover:h=>f.setActive(C,!0),onHoverOut:h=>f.setActive(C,!1),onClick:h=>f.onActionClick(C),activated:f.activated[C]},null,8,["display","onHover","onHoverOut","onClick","activated"]))),128)),u.createVNode(w)]),_:1},8,["syno-id","value","model-value","options","display-text","disabled","onInput","onUpdate:modelValue","onCloseDropdown"])}var p=o.default(S,[["render",_]]);x.default=p}(hB)),hB}var cB={},KY;function Nee(){return KY||(KY=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Xn(),k=Ni(),F=nd(),B=ln(),G=_i(),E=Zo(),A=ci(),u=Tl(),o=Yl(),S=Kt(),_=vr(),p=kr(),f=ht(),y=St();const d=24,v=100;_.register("schedule-table-pen",p.vIconPen);const b=f.defineComponent({name:"ScheduleTable",mixins:[E.default,u.default,_.default,A.default],props:{prefix:{type:String,default:"v-schedule"},options:{type:Array,required:!0,default:()=>[]},splitMinute:{type:Number,default:60,validator(O){return O===60||O===30||O===15}},[k.componentsProps.value()]:{type:String,validator(O){return O?O.length%168===0:!1},required:!0},optionsCountPerRow:{type:Number,default:3},optionsMaxWidth:{type:[String,Number],default:"1fr"}},emits:["edit-option","selected","update:model-value"],data(){return{btnWrapperWidth:"100%",selected:0,hoverOption:void 0,days:[this._i18n("uicommon","schedule_abbre_sun"),this._i18n("uicommon","schedule_abbre_mon"),this._i18n("uicommon","schedule_abbre_tue"),this._i18n("uicommon","schedule_abbre_wed"),this._i18n("uicommon","schedule_abbre_thu"),this._i18n("uicommon","schedule_abbre_fri"),this._i18n("uicommon","schedule_abbre_sat")],hours:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23],hoverHour:-1,hoverDay:-1,hoverAll:!1,dragRange:[[-1,-1],[-1,-1]],isDragging:!1}},computed:{numbersOfHour(){return[...Array(Math.floor(60/this.splitMinute))].map((O,N)=>N)},headCls(){return[`split-${this.splitMinute}`]},btnWrapperStyle(){return{"grid-template-columns":`repeat(${this.optionsCountPerRow}, minmax(0, ${this.optionsMaxWidth}))`,width:this.btnWrapperWidth}}},created(){this.applyDragRange=G.debounce(this._applyDragRange,v)},mounted(){this.$nextTick(()=>{o.addResizeListener(this.$refs.table,this.updateBtnWrapperWidth,this)})},[M.componentHooks.beforeUnmount](){this.$el&&o.removeResizeListener(this.$refs.table,this.updateBtnWrapperWidth)},methods:{isOptionEditable(O){const N=S.isObject(O.editable)?O.editable.trigger:O.editable===!0?"hover":"none";return N==="always"?!0:N==="hover"?this.hoverOption===O:!1},onEdit(O){B.$emit(this,"edit-option",O)},onHoverOption(O){this.hoverOption=O},onHoveroutOptions(){this.hoverOption=null},updateBtnWrapperWidth(O){O.contentRect.width>0&&(this.btnWrapperWidth=`${O.contentRect.width}px`)},scheduleBtnStyle(O){return this.checkIsBuildinColor(O.color)?{}:{backgroundColor:O.color}},scheduleBtnCls(O,N){return{[`${this.prefix}-btn-icon`]:!0,[`${this.prefix}-btn-icon-clear`]:O.clear,[`${this.prefix}-btn-icon-pressed`]:N===this.selected,[`${this.prefix}-btn-icon-disabled`]:O.disabled,[`${this.prefix}-btn-icon--${O.color}`]:this.checkIsBuildinColor(O.color)}},getIndex(O,N,z){const H=this.numbersOfHour.length;return(O*d+N)*H+z},getCustomCellSlot(O,N,z){return this.getItem(O,N,z).customCellSlot},cellCls(O,N,z){const H=this.getItem(O,N,z);if(H)return["body-cell","cell-option",`split-${this.splitMinute}`,{"split-cell":z>0,"cell-option--clear":H.clear,[`cell-option--${H.color}`]:this.checkIsBuildinColor(H.color),"row-col-over":this.hoverHour===N||this.hoverDay===O||this.isInDragZone(O,N,z)||this.hoverAll}]},cellStyles(O,N,z){const H=this.getItem(O,N,z);return this.checkIsBuildinColor(H.color)?{}:{backgroundColor:H.color}},getItem(O,N,z){const H=this.getIndex(O,N,z),$=k.getModelValue(this).charAt(H);return this.options[$]||this.options[0]},checkIsBuildinColor(O){return["blue","green","orange","red","yellow"].includes(O)},onScheduleBtnSelect(O,N){this.selected=O,B.$emit(this,"selected",{index:O,option:N})},onMouseLeaveAll(O){this.hoverAll=!1},onMouseOverAll(O){this.hoverAll=!0},onMouseOverHeadCell(O){this.hoverHour=O},onMouseLeaveHeadCell(O){this.hoverHour===O&&(this.hoverHour=-1)},selectHeadCell(O){let N=k.getModelValue(this).split("");const z=this.numbersOfHour.length,H=this.days.length;for(let $=0;$<H;$++)for(let V=0;V<z;V++){const P=this.getIndex($,O,V);N[P]=this.selected}this.emitValueChage(N),this.clearDragZone()},onMouseOverDayCell(O){this.hoverDay=O},onMouseLeaveDayCell(O){this.hoverDay===O&&(this.hoverDay=-1)},selectDayCell(O){let N=k.getModelValue(this).split("");const z=this.numbersOfHour.length,H=d*z*O;for(let $=0;$<d*z;$++)N[$+H]=this.selected;this.emitValueChage(N),this.clearDragZone()},selectCell(O,N,z){let H=k.getModelValue(this).split("");const $=this.getIndex(O,N,z);H[$]=this.selected,this.emitValueChage(H),this.clearDragZone()},selectAll(){let O=k.getModelValue(this).split("");const N=this.days.length*d*this.numbersOfHour.length;for(let z=0;z<N;z++)O[z]=this.selected;this.emitValueChage(O),this.clearDragZone()},emitValueChage(O){let N=O.join("");B.$emit(this,k.getModelEventName(this),N)},clearDragZone(){this.isDragging=!1,this.dragRange=[[-1,-1],[-1,-1]]},getDragRange(){let O=Math.min(this.dragRange[0][0],this.dragRange[1][0]),N=Math.min(this.dragRange[0][1],this.dragRange[1][1]),z=Math.max(this.dragRange[0][0],this.dragRange[1][0]),H=Math.max(this.dragRange[0][1],this.dragRange[1][1]);return{startX:N,startY:O,endX:H,endY:z}},canDragCell(O){return O.hasAttribute("day")&&O.hasAttribute("hour")&&O.hasAttribute("hour-split-index")},isInDragZone(O,N,z){if(!this.isDragging)return!1;const{x:H,y:$}=this.getCoordinate(O,N,z),{startX:V,startY:P,endX:U,endY:Y}=this.getDragRange();return H>=V&&H<=U&&$>=P&&$<=Y},getCoordinate(O,N,z){const H=this.numbersOfHour.length;return{x:N*H+z,y:O}},getCellIndex(O){const N=+O.getAttribute("day"),z=+O.getAttribute("hour"),H=+O.getAttribute("hour-split-index");return this.getCoordinate(N,z,H)},onMouseDown(O){this.isDragging=!0,this.updateDragZone(O,[0,1])},updateDragZone(O){let N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0],z=O.target;if(!this.canDragCell(z)||!this.isDragging)return;let{x:H,y:$}=this.getCellIndex(z);for(let V=0;V<N.length;V++)F.set(this.dragRange,N[V],[$,H])},_applyDragRange(O){if(!this.isDragging)return;const N=this.numbersOfHour.length;let{startX:z,startY:H,endX:$,endY:V}=this.getDragRange(),P=k.getModelValue(this).split("");for(let U=H;U<=V;U++)for(let Y=z;Y<=$;Y++)U<0||Y<0||(P[U*d*N+Y]=this.selected);this.emitValueChage(P),this.clearDragZone()}}}),s=["onMouseover"],l=["syno-id","onClick"],w={class:"head-row"},C=[f.createElementVNode("div",{class:"select-all-triangle"},null,-1)],h=["syno-id","onMouseover","onMouseleave","colspan","onClick"],c=["syno-id","onMouseover","onMouseleave","onClick"],m=["syno-id","day","hour","hour-split-index","onClick"];function T(O,N,z,H,$,V){const P=f.resolveComponent("v-icon"),U=f.resolveDirective("tooltip"),Y=f.resolveDirective("syno-id");return f.withDirectives((f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(`${O.prefix}-table`)},[f.renderSlot(O.$slots,"description"),f.renderSlot(O.$slots,"options",{},()=>[f.createElementVNode("div",{class:f.normalizeClass(`${O.prefix}-btn-wrapper`),style:f.normalizeStyle(O.btnWrapperStyle),onMouseleave:N[0]||(N[0]=Z=>O.onHoveroutOptions())},[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(O.options,(Z,X)=>f.withDirectives((f.openBlock(),f.createElementBlock("span",{class:f.normalizeClass(`${O.prefix}-btn`),key:X,onMouseover:J=>O.onHoverOption(Z)},[f.createElementVNode("span",{"syno-id":`${O.synoId}-schedule-btn-${X}`,class:f.normalizeClass(O.scheduleBtnCls(Z,X)),onClick:f.withModifiers(J=>O.onScheduleBtnSelect(X,Z),["stop"])},[Z.clear?f.createCommentVNode("",!0):(f.openBlock(),f.createElementBlock("span",{key:0,class:"btn-icon-inner",style:f.normalizeStyle(O.scheduleBtnStyle(Z))},null,4))],10,l),Z.labelSlot?f.renderSlot(O.$slots,Z.labelSlot,{key:0}):f.withDirectives((f.openBlock(),f.createElementBlock("span",{key:1,class:f.normalizeClass(`${O.prefix}-btn-text`)},[f.createTextVNode(f.toDisplayString(Z.label),1)],2)),[[U,{overflowOnly:!0,content:Z.label}]]),O.isOptionEditable(Z)?(f.openBlock(),f.createBlock(P,{key:2,name:"schedule-table-pen","svg-icon-set":"set13",onClick:J=>O.onEdit(Z)},null,8,["onClick"])):f.createCommentVNode("",!0)],42,s)),[[f.vShow,!Z.hidden]])),128))],38)]),f.renderSlot(O.$slots,"detail"),f.createElementVNode("table",{ref:"table",class:f.normalizeClass(O.prefix),onMousedown:N[4]||(N[4]=Z=>O.onMouseDown(Z)),onMousemove:N[5]||(N[5]=Z=>O.updateDragZone(Z,[1])),onMouseup:N[6]||(N[6]=Z=>O.applyDragRange(Z))},[f.createElementVNode("tbody",null,[f.createElementVNode("tr",w,[f.createElementVNode("td",{class:"head-cell select-all-cell first-cell",onClick:N[1]||(N[1]=f.withModifiers(Z=>O.selectAll(),["stop"])),onMouseover:N[2]||(N[2]=function(){return O.onMouseOverAll&&O.onMouseOverAll(...arguments)}),onMouseout:N[3]||(N[3]=function(){return O.onMouseLeaveAll&&O.onMouseLeaveAll(...arguments)})},C,32),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(O.hours,(Z,X)=>(f.openBlock(),f.createElementBlock("td",{class:f.normalizeClass([O.headCls,"cell head-cell"]),"syno-id":`${O.synoId}-head-cell-${X}`,onMouseover:J=>O.onMouseOverHeadCell(X),onMouseleave:J=>O.onMouseLeaveHeadCell(X),colspan:O.numbersOfHour.length,onClick:f.withModifiers(J=>O.selectHeadCell(X),["stop"]),key:X},f.toDisplayString(Z),43,h))),128))]),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(O.days,(Z,X)=>(f.openBlock(),f.createElementBlock("tr",{class:"normal-row",key:X},[f.createElementVNode("td",{"syno-id":`${O.synoId}-first-cell-${X}`,class:"cell body-cell first-cell",onMouseover:J=>O.onMouseOverDayCell(X),onMouseleave:J=>O.onMouseLeaveDayCell(X),onClick:f.withModifiers(J=>O.selectDayCell(X),["stop"])},f.toDisplayString(Z),41,c),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(O.hours,(J,q)=>(f.openBlock(),f.createElementBlock(f.Fragment,null,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(O.numbersOfHour,te=>(f.openBlock(),f.createElementBlock(f.Fragment,null,[O.getCustomCellSlot(X,q,te)?f.renderSlot(O.$slots,O.getCustomCellSlot(X,q,te),{key:0,synoId:`${O.synoId}-inner-cell-${X}-${q}-${te}`,cellCls:O.cellCls(X,q,te),style:f.normalizeStyle(O.cellStyles(X,q,te)),day:X,hour:q,hourSplitIndex:te,cellKey:`${X}-${q}-${te}`,click:()=>O.selectCell(X,q,te)}):(f.openBlock(),f.createElementBlock("td",{"syno-id":`${O.synoId}-inner-cell-${X}-${q}-${te}`,class:f.normalizeClass(O.cellCls(X,q,te)),style:f.normalizeStyle(O.cellStyles(X,q,te)),day:X,hour:q,"hour-split-index":te,onClick:f.withModifiers(re=>O.selectCell(X,q,te),["stop"]),key:`${X}-${q}-${te}`},null,14,m))],64))),256))],64))),256))]))),128))])],34)],2)),[[Y]])}var D=y.default(b,[["render",T]]);x.default=D}(cB)),cB}var dB={},XY;function Pee(){return XY||(XY=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Si(),k=ln(),F=xl(),B=vr(),G=La(),E=kr(),A=Kt(),u=Ru(),o=_i(),S=gf(),_=ht(),p=St();const f=["search","filter"];B.register("select-search",E.vIconSearch),B.register("select-filter",E.vIconFilter),B.register("select-adjust",E.vIconAdjust);const y=_.defineComponent({name:"SearchInput",components:{vButton:G.default},directives:{clickoutside:u.default},extends:S.default,mixins:[F.default],props:{mode:{type:String,default:"search",validator(l){return f.includes(l)}},advanced:{type:[Boolean,Object],default:!1},align:{type:String,default:"tl->bl"},dropdownOffset:{type:Array,default:()=>[0,1]},resetBtn:{type:[Boolean,Object],default:!1},searchBtn:{type:[Boolean,Object],default:!1},searchIconActive:{type:Boolean,default:!1},getExtraElements:{type:Function,default:void 0},advancedStyle:{type:Object,default:()=>({})},portalProps:{type:Object,default:()=>({})}},data(){return{showAdvanced:!1}},computed:{_wrapperCls(){return["v-search-input",...this.wrapperCls]},searchIconName(){if(this.advanceIconPos==="left"){if(this.mode==="search")return"select-advanced-search";if(this.mode==="filter")return"select-advanced-filter"}else{if(this.mode==="search")return"select-search";if(this.mode==="filter")return"select-filter"}return""},searchIconCls(){return{"search-icon":!0,active:this.searchIconActive,"show-advanced-panel":this.showAdvanced,disabled:this.disabled}},rightAdvSearchIconCls(){return{active:this.showAdvanced||this.searchIconActive}},alignment(){return{pos:this.align,offset:this.dropdownOffset}},inputWrapperCls(){return[`${this.prefixCls}-input-wrapper`,"search-filter"]},inputContainerCls(){return{"search-filter":!0,"only-suffix-icons":this.hasSuffixIcons&&!M.hasSlot(this,"suffix"),"has-right-advanced-icon":this.advanceIconPos==="right"}},advanceIconPos(){return A.isBoolean(this.advanced)?this.advanced?"left":"none":this.advanced?.icon??"left"},innerResetBtn(){if(this.resetBtn){const l={text:this._i18n("common","reset"),clickHandler:A.noop};return A.isBoolean(this.resetBtn)?l:o.merge(l,this.resetBtn)}return null},innerSearchBtn(){if(this.searchBtn){const l={text:this._i18n("common","search_now_placeholder"),clickHandler:A.noop};return A.isBoolean(this.searchBtn)?l:o.merge(l,this.searchBtn)}return null},resetBtnText(){return this.innerResetBtn.text},searchBtnText(){return this.innerSearchBtn.text},hasSearchBtn(){return!!this.searchBtn},hasResetBtn(){return!!this.resetBtn},hasBtn(){return this.hasResetBtn&&this.hasSearchBtn}},methods:{onClickSearchIcon(l){(this.advanced?this.advanceIconPos===l:!1)?(k.$emit(this,"click-advanced-icon"),this.toggleAdvancedPanel()):k.$emit(this,"click-icon")},closeAdvancedPanel(){this.showAdvanced=!1},openAdvancedPanel(){this.showAdvanced=!0},toggleAdvancedPanel(){this.disabled||(this.showAdvanced?this.closeAdvancedPanel():this.openAdvancedPanel())},clickOutside(){this.advanced&&this.closeAdvancedPanel()},onSearchBtnClick(){this.innerSearchBtn.clickHandler()},onResetBtnClick(){this.innerResetBtn.clickHandler()}}}),d=["id","type","placeholder","disabled","value","enterkeyhint","autocomplete","readonly","maxlength"],v={key:0,class:"v-search-input-advanced-footbar"};function b(l,w,I,C,h,c){const m=_.resolveComponent("v-icon"),T=_.resolveComponent("v-button"),D=_.resolveComponent("v-portal"),O=_.resolveDirective("clickoutside"),N=_.resolveDirective("syno-id");return _.withDirectives((_.openBlock(),_.createElementBlock("div",{class:_.normalizeClass(l._wrapperCls)},[_.createElementVNode("div",{class:_.normalizeClass(["input-container",l.inputContainerCls]),onClick:w[10]||(w[10]=function(){return l.closeAdvancedPanel&&l.closeAdvancedPanel(...arguments)})},[_.createElementVNode("div",{class:_.normalizeClass(l.inputWrapperCls)},[_.createVNode(m,{class:_.normalizeClass(l.searchIconCls),name:l.searchIconName,onClick:w[0]||(w[0]=_.withModifiers(z=>l.onClickSearchIcon("left"),["stop"])),disabled:l.disabled,"svg-icon-set":"set01",sprite:l.advanced===!0},null,8,["class","name","disabled","sprite"]),l.hasPrefix?(_.openBlock(),_.createElementBlock("span",{key:0,class:_.normalizeClass(["prefix-wrapper",l.suffixWrapperCls])},[_.renderSlot(l.$slots,"prefix")],2)):_.createCommentVNode("",!0),_.createElementVNode("input",_.mergeProps({id:l.id,type:l.inputType,class:l.inputCls,placeholder:l.placeholder,disabled:l.disabled,value:l.currentValue,enterkeyhint:l.enterKey,autocomplete:l.autocomplete,readonly:l.readonly,onInput:w[1]||(w[1]=function(){return l.onInput&&l.onInput(...arguments)}),onCompositionstart:w[2]||(w[2]=function(){return l.onCompositionStart&&l.onCompositionStart(...arguments)}),onCompositionend:w[3]||(w[3]=function(){return l.onCompositionEnd&&l.onCompositionEnd(...arguments)}),onKeyup:w[4]||(w[4]=function(){return l.onKeyUp&&l.onKeyUp(...arguments)}),onKeydown:w[5]||(w[5]=function(){return l.onKeyDown&&l.onKeyDown(...arguments)}),onPaste:w[6]||(w[6]=function(){return l.onPaste&&l.onPaste(...arguments)})},l.$attrs,{maxlength:l.maxlength,ref:"input",onBlur:w[7]||(w[7]=function(){return l.onBlur&&l.onBlur(...arguments)}),onFocus:w[8]||(w[8]=function(){return l.onFocus&&l.onFocus(...arguments)})}),null,16,d),l.hasSuffix?(_.openBlock(),_.createElementBlock("span",{key:1,class:_.normalizeClass(["suffix-wrapper",l.suffixWrapperCls])},[l.showClear?(_.openBlock(),_.createBlock(m,{key:0,name:"input-clear",class:"clear-icon",onClick:_.withModifiers(l.onClear,["stop"]),"svg-icon-set":"set25"},null,8,["onClick"])):_.createCommentVNode("",!0),_.renderSlot(l.$slots,"suffix-icons"),_.renderSlot(l.$slots,"suffix")],2)):_.createCommentVNode("",!0),l.advanceIconPos==="right"?(_.openBlock(),_.createBlock(m,{key:2,name:"select-adjust",onClick:w[9]||(w[9]=_.withModifiers(z=>l.onClickSearchIcon("right"),["stop"])),"svg-icon-set":"set13",disabled:l.disabled,class:_.normalizeClass(l.rightAdvSearchIconCls)},null,8,["disabled","class"])):_.createCommentVNode("",!0),l.showAdvanced&&l.advanced?(_.openBlock(),_.createBlock(D,_.mergeProps({key:"advanced","mount-to":l.getContainerEl(),anchor:l.$el,alignment:l.alignment,"acquire-z-index":""},l.portalProps),{default:_.withCtx(()=>[_.withDirectives((_.openBlock(),_.createElementBlock("div",{class:"v-search-input-advanced",style:_.normalizeStyle(l.advancedStyle)},[_.renderSlot(l.$slots,"advanced-panel",{display:l.currentValue}),_.renderSlot(l.$slots,"advanced-panel-footer",{},()=>[l.hasBtn?(_.openBlock(),_.createElementBlock("div",v,[l.hasResetBtn?(_.openBlock(),_.createBlock(T,{key:0,"syno-id":`${l.synoId}-reset-btn`,type:"footbar",suffix:"cancel",onClick:l.onResetBtnClick},{default:_.withCtx(()=>[_.createTextVNode(_.toDisplayString(l.resetBtnText),1)]),_:1},8,["syno-id","onClick"])):_.createCommentVNode("",!0),l.hasSearchBtn?(_.openBlock(),_.createBlock(T,{key:1,"syno-id":`${l.synoId}-search-btn`,type:"footbar",suffix:"main",onClick:l.onSearchBtnClick},{default:_.withCtx(()=>[_.createTextVNode(_.toDisplayString(l.searchBtnText),1)]),_:1},8,["syno-id","onClick"])):_.createCommentVNode("",!0)])):_.createCommentVNode("",!0)])],4)),[[O,l.clickOutside,l.getExtraElements,{children:!0}]])]),_:3},16,["mount-to","anchor","alignment"])):_.createCommentVNode("",!0)],2)],2)],2)),[[N]])}var s=p.default(y,[["render",b]]);x.default=s}(dB)),dB}var fB={},gB={},JY;function T5(){return JY||(JY=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Zx(),k=Ni(),F=wa(),B=Dr(),G=Kt(),E=Ur(),A=Qo(),u=cT(),o=vr(),S=kr(),_=ln(),p=ht(),f=St();const y=5;o.register("multiple-select-label-remove",S.vIconLabelRemove);const d=p.defineComponent({name:"MultipleSelectInput",components:{vScrollbar:F.default},extends:M.default,mixins:[u.selectable({toggle:"toggleLabel",selectRange:"selectRange",select:"selectLabel",getItemValue:"getLabelValue",isItemDisabled:"isDisabled",itemsKey:"selectedLabels"})],props:{selectedOptions:{type:Array,default:()=>[]},getOptionTooltip:{type:Function,required:!0},allowInvalidLabel:{type:Boolean,default:!1},groupOptions:{type:Object,default:()=>({})},displayMode:{type:String,default:"label",validator(c){return["label","text","html"].includes(c)}},displayText:{type:[String,Boolean],default:!1},disabled:{type:Boolean,default:!1},labelEditable:{type:Boolean,default:!1}},emits:["click-icon","focus","blur","is-editing","item-removed","commit","focus-out","editing-label-input","reposition-menu","focus-in"],data(){return{editingOption:void 0,editingOptionText:""}},computed:{isEditing(){return G.isDefined(this.editingOption)},textDisplayCls(){return["v-select2-text-display",{placeholder:this.showPlaceholder}]},display(){if(this.displayText)return this.displayText;let{group:c,option:m,delimiter:T,key:D}=this.displayTextFormat;return G.isDefined(D)||(D=this.displayField),this.selectedOptions.map(O=>{let N="";return O.inGroup?(N=c.replace("{group}",this.groupOptions[O.inGroup][D]),N=N.replace("{option}",O[D])):N=m.replace("{option}",O[D]),N}).join(T)},containerCls(){return[{"hide-trigger":this.hideTrigger},"v-multiselect-ct"]},innerValue(){return k.getModelValue(this)}},watch:{isEditing(c){_.$emit(this,"is-editing",c)},async[k.componentsProps.value()](c){await this.$nextTick(),this.onResizeMultipleInput()},async selectedOptions(c){await this.$nextTick(),this.onResizeMultipleInput()},placeholder(c){this.onResizeMultipleInput()},async editingOption(c){await this.$nextTick(),this.onResizeLabelEditingInput(),this.$refs["editing-label-input"]?.[0]?.focus()},async editingOptionText(c){await this.$nextTick(),this.onResizeLabelEditingInput()}},methods:{isMultipleSelected(){return!0},clearInput(){this.editingOptionText="",this.editingOption=void 0,_.$emit(this,k.getModelEventName(this),"")},selectWithEditingLabel(c){this.isEditing&&(this.editingOptionText=c[this.displayField])},focus(){this.$refs["editing-label-input"]?.[0]||this.getInputEl()?.focus()},isOptionEditing(c){return this.editingOption===c[this.valueField]},itemWrapperClasses(c){return["v-multiselect-item-wrapper",{"v-multiselect-item-disabled":this.isDisabled(c),"v-multiselect-item-invalid":this.isInvalid(c),selected:this.isSelected(c),[c.labelCls]:!!c.labelCls,"has-icon":this.hasOptionIcon(c)}]},isDisabled(c){return this.disabled?!0:c&&G.isDefined(c.irremovable)?(E.deprecate("irremovable","disabled",this),c&&c.irremovable===!0):c&&c.disabled===!0},hasOptionIcon(c){return c&&!!c.labelIcon},getOptionIcon(c){return G.isObject(c.labelIcon)?c.labelIcon:{name:c.labelIcon,svgIconSet:"set11"}},isInvalid(c){return c?.type==="invalid"},isSearch(c){return c?.type==="search"},isSelected(c){return this.isItemSelected(c)},removeOption(c){return this.remove(c[this.valueField])},remove(c){const m=this.selectedOptions;G.isArray(c)||(c=[c]);const T=m.filter(D=>this.isDisabled(D)?!0:!c.includes(D[this.valueField]));_.$emit(this,"item-removed",c,T),_.$emit(this,"reposition-menu")},onKeyDownOnInput(c){const m=c.target;if(!G.isDefined(m.value)){M.default.methods.onKeyDown.apply(this,arguments);return}const T=m.value?.length,D=this.selectedOptions;this.onBackspaceOnInput(c),A.isPrevArrow(c)&&m.selectionStart===0&&D.length>0?(this.isEditing?this.lastSelectIndex=this.selectedOptions.findIndex(O=>O[this.valueField]===this.editingOption):this.resetSelectIndex(),this.hasPrevSelectableLabel()&&(this.$refs["label-wrapper"]?.focus(),this.selectPrevLabel())):A.isNextArrow(c)&&m.selectionStart===T&&D.length>0&&(this.isEditing?(this.lastSelectIndex=this.selectedOptions.findIndex(O=>O[this.valueField]===this.editingOption),this.$refs["label-wrapper"]?.focus(),this.selectNextLabel()):this.resetSelectIndex()),A.isEnter(c)&&_.$emit(this,"commit",{autoHighlightLabel:this.isEditing,selectFromDropdown:!0}),M.default.methods.onKeyDown.apply(this,arguments)},onBackspaceOnInput(c){if(c.key!=="Backspace")return;c.target.value.length===0&&(this.isEditing&&(this.lastSelectIndex=this.selectedOptions.findIndex(T=>T[this.valueField]===this.editingOption),_.$emit(this,"commit",{selectFromDropdown:!1})),this.hasPrevSelectableLabel()&&(this.$refs["label-wrapper"]?.focus(),this.selectPrevLabel()))},onDelete(c){c.key==="Delete"&&this.selectedLabels.size>0&&(this.remove(Array.from(this.selectedLabels)),this.selectPrevLabel())},onBackspace(c){if(c.key!=="Backspace")return;if(this.selectedLabels.size>0){this.remove(Array.from(this.selectedLabels)),p.nextTick(()=>{this.selectPrevLabel()});return}const m=this.selectedOptions;m.length>0&&this.removeOption(m[m.length-1])},onEnter(c){!A.isEnter(c)||this.selectedLabels.size!==1||this.editLabel(Array.from(this.selectedLabels)[0])},getOptionKey(c){return c[this.valueField]},onResizeLabelEditingInput(){const c=this.$refs["editing-label-input"]?.[0];if(c){const m=(B.measureText(c)?.width??0)+y;B.css(c,"width",`${m}px`),B.css(c,"flex","")}},onResizeMultipleInput(){const c=this.getInputEl();if(!(this.isTextDisplayMode||!c))if(this.selectedOptions.length===0)B.css(c,"width",""),B.css(c,"flex","");else if(c.value.length===0)B.css(c,"width","100%"),B.css(c,"flex","1 1 0");else{const m=(B.measureText(c)?.width??0)+y;B.css(c,"width",`${m}px`),B.css(c,"flex","")}},onLabelWrapperKeyDown(c){this.onBackspace(c),this.onDelete(c),this.onEnter(c),this.onSelectLabelByKeyboard(c)},onSelectLabelByKeyboard(c){if(!A.isPrevArrow(c)&&!A.isNextArrow(c))return;const m=this.selectedOptions,T=A.isPrevArrow(c)?-1:1,D=A.isPrevArrow(c)?"selectPrevLabel":"selectNextLabel";if(this.lastSelectIndex===-1&&m.length>0){this.selectLabel(m[m.length-1],m.length-1);return}if(A.isShift(c)){const O=G.clampValue(this.lastSelectRangeIndex+T,0,m.length-1);this.selectRange(this.lastSelectIndex,O)}else this[D]()},ensureLabelVisible(c){this.$refs.scrollbar?.ensureVisible(this.$refs[`label-${c}`]?.[0])},ensureInputVisible(){this.$refs.scrollbar?.ensureVisible(this.$refs.input)},hasPrevSelectableLabel(){return(this.lastSelectIndex>=0?this.selectedOptions.slice(0,this.lastSelectIndex):this.selectedOptions).some(m=>!this.isDisabled(m))},hasNextSelectableLabel(){return(this.lastSelectIndex>=0?this.selectedOptions.slice(this.lastSelectIndex+1,this.selectedOptions.length):this.selectedOptions).some(m=>!this.isDisabled(m))},selectPrevLabel(){let{addSelect:c=!1}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const m=this.selectedOptions,T=this.lastSelectIndex!==-1?this.lastSelectIndex:m.length;for(let D=T-1;D>=0;D--)if(c?this.addSelectedLabel(m[D]):this.selectLabel(m[D],D)){this.selectedLabels=new Set(this.selectedLabels),this.lastSelectIndex=this.lastSelectRangeIndex=D,this.$nextTick(()=>this.ensureLabelVisible(D));return}},selectNextLabel(){let{addSelect:c=!1}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const m=this.selectedOptions;for(let T=this.lastSelectIndex+1;T<m.length;T++)if(c?this.addSelectedLabel(m[T]):this.selectLabel(m[T],T)){this.selectedLabels=new Set(this.selectedLabels),this.lastSelectIndex=this.lastSelectRangeIndex=T,this.ensureLabelVisible(T);return}this.$refs.input?.focus()},addSelectedLabel(c){return c?this.addSelectedItem(c):!1},selectLabel(c,m){return c?this.selectItem(c,m):!1},getLabelValue(c){return c[this.valueField]},selectRange(c,m){let{keepSelection:T=!1}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.selectItemsRange(c,m,this.selectedOptions,{keepSelection:T})},toggleLabel(c,m){return this.toggleItem(c,m)},onSelectLabel(c){if(!c)return;const m=this.selectedOptions.findIndex(T=>T[this.valueField]===c[this.valueField]);this.selectLabel(c,m),this.$refs["label-wrapper"]?.focus(),this.$nextTick(()=>{this.ensureLabelVisible(m)})},onDblClickLabel(c,m,T){this.onClickLabel(c,m,T),this.editLabel(T[this.valueField])},editLabel(c){if(!this.labelEditable)return!1;const m=this.selectedOptions.find(T=>T[this.valueField]===c);if(this.isDisabled(m)||!m)return!1;this.editingOption=m[this.valueField],this.editingOptionText=m[this.displayField]},onClickLabel(c,m,T){this.onClickItem(c,m,T)},onBlur(){this.clearSelection(),this.resetSelectIndex()},onFocus(){this.isEditing&&_.$emit(this,"commit",{selectFromDropdown:!0})},onFocusOut(c){const m=B.getFocusElement(c);this.$refs["label-wrapper"]?.contains(m)||(this.focused=!1,_.$emit(this,"focus-out",c))},onFocusIn(){this.focused=!0,_.$emit(this,"focus-in")},canOpenDropdown(c){const m=this.isEditing?this.$refs["editing-label-input"]?.[0]:this.getInputEl();return!(m&&this.autoOpenDropdownCharCount!==-1&&this.autoOpenDropdownCharCount>m.value.length)},onInput(c){this.canOpenDropdown()?this.openDropdown("keyword"):this.closeDropdown(),this.$emit(k.getModelEventName(this),c.target.value)},onLabelEditingInput(c){this.canOpenDropdown()?this.openDropdown("keyword"):this.closeDropdown(),this.$emit("editing-label-input",c.target.value)}}}),v={class:"input-wrapper"},b=["data-placeholder"],s=["innerHTML"],l=["syno-id","onDblclick","onClick"],w={class:"v-multiselect-item-label"},I=["value","placeholder"];function C(c,m,T,D,O,N){const z=p.resolveComponent("v-icon"),H=p.resolveComponent("v-scrollbar"),$=p.resolveDirective("tooltip");return p.openBlock(),p.createElementBlock("div",v,[p.createElementVNode("div",{ref:"icon",class:"v-select2-icon",onClick:m[0]||(m[0]=p.withModifiers(V=>c.$emit("click-icon"),["stop"]))},[p.renderSlot(c.$slots,"icon")],512),c.isTextDisplayMode||c.isHtmlDisplayMode?p.withDirectives((p.openBlock(),p.createElementBlock("div",{key:0,ref:"input",class:p.normalizeClass(c.textDisplayCls),"data-placeholder":c.placeholder,onKeydown:m[1]||(m[1]=p.withModifiers(function(){return c.onKeyDownOnInput&&c.onKeyDownOnInput(...arguments)},["stop"])),tabindex:"-1"},[c.isHtmlDisplayMode?(p.openBlock(),p.createElementBlock("div",{key:0,innerHTML:c.showPlaceholder?c.placeholder:c.display},null,8,s)):c.isTextDisplayMode?(p.openBlock(),p.createElementBlock(p.Fragment,{key:1},[p.createTextVNode(p.toDisplayString(c.showPlaceholder?c.placeholder:c.display),1)],64)):p.createCommentVNode("",!0)],42,b)),[[$,{overflowOnly:!0,content:c.display}]]):c.isLabelDisplayMode?(p.openBlock(),p.createBlock(H,{key:1,ref:"scrollbar",class:p.normalizeClass(c.containerCls),"view-style":{width:"100%"},disabled:c.disabled},{default:p.withCtx(()=>[p.createElementVNode("ul",{ref:"label-wrapper",class:"v-select-ul-wrap",tabindex:"-1",onFocusin:m[11]||(m[11]=function(){return c.onFocusIn&&c.onFocusIn(...arguments)}),onFocusout:m[12]||(m[12]=function(){return c.onFocusOut&&c.onFocusOut(...arguments)}),onFocus:m[13]||(m[13]=function(){return c.onFocus&&c.onFocus(...arguments)}),onBlur:m[14]||(m[14]=function(){return c.onBlur&&c.onBlur(...arguments)}),onKeydown:m[15]||(m[15]=p.withModifiers(function(){return c.onLabelWrapperKeyDown&&c.onLabelWrapperKeyDown(...arguments)},["stop"]))},[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(c.selectedOptions,(V,P)=>(p.openBlock(),p.createElementBlock(p.Fragment,null,[c.isOptionEditing(V)?p.withDirectives((p.openBlock(),p.createElementBlock("input",{key:c.getOptionKey(V),"onUpdate:modelValue":m[2]||(m[2]=U=>c.editingOptionText=U),class:"v-multiselect-item-wrapper--editing",ref_for:!0,ref:"editing-label-input",onClick:m[3]||(m[3]=p.withModifiers(function(){return c.onClick&&c.onClick(...arguments)},["stop"])),onInput:m[4]||(m[4]=function(){return c.onLabelEditingInput&&c.onLabelEditingInput(...arguments)}),onKeydown:m[5]||(m[5]=p.withModifiers(function(){return c.onKeyDownOnInput&&c.onKeyDownOnInput(...arguments)},["stop"]))},null,32)),[[p.vModelText,c.editingOptionText]]):(p.openBlock(),p.createElementBlock("li",{key:c.getOptionKey(V),"syno-id":`${c.synoId}-selected-${V[c.valueField]}`,class:p.normalizeClass(c.itemWrapperClasses(V)),ref_for:!0,ref:`label-${P}`,onDblclick:U=>c.onDblClickLabel(U,P,V),onClick:p.withModifiers(U=>c.onClickLabel(U,P,V),["stop"])},[p.renderSlot(c.$slots,"pre-label"),c.hasOptionIcon(V)?(p.openBlock(),p.createBlock(z,p.mergeProps({key:0,class:"v-multiselect-item-label-icon"},c.getOptionIcon(V),{disabled:c.isDisabled(V)}),null,16,["disabled"])):p.createCommentVNode("",!0),p.withDirectives((p.openBlock(),p.createElementBlock("div",w,[p.createTextVNode(p.toDisplayString(V[c.displayField]),1)])),[[$,c.getOptionTooltip(V)]]),c.isDisabled(V)?p.createCommentVNode("",!0):(p.openBlock(),p.createBlock(z,{key:1,name:"multiple-select-label-remove",class:"v-multiselect-item-remove",onClick:p.withModifiers(U=>c.removeOption(V),["stop"])},null,8,["onClick"]))],42,l))],64))),256)),c.isEditing?p.createCommentVNode("",!0):p.withDirectives((p.openBlock(),p.createElementBlock("input",p.mergeProps({key:0,ref:"input"},c.inputAttrs,{value:c.innerValue,class:"v-multiselect-input",onInput:m[6]||(m[6]=function(){return c.onInput&&c.onInput(...arguments)}),onFocus:m[7]||(m[7]=V=>c.$emit("focus",V)),onBlur:m[8]||(m[8]=V=>c.$emit("blur",V)),onKeydown:m[9]||(m[9]=p.withModifiers(function(){return c.onKeyDownOnInput&&c.onKeyDownOnInput(...arguments)},["stop"])),onClick:m[10]||(m[10]=p.withModifiers(function(){return c.onClick&&c.onClick(...arguments)},["stop"])),placeholder:c.placeholder}),null,16,I)),[[$,c.inputTooltip]])],544)]),_:3},8,["class","disabled"])):p.createCommentVNode("",!0),p.renderSlot(c.$slots,"clear-icon",{},()=>[c.allowClear&&c.focused?(p.openBlock(),p.createBlock(z,{key:0,name:"select-clear",class:p.normalizeClass(c.clearIconCls),onMousedown:p.withModifiers(c.onClear,["stop"]),"svg-icon-set":"set25"},null,8,["class","onMousedown"])):p.createCommentVNode("",!0)]),c.hideTrigger?p.createCommentVNode("",!0):p.renderSlot(c.$slots,"dropdown-icon",{key:2},()=>[p.createVNode(z,{name:"select-dropdown",class:"v-select2-dropdown-icon","svg-icon-set":"set12"})])])}var h=f.default(d,[["render",C]]);x.default=h}(gB)),gB}var ZY;function k5(){return ZY||(ZY=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Kt(),k=Dr(),F=lh(),B=Ur(),G=Qo(),E=tT(),A=T5(),u=Ni(),o=ln(),S=Si(),_=eT(),p=ht(),f=St();function y(s,l){return s.split(new RegExp(l.join("|")))}const d=p.defineComponent({name:"MultipleSelect",components:{vMultipleSelectInput:A.default},extends:E.default,props:{[u.componentsProps.value()]:{type:Array,default:()=>[]},hideSelected:{type:Boolean,default:!1},height:{type:[Number,String],default:"auto"},clearable:{type:Boolean,default:!0},editable:{type:Boolean,default:!0},closeOnSelect:{type:Boolean,default:!1},allowInvalidLabel:{type:Boolean,default:!1},autoAddLabel:{type:[Boolean,Object],default:!1},editLabel:{type:Boolean,default:!1},displayMode:{type:String,default:"label",validator(s){return["label","text","html"].includes(s)}},displayText:{type:[String,Boolean],default:!1},defaultOption:{type:[Function,String],default:_.OPTION_TYPE.CHECK},minSearchChar:{type:[Number,String],default:1},search:{type:Function,default:void 0}},emits:["item-removed"],data(){return{isEditing:!1,defaultChildOptionIndent:!1}},computed:{innerAutoAddLabel(){return this.allowInvalidLabel?(B.deprecate("allowInvalidLabel","autoAddLabel",this),this.allowInvalidLabel):!!this.autoAddLabel},validateLabel(){return M.isObject(this.autoAddLabel)?this.autoAddLabel.validate??(()=>!0):()=>!0},autoAddKey(){return M.isObject(this.autoAddLabel)?this.autoAddLabel.addKey??[" "]:[" "]},innerHideSelected(){return this.isEditing?!0:this.hideSelected},innerDefaultOption(){return this.isSearchMode||this.isEditing?_.OPTION_TYPE.BASE:this.defaultOption},selectedOptions(){return u.getModelValue(this).reduce((s,l)=>{if(M.isObject(l))s.push(l);else{const w=this.getOptionByValue(l);s.push({type:"normal",...w})}return s},[])},wrapCls(){return["v-select2-wrapper","v-multiselect-wrapper",{"allow-clear":this.allowClear,"has-icon":this.hasIcon,"is-advanced":this.advanced&&!this.hasIcon(),disabled:this.disabled,focused:this.isFocused,pressed:this.show,readonly:!this.allowEdit}]},wrapStyles(){return{width:typeof this.width=="string"?this.width:`${this.width}px`,height:typeof this.height=="string"?this.height:`${this.height}px`}},inputAttrs(){return{id:this.id,disabled:this.disabled,readonly:!this.allowEdit,autocomplete:"off",class:{"full-width":u.getModelValue(this).length===0},type:"text",placeholder:this.placeholder,role:"combobox","aria-autocomplete":"list","aria-haspopup":"listbox","aria-labelledby":this.valueArray.map(s=>`${this.id}-selected-${s}`).join(" ")}},allowClear(){const s=this.selectedOptions.reduce((l,w)=>(!w.irremovable&&!w.disabled&&l++,l),0);return this.clearable&&(!!this.display||s>0)&&!this.disabled},_placeholder(){return u.getModelValue(this).length===0?this.placeholder:""},valueArray(){return u.getModelValue(this).map(s=>M.isObject(s)?s[this.valueField]:s)},innerValue(){return u.getModelValue(this)}},watch:{[u.componentsProps.value()](){this.closeOnSelect||(this.visibleOptions=this.getVisibleOptions())},display(s){if(this.doSearch(s),this.innerAutoAddLabel){let l=y(s,this.autoAddKey);if(l.length>1){const w=this.addLabels(l.slice(0,l.length-1));this.display=l[l.length-1],o.$emit(this,u.getModelEventName(this),[...u.getModelValue(this),...w]),this.$nextTick(()=>{this.$refs.input?.onResizeMultipleInput()})}}}},methods:{getSlots(){return S.getSlots(this)},findOptions(s){return this.getValidOptions().filter(l=>l.type!=="group-label").find(l=>s&&l[this.displayField]===s)},getVisibleOptions(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"all";const l=this.isEditing?this.$refs.input.editingOptionText:this.display,w=this.innerHideSelected;if(this.filter)return this.filter(l,this.currentOptions,s);let I=Object.create(null),C=0,h=this.currentOptions.filter(c=>{if(c.hide)return!1;if(c==="-"||c[this.valueField]===this.$refs.input.editingOption)return!0;if(w&&this.valueArray.includes(c[this.valueField]))return!1;let m=!1;c.type==="group-label"&&(m=!0),l||(m=!0);let T=c[this.displayField],D=l;return this.caseSensitive||(T=T.toUpperCase(),D=D.toUpperCase()),T.includes(D)&&(m=!0),M.isFunction(c.filter)&&(m=c.filter(this.display,c,C,{query:s})),m&&(C++,c.inGroup&&(I[c.inGroup]=!0)),m});return h=h.filter(c=>c.type==="group-label"?!!I[c[this.valueField]]:!0),this.filterLegalDividerOption(h)},getOptionByValue(s){return this.currentOptions.find(l=>l[this.valueField]===s)},clearInput(){this.$refs.input?.clearInput()},commitLabels(s){const l=this.addLabel(s);if(l||this.isEditing){const w=this.getNewValue(l,{editingOption:this.$refs.input?.editingOption});o.$emit(this,u.getModelEventName(this),w),this.$refs.input?.clearInput()}return l},onCommit(){let{selectFromDropdown:s=!1,text:l=void 0,autoHighlightLabel:w=!1}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const I=this.isEditing;if(l=l??(I?this.$refs.input?.editingOptionText:this.display),this.$refs.dropdown&&s){const C=this.$refs.dropdown.getActiveIndex(),h=this.$refs.dropdown.getActiveOption();if(C!==-1){this.select(C),w&&this.$nextTick(()=>this.$refs.input?.onSelectLabel(h));return}}if(I){const C=this.findOptions(l);if(this.isSearchMode){const h=this.getNewValue(null,{editingOption:this.$refs.input?.editingOption});o.$emit(this,u.getModelEventName(this),h),this.clearInput();return}else if(C){this.selectOption(C[this.valueField]),this.clearInput(),w&&this.$nextTick(()=>this.$refs.input?.onSelectLabel(C));return}else if(!this.innerAutoAddLabel){if(l)this.selectOption(this.$refs.input.editingOption);else{const h=this.getNewValue(null,{editingOption:this.$refs.input?.editingOption});o.$emit(this,u.getModelEventName(this),h)}this.clearInput();return}}if(this.innerAutoAddLabel){const C=this.commitLabels(l);w?this.$nextTick(()=>this.$refs.input?.onSelectLabel(C)):this.$nextTick(()=>this.$refs.input?.ensureInputVisible())}else this.clearInput()},onKeydown(s){if(this.innerAutoAddLabel&&G.isKeyInCharacters(s,this.autoAddKey)){const l=this.addLabel(this.display);l&&(o.$emit(this,u.getModelEventName(this),[...u.getModelValue(this),l]),s.preventDefault(),this.clearInput())}},addLabel(s){if(s)return{type:this.validateLabel(s)?"normal":"invalid",[this.displayField]:s,[this.valueField]:F.uuid()}},addLabels(s){let l=[];for(const w of s)w&&l.push(this.addLabel(w));return l},async searching(s){this.$options._searchingDefer=this.$options._searchingDefer||Promise.resolve(),this.$options._searchingDefer=this.$options._searchingDefer.then(async()=>{this.loading=!0;const l=await this.search(s);l&&(this.searchOptions=l.filter(w=>!this.valueArray.includes(w[this.valueField]))),this.loading=!1})},canCloseOnSelect(s){return this.isEditing?!0:M.isDefined(s.closeOnSelect)?s.closeOnSelect:this.isSearchMode?!0:this.closeOnSelect},getNewValue(s){let{editingOption:l=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const w=u.getModelValue(this);if(l){const I=this.valueArray.findIndex(C=>C===l);if(I>=0)return s?[...w.slice(0,I),s,...w.slice(I+1)]:w.filter((C,h)=>h!==I)}return[...w,s]},selectOption(s){const l=this.getNewValue(s,{editingOption:this.$refs.input?.editingOption});o.$emit(this,u.getModelEventName(this),l)},select(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:-1;if(s<0||this.visibleOptions.length<=s)return;let l=this.visibleOptions[s];if(!(l==="-"||l.disabled)){if(this.valueArray.some(w=>w===l[this.valueField])&&!this.isEditing){this.toggle(s,l);return}this.isSearchMode?l={type:"search",...l}:l=l[this.valueField],this.selectOption(l),E.default.methods.select.apply(this,arguments),this.repositionMenu(),this.clearInput()}},removeSelect(s){const l=[...u.getModelValue(this)];l.splice(s,1),o.$emit(this,u.getModelEventName(this),l)},toggle(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:-1,l=arguments.length>1?arguments[1]:void 0;if(l==="-"||l.disabled)return;const w=this.valueArray.findIndex(I=>l[this.valueField]===I);w===-1?this.select(s):this.removeSelect(w),this.clearInput()},isOptionSelected(s){return this.valueArray.includes(s[this.valueField])},clear(){const s=this.selectedOptions.reduce((l,w)=>((w.irremovable||w.disabled)&&l.push(w[this.valueField]),l),[]);o.$emit(this,u.getModelEventName(this),s),o.$emit(this,"clear"),this.clearInput()},onItemRemoved(s,l){const w=u.getModelValue(this).filter(I=>{const C=M.isObject(I)?I[this.valueField]:I;return!s.includes(C)});o.$emit(this,u.getModelEventName(this),w),o.$emit(this,"item-removed",s,l)},onBlur(s){E.default.methods.onBlur.apply(this,arguments);const l=k.getFocusElement(s);this.$refs.dropdown?.$el?.contains(l)||this.onCommit()},onEditingLabelInput(s){if(this.currentQueryAction="keyword",this.doQuery(this.currentQueryAction),this.doSearch(s),this.innerAutoAddLabel){const l=y(s,this.autoAddKey);l.length>1&&this.onCommit({text:l[0]})}},onEditingLabel(s){this.isEditing=s,s&&(this.currentQueryAction="keyword",this.doQuery(this.currentQueryAction))}}});function v(s,l,w,I,C,h){const c=p.resolveComponent("v-multiple-select-input"),m=p.resolveComponent("v-select-dropdown"),T=p.resolveComponent("v-portal"),D=p.resolveDirective("clickoutside"),O=p.resolveDirective("syno-id");return p.withDirectives((p.openBlock(),p.createElementBlock("div",{class:p.normalizeClass(s.wrapCls),style:p.normalizeStyle(s.wrapStyles),onClick:l[4]||(l[4]=function(){return s.onClick&&s.onClick(...arguments)})},[p.renderSlot(s.$slots,"input",{hasIcon:s.hasIcon,searchIconCls:s.searchIconCls},()=>[p.createVNode(c,{ref:"input",onClickIcon:s.onClickIcon,"input-tooltip":s.inputTooltip,placeholder:s._placeholder,disabled:s.disabled,modelValue:s.display,"onUpdate:modelValue":l[0]||(l[0]=N=>s.display=N),"input-attrs":s.inputAttrs,"open-dropdown":s.openDropdown,"toggle-dropdown":s.toggleDropdown,"close-dropdown":s.closeDropdown,advanced:!!s.advanced,"selected-options":s.selectedOptions,"display-field":s.displayField,"value-field":s.valueField,"clear-icon-cls":s.clearIconCls,"allow-clear":s.allowClear,"hide-trigger":s._hideTrigger,"get-option-tooltip":s.getOptionTooltip,"trigger-query-action":s.triggerQueryAction,"display-mode":s.displayMode,"display-text-format":s.mergedDisplayTextFormat,"group-options":s.innerGroupOptions,"display-text":s.displayText,"auto-open-dropdown-char-count":s.autoOpenDropdownCharCount,"toggle-dropdown-on-click":!s.isSearchMode,"label-editable":s.editLabel,onIsEditing:s.onEditingLabel,onItemRemoved:s.onItemRemoved,onClear:s.clear,onArrowUp:l[1]||(l[1]=N=>s.onArrow("up")),onArrowDown:l[2]||(l[2]=N=>s.onArrow("down")),onKeydown:s.onKeydown,onCommit:l[3]||(l[3]=function(){let{autoHighlightLabel:N=!1,selectFromDropdown:z=!0}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return s.onCommit({selectFromDropdown:z,autoHighlightLabel:N})}),onEditingLabelInput:s.onEditingLabelInput,onRepositionMenu:s.repositionMenu,onFocusIn:s.onFocus,onFocusOut:s.onBlur},{right:p.withCtx(()=>[p.renderSlot(s.$slots,"input-right")]),"pre-label":p.withCtx(()=>[p.renderSlot(s.$slots,"pre-label")]),_:3},8,["onClickIcon","input-tooltip","placeholder","disabled","modelValue","input-attrs","open-dropdown","toggle-dropdown","close-dropdown","advanced","selected-options","display-field","value-field","clear-icon-cls","allow-clear","hide-trigger","get-option-tooltip","trigger-query-action","display-mode","display-text-format","group-options","display-text","auto-open-dropdown-char-count","toggle-dropdown-on-click","label-editable","onIsEditing","onItemRemoved","onClear","onKeydown","onEditingLabelInput","onRepositionMenu","onFocusIn","onFocusOut"])]),s.show&&s.showDropdown?(p.openBlock(),p.createBlock(T,{key:0,ref:"portal","mount-to":s.getContainerEl(),anchor:s.$el,"acquire-z-index":"",alignment:s.alignment},{default:p.withCtx(()=>[p.createVNode(m,{ref:"dropdown",style:p.normalizeStyle(s.dropdownStyle),"syno-id":s.synoId,options:s.visibleOptions,advanced:!!s.advanced,"dropdown-cls":s.dropdownCls,loading:s.loading,"loading-text":s.innerLoadingText,"max-height":+s.maxHeight,"not-found-text":s.innerNotFoundText,value:s.innerValue,"display-field":s.displayField,"value-field":s.valueField,"get-option-tooltip":s.getOptionTooltip,"virtual-scrollbar":s.virtualScrollbar,"virtual-item-height":s.virtualItemHeight,"virtual-buffer-size":s.virtualBufferSize,"show-not-found":s.showNotFound,"default-option":s.innerDefaultOption,onCloseDropdown:s.closeDropdown,onSelect:s.select,onToggle:s.toggle,onScrollbarVisible:s.onScrollbarVisible,onBlur:s.onBlur},p.createSlots({_:2},[p.renderList(s.getSlots(),(N,z)=>({name:z,fn:p.withCtx(H=>[p.renderSlot(s.$slots,z,p.normalizeProps(p.guardReactiveProps(H)))])}))]),1032,["style","syno-id","options","advanced","dropdown-cls","loading","loading-text","max-height","not-found-text","value","display-field","value-field","get-option-tooltip","virtual-scrollbar","virtual-item-height","virtual-buffer-size","show-not-found","default-option","onCloseDropdown","onSelect","onToggle","onScrollbarVisible","onBlur"])]),_:3},8,["mount-to","anchor","alignment"])):p.createCommentVNode("",!0)],6)),[[D,s.clickOutside,void 0,{children:!0}],[O]])}var b=f.default(d,[["render",v]]);x.default=b}(fB)),fB}var pB={},QY;function Bee(){return QY||(QY=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Yx(),k=k5();function F(){return{"show-dropdown":!1,"hide-trigger":!0,"auto-add-label":!0,...arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}}}let B;function G(A,u,o){const S=M.getTransparentRawProps(o);return S.attrs=F(S.attrs),M.h(A,k.default,S)}B=function(u,o){return G(void 0,u,o)},B.componentName="SuperboxSelect";var E=B;x.default=E}(pB)),pB}var mB={},eK;function Lee(){return eK||(eK=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=sh(),k=ln(),F=ht(),B=St();const G=F.defineComponent({name:"SelectActionOption",extends:M.default,props:{customActiveBehavior:{type:Boolean,default:!1}},emits:["click"],data(){return{isActive:!1}},computed:{innerCls(){const u=this.customActiveBehavior?this.activated:this.isActive;return["v-select2-dropdown-menu-item action",{unselectable:this.selectable===!1,disabled:this.disabled,activated:u,[this.customClass]:!!this.customClass,"is-selected":this.isSelected}]}},methods:{onHover(){this.isActive=!0},onMouseOut(){this.isActive=!1},onClick(){k.$emit(this,"click")}}});function E(u,o,S,_,p,f){const y=F.resolveComponent("v-portal");return F.openBlock(),F.createElementBlock("div",{class:F.normalizeClass(u.innerCls),onMouseenter:o[0]||(o[0]=function(){return u.onHover&&u.onHover(...arguments)}),onMouseleave:o[1]||(o[1]=function(){return u.onMouseOut&&u.onMouseOut(...arguments)}),onClick:o[2]||(o[2]=function(){return u.onClick&&u.onClick(...arguments)})},[u.mergedTooltip.usePortal?(F.openBlock(),F.createBlock(y,{key:0,name:u.mergedTooltip.portalName,to:u.mergedTooltip.portalName},{default:F.withCtx(()=>[F.renderSlot(u.$slots,"tooltip-portal",{option:u.option})]),_:3},8,["name","to"])):F.createCommentVNode("",!0),F.renderSlot(u.$slots,"inner-option",{option:u.option},()=>[F.createTextVNode(F.toDisplayString(u.display),1)])],34)}var A=B.default(G,[["render",E]]);x.default=A}(mB)),mB}var vB={},tK;function Fee(){return tK||(tK=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=sh(),k=ya(),F=ht(),B=St();const G=F.defineComponent({name:"SelectMultilineOption",directives:{tooltip:k.default},extends:M.default,props:{},computed:{innerCls(){return["v-select2-dropdown-menu-item","v-select2-dropdown-menu-multiline-item",this.customClass?this.customClass:"",{unselectable:this.selectable===!1,disabled:this.disabled,activated:this.activated,"is-selected":this.isSelected,"has-icon":!!this.option.icon}]},mergedTooltip(){return this.tooltip===!1?!1:Object.assign({},this.tooltip)},descTooltip(){return{content:this.option.desc,overflowOnly:!0}}},methods:{}}),E=["id","syno-id","aria-selected"],A={ref:"text",class:"option-text multiline-option-title"},u={key:0,class:"multiline-option-desc"};function o(_,p,f,y,d,v){const b=F.resolveDirective("tooltip");return F.openBlock(),F.createElementBlock("li",{id:_.id,"syno-id":`${_.synoId}-option-${_.value}`,style:{"user-select":"none"},class:F.normalizeClass(_.innerCls),role:"option","aria-selected":_.activated,onClick:p[0]||(p[0]=function(){return _.onClick&&_.onClick(...arguments)}),onMouseenter:p[1]||(p[1]=function(){return _.onHover&&_.onHover(...arguments)}),onMouseleave:p[2]||(p[2]=function(){return _.onHoverOut&&_.onHoverOut(...arguments)})},[F.renderSlot(_.$slots,"inner-option",{option:_.option},()=>[F.renderSlot(_.$slots,"title",{},()=>[F.withDirectives((F.openBlock(),F.createElementBlock("span",A,[F.createTextVNode(F.toDisplayString(_.display),1)])),[[b,_.mergedTooltip]])]),F.renderSlot(_.$slots,"desc",{},()=>[_.option.desc?F.withDirectives((F.openBlock(),F.createElementBlock("span",u,[F.createTextVNode(F.toDisplayString(_.option.desc),1)])),[[b,_.descTooltip]]):F.createCommentVNode("",!0)])])],42,E)}var S=B.default(G,[["render",o]]);x.default=S}(vB)),vB}var yB={},nK;function Xl(){return nK||(nK=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Dr();const k="[",F="]",B=new RegExp(`^\\${k}(.*)\\${F}$`),G=", ";function E(S){return S.includes(" ")}function A(S){return S.includes("[")||S.includes("]")}class u{constructor(_){this.type="block",this.text=_,this.decorator='<span class="v-search-block" data-serialize={serialize}>{}</span>',this.currentIndex=-1,this.withQuote=!1}static needToQuoteIt(_){return E(_)||A(_)}static trimQuote(_){return _.startsWith('"')&&(_=_.slice(1)),_.endsWith('"')&&(_=_.slice(0,_.length-1)),_}static toHtml(_,p){return`<span class="v-search-block" data-serialize="${u.serialize(_,p)}">${M.htmlEncode(_)}</span>`}static serialize(_,p){return encodeURI(JSON.stringify({value:Array.isArray(p)?JSON.stringify(p):p,text:encodeURIComponent(_)}))}static deserialize(_){const p=JSON.parse(decodeURI(_));return p.text&&(p.text=decodeURIComponent(p.text)),p}toDSL(){return this.text||""}getType(){return this.type}length(){return this.withQuote?this.finalizeText().length+2:this.finalizeText()?this.finalizeText().length:0}shouldHaveQuote(){return this.isMultipleTexts()?!1:E(this.text??"")}finalizeText(){return this.text??""}isMultipleTexts(){return B.test(this.text??"")}getMultipleTexts(){let{trim:_=!0,withQuote:p=!0}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},f=(this.text??"").replace(B,"$1").split(G);return _&&(f=f.filter(y=>y)),p||(f=f.map(y=>y.replace(/"/g,""))),f}toMultipleTexts(_){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)?`${k}${_.join(G)}${F}`:_.join(G)}findMultipleTextIndex(_){const p=this.getMultipleTexts({trim:!1});let f=-1,y=k.length;for(const[d,v]of p.entries())if(f=y,y+=v.length+G.length,y>_)return[d,_-f];return[0,-1]}getValue(){return this.value}pureText(){return this.text??""}format(){if(this.isMultipleTexts()){const _=this.getMultipleTexts();this.text=this.toMultipleTexts(_)}return!0}getDecoratedHtml(){let _=this.withQuote?`"${this.finalizeText()}"`:this.finalizeText();return _=M.htmlEncode(_),_=(this.decorator??"").replace(/{}/,_),_.replace(/{serialize}/,u.serialize(this.finalizeText(),this.value))}getPreviousNonEmptyBlock(){let _=this.prevBlock;for(;_;){if(_.getType()!=="empty")return _;_=_.prevBlock}return null}getNextNonEmptyBlock(){let _=this.nextBlock;for(;_;){if(_.getType()!=="empty")return _;_=_.nextBlock}return null}}class o extends u{constructor(_){super(_),Array.isArray(_)&&(this.text=this.toMultipleTexts(_)),this.type="unknown"}}x.Block=u,x.MULTIPLE_BRACKET_PATTERN=B,x.MULTIPLE_CLOSE_BRACKET=F,x.MULTIPLE_DELIMETER=G,x.MULTIPLE_OPEN_BRACKET=k,x.Unknown=o,x.default=u}(yB)),yB}var wB={},rK;function wT(){return rK||(rK=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Xl();class k extends M.Block{constructor(B,G){super(B),this.decorator='<span class="v-search-block v-search-block-category" data-serialize={serialize}>{}</span>',this.type="category",G?(this.value=G.value||B,this.categoryProp=G):this.value=B}}x.Category=k,x.default=k}(wB)),wB}var bB={},iK;function bT(){return iK||(iK=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Kt(),k=Xl(),F=Db(),B=gT();class G extends k.Block{constructor(A,u,o){super(A),this.decorator='<span class="v-search-block v-search-block-operator" data-serialize={serialize}>{}</span>',this.relativeCategory=u,this.type="operator",o?(this.value=o.value||A,this.operatorProp=o):this.value=A}isValidValueBlock(A){let u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"title";if(this.validValueType==="number")return M.isNumber(A.pureText())?A.pureText():!1;if(this.validValueType==="string")return M.isString(A.pureText())?A.pureText():!1;if(this.validValueType==="date")return this.validValueInfo&&this.validValueInfo.dateFormat&&F.dateFormats.includes(this.validValueInfo.dateFormat)&&B.isValidDateString(A.pureText(),this.validValueInfo.dateFormat)?A.pureText():!1;if(this.validValueType==="array"){if(this.validValueInfo&&this.validValueInfo.validValues){const o=this.validValueInfo.validValues.find(S=>{if(u==="title")return S.title===A.pureText();if(u==="value")return S.value===A.value;if(u==="both")return S.title===A.pureText()&&S.value===A.value});return o||!1}return!0}else if(this.validValueType==="function"){if(this.validValueInfo?.validFunc?.(A)===!0)return A.pureText()}else if(this.validValueType==="multiple"&&this.validValueInfo&&this.validValueInfo?.validValues){const o=A.getValue(),_=(u==="title"||u==="both"?A.getMultipleTexts({withQuote:!1}):o).reduce((p,f,y)=>{if(p===!1)return p;const d=this.validValueInfo?.validValues?.find(v=>{if(u==="both"){const b=o[y];return v.title===f&&v.value===b}else if(u==="value")return v.value===f;return v.title===f});return d?(p.push(d),p):!1},[]);return Array.isArray(_)&&_.length?_:!1}return!1}setValidValueTypes(A){Array.isArray(A)?(this.validValueType="array",this.validValueInfo={validValues:A.slice()}):M.isFunction(A)?(this.validValueType="function",this.validValueInfo={validFunc:A}):M.isObject(A)?(this.validValueType=A.type,this.validValueInfo=A.info,this.validValueInfo&&A.info?.validValues&&!Array.isArray(A.info?.validValues)&&(this.validValueInfo.validValues=A.info?.validValues)):this.validValueType=A}needListValueType(){return this.validValueType==="array"||this.validValueType==="multiple"}needDateValueType(){return this.validValueType==="date"}}x.Operator=G,x.default=G}(bB)),bB}var CB={},oK;function Nb(){return oK||(oK=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Xl();class k extends M.Block{static HTMLToken=" ";constructor(B){super(B),this.type="empty"}shouldHaveQuote(){return!1}getDecoratedHtml(){return this.text?this.text.replace(/\s/g," "):""}}x.Empty=k,x.default=k}(CB)),CB}var _B={},aK;function CT(){return aK||(aK=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Xl(),k=Kt();class F extends M.Block{constructor(G,E){super(G),this.decorator='<span class="v-search-block v-search-block-value" data-serialize={serialize}>{}</span>',this.type="value",this.relativeOperator=E,this.relativeCategory=E.relativeCategory}toText(G){return k.isString(G)?G:Array.isArray(G)?this.toMultipleTexts(G.map(E=>M.Block.needToQuoteIt(E.title)?`"${E.title}"`:E.title)):G.title}setValue(G){k.isString(G)?this.value=G:Array.isArray(G)?(this.valueCases=G,this.value=G.map(E=>E.value)):(this.valueCase=G,this.value=G.value)}}x.Value=F,x.default=F}(_B)),_B}var SB={},sK;function _T(){return sK||(sK=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Xl();const k=["and","or"];class F extends M.Block{constructor(G){super(G),this.decorator='<span class="v-search-block v-search-block-conjunction">{}</span>',this.type="conjunction",this.value=G}isAnd(){return this.text==="and"}isOr(){return this.text==="or"}}x.CONJUNCTIONS_TITLE=k,x.Conjunction=F,x.default=F}(SB)),SB}var IB={},lK;function ST(){return lK||(lK=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Xl();const k="(",F=")",B=[k,F];function G(o){return o==="open"?[k]:o==="close"?[F]:B}function E(o){return o instanceof u&&o.isOpen()}function A(o){return o instanceof u&&o.isClose()}class u extends M.Block{constructor(S){super(S),this.decorator='<span class="v-search-block v-search-block-bracket">{}</span>',this.type="bracket",this.value=this.text}isOpen(){return this.text==="("}isClose(){return this.text===")"}}x.BRACKET_TOKEN=B,x.Bracket=u,x.CLOSE_BRACKET=F,x.OPEN_BRACKET=k,x.default=u,x.getBracketToken=G,x.isCloseBracket=A,x.isOpenBracket=E}(IB)),IB}var wg={},uK;function R5(){if(uK)return wg;uK=1,Object.defineProperty(wg,"__esModule",{value:!0});var x=Xl(),M=Nb(),k=Kt();const F='"',B="[",G="]",E=" ";function A(_){return _.replace(/\u00a0/g," ").replace(/\n/g,"")}function u(_){let p=[];for(const f of _){const y=f.prevBlock;f.getType()!=="empty"&&y&&y.getType()!=="empty"&&p.push(new M.Empty(" ")),p.push(f)}return _.length>0&&_[_.length-1].getType()!=="empty"&&p.push(new M.Empty(" ")),p=o(p),p}function o(_){for(let p=0;p<_.length;p++){const f=_[p];f.currentIndex=p,p>0&&(f.prevBlock=_[p-1]),p<_.length-1&&(f.nextBlock=_[p+1])}return _}class S{constructor(p){this.grammar=p}shouldQuote(p){let f=!1;return p.length>2&&p.startsWith('"')&&p.endsWith('"')&&(p=x.Block.trimQuote(p),f=!0),{withQuote:f,text:p}}parseTokens(p){const f=[],y=[],d=p.length;let v="",b=0;for(;b<d;){let l=p[b];const w=f[f.length-1];if(l===F?f.length>0?w===F&&f.pop():f.push(l):l===B&&w!==F?f.push(l):l===G&&w===B&&f.pop(),l===E&&f.length===0){v!==""&&(y.push(v),v="");let I="";for(;l===E&&b<d;)I+=l,l=p[++b];y.push(I);continue}v+=l,b++}v!==""&&y.push(v);const s=y;return s?s.map(l=>{const{withQuote:w,text:I}=this.shouldQuote(l);return{text:I,withQuote:w}}):[]}generateBlocksByTokens(p){const f=p.map(y=>{let d=new x.Block(y.text);return d.withQuote=y.withQuote,d.value=y.value,y.text.trim()===""&&(d=new M.Empty(A(y.text))),d});return o(f)}createBlocksByBrieflyBlocks(p){let f=[],y=null;for(const d of p){let v;d.type==="empty"?v=this.grammar.transformEmpty():(d.type==="bracket"?v=this.grammar.transformBracket(d.value):d.type==="conjunction"?v=this.grammar.transformConjunction(d.value):d.type==="category"?v=this.grammar.transformCategory(d.value):d.type==="operator"&&y?v=this.grammar.transformOperator(d.value,y):d.type==="value"&&y?v=this.grammar.transformValue(d.value,y):v=this.grammar.transformBlock(d.value),y=v),v.shouldHaveQuote()&&(v.withQuote=!0),f.push(v)}return f=o(f),f}toTokensByElement(p){if(p.dataset.serialize){const f=x.Block.deserialize(p.dataset.serialize);return this.toTokens(p.textContent||"").map(d=>{try{d.value=JSON.parse(f.value),!k.isObject(d.value)&&!Array.isArray(d.value)&&(d.value=f.value)}catch{d.value=f.value}return d})}return this.toTokens(p.textContent||"")}toTokens(p){return this.parseTokens(A(p))}createTokens(p){let f=[];for(const y of p.childNodes)y.nodeType===Node.TEXT_NODE?f=f.concat(this.toTokens(y.textContent||"")):f=f.concat(this.toTokensByElement(y));return f}createBlocks(p){const f=this.createTokens(p),y=this.generateBlocksByTokens(f);return this.grammar.transformBlocks(y)}toHtml(p){return p.map(f=>f.getDecoratedHtml()).join("")}toBrieflyBlocks(p){return p.map(f=>({type:f.getType(),value:f.value||f.text||""}))}}return wg.AbstractBlockFactory=S,wg.joinEmptyToken=u,wg.linkBlocks=o,wg.toTextDecode=A,wg}var xB={},hK;function E5(){return hK||(hK=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=rd(),k=ht(),F=k.defineComponent({name:"SuggestionItem",props:{display:{type:String,default:""},value:{type:String,default:""},prompt:{type:String,default:""},selected:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},inGroup:{type:Boolean,default:!1},selectable:{type:Boolean,default:!0}},data(){return{}},render(){return M.h("li",{class:["v-search-suggestions-item",{"v-search-suggestions-item-selected":this.selected,"v-search-suggestions-item-focused":this.focused,unselectable:!this.selectable,"child-item":this.inGroup}]},[M.h("div",{class:["search-suggestion-item-content"]},[M.h("span",{class:["item-display"]},this.display),M.h("span",{class:["item-prompt"]},this.prompt)])])}});x.default=F}(xB)),xB}var TB={},kB={},mS={},cK;function vwe(){if(cK)return mS;cK=1,Object.defineProperty(mS,"__esModule",{value:!0});var x=Kt(),M=gT(),k=Xl(),F=_T(),B=wT(),G=bT(),E=ST(),A=CT();const u=10;function o(_,p){return p.title.startsWith(_)}class S{constructor(p,f,y){this.selection=p,this.categories=f,this.info=y}setCategories(p){this.categories=p}getCategoryTitles(p){return p=k.Block.trimQuote(p),this.categories.reduce((f,y)=>{if(y.hint&&y.hint.show===!1)return f;const d=y.hint&&y.hint.searchFunc?y.hint.searchFunc(p,y):o(p,y);if(d===!1)return f;const v=x.isNumber(d)?d:y.hint&&y.hint.priority?y.hint.priority:u;return f.push({display:y.title,value:y.value,prompt:y.hint&&y.hint.prompt,useSlot:y.hint&&y.hint.useSlot,priority:v,blockType:"category",grouping:y.hint&&y.hint.grouping,hintObj:y.hint}),f},[])}getBracketsTitles(p,f){return E.getBracketToken(f).reduce((d,v)=>(v.startsWith(p)&&d.push({display:v,value:v,blockType:"bracket"}),d),[])}getOperatorTitles(p,f){return p=k.Block.trimQuote(p),f.validOperators?f.validOperators.reduce((y,d)=>{const v=d.hint&&d.hint.searchFunc?d.hint.searchFunc(p,d):o(p,d);if(v===!1)return y;const b=x.isNumber(v)?v:d.hint&&d.hint.priority?d.hint.priority:u;return y.push({display:d.title,value:d.value,prompt:d.hint&&d.hint.prompt,useSlot:d.hint&&d.hint.useSlot,priority:b,blockType:"operator",autoPatch:d.autoPatch,grouping:d.hint&&d.hint.grouping,hintObj:d.hint}),y},[]):[]}getValueTitles(p,f){return p=k.Block.trimQuote(p),!f||!f.needListValueType()?[]:f.validValueInfo&&f.validValueInfo.validValues?f.validValueInfo.validValues.reduce((y,d)=>{const v=d.hint&&d.hint.searchFunc?d.hint.searchFunc(p,d):o(p,d);if(v===!1)return y;const b=x.isNumber(v)?v:d.hint&&d.hint.priority?d.hint.priority:u;return y.push({display:d.title,value:d.value,prompt:d.hint&&d.hint.prompt,useSlot:d.hint&&d.hint.useSlot,priority:b,blockType:"value",grouping:d.hint&&d.hint.grouping,hintObj:d.hint}),y},[]):[]}getValueDate(p,f){const y=M.parseStringToDate(p?.value,f);return y||new Date}getConjunctionTitles(p){return F.CONJUNCTIONS_TITLE.reduce((f,y)=>(y.startsWith(p)&&f.push({display:y,value:y,blockType:"conjunction"}),f),[])}genCategoryHint(p){return p.type="list",p.showHint=!0,p.data.titles=p.data.titles.concat(this.getCategoryTitles(p.prefixText)),p}genBracketHint(p,f){return p.type="list",p.showHint=!0,p.data.titles=p.data.titles.concat(this.getBracketsTitles(p.prefixText,f)),p}genOperatorHint(p){return p.type="list",p.showHint=!0,p.prevBlock instanceof B.Category&&(p.data.titles=p.data.titles.concat(this.getOperatorTitles(p.prefixText,p.prevBlock))),p}genValueHint(p){return p.type="list",p.showHint=!0,p.prevBlock instanceof G.Operator&&(p.prevBlock.needListValueType()?(p.type=p.prevBlock.validValueType==="multiple"?"multiple":"list",p.data.titles=p.data.titles.concat(this.getValueTitles(p.prefixText,p.prevBlock))):p.prevBlock.needDateValueType()&&(p.type="date",p.data.date={current:this.getValueDate(p.block,p.prevBlock.validValueInfo?.dateFormat),dateFormat:p.prevBlock.validValueInfo?.dateFormat})),p}genConjunctionHint(p){return p.type="list",p.showHint=!0,p.data.titles=p.data.titles.concat(this.getConjunctionTitles(p.prefixText)),p}hasOpenBracket(p){return p.some(f=>f instanceof E.Bracket&&f.isOpen())}needCloseBracket(p){const f=[];for(const y of p)y instanceof E.Bracket&&(y.isOpen()?f.push(y):y.isClose()&&f.length>0&&f.pop());return f.length>0}shouldHint(p){const f=this.selection.getCurrentBlockInfo(p)[0];let y={showHint:!1,type:"list",prefixText:"",searchTitle:"Search Criteria",block:void 0,data:{titles:[]}};if(f&&f.block){const d=f.block,v=f.overlappedBlock,b=d.getPreviousNonEmptyBlock();if(y.block=d,d.isMultipleTexts()){const s=d.getMultipleTexts(),[l,w]=d.findMultipleTextIndex(f.offset),I=s[l];y.prefixText=I?I.substring(0,w):"",y.type="multiple"}else y.prefixText=d.pureText().substring(0,f.offset).trim();if(y.prevBlock=b,d.getType()==="conjunction"||v&&v.getType()==="conjunction")return this.genConjunctionHint(y);(b===null||b.getType()==="block"||b instanceof F.Conjunction||b instanceof E.Bracket&&b.isOpen())&&(y=this.genCategoryHint(y)),b instanceof B.Category&&(y=this.genOperatorHint(y)),b instanceof G.Operator&&(y=this.genValueHint(y)),(b instanceof A.Value||b instanceof E.Bracket&&b.isClose())&&(y=this.genCategoryHint(y))}else y=this.genCategoryHint(y);return this.info.limit&&y.data.titles.length>this.info.limit&&(y.limit={showHint:!0,num:this.info.limit}),y}}return mS.HintHandler=S,mS}var vS={},dK;function ywe(){if(dK)return vS;dK=1,Object.defineProperty(vS,"__esModule",{value:!0});var x=Kt(),M=rl(),k=Dr(),F=Nb(),B=Xl();const G="|";class E{constructor(u){this.el=u,this.saveRange={start:0,end:0}}getCursorRect(){return this.getNative()?.getBoundingClientRect()??{left:0,top:0}}getNative(){if(M.isServer||document.activeElement!==this.el)return null;const u=this.getSelection();return!u||!u.rangeCount?null:u.getRangeAt(0)}getSelection(){return window.getSelection()}getRange(){const u=this.getNative();if(!u)return{start:0,end:0,collapsed:!0};const o=u.cloneRange();o.selectNodeContents(this.el),o.setEnd(u.startContainer,u.startOffset);const S=o.toString().length;return{start:S,end:S+u.toString().length,collapsed:this.getSelection()?.isCollapsed}}findBlockTextIndex(u,o){let S=0;for(const[_,p]of u.entries()){if(p===o)return{start:S,end:S+p.length(),blockIndex:_};S+=p.length()}return{start:-1,end:-1,blockIndex:-1}}getCurrentBlockInfo(u){const o=this.getRange();let S=0,_=0;const p=[];for(const[f,y]of u.entries()){const d=f+1<u.length?u[f+1]:null;_+=y.length(),o.start<=S&&_<=o.end?p.push({block:y,offset:-1,covered:!0,overlappedBlock:null}):S<=o.start&&o.start<=_?p.push({block:y,offset:o.start-S,covered:!1,overlappedBlock:o.start-S>=y.length()?d:null}):S<=o.end&&o.end<=_&&p.push({block:y,offset:o.end-S,covered:!1,overlappedBlock:o.start-S>=y.length()?d:null}),S=_}return p}save(){this.saveRange=this.getRange()}restore(){return this.setCaretPos(this.saveRange.start,this.saveRange.end)}setCaretPosByRange(u){this.setCaretPos(u.start,u.end)}setCaretPos(u,o){let S=0;const _=document.createRange();_.setStart(this.el,0),_.collapse(!0);const p=[this.el];let f,y=!1,d=!1;for(;!d&&(f=p.pop());)if(f.nodeType==Node.TEXT_NODE){const b=S+(f?.textContent?.length??0);!y&&u>=S&&u<=b&&(_.setStart(f,u-S),y=!0),y&&o>=S&&o<=b&&(_.setEnd(f,o-S),d=!0),S=b}else{let b=f.childNodes.length;for(;b--;)p.push(f.childNodes[b])}const v=window.getSelection();v?.removeAllRanges(),v?.addRange(_)}replaceTextByBlocks(u,o,S,_,p,f,y){const d=o.textContent||"",v=T=>{if(!x.isString(p)||!T||!T.block)return!1;const D=T.block.getNextNonEmptyBlock();return!D||!D.text};d.length;let b=_.length,s=-1;for(const T of S){const D=T.block;if(D){const{start:O,end:N,blockIndex:z}=this.findBlockTextIndex(_,D);b=Math.min(b,z),s=Math.max(s,z)}}const l=_.slice(0,b),w=_.slice(s+1),I=l.map(T=>T.getDecoratedHtml()).join(""),C=w.map(T=>T.getDecoratedHtml()).join("");let h=I;if(l.length>0&&l[l.length-1].getType()!=="empty"&&(h+=F.Empty.HTMLToken),f==="multiple"){const T=S[0],D=T.block;if(D.isMultipleTexts()){const[O]=D.findMultipleTextIndex(T.offset),N=D.getMultipleTexts({trim:!1}),z=N.length-1,H=D.getValue()||[];y&&(H[O]=y),N[O]=u+(O!==z?G:""),h+=B.Block.toHtml(B.MULTIPLE_OPEN_BRACKET+D.toMultipleTexts(N,!1)+(O===z?`${B.MULTIPLE_DELIMETER}${G}`:"")+B.MULTIPLE_CLOSE_BRACKET,H)}else h+=B.Block.toHtml(`${B.MULTIPLE_OPEN_BRACKET}${u}${B.MULTIPLE_DELIMETER}${G}${B.MULTIPLE_CLOSE_BRACKET}`,y?[y]:[])}else h+=u,h+=F.Empty.HTMLToken+(v(S[0])?p:G)+C,w.length>0&&w[0].getType()!=="empty"&&(h+=F.Empty.HTMLToken);const m=k.html2Text(h).indexOf(G);return{html:h.replace(G,""),caretPos:m}}}return vS.Selection=E,vS}var yS={},fK;function wwe(){if(fK)return yS;fK=1,Object.defineProperty(yS,"__esModule",{value:!0});class x{constructor(){this.undoCommands=[],this.redoCommands=[]}pushCommand(k){this.undoCommands.push(k),this.redoCommands=[]}undo(){let k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;for(;k--;){const F=this.undoCommands.pop();if(!F)return;F.unExecute(),this.redoCommands.push(F)}}redo(){let k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;for(;k--;){const F=this.redoCommands.pop();if(!F)return;F.execute(),this.undoCommands.push(F)}}}return yS.CommandManager=x,yS}var wS={},gK;function bwe(){if(gK)return wS;gK=1,Object.defineProperty(wS,"__esModule",{value:!0});class x{constructor(k,F,B,G,E){this.oldVal=F,this.newVal=B,this.oldRange=G,this.newRange=E,this.vueInst=k}execute(){this.vueInst.blocks=this.newVal,this.vueInst.applyBlocks(),this.vueInst.selection?.setCaretPosByRange(this.newRange)}unExecute(){this.vueInst.blocks=this.oldVal,this.vueInst.applyBlocks(),this.vueInst.selection?.setCaretPosByRange(this.oldRange)}}return wS.ChangeBlocksCommand=x,wS}var pK;function Cwe(){return pK||(pK=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=rd(),k=Ni(),F=ln(),B=vwe(),G=ywe(),E=_i(),A=wa(),u=rl(),o=jF(),S=Qo(),_=wwe(),p=bwe(),f=ht(),y=ac(),d=Xl();const v=[33,0];function b(l){return l.replace(/\u00a0/g," ")}var s=f.defineComponent({name:"SearchContent",components:{vScrollbar:A.default},directives:{},mixins:[],props:{text:{type:String,default:""},[k.componentsProps.value()]:{type:y.definePropType(Array),default:()=>[]},fetchOperators:{type:y.definePropType(Function),default:void 0},fetchValueTypes:{type:y.definePropType(Function),default:void 0},categories:{type:y.definePropType(Array),default:()=>[]},placeholder:{type:String,default:""},dslProcessor:{type:y.definePropType(Object),required:!0},blockFactory:{type:y.definePropType(Object),required:!0},groupingInfo:{type:y.definePropType(Object),default:()=>({})},hintInfo:{type:y.definePropType(Object),default(){return{limit:!1}}},validateMessage:{type:String,default:""},validator:{type:y.definePropType(Function),default:void 0}},emits:["value","hint","error","text","keydown","blur","focus"],data:()=>({cls:"v-search",blocks:[],prevBlocks:[],commandMgr:null,selection:null,hintHandler:null,prevRange:null,onStateChangedDebounce:null,onValidateDebounced:null,operators:[],isLock:!1,scrollTop:null}),watch:{hintInfo(l){this.hintHandler&&(this.hintHandler.info=l)},text:{async handler(l){u.isServer||(await this.$nextTick(),this.$refs.text.innerText=l,this.onSync())},immediate:!0},[k.componentsProps.value()]:{async handler(l){l&&this.setBlocks(l)}},categories(l){this.hintHandler&&this.hintHandler.setCategories(l)}},created(){this.commandMgr=new _.CommandManager,this.onStateChangedDebounce=E.debounce(this.onStateChanged,30),this.onValidateDebounced=E.debounce(this.onValidate,250)},async mounted(){await this.$nextTick(),this.selection=new G.Selection(this.$refs.text),this.hintHandler=new B.HintHandler(this.selection,this.categories,this.hintInfo)},methods:{setBlocks(l){this.blocks=l.slice(),this.applyBlocks(),F.$emit(this,"value",this.blocks),this.onValidateDebounced()},patchMissingBlocks(){this.blocks=this.dslProcessor?.patchMissingBlocks(this.blocks)??[],this.$refs.text.innerHTML=this.blockFactory.toHtml(this.blocks),this.onSync({autoRestoreSelection:!1,showHint:!1}),this.onValidateDebounced()},formatBlocks(){for(const l of this.blocks)l.format();this.$refs.text.innerHTML=this.blockFactory.toHtml(this.blocks),this.onSync({autoRestoreSelection:!1,showHint:!1})},insertTextBySuggestion(l){let w=l.blockText||"";return l.replaceStrategy==="multiple"?w=l.blockText||"":l.value&&(w=d.Block.toHtml(l.blockText||"",l.value)),this.insertTextInSelection(w,l.replaceStrategy,l.autoPatch,l.value)},insertTextInSelection(l,w){let I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,C=arguments.length>3&&arguments[3]!==void 0?arguments[3]:void 0;if(!this.selection)return;this.saveScrollTop(),this.$refs.text.focus(),this.restoreScrollTop(),this.selection.restore();const h=this.selection.getCurrentBlockInfo(this.blocks),{html:c,caretPos:m}=this.selection.replaceTextByBlocks(l,this.$refs.text,h,this.blocks,I,w,C);this.$refs.text.innerHTML=c,this.selection.setCaretPos(m,m),this.onSync()},onSync(){let{autoRestoreSelection:l=!0,showHint:w=!0}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.blockFactory&&(this.blocks=this.blockFactory.createBlocks(this.$refs.text),this.selection&&l&&this.selection.save(),this.applyBlocks(),this.selection&&l&&this.selection.restore(),this.hintHandler&&w&&F.$emit(this,"hint",this.hintHandler.shouldHint(this.blocks)),this.$refs.scrollbar?.update?.(),F.$emit(this,"value",this.blocks),F.$emit(this,"error",!1))},applyBlocks(){this.$refs.text.innerHTML=this.blockFactory.toHtml(this.blocks),F.$emit(this,"text",b(this.$refs.text.innerText))},onStateChanged(){if(!this.selection)return;this.prevRange||(this.prevRange=this.selection.getRange());const l=new p.ChangeBlocksCommand(this,this.prevBlocks,this.blocks,this.prevRange,this.selection.getRange());this.commandMgr?.pushCommand(l),this.prevBlocks=this.blocks,this.prevRange=this.selection.getRange()},onValidate(){if(this.validator){const{hasError:l,message:w}=this.validator(this.dslProcessor.parse(this.blocks));F.$emit(this,"error",l,w);return}F.$emit(this,"error",!this.dslProcessor.parse(this.blocks),this.validateMessage)},onSelectionChange(){this.selection&&(this.selection.save(),F.$emit(this,"hint",this.hintHandler?.shouldHint(this.blocks)))},setCaretPosToEnd(){let{collapse:l=!0}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const w=b(this.$refs.text.innerText);let{start:I}=this.selection?.getRange()??{start:0};l&&(I=w.length),this.selection?.setCaretPos(I,w.length)},setCaretPosToStart(){let{collapse:l=!0}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{end:w}=this.selection?.getRange()??{end:0};l&&(w=0),this.selection?.setCaretPos(0,w)},blur(){this.$el&&this.$el.blur()},getCursorRect(){if(!this.selection)return;const l=this.selection.getCursorRect();let w={top:0,left:0};return this.$refs.text&&(w=this.$refs.text.getBoundingClientRect()),{left:Math.max(v[0],l.left-w.left),top:Math.max(v[1],l.top-w.top)}},onKeyDown(l){this.isLock||(F.$emit(this,"keydown",l),l.key==="End"?(l.preventDefault(),this.setCaretPosToEnd({collapse:!S.isShift(l)})):l.key==="Home"?(l.preventDefault(),this.setCaretPosToStart({collapse:!S.isShift(l)})):l.key.toLowerCase()==="z"&&l.ctrlKey&&(l.shiftKey?this.redo():this.undo(),l.preventDefault()))},undo(){this.commandMgr?.undo(),F.$emit(this,"value",this.blocks)},redo(){this.commandMgr?.redo(),F.$emit(this,"value",this.blocks)},onKeyUp(l){l.key==="Escape"||l.key==="Enter"||l.key==="ArrowUp"||l.key==="ArrowDown"||this.onSelectionChange()},onBlur(l){F.$emit(this,"blur",l)},onFocus(l){F.$emit(this,"focus",l)},genContentEditableDiv(){return M.h(A.default,{ref:"scrollbar",scopedSlots:{default:()=>[M.h("div",{class:["v-search-contenteditable"],attrs:{contenteditable:!0,spellcheck:!1,placeholder:this.placeholder,enterkeyhint:o.EnterHint.Search},ref:"text",on:{paste:l=>{l.preventDefault();const w=l.clipboardData?.getData("text/plain");document.execCommand("insertText",!1,w)},compositionstart:()=>{this.isLock=!0},compositionend:()=>{this.isLock=!1,this.onSync(),this.onStateChangedDebounce()},input:()=>{this.isLock||(this.onSync(),this.onStateChangedDebounce())},mouseup:this.onSelectionChange,keydown:this.onKeyDown,keyup:this.onKeyUp,blur:this.onBlur,focus:this.onFocus}})]}})},getCurrentToken(){return""},clear(){this.$refs.text.innerText="",this.onSync()},setBrieflyBlocks(l){const w=this.blockFactory.createBlocksByBrieflyBlocks(l);this.setBlocks(w)},getBrieflyBlocks(){return this.blockFactory.toBrieflyBlocks(this.blocks)},saveScrollTop(){this.scrollTop=this.getScrollTop()},restoreScrollTop(){const l=this.scrollTop;this.$refs.scrollbar?.setScroll(void 0,l),this.scrollTop=null},getScrollTop(){return this.$refs.scrollbar?.getScrollTop()??0}},render(){return this.genContentEditableDiv()}});x.default=s}(kB)),kB}var bS={},mK;function _we(){if(mK)return bS;mK=1,Object.defineProperty(bS,"__esModule",{value:!0});var x=Xl(),M=ST(),k=Nb(),F=wT(),B=bT(),G=CT(),E=_T();function A(y,d){let v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"title";return d.find(b=>{if(b.condition)return b.condition(y);if(v==="title")return b.title===y.pureText();if(v==="value")return b.value===y.getValue();if(v==="both")return b.title===y.pureText()&&b.value===y.getValue()})}function u(y,d){let v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"title";return d?.find(b=>{if(v==="title")return b.title===y.pureText();if(v==="value")return b.value===y.getValue();if(v==="both")return b.title===y.pureText()&&b.value===y.getValue()})}function o(y){return E.CONJUNCTIONS_TITLE.some(d=>d===y)}function S(y){return M.OPEN_BRACKET===y}function _(y){return M.CLOSE_BRACKET===y}function p(y,d){const v=d.prevBlock,b=d.nextBlock;v&&(v.nextBlock=y),b&&(b.prevBlock=y),y.nextBlock=b,y.prevBlock=v,y.currentIndex=d.currentIndex,y.withQuote=d.withQuote}class f{constructor(d,v,b){this.categories=d||[],this.fetchValueTypes=b,this.fetchOperators=v}setCategories(d){this.categories=d}transformBlock(d){return new x.Block(d)}transformEmpty(){return new k.Empty(" ")}transformCategory(d){const v=new x.Block("");v.value=d;const b=A(v,this.categories,"value");if(b){const s=new F.Category(b.title,b);return s.validOperators=this.fetchOperators(s),s}return new x.Unknown(d)}transformOperator(d,v){if(v.getType()!=="category")return new x.Unknown(d);const b=new x.Block("");b.value=d;const s=u(b,v.validOperators,"value");return s?new B.Operator(s.title,v,s):new x.Unknown(d)}transformValue(d,v){if(v.getType()!=="operator")return new x.Unknown(d);const b=v;b.setValidValueTypes(this.fetchValueTypes(b));const s=new G.Value(d,b);s.value=d;const l=b.isValidValueBlock(s,"value");return l!==!1?(s.setValue(l),s.text=s.toText(l),s):new x.Unknown(d)}transformBracket(d){return new M.Bracket(d)}transformConjunction(d){return new E.Conjunction(d)}transformValues(d){for(const v of d){const b=v.getNextNonEmptyBlock();if(v instanceof B.Operator&&(v.setValidValueTypes(this.fetchValueTypes(v)),b&&(b.getType()==="block"||b instanceof F.Category))){const s=v.isValidValueBlock(b,b.value?"both":"title");s!==!1&&(d[b.currentIndex]=new G.Value(b.text,v),d[b.currentIndex].setValue(s),p(d[b.currentIndex],b))}}return d}transformOperators(d){for(let v=0;v<d.length;v++){const b=d[v],s=b.getNextNonEmptyBlock();if(b instanceof F.Category&&(b.validOperators=this.fetchOperators(b),s&&s.getType()==="block"&&b.validOperators&&b.validOperators.length>0)){const l=u(s,b.validOperators,s.value?"both":"title");l&&(d[s.currentIndex]=new B.Operator(s.text,b,l),p(d[s.currentIndex],s))}}return d}transformConjunctions(d){for(let v=0;v<d.length;v++){const b=d[v],s=b.getNextNonEmptyBlock();(b instanceof G.Value||b instanceof M.Bracket&&b.isClose())&&s&&s.getType()==="block"&&o(s.pureText())&&(d[s.currentIndex]=new E.Conjunction(s.text),p(d[s.currentIndex],s))}return d}transformOpenBrackets(d){for(let v=0;v<d.length;v++){const b=d[v];let s=b.getNextNonEmptyBlock();v===0&&S(b.pureText())&&(d[b.currentIndex]=new M.Bracket(b.text),p(d[b.currentIndex],b),s=b.getNextNonEmptyBlock()),(b instanceof E.Conjunction||b.getType()==="block"||b instanceof M.Bracket&&b.isOpen())&&s&&s.getType()==="block"&&S(s.pureText())&&(d[s.currentIndex]=new M.Bracket(s.text),p(d[s.currentIndex],s))}return d}transformCloseBrackets(d){for(let v=0;v<d.length;v++){const b=d[v],s=b.getNextNonEmptyBlock();(b instanceof G.Value||b instanceof M.Bracket&&b.isClose())&&s&&s.getType()==="block"&&_(s.pureText())&&(d[s.currentIndex]=new M.Bracket(s.text),p(d[s.currentIndex],s))}return d}transformCategories(d){for(let v=0;v<d.length;v++){const b=d[v];if(b.getType()==="block"){const s=A(b,this.categories,b.value?"both":"title");s&&(d[b.currentIndex]=new F.Category(b.text,s),p(d[b.currentIndex],b))}}return d}transformBlocks(d){return d=this.transformCategories(d),d=this.transformOperators(d),d=this.transformValues(d),d=this.transformCloseBrackets(d),d=this.transformConjunctions(d),d=this.transformOpenBrackets(d),d}verifyClause(d){const v=function(s){const l=s.getNextNonEmptyBlock();return!!(l&&l.getType()==="operator"&&b(l))},b=function(s){const l=s.getNextNonEmptyBlock();return l&&l.getType()==="value"};for(const s of d)s.getType()==="category"&&(s.validClause=v(s));return d}}return bS.Grammar=f,bS}var RB={},EB={},vK;function Swe(){return vK||(vK=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=rd(),k=E5(),F=ht(),B=F.defineComponent({name:"SuggestionGroupItem",extends:k.default,props:{selectable:{type:Boolean,default:!1}},render(){return M.h("li",{class:["v-search-suggestions-item group",{"v-search-suggestions-item-selected":this.selected,"v-search-suggestions-item-focused":this.focused}]},[M.h("div",{class:["search-suggestion-item-content"]},[M.h("span",{class:["item-display"]},this.display),M.h("span",{class:["item-prompt"]},this.prompt)])])}});x.default=B}(EB)),EB}var yK;function Iwe(){return yK||(yK=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=rd(),k=Ni(),F=ln(),B=E5(),G=Swe(),E=pT(),A=y5(),u=wa(),o=Kt(),S=Lg(),_=fr(),p=xl(),f=Ru(),y=Si(),d=ht(),v=ac(),b=Xl();function s(w){return w.sort((I,C)=>{const h=I.priority||10,c=C.priority||10;return c>h?1:c<h?-1:0})}var l=d.defineComponent({name:"SearchSuggestions",components:{SuggestionItem:B.default,SuggestionGroupItem:G.default,vDatePickerMenu:E.default,vScrollbar:u.default},directives:{clickoutside:f.default},mixins:[_.inject("semantic-search"),p.default],props:{hint:{type:v.definePropType(Object),required:!0},groupingInfo:{type:v.definePropType(Object),required:!0},cursorRect:{type:Object,default(){return{top:0,left:0}}}},emits:["select","selected-date"],data:()=>({selectedIndex:-1,suggestionOffset:[0,0],hidden:!1}),computed:{titleInfos(){return this.hint?.data?.titles&&this.hint.data.titles.length>0?this.hint.data.titles:[]},suggestionItems(){const w=Object.create(null),I=[];let C=[];const h=(c,m)=>{let T=c.display,D=!1;return b.Block.needToQuoteIt(c.display)&&(T=`"${c.display}"`,D=!0),{blockType:c.blockType,display:c.display,value:c.value,prompt:c.prompt,useSlot:c.useSlot,autoPatch:c.autoPatch,replaceStrategy:this.hint.type==="multiple"?"multiple":"none",blockText:T,hasQuote:D,isGroup:!1,inGroup:m,selectable:!0,hintObj:c.hintObj}};for(const c of this.titleInfos)c.grouping&&c.grouping.by?(w[c.grouping.by]||(w[c.grouping.by]=[]),w[c.grouping.by].push(c)):I.push(c);for(let[c,m]of this.sortGroupInfos(w,I))if(o.isString(c)){const T=this.getGroupInfo(c);C.push({blockType:"unknown",display:T.display,value:T.value,prompt:T.prompt,useSlot:T.useSlot,hasQuote:!1,isGroup:!0,inGroup:!1,selectable:!1,replaceStrategy:"none",hintObj:T.hintObj}),m=s(m);for(const D of m)C.push(h(D,!0))}else for(const T of m)C.push(h(T,!1));return this.hint.limit&&(C=C.slice(0,this.hint.limit.num)),C},showSuggestion(){return!this.hidden&&(this.titleInfos.length>0||this.showDate)},showDate(){return!this.hint||!this.hint.data?!1:!!this.hint.data.date},defaultDate(){return this.hint.data.date.current},suggestionAlignment(){return{pos:"tl->bl",offset:[this.cursorRect?.left??0,0]}}},watch:{hint(){this.hidden=!1,this.hint.prefixText!==""?this.selectFirstSuggestion():this.clearSelectedIndex()}},methods:{sortGroupInfos(w,I){const h=I.map(m=>[null,[m]]).concat(Object.entries(w)),c=m=>{if(o.isString(m[0])){const T=this.getGroupInfo(m[0]);return T&&T.priority?T.priority:10}return m[1][0].priority?m[1][0].priority:10};return h.sort((m,T)=>{const D=c(m);return c(T)-D})},getGroupInfo(w){return this.groupingInfo[w]},onClick(w){this.selectedIndex=w,F.$emit(this,"select",this.suggestionItems[this.selectedIndex])},genSuggestionItem(w,I){return M.h(B.default,{ref:`item-${w}`,props:{display:I.display,value:I.value,prompt:I.prompt,selected:this.selectedIndex===w,selectable:I.selectable,inGroup:I.inGroup},nativeOn:{click:()=>this.onClick(w)},key:w})},genSuggestionGroupItem(w,I){return M.h(G.default,{props:{display:I.display,value:I.value,prompt:I.prompt},key:w})},genSuggestionItems(){let w=this.suggestionItems.reduce((C,h,c)=>{const m=y.getSlots(this)?.["suggestion-items"];if(h.useSlot===!0&&m){const T=m({index:c,suggestion:h,onSelect:()=>this.onClick(c),selected:this.selectedIndex===c});T&&(C=C.concat(T))}else{const T=h.isGroup?this.genSuggestionGroupItem(c,h):this.genSuggestionItem(c,h);T&&C.push(T)}return C},[]);const I=y.getSlots(this)?.["suggestion-limit-hint"];if(this.hint.limit&&this.hint.limit.showHint&&I){const C=I({});C&&(w=w.concat(C))}return w},getSelectedSuggestion(){if(this.selectedIndex!==-1)return this.suggestionItems[this.selectedIndex]},selectNextSuggestion(){if(this.selectedIndex===-1)return this.selectFirstSuggestion();const w=this.suggestionItems.length;for(let I=0;I<w;I++){const C=(this.selectedIndex+I)%w;if(this.suggestionItems[C].selectable){this.selectIndex(C);return}}},selectPrevSuggestion(){if(this.selectedIndex===-1)return this.selectFirstSuggestion();const w=this.suggestionItems.length;for(let I=0;I<w;I++){const C=(this.selectedIndex-I+w)%w;if(this.suggestionItems[C].selectable){this.selectIndex(C);return}}},selectFirstSuggestion(){for(let w=0,I=this.suggestionItems.length;w<I;w++)if(this.suggestionItems[w].selectable){this.selectIndex(w);return}},clearSelectedIndex(){this.selectedIndex=-1},selectIndex(w){this.selectedIndex=w;const I=this.$refs[`item-${w}`];this.$refs.scrollbar&&I&&this.$refs.scrollbar.ensureVisible(I.$el)},hide(){this.hidden=!0},onClickOutside(){this.hide()},containsEl(w){return this.$refs.wrapper?.contains(w)}},render(){let w;return this.showSuggestion?(this.showDate?w=M.h("div",{ref:"wrapper",directives:[{name:"clickoutside",value:this.onClickOutside,modifiers:{children:!0}}],class:["v-search-suggestions-date-picker-wrapper"],attrs:{tabindex:-1}},[M.h(E.default,{props:{[k.componentsProps.value()]:this.defaultDate},on:{change:I=>{F.$emit(this,"selected-date",A.toDateString(I,this.hint.data.date.dateFormat),"value")},"update:is-open":I=>{this.hidden=!I}}})]):w=M.h("div",{ref:"wrapper",directives:[{name:"clickoutside",value:this.onClickOutside,modifiers:{children:!0}}],class:["v-search-suggestions-wrapper"],attrs:{tabindex:-1}},[this.hint.searchTitle?M.h("div",{class:["v-search-search-criteria"]},this.hint.searchTitle):null,M.h("ul",{class:["v-search-suggestions"]},[M.h(u.default,{ref:"scrollbar",class:["v-search-suggestion-scrollbar"],scopedSlots:{default:()=>this.genSuggestionItems()}})])]),M.h(S.default,{props:{anchor:this["semantic-search"].instance.getSuggestionAnchor(),targetClass:"search-dropdown",mountTo:this.getContainerEl(),acquireZIndex:!0,alignment:this.suggestionAlignment},ref:"portal",scopedSlots:{default:()=>[w]}})):null}});x.default=l}(RB)),RB}var CS={},wK;function xwe(){if(wK)return CS;wK=1,Object.defineProperty(CS,"__esModule",{value:!0});var x=R5(),M=ST(),k=bT(),F=_T(),B=wT(),G=CT(),E=Nb();function A(_){return!!(_&&(_ instanceof k.Operator||_ instanceof F.Conjunction||_ instanceof M.Bracket))}function u(_){return!!(_&&(_ instanceof B.Category||_ instanceof G.Value))}function o(_){return _ instanceof k.Operator?3:_ instanceof F.Conjunction?_.isAnd()?2:1:0}class S{constructor(p,f,y){this.unknownBlockBehavior=f,this.defaultConjunction=y,this.grammar=p}patchOperatorBlocks(p){let f=[];for(const y of p){const d=y.getNextNonEmptyBlock();f.push(y),y.getType()==="category"&&d&&d.getType()==="block"&&f.push(new k.Operator(y.validOperators?.[0]?.title??"",y))}return f=x.linkBlocks(f),f=this.grammar.transformBlocks(f),f}patchConjunctionBlocks(p){let f=[];for(const y of p){const d=y.getNextNonEmptyBlock();f.push(y),y.getType()==="value"&&d&&d.getType()==="category"?f.push(new F.Conjunction(this.defaultConjunction.conjunctionType)):y.getType()==="bracket"&&y.isClose()&&d&&d.getType()==="category"&&f.push(new F.Conjunction(this.defaultConjunction.conjunctionType))}return f=x.linkBlocks(f),f=this.grammar.transformBlocks(f),f}patchMissingBlocks(p){return p=this.patchOperatorBlocks(p),p=this.patchConjunctionBlocks(p),p=x.linkBlocks(p),p=x.joinEmptyToken(p),p}translateUnknownBlocks(p){const f=[];for(const y of p)if(y.getType()==="block"){const d=new B.Category(this.unknownBlockBehavior.category),v=new k.Operator(this.unknownBlockBehavior.operator,d),b=new G.Value(y.text,v),s=new F.Conjunction(this.unknownBlockBehavior.conjunction),l=y.getPreviousNonEmptyBlock(),w=y.getNextNonEmptyBlock();l&&(l instanceof G.Value||l instanceof M.Bracket)&&f.push(s),f.push(d,v,b),w&&(w instanceof B.Category||w instanceof M.Bracket||w.getType()==="block")&&f.push(s)}else f.push(y);return f}parse(p){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const y=[];if(p=this.grammar.verifyClause(p),f&&(p=this.translateUnknownBlocks(p)),p=this.toPostfix(p),p.length===0)return{};for(const d of p)if(A(d)){if(y.length<2)return!1;const v=y.pop(),b=y.pop(),s=v?.block,l=b?.block;if(d instanceof F.Conjunction&&(u(s)||u(l))||d instanceof k.Operator&&(A(s)||A(l)))return!1;const w={block:d,right:v,left:b};y.push(w)}else if(u(d)){const v={block:d};y.push(v)}return y.length===1&&A(y[0].block)?y[0]:!1}toPostfix(p){const f=[],y=[];for(const d of p)if(!(d instanceof E.Empty))if(M.isOpenBracket(d))f.push(d);else if(M.isCloseBracket(d)){for(;f.length>0&&!M.isOpenBracket(f[f.length-1]);){const v=f.pop();v&&y.push(v)}f.pop()}else if(d instanceof k.Operator||d instanceof F.Conjunction){for(;f.length>0&&o(f[f.length-1])>=o(d);){const v=f.pop();v&&y.push(v)}f.push(d)}else y.push(d);for(;f.length>0;){const d=f.pop();d&&y.push(d)}return y}}return CS.DSLProcessor=S,CS}var bK;function Vee(){return bK||(bK=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Xn(),k=rd(),F=Ni(),B=Si(),G=ln(),E=Cwe(),A=Eu(),u=lc(),o=Ru(),S=xl(),_=fr(),p=mT(),f=_we(),y=Dr(),d=Kt(),v=rl(),b=ls(),s=vr(),l=kr(),w=Iwe(),I=xwe(),C=R5(),h=ht();s.register("semantic-search-icon",l.vIconSearch),s.register("semantic-search-clear",l.vIconClear);var c=h.defineComponent({name:"SemanticSearch",components:{SearchContent:E.default,SearchSuggestions:w.default,vMenu:A.default,vMenuItem:u.default,vPopup:p.default},directives:{clickoutside:o.default},mixins:[S.default,_.provide("semantic-search"),s.default],props:{validateMessage:{type:String,default:""},validator:{type:Function,default:void 0},text:{type:String,default:""},[F.componentsProps.value()]:{type:Array,default:()=>[]},unknownBlockBehavior:{type:Object,default:()=>({conjunction:"and",operator:"=",category:"keyword"})},autoPatch:{type:[Object,Boolean],default:!0},autoFormat:{type:[Object,Boolean],default:!0},defaultConjunction:{type:Object,default:()=>({conjunctionType:"and"})},categories:{type:Array,default:()=>[]},fetchOperators:{type:Function,required:!0},fetchValueTypes:{type:Function,required:!0},placeholder:{type:String,default:""},groupingInfo:{type:Object,required:!0},hintInfo:{type:Object,default(){return{limit:!1}}}},emits:["search","value","error","text","focus"],data(){return{cls:"v-search",suggestionPos:[0,0],suggestionZIndex:void 0,hint:{},dslProcessor:null,grammar:null,blockFactory:null,hasBlocks:!1,hasError:!1,currentValidateMessage:"",isSearching:!1,cursorRect:{left:0,right:0}}},computed:{searchClass(){return[this.cls,{"has-error":this.hasError}]},suggestionStyle(){return{left:`${this.suggestionPos[0]}px`,top:`${this.suggestionPos[1]}px`,zIndex:this.suggestionZIndex}},isPopupDisabled(){return!this.hasError||!this.currentValidateMessage},tippyOptions(){return{delay:[600,10],placement:"top-start"}}},watch:{categories(m){this.grammar&&this.grammar.setCategories(m)}},created(){this.grammar=new f.Grammar(this.categories,this.fetchOperators,this.fetchValueTypes),this.dslProcessor=new I.DSLProcessor(this.grammar,this.unknownBlockBehavior,this.defaultConjunction),this.blockFactory=new C.AbstractBlockFactory(this.grammar)},mounted(){this.suggestionZIndex=this.$popupManager.acquireZIndex()},[M.componentHooks.beforeUnmount](){this.$popupManager.releaseZIndex()},methods:{getSuggestionAnchor(){return this.$el},genSuggestions(){return k.h(w.default,{props:{hint:this.hint,groupingInfo:this.groupingInfo,cursorRect:this.cursorRect,useAdaptiveContainer:this.useAdaptiveContainer},ref:"suggestions",scopedSlots:B.getSlots(this),on:{select:this.onSelectSuggestion,"selected-date":this.onSelectSuggestionDate}})},genClearIcon(){return this.hasBlocks?k.h(b.default,{class:["search-clear-icon"],props:{name:"semantic-search-clear",svgIconSet:"set25"},nativeOn:{click:this.onClickClearIcon}}):null},genRightSlots(){return B.getSlots(this)?.right?.()},onSelectSuggestion(m){m&&(this.$refs.content.insertTextBySuggestion(m),this.$refs.suggestions.selectFirstSuggestion())},onSelectSuggestionDate(m){m&&this.$refs.content.insertTextInSelection(m,"none")},onClickClearIcon(){this.$refs.content.clear(),G.$emit(this,"clear")},async onHint(m){this.hint=m,await this.$nextTick(),this.alignSuggestion()},async alignSuggestion(){if(v.isServer)return;const m=this.$refs.content,T=this.$refs.suggestions;!T||!m||!T||!m.$el||!T.$el||(this.cursorRect=m.getCursorRect())},onKeyDown(m){if(this.$refs.suggestions){const T=this.$refs.suggestions;if(m.key==="ArrowUp")T.selectPrevSuggestion(),m.preventDefault();else if(m.key==="ArrowDown")T.selectNextSuggestion(),m.preventDefault();else if(m.key==="Enter"){const D=T.getSelectedSuggestion();T.showSuggestion&&D?this.onSelectSuggestion(D):this.onSearch(m),m.preventDefault()}else m.key==="Escape"&&T.hide()}},setValue(m){this.$refs.content.setBlocks(m)},validate(){return this.$refs.content.onValidateDebounced()},formatBlocks(){let m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"blur",T=!1;if(d.isBoolean(this.autoFormat)?T=this.autoFormat:T=this.autoFormat[m],T)return this.$refs.content.formatBlocks()},patchMissingBlocks(){let m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"blur",T=!1;if(d.isBoolean(this.autoPatch)?T=this.autoPatch:T=this.autoPatch[m],T)return this.$refs.content.patchMissingBlocks()},async onSearch(m){this.isSearching=!0;const T=this.$refs.content,D=this.$refs.suggestions;this.patchMissingBlocks("search"),this.formatBlocks("search"),await this.$nextTick(),T.setCaretPosToEnd(),T.blur(),D.hide(),G.$emit(this,"search",this.dslProcessor?.parse(T.blocks),m),this.validate(),window.setTimeout(()=>{this.isSearching=!1})},onBlocksChange(m){G.$emit(this,"value",this.dslProcessor?.parse(m),m),this.hasBlocks=m.length>0},onClickOutside(){this.$refs.suggestions.hide()},onContentBlur(m){if(this.isSearching)return;const T=y.getFocusElement(m),D=this.$refs.suggestions;T&&D?.containsEl(T)||(this.patchMissingBlocks("blur"),this.formatBlocks("blur")),G.$emit(this,"blur")},getBrieflyBlocks(){return this.$refs.content.getBrieflyBlocks()},setBrieflyBlocks(m){this.$refs.content.setBrieflyBlocks(m)}},render(){return k.h("div",{class:this.searchClass},[k.h(b.default,{class:[`${this.cls}-icon`],props:{name:"semantic-search-icon",svgIconSet:"set01"}}),k.h(p.default,{class:[`${this.cls}-popup`],props:{type:"error",tippyOptions:this.tippyOptions,disable:this.isPopupDisabled,content:this.currentValidateMessage},scopedSlots:{default:()=>[k.h(E.default,{props:{text:this.text,value:F.getModelValue(this),categories:this.categories,fetchOperators:this.fetchOperators,fetchValueTypes:this.fetchValueTypes,placeholder:this.placeholder,dslProcessor:this.dslProcessor,blockFactory:this.blockFactory,grammar:this.grammar,groupingInfo:this.groupingInfo,hintInfo:this.hintInfo,validator:this.validator,validateMessage:this.validateMessage},ref:"content",on:{hint:this.onHint,value:this.onBlocksChange,keydown:this.onKeyDown,error:(m,T)=>{G.$emit(this,"error",m,T),this.hasError=m,this.currentValidateMessage=T},text:m=>G.$emit(this,"text",m),blur:this.onContentBlur,focus:m=>G.$emit(this,"focus",m)}})]}}),this.genSuggestions(),this.genClearIcon(),this.genRightSlots()])}});x.default=c}(TB)),TB}var AB={},CK;function Hee(){return CK||(CK=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=gf(),k=Xn(),F=Ni(),B=_i(),G=Dr(),E=Kt(),A=Qo(),u=ln(),o=Si(),S=ht(),_=St();const p=S.defineComponent({name:"Slider",components:{vInput:M.default},props:{disabled:{type:Boolean},min:{type:[Number,String],required:!0},max:{type:[Number,String],required:!0},step:{type:[Number,String],default:1},[F.componentsProps.value()]:{type:Number,required:!0},patchNum:{type:Function,default:void 0},withInput:{type:[Boolean,Object],default:!1}},emits:["update:model-value","input"],data(){return{dragging:!1,inputVal:void 0}},computed:{innerValue(){return F.getModelValue(this)},sliderStyle(){const s=Math.max(this.min,Math.min(this.inputVal,this.max)),l=(s-this.min)/(this.max-this.min)*100;return{"--value":`"${+s}"`,"--percent":`${+l}%`}},sliderClass(){return["v-slider",{"with-input":this.hasInput,"v-slider-disabled":this.disabled,"v-slider-dragging":this.dragging}]},hasInput(){return!!this.withInput},inputBinding(){const s={selectOnFocus:!0,type:"number",inputAttrs:{step:this.step,min:this.min,max:this.max}};return E.isObject(this.withInput)?B.merge(s,this.withInput):s}},watch:{innerValue:{handler(s){this.inputVal=s},immediate:!0}},[k.componentHooks.beforeUnmount](){this.disposedFn?.()},methods:{normalizeValue(s){return Math.round(s/this.step)*this.step},hasPrefixLabels(){return o.hasSlot(this,"prefix")},hasSuffixLabels(){return o.hasSlot(this,"suffix")||this.hasInput},coordsToValue(s,l){const I=s/l*(this.max-this.min);return this.normalizeValue(I)},onLineMouseDown(s){if(this.disabled)return;const{offsetX:l}=s,w=this.coordsToValue(l,this.$refs.line.offsetWidth);this.setValue(w),this.startDragging(w,s.clientX)},onThumbMouseDown(s){if(this.disabled)return;const l=A.isTouchEvent(s)?s.touches[0].clientX:s.clientX;this.startDragging(this.innerValue,l)},startDragging(s,l){let w=E.clampValue(s,this.min,this.max);const I=this.$refs.line.offsetWidth;this.disposedFn?.(),this.disposedFn=G.on(document.documentElement,["touchmove","mousemove"],C=>{const h=A.isTouchEvent(C)?C.touches[0].clientX:C.clientX;this.dragging||(this.dragging=!0);const c=this.coordsToValue(h-l,I);w=E.clampValue(s+c,this.min,this.max),this.setValue(w)}),G.once(document.documentElement,["touchend","mouseup"],()=>{this.dragging=!1,this.disposedFn?.()})},setValue(s){this.patchNum&&(s=this.patchNum(s)),s=E.clampValue(s,this.min,this.max),u.$emit(this,F.getModelEventName(this),s)},onInputValChange(s){this.inputVal=s},onInputCommit(){if(E.isEmptyString(this.inputVal))this.setValue(this.innerValue),this.inputVal=this.innerValue;else{const s=this.normalizeValue(this.inputVal);this.inputVal=s,this.setValue(s)}}}}),f={key:0,class:"v-slider-prefix-labels v-slider-labels"},y={class:"v-slider-line-wrapper"},d={key:1,class:"v-slider-suffix-labels v-slider-labels"};function v(s,l,w,I,C,h){const c=S.resolveComponent("v-input"),m=S.resolveDirective("syno-id");return S.withDirectives((S.openBlock(),S.createElementBlock("div",{style:S.normalizeStyle(s.sliderStyle),class:S.normalizeClass(s.sliderClass)},[s.hasPrefixLabels()?(S.openBlock(),S.createElementBlock("div",f,[S.renderSlot(s.$slots,"prefix",{value:s.innerValue})])):S.createCommentVNode("",!0),S.createElementVNode("div",y,[S.createElementVNode("div",{ref:"line",class:"v-slider-line",onMousedown:l[2]||(l[2]=function(){return s.onLineMouseDown&&s.onLineMouseDown(...arguments)})},[S.createElementVNode("div",{class:"v-slider-thumb",onMousedown:l[0]||(l[0]=S.withModifiers(function(){return s.onThumbMouseDown&&s.onThumbMouseDown(...arguments)},["stop"])),onTouchstart:l[1]||(l[1]=S.withModifiers(function(){return s.onThumbMouseDown&&s.onThumbMouseDown(...arguments)},["stop"]))},null,32)],544),S.renderSlot(s.$slots,"marked",{value:s.innerValue})]),s.hasSuffixLabels()?(S.openBlock(),S.createElementBlock("div",d,[S.renderSlot(s.$slots,"suffix",{value:s.innerValue}),s.hasInput?(S.openBlock(),S.createBlock(c,S.mergeProps({key:0,class:"slider-input","syno-id":`${s.synoId}-input`},s.inputBinding,{value:s.inputVal,"model-value":s.inputVal,onInput:s.onInputValChange,"onUpdate:modelValue":s.onInputValChange,onKeypress:S.withKeys(s.onInputCommit,["enter"]),onBlur:s.onInputCommit}),{suffix:S.withCtx(()=>[S.renderSlot(s.$slots,"input-suffix",{value:s.innerValue})]),_:3},16,["syno-id","value","model-value","onInput","onUpdate:modelValue","onKeypress","onBlur"])):S.createCommentVNode("",!0)])):S.createCommentVNode("",!0)],6)),[[m]])}var b=_.default(p,[["render",v]]);x.default=b}(AB)),AB}var MB={},DB={},_K;function A5(){return _K||(_K=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=ln(),k=ci(),F=La(),B=ht(),G=St();const E={ROW:"row"},A=B.defineComponent({name:"TabFooter",components:{vButton:F.default},mixins:[k.default],props:{confirmText:{type:String,default:void 0},footerDirection:{type:Object,default(){return{mobile:E.ROW,desktop:E.ROW}}},cancelText:{type:String,default:void 0}},emits:["cancel","confirm"],data:()=>({prefix:"v-tabs-footer"}),computed:{innerConfirmText(){return this.confirmText??this._i18n("common","save")},innerCancelText(){return this.cancelText??this._i18n("common","cancel")}},mounted(){},methods:{onClickCancel(){M.$emit(this,"cancel")},onClickConfirm(){M.$emit(this,"confirm")}}}),u={class:"default pull-right button-region"};function o(_,p,f,y,d,v){const b=B.resolveComponent("v-button"),s=B.resolveDirective("syno-id");return B.withDirectives((B.openBlock(),B.createElementBlock("div",u,[B.createVNode(b,{"syno-id":`${_.synoId}-cancel`,type:"footbar",onClick:_.onClickCancel,suffix:"cancel"},{default:B.withCtx(()=>[B.createTextVNode(B.toDisplayString(_.innerCancelText),1)]),_:1},8,["syno-id","onClick"]),B.createVNode(b,{"syno-id":`${_.synoId}-apply`,type:"footbar",onClick:_.onClickConfirm,suffix:"main"},{default:B.withCtx(()=>[B.createTextVNode(B.toDisplayString(_.innerConfirmText),1)]),_:1},8,["syno-id","onClick"])])),[[s]])}var S=G.default(A,[["render",o]]);x.default=S}(DB)),DB}var SK;function $ee(){return SK||(SK=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=ln(),k=ev(),F=Ni(),B=ci(),G=A5(),E=Zo(),A=Kt(),u=Dr(),o=Ng(),S=fr(),_=kl(),p=Ur(),f=ht(),y=St();const d=f.defineComponent({name:"Tabs",components:{tabFooter:G.default,vLayout:_.default},mixins:[E.default,B.default,S.inject("info-board"),o.useConfigConsumer("tabs"),S.provide("tabs")],props:{[F.componentsProps.value()]:{type:String,default:void 0},type:{type:String,default:"line"},size:{type:String,default:void 0},hasFbar:{type:Boolean,default:!0},fbar:{type:Boolean,default:!0},confirmText:{type:String,default:void 0},cancelText:{type:String,default:void 0},layoutType:{type:String,default:"content"},layoutOrder:{type:Number,default:0},mobileBreakpoint:{type:[String,Boolean],default:"xxs"},navTabsList:{type:[Array,Boolean],default:!1},beforeTabChange:{type:Function,default:A.noop},styleVersion:{default:7,type:Number}},emits:["update:model-value","tab-click","cancel","confirm","input","reachYEnd","reachYStart"],data(){return{prefixCls:"v-tabs",activatedTabKey:void 0,activeIndex:0,tabs:{},orderedTabs:[],inInfoBoard:!1,reachYStart:!0,reachYEnd:!0,navbarScrollingTo:"middle",showNavbarFilter:!1}},computed:{innerConfigConsumer(){return this.configConsumer},innerStyleVersion(){return this.getConfigValue("styleVersion")},styleVersionCls(){return"v"+this.innerStyleVersion},useFooter(){return this.hasFbar!==!0?(p.deprecate("hasFbar","fbar",this),this.hasFbar):this.fbar},innerNavTabsList(){return A.isArray(this.navTabsList)?this.navTabsList:this.orderedTabs},tabPrefixCls(){return`${this.prefixCls}-tab`},tabBodyCls(){return[`${this.tabPrefixCls}-content`,{"reach-y-start":this.reachYStart,"reach-y-end":this.reachYEnd}]},fbarCls(){return[`${this.prefixCls}-footer`,{"reach-y-start":this.reachYStart,"reach-y-end":this.reachYEnd}]},navPrefixCls(){return`${this.prefixCls}-nav`},inkBarPrefixCls(){return`${this.prefixCls}-ink-bar`},contentPrefixCls(){return`${this.prefixCls}-content`},tabsCls(){return[this.styleVersionCls,this.prefixCls,{mobile:this.isMobile}]},navContainerCls(){return[`${this.navPrefixCls}-container`,`scrolling-to-${this.navbarScrollingTo}`]},isMobile(){return!this.$breakpointManager&&this.mobileBreakpoint?(p.remind("please import and use BreakpointManagerPlugin when you are in tree-shaking mode or breakpoint will not active."),!1):this.mobileBreakpoint&&this.$breakpointManager?.lessAndEqThan(this.mobileBreakpoint)},innerConfirmText(){return this.confirmText??this._i18n("common","save")},innerCancelText(){return this.cancelText??this._i18n("common","cancel")}},watch:{[F.componentsProps.value()]:{async handler(c){const m=this.innerNavTabsList.find(T=>T.tabKey===c);m&&this.selectTab(m,{autoScroll:this.isMobile})}},activatedTabKey(c){M.$emit(this,F.getModelEventName(this),c)}},created(){M.$on(this,"reachYEnd",c=>{this.reachYEnd=c}),M.$on(this,"reachYStart",c=>{this.reachYStart=c})},mounted(){this["info-board"]&&(this.inInfoBoard=!0),this.onTabNavScroll();const c=this.orderedTabs.find(m=>m.tabKey===F.getModelValue(this));c&&this.selectTab(c,{autoScroll:this.isMobile}),this.navTabsList&&(this.activatedTabKey=F.getModelValue(this))},methods:{onTabNavScroll(){const{scrollLeft:c,scrollWidth:m,offsetWidth:T}=this.$refs.navWrap;this.showNavbarFilter=m>T,c<=0?this.navbarScrollingTo="left":c>=m-T?this.navbarScrollingTo="right":this.navbarScrollingTo="middle"},getTabHeaderCls(c){const m=this.tabPrefixCls;return[m,{[m+"-active"]:c.tabKey==this.activatedTabKey,[m+"-disabled"]:c.disabled,[m+"-hidden"]:c.hidden}]},getOrderedTabs(c){return Object.values(c).sort((m,T)=>m.order>T.order?1:m.order<T.order?-1:0,[])},async addTab(c){this.tabs[k.getUid(c)]=c,this.orderedTabs=this.getOrderedTabs(this.tabs)},removeTab(c){delete this.tabs[k.getUid(c)],this.orderedTabs=this.getOrderedTabs(this.tabs)},getActiveTab(){return this.orderedTabs.find(c=>c.tabKey===this.activatedTabKey)},onClickTab(c,m){this.selectTab(c,m),M.$emit(this,"tab-click",this.activatedTabKey)},async selectTab(c){let{autoScroll:m=!1,autoFocus:T=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.activatedTabKey!==c.tabKey&&await this.beforeTabChange({key:this.activatedTabKey},{key:c.tabKey})===!1)return!1;T&&u.focusWithoutScroll(this.$refs?.[c.tabKey]?.[0]),m&&u.scrollTo(this.$refs?.[c.tabKey]?.[0],{inline:"center",behavior:"smooth"}),this.activatedTabKey=c.tabKey},onCancel(){M.$emit(this,"cancel")},onConfirm(){M.$emit(this,"confirm")},onKeyDown(c){(c.key==="ArrowLeft"||c.key==="ArrowUp")&&(c.preventDefault(),this.focusPrevTab()),(c.key==="ArrowRight"||c.key==="ArrowDown")&&(c.preventDefault(),this.focusNextTab())},focusDescendTab(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;const m=(N,z,H)=>{const $=(z+H)%H;return $===T?T:N[$].disabled?m(N,$+c,H):$},T=this.orderedTabs.findIndex(N=>N.tabKey===this.activatedTabKey),D=this.orderedTabs.length,O=m(this.orderedTabs,T+c,D);return this.selectTab(this.orderedTabs[O],{autoScroll:this.isMobile,autoFocus:!0})},focusPrevTab(){return this.focusDescendTab(-1)},focusNextTab(){return this.focusDescendTab(1)},hasErrorState(c){return c.error}}}),v=["syno-id","tabindex","id","aria-disabled","aria-selected","aria-controls","onClick"],b={class:"tab-text-wrapper"},s={class:"tab-text"},l={key:0,class:"error-dot"},w=f.createElementVNode("i",{class:"prev-filter gradient-filter"},null,-1),I=f.createElementVNode("i",{class:"next-filter gradient-filter"},null,-1);function C(c,m,T,D,O,N){const z=f.resolveComponent("v-layout"),H=f.resolveComponent("tab-footer"),$=f.resolveDirective("syno-id");return f.withDirectives((f.openBlock(),f.createBlock(z,{class:f.normalizeClass(c.tabsCls),type:`tabs.${c.layoutType}`,order:c.layoutOrder},{default:f.withCtx(()=>[f.createVNode(z,{role:"tablist",class:f.normalizeClass(c.prefixCls+"-bar"),onKeydown:c.onKeyDown,type:"tab-tbar"},{default:f.withCtx(()=>[f.createElementVNode("div",{class:f.normalizeClass(c.navContainerCls)},[f.createElementVNode("div",{ref:"navWrap",class:f.normalizeClass(c.navPrefixCls+"-wrap"),onScroll:m[0]||(m[0]=function(){return c.onTabNavScroll&&c.onTabNavScroll(...arguments)})},[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(c.innerNavTabsList,V=>(f.openBlock(),f.createElementBlock("div",{"syno-id":`${c.synoId}-head-${V.tabKey}`,key:V.tabKey,ref_for:!0,ref:V.tabKey,role:"tab",tabindex:V.tabKey==c.activatedTabKey?0:-1,id:`tab-${V.tabKey}`,"aria-disabled":V.disabled,"aria-selected":V.tabKey==c.activatedTabKey,"aria-controls":`tab-pane-${V.tabKey}`,class:f.normalizeClass(c.getTabHeaderCls(V)),onClick:P=>c.onClickTab(V,{autoScroll:c.isMobile})},[f.createElementVNode("div",b,[f.createElementVNode("span",s,f.toDisplayString(V.tab),1),c.hasErrorState(V)?(f.openBlock(),f.createElementBlock("i",l)):f.createCommentVNode("",!0)]),f.createElementVNode("div",{class:f.normalizeClass(c.tabPrefixCls+"-text-guard"),"aria-hidden":"true"},f.toDisplayString(V.tab),3)],10,v))),128))],34),c.showNavbarFilter?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[w,I],64)):f.createCommentVNode("",!0)],2)]),_:1},8,["class","onKeydown"]),f.createVNode(z,{class:f.normalizeClass(c.tabBodyCls),type:"tab-body",ref:"body"},{default:f.withCtx(()=>[f.renderSlot(c.$slots,"default")]),_:3},8,["class"]),!c.inInfoBoard&&c.useFooter?(f.openBlock(),f.createBlock(z,{key:0,class:f.normalizeClass(c.fbarCls),type:"tab-fbar",role:"tabfooter"},{default:f.withCtx(()=>[f.renderSlot(c.$slots,"fbar",{},()=>[f.createVNode(H,{"confirm-text":c.innerConfirmText,"cancel-text":c.innerCancelText,onCancel:c.onCancel,onConfirm:c.onConfirm,"syno-id":`${c.synoId}-fbar`},null,8,["confirm-text","cancel-text","onCancel","onConfirm","syno-id"])])]),_:3},8,["class"])):f.createCommentVNode("",!0)]),_:3},8,["class","type","order"])),[[$]])}var h=y.default(d,[["render",C]]);x.default=h}(MB)),MB}var OB={},IK;function zee(){return IK||(IK=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Xn(),k=ln(),F=fr(),B=Si(),G=wa(),E=kl(),A=ht(),u=St();const o=A.defineComponent({name:"TabPane",components:{vScrollbar:G.default,vLayout:E.default},mixins:[F.provide("layout-container"),F.inject("tabs"),F.provide("alert-bar-container")],props:{tabKey:{type:String,default:void 0},disabled:{type:Boolean,default:!1},tab:{type:String,default:void 0},hidden:{type:Boolean,default:!1},detectScroll:{type:Boolean,default:!0},alwaysActive:{type:Boolean,default:!1},order:{type:Number,default:0},error:{type:Boolean,default:!1}},emits:["reachYEnd","reachYStart","activate","deactivate"],data:()=>({prefix:"v-tabs-tabpane",active:!1,reachYEnd:!0,reachYStart:!0}),computed:{wrapCls(){return[this.prefix]}},watch:{reachYEnd(f){this.active&&k.$emit(this.tabs?.instance,"reachYEnd",f)},reachYStart(f){this.active&&k.$emit(this.tabs?.instance,"reachYStart",f)}},async mounted(){this.tabs?.instance?.addTab(this),this.disposedFn=this.$watch(()=>this.tabs.instance.activatedTabKey,async(f,y)=>{this.active=f===this.tabKey,this.active?(k.$emit(this,"activate",this),await this.$nextTick(),this.detectReachStartEnd()):k.$emit(this,"deactivate",this)},{immediate:!0})},[M.componentHooks.beforeUnmount](){this.disposedFn?.(),this.tabs?.instance?.removeTab(this)},methods:{hasDefaultSlot(){return B.hasSlot(this,"default")},hasScrollBodySlot(){return B.hasSlot(this,"scroll-body")},hasContentBodySlot(){return B.hasSlot(this,"content-body")},getScrollEl(){return this.$refs.scrollbar?.getScrollEl()},detectReachStartEnd(){this.detectScroll&&this.$refs.scrollbar&&(this.reachYStart=this.$refs.scrollbar.isReachTop(),this.reachYEnd=this.$refs.scrollbar.isReachBottom())}}}),S=["aria-hidden","id","aria-labelledby"];function _(f,y,d,v,b,s){const l=A.resolveComponent("v-layout"),w=A.resolveComponent("v-scrollbar"),I=A.resolveDirective("syno-id");return A.withDirectives((A.openBlock(),A.createElementBlock("div",{role:"tabpanel","aria-hidden":!f.active,class:A.normalizeClass(f.wrapCls),id:`tab-pane-${f.tabKey}`,"aria-labelledby":`tab-${f.tabKey}`},[A.renderSlot(f.$slots,"default"),f.hasScrollBodySlot()?(A.openBlock(),A.createBlock(w,{key:0,ref:"scrollbar",onScroll:f.detectReachStartEnd},{default:A.withCtx(()=>[A.createVNode(l,{type:"content"},{default:A.withCtx(()=>[A.renderSlot(f.$slots,"scroll-body")]),_:3})]),_:3},8,["onScroll"])):A.createCommentVNode("",!0),f.hasContentBodySlot()?(A.openBlock(),A.createBlock(l,{key:1,type:"content"},{default:A.withCtx(()=>[A.renderSlot(f.$slots,"content-body")]),_:3})):A.createCommentVNode("",!0)],10,S)),[[A.vShow,f.active||f.alwaysActive],[I]])}var p=u.default(o,[["render",_]]);x.default=p}(OB)),OB}var NB={},xK;function Wee(){return xK||(xK=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=nd(),k=Si(),F=Ni(),B=ln(),G=Ob,E=vr(),A=kr(),u=wa(),o=uh(),S=Kt(),_=Qo(),p=Dr(),f=ht(),y=St();E.register("timeline-group-arrow-up",A.vIconChevronUp),E.register("timeline-group-arrow-down",A.vIconChevronDown);const d="top",v=f.defineComponent({name:"Timeline",components:{vScrollbar:u.default,vSlideUpDownTransition:o.default},mixins:[E.default],props:{[F.componentsProps.value()]:{type:[String,Number],default:null},timePoints:{type:Array,default:()=>[]},order:{type:String,default:"ASC",validator(P){return["ASC","DESC"].includes(P)}},groupDateFormatter:{type:Function,default:null},pointDateFormatter:{type:Function,default:null},pointTimeFormatter:{type:Function,default:null},defaultGroupExpanded:{type:Object,default:()=>({})}},emits:["update:model-value"],data(){return{prefixCls:"v-timeline",selected:void 0,expanded:{}}},computed:{topTimePoints(){return this.timePoints.filter(P=>this.getGroupId(P)===d)},timePointGroup(){const P=[...this.timePoints];P.sort((Y,Z)=>this.order==="ASC"?Y.date-Z.date:Z.date-Y.date);const U={};for(const Y of P){const Z=this.getGroupId(Y);Z!==d&&(Z in U||(U[Z]={points:[]}),U[Z].points.push(Y))}return U},timePointsMap(){const P=new Map;for(const U of this.timePoints)P.set(U.value,U);return P}},watch:{defaultGroupExpanded:{handler(P){this.expanded=Object.assign({},P)},immediate:!0},[F.componentsProps.value()]:{async handler(P){P&&(this.selected=P,this.ensureSelectedItemVisible())},immediate:!0}},methods:{hasAction(){return k.hasSlot(this,"time-point-item-action")},getSelectedTimePoint(){return this.timePointsMap.get(this.selected)},getGroupId(P){return P.group?P.group:G.startOfMonth(new Date(P.date))?.getTime()},getTimePointEl(P){return this.$el.querySelector(`#${this.getTimelinePointItemId(P.value)}`)},async ensureTimepointVisible(P){M.set(this.expanded,this.getGroupId(P),!0),await this.$nextTick();const U=this.getTimePointEl(P);U&&this.$refs.scrollbar?.ensureVisible(U)},groupHeaderCls(P){return["group-header",{collapsed:!this.expanded[P]}]},getGroupDateString(P){return P=Number(P),this.groupDateFormatter?this.groupDateFormatter(P):G.format(new Date(P),"MMM yyyy")},getPointDateString(P){return P=Number(P),this.pointDateFormatter?this.pointDateFormatter(P):G.format(new Date(P),"d MMM")},getPointTimeString(P){return P=Number(P),this.pointTimeFormatter?this.pointTimeFormatter(P):G.format(new Date(P),"kk:mm:ss")},onClickGroupHeader(P){M.set(this.expanded,P,!this.expanded[P])},onSelectItem(P){this.selected=P.value,B.$emit(this,F.getModelEventName(this),P.value)},ensureSelectedItemVisible(){const P=this.getSelectedTimePoint();this.ensureTimepointVisible(P)},getTimelinePointItemId(P){return S.slugify(`v-timeline-point-item-${P}`)},async selectTimePointByOffset(){let P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;const U=[...this.$el.querySelectorAll(".point-item,.group-header")],Y=this.getTimePointEl(this.getSelectedTimePoint());let Z=U.findIndex(q=>Y.contains(q));if(Z===-1)return;const X=Z+P;if(X<0||X>=U.length)return;const J=U[X];if(this.$refs.scrollbar?.ensureVisible(J),p.hasClass(J,"group-header")){const q=J.getAttribute("group-id"),te=P<0?-1:1;this.expanded[q]||(M.set(this.expanded,q,!0),await S.sleep(0)),await this.selectTimePointByOffset(P+te);return}U[X].focus(),U[X].click()},onArrowKeydown(P){_.isDownArrow(P)?this.selectTimePointByOffset(1):_.isUpArrow(P)&&this.selectTimePointByOffset(-1)}}}),b=["id","onClick"],s=f.createElementVNode("div",{class:"line"},null,-1),l={class:"text"},w={class:"date"},I={class:"time"},C={key:0,class:"action-wrapper"},h=["onClick","group-id"],c={class:"text"},m={key:0,class:"group-points"},T=["id","onClick"],D=f.createElementVNode("div",{class:"line"},null,-1),O={class:"text"},N={class:"date"},z={class:"time"},H={key:0,class:"action-wrapper"};function $(P,U,Y,Z,X,J){const q=f.resolveComponent("v-icon"),te=f.resolveComponent("v-slide-up-down-transition"),re=f.resolveComponent("v-scrollbar");return f.openBlock(),f.createElementBlock("div",{class:"v-timeline",onKeydown:[U[0]||(U[0]=f.withKeys(f.withModifiers(function(){return P.onArrowKeydown&&P.onArrowKeydown(...arguments)},["prevent"]),["up"])),U[1]||(U[1]=f.withKeys(f.withModifiers(function(){return P.onArrowKeydown&&P.onArrowKeydown(...arguments)},["prevent"]),["down"]))],role:"list"},[f.createVNode(re,{ref:"scrollbar"},{default:f.withCtx(()=>[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(P.topTimePoints,ie=>(f.openBlock(),f.createElementBlock("li",{key:ie.value,class:f.normalizeClass(["point-item",{selected:ie.value===P.selected}]),id:P.getTimelinePointItemId(ie.value),onClick:ne=>P.onSelectItem(ie),tabindex:"-1"},[s,f.createElementVNode("div",l,[f.renderSlot(P.$slots,`${ie.slot}-text`,{},()=>[f.createElementVNode("div",w,f.toDisplayString(P.getPointDateString(ie.date)),1),f.createElementVNode("div",I,f.toDisplayString(P.getPointTimeString(ie.date)),1)])]),f.renderSlot(P.$slots,"time-point-item-desc",{timePoint:ie}),P.hasAction()?(f.openBlock(),f.createElementBlock("div",C,[f.renderSlot(P.$slots,"time-point-item-action",{timePoint:ie})])):f.createCommentVNode("",!0)],10,b))),128)),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(Object.keys(P.timePointGroup),ie=>(f.openBlock(),f.createElementBlock("li",{key:ie,class:"group"},[f.createElementVNode("div",{class:f.normalizeClass(P.groupHeaderCls(ie)),onClick:ne=>P.onClickGroupHeader(ie),"group-id":ie,tabindex:"-1"},[f.createElementVNode("div",c,f.toDisplayString(P.getGroupDateString(ie))+" ("+f.toDisplayString(P.timePointGroup[ie].points.length)+") ",1),f.createVNode(q,{name:P.expanded[ie]?"timeline-group-arrow-up":"timeline-group-arrow-down",class:"arrow","svg-icon-set":"set31"},null,8,["name"])],10,h),f.createVNode(te,null,{default:f.withCtx(()=>[P.expanded[ie]?(f.openBlock(),f.createElementBlock("div",m,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(P.timePointGroup[ie].points,ne=>(f.openBlock(),f.createElementBlock("li",{key:ne.value,class:f.normalizeClass(["point-item",{selected:ne.value===P.selected}]),id:P.getTimelinePointItemId(ne.value),onClick:le=>P.onSelectItem(ne),tabindex:"-1"},[D,f.createElementVNode("div",O,[f.createElementVNode("div",N,f.toDisplayString(P.getPointDateString(ne.date)),1),f.createElementVNode("div",z,f.toDisplayString(P.getPointTimeString(ne.date)),1)]),f.renderSlot(P.$slots,"time-point-item-desc",{timePoint:ne}),P.hasAction()?(f.openBlock(),f.createElementBlock("div",H,[f.renderSlot(P.$slots,"time-point-item-action",{timePoint:ne})])):f.createCommentVNode("",!0)],10,T))),128))])):f.createCommentVNode("",!0)]),_:2},1024)]))),128))]),_:3},512)],32)}var V=y.default(v,[["render",$]]);x.default=V}(NB)),NB}var PB={},TK;function Uee(){return TK||(TK=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Ni(),k=ln(),F=ht(),B=St();const G=F.defineComponent({name:"Toggle",props:{[M.componentsProps.value()]:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:model-value"],data(){return{prefixCls:"v-toggle"}},computed:{wrapperCls(){return[`${this.prefixCls}-wrapper`,{on:M.getModelValue(this),disabled:this.disabled}]}},methods:{onClick(u){this.disabled||k.$emit(this,M.getModelEventName(this),!M.getModelValue(this))}}});function E(u,o,S,_,p,f){return F.openBlock(),F.createElementBlock("div",{class:F.normalizeClass(u.wrapperCls),onClick:o[0]||(o[0]=function(){return u.onClick&&u.onClick(...arguments)})},[F.createElementVNode("div",{class:F.normalizeClass(u.prefixCls+"-indicator")},null,2)],2)}var A=B.default(G,[["render",E]]);x.default=A}(PB)),PB}var BB={},LB={},kK;function Twe(){return kK||(kK=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=nd(),k=ln(),F=Kt(),B=Zo(),G=ht(),E=G.defineComponent({mixins:[B.default],props:{checkbox:{type:Boolean,default:!1}},emits:["internal-checked","checked","checked-up","checked-down"],created(){k.$on(this,"checked-up",A=>{const u=this.getNodePath(this.currentData,A[this.paramsInfo.id]);if(u.length===0)return;const[{node:o}]=u;this.updateCheckedStateByNode(o),this.dispatch("TreePanel","checked-up",o)}),k.$on(this,"checked-down",A=>{A._indeterminate||!A[this.paramsInfo.children]||this.currentData.length<1||this.getNodePath(A[this.paramsInfo.children],this.currentData[0][this.paramsInfo.id]).length<1||(this.updateAllCheckedState(A),this.broadcast("TreePanel","checked-down",[A]))})},methods:{prepareCheckboxData(){if(this.checkbox){for(let A of this.currentData)F.isDefined(A.disabled)&&M.set(A,"disabled",A.disabled||!1),F.isDefined(A.indeterminate)&&M.set(A,"_indeterminate",A.indeterminate||!1),A.checked||A._indeterminate?(M.set(A,"checked",A.checked||!1),M.set(A,"_indeterminate",A._indeterminate||!1)):this.parent&&this.parent._indeterminate===!1&&A.disabled!==!0&&this.parent.checked===!0?(M.set(A,"checked",!0),M.set(A,"_indeterminate",!1)):(this.parent&&this.parent._indeterminate===!1&&A.disabled!==!0&&this.parent.checked,M.set(A,"checked",!1),M.set(A,"_indeterminate",!1));this.currentData.length>0&&this.dispatch("TreePanel","checked-up",[this.currentData[0]])}},checkNodeByKeyup(A){this.indentLevel===0&&this.setCheckedByNodeId(this.currentSelectedId)},setCheckedByNodeId(A){const u=this.currentData.findIndex(S=>S[this.paramsInfo.id]===A),o=this.currentData[u];if(u>=0){let S=!o.checked;o._indeterminate&&(S=!0),this.checkByClick(o,S)}else this.broadcast("TreePanel","set-node-checked",[A])},checkByClick(A){let u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;this.checkbox&&(A.checked=u,A._indeterminate=!1,this.emitCheckedState(A),this.dispatch("TreePanel","checked-up",[A]),this.broadcast("TreePanel","checked-down",[A]))},emitCheckedState(A){if(this.indentLevel!==0)return k.$emit(this,"internal-checked",A);k.$emit(this,"checked",{path:this.getNodePath(this.currentData,A[this.paramsInfo.id]),checked:A.checked,_indeterminate:A._indeterminate,node:A})},updateCheckedStateByNode(A){let u=A[this.paramsInfo.children].filter(o=>!o.disabled);if(!(!A||A.disabled||!u)){if(F.isDefined(A.indeterminate)){A._indeterminate=A.indeterminate;return}if(A._indeterminate=!0,!u.some(o=>o._indeterminate)){if(u.every(o=>o.checked)){A.checked=!0,A._indeterminate=!1;return}if(u.every(o=>!o.checked)){A.checked=!1,A._indeterminate=!1;return}}}},updateAllCheckedState(A){let u=this.currentData.filter(o=>!o.disabled);for(let o of u)o.disabled||(o.checked=A.checked,o._indeterminate=F.isDefined(o.indeterminate)?o.indeterminate:A._indeterminate)}}});x.default=E}(LB)),LB}var RK;function Gee(){return RK||(RK=1,function(x){Object.defineProperty(x,"__esModule",{value:!0}),RQ();var M=Xn(),k=nd(),F=ln(),B=Si(),G=Zo(),E=wa(),A=uh(),u=rv(),o=Twe(),S=ya(),_=w5(),p=Kl(),f=Dr(),y=Kt(),d=df(),v=_i(),b=vr(),s=kr(),l=ht(),w=St();b.register("tree-panel-arrow-right",s.vIconTreeArrowRight),b.register("tree-panel-arrow-down",s.vIconTreeArrowDown);const I=3,C=3,h={TOP:Symbol("INSERT_TOP"),BOTTOM:Symbol("INSERT_BOTTOM"),INNER:Symbol("INSERT_INNER")},c=600,m=0,T={TOP:Symbol("DRAGGING_TOP"),BOTTOM:Symbol("DRAGGING_BOTTOM"),INNER:Symbol("DRAGGING_INNER"),NONE:Symbol("DRAGGING_NONE")};function D(q,te){let re=q._parentNode;for(;re;){if(re===te)return!0;re=re._parentNode}return!1}function O(q){return q.selectable!==!1&&!q.disabled}const N=l.defineComponent({name:"TreePanel",components:{vSlideUpDownTransition:A.default,vCheckbox:u.default,vSpinIcon:d.default,withScrollbar:p.withWrap(E.default),withDragTarget:p.withWrap(_.default)},directives:{tooltip:S.default},mixins:[G.default,o.default,b.default],props:{showScrollbar:{type:Boolean,default:!0},isModule:{type:Boolean,default:!1},prefixCls:{type:String,default:"v-tree-panel"},level:{type:String,default:"0"},indentLevel:{type:Number,default:0},data:{type:Array,default:()=>[]},paramsInfo:{type:Object,default:()=>({title:"title",children:"children",id:"id",customClass:"customClass"})},expandOnSelect:{type:Boolean,default:!1},asyncExpandFunc:{type:Function,default:void 0},selectedId:{type:String,default:void 0},horizontalScroll:{type:Boolean,default:!1},draggable:{type:[Boolean,String],default:!1,validator(q){return y.isString(q)?["append-only","full"].includes(q):!0}},getDragZone:{type:Function,default:void 0},getDraggingProps:{type:Function,default:()=>({})},parent:{type:Object,default:()=>null},validateDrop:{type:Function,default:y.noop},validateDrag:{type:Function,default:y.noop},dragging:{type:Boolean,default:!1},getListItemTag:{type:Function,default:()=>"li"}},emits:["clicked","selected","expanded","collapsed","update:data","node-clicked","node-selected","node-expanded","node-collapsed","cancel-selected","set-node-expanded","set-node-checked","drop"],data:()=>({$_currentData:[],expandedIndex:void 0,currentSelectedId:void 0,currentDragging:!1}),computed:{scrollbarCls(){return[`${this.prefixCls}-scrollbar`,{"horizontal-scroll":this.isRoot&&this.horizontalScroll}]},isRoot(){return this.level==="0"},treeCls(){return this.isRoot?[this.prefixCls,{"horizontal-scroll":this.horizontalScroll,"v-module":this.isModule,dragging:this.currentDragging}]:[`${this.prefixCls}-child-tree`,{"v-module-child-tree":this.isModule}]},currentData:{set(q){this.$data.$_currentData=q,this.preHandleData()},get(){return this.$data.$_currentData}},flattenNodes(){if(!this.isRoot)return null;let q=[],te=[];for(let re=this.currentData.length-1;re>=0;re--)te.push(this.currentData[re]);for(;te.length>0;){const re=te.pop(),ie=re[this.paramsInfo.children]||[];q.push(re);for(let ne=ie.length-1;ne>=0;ne--)te.push(ie[ne])}return q},displayedNodes(){if(!this.isRoot)return null;function q(te){return te._parentNode?te._parentNode.expanded&&q(te._parentNode):!0}return this.flattenNodes.reduce((te,re)=>(q(re)&&O(re)&&te.push(re),te),[])},nodesMap(){return this.flattenNodes.reduce((q,te)=>(q[te[this.paramsInfo.id]]=te,q),{})},indentClass(){return[`${this.prefixCls}-indent-${this.indentLevel}`,`${this.prefixCls}-indent`]},indentStyle(){return{"--indent":this.indentLevel}}},watch:{dragging:{handler(q){this.currentDragging=q},immediate:!0},draggable(q){q&&this.updateDragTargets()},selectedId:{handler(q){this.currentSelectedId=q,this.isRoot&&q&&this.$nextTick(()=>{this.selectNode(this.currentSelectedId,!0,!0)})},immediate:!0},data:{handler(){this.currentData=this.data},immediate:!0},currentData:{handler(q){this.draggable&&this.updateDragTargets()}}},created(){let q=te=>{let re=this.currentData.find(ie=>y.isArray(ie[this.paramsInfo.children])&&ie[this.paramsInfo.children].map(ne=>ne.id).includes(te.path[0]?.id));re!==void 0&&te.path.unshift(re)};F.$on(this,"node-clicked",te=>{if(q(te),this.level!=="0")return this.dispatch("TreePanel","node-clicked",te);F.$emit(this,"clicked",te)}),F.$on(this,"node-selected",te=>{if(q(te),this.level!=="0")return this.dispatch("TreePanel","node-selected",te);this.currentSelectedId=te.id,F.$emit(this,"selected",this.getSelectedNodes(),te)}),["node-expanded","node-collapsed"].forEach(te=>{F.$on(this,te,re=>{if(q(re),this.level!=="0")return this.dispatch("TreePanel",te,re);F.$emit(this,te==="node-expanded"?"expanded":"collapsed",re)})}),F.$on(this,"cancel-selected",te=>{this.broadcast("TreePanel","cancel-selected",te),this!==te.origin&&this.cancelSelectState()}),F.$on(this,"set-node-expanded",(te,re)=>{this.setExpandByNodeId(te,re)}),F.$on(this,"set-node-checked",te=>{this.setCheckedByNodeId(te)})},mounted(){this.preHandleData(),this.$nextTick(()=>{this.updateDragTargets()})},[M.componentHooks.beforeUnmount](){["node-clicked","node-selected","node-expanded","node-collapsed","cancel-selected"].forEach(q=>F.$off(this,q))},methods:{hasArrowIcon(q){return!this.isModule},getArrowIconCls(q){let te=!1;return this.asyncExpandFunc?te=q.expandable===!1:te=q.isLeaf||!q[this.paramsInfo.children]||q[this.paramsInfo.children].length===0,{hided:te}},getInnerDragZone(){return this.dragZone=this.dragZone??new this.$DragZone(this.$el,this.mergedDragProps,this.payload)},getSlots(){return B.getSlots(this)},getRootTree(){if(this.isRoot)return this.rootTreePanel=this;if(this.rootTreePanel)return this.rootTreePanel;let q=this.$parent;for(;q;){if(q.$options.name==="TreePanel")return this.rootTreePanel=q.getRootTree();q=q.$parent}},hasIndicator(q,te){return te==="top"?q._draggingTo===T.TOP&&q._showIndicator:q._draggingTo===T.BOTTOM&&q._showIndicator},getDragInfo(q){const te=q.clientX,re=q.clientY,ie=document.elementFromPoint(te,re),ne=f.findParentBySelector(ie,`li.${this.prefixCls}-node`);if(!ne)return!1;const le=ne.getBoundingClientRect(),fe=this.nodesMap[ne.getAttribute("node-id")],we=[te-le.x,re-le.y];let pe;return this.draggable==="append-only"?pe=h.INNER:we[1]>le.height-C?pe=h.BOTTOM:we[1]<I?pe=h.TOP:pe=h.INNER,{type:pe,el:ne,node:fe}},onDrag(q,te){if(!this.isRoot)return this.getRootTree()?.onDrag(q,te);this.currentDragging=!0;const re=this.nodesMap[te.el.getAttribute("node-id")];re&&(re._dragging=!0)},onValidDrop(q,te,re){if(!this.isRoot)return this.getRootTree()?.onValidDrop(q,te,re);const ie=this.nodesMap[re.el.getAttribute("node-id")],ne=this.getDragInfo(q);if(!this.isValidDrag(ne,ie))return;const le=h.TOP?"top":h.BOTTOM?"bottom":h.INNER;if(this.validateDrop({type:le,draggingNode:ie,landedNode:ne.node})===!1)return;const fe=ie._parentNode?ie._parentNode[this.paramsInfo.children]:this.currentData,we=ne.node._parentNode?ne.node._parentNode[this.paramsInfo.children]:this.currentData,pe=fe.findIndex(ve=>ve[this.paramsInfo.id]===ie[this.paramsInfo.id]);if(fe.splice(pe,1),ie._parentNode&&(ie._parentNode.isLeaf=ie._parentNode.length<=0),ne.type===h.INNER)ne.node[this.paramsInfo.children]=ne.node[this.paramsInfo.children]||[],ne.node[this.paramsInfo.children].push(ie),(ne.node.isLeaf||!ne.node.children||ne.node.children.length<=0)&&k.set(ne.node,"expanded",!0),ne.node.isLeaf=ne.node[this.paramsInfo.children].length<=0;else if(ne.type===h.TOP){const ve=we.findIndex(be=>be[this.paramsInfo.id]===ne.node[this.paramsInfo.id]);we.splice(ve,0,ie)}else if(ne.type===h.BOTTOM){const ve=we.findIndex(be=>be[this.paramsInfo.id]===ne.node[this.paramsInfo.id]);we.splice(ve+1,0,ie)}F.$emit(this,"update:data",this.currentData),F.$emit(this,"drop",{draggingNode:ie,type:le,landedNode:ne.node})},onDrop(q,te,re){if(!this.isRoot)return this.getRootTree()?.onDrop(q,te,re);this.currentDragging=!1;const ie=this.nodesMap[re.el.getAttribute("node-id")];ie&&(ie._dragging=!1),this._autoExpandTimer&&window.clearTimeout(this._autoExpandTimer),this._showIndicatorTimer&&window.clearTimeout(this._showIndicatorTimer),this._prevLandedNode&&(this._prevLandedNode._draggingTo=T.NONE)},isValidDrag(q,te){return!(!q||D(q.node,te)||q.type===h.INNER&&(q.node.canAppend===!1||q.node===te)||q.node[this.paramsInfo.id]===te[this.paramsInfo.id])},onDragOver(q,te,re){if(!this.isRoot)return this.getRootTree()?.onDragOver(q,te,re);const ie=this.nodesMap[re.el.getAttribute("node-id")],ne=this.getDragInfo(q),le=h.TOP?"top":h.BOTTOM?"bottom":h.INNER;if(!ne||this._prevLandedType===ne.type&&this._prevLandedNode[this.paramsInfo.id]===ne.node[this.paramsInfo.id])return this._prevLandedStatus;if(this._autoExpandTimer&&window.clearTimeout(this._autoExpandTimer),this._showIndicatorTimer&&window.clearTimeout(this._showIndicatorTimer),this._prevLandedNode&&(this._prevLandedNode._draggingTo=T.NONE),this._prevLandedType=ne.type,this._prevLandedNode=ne.node,this.validateDrag({type:le,draggingNode:ie,landedNode:ne.node})===!1)return this._prevLandedStatus=re.getInvalidStatusCls(),re.getInvalidStatusCls();if(!this.isValidDrag(ne,ie))return this._prevLandedStatus=re.getInvalidStatusCls(),re.getInvalidStatusCls();this._prevLandedStatus=re.getValidStatusCls(),ne.type===h.INNER?(ne.node._draggingTo=T.INNER,this._autoExpandTimer=window.setTimeout(()=>{ne.node.expanded=!0},c)):ne.type===h.TOP?(ne.node._draggingTo=T.TOP,ne.node._showIndicator=!1,this._showIndicatorTimer=window.setTimeout(()=>{ne.node._showIndicator=!0},m)):ne.type===h.BOTTOM&&(ne.node._draggingTo=T.BOTTOM,ne.node._showIndicator=!1,this._showIndicatorTimer=window.setTimeout(()=>{ne.node._showIndicator=!0},m))},getDragProps(q){return v.merge({getTargetContent:this.getDragGhost(q),onDragOver:this.onDragOver,ghostCls:"v-tree-panel-dd"},this.getDraggingProps(q))},getDragGhost(q){return()=>{let te=`<div class="${this.prefixCls}"><div class="${this.prefixCls}-node-content-wrapper">`;return te+=this.$refs[`${this.getItemKey(q)}-icon`]?.[0]?.$el.outerHTML??"",this.$refs[`${this.getItemKey(q)}-text`]&&(te+=this.$refs[`${this.getItemKey(q)}-text`][0].outerHTML),te+="</div></div>",te}},async updateDragTargets(){await this.$nextTick();const q=this.getRootTree();if(!(!this.$refs.dragTargets||!q))for(const te of this.$refs.dragTargets)q.getScrollRoot()&&te.setAutoScrollElement(q.getScrollRoot())},getScrollRoot(){return this.$refs["ps-root"]?.getScrollEl()},getDragZoneRef(){return this.$refs.dragZone},useHtml(q){return q?.useHtml??!1},getTip(q){return y.isObject(q.tip)?q.tip:{content:q.tip||q[this.paramsInfo.title],overflowOnly:!0}},getItemKey(q){return q[this.paramsInfo.id]},getSynoId(q){let te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",re=q[this.paramsInfo.id]||q[this.paramsInfo.title];return re=re.replace(/\s/g,"").toLowerCase(),te?`${this.synoId}-${te}-${re}`:`${this.synoId}-${re}`},getNodeCls(q){return[`${this.prefixCls}-node`,{[q[this.paramsInfo.customClass]]:!!q[this.paramsInfo.customClass]}]},hasIcon(q){return q.icon||q.iconCls},iconProps(q){if(y.isObject(q.icon))return q.icon;if(y.isString(q.icon))return{name:q.icon}},selectHandleCls(q){q[this.paramsInfo.id]||console.warn(`${this.paramsInfo.id} property of item is required`);let re=[`${this.prefixCls}-node-wrapper`,{[`${this.prefixCls}-dragging-inner`]:q._draggingTo===T.INNER,[`${this.prefixCls}-dragging`]:q._dragging,[`${this.prefixCls}-node-selected`]:this.currentSelectedId===q[this.paramsInfo.id],[`${this.prefixCls}-disabled`]:q.disabled}];return q.cls&&re.push(q.cls),re},preHandleData(){for(let[q,te]of this.currentData.entries())k.set(te,"level",`${this.level}-${q}`),k.set(te,"_draggingTo",T.NONE),k.set(te,"_showIndicator",!1),k.set(te,"_dragging",!1),k.set(te,"_loading",!1),Object.defineProperty(te,"_parentNode",{value:this.parent,enumerable:!1,configurable:!0}),this.asyncExpandFunc?k.set(te,"isLeaf",!1):(k.set(te,"isLeaf",!0),te[this.paramsInfo.children]&&te[this.paramsInfo.children].length>0&&k.set(te,"isLeaf",!1));this.prepareCheckboxData()},hasChildren(q){return y.isArray(q[this.paramsInfo.children])&&q[this.paramsInfo.children].length>0},async fetchChild(q){let te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!(this.hasChildren(q)&&te===!1)&&this.asyncExpandFunc){k.set(q,"_loading",!0);const re=await this.asyncExpandFunc(q);k.set(q,this.paramsInfo.children,re),k.set(q,"_loading",!1),await this.$nextTick()}},getChildTree(q){const te=this.getNodePath(this.currentData,q);if(!te.length)return!1;let re=this;for(const ie of te.slice(0,-1)){const ne=ie.index;re=re.$refs[`childBranch-${ne}`]&&re.$refs[`childBranch-${ne}`][0]}return re},getNodeEl(q){const te=this.getNodePath(this.currentData,q);if(!te.length)return!1;let re=this;for(const[ie,ne]of te.entries())ie===te.length-1?re=re.$refs.node[ne.index]:re=re.$refs[`childBranch-${ne.index}`]&&re.$refs[`childBranch-${ne.index}`][0];return re},async fetchChildByPath(q){let te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.fetchChild(this.currentData[q],te)},async setExpand(q,te){let re=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,ie=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(this.currentData[q].expandable===!1)return;const ne=this.currentData[q].expanded;this.expandedIndex=q,this.bubbleEvent(te?"node-expanded":"node-collapsed",{origin:this,id:this.currentData[q][this.paramsInfo.id],path:[this.currentData[q]]}),te===!0?(await this.fetchChild(this.currentData[q],re),ne!==!0&&(await this.$nextTick(),k.set(this.currentData[this.expandedIndex],"expanded",!0))):ne!==!1&&(await this.$nextTick(),k.set(this.currentData[this.expandedIndex],"expanded",!1)),ie&&await new Promise(le=>{f.once(this.$refs[`slideUpDown-${q}`]?.[0]?.$el,"transitionend",le)})},toggleExpand(q){if(this.currentData[q].expandable===!1)return;const te=!this.currentData[q].expanded;return this.setExpand(q,te)},bubbleEvent(q,te){this.isRoot?F.$emit(this,q,te):this.dispatch("TreePanel",q,te)},async setSelect(q){if(this.bubbleEvent("node-clicked",{origin:this,id:this.currentData[q][this.paramsInfo.id],path:[this.currentData[q]]}),this.currentData[q][this.paramsInfo.id]===this.currentSelectedId||!O(this.currentData[q]))return;this.bubbleEvent("node-selected",{origin:this,status:!0,id:this.currentData[q][this.paramsInfo.id],path:[this.currentData[q]]}),this.expandOnSelect&&await this.toggleExpand(q)},getNodes(q,te){q=q||this.currentData;let re=[];for(const ie of q){let ne=!0;for(const[le,fe]of Object.entries(te))if(ie[le]!==fe){ne=!1;break}ne&&re.push(ie),ie[this.paramsInfo.children]&&ie[this.paramsInfo.children].length&&(re=re.concat(this.getNodes(ie[this.paramsInfo.children],te)))}return re},getSelectedNodes(q){q=q||this.currentData;for(const te of q){if(te[this.paramsInfo.id]===this.currentSelectedId)return[Object.assign({},te)];if(te[this.paramsInfo.children]){const re=this.getSelectedNodes(te[this.paramsInfo.children]);if(re.length>0)return re}}return[]},getNodePath(q,te){q=q||this.currentData;let re=[],ie=[];for(let ne=0;ne<q.length;ne++){let le=q[ne];if(le[this.paramsInfo.children]&&le[this.paramsInfo.children].length&&(ie=this.getNodePath(le[this.paramsInfo.children],te)),ie.length>0||le[this.paramsInfo.id]===te){re=ie,re.unshift({node:le,index:ne});break}}return re},async updateNode(q,te){let re=this.getNodePath(this.currentData,q);if(!re.length)return!1;let ie=this;for(let[ne,le]of re.entries()){const fe=le.index;if(ne===re.length-1){await ie.fetchChildByPath(le.index,te);return}else ie.data[le.index].expanded||await ie.setExpand(le.index,!0,!0);ie=ie.$refs[`childBranch-${fe}`][0]}},async expandNode(q){let te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,re=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,ie=this.getNodePath(this.currentData,q);if(!ie.length)return!1;let ne=this;for(let[le,fe]of ie.entries()){const we=fe.index;le===ie.length-1?await ne.setExpand(fe.index,!0,re):ne.data[fe.index].expanded||await ne.setExpand(fe.index,!0,te),ne=ne.$refs[`childBranch-${we}`][0]}},async selectNode(q){let te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,re=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,ie=this.getNodePath(this.currentData,q),ne;if(!ie.length)return!1;let le=this,fe=[],we;for(let[pe,ve]of ie.entries()){if(!le)break;we=ve.index,pe===ie.length-1?(await le.setSelect(ve.index),ne=le.$refs.node?.[ve.index]):le.data[ve.index].expanded||await le.setExpand(ve.index,!0,te,re),le=le.$refs[`childBranch-${we}`]?.[0]}return re&&(await Promise.all(fe),window.setTimeout(()=>{this.scrollToNode(ne)},0)),ne},scrollToNode(q){let te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;f.scrollTo(q,{scrollMode:"if-needed",behavior:te?"smooth":"auto"})},setExpandByNodeId(q){let te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const re=this.currentData.findIndex(ie=>ie[this.paramsInfo.id]===q);re>-1?this.setExpand(re,te):this.broadcast("TreePanel","set-node-expanded",[q,te])},selectPrevNode(){let q=this.displayedNodes.findIndex(te=>te[this.paramsInfo.id]===this.currentSelectedId);for(;--q>=0&&!O(this.displayedNodes[q]););this.selectNodeByIndex(q)},selectNextNode(){let q=this.displayedNodes.findIndex(te=>te[this.paramsInfo.id]===this.currentSelectedId);for(;++q<this.displayedNodes.length&&!O(this.displayedNodes[q]););this.selectNodeByIndex(q)},selectNodeByIndex(){let q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;if(q<0||this.displayedNodes.length<=q)return;const te=this.displayedNodes[q];this.currentSelectedId=te[this.paramsInfo.id],F.$emit(this,"selected",this.getSelectedNodes());const re=this.getNodeEl(te[this.paramsInfo.id]);this.expandOnSelect&&this.setExpandByNodeId(this.currentSelectedId,!0),this.$refs["ps-root"]?.ensureVisible(re)},selectNodeByKeyup(q){this.isRoot&&(q.key==="ArrowUp"&&this.selectPrevNode(),q.key==="ArrowDown"&&this.selectNextNode())},expandNodeByKeyup(q){this.isRoot&&q.key==="ArrowRight"&&this.setExpandByNodeId(this.currentSelectedId,!0)},collapseNodeByKeyup(q){this.isRoot&&q.key==="ArrowLeft"&&this.setExpandByNodeId(this.currentSelectedId,!1)}}}),z=["role","tabindex","aria-activedescendant"],H={key:0,class:"top-indicator dragging-indicator"},$=["onClick","onDblclick","node-id"],V=["id","innerHTML"],P=["id"],U={key:2,class:"suffix-slot"},Y={key:3,class:"action-slot"},Z={key:1,class:"bottom-indicator dragging-indicator"};function X(q,te,re,ie,ne,le){const fe=l.resolveComponent("v-spin-icon"),we=l.resolveComponent("v-icon"),pe=l.resolveComponent("v-checkbox"),ve=l.resolveComponent("with-drag-target"),be=l.resolveComponent("tree-panel",!0),Ee=l.resolveComponent("v-slide-up-down-transition"),Re=l.resolveComponent("with-scrollbar"),Ne=l.resolveDirective("tooltip"),Le=l.resolveDirective("syno-id");return l.openBlock(),l.createBlock(Re,{wrap:q.showScrollbar,ref:"scroll-root",class:l.normalizeClass(q.scrollbarCls)},{default:l.withCtx(()=>[l.withDirectives((l.openBlock(),l.createElementBlock("ul",{class:l.normalizeClass(q.treeCls),role:q.indentLevel===0?"tree":"group",tabindex:q.indentLevel===0?"0":"","aria-activedescendant":q.indentLevel===0?q.currentSelectedId:"",onKeydown:[te[3]||(te[3]=l.withKeys(l.withModifiers(function(){return q.selectNodeByKeyup&&q.selectNodeByKeyup(...arguments)},["prevent"]),["up"])),te[4]||(te[4]=l.withKeys(l.withModifiers(function(){return q.selectNodeByKeyup&&q.selectNodeByKeyup(...arguments)},["prevent"]),["down"])),te[5]||(te[5]=l.withKeys(l.withModifiers(function(){return q.expandNodeByKeyup&&q.expandNodeByKeyup(...arguments)},["prevent"]),["right"])),te[6]||(te[6]=l.withKeys(l.withModifiers(function(){return q.collapseNodeByKeyup&&q.collapseNodeByKeyup(...arguments)},["prevent"]),["left"])),te[7]||(te[7]=l.withKeys(l.withModifiers(function(){return q.checkNodeByKeyup&&q.checkNodeByKeyup(...arguments)},["prevent"]),["space"]))]},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(q.currentData,(Se,Ie)=>(l.openBlock(),l.createBlock(l.resolveDynamicComponent(q.getListItemTag()),{key:q.getItemKey(Se),id:Se[q.paramsInfo.id],"syno-id":q.getSynoId(Se),class:l.normalizeClass(q.getNodeCls(Se)),role:"treeitem","node-id":Se[q.paramsInfo.id],"aria-expanded":Se.expanded?"true":"false",item:Se,index:Ie},{default:l.withCtx(()=>[q.hasIndicator(Se,"top")?(l.openBlock(),l.createElementBlock("div",H)):l.createCommentVNode("",!0),l.createVNode(ve,{wrap:!!q.draggable,ref_for:!0,ref:"dragTargets","drag-props":q.getDragProps(Se),"get-drag-zone":q.isRoot?q.getInnerDragZone:q.getDragZone,"auto-scroll-element":"",onDrag:q.onDrag,onDrop:q.onDrop,onValidDrop:q.onValidDrop},{default:l.withCtx(()=>[l.createElementVNode("div",{class:l.normalizeClass(q.selectHandleCls(Se)),onClick:l.withModifiers(_e=>q.setSelect(Ie),["prevent"]),onDblclick:l.withModifiers(_e=>q.toggleExpand(Ie),["prevent"]),"node-id":Se[q.paramsInfo.id],ref_for:!0,ref:"node"},[l.renderSlot(q.$slots,`tree-node-${Se.slot}`,{item:Se},()=>[l.createElementVNode("span",{class:l.normalizeClass(q.indentClass),style:l.normalizeStyle(q.indentStyle)},null,6),Se._loading?(l.openBlock(),l.createBlock(fe,{key:0,class:l.normalizeClass(`${q.prefixCls}-spin-icon`)},null,8,["class"])):q.hasArrowIcon(Se)?(l.openBlock(),l.createBlock(we,{key:1,"syno-id":q.getSynoId(Se,"arrow"),name:Se.expanded?"tree-panel-arrow-down":"tree-panel-arrow-right",class:l.normalizeClass(["tree-panel-arrow v-tree-panel-arrow",q.getArrowIconCls(Se)]),"svg-icon-set":"set01",onClick:l.withModifiers(_e=>q.toggleExpand(Ie),["prevent","stop"]),onDblclick:te[0]||(te[0]=l.withModifiers(()=>{},["prevent","stop"]))},null,8,["syno-id","name","class","onClick"])):l.createCommentVNode("",!0),q.checkbox?(l.openBlock(),l.createBlock(pe,{key:2,"syno-id":q.getSynoId(Se,"checkbox"),id:Se.id,value:Se.checked,"model-value":Se.checked,indeterminate:Se._indeterminate,disabled:Se.disabled,onInput:_e=>q.checkByClick(Se,_e),"onUpdate:modelValue":_e=>q.checkByClick(Se,_e),onClick:te[1]||(te[1]=l.withModifiers(()=>{},["stop"])),onDblclick:te[2]||(te[2]=l.withModifiers(()=>{},["stop"]))},null,8,["syno-id","id","value","model-value","indeterminate","disabled","onInput","onUpdate:modelValue"])):l.createCommentVNode("",!0),q.hasIcon(Se)?(l.openBlock(),l.createBlock(we,l.mergeProps({key:3,ref_for:!0,ref:`${q.getItemKey(Se)}-icon`},q.iconProps(Se),{class:"v-tree-panel-icon"}),null,16)):l.createCommentVNode("",!0),l.createElementVNode("span",{class:l.normalizeClass(q.prefixCls+"-node-content-wrapper")},[q.useHtml(Se)?l.withDirectives((l.openBlock(),l.createElementBlock("span",{key:0,ref_for:!0,ref:`${q.getItemKey(Se)}-text`,id:`${Se.id}-text`,class:l.normalizeClass(q.prefixCls+"-title"),innerHTML:Se[q.paramsInfo.title]},null,10,V)),[[Ne,q.getTip(Se)]]):l.withDirectives((l.openBlock(),l.createElementBlock("span",{key:1,ref_for:!0,ref:`${q.getItemKey(Se)}-text`,id:`${Se.id}-text`,class:l.normalizeClass(q.prefixCls+"-title")},[l.createTextVNode(l.toDisplayString(Se[q.paramsInfo.title]),1)],10,P)),[[Ne,q.getTip(Se)]]),Se.suffixSlot?(l.openBlock(),l.createElementBlock("span",U,[l.renderSlot(q.$slots,`tree-node-${Se.suffixSlot}`,{item:Se})])):l.createCommentVNode("",!0),Se.actionSlot?(l.openBlock(),l.createElementBlock("span",Y,[l.renderSlot(q.$slots,`tree-node-${Se.actionSlot}`,{item:Se})])):l.createCommentVNode("",!0)],2)])],42,$)]),_:2},1032,["wrap","drag-props","get-drag-zone","onDrag","onDrop","onValidDrop"]),q.hasIndicator(Se,"bottom")?(l.openBlock(),l.createElementBlock("div",Z)):l.createCommentVNode("",!0),l.createVNode(Re,{wrap:Se.showScrollbar===!0,ref_for:!0,ref:`ps-${q.getItemKey(Se)}`},{default:l.withCtx(()=>[l.createVNode(Ee,{ref_for:!0,ref:`slideUpDown-${Ie}`,"syno-id":`${q.getSynoId(Se,"slide-up-down")}`},{default:l.withCtx(()=>[Se.isLeaf?l.createCommentVNode("",!0):l.withDirectives((l.openBlock(),l.createBlock(be,{key:0,"syno-id":`${q.synoId}-${Se[q.paramsInfo.id]}-subtree`,ref_for:!0,ref:`childBranch-${Ie}`,"get-drag-zone":q.isRoot?q.getInnerDragZone:q.getDragZone,draggable:q.draggable,"prefix-cls":q.prefixCls,data:Se[q.paramsInfo.children]||[],parent:Se,level:`${q.level}-${Ie}`,"async-expand-func":q.asyncExpandFunc,"indent-level":q.indentLevel+1,"params-info":q.paramsInfo,"expand-on-select":q.expandOnSelect,"selected-id":q.currentSelectedId,"show-scrollbar":!1,checkbox:q.checkbox,"validate-drop":q.validateDrop,"validate-drag":q.validateDrag,dragging:q.currentDragging,"get-dragging-props":q.getDraggingProps,onInternalChecked:q.emitCheckedState},l.createSlots({_:2},[l.renderList(q.getSlots(),(_e,Ae)=>({name:Ae,fn:l.withCtx(ue=>[l.renderSlot(q.$slots,Ae,l.normalizeProps(l.guardReactiveProps(ue)))])}))]),1032,["syno-id","get-drag-zone","draggable","prefix-cls","data","parent","level","async-expand-func","indent-level","params-info","expand-on-select","selected-id","checkbox","validate-drop","validate-drag","dragging","get-dragging-props","onInternalChecked"])),[[l.vShow,Se.expanded]])]),_:2},1032,["syno-id"])]),_:2},1032,["wrap"]),l.renderSlot(q.$slots,"extranode",{data:Se})]),_:2},1032,["id","syno-id","class","node-id","aria-expanded","item","index"]))),128))],42,z)),[[Le]])]),_:3},8,["wrap","class"])}var J=w.default(N,[["render",X]]);x.default=J}(BB)),BB}var FB={},EK;function jee(){return EK||(EK=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Kt(),k=ht(),F=St();const B=k.defineComponent({name:"Header",props:{text:{type:String,default:""},level:{type:[Number,String],validator(A){return A=+A,[1,2,3,4,5,6].includes(A)},default:1},baseUrl:{type:String,default:""},href:{type:String,default:""}},computed:{slugifyText(){return M.slugify(this.text)},headerCls(){return[`level-${this.level}`]},innerHref(){return this.href?this.href:(this.baseUrl??"")+"#"+this.slugifyText}},mounted(){}});function G(A,u,o,S,_,p){const f=k.resolveComponent("v-a");return k.openBlock(),k.createBlock(k.resolveDynamicComponent(`h${A.level}`),{id:A.slugifyText,class:k.normalizeClass(["v-header",A.headerCls])},{default:k.withCtx(()=>[A.text||A.href?(k.openBlock(),k.createBlock(f,{key:0,class:"anchor",href:A.innerHref},{default:k.withCtx(()=>[k.createTextVNode(" # ")]),_:1},8,["href"])):k.createCommentVNode("",!0),k.renderSlot(A.$slots,"default",{},()=>[k.createTextVNode(k.toDisplayString(A.text),1)])]),_:3},8,["id","class"])}var E=F.default(B,[["render",G]]);x.default=E}(FB)),FB}var VB={},AK;function qee(){return AK||(AK=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=ht(),k=St();const F=M.defineComponent({name:"Hr",props:{}}),B={class:"v-hr"};function G(A,u,o,S,_,p){return M.openBlock(),M.createElementBlock("hr",B)}var E=k.default(F,[["render",G]]);x.default=E}(VB)),VB}var HB={},MK;function Yee(){return MK||(MK=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=ht(),k=St();const F=M.defineComponent({name:"P",props:{}}),B={class:"v-p"};function G(A,u,o,S,_,p){return M.openBlock(),M.createElementBlock("p",B,[M.renderSlot(A.$slots,"default")])}var E=k.default(F,[["render",G]]);x.default=E}(HB)),HB}var $B={},DK;function Kee(){return DK||(DK=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=ht(),k=St();const F=M.defineComponent({name:"A",props:{}}),B={class:"v-a"};function G(A,u,o,S,_,p){return M.openBlock(),M.createElementBlock("a",B,[M.renderSlot(A.$slots,"default")])}var E=k.default(F,[["render",G]]);x.default=E}($B)),$B}var zB={},OK;function Xee(){return OK||(OK=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=ht(),k=St();const F=M.defineComponent({name:"Blockquote",props:{}}),B={class:"v-blockquote"};function G(A,u,o,S,_,p){return M.openBlock(),M.createElementBlock("blockquote",B,[M.renderSlot(A.$slots,"default")])}var E=k.default(F,[["render",G]]);x.default=E}(zB)),zB}var WB={},NK;function Jee(){return NK||(NK=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=ht(),k=St();const F=M.defineComponent({name:"TypoText",props:{code:{type:Boolean,default:!1},strong:{type:Boolean,default:!1}},computed:{tag(){return this.code?"code":"span"},cls(){return{"v-text--strong":this.strong,"v-text--code":this.code}}}});function B(E,A,u,o,S,_){return M.openBlock(),M.createBlock(M.resolveDynamicComponent(E.tag),{class:M.normalizeClass(E.cls)},{default:M.withCtx(()=>[M.renderSlot(E.$slots,"default")]),_:3},8,["class"])}var G=k.default(F,[["render",B]]);x.default=G}(WB)),WB}var UB={},PK;function Zee(){return PK||(PK=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=ht(),k=St();const F=M.defineComponent({name:"Code",props:{}}),B={class:"v-code"};function G(A,u,o,S,_,p){return M.openBlock(),M.createElementBlock("div",B,[M.renderSlot(A.$slots,"default")])}var E=k.default(F,[["render",G]]);x.default=E}(UB)),UB}var GB={},BK;function Qee(){return BK||(BK=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=ht(),k=St();const F=M.defineComponent({name:"List",props:{},computed:{cls(){return"v-list"}}});function B(E,A,u,o,S,_){return M.openBlock(),M.createElementBlock("ul",{class:M.normalizeClass(E.cls)},[M.renderSlot(E.$slots,"default")],2)}var G=k.default(F,[["render",B]]);x.default=G}(GB)),GB}var jB={},LK;function ete(){return LK||(LK=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=ht(),k=St();const F=M.defineComponent({name:"Li"}),B={class:"v-li"},G=M.createElementVNode("i",{class:"bullet-dot"},null,-1);function E(u,o,S,_,p,f){return M.openBlock(),M.createElementBlock("li",B,[G,M.renderSlot(u.$slots,"default")])}var A=k.default(F,[["render",E]]);x.default=A}(jB)),jB}var qB={},FK;function tte(){return FK||(FK=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=ht(),k=St();const F=M.defineComponent({name:"Table",props:{}}),B={class:"v-typo-table"};function G(A,u,o,S,_,p){const f=M.resolveComponent("v-scrollbar");return M.openBlock(),M.createBlock(f,null,{default:M.withCtx(()=>[M.createElementVNode("table",B,[M.renderSlot(A.$slots,"default")])]),_:3})}var E=k.default(F,[["render",G]]);x.default=E}(qB)),qB}var YB={},VK;function nte(){return VK||(VK=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=ht(),k=St();const F=M.defineComponent({name:"TypoTip",props:{type:{type:String,default:"info",validate(u){return["info","warn","error"].includes(u)}}},computed:{title(){return this.type==="info"?"Info":this.type==="warn"?"Warning":"Error"}}}),B={class:"tip-title"},G={class:"tip-content"};function E(u,o,S,_,p,f){return M.openBlock(),M.createElementBlock("div",{class:M.normalizeClass(["v-typo-tip",u.type])},[M.createElementVNode("p",B,M.toDisplayString(u.title),1),M.createElementVNode("p",G,[M.renderSlot(u.$slots,"default")])],2)}var A=k.default(F,[["render",E]]);x.default=A}(YB)),YB}var KB={},HK;function rte(){return HK||(HK=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Xn(),k=nv(),F=Bg(),B=x5(),G=uT(),E=La(),A=gf(),u=C5(),o=_5(),S=Kt(),_=ci(),p=Dr(),f=_i(),y=Pg(),d=Ur(),v=Mb(),b=Ng(),s=ff(),l=ht(),w=St();const I=[0,16],C={ROW:"row"},h={FIT:!1,CENTER:"sm"};function c(V,P,U){if(!S.isFunction(V)){SYNO.Debug.error("Callback should be callable");return}let Y=V.apply(U,[]);(!Y||!Y.then||!S.isFunction(Y.then))&&(Y=Promise.resolve()),Y.then((function(Z){S.isFunction(P)&&P.apply(U,[])}).bind(U)).catch((function(Z){}).bind(U))}const m=l.defineComponent({name:"MessageBoxWindow",components:{vProgressBar:B.default,vTrapFocus:F.default,vPanel:G.default,vButton:E.default,vInput:A.default,vForm:u.default,vFormItem:o.default},extends:k.default,mixins:[_.default,b.useConfigConsumer("messageBoxWindow")],props:{densePadding:{type:Object,default:()=>({sm:40,xxs:20})},footerDirection:{type:[Object,String,Boolean],default:!1},mobileBreakpoint:{type:[String,Boolean,Object],default:()=>({fit:h.FIT,center:h.CENTER})},loadingType:{type:String,default:"statusbar"},width:{type:[String,Number],default:480},minWidth:{type:[String,Number],default:420},height:{type:[String,Number],default:"auto"},doConfirm:{type:Function,default:void 0},doCancel:{type:Function,default:void 0},doLeftCustom:{type:Function,default:void 0},resizable:{type:Boolean,default:!1},buttons:{type:Object,default:()=>({})}},data(){return{showStatusBar:!1,loading:!1,errorText:void 0,inputPassword:"",statusBarState:"loading",dialogTitle:"",dialogContent:"",prompt:void 0,callbackFn:S.noop,callbackScope:this,iconCls:void 0,isHtmlContent:!1,innerButtons:f.merge({leftCustom:{type:"footbar",text:void 0,suffix:"cancel"},cancel:{type:"footbar",text:this._i18n("common","cancel"),suffix:"cancel"},confirm:{type:"footbar",text:this._i18n("common","apply"),suffix:"main"}},this.buttons),messageType:"normal",currentProgress:{percent:void 0,percentText:void 0,info:void 0,title:void 0},resolveFunc:void 0,rejectFunc:void 0,useHtml:void 0,opts:{}}},computed:{innerConfigConsumer(){return this.configConsumer},innerDensePadding(){return this.getConfigValue("densePadding")},innerFooterDirection(){return this.footerDirection===!1?C.ROW:S.isString(this.footerDirection)?this.footerDirection:this.$breakpointManager?this.$breakpointManager.getSuitableValue(this.footerDirection):(d.remind("please import and use BreakpointManagerPlugin when you are in tree-shaking mode or breakpoint will not active."),C.ROW)},footerCls(){return this.innerFooterDirection},isPasswordType(){return this.messageType==="password"},isProgressType(){return this.messageType==="progress"},windowCls(){return[this.prefixCls,this.customCls,"v-message-box-window",{"active-win":this.active,"deactive-win":!this.active,"no-shadow":this.noShadow,"is-safari":y.isSafari,"auto-height":this.autoHeight}]},hasIcon(){return!!this.iconCls},dialogIconWrapperCls(){return["dialog-icon-wrapper",this.iconCls?this.iconCls:""]},dialogIconCls(){return["dialog-icon",this.iconCls?this.iconCls:""]},panelCls(){return["message-box",this.messageType==="password"?"is-password":""]},panelBodyCls(){return["message-box-body",this.iconCls?"has-icon":"",this.dialogTitle?"has-title":"",this.messageType==="password"?"is-password":""]},progressWrapperCls(){return["progress-wrapper"]},progressPercentClass(){return{"progress-bar-inner":!0,"progress-bar-inner--full":parseInt(this.currentProgress.percent,10)>=100}},progressPercentStyle(){return{width:`${this.currentProgress.percent}%`}}},watch:{buttons:{handler(V){this.innerButtons=f.merge(this.innerButtons,this.buttons)},deep:!0}},[M.componentHooks.beforeUnmount](){this.maskEl&&(this.maskEl.parentNode.removeChild(this.maskEl),this.maskEl=null)},methods:{async doBreakpointFit(V){const P=S.isObject(this.innerDensePadding)?this.$breakpointManager.getSuitableValue(this.innerDensePadding):this.innerDensePadding;await this.fitContainer({padding:[P,0],fit:"width",pos:"center"})},async doClose(){const V=this.owner;V&&(V.messageBox=null),this.hideFromOwner()&&(this.owner=null),await k.default.methods.doClose.apply(this,arguments)},async onLeftCustomButton(){if(this.doLeftCustom){const V=await this.doLeftCustom();if(V===!1)return;if(S.isDefined(V))return this.resolveFunc(V)}this.resolveFunc("leftCustom")},async onEsc(V){return this.closeByEscKey?(V.stopPropagation(),V.preventDefault(),this.onCancelButton()):!1},async onCancelButton(){if(this.doCancel){const V=await this.doCancel();if(V===!1)return;if(S.isDefined(V))return this.resolveFunc(V)}await this.onClose(),this.resolveFunc("cancel")},async onConfirmButton(){if(this.doConfirm){const V=await this.doConfirm();if(V===!1)return;if(S.isDefined(V))return this.resolveFunc(V)}if(this.messageType==="password")return this.onPasswordConfirm();await this.onClose(),this.resolveFunc("confirm")},onArrowKeydown(V){if(!V)return;const P=[this.$refs.leftCustomBtn,this.$refs.cancelBtn,this.$refs.confirmBtn].filter(J=>J).filter(J=>J.$el);if(P.length===0)return;const U=V.key==="ArrowLeft"?-1:V.key==="ArrowRight"&&1||0,Y=P.findIndex(J=>J.$el===V.target),Z=Math.min(Math.max(0,Y+U),P.length-1);P[Z].$el.focus()},setStatus(){let V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"loading",P=arguments.length>1?arguments[1]:void 0;V==="clear"?this.loading=!1:V==="loading"?(this.loading=!0,this.statusBarState="loading",this.showStatusBar=!0):V==="error"&&(this.loading=!1,this.statusBarState="error",this.showStatusBar=!0,this.errorText=P)},async onPasswordConfirm(){this.setStatus("loading");try{await s.requestWebAPI({api:"SYNO.Core.User.PasswordConfirm",method:"auth",version:"1",encryption:["password"],params:{password:this.inputPassword}}),await this.onClose(),this.resolveFunc("confirm")}catch(V){this.setStatus("error",SYNO.API.Errors.core[V.code])}},showMessage(V){this.opts=V,this.currentTitle=V.title,this.dialogTitle=V.title,this.dialogContent=V.msg,this.iconCls=V.iconCls,this.currentProgress=V.progress,this.messageType=V.type,V.width&&(this.currentWidth=V.width),V.height&&(this.currentHeight=V.height),V.isHtmlContent&&d.deprecate("isHtmlContent","useHtml",this),this.useHtml=V.useHtml||V.isHtmlContent,this.innerButtons=f.merge({leftCustom:{type:"footbar",text:void 0,suffix:"cancel"},cancel:{type:"footbar",text:this._i18n("common","cancel"),suffix:"cancel"},confirm:{type:"footbar",text:this._i18n("common","apply"),suffix:"main"}},this.buttons,V.buttons??{})},actionDefer(){return new Promise((V,P)=>{this.resolveFunc=V,this.rejectFunc=P})},alert(V,P,U){let Y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return U=f.merge({leftCustom:{text:null},cancel:{text:null},confirm:{type:"footbar",text:this._i18n("common","apply"),suffix:"main"}},this.buttons,U??{}),this.showMessage(Object.assign({title:V,msg:P,type:"normal",buttons:U},Y)),this.$nextTick(()=>{this.alignCenterToOwner()}),this.actionDefer()},confirm(V,P,U){let Y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return U=f.merge({leftCustom:{text:null},cancel:{type:"footbar",text:this._i18n("common","cancel")},confirm:{type:"footbar",text:this._i18n("common","apply"),suffix:"main"}},this.buttons,U??{}),this.$nextTick(()=>{this.alignCenterToOwner()}),this.showMessage(Object.assign({title:V,msg:P,type:"normal",buttons:U},Y)),this.actionDefer()},async confirmLostChange(){let V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",U=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};U=f.merge({leftCustom:{text:this._i18n("common","dont_save"),type:"footbar"},cancel:{type:"footbar",text:this._i18n("common","cancel")},confirm:{text:this._i18n("common","save"),suffix:"main",type:"footbar"}},this.buttons,U??{});const Z=await this.confirm(V,P||this._i18n("common","confirm_lostchange_without_save"),U,Y);return Z==="leftCustom"?(await this.onClose(),"dont_save"):Z==="confirm"?"save":Z==="cancel"?"cancel":Z},confirmDelete(V,P,U){let Y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return U=f.merge({leftCustom:{text:null},cancel:{type:"footbar",text:this._i18n("common","cancel")},confirm:{text:this._i18n("common","delete"),suffix:"red",type:"footbar"}},this.buttons,U??{}),this.$nextTick(()=>{this.alignCenterToOwner()}),this.showMessage(Object.assign({title:V,msg:P,type:"normal",buttons:U},Y)),this.actionDefer()},progress(V,P,U,Y,Z){let X=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};return this.updateProgress(V,P,U,Y,Z,X),this.$nextTick(()=>{this.alignCenterToOwner()}),this.actionDefer()},wait(V,P,U){let Y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return U=f.merge({leftCustom:{text:null},cancel:{text:null},confirm:{text:null}},this.buttons,U??{}),this.showMessage(Object.assign({progress:{title:V,info:P,wait:!0},buttons:U,type:"progress"},Y)),this.actionDefer()},updateProgress(V,P,U,Y,Z){let X=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};P=+P,P=Math.min(100,P),P=Math.max(0,P),Y=`${P}%`||Y,Z=f.merge({leftCustom:{text:null},cancel:{type:"footbar",text:this._i18n("common","cancel")},confirm:{text:this._i18n("common","hide"),suffix:"main",type:"footbar"}},this.buttons,Z??{}),this.showMessage(Object.assign({progress:{title:V,percentText:Y,percent:P,info:U},buttons:Z,type:"progress"},X))},password(V,P,U){let Y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return V=V||this._i18n("common","enter_password_to_continue"),P=P||this._i18n("common","enter_user_password"),U=f.merge({leftCustom:{text:null},cancel:{type:"footbar",text:this._i18n("common","cancel")},confirm:{text:this._i18n("common","submit"),suffix:"red",type:"footbar"}},this.buttons,U??{}),this.showMessage(Object.assign({title:V,msg:P,type:"password",buttons:U},Y)),this.$nextTick(()=>{this.alignCenterToOwner()}),this.actionDefer()},setZIndex(V){this.maskEl&&p.css(this.maskEl,"zIndex",`${V-1}`),k.default.methods.setZIndex.apply(this,arguments)},getToastBox(V){let P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};P=f.merge({text:V},P),v.openToast(this.$.appContext.app,this.$el,P,{constrainMode:!1,absoluteMode:!1,anchorEl:this.$el,offset:I,align:"t->t"})},async confirmLostChangePromise(V,P,U,Y,Z){let X,J={};if(S.isFunction(V))X=V;else if(S.isObject(V))J=V;else{SYNO.Debug.error("func should be object(for promise) or function(for callback)");return}let q=J.save,te=J.dontSave,re=J.cancel,ie=J.confirmText;U=U||S.noop,Y=Y||S.noop,Z=Z||S.noop;let ne=await this.confirm("",ie||this._i18n("common","confirm_lostchange_without_save"),{leftCustom:{text:this._i18n("common","dont_save"),type:"footbar"},cancel:{type:"footbar",text:this._i18n("common","cancel")},confirm:{text:this._i18n("common","save"),suffix:"main",type:"footbar"}});ne==="leftCustom"&&this.onClose(),S.isFunction(X)?X.apply(P):(S.isFunction(U)&&U.apply(P,[]),ne==="confirm"?c(q,Y,P):ne==="cancel"?c(re,Z,P):ne==="leftCustom"&&c(te,Y,P))}}}),T=["aria-label"],D={key:0,class:"dialog-title"},O=["innerHTML"],N={key:1,class:"dialog-content"},z={class:"focus-last-alert",tabindex:"0",role:"alert"};function H(V,P,U,Y,Z,X){const J=l.resolveComponent("v-progress-bar"),q=l.resolveComponent("v-input"),te=l.resolveComponent("v-form-item"),re=l.resolveComponent("v-form"),ie=l.resolveComponent("v-button"),ne=l.resolveComponent("v-panel"),le=l.resolveComponent("v-trap-focus"),fe=l.resolveComponent("v-draggable"),we=l.resolveDirective("syno-id");return l.withDirectives((l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(V.windowCls),style:l.normalizeStyle(V.windowStyle),ref:"_window",onMousedown:P[2]||(P[2]=pe=>V.toFront()),onKeydown:[P[3]||(P[3]=l.withKeys(function(){return V.onArrowKeydown&&V.onArrowKeydown(...arguments)},["left"])),P[4]||(P[4]=l.withKeys(function(){return V.onArrowKeydown&&V.onArrowKeydown(...arguments)},["right"])),P[5]||(P[5]=l.withKeys(function(){return V.onEsc&&V.onEsc(...arguments)},["esc"]))]},[l.createVNode(le,{"focus-last":"",ref:"trapFocus",class:"message-box-wrapper"},{"alert-last":l.withCtx(()=>[l.createElementVNode("div",z,l.toDisplayString(V._i18n("desktop","window_last_hint")),1)]),default:l.withCtx(()=>[l.createElementVNode("div",{class:"v-trap-focus-indicator",tabindex:"0",role:"alertdialog","aria-label":V.currentTitle||V.dialogContent},null,8,T),l.createVNode(ne,{class:l.normalizeClass(V.panelCls),"show-status-bar":V.showStatusBar,"onUpdate:showStatusBar":P[1]||(P[1]=pe=>V.showStatusBar=pe),loading:V.loading,"loading-type":V.loadingType,"status-bar-state":V.statusBarState,"error-text":V.errorText,"syno-id":`${V.synoId}-panel`},{body:l.withCtx(()=>[V.isProgressType?(l.openBlock(),l.createBlock(J,{key:0,title:V.currentProgress.title,"percent-text":V.currentProgress.percentText,percent:V.currentProgress.percent,info:V.currentProgress.info,wait:V.currentProgress.wait},null,8,["title","percent-text","percent","info","wait"])):(l.openBlock(),l.createElementBlock("div",{key:1,class:l.normalizeClass(V.panelBodyCls)},[V.hasIcon?(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(V.dialogIconWrapperCls)},[l.createElementVNode("div",{class:l.normalizeClass(V.dialogIconCls)},null,2)],2)):l.createCommentVNode("",!0),l.renderSlot(V.$slots,"title",{title:V.dialogTitle,opts:V.opts},()=>[V.dialogTitle?(l.openBlock(),l.createElementBlock("div",D,[l.renderSlot(V.$slots,"dialog-title",{},()=>[l.createTextVNode(l.toDisplayString(V.dialogTitle),1)])])):l.createCommentVNode("",!0)]),l.renderSlot(V.$slots,"content",{content:V.dialogContent,opts:V.opts},()=>[V.useHtml?(l.openBlock(),l.createElementBlock("div",{key:0,class:"dialog-content",innerHTML:V.dialogContent},null,8,O)):V.dialogContent?(l.openBlock(),l.createElementBlock("div",N,[l.renderSlot(V.$slots,"dialog-content",{},()=>[l.createTextVNode(l.toDisplayString(V.dialogContent),1)])])):l.createCommentVNode("",!0),V.isPasswordType?(l.openBlock(),l.createBlock(re,{key:2,"syno-id":`${V.synoId}-password-form`},{default:l.withCtx(()=>[l.createVNode(te,{class:"password-form-item",label:V._i18n("common","password")+V._i18n("common","pure_colon"),"syno-id":`${V.synoId}-password-form-item`},{default:l.withCtx(()=>[l.createVNode(q,{name:"password",type:"password",modelValue:V.inputPassword,"onUpdate:modelValue":P[0]||(P[0]=pe=>V.inputPassword=pe),"syno-id":`${V.synoId}-password-form-input`},null,8,["modelValue","syno-id"])]),_:1},8,["label","syno-id"])]),_:1},8,["syno-id"])):l.createCommentVNode("",!0)])],2))]),fbar:l.withCtx(()=>[l.renderSlot(V.$slots,"footbar",{buttons:V.innerButtons,opts:V.opts},()=>[V.innerFooterDirection==="row"&&V.innerButtons.leftCustom.text?(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(["default pull-left button-region",V.footerCls])},[l.createVNode(ie,l.mergeProps({ref:"leftCustomBtn","syno-id":`${V.synoId}-fbar-cancel`},V.innerButtons.leftCustom,{onClick:V.onLeftCustomButton}),{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(V.innerButtons.leftCustom.text),1)]),_:1},16,["syno-id","onClick"])],2)):l.createCommentVNode("",!0),l.createElementVNode("div",{class:l.normalizeClass(["default pull-right button-region",V.footerCls])},[V.innerFooterDirection==="column-reverse"&&V.innerButtons.leftCustom.text?(l.openBlock(),l.createBlock(ie,l.mergeProps({key:0,ref:"leftCustomBtn","syno-id":`${V.synoId}-fbar-cancel`},V.innerButtons.leftCustom,{onClick:V.onLeftCustomButton}),{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(V.innerButtons.leftCustom.text),1)]),_:1},16,["syno-id","onClick"])):l.createCommentVNode("",!0),V.innerButtons.cancel.text?(l.openBlock(),l.createBlock(ie,l.mergeProps({key:1,ref:"cancelBtn","syno-id":`${V.synoId}-fbar-cancel`},V.innerButtons.cancel,{onClick:V.onCancelButton}),{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(V.innerButtons.cancel.text),1)]),_:1},16,["syno-id","onClick"])):l.createCommentVNode("",!0),V.innerButtons.confirm.text?(l.openBlock(),l.createBlock(ie,l.mergeProps({key:2,ref:"confirmBtn","syno-id":`${V.synoId}-fbar-commit`},V.innerButtons.confirm,{onClick:V.onConfirmButton}),{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(V.innerButtons.confirm.text),1)]),_:1},16,["syno-id","onClick"])):l.createCommentVNode("",!0)],2)])]),_:3},8,["class","show-status-bar","loading","loading-type","status-bar-state","error-text","syno-id"])]),_:3},512),V.isPasswordType?(l.openBlock(),l.createBlock(fe,{key:0,"window-property":V.windowProperty,onDragging:V.setDragging,onDragEnd:V.onDragEnd},null,8,["window-property","onDragging","onDragEnd"])):l.createCommentVNode("",!0)],38)),[[l.vShow,V.showWindow],[we]])}var $=w.default(m,[["render",H]]);x.default=$}(KB)),KB}var XB={},$K;function ite(){return $K||($K=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=nv(),k=tv(),F=Mb(),B=_i(),G=fr(),E=ht(),A=St(),u=id();const o=24,S=E.defineComponent({name:"WizardWindow",components:{vSpin:k.default},extends:M.default,mixins:[G.provide("wizard-window")],props:{width:{type:[String,Number],default:480},minWidth:{type:[String,Number],default:420},height:{type:[String,Number],default:"auto"},showClose:{type:Boolean,default:!0},minimizable:{type:Boolean,default:!1},maximizable:{type:Boolean,default:!1}},emits:["wizard.currentStep","wizard.stepScroll"],data(){return{subTitle:void 0,subTitleOpacity:0,headerTitleWidth:0}},computed:{windowCls(){return[this.prefixCls,"v-wizard-window",{"active-win":this.active,"deactive-win":!this.active,"no-shadow":this.noShadow,"mobile-fit":this.inFitBreakpoint}]},innerSubTitle(){return this.inFitBreakpoint?this.subTitle:` - ${this.subTitle}`},subTitleStyle(){return{opacity:this.subTitleOpacity}},headlineStyle(){return{width:`${this.headerTitleWidth}px`}}},methods:{setCurrentStep(v){this.subTitle=v.headline,this.focus()},onHeadlineIntersection(v){this.headerTitleWidth=this.$refs.header.getTitleEl()?.offsetWidth},onStepScrolled(v){this.subTitleOpacity=v?Math.min(v,o)/o:0},clearStatusBusy(){this.clearStatus()},getToastBox(v){let b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};b=B.merge({text:v},b),F.openToast(this.$.appContext.app,this.$el,b,B.merge({constrainMode:!1,absoluteMode:!1,anchorEl:this.$el,offset:u.toastOffset,align:"t->t"},s))},tryConstrainHeight(){return!0}}}),_=["id"],p=["aria-label","aria-describedby"],f={class:"focus-last-alert",tabindex:"0",role:"alert"};function y(v,b,s,l,w,I){const C=E.resolveComponent("v-window-header"),h=E.resolveComponent("v-trap-focus"),c=E.resolveComponent("v-draggable"),m=E.resolveComponent("v-spin"),T=E.resolveDirective("syno-id");return E.withDirectives((E.openBlock(),E.createElementBlock("div",{class:E.normalizeClass(v.windowCls),style:E.normalizeStyle(v.windowStyle),ref:"_window",onMousedown:b[1]||(b[1]=D=>v.toFront()),onKeydown:b[2]||(b[2]=E.withKeys(function(){return v.onEsc&&v.onEsc(...arguments)},["esc"]))},[E.createVNode(C,E.mergeProps({ref:"header"},v.headerProps,{onClose:v.onClose,"is-modalized":"","is-wizard":"","show-app-icon":!1,class:v.headerCls,"dark-theme":""}),{"sub-title":E.withCtx(()=>[v.inFitBreakpoint?E.createCommentVNode("",!0):(E.openBlock(),E.createElementBlock("div",{key:0,id:`${v.id}-subtitle`,class:"sub-wrapper",style:E.normalizeStyle(v.subTitleStyle)},E.toDisplayString(v.innerSubTitle),13,_))]),_:1},16,["onClose","class"]),v.inFitBreakpoint?(E.openBlock(),E.createElementBlock("div",{key:0,class:"headline-transform",style:E.normalizeStyle(v.subTitleStyle)},[E.createElementVNode("div",{class:"headline-text",style:E.normalizeStyle(v.headlineStyle)},E.toDisplayString(v.innerSubTitle),5)],4)):E.createCommentVNode("",!0),E.createVNode(h,{class:E.normalizeClass(v.extendedBodyCls),ref:"trapFocus"},{"alert-last":E.withCtx(()=>[E.createElementVNode("div",f,E.toDisplayString(v._i18n("desktop","window_last_hint")),1)]),default:E.withCtx(()=>[E.createElementVNode("div",{class:"v-trap-focus-indicator",tabindex:"0",role:"dialog","aria-label":v.currentTitle,"aria-describedby":`${v.id}-subtitle`},null,8,p),E.renderSlot(v.$slots,"default")]),_:3},8,["class"]),v.innerDraggable?(E.openBlock(),E.createBlock(c,{key:1,"prefix-cls":"v-wizard-window","window-property":v.windowProperty,onDragging:v.setDragging,onDragEnd:v.onDragEnd},null,8,["window-property","onDragging","onDragEnd"])):E.createCommentVNode("",!0),v.isMasking?(E.openBlock(),E.createElementBlock("div",{key:2,onMousedown:b[0]||(b[0]=E.withModifiers(function(){return v.onMaskMouseDown&&v.onMaskMouseDown(...arguments)},["stop"])),class:E.normalizeClass(v.maskCls)},[E.createVNode(m,{"only-mask":!v.lastMaskLayer.text,tip:v.lastMaskLayer.text,spinning:v.isMasking,"mask-style":v.maskStyle},null,8,["only-mask","tip","spinning","mask-style"])],34)):E.createCommentVNode("",!0)],38)),[[E.vShow,v.showWindow],[T]])}var d=A.default(S,[["render",y]]);x.default=d}(XB)),XB}var JB={},zK;function ote(){return zK||(zK=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=nv(),k=ci(),F=ht(),B=St();const G=F.defineComponent({name:"AboutWindow",components:{vModalWindow:M.default},mixins:[k.default],props:{name:{type:String,default:""},customName:{type:Array,default:null},desc:{type:String,default:""},icon:{type:String,default:""},copyrightYear:{type:String,default:""},tosUrl:{type:String,default:"https://www.synology.com/company/legal"},privacyUrl:{type:String,default:"https://www.synology.com/company/legal/privacy"},isBeta:{type:Boolean,default:!1},swapNameAndDesc:{type:Boolean,default:!1},theme:{type:Object,default:()=>({dark:!1,customBgColor:""})}},data(){return{clsPrefix:"v-about-window"}},computed:{windowCls(){return[this.clsPrefix,this.theme.dark?"dark-theme":"light-theme"]},windowStyle(){const l={};return this.theme.customBgColor&&(l.backgroundColor=this.theme.customBgColor),l},nameAndDescCls(){return["name-and-desc",{swap:this.swapNameAndDesc}]},title(){return this.customName?this.customName[0]:this.name},label(){return this.customName?this.customName[1]:""}}}),E={class:"content-top"},A={class:"content-row name"},u={key:0,class:"label"},o={key:1,class:"beta-tag"},S={key:0,class:"content-row desc"},_=F.createElementVNode("div",{class:"divider"},null,-1),p={class:"content-bottom"},f={class:"content-row links"},y=["href"],d=["href"],v={class:"content-row copyright"};function b(l,w,I,C,h,c){const m=F.resolveComponent("v-modal-window");return F.openBlock(),F.createBlock(m,{"syno-id":l.synoId,"show-close":"",draggable:!1,width:"auto",height:"auto","header-cls":`${l.clsPrefix}-header`,"body-cls":`${l.clsPrefix}-body`,"dark-theme":l.theme.dark,class:F.normalizeClass(l.windowCls),style:F.normalizeStyle(l.windowStyle)},{"fullsize-window-mask":F.withCtx(()=>[F.createElementVNode("div",{class:F.normalizeClass(`${l.clsPrefix}-mask`)},null,2)]),default:F.withCtx(()=>[F.createElementVNode("div",{class:F.normalizeClass(`${l.clsPrefix}-body-wrapper`)},[F.createElementVNode("div",E,[F.createElementVNode("div",{class:"content-row icon",style:F.normalizeStyle({backgroundImage:`url(${l.icon})`})},null,4),F.createElementVNode("div",{class:F.normalizeClass(l.nameAndDescCls)},[F.createElementVNode("div",A,[F.createTextVNode(F.toDisplayString(l.title)+" ",1),l.label!==""?(F.openBlock(),F.createElementBlock("div",u,F.toDisplayString(l.label),1)):F.createCommentVNode("",!0),l.isBeta?(F.openBlock(),F.createElementBlock("div",o)):F.createCommentVNode("",!0)]),l.desc?(F.openBlock(),F.createElementBlock("div",S,F.toDisplayString(l.desc),1)):F.createCommentVNode("",!0)],2)]),_,F.createElementVNode("div",p,[F.createElementVNode("div",f,[F.createElementVNode("a",{href:l.tosUrl,target:"_blank",class:"terms"},F.toDisplayString(l._i18n("common","terms_of_service")),9,y),F.createElementVNode("a",{href:l.privacyUrl,target:"_blank",class:"privacy"},F.toDisplayString(l._i18n("common","privacy_statements")),9,d)]),F.createElementVNode("div",v,F.toDisplayString(l._i18n("copyright","copyright").replace("{0}",l.copyrightYear)),1)])],2)]),_:1},8,["syno-id","header-cls","body-cls","dark-theme","class","style"])}var s=B.default(G,[["render",b]]);x.default=s}(JB)),JB}var ZB={},QB={},WK;function M5(){return WK||(WK=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Xn(),k=ci(),F=La(),B=sT(),G=fr(),E=ht(),A=St();function u(v,b){return typeof v=="function"?v.call(null,b):v}const o={NEXT:"next",BACK:"back",LEFT_BUTTON:"leftButton"},S=E.defineComponent({name:"WizardFooter",components:{vButton:F.default,vStatusBar:B.default},mixins:[k.default,G.inject("wizard")],props:{nextStepDisabled:{type:Boolean,default:!1},previousStepDisabled:{type:Boolean,default:!1},customButtonsGroup:{type:Object,default:()=>({})},showStatusBar:{type:Boolean,required:!0},statusBarState:{type:String,required:!0},statusBarLoadingText:{type:String,required:!0},statusBarSuccessText:{type:String,required:!0},statusBarErrorText:{type:String,required:!0},showLeftButton:{type:Boolean,default:!1},leftButtonText:{type:String,default:void 0},leftButtonType:{type:String,default:"footbar"},leftButtonSuffix:{type:String,default:"cancel"},leftButtonCls:{type:String,default:""},isMobile:{type:Boolean,default:!1},reachYStart:{type:Boolean,default:!0},reachYEnd:{type:Boolean,default:!0},currentStep:{type:Object,default:()=>null}},emits:[],data:()=>({prefixCls:"v-wizard-footer",currentStepType:void 0,currentNextStepKey:void 0,currentPreviousStepKey:void 0,unwatchers:[]}),computed:{wrapperCls(){return[this.prefixCls,{[this.currentStepType]:!!this.currentStepType,mobile:this.isMobile,"reach-y-start":this.reachYStart,"reach-y-end":this.reachYEnd}]},extendedLeftButtonCls(){return["left-btn",this.leftButtonCls]},showStartButton(){let v=this.currentStep,b=this.currentStepType;return this.customButtonsGroup&&this.customButtonsGroup.start&&typeof this.customButtonsGroup.start.show<"u"?u(this.customButtonsGroup.start.show,v):b?b==="welcome":!1},disableStartButton(){let v=this.currentStep,b=this.nextStepDisabled;return this.customButtonsGroup&&this.customButtonsGroup.start&&typeof this.customButtonsGroup.start.disabled<"u"?u(this.customButtonsGroup.start.disabled,v):b},showBackButton(){let v=this.hasPreviousStep,b=this.currentStep;return this.customButtonsGroup&&this.customButtonsGroup.back&&typeof this.customButtonsGroup.back.show<"u"?u(this.customButtonsGroup.back.show,b):v===!0},disableBackButton(){let v=this.currentStep,b=this.previousStepDisabled;return this.customButtonsGroup&&this.customButtonsGroup.back&&typeof this.customButtonsGroup.back.disabled<"u"?u(this.customButtonsGroup.back.disabled,v):b},showNextButton(){let v=this.currentStep,b=this.currentStepType;return this.customButtonsGroup&&this.customButtonsGroup.next&&typeof this.customButtonsGroup.next.show<"u"?u(this.customButtonsGroup.next.show,v):b==="normal"},disableNextButton(){let v=this.currentStep,b=this.nextStepDisabled;return this.customButtonsGroup&&this.customButtonsGroup.next&&typeof this.customButtonsGroup.next.disabled<"u"?u(this.customButtonsGroup.next.disabled,v):b},startButtonText(){let v=this.currentStep;return this.customButtonsGroup&&this.customButtonsGroup.start&&this.customButtonsGroup.start.text?u(this.customButtonsGroup.start.text,v):this._i18n("common","start")},leftText(){let v=this.currentStep;return this.customButtonsGroup?.leftButton?.text?u(this.customButtonsGroup.leftButton.text,v):this.leftButtonText??this._i18n("common","skip")},backButtonText(){let v=this.currentStep;return this.customButtonsGroup&&this.customButtonsGroup.back&&this.customButtonsGroup.back.text?u(this.customButtonsGroup.back.text,v):this._i18n("common","back")},backButton(){let v=this.currentStep;return this.customButtonsGroup?.back?.button?u(this.customButtonsGroup.back.button,v):!1},nextButton(){let v=this.currentStep;return this.customButtonsGroup?.next?.button?u(this.customButtonsGroup.next.button,v):!1},leftButton(){let v=this.currentStep;return this.customButtonsGroup?.leftButton?.button?u(this.customButtonsGroup.leftButton.button,v):!1},nextButtonText(){let v=this.currentStep,b=this.nextText;return this.customButtonsGroup&&this.customButtonsGroup.next&&this.customButtonsGroup.next.text?u(this.customButtonsGroup.next.text,v):b},hasNextStep(){return!!this.currentNextStepKey},hasPreviousStep(){return!!this.currentPreviousStepKey},nextText(){return this.hasNextStep?this._i18n("common","next"):this._i18n("common","commit")}},watch:{currentStep:{handler(v){for(const b of this.unwatchers)b?.();v&&(this.currentStepType=v.getType?.(),this.currentNextStepKey=v.getNextStepKey?.(),this.currentPreviousStepKey=v.getPreviousStepKey?.(),this.unwatchers.push(v.$watch("nextStepKey",b=>{this.currentNextStepKey=b}),v.$watch("innerPreviousStepKey",b=>{this.currentPreviousStepKey=b})))},immediate:!0}},[M.componentHooks.beforeUnmount](){for(const v of this.unwatchers)v?.()},methods:{invokeBehavior(v){switch(v){case o.BACK:this.toPre();break;case o.NEXT:this.toNext();break;case o.LEFT_BUTTON:this.onLeftButton();break}},onClickBackButton(){const v=this.customButtonsGroup?.back?.behavior??o.BACK;this.invokeBehavior(v)},onClickNextButton(){const v=this.customButtonsGroup?.next?.behavior??o.NEXT;this.invokeBehavior(v)},onClickLeftButton(){const v=this.customButtonsGroup?.leftButton?.behavior??o.LEFT_BUTTON;this.invokeBehavior(v)},toPre(){this.wizard?.instance?.toPreviousStep()},toNext(){this.hasNextStep===!0?this.wizard?.instance?.toNextStep():this.wizard?.instance?.finish()},onLeftButton(v){this.wizard?.instance?.onClickLeftButton(v)}}}),_={key:0,class:"left-area button-region"},p={key:1,class:"button-group center button-region"},f={key:2,class:"button-group pull-right button-region"};function y(v,b,s,l,w,I){const C=E.resolveComponent("v-button"),h=E.resolveComponent("v-status-bar"),c=E.resolveDirective("syno-id");return E.withDirectives((E.openBlock(),E.createElementBlock("div",{class:E.normalizeClass(v.wrapperCls)},[!v.showStartButton&&!v.isMobile?(E.openBlock(),E.createElementBlock("div",_,[v.showLeftButton?(E.openBlock(),E.createBlock(C,E.mergeProps({key:0,"syno-id":`${v.synoId}-left-button`,type:v.leftButtonType,suffix:v.leftButtonSuffix,class:v.extendedLeftButtonCls,onClick:v.onClickLeftButton},v.leftButton),{default:E.withCtx(()=>[E.createTextVNode(E.toDisplayString(v.leftText),1)]),_:1},16,["syno-id","type","suffix","class","onClick"])):E.createCommentVNode("",!0),E.createVNode(h,{class:"status-bar",show:v.showStatusBar,state:v.statusBarState,"loading-text":v.statusBarLoadingText,"success-text":v.statusBarSuccessText,"error-text":v.statusBarErrorText},null,8,["show","state","loading-text","success-text","error-text"])])):E.createCommentVNode("",!0),v.showStartButton?(E.openBlock(),E.createElementBlock("div",p,[E.withDirectives(E.createVNode(C,{"syno-id":`${v.synoId}-start`,type:"footbar",onClick:b[0]||(b[0]=m=>v.toNext()),suffix:"main",disabled:v.disableStartButton},{default:E.withCtx(()=>[E.createTextVNode(E.toDisplayString(v.startButtonText),1)]),_:1},8,["syno-id","disabled"]),[[E.vShow,v.showStartButton]])])):(E.openBlock(),E.createElementBlock("div",f,[v.showLeftButton&&v.isMobile?(E.openBlock(),E.createBlock(C,E.mergeProps({key:0,"syno-id":`${v.synoId}-left-button`,type:v.leftButtonType,suffix:v.leftButtonSuffix,onClick:v.onClickLeftButton},v.leftButton),{default:E.withCtx(()=>[E.createTextVNode(E.toDisplayString(v.leftText),1)]),_:1},16,["syno-id","type","suffix","onClick"])):E.createCommentVNode("",!0),E.withDirectives(E.createVNode(C,E.mergeProps({"syno-id":`${v.synoId}-back`,type:"footbar",onClick:v.onClickBackButton,suffix:"cancel",disabled:v.disableBackButton},v.backButton),{default:E.withCtx(()=>[E.createTextVNode(E.toDisplayString(v.backButtonText),1)]),_:1},16,["syno-id","onClick","disabled"]),[[E.vShow,v.showBackButton]]),E.withDirectives(E.createVNode(C,E.mergeProps({"syno-id":`${v.synoId}-next`,type:"footbar",onClick:v.onClickNextButton,suffix:"main",disabled:v.disableNextButton},v.nextButton),{default:E.withCtx(()=>[E.createTextVNode(E.toDisplayString(v.nextButtonText),1)]),_:1},16,["syno-id","onClick","disabled"]),[[E.vShow,v.showNextButton]])]))],2)),[[c]])}var d=A.default(S,[["render",y]]);x.default=d}(QB)),QB}var UK;function ate(){return UK||(UK=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Xn(),k=ln(),F=ev(),B=M5(),G=wa(),E=ci(),A=Ur(),u=kl(),o=Pg(),S=fr(),_=Gx(),p=ht(),f=St();const y=4,d=p.defineComponent({name:"Wizard",components:{wizardFooter:B.default,vScrollbar:G.default,vLayout:u.default},mixins:[E.default,S.inject("wizard-window"),S.provide("wizard")],props:{nextStepDisabled:Boolean,previousStepDisabled:Boolean,activeStepKey:{type:String,default:void 0},customButtonsGroup:{type:Object,default:()=>null},wizardStyle:{type:Object,default:()=>({})},stepCtStyle:{type:Object,default:()=>({})},showStatusBar:{type:Boolean,default:!1},statusBarState:{type:String,default:"loading"},statusBarLoadingText:{type:String,default:void 0},statusBarSuccessText:{type:String,default:void 0},statusBarErrorText:{type:String,default:void 0},showLeftButton:{type:Boolean,default:!1},leftButtonText:{type:String,default:void 0},leftButtonType:{type:String,default:"footbar"},leftButtonSuffix:{type:String,default:"cancel"},leftButtonCls:{type:String,default:""},layoutOrder:{type:Number,default:0},layoutType:{type:String,default:"basic"},mobileBreakpoint:{type:[String,Boolean],default:"xxs"},detectScroll:{type:Boolean,default:!1}},emits:["left-button","current-step","step-scroll"],data:()=>({activateStepKey:null,previousStepKey:null,currentStep:null,headline:null,showFooter:!0,reachYEnd:!0,reachYStart:!0,fixedHeadline:!1,headlineOpacity:1,steps:[]}),computed:{innerLeftButtonText(){return this.leftButtonText??this._i18n("common","skip")},innerStatusBarLoadingText(){return this.statusBarLoadingText??this._i18n("common","loading")},innerStatusBarSuccessText(){return this.statusBarSuccessText??this._i18n("common","setting_applied")},innerStatusBarErrorText(){return this.statusBarErrorText??this._i18n("common","error_system")},headlineStyle(){return this["wizard-window"]?.instance?.inFitBreakpoint?{opacity:this.headlineOpacity}:!1},wrapperCls(){return["v-wizard",{mobile:this.isMobile}]},stepWrapperCls(){return{"flex-bug":o.isSafariAndVersionMatch("<",17),"reach-y-start":this.detectScroll&&this.reachYStart,"reach-y-end":this.detectScroll&&this.reachYEnd}},isMobile(){return!this.$breakpointManager&&this.mobileBreakpoint?(A.remind("please import and use BreakpointManagerPlugin when you are in tree-shaking mode or breakpoint will not active."),!1):this.mobileBreakpoint&&this.$breakpointManager?.lessAndEqThan(this.mobileBreakpoint)}},watch:{async activateStepKey(l,w){for(const I of this.steps)I.stepKey===l?I.activate?.():I.deactivate?.();await p.nextTick(),this.$refs.scrollbar.update(),this.detectReachStartEnd()},activeStepKey(l,w){this.activateStepKey=this.activeStepKey}},async mounted(){this.activateStepKey=this.activeStepKey,await p.nextTick(),this.detectReachStartEnd(),this.headlineIntersectionDisposeFn=_.addIntersectionListener(this.$refs.headline,this.onHeadlineIntersection)},[M.componentHooks.beforeUnmount](){this.headlineIntersectionDisposeFn?.()},methods:{addStep(l){this.steps.push(l)},removeStep(l){this.steps=this.steps.filter(w=>F.getUid(w)!==F.getUid(l))},onNextStep(l){this.previousStepKey=this.activateStepKey,this.activateStepKey=l},onPreviousStep(l){this.previousStepKey=null,this.activateStepKey=l},setCurrentStep(l){this.currentStep=l,this.previousStepKey&&(this.currentStep.setAutoPreviousStepKey(this.previousStepKey),this.previousStepKey=null),this.headline=l.headline,this.handleCurrentStep(l)},toNextStep(){this.currentStep.nextStep()},toPreviousStep(){this.currentStep.previousStep()},onClickLeftButton(l){k.$emit(this,"left-button",l)},finish(){this.currentStep.finished?.()},updateScrollbar(){this.$refs.scrollbar?.update()},onHeadlineIntersection(l){this["wizard-window"]?.instance?.onHeadlineIntersection?.(l)},onStepPropChange(l){return w=>{this[l]=w}},watchStep(l,w){if(this.currentStepsUnWatchers)for(const I of this.currentStepsUnWatchers)I();this.currentStepsUnWatchers=w.map(I=>l.$watch(I,this.onStepPropChange(I),{immediate:!0}))},handleCurrentStep(l){k.$emit(this,"current-step",this.currentStep),this["wizard-window"]?.instance?.setCurrentStep?.(l),this.watchStep(this.currentStep,["showFooter","headline"])},handleScrollbar(l){this.detectReachStartEnd(),k.$emit(this,"step-scroll",l.target.scrollTop),this.onStepScrolled(l.target.scrollTop),this["wizard-window"]?.instance?.onStepScrolled?.(l.target.scrollTop)},onStepScrolled(l){this.headlineOpacity=l?1-Math.min(l,y)/y:1},detectReachStartEnd(){if(this.detectScroll){const l=this.$refs.scrollbar.$el,w=l.scrollTop;this.reachYStart=w===0,this.reachYEnd=l.scrollHeight<=l.offsetHeight||w===l.scrollHeight-l.offsetHeight}}}}),v={key:0,class:"headline-wrap"};function b(l,w,I,C,h,c){const m=p.resolveComponent("v-layout"),T=p.resolveComponent("v-scrollbar"),D=p.resolveComponent("wizard-footer"),O=p.resolveDirective("syno-id");return p.withDirectives((p.openBlock(),p.createBlock(m,{class:p.normalizeClass(l.wrapperCls),style:p.normalizeStyle(l.wizardStyle),type:`wizard.${l.layoutType}`},{default:p.withCtx(()=>[p.createElementVNode("div",{class:p.normalizeClass(["step-wrap",l.stepWrapperCls]),style:p.normalizeStyle(l.stepCtStyle)},[p.createVNode(T,{onScroll:l.handleScrollbar,class:"step-scrollbar",ref:"scrollbar"},{default:p.withCtx(()=>[l.headline!==!1?(p.openBlock(),p.createElementBlock("div",v,[p.createElementVNode("div",{class:"headline",ref:"headline",style:p.normalizeStyle(l.headlineStyle)},p.toDisplayString(l.headline),5)])):p.createCommentVNode("",!0),p.createVNode(m,{class:"step-container",type:"wizard-step-container"},{default:p.withCtx(()=>[p.renderSlot(l.$slots,"default")]),_:3})]),_:3},8,["onScroll"])],6),p.renderSlot(l.$slots,"footer",{currentStep:l.currentStep,toNextStep:l.toNextStep,toPreviousStep:l.toPreviousStep,finish:l.finish},()=>[p.withDirectives(p.createVNode(D,{"current-step":l.currentStep,"reach-y-end":l.reachYEnd,"reach-y-start":l.reachYStart,"custom-buttons-group":l.customButtonsGroup,"syno-id":`${l.synoId}-fbar`,"next-step-disabled":l.nextStepDisabled,"previous-step-disabled":l.previousStepDisabled,"show-status-bar":l.showStatusBar,"status-bar-state":l.statusBarState,"status-bar-loading-text":l.innerStatusBarLoadingText,"status-bar-success-text":l.innerStatusBarSuccessText,"status-bar-error-text":l.innerStatusBarErrorText,"is-mobile":l.isMobile,"show-left-button":l.showLeftButton,"left-button-text":l.innerLeftButtonText,"left-button-type":l.leftButtonType,"left-button-suffix":l.leftButtonSuffix,"left-button-cls":l.leftButtonCls},null,8,["current-step","reach-y-end","reach-y-start","custom-buttons-group","syno-id","next-step-disabled","previous-step-disabled","show-status-bar","status-bar-state","status-bar-loading-text","status-bar-success-text","status-bar-error-text","is-mobile","show-left-button","left-button-text","left-button-type","left-button-suffix","left-button-cls"]),[[p.vShow,l.showFooter]])])]),_:3},8,["class","style","type"])),[[O]])}var s=f.default(d,[["render",b]]);x.default=s}(ZB)),ZB}var eL={},GK;function ste(){return GK||(GK=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Xn(),k=ln(),F=Kt(),B=Kl(),G=fr(),E=ht(),A=St();const u=E.defineComponent({name:"WizardStep",components:{withTransition:B.withWrap("transition")},mixins:[G.inject("wizard")],props:{type:{type:String,default:"normal",validator:function(_){return["normal","welcome"].indexOf(_)!==-1}},showTransition:{type:[Boolean,Object],default:!1},stepKey:{type:String,default:void 0},nextStepKey:{type:String,default:void 0},previousStepKey:{type:String,default:void 0},headline:{type:[String,Boolean],default:void 0},preEnterNextStep:{type:Function,default:void 0},preEnterPreviousStep:{type:Function,default:void 0},postEnterNextStep:{type:Function,default:void 0},postEnterPreviousStep:{type:Function,default:void 0},finished:{type:Function,default:void 0},showFooter:{type:Boolean,default:!0}},emits:["activate","deactivate"],data:()=>({prefixCls:"v-wizard-step",autoPreviousStepKey:null,isActive:!1}),computed:{transitionProps(){return F.isBoolean(this.showTransition)?{name:"fade"}:this.showTransition},innerPreviousStepKey(){return this.previousStepKey??this.autoPreviousStepKey}},mounted(){this.wizard?.instance?.addStep(this)},[M.componentHooks.beforeUnmount](){this.wizard?.instance?.removeStep(this)},methods:{activate(){this.wizard?.instance?.setCurrentStep(this),this.isActive=!0,k.$emit(this,"activate",this)},deactivate(){this.isActive&&(k.$emit(this,"deactivate",this),this.isActive=!1)},setAutoPreviousStepKey(_){this.autoPreviousStepKey=_},async nextStep(){let _=this.preEnterNextStep,p;if(_){const f=await _();if(f===!1)return;F.isString(f)&&(p=f)}E.nextTick(()=>{this.wizard.instance.onNextStep(p??this.nextStepKey),this.postEnterNextStep?.()})},async previousStep(){let _=this.preEnterPreviousStep,p;if(_){const f=await _();if(f===!1)return;F.isString(f)&&(p=f)}E.nextTick(()=>{this.wizard.instance.onPreviousStep(p??this.innerPreviousStepKey),this.postEnterPreviousStep?.()})},onAfterEnter(){this.wizard?.instance?.updateScrollbar()},onAfterLeave(){this.wizard?.instance?.updateScrollbar()},getType(){return this.type},getNextStepKey(){return this.nextStepKey},getPreviousStepKey(){return this.innerPreviousStepKey}}});function o(_,p,f,y,d,v){const b=E.resolveComponent("with-transition"),s=E.resolveDirective("syno-id");return E.openBlock(),E.createBlock(b,E.mergeProps({wrap:!!_.showTransition},_.transitionProps,{onAfterEnter:_.onAfterEnter,onAfterLeave:_.onAfterLeave}),{default:E.withCtx(()=>[E.withDirectives((E.openBlock(),E.createElementBlock("div",{class:E.normalizeClass(_.prefixCls)},[E.renderSlot(_.$slots,"default")],2)),[[E.vShow,_.isActive],[s]])]),_:3},16,["wrap","onAfterEnter","onAfterLeave"])}var S=A.default(u,[["render",o]]);x.default=S}(eL)),eL}var tL={},nL={},jK;function kwe(){return jK||(jK=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Tl(),k=Kt(),F=Qo(),B=Ni(),G=nd(),E=ln(),A=Dr(),u=ht(),o=ac(),S=u.defineComponent({name:"OtpInput",mixins:[M.default],props:{length:{type:o.definePropType(Number),default:6},invalid:{type:o.definePropType(Boolean),default:!1},prefix:{type:o.definePropType([String,Boolean]),default:!1},[B.componentsProps.value()]:{type:o.definePropType(String),default:""}},emits:["update:model-value","input","finish"],data(){return{otp:Array(this.length).fill("")}},computed:{wrapperCls(){return{invalid:this.invalid}}},watch:{otp:{handler(_){E.$emit(this,B.getModelEventName(this),_.join(""))},deep:!0},[B.componentsProps.value()]:{handler(_){this.otp=_.split(""),_.length===this.length&&E.$emit(this,"finish",_)},immediate:!0}},methods:{focusIndex(_){(this.$refs[`otp-${_}`]?.[0]).focus()},onInput(_,p){const f=_.target;let y=0;if(!k.isNumberLike(f.value)){f.value="";return}for(;y<p&&!k.isEmptyString(this.otp[y]);)y++;G.set(this.otp,y,f.value),y<this.length-1&&A.raf(()=>{this.focusIndex(y+1)})},onFocus(_){_.target.select()},onPaste(_,p){_.preventDefault();const f=_.clipboardData?.getData("text")||"";if(!k.isNumberLike(f))return;const y=Math.min(this.length-p,f.length);for(let d=0;d<y;d++)G.set(this.otp,p,f[d]),p+=1;p=k.clampValue(p,0,this.length-1),A.raf(()=>{this.focusIndex(p)})},onKeyDown(_,p){p=k.clampValue(p,0,this.length-1),!(!F.isBackspace(_)&&!F.isDelete(_)&&!F.isPrevArrow(_)&&!F.isNextArrow(_))&&(_.preventDefault(),F.isBackspace(_)?(G.set(this.otp,p,""),p--):F.isDelete(_)?G.set(this.otp,p,""):F.isPrevArrow(_)?p--:F.isNextArrow(_)&&p++,p=k.clampValue(p,0,this.length-1),A.raf(()=>{this.focusIndex(p)}))}}});x.default=S}(nL)),nL}var qK;function lte(){return qK||(qK=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=kwe(),k=ht(),F=St();const B={key:0,class:"otp-prefix"},G={class:"input-content"},E=["value","onInput","onPaste","onKeydown"];function A(o,S,_,p,f,y){return k.openBlock(),k.createElementBlock("div",{class:k.normalizeClass(["otp-input",o.wrapperCls])},[o.prefix?(k.openBlock(),k.createElementBlock("div",B,[k.renderSlot(o.$slots,"prefix",{},()=>[k.createTextVNode(k.toDisplayString(o.prefix),1)])])):k.createCommentVNode("",!0),k.createElementVNode("div",G,[(k.openBlock(!0),k.createElementBlock(k.Fragment,null,k.renderList(o.length,d=>(k.openBlock(),k.createElementBlock("input",{class:"otp-input-item",type:"text",inputmode:"numeric",autocomplete:"one-time-code",maxlength:"1",ref_for:!0,ref:`otp-${d-1}`,key:d-1,value:o.otp[d-1],onInput:v=>o.onInput(v,d-1),onFocus:S[0]||(S[0]=v=>o.onFocus(v)),onPaste:v=>o.onPaste(v,d-1),onKeydown:v=>o.onKeyDown(v,d-1)},null,40,E))),128))])],2)}var u=F.default(M.default,[["render",A]]);x.default=u}(tL)),tL}var Pm={},YK;function ute(){if(YK)return Pm;YK=1,Object.defineProperty(Pm,"__esModule",{value:!0});var x=Ur();Pm.useToast=()=>{x.consoleError("you are not install vToastPlugin yet, please install it first")};function M(k){Pm.useToast=k}return Pm.hydrate=M,Pm}var SS={},KK;function hte(){if(KK)return SS;KK=1,Object.defineProperty(SS,"__esModule",{value:!0});var x=qx(),M=rl(),k=Xn();const F={[k.directiveHooks.mounted](B){x.isFocusable(B)&&!M.isServer&&window.setTimeout(()=>{B?.focus()},0)}};return SS.autoFocus=F,SS}var rL={},XK;function cte(){return XK||(XK=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=sc(),k=Xn(),F=Zo(),B={[k.directiveHooks.mounted](G,E,A){const u=M.isVue2?A.componentInstance:A.component?.proxy;u&&F.dispatch.call(u,"FormItem","form.register",u)},[k.directiveHooks.unmounted](G,E,A){const u=M.isVue2?A.componentInstance:A.component.proxy;u&&F.dispatch.call(u,"FormItem","form.unregister",u)}};x.default=B}(rL)),rL}var iL={},JK;function dte(){return JK||(JK=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=W3(),k=Kt(),F=Xn();const B="__svc_long_press__";var G={[F.directiveHooks.mounted](E,A){const u=k.isFunction(A.value)?A.value:k.noop;E[B]=M.addLongPressEvent(E,u)},[F.directiveHooks.unmounted](E){E[B]?.()}};x.LONG_PRESS_DISPOSE_FN=B,x.default=G}(iL)),iL}var oL={},ZK;function fte(){return ZK||(ZK=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Ur(),k=Xn(),F=F3();function B(A,u){if(!A&&M.isDebug()){let o="";u.$options.name&&(o+=`${u.$options.name}`),M.remind(`syno-id required [${o}]`,u)}}function G(A,u,o){const S=F.getInstance(u,o)??{};if(!S.$synoIdActive)return;if(u.value===!1||S?.useSynoId===!1){A.removeAttribute("syno-id");return}B(S.synoId,S);const _=u.value||S.synoId;A.setAttribute("syno-id",_)}var E={[k.directiveHooks.mounted](A,u,o){G(A,u,o)},[k.directiveHooks.updated](A,u,o){G(A,u,o)}};x.default=E}(oL)),oL}var Zh={},IS={},QK;function Rwe(){if(QK)return IS;QK=1,Object.defineProperty(IS,"__esModule",{value:!0});var x=Kt();function M(k,F){if(!window||!window.matchMedia)return x.noop;const B=window.matchMedia(k),G=E=>{E.matches?F("match",E):F("unmatch",E)};return B.addEventListener?B.addEventListener("change",G):B.addListener&&B.addListener(G),G(B),()=>{B.removeEventListener?B.removeEventListener("change",G):B.removeListener&&B.removeListener(G)}}return IS.registerMatchMedia=M,IS}var eX;function Ewe(){if(eX)return Zh;eX=1,Object.defineProperty(Zh,"__esModule",{value:!0});var x=gn(),M=_i(),k=rl(),F=Rwe(),B=ed(),G=Ur(),E=td(),A=ht();const u={xxxl:"(min-width: 1920px)",xxl:"(max-width: 1919px) and (min-width: 1680px)",xl:"(max-width: 1679px) and (min-width: 1440px)",lg:"(max-width: 1439px) and (min-width: 1280px)",md:"(max-width: 1279px) and (min-width: 1024px)",sm:"(max-width: 1023px) and (min-width: 768px)",xs:"(max-width: 767px) and (min-width: 576px)",xxs:"(max-width: 575px) and (min-width: 400px)",xxxs:"(max-width: 399px)"},o={SMALL_FIRST:Symbol("SmallFirst"),LARGE_FIRST:Symbol("LargeFirst")};class S{constructor(y){this._current=A.ref(""),this._mobile=A.ref(!1),this.mobileBreakpoint=y.mobileBreakpoint??"xs",this.active=y.active??!0,this.threshold=M.merge(u,y.threshold??{}),this.breakpointsOrder=["xxxs","xxs","xs","sm","md","lg","xl","xxl","xxxl"],this.breakpointPriority={xxxs:0,xxs:1,xs:2,sm:3,md:4,lg:5,xl:6,xxl:7,xxxl:8},!(k.isServer||this.mobileBreakpoint===!1)&&this.registerMql()}registerMql(){const y=[];if(this.threshold)for(const[d,v]of Object.entries(this.threshold))y.push(F.registerMatchMedia(v,b=>{b==="match"&&(this._current.value=d,this.mobileBreakpoint&&(this._mobile.value=this.lessAndEqThan(this.mobileBreakpoint)))}))}get current(){return this.active===!1?"xxxl":this._current.value}get mobile(){return this._mobile.value}greaterAndEqThan(y){return this.breakpointPriority[this.current]>=this.breakpointPriority[y]}lessAndEqThan(y){return this.breakpointPriority[this.current]<=this.breakpointPriority[y]}getSuitableValue(y){let{ordered:d=o.SMALL_FIRST,defaultBreakpointBy:v=o.LARGE_FIRST}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const b=[...Object.keys(y)].sort((w,I)=>d===o.LARGE_FIRST?this.breakpointPriority[I]-this.breakpointPriority[w]:this.breakpointPriority[w]-this.breakpointPriority[I]);let s=-1,l=o.LARGE_FIRST?"xxxs":"xxxl";for(const w of b)v===o.LARGE_FIRST?(s===-1||this.breakpointPriority[w]>s)&&(s=this.breakpointPriority[w],l=w):(s===-1||this.breakpointPriority[w]<s)&&(s=this.breakpointPriority[w],l=w);for(const w of b)if(this.lessAndEqThan(w))return y[w];return y[l]}}const _=E.makeSymbol("breakpointManager");Zh.useBreakpointManager=()=>{G.consoleError("you are not install BreakpointManagerPlugin yet, please install it first")};const p=x.makePlugin({},function(f){let y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Zh.useBreakpointManager=B.makeManager(f,"$breakpointManager",new S(y),_)});return Zh.BREAKPOINTS=u,Zh.BreakpointManager=S,Zh.BreakpointManagerPlugin=p,Zh.ORDERED=o,Zh.breakpointSymbol=_,Zh}var xu={},tX;function Awe(){if(tX)return xu;tX=1,Object.defineProperty(xu,"__esModule",{value:!0});var x=Dr(),M=gn(),k=Qo(),F=ed(),B=Ur(),G=td();class E{transformTouchEvent(y){return y?{pageX:y.pageX,pageY:y.pageY,screenX:y.screenX,screenY:y.screenY,clientX:y.clientX,clientY:y.clientY}:{}}dispatchEvent(y){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const v=k.createDOMEvent(y,{...this.transformTouchEvent(this.startEvent?.touches?.[0]),...d});this.target?.dispatchEvent(v)}onTouchStart(y){y.target&&(this.target=y.target),this.startEvent=y}onTouchEnd(y){this.endEvent=y}onTouchMove(y){}}class A extends E{constructor(){super(),this.fail=!1,this.duration=500}onTouchStart(y){super.onTouchStart(y),this.fail=!1,this.startTime=y.timeStamp,this.timer=window.setTimeout(()=>{this.dispatchEvent("contextmenu"),this.dispatchEvent("long-press")},this.duration)}onTouchMove(){window.clearTimeout(this.timer),this.fail=!0}onTouchEnd(y){super.onTouchEnd(y),window.clearTimeout(this.timer),y.timeStamp-(this.startTime??y.timeStamp)>this.duration&&!this.fail&&(this.dispatchEvent("contextmenu"),this.dispatchEvent("long-press"))}}class u extends E{constructor(){super(),this.fail=!1,this.duration=1e3,this.axis="none",this.direction="none",this.distance=[50,1e3]}onTouchStart(y){super.onTouchStart(y),this.fail=!1,this.startTouch=y.touches[0],this.startTime=y.timeStamp,this.axis="n/a"}onTouchMove(y){super.onTouchMove(y);const d=y.touches[0],v=Math.abs(d.pageX-(this.startTouch?.pageX??d.pageX)),b=Math.abs(d.pageY-(this.startTouch?.pageY??d.pageY));this.fail||(b>this.distance[0]&&b<this.distance[1]?this.axis==="n/a"&&(this.axis="vertical",this.direction=d.pageY>(this.startTouch?.pageY??d.pageY)?"down":"up"):v>this.distance[0]&&v<this.distance[1]&&this.axis==="n/a"&&(this.axis="horizontal",this.direction=d.pageX>(this.startTouch?.pageX??d.pageX)?"right":"left"),(b>this.distance[1]||v>this.distance[1]||b>this.distance[0]&&this.axis==="horizontal"||v>this.distance[0]&&this.axis==="vertical"||y.timeStamp-(this.startTime??y.timeStamp)>this.duration)&&(this.axis="none",this.fail=!0))}onTouchEnd(y){super.onTouchEnd(y),delete this.startTime,delete this.startTouch,(this.axis==="vertical"||this.axis==="horizontal")&&this.dispatchEvent("swipe",{axis:this.axis,direction:this.direction})}}class o extends E{constructor(){super(),this.duration=300,this.threshold=50,this.fail=!1}onTouchStart(y){super.onTouchStart(y);const d=y.touches[0];if(this.firstTouch)if(Math.abs(d.pageX-(this.firstTouch.pageX??d.pageX))<this.threshold&&Math.abs(d.pageY-(this.firstTouch.pageY??d.pageY))<this.threshold&&y.timeStamp-(this.firstTouchTime??y.timeStamp)<this.duration){this.secondTouch=d;return}else this.fail=!0;this.firstTouchTime=y.timeStamp,this.firstTouch=d,this.fail=!1}onTouchEnd(y){super.onTouchEnd(y);const d=y.changedTouches[0];this.firstTouch&&this.secondTouch&&(Math.abs(d.pageX-(this.firstTouch.pageX??d.pageX))<this.threshold&&Math.abs(d.pageY-(this.firstTouch.pageY??d.pageY))<this.threshold&&y.timeStamp-(this.firstTouchTime??y.timeStamp)<this.duration&&!this.fail&&this.dispatchEvent("dblclick"),delete this.firstTouch,delete this.firstTouchTime,delete this.secondTouch)}}class S{constructor(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};x.on(document.documentElement,"touchstart",d=>this.onTouchStart(d)),x.on(document.documentElement,"touchmove",d=>this.onTouchMove(d)),x.on(document.documentElement,"touchend",d=>this.onTouchEnd(d)),this.gestures=[new A,new o,new u,...y.gestures??[]]}addGesture(y){this.gestures.push(y)}onTouchStart(y){for(const d of this.gestures)d.onTouchStart(y)}onTouchMove(y){for(const d of this.gestures)d.onTouchMove(y)}onTouchEnd(y){for(const d of this.gestures)d.onTouchEnd(y)}}const _=G.makeSymbol("gestureManager");xu.useGestureManager=()=>{B.consoleError("you are not install GestureManagerPlugin yet, please install it first")};const p=M.makePlugin({},function(f){let y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};xu.useGestureManager=F.makeManager(f,"$gestureManager",new S(y),_)});return xu.DoubleTapGesture=o,xu.Gesture=E,xu.GestureManager=S,xu.GestureManagerPlugin=p,xu.LongPressGesture=A,xu.SwipeGesture=u,xu.gestureSymbol=_,xu}var ih={},nX;function Mwe(){if(nX)return ih;nX=1,Object.defineProperty(ih,"__esModule",{value:!0}),RQ();var x=_i(),M=gn(),k=Ur(),F=ed(),B=td();const G=1,E={window:{modal:{},"page-list-app":{},app:{},wizard:{},none:{}},panel:{overview:{},content:{},none:{}},tabs:{overview:{},content:{},none:{}},tree:{basic:{},navigation:{},selector:{},none:{}},"module-list":{panel:{},toolbar:{},none:{}},card:{regular:{},compact:{},"regular-has-header":{},"compact-has-header":{}},"alert-bar":{},"tab-body":{},"tab-fbar":{},"tab-tbar":{},content:{},"toolbar-content":{},"panel-body":{},"panel-fbar":{},form:{},"data-table":{},wizard:{basic:{},none:{}},"wizard-step-container":{},fieldset:{},"fieldset-body":{},others:{},none:{}},A={"panel-body":[],content:[{filter:/^panel.content => panel-body => content/,styles:{"layout-height":"100%","layout-padding":"12px 24px"}}],"toolbar-content":[{filter:/^window\.modal => panel\.content => panel-body => toolbar-content/,styles:{"layout-padding":"12px 24px"}}],commons:[{filter:/^window\.(page-list-app|modal|app) => panel\.(overview|content)\[\d+\]:has(.*)$/,styles:{"layout-height":"100%"}},{filter:/^tab-body => panel\.(overview|content)\[\d+\]:has(.*)$/,styles:{"layout-height":"100%"}}]},u={"tree.navigation":[{filter:/^tree\.navigation/,styles:{"layout-padding":"8px 0 6px 12px"}}],"tree.selector":[{filter:/^tree\.selector/,styles:{"layout-padding":"7px"}}],"module-list.panel":[{filter:/^module-list\.panel/,styles:{"layout-padding":"16px 12px 6px 12px"},props:{"pass-through":!0}}],"module-list.toolbar":[{filter:/^module-list\.toolbar/,styles:{"layout-padding-top":"16px","layout-padding-right":"12px","layout-padding-bottom":"6px","layout-padding-left":"12px"},props:{"pass-through":!0}}],fieldset:[{filter:/^fieldset/,styles:{"layout-padding":"8px 0 0 0"}},{filter:/^fieldset\[0\]/,styles:{"layout-padding":"0 0 0 0"}}],"fieldset-body":[{filter:/^fieldset => fieldset-body/,styles:{"layout-padding":"8px 0 0 0"}},{filter:/^form => fieldset => fieldset-body/,styles:{"layout-padding":"8px 8px 8px 8px"}}],form:[{filter:/^fieldset => fieldset-body => form/,styles:{"layout-padding":"0px 8px 8px 8px"}},{filter:/^tab-body => content => form/,styles:{"layout-padding":"0 8px 0 8px"}},{filter:/^tab-body => form/,styles:{"layout-padding":"8px 8px 0 8px"}},{filter:/^tab-body => content => form\[\d+\]:has\(fieldset\)/,styles:{"layout-padding":"0"}},{filter:/^tab-body => form\[\d+\]:has\(fieldset\)/,styles:{"layout-padding":"8px 0px 0 0px"}},{filter:/^tab-body => panel.content => panel-body => => form\[\d+\]:has\(\)/,styles:{"layout-padding":"0 8px 0 8px"}},{filter:/^tab-body => panel.content => panel-body => content => form\[\d+\]:has\(\)/,styles:{"layout-padding":"0 8px 0 8px"}}],"alert-bar":[{filter:/^tab-body => content => alert-bar/,styles:{"layout-padding":"0 0 8px 0"}},{filter:/^panel.content => panel-body => content => alert-bar/,styles:{"layout-padding":"0 0 8px 0"}},{filter:/^panel.content => panel-body => toolbar-content => alert-bar/,styles:{"layout-padding":"0 0 8px 0"}}],content:[{filter:/^tab-body => content/,styles:{"layout-padding":"8px 0 0 0","layout-height":"100%"}},{filter:/^tab-body => panel.content => panel-body => content/,styles:{"layout-padding":"8px 0 0 0","layout-height":"100%"}},{filter:/^panel.content => panel-body => content/,styles:{"layout-height":"100%"}}],"panel-body":[{filter:/^window\.(modal|app) => tabs\.(content|overview) => tab-body => panel.content => panel-body/,styles:{"layout-padding":"var(--panel-in-tabs-padding-top) 20px 6px 20px","layout-height":"100%"}},{filter:/^window\.page-list-app => tabs\.overview => tab-body => panel.content => panel-body/,styles:{"layout-padding":"var(--panel-in-tabs-padding-top) 20px 6px 20px","layout-height":"100%"}},{filter:/^window\.page-list-app => tabs\.content => tab-body => panel.content => panel-body/,styles:{"layout-padding":"var(--panel-in-tabs-padding-top) 16px 6px 16px","layout-height":"100%"}},{filter:/^tabs\.(content|overview) => tab-body => panel.content => panel-body/,styles:{"layout-padding":"var(--panel-in-tabs-padding-top) 0 0 0"}},{filter:/^window\.page-list-app => panel.overview => panel-body/,styles:{"layout-padding":"16px 20px 16px 20px","layout-margin":"0 0 0 0"}},{filter:/^window\.page-list-app => panel.content => panel-body/,styles:{"layout-padding":"16px 16px 6px 16px","layout-margin":"0 0 0 0"}},{filter:/^window\.(modal|app) => panel.content => panel-body/,styles:{"layout-padding":"16px 20px 6px 20px","layout-margin":"0 0 0 0"}}],"panel-fbar":[{filter:/^window\.page-list-app => tabs\.(content|overview) => tab-body => panel.content => panel-fbar/,breakpoint:{greaterAndEqThan:"xs"},styles:{"layout-margin":"0 16px"}},{filter:/^window\.page-list-app => panel.content => panel-fbar/,breakpoint:{greaterAndEqThan:"xs"},styles:{"layout-margin":"0 16px"}}],"wizard-step-container":[{filter:/^wizard\.basic => wizard-step-container/,breakpoint:{greaterAndEqThan:"xs"},styles:{"layout-padding":"24px 40px 0 40px","layout-height":"100%"}},{filter:/^wizard\.basic => wizard-step-container/,breakpoint:{lessAndEqThan:"xxs"},styles:{"layout-padding":"16px 20px 0 20px","layout-height":"100%"}}],"tab-tbar":[{filter:/^window\.(page-list-app|modal|app) => tabs.overview => tab-tbar/,styles:{"layout-padding":"16px 20px 0 20px","layout-margin":"0 0 0 0"}},{filter:/^window\.page-list-app => tabs.content => tab-tbar/,styles:{"layout-padding":"16px 16px 0 16px","layout-margin":"0 0 0 0"}},{filter:/^window\.(modal|app) => tabs.content => tab-tbar/,styles:{"layout-padding":"16px 20px 0 20px","layout-margin":"0 0 0 0"}}],"tab-body":[{filter:/^window\.(page-list-app|modal|app) => tabs.overview => tab-body/,styles:{"layout-padding":"4px 20px 6px 20px","layout-margin":"0 0 0 0"}},{filter:/^window\.page-list-app => tabs.content => tab-body/,styles:{"layout-padding":"4px 16px 6px 16px","layout-margin":"0 0 0 0"}},{filter:/^window\.(modal|app) => tabs.content => tab-body/,styles:{"layout-padding":"4px 20px 6px 20px","layout-margin":"0 0 0 0"}},{filter:/^tabs.content => tab-body\[\d+\]:has\(panel\.content\)/,styles:{"layout-padding":"4px 0 0 0","layout-margin":"0 0 0 0"},priority:2}],"tab-fbar":[{filter:/^window\.page-list-app => tabs\.overview => tab-fbar/,breakpoint:{greaterAndEqThan:"xs"},styles:{"layout-margin":"0 20px"}},{filter:/^window\.page-list-app => tabs\.content => tab-fbar/,breakpoint:{greaterAndEqThan:"xs"},styles:{"layout-margin":"0 16px"}}],commons:[{filter:/^window\.(page-list-app|modal|app) => panel\.(overview|content)\[\d+\]:has(.*)$/,styles:{"layout-height":"100%"}},{filter:/^tab-body => panel\.(overview|content)\[\d+\]:has(.*)$/,styles:{"layout-height":"100%"}}]};class o{constructor(f){let{types:y={},graph:d={},keepOriginalGraph:v=!0,debug:b=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.cached=new Map,this.types=x.merge(E,y),this.localVue=f,this.debug=b,v?this.graph=x.merge(u,d):this.graph=d}isTypeValid(f){return!!x.get(this.types,f)}cleanAllPath(){this.graph={},this.cached=new Map}addGraph(f){this.graph=f,this.cached=new Map}addPath(f,y){this.graph[f]=y,this.cached=new Map}getLayoutData(f){const y=this.localVue.config.globalProperties.$breakpointManager;y||k.remind("please import and use BreakpointManagerPlugin when you are in tree-shaking mode or breakpoint will not active.");let d=[],v={styles:{},props:{},priority:-1,paths:""},b=[],s=f;const l=Array.from(new Set(f.children.map(h=>h.type))).join(",");for(d.push(`${f.type}[${f.getSiblingIndex()}]:has(${l})`),b.push(`${f.type}[${f.getSiblingIndex()}]:has(${l})`),f=f.parent;f;)d.unshift(f.type),b.push(d.join(" => ")),f=f.parent;const w=b.join(",")+y.current;if(s.targetPaths=b,this.cached.has(w))return this.cached.get(w);const I=[...this.graph.commons||[],...this.graph[s.type]||[]],C=h=>{let c=!0;if(!h)return c;for(const[m,T]of Object.entries(h))c=c&&y?.[m](T);return c};for(const h of b)for(const c of I)c.priority||(c.priority=G),c.filter.test(h)&&c.priority>=v.priority&&C(c.breakpoint)&&(v=x.merge(v,c));return v.paths=b,this.cached.set(w,v),v}}const S=B.makeSymbol("layoutManager");ih.useLayoutManager=()=>{k.consoleError("you are not install LayoutManagerPlugin yet, please install it first")};const _=M.makePlugin({},function(p){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};ih.useLayoutManager=F.makeManager(p,"$layoutManager",new o(p,f),S)});return ih.C2_GRAPH=A,ih.DEFAULT_GRAPH=u,ih.LayoutManager=o,ih.LayoutManagerPlugin=_,ih.VALID_LAYOUT_TYPE=E,ih.layoutSymbol=S,ih}var Zd={},rX;function Dwe(){if(rX)return Zd;rX=1,Object.defineProperty(Zd,"__esModule",{value:!0});var x=Kt(),M=ln(),k=Xn(),F=Og(),B=gn(),G=Dr(),E=Ur(),A=rl(),u=X3(),o=id(),S=ed(),_=td(),p=_i(),f=ff(),y=ht();const d={x:10,y:10},v={x:30,y:30};function b(I,C){C.top&&(I.top=C.top),C.left&&(I.left=C.left)}class s{constructor(C,h,c){this.zseed=9e3,this.maximumZIndex=this.zseed+1e3,this.minimumZIndex=this.zseed-1e3,this.centeredWindowCount=0,this.offsetX=d.x,this.offsetY=d.y,this.windowsMap=Object.create(null),this.windowList=[],this.bindActivateLast=this.activateLast.bind(this),this.minimizedComps=[],this.maskList=[],!A.isServer&&(this.app=C,h instanceof HTMLElement?this._containerEl=h:x.isString(h)&&(this._containerSel=h),this.densePadding=c.densePadding||20,this.front=null,this.sortWindows=this.sortWindows.bind(this),this.centerOffsets=c.centerOffsets||[20,20],this.lastFocusElement=void 0)}get(C){return x.isString(C)?this.windowsMap?.[C]:C}getOffsetDefault(){return d}getOffsetGap(){return v}_tryAccessByCurrentTime(C){const h=new Date().getTime();let c;if(C=this.get(C?.id),!C)return!1;for(C.lastClick=h;C;)if(C=this.get(C.id),C){if(c=C.component,C.lastAccess=h,x.isFunction(c?.isModalized)&&!c.isModalized())break;C=c.owner}return!0}bringToFront(C){const h=this.get(C.id);if(!h)throw new Error(`window ${C.id} is not registered`);return this._tryAccessByCurrentTime(h),this.front&&h.id===this.front.id?!1:(this.orderWindows(),!0)}sendToBack(C){const h=this.get(C.id);h&&(h.lastAccess=-new Date().getTime(),this.orderWindows())}isWindowHidden(C){const c=this.get(C.id)?.component;return c&&x.isVueInstance(c)?!c.showWindow:!!c?.hidden}orderWindows(){let{autoActivateLast:C=!0}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.windowList?.sort(this.sortWindows),this.windowList?.forEach((h,c)=>{h.component&&!this.isWindowHidden(h)&&"setZIndex"in h.component&&x.isFunction(h.component.setZIndex)&&h.component.setZIndex((this.zseed??0)+c*10)}),this.maskList?.forEach(h=>{const c=this.windowList?.filter(T=>h.triggeredBy.includes(T.id));if(c?.length===0)return;const m=c?.reduce((T,D)=>Math.min(T,D.component.getZIndex()),this.maximumZIndex)??this.maximumZIndex;G.css(h.el,"z-index",`${m-1}`)}),C&&this.activateLast()}activateLast(){if(!this.windowList)return;let C;for(let h=this.windowList.length-1;h>=0;--h)if(C=this.windowList[h],C.component&&!this.isWindowHidden(C)){if(C.component.isSkipActive&&C.component.isSkipActive())continue;return this.setActiveWin(this.windowList[h]),this.windowList[h]}this.setActiveWin(null)}setActiveWin(C){if(C!==this.front&&(this.front&&this.front.component.setActive(!1),this.front=C,C)){const h=C.component;if(!x.isVueInstance(h)){const c=[...h.modalWin||[],...h.siblingWin||[]];for(const m of c)m&&m.hideForMinimize&&(delete m.hideForMinimize,m.show())}this._tryAccessByCurrentTime(C),this.orderWindows({autoActivateLast:!1}),h.setActive(!0)}}getLastAccess(C){const h=this.get(C.id);return h?h?.lastAccess??0:0}getGroupWinAccessTime(C){const h=this.get(C?.id);if(!h)return 0;const c=h.component?.modalWin??[];return[h.component,...c].reduce((T,D)=>Math.max(T,this.getLastAccess(D)),0)}sortWindows(C,h){const c=this.get(C.id),m=this.get(h.id);if(!c)return-1;if(!m)return 1;const T=c?.component,D=m?.component,O=T?.getTopWin?T.getTopWin():T,N=D?.getTopWin?D.getTopWin():D,z=T?.isModalized&&T.isModalized()?1:0,H=D?.isModalized&&D.isModalized()?1:0,$=T?.isAlwaysOnTop&&T.isAlwaysOnTop()?1:0,V=D?.isAlwaysOnTop&&D.isAlwaysOnTop()?1:0,P=T?.isAlwaysOnBottom&&T.isAlwaysOnBottom()?1:0,U=D?.isAlwaysOnBottom&&D.isAlwaysOnBottom()?1:0;return this.get(O?.id)?this.get(N?.id)?P!==U?U?1:-1:$!==V?V?-1:1:O!==N?this.getGroupWinAccessTime(O)<this.getGroupWinAccessTime(N)?-1:1:z&&T?.hasOwnerWin(D)?1:H&&D?.hasOwnerWin(T)?-1:T?.sinkable&&T?.hasOwnerWin(D)?c.lastClick<m.lastClick?-1:1:D?.sinkable&&D?.hasOwnerWin(T)?c.lastClick<m.lastClick?1:-1:!c.lastAccess||c.lastAccess<m.lastAccess?-1:1:(E.remind(`win ${m?.id} is a zombie window, parent window ${N.id} has been destroyed`,void 0,m),1):(E.remind(`win ${c?.id} is a zombie window, parent window ${O.id} has been destroyed`,void 0,c),-1)}centerWindow(C){let{withOffset:h=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const c=this.get(C.id);if(!c)return;const m=c.component;let T=[0,0];if(h&&(T=this.centerOffsets?.map(D=>D*this.centeredWindowCount)??[0,0]),x.isVueInstance(m)){const D=this.getContainerEl();m.alignCenterToElement(D,D,T)}else f.getExtjs()&&m.alignTo(f.getExtjs().get(this.getContainerEl()),"c-c",T);this.centeredWindowCount++}cascadeOverlap(C){let h;C.container?h=C.container.getSize():h=C.getSize();const c={width:this.offsetX+C.getWidth(),height:this.offsetY+C.getHeight()};c.width>h.width&&c.height>h.height?this.offsetX=this.offsetY=10:c.width>h.width?(this.offsetX===10&&(this.offsetY=10),this.offsetX=10):c.height>h.height&&(this.offsetX+=v.x,this.offsetY=10),C.setPosition(this.offsetX,this.offsetY),this.offsetX+=v.x,this.offsetY+=v.y}register(C){this.windowsMap[C.id]&&this.unregister(C),f.getExtjs()?.Window&&C instanceof f.getExtjs().Window&&(C.manager=this);const h={id:C.id,lastClick:0,lastAccess:0,component:C};if(this.windowsMap[C.id]=h,this.windowList.push(h),C.on?C.on("hide",this.activateLast,this):x.isVueInstance(C)&&M.$on(C,"hide",this.bindActivateLast),!C.fromRestore&&(!C.isModalized||!C.isModalized())&&!C.defaultMaximized&&this.cascadeOverlap(C),C.autoStart&&C.maximized&&C.appInstance){const{x:c,y:m,pageX:T,pageY:D}=C.appInstance.getRestoreSizePos();!x.isDefined(c)&&!x.isDefined(m)&&!x.isDefined(T)&&!x.isDefined(D)&&this.cascadeOverlap(C)}}unregister(C){C.manager&&delete C.manager,C.un?C.un("hide",this.activateLast,this):x.isVueInstance(C)&&M.$off(C,"hide",this.bindActivateLast),this.windowList=this.windowList.filter(h=>h.id!==C.id),this.minimizedComps=this.minimizedComps.filter(h=>h.id!==C.id),delete this.windowsMap[C.id]}isActive(){return!!this.getContainerEl()}setZIndex(C){this.zseed=C}setContainerEl(C){C instanceof HTMLElement?this._containerEl=C:x.isString(C)&&(this._containerSel=C)}getContainerEl(){return!this._containerEl&&this._containerSel&&(this._containerEl=document.querySelector(this._containerSel)),this._containerEl??document.body}createWindow(){return u.createWindow(...arguments)}openModalWindow(C){let h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.lastFocusElement=document.activeElement;const T=(c&&c.containerEl)??this.getContainerEl(),{onDestroy:D,...O}=c,N=c?.createWindow??this.createWindow;h=p.merge({maskContainer:{containerEl:c.containerEl,sharedMask:c.sharedMask}},h);const z={parentApp:this.app,containerEl:T,onDestroy:U=>{this.lastFocusElement?.focus?.(),D?.(U)},...O},{win:H,app:$,rootComponent:V}=N(C,h,z),P=p.merge({align:{el:this.getContainerEl()}},c);return H.init(this,void 0,P),H.autoAlignAfterInit||y.nextTick(()=>{if(H.alignCenterToElement){const U=this.getContainerEl();H.alignCenterToElement(U,U)}}),b(H,h),{window:H,component:V,app:$}}getMsgBox(C){let h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!this.app){E.remind("your window manager need to be init with app instance, please call windowManager.init(app) first");return}return C=C??k.getGlobalProperties(this.app)?.$messageWindow,C||E.remind("you need to set first parameter as vue component for open it, if you want to used default one, please import vMessageBoxWindowPlugin when you are in tree-shaking mode"),this.openModalWindow(C,{synoId:"window-manager-msg-box",...h},c).window}getSameContainerMask(C){return this.maskList.find(h=>h.containerEl===C)}maskContainer(C){let{sharedMask:h=!1,containerEl:c=void 0,maskCls:m=[]}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},T;if(c=c??this.getContainerEl(),h&&this.maskList.length>0&&(c&&(T=this.getSameContainerMask(c)),T=T||this.maskList[this.maskList.length-1],T&&T.triggeredBy.push(C)),!T&&!F.__E2E__){T={id:`${C}-container-mask`,triggeredBy:[C],el:document.createElement("div"),containerEl:c},G.addClass(T.el,"v-window-container-mask"),m=x.isArray(m)?m:[m];for(const D of m)G.addClass(T.el,D);c.appendChild(T.el),this.maskList.push(T)}this.orderWindows()}unmaskContainer(C){const h=this.maskList.findIndex(m=>m.triggeredBy.includes(C));if(h<0)return;const c=this.maskList[h];c.triggeredBy=c.triggeredBy.filter(m=>m!==C),c.triggeredBy.length===0&&(c.containerEl.removeChild(c.el),this.maskList.splice(h,1),this.orderWindows())}getActive(){return this.front&&this.front.component}getBy(C,h){let c=[];const m=this.windowList;for(let T=m.length-1;T>=0;--T){let D=m[T].component;C.call(h||D,D)!==!1&&c.push(D)}return c}getActiveAppWindow(){let C=this.getActive();for(;C;){if(f.getSYNO()?.SDS?.AppWindow&&C instanceof f.getSYNO().SDS.AppWindow)return C;if(x.isVueInstance(C)&&x.isExtendVueComponent(C,o.AppWindowName))return C;C=C.owner}return C}hideAll(){for(let C of this.windowList)C&&!x.isFunction(C)&&C.component.isVisible()&&C.component.hide()}toggleAllWin(){this.toggleAllWinMinimize()}toggleAllWinMinimize(){let C=[];for(const h of this.windowList){const c=h.component;c.isVisible()&&(c.toggleMinimizable===!1?c.close():C.push(c))}if(C.length){for(const h of C)h.minimize&&h.minimize();this.minimizedComps=C}else this.minimizedComps.length&&Promise.all(this.minimizedComps.map(c=>new Promise(m=>{c.show(void 0,m,this)}))).then(()=>{const c=new Date().getTime();for(const[m,T]of this.minimizedComps.entries()){const D=this.get(T.id);D&&(D.lastAccess=c+m)}this.orderWindows()})}getMaximizeAppWindowCount(C){return this.windowList.reduce(function(h,c){const m=c.component;return C&&C.id&&c.id&&C.id===c.id?h:(x.isVueInstance(m)||f.getSYNO()&&m instanceof f.getSYNO().SDS.AppWindow)&&m.isVisible()&&m.maximized===!0?h+1:h},0)}}const l=_.makeSymbol("windowManager");Zd.useWindowManager=()=>{E.consoleError("you are not install WindowManagerPlugin yet, please install it first")};const w=B.makePlugin({},function(I){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{desktopEl:document.body};Zd.useWindowManager=S.makeManager(I,"$windowManager",new s(I,C.desktopEl,C),l)});return Zd.WindowManager=s,Zd.WindowManagerPlugin=w,Zd.windowSymbol=l,Zd}var Qh={},aL={},iX;function Owe(){return iX||(iX=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});const M={common:{close:"关闭",explore:"Explore",more_products:"More products",sign_in:"登录",data_center:"Data Center",synology_account_settings:"",loading:"加载中...",reset:"重置",custom:"自定义",selected:"已选",pure_colon:":",clean:"清除",last_month:"last month",next_month:"next month",no_item:"无项目",create:"创建",comma:"、",add_field:"添加",password_strength:"Strength",password_must:"密码要求",colon:":",action:"操作",more:"更多",items_perpage:"每页显示数",refresh:"刷新",cancel:"取消",commit:"应用",setting_applied:"已应用更改。",error_system:"无法执行此操作。请登录 _OSNAME_并再试一次。",search_now_placeholder:"立即搜索",save:"保存",terms_of_service:"服务条款",privacy_statements:"隐私声明",password:"密码",apply:"确定",dont_save:"不要保存",confirm_lostchange_without_save:"更改未保存。是否要保存并离开?",delete:"删除",hide:"隐藏",enter_password_to_continue:"输入密码",enter_user_password:"请输入 _OSNAME_ 帐户密码以继续。",submit:"提交",start:"开始",skip:"跳过",back:"上一步",next:"下一步",enable:"启用"},desktop:{window_last_hint:"指的是此窗口中最后一个的元素。按 Tab 可返回顶部。"},personal_settings:{customize_color:"自定义颜色"},uicommon:{copy:"复制",cut:"剪切",items:"个项目",add_time:"添加时间",schedule_abbre_sun:"日",schedule_abbre_mon:"一",schedule_abbre_tue:"二",schedule_abbre_wed:"三",schedule_abbre_thu:"四",schedule_abbre_fri:"五",schedule_abbre_sat:"六",browse:"浏览",files_selected:"已选择 {0} 个文件",goto_page:"前往第 {0} 页",pre_x_pages:"上 {0} 页",next_x_pages:"下 {0} 页",item:"个项目",schedule_sun:"周日",schedule_mon:"周一",schedule_tue:"周二",schedule_wed:"周三",schedule_thu:"周四",schedule_fri:"周五",schedule_sat:"周六",schedule_daily:"每天",schedule_weekend:"假日",schedule_weekdays:"平日",searching:"搜索中..."},extlang:{todayText:"今天",jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月",fieldblank:"此字段为必填。",invaliddate:"{0} 并非有效日期。请使用格式 {1} 输入日期。",firstpage:"第一页",lastpage:"最终页"},error:{error_invalid_min_date:"The date in this field must be equal to or after {0}",error_invalid_max_date:"The date in this field must be equal to or before {0}"},search:{no_search_result:"找不到符合的项目。"},about:{update_package_tip:"请前往 <b>DSM</b> > <b>套件中心</b>以更新套件。",check_for_update:"正在检查更新...",update_available:"有可用更新",update_up_to_date:"已是最新版本。"},update:{version:"版本",update_dsm_release_note:"发行说明"},copyright:{copyright:"版权所有 © {0} Synology Inc. 保留一切权利。"}};x.default=M,x.texts=M}(aL)),aL}var sL={},oX;function Nwe(){return oX||(oX=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});const M={common:{close:"關閉",explore:"探索",more_products:"更多產品",sign_in:"登入",data_center:"資料中心",synology_account_settings:"管理帳戶",loading:"載入中...",reset:"重置",custom:"自訂",selected:"已選取",pure_colon:":",clean:"清除",last_month:"上個月",next_month:"下個月",no_item:"沒有項目",create:"新增",comma:"、",add_field:"增加欄位",password_strength:"Strength",password_must:"密碼規則",colon:":",action:"動作",more:"更多",items_perpage:"每頁顯示數",refresh:"重新整理",cancel:"取消",commit:"套用",setting_applied:"已套用變更。",error_system:"無法執行此操作。請重新登入 _OSNAME_ 並再試一次。",search_now_placeholder:"立即搜尋",save:"儲存",terms_of_service:"服務條款",privacy_statements:"隱私權聲明",password:"密碼",apply:"確定",dont_save:"不要儲存",confirm_lostchange_without_save:"變更尚未儲存,您要先儲存再離開嗎?",delete:"刪除",hide:"隱藏",enter_password_to_continue:"輸入密碼",enter_user_password:"請輸入您的 _OSNAME_ 帳戶密碼來繼續。",submit:"送出",start:"開始",skip:"略過",back:"上一步",next:"下一步",enable:"啟用"},desktop:{window_last_hint:"這已是視窗最後一個元素。請按 Tab 鍵來回到視窗頂端。"},personal_settings:{customize_color:"自訂顏色"},uicommon:{copy:"複製",cut:"剪下",items:"個項目",add_time:"加入時間",schedule_abbre_sun:"日",schedule_abbre_mon:"一",schedule_abbre_tue:"二",schedule_abbre_wed:"三",schedule_abbre_thu:"四",schedule_abbre_fri:"五",schedule_abbre_sat:"六",browse:"瀏覽",files_selected:"已選取 {0} 個檔案",goto_page:"前往第 {0} 頁",pre_x_pages:"前 {0} 頁",next_x_pages:"後 {0} 頁",item:"個項目",schedule_sun:"週日",schedule_mon:"週一",schedule_tue:"週二",schedule_wed:"週三",schedule_thu:"週四",schedule_fri:"週五",schedule_sat:"週六",schedule_daily:"每天",schedule_weekend:"假日",schedule_weekdays:"平日",searching:"搜尋中..."},extlang:{todayText:"今天",jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月",fieldblank:"此欄位為必填。",invaliddate:"{0} 不是一個有效的日期。請使用此格式輸入日期:{1}",firstpage:"第一頁",lastpage:"最終頁"},error:{error_invalid_min_date:"給訂的日期必須至少在 {0} 之後",error_invalid_max_date:"給訂的日期必須在 {0} 之前"},search:{no_search_result:"找不到符合的項目。"},about:{update_package_tip:"請前往 <b>DSM</b> > <b>套件中心</b>以更新套件。",check_for_update:"正在檢查更新...",update_available:"有可用更新",update_up_to_date:"已是最新版本。"},update:{version:"版本",update_dsm_release_note:"發行資訊"},copyright:{copyright:"© {0} 群暉科技股份有限公司 所有權利均予保留。"}};x.default=M,x.texts=M}(sL)),sL}var lL={},aX;function Pwe(){return aX||(aX=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});const M={common:{close:"Zavřít",explore:"Explore",more_products:"More products",sign_in:"Přihlásit",data_center:"Data Center",synology_account_settings:"",loading:"Načítání...",reset:"Obnovit",custom:"Vlastní",selected:"Vybrané",pure_colon:":",clean:"Vymazat",last_month:"last month",next_month:"next month",no_item:"Žádné položky",create:"Vytvořit",comma:", ",add_field:"Přidat",password_strength:"Strength",password_must:"Požadavky na heslo",colon:": ",action:"Akce",more:"Další",items_perpage:"Počet položek na stránku",refresh:"Aktualizovat",cancel:"Storno",commit:"Použít",setting_applied:"Změny se použily.",error_system:"Tuto operaci nelze provést. Přihlaste se do systému _OSNAME_ a zkuste to znovu.",search_now_placeholder:"Hledat",save:"Uložit",terms_of_service:"Podmínky služby",privacy_statements:"Prohlášení o zásadách ochrany osobních údajů",password:"Heslo",apply:"OK",dont_save:"Neukládat",confirm_lostchange_without_save:"Změny nejsou uloženy. Chcete změny uložit a aplikaci opustit?",delete:"Odstranit",hide:"Skrýt",enter_password_to_continue:"Zadejte heslo",enter_user_password:"Chcete-li pokračovat, zadejte heslo vašeho účtu _OSNAME_.",submit:"Odeslat",start:"Spustit",skip:"Přeskočit",back:"Zpět",next:"Další",enable:"Povolit"},desktop:{window_last_hint:"Toto je poslední prvek v okně. Stisknutím tabelátoru se vrátíte na začátek."},personal_settings:{customize_color:"Vlastní nastavení barev"},uicommon:{copy:"Kopírovat",cut:"Vyjmout",items:"položek",add_time:"Přidat čas",schedule_abbre_sun:"Ne",schedule_abbre_mon:"Po",schedule_abbre_tue:"Út",schedule_abbre_wed:"St",schedule_abbre_thu:"Čt",schedule_abbre_fri:"Pá",schedule_abbre_sat:"So",browse:"Procházet",files_selected:"{0} vybraných souborů",goto_page:"Přejít na stránku {0}",pre_x_pages:"Předchozích {0} stran",next_x_pages:"Dalších {0} stran",item:"položka",schedule_sun:"Neděle",schedule_mon:"Pondělí",schedule_tue:"Úterý",schedule_wed:"Středa",schedule_thu:"Čtvrtek",schedule_fri:"Pátek",schedule_sat:"Sobota",schedule_daily:"Denně",schedule_weekend:"Víkend",schedule_weekdays:"Pracovní dny",searching:"Hledání..."},extlang:{todayText:"Dnes",jan:"Leden",feb:"Únor",mar:"Březen",apr:"Duben",may:"Květen",jun:"Červen",jul:"Červenec",aug:"Srpen",sep:"Září",oct:"Říjen",nov:"Listopad",dec:"Prosinec",fieldblank:"Toto pole je vyžadováno.",invaliddate:"{0} není platný datum. Zadejte datum pomocí formátu {1}",firstpage:"První stránka",lastpage:"Poslední stránka"},error:{error_invalid_min_date:"The date in this field must be equal to or after {0}",error_invalid_max_date:"The date in this field must be equal to or before {0}"},search:{no_search_result:"Nebyla nalezena žádná shoda."},about:{update_package_tip:"Přejděte do části <b>DSM</b> > <b>Centrum balíčků</b> a balíček aktualizujte.",check_for_update:"Kontrola dostupnosti aktualizací...",update_available:"Je dostupná aktualizace",update_up_to_date:"Vaše verze je aktuální."},update:{version:"Verze",update_dsm_release_note:"Poznámky k verzi"},copyright:{copyright:"Copyright © {0} Synology Inc. Všechna práva vyhrazena."}};x.default=M,x.texts=M}(lL)),lL}var uL={},sX;function Bwe(){return sX||(sX=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});const M={common:{close:"Luk",explore:"Explore",more_products:"More products",sign_in:"Log ind",data_center:"Data Center",synology_account_settings:"",loading:"Indlæser...",reset:"Nulstil",custom:"Tilpasset",selected:"Udvalgte",pure_colon:":",clean:"Ryd",last_month:"last month",next_month:"next month",no_item:"Ingen elementer",create:"Opret",comma:", ",add_field:"Tilføj",password_strength:"Strength",password_must:"Adgangskode påkrævet",colon:": ",action:"Handling",more:"Mere",items_perpage:"Emner pr. side",refresh:"Opdater",cancel:"Annuller",commit:"Anvend",setting_applied:"Ændringer anvendt.",error_system:"Kan ikke gennemføre denne handling. Log på _OSNAME_, og prøv igen.",search_now_placeholder:"Søg nu",save:"Gem",terms_of_service:"Tjenestevilkår",privacy_statements:"Erklæring om beskyttelse af personlige oplysninger",password:"Adgangskode",apply:"OK",dont_save:"Gem ikke",confirm_lostchange_without_save:"Ændringer er ikke gemt. Vil du gemme og forlade?",delete:"Slet",hide:"Skjul",enter_password_to_continue:"Indtast adgangskode",enter_user_password:"Indtast adgangskoden til din _OSNAME_-konto for at fortsætte.",submit:"Afsend",start:"Start",skip:"Spring over",back:"Tilbage",next:"Næste",enable:"Aktivér"},desktop:{window_last_hint:"Dette er det sidste element i vinduet. Tryk på Tab for at vende tilbage til øverst."},personal_settings:{customize_color:"Tilpas farve"},uicommon:{copy:"Kopier",cut:"Klip",items:"elementer",add_time:"Tilføje tid",schedule_abbre_sun:"Søn",schedule_abbre_mon:"Man",schedule_abbre_tue:"Tir",schedule_abbre_wed:"Ons",schedule_abbre_thu:"Tor",schedule_abbre_fri:"Fre",schedule_abbre_sat:"Lør",browse:"Gennemse",files_selected:"{0} filer valgt",goto_page:"Gå til side {0}",pre_x_pages:"Forrige {0} sider",next_x_pages:"Næste {0} sider",item:"element",schedule_sun:"Søndag",schedule_mon:"Mandag",schedule_tue:"Tirsdag",schedule_wed:"Onsdag",schedule_thu:"Torsdag",schedule_fri:"Fredag",schedule_sat:"Lørdag",schedule_daily:"Daglig",schedule_weekend:"Weekend",schedule_weekdays:"Ugedage",searching:"Søger efter..."},extlang:{todayText:"I dag",jan:"Januar",feb:"Februar",mar:"Marts",apr:"April",may:"Maj",jun:"Juni",jul:"Juli",aug:"August",sep:"September",oct:"Oktober",nov:"November",dec:"December",fieldblank:"Dette felt er påkrævet.",invaliddate:"{0} er ikke en gyldig dato. Indtast en dato ved hjælp af formatet {1}",firstpage:"Første side",lastpage:"Sidste side"},error:{error_invalid_min_date:"The date in this field must be equal to or after {0}",error_invalid_max_date:"The date in this field must be equal to or before {0}"},search:{no_search_result:"Ingen match fundet."},about:{update_package_tip:"Gå til <b>DSM</b> > <b>Pakkecenter</b> for at opdatere pakken.",check_for_update:"Søger efter opdateringer...",update_available:"Opdatering tilgængelig",update_up_to_date:"Din version er opdateret."},update:{version:"Version",update_dsm_release_note:"Frigivelsesnoter"},copyright:{copyright:"Copyright © {0} Synology Inc. Alle rettigheder forbeholdes."}};x.default=M,x.texts=M}(uL)),uL}var hL={},lX;function uX(){return lX||(lX=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});const M={common:{close:"Close",explore:"Explore",more_products:"More products",sign_in:"Sign In",data_center:"Data Center",synology_account_settings:"Manage Account",loading:"Loading...",reset:"Reset",custom:"Custom",selected:"Selected",pure_colon:":",clean:"Clear",last_month:"last month",next_month:"next month",no_item:"No items",create:"Create",comma:", ",add_field:"Add",password_strength:"Strength",password_must:"Password requirements",colon:": ",action:"Action",more:"More",items_perpage:"Items per page",refresh:"Refresh",cancel:"Cancel",commit:"Apply",setting_applied:"Changes applied.",error_system:"Unable to perform this operation. Please sign in to _OSNAME_ and try again.",search_now_placeholder:"Search now",save:"Save",terms_of_service:"Terms of Service",privacy_statements:"Privacy Statement",password:"Password",apply:"OK",dont_save:"Don't Save",confirm_lostchange_without_save:"Changes are not saved. Do you want to save and leave?",delete:"Delete",hide:"Hide",enter_password_to_continue:"Enter Password",enter_user_password:"Please enter the password of your _OSNAME_ account to continue.",submit:"Submit",start:"Start",skip:"Skip",back:"Back",next:"Next",enable:"Enable"},desktop:{window_last_hint:"This is the last element in the window. Press Tab to return to top."},personal_settings:{customize_color:"Customize color"},uicommon:{copy:"Copy",cut:"Cut",items:"items",add_time:"Add time",schedule_abbre_sun:"Sun",schedule_abbre_mon:"Mon",schedule_abbre_tue:"Tue",schedule_abbre_wed:"Wed",schedule_abbre_thu:"Thu",schedule_abbre_fri:"Fri",schedule_abbre_sat:"Sat",browse:"Browse",files_selected:"{0} files selected",goto_page:"Go to Page {0}",pre_x_pages:"Previous {0} pages",next_x_pages:"Next {0} pages",item:"item",schedule_sun:"Sunday",schedule_mon:"Monday",schedule_tue:"Tuesday",schedule_wed:"Wednesday",schedule_thu:"Thursday",schedule_fri:"Friday",schedule_sat:"Saturday",schedule_daily:"Daily",schedule_weekend:"Weekend",schedule_weekdays:"Weekdays",searching:"Searching..."},extlang:{todayText:"Today",jan:"January",feb:"February",mar:"March",apr:"April",may:"May",jun:"June",jul:"July",aug:"August",sep:"September",oct:"October",nov:"November",dec:"December",fieldblank:"This field is required.",invaliddate:"{0} is not a valid date. Please enter a date using the format {1}",firstpage:"First Page",lastpage:"Last Page"},error:{error_invalid_min_date:"The date in this field must be equal to or after {0}",error_invalid_max_date:"The date in this field must be equal to or before {0}"},search:{no_search_result:"No match found."},about:{update_package_tip:"Go to <b>DSM</b> > <b>Package Center</b> to update your package.",check_for_update:"Checking for updates...",update_available:"Update available",update_up_to_date:"Your version is up to date."},update:{version:"Version",update_dsm_release_note:"Release notes"},copyright:{copyright:"Copyright © {0} Synology Inc. All rights reserved."}};x.default=M,x.texts=M}(hL)),hL}var cL={},hX;function Lwe(){return hX||(hX=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});const M={common:{close:"Fermer",explore:"Explorer",more_products:"Plus de produits",sign_in:"Connexion",data_center:"Centre de données",synology_account_settings:"Gérer un compte",loading:"Chargement...",reset:"Réinitialiser",custom:"Personnalisé",selected:"Sélectionné",pure_colon:" :",clean:"Effacer",last_month:"last month",next_month:"next month",no_item:"Aucun élément",create:"Créer",comma:", ",add_field:"Ajouter",password_strength:"Strength",password_must:"Exigences relatives aux mots de passe",colon:" : ",action:"Action",more:"Plus",items_perpage:"Articles par page",refresh:"Actualiser",cancel:"Annuler",commit:"Appliquer",setting_applied:"Modifications appliquées.",error_system:"Impossible d'effectuer cette opération. Veuillez vous connecter à _OSNAME_, puis réessayez.",search_now_placeholder:"Rechercher maintenant",save:"Sauvegarder",terms_of_service:"Conditions d'utilisation",privacy_statements:"Politique de confidentialité",password:"Mot de passe",apply:"OK",dont_save:"Ne pas enregistrer",confirm_lostchange_without_save:"Les modifications n'ont pas été enregistrées. Voulez-vous enregistrer et quitter ?",delete:"Supprimer",hide:"Masquer",enter_password_to_continue:"Entrez le mot de passe",enter_user_password:"Veuillez saisir le mot de passe de votre compte _OSNAME_ pour continuer.",submit:"Soumettre",start:"Démarrer",skip:"Ignorer",back:"Retour",next:"Suivant",enable:"Activer"},desktop:{window_last_hint:"Il s'agit du dernier élément de la fenêtre. Appuyez sur Tab pour revenir en haut."},personal_settings:{customize_color:"Couleur personnalisée"},uicommon:{copy:"Copie",cut:"Couper",items:"éléments",add_time:"Heure d'ajout",schedule_abbre_sun:"Dim",schedule_abbre_mon:"Lun",schedule_abbre_tue:"Mar",schedule_abbre_wed:"Mer",schedule_abbre_thu:"Jeu",schedule_abbre_fri:"Ven",schedule_abbre_sat:"Sam",browse:"Parcourir",files_selected:"{0} fichiers sélectionnés",goto_page:"Accéder à la page {0}",pre_x_pages:"{0} pages précédentes ",next_x_pages:"{0} prochaines pages",item:"élément",schedule_sun:"Dimanche",schedule_mon:"Lundi",schedule_tue:"Mardi",schedule_wed:"Mercredi",schedule_thu:"Jeudi",schedule_fri:"Vendredi",schedule_sat:"Samedi",schedule_daily:"Quotidienne",schedule_weekend:"Week-end",schedule_weekdays:"Jours de la semaine",searching:"Recherche..."},extlang:{todayText:"De nos jours",jan:"Janvier",feb:"Février",mar:"Mars",apr:"Avril",may:"Mai",jun:"Juin",jul:"Juillet",aug:"Août",sep:"Septembre",oct:"Octobre",nov:"Novembre",dec:"Décembre",fieldblank:"Ce champ est requis.",invaliddate:"{0} n’est pas une date valide. Entrez une date utilisant le format {1}",firstpage:"Première page",lastpage:"Dernière page"},error:{error_invalid_min_date:"The date in this field must be equal to or after {0}",error_invalid_max_date:"The date in this field must be equal to or before {0}"},search:{no_search_result:"Aucun résultat."},about:{update_package_tip:"Accédez à <b>DSM</b> > <b>Centre de paquets</b> pour mettre à jour le paquet.",check_for_update:"Vérification des mises à jour...",update_available:"Mise à jour disponible",update_up_to_date:"Votre version est à jour."},update:{version:"Version",update_dsm_release_note:"Notes de version"},copyright:{copyright:"Copyright © {0} Synology Inc. Tous droits réservés."}};x.default=M,x.texts=M}(cL)),cL}var dL={},cX;function Fwe(){return cX||(cX=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});const M={common:{close:"Schließen",explore:"Entdecken",more_products:"Weitere Produkte",sign_in:"Anmelden",data_center:"Rechenzentrum",synology_account_settings:"Konto verwalten",loading:"Wird geladen...",reset:"Zurücksetzen",custom:"Benutzerdefiniert",selected:"Ausgewählt",pure_colon:":",clean:"Löschen",last_month:"last month",next_month:"next month",no_item:"Keine Elemente",create:"Erstellen",comma:", ",add_field:"Hinzufügen",password_strength:"Strength",password_must:"Kennwortanforderungen",colon:": ",action:"Aktion",more:"Mehr",items_perpage:"Elemente pro Seite ",refresh:"Aktualisieren",cancel:"Abbrechen",commit:"Übernehmen",setting_applied:"Änderungen übernommen.",error_system:"Dieser Vorgang kann nicht ausgeführt werden. Melden Sie sich bei _OSNAME_ an und versuchen Sie es erneut.",search_now_placeholder:"Jetzt suchen",save:"Speichern",terms_of_service:"Nutzungsbedingungen ",privacy_statements:"Datenschutzerklärung",password:"Kennwort",apply:"OK",dont_save:"Nicht speichern",confirm_lostchange_without_save:"Änderungen wurden nicht gespeichert. Möchten Sie speichern und beenden?",delete:"Löschen",hide:"Ausblenden",enter_password_to_continue:"Kennwort eingeben",enter_user_password:"Geben Sie das Kennwort Ihres _OSNAME_-Kontos ein, um fortzufahren.",submit:"Senden",start:"Start",skip:"Überspringen",back:"Zurück",next:"Weiter",enable:"Aktivieren"},desktop:{window_last_hint:"Dies ist das letzte Element in dem Fenster. Drücken Sie die Tab-Taste, um wieder nach oben zu gehen."},personal_settings:{customize_color:"Benutzerdefinierte Farbe"},uicommon:{copy:"Kopieren",cut:"Ausschneiden",items:"Elemente",add_time:"Zeit hinzufügen",schedule_abbre_sun:"So",schedule_abbre_mon:"Mo",schedule_abbre_tue:"Di",schedule_abbre_wed:"Mi",schedule_abbre_thu:"Do",schedule_abbre_fri:"Fr",schedule_abbre_sat:"Sa",browse:"Durchsuchen",files_selected:"{0} Dateien ausgewählt",goto_page:"Gehe zu Seite {0}",pre_x_pages:"Vorherige {0} Seiten",next_x_pages:"Nächste {0} Seiten",item:"Element",schedule_sun:"Sonntag",schedule_mon:"Montag",schedule_tue:"Dienstag",schedule_wed:"Mittwoch",schedule_thu:"Donnerstag",schedule_fri:"Freitag",schedule_sat:"Samstag",schedule_daily:"Täglich",schedule_weekend:"Wochenende",schedule_weekdays:"Wochentage",searching:"Wird gesucht..."},extlang:{todayText:"Heute",jan:"Januar",feb:"Februar",mar:"März",apr:"April",may:"Mai",jun:"Juni",jul:"Juli",aug:"August",sep:"September",oct:"Oktober",nov:"November",dec:"Dezember",fieldblank:"Pflichtfeld",invaliddate:"{0} ist ein ungültiges Datum. Bitte geben Sie das Datum im Format {1} ein",firstpage:"Erste Seite",lastpage:"Letzte Seite"},error:{error_invalid_min_date:"The date in this field must be equal to or after {0}",error_invalid_max_date:"The date in this field must be equal to or before {0}"},search:{no_search_result:"Keine Entsprechung gefunden."},about:{update_package_tip:"Gehen Sie zu <b>DSM</b> > <b>Paket-Zentrum</b>, um Ihr Paket zu aktualisieren.",check_for_update:"Suche nach Aktualisierungen...",update_available:"Update verfügbar",update_up_to_date:"Ihre Version ist auf dem neuesten Stand."},update:{version:"Version",update_dsm_release_note:"Versionshinweise"},copyright:{copyright:"Copyright © {0} Synology Inc. Alle Rechte vorbehalten."}};x.default=M,x.texts=M}(dL)),dL}var fL={},dX;function Vwe(){return dX||(dX=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});const M={common:{close:"Bezárás",explore:"Explore",more_products:"More products",sign_in:"Bejelentkezés",data_center:"Data Center",synology_account_settings:"",loading:"Betöltés...",reset:"Visszaállít",custom:"Egyedi",selected:"Kijelölt",pure_colon:":",clean:"Törlés",last_month:"last month",next_month:"next month",no_item:"Nincs elem",create:"Létrehozás",comma:", ",add_field:"Hozzáadás",password_strength:"Strength",password_must:"Jelszókövetelmények",colon:": ",action:"Tevékenység",more:"Egyéb",items_perpage:"Elem oldalanként",refresh:"Frissítés",cancel:"Mégse",commit:"Alkalmaz",setting_applied:"Módosítások alkalmazva.",error_system:"Nem sikerült végrehajtani ezt a műveletet. Jelentkezzen be a(z) _OSNAME_ rendszerbe, majd próbálja meg újra.",search_now_placeholder:"Keresés most",save:"Mentés",terms_of_service:"Szolgáltatási feltételek",privacy_statements:"Adatvédelmi nyilatkozat",password:"Jelszó",apply:"OK",dont_save:"Nincs mentés",confirm_lostchange_without_save:"A változtatások nincsenek mentve. Mentés és kilépés?",delete:"Törlés",hide:"Elrejt",enter_password_to_continue:"Jelszó megadása",enter_user_password:"A folytatáshoz adja meg _OSNAME_-jelszavát.",submit:"Elküld",start:"Indítás",skip:"Ugrás",back:"Vissza",next:"Tovább",enable:"Engedélyezés"},desktop:{window_last_hint:"Ez az ablak utolsó eleme. A Tab billentyű megnyomásával ugorhat az oldal elejére."},personal_settings:{customize_color:"Szín testreszabása"},uicommon:{copy:"Másol",cut:"Kivágás",items:"elem",add_time:"Időpont hozzáadása",schedule_abbre_sun:"Vas",schedule_abbre_mon:"Hét",schedule_abbre_tue:"Ked",schedule_abbre_wed:"Sze",schedule_abbre_thu:"Csü",schedule_abbre_fri:"Pén",schedule_abbre_sat:"Szo",browse:"Böngészés",files_selected:"{0} fájl kijelölve",goto_page:"Ugrás a következő oldalra: {0}",pre_x_pages:"Előző {0} oldal",next_x_pages:"Következő {0} oldal",item:"elem",schedule_sun:"Vasárnap",schedule_mon:"Hétfő",schedule_tue:"Kedd",schedule_wed:"Szerda",schedule_thu:"Csütörtök",schedule_fri:"Péntek",schedule_sat:"Szombat",schedule_daily:"Napi",schedule_weekend:"Hétvége",schedule_weekdays:"Hétköznap",searching:"Keresés..."},extlang:{todayText:"Ma",jan:"Január",feb:"Február",mar:"Március",apr:"Április",may:"Május",jun:"Június",jul:"Július",aug:"Augusztus",sep:"Szeptember",oct:"Október",nov:"November",dec:"December",fieldblank:"A mező kitöltése kötelező.",invaliddate:"{0} nem érvényes dátum. Kérjük, hogy a(z) {1} formátum használatával adjon meg egy dátumot",firstpage:"Első oldal",lastpage:"Utolsó oldal"},error:{error_invalid_min_date:"The date in this field must be equal to or after {0}",error_invalid_max_date:"The date in this field must be equal to or before {0}"},search:{no_search_result:"Nincs találat."},about:{update_package_tip:"A csomag frissítéséhez lépjen a <b>DSM</b> > <b>Csomagkezelési központ</b> menüpontba.",check_for_update:"Frissítések keresése...",update_available:"Frissítés érhető el",update_up_to_date:"Az Ön által használt verzió naprakész."},update:{version:"Verzió",update_dsm_release_note:"Kiadási megjegyzések"},copyright:{copyright:"Copyright © {0} Synology Inc. Minden jog fenntartva."}};x.default=M,x.texts=M}(fL)),fL}var gL={},fX;function Hwe(){return fX||(fX=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});const M={common:{close:"Chiudi",explore:"Esplora",more_products:"Altri prodotti",sign_in:"Accedi",data_center:"Data Center",synology_account_settings:"Gestisci account",loading:"Caricamento...",reset:"Reimposta",custom:"Personalizzato",selected:"Selezionati",pure_colon:":",clean:"Cancella",last_month:"last month",next_month:"next month",no_item:"Nessun elemento",create:"Crea",comma:", ",add_field:"Aggiungi",password_strength:"Strength",password_must:"Requisiti password",colon:": ",action:"Azione",more:"Altro",items_perpage:"Elementi per pagina",refresh:"Aggiorna",cancel:"Annulla",commit:"Applica",setting_applied:"Modifiche applicate.",error_system:"Impossibile eseguire questa operazione. Accedere a _OSNAME_ e riprovare.",search_now_placeholder:"Cerca ora",save:"Salva",terms_of_service:"Termini di servizio",privacy_statements:"Informativa sulla privacy",password:"Password",apply:"OK",dont_save:"Non salvare",confirm_lostchange_without_save:"Le modifiche non sono state salvate. Salvare e uscire?",delete:"Elimina",hide:"Nascondi",enter_password_to_continue:"Inserisci password",enter_user_password:"Inserire la password dell'account _OSNAME_ per continuare.",submit:"Inoltra",start:"Avvio",skip:"Ignora",back:"Indietro",next:"Avanti",enable:"Abilita"},desktop:{window_last_hint:"Questo è l'ultimo elemento nella finestra. Premere Scheda per tornare in alto."},personal_settings:{customize_color:"Personalizza colori"},uicommon:{copy:"Copia",cut:"Taglia",items:"elementi",add_time:"Aggiungi ora",schedule_abbre_sun:"Dom",schedule_abbre_mon:"Lun",schedule_abbre_tue:"Mar",schedule_abbre_wed:"Mer",schedule_abbre_thu:"Gio",schedule_abbre_fri:"Ven",schedule_abbre_sat:"Sab",browse:"Sfoglia",files_selected:"{0} files selezionati",goto_page:"Andare a pagina {0}",pre_x_pages:"Pagine {0} precedenti",next_x_pages:"Pagine {0} successive",item:"elemento",schedule_sun:"Domenica",schedule_mon:"Lunedì",schedule_tue:"Martedì",schedule_wed:"Mercoledì",schedule_thu:"Giovedì",schedule_fri:"Venerdì",schedule_sat:"Sabato",schedule_daily:"Giornaliero",schedule_weekend:"Fine settimana",schedule_weekdays:"Giorni",searching:"Ricerca..."},extlang:{todayText:"Oggi",jan:"Gennaio",feb:"Febbraio",mar:"Marzo",apr:"Aprile",may:"Maggio",jun:"Giugno",jul:"Luglio",aug:"Agosto",sep:"Settembre",oct:"Ottobre",nov:"Novembre",dec:"Dicembre",fieldblank:"Questo campo è necessario.",invaliddate:"{0} non è una data valida. Immettere una data usando il formato {1}",firstpage:"Prima Pagina ",lastpage:"Ultima Pagina "},error:{error_invalid_min_date:"The date in this field must be equal to or after {0}",error_invalid_max_date:"The date in this field must be equal to or before {0}"},search:{no_search_result:"Nessuna corrispondenza trovata."},about:{update_package_tip:"Andare su <b>DSM</b> > <b>Centro pacchetti</b> per aggiornare il pacchetto.",check_for_update:"Controllo aggiornamenti in corso...",update_available:"Aggiornamento disponibile",update_up_to_date:"La versione è aggiornata."},update:{version:"Versione",update_dsm_release_note:"Note sulla versione"},copyright:{copyright:"Copyright © {0} Synology Inc. Tutti i diritti riservati."}};x.default=M,x.texts=M}(gL)),gL}var pL={},gX;function $we(){return gX||(gX=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});const M={common:{close:"閉じる",explore:"エクスプローラ",more_products:"その他の製品",sign_in:"サイン イン",data_center:"データ センター",synology_account_settings:"アカウントの管理",loading:"ロード中...",reset:"リセット",custom:"カスタム",selected:"選択済み",pure_colon:":",clean:"クリア",last_month:"last month",next_month:"next month",no_item:"アイテムなし",create:"作成",comma:"、",add_field:"追加",password_strength:"Strength",password_must:"パスワード要件",colon:":",action:"操作",more:"詳細",items_perpage:"項目/ページ",refresh:"最新の情報に更新",cancel:"キャンセル",commit:"適用",setting_applied:"変更を適用しました。",error_system:"この操作は実行できません。_OSNAME_ にサイン インし、再試行してください。",search_now_placeholder:"今すぐ検索",save:"保存",terms_of_service:"使用規約",privacy_statements:"プライバシーに関する声明",password:"パスワード",apply:"OK",dont_save:"保存しない",confirm_lostchange_without_save:"変更が保存されていません。保存して終了しますか?",delete:"削除",hide:"非表示",enter_password_to_continue:"パスワードの入力",enter_user_password:"続行するには、_OSNAME_ アカウントのパスワードを入力してください。",submit:"送信",start:"起動",skip:"スキップ",back:"戻る",next:"次へ",enable:"有効"},desktop:{window_last_hint:"これが画面で最後のエレメントです。Tab を押すとトップに戻ります。"},personal_settings:{customize_color:"色をカスタマイズ"},uicommon:{copy:"コピー",cut:"切り取り",items:"アイテム",add_time:"時間を追加",schedule_abbre_sun:"日",schedule_abbre_mon:"月",schedule_abbre_tue:"火",schedule_abbre_wed:"水",schedule_abbre_thu:"木",schedule_abbre_fri:"金",schedule_abbre_sat:"土",browse:"参照",files_selected:"{0} ファイルが選択されました",goto_page:" {0} ページに進んでください",pre_x_pages:"前の {0} ページ",next_x_pages:"次の {0} ページ",item:"アイテム",schedule_sun:"日曜日",schedule_mon:"月曜日",schedule_tue:"火曜日",schedule_wed:"水曜日",schedule_thu:"木曜日",schedule_fri:"金曜日",schedule_sat:"土曜日",schedule_daily:"毎日",schedule_weekend:"ウィークエンド",schedule_weekdays:"平日",searching:"検索中..."},extlang:{todayText:"本日",jan:"1月",feb:"2月",mar:"3月",apr:"4月",may:"5月",jun:"6月",jul:"7月",aug:"8月",sep:"9月",oct:"10月",nov:"11月",dec:"12月",fieldblank:"必須フィールド",invaliddate:"{0} は有効な日付ではありません。{1} のフォーマットで日付を入力してください。",firstpage:"最初のページ",lastpage:"最後のページ"},error:{error_invalid_min_date:"The date in this field must be equal to or after {0}",error_invalid_max_date:"The date in this field must be equal to or before {0}"},search:{no_search_result:"一致する結果はありません。"},about:{update_package_tip:"<b>DSM</b> > <b>パッケージ センター</b>に進みパッケージをアップデートしてください。",check_for_update:"アップデート確認中…",update_available:"アップデートがあります",update_up_to_date:"バージョンは最新です。"},update:{version:"バージョン",update_dsm_release_note:"Release notes"},copyright:{copyright:"Copyright © {0} Synology Inc. 全著作権所有。"}};x.default=M,x.texts=M}(pL)),pL}var mL={},pX;function zwe(){return pX||(pX=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});const M={common:{close:"종료",explore:"탐색",more_products:"더 많은 제품",sign_in:"로그인",data_center:"데이터 센터",synology_account_settings:"계정 관리",loading:"로드 중…",reset:"재설정",custom:"사용자 지정",selected:"선택됨",pure_colon:":",clean:"정리",last_month:"last month",next_month:"next month",no_item:"항목 없음",create:"생성",comma:", ",add_field:"추가",password_strength:"Strength",password_must:"패스워드 요구 사항",colon:": ",action:"작업",more:"자세히",items_perpage:"페이지당 항목 수",refresh:"새로 고침",cancel:"취소",commit:"적용",setting_applied:"변경 사항이 적용되었습니다.",error_system:"이 작업을 수행할 수 없습니다. _OSNAME_에 로그인한 후 다시 시도하십시오.",search_now_placeholder:"지금 검색",save:"저장",terms_of_service:"이용 약관",privacy_statements:"개인 정보 보호 방침",password:"패스워드",apply:"확인",dont_save:"저장하지 않음",confirm_lostchange_without_save:"변경 사항이 저장되지 않았습니다. 저장하고 나가시겠습니까?",delete:"삭제",hide:"숨기기",enter_password_to_continue:"패스워드 입력",enter_user_password:"계속하려면 _OSNAME_ 계정의 패스워드를 입력하십시오.",submit:"제출",start:"시작",skip:"건너뛰기",back:"뒤로",next:"다음",enable:"활성화"},desktop:{window_last_hint:"이것은 창의 마지막 요소입니다. Tab을 눌러 맨 위로 돌아갑니다."},personal_settings:{customize_color:"색상 사용자 지정"},uicommon:{copy:"복사",cut:"잘라내기",items:"개 항목",add_time:"시간 추가",schedule_abbre_sun:"일",schedule_abbre_mon:"월",schedule_abbre_tue:"화",schedule_abbre_wed:"수",schedule_abbre_thu:"목",schedule_abbre_fri:"금",schedule_abbre_sat:"토",browse:"찾아보기",files_selected:"파일 {0}개를 선택함",goto_page:"{0}페이지로 이동",pre_x_pages:"이전 {0} 페이지",next_x_pages:"다음 {0} 페이지",item:"개 항목",schedule_sun:"일요일",schedule_mon:"월요일",schedule_tue:"화요일",schedule_wed:"수요일",schedule_thu:"목요일",schedule_fri:"금요일",schedule_sat:"토요일",schedule_daily:"매일",schedule_weekend:"주말",schedule_weekdays:"요일",searching:"검색 중..."},extlang:{todayText:"오늘",jan:"1월",feb:"2월",mar:"3월",apr:"4월",may:"5월",jun:"6월",jul:"7월",aug:"8월",sep:"9월",oct:"10월",nov:"11월",dec:"12월",fieldblank:"이 필드는 필수 필드입니다.",invaliddate:"{0}은(는) 유효한 날짜가 아닙니다. {1} 형식을 사용하여 날짜를 입력하십시오.",firstpage:"첫번째 페이지",lastpage:"마지막 페이지"},error:{error_invalid_min_date:"The date in this field must be equal to or after {0}",error_invalid_max_date:"The date in this field must be equal to or before {0}"},search:{no_search_result:"일치하는 항목이 없습니다."},about:{update_package_tip:"패키지를 업데이트하려면 <b>DSM</b> > <b>패키지 센터</b>로 이동합니다.",check_for_update:"업데이트 확인 중...",update_available:"업데이트 사용 가능",update_up_to_date:"버전이 최신 상태입니다."},update:{version:"버전",update_dsm_release_note:"릴리스 노트"},copyright:{copyright:"저작권 © {0} Synology Inc. 모든 권리 보유."}};x.default=M,x.texts=M}(mL)),mL}var vL={},mX;function Wwe(){return mX||(mX=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});const M={common:{close:"Sluiten",explore:"Explore",more_products:"More products",sign_in:"Aanmelden",data_center:"Data Center",synology_account_settings:"",loading:"Bezig met laden…",reset:"Herstellen",custom:"Aangepast",selected:"Geselecteerd",pure_colon:":",clean:"Wissen",last_month:"last month",next_month:"next month",no_item:"Geen items",create:"Maken",comma:", ",add_field:"Toevoegen",password_strength:"Strength",password_must:"Vereisten wachtwoord",colon:": ",action:"Actie",more:"Meer",items_perpage:"Onderwerpen per pagina",refresh:"Vernieuwen",cancel:"Annuleren",commit:"Toepassen",setting_applied:"Wijzigingen toegepast.",error_system:"Kan deze bewerking niet uitvoeren. Meld u aan bij _OSNAME_ en probeer het opnieuw.",search_now_placeholder:"Nu zoeken",save:"Opslaan",terms_of_service:"Servicevoorwaarden",privacy_statements:"Privacyverklaring",password:"Wachtwoord",apply:"OK",dont_save:"Niet opslaan",confirm_lostchange_without_save:"De wijzigingen zijn niet opgeslagen. Opslaan en afsluiten?",delete:"Verwijderen",hide:"Verbergen",enter_password_to_continue:"Voer wachtwoord in",enter_user_password:"Voer het wachtwoord in van uw _OSNAME_-account om door te gaan.",submit:"Verzenden",start:"Starten",skip:"Overslaan",back:"Terug",next:"Volgende",enable:"Inschakelen"},desktop:{window_last_hint:"Dit is het laatste element in het venster. Druk op Tab om naar het begin te gaan."},personal_settings:{customize_color:"Kleur aanpassen"},uicommon:{copy:"Kopiëren",cut:"Knippen",items:"items",add_time:"Tijd toevoegen",schedule_abbre_sun:"Zon",schedule_abbre_mon:"Ma",schedule_abbre_tue:"Di",schedule_abbre_wed:"Woe",schedule_abbre_thu:"Do",schedule_abbre_fri:"Vrij",schedule_abbre_sat:"Zat",browse:"Bladeren",files_selected:"{0} bestanden geselecteerd",goto_page:"Ga naar pagina {0}",pre_x_pages:"Vorige {0} pagina's",next_x_pages:"Volgende {0} pagina's",item:"item",schedule_sun:"Zondag",schedule_mon:"Maandag",schedule_tue:"Dinsdag",schedule_wed:"Woensdag",schedule_thu:"Donderdag",schedule_fri:"Vrijdag",schedule_sat:"Zaterdag",schedule_daily:"Dagelijks",schedule_weekend:"Weekend",schedule_weekdays:"Weekdagen",searching:"Bezig met zoeken…"},extlang:{todayText:"Vandaag",jan:"Januari",feb:"Februari",mar:"Maart",apr:"April",may:"Mei",jun:"Juni",jul:"Juli",aug:"Augustus",sep:"September",oct:"Oktober",nov:"November",dec:"December",fieldblank:"Dit veld is vereist",invaliddate:"{0} is geen geldige datum. Voer een datum in met de indeling {1}",firstpage:"Eerste pagina",lastpage:"Laatste pagina"},error:{error_invalid_min_date:"The date in this field must be equal to or after {0}",error_invalid_max_date:"The date in this field must be equal to or before {0}"},search:{no_search_result:"Geen overeenkomst gevonden."},about:{update_package_tip:"Ga naar <b>DSM</b> > <b>Package Center</b> om het pakket bij te werken.",check_for_update:"Bezig met controleren op updates...",update_available:"Update beschikbaar",update_up_to_date:"Uw versie is bijgewerkt."},update:{version:"Versie",update_dsm_release_note:"Release-informatie"},copyright:{copyright:"Auteursrechten © {0} Synology Inc. Alle rechten voorbehouden."}};x.default=M,x.texts=M}(vL)),vL}var yL={},vX;function Uwe(){return vX||(vX=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});const M={common:{close:"Lukk",explore:"Explore",more_products:"More products",sign_in:"Logg deg på",data_center:"Data Center",synology_account_settings:"",loading:"Laster...",reset:"Tilbakestill",custom:"Egendefinert",selected:"Valgt",pure_colon:":",clean:"Fjern",last_month:"last month",next_month:"next month",no_item:"Ingen elementer",create:"Opprett",comma:", ",add_field:"Legg til",password_strength:"Strength",password_must:"Krav til passord",colon:": ",action:"Handling",more:"Mer",items_perpage:"Elementer per side",refresh:"Oppdater",cancel:"Avbryt",commit:"Bruk",setting_applied:"Endringer er tatt i bruk.",error_system:"Kan ikke utføre denne handlingen. Logg på _OSNAME_ og prøv igjen.",search_now_placeholder:"Søk nå",save:"Lagre",terms_of_service:"Vilkår for tjenesten",privacy_statements:"Personvernsmelding",password:"Passord",apply:"OK",dont_save:"Ikke lagre",confirm_lostchange_without_save:"Endringene er ikke lagret. Vil du lagre og avslutte?",delete:"Slett",hide:"Skjul",enter_password_to_continue:"Angi passord",enter_user_password:"Angi passordet for din _OSNAME_-konto for å fortsette.",submit:"Send inn",start:"Start",skip:"Hopp over",back:"Tilbake",next:"Neste",enable:"Aktiver"},desktop:{window_last_hint:"Dette er det siste elementet i vinduet. Trykk på tabulatortasten for å gå tilbake til toppen."},personal_settings:{customize_color:"Tilpass farge"},uicommon:{copy:"Kopier",cut:"Klipp ut",items:"elementer",add_time:"Legg til tidspunkt",schedule_abbre_sun:"Søn",schedule_abbre_mon:"Man",schedule_abbre_tue:"Tir",schedule_abbre_wed:"Ons",schedule_abbre_thu:"Tor",schedule_abbre_fri:"Fre",schedule_abbre_sat:"Lør",browse:"Bla gjennom",files_selected:"{0} filer valgt",goto_page:"Gå til side {0}",pre_x_pages:"Forrige {0} sider",next_x_pages:"Neste {0} sider",item:"element",schedule_sun:"Søndag",schedule_mon:"Mandag",schedule_tue:"Tirsdag",schedule_wed:"Onsdag",schedule_thu:"Torsdag",schedule_fri:"Fredag",schedule_sat:"Lørdag",schedule_daily:"Daglig",schedule_weekend:"Helg",schedule_weekdays:"Ukedager",searching:"Søker..."},extlang:{todayText:"I dag",jan:"Januar",feb:"Februar",mar:"Mars",apr:"April",may:"Mai",jun:"Juni",jul:"Juli",aug:"August",sep:"September",oct:"Oktober",nov:"November",dec:"Desember",fieldblank:"Denne filen er nødvendig.",invaliddate:"{0} er ikke en gyldig dato. Angi en dato med formatet {1}",firstpage:"Første side",lastpage:"Siste side"},error:{error_invalid_min_date:"The date in this field must be equal to or after {0}",error_invalid_max_date:"The date in this field must be equal to or before {0}"},search:{no_search_result:"Ingen match ble funnet."},about:{update_package_tip:"Gå til <b>DSM</b> > <b>Pakkesenter</b> for å oppdatere pakken din.",check_for_update:"Ser etter oppdateringer ...",update_available:"Oppdatering tilgjengelig",update_up_to_date:"Versjonen din er oppdatert."},update:{version:"Versjon",update_dsm_release_note:"Versjonsmerknader"},copyright:{copyright:"Copyright © {0} Synology Inc. Med enerett."}};x.default=M,x.texts=M}(yL)),yL}var wL={},yX;function Gwe(){return yX||(yX=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});const M={common:{close:"Zamknij",explore:"Explore",more_products:"More products",sign_in:"Zaloguj się",data_center:"Data Center",synology_account_settings:"",loading:"Ładowanie…",reset:"Resetuj",custom:"Niestandardowy",selected:"Wybrane",pure_colon:":",clean:"Wyczyść",last_month:"last month",next_month:"next month",no_item:"Brak elementów",create:"Utwórz",comma:", ",add_field:"Dodaj",password_strength:"Strength",password_must:"Wymagania dotyczące hasła",colon:": ",action:"Akcja",more:"Więcej",items_perpage:"Pozycji na stronę",refresh:"Odśwież",cancel:"Anuluj",commit:"Zastosuj",setting_applied:"Zastosowano zmiany.",error_system:"Nie można wykonać tej operacji. Zaloguj się do _OSNAME_ i ponów próbę.",search_now_placeholder:"Wyszukaj teraz",save:"Zapisz",terms_of_service:"Warunki świadczenia usługi",privacy_statements:"Oświadczenie o prywatności",password:"Hasło",apply:"OK",dont_save:"Nie zapisuj",confirm_lostchange_without_save:"Zmiany nie zostały zapisane. Czy chcesz zapisać i wyjść?",delete:"Usuń",hide:"Ukryj",enter_password_to_continue:"Wprowadź hasło",enter_user_password:"Wprowadź hasło konta _OSNAME_, aby kontynuować.",submit:"Wyślij",start:"Uruchom",skip:"Pomiń",back:"Wstecz",next:"Następne",enable:"Włącz"},desktop:{window_last_hint:"Jest to ostatni element w oknie. Naciśnij klawisz Tab, aby powrócić do góry."},personal_settings:{customize_color:"Dostosuj kolor"},uicommon:{copy:"Kopiuj",cut:"Wytnij",items:"elementy/-ów",add_time:"Dodaj godzinę",schedule_abbre_sun:"Niedz.",schedule_abbre_mon:"Pon",schedule_abbre_tue:"Wt",schedule_abbre_wed:"Śr",schedule_abbre_thu:"Czw.",schedule_abbre_fri:"Pt",schedule_abbre_sat:"Sob.",browse:"Przeglądaj",files_selected:"Wybrane pliki: {0}",goto_page:"Przejdź do strony {0}",pre_x_pages:"Poprzednie {0} stron",next_x_pages:"Następne {0} stron",item:"element",schedule_sun:"Niedziela",schedule_mon:"Poniedziałek",schedule_tue:"Wtorek",schedule_wed:"Środa",schedule_thu:"Czwartek",schedule_fri:"Piątek",schedule_sat:"Sobota",schedule_daily:"Codziennie",schedule_weekend:"Weekend",schedule_weekdays:"Dni tygodnia",searching:"Szukanie…"},extlang:{todayText:"Dzisiaj",jan:"Styczeń",feb:"Luty",mar:"Marzec",apr:"Kwiecień",may:"Maj",jun:"Czerwiec",jul:"Lipiec",aug:"Sierpień",sep:"Wrzesień",oct:"Październik",nov:"Listopad",dec:"Grudzień",fieldblank:"To pole jest wymagane.",invaliddate:"{0} to nieprawidłowa data. Wprowadź datę w formacie {1}",firstpage:"Pierwsza strona",lastpage:"Ostatnia strona"},error:{error_invalid_min_date:"The date in this field must be equal to or after {0}",error_invalid_max_date:"The date in this field must be equal to or before {0}"},search:{no_search_result:"Nie znaleziono dopasowania."},about:{update_package_tip:"Przejdź do systemu <b>DSM</b> > <b>Centrum Pakietów</b>, aby naprawić pakiet.",check_for_update:"Sprawdzanie dostępności aktualizacji...",update_available:"Dostępna aktualizacja",update_up_to_date:"Twoja wersja jest aktualna."},update:{version:"Wersja",update_dsm_release_note:"Informacje o wydaniu"},copyright:{copyright:"Copyright © {0} Synology Inc. Wszelkie prawa zastrzeżone."}};x.default=M,x.texts=M}(wL)),wL}var bL={},wX;function jwe(){return wX||(wX=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});const M={common:{close:"Fechar",explore:"Explore",more_products:"More products",sign_in:"Login",data_center:"Data Center",synology_account_settings:"",loading:"Carregando...",reset:"Redefinir",custom:"Personalização ",selected:"Selecionado",pure_colon:":",clean:"Limpar",last_month:"last month",next_month:"next month",no_item:"Não há itens",create:"Criar",comma:", ",add_field:"Adicionar",password_strength:"Strength",password_must:"Requisitos de senha",colon:": ",action:"Ação",more:"Mais",items_perpage:"Itens por página",refresh:"Atualizar",cancel:"Cancelar",commit:"Aplicar",setting_applied:"Alterações aplicadas.",error_system:"Não é possível executar esta operação. Faça login em _OSNAME_ e tente novamente.",search_now_placeholder:"Pesquisar agora",save:"Salvar",terms_of_service:"Termos de serviço",privacy_statements:"Declaração de privacidade",password:"Senha",apply:"OK",dont_save:"Não Salvar",confirm_lostchange_without_save:"As alterações não foram salvas. Deseja salvar e sair?",delete:"Excluir",hide:"Ocultar",enter_password_to_continue:"Digitar senha",enter_user_password:"Digite a senha da sua conta do _OSNAME_ para continuar.",submit:"Enviar",start:"Iniciar",skip:"Ignorar",back:"Voltar",next:"Avançar",enable:"Ativar"},desktop:{window_last_hint:"Esse é o último elemento na janela. Pressione Tab para voltar à parte superior."},personal_settings:{customize_color:"Personalizar cor"},uicommon:{copy:"Copiar",cut:"Recortar",items:"itens",add_time:"Adicionar hora",schedule_abbre_sun:"Dom",schedule_abbre_mon:"Seg",schedule_abbre_tue:"Ter",schedule_abbre_wed:"Qua",schedule_abbre_thu:"Qui",schedule_abbre_fri:"Sex",schedule_abbre_sat:"Sáb",browse:"Procurar",files_selected:"{0} arquivos selecionados",goto_page:"Vá para a Página {0}",pre_x_pages:"{0} páginas anteriores",next_x_pages:"{0} páginas seguintes",item:"item",schedule_sun:"Domingo",schedule_mon:"Segunda-feira",schedule_tue:"Terça-feira",schedule_wed:"Quarta-feira",schedule_thu:"Quinta-feira",schedule_fri:"Sexta-feira",schedule_sat:"Sábado",schedule_daily:"Diariamente",schedule_weekend:"Fim de semana",schedule_weekdays:"Dias da semana",searching:"Pesquisando..."},extlang:{todayText:"Hoje",jan:"Janeiro",feb:"Fevereiro",mar:"Março",apr:"Abril",may:"Maio",jun:"Junho",jul:"Julho",aug:"Agosto",sep:"Setembro",oct:"Outubro",nov:"Novembro",dec:"Dezembro",fieldblank:"Este campo é obrigatório.",invaliddate:"{0} não é uma data válida. Insira uma data usando o formato {1}",firstpage:"Primeira página",lastpage:"Última página"},error:{error_invalid_min_date:"The date in this field must be equal to or after {0}",error_invalid_max_date:"The date in this field must be equal to or before {0}"},search:{no_search_result:"Nenhuma combinação encontrada."},about:{update_package_tip:"Acesse <b>DSM</b> > <b>Centro de pacotes</b> para atualizar o pacote.",check_for_update:"Verificando atualizações...",update_available:"Atualização disponível",update_up_to_date:"Sua versão está atualizada."},update:{version:"Versão",update_dsm_release_note:"Notas de versão"},copyright:{copyright:"Copyright © {0} Synology Inc. Todos os direitos reservados."}};x.default=M,x.texts=M}(bL)),bL}var CL={},bX;function qwe(){return bX||(bX=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});const M={common:{close:"Fechar",explore:"Explore",more_products:"More products",sign_in:"Iniciar sessão",data_center:"Data Center",synology_account_settings:"",loading:"A carregar...",reset:"Repor",custom:"Personalização",selected:"Selecionado",pure_colon:":",clean:"Limpar",last_month:"last month",next_month:"next month",no_item:"Sem itens",create:"Criar",comma:", ",add_field:"Adicionar",password_strength:"Strength",password_must:"Requisitos de palavra-passe",colon:": ",action:"Ação",more:"Mais",items_perpage:"Itens por página",refresh:"Actualizar",cancel:"Cancelar",commit:"Aplicar",setting_applied:"Alterações aplicadas.",error_system:"Não é possível executar esta operação. Inicie sessão no _OSNAME_ e tente novamente.",search_now_placeholder:"Procurar agora",save:"Guardar ",terms_of_service:"Termos do Serviço",privacy_statements:"Declaração de Privacidade",password:"Palavra-passe",apply:"OK",dont_save:"Não Guardar",confirm_lostchange_without_save:"As alterações não foram guardadas. Pretende guardar e sair?",delete:"Eliminar",hide:"Ocultar",enter_password_to_continue:"Introduza palavra-passe",enter_user_password:"Introduza a palavra-passe da sua conta _OSNAME_ para continuar.",submit:"Submeter",start:"Iniciar",skip:"Avançar",back:"Voltar",next:"Seguinte",enable:"Ativar"},desktop:{window_last_hint:"Este é o último elemento na janela. Prima a tecla Tab para regressar ao topo."},personal_settings:{customize_color:"Personalizar cor"},uicommon:{copy:"Copiar",cut:"Cortar",items:"itens",add_time:"Adicionar hora",schedule_abbre_sun:"Dom",schedule_abbre_mon:"Seg",schedule_abbre_tue:"Ter",schedule_abbre_wed:"Qua",schedule_abbre_thu:"Qui",schedule_abbre_fri:"Sex",schedule_abbre_sat:"Sáb",browse:"Pesquisar",files_selected:"{0} ficheiros selecionados",goto_page:"Ir para página {0}",pre_x_pages:"{0} páginas anteriores",next_x_pages:"{0} páginas seguintes",item:"item",schedule_sun:"Domingo",schedule_mon:"Segunda-feira",schedule_tue:"Terça-feira",schedule_wed:"Quarta-feira",schedule_thu:"Quinta-feira",schedule_fri:"Sexta-feira",schedule_sat:"Sábado",schedule_daily:"Diariamente",schedule_weekend:"Fim-de-semana",schedule_weekdays:"Dias da semana",searching:"A procurar…"},extlang:{todayText:"Hoje",jan:"Janeiro",feb:"Fevereiro",mar:"Março ",apr:"Abril",may:"Maio",jun:"Junho",jul:"Julho",aug:"Agosto",sep:"Setembro",oct:"Outubro",nov:"Novembro",dec:"Dezembro",fieldblank:"Este campo é necessário.",invaliddate:"{0} não é uma data válida. Introduza uma data utilizando o formato {1}",firstpage:"Primeira página",lastpage:"Última página"},error:{error_invalid_min_date:"The date in this field must be equal to or after {0}",error_invalid_max_date:"The date in this field must be equal to or before {0}"},search:{no_search_result:"Não foi encontrada nenhuma correspondência."},about:{update_package_tip:"Aceda a <b>DSM</b> > <b>Centro de pacotes</b> para atualizar o pacote.",check_for_update:"A verificar atualizações...",update_available:"Atualização disponível",update_up_to_date:"A sua versão está atualizada."},update:{version:"Versão",update_dsm_release_note:"Notas de versão"},copyright:{copyright:"Copyright © {0} Synology Inc. Todos os direitos reservados."}};x.default=M,x.texts=M}(CL)),CL}var _L={},CX;function Ywe(){return CX||(CX=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});const M={common:{close:"Закрыть",explore:"Категории пакетов",more_products:"Больше продуктов",sign_in:"Войти",data_center:"Центр обработки данных",synology_account_settings:"Управление аккаунтом",loading:"Загрузка...",reset:"Сброс",custom:"Настройка",selected:"Выбрано",pure_colon:":",clean:"Очистить",last_month:"last month",next_month:"next month",no_item:"Нет элементов",create:"Создать",comma:", ",add_field:"Добавить",password_strength:"Strength",password_must:"Требования к паролю",colon:": ",action:"Действие",more:"Подробнее",items_perpage:"Кол-во элементов на стр.",refresh:"Обновить",cancel:"Отмена",commit:"Применить",setting_applied:"Изменения применены.",error_system:"Не удается выполнить эту операцию. Выполните вход в _OSNAME_ и повторите попытку.",search_now_placeholder:"Найти сейчас",save:"Сохранить",terms_of_service:"Условия использования",privacy_statements:"Положение о конфиденциальности",password:"Пароль",apply:"OK",dont_save:"Не сохранять",confirm_lostchange_without_save:"Изменения не сохранены. Сохранить изменения и выйти?",delete:"Удалить",hide:"Скрыть",enter_password_to_continue:"Введите пароль",enter_user_password:"Введите пароль учетной записи _OSNAME_, чтобы продолжить.",submit:"Отправить",start:"Пуск",skip:"Пропустить",back:"Назад",next:"Далее",enable:"Включить"},desktop:{window_last_hint:"Это последний элемент в окне. Нажмите клавишу Tab для возврата наверх."},personal_settings:{customize_color:"Настроить цвет"},uicommon:{copy:"Копировать",cut:"Вырезать",items:"элем.",add_time:"Добавить время",schedule_abbre_sun:"Вс",schedule_abbre_mon:"Пн",schedule_abbre_tue:"Вт",schedule_abbre_wed:"Ср",schedule_abbre_thu:"Чт",schedule_abbre_fri:"Пт",schedule_abbre_sat:"Сб",browse:"Обзор",files_selected:"Выбрано файлов: {0}",goto_page:"Перейти на страницу {0}",pre_x_pages:"Предыдущие {0} страниц",next_x_pages:"Следующие {0} страниц",item:"элемент",schedule_sun:"Воскресенье",schedule_mon:"Понедельник",schedule_tue:"Вторник",schedule_wed:"Среда",schedule_thu:"Четверг",schedule_fri:"Пятница",schedule_sat:"Суббота",schedule_daily:"Ежедневно",schedule_weekend:"Выходной",schedule_weekdays:"Дни недели",searching:"Поиск..."},extlang:{todayText:"Сегодня",jan:"Январь",feb:"Февраль",mar:"Март",apr:"Апрель",may:"Май",jun:"Июнь",jul:"Июль",aug:"Август",sep:"Сентябрь",oct:"Октябрь",nov:"Ноябрь",dec:"Декабрь",fieldblank:"Данное поле должно быть заполнено.",invaliddate:"{0} является недопустимой датой. Введите дату в формате {1}",firstpage:"Первая страница",lastpage:"Последняя страница"},error:{error_invalid_min_date:"The date in this field must be equal to or after {0}",error_invalid_max_date:"The date in this field must be equal to or before {0}"},search:{no_search_result:"Совпадений не найдено."},about:{update_package_tip:"Чтобы обновить пакет, перейдите в <b>DSM</b> > <b>Центр пакетов</b>.",check_for_update:"Проверка наличия обновлений...",update_available:"Доступно обновление",update_up_to_date:"У вас последняя версия."},update:{version:"Версия",update_dsm_release_note:"Заметки о выпуске"},copyright:{copyright:"© Synology Inc., {0}. Все права защищены."}};x.default=M,x.texts=M}(_L)),_L}var SL={},_X;function Kwe(){return _X||(_X=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});const M={common:{close:"Cerrar",explore:"Explorar",more_products:"Más productos",sign_in:"Iniciar sesión",data_center:"Centro de datos",synology_account_settings:"Administrar cuenta",loading:"Cargando...",reset:"Restablecer",custom:"Personalizado",selected:"Seleccionado",pure_colon:":",clean:"Borrar",last_month:"last month",next_month:"next month",no_item:"No hay elementos",create:"Crear",comma:", ",add_field:"Agregar",password_strength:"Strength",password_must:"Requisitos de la contraseña",colon:": ",action:"Acción",more:"Más",items_perpage:"Elementos por página",refresh:"Actualizar",cancel:"Cancelar",commit:"Aplicar",setting_applied:"Cambios aplicados.",error_system:"No se puede realizar esta operación. Inicie sesión en _OSNAME_ y vuelva a intentarlo.",search_now_placeholder:"Buscar ahora",save:"Guardar",terms_of_service:"Condiciones de servicio",privacy_statements:"Declaración de privacidad",password:"Contraseña",apply:"OK",dont_save:"No guardar",confirm_lostchange_without_save:"No se han guardado los cambios. ¿Desea guardar y salir?",delete:"Eliminar",hide:"Ocultar",enter_password_to_continue:"Introducir contraseña",enter_user_password:"Introduzca la contraseña de su cuenta _OSNAME_ para continuar.",submit:"Enviar",start:"Iniciar",skip:"Omitir",back:"Anterior",next:"Siguiente",enable:"Habilitar"},desktop:{window_last_hint:"Este es el último elemento de la ventana. Pulse la tecla TAB para volver a la parte superior."},personal_settings:{customize_color:"Personalizar color"},uicommon:{copy:"Copiar",cut:"Cortar",items:"elementos",add_time:"Agregar hora",schedule_abbre_sun:"Dom",schedule_abbre_mon:"Lun",schedule_abbre_tue:"Mar",schedule_abbre_wed:"Mié",schedule_abbre_thu:"Jue",schedule_abbre_fri:"Vie",schedule_abbre_sat:"Sáb",browse:"Examinar",files_selected:"{0} archivos seleccionados",goto_page:"Ir a la página {0}",pre_x_pages:"{0} páginas anteriores",next_x_pages:"Siguientes {0} páginas",item:"elemento",schedule_sun:"Domingo",schedule_mon:"Lunes",schedule_tue:"Martes",schedule_wed:"Miércoles",schedule_thu:"Jueves",schedule_fri:"Viernes",schedule_sat:"Sábado",schedule_daily:"Cada día",schedule_weekend:"Fin de semana",schedule_weekdays:"Días laborables",searching:"Buscando..."},extlang:{todayText:"Hoy",jan:"Enero",feb:"Febrero",mar:"Marzo",apr:"Abril",may:"Mayo",jun:"Junio",jul:"Julio",aug:"Agosto",sep:"Septiembre",oct:"Octubre",nov:"Noviembre",dec:"Diciembre",fieldblank:"Este campo es obligatorio.",invaliddate:"{0} no es una fecha válida. Introduzca una fecha utilizando el formato {1}",firstpage:"Primera página",lastpage:"Última página"},error:{error_invalid_min_date:"The date in this field must be equal to or after {0}",error_invalid_max_date:"The date in this field must be equal to or before {0}"},search:{no_search_result:"No se encuentra ninguna coincidencia."},about:{update_package_tip:"Vaya a <b>DSM</b> > <b>Centro de paquetes</b> para actualizar el paquete.",check_for_update:"Buscando actualizaciones...",update_available:"Actualización disponible",update_up_to_date:"Su versión está actualizada."},update:{version:"Versión",update_dsm_release_note:"Notas de la versión"},copyright:{copyright:"Copyright © {0}, Synology Inc. Todos los derechos reservados."}};x.default=M,x.texts=M}(SL)),SL}var IL={},SX;function Xwe(){return SX||(SX=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});const M={common:{close:"Stäng",explore:"Explore",more_products:"More products",sign_in:"Logga in",data_center:"Data Center",synology_account_settings:"",loading:"Laddar...",reset:"Återställ",custom:"Anpassad",selected:"Valt",pure_colon:":",clean:"Rensa",last_month:"last month",next_month:"next month",no_item:"Inga objekt",create:"Skapa",comma:", ",add_field:"Lägg till",password_strength:"Strength",password_must:"Krav på lösenord",colon:": ",action:"Åtgärd",more:"Mer ",items_perpage:"Poster per sida",refresh:"Uppdatera",cancel:"Avbryt",commit:"Tillämpa",setting_applied:"Ändringarna har tillämpats.",error_system:"Det går inte att utföra den här åtgärden. Logga in på _OSNAME_ och försök igen.",search_now_placeholder:"Sök nu",save:"Spara",terms_of_service:"Användarvillkor",privacy_statements:"Integritetspolicy",password:"Lösenord",apply:"OK",dont_save:"Spara inte",confirm_lostchange_without_save:"Ändringarna sparas inte. Vill du spara och lämna?",delete:"Radera",hide:"Dölj",enter_password_to_continue:"Ange lösenord",enter_user_password:"Vänligen ange lösenordet för ditt _OSNAME_-konto för att fortsätta.",submit:"Skicka",start:"Starta",skip:"Hoppa",back:"Bakåt",next:"Nästa",enable:"Aktivera"},desktop:{window_last_hint:"Det här är det sista elementen i fönstret. Tryck på Tab för att återgå högst upp."},personal_settings:{customize_color:"Anpassa färg"},uicommon:{copy:"Kopiera",cut:"Klipp ut",items:"objekt",add_time:"Lägg till tid",schedule_abbre_sun:"Sön",schedule_abbre_mon:"Mån ",schedule_abbre_tue:"Tis ",schedule_abbre_wed:"Ons ",schedule_abbre_thu:"Tor",schedule_abbre_fri:"Fre",schedule_abbre_sat:"Lör",browse:"Bläddra",files_selected:"{0} filer valda",goto_page:"Gå till sidan {0}",pre_x_pages:"Föregående {0} sidor",next_x_pages:"Nästa {0} sidor",item:"objekt",schedule_sun:"Söndag",schedule_mon:"Måndag",schedule_tue:"Tisdag",schedule_wed:"Onsdag",schedule_thu:"Torsdag",schedule_fri:"Fredag",schedule_sat:"Lördag",schedule_daily:"Varje dag",schedule_weekend:"Helg ",schedule_weekdays:"veckodagar",searching:"Söker..."},extlang:{todayText:"Idag",jan:"januari",feb:"februari",mar:"mars",apr:"april",may:"maj",jun:"juni",jul:"juli",aug:"augusti",sep:"september",oct:"oktober",nov:"november",dec:"december",fieldblank:"Det här fältet krävs.",invaliddate:"{0} är inte ett giltigt datum. Vänligen ange ett datum med formatet {1}",firstpage:"Första sidan",lastpage:"Sista sidan"},error:{error_invalid_min_date:"The date in this field must be equal to or after {0}",error_invalid_max_date:"The date in this field must be equal to or before {0}"},search:{no_search_result:"Inga träffar."},about:{update_package_tip:"Gå till <b>DSM</b> > <b>Paketcenter</b> för att uppdatera paketet.",check_for_update:"Kontrollerar om det finns uppdateringar...",update_available:"Uppdatering tillgänglig",update_up_to_date:"Din version är uppdaterad."},update:{version:"Version",update_dsm_release_note:"Versionsinformation"},copyright:{copyright:"Upphovsrätt © {0} Synology Inc. Med ensamrätt."}};x.default=M,x.texts=M}(IL)),IL}var xL={},IX;function Jwe(){return IX||(IX=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});const M={common:{close:"ปิด",explore:"Explore",more_products:"More products",sign_in:"ลงชื่อเข้าใช้",data_center:"Data Center",synology_account_settings:"",loading:"กำลังโหลด...",reset:"รีเซ็ต",custom:"กำหนดเอง",selected:"เลือก",pure_colon:":",clean:"ล้าง",last_month:"last month",next_month:"next month",no_item:"ไม่มีรายการ",create:"สร้าง",comma:", ",add_field:"เพิ่ม",password_strength:"Strength",password_must:"ข้อกำหนดรหัสผ่าน",colon:": ",action:"การดำเนินการ",more:"เพิ่มเติม",items_perpage:"รายการต่อหน้า",refresh:"รีเฟรช",cancel:"ยกเลิก",commit:"ปรับใช้",setting_applied:"ใช้การเปลี่ยนแปลงแล้ว",error_system:"ไม่สามารถดำเนินการนี้ได้ โปรดลงชื่อเข้าใช้ _OSNAME_ และลองอีกครั้ง",search_now_placeholder:"ค้นหาตอนนี้",save:"บันทึก",terms_of_service:"ข้อกำหนดการใช้งาน",privacy_statements:"นโยบายข้อมูลส่วนบุคคล",password:"รหัสผ่าน",apply:"ตกลง",dont_save:"ไม่ต้องบันทึก",confirm_lostchange_without_save:"ยังไม่ได้บันทึกการเปลี่ยนแปลง คุณต้องการบันทึกและออกหรือไม่",delete:"ลบ",hide:"ซ่อน",enter_password_to_continue:"ใส่รหัสผ่าน",enter_user_password:"โปรดใส่รหัสผ่านสำหรับบัญชี _OSNAME_ ของคุณเพื่อดำเนินการต่อ",submit:"ส่ง",start:"เริ่มต้น",skip:"ข้าม",back:"ย้อนกลับ",next:"ถัดไป",enable:"เปิดใช้งาน"},desktop:{window_last_hint:"นี่เป็นองค์ประกอบสุดท้ายในหน้าต่าง กด Tab เพื่อกลับไปยังด้านบน"},personal_settings:{customize_color:"ปรับแต่งสี"},uicommon:{copy:"คัดลอก",cut:"ตัด",items:"รายการ",add_time:"เพิ่มเวลา",schedule_abbre_sun:"อาทิตย์",schedule_abbre_mon:"จันทร์",schedule_abbre_tue:"อังคาร",schedule_abbre_wed:"พุธ",schedule_abbre_thu:"พฤหัสฯ",schedule_abbre_fri:"ศุกร์",schedule_abbre_sat:"เสาร์",browse:"เรียกดู",files_selected:"เลือกแล้ว {0} ไฟล์",goto_page:"ไปยังหน้า {0}",pre_x_pages:"{0} หน้าก่อนหน้า",next_x_pages:"{0} หน้าถัดไป",item:"รายการ",schedule_sun:"วันอาทิตย์",schedule_mon:"วันจันทร์",schedule_tue:"วันอังคาร",schedule_wed:"วันพุธ",schedule_thu:"วันพฤหัสบดี",schedule_fri:"วันศุกร์",schedule_sat:"วันเสาร์",schedule_daily:"รายวัน",schedule_weekend:"วันหยุดสุดสัปดาห์",schedule_weekdays:"วันธรรมดา",searching:"กำลังค้นหา..."},extlang:{todayText:"วันนี้",jan:"มกราคม",feb:"กุมภาพันธ์",mar:"มีนาคม",apr:"เมษายน",may:"พฤษภาคม",jun:"มิถุนายน",jul:"กรกฎาคม",aug:"สิงหาคม",sep:"กันยายน",oct:"ตุลาคม",nov:"พฤศจิกายน",dec:"ธันวาคม",fieldblank:"ต้องใส่ข้อมูลในฟิลด์นี้",invaliddate:"{0} ไม่ใช่วันที่ที่ถูกต้อง โปรดป้อนวันที่โดยใช้รูปแบบ {1}",firstpage:"หน้าแรก",lastpage:"หน้าสุดท้าย"},error:{error_invalid_min_date:"วันที่ในช่องนี้ต้องเท่ากับหรือเป็นวันที่หลังจาก {0}",error_invalid_max_date:"The date in this field must be equal to or before {0}"},search:{no_search_result:"ไม่พบรายการที่ตรงกัน"},about:{update_package_tip:"ไปที่ <b>DSM</b> > <b>Package Center</b> เพื่ออัปเดตแพคเกจของคุณ",check_for_update:"กำลังตรวจหาอัปเดต...",update_available:"มีการอัปเดตที่พร้อมใช้งาน",update_up_to_date:"เวอร์ชันของคุณล่าสุดแล้ว"},update:{version:"เวอร์ชัน",update_dsm_release_note:"บันทึกย่อประจำรุ่น"},copyright:{copyright:"ลิขสิทธิ์ © {0} Synology Inc. สงวนลิขสิทธิ์"}};x.default=M,x.texts=M}(xL)),xL}var TL={},xX;function Zwe(){return xX||(xX=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});const M={common:{close:"Kapat",explore:"Explore",more_products:"More products",sign_in:"Oturum aç",data_center:"Data Center",synology_account_settings:"",loading:"Yükleniyor...",reset:"Sıfırla",custom:"Özel",selected:"Seçili",pure_colon:":",clean:"Temizle",last_month:"last month",next_month:"next month",no_item:"Hiçbir öğe yok",create:"Oluştur",comma:", ",add_field:"Ekle",password_strength:"Strength",password_must:"Parola gereksinimleri",colon:": ",action:"Eylem",more:"Diğer",items_perpage:"Sayfadaki öğeler",refresh:"Yenile",cancel:"İptal",commit:"Uygula",setting_applied:"Değişiklikler uygulandı.",error_system:"Bu işlem gerçekleştirilemiyor. Lütfen _OSNAME_ üzerinde oturum açın ve tekrar deneyin.",search_now_placeholder:"Şimdi ara",save:"Kaydet",terms_of_service:"Hizmet Koşulları",privacy_statements:"Gizlilik Bildirimi",password:"Parola",apply:"Tamam",dont_save:"Kaydetme",confirm_lostchange_without_save:"Değişiklikler kaydedilmedi. Kaydetmek ve çıkmak istiyor musunuz?",delete:"Sil",hide:"Gizle",enter_password_to_continue:"Parolayı Girin",enter_user_password:"Lütfen devam etmek için _OSNAME_ hesabınızın parolasını girin.",submit:"Gönder",start:"Başlat",skip:"Atla",back:"Geri",next:"İleri",enable:"Etkinleştir"},desktop:{window_last_hint:"Bu penceredeki son elemandır. Üste geri dönmek için Sekme'ye basın."},personal_settings:{customize_color:"Rengi özelleştir"},uicommon:{copy:"Kopyala",cut:"Kes",items:"öğe",add_time:"Zaman ekle",schedule_abbre_sun:"Paz",schedule_abbre_mon:"Pzt",schedule_abbre_tue:"Sal",schedule_abbre_wed:"Çar",schedule_abbre_thu:"Per",schedule_abbre_fri:"Cum",schedule_abbre_sat:"Cts",browse:"Gözat",files_selected:"{0} dosya seçildi",goto_page:"Sayfa {0}'e git",pre_x_pages:"Önceki {0} sayfa",next_x_pages:"Sonraki {0} sayfa",item:"öğe",schedule_sun:"Pazar",schedule_mon:"Pazartesi",schedule_tue:"Salı",schedule_wed:"Çarşamba",schedule_thu:"Perşembe",schedule_fri:"Cuma",schedule_sat:"Cumartesi",schedule_daily:"Günlük",schedule_weekend:"Hafta sonu",schedule_weekdays:"İş günleri",searching:"Aranıyor..."},extlang:{todayText:"Bugün",jan:"Ocak",feb:"Şubat",mar:"Mart",apr:"Nisan",may:"Mayıs",jun:"Haziran",jul:"Temmuz",aug:"Ağustos",sep:"Eylül",oct:"Ekim",nov:"Kasım",dec:"Aralık",fieldblank:"Bu alan gereklidir.",invaliddate:"{0} geçerli bir tarih değildir. Lütfen {1} biçimini kullanarak bir tarih girin",firstpage:"İlk Sayfa",lastpage:"Son Sayfa"},error:{error_invalid_min_date:"The date in this field must be equal to or after {0}",error_invalid_max_date:"The date in this field must be equal to or before {0}"},search:{no_search_result:"Eşleşme bulunamadı."},about:{update_package_tip:"Paketinizi güncellemek için <b>DSM</b> > <b>Paket Merkezi</b>'ne gidin.",check_for_update:"Güncellemeler kontrol ediliyor...",update_available:"Güncelleme mevcut",update_up_to_date:"Sürümünüz güncel."},update:{version:"Sürüm",update_dsm_release_note:"Sürüm notları"},copyright:{copyright:"Telif Hakkı © {0} Synology Inc. Tüm hakları saklıdır."}};x.default=M,x.texts=M}(TL)),TL}var TX;function Qwe(){if(TX)return Qh;TX=1,Object.defineProperty(Qh,"__esModule",{value:!0});var x=Xn(),M=gn(),k=Kt(),F=rl(),B=Ur(),G=_i(),E=O3(),A=Rb();function u(y){return k.isEmptyString(y)||!k.isDefined(y)}class o{constructor(){let{active:d=!0,textsFn:v=[],defaultText:b=!0,useGlobalTexts:s=!0}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.active=d,this.locale=null,this.useGlobalTexts=s,this.textsFn=[];for(const l of v)this.registerTextFn(l);if(typeof SVC_EJECT_I18N<"u"&&SVC_EJECT_I18N)b&&B.remind("you are using default i18n texts, and eject all i18n string? you can set `defaultText` to false to disable this");else if(b){const l=w=>{switch(w){case"chs":return Promise.resolve().then(function(){return Owe()});case"cht":return Promise.resolve().then(function(){return Nwe()});case"csy":return Promise.resolve().then(function(){return Pwe()});case"dan":return Promise.resolve().then(function(){return Bwe()});case"enu":return Promise.resolve().then(function(){return uX()});case"fre":return Promise.resolve().then(function(){return Lwe()});case"ger":return Promise.resolve().then(function(){return Fwe()});case"hun":return Promise.resolve().then(function(){return Vwe()});case"ita":return Promise.resolve().then(function(){return Hwe()});case"jpn":return Promise.resolve().then(function(){return $we()});case"krn":return Promise.resolve().then(function(){return zwe()});case"nld":return Promise.resolve().then(function(){return Wwe()});case"nor":return Promise.resolve().then(function(){return Uwe()});case"plk":return Promise.resolve().then(function(){return Gwe()});case"ptb":return Promise.resolve().then(function(){return jwe()});case"ptg":return Promise.resolve().then(function(){return qwe()});case"rus":return Promise.resolve().then(function(){return Ywe()});case"spn":return Promise.resolve().then(function(){return Kwe()});case"sve":return Promise.resolve().then(function(){return Xwe()});case"tha":return Promise.resolve().then(function(){return Jwe()});case"trk":return Promise.resolve().then(function(){return Zwe()});default:return Promise.resolve().then(function(){return uX()})}};this.registerTextFn(async w=>(await l(w)).default)}this.texts=Object.create(null)}async getExtraTexts(d){let v=[];for(const{fn:b,scope:s}of this.textsFn)v.push(b.apply(s,[d]));return(await Promise.all(v)).reduce((b,s)=>G.merge(b,s),{})}async changeLang(d){B.remindWarn("please remind that `changeLang` should ready before all components mounted, you can await this function on vue-router before hook"),this.texts=await this.getExtraTexts(d),this.locale=d}registerTextFn(d){k.isFunction(d)&&(d={fn:d,scope:this}),this.textsFn.push(d)}getText(d,v){if(!this.active)return`${d}:${v}`;let b;return!F.isServer&&this.useGlobalTexts===!0&&(u(b)&&(b=A.default?._T?.(d,v)),u(b)&&(b=A.default?._JSLIBSTR?.(d,v))),u(b)&&(b=this.texts?.[d]?.[v]),b??`${d}:${v}`}}Qh.useI18n=()=>{B.consoleError("you are not install i18n yet, please install it first")};const S=Symbol("i18n.changeLang"),_=Symbol("i18n.getText"),p=Symbol("i18nManager"),f=M.makePlugin({},function(y){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const v=new o(d),b=x.getGlobalProperties(y),s=v.changeLang.bind(v),l=v.getText.bind(v),w=E.makeInject(y,s,S),I=E.makeInject(y,l,_),C=E.makeInject(y,v,p);Qh.useI18n=()=>({changeLang:w(),getText:I(),manager:C()}),b&&(b.$i18nManager=v,b.$changeLang=s,b.$i18n=l)});return Qh.changeLangSymbol=S,Qh.getTextSymbol=_,Qh.i18nManager=o,Qh.i18nPlugin=f,Qh.managerSymbol=p,Qh}var xS={},kX;function ebe(){if(kX)return xS;kX=1,Object.defineProperty(xS,"__esModule",{value:!0});var x=P3(),M=B3(),k=L3(),F=gn();const B=F.makePlugin({components:[x.default,M.default,k.default]});return xS.vAdvancePanelPlugin=B,xS}var TS={},RX;function tbe(){if(RX)return TS;RX=1,Object.defineProperty(TS,"__esModule",{value:!0});var x=WF(),M=gn();const k=M.makePlugin({components:[x.default]});return TS.vAffixPlugin=k,TS}var kS={},EX;function nbe(){if(EX)return kS;EX=1,Object.defineProperty(kS,"__esModule",{value:!0});var x=U3(),M=gn();const k=M.makePlugin({components:[x.default]});return kS.vAlertBarPlugin=k,kS}var RS={},AX;function rbe(){if(AX)return RS;AX=1,Object.defineProperty(RS,"__esModule",{value:!0});var x=G3(),M=j3(),k=gn();const F=k.makePlugin({components:[x.default,M.default]});return RS.vAppBarPlugin=F,RS}var ES={},MX;function ibe(){if(MX)return ES;MX=1,Object.defineProperty(ES,"__esModule",{value:!0});var x=gn(),M=q3(),k=aT(),F=a5(),B=Z3(),G=Q3(),E=eee();const A=x.makePlugin({components:[M.default,k.default,B.default,G.default,E.default,F.default]});return ES.vApplicationPlugin=A,ES}var AS={},DX;function obe(){if(DX)return AS;DX=1,Object.defineProperty(AS,"__esModule",{value:!0});var x=Xx(),M=gn();const k=M.makePlugin({components:[x.default]});return AS.vAvatarPlugin=k,AS}var MS={},OX;function abe(){if(OX)return MS;OX=1,Object.defineProperty(MS,"__esModule",{value:!0});var x=tee(),M=gn();const k=M.makePlugin({components:[x.default]});return MS.vBreadcrumbPlugin=k,MS}var DS={},NX;function sbe(){if(NX)return DS;NX=1,Object.defineProperty(DS,"__esModule",{value:!0});var x=La(),M=nee(),k=ree(),F=UF(),B=iee(),G=gn();const E=G.makePlugin({components:[x.default,M.default,F.default,B.default,k.default]});return DS.vButtonPlugin=E,DS}var OS={},PX;function lbe(){if(PX)return OS;PX=1,Object.defineProperty(OS,"__esModule",{value:!0});var x=oee(),M=gn();const k=M.makePlugin({components:[x.default]});return OS.vCardPlugin=k,OS}var NS={},BX;function ube(){if(BX)return NS;BX=1,Object.defineProperty(NS,"__esModule",{value:!0});var x=rv(),M=gn();const k=M.makePlugin({components:[x.default]});return NS.vCheckboxPlugin=k,NS}var PS={},LX;function hbe(){if(LX)return PS;LX=1,Object.defineProperty(PS,"__esModule",{value:!0});var x=aee(),M=h5(),k=f5(),F=see(),B=gn();const G=B.makePlugin({components:[x.default,M.default,k.default,F.default]});return PS.vColorPickerPlugin=G,PS}var BS={},FX;function cbe(){if(FX)return BS;FX=1,Object.defineProperty(BS,"__esModule",{value:!0});var x=i5(),M=gn();const k=M.makePlugin({components:[x.default]});return BS.vConfigProviderPlugin=k,BS}var LS={},VX;function dbe(){if(VX)return LS;VX=1,Object.defineProperty(LS,"__esModule",{value:!0});var x=lee(),M=gn();const k=M.makePlugin({components:[x.default]});return LS.vCopyCutFieldPlugin=k,LS}var FS={},HX;function fbe(){if(HX)return FS;HX=1,Object.defineProperty(FS,"__esModule",{value:!0});var x=dee(),M=gn();const k=M.makePlugin({components:[x.default]});return FS.vDataTablePlugin=k,FS}var VS={},$X;function gbe(){if($X)return VS;$X=1,Object.defineProperty(VS,"__esModule",{value:!0});var x=fee(),M=gn();const k=M.makePlugin({components:[x.default]});return VS.vDataViewPlugin=k,VS}var HS={},zX;function pbe(){if(zX)return HS;zX=1,Object.defineProperty(HS,"__esModule",{value:!0});var x=gee(),M=pT(),k=gn();const F=k.makePlugin({components:[x.default,M.default]});return HS.vDatePickerPlugin=F,HS}var $S={},WX;function mbe(){if(WX)return $S;WX=1,Object.defineProperty($S,"__esModule",{value:!0});var x=w5(),M=pee(),k=gn();const F=k.makePlugin({components:[x.default,M.default]});return $S.vDraggablePlugin=F,$S}var zS={},UX;function vbe(){if(UX)return zS;UX=1,Object.defineProperty(zS,"__esModule",{value:!0});var x=mee(),M=gn();const k=M.makePlugin({components:[x.default]});return zS.vDraggableResizablePlugin=k,zS}var WS={},GX;function ybe(){if(GX)return WS;GX=1,Object.defineProperty(WS,"__esModule",{value:!0});var x=vee(),M=b5(),k=gn();const F=k.makePlugin({components:[x.default,M.default]});return WS.vEditMenuPlugin=F,WS}var US={},jX;function wbe(){if(jX)return US;jX=1,Object.defineProperty(US,"__esModule",{value:!0});var x=yee(),M=gn();const k=M.makePlugin({components:[x.default]});return US.vEmptyViewPlugin=k,US}var GS={},qX;function bbe(){if(qX)return GS;qX=1,Object.defineProperty(GS,"__esModule",{value:!0});var x=wee(),M=gn();const k=M.makePlugin({components:[x.default]});return GS.vExpandableItemPlugin=k,GS}var jS={},YX;function Cbe(){if(YX)return jS;YX=1,Object.defineProperty(jS,"__esModule",{value:!0});var x=bee(),M=gn();const k=M.makePlugin({components:[x.default]});return jS.vFieldsetPlugin=k,jS}var qS={},KX;function _be(){if(KX)return qS;KX=1,Object.defineProperty(qS,"__esModule",{value:!0});var x=Cee(),M=gn();const k=M.makePlugin({components:[x.default]});return qS.vFileButtonPlugin=k,qS}var YS={},XX;function Sbe(){if(XX)return YS;XX=1,Object.defineProperty(YS,"__esModule",{value:!0});var x=C5(),M=_5(),k=_ee(),F=See(),B=gn();const G=B.makePlugin({components:[x.default,M.default,k.default,F.default]});return YS.vFormPlugin=G,YS}var KS={},JX;function Ibe(){if(JX)return KS;JX=1,Object.defineProperty(KS,"__esModule",{value:!0});var x=p5(),M=gn();const k=M.makePlugin({components:[x.default]});return KS.vGhostPlugin=k,KS}var XS={},ZX;function xbe(){if(ZX)return XS;ZX=1,Object.defineProperty(XS,"__esModule",{value:!0});var x=S5(),M=vT(),k=yT(),F=gn();const B=F.makePlugin({components:[x.default,M.default,k.default]});return XS.vGridLayoutPlugin=B,XS}var JS={},QX;function Tbe(){if(QX)return JS;QX=1,Object.defineProperty(JS,"__esModule",{value:!0});var x=Iee(),M=gn();const k=M.makePlugin({components:[x.default]});return JS.vHighlightBoxPlugin=k,JS}var ZS={},eJ;function kbe(){if(eJ)return ZS;eJ=1,Object.defineProperty(ZS,"__esModule",{value:!0});var x=ls(),M=gn();const k=M.makePlugin({components:[x.default]});return ZS.vIconPlugin=k,ZS}var QS={},tJ;function Rbe(){if(tJ)return QS;tJ=1,Object.defineProperty(QS,"__esModule",{value:!0});var x=xee(),M=gn();const k=M.makePlugin({components:[x.default]});return QS.vInfoBoardPlugin=k,QS}var eI={},nJ;function Ebe(){if(nJ)return eI;nJ=1,Object.defineProperty(eI,"__esModule",{value:!0});var x=Tee(),M=gn();const k=M.makePlugin({components:[x.default]});return eI.vInfoMaskPlugin=k,eI}var tI={},rJ;function Abe(){if(rJ)return tI;rJ=1,Object.defineProperty(tI,"__esModule",{value:!0});var x=gf(),M=gn();const k=M.makePlugin({components:[x.default]});return tI.vInputPlugin=k,tI}var nI={},iJ;function Mbe(){if(iJ)return nI;iJ=1,Object.defineProperty(nI,"__esModule",{value:!0});var x=kee(),M=gn();const k=M.makePlugin({components:[x.default]});return nI.vInputSteppersPlugin=k,nI}var rI={},oJ;function Dbe(){if(oJ)return rI;oJ=1,Object.defineProperty(rI,"__esModule",{value:!0});var x=kl(),M=lT(),k=d5(),F=gn();const B=F.makePlugin({components:[x.default,M.default,k.default]});return rI.vLayoutPlugin=B,rI}var iI={},aJ;function Obe(){if(aJ)return iI;aJ=1,Object.defineProperty(iI,"__esModule",{value:!0});var x=Eu(),M=lc(),k=c5(),F=qF(),B=Jx(),G=gn();const E=G.makePlugin({components:[x.default,M.default,k.default,F.default,B.default]});return iI.vMenuPlugin=E,iI}var oI={},sJ;function Nbe(){if(sJ)return oI;sJ=1,Object.defineProperty(oI,"__esModule",{value:!0});var x=s5(),M=Ree(),k=Eee(),F=Aee(),B=gn();const G=B.makePlugin({components:[x.default,M.default,k.default,F.default]});return oI.vModuleListPlugin=G,oI}var aI={},lJ;function Pbe(){if(lJ)return aI;lJ=1,Object.defineProperty(aI,"__esModule",{value:!0});var x=nT(),M=e5(),k=gn();const F=k.makePlugin({components:[x.default,M.default]});return aI.vOverflowListPlugin=F,aI}var sI={},uJ;function Bbe(){if(uJ)return sI;uJ=1,Object.defineProperty(sI,"__esModule",{value:!0});var x=Mee(),M=gn();const k=M.makePlugin({components:[x.default]});return sI.vOverflowTextPlugin=k,sI}var lI={},hJ;function Lbe(){if(hJ)return lI;hJ=1,Object.defineProperty(lI,"__esModule",{value:!0});var x=m5(),M=gn();const k=M.makePlugin({components:[x.default]});return lI.vPaginationPlugin=k,lI}var uI={},cJ;function Fbe(){if(cJ)return uI;cJ=1,Object.defineProperty(uI,"__esModule",{value:!0});var x=uT(),M=sT(),k=gn();const F=k.makePlugin({components:[x.default,M.default]});return uI.vPanelPlugin=F,uI}var hI={},dJ;function Vbe(){if(dJ)return hI;dJ=1,Object.defineProperty(hI,"__esModule",{value:!0});var x=mT(),M=gn();const k=M.makePlugin({components:[x.default]});return hI.vPopupPlugin=k,hI}var cI={},fJ;function Hbe(){if(fJ)return cI;fJ=1,Object.defineProperty(cI,"__esModule",{value:!0});var x=Lg(),M=GF(),k=gn();const F=k.makePlugin({components:[x.default,M.default]});return cI.vPortalPlugin=F,cI}var dI={},gJ;function $be(){if(gJ)return dI;gJ=1,Object.defineProperty(dI,"__esModule",{value:!0});var x=x5(),M=gn();const k=M.makePlugin({components:[x.default]});return dI.vProgressBarPlugin=k,dI}var fI={},pJ;function zbe(){if(pJ)return fI;pJ=1,Object.defineProperty(fI,"__esModule",{value:!0});var x=dT(),M=Dee(),k=gn();const F=k.makePlugin({components:[x.default,M.default]});return fI.vRadioPlugin=F,fI}var gI={},mJ;function Wbe(){if(mJ)return gI;mJ=1,Object.defineProperty(gI,"__esModule",{value:!0});var x=Kx(),M=gn();const k=M.makePlugin({components:[x.default]});return gI.vRichTextPlugin=k,gI}var pI={},vJ;function Ube(){if(vJ)return pI;vJ=1,Object.defineProperty(pI,"__esModule",{value:!0});var x=Oee(),M=gn();const k=M.makePlugin({components:[x.default]});return pI.vScheduleFieldPlugin=k,pI}var mI={},yJ;function Gbe(){if(yJ)return mI;yJ=1,Object.defineProperty(mI,"__esModule",{value:!0});var x=Nee(),M=gn();const k=M.makePlugin({components:[x.default]});return mI.vScheduleTablePlugin=k,mI}var vI={},wJ;function jbe(){if(wJ)return vI;wJ=1,Object.defineProperty(vI,"__esModule",{value:!0});var x=Xn(),M=wa(),k=gn();const F=k.makePlugin({components:[M.default]},(B,G)=>{const E=x.getGlobalProperties(B);E&&(E.$scrollbar=G)});return vI.ScrollbarPlugin=F,vI}var yI={},bJ;function qbe(){if(bJ)return yI;bJ=1,Object.defineProperty(yI,"__esModule",{value:!0});var x=Pee(),M=gn();const k=M.makePlugin({components:[x.default]});return yI.vSearchInputPlugin=k,yI}var wI={},CJ;function Ybe(){if(CJ)return wI;CJ=1,Object.defineProperty(wI,"__esModule",{value:!0});var x=tT(),M=Ab(),k=k5(),F=Bee(),B=sh(),G=Lee(),E=Qx(),A=JF(),u=KF(),o=XF(),S=Fee(),_=YF(),p=Zx(),f=T5(),y=gn();const d=y.makePlugin({components:[x.default,M.default,k.default,F.default,B.default,G.default,E.default,A.default,u.default,o.default,S.default,_.default,p.default,f.default]});return wI.vSelectPlugin=d,wI}var bI={},_J;function Kbe(){if(_J)return bI;_J=1,Object.defineProperty(bI,"__esModule",{value:!0});var x=Vee(),M=gn();const k=M.makePlugin({components:[x.default]});return bI.vSemanticSearchPlugin=k,bI}var CI={},SJ;function Xbe(){if(SJ)return CI;SJ=1,Object.defineProperty(CI,"__esModule",{value:!0});var x=v5(),M=gn();const k=M.makePlugin({components:[x.default]});return CI.vSlideUpDownPlugin=k,CI}var _I={},IJ;function Jbe(){if(IJ)return _I;IJ=1,Object.defineProperty(_I,"__esModule",{value:!0});var x=uh(),M=gn();const k=M.makePlugin({components:[x.default]});return _I.vSlideUpDownTransitionPlugin=k,_I}var SI={},xJ;function Zbe(){if(xJ)return SI;xJ=1,Object.defineProperty(SI,"__esModule",{value:!0});var x=Hee(),M=gn();const k=M.makePlugin({components:[x.default]});return SI.vSliderPlugin=k,SI}var II={},TJ;function Qbe(){if(TJ)return II;TJ=1,Object.defineProperty(II,"__esModule",{value:!0});var x=Eb(),M=gn();const k=M.makePlugin({components:[x.default]});return II.vSpacePlugin=k,II}var xI={},kJ;function e0e(){if(kJ)return xI;kJ=1,Object.defineProperty(xI,"__esModule",{value:!0});var x=tv(),M=r5(),k=df(),F=gn();const B=F.makePlugin({components:[x.default,M.default,k.default]});return xI.vSpinPlugin=B,xI}var TI={},RJ;function t0e(){if(RJ)return TI;RJ=1,Object.defineProperty(TI,"__esModule",{value:!0});var x=$ee(),M=zee(),k=A5(),F=gn();const B=F.makePlugin({components:[x.default,M.default,k.default]});return TI.vTabsPlugin=B,TI}var kI={},EJ;function n0e(){if(EJ)return kI;EJ=1,Object.defineProperty(kI,"__esModule",{value:!0});var x=Wee(),M=gn();const k=M.makePlugin({components:[x.default]});return kI.vTimelinePlugin=k,kI}var RI={},AJ;function r0e(){if(AJ)return RI;AJ=1,Object.defineProperty(RI,"__esModule",{value:!0});var x=n5(),M=Xn(),k=Mb(),F=gn(),B=ute();const G=F.makePlugin({components:[x.default]},E=>{const A=M.getGlobalProperties(E),u=function(){for(var o=arguments.length,S=new Array(o),_=0;_<o;_++)S[_]=arguments[_];k.openToast(E,...S)};B.hydrate(()=>({open:u})),A&&(A.$getToastBox=u)});return RI.vToastPlugin=G,RI}var EI={},MJ;function i0e(){if(MJ)return EI;MJ=1,Object.defineProperty(EI,"__esModule",{value:!0});var x=Uee(),M=gn();const k=M.makePlugin({components:[x.default]});return EI.vTogglePlugin=k,EI}var AI={},DJ;function o0e(){if(DJ)return AI;DJ=1,Object.defineProperty(AI,"__esModule",{value:!0});var x=Bg(),M=gn();const k=M.makePlugin({components:[x.default]});return AI.vTrapFocusPlugin=k,AI}var MI={},OJ;function a0e(){if(OJ)return MI;OJ=1,Object.defineProperty(MI,"__esModule",{value:!0});var x=Gee(),M=gn();const k=M.makePlugin({components:[x.default]});return MI.vTreePanelPlugin=k,MI}var DI={},NJ;function s0e(){if(NJ)return DI;NJ=1,Object.defineProperty(DI,"__esModule",{value:!0});var x=jee(),M=qee(),k=Yee(),F=Kee(),B=Xee(),G=Jee(),E=Zee(),A=ete(),u=Qee(),o=tte(),S=l5(),_=nte(),p=gn();const f=p.makePlugin({components:[x.default,M.default,k.default,F.default,B.default,G.default,E.default,u.default,A.default,o.default,S.default,_.default]});return DI.vTypoPlugin=f,DI}var OI={},PJ;function l0e(){if(PJ)return OI;PJ=1,Object.defineProperty(OI,"__esModule",{value:!0});var x=ZF(),M=gn();const k=M.makePlugin({components:[x.default]});return OI.vVirtualScrollbarPlugin=k,OI}var NI={},BJ;function u0e(){if(BJ)return NI;BJ=1,Object.defineProperty(NI,"__esModule",{value:!0});var x=fT(),M=gn();const k=M.makePlugin({components:[x.default]});return NI.vWhitetipPlugin=k,NI}var Bm={},LJ;function h0e(){if(LJ)return Bm;LJ=1,Object.defineProperty(Bm,"__esModule",{value:!0});var x=rte(),M=nv(),k=ite(),F=ote(),B=o5(),G=rT(),E=iT(),A=t5(),u=Xn(),o=gn();const S=o.makePlugin({components:[x.default]},f=>{const y=u.getGlobalProperties(f);y&&(y.$messageWindow=x.default)}),_=o.makePlugin({components:[F.default,B.default]},f=>{const y=u.getGlobalProperties(f);y&&(y.$aboutWindow=F.default,y.$aboutWindowV2=B.default)}),p=o.makePlugin({components:[x.default,M.default,k.default,F.default,B.default,E.default,G.default,A.default]});return Bm.vAboutWindowPlugin=_,Bm.vMessageBoxWindowPlugin=S,Bm.vWindowPlugin=p,Bm}var PI={},FJ;function c0e(){if(FJ)return PI;FJ=1,Object.defineProperty(PI,"__esModule",{value:!0});var x=Kl(),M=gn();const k=M.makePlugin({components:[x.withWrap]});return PI.withWrapPlugin=k,PI}var BI={},VJ;function d0e(){if(VJ)return BI;VJ=1,Object.defineProperty(BI,"__esModule",{value:!0});var x=ste(),M=ate(),k=M5(),F=gn();const B=F.makePlugin({components:[M.default,x.default,k.default]});return BI.vWizardPlugin=B,BI}var LI={},HJ;function f0e(){if(HJ)return LI;HJ=1,Object.defineProperty(LI,"__esModule",{value:!0});var x=lte(),M=gn();const k=M.makePlugin({components:[x.default]});return LI.vOtpInputPlugin=k,LI}var FI={},$J;function g0e(){if($J)return FI;$J=1,Object.defineProperty(FI,"__esModule",{value:!0});var x=hte(),M=gn();const k=M.makePlugin({},F=>{F.directive("auto-focus",x.autoFocus)});return FI.vAutoFocusPlugin=k,FI}var VI={},zJ;function p0e(){if(zJ)return VI;zJ=1,Object.defineProperty(VI,"__esModule",{value:!0});var x=Ru(),M=gn();const k=M.makePlugin({},F=>{F.directive("clickoutside",x.default)});return VI.vClickoutsidePlugin=k,VI}var HI={},WJ;function m0e(){if(WJ)return HI;WJ=1,Object.defineProperty(HI,"__esModule",{value:!0});var x=cte(),M=gn();const k=M.makePlugin({},F=>{F.directive("form-component",x.default)});return HI.vFormComponentPlugin=k,HI}var $I={},UJ;function v0e(){if(UJ)return $I;UJ=1,Object.defineProperty($I,"__esModule",{value:!0});var x=dte(),M=gn();const k=M.makePlugin({},F=>{F.directive("long-press",x.default)});return $I.vLongPressPlugin=k,$I}var zI={},GJ;function y0e(){if(GJ)return zI;GJ=1,Object.defineProperty(zI,"__esModule",{value:!0});var x=I5(),M=gn();const k=M.makePlugin({},F=>{F.directive("pressing",x.default)});return zI.vPressingPlugin=k,zI}var WI={},kL={},jJ;function gte(){return jJ||(jJ=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M={props:{synoId:{type:String,default:""},useSynoId:{type:Boolean,default:!0}}};x.default=M}(kL)),kL}var qJ;function w0e(){if(qJ)return WI;qJ=1,Object.defineProperty(WI,"__esModule",{value:!0});var x=Xn(),M=gn(),k=fte(),F=gte();const B=M.makePlugin({},function(G){let{active:E=!0}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const A=x.getGlobalProperties(G);A&&(A.$synoIdActive=E),G.directive("syno-id",k.default),E?G.mixin(F.default):G.mixin({data(){return{synoId:""}}})});return WI.synoIdPlugin=B,WI}var UI={},YJ;function b0e(){if(YJ)return UI;YJ=1,Object.defineProperty(UI,"__esModule",{value:!0});var x=ya(),M=gn();const k=M.makePlugin({},F=>{F.directive("tooltip",x.default)});return UI.vTooltipPlugin=k,UI}var KJ;function C0e(){return KJ||(KJ=1,function(x){Object.defineProperty(x,"__esModule",{value:!0});var M=Og(),k=Wye(),F=P3(),B=B3(),G=L3(),E=WF(),A=U3(),u=G3(),o=j3(),S=q3(),_=aT(),p=Z3(),f=Q3(),y=eee(),d=a5(),v=Xx(),b=tee(),s=La(),l=nee(),w=ree(),I=UF(),C=iee(),h=oee(),c=rv(),m=aee(),T=h5(),D=f5(),O=see(),N=i5(),z=lee(),H=dee(),$=fee(),V=Db(),P=gT(),U=y5(),Y=gee(),Z=pT(),X=w5(),J=pee(),q=mee(),te=vee(),re=b5(),ie=yee(),ne=wee(),le=bee(),fe=Cee(),we=C5(),pe=_5(),ve=_ee(),be=See(),Ee=p5(),Re=vT(),Ne=S5(),Le=yT(),Se=Iee(),Ie=ls(),_e=xee(),Ae=Tee(),ue=gf(),ke=kee(),Pe=kl(),Ve=lT(),je=d5(),it=Eu(),rt=lc(),mt=c5(),yt=qF(),st=Jx(),Qe=s5(),At=Ree(),Xt=Eee(),cn=Aee(),Sn=nT(),Vn=e5(),bn=Mee(),En=m5(),pn=uT(),Un=sT(),Pn=mT(),On=Lg(),Ht=GF(),Mt=x5(),Gt=dT(),Bt=Dee(),Ge=Kx(),et=Oee(),vt=Nee(),wt=wa(),Ct=Pee(),bt=tT(),Rt=Ab(),Lt=k5(),Dt=Bee(),Jt=sh(),zt=Lee(),nn=Qx(),An=JF(),lr=KF(),$r=XF(),ri=Fee(),zi=YF(),ba=Zx(),Ro=T5(),no=Xl(),il=wT(),Rl=bT(),Fa=Nb(),Va=CT(),Au=_T(),us=ST(),ea=R5(),Ha=E5(),Mu=Vee(),hh=v5(),Du=uh(),qi=Hee(),$a=Eb(),hs=tv(),ch=r5(),di=df(),za=$ee(),Bs=zee(),Ls=A5(),Eo=Wee(),ol=n5(),al=Uee(),Fs=Bg(),Wa=Gee(),Jl=jee(),uc=qee(),sl=Yee(),Ou=Kee(),El=Xee(),Al=Jee(),Vs=Zee(),Or=Qee(),dh=ete(),fh=tte(),fi=l5(),Ao=nte(),Zl=ZF(),od=fT(),Ql=oT(),hc=rte(),cs=nv(),Nu=ite(),ll=ote(),Ca=o5(),cc=iT(),Pu=rT(),gh=t5(),dc=K3(),yo=Kl(),Zr=ate(),_a=ste(),ii=M5(),Qr=lte(),eu=ute(),ph=hte(),mh=Ru(),Ml=cte(),fc=dte(),gc=I5(),pc=fte(),wo=ya(),zr=$3(),Ua=Ewe(),la=J3(),Ga=g5(),Sa=Awe(),Mo=zF(),ds=Mwe(),fs=H3(),Dl=Dwe(),gr=Qwe(),Xe=ebe(),co=tbe(),Do=nbe(),ot=rbe(),It=ibe(),mc=obe(),Bu=abe(),gs=sbe(),ps=lbe(),vh=ube(),Wn=hbe(),ua=cbe(),ja=dbe(),Pi=fbe(),ms=gbe(),Yi=pbe(),Ol=mbe(),Nl=vbe(),Bi=ybe(),Lu=wbe(),Pl=bbe(),ul=Cbe(),tu=_be(),Ia=Sbe(),Fu=Ibe(),vs=xbe(),Ki=Tbe(),mi=kbe(),ta=Rbe(),na=Ebe(),ge=Abe(),ae=Mbe(),de=Dbe(),Ce=Obe(),De=Nbe(),He=Pbe(),Ye=Bbe(),ut=Lbe(),dt=Fbe(),Nt=Vbe(),tn=Hbe(),qt=$be(),Vt=zbe(),Mn=Wbe(),Bn=Ube(),Kn=Gbe(),Jn=jbe(),vn=qbe(),Nr=Ybe(),Jr=Kbe(),Rr=Xbe(),si=Jbe(),Wr=Zbe(),Pr=Qbe(),_r=e0e(),vi=t0e(),Li=n0e(),ro=r0e(),ur=i0e(),Dn=o0e(),br=a0e(),nt=s0e(),_t=l0e(),ft=u0e(),Ot=h0e(),Yt=c0e(),Cn=d0e(),Fn=f0e(),kn=g0e(),hr=p0e(),pr=m0e(),ir=v0e(),Er=y0e(),oi=w0e(),rn=b0e(),qn=Zo(),Ln=Y3(),In=Tl(),Gr=xl(),io=vr(),bo=ci(),Wi=gte(),Fi=QF(),Hs=Ng(),ra=fr(),Vi=cT(),qa=N3(),Ya=id();x.version=M.__VERSION__,x.vNotification=k.default,x.vAdvancePanelGrid=F.default,x.vAdvancePanelForm=B.default,x.vAdvancePanelColumns=G.default,x.vAffix=E.default,x.vAlertBar=A.default,x.vAppBar=u.default,x.vNavbarItem=o.default,x.vAppInstance=S.default,x.vAppWindow=_.default,x.vPageListAppWindow=p.default,x.vPageListModule=f.default,x.vAppWizardWindow=y.default,x.vAppWindowHeader=d.default,x.vAvatar=v.default,x.vBreadcrumb=b.default,x.vButton=s.default,x.vButtonGroup=l.default,x.vButtonSplit=w.default,x.vButtonDropdown=I.default,x.vBreakpointButtonsGroup=C.default,x.vCard=h.default,x.vCheckbox=c.default,x.vColorPicker=m.default,x.vColorPickerDropdown=T.default,x.vColorCustomPanel=D.default,x.vColorCustomWindow=O.default,x.vConfigProvider=N.default,x.vCopyCutField=z.default,x.vDataTable=H.default,x.vDataView=$.default,x.convertToDateFnFormat=V.convertToDateFnFormat,x.dateFormats=V.dateFormats,x.timeFormats=V.timeFormats,x.isValidDateString=P.isValidDateString,x.parseStringToDate=P.parseStringToDate,x.toDateString=U.toDateString,x.toDateTimeString=U.toDateTimeString,x.toTimeString=U.toTimeString,x.vDatePicker=Y.default,x.vDatePickerMenu=Z.default,x.vDragTarget=X.default,x.vDragZone=J.default,x.vDraggableResizable=q.default,x.vEditMenu=te.default,x.vEditMenuItem=re.default,x.vEmptyView=ie.default,x.vExpandableItem=ne.default,x.vFieldset=le.default,x.vFileButton=fe.default,x.vForm=we.default,x.vFormItem=pe.default,x.vFormMultipleItem=ve.default,x.vIncrementFormMultipleItem=be.default,x.vGhost=Ee.default,x.vCol=Re.default,x.vGrid=Ne.default,x.vRow=Le.default,x.vHighlightBox=Se.default,x.vIcon=Ie.default,x.vInfoBoard=_e.default,x.vInfoMask=Ae.default,x.vInput=ue.default,x.vInputSteppers=ke.default,x.vLayout=Pe.default,x.vToolbar=Ve.default,x.vOverflowToolbar=je.default,x.vMenu=it.default,x.vMenuItem=rt.default,x.vMenuSubmenu=mt.default,x.vMenuGroup=yt.default,x.vMenuDivider=st.default,x.vModuleList=Qe.default,x.vModuleListOption=At.default,x.vModuleListSection=Xt.default,x.vModuleListDivider=cn.default,x.vOverflowList=Sn.default,x.vOverflowListItem=Vn.default,x.vOverflowText=bn.default,x.vPagination=En.default,x.vPanel=pn.default,x.vStatusBar=Un.default,x.vPopup=Pn.default,x.vPortal=On.default,x.vPortalTarget=Ht.default,x.vProgressBar=Mt.default,x.vRadio=Gt.default,x.vRadioGroup=Bt.default,x.vRichText=Ge.default,x.vScheduleField=et.default,x.vScheduleTable=vt.default,x.vScrollbar=wt.default,x.vSearchInput=Ct.default,x.vBaseSelect=bt.default,x.vSingleSelect=Rt.default,x.vMultipleSelect=Lt.default,x.vSuperboxSelect=Dt.default,x.vSelectBaseOption=Jt.default,x.vSelectActionOption=zt.default,x.vSelectDividerOption=nn.default,x.vSelectGroupOption=An.default,x.vSelectCheckOption=lr.default,x.vSelectNoMatchOption=$r.default,x.vSelectMultilineOption=ri.default,x.vSelectTickOption=zi.default,x.vSelectInput=ba.default,x.vMultipleSelectInput=Ro.default,x.Block=no.Block,x.MULTIPLE_BRACKET_PATTERN=no.MULTIPLE_BRACKET_PATTERN,x.MULTIPLE_CLOSE_BRACKET=no.MULTIPLE_CLOSE_BRACKET,x.MULTIPLE_DELIMETER=no.MULTIPLE_DELIMETER,x.MULTIPLE_OPEN_BRACKET=no.MULTIPLE_OPEN_BRACKET,x.Unknown=no.Unknown,x.Category=il.Category,x.Operator=Rl.Operator,x.Empty=Fa.Empty,x.Value=Va.Value,x.CONJUNCTIONS_TITLE=Au.CONJUNCTIONS_TITLE,x.Conjunction=Au.Conjunction,x.BRACKET_TOKEN=us.BRACKET_TOKEN,x.Bracket=us.Bracket,x.CLOSE_BRACKET=us.CLOSE_BRACKET,x.OPEN_BRACKET=us.OPEN_BRACKET,x.getBracketToken=us.getBracketToken,x.isCloseBracket=us.isCloseBracket,x.isOpenBracket=us.isOpenBracket,x.AbstractBlockFactory=ea.AbstractBlockFactory,x.joinEmptyToken=ea.joinEmptyToken,x.linkBlocks=ea.linkBlocks,x.toTextDecode=ea.toTextDecode,x.vSuggestionItem=Ha.default,x.vSemanticSearch=Mu.default,x.vSlideUpDown=hh.default,x.vSlideUpDownTransition=Du.default,x.vSlider=qi.default,x.vSpace=$a.default,x.vSpin=hs.default,x.vSpinInner=ch.default,x.vSpinIcon=di.default,x.vTabs=za.default,x.vTabPane=Bs.default,x.vTabFooter=Ls.default,x.vTimeline=Eo.default,x.vToast=ol.default,x.vToggle=al.default,x.vTrapFocus=Fs.default,x.vTreePanel=Wa.default,x.vHeader=Jl.default,x.vHr=uc.default,x.vP=sl.default,x.vA=Ou.default,x.vBlockquote=El.default,x.vTypoText=Al.default,x.vCode=Vs.default,x.vList=Or.default,x.vLi=dh.default,x.vTable=fh.default,x.vDivider=fi.default,x.vTypoTip=Ao.default,x.vVirtualScrollbar=Zl.default,x.vWhitetip=od.default,x.vWindow=Ql.default,x.vMessageBoxWindow=hc.default,x.vModalWindow=cs.default,x.vWizardWindow=Nu.default,x.vAboutWindow=ll.default,x.vAboutWindowV2=Ca.default,x.vWindowHeader=cc.default,x.vWindowHeaderToolWrapper=Pu.default,x.vWindowResizable=gh.default,x.vWindowDraggable=dc.default,x.withWrap=yo.withWrap,x.vWizard=Zr.default,x.vWizardStep=_a.default,x.vWizardFooter=ii.default,x.vOtpInput=Qr.default,x.hydrate=eu.hydrate,Object.defineProperty(x,"useToast",{enumerable:!0,get:function(){return eu.useToast}}),x.autoFocus=ph.autoFocus,x.clickoutside=mh.default,x.doClickOutsideHandler=mh.doHandler,x.formComponent=Ml.default,x.longPress=fc.default,x.pressing=gc.default,x.synoId=pc.default,x.tooltip=wo.default,x.ANCHOR_REGEX=zr.ANCHOR_REGEX,x.AlignManager=zr.AlignManager,x.AlignManagerPlugin=zr.AlignManagerPlugin,x.alignSymbol=zr.alignSymbol,x.constrain=zr.constrain,x.constrainSize=zr.constrainSize,x.fillRect=zr.fillRect,x.getConstrainWay=zr.getConstrainWay,x.getContainerBox=zr.getContainerBox,x.toFullName=zr.toFullName,Object.defineProperty(x,"useAlignManager",{enumerable:!0,get:function(){return zr.useAlignManager}}),x.BREAKPOINTS=Ua.BREAKPOINTS,x.BreakpointManager=Ua.BreakpointManager,x.BreakpointManagerPlugin=Ua.BreakpointManagerPlugin,x.ORDERED=Ua.ORDERED,x.breakpointSymbol=Ua.breakpointSymbol,Object.defineProperty(x,"useBreakpointManager",{enumerable:!0,get:function(){return Ua.useBreakpointManager}}),x.ConfigManager=la.ConfigManager,x.ConfigManagerPlugin=la.ConfigManagerPlugin,x.configProps=la.configProps,x.configSymbol=la.configSymbol,Object.defineProperty(x,"useConfigManager",{enumerable:!0,get:function(){return la.useConfigManager}}),x.DragDropManager=Ga.DragDropManager,x.DragDropManagerPlugin=Ga.DragDropManagerPlugin,x.DragDropTarget=Ga.DragDropTarget,x.DragZone=Ga.DragZone,x.dragDropSymbol=Ga.dragDropSymbol,Object.defineProperty(x,"useDragDropManager",{enumerable:!0,get:function(){return Ga.useDragDropManager}}),x.DoubleTapGesture=Sa.DoubleTapGesture,x.Gesture=Sa.Gesture,x.GestureManager=Sa.GestureManager,x.GestureManagerPlugin=Sa.GestureManagerPlugin,x.LongPressGesture=Sa.LongPressGesture,x.SwipeGesture=Sa.SwipeGesture,x.gestureSymbol=Sa.gestureSymbol,Object.defineProperty(x,"useGestureManager",{enumerable:!0,get:function(){return Sa.useGestureManager}}),x.ICON_TYPE=Mo.ICON_TYPE,x.IconManager=Mo.IconManager,x.IconManagerPlugin=Mo.IconManagerPlugin,x.iconSymbol=Mo.iconSymbol,Object.defineProperty(x,"useIconManager",{enumerable:!0,get:function(){return Mo.useIconManager}}),x.C2_GRAPH=ds.C2_GRAPH,x.DEFAULT_GRAPH=ds.DEFAULT_GRAPH,x.LayoutManager=ds.LayoutManager,x.LayoutManagerPlugin=ds.LayoutManagerPlugin,x.VALID_LAYOUT_TYPE=ds.VALID_LAYOUT_TYPE,x.layoutSymbol=ds.layoutSymbol,Object.defineProperty(x,"useLayoutManager",{enumerable:!0,get:function(){return ds.useLayoutManager}}),x.PopupManager=fs.PopupManager,x.PopupManagerPlugin=fs.PopupManagerPlugin,x.popupSymbol=fs.popupSymbol,Object.defineProperty(x,"usePopupManager",{enumerable:!0,get:function(){return fs.usePopupManager}}),x.WindowManager=Dl.WindowManager,x.WindowManagerPlugin=Dl.WindowManagerPlugin,Object.defineProperty(x,"useWindowManager",{enumerable:!0,get:function(){return Dl.useWindowManager}}),x.windowSymbol=Dl.windowSymbol,x.changeLangSymbol=gr.changeLangSymbol,x.getTextSymbol=gr.getTextSymbol,x.i18nManager=gr.i18nManager,x.i18nPlugin=gr.i18nPlugin,x.managerSymbol=gr.managerSymbol,Object.defineProperty(x,"useI18n",{enumerable:!0,get:function(){return gr.useI18n}}),x.vAdvancePanelPlugin=Xe.vAdvancePanelPlugin,x.vAffixPlugin=co.vAffixPlugin,x.vAlertBarPlugin=Do.vAlertBarPlugin,x.vAppBarPlugin=ot.vAppBarPlugin,x.vApplicationPlugin=It.vApplicationPlugin,x.vAvatarPlugin=mc.vAvatarPlugin,x.vBreadcrumbPlugin=Bu.vBreadcrumbPlugin,x.vButtonPlugin=gs.vButtonPlugin,x.vCardPlugin=ps.vCardPlugin,x.vCheckboxPlugin=vh.vCheckboxPlugin,x.vColorPickerPlugin=Wn.vColorPickerPlugin,x.vConfigProviderPlugin=ua.vConfigProviderPlugin,x.vCopyCutFieldPlugin=ja.vCopyCutFieldPlugin,x.vDataTablePlugin=Pi.vDataTablePlugin,x.vDataViewPlugin=ms.vDataViewPlugin,x.vDatePickerPlugin=Yi.vDatePickerPlugin,x.vDraggablePlugin=Ol.vDraggablePlugin,x.vDraggableResizablePlugin=Nl.vDraggableResizablePlugin,x.vEditMenuPlugin=Bi.vEditMenuPlugin,x.vEmptyViewPlugin=Lu.vEmptyViewPlugin,x.vExpandableItemPlugin=Pl.vExpandableItemPlugin,x.vFieldsetPlugin=ul.vFieldsetPlugin,x.vFileButtonPlugin=tu.vFileButtonPlugin,x.vFormPlugin=Ia.vFormPlugin,x.vGhostPlugin=Fu.vGhostPlugin,x.vGridLayoutPlugin=vs.vGridLayoutPlugin,x.vHighlightBoxPlugin=Ki.vHighlightBoxPlugin,x.vIconPlugin=mi.vIconPlugin,x.vInfoBoardPlugin=ta.vInfoBoardPlugin,x.vInfoMaskPlugin=na.vInfoMaskPlugin,x.vInputPlugin=ge.vInputPlugin,x.vInputSteppersPlugin=ae.vInputSteppersPlugin,x.vLayoutPlugin=de.vLayoutPlugin,x.vMenuPlugin=Ce.vMenuPlugin,x.vModuleListPlugin=De.vModuleListPlugin,x.vOverflowListPlugin=He.vOverflowListPlugin,x.vOverflowTextPlugin=Ye.vOverflowTextPlugin,x.vPaginationPlugin=ut.vPaginationPlugin,x.vPanelPlugin=dt.vPanelPlugin,x.vPopupPlugin=Nt.vPopupPlugin,x.vPortalPlugin=tn.vPortalPlugin,x.vProgressBarPlugin=qt.vProgressBarPlugin,x.vRadioPlugin=Vt.vRadioPlugin,x.vRichTextPlugin=Mn.vRichTextPlugin,x.vScheduleFieldPlugin=Bn.vScheduleFieldPlugin,x.vScheduleTablePlugin=Kn.vScheduleTablePlugin,x.ScrollbarPlugin=Jn.ScrollbarPlugin,x.vSearchInputPlugin=vn.vSearchInputPlugin,x.vSelectPlugin=Nr.vSelectPlugin,x.vSemanticSearchPlugin=Jr.vSemanticSearchPlugin,x.vSlideUpDownPlugin=Rr.vSlideUpDownPlugin,x.vSlideUpDownTransitionPlugin=si.vSlideUpDownTransitionPlugin,x.vSliderPlugin=Wr.vSliderPlugin,x.vSpacePlugin=Pr.vSpacePlugin,x.vSpinPlugin=_r.vSpinPlugin,x.vTabsPlugin=vi.vTabsPlugin,x.vTimelinePlugin=Li.vTimelinePlugin,x.vToastPlugin=ro.vToastPlugin,x.vTogglePlugin=ur.vTogglePlugin,x.vTrapFocusPlugin=Dn.vTrapFocusPlugin,x.vTreePanelPlugin=br.vTreePanelPlugin,x.vTypoPlugin=nt.vTypoPlugin,x.vVirtualScrollbarPlugin=_t.vVirtualScrollbarPlugin,x.vWhitetipPlugin=ft.vWhitetipPlugin,x.vAboutWindowPlugin=Ot.vAboutWindowPlugin,x.vMessageBoxWindowPlugin=Ot.vMessageBoxWindowPlugin,x.vWindowPlugin=Ot.vWindowPlugin,x.withWrapPlugin=Yt.withWrapPlugin,x.vWizardPlugin=Cn.vWizardPlugin,x.vOtpInputPlugin=Fn.vOtpInputPlugin,x.vAutoFocusPlugin=kn.vAutoFocusPlugin,x.vClickoutsidePlugin=hr.vClickoutsidePlugin,x.vFormComponentPlugin=pr.vFormComponentPlugin,x.vLongPressPlugin=ir.vLongPressPlugin,x.vPressingPlugin=Er.vPressingPlugin,x.synoIdPlugin=oi.synoIdPlugin,x.vTooltipPlugin=rn.vTooltipPlugin,x.emitter=qn.default,x.extWindowAdapter=Ln.default,x.formComponentMixin=In.default,x.hasPopupContainer=Gr.default,x.iconify=io.default,x.registerIcon=io.register,x.stringKey=bo.default,x.synoIdMixin=Wi.default,x.uuid=Fi.default,x.useConfigConsumer=Hs.useConfigConsumer,x.inject=ra.inject,x.provide=ra.provide,x.SelectStrategy=Vi.SelectStrategy,x.eventToSelectStrategy=Vi.eventToSelectStrategy,x.isSelectOneStrategy=Vi.isSelectOneStrategy,x.isSelectRangeStrategy=Vi.isSelectRangeStrategy,x.selectable=Vi.selectable,x.NOTIFICATION_INJECT_SYMBOL=qa.NOTIFICATION_INJECT_SYMBOL,x.AppWindowName=Ya.AppWindowName,x.ModalWindowName=Ya.ModalWindowName,x.WINDOW_INJECT_SYMBOL=Ya.WINDOW_INJECT_SYMBOL,x.WindowName=Ya.WindowName,x.toastOffset=Ya.toastOffset}(RN)),RN}ab.exports;var XJ;function _0e(){return XJ||(XJ=1,function(x,M){(()=>{var k={65682:function(E){E.exports=function(){var A=function(be,Ee,Re,Ne){for(Re=Re||{},Ne=be.length;Ne--;Re[be[Ne]]=Ee);return Re},u=[1,3],o=[1,4],S=[1,5],_=[1,7],p=[1,19],f=[1,11],y=[1,12],d=[1,13],v=[1,14],b=[1,15],s=[1,16],l=[1,17],w=[1,18],I=[1,20],C=[1,27],h=[1,26],c=[1,22],m=[1,23],T=[1,24],D=[1,25],O=[1,28],N=[1,29],z=[1,30],H=[1,31],$=[1,32],V=[1,33],P=[1,34],U=[1,35],Y=[5,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,38],Z=[1,43],X=[1,44],J=[5,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,25,36,38],q=[5,7,8,9,11,12,13,14,15,16,17,18,19,20,21,38],te=[25,36],re=[1,66],ie=[25,36,38],ne=[7,38],le=[5,7,8,9,12,13,14,15,16,17,18,19,20,38],fe=[5,7,8,9,14,15,16,17,18,19,20,38],we=[5,7,15,16,17,18,19,20,38],pe={trace:function(){},yy:{},symbols_:{error:2,formula:3,expression:4,EOF:5,"(":6,")":7,"-":8,"+":9,":":10,"^":11,"*":12,"/":13,"&":14,"<>":15,"<=":16,">=":17,"=":18,"<":19,">":20,"%":21,constant:22,"{":23,listrows:24,"}":25,cellref:26,FUNC_NAME:27,arglist:28,name:29,FUNCTION:30,ERROR:31,LOGIC:32,NUMBER:33,STRING:34,listrow:35,SEMICOLON:36,listelem:37,COMMA:38,CELL:39,COLRANGECELL:40,ROWRANGECELL:41,SHEETNAME:42,VARIABLE:43,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",6:"(",7:")",8:"-",9:"+",10:":",11:"^",12:"*",13:"/",14:"&",15:"<>",16:"<=",17:">=",18:"=",19:"<",20:">",21:"%",23:"{",25:"}",30:"FUNCTION",31:"ERROR",32:"LOGIC",33:"NUMBER",34:"STRING",36:"SEMICOLON",38:"COMMA",39:"CELL",40:"COLRANGECELL",41:"ROWRANGECELL",42:"SHEETNAME",43:"VARIABLE"},productions_:[0,[3,2],[4,3],[4,2],[4,2],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,2],[4,1],[4,3],[4,1],[4,4],[4,1],[27,1],[22,1],[22,1],[22,1],[22,1],[24,1],[24,3],[35,1],[35,3],[37,1],[37,2],[37,2],[28,0],[28,1],[28,2],[28,3],[26,1],[26,1],[26,1],[26,2],[26,2],[26,2],[29,1],[29,2]],performAction:function(be,Ee,Re,Ne,Le,Se,Ie){var _e=Se.length-1;switch(Le){case 1:return Se[_e-1];case 2:this.$=Se[_e-1];break;case 3:this.$=Ne.handler.callOperator("invert",[Se[_e]]);break;case 4:this.$=Ne.handler.callOperator("plus",[Se[_e]]);break;case 5:Ne.handler.addCellRef(Se[_e-2],Se[_e]),this.$=Se[_e-2];break;case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:this.$=Ne.handler.callOperator(Se[_e-1],[Se[_e-2],Se[_e]]);break;case 18:this.$=Ne.handler.callOperator(Se[_e],[Se[_e-1]]);break;case 19:this.$=Ne.handler.createExpr(Se[_e]);break;case 20:this.$=Ne.handler.createConstantArrayExpr(Se[_e-1]);break;case 21:case 23:case 33:this.$=Se[_e];break;case 22:Ne.handler.leaveFunction(Se[_e-3]),this.$=Ne.handler.callFunction(Se[_e-3].toUpperCase(),Se[_e-1],Ne);break;case 24:this.$=Se[_e],Ne.handler.enterFunction(Se[_e].toUpperCase());break;case 25:this.$=Ne.handler.getErrorFromText(Se[_e].toUpperCase());break;case 26:this.$=Se[_e].toUpperCase()==="TRUE";break;case 27:case 35:this.$=Ne.handler.numberify(Se[_e]);break;case 28:this.$=Ne.handler.extractString(Se[_e]);break;case 29:case 31:this.$=[Se[_e]];break;case 30:case 32:Se[_e-2].push(Se[_e]),this.$=Se[_e-2];break;case 34:this.$=-Ne.handler.numberify(Se[_e]);break;case 36:this.$=Ne.handler.createArgs();break;case 37:this.$=Ne.handler.createArgs(Se[_e]);break;case 38:Se[_e-1].length===0&&Ne.handler.pushArgs(Se[_e-1],Ne.handler.createExpr()),Ne.handler.pushArgs(Se[_e-1],Ne.handler.createExpr());break;case 39:Se[_e-2].length===0&&Ne.handler.pushArgs(Se[_e-2],Ne.handler.createExpr()),Ne.handler.pushArgs(Se[_e-2],Se[_e]);break;case 40:this.$=Ne.handler.createCellRefExpr(Se[_e]);break;case 41:this.$=Ne.handler.createColRefExpr(Se[_e]);break;case 42:this.$=Ne.handler.createRowRefExpr(Se[_e]);break;case 43:this.$=Ne.handler.createCellRefExpr(Se[_e],Se[_e-1]);break;case 44:this.$=Ne.handler.createColRefExpr(Se[_e],Se[_e-1]);break;case 45:this.$=Ne.handler.createRowRefExpr(Se[_e],Se[_e-1]);break;case 46:this.$=Ne.handler.getVariableExpr(Se[_e]);break;case 47:this.$=Ne.handler.getVariableExpr(Se[_e],Se[_e-1].slice(0,-1))}},table:[{3:1,4:2,6:u,8:o,9:S,22:6,23:_,26:8,27:9,29:10,30:p,31:f,32:y,33:d,34:v,39:b,40:s,41:l,42:w,43:I},{1:[3]},{5:[1,21],8:C,9:h,10:c,11:m,12:T,13:D,14:O,15:N,16:z,17:H,18:$,19:V,20:P,21:U},{4:36,6:u,8:o,9:S,22:6,23:_,26:8,27:9,29:10,30:p,31:f,32:y,33:d,34:v,39:b,40:s,41:l,42:w,43:I},{4:37,6:u,8:o,9:S,22:6,23:_,26:8,27:9,29:10,30:p,31:f,32:y,33:d,34:v,39:b,40:s,41:l,42:w,43:I},{4:38,6:u,8:o,9:S,22:6,23:_,26:8,27:9,29:10,30:p,31:f,32:y,33:d,34:v,39:b,40:s,41:l,42:w,43:I},A(Y,[2,19]),{8:Z,9:X,22:42,24:39,31:f,32:y,33:d,34:v,35:40,37:41},A(Y,[2,21]),{6:[1,45]},A(Y,[2,23]),A(J,[2,25]),A(J,[2,26]),A(J,[2,27]),A(J,[2,28]),A(Y,[2,40]),A(Y,[2,41]),A(Y,[2,42]),{39:[1,46],40:[1,47],41:[1,48],43:[1,49]},{6:[2,24]},A(Y,[2,46]),{1:[2,1]},{4:50,6:u,8:o,9:S,22:6,23:_,26:8,27:9,29:10,30:p,31:f,32:y,33:d,34:v,39:b,40:s,41:l,42:w,43:I},{4:51,6:u,8:o,9:S,22:6,23:_,26:8,27:9,29:10,30:p,31:f,32:y,33:d,34:v,39:b,40:s,41:l,42:w,43:I},{4:52,6:u,8:o,9:S,22:6,23:_,26:8,27:9,29:10,30:p,31:f,32:y,33:d,34:v,39:b,40:s,41:l,42:w,43:I},{4:53,6:u,8:o,9:S,22:6,23:_,26:8,27:9,29:10,30:p,31:f,32:y,33:d,34:v,39:b,40:s,41:l,42:w,43:I},{4:54,6:u,8:o,9:S,22:6,23:_,26:8,27:9,29:10,30:p,31:f,32:y,33:d,34:v,39:b,40:s,41:l,42:w,43:I},{4:55,6:u,8:o,9:S,22:6,23:_,26:8,27:9,29:10,30:p,31:f,32:y,33:d,34:v,39:b,40:s,41:l,42:w,43:I},{4:56,6:u,8:o,9:S,22:6,23:_,26:8,27:9,29:10,30:p,31:f,32:y,33:d,34:v,39:b,40:s,41:l,42:w,43:I},{4:57,6:u,8:o,9:S,22:6,23:_,26:8,27:9,29:10,30:p,31:f,32:y,33:d,34:v,39:b,40:s,41:l,42:w,43:I},{4:58,6:u,8:o,9:S,22:6,23:_,26:8,27:9,29:10,30:p,31:f,32:y,33:d,34:v,39:b,40:s,41:l,42:w,43:I},{4:59,6:u,8:o,9:S,22:6,23:_,26:8,27:9,29:10,30:p,31:f,32:y,33:d,34:v,39:b,40:s,41:l,42:w,43:I},{4:60,6:u,8:o,9:S,22:6,23:_,26:8,27:9,29:10,30:p,31:f,32:y,33:d,34:v,39:b,40:s,41:l,42:w,43:I},{4:61,6:u,8:o,9:S,22:6,23:_,26:8,27:9,29:10,30:p,31:f,32:y,33:d,34:v,39:b,40:s,41:l,42:w,43:I},{4:62,6:u,8:o,9:S,22:6,23:_,26:8,27:9,29:10,30:p,31:f,32:y,33:d,34:v,39:b,40:s,41:l,42:w,43:I},A(Y,[2,18]),{7:[1,63],8:C,9:h,10:c,11:m,12:T,13:D,14:O,15:N,16:z,17:H,18:$,19:V,20:P,21:U},A(q,[2,3],{10:c}),A(q,[2,4],{10:c}),{25:[1,64],36:[1,65]},A(te,[2,29],{38:re}),A(ie,[2,31]),A(ie,[2,33]),{33:[1,67]},{33:[1,68]},A(ne,[2,36],{22:6,26:8,27:9,29:10,28:69,4:70,6:u,8:o,9:S,23:_,30:p,31:f,32:y,33:d,34:v,39:b,40:s,41:l,42:w,43:I}),A(Y,[2,43]),A(Y,[2,44]),A(Y,[2,45]),A(Y,[2,47]),A(Y,[2,5]),A([5,7,8,9,11,12,13,14,15,16,17,18,19,20,38],[2,6],{10:c,21:U}),A(le,[2,7],{10:c,11:m,21:U}),A(le,[2,8],{10:c,11:m,21:U}),A(fe,[2,9],{10:c,11:m,12:T,13:D,21:U}),A(fe,[2,10],{10:c,11:m,12:T,13:D,21:U}),A([5,7,14,15,16,17,18,19,20,38],[2,11],{8:C,9:h,10:c,11:m,12:T,13:D,21:U}),A(we,[2,12],{8:C,9:h,10:c,11:m,12:T,13:D,14:O,21:U}),A(we,[2,13],{8:C,9:h,10:c,11:m,12:T,13:D,14:O,21:U}),A(we,[2,14],{8:C,9:h,10:c,11:m,12:T,13:D,14:O,21:U}),A(we,[2,15],{8:C,9:h,10:c,11:m,12:T,13:D,14:O,21:U}),A(we,[2,16],{8:C,9:h,10:c,11:m,12:T,13:D,14:O,21:U}),A(we,[2,17],{8:C,9:h,10:c,11:m,12:T,13:D,14:O,21:U}),A(Y,[2,2]),A(Y,[2,20]),{8:Z,9:X,22:42,31:f,32:y,33:d,34:v,35:71,37:41},{8:Z,9:X,22:42,31:f,32:y,33:d,34:v,37:72},A(ie,[2,34]),A(ie,[2,35]),{7:[1,73],38:[1,74]},A(ne,[2,37],{8:C,9:h,10:c,11:m,12:T,13:D,14:O,15:N,16:z,17:H,18:$,19:V,20:P,21:U}),A(te,[2,30],{38:re}),A(ie,[2,32]),A(Y,[2,22]),A(ne,[2,38],{22:6,26:8,27:9,29:10,4:75,6:u,8:o,9:S,23:_,30:p,31:f,32:y,33:d,34:v,39:b,40:s,41:l,42:w,43:I}),A(ne,[2,39],{8:C,9:h,10:c,11:m,12:T,13:D,14:O,15:N,16:z,17:H,18:$,19:V,20:P,21:U})],defaultActions:{19:[2,24],21:[2,1]},parseError:function(be,Ee){if(Ee.recoverable)this.trace(be);else{var Re=Error(be);throw Re.hash=Ee,Re}},parse:function(be){var Ee=this,Re=[0],Ne=[null],Le=[],Se=this.table,Ie="",_e=0,Ae=0,ue=0,ke=Le.slice.call(arguments,1),Pe=Object.create(this.lexer),Ve={yy:{}};for(var je in this.yy)Object.prototype.hasOwnProperty.call(this.yy,je)&&(Ve.yy[je]=this.yy[je]);Pe.setInput(be,Ve.yy),Ve.yy.lexer=Pe,Ve.yy.parser=this,Pe.yylloc===void 0&&(Pe.yylloc={});var it=Pe.yylloc;Le.push(it);var rt=Pe.options&&Pe.options.ranges;typeof Ve.yy.parseError=="function"?this.parseError=Ve.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var mt,yt,st,Qe,At,Xt,cn,Sn,Vn,bn={};;){if(st=Re[Re.length-1],this.defaultActions[st]?Qe=this.defaultActions[st]:(mt==null&&(mt=function(){var pn;return typeof(pn=Pe.lex()||1)!="number"&&(pn=Ee.symbols_[pn]||pn),pn}()),Qe=Se[st]&&Se[st][mt]),Qe===void 0||!Qe.length||!Qe[0]){var En="";for(Xt in Vn=[],Se[st])this.terminals_[Xt]&&Xt>2&&Vn.push("'"+this.terminals_[Xt]+"'");En=Pe.showPosition?"Parse error on line "+(_e+1)+`:
`+Pe.showPosition()+`
Expecting `+Vn.join(", ")+", got '"+(this.terminals_[mt]||mt)+"'":"Parse error on line "+(_e+1)+": Unexpected "+(mt==1?"end of input":"'"+(this.terminals_[mt]||mt)+"'"),this.parseError(En,{text:Pe.match,token:this.terminals_[mt]||mt,line:Pe.yylineno,loc:it,expected:Vn})}if(Qe[0]instanceof Array&&Qe.length>1)throw Error("Parse Error: multiple actions possible at state: "+st+", token: "+mt);switch(Qe[0]){case 1:Re.push(mt),Ne.push(Pe.yytext),Le.push(Pe.yylloc),Re.push(Qe[1]),mt=null,yt?(mt=yt,yt=null):(Ae=Pe.yyleng,Ie=Pe.yytext,_e=Pe.yylineno,it=Pe.yylloc,ue>0);break;case 2:if(cn=this.productions_[Qe[1]][1],bn.$=Ne[Ne.length-cn],bn._$={first_line:Le[Le.length-(cn||1)].first_line,last_line:Le[Le.length-1].last_line,first_column:Le[Le.length-(cn||1)].first_column,last_column:Le[Le.length-1].last_column},rt&&(bn._$.range=[Le[Le.length-(cn||1)].range[0],Le[Le.length-1].range[1]]),(At=this.performAction.apply(bn,[Ie,Ae,_e,Ve.yy,Qe[1],Ne,Le].concat(ke)))!==void 0)return At;cn&&(Re=Re.slice(0,-1*cn*2),Ne=Ne.slice(0,-1*cn),Le=Le.slice(0,-1*cn)),Re.push(this.productions_[Qe[1]][0]),Ne.push(bn.$),Le.push(bn._$),Sn=Se[Re[Re.length-2]][Re[Re.length-1]],Re.push(Sn);break;case 3:return!0}}return!0}};function ve(){this.yy={}}return ve.prototype=pe,pe.Parser=ve,new ve}()},64806:function(E,A){(function(u){var o=typeof Uint8Array<"u"?Uint8Array:Array;function S(_){var p=_.charCodeAt(0);return p===43||p===45?62:p===47||p===95?63:p<48?-1:p<58?p-48+26+26:p<91?p-65:p<123?p-97+26:void 0}u.toByteArray=function(_){if(_.length%4>0)throw Error("Invalid string. Length must be a multiple of 4");var p,f,y,d,v,b,s=_.length;v=_.charAt(s-2)==="="?2:+(_.charAt(s-1)==="="),b=new o(3*_.length/4-v),y=v>0?_.length-4:_.length;var l=0;function w(I){b[l++]=I}for(p=0,f=0;p<y;p+=4,f+=3)w((16711680&(d=S(_.charAt(p))<<18|S(_.charAt(p+1))<<12|S(_.charAt(p+2))<<6|S(_.charAt(p+3))))>>16),w((65280&d)>>8),w(255&d);return v===2?w(255&(d=S(_.charAt(p))<<2|S(_.charAt(p+1))>>4)):v===1&&(w((d=S(_.charAt(p))<<10|S(_.charAt(p+1))<<4|S(_.charAt(p+2))>>2)>>8&255),w(255&d)),b},u.fromByteArray=function(_){var p,f,y,d,v=_.length%3,b="";function s(l){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(l)}for(f=0,d=_.length-v;f<d;f+=3)b+=s((p=y=(_[f]<<16)+(_[f+1]<<8)+_[f+2])>>18&63)+s(p>>12&63)+s(p>>6&63)+s(63&p);switch(v){case 1:b+=s((y=_[_.length-1])>>2),b+=s(y<<4&63),b+="==";break;case 2:b+=s((y=(_[_.length-2]<<8)+_[_.length-1])>>10),b+=s(y>>4&63),b+=s(y<<2&63),b+="="}return b}})(A)},7287:function(E,A){var u;u=function(o){o.version="1.0.2";var S,_,p,f,y,d,v,b,s,l,w,I,C,h,c,m,T=Math;function D(P,U){for(var Y=0,Z=0;Y<P.length;++Y)Z=U*Z+P[Y];return Z}function O(P,U,Y,Z,X){if(U===0)return Y;if(U===1)return Z;for(var J=2/P,q=Z,te=1;te<U;++te)q=Z*te*J+X*Y,Y=Z,Z=q;return q}function N(P,U,Y,Z,X){return function(J,q){if(Z){if(J===0)return Z==1?-1/0:1/0;if(J<0)return NaN}if(q===0)return P(J);if(q===1)return U(J);if(q<0)return NaN;q|=0;var te=P(J),re=U(J);return O(J,q,te,re,X)}}var z=function(){var P=[57568490574,-13362590354,6516196407e-1,-1121442418e-2,77392.33017,-184.9052456].reverse(),U=[57568490411,1029532985,9494680718e-3,59272.64853,267.8532712,1].reverse(),Y=[1,-.001098628627,2734510407e-14,-2073370639e-15,2093887211e-16].reverse(),Z=[-.01562499995,.0001430488765,-6911147651e-15,7621095161e-16,-934935152e-16].reverse();function X(ne){var le=0,fe=0,we=0,pe=ne*ne;if(ne<8)le=(fe=D(P,pe))/(we=D(U,pe));else{var ve=ne-.785398164;fe=D(Y,pe=64/pe),we=D(Z,pe),le=T.sqrt(.636619772/ne)*(T.cos(ve)*fe-T.sin(ve)*we*8/ne)}return le}var J=[72362614232,-7895059235,2423968531e-1,-2972611439e-3,15704.4826,-30.16036606].reverse(),q=[144725228442,2300535178,1858330474e-2,99447.43394,376.9991397,1].reverse(),te=[1,.00183105,-3516396496e-14,2457520174e-15,-240337019e-15].reverse(),re=[.04687499995,-.0002002690873,8449199096e-15,-88228987e-14,105787412e-15].reverse();function ie(ne){var le=0,fe=0,we=0,pe=ne*ne,ve=T.abs(ne)-2.356194491;return 8>Math.abs(ne)?le=(fe=ne*D(J,pe))/(we=D(q,pe)):(fe=D(te,pe=64/pe),we=D(re,pe),le=T.sqrt(.636619772/T.abs(ne))*(T.cos(ve)*fe-T.sin(ve)*we*8/T.abs(ne)),ne<0&&(le=-le)),le}return function ne(le,fe){if(fe=Math.round(fe),!isFinite(le))return isNaN(le)?le:0;if(fe<0)return(fe%2?-1:1)*ne(le,-fe);if(le<0)return(fe%2?-1:1)*ne(-le,fe);if(fe===0)return X(le);if(fe===1)return ie(le);if(le===0)return 0;var we=0;if(le>fe)we=O(le,fe,X(le),ie(le),-1);else{for(var pe=2*T.floor((fe+T.floor(T.sqrt(40*fe)))/2),ve=!1,be=0,Ee=0,Re=1,Ne=0,Le=2/le,Se=pe;Se>0;Se--)Ne=Se*Le*Re-be,be=Re,Re=Ne,T.abs(Re)>1e10&&(Re*=1e-10,be*=1e-10,we*=1e-10,Ee*=1e-10),ve&&(Ee+=Re),ve=!ve,Se==fe&&(we=be);we/=Ee=2*Ee-Re}return we}}(),H=(S=[-2957821389,7062834065,-5123598036e-1,1087988129e-2,-86327.92757,228.4622733].reverse(),_=[40076544269,7452499648e-1,7189466438e-3,47447.2647,226.1030244,1].reverse(),p=[1,-.001098628627,2734510407e-14,-2073370639e-15,2093887211e-16].reverse(),f=[-.01562499995,.0001430488765,-6911147651e-15,7621095161e-16,-934945152e-16].reverse(),y=[-4900604943e3,127527439e4,-51534381390,7349264551e-1,-4237922726e-3,8511.937935].reverse(),d=[249958057e5,424441966400,3733650367,2245904002e-2,102042.605,354.9632885,1].reverse(),v=[1,.00183105,-3516396496e-14,2457520174e-15,-240337019e-15].reverse(),b=[.04687499995,-.0002002690873,8449199096e-15,-88228987e-14,105787412e-15].reverse(),N(function(P){var U=0,Y=0,Z=0,X=P*P,J=P-.785398164;return P<8?U=(Y=D(S,X))/(Z=D(_,X))+.636619772*z(P,0)*T.log(P):(Y=D(p,X=64/X),Z=D(f,X),U=T.sqrt(.636619772/P)*(T.sin(J)*Y+T.cos(J)*Z*8/P)),U},function(P){var U=0,Y=0,Z=0,X=P*P,J=P-2.356194491;return P<8?U=(Y=P*D(y,X))/(Z=D(d,X))+.636619772*(z(P,1)*T.log(P)-1/P):(Y=D(v,X=64/X),Z=D(b,X),U=T.sqrt(.636619772/P)*(T.sin(J)*Y+T.cos(J)*Z*8/P)),U},"BESSELY",1,-1)),$=(s=[1,3.5156229,3.0899424,1.2067492,.2659732,.0360768,.0045813].reverse(),l=[.39894228,.01328592,.00225319,-.00157565,.00916281,-.02057706,.02635537,-.01647633,.00392377].reverse(),w=[.5,.87890594,.51498869,.15084934,.02658733,.00301532,32411e-8].reverse(),I=[.39894228,-.03988024,-.00362018,.00163801,-.01031555,.02282967,-.02895312,.01787654,-.00420059].reverse(),function P(U,Y){if((Y=Math.round(Y))===0)return U<=3.75?D(s,U*U/14.0625):T.exp(T.abs(U))/T.sqrt(T.abs(U))*D(l,3.75/T.abs(U));if(Y===1)return U<3.75?U*D(w,U*U/14.0625):(U<0?-1:1)*T.exp(T.abs(U))/T.sqrt(T.abs(U))*D(I,3.75/T.abs(U));if(Y<0)return NaN;if(T.abs(U)===0)return 0;if(U==1/0)return 1/0;var Z,X=0,J=2/T.abs(U),q=0,te=1,re=0;for(Z=2*T.round((Y+T.round(T.sqrt(40*Y)))/2);Z>0;Z--)re=Z*J*te+q,q=te,te=re,T.abs(te)>1e10&&(te*=1e-10,q*=1e-10,X*=1e-10),Z==Y&&(X=q);return X*=P(U,0)/te,U<0&&Y%2?-X:X}),V=(C=[-.57721566,.4227842,.23069756,.0348859,.00262698,1075e-7,74e-7].reverse(),h=[1.25331414,-.07832358,.02189568,-.01062446,.00587872,-.0025154,53208e-8].reverse(),c=[1,.15443144,-.67278579,-.18156897,-.01919402,-.00110404,-4686e-8].reverse(),m=[1.25331414,.23498619,-.0365562,.01504268,-.00780353,.00325614,-68245e-8].reverse(),N(function(P){return P<=2?-T.log(P/2)*$(P,0)+D(C,P*P/4):T.exp(-P)/T.sqrt(P)*D(h,2/P)},function(P){return P<=2?T.log(P/2)*$(P,1)+1/P*D(c,P*P/4):T.exp(-P)/T.sqrt(P)*D(m,2/P)},"BESSELK",2,1));o.besselj=z,o.bessely=H,o.besseli=$,o.besselk=V},u(typeof DO_NOT_EXPORT_BESSEL>"u"?A:{})},6949:function(E){(function(A){var u,o="[big.js] ",S=o+"Invalid ",_=S+"decimal places",p=S+"rounding mode",f=o+"Division by zero",y={},d=void 0,v=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function b(l,w,I,C){var h=l.c,c=l.e+w+1;if(c<h.length){if(I===1)C=h[c]>=5;else if(I===2)C=h[c]>5||h[c]==5&&(C||c<0||h[c+1]!==d||1&h[c-1]);else if(I===3)C=C||!!h[0];else if(C=!1,I!==0)throw Error(p);if(c<1)h.length=1,C?(l.e=-w,h[0]=1):h[0]=l.e=0;else{if(h.length=c--,C)for(;++h[c]>9;)h[c]=0,c--||(++l.e,h.unshift(1));for(c=h.length;!h[--c];)h.pop()}}else if(I<0||I>3||I!==~~I)throw Error(p);return l}function s(l,w,I,C){var h,c,m=l.constructor,T=!l.c[0];if(I!==d){if(I!==~~I||I<(w==3)||I>1e6)throw Error(w==3?S+"precision":_);for(I=C-(l=new m(l)).e,l.c.length>++C&&b(l,I,m.RM),w==2&&(C=l.e+I+1);l.c.length<C;)l.c.push(0)}if(h=l.e,I=(c=l.c.join("")).length,w!=2&&(w==1||w==3&&C<=h||h<=m.NE||h>=m.PE))c=c.charAt(0)+(I>1?"."+c.slice(1):"")+(h<0?"e":"e+")+h;else if(h<0){for(;++h;)c="0"+c;c="0."+c}else if(h>0)if(++h>I)for(h-=I;h--;)c+="0";else h<I&&(c=c.slice(0,h)+"."+c.slice(h));else I>1&&(c=c.charAt(0)+"."+c.slice(1));return l.s<0&&(!T||w==4)?"-"+c:c}y.abs=function(){var l=new this.constructor(this);return l.s=1,l},y.cmp=function(l){var w,I=this.c,C=(l=new this.constructor(l)).c,h=this.s,c=l.s,m=this.e,T=l.e;if(!I[0]||!C[0])return I[0]?h:C[0]?-c:0;if(h!=c)return h;if(w=h<0,m!=T)return m>T^w?1:-1;for(h=-1,c=(m=I.length)<(T=C.length)?m:T;++h<c;)if(I[h]!=C[h])return I[h]>C[h]^w?1:-1;return m==T?0:m>T^w?1:-1},y.div=function(l){var w=this.constructor,I=this.c,C=(l=new w(l)).c,h=this.s==l.s?1:-1,c=w.DP;if(c!==~~c||c<0||c>1e6)throw Error(_);if(!C[0])throw Error(f);if(!I[0])return new w(0*h);var m,T,D,O,N,z=C.slice(),H=m=C.length,$=I.length,V=I.slice(0,m),P=V.length,U=l,Y=U.c=[],Z=0,X=c+(U.e=this.e-l.e)+1;for(U.s=h,h=X<0?0:X,z.unshift(0);P++<m;)V.push(0);do{for(D=0;D<10;D++){if(m!=(P=V.length))O=m>P?1:-1;else for(N=-1,O=0;++N<m;)if(C[N]!=V[N]){O=C[N]>V[N]?1:-1;break}if(O<0){for(T=P==m?C:z;P;){if(V[--P]<T[P]){for(N=P;N&&!V[--N];)V[N]=9;--V[N],V[P]+=10}V[P]-=T[P]}for(;!V[0];)V.shift()}else break}Y[Z++]=O?D:++D,V[0]&&O?V[P]=I[H]||0:V=[I[H]]}while((H++<$||V[0]!==d)&&h--);return!Y[0]&&Z!=1&&(Y.shift(),U.e--),Z>X&&b(U,c,w.RM,V[0]!==d),U},y.eq=function(l){return!this.cmp(l)},y.gt=function(l){return this.cmp(l)>0},y.gte=function(l){return this.cmp(l)>-1},y.lt=function(l){return 0>this.cmp(l)},y.lte=function(l){return 1>this.cmp(l)},y.minus=y.sub=function(l){var w,I,C,h,c=this.constructor,m=this.s,T=(l=new c(l)).s;if(m!=T)return l.s=-T,this.plus(l);var D=this.c.slice(),O=this.e,N=l.c,z=l.e;if(!D[0]||!N[0])return N[0]?(l.s=-T,l):new c(D[0]?this:0);if(m=O-z){for((h=m<0)?(m=-m,C=D):(z=O,C=N),C.reverse(),T=m;T--;)C.push(0);C.reverse()}else for(I=((h=D.length<N.length)?D:N).length,m=T=0;T<I;T++)if(D[T]!=N[T]){h=D[T]<N[T];break}if(h&&(C=D,D=N,N=C,l.s=-l.s),(T=(I=N.length)-(w=D.length))>0)for(;T--;)D[w++]=0;for(T=w;I>m;){if(D[--I]<N[I]){for(w=I;w&&!D[--w];)D[w]=9;--D[w],D[I]+=10}D[I]-=N[I]}for(;D[--T]===0;)D.pop();for(;D[0]===0;)D.shift(),--z;return D[0]||(l.s=1,D=[z=0]),l.c=D,l.e=z,l},y.mod=function(l){var w,I=this,C=I.constructor,h=I.s,c=(l=new C(l)).s;if(!l.c[0])throw Error(f);return I.s=l.s=1,w=l.cmp(I)==1,I.s=h,l.s=c,w?new C(I):(h=C.DP,c=C.RM,C.DP=C.RM=0,I=I.div(l),C.DP=h,C.RM=c,this.minus(I.times(l)))},y.plus=y.add=function(l){var w,I=this.constructor,C=this.s,h=(l=new I(l)).s;if(C!=h)return l.s=-h,this.minus(l);var c=this.e,m=this.c,T=l.e,D=l.c;if(!m[0]||!D[0])return D[0]?l:new I(m[0]?this:0*C);if(m=m.slice(),C=c-T){for(C>0?(T=c,w=D):(C=-C,w=m),w.reverse();C--;)w.push(0);w.reverse()}for(m.length-D.length<0&&(w=D,D=m,m=w),C=D.length,h=0;C;m[C]%=10)h=(m[--C]=m[C]+D[C]+h)/10|0;for(h&&(m.unshift(h),++T),C=m.length;m[--C]===0;)m.pop();return l.c=m,l.e=T,l},y.pow=function(l){var w=this,I=new w.constructor(1),C=I,h=l<0;if(l!==~~l||l<-1e6||l>1e6)throw Error(S+"exponent");for(h&&(l=-l);1&l&&(C=C.times(w)),l>>=1;)w=w.times(w);return h?I.div(C):C},y.round=function(l,w){var I=this.constructor;if(l===d)l=0;else if(l!==~~l||l<-1e6||l>1e6)throw Error(_);return b(new I(this),l,w===d?I.RM:w)},y.sqrt=function(){var l,w,I,C=this.constructor,h=this.s,c=this.e,m=new C(.5);if(!this.c[0])return new C(this);if(h<0)throw Error(o+"No square root");(h=Math.sqrt(this+""))===0||h===1/0?((w=this.c.join("")).length+c&1||(w+="0"),c=((c+1)/2|0)-(c<0||1&c),l=new C(((h=Math.sqrt(w))==1/0?"1e":(h=h.toExponential()).slice(0,h.indexOf("e")+1))+c)):l=new C(h),c=l.e+(C.DP+=4);do I=l,l=m.times(I.plus(this.div(I)));while(I.c.slice(0,c).join("")!==l.c.slice(0,c).join(""));return b(l,C.DP-=4,C.RM)},y.times=y.mul=function(l){var w,I=this.constructor,C=this.c,h=(l=new I(l)).c,c=C.length,m=h.length,T=this.e,D=l.e;if(l.s=this.s==l.s?1:-1,!C[0]||!h[0])return new I(0*l.s);for(l.e=T+D,c<m&&(w=C,C=h,h=w,D=c,c=m,m=D),w=Array(D=c+m);D--;)w[D]=0;for(T=m;T--;){for(m=0,D=c+T;D>T;)m=w[D]+h[T]*C[D-T-1]+m,w[D--]=m%10,m=m/10|0;w[D]=(w[D]+m)%10}for(m?++l.e:w.shift(),T=w.length;!w[--T];)w.pop();return l.c=w,l},y.toExponential=function(l){return s(this,1,l,l)},y.toFixed=function(l){return s(this,2,l,this.e+l)},y.toPrecision=function(l){return s(this,3,l,l-1)},y.toString=function(){return s(this)},y.valueOf=y.toJSON=function(){return s(this,4)},(u=function l(){function w(I){if(!(this instanceof w))return I===d?l():new w(I);I instanceof w?(this.s=I.s,this.e=I.e,this.c=I.c.slice()):function(C,h){var c,m,T;if(h===0&&1/h<0)h="-0";else if(!v.test(h+=""))throw Error(S+"number");for(C.s=h.charAt(0)=="-"?(h=h.slice(1),-1):1,(c=h.indexOf("."))>-1&&(h=h.replace(".","")),(m=h.search(/e/i))>0?(c<0&&(c=m),c+=+h.slice(m+1),h=h.substring(0,m)):c<0&&(c=h.length),T=h.length,m=0;m<T&&h.charAt(m)=="0";)++m;if(m==T)C.c=[C.e=0];else{for(;T>0&&h.charAt(--T)=="0";);for(C.e=c-m-1,C.c=[],c=0;m<=T;)C.c[c++]=+h.charAt(m++)}}(this,I),this.constructor=w}return w.prototype=y,w.DP=20,w.RM=1,w.NE=-7,w.PE=21,w.version="5.2.2",w}()).default=u.Big=u,E.exports?E.exports=u:A.Big=u})(this)},38377:function(E,A,u){u.r(A),u.d(A,{generateParserModule:()=>ta,Flat:()=>Ct,MismatchedTokenException:()=>Qr,createToken:()=>On,resolveGrammar:()=>Ca,tokenMatcher:()=>Bt,RepetitionWithSeparator:()=>Jt,tokenName:()=>At,EMPTY_ALT:()=>Nl,serializeProduction:()=>lr,Terminal:()=>nn,CstParser:()=>Lu,Option:()=>bt,EOF:()=>Mt,ParserDefinitionErrorType:()=>D,Repetition:()=>Dt,Rule:()=>wt,VERSION:()=>O,createSyntaxDiagramsCode:()=>ul,defaultLexerErrorProvider:()=>mt,LexerDefinitionErrorType:()=>c,validateGrammar:()=>cc,createTokenInstance:()=>Gt,assignOccurrenceIndices:()=>Pu,EarlyExitException:()=>mh,tokenLabel:()=>Qe,RepetitionMandatory:()=>Rt,generateParserFactory:()=>mi,isRecognitionException:()=>ii,defaultGrammarResolverErrorProvider:()=>hc,NonTerminal:()=>vt,Lexer:()=>st,NoViableAltException:()=>eu,defaultGrammarValidatorErrorProvider:()=>cs,clearCache:()=>na,Parser:()=>Bi,defaultParserErrorProvider:()=>Ql,serializeGrammar:()=>An,Alternation:()=>zt,RepetitionMandatoryWithSeparator:()=>Lt,GAstVisitor:()=>zi,EmbeddedActionsParser:()=>Pl,NotAllInputParsedException:()=>ph});var o,S,_,p,f,y,d,v,b,s,l,w,I,C,h,c,m,T,D,O="6.5.0",N=u(46394),z=u(25074),H={},$=new z.RegExpParser;function V(ge){var ae=ge.toString();if(H.hasOwnProperty(ae))return H[ae];var de=$.pattern(ae);return H[ae]=de,de}var P=(o=function(ge,ae){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(de,Ce){de.__proto__=Ce}||function(de,Ce){for(var De in Ce)Ce.hasOwnProperty(De)&&(de[De]=Ce[De])})(ge,ae)},function(ge,ae){function de(){this.constructor=ge}o(ge,ae),ge.prototype=ae===null?Object.create(ae):(de.prototype=ae.prototype,new de)}),U="Complement Sets are not supported for first char optimization",Y=`Unable to use "first char" lexer optimizations:
`;function Z(ge,ae,de){var Ce=Ie(ge);ae[Ce]=Ce,de===!0&&function(De,He){var Ye=String.fromCharCode(De),ut=Ye.toUpperCase();if(ut!==Ye){var dt=Ie(ut.charCodeAt(0));He[dt]=dt}else{var Nt=Ye.toLowerCase();if(Nt!==Ye){var dt=Ie(Nt.charCodeAt(0));He[dt]=dt}}}(ge,ae)}function X(ge,ae){return(0,N.sE)(ge.value,function(de){return typeof de=="number"?(0,N.r3)(ae,de):(0,N.sE)(ae,function(Ce){return de.from<=Ce&&Ce<=de.to})!==void 0})}var J=function(ge){function ae(de){var Ce=ge.call(this)||this;return Ce.targetCharCodes=de,Ce.found=!1,Ce}return P(ae,ge),ae.prototype.visitChildren=function(de){if(this.found!==!0){switch(de.type){case"Lookahead":this.visitLookahead(de);return;case"NegativeLookahead":this.visitNegativeLookahead(de);return}ge.prototype.visitChildren.call(this,de)}},ae.prototype.visitCharacter=function(de){(0,N.r3)(this.targetCharCodes,de.value)&&(this.found=!0)},ae.prototype.visitSet=function(de){de.complement?X(de,this.targetCharCodes)===void 0&&(this.found=!0):X(de,this.targetCharCodes)!==void 0&&(this.found=!0)},ae}(z.BaseRegExpVisitor);function q(ge,ae){if(!(ae instanceof RegExp))return(0,N.sE)(ae,function(De){return(0,N.r3)(ge,De.charCodeAt(0))})!==void 0;var de=V(ae),Ce=new J(ge);return Ce.visit(de),Ce.found}var te=(S=function(ge,ae){return(S=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(de,Ce){de.__proto__=Ce}||function(de,Ce){for(var De in Ce)Ce.hasOwnProperty(De)&&(de[De]=Ce[De])})(ge,ae)},function(ge,ae){function de(){this.constructor=ge}S(ge,ae),ge.prototype=ae===null?Object.create(ae):(de.prototype=ae.prototype,new de)}),re="PATTERN",ie="defaultMode",ne="modes",le=typeof RegExp("(?:)").sticky=="boolean",fe=/[^\\][\$]/,we=/[^\\[][\^]|^\^/;function pe(ge){var ae=ge.ignoreCase?"i":"";return RegExp("^(?:"+ge.source+")",ae)}function ve(ge){var ae=ge.ignoreCase?"iy":"y";return RegExp(""+ge.source,ae)}function be(ge){var ae=ge.PATTERN;if((0,N.Kj)(ae))return!1;if((0,N.mf)(ae)||(0,N.e$)(ae,"exec"))return!0;if((0,N.HD)(ae))return!1;throw Error("non exhaustive match")}function Ee(ge){return!!(0,N.HD)(ge)&&ge.length===1&&ge.charCodeAt(0)}var Re={test:function(ge){for(var ae=ge.length,de=this.lastIndex;de<ae;de++){var Ce=ge.charCodeAt(de);if(Ce===10)return this.lastIndex=de+1,!0;if(Ce===13)return ge.charCodeAt(de+1)===10?this.lastIndex=de+2:this.lastIndex=de+1,!0}return!1},lastIndex:0};function Ne(ge,ae){if((0,N.e$)(ge,"LINE_BREAKS"))return!1;if((0,N.Kj)(ge.PATTERN)){try{q(ae,ge.PATTERN)}catch(de){return{issue:c.IDENTIFY_TERMINATOR,errMsg:de.message}}return!1}if((0,N.HD)(ge.PATTERN))return!1;if(be(ge))return{issue:c.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}function Le(ge){return(0,N.UI)(ge,function(ae){return(0,N.HD)(ae)&&ae.length>0?ae.charCodeAt(0):ae})}function Se(ge,ae,de){ge[ae]===void 0?ge[ae]=[de]:ge[ae].push(de)}function Ie(ge){return ge<256?ge:_e[ge]}var _e=[];function Ae(ge,ae){var de=ge.tokenTypeIdx;return de===ae.tokenTypeIdx||ae.isParent===!0&&ae.categoryMatchesMap[de]===!0}function ue(ge,ae){return ge.tokenTypeIdx===ae.tokenTypeIdx}var ke=1,Pe={};function Ve(ge){var ae,de,Ce,De=function(He){for(var Ye=(0,N.Qw)(He),ut=He,dt=!0;dt;){ut=(0,N.oA)((0,N.xH)((0,N.UI)(ut,function(tn){return tn.CATEGORIES})));var Nt=(0,N.e5)(ut,Ye);Ye=Ye.concat(Nt),(0,N.xb)(Nt)?dt=!1:ut=Nt}return Ye}(ge);ae=De,(0,N.Ed)(ae,function(He){var Ye,ut;je(He)||(Pe[ke]=He,He.tokenTypeIdx=ke++),it(He)&&!(0,N.kJ)(He.CATEGORIES)&&(He.CATEGORIES=[He.CATEGORIES]),it(He)||(He.CATEGORIES=[]),Ye=He,(0,N.e$)(Ye,"categoryMatches")||(He.categoryMatches=[]),ut=He,(0,N.e$)(ut,"categoryMatchesMap")||(He.categoryMatchesMap={})}),de=De,(0,N.Ed)(de,function(He){(function Ye(ut,dt){(0,N.Ed)(ut,function(Nt){dt.categoryMatchesMap[Nt.tokenTypeIdx]=!0}),(0,N.Ed)(dt.CATEGORIES,function(Nt){var tn=ut.concat(dt);(0,N.r3)(tn,Nt)||Ye(tn,Nt)})})([],He)}),Ce=De,(0,N.Ed)(Ce,function(He){He.categoryMatches=[],(0,N.Ed)(He.categoryMatchesMap,function(Ye,ut){He.categoryMatches.push(Pe[ut].tokenTypeIdx)})}),(0,N.Ed)(De,function(He){He.isParent=He.categoryMatches.length>0})}function je(ge){return(0,N.e$)(ge,"tokenTypeIdx")}function it(ge){return(0,N.e$)(ge,"CATEGORIES")}function rt(ge){return(0,N.e$)(ge,"tokenTypeIdx")}var mt={buildUnableToPopLexerModeMessage:function(ge){return"Unable to pop Lexer Mode after encountering Token ->"+ge.image+"<- The Mode Stack is empty"},buildUnexpectedCharactersMessage:function(ge,ae,de,Ce,De){return"unexpected character: ->"+ge.charAt(ae)+"<- at offset: "+ae+", skipped "+de+" characters."}};(_=c||(c={}))[_.MISSING_PATTERN=0]="MISSING_PATTERN",_[_.INVALID_PATTERN=1]="INVALID_PATTERN",_[_.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",_[_.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",_[_.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",_[_.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",_[_.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",_[_.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",_[_.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",_[_.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",_[_.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",_[_.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",_[_.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",_[_.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",_[_.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",_[_.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",_[_.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK";var yt={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[`
`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:mt,traceInitPerf:!1,skipValidations:!1};Object.freeze(yt);var st=function(){function ge(ae,de){var Ce=this;if(de===void 0&&(de=yt),this.lexerDefinition=ae,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.config=void 0,this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},typeof de=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object.
a boolean 2nd argument is no longer supported`);this.config=(0,N.TS)(yt,de);var De=this.config.traceInitPerf;De===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof De=="number"&&(this.traceInitMaxIdent=De,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",function(){var He,Ye=!0;Ce.TRACE_INIT("Lexer Config handling",function(){if(Ce.config.lineTerminatorsPattern===yt.lineTerminatorsPattern)Ce.config.lineTerminatorsPattern=Re;else if(Ce.config.lineTerminatorCharacters===yt.lineTerminatorCharacters)throw Error(`Error: Missing <lineTerminatorCharacters> property on the Lexer config.
For details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(de.safeMode&&de.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');Ce.trackStartLines=/full|onlyStart/i.test(Ce.config.positionTracking),Ce.trackEndLines=/full/i.test(Ce.config.positionTracking),(0,N.kJ)(ae)?((He={modes:{}}).modes[ie]=(0,N.Qw)(ae),He[ie]=ie):(Ye=!1,He=(0,N.Cl)(ae))}),Ce.config.skipValidations===!1&&(Ce.TRACE_INIT("performRuntimeChecks",function(){var dt,Nt;Ce.lexerDefinitionErrors=Ce.lexerDefinitionErrors.concat((dt=He,Ce.trackStartLines,Ce.config.lineTerminatorCharacters,Nt=[],(0,N.e$)(dt,ie)||Nt.push({message:"A MultiMode Lexer cannot be initialized without a <"+ie+`> property in its definition
`,type:c.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),(0,N.e$)(dt,ne)||Nt.push({message:"A MultiMode Lexer cannot be initialized without a <"+ne+`> property in its definition
`,type:c.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),(0,N.e$)(dt,ne)&&(0,N.e$)(dt,ie)&&!(0,N.e$)(dt.modes,dt.defaultMode)&&Nt.push({message:"A MultiMode Lexer cannot be initialized with a "+ie+": <"+dt.defaultMode+`>which does not exist
`,type:c.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),(0,N.e$)(dt,ne)&&(0,N.Ed)(dt.modes,function(tn,qt){(0,N.Ed)(tn,function(Vt,Mn){(0,N.o8)(Vt)&&Nt.push({message:"A Lexer cannot be initialized using an undefined Token Type. Mode:"+("<"+qt+"> at index: <")+Mn+`>
`,type:c.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED})})}),Nt))}),Ce.TRACE_INIT("performWarningRuntimeChecks",function(){var dt,Nt,tn,qt,Vt,Mn,Bn,Kn;Ce.lexerDefinitionWarning=Ce.lexerDefinitionWarning.concat((dt=He,Nt=Ce.trackStartLines,tn=Ce.config.lineTerminatorCharacters,qt=[],Vt=!1,Mn=(0,N.oA)((0,N.xH)((0,N.Q8)(dt.modes,function(Jn){return Jn}))),Bn=(0,N.d1)(Mn,function(Jn){return Jn[re]===st.NA}),Kn=Le(tn),Nt&&(0,N.Ed)(Bn,function(Jn){var vn=Ne(Jn,Kn);if(vn!==!1){var Nr={message:function(Jr,Rr){if(Rr.issue===c.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.
The problem is in the <`+Jr.name+`> Token Type
Root cause: `+Rr.errMsg+`.
For details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(Rr.issue===c.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> option.
The problem is in the <`+Jr.name+`> Token Type
For details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}(Jn,vn),type:vn.issue,tokenType:Jn};qt.push(Nr)}else(0,N.e$)(Jn,"LINE_BREAKS")?Jn.LINE_BREAKS===!0&&(Vt=!0):q(Kn,Jn.PATTERN)&&(Vt=!0)}),Nt&&!Vt&&qt.push({message:`Warning: No LINE_BREAKS Found.
This Lexer has been defined to track line and column information,
But none of the Token Types can be identified as matching a line terminator.
See https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#LINE_BREAKS
for details.`,type:c.NO_LINE_BREAKS_FLAGS}),qt))})),He.modes=He.modes?He.modes:{},(0,N.Ed)(He.modes,function(dt,Nt){He.modes[Nt]=(0,N.d1)(dt,function(tn){return(0,N.o8)(tn)})});var ut=(0,N.XP)(He.modes);if((0,N.Ed)(He.modes,function(dt,Nt){Ce.TRACE_INIT("Mode: <"+Nt+"> processing",function(){if(Ce.modes.push(Nt),Ce.config.skipValidations===!1&&Ce.TRACE_INIT("validatePatterns",function(){var qt,Vt,Mn,Bn,Kn,Jn,vn,Nr,Jr,Rr,si,Wr,Pr,_r,vi,Li,ro,ur,Dn,br,nt,_t,ft,Ot,Yt,Cn,Fn,kn,hr,pr,ir,Er,oi;Ce.lexerDefinitionErrors=Ce.lexerDefinitionErrors.concat((qt=[],Kn=dt,Jn=(0,N.hX)(Kn,function(rn){return!(0,N.e$)(rn,re)}),Vt={errors:(0,N.UI)(Jn,function(rn){return{message:"Token Type: ->"+rn.name+"<- missing static 'PATTERN' property",type:c.MISSING_PATTERN,tokenTypes:[rn]}}),valid:(0,N.e5)(Kn,Jn)},qt=qt.concat(Vt.errors),Bn=(vn=Vt.valid,Nr=(0,N.hX)(vn,function(rn){var qn=rn[re];return!(0,N.Kj)(qn)&&!(0,N.mf)(qn)&&!(0,N.e$)(qn,"exec")&&!(0,N.HD)(qn)}),Mn={errors:(0,N.UI)(Nr,function(rn){return{message:"Token Type: ->"+rn.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:c.INVALID_PATTERN,tokenTypes:[rn]}}),valid:(0,N.e5)(vn,Nr)}).valid,qt=(qt=(qt=(qt=(qt=qt.concat(Mn.errors)).concat((Jr=Bn,Rr=[],si=(0,N.hX)(Jr,function(rn){return(0,N.Kj)(rn[re])}),(Rr=(Rr=(Rr=(Rr=Rr.concat((Wr=si,Pr=function(rn){function qn(){var Ln=rn!==null&&rn.apply(this,arguments)||this;return Ln.found=!1,Ln}return te(qn,rn),qn.prototype.visitEndAnchor=function(Ln){this.found=!0},qn}(z.BaseRegExpVisitor),_r=(0,N.hX)(Wr,function(rn){var qn=rn[re];try{var Ln=V(qn),In=new Pr;return In.visit(Ln),In.found}catch{return fe.test(qn.source)}}),(0,N.UI)(_r,function(rn){return{message:`Unexpected RegExp Anchor Error:
Token Type: ->`+rn.name+`<- static 'PATTERN' cannot contain end of input anchor '$'
See sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:c.EOI_ANCHOR_FOUND,tokenTypes:[rn]}})))).concat((vi=si,Li=function(rn){function qn(){var Ln=rn!==null&&rn.apply(this,arguments)||this;return Ln.found=!1,Ln}return te(qn,rn),qn.prototype.visitStartAnchor=function(Ln){this.found=!0},qn}(z.BaseRegExpVisitor),ro=(0,N.hX)(vi,function(rn){var qn=rn[re];try{var Ln=V(qn),In=new Li;return In.visit(Ln),In.found}catch{return we.test(qn.source)}}),(0,N.UI)(ro,function(rn){return{message:`Unexpected RegExp Anchor Error:
Token Type: ->`+rn.name+`<- static 'PATTERN' cannot contain start of input anchor '^'
See https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:c.SOI_ANCHOR_FOUND,tokenTypes:[rn]}})))).concat((ur=si,Dn=(0,N.hX)(ur,function(rn){var qn=rn[re];return qn instanceof RegExp&&(qn.multiline||qn.global)}),(0,N.UI)(Dn,function(rn){return{message:"Token Type: ->"+rn.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:c.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[rn]}})))).concat((br=si,nt=[],_t=(0,N.UI)(br,function(rn){return(0,N.u4)(br,function(qn,Ln){return rn.PATTERN.source!==Ln.PATTERN.source||(0,N.r3)(nt,Ln)||Ln.PATTERN===st.NA||(nt.push(Ln),qn.push(Ln)),qn},[])}),_t=(0,N.oA)(_t),ft=(0,N.hX)(_t,function(rn){return rn.length>1}),(0,N.UI)(ft,function(rn){var qn=(0,N.UI)(rn,function(Ln){return Ln.name});return{message:"The same RegExp pattern ->"+(0,N.Ps)(rn).PATTERN+"<-has been used in all of the following Token Types: "+qn.join(", ")+" <-",type:c.DUPLICATE_PATTERNS_FOUND,tokenTypes:rn}})))).concat((Ot=si,Yt=(0,N.hX)(Ot,function(rn){return rn[re].test("")}),(0,N.UI)(Yt,function(rn){return{message:"Token Type: ->"+rn.name+"<- static 'PATTERN' must not match an empty string",type:c.EMPTY_MATCH_PATTERN,tokenTypes:[rn]}})))))).concat((Cn=Bn,Fn=(0,N.hX)(Cn,function(rn){if(!(0,N.e$)(rn,"GROUP"))return!1;var qn=rn.GROUP;return qn!==st.SKIPPED&&qn!==st.NA&&!(0,N.HD)(qn)}),(0,N.UI)(Fn,function(rn){return{message:"Token Type: ->"+rn.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:c.INVALID_GROUP_TYPE_FOUND,tokenTypes:[rn]}})))).concat((kn=Bn,hr=ut,pr=(0,N.hX)(kn,function(rn){return rn.PUSH_MODE!==void 0&&!(0,N.r3)(hr,rn.PUSH_MODE)}),(0,N.UI)(pr,function(rn){return{message:"Token Type: ->"+rn.name+"<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->"+rn.PUSH_MODE+"<-which does not exist",type:c.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[rn]}})))).concat((ir=Bn,Er=[],oi=(0,N.u4)(ir,function(rn,qn,Ln){var In,Gr=qn.PATTERN;return Gr===st.NA||((0,N.HD)(Gr)?rn.push({str:Gr,idx:Ln,tokenType:qn}):(0,N.Kj)(Gr)&&(In=Gr,(0,N.sE)([".","\\","[","]","|","^","$","(",")","?","*","+","{"],function(io){return In.source.indexOf(io)!==-1})===void 0)&&rn.push({str:Gr.source,idx:Ln,tokenType:qn})),rn},[]),(0,N.Ed)(ir,function(rn,qn){(0,N.Ed)(oi,function(Ln){var In=Ln.str,Gr=Ln.idx,io=Ln.tokenType;if(qn<Gr&&function(Wi,Fi){if((0,N.Kj)(Fi)){var Hs=Fi.exec(Wi);return Hs!==null&&Hs.index===0}if((0,N.mf)(Fi))return Fi(Wi,0,[],{});if((0,N.e$)(Fi,"exec"))return Fi.exec(Wi,0,[],{});if(typeof Fi=="string")return Fi===Wi;throw Error("non exhaustive match")}(In,rn.PATTERN)){var bo="Token: ->"+io.name+`<- can never be matched.
Because it appears AFTER the Token Type ->`+rn.name+`<-in the lexer's definition.
See https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;Er.push({message:bo,type:c.UNREACHABLE_PATTERN,tokenTypes:[rn,io]})}})}),Er))))}),(0,N.xb)(Ce.lexerDefinitionErrors)){var tn;Ve(dt),Ce.TRACE_INIT("analyzeTokenTypes",function(){var qt,Vt,Mn,Bn,Kn,Jn,vn,Nr,Jr,Rr,si,Wr,Pr,_r,vi,Li,ro;qt={lineTerminatorCharacters:Ce.config.lineTerminatorCharacters,positionTracking:de.positionTracking,ensureOptimizations:de.ensureOptimizations,safeMode:de.safeMode,tracer:Ce.TRACE_INIT.bind(Ce)},(_r=(qt=(0,N.ce)(qt,{useSticky:le,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",`
`],tracer:function(ur,Dn){return Dn()}})).tracer)("initCharCodeToOptimizedIndexMap",function(){if((0,N.xb)(_e)){_e=Array(65536);for(var ur=0;ur<65536;ur++)_e[ur]=ur>255?255+~~(ur/255):ur}}),_r("Reject Lexer.NA",function(){Vt=(0,N.d1)(dt,function(ur){return ur[re]===st.NA})}),vi=!1,_r("Transform Patterns",function(){vi=!1,Mn=(0,N.UI)(Vt,function(ur){var Dn=ur[re];if((0,N.Kj)(Dn)){var br=Dn.source;return br.length===1&&br!=="^"&&br!=="$"&&br!=="."?br:br.length!==2||br[0]!=="\\"||(0,N.r3)(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],br[1])?qt.useSticky?ve(Dn):pe(Dn):br[1]}if((0,N.mf)(Dn))return vi=!0,{exec:Dn};if((0,N.e$)(Dn,"exec"))return vi=!0,Dn;if(typeof Dn=="string"){if(Dn.length===1)return Dn;var nt=new RegExp(Dn.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"));return qt.useSticky?ve(nt):pe(nt)}throw Error("non exhaustive match")})}),_r("misc mapping",function(){Bn=(0,N.UI)(Vt,function(ur){return ur.tokenTypeIdx}),Kn=(0,N.UI)(Vt,function(ur){var Dn=ur.GROUP;if(Dn!==st.SKIPPED){if((0,N.HD)(Dn))return Dn;if((0,N.o8)(Dn))return!1;throw Error("non exhaustive match")}}),Jn=(0,N.UI)(Vt,function(ur){var Dn=ur.LONGER_ALT;if(Dn)return(0,N.cq)(Vt,Dn)}),vn=(0,N.UI)(Vt,function(ur){return ur.PUSH_MODE}),Nr=(0,N.UI)(Vt,function(ur){return(0,N.e$)(ur,"POP_MODE")})}),_r("Line Terminator Handling",function(){var ur=Le(qt.lineTerminatorCharacters);Jr=(0,N.UI)(Vt,function(Dn){return!1}),qt.positionTracking!=="onlyOffset"&&(Jr=(0,N.UI)(Vt,function(Dn){return(0,N.e$)(Dn,"LINE_BREAKS")?Dn.LINE_BREAKS:Ne(Dn,ur)===!1?q(ur,Dn.PATTERN):void 0}))}),_r("Misc Mapping #2",function(){Rr=(0,N.UI)(Vt,be),si=(0,N.UI)(Mn,Ee),Wr=(0,N.u4)(Vt,function(ur,Dn){var br=Dn.GROUP;return(0,N.HD)(br)&&br!==st.SKIPPED&&(ur[br]=[]),ur},{}),Pr=(0,N.UI)(Mn,function(ur,Dn){return{pattern:Mn[Dn],longerAlt:Jn[Dn],canLineTerminator:Jr[Dn],isCustom:Rr[Dn],short:si[Dn],group:Kn[Dn],push:vn[Dn],pop:Nr[Dn],tokenTypeIdx:Bn[Dn],tokenType:Vt[Dn]}})}),Li=!0,ro=[],qt.safeMode||_r("First Char Optimization",function(){ro=(0,N.u4)(Vt,function(ur,Dn,br){if(typeof Dn.PATTERN=="string"){var nt;Se(ur,Ie(Dn.PATTERN.charCodeAt(0)),Pr[br])}else if((0,N.kJ)(Dn.START_CHARS_HINT))(0,N.Ed)(Dn.START_CHARS_HINT,function(ft){var Ot=Ie(typeof ft=="string"?ft.charCodeAt(0):ft);nt!==Ot&&(nt=Ot,Se(ur,Ot,Pr[br]))});else if((0,N.Kj)(Dn.PATTERN))if(Dn.PATTERN.unicode)Li=!1,qt.ensureOptimizations&&(0,N.WB)(""+Y+" Unable to analyze < "+Dn.PATTERN.toString()+` > pattern.
The regexp unicode flag is not currently supported by the regexp-to-ast library.
This will disable the lexer's first char optimizations.
For details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{var _t=function(ft,Ot){Ot===void 0&&(Ot=!1);try{var Yt=V(ft);return function Fn(kn,hr,pr){switch(kn.type){case"Disjunction":for(var ir=0;ir<kn.value.length;ir++)Fn(kn.value[ir],hr,pr);break;case"Alternative":for(var Er=kn.value,ir=0;ir<Er.length;ir++){var oi=Er[ir];switch(oi.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}switch(oi.type){case"Character":Z(oi.value,hr,pr);break;case"Set":if(oi.complement===!0)throw Error(U);(0,N.Ed)(oi.value,function(Ln){if(typeof Ln=="number")Z(Ln,hr,pr);else if(pr===!0)for(var In=Ln.from;In<=Ln.to;In++)Z(In,hr,pr);else{for(var In=Ln.from;In<=Ln.to&&In<256;In++)Z(In,hr,pr);if(Ln.to>=256)for(var Gr=Ln.from>=256?Ln.from:256,io=Ln.to,bo=Ie(Gr),Wi=Ie(io),Fi=bo;Fi<=Wi;Fi++)hr[Fi]=Fi}});break;case"Group":Fn(oi.value,hr,pr);break;default:throw Error("Non Exhaustive Match")}var rn=oi.quantifier!==void 0&&oi.quantifier.atLeast===0;if(oi.type==="Group"&&function Ln(In){return!!In.quantifier&&In.quantifier.atLeast===0||!!In.value&&((0,N.kJ)(In.value)?(0,N.yW)(In.value,Ln):Ln(In.value))}(oi)===!1||oi.type!=="Group"&&rn===!1)break}break;default:throw Error("non exhaustive match!")}return(0,N.VO)(hr)}(Yt.value,{},Yt.flags.ignoreCase)}catch(Fn){if(Fn.message===U)Ot&&(0,N.rr)(""+Y+" Unable to optimize: < "+ft.toString()+` >
Complement Sets cannot be automatically optimized.
This will disable the lexer's first char optimizations.
See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{var Cn="";Ot&&(Cn=`
This will disable the lexer's first char optimizations.
See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),(0,N.WB)(Y+`
Failed parsing: < `+ft.toString()+` >
Using the regexp-to-ast library version: `+z.VERSION+`
Please open an issue at: https://github.com/bd82/regexp-to-ast/issues`+Cn)}}return[]}(Dn.PATTERN,qt.ensureOptimizations);(0,N.xb)(_t)&&(Li=!1),(0,N.Ed)(_t,function(ft){Se(ur,ft,Pr[br])})}else qt.ensureOptimizations&&(0,N.WB)(""+Y+" TokenType: <"+Dn.name+`> is using a custom token pattern without providing <start_chars_hint> parameter.
This will disable the lexer's first char optimizations.
For details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),Li=!1;return ur},[])}),_r("ArrayPacking",function(){ro=(0,N.X0)(ro)}),tn={emptyGroups:Wr,patternIdxToConfig:Pr,charCodeToPatternIdxToConfig:ro,hasCustom:vi,canBeOptimized:Li}}),Ce.patternIdxToConfig[Nt]=tn.patternIdxToConfig,Ce.charCodeToPatternIdxToConfig[Nt]=tn.charCodeToPatternIdxToConfig,Ce.emptyGroups=(0,N.TS)(Ce.emptyGroups,tn.emptyGroups),Ce.hasCustom=tn.hasCustom||Ce.hasCustom,Ce.canModeBeOptimized[Nt]=tn.canBeOptimized}})}),Ce.defaultMode=He.defaultMode,!(0,N.xb)(Ce.lexerDefinitionErrors)&&!Ce.config.deferDefinitionErrorsHandling)throw Error(`Errors detected in definition of Lexer:
`+(0,N.UI)(Ce.lexerDefinitionErrors,function(dt){return dt.message}).join(`-----------------------
`));(0,N.Ed)(Ce.lexerDefinitionWarning,function(dt){(0,N.rr)(dt.message)}),Ce.TRACE_INIT("Choosing sub-methods implementations",function(){if(le?(Ce.chopInput=N.Wd,Ce.match=Ce.matchWithTest):(Ce.updateLastIndex=N.dG,Ce.match=Ce.matchWithExec),Ye&&(Ce.handleModes=N.dG),Ce.trackStartLines===!1&&(Ce.computeNewColumn=N.Wd),Ce.trackEndLines===!1&&(Ce.updateTokenEndLineColumnLocation=N.dG),/full/i.test(Ce.config.positionTracking))Ce.createTokenInstance=Ce.createFullToken;else if(/onlyStart/i.test(Ce.config.positionTracking))Ce.createTokenInstance=Ce.createStartOnlyToken;else if(/onlyOffset/i.test(Ce.config.positionTracking))Ce.createTokenInstance=Ce.createOffsetOnlyToken;else throw Error('Invalid <positionTracking> config option: "'+Ce.config.positionTracking+'"');Ce.hasCustom?(Ce.addToken=Ce.addTokenUsingPush,Ce.handlePayload=Ce.handlePayloadWithCustom):(Ce.addToken=Ce.addTokenUsingMemberAccess,Ce.handlePayload=Ce.handlePayloadNoCustom)}),Ce.TRACE_INIT("Failed Optimization Warnings",function(){var dt=(0,N.u4)(Ce.canModeBeOptimized,function(Nt,tn,qt){return tn===!1&&Nt.push(qt),Nt},[]);if(de.ensureOptimizations&&!(0,N.xb)(dt))throw Error("Lexer Modes: < "+dt.join(", ")+` > cannot be optimized.
Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.
Or inspect the console log for details on how to resolve these issues.`)}),Ce.TRACE_INIT("clearRegExpParserCache",function(){H={}}),Ce.TRACE_INIT("toFastProperties",function(){(0,N.SV)(Ce)})})}return ge.prototype.tokenize=function(ae,de){if(de===void 0&&(de=this.defaultMode),!(0,N.xb)(this.lexerDefinitionErrors))throw Error(`Unable to Tokenize because Errors detected in definition of Lexer:
`+(0,N.UI)(this.lexerDefinitionErrors,function(Ce){return Ce.message}).join(`-----------------------
`));return this.tokenizeInternal(ae,de)},ge.prototype.tokenizeInternal=function(ae,de){var Ce,De,He,Ye,ut,dt,Nt,tn,qt,Vt,Mn,Bn,Kn,Jn,vn,Nr,Jr,Rr,si=this,Wr=ae,Pr=Wr.length,_r=0,vi=0,Li=Array(this.hasCustom?0:Math.floor(ae.length/10)),ro=[],ur=this.trackStartLines?1:void 0,Dn=this.trackStartLines?1:void 0,br=(Ce=this.emptyGroups,De={},He=(0,N.XP)(Ce),(0,N.Ed)(He,function(Gn){var Xi=Ce[Gn];if((0,N.kJ)(Xi))De[Gn]=[];else throw Error("non exhaustive match")}),De),nt=this.trackStartLines,_t=this.config.lineTerminatorsPattern,ft=0,Ot=[],Yt=[],Cn=[],Fn=[];Object.freeze(Fn);var kn=void 0;function hr(){return Ot}function pr(Gn){var Xi=Yt[Ie(Gn)];return Xi===void 0?Fn:Xi}var ir=function(Gn){if(Cn.length===1&&Gn.tokenType.PUSH_MODE===void 0){var Xi=si.config.errorMessageProvider.buildUnableToPopLexerModeMessage(Gn);ro.push({offset:Gn.startOffset,line:Gn.startLine!==void 0?Gn.startLine:void 0,column:Gn.startColumn!==void 0?Gn.startColumn:void 0,length:Gn.image.length,message:Xi})}else{Cn.pop();var Ft=(0,N.Z$)(Cn);Ot=si.patternIdxToConfig[Ft],Yt=si.charCodeToPatternIdxToConfig[Ft],ft=Ot.length;var fo=si.canModeBeOptimized[Ft]&&si.config.safeMode===!1;kn=Yt&&fo?pr:hr}};function Er(Gn){Cn.push(Gn),Yt=this.charCodeToPatternIdxToConfig[Gn],ft=(Ot=this.patternIdxToConfig[Gn]).length,ft=Ot.length;var Xi=this.canModeBeOptimized[Gn]&&this.config.safeMode===!1;kn=Yt&&Xi?pr:hr}for(Er.call(this,de);_r<Pr;){tn=null;var oi=Wr.charCodeAt(_r),rn=kn(oi),qn=rn.length;for(Ye=0;Ye<qn;Ye++){var Ln=(Rr=rn[Ye]).pattern;qt=null;var In=Rr.short;if(In!==!1?oi===In&&(tn=Ln):Rr.isCustom===!0?(Jr=Ln.exec(Wr,_r,Li,br))!==null?(tn=Jr[0],Jr.payload!==void 0&&(qt=Jr.payload)):tn=null:(this.updateLastIndex(Ln,_r),tn=this.match(Ln,ae,_r)),tn!==null){if((Nt=Rr.longerAlt)!==void 0){var Gr=Ot[Nt],io=Gr.pattern;Vt=null,Gr.isCustom===!0?(Jr=io.exec(Wr,_r,Li,br))!==null?(dt=Jr[0],Jr.payload!==void 0&&(Vt=Jr.payload)):dt=null:(this.updateLastIndex(io,_r),dt=this.match(io,ae,_r)),dt&&dt.length>tn.length&&(tn=dt,qt=Vt,Rr=Gr)}break}}if(tn!==null){if(Mn=tn.length,(Bn=Rr.group)!==void 0&&(Kn=Rr.tokenTypeIdx,Jn=this.createTokenInstance(tn,_r,Kn,Rr.tokenType,ur,Dn,Mn),this.handlePayload(Jn,qt),Bn===!1?vi=this.addToken(Li,vi,Jn):br[Bn].push(Jn)),ae=this.chopInput(ae,Mn),_r+=Mn,Dn=this.computeNewColumn(Dn,Mn),nt===!0&&Rr.canLineTerminator===!0){var bo=0,Wi=void 0,Fi=void 0;_t.lastIndex=0;do(Wi=_t.test(tn))===!0&&(Fi=_t.lastIndex-1,bo++);while(Wi===!0);bo!==0&&(ur+=bo,Dn=Mn-Fi,this.updateTokenEndLineColumnLocation(Jn,Bn,Fi,bo,ur,Dn,Mn))}this.handleModes(Rr,ir,Er,Jn)}else{for(var Hs=_r,ra=ur,Vi=Dn,qa=!1;!qa&&_r<Pr;)for(Wr.charCodeAt(_r),ae=this.chopInput(ae,1),_r++,ut=0;ut<ft;ut++){var Ya=Ot[ut],Ln=Ya.pattern,In=Ya.short;if(In!==!1?Wr.charCodeAt(_r)===In&&(qa=!0):Ya.isCustom===!0?qa=Ln.exec(Wr,_r,Li,br)!==null:(this.updateLastIndex(Ln,_r),qa=Ln.exec(ae)!==null),qa===!0)break}vn=_r-Hs,Nr=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(Wr,Hs,vn,ra,Vi),ro.push({offset:Hs,line:ra,column:Vi,length:vn,message:Nr})}}return this.hasCustom||(Li.length=vi),{tokens:Li,groups:br,errors:ro}},ge.prototype.handleModes=function(ae,de,Ce,De){if(ae.pop===!0){var He=ae.push;de(De),He!==void 0&&Ce.call(this,He)}else ae.push!==void 0&&Ce.call(this,ae.push)},ge.prototype.chopInput=function(ae,de){return ae.substring(de)},ge.prototype.updateLastIndex=function(ae,de){ae.lastIndex=de},ge.prototype.updateTokenEndLineColumnLocation=function(ae,de,Ce,De,He,Ye,ut){var dt,Nt;de!==void 0&&(Nt=(dt=Ce===ut-1)?-1:0,(De!==1||dt!==!0)&&(ae.endLine=He+Nt,ae.endColumn=Ye-1+-Nt))},ge.prototype.computeNewColumn=function(ae,de){return ae+de},ge.prototype.createTokenInstance=function(){for(var ae=[],de=0;de<arguments.length;de++)ae[de]=arguments[de];return null},ge.prototype.createOffsetOnlyToken=function(ae,de,Ce,De){return{image:ae,startOffset:de,tokenTypeIdx:Ce,tokenType:De}},ge.prototype.createStartOnlyToken=function(ae,de,Ce,De,He,Ye){return{image:ae,startOffset:de,startLine:He,startColumn:Ye,tokenTypeIdx:Ce,tokenType:De}},ge.prototype.createFullToken=function(ae,de,Ce,De,He,Ye,ut){return{image:ae,startOffset:de,endOffset:de+ut-1,startLine:He,endLine:He,startColumn:Ye,endColumn:Ye+ut-1,tokenTypeIdx:Ce,tokenType:De}},ge.prototype.addToken=function(ae,de,Ce){return 666},ge.prototype.addTokenUsingPush=function(ae,de,Ce){return ae.push(Ce),de},ge.prototype.addTokenUsingMemberAccess=function(ae,de,Ce){return ae[de]=Ce,++de},ge.prototype.handlePayload=function(ae,de){},ge.prototype.handlePayloadNoCustom=function(ae,de){},ge.prototype.handlePayloadWithCustom=function(ae,de){de!==null&&(ae.payload=de)},ge.prototype.match=function(ae,de,Ce){return null},ge.prototype.matchWithTest=function(ae,de,Ce){return ae.test(de)===!0?de.substring(Ce,ae.lastIndex):null},ge.prototype.matchWithExec=function(ae,de){var Ce=ae.exec(de);return Ce!==null?Ce[0]:Ce},ge.prototype.TRACE_INIT=function(ae,de){if(this.traceInitPerf!==!0)return de();this.traceInitIndent++;var Ce=Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(Ce+"--> <"+ae+">");var De=(0,N.HT)(de),He=De.time,Ye=De.value,ut=He>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&ut(Ce+"<-- <"+ae+"> time: "+He+"ms"),this.traceInitIndent--,Ye},ge.SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.",ge.NA=/NOT_APPLICABLE/,ge}();function Qe(ge){return Xt(ge)?ge.LABEL:ge.name}function At(ge){return ge.name}function Xt(ge){return(0,N.HD)(ge.LABEL)&&ge.LABEL!==""}var cn="categories",Sn="label",Vn="group",bn="push_mode",En="pop_mode",pn="longer_alt",Un="line_breaks",Pn="start_chars_hint";function On(ge){return Ht(ge)}function Ht(ge){var ae=ge.pattern,de={};if(de.name=ge.name,(0,N.o8)(ae)||(de.PATTERN=ae),(0,N.e$)(ge,"parent"))throw`The parent property is no longer supported.
See: https://github.com/SAP/chevrotain/issues/564#issuecomment-349062346 for details.`;return(0,N.e$)(ge,cn)&&(de.CATEGORIES=ge[cn]),Ve([de]),(0,N.e$)(ge,Sn)&&(de.LABEL=ge[Sn]),(0,N.e$)(ge,Vn)&&(de.GROUP=ge[Vn]),(0,N.e$)(ge,En)&&(de.POP_MODE=ge[En]),(0,N.e$)(ge,bn)&&(de.PUSH_MODE=ge[bn]),(0,N.e$)(ge,pn)&&(de.LONGER_ALT=ge[pn]),(0,N.e$)(ge,Un)&&(de.LINE_BREAKS=ge[Un]),(0,N.e$)(ge,Pn)&&(de.START_CHARS_HINT=ge[Pn]),de}var Mt=Ht({name:"EOF",pattern:st.NA});function Gt(ge,ae,de,Ce,De,He,Ye,ut){return{image:ae,startOffset:de,endOffset:Ce,startLine:De,endLine:He,startColumn:Ye,endColumn:ut,tokenTypeIdx:ge.tokenTypeIdx,tokenType:ge}}function Bt(ge,ae){return Ae(ge,ae)}Ve([Mt]);var Ge=(p=function(ge,ae){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(de,Ce){de.__proto__=Ce}||function(de,Ce){for(var De in Ce)Ce.hasOwnProperty(De)&&(de[De]=Ce[De])})(ge,ae)},function(ge,ae){function de(){this.constructor=ge}p(ge,ae),ge.prototype=ae===null?Object.create(ae):(de.prototype=ae.prototype,new de)}),et=function(){function ge(ae){this.definition=ae}return ge.prototype.accept=function(ae){ae.visit(this),(0,N.Ed)(this.definition,function(de){de.accept(ae)})},ge}(),vt=function(ge){function ae(de){var Ce=ge.call(this,[])||this;return Ce.idx=1,(0,N.f0)(Ce,(0,N.ei)(de,function(De){return De!==void 0})),Ce}return Ge(ae,ge),Object.defineProperty(ae.prototype,"definition",{get:function(){return this.referencedRule!==void 0?this.referencedRule.definition:[]},set:function(de){},enumerable:!0,configurable:!0}),ae.prototype.accept=function(de){de.visit(this)},ae}(et),wt=function(ge){function ae(de){var Ce=ge.call(this,de.definition)||this;return Ce.orgText="",(0,N.f0)(Ce,(0,N.ei)(de,function(De){return De!==void 0})),Ce}return Ge(ae,ge),ae}(et),Ct=function(ge){function ae(de){var Ce=ge.call(this,de.definition)||this;return Ce.ignoreAmbiguities=!1,(0,N.f0)(Ce,(0,N.ei)(de,function(De){return De!==void 0})),Ce}return Ge(ae,ge),ae}(et),bt=function(ge){function ae(de){var Ce=ge.call(this,de.definition)||this;return Ce.idx=1,(0,N.f0)(Ce,(0,N.ei)(de,function(De){return De!==void 0})),Ce}return Ge(ae,ge),ae}(et),Rt=function(ge){function ae(de){var Ce=ge.call(this,de.definition)||this;return Ce.idx=1,(0,N.f0)(Ce,(0,N.ei)(de,function(De){return De!==void 0})),Ce}return Ge(ae,ge),ae}(et),Lt=function(ge){function ae(de){var Ce=ge.call(this,de.definition)||this;return Ce.idx=1,(0,N.f0)(Ce,(0,N.ei)(de,function(De){return De!==void 0})),Ce}return Ge(ae,ge),ae}(et),Dt=function(ge){function ae(de){var Ce=ge.call(this,de.definition)||this;return Ce.idx=1,(0,N.f0)(Ce,(0,N.ei)(de,function(De){return De!==void 0})),Ce}return Ge(ae,ge),ae}(et),Jt=function(ge){function ae(de){var Ce=ge.call(this,de.definition)||this;return Ce.idx=1,(0,N.f0)(Ce,(0,N.ei)(de,function(De){return De!==void 0})),Ce}return Ge(ae,ge),ae}(et),zt=function(ge){function ae(de){var Ce=ge.call(this,de.definition)||this;return Ce.idx=1,Ce.ignoreAmbiguities=!1,Ce.hasPredicates=!1,(0,N.f0)(Ce,(0,N.ei)(de,function(De){return De!==void 0})),Ce}return Ge(ae,ge),ae}(et),nn=function(){function ge(ae){this.idx=1,(0,N.f0)(this,(0,N.ei)(ae,function(de){return de!==void 0}))}return ge.prototype.accept=function(ae){ae.visit(this)},ge}();function An(ge){return(0,N.UI)(ge,lr)}function lr(ge){function ae(De){return(0,N.UI)(De,lr)}if(ge instanceof vt)return{type:"NonTerminal",name:ge.nonTerminalName,idx:ge.idx};if(ge instanceof Ct)return{type:"Flat",definition:ae(ge.definition)};if(ge instanceof bt)return{type:"Option",idx:ge.idx,definition:ae(ge.definition)};if(ge instanceof Rt)return{type:"RepetitionMandatory",name:ge.name,idx:ge.idx,definition:ae(ge.definition)};if(ge instanceof Lt)return{type:"RepetitionMandatoryWithSeparator",name:ge.name,idx:ge.idx,separator:lr(new nn({terminalType:ge.separator})),definition:ae(ge.definition)};if(ge instanceof Jt)return{type:"RepetitionWithSeparator",name:ge.name,idx:ge.idx,separator:lr(new nn({terminalType:ge.separator})),definition:ae(ge.definition)};if(ge instanceof Dt)return{type:"Repetition",name:ge.name,idx:ge.idx,definition:ae(ge.definition)};if(ge instanceof zt)return{type:"Alternation",name:ge.name,idx:ge.idx,definition:ae(ge.definition)};if(ge instanceof nn){var de={type:"Terminal",name:ge.terminalType.name,label:Qe(ge.terminalType),idx:ge.idx},Ce=ge.terminalType.PATTERN;return ge.terminalType.PATTERN&&(de.pattern=(0,N.Kj)(Ce)?Ce.source:Ce),de}else{if(ge instanceof wt)return{type:"Rule",name:ge.name,orgText:ge.orgText,definition:ae(ge.definition)};throw Error("non exhaustive match")}}var $r=function(){function ge(){}return ge.prototype.walk=function(ae,de){var Ce=this;de===void 0&&(de=[]),(0,N.Ed)(ae.definition,function(De,He){var Ye=(0,N.Cw)(ae.definition,He+1);if(De instanceof vt)Ce.walkProdRef(De,Ye,de);else if(De instanceof nn)Ce.walkTerminal(De,Ye,de);else if(De instanceof Ct)Ce.walkFlat(De,Ye,de);else if(De instanceof bt)Ce.walkOption(De,Ye,de);else if(De instanceof Rt)Ce.walkAtLeastOne(De,Ye,de);else if(De instanceof Lt)Ce.walkAtLeastOneSep(De,Ye,de);else if(De instanceof Jt)Ce.walkManySep(De,Ye,de);else if(De instanceof Dt)Ce.walkMany(De,Ye,de);else if(De instanceof zt)Ce.walkOr(De,Ye,de);else throw Error("non exhaustive match")})},ge.prototype.walkTerminal=function(ae,de,Ce){},ge.prototype.walkProdRef=function(ae,de,Ce){},ge.prototype.walkFlat=function(ae,de,Ce){var De=de.concat(Ce);this.walk(ae,De)},ge.prototype.walkOption=function(ae,de,Ce){var De=de.concat(Ce);this.walk(ae,De)},ge.prototype.walkAtLeastOne=function(ae,de,Ce){var De=[new bt({definition:ae.definition})].concat(de,Ce);this.walk(ae,De)},ge.prototype.walkAtLeastOneSep=function(ae,de,Ce){var De=ri(ae,de,Ce);this.walk(ae,De)},ge.prototype.walkMany=function(ae,de,Ce){var De=[new bt({definition:ae.definition})].concat(de,Ce);this.walk(ae,De)},ge.prototype.walkManySep=function(ae,de,Ce){var De=ri(ae,de,Ce);this.walk(ae,De)},ge.prototype.walkOr=function(ae,de,Ce){var De=this,He=de.concat(Ce);(0,N.Ed)(ae.definition,function(Ye){var ut=new Ct({definition:[Ye]});De.walk(ut,He)})},ge}();function ri(ge,ae,de){return[new bt({definition:[new nn({terminalType:ge.separator})].concat(ge.definition)})].concat(ae,de)}var zi=function(){function ge(){}return ge.prototype.visit=function(ae){switch(ae.constructor){case vt:return this.visitNonTerminal(ae);case Ct:return this.visitFlat(ae);case bt:return this.visitOption(ae);case Rt:return this.visitRepetitionMandatory(ae);case Lt:return this.visitRepetitionMandatoryWithSeparator(ae);case Jt:return this.visitRepetitionWithSeparator(ae);case Dt:return this.visitRepetition(ae);case zt:return this.visitAlternation(ae);case nn:return this.visitTerminal(ae);case wt:return this.visitRule(ae);default:throw Error("non exhaustive match")}},ge.prototype.visitNonTerminal=function(ae){},ge.prototype.visitFlat=function(ae){},ge.prototype.visitOption=function(ae){},ge.prototype.visitRepetition=function(ae){},ge.prototype.visitRepetitionMandatory=function(ae){},ge.prototype.visitRepetitionMandatoryWithSeparator=function(ae){},ge.prototype.visitRepetitionWithSeparator=function(ae){},ge.prototype.visitAlternation=function(ae){},ge.prototype.visitTerminal=function(ae){},ge.prototype.visitRule=function(ae){},ge}(),ba=(f=function(ge,ae){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(de,Ce){de.__proto__=Ce}||function(de,Ce){for(var De in Ce)Ce.hasOwnProperty(De)&&(de[De]=Ce[De])})(ge,ae)},function(ge,ae){function de(){this.constructor=ge}f(ge,ae),ge.prototype=ae===null?Object.create(ae):(de.prototype=ae.prototype,new de)});function Ro(ge,ae){return ae===void 0&&(ae=[]),ge instanceof bt||ge instanceof Dt||ge instanceof Jt||(ge instanceof zt?(0,N.G)(ge.definition,function(de){return Ro(de,ae)}):!(ge instanceof vt&&(0,N.r3)(ae,ge))&&ge instanceof et&&(ge instanceof vt&&ae.push(ge),(0,N.yW)(ge.definition,function(de){return Ro(de,ae)})))}function no(ge){if(ge instanceof vt)return"SUBRULE";if(ge instanceof bt)return"OPTION";if(ge instanceof zt)return"OR";if(ge instanceof Rt)return"AT_LEAST_ONE";if(ge instanceof Lt)return"AT_LEAST_ONE_SEP";if(ge instanceof Jt)return"MANY_SEP";if(ge instanceof Dt)return"MANY";if(ge instanceof nn)return"CONSUME";throw Error("non exhaustive match")}var il=function(ge){function ae(){var de=ge!==null&&ge.apply(this,arguments)||this;return de.separator="-",de.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]},de}return ba(ae,ge),ae.prototype.reset=function(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}},ae.prototype.visitTerminal=function(de){var Ce=de.terminalType.name+this.separator+"Terminal";(0,N.e$)(this.dslMethods,Ce)||(this.dslMethods[Ce]=[]),this.dslMethods[Ce].push(de)},ae.prototype.visitNonTerminal=function(de){var Ce=de.nonTerminalName+this.separator+"Terminal";(0,N.e$)(this.dslMethods,Ce)||(this.dslMethods[Ce]=[]),this.dslMethods[Ce].push(de)},ae.prototype.visitOption=function(de){this.dslMethods.option.push(de)},ae.prototype.visitRepetitionWithSeparator=function(de){this.dslMethods.repetitionWithSeparator.push(de)},ae.prototype.visitRepetitionMandatory=function(de){this.dslMethods.repetitionMandatory.push(de)},ae.prototype.visitRepetitionMandatoryWithSeparator=function(de){this.dslMethods.repetitionMandatoryWithSeparator.push(de)},ae.prototype.visitRepetition=function(de){this.dslMethods.repetition.push(de)},ae.prototype.visitAlternation=function(de){this.dslMethods.alternation.push(de)},ae}(zi),Rl=new il;function Fa(ge){if(ge instanceof vt)return Fa(ge.referencedRule);if(ge instanceof nn)return[ge.terminalType];if(ge instanceof Ct||ge instanceof bt||ge instanceof Dt||ge instanceof Rt||ge instanceof Lt||ge instanceof Jt||ge instanceof nn||ge instanceof wt)return function(Ce){for(var De,He=[],Ye=Ce.definition,ut=0,dt=Ye.length>ut,Nt=!0;dt&&Nt;)Nt=Ro(De=Ye[ut]),He=He.concat(Fa(De)),ut+=1,dt=Ye.length>ut;return(0,N.jj)(He)}(ge);if(ge instanceof zt){var ae,de;return ae=ge,de=(0,N.UI)(ae.definition,function(Ce){return Fa(Ce)}),(0,N.jj)((0,N.xH)(de))}throw Error("non exhaustive match")}var Va="_~IN~_",Au=(y=function(ge,ae){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(de,Ce){de.__proto__=Ce}||function(de,Ce){for(var De in Ce)Ce.hasOwnProperty(De)&&(de[De]=Ce[De])})(ge,ae)},function(ge,ae){function de(){this.constructor=ge}y(ge,ae),ge.prototype=ae===null?Object.create(ae):(de.prototype=ae.prototype,new de)}),us=function(ge){function ae(de){var Ce=ge.call(this)||this;return Ce.topProd=de,Ce.follows={},Ce}return Au(ae,ge),ae.prototype.startWalking=function(){return this.walk(this.topProd),this.follows},ae.prototype.walkTerminal=function(de,Ce,De){},ae.prototype.walkProdRef=function(de,Ce,De){var He,Ye,ut=(He=de.referencedRule,Ye=de.idx,He.name+Ye+Va+this.topProd.name),dt=Fa(new Ct({definition:Ce.concat(De)}));this.follows[ut]=dt},ae}($r),ea=(d=function(ge,ae){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(de,Ce){de.__proto__=Ce}||function(de,Ce){for(var De in Ce)Ce.hasOwnProperty(De)&&(de[De]=Ce[De])})(ge,ae)},function(ge,ae){function de(){this.constructor=ge}d(ge,ae),ge.prototype=ae===null?Object.create(ae):(de.prototype=ae.prototype,new de)});function Ha(ge,ae){isNaN(ge.startOffset)===!0?(ge.startOffset=ae.startOffset,ge.endOffset=ae.endOffset):ge.endOffset<ae.endOffset&&(ge.endOffset=ae.endOffset)}function Mu(ge,ae){isNaN(ge.startOffset)===!0?(ge.startOffset=ae.startOffset,ge.startColumn=ae.startColumn,ge.startLine=ae.startLine,ge.endOffset=ae.endOffset,ge.endColumn=ae.endColumn,ge.endLine=ae.endLine):ge.endOffset<ae.endOffset&&(ge.endOffset=ae.endOffset,ge.endColumn=ae.endColumn,ge.endLine=ae.endLine)}function hh(ge,ae,de){ge.children[ae]===void 0?ge.children[ae]=[de]:ge.children[ae].push(de)}var Du=function(ge){function ae(de){var Ce=ge.call(this)||this;return Ce.result=[],Ce.ruleIdx=de,Ce}return ea(ae,ge),ae.prototype.collectNamedDSLMethod=function(de,Ce,De){if(!(0,N.o8)(de.name)){var He,Ye=void 0;if(de instanceof bt||de instanceof Dt||de instanceof Rt||de instanceof zt)Ye=new Ce({definition:de.definition,idx:de.idx});else if(de instanceof Lt||de instanceof Jt)Ye=new Ce({definition:de.definition,idx:de.idx,separator:de.separator});else throw Error("non exhaustive match");var ut=[Ye],dt=(He=this.ruleIdx,de.idx|De|He);this.result.push({def:ut,key:dt,name:de.name,orgProd:de})}},ae.prototype.visitOption=function(de){this.collectNamedDSLMethod(de,bt,512)},ae.prototype.visitRepetition=function(de){this.collectNamedDSLMethod(de,Dt,768)},ae.prototype.visitRepetitionMandatory=function(de){this.collectNamedDSLMethod(de,Rt,1024)},ae.prototype.visitRepetitionMandatoryWithSeparator=function(de){this.collectNamedDSLMethod(de,Lt,1536)},ae.prototype.visitRepetitionWithSeparator=function(de){this.collectNamedDSLMethod(de,Jt,1280)},ae.prototype.visitAlternation=function(de){var Ce=this;this.collectNamedDSLMethod(de,zt,256);var De=de.definition.length>1;(0,N.Ed)(de.definition,function(He,Ye){if(!(0,N.o8)(He.name)){var ut,dt,Nt=He.definition;Nt=De?[new bt({definition:He.definition})]:He.definition;var tn=(ut=Ce.ruleIdx,dt=de.idx,256|dt|ut|Ye+1<<24);Ce.result.push({def:Nt,key:tn,name:He.name,orgProd:He})}})},ae}(zi),qi=(v=function(ge,ae){return(v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(de,Ce){de.__proto__=Ce}||function(de,Ce){for(var De in Ce)Ce.hasOwnProperty(De)&&(de[De]=Ce[De])})(ge,ae)},function(ge,ae){function de(){this.constructor=ge}v(ge,ae),ge.prototype=ae===null?Object.create(ae):(de.prototype=ae.prototype,new de)}),$a=function(ge){function ae(de,Ce){var De=ge.call(this,de,Ce)||this;return De.path=Ce,De.nextTerminalName="",De.nextTerminalOccurrence=0,De.nextTerminalName=De.path.lastTok.name,De.nextTerminalOccurrence=De.path.lastTokOccurrence,De}return qi(ae,ge),ae.prototype.walkTerminal=function(de,Ce,De){if(this.isAtEndOfPath&&de.terminalType.name===this.nextTerminalName&&de.idx===this.nextTerminalOccurrence&&!this.found){var He=new Ct({definition:Ce.concat(De)});this.possibleTokTypes=Fa(He),this.found=!0}},ae}(function(ge){function ae(de,Ce){var De=ge.call(this)||this;return De.topProd=de,De.path=Ce,De.possibleTokTypes=[],De.nextProductionName="",De.nextProductionOccurrence=0,De.found=!1,De.isAtEndOfPath=!1,De}return qi(ae,ge),ae.prototype.startWalking=function(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=(0,N.Qw)(this.path.ruleStack).reverse(),this.occurrenceStack=(0,N.Qw)(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes},ae.prototype.walk=function(de,Ce){Ce===void 0&&(Ce=[]),this.found||ge.prototype.walk.call(this,de,Ce)},ae.prototype.walkProdRef=function(de,Ce,De){if(de.referencedRule.name===this.nextProductionName&&de.idx===this.nextProductionOccurrence){var He=Ce.concat(De);this.updateExpectedNext(),this.walk(de.referencedRule,He)}},ae.prototype.updateExpectedNext=function(){(0,N.xb)(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())},ae}($r)),hs=function(ge){function ae(de,Ce){var De=ge.call(this)||this;return De.topRule=de,De.occurrence=Ce,De.result={token:void 0,occurrence:void 0,isEndOfRule:void 0},De}return qi(ae,ge),ae.prototype.startWalking=function(){return this.walk(this.topRule),this.result},ae}($r),ch=function(ge){function ae(){return ge!==null&&ge.apply(this,arguments)||this}return qi(ae,ge),ae.prototype.walkMany=function(de,Ce,De){if(de.idx===this.occurrence){var He=(0,N.Ps)(Ce.concat(De));this.result.isEndOfRule=He===void 0,He instanceof nn&&(this.result.token=He.terminalType,this.result.occurrence=He.idx)}else ge.prototype.walkMany.call(this,de,Ce,De)},ae}(hs),di=function(ge){function ae(){return ge!==null&&ge.apply(this,arguments)||this}return qi(ae,ge),ae.prototype.walkManySep=function(de,Ce,De){if(de.idx===this.occurrence){var He=(0,N.Ps)(Ce.concat(De));this.result.isEndOfRule=He===void 0,He instanceof nn&&(this.result.token=He.terminalType,this.result.occurrence=He.idx)}else ge.prototype.walkManySep.call(this,de,Ce,De)},ae}(hs),za=function(ge){function ae(){return ge!==null&&ge.apply(this,arguments)||this}return qi(ae,ge),ae.prototype.walkAtLeastOne=function(de,Ce,De){if(de.idx===this.occurrence){var He=(0,N.Ps)(Ce.concat(De));this.result.isEndOfRule=He===void 0,He instanceof nn&&(this.result.token=He.terminalType,this.result.occurrence=He.idx)}else ge.prototype.walkAtLeastOne.call(this,de,Ce,De)},ae}(hs),Bs=function(ge){function ae(){return ge!==null&&ge.apply(this,arguments)||this}return qi(ae,ge),ae.prototype.walkAtLeastOneSep=function(de,Ce,De){if(de.idx===this.occurrence){var He=(0,N.Ps)(Ce.concat(De));this.result.isEndOfRule=He===void 0,He instanceof nn&&(this.result.token=He.terminalType,this.result.occurrence=He.idx)}else ge.prototype.walkAtLeastOneSep.call(this,de,Ce,De)},ae}(hs);function Ls(ge,ae,de){de===void 0&&(de=[]),de=(0,N.Qw)(de);var Ce=[],De=0;function He(dt){var Nt=Ls(dt.concat((0,N.Cw)(ge,De+1)),ae,de);return Ce.concat(Nt)}for(;de.length<ae&&De<ge.length;){var Ye=ge[De];if(Ye instanceof Ct||Ye instanceof vt)return He(Ye.definition);if(Ye instanceof bt)Ce=He(Ye.definition);else if(Ye instanceof Rt){var ut=Ye.definition.concat([new Dt({definition:Ye.definition})]);return He(ut)}else if(Ye instanceof Lt){var ut=[new Ct({definition:Ye.definition}),new Dt({definition:[new nn({terminalType:Ye.separator})].concat(Ye.definition)})];return He(ut)}else if(Ye instanceof Jt){var ut=Ye.definition.concat([new Dt({definition:[new nn({terminalType:Ye.separator})].concat(Ye.definition)})]);Ce=He(ut)}else if(Ye instanceof Dt){var ut=Ye.definition.concat([new Dt({definition:Ye.definition})]);Ce=He(ut)}else{if(Ye instanceof zt)return(0,N.Ed)(Ye.definition,function(dt){Ce=He(dt.definition)}),Ce;if(Ye instanceof nn)de.push(Ye.terminalType);else throw Error("non exhaustive match")}De++}return Ce.push({partialPath:de,suffixDef:(0,N.Cw)(ge,De)}),Ce}function Eo(ge,ae,de,Ce){var De="EXIT_NONE_TERMINAL",He=[De],Ye="EXIT_ALTERNATIVE",ut=!1,dt=ae.length,Nt=dt-Ce-1,tn=[],qt=[];for(qt.push({idx:-1,def:ge,ruleStack:[],occurrenceStack:[]});!(0,N.xb)(qt);){var Vt=qt.pop();if(Vt===Ye){ut&&(0,N.Z$)(qt).idx<=Nt&&qt.pop();continue}var Mn=Vt.def,Bn=Vt.idx,Kn=Vt.ruleStack,Jn=Vt.occurrenceStack;if(!(0,N.xb)(Mn)){var vn=Mn[0];if(vn===De){var Nr={idx:Bn,def:(0,N.Cw)(Mn),ruleStack:(0,N.j7)(Kn),occurrenceStack:(0,N.j7)(Jn)};qt.push(Nr)}else if(vn instanceof nn)if(Bn<dt-1){var Jr=Bn+1;if(de(ae[Jr],vn.terminalType)){var Nr={idx:Jr,def:(0,N.Cw)(Mn),ruleStack:Kn,occurrenceStack:Jn};qt.push(Nr)}}else if(Bn===dt-1)tn.push({nextTokenType:vn.terminalType,nextTokenOccurrence:vn.idx,ruleStack:Kn,occurrenceStack:Jn}),ut=!0;else throw Error("non exhaustive match");else if(vn instanceof vt){var Rr=(0,N.Qw)(Kn);Rr.push(vn.nonTerminalName);var si=(0,N.Qw)(Jn);si.push(vn.idx);var Nr={idx:Bn,def:vn.definition.concat(He,(0,N.Cw)(Mn)),ruleStack:Rr,occurrenceStack:si};qt.push(Nr)}else if(vn instanceof bt){var Wr={idx:Bn,def:(0,N.Cw)(Mn),ruleStack:Kn,occurrenceStack:Jn};qt.push(Wr),qt.push(Ye);var Pr={idx:Bn,def:vn.definition.concat((0,N.Cw)(Mn)),ruleStack:Kn,occurrenceStack:Jn};qt.push(Pr)}else if(vn instanceof Rt){var _r=new Dt({definition:vn.definition,idx:vn.idx}),vi=vn.definition.concat([_r],(0,N.Cw)(Mn)),Nr={idx:Bn,def:vi,ruleStack:Kn,occurrenceStack:Jn};qt.push(Nr)}else if(vn instanceof Lt){var Li=new nn({terminalType:vn.separator}),_r=new Dt({definition:[Li].concat(vn.definition),idx:vn.idx}),vi=vn.definition.concat([_r],(0,N.Cw)(Mn)),Nr={idx:Bn,def:vi,ruleStack:Kn,occurrenceStack:Jn};qt.push(Nr)}else if(vn instanceof Jt){var Wr={idx:Bn,def:(0,N.Cw)(Mn),ruleStack:Kn,occurrenceStack:Jn};qt.push(Wr),qt.push(Ye);var Li=new nn({terminalType:vn.separator}),ro=new Dt({definition:[Li].concat(vn.definition),idx:vn.idx}),vi=vn.definition.concat([ro],(0,N.Cw)(Mn)),Pr={idx:Bn,def:vi,ruleStack:Kn,occurrenceStack:Jn};qt.push(Pr)}else if(vn instanceof Dt){var Wr={idx:Bn,def:(0,N.Cw)(Mn),ruleStack:Kn,occurrenceStack:Jn};qt.push(Wr),qt.push(Ye);var ro=new Dt({definition:vn.definition,idx:vn.idx}),vi=vn.definition.concat([ro],(0,N.Cw)(Mn)),Pr={idx:Bn,def:vi,ruleStack:Kn,occurrenceStack:Jn};qt.push(Pr)}else if(vn instanceof zt)for(var ur=vn.definition.length-1;ur>=0;ur--){var Dn={idx:Bn,def:vn.definition[ur].definition.concat((0,N.Cw)(Mn)),ruleStack:Kn,occurrenceStack:Jn};qt.push(Dn),qt.push(Ye)}else if(vn instanceof Ct)qt.push({idx:Bn,def:vn.definition.concat((0,N.Cw)(Mn)),ruleStack:Kn,occurrenceStack:Jn});else if(vn instanceof wt)qt.push(function(br,nt,_t,ft){var Ot=(0,N.Qw)(_t);Ot.push(br.name);var Yt=(0,N.Qw)(ft);return Yt.push(1),{idx:nt,def:br.definition,ruleStack:Ot,occurrenceStack:Yt}}(vn,Bn,Kn,Jn));else throw Error("non exhaustive match")}}return tn}var ol=(b=function(ge,ae){return(b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(de,Ce){de.__proto__=Ce}||function(de,Ce){for(var De in Ce)Ce.hasOwnProperty(De)&&(de[De]=Ce[De])})(ge,ae)},function(ge,ae){function de(){this.constructor=ge}b(ge,ae),ge.prototype=ae===null?Object.create(ae):(de.prototype=ae.prototype,new de)});(s=m||(m={}))[s.OPTION=0]="OPTION",s[s.REPETITION=1]="REPETITION",s[s.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",s[s.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",s[s.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",s[s.ALTERNATION=5]="ALTERNATION";var al=function(ge){function ae(de,Ce,De){var He=ge.call(this)||this;return He.topProd=de,He.targetOccurrence=Ce,He.targetProdType=De,He}return ol(ae,ge),ae.prototype.startWalking=function(){return this.walk(this.topProd),this.restDef},ae.prototype.checkIsTarget=function(de,Ce,De,He){return de.idx===this.targetOccurrence&&this.targetProdType===Ce&&(this.restDef=De.concat(He),!0)},ae.prototype.walkOption=function(de,Ce,De){this.checkIsTarget(de,m.OPTION,Ce,De)||ge.prototype.walkOption.call(this,de,Ce,De)},ae.prototype.walkAtLeastOne=function(de,Ce,De){this.checkIsTarget(de,m.REPETITION_MANDATORY,Ce,De)||ge.prototype.walkOption.call(this,de,Ce,De)},ae.prototype.walkAtLeastOneSep=function(de,Ce,De){this.checkIsTarget(de,m.REPETITION_MANDATORY_WITH_SEPARATOR,Ce,De)||ge.prototype.walkOption.call(this,de,Ce,De)},ae.prototype.walkMany=function(de,Ce,De){this.checkIsTarget(de,m.REPETITION,Ce,De)||ge.prototype.walkOption.call(this,de,Ce,De)},ae.prototype.walkManySep=function(de,Ce,De){this.checkIsTarget(de,m.REPETITION_WITH_SEPARATOR,Ce,De)||ge.prototype.walkOption.call(this,de,Ce,De)},ae}($r),Fs=function(ge){function ae(de,Ce,De){var He=ge.call(this)||this;return He.targetOccurrence=de,He.targetProdType=Ce,He.targetRef=De,He.result=[],He}return ol(ae,ge),ae.prototype.checkIsTarget=function(de,Ce){de.idx===this.targetOccurrence&&this.targetProdType===Ce&&(this.targetRef===void 0||de===this.targetRef)&&(this.result=de.definition)},ae.prototype.visitOption=function(de){this.checkIsTarget(de,m.OPTION)},ae.prototype.visitRepetition=function(de){this.checkIsTarget(de,m.REPETITION)},ae.prototype.visitRepetitionMandatory=function(de){this.checkIsTarget(de,m.REPETITION_MANDATORY)},ae.prototype.visitRepetitionMandatoryWithSeparator=function(de){this.checkIsTarget(de,m.REPETITION_MANDATORY_WITH_SEPARATOR)},ae.prototype.visitRepetitionWithSeparator=function(de){this.checkIsTarget(de,m.REPETITION_WITH_SEPARATOR)},ae.prototype.visitAlternation=function(de){this.checkIsTarget(de,m.ALTERNATION)},ae}(zi);function Wa(ge){for(var ae=Array(ge),de=0;de<ge;de++)ae[de]=[];return ae}function Jl(ge){for(var ae=[""],de=0;de<ge.length;de++){for(var Ce=ge[de],De=[],He=0;He<ae.length;He++){var Ye=ae[He];De.push(Ye+"_"+Ce.tokenTypeIdx);for(var ut=0;ut<Ce.categoryMatches.length;ut++){var dt="_"+Ce.categoryMatches[ut];De.push(Ye+dt)}}ae=De}return ae}function uc(ge,ae){for(var de=(0,N.UI)(ge,function(tn){return Ls([tn],1)}),Ce=Wa(de.length),De=(0,N.UI)(de,function(tn){var qt={};return(0,N.Ed)(tn,function(Vt){var Mn=Jl(Vt.partialPath);(0,N.Ed)(Mn,function(Bn){qt[Bn]=!0})}),qt}),He=de,Ye=1;Ye<=ae;Ye++){var ut=He;He=Wa(ut.length);for(var dt=function(tn){for(var qt=ut[tn],Vt=0;Vt<qt.length;Vt++){var Mn=qt[Vt].partialPath,Bn=qt[Vt].suffixDef,Kn=Jl(Mn);if(function(Rr,si,Wr){for(var Pr=0;Pr<Rr.length;Pr++)if(Pr!==Wr){for(var _r=Rr[Pr],vi=0;vi<si.length;vi++)if(_r[si[vi]]===!0)return!1}return!0}(De,Kn,tn)||(0,N.xb)(Bn)||Mn.length===ae){var Jn=Ce[tn];if(El(Jn,Mn)===!1){Jn.push(Mn);for(var vn=0;vn<Kn.length;vn++){var Nr=Kn[vn];De[tn][Nr]=!0}}}else{var Jr=Ls(Bn,Ye+1,Mn);He[tn]=He[tn].concat(Jr),(0,N.Ed)(Jr,function(Rr){var si=Jl(Rr.partialPath);(0,N.Ed)(si,function(Wr){De[tn][Wr]=!0})})}}},Nt=0;Nt<ut.length;Nt++)dt(Nt)}return Ce}function sl(ge,ae,de,Ce){var De=new Fs(ge,m.ALTERNATION,Ce);return ae.accept(De),uc(De.result,de)}function Ou(ge,ae,de,Ce){var De=new Fs(ge,de);ae.accept(De);var He=De.result,Ye=new al(ae,ge,de).startWalking();return uc([new Ct({definition:He}),new Ct({definition:Ye})],Ce)}function El(ge,ae){e:for(var de=0;de<ge.length;de++){var Ce=ge[de];if(Ce.length===ae.length){for(var De=0;De<Ce.length;De++){var He=ae[De],Ye=Ce[De];if(!(He===Ye||Ye.categoryMatchesMap[He.tokenTypeIdx]!==void 0))continue e}return!0}}return!1}function Al(ge){return(0,N.yW)(ge,function(ae){return(0,N.yW)(ae,function(de){return(0,N.yW)(de,function(Ce){return(0,N.xb)(Ce.categoryMatches)})})})}var Vs=(l=function(ge,ae){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(de,Ce){de.__proto__=Ce}||function(de,Ce){for(var De in Ce)Ce.hasOwnProperty(De)&&(de[De]=Ce[De])})(ge,ae)},function(ge,ae){function de(){this.constructor=ge}l(ge,ae),ge.prototype=ae===null?Object.create(ae):(de.prototype=ae.prototype,new de)});function Or(ge){return no(ge)+"_#_"+ge.idx+"_#_"+dh(ge)}function dh(ge){return ge instanceof nn?ge.terminalType.name:ge instanceof vt?ge.nonTerminalName:""}var fh=function(ge){function ae(){var de=ge!==null&&ge.apply(this,arguments)||this;return de.allProductions=[],de}return Vs(ae,ge),ae.prototype.visitNonTerminal=function(de){this.allProductions.push(de)},ae.prototype.visitOption=function(de){this.allProductions.push(de)},ae.prototype.visitRepetitionWithSeparator=function(de){this.allProductions.push(de)},ae.prototype.visitRepetitionMandatory=function(de){this.allProductions.push(de)},ae.prototype.visitRepetitionMandatoryWithSeparator=function(de){this.allProductions.push(de)},ae.prototype.visitRepetition=function(de){this.allProductions.push(de)},ae.prototype.visitAlternation=function(de){this.allProductions.push(de)},ae.prototype.visitTerminal=function(de){this.allProductions.push(de)},ae}(zi),fi=/^[a-zA-Z_]\w*$/,Ao=new RegExp(fi.source.replace("^","^\\$")),Zl=function(ge){function ae(){var de=ge!==null&&ge.apply(this,arguments)||this;return de.alternations=[],de}return Vs(ae,ge),ae.prototype.visitAlternation=function(de){this.alternations.push(de)},ae}(zi),od=function(ge){function ae(){var de=ge!==null&&ge.apply(this,arguments)||this;return de.allProductions=[],de}return Vs(ae,ge),ae.prototype.visitRepetitionWithSeparator=function(de){this.allProductions.push(de)},ae.prototype.visitRepetitionMandatory=function(de){this.allProductions.push(de)},ae.prototype.visitRepetitionMandatoryWithSeparator=function(de){this.allProductions.push(de)},ae.prototype.visitRepetition=function(de){this.allProductions.push(de)},ae}(zi),Ql={buildMismatchTokenMessage:function(ge){var ae=ge.expected,de=ge.actual;return ge.previous,ge.ruleName,"Expecting "+(Xt(ae)?"--> "+Qe(ae)+" <--":"token of type --> "+ae.name+" <--")+" but found --> '"+de.image+"' <--"},buildNotAllInputParsedMessage:function(ge){var ae=ge.firstRedundant;return ge.ruleName,"Redundant input, expecting EOF but found: "+ae.image},buildNoViableAltMessage:function(ge){var ae=ge.expectedPathsPerAlt,de=ge.actual,Ce=(ge.previous,ge.customUserDescription);ge.ruleName;var De="Expecting: ",He=`
but found: '`+(0,N.Ps)(de).image+"'";if(Ce)return De+Ce+He;var Ye=(0,N.u4)(ae,function(dt,Nt){return dt.concat(Nt)},[]),ut=(0,N.UI)(Ye,function(dt){return"["+(0,N.UI)(dt,function(Nt){return Qe(Nt)}).join(", ")+"]"});return De+`one of these possible Token sequences:
`+(0,N.UI)(ut,function(dt,Nt){return" "+(Nt+1)+". "+dt}).join(`
`)+He},buildEarlyExitMessage:function(ge){var ae=ge.expectedIterationPaths,de=ge.actual,Ce=ge.customUserDescription;ge.ruleName;var De="Expecting: ",He=`
but found: '`+(0,N.Ps)(de).image+"'";return Ce?De+Ce+He:De+(`expecting at least one iteration which starts with one of these possible Token sequences::
<`+(0,N.UI)(ae,function(Ye){return"["+(0,N.UI)(Ye,function(ut){return Qe(ut)}).join(",")+"]"}).join(" ,"))+">"+He}};Object.freeze(Ql);var hc={buildRuleNotFoundError:function(ge,ae){return"Invalid grammar, reference to a rule which is not defined: ->"+ae.nonTerminalName+`<-
inside top level rule: ->`+ge.name+"<-"}},cs={buildDuplicateFoundError:function(ge,ae){var de=ge.name,Ce=(0,N.Ps)(ae),De=Ce.idx,He=no(Ce),Ye=Ce instanceof nn?Ce.terminalType.name:Ce instanceof vt?Ce.nonTerminalName:"",ut="->"+He+(De>0?De:"")+"<- "+(Ye?"with argument: ->"+Ye+"<-":"")+`
appears more than once (`+ae.length+" times) in the top level rule: ->"+de+`<-.
For further details see: https://sap.github.io/chevrotain/docs/FAQ.html#NUMERICAL_SUFFIXES
`;return(ut=ut.replace(/[ \t]+/g," ")).replace(/\s\s+/g,`
`)},buildInvalidNestedRuleNameError:function(ge,ae){return"Invalid nested rule name: ->"+ae.name+"<- inside rule: ->"+ge.name+`<-
it must match the pattern: ->`+Ao.toString()+`<-.
Note that this means a nested rule name must start with the '$'(dollar) sign.`},buildDuplicateNestedRuleNameError:function(ge,ae){return"Duplicate nested rule name: ->"+(0,N.Ps)(ae).name+"<- inside rule: ->"+ge.name+`<-
A nested name must be unique in the scope of a top level grammar rule.`},buildNamespaceConflictError:function(ge){return`Namespace conflict found in grammar.
The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <`+ge.name+`>.
To resolve this make sure each Terminal and Non-Terminal names are unique
This is easy to accomplish by using the convention that Terminal names start with an uppercase letter
and Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError:function(ge){var ae=(0,N.UI)(ge.prefixPath,function(Ce){return Qe(Ce)}).join(", "),de=ge.alternation.idx===0?"":ge.alternation.idx;return"Ambiguous alternatives: <"+ge.ambiguityIndices.join(" ,")+`> due to common lookahead prefix
`+("in <OR"+de+"> inside <")+ge.topLevelRule.name+`> Rule,
<`+ae+`> may appears as a prefix path in all these alternatives.
See: https://sap.github.io/chevrotain/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX
For Further details.`},buildAlternationAmbiguityError:function(ge){var ae=(0,N.UI)(ge.prefixPath,function(De){return Qe(De)}).join(", "),de=ge.alternation.idx===0?"":ge.alternation.idx,Ce="Ambiguous Alternatives Detected: <"+ge.ambiguityIndices.join(" ,")+"> in <OR"+de+"> inside <"+ge.topLevelRule.name+`> Rule,
<`+ae+`> may appears as a prefix path in all these alternatives.
`;return Ce+`See: https://sap.github.io/chevrotain/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES
For Further details.`},buildEmptyRepetitionError:function(ge){var ae=no(ge.repetition);return ge.repetition.idx!==0&&(ae+=ge.repetition.idx),"The repetition <"+ae+"> within Rule <"+ge.topLevelRule.name+`> can never consume any tokens.
This could lead to an infinite loop.`},buildTokenNameError:function(ge){return"Invalid Grammar Token name: ->"+ge.tokenType.name+"<- it must match the pattern: ->"+ge.expectedPattern.toString()+"<-"},buildEmptyAlternationError:function(ge){return"Ambiguous empty alternative: <"+(ge.emptyChoiceIdx+1)+">"+(" in <OR"+ge.alternation.idx+"> inside <")+ge.topLevelRule.name+`> Rule.
Only the last alternative may be an empty alternative.`},buildTooManyAlternativesError:function(ge){return`An Alternation cannot have more than 256 alternatives:
`+("<OR"+ge.alternation.idx+"> inside <"+ge.topLevelRule.name+`> Rule.
has `)+(ge.alternation.definition.length+1)+" alternatives."},buildLeftRecursionError:function(ge){var ae=ge.topLevelRule.name,de=ae+" --> "+N.UI(ge.leftRecursionPath,function(Ce){return Ce.name}).concat([ae]).join(" --> ");return`Left Recursion found in grammar.
rule: <`+ae+`> can be invoked from itself (directly or indirectly)
without consuming any Tokens. The grammar path that causes this is:
`+de+`
To fix this refactor your grammar to remove the left recursion.
see: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring.`},buildInvalidRuleNameError:function(ge){return"Invalid grammar rule name: ->"+ge.topLevelRule.name+"<- it must match the pattern: ->"+ge.expectedPattern.toString()+"<-"},buildDuplicateRuleNameError:function(ge){return"Duplicate definition, rule: ->"+(ge.topLevelRule instanceof wt?ge.topLevelRule.name:ge.topLevelRule)+"<- is already defined in the grammar: ->"+ge.grammarName+"<-"}},Nu=(w=function(ge,ae){return(w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(de,Ce){de.__proto__=Ce}||function(de,Ce){for(var De in Ce)Ce.hasOwnProperty(De)&&(de[De]=Ce[De])})(ge,ae)},function(ge,ae){function de(){this.constructor=ge}w(ge,ae),ge.prototype=ae===null?Object.create(ae):(de.prototype=ae.prototype,new de)}),ll=function(ge){function ae(de,Ce){var De=ge.call(this)||this;return De.nameToTopRule=de,De.errMsgProvider=Ce,De.errors=[],De}return Nu(ae,ge),ae.prototype.resolveRefs=function(){var de=this;(0,N.Ed)((0,N.VO)(this.nameToTopRule),function(Ce){de.currTopLevel=Ce,Ce.accept(de)})},ae.prototype.visitNonTerminal=function(de){var Ce=this.nameToTopRule[de.nonTerminalName];if(Ce)de.referencedRule=Ce;else{var De=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,de);this.errors.push({message:De,type:D.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:de.nonTerminalName})}},ae}(zi);function Ca(ge){ge=(0,N.ce)(ge,{errMsgProvider:hc});var ae,de={};return(0,N.Ed)(ge.rules,function(Ce){de[Ce.name]=Ce}),(ae=new ll(de,ge.errMsgProvider)).resolveRefs(),ae.errors}function cc(ge){var ae,de,Ce,De,He,Ye,ut,dt,Nt,tn,qt,Vt,Mn,Bn,Kn,Jn,vn,Nr,Jr,Rr,si,Wr,Pr,_r,vi,Li,ro,ur,Dn,br,nt,_t,ft;return ae=(ge=(0,N.ce)(ge,{errMsgProvider:cs,ignoredIssues:{}})).rules,de=ge.maxLookahead,Ce=ge.tokenTypes,De=ge.ignoredIssues,He=ge.errMsgProvider,Ye=ge.grammarName,ut=N.UI(ae,function(Ot){var Yt,Cn,Fn,kn,hr,pr;return Yt=Ot,Cn=He,Fn=new fh,Yt.accept(Fn),kn=Fn.allProductions,hr=N.vM(kn,Or),pr=N.ei(hr,function(ir){return ir.length>1}),N.UI(N.VO(pr),function(ir){var Er=N.Ps(ir),oi=Cn.buildDuplicateFoundError(Yt,ir),rn=no(Er),qn={message:oi,type:D.DUPLICATE_PRODUCTIONS,ruleName:Yt.name,dslName:rn,occurrence:Er.idx},Ln=dh(Er);return Ln&&(qn.parameter=Ln),qn})}),dt=N.UI(ae,function(Ot){return function Yt(Cn,Fn,kn,hr){hr===void 0&&(hr=[]);var pr=[],ir=function qn(Ln){var In=[];if(N.xb(Ln))return In;var Gr=N.Ps(Ln);if(Gr instanceof vt)In.push(Gr.referencedRule);else if(Gr instanceof Ct||Gr instanceof bt||Gr instanceof Rt||Gr instanceof Lt||Gr instanceof Jt||Gr instanceof Dt)In=In.concat(qn(Gr.definition));else if(Gr instanceof zt)In=N.xH(N.UI(Gr.definition,function(Fi){return qn(Fi.definition)}));else if(!(Gr instanceof nn))throw Error("non exhaustive match");var io=Ro(Gr),bo=Ln.length>1;if(!io||!bo)return In;var Wi=N.Cw(Ln);return In.concat(qn(Wi))}(Fn.definition);if(N.xb(ir))return[];var Er=Cn.name;N.r3(ir,Cn)&&pr.push({message:kn.buildLeftRecursionError({topLevelRule:Cn,leftRecursionPath:hr}),type:D.LEFT_RECURSION,ruleName:Er});var oi=N.e5(ir,hr.concat([Cn])),rn=N.UI(oi,function(qn){var Ln=N.Qw(hr);return Ln.push(qn),Yt(Cn,qn,kn,Ln)});return pr.concat(N.xH(rn))}(Ot,Ot,He)}),Nt=[],tn=[],qt=[],(0,N.yW)(dt,N.xb)&&(Nt=(0,N.UI)(ae,function(Ot){var Yt,Cn,Fn,kn;return Yt=Ot,Cn=He,Fn=new Zl,Yt.accept(Fn),kn=Fn.alternations,N.u4(kn,function(hr,pr){var ir=N.j7(pr.definition),Er=N.UI(ir,function(oi,rn){var qn=Eo([oi],[],null,1);return N.xb(qn)?{message:Cn.buildEmptyAlternationError({topLevelRule:Yt,alternation:pr,emptyChoiceIdx:rn}),type:D.NONE_LAST_EMPTY_ALT,ruleName:Yt.name,occurrence:pr.idx,alternative:rn+1}:null});return hr.concat(N.oA(Er))},[])}),tn=(0,N.UI)(ae,function(Ot){var Yt,Cn,Fn,kn,hr,pr,ir;return Yt=Ot,Cn=de,Fn=De,kn=He,hr=new Zl,Yt.accept(hr),pr=hr.alternations,(ir=Fn[Yt.name])&&(pr=(0,N.d1)(pr,function(Er){return ir[no(Er)+(Er.idx===0?"":Er.idx)]})),pr=(0,N.d1)(pr,function(Er){return Er.ignoreAmbiguities===!0}),N.u4(pr,function(Er,oi){var rn,qn,Ln,In,Gr,io,bo,Wi,Fi,Hs,ra,Vi,qa=sl(oi.idx,Yt,oi.maxLookahead||Cn,oi),Ya=(rn=qa,qn=oi,Ln=Yt,In=kn,Gr=[],io=(0,N.u4)(rn,function(Xi,Ft,fo){return qn.definition[fo].ignoreAmbiguities===!0||(0,N.Ed)(Ft,function(hl){var $o=[fo];(0,N.Ed)(rn,function(ha,xa){fo!==xa&&El(ha,hl)&&qn.definition[xa].ignoreAmbiguities!==!0&&$o.push(xa)}),$o.length>1&&!El(Gr,hl)&&(Gr.push(hl),Xi.push({alts:$o,path:hl}))}),Xi},[]),N.UI(io,function(Xi){var Ft=(0,N.UI)(Xi.alts,function(fo){return fo+1});return{message:In.buildAlternationAmbiguityError({topLevelRule:Ln,alternation:qn,ambiguityIndices:Ft,prefixPath:Xi.path}),type:D.AMBIGUOUS_ALTS,ruleName:Ln.name,occurrence:qn.idx,alternatives:[Xi.alts]}})),Gn=(bo=qa,Wi=oi,Fi=Yt,Hs=kn,ra=[],Vi=(0,N.u4)(bo,function(Xi,Ft,fo){var hl=(0,N.UI)(Ft,function($o){return{idx:fo,path:$o}});return Xi.concat(hl)},[]),(0,N.Ed)(Vi,function(Xi){if(Wi.definition[Xi.idx].ignoreAmbiguities!==!0){var Ft=Xi.idx,fo=Xi.path,hl=(0,N.Oq)(Vi,function(ha){var xa;return Wi.definition[ha.idx].ignoreAmbiguities!==!0&&ha.idx<Ft&&(xa=ha.path,xa.length<fo.length&&(0,N.yW)(xa,function(ad,ys){var Ji=fo[ys];return ad===Ji||Ji.categoryMatchesMap[ad.tokenTypeIdx]}))}),$o=(0,N.UI)(hl,function(ha){var xa=[ha.idx+1,Ft+1],ad=Wi.idx===0?"":Wi.idx;return{message:Hs.buildAlternationPrefixAmbiguityError({topLevelRule:Fi,alternation:Wi,ambiguityIndices:xa,prefixPath:ha.path}),type:D.AMBIGUOUS_PREFIX_ALTS,ruleName:Fi.name,occurrence:ad,alternatives:xa}});ra=ra.concat($o)}}),ra);return Er.concat(Ya,Gn)},[])}),Jr=ae,Rr=de,si=He,Wr=[],(0,N.Ed)(Jr,function(Ot){var Yt=new od;Ot.accept(Yt);var Cn=Yt.allProductions;(0,N.Ed)(Cn,function(Fn){var kn=function(Er){if(Er instanceof bt)return m.OPTION;if(Er instanceof Dt)return m.REPETITION;if(Er instanceof Rt)return m.REPETITION_MANDATORY;if(Er instanceof Lt)return m.REPETITION_MANDATORY_WITH_SEPARATOR;if(Er instanceof Jt)return m.REPETITION_WITH_SEPARATOR;if(Er instanceof zt)return m.ALTERNATION;throw Error("non exhaustive match")}(Fn),hr=Fn.maxLookahead||Rr,pr=Ou(Fn.idx,Ot,kn,hr)[0];if((0,N.xb)((0,N.xH)(pr))){var ir=si.buildEmptyRepetitionError({topLevelRule:Ot,repetition:Fn});Wr.push({message:ir,type:D.NO_NON_EMPTY_LOOKAHEAD,ruleName:Ot.name})}})}),qt=Wr),Pr=ae,_r=Ce,vi=He,Li=[],ro=(0,N.UI)(_r,function(Ot){return Ot.name}),(0,N.Ed)(Pr,function(Ot){var Yt=Ot.name;if((0,N.r3)(ro,Yt)){var Cn=vi.buildNamespaceConflictError(Ot);Li.push({message:Cn,type:D.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:Yt})}}),Vt=Li,Mn=N.UI(Ce,function(Ot){var Yt,Cn,Fn;return Yt=Ot,Cn=He,Fn=[],Yt.name.match(fi)||Fn.push({message:Cn.buildTokenNameError({tokenType:Yt,expectedPattern:fi}),type:D.INVALID_TOKEN_NAME}),Fn}),ur=ae,Dn=He,br=[],(0,N.Ed)(ur,function(Ot){var Yt=new Du("");Ot.accept(Yt);var Cn=(0,N.UI)(Yt.result,function(Fn){return Fn.orgProd});br.push((0,N.UI)(Cn,function(Fn){var kn,hr,pr,ir;return kn=Ot,hr=Fn,pr=Dn,ir=[],hr.name.match(Ao)||ir.push({message:pr.buildInvalidNestedRuleNameError(kn,hr),type:D.INVALID_NESTED_RULE_NAME,ruleName:kn.name}),ir}))}),Bn=(0,N.xH)(br),nt=ae,_t=He,ft=[],(0,N.Ed)(nt,function(Ot){var Yt=new Du("");Ot.accept(Yt);var Cn=(0,N.vM)(Yt.result,function(kn){return kn.name}),Fn=(0,N.ei)(Cn,function(kn){return kn.length>1});(0,N.Ed)((0,N.VO)(Fn),function(kn){var hr=(0,N.UI)(kn,function(ir){return ir.orgProd}),pr=_t.buildDuplicateNestedRuleNameError(Ot,hr);ft.push({message:pr,type:D.DUPLICATE_NESTED_NAME,ruleName:Ot.name})})}),Kn=ft,Jn=(0,N.UI)(ae,function(Ot){var Yt,Cn,Fn,kn;return Yt=Ot,Cn=He,Fn=new Zl,Yt.accept(Fn),kn=Fn.alternations,N.u4(kn,function(hr,pr){return pr.definition.length>255&&hr.push({message:Cn.buildTooManyAlternativesError({topLevelRule:Yt,alternation:pr}),type:D.TOO_MANY_ALTS,ruleName:Yt.name,occurrence:pr.idx}),hr},[])}),vn=(0,N.UI)(ae,function(Ot){var Yt,Cn,Fn,kn;return Yt=Ot,Cn=He,Fn=[],(kn=Yt.name).match(fi)||Fn.push({message:Cn.buildInvalidRuleNameError({topLevelRule:Yt,expectedPattern:fi}),type:D.INVALID_RULE_NAME,ruleName:kn}),Fn}),Nr=(0,N.UI)(ae,function(Ot){var Yt=Ot,Cn=ae,Fn=Ye,kn=He,hr=[];if((0,N.u4)(Cn,function(ir,Er){return Er.name===Yt.name?ir+1:ir},0)>1){var pr=kn.buildDuplicateRuleNameError({topLevelRule:Yt,grammarName:Fn});hr.push({message:pr,type:D.DUPLICATE_RULE_NAME,ruleName:Yt.name})}return hr}),N.xH(ut.concat(Mn,Bn,Kn,qt,dt,Nt,tn,Vt,Jn,vn,Nr))}function Pu(ge){(0,N.Ed)(ge.rules,function(ae){var de=new il;ae.accept(de),(0,N.Ed)(de.dslMethods,function(Ce){(0,N.Ed)(Ce,function(De,He){De.idx=He+1})})})}var gh="MismatchedTokenException",dc="NoViableAltException",yo="EarlyExitException",Zr="NotAllInputParsedException",_a=[gh,dc,yo,Zr];function ii(ge){return(0,N.r3)(_a,ge.name)}function Qr(ge,ae,de){this.name=gh,this.message=ge,this.token=ae,this.previousToken=de,this.resyncedTokens=[]}function eu(ge,ae,de){this.name=dc,this.message=ge,this.token=ae,this.previousToken=de,this.resyncedTokens=[]}function ph(ge,ae){this.name=Zr,this.message=ge,this.token=ae,this.resyncedTokens=[]}function mh(ge,ae,de){this.name=yo,this.message=ge,this.token=ae,this.previousToken=de,this.resyncedTokens=[]}Object.freeze(_a),Qr.prototype=Error.prototype,eu.prototype=Error.prototype,ph.prototype=Error.prototype,mh.prototype=Error.prototype;var Ml={},fc="InRuleRecoveryException";function gc(ge){this.name=fc,this.message=ge}gc.prototype=Error.prototype;var pc=function(){function ge(){}return ge.prototype.initRecoverable=function(ae){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=(0,N.e$)(ae,"recoveryEnabled")?ae.recoveryEnabled:Yi.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=wo)},ge.prototype.getTokenToInsert=function(ae){var de=Gt(ae,"",NaN,NaN,NaN,NaN,NaN,NaN);return de.isInsertedInRecovery=!0,de},ge.prototype.canTokenTypeBeInsertedInRecovery=function(ae){return!0},ge.prototype.tryInRepetitionRecovery=function(ae,de,Ce,De){for(var He=this,Ye=this.findReSyncTokenType(),ut=this.exportLexerState(),dt=[],Nt=!1,tn=this.LA(1),qt=this.LA(1),Vt=function(){var Mn=He.LA(0),Bn=new Qr(He.errorMessageProvider.buildMismatchTokenMessage({expected:De,actual:tn,previous:Mn,ruleName:He.getCurrRuleFullName()}),tn,He.LA(0));Bn.resyncedTokens=(0,N.j7)(dt),He.SAVE_ERROR(Bn)};!Nt;){if(this.tokenMatcher(qt,De))return void Vt();if(Ce.call(this)){Vt(),ae.apply(this,de);return}else this.tokenMatcher(qt,Ye)?Nt=!0:(qt=this.SKIP_TOKEN(),this.addToResyncTokens(qt,dt))}this.importLexerState(ut)},ge.prototype.shouldInRepetitionRecoveryBeTried=function(ae,de,Ce){return!(Ce===!1||ae===void 0||de===void 0||this.tokenMatcher(this.LA(1),ae)||this.isBackTracking()||this.canPerformInRuleRecovery(ae,this.getFollowsForInRuleRecovery(ae,de)))},ge.prototype.getFollowsForInRuleRecovery=function(ae,de){var Ce=this.getCurrentGrammarPath(ae,de);return this.getNextPossibleTokenTypes(Ce)},ge.prototype.tryInRuleRecovery=function(ae,de){if(this.canRecoverWithSingleTokenInsertion(ae,de))return this.getTokenToInsert(ae);if(this.canRecoverWithSingleTokenDeletion(ae)){var Ce=this.SKIP_TOKEN();return this.consumeToken(),Ce}throw new gc("sad sad panda")},ge.prototype.canPerformInRuleRecovery=function(ae,de){return this.canRecoverWithSingleTokenInsertion(ae,de)||this.canRecoverWithSingleTokenDeletion(ae)},ge.prototype.canRecoverWithSingleTokenInsertion=function(ae,de){var Ce=this;if(!this.canTokenTypeBeInsertedInRecovery(ae)||(0,N.xb)(de))return!1;var De=this.LA(1);return(0,N.sE)(de,function(He){return Ce.tokenMatcher(De,He)})!==void 0},ge.prototype.canRecoverWithSingleTokenDeletion=function(ae){return this.tokenMatcher(this.LA(2),ae)},ge.prototype.isInCurrentRuleReSyncSet=function(ae){var de=this.getCurrFollowKey(),Ce=this.getFollowSetFromFollowKey(de);return(0,N.r3)(Ce,ae)},ge.prototype.findReSyncTokenType=function(){for(var ae=this.flattenFollowSet(),de=this.LA(1),Ce=2;;){var De=de.tokenType;if((0,N.r3)(ae,De))return De;de=this.LA(Ce),Ce++}},ge.prototype.getCurrFollowKey=function(){if(this.RULE_STACK.length===1)return Ml;var ae=this.getLastExplicitRuleShortName(),de=this.getLastExplicitRuleOccurrenceIndex(),Ce=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(ae),idxInCallingRule:de,inRule:this.shortRuleNameToFullName(Ce)}},ge.prototype.buildFullFollowKeyStack=function(){var ae=this,de=this.RULE_STACK,Ce=this.RULE_OCCURRENCE_STACK;return(0,N.xb)(this.LAST_EXPLICIT_RULE_STACK)||(de=(0,N.UI)(this.LAST_EXPLICIT_RULE_STACK,function(De){return ae.RULE_STACK[De]}),Ce=(0,N.UI)(this.LAST_EXPLICIT_RULE_STACK,function(De){return ae.RULE_OCCURRENCE_STACK[De]})),(0,N.UI)(de,function(De,He){return He===0?Ml:{ruleName:ae.shortRuleNameToFullName(De),idxInCallingRule:Ce[He],inRule:ae.shortRuleNameToFullName(de[He-1])}})},ge.prototype.flattenFollowSet=function(){var ae=this,de=(0,N.UI)(this.buildFullFollowKeyStack(),function(Ce){return ae.getFollowSetFromFollowKey(Ce)});return(0,N.xH)(de)},ge.prototype.getFollowSetFromFollowKey=function(ae){if(ae===Ml)return[Mt];var de=ae.ruleName+ae.idxInCallingRule+Va+ae.inRule;return this.resyncFollows[de]},ge.prototype.addToResyncTokens=function(ae,de){return this.tokenMatcher(ae,Mt)||de.push(ae),de},ge.prototype.reSyncTo=function(ae){for(var de=[],Ce=this.LA(1);this.tokenMatcher(Ce,ae)===!1;)Ce=this.SKIP_TOKEN(),this.addToResyncTokens(Ce,de);return(0,N.j7)(de)},ge.prototype.attemptInRepetitionRecovery=function(ae,de,Ce,De,He,Ye,ut){},ge.prototype.getCurrentGrammarPath=function(ae,de){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:(0,N.Qw)(this.RULE_OCCURRENCE_STACK),lastTok:ae,lastTokOccurrence:de}},ge.prototype.getHumanReadableRuleStack=function(){var ae=this;return(0,N.xb)(this.LAST_EXPLICIT_RULE_STACK)?(0,N.UI)(this.RULE_STACK,function(de){return ae.shortRuleNameToFullName(de)}):(0,N.UI)(this.LAST_EXPLICIT_RULE_STACK,function(de){return ae.shortRuleNameToFullName(ae.RULE_STACK[de])})},ge}();function wo(ge,ae,de,Ce,De,He,Ye){var ut=this.getKeyForAutomaticLookahead(Ce,De),dt=this.firstAfterRepMap[ut];if(dt===void 0){var Nt=this.getCurrRuleFullName();dt=new He(this.getGAstProductions()[Nt],De).startWalking(),this.firstAfterRepMap[ut]=dt}var tn=dt.token,qt=dt.occurrence,Vt=dt.isEndOfRule;this.RULE_STACK.length===1&&Vt&&tn===void 0&&(tn=Mt,qt=1),this.shouldInRepetitionRecoveryBeTried(tn,qt,Ye)&&this.tryInRepetitionRecovery(ge,ae,de,tn)}var zr=function(){function ge(){}return ge.prototype.initLooksAhead=function(ae){this.dynamicTokensEnabled=(0,N.e$)(ae,"dynamicTokensEnabled")?ae.dynamicTokensEnabled:Yi.dynamicTokensEnabled,this.maxLookahead=(0,N.e$)(ae,"maxLookahead")?ae.maxLookahead:Yi.maxLookahead,this.lookAheadFuncsCache=(0,N.dU)()?new Map:[],(0,N.dU)()?(this.getLaFuncFromCache=this.getLaFuncFromMap,this.setLaFuncCache=this.setLaFuncCacheUsingMap):(this.getLaFuncFromCache=this.getLaFuncFromObj,this.setLaFuncCache=this.setLaFuncUsingObj)},ge.prototype.preComputeLookaheadFunctions=function(ae){var de=this;(0,N.Ed)(ae,function(Ce){de.TRACE_INIT(Ce.name+" Rule Lookahead",function(){var De,He=(Rl.reset(),Ce.accept(Rl),De=Rl.dslMethods,Rl.reset(),De),Ye=He.alternation,ut=He.repetition,dt=He.option,Nt=He.repetitionMandatory,tn=He.repetitionMandatoryWithSeparator,qt=He.repetitionWithSeparator;(0,N.Ed)(Ye,function(Vt){var Mn=Vt.idx===0?"":Vt.idx;de.TRACE_INIT(""+no(Vt)+Mn,function(){var Bn,Kn,Jn,vn,Nr,Jr,Rr,si,Wr=(Bn=Vt.idx,Kn=Vt.maxLookahead||de.maxLookahead,Jn=Vt.hasPredicates,vn=de.dynamicTokensEnabled,Nr=de.lookAheadBuilderForAlternatives,Rr=Al(Jr=sl(Bn,Ce,Kn))?ue:Ae,Nr(Jr,Jn,Rr,vn)),Pr=(si=de.fullRuleNameToShort[Ce.name],256|Vt.idx|si);de.setLaFuncCache(Pr,Wr)})}),(0,N.Ed)(ut,function(Vt){de.computeLookaheadFunc(Ce,Vt.idx,768,m.REPETITION,Vt.maxLookahead,no(Vt))}),(0,N.Ed)(dt,function(Vt){de.computeLookaheadFunc(Ce,Vt.idx,512,m.OPTION,Vt.maxLookahead,no(Vt))}),(0,N.Ed)(Nt,function(Vt){de.computeLookaheadFunc(Ce,Vt.idx,1024,m.REPETITION_MANDATORY,Vt.maxLookahead,no(Vt))}),(0,N.Ed)(tn,function(Vt){de.computeLookaheadFunc(Ce,Vt.idx,1536,m.REPETITION_MANDATORY_WITH_SEPARATOR,Vt.maxLookahead,no(Vt))}),(0,N.Ed)(qt,function(Vt){de.computeLookaheadFunc(Ce,Vt.idx,1280,m.REPETITION_WITH_SEPARATOR,Vt.maxLookahead,no(Vt))})})})},ge.prototype.computeLookaheadFunc=function(ae,de,Ce,De,He,Ye){var ut=this;this.TRACE_INIT(""+Ye+(de===0?"":de),function(){var dt,Nt,tn,qt,Vt,Mn=(dt=He||ut.maxLookahead,Nt=ut.dynamicTokensEnabled,tn=ut.lookAheadBuilderForOptional,Vt=Al(qt=Ou(de,ae,De,dt))?ue:Ae,tn(qt[0],Vt,Nt)),Bn=de|Ce|ut.fullRuleNameToShort[ae.name];ut.setLaFuncCache(Bn,Mn)})},ge.prototype.lookAheadBuilderForOptional=function(ae,de,Ce){return function(De,He,Ye){var ut=(0,N.yW)(De,function(Vt){return Vt.length===1}),dt=De.length;if(!ut||Ye)return function(){e:for(var Vt=0;Vt<dt;Vt++){for(var Mn=De[Vt],Bn=Mn.length,Kn=0;Kn<Bn;Kn++)if(He(this.LA(Kn+1),Mn[Kn])===!1)continue e;return!0}return!1};var Nt=(0,N.xH)(De);if(Nt.length===1&&(0,N.xb)(Nt[0].categoryMatches)){var tn=Nt[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===tn}}var qt=(0,N.u4)(Nt,function(Vt,Mn,Bn){return Vt[Mn.tokenTypeIdx]=!0,(0,N.Ed)(Mn.categoryMatches,function(Kn){Vt[Kn]=!0}),Vt},[]);return function(){return qt[this.LA(1).tokenTypeIdx]===!0}}(ae,de,Ce)},ge.prototype.lookAheadBuilderForAlternatives=function(ae,de,Ce,De){var He=ae.length,Ye=(0,N.yW)(ae,function(Nt){return(0,N.yW)(Nt,function(tn){return tn.length===1})});if(de)return function(Nt){for(var tn=(0,N.UI)(Nt,function(Jr){return Jr.GATE}),qt=0;qt<He;qt++){var Vt=ae[qt],Mn=Vt.length,Bn=tn[qt];if(Bn===void 0||Bn.call(this)!==!1)e:for(var Kn=0;Kn<Mn;Kn++){for(var Jn=Vt[Kn],vn=Jn.length,Nr=0;Nr<vn;Nr++)if(Ce(this.LA(Nr+1),Jn[Nr])===!1)continue e;return qt}}};if(!Ye||De)return function(){for(var Nt=0;Nt<He;Nt++){var tn=ae[Nt],qt=tn.length;e:for(var Vt=0;Vt<qt;Vt++){for(var Mn=tn[Vt],Bn=Mn.length,Kn=0;Kn<Bn;Kn++)if(Ce(this.LA(Kn+1),Mn[Kn])===!1)continue e;return Nt}}};var ut=(0,N.UI)(ae,function(Nt){return(0,N.xH)(Nt)}),dt=(0,N.u4)(ut,function(Nt,tn,qt){return(0,N.Ed)(tn,function(Vt){(0,N.e$)(Nt,Vt.tokenTypeIdx)||(Nt[Vt.tokenTypeIdx]=qt),(0,N.Ed)(Vt.categoryMatches,function(Mn){(0,N.e$)(Nt,Mn)||(Nt[Mn]=qt)})}),Nt},[]);return function(){return dt[this.LA(1).tokenTypeIdx]}},ge.prototype.getKeyForAutomaticLookahead=function(ae,de){return de|ae|this.getLastExplicitRuleShortName()},ge.prototype.getLaFuncFromCache=function(ae){},ge.prototype.getLaFuncFromMap=function(ae){return this.lookAheadFuncsCache.get(ae)},ge.prototype.getLaFuncFromObj=function(ae){return this.lookAheadFuncsCache[ae]},ge.prototype.setLaFuncCache=function(ae,de){},ge.prototype.setLaFuncCacheUsingMap=function(ae,de){this.lookAheadFuncsCache.set(ae,de)},ge.prototype.setLaFuncUsingObj=function(ae,de){this.lookAheadFuncsCache[ae]=de},ge}(),Ua=/^\s*function\s*(\S*)\s*\(/,la="name";function Ga(ge){var ae=ge.name;return ae||ge.toString().match(Ua)[1]}function Sa(ge,ae){var de=Object.getOwnPropertyDescriptor(ge,la);return(!!(0,N.o8)(de)||!!de.configurable)&&(Object.defineProperty(ge,la,{enumerable:!1,configurable:!0,writable:!1,value:ae}),!0)}function Mo(ge,ae){for(var de=(0,N.XP)(ge),Ce=de.length,De=0;De<Ce;De++)for(var He=ge[de[De]],Ye=He.length,ut=0;ut<Ye;ut++){var dt=He[ut];dt.tokenTypeIdx===void 0&&(dt.fullName!==void 0?this[dt.fullName](dt.children,ae):this[dt.name](dt.children,ae))}}(I=T||(T={}))[I.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",I[I.MISSING_METHOD=1]="MISSING_METHOD";var ds=["constructor","visit","validateVisitor"],fs=function(){function ge(){}return ge.prototype.initTreeBuilder=function(ae){if(this.LAST_EXPLICIT_RULE_STACK=[],this.CST_STACK=[],this.outputCst=(0,N.e$)(ae,"outputCst")?ae.outputCst:Yi.outputCst,this.nodeLocationTracking=(0,N.e$)(ae,"nodeLocationTracking")?ae.nodeLocationTracking:Yi.nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Mu,this.setNodeLocationFromNode=Mu,this.cstPostRule=N.dG,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=N.dG,this.setNodeLocationFromNode=N.dG,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Ha,this.setNodeLocationFromNode=Ha,this.cstPostRule=N.dG,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=N.dG,this.setNodeLocationFromNode=N.dG,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=N.dG,this.setNodeLocationFromNode=N.dG,this.cstPostRule=N.dG,this.setInitialNodeLocation=N.dG;else throw Error('Invalid <nodeLocationTracking> config option: "'+ae.nodeLocationTracking+'"');else this.cstInvocationStateUpdate=N.dG,this.cstFinallyStateUpdate=N.dG,this.cstPostTerminal=N.dG,this.cstPostNonTerminal=N.dG,this.cstPostRule=N.dG,this.getLastExplicitRuleShortName=this.getLastExplicitRuleShortNameNoCst,this.getPreviousExplicitRuleShortName=this.getPreviousExplicitRuleShortNameNoCst,this.getLastExplicitRuleOccurrenceIndex=this.getLastExplicitRuleOccurrenceIndexNoCst,this.manyInternal=this.manyInternalNoCst,this.orInternal=this.orInternalNoCst,this.optionInternal=this.optionInternalNoCst,this.atLeastOneInternal=this.atLeastOneInternalNoCst,this.manySepFirstInternal=this.manySepFirstInternalNoCst,this.atLeastOneSepFirstInternal=this.atLeastOneSepFirstInternalNoCst},ge.prototype.setInitialNodeLocationOnlyOffsetRecovery=function(ae){ae.location={startOffset:NaN,endOffset:NaN}},ge.prototype.setInitialNodeLocationOnlyOffsetRegular=function(ae){ae.location={startOffset:this.LA(1).startOffset,endOffset:NaN}},ge.prototype.setInitialNodeLocationFullRecovery=function(ae){ae.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}},ge.prototype.setInitialNodeLocationFullRegular=function(ae){var de=this.LA(1);ae.location={startOffset:de.startOffset,startLine:de.startLine,startColumn:de.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}},ge.prototype.cstNestedInvocationStateUpdate=function(ae,de){var Ce={name:ae,fullName:this.shortRuleNameToFull[this.getLastExplicitRuleShortName()]+ae,children:{}};this.setInitialNodeLocation(Ce),this.CST_STACK.push(Ce)},ge.prototype.cstInvocationStateUpdate=function(ae,de){this.LAST_EXPLICIT_RULE_STACK.push(this.RULE_STACK.length-1);var Ce={name:ae,children:{}};this.setInitialNodeLocation(Ce),this.CST_STACK.push(Ce)},ge.prototype.cstFinallyStateUpdate=function(){this.LAST_EXPLICIT_RULE_STACK.pop(),this.CST_STACK.pop()},ge.prototype.cstNestedFinallyStateUpdate=function(){var ae=this.CST_STACK.pop();this.cstPostRule(ae)},ge.prototype.cstPostRuleFull=function(ae){var de=this.LA(0),Ce=ae.location;Ce.startOffset<=de.startOffset?(Ce.endOffset=de.endOffset,Ce.endLine=de.endLine,Ce.endColumn=de.endColumn):(Ce.startOffset=NaN,Ce.startLine=NaN,Ce.startColumn=NaN)},ge.prototype.cstPostRuleOnlyOffset=function(ae){var de=this.LA(0),Ce=ae.location;Ce.startOffset<=de.startOffset?Ce.endOffset=de.endOffset:Ce.startOffset=NaN},ge.prototype.cstPostTerminal=function(ae,de){var Ce=this.CST_STACK[this.CST_STACK.length-1];Ce.children[ae]===void 0?Ce.children[ae]=[de]:Ce.children[ae].push(de),this.setNodeLocationFromToken(Ce.location,de)},ge.prototype.cstPostNonTerminal=function(ae,de){if(this.isBackTracking()!==!0){var Ce=this.CST_STACK[this.CST_STACK.length-1];hh(Ce,de,ae),this.setNodeLocationFromNode(Ce.location,ae.location)}},ge.prototype.getBaseCstVisitorConstructor=function(){if((0,N.o8)(this.baseCstVisitorConstructor)){var ae,de,Ce,De=(ae=this.className,de=this.allRuleNames,Sa(Ce=function(){},ae+"BaseSemantics"),Ce.prototype={visit:function(He,Ye){if((0,N.kJ)(He)&&(He=He[0]),!(0,N.o8)(He))return He.fullName!==void 0?this[He.fullName](He.children,Ye):this[He.name](He.children,Ye)},validateVisitor:function(){var He,Ye,ut,dt,Nt,tn,qt,Vt=(He=this,Ye=de,tn=(ut=He,dt=Ye,Nt=(0,N.UI)(dt,function(Bn){if(!(0,N.mf)(ut[Bn]))return{msg:"Missing visitor method: <"+Bn+"> on "+Ga(ut.constructor)+" CST Visitor.",type:T.MISSING_METHOD,methodName:Bn}}),(0,N.oA)(Nt)),qt=function(Bn,Kn){var Jn=[];for(var vn in Bn)fi.test(vn)&&(0,N.mf)(Bn[vn])&&!(0,N.r3)(ds,vn)&&!(0,N.r3)(Kn,vn)&&Jn.push({msg:"Redundant visitor method: <"+vn+"> on "+Ga(Bn.constructor)+` CST Visitor
There is no Grammar Rule corresponding to this method's name.
For utility methods on visitor classes use methods names that do not match /`+fi.source+"/.",type:T.REDUNDANT_METHOD,methodName:vn});return Jn}(He,Ye),tn.concat(qt));if(!(0,N.xb)(Vt)){var Mn=(0,N.UI)(Vt,function(Bn){return Bn.msg});throw Error("Errors Detected in CST Visitor <"+Ga(this.constructor)+`>:
`+Mn.join(`
`).replace(/\n/g,`
`))}}},Ce.prototype.constructor=Ce,Ce._RULE_NAMES=de,Ce);return this.baseCstVisitorConstructor=De,De}return this.baseCstVisitorConstructor},ge.prototype.getBaseCstVisitorConstructorWithDefaults=function(){if((0,N.o8)(this.baseCstVisitorWithDefaultsConstructor)){var ae,de,Ce,De,He,Ye=(ae=this.className,de=this.allRuleNames,Ce=this.getBaseCstVisitorConstructor(),Sa(De=function(){},ae+"BaseSemanticsWithDefaults"),He=Object.create(Ce.prototype),(0,N.Ed)(de,function(ut){He[ut]=Mo}),De.prototype=He,De.prototype.constructor=De,De);return this.baseCstVisitorWithDefaultsConstructor=Ye,Ye}return this.baseCstVisitorWithDefaultsConstructor},ge.prototype.nestedRuleBeforeClause=function(ae,de){var Ce;return ae.NAME!==void 0?(Ce=ae.NAME,this.nestedRuleInvocationStateUpdate(Ce,de),Ce):void 0},ge.prototype.nestedAltBeforeClause=function(ae,de,Ce,De){var He,Ye,ut=(He=this.getLastExplicitRuleShortName(),de|Ce|He|De+1<<24);return ae.NAME!==void 0?(Ye=ae.NAME,this.nestedRuleInvocationStateUpdate(Ye,ut),{shortName:ut,nestedName:Ye}):void 0},ge.prototype.nestedRuleFinallyClause=function(ae,de){var Ce=this.CST_STACK,De=Ce[Ce.length-1];this.nestedRuleFinallyStateUpdate();var He=Ce[Ce.length-1];hh(He,de,De),this.setNodeLocationFromNode(He.location,De.location)},ge.prototype.getLastExplicitRuleShortName=function(){var ae=this.LAST_EXPLICIT_RULE_STACK[this.LAST_EXPLICIT_RULE_STACK.length-1];return this.RULE_STACK[ae]},ge.prototype.getLastExplicitRuleShortNameNoCst=function(){var ae=this.RULE_STACK;return ae[ae.length-1]},ge.prototype.getPreviousExplicitRuleShortName=function(){var ae=this.LAST_EXPLICIT_RULE_STACK[this.LAST_EXPLICIT_RULE_STACK.length-2];return this.RULE_STACK[ae]},ge.prototype.getPreviousExplicitRuleShortNameNoCst=function(){var ae=this.RULE_STACK;return ae[ae.length-2]},ge.prototype.getLastExplicitRuleOccurrenceIndex=function(){var ae=this.LAST_EXPLICIT_RULE_STACK[this.LAST_EXPLICIT_RULE_STACK.length-1];return this.RULE_OCCURRENCE_STACK[ae]},ge.prototype.getLastExplicitRuleOccurrenceIndexNoCst=function(){var ae=this.RULE_OCCURRENCE_STACK;return ae[ae.length-1]},ge.prototype.nestedRuleInvocationStateUpdate=function(ae,de){this.RULE_OCCURRENCE_STACK.push(1),this.RULE_STACK.push(de),this.cstNestedInvocationStateUpdate(ae,de)},ge.prototype.nestedRuleFinallyStateUpdate=function(){this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstNestedFinallyStateUpdate()},ge}(),Dl=function(){function ge(){}return ge.prototype.initLexerAdapter=function(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1},Object.defineProperty(ge.prototype,"input",{get:function(){return this.tokVector},set:function(ae){if(this.selfAnalysisDone!==!0)throw Error("Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=ae,this.tokVectorLength=ae.length},enumerable:!0,configurable:!0}),ge.prototype.SKIP_TOKEN=function(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):ms},ge.prototype.LA=function(ae){var de=this.currIdx+ae;return de<0||this.tokVectorLength<=de?ms:this.tokVector[de]},ge.prototype.consumeToken=function(){this.currIdx++},ge.prototype.exportLexerState=function(){return this.currIdx},ge.prototype.importLexerState=function(ae){this.currIdx=ae},ge.prototype.resetLexerState=function(){this.currIdx=-1},ge.prototype.moveToTerminatedState=function(){this.currIdx=this.tokVector.length-1},ge.prototype.getLexerPosition=function(){return this.exportLexerState()},ge}(),gr=function(){function ge(){}return ge.prototype.ACTION=function(ae){return ae.call(this)},ge.prototype.consume=function(ae,de,Ce){return this.consumeInternal(de,ae,Ce)},ge.prototype.subrule=function(ae,de,Ce){return this.subruleInternal(de,ae,Ce)},ge.prototype.option=function(ae,de){return this.optionInternal(de,ae)},ge.prototype.or=function(ae,de){return this.orInternal(de,ae)},ge.prototype.many=function(ae,de){return this.manyInternal(ae,de)},ge.prototype.atLeastOne=function(ae,de){return this.atLeastOneInternal(ae,de)},ge.prototype.CONSUME=function(ae,de){return this.consumeInternal(ae,0,de)},ge.prototype.CONSUME1=function(ae,de){return this.consumeInternal(ae,1,de)},ge.prototype.CONSUME2=function(ae,de){return this.consumeInternal(ae,2,de)},ge.prototype.CONSUME3=function(ae,de){return this.consumeInternal(ae,3,de)},ge.prototype.CONSUME4=function(ae,de){return this.consumeInternal(ae,4,de)},ge.prototype.CONSUME5=function(ae,de){return this.consumeInternal(ae,5,de)},ge.prototype.CONSUME6=function(ae,de){return this.consumeInternal(ae,6,de)},ge.prototype.CONSUME7=function(ae,de){return this.consumeInternal(ae,7,de)},ge.prototype.CONSUME8=function(ae,de){return this.consumeInternal(ae,8,de)},ge.prototype.CONSUME9=function(ae,de){return this.consumeInternal(ae,9,de)},ge.prototype.SUBRULE=function(ae,de){return this.subruleInternal(ae,0,de)},ge.prototype.SUBRULE1=function(ae,de){return this.subruleInternal(ae,1,de)},ge.prototype.SUBRULE2=function(ae,de){return this.subruleInternal(ae,2,de)},ge.prototype.SUBRULE3=function(ae,de){return this.subruleInternal(ae,3,de)},ge.prototype.SUBRULE4=function(ae,de){return this.subruleInternal(ae,4,de)},ge.prototype.SUBRULE5=function(ae,de){return this.subruleInternal(ae,5,de)},ge.prototype.SUBRULE6=function(ae,de){return this.subruleInternal(ae,6,de)},ge.prototype.SUBRULE7=function(ae,de){return this.subruleInternal(ae,7,de)},ge.prototype.SUBRULE8=function(ae,de){return this.subruleInternal(ae,8,de)},ge.prototype.SUBRULE9=function(ae,de){return this.subruleInternal(ae,9,de)},ge.prototype.OPTION=function(ae){return this.optionInternal(ae,0)},ge.prototype.OPTION1=function(ae){return this.optionInternal(ae,1)},ge.prototype.OPTION2=function(ae){return this.optionInternal(ae,2)},ge.prototype.OPTION3=function(ae){return this.optionInternal(ae,3)},ge.prototype.OPTION4=function(ae){return this.optionInternal(ae,4)},ge.prototype.OPTION5=function(ae){return this.optionInternal(ae,5)},ge.prototype.OPTION6=function(ae){return this.optionInternal(ae,6)},ge.prototype.OPTION7=function(ae){return this.optionInternal(ae,7)},ge.prototype.OPTION8=function(ae){return this.optionInternal(ae,8)},ge.prototype.OPTION9=function(ae){return this.optionInternal(ae,9)},ge.prototype.OR=function(ae){return this.orInternal(ae,0)},ge.prototype.OR1=function(ae){return this.orInternal(ae,1)},ge.prototype.OR2=function(ae){return this.orInternal(ae,2)},ge.prototype.OR3=function(ae){return this.orInternal(ae,3)},ge.prototype.OR4=function(ae){return this.orInternal(ae,4)},ge.prototype.OR5=function(ae){return this.orInternal(ae,5)},ge.prototype.OR6=function(ae){return this.orInternal(ae,6)},ge.prototype.OR7=function(ae){return this.orInternal(ae,7)},ge.prototype.OR8=function(ae){return this.orInternal(ae,8)},ge.prototype.OR9=function(ae){return this.orInternal(ae,9)},ge.prototype.MANY=function(ae){this.manyInternal(0,ae)},ge.prototype.MANY1=function(ae){this.manyInternal(1,ae)},ge.prototype.MANY2=function(ae){this.manyInternal(2,ae)},ge.prototype.MANY3=function(ae){this.manyInternal(3,ae)},ge.prototype.MANY4=function(ae){this.manyInternal(4,ae)},ge.prototype.MANY5=function(ae){this.manyInternal(5,ae)},ge.prototype.MANY6=function(ae){this.manyInternal(6,ae)},ge.prototype.MANY7=function(ae){this.manyInternal(7,ae)},ge.prototype.MANY8=function(ae){this.manyInternal(8,ae)},ge.prototype.MANY9=function(ae){this.manyInternal(9,ae)},ge.prototype.MANY_SEP=function(ae){this.manySepFirstInternal(0,ae)},ge.prototype.MANY_SEP1=function(ae){this.manySepFirstInternal(1,ae)},ge.prototype.MANY_SEP2=function(ae){this.manySepFirstInternal(2,ae)},ge.prototype.MANY_SEP3=function(ae){this.manySepFirstInternal(3,ae)},ge.prototype.MANY_SEP4=function(ae){this.manySepFirstInternal(4,ae)},ge.prototype.MANY_SEP5=function(ae){this.manySepFirstInternal(5,ae)},ge.prototype.MANY_SEP6=function(ae){this.manySepFirstInternal(6,ae)},ge.prototype.MANY_SEP7=function(ae){this.manySepFirstInternal(7,ae)},ge.prototype.MANY_SEP8=function(ae){this.manySepFirstInternal(8,ae)},ge.prototype.MANY_SEP9=function(ae){this.manySepFirstInternal(9,ae)},ge.prototype.AT_LEAST_ONE=function(ae){this.atLeastOneInternal(0,ae)},ge.prototype.AT_LEAST_ONE1=function(ae){return this.atLeastOneInternal(1,ae)},ge.prototype.AT_LEAST_ONE2=function(ae){this.atLeastOneInternal(2,ae)},ge.prototype.AT_LEAST_ONE3=function(ae){this.atLeastOneInternal(3,ae)},ge.prototype.AT_LEAST_ONE4=function(ae){this.atLeastOneInternal(4,ae)},ge.prototype.AT_LEAST_ONE5=function(ae){this.atLeastOneInternal(5,ae)},ge.prototype.AT_LEAST_ONE6=function(ae){this.atLeastOneInternal(6,ae)},ge.prototype.AT_LEAST_ONE7=function(ae){this.atLeastOneInternal(7,ae)},ge.prototype.AT_LEAST_ONE8=function(ae){this.atLeastOneInternal(8,ae)},ge.prototype.AT_LEAST_ONE9=function(ae){this.atLeastOneInternal(9,ae)},ge.prototype.AT_LEAST_ONE_SEP=function(ae){this.atLeastOneSepFirstInternal(0,ae)},ge.prototype.AT_LEAST_ONE_SEP1=function(ae){this.atLeastOneSepFirstInternal(1,ae)},ge.prototype.AT_LEAST_ONE_SEP2=function(ae){this.atLeastOneSepFirstInternal(2,ae)},ge.prototype.AT_LEAST_ONE_SEP3=function(ae){this.atLeastOneSepFirstInternal(3,ae)},ge.prototype.AT_LEAST_ONE_SEP4=function(ae){this.atLeastOneSepFirstInternal(4,ae)},ge.prototype.AT_LEAST_ONE_SEP5=function(ae){this.atLeastOneSepFirstInternal(5,ae)},ge.prototype.AT_LEAST_ONE_SEP6=function(ae){this.atLeastOneSepFirstInternal(6,ae)},ge.prototype.AT_LEAST_ONE_SEP7=function(ae){this.atLeastOneSepFirstInternal(7,ae)},ge.prototype.AT_LEAST_ONE_SEP8=function(ae){this.atLeastOneSepFirstInternal(8,ae)},ge.prototype.AT_LEAST_ONE_SEP9=function(ae){this.atLeastOneSepFirstInternal(9,ae)},ge.prototype.RULE=function(ae,de,Ce){if(Ce===void 0&&(Ce=Ol),(0,N.r3)(this.definedRulesNames,ae)){var De={message:cs.buildDuplicateRuleNameError({topLevelRule:ae,grammarName:this.className}),type:D.DUPLICATE_RULE_NAME,ruleName:ae};this.definitionErrors.push(De)}this.definedRulesNames.push(ae);var He=this.defineRule(ae,de,Ce);return this[ae]=He,He},ge.prototype.OVERRIDE_RULE=function(ae,de,Ce){Ce===void 0&&(Ce=Ol);var De,He,Ye,ut=[];ut=ut.concat((De=this.definedRulesNames,He=this.className,Ye=[],N.r3(De,ae)||Ye.push({message:"Invalid rule override, rule: ->"+ae+"<- cannot be overridden in the grammar: ->"+He+"<-as it is not defined in any of the super grammars ",type:D.INVALID_RULE_OVERRIDE,ruleName:ae}),Ye)),this.definitionErrors.push.apply(this.definitionErrors,ut);var dt=this.defineRule(ae,de,Ce);return this[ae]=dt,dt},ge.prototype.BACKTRACK=function(ae,de){return function(){this.isBackTrackingStack.push(1);var Ce=this.saveRecogState();try{return ae.apply(this,de),!0}catch(De){if(ii(De))return!1;throw De}finally{this.reloadRecogState(Ce),this.isBackTrackingStack.pop()}}},ge.prototype.getGAstProductions=function(){return this.gastProductionsCache},ge.prototype.getSerializedGastProductions=function(){return An((0,N.VO)(this.gastProductionsCache))},ge}(),Xe=function(){function ge(){}return ge.prototype.initRecognizerEngine=function(ae,de){if(this.className=Ga(this.constructor),this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=ue,this.definedRulesNames=[],this.tokensMap={},this.allRuleNames=[],this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},(0,N.e$)(de,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a <serializedGrammar> property.
See: https://sap.github.io/chevrotain/docs/changes/BREAKING_CHANGES.html#_6-0-0
For Further details.`);if((0,N.kJ)(ae)){if((0,N.xb)(ae))throw Error(`A Token Vocabulary cannot be empty.
Note that the first argument for the parser constructor
is no longer a Token vector (since v4.0).`);if(typeof ae[0].startOffset=="number")throw Error(`The Parser constructor no longer accepts a token vector as the first argument.
See: https://sap.github.io/chevrotain/docs/changes/BREAKING_CHANGES.html#_4-0-0
For Further details.`)}if((0,N.kJ)(ae))this.tokensMap=(0,N.u4)(ae,function(Ye,ut){return Ye[ut.name]=ut,Ye},{});else if((0,N.e$)(ae,"modes")&&(0,N.yW)((0,N.xH)((0,N.VO)(ae.modes)),rt)){var Ce=(0,N.xH)((0,N.VO)(ae.modes)),De=(0,N.jj)(Ce);this.tokensMap=(0,N.u4)(De,function(Ye,ut){return Ye[ut.name]=ut,Ye},{})}else if((0,N.Kn)(ae))this.tokensMap=(0,N.Cl)(ae);else throw Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=Mt;var He=(0,N.yW)((0,N.VO)(ae),function(Ye){return(0,N.xb)(Ye.categoryMatches)});this.tokenMatcher=He?ue:Ae,Ve((0,N.VO)(this.tokensMap))},ge.prototype.defineRule=function(ae,de,Ce){if(this.selfAnalysisDone)throw Error("Grammar rule <"+ae+`> may not be defined after the 'performSelfAnalysis' method has been called'
Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);var De,He=(0,N.e$)(Ce,"resyncEnabled")?Ce.resyncEnabled:Ol.resyncEnabled,Ye=(0,N.e$)(Ce,"recoveryValueFunc")?Ce.recoveryValueFunc:Ol.recoveryValueFunc,ut=this.ruleShortNameIdx<<12;function dt(Nt){try{if(this.outputCst!==!0)return de.apply(this,Nt);de.apply(this,Nt);var tn=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(tn),tn}catch(qt){return this.invokeRuleCatch(qt,He,Ye)}finally{this.ruleFinallyStateUpdate()}}return this.ruleShortNameIdx++,this.shortRuleNameToFull[ut]=ae,this.fullRuleNameToShort[ae]=ut,(De=function(Nt,tn){return Nt===void 0&&(Nt=0),this.ruleInvocationStateUpdate(ut,ae,Nt),dt.call(this,tn)}).ruleName=ae,De.originalGrammarAction=de,De},ge.prototype.invokeRuleCatch=function(ae,de,Ce){var De=this.RULE_STACK.length===1,He=de&&!this.isBackTracking()&&this.recoveryEnabled;if(ii(ae)){if(He){var Ye=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(Ye)){if(ae.resyncedTokens=this.reSyncTo(Ye),!this.outputCst)return Ce();var ut=this.CST_STACK[this.CST_STACK.length-1];return ut.recoveredNode=!0,ut}if(this.outputCst){var ut=this.CST_STACK[this.CST_STACK.length-1];ut.recoveredNode=!0,ae.partialCstResult=ut}throw ae}if(De)return this.moveToTerminatedState(),Ce()}throw ae},ge.prototype.optionInternal=function(ae,de){var Ce=this.getKeyForAutomaticLookahead(512,de),De=this.nestedRuleBeforeClause(ae,Ce);try{return this.optionInternalLogic(ae,de,Ce)}finally{De!==void 0&&this.nestedRuleFinallyClause(Ce,De)}},ge.prototype.optionInternalNoCst=function(ae,de){var Ce=this.getKeyForAutomaticLookahead(512,de);return this.optionInternalLogic(ae,de,Ce)},ge.prototype.optionInternalLogic=function(ae,de,Ce){var De,He,Ye=this,ut=this.getLaFuncFromCache(Ce);if(ae.DEF!==void 0){if(De=ae.DEF,(He=ae.GATE)!==void 0){var dt=ut;ut=function(){return He.call(Ye)&&dt.call(Ye)}}}else De=ae;if(ut.call(this)===!0)return De.call(this)},ge.prototype.atLeastOneInternal=function(ae,de){var Ce=this.getKeyForAutomaticLookahead(1024,ae),De=this.nestedRuleBeforeClause(de,Ce);try{return this.atLeastOneInternalLogic(ae,de,Ce)}finally{De!==void 0&&this.nestedRuleFinallyClause(Ce,De)}},ge.prototype.atLeastOneInternalNoCst=function(ae,de){var Ce=this.getKeyForAutomaticLookahead(1024,ae);this.atLeastOneInternalLogic(ae,de,Ce)},ge.prototype.atLeastOneInternalLogic=function(ae,de,Ce){var De,He,Ye=this,ut=this.getLaFuncFromCache(Ce);if(de.DEF!==void 0){if(De=de.DEF,(He=de.GATE)!==void 0){var dt=ut;ut=function(){return He.call(Ye)&&dt.call(Ye)}}}else De=de;if(ut.call(this)===!0)for(var Nt=this.doSingleRepetition(De);ut.call(this)===!0&&Nt===!0;)Nt=this.doSingleRepetition(De);else throw this.raiseEarlyExitException(ae,m.REPETITION_MANDATORY,de.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[ae,de],ut,1024,ae,za)},ge.prototype.atLeastOneSepFirstInternal=function(ae,de){var Ce=this.getKeyForAutomaticLookahead(1536,ae),De=this.nestedRuleBeforeClause(de,Ce);try{this.atLeastOneSepFirstInternalLogic(ae,de,Ce)}finally{De!==void 0&&this.nestedRuleFinallyClause(Ce,De)}},ge.prototype.atLeastOneSepFirstInternalNoCst=function(ae,de){var Ce=this.getKeyForAutomaticLookahead(1536,ae);this.atLeastOneSepFirstInternalLogic(ae,de,Ce)},ge.prototype.atLeastOneSepFirstInternalLogic=function(ae,de,Ce){var De=this,He=de.DEF,Ye=de.SEP;if(this.getLaFuncFromCache(Ce).call(this)===!0){He.call(this);for(var ut=function(){return De.tokenMatcher(De.LA(1),Ye)};this.tokenMatcher(this.LA(1),Ye)===!0;)this.CONSUME(Ye),He.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[ae,Ye,ut,He,Bs],ut,1536,ae,Bs)}else throw this.raiseEarlyExitException(ae,m.REPETITION_MANDATORY_WITH_SEPARATOR,de.ERR_MSG)},ge.prototype.manyInternal=function(ae,de){var Ce=this.getKeyForAutomaticLookahead(768,ae),De=this.nestedRuleBeforeClause(de,Ce);try{return this.manyInternalLogic(ae,de,Ce)}finally{De!==void 0&&this.nestedRuleFinallyClause(Ce,De)}},ge.prototype.manyInternalNoCst=function(ae,de){var Ce=this.getKeyForAutomaticLookahead(768,ae);return this.manyInternalLogic(ae,de,Ce)},ge.prototype.manyInternalLogic=function(ae,de,Ce){var De,He,Ye=this,ut=this.getLaFuncFromCache(Ce);if(de.DEF!==void 0){if(De=de.DEF,(He=de.GATE)!==void 0){var dt=ut;ut=function(){return He.call(Ye)&&dt.call(Ye)}}}else De=de;for(var Nt=!0;ut.call(this)===!0&&Nt===!0;)Nt=this.doSingleRepetition(De);this.attemptInRepetitionRecovery(this.manyInternal,[ae,de],ut,768,ae,ch,Nt)},ge.prototype.manySepFirstInternal=function(ae,de){var Ce=this.getKeyForAutomaticLookahead(1280,ae),De=this.nestedRuleBeforeClause(de,Ce);try{this.manySepFirstInternalLogic(ae,de,Ce)}finally{De!==void 0&&this.nestedRuleFinallyClause(Ce,De)}},ge.prototype.manySepFirstInternalNoCst=function(ae,de){var Ce=this.getKeyForAutomaticLookahead(1280,ae);this.manySepFirstInternalLogic(ae,de,Ce)},ge.prototype.manySepFirstInternalLogic=function(ae,de,Ce){var De=this,He=de.DEF,Ye=de.SEP;if(this.getLaFuncFromCache(Ce).call(this)===!0){He.call(this);for(var ut=function(){return De.tokenMatcher(De.LA(1),Ye)};this.tokenMatcher(this.LA(1),Ye)===!0;)this.CONSUME(Ye),He.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[ae,Ye,ut,He,di],ut,1280,ae,di)}},ge.prototype.repetitionSepSecondInternal=function(ae,de,Ce,De,He){for(;Ce();)this.CONSUME(de),De.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[ae,de,Ce,De,He],Ce,1536,ae,He)},ge.prototype.doSingleRepetition=function(ae){var de=this.getLexerPosition();return ae.call(this),this.getLexerPosition()>de},ge.prototype.orInternalNoCst=function(ae,de){var Ce=(0,N.kJ)(ae)?ae:ae.DEF,De=this.getKeyForAutomaticLookahead(256,de),He=this.getLaFuncFromCache(De).call(this,Ce);if(He!==void 0)return Ce[He].ALT.call(this);this.raiseNoAltException(de,ae.ERR_MSG)},ge.prototype.orInternal=function(ae,de){var Ce=this.getKeyForAutomaticLookahead(256,de),De=this.nestedRuleBeforeClause(ae,Ce);try{var He=(0,N.kJ)(ae)?ae:ae.DEF,Ye=this.getLaFuncFromCache(Ce).call(this,He);if(Ye!==void 0){var ut=He[Ye],dt=this.nestedAltBeforeClause(ut,de,256,Ye);try{return ut.ALT.call(this)}finally{dt!==void 0&&this.nestedRuleFinallyClause(dt.shortName,dt.nestedName)}}this.raiseNoAltException(de,ae.ERR_MSG)}finally{De!==void 0&&this.nestedRuleFinallyClause(Ce,De)}},ge.prototype.ruleFinallyStateUpdate=function(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){var ae=this.LA(1),de=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:ae,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new ph(de,ae))}},ge.prototype.subruleInternal=function(ae,de,Ce){var De;try{var He=Ce!==void 0?Ce.ARGS:void 0;return De=ae.call(this,de,He),this.cstPostNonTerminal(De,Ce!==void 0&&Ce.LABEL!==void 0?Ce.LABEL:ae.ruleName),De}catch(Ye){this.subruleInternalError(Ye,Ce,ae.ruleName)}},ge.prototype.subruleInternalError=function(ae,de,Ce){throw ii(ae)&&ae.partialCstResult!==void 0&&(this.cstPostNonTerminal(ae.partialCstResult,de!==void 0&&de.LABEL!==void 0?de.LABEL:Ce),delete ae.partialCstResult),ae},ge.prototype.consumeInternal=function(ae,de,Ce){var De;try{var He=this.LA(1);this.tokenMatcher(He,ae)===!0?(this.consumeToken(),De=He):this.consumeInternalError(ae,He,Ce)}catch(Ye){De=this.consumeInternalRecovery(ae,de,Ye)}return this.cstPostTerminal(Ce!==void 0&&Ce.LABEL!==void 0?Ce.LABEL:ae.name,De),De},ge.prototype.consumeInternalError=function(ae,de,Ce){var De,He=this.LA(0);throw De=Ce!==void 0&&Ce.ERR_MSG?Ce.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:ae,actual:de,previous:He,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new Qr(De,de,He))},ge.prototype.consumeInternalRecovery=function(ae,de,Ce){if(this.recoveryEnabled&&Ce.name==="MismatchedTokenException"&&!this.isBackTracking()){var De=this.getFollowsForInRuleRecovery(ae,de);try{return this.tryInRuleRecovery(ae,De)}catch(He){throw He.name===fc?Ce:He}}throw Ce},ge.prototype.saveRecogState=function(){var ae=this.errors,de=(0,N.Qw)(this.RULE_STACK);return{errors:ae,lexerState:this.exportLexerState(),RULE_STACK:de,CST_STACK:this.CST_STACK,LAST_EXPLICIT_RULE_STACK:this.LAST_EXPLICIT_RULE_STACK}},ge.prototype.reloadRecogState=function(ae){this.errors=ae.errors,this.importLexerState(ae.lexerState),this.RULE_STACK=ae.RULE_STACK},ge.prototype.ruleInvocationStateUpdate=function(ae,de,Ce){this.RULE_OCCURRENCE_STACK.push(Ce),this.RULE_STACK.push(ae),this.cstInvocationStateUpdate(de,ae)},ge.prototype.isBackTracking=function(){return this.isBackTrackingStack.length!==0},ge.prototype.getCurrRuleFullName=function(){var ae=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[ae]},ge.prototype.shortRuleNameToFullName=function(ae){return this.shortRuleNameToFull[ae]},ge.prototype.isAtEndOfInput=function(){return this.tokenMatcher(this.LA(1),Mt)},ge.prototype.reset=function(){this.resetLexerState(),this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.LAST_EXPLICIT_RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]},ge}(),co=function(){function ge(){}return ge.prototype.initErrorHandler=function(ae){this._errors=[],this.errorMessageProvider=(0,N.ce)(ae.errorMessageProvider,Yi.errorMessageProvider)},ge.prototype.SAVE_ERROR=function(ae){if(ii(ae))return ae.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:(0,N.Qw)(this.RULE_OCCURRENCE_STACK)},this._errors.push(ae),ae;throw Error("Trying to save an Error which is not a RecognitionException")},Object.defineProperty(ge.prototype,"errors",{get:function(){return(0,N.Qw)(this._errors)},set:function(ae){this._errors=ae},enumerable:!0,configurable:!0}),ge.prototype.raiseEarlyExitException=function(ae,de,Ce){for(var De=this.getCurrRuleFullName(),He=Ou(ae,this.getGAstProductions()[De],de,this.maxLookahead)[0],Ye=[],ut=1;ut<=this.maxLookahead;ut++)Ye.push(this.LA(ut));var dt=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:He,actual:Ye,previous:this.LA(0),customUserDescription:Ce,ruleName:De});throw this.SAVE_ERROR(new mh(dt,this.LA(1),this.LA(0)))},ge.prototype.raiseNoAltException=function(ae,de){for(var Ce=this.getCurrRuleFullName(),De=sl(ae,this.getGAstProductions()[Ce],this.maxLookahead),He=[],Ye=1;Ye<=this.maxLookahead;Ye++)He.push(this.LA(Ye));var ut=this.LA(0),dt=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:De,actual:He,previous:ut,customUserDescription:de,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new eu(dt,this.LA(1),ut))},ge}(),Do=function(){function ge(){}return ge.prototype.initContentAssist=function(){},ge.prototype.computeContentAssist=function(ae,de){var Ce=this.gastProductionsCache[ae];if((0,N.o8)(Ce))throw Error("Rule ->"+ae+"<- does not exist in this grammar.");return Eo([Ce],de,this.tokenMatcher,this.maxLookahead)},ge.prototype.getNextPossibleTokenTypes=function(ae){var de=(0,N.Ps)(ae.ruleStack);return new $a(this.getGAstProductions()[de],ae).startWalking()},ge}(),ot={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(ot);var It=Ht({name:"RECORDING_PHASE_TOKEN",pattern:st.NA});Ve([It]);var mc=Gt(It,`This IToken indicates the Parser is in Recording Phase
See: https://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(mc);var Bu={name:`This CSTNode indicates the Parser is in Recording Phase
See: https://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording for details`,children:{}},gs=function(){function ge(){}return ge.prototype.initGastRecorder=function(ae){this.recordingProdStack=[],this.RECORDING_PHASE=!1},ge.prototype.enableRecording=function(){var ae=this;this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",function(){for(var de=function(De){var He=De>0?De:"";ae["CONSUME"+He]=function(Ye,ut){return this.consumeInternalRecord(Ye,De,ut)},ae["SUBRULE"+He]=function(Ye,ut){return this.subruleInternalRecord(Ye,De,ut)},ae["OPTION"+He]=function(Ye){return this.optionInternalRecord(Ye,De)},ae["OR"+He]=function(Ye){return this.orInternalRecord(Ye,De)},ae["MANY"+He]=function(Ye){this.manyInternalRecord(De,Ye)},ae["MANY_SEP"+He]=function(Ye){this.manySepFirstInternalRecord(De,Ye)},ae["AT_LEAST_ONE"+He]=function(Ye){this.atLeastOneInternalRecord(De,Ye)},ae["AT_LEAST_ONE_SEP"+He]=function(Ye){this.atLeastOneSepFirstInternalRecord(De,Ye)}},Ce=0;Ce<10;Ce++)de(Ce);ae.consume=function(De,He,Ye){return this.consumeInternalRecord(He,De,Ye)},ae.subrule=function(De,He,Ye){return this.subruleInternalRecord(He,De,Ye)},ae.option=function(De,He){return this.optionInternalRecord(He,De)},ae.or=function(De,He){return this.orInternalRecord(He,De)},ae.many=function(De,He){this.manyInternalRecord(De,He)},ae.atLeastOne=function(De,He){this.atLeastOneInternalRecord(De,He)},ae.ACTION=ae.ACTION_RECORD,ae.BACKTRACK=ae.BACKTRACK_RECORD,ae.LA=ae.LA_RECORD})},ge.prototype.disableRecording=function(){var ae=this;this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",function(){for(var de=0;de<10;de++){var Ce=de>0?de:"";delete ae["CONSUME"+Ce],delete ae["SUBRULE"+Ce],delete ae["OPTION"+Ce],delete ae["OR"+Ce],delete ae["MANY"+Ce],delete ae["MANY_SEP"+Ce],delete ae["AT_LEAST_ONE"+Ce],delete ae["AT_LEAST_ONE_SEP"+Ce]}delete ae.consume,delete ae.subrule,delete ae.option,delete ae.or,delete ae.many,delete ae.atLeastOne,delete ae.ACTION,delete ae.BACKTRACK,delete ae.LA})},ge.prototype.ACTION_RECORD=function(ae){},ge.prototype.BACKTRACK_RECORD=function(ae,de){return function(){return!0}},ge.prototype.LA_RECORD=function(ae){return ms},ge.prototype.topLevelRuleRecord=function(ae,de){try{var Ce=new wt({definition:[],name:ae});return Ce.name=ae,this.recordingProdStack.push(Ce),de.call(this),this.recordingProdStack.pop(),Ce}catch(De){if(De.KNOWN_RECORDER_ERROR!==!0)try{De.message=De.message+`
This error was thrown during the "grammar recording phase" For more info see:
https://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording`}catch{}throw De}},ge.prototype.optionInternalRecord=function(ae,de){return ps.call(this,bt,ae,de)},ge.prototype.atLeastOneInternalRecord=function(ae,de){ps.call(this,Rt,de,ae)},ge.prototype.atLeastOneSepFirstInternalRecord=function(ae,de){ps.call(this,Lt,de,ae,!0)},ge.prototype.manyInternalRecord=function(ae,de){ps.call(this,Dt,de,ae)},ge.prototype.manySepFirstInternalRecord=function(ae,de){ps.call(this,Jt,de,ae,!0)},ge.prototype.orInternalRecord=function(ae,de){return vh.call(this,ae,de)},ge.prototype.subruleInternalRecord=function(ae,de,Ce){if(ua(de),!ae||(0,N.e$)(ae,"ruleName")===!1){var De=Error("<SUBRULE"+Wn(de)+"> argument is invalid expecting a Parser method reference but got: <"+JSON.stringify(ae)+`>
inside top level rule: <`+this.recordingProdStack[0].name+">");throw De.KNOWN_RECORDER_ERROR=!0,De}var He=(0,N.fj)(this.recordingProdStack),Ye=new vt({idx:de,nonTerminalName:ae.ruleName,referencedRule:void 0});return He.definition.push(Ye),this.outputCst?Bu:ot},ge.prototype.consumeInternalRecord=function(ae,de,Ce){if(ua(de),!je(ae)){var De=Error("<CONSUME"+Wn(de)+"> argument is invalid expecting a TokenType reference but got: <"+JSON.stringify(ae)+`>
inside top level rule: <`+this.recordingProdStack[0].name+">");throw De.KNOWN_RECORDER_ERROR=!0,De}var He=(0,N.fj)(this.recordingProdStack),Ye=new nn({idx:de,terminalType:ae});return He.definition.push(Ye),mc},ge}();function ps(ge,ae,de,Ce){Ce===void 0&&(Ce=!1),ua(de);var De=(0,N.fj)(this.recordingProdStack),He=(0,N.mf)(ae)?ae:ae.DEF,Ye=new ge({definition:[],idx:de});return(0,N.e$)(ae,"NAME")&&(Ye.name=ae.NAME),Ce&&(Ye.separator=ae.SEP),(0,N.e$)(ae,"MAX_LOOKAHEAD")&&(Ye.maxLookahead=ae.MAX_LOOKAHEAD),this.recordingProdStack.push(Ye),He.call(this),De.definition.push(Ye),this.recordingProdStack.pop(),ot}function vh(ge,ae){var de=this;ua(ae);var Ce=(0,N.fj)(this.recordingProdStack),De=(0,N.kJ)(ge)===!1,He=De===!1?ge:ge.DEF,Ye=new zt({definition:[],idx:ae,ignoreAmbiguities:De&&ge.IGNORE_AMBIGUITIES===!0});return(0,N.e$)(ge,"NAME")&&(Ye.name=ge.NAME),(0,N.e$)(ge,"MAX_LOOKAHEAD")&&(Ye.maxLookahead=ge.MAX_LOOKAHEAD),Ye.hasPredicates=(0,N.G)(He,function(ut){return(0,N.mf)(ut.GATE)}),Ce.definition.push(Ye),(0,N.Ed)(He,function(ut){var dt=new Ct({definition:[]});Ye.definition.push(dt),(0,N.e$)(ut,"NAME")&&(dt.name=ut.NAME),(0,N.e$)(ut,"IGNORE_AMBIGUITIES")?dt.ignoreAmbiguities=ut.IGNORE_AMBIGUITIES:(0,N.e$)(ut,"GATE")&&(dt.ignoreAmbiguities=!0),de.recordingProdStack.push(dt),ut.ALT.call(de),de.recordingProdStack.pop()}),ot}function Wn(ge){return ge===0?"":""+ge}function ua(ge){if(ge<0||ge>255){var ae=Error("Invalid DSL Method idx value: <"+ge+`>
Idx value must be a none negative value smaller than 256`);throw ae.KNOWN_RECORDER_ERROR=!0,ae}}var ja=function(){function ge(){}return ge.prototype.initPerformanceTracer=function(ae){if((0,N.e$)(ae,"traceInitPerf")){var de=ae.traceInitPerf,Ce=typeof de=="number";this.traceInitMaxIdent=Ce?de:1/0,this.traceInitPerf=Ce?de>0:de}else this.traceInitMaxIdent=0,this.traceInitPerf=Yi.traceInitPerf;this.traceInitIndent=-1},ge.prototype.TRACE_INIT=function(ae,de){if(this.traceInitPerf!==!0)return de();this.traceInitIndent++;var Ce=Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(Ce+"--> <"+ae+">");var De=(0,N.HT)(de),He=De.time,Ye=De.value,ut=He>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&ut(Ce+"<-- <"+ae+"> time: "+He+"ms"),this.traceInitIndent--,Ye},ge}(),Pi=(C=function(ge,ae){return(C=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(de,Ce){de.__proto__=Ce}||function(de,Ce){for(var De in Ce)Ce.hasOwnProperty(De)&&(de[De]=Ce[De])})(ge,ae)},function(ge,ae){function de(){this.constructor=ge}C(ge,ae),ge.prototype=ae===null?Object.create(ae):(de.prototype=ae.prototype,new de)}),ms=Gt(Mt,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(ms);var Yi=Object.freeze({recoveryEnabled:!1,maxLookahead:4,ignoredIssues:{},dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Ql,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Ol=Object.freeze({recoveryValueFunc:function(){},resyncEnabled:!0});function Nl(ge){return ge===void 0&&(ge=void 0),function(){return ge}}(h=D||(D={}))[h.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",h[h.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",h[h.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",h[h.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",h[h.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",h[h.LEFT_RECURSION=5]="LEFT_RECURSION",h[h.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",h[h.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",h[h.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",h[h.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",h[h.INVALID_NESTED_RULE_NAME=10]="INVALID_NESTED_RULE_NAME",h[h.DUPLICATE_NESTED_NAME=11]="DUPLICATE_NESTED_NAME",h[h.NO_NON_EMPTY_LOOKAHEAD=12]="NO_NON_EMPTY_LOOKAHEAD",h[h.AMBIGUOUS_PREFIX_ALTS=13]="AMBIGUOUS_PREFIX_ALTS",h[h.TOO_MANY_ALTS=14]="TOO_MANY_ALTS";var Bi=function(){function ge(ae,de){de===void 0&&(de=Yi),this.ignoredIssues=Yi.ignoredIssues,this.definitionErrors=[],this.selfAnalysisDone=!1,this.initErrorHandler(de),this.initLexerAdapter(),this.initLooksAhead(de),this.initRecognizerEngine(ae,de),this.initRecoverable(de),this.initTreeBuilder(de),this.initContentAssist(),this.initGastRecorder(de),this.initPerformanceTracer(de),(0,N.e$)(de,"ignoredIssues")&&de.ignoredIssues!==Yi.ignoredIssues&&(0,N.rr)(`The <ignoredIssues> IParserConfig property is soft-deprecated and will be removed in future versions.
Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.`),this.ignoredIssues=(0,N.e$)(de,"ignoredIssues")?de.ignoredIssues:Yi.ignoredIssues,this.skipValidations=(0,N.e$)(de,"skipValidations")?de.skipValidations:Yi.skipValidations}return ge.performSelfAnalysis=function(ae){ae.performSelfAnalysis()},ge.prototype.performSelfAnalysis=function(){var ae=this;this.TRACE_INIT("performSelfAnalysis",function(){ae.selfAnalysisDone=!0;var de=ae.className;ae.TRACE_INIT("toFastProps",function(){(0,N.SV)(ae)}),ae.TRACE_INIT("Grammar Recording",function(){try{ae.enableRecording(),(0,N.Ed)(ae.definedRulesNames,function(De){var He=ae[De].originalGrammarAction,Ye=void 0;ae.TRACE_INIT(De+" Rule",function(){Ye=ae.topLevelRuleRecord(De,He)}),ae.gastProductionsCache[De]=Ye})}finally{ae.disableRecording()}});var Ce=[];if(ae.TRACE_INIT("Grammar Resolving",function(){Ce=Ca({rules:(0,N.VO)(ae.gastProductionsCache)}),ae.definitionErrors.push.apply(ae.definitionErrors,Ce)}),ae.TRACE_INIT("Grammar Validations",function(){if((0,N.xb)(Ce)&&ae.skipValidations===!1){var De=cc({rules:(0,N.VO)(ae.gastProductionsCache),maxLookahead:ae.maxLookahead,tokenTypes:(0,N.VO)(ae.tokensMap),ignoredIssues:ae.ignoredIssues,errMsgProvider:cs,grammarName:de});ae.definitionErrors.push.apply(ae.definitionErrors,De)}}),(0,N.xb)(ae.definitionErrors)&&(ae.recoveryEnabled&&ae.TRACE_INIT("computeAllProdsFollows",function(){var De,He,Ye=(De=(0,N.VO)(ae.gastProductionsCache),He={},(0,N.Ed)(De,function(ut){var dt=new us(ut).startWalking();(0,N.f0)(He,dt)}),He);ae.resyncFollows=Ye}),ae.TRACE_INIT("ComputeLookaheadFunctions",function(){ae.preComputeLookaheadFunctions((0,N.VO)(ae.gastProductionsCache))})),ae.TRACE_INIT("expandAllNestedRuleNames",function(){var De,He,Ye,ut=(De=(0,N.VO)(ae.gastProductionsCache),He=ae.fullRuleNameToShort,Ye={allRuleNames:[]},(0,N.Ed)(De,function(dt){var Nt=He[dt.name];Ye.allRuleNames.push(dt.name);var tn=new Du(Nt);dt.accept(tn),(0,N.Ed)(tn.result,function(qt){qt.def,qt.key;var Vt=qt.name;Ye.allRuleNames.push(dt.name+Vt)})}),Ye);ae.allRuleNames=ut.allRuleNames}),!ge.DEFER_DEFINITION_ERRORS_HANDLING&&!(0,N.xb)(ae.definitionErrors))throw Error(`Parser Definition Errors detected:
`+(0,N.UI)(ae.definitionErrors,function(De){return De.message}).join(`
-------------------------------
`))})},ge.DEFER_DEFINITION_ERRORS_HANDLING=!1,ge}();(0,N.ef)(Bi,[pc,zr,fs,Dl,Xe,gr,co,Do,gs,ja]);var Lu=function(ge){function ae(de,Ce){Ce===void 0&&(Ce=Yi);var De=(0,N.Cl)(Ce);return De.outputCst=!0,ge.call(this,de,De)||this}return Pi(ae,ge),ae}(Bi),Pl=function(ge){function ae(de,Ce){Ce===void 0&&(Ce=Yi);var De=(0,N.Cl)(Ce);return De.outputCst=!1,ge.call(this,de,De)||this}return Pi(ae,ge),ae}(Bi);function ul(ge,ae){var de=ae===void 0?{}:ae,Ce=de.resourceBase,De=Ce===void 0?"https://unpkg.com/chevrotain@"+O+"/diagrams/":Ce,He=de.css;return`
<!-- This is a generated file -->
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
background-color: hsl(30, 20%, 95%)
}
</style>
<link rel='stylesheet' href='`+(He===void 0?"https://unpkg.com/chevrotain@"+O+"/diagrams/diagrams.css":He)+`'>
`+(`
<script src='`+De+`vendor/railroad-diagrams.js'><\/script>
<script src='`+De+`src/diagrams_builder.js'><\/script>
<script src='`+De+`src/diagrams_behavior.js'><\/script>
<script src='`+De+`src/main.js'><\/script>
`)+`
<div id="diagrams" align="center"></div>
`+(`
<script>
window.serializedGrammar = `+JSON.stringify(ge,null," ")+`;
<\/script>
`)+`
<script>
var diagramsDiv = document.getElementById("diagrams");
main.drawDiagramsFromSerializedGrammar(serializedGrammar, diagramsDiv);
<\/script>
`}function tu(ge){var ae;return`
function `+ge.name+`(tokenVocabulary, config) {
// invoke super constructor
// No support for embedded actions currently, so we can 'hardcode'
// The use of CstParser.
chevrotain.CstParser.call(this, tokenVocabulary, config)
const $ = this
`+(ae=ge.rules,(0,N.UI)(ae,function(de){var Ce,De;return De=1,Ki(1,'$.RULE("'+(Ce=de).name+'", function() {')+`
`+vs(Ce.definition,De+1)+(Ki(De+1,"})")+`
`)}).join(`
`))+`
// very important to call this after all the rules have been defined.
// otherwise the parser may not work correctly as it will lack information
// derived during the self analysis phase.
this.performSelfAnalysis(this)
}
// inheritance as implemented in javascript in the previous decade... :(
`+ge.name+`.prototype = Object.create(chevrotain.CstParser.prototype)
`+ge.name+".prototype.constructor = "+ge.name+`
`}function Ia(ge,ae,de){var Ce=Ki(de,"$."+(ge+ae.idx)+"(");return ae.name||ae.separator?(Ce+=`{
`,ae.name&&(Ce+=Ki(de+1,'NAME: "'+ae.name+'"')+`,
`),ae.separator&&(Ce+=Ki(de+1,"SEP: this.tokensMap."+ae.separator.name)+`,
`),Ce+="DEF: "+Fu(ae.definition,de+2)+`
`,Ce+=Ki(de,"}")+`
`):Ce+=Fu(ae.definition,de+1),Ce+=Ki(de,")")+`
`}function Fu(ge,ae){var de=`function() {
`;return de+=vs(ge,ae),de+=Ki(ae,"}")+`
`}function vs(ge,ae){var de="";return(0,N.Ed)(ge,function(Ce){de+=function(De,He){var Ye;if(De instanceof vt)return Ki(He,"$.SUBRULE"+De.idx+"($."+De.nonTerminalName+`)
`);if(De instanceof bt)return Ia("OPTION",De,He);if(De instanceof Rt)return Ia("AT_LEAST_ONE",De,He);if(De instanceof Lt)return Ia("AT_LEAST_ONE_SEP",De,He);if(De instanceof Jt)return Ia("MANY_SEP",De,He);if(De instanceof Dt)return Ia("MANY",De,He);if(De instanceof zt)return Ki(He,"$.OR"+De.idx+"([")+`
`+(0,N.UI)(De.definition,function(ut){var dt,Nt,tn;return dt=ut,tn=Ki(Nt=He+1,"{")+`
`,dt.name&&(tn+=Ki(Nt+1,'NAME: "'+dt.name+'",')+`
`),tn+=Ki(Nt+1,"ALT: function() {")+`
`,tn+=vs(dt.definition,Nt+1),tn+=Ki(Nt+1,"}")+`
`,tn+=Ki(Nt,"}")}).join(`,
`)+`
`+Ki(He,`])
`);if(De instanceof nn)return Ye=De.terminalType.name,Ki(He,"$.CONSUME"+De.idx+"(this.tokensMap."+Ye+`)
`);if(De instanceof Ct)return vs(De.definition,He);throw Error("non exhaustive match")}(Ce,ae+1)}),de}function Ki(ge,ae){return Array(4*ge+1).join(" ")+ae}function mi(ge){var ae,de=Function("tokenVocabulary","config","chevrotain",`
`+tu(ae={name:ge.name,rules:ge.rules})+`
return new `+ae.name+`(tokenVocabulary, config)
`);return function(Ce){return de(ge.tokenVocabulary,Ce,u(38377))}}function ta(ge){var ae;return`
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['chevrotain'], factory);
} else if (typeof module === 'object' && module.exports) {
// Node. Does not work with strict CommonJS, but
// only CommonJS-like environments that support module.exports,
// like Node.
module.exports = factory(require('chevrotain'));
} else {
// Browser globals (root is window)
root.returnExports = factory(root.b);
}
}(typeof self !== 'undefined' ? self : this, function (chevrotain) {
`+tu(ae={name:ge.name,rules:ge.rules})+`
return {
`+ae.name+": "+ae.name+`
}
}));
`}function na(){console.warn(`The clearCache function was 'soft' removed from the Chevrotain API.
It performs no action other than printing this message.
Please avoid using it as it will be completely removed in the future`)}},46394:function(E,A,u){function o(Ie){return Ie&&Ie.length===0}function S(Ie){return Ie==null?[]:Object.keys(Ie)}function _(Ie){for(var _e=[],Ae=Object.keys(Ie),ue=0;ue<Ae.length;ue++)_e.push(Ie[Ae[ue]]);return _e}function p(Ie,_e){for(var Ae=[],ue=S(Ie),ke=0;ke<ue.length;ke++){var Pe=ue[ke];Ae.push(_e.call(null,Ie[Pe],Pe))}return Ae}function f(Ie,_e){for(var Ae=[],ue=0;ue<Ie.length;ue++)Ae.push(_e.call(null,Ie[ue],ue));return Ae}function y(Ie){return o(Ie)?void 0:Ie[0]}function d(Ie){var _e=Ie&&Ie.length;return _e?Ie[_e-1]:void 0}function v(Ie,_e){if(Array.isArray(Ie))for(var Ae=0;Ae<Ie.length;Ae++)_e.call(null,Ie[Ae],Ae);else if(Y(Ie))for(var ue=S(Ie),Ae=0;Ae<ue.length;Ae++){var ke=ue[Ae],Pe=Ie[ke];_e.call(null,Pe,ke)}else throw Error("non exhaustive match")}function b(Ie){return typeof Ie=="string"}function s(Ie){return Ie===void 0}function l(Ie){return Ie instanceof Function}function w(Ie,_e){return _e===void 0&&(_e=1),Ie.slice(_e,Ie.length)}function I(Ie,_e){return _e===void 0&&(_e=1),Ie.slice(0,Ie.length-_e)}function C(Ie,_e){var Ae=[];if(Array.isArray(Ie))for(var ue=0;ue<Ie.length;ue++){var ke=Ie[ue];_e.call(null,ke)&&Ae.push(ke)}return Ae}function h(Ie,_e){return C(Ie,function(Ae){return!_e(Ae)})}function c(Ie,_e){for(var Ae=Object.keys(Ie),ue={},ke=0;ke<Ae.length;ke++){var Pe=Ae[ke],Ve=Ie[Pe];_e(Ve)&&(ue[Pe]=Ve)}return ue}function m(Ie,_e){return!!Y(Ie)&&Ie.hasOwnProperty(_e)}function T(Ie,_e){return N(Ie,function(Ae){return Ae===_e})!==void 0}function D(Ie){for(var _e=[],Ae=0;Ae<Ie.length;Ae++)_e.push(Ie[Ae]);return _e}function O(Ie){var _e={};for(var Ae in Ie)Object.prototype.hasOwnProperty.call(Ie,Ae)&&(_e[Ae]=Ie[Ae]);return _e}function N(Ie,_e){for(var Ae=0;Ae<Ie.length;Ae++){var ue=Ie[Ae];if(_e.call(null,ue))return ue}}function z(Ie,_e){for(var Ae=[],ue=0;ue<Ie.length;ue++){var ke=Ie[ue];_e.call(null,ke)&&Ae.push(ke)}return Ae}function H(Ie,_e,Ae){for(var ue=Array.isArray(Ie),ke=ue?Ie:_(Ie),Pe=ue?[]:S(Ie),Ve=Ae,je=0;je<ke.length;je++)Ve=_e.call(null,Ve,ke[je],ue?je:Pe[je]);return Ve}function $(Ie){return h(Ie,function(_e){return _e==null})}function V(Ie,_e){_e===void 0&&(_e=function(ue){return ue});var Ae=[];return H(Ie,function(ue,ke){var Pe=_e(ke);return T(Ae,Pe)?ue:(Ae.push(Pe),ue.concat(ke))},[])}function P(Ie){return Array.isArray(Ie)}function U(Ie){return Ie instanceof RegExp}function Y(Ie){return Ie instanceof Object}function Z(Ie,_e){for(var Ae=0;Ae<Ie.length;Ae++)if(!_e(Ie[Ae],Ae))return!1;return!0}function X(Ie,_e){return h(Ie,function(Ae){return T(_e,Ae)})}function J(Ie,_e){for(var Ae=0;Ae<Ie.length;Ae++)if(_e(Ie[Ae]))return!0;return!1}function q(Ie,_e){for(var Ae=0;Ae<Ie.length;Ae++)if(Ie[Ae]===_e)return Ae;return-1}function te(Ie){for(var _e=[],Ae=1;Ae<arguments.length;Ae++)_e[Ae-1]=arguments[Ae];for(var ue=0;ue<_e.length;ue++)for(var ke=_e[ue],Pe=S(ke),Ve=0;Ve<Pe.length;Ve++){var je=Pe[Ve];Ie[je]=ke[je]}return Ie}function re(Ie){for(var _e=[],Ae=1;Ae<arguments.length;Ae++)_e[Ae-1]=arguments[Ae];for(var ue=0;ue<_e.length;ue++){var ke=_e[ue];if(!s(ke))for(var Pe=S(ke),Ve=0;Ve<Pe.length;Ve++){var je=Pe[Ve];m(Ie,je)||(Ie[je]=ke[je])}}return Ie}function ie(){for(var Ie=[],_e=0;_e<arguments.length;_e++)Ie[_e]=arguments[_e];return re.apply(null,[{}].concat(Ie))}function ne(Ie,_e){var Ae={};return v(Ie,function(ue){var ke=_e(ue),Pe=Ae[ke];Pe?Pe.push(ue):Ae[ke]=[ue]}),Ae}function le(Ie,_e){for(var Ae=O(Ie),ue=S(_e),ke=0;ke<ue.length;ke++){var Pe=ue[ke],Ve=_e[Pe];Ae[Pe]=Ve}return Ae}function fe(){}function we(Ie){return Ie}function pe(Ie){for(var _e=[],Ae=0;Ae<Ie.length;Ae++){var ue=Ie[Ae];_e.push(ue!==void 0?ue:void 0)}return _e}function ve(Ie){console&&console.error&&console.error("Error: "+Ie)}function be(Ie){console&&console.warn&&console.warn("Warning: "+Ie)}function Ee(){return typeof Map=="function"}function Re(Ie,_e){_e.forEach(function(Ae){var ue=Ae.prototype;Object.getOwnPropertyNames(ue).forEach(function(ke){if(ke!=="constructor"){var Pe=Object.getOwnPropertyDescriptor(ue,ke);Pe&&(Pe.get||Pe.set)?Object.defineProperty(Ie.prototype,ke,Pe):Ie.prototype[ke]=Ae.prototype[ke]}})})}function Ne(Ie){function _e(){}_e.prototype=Ie;var Ae=new _e;function ue(){return typeof Ae.bar}return ue(),ue(),Ie}function Le(Ie){return Ie[Ie.length-1]}function Se(Ie){var _e=new Date().getTime(),Ae=Ie();return{time:new Date().getTime()-_e,value:Ae}}u.d(A,{Cl:()=>O,Cw:()=>w,Ed:()=>v,G:()=>J,HD:()=>b,HT:()=>Se,Kj:()=>U,Kn:()=>Y,Oq:()=>z,Ps:()=>y,Q8:()=>p,Qw:()=>D,SV:()=>Ne,TS:()=>le,UI:()=>f,VO:()=>_,WB:()=>ve,Wd:()=>we,X0:()=>pe,XP:()=>S,Z$:()=>d,ce:()=>ie,cq:()=>q,d1:()=>h,dG:()=>fe,dU:()=>Ee,e$:()=>m,e5:()=>X,ef:()=>Re,ei:()=>c,f0:()=>te,fj:()=>Le,hX:()=>C,j7:()=>I,jj:()=>V,kJ:()=>P,mf:()=>l,o8:()=>s,oA:()=>$,r3:()=>T,rr:()=>be,sE:()=>N,u4:()=>H,vM:()=>ne,xH:()=>function Ie(_e){for(var Ae=[],ue=0;ue<_e.length;ue++){var ke=_e[ue];Array.isArray(ke)?Ae=Ae.concat(Ie(ke)):Ae.push(ke)}return Ae},xb:()=>o,yW:()=>Z})},28548:function(E,A,u){var o=u(98129),S={};for(var _ in o)o.hasOwnProperty(_)&&(S[o[_]]=_);var p=E.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var f in p)if(p.hasOwnProperty(f)){if(!("channels"in p[f]))throw Error("missing channels property: "+f);if(!("labels"in p[f]))throw Error("missing channel labels property: "+f);if(p[f].labels.length!==p[f].channels)throw Error("channel and label counts mismatch: "+f);var y=p[f].channels,d=p[f].labels;delete p[f].channels,delete p[f].labels,Object.defineProperty(p[f],"channels",{value:y}),Object.defineProperty(p[f],"labels",{value:d})}p.rgb.hsl=function(v){var b,s,l=v[0]/255,w=v[1]/255,I=v[2]/255,C=Math.min(l,w,I),h=Math.max(l,w,I),c=h-C;return h===C?b=0:l===h?b=(w-I)/c:w===h?b=2+(I-l)/c:I===h&&(b=4+(l-w)/c),(b=Math.min(60*b,360))<0&&(b+=360),s=(C+h)/2,[b,100*(h===C?0:s<=.5?c/(h+C):c/(2-h-C)),100*s]},p.rgb.hsv=function(v){var b,s,l,w,I,C=v[0]/255,h=v[1]/255,c=v[2]/255,m=Math.max(C,h,c),T=m-Math.min(C,h,c),D=function(O){return(m-O)/6/T+.5};return T===0?w=I=0:(I=T/m,b=D(C),s=D(h),l=D(c),C===m?w=l-s:h===m?w=.3333333333333333+b-l:c===m&&(w=.6666666666666666+s-b),w<0?w+=1:w>1&&(w-=1)),[360*w,100*I,100*m]},p.rgb.hwb=function(v){var b=v[0],s=v[1],l=v[2];return[p.rgb.hsl(v)[0],.00392156862745098*Math.min(b,Math.min(s,l))*100,100*(l=1-.00392156862745098*Math.max(b,Math.max(s,l)))]},p.rgb.cmyk=function(v){var b,s=v[0]/255,l=v[1]/255,w=v[2]/255;return b=Math.min(1-s,1-l,1-w),[100*((1-s-b)/(1-b)||0),100*((1-l-b)/(1-b)||0),100*((1-w-b)/(1-b)||0),100*b]},p.rgb.keyword=function(v){var b,s=S[v];if(s)return s;var l=1/0;for(var w in o)if(o.hasOwnProperty(w)){var I=o[w],C=Math.pow(v[0]-I[0],2)+Math.pow(v[1]-I[1],2)+Math.pow(v[2]-I[2],2);C<l&&(l=C,b=w)}return b},p.keyword.rgb=function(v){return o[v]},p.rgb.xyz=function(v){var b=v[0]/255,s=v[1]/255,l=v[2]/255;return[100*(.4124*(b=b>.04045?Math.pow((b+.055)/1.055,2.4):b/12.92)+.3576*(s=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92)+.1805*(l=l>.04045?Math.pow((l+.055)/1.055,2.4):l/12.92)),100*(.2126*b+.7152*s+.0722*l),100*(.0193*b+.1192*s+.9505*l)]},p.rgb.lab=function(v){var b=p.rgb.xyz(v),s=b[0],l=b[1],w=b[2];return s/=95.047,l/=100,w/=108.883,s=s>.008856?Math.pow(s,.3333333333333333):7.787*s+.13793103448275862,[116*(l=l>.008856?Math.pow(l,.3333333333333333):7.787*l+.13793103448275862)-16,500*(s-l),200*(l-(w=w>.008856?Math.pow(w,.3333333333333333):7.787*w+.13793103448275862))]},p.hsl.rgb=function(v){var b,s,l,w,I,C=v[0]/360,h=v[1]/100,c=v[2]/100;if(h===0)return[I=255*c,I,I];s=c<.5?c*(1+h):c+h-c*h,b=2*c-s,w=[0,0,0];for(var m=0;m<3;m++)(l=C+-(.3333333333333333*(m-1)))<0&&l++,l>1&&l--,I=6*l<1?b+(s-b)*6*l:2*l<1?s:3*l<2?b+(s-b)*(.6666666666666666-l)*6:b,w[m]=255*I;return w},p.hsl.hsv=function(v){var b,s=v[0],l=v[1]/100,w=v[2]/100,I=l,C=Math.max(w,.01);return w*=2,l*=w<=1?w:2-w,I*=C<=1?C:2-C,b=(w+l)/2,[s,100*(w===0?2*I/(C+I):2*l/(w+l)),100*b]},p.hsv.rgb=function(v){var b=v[0]/60,s=v[1]/100,l=v[2]/100,w=Math.floor(b)%6,I=b-Math.floor(b),C=255*l*(1-s),h=255*l*(1-s*I),c=255*l*(1-s*(1-I));switch(l*=255,w){case 0:return[l,c,C];case 1:return[h,l,C];case 2:return[C,l,c];case 3:return[C,h,l];case 4:return[c,C,l];case 5:return[l,C,h]}},p.hsv.hsl=function(v){var b,s,l=v[0],w=v[1]/100,I=v[2]/100,C=Math.max(I,.01);return s=(2-w)*I,b=(2-w)*C,[l,100*(w*C/(b<=1?b:2-b)||0),100*(s/=2)]},p.hwb.rgb=function(v){var b,s,l,w,I,C,h,c=v[0]/360,m=v[1]/100,T=v[2]/100,D=m+T;switch(D>1&&(m/=D,T/=D),b=Math.floor(6*c),s=1-T,l=6*c-b,(1&b)!=0&&(l=1-l),w=m+l*(s-m),b){default:case 6:case 0:I=s,C=w,h=m;break;case 1:I=w,C=s,h=m;break;case 2:I=m,C=s,h=w;break;case 3:I=m,C=w,h=s;break;case 4:I=w,C=m,h=s;break;case 5:I=s,C=m,h=w}return[255*I,255*C,255*h]},p.cmyk.rgb=function(v){var b=v[0]/100,s=v[1]/100,l=v[2]/100,w=v[3]/100;return[255*(1-Math.min(1,b*(1-w)+w)),255*(1-Math.min(1,s*(1-w)+w)),255*(1-Math.min(1,l*(1-w)+w))]},p.xyz.rgb=function(v){var b,s,l,w=v[0]/100,I=v[1]/100,C=v[2]/100;return b=3.2406*w+-1.5372*I+-.4986*C,s=-.9689*w+1.8758*I+.0415*C,l=.0557*w+-.204*I+1.057*C,b=b>.0031308?1.055*Math.pow(b,.4166666666666667)-.055:12.92*b,s=s>.0031308?1.055*Math.pow(s,.4166666666666667)-.055:12.92*s,l=l>.0031308?1.055*Math.pow(l,.4166666666666667)-.055:12.92*l,[255*(b=Math.min(Math.max(0,b),1)),255*(s=Math.min(Math.max(0,s),1)),255*(l=Math.min(Math.max(0,l),1))]},p.xyz.lab=function(v){var b=v[0],s=v[1],l=v[2];return b/=95.047,s/=100,l/=108.883,b=b>.008856?Math.pow(b,.3333333333333333):7.787*b+.13793103448275862,[116*(s=s>.008856?Math.pow(s,.3333333333333333):7.787*s+.13793103448275862)-16,500*(b-s),200*(s-(l=l>.008856?Math.pow(l,.3333333333333333):7.787*l+.13793103448275862))]},p.lab.xyz=function(v){var b,s,l,w=v[0],I=v[1],C=v[2];b=I/500+(s=(w+16)/116),l=s-C/200;var h=Math.pow(s,3),c=Math.pow(b,3),m=Math.pow(l,3);return s=(h>.008856?h:(s-.13793103448275862)/7.787)*100,[b=(c>.008856?c:(b-.13793103448275862)/7.787)*95.047,s,l=(m>.008856?m:(l-.13793103448275862)/7.787)*108.883]},p.lab.lch=function(v){var b,s=v[0],l=v[1],w=v[2];return(b=360*Math.atan2(w,l)/2/Math.PI)<0&&(b+=360),[s,Math.sqrt(l*l+w*w),b]},p.lch.lab=function(v){var b,s=v[0],l=v[1];return[s,l*Math.cos(b=v[2]/360*2*Math.PI),l*Math.sin(b)]},p.rgb.ansi16=function(v){var b=v[0],s=v[1],l=v[2],w=1 in arguments?arguments[1]:p.rgb.hsv(v)[2];if((w=Math.round(w/50))===0)return 30;var I=30+(Math.round(l/255)<<2|Math.round(s/255)<<1|Math.round(b/255));return w===2&&(I+=60),I},p.hsv.ansi16=function(v){return p.rgb.ansi16(p.hsv.rgb(v),v[2])},p.rgb.ansi256=function(v){var b=v[0],s=v[1],l=v[2];return b===s&&s===l?b<8?16:b>248?231:Math.round((b-8)/247*24)+232:16+36*Math.round(b/255*5)+6*Math.round(s/255*5)+Math.round(l/255*5)},p.ansi16.rgb=function(v){var b=v%10;if(b===0||b===7)return v>50&&(b+=3.5),[b=b/10.5*255,b,b];var s=(~~(v>50)+1)*.5;return[(1&b)*s*255,(b>>1&1)*s*255,(b>>2&1)*s*255]},p.ansi256.rgb=function(v){if(v>=232){var b,s=(v-232)*10+8;return[s,s,s]}return[Math.floor((v-=16)/36)/5*255,Math.floor((b=v%36)/6)/5*255,b%6/5*255]},p.rgb.hex=function(v){var b=(((255&Math.round(v[0]))<<16)+((255&Math.round(v[1]))<<8)+(255&Math.round(v[2]))).toString(16).toUpperCase();return"000000".substring(b.length)+b},p.hex.rgb=function(v){var b=v.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!b)return[0,0,0];var s=b[0];b[0].length===3&&(s=s.split("").map(function(w){return w+w}).join(""));var l=parseInt(s,16);return[l>>16&255,l>>8&255,255&l]},p.rgb.hcg=function(v){var b,s=v[0]/255,l=v[1]/255,w=v[2]/255,I=Math.max(Math.max(s,l),w),C=Math.min(Math.min(s,l),w),h=I-C;return b=h<1?C/(1-h):0,[360*((h<=0?0:I===s?(l-w)/h%6:I===l?2+(w-s)/h:4+(s-l)/h+4)/6%1),100*h,100*b]},p.hsl.hcg=function(v){var b=v[1]/100,s=v[2]/100,l=1,w=0;return(l=s<.5?2*b*s:2*b*(1-s))<1&&(w=(s-.5*l)/(1-l)),[v[0],100*l,100*w]},p.hsv.hcg=function(v){var b=v[1]/100,s=v[2]/100,l=b*s,w=0;return l<1&&(w=(s-l)/(1-l)),[v[0],100*l,100*w]},p.hcg.rgb=function(v){var b=v[0]/360,s=v[1]/100,l=v[2]/100;if(s===0)return[255*l,255*l,255*l];var w=[0,0,0],I=b%1*6,C=I%1,h=1-C,c=0;switch(Math.floor(I)){case 0:w[0]=1,w[1]=C,w[2]=0;break;case 1:w[0]=h,w[1]=1,w[2]=0;break;case 2:w[0]=0,w[1]=1,w[2]=C;break;case 3:w[0]=0,w[1]=h,w[2]=1;break;case 4:w[0]=C,w[1]=0,w[2]=1;break;default:w[0]=1,w[1]=0,w[2]=h}return c=(1-s)*l,[(s*w[0]+c)*255,(s*w[1]+c)*255,(s*w[2]+c)*255]},p.hcg.hsv=function(v){var b=v[1]/100,s=b+v[2]/100*(1-b),l=0;return s>0&&(l=b/s),[v[0],100*l,100*s]},p.hcg.hsl=function(v){var b=v[1]/100,s=v[2]/100*(1-b)+.5*b,l=0;return s>0&&s<.5?l=b/(2*s):s>=.5&&s<1&&(l=b/(2*(1-s))),[v[0],100*l,100*s]},p.hcg.hwb=function(v){var b=v[1]/100,s=b+v[2]/100*(1-b);return[v[0],(s-b)*100,(1-s)*100]},p.hwb.hcg=function(v){var b=v[1]/100,s=1-v[2]/100,l=s-b,w=0;return l<1&&(w=(s-l)/(1-l)),[v[0],100*l,100*w]},p.apple.rgb=function(v){return[v[0]/65535*255,v[1]/65535*255,v[2]/65535*255]},p.rgb.apple=function(v){return[v[0]/255*65535,v[1]/255*65535,v[2]/255*65535]},p.gray.rgb=function(v){return[v[0]/100*255,v[0]/100*255,v[0]/100*255]},p.gray.hsl=p.gray.hsv=function(v){return[0,0,v[0]]},p.gray.hwb=function(v){return[0,100,v[0]]},p.gray.cmyk=function(v){return[0,0,0,v[0]]},p.gray.lab=function(v){return[v[0],0,0]},p.gray.hex=function(v){var b=255&Math.round(v[0]/100*255),s=((b<<16)+(b<<8)+b).toString(16).toUpperCase();return"000000".substring(s.length)+s},p.rgb.gray=function(v){return[(v[0]+v[1]+v[2])/3/255*100]}},54790:function(E,A,u){var o=u(28548),S=u(47071),_={};Object.keys(o).forEach(function(p){_[p]={},Object.defineProperty(_[p],"channels",{value:o[p].channels}),Object.defineProperty(_[p],"labels",{value:o[p].labels});var f=S(p);Object.keys(f).forEach(function(y){var d,v,b=f[y];_[p][y]=(d=function(s){if(s==null)return s;arguments.length>1&&(s=Array.prototype.slice.call(arguments));var l=b(s);if(typeof l=="object")for(var w=l.length,I=0;I<w;I++)l[I]=Math.round(l[I]);return l},"conversion"in b&&(d.conversion=b.conversion),d),_[p][y].raw=(v=function(s){return s==null?s:(arguments.length>1&&(s=Array.prototype.slice.call(arguments)),b(s))},"conversion"in b&&(v.conversion=b.conversion),v)})}),E.exports=_},47071:function(E,A,u){var o=u(28548);E.exports=function(S){for(var _=function(b){var s=function(){for(var T={},D=Object.keys(o),O=D.length,N=0;N<O;N++)T[D[N]]={distance:-1,parent:null};return T}(),l=[b];for(s[b].distance=0;l.length;)for(var w=l.pop(),I=Object.keys(o[w]),C=I.length,h=0;h<C;h++){var c=I[h],m=s[c];m.distance===-1&&(m.distance=s[w].distance+1,m.parent=w,l.unshift(c))}return s}(S),p={},f=Object.keys(_),y=f.length,d=0;d<y;d++){var v=f[d];_[v].parent!==null&&(p[v]=function(b,s){for(var l=[s[b].parent,b],w=o[s[b].parent][b],I=s[b].parent;s[I].parent;)l.unshift(s[I].parent),w=function(C,h){return function(c){return h(C(c))}}(o[s[I].parent][I],w),I=s[I].parent;return w.conversion=l,w}(v,_))}return p}},91866:function(E,A,u){let o=u(66011),S={};for(let p of Object.keys(o))S[o[p]]=p;let _={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(let p of(E.exports=_,Object.keys(_))){if(!("channels"in _[p]))throw Error("missing channels property: "+p);if(!("labels"in _[p]))throw Error("missing channel labels property: "+p);if(_[p].labels.length!==_[p].channels)throw Error("channel and label counts mismatch: "+p);let{channels:f,labels:y}=_[p];delete _[p].channels,delete _[p].labels,Object.defineProperty(_[p],"channels",{value:f}),Object.defineProperty(_[p],"labels",{value:y})}_.rgb.hsl=function(p){let f,y=p[0]/255,d=p[1]/255,v=p[2]/255,b=Math.min(y,d,v),s=Math.max(y,d,v),l=s-b;s===b?f=0:y===s?f=(d-v)/l:d===s?f=2+(v-y)/l:v===s&&(f=4+(y-d)/l),(f=Math.min(60*f,360))<0&&(f+=360);let w=(b+s)/2;return[f,100*(s===b?0:w<=.5?l/(s+b):l/(2-s-b)),100*w]},_.rgb.hsv=function(p){let f,y,d,v,b,s=p[0]/255,l=p[1]/255,w=p[2]/255,I=Math.max(s,l,w),C=I-Math.min(s,l,w),h=function(c){return(I-c)/6/C+.5};return C===0?(v=0,b=0):(b=C/I,f=h(s),y=h(l),d=h(w),s===I?v=d-y:l===I?v=.3333333333333333+f-d:w===I&&(v=.6666666666666666+y-f),v<0?v+=1:v>1&&(v-=1)),[360*v,100*b,100*I]},_.rgb.hwb=function(p){let f=p[0],y=p[1],d=p[2];return[_.rgb.hsl(p)[0],.00392156862745098*Math.min(f,Math.min(y,d))*100,100*(d=1-.00392156862745098*Math.max(f,Math.max(y,d)))]},_.rgb.cmyk=function(p){let f=p[0]/255,y=p[1]/255,d=p[2]/255,v=Math.min(1-f,1-y,1-d);return[100*((1-f-v)/(1-v)||0),100*((1-y-v)/(1-v)||0),100*((1-d-v)/(1-v)||0),100*v]},_.rgb.keyword=function(p){let f,y=S[p];if(y)return y;let d=1/0;for(let v of Object.keys(o)){let b=o[v],s=(p[0]-b[0])**2+(p[1]-b[1])**2+(p[2]-b[2])**2;s<d&&(d=s,f=v)}return f},_.keyword.rgb=function(p){return o[p]},_.rgb.xyz=function(p){let f=p[0]/255,y=p[1]/255,d=p[2]/255;return[100*(.4124*(f=f>.04045?((f+.055)/1.055)**2.4:f/12.92)+.3576*(y=y>.04045?((y+.055)/1.055)**2.4:y/12.92)+.1805*(d=d>.04045?((d+.055)/1.055)**2.4:d/12.92)),100*(.2126*f+.7152*y+.0722*d),100*(.0193*f+.1192*y+.9505*d)]},_.rgb.lab=function(p){let f=_.rgb.xyz(p),y=f[0],d=f[1],v=f[2];return y/=95.047,d/=100,v/=108.883,[116*(d=d>.008856?d**.3333333333333333:7.787*d+.13793103448275862)-16,500*((y=y>.008856?y**.3333333333333333:7.787*y+.13793103448275862)-d),200*(d-(v=v>.008856?v**.3333333333333333:7.787*v+.13793103448275862))]},_.hsl.rgb=function(p){let f,y,d,v=p[0]/360,b=p[1]/100,s=p[2]/100;if(b===0)return[d=255*s,d,d];f=s<.5?s*(1+b):s+b-s*b;let l=2*s-f,w=[0,0,0];for(let I=0;I<3;I++)(y=v+-(.3333333333333333*(I-1)))<0&&y++,y>1&&y--,d=6*y<1?l+(f-l)*6*y:2*y<1?f:3*y<2?l+(f-l)*(.6666666666666666-y)*6:l,w[I]=255*d;return w},_.hsl.hsv=function(p){let f=p[0],y=p[1]/100,d=p[2]/100,v=y,b=Math.max(d,.01);d*=2,y*=d<=1?d:2-d,v*=b<=1?b:2-b;let s=(d+y)/2;return[f,100*(d===0?2*v/(b+v):2*y/(d+y)),100*s]},_.hsv.rgb=function(p){let f=p[0]/60,y=p[1]/100,d=p[2]/100,v=Math.floor(f)%6,b=f-Math.floor(f),s=255*d*(1-y),l=255*d*(1-y*b),w=255*d*(1-y*(1-b));switch(d*=255,v){case 0:return[d,w,s];case 1:return[l,d,s];case 2:return[s,d,w];case 3:return[s,l,d];case 4:return[w,s,d];case 5:return[d,s,l]}},_.hsv.hsl=function(p){let f,y=p[0],d=p[1]/100,v=p[2]/100,b=Math.max(v,.01);f=(2-d)*v;let s=(2-d)*b;return[y,100*(d*b/(s<=1?s:2-s)||0),100*(f/=2)]},_.hwb.rgb=function(p){let f,y,d,v,b=p[0]/360,s=p[1]/100,l=p[2]/100,w=s+l;w>1&&(s/=w,l/=w);let I=Math.floor(6*b),C=1-l;f=6*b-I,(1&I)!=0&&(f=1-f);let h=s+f*(C-s);switch(I){default:case 6:case 0:y=C,d=h,v=s;break;case 1:y=h,d=C,v=s;break;case 2:y=s,d=C,v=h;break;case 3:y=s,d=h,v=C;break;case 4:y=h,d=s,v=C;break;case 5:y=C,d=s,v=h}return[255*y,255*d,255*v]},_.cmyk.rgb=function(p){let f=p[0]/100,y=p[1]/100,d=p[2]/100,v=p[3]/100;return[255*(1-Math.min(1,f*(1-v)+v)),255*(1-Math.min(1,y*(1-v)+v)),255*(1-Math.min(1,d*(1-v)+v))]},_.xyz.rgb=function(p){let f,y,d,v=p[0]/100,b=p[1]/100,s=p[2]/100;return f=(f=3.2406*v+-1.5372*b+-.4986*s)>.0031308?1.055*f**.4166666666666667-.055:12.92*f,y=(y=-.9689*v+1.8758*b+.0415*s)>.0031308?1.055*y**.4166666666666667-.055:12.92*y,d=(d=.0557*v+-.204*b+1.057*s)>.0031308?1.055*d**.4166666666666667-.055:12.92*d,[255*(f=Math.min(Math.max(0,f),1)),255*(y=Math.min(Math.max(0,y),1)),255*(d=Math.min(Math.max(0,d),1))]},_.xyz.lab=function(p){let f=p[0],y=p[1],d=p[2];return f/=95.047,y/=100,d/=108.883,[116*(y=y>.008856?y**.3333333333333333:7.787*y+.13793103448275862)-16,500*((f=f>.008856?f**.3333333333333333:7.787*f+.13793103448275862)-y),200*(y-(d=d>.008856?d**.3333333333333333:7.787*d+.13793103448275862))]},_.lab.xyz=function(p){let f,y,d,v=p[0],b=p[1],s=p[2];f=b/500+(y=(v+16)/116),d=y-s/200;let l=y**3,w=f**3,I=d**3;return y=(l>.008856?l:(y-.13793103448275862)/7.787)*100,[f=(w>.008856?w:(f-.13793103448275862)/7.787)*95.047,y,d=(I>.008856?I:(d-.13793103448275862)/7.787)*108.883]},_.lab.lch=function(p){let f,y=p[0],d=p[1],v=p[2];return(f=360*Math.atan2(v,d)/2/Math.PI)<0&&(f+=360),[y,Math.sqrt(d*d+v*v),f]},_.lch.lab=function(p){let f=p[0],y=p[1],d=p[2]/360*2*Math.PI;return[f,y*Math.cos(d),y*Math.sin(d)]},_.rgb.ansi16=function(p,f=null){let[y,d,v]=p,b=f===null?_.rgb.hsv(p)[2]:f;if((b=Math.round(b/50))===0)return 30;let s=30+(Math.round(v/255)<<2|Math.round(d/255)<<1|Math.round(y/255));return b===2&&(s+=60),s},_.hsv.ansi16=function(p){return _.rgb.ansi16(_.hsv.rgb(p),p[2])},_.rgb.ansi256=function(p){let f=p[0],y=p[1],d=p[2];return f===y&&y===d?f<8?16:f>248?231:Math.round((f-8)/247*24)+232:16+36*Math.round(f/255*5)+6*Math.round(y/255*5)+Math.round(d/255*5)},_.ansi16.rgb=function(p){let f=p%10;if(f===0||f===7)return p>50&&(f+=3.5),[f=f/10.5*255,f,f];let y=(~~(p>50)+1)*.5;return[(1&f)*y*255,(f>>1&1)*y*255,(f>>2&1)*y*255]},_.ansi256.rgb=function(p){let f;if(p>=232){let y=(p-232)*10+8;return[y,y,y]}return[Math.floor((p-=16)/36)/5*255,Math.floor((f=p%36)/6)/5*255,f%6/5*255]},_.rgb.hex=function(p){let f=(((255&Math.round(p[0]))<<16)+((255&Math.round(p[1]))<<8)+(255&Math.round(p[2]))).toString(16).toUpperCase();return"000000".substring(f.length)+f},_.hex.rgb=function(p){let f=p.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!f)return[0,0,0];let y=f[0];f[0].length===3&&(y=y.split("").map(v=>v+v).join(""));let d=parseInt(y,16);return[d>>16&255,d>>8&255,255&d]},_.rgb.hcg=function(p){let f,y=p[0]/255,d=p[1]/255,v=p[2]/255,b=Math.max(Math.max(y,d),v),s=Math.min(Math.min(y,d),v),l=b-s;return f=l<1?s/(1-l):0,[360*((l<=0?0:b===y?(d-v)/l%6:b===d?2+(v-y)/l:4+(y-d)/l)/6%1),100*l,100*f]},_.hsl.hcg=function(p){let f=p[1]/100,y=p[2]/100,d=y<.5?2*f*y:2*f*(1-y),v=0;return d<1&&(v=(y-.5*d)/(1-d)),[p[0],100*d,100*v]},_.hsv.hcg=function(p){let f=p[1]/100,y=p[2]/100,d=f*y,v=0;return d<1&&(v=(y-d)/(1-d)),[p[0],100*d,100*v]},_.hcg.rgb=function(p){let f=p[0]/360,y=p[1]/100,d=p[2]/100;if(y===0)return[255*d,255*d,255*d];let v=[0,0,0],b=f%1*6,s=b%1,l=1-s,w=0;switch(Math.floor(b)){case 0:v[0]=1,v[1]=s,v[2]=0;break;case 1:v[0]=l,v[1]=1,v[2]=0;break;case 2:v[0]=0,v[1]=1,v[2]=s;break;case 3:v[0]=0,v[1]=l,v[2]=1;break;case 4:v[0]=s,v[1]=0,v[2]=1;break;default:v[0]=1,v[1]=0,v[2]=l}return w=(1-y)*d,[(y*v[0]+w)*255,(y*v[1]+w)*255,(y*v[2]+w)*255]},_.hcg.hsv=function(p){let f=p[1]/100,y=f+p[2]/100*(1-f),d=0;return y>0&&(d=f/y),[p[0],100*d,100*y]},_.hcg.hsl=function(p){let f=p[1]/100,y=p[2]/100*(1-f)+.5*f,d=0;return y>0&&y<.5?d=f/(2*y):y>=.5&&y<1&&(d=f/(2*(1-y))),[p[0],100*d,100*y]},_.hcg.hwb=function(p){let f=p[1]/100,y=f+p[2]/100*(1-f);return[p[0],(y-f)*100,(1-y)*100]},_.hwb.hcg=function(p){let f=p[1]/100,y=1-p[2]/100,d=y-f,v=0;return d<1&&(v=(y-d)/(1-d)),[p[0],100*d,100*v]},_.apple.rgb=function(p){return[p[0]/65535*255,p[1]/65535*255,p[2]/65535*255]},_.rgb.apple=function(p){return[p[0]/255*65535,p[1]/255*65535,p[2]/255*65535]},_.gray.rgb=function(p){return[p[0]/100*255,p[0]/100*255,p[0]/100*255]},_.gray.hsl=function(p){return[0,0,p[0]]},_.gray.hsv=_.gray.hsl,_.gray.hwb=function(p){return[0,100,p[0]]},_.gray.cmyk=function(p){return[0,0,0,p[0]]},_.gray.lab=function(p){return[p[0],0,0]},_.gray.hex=function(p){let f=255&Math.round(p[0]/100*255),y=((f<<16)+(f<<8)+f).toString(16).toUpperCase();return"000000".substring(y.length)+y},_.rgb.gray=function(p){return[(p[0]+p[1]+p[2])/3/255*100]}},94167:function(E,A,u){let o=u(91866),S=u(29054),_={};Object.keys(o).forEach(p=>{_[p]={},Object.defineProperty(_[p],"channels",{value:o[p].channels}),Object.defineProperty(_[p],"labels",{value:o[p].labels});let f=S(p);Object.keys(f).forEach(y=>{let d=f[y];_[p][y]=function(v){let b=function(...s){let l=s[0];if(l==null)return l;l.length>1&&(s=l);let w=v(s);if(typeof w=="object")for(let I=w.length,C=0;C<I;C++)w[C]=Math.round(w[C]);return w};return"conversion"in v&&(b.conversion=v.conversion),b}(d),_[p][y].raw=function(v){let b=function(...s){let l=s[0];return l==null?l:(l.length>1&&(s=l),v(s))};return"conversion"in v&&(b.conversion=v.conversion),b}(d)})}),E.exports=_},29054:function(E,A,u){let o=u(91866);E.exports=function(S){let _=function(y){let d=function(){let b={},s=Object.keys(o);for(let l=s.length,w=0;w<l;w++)b[s[w]]={distance:-1,parent:null};return b}(),v=[y];for(d[y].distance=0;v.length;){let b=v.pop(),s=Object.keys(o[b]);for(let l=s.length,w=0;w<l;w++){let I=s[w],C=d[I];C.distance===-1&&(C.distance=d[b].distance+1,C.parent=b,v.unshift(I))}}return d}(S),p={},f=Object.keys(_);for(let y=f.length,d=0;d<y;d++){let v=f[d];_[v].parent!==null&&(p[v]=function(b,s){let l=[s[b].parent,b],w=o[s[b].parent][b],I=s[b].parent;for(;s[I].parent;)l.unshift(s[I].parent),w=function(C,h){return function(c){return h(C(c))}}(o[s[I].parent][I],w),I=s[I].parent;return w.conversion=l,w}(v,_))}return p}},98129:function(E){E.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},66011:function(E){E.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},63711:function(E,A,u){var o=u(66011),S=u(6890),_=Object.hasOwnProperty,p=Object.create(null);for(var f in o)_.call(o,f)&&(p[o[f]]=f);var y=E.exports={to:{},get:{}};function d(b,s,l){return Math.min(Math.max(s,b),l)}function v(b){var s=Math.round(b).toString(16).toUpperCase();return s.length<2?"0"+s:s}y.get=function(b){var s,l;switch(b.substring(0,3).toLowerCase()){case"hsl":s=y.get.hsl(b),l="hsl";break;case"hwb":s=y.get.hwb(b),l="hwb";break;default:s=y.get.rgb(b),l="rgb"}return s?{model:l,value:s}:null},y.get.rgb=function(b){if(!b)return null;var s,l,w,I=[0,0,0,1];if(s=b.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(l=0,w=s[2],s=s[1];l<3;l++){var C=2*l;I[l]=parseInt(s.slice(C,C+2),16)}w&&(I[3]=parseInt(w,16)/255)}else if(s=b.match(/^#([a-f0-9]{3,4})$/i)){for(l=0,w=(s=s[1])[3];l<3;l++)I[l]=parseInt(s[l]+s[l],16);w&&(I[3]=parseInt(w+w,16)/255)}else if(s=b.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(l=0;l<3;l++)I[l]=parseInt(s[l+1],0);s[4]&&(s[5]?I[3]=.01*parseFloat(s[4]):I[3]=parseFloat(s[4]))}else if(s=b.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(l=0;l<3;l++)I[l]=Math.round(2.55*parseFloat(s[l+1]));s[4]&&(s[5]?I[3]=.01*parseFloat(s[4]):I[3]=parseFloat(s[4]))}else return(s=b.match(/^(\w+)$/))?s[1]==="transparent"?[0,0,0,0]:_.call(o,s[1])?((I=o[s[1]])[3]=1,I):null:null;for(l=0;l<3;l++)I[l]=d(I[l],0,255);return I[3]=d(I[3],0,1),I},y.get.hsl=function(b){if(!b)return null;var s=b.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(s){var l=parseFloat(s[4]);return[(parseFloat(s[1])%360+360)%360,d(parseFloat(s[2]),0,100),d(parseFloat(s[3]),0,100),d(isNaN(l)?1:l,0,1)]}return null},y.get.hwb=function(b){if(!b)return null;var s=b.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(s){var l=parseFloat(s[4]);return[(parseFloat(s[1])%360+360)%360,d(parseFloat(s[2]),0,100),d(parseFloat(s[3]),0,100),d(isNaN(l)?1:l,0,1)]}return null},y.to.hex=function(){var b=S(arguments);return"#"+v(b[0])+v(b[1])+v(b[2])+(b[3]<1?v(Math.round(255*b[3])):"")},y.to.rgb=function(){var b=S(arguments);return b.length<4||b[3]===1?"rgb("+Math.round(b[0])+", "+Math.round(b[1])+", "+Math.round(b[2])+")":"rgba("+Math.round(b[0])+", "+Math.round(b[1])+", "+Math.round(b[2])+", "+b[3]+")"},y.to.rgb.percent=function(){var b=S(arguments),s=Math.round(b[0]/255*100),l=Math.round(b[1]/255*100),w=Math.round(b[2]/255*100);return b.length<4||b[3]===1?"rgb("+s+"%, "+l+"%, "+w+"%)":"rgba("+s+"%, "+l+"%, "+w+"%, "+b[3]+")"},y.to.hsl=function(){var b=S(arguments);return b.length<4||b[3]===1?"hsl("+b[0]+", "+b[1]+"%, "+b[2]+"%)":"hsla("+b[0]+", "+b[1]+"%, "+b[2]+"%, "+b[3]+")"},y.to.hwb=function(){var b=S(arguments),s="";return b.length>=4&&b[3]!==1&&(s=", "+b[3]),"hwb("+b[0]+", "+b[1]+"%, "+b[2]+"%"+s+")"},y.to.keyword=function(b){return p[b.slice(0,3)]}},52250:function(E,A,u){var o=u(63711),S=u(54790),_=[].slice,p=["keyword","gray","hex"],f={};Object.keys(S).forEach(function(l){f[_.call(S[l].labels).sort().join("")]=l});var y={};function d(l,w){if(!(this instanceof d))return new d(l,w);if(w&&w in p&&(w=null),w&&!(w in S))throw Error("Unknown model: "+w);if(l==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(l instanceof d)this.model=l.model,this.color=l.color.slice(),this.valpha=l.valpha;else if(typeof l=="string"){var I,C,h=o.get(l);if(h===null)throw Error("Unable to parse color from string: "+l);this.model=h.model,C=S[this.model].channels,this.color=h.value.slice(0,C),this.valpha=typeof h.value[C]=="number"?h.value[C]:1}else if(l.length){this.model=w||"rgb",C=S[this.model].channels;var c=_.call(l,0,C);this.color=s(c,C),this.valpha=typeof l[C]=="number"?l[C]:1}else if(typeof l=="number")l&=16777215,this.model="rgb",this.color=[l>>16&255,l>>8&255,255&l],this.valpha=1;else{this.valpha=1;var m=Object.keys(l);"alpha"in l&&(m.splice(m.indexOf("alpha"),1),this.valpha=typeof l.alpha=="number"?l.alpha:0);var T=m.sort().join("");if(!(T in f))throw Error("Unable to parse color from object: "+JSON.stringify(l));this.model=f[T];var D=S[this.model].labels,O=[];for(I=0;I<D.length;I++)O.push(l[D[I]]);this.color=s(O)}if(y[this.model])for(I=0,C=S[this.model].channels;I<C;I++){var N=y[this.model][I];N&&(this.color[I]=N(this.color[I]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}function v(l,w,I){return(l=Array.isArray(l)?l:[l]).forEach(function(C){(y[C]||(y[C]=[]))[w]=I}),l=l[0],function(C){var h;return arguments.length?(I&&(C=I(C)),(h=this[l]()).color[w]=C):(h=this[l]().color[w],I&&(h=I(h))),h}}function b(l){return function(w){return Math.max(0,Math.min(l,w))}}function s(l,w){for(var I=0;I<w;I++)typeof l[I]!="number"&&(l[I]=0);return l}d.prototype={toString:function(){return this.string()},toJSON:function(){return this[this.model]()},string:function(l){var w=this.model in o.to?this:this.rgb(),I=(w=w.round(typeof l=="number"?l:1)).valpha===1?w.color:w.color.concat(this.valpha);return o.to[w.model](I)},percentString:function(l){var w=this.rgb().round(typeof l=="number"?l:1),I=w.valpha===1?w.color:w.color.concat(this.valpha);return o.to.rgb.percent(I)},array:function(){return this.valpha===1?this.color.slice():this.color.concat(this.valpha)},object:function(){for(var l={},w=S[this.model].channels,I=S[this.model].labels,C=0;C<w;C++)l[I[C]]=this.color[C];return this.valpha!==1&&(l.alpha=this.valpha),l},unitArray:function(){var l=this.rgb().color;return l[0]/=255,l[1]/=255,l[2]/=255,this.valpha!==1&&l.push(this.valpha),l},unitObject:function(){var l=this.rgb().object();return l.r/=255,l.g/=255,l.b/=255,this.valpha!==1&&(l.alpha=this.valpha),l},round:function(l){var w;return l=Math.max(l||0,0),new d(this.color.map((w=l,function(I){return Number(I.toFixed(w))})).concat(this.valpha),this.model)},alpha:function(l){return arguments.length?new d(this.color.concat(Math.max(0,Math.min(1,l))),this.model):this.valpha},red:v("rgb",0,b(255)),green:v("rgb",1,b(255)),blue:v("rgb",2,b(255)),hue:v(["hsl","hsv","hsl","hwb","hcg"],0,function(l){return(l%360+360)%360}),saturationl:v("hsl",1,b(100)),lightness:v("hsl",2,b(100)),saturationv:v("hsv",1,b(100)),value:v("hsv",2,b(100)),chroma:v("hcg",1,b(100)),gray:v("hcg",2,b(100)),white:v("hwb",1,b(100)),wblack:v("hwb",2,b(100)),cyan:v("cmyk",0,b(100)),magenta:v("cmyk",1,b(100)),yellow:v("cmyk",2,b(100)),black:v("cmyk",3,b(100)),x:v("xyz",0,b(100)),y:v("xyz",1,b(100)),z:v("xyz",2,b(100)),l:v("lab",0,b(100)),a:v("lab",1),b:v("lab",2),keyword:function(l){return arguments.length?new d(l):S[this.model].keyword(this.color)},hex:function(l){return arguments.length?new d(l):o.to.hex(this.rgb().round().color)},rgbNumber:function(){var l=this.rgb().color;return(255&l[0])<<16|(255&l[1])<<8|255&l[2]},luminosity:function(){for(var l=this.rgb().color,w=[],I=0;I<l.length;I++){var C=l[I]/255;w[I]=C<=.03928?C/12.92:Math.pow((C+.055)/1.055,2.4)}return .2126*w[0]+.7152*w[1]+.0722*w[2]},contrast:function(l){var w=this.luminosity(),I=l.luminosity();return w>I?(w+.05)/(I+.05):(I+.05)/(w+.05)},level:function(l){var w=this.contrast(l);return w>=7.1?"AAA":w>=4.5?"AA":""},isDark:function(){var l=this.rgb().color;return(299*l[0]+587*l[1]+114*l[2])/1e3<128},isLight:function(){return!this.isDark()},negate:function(){for(var l=this.rgb(),w=0;w<3;w++)l.color[w]=255-l.color[w];return l},lighten:function(l){var w=this.hsl();return w.color[2]+=w.color[2]*l,w},darken:function(l){var w=this.hsl();return w.color[2]-=w.color[2]*l,w},saturate:function(l){var w=this.hsl();return w.color[1]+=w.color[1]*l,w},desaturate:function(l){var w=this.hsl();return w.color[1]-=w.color[1]*l,w},whiten:function(l){var w=this.hwb();return w.color[1]+=w.color[1]*l,w},blacken:function(l){var w=this.hwb();return w.color[2]+=w.color[2]*l,w},grayscale:function(){var l=this.rgb().color,w=.3*l[0]+.59*l[1]+.11*l[2];return d.rgb(w,w,w)},fade:function(l){return this.alpha(this.valpha-this.valpha*l)},opaquer:function(l){return this.alpha(this.valpha+this.valpha*l)},rotate:function(l){var w=this.hsl(),I=w.color[0];return I=(I=(I+l)%360)<0?360+I:I,w.color[0]=I,w},mix:function(l,w){if(!l||!l.rgb)throw Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof l);var I=l.rgb(),C=this.rgb(),h=w===void 0?.5:w,c=2*h-1,m=I.alpha()-C.alpha(),T=((c*m==-1?c:(c+m)/(1+c*m))+1)/2,D=1-T;return d.rgb(T*I.red()+D*C.red(),T*I.green()+D*C.green(),T*I.blue()+D*C.blue(),I.alpha()*h+C.alpha()*(1-h))}},Object.keys(S).forEach(function(l){if(p.indexOf(l)===-1){var w=S[l].channels;d.prototype[l]=function(){if(this.model===l)return new d(this);if(arguments.length)return new d(arguments,l);var I,C=typeof arguments[w]=="number"?w:this.valpha;return new d((Array.isArray(I=S[this.model][l].raw(this.color))?I:[I]).concat(C),l)},d[l]=function(I){return typeof I=="number"&&(I=s(_.call(arguments),w)),new d(I,l)}}}),E.exports=d},13546:function(E,A,u){var o=u(87930);(function(){for(var _ in o){if(o==null||!o.hasOwnProperty(_)||_==="default"||_==="__esModule")return;A[_]=o[_]}})();var S=u(20297);(function(){for(var _ in S){if(S==null||!S.hasOwnProperty(_)||_==="default"||_==="__esModule")return;A[_]=S[_]}})(),u(22253),u(5921),u(31474),u(25997),u(37679),u(99264),u(78645),u(80942),u(64219),u(62147),u(59060),u(53514),u(91066),u(55666),u(43732),u(69963),u(97215),u(12810),u(67881),u(13875),u(4380),u(76954),u(35979),u(92576),u(93754),u(28838),u(14723),u(81819),u(30196),u(50682),u(52420),u(11818),u(17447),u(72017),u(67215),u(41473),u(96307),u(20361),u(36570),u(84290),u(56910),u(21836),u(50837),u(38801)},17234:function(E,A,u){var o=u(23405),S={};function _(){this._coordinateSystems=[]}_.prototype={constructor:_,create:function(p,f){var y=[];o.each(S,function(d,v){var b=d.create(p,f);y=y.concat(b||[])}),this._coordinateSystems=y},update:function(p,f){o.each(this._coordinateSystems,function(y){y.update&&y.update(p,f)})},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},_.register=function(p,f){S[p]=f},_.get=function(p){return S[p]},E.exports=_},60089:function(E,A,u){var o=u(23405),S=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"];E.exports=function(_){o.each(S,function(p){this[p]=o.bind(_[p],_)},this)}},60461:function(E,A,u){var o=u(87930),S=u(23405);E.exports=function(_,p){S.each(p,function(f){f.update="updateView",o.registerAction(f,function(y,d){var v={};return d.eachComponent({mainType:"series",subType:_,query:y},function(b){b[f.method]&&b[f.method](y.name,y.dataIndex);var s=b.getData();s.each(function(l){var w=s.getName(l);v[w]=b.isSelected(w)||!1})}),{name:y.name,selected:v}})})}},65981:function(E,A,u){var o=u(87930),S=u(23405),_=u(7207).updateCenterAndZoom;o.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(p,f){var y=p.componentType||"series";f.eachComponent({mainType:y,query:p},function(d){var v=d.coordinateSystem;if(v.type==="geo"){var b=_(v,p,d.get("scaleLimit"));d.setCenter&&d.setCenter(b.center),d.setZoom&&d.setZoom(b.zoom),y==="series"&&S.each(d.seriesGroup,function(s){s.setCenter(b.center),s.setZoom(b.zoom)})}})})},7207:function(E,A){A.updateCenterAndZoom=function(u,o,S){var _=u.getZoom(),p=u.getCenter(),f=o.zoom,y=u.dataToPoint(p);if(o.dx!=null&&o.dy!=null){y[0]-=o.dx,y[1]-=o.dy;var p=u.pointToData(y);u.setCenter(p)}if(f!=null){if(S){var d=S.min||0;f=Math.max(Math.min(_*f,S.max||1/0),d)/_}u.scale[0]*=f,u.scale[1]*=f;var v=u.position,b=(o.originX-v[0])*(f-1),s=(o.originY-v[1])*(f-1);v[0]-=b,v[1]-=s,u.updateTransform();var p=u.pointToData(y);u.setCenter(p),u.setZoom(f*_)}return{center:u.getCenter(),zoom:u.getZoom()}}},31474:function(E,A,u){var o=u(87930),S=u(23405),_=u(76918),p=_.layout,f=_.largeLayout;u(72768),u(3704),u(72627),u(97035),o.registerLayout(S.curry(p,"bar")),o.registerLayout(f),o.registerVisual({seriesType:"bar",reset:function(y){y.getData().setVisual("legendSymbol","roundRect")}})},3704:function(E,A,u){E.exports=u(95512).extend({type:"series.bar",dependencies:["grid","polar"],brushSelector:"rect",getProgressive:function(){return!!this.get("large")&&this.get("progressive")},getProgressiveThreshold:function(){var o=this.get("progressiveThreshold"),S=this.get("largeThreshold");return S>o&&(o=S),o}})},72627:function(E,A,u){u(9129).__DEV__;var o=u(87930),S=u(23405),_=u(51747),p=u(31535).setLabel,f=u(46082),y=u(36096),d=u(74582),v=["itemStyle","barBorderWidth"];S.extend(f.prototype,y);var b=o.extendChartView({type:"bar",render:function(m,T,D){this._updateDrawMode(m);var O=m.get("coordinateSystem");return(O==="cartesian2d"||O==="polar")&&(this._isLargeDraw?this._renderLarge(m,T,D):this._renderNormal(m,T,D)),this.group},incrementalPrepareRender:function(m,T,D){this._clear(),this._updateDrawMode(m)},incrementalRender:function(m,T,D,O){this._incrementalRenderLarge(m,T)},_updateDrawMode:function(m){var T=m.pipelineContext.large;(this._isLargeDraw==null||T^this._isLargeDraw)&&(this._isLargeDraw=T,this._clear())},_renderNormal:function(m,T,D){var O,N=this.group,z=m.getData(),H=this._data,$=m.coordinateSystem,V=$.getBaseAxis();$.type==="cartesian2d"?O=V.isHorizontal():$.type==="polar"&&(O=V.dim==="angle");var P=m.isAnimationEnabled()?m:null;z.diff(H).add(function(U){if(z.hasValue(U)){var Y=z.getItemModel(U),Z=I[$.type](z,U,Y),X=s[$.type](z,U,Y,Z,O,P);z.setItemGraphicEl(U,X),N.add(X),C(X,z,U,Y,Z,m,O,$.type==="polar")}}).update(function(U,Y){var Z=H.getItemGraphicEl(Y);if(!z.hasValue(U))return void N.remove(Z);var X=z.getItemModel(U),J=I[$.type](z,U,X);Z?_.updateProps(Z,{shape:J},P,U):Z=s[$.type](z,U,X,J,O,P,!0),z.setItemGraphicEl(U,Z),N.add(Z),C(Z,z,U,X,J,m,O,$.type==="polar")}).remove(function(U){var Y=H.getItemGraphicEl(U);$.type==="cartesian2d"?Y&&l(U,P,Y):Y&&w(U,P,Y)}).execute(),this._data=z},_renderLarge:function(m,T,D){this._clear(),c(m,this.group)},_incrementalRenderLarge:function(m,T){c(T,this.group,!0)},dispose:S.noop,remove:function(m){this._clear(m)},_clear:function(m){var T=this.group,D=this._data;m&&m.get("animation")&&D&&!this._isLargeDraw?D.eachItemGraphicEl(function(O){O.type==="sector"?w(O.dataIndex,m,O):l(O.dataIndex,m,O)}):T.removeAll(),this._data=null}}),s={cartesian2d:function(m,T,D,O,N,z,H){var $=new _.Rect({shape:S.extend({},O)});if(z){var V=$.shape,P=N?"height":"width",U={};V[P]=0,U[P]=O[P],_[H?"updateProps":"initProps"]($,{shape:U},z,T)}return $},polar:function(m,T,D,O,N,z,H){var $=O.startAngle<O.endAngle,V=new _.Sector({shape:S.defaults({clockwise:$},O)});if(z){var P=V.shape,U=N?"r":"endAngle",Y={};P[U]=N?0:O.startAngle,Y[U]=O[U],_[H?"updateProps":"initProps"](V,{shape:Y},z,T)}return V}};function l(m,T,D){D.style.text=null,_.updateProps(D,{shape:{width:0}},T,m,function(){D.parent&&D.parent.remove(D)})}function w(m,T,D){D.style.text=null,_.updateProps(D,{shape:{r:D.shape.r0}},T,m,function(){D.parent&&D.parent.remove(D)})}var I={cartesian2d:function(m,T,D){var O,N,z=m.getItemLayout(T),H=(O=D,N=z,Math.min(O.get(v)||0,Math.abs(N.width),Math.abs(N.height))),$=z.width>0?1:-1,V=z.height>0?1:-1;return{x:z.x+$*H/2,y:z.y+V*H/2,width:z.width-$*H,height:z.height-V*H}},polar:function(m,T,D){var O=m.getItemLayout(T);return{cx:O.cx,cy:O.cy,r0:O.r0,r:O.r,startAngle:O.startAngle,endAngle:O.endAngle}}};function C(m,T,D,O,N,z,H,$){var V=T.getItemVisual(D,"color"),P=T.getItemVisual(D,"opacity"),U=O.getModel("itemStyle"),Y=O.getModel("emphasis.itemStyle").getBarItemStyle();$||m.setShape("r",U.get("barBorderRadius")||0),m.useStyle(S.defaults({fill:V,opacity:P},U.getBarItemStyle()));var Z=O.getShallow("cursor");Z&&m.attr("cursor",Z);var X=H?N.height>0?"bottom":"top":N.width>0?"left":"right";$||p(m.style,Y,O,V,z,D,X),_.setHoverStyle(m,Y)}var h=d.extend({type:"largeBar",shape:{points:[]},buildPath:function(m,T){for(var D=T.points,O=this.__startPoint,N=this.__valueIdx,z=0;z<D.length;z+=2)O[this.__valueIdx]=D[z+N],m.moveTo(O[0],O[1]),m.lineTo(D[z],D[z+1])}});function c(m,T,D){var O,N,z,H,$,V=m.getData(),P=[],U=+!!V.getLayout("valueAxisHorizontal");P[1-U]=V.getLayout("valueAxisStart");var Y=new h({shape:{points:V.getLayout("largePoints")},incremental:!!D,__startPoint:P,__valueIdx:U});T.add(Y),O=Y,N=m,H=(z=V).getVisual("borderColor")||z.getVisual("color"),$=N.getModel("itemStyle").getItemStyle(["color","borderColor"]),O.useStyle($),O.style.fill=null,O.style.stroke=H,O.style.lineWidth=z.getLayout("barWidth")}E.exports=b},95512:function(E,A,u){var o=u(95166),S=u(74107);E.exports=o.extend({type:"series.__base_bar__",getInitialData:function(_,p){return S(this.getSource(),this)},getMarkerPosition:function(_){var p=this.coordinateSystem;if(p){var f=p.dataToPoint(p.clampData(_)),y=this.getData(),d=y.getLayout("offset"),v=y.getLayout("size"),b=+!p.getBaseAxis().isHorizontal();return f[b]+=d+v/2,f}return[NaN,NaN]},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",itemStyle:{},emphasis:{}}})},73202:function(E,A,u){var o=u(95512).extend({type:"series.pictorialBar",dependencies:["grid"],defaultOption:{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,hoverAnimation:!1},getInitialData:function(S){return S.stack=null,o.superApply(this,"getInitialData",arguments)}});E.exports=o},16044:function(E,A,u){var o=u(87930),S=u(23405),_=u(51747),p=u(30696).createSymbol,f=u(54684),y=f.parsePercent,d=f.isNumeric,v=u(31535).setLabel,b=["itemStyle","borderWidth"],s=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],l=new _.Circle;function w(X,J,q,te){var re,ie,ne,le,fe,we,pe,ve,be,Ee,Re,Ne,Le,Se,Ie,_e,Ae,ue,ke,Pe,Ve=X.getItemLayout(J),je=q.get("symbolRepeat"),it=q.get("symbolClip"),rt=q.get("symbolPosition")||"start",mt=(q.get("symbolRotate")||0)*Math.PI/180||0,yt=q.get("symbolPatternSize")||2,st=q.isAnimationEnabled(),Qe={dataIndex:J,layout:Ve,itemModel:q,symbolType:X.getItemVisual(J,"symbol")||"circle",color:X.getItemVisual(J,"color"),symbolClip:it,symbolRepeat:je,symbolRepeatDirection:q.get("symbolRepeatDirection"),symbolPatternSize:yt,rotation:mt,animationModel:st?q:null,hoverAnimation:st&&q.get("hoverAnimation"),z2:q.getShallow("z",!0)||0};(function(cn,Sn,Vn,bn,En){var pn,Un=bn.valueDim,Pn=cn.get("symbolBoundingData"),On=bn.coordSys.getOtherAxis(bn.coordSys.getBaseAxis()),Ht=On.toGlobalCoord(On.dataToCoord(0)),Mt=1-+(Vn[Un.wh]<=0);if(S.isArray(Pn)){var Gt=[I(On,Pn[0])-Ht,I(On,Pn[1])-Ht];Gt[1]<Gt[0]&&Gt.reverse(),pn=Gt[Mt]}else pn=Pn!=null?I(On,Pn)-Ht:Sn?bn.coordSysExtent[Un.index][Mt]-Ht:Vn[Un.wh];En.boundingLength=pn,Sn&&(En.repeatCutLength=Vn[Un.wh]),En.pxSign=pn>0?1:pn<0?-1:0})(q,je,Ve,te,Qe),re=X,ie=J,ne=Ve,le=je,fe=Qe.boundingLength,we=Qe.pxSign,pe=yt,ve=te,be=Qe,Ee=ve.valueDim,Ne=Math.abs(ne[(Re=ve.categoryDim).wh]),Le=re.getItemVisual(ie,"symbolSize"),S.isArray(Le)?Le=Le.slice():(Le==null&&(Le="100%"),Le=[Le,Le]),Le[Re.index]=y(Le[Re.index],Ne),Le[Ee.index]=y(Le[Ee.index],le?Ne:Math.abs(fe)),be.symbolSize=Le,Se=be.symbolScale=[Le[0]/pe,Le[1]/pe],Se[Ee.index]*=(ve.isHorizontal?-1:1)*we,Ie=q,_e=Qe.symbolScale,Ae=mt,ue=te,ke=Qe,(Pe=Ie.get(b)||0)&&(l.attr({scale:_e.slice(),rotation:Ae}),l.updateTransform(),Pe/=l.getLineScale(),Pe*=_e[ue.valueDim.index]),ke.valueLineWidth=Pe;var At=Qe.symbolSize,Xt=q.get("symbolOffset");return S.isArray(Xt)&&(Xt=[y(Xt[0],At[0]),y(Xt[1],At[1])]),function(cn,Sn,Vn,bn,En,pn,Un,Pn,On,Ht,Mt,Gt){var Bt=Mt.categoryDim,Ge=Mt.valueDim,et=Gt.pxSign,vt=Math.max(Sn[Ge.index]+Pn,0),wt=vt;if(bn){var Ct=Math.abs(On),bt=S.retrieve(cn.get("symbolMargin"),"15%")+"",Rt=!1;bt.lastIndexOf("!")===bt.length-1&&(Rt=!0,bt=bt.slice(0,bt.length-1));var Lt=Math.max(vt+2*(bt=y(bt,Sn[Ge.index])),0),Dt=Rt?0:2*bt,Jt=d(bn),zt=Jt?bn:Z((Ct+Dt)/Lt);bt=(Ct-zt*vt)/2/(Rt?zt:zt-1),Lt=vt+2*bt,Dt=Rt?0:2*bt,Jt||bn==="fixed"||(zt=Ht?Z((Math.abs(Ht)+Dt)/Lt):0),wt=zt*Lt-Dt,Gt.repeatTimes=zt,Gt.symbolMargin=bt}var nn=wt/2*et,An=Gt.pathPosition=[];An[Bt.index]=Vn[Bt.wh]/2,An[Ge.index]=Un==="start"?nn:Un==="end"?On-nn:On/2,pn&&(An[0]+=pn[0],An[1]+=pn[1]);var lr=Gt.bundlePosition=[];lr[Bt.index]=Vn[Bt.xy],lr[Ge.index]=Vn[Ge.xy];var $r=Gt.barRectShape=S.extend({},Vn);$r[Ge.wh]=et*Math.max(Math.abs(Vn[Ge.wh]),Math.abs(An[Ge.index]+nn)),$r[Bt.wh]=Vn[Bt.wh];var ri=Gt.clipShape={};ri[Bt.xy]=-Vn[Bt.xy],ri[Bt.wh]=Mt.ecSize[Bt.wh],ri[Ge.xy]=0,ri[Ge.wh]=Vn[Ge.wh]}(q,At,Ve,je,0,Xt,rt,Qe.valueLineWidth,Qe.boundingLength,Qe.repeatCutLength,te,Qe),Qe}function I(X,J){return X.toGlobalCoord(X.dataToCoord(X.scale.parse(J)))}function C(X){var J=X.symbolPatternSize,q=p(X.symbolType,-J/2,-J/2,J,J,X.color);return q.attr({culling:!0}),q.type!=="image"&&q.setStyle({strokeNoScale:!0}),q}function h(X,J,q,te){var re=X.__pictorialBundle,ie=q.symbolSize,ne=q.valueLineWidth,le=q.pathPosition,fe=J.valueDim,we=q.repeatTimes||0,pe=0,ve=ie[J.valueDim.index]+ne+2*q.symbolMargin;for(P(X,function(Se){Se.__pictorialAnimationIndex=pe,Se.__pictorialRepeatTimes=we,pe<we?U(Se,null,Re(pe),q,te):U(Se,null,{scale:[0,0]},q,te,function(){re.remove(Se)}),z(Se,q),pe++});pe<we;pe++){var be=C(q);be.__pictorialAnimationIndex=pe,be.__pictorialRepeatTimes=we,re.add(be);var Ee=Re(pe);U(be,{position:Ee.position,scale:[0,0]},{scale:Ee.scale,rotation:Ee.rotation},q,te),be.on("mouseover",Ne).on("mouseout",Le),z(be,q)}function Re(Se){var Ie=le.slice(),_e=q.pxSign,Ae=Se;return(q.symbolRepeatDirection==="start"?_e>0:_e<0)&&(Ae=we-1-Se),Ie[fe.index]=ve*(Ae-we/2+.5)+le[fe.index],{position:Ie,scale:q.symbolScale.slice(),rotation:q.rotation}}function Ne(){P(X,function(Se){Se.trigger("emphasis")})}function Le(){P(X,function(Se){Se.trigger("normal")})}}function c(X,J,q,te){var re=X.__pictorialBundle,ie=X.__pictorialMainPath;ie?U(ie,null,{position:q.pathPosition.slice(),scale:q.symbolScale.slice(),rotation:q.rotation},q,te):(ie=X.__pictorialMainPath=C(q),re.add(ie),U(ie,{position:q.pathPosition.slice(),scale:[0,0],rotation:q.rotation},{scale:q.symbolScale.slice()},q,te),ie.on("mouseover",function(){this.trigger("emphasis")}).on("mouseout",function(){this.trigger("normal")})),z(ie,q)}function m(X,J,q){var te=S.extend({},J.barRectShape),re=X.__pictorialBarRect;re?U(re,null,{shape:te},J,q):(re=X.__pictorialBarRect=new _.Rect({z2:2,shape:te,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),X.add(re))}function T(X,J,q,te){if(q.symbolClip){var re=X.__pictorialClipPath,ie=S.extend({},q.clipShape),ne=J.valueDim,le=q.animationModel,fe=q.dataIndex;if(re)_.updateProps(re,{shape:ie},le,fe);else{ie[ne.wh]=0,re=new _.Rect({shape:ie}),X.__pictorialBundle.setClipPath(re),X.__pictorialClipPath=re;var we={};we[ne.wh]=q.clipShape[ne.wh],_[te?"updateProps":"initProps"](re,{shape:we},le,fe)}}}function D(X,J){var q=X.getItemModel(J);return q.getAnimationDelayParams=O,q.isAnimationEnabled=N,q}function O(X){return{index:X.__pictorialAnimationIndex,count:X.__pictorialRepeatTimes}}function N(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function z(X,J){X.off("emphasis").off("normal");var q=J.symbolScale.slice();J.hoverAnimation&&X.on("emphasis",function(){this.animateTo({scale:[1.1*q[0],1.1*q[1]]},400,"elasticOut")}).on("normal",function(){this.animateTo({scale:q.slice()},400,"elasticOut")})}function H(X,J,q,te){var re=new _.Group,ie=new _.Group;return re.add(ie),re.__pictorialBundle=ie,ie.attr("position",q.bundlePosition.slice()),q.symbolRepeat?h(re,J,q):c(re,J,q),m(re,q,te),T(re,J,q,te),re.__pictorialShapeStr=V(X,q),re.__pictorialSymbolMeta=q,re}function $(X,J,q,te){var re=te.__pictorialBarRect;re&&(re.style.text=null);var ie=[];P(te,function(ne){ie.push(ne)}),te.__pictorialMainPath&&ie.push(te.__pictorialMainPath),te.__pictorialClipPath&&(q=null),S.each(ie,function(ne){_.updateProps(ne,{scale:[0,0]},q,J,function(){te.parent&&te.parent.remove(te)})}),X.setItemGraphicEl(J,null)}function V(X,J){return[X.getItemVisual(J.dataIndex,"symbol")||"none",!!J.symbolRepeat,!!J.symbolClip].join(":")}function P(X,J,q){S.each(X.__pictorialBundle.children(),function(te){te!==X.__pictorialBarRect&&J.call(q,te)})}function U(X,J,q,te,re,ie){J&&X.attr(J),te.symbolClip&&!re?q&&X.attr(q):q&&_[re?"updateProps":"initProps"](X,q,te.animationModel,te.dataIndex,ie)}function Y(X,J,q){var te=q.color,re=q.dataIndex,ie=q.itemModel,ne=ie.getModel("itemStyle").getItemStyle(["color"]),le=ie.getModel("emphasis.itemStyle").getItemStyle(),fe=ie.getShallow("cursor");P(X,function(be){be.setColor(te),be.setStyle(S.defaults({fill:te,opacity:q.opacity},ne)),_.setHoverStyle(be,le),fe&&(be.cursor=fe),be.z2=q.z2});var we={},pe=J.valueDim.posDesc[+(q.boundingLength>0)],ve=X.__pictorialBarRect;v(ve.style,we,ie,te,J.seriesModel,re,pe),_.setHoverStyle(ve,we)}function Z(X){var J=Math.round(X);return 1e-4>Math.abs(X-J)?J:Math.ceil(X)}E.exports=o.extendChartView({type:"pictorialBar",render:function(X,J,q){var te=this.group,re=X.getData(),ie=this._data,ne=X.coordinateSystem,le=!!ne.getBaseAxis().isHorizontal(),fe=ne.grid.getRect(),we={ecSize:{width:q.getWidth(),height:q.getHeight()},seriesModel:X,coordSys:ne,coordSysExtent:[[fe.x,fe.x+fe.width],[fe.y,fe.y+fe.height]],isHorizontal:le,valueDim:s[+le],categoryDim:s[1-le]};return re.diff(ie).add(function(pe){if(re.hasValue(pe)){var ve=D(re,pe),be=w(re,pe,ve,we),Ee=H(re,we,be);re.setItemGraphicEl(pe,Ee),te.add(Ee),Y(Ee,we,be)}}).update(function(pe,ve){var be,Ee,Re,Ne,Le,Se,Ie=ie.getItemGraphicEl(ve);if(!re.hasValue(pe))return void te.remove(Ie);var _e=D(re,pe),Ae=w(re,pe,_e,we),ue=V(re,Ae);Ie&&ue!==Ie.__pictorialShapeStr&&(te.remove(Ie),re.setItemGraphicEl(pe,null),Ie=null),Ie?(be=Ie,Ee=we,Ne=(Re=Ae).animationModel,Le=Re.dataIndex,Se=be.__pictorialBundle,_.updateProps(Se,{position:Re.bundlePosition.slice()},Ne,Le),Re.symbolRepeat?h(be,Ee,Re,!0):c(be,Ee,Re,!0),m(be,Re,!0),T(be,Ee,Re,!0)):Ie=H(re,we,Ae,!0),re.setItemGraphicEl(pe,Ie),Ie.__pictorialSymbolMeta=Ae,te.add(Ie),Y(Ie,we,Ae)}).remove(function(pe){var ve=ie.getItemGraphicEl(pe);ve&&$(ie,pe,ve.__pictorialSymbolMeta.animationModel,ve)}).execute(),this._data=re,this.group},dispose:S.noop,remove:function(X,J){var q=this.group,te=this._data;X.get("animation")?te&&te.eachItemGraphicEl(function(re){$(te,re.dataIndex,X,re)}):q.removeAll()}})},36096:function(E,A,u){var o=u(74106)([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]);E.exports={getBarItemStyle:function(S){var _=o(this,S);if(this.getBorderLineDash){var p=this.getBorderLineDash();p&&(_.lineDash=p)}return _}}},31535:function(E,A,u){var o=u(51747),S=u(73444).getDefaultLabel;function _(p,f){p.textPosition==="outside"&&(p.textPosition=f)}A.setLabel=function(p,f,y,d,v,b,s){var l=y.getModel("label"),w=y.getModel("emphasis.label");o.setLabelStyle(p,f,l,w,{labelFetcher:v,labelDataIndex:b,defaultText:S(v.getData(),b),isRectText:!0,autoColor:d}),_(p),_(f)}},43732:function(E,A,u){var o=u(87930);u(76149),u(21687);var S=u(58185),_=u(93891);o.registerVisual(S),o.registerLayout(_)},76149:function(E,A,u){var o=u(23405),S=u(95166),_=u(67783).seriesModelMixin,p=S.extend({type:"series.boxplot",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:2,shadowOffsetY:2,shadowColor:"rgba(0,0,0,0.4)"}},animationEasing:"elasticOut",animationDuration:800}});o.mixin(p,_,!0),E.exports=p},21687:function(E,A,u){var o=u(23405),S=u(4695),_=u(51747),p=u(74582),f=["itemStyle"],y=["emphasis","itemStyle"],d=S.extend({type:"boxplot",render:function(l,w,I){var C=l.getData(),h=this.group,c=this._data;this._data||h.removeAll();var m=+(l.get("layout")==="horizontal");C.diff(c).add(function(T){if(C.hasValue(T)){var D=b(C.getItemLayout(T),C,T,m,!0);C.setItemGraphicEl(T,D),h.add(D)}}).update(function(T,D){var O=c.getItemGraphicEl(D);if(!C.hasValue(T))return void h.remove(O);var N=C.getItemLayout(T);O?s(N,O,C,T):O=b(N,C,T,m),h.add(O),C.setItemGraphicEl(T,O)}).remove(function(T){var D=c.getItemGraphicEl(T);D&&h.remove(D)}).execute(),this._data=C},remove:function(l){var w=this.group,I=this._data;this._data=null,I&&I.eachItemGraphicEl(function(C){C&&w.remove(C)})},dispose:o.noop}),v=p.extend({type:"boxplotBoxPath",shape:{},buildPath:function(l,w){var I=w.points,C=0;for(l.moveTo(I[C][0],I[C][1]),C++;C<4;C++)l.lineTo(I[C][0],I[C][1]);for(l.closePath();C<I.length;C++)l.moveTo(I[C][0],I[C][1]),C++,l.lineTo(I[C][0],I[C][1])}});function b(l,w,I,C,h){var c,m,T,D=l.ends,O=new v({shape:{points:h?(c=D,m=C,T=l,o.map(c,function(N){return(N=N.slice())[m]=T.initBaseline,N})):D}});return s(l,O,w,I,h),O}function s(l,w,I,C,h){var c=I.hostModel;(0,_[h?"initProps":"updateProps"])(w,{shape:{points:l.ends}},c,C);var m=I.getItemModel(C),T=m.getModel(f),D=I.getItemVisual(C,"color"),O=T.getItemStyle(["borderColor"]);O.stroke=D,O.strokeNoScale=!0,w.useStyle(O),w.z2=100;var N=m.getModel(y).getItemStyle();_.setHoverStyle(w,N)}E.exports=d},93891:function(E,A,u){var o=u(23405),S=u(54684).parsePercent,_=o.each;E.exports=function(p){var f,y;_((f=[],y=[],p.eachSeriesByType("boxplot",function(d){var v=d.getBaseAxis(),b=o.indexOf(y,v);b<0&&(b=y.length,y[b]=v,f[b]={axis:v,seriesModels:[]}),f[b].seriesModels.push(d)}),f),function(d){var v=d.seriesModels;v.length&&(function(b){var s,l,w=b.axis,I=b.seriesModels,C=I.length,h=b.boxWidthList=[],c=b.boxOffsetList=[],m=[];if(w.type==="category")l=w.getBandWidth();else{var T=0;_(I,function(H){T=Math.max(T,H.getData().count())}),(s=w.getExtent())[1],s[0]}_(I,function(H){var $=H.get("boxWidth");o.isArray($)||($=[$,$]),m.push([S($[0],l)||0,S($[1],l)||0])});var D=.8*l-2,O=D/C*.3,N=(D-O*(C-1))/C,z=N/2-D/2;_(I,function(H,$){c.push(z),z+=O+N,h.push(Math.min(Math.max(N,m[$][0]),m[$][1]))})}(d),_(v,function(b,s){(function(l,w,I){var C=l.coordinateSystem,h=l.getData(),c=I/2,m=+(l.get("layout")!=="horizontal"),T=1-m,D=["x","y"],O=h.mapDimension(D[m]),N=h.mapDimension(D[T],!0);if(O!=null&&!(N.length<5))for(var z=0;z<h.count();z++){var H=h.get(O,z),$=X(H,N[2],z),V=X(H,N[0],z),P=X(H,N[1],z),U=X(H,N[3],z),Y=X(H,N[4],z),Z=[];J(Z,P,0),J(Z,U,1),Z.push(V,P,Y,U),q(Z,V),q(Z,Y),q(Z,$),h.setItemLayout(z,{initBaseline:$[T],ends:Z})}function X(te,re,ie){var ne,le=h.get(re,ie),fe=[];return fe[m]=te,fe[T]=le,isNaN(te)||isNaN(le)?ne=[NaN,NaN]:(ne=C.dataToPoint(fe),ne[m]+=w),ne}function J(te,re,ie){var ne=re.slice(),le=re.slice();ne[m]+=c,le[m]-=c,ie?te.push(ne,le):te.push(le,ne)}function q(te,re){var ie=re.slice(),ne=re.slice();ie[m]-=c,ne[m]+=c,te.push(ie,ne)}})(b,d.boxOffsetList[s],d.boxWidthList[s])}))})}},58185:function(E){var A=["itemStyle","borderColor"];E.exports=function(u,o){var S=u.get("color");u.eachRawSeriesByType("boxplot",function(_){var p=S[_.seriesIndex%S.length],f=_.getData();f.setVisual({legendSymbol:"roundRect",color:_.get(A)||p}),u.isSeriesFiltered(_)||f.each(function(y){var d=f.getItemModel(y);f.setItemVisual(y,{color:d.get(A,!0)})})})}},69963:function(E,A,u){var o=u(87930);u(84433),u(16175);var S=u(15931),_=u(42255),p=u(41187);o.registerPreprocessor(S),o.registerVisual(_),o.registerLayout(p)},84433:function(E,A,u){var o=u(23405),S=u(95166),_=u(67783).seriesModelMixin,p=S.extend({type:"series.candlestick",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,itemStyle:{color:"#c23531",color0:"#314656",borderWidth:1,borderColor:"#c23531",borderColor0:"#314656"},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationUpdate:!1,animationEasing:"linear",animationDuration:300},getShadowDim:function(){return"open"},brushSelector:function(f,y,d){var v=y.getItemLayout(f);return v&&d.rect(v.brushRect)}});o.mixin(p,_,!0),E.exports=p},16175:function(E,A,u){var o=u(23405),S=u(4695),_=u(51747),p=u(74582),f=["itemStyle"],y=["emphasis","itemStyle"],d=["color","color0","borderColor","borderColor0"],v=S.extend({type:"candlestick",render:function(h,c,m){this._updateDrawMode(h),this._isLargeDraw?this._renderLarge(h):this._renderNormal(h)},incrementalPrepareRender:function(h,c,m){this._clear(),this._updateDrawMode(h)},incrementalRender:function(h,c,m,T){this._isLargeDraw?this._incrementalRenderLarge(h,c):this._incrementalRenderNormal(h,c)},_updateDrawMode:function(h){var c=h.pipelineContext.large;(this._isLargeDraw==null||c^this._isLargeDraw)&&(this._isLargeDraw=c,this._clear())},_renderNormal:function(h){var c=h.getData(),m=this._data,T=this.group,D=c.getLayout("isSimpleBox");this._data||T.removeAll(),c.diff(m).add(function(O){if(c.hasValue(O)){var N,z=c.getItemLayout(O);N=s(z,O,!0),_.initProps(N,{shape:{points:z.ends}},h,O),l(N,c,O,D),T.add(N),c.setItemGraphicEl(O,N)}}).update(function(O,N){var z=m.getItemGraphicEl(N);if(!c.hasValue(O))return void T.remove(z);var H=c.getItemLayout(O);z?_.updateProps(z,{shape:{points:H.ends}},h,O):z=s(H),l(z,c,O,D),T.add(z),c.setItemGraphicEl(O,z)}).remove(function(O){var N=m.getItemGraphicEl(O);N&&T.remove(N)}).execute(),this._data=c},_renderLarge:function(h){this._clear(),I(h,this.group)},_incrementalRenderNormal:function(h,c){for(var m,T,D=c.getData(),O=D.getLayout("isSimpleBox");(m=h.next())!=null;)l(T=s(D.getItemLayout(m)),D,m,O),T.incremental=!0,this.group.add(T)},_incrementalRenderLarge:function(h,c){I(c,this.group,!0)},remove:function(h){this._clear()},_clear:function(){this.group.removeAll(),this._data=null},dispose:o.noop}),b=p.extend({type:"normalCandlestickBox",shape:{},buildPath:function(h,c){var m=c.points;this.__simpleBox?(h.moveTo(m[4][0],m[4][1]),h.lineTo(m[6][0],m[6][1])):(h.moveTo(m[0][0],m[0][1]),h.lineTo(m[1][0],m[1][1]),h.lineTo(m[2][0],m[2][1]),h.lineTo(m[3][0],m[3][1]),h.closePath(),h.moveTo(m[4][0],m[4][1]),h.lineTo(m[5][0],m[5][1]),h.moveTo(m[6][0],m[6][1]),h.lineTo(m[7][0],m[7][1]))}});function s(h,c,m){var T,D,O=h.ends;return new b({shape:{points:m?(T=O,D=h,o.map(T,function(N){return(N=N.slice())[1]=D.initBaseline,N})):O},z2:100})}function l(h,c,m,T){var D=c.getItemModel(m),O=D.getModel(f),N=c.getItemVisual(m,"color"),z=c.getItemVisual(m,"borderColor")||N,H=O.getItemStyle(d);h.useStyle(H),h.style.strokeNoScale=!0,h.style.fill=N,h.style.stroke=z,h.__simpleBox=T;var $=D.getModel(y).getItemStyle();_.setHoverStyle(h,$)}var w=p.extend({type:"largeCandlestickBox",shape:{},buildPath:function(h,c){for(var m=c.points,T=0;T<m.length;)if(this.__sign===m[T++]){var D=m[T++];h.moveTo(D,m[T++]),h.lineTo(D,m[T++])}else T+=3}});function I(h,c,m){var T=h.getData(),D=T.getLayout("largePoints"),O=new w({shape:{points:D},__sign:1});c.add(O);var N=new w({shape:{points:D},__sign:-1});c.add(N),C(1,O,h,T),C(-1,N,h,T),m&&(O.incremental=!0,N.incremental=!0)}function C(h,c,m,T){var D=h>0?"P":"N",O=T.getVisual("borderColor"+D)||T.getVisual("color"+D),N=m.getModel(f).getItemStyle(d);c.useStyle(N),c.style.fill=null,c.style.stroke=O}E.exports=v},41187:function(E,A,u){var o=u(51747).subPixelOptimize,S=u(52227),_=u(54684).parsePercent,p=u(23405).retrieve2,f=typeof Float32Array<"u"?Float32Array:Array;function y(d,v,b,s,l){return b>s?-1:b<s?1:v>0?d.get(l,v-1)<=s?1:-1:1}E.exports={seriesType:"candlestick",plan:S(),reset:function(d){var v,b,s,l,w,I,C,h,c=d.coordinateSystem,m=d.getData(),T=(v=d,b=m,w=(l=v.getBaseAxis()).type==="category"?l.getBandWidth():Math.abs((s=l.getExtent())[1]-s[0])/b.count(),I=_(p(v.get("barMaxWidth"),w),w),C=_(p(v.get("barMinWidth"),1),w),(h=v.get("barWidth"))!=null?_(h,w):Math.max(Math.min(w/2,I),C)),D=m.mapDimension("x"),O=m.mapDimension("y",!0),N=O[0],z=O[1],H=O[2],$=O[3];if(m.setLayout({candleWidth:T,isSimpleBox:T<=1.3}),D!=null&&!(O.length<4))return{progress:d.pipelineContext.large?function(V,P){for(var U,Y,Z=new f(5*V.count),X=0,J=[],q=[];(Y=V.next())!=null;){var te=P.get(D,Y),re=P.get(N,Y),ie=P.get(z,Y),ne=P.get(H,Y),le=P.get($,Y);if(isNaN(te)||isNaN(ne)||isNaN(le)){Z[X++]=NaN,X+=4;continue}Z[X++]=y(P,Y,re,ie,z),J[0]=te,J[1]=ne,U=c.dataToPoint(J,null,q),Z[X++]=U?U[0]:NaN,Z[X++]=U?U[1]:NaN,J[1]=le,U=c.dataToPoint(J,null,q),Z[X++]=U?U[1]:NaN}P.setLayout("largePoints",Z)}:function(V,P){for(var U;(U=V.next())!=null;){var Y=P.get(D,U),Z=P.get(N,U),X=P.get(z,U),J=P.get(H,U),q=P.get($,U),te=Math.min(Z,X),re=Math.max(Z,X),ie=pe(te,Y),ne=pe(re,Y),le=pe(J,Y),fe=pe(q,Y),we=[];ve(we,ne,0),ve(we,ie,1),we.push(be(fe),be(ne),be(le),be(ie)),P.setItemLayout(U,{sign:y(P,U,Z,X,z),initBaseline:Z>X?ne[1]:ie[1],ends:we,brushRect:function(Ee,Re,Ne){var Le=pe(Ee,Ne),Se=pe(Re,Ne);return Le[0]-=T/2,Se[0]-=T/2,{x:Le[0],y:Le[1],width:T,height:Se[1]-Le[1]}}(J,q,Y)})}function pe(Ee,Re){var Ne=[];return Ne[0]=Re,Ne[1]=Ee,isNaN(Re)||isNaN(Ee)?[NaN,NaN]:c.dataToPoint(Ne)}function ve(Ee,Re,Ne){var Le=Re.slice(),Se=Re.slice();Le[0]=o(Le[0]+T/2,1,!1),Se[0]=o(Se[0]-T/2,1,!0),Ne?Ee.push(Le,Se):Ee.push(Se,Le)}function be(Ee){return Ee[0]=o(Ee[0],1),Ee}}}}}},42255:function(E,A,u){var o=u(52227),S=["itemStyle","borderColor"],_=["itemStyle","borderColor0"],p=["itemStyle","color"],f=["itemStyle","color0"];E.exports={seriesType:"candlestick",plan:o(),performRawSeries:!0,reset:function(y,d){var v=y.getData(),b=y.pipelineContext.large;if(v.setVisual({legendSymbol:"roundRect",colorP:s(1,y),colorN:s(-1,y),borderColorP:l(1,y),borderColorN:l(-1,y)}),!d.isSeriesFiltered(y))return!b&&{progress:function(w,I){for(var C;(C=w.next())!=null;){var h=I.getItemModel(C),c=I.getItemLayout(C).sign;I.setItemVisual(C,{color:s(c,h),borderColor:l(c,h)})}}};function s(w,I){return I.get(w>0?p:f)}function l(w,I){return I.get(w>0?S:_)}}}},15931:function(E,A,u){var o=u(23405);E.exports=function(S){S&&o.isArray(S.series)&&o.each(S.series,function(_){o.isObject(_)&&_.type==="k"&&(_.type="candlestick")})}},35979:function(E,A,u){u(9129).__DEV__;var o=u(23405),S=u(51747),_=u(73444).getDefaultLabel,p=u(74107),f=u(76918).getLayoutOnAxis,y=u(99018),d=u(95166),v=u(4695),b=u(79090),s=u(44988),l=u(65596),w=u(78147),I=u(29952),C=["itemStyle"],h=["emphasis","itemStyle"],c=["label"],m=["emphasis","label"],T={cartesian2d:b,geo:s,singleAxis:l,polar:w,calendar:I};function D(Y,Z,X,J,q){X[Y]==null||q||(Z[Y]=X[Y],X[Y]=J[Y])}function O(Y,Z,X,J){var q,te,re,ie,ne,le,fe,we=Y.get("renderItem"),pe=Y.coordinateSystem,ve={};pe&&(ve=pe.prepareCustoms?pe.prepareCustoms():T[pe.type](pe));var be=o.defaults({getWidth:J.getWidth,getHeight:J.getHeight,getZr:J.getZr,getDevicePixelRatio:J.getDevicePixelRatio,value:function(Le,Se){return Se==null&&(Se=re),Z.get(Z.getDimension(Le||0),Se)},style:function(Le,Se){Se==null&&(Se=re),Ne(Se);var Ie=ie.getModel(C).getItemStyle();fe!=null&&(Ie.fill=fe);var _e=Z.getItemVisual(Se,"opacity");return _e!=null&&(Ie.opacity=_e),S.setTextStyle(Ie,ne,null,{autoColor:fe,isRectText:!0}),Ie.text=ne.getShallow("show")?o.retrieve2(Y.getFormattedLabel(Se,"normal"),_(Z,Se)):null,Le&&o.extend(Ie,Le),Ie},styleEmphasis:function(Le,Se){Se==null&&(Se=re),Ne(Se);var Ie=ie.getModel(h).getItemStyle();return S.setTextStyle(Ie,le,null,{isRectText:!0},!0),Ie.text=le.getShallow("show")?o.retrieve3(Y.getFormattedLabel(Se,"emphasis"),Y.getFormattedLabel(Se,"normal"),_(Z,Se)):null,Le&&o.extend(Ie,Le),Ie},visual:function(Le,Se){return Se==null&&(Se=re),Z.getItemVisual(Se,Le)},barLayout:function(Le){if(pe.getBaseAxis){var Se=pe.getBaseAxis();return f(o.defaults({axis:Se},Le),J)}},currentSeriesIndices:function(){return X.getCurrentSeriesIndices()},font:function(Le){return S.getFont(Le,X)}},ve.api||{}),Ee={context:{},seriesId:Y.id,seriesName:Y.name,seriesIndex:Y.seriesIndex,coordSys:ve.coordSys,dataInsideLength:Z.count(),encode:(q=Y.getData(),te={},o.each(q.dimensions,function(Le,Se){var Ie=q.getDimensionInfo(Le);if(!Ie.isExtraCoord){var _e=Ie.coordDim;(te[_e]=te[_e]||[])[Ie.coordDimIndex]=Se}}),te)},Re=!0;return function(Le,Se){return re=Le,Re=!0,we&&we(o.defaults({dataIndexInside:Le,dataIndex:Z.getRawIndex(Le),actionType:Se?Se.type:null},Ee),be)};function Ne(Le){Le==null&&(Le=re),Re&&(ne=(ie=Z.getItemModel(Le)).getModel(c),le=ie.getModel(m),fe=Z.getItemVisual(Le,"color"),Re=!1)}}function N(Y,Z,X,J,q,te){return(Y=z(Y,Z,X,J,q,te,!0))&&te.setItemGraphicEl(Z,Y),Y}function z(Y,Z,X,J,q,te,re){var ie,ne=!X,le=(X=X||{}).type,fe=X.shape,we=X.style;if(Y&&(ne||le!=null&&le!==Y.__customGraphicType||le==="path"&&(ie=fe)&&(ie.hasOwnProperty("pathData")||ie.hasOwnProperty("d"))&&P(fe)!==Y.__customPathData||le==="image"&&U(we,"image")&&we.image!==Y.__customImagePath||le==="text"&&U(fe,"text")&&we.text!==Y.__customText)&&(q.remove(Y),Y=null),!ne){var pe=!Y;return Y||(Y=function(ve){var be,Ee=ve.type;if(Ee==="path"){var Re=ve.shape,Ne=Re.width!=null&&Re.height!=null?{x:Re.x||0,y:Re.y||0,width:Re.width,height:Re.height}:null,Le=P(Re);(be=S.makePath(Le,null,Ne,Re.layout||"center")).__customPathData=Le}else Ee==="image"?(be=new S.Image({})).__customImagePath=ve.style.image:Ee==="text"?(be=new S.Text({})).__customText=ve.style.text:be=new S[Ee.charAt(0).toUpperCase()+Ee.slice(1)];return be.__customGraphicType=Ee,be.name=ve.name,be}(X)),function(ve,be,Ee,Re,Ne,Le,Se){var Ie={},_e=Ee.style||{};if(Ee.shape&&(Ie.shape=o.clone(Ee.shape)),Ee.position&&(Ie.position=Ee.position.slice()),Ee.scale&&(Ie.scale=Ee.scale.slice()),Ee.origin&&(Ie.origin=Ee.origin.slice()),Ee.rotation&&(Ie.rotation=Ee.rotation),ve.type==="image"&&Ee.style){var Ae=Ie.style={};o.each(["x","y","width","height"],function(Ve){D(Ve,Ae,_e,ve.style,Le)})}if(ve.type==="text"&&Ee.style){var Ae=Ie.style={};o.each(["x","y"],function(je){D(je,Ae,_e,ve.style,Le)}),!_e.hasOwnProperty("textFill")&&_e.fill&&(_e.textFill=_e.fill),!_e.hasOwnProperty("textStroke")&&_e.stroke&&(_e.textStroke=_e.stroke)}if(ve.type!=="group"&&(ve.useStyle(_e),Le)){ve.style.opacity=0;var ue=_e.opacity;ue==null&&(ue=1),S.initProps(ve,{style:{opacity:ue}},Re,be)}Le?ve.attr(Ie):S.updateProps(ve,Ie,Re,be),Ee.hasOwnProperty("z2")&&ve.attr("z2",Ee.z2||0),Ee.hasOwnProperty("silent")&&ve.attr("silent",Ee.silent),Ee.hasOwnProperty("invisible")&&ve.attr("invisible",Ee.invisible),Ee.hasOwnProperty("ignore")&&ve.attr("ignore",Ee.ignore),Ee.hasOwnProperty("info")&&ve.attr("info",Ee.info);var ke=Ee.styleEmphasis,Pe=ke===!1;ve.__cusHasEmphStl&&ke==null||!ve.__cusHasEmphStl&&Pe||(S.setElementHoverStyle(ve,ke),ve.__cusHasEmphStl=!Pe),Se&&S.setAsHoverStyleTrigger(ve,!Pe)}(Y,Z,X,J,0,pe,re),le==="group"&&function(ve,be,Ee,Re,Ne){var Le,Se=Ee.children,Ie=Se?Se.length:0,_e=Ee.$mergeChildren,Ae=_e==="byName"||Ee.diffChildrenByName,ue=_e===!1;if(Ie||Ae||ue){if(Ae)return new y((Le={oldChildren:ve.children()||[],newChildren:Se||[],dataIndex:be,animatableModel:Re,group:ve,data:Ne}).oldChildren,Le.newChildren,H,H,Le).add($).update($).remove(V).execute();ue&&ve.removeAll();for(var ke=0;ke<Ie;ke++)Se[ke]&&z(ve.childAt(ke),be,Se[ke],Re,ve,Ne)}}(Y,Z,X,J,te),q.add(Y),Y}}function H(Y,Z){var X=Y&&Y.name;return X??"e\0\0"+Z}function $(Y,Z){var X=this.context,J=Y!=null?X.newChildren[Y]:null;z(Z!=null?X.oldChildren[Z]:null,X.dataIndex,J,X.animatableModel,X.group,X.data)}function V(Y){var Z=this.context,X=Z.oldChildren[Y];X&&Z.group.remove(X)}function P(Y){return Y&&(Y.pathData||Y.d)}function U(Y,Z){return Y&&Y.hasOwnProperty(Z)}d.extend({type:"series.custom",dependencies:["grid","polar","geo","singleAxis","calendar"],defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,useTransform:!0},getInitialData:function(Y,Z){return p(this.getSource(),this)},getDataParams:function(Y,Z,X){var J=d.prototype.getDataParams.apply(this,arguments);return X&&(J.info=X.info),J}}),v.extend({type:"custom",_data:null,render:function(Y,Z,X,J){var q=this._data,te=Y.getData(),re=this.group,ie=O(Y,te,Z,X);te.diff(q).add(function(ne){N(null,ne,ie(ne,J),Y,re,te)}).update(function(ne,le){N(q.getItemGraphicEl(le),ne,ie(ne,J),Y,re,te)}).remove(function(ne){var le=q.getItemGraphicEl(ne);le&&re.remove(le)}).execute(),this._data=te},incrementalPrepareRender:function(Y,Z,X){this.group.removeAll(),this._data=null},incrementalRender:function(Y,Z,X,J,q){var te=Z.getData(),re=O(Z,te,X,J);function ie(le){le.isGroup||(le.incremental=!0,le.useHoverLayer=!0)}for(var ne=Y.start;ne<Y.end;ne++)N(null,ne,re(ne,q),Z,this.group,te).traverse(ie)},dispose:o.noop,filterForExposedEvent:function(Y,Z,X,J){var q=Z.element;if(q==null||X.name===q)return!0;for(;(X=X.parent)&&X!==this.group;)if(X.name===q)return!0;return!1}})},97215:function(E,A,u){var o=u(87930);u(9309),u(87281);var S=u(53414),_=u(21188);o.registerVisual(S("effectScatter","circle")),o.registerLayout(_("effectScatter"))},9309:function(E,A,u){var o=u(74107);E.exports=u(95166).extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(S,_){return o(this.getSource(),this)},brushSelector:"point",defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",rippleEffect:{period:4,scale:2.5,brushType:"fill"},symbolSize:10}})},87281:function(E,A,u){var o=u(87930),S=u(83522),_=u(99939),p=u(79442),f=u(21188);E.exports=o.extendChartView({type:"effectScatter",init:function(){this._symbolDraw=new S(_)},render:function(y,d,v){var b=y.getData(),s=this._symbolDraw;s.updateData(b),this.group.add(s.group)},updateTransform:function(y,d,v){var b=y.getData();this.group.dirty();var s=f().reset(y);s.progress&&s.progress({start:0,end:b.count()},b),this._symbolDraw.updateLayout(b)},_updateGroupTransform:function(y){var d=y.coordinateSystem;d&&d.getRoamTransform&&(this.group.transform=p.clone(d.getRoamTransform()),this.group.decomposeTransform())},remove:function(y,d){this._symbolDraw&&this._symbolDraw.remove(d)},dispose:function(){}})},53514:function(E,A,u){var o=u(87930);u(117),u(29278);var S=u(59448),_=u(82672),p=u(74278);o.registerVisual(S("funnel")),o.registerLayout(_),o.registerProcessor(p("funnel"))},117:function(E,A,u){var o=u(87930),S=u(59644),_=u(51064).defaultEmphasis,p=o.extendSeriesModel({type:"series.funnel",init:function(f){p.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()},this._defaultLabelLine(f)},getInitialData:function(f,y){return S(this,["value"])},_defaultLabelLine:function(f){_(f,"labelLine",["show"]);var y=f.labelLine,d=f.emphasis.labelLine;y.show=y.show&&f.label.show,d.show=d.show&&f.emphasis.label.show},getDataParams:function(f){var y=this.getData(),d=p.superCall(this,"getDataParams",f),v=y.mapDimension("value"),b=y.getSum(v);return d.percent=b?+(y.get(v,f)/b*100).toFixed(2):0,d.$vars.push("percent"),d},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1,type:"solid"}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}}}});E.exports=p},29278:function(E,A,u){var o=u(51747),S=u(23405),_=u(4695);function p(d,v){o.Group.call(this);var b=new o.Polygon,s=new o.Polyline,l=new o.Text;function w(){s.ignore=s.hoverIgnore,l.ignore=l.hoverIgnore}function I(){s.ignore=s.normalIgnore,l.ignore=l.normalIgnore}this.add(b),this.add(s),this.add(l),this.updateData(d,v,!0),this.on("emphasis",w).on("normal",I).on("mouseover",w).on("mouseout",I)}var f=p.prototype,y=["itemStyle","opacity"];f.updateData=function(d,v,b){var s=this.childAt(0),l=d.hostModel,w=d.getItemModel(v),I=d.getItemLayout(v),C=d.getItemModel(v).get(y);C=C??1,s.useStyle({}),b?(s.setShape({points:I.points}),s.setStyle({opacity:0}),o.initProps(s,{style:{opacity:C}},l,v)):o.updateProps(s,{style:{opacity:C},shape:{points:I.points}},l,v);var h=w.getModel("itemStyle"),c=d.getItemVisual(v,"color");s.setStyle(S.defaults({lineJoin:"round",fill:c},h.getItemStyle(["opacity"]))),s.hoverStyle=h.getModel("emphasis").getItemStyle(),this._updateLabel(d,v),o.setHoverStyle(this)},f._updateLabel=function(d,v){var b=this.childAt(1),s=this.childAt(2),l=d.hostModel,w=d.getItemModel(v),I=d.getItemLayout(v).label,T=d.getItemVisual(v,"color");o.updateProps(b,{shape:{points:I.linePoints||I.linePoints}},l,v),o.updateProps(s,{style:{x:I.x,y:I.y}},l,v),s.attr({rotation:I.rotation,origin:[I.x,I.y],z2:10});var C=w.getModel("label"),h=w.getModel("emphasis.label"),c=w.getModel("labelLine"),m=w.getModel("emphasis.labelLine"),T=d.getItemVisual(v,"color");o.setLabelStyle(s.style,s.hoverStyle={},C,h,{labelFetcher:d.hostModel,labelDataIndex:v,defaultText:d.getName(v),autoColor:T,useInsideStyle:!!I.inside},{textAlign:I.textAlign,textVerticalAlign:I.verticalAlign}),s.ignore=s.normalIgnore=!C.get("show"),s.hoverIgnore=!h.get("show"),b.ignore=b.normalIgnore=!c.get("show"),b.hoverIgnore=!m.get("show"),b.setStyle({stroke:T}),b.setStyle(c.getModel("lineStyle").getLineStyle()),b.hoverStyle=m.getModel("lineStyle").getLineStyle()},S.inherits(p,o.Group),E.exports=_.extend({type:"funnel",render:function(d,v,b){var s=d.getData(),l=this._data,w=this.group;s.diff(l).add(function(I){var C=new p(s,I);s.setItemGraphicEl(I,C),w.add(C)}).update(function(I,C){var h=l.getItemGraphicEl(C);h.updateData(s,I),w.add(h),s.setItemGraphicEl(I,h)}).remove(function(I){var C=l.getItemGraphicEl(I);w.remove(C)}).execute(),this._data=s},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}})},82672:function(E,A,u){var o=u(62751),S=u(54684),_=S.parsePercent,p=S.linearMap;E.exports=function(f,y,d){f.eachSeriesByType("funnel",function(v){var b=v.getData(),s=b.mapDimension("value"),l=v.get("sort"),w=o.getLayoutRect(v.getBoxLayoutParams(),{width:y.getWidth(),height:y.getHeight()}),I=function(Z,X){for(var J=Z.mapDimension("value"),q=Z.mapArray(J,function(le){return le}),te=[],re=X==="ascending",ie=0,ne=Z.count();ie<ne;ie++)te[ie]=ie;return typeof X=="function"?te.sort(X):X!=="none"&&te.sort(function(le,fe){return re?q[le]-q[fe]:q[fe]-q[le]}),te}(b,l),C=[_(v.get("minSize"),w.width),_(v.get("maxSize"),w.width)],h=b.getDataExtent(s),c=v.get("min"),m=v.get("max");c==null&&(c=Math.min(h[0],0)),m==null&&(m=h[1]);var T=v.get("funnelAlign"),D=v.get("gap"),O=(w.height-D*(b.count()-1))/b.count(),N=w.y,z=function(Z,X){var J,q=p(b.get(s,Z)||0,[c,m],C,!0);switch(T){case"left":J=w.x;break;case"center":J=w.x+(w.width-q)/2;break;case"right":J=w.x+w.width-q}return[[J,X],[J+q,X]]};l==="ascending"&&(O=-O,D=-D,N+=w.height,I=I.reverse());for(var H=0;H<I.length;H++){var $=I[H],V=I[H+1],P=b.getItemModel($).get("itemStyle.height");P==null?P=O:(P=_(P,w.height),l==="ascending"&&(P=-P));var U=z($,N),Y=z(V,N+P);N+=P+D,b.setItemLayout($,{points:U.concat(Y.slice().reverse())})}b.each(function(Z){var X=b.getItemModel(Z),J=X.getModel("label").get("position"),q=X.getModel("labelLine"),te=b.getItemLayout(Z),re=te.points,ie=J==="inner"||J==="inside"||J==="center";if(ie)le=(re[0][0]+re[1][0]+re[2][0]+re[3][0])/4,fe=(re[0][1]+re[1][1]+re[2][1]+re[3][1])/4,ne="center",we=[[le,fe],[le,fe]];else{var ne,le,fe,we,pe,ve,be,Ee=q.get("length");J==="left"?(pe=(re[3][0]+re[0][0])/2,ve=(re[3][1]+re[0][1])/2,le=(be=pe-Ee)-5,ne="right"):(pe=(re[1][0]+re[2][0])/2,ve=(re[1][1]+re[2][1])/2,le=(be=pe+Ee)+5,ne="left");var Re=ve;we=[[pe,ve],[be,Re]],fe=Re}te.label={linePoints:we,x:le,y:fe,verticalAlign:"middle",textAlign:ne,inside:ie}})})}},59060:function(E,A,u){u(24069),u(16734)},24069:function(E,A,u){var o=u(59644),S=u(95166),_=u(23405);E.exports=S.extend({type:"series.gauge",getInitialData:function(p,f){var y=p.data||[];return _.isArray(y)||(y=[y]),p.data=y,o(this,["value"])},defaultOption:{zlevel:0,z:2,center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,lineStyle:{color:[[.2,"#91c7ae"],[.8,"#63869e"],[1,"#c23531"]],width:30}},splitLine:{show:!0,length:30,lineStyle:{color:"#eee",width:2,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:8,lineStyle:{color:"#eee",width:1,type:"solid"}},axisLabel:{show:!0,distance:5,color:"auto"},pointer:{show:!0,length:"80%",width:8},itemStyle:{color:"auto"},title:{show:!0,offsetCenter:[0,"-40%"],color:"#333",fontSize:15},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"auto",fontSize:30}}})},16734:function(E,A,u){var o=u(80169),S=u(51747),_=u(4695),p=u(54684),f=p.parsePercent,y=p.round,d=p.linearMap;function v(s,l){return l&&(typeof l=="string"?s=l.replace("{value}",s??""):typeof l=="function"&&(s=l(s))),s}var b=2*Math.PI;E.exports=_.extend({type:"gauge",render:function(s,l,w){this.group.removeAll();var I,C,h=s.get("axisLine.lineStyle.color"),c=(I=s.get("center"),C=Math.min(w.getWidth(),w.getHeight()),{cx:f(I[0],w.getWidth()),cy:f(I[1],w.getHeight()),r:f(s.get("radius"),C/2)});this._renderMain(s,l,w,h,c)},dispose:function(){},_renderMain:function(s,l,w,I,C){for(var h=this.group,c=s.getModel("axisLine").getModel("lineStyle"),m=s.get("clockwise"),T=-s.get("startAngle")/180*Math.PI,D=-s.get("endAngle")/180*Math.PI,O=(D-T)%b,N=T,z=c.get("width"),H=0;H<I.length;H++){var D=T+O*Math.min(Math.max(I[H][0],0),1),$=new S.Sector({shape:{startAngle:N,endAngle:D,cx:C.cx,cy:C.cy,clockwise:m,r0:C.r-z,r:C.r},silent:!0});$.setStyle({fill:I[H][1]}),$.setStyle(c.getLineStyle(["color","borderWidth","borderColor"])),h.add($),N=D}var V=function(U){if(U<=0)return I[0][1];for(var Y=0;Y<I.length;Y++)if(I[Y][0]>=U&&(Y===0?0:I[Y-1][0])<U)return I[Y][1];return I[Y-1][1]};if(!m){var P=T;T=D,D=P}this._renderTicks(s,l,w,V,C,T,D,m),this._renderPointer(s,l,w,V,C,T,D,m),this._renderTitle(s,l,w,V,C),this._renderDetail(s,l,w,V,C)},_renderTicks:function(s,l,w,I,C,h,c,m){for(var T=this.group,D=C.cx,O=C.cy,N=C.r,z=+s.get("min"),H=+s.get("max"),$=s.getModel("splitLine"),V=s.getModel("axisTick"),P=s.getModel("axisLabel"),U=s.get("splitNumber"),Y=V.get("splitNumber"),Z=f($.get("length"),N),X=f(V.get("length"),N),J=h,q=(c-h)/U,te=q/Y,re=$.getModel("lineStyle").getLineStyle(),ie=V.getModel("lineStyle").getLineStyle(),ne=0;ne<=U;ne++){var le=Math.cos(J),fe=Math.sin(J);if($.get("show")){var we=new S.Line({shape:{x1:le*N+D,y1:fe*N+O,x2:le*(N-Z)+D,y2:fe*(N-Z)+O},style:re,silent:!0});re.stroke==="auto"&&we.setStyle({stroke:I(ne/U)}),T.add(we)}if(P.get("show")){var pe=v(y(ne/U*(H-z)+z),P.get("formatter")),ve=P.get("distance"),be=I(ne/U);T.add(new S.Text({style:S.setTextStyle({},P,{text:pe,x:le*(N-Z-ve)+D,y:fe*(N-Z-ve)+O,textVerticalAlign:fe<-.4?"top":fe>.4?"bottom":"middle",textAlign:le<-.4?"left":le>.4?"right":"center"},{autoColor:be}),silent:!0}))}if(V.get("show")&&ne!==U){for(var Ee=0;Ee<=Y;Ee++){var le=Math.cos(J),fe=Math.sin(J),Re=new S.Line({shape:{x1:le*N+D,y1:fe*N+O,x2:le*(N-X)+D,y2:fe*(N-X)+O},silent:!0,style:ie});ie.stroke==="auto"&&Re.setStyle({stroke:I((ne+Ee/Y)/U)}),T.add(Re),J+=te}J-=te}else J+=q}},_renderPointer:function(s,l,w,I,C,h,c,m){var T=this.group,D=this._data;if(!s.get("pointer.show")){D&&D.eachItemGraphicEl(function($){T.remove($)});return}var O=[+s.get("min"),+s.get("max")],N=[h,c],z=s.getData(),H=z.mapDimension("value");z.diff(D).add(function($){var V=new o({shape:{angle:h}});S.initProps(V,{shape:{angle:d(z.get(H,$),O,N,!0)}},s),T.add(V),z.setItemGraphicEl($,V)}).update(function($,V){var P=D.getItemGraphicEl(V);S.updateProps(P,{shape:{angle:d(z.get(H,$),O,N,!0)}},s),T.add(P),z.setItemGraphicEl($,P)}).remove(function($){var V=D.getItemGraphicEl($);T.remove(V)}).execute(),z.eachItemGraphicEl(function($,V){var P=z.getItemModel(V),U=P.getModel("pointer");$.setShape({x:C.cx,y:C.cy,width:f(U.get("width"),C.r),r:f(U.get("length"),C.r)}),$.useStyle(P.getModel("itemStyle").getItemStyle()),$.style.fill==="auto"&&$.setStyle("fill",I(d(z.get(H,V),O,[0,1],!0))),S.setHoverStyle($,P.getModel("emphasis.itemStyle").getItemStyle())}),this._data=z},_renderTitle:function(s,l,w,I,C){var h=s.getData(),c=h.mapDimension("value"),m=s.getModel("title");if(m.get("show")){var T=m.get("offsetCenter"),D=C.cx+f(T[0],C.r),O=C.cy+f(T[1],C.r),N=+s.get("min"),z=+s.get("max"),H=I(d(s.getData().get(c,0),[N,z],[0,1],!0));this.group.add(new S.Text({silent:!0,style:S.setTextStyle({},m,{x:D,y:O,text:h.getName(0),textAlign:"center",textVerticalAlign:"middle"},{autoColor:H,forceRich:!0})}))}},_renderDetail:function(s,l,w,I,C){var h=s.getModel("detail"),c=+s.get("min"),m=+s.get("max");if(h.get("show")){var T=h.get("offsetCenter"),D=C.cx+f(T[0],C.r),O=C.cy+f(T[1],C.r),N=f(h.get("width"),C.r),z=f(h.get("height"),C.r),H=s.getData(),$=H.get(H.mapDimension("value"),0),V=I(d($,[c,m],[0,1],!0));this.group.add(new S.Text({silent:!0,style:S.setTextStyle({},h,{x:D,y:O,text:v($,h.get("formatter")),textWidth:isNaN(N)?null:N,textHeight:isNaN(z)?null:z,textAlign:"center",textVerticalAlign:"middle"},{autoColor:V,forceRich:!0})}))}}})},80169:function(E,A,u){E.exports=u(74582).extend({type:"echartsGaugePointer",shape:{angle:0,width:10,r:10,x:0,y:0},buildPath:function(o,S){var _=Math.cos,p=Math.sin,f=S.r,y=S.width,d=S.angle,v=S.x-_(d)*y*(y>=f/3?1:2),b=S.y-p(d)*y*(y>=f/3?1:2);d=S.angle-Math.PI/2,o.moveTo(v,b),o.lineTo(S.x+_(d)*y,S.y+p(d)*y),o.lineTo(S.x+_(S.angle)*f,S.y+p(S.angle)*f),o.lineTo(S.x-_(d)*y,S.y-p(d)*y),o.lineTo(v,b)}})},62147:function(E,A,u){var o=u(87930);u(49294),u(90938),u(34877);var S=u(6388),_=u(53414),p=u(17573),f=u(17183),y=u(86759),d=u(38375),v=u(49490),b=u(96128);o.registerProcessor(S),o.registerVisual(_("graph","circle",null)),o.registerVisual(p),o.registerVisual(f),o.registerLayout(y),o.registerLayout(d),o.registerLayout(v),o.registerCoordinateSystem("graphView",{create:b})},49294:function(E,A,u){var o=u(87930),S=u(80023),_=u(23405),p=u(51064).defaultEmphasis,f=u(46082),y=u(60653).encodeHTML,d=u(64330),v=o.extendSeriesModel({type:"series.graph",init:function(b){v.superApply(this,"init",arguments),this.legendDataProvider=function(){return this._categoriesData},this.fillDataTextStyle(b.edges||b.links),this._updateCategoriesData()},mergeOption:function(b){v.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(b.edges||b.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(b){v.superApply(this,"mergeDefaultAndTheme",arguments),p(b,["edgeLabel"],["show"])},getInitialData:function(b,s){var l=b.edges||b.links||[],w=b.data||b.nodes||[],I=this;if(w&&l)return d(w,l,this,!0,function(C,h){C.wrapMethod("getItemModel",function(N){var z=I._categoriesModels[N.getShallow("category")];return z&&(z.parentModel=N.parentModel,N.parentModel=z),N});var c=I.getModel("edgeLabel"),m=new f({label:c.option},c.parentModel,s),T=I.getModel("emphasis.edgeLabel"),D=new f({emphasis:{label:T.option}},T.parentModel,s);function O(N){return(N=this.parsePath(N))&&N[0]==="label"?m:N&&N[0]==="emphasis"&&N[1]==="label"?D:this.parentModel}h.wrapMethod("getItemModel",function(N){return N.customizeGetParent(O),N})}).data},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(b,s,l){if(l!=="edge")return v.superApply(this,"formatTooltip",arguments);var w=this.getData(),I=this.getDataParams(b,l),C=w.graph.getEdgeByIndex(b),h=w.getName(C.node1.dataIndex),c=w.getName(C.node2.dataIndex),m=[];return h!=null&&m.push(h),c!=null&&m.push(c),m=y(m.join(" > ")),I.value&&(m+=" : "+y(I.value)),m},_updateCategoriesData:function(){var b=_.map(this.option.categories||[],function(l){return l.value!=null?l:_.extend({value:0},l)}),s=new S(["value"],this);s.initData(b),this._categoriesData=s,this._categoriesModels=s.mapArray(function(l){return s.getItemModel(l,!0)})},setZoom:function(b){this.option.zoom=b},setCenter:function(b){this.option.center=b},isAnimationEnabled:function(){return v.superCall(this,"isAnimationEnabled")&&!(this.get("layout")==="force"&&this.get("force.layoutAnimation"))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,hoverAnimation:!0,layout:null,focusNodeAdjacency:!1,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle"},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,curveness:0,opacity:.5},emphasis:{label:{show:!0}}}});E.exports=v},90938:function(E,A,u){var o=u(87930),S=u(23405),_=u(83522),p=u(61880),f=u(55104),y=u(6463),d=u(11731).onIrrelevantElement,v=u(51747),b=u(41147),s="__focusNodeAdjacency",l="__unfocusNodeAdjacency",w=["itemStyle","opacity"],I=["lineStyle","opacity"];function C(m,T){return m.getVisual("opacity")||m.getModel().get(T)}function h(m,T,D){var O=m.getGraphicEl(),N=C(m,T);D!=null&&(N==null&&(N=1),N*=D),O.downplay&&O.downplay(),O.traverse(function(z){if(z.type!=="group"){var H=z.lineLabelOriginalOpacity;(H==null||D!=null)&&(H=N),z.setStyle("opacity",H)}})}function c(m,T){var D=C(m,T),O=m.getGraphicEl();O.highlight&&O.highlight(),O.traverse(function(N){N.type!=="group"&&N.setStyle("opacity",D)})}E.exports=o.extendChartView({type:"graph",init:function(m,T){var D=new _,O=new p,N=this.group;this._controller=new f(T.getZr()),this._controllerHost={target:N},N.add(D.group),N.add(O.group),this._symbolDraw=D,this._lineDraw=O,this._firstRender=!0},render:function(m,T,D){var O=m.coordinateSystem;this._model=m,this._nodeScaleRatio=m.get("nodeScaleRatio");var N=this._symbolDraw,z=this._lineDraw,H=this.group;if(O.type==="view"){var $={position:O.position,scale:O.scale};this._firstRender?H.attr($):v.updateProps(H,$,m)}b(m.getGraph(),this._getNodeGlobalScale(m));var V=m.getData();N.updateData(V);var P=m.getEdgeData();z.updateData(P),this._updateNodeAndLinkScale(),this._updateController(m,T,D),clearTimeout(this._layoutTimeout);var U=m.forceLayout,Y=m.get("force.layoutAnimation");U&&this._startForceLayoutIteration(U,Y),V.eachItemGraphicEl(function(q,te){var re=V.getItemModel(te);q.off("drag").off("dragend");var ie=re.get("draggable");ie&&q.on("drag",function(){U&&(U.warmUp(),this._layouting||this._startForceLayoutIteration(U,Y),U.setFixed(te),V.setItemLayout(te,q.position))},this).on("dragend",function(){U&&U.setUnfixed(te)},this),q.setDraggable(ie&&U),q[s]&&q.off("mouseover",q[s]),q[l]&&q.off("mouseout",q[l]),re.get("focusNodeAdjacency")&&(q.on("mouseover",q[s]=function(){D.dispatchAction({type:"focusNodeAdjacency",seriesId:m.id,dataIndex:q.dataIndex})}),q.on("mouseout",q[l]=function(){D.dispatchAction({type:"unfocusNodeAdjacency",seriesId:m.id})}))},this),V.graph.eachEdge(function(q){var te=q.getGraphicEl();te[s]&&te.off("mouseover",te[s]),te[l]&&te.off("mouseout",te[l]),q.getModel().get("focusNodeAdjacency")&&(te.on("mouseover",te[s]=function(){D.dispatchAction({type:"focusNodeAdjacency",seriesId:m.id,edgeDataIndex:q.dataIndex})}),te.on("mouseout",te[l]=function(){D.dispatchAction({type:"unfocusNodeAdjacency",seriesId:m.id})}))});var Z=m.get("layout")==="circular"&&m.get("circular.rotateLabel"),X=V.getLayout("cx"),J=V.getLayout("cy");V.eachItemGraphicEl(function(q,te){var re=q.getSymbolPath();if(Z){var ie=V.getItemLayout(te),ne=Math.atan2(ie[1]-J,ie[0]-X);ne<0&&(ne=2*Math.PI+ne);var le=ie[0]<X;le&&(ne-=Math.PI);var fe=le?"left":"right";re.setStyle({textRotation:-ne,textPosition:fe,textOrigin:"center"}),re.hoverStyle&&(re.hoverStyle.textPosition=fe)}else re.setStyle({textRotation:0})}),this._firstRender=!1},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={}},focusNodeAdjacency:function(m,T,D,O){var N=this._model.getData().graph,z=O.dataIndex,H=O.edgeDataIndex,$=N.getNodeByIndex(z),V=N.getEdgeByIndex(H);($||V)&&(N.eachNode(function(P){h(P,w,.1)}),N.eachEdge(function(P){h(P,I,.1)}),$&&(c($,w),S.each($.edges,function(P){P.dataIndex<0||(c(P,I),c(P.node1,w),c(P.node2,w))})),V&&(c(V,I),c(V.node1,w),c(V.node2,w)))},unfocusNodeAdjacency:function(m,T,D,O){var N=this._model.getData().graph;N.eachNode(function(z){h(z,w)}),N.eachEdge(function(z){h(z,I)})},_startForceLayoutIteration:function(m,T){var D=this;(function O(){m.step(function(N){D.updateLayout(D._model),(D._layouting=!N)&&(T?D._layoutTimeout=setTimeout(O,16):O())})})()},_updateController:function(m,T,D){var O=this._controller,N=this._controllerHost,z=this.group;if(O.setPointerChecker(function(H,$,V){var P=z.getBoundingRect();return P.applyTransform(z.transform),P.contain($,V)&&!d(H,D,m)}),m.coordinateSystem.type!=="view")return void O.disable();O.enable(m.get("roam")),N.zoomLimit=m.get("scaleLimit"),N.zoom=m.coordinateSystem.getZoom(),O.off("pan").off("zoom").on("pan",function(H){y.updateViewOnPan(N,H.dx,H.dy),D.dispatchAction({seriesId:m.id,type:"graphRoam",dx:H.dx,dy:H.dy})}).on("zoom",function(H){y.updateViewOnZoom(N,H.scale,H.originX,H.originY),D.dispatchAction({seriesId:m.id,type:"graphRoam",zoom:H.scale,originX:H.originX,originY:H.originY}),this._updateNodeAndLinkScale(),b(m.getGraph(),this._getNodeGlobalScale(m)),this._lineDraw.updateLayout()},this)},_updateNodeAndLinkScale:function(){var m=this._model,T=m.getData(),D=this._getNodeGlobalScale(m),O=[D,D];T.eachItemGraphicEl(function(N,z){N.attr("scale",O)})},_getNodeGlobalScale:function(m){var T=m.coordinateSystem;if(T.type!=="view")return 1;var D=this._nodeScaleRatio,O=T.scale,N=O&&O[0]||1;return((T.getZoom()-1)*D+1)/N},updateLayout:function(m){b(m.getGraph(),this._getNodeGlobalScale(m)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},remove:function(m,T){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()}})},41147:function(E,A,u){var o=u(14141),S=u(76414),_=[],p=[],f=[],y=o.quadraticAt,d=S.distSquare,v=Math.abs;function b(s,l,w){for(var I,C=s[0],h=s[1],c=s[2],m=1/0,T=w*w,D=.1,O=.1;O<=.9;O+=.1){_[0]=y(C[0],h[0],c[0],O),_[1]=y(C[1],h[1],c[1],O);var N=v(d(_,l)-T);N<m&&(m=N,I=O)}for(var z=0;z<32;z++){var H=I+D;p[0]=y(C[0],h[0],c[0],I),p[1]=y(C[1],h[1],c[1],I),f[0]=y(C[0],h[0],c[0],H),f[1]=y(C[1],h[1],c[1],H);var N=d(p,l)-T;if(.01>v(N))break;var $=d(f,l)-T;D/=2,N<0?$>=0?I+=D:I-=D:$>=0?I-=D:I+=D}return I}E.exports=function(s,l){var w=[],I=o.quadraticSubdivide,C=[[],[],[]],h=[[],[]],c=[];function m(T){var D=T.getVisual("symbolSize");return D instanceof Array&&(D=(D[0]+D[1])/2),D}l/=2,s.eachEdge(function(T,D){var O=T.getLayout(),N=T.getVisual("fromSymbol"),z=T.getVisual("toSymbol");!O.__original&&(O.__original=[S.clone(O[0]),S.clone(O[1])],O[2]&&O.__original.push(S.clone(O[2])));var H=O.__original;if(O[2]!=null){if(S.copy(C[0],H[0]),S.copy(C[1],H[2]),S.copy(C[2],H[1]),N&&N!=="none"){var $=m(T.node1),V=b(C,H[0],$*l);I(C[0][0],C[1][0],C[2][0],V,w),C[0][0]=w[3],C[1][0]=w[4],I(C[0][1],C[1][1],C[2][1],V,w),C[0][1]=w[3],C[1][1]=w[4]}if(z&&z!=="none"){var $=m(T.node2),V=b(C,H[1],$*l);I(C[0][0],C[1][0],C[2][0],V,w),C[1][0]=w[1],C[2][0]=w[2],I(C[0][1],C[1][1],C[2][1],V,w),C[1][1]=w[1],C[2][1]=w[2]}S.copy(O[0],C[0]),S.copy(O[1],C[2]),S.copy(O[2],C[1])}else{if(S.copy(h[0],H[0]),S.copy(h[1],H[1]),S.sub(c,h[1],h[0]),S.normalize(c,c),N&&N!=="none"){var $=m(T.node1);S.scaleAndAdd(h[0],h[0],c,$*l)}if(z&&z!=="none"){var $=m(T.node2);S.scaleAndAdd(h[1],h[1],c,-$*l)}S.copy(O[0],h[0]),S.copy(O[1],h[1])}})}},6388:function(E){E.exports=function(A){var u=A.findComponents({mainType:"legend"});u&&u.length&&A.eachSeriesByType("graph",function(o){var S=o.getCategoriesData(),_=o.getGraph().data,p=S.mapArray(S.getName);_.filterSelf(function(f){var y=_.getItemModel(f).getShallow("category");if(y!=null){typeof y=="number"&&(y=p[y]);for(var d=0;d<u.length;d++)if(!u[d].isSelected(y))return!1}return!0})},this)}},17573:function(E){E.exports=function(A){var u={};A.eachSeriesByType("graph",function(o){var S=o.getCategoriesData(),_=o.getData(),p={};S.each(function(f){var y=S.getName(f);p["ec-"+y]=f;var d=S.getItemModel(f).get("itemStyle.color")||o.getColorFromPalette(y,u);S.setItemVisual(f,"color",d)}),S.count()&&_.each(function(f){var y=_.getItemModel(f).getShallow("category");y!=null&&(typeof y=="string"&&(y=p["ec-"+y]),_.getItemVisual(f,"color",!0)||_.setItemVisual(f,"color",S.getItemVisual(y,"color")))})})}},38375:function(E,A,u){var o=u(57899).circularLayout;E.exports=function(S){S.eachSeriesByType("graph",function(_){_.get("layout")==="circular"&&o(_)})}},57899:function(E,A,u){var o=u(76414);A.circularLayout=function(S){var _=S.coordinateSystem;if(!_||_.type==="view"){var p=_.getBoundingRect(),f=S.getData(),y=f.graph,d=0,v=f.getSum("value"),b=2*Math.PI/(v||f.count()),s=p.width/2+p.x,l=p.height/2+p.y,w=Math.min(p.width,p.height)/2;y.eachNode(function(I){var C=I.getValue("value");d+=b*(v?C:1)/2,I.setLayout([w*Math.cos(d)+s,w*Math.sin(d)+l]),d+=b*(v?C:1)/2}),f.setLayout({cx:s,cy:l}),y.eachEdge(function(I){var C,h=I.getModel().get("lineStyle.curveness")||0,c=o.clone(I.node1.getLayout()),m=o.clone(I.node2.getLayout()),T=(c[0]+m[0])/2,D=(c[1]+m[1])/2;+h&&(h*=3,C=[s*h+T*(1-h),l*h+D*(1-h)]),I.setLayout([c,m,C])})}}},96128:function(E,A,u){var o=u(42458),S=u(62751).getLayoutRect,_=u(6973);E.exports=function(p,f){var y=[];return p.eachSeriesByType("graph",function(d){var v=d.get("coordinateSystem");if(!v||v==="view"){var b,s=d.getData(),l=s.mapArray(function(N){var z=s.getItemModel(N);return[+z.get("x"),+z.get("y")]}),w=[],I=[];_.fromPoints(l,w,I),I[0]-w[0]==0&&(I[0]+=1,w[0]-=1),I[1]-w[1]==0&&(I[1]+=1,w[1]-=1);var C=(I[0]-w[0])/(I[1]-w[1]),h=((b=d.getBoxLayoutParams()).aspect=C,S(b,{width:f.getWidth(),height:f.getHeight()}));isNaN(C)&&(w=[h.x,h.y],I=[h.x+h.width,h.y+h.height]);var c=I[0]-w[0],m=I[1]-w[1],T=h.width,D=h.height,O=d.coordinateSystem=new o;O.zoomLimit=d.get("scaleLimit"),O.setBoundingRect(w[0],w[1],c,m),O.setViewRect(h.x,h.y,T,D),O.setCenter(d.get("center")),O.setZoom(d.get("zoom")),y.push(O)}}),y}},17183:function(E){function A(u){return u instanceof Array||(u=[u,u]),u}E.exports=function(u){u.eachSeriesByType("graph",function(o){var S=o.getGraph(),_=o.getEdgeData(),p=A(o.get("edgeSymbol")),f=A(o.get("edgeSymbolSize")),y="lineStyle.color".split("."),d="lineStyle.opacity".split(".");_.setVisual("fromSymbol",p&&p[0]),_.setVisual("toSymbol",p&&p[1]),_.setVisual("fromSymbolSize",f&&f[0]),_.setVisual("toSymbolSize",f&&f[1]),_.setVisual("color",o.get(y)),_.setVisual("opacity",o.get(d)),_.each(function(v){var b=_.getItemModel(v),s=S.getEdgeByIndex(v),l=A(b.getShallow("symbol",!0)),w=A(b.getShallow("symbolSize",!0)),I=b.get(y),C=b.get(d);switch(I){case"source":I=s.node1.getVisual("color");break;case"target":I=s.node2.getVisual("color")}l[0]&&s.setVisual("fromSymbol",l[0]),l[1]&&s.setVisual("toSymbol",l[1]),w[0]&&s.setVisual("fromSymbolSize",w[0]),w[1]&&s.setVisual("toSymbolSize",w[1]),s.setVisual("color",I),s.setVisual("opacity",C)})})}},87876:function(E,A,u){var o=u(76414),S=o.scaleAndAdd;A.forceLayout=function(_,p,f){for(var y=f.rect,d=y.width,v=y.height,b=[y.x+d/2,y.y+v/2],s=f.gravity==null?.1:f.gravity,l=0;l<_.length;l++){var w=_[l];w.p||(w.p=o.create(d*(Math.random()-.5)+b[0],v*(Math.random()-.5)+b[1])),w.pp=o.clone(w.p),w.edges=null}var I=.6;return{warmUp:function(){I=.5},setFixed:function(C){_[C].fixed=!0},setUnfixed:function(C){_[C].fixed=!1},step:function(C){for(var h=[],c=_.length,m=0;m<p.length;m++){var T=p[m],D=T.n1,O=T.n2;o.sub(h,O.p,D.p);var N=o.len(h)-T.d,z=O.w/(D.w+O.w);isNaN(z)&&(z=0),o.normalize(h,h),D.fixed||S(D.p,D.p,h,z*N*I),O.fixed||S(O.p,O.p,h,-(1-z)*N*I)}for(var m=0;m<c;m++){var H=_[m];H.fixed||(o.sub(h,b,H.p),S(H.p,H.p,h,s*I))}for(var m=0;m<c;m++)for(var D=_[m],$=m+1;$<c;$++){var O=_[$];o.sub(h,O.p,D.p);var N=o.len(h);N===0&&(o.set(h,Math.random()-.5,Math.random()-.5),N=1);var V=(D.rep+O.rep)/N/N;D.fixed||S(D.pp,D.pp,h,V),O.fixed||S(O.pp,O.pp,h,-V)}for(var P=[],m=0;m<c;m++){var H=_[m];H.fixed||(o.sub(P,H.p,H.pp),S(H.p,H.p,P,I),o.copy(H.pp,H.p))}I*=.992,C&&C(_,p,I<.01)}}}},49490:function(E,A,u){var o=u(87876).forceLayout,S=u(13021).simpleLayout,_=u(57899).circularLayout,p=u(54684).linearMap,f=u(76414),y=u(23405);E.exports=function(d){d.eachSeriesByType("graph",function(v){var b=v.coordinateSystem;if(!b||b.type==="view")if(v.get("layout")==="force"){var s=v.preservedPoints||{},l=v.getGraph(),w=l.data,I=l.edgeData,C=v.getModel("force"),h=C.get("initLayout");v.preservedPoints?w.each(function(V){var P=w.getId(V);w.setItemLayout(V,s[P]||[NaN,NaN])}):h&&h!=="none"?h==="circular"&&_(v):S(v);var c=w.getDataExtent("value"),m=I.getDataExtent("value"),T=C.get("repulsion"),D=C.get("edgeLength");y.isArray(T)||(T=[T,T]),y.isArray(D)||(D=[D,D]),D=[D[1],D[0]];var O=w.mapArray("value",function(V,P){var U=w.getItemLayout(P),Y=p(V,c,T);return isNaN(Y)&&(Y=(T[0]+T[1])/2),{w:Y,rep:Y,fixed:w.getItemModel(P).get("fixed"),p:!U||isNaN(U[0])||isNaN(U[1])?null:U}}),N=I.mapArray("value",function(V,P){var U=l.getEdgeByIndex(P),Y=p(V,m,D);return isNaN(Y)&&(Y=(D[0]+D[1])/2),{n1:O[U.node1.dataIndex],n2:O[U.node2.dataIndex],d:Y,curveness:U.getModel().get("lineStyle.curveness")||0}}),b=v.coordinateSystem,z=o(O,N,{rect:b.getBoundingRect(),gravity:C.get("gravity")}),H=z.step;z.step=function(V){for(var P=0,U=O.length;P<U;P++)O[P].fixed&&f.copy(O[P].p,l.getNodeByIndex(P).getLayout());H(function(Y,Z,X){for(var J=0,q=Y.length;J<q;J++)Y[J].fixed||l.getNodeByIndex(J).setLayout(Y[J].p),s[w.getId(J)]=Y[J].p;for(var J=0,q=Z.length;J<q;J++){var te=Z[J],re=l.getEdgeByIndex(J),ie=te.n1.p,ne=te.n2.p,le=re.getLayout();(le=le?le.slice():[])[0]=le[0]||[],le[1]=le[1]||[],f.copy(le[0],ie),f.copy(le[1],ne),+te.curveness&&(le[2]=[(ie[0]+ne[0])/2-(ie[1]-ne[1])*te.curveness,(ie[1]+ne[1])/2-(ne[0]-ie[0])*te.curveness]),re.setLayout(le)}V&&V(X)})},v.forceLayout=z,v.preservedPoints=s,z.step()}else v.forceLayout=null})}},34877:function(E,A,u){var o=u(87930),S=u(7207).updateCenterAndZoom;u(93191),o.registerAction({type:"graphRoam",event:"graphRoam",update:"none"},function(_,p){p.eachComponent({mainType:"series",query:_},function(f){var y=S(f.coordinateSystem,_);f.setCenter&&f.setCenter(y.center),f.setZoom&&f.setZoom(y.zoom)})})},86759:function(E,A,u){var o=u(23405).each,S=u(13021),_=S.simpleLayout,p=S.simpleLayoutEdge;E.exports=function(f,y){f.eachSeriesByType("graph",function(d){var v=d.get("layout"),b=d.coordinateSystem;if(b&&b.type!=="view"){var s=d.getData(),l=[];o(b.dimensions,function(m){l=l.concat(s.mapDimension(m,!0))});for(var w=0;w<s.count();w++){for(var I=[],C=!1,h=0;h<l.length;h++){var c=s.get(l[h],w);isNaN(c)||(C=!0),I.push(c)}C?s.setItemLayout(w,b.dataToPoint(I)):s.setItemLayout(w,[NaN,NaN])}p(s.graph)}else v&&v!=="none"||_(d)})}},13021:function(E,A,u){var o=u(76414);function S(_){_.eachEdge(function(p){var f=p.getModel().get("lineStyle.curveness")||0,y=o.clone(p.node1.getLayout()),d=o.clone(p.node2.getLayout()),v=[y,d];+f&&v.push([(y[0]+d[0])/2-(y[1]-d[1])*f,(y[1]+d[1])/2-(d[0]-y[0])*f]),p.setLayout(v)})}A.simpleLayout=function(_){var p=_.coordinateSystem;if(!p||p.type==="view"){var f=_.getGraph();f.eachNode(function(y){var d=y.getModel();y.setLayout([+d.get("x"),+d.get("y")])}),S(f)}},A.simpleLayoutEdge=S},67881:function(E,A,u){u(45227),u(41024)},80415:function(E,A,u){var o=u(23405);function S(){var _=o.createCanvas();this.canvas=_,this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={}}S.prototype={update:function(_,p,f,y,d,v){var b=this._getBrush(),s=this._getGradient(_,d,"inRange"),l=this._getGradient(_,d,"outOfRange"),w=this.pointSize+this.blurSize,I=this.canvas,C=I.getContext("2d"),h=_.length;I.width=p,I.height=f;for(var c=0;c<h;++c){var m=_[c],T=m[0],D=m[1],O=y(m[2]);C.globalAlpha=O,C.drawImage(b,T-w,D-w)}if(!I.width||!I.height)return I;for(var N=C.getImageData(0,0,I.width,I.height),z=N.data,H=0,$=z.length,V=this.minOpacity,P=this.maxOpacity-V;H<$;){var O=z[H+3]/256,U=4*Math.floor(255*O);if(O>0){var Y=v(O)?s:l;O>0&&(O=O*P+V),z[H++]=Y[U],z[H++]=Y[U+1],z[H++]=Y[U+2],z[H++]=Y[U+3]*O*256}else H+=4}return C.putImageData(N,0,0),I},_getBrush:function(){var _=this._brushCanvas||(this._brushCanvas=o.createCanvas()),p=this.pointSize+this.blurSize,f=2*p;_.width=f,_.height=f;var y=_.getContext("2d");return y.clearRect(0,0,f,f),y.shadowOffsetX=f,y.shadowBlur=this.blurSize,y.shadowColor="#000",y.beginPath(),y.arc(-p,p,this.pointSize,0,2*Math.PI,!0),y.closePath(),y.fill(),_},_getGradient:function(_,p,f){for(var y=this._gradientPixels,d=y[f]||(y[f]=new Uint8ClampedArray(1024)),v=[0,0,0,0],b=0,s=0;s<256;s++)p[f](s/255,!0,v),d[b++]=v[0],d[b++]=v[1],d[b++]=v[2],d[b++]=v[3];return d}},E.exports=S},45227:function(E,A,u){var o=u(95166),S=u(74107),_=u(17234);E.exports=o.extend({type:"series.heatmap",getInitialData:function(p,f){return S(this.getSource(),this,{generateCoord:"value"})},preventIncremental:function(){var p=_.get(this.get("coordinateSystem"));if(p&&p.dimensions)return p.dimensions[0]==="lng"&&p.dimensions[1]==="lat"},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0}})},41024:function(E,A,u){u(9129).__DEV__;var o=u(87930),S=u(51747),_=u(80415),p=u(23405);E.exports=o.extendChartView({type:"heatmap",render:function(f,y,d){y.eachComponent("visualMap",function(l){l.eachTargetSeries(function(w){w===f&&(b=l)})}),this.group.removeAll(),this._incrementalDisplayable=null;var v,b,s=f.coordinateSystem;s.type==="cartesian2d"||s.type==="calendar"?this._renderOnCartesianAndCalendar(f,d,0,f.getData().count()):(v=s.dimensions)[0]==="lng"&&v[1]==="lat"&&this._renderOnGeo(s,f,b,d)},incrementalPrepareRender:function(f,y,d){this.group.removeAll()},incrementalRender:function(f,y,d,v){y.coordinateSystem&&this._renderOnCartesianAndCalendar(y,v,f.start,f.end,!0)},_renderOnCartesianAndCalendar:function(f,y,d,v,b){var s=f.coordinateSystem;if(s.type==="cartesian2d"){var l=s.getAxis("x"),w=s.getAxis("y");P=l.getBandWidth(),U=w.getBandWidth()}for(var I=this.group,C=f.getData(),h="itemStyle",c="emphasis.itemStyle",m="label",T="emphasis.label",D=f.getModel(h).getItemStyle(["color"]),O=f.getModel(c).getItemStyle(),N=f.getModel(m),z=f.getModel(T),H=s.type,$=H==="cartesian2d"?[C.mapDimension("x"),C.mapDimension("y"),C.mapDimension("value")]:[C.mapDimension("time"),C.mapDimension("value")],V=d;V<v;V++){if(H==="cartesian2d"){if(isNaN(C.get($[2],V)))continue;var P,U,Y,Z=s.dataToPoint([C.get($[0],V),C.get($[1],V)]);Y=new S.Rect({shape:{x:Z[0]-P/2,y:Z[1]-U/2,width:P,height:U},style:{fill:C.getItemVisual(V,"color"),opacity:C.getItemVisual(V,"opacity")}})}else{if(isNaN(C.get($[1],V)))continue;Y=new S.Rect({z2:1,shape:s.dataToRect([C.get($[0],V)]).contentShape,style:{fill:C.getItemVisual(V,"color"),opacity:C.getItemVisual(V,"opacity")}})}var X=C.getItemModel(V);C.hasItemOption&&(D=X.getModel(h).getItemStyle(["color"]),O=X.getModel(c).getItemStyle(),N=X.getModel(m),z=X.getModel(T));var J=f.getRawValue(V),q="-";J&&J[2]!=null&&(q=J[2]),S.setLabelStyle(D,O,N,z,{labelFetcher:f,labelDataIndex:V,defaultText:q,isRectText:!0}),Y.setStyle(D),S.setHoverStyle(Y,C.hasItemOption?O:p.extend({},O)),Y.incremental=b,b&&(Y.useHoverLayer=!0),I.add(Y),C.setItemGraphicEl(V,Y)}},_renderOnGeo:function(f,y,d,v){var b,s,l,w,I,C,h,c=d.targetVisuals.inRange,m=d.targetVisuals.outOfRange,T=y.getData(),D=this._hmLayer||this._hmLayer||new _;D.blurSize=y.get("blurSize"),D.pointSize=y.get("pointSize"),D.minOpacity=y.get("minOpacity"),D.maxOpacity=y.get("maxOpacity");var O=f.getViewRect().clone(),N=f.getRoamTransform();O.applyTransform(N);var z=Math.max(O.x,0),H=Math.max(O.y,0),$=Math.min(O.width+O.x,v.getWidth()),V=Math.min(O.height+O.y,v.getHeight()),P=$-z,U=V-H,Y=[T.mapDimension("lng"),T.mapDimension("lat"),T.mapDimension("value")],Z=T.mapArray(Y,function(te,re,ie){var ne=f.dataToPoint([te,re]);return ne[0]-=z,ne[1]-=H,ne.push(ie),ne}),X=d.getExtent(),J=d.type==="visualMap.continuous"?(b=d.option.range,s=X[1]-X[0],b=[(b[0]-X[0])/s,(b[1]-X[0])/s],function(te){return te>=b[0]&&te<=b[1]}):(l=d.getPieceList(),w=d.option.selected,I=X[1]-X[0],C=(l=p.map(l,function(te){return{interval:[(te.interval[0]-X[0])/I,(te.interval[1]-X[0])/I]}})).length,h=0,function(te){for(var re=h;re<C;re++){var ie=l[re].interval;if(ie[0]<=te&&te<=ie[1]){h=re;break}}if(re===C)for(var re=h-1;re>=0;re--){var ie=l[re].interval;if(ie[0]<=te&&te<=ie[1]){h=re;break}}return re>=0&&re<C&&w[re]});D.update(Z,P,U,c.color.getNormalizer(),{inRange:c.color.getColorMapper(),outOfRange:m.color.getColorMapper()},J);var q=new S.Image({style:{width:P,height:U,x:z,y:H,image:D.canvas},silent:!0});this.group.add(q)},dispose:function(){}})},91413:function(E,A,u){var o=u(51747),S=u(36399),_=u(23405),p=u(30696).createSymbol,f=u(76414),y=u(14141);function d(b,s,l){o.Group.call(this),this.add(this.createLine(b,s,l)),this._updateEffectSymbol(b,s)}var v=d.prototype;v.createLine=function(b,s,l){return new S(b,s,l)},v._updateEffectSymbol=function(b,s){var l=b.getItemModel(s).getModel("effect"),w=l.get("symbolSize"),I=l.get("symbol");_.isArray(w)||(w=[w,w]);var C=l.get("color")||b.getItemVisual(s,"color"),h=this.childAt(1);this._symbolType!==I&&(this.remove(h),(h=p(I,-.5,-.5,1,1,C)).z2=100,h.culling=!0,this.add(h)),h&&(h.setStyle("shadowColor",C),h.setStyle(l.getItemStyle(["color"])),h.attr("scale",w),h.setColor(C),h.attr("scale",w),this._symbolType=I,this._updateEffectAnimation(b,l,s))},v._updateEffectAnimation=function(b,s,l){var w=this.childAt(1);if(w){var I=this,C=b.getItemLayout(l),h=1e3*s.get("period"),c=s.get("loop"),m=s.get("constantSpeed"),T=_.retrieve(s.get("delay"),function(z){return z/b.count()*h/3}),D=typeof T=="function";if(w.ignore=!0,this.updateAnimationPoints(w,C),m>0&&(h=this.getLineLength(w)/m*1e3),h!==this._period||c!==this._loop){w.stopAnimation();var O=T;D&&(O=T(l)),w.__t>0&&(O=-h*w.__t),w.__t=0;var N=w.animate("",c).when(h,{__t:1}).delay(O).during(function(){I.updateSymbolPosition(w)});c||N.done(function(){I.remove(w)}),N.start()}this._period=h,this._loop=c}},v.getLineLength=function(b){return f.dist(b.__p1,b.__cp1)+f.dist(b.__cp1,b.__p2)},v.updateAnimationPoints=function(b,s){b.__p1=s[0],b.__p2=s[1],b.__cp1=s[2]||[(s[0][0]+s[1][0])/2,(s[0][1]+s[1][1])/2]},v.updateData=function(b,s,l){this.childAt(0).updateData(b,s,l),this._updateEffectSymbol(b,s)},v.updateSymbolPosition=function(b){var s=b.__p1,l=b.__p2,w=b.__cp1,I=b.__t,C=b.position,h=y.quadraticAt,c=y.quadraticDerivativeAt;C[0]=h(s[0],w[0],l[0],I),C[1]=h(s[1],w[1],l[1],I);var m=c(s[0],w[0],l[0],I);b.rotation=-Math.atan2(c(s[1],w[1],l[1],I),m)-Math.PI/2,b.ignore=!1},v.updateLayout=function(b,s){this.childAt(0).updateLayout(b,s);var l=b.getItemModel(s).getModel("effect");this._updateEffectAnimation(b,l,s)},_.inherits(d,o.Group),E.exports=d},2095:function(E,A,u){var o=u(6137),S=u(23405),_=u(91413),p=u(76414);function f(d,v,b){_.call(this,d,v,b),this._lastFrame=0,this._lastFramePercent=0}var y=f.prototype;y.createLine=function(d,v,b){return new o(d,v,b)},y.updateAnimationPoints=function(d,v){this._points=v;for(var b=[0],s=0,l=1;l<v.length;l++){var w=v[l-1],I=v[l];s+=p.dist(w,I),b.push(s)}if(s!==0){for(var l=0;l<b.length;l++)b[l]/=s;this._offsets=b,this._length=s}},y.getLineLength=function(d){return this._length},y.updateSymbolPosition=function(d){var v,b=d.__t,s=this._points,l=this._offsets,w=s.length;if(l){var I=this._lastFrame;if(b<this._lastFramePercent){for(v=Math.min(I+1,w-1);v>=0&&!(l[v]<=b);v--);v=Math.min(v,w-2)}else{for(var v=I;v<w&&!(l[v]>b);v++);v=Math.min(v-1,w-2)}p.lerp(d.position,s[v],s[v+1],(b-l[v])/(l[v+1]-l[v]));var C=s[v+1][0]-s[v][0];d.rotation=-Math.atan2(s[v+1][1]-s[v][1],C)-Math.PI/2,this._lastFrame=v,this._lastFramePercent=b,d.ignore=!1}},S.inherits(f,_),E.exports=f},99939:function(E,A,u){var o=u(23405),S=u(30696).createSymbol,_=u(51747).Group,p=u(54684).parsePercent,f=u(59470);function y(b,s){b.eachChild(function(l){l.attr({z:s.z,zlevel:s.zlevel,style:{stroke:s.brushType==="stroke"?s.color:null,fill:s.brushType==="fill"?s.color:null}})})}function d(b,s){_.call(this);var l=new f(b,s),w=new _;this.add(l),this.add(w),w.beforeUpdate=function(){this.attr(l.getScale())},this.updateData(b,s)}var v=d.prototype;v.stopEffectAnimation=function(){this.childAt(1).removeAll()},v.startEffectAnimation=function(b){for(var s=b.symbolType,l=b.color,w=this.childAt(1),I=0;I<3;I++){var C=S(s,-1,-1,2,2,l);C.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scale:[.5,.5]});var h=-I/3*b.period+b.effectOffset;C.animate("",!0).when(b.period,{scale:[b.rippleScale/2,b.rippleScale/2]}).delay(h).start(),C.animateStyle(!0).when(b.period,{opacity:0}).delay(h).start(),w.add(C)}y(w,b)},v.updateEffectAnimation=function(b){for(var s=this._effectCfg,l=this.childAt(1),w=["symbolType","period","rippleScale"],I=0;I<w.length;I++){var C=w[I];if(s[C]!==b[C]){this.stopEffectAnimation(),this.startEffectAnimation(b);return}}y(l,b)},v.highlight=function(){this.trigger("emphasis")},v.downplay=function(){this.trigger("normal")},v.updateData=function(b,s){var l,w=b.hostModel;this.childAt(0).updateData(b,s);var I=this.childAt(1),C=b.getItemModel(s),h=b.getItemVisual(s,"symbol"),c=(l=b.getItemVisual(s,"symbolSize"),o.isArray(l)||(l=[+l,+l]),l),m=b.getItemVisual(s,"color");I.attr("scale",c),I.traverse(function($){$.attr({fill:m})});var T=C.getShallow("symbolOffset");if(T){var D=I.position;D[0]=p(T[0],c[0]),D[1]=p(T[1],c[1])}I.rotation=(C.getShallow("symbolRotate")||0)*Math.PI/180||0;var O={};if(O.showEffectOn=w.get("showEffectOn"),O.rippleScale=C.get("rippleEffect.scale"),O.brushType=C.get("rippleEffect.brushType"),O.period=1e3*C.get("rippleEffect.period"),O.effectOffset=s/b.count(),O.z=C.getShallow("z")||0,O.zlevel=C.getShallow("zlevel")||0,O.symbolType=h,O.color=m,this.off("mouseover").off("mouseout").off("emphasis").off("normal"),O.showEffectOn==="render")this._effectCfg?this.updateEffectAnimation(O):this.startEffectAnimation(O),this._effectCfg=O;else{this._effectCfg=null,this.stopEffectAnimation();var N=this.childAt(0),z=function(){N.highlight(),O.showEffectOn!=="render"&&this.startEffectAnimation(O)},H=function(){N.downplay(),O.showEffectOn!=="render"&&this.stopEffectAnimation()};this.on("mouseover",z,this).on("mouseout",H,this).on("emphasis",z,this).on("normal",H,this)}this._effectCfg=O},v.fadeOut=function(b){this.off("mouseover").off("mouseout").off("emphasis").off("normal"),b&&b()},o.inherits(d,_),E.exports=d},45738:function(E,A,u){var o=u(51747),S=u(95028),_=u(41814),p=u(87697),f=o.extendShape({shape:{polyline:!1,curveness:0,segs:[]},buildPath:function(v,b){var s=b.segs,l=b.curveness;if(b.polyline)for(var w=0;w<s.length;){var I=s[w++];if(I>0){v.moveTo(s[w++],s[w++]);for(var C=1;C<I;C++)v.lineTo(s[w++],s[w++])}}else for(var w=0;w<s.length;){var h=s[w++],c=s[w++],m=s[w++],T=s[w++];if(v.moveTo(h,c),l>0){var D=(h+m)/2-(c-T)*l,O=(c+T)/2-(m-h)*l;v.quadraticCurveTo(D,O,m,T)}else v.lineTo(m,T)}},findDataIndex:function(v,b){var s=this.shape,l=s.segs,w=s.curveness;if(s.polyline)for(var I=0,C=0;C<l.length;){var h=l[C++];if(h>0)for(var c=l[C++],m=l[C++],T=1;T<h;T++){var D=l[C++],O=l[C++];if(_.containStroke(c,m,D,O))return I}I++}else for(var I=0,C=0;C<l.length;){var c=l[C++],m=l[C++],D=l[C++],O=l[C++];if(w>0){var N=(c+D)/2-(m-O)*w,z=(m+O)/2-(D-c)*w;if(p.containStroke(c,m,N,z,D,O))return I}else if(_.containStroke(c,m,D,O))return I;I++}return-1}});function y(){this.group=new o.Group}var d=y.prototype;d.isPersistent=function(){return!this._incremental},d.updateData=function(v){this.group.removeAll();var b=new f({rectHover:!0,cursor:"default"});b.setShape({segs:v.getLayout("linesPoints")}),this._setCommon(b,v),this.group.add(b),this._incremental=null},d.incrementalPrepareUpdate=function(v){this.group.removeAll(),this._clearIncremental(),v.count()>5e5?(this._incremental||(this._incremental=new S({silent:!0})),this.group.add(this._incremental)):this._incremental=null},d.incrementalUpdate=function(v,b){var s=new f;s.setShape({segs:b.getLayout("linesPoints")}),this._setCommon(s,b,!!this._incremental),this._incremental?this._incremental.addDisplayable(s,!0):(s.rectHover=!0,s.cursor="default",s.__startIndex=v.start,this.group.add(s))},d.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},d._setCommon=function(v,b,s){var l=b.hostModel;v.setShape({polyline:l.get("polyline"),curveness:l.get("lineStyle.curveness")}),v.useStyle(l.getModel("lineStyle").getLineStyle()),v.style.strokeNoScale=!0;var w=b.getVisual("color");w&&v.setStyle("stroke",w),v.setStyle("fill"),s||(v.seriesIndex=l.seriesIndex,v.on("mousemove",function(I){v.dataIndex=null;var C=v.findDataIndex(I.offsetX,I.offsetY);C>0&&(v.dataIndex=C+v.__startIndex)}))},d._clearIncremental=function(){var v=this._incremental;v&&v.clearDisplaybles()},E.exports=y},72631:function(E,A,u){var o=u(51747),S=u(30696).createSymbol,_=u(95028),p=o.extendShape({shape:{points:null},symbolProxy:null,buildPath:function(d,v){var b=v.points,s=v.size,l=this.symbolProxy,w=l.shape;if(!((d.getContext?d.getContext():d)&&s[0]<4))for(var I=0;I<b.length;){var C=b[I++],h=b[I++];isNaN(C)||isNaN(h)||(w.x=C-s[0]/2,w.y=h-s[1]/2,w.width=s[0],w.height=s[1],l.buildPath(d,w,!0))}},afterBrush:function(d){var v=this.shape,b=v.points,s=v.size;if(s[0]<4){this.setTransform(d);for(var l=0;l<b.length;){var w=b[l++],I=b[l++];isNaN(w)||isNaN(I)||d.fillRect(w-s[0]/2,I-s[1]/2,s[0],s[1])}this.restoreTransform(d)}},findDataIndex:function(d,v){for(var b=this.shape,s=b.points,l=b.size,w=Math.max(l[0],4),I=Math.max(l[1],4),C=s.length/2-1;C>=0;C--){var h=2*C,c=s[h]-w/2,m=s[h+1]-I/2;if(d>=c&&v>=m&&d<=c+w&&v<=m+I)return C}return-1}});function f(){this.group=new o.Group}var y=f.prototype;y.isPersistent=function(){return!this._incremental},y.updateData=function(d){this.group.removeAll();var v=new p({rectHover:!0,cursor:"default"});v.setShape({points:d.getLayout("symbolPoints")}),this._setCommon(v,d),this.group.add(v),this._incremental=null},y.updateLayout=function(d){if(!this._incremental){var v=d.getLayout("symbolPoints");this.group.eachChild(function(b){if(b.startIndex!=null){var s=(b.endIndex-b.startIndex)*2,l=4*b.startIndex*2;v=new Float32Array(v.buffer,l,s)}b.setShape("points",v)})}},y.incrementalPrepareUpdate=function(d){this.group.removeAll(),this._clearIncremental(),d.count()>2e6?(this._incremental||(this._incremental=new _({silent:!0})),this.group.add(this._incremental)):this._incremental=null},y.incrementalUpdate=function(d,v){var b;this._incremental?(b=new p,this._incremental.addDisplayable(b,!0)):((b=new p({rectHover:!0,cursor:"default",startIndex:d.start,endIndex:d.end})).incremental=!0,this.group.add(b)),b.setShape({points:v.getLayout("symbolPoints")}),this._setCommon(b,v,!!this._incremental)},y._setCommon=function(d,v,b){var s=v.hostModel,l=v.getVisual("symbolSize");d.setShape("size",l instanceof Array?l:[l,l]),d.symbolProxy=S(v.getVisual("symbol"),0,0,0,0),d.setColor=d.symbolProxy.setColor;var w=d.shape.size[0]<4;d.useStyle(s.getModel("itemStyle").getItemStyle(w?["color","shadowBlur","shadowColor"]:["color"]));var I=v.getVisual("color");I&&d.setColor(I),b||(d.seriesIndex=s.seriesIndex,d.on("mousemove",function(C){d.dataIndex=null;var h=d.findDataIndex(C.offsetX,C.offsetY);h>=0&&(d.dataIndex=h+(d.startIndex||0))}))},y.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},y._clearIncremental=function(){var d=this._incremental;d&&d.clearDisplaybles()},E.exports=f},36399:function(E,A,u){var o=u(23405),S=u(76414),_=u(30696),p=u(70262),f=u(51747),y=u(54684).round,d=["fromSymbol","toSymbol"];function v(I){return"_"+I+"Type"}function b(I,C,h){var c=C.getItemVisual(h,"color"),m=C.getItemVisual(h,I),T=C.getItemVisual(h,I+"Size");if(m&&m!=="none"){o.isArray(T)||(T=[T,T]);var D=_.createSymbol(m,-T[0]/2,-T[1]/2,T[0],T[1],c);return D.name=I,D}}function s(I,C){var h=C[0],c=C[1],m=C[2];I.x1=h[0],I.y1=h[1],I.x2=c[0],I.y2=c[1],I.percent=1,m?(I.cpx1=m[0],I.cpy1=m[1]):(I.cpx1=NaN,I.cpy1=NaN)}function l(I,C,h){f.Group.call(this),this._createLine(I,C,h)}var w=l.prototype;w.beforeUpdate=function(){var I=this.childOfName("fromSymbol"),C=this.childOfName("toSymbol"),h=this.childOfName("label");if(I||C||!h.ignore){for(var c=1,m=this.parent;m;)m.scale&&(c/=m.scale[0]),m=m.parent;var T=this.childOfName("line");if(this.__dirty||T.__dirty){var D=T.shape.percent,O=T.pointAt(0),N=T.pointAt(D),z=S.sub([],N,O);if(S.normalize(z,z),I){I.attr("position",O);var H=T.tangentAt(0);I.attr("rotation",Math.PI/2-Math.atan2(H[1],H[0])),I.attr("scale",[c*D,c*D])}if(C){C.attr("position",N);var H=T.tangentAt(1);C.attr("rotation",-Math.PI/2-Math.atan2(H[1],H[0])),C.attr("scale",[c*D,c*D])}if(!h.ignore){h.attr("position",N);var $,V,P,U=5*c;if(h.__position==="end")$=[z[0]*U+N[0],z[1]*U+N[1]],V=z[0]>.8?"left":z[0]<-.8?"right":"center",P=z[1]>.8?"top":z[1]<-.8?"bottom":"middle";else if(h.__position==="middle"){var Y=D/2,H=T.tangentAt(Y),Z=[H[1],-H[0]],X=T.pointAt(Y);Z[1]>0&&(Z[0]=-Z[0],Z[1]=-Z[1]),$=[X[0]+Z[0]*U,X[1]+Z[1]*U],V="center",P="bottom";var J=-Math.atan2(H[1],H[0]);N[0]<O[0]&&(J=Math.PI+J),h.attr("rotation",J)}else $=[-z[0]*U+O[0],-z[1]*U+O[1]],V=z[0]>.8?"right":z[0]<-.8?"left":"center",P=z[1]>.8?"bottom":z[1]<-.8?"top":"middle";h.attr({style:{textVerticalAlign:h.__verticalAlign||P,textAlign:h.__textAlign||V},position:$,scale:[c,c]})}}}},w._createLine=function(I,C,h){var c,m,T=I.hostModel,D=(c=I.getItemLayout(C),s((m=new p({name:"line"})).shape,c),m);D.shape.percent=0,f.initProps(D,{shape:{percent:1}},T,C),this.add(D);var O=new f.Text({name:"label",lineLabelOriginalOpacity:1});this.add(O),o.each(d,function(N){var z=b(N,I,C);this.add(z),this[v(N)]=I.getItemVisual(C,N)},this),this._updateCommonStl(I,C,h)},w.updateData=function(I,C,h){var c=I.hostModel,m=this.childOfName("line"),T=I.getItemLayout(C),D={shape:{}};s(D.shape,T),f.updateProps(m,D,c,C),o.each(d,function(O){var N=I.getItemVisual(C,O),z=v(O);if(this[z]!==N){this.remove(this.childOfName(O));var H=b(O,I,C);this.add(H)}this[z]=N},this),this._updateCommonStl(I,C,h)},w._updateCommonStl=function(I,C,h){var c,m,T=I.hostModel,D=this.childOfName("line"),O=h&&h.lineStyle,N=h&&h.hoverLineStyle,z=h&&h.labelModel,H=h&&h.hoverLabelModel;if(!h||I.hasItemOption){var $=I.getItemModel(C);O=$.getModel("lineStyle").getLineStyle(),N=$.getModel("emphasis.lineStyle").getLineStyle(),z=$.getModel("label"),H=$.getModel("emphasis.label")}var V=I.getItemVisual(C,"color"),P=o.retrieve3(I.getItemVisual(C,"opacity"),O.opacity,1);D.useStyle(o.defaults({strokeNoScale:!0,fill:"none",stroke:V,opacity:P},O)),D.hoverStyle=N,o.each(d,function(re){var ie=this.childOfName(re);ie&&(ie.setColor(V),ie.setStyle({opacity:P}))},this);var U=z.getShallow("show"),Y=H.getShallow("show"),Z=this.childOfName("label");if((U||Y)&&(c=V||"#000",(m=T.getFormattedLabel(C,"normal",I.dataType))==null)){var X=T.getRawValue(C);m=X==null?I.getName(C):isFinite(X)?y(X):X}var J=U?m:null,q=Y?o.retrieve2(T.getFormattedLabel(C,"emphasis",I.dataType),m):null,te=Z.style;(J!=null||q!=null)&&(f.setTextStyle(Z.style,z,{text:J},{autoColor:c}),Z.__textAlign=te.textAlign,Z.__verticalAlign=te.textVerticalAlign,Z.__position=z.get("position")||"middle"),q!=null?Z.hoverStyle={text:q,textFill:H.getTextColor(!0),fontStyle:H.getShallow("fontStyle"),fontWeight:H.getShallow("fontWeight"),fontSize:H.getShallow("fontSize"),fontFamily:H.getShallow("fontFamily")}:Z.hoverStyle={text:null},Z.ignore=!U&&!Y,f.setHoverStyle(this)},w.highlight=function(){this.trigger("emphasis")},w.downplay=function(){this.trigger("normal")},w.updateLayout=function(I,C){this.setLinePoints(I.getItemLayout(C))},w.setLinePoints=function(I){var C=this.childOfName("line");s(C.shape,I),C.dirty()},o.inherits(l,f.Group),E.exports=l},61880:function(E,A,u){var o=u(51747),S=u(36399);function _(v){this._ctor=v||S,this.group=new o.Group}var p=_.prototype;function f(v){var b=v.hostModel;return{lineStyle:b.getModel("lineStyle").getLineStyle(),hoverLineStyle:b.getModel("emphasis.lineStyle").getLineStyle(),labelModel:b.getModel("label"),hoverLabelModel:b.getModel("emphasis.label")}}function y(v){return isNaN(v[0])||isNaN(v[1])}function d(v){return!y(v[0])&&!y(v[1])}p.isPersistent=function(){return!0},p.updateData=function(v){var b=this,s=b.group,l=b._lineData;b._lineData=v,l||s.removeAll();var w=f(v);v.diff(l).add(function(I){var C=b,h=v,c=I,m=w;if(d(h.getItemLayout(c))){var T=new C._ctor(h,c,m);h.setItemGraphicEl(c,T),C.group.add(T)}}).update(function(I,C){(function(h,c,m,T,D,O){var N=c.getItemGraphicEl(T);if(!d(m.getItemLayout(D)))return h.group.remove(N);N?N.updateData(m,D,O):N=new h._ctor(m,D,O),m.setItemGraphicEl(D,N),h.group.add(N)})(b,l,v,C,I,w)}).remove(function(I){s.remove(l.getItemGraphicEl(I))}).execute()},p.updateLayout=function(){var v=this._lineData;v&&v.eachItemGraphicEl(function(b,s){b.updateLayout(v,s)},this)},p.incrementalPrepareUpdate=function(v){this._seriesScope=f(v),this._lineData=null,this.group.removeAll()},p.incrementalUpdate=function(v,b){function s(I){I.isGroup||(I.incremental=I.useHoverLayer=!0)}for(var l=v.start;l<v.end;l++)if(d(b.getItemLayout(l))){var w=new this._ctor(b,l,this._seriesScope);w.traverse(s),this.group.add(w),b.setItemGraphicEl(l,w)}},p.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},p._clearIncremental=function(){var v=this._incremental;v&&v.clearDisplaybles()},E.exports=_},70262:function(E,A,u){var o=u(51747),S=u(76414),_=o.Line.prototype,p=o.BezierCurve.prototype;function f(y){return isNaN(+y.cpx1)||isNaN(+y.cpy1)}E.exports=o.extendShape({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(y,d){(f(d)?_:p).buildPath(y,d)},pointAt:function(y){return f(this.shape)?_.pointAt.call(this,y):p.pointAt.call(this,y)},tangentAt:function(y){var d=this.shape,v=f(d)?[d.x2-d.x1,d.y2-d.y1]:p.tangentAt.call(this,y);return S.normalize(v,v)}})},6137:function(E,A,u){var o=u(51747),S=u(23405);function _(f,y,d){o.Group.call(this),this._createPolyline(f,y,d)}var p=_.prototype;p._createPolyline=function(f,y,d){var v=f.getItemLayout(y),b=new o.Polyline({shape:{points:v}});this.add(b),this._updateCommonStl(f,y,d)},p.updateData=function(f,y,d){var v=f.hostModel,b=this.childAt(0),s={shape:{points:f.getItemLayout(y)}};o.updateProps(b,s,v,y),this._updateCommonStl(f,y,d)},p._updateCommonStl=function(f,y,d){var v=this.childAt(0),b=f.getItemModel(y),s=f.getItemVisual(y,"color"),l=d&&d.lineStyle,w=d&&d.hoverLineStyle;(!d||f.hasItemOption)&&(l=b.getModel("lineStyle").getLineStyle(),w=b.getModel("emphasis.lineStyle").getLineStyle()),v.useStyle(S.defaults({strokeNoScale:!0,fill:"none",stroke:s},l)),v.hoverStyle=w,o.setHoverStyle(this)},p.updateLayout=function(f,y){this.childAt(0).setShape("points",f.getItemLayout(y))},S.inherits(_,o.Group),E.exports=_},59470:function(E,A,u){var o=u(23405),S=u(30696).createSymbol,_=u(51747),p=u(54684).parsePercent,f=u(73444).getDefaultLabel;function y(D,O,N){_.Group.call(this),this.updateData(D,O,N)}var d=y.prototype,v=y.getSymbolSize=function(D,O){var N=D.getItemVisual(O,"symbolSize");return N instanceof Array?N.slice():[+N,+N]};function b(D){return[D[0]/2,D[1]/2]}function s(D,O){this.parent.drift(D,O)}d._createSymbol=function(D,O,N,z,H){this.removeAll();var $=S(D,-1,-1,2,2,O.getItemVisual(N,"color"),H);$.attr({z2:100,culling:!0,scale:b(z)}),$.drift=s,this._symbolType=D,this.add($)},d.stopSymbolAnimation=function(D){this.childAt(0).stopAnimation(D)},d.getSymbolPath=function(){return this.childAt(0)},d.getScale=function(){return this.childAt(0).scale},d.highlight=function(){this.childAt(0).trigger("emphasis")},d.downplay=function(){this.childAt(0).trigger("normal")},d.setZ=function(D,O){var N=this.childAt(0);N.zlevel=D,N.z=O},d.setDraggable=function(D){var O=this.childAt(0);O.draggable=D,O.cursor=D?"move":"pointer"},d.updateData=function(D,O,N){this.silent=!1;var z=D.getItemVisual(O,"symbol")||"circle",H=D.hostModel,$=v(D,O),V=z!==this._symbolType;if(V){var P=D.getItemVisual(O,"symbolKeepAspect");this._createSymbol(z,D,O,$,P)}else{var U=this.childAt(0);U.silent=!1,_.updateProps(U,{scale:b($)},H,O)}if(this._updateCommon(D,O,$,N),V){var U=this.childAt(0),Y=N&&N.fadeIn,Z={scale:U.scale.slice()};Y&&(Z.style={opacity:U.style.opacity}),U.scale=[0,0],Y&&(U.style.opacity=0),_.initProps(U,Z,H,O)}this._seriesModel=H};var l=["itemStyle"],w=["emphasis","itemStyle"],I=["label"],C=["emphasis","label"];function h(){_.isInEmphasis(this)||m.call(this)}function c(){_.isInEmphasis(this)||T.call(this)}function m(){if(!this.incremental&&!this.useHoverLayer){var D=this.__symbolOriginalScale,O=D[1]/D[0];this.animateTo({scale:[Math.max(1.1*D[0],D[0]+3),Math.max(1.1*D[1],D[1]+3*O)]},400,"elasticOut")}}function T(){this.incremental||this.useHoverLayer||this.animateTo({scale:this.__symbolOriginalScale},400,"elasticOut")}d._updateCommon=function(D,O,N,z){var H=this.childAt(0),$=D.hostModel,V=D.getItemVisual(O,"color");H.type!=="image"&&H.useStyle({strokeNoScale:!0});var P=z&&z.itemStyle,U=z&&z.hoverItemStyle,Y=z&&z.symbolRotate,Z=z&&z.symbolOffset,X=z&&z.labelModel,J=z&&z.hoverLabelModel,q=z&&z.hoverAnimation,te=z&&z.cursorStyle;if(!z||D.hasItemOption){var re=z&&z.itemModel?z.itemModel:D.getItemModel(O);P=re.getModel(l).getItemStyle(["color"]),U=re.getModel(w).getItemStyle(),Y=re.getShallow("symbolRotate"),Z=re.getShallow("symbolOffset"),X=re.getModel(I),J=re.getModel(C),q=re.getShallow("hoverAnimation"),te=re.getShallow("cursor")}else U=o.extend({},U);var ie=H.style;H.attr("rotation",(Y||0)*Math.PI/180||0),Z&&H.attr("position",[p(Z[0],N[0]),p(Z[1],N[1])]),te&&H.attr("cursor",te),H.setColor(V,z&&z.symbolInnerColor),H.setStyle(P);var ne=D.getItemVisual(O,"opacity");ne!=null&&(ie.opacity=ne);var le=D.getItemVisual(O,"liftZ"),fe=H.__z2Origin;le!=null?fe==null&&(H.__z2Origin=H.z2,H.z2+=le):fe!=null&&(H.z2=fe,H.__z2Origin=null);var we=z&&z.useNameLabel;_.setLabelStyle(ie,U,X,J,{labelFetcher:$,labelDataIndex:O,defaultText:function(pe,ve){return we?D.getName(pe):f(D,pe)},isRectText:!0,autoColor:V}),H.off("mouseover").off("mouseout").off("emphasis").off("normal"),H.hoverStyle=U,_.setHoverStyle(H),H.__symbolOriginalScale=b(N),q&&$.isAnimationEnabled()&&H.on("mouseover",h).on("mouseout",c).on("emphasis",m).on("normal",T)},d.fadeOut=function(D,O){var N=this.childAt(0);this.silent=N.silent=!0,O&&O.keepLabel||(N.style.text=null),_.updateProps(N,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,D)},o.inherits(y,_.Group),E.exports=y},83522:function(E,A,u){var o=u(51747),S=u(59470),_=u(23405).isObject;function p(b){this.group=new o.Group,this._symbolCtor=b||S}var f=p.prototype;function y(b,s,l,w){return s&&!isNaN(s[0])&&!isNaN(s[1])&&!(w.isIgnore&&w.isIgnore(l))&&!(w.clipShape&&!w.clipShape.contain(s[0],s[1]))&&b.getItemVisual(l,"symbol")!=="none"}function d(b){return b==null||_(b)||(b={isIgnore:b}),b||{}}function v(b){var s=b.hostModel;return{itemStyle:s.getModel("itemStyle").getItemStyle(["color"]),hoverItemStyle:s.getModel("emphasis.itemStyle").getItemStyle(),symbolRotate:s.get("symbolRotate"),symbolOffset:s.get("symbolOffset"),hoverAnimation:s.get("hoverAnimation"),labelModel:s.getModel("label"),hoverLabelModel:s.getModel("emphasis.label"),cursorStyle:s.get("cursor")}}f.updateData=function(b,s){s=d(s);var l=this.group,w=b.hostModel,I=this._data,C=this._symbolCtor,h=v(b);I||l.removeAll(),b.diff(I).add(function(c){var m=b.getItemLayout(c);if(y(b,m,c,s)){var T=new C(b,c,h);T.attr("position",m),b.setItemGraphicEl(c,T),l.add(T)}}).update(function(c,m){var T=I.getItemGraphicEl(m),D=b.getItemLayout(c);if(!y(b,D,c,s))return void l.remove(T);T?(T.updateData(b,c,h),o.updateProps(T,{position:D},w)):(T=new C(b,c)).attr("position",D),l.add(T),b.setItemGraphicEl(c,T)}).remove(function(c){var m=I.getItemGraphicEl(c);m&&m.fadeOut(function(){l.remove(m)})}).execute(),this._data=b},f.isPersistent=function(){return!0},f.updateLayout=function(){var b=this._data;b&&b.eachItemGraphicEl(function(s,l){var w=b.getItemLayout(l);s.attr("position",w)})},f.incrementalPrepareUpdate=function(b){this._seriesScope=v(b),this._data=null,this.group.removeAll()},f.incrementalUpdate=function(b,s,l){function w(c){c.isGroup||(c.incremental=c.useHoverLayer=!0)}l=d(l);for(var I=b.start;I<b.end;I++){var C=s.getItemLayout(I);if(y(s,C,I,l)){var h=new this._symbolCtor(s,I,this._seriesScope);h.traverse(w),h.attr("position",C),this.group.add(h),s.setItemGraphicEl(I,h)}}},f.remove=function(b){var s=this.group,l=this._data;l&&b?l.eachItemGraphicEl(function(w){w.fadeOut(function(){s.remove(w)})}):s.removeAll()},E.exports=p},64330:function(E,A,u){var o=u(23405),S=u(80023),_=u(58772),p=u(82576),f=u(61554),y=u(17234),d=u(74107);E.exports=function(v,b,s,l,w){for(var I,C=new _(l),h=0;h<v.length;h++)C.addNode(o.retrieve(v[h].id,v[h].name,h),h);for(var c=[],m=[],T=0,h=0;h<b.length;h++){var D=b[h],O=D.source,N=D.target;C.addEdge(O,N,T)&&(m.push(D),c.push(o.retrieve(D.id,O+" > "+N)),T++)}var z=s.get("coordinateSystem");if(z==="cartesian2d"||z==="polar")I=d(v,s);else{var H=y.get(z),$=H&&H.type!=="view"&&H.dimensions||[];0>o.indexOf($,"value")&&$.concat(["value"]),(I=new S(f(v,{coordDimensions:$}),s)).initData(v)}var V=new S(["value"],s);return V.initData(m,c),w&&w(I,V),p({mainData:I,struct:C,structAttr:"graph",datas:{node:I,edge:V},datasAttr:{node:"data",edge:"edgeData"}}),C.update(),C}},74107:function(E,A,u){var o=u(23405),S=u(80023),_=u(61554),p=u(24659).SOURCE_FORMAT_ORIGINAL,f=u(30186).getDimensionTypeByAxis,y=u(51064).getDataItemValue,d=u(17234),v=u(83813).getCoordSysDefineBySeries,b=u(42480),s=u(91968).enableDataStack;E.exports=function(l,w,I){I=I||{},b.isInstance(l)||(l=b.seriesDataToSource(l));var C,h,c,m=w.get("coordinateSystem"),T=d.get(m),D=v(w);D&&(C=o.map(D.coordSysDims,function($){var V={name:$},P=D.axisMap.get($);return P&&(V.type=f(P.get("type"))),V})),C||(C=T&&(T.getDimensionsInfo?T.getDimensionsInfo():T.dimensions.slice())||["x","y"]);var O=_(l,{coordDimensions:C,generateCoord:I.generateCoord});D&&o.each(O,function($,V){var P=$.coordDim,U=D.categoryAxisMap.get(P);U&&(h==null&&(h=V),$.ordinalMeta=U.getOrdinalMeta()),$.otherDims.itemName!=null&&(c=!0)}),c||h==null||(O[h].otherDims.itemName=0);var N=s(w,O),z=new S(O,w);z.setCalculationInfo(N);var H=h!=null&&function($){if($.sourceFormat===p){var V=function(P){for(var U=0;U<P.length&&P[U]==null;)U++;return P[U]}($.data||[]);return V!=null&&!o.isArray(y(V))}}(l)?function($,V,P,U){return U===h?P:this.defaultDimValueGetter($,V,P,U)}:null;return z.hasItemOption=!1,z.initData(l,null,H),z}},59644:function(E,A,u){var o=u(61554),S=u(80023),_=u(23405),p=_.extend,f=_.isArray;E.exports=function(y,d,v){d=f(d)&&{coordDimensions:d}||p({},d);var b=y.getSource(),s=new S(o(b,d),y);return s.initData(b,v),s}},52227:function(E,A,u){var o=u(51064).makeInner;E.exports=function(){var S=o();return function(_){var p=S(_),f=_.pipelineContext,y=p.large,d=p.progressiveRender,v=p.large=f.large,b=p.progressiveRender=f.progressiveRender;return!!(y^v||d^b)&&"reset"}}},93191:function(E,A,u){var o=u(87930);o.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},function(){}),o.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},function(){})},73444:function(E,A,u){var o=u(45435).retrieveRawValue;A.getDefaultLabel=function(S,_){var p=S.mapDimension("defaultedLabel",!0),f=p.length;if(f===1)return o(S,_,p[0]);if(f){for(var y=[],d=0;d<p.length;d++){var v=o(S,_,p[d]);y.push(v)}return y.join(" ")}}},75445:function(E,A,u){var o=u(23405);function S(_){for(var p=[];_;)(_=_.parentNode)&&p.push(_);return p.reverse()}A.retrieveTargetInfo=function(_,p,f){if(_&&o.indexOf(p,_.type)>=0){var y=f.getData().tree.root,d=_.targetNode;if(typeof d=="string"&&(d=y.getNodeById(d)),d&&y.contains(d))return{node:d};var v=_.targetNodeId;if(v!=null&&(d=y.getNodeById(v)))return{node:d}}},A.getPathToRoot=S,A.aboveViewRoot=function(_,p){var f=S(_);return o.indexOf(f,p)>=0},A.wrapTreePathInfo=function(_,p){for(var f=[];_;){var y=_.dataIndex;f.push({name:_.name,dataIndex:y,value:p.getRawValue(y)}),_=_.parentNode}return f.reverse(),f}},67783:function(E,A,u){var o=u(59644),S=u(23405),_=u(30186).getDimensionTypeByAxis;A.seriesModelMixin={_baseAxisDim:null,getInitialData:function(p,f){var y,d,v=f.getComponent("xAxis",this.get("xAxisIndex")),b=f.getComponent("yAxis",this.get("yAxisIndex")),s=v.get("type"),l=b.get("type");s==="category"?(p.layout="horizontal",y=v.getOrdinalMeta(),d=!0):l==="category"?(p.layout="vertical",y=b.getOrdinalMeta(),d=!0):p.layout=p.layout||"horizontal";var w=["x","y"],I=+(p.layout!=="horizontal"),C=this._baseAxisDim=w[I],h=w[1-I],c=[v,b],m=c[I].get("type"),T=c[1-I].get("type"),D=p.data;if(D&&d){var O=[];S.each(D,function(z,H){var $;z.value&&S.isArray(z.value)?($=z.value.slice(),z.value.unshift(H)):S.isArray(z)?($=z.slice(),z.unshift(H)):$=z,O.push($)}),p.data=O}var N=this.defaultValueDimensions;return o(this,{coordDimensions:[{name:C,type:_(m),ordinalMeta:y,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:h,type:_(T),dimsDef:N.slice()}],dimensionsCount:N.length+1})},getBaseAxis:function(){var p=this._baseAxisDim;return this.ecModel.getComponent(p+"Axis",this.get(p+"AxisIndex")).axis}}},5921:function(E,A,u){var o=u(87930);u(85489),u(21123);var S=u(53414),_=u(21188),p=u(29772);u(97035),o.registerVisual(S("line","circle","line")),o.registerLayout(_("line")),o.registerProcessor(o.PRIORITY.PROCESSOR.STATISTIC,p("line"))},85489:function(E,A,u){u(9129).__DEV__;var o=u(74107);E.exports=u(95166).extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(S,_){return o(this.getSource(),this)},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,clipOverflow:!0,label:{position:"top"},lineStyle:{width:2,type:"solid"},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0}})},21123:function(E,A,u){u(9129).__DEV__;var o=u(23405),S=u(83522),_=u(59470),p=u(13386),f=u(51747),y=u(51064),d=u(10930),v=d.Polyline,b=d.Polygon,s=u(4695),l=u(54684).round,w=u(89995),I=w.prepareDataCoordInfo,C=w.getStackedOnPoint;function h(O,N){if(O.length===N.length){for(var z=0;z<O.length;z++){var H=O[z],$=N[z];if(H[0]!==$[0]||H[1]!==$[1])return}return!0}}function c(O){return typeof O=="number"?O:.5*!!O}function m(O){var N=O.getGlobalExtent();if(O.onBand){var z=O.getBandWidth()/2-1,H=N[1]>N[0]?1:-1;N[0]+=H*z,N[1]-=H*z}return N}function T(O,N,z,H){var $,V,P,U,Y;return O.type==="polar"?($=O.getAngleAxis(),(V=O.getRadiusAxis().getExtent().slice())[0]>V[1]&&V.reverse(),P=$.getExtent(),U=Math.PI/180,z&&(V[0]-=.5,V[1]+=.5),Y=new f.Sector({shape:{cx:l(O.cx,1),cy:l(O.cy,1),r0:l(V[0],1),r:l(V[1],1),startAngle:-P[0]*U,endAngle:-P[1]*U,clockwise:$.inverse}}),N&&(Y.shape.endAngle=-P[0]*U,f.initProps(Y,{shape:{endAngle:-P[1]*U}},H)),Y):function(Z,X,J,q){var te=m(Z.getAxis("x")),re=m(Z.getAxis("y")),ie=Z.getBaseAxis().isHorizontal(),ne=Math.min(te[0],te[1]),le=Math.min(re[0],re[1]),fe=Math.max(te[0],te[1])-ne,we=Math.max(re[0],re[1])-le;if(J)ne-=.5,fe+=.5,le-=.5,we+=.5;else{var pe=q.get("lineStyle.width")||2,ve=q.get("clipOverflow")?pe/2:Math.max(fe,we);ie?(le-=ve,we+=2*ve):(ne-=ve,fe+=2*ve)}var be=new f.Rect({shape:{x:ne,y:le,width:fe,height:we}});return X&&(be.shape[ie?"width":"height"]=0,f.initProps(be,{shape:{width:fe,height:we}},q)),be}(O,N,z,H)}function D(O,N,z){for(var H=N.getBaseAxis(),$=+(H.dim!=="x"&&H.dim!=="radius"),V=[],P=0;P<O.length-1;P++){var U=O[P+1],Y=O[P];V.push(Y);var Z=[];switch(z){case"end":Z[$]=U[$],Z[1-$]=Y[1-$],V.push(Z);break;case"middle":var X=(Y[$]+U[$])/2,J=[];Z[$]=J[$]=X,Z[1-$]=Y[1-$],J[1-$]=U[1-$],V.push(Z),V.push(J);break;default:Z[$]=Y[$],Z[1-$]=U[1-$],V.push(Z)}}return O[P]&&V.push(O[P]),V}E.exports=s.extend({type:"line",init:function(){var O=new f.Group,N=new S;this.group.add(N.group),this._symbolDraw=N,this._lineGroup=O},render:function(O,N,z){var H=O.coordinateSystem,$=this.group,V=O.getData(),P=O.getModel("lineStyle"),U=O.getModel("areaStyle"),Y=V.mapArray(V.getItemLayout),Z=H.type==="polar",X=this._coordSys,J=this._symbolDraw,q=this._polyline,te=this._polygon,re=this._lineGroup,ie=O.get("animation"),ne=!U.isEmpty(),le=U.get("origin"),fe=I(H,V,le),we=function(Ie,_e,Ae){if(!Ae.valueDim)return[];for(var ue=[],ke=0,Pe=_e.count();ke<Pe;ke++)ue.push(C(Ae,Ie,_e,ke));return ue}(H,V,fe),pe=O.get("showSymbol"),ve=pe&&!Z&&function(Ie,_e,Ae){var ue=Ie.get("showAllSymbol"),ke=ue==="auto";if(!ue||ke){var Pe=Ae.getAxesByScale("ordinal")[0];if(Pe&&!(ke&&function(it,rt){var mt=it.getExtent(),yt=Math.abs(mt[1]-mt[0])/it.scale.count();isNaN(yt)&&(yt=0);for(var st=rt.count(),Qe=Math.max(1,Math.round(st/5)),At=0;At<st;At+=Qe)if(1.5*_.getSymbolSize(rt,At)[+!!it.isHorizontal()]>yt)return!1;return!0}(Pe,_e))){var Ve=_e.mapDimension(Pe.dim),je={};return o.each(Pe.getViewLabels(),function(it){je[it.tickValue]=1}),function(it){return!je.hasOwnProperty(_e.get(Ve,it))}}}}(O,V,H),be=this._data;be&&be.eachItemGraphicEl(function(Ie,_e){Ie.__temp&&($.remove(Ie),be.setItemGraphicEl(_e,null))}),pe||J.remove(),$.add(re);var Ee=!Z&&O.get("step");q&&X.type===H.type&&Ee===this._step?(ne&&!te?te=this._newPolygon(Y,we,H,ie):te&&!ne&&(re.remove(te),te=this._polygon=null),re.setClipPath(T(H,!1,!1,O)),pe&&J.updateData(V,{isIgnore:ve,clipShape:T(H,!1,!0,O)}),V.eachItemGraphicEl(function(Ie){Ie.stopAnimation(!0)}),h(this._stackedOnPoints,we)&&h(this._points,Y)||(ie?this._updateAnimation(V,we,H,z,Ee,le):(Ee&&(Y=D(Y,H,Ee),we=D(we,H,Ee)),q.setShape({points:Y}),te&&te.setShape({points:Y,stackedOnPoints:we})))):(pe&&J.updateData(V,{isIgnore:ve,clipShape:T(H,!1,!0,O)}),Ee&&(Y=D(Y,H,Ee),we=D(we,H,Ee)),q=this._newPolyline(Y,H,ie),ne&&(te=this._newPolygon(Y,we,H,ie)),re.setClipPath(T(H,!0,!1,O)));var Re=function(Ie,_e){var Ae,ue,ke=Ie.getVisual("visualMeta");if(ke&&ke.length&&Ie.count()&&_e.type==="cartesian2d"){for(var Pe=ke.length-1;Pe>=0;Pe--){var Ve=ke[Pe].dimension,je=Ie.dimensions[Ve],it=Ie.getDimensionInfo(je);if((Ae=it&&it.coordDim)==="x"||Ae==="y"){ue=ke[Pe];break}}if(ue){var rt=_e.getAxis(Ae),mt=o.map(ue.stops,function(Sn){return{coord:rt.toGlobalCoord(rt.dataToCoord(Sn.value)),color:Sn.color}}),yt=mt.length,st=ue.outerColors.slice();yt&&mt[0].coord>mt[yt-1].coord&&(mt.reverse(),st.reverse());var Qe=mt[0].coord-10,At=mt[yt-1].coord+10,Xt=At-Qe;if(Xt<.001)return"transparent";o.each(mt,function(Sn){Sn.offset=(Sn.coord-Qe)/Xt}),mt.push({offset:yt?mt[yt-1].offset:.5,color:st[1]||"transparent"}),mt.unshift({offset:yt?mt[0].offset:.5,color:st[0]||"transparent"});var cn=new f.LinearGradient(0,0,0,0,mt,!0);return cn[Ae]=Qe,cn[Ae+"2"]=At,cn}}}(V,H)||V.getVisual("color");q.useStyle(o.defaults(P.getLineStyle(),{fill:"none",stroke:Re,lineJoin:"bevel"}));var Ne=O.get("smooth");if(Ne=c(O.get("smooth")),q.setShape({smooth:Ne,smoothMonotone:O.get("smoothMonotone"),connectNulls:O.get("connectNulls")}),te){var Le=V.getCalculationInfo("stackedOnSeries"),Se=0;te.useStyle(o.defaults(U.getAreaStyle(),{fill:Re,opacity:.7,lineJoin:"bevel"})),Le&&(Se=c(Le.get("smooth"))),te.setShape({smooth:Ne,stackedOnSmooth:Se,smoothMonotone:O.get("smoothMonotone"),connectNulls:O.get("connectNulls")})}this._data=V,this._coordSys=H,this._stackedOnPoints=we,this._points=Y,this._step=Ee,this._valueOrigin=le},dispose:function(){},highlight:function(O,N,z,H){var $=O.getData(),V=y.queryDataIndex($,H);if(V instanceof Array||V==null||!(V>=0))s.prototype.highlight.call(this,O,N,z,H);else{var P=$.getItemGraphicEl(V);if(!P){var U=$.getItemLayout(V);if(!U)return;(P=new _($,V)).position=U,P.setZ(O.get("zlevel"),O.get("z")),P.ignore=isNaN(U[0])||isNaN(U[1]),P.__temp=!0,$.setItemGraphicEl(V,P),P.stopSymbolAnimation(!0),this.group.add(P)}P.highlight()}},downplay:function(O,N,z,H){var $=O.getData(),V=y.queryDataIndex($,H);if(V!=null&&V>=0){var P=$.getItemGraphicEl(V);P&&(P.__temp?($.setItemGraphicEl(V,null),this.group.remove(P)):P.downplay())}else s.prototype.downplay.call(this,O,N,z,H)},_newPolyline:function(O){var N=this._polyline;return N&&this._lineGroup.remove(N),N=new v({shape:{points:O},silent:!0,z2:10}),this._lineGroup.add(N),this._polyline=N,N},_newPolygon:function(O,N){var z=this._polygon;return z&&this._lineGroup.remove(z),z=new b({shape:{points:O,stackedOnPoints:N},silent:!0}),this._lineGroup.add(z),this._polygon=z,z},_updateAnimation:function(O,N,z,H,$,V){var P=this._polyline,U=this._polygon,Y=O.hostModel,Z=p(this._data,O,this._stackedOnPoints,N,this._coordSys,z,this._valueOrigin,V),X=Z.current,J=Z.stackedOnCurrent,q=Z.next,te=Z.stackedOnNext;$&&(X=D(Z.current,z,$),J=D(Z.stackedOnCurrent,z,$),q=D(Z.next,z,$),te=D(Z.stackedOnNext,z,$)),P.shape.__points=Z.current,P.shape.points=X,f.updateProps(P,{shape:{points:q}},Y),U&&(U.setShape({points:X,stackedOnPoints:J}),f.updateProps(U,{shape:{points:q,stackedOnPoints:te}},Y));for(var re=[],ie=Z.status,ne=0;ne<ie.length;ne++)if(ie[ne].cmd==="="){var le=O.getItemGraphicEl(ie[ne].idx1);le&&re.push({el:le,ptIdx:ne})}P.animators&&P.animators.length&&P.animators[0].during(function(){for(var fe=0;fe<re.length;fe++)re[fe].el.attr("position",P.shape.__points[re[fe].ptIdx])})},remove:function(O){var N=this.group,z=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),z&&z.eachItemGraphicEl(function(H,$){H.__temp&&(N.remove(H),z.setItemGraphicEl($,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._data=null}})},89995:function(E,A,u){var o=u(91968).isDimensionStacked,S=u(23405).map;A.prepareDataCoordInfo=function(_,p,f){var y,d,v,b,s,l=_.getBaseAxis(),w=_.getOtherAxis(l),I=(y=w,d=f,v=0,b=y.scale.getExtent(),d==="start"?v=b[0]:d==="end"?v=b[1]:b[0]>0?v=b[0]:b[1]<0&&(v=b[1]),v),C=l.dim,h=w.dim,c=p.mapDimension(h),m=p.mapDimension(C),T=+(h==="x"||h==="radius"),D=S(_.dimensions,function(N){return p.mapDimension(N)}),O=p.getCalculationInfo("stackResultDimension");return(s|=o(p,D[0]))&&(D[0]=O),(s|=o(p,D[1]))&&(D[1]=O),{dataDimsForPoint:D,valueStart:I,valueAxisDim:h,baseAxisDim:C,stacked:!!s,valueDim:c,baseDim:m,baseDataOffset:T,stackedOverDimension:p.getCalculationInfo("stackedOverDimension")}},A.getStackedOnPoint=function(_,p,f,y){var d=NaN;_.stacked&&(d=f.get(f.getCalculationInfo("stackedOverDimension"),y)),isNaN(d)&&(d=_.valueStart);var v=_.baseDataOffset,b=[];return b[v]=f.get(_.baseDim,y),b[1-v]=d,p.dataToPoint(b)}},13386:function(E,A,u){var o=u(89995),S=o.prepareDataCoordInfo,_=o.getStackedOnPoint;E.exports=function(p,f,y,d,v,b,s,l){for(var w,I=(w=[],f.diff(p).add(function(ie){w.push({cmd:"+",idx:ie})}).update(function(ie,ne){w.push({cmd:"=",idx:ne,idx1:ie})}).remove(function(ie){w.push({cmd:"-",idx:ie})}).execute(),w),C=[],h=[],c=[],m=[],T=[],D=[],O=[],N=S(v,f,s),z=S(b,p,l),H=0;H<I.length;H++){var $=I[H],V=!0;switch($.cmd){case"=":var P=p.getItemLayout($.idx),U=f.getItemLayout($.idx1);(isNaN(P[0])||isNaN(P[1]))&&(P=U.slice()),C.push(P),h.push(U),c.push(y[$.idx]),m.push(d[$.idx1]),O.push(f.getRawIndex($.idx1));break;case"+":var Y=$.idx;C.push(v.dataToPoint([f.get(N.dataDimsForPoint[0],Y),f.get(N.dataDimsForPoint[1],Y)])),h.push(f.getItemLayout(Y).slice()),c.push(_(N,v,f,Y)),m.push(d[Y]),O.push(f.getRawIndex(Y));break;case"-":var Y=$.idx,Z=p.getRawIndex(Y);Z!==Y?(C.push(p.getItemLayout(Y)),h.push(b.dataToPoint([p.get(z.dataDimsForPoint[0],Y),p.get(z.dataDimsForPoint[1],Y)])),c.push(y[Y]),m.push(_(z,b,p,Y)),O.push(Z)):V=!1}V&&(T.push($),D.push(D.length))}D.sort(function(ie,ne){return O[ie]-O[ne]});for(var X=[],J=[],q=[],te=[],re=[],H=0;H<D.length;H++){var Y=D[H];X[H]=C[Y],J[H]=h[Y],q[H]=c[Y],te[H]=m[Y],re[H]=T[Y]}return{current:X,next:J,stackedOnCurrent:q,stackedOnNext:te,status:re}}},10930:function(E,A,u){var o=u(74582),S=u(76414),_=u(24280),p=S.min,f=S.max,y=S.scaleAndAdd,d=S.copy,v=[],b=[],s=[];function l(T){return isNaN(T[0])||isNaN(T[1])}function w(T,D,O,N,z,H,$,V,P,U,Y){return U!=="none"&&U?I.apply(this,arguments):C.apply(this,arguments)}function I(T,D,O,N,z,H,$,V,P,U,Y){for(var Z=0,X=O,J=0;J<N;J++){var q=D[X];if(X>=z||X<0)break;if(l(q)){if(Y){X+=H;continue}break}if(X===O)T[H>0?"moveTo":"lineTo"](q[0],q[1]);else if(P>0){var te=D[Z],re=+(U==="y"),ie=(q[re]-te[re])*P;d(b,te),b[re]=te[re]+ie,d(s,q),s[re]=q[re]-ie,T.bezierCurveTo(b[0],b[1],s[0],s[1],q[0],q[1])}else T.lineTo(q[0],q[1]);Z=X,X+=H}return J}function C(T,D,O,N,z,H,$,V,P,U,Y){for(var Z=0,X=O,J=0;J<N;J++){var q=D[X];if(X>=z||X<0)break;if(l(q)){if(Y){X+=H;continue}break}if(X===O)T[H>0?"moveTo":"lineTo"](q[0],q[1]),d(b,q);else if(P>0){var te=X+H,ne=D[te];if(Y)for(;ne&&l(D[te]);)te+=H,ne=D[te];var re=.5,ie=D[Z],ne=D[te];if(!ne||l(ne))d(s,q);else{if(l(ne)&&!Y&&(ne=q),S.sub(v,ne,ie),U==="x"||U==="y"){var le,fe,we=+(U!=="x");le=Math.abs(q[we]-ie[we]),fe=Math.abs(q[we]-ne[we])}else le=S.dist(q,ie),fe=S.dist(q,ne);y(s,q,v,-P*(1-(re=fe/(fe+le))))}p(b,b,V),f(b,b,$),p(s,s,V),f(s,s,$),T.bezierCurveTo(b[0],b[1],s[0],s[1],q[0],q[1]),y(b,q,v,P*re)}else T.lineTo(q[0],q[1]);Z=X,X+=H}return J}function h(T,D){var O=[1/0,1/0],N=[-1/0,-1/0];if(D)for(var z=0;z<T.length;z++){var H=T[z];H[0]<O[0]&&(O[0]=H[0]),H[1]<O[1]&&(O[1]=H[1]),H[0]>N[0]&&(N[0]=H[0]),H[1]>N[1]&&(N[1]=H[1])}return{min:D?O:N,max:D?N:O}}var c=o.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:_(o.prototype.brush),buildPath:function(T,D){var O=D.points,N=0,z=O.length,H=h(O,D.smoothConstraint);if(D.connectNulls){for(;z>0&&l(O[z-1]);z--);for(;N<z&&l(O[N]);N++);}for(;N<z;)N+=w(T,O,N,z,z,1,H.min,H.max,D.smooth,D.smoothMonotone,D.connectNulls)+1}}),m=o.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},brush:_(o.prototype.brush),buildPath:function(T,D){var O=D.points,N=D.stackedOnPoints,z=0,H=O.length,$=D.smoothMonotone,V=h(O,D.smoothConstraint),P=h(N,D.smoothConstraint);if(D.connectNulls){for(;H>0&&l(O[H-1]);H--);for(;z<H&&l(O[z]);z++);}for(;z<H;){var U=w(T,O,z,H,H,1,V.min,V.max,D.smooth,$,D.connectNulls);w(T,N,z+U-1,U,H,-1,P.min,P.max,D.stackedOnSmooth,$,D.connectNulls),z+=U+1,T.closePath()}}});A.Polyline=c,A.Polygon=m},12810:function(E,A,u){var o=u(87930);u(41497),u(8366);var S=u(16234),_=u(1642);o.registerLayout(S),o.registerVisual(_)},41497:function(E,A,u){u(9129).__DEV__;var o=u(95166),S=u(80023),_=u(23405),p=_.concatArray,f=_.mergeAll,y=_.map,d=u(60653).encodeHTML;u(17234);var v=typeof Uint32Array>"u"?Array:Uint32Array,b=typeof Float64Array>"u"?Array:Float64Array;function s(w){var I=w.data;I&&I[0]&&I[0][0]&&I[0][0].coord&&(w.data=y(I,function(C){var h={coords:[C[0].coord,C[1].coord]};return C[0].name&&(h.fromName=C[0].name),C[1].name&&(h.toName=C[1].name),f([h,C[0],C[1]])}))}var l=o.extend({type:"series.lines",dependencies:["grid","polar"],visualColorAccessPath:"lineStyle.color",init:function(w){w.data=w.data||[],s(w);var I=this._processFlatCoordsArray(w.data);this._flatCoords=I.flatCoords,this._flatCoordsOffset=I.flatCoordsOffset,I.flatCoords&&(w.data=new Float32Array(I.count)),l.superApply(this,"init",arguments)},mergeOption:function(w){if(w.data=w.data||[],s(w),w.data){var I=this._processFlatCoordsArray(w.data);this._flatCoords=I.flatCoords,this._flatCoordsOffset=I.flatCoordsOffset,I.flatCoords&&(w.data=new Float32Array(I.count))}l.superApply(this,"mergeOption",arguments)},appendData:function(w){var I=this._processFlatCoordsArray(w.data);I.flatCoords&&(this._flatCoords?(this._flatCoords=p(this._flatCoords,I.flatCoords),this._flatCoordsOffset=p(this._flatCoordsOffset,I.flatCoordsOffset)):(this._flatCoords=I.flatCoords,this._flatCoordsOffset=I.flatCoordsOffset),w.data=new Float32Array(I.count)),this.getRawData().appendData(w.data)},_getCoordsFromItemModel:function(w){var I=this.getData().getItemModel(w);return I.option instanceof Array?I.option:I.getShallow("coords")},getLineCoordsCount:function(w){return this._flatCoordsOffset?this._flatCoordsOffset[2*w+1]:this._getCoordsFromItemModel(w).length},getLineCoords:function(w,I){if(this._flatCoordsOffset){for(var C=this._flatCoordsOffset[2*w],h=this._flatCoordsOffset[2*w+1],c=0;c<h;c++)I[c]=I[c]||[],I[c][0]=this._flatCoords[C+2*c],I[c][1]=this._flatCoords[C+2*c+1];return h}for(var m=this._getCoordsFromItemModel(w),c=0;c<m.length;c++)I[c]=I[c]||[],I[c][0]=m[c][0],I[c][1]=m[c][1];return m.length},_processFlatCoordsArray:function(w){var I=0;if(this._flatCoords&&(I=this._flatCoords.length),typeof w[0]=="number"){for(var C=w.length,h=new v(C),c=new b(C),m=0,T=0,D=0,O=0;O<C;){D++;var N=w[O++];h[T++]=m+I,h[T++]=N;for(var z=0;z<N;z++){var H=w[O++],$=w[O++];c[m++]=H,c[m++]=$}}return{flatCoordsOffset:new Uint32Array(h.buffer,0,T),flatCoords:c,count:D}}return{flatCoordsOffset:null,flatCoords:null,count:w.length}},getInitialData:function(w,I){var C=new S(["value"],this);return C.hasItemOption=!1,C.initData(w.data,[],function(h,c,m,T){if(h instanceof Array)return NaN;C.hasItemOption=!0;var D=h.value;if(D!=null)return D instanceof Array?D[T]:D}),C},formatTooltip:function(w){var I=this.getData().getItemModel(w),C=I.get("name");if(C)return C;var h=I.get("fromName"),c=I.get("toName"),m=[];return h!=null&&m.push(h),c!=null&&m.push(c),d(m.join(" > "))},preventIncremental:function(){return!!this.get("effect.show")},getProgressive:function(){var w=this.option.progressive;return w??(this.option.large?1e4:this.get("progressive"))},getProgressiveThreshold:function(){var w=this.option.progressiveThreshold;return w??(this.option.large?2e4:this.get("progressiveThreshold"))},defaultOption:{coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,label:{show:!1,position:"end"},lineStyle:{opacity:.5}}});E.exports=l},8366:function(E,A,u){u(9129).__DEV__;var o=u(87930),S=u(61880),_=u(91413),p=u(36399),f=u(6137),y=u(2095),d=u(45738),v=u(16234);E.exports=o.extendChartView({type:"lines",init:function(){},render:function(b,s,l){var w=b.getData(),I=this._updateLineDraw(w,b),C=b.get("zlevel"),h=b.get("effect.trailLength"),c=l.getZr(),m=c.painter.getType()==="svg";m||c.painter.getLayer(C).clear(!0),this._lastZlevel==null||m||c.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(b)&&h&&!m&&c.configLayer(C,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(h/10+.9,1),0)}),I.updateData(w),this._lastZlevel=C,this._finished=!0},incrementalPrepareRender:function(b,s,l){var w=b.getData();this._updateLineDraw(w,b).incrementalPrepareUpdate(w),this._clearLayer(l),this._finished=!1},incrementalRender:function(b,s,l){this._lineDraw.incrementalUpdate(b,s.getData()),this._finished=b.end===s.getData().count()},updateTransform:function(b,s,l){var w=b.getData(),I=b.pipelineContext;if(!this._finished||I.large||I.progressiveRender)return{update:!0};var C=v.reset(b);C.progress&&C.progress({start:0,end:w.count()},w),this._lineDraw.updateLayout(),this._clearLayer(l)},_updateLineDraw:function(b,s){var l=this._lineDraw,w=this._showEffect(s),I=!!s.get("polyline"),C=s.pipelineContext.large;return l&&w===this._hasEffet&&I===this._isPolyline&&C===this._isLargeDraw||(l&&l.remove(),l=this._lineDraw=C?new d:new S(I?w?y:f:w?_:p),this._hasEffet=w,this._isPolyline=I,this._isLargeDraw=C,this.group.removeAll()),this.group.add(l.group),l},_showEffect:function(b){return!!b.get("effect.show")},_clearLayer:function(b){var s=b.getZr();s.painter.getType()!=="svg"&&this._lastZlevel!=null&&s.painter.getLayer(this._lastZlevel).clear(!0)},remove:function(b,s){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(s)},dispose:function(){}})},16234:function(E,A,u){E.exports={seriesType:"lines",plan:u(52227)(),reset:function(o){var S=o.coordinateSystem,_=o.get("polyline"),p=o.pipelineContext.large;return{progress:function(f,y){var d=[];if(p){var v,b=f.end-f.start;if(_){for(var s=0,l=f.start;l<f.end;l++)s+=o.getLineCoordsCount(l);v=new Float32Array(b+2*s)}else v=new Float32Array(4*b);for(var w=0,I=[],l=f.start;l<f.end;l++){var C=o.getLineCoords(l,d);_&&(v[w++]=C);for(var h=0;h<C;h++)I=S.dataToPoint(d[h],!1,I),v[w++]=I[0],v[w++]=I[1]}y.setLayout("linesPoints",v)}else for(var l=f.start;l<f.end;l++){var c=y.getItemModel(l),C=o.getLineCoords(l,d),m=[];if(_)for(var T=0;T<C;T++)m.push(S.dataToPoint(d[T]));else{m[0]=S.dataToPoint(d[0]),m[1]=S.dataToPoint(d[1]);var D=c.get("lineStyle.curveness");+D&&(m[2]=[(m[0][0]+m[1][0])/2-(m[0][1]-m[1][1])*D,(m[0][1]+m[1][1])/2-(m[1][0]-m[0][0])*D])}y.setItemLayout(l,m)}}}}}},1642:function(E){function A(o){return o instanceof Array||(o=[o,o]),o}var u="lineStyle.opacity".split(".");E.exports={seriesType:"lines",reset:function(o,S,_){var p=A(o.get("symbol")),f=A(o.get("symbolSize")),y=o.getData();return y.setVisual("fromSymbol",p&&p[0]),y.setVisual("toSymbol",p&&p[1]),y.setVisual("fromSymbolSize",f&&f[0]),y.setVisual("toSymbolSize",f&&f[1]),y.setVisual("opacity",o.get(u)),{dataEach:y.hasItemOption?function(d,v){var b=d.getItemModel(v),s=A(b.getShallow("symbol",!0)),l=A(b.getShallow("symbolSize",!0)),w=b.get(u);s[0]&&d.setItemVisual(v,"fromSymbol",s[0]),s[1]&&d.setItemVisual(v,"toSymbol",s[1]),l[0]&&d.setItemVisual(v,"fromSymbolSize",l[0]),l[1]&&d.setItemVisual(v,"toSymbolSize",l[1]),d.setItemVisual(v,"opacity",w)}:null}}}},78645:function(E,A,u){var o=u(87930);u(87854),u(31018),u(65981),u(87673);var S=u(47804),_=u(21273),p=u(28314),f=u(81945),y=u(60461);o.registerLayout(S),o.registerVisual(_),o.registerProcessor(o.PRIORITY.PROCESSOR.STATISTIC,p),o.registerPreprocessor(f),y("map",[{type:"mapToggleSelect",event:"mapselectchanged",method:"toggleSelected"},{type:"mapSelect",event:"mapselected",method:"select"},{type:"mapUnSelect",event:"mapunselected",method:"unSelect"}])},87854:function(E,A,u){var o=u(23405),S=u(59644),_=u(95166),p=u(60653),f=p.encodeHTML,y=p.addCommas,d=u(49214),v=u(45435).retrieveRawAttr,b=u(96518),s=_.extend({type:"series.map",dependencies:["geo"],layoutMode:"box",needsDrawMap:!1,seriesGroup:[],getInitialData:function(l){for(var w=S(this,["value"]),I=w.mapDimension("value"),C=o.createHashMap(),h=[],c=[],m=0,T=w.count();m<T;m++){var D=w.getName(m);C.set(D,!0),h.push({name:D,value:w.get(I,m),selected:v(w,m,"selected")})}var O=b.load(this.getMapType(),this.option.nameMap);return o.each(O.regions,function(N){var z=N.name;C.get(z)||(h.push({name:z}),c.push(z))}),this.updateSelectedMap(h),w.appendValues([],c),w},getHostGeoModel:function(){var l=this.option.geoIndex;return l!=null?this.dependentModels.geo[l]:null},getMapType:function(){return(this.getHostGeoModel()||this).option.map},getRawValue:function(l){var w=this.getData();return w.get(w.mapDimension("value"),l)},getRegionModel:function(l){var w=this.getData();return w.getItemModel(w.indexOfName(l))},formatTooltip:function(l){for(var w=this.getData(),I=y(this.getRawValue(l)),C=w.getName(l),h=this.seriesGroup,c=[],m=0;m<h.length;m++){var T=h[m].originalData.indexOfName(C),D=w.mapDimension("value");isNaN(h[m].originalData.get(D,T))||c.push(f(h[m].name))}return c.join(", ")+"<br />"+f(C+" : "+I)},getTooltipPosition:function(l){if(l!=null){var w=this.getData().getName(l),I=this.coordinateSystem,C=I.getRegion(w);return C&&I.dataToPoint(C.center)}},setZoom:function(l){this.option.zoom=l},setCenter:function(l){this.option.center=l},defaultOption:{zlevel:0,z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:.75,showLegendSymbol:!0,dataRangeHoverLink:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}}}});o.mixin(s,d),E.exports=s},31018:function(E,A,u){var o=u(87930),S=u(23405),_=u(51747),p=u(90229),f="__seriesMapHighDown",y="__seriesMapCallKey";function d(b){var s=this[f];s&&s.recordVersion===this[y]&&v(s,b)}function v(b,s){var l=b.circle,w=b.labelModel,I=b.hoverLabelModel,C=b.emphasisText,h=b.normalText;s?(l.style.extendFrom(_.setTextStyle({},I,{text:I.get("show")?C:null},{isRectText:!0,useInsideStyle:!1},!0)),l.__mapOriginalZ2=l.z2,l.z2+=_.Z2_EMPHASIS_LIFT):(_.setTextStyle(l.style,w,{text:w.get("show")?h:null,textPosition:w.getShallow("position")||"bottom"},{isRectText:!0,useInsideStyle:!1}),l.dirty(!1),l.__mapOriginalZ2!=null&&(l.z2=l.__mapOriginalZ2,l.__mapOriginalZ2=null))}E.exports=o.extendChartView({type:"map",render:function(b,s,l,w){if(!w||w.type!=="mapToggleSelect"||w.from!==this.uid){var I=this.group;if(I.removeAll(),!b.getHostGeoModel()){if(w&&w.type==="geoRoam"&&w.componentType==="series"&&w.seriesId===b.id){var C=this._mapDraw;C&&I.add(C.group)}else if(b.needsDrawMap){var C=this._mapDraw||new p(l,!0);I.add(C.group),C.draw(b,s,l,this,w),this._mapDraw=C}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;b.get("showLegendSymbol")&&s.getComponent("legend")&&this._renderSymbols(b,s,l)}}},remove:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},dispose:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},_renderSymbols:function(b,s,l){var w=b.originalData,I=this.group;w.each(w.mapDimension("value"),function(C,h){if(!isNaN(C)){var c=w.getItemLayout(h);if(c&&c.point){var m=c.point,T=c.offset,D=new _.Circle({style:{fill:b.getData().getVisual("color")},shape:{cx:m[0]+9*T,cy:m[1],r:3},silent:!0,z2:8+(T?0:_.Z2_EMPHASIS_LIFT+1)});if(!T){var O=b.mainSeries.getData(),N=w.getName(h),z=O.indexOfName(N),H=w.getItemModel(h),$=H.getModel("label"),V=H.getModel("emphasis.label"),P=O.getItemGraphicEl(z),U=S.retrieve2(b.getFormattedLabel(z,"normal"),N),Y=S.retrieve2(b.getFormattedLabel(z,"emphasis"),U),Z=P[f],X=Math.random();if(!Z){Z=P[f]={};var J=S.curry(d,!0),q=S.curry(d,!1);P.on("mouseover",J).on("mouseout",q).on("emphasis",J).on("normal",q)}P[y]=X,S.extend(Z,{recordVersion:X,circle:D,labelModel:$,hoverLabelModel:V,emphasisText:Y,normalText:U}),v(Z,!1)}I.add(D)}}})}})},81945:function(E,A,u){var o=u(23405);E.exports=function(S){o.each(S.series,function(_){_&&_.type==="map"&&(_.map=_.map||_.mapType,o.defaults(_,_.mapLocation))})}},28314:function(E,A,u){var o=u(23405);E.exports=function(S){var _={};S.eachSeriesByType("map",function(p){var f=p.getHostGeoModel(),y=f?"o"+f.id:"i"+p.getMapType();(_[y]=_[y]||[]).push(p)}),o.each(_,function(p,f){for(var y,d,v,b=(y=o.map(p,function(l){return l.getData()}),d=p[0].get("mapValueCalculation"),v={},o.each(y,function(l){l.each(l.mapDimension("value"),function(w,I){var C="ec-"+l.getName(I);v[C]=v[C]||[],isNaN(w)||v[C].push(w)})}),y[0].map(y[0].mapDimension("value"),function(l,w){for(var I,C="ec-"+y[0].getName(w),h=0,c=1/0,m=-1/0,T=v[C].length,D=0;D<T;D++)c=Math.min(c,v[C][D]),m=Math.max(m,v[C][D]),h+=v[C][D];return I=d==="min"?c:d==="max"?m:d==="average"?h/T:h,T===0?NaN:I})),s=0;s<p.length;s++)p[s].originalData=p[s].getData();for(var s=0;s<p.length;s++)p[s].seriesGroup=p,p[s].needsDrawMap=s===0&&!p[s].getHostGeoModel(),p[s].setData(b.cloneShallow()),p[s].mainSeries=p[0]})}},47804:function(E,A,u){var o=u(23405);E.exports=function(S){var _={};S.eachSeriesByType("map",function(p){var f=p.getMapType();if(!p.getHostGeoModel()&&!_[f]){var y={};o.each(p.seriesGroup,function(v){var b=v.coordinateSystem,s=v.originalData;v.get("showLegendSymbol")&&S.getComponent("legend")&&s.each(s.mapDimension("value"),function(l,w){var I=s.getName(w),C=b.getRegion(I);if(!(!C||isNaN(l))){var h=y[I]||0,c=b.dataToPoint(C.center);y[I]=h+1,s.setItemLayout(w,{point:c,offset:h})}})});var d=p.getData();d.each(function(v){var b=d.getName(v),s=d.getItemLayout(v)||{};s.showLabel=!y[b],d.setItemLayout(v,s)}),_[f]=!0}})}},21273:function(E){E.exports=function(A){A.eachSeriesByType("map",function(u){var o=u.get("color"),S=u.getModel("itemStyle"),_=S.get("areaColor"),p=S.get("color")||o[u.seriesIndex%o.length];u.getData().setVisual({areaColor:_,color:p})})}},91066:function(E,A,u){var o=u(87930);u(52420),u(22031),u(40106);var S=u(16072);o.registerVisual(S)},22031:function(E,A,u){var o=u(23405),S=o.each,_=o.createHashMap,p=u(95166),f=u(74107);E.exports=p.extend({type:"series.parallel",dependencies:["parallel"],visualColorAccessPath:"lineStyle.color",getInitialData:function(y,d){var v=this.getSource();return function(b,s){if(!b.encodeDefine){var l=s.ecModel.getComponent("parallel",s.get("parallelIndex"));if(l){var w=b.encodeDefine=_();S(l.dimensions,function(I){var C=+I.replace("dim","");w.set(I,C)})}}}(v,this),f(v,this)},getRawIndicesByActiveState:function(y){var d=this.coordinateSystem,v=this.getData(),b=[];return d.eachActiveState(v,function(s,l){y===s&&b.push(v.getRawIndex(l))}),b},defaultOption:{zlevel:0,z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"}})},40106:function(E,A,u){var o=u(51747);function S(y,d,v,b){for(var s=[],l=0;l<v.length;l++){var w,I=v[l],C=y.get(y.mapDimension(I),d);w=C,(b.getAxis(I).type==="category"?w==null:w==null||isNaN(w))||s.push(b.dataToPoint(C,I))}return s}function _(y,d,v,b,s){var l=S(y,v,b,s),w=new o.Polyline({shape:{points:l},silent:!0,z2:10});return d.add(w),y.setItemGraphicEl(v,w),w}function p(y){var d=y.get("smooth",!0);return d===!0&&(d=.3),{lineStyle:y.getModel("lineStyle").getLineStyle(),smooth:d??.3}}function f(y,d,v,b){var s=b.lineStyle;d.hasItemOption&&(s=d.getItemModel(v).getModel("lineStyle").getLineStyle()),y.useStyle(s);var l=y.style;l.fill=null,l.stroke=d.getItemVisual(v,"color"),l.opacity=d.getItemVisual(v,"opacity"),b.smooth&&(y.shape.smooth=b.smooth)}E.exports=u(4695).extend({type:"parallel",init:function(){this._dataGroup=new o.Group,this.group.add(this._dataGroup),this._data,this._initialized},render:function(y,d,v,b){var s=this._dataGroup,l=y.getData(),w=this._data,I=y.coordinateSystem,C=I.dimensions,h=p(y);if(l.diff(w).add(function($){f(_(l,s,$,C,I),l,$,h)}).update(function($,V){var P=w.getItemGraphicEl(V),U=S(l,$,C,I);l.setItemGraphicEl($,P);var Y=b&&b.animation===!1?null:y;o.updateProps(P,{shape:{points:U}},Y,$),f(P,l,$,h)}).remove(function($){var V=w.getItemGraphicEl($);s.remove(V)}).execute(),!this._initialized){this._initialized=!0;var c,m,T,D,O,N,z,H=(c=I,m=y,T=function(){setTimeout(function(){s.removeClipPath()})},D=c.model,O=c.getRect(),N=new o.Rect({shape:{x:O.x,y:O.y,width:O.width,height:O.height}}),z=D.get("layout")==="horizontal"?"width":"height",N.setShape(z,0),o.initProps(N,{shape:{width:O.width,height:O.height}},m,T),N);s.setClipPath(H)}this._data=l},incrementalPrepareRender:function(y,d,v){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},incrementalRender:function(y,d,v){for(var b=d.getData(),s=d.coordinateSystem,l=s.dimensions,w=p(d),I=y.start;I<y.end;I++){var C=_(b,this._dataGroup,I,l,s);C.incremental=!0,f(C,b,I,w)}},dispose:function(){},remove:function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null}})},16072:function(E){var A=["lineStyle","normal","opacity"];E.exports={seriesType:"parallel",reset:function(u,o,S){var _=u.getModel("itemStyle"),p=u.getModel("lineStyle"),f=o.get("color"),y=p.get("color")||_.get("color")||f[u.seriesIndex%f.length],d=u.get("inactiveOpacity"),v=u.get("activeOpacity"),b=u.getModel("lineStyle").getLineStyle(),s=u.coordinateSystem,l=u.getData(),w={normal:b.opacity,active:v,inactive:d};return l.setVisual("color",y),{progress:function(I,C){s.eachActiveState(C,function(h,c){var m=w[h];if(h==="normal"&&C.hasItemOption){var T=C.getItemModel(c).get(A,!0);T!=null&&(m=T)}C.setItemVisual(c,"opacity",m)},I.start,I.end)}}}}},13875:function(E,A,u){var o=u(87930),S=u(23405);u(72768),u(73202),u(16044);var _=u(76918).layout,p=u(53414);u(97035),o.registerLayout(S.curry(_,"pictorialBar")),o.registerVisual(p("pictorialBar","roundRect"))},25997:function(E,A,u){var o=u(87930),S=u(23405);u(29921),u(97684);var _=u(60461),p=u(59448),f=u(1363),y=u(74278);_("pie",[{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}]),o.registerVisual(p("pie")),o.registerLayout(S.curry(f,"pie")),o.registerProcessor(y("pie"))},29921:function(E,A,u){var o=u(87930),S=u(59644),_=u(23405),p=u(51064),f=u(54684).getPercentWithPrecision,y=u(49214),d=u(45435).retrieveRawAttr,v=o.extendSeriesModel({type:"series.pie",init:function(b){v.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()},this.updateSelectedMap(this._createSelectableList()),this._defaultLabelLine(b)},mergeOption:function(b){v.superCall(this,"mergeOption",b),this.updateSelectedMap(this._createSelectableList())},getInitialData:function(b,s){return S(this,["value"])},_createSelectableList:function(){for(var b=this.getRawData(),s=b.mapDimension("value"),l=[],w=0,I=b.count();w<I;w++)l.push({name:b.getName(w),value:b.get(s,w),selected:d(b,w,"selected")});return l},getDataParams:function(b){var s=this.getData(),l=v.superCall(this,"getDataParams",b),w=[];return s.each(s.mapDimension("value"),function(I){w.push(I)}),l.percent=f(w,b,s.hostModel.get("percentPrecision")),l.$vars.push("percent"),l},_defaultLabelLine:function(b){p.defaultEmphasis(b,"labelLine",["show"]);var s=b.labelLine,l=b.emphasis.labelLine;s.show=s.show&&b.label.show,l.show=l.show&&b.emphasis.label.show},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,selectedOffset:10,hoverOffset:10,avoidLabelOverlap:!0,percentPrecision:2,stillShowZeroSum:!0,label:{rotate:!1,show:!0,position:"outer"},labelLine:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1},animationType:"expansion",animationEasing:"cubicOut"}});_.mixin(v,y),E.exports=v},97684:function(E,A,u){var o=u(23405),S=u(51747),_=u(4695);function p(v,b,s,l){var w=b.getData(),I=this.dataIndex,C=w.getName(I),h=b.get("selectedOffset");l.dispatchAction({type:"pieToggleSelect",from:v,name:C,seriesId:b.id}),w.each(function(c){f(w.getItemGraphicEl(c),w.getItemLayout(c),b.isSelected(w.getName(c)),h,s)})}function f(v,b,s,l,w){var I=(b.startAngle+b.endAngle)/2,C=s?l:0,h=[Math.cos(I)*C,Math.sin(I)*C];w?v.animate().when(200,{position:h}).start("bounceOut"):v.attr("position",h)}function y(v,b){S.Group.call(this);var s=new S.Sector({z2:2}),l=new S.Polyline,w=new S.Text;function I(){l.ignore=l.hoverIgnore,w.ignore=w.hoverIgnore}function C(){l.ignore=l.normalIgnore,w.ignore=w.normalIgnore}this.add(s),this.add(l),this.add(w),this.updateData(v,b,!0),this.on("emphasis",I).on("normal",C).on("mouseover",I).on("mouseout",C)}var d=y.prototype;d.updateData=function(v,b,s){var l=this.childAt(0),w=v.hostModel,I=v.getItemModel(b),C=v.getItemLayout(b),h=o.extend({},C);h.label=null,s?(l.setShape(h),w.getShallow("animationType")==="scale"?(l.shape.r=C.r0,S.initProps(l,{shape:{r:C.r}},w,b)):(l.shape.endAngle=C.startAngle,S.updateProps(l,{shape:{endAngle:C.endAngle}},w,b))):S.updateProps(l,{shape:h},w,b);var c=v.getItemVisual(b,"color");l.useStyle(o.defaults({lineJoin:"bevel",fill:c},I.getModel("itemStyle").getItemStyle())),l.hoverStyle=I.getModel("emphasis.itemStyle").getItemStyle();var m=I.getShallow("cursor");function T(){l.stopAnimation(!0),l.animateTo({shape:{r:C.r+w.get("hoverOffset")}},300,"elasticOut")}function D(){l.stopAnimation(!0),l.animateTo({shape:{r:C.r}},300,"elasticOut")}m&&l.attr("cursor",m),f(this,v.getItemLayout(b),w.isSelected(null,b),w.get("selectedOffset"),w.get("animation")),l.off("mouseover").off("mouseout").off("emphasis").off("normal"),I.get("hoverAnimation")&&w.isAnimationEnabled()&&l.on("mouseover",T).on("mouseout",D).on("emphasis",T).on("normal",D),this._updateLabel(v,b),S.setHoverStyle(this)},d._updateLabel=function(v,b){var s=this.childAt(1),l=this.childAt(2),w=v.hostModel,I=v.getItemModel(b),C=v.getItemLayout(b).label,D=v.getItemVisual(b,"color");S.updateProps(s,{shape:{points:C.linePoints||[[C.x,C.y],[C.x,C.y],[C.x,C.y]]}},w,b),S.updateProps(l,{style:{x:C.x,y:C.y}},w,b),l.attr({rotation:C.rotation,origin:[C.x,C.y],z2:10});var h=I.getModel("label"),c=I.getModel("emphasis.label"),m=I.getModel("labelLine"),T=I.getModel("emphasis.labelLine"),D=v.getItemVisual(b,"color");S.setLabelStyle(l.style,l.hoverStyle={},h,c,{labelFetcher:v.hostModel,labelDataIndex:b,defaultText:v.getName(b),autoColor:D,useInsideStyle:!!C.inside},{textAlign:C.textAlign,textVerticalAlign:C.verticalAlign,opacity:v.getItemVisual(b,"opacity")}),l.ignore=l.normalIgnore=!h.get("show"),l.hoverIgnore=!c.get("show"),s.ignore=s.normalIgnore=!m.get("show"),s.hoverIgnore=!T.get("show"),s.setStyle({stroke:D,opacity:v.getItemVisual(b,"opacity")}),s.setStyle(m.getModel("lineStyle").getLineStyle()),s.hoverStyle=T.getModel("lineStyle").getLineStyle();var O=m.get("smooth");O&&O===!0&&(O=.4),s.setShape({smooth:O})},o.inherits(y,S.Group),E.exports=_.extend({type:"pie",init:function(){var v=new S.Group;this._sectorGroup=v},render:function(v,b,s,l){if(!l||l.from!==this.uid){var w=v.getData(),I=this._data,C=this.group,h=b.get("animation"),c=!I,m=v.get("animationType"),T=o.curry(p,this.uid,v,h,s),D=v.get("selectedMode");if(w.diff(I).add(function(H){var $=new y(w,H);c&&m!=="scale"&&$.eachChild(function(V){V.stopAnimation(!0)}),D&&$.on("click",T),w.setItemGraphicEl(H,$),C.add($)}).update(function(H,$){var V=I.getItemGraphicEl($);V.updateData(w,H),V.off("click"),D&&V.on("click",T),C.add(V),w.setItemGraphicEl(H,V)}).remove(function(H){var $=I.getItemGraphicEl(H);C.remove($)}).execute(),h&&c&&w.count()>0&&m!=="scale"){var O=w.getItemLayout(0),N=Math.max(s.getWidth(),s.getHeight())/2,z=o.bind(C.removeClipPath,C);C.setClipPath(this._createClipPath(O.cx,O.cy,N,O.startAngle,O.clockwise,z,v))}else C.removeClipPath();this._data=w}},dispose:function(){},_createClipPath:function(v,b,s,l,w,I,C){var h=new S.Sector({shape:{cx:v,cy:b,r0:0,r:s,startAngle:l,endAngle:l,clockwise:w}});return S.initProps(h,{shape:{endAngle:l+(w?1:-1)*Math.PI*2}},C,I),h},containPoint:function(v,b){var s=b.getData().getItemLayout(0);if(s){var l=v[0]-s.cx,w=v[1]-s.cy,I=Math.sqrt(l*l+w*w);return I<=s.r&&I>=s.r0}}})},46581:function(E,A,u){var o=u(24570);function S(p,f,y,d,v,b,s){function l(D,O){for(var N=D;N>=0&&(p[N].y-=O,!(N>0)||!(p[N].y>p[N-1].y+p[N-1].height));N--);}function w(D,O,N,z,H,$){for(var V=O?Number.MAX_VALUE:0,P=0,U=D.length;P<U;P++){var Y=Math.abs(D[P].y-z),Z=D[P].len,X=D[P].len2,J=Y<H+Z?Math.sqrt((H+Z+X)*(H+Z+X)-Y*Y):Math.abs(D[P].x-N);O&&J>=V&&(J=V-10),!O&&J<=V&&(J=V+10),D[P].x=N+J*$,V=J}}p.sort(function(D,O){return D.y-O.y});for(var I,C=0,h=p.length,c=[],m=[],T=0;T<h;T++)(I=p[T].y-C)<0&&function(D,O,N,z){for(var H=D;H<O;H++)if(p[H].y+=N,H>D&&H+1<O&&p[H+1].y>p[H].y+p[H].height)return void l(H,N/2);l(O-1,N/2)}(T,h,-I),C=p[T].y+p[T].height;s-C<0&&l(h-1,C-s);for(var T=0;T<h;T++)p[T].y>=y?m.push(p[T]):c.push(p[T]);w(c,!1,f,y,d,v),w(m,!0,f,y,d,v)}function _(p){return p.position==="center"}E.exports=function(p,f,y,d){var v,b,s=p.getData(),l=[],w=!1;s.each(function(I){var C,h,c,m,T=s.getItemLayout(I),D=s.getItemModel(I),O=D.getModel("label"),N=O.get("position")||D.get("emphasis.label.position"),z=D.getModel("labelLine"),H=z.get("length"),$=z.get("length2"),V=(T.startAngle+T.endAngle)/2,P=Math.cos(V),U=Math.sin(V);v=T.cx,b=T.cy;var Y=N==="inside"||N==="inner";if(N==="center")C=T.cx,h=T.cy,m="center";else{var Z=(Y?(T.r+T.r0)/2*P:T.r*P)+v,X=(Y?(T.r+T.r0)/2*U:T.r*U)+b;if(C=Z+3*P,h=X+3*U,!Y){var J=Z+P*(H+f-T.r),q=X+U*(H+f-T.r),te=J+(P<0?-1:1)*$;C=te+(P<0?-5:5),h=q,c=[[Z,X],[J,q],[te,q]]}m=Y?"center":P>0?"left":"right"}var re=O.getFont(),ie=O.get("rotate")?P<0?-V+Math.PI:-V:0,ne=p.getFormattedLabel(I,"normal")||s.getName(I),le=o.getBoundingRect(ne,re,m,"top");w=!!ie,T.label={x:C,y:h,position:N,height:le.height,len:H,len2:$,linePoints:c,textAlign:m,verticalAlign:"middle",rotation:ie,inside:Y},Y||l.push(T.label)}),!w&&p.get("avoidLabelOverlap")&&function(I,C,h,c,m,T){for(var D=[],O=[],N=0;N<I.length;N++)_(I[N])||(I[N].x<C?D.push(I[N]):O.push(I[N]));S(O,C,h,c,1,m,T),S(D,C,h,c,-1,m,T);for(var N=0;N<I.length;N++)if(!_(I[N])){var z=I[N].linePoints;if(z){var H=z[1][0]-z[2][0];I[N].x<C?z[2][0]=I[N].x+3:z[2][0]=I[N].x-3,z[1][1]=z[2][1]=I[N].y,z[1][0]=z[2][0]+H}}}(l,v,b,f,y,d)}},1363:function(E,A,u){var o=u(54684),S=o.parsePercent,_=o.linearMap,p=u(46581),f=u(23405),y=2*Math.PI,d=Math.PI/180;E.exports=function(v,b,s,l){b.eachSeriesByType(v,function(w){var I=w.getData(),C=I.mapDimension("value"),h=w.get("center"),c=w.get("radius");f.isArray(c)||(c=[0,c]),f.isArray(h)||(h=[h,h]);var m=s.getWidth(),T=s.getHeight(),D=Math.min(m,T),O=S(h[0],m),N=S(h[1],T),z=S(c[0],D/2),H=S(c[1],D/2),$=-w.get("startAngle")*d,V=w.get("minAngle")*d,P=0;I.each(C,function(fe){!isNaN(fe)&&P++});var U=I.getSum(C),Y=Math.PI/(U||P)*2,Z=w.get("clockwise"),X=w.get("roseType"),J=w.get("stillShowZeroSum"),q=I.getDataExtent(C);q[0]=0;var te=y,re=0,ie=$,ne=Z?1:-1;if(I.each(C,function(fe,we){if(isNaN(fe))return void I.setItemLayout(we,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:Z,cx:O,cy:N,r0:z,r:X?NaN:H});(pe=X!=="area"?U===0&&J?Y:fe*Y:y/P)<V?(pe=V,te-=V):re+=fe;var pe,ve=ie+ne*pe;I.setItemLayout(we,{angle:pe,startAngle:ie,endAngle:ve,clockwise:Z,cx:O,cy:N,r0:z,r:X?_(fe,q,[z,H]):H}),ie=ve}),te<y&&P)if(te<=.001){var le=y/P;I.each(C,function(fe,we){if(!isNaN(fe)){var pe=I.getItemLayout(we);pe.angle=le,pe.startAngle=$+ne*we*le,pe.endAngle=$+ne*(we+1)*le}})}else Y=te/re,ie=$,I.each(C,function(fe,we){if(!isNaN(fe)){var pe=I.getItemLayout(we),ve=pe.angle===V?V:fe*Y;pe.startAngle=ie,pe.endAngle=ie+ne*ve,ie+=ne*ve}});p(w,H,m,T)})}},99264:function(E,A,u){var o=u(87930);u(27614),u(62673),u(51387);var S=u(59448),_=u(53414),p=u(95838),f=u(74278),y=u(24639);o.registerVisual(S("radar")),o.registerVisual(_("radar","circle")),o.registerLayout(p),o.registerProcessor(f("radar")),o.registerPreprocessor(y)},62673:function(E,A,u){var o=u(95166),S=u(59644),_=u(23405),p=u(60653).encodeHTML,f=o.extend({type:"series.radar",dependencies:["radar"],init:function(y){f.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()}},getInitialData:function(y,d){return S(this,{generateCoord:"indicator_",generateCoordCount:1/0})},formatTooltip:function(y){var d=this.getData(),v=this.coordinateSystem.getIndicatorAxes(),b=this.getData().getName(y);return p(b===""?this.name:b)+"<br/>"+_.map(v,function(s,l){var w=d.get(d.mapDimension(s.dim),y);return p(s.name+" : "+w)}).join("<br />")},defaultOption:{zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid"},label:{position:"top"},symbol:"emptyCircle",symbolSize:4}});E.exports=f},51387:function(E,A,u){var o=u(87930),S=u(51747),_=u(23405),p=u(30696);E.exports=o.extendChartView({type:"radar",render:function(f,y,d){var v=f.coordinateSystem,b=this.group,s=f.getData(),l=this._data;function w(C,h,c,m,T,D){c.removeAll();for(var O=0;O<h.length-1;O++){var N=function(z,H){var $=z.getItemVisual(H,"symbol")||"circle",V=z.getItemVisual(H,"color");if($!=="none"){var P,U=(P=z.getItemVisual(H,"symbolSize"),_.isArray(P)||(P=[+P,+P]),P),Y=p.createSymbol($,-1,-1,2,2,V);return Y.attr({style:{strokeNoScale:!0},z2:100,scale:[U[0]/2,U[1]/2]}),Y}}(m,T);N&&(N.__dimIdx=O,C[O]?(N.attr("position",C[O]),S[D?"initProps":"updateProps"](N,{position:h[O]},f,T)):N.attr("position",h[O]),c.add(N))}}function I(C){return _.map(C,function(h){return[v.cx,v.cy]})}s.diff(l).add(function(C){var h=s.getItemLayout(C);if(h){var c=new S.Polygon,m=new S.Polyline,T={shape:{points:h}};c.shape.points=I(h),m.shape.points=I(h),S.initProps(c,T,f,C),S.initProps(m,T,f,C);var D=new S.Group,O=new S.Group;D.add(m),D.add(c),D.add(O),w(m.shape.points,h,O,s,C,!0),s.setItemGraphicEl(C,D)}}).update(function(C,h){var c=l.getItemGraphicEl(h),m=c.childAt(0),T=c.childAt(1),D=c.childAt(2),O={shape:{points:s.getItemLayout(C)}};O.shape.points&&(w(m.shape.points,O.shape.points,D,s,C,!1),S.updateProps(m,O,f),S.updateProps(T,O,f),s.setItemGraphicEl(C,c))}).remove(function(C){b.remove(l.getItemGraphicEl(C))}).execute(),s.eachItemGraphicEl(function(C,h){var c=s.getItemModel(h),m=C.childAt(0),T=C.childAt(1),D=C.childAt(2),O=s.getItemVisual(h,"color");b.add(C),m.useStyle(_.defaults(c.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:O})),m.hoverStyle=c.getModel("emphasis.lineStyle").getLineStyle();var N=c.getModel("areaStyle"),z=c.getModel("emphasis.areaStyle"),H=N.isEmpty()&&N.parentModel.isEmpty(),$=z.isEmpty()&&z.parentModel.isEmpty();$=$&&H,T.ignore=H,T.useStyle(_.defaults(N.getAreaStyle(),{fill:O,opacity:.7})),T.hoverStyle=z.getAreaStyle();var V=c.getModel("itemStyle").getItemStyle(["color"]),P=c.getModel("emphasis.itemStyle").getItemStyle(),U=c.getModel("label"),Y=c.getModel("emphasis.label");function Z(){T.attr("ignore",$)}function X(){T.attr("ignore",H)}D.eachChild(function(J){J.setStyle(V),J.hoverStyle=_.clone(P),S.setLabelStyle(J.style,J.hoverStyle,U,Y,{labelFetcher:s.hostModel,labelDataIndex:h,labelDimIndex:J.__dimIdx,defaultText:s.get(s.dimensions[J.__dimIdx],h),autoColor:O,isRectText:!0})}),C.off("mouseover").off("mouseout").off("normal").off("emphasis"),C.on("emphasis",Z).on("mouseover",Z).on("normal",X).on("mouseout",X),S.setHoverStyle(C)}),this._data=s},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}})},24639:function(E,A,u){var o=u(23405);E.exports=function(S){var _=S.polar;if(_){o.isArray(_)||(_=[_]);var p=[];o.each(_,function(f,y){f.indicator?(f.type&&!f.shape&&(f.shape=f.type),S.radar=S.radar||[],o.isArray(S.radar)||(S.radar=[S.radar]),S.radar.push(f)):p.push(f)}),S.polar=p}o.each(S.series,function(f){f&&f.type==="radar"&&f.polarIndex&&(f.radarIndex=f.polarIndex)})}},95838:function(E){E.exports=function(A){A.eachSeriesByType("radar",function(u){var o=u.getData(),S=[],_=u.coordinateSystem;if(_){for(var p=_.getIndicatorAxes(),f=0;f<p.length;f++)o.each(o.mapDimension(p[f].dim),y);o.each(function(d){S[d][0]&&S[d].push(S[d][0].slice()),o.setItemLayout(d,S[d])})}function y(d,v){S[v]=S[v]||[],S[v][f]=_.dataToPoint(d,f)}})}},55666:function(E,A,u){var o=u(87930);u(33264),u(76002),u(71874);var S=u(39992),_=u(9885);o.registerLayout(S),o.registerVisual(_)},33264:function(E,A,u){var o=u(95166),S=u(64330),_=u(60653).encodeHTML,p=o.extend({type:"series.sankey",layoutInfo:null,getInitialData:function(f){var y=f.edges||f.links,d=f.data||f.nodes;if(d&&y)return S(d,y,this,!0).data},setNodePosition:function(f,y){var d=this.option.data[f];d.localX=y[0],d.localY=y[1]},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},formatTooltip:function(f,y,d){if(d==="edge"){var v=this.getDataParams(f,d),b=v.data,s=b.source+" -- "+b.target;return v.value&&(s+=" : "+v.value),_(s)}return p.superCall(this,"formatTooltip",f,y)},optionUpdated:function(){var f=this.option;f.focusNodeAdjacency===!0&&(f.focusNodeAdjacency="allEdges")},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",layout:null,left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,focusNodeAdjacency:!1,layoutIterations:32,label:{show:!0,position:"right",color:"#000",fontSize:12},itemStyle:{borderWidth:1,borderColor:"#333"},lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.6}},animationEasing:"linear",animationDuration:1e3}});E.exports=p},76002:function(E,A,u){var o=u(51747),S=u(87930),_=u(23405),p=["itemStyle","opacity"],f=["lineStyle","opacity"];function y(s,l){return s.getVisual("opacity")||s.getModel().get(l)}function d(s,l,w){var I=s.getGraphicEl(),C=y(s,l);w!=null&&(C==null&&(C=1),C*=w),I.downplay&&I.downplay(),I.traverse(function(h){h.type!=="group"&&h.setStyle("opacity",C)})}function v(s,l){var w=y(s,l),I=s.getGraphicEl();I.highlight&&I.highlight(),I.traverse(function(C){C.type!=="group"&&C.setStyle("opacity",w)})}var b=o.extendShape({shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,cpx2:0,cpy2:0,extent:0,orient:""},buildPath:function(s,l){var w=l.extent;l.orient==="vertical"?(s.moveTo(l.x1,l.y1),s.bezierCurveTo(l.cpx1,l.cpy1,l.cpx2,l.cpy2,l.x2,l.y2),s.lineTo(l.x2+w,l.y2),s.bezierCurveTo(l.cpx2+w,l.cpy2,l.cpx1+w,l.cpy1,l.x1+w,l.y1)):(s.moveTo(l.x1,l.y1),s.bezierCurveTo(l.cpx1,l.cpy1,l.cpx2,l.cpy2,l.x2,l.y2),s.lineTo(l.x2,l.y2+w),s.bezierCurveTo(l.cpx2,l.cpy2+w,l.cpx1,l.cpy1+w,l.x1,l.y1+w)),s.closePath()}});E.exports=S.extendChartView({type:"sankey",_model:null,_focusAdjacencyDisabled:!1,render:function(s,l,w){var I,C,h,c,m=this,T=s.getGraph(),D=this.group,O=s.layoutInfo,N=O.width,z=O.height,H=s.getData(),$=s.getData("edge"),V=s.get("orient");this._model=s,D.removeAll(),D.attr("position",[O.x,O.y]),T.eachEdge(function(P){var U,Y,Z,X,J,q,te,re,ie=new b;ie.dataIndex=P.dataIndex,ie.seriesIndex=s.seriesIndex,ie.dataType="edge";var ne=P.getModel("lineStyle"),le=ne.get("curveness"),fe=P.node1.getLayout(),we=P.node1.getModel(),pe=we.get("localX"),ve=we.get("localY"),be=P.node2.getLayout(),Ee=P.node2.getModel(),Re=Ee.get("localX"),Ne=Ee.get("localY"),Le=P.getLayout();switch(ie.shape.extent=Math.max(1,Le.dy),ie.shape.orient=V,V==="vertical"?(U=(pe!=null?pe*N:fe.x)+Le.sy,Y=(ve!=null?ve*z:fe.y)+fe.dy,Z=(Re!=null?Re*N:be.x)+Le.ty,X=Ne!=null?Ne*z:be.y,J=U,q=Y*(1-le)+X*le,te=Z,re=Y*le+X*(1-le)):(U=(pe!=null?pe*N:fe.x)+fe.dx,Y=(ve!=null?ve*z:fe.y)+Le.sy,Z=Re!=null?Re*N:be.x,X=(Ne!=null?Ne*z:be.y)+Le.ty,J=U*(1-le)+Z*le,q=Y,te=U*le+Z*(1-le),re=X),ie.setShape({x1:U,y1:Y,x2:Z,y2:X,cpx1:J,cpy1:q,cpx2:te,cpy2:re}),ie.setStyle(ne.getItemStyle()),ie.style.fill){case"source":ie.style.fill=P.node1.getVisual("color");break;case"target":ie.style.fill=P.node2.getVisual("color")}o.setHoverStyle(ie,P.getModel("emphasis.lineStyle").getItemStyle()),D.add(ie),$.setItemGraphicEl(P.dataIndex,ie)}),T.eachNode(function(P){var U=P.getLayout(),Y=P.getModel(),Z=Y.get("localX"),X=Y.get("localY"),J=Y.getModel("label"),q=Y.getModel("emphasis.label"),te=new o.Rect({shape:{x:Z!=null?Z*N:U.x,y:X!=null?X*z:U.y,width:U.dx,height:U.dy},style:Y.getModel("itemStyle").getItemStyle()}),re=P.getModel("emphasis.itemStyle").getItemStyle();o.setLabelStyle(te.style,re,J,q,{labelFetcher:s,labelDataIndex:P.dataIndex,defaultText:P.id,isRectText:!0}),te.setStyle("fill",P.getVisual("color")),o.setHoverStyle(te,re),D.add(te),H.setItemGraphicEl(P.dataIndex,te),te.dataType="node"}),H.eachItemGraphicEl(function(P,U){var Y=H.getItemModel(U);Y.get("draggable")&&(P.drift=function(Z,X){m._focusAdjacencyDisabled=!0,this.shape.x+=Z,this.shape.y+=X,this.dirty(),w.dispatchAction({type:"dragNode",seriesId:s.id,dataIndex:H.getRawIndex(U),localX:this.shape.x/N,localY:this.shape.y/z})},P.ondragend=function(){m._focusAdjacencyDisabled=!1},P.draggable=!0,P.cursor="move"),Y.get("focusNodeAdjacency")&&(P.off("mouseover").on("mouseover",function(){m._focusAdjacencyDisabled||w.dispatchAction({type:"focusNodeAdjacency",seriesId:s.id,dataIndex:P.dataIndex})}),P.off("mouseout").on("mouseout",function(){m._focusAdjacencyDisabled||w.dispatchAction({type:"unfocusNodeAdjacency",seriesId:s.id})}))}),$.eachItemGraphicEl(function(P,U){$.getItemModel(U).get("focusNodeAdjacency")&&(P.off("mouseover").on("mouseover",function(){m._focusAdjacencyDisabled||w.dispatchAction({type:"focusNodeAdjacency",seriesId:s.id,edgeDataIndex:P.dataIndex})}),P.off("mouseout").on("mouseout",function(){m._focusAdjacencyDisabled||w.dispatchAction({type:"unfocusNodeAdjacency",seriesId:s.id})}))}),!this._data&&s.get("animation")&&D.setClipPath((I=D.getBoundingRect(),C=s,h=function(){D.removeClipPath()},c=new o.Rect({shape:{x:I.x-10,y:I.y-10,width:0,height:I.height+20}}),o.initProps(c,{shape:{width:I.width+20,height:I.height+20}},C,h),c)),this._data=s.getData()},dispose:function(){},focusNodeAdjacency:function(s,l,w,I){var C=this._model.getData(),h=C.graph,c=I.dataIndex,m=C.getItemModel(c),T=I.edgeDataIndex;if(c!=null||T!=null){var D=h.getNodeByIndex(c),O=h.getEdgeByIndex(T);if(h.eachNode(function(z){d(z,p,.1)}),h.eachEdge(function(z){d(z,f,.1)}),D){v(D,p);var N=m.get("focusNodeAdjacency");N==="outEdges"?_.each(D.outEdges,function(z){z.dataIndex<0||(v(z,f),v(z.node2,p))}):N==="inEdges"?_.each(D.inEdges,function(z){z.dataIndex<0||(v(z,f),v(z.node1,p))}):N==="allEdges"&&_.each(D.edges,function(z){z.dataIndex<0||(v(z,f),v(z.node1,p),v(z.node2,p))})}O&&(v(O,f),v(O.node1,p),v(O.node2,p))}},unfocusNodeAdjacency:function(s,l,w,I){var C=this._model.getGraph();C.eachNode(function(h){d(h,p)}),C.eachEdge(function(h){d(h,f)})}})},71874:function(E,A,u){var o=u(87930);u(93191),o.registerAction({type:"dragNode",event:"dragNode",update:"update"},function(S,_){_.eachComponent({mainType:"series",subType:"sankey",query:S},function(p){p.setNodePosition(S.dataIndex,[S.localX,S.localY])})})},39992:function(E,A,u){var o=u(62751),S=u(23405),_=u(51064).groupData;function p(s,l,w,I,C){S.each(s,function(h){var c,m,T,D,O,N=0,z=h.length;if(C==="vertical"){for(h.sort(function(H,$){return H.getLayout().x-$.getLayout().x}),T=0;T<z;T++)(m=N-(c=h[T]).getLayout().x)>0&&(D=c.getLayout().x+m,c.setLayout({x:D},!0)),N=c.getLayout().x+c.getLayout().dx+l;if((m=N-l-I)>0)for(D=c.getLayout().x-m,c.setLayout({x:D},!0),N=D,T=z-2;T>=0;--T)(m=(c=h[T]).getLayout().x+c.getLayout().dx+l-N)>0&&(D=c.getLayout().x-m,c.setLayout({x:D},!0)),N=c.getLayout().x}else{for(h.sort(function(H,$){return H.getLayout().y-$.getLayout().y}),T=0;T<z;T++)(m=N-(c=h[T]).getLayout().y)>0&&(O=c.getLayout().y+m,c.setLayout({y:O},!0)),N=c.getLayout().y+c.getLayout().dy+l;if((m=N-l-w)>0)for(O=c.getLayout().y-m,c.setLayout({y:O},!0),N=O,T=z-2;T>=0;--T)(m=(c=h[T]).getLayout().y+c.getLayout().dy+l-N)>0&&(O=c.getLayout().y-m,c.setLayout({y:O},!0)),N=c.getLayout().y}})}function f(s,l){return d(s.node2,l)*s.getValue()}function y(s,l){return d(s.node1,l)*s.getValue()}function d(s,l){return l==="vertical"?s.getLayout().x+s.getLayout().dx/2:s.getLayout().y+s.getLayout().dy/2}function v(s){return s.getValue()}function b(s,l,w){for(var I=0,C=s.length,h=-1;++h<C;){var c=+l.call(s,s[h],w);isNaN(c)||(I+=c)}return I}u(9129).__DEV__,E.exports=function(s,l,w){s.eachSeriesByType("sankey",function(I){var C,h,c,m,T,D,O,N,z,H,$,V,P,U=I.get("nodeWidth"),Y=I.get("nodeGap"),Z=(C=I,h=l,o.getLayoutRect(C.getBoxLayoutParams(),{width:h.getWidth(),height:h.getHeight()}));I.layoutInfo=Z;var X=Z.width,J=Z.height,q=I.getGraph(),te=q.nodes,re=q.edges;c=te,S.each(c,function(ne){var le=Math.max(b(ne.outEdges,v),b(ne.inEdges,v));ne.setLayout({value:le},!0)});var ie=S.filter(te,function(ne){return ne.getLayout().value===0}).length!==0?0:I.get("layoutIterations");m=te,T=re,D=U,O=Y,N=X,z=J,H=ie,function(ne,le,fe,we,pe,ve){for(var be,Ee,Re,Ne,Le,Se,Ie=[],_e=[],Ae=[],ue=[],ke=0,Pe=0,Ve=0;Ve<le.length;Ve++)Ie[Ve]=1;for(Ve=0;Ve<ne.length;Ve++)_e[Ve]=ne[Ve].inEdges.length,_e[Ve]===0&&Ae.push(ne[Ve]);for(;Ae.length;){for(var je=0;je<Ae.length;je++){var it=Ae[je];ve==="vertical"?(it.setLayout({y:ke},!0),it.setLayout({dy:fe},!0)):(it.setLayout({x:ke},!0),it.setLayout({dx:fe},!0));for(var rt=0;rt<it.outEdges.length;rt++){var mt=it.outEdges[rt];Ie[le.indexOf(mt)]=0;var yt=mt.node2,st=ne.indexOf(yt);--_e[st]==0&&ue.push(yt)}}++ke,Ae=ue,ue=[]}for(Ve=0;Ve<Ie.length;Ve++);be=ne,Ee=ke,Re=ve,S.each(be,function(Qe){Qe.outEdges.length||(Re==="vertical"?Qe.setLayout({y:Ee-1},!0):Qe.setLayout({x:Ee-1},!0))}),Ne=ne,Le=ve==="vertical"?(pe-fe)/(ke-1):(we-fe)/(ke-1),Se=ve,S.each(Ne,function(Qe){if(Se==="vertical"){var At=Qe.getLayout().y*Le;Qe.setLayout({y:At},!0)}else{var Xt=Qe.getLayout().x*Le;Qe.setLayout({x:Xt},!0)}})}(m,T,D,N,z,$=I.get("orient")),function(ne,le,fe,we,pe,ve,be){var Ee,Re,Ne,Le,Se,Ie,_e,Ae,ue,ke,Pe,Ve,je=(Ee=ne,Re=[],Ne=be==="vertical"?"y":"x",(Le=_(Ee,function(rt){return rt.getLayout()[Ne]})).keys.sort(function(rt,mt){return rt-mt}),S.each(Le.keys,function(rt){Re.push(Le.buckets.get(rt))}),Re);Se=je,Ie=le,_e=fe,Ae=we,ue=pe,ke=be,Pe=[],S.each(Se,function(rt){var mt=rt.length,yt=0,st=0;S.each(rt,function(Qe){yt+=Qe.getLayout().value}),st=ke==="vertical"?(Ae-(mt-1)*ue)/yt:(_e-(mt-1)*ue)/yt,Pe.push(st)}),Pe.sort(function(rt,mt){return rt-mt}),Ve=Pe[0],S.each(Se,function(rt){S.each(rt,function(mt,yt){var st=mt.getLayout().value*Ve;ke==="vertical"?(mt.setLayout({x:yt},!0),mt.setLayout({dx:st},!0)):(mt.setLayout({y:yt},!0),mt.setLayout({dy:st},!0))})}),S.each(Ie,function(rt){var mt=+rt.getValue()*Ve;rt.setLayout({dy:mt},!0)}),p(je,pe,fe,we,be);for(var it=1;ve>0;ve--)(function(rt,mt,yt){S.each(rt.slice().reverse(),function(st){S.each(st,function(Qe){if(Qe.outEdges.length){var At=b(Qe.outEdges,f,yt)/b(Qe.outEdges,v,yt);if(yt==="vertical"){var Xt=Qe.getLayout().x+(At-d(Qe,yt))*mt;Qe.setLayout({x:Xt},!0)}else{var cn=Qe.getLayout().y+(At-d(Qe,yt))*mt;Qe.setLayout({y:cn},!0)}}})})})(je,it*=.99,be),p(je,pe,fe,we,be),function(rt,mt,yt){S.each(rt,function(st){S.each(st,function(Qe){if(Qe.inEdges.length){var At=b(Qe.inEdges,y,yt)/b(Qe.inEdges,v,yt);if(yt==="vertical"){var Xt=Qe.getLayout().x+(At-d(Qe,yt))*mt;Qe.setLayout({x:Xt},!0)}else{var cn=Qe.getLayout().y+(At-d(Qe,yt))*mt;Qe.setLayout({y:cn},!0)}}})})}(je,it,be),p(je,pe,fe,we,be)}(m,T,z,N,O,H,$),V=m,P=$,S.each(V,function(ne){P==="vertical"?(ne.outEdges.sort(function(le,fe){return le.node2.getLayout().x-fe.node2.getLayout().x}),ne.inEdges.sort(function(le,fe){return le.node1.getLayout().x-fe.node1.getLayout().x})):(ne.outEdges.sort(function(le,fe){return le.node2.getLayout().y-fe.node2.getLayout().y}),ne.inEdges.sort(function(le,fe){return le.node1.getLayout().y-fe.node1.getLayout().y}))}),S.each(V,function(ne){var le=0,fe=0;S.each(ne.outEdges,function(we){we.setLayout({sy:le},!0),le+=we.getLayout().dy}),S.each(ne.inEdges,function(we){we.setLayout({ty:fe},!0),fe+=we.getLayout().dy})})})}},9885:function(E,A,u){var o=u(32013),S=u(23405);E.exports=function(_,p){_.eachSeriesByType("sankey",function(f){var y=f.getGraph().nodes;if(y.length){var d=1/0,v=-1/0;S.each(y,function(b){var s=b.getLayout().value;s<d&&(d=s),s>v&&(v=s)}),S.each(y,function(b){var s=new o({type:"color",mappingMethod:"linear",dataExtent:[d,v],visual:f.get("color")}).mapValueToVisual(b.getLayout().value);b.setVisual("color",s);var l=b.getModel().get("itemStyle.color");l!=null&&b.setVisual("color",l)})}})}},37679:function(E,A,u){var o=u(87930);u(29114),u(83260);var S=u(53414),_=u(21188);u(97035),o.registerVisual(S("scatter","circle")),o.registerLayout(_("scatter"))},29114:function(E,A,u){var o=u(74107);E.exports=u(95166).extend({type:"series.scatter",dependencies:["grid","polar","geo","singleAxis","calendar"],getInitialData:function(S,_){return o(this.getSource(),this)},brushSelector:"point",getProgressive:function(){var S=this.option.progressive;return S??(this.option.large?5e3:this.get("progressive"))},getProgressiveThreshold:function(){var S=this.option.progressiveThreshold;return S??(this.option.large?1e4:this.get("progressiveThreshold"))},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8}}})},83260:function(E,A,u){var o=u(87930),S=u(83522),_=u(72631),p=u(21188);o.extendChartView({type:"scatter",render:function(f,y,d){var v=f.getData();this._updateSymbolDraw(v,f).updateData(v),this._finished=!0},incrementalPrepareRender:function(f,y,d){var v=f.getData();this._updateSymbolDraw(v,f).incrementalPrepareUpdate(v),this._finished=!1},incrementalRender:function(f,y,d){this._symbolDraw.incrementalUpdate(f,y.getData()),this._finished=f.end===y.getData().count()},updateTransform:function(f,y,d){var v=f.getData();if(this.group.dirty(),!this._finished||v.count()>1e4||!this._symbolDraw.isPersistent())return{update:!0};var b=p().reset(f);b.progress&&b.progress({start:0,end:v.count()},v),this._symbolDraw.updateLayout(v)},_updateSymbolDraw:function(f,y){var d=this._symbolDraw,v=y.pipelineContext.large;return d&&v===this._isLargeDraw||(d&&d.remove(),d=this._symbolDraw=v?new _:new S,this._isLargeDraw=v,this.group.removeAll()),this.group.add(d.group),d},remove:function(f,y){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},dispose:function(){}})},76954:function(E,A,u){var o=u(87930),S=u(23405);u(93761),u(91149),u(92426);var _=u(59448),p=u(62979),f=u(74278);o.registerVisual(S.curry(_,"sunburst")),o.registerLayout(S.curry(p,"sunburst")),o.registerProcessor(S.curry(f,"sunburst"))},70710:function(E,A,u){var o=u(23405),S=u(51747),_={NONE:"none",ANCESTOR:"ancestor",SELF:"self"};function p(y,d,v){S.Group.call(this);var b=new S.Sector({z2:2});b.seriesIndex=d.seriesIndex;var s=new S.Text({z2:4,silent:y.getModel("label").get("silent")});function l(){s.ignore=s.hoverIgnore}function w(){s.ignore=s.normalIgnore}this.add(b),this.add(s),this.updateData(!0,y,"normal",d,v),this.on("emphasis",l).on("normal",w).on("mouseover",l).on("mouseout",w)}var f=p.prototype;f.updateData=function(y,d,v,b,s){this.node=d,d.piece=this,b=b||this._seriesModel,s=s||this._ecModel;var l,w,I,C,h=this.childAt(0);h.dataIndex=d.dataIndex;var c=d.getModel(),m=d.getLayout(),T=o.extend({},m);T.label=null;var D=function($,V,P){var U=$.getVisual("color"),Y=$.getVisual("visualMeta");Y&&Y.length!==0||(U=null);var Z=$.getModel("itemStyle").get("color");if(!Z){if(U)return U;if($.depth===0)return P.option.color[0];var X=P.option.color.length;Z=P.option.color[function(J){for(var q=J;q.depth>1;)q=q.parentNode;var te=J.getAncestors()[0];return o.indexOf(te.children,q)}($)%X]}return Z}(d,0,s);l=d,w=b,I=D,w.getData().setItemVisual(l.dataIndex,"color",I);var O=c.getModel("itemStyle").getItemStyle();if(v==="normal")C=O;else{var N=c.getModel(v+".itemStyle").getItemStyle();C=o.merge(N,O)}C=o.defaults({lineJoin:"bevel",fill:C.fill||D},C),y?(h.setShape(T),h.shape.r=m.r0,S.updateProps(h,{shape:{r:m.r}},b,d.dataIndex),h.useStyle(C)):typeof C.fill=="object"&&C.fill.type||typeof h.style.fill=="object"&&h.style.fill.type?(S.updateProps(h,{shape:T},b),h.useStyle(C)):S.updateProps(h,{shape:T,style:C},b),this._updateLabel(b,D,v);var z=c.getShallow("cursor");if(z&&h.attr("cursor",z),y){var H=b.getShallow("highlightPolicy");this._initEvents(h,d,b,H)}this._seriesModel=b||this._seriesModel,this._ecModel=s||this._ecModel},f.onEmphasis=function(y){var d=this;this.node.hostTree.root.eachNode(function(v){var b,s,l;v.piece&&(d.node===v?v.piece.updateData(!1,v,"emphasis"):(b=v,s=d.node,(l=y)!==_.NONE&&(l===_.SELF?b===s:l===_.ANCESTOR?b===s||b.isAncestorOf(s):b===s||b.isDescendantOf(s))?v.piece.childAt(0).trigger("highlight"):y!==_.NONE&&v.piece.childAt(0).trigger("downplay")))})},f.onNormal=function(){this.node.hostTree.root.eachNode(function(y){y.piece&&y.piece.updateData(!1,y,"normal")})},f.onHighlight=function(){this.updateData(!1,this.node,"highlight")},f.onDownplay=function(){this.updateData(!1,this.node,"downplay")},f._updateLabel=function(y,d,v){var b,s=this.node.getModel(),l=s.getModel("label"),w=v==="normal"||v==="emphasis"?l:s.getModel(v+".label"),I=s.getModel("emphasis.label"),C=o.retrieve(y.getFormattedLabel(this.node.dataIndex,"normal",null,null,"label"),this.node.name);Z("show")===!1&&(C="");var h=this.node.getLayout(),c=w.get("minAngle");c==null&&(c=l.get("minAngle")),c=c/180*Math.PI;var m=h.endAngle-h.startAngle;c!=null&&Math.abs(m)<c&&(C="");var T=this.childAt(1);S.setLabelStyle(T.style,T.hoverStyle||{},l,I,{defaultText:w.getShallow("show")?C:null,autoColor:d,useInsideStyle:!0});var D=(h.startAngle+h.endAngle)/2,O=Math.cos(D),N=Math.sin(D),z=Z("position"),H=Z("distance")||0,$=Z("align");z==="outside"?(b=h.r+H,$=D>Math.PI/2?"right":"left"):$&&$!=="center"?$==="left"?(b=h.r0+H,D>Math.PI/2&&($="right")):$==="right"&&(b=h.r-H,D>Math.PI/2&&($="left")):(b=(h.r+h.r0)/2,$="center"),T.attr("style",{text:C,textAlign:$,textVerticalAlign:Z("verticalAlign")||"middle",opacity:Z("opacity")});var V=b*O+h.cx,P=b*N+h.cy;T.attr("position",[V,P]);var U=Z("rotate"),Y=0;function Z(X){var J=w.get(X);return J??l.get(X)}U==="radial"?(Y=-D)<-Math.PI/2&&(Y+=Math.PI):U==="tangential"?(Y=Math.PI/2-D)>Math.PI/2?Y-=Math.PI:Y<-Math.PI/2&&(Y+=Math.PI):typeof U=="number"&&(Y=U*Math.PI/180),T.attr("rotation",Y)},f._initEvents=function(y,d,v,b){y.off("mouseover").off("mouseout").off("emphasis").off("normal");var s=this,l=function(){s.onEmphasis(b)},w=function(){s.onNormal()};v.isAnimationEnabled()&&y.on("mouseover",l).on("mouseout",w).on("emphasis",l).on("normal",w).on("downplay",function(){s.onDownplay()}).on("highlight",function(){s.onHighlight()})},o.inherits(p,S.Group),E.exports=p},93761:function(E,A,u){var o=u(23405),S=u(95166),_=u(93455),p=u(75445).wrapTreePathInfo;E.exports=S.extend({type:"series.sunburst",_viewRoot:null,getInitialData:function(f,y){var d={name:f.name,children:f.data};(function s(l){var w=0;o.each(l.children,function(C){s(C);var h=C.value;o.isArray(h)&&(h=h[0]),w+=h});var I=l.value;o.isArray(I)&&(I=I[0]),(I==null||isNaN(I))&&(I=w),I<0&&(I=0),o.isArray(l.value)?l.value[0]=I:l.value=I})(d);var v=f.levels||[],b={};return b.levels=v,_.createTree(d,this,b).data},optionUpdated:function(){this.resetViewRoot()},getDataParams:function(f){var y=S.prototype.getDataParams.apply(this,arguments);return y.treePathInfo=p(this.getData().tree.getNodeByDataIndex(f),this),y},defaultOption:{zlevel:0,z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,percentPrecision:2,stillShowZeroSum:!0,highlightPolicy:"descendant",nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0,emphasis:{}},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1,emphasis:{},highlight:{opacity:1},downplay:{opacity:.9}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicOut",data:[],levels:[],sort:"desc"},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(f){f?this._viewRoot=f:f=this._viewRoot;var y=this.getRawData().tree.root;f&&(f===y||y.contains(f))||(this._viewRoot=y)}})},91149:function(E,A,u){var o=u(23405),S=u(4695),_=u(70710),p=u(99018);E.exports=S.extend({type:"sunburst",init:function(){},render:function(f,y,d,v){var b=this;this.seriesModel=f,this.api=d,this.ecModel=y;var s=f.getData(),l=s.tree.root,w=f.getViewRoot(),I=this.group,C=f.get("renderLabelForZeroData"),h=[];if(w.eachNode(function(T){h.push(T)}),function(T,D){function O(z){return z.getId()}function N(z,H){(function($,V){if(C||!$||$.getValue()||($=null),$!==l&&V!==l){if(V&&V.piece){var P;$?(V.piece.updateData(!1,$,"normal",f,y),s.setItemGraphicEl($.dataIndex,V.piece)):(P=V)&&P.piece&&(I.remove(P.piece),P.piece=null)}else if($){var U=new _($,f,y);I.add(U),s.setItemGraphicEl($.dataIndex,U)}}})(z==null?null:T[z],H==null?null:D[H])}(T.length!==0||D.length!==0)&&new p(D,T,O,O).add(N).update(N).remove(o.curry(N,null)).execute()}(h,this._oldChildren||[]),function(T,D){if(D.depth>0){b.virtualPiece?b.virtualPiece.updateData(!1,T,"normal",f,y):(b.virtualPiece=new _(T,f,y),I.add(b.virtualPiece)),D.piece._onclickEvent&&D.piece.off("click",D.piece._onclickEvent);var O=function(N){b._rootToNode(D.parentNode)};D.piece._onclickEvent=O,b.virtualPiece.on("click",O)}else b.virtualPiece&&(I.remove(b.virtualPiece),b.virtualPiece=null)}(l,w),v&&v.highlight&&v.highlight.piece){var c=f.getShallow("highlightPolicy");v.highlight.piece.onEmphasis(c)}else if(v&&v.unhighlight){var m=this.virtualPiece;!m&&l.children.length&&(m=l.children[0].piece),m&&m.onNormal()}this._initEvents(),this._oldChildren=h},dispose:function(){},_initEvents:function(){var f=this,y=function(d){var v=!1;f.seriesModel.getViewRoot().eachNode(function(b){if(!v&&b.piece&&b.piece.childAt(0)===d.target){var s=b.getModel().get("nodeClick");if(s==="rootToNode")f._rootToNode(b);else if(s==="link"){var l=b.getModel(),w=l.get("link");if(w){var I=l.get("target",!0)||"_blank";window.open(w,I)}}v=!0}})};this.group._onclickEvent&&this.group.off("click",this.group._onclickEvent),this.group.on("click",y),this.group._onclickEvent=y},_rootToNode:function(f){f!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:"sunburstRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:f})},containPoint:function(f,y){var d=y.getData().getItemLayout(0);if(d){var v=f[0]-d.cx,b=f[1]-d.cy,s=Math.sqrt(v*v+b*b);return s<=d.r&&s>=d.r0}}})},92426:function(E,A,u){var o=u(87930),S=u(75445),_="sunburstRootToNode";o.registerAction({type:_,update:"updateView"},function(f,y){y.eachComponent({mainType:"series",subType:"sunburst",query:f},function(d,v){var b=S.retrieveTargetInfo(f,[_],d);if(b){var s=d.getViewRoot();s&&(f.direction=S.aboveViewRoot(s,b.node)?"rollUp":"drillDown"),d.resetViewRoot(b.node)}})});var p="sunburstHighlight";o.registerAction({type:p,update:"updateView"},function(f,y){y.eachComponent({mainType:"series",subType:"sunburst",query:f},function(d,v){var b=S.retrieveTargetInfo(f,[p],d);b&&(f.highlight=b.node)})}),o.registerAction({type:"sunburstUnhighlight",update:"updateView"},function(f,y){y.eachComponent({mainType:"series",subType:"sunburst",query:f},function(d,v){f.unhighlight=!0})})},62979:function(E,A,u){var o=u(54684).parsePercent,S=u(23405),_=2*Math.PI,p=Math.PI/180;E.exports=function(f,y,d,v){y.eachSeriesByType(f,function(b){var s=b.get("center"),l=b.get("radius");S.isArray(l)||(l=[0,l]),S.isArray(s)||(s=[s,s]);var w=d.getWidth(),I=d.getHeight(),C=Math.min(w,I),h=o(s[0],w),c=o(s[1],I),m=o(l[0],C/2),T=o(l[1],C/2),D=-b.get("startAngle")*p,O=b.get("minAngle")*p,N=b.getData().tree.root,z=b.getViewRoot(),H=z.depth,$=b.get("sort");$!=null&&function le(fe,we){var pe=fe.children||[];fe.children=function(ve,be){if(typeof be=="function")return ve.sort(be);var Ee=be==="asc";return ve.sort(function(Re,Ne){var Le=(Re.getValue()-Ne.getValue())*(Ee?1:-1);return Le===0?(Re.dataIndex-Ne.dataIndex)*(Ee?-1:1):Le})}(pe,we),pe.length&&S.each(fe.children,function(ve){le(ve,we)})}(z,$);var V=0;S.each(z.children,function(le){!isNaN(le.getValue())&&V++});var P=z.getValue(),U=Math.PI/(P||V)*2,Y=z.depth>0,Z=(T-m)/(z.height-(Y?-1:1)||1),X=b.get("clockwise"),J=b.get("stillShowZeroSum"),q=_,te=0,re=X?1:-1,ie=function(le,fe){if(le){var we=fe;if(le!==N){var pe=le.getValue(),ve=P===0&&J?U:pe*U;ve<O?(ve=O,q-=O):te+=pe,we=fe+re*ve;var be=le.depth-H-(Y?-1:1),Ee=m+Z*be,Re=m+Z*(be+1),Ne=le.getModel();Ne.get("r0")!=null&&(Ee=o(Ne.get("r0"),C/2)),Ne.get("r")!=null&&(Re=o(Ne.get("r"),C/2)),le.setLayout({angle:ve,startAngle:fe,endAngle:we,clockwise:X,cx:h,cy:c,r0:Ee,r:Re})}if(le.children&&le.children.length){var Le=0;S.each(le.children,function(Se){Le+=ie(Se,fe+Le)})}return we-fe}};if(Y){var ne=2*Math.PI;N.setLayout({angle:ne,startAngle:D,endAngle:D+ne,clockwise:X,cx:h,cy:c,r0:m,r:m+Z})}ie(z,D)})}},4380:function(E,A,u){var o=u(87930);u(11818),u(2970),u(83826);var S=u(45362),_=u(94892),p=u(74278);o.registerLayout(S),o.registerVisual(_),o.registerProcessor(p("themeRiver"))},2970:function(E,A,u){var o=u(95166),S=u(61554),_=u(30186).getDimensionTypeByAxis,p=u(80023),f=u(23405),y=u(51064).groupData,d=u(60653).encodeHTML,v=o.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(b){v.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()}},fixData:function(b){var s=b.length,l=y(b,function(V){return V[2]}),w=[];l.buckets.each(function(V,P){w.push({name:P,dataList:V})});for(var I=w.length,C=-1,h=-1,c=0;c<I;++c){var m=w[c].dataList.length;m>C&&(C=m,h=c)}for(var T=0;T<I;++T)if(T!==h)for(var D=w[T].name,O=0;O<C;++O){for(var N=w[h].dataList[O][0],z=w[T].dataList.length,H=-1,$=0;$<z;++$)if(w[T].dataList[$][0]===N){H=$;break}H===-1&&(b[s]=[],b[s][0]=N,b[s][1]=0,b[s][2]=D,s++)}return b},getInitialData:function(b,s){for(var l=s.queryComponents({mainType:"singleAxis",index:this.get("singleAxisIndex"),id:this.get("singleAxisId")})[0].get("type"),w=f.filter(b.data,function(D){return D[2]!==void 0}),I=this.fixData(w||[]),C=[],h=this.nameMap=f.createHashMap(),c=0,m=0;m<I.length;++m)C.push(I[m][2]),!h.get(I[m][2])&&(h.set(I[m][2],c),c++);var T=new p(S(I,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:_(l)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}),this);return T.initData(I),T},getLayerSeries:function(){for(var b=this.getData(),s=b.count(),l=[],w=0;w<s;++w)l[w]=w;var I=b.mapDimension("single"),C=y(l,function(c){return b.get("name",c)}),h=[];return C.buckets.each(function(c,m){c.sort(function(T,D){return b.get(I,T)-b.get(I,D)}),h.push({name:m,indices:c})}),h},getAxisTooltipData:function(b,s,l){f.isArray(b)||(b=b?[b]:[]);for(var w,I=this.getData(),C=this.getLayerSeries(),h=[],c=C.length,m=0;m<c;++m){for(var T=Number.MAX_VALUE,D=-1,O=C[m].indices.length,N=0;N<O;++N){var z=I.get(b[0],C[m].indices[N]),H=Math.abs(z-s);H<=T&&(w=z,T=H,D=C[m].indices[N])}h.push(D)}return{dataIndices:h,nestestValue:w}},formatTooltip:function(b){var s=this.getData(),l=s.getName(b),w=s.get(s.mapDimension("value"),b);return(isNaN(w)||w==null)&&(w="-"),d(l+" : "+w)},defaultOption:{zlevel:0,z:2,coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",color:"#000",fontSize:11},emphasis:{label:{show:!0}}}});E.exports=v},83826:function(E,A,u){var o=u(87930),S=u(10930).Polygon,_=u(51747),p=u(23405),f=p.bind,y=p.extend,d=u(99018);E.exports=o.extendChartView({type:"themeRiver",init:function(){this._layers=[]},render:function(v,b,s){var l=v.getData(),w=this.group,I=v.getLayerSeries(),C=l.getLayout("layoutInfo"),h=C.rect,c=C.boundaryGap;function m(N){return N.name}w.attr("position",[0,h.y+c[0]]);var T=new d(this._layersSeries||[],I,m,m),D={};function O(N,z,H){var $,V,P,U=this._layers;if(N==="remove")return void w.remove(U[z]);for(var Y=[],Z=[],X=I[z].indices,J=0;J<X.length;J++){var q=l.getItemLayout(X[J]),te=q.x,re=q.y0,ie=q.y;Y.push([te,re]),Z.push([te,re+ie]),$=l.getItemVisual(X[J],"color")}var ne=l.getItemLayout(X[0]),le=l.getItemModel(X[J-1]),fe=le.getModel("label"),we=fe.get("margin");if(N==="add"){var pe,ve,be,Ee,Re=D[z]=new _.Group;V=new S({shape:{points:Y,stackedOnPoints:Z,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),P=new _.Text({style:{x:ne.x-we,y:ne.y0+ne.y/2}}),Re.add(V),Re.add(P),w.add(Re),V.setClipPath((pe=V.getBoundingRect(),ve=v,be=function(){V.removeClipPath()},Ee=new _.Rect({shape:{x:pe.x-10,y:pe.y-10,width:0,height:pe.height+20}}),_.initProps(Ee,{shape:{width:pe.width+20,height:pe.height+20}},ve,be),Ee))}else{var Re=U[H];V=Re.childAt(0),P=Re.childAt(1),w.add(Re),D[z]=Re,_.updateProps(V,{shape:{points:Y,stackedOnPoints:Z}},v),_.updateProps(P,{style:{x:ne.x-we,y:ne.y0+ne.y/2}},v)}var Ne=le.getModel("emphasis.itemStyle"),Le=le.getModel("itemStyle");_.setTextStyle(P.style,fe,{text:fe.get("show")?v.getFormattedLabel(X[J-1],"normal")||l.getName(X[J-1]):null,textVerticalAlign:"middle"}),V.setStyle(y({fill:$},Le.getItemStyle(["color"]))),_.setHoverStyle(V,Ne.getItemStyle())}T.add(f(O,this,"add")).update(f(O,this,"update")).remove(f(O,this,"remove")).execute(),this._layersSeries=I,this._layers=D},dispose:function(){}})},45362:function(E,A,u){var o=u(23405),S=u(54684);function _(p,f,y){if(p.count())for(var d,v=f.coordinateSystem,b=f.getLayerSeries(),s=p.mapDimension("single"),l=p.mapDimension("value"),w=o.map(b,function(O){return o.map(O.indices,function(N){var z=v.dataToPoint(p.get(s,N));return z[1]=p.get(l,N),z})}),I=function(O){for(var N,z=O.length,H=O[0].length,$=[],V=[],P=0,U={},Y=0;Y<H;++Y){for(var Z=0,N=0;Z<z;++Z)N+=O[Z][Y][1];N>P&&(P=N),$.push(N)}for(var X=0;X<H;++X)V[X]=(P-$[X])/2;P=0;for(var J=0;J<H;++J){var q=$[J]+V[J];q>P&&(P=q)}return U.y0=V,U.max=P,U}(w),C=I.y0,h=y/I.max,c=b.length,m=b[0].indices.length,T=0;T<m;++T){d=C[T]*h,p.setItemLayout(b[0].indices[T],{layerIndex:0,x:w[0][T][0],y0:d,y:w[0][T][1]*h});for(var D=1;D<c;++D)d+=w[D-1][T][1]*h,p.setItemLayout(b[D].indices[T],{layerIndex:D,x:w[D][T][0],y0:d,y:w[D][T][1]*h})}}E.exports=function(p,f){p.eachSeriesByType("themeRiver",function(y){var d=y.getData(),v=y.coordinateSystem,b={},s=v.getRect();b.rect=s;var l=y.get("boundaryGap"),w=v.getAxis();b.boundaryGap=l,w.orient==="horizontal"?(l[0]=S.parsePercent(l[0],s.height),l[1]=S.parsePercent(l[1],s.height),_(d,y,s.height-l[0]-l[1])):(l[0]=S.parsePercent(l[0],s.width),l[1]=S.parsePercent(l[1],s.width),_(d,y,s.width-l[0]-l[1])),d.setLayout("layoutInfo",b)})}},94892:function(E,A,u){var o=u(23405).createHashMap;E.exports=function(S){S.eachSeriesByType("themeRiver",function(_){var p=_.getData(),f=_.getRawData(),y=_.get("color"),d=o();p.each(function(v){d.set(p.getRawIndex(v),v)}),f.each(function(v){var b=f.getName(v),s=y[(_.nameMap.get(b)-1)%y.length];f.setItemVisual(v,"color",s);var l=d.get(v);l!=null&&p.setItemVisual(l,"color",s)})})}},80942:function(E,A,u){var o=u(87930);u(83214),u(21585),u(23574);var S=u(53414),_=u(11307);o.registerVisual(S("tree","circle")),o.registerLayout(_)},83214:function(E,A,u){var o=u(95166),S=u(93455),_=u(60653).encodeHTML;E.exports=o.extend({type:"series.tree",layoutInfo:null,layoutMode:"box",getInitialData:function(p){var f={name:p.name,children:p.data},y=p.leaves||{},d={};d.leaves=y;var v=S.createTree(f,this,d),b=0;v.eachNode("preorder",function(l){l.depth>b&&(b=l.depth)});var s=p.expandAndCollapse&&p.initialTreeDepth>=0?p.initialTreeDepth:b;return v.root.eachNode("preorder",function(l){var w=l.hostTree.data.getRawDataItem(l.dataIndex);l.isExpand=w&&w.collapsed!=null?!w.collapsed:l.depth<=s}),v.data},getOrient:function(){var p=this.get("orient");return p==="horizontal"?p="LR":p==="vertical"&&(p="TB"),p},setZoom:function(p){this.option.zoom=p},setCenter:function(p){this.option.center=p},formatTooltip:function(p){for(var f=this.getData().tree,y=f.root.children[0],d=f.getNodeByDataIndex(p),v=d.getValue(),b=d.name;d&&d!==y;)b=d.parentNode.name+"."+b,d=d.parentNode;return _(b+(isNaN(v)||v==null?"":" : "+v))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderColor:"#c23531",borderWidth:1.5},label:{show:!0,color:"#555"},leaves:{label:{show:!0}},animationEasing:"linear",animationDuration:700,animationDurationUpdate:1e3}})},21585:function(E,A,u){var o=u(23405),S=u(51747),_=u(59470),p=u(87212).radialCoordinate,f=u(87930),y=u(6973),d=u(42458),v=u(6463),b=u(55104),s=u(11731).onIrrelevantElement;function l(c,m){var T=c.getItemLayout(m);return T&&!isNaN(T.x)&&!isNaN(T.y)&&c.getItemVisual(m,"symbol")!=="none"}function w(c,m,T){return T.itemModel=m,T.itemStyle=m.getModel("itemStyle").getItemStyle(),T.hoverItemStyle=m.getModel("emphasis.itemStyle").getItemStyle(),T.lineStyle=m.getModel("lineStyle").getLineStyle(),T.labelModel=m.getModel("label"),T.hoverLabelModel=m.getModel("emphasis.label"),c.isExpand===!1&&c.children.length!==0?T.symbolInnerColor=T.itemStyle.fill:T.symbolInnerColor="#fff",T}function I(c,m,T,D,O,V){var z=!T,H=c.tree.getNodeByDataIndex(m),$=H.getModel(),V=w(H,$,V),P=c.tree.root,U=H.parentNode===P?H:H.parentNode||H,Y=c.getItemGraphicEl(U.dataIndex),Z=U.getLayout(),X=Y?{x:Y.position[0],y:Y.position[1],rawX:Y.__radialOldRawX,rawY:Y.__radialOldRawY}:Z,J=H.getLayout();z?(T=new _(c,m,V)).attr("position",[X.x,X.y]):T.updateData(c,m,V),T.__radialOldRawX=T.__radialRawX,T.__radialOldRawY=T.__radialRawY,T.__radialRawX=J.rawX,T.__radialRawY=J.rawY,D.add(T),c.setItemGraphicEl(m,T),S.updateProps(T,{position:[J.x,J.y]},O);var q=T.getSymbolPath();if(V.layout==="radial"){var te,re,ie=P.children[0],ne=ie.getLayout(),le=ie.children.length;if(J.x===ne.x&&H.isExpand===!0){var fe={};fe.x=(ie.children[0].getLayout().x+ie.children[le-1].getLayout().x)/2,fe.y=(ie.children[0].getLayout().y+ie.children[le-1].getLayout().y)/2,(te=Math.atan2(fe.y-ne.y,fe.x-ne.x))<0&&(te=2*Math.PI+te),(re=fe.x<ne.x)&&(te-=Math.PI)}else(te=Math.atan2(J.y-ne.y,J.x-ne.x))<0&&(te=2*Math.PI+te),H.children.length===0||H.children.length!==0&&H.isExpand===!1?(re=J.x<ne.x)&&(te-=Math.PI):(re=J.x>ne.x)||(te-=Math.PI);var we=re?"left":"right";q.setStyle({textPosition:we,textRotation:-te,textOrigin:"center",verticalAlign:"middle"})}if(H.parentNode&&H.parentNode!==P){var pe=T.__edge;pe||(pe=T.__edge=new S.BezierCurve({shape:h(V,X,X),style:o.defaults({opacity:0,strokeNoScale:!0},V.lineStyle)})),S.updateProps(pe,{shape:h(V,Z,J),style:{opacity:1}},O),D.add(pe)}}function C(c,m,T,D,O,N){for(var z,H=c.tree.getNodeByDataIndex(m),$=c.tree.root,V=H.getModel(),N=w(H,V,N),P=H.parentNode===$?H:H.parentNode||H;(z=P.getLayout())==null;)P=P.parentNode===$?P:P.parentNode||P;S.updateProps(T,{position:[z.x+1,z.y+1]},O,function(){D.remove(T),c.setItemGraphicEl(m,null)}),T.fadeOut(null,{keepLabel:!0});var U=T.__edge;U&&S.updateProps(U,{shape:h(N,z,z),style:{opacity:0}},O,function(){D.remove(U)})}function h(c,m,T){var D,O,N,z,H,$,V,P,U=c.orient;if(c.layout==="radial"){H=m.rawX,V=m.rawY,$=T.rawX,P=T.rawY;var Y=p(H,V),Z=p(H,V+(P-V)*c.curvature),X=p($,P+(V-P)*c.curvature),J=p($,P);return{x1:Y.x,y1:Y.y,x2:J.x,y2:J.y,cpx1:Z.x,cpy1:Z.y,cpx2:X.x,cpy2:X.y}}return H=m.x,V=m.y,$=T.x,P=T.y,(U==="LR"||U==="RL")&&(D=H+($-H)*c.curvature,O=V,N=$+(H-$)*c.curvature,z=P),(U==="TB"||U==="BT")&&(D=H,O=V+(P-V)*c.curvature,N=$,z=P+(V-P)*c.curvature),{x1:H,y1:V,x2:$,y2:P,cpx1:D,cpy1:O,cpx2:N,cpy2:z}}E.exports=f.extendChartView({type:"tree",init:function(c,m){this._oldTree,this._mainGroup=new S.Group,this._controller=new b(m.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},render:function(c,m,T,D){var O=c.getData(),N=c.layoutInfo,z=this._mainGroup,H=c.get("layout");H==="radial"?z.attr("position",[N.x+N.width/2,N.y+N.height/2]):z.attr("position",[N.x,N.y]),this._updateViewCoordSys(c),this._updateController(c,m,T);var $=this._data,V={expandAndCollapse:c.get("expandAndCollapse"),layout:H,orient:c.getOrient(),curvature:c.get("lineStyle.curveness"),symbolRotate:c.get("symbolRotate"),symbolOffset:c.get("symbolOffset"),hoverAnimation:c.get("hoverAnimation"),useNameLabel:!0,fadeIn:!0};O.diff($).add(function(P){l(O,P)&&I(O,P,null,z,c,V)}).update(function(P,U){var Y=$.getItemGraphicEl(U);if(!l(O,P)){Y&&C($,U,Y,z,c,V);return}I(O,P,Y,z,c,V)}).remove(function(P){var U=$.getItemGraphicEl(P);U&&C($,P,U,z,c,V)}).execute(),this._nodeScaleRatio=c.get("nodeScaleRatio"),this._updateNodeAndLinkScale(c),V.expandAndCollapse===!0&&O.eachItemGraphicEl(function(P,U){P.off("click").on("click",function(){T.dispatchAction({type:"treeExpandAndCollapse",seriesId:c.id,dataIndex:U})})}),this._data=O},_updateViewCoordSys:function(c){var m=c.getData(),T=[];m.each(function(z){var H=m.getItemLayout(z);!H||isNaN(H.x)||isNaN(H.y)||T.push([+H.x,+H.y])});var D=[],O=[];y.fromPoints(T,D,O),O[0]-D[0]==0&&(O[0]+=1,D[0]-=1),O[1]-D[1]==0&&(O[1]+=1,D[1]-=1);var N=c.coordinateSystem=new d;N.zoomLimit=c.get("scaleLimit"),N.setBoundingRect(D[0],D[1],O[0]-D[0],O[1]-D[1]),N.setCenter(c.get("center")),N.setZoom(c.get("zoom")),this.group.attr({position:N.position,scale:N.scale}),this._viewCoordSys=N},_updateController:function(c,m,T){var D=this._controller,O=this._controllerHost,N=this.group;D.setPointerChecker(function(z,H,$){var V=N.getBoundingRect();return V.applyTransform(N.transform),V.contain(H,$)&&!s(z,T,c)}),D.enable(c.get("roam")),O.zoomLimit=c.get("scaleLimit"),O.zoom=c.coordinateSystem.getZoom(),D.off("pan").off("zoom").on("pan",function(z){v.updateViewOnPan(O,z.dx,z.dy),T.dispatchAction({seriesId:c.id,type:"treeRoam",dx:z.dx,dy:z.dy})},this).on("zoom",function(z){v.updateViewOnZoom(O,z.scale,z.originX,z.originY),T.dispatchAction({seriesId:c.id,type:"treeRoam",zoom:z.scale,originX:z.originX,originY:z.originY}),this._updateNodeAndLinkScale(c)},this)},_updateNodeAndLinkScale:function(c){var m=c.getData(),T=this._getNodeGlobalScale(c),D=[T,T];m.eachItemGraphicEl(function(O,N){O.attr("scale",D)})},_getNodeGlobalScale:function(c){var m=c.coordinateSystem;if(m.type!=="view")return 1;var T=this._nodeScaleRatio,D=m.scale,O=D&&D[0]||1;return((m.getZoom()-1)*T+1)/O},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={}},remove:function(){this._mainGroup.removeAll(),this._data=null}})},87212:function(E,A,u){var o=u(62751);function S(f){var y=f.children;return y.length&&f.isExpand?y[y.length-1]:f.hierNode.thread}function _(f){var y=f.children;return y.length&&f.isExpand?y[0]:f.hierNode.thread}function p(f,y){return f.parentNode===y.parentNode?1:2}A.init=function(f){f.hierNode={defaultAncestor:null,ancestor:f,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var y,d,v=[f];y=v.pop();)if(d=y.children,y.isExpand&&d.length)for(var b=d.length,s=b-1;s>=0;s--){var l=d[s];l.hierNode={defaultAncestor:null,ancestor:l,prelim:0,modifier:0,change:0,shift:0,i:s,thread:null},v.push(l)}},A.firstWalk=function(f,y){var d=f.isExpand?f.children:[],v=f.parentNode.children,b=f.hierNode.i?v[f.hierNode.i-1]:null;if(d.length){(function(l){for(var w=l.children,I=w.length,C=0,h=0;--I>=0;){var c=w[I];c.hierNode.prelim+=C,c.hierNode.modifier+=C,h+=c.hierNode.change,C+=c.hierNode.shift+h}})(f);var s=(d[0].hierNode.prelim+d[d.length-1].hierNode.prelim)/2;b?(f.hierNode.prelim=b.hierNode.prelim+y(f,b),f.hierNode.modifier=f.hierNode.prelim-s):f.hierNode.prelim=s}else b&&(f.hierNode.prelim=b.hierNode.prelim+y(f,b));f.parentNode.hierNode.defaultAncestor=function(l,w,I,C){if(w){for(var h=l,c=l,m=c.parentNode.children[0],T=w,D=h.hierNode.modifier,O=c.hierNode.modifier,N=m.hierNode.modifier,z=T.hierNode.modifier;T=S(T),c=_(c),T&&c;){h=S(h),m=_(m),h.hierNode.ancestor=l;var H,$,V,P=T.hierNode.prelim+z-c.hierNode.prelim-O+C(T,c);P>0&&(function(U,Y,Z){var X=Z/(Y.hierNode.i-U.hierNode.i);Y.hierNode.change-=X,Y.hierNode.shift+=Z,Y.hierNode.modifier+=Z,Y.hierNode.prelim+=Z,U.hierNode.change+=X}((H=T,$=l,V=I,H.hierNode.ancestor.parentNode===$.parentNode?H.hierNode.ancestor:V),l,P),O+=P,D+=P),z+=T.hierNode.modifier,O+=c.hierNode.modifier,D+=h.hierNode.modifier,N+=m.hierNode.modifier}T&&!S(h)&&(h.hierNode.thread=T,h.hierNode.modifier+=z-D),c&&!_(m)&&(m.hierNode.thread=c,m.hierNode.modifier+=O-N,I=l)}return I}(f,b,f.parentNode.hierNode.defaultAncestor||v[0],y)},A.secondWalk=function(f){var y=f.hierNode.prelim+f.parentNode.hierNode.modifier;f.setLayout({x:y},!0),f.hierNode.modifier+=f.parentNode.hierNode.modifier},A.separation=function(f){return arguments.length?f:p},A.radialCoordinate=function(f,y){var d={};return d.x=y*Math.cos(f-=Math.PI/2),d.y=y*Math.sin(f),d},A.getViewRect=function(f,y){return o.getLayoutRect(f.getBoxLayoutParams(),{width:y.getWidth(),height:y.getHeight()})}},61850:function(E,A){A.eachAfter=function(u,o,S){for(var _,p=[u],f=[];_=p.pop();)if(f.push(_),_.isExpand){var y=_.children;if(y.length)for(var d=0;d<y.length;d++)p.push(y[d])}for(;_=f.pop();)o(_,S)},A.eachBefore=function(u,o){for(var S,_=[u];S=_.pop();)if(o(S),S.isExpand){var p=S.children;if(p.length)for(var f=p.length-1;f>=0;f--)_.push(p[f])}}},23574:function(E,A,u){var o=u(87930),S=u(7207).updateCenterAndZoom;o.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(_,p){p.eachComponent({mainType:"series",subType:"tree",query:_},function(f){var y=_.dataIndex,d=f.getData().tree.getNodeByDataIndex(y);d.isExpand=!d.isExpand})}),o.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(_,p){p.eachComponent({mainType:"series",subType:"tree",query:_},function(f){var y=S(f.coordinateSystem,_);f.setCenter&&f.setCenter(y.center),f.setZoom&&f.setZoom(y.zoom)})})},11307:function(E,A,u){var o=u(61850),S=o.eachAfter,_=o.eachBefore,p=u(87212),f=p.init,y=p.firstWalk,d=p.secondWalk,v=p.separation,b=p.radialCoordinate,s=p.getViewRect;E.exports=function(l,w){l.eachSeriesByType("tree",function(I){(function(C,h){var c=s(C,h);C.layoutInfo=c;var m=C.get("layout"),T=0,D=0,O=null;m==="radial"?(T=2*Math.PI,D=Math.min(c.height,c.width)/2,O=v(function(te,re){return(te.parentNode===re.parentNode?1:2)/te.depth})):(T=c.width,D=c.height,O=v());var N=C.getData().tree.root,z=N.children[0];if(z){f(N),S(z,y,O),N.hierNode.modifier=-z.hierNode.prelim,_(z,d);var H=z,$=z,V=z;_(z,function(te){var re=te.getLayout().x;re<H.getLayout().x&&(H=te),re>$.getLayout().x&&($=te),te.depth>V.depth&&(V=te)});var P=H===$?1:O(H,$)/2,U=P-H.getLayout().x,Y=0,Z=0,X=0,J=0;if(m==="radial")Y=T/($.getLayout().x+P+U),Z=D/(V.depth-1||1),_(z,function(te){X=(te.getLayout().x+U)*Y,J=(te.depth-1)*Z;var re=b(X,J);te.setLayout({x:re.x,y:re.y,rawX:X,rawY:J},!0)});else{var q=C.getOrient();q==="RL"||q==="LR"?(Z=D/($.getLayout().x+P+U),Y=T/(V.depth-1||1),_(z,function(te){J=(te.getLayout().x+U)*Z,X=q==="LR"?(te.depth-1)*Y:T-(te.depth-1)*Y,te.setLayout({x:X,y:J},!0)})):(q==="TB"||q==="BT")&&(Y=T/($.getLayout().x+P+U),Z=D/(V.depth-1||1),_(z,function(te){X=(te.getLayout().x+U)*Y,J=q==="TB"?(te.depth-1)*Z:D-(te.depth-1)*Z,te.setLayout({x:X,y:J},!0)}))}}})(I,w)})}},64219:function(E,A,u){var o=u(87930);u(72076),u(43300),u(92336);var S=u(10431),_=u(92795);o.registerVisual(S),o.registerLayout(_)},76402:function(E,A,u){var o=u(51747),S=u(62751),_=u(23405),p=u(75445).wrapTreePathInfo;function f(y){this.group=new o.Group,y.add(this.group)}f.prototype={constructor:f,render:function(y,d,v,b){var s=y.getModel("breadcrumb"),l=this.group;if(l.removeAll(),s.get("show")&&v){var w=s.getModel("itemStyle"),I=w.getModel("textStyle"),C={pos:{left:s.get("left"),right:s.get("right"),top:s.get("top"),bottom:s.get("bottom")},box:{width:d.getWidth(),height:d.getHeight()},emptyItemWidth:s.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(v,C,I),this._renderContent(y,C,w,I,b),S.positionElement(l,C.pos,C.box)}},_prepare:function(y,d,v){for(var b=y;b;b=b.parentNode){var s=b.getModel().get("name"),l=Math.max(v.getTextRect(s).width+16,d.emptyItemWidth);d.totalWidth+=l+8,d.renderList.push({node:b,text:s,width:l})}},_renderContent:function(y,d,v,b,s){for(var l=0,w=d.emptyItemWidth,I=y.get("breadcrumb.height"),C=S.getAvailableSize(d.pos,d.box),h=d.totalWidth,c=d.renderList,m=c.length-1;m>=0;m--){var T,D,O,N=c[m],z=N.node,H=N.width,$=N.text;h>C.width&&(h-=H-w,H=w,$=null);var V=new o.Polygon({shape:{points:function(P,U,Y,Z,X,J){var q=[[X?P:P-5,0],[P+Y,U],[P+Y,U+Z],[X?P:P-5,U+Z]];return J||q.splice(2,0,[P+Y+5,U+Z/2]),X||q.push([P,U+Z/2]),q}(l,0,H,I,m===c.length-1,m===0)},style:_.defaults(v.getItemStyle(),{lineJoin:"bevel",text:$,textFill:b.getTextColor(),textFont:b.getFont()}),z:10,onclick:_.curry(s,z)});this.group.add(V),T=V,D=y,O=z,T.eventData={componentType:"series",componentSubType:"treemap",componentIndex:D.componentIndex,seriesIndex:D.componentIndex,seriesName:D.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:O&&O.dataIndex,name:O&&O.name},treePathInfo:O&&p(O,D)},l+=H+8}},remove:function(){this.group.removeAll()}},E.exports=f},72076:function(E,A,u){var o=u(23405),S=u(95166),_=u(93455),p=u(46082),f=u(60653),y=f.encodeHTML,d=f.addCommas,v=u(75445).wrapTreePathInfo;E.exports=S.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],_viewRoot:null,defaultOption:{progressive:0,hoverLayerThreshold:1/0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",borderColor:"rgba(255,255,255,0.7)",borderWidth:1,shadowColor:"rgba(150,150,150,1)",shadowBlur:3,shadowOffsetX:0,shadowOffsetY:0,textStyle:{color:"#fff"}},emphasis:{textStyle:{}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0},upperLabel:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},getInitialData:function(b,s){var l={name:b.name,children:b.data};(function C(h){var c=0;o.each(h.children,function(T){C(T);var D=T.value;o.isArray(D)&&(D=D[0]),c+=D});var m=h.value;o.isArray(m)&&(m=m[0]),(m==null||isNaN(m))&&(m=c),m<0&&(m=0),o.isArray(h.value)?h.value[0]=m:h.value=m})(l);var w=b.levels||[];w=b.levels=function(C,h){var c,m=h.get("color");if(m)return C=C||[],o.each(C,function(T){var D=new p(T),O=D.get("color");(D.get("itemStyle.color")||O&&O!=="none")&&(c=!0)}),c||((C[0]||(C[0]={})).color=m.slice()),C}(w,s);var I={};return I.levels=w,_.createTree(l,this,I).data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(b){var s=this.getData(),l=this.getRawValue(b),w=o.isArray(l)?d(l[0]):d(l);return y(s.getName(b)+": "+w)},getDataParams:function(b){var s=S.prototype.getDataParams.apply(this,arguments);return s.treePathInfo=v(this.getData().tree.getNodeByDataIndex(b),this),s},setLayoutInfo:function(b){this.layoutInfo=this.layoutInfo||{},o.extend(this.layoutInfo,b)},mapIdToIndex:function(b){var s=this._idIndexMap;s||(s=this._idIndexMap=o.createHashMap(),this._idIndexMapCount=0);var l=s.get(b);return l==null&&s.set(b,l=this._idIndexMapCount++),l},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(b){b?this._viewRoot=b:b=this._viewRoot;var s=this.getRawData().tree.root;b&&(b===s||s.contains(b))||(this._viewRoot=s)}})},43300:function(E,A,u){var o=u(87930),S=u(23405),_=u(51747),p=u(99018),f=u(75445),y=u(76402),d=u(55104),v=u(28761),b=u(79442),s=u(7762),l=u(74106),w=S.bind,I=_.Group,C=_.Rect,h=S.each,c=["label"],m=["emphasis","label"],T=["upperLabel"],D=["emphasis","upperLabel"],O=l([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),N=function($){var V=O($);return V.stroke=V.fill=V.lineWidth=null,V};function z(){return{nodeGroup:[],background:[],content:[]}}function H($,V,P,U,Y,Z,X,J,q,te){if(X){var re=X.getLayout();if(re&&re.isInView){var ie=re.width,ne=re.height,le=re.borderWidth,fe=re.invisible,we=X.getRawIndex(),pe=J&&J.getRawIndex(),ve=X.viewChildren,be=re.upperHeight,Ee=ve&&ve.length,Re=X.getModel("itemStyle"),Ne=X.getModel("emphasis.itemStyle"),Le=Qe("nodeGroup",I);if(Le){if(q.add(Le),Le.attr("position",[re.x||0,re.y||0]),Le.__tmNodeWidth=ie,Le.__tmNodeHeight=ne,re.isAboveViewRoot)return Le;var Se=Qe("background",C,te,1);if(Se&&(Ie=Le,_e=Se,Ae=Ee&&re.upperHeight,_e.dataIndex=X.dataIndex,_e.seriesIndex=$.seriesIndex,_e.setShape({x:0,y:0,width:ie,height:ne}),ue=X.getVisual("borderColor",!0),ke=Ne.get("borderColor"),yt(_e,function(){var At=N(Re);At.fill=ue;var Xt=O(Ne);if(Xt.fill=ke,Ae){var cn=ie-2*le;st(At,Xt,ue,cn,be,{x:le,y:0,width:cn,height:be})}else At.text=Xt.text=null;_e.setStyle(At),_.setHoverStyle(_e,Xt)}),Ie.add(_e)),!Ee){var Ie,_e,Ae,ue,ke,Pe,Ve,je,it,rt,mt=Qe("content",C,te,2);mt&&(Pe=Le,(Ve=mt).dataIndex=X.dataIndex,Ve.seriesIndex=$.seriesIndex,je=Math.max(ie-2*le,0),it=Math.max(ne-2*le,0),Ve.culling=!0,Ve.setShape({x:le,y:le,width:je,height:it}),rt=X.getVisual("color",!0),yt(Ve,function(){var At=N(Re);At.fill=rt;var Xt=O(Ne);st(At,Xt,rt,je,it),Ve.setStyle(At),_.setHoverStyle(Ve,Xt)}),Pe.add(Ve))}return Le}}}function yt(At,Xt){fe?At.invisible||Z.push(At):(Xt(),At.__tmWillVisible||(At.invisible=!1))}function st(At,Xt,cn,Sn,Vn,bn){var En=X.getModel(),pn=S.retrieve($.getFormattedLabel(X.dataIndex,"normal",null,null,bn?"upperLabel":"label"),En.get("name"));if(!bn&&re.isLeafRoot){var Un=$.get("drillDownIcon",!0);pn=Un?Un+" "+pn:pn}var Pn=En.getModel(bn?T:c),On=En.getModel(bn?D:m),Ht=Pn.getShallow("show");_.setLabelStyle(At,Xt,Pn,On,{defaultText:Ht?pn:null,autoColor:cn,isRectText:!0}),bn&&(At.textRect=S.clone(bn)),At.truncate=Ht&&Pn.get("ellipsis")?{outerWidth:Sn,outerHeight:Vn,minChar:2}:null}function Qe(At,Xt,cn,Sn){var Vn,bn,En,pn,Un=pe!=null&&P[At][pe],Pn=Y[At];return Un?(P[At][pe]=null,Vn=Pn,bn=Un,En=At,(Vn[we]={}).old=En==="nodeGroup"?bn.position.slice():S.extend({},bn.shape)):fe||((Un=new Xt({z:((pn=10*cn+Sn)-1)/pn})).__tmDepth=cn,Un.__tmStorageName=At,function(On,Ht,Mt){var Gt=On[we]={},Bt=X.parentNode;if(Bt&&(!U||U.direction==="drillDown")){var Ge=0,et=0,vt=Y.background[Bt.getRawIndex()];!U&&vt&&vt.old&&(Ge=vt.old.width,et=vt.old.height),Gt.old=Mt==="nodeGroup"?[0,et]:{x:Ge,y:et,width:0,height:0}}Gt.fadein=Mt!=="nodeGroup"}(Pn,0,At)),V[At][we]=Un}}E.exports=o.extendChartView({type:"treemap",init:function($,V){this._containerGroup,this._storage=z(),this._oldTree,this._breadcrumb,this._controller,this._state="ready"},render:function($,V,P,U){var Y=V.findComponents({mainType:"series",subType:"treemap",query:U});if(!(0>S.indexOf(Y,$))){this.seriesModel=$,this.api=P,this.ecModel=V;var Z=f.retrieveTargetInfo(U,["treemapZoomToNode","treemapRootToNode"],$),X=U&&U.type,J=$.layoutInfo,q=!this._oldTree,te=this._storage,re=X==="treemapRootToNode"&&Z&&te?{rootNodeGroup:te.nodeGroup[Z.node.getRawIndex()],direction:U.direction}:null,ie=this._giveContainerGroup(J),ne=this._doRender(ie,$,re);q||X&&X!=="treemapZoomToNode"&&X!=="treemapRootToNode"?ne.renderFinally():this._doAnimation(ie,ne,$,re),this._resetController(P),this._renderBreadcrumb($,P,Z)}},_giveContainerGroup:function($){var V=this._containerGroup;return V||(V=this._containerGroup=new I,this._initEvents(V),this.group.add(V)),V.attr("position",[$.x,$.y]),V},_doRender:function($,V,P){var U,Y,Z=V.getData().tree,X=this._oldTree,J=z(),q=z(),te=this._storage,re=[],ie=S.curry(H,V,q,te,P,J,re);(function le(fe,we,pe,ve,be){function Ee(Ne){return Ne.getId()}function Re(Ne,Le){var Se=Ne!=null?fe[Ne]:null,Ie=Le!=null?we[Le]:null,_e=ie(Se,Ie,pe,be);_e&&le(Se&&Se.viewChildren||[],Ie&&Ie.viewChildren||[],_e,ve,be+1)}ve?(we=fe,h(fe,function(Ne,Le){Ne.isRemoved()||Re(Le,Le)})):new p(we,fe,Ee,Ee).add(Re).update(Re).remove(S.curry(Re,null)).execute()})(Z.root?[Z.root]:[],X&&X.root?[X.root]:[],$,Z===X||!X,0);var ne=(U=te,Y=z(),U&&h(U,function(le,fe){var we=Y[fe];h(le,function(pe){pe&&(we.push(pe),pe.__tmWillDelete=1)})}),Y);return this._oldTree=Z,this._storage=q,{lastsForAnimation:J,willDeleteEls:ne,renderFinally:function(){h(ne,function(le){h(le,function(fe){fe.parent&&fe.parent.remove(fe)})}),h(re,function(le){le.invisible=!0,le.dirty()})}}},_doAnimation:function($,V,P,U){if(P.get("animation")){var Y=P.get("animationDurationUpdate"),Z=P.get("animationEasing"),X=s.createWrap();h(V.willDeleteEls,function(J,q){h(J,function(te,re){if(!te.invisible){var ie,ne=te.parent;if(U&&U.direction==="drillDown")ie=ne===U.rootNodeGroup?{shape:{x:0,y:0,width:ne.__tmNodeWidth,height:ne.__tmNodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var le=0,fe=0;ne.__tmWillDelete||(le=ne.__tmNodeWidth/2,fe=ne.__tmNodeHeight/2),ie=q==="nodeGroup"?{position:[le,fe],style:{opacity:0}}:{shape:{x:le,y:fe,width:0,height:0},style:{opacity:0}}}ie&&X.add(te,ie,Y,Z)}})}),h(this._storage,function(J,q){h(J,function(te,re){var ie=V.lastsForAnimation[q][re],ne={};ie&&(q==="nodeGroup"?ie.old&&(ne.position=te.position.slice(),te.attr("position",ie.old)):(ie.old&&(ne.shape=S.extend({},te.shape),te.setShape(ie.old)),ie.fadein?(te.setStyle("opacity",0),ne.style={opacity:1}):te.style.opacity!==1&&(ne.style={opacity:1})),X.add(te,ne,Y,Z))})},this),this._state="animating",X.done(w(function(){this._state="ready",V.renderFinally()},this)).start()}},_resetController:function($){var V=this._controller;V||((V=this._controller=new d($.getZr())).enable(this.seriesModel.get("roam")),V.on("pan",w(this._onPan,this)),V.on("zoom",w(this._onZoom,this)));var P=new v(0,0,$.getWidth(),$.getHeight());V.setPointerChecker(function(U,Y,Z){return P.contain(Y,Z)})},_clearController:function(){var $=this._controller;$&&($.dispose(),$=null)},_onPan:function($){if(this._state!=="animating"&&(Math.abs($.dx)>3||Math.abs($.dy)>3)){var V=this.seriesModel.getData().tree.root;if(V){var P=V.getLayout();P&&this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:P.x+$.dx,y:P.y+$.dy,width:P.width,height:P.height}})}}},_onZoom:function($){var V=$.originX,P=$.originY;if(this._state!=="animating"){var U=this.seriesModel.getData().tree.root;if(!U)return;var Y=U.getLayout();if(!Y)return;var Z=new v(Y.x,Y.y,Y.width,Y.height),X=this.seriesModel.layoutInfo;V-=X.x,P-=X.y;var J=b.create();b.translate(J,J,[-V,-P]),b.scale(J,J,[$.scale,$.scale]),b.translate(J,J,[V,P]),Z.applyTransform(J),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:Z.x,y:Z.y,width:Z.width,height:Z.height}})}},_initEvents:function($){$.on("click",function(V){if(this._state==="ready"){var P=this.seriesModel.get("nodeClick",!0);if(P){var U=this.findTarget(V.offsetX,V.offsetY);if(U){var Y=U.node;if(Y.getLayout().isLeafRoot)this._rootToNode(U);else if(P==="zoomToNode")this._zoomToNode(U);else if(P==="link"){var Z=Y.hostTree.data.getItemModel(Y.dataIndex),X=Z.get("link",!0),J=Z.get("target",!0)||"blank";X&&window.open(X,J)}}}}},this)},_renderBreadcrumb:function($,V,P){!P&&((P=$.get("leafDepth",!0)!=null?{node:$.getViewRoot()}:this.findTarget(V.getWidth()/2,V.getHeight()/2))||(P={node:$.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new y(this.group))).render($,V,P.node,w(function(U){this._state!=="animating"&&(f.aboveViewRoot($.getViewRoot(),U)?this._rootToNode({node:U}):this._zoomToNode({node:U}))},this))},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=z(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},dispose:function(){this._clearController()},_zoomToNode:function($){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:$.node})},_rootToNode:function($){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:$.node})},findTarget:function($,V){var P;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},function(U){var Y=this._storage.background[U.getRawIndex()];if(Y){var Z=Y.transformCoordToLocal($,V),X=Y.shape;if(!(X.x<=Z[0])||!(Z[0]<=X.x+X.width)||!(X.y<=Z[1])||!(Z[1]<=X.y+X.height))return!1;P={node:U,offsetX:Z[0],offsetY:Z[1]}}},this),P}})},92336:function(E,A,u){for(var o=u(87930),S=u(75445),_=function(){},p=["treemapZoomToNode","treemapRender","treemapMove"],f=0;f<p.length;f++)o.registerAction({type:p[f],update:"updateView"},_);o.registerAction({type:"treemapRootToNode",update:"updateView"},function(y,d){d.eachComponent({mainType:"series",subType:"treemap",query:y},function(v,b){var s=S.retrieveTargetInfo(y,["treemapZoomToNode","treemapRootToNode"],v);if(s){var l=v.getViewRoot();l&&(y.direction=S.aboveViewRoot(l,s.node)?"rollUp":"drillDown"),v.resetViewRoot(s.node)}})})},92795:function(E,A,u){var o=u(23405),S=u(28761),_=u(54684),p=_.parsePercent,f=_.MAX_SAFE_INTEGER,y=u(62751),d=u(75445),v=Math.max,b=Math.min,s=o.retrieve,l=o.each,w=["itemStyle","borderWidth"],I=["itemStyle","gapWidth"],C=["upperLabel","show"],h=["upperLabel","height"];function c(T,D,O,N,z){var H=+(D!==O.width),$=1-H,V=["x","y"],P=["width","height"],U=O[V[H]],Y=D?T.area/D:0;(z||Y>O[P[$]])&&(Y=O[P[$]]);for(var Z=0,X=T.length;Z<X;Z++){var J=T[Z],q={},te=Y?J.getLayout().area/Y:0,re=q[P[$]]=v(Y-2*N,0),ie=O[V[H]]+O[P[H]]-U,ne=Z===X-1||ie<te?ie:te,le=q[P[H]]=v(ne-2*N,0);q[V[$]]=O[V[$]]+b(N,re/2),q[V[H]]=U+b(N,le/2),U+=ne,J.setLayout(q,!0)}O[V[$]]+=Y,O[P[$]]-=Y}function m(T){return T.get(C)?T.get(h):0}E.exports={seriesType:"treemap",reset:function(T,D,O,N){var z=O.getWidth(),H=O.getHeight(),$=T.option,V=y.getLayoutRect(T.getBoxLayoutParams(),{width:O.getWidth(),height:O.getHeight()}),P=$.size||[],U=p(s(V.width,P[0]),z),Y=p(s(V.height,P[1]),H),Z=N&&N.type,X=d.retrieveTargetInfo(N,["treemapZoomToNode","treemapRootToNode"],T),J=Z==="treemapRender"||Z==="treemapMove"?N.rootRect:null,q=T.getViewRoot(),te=d.getPathToRoot(q);if(Z!=="treemapMove"){var re=Z==="treemapZoomToNode"?function(we,pe,ve,be,Ee){var Re,Ne=(pe||{}).node,Le=[be,Ee];if(!Ne||Ne===ve)return Le;for(var Se=be*Ee,Ie=Se*we.option.zoomToNodeRatio;Re=Ne.parentNode;){for(var _e=0,Ae=Re.children,ue=0,ke=Ae.length;ue<ke;ue++)_e+=Ae[ue].getValue();var Pe=Ne.getValue();if(Pe===0)return Le;Ie*=_e/Pe;var Ve=Re.getModel(),je=Ve.get(w),it=Math.max(je,m(Ve));(Ie+=4*je*je+(3*je+it)*Math.pow(Ie,.5))>f&&(Ie=f),Ne=Re}Ie<Se&&(Ie=Se);var rt=Math.pow(Ie/Se,.5);return[be*rt,Ee*rt]}(T,X,q,U,Y):J?[J.width,J.height]:[U,Y],ie=$.sort;ie&&ie!=="asc"&&ie!=="desc"&&(ie="desc");var ne={squareRatio:$.squareRatio,sort:ie,leafDepth:$.leafDepth};q.hostTree.clearLayouts();var le={x:0,y:0,width:re[0],height:re[1],area:re[0]*re[1]};q.setLayout(le),function we(pe,ve,be,Ee){if(!pe.isRemoved()){var Re,Ne,Le=pe.getLayout();Re=Le.width,Ne=Le.height;var Pe=pe.getModel(),Se=Pe.get(w),Ie=Pe.get(I)/2,_e=m(Pe),Ae=Math.max(Se,_e),ue=Se-Ie,ke=Ae-Ie,Pe=pe.getModel();pe.setLayout({borderWidth:Se,upperHeight:Ae,upperLabelHeight:_e},!0);var Ve=(Re=v(Re-2*ue,0))*(Ne=v(Ne-ue-ke,0)),je=function(Sn,Vn,bn,En,pn,Un){var Pn,On,Ht=Sn.children||[],Mt=En.sort;Mt!=="asc"&&Mt!=="desc"&&(Mt=null);var Gt=En.leafDepth!=null&&En.leafDepth<=Un;if(pn&&!Gt)return Sn.viewChildren=[];Pn=Ht=o.filter(Ht,function(wt){return!wt.isRemoved()}),(On=Mt)&&Pn.sort(function(wt,Ct){var bt=On==="asc"?wt.getValue()-Ct.getValue():Ct.getValue()-wt.getValue();return bt===0?On==="asc"?wt.dataIndex-Ct.dataIndex:Ct.dataIndex-wt.dataIndex:bt});var Bt=function(wt,Ct,bt){for(var Rt,Lt=0,Dt=0,Jt=Ct.length;Dt<Jt;Dt++)Lt+=Ct[Dt].getValue();var zt=wt.get("visualDimension");if(Ct&&Ct.length)if(zt==="value"&&bt)Rt=[Ct[Ct.length-1].getValue(),Ct[0].getValue()],bt==="asc"&&Rt.reverse();else{var Rt=[1/0,-1/0];l(Ct,function(An){var lr=An.getValue(zt);lr<Rt[0]&&(Rt[0]=lr),lr>Rt[1]&&(Rt[1]=lr)})}else Rt=[NaN,NaN];return{sum:Lt,dataExtent:Rt}}(Vn,Ht,Mt);if(Bt.sum===0||(Bt.sum=function(wt,Ct,bt,Rt,Lt){if(!Rt)return bt;for(var Dt=wt.get("visibleMin"),Jt=Lt.length,zt=Jt,nn=Jt-1;nn>=0;nn--){var An=Lt[Rt==="asc"?Jt-nn-1:nn].getValue();An/bt*Ct<Dt&&(zt=nn,bt-=An)}return Rt==="asc"?Lt.splice(0,Jt-zt):Lt.splice(zt,Jt-zt),bt}(Vn,bn,Bt.sum,Mt,Ht),Bt.sum===0))return Sn.viewChildren=[];for(var Ge=0,et=Ht.length;Ge<et;Ge++){var vt=Ht[Ge].getValue()/Bt.sum*bn;Ht[Ge].setLayout({area:vt})}return Gt&&(Ht.length&&Sn.setLayout({isLeafRoot:!0},!0),Ht.length=0),Sn.viewChildren=Ht,Sn.setLayout({dataExtent:Bt.dataExtent},!0),Ht}(pe,Pe,Ve,ve,be,Ee);if(je.length){var it={x:ue,y:ke,width:Re,height:Ne},rt=b(Re,Ne),mt=1/0,yt=[];yt.area=0;for(var st=0,Qe=je.length;st<Qe;){var At=je[st];yt.push(At),yt.area+=At.getLayout().area;var Xt=function(Sn,Vn,bn){for(var En,pn=0,Un=1/0,Pn=0,On=Sn.length;Pn<On;Pn++)(En=Sn[Pn].getLayout().area)&&(En<Un&&(Un=En),En>pn&&(pn=En));var Ht=Sn.area*Sn.area,Mt=Vn*Vn*bn;return Ht?v(Mt*pn/Ht,Ht/(Mt*Un)):1/0}(yt,rt,ve.squareRatio);Xt<=mt?(st++,mt=Xt):(yt.area-=yt.pop().getLayout().area,c(yt,rt,it,Ie,!1),rt=b(it.width,it.height),yt.length=yt.area=0,mt=1/0)}if(yt.length&&c(yt,rt,it,Ie,!0),!be){var cn=Pe.get("childrenVisibleMin");cn!=null&&Ve<cn&&(be=!0)}for(var st=0,Qe=je.length;st<Qe;st++)we(je[st],ve,be,Ee+1)}}}(q,ne,!1,0);var le=q.getLayout();l(te,function(we,pe){var ve=(te[pe+1]||q).getValue();we.setLayout(o.extend({dataExtent:[ve,ve],borderWidth:0,upperHeight:0},le))})}var fe=T.getData().tree.root;fe.setLayout(function(we,pe,ve){if(pe)return{x:pe.x,y:pe.y};var be={x:0,y:0};if(!ve)return be;var Ee=ve.node,Re=Ee.getLayout();if(!Re)return be;for(var Ne=[Re.width/2,Re.height/2],Le=Ee;Le;){var Se=Le.getLayout();Ne[0]+=Se.x,Ne[1]+=Se.y,Le=Le.parentNode}return{x:we.width/2-Ne[0],y:we.height/2-Ne[1]}}(V,J,X),!0),T.setLayoutInfo(V),function we(pe,ve,be,Ee,Re){var Ne=pe.getLayout(),Le=be[Re],Se=Le&&Le===pe;if((!Le||Se)&&(Re!==be.length||pe===Ee)){pe.setLayout({isInView:!0,invisible:!Se&&!ve.intersect(Ne),isAboveViewRoot:Se},!0);var Ie=new S(ve.x-Ne.x,ve.y-Ne.y,ve.width,ve.height);l(pe.viewChildren||[],function(_e){we(_e,Ie,be,Ee,Re+1)})}}(fe,new S(-V.x,-V.y,z,H),te,q,0)}}},10431:function(E,A,u){var o=u(32013),S=u(86049),_=u(23405),p=_.isArray,f="itemStyle";function y(b){var s=d(b,"color");if(s){var l=d(b,"colorAlpha"),w=d(b,"colorSaturation");return w&&(s=S.modifyHSL(s,null,null,w)),l&&(s=S.modifyAlpha(s,l)),s}}function d(b,s){var l=b[s];if(l!=null&&l!=="none")return l}function v(b,s){var l=b.get(s);return p(l)&&l.length?{name:s,range:l}:null}E.exports={seriesType:"treemap",reset:function(b,s,l,w){var I=b.getData().tree,C=I.root,h=b.getModel(f);C.isRemoved()||function c(m,T,D,O,N,z){var H,$=m.getModel(),V=m.getLayout();if(V&&!V.invisible&&V.isInView){var P,U,Y,Z,X,J,q,te=m.getModel(f),re=(P=te,U=T,Y=D[m.depth],Z=O,X=_.extend({},U),_.each(["color","colorAlpha","colorSaturation"],function(we){var pe=P.get(we,!0);pe==null&&Y&&(pe=Y[we]),pe==null&&(pe=U[we]),pe==null&&(pe=Z.get(we)),pe!=null&&(X[we]=pe)}),X),ie=te.get("borderColor"),ne=te.get("borderColorSaturation");ne!=null&&(J=ne,ie=(q=H=y(re))!=null?S.modifyHSL(q,null,null,J):null),m.setVisual("borderColor",ie);var le=m.viewChildren;if(le&&le.length){var fe=function(we,pe,ve,be,Ee,Re){if(Re&&Re.length){var Ne=v(pe,"color")||Ee.color!=null&&Ee.color!=="none"&&(v(pe,"colorAlpha")||v(pe,"colorSaturation"));if(Ne){var Le=pe.get("visualMin"),Se=pe.get("visualMax"),Ie=ve.dataExtent.slice();Le!=null&&Le<Ie[0]&&(Ie[0]=Le),Se!=null&&Se>Ie[1]&&(Ie[1]=Se);var _e=pe.get("colorMappingBy"),Ae={type:Ne.name,dataExtent:Ie,visual:Ne.range};Ae.type==="color"&&(_e==="index"||_e==="id")?(Ae.mappingMethod="category",Ae.loop=!0):Ae.mappingMethod="linear";var ue=new o(Ae);return ue.__drColorMappingBy=_e,ue}}}(0,$,V,0,re,le);_.each(le,function(we,pe){if(we.depth>=N.length||we===N[we.depth]){var ve=function(be,Ee,Re,Ne,Le,Se){var Ie=_.extend({},Ee);if(Le){var _e=Le.type,Ae=_e==="color"&&Le.__drColorMappingBy,ue=Ae==="index"?Ne:Ae==="id"?Se.mapIdToIndex(Re.getId()):Re.getValue(be.get("visualDimension"));Ie[_e]=Le.mapValueToVisual(ue)}return Ie}($,re,we,pe,fe,z);c(we,ve,D,O,N,z)}})}else H=y(re),m.setVisual("color",H)}}(C,{},_.map(I.levelModels,function(c){return c?c.get(f):null}),h,b.getViewRoot().getAncestors(),b)}}},90190:function(E,A,u){u(27246),u(9393)},46637:function(E,A,u){u(64464),u(82750)},9393:function(E,A,u){var o=u(23405),S=u(51747),_=u(46082),p=u(81059),f=["axisLine","axisLabel","axisTick","splitLine","splitArea"];function y(b,s,l){s[1]>s[0]&&(s=s.slice().reverse());var w=b.coordToPoint([s[0],l]),I=b.coordToPoint([s[1],l]);return{x1:w[0],y1:w[1],x2:I[0],y2:I[1]}}function d(b){return+!b.getRadiusAxis().inverse}function v(b){var s=b[0],l=b[b.length-1];s&&l&&1e-4>Math.abs(Math.abs(s.coord-l.coord)-360)&&b.pop()}E.exports=p.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(b,s){if(this.group.removeAll(),b.get("show")){var l=b.axis,w=l.polar,I=w.getRadiusAxis().getExtent(),C=l.getTicksCoords(),h=o.map(l.getViewLabels(),function(m){var m=o.clone(m);return m.coord=l.dataToCoord(m.tickValue),m});v(h),v(C),o.each(f,function(c){b.get(c+".show")&&(!l.scale.isBlank()||c==="axisLine")&&this["_"+c](b,w,C,I,h)},this)}},_axisLine:function(b,s,l,w){var I=b.getModel("axisLine.lineStyle"),C=new S.Circle({shape:{cx:s.cx,cy:s.cy,r:w[d(s)]},style:I.getLineStyle(),z2:1,silent:!0});C.style.fill=null,this.group.add(C)},_axisTick:function(b,s,l,w){var I=b.getModel("axisTick"),C=(I.get("inside")?-1:1)*I.get("length"),h=w[d(s)],c=o.map(l,function(m){return new S.Line({shape:y(s,[h,h+C],m.coord)})});this.group.add(S.mergePath(c,{style:o.defaults(I.getModel("lineStyle").getLineStyle(),{stroke:b.get("axisLine.lineStyle.color")})}))},_axisLabel:function(b,s,l,w,I){var C=b.getCategories(!0),h=b.getModel("axisLabel"),c=h.get("margin");o.each(I,function(m,T){var D=h,O=m.tickValue,N=w[d(s)],z=s.coordToPoint([N+c,m.coord]),H=s.cx,$=s.cy,V=Math.abs(z[0]-H)/N<.3?"center":z[0]>H?"left":"right",P=Math.abs(z[1]-$)/N<.3?"middle":z[1]>$?"top":"bottom";C&&C[O]&&C[O].textStyle&&(D=new _(C[O].textStyle,h,h.ecModel));var U=new S.Text({silent:!0});this.group.add(U),S.setTextStyle(U.style,D,{x:z[0],y:z[1],textFill:D.getTextColor()||b.get("axisLine.lineStyle.color"),text:m.formattedLabel,textAlign:V,textVerticalAlign:P})},this)},_splitLine:function(b,s,l,w){var I=b.getModel("splitLine").getModel("lineStyle"),C=I.get("color"),h=0;C=C instanceof Array?C:[C];for(var c=[],m=0;m<l.length;m++){var T=h++%C.length;c[T]=c[T]||[],c[T].push(new S.Line({shape:y(s,w,l[m].coord)}))}for(var m=0;m<c.length;m++)this.group.add(S.mergePath(c[m],{style:o.defaults({stroke:C[m%C.length]},I.getLineStyle()),silent:!0,z:b.get("z")}))},_splitArea:function(b,s,l,w){if(l.length){var I=b.getModel("splitArea").getModel("areaStyle"),C=I.get("color"),h=0;C=C instanceof Array?C:[C];for(var c=[],m=Math.PI/180,T=-l[0].coord*m,D=Math.min(w[0],w[1]),O=Math.max(w[0],w[1]),N=b.get("clockwise"),z=1;z<l.length;z++){var H=h++%C.length;c[H]=c[H]||[],c[H].push(new S.Sector({shape:{cx:s.cx,cy:s.cy,r0:D,r:O,startAngle:T,endAngle:-l[z].coord*m,clockwise:N},silent:!0})),T=-l[z].coord*m}for(var z=0;z<c.length;z++)this.group.add(S.mergePath(c[z],{style:o.defaults({fill:C[z%C.length]},I.getAreaStyle()),silent:!0}))}}})},88010:function(E,A,u){var o=u(23405),S=o.retrieve,_=o.defaults,p=o.extend,f=o.each,y=u(60653),d=u(51747),v=u(46082),b=u(54684),s=b.isRadianAroundZero,l=b.remRadian,w=u(30696).createSymbol,I=u(79442),C=u(76414).applyTransform,h=u(51261).shouldShowAllLabels,c=Math.PI;function m(V){var P={componentType:V.mainType,componentIndex:V.componentIndex};return P[V.mainType+"Index"]=V.componentIndex,P}var T=function(V,P){this.opt=P,this.axisModel=V,_(P,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new d.Group;var U=new d.Group({position:P.position.slice(),rotation:P.rotation});U.updateTransform(),this._transform=U.transform,this._dumbGroup=U};T.prototype={constructor:T,hasBuilder:function(V){return!!D[V]},add:function(V){D[V].call(this)},getGroup:function(){return this.group}};var D={axisLine:function(){var V=this.opt,P=this.axisModel;if(P.get("axisLine.show")){var U=this.axisModel.axis.getExtent(),Y=this._transform,Z=[U[0],0],X=[U[1],0];Y&&(C(Z,Z,Y),C(X,X,Y));var J=p({lineCap:"round"},P.getModel("axisLine.lineStyle").getLineStyle());this.group.add(new d.Line(d.subPixelOptimizeLine({anid:"line",shape:{x1:Z[0],y1:Z[1],x2:X[0],y2:X[1]},style:J,strokeContainThreshold:V.strokeContainThreshold||5,silent:!0,z2:1})));var q=P.get("axisLine.symbol"),te=P.get("axisLine.symbolSize"),re=P.get("axisLine.symbolOffset")||0;if(typeof re=="number"&&(re=[re,re]),q!=null){typeof q=="string"&&(q=[q,q]),(typeof te=="string"||typeof te=="number")&&(te=[te,te]);var ie=te[0],ne=te[1];f([{rotate:V.rotation+Math.PI/2,offset:re[0],r:0},{rotate:V.rotation-Math.PI/2,offset:re[1],r:Math.sqrt((Z[0]-X[0])*(Z[0]-X[0])+(Z[1]-X[1])*(Z[1]-X[1]))}],function(le,fe){if(q[fe]!=="none"&&q[fe]!=null){var we=w(q[fe],-ie/2,-ne/2,ie,ne,J.stroke,!0),pe=le.r+le.offset,ve=[Z[0]+pe*Math.cos(V.rotation),Z[1]-pe*Math.sin(V.rotation)];we.attr({rotation:le.rotate,position:ve,silent:!0,z2:11}),this.group.add(we)}},this)}}},axisTickLabel:function(){var V=this.axisModel,P=this.opt,U=function(Z,X,J){var q=X.axis;if(!(!X.get("axisTick.show")||q.scale.isBlank())){for(var te=X.getModel("axisTick"),re=te.getModel("lineStyle"),ie=te.get("length"),ne=q.getTicksCoords(),le=[],fe=[],we=Z._transform,pe=[],ve=0;ve<ne.length;ve++){var be=ne[ve].coord;le[0]=be,le[1]=0,fe[0]=be,fe[1]=J.tickDirection*ie,we&&(C(le,le,we),C(fe,fe,we));var Ee=new d.Line(d.subPixelOptimizeLine({anid:"tick_"+ne[ve].tickValue,shape:{x1:le[0],y1:le[1],x2:fe[0],y2:fe[1]},style:_(re.getLineStyle(),{stroke:X.get("axisLine.lineStyle.color")}),z2:2,silent:!0}));Z.group.add(Ee),pe.push(Ee)}return pe}}(this,V,P),Y=function(Z,X,J){var q=X.axis;if(!(!S(J.axisLabelShow,X.get("axisLabel.show"))||q.scale.isBlank())){var te=X.getModel("axisLabel"),re=te.get("margin"),ie=q.getViewLabels(),ne=(S(J.labelRotate,te.get("rotate"))||0)*c/180,le=O(J.rotation,ne,J.labelDirection),fe=X.getCategories(!0),we=[],pe=N(X),ve=X.get("triggerEvent");return f(ie,function(be,Ee){var Re=be.tickValue,Ne=be.formattedLabel,Le=be.rawLabel,Se=te;fe&&fe[Re]&&fe[Re].textStyle&&(Se=new v(fe[Re].textStyle,te,X.ecModel));var Ie=Se.getTextColor()||X.get("axisLine.lineStyle.color"),_e=[q.dataToCoord(Re),J.labelOffset+J.labelDirection*re],Ae=new d.Text({anid:"label_"+Re,position:_e,rotation:le.rotation,silent:pe,z2:10});d.setTextStyle(Ae.style,Se,{text:Ne,textAlign:Se.getShallow("align",!0)||le.textAlign,textVerticalAlign:Se.getShallow("verticalAlign",!0)||Se.getShallow("baseline",!0)||le.textVerticalAlign,textFill:typeof Ie=="function"?Ie(q.type==="category"?Le:q.type==="value"?Re+"":Re,Ee):Ie}),ve&&(Ae.eventData=m(X),Ae.eventData.targetType="axisLabel",Ae.eventData.value=Le),Z._dumbGroup.add(Ae),Ae.updateTransform(),we.push(Ae),Z.group.add(Ae),Ae.decomposeTransform()}),we}}(this,V,P);(function(Z,X,J){if(!h(Z.axis)){var q=Z.get("axisLabel.showMinLabel"),te=Z.get("axisLabel.showMaxLabel");J=J||[];var re=(X=X||[])[0],ie=X[1],ne=X[X.length-1],le=X[X.length-2],fe=J[0],we=J[1],pe=J[J.length-1],ve=J[J.length-2];q===!1?(z(re),z(fe)):H(re,ie)&&(q?(z(ie),z(we)):(z(re),z(fe))),te===!1?(z(ne),z(pe)):H(le,ne)&&(te?(z(le),z(ve)):(z(ne),z(pe)))}})(V,Y,U)},axisName:function(){var V,P,U=this.opt,Y=this.axisModel,Z=S(U.axisName,Y.get("name"));if(Z){var X,J,q,te,re,ie,ne,le,fe,we=Y.get("nameLocation"),pe=U.nameDirection,ve=Y.getModel("nameTextStyle"),be=Y.get("nameGap")||0,Ee=this.axisModel.axis.getExtent(),Re=Ee[0]>Ee[1]?-1:1,Ne=[we==="start"?Ee[0]-Re*be:we==="end"?Ee[1]+Re*be:(Ee[0]+Ee[1])/2,$(we)?U.labelOffset+pe*be:0],Le=Y.get("nameRotate");Le!=null&&(Le=Le*c/180),$(we)?V=O(U.rotation,Le??U.rotation,pe):(X=U,J=we,q=Le||0,te=Ee,ne=l(q-X.rotation),le=te[0]>te[1],fe=J==="start"&&!le||J!=="start"&&le,s(ne-c/2)?(ie=fe?"bottom":"top",re="center"):s(ne-1.5*c)?(ie=fe?"top":"bottom",re="center"):(ie="middle",re=ne<1.5*c&&ne>c/2?fe?"left":"right":fe?"right":"left"),V={rotation:ne,textAlign:re,textVerticalAlign:ie},(P=U.axisNameAvailableWidth)!=null&&(isFinite(P=Math.abs(P/Math.sin(V.rotation)))||(P=null)));var Se=ve.getFont(),Ie=Y.get("nameTruncate",!0)||{},_e=Ie.ellipsis,Ae=S(U.nameTruncateMaxWidth,Ie.maxWidth,P),ue=_e!=null&&Ae!=null?y.truncateText(Z,Ae,Se,_e,{minChar:2,placeholder:Ie.placeholder}):Z,ke=Y.get("tooltip",!0),Pe=Y.mainType,Ve={componentType:Pe,name:Z,$vars:["name"]};Ve[Pe+"Index"]=Y.componentIndex;var je=new d.Text({anid:"name",__fullText:Z,__truncatedText:ue,position:Ne,rotation:V.rotation,silent:N(Y),z2:1,tooltip:ke&&ke.show?p({content:Z,formatter:function(){return Z},formatterParams:Ve},ke):null});d.setTextStyle(je.style,ve,{text:ue,textFont:Se,textFill:ve.getTextColor()||Y.get("axisLine.lineStyle.color"),textAlign:V.textAlign,textVerticalAlign:V.textVerticalAlign}),Y.get("triggerEvent")&&(je.eventData=m(Y),je.eventData.targetType="axisName",je.eventData.name=Z),this._dumbGroup.add(je),je.updateTransform(),this.group.add(je),je.decomposeTransform()}}},O=T.innerTextLayout=function(V,P,U){var Y,Z,X=l(P-V);return s(X)?(Z=U>0?"top":"bottom",Y="center"):s(X-c)?(Z=U>0?"bottom":"top",Y="center"):(Z="middle",Y=X>0&&X<c?U>0?"right":"left":U>0?"left":"right"),{rotation:X,textAlign:Y,textVerticalAlign:Z}};function N(V){var P=V.get("tooltip");return V.get("silent")||!(V.get("triggerEvent")||P&&P.show)}function z(V){V&&(V.ignore=!0)}function H(V,P,U){var Y=V&&V.getBoundingRect().clone(),Z=P&&P.getBoundingRect().clone();if(Y&&Z){var X=I.identity([]);return I.rotate(X,X,-V.rotation),Y.applyTransform(I.mul([],X,V.getLocalTransform())),Z.applyTransform(I.mul([],X,P.getLocalTransform())),Y.intersect(Z)}}function $(V){return V==="middle"||V==="center"}E.exports=T},81059:function(E,A,u){u(9129).__DEV__;var o=u(87930),S=u(93267),_=o.extendComponentView({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(d,v,b,s){this.axisPointerClass&&S.fixValue(d),_.superApply(this,"render",arguments),p(this,d,v,b,s,!0)},updateAxisPointer:function(d,v,b,s,l){p(this,d,v,b,s,!1)},remove:function(d,v){var b=this._axisPointer;b&&b.remove(v),_.superApply(this,"remove",arguments)},dispose:function(d,v){f(this,v),_.superApply(this,"dispose",arguments)}});function p(d,v,b,s,l,w){var I=_.getAxisPointerClass(d.axisPointerClass);if(I){var C=S.getAxisPointerModel(v);C?(d._axisPointer||(d._axisPointer=new I)).render(v,C,s,w):f(d,s)}}function f(d,v,b){var s=d._axisPointer;s&&s.dispose(v,b),d._axisPointer=null}var y=[];_.registerAxisPointerClass=function(d,v){y[d]=v},_.getAxisPointerClass=function(d){return d&&y[d]},E.exports=_},82750:function(E,A,u){var o=u(23405),S=u(51747),_=u(88010),p=u(81059),f=u(2244),y=["axisLine","axisTickLabel","axisName"],d=["splitArea","splitLine"],v=p.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(b,s,l,w){this.group.removeAll();var I=this._axisGroup;if(this._axisGroup=new S.Group,this.group.add(this._axisGroup),b.get("show")){var C=b.getCoordSysModel(),h=f.layout(C,b),c=new _(b,h);o.each(y,c.add,c),this._axisGroup.add(c.getGroup()),o.each(d,function(m){b.get(m+".show")&&this["_"+m](b,C)},this),S.groupTransition(I,this._axisGroup,b),v.superCall(this,"render",b,s,l,w)}},remove:function(){this._splitAreaColors=null},_splitLine:function(b,s){var l=b.axis;if(!l.scale.isBlank()){var w=b.getModel("splitLine"),I=w.getModel("lineStyle"),C=I.get("color");C=o.isArray(C)?C:[C];for(var h=s.coordinateSystem.getRect(),c=l.isHorizontal(),m=0,T=l.getTicksCoords({tickModel:w}),D=[],O=[],N=I.getLineStyle(),z=0;z<T.length;z++){var H=l.toGlobalCoord(T[z].coord);c?(D[0]=H,D[1]=h.y,O[0]=H,O[1]=h.y+h.height):(D[0]=h.x,D[1]=H,O[0]=h.x+h.width,O[1]=H);var $=m++%C.length,V=T[z].tickValue;this._axisGroup.add(new S.Line(S.subPixelOptimizeLine({anid:V!=null?"line_"+T[z].tickValue:null,shape:{x1:D[0],y1:D[1],x2:O[0],y2:O[1]},style:o.defaults({stroke:C[$]},N),silent:!0})))}}},_splitArea:function(b,s){var l=b.axis;if(!l.scale.isBlank()){var w=b.getModel("splitArea"),I=w.getModel("areaStyle"),C=I.get("color"),h=s.coordinateSystem.getRect(),c=l.getTicksCoords({tickModel:w,clamp:!0});if(c.length){var m=C.length,T=this._splitAreaColors,D=o.createHashMap(),O=0;if(T)for(var N=0;N<c.length;N++){var z=T.get(c[N].tickValue);if(z!=null){O=(z+(m-1)*N)%m;break}}var H=l.toGlobalCoord(c[0].coord),$=I.getAreaStyle();C=o.isArray(C)?C:[C];for(var N=1;N<c.length;N++){var V,P,U,Y,Z=l.toGlobalCoord(c[N].coord);l.isHorizontal()?(V=H,P=h.y,U=Z-V,Y=h.height,H=V+U):(V=h.x,P=H,U=h.width,Y=Z-P,H=P+Y);var X=c[N-1].tickValue;X!=null&&D.set(X,O),this._axisGroup.add(new S.Rect({anid:X!=null?"area_"+X:null,shape:{x:V,y:P,width:U,height:Y},style:o.defaults({fill:C[O]},$),silent:!0})),O=(O+1)%m}this._splitAreaColors=D}}}});v.extend({type:"xAxis"}),v.extend({type:"yAxis"})},94013:function(E,A,u){var o=u(87930),S=u(23405),_=u(88010),p=u(29006),f=u(45498),y=u(51747),d=["axisLine","axisTickLabel","axisName"],v=o.extendComponentView({type:"parallelAxis",init:function(b,s){v.superApply(this,"init",arguments),(this._brushController=new p(s.getZr())).on("brush",S.bind(this._onBrush,this))},render:function(b,s,l,w){var I,C,h;if(I=b,C=s,!(h=w)||h.type!=="axisAreaSelect"||C.findComponents({mainType:"parallelAxis",query:h})[0]!==I){this.axisModel=b,this.api=l,this.group.removeAll();var c=this._axisGroup;if(this._axisGroup=new y.Group,this.group.add(this._axisGroup),b.get("show")){var m,T=(m=b,s.getComponent("parallel",m.get("parallelIndex"))),D=T.coordinateSystem,O=b.getAreaSelectStyle(),N=O.width,z=b.axis.dim,H=D.getAxisLayout(z),$=S.extend({strokeContainThreshold:N},H),V=new _(b,$);S.each(d,V.add,V),this._axisGroup.add(V.getGroup()),this._refreshBrushController($,O,b,T,N,l);var P=w&&w.animation===!1?null:b;y.groupTransition(c,this._axisGroup,P)}}},_refreshBrushController:function(b,s,l,w,I,C){var h,c,m=l.axis.getExtent(),T=m[1]-m[0],D=Math.min(30,.1*Math.abs(T)),O=y.BoundingRect.create({x:m[0],y:-I/2,width:T,height:I});O.x-=D,O.width+=2*D,this._brushController.mount({enableGlobalPan:!0,rotation:b.rotation,position:b.position}).setPanels([{panelId:"pl",clipPath:f.makeRectPanelClipPath(O),isTargetByCursor:f.makeRectIsTargetByCursor(O,C,w),getLinearBrushOtherExtent:f.makeLinearBrushOtherExtent(O,0)}]).enableBrush({brushType:"lineX",brushStyle:s,removeOnClick:!0}).updateCovers((c=(h=l).axis,S.map(h.activeIntervals,function(N){return{brushType:"lineX",panelId:"pl",range:[c.dataToCoord(N[0],!0),c.dataToCoord(N[1],!0)]}})))},_onBrush:function(b,s){var l=this.axisModel,w=l.axis,I=S.map(b,function(C){return[w.coordToData(C.range[0],!0),w.coordToData(C.range[1],!0)]});(!l.option.realtime===s.isEnd||s.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:l.id,intervals:I})},dispose:function(){this._brushController.dispose()}});E.exports=v},34848:function(E,A,u){var o=u(23405),S=u(51747),_=u(88010),p=u(81059),f=["axisLine","axisTickLabel","axisName"],y=["splitLine","splitArea"];E.exports=p.extend({type:"radiusAxis",axisPointerClass:"PolarAxisPointer",render:function(d,v){if(this.group.removeAll(),d.get("show")){var b,s,l,w=d.axis,I=w.polar,C=I.getAngleAxis(),h=w.getTicksCoords(),c=C.getExtent()[0],m=w.getExtent(),T=(b=I,s=d,l=c,{position:[b.cx,b.cy],rotation:l/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:s.getModel("axisLabel").get("rotate"),z2:1}),D=new _(d,T);o.each(f,D.add,D),this.group.add(D.getGroup()),o.each(y,function(O){d.get(O+".show")&&!w.scale.isBlank()&&this["_"+O](d,I,c,m,h)},this)}},_splitLine:function(d,v,b,s,l){var w=d.getModel("splitLine").getModel("lineStyle"),I=w.get("color"),C=0;I=I instanceof Array?I:[I];for(var h=[],c=0;c<l.length;c++){var m=C++%I.length;h[m]=h[m]||[],h[m].push(new S.Circle({shape:{cx:v.cx,cy:v.cy,r:l[c].coord},silent:!0}))}for(var c=0;c<h.length;c++)this.group.add(S.mergePath(h[c],{style:o.defaults({stroke:I[c%I.length],fill:null},w.getLineStyle()),silent:!0}))},_splitArea:function(d,v,b,s,l){if(l.length){var w=d.getModel("splitArea").getModel("areaStyle"),I=w.get("color"),C=0;I=I instanceof Array?I:[I];for(var h=[],c=l[0].coord,m=1;m<l.length;m++){var T=C++%I.length;h[T]=h[T]||[],h[T].push(new S.Sector({shape:{cx:v.cx,cy:v.cy,r0:c,r:l[m].coord,startAngle:0,endAngle:2*Math.PI},silent:!0})),c=l[m].coord}for(var m=0;m<h.length;m++)this.group.add(S.mergePath(h[m],{style:o.defaults({fill:I[m%I.length]},w.getAreaStyle()),silent:!0}))}}})},67559:function(E,A,u){var o=u(23405),S=u(88010),_=u(51747),p=u(91456),f=u(81059),y=["axisLine","axisTickLabel","axisName"],d="splitLine",v=f.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(b,s,l,w){var I=this.group;I.removeAll();var C=p.layout(b),h=new S(b,C);o.each(y,h.add,h),I.add(h.getGroup()),b.get(d+".show")&&this["_"+d](b),v.superCall(this,"render",b,s,l,w)},_splitLine:function(b){var s=b.axis;if(!s.scale.isBlank()){var l=b.getModel("splitLine"),w=l.getModel("lineStyle"),I=w.get("width"),C=w.get("color");C=C instanceof Array?C:[C];for(var h=b.coordinateSystem.getRect(),c=s.isHorizontal(),m=[],T=0,D=s.getTicksCoords({tickModel:l}),O=[],N=[],z=0;z<D.length;++z){var H=s.toGlobalCoord(D[z].coord);c?(O[0]=H,O[1]=h.y,N[0]=H,N[1]=h.y+h.height):(O[0]=h.x,O[1]=H,N[0]=h.x+h.width,N[1]=H);var $=T++%C.length;m[$]=m[$]||[],m[$].push(new _.Line(_.subPixelOptimizeLine({shape:{x1:O[0],y1:O[1],x2:N[0],y2:N[1]},style:{lineWidth:I},silent:!0})))}for(var z=0;z<m.length;++z)this.group.add(_.mergePath(m[z],{style:{stroke:C[z%C.length],lineDash:w.getLineDash(I),lineWidth:I},silent:!0}))}}});E.exports=v},86997:function(E,A,u){var o=u(87930);o.registerAction({type:"axisAreaSelect",event:"axisAreaSelected"},function(S,_){_.eachComponent({mainType:"parallelAxis",query:S},function(p){p.axis.model.setActiveIntervals(S.intervals)})}),o.registerAction("parallelAxisExpand",function(S,_){_.eachComponent({mainType:"parallel",query:S},function(p){p.setAxisExpand(S)})})},81819:function(E,A,u){var o=u(87930),S=u(23405),_=u(93267),p=u(71155);u(87793),u(43268),u(55695),o.registerPreprocessor(function(f){if(f){f.axisPointer&&f.axisPointer.length!==0||(f.axisPointer={});var y=f.axisPointer.link;y&&!S.isArray(y)&&(f.axisPointer.link=[y])}}),o.registerProcessor(o.PRIORITY.PROCESSOR.STATISTIC,function(f,y){f.getComponent("axisPointer").coordSysAxesInfo=_.collect(f,y)}),o.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},p)},87793:function(E,A,u){E.exports=u(87930).extendComponentModel({type:"axisPointer",coordSysAxesInfo:null,defaultOption:{show:"auto",triggerOn:null,zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#aaa",width:1,type:"solid"},shadowStyle:{color:"rgba(150,150,150,0.3)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,shadowBlur:3,shadowColor:"#aaa"},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}}})},43268:function(E,A,u){var o=u(87930),S=u(46357),_=o.extendComponentView({type:"axisPointer",render:function(p,f,y){var d=f.getComponent("tooltip"),v=p.get("triggerOn")||d&&d.get("triggerOn")||"mousemove|click";S.register("axisPointer",y,function(b,s,l){v!=="none"&&(b==="leave"||v.indexOf(b)>=0)&&l({type:"updateAxisPointer",currTrigger:b,x:s&&s.offsetX,y:s&&s.offsetY})})},remove:function(p,f){S.unregister(f.getZr(),"axisPointer"),_.superApply(this._model,"remove",arguments)},dispose:function(p,f){S.unregister("axisPointer",f),_.superApply(this._model,"dispose",arguments)}});E.exports=_},95003:function(E,A,u){var o=u(23405),S=u(92161),_=u(51747),p=u(93267),f=u(46427),y=u(94127),d=(0,u(51064).makeInner)(),v=o.clone,b=o.bind;function s(){}function l(h,c,m,T){!function D(O,N){if(!(o.isObject(O)&&o.isObject(N)))return O===N;var z=!0;return o.each(N,function(H,$){z=z&&D(O[$],H)}),!!z}(d(m).lastProp,T)&&(d(m).lastProp=T,c?_.updateProps(m,T,h):(m.stopAnimation(),m.attr(T)))}function w(h,c){h[c.get("label.show")?"show":"hide"]()}function I(h){return{position:h.position.slice(),rotation:h.rotation||0}}function C(h,c,m){var T=c.get("z"),D=c.get("zlevel");h&&h.traverse(function(O){O.type!=="group"&&(T!=null&&(O.z=T),D!=null&&(O.zlevel=D),O.silent=m)})}s.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(h,c,m,T){var D=c.get("value"),O=c.get("status");if(this._axisModel=h,this._axisPointerModel=c,this._api=m,T||this._lastValue!==D||this._lastStatus!==O){this._lastValue=D,this._lastStatus=O;var N=this._group,z=this._handle;if(!O||O==="hide"){N&&N.hide(),z&&z.hide();return}N&&N.show(),z&&z.show();var H={};this.makeElOption(H,D,h,c,m);var $=H.graphicKey;$!==this._lastGraphicKey&&this.clear(m),this._lastGraphicKey=$;var V=this._moveAnimation=this.determineAnimation(h,c);if(N){var P=o.curry(l,c,V);this.updatePointerEl(N,H,P,c),this.updateLabelEl(N,H,P,c)}else N=this._group=new _.Group,this.createPointerEl(N,H,h,c),this.createLabelEl(N,H,h,c),m.getZr().add(N);C(N,c,!0),this._renderHandle(D)}},remove:function(h){this.clear(h)},dispose:function(h){this.clear(h)},determineAnimation:function(h,c){var m=c.get("animation"),T=h.axis,D=T.type==="category",O=c.get("snap");if(!O&&!D)return!1;if(m==="auto"||m==null){var N=this.animationThreshold;if(D&&T.getBandWidth()>N)return!0;if(O){var z=p.getAxisInfo(h).seriesDataCount,H=T.getExtent();return Math.abs(H[0]-H[1])/z>N}return!1}return m===!0},makeElOption:function(h,c,m,T,D){},createPointerEl:function(h,c,m,T){var D=c.pointer;if(D){var O=d(h).pointerEl=new _[D.type](v(c.pointer));h.add(O)}},createLabelEl:function(h,c,m,T){if(c.label){var D=d(h).labelEl=new _.Rect(v(c.label));h.add(D),w(D,T)}},updatePointerEl:function(h,c,m){var T=d(h).pointerEl;T&&(T.setStyle(c.pointer.style),m(T,{shape:c.pointer.shape}))},updateLabelEl:function(h,c,m,T){var D=d(h).labelEl;D&&(D.setStyle(c.label.style),m(D,{shape:c.label.shape,position:c.label.position}),w(D,T))},_renderHandle:function(h){if(!this._dragging&&this.updateHandleTransform){var c,m=this._axisPointerModel,T=this._api.getZr(),D=this._handle,O=m.getModel("handle"),N=m.get("status");if(!O.get("show")||!N||N==="hide"){D&&T.remove(D),this._handle=null;return}this._handle||(c=!0,D=this._handle=_.createIcon(O.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(H){f.stop(H.event)},onmousedown:b(this._onHandleDragMove,this,0,0),drift:b(this._onHandleDragMove,this),ondragend:b(this._onHandleDragEnd,this)}),T.add(D)),C(D,m,!1),D.setStyle(O.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var z=O.get("size");o.isArray(z)||(z=[z,z]),D.attr("scale",[z[0]/2,z[1]/2]),y.createOrUpdate(this,"_doDispatchAxisPointer",O.get("throttle")||0,"fixRate"),this._moveHandleToValue(h,c)}},_moveHandleToValue:function(h,c){l(this._axisPointerModel,!c&&this._moveAnimation,this._handle,I(this.getHandleTransform(h,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(h,c){var m=this._handle;if(m){this._dragging=!0;var T=this.updateHandleTransform(I(m),[h,c],this._axisModel,this._axisPointerModel);this._payloadInfo=T,m.stopAnimation(),m.attr(I(T)),d(m).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){if(this._handle){var h=this._payloadInfo,c=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:h.cursorPoint[0],y:h.cursorPoint[1],tooltipOption:h.tooltipOption,axesInfo:[{axisDim:c.axis.dim,axisIndex:c.componentIndex}]})}},_onHandleDragEnd:function(h){if(this._dragging=!1,this._handle){var c=this._axisPointerModel.get("value");this._moveHandleToValue(c),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(h){this._lastValue=null,this._lastStatus=null;var c=h.getZr(),m=this._group,T=this._handle;c&&m&&(this._lastGraphicKey=null,m&&c.remove(m),T&&c.remove(T),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(h,c,m){return{x:h[m=m||0],y:h[1-m],width:c[m],height:c[1-m]}}},s.prototype.constructor=s,S.enableClassExtend(s),E.exports=s},55695:function(E,A,u){var o=u(51747),S=u(95003),_=u(84908),p=u(2244),f=u(81059),y=S.extend({makeElOption:function(s,l,w,I,C){var h=w.axis,c=h.grid,m=I.get("type"),T=d(c,h).getOtherAxis(h).getGlobalExtent(),D=h.toGlobalCoord(h.dataToCoord(l,!0));if(m&&m!=="none"){var O=_.buildElStyle(I),N=v[m](h,D,T,O);N.style=O,s.graphicKey=N.type,s.pointer=N}var z=p.layout(c.model,w);_.buildCartesianSingleLabelElOption(l,s,z,w,I,C)},getHandleTransform:function(s,l,w){var I=p.layout(l.axis.grid.model,l,{labelInside:!1});return I.labelMargin=w.get("handle.margin"),{position:_.getTransformedPosition(l.axis,s,I),rotation:I.rotation+(I.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(s,l,w,I){var C=w.axis,h=C.grid,c=C.getGlobalExtent(!0),m=d(h,C).getOtherAxis(C).getGlobalExtent(),T=+(C.dim!=="x"),D=s.position;D[T]+=l[T],D[T]=Math.min(c[1],D[T]),D[T]=Math.max(c[0],D[T]);var O=(m[1]+m[0])/2,N=[O,O];return N[T]=D[T],{position:D,rotation:s.rotation,cursorPoint:N,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][T]}}});function d(s,l){var w={};return w[l.dim+"AxisIndex"]=l.index,s.getCartesian(w)}var v={line:function(s,l,w,I){var C=_.makeLineShape([l,w[0]],[l,w[1]],b(s));return o.subPixelOptimizeLine({shape:C,style:I}),{type:"Line",shape:C}},shadow:function(s,l,w,I){var C=Math.max(1,s.getBandWidth()),h=w[1]-w[0];return{type:"Rect",shape:_.makeRectShape([l-C/2,w[0]],[C,h],b(s))}}};function b(s){return+(s.dim!=="x")}f.registerAxisPointerClass("CartesianAxisPointer",y),E.exports=y},73005:function(E,A,u){var o=u(60653),S=u(95003),_=u(51747),p=u(84908),f=u(79442),y=u(88010),d=u(81059),v=S.extend({makeElOption:function(s,l,w,I,C){var h,c=w.axis;c.dim==="angle"&&(this.animationThreshold=Math.PI/18);var m=c.polar,T=m.getOtherAxis(c).getExtent();h=c["dataTo"+o.capitalFirst(c.dim)](l);var D=I.get("type");if(D&&D!=="none"){var O=p.buildElStyle(I),N=b[D](c,m,h,T,O);N.style=O,s.graphicKey=N.type,s.pointer=N}var z=function(H,$,V,P,U){var Y,Z,X,J=$.axis,q=J.dataToCoord(H),te=P.getAngleAxis().getExtent()[0];te=te/180*Math.PI;var re=P.getRadiusAxis().getExtent();if(J.dim==="radius"){var ie=f.create();f.rotate(ie,ie,te),f.translate(ie,ie,[P.cx,P.cy]),Y=_.applyTransform([q,-U],ie);var ne=$.getModel("axisLabel").get("rotate")||0,le=y.innerTextLayout(te,ne*Math.PI/180,-1);Z=le.textAlign,X=le.textVerticalAlign}else{var fe=re[1];Y=P.coordToPoint([fe+U,q]);var we=P.cx,pe=P.cy;Z=Math.abs(Y[0]-we)/fe<.3?"center":Y[0]>we?"left":"right",X=Math.abs(Y[1]-pe)/fe<.3?"middle":Y[1]>pe?"top":"bottom"}return{position:Y,align:Z,verticalAlign:X}}(l,w,0,m,I.get("label.margin"));p.buildLabelElOption(s,w,I,C,z)}}),b={line:function(s,l,w,I,C){return s.dim==="angle"?{type:"Line",shape:p.makeLineShape(l.coordToPoint([I[0],w]),l.coordToPoint([I[1],w]))}:{type:"Circle",shape:{cx:l.cx,cy:l.cy,r:w}}},shadow:function(s,l,w,I,C){var h=Math.max(1,s.getBandWidth()),c=Math.PI/180;return s.dim==="angle"?{type:"Sector",shape:p.makeSectorShape(l.cx,l.cy,I[0],I[1],(-w-h/2)*c,(-w+h/2)*c)}:{type:"Sector",shape:p.makeSectorShape(l.cx,l.cy,w-h/2,w+h/2,0,2*Math.PI)}}};d.registerAxisPointerClass("PolarAxisPointer",v),E.exports=v},48102:function(E,A,u){var o=u(51747),S=u(95003),_=u(84908),p=u(91456),f=u(81059),y=["x","y"],d=["width","height"],v=S.extend({makeElOption:function(w,I,C,h,c){var m=C.axis,T=m.coordinateSystem,D=l(T,1-s(m)),O=T.dataToPoint(I)[0],N=h.get("type");if(N&&N!=="none"){var z=_.buildElStyle(h),H=b[N](m,O,D,z);H.style=z,w.graphicKey=H.type,w.pointer=H}var $=p.layout(C);_.buildCartesianSingleLabelElOption(I,w,$,C,h,c)},getHandleTransform:function(w,I,C){var h=p.layout(I,{labelInside:!1});return h.labelMargin=C.get("handle.margin"),{position:_.getTransformedPosition(I.axis,w,h),rotation:h.rotation+(h.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(w,I,C,h){var c=C.axis,m=c.coordinateSystem,T=s(c),D=l(m,T),O=w.position;O[T]+=I[T],O[T]=Math.min(D[1],O[T]),O[T]=Math.max(D[0],O[T]);var N=l(m,1-T),z=(N[1]+N[0])/2,H=[z,z];return H[T]=O[T],{position:O,rotation:w.rotation,cursorPoint:H,tooltipOption:{verticalAlign:"middle"}}}}),b={line:function(w,I,C,h){var c=_.makeLineShape([I,C[0]],[I,C[1]],s(w));return o.subPixelOptimizeLine({shape:c,style:h}),{type:"Line",shape:c}},shadow:function(w,I,C,h){var c=w.getBandWidth(),m=C[1]-C[0];return{type:"Rect",shape:_.makeRectShape([I-c/2,C[0]],[c,m],s(w))}}};function s(w){return+!w.isHorizontal()}function l(w,I){var C=w.getRect();return[C[y[I]],C[y[I]]+C[d[I]]]}f.registerAxisPointerClass("SingleAxisPointer",v),E.exports=v},71155:function(E,A,u){var o=u(23405),S=u(51064).makeInner,_=u(93267),p=u(2885),f=o.each,y=o.curry,d=S();function v(I,C,h,c,m){var T=I.axis;if(!T.scale.isBlank()&&T.containData(C)){if(!I.involveSeries)return void h.showPointer(I,C);var D,O,N,z,H,$,V,P,U=(D=C,z=(N=(O=I).axis).dim,H=D,$=[],V=Number.MAX_VALUE,P=-1,f(O.seriesModels,function(X,J){var q,te,re=X.getData().mapDimension(z,!0);if(X.getAxisTooltipData){var ie=X.getAxisTooltipData(re,D,N);te=ie.dataIndices,q=ie.nestestValue}else{if(!(te=X.getData().indicesOfNearest(re[0],D,N.type==="category"?.5:null)).length)return;q=X.getData().get(re[0],te[0])}if(q!=null&&isFinite(q)){var ne=D-q,le=Math.abs(ne);le<=V&&((le<V||ne>=0&&P<0)&&(V=le,P=ne,H=q,$.length=0),f(te,function(fe){$.push({seriesIndex:X.seriesIndex,dataIndexInside:fe,dataIndex:X.getData().getRawIndex(fe)})}))}}),{payloadBatch:$,snapToValue:H}),Y=U.payloadBatch,Z=U.snapToValue;Y[0]&&m.seriesIndex==null&&o.extend(m,Y[0]),!c&&I.snap&&T.containData(Z)&&Z!=null&&(C=Z),h.showPointer(I,C,Y,m),h.showTooltip(I,U,Z)}}function b(I,C,h,c){I[C.key]={value:h,payloadBatch:c}}function s(I,C,h,c){var m=h.payloadBatch,T=C.axis,D=T.model,O=C.axisPointerModel;if(C.triggerTooltip&&m.length){var N=C.coordSys.model,z=_.makeKey(N),H=I.map[z];H||(H=I.map[z]={coordSysId:N.id,coordSysIndex:N.componentIndex,coordSysType:N.type,coordSysMainType:N.mainType,dataByAxis:[]},I.list.push(H)),H.dataByAxis.push({axisDim:T.dim,axisIndex:D.componentIndex,axisType:D.type,axisId:D.id,value:c,valueLabelOpt:{precision:O.get("label.precision"),formatter:O.get("label.formatter")},seriesDataIndices:m.slice()})}}function l(I){var C=I.axis.model,h={},c=h.axisDim=I.axis.dim;return h.axisIndex=h[c+"AxisIndex"]=C.componentIndex,h.axisName=h[c+"AxisName"]=C.name,h.axisId=h[c+"AxisId"]=C.id,h}function w(I){return!I||I[0]==null||isNaN(I[0])||I[1]==null||isNaN(I[1])}E.exports=function(I,C,h){var c=I.currTrigger,m=[I.x,I.y],T=I.dispatchAction||o.bind(h.dispatchAction,h),D=C.getComponent("axisPointer").coordSysAxesInfo;if(D){w(m)&&(m=p({seriesIndex:I.seriesIndex,dataIndex:I.dataIndex},C).point);var O,N,z,H,$,V,P,U,Y,Z,X,J=w(m),q=I.axesInfo,te=D.axesInfo,re=c==="leave"||w(m),ie={},ne={},le={list:[],map:{}},fe={showPointer:y(b,ne),showTooltip:y(s,le)};f(D.coordSysMap,function(pe,ve){var be=J||pe.containPoint(m);f(D.coordSysAxesInfo[ve],function(Ee,Re){var Ne=Ee.axis,Le=function(Ie,_e){for(var Ae=0;Ae<(Ie||[]).length;Ae++){var ue=Ie[Ae];if(_e.axis.dim===ue.axisDim&&_e.axis.model.componentIndex===ue.axisIndex)return ue}}(q,Ee);if(!re&&be&&(!q||Le)){var Se=Le&&Le.value;Se!=null||J||(Se=Ne.pointToData(m)),Se!=null&&v(Ee,Se,fe,!1,ie)}})});var we={};return f(te,function(pe,ve){var be=pe.linkGroup;be&&!ne[ve]&&f(be.axesInfo,function(Ee,Re){var Ne=ne[Re];if(Ee!==pe&&Ne){var Le=Ne.value;be.mapper&&(Le=pe.axis.scale.parse(be.mapper(Le,l(Ee),l(pe)))),we[pe.key]=Le}})}),f(we,function(pe,ve){v(te[ve],pe,fe,!0,ie)}),O=ne,N=te,z=ie.axesInfo=[],f(N,function(pe,ve){var be=pe.axisPointerModel.option,Ee=O[ve];Ee?(pe.useHandle||(be.status="show"),be.value=Ee.value,be.seriesDataIndices=(Ee.payloadBatch||[]).slice()):pe.useHandle||(be.status="hide"),be.status==="show"&&z.push({axisDim:pe.axis.dim,axisIndex:pe.axis.model.componentIndex,value:be.value})}),function(pe,ve,be,Ee){if(w(ve)||!pe.list.length)return Ee({type:"hideTip"});var Re=((pe.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};Ee({type:"showTip",escapeConnect:!0,x:ve[0],y:ve[1],tooltipOption:be.tooltipOption,position:be.position,dataIndexInside:Re.dataIndexInside,dataIndex:Re.dataIndex,seriesIndex:Re.seriesIndex,dataByCoordSys:pe.list})}(le,m,I,T),H=te,V=($=h).getZr(),P="axisPointerLastHighlights",U=d(V)[P]||{},Y=d(V)[P]={},f(H,function(pe,ve){var be=pe.axisPointerModel.option;be.status==="show"&&f(be.seriesDataIndices,function(Ee){Y[Ee.seriesIndex+" | "+Ee.dataIndex]=Ee})}),Z=[],X=[],o.each(U,function(pe,ve){Y[ve]||X.push(pe)}),o.each(Y,function(pe,ve){U[ve]||Z.push(pe)}),X.length&&$.dispatchAction({type:"downplay",escapeConnect:!0,batch:X}),Z.length&&$.dispatchAction({type:"highlight",escapeConnect:!0,batch:Z}),ie}}},2885:function(E,A,u){var o=u(23405),S=u(51064);E.exports=function(_,p){var f,y=[],d=_.seriesIndex;if(d==null||!(f=p.getSeriesByIndex(d)))return{point:[]};var v=f.getData(),b=S.queryDataIndex(v,_);if(b==null||b<0||o.isArray(b))return{point:[]};var s=v.getItemGraphicEl(b),l=f.coordinateSystem;if(f.getTooltipPosition)y=f.getTooltipPosition(b)||[];else if(l&&l.dataToPoint)y=l.dataToPoint(v.getValues(o.map(l.dimensions,function(I){return v.mapDimension(I)}),b,!0))||[];else if(s){var w=s.getBoundingRect().clone();w.applyTransform(s.transform),y=[w.x+w.width/2,w.y+w.height/2]}return{point:y,el:s}}},46357:function(E,A,u){var o=u(23405),S=u(23584),_=(0,u(51064).makeInner)(),p=o.each;function f(d,v,b){d.handler("leave",null,b)}function y(d,v,b,s){v.handler(d,b,s)}A.register=function(d,v,b){if(!S.node){var s=v.getZr();_(s).records||(_(s).records={}),function(l,w){_(l).initialized||(_(l).initialized=!0,I("click",o.curry(y,"click")),I("mousemove",o.curry(y,"mousemove")),I("globalout",f));function I(C,h){l.on(C,function(c){var m,T,D,O,N,z,H,$,V=(m=w,T={showTip:[],hideTip:[]},{dispatchAction:D=function(P){var U=T[P.type];U?U.push(P):(P.dispatchAction=D,m.dispatchAction(P))},pendings:T});p(_(l).records,function(P){P&&h(P,c,V.dispatchAction)}),O=V.pendings,N=w,H=O.showTip.length,$=O.hideTip.length,H?z=O.showTip[H-1]:$&&(z=O.hideTip[$-1]),z&&(z.dispatchAction=null,N.dispatchAction(z))})}}(s,v),(_(s).records[d]||(_(s).records[d]={})).handler=b}},A.unregister=function(d,v){if(!S.node){var b=v.getZr();(_(b).records||{})[d]&&(_(b).records[d]=null)}}},93267:function(E,A,u){var o=u(23405),S=u(46082),_=o.each,p=o.curry;function f(b,s){return b==="all"||o.isArray(b)&&o.indexOf(b,s)>=0||b===s}function y(b){var s=(b.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return s&&s.axesInfo[v(b)]}function d(b){return!!b.get("handle.show")}function v(b){return b.type+"||"+b.id}A.collect=function(b,s){var l,w,I,C,h,c,m,T={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return l=T,w=b,I=s,C=w.getComponent("tooltip"),c=(h=w.getComponent("axisPointer")).get("link",!0)||[],m=[],_(I.getCoordinateSystems(),function(D){if(D.axisPointerEnabled){var O=v(D.model),N=l.coordSysAxesInfo[O]={};l.coordSysMap[O]=D;var z=D.model.getModel("tooltip",C);if(_(D.getAxes(),p(P,!1,null)),D.getTooltipAxes&&C&&z.get("show")){var H=z.get("trigger")==="axis",$=z.get("axisPointer.type")==="cross",V=D.getTooltipAxes(z.get("axisPointer.axis"));(H||$)&&_(V.baseAxes,p(P,!$||"cross",H)),$&&_(V.otherAxes,p(P,"cross",!1))}}function P(U,Y,Z){var X=Z.model.getModel("axisPointer",h),J=X.get("show");if(J&&(J!=="auto"||U||d(X))){Y==null&&(Y=X.get("triggerTooltip"));var q=(X=U?function(fe,we,pe,ve,be,Ee){var Re=we.getModel("axisPointer"),Ne={};_(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(_e){Ne[_e]=o.clone(Re.get(_e))}),Ne.snap=fe.type!=="category"&&!!Ee,Re.get("type")==="cross"&&(Ne.type="line");var Le=Ne.label||(Ne.label={});if(Le.show==null&&(Le.show=!1),be==="cross"){var Se=Re.get("label.show");if(Le.show=Se==null||Se,!Ee){var Ie=Ne.lineStyle=Re.get("crossStyle");Ie&&o.defaults(Le,Ie.textStyle)}}return fe.model.getModel("axisPointer",new S(Ne,pe,ve))}(Z,z,h,w,U,Y):X).get("snap"),te=v(Z.model),re=Y||q||Z.type==="category",ie=l.axesInfo[te]={key:te,axis:Z,coordSys:D,axisPointerModel:X,triggerTooltip:Y,involveSeries:re,snap:q,useHandle:d(X),seriesModels:[]};N[te]=ie,l.seriesInvolved|=re;var ne=function(fe,we){for(var pe=we.model,ve=we.dim,be=0;be<fe.length;be++){var Ee=fe[be]||{};if(f(Ee[ve+"AxisId"],pe.id)||f(Ee[ve+"AxisIndex"],pe.componentIndex)||f(Ee[ve+"AxisName"],pe.name))return be}}(c,Z);if(ne!=null){var le=m[ne]||(m[ne]={axesInfo:{}});le.axesInfo[te]=ie,le.mapper=c[ne].mapper,ie.linkGroup=le}}}}),T.seriesInvolved&&function(D,O){O.eachSeries(function(N){var z=N.coordinateSystem,H=N.get("tooltip.trigger",!0),$=N.get("tooltip.show",!0);z&&H!=="none"&&H!==!1&&H!=="item"&&$!==!1&&N.get("axisPointer.show",!0)!==!1&&_(D.coordSysAxesInfo[v(z.model)],function(V){var P=V.axis;z.getAxis(P.dim)===P&&(V.seriesModels.push(N),V.seriesDataCount==null&&(V.seriesDataCount=0),V.seriesDataCount+=N.getData().count())})},this)}(T,b),T},A.fixValue=function(b){var s=y(b);if(s){var l=s.axisPointerModel,w=s.axis.scale,I=l.option,C=l.get("status"),h=l.get("value");h!=null&&(h=w.parse(h));var c=d(l);C==null&&(I.status=c?"show":"hide");var m=w.getExtent().slice();m[0]>m[1]&&m.reverse(),(h==null||h>m[1])&&(h=m[1]),h<m[0]&&(h=m[0]),I.value=h,c&&(I.status=s.axis.scale.isBlank()?"hide":"show")}},A.getAxisInfo=y,A.getAxisPointerModel=function(b){var s=y(b);return s&&s.axisPointerModel},A.makeKey=v},84908:function(E,A,u){var o=u(23405),S=u(51747),_=u(24570),p=u(60653),f=u(79442),y=u(51261),d=u(88010);function v(l,w,I,C,h){var c,m,T,D,O,N,z=b(I.get("value"),w.axis,w.ecModel,I.get("seriesDataIndices"),{precision:I.get("label.precision"),formatter:I.get("label.formatter")}),H=I.getModel("label"),$=p.normalizeCssArray(H.get("padding")||0),V=H.getFont(),P=_.getBoundingRect(z,V),U=h.position,Y=P.width+$[1]+$[3],Z=P.height+$[0]+$[2],X=h.align;X==="right"&&(U[0]-=Y),X==="center"&&(U[0]-=Y/2);var J=h.verticalAlign;J==="bottom"&&(U[1]-=Z),J==="middle"&&(U[1]-=Z/2),c=U,m=Y,T=Z,O=(D=C).getWidth(),N=D.getHeight(),c[0]=Math.min(c[0]+m,O)-m,c[1]=Math.min(c[1]+T,N)-T,c[0]=Math.max(c[0],0),c[1]=Math.max(c[1],0);var q=H.get("backgroundColor");q&&q!=="auto"||(q=w.get("axisLine.lineStyle.color")),l.label={shape:{x:0,y:0,width:Y,height:Z,r:H.get("borderRadius")},position:U.slice(),style:{text:z,textFont:V,textFill:H.getTextColor(),textPosition:"inside",fill:q,stroke:H.get("borderColor")||"transparent",lineWidth:H.get("borderWidth")||0,shadowBlur:H.get("shadowBlur"),shadowColor:H.get("shadowColor"),shadowOffsetX:H.get("shadowOffsetX"),shadowOffsetY:H.get("shadowOffsetY")},z2:10}}function b(l,w,I,C,h){l=w.scale.parse(l);var c=w.scale.getLabel(l,{precision:h.precision}),m=h.formatter;if(m){var T={value:y.getAxisRawValue(w,l),seriesData:[]};o.each(C,function(D){var O=I.getSeriesByIndex(D.seriesIndex),N=D.dataIndexInside,z=O&&O.getDataParams(N);z&&T.seriesData.push(z)}),o.isString(m)?c=m.replace("{value}",c):o.isFunction(m)&&(c=m(T))}return c}function s(l,w,I){var C=f.create();return f.rotate(C,C,I.rotation),f.translate(C,C,I.position),S.applyTransform([l.dataToCoord(w),(I.labelOffset||0)+(I.labelDirection||1)*(I.labelMargin||0)],C)}A.buildElStyle=function(l){var w,I=l.get("type"),C=l.getModel(I+"Style");return I==="line"?(w=C.getLineStyle()).fill=null:I==="shadow"&&((w=C.getAreaStyle()).stroke=null),w},A.buildLabelElOption=v,A.getValueLabel=b,A.getTransformedPosition=s,A.buildCartesianSingleLabelElOption=function(l,w,I,C,h,c){var m=d.innerTextLayout(I.rotation,0,I.labelDirection);I.labelMargin=h.get("label.margin"),v(w,C,h,c,{position:s(C.axis,l,I),align:m.textAlign,verticalAlign:m.textVerticalAlign})},A.makeLineShape=function(l,w,I){return{x1:l[I=I||0],y1:l[1-I],x2:w[I],y2:w[1-I]}},A.makeRectShape=function(l,w,I){return{x:l[I=I||0],y:l[1-I],width:w[I],height:w[1-I]}},A.makeSectorShape=function(l,w,I,C,h,c){return{cx:l,cy:w,r0:I,r:C,startAngle:h,endAngle:c,clockwise:!0}}},17447:function(E,A,u){var o=u(87930),S=u(6237);u(11760),u(21975),u(2783),u(81537),u(21318),o.registerPreprocessor(S)},21975:function(E,A,u){u(9129).__DEV__;var o=u(87930),S=u(23405),_=u(55925),p=u(46082),f=["#ddd"];function y(d,v){return S.merge({brushType:d.brushType,brushMode:d.brushMode,transformable:d.transformable,brushStyle:new p(d.brushStyle).getItemStyle(),removeOnClick:d.removeOnClick,z:d.z},v,!0)}E.exports=o.extendComponentModel({type:"brush",dependencies:["geo","grid","xAxis","yAxis","parallel","series"],defaultOption:{toolbox:null,brushLink:null,seriesIndex:"all",geoIndex:null,xAxisIndex:null,yAxisIndex:null,brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(120,140,180,0.3)",borderColor:"rgba(120,140,180,0.8)"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},areas:[],brushType:null,brushOption:{},coordInfoList:[],optionUpdated:function(d,v){var b=this.option;v||_.replaceVisualOption(b,d,["inBrush","outOfBrush"]);var s=b.inBrush=b.inBrush||{};b.outOfBrush=b.outOfBrush||{color:f},s.hasOwnProperty("liftZ")||(s.liftZ=5)},setAreas:function(d){d&&(this.areas=S.map(d,function(v){return y(this.option,v)},this))},setBrushOption:function(d){this.brushOption=y(this.option,d),this.brushType=this.brushOption.brushType}})},2783:function(E,A,u){var o=u(87930),S=u(23405),_=u(29006);function p(f,y,d,v){v&&v.$from===f.id||this._brushController.setPanels(f.brushTargetManager.makePanelOpts(d)).enableBrush(f.brushOption).updateCovers(f.areas.slice())}E.exports=o.extendComponentView({type:"brush",init:function(f,y){this.ecModel=f,this.api=y,this.model,(this._brushController=new _(y.getZr())).on("brush",S.bind(this._onBrush,this)).mount()},render:function(f){return this.model=f,p.apply(this,arguments)},updateTransform:p,updateView:p,dispose:function(){this._brushController.dispose()},_onBrush:function(f,y){var d=this.model.id;this.model.brushTargetManager.setOutputRanges(f,this.ecModel),(!y.isEnd||y.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:d,areas:S.clone(f),$from:d})}})},81537:function(E,A,u){var o=u(87930);o.registerAction({type:"brush",event:"brush"},function(S,_){_.eachComponent({mainType:"brush",query:S},function(p){p.setAreas(S.areas)})}),o.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},function(){})},6237:function(E,A,u){var o=u(23405),S=["rect","polygon","keep","clear"];E.exports=function(_,p){var f=_&&_.brush;if(o.isArray(f)||(f=f?[f]:[]),f.length){var y,d,v=[];o.each(f,function(I){var C=I.hasOwnProperty("toolbox")?I.toolbox:[];C instanceof Array&&(v=v.concat(C))});var b=_&&_.toolbox;o.isArray(b)&&(b=b[0]),b||(_.toolbox=[b={feature:{}}]);var s=b.feature||(b.feature={}),l=s.brush||(s.brush={}),w=l.type||(l.type=[]);w.push.apply(w,v),y=w,d={},o.each(y,function(I){d[I]=1}),y.length=0,o.each(d,function(I,C){y.push(C)}),p&&!w.length&&w.push.apply(w,S)}}},31301:function(E,A,u){var o=u(94457),S=u(28761);function _(y){var d=["x","y"],v=["width","height"];return{point:function(b,s,l){if(b){var w=l.range;return p(b[y],w)}},rect:function(b,s,l){if(b){var w=l.range,I=[b[d[y]],b[d[y]]+b[v[y]]];return I[1]<I[0]&&I.reverse(),p(I[0],w)||p(I[1],w)||p(w[0],I)||p(w[1],I)}}}}function p(y,d){return d[0]<=y&&y<=d[1]}function f(y,d,v,b,s){for(var l=0,w=s[s.length-1];l<s.length;l++){var I=s[l];if(function(C,h,c,m,T,D,O,N){var z,H=function(P,U,Y,Z){return P*Z-U*Y}(c-C,T-O,m-h,D-N);if((z=H)<=1e-6&&z>=-1e-6)return!1;var $=function(P,U,Y,Z){return P*Z-U*Y}(T-C,T-O,D-h,D-N)/H;if($<0||$>1)return!1;var V=function(P,U,Y,Z){return P*Z-U*Y}(c-C,T-C,m-h,D-h)/H;return!(V<0)&&!(V>1)}(y,d,v,b,I[0],I[1],w[0],w[1]))return!0;w=I}}E.exports={lineX:_(0),lineY:_(1),rect:{point:function(y,d,v){return y&&v.boundingRect.contain(y[0],y[1])},rect:function(y,d,v){return y&&v.boundingRect.intersect(y)}},polygon:{point:function(y,d,v){return y&&v.boundingRect.contain(y[0],y[1])&&o.contain(v.range,y[0],y[1])},rect:function(y,d,v){var b=v.range;if(!y||b.length<=1)return!1;var s=y.x,l=y.y,w=y.width,I=y.height,C=b[0];if(o.contain(b,s,l)||o.contain(b,s+w,l)||o.contain(b,s,l+I)||o.contain(b,s+w,l+I)||S.create(y).contain(C[0],C[1])||f(s,l,s+w,l,b)||f(s,l,s,l+I,b)||f(s+w,l,s+w,l+I,b)||f(s,l+I,s+w,l+I,b))return!0}}}},11760:function(E,A,u){var o=u(87930),S=u(23405),_=u(28761),p=u(55925),f=u(31301),y=u(94127),d=u(76744),v=["inBrush","outOfBrush"],b="__ecBrushSelect",s="__ecInBrushSelectEvent",l=o.PRIORITY.VISUAL.BRUSH;function w(m,T){if(!m.isDisposed()){var D=m.getZr();D[s]=!0,m.dispatchAction({type:"brushSelect",batch:T}),D[s]=!1}}function I(m,T,D,O){for(var N=0,z=T.length;N<z;N++){var H=T[N];if(m[H.brushType](O,D,H.selectors,H))return!0}}function C(m){var T=m.brushSelector;if(S.isString(T)){var D=[];return S.each(f,function(N,z){D[z]=function(H,$,V,P){var U=$.getItemLayout(H);return N[T](U,V,P)}}),D}if(S.isFunction(T)){var O={};return S.each(f,function(N,z){O[z]=T}),O}return T}o.registerLayout(l,function(m,T,D){m.eachComponent({mainType:"brush"},function(O){D&&D.type==="takeGlobalCursor"&&O.setBrushOption(D.key==="brush"?D.brushOption:{brushType:!1}),(O.brushTargetManager=new d(O.option,m)).setInputRanges(O.areas,m)})}),o.registerVisual(l,function(m,T,D){var O,N,z=[];m.eachComponent({mainType:"brush"},function(H,$){var V={brushId:H.id,brushIndex:$,brushName:H.name,areas:S.clone(H.areas),selected:[]};z.push(V);var P=H.option,U=P.brushLink,Y=[],Z=[],X=[],J=0;$||(O=P.throttleType,N=P.throttleDelay);var q=S.map(H.areas,function(ne){var le,fe;return fe=(le=S.defaults({boundingRect:h[ne.brushType](ne)},ne)).selectors={},S.each(f[le.brushType],function(we,pe){fe[pe]=function(ve){return we(ve,fe,le)}}),le}),te=p.createVisualMappings(H.option,v,function(ne){ne.mappingMethod="fixed"});function re(ne){return U==="all"||Y[ne]}function ie(ne){return!!ne.length}S.isArray(U)&&S.each(U,function(ne){Y[ne]=1}),m.eachSeries(function(ne,le){var fe,we,pe,ve=X[le]=[];ne.subType==="parallel"?(fe=ne,we=le,pe=fe.coordinateSystem,J|=pe.hasAxisBrushed(),re(we)&&pe.eachActiveState(fe.getData(),function(be,Ee){be==="active"&&(Z[Ee]=1)})):function(be,Ee,Re){var Ne,Le,Se,Ie=C(be);if(!(!Ie||(Ne=H,Le=Ee,(Se=Ne.option.seriesIndex)!=null&&Se!=="all"&&(S.isArray(Se)?0>S.indexOf(Se,Le):Le!==Se)))&&(S.each(q,function(Ae){Ie[Ae.brushType]&&H.brushTargetManager.controlSeries(Ae,be,m)&&Re.push(Ae),J|=ie(Re)}),re(Ee)&&ie(Re))){var _e=be.getData();_e.each(function(Ae){I(Ie,Re,_e,Ae)&&(Z[Ae]=1)})}}(ne,le,ve)}),m.eachSeries(function(ne,le){var fe={seriesId:ne.id,seriesIndex:le,seriesName:ne.name,dataIndex:[]};V.selected.push(fe);var we=C(ne),pe=X[le],ve=ne.getData(),be=re(le)?function(Ee){return Z[Ee]?(fe.dataIndex.push(ve.getRawIndex(Ee)),"inBrush"):"outOfBrush"}:function(Ee){return I(we,pe,ve,Ee)?(fe.dataIndex.push(ve.getRawIndex(Ee)),"inBrush"):"outOfBrush"};(re(le)?J:ie(pe))&&p.applyVisual(v,te,ve,be)})}),function(H,$,V,P,U){if(U){var Y=H.getZr();Y[s]||(Y[b]||(Y[b]=w),y.createOrUpdate(Y,b,V,$)(H,P))}}(T,O,N,z,D)});var h={lineX:S.noop,lineY:S.noop,rect:function(m){return c(m.range)},polygon:function(m){for(var T,D=m.range,O=0,N=D.length;O<N;O++){T=T||[[1/0,-1/0],[1/0,-1/0]];var z=D[O];z[0]<T[0][0]&&(T[0][0]=z[0]),z[0]>T[0][1]&&(T[0][1]=z[0]),z[1]<T[1][0]&&(T[1][0]=z[1]),z[1]>T[1][1]&&(T[1][1]=z[1])}return T&&c(T)}};function c(m){return new _(m[0][0],m[1][0],m[0][1]-m[0][0],m[1][1]-m[1][0])}},72017:function(E,A,u){u(91370),u(54466),u(8844)},8844:function(E,A,u){var o=u(87930),S=u(23405),_=u(51747),p=u(60653),f=u(54684),y={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},d={EN:["S","M","T","W","T","F","S"],CN:["日","一","二","三","四","五","六"]};E.exports=o.extendComponentView({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(v,b,s){var l=this.group;l.removeAll();var w=v.coordinateSystem,I=w.getRangeInfo(),C=w.getOrient();this._renderDayRect(v,I,l),this._renderLines(v,I,C,l),this._renderYearText(v,I,C,l),this._renderMonthText(v,C,l),this._renderWeekText(v,I,C,l)},_renderDayRect:function(v,b,s){for(var l=v.coordinateSystem,w=v.getModel("itemStyle").getItemStyle(),I=l.getCellWidth(),C=l.getCellHeight(),h=b.start.time;h<=b.end.time;h=l.getNextNDay(h,1).time){var c=l.dataToRect([h],!1).tl,m=new _.Rect({shape:{x:c[0],y:c[1],width:I,height:C},cursor:"default",style:w});s.add(m)}},_renderLines:function(v,b,s,l){var w=this,I=v.coordinateSystem,C=v.getModel("splitLine.lineStyle").getLineStyle(),h=v.get("splitLine.show"),c=C.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var m=b.start,T=0;m.time<=b.end.time;T++){O(m.formatedDate),T===0&&(m=I.getDateInfo(b.start.y+"-"+b.start.m));var D=m.date;D.setMonth(D.getMonth()+1),m=I.getDateInfo(D)}function O(N){w._firstDayOfMonth.push(I.getDateInfo(N)),w._firstDayPoints.push(I.dataToRect([N],!1).tl);var z=w._getLinePointsOfOneWeek(v,N,s);w._tlpoints.push(z[0]),w._blpoints.push(z[z.length-1]),h&&w._drawSplitline(z,C,l)}O(I.getNextNDay(b.end.time,1).formatedDate),h&&this._drawSplitline(w._getEdgesPoints(w._tlpoints,c,s),C,l),h&&this._drawSplitline(w._getEdgesPoints(w._blpoints,c,s),C,l)},_getEdgesPoints:function(v,b,s){var l=[v[0].slice(),v[v.length-1].slice()],w=+(s!=="horizontal");return l[0][w]=l[0][w]-b/2,l[1][w]=l[1][w]+b/2,l},_drawSplitline:function(v,b,s){var l=new _.Polyline({z2:20,shape:{points:v},style:b});s.add(l)},_getLinePointsOfOneWeek:function(v,b,s){var l=v.coordinateSystem;b=l.getDateInfo(b);for(var w=[],I=0;I<7;I++){var C=l.getNextNDay(b.time,I),h=l.dataToRect([C.time],!1);w[2*C.day]=h.tl,w[2*C.day+1]=h[s==="horizontal"?"bl":"tr"]}return w},_formatterLabel:function(v,b){return typeof v=="string"&&v?p.formatTplSimple(v,b):typeof v=="function"?v(b):b.nameMap},_yearTextPositionControl:function(v,b,s,l,w){b=b.slice();var I=["center","bottom"];l==="bottom"?(b[1]+=w,I=["center","top"]):l==="left"?b[0]-=w:l==="right"?(b[0]+=w,I=["center","top"]):b[1]-=w;var C=0;return(l==="left"||l==="right")&&(C=Math.PI/2),{rotation:C,position:b,style:{textAlign:I[0],textVerticalAlign:I[1]}}},_renderYearText:function(v,b,s,l){var w=v.getModel("yearLabel");if(w.get("show")){var I=w.get("margin"),C=w.get("position");C||(C=s!=="horizontal"?"top":"left");var h=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],c=(h[0][0]+h[1][0])/2,m=(h[0][1]+h[1][1])/2,T=+(s!=="horizontal"),D={top:[c,h[T][1]],bottom:[c,h[1-T][1]],left:[h[1-T][0],m],right:[h[T][0],m]},O=b.start.y;+b.end.y>+b.start.y&&(O=O+"-"+b.end.y);var N=w.get("formatter"),z={start:b.start.y,end:b.end.y,nameMap:O},H=this._formatterLabel(N,z),$=new _.Text({z2:30});_.setTextStyle($.style,w,{text:H}),$.attr(this._yearTextPositionControl($,D[C],s,C,I)),l.add($)}},_monthTextPositionControl:function(v,b,s,l,w){var I="left",C="top",h=v[0],c=v[1];return s==="horizontal"?(c+=w,b&&(I="center"),l==="start"&&(C="bottom")):(h+=w,b&&(C="middle"),l==="start"&&(I="right")),{x:h,y:c,textAlign:I,textVerticalAlign:C}},_renderMonthText:function(v,b,s){var l=v.getModel("monthLabel");if(l.get("show")){var w=l.get("nameMap"),I=l.get("margin"),C=l.get("position"),h=l.get("align"),c=[this._tlpoints,this._blpoints];S.isString(w)&&(w=y[w.toUpperCase()]||[]);var m=+(C!=="start"),T=+(b!=="horizontal");I=C==="start"?-I:I;for(var D=h==="center",O=0;O<c[m].length-1;O++){var N=c[m][O].slice(),z=this._firstDayOfMonth[O];if(D){var H=this._firstDayPoints[O];N[T]=(H[T]+c[0][O+1][T])/2}var $=l.get("formatter"),V=w[+z.m-1],P={yyyy:z.y,yy:(z.y+"").slice(2),MM:z.m,M:+z.m,nameMap:V},U=this._formatterLabel($,P),Y=new _.Text({z2:30});S.extend(_.setTextStyle(Y.style,l,{text:U}),this._monthTextPositionControl(N,D,b,C,I)),s.add(Y)}}},_weekTextPositionControl:function(v,b,s,l,w){var I="center",C="middle",h=v[0],c=v[1],m=s==="start";return b==="horizontal"?(h=h+l+(m?1:-1)*w[0]/2,I=m?"right":"left"):(c=c+l+(m?1:-1)*w[1]/2,C=m?"bottom":"top"),{x:h,y:c,textAlign:I,textVerticalAlign:C}},_renderWeekText:function(v,b,s,l){var w=v.getModel("dayLabel");if(w.get("show")){var I=v.coordinateSystem,C=w.get("position"),h=w.get("nameMap"),c=w.get("margin"),m=I.getFirstDayOfWeek();S.isString(h)&&(h=d[h.toUpperCase()]||[]);var T=I.getNextNDay(b.end.time,7-b.lweek).time,D=[I.getCellWidth(),I.getCellHeight()];c=f.parsePercent(c,D[+(s!=="horizontal")]),C==="start"&&(T=I.getNextNDay(b.start.time,-(7+b.fweek)).time,c=-c);for(var O=0;O<7;O++){var N=I.getNextNDay(T,O),z=I.dataToRect([N.time],!1).center,H=O;H=Math.abs((O+m)%7);var $=new _.Text({z2:30});S.extend(_.setTextStyle($.style,w,{text:h[H]}),this._weekTextPositionControl(z,s,C,c,D)),l.add($)}}}})},41473:function(E,A,u){u(61977),u(19173),u(6418),u(90536),u(32429),u(63574),u(49676),u(36771),u(79398)},84392:function(E,A,u){var o=u(23405),S=u(54684),_=u(22255),p=o.each,f=S.asc,y=function(v,b,s,l){this._dimName=v,this._axisIndex=b,this._valueWindow,this._percentWindow,this._dataExtent,this._minMaxSpan,this.ecModel=l,this._dataZoomModel=s};function d(v,b){var s=v.getAxisModel(),l=v._percentWindow,w=v._valueWindow;if(l){var I=S.getPixelPrecision(w,[0,500]);I=Math.min(I,20);var C=b||l[0]===0&&l[1]===100;s.setRange(C?null:+w[0].toFixed(I),C?null:+w[1].toFixed(I))}}y.prototype={constructor:y,hostedBy:function(v){return this._dataZoomModel===v},getDataValueWindow:function(){return this._valueWindow.slice()},getDataPercentWindow:function(){return this._percentWindow.slice()},getTargetSeriesModels:function(){var v=[],b=this.ecModel;return b.eachSeries(function(s){if(_.isCoordSupported(s.get("coordinateSystem"))){var l=this._dimName,w=b.queryComponents({mainType:l+"Axis",index:s.get(l+"AxisIndex"),id:s.get(l+"AxisId")})[0];this._axisIndex===(w&&w.componentIndex)&&v.push(s)}},this),v},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var v,b,s,l=this._dimName,w=this.ecModel,I=this.getAxisModel();return l==="x"||l==="y"?(b="gridIndex",v=l==="x"?"y":"x"):(b="polarIndex",v=l==="angle"?"radius":"angle"),w.eachComponent(v+"Axis",function(C){(C.get(b)||0)===(I.get(b)||0)&&(s=C)}),s},getMinMaxSpan:function(){return o.clone(this._minMaxSpan)},calculateDataWindow:function(v){var b=this._dataExtent,s=this.getAxisModel().axis.scale,l=this._dataZoomModel.getRangePropMode(),w=[0,100],I=[v.start,v.end],C=[];return p(["startValue","endValue"],function(h){C.push(v[h]!=null?s.parse(v[h]):null)}),p([0,1],function(h){var c=C[h],m=I[h];l[h]==="percent"?(m==null&&(m=w[h]),c=s.parse(S.linearMap(m,w,b,!0))):m=S.linearMap(c,b,w,!0),C[h]=c,I[h]=m}),{valueWindow:f(C),percentWindow:f(I)}},reset:function(v){if(v===this._dataZoomModel){var b,s,l,w,I,C,h,c,m,T,D,O,N,z=this.getTargetSeriesModels();this._dataExtent=(b=this,s=this._dimName,l=[1/0,-1/0],p(z,function($){var V=$.getData();V&&p(V.mapDimension(s,!0),function(P){var U=V.getApproximateExtent(P);U[0]<l[0]&&(l[0]=U[0]),U[1]>l[1]&&(l[1]=U[1])})}),l[1]<l[0]&&(l=[NaN,NaN]),w=b,I=l,h=(C=w.getAxisModel()).getMin(!0),m=(c=C.get("type")==="category")&&C.getCategories().length,h!=null&&h!=="dataMin"&&typeof h!="function"?I[0]=h:c&&(I[0]=m>0?0:NaN),(T=C.getMax(!0))!=null&&T!=="dataMax"&&typeof T!="function"?I[1]=T:c&&(I[1]=m>0?m-1:NaN),!C.get("scale",!0)&&(I[0]>0&&(I[0]=0),I[1]<0&&(I[1]=0)),l);var H=this.calculateDataWindow(v.option);this._valueWindow=H.valueWindow,this._percentWindow=H.percentWindow,D=this,O=D._minMaxSpan={},N=D._dataZoomModel,p(["min","max"],function($){O[$+"Span"]=N.get($+"Span");var V=N.get($+"ValueSpan");if(V!=null&&(O[$+"ValueSpan"]=V,(V=D.getAxisModel().axis.scale.parse(V))!=null)){var P=D._dataExtent;O[$+"Span"]=S.linearMap(P[0]+V,P,[0,100],!0)}}),d(this)}},restore:function(v){v===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,d(this,!0))},filterData:function(v,b){if(v===this._dataZoomModel){var s=this._dimName,l=this.getTargetSeriesModels(),w=v.get("filterMode"),I=this._valueWindow;w!=="none"&&p(l,function(C){var h=C.getData(),c=h.mapDimension(s,!0);c.length&&(w==="weakFilter"?h.filterSelf(function(m){for(var T,D,O,N=0;N<c.length;N++){var z=h.get(c[N],m),H=!isNaN(z),$=z<I[0],V=z>I[1];if(H&&!$&&!V)return!0;H&&(O=!0),$&&(T=!0),V&&(D=!0)}return O&&T&&D}):p(c,function(m){if(w==="empty")C.setData(h.map(m,function(D){var O;return(O=D)>=I[0]&&O<=I[1]?D:NaN}));else{var T={};T[m]=I,h.selectRange(T)}}),p(c,function(m){h.setApproximateExtent(I,m)}))})}}},E.exports=y},19173:function(E,A,u){u(9129).__DEV__;var o=u(87930),S=u(23405),_=u(23584),p=u(51064),f=u(22255),y=u(84392),d=S.each,v=f.eachAxisDim;function b(l){var w={};return d(["start","end","startValue","endValue","throttle"],function(I){l.hasOwnProperty(I)&&(w[I]=l[I])}),w}function s(l,w){var I=l._rangePropMode,C=l.get("rangeMode");d([["start","startValue"],["end","endValue"]],function(h,c){var m=w[h[0]]!=null,T=w[h[1]]!=null;m&&!T?I[c]="percent":!m&&T?I[c]="value":C?I[c]=C[c]:m&&(I[c]="percent")})}E.exports=o.extendComponentModel({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","singleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null,minSpan:null,maxSpan:null,minValueSpan:null,maxValueSpan:null,rangeMode:null},init:function(l,w,I){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var C=b(l);this.mergeDefaultAndTheme(l,I),this.doInit(C)},mergeOption:function(l){var w=b(l);S.merge(this.option,l,!0),this.doInit(w)},doInit:function(l){var w=this.option;_.canvasSupported||(w.realtime=!1),this._setDefaultThrottle(l),s(this,l),d([["start","startValue"],["end","endValue"]],function(I,C){this._rangePropMode[C]==="value"&&(w[I[0]]=null)},this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var l=this._axisProxies;this.eachTargetAxis(function(w,I,C,h){var c=this.dependentModels[w.axis][I],m=c.__dzAxisProxy||(c.__dzAxisProxy=new y(w.name,I,this,h));l[w.name+"_"+I]=m},this)},_resetTarget:function(){var l=this.option,w=this._judgeAutoMode();v(function(I){var C=I.axisIndex;l[C]=p.normalizeToArray(l[C])},this),w==="axisIndex"?this._autoSetAxisIndex():w==="orient"&&this._autoSetOrient()},_judgeAutoMode:function(){var l=this.option,w=!1;v(function(C){l[C.axisIndex]!=null&&(w=!0)},this);var I=l.orient;return I==null&&w?"orient":w?void 0:(I==null&&(l.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var l=!0,w=this.get("orient",!0),I=this.option,C=this.dependentModels;if(l){var h=w==="vertical"?"y":"x";C[h+"Axis"].length?(I[h+"AxisIndex"]=[0],l=!1):d(C.singleAxis,function(c){l&&c.get("orient",!0)===w&&(I.singleAxisIndex=[c.componentIndex],l=!1)})}l&&v(function(c){if(l){var m=[],T=this.dependentModels[c.axis];if(T.length&&!m.length)for(var D=0,O=T.length;D<O;D++)T[D].get("type")==="category"&&m.push(D);I[c.axisIndex]=m,m.length&&(l=!1)}},this),l&&this.ecModel.eachSeries(function(c){this._isSeriesHasAllAxesTypeOf(c,"value")&&v(function(m){var T=I[m.axisIndex],D=c.get(m.axisIndex),O=c.get(m.axisId);D=c.ecModel.queryComponents({mainType:m.axis,index:D,id:O})[0].componentIndex,0>S.indexOf(T,D)&&T.push(D)})},this)},_autoSetOrient:function(){var l;this.eachTargetAxis(function(w){l||(l=w.name)},this),this.option.orient=l==="y"?"vertical":"horizontal"},_isSeriesHasAllAxesTypeOf:function(l,w){var I=!0;return v(function(C){var h=l.get(C.axisIndex),c=this.dependentModels[C.axis][h];c&&c.get("type")===w||(I=!1)},this),I},_setDefaultThrottle:function(l){if(l.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var w=this.ecModel.option;this.option.throttle=w.animation&&w.animationDurationUpdate>0?100:20}},getFirstTargetAxisModel:function(){var l;return v(function(w){if(l==null){var I=this.get(w.axisIndex);I.length&&(l=this.dependentModels[w.axis][I[0]])}},this),l},eachTargetAxis:function(l,w){var I=this.ecModel;v(function(C){d(this.get(C.axisIndex),function(h){l.call(w,C,h,this,I)},this)},this)},getAxisProxy:function(l,w){return this._axisProxies[l+"_"+w]},getAxisModel:function(l,w){var I=this.getAxisProxy(l,w);return I&&I.getAxisModel()},setRawRange:function(l,w){var I=this.option;d([["start","startValue"],["end","endValue"]],function(C){(l[C[0]]!=null||l[C[1]]!=null)&&(I[C[0]]=l[C[0]],I[C[1]]=l[C[1]])},this),w||s(this,l)},getPercentRange:function(){var l=this.findRepresentativeAxisProxy();if(l)return l.getDataPercentWindow()},getValueRange:function(l,w){if(l!=null||w!=null)return this.getAxisProxy(l,w).getDataValueWindow();var I=this.findRepresentativeAxisProxy();if(I)return I.getDataValueWindow()},findRepresentativeAxisProxy:function(l){if(l)return l.__dzAxisProxy;var w=this._axisProxies;for(var I in w)if(w.hasOwnProperty(I)&&w[I].hostedBy(this))return w[I];for(var I in w)if(w.hasOwnProperty(I)&&!w[I].hostedBy(this))return w[I]},getRangePropMode:function(){return this._rangePropMode.slice()}})},6418:function(E,A,u){E.exports=u(44152).extend({type:"dataZoom",render:function(o,S,_,p){this.dataZoomModel=o,this.ecModel=S,this.api=_},getTargetCoordInfo:function(){var o=this.dataZoomModel,S=this.ecModel,_={};return o.eachTargetAxis(function(p,f){var y=S.getComponent(p.axis,f);if(y){var d=y.getCoordSysModel();d&&function(v,b,s,l){for(var w,I=0;I<s.length;I++)if(s[I].model===v){w=s[I];break}w||s.push(w={model:v,axisModels:[],coordIndex:l}),w.axisModels.push(b)}(d,y,_[d.mainType]||(_[d.mainType]=[]),d.componentIndex)}},this),_}})},63574:function(E,A,u){E.exports=u(19173).extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}})},49676:function(E,A,u){var o=u(23405),S=u(6418),_=u(2488),p=u(63798),f=o.bind,y=S.extend({type:"dataZoom.inside",init:function(s,l){this._range},render:function(s,l,w,I){y.superApply(this,"render",arguments),this._range=s.getPercentRange(),o.each(this.getTargetCoordInfo(),function(C,h){var c=o.map(C,function(m){return p.generateCoordId(m.model)});o.each(C,function(m){var T=m.model,D={};o.each(["pan","zoom","scrollMove"],function(O){D[O]=f(d[O],this,m,h)},this),p.register(w,{coordId:p.generateCoordId(T),allCoordIds:c,containsPoint:function(O,N,z){return T.coordinateSystem.containPoint([N,z])},dataZoomId:s.id,dataZoomModel:s,getRange:D})},this)},this)},dispose:function(){p.unregister(this.api,this.dataZoomModel.id),y.superApply(this,"dispose",arguments),this._range=null}}),d={zoom:function(s,l,w,I){var C=this._range,h=C.slice(),c=s.axisModels[0];if(c){var m=b[l](null,[I.originX,I.originY],c,w,s),T=(m.signal>0?m.pixelStart+m.pixelLength-m.pixel:m.pixel-m.pixelStart)/m.pixelLength*(h[1]-h[0])+h[0],D=Math.max(1/I.scale,0);h[0]=(h[0]-T)*D+T,h[1]=(h[1]-T)*D+T;var O=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(_(0,h,[0,100],0,O.minSpan,O.maxSpan),this._range=h,C[0]!==h[0]||C[1]!==h[1])return h}},pan:v(function(s,l,w,I,C,h){var c=b[I]([h.oldX,h.oldY],[h.newX,h.newY],l,C,w);return c.signal*(s[1]-s[0])*c.pixel/c.pixelLength}),scrollMove:v(function(s,l,w,I,C,h){return b[I]([0,0],[h.scrollDelta,h.scrollDelta],l,C,w).signal*(s[1]-s[0])*h.scrollDelta})};function v(s){return function(l,w,I,C){var h=this._range,c=h.slice(),m=l.axisModels[0];if(m&&(_(s(c,m,l,w,I,C),c,[0,100],"all"),this._range=c,h[0]!==c[0]||h[1]!==c[1]))return c}}var b={grid:function(s,l,w,I,C){var h=w.axis,c={},m=C.model.coordinateSystem.getRect();return s=s||[0,0],h.dim==="x"?(c.pixel=l[0]-s[0],c.pixelLength=m.width,c.pixelStart=m.x,c.signal=h.inverse?1:-1):(c.pixel=l[1]-s[1],c.pixelLength=m.height,c.pixelStart=m.y,c.signal=h.inverse?-1:1),c},polar:function(s,l,w,I,C){var h=w.axis,c={},m=C.model.coordinateSystem,T=m.getRadiusAxis().getExtent(),D=m.getAngleAxis().getExtent();return s=s?m.pointToCoord(s):[0,0],l=m.pointToCoord(l),w.mainType==="radiusAxis"?(c.pixel=l[0]-s[0],c.pixelLength=T[1]-T[0],c.pixelStart=T[0],c.signal=h.inverse?1:-1):(c.pixel=l[1]-s[1],c.pixelLength=D[1]-D[0],c.pixelStart=D[0],c.signal=h.inverse?-1:1),c},singleAxis:function(s,l,w,I,C){var h=w.axis,c=C.model.coordinateSystem.getRect(),m={};return s=s||[0,0],h.orient==="horizontal"?(m.pixel=l[0]-s[0],m.pixelLength=c.width,m.pixelStart=c.x,m.signal=h.inverse?1:-1):(m.pixel=l[1]-s[1],m.pixelLength=c.height,m.pixelStart=c.y,m.signal=h.inverse?-1:1),m}};E.exports=y},64858:function(E,A,u){E.exports=u(19173).extend({type:"dataZoom.select"})},8669:function(E,A,u){E.exports=u(6418).extend({type:"dataZoom.select"})},90536:function(E,A,u){E.exports=u(19173).extend({type:"dataZoom.slider",layoutMode:"box",defaultOption:{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#2f4554",width:.5,opacity:.3},areaStyle:{color:"rgba(47,69,84,0.3)",opacity:.3}},borderColor:"#ddd",fillerColor:"rgba(167,183,204,0.4)",handleIcon:"M8.2,13.6V3.9H6.3v9.7H3.1v14.9h3.3v9.7h1.8v-9.7h3.3V13.6H8.2z M9.7,24.4H4.8v-1.4h4.9V24.4z M9.7,19.1H4.8v-1.4h4.9V19.1z",handleSize:"100%",handleStyle:{color:"#a7b7cc"},labelPrecision:null,labelFormatter:null,showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#333"}}})},32429:function(E,A,u){var o=u(23405),S=u(46427),_=u(51747),p=u(94127),f=u(6418),y=u(54684),d=u(62751),v=u(2488),b=_.Rect,s=y.linearMap,l=y.asc,w=o.bind,I=o.each,C="horizontal",h="vertical",c=["line","bar","candlestick","scatter"],m=f.extend({type:"dataZoom.slider",init:function(D,O){this._displayables={},this._orient,this._range,this._handleEnds,this._size,this._handleWidth,this._handleHeight,this._location,this._dragging,this._dataShadowInfo,this.api=O},render:function(D,O,N,z){if(m.superApply(this,"render",arguments),p.createOrUpdate(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=D.get("orient"),this.dataZoomModel.get("show")===!1)return void this.group.removeAll();z&&z.type==="dataZoom"&&z.from===this.uid||this._buildView(),this._updateView()},remove:function(){m.superApply(this,"remove",arguments),p.clear(this,"_dispatchZoomAction")},dispose:function(){m.superApply(this,"dispose",arguments),p.clear(this,"_dispatchZoomAction")},_buildView:function(){var D=this.group;D.removeAll(),this._resetLocation(),this._resetInterval();var O=this._displayables.barGroup=new _.Group;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),D.add(O),this._positionGroup()},_resetLocation:function(){var D=this.dataZoomModel,O=this.api,N=this._findCoordRect(),z={width:O.getWidth(),height:O.getHeight()},H=this._orient===C?{right:z.width-N.x-N.width,top:z.height-30-7,width:N.width,height:30}:{right:7,top:N.y,width:30,height:N.height},$=d.getLayoutParams(D.option);o.each(["right","top","width","height"],function(P){$[P]==="ph"&&($[P]=H[P])});var V=d.getLayoutRect($,z,D.padding);this._location={x:V.x,y:V.y},this._size=[V.width,V.height],this._orient===h&&this._size.reverse()},_positionGroup:function(){var D=this.group,O=this._location,N=this._orient,z=this.dataZoomModel.getFirstTargetAxisModel(),H=z&&z.get("inverse"),$=this._displayables.barGroup,V=(this._dataShadowInfo||{}).otherAxisInverse;$.attr(N!==C||H?N===C&&H?{scale:V?[-1,1]:[-1,-1]}:N!==h||H?{scale:V?[-1,-1]:[-1,1],rotation:Math.PI/2}:{scale:V?[1,-1]:[1,1],rotation:Math.PI/2}:{scale:V?[1,1]:[1,-1]});var P=D.getBoundingRect([$]);D.attr("position",[O.x-P.x,O.y-P.y])},_getViewExtent:function(){return[0,this._size[0]]},_renderBackground:function(){var D=this.dataZoomModel,O=this._size,N=this._displayables.barGroup;N.add(new b({silent:!0,shape:{x:0,y:0,width:O[0],height:O[1]},style:{fill:D.get("backgroundColor")},z2:-40})),N.add(new b({shape:{x:0,y:0,width:O[0],height:O[1]},style:{fill:"transparent"},z2:0,onclick:o.bind(this._onClickPanelClick,this)}))},_renderDataShadow:function(){var D,O=this._dataShadowInfo=this._prepareDataShadowInfo();if(O){var N=this._size,z=O.series,H=z.getRawData(),$=z.getShadowDim?z.getShadowDim():O.otherDim;if($!=null){var V=H.getDataExtent($),P=(V[1]-V[0])*.3;V=[V[0]-P,V[1]+P];var U=[0,N[1]],Y=[0,N[0]],Z=[[N[0],0],[0,0]],X=[],J=Y[1]/(H.count()-1),q=0,te=Math.round(H.count()/N[0]);H.each([$],function(ie,ne){if(te>0&&ne%te){q+=J;return}var le=ie==null||isNaN(ie)||ie==="",fe=le?0:s(ie,V,U,!0);le&&!D&&ne?(Z.push([Z[Z.length-1][0],0]),X.push([X[X.length-1][0],0])):!le&&D&&(Z.push([q,0]),X.push([q,0])),Z.push([q,fe]),X.push([q,fe]),q+=J,D=le});var re=this.dataZoomModel;this._displayables.barGroup.add(new _.Polygon({shape:{points:Z},style:o.defaults({fill:re.get("dataBackgroundColor")},re.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new _.Polyline({shape:{points:X},style:re.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}}},_prepareDataShadowInfo:function(){var D,O=this.dataZoomModel,N=O.get("showDataShadow");if(N!==!1){var z=this.ecModel;return O.eachTargetAxis(function(H,$){var V=O.getAxisProxy(H.name,$).getTargetSeriesModels();o.each(V,function(P){if(!D&&!(N!==!0&&0>o.indexOf(c,P.get("type")))){var U,Y=z.getComponent(H.axis,$).axis,Z={x:"y",y:"x",radius:"angle",angle:"radius"}[H.name],X=P.coordinateSystem;Z!=null&&X.getOtherAxis&&(U=X.getOtherAxis(Y).inverse),Z=P.getData().mapDimension(Z),D={thisAxis:Y,series:P,thisDim:H.name,otherDim:Z,otherAxisInverse:U}}},this)},this),D}},_renderHandle:function(){var D=this._displayables,O=D.handles=[],N=D.handleLabels=[],z=this._displayables.barGroup,H=this._size,$=this.dataZoomModel;z.add(D.filler=new b({draggable:!0,cursor:T(this._orient),drift:w(this._onDragMove,this,"all"),onmousemove:function(V){S.stop(V.event)},ondragstart:w(this._showDataInfo,this,!0),ondragend:w(this._onDragEnd,this),onmouseover:w(this._showDataInfo,this,!0),onmouseout:w(this._showDataInfo,this,!1),style:{fill:$.get("fillerColor"),textPosition:"inside"}})),z.add(new b(_.subPixelOptimizeRect({silent:!0,shape:{x:0,y:0,width:H[0],height:H[1]},style:{stroke:$.get("dataBackgroundColor")||$.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}}))),I([0,1],function(V){var P=_.createIcon($.get("handleIcon"),{cursor:T(this._orient),draggable:!0,drift:w(this._onDragMove,this,V),onmousemove:function(X){S.stop(X.event)},ondragend:w(this._onDragEnd,this),onmouseover:w(this._showDataInfo,this,!0),onmouseout:w(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),U=P.getBoundingRect();this._handleHeight=y.parsePercent($.get("handleSize"),this._size[1]),this._handleWidth=U.width/U.height*this._handleHeight,P.setStyle($.getModel("handleStyle").getItemStyle());var Y=$.get("handleColor");Y!=null&&(P.style.fill=Y),z.add(O[V]=P);var Z=$.textStyleModel;this.group.add(N[V]=new _.Text({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",textFill:Z.getTextColor(),textFont:Z.getFont()},z2:10}))},this)},_resetInterval:function(){var D=this._range=this.dataZoomModel.getPercentRange(),O=this._getViewExtent();this._handleEnds=[s(D[0],[0,100],O,!0),s(D[1],[0,100],O,!0)]},_updateInterval:function(D,O){var N=this.dataZoomModel,z=this._handleEnds,H=this._getViewExtent(),$=N.findRepresentativeAxisProxy().getMinMaxSpan(),V=[0,100];v(O,z,H,N.get("zoomLock")?"all":D,$.minSpan!=null?s($.minSpan,V,H,!0):null,$.maxSpan!=null?s($.maxSpan,V,H,!0):null);var P=this._range,U=this._range=l([s(z[0],H,V,!0),s(z[1],H,V,!0)]);return!P||P[0]!==U[0]||P[1]!==U[1]},_updateView:function(D){var O=this._displayables,N=this._handleEnds,z=l(N.slice()),H=this._size;I([0,1],function($){var V=O.handles[$],P=this._handleHeight;V.attr({scale:[P/2,P/2],position:[N[$],H[1]/2-P/2]})},this),O.filler.setShape({x:z[0],y:0,width:z[1]-z[0],height:H[1]}),this._updateDataInfo(D)},_updateDataInfo:function(D){var O=this.dataZoomModel,N=this._displayables,z=N.handleLabels,H=this._orient,$=["",""];if(O.get("showDetail")){var V=O.findRepresentativeAxisProxy();if(V){var P=V.getAxisModel().axis,U=this._range,Y=D?V.calculateDataWindow({start:U[0],end:U[1]}).valueWindow:V.getDataValueWindow();$=[this._formatLabel(Y[0],P),this._formatLabel(Y[1],P)]}}var Z=l(this._handleEnds.slice());function X(J){var q=_.getTransform(N.handles[J].parent,this.group),te=_.transformDirection(J===0?"right":"left",q),re=this._handleWidth/2+5,ie=_.applyTransform([Z[J]+(J===0?-re:re),this._size[1]/2],q);z[J].setStyle({x:ie[0],y:ie[1],textVerticalAlign:H===C?"middle":te,textAlign:H===C?te:"center",text:$[J]})}X.call(this,0),X.call(this,1)},_formatLabel:function(D,O){var N=this.dataZoomModel,z=N.get("labelFormatter"),H=N.get("labelPrecision");(H==null||H==="auto")&&(H=O.getPixelPrecision());var $=D==null||isNaN(D)?"":O.type==="category"||O.type==="time"?O.scale.getLabel(Math.round(D)):D.toFixed(Math.min(H,20));return o.isFunction(z)?z(D,$):o.isString(z)?z.replace("{value}",$):$},_showDataInfo:function(D){D=this._dragging||D;var O=this._displayables.handleLabels;O[0].attr("invisible",!D),O[1].attr("invisible",!D)},_onDragMove:function(D,O,N){this._dragging=!0;var z=this._displayables.barGroup.getLocalTransform(),H=_.applyTransform([O,N],z,!0),$=this._updateInterval(D,H[0]),V=this.dataZoomModel.get("realtime");this._updateView(!V),$&&V&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1),this.dataZoomModel.get("realtime")||this._dispatchZoomAction()},_onClickPanelClick:function(D){var O=this._size,N=this._displayables.barGroup.transformCoordToLocal(D.offsetX,D.offsetY);if(!(N[0]<0)&&!(N[0]>O[0])&&!(N[1]<0)&&!(N[1]>O[1])){var z=this._handleEnds,H=(z[0]+z[1])/2,$=this._updateInterval("all",N[0]-H);this._updateView(),$&&this._dispatchZoomAction()}},_dispatchZoomAction:function(){var D=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:D[0],end:D[1]})},_findCoordRect:function(){var D;if(I(this.getTargetCoordInfo(),function(z){if(!D&&z.length){var H=z[0].model.coordinateSystem;D=H.getRect&&H.getRect()}}),!D){var O=this.api.getWidth(),N=this.api.getHeight();D={x:.2*O,y:.2*N,width:.6*O,height:.6*N}}return D}});function T(D){return D==="vertical"?"ns-resize":"ew-resize"}E.exports=m},79398:function(E,A,u){var o=u(87930),S=u(23405),_=u(22255);o.registerAction("dataZoom",function(p,f){var y=_.createLinkedNodesFinder(S.bind(f.eachComponent,f,"dataZoom"),_.eachAxisDim,function(v,b){return v.get(b.axisIndex)}),d=[];f.eachComponent({mainType:"dataZoom",query:p},function(v,b){d.push.apply(d,y(v).nodes)}),S.each(d,function(v,b){v.setRawRange({start:p.start,end:p.end,startValue:p.startValue,endValue:p.endValue})})})},36771:function(E,A,u){var o=u(87930),S=u(23405),_=S.createHashMap,p=S.each;o.registerProcessor({getTargetSeries:function(f){var y=_();return f.eachComponent("dataZoom",function(d){d.eachTargetAxis(function(v,b,s){p(s.getAxisProxy(v.name,b).getTargetSeriesModels(),function(l){y.set(l.uid,l)})})}),y},modifyOutputEnd:!0,overallReset:function(f,y){f.eachComponent("dataZoom",function(d){d.eachTargetAxis(function(v,b,s){s.getAxisProxy(v.name,b).reset(s,y)}),d.eachTargetAxis(function(v,b,s){s.getAxisProxy(v.name,b).filterData(s,y)})}),f.eachComponent("dataZoom",function(d){var v=d.findRepresentativeAxisProxy(),b=v.getDataPercentWindow(),s=v.getDataValueWindow();d.setRawRange({start:b[0],end:b[1],startValue:s[0],endValue:s[1]},!0)})}})},22255:function(E,A,u){var o=u(23405),S=u(60653),_=["cartesian2d","polar","singleAxis"];function p(y,d){y=y.slice();var v=o.map(y,S.capitalFirst);d=(d||[]).slice();var b=o.map(d,S.capitalFirst);return function(s,l){o.each(y,function(w,I){for(var C={name:w,capital:v[I]},h=0;h<d.length;h++)C[d[h]]=w+b[h];s.call(l,C)})}}var f=p(["x","y","z","radius","angle","single"],["axisIndex","axis","index","id"]);A.isCoordSupported=function(y){return o.indexOf(_,y)>=0},A.createNameEach=p,A.eachAxisDim=f,A.createLinkedNodesFinder=function(y,d,v){return function(s){var l,w={nodes:[],records:{}};if(d(function(C){w.records[C.name]={}}),!s)return w;b(s,w);do l=!1,y(I);while(l);function I(C){var h,c,m,T,D;h=C,c=w,!(o.indexOf(c.nodes,h)>=0)&&(m=C,T=w,D=!1,d(function(O){o.each(v(m,O)||[],function(N){T.records[O.name][N]&&(D=!0)})}),D)&&(b(C,w),l=!0)}return w};function b(s,l){l.nodes.push(s),d(function(w){o.each(v(s,w)||[],function(I){l.records[w.name][I]=!0})})}}},41153:function(E,A,u){var o=u(23405).each,S="\0_ec_hist_store";function _(p){var f=p[S];return f||(f=p[S]=[{}]),f}A.push=function(p,f){var y=_(p);o(f,function(d,v){for(var b=y.length-1;b>=0&&!y[b][v];b--);if(b<0){var s=p.queryComponents({mainType:"dataZoom",subType:"select",id:v})[0];if(s){var l=s.getPercentRange();y[0][v]={dataZoomId:v,start:l[0],end:l[1]}}}}),y.push(f)},A.pop=function(p){var f=_(p),y=f[f.length-1];f.length>1&&f.pop();var d={};return o(y,function(v,b){for(var s=f.length-1;s>=0;s--){var v=f[s][b];if(v){d[b]=v;break}}}),d},A.clear=function(p){p[S]=null},A.count=function(p){return _(p).length}},63798:function(E,A,u){var o=u(23405),S=u(55104),_=u(94127),p="\0_ec_dataZoom_roams";function f(v){var b=v.getZr();return b[p]||(b[p]={})}function y(v){o.each(v,function(b,s){b.count||(b.controller.dispose(),delete v[s])})}function d(v,b){v.dispatchAction({type:"dataZoom",batch:b})}A.register=function(v,b){var s,l,w,I,C,h,c,m,T=f(v),D=b.dataZoomId,O=b.coordId;o.each(T,function(H,$){var V=H.dataZoomInfos;V[D]&&0>o.indexOf(b.allCoordIds,O)&&(delete V[D],H.count--)}),y(T);var N=T[O];N||((N=T[O]={coordId:O,dataZoomInfos:{},count:0}).controller=(s=v,l=N,w=new S(s.getZr()),o.each(["pan","zoom","scrollMove"],function(H){w.on(H,function($){var V=[];o.each(l.dataZoomInfos,function(P){if($.isAvailableBehavior(P.dataZoomModel.option)){var U=(P.getRange||{})[H],Y=U&&U(l.controller,$);!P.dataZoomModel.get("disabled",!0)&&Y&&V.push({dataZoomId:P.dataZoomId,start:Y[0],end:Y[1]})}}),V.length&&l.dispatchAction(V)})}),w),N.dispatchAction=o.curry(d,v)),!N.dataZoomInfos[D]&&N.count++,N.dataZoomInfos[D]=b;var z=(I=N.dataZoomInfos,h="type_",c={type_true:2,type_move:1,type_false:0,type_undefined:-1},m=!0,o.each(I,function(H){var $=H.dataZoomModel,V=!$.get("disabled",!0)&&(!$.get("zoomLock",!0)||"move");c[h+V]>c[h+C]&&(C=V),m&=$.get("preventDefaultMouseMove",!0)}),{controlType:C,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!m}});N.controller.enable(z.controlType,z.opt),N.controller.setPointerChecker(b.containsPoint),_.createOrUpdate(N,"dispatchAction",b.dataZoomModel.get("throttle",!0),"fixRate")},A.unregister=function(v,b){var s=f(v);o.each(s,function(l){l.controller.dispose();var w=l.dataZoomInfos;w[b]&&(delete w[b],l.count--)}),y(s)},A.generateCoordId=function(v){return v.type+"\0_"+v.id}},61977:function(E,A,u){u(28628).registerSubTypeDefaulter("dataZoom",function(){return"slider"})},71101:function(E,A,u){u(61977),u(19173),u(6418),u(64858),u(8669),u(36771),u(79398)},22253:function(E,A,u){var o=u(28628),S=u(44152),_=u(52009).detectSourceFormat,p=u(24659).SERIES_LAYOUT_BY_COLUMN;o.extend({type:"dataset",defaultOption:{seriesLayoutBy:p,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){_(this)}}),S.extend({type:"dataset"})},50682:function(E,A,u){var o=u(87930),S=u(23405);function _(p,f){f.update="updateView",o.registerAction(f,function(y,d){var v={};return d.eachComponent({mainType:"geo",query:y},function(b){b[p](y.name);var s=b.coordinateSystem;S.each(s.regions,function(l){v[l.name]=b.isSelected(l.name)||!1})}),{selected:v,name:y.name}})}u(25684),u(87673),u(2524),u(65981),_("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),_("select",{type:"geoSelect",event:"geoselected"}),_("unSelect",{type:"geoUnSelect",event:"geounselected"})},2524:function(E,A,u){var o=u(90229);E.exports=u(87930).extendComponentView({type:"geo",init:function(S,_){var p=new o(_,!0);this._mapDraw=p,this.group.add(p.group)},render:function(S,_,p,f){if(!f||f.type!=="geoToggleSelect"||f.from!==this.uid){var y=this._mapDraw;S.get("show")?y.draw(S,_,p,this,f):this._mapDraw.group.removeAll(),this.group.silent=S.get("silent")}},dispose:function(){this._mapDraw&&this._mapDraw.remove()}})},92576:function(E,A,u){u(9129).__DEV__;var o=u(87930),S=u(23405),_=u(51064),p=u(51747),f=u(62751);o.registerPreprocessor(function(s){var l=s.graphic;S.isArray(l)?l[0]&&l[0].elements?s.graphic=[s.graphic[0]]:s.graphic=[{elements:l}]:l&&!l.elements&&(s.graphic=[{elements:[l]}])});var y=o.extendComponentModel({type:"graphic",defaultOption:{elements:[],parentId:null},_elOptionsToUpdate:null,mergeOption:function(s){var l=this.option.elements;this.option.elements=null,y.superApply(this,"mergeOption",arguments),this.option.elements=l},optionUpdated:function(s,l){var w=this.option,I=(l?w:s).elements,C=w.elements=l?[]:w.elements,h=[];this._flatten(I,h);var c=_.mappingToExists(C,h);_.makeIdAndName(c);var m=this._elOptionsToUpdate=[];S.each(c,function(D,O){var N,z,H,$,V,P,U,Y,Z=D.option;Z&&(m.push(Z),function(X,J){var q=X.exist;if(J.id=X.keyInfo.id,!J.type&&q&&(J.type=q.type),J.parentId==null){var te=J.parentOption;te?J.parentId=te.id:q&&(J.parentId=q.parentId)}J.parentOption=null}(D,Z),N=C,z=O,H=Z,$=S.extend({},H),V=N[z],(P=H.$action||"merge")==="merge"?V?(S.merge(V,$,!0),f.mergeLayoutParam(V,$,{ignoreSize:!0}),f.copyLayoutParams(H,V)):N[z]=$:P==="replace"?N[z]=$:P==="remove"&&V&&(N[z]=null),U=C[O],Y=Z,U&&(U.hv=Y.hv=[b(Y,["left","right"]),b(Y,["top","bottom"])],U.type==="group"&&(U.width==null&&(U.width=Y.width=0),U.height==null&&(U.height=Y.height=0))))},this);for(var T=C.length-1;T>=0;T--)C[T]==null?C.splice(T,1):delete C[T].$action},_flatten:function(s,l,w){S.each(s,function(I){if(I){w&&(I.parentOption=w),l.push(I);var C=I.children;I.type==="group"&&C&&this._flatten(C,l,I),delete I.children}},this)},useElOptionsToUpdate:function(){var s=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,s}});function d(s,l,w,I){var C=w.type,h=new p[C.charAt(0).toUpperCase()+C.slice(1)](w);l.add(h),I.set(s,h),h.__ecGraphicId=s}function v(s,l){var w=s&&s.parent;w&&(s.type==="group"&&s.traverse(function(I){v(I,l)}),l.removeKey(s.__ecGraphicId),w.remove(s))}function b(s,l){var w;return S.each(l,function(I){s[I]!=null&&s[I]!=="auto"&&(w=!0)}),w}o.extendComponentView({type:"graphic",init:function(s,l){this._elMap=S.createHashMap(),this._lastGraphicModel},render:function(s,l,w){s!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=s,this._updateElements(s),this._relocate(s,w)},_updateElements:function(s){var l=s.useElOptionsToUpdate();if(l){var w=this._elMap,I=this.group;S.each(l,function(C){var h,c,m,T,D=C.$action,O=C.id,N=w.get(O),z=C.parentId,H=z!=null?w.get(z):I,$=C.style;C.type==="text"&&$&&(C.hv&&C.hv[1]&&($.textVerticalAlign=$.textBaseline=null),!$.hasOwnProperty("textFill")&&$.fill&&($.textFill=$.fill),!$.hasOwnProperty("textStroke")&&$.stroke&&($.textStroke=$.stroke));var V=(h=C,h=S.extend({},h),S.each(["id","parentId","$action","hv","bounding"].concat(f.LOCATION_PARAMS),function(U){delete h[U]}),h);D&&D!=="merge"?D==="replace"?(v(N,w),d(O,H,V,w)):D==="remove"&&v(N,w):N?N.attr(V):d(O,H,V,w);var P=w.get(O);P&&(P.__ecGraphicWidth=C.width,P.__ecGraphicHeight=C.height,c=P,m=s,T=c.eventData,c.silent||c.ignore||T||(T=c.eventData={componentType:"graphic",componentIndex:m.componentIndex,name:c.name}),T&&(T.info=c.info))})}},_relocate:function(s,l){for(var w=s.option.elements,I=this.group,C=this._elMap,h=w.length-1;h>=0;h--){var c=w[h],m=C.get(c.id);if(m){var T=m.parent,D=T===I?{width:l.getWidth(),height:l.getHeight()}:{width:T.__ecGraphicWidth||0,height:T.__ecGraphicHeight||0};f.positionElement(m,c,D,null,{hv:c.hv,boundingMode:c.bounding})}}},_clear:function(){var s=this._elMap;s.each(function(l){v(l,s)}),this._elMap=S.createHashMap()},dispose:function(){this._clear()}})},93754:function(E,A,u){u(97035),u(55695),u(81819)},97035:function(E,A,u){var o=u(87930),S=u(23405),_=u(51747);u(72768),u(46637),o.extendComponentView({type:"grid",render:function(p,f){this.group.removeAll(),p.get("show")&&this.group.add(new _.Rect({shape:p.coordinateSystem.getRect(),style:S.defaults({fill:p.get("backgroundColor")},p.getItemStyle()),silent:!0,z2:-1}))}}),o.registerPreprocessor(function(p){p.xAxis&&p.yAxis&&!p.grid&&(p.grid={})})},29006:function(E,A,u){u(9129).__DEV__;var o=u(23405),S=u(62271),_=u(51747),p=u(5091),f=u(99018),y=o.curry,d=o.each,v=o.map,b=Math.min,s=Math.max,l=Math.pow,w="globalPan",I={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},C={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},h={brushStyle:{lineWidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.1)"},transformable:!0,brushMode:"single",removeOnClick:!1},c=0;function m(Se){S.call(this),this._zr=Se,this.group=new _.Group,this._brushType,this._brushOption,this._panels,this._track=[],this._dragging,this._covers=[],this._creatingCover,this._creatingPanel,this._enableGlobalPan,this._uid="brushController_"+c++,this._handlers={},d(Ee,function(Ie,_e){this._handlers[_e]=o.bind(Ie,this)},this)}function T(Se,Ie){var _e=Ne[Ie.brushType].createCover(Se,Ie);return _e.__brushOption=Ie,N(_e,Ie),Se.group.add(_e),_e}function D(Se,Ie){var _e=H(Ie);return _e.endCreating&&(_e.endCreating(Se,Ie),N(Ie,Ie.__brushOption)),Ie}function O(Se,Ie){var _e=Ie.__brushOption;H(Ie).updateCoverShape(Se,Ie,_e.range,_e)}function N(Se,Ie){var _e=Ie.z;_e==null&&(_e=1e4),Se.traverse(function(Ae){Ae.z=_e,Ae.z2=_e})}function z(Se,Ie){H(Ie).updateCommon(Se,Ie),O(Se,Ie)}function H(Se){return Ne[Se.__brushOption.brushType]}function $(Se,Ie,_e){var Ae,ue=Se._panels;if(!ue)return!0;var ke=Se._transform;return d(ue,function(Pe){Pe.isTargetByCursor(Ie,_e,ke)&&(Ae=Pe)}),Ae}function V(Se,Ie){var _e=Se._panels;if(!_e)return!0;var Ae=Ie.__brushOption.panelId;return Ae==null||_e[Ae]}function P(Se){var Ie=Se._covers,_e=Ie.length;return d(Ie,function(Ae){Se.group.remove(Ae)},Se),Ie.length=0,!!_e}function U(Se,Ie){var _e=v(Se._covers,function(Ae){var ue=Ae.__brushOption,ke=o.clone(ue.range);return{brushType:ue.brushType,panelId:ue.panelId,range:ke}});Se.trigger("brush",_e,{isEnd:!!Ie.isEnd,removeOnClick:!!Ie.removeOnClick})}function Y(Se){var Ie=Se.length-1;return Ie<0&&(Ie=0),[Se[0],Se[Ie]]}function Z(Se,Ie,_e,Ae){var ue=new _.Group;return ue.add(new _.Rect({name:"main",style:te(_e),silent:!0,draggable:!0,cursor:"move",drift:y(Se,Ie,ue,"nswe"),ondragend:y(U,Ie,{isEnd:!0})})),d(Ae,function(ke){ue.add(new _.Rect({name:ke,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:y(Se,Ie,ue,ke),ondragend:y(U,Ie,{isEnd:!0})}))}),ue}function X(Se,Ie,_e,Ae){var ue=Ae.brushStyle.lineWidth||0,ke=s(ue,6),Pe=_e[0][0],Ve=_e[1][0],je=Pe-ue/2,it=Ve-ue/2,rt=_e[0][1],mt=_e[1][1],yt=rt-ke+ue/2,st=mt-ke+ue/2,Qe=rt-Pe,At=mt-Ve,Xt=Qe+ue,cn=At+ue;q(Se,Ie,"main",Pe,Ve,Qe,At),Ae.transformable&&(q(Se,Ie,"w",je,it,ke,cn),q(Se,Ie,"e",yt,it,ke,cn),q(Se,Ie,"n",je,it,Xt,ke),q(Se,Ie,"s",je,st,Xt,ke),q(Se,Ie,"nw",je,it,ke,ke),q(Se,Ie,"ne",yt,it,ke,ke),q(Se,Ie,"sw",je,st,ke,ke),q(Se,Ie,"se",yt,st,ke,ke))}function J(Se,Ie){var _e=Ie.__brushOption,Ae=_e.transformable,ue=Ie.childAt(0);ue.useStyle(te(_e)),ue.attr({silent:!Ae,cursor:Ae?"move":"default"}),d(["w","e","n","s","se","sw","ne","nw"],function(ke){var Pe=Ie.childOfName(ke),Ve=function je(it,rt){if(rt.length>1){var mt=[je(it,(rt=rt.split(""))[0]),je(it,rt[1])];return(mt[0]==="e"||mt[0]==="w")&&mt.reverse(),mt.join("")}var mt=_.transformDirection({w:"left",e:"right",n:"top",s:"bottom"}[rt],_.getTransform(it.group));return{left:"w",right:"e",top:"n",bottom:"s"}[mt]}(Se,ke);Pe&&Pe.attr({silent:!Ae,invisible:!Ae,cursor:Ae?C[Ve]+"-resize":null})})}function q(Se,Ie,_e,Ae,ue,ke,Pe){var Ve,je,it,rt=Ie.childOfName(_e);rt&&rt.setShape((je=b((Ve=fe(Se,Ie,[[Ae,ue],[Ae+ke,ue+Pe]]))[0][0],Ve[1][0]),{x:je,y:it=b(Ve[0][1],Ve[1][1]),width:s(Ve[0][0],Ve[1][0])-je,height:s(Ve[0][1],Ve[1][1])-it}))}function te(Se){return o.defaults({strokeNoScale:!0},Se.brushStyle)}function re(Se,Ie,_e,Ae){var ue=[b(Se,_e),b(Ie,Ae)],ke=[s(Se,_e),s(Ie,Ae)];return[[ue[0],ke[0]],[ue[1],ke[1]]]}function ie(Se,Ie,_e,Ae,ue,ke,Pe,Ve){var je=Ae.__brushOption,it=Se(je.range),rt=le(_e,ke,Pe);d(ue.split(""),function(mt){var yt=I[mt];it[yt[0]][yt[1]]+=rt[yt[0]]}),je.range=Ie(re(it[0][0],it[1][0],it[0][1],it[1][1])),z(_e,Ae),U(_e,{isEnd:!1})}function ne(Se,Ie,_e,Ae,ue){var ke=Ie.__brushOption.range,Pe=le(Se,_e,Ae);d(ke,function(Ve){Ve[0]+=Pe[0],Ve[1]+=Pe[1]}),z(Se,Ie),U(Se,{isEnd:!1})}function le(Se,Ie,_e){var Ae=Se.group,ue=Ae.transformCoordToLocal(Ie,_e),ke=Ae.transformCoordToLocal(0,0);return[ue[0]-ke[0],ue[1]-ke[1]]}function fe(Se,Ie,_e){var Ae=V(Se,Ie);return Ae&&Ae!==!0?Ae.clipPath(_e,Se._transform):o.clone(_e)}function we(Se){var Ie=Se.event;Ie.preventDefault&&Ie.preventDefault()}function pe(Se,Ie,_e){return Se.childOfName("main").contain(Ie,_e)}function ve(Se,Ie,_e,Ae){var ue,ke=Se._creatingCover,Pe=Se._creatingPanel,Ve=Se._brushOption;if(Se._track.push(_e.slice()),function(rt){var mt=rt._track;if(!mt.length)return!1;var yt=mt[mt.length-1],st=mt[0],Qe=yt[0]-st[0],At=yt[1]-st[1];return l(Qe*Qe+At*At,.5)>6}(Se)||ke){if(Pe&&!ke){Ve.brushMode==="single"&&P(Se);var je=o.clone(Ve);je.brushType=be(je.brushType,Pe),je.panelId=Pe===!0?null:Pe.panelId,ke=Se._creatingCover=T(Se,je),Se._covers.push(ke)}if(ke){var it=Ne[be(Se._brushType,Pe)];ke.__brushOption.range=it.getCreatingRange(fe(Se,ke,Se._track)),Ae&&(D(Se,ke),it.updateCommon(Se,ke)),O(Se,ke),ue={isEnd:Ae}}}else Ae&&Ve.brushMode==="single"&&Ve.removeOnClick&&$(Se,Ie,_e)&&P(Se)&&(ue={isEnd:Ae,removeOnClick:!0});return ue}function be(Se,Ie){return Se==="auto"?Ie.defaultBrushType:Se}m.prototype={constructor:m,enableBrush:function(Se){var Ie,_e,Ae,ue,ke;return this._brushType&&(Ie=this,_e=Ie._zr,p.release(_e,w,Ie._uid),d(Ie._handlers,function(Pe,Ve){_e.off(Ve,Pe)}),Ie._brushType=Ie._brushOption=null),Se.brushType&&(Ae=this,ue=Se,ke=Ae._zr,Ae._enableGlobalPan||p.take(ke,w,Ae._uid),d(Ae._handlers,function(Pe,Ve){ke.on(Ve,Pe)}),Ae._brushType=ue.brushType,Ae._brushOption=o.merge(o.clone(h),ue,!0)),this},setPanels:function(Se){if(Se&&Se.length){var Ie=this._panels={};o.each(Se,function(_e){Ie[_e.panelId]=o.clone(_e)})}else this._panels=null;return this},mount:function(Se){Se=Se||{},this._enableGlobalPan=Se.enableGlobalPan;var Ie=this.group;return this._zr.add(Ie),Ie.attr({position:Se.position||[0,0],rotation:Se.rotation||0,scale:Se.scale||[1,1]}),this._transform=Ie.getLocalTransform(),this},eachCover:function(Se,Ie){d(this._covers,Se,Ie)},updateCovers:function(Se){Se=o.map(Se,function(Ve){return o.merge(o.clone(h),Ve,!0)});var Ie=this._covers,_e=this._covers=[],Ae=this,ue=this._creatingCover;return new f(Ie,Se,function(Ve,je){return ke(Ve.__brushOption,je)},ke).add(Pe).update(Pe).remove(function(Ve){Ie[Ve]!==ue&&Ae.group.remove(Ie[Ve])}).execute(),this;function ke(Ve,je){return(Ve.id!=null?Ve.id:"\0-brush-index-"+je)+"-"+Ve.brushType}function Pe(Ve,je){var it=Se[Ve];if(je!=null&&Ie[je]===ue)_e[Ve]=Ie[je];else{var rt=_e[Ve]=je!=null?(Ie[je].__brushOption=it,Ie[je]):D(Ae,T(Ae,it));z(Ae,rt)}}},unmount:function(){return this.enableBrush(!1),P(this),this._zr.remove(this.group),this},dispose:function(){this.unmount(),this.off()}},o.mixin(m,S);var Ee={mousedown:function(Se){if(this._dragging)Re.call(this,Se);else if(!Se.target||!Se.target.draggable){we(Se);var Ie=this.group.transformCoordToLocal(Se.offsetX,Se.offsetY);this._creatingCover=null,(this._creatingPanel=$(this,Se,Ie))&&(this._dragging=!0,this._track=[Ie.slice()])}},mousemove:function(Se){var Ie=this.group.transformCoordToLocal(Se.offsetX,Se.offsetY);if(function(Ae,ue,ke){if(Ae._brushType){var Pe=Ae._zr,Ve=Ae._covers,je=$(Ae,ue,ke);if(!Ae._dragging)for(var it=0;it<Ve.length;it++){var rt=Ve[it].__brushOption;if(je&&(je===!0||rt.panelId===je.panelId)&&Ne[rt.brushType].contain(Ve[it],ke[0],ke[1]))return}je&&Pe.setCursorStyle("crosshair")}}(this,Se,Ie),this._dragging){we(Se);var _e=ve(this,Se,Ie,!1);_e&&U(this,_e)}},mouseup:Re};function Re(Se){if(this._dragging){we(Se);var Ie=this.group.transformCoordToLocal(Se.offsetX,Se.offsetY),_e=ve(this,Se,Ie,!0);this._dragging=!1,this._track=[],this._creatingCover=null,_e&&U(this,_e)}}var Ne={lineX:Le(0),lineY:Le(1),rect:{createCover:function(Se,Ie){return Z(y(ie,function(_e){return _e},function(_e){return _e}),Se,Ie,["w","e","n","s","se","sw","ne","nw"])},getCreatingRange:function(Se){var Ie=Y(Se);return re(Ie[1][0],Ie[1][1],Ie[0][0],Ie[0][1])},updateCoverShape:function(Se,Ie,_e,Ae){X(Se,Ie,_e,Ae)},updateCommon:J,contain:pe},polygon:{createCover:function(Se,Ie){var _e=new _.Group;return _e.add(new _.Polyline({name:"main",style:te(Ie),silent:!0})),_e},getCreatingRange:function(Se){return Se},endCreating:function(Se,Ie){Ie.remove(Ie.childAt(0)),Ie.add(new _.Polygon({name:"main",draggable:!0,drift:y(ne,Se,Ie),ondragend:y(U,Se,{isEnd:!0})}))},updateCoverShape:function(Se,Ie,_e,Ae){Ie.childAt(0).setShape({points:fe(Se,Ie,_e)})},updateCommon:J,contain:pe}};function Le(Se){return{createCover:function(Ie,_e){return Z(y(ie,function(Ae){var ue=[Ae,[0,100]];return Se&&ue.reverse(),ue},function(Ae){return Ae[Se]}),Ie,_e,[["w","e"],["n","s"]][Se])},getCreatingRange:function(Ie){var _e=Y(Ie);return[b(_e[0][Se],_e[1][Se]),s(_e[0][Se],_e[1][Se])]},updateCoverShape:function(Ie,_e,Ae,ue){var ke,Pe=V(Ie,_e);if(Pe!==!0&&Pe.getLinearBrushOtherExtent)ke=Pe.getLinearBrushOtherExtent(Se,Ie._transform);else{var Ve=Ie._zr;ke=[0,[Ve.getWidth(),Ve.getHeight()][1-Se]]}var je=[Ae,ke];Se&&je.reverse(),X(Ie,_e,je,ue)},updateCommon:J,contain:pe}}E.exports=m},76744:function(E,A,u){u(9129).__DEV__;var o=u(23405),S=u(51747),_=u(51064),p=u(45498),f=o.each,y=o.indexOf,d=o.curry,v=["dataToPoint","pointToData"],b=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"];function s(z,H,$){var V=this._targetInfoList=[],P={},U=I(H,z);f(C,function(Y,Z){(!$||!$.include||y($.include,Z)>=0)&&Y(U,V,P)})}var l=s.prototype;function w(z){return z[0]>z[1]&&z.reverse(),z}function I(z,H){return _.parseFinder(z,H,{includeMainTypes:b})}l.setOutputRanges=function(z,H){this.matchOutputRanges(z,H,function($,V,P){if(($.coordRanges||($.coordRanges=[])).push(V),!$.coordRange){$.coordRange=V;var U=m[$.brushType](0,P,V);$.__rangeOffset={offset:D[$.brushType](U.values,$.range,[1,1]),xyMinMax:U.xyMinMax}}})},l.matchOutputRanges=function(z,H,$){f(z,function(V){var P=this.findTargetInfo(V,H);P&&P!==!0&&o.each(P.coordSyses,function(U){var Y=m[V.brushType](1,U,V.range);$(V,Y.values,U,H)})},this)},l.setInputRanges=function(z,H){f(z,function($){var V=this.findTargetInfo($,H);if($.range=$.range||[],V&&V!==!0){$.panelId=V.panelId;var P,U,Y,Z,X,J=m[$.brushType](0,V.coordSys,$.coordRange),q=$.__rangeOffset;$.range=q?D[$.brushType](J.values,q.offset,(P=J.xyMinMax,U=q.xyMinMax,Y=N(P),Z=N(U),isNaN((X=[Y[0]/Z[0],Y[1]/Z[1]])[0])&&(X[0]=1),isNaN(X[1])&&(X[1]=1),X)):J.values}},this)},l.makePanelOpts=function(z,H){return o.map(this._targetInfoList,function($){var V=$.getPanelRect();return{panelId:$.panelId,defaultBrushType:H&&H($),clipPath:p.makeRectPanelClipPath(V),isTargetByCursor:p.makeRectIsTargetByCursor(V,z,$.coordSysModel),getLinearBrushOtherExtent:p.makeLinearBrushOtherExtent(V)}})},l.controlSeries=function(z,H,$){var V=this.findTargetInfo(z,$);return V===!0||V&&y(V.coordSyses,H.coordinateSystem)>=0},l.findTargetInfo=function(z,H){for(var $=this._targetInfoList,V=I(H,z),P=0;P<$.length;P++){var U=$[P],Y=z.panelId;if(Y){if(U.panelId===Y)return U}else for(var P=0;P<h.length;P++)if(h[P](V,U))return U}return!0};var C={grid:function(z,H){var $=z.xAxisModels,V=z.yAxisModels,P=z.gridModels,U=o.createHashMap(),Y={},Z={};($||V||P)&&(f($,function(X){var J=X.axis.grid.model;U.set(J.id,J),Y[J.id]=!0}),f(V,function(X){var J=X.axis.grid.model;U.set(J.id,J),Z[J.id]=!0}),f(P,function(X){U.set(X.id,X),Y[X.id]=!0,Z[X.id]=!0}),U.each(function(X){var J=X.coordinateSystem,q=[];f(J.getCartesians(),function(te,re){(y($,te.getAxis("x").model)>=0||y(V,te.getAxis("y").model)>=0)&&q.push(te)}),H.push({panelId:"grid--"+X.id,gridModel:X,coordSysModel:X,coordSys:q[0],coordSyses:q,getPanelRect:c.grid,xAxisDeclared:Y[X.id],yAxisDeclared:Z[X.id]})}))},geo:function(z,H){f(z.geoModels,function($){var V=$.coordinateSystem;H.push({panelId:"geo--"+$.id,geoModel:$,coordSysModel:$,coordSys:V,coordSyses:[V],getPanelRect:c.geo})})}},h=[function(z,H){var $=z.xAxisModel,V=z.yAxisModel,P=z.gridModel;return!P&&$&&(P=$.axis.grid.model),!P&&V&&(P=V.axis.grid.model),P&&P===H.gridModel},function(z,H){var $=z.geoModel;return $&&$===H.geoModel}],c={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var z=this.coordSys,H=z.getBoundingRect().clone();return H.applyTransform(S.getTransform(z)),H}},m={lineX:d(T,0),lineY:d(T,1),rect:function(z,H,$){var V=H[v[z]]([$[0][0],$[1][0]]),P=H[v[z]]([$[0][1],$[1][1]]),U=[w([V[0],P[0]]),w([V[1],P[1]])];return{values:U,xyMinMax:U}},polygon:function(z,H,$){var V=[[1/0,-1/0],[1/0,-1/0]];return{values:o.map($,function(P){var U=H[v[z]](P);return V[0][0]=Math.min(V[0][0],U[0]),V[1][0]=Math.min(V[1][0],U[1]),V[0][1]=Math.max(V[0][1],U[0]),V[1][1]=Math.max(V[1][1],U[1]),U}),xyMinMax:V}}};function T(z,H,$,V){var P=$.getAxis(["x","y"][z]),U=w(o.map([0,1],function(Z){return H?P.coordToData(P.toLocalCoord(V[Z])):P.toGlobalCoord(P.dataToCoord(V[Z]))})),Y=[];return Y[z]=U,Y[1-z]=[NaN,NaN],{values:U,xyMinMax:Y}}var D={lineX:d(O,0),lineY:d(O,1),rect:function(z,H,$){return[[z[0][0]-$[0]*H[0][0],z[0][1]-$[0]*H[0][1]],[z[1][0]-$[1]*H[1][0],z[1][1]-$[1]*H[1][1]]]},polygon:function(z,H,$){return o.map(z,function(V,P){return[V[0]-$[0]*H[P][0],V[1]-$[1]*H[P][1]]})}};function O(z,H,$,V){return[H[0]-V[z]*$[0],H[1]-V[z]*$[1]]}function N(z){return z?[z[0][1]-z[0][0],z[1][1]-z[1][0]]:[NaN,NaN]}E.exports=s},90229:function(E,A,u){var o=u(23405),S=u(55104),_=u(6463),p=u(11731).onIrrelevantElement,f=u(51747),y=u(96518),d=u(91342).getUID;function v(l,w){var I=l.getItemStyle(),C=l.get("areaColor");return C!=null&&(I.fill=C),I}function b(l,w){w.eachChild(function(I){o.each(I.__regions,function(C){I.trigger(l.isSelected(C.name)?"emphasis":"normal")})})}function s(l,w){var I=new f.Group;this.uid=d("ec_map_draw"),this._controller=new S(l.getZr()),this._controllerHost={target:w?I:null},this.group=I,this._updateGroup=w,this._mouseDownFlag,this._mapName,this._initialized,I.add(this._regionsGroup=new f.Group),I.add(this._backgroundGroup=new f.Group)}s.prototype={constructor:s,draw:function(l,w,I,C,h){var c,m=l.mainType==="geo",T=l.getData&&l.getData();m&&w.eachComponent({mainType:"series",subType:"map"},function(Z){T||Z.getHostGeoModel()!==l||(T=Z.getData())});var D=l.coordinateSystem;this._updateBackground(D);var O=this._regionsGroup,N=this.group,z=D.scale,H={position:D.position,scale:z};!O.childAt(0)||h?N.attr(H):f.updateProps(N,H,l),O.removeAll();var $=["itemStyle"],V=["emphasis","itemStyle"],P=["label"],U=["emphasis","label"],Y=o.createHashMap();o.each(D.regions,function(Z){var X=Y.get(Z.name)||Y.set(Z.name,new f.Group),J=new f.CompoundPath({shape:{paths:[]}});X.add(J);var q=l.getRegionModel(Z.name)||l,te=q.getModel($),re=q.getModel(V),ie=v(te),ne=v(re),le=q.getModel(P),fe=q.getModel(U);if(T){Re=T.indexOfName(Z.name);var we=T.getItemVisual(Re,"color",!0);we&&(ie.fill=we)}o.each(Z.geometries,function(Ie){if(Ie.type==="polygon"){J.shape.paths.push(new f.Polygon({shape:{points:Ie.exterior}}));for(var _e=0;_e<(Ie.interiors?Ie.interiors.length:0);_e++)J.shape.paths.push(new f.Polygon({shape:{points:Ie.interiors[_e]}}))}}),J.setStyle(ie),J.style.strokeNoScale=!0,J.culling=!0;var pe=le.get("show"),ve=fe.get("show"),be=T&&isNaN(T.get(T.mapDimension("value"),Re)),Ee=T&&T.getItemLayout(Re);if(m||be&&(pe||ve)||Ee&&Ee.showLabel){var Re,Ne,Le=m?Z.name:Re;(!T||Re>=0)&&(Ne=l);var Se=new f.Text({position:Z.center.slice(),scale:[1/z[0],1/z[1]],z2:10,silent:!0});f.setLabelStyle(Se.style,Se.hoverStyle={},le,fe,{labelFetcher:Ne,labelDataIndex:Le,defaultText:Z.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),X.add(Se)}if(T)T.setItemGraphicEl(Re,X);else{var q=l.getRegionModel(Z.name);J.eventData={componentType:"geo",componentIndex:l.componentIndex,geoIndex:l.componentIndex,name:Z.name,region:q&&q.option||{}}}(X.__regions||(X.__regions=[])).push(Z),f.setHoverStyle(X,ne,{hoverSilentOnTouch:!!l.get("selectedMode")}),O.add(X)}),this._updateController(l,w,I),c=this,O.off("click"),O.off("mousedown"),l.get("selectedMode")&&(O.on("mousedown",function(){c._mouseDownFlag=!0}),O.on("click",function(Z){if(c._mouseDownFlag){c._mouseDownFlag=!1;for(var X=Z.target;!X.__regions;)X=X.parent;if(X){var J={type:(l.mainType==="geo"?"geo":"map")+"ToggleSelect",batch:o.map(X.__regions,function(q){return{name:q.name,from:C.uid}})};J[l.mainType+"Id"]=l.id,I.dispatchAction(J),b(l,O)}}})),b(l,O)},remove:function(){this._regionsGroup.removeAll(),this._backgroundGroup.removeAll(),this._controller.dispose(),this._mapName&&y.removeGraphic(this._mapName,this.uid),this._mapName=null,this._controllerHost={}},_updateBackground:function(l){var w=l.map;this._mapName!==w&&o.each(y.makeGraphic(w,this.uid),function(I){this._backgroundGroup.add(I)},this),this._mapName=w},_updateController:function(l,w,I){var C=l.coordinateSystem,h=this._controller,c=this._controllerHost;c.zoomLimit=l.get("scaleLimit"),c.zoom=C.getZoom(),h.enable(l.get("roam")||!1);var m=l.mainType;function T(){var D={type:"geoRoam",componentType:m};return D[m+"Id"]=l.id,D}h.off("pan").on("pan",function(D){this._mouseDownFlag=!1,_.updateViewOnPan(c,D.dx,D.dy),I.dispatchAction(o.extend(T(),{dx:D.dx,dy:D.dy}))},this),h.off("zoom").on("zoom",function(D){if(this._mouseDownFlag=!1,_.updateViewOnZoom(c,D.scale,D.originX,D.originY),I.dispatchAction(o.extend(T(),{zoom:D.scale,originX:D.originX,originY:D.originY})),this._updateGroup){var O=this.group.scale;this._regionsGroup.traverse(function(N){N.type==="text"&&N.attr("scale",[1/O[0],1/O[1]])})}},this),h.setPointerChecker(function(D,O,N){return C.getViewRectAfterRoam().contain(O,N)&&!p(D,I,l)})}},E.exports=s},55104:function(E,A,u){var o=u(23405),S=u(62271),_=u(46427),p=u(5091);function f(C){this.pointerChecker,this._zr=C,this._opt={};var h=o.bind,c=h(y,this),m=h(d,this),T=h(v,this),D=h(b,this),O=h(s,this);S.call(this),this.setPointerChecker=function(N){this.pointerChecker=N},this.enable=function(N,z){this.disable(),this._opt=o.defaults(o.clone(z)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),N==null&&(N=!0),(N===!0||N==="move"||N==="pan")&&(C.on("mousedown",c),C.on("mousemove",m),C.on("mouseup",T)),(N===!0||N==="scale"||N==="zoom")&&(C.on("mousewheel",D),C.on("pinch",O))},this.disable=function(){C.off("mousedown",c),C.off("mousemove",m),C.off("mouseup",T),C.off("mousewheel",D),C.off("pinch",O)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}function y(C){if(!_.isMiddleOrRightButtonOnMouseUpDown(C)&&(!C.target||!C.target.draggable)){var h=C.offsetX,c=C.offsetY;this.pointerChecker&&this.pointerChecker(C,h,c)&&(this._x=h,this._y=c,this._dragging=!0)}}function d(C){if(!(!this._dragging||!I("moveOnMouseMove",C,this._opt)||C.gestureEvent==="pinch"||p.isTaken(this._zr,"globalPan"))){var h=C.offsetX,c=C.offsetY,m=this._x,T=this._y;this._x=h,this._y=c,this._opt.preventDefaultMouseMove&&_.stop(C.event),w(this,"pan","moveOnMouseMove",C,{dx:h-m,dy:c-T,oldX:m,oldY:T,newX:h,newY:c})}}function v(C){_.isMiddleOrRightButtonOnMouseUpDown(C)||(this._dragging=!1)}function b(C){var h=I("zoomOnMouseWheel",C,this._opt),c=I("moveOnMouseWheel",C,this._opt),m=C.wheelDelta,T=Math.abs(m),D=C.offsetX,O=C.offsetY;if(m!==0&&(h||c)){if(h){var N=T>3?1.4:T>1?1.2:1.1;l(this,"zoom","zoomOnMouseWheel",C,{scale:m>0?N:1/N,originX:D,originY:O})}if(c){var z=Math.abs(m);l(this,"scrollMove","moveOnMouseWheel",C,{scrollDelta:(m>0?1:-1)*(z>3?.4:z>1?.15:.05),originX:D,originY:O})}}}function s(C){if(!p.isTaken(this._zr,"globalPan")){var h=C.pinchScale>1?1.1:.9090909090909091;l(this,"zoom",null,C,{scale:h,originX:C.pinchX,originY:C.pinchY})}}function l(C,h,c,m,T){C.pointerChecker&&C.pointerChecker(m,T.originX,T.originY)&&(_.stop(m.event),w(C,h,c,m,T))}function w(C,h,c,m,T){T.isAvailableBehavior=o.bind(I,null,c,m),C.trigger(h,T)}function I(C,h,c){var m=c[C];return!C||m&&(!o.isString(m)||h.event[m+"Key"])}o.mixin(f,S),E.exports=f},45498:function(E,A,u){var o=u(28761),S=u(11731).onIrrelevantElement,_=u(51747);function p(f){return o.create(f)}A.makeRectPanelClipPath=function(f){return f=p(f),function(y,d){return _.clipPointsByRect(y,f)}},A.makeLinearBrushOtherExtent=function(f,y){return f=p(f),function(d){var v=y??d,b=v?f.width:f.height,s=v?f.x:f.y;return[s,s+(b||0)]}},A.makeRectIsTargetByCursor=function(f,y,d){return f=p(f),function(v,b,s){return f.contain(b[0],b[1])&&!S(v,y,d)}}},11731:function(E,A){var u={axisPointer:1,tooltip:1,brush:1};A.onIrrelevantElement=function(o,S,_){var p=S.getComponentByElement(o.topTarget),f=p&&p.coordinateSystem;return p&&p!==_&&!u[p.mainType]&&f&&f.model!==_}},5091:function(E,A,u){var o=u(87930),S="\0_ec_interaction_mutex";function _(p){return p[S]||(p[S]={})}o.registerAction({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){}),A.take=function(p,f,y){_(p)[f]=y},A.release=function(p,f,y){var d=_(p);d[f]===y&&(d[f]=null)},A.isTaken=function(p,f){return!!_(p)[f]}},40088:function(E,A,u){var o=u(62751),S=o.getLayoutRect,_=o.box,p=o.positionElement,f=u(60653),y=u(51747);A.layout=function(d,v,b){var s=v.getBoxLayoutParams(),l=v.get("padding"),w={width:b.getWidth(),height:b.getHeight()},I=S(s,w,l);_(v.get("orient"),d,v.get("itemGap"),I.width,I.height),p(d,s,w,l)},A.makeBackground=function(l,v){var b=f.normalizeCssArray(v.get("padding")),s=v.getItemStyle(["color","opacity"]);s.fill=v.get("backgroundColor");var l=new y.Rect({shape:{x:l.x-b[3],y:l.y-b[0],width:l.width+b[1]+b[3],height:l.height+b[0]+b[2],r:v.get("borderRadius")},style:s,silent:!0,z2:-1});return l}},6463:function(E,A){A.updateViewOnPan=function(u,o,S){var _=u.target,p=_.position;p[0]+=o,p[1]+=S,_.dirty()},A.updateViewOnZoom=function(u,o,S,_){var p=u.target,f=u.zoomLimit,y=p.position,d=p.scale,v=u.zoom=u.zoom||1;if(v*=o,f){var b=f.min||0;v=Math.max(Math.min(f.max||1/0,v),b)}var s=v/u.zoom;u.zoom=v,y[0]-=(S-y[0])*(s-1),y[1]-=(_-y[1])*(s-1),d[0]*=s,d[1]*=s,p.dirty()}},49214:function(E,A,u){var o=u(23405);E.exports={updateSelectedMap:function(S){this._targetList=o.isArray(S)?S.slice():[],this._selectTargetMap=o.reduce(S||[],function(_,p){return _.set(p.name,p),_},o.createHashMap())},select:function(S,_){var p=_!=null?this._targetList[_]:this._selectTargetMap.get(S);this.get("selectedMode")==="single"&&this._selectTargetMap.each(function(f){f.selected=!1}),p&&(p.selected=!0)},unSelect:function(S,_){var p=_!=null?this._targetList[_]:this._selectTargetMap.get(S);p&&(p.selected=!1)},toggleSelected:function(S,_){var p=_!=null?this._targetList[_]:this._selectTargetMap.get(S);if(p!=null)return this[p.selected?"unSelect":"select"](S,_),p.selected},isSelected:function(S,_){var p=_!=null?this._targetList[_]:this._selectTargetMap.get(S);return p&&p.selected}}},2488:function(E){function A(o,S){var _=o[S]-o[1-S];return{span:Math.abs(_),sign:_>0?-1:_<0?1:S?-1:1}}function u(o,S){return Math.min(S[1],Math.max(S[0],o))}E.exports=function(o,S,_,p,f,y){S[0]=u(S[0],_),S[1]=u(S[1],_),o=o||0;var d=_[1]-_[0];f!=null&&(f=u(f,[0,d])),y!=null&&(y=Math.max(y,f??0)),p==="all"&&(f=y=Math.abs(S[1]-S[0]),p=0);var v=A(S,p);S[p]+=o;var b=f||0,s=_.slice();v.sign<0?s[0]+=b:s[1]-=b,S[p]=u(S[p],s);var l=A(S,p);f!=null&&(l.sign!==v.sign||l.span<f)&&(S[1-p]=S[p]+v.sign*f);var l=A(S,p);return y!=null&&l.span>y&&(S[1-p]=S[p]+l.sign*y),S}},72498:function(E,A,u){var o=u(87930);u(75297),u(32603),u(71060);var S=u(4963),_=u(28628);o.registerProcessor(S),_.registerSubTypeDefaulter("legend",function(){return"plain"})},75297:function(E,A,u){var o=u(87930),S=u(23405),_=u(46082),p=u(51064).isNameSpecified,f=o.extendComponentModel({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(y,d,v){this.mergeDefaultAndTheme(y,v),y.selected=y.selected||{}},mergeOption:function(y){f.superCall(this,"mergeOption",y)},optionUpdated:function(){this._updateData(this.ecModel);var y=this._data;if(y[0]&&this.get("selectedMode")==="single"){for(var d=!1,v=0;v<y.length;v++){var b=y[v].get("name");if(this.isSelected(b)){this.select(b),d=!0;break}}d||this.select(y[0].get("name"))}},_updateData:function(y){var d=[],v=[];y.eachRawSeries(function(l){var w,I=l.name;if(v.push(I),l.legendDataProvider){var C=l.legendDataProvider(),h=C.mapArray(C.getName);y.isSeriesFiltered(l)||(v=v.concat(h)),h.length?d=d.concat(h):w=!0}else w=!0;w&&p(l)&&d.push(l.name)}),this._availableNames=v;var b=this.get("data")||d,s=S.map(b,function(l){return(typeof l=="string"||typeof l=="number")&&(l={name:l}),new _(l,this,this.ecModel)},this);this._data=s},getData:function(){return this._data},select:function(y){var d=this.option.selected;if(this.get("selectedMode")==="single"){var v=this._data;S.each(v,function(b){d[b.get("name")]=!1})}d[y]=!0},unSelect:function(y){this.get("selectedMode")!=="single"&&(this.option.selected[y]=!1)},toggleSelected:function(y){var d=this.option.selected;d.hasOwnProperty(y)||(d[y]=!0),this[d[y]?"unSelect":"select"](y)},isSelected:function(y){var d=this.option.selected;return!(d.hasOwnProperty(y)&&!d[y])&&S.indexOf(this._availableNames,y)>=0},defaultOption:{zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,inactiveColor:"#ccc",textStyle:{color:"#333"},selectedMode:!0,tooltip:{show:!1}}});E.exports=f},71060:function(E,A,u){u(9129).__DEV__;var o=u(87930),S=u(23405),_=u(30696).createSymbol,p=u(51747),f=u(40088).makeBackground,y=u(62751),d=S.curry,v=S.each,b=p.Group;function s(I,C){C.dispatchAction({type:"legendToggleSelect",name:I})}function l(I,C,h,c){var m=h.getZr().storage.getDisplayList()[0];m&&m.useHoverLayer||h.dispatchAction({type:"highlight",seriesName:I,name:C,excludeSeriesId:c})}function w(I,C,h,c){var m=h.getZr().storage.getDisplayList()[0];m&&m.useHoverLayer||h.dispatchAction({type:"downplay",seriesName:I,name:C,excludeSeriesId:c})}E.exports=o.extendComponentView({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new b),this._backgroundEl,this._isFirstRender=!0},getContentGroup:function(){return this._contentGroup},render:function(I,C,h){var c=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),I.get("show",!0)){var m=I.get("align");m&&m!=="auto"||(m=I.get("left")==="right"&&I.get("orient")==="vertical"?"right":"left"),this.renderInner(m,I,C,h);var T=I.getBoxLayoutParams(),D={width:h.getWidth(),height:h.getHeight()},O=I.get("padding"),N=y.getLayoutRect(T,D,O),z=this.layoutInner(I,m,N,c),H=y.getLayoutRect(S.defaults({width:z.width,height:z.height},T),D,O);this.group.attr("position",[H.x-z.x,H.y-z.y]),this.group.add(this._backgroundEl=f(z,I))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl)},renderInner:function(I,C,h,c){var m=this.getContentGroup(),T=S.createHashMap(),D=C.get("selectedMode"),O=[];h.eachRawSeries(function(N){N.get("legendHoverLink")||O.push(N.id)}),v(C.getData(),function(N,z){var H=N.get("name");if(!this.newlineDisabled&&(H===""||H===`
`))return void m.add(new b({newline:!0}));var $=h.getSeriesByName(H)[0];if(!T.get(H))if($){var V=$.getData(),P=V.getVisual("color");typeof P=="function"&&(P=P($.getDataParams(0)));var U=V.getVisual("legendSymbol")||"roundRect",Y=V.getVisual("symbol");this._createItem(H,z,N,C,U,Y,I,P,D).on("click",d(s,H,c)).on("mouseover",d(l,$.name,null,c,O)).on("mouseout",d(w,$.name,null,c,O)),T.set(H,!0)}else h.eachRawSeries(function(Z){if(!T.get(H)&&Z.legendDataProvider){var X=Z.legendDataProvider(),J=X.indexOfName(H);if(!(J<0)){var q=X.getItemVisual(J,"color");this._createItem(H,z,N,C,"roundRect",null,I,q,D).on("click",d(s,H,c)).on("mouseover",d(l,null,H,c,O)).on("mouseout",d(w,null,H,c,O)),T.set(H,!0)}}},this)},this)},_createItem:function(I,C,h,c,m,T,D,O,N){var z=c.get("itemWidth"),H=c.get("itemHeight"),$=c.get("inactiveColor"),V=c.get("symbolKeepAspect"),P=c.isSelected(I),U=new b,Y=h.getModel("textStyle"),Z=h.get("icon"),X=h.getModel("tooltip"),J=X.parentModel;if(m=Z||m,U.add(_(m,0,0,z,H,P?O:$,V==null||V)),!Z&&T&&(T!==m||T==="none")){var q=.8*H;T==="none"&&(T="circle"),U.add(_(T,(z-q)/2,(H-q)/2,q,q,P?O:$,V==null||V))}var te=c.get("formatter"),re=I;typeof te=="string"&&te?re=te.replace("{name}",I??""):typeof te=="function"&&(re=te(I)),U.add(new p.Text({style:p.setTextStyle({},Y,{text:re,x:D==="left"?z+5:-5,y:H/2,textFill:P?Y.getTextColor():$,textAlign:D,textVerticalAlign:"middle"})}));var ie=new p.Rect({shape:U.getBoundingRect(),invisible:!0,tooltip:X.get("show")?S.extend({content:I,formatter:J.get("formatter",!0)||function(){return I},formatterParams:{componentType:"legend",legendIndex:c.componentIndex,name:I,$vars:["name"]}},X.option):null});return U.add(ie),U.eachChild(function(ne){ne.silent=!0}),ie.silent=!N,this.getContentGroup().add(U),p.setHoverStyle(U),U.__legendDataIndex=C,U},layoutInner:function(I,C,h){var c=this.getContentGroup();y.box(I.get("orient"),c,I.get("itemGap"),h.width,h.height);var m=c.getBoundingRect();return c.attr("position",[-m.x,-m.y]),this.group.getBoundingRect()},remove:function(){this.getContentGroup().removeAll(),this._isFirstRender=!0}})},37309:function(E,A,u){var o=u(75297),S=u(62751),_=S.mergeLayoutParam,p=S.getLayoutParams,f=o.extend({type:"legend.scroll",setScrollDataIndex:function(d){this.option.scrollDataIndex=d},defaultOption:{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800},init:function(d,v,b,s){var l=p(d);f.superCall(this,"init",d,v,b,s),y(this,d,l)},mergeOption:function(d,v){f.superCall(this,"mergeOption",d,v),y(this,this.option,d)},getOrient:function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}}});function y(d,v,b){var s=d.getOrient(),l=[1,1];l[s.index]=0,_(v,b,{type:"box",ignoreSize:l})}E.exports=f},78553:function(E,A,u){var o=u(23405),S=u(51747),_=u(62751),p=u(71060),f=S.Group,y=["width","height"],d=["x","y"],v=p.extend({type:"legend.scroll",newlineDisabled:!0,init:function(){v.superCall(this,"init"),this._currentIndex=0,this.group.add(this._containerGroup=new f),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new f),this._showController},resetInner:function(){v.superCall(this,"resetInner"),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},renderInner:function(b,s,l,w){var I=this;v.superCall(this,"renderInner",b,s,l,w);var C=this._controllerGroup,h=s.get("pageIconSize",!0);o.isArray(h)||(h=[h,h]),m("pagePrev",0);var c=s.getModel("pageTextStyle");function m(T,D){var O=S.createIcon(s.get("pageIcons",!0)[s.getOrient().name][D],{onclick:o.bind(I._pageGo,I,T+"DataIndex",s,w)},{x:-h[0]/2,y:-h[1]/2,width:h[0],height:h[1]});O.name=T,C.add(O)}C.add(new S.Text({name:"pageText",style:{textFill:c.getTextColor(),font:c.getFont(),textVerticalAlign:"middle",textAlign:"center"},silent:!0})),m("pageNext",1)},layoutInner:function(b,s,l,w){var I=this.getContentGroup(),C=this._containerGroup,h=this._controllerGroup,c=b.getOrient().index,m=y[c],T=y[1-c],D=d[1-c];_.box(b.get("orient"),I,b.get("itemGap"),c?l.width:null,c?null:l.height),_.box("horizontal",h,b.get("pageButtonItemGap",!0));var O=I.getBoundingRect(),N=h.getBoundingRect(),z=this._showController=O[m]>l[m],H=[-O.x,-O.y];w||(H[c]=I.position[c]);var $=[0,0],V=[-N.x,-N.y],P=o.retrieve2(b.get("pageButtonGap",!0),b.get("itemGap",!0));z&&(b.get("pageButtonPosition",!0)==="end"?V[c]+=l[m]-N[m]:$[c]+=N[m]+P),V[1-c]+=O[T]/2-N[T]/2,I.attr("position",H),C.attr("position",$),h.attr("position",V);var U=(this.group.getBoundingRect(),{x:0,y:0});if(U[m]=z?l[m]:O[m],U[T]=Math.max(O[T],N[T]),U[D]=Math.min(0,N[D]+V[1-c]),C.__rectSize=l[m],z){var Y={x:0,y:0};Y[m]=Math.max(l[m]-N[m]-P,0),Y[T]=U[T],C.setClipPath(new S.Rect({shape:Y})),C.__rectSize=Y[m]}else h.eachChild(function(X){X.attr({invisible:!0,silent:!0})});var Z=this._getPageInfo(b);return Z.pageIndex!=null&&S.updateProps(I,{position:Z.contentPosition},!!z&&b),this._updatePageInfoView(b,Z),U},_pageGo:function(b,s,l){var w=this._getPageInfo(s)[b];w!=null&&l.dispatchAction({type:"legendScroll",scrollDataIndex:w,legendId:s.id})},_updatePageInfoView:function(b,s){var l=this._controllerGroup;o.each(["pagePrev","pageNext"],function(m){var T=s[m+"DataIndex"]!=null,D=l.childOfName(m);D&&(D.setStyle("fill",T?b.get("pageIconColor",!0):b.get("pageIconInactiveColor",!0)),D.cursor=T?"pointer":"default")});var w=l.childOfName("pageText"),I=b.get("pageFormatter"),C=s.pageIndex,h=C!=null?C+1:0,c=s.pageCount;w&&I&&w.setStyle("text",o.isString(I)?I.replace("{current}",h).replace("{total}",c):I({current:h,total:c}))},_getPageInfo:function(b){var s=b.get("scrollDataIndex",!0),l=this.getContentGroup(),w=this._containerGroup.__rectSize,I=b.getOrient().index,C=y[I],h=d[I],c=this._findTargetItemIndex(s),m=l.children(),T=m[c],D=m.length,O=+!!D,N={contentPosition:l.position.slice(),pageCount:O,pageIndex:O-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!T)return N;var z=U(T);N.contentPosition[I]=-z.s;for(var H=c+1,$=z,V=z,P=null;H<=D;++H)(!(P=U(m[H]))&&V.e>$.s+w||P&&!Y(P,$.s))&&($=V.i>$.i?V:P)&&(N.pageNextDataIndex==null&&(N.pageNextDataIndex=$.i),++N.pageCount),V=P;for(var H=c-1,$=z,V=z,P=null;H>=-1;--H)(!(P=U(m[H]))||!Y(V,P.s))&&$.i<V.i&&(V=$,N.pagePrevDataIndex==null&&(N.pagePrevDataIndex=$.i),++N.pageCount,++N.pageIndex),$=P;return N;function U(Z){if(Z){var X=Z.getBoundingRect(),J=X[h]+Z.position[I];return{s:J,e:J+X[C],i:Z.__legendDataIndex}}}function Y(Z,X){return Z.e>=X&&Z.s<=X+w}},_findTargetItemIndex:function(b){var s,l=this.getContentGroup();return this._showController?l.eachChild(function(w,I){w.__legendDataIndex===b&&(s=I)}):s=0,s}});E.exports=v},32603:function(E,A,u){var o=u(87930),S=u(23405);function _(p,f,y){var d,v={},b=p==="toggleSelected";return y.eachComponent("legend",function(s){b&&d!=null?s[d?"select":"unSelect"](f.name):(s[p](f.name),d=s.isSelected(f.name));var l=s.getData();S.each(l,function(w){var I=w.get("name");if(I!==`
`&&I!==""){var C=s.isSelected(I);v.hasOwnProperty(I)?v[I]=v[I]&&C:v[I]=C}})}),{name:f.name,selected:v}}o.registerAction("legendToggleSelect","legendselectchanged",S.curry(_,"toggleSelected")),o.registerAction("legendSelect","legendselected",S.curry(_,"select")),o.registerAction("legendUnSelect","legendunselected",S.curry(_,"unSelect"))},4963:function(E){E.exports=function(A){var u=A.findComponents({mainType:"legend"});u&&u.length&&A.filterSeries(function(o){for(var S=0;S<u.length;S++)if(!u[S].isSelected(o.name))return!1;return!0})}},18644:function(E,A,u){u(87930).registerAction("legendScroll","legendscroll",function(o,S){var _=o.scrollDataIndex;_!=null&&S.eachComponent({mainType:"legend",subType:"scroll",query:o},function(p){p.setScrollDataIndex(_)})})},28838:function(E,A,u){u(72498),u(37309),u(78553),u(18644)},84290:function(E,A,u){var o=u(87930);u(27243),u(5338),o.registerPreprocessor(function(S){S.markArea=S.markArea||{}})},36570:function(E,A,u){var o=u(87930);u(58535),u(27808),o.registerPreprocessor(function(S){S.markLine=S.markLine||{}})},20361:function(E,A,u){var o=u(87930);u(50263),u(2695),o.registerPreprocessor(function(S){S.markPoint=S.markPoint||{}})},27243:function(E,A,u){E.exports=u(83296).extend({type:"markArea",defaultOption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}}})},5338:function(E,A,u){var o=u(23405),S=u(86049),_=u(80023),p=u(54684),f=u(51747),y=u(2733),d=u(13639),v=function(C,h,c,m){var T=y.dataTransform(C,m[0]),D=y.dataTransform(C,m[1]),O=o.retrieve,N=T.coord,z=D.coord;N[0]=O(N[0],-1/0),N[1]=O(N[1],-1/0),z[0]=O(z[0],1/0),z[1]=O(z[1],1/0);var H=o.mergeAll([{},T,D]);return H.coord=[T.coord,D.coord],H.x0=T.x,H.y0=T.y,H.x1=D.x,H.y1=D.y,H};function b(C){return!isNaN(C)&&!isFinite(C)}function s(C,h,c,m){var T=1-C;return b(h[T])&&b(c[T])}function l(C,h){var c=h.coord[0],m=h.coord[1];return!!(C.type==="cartesian2d"&&c&&m&&(s(1,c,m)||s(0,c,m)))||y.dataFilter(C,{coord:c,x:h.x0,y:h.y0})||y.dataFilter(C,{coord:m,x:h.x1,y:h.y1})}function w(C,h,c,m,T){var D,O=m.coordinateSystem,N=C.getItemModel(h),z=p.parsePercent(N.get(c[0]),T.getWidth()),H=p.parsePercent(N.get(c[1]),T.getHeight());if(isNaN(z)||isNaN(H)){if(m.getMarkerPosition)D=m.getMarkerPosition(C.getValues(c,h));else{var $=C.get(c[0],h),V=C.get(c[1],h),P=[$,V];O.clampData&&O.clampData(P,P),D=O.dataToPoint(P,!0)}if(O.type==="cartesian2d"){var U=O.getAxis("x"),Y=O.getAxis("y"),$=C.get(c[0],h),V=C.get(c[1],h);b($)?D[0]=U.toGlobalCoord(U.getExtent()[+(c[0]!=="x0")]):b(V)&&(D[1]=Y.toGlobalCoord(Y.getExtent()[+(c[1]!=="y0")]))}isNaN(z)||(D[0]=z),isNaN(H)||(D[1]=H)}else D=[z,H];return D}var I=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];d.extend({type:"markArea",updateTransform:function(C,h,c){h.eachSeries(function(m){var T=m.markAreaModel;if(T){var D=T.getData();D.each(function(O){var N=o.map(I,function(z){return w(D,O,z,m,c)});D.setItemLayout(O,N),D.getItemGraphicEl(O).setShape("points",N)})}},this)},renderSeries:function(C,h,c,m){var T,D,O,N,z,H,$,V=C.coordinateSystem,P=C.id,U=C.getData(),Y=this.markerGroupMap,Z=Y.get(P)||Y.set(P,{group:new f.Group});this.group.add(Z.group),Z.__keep=!0;var X=(T=V,D=C,O=h,T?(N=o.map(T&&T.dimensions,function(J){var q=D.getData(),te=q.getDimensionInfo(q.mapDimension(J))||{};return o.defaults({name:J},te)}),z=new _(o.map(["x0","y0","x1","y1"],function(J,q){return{name:J,type:N[q%2].type}}),O)):z=new _(N=[{name:"value",type:"float"}],O),H=o.map(O.get("data"),o.curry(v,D,T,O)),T&&(H=o.filter(H,o.curry(l,T))),$=T?function(J,q,te,re){return J.coord[Math.floor(re/2)][re%2]}:function(J){return J.value},z.initData(H,null,$),z.hasItemOption=!0,z);h.setData(X),X.each(function(J){X.setItemLayout(J,o.map(I,function(q){return w(X,J,q,C,m)})),X.setItemVisual(J,{color:U.getVisual("color")})}),X.diff(Z.__data).add(function(J){var q=new f.Polygon({shape:{points:X.getItemLayout(J)}});X.setItemGraphicEl(J,q),Z.group.add(q)}).update(function(J,q){var te=Z.__data.getItemGraphicEl(q);f.updateProps(te,{shape:{points:X.getItemLayout(J)}},h,J),Z.group.add(te),X.setItemGraphicEl(J,te)}).remove(function(J){var q=Z.__data.getItemGraphicEl(J);Z.group.remove(q)}).execute(),X.eachItemGraphicEl(function(J,q){var te=X.getItemModel(q),re=te.getModel("label"),ie=te.getModel("emphasis.label"),ne=X.getItemVisual(q,"color");J.useStyle(o.defaults(te.getModel("itemStyle").getItemStyle(),{fill:S.modifyAlpha(ne,.4),stroke:ne})),J.hoverStyle=te.getModel("emphasis.itemStyle").getItemStyle(),f.setLabelStyle(J.style,J.hoverStyle,re,ie,{labelFetcher:h,labelDataIndex:q,defaultText:X.getName(q)||"",isRectText:!0,autoColor:ne}),f.setHoverStyle(J,{}),J.dataModel=h}),Z.__data=X,Z.group.silent=h.get("silent")||C.get("silent")}})},58535:function(E,A,u){E.exports=u(83296).extend({type:"markLine",defaultOption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end"},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"}})},27808:function(E,A,u){var o=u(23405),S=u(80023),_=u(54684),p=u(2733),f=u(61880),y=u(13639),d=function(w,I,C,h){var c=w.getData(),m=h.type;if(!o.isArray(h)&&(m==="min"||m==="max"||m==="average"||m==="median"||h.xAxis!=null||h.yAxis!=null)){if(h.yAxis!=null||h.xAxis!=null)T=h.yAxis!=null?"y":"x",I.getAxis(T),D=o.retrieve(h.yAxis,h.xAxis);else{var T,D,O=p.getAxisInfo(h,c,I,w);T=O.valueDataDim,O.valueAxis,D=p.numCalculate(c,T,m)}var N=+(T!=="x"),z=1-N,H=o.clone(h),$={};H.type=null,H.coord=[],$.coord=[],H.coord[z]=-1/0,$.coord[z]=1/0;var V=C.get("precision");V>=0&&typeof D=="number"&&(D=+D.toFixed(Math.min(V,20))),H.coord[N]=$.coord[N]=D,h=[H,$,{type:m,valueIndex:h.valueIndex,value:D}]}return(h=[p.dataTransform(w,h[0]),p.dataTransform(w,h[1]),o.extend({},h[2])])[2].type=h[2].type||"",o.merge(h[2],h[0]),o.merge(h[2],h[1]),h};function v(w){return!isNaN(w)&&!isFinite(w)}function b(w,I,C,h){var c=1-w,m=h.dimensions[w];return v(I[c])&&v(C[c])&&I[w]===C[w]&&h.getAxis(m).containData(I[w])}function s(w,I){if(w.type==="cartesian2d"){var C=I[0].coord,h=I[1].coord;if(C&&h&&(b(1,C,h,w)||b(0,C,h,w)))return!0}return p.dataFilter(w,I[0])&&p.dataFilter(w,I[1])}function l(w,I,C,h,c){var m,T=h.coordinateSystem,D=w.getItemModel(I),O=_.parsePercent(D.get("x"),c.getWidth()),N=_.parsePercent(D.get("y"),c.getHeight());if(isNaN(O)||isNaN(N)){if(h.getMarkerPosition)m=h.getMarkerPosition(w.getValues(w.dimensions,I));else{var z=T.dimensions,H=w.get(z[0],I),$=w.get(z[1],I);m=T.dataToPoint([H,$])}if(T.type==="cartesian2d"){var V=T.getAxis("x"),P=T.getAxis("y"),z=T.dimensions;v(w.get(z[0],I))?m[0]=V.toGlobalCoord(V.getExtent()[+!C]):v(w.get(z[1],I))&&(m[1]=P.toGlobalCoord(P.getExtent()[+!C]))}isNaN(O)||(m[0]=O),isNaN(N)||(m[1]=N)}else m=[O,N];w.setItemLayout(I,m)}E.exports=y.extend({type:"markLine",updateTransform:function(w,I,C){I.eachSeries(function(h){var c=h.markLineModel;if(c){var m=c.getData(),T=c.__from,D=c.__to;T.each(function(O){l(T,O,!0,h,C),l(D,O,!1,h,C)}),m.each(function(O){m.setItemLayout(O,[T.getItemLayout(O),D.getItemLayout(O)])}),this.markerGroupMap.get(h.id).updateLayout()}},this)},renderSeries:function(w,I,C,h){var c,m,T,D,O,N,z,H,$,V=w.coordinateSystem,P=w.id,U=w.getData(),Y=this.markerGroupMap,Z=Y.get(P)||Y.set(P,new f);this.group.add(Z.group);var X=(c=V,m=w,T=I,O=new S(D=c?o.map(c&&c.dimensions,function(le){var fe=m.getData().getDimensionInfo(m.getData().mapDimension(le))||{};return o.defaults({name:le},fe)}):[{name:"value",type:"float"}],T),N=new S(D,T),z=new S([],T),H=o.map(T.get("data"),o.curry(d,m,c,T)),c&&(H=o.filter(H,o.curry(s,c))),$=c?p.dimValueGetter:function(le){return le.value},O.initData(o.map(H,function(le){return le[0]}),null,$),N.initData(o.map(H,function(le){return le[1]}),null,$),z.initData(o.map(H,function(le){return le[2]})),z.hasItemOption=!0,{from:O,to:N,line:z}),J=X.from,q=X.to,te=X.line;I.__from=J,I.__to=q,I.setData(te);var re=I.get("symbol"),ie=I.get("symbolSize");function ne(le,fe,we){var pe=le.getItemModel(fe);l(le,fe,we,w,h),le.setItemVisual(fe,{symbolSize:pe.get("symbolSize")||ie[+!we],symbol:pe.get("symbol",!0)||re[+!we],color:pe.get("itemStyle.color")||U.getVisual("color")})}o.isArray(re)||(re=[re,re]),typeof ie=="number"&&(ie=[ie,ie]),X.from.each(function(le){ne(J,le,!0),ne(q,le,!1)}),te.each(function(le){var fe=te.getItemModel(le).get("lineStyle.color");te.setItemVisual(le,{color:fe||J.getItemVisual(le,"color")}),te.setItemLayout(le,[J.getItemLayout(le),q.getItemLayout(le)]),te.setItemVisual(le,{fromSymbolSize:J.getItemVisual(le,"symbolSize"),fromSymbol:J.getItemVisual(le,"symbol"),toSymbolSize:q.getItemVisual(le,"symbolSize"),toSymbol:q.getItemVisual(le,"symbol")})}),Z.updateData(te),X.line.eachItemGraphicEl(function(le,fe){le.traverse(function(we){we.dataModel=I})}),Z.__keep=!0,Z.group.silent=I.get("silent")||w.get("silent")}})},50263:function(E,A,u){E.exports=u(83296).extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}}})},2695:function(E,A,u){var o=u(23405),S=u(83522),_=u(54684),p=u(80023),f=u(2733);function y(d,v,b){var s=v.coordinateSystem;d.each(function(l){var w,I=d.getItemModel(l),C=_.parsePercent(I.get("x"),b.getWidth()),h=_.parsePercent(I.get("y"),b.getHeight());if(isNaN(C)||isNaN(h)){if(v.getMarkerPosition)w=v.getMarkerPosition(d.getValues(d.dimensions,l));else if(s){var c=d.get(s.dimensions[0],l),m=d.get(s.dimensions[1],l);w=s.dataToPoint([c,m])}}else w=[C,h];isNaN(C)||(w[0]=C),isNaN(h)||(w[1]=h),d.setItemLayout(l,w)})}E.exports=u(13639).extend({type:"markPoint",updateTransform:function(d,v,b){v.eachSeries(function(s){var l=s.markPointModel;l&&(y(l.getData(),s,b),this.markerGroupMap.get(s.id).updateLayout(l))},this)},renderSeries:function(d,v,b,s){var l,w,I,C,h,c=d.coordinateSystem,m=d.id,T=d.getData(),D=this.markerGroupMap,O=D.get(m)||D.set(m,new S),N=(l=c,w=d,I=v,C=new p(l?o.map(l&&l.dimensions,function(z){var H=w.getData().getDimensionInfo(w.getData().mapDimension(z))||{};return o.defaults({name:z},H)}):[{name:"value",type:"float"}],I),h=o.map(I.get("data"),o.curry(f.dataTransform,w)),l&&(h=o.filter(h,o.curry(f.dataFilter,l))),C.initData(h,null,l?f.dimValueGetter:function(z){return z.value}),C);v.setData(N),y(v.getData(),d,s),N.each(function(z){var H=N.getItemModel(z),$=H.getShallow("symbolSize");typeof $=="function"&&($=$(v.getRawValue(z),v.getDataParams(z))),N.setItemVisual(z,{symbolSize:$,color:H.get("itemStyle.color")||T.getVisual("color"),symbol:H.getShallow("symbol")})}),O.updateData(N),this.group.add(O.group),N.eachItemGraphicEl(function(z){z.traverse(function(H){H.dataModel=v})}),O.__keep=!0,O.group.silent=v.get("silent")||d.get("silent")}})},83296:function(E,A,u){u(9129).__DEV__;var o=u(87930),S=u(23405),_=u(23584),p=u(51064),f=u(60653),y=u(62369),d=f.addCommas,v=f.encodeHTML;function b(l){p.defaultEmphasis(l,"label",["show"])}var s=o.extendComponentModel({type:"marker",dependencies:["series","grid","polar","geo"],init:function(l,w,I,C){this.mergeDefaultAndTheme(l,I),this.mergeOption(l,I,C.createdBySelf,!0)},isAnimationEnabled:function(){if(_.node)return!1;var l=this.__hostSeries;return this.getShallow("animation")&&l&&l.isAnimationEnabled()},mergeOption:function(l,w,I,C){var h=this.constructor,c=this.mainType+"Model";I||w.eachSeries(function(m){var T=m.get(this.mainType,!0),D=m[c];if(!T||!T.data){m[c]=null;return}D?D.mergeOption(T,w,!0):(C&&b(T),S.each(T.data,function(O){O instanceof Array?(b(O[0]),b(O[1])):b(O)}),D=new h(T,this,w),S.extend(D,{mainType:this.mainType,seriesIndex:m.seriesIndex,name:m.name,createdBySelf:!0}),D.__hostSeries=m),m[c]=D},this)},formatTooltip:function(l){var w=this.getData(),I=this.getRawValue(l),C=S.isArray(I)?S.map(I,d).join(", "):d(I),h=w.getName(l),c=v(this.name);return(I!=null||h)&&(c+="<br />"),h&&(c+=v(h),I!=null&&(c+=" : ")),I!=null&&(c+=v(C)),c},getData:function(){return this._data},setData:function(l){this._data=l}});S.mixin(s,y),E.exports=s},13639:function(E,A,u){var o=u(87930),S=u(23405);E.exports=o.extendComponentView({type:"marker",init:function(){this.markerGroupMap=S.createHashMap()},render:function(_,p,f){var y=this.markerGroupMap;y.each(function(v){v.__keep=!1});var d=this.type+"Model";p.eachSeries(function(v){var b=v[d];b&&this.renderSeries(v,b,p,f)},this),y.each(function(v){v.__keep||this.group.remove(v.group)},this)},renderSeries:function(){}})},2733:function(E,A,u){var o=u(23405),S=u(54684),_=u(91968).isDimensionStacked,p=o.indexOf;function f(s,l,w,I,C,h){var c=[],m=_(l,I)?l.getCalculationInfo("stackResultDimension"):I,T=b(l,m,s),D=l.indicesOfNearest(m,T)[0];c[C]=l.get(w,D),c[h]=l.get(I,D);var O=S.getPrecision(l.get(I,D));return(O=Math.min(O,20))>=0&&(c[h]=+c[h].toFixed(O)),c}var y=o.curry,d={min:y(f,"min"),max:y(f,"max"),average:y(f,"average")};function v(s,l,w,I){var C={};return s.valueIndex!=null||s.valueDim!=null?(C.valueDataDim=s.valueIndex!=null?l.getDimension(s.valueIndex):s.valueDim,C.valueAxis=w.getAxis(function(h,c){var m=h.getData(),T=m.dimensions;c=m.getDimension(c);for(var D=0;D<T.length;D++){var O=m.getDimensionInfo(T[D]);if(O.name===c)return O.coordDim}}(I,C.valueDataDim)),C.baseAxis=w.getOtherAxis(C.valueAxis),C.baseDataDim=l.mapDimension(C.baseAxis.dim)):(C.baseAxis=I.getBaseAxis(),C.valueAxis=w.getOtherAxis(C.baseAxis),C.baseDataDim=l.mapDimension(C.baseAxis.dim),C.valueDataDim=l.mapDimension(C.valueAxis.dim)),C}function b(s,l,w){if(w==="average"){var I=0,C=0;return s.each(l,function(h,c){!isNaN(h)&&(I+=h,C++)}),I/C}return w==="median"?s.getMedian(l):s.getDataExtent(l,!0)[+(w==="max")]}A.dataTransform=function(s,l){var w,I=s.getData(),C=s.coordinateSystem;if(l&&!(!isNaN(parseFloat((w=l).x))&&!isNaN(parseFloat(w.y)))&&!o.isArray(l.coord)&&C){var h=C.dimensions,c=v(l,I,C,s);if((l=o.clone(l)).type&&d[l.type]&&c.baseAxis&&c.valueAxis){var m=p(h,c.baseAxis.dim),T=p(h,c.valueAxis.dim);l.coord=d[l.type](I,c.baseDataDim,c.valueDataDim,m,T),l.value=l.coord[T]}else{for(var D=[l.xAxis!=null?l.xAxis:l.radiusAxis,l.yAxis!=null?l.yAxis:l.angleAxis],O=0;O<2;O++)d[D[O]]&&(D[O]=b(I,I.mapDimension(h[O]),D[O]));l.coord=D}}return l},A.getAxisInfo=v,A.dataFilter=function(s,l){return!s||!s.containData||!l.coord||!(isNaN(parseFloat(l.x))&&isNaN(parseFloat(l.y)))||s.containData(l.coord)},A.dimValueGetter=function(s,l,w,I){return I<2?s.coord&&s.coord[I]:s.value},A.numCalculate=b},52420:function(E,A,u){var o=u(87930),S=u(23405),_=u(94127),p=u(71642);u(20694),u(97421),u(93592),o.extendComponentView({type:"parallel",render:function(d,v,b){this._model=d,this._api=b,this._handlers||(this._handlers={},S.each(f,function(s,l){b.getZr().on(l,this._handlers[l]=S.bind(s,this))},this)),_.createOrUpdate(this,"_throttledDispatchExpand",d.get("axisExpandRate"),"fixRate")},dispose:function(d,v){S.each(this._handlers,function(b,s){v.getZr().off(s,b)}),this._handlers=null},_throttledDispatchExpand:function(d){this._dispatchExpand(d)},_dispatchExpand:function(d){d&&this._api.dispatchAction(S.extend({type:"parallelAxisExpand"},d))}});var f={mousedown:function(d){y(this,"click")&&(this._mouseDownPoint=[d.offsetX,d.offsetY])},mouseup:function(d){var v=this._mouseDownPoint;if(y(this,"click")&&v){var b=[d.offsetX,d.offsetY];if(Math.pow(v[0]-b[0],2)+Math.pow(v[1]-b[1],2)>5)return;var s=this._model.coordinateSystem.getSlidedAxisExpandWindow([d.offsetX,d.offsetY]);s.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:s.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(d){if(!this._mouseDownPoint&&y(this,"mousemove")){var v=this._model,b=v.coordinateSystem.getSlidedAxisExpandWindow([d.offsetX,d.offsetY]),s=b.behavior;s==="jump"&&this._throttledDispatchExpand.debounceNextCall(v.get("axisExpandDebounce")),this._throttledDispatchExpand(s==="none"?null:{axisExpandWindow:b.axisExpandWindow,animation:s==="jump"&&null})}}};function y(d,v){var b=d._model;return b.get("axisExpandable")&&b.get("axisExpandTriggerOn")===v}o.registerPreprocessor(p)},93592:function(E,A,u){u(20694),u(86997),u(94013)},30196:function(E,A,u){var o=u(87930),S=u(23405),_=u(63764);u(27246),u(90190),u(10802),u(81819),u(73005),o.registerLayout(S.curry(_,"bar")),o.extendComponentView({type:"polar"})},27614:function(E,A,u){u(6717),u(87775),u(91060)},91060:function(E,A,u){u(9129).__DEV__;var o=u(87930),S=u(23405),_=u(88010),p=u(51747),f=["axisLine","axisTickLabel","axisName"];E.exports=o.extendComponentView({type:"radar",render:function(y,d,v){this.group.removeAll(),this._buildAxes(y),this._buildSplitLineAndArea(y)},_buildAxes:function(y){var d=y.coordinateSystem,v=d.getIndicatorAxes(),b=S.map(v,function(s){return new _(s.model,{position:[d.cx,d.cy],rotation:s.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})});S.each(b,function(s){S.each(f,s.add,s),this.group.add(s.getGroup())},this)},_buildSplitLineAndArea:function(y){var d=y.coordinateSystem,v=d.getIndicatorAxes();if(v.length){var b=y.get("shape"),s=y.getModel("splitLine"),l=y.getModel("splitArea"),w=s.getModel("lineStyle"),I=l.getModel("areaStyle"),C=s.get("show"),h=l.get("show"),c=w.get("color"),m=I.get("color");c=S.isArray(c)?c:[c],m=S.isArray(m)?m:[m];var T=[],D=[];if(b==="circle")for(var O=v[0].getTicksCoords(),N=d.cx,z=d.cy,H=0;H<O.length;H++){if(C){var $=q(T,c,H);T[$].push(new p.Circle({shape:{cx:N,cy:z,r:O[H].coord}}))}if(h&&H<O.length-1){var $=q(D,m,H);D[$].push(new p.Ring({shape:{cx:N,cy:z,r0:O[H].coord,r:O[H+1].coord}}))}}else for(var V,P=S.map(v,function(re,ie){var ne=re.getTicksCoords();return V=V==null?ne.length-1:Math.min(ne.length-1,V),S.map(ne,function(le){return d.coordToPoint(le.coord,ie)})}),U=[],H=0;H<=V;H++){for(var Y=[],Z=0;Z<v.length;Z++)Y.push(P[Z][H]);if(Y[0]&&Y.push(Y[0].slice()),C){var $=q(T,c,H);T[$].push(new p.Polyline({shape:{points:Y}}))}if(h&&U){var $=q(D,m,H-1);D[$].push(new p.Polygon({shape:{points:Y.concat(U)}}))}U=Y.slice().reverse()}var X=w.getLineStyle(),J=I.getAreaStyle();S.each(D,function(te,re){this.group.add(p.mergePath(te,{style:S.defaults({stroke:"none",fill:m[re%m.length]},J),silent:!0}))},this),S.each(T,function(te,re){this.group.add(p.mergePath(te,{style:S.defaults({fill:"none",stroke:c[re%c.length]},X),silent:!0}))},this)}function q(te,re,ie){var ne=ie%re.length;return te[ne]=te[ne]||[],ne}}})},10802:function(E,A,u){u(27246),u(34848)},11818:function(E,A,u){var o=u(87930);u(42200),u(67559),u(27252),u(81819),u(48102),o.extendComponentView({type:"single"})},56910:function(E,A,u){var o=u(87930),S=u(25203);u(32344),u(26828),u(4228),u(3120),o.registerPreprocessor(S)},4228:function(E,A,u){var o=u(23405),S=u(67091),_=u(62369),p=S.extend({type:"timeline.slider",defaultOption:{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"emptyCircle",symbolSize:10,lineStyle:{show:!0,width:2,color:"#304654"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#304654"},itemStyle:{color:"#304654",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:13,color:"#c23531",borderWidth:5,borderColor:"rgba(194,53,49, 0.5)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:22,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"path://M18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7L18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1L19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8C18.4,51.2,18.5,51,18.6,50.8z",prevIcon:"path://M43,52.8L20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7L42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3L18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1L41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8C43.2,53.2,43.1,53,43,52.8z",color:"#304654",borderColor:"#304654",borderWidth:1},emphasis:{label:{show:!0,color:"#c23531"},itemStyle:{color:"#c23531"},controlStyle:{color:"#c23531",borderColor:"#c23531",borderWidth:2}},data:[]}});o.mixin(p,_),E.exports=p},3120:function(E,A,u){var o=u(23405),S=u(28761),_=u(79442),p=u(51747),f=u(62751),y=u(2163),d=u(84616),v=u(30696).createSymbol,b=u(51261),s=u(54684),l=u(60653).encodeHTML,w=o.bind,I=o.each,C=Math.PI;function h(m,T,D,O,N,z){var H=T.get("color");N?(N.setColor(H),D.add(N),z&&z.onUpdate(N)):((N=v(m.get("symbol"),-1,-1,2,2,H)).setStyle("strokeNoScale",!0),D.add(N),z&&z.onCreate(N));var $=T.getItemStyle(["color","symbol","symbolSize"]);N.setStyle($),O=o.merge({rectHover:!0,z2:100},O,!0);var V=m.get("symbolSize");V=V instanceof Array?V.slice():[+V,+V],V[0]/=2,V[1]/=2,O.scale=V;var P=m.get("symbolOffset");if(P){var U=O.position=O.position||[0,0];U[0]+=s.parsePercent(P[0],V[0]),U[1]+=s.parsePercent(P[1],V[1])}var Y=m.get("symbolRotate");return O.rotation=(Y||0)*Math.PI/180||0,N.attr(O),N.updateTransform(),N}function c(m,T,D,O,N){if(!m.dragging){var z=O.getModel("checkpointStyle"),H=D.dataToCoord(O.getData().get(["value"],T));N||!z.get("animation",!0)?m.attr({position:[H,0]}):(m.stopAnimation(!0),m.animateTo({position:[H,0]},z.get("animationDuration",!0),z.get("animationEasing",!0)))}}E.exports=y.extend({type:"timeline.slider",init:function(m,T){this.api=T,this._axis,this._viewRect,this._timer,this._currentPointer,this._mainGroup,this._labelGroup},render:function(m,T,D,O){if(this.model=m,this.api=D,this.ecModel=T,this.group.removeAll(),m.get("show",!0)){var N=this._layout(m,D),z=this._createGroup("mainGroup"),H=this._createGroup("labelGroup"),$=this._axis=this._createAxis(N,m);m.formatTooltip=function(V){return l($.scale.getLabel(V))},I(["AxisLine","AxisTick","Control","CurrentPointer"],function(V){this["_render"+V](N,z,$,m)},this),this._renderAxisLabel(N,H,$,m),this._position(N,m)}this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(m,T){var D,O,N,z,H,$,V=m.get("label.position"),P=m.get("orient"),U=(D=m,O=T,f.getLayoutRect(D.getBoxLayoutParams(),{width:O.getWidth(),height:O.getHeight()},D.get("padding")));V==null||V==="auto"?V=P==="horizontal"?U.y+U.height/2<T.getHeight()/2?"-":"+":U.x+U.width/2<T.getWidth()/2?"+":"-":isNaN(V)&&(V={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[P][V]);var Y={horizontal:"center",vertical:V>=0||V==="+"?"left":"right"},Z={horizontal:V>=0||V==="+"?"top":"bottom",vertical:"middle"},X=P==="vertical"?U.height:U.width,J=m.getModel("controlStyle"),q=J.get("show",!0),te=q?J.get("itemSize"):0,re=q?J.get("itemGap"):0,ie=te+re,ne=m.get("label.rotate")||0;ne=ne*C/180;var le=J.get("position",!0),fe=q&&J.get("showPlayBtn",!0),we=q&&J.get("showPrevBtn",!0),pe=q&&J.get("showNextBtn",!0),ve=0,be=X;return le==="left"||le==="bottom"?(fe&&(N=[0,0],ve+=ie),we&&(z=[ve,0],ve+=ie)):(fe&&(N=[be-te,0],be-=ie),we&&(z=[0,0],ve+=ie)),pe&&(H=[be-te,0],be-=ie),$=[ve,be],m.get("inverse")&&$.reverse(),{viewRect:U,mainLength:X,orient:P,rotation:{horizontal:0,vertical:C/2}[P],labelRotation:ne,labelPosOpt:V,labelAlign:m.get("label.align")||Y[P],labelBaseline:m.get("label.verticalAlign")||m.get("label.baseline")||Z[P],playPosition:N,prevBtnPosition:z,nextBtnPosition:H,axisExtent:$,controlSize:te,controlGap:re}},_position:function(m,T){var D=this._mainGroup,O=this._labelGroup,N=m.viewRect;if(m.orient==="vertical"){var z=_.create(),H=N.x,$=N.y+N.height;_.translate(z,z,[-H,-$]),_.rotate(z,z,-C/2),_.translate(z,z,[H,$]),(N=N.clone()).applyTransform(z)}var V=te(N),P=te(D.getBoundingRect()),U=te(O.getBoundingRect()),Y=D.position,Z=O.position;Z[0]=Y[0]=V[0][0];var X=m.labelPosOpt;if(isNaN(X)){var J=+(X!=="+");re(Y,P,V,1,J),re(Z,U,V,1,1-J)}else{var J=X>=0?0:1;re(Y,P,V,1,J),Z[1]=Y[1]+X}function q(ie){var ne=ie.position;ie.origin=[V[0][0]-ne[0],V[1][0]-ne[1]]}function te(ie){return[[ie.x,ie.x+ie.width],[ie.y,ie.y+ie.height]]}function re(ie,ne,le,fe,we){ie[fe]+=le[fe][we]-ne[fe][we]}D.attr("position",Y),O.attr("position",Z),D.rotation=O.rotation=m.rotation,q(D),q(O)},_createAxis:function(m,T){var D=T.getData(),O=T.get("axisType"),N=b.createScaleByModel(T,O);N.getTicks=function(){return D.mapArray(["value"],function($){return $})};var z=D.getDataExtent("value");N.setExtent(z[0],z[1]),N.niceTicks();var H=new d("value",N,m.axisExtent,O);return H.model=T,H},_createGroup:function(m){var T=this["_"+m]=new p.Group;return this.group.add(T),T},_renderAxisLine:function(m,T,D,O){var N=D.getExtent();O.get("lineStyle.show")&&T.add(new p.Line({shape:{x1:N[0],y1:0,x2:N[1],y2:0},style:o.extend({lineCap:"round"},O.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(m,T,D,O){var N=O.getData();I(D.scale.getTicks(),function(z){var H=D.dataToCoord(z),$=N.getItemModel(z),V=$.getModel("itemStyle"),P=$.getModel("emphasis.itemStyle"),U=h($,V,T,{position:[H,0],onclick:w(this._changeTimeline,this,z)});p.setHoverStyle(U,P.getItemStyle()),$.get("tooltip")?(U.dataIndex=z,U.dataModel=O):U.dataIndex=U.dataModel=null},this)},_renderAxisLabel:function(m,T,D,O){if(D.getLabelModel().get("show")){var N=O.getData();I(D.getViewLabels(),function(z){var H=z.tickValue,$=N.getItemModel(H),V=$.getModel("label"),P=$.getModel("emphasis.label"),U=D.dataToCoord(z.tickValue),Y=new p.Text({position:[U,0],rotation:m.labelRotation-m.rotation,onclick:w(this._changeTimeline,this,H),silent:!1});p.setTextStyle(Y.style,V,{text:z.formattedLabel,textAlign:m.labelAlign,textVerticalAlign:m.labelBaseline}),T.add(Y),p.setHoverStyle(Y,p.setTextStyle({},P))},this)}},_renderControl:function(m,T,D,O){var N=m.controlSize,z=m.rotation,H=O.getModel("controlStyle").getItemStyle(),$=O.getModel("emphasis.controlStyle").getItemStyle(),V=[0,-N/2,N,N],P=O.getPlayState(),U=O.get("inverse",!0);function Y(Z,X,J,q){if(Z){var te,re,ie,ne,le=(te=O,re=X,ie=V,ne={position:Z,origin:[N/2,0],rotation:q?-z:0,rectHover:!0,style:H,onclick:J},p.makePath(te.get(re).replace(/^path:\/\//,""),o.clone(ne||{}),new S(ie[0],ie[1],ie[2],ie[3]),"center"));T.add(le),p.setHoverStyle(le,$)}}Y(m.nextBtnPosition,"controlStyle.nextIcon",w(this._changeTimeline,this,U?"-":"+")),Y(m.prevBtnPosition,"controlStyle.prevIcon",w(this._changeTimeline,this,U?"+":"-")),Y(m.playPosition,"controlStyle."+(P?"stopIcon":"playIcon"),w(this._handlePlayClick,this,!P),!0)},_renderCurrentPointer:function(m,T,D,O){var N=O.getData(),z=O.getCurrentIndex(),H=N.getItemModel(z).getModel("checkpointStyle"),$=this;this._currentPointer=h(H,H,this._mainGroup,{},this._currentPointer,{onCreate:function(V){V.draggable=!0,V.drift=w($._handlePointerDrag,$),V.ondragend=w($._handlePointerDragend,$),c(V,z,D,O,!0)},onUpdate:function(V){c(V,z,D,O)}})},_handlePlayClick:function(m){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:m,from:this.uid})},_handlePointerDrag:function(m,T,D){this._clearTimer(),this._pointerChangeTimeline([D.offsetX,D.offsetY])},_handlePointerDragend:function(m){this._pointerChangeTimeline([m.offsetX,m.offsetY],!0)},_pointerChangeTimeline:function(m,T){var D=this._toAxisCoord(m)[0],O=this._axis,N=s.asc(O.getExtent().slice());D>N[1]&&(D=N[1]),D<N[0]&&(D=N[0]),this._currentPointer.position[0]=D,this._currentPointer.dirty();var z=this._findNearestTick(D),H=this.model;(T||z!==H.getCurrentIndex()&&H.get("realtime"))&&this._changeTimeline(z)},_doPlayStop:function(){this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(w(function(){var m=this.model;this._changeTimeline(m.getCurrentIndex()+(m.get("rewind",!0)?-1:1))},this),this.model.get("playInterval")))},_toAxisCoord:function(m){var T=this._mainGroup.getLocalTransform();return p.applyTransform(m,T,!0)},_findNearestTick:function(m){var T,D=this.model.getData(),O=1/0,N=this._axis;return D.each(["value"],function(z,H){var $=Math.abs(N.dataToCoord(z)-m);$<O&&(O=$,T=H)}),T},_clearTimer:function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},_changeTimeline:function(m){var T=this.model.getCurrentIndex();m==="+"?m=T+1:m==="-"&&(m=T-1),this.api.dispatchAction({type:"timelineChange",currentIndex:m,from:this.uid})}})},84616:function(E,A,u){var o=u(23405),S=u(7371),_=function(p,f,y,d){S.call(this,p,f,y),this.type=d||"value",this.model=null};_.prototype={constructor:_,getLabelModel:function(){return this.model.getModel("label")},isHorizontal:function(){return this.model.get("orient")==="horizontal"}},o.inherits(_,S),E.exports=_},67091:function(E,A,u){var o=u(23405),S=u(28628),_=u(80023),p=u(51064),f=S.extend({type:"timeline",layoutMode:"box",defaultOption:{zlevel:0,z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},init:function(y,d,v){this._data,this._names,this.mergeDefaultAndTheme(y,v),this._initData()},mergeOption:function(y){f.superApply(this,"mergeOption",arguments),this._initData()},setCurrentIndex:function(y){y==null&&(y=this.option.currentIndex);var d=this._data.count();this.option.loop?y=(y%d+d)%d:(y>=d&&(y=d-1),y<0&&(y=0)),this.option.currentIndex=y},getCurrentIndex:function(){return this.option.currentIndex},isIndexMax:function(){return this.getCurrentIndex()>=this._data.count()-1},setPlayState:function(y){this.option.autoPlay=!!y},getPlayState:function(){return!!this.option.autoPlay},_initData:function(){var y=this.option,d=y.data||[],v=y.axisType,b=this._names=[];if(v==="category"){var s=[];o.each(d,function(l,w){var I,C=p.getDataItemValue(l);o.isObject(l)?(I=o.clone(l)).value=w:I=w,s.push(I),!o.isString(C)&&(C==null||isNaN(C))&&(C=""),b.push(C+"")}),d=s}(this._data=new _([{name:"value",type:{category:"ordinal",time:"time"}[v]||"number"}],this)).initData(d,b)},getData:function(){return this._data},getCategories:function(){if(this.get("axisType")==="category")return this._names.slice()}});E.exports=f},2163:function(E,A,u){E.exports=u(44152).extend({type:"timeline"})},25203:function(E,A,u){var o=u(23405);function S(p){var f=p.itemStyle||(p.itemStyle={}),y=f.emphasis||(f.emphasis={}),d=p.label||p.label||{},v=d.normal||(d.normal={}),b={normal:1,emphasis:1};o.each(d,function(s,l){b[l]||_(v,l)||(v[l]=s)}),y.label&&!_(d,"emphasis")&&(d.emphasis=y.label,delete y.label)}function _(p,f){return p.hasOwnProperty(f)}E.exports=function(p){var f=p&&p.timeline;o.isArray(f)||(f=f?[f]:[]),o.each(f,function(y){y&&function(d){var v=d.type,b={number:"value",time:"time"};if(b[v]&&(d.axisType=b[v],delete d.type),S(d),_(d,"controlPosition")){var s=d.controlStyle||(d.controlStyle={});_(s,"position")||(s.position=d.controlPosition),s.position!=="none"||_(s,"show")||(s.show=!1,delete s.position),delete d.controlPosition}o.each(d.data||[],function(l){o.isObject(l)&&!o.isArray(l)&&(!_(l,"value")&&_(l,"name")&&(l.value=l.name),S(l))})}(y)})}},26828:function(E,A,u){var o=u(87930),S=u(23405);o.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(_,p){var f=p.getComponent("timeline");return f&&_.currentIndex!=null&&(f.setCurrentIndex(_.currentIndex),!f.get("loop",!0)&&f.isIndexMax()&&f.setPlayState(!1)),p.resetOption("timeline"),S.defaults({currentIndex:f.option.currentIndex},_)}),o.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(_,p){var f=p.getComponent("timeline");f&&_.playState!=null&&f.setPlayState(_.playState)})},32344:function(E,A,u){u(28628).registerSubTypeDefaulter("timeline",function(){return"slider"})},67215:function(E,A,u){var o=u(87930),S=u(51747),_=u(62751).getLayoutRect;o.extendComponentModel({type:"title",layoutMode:{type:"box",ignoreSize:!0},defaultOption:{zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}}}),o.extendComponentView({type:"title",render:function(p,f,y){if(this.group.removeAll(),p.get("show")){var d=this.group,v=p.getModel("textStyle"),b=p.getModel("subtextStyle"),s=p.get("textAlign"),l=p.get("textBaseline"),w=new S.Text({style:S.setTextStyle({},v,{text:p.get("text"),textFill:v.getTextColor()},{disableBox:!0}),z2:10}),I=w.getBoundingRect(),C=p.get("subtext"),h=new S.Text({style:S.setTextStyle({},b,{text:C,textFill:b.getTextColor(),y:I.height+p.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),c=p.get("link"),m=p.get("sublink"),T=p.get("triggerEvent",!0);w.silent=!c&&!T,h.silent=!m&&!T,c&&w.on("click",function(){window.open(c,"_"+p.get("target"))}),m&&h.on("click",function(){window.open(m,"_"+p.get("subtarget"))}),w.eventData=h.eventData=T?{componentType:"title",componentIndex:p.componentIndex}:null,d.add(w),C&&d.add(h);var D=d.getBoundingRect(),O=p.getBoxLayoutParams();O.width=D.width,O.height=D.height;var N=_(O,{width:y.getWidth(),height:y.getHeight()},p.get("padding"));s||((s=p.get("left")||p.get("right"))==="middle"&&(s="center"),s==="right"?N.x+=N.width:s==="center"&&(N.x+=N.width/2)),l||((l=p.get("top")||p.get("bottom"))==="center"&&(l="middle"),l==="bottom"?N.y+=N.height:l==="middle"&&(N.y+=N.height/2),l=l||"top"),d.attr("position",[N.x,N.y]);var z={textAlign:s,textVerticalAlign:l};w.setStyle(z),h.setStyle(z),D=d.getBoundingRect();var H=N.margin,$=p.getItemStyle(["color","opacity"]);$.fill=p.get("backgroundColor");var V=new S.Rect({shape:{x:D.x-H[3],y:D.y-H[0],width:D.width+H[1]+H[3],height:D.height+H[0]+H[2],r:p.get("borderRadius")},style:$,silent:!0});S.subPixelOptimizeRect(V),d.add(V)}}})},21836:function(E,A,u){u(67381),u(41437),u(23760),u(4990),u(48683),u(39078),u(53989)},67381:function(E,A,u){var o=u(87930),S=u(23405),_=u(31525),p=o.extendComponentModel({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},optionUpdated:function(){p.superApply(this,"optionUpdated",arguments),S.each(this.option.feature,function(f,y){var d=_.get(y);d&&S.merge(f,d.defaultOption)})},defaultOption:{show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}}}});E.exports=p},41437:function(E,A,u){var o=u(87930),S=u(23405),_=u(24570),p=u(31525),f=u(51747),y=u(46082),d=u(99018),v=u(40088);E.exports=o.extendComponentView({type:"toolbox",render:function(b,s,l,w){var I=this.group;if(I.removeAll(),b.get("show")){var C=+b.get("itemSize"),h=b.get("feature")||{},c=this._features||(this._features={}),m=[];S.each(h,function(D,O){m.push(O)}),new d(this._featureNames||[],m).add(T).update(T).remove(S.curry(T,null)).execute(),this._featureNames=m,v.layout(I,b,l),I.add(v.makeBackground(I.getBoundingRect(),b)),I.eachChild(function(D){var O=D.__title,N=D.hoverStyle;if(N&&O){var z=_.getBoundingRect(O,_.makeFont(N)),H=D.position[0]+I.position[0],$=D.position[1]+I.position[1]+C,V=!1;$+z.height>l.getHeight()&&(N.textPosition="top",V=!0);var P=V?-5-z.height:C+8;H+z.width/2>l.getWidth()?(N.textPosition=["100%",P],N.textAlign="right"):H-z.width/2<0&&(N.textPosition=[0,P],N.textAlign="left")}})}function T(D,O){var N,z=m[D],H=m[O],$=new y(h[z],b,b.ecModel);if(z&&!H){if(z.indexOf("my")===0)N={model:$,onclick:$.option.onclick,featureName:z};else{var V=p.get(z);if(!V)return;N=new V($,s,l)}c[z]=N}else{if(!(N=c[H]))return;N.model=$,N.ecModel=s,N.api=l}if(!z&&H){N.dispose&&N.dispose(s,l);return}if(!$.get("show")||N.unusable){N.remove&&N.remove(s,l);return}(function(P,U,Y){var Z=P.getModel("iconStyle"),X=P.getModel("emphasis.iconStyle"),J=U.getIcons?U.getIcons():P.get("icon"),q=P.get("title")||{};if(typeof J=="string"){var te=J,re=q;q={},(J={})[Y]=te,q[Y]=re}var ie=P.iconPaths={};S.each(J,function(ne,le){var fe=f.createIcon(ne,{},{x:-C/2,y:-C/2,width:C,height:C});fe.setStyle(Z.getItemStyle()),fe.hoverStyle=X.getItemStyle(),f.setHoverStyle(fe),b.get("showTitle")&&(fe.__title=q[le],fe.on("mouseover",function(){var we=X.getItemStyle();fe.setStyle({text:q[le],textPosition:we.textPosition||"bottom",textFill:we.fill||we.stroke||"#000",textAlign:we.textAlign||"center"})}).on("mouseout",function(){fe.setStyle({textFill:null})})),fe.trigger(P.get("iconStatus."+le)||"normal"),I.add(fe),fe.on("click",S.bind(U.onclick,U,s,l,le)),ie[le]=fe})})($,N,z),$.setIconStatus=function(P,U){var Y=this.option,Z=this.iconPaths;Y.iconStatus=Y.iconStatus||{},Y.iconStatus[P]=U,Z[P]&&Z[P].trigger(U)},N.render&&N.render($,s,l,w)}},updateView:function(b,s,l,w){S.each(this._features,function(I){I.updateView&&I.updateView(I.model,s,l,w)})},remove:function(b,s){S.each(this._features,function(l){l.remove&&l.remove(b,s)}),this.group.removeAll()},dispose:function(b,s){S.each(this._features,function(l){l.dispose&&l.dispose(b,s)})}})},21318:function(E,A,u){var o=u(23405),S=u(31525),_=u(12414).toolbox.brush;function p(y,d,v){this.model=y,this.ecModel=d,this.api=v,this._brushType,this._brushMode}p.defaultOption={show:!0,type:["rect","polygon","lineX","lineY","keep","clear"],icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:o.clone(_.title)};var f=p.prototype;f.render=f.updateView=function(y,d,v){var b,s,l;d.eachComponent({mainType:"brush"},function(w){b=w.brushType,s=w.brushOption.brushMode||"single",l|=w.areas.length}),this._brushType=b,this._brushMode=s,o.each(y.get("type",!0),function(w){y.setIconStatus(w,(w==="keep"?s==="multiple":w==="clear"?l:w===b)?"emphasis":"normal")})},f.getIcons=function(){var y=this.model,d=y.get("icon",!0),v={};return o.each(y.get("type",!0),function(b){d[b]&&(v[b]=d[b])}),v},f.onclick=function(y,d,v){var b=this._brushType,s=this._brushMode;v==="clear"?(d.dispatchAction({type:"axisAreaSelect",intervals:[]}),d.dispatchAction({type:"brush",command:"clear",areas:[]})):d.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:v==="keep"?b:b!==v&&v,brushMode:v==="keep"?s==="multiple"?"single":"multiple":s}})},S.register("brush",p),E.exports=p},48683:function(E,A,u){var o=u(87930),S=u(23405),_=u(46427),p=u(12414),f=u(31525),y=p.toolbox.dataView,d=Array(60).join("-");function v(l){return l.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var b=RegExp("[ ]+","g");function s(l){this._dom=null,this.model=l}s.defaultOption={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:S.clone(y.title),lang:S.clone(y.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},s.prototype.onclick=function(l,w){var I,C,h,c,m,T,D,O=w.getDom(),N=this.model;this._dom&&O.removeChild(this._dom);var z=document.createElement("div");z.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",z.style.backgroundColor=N.get("backgroundColor")||"#fff";var H=document.createElement("h4"),$=N.get("lang")||[];H.innerHTML=$[0]||N.get("title"),H.style.cssText="margin: 10px 20px;",H.style.color=N.get("textColor");var V=document.createElement("div"),P=document.createElement("textarea");V.style.cssText="display:block;width:100%;overflow:auto;";var U=N.get("optionToContent"),Y=N.get("contentToOption"),Z=(D=(I={},C=[],h=[],l.eachRawSeries(function(fe){var we=fe.coordinateSystem;if(we&&(we.type==="cartesian2d"||we.type==="polar")){var pe=we.getBaseAxis();if(pe.type==="category"){var ve=pe.dim+"_"+pe.index;I[ve]||(I[ve]={categoryAxis:pe,valueAxis:we.getOtherAxis(pe),series:[]},h.push({axisDim:pe.dim,axisIndex:pe.index})),I[ve].series.push(fe)}else C.push(fe)}else C.push(fe)}),{seriesGroupByCategoryAxis:I,other:C,meta:h}),{value:S.filter([(c=D.seriesGroupByCategoryAxis,m=[],S.each(c,function(fe,we){var pe=fe.categoryAxis,ve=fe.valueAxis.dim,be=[" "].concat(S.map(fe.series,function(Ie){return Ie.name})),Ee=[pe.model.getCategories()];S.each(fe.series,function(Ie){Ee.push(Ie.getRawData().mapArray(ve,function(_e){return _e}))});for(var Re=[be.join(" ")],Ne=0;Ne<Ee[0].length;Ne++){for(var Le=[],Se=0;Se<Ee.length;Se++)Le.push(Ee[Se][Ne]);Re.push(Le.join(" "))}m.push(Re.join(`
`))}),m.join(`
`+d+`
`)),(T=D.other,S.map(T,function(fe){var we=fe.getRawData(),pe=[fe.name],ve=[];return we.each(we.dimensions,function(){for(var be=arguments.length,Ee=arguments[be-1],Re=we.getName(Ee),Ne=0;Ne<be-1;Ne++)ve[Ne]=arguments[Ne];pe.push((Re?Re+" ":"")+ve.join(" "))}),pe.join(`
`)}).join(`
`+d+`
`))],function(fe){return fe.replace(/[\n\t\s]/g,"")}).join(`
`+d+`
`),meta:D.meta});if(typeof U=="function"){var X=U(w.getOption());typeof X=="string"?V.innerHTML=X:S.isDom(X)&&V.appendChild(X)}else V.appendChild(P),P.readOnly=N.get("readOnly"),P.style.cssText="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",P.style.color=N.get("textColor"),P.style.borderColor=N.get("textareaBorderColor"),P.style.backgroundColor=N.get("textareaColor"),P.value=Z.value;var J=Z.meta,q=document.createElement("div");q.style.cssText="position:absolute;bottom:0;left:0;right:0;";var te="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",re=document.createElement("div"),ie=document.createElement("div");te+=";background-color:"+N.get("buttonColor")+";color:"+N.get("buttonTextColor");var ne=this;function le(){O.removeChild(z),ne._dom=null}_.addEventListener(re,"click",le),_.addEventListener(ie,"click",function(){var fe,we,pe,ve;try{typeof Y=="function"?fe=Y(V,w.getOption()):(we=P.value,pe=we.split(RegExp(`
*`+d+`
*`,"g")),ve={series:[]},S.each(pe,function(be,Ee){if(function(Se){if(Se.slice(0,Se.indexOf(`
`)).indexOf(" ")>=0)return!0}(be)){var Re=function(Se){for(var Ie=Se.split(/\n+/g),_e=v(Ie.shift()).split(b),Ae=[],ue=S.map(_e,function(je){return{name:je,data:[]}}),ke=0;ke<Ie.length;ke++){var Pe=v(Ie[ke]).split(b);Ae.push(Pe.shift());for(var Ve=0;Ve<Pe.length;Ve++)ue[Ve]&&(ue[Ve].data[ke]=Pe[Ve])}return{series:ue,categories:Ae}}(be),Ne=J[Ee],Le=Ne.axisDim+"Axis";Ne&&(ve[Le]=ve[Le]||[],ve[Le][Ne.axisIndex]={data:Re.categories},ve.series=ve.series.concat(Re.series))}else{var Re=function(Ie){for(var _e=Ie.split(/\n+/g),Ae=v(_e.shift()),ue=[],ke=0;ke<_e.length;ke++){var Pe,Ve=v(_e[ke]).split(b),je="",it=!1;isNaN(Ve[0])?(it=!0,je=Ve[0],Ve=Ve.slice(1),ue[ke]={name:je,value:[]},Pe=ue[ke].value):Pe=ue[ke]=[];for(var rt=0;rt<Ve.length;rt++)Pe.push(+Ve[rt]);Pe.length===1&&(it?ue[ke].value=Pe[0]:ue[ke]=Pe[0])}return{name:Ae,data:ue}}(be);ve.series.push(Re)}}),fe=ve)}catch(be){throw le(),Error("Data view format error "+be)}fe&&w.dispatchAction({type:"changeDataView",newOption:fe}),le()}),re.innerHTML=$[1],ie.innerHTML=$[2],ie.style.cssText=te,re.style.cssText=te,N.get("readOnly")||q.appendChild(ie),q.appendChild(re),_.addEventListener(P,"keydown",function(fe){if((fe.keyCode||fe.which)===9){var we=this.value,pe=this.selectionStart,ve=this.selectionEnd;this.value=we.substring(0,pe)+" "+we.substring(ve),this.selectionStart=this.selectionEnd=pe+1,_.stop(fe)}}),z.appendChild(H),z.appendChild(V),z.appendChild(q),V.style.height=O.clientHeight-80+"px",O.appendChild(z),this._dom=z},s.prototype.remove=function(l,w){this._dom&&w.getDom().removeChild(this._dom)},s.prototype.dispose=function(l,w){this.remove(l,w)},f.register("dataView",s),o.registerAction({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(l,w){var I=[];S.each(l.newOption.series,function(C){var h=w.getSeriesByName(C.name)[0];if(h){var c,m=h.get("data");I.push({name:C.name,data:(c=C.data,S.map(c,function(T,D){var O=m&&m[D];return S.isObject(O)&&!S.isArray(O)?(S.isObject(T)&&!S.isArray(T)&&(T=T.value),S.defaults({value:T},O)):T}))})}else I.push(S.extend({type:"scatter"},C))}),w.mergeOption(S.defaults({series:I},l.newOption))}),E.exports=s},39078:function(E,A,u){var o=u(87930),S=u(23405),_=u(29006),p=u(76744),f=u(41153),y=u(2488),d=u(12414),v=u(31525);u(71101);var b=d.toolbox.dataZoom,s=S.each;function l(h,c,m){(this._brushController=new _(m.getZr())).on("brush",S.bind(this._onBrush,this)).mount(),this._isZoomActive}l.defaultOption={show:!0,icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:S.clone(b.title)};var w=l.prototype;w.render=function(h,c,m,T){var D,O,N,z,H,$,V,P,U;this.model=h,this.ecModel=c,this.api=m,D=h,O=c,N=this,z=T,H=m,$=N._isZoomActive,z&&z.type==="takeGlobalCursor"&&($=z.key==="dataZoomSelect"&&z.dataZoomSelectActive),N._isZoomActive=$,D.setIconStatus("zoom",$?"emphasis":"normal"),V=new p(C(D.option),O,{include:["grid"]}),N._brushController.setPanels(V.makePanelOpts(H,function(Y){return Y.xAxisDeclared&&!Y.yAxisDeclared?"lineX":!Y.xAxisDeclared&&Y.yAxisDeclared?"lineY":"rect"})).enableBrush(!!$&&{brushType:"auto",brushStyle:{lineWidth:0,fill:"rgba(0,0,0,0.2)"}}),P=h,U=c,P.setIconStatus("back",f.count(U)>1?"emphasis":"normal")},w.onclick=function(h,c,m){I[m].call(this)},w.remove=function(h,c){this._brushController.unmount()},w.dispose=function(h,c){this._brushController.dispose()};var I={zoom:function(){var h=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:h})},back:function(){this._dispatchZoomAction(f.pop(this.ecModel))}};function C(h){var c={};return S.each(["xAxisIndex","yAxisIndex"],function(m){c[m]=h[m],c[m]==null&&(c[m]="all"),(c[m]===!1||c[m]==="none")&&(c[m]=[])}),c}w._onBrush=function(h,c){if(c.isEnd&&h.length){var m={},T=this.ecModel;this._brushController.updateCovers([]),new p(C(this.model.option),T,{include:["grid"]}).matchOutputRanges(h,T,function(O,N,z){if(z.type==="cartesian2d"){var H=O.brushType;H==="rect"?(D("x",z,N[0]),D("y",z,N[1])):D({lineX:"x",lineY:"y"}[H],z,N)}}),f.push(T,m),this._dispatchZoomAction(m)}function D(O,N,z){var H,$,V,P=N.getAxis(O),U=P.model,Y=(H=O,$=U,T.eachComponent({mainType:"dataZoom",subType:"select"},function(X){X.getAxisModel(H,$.componentIndex)&&(V=X)}),V),Z=Y.findRepresentativeAxisProxy(U).getMinMaxSpan();(Z.minValueSpan!=null||Z.maxValueSpan!=null)&&(z=y(0,z.slice(),P.scale.getExtent(),0,Z.minValueSpan,Z.maxValueSpan)),Y&&(m[Y.id]={dataZoomId:Y.id,startValue:z[0],endValue:z[1]})}},w._dispatchZoomAction=function(h){var c=[];s(h,function(m,T){c.push(S.clone(m))}),c.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:c})},v.register("dataZoom",l),o.registerPreprocessor(function(h){if(h){var c=h.dataZoom||(h.dataZoom=[]);S.isArray(c)||(h.dataZoom=c=[c]);var m=h.toolbox;if(m&&(S.isArray(m)&&(m=m[0]),m&&m.feature)){var T=m.feature.dataZoom;D("xAxis",T),D("yAxis",T)}}function D(O,N){if(N){var z,H,$,V=O+"Index",P=N[V];P==null||P==="all"||S.isArray(P)||(P=P===!1||P==="none"?[]:[P]),z=O,H=function(U,Y){if(P==null||P==="all"||S.indexOf(P,Y)!==-1){var Z={type:"select",$fromToolbox:!0,id:"\0_ec_\0toolbox-dataZoom_"+O+Y};Z[V]=Y,c.push(Z)}},$=h[z],S.isArray($)||($=$?[$]:[]),s($,H)}}}),E.exports=l},4990:function(E,A,u){var o=u(87930),S=u(23405),_=u(12414),p=u(31525),f=_.toolbox.magicType;function y(s){this.model=s}y.defaultOption={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z",tiled:"M2.3,2.2h22.8V25H2.3V2.2z M35,2.2h22.8V25H35V2.2zM2.3,35h22.8v22.8H2.3V35z M35,35h22.8v22.8H35V35z"},title:S.clone(f.title),option:{},seriesIndex:{}};var d=y.prototype;d.getIcons=function(){var s=this.model,l=s.get("icon"),w={};return S.each(s.get("type"),function(I){l[I]&&(w[I]=l[I])}),w};var v={line:function(s,l,w,I){if(s==="bar")return S.merge({id:l,type:"line",data:w.get("data"),stack:w.get("stack"),markPoint:w.get("markPoint"),markLine:w.get("markLine")},I.get("option.line")||{},!0)},bar:function(s,l,w,I){if(s==="line")return S.merge({id:l,type:"bar",data:w.get("data"),stack:w.get("stack"),markPoint:w.get("markPoint"),markLine:w.get("markLine")},I.get("option.bar")||{},!0)},stack:function(s,l,w,I){if(s==="line"||s==="bar")return S.merge({id:l,stack:"__ec_magicType_stack__"},I.get("option.stack")||{},!0)},tiled:function(s,l,w,I){if(s==="line"||s==="bar")return S.merge({id:l,stack:""},I.get("option.tiled")||{},!0)}},b=[["line","bar"],["stack","tiled"]];d.onclick=function(s,l,w){var I=this.model,C=I.get("seriesIndex."+w);if(v[w]){var h={series:[]};S.each(b,function(c){S.indexOf(c,w)>=0&&S.each(c,function(m){I.setIconStatus(m,"normal")})}),I.setIconStatus(w,"emphasis"),s.eachComponent({mainType:"series",query:C==null?null:{seriesIndex:C}},function(c){var m=c.subType,T=c.id,D=v[w](m,T,c,I);D&&(S.defaults(D,c.option),h.series.push(D));var O=c.coordinateSystem;if(O&&O.type==="cartesian2d"&&(w==="line"||w==="bar")){var N=O.getAxesByScale("ordinal")[0];if(N){var z=N.dim+"Axis",H=s.queryComponents({mainType:z,index:c.get(name+"Index"),id:c.get(name+"Id")})[0].componentIndex;h[z]=h[z]||[];for(var $=0;$<=H;$++)h[z][H]=h[z][H]||{};h[z][H].boundaryGap=w==="bar"}}}),l.dispatchAction({type:"changeMagicType",currentType:w,newOption:h})}},o.registerAction({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(s,l){l.mergeOption(s.newOption)}),p.register("magicType",y),E.exports=y},53989:function(E,A,u){var o=u(87930),S=u(41153),_=u(12414),p=u(31525);function f(y){this.model=y}f.defaultOption={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:_.toolbox.restore.title},f.prototype.onclick=function(y,d,v){S.clear(y),d.dispatchAction({type:"restore",from:this.uid})},p.register("restore",f),o.registerAction({type:"restore",event:"restore",update:"prepareAndUpdate"},function(y,d){d.resetOption("recreate")}),E.exports=f},23760:function(E,A,u){var o=u(23584),S=u(12414),_=u(31525),p=S.toolbox.saveAsImage;function f(y){this.model=y}f.defaultOption={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:p.title,type:"png",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:p.lang.slice()},f.prototype.unusable=!o.canvasSupported,f.prototype.onclick=function(y,d){var v=this.model,b=v.get("name")||y.get("title.0.text")||"echarts",s=document.createElement("a"),l=v.get("type",!0)||"png";s.download=b+"."+l,s.target="_blank";var w=d.getConnectedDataURL({type:l,backgroundColor:v.get("backgroundColor",!0)||y.get("backgroundColor")||"#fff",excludeComponents:v.get("excludeComponents"),pixelRatio:v.get("pixelRatio")});if(s.href=w,typeof MouseEvent!="function"||o.browser.ie||o.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var I=atob(w.split(",")[1]),C=I.length,h=new Uint8Array(C);C--;)h[C]=I.charCodeAt(C);var c=new Blob([h]);window.navigator.msSaveOrOpenBlob(c,b+"."+l)}else{var m=v.get("lang"),T='<body style="margin:0;"><img src="'+w+'" style="max-width:100%;" title="'+(m&&m[0]||"")+'" /></body>';window.open().document.write(T)}else{var D=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});s.dispatchEvent(D)}},_.register("saveAsImage",f),E.exports=f},31525:function(E,A){var u={};A.register=function(o,S){u[o]=S},A.get=function(o){return u[o]}},14723:function(E,A,u){var o=u(87930);u(81819),u(78929),u(32650),o.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),o.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){})},2121:function(E,A,u){var o=u(23405),S=u(86049),_=u(46427),p=u(23584),f=u(60653),y=o.each,d=f.toCamelCase,v=["","-webkit-","-moz-","-o-"];function b(s,l){if(p.wxa)return null;var w=document.createElement("div"),I=this._zr=l.getZr();this.el=w,this._x=l.getWidth()/2,this._y=l.getHeight()/2,s.appendChild(w),this._container=s,this._show=!1,this._hideTimeout;var C=this;w.onmouseenter=function(){C._enterable&&(clearTimeout(C._hideTimeout),C._show=!0),C._inContent=!0},w.onmousemove=function(h){if(h=h||window.event,!C._enterable){var c=I.handler;_.normalizeEvent(s,h,!0),c.dispatch("mousemove",h)}},w.onmouseleave=function(){C._enterable&&C._show&&C.hideLater(C._hideDelay),C._inContent=!1}}b.prototype={constructor:b,_enterable:!0,update:function(){var s=this._container,l=s.currentStyle||document.defaultView.getComputedStyle(s),w=s.style;w.position!=="absolute"&&l.position!=="absolute"&&(w.position="relative")},show:function(s){clearTimeout(this._hideTimeout);var l,w,I,C,h,c,m,T,D,O,N=this.el;N.style.cssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(l=[],w=s.get("transitionDuration"),I=s.get("backgroundColor"),C=s.getModel("textStyle"),h=s.get("padding"),w&&l.push((m="left "+w+"s "+(c="cubic-bezier(0.23, 1, 0.32, 1)")+",top "+w+"s "+c,o.map(v,function(z){return z+"transition:"+m}).join(";"))),I&&(p.canvasSupported?l.push("background-Color:"+I):(l.push("background-Color:#"+S.toHex(I)),l.push("filter:alpha(opacity=70)"))),y(["width","color","radius"],function(z){var H="border-"+z,$=d(H),V=s.get($);V!=null&&l.push(H+":"+V+(z==="color"?"":"px"))}),l.push((T=[],D=C.get("fontSize"),(O=C.getTextColor())&&T.push("color:"+O),T.push("font:"+C.getFont()),D&&T.push("line-height:"+Math.round(3*D/2)+"px"),y(["decoration","align"],function(z){var H=C.get(z);H&&T.push("text-"+z+":"+H)}),T.join(";"))),h!=null&&l.push("padding:"+f.normalizeCssArray(h).join("px ")+"px"),l.join(";")+";")+";left:"+this._x+"px;top:"+this._y+"px;"+(s.get("extraCssText")||""),N.style.display=N.innerHTML?"block":"none",N.style.pointerEvents=this._enterable?"auto":"none",this._show=!0},setContent:function(s){this.el.innerHTML=s??""},setEnterable:function(s){this._enterable=s},getSize:function(){var s=this.el;return[s.clientWidth,s.clientHeight]},moveTo:function(s,l){var w,I=this._zr;I&&I.painter&&(w=I.painter.getViewportRootOffset())&&(s+=w.offsetLeft,l+=w.offsetTop);var C=this.el.style;C.left=s+"px",C.top=l+"px",this._x=s,this._y=l},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(s){this._show&&!(this._inContent&&this._enterable)&&(s?(this._hideDelay=s,this._show=!1,this._hideTimeout=setTimeout(o.bind(this.hide,this),s)):this.hide())},isShow:function(){return this._show},getOuterSize:function(){var s=this.el.clientWidth,l=this.el.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var w=document.defaultView.getComputedStyle(this.el);w&&(s+=parseInt(w.paddingLeft,10)+parseInt(w.paddingRight,10)+parseInt(w.borderLeftWidth,10)+parseInt(w.borderRightWidth,10),l+=parseInt(w.paddingTop,10)+parseInt(w.paddingBottom,10)+parseInt(w.borderTopWidth,10)+parseInt(w.borderBottomWidth,10))}return{width:s,height:l}}},E.exports=b},78929:function(E,A,u){E.exports=u(87930).extendComponentModel({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#fff",fontSize:14}}})},77356:function(E,A,u){var o=u(23405),S=u(96296);function _(p){this._zr=p.getZr(),this._show=!1,this._hideTimeout}_.prototype={constructor:_,_enterable:!0,update:function(){},show:function(p){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.attr("show",!0),this._show=!0},setContent:function(p,f,y){this.el&&this._zr.remove(this.el);for(var d={},v=p,b="{marker",s=v.indexOf(b);s>=0;){var l=v.indexOf("|}"),w=v.substr(s+b.length,l-s-b.length);w.indexOf("sub")>-1?d["marker"+w]={textWidth:4,textHeight:4,textBorderRadius:2,textBackgroundColor:f[w],textOffset:[3,0]}:d["marker"+w]={textWidth:10,textHeight:10,textBorderRadius:5,textBackgroundColor:f[w]},s=(v=v.substr(l+1)).indexOf("{marker")}this.el=new S({style:{rich:d,text:p,textLineHeight:20,textBackgroundColor:y.get("backgroundColor"),textBorderRadius:y.get("borderRadius"),textFill:y.get("textStyle.color"),textPadding:y.get("padding")},z:y.get("z")}),this._zr.add(this.el);var I=this;this.el.on("mouseover",function(){I._enterable&&(clearTimeout(I._hideTimeout),I._show=!0),I._inContent=!0}),this.el.on("mouseout",function(){I._enterable&&I._show&&I.hideLater(I._hideDelay),I._inContent=!1})},setEnterable:function(p){this._enterable=p},getSize:function(){var p=this.el.getBoundingRect();return[p.width,p.height]},moveTo:function(p,f){this.el&&this.el.attr("position",[p,f])},hide:function(){this.el.hide(),this._show=!1},hideLater:function(p){this._show&&!(this._inContent&&this._enterable)&&(p?(this._hideDelay=p,this._show=!1,this._hideTimeout=setTimeout(o.bind(this.hide,this),p)):this.hide())},isShow:function(){return this._show},getOuterSize:function(){return this.getSize()}},E.exports=_},32650:function(E,A,u){var o=u(87930),S=u(23405),_=u(23584),p=u(2121),f=u(77356),y=u(60653),d=u(54684),v=u(51747),b=u(2885),s=u(62751),l=u(46082),w=u(46357),I=u(51261),C=u(84908),h=u(51064).getTooltipRenderMode,c=S.bind,m=S.each,T=d.parsePercent,D=new v.Rect({shape:{x:-1,y:-1,width:2,height:2}});function O(H){for(var $=H.pop();H.length;){var V=H.pop();V&&(l.isInstance(V)&&(V=V.get("tooltip",!0)),typeof V=="string"&&(V={formatter:V}),$=new l(V,$,$.ecModel))}return $}function N(H,$){return H.dispatchAction||S.bind($.dispatchAction,$)}function z(H){return H==="center"||H==="middle"}E.exports=o.extendComponentView({type:"tooltip",init:function(H,$){if(!_.node){var V,P=H.getComponent("tooltip").get("renderMode");this._renderMode=h(P),this._renderMode==="html"?(V=new p($.getDom(),$),this._newLine="<br/>"):(V=new f($),this._newLine=`
`),this._tooltipContent=V}},render:function(H,$,V){if(!_.node){this.group.removeAll(),this._tooltipModel=H,this._ecModel=$,this._api=V,this._lastDataByCoordSys=null,this._alwaysShowContent=H.get("alwaysShowContent");var P=this._tooltipContent;P.update(),P.setEnterable(H.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var H=this._tooltipModel.get("triggerOn");w.register("itemTooltip",this._api,c(function($,V,P){H!=="none"&&(H.indexOf($)>=0?this._tryShow(V,P):$==="leave"&&this._hide(P))},this))},_keepShow:function(){var H=this._tooltipModel,$=this._ecModel,V=this._api;if(this._lastX!=null&&this._lastY!=null&&H.get("triggerOn")!=="none"){var P=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){P.manuallyShowTip(H,$,V,{x:P._lastX,y:P._lastY})})}},manuallyShowTip:function(H,$,V,P){if(P.from!==this.uid&&!_.node){var U=N(P,V);this._ticket="";var Y=P.dataByCoordSys;if(P.tooltip&&P.x!=null&&P.y!=null)D.position=[P.x,P.y],D.update(),D.tooltip=P.tooltip,this._tryShow({offsetX:P.x,offsetY:P.y,target:D},U);else if(Y)this._tryShow({offsetX:P.x,offsetY:P.y,position:P.position,event:{},dataByCoordSys:P.dataByCoordSys,tooltipOption:P.tooltipOption},U);else if(P.seriesIndex!=null){if(this._manuallyAxisShowTip(H,$,V,P))return;var Z=b(P,$),X=Z.point[0],J=Z.point[1];X!=null&&J!=null&&this._tryShow({offsetX:X,offsetY:J,position:P.position,target:Z.el,event:{}},U)}else P.x!=null&&P.y!=null&&(V.dispatchAction({type:"updateAxisPointer",x:P.x,y:P.y}),this._tryShow({offsetX:P.x,offsetY:P.y,position:P.position,target:V.getZr().findHover(P.x,P.y).target,event:{}},U))}},manuallyHideTip:function(H,$,V,P){var U=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&U.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,P.from!==this.uid&&this._hide(N(P,V))},_manuallyAxisShowTip:function(H,$,V,P){var U=P.seriesIndex,Y=P.dataIndex,Z=$.getComponent("axisPointer").coordSysAxesInfo;if(U!=null&&Y!=null&&Z!=null){var X=$.getSeriesByIndex(U);if(X){var H=O([X.getData().getItemModel(Y),X,(X.coordinateSystem||{}).model,H]);if(H.get("trigger")==="axis")return V.dispatchAction({type:"updateAxisPointer",seriesIndex:U,dataIndex:Y,position:P.position}),!0}}},_tryShow:function(H,$){var V=H.target;if(this._tooltipModel){this._lastX=H.offsetX,this._lastY=H.offsetY;var P=H.dataByCoordSys;P&&P.length?this._showAxisTooltip(P,H):V&&V.dataIndex!=null?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(H,V,$)):V&&V.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(H,V,$)):(this._lastDataByCoordSys=null,this._hide($))}},_showOrMove:function(H,$){var V=H.get("showDelay");$=S.bind($,this),clearTimeout(this._showTimout),V>0?this._showTimout=setTimeout($,V):$()},_showAxisTooltip:function(H,$){var V=this._ecModel,P=this._tooltipModel,U=[$.offsetX,$.offsetY],Y=[],Z=[],X=O([$.tooltipOption,P]),J=this._renderMode,q=this._newLine,te={};m(H,function(ie){m(ie.dataByAxis,function(ne){var le=V.getComponent(ne.axisDim+"Axis",ne.axisIndex),fe=ne.value,we=[];if(le&&fe!=null){var pe=C.getValueLabel(fe,le.axis,V,ne.seriesDataIndices,ne.valueLabelOpt);S.each(ne.seriesDataIndices,function(ve){var be=V.getSeriesByIndex(ve.seriesIndex),Ee=ve.dataIndexInside,Re=be&&be.getDataParams(Ee);if(Re.axisDim=ne.axisDim,Re.axisIndex=ne.axisIndex,Re.axisType=ne.axisType,Re.axisId=ne.axisId,Re.axisValue=I.getAxisRawValue(le.axis,fe),Re.axisValueLabel=pe,Re){Z.push(Re);var Ne,Le=be.formatTooltip(Ee,!0,null,J);if(S.isObject(Le)){Ne=Le.html;var Se=Le.markers;S.merge(te,Se)}else Ne=Le;we.push(Ne)}}),J!=="html"?Y.push(we.join(q)):Y.push((pe?y.encodeHTML(pe)+q:"")+we.join(q))}})},this),Y.reverse(),Y=Y.join(this._newLine+this._newLine);var re=$.position;this._showOrMove(X,function(){this._updateContentNotChangedOnAxis(H)?this._updatePosition(X,re,U[0],U[1],this._tooltipContent,Z):this._showTooltipContent(X,Y,Z,Math.random(),U[0],U[1],re,void 0,te)})},_showSeriesItemTooltip:function(H,$,V){var P,U,Y=this._ecModel,Z=$.seriesIndex,X=Y.getSeriesByIndex(Z),J=$.dataModel||X,q=$.dataIndex,te=$.dataType,re=J.getData(),ie=O([re.getItemModel(q),J,X&&(X.coordinateSystem||{}).model,this._tooltipModel]),ne=ie.get("trigger");if(ne==null||ne==="item"){var le=J.getDataParams(q,te),fe=J.formatTooltip(q,!1,te,this._renderMode);S.isObject(fe)?(P=fe.html,U=fe.markers):(P=fe,U=null);var we="item_"+J.name+"_"+q;this._showOrMove(ie,function(){this._showTooltipContent(ie,P,le,we,H.offsetX,H.offsetY,H.position,H.target,U)}),V({type:"showTip",dataIndexInside:q,dataIndex:re.getRawIndex(q),seriesIndex:Z,from:this.uid})}},_showComponentItemTooltip:function(H,$,V){var P=$.tooltip;if(typeof P=="string"){var U=P;P={content:U,formatter:U}}var Y=new l(P,this._tooltipModel,this._ecModel),Z=Y.get("content"),X=Math.random();this._showOrMove(Y,function(){this._showTooltipContent(Y,Z,Y.get("formatterParams")||{},X,H.offsetX,H.offsetY,H.position,$)}),V({type:"showTip",from:this.uid})},_showTooltipContent:function(H,$,V,P,U,Y,Z,X,J){if(this._ticket="",H.get("showContent")&&H.get("show")){var q=this._tooltipContent,te=H.get("formatter");Z=Z||H.get("position");var re=$;if(te&&typeof te=="string")re=y.formatTpl(te,V,!0);else if(typeof te=="function"){var ie=c(function(ne,le){ne===this._ticket&&(q.setContent(le,J,H),this._updatePosition(H,Z,U,Y,q,V,X))},this);this._ticket=P,re=te(V,P,ie)}q.setContent(re,J,H),q.show(H),this._updatePosition(H,Z,U,Y,q,V,X)}},_updatePosition:function(H,$,V,P,U,Y,Z){var X=this._api.getWidth(),J=this._api.getHeight();$=$||H.get("position");var q=U.getSize(),te=H.get("align"),re=H.get("verticalAlign"),ie=Z&&Z.getBoundingRect().clone();if(Z&&ie.applyTransform(Z.transform),typeof $=="function"&&($=$([V,P],Y,U.el,ie,{viewSize:[X,J],contentSize:q.slice()})),S.isArray($))V=T($[0],X),P=T($[1],J);else if(S.isObject($)){$.width=q[0],$.height=q[1];var ne=s.getLayoutRect($,{width:X,height:J});V=ne.x,P=ne.y,te=null,re=null}else if(typeof $=="string"&&Z){var le=function(it,rt,mt){var yt=mt[0],st=mt[1],Qe=0,At=0,Xt=rt.width,cn=rt.height;switch(it){case"inside":Qe=rt.x+Xt/2-yt/2,At=rt.y+cn/2-st/2;break;case"top":Qe=rt.x+Xt/2-yt/2,At=rt.y-st-5;break;case"bottom":Qe=rt.x+Xt/2-yt/2,At=rt.y+cn+5;break;case"left":Qe=rt.x-yt-5,At=rt.y+cn/2-st/2;break;case"right":Qe=rt.x+Xt+5,At=rt.y+cn/2-st/2}return[Qe,At]}($,ie,q);V=le[0],P=le[1]}else{var fe,we,pe,ve,be,Ee,Re,Ne,Le,Se,le=(fe=V,we=P,pe=U,ve=X,be=J,Ee=te?null:20,Re=re?null:20,Le=(Ne=pe.getOuterSize()).width,Se=Ne.height,Ee!=null&&(fe+Le+Ee>ve?fe-=Le+Ee:fe+=Ee),Re!=null&&(we+Se+Re>be?we-=Se+Re:we+=Re),[fe,we]);V=le[0],P=le[1]}if(te&&(V-=z(te)?q[0]/2:te==="right"?q[0]:0),re&&(P-=z(re)?q[1]/2:re==="bottom"?q[1]:0),H.get("confine")){var Ie,_e,Ae,ue,ke,Pe,Ve,je,le=(Ie=V,_e=P,Ae=U,ue=X,ke=J,Ve=(Pe=Ae.getOuterSize()).width,je=Pe.height,Ie=Math.min(Ie+Ve,ue)-Ve,_e=Math.min(_e+je,ke)-je,[Ie=Math.max(Ie,0),_e=Math.max(_e,0)]);V=le[0],P=le[1]}U.moveTo(V,P)},_updateContentNotChangedOnAxis:function(H){var $=this._lastDataByCoordSys,V=!!$&&$.length===H.length;return V&&m($,function(P,U){var Y=P.dataByAxis||{},Z=(H[U]||{}).dataByAxis||[];(V&=Y.length===Z.length)&&m(Y,function(X,J){var q=Z[J]||{},te=X.seriesDataIndices||[],re=q.seriesDataIndices||[];(V&=X.value===q.value&&X.axisType===q.axisType&&X.axisId===q.axisId&&te.length===re.length)&&m(te,function(ie,ne){var le=re[ne];V&=ie.seriesIndex===le.seriesIndex&&ie.dataIndex===le.dataIndex})})}),this._lastDataByCoordSys=H,!!V},_hide:function(H){this._lastDataByCoordSys=null,H({type:"hideTip",from:this.uid})},dispose:function(H,$){_.node||(this._tooltipContent.hide(),w.unregister("itemTooltip",$))}})},96307:function(E,A,u){u(95946),u(62495)},48267:function(E,A,u){var o=u(23405),S=u(23323),_=u(54684),p=S.extend({type:"visualMap.continuous",defaultOption:{align:"auto",calculable:!1,range:null,realtime:!0,itemHeight:null,itemWidth:null,hoverLink:!0,hoverLinkDataSize:null,hoverLinkOnHandle:null},optionUpdated:function(y,d){p.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual(function(v){v.mappingMethod="linear",v.dataExtent=this.getExtent()}),this._resetRange()},resetItemSize:function(){p.superApply(this,"resetItemSize",arguments);var y=this.itemSize;this._orient==="horizontal"&&y.reverse(),(y[0]==null||isNaN(y[0]))&&(y[0]=20),(y[1]==null||isNaN(y[1]))&&(y[1]=140)},_resetRange:function(){var y=this.getExtent(),d=this.option.range;!d||d.auto?(y.auto=1,this.option.range=y):o.isArray(d)&&(d[0]>d[1]&&d.reverse(),d[0]=Math.max(d[0],y[0]),d[1]=Math.min(d[1],y[1]))},completeVisualOption:function(){S.prototype.completeVisualOption.apply(this,arguments),o.each(this.stateList,function(y){var d=this.option.controller[y].symbolSize;d&&d[0]!==d[1]&&(d[0]=0)},this)},setSelected:function(y){this.option.range=y.slice(),this._resetRange()},getSelected:function(){var y=this.getExtent(),d=_.asc((this.get("range")||[]).slice());return d[0]>y[1]&&(d[0]=y[1]),d[1]>y[1]&&(d[1]=y[1]),d[0]<y[0]&&(d[0]=y[0]),d[1]<y[0]&&(d[1]=y[0]),d},getValueState:function(y){var d=this.option.range,v=this.getExtent();return(d[0]<=v[0]||d[0]<=y)&&(d[1]>=v[1]||y<=d[1])?"inRange":"outOfRange"},findTargetDataIndices:function(y){var d=[];return this.eachTargetSeries(function(v){var b=[],s=v.getData();s.each(this.getDataDimension(s),function(l,w){y[0]<=l&&l<=y[1]&&b.push(w)},this),d.push({seriesId:v.id,dataIndex:b})},this),d},getVisualMeta:function(y){var d=f(this,"outOfRange",this.getExtent()),v=f(this,"inRange",this.option.range.slice()),b=[];function s(m,T){b.push({value:m,color:y(m,T)})}for(var l=0,w=0,I=v.length,C=d.length;w<C&&(!v.length||d[w]<=v[0]);w++)d[w]<v[l]&&s(d[w],"outOfRange");for(var h=1;l<I;l++,h=0)h&&b.length&&s(v[l],"outOfRange"),s(v[l],"inRange");for(var h=1;w<C;w++)(!v.length||v[v.length-1]<d[w])&&(h&&(b.length&&s(b[b.length-1].value,"outOfRange"),h=0),s(d[w],"outOfRange"));var c=b.length;return{stops:b,outerColors:[c?b[0].color:"transparent",c?b[c-1].color:"transparent"]}}});function f(y,d,v){if(v[0]===v[1])return v.slice();for(var b=(v[1]-v[0])/200,s=v[0],l=[],w=0;w<=200&&s<v[1];w++)l.push(s),s+=b;return l.push(v[1]),l}E.exports=p},57395:function(E,A,u){var o=u(23405),S=u(67725),_=u(46427),p=u(10613),f=u(51747),y=u(54684),d=u(2488),v=u(4687),b=u(51064),s=y.linearMap,l=o.each,w=Math.min,I=Math.max,C=p.extend({type:"visualMap.continuous",init:function(){C.superApply(this,"init",arguments),this._shapes={},this._dataInterval=[],this._handleEnds=[],this._orient,this._useHandle,this._hoverLinkDataIndices=[],this._dragging,this._hovering},doRender:function(T,D,O,N){N&&N.type==="selectDataRange"&&N.from===this.uid||this._buildView()},_buildView:function(){this.group.removeAll();var T=this.visualMapModel,D=this.group;this._orient=T.get("orient"),this._useHandle=T.get("calculable"),this._resetInterval(),this._renderBar(D);var O=T.get("text");this._renderEndsText(D,O,0),this._renderEndsText(D,O,1),this._updateView(!0),this.renderBackground(D),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(D)},_renderEndsText:function(T,D,O){if(D){var N=D[1-O];N=N!=null?N+"":"";var z=this.visualMapModel,H=z.get("textGap"),$=z.itemSize,V=this._shapes.barGroup,P=this._applyTransform([$[0]/2,O===0?-H:$[1]+H],V),U=this._applyTransform(O===0?"bottom":"top",V),Y=this._orient,Z=this.visualMapModel.textStyleModel;this.group.add(new f.Text({style:{x:P[0],y:P[1],textVerticalAlign:Y==="horizontal"?"middle":U,textAlign:Y==="horizontal"?U:"center",text:N,textFont:Z.getFont(),textFill:Z.getTextColor()}}))}},_renderBar:function(T){var D=this.visualMapModel,O=this._shapes,N=D.itemSize,z=this._orient,H=this._useHandle,$=v.getItemAlign(D,this.api,N),V=O.barGroup=this._createBarGroup($);V.add(O.outOfRange=h()),V.add(O.inRange=h(null,H?m(this._orient):null,o.bind(this._dragHandle,this,"all",!1),o.bind(this._dragHandle,this,"all",!0)));var P=D.textStyleModel.getTextRect("国"),U=I(P.width,P.height);H&&(O.handleThumbs=[],O.handleLabels=[],O.handleLabelPoints=[],this._createHandle(V,0,N,U,z,$),this._createHandle(V,1,N,U,z,$)),this._createIndicator(V,N,U,z),T.add(V)},_createHandle:function(T,D,O,N,z){var H,$,V=o.bind(this._dragHandle,this,D,!1),P=o.bind(this._dragHandle,this,D,!0),U=h((H=D,$=N,H===0?[[0,0],[$,0],[$,-$]]:[[0,0],[$,0],[$,$]]),m(this._orient),V,P);U.position[0]=O[0],T.add(U);var Y=this.visualMapModel.textStyleModel,Z=new f.Text({draggable:!0,drift:V,onmousemove:function(q){_.stop(q.event)},ondragend:P,style:{x:0,y:0,text:"",textFont:Y.getFont(),textFill:Y.getTextColor()}});this.group.add(Z);var X=[z==="horizontal"?N/2:1.5*N,z==="horizontal"?D===0?-(1.5*N):1.5*N:D===0?-N/2:N/2],J=this._shapes;J.handleThumbs[D]=U,J.handleLabelPoints[D]=X,J.handleLabels[D]=Z},_createIndicator:function(T,D,O,N){var z=h([[0,0]],"move");z.position[0]=D[0],z.attr({invisible:!0,silent:!0}),T.add(z);var H=this.visualMapModel.textStyleModel,$=new f.Text({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textFont:H.getFont(),textFill:H.getTextColor()}});this.group.add($);var V=this._shapes;V.indicator=z,V.indicatorLabel=$,V.indicatorLabelPoint=[N==="horizontal"?O/2:9,0]},_dragHandle:function(T,D,O,N){if(this._useHandle){if(this._dragging=!D,!D){var z=this._applyTransform([O,N],this._shapes.barGroup,!0);this._updateInterval(T,z[1]),this._updateView()}!this.visualMapModel.get("realtime")===D&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),D?this._hovering||this._clearHoverLinkToSeries():c(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[T],!1)}},_resetInterval:function(){var T=this.visualMapModel,D=this._dataInterval=T.getSelected(),O=T.getExtent(),N=[0,T.itemSize[1]];this._handleEnds=[s(D[0],O,N,!0),s(D[1],O,N,!0)]},_updateInterval:function(T,D){D=D||0;var O=this.visualMapModel,N=this._handleEnds,z=[0,O.itemSize[1]];d(D,N,z,T,0);var H=O.getExtent();this._dataInterval=[s(N[0],z,H,!0),s(N[1],z,H,!0)]},_updateView:function(T){var D=this.visualMapModel,O=D.getExtent(),N=this._shapes,z=[0,D.itemSize[1]],H=T?z:this._handleEnds,$=this._createBarVisual(this._dataInterval,O,H,"inRange"),V=this._createBarVisual(O,O,z,"outOfRange");N.inRange.setStyle({fill:$.barColor,opacity:$.opacity}).setShape("points",$.barPoints),N.outOfRange.setStyle({fill:V.barColor,opacity:V.opacity}).setShape("points",V.barPoints),this._updateHandle(H,$)},_createBarVisual:function(T,D,O,N){var z={forceState:N,convertOpacityToAlpha:!0},H=this._makeColorGradient(T,z),$=[this.getControllerVisual(T[0],"symbolSize",z),this.getControllerVisual(T[1],"symbolSize",z)],V=this._createBarPoints(O,$);return{barColor:new S(0,0,0,1,H),barPoints:V,handlesColor:[H[0].color,H[H.length-1].color]}},_makeColorGradient:function(T,D){var O=[],N=(T[1]-T[0])/100;O.push({color:this.getControllerVisual(T[0],"color",D),offset:0});for(var z=1;z<100;z++){var H=T[0]+N*z;if(H>T[1])break;O.push({color:this.getControllerVisual(H,"color",D),offset:z/100})}return O.push({color:this.getControllerVisual(T[1],"color",D),offset:1}),O},_createBarPoints:function(T,D){var O=this.visualMapModel.itemSize;return[[O[0]-D[0],T[0]],[O[0],T[0]],[O[0],T[1]],[O[0]-D[1],T[1]]]},_createBarGroup:function(T){var D=this._orient,O=this.visualMapModel.get("inverse");return new f.Group(D==="horizontal"&&!O?{scale:T==="bottom"?[1,1]:[-1,1],rotation:Math.PI/2}:D==="horizontal"&&O?{scale:T==="bottom"?[-1,1]:[1,1],rotation:-Math.PI/2}:D==="vertical"&&!O?{scale:T==="left"?[1,-1]:[-1,-1]}:{scale:T==="left"?[1,1]:[-1,1]})},_updateHandle:function(T,D){if(this._useHandle){var O=this._shapes,N=this.visualMapModel,z=O.handleThumbs,H=O.handleLabels;l([0,1],function($){var V=z[$];V.setStyle("fill",D.handlesColor[$]),V.position[1]=T[$];var P=f.applyTransform(O.handleLabelPoints[$],f.getTransform(V,this.group));H[$].setStyle({x:P[0],y:P[1],text:N.formatValueText(this._dataInterval[$]),textVerticalAlign:"middle",textAlign:this._applyTransform(this._orient==="horizontal"?$===0?"bottom":"top":"left",O.barGroup)})},this)}},_showIndicator:function(T,D,O,N){var z=this.visualMapModel,H=z.getExtent(),$=z.itemSize,V=s(T,H,[0,$[1]],!0),P=this._shapes,U=P.indicator;if(U){U.position[1]=V,U.attr("invisible",!1),U.setShape("points",(Y=!!O,Z=N,X=V,J=$[1],Y?[[0,-w(Z,I(X,0))],[6,0],[0,w(Z,I(J-X,0))]]:[[0,0],[5,-5],[5,5]]));var Y,Z,X,J,q=this.getControllerVisual(T,"color",{convertOpacityToAlpha:!0});U.setStyle("fill",q);var te=f.applyTransform(P.indicatorLabelPoint,f.getTransform(U,this.group)),re=P.indicatorLabel;re.attr("invisible",!1);var ie=this._applyTransform("left",P.barGroup),ne=this._orient;re.setStyle({text:(O||"")+z.formatValueText(D),textVerticalAlign:ne==="horizontal"?ie:"middle",textAlign:ne==="horizontal"?"center":ie,x:te[0],y:te[1]})}},_enableHoverLinkToSeries:function(){var T=this;this._shapes.barGroup.on("mousemove",function(D){if(T._hovering=!0,!T._dragging){var O=T.visualMapModel.itemSize,N=T._applyTransform([D.offsetX,D.offsetY],T._shapes.barGroup,!0,!0);N[1]=w(I(0,N[1]),O[1]),T._doHoverLinkToSeries(N[1],0<=N[0]&&N[0]<=O[0])}}).on("mouseout",function(){T._hovering=!1,T._dragging||T._clearHoverLinkToSeries()})},_enableHoverLinkFromSeries:function(){var T=this.api.getZr();this.visualMapModel.option.hoverLink?(T.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),T.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},_doHoverLinkToSeries:function(T,D){var O=this.visualMapModel,N=O.itemSize;if(O.option.hoverLink){var z,H,$,V,P,U=[0,N[1]],Y=O.getExtent();T=w(I(U[0],T),U[1]);var Z=(z=O,H=Y,$=U,V=6,(P=z.get("hoverLinkDataSize"))&&(V=s(P,H,$,!0)/2),V),X=[T-Z,T+Z],J=s(T,U,Y,!0),q=[s(X[0],U,Y,!0),s(X[1],U,Y,!0)];X[0]<U[0]&&(q[0]=-1/0),X[1]>U[1]&&(q[1]=1/0),D&&(q[0]===-1/0?this._showIndicator(J,q[1],"< ",Z):q[1]===1/0?this._showIndicator(J,q[0],"> ",Z):this._showIndicator(J,J,"≈ ",Z));var te=this._hoverLinkDataIndices,re=[];(D||c(O))&&(re=this._hoverLinkDataIndices=O.findTargetDataIndices(q));var ie=b.compressBatches(te,re);this._dispatchHighDown("downplay",v.convertDataIndex(ie[0])),this._dispatchHighDown("highlight",v.convertDataIndex(ie[1]))}},_hoverLinkFromSeriesMouseOver:function(T){var D=T.target,O=this.visualMapModel;if(D&&D.dataIndex!=null){var N=this.ecModel.getSeriesByIndex(D.seriesIndex);if(O.isTargetSeries(N)){var z=N.getData(D.dataType),H=z.get(O.getDataDimension(z),D.dataIndex,!0);isNaN(H)||this._showIndicator(H,H)}}},_hideIndicator:function(){var T=this._shapes;T.indicator&&T.indicator.attr("invisible",!0),T.indicatorLabel&&T.indicatorLabel.attr("invisible",!0)},_clearHoverLinkToSeries:function(){this._hideIndicator();var T=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",v.convertDataIndex(T)),T.length=0},_clearHoverLinkFromSeries:function(){this._hideIndicator();var T=this.api.getZr();T.off("mouseover",this._hoverLinkFromSeriesMouseOver),T.off("mouseout",this._hideIndicator)},_applyTransform:function(T,D,O,N){var z=f.getTransform(D,N?null:this.group);return f[o.isArray(T)?"applyTransform":"transformDirection"](T,z,O)},_dispatchHighDown:function(T,D){D&&D.length&&this.api.dispatchAction({type:T,batch:D})},dispose:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},remove:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()}});function h(T,D,O,N){return new f.Polygon({shape:{points:T},draggable:!!O,cursor:D,drift:O,onmousemove:function(z){_.stop(z.event)},ondragend:N})}function c(T){var D=T.get("hoverLinkOnHandle");return!!(D??T.get("realtime"))}function m(T){return T==="vertical"?"ns-resize":"ew-resize"}E.exports=C},74236:function(E,A,u){u(9129).__DEV__;var o=u(23405),S=u(23323),_=u(32013),p=u(76047),f=u(54684).reformIntervals,y=S.extend({type:"visualMap.piecewise",defaultOption:{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieceList:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0,showLabel:null},optionUpdated:function(b,s){y.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var l=this._mode=this._determineMode();d[this._mode].call(this),this._resetSelected(b,s);var w=this.option.categories;this.resetVisual(function(I,C){l==="categories"?(I.mappingMethod="category",I.categories=o.clone(w)):(I.dataExtent=this.getExtent(),I.mappingMethod="piecewise",I.pieceList=o.map(this._pieceList,function(c){var c=o.clone(c);return C!=="inRange"&&(c.visual=null),c}))})},completeVisualOption:function(){var b=this.option,s={},l=_.listVisualTypes(),w=this.isCategory();function I(C,h,c){return C&&C[h]&&(o.isObject(C[h])?C[h].hasOwnProperty(c):C[h]===c)}o.each(b.pieces,function(C){o.each(l,function(h){C.hasOwnProperty(h)&&(s[h]=1)})}),o.each(s,function(C,h){var c=0;o.each(this.stateList,function(m){c|=I(b,m,h)||I(b.target,m,h)},this),c||o.each(this.stateList,function(m){(b[m]||(b[m]={}))[h]=p.get(h,m==="inRange"?"active":"inactive",w)})},this),S.prototype.completeVisualOption.apply(this,arguments)},_resetSelected:function(b,s){var l=this.option,w=this._pieceList,I=(s?l:b).selected||{};if(l.selected=I,o.each(w,function(h,c){var m=this.getSelectedMapKey(h);I.hasOwnProperty(m)||(I[m]=!0)},this),l.selectedMode==="single"){var C=!1;o.each(w,function(h,c){var m=this.getSelectedMapKey(h);I[m]&&(C?I[m]=!1:C=!0)},this)}},getSelectedMapKey:function(b){return this._mode==="categories"?b.value+"":b.index+""},getPieceList:function(){return this._pieceList},_determineMode:function(){var b=this.option;return b.pieces&&b.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},setSelected:function(b){this.option.selected=o.clone(b)},getValueState:function(b){var s=_.findPieceIndex(b,this._pieceList);return s!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[s])]?"inRange":"outOfRange"},findTargetDataIndices:function(b){var s=[];return this.eachTargetSeries(function(l){var w=[],I=l.getData();I.each(this.getDataDimension(I),function(C,h){_.findPieceIndex(C,this._pieceList)===b&&w.push(h)},this),s.push({seriesId:l.id,dataIndex:w})},this),s},getRepresentValue:function(b){var s;if(this.isCategory())s=b.value;else if(b.value!=null)s=b.value;else{var l=b.interval||[];s=l[0]===-1/0&&l[1]===1/0?0:(l[0]+l[1])/2}return s},getVisualMeta:function(b){if(!this.isCategory()){var s=[],l=[],w=this,I=this._pieceList.slice();if(I.length){var C=I[0].interval[0];C!==-1/0&&I.unshift({interval:[-1/0,C]}),(C=I[I.length-1].interval[1])!==1/0&&I.push({interval:[C,1/0]})}else I.push({interval:[-1/0,1/0]});var h=-1/0;return o.each(I,function(m){var T=m.interval;T&&(T[0]>h&&c([h,T[0]],"outOfRange"),c(T.slice()),h=T[1])},this),{stops:s,outerColors:l}}function c(m,T){var D=w.getRepresentValue({interval:m});T||(T=w.getValueState(D));var O=b(D,T);m[0]===-1/0?l[0]=O:m[1]===1/0?l[1]=O:s.push({value:m[0],color:O},{value:m[1],color:O})}}}),d={splitNumber:function(){var b=this.option,s=this._pieceList,l=Math.min(b.precision,20),w=this.getExtent(),I=b.splitNumber;b.splitNumber=I=Math.max(parseInt(I,10),1);for(var C=(w[1]-w[0])/I;+C.toFixed(l)!==C&&l<5;)l++;b.precision=l,C=+C.toFixed(l);var h=0;b.minOpen&&s.push({index:h++,interval:[-1/0,w[0]],close:[0,0]});for(var c=w[0],m=h+I;h<m;c+=C){var T=h===I-1?w[1]:c+C;s.push({index:h++,interval:[c,T],close:[1,1]})}b.maxOpen&&s.push({index:h++,interval:[w[1],1/0],close:[0,0]}),f(s),o.each(s,function(D){D.text=this.formatValueText(D.interval)},this)},categories:function(){var b=this.option;o.each(b.categories,function(s){this._pieceList.push({text:this.formatValueText(s,!0),value:s})},this),v(b,this._pieceList)},pieces:function(){var b=this.option,s=this._pieceList;o.each(b.pieces,function(l,w){o.isObject(l)||(l={value:l});var I={text:"",index:w};if(l.label!=null&&(I.text=l.label),l.hasOwnProperty("value")){var C=I.value=l.value;I.interval=[C,C],I.close=[1,1]}else{for(var h=I.interval=[],c=I.close=[0,0],m=[1,0,1],T=[-1/0,1/0],D=[],O=0;O<2;O++){for(var N=[["gte","gt","min"],["lte","lt","max"]][O],z=0;z<3&&h[O]==null;z++)h[O]=l[N[z]],c[O]=m[z],D[O]=z===2;h[O]==null&&(h[O]=T[O])}D[0]&&h[1]===1/0&&(c[0]=0),D[1]&&h[0]===-1/0&&(c[1]=0),h[0]===h[1]&&c[0]&&c[1]&&(I.value=h[0])}I.visual=_.retrieveVisuals(l),s.push(I)},this),v(b,s),f(s),o.each(s,function(l){var w=l.close,I=[["<","≤"][w[1]],[">","≥"][w[0]]];l.text=l.text||this.formatValueText(l.value!=null?l.value:l.interval,!1,I)},this)}};function v(b,s){var l=b.inverse;(b.orient==="vertical"?!l:l)&&s.reverse()}E.exports=y},10691:function(E,A,u){var o=u(23405),S=u(10613),_=u(51747),p=u(30696).createSymbol,f=u(62751),y=u(4687);E.exports=S.extend({type:"visualMap.piecewise",doRender:function(){var d=this.group;d.removeAll();var v=this.visualMapModel,b=v.get("textGap"),s=v.textStyleModel,l=s.getFont(),w=s.getTextColor(),I=this._getItemAlign(),C=v.itemSize,h=this._getViewData(),c=h.endsText,m=o.retrieve(v.get("showLabel",!0),!c);c&&this._renderEndsText(d,c[0],C,m,I),o.each(h.viewPieceList,function(T){var D=T.piece,O=new _.Group;O.onclick=o.bind(this._onItemClick,this,D),this._enableHoverLink(O,T.indexInModelPieceList);var N=v.getRepresentValue(D);if(this._createItemSymbol(O,N,[0,0,C[0],C[1]]),m){var z=this.visualMapModel.getValueState(N);O.add(new _.Text({style:{x:I==="right"?-b:C[0]+b,y:C[1]/2,text:D.text,textVerticalAlign:"middle",textAlign:I,textFont:l,textFill:w,opacity:z==="outOfRange"?.5:1}}))}d.add(O)},this),c&&this._renderEndsText(d,c[1],C,m,I),f.box(v.get("orient"),d,v.get("itemGap")),this.renderBackground(d),this.positionGroup(d)},_enableHoverLink:function(d,v){d.on("mouseover",o.bind(b,this,"highlight")).on("mouseout",o.bind(b,this,"downplay"));function b(s){var l=this.visualMapModel;l.option.hoverLink&&this.api.dispatchAction({type:s,batch:y.convertDataIndex(l.findTargetDataIndices(v))})}},_getItemAlign:function(){var d=this.visualMapModel,v=d.option;if(v.orient==="vertical")return y.getItemAlign(d,this.api,d.itemSize);var b=v.align;return b&&b!=="auto"||(b="left"),b},_renderEndsText:function(d,v,b,s,l){if(v){var w=new _.Group,I=this.visualMapModel.textStyleModel;w.add(new _.Text({style:{x:s?l==="right"?b[0]:0:b[0]/2,y:b[1]/2,textVerticalAlign:"middle",textAlign:s?l:"center",text:v,textFont:I.getFont(),textFill:I.getTextColor()}})),d.add(w)}},_getViewData:function(){var d=this.visualMapModel,v=o.map(d.getPieceList(),function(w,I){return{piece:w,indexInModelPieceList:I}}),b=d.get("text"),s=d.get("orient"),l=d.get("inverse");return(s==="horizontal"?l:!l)?v.reverse():b&&(b=b.slice().reverse()),{viewPieceList:v,endsText:b}},_createItemSymbol:function(d,v,b){d.add(p(this.getControllerVisual(v,"symbol"),b[0],b[1],b[2],b[3],this.getControllerVisual(v,"color")))},_onItemClick:function(d){var v=this.visualMapModel,b=v.option,s=o.clone(b.selected),l=v.getSelectedMapKey(d);b.selectedMode==="single"?(s[l]=!0,o.each(s,function(w,I){s[I]=I===l})):s[l]=!s[l],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:s})}})},23323:function(E,A,u){var o=u(87930),S=u(23405),_=u(23584),p=u(76047),f=u(32013),y=u(55925),d=u(51064),v=u(54684),b=f.mapVisual,s=f.eachVisual,l=S.isArray,w=S.each,I=v.asc,C=v.linearMap,h=S.noop;E.exports=o.extendComponentModel({type:"visualMap",dependencies:["series"],stateList:["inRange","outOfRange"],replacableOptionKeys:["inRange","outOfRange","target","controller","color"],dataBound:[-1/0,1/0],layoutMode:{type:"box",ignoreSize:!0},defaultOption:{show:!0,zlevel:0,z:4,seriesIndex:"all",min:0,max:200,dimension:null,inRange:null,outOfRange:null,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,color:null,formatter:null,text:null,textStyle:{color:"#333"}},init:function(c,m,T){this._dataExtent,this.targetVisuals={},this.controllerVisuals={},this.textStyleModel,this.itemSize,this.mergeDefaultAndTheme(c,T)},optionUpdated:function(c,m){var T=this.option;_.canvasSupported||(T.realtime=!1),m||y.replaceVisualOption(T,c,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},resetVisual:function(c){var m=this.stateList;c=S.bind(c,this),this.controllerVisuals=y.createVisualMappings(this.option.controller,m,c),this.targetVisuals=y.createVisualMappings(this.option.target,m,c)},getTargetSeriesIndices:function(){var c=this.option.seriesIndex,m=[];return c==null||c==="all"?this.ecModel.eachSeries(function(T,D){m.push(D)}):m=d.normalizeToArray(c),m},eachTargetSeries:function(c,m){S.each(this.getTargetSeriesIndices(),function(T){c.call(m,this.ecModel.getSeriesByIndex(T))},this)},isTargetSeries:function(c){var m=!1;return this.eachTargetSeries(function(T){T===c&&(m=!0)}),m},formatValueText:function(c,m,T){var D,O,N=this.option,z=N.precision,H=this.dataBound,$=N.formatter;if(T=T||["<",">"],S.isArray(c)&&(c=c.slice(),D=!0),O=m?c:D?[V(c[0]),V(c[1])]:V(c),S.isString($))return $.replace("{value}",D?O[0]:O).replace("{value2}",D?O[1]:O);if(S.isFunction($))return D?$(c[0],c[1]):$(c);if(!D)return O;if(c[0]===H[0])return T[0]+" "+O[1];if(c[1]===H[1])return T[1]+" "+O[0];return O[0]+" - "+O[1];function V(P){return P===H[0]?"min":P===H[1]?"max":(+P).toFixed(Math.min(z,20))}},resetExtent:function(){var c=this.option,m=I([c.min,c.max]);this._dataExtent=m},getDataDimension:function(c){var m=this.option.dimension,T=c.dimensions;if(m!=null||T.length){if(m!=null)return c.getDimension(m);for(var D=c.dimensions,O=D.length-1;O>=0;O--){var N=D[O];if(!c.getDimensionInfo(N).isCalculationCoord)return N}}},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){var c=this.ecModel,m=this.option,T={inRange:m.inRange,outOfRange:m.outOfRange},D=m.target||(m.target={}),O=m.controller||(m.controller={});S.merge(D,T),S.merge(O,T);var N=this.isCategory();function z(H){l(m.color)&&!H.inRange&&(H.inRange={color:m.color.slice().reverse()}),H.inRange=H.inRange||{color:c.get("gradientColor")},w(this.stateList,function($){var V=H[$];if(S.isString(V)){var P=p.get(V,"active",N);P?(H[$]={},H[$][V]=P):delete H[$]}},this)}z.call(this,D),z.call(this,O),(function(H,$,V){var P=H[$],U=H[V];P&&!U&&(U=H[V]={},w(P,function(Y,Z){if(f.isValidType(Z)){var X=p.get(Z,"inactive",N);X!=null&&(U[Z]=X,Z!=="color"||U.hasOwnProperty("opacity")||U.hasOwnProperty("colorAlpha")||(U.opacity=[0,0]))}}))}).call(this,D,"inRange","outOfRange"),(function(H){var $=(H.inRange||{}).symbol||(H.outOfRange||{}).symbol,V=(H.inRange||{}).symbolSize||(H.outOfRange||{}).symbolSize,P=this.get("inactiveColor");w(this.stateList,function(U){var Y=this.itemSize,Z=H[U];Z||(Z=H[U]={color:N?P:[P]}),Z.symbol==null&&(Z.symbol=$&&S.clone($)||(N?"roundRect":["roundRect"])),Z.symbolSize==null&&(Z.symbolSize=V&&S.clone(V)||(N?Y[0]:[Y[0],Y[0]])),Z.symbol=b(Z.symbol,function(q){return q==="none"||q==="square"?"roundRect":q});var X=Z.symbolSize;if(X!=null){var J=-1/0;s(X,function(q){q>J&&(J=q)}),Z.symbolSize=b(X,function(q){return C(q,[0,J],[0,Y[0]],!0)})}},this)}).call(this,O)},resetItemSize:function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},isCategory:function(){return!!this.option.categories},setSelected:h,getValueState:h,getVisualMeta:h})},10613:function(E,A,u){var o=u(87930),S=u(23405),_=u(51747),p=u(60653),f=u(62751),y=u(32013);E.exports=o.extendComponentView({type:"visualMap",autoPositionValues:{left:1,right:1,top:1,bottom:1},init:function(d,v){this.ecModel=d,this.api=v,this.visualMapModel},render:function(d,v,b,s){if(this.visualMapModel=d,d.get("show")===!1)return void this.group.removeAll();this.doRender.apply(this,arguments)},renderBackground:function(d){var v=this.visualMapModel,b=p.normalizeCssArray(v.get("padding")||0),s=d.getBoundingRect();d.add(new _.Rect({z2:-1,silent:!0,shape:{x:s.x-b[3],y:s.y-b[0],width:s.width+b[3]+b[1],height:s.height+b[0]+b[2]},style:{fill:v.get("backgroundColor"),stroke:v.get("borderColor"),lineWidth:v.get("borderWidth")}}))},getControllerVisual:function(d,v,b){var s=(b=b||{}).forceState,l=this.visualMapModel,w={};function I(m){return w[m]}function C(m,T){w[m]=T}v==="symbol"&&(w.symbol=l.get("itemSymbol")),v==="color"&&(w.color=l.get("contentColor"));var h=l.controllerVisuals[s||l.getValueState(d)],c=y.prepareVisualTypes(h);return S.each(c,function(m){var T=h[m];b.convertOpacityToAlpha&&m==="opacity"&&(m="colorAlpha",T=h.__alphaForOpacity),y.dependsOn(m,v)&&T&&T.applyVisual(d,I,C)}),w[v]},positionGroup:function(d){var v=this.visualMapModel,b=this.api;f.positionElement(d,v.getBoxLayoutParams(),{width:b.getWidth(),height:b.getHeight()})},doRender:S.noop})},4687:function(E,A,u){var o=u(23405),S=u(62751).getLayoutRect;A.getItemAlign=function(_,p,f){var y=_.option,d=y.align;if(d!=null&&d!=="auto")return d;for(var v={width:p.getWidth(),height:p.getHeight()},b=+(y.orient==="horizontal"),s=[["left","right","width"],["top","bottom","height"]],l=s[b],w=[0,null,10],I={},C=0;C<3;C++)I[s[1-b][C]]=w[C],I[l[C]]=C===2?f[0]:y[l[C]];var h=[["x","width",3],["y","height",0]][b],c=S(I,v,y.padding);return l[(c.margin[h[2]]||0)+c[h[0]]+.5*c[h[1]]<.5*v[h[1]]?0:1]},A.convertDataIndex=function(_){return o.each(_||[],function(p){_.dataIndex!=null&&(_.dataIndexInside=_.dataIndex,_.dataIndex=null)}),_}},41522:function(E,A,u){var o=u(23405),S=o.each;function _(p,f){return p&&p.hasOwnProperty&&p.hasOwnProperty(f)}E.exports=function(p){var f=p&&p.visualMap;o.isArray(f)||(f=f?[f]:[]),S(f,function(y){if(y){_(y,"splitList")&&!_(y,"pieces")&&(y.pieces=y.splitList,delete y.splitList);var d=y.pieces;d&&o.isArray(d)&&S(d,function(v){o.isObject(v)&&(_(v,"start")&&!_(v,"min")&&(v.min=v.start),_(v,"end")&&!_(v,"max")&&(v.max=v.end))})}})}},88344:function(E,A,u){u(28628).registerSubTypeDefaulter("visualMap",function(o){return o.categories||(o.pieces?o.pieces.length>0:o.splitNumber>0)&&!o.calculable?"piecewise":"continuous"})},23344:function(E,A,u){var o=u(87930),S=u(23405),_=u(55925),p=u(32013),f=o.PRIORITY.VISUAL.COMPONENT;function y(d,v,b,s){for(var l=v.targetVisuals[s],w=p.prepareVisualTypes(l),I={color:d.getData().getVisual("color")},C=0,h=w.length;C<h;C++){var c=w[C],m=l[c==="opacity"?"__alphaForOpacity":c];m&&m.applyVisual(b,T,D)}return I.color;function T(O){return I[O]}function D(O,N){I[O]=N}}o.registerVisual(f,{createOnAllSeries:!0,reset:function(d,v){var b=[];return v.eachComponent("visualMap",function(s){var l=d.pipelineContext;!s.isTargetSeries(d)||l&&l.large||b.push(_.incrementalApplyVisual(s.stateList,s.targetVisuals,S.bind(s.getValueState,s),s.getDataDimension(d.getData())))}),b}}),o.registerVisual(f,{createOnAllSeries:!0,reset:function(d,v){var b=d.getData(),s=[];v.eachComponent("visualMap",function(l){if(l.isTargetSeries(d)){var w=l.getVisualMeta(S.bind(y,null,d,l))||{stops:[],outerColors:[]},I=l.getDataDimension(b),C=b.getDimensionInfo(I);C!=null&&(w.dimension=C.index,s.push(w))}}),d.getData().setVisual("visualMeta",s)}})},7543:function(E,A,u){u(87930).registerAction({type:"selectDataRange",event:"dataRangeSelected",update:"update"},function(o,S){S.eachComponent({mainType:"visualMap",query:o},function(_){_.setSelected(o.selected)})})},95946:function(E,A,u){var o=u(87930),S=u(41522);u(88344),u(23344),u(48267),u(57395),u(7543),o.registerPreprocessor(S)},62495:function(E,A,u){var o=u(87930),S=u(41522);u(88344),u(23344),u(74236),u(10691),u(7543),o.registerPreprocessor(S)},9129:function(E,A,u){var o;typeof window<"u"?o=window.__DEV__:u.g!==void 0&&(o=u.g.__DEV__),o===void 0&&(o=!0),A.__DEV__=o},7371:function(E,A,u){var o=u(23405),S=o.each,_=o.map,p=u(54684),f=p.linearMap,y=p.getPixelPrecision,d=u(3222),v=d.createAxisTicks,b=d.createAxisLabels,s=d.calculateCategoryInterval,l=[0,1],w=function(C,h,c){this.dim=C,this.scale=h,this._extent=c||[0,0],this.inverse=!1,this.onBand=!1};function I(C,h){var c=(C[1]-C[0])/h/2;C[0]+=c,C[1]-=c}w.prototype={constructor:w,contain:function(C){var h=this._extent,c=Math.min(h[0],h[1]),m=Math.max(h[0],h[1]);return C>=c&&C<=m},containData:function(C){return this.contain(this.dataToCoord(C))},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(C){return y(C||this.scale.getExtent(),this._extent)},setExtent:function(C,h){var c=this._extent;c[0]=C,c[1]=h},dataToCoord:function(C,h){var c=this._extent,m=this.scale;return C=m.normalize(C),this.onBand&&m.type==="ordinal"&&I(c=c.slice(),m.count()),f(C,l,c,h)},coordToData:function(C,h){var c=this._extent,m=this.scale;this.onBand&&m.type==="ordinal"&&I(c=c.slice(),m.count());var T=f(C,c,l,h);return this.scale.scale(T)},pointToData:function(C,h){},getTicksCoords:function(C){var h=(C=C||{}).tickModel||this.getTickModel(),c=v(this,h),m=_(c.ticks,function(D){return{coord:this.dataToCoord(D),tickValue:D}},this),T=h.get("alignWithLabel");return function(D,O,N,z,H){var $,V=O.length;if(D.onBand&&!z&&V){var P,U,Y,Z,X,J,q,te,re=D.getExtent();if(V===1)O[0].coord=re[0],$=O[1]={coord:re[0]};else{var ie=O[1].coord-O[0].coord;S(O,function(le){le.coord-=ie/2;var fe=fe||0;fe%2>0&&(le.coord-=ie/((fe+1)*2))}),$={coord:O[V-1].coord+ie},O.push($)}var ne=re[0]>re[1];P=O[0].coord,U=re[0],(ne?P>U:P<U)&&(H?O[0].coord=re[0]:O.shift()),H&&(Y=re[0],Z=O[0].coord,ne?Y>Z:Y<Z)&&O.unshift({coord:re[0]}),X=re[1],J=$.coord,(ne?X>J:X<J)&&(H?$.coord=re[1]:O.pop()),H&&(q=$.coord,te=re[1],ne?q>te:q<te)&&O.push({coord:re[1]})}}(this,m,c.tickCategoryInterval,T,C.clamp),m},getViewLabels:function(){return b(this).labels},getLabelModel:function(){return this.model.getModel("axisLabel")},getTickModel:function(){return this.model.getModel("axisTick")},getBandWidth:function(){var C=this._extent,h=this.scale.getExtent(),c=h[1]-h[0]+ +!!this.onBand;return c===0&&(c=1),Math.abs(Math.abs(C[1]-C[0]))/c},isHorizontal:null,getRotate:null,calculateCategoryInterval:function(){return s(this)}},E.exports=w},42458:function(E,A,u){var o=u(23405),S=u(76414),_=u(79442),p=u(28761),f=u(1965),y=S.applyTransform;function d(){f.call(this)}function v(s){this.name=s,this.zoomLimit,f.call(this),this._roamTransformable=new d,this._rawTransformable=new d,this._center,this._zoom}function b(s,l,w,I){var C=w.seriesModel,h=C?C.coordinateSystem:null;return h===this?h[s](I):null}o.mixin(d,f),v.prototype={constructor:v,type:"view",dimensions:["x","y"],setBoundingRect:function(s,l,w,I){return this._rect=new p(s,l,w,I),this._rect},getBoundingRect:function(){return this._rect},setViewRect:function(s,l,w,I){this.transformTo(s,l,w,I),this._viewRect=new p(s,l,w,I)},transformTo:function(s,l,w,I){var C=this.getBoundingRect(),h=this._rawTransformable;h.transform=C.calculateTransform(new p(s,l,w,I)),h.decomposeTransform(),this._updateTransform()},setCenter:function(s){s&&(this._center=s,this._updateCenterAndZoom())},setZoom:function(s){s=s||1;var l=this.zoomLimit;l&&(l.max!=null&&(s=Math.min(l.max,s)),l.min!=null&&(s=Math.max(l.min,s))),this._zoom=s,this._updateCenterAndZoom()},getDefaultCenter:function(){var s=this.getBoundingRect();return[s.x+s.width/2,s.y+s.height/2]},getCenter:function(){return this._center||this.getDefaultCenter()},getZoom:function(){return this._zoom||1},getRoamTransform:function(){return this._roamTransformable.getLocalTransform()},_updateCenterAndZoom:function(){var s=this._rawTransformable.getLocalTransform(),l=this._roamTransformable,w=this.getDefaultCenter(),I=this.getCenter(),C=this.getZoom();I=S.applyTransform([],I,s),w=S.applyTransform([],w,s),l.origin=I,l.position=[w[0]-I[0],w[1]-I[1]],l.scale=[C,C],this._updateTransform()},_updateTransform:function(){var s=this._roamTransformable,l=this._rawTransformable;l.parent=s,s.updateTransform(),l.updateTransform(),_.copy(this.transform||(this.transform=[]),l.transform||_.create()),this._rawTransform=l.getLocalTransform(),this.invTransform=this.invTransform||[],_.invert(this.invTransform,this.transform),this.decomposeTransform()},getViewRect:function(){return this._viewRect},getViewRectAfterRoam:function(){var s=this.getBoundingRect().clone();return s.applyTransform(this.transform),s},dataToPoint:function(s,l,w){var I=l?this._rawTransform:this.transform;return w=w||[],I?y(w,s,I):S.copy(w,s)},pointToData:function(s){var l=this.invTransform;return l?y([],s,l):[s[0],s[1]]},convertToPixel:o.curry(b,"dataToPoint"),convertFromPixel:o.curry(b,"pointToData"),containPoint:function(s){return this.getViewRectAfterRoam().contain(s[0],s[1])}},o.mixin(v,f),E.exports=v},68639:function(E,A,u){var o=u(23405),S={show:!0,zlevel:0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#333",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},_={};_.categoryAxis=o.merge({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},S),_.valueAxis=o.merge({boundaryGap:[0,0],splitNumber:5},S),_.timeAxis=o.defaults({scale:!0,min:"dataMin",max:"dataMax"},_.valueAxis),_.logAxis=o.defaults({scale:!0,logBase:10},_.valueAxis),E.exports=_},51261:function(E,A,u){u(9129).__DEV__;var o=u(23405),S=u(20741),_=u(86855),p=u(49065),f=u(54684),y=u(76918),d=y.prepareLayoutBarSeries,v=y.makeColumnLayout,b=y.retrieveColumnLayout,s=u(28761);function l(h,c){var m=h.type,T=c.getMin(),D=c.getMax(),O=T!=null,N=D!=null,z=h.getExtent();m==="ordinal"?$=c.getCategories().length:(V=c.get("boundaryGap"),o.isArray(V)||(V=[V||0,V||0]),typeof V[0]=="boolean"&&(V=[0,0]),V[0]=f.parsePercent(V[0],1),V[1]=f.parsePercent(V[1],1),P=z[1]-z[0]||Math.abs(z[0])),T==null&&(T=m==="ordinal"?$?0:NaN:z[0]-V[0]*P),D==null&&(D=m==="ordinal"?$?$-1:NaN:z[1]+V[1]*P),T==="dataMin"?T=z[0]:typeof T=="function"&&(T=T({min:z[0],max:z[1]})),D==="dataMax"?D=z[1]:typeof D=="function"&&(D=D({min:z[0],max:z[1]})),T!=null&&isFinite(T)||(T=NaN),D!=null&&isFinite(D)||(D=NaN),h.setBlank(o.eqNaN(T)||o.eqNaN(D)||m==="ordinal"&&!h.getOrdinalMeta().categories.length),c.getNeedCrossZero()&&(T>0&&D>0&&!O&&(T=0),T<0&&D<0&&!N&&(D=0));var H=c.ecModel;if(H&&m==="time"){var $,V,P,U,Y=d("bar",H);if(o.each(Y,function(X){U|=X.getBaseAxis()===c.axis}),U){var Z=function(X,J,q,te){var re=q.axis.getExtent(),ie=re[1]-re[0],ne=b(te,q.axis);if(ne===void 0)return{min:X,max:J};var le=1/0;o.each(ne,function(be){le=Math.min(be.offset,le)});var fe=-1/0;o.each(ne,function(be){fe=Math.max(be.offset+be.width,fe)});var we=(le=Math.abs(le))+(fe=Math.abs(fe)),pe=J-X,ve=pe/(1-(le+fe)/ie)-pe;return J+=fe/we*ve,{min:X-=le/we*ve,max:J}}(T,D,c,v(Y));T=Z.min,D=Z.max}}return[T,D]}function w(h){var c,m=h.getLabelModel().get("formatter"),T=h.type==="category"?h.scale.getExtent()[0]:null;return typeof m=="string"?(c=m,m=function(D){return D=h.scale.getLabel(D),c.replace("{value}",D??"")}):typeof m=="function"?function(D,O){return T!=null&&(O=D-T),m(I(h,D),O)}:function(D){return h.scale.getLabel(D)}}function I(h,c){return h.type==="category"?h.scale.getLabel(c):c}function C(h){var c=h.get("interval");return c??"auto"}u(74635),u(28010),A.getScaleExtent=l,A.niceScaleExtent=function(h,c){var m=l(h,c),T=c.getMin()!=null,D=c.getMax()!=null,O=c.get("splitNumber");h.type==="log"&&(h.base=c.get("logBase"));var N=h.type;h.setExtent(m[0],m[1]),h.niceExtent({splitNumber:O,fixMin:T,fixMax:D,minInterval:N==="interval"||N==="time"?c.get("minInterval"):null,maxInterval:N==="interval"||N==="time"?c.get("maxInterval"):null});var z=c.get("interval");z!=null&&h.setInterval&&h.setInterval(z)},A.createScaleByModel=function(h,c){if(c=c||h.get("type"))switch(c){case"category":return new S(h.getOrdinalMeta?h.getOrdinalMeta():h.getCategories(),[1/0,-1/0]);case"value":return new _;default:return(p.getClass(c)||_).create(h)}},A.ifAxisCrossZero=function(h){var c=h.scale.getExtent(),m=c[0],T=c[1];return!(m>0&&T>0||m<0&&T<0)},A.makeLabelFormatter=w,A.getAxisRawValue=I,A.estimateLabelUnionRect=function(h){var c,m,T,D=h.model,O=h.scale;if(!(!D.get("axisLabel.show")||O.isBlank())){var N=h.type==="category",z=O.getExtent();m=N?O.count():(c=O.getTicks()).length;var H=h.getLabelModel(),$=w(h),V=1;m>40&&(V=Math.ceil(m/40));for(var P=0;P<m;P+=V){var U=$(c?c[P]:z[0]+P),Y=function(Z,X){var J=X*Math.PI/180,q=Z.plain(),te=q.width,re=q.height,ie=te*Math.cos(J)+re*Math.sin(J),ne=te*Math.sin(J)+re*Math.cos(J);return new s(q.x,q.y,ie,ne)}(H.getTextRect(U),H.get("rotate")||0);T?T.union(Y):T=Y}return T}},A.getOptionCategoryInterval=C,A.shouldShowAllLabels=function(h){return h.type==="category"&&C(h.getLabelModel())===0}},98477:function(E,A,u){var o=u(23405);E.exports={getMin:function(S){var _=this.option,p=S||_.rangeStart==null?_.min:_.rangeStart;return this.axis&&p!=null&&p!=="dataMin"&&typeof p!="function"&&!o.eqNaN(p)&&(p=this.axis.scale.parse(p)),p},getMax:function(S){var _=this.option,p=S||_.rangeEnd==null?_.max:_.rangeEnd;return this.axis&&p!=null&&p!=="dataMax"&&typeof p!="function"&&!o.eqNaN(p)&&(p=this.axis.scale.parse(p)),p},getNeedCrossZero:function(){var S=this.option;return S.rangeStart==null&&S.rangeEnd==null&&!S.scale},getCoordSysModel:o.noop,setRange:function(S,_){this.option.rangeStart=S,this.option.rangeEnd=_},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}}},47329:function(E,A,u){var o=u(23405),S=u(68639),_=u(28628),p=u(62751),f=p.getLayoutParams,y=p.mergeLayoutParam,d=u(85508),v=["value","category","time","log"];E.exports=function(b,s,l,w){o.each(v,function(I){s.extend({type:b+"Axis."+I,mergeDefaultAndTheme:function(C,h){var c=this.layoutMode,m=c?f(C):{},T=h.getTheme();o.merge(C,T.get(I+"Axis")),o.merge(C,this.getDefaultOption()),C.type=l(b,C),c&&y(C,m,c)},optionUpdated:function(){this.option.type==="category"&&(this.__ordinalMeta=d.createByAxisModel(this))},getCategories:function(C){var h=this.option;if(h.type==="category")return C?h.data:this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:o.mergeAll([{},S[I+"Axis"],w],!0)})}),_.registerSubTypeDefaulter(b+"Axis",o.curry(l,b))}},3222:function(E,A,u){var o=u(23405),S=u(24570),_=u(51064).makeInner,p=u(51261),f=p.makeLabelFormatter,y=p.getOptionCategoryInterval,d=p.shouldShowAllLabels,v=_();function b(h,c){var m,T,D,O,N=s(h,"labels"),z=y(c),H=l(N,z);return H||(o.isFunction(z)?D=C(h,z):(O=z==="auto"?(T=v(m=h).autoInterval)!=null?T:v(m).autoInterval=m.calculateCategoryInterval():z,D=I(h,O)),w(N,z,{labels:D,labelCategoryInterval:O}))}function s(h,c){return v(h)[c]||(v(h)[c]=[])}function l(h,c){for(var m=0;m<h.length;m++)if(h[m].key===c)return h[m].value}function w(h,c,m){return h.push({key:c,value:m}),m}function I(h,c,m){var T=f(h),D=h.scale,O=D.getExtent(),N=h.getLabelModel(),z=[],H=Math.max((c||0)+1,1),$=O[0],V=D.count();$!==0&&H>1&&V/H>2&&($=Math.round(Math.ceil($/H)*H));var P=d(h),U=N.get("showMinLabel")||P,Y=N.get("showMaxLabel")||P;U&&$!==O[0]&&X(O[0]);for(var Z=$;Z<=O[1];Z+=H)X(Z);function X(J){z.push(m?J:{formattedLabel:T(J),rawLabel:D.getLabel(J),tickValue:J})}return Y&&Z!==O[1]&&X(O[1]),z}function C(h,c,m){var T=h.scale,D=f(h),O=[];return o.each(T.getTicks(),function(N){var z=T.getLabel(N);c(N,z)&&O.push(m?N:{formattedLabel:D(N),rawLabel:z,tickValue:N})}),O}A.createAxisLabels=function(h){var c,m,T,D,O,N;return h.type==="category"?(m=(c=h).getLabelModel(),T=b(c,m),!m.get("show")||c.scale.isBlank()?{labels:[],labelCategoryInterval:T.labelCategoryInterval}:T):(O=(D=h).scale.getTicks(),N=f(D),{labels:o.map(O,function(z,H){return{formattedLabel:N(z,H),rawLabel:D.scale.getLabel(z),tickValue:z}})})},A.createAxisTicks=function(h,c){return h.type==="category"?function(m,T){var D,O,N=s(m,"ticks"),z=y(T),H=l(N,z);if(H)return H;if((!T.get("show")||m.scale.isBlank())&&(D=[]),o.isFunction(z))D=C(m,z,!0);else if(z==="auto"){var $=b(m,m.getLabelModel());O=$.labelCategoryInterval,D=o.map($.labels,function(V){return V.tickValue})}else D=I(m,O=z,!0);return w(N,z,{ticks:D,tickCategoryInterval:O})}(h,c):{ticks:h.scale.getTicks()}},A.calculateCategoryInterval=function(h){var c,m,T=(m=(c=h).getLabelModel(),{axisRotate:c.getRotate?c.getRotate():c.isHorizontal&&!c.isHorizontal()?90:0,labelRotate:m.get("rotate")||0,font:m.getFont()}),D=f(h),O=(T.axisRotate-T.labelRotate)/180*Math.PI,N=h.scale,z=N.getExtent(),H=N.count();if(z[1]-z[0]<1)return 0;var $=1;H>40&&($=Math.max(1,Math.floor(H/40)));for(var V=z[0],P=h.dataToCoord(V+1)-h.dataToCoord(V),U=Math.abs(P*Math.cos(O)),Y=Math.abs(P*Math.sin(O)),Z=0,X=0;V<=z[1];V+=$){var J=0,q=0,te=S.getBoundingRect(D(V),T.font,"center","top");J=1.3*te.width,q=1.3*te.height,Z=Math.max(Z,J,7),X=Math.max(X,q,7)}var re=Z/U,ie=X/Y;isNaN(re)&&(re=1/0),isNaN(ie)&&(ie=1/0);var ne=Math.max(0,Math.floor(Math.min(re,ie))),le=v(h.model),fe=le.lastAutoInterval,we=le.lastTickCount;return fe!=null&&we!=null&&1>=Math.abs(fe-ne)&&1>=Math.abs(we-H)&&fe>ne?ne=fe:(le.lastTickCount=H,le.lastAutoInterval=ne),ne}},91370:function(E,A,u){var o=u(23405),S=u(62751),_=u(54684),p=u(17234);function f(d,v,b){this._model=d}function y(d,v,b,s){var l=b.calendarModel,w=b.seriesModel,I=l?l.coordinateSystem:w?w.coordinateSystem:null;return I===this?I[d](s):null}f.prototype={constructor:f,type:"calendar",dimensions:["time","value"],getDimensionsInfo:function(){return[{name:"time",type:"time"},"value"]},getRangeInfo:function(){return this._rangeInfo},getModel:function(){return this._model},getRect:function(){return this._rect},getCellWidth:function(){return this._sw},getCellHeight:function(){return this._sh},getOrient:function(){return this._orient},getFirstDayOfWeek:function(){return this._firstDayOfWeek},getDateInfo:function(d){var v=(d=_.parseDate(d)).getFullYear(),b=d.getMonth()+1;b=b<10?"0"+b:b;var s=d.getDate();s=s<10?"0"+s:s;var l=d.getDay();return{y:v,m:b,d:s,day:l=Math.abs((l+7-this.getFirstDayOfWeek())%7),time:d.getTime(),formatedDate:v+"-"+b+"-"+s,date:d}},getNextNDay:function(d,v){return(v=v||0)===0||(d=new Date(this.getDateInfo(d).time)).setDate(d.getDate()+v),this.getDateInfo(d)},update:function(d,v){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var b=this._rangeInfo.weeks||1,s=["width","height"],l=this._model.get("cellSize").slice(),w=this._model.getBoxLayoutParams(),I=this._orient==="horizontal"?[b,7]:[7,b];o.each([0,1],function(m){c(l,m)&&(w[s[m]]=l[m]*I[m])});var C={width:v.getWidth(),height:v.getHeight()},h=this._rect=S.getLayoutRect(w,C);function c(m,T){return m[T]!=null&&m[T]!=="auto"}o.each([0,1],function(m){c(l,m)||(l[m]=h[s[m]]/I[m])}),this._sw=l[0],this._sh=l[1]},dataToPoint:function(d,v){o.isArray(d)&&(d=d[0]),v==null&&(v=!0);var b=this.getDateInfo(d),s=this._rangeInfo,l=b.formatedDate;if(v&&!(b.time>=s.start.time&&b.time<s.end.time+864e5))return[NaN,NaN];var w=b.day,I=this._getRangeInfo([s.start.time,l]).nthWeek;return this._orient==="vertical"?[this._rect.x+w*this._sw+this._sw/2,this._rect.y+I*this._sh+this._sh/2]:[this._rect.x+I*this._sw+this._sw/2,this._rect.y+w*this._sh+this._sh/2]},pointToData:function(d){var v=this.pointToDate(d);return v&&v.time},dataToRect:function(d,v){var b=this.dataToPoint(d,v);return{contentShape:{x:b[0]-(this._sw-this._lineWidth)/2,y:b[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:b,tl:[b[0]-this._sw/2,b[1]-this._sh/2],tr:[b[0]+this._sw/2,b[1]-this._sh/2],br:[b[0]+this._sw/2,b[1]+this._sh/2],bl:[b[0]-this._sw/2,b[1]+this._sh/2]}},pointToDate:function(d){var v=Math.floor((d[0]-this._rect.x)/this._sw)+1,b=Math.floor((d[1]-this._rect.y)/this._sh)+1,s=this._rangeInfo.range;return this._orient==="vertical"?this._getDateByWeeksAndDay(b,v-1,s):this._getDateByWeeksAndDay(v,b-1,s)},convertToPixel:o.curry(y,"dataToPoint"),convertFromPixel:o.curry(y,"pointToData"),_initRangeOption:function(){var d=this._model.get("range"),v=d;if(o.isArray(v)&&v.length===1&&(v=v[0]),/^\d{4}$/.test(v)&&(d=[v+"-01-01",v+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(v)){var b=this.getDateInfo(v),s=b.date;s.setMonth(s.getMonth()+1);var l=this.getNextNDay(s,-1);d=[b.formatedDate,l.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(v)&&(d=[v,v]);var w=this._getRangeInfo(d);return w.start.time>w.end.time&&d.reverse(),d},_getRangeInfo:function(d){(d=[this.getDateInfo(d[0]),this.getDateInfo(d[1])])[0].time>d[1].time&&(v=!0,d.reverse());var v,b=Math.floor(d[1].time/864e5)-Math.floor(d[0].time/864e5)+1,s=new Date(d[0].time),l=s.getDate(),w=d[1].date.getDate();if(s.setDate(l+b-1),s.getDate()!==w)for(var I=s.getTime()-d[1].time>0?1:-1;s.getDate()!==w&&(s.getTime()-d[1].time)*I>0;)b-=I,s.setDate(l+b-1);var C=Math.floor((b+d[0].day+6)/7),h=v?-C+1:C-1;return v&&d.reverse(),{range:[d[0].formatedDate,d[1].formatedDate],start:d[0],end:d[1],allDay:b,weeks:C,nthWeek:h,fweek:d[0].day,lweek:d[1].day}},_getDateByWeeksAndDay:function(d,v,b){var s=this._getRangeInfo(b);if(d>s.weeks||d===0&&v<s.fweek||d===s.weeks&&v>s.lweek)return!1;var l=(d-1)*7-s.fweek+v,w=new Date(s.start.time);return w.setDate(s.start.d+l),this.getDateInfo(w)}},f.dimensions=f.prototype.dimensions,f.getDimensionsInfo=f.prototype.getDimensionsInfo,f.create=function(d,v){var b=[];return d.eachComponent("calendar",function(s){var l=new f(s);b.push(l),s.coordinateSystem=l}),d.eachSeries(function(s){s.get("coordinateSystem")==="calendar"&&(s.coordinateSystem=b[s.get("calendarIndex")||0])}),b},p.register("calendar",f),E.exports=f},54466:function(E,A,u){var o=u(23405),S=u(28628),_=u(62751),p=_.getLayoutParams,f=_.sizeCalculable,y=_.mergeLayoutParam,d=S.extend({type:"calendar",coordinateSystem:null,defaultOption:{zlevel:0,z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",nameMap:"en",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},init:function(b,s,l,w){var I=p(b);d.superApply(this,"init",arguments),v(b,I)},mergeOption:function(b,s){d.superApply(this,"mergeOption",arguments),v(this.option,b)}});function v(b,s){var l=b.cellSize;o.isArray(l)?l.length===1&&(l[1]=l[0]):l=b.cellSize=[l,l];var w=o.map([0,1],function(I){return f(s,I)&&(l[I]="auto"),l[I]!=null&&l[I]!=="auto"});y(b,s,{type:"box",ignoreSize:w})}E.exports=d},29952:function(E){E.exports=function(A){var u=A.getRect(),o=A.getRangeInfo();return{coordSys:{type:"calendar",x:u.x,y:u.y,width:u.width,height:u.height,cellWidth:A.getCellWidth(),cellHeight:A.getCellHeight(),rangeInfo:{start:o.start,end:o.end,weeks:o.weeks,dayCount:o.allDay}},api:{coord:function(S,_){return A.dataToPoint(S,_)}}}}},74999:function(E,A,u){var o=u(23405),S=u(7371),_=function(p,f,y,d,v){S.call(this,p,f,y),this.type=d||"value",this.position=v||"bottom"};_.prototype={constructor:_,index:0,getAxesOnZeroOf:null,model:null,isHorizontal:function(){var p=this.position;return p==="top"||p==="bottom"},getGlobalExtent:function(p){var f=this.getExtent();return f[0]=this.toGlobalCoord(f[0]),f[1]=this.toGlobalCoord(f[1]),p&&f[0]>f[1]&&f.reverse(),f},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(p,f){return this.coordToData(this.toLocalCoord(p[+(this.dim!=="x")]),f)},toLocalCoord:null,toGlobalCoord:null},o.inherits(_,S),E.exports=_},64464:function(E,A,u){var o=u(23405),S=u(28628),_=u(47329),p=u(98477),f=S.extend({type:"cartesian2dAxis",axis:null,init:function(){f.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){f.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){f.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});function y(v,b){return b.type||(b.data?"category":"value")}o.merge(f.prototype,p);var d={offset:0};_("x",f,y,d),_("y",f,y,d),E.exports=f},82309:function(E,A,u){var o=u(23405);function S(p){return this._axes[p]}var _=function(p){this._axes={},this._dimList=[],this.name=p||""};_.prototype={constructor:_,type:"cartesian",getAxis:function(p){return this._axes[p]},getAxes:function(){return o.map(this._dimList,S,this)},getAxesByScale:function(p){return p=p.toLowerCase(),o.filter(this.getAxes(),function(f){return f.scale.type===p})},addAxis:function(p){var f=p.dim;this._axes[f]=p,this._dimList.push(f)},dataToCoord:function(p){return this._dataCoordConvert(p,"dataToCoord")},coordToData:function(p){return this._dataCoordConvert(p,"coordToData")},_dataCoordConvert:function(p,f){for(var y=this._dimList,d=p instanceof Array?[]:{},v=0;v<y.length;v++){var b=y[v],s=this._axes[b];d[b]=s[f](p[b])}return d}},E.exports=_},25141:function(E,A,u){var o=u(23405),S=u(82309);function _(p){S.call(this,p)}_.prototype={constructor:_,type:"cartesian2d",dimensions:["x","y"],getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},containPoint:function(p){var f=this.getAxis("x"),y=this.getAxis("y");return f.contain(f.toLocalCoord(p[0]))&&y.contain(y.toLocalCoord(p[1]))},containData:function(p){return this.getAxis("x").containData(p[0])&&this.getAxis("y").containData(p[1])},dataToPoint:function(p,f,y){var d=this.getAxis("x"),v=this.getAxis("y");return(y=y||[])[0]=d.toGlobalCoord(d.dataToCoord(p[0])),y[1]=v.toGlobalCoord(v.dataToCoord(p[1])),y},clampData:function(p,f){var y=this.getAxis("x").scale,d=this.getAxis("y").scale,v=y.getExtent(),b=d.getExtent(),s=y.parse(p[0]),l=d.parse(p[1]);return(f=f||[])[0]=Math.min(Math.max(Math.min(v[0],v[1]),s),Math.max(v[0],v[1])),f[1]=Math.min(Math.max(Math.min(b[0],b[1]),l),Math.max(b[0],b[1])),f},pointToData:function(p,f){var y=this.getAxis("x"),d=this.getAxis("y");return(f=f||[])[0]=y.coordToData(y.toLocalCoord(p[0])),f[1]=d.coordToData(d.toLocalCoord(p[1])),f},getOtherAxis:function(p){return this.getAxis(p.dim==="x"?"y":"x")}},o.inherits(_,S),E.exports=_},72768:function(E,A,u){u(9129).__DEV__;var o=u(23405),S=o.isObject,_=o.each,p=o.map,f=o.indexOf;o.retrieve;var y=u(62751).getLayoutRect,d=u(51261),v=d.createScaleByModel,b=d.ifAxisCrossZero,s=d.niceScaleExtent,l=d.estimateLabelUnionRect,w=u(25141),I=u(74999),C=u(17234),h=u(91968).getStackedDimension;function c($,V,P){return $.getCoordSysModel()===V}function m($,V,P){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian($,V,P),this.model=$}u(35602);var T=m.prototype;function D($,V,P,U){P.getAxesOnZeroOf=function(){return Y?[Y]:[]};var Y,Z=$[V],X=P.model,J=X.get("axisLine.onZero"),q=X.get("axisLine.onZeroAxisIndex");if(J){if(q!=null)O(Z[q])&&(Y=Z[q]);else for(var te in Z)if(Z.hasOwnProperty(te)&&O(Z[te])&&!U[re(Z[te])]){Y=Z[te];break}Y&&(U[re(Y)]=!0)}function re(ie){return ie.dim+"_"+ie.index}}function O($){return $&&$.type!=="category"&&$.type!=="time"&&b($)}T.type="grid",T.axisPointerEnabled=!0,T.getRect=function(){return this._rect},T.update=function($,V){var P=this._axesMap;this._updateScale($,this.model),_(P.x,function(Y){s(Y.scale,Y.model)}),_(P.y,function(Y){s(Y.scale,Y.model)});var U={};_(P.x,function(Y){D(P,"y",Y,U)}),_(P.y,function(Y){D(P,"x",Y,U)}),this.resize(this.model,V)},T.resize=function($,V,P){var U=y($.getBoxLayoutParams(),{width:V.getWidth(),height:V.getHeight()});this._rect=U;var Y=this._axesList;function Z(){_(Y,function(X){var J,q,te,re,ie=X.isHorizontal(),ne=ie?[0,U.width]:[0,U.height],le=+!!X.inverse;X.setExtent(ne[le],ne[1-le]),J=X,q=ie?U.x:U.y,re=(te=J.getExtent())[0]+te[1],J.toGlobalCoord=J.dim==="x"?function(fe){return fe+q}:function(fe){return re-fe+q},J.toLocalCoord=J.dim==="x"?function(fe){return fe-q}:function(fe){return re-fe+q}})}Z(),!P&&$.get("containLabel")&&(_(Y,function(X){if(!X.model.get("axisLabel.inside")){var J=l(X);if(J){var q=X.isHorizontal()?"height":"width",te=X.model.get("axisLabel.margin");U[q]-=J[q]+te,X.position==="top"?U.y+=J.height+te:X.position==="left"&&(U.x+=J.width+te)}}}),Z())},T.getAxis=function($,V){var P=this._axesMap[$];if(P!=null){if(V==null){for(var U in P)if(P.hasOwnProperty(U))return P[U]}return P[V]}},T.getAxes=function(){return this._axesList.slice()},T.getCartesian=function($,V){if($!=null&&V!=null){var P="x"+$+"y"+V;return this._coordsMap[P]}S($)&&(V=$.yAxisIndex,$=$.xAxisIndex);for(var U=0,Y=this._coordsList;U<Y.length;U++)if(Y[U].getAxis("x").index===$||Y[U].getAxis("y").index===V)return Y[U]},T.getCartesians=function(){return this._coordsList.slice()},T.convertToPixel=function($,V,P){var U=this._findConvertTarget($,V);return U.cartesian?U.cartesian.dataToPoint(P):U.axis?U.axis.toGlobalCoord(U.axis.dataToCoord(P)):null},T.convertFromPixel=function($,V,P){var U=this._findConvertTarget($,V);return U.cartesian?U.cartesian.pointToData(P):U.axis?U.axis.coordToData(U.axis.toLocalCoord(P)):null},T._findConvertTarget=function($,V){var P,U,Y=V.seriesModel,Z=V.xAxisModel||Y&&Y.getReferringComponents("xAxis")[0],X=V.yAxisModel||Y&&Y.getReferringComponents("yAxis")[0],J=V.gridModel,q=this._coordsList;return Y?0>f(q,P=Y.coordinateSystem)&&(P=null):Z&&X?P=this.getCartesian(Z.componentIndex,X.componentIndex):Z?U=this.getAxis("x",Z.componentIndex):X?U=this.getAxis("y",X.componentIndex):J&&J.coordinateSystem===this&&(P=this._coordsList[0]),{cartesian:P,axis:U}},T.containPoint=function($){var V=this._coordsList[0];if(V)return V.containPoint($)},T._initCartesian=function($,V,P){var U={left:!1,right:!1,top:!1,bottom:!1},Y={x:{},y:{}},Z={x:0,y:0};if(V.eachComponent("xAxis",X("x"),this),V.eachComponent("yAxis",X("y"),this),!Z.x||!Z.y){this._axesMap={},this._axesList=[];return}function X(J){return function(q,te){if(c(q,$)){var re=q.get("position");J==="x"?re!=="top"&&re!=="bottom"&&U[re="bottom"]&&(re=re==="top"?"bottom":"top"):re!=="left"&&re!=="right"&&U[re="left"]&&(re=re==="left"?"right":"left"),U[re]=!0;var ie=new I(J,v(q),[0,0],q.get("type"),re),ne=ie.type==="category";ie.onBand=ne&&q.get("boundaryGap"),ie.inverse=q.get("inverse"),q.axis=ie,ie.model=q,ie.grid=this,ie.index=te,this._axesList.push(ie),Y[J][te]=ie,Z[J]++}}}this._axesMap=Y,_(Y.x,function(J,q){_(Y.y,function(te,re){var ie="x"+q+"y"+re,ne=new w(ie);ne.grid=this,ne.model=$,this._coordsMap[ie]=ne,this._coordsList.push(ne),ne.addAxis(J),ne.addAxis(te)},this)},this)},T._updateScale=function($,V){function P(U,Y,Z){_(U.mapDimension(Y.dim,!0),function(X){Y.scale.unionExtentFromData(U,h(U,X))})}_(this._axesList,function(U){U.scale.setExtent(1/0,-1/0)}),$.eachSeries(function(U){if(H(U)){var Y=z(U),Z=Y[0],X=Y[1];if(c(Z,V)&&c(X,V)){var J=this.getCartesian(Z.componentIndex,X.componentIndex),q=U.getData(),te=J.getAxis("x"),re=J.getAxis("y");q.type==="list"&&(P(q,te),P(q,re))}}},this)},T.getTooltipAxes=function($){var V=[],P=[];return _(this.getCartesians(),function(U){var Y=$!=null&&$!=="auto"?U.getAxis($):U.getBaseAxis(),Z=U.getOtherAxis(Y);0>f(V,Y)&&V.push(Y),0>f(P,Z)&&P.push(Z)}),{baseAxes:V,otherAxes:P}};var N=["xAxis","yAxis"];function z($,V){return p(N,function(P){return $.getReferringComponents(P)[0]})}function H($){return $.get("coordinateSystem")==="cartesian2d"}m.create=function($,V){var P=[];return $.eachComponent("grid",function(U,Y){var Z=new m(U,$,V);Z.name="grid_"+Y,Z.resize(U,V,!0),U.coordinateSystem=Z,P.push(Z)}),$.eachSeries(function(U){if(H(U)){var Y=z(U),Z=Y[0],X=Y[1];U.coordinateSystem=Z.getCoordSysModel().coordinateSystem.getCartesian(Z.componentIndex,X.componentIndex)}}),P},m.dimensions=m.prototype.dimensions=w.prototype.dimensions,C.register("cartesian2d",m),E.exports=m},35602:function(E,A,u){u(64464),E.exports=u(28628).extend({type:"grid",dependencies:["xAxis","yAxis"],layoutMode:"box",coordinateSystem:null,defaultOption:{show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"}})},2244:function(E,A,u){var o=u(23405);A.layout=function(S,_,p){p=p||{};var f=S.coordinateSystem,y=_.axis,d={},v=y.getAxesOnZeroOf()[0],b=y.position,s=v?"onZero":b,l=y.dim,w=f.getRect(),I=[w.x,w.x+w.width,w.y,w.y+w.height],C={left:0,right:1,top:0,bottom:1,onZero:2},h=_.get("offset")||0,c=l==="x"?[I[2]-h,I[3]+h]:[I[0]-h,I[1]+h];if(v){var m=v.toGlobalCoord(v.dataToCoord(0));c[C.onZero]=Math.max(Math.min(m,c[1]),c[0])}d.position=[l==="y"?c[C[s]]:I[0],l==="x"?c[C[s]]:I[3]],d.rotation=Math.PI/2*+(l!=="x"),d.labelDirection=d.tickDirection=d.nameDirection={top:-1,bottom:1,left:-1,right:1}[b],d.labelOffset=v?c[C[b]]-c[C.onZero]:0,_.get("axisTick.inside")&&(d.tickDirection=-d.tickDirection),o.retrieve(p.labelInside,_.get("axisLabel.inside"))&&(d.labelDirection=-d.labelDirection);var T=_.get("axisLabel.rotate");return d.labelRotate=s==="top"?-T:T,d.z2=1,d}},79090:function(E,A,u){var o=u(23405);function S(_,p){return p=p||[0,0],o.map(["x","y"],function(f,y){var d=this.getAxis(f),v=p[y],b=_[y]/2;return d.type==="category"?d.getBandWidth():Math.abs(d.dataToCoord(v-b)-d.dataToCoord(v+b))},this)}E.exports=function(_){var p=_.grid.getRect();return{coordSys:{type:"cartesian2d",x:p.x,y:p.y,width:p.width,height:p.height},api:{coord:function(f){return _.dataToPoint(f)},size:o.bind(S,_)}}}},88964:function(E,A,u){var o=u(23405),S=u(28761),_=u(42458),p=u(96518);function f(d,v,b,s){_.call(this,d),this.map=v;var l=p.load(v,b);this._nameCoordMap=l.nameCoordMap,this._regionsMap=l.regionsMap,this._invertLongitute=s==null||s,this.regions=l.regions,this._rect=l.boundingRect}function y(d,v,b,s){var l=b.geoModel,w=b.seriesModel,I=l?l.coordinateSystem:w?w.coordinateSystem||(w.getReferringComponents("geo")[0]||{}).coordinateSystem:null;return I===this?I[d](s):null}f.prototype={constructor:f,type:"geo",dimensions:["lng","lat"],containCoord:function(d){for(var v=this.regions,b=0;b<v.length;b++)if(v[b].contain(d))return!0;return!1},transformTo:function(d,v,b,s){var l=this.getBoundingRect(),w=this._invertLongitute;l=l.clone(),w&&(l.y=-l.y-l.height);var I=this._rawTransformable;if(I.transform=l.calculateTransform(new S(d,v,b,s)),I.decomposeTransform(),w){var C=I.scale;C[1]=-C[1]}I.updateTransform(),this._updateTransform()},getRegion:function(d){return this._regionsMap.get(d)},getRegionByCoord:function(d){for(var v=this.regions,b=0;b<v.length;b++)if(v[b].contain(d))return v[b]},addGeoCoord:function(d,v){this._nameCoordMap.set(d,v)},getGeoCoord:function(d){return this._nameCoordMap.get(d)},getBoundingRect:function(){return this._rect},dataToPoint:function(d,v,b){if(typeof d=="string"&&(d=this.getGeoCoord(d)),d)return _.prototype.dataToPoint.call(this,d,v,b)},convertToPixel:o.curry(y,"dataToPoint"),convertFromPixel:o.curry(y,"pointToData")},o.mixin(f,_),E.exports=f},25684:function(E,A,u){var o=u(23405),S=u(51064),_=u(28628),p=u(46082),f=u(49214),y=u(87673),d=_.extend({type:"geo",coordinateSystem:null,layoutMode:"box",init:function(v){_.prototype.init.apply(this,arguments),S.defaultEmphasis(v,"label",["show"])},optionUpdated:function(){var v=this.option,b=this;v.regions=y.getFilledRegions(v.regions,v.map,v.nameMap),this._optionModelMap=o.reduce(v.regions||[],function(s,l){return l.name&&s.set(l.name,new p(l,b)),s},o.createHashMap()),this.updateSelectedMap(v.regions)},defaultOption:{zlevel:0,z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",color:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},getRegionModel:function(v){return this._optionModelMap.get(v)||new p(null,this,this.ecModel)},getFormattedLabel:function(v,b){var s=this.getRegionModel(v).get("label."+b+".formatter"),l={name:v};return typeof s=="function"?(l.status=b,s(l)):typeof s=="string"?s.replace("{a}",v??""):void 0},setZoom:function(v){this.option.zoom=v},setCenter:function(v){this.option.center=v}});o.mixin(d,f),E.exports=d},62907:function(E,A,u){var o=u(28761),S=u(6973),_=u(76414),p=u(94457);function f(y,d,v){if(this.name=y,this.geometries=d,v)v=[v[0],v[1]];else{var b=this.getBoundingRect();v=[b.x+b.width/2,b.y+b.height/2]}this.center=v}f.prototype={constructor:f,properties:null,getBoundingRect:function(){var y=this._rect;if(y)return y;for(var d=Number.MAX_VALUE,v=[d,d],b=[-d,-d],s=[],l=[],w=this.geometries,I=0;I<w.length;I++)if(w[I].type==="polygon"){var C=w[I].exterior;S.fromPoints(C,s,l),_.min(v,v,s),_.max(b,b,l)}return I===0&&(v[0]=v[1]=b[0]=b[1]=0),this._rect=new o(v[0],v[1],b[0]-v[0],b[1]-v[1])},contain:function(y){var d=this.getBoundingRect(),v=this.geometries;if(!d.contain(y[0],y[1]))return!1;e:for(var b=0,s=v.length;b<s;b++)if(v[b].type==="polygon"){var l=v[b].exterior,w=v[b].interiors;if(p.contain(l,y[0],y[1])){for(var I=0;I<(w?w.length:0);I++)if(p.contain(w[I]))continue e;return!0}}return!1},transformTo:function(y,d,v,b){var s=this.getBoundingRect(),l=s.width/s.height;v?b||(b=v/l):v=l*b;for(var w=new o(y,d,v,b),I=s.calculateTransform(w),C=this.geometries,h=0;h<C.length;h++)if(C[h].type==="polygon"){for(var c=C[h].exterior,m=C[h].interiors,T=0;T<c.length;T++)_.applyTransform(c[T],c[T],I);for(var D=0;D<(m?m.length:0);D++)for(var T=0;T<m[D].length;T++)_.applyTransform(m[D][T],m[D][T],I)}(s=this._rect).copy(w),this.center=[s.x+s.width/2,s.y+s.height/2]},cloneShallow:function(y){y==null&&(y=this.name);var d=new f(y,this.geometries,this.center);return d._rect=this._rect,d.transformTo=null,d}},E.exports=f},25604:function(E){var A=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];E.exports=function(u,o){u==="china"&&o.name==="台湾"&&o.geometries.push({type:"polygon",exterior:A[0]})}},50441:function(E){var A={Russia:[100,60],"United States":[-99,38],"United States of America":[-99,38]};E.exports=function(u,o){if(u==="world"){var S=A[o.name];if(S){var _=o.center;_[0]=S[0],_[1]=S[1]}}}},79445:function(E,A,u){for(var o=u(23405),S=u(62907),_=[126,25],p=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],f=0;f<p.length;f++)for(var y=0;y<p[f].length;y++)p[f][y][0]/=10.5,p[f][y][1]/=-14,p[f][y][0]+=_[0],p[f][y][1]+=_[1];E.exports=function(d,v){d==="china"&&v.push(new S("南海诸岛",o.map(p,function(b){return{type:"polygon",exterior:b}}),_))}},27042:function(E){var A={南海诸岛:[32,80],广东:[0,-10],香港:[10,5],澳门:[-10,10],天津:[5,5]};E.exports=function(u,o){if(u==="china"){var S=A[o.name];if(S){var _=o.center;_[0]+=S[0]/10.5,_[1]+=-S[1]/14}}}},87673:function(E,A,u){u(9129).__DEV__;var o=u(87930),S=u(23405),_=u(88964),p=u(62751),f=u(54684),y=u(96518),d=u(95723);function v(l,w){var I,C,h=l.get("boundingCoords");if(h!=null){var c=h[0],m=h[1];isNaN(c[0])||isNaN(c[1])||isNaN(m[0])||isNaN(m[1])||this.setBoundingRect(c[0],c[1],m[0]-c[0],m[1]-c[1])}var T=this.getBoundingRect(),D=l.get("layoutCenter"),O=l.get("layoutSize"),N=w.getWidth(),z=w.getHeight(),H=T.width/T.height*this.aspectScale,$=!1;if(D&&O&&(D=[f.parsePercent(D[0],N),f.parsePercent(D[1],z)],O=f.parsePercent(O,Math.min(N,z)),isNaN(D[0])||isNaN(D[1])||isNaN(O)||($=!0)),$){var C={};H>1?(C.width=O,C.height=O/H):(C.height=O,C.width=O*H),C.y=D[1]-C.height/2,C.x=D[0]-C.width/2}else(I=l.getBoxLayoutParams()).aspect=H,C=p.getLayoutRect(I,{width:N,height:z});this.setViewRect(C.x,C.y,C.width,C.height),this.setCenter(l.get("center")),this.setZoom(l.get("zoom"))}function b(l,w){S.each(w.get("geoCoord"),function(I,C){l.addGeoCoord(C,I)})}var s={dimensions:_.prototype.dimensions,create:function(l,w){var I=[];l.eachComponent("geo",function(h,c){var m=h.get("map"),T=h.get("aspectScale"),D=!0,O=d.retrieveMap(m);O&&O[0]&&O[0].type==="svg"?(T==null&&(T=1),D=!1):T==null&&(T=.75);var N=new _(m+c,m,h.get("nameMap"),D);N.aspectScale=T,N.zoomLimit=h.get("scaleLimit"),I.push(N),b(N,h),h.coordinateSystem=N,N.model=h,N.resize=v,N.resize(h,w)}),l.eachSeries(function(h){if(h.get("coordinateSystem")==="geo"){var c=h.get("geoIndex")||0;h.coordinateSystem=I[c]}});var C={};return l.eachSeriesByType("map",function(h){if(!h.getHostGeoModel()){var c=h.getMapType();C[c]=C[c]||[],C[c].push(h)}}),S.each(C,function(h,c){var m=S.map(h,function(D){return D.get("nameMap")}),T=new _(c,c,S.mergeAll(m));T.zoomLimit=S.retrieve.apply(null,S.map(h,function(D){return D.get("scaleLimit")})),I.push(T),T.resize=v,T.aspectScale=h[0].get("aspectScale"),T.resize(h[0],w),S.each(h,function(D){D.coordinateSystem=T,b(T,D)})}),I},getFilledRegions:function(l,w,I){for(var C=(l||[]).slice(),h=S.createHashMap(),c=0;c<C.length;c++)h.set(C[c].name,C[c]);var m=y.load(w,I);return S.each(m.regions,function(T){var D=T.name;h.get(D)||C.push({name:D})}),C}};o.registerCoordinateSystem("geo",s),E.exports=s},24378:function(E,A,u){var o=u(23405).each,S=u(61167),_=u(51064).makeInner,p=u(79445),f=u(27042),y=u(50441),d=u(25604),v=_();E.exports={load:function(b,s){var l,w=v(s).parsed;if(w)return w;var I=s.specialAreas||{},C=s.geoJSON;try{l=C?S(C):[]}catch(h){throw Error(`Invalid geoJson format
`+h.message)}return o(l,function(h){var c=h.name;f(b,h),y(b,h),d(b,h);var m=I[c];m&&h.transformTo(m.left,m.top,m.width,m.height)}),p(b,l),v(s).parsed={regions:l,boundingRect:function(h){for(var c,m=0;m<h.length;m++){var T=h[m].getBoundingRect();(c=c||T.clone()).union(T)}return c}(l)}}}},92123:function(E,A,u){var o=u(66836),S=o.parseSVG,_=o.makeViewBoxTransform,p=u(18583),f=u(86367),y=u(23405),d=y.assert,v=y.createHashMap,b=u(28761),s=(0,u(51064).makeInner)();function l(w,I){var C,h,c=w.svgXML;try{h=(C=c&&S(c,{ignoreViewBox:!0,ignoreRootClip:!0})||{}).root,d(h!=null)}catch(z){throw Error(`Invalid svg format
`+z.message)}var m=C.width,T=C.height,D=C.viewBoxRect;if(I||(I=m==null||T==null?h.getBoundingRect():new b(0,0,0,0),m!=null&&(I.width=m),T!=null&&(I.height=T)),D){var O=_(D,I.width,I.height),N=h;(h=new p).add(N),N.scale=O.scale,N.position=O.position}return h.setClipPath(new f({shape:I.plain()})),{root:h,boundingRect:I}}E.exports={load:function(w,I){var C=s(I).originRoot;if(C)return{root:C,boundingRect:s(I).boundingRect};var h=l(I);return s(I).originRoot=h.root,s(I).boundingRect=h.boundingRect,h},makeGraphic:function(w,I,C){var h=s(I),c=h.rootMap||(h.rootMap=v()),m=c.get(C);if(m)return m;var T=h.originRoot,D=h.boundingRect;return h.originRootHostKey?m=l(I,D).root:(h.originRootHostKey=C,m=T),c.set(C,m)},removeGraphic:function(w,I,C){var h=s(I),c=h.rootMap;c&&c.removeKey(C),C===h.originRootHostKey&&(h.originRootHostKey=null)}}},96518:function(E,A,u){u(9129).__DEV__;var o=u(23405),S=o.each,_=o.createHashMap,p=u(95723),f=u(24378),y=u(92123),d=u(28761),v={geoJSON:f,svg:y};function b(l){return function(w,I){var C=s(w),h=[];return S(C,function(c){var m=v[c.type][l];m&&h.push(m(w,c,I))}),h}}function s(l){return p.retrieveMap(l)||[]}E.exports={load:function(l,w){var I,C=[],h=_(),c=_();return S(s(l),function(m){var T=v[m.type].load(l,m);S(T.regions,function(O){var N=O.name;w&&w.hasOwnProperty(N)&&(O=O.cloneShallow(N=w[N])),C.push(O),h.set(N,O),c.set(N,O.center)});var D=T.boundingRect;D&&(I?I.union(D):I=D.clone())}),{regions:C,regionsMap:h,nameCoordMap:c,boundingRect:I||new d(0,0,0,0)}},makeGraphic:b("makeGraphic"),removeGraphic:b("removeGraphic")}},95723:function(E,A,u){u(9129).__DEV__;var o=u(23405),S=o.createHashMap,_=o.isString,p=o.isArray,f=o.each;o.assert;var y=u(66836).parseXML,d=S(),v={geoJSON:function(b){var s=b.source;b.geoJSON=_(s)?typeof JSON<"u"&&JSON.parse?JSON.parse(s):Function("return ("+s+");")():s},svg:function(b){b.svgXML=y(b.source)}};E.exports={registerMap:function(b,s,l){var w;return p(s)?w=s:s.svg?w=[{type:"svg",source:s.svg,specialAreas:s.specialAreas}]:(s.geoJson&&!s.features&&(l=s.specialAreas,s=s.geoJson),w=[{type:"geoJSON",source:s,specialAreas:l}]),f(w,function(I){var C=I.type;C==="geoJson"&&(C=I.type="geoJSON"),(0,v[C])(I)}),d.set(b,w)},retrieveMap:function(b){return d.get(b)}}},61167:function(E,A,u){var o=u(23405),S=u(62907);function _(p,f,y){for(var d=[],v=f[0],b=f[1],s=0;s<p.length;s+=2){var l=p.charCodeAt(s)-64,w=p.charCodeAt(s+1)-64;w=w>>1^-(1&w),l=(l>>1^-(1&l))+v,w+=b,v=l,b=w,d.push([l/y,w/y])}return d}E.exports=function(p){return function(f){if(f.UTF8Encoding){var y=f.UTF8Scale;y==null&&(y=1024);for(var d=f.features,v=0;v<d.length;v++)for(var b=d[v].geometry,s=b.coordinates,l=b.encodeOffsets,w=0;w<s.length;w++){var I=s[w];if(b.type==="Polygon")s[w]=_(I,l[w],y);else if(b.type==="MultiPolygon")for(var C=0;C<I.length;C++){var h=I[C];I[C]=_(h,l[w][C],y)}}f.UTF8Encoding=!1}}(p),o.map(o.filter(p.features,function(f){return f.geometry&&f.properties&&f.geometry.coordinates.length>0}),function(f){var y=f.properties,d=f.geometry,v=d.coordinates,b=[];d.type==="Polygon"&&b.push({type:"polygon",exterior:v[0],interiors:v.slice(1)}),d.type==="MultiPolygon"&&o.each(v,function(l){l[0]&&b.push({type:"polygon",exterior:l[0],interiors:l.slice(1)})});var s=new S(y.name,b,y.cp);return s.properties=y,s})}},44988:function(E,A,u){var o=u(23405);function S(_,p){return p=p||[0,0],o.map([0,1],function(f){var y=p[f],d=_[f]/2,v=[],b=[];return v[f]=y-d,b[f]=y+d,v[1-f]=b[1-f]=p[1-f],Math.abs(this.dataToPoint(v)[f]-this.dataToPoint(b)[f])},this)}E.exports=function(_){var p=_.getBoundingRect();return{coordSys:{type:"geo",x:p.x,y:p.y,width:p.width,height:p.height,zoom:_.getZoom()},api:{coord:function(f){return _.dataToPoint(f)},size:o.bind(S,_)}}}},89427:function(E,A,u){var o=u(23405),S=u(28628),_=u(74106),p=u(47329),f=u(54684),y=u(98477),d=S.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return _([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(v){var b=this.activeIntervals=o.clone(v);if(b)for(var s=b.length-1;s>=0;s--)f.asc(b[s])},getActiveState:function(v){var b=this.activeIntervals;if(!b.length)return"normal";if(v==null||isNaN(v))return"inactive";if(b.length===1){var s=b[0];if(s[0]<=v&&v<=s[1])return"active"}else for(var l=0,w=b.length;l<w;l++)if(b[l][0]<=v&&v<=b[l][1])return"active";return"inactive"}});o.merge(d.prototype,y),p("parallel",d,function(v,b){return b.type||(b.data?"category":"value")},{type:"value",dim:null,areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10}),E.exports=d},16347:function(E,A,u){var o=u(23405),S=u(79442),_=u(62751),p=u(51261),f=u(60467),y=u(51747),d=u(54684),v=u(2488),b=o.each,s=Math.min,l=Math.max,w=Math.floor,I=Math.ceil,C=d.round,h=Math.PI;function c(T,D,O){this._axesMap=o.createHashMap(),this._axesLayout={},this.dimensions=T.dimensions,this._rect,this._model=T,this._init(T,D,O)}function m(T,D){return s(l(T,D[0]),D[1])}c.prototype={type:"parallel",constructor:c,_init:function(T,D,O){var N=T.dimensions,z=T.parallelAxisIndex;b(N,function(H,$){var V=z[$],P=D.getComponent("parallelAxis",V),U=this._axesMap.set(H,new f(H,p.createScaleByModel(P),[0,0],P.get("type"),V)),Y=U.type==="category";U.onBand=Y&&P.get("boundaryGap"),U.inverse=P.get("inverse"),P.axis=U,U.model=P,U.coordinateSystem=P.coordinateSystem=this},this)},update:function(T,D){this._updateAxesFromSeries(this._model,T)},containPoint:function(T){var D=this._makeLayoutInfo(),O=D.axisBase,N=D.layoutBase,z=D.pixelDimIndex,H=T[1-z],$=T[z];return H>=O&&H<=O+D.axisLength&&$>=N&&$<=N+D.layoutLength},getModel:function(){return this._model},_updateAxesFromSeries:function(T,D){D.eachSeries(function(O){if(T.contains(O,D)){var N=O.getData();b(this.dimensions,function(z){var H=this._axesMap.get(z);H.scale.unionExtentFromData(N,N.mapDimension(z)),p.niceScaleExtent(H.scale,H.model)},this)}},this)},resize:function(T,D){this._rect=_.getLayoutRect(T.getBoxLayoutParams(),{width:D.getWidth(),height:D.getHeight()}),this._layoutAxes()},getRect:function(){return this._rect},_makeLayoutInfo:function(){var T,D=this._model,O=this._rect,N=["x","y"],z=["width","height"],H=D.get("layout"),$=+(H!=="horizontal"),V=O[z[$]],P=[0,V],U=this.dimensions.length,Y=m(D.get("axisExpandWidth"),P),Z=m(D.get("axisExpandCount")||0,[0,U]),X=D.get("axisExpandable")&&U>3&&U>Z&&Z>1&&Y>0&&V>0,J=D.get("axisExpandWindow");J?(T=m(J[1]-J[0],P),J[1]=J[0]+T):(T=m(Y*(Z-1),P),(J=[Y*(D.get("axisExpandCenter")||w(U/2))-T/2])[1]=J[0]+T);var q=(V-T)/(U-Z);q<3&&(q=0);var te=[w(C(J[0]/Y,1))+1,I(C(J[1]/Y,1))-1],re=q/Y*J[0];return{layout:H,pixelDimIndex:$,layoutBase:O[N[$]],layoutLength:V,axisBase:O[N[1-$]],axisLength:O[z[1-$]],axisExpandable:X,axisExpandWidth:Y,axisCollapseWidth:q,axisExpandWindow:J,axisCount:U,winInnerIndices:te,axisExpandWindow0Pos:re}},_layoutAxes:function(){var T=this._rect,D=this._axesMap,O=this.dimensions,N=this._makeLayoutInfo(),z=N.layout;D.each(function(H){var $=[0,N.axisLength],V=+!!H.inverse;H.setExtent($[V],$[1-V])}),b(O,function(H,$){var V=(N.axisExpandable?function(X,J){var q,te,re=J.layoutLength,ie=J.axisExpandWidth,ne=J.axisCount,le=J.axisCollapseWidth,fe=J.winInnerIndices,we=le,pe=!1;return X<fe[0]?(q=X*le,te=le):X<=fe[1]?(q=J.axisExpandWindow0Pos+X*ie-J.axisExpandWindow[0],we=ie,pe=!0):(q=re-(ne-1-X)*le,te=le),{position:q,axisNameAvailableWidth:we,axisLabelShow:pe,nameTruncateMaxWidth:te}}:function(X,J){var q=J.layoutLength/(J.axisCount-1);return{position:q*X,axisNameAvailableWidth:q,axisLabelShow:!0}})($,N),P={horizontal:{x:V.position,y:N.axisLength},vertical:{x:0,y:V.position}},U=[P[z].x+T.x,P[z].y+T.y],Y={horizontal:h/2,vertical:0}[z],Z=S.create();S.rotate(Z,Z,Y),S.translate(Z,Z,U),this._axesLayout[H]={position:U,rotation:Y,transform:Z,axisNameAvailableWidth:V.axisNameAvailableWidth,axisLabelShow:V.axisLabelShow,nameTruncateMaxWidth:V.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},getAxis:function(T){return this._axesMap.get(T)},dataToPoint:function(T,D){return this.axisCoordToPoint(this._axesMap.get(D).dataToCoord(T),D)},eachActiveState:function(T,D,O,N){O==null&&(O=0),N==null&&(N=T.count());var z,H=this._axesMap,$=this.dimensions,V=[],P=[];o.each($,function(q){V.push(T.mapDimension(q)),P.push(H.get(q).model)});for(var U=this.hasAxisBrushed(),Y=O;Y<N;Y++){if(U){z="active";for(var Z=T.getValues(V,Y),X=0,J=$.length;X<J;X++)if(P[X].getActiveState(Z[X])==="inactive"){z="inactive";break}}else z="normal";D(z,Y)}},hasAxisBrushed:function(){for(var T=this.dimensions,D=this._axesMap,O=!1,N=0,z=T.length;N<z;N++)D.get(T[N]).model.getActiveState()!=="normal"&&(O=!0);return O},axisCoordToPoint:function(T,D){var O=this._axesLayout[D];return y.applyTransform([T,0],O.transform)},getAxisLayout:function(T){return o.clone(this._axesLayout[T])},getSlidedAxisExpandWindow:function(T){var D,O=this._makeLayoutInfo(),N=O.pixelDimIndex,z=O.axisExpandWindow.slice(),H=z[1]-z[0],$=[0,O.axisExpandWidth*(O.axisCount-1)];if(!this.containPoint(T))return{behavior:"none",axisExpandWindow:z};var V=T[N]-O.layoutBase-O.axisExpandWindow0Pos,P="slide",U=O.axisCollapseWidth,Y=this._model.get("axisExpandSlideTriggerArea"),Z=Y[0]!=null;if(U)Z&&U&&V<H*Y[0]?(P="jump",D=V-H*Y[2]):Z&&U&&V>H*(1-Y[0])?(P="jump",D=V-H*(1-Y[2])):(D=V-H*Y[1])>=0&&(D=V-H*(1-Y[1]))<=0&&(D=0),(D*=O.axisExpandWidth/U)?v(D,z,$,"all"):P="none";else{var H=z[1]-z[0];(z=[l(0,$[1]*V/H-H/2)])[1]=s($[1],z[0]+H),z[0]=z[1]-H}return{axisExpandWindow:z,behavior:P}}},E.exports=c},60467:function(E,A,u){var o=u(23405),S=u(7371),_=function(p,f,y,d,v){S.call(this,p,f,y),this.type=d||"value",this.axisIndex=v};_.prototype={constructor:_,model:null,isHorizontal:function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"}},o.inherits(_,S),E.exports=_},97421:function(E,A,u){var o=u(23405),S=u(28628);u(89427),E.exports=S.extend({type:"parallel",dependencies:["parallelAxis"],coordinateSystem:null,dimensions:null,parallelAxisIndex:null,layoutMode:"box",defaultOption:{zlevel:0,z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},init:function(){S.prototype.init.apply(this,arguments),this.mergeOption({})},mergeOption:function(_){var p=this.option;_&&o.merge(p,_,!0),this._initDimensions()},contains:function(_,p){var f=_.get("parallelIndex");return f!=null&&p.getComponent("parallel",f)===this},setAxisExpand:function(_){o.each(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(p){_.hasOwnProperty(p)&&(this.option[p]=_[p])},this)},_initDimensions:function(){var _=this.dimensions=[],p=this.parallelAxisIndex=[],f=o.filter(this.dependentModels.parallelAxis,function(y){return(y.get("parallelIndex")||0)===this.componentIndex},this);o.each(f,function(y){_.push("dim"+y.get("dim")),p.push(y.componentIndex)})}})},20694:function(E,A,u){var o=u(16347);u(17234).register("parallel",{create:function(S,_){var p=[];return S.eachComponent("parallel",function(f,y){var d=new o(f,S,_);d.name="parallel_"+y,d.resize(f,_),f.coordinateSystem=d,d.model=f,p.push(d)}),S.eachSeries(function(f){if(f.get("coordinateSystem")==="parallel"){var y=S.queryComponents({mainType:"parallel",index:f.get("parallelIndex"),id:f.get("parallelId")})[0];f.coordinateSystem=y.coordinateSystem}}),p}})},71642:function(E,A,u){var o=u(23405),S=u(51064);E.exports=function(_){var p,f;(function(y){if(!y.parallel){var d=!1;o.each(y.series,function(v){v&&v.type==="parallel"&&(d=!0)}),d&&(y.parallel=[{}])}})(_),p=_,f=S.normalizeToArray(p.parallelAxis),o.each(f,function(y){if(o.isObject(y)){var d=y.parallelIndex||0,v=S.normalizeToArray(p.parallel)[d];v&&v.parallelAxisDefault&&o.merge(y,v.parallelAxisDefault,!1)}})}},91018:function(E,A,u){var o=u(23405),S=u(24570),_=u(7371),p=(0,u(51064).makeInner)();function f(y,d){d=d||[0,360],_.call(this,"angle",y,d),this.type="category"}f.prototype={constructor:f,pointToData:function(y,d){return this.polar.pointToData(y,d)[+(this.dim!=="radius")]},dataToAngle:_.prototype.dataToCoord,angleToData:_.prototype.coordToData,calculateCategoryInterval:function(){var y=this.getLabelModel(),d=this.scale,v=d.getExtent(),b=d.count();if(v[1]-v[0]<1)return 0;var s=v[0],l=Math.abs(this.dataToCoord(s+1)-this.dataToCoord(s)),w=Math.max(S.getBoundingRect(s,y.getFont(),"center","top").height,7)/l;isNaN(w)&&(w=1/0);var I=Math.max(0,Math.floor(w)),C=p(this.model),h=C.lastAutoInterval,c=C.lastTickCount;return h!=null&&c!=null&&1>=Math.abs(h-I)&&1>=Math.abs(c-b)&&h>I?I=h:(C.lastTickCount=b,C.lastAutoInterval=I),I}},o.inherits(f,_),E.exports=f},96006:function(E,A,u){var o=u(23405),S=u(28628),_=u(47329),p=u(98477),f=S.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});o.merge(f.prototype,p);function y(d,v){return v.type||(v.data?"category":"value")}_("angle",f,y,{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}}),_("radius",f,y,{splitNumber:5})},72569:function(E,A,u){var o=u(96493),S=u(91018),_=function(p){this.name=p||"",this.cx=0,this.cy=0,this._radiusAxis=new o,this._angleAxis=new S,this._radiusAxis.polar=this._angleAxis.polar=this};_.prototype={type:"polar",axisPointerEnabled:!0,constructor:_,dimensions:["radius","angle"],model:null,containPoint:function(p){var f=this.pointToCoord(p);return this._radiusAxis.contain(f[0])&&this._angleAxis.contain(f[1])},containData:function(p){return this._radiusAxis.containData(p[0])&&this._angleAxis.containData(p[1])},getAxis:function(p){return this["_"+p+"Axis"]},getAxes:function(){return[this._radiusAxis,this._angleAxis]},getAxesByScale:function(p){var f=[],y=this._angleAxis,d=this._radiusAxis;return y.scale.type===p&&f.push(y),d.scale.type===p&&f.push(d),f},getAngleAxis:function(){return this._angleAxis},getRadiusAxis:function(){return this._radiusAxis},getOtherAxis:function(p){var f=this._angleAxis;return p===f?this._radiusAxis:f},getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},getTooltipAxes:function(p){var f=p!=null&&p!=="auto"?this.getAxis(p):this.getBaseAxis();return{baseAxes:[f],otherAxes:[this.getOtherAxis(f)]}},dataToPoint:function(p,f){return this.coordToPoint([this._radiusAxis.dataToRadius(p[0],f),this._angleAxis.dataToAngle(p[1],f)])},pointToData:function(p,f){var y=this.pointToCoord(p);return[this._radiusAxis.radiusToData(y[0],f),this._angleAxis.angleToData(y[1],f)]},pointToCoord:function(p){var f=p[0]-this.cx,y=p[1]-this.cy,d=this.getAngleAxis(),v=d.getExtent(),b=Math.min(v[0],v[1]),s=Math.max(v[0],v[1]);d.inverse?b=s-360:s=b+360;var l=Math.sqrt(f*f+y*y);f/=l;for(var w=Math.atan2(-(y/=l),f)/Math.PI*180,I=w<b?1:-1;w<b||w>s;)w+=360*I;return[l,w]},coordToPoint:function(p){var f=p[0],y=p[1]/180*Math.PI;return[Math.cos(y)*f+this.cx,-Math.sin(y)*f+this.cy]}},E.exports=_},44887:function(E,A,u){var o=u(87930);u(96006),E.exports=o.extendComponentModel({type:"polar",dependencies:["polarAxis","angleAxis"],coordinateSystem:null,findAxisModel:function(S){var _;return this.ecModel.eachComponent(S,function(p){p.getCoordSysModel()===this&&(_=p)},this),_},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}})},96493:function(E,A,u){var o=u(23405),S=u(7371);function _(p,f){S.call(this,"radius",p,f),this.type="category"}_.prototype={constructor:_,pointToData:function(p,f){return this.polar.pointToData(p,f)[+(this.dim!=="radius")]},dataToRadius:S.prototype.dataToCoord,radiusToData:S.prototype.coordToData},o.inherits(_,S),E.exports=_},27246:function(E,A,u){u(9129).__DEV__;var o=u(23405),S=u(72569),_=u(54684).parsePercent,p=u(51261),f=p.createScaleByModel,y=p.niceScaleExtent,d=u(17234),v=u(91968).getStackedDimension;function b(w,I){var C=this,h=C.getAngleAxis(),c=C.getRadiusAxis();if(h.scale.setExtent(1/0,-1/0),c.scale.setExtent(1/0,-1/0),w.eachSeries(function(D){if(D.coordinateSystem===C){var O=D.getData();o.each(O.mapDimension("radius",!0),function(N){c.scale.unionExtentFromData(O,v(O,N))}),o.each(O.mapDimension("angle",!0),function(N){h.scale.unionExtentFromData(O,v(O,N))})}}),y(h.scale,h.model),y(c.scale,c.model),h.type==="category"&&!h.onBand){var m=h.getExtent(),T=360/h.scale.count();h.inverse?m[1]+=T:m[1]-=T,h.setExtent(m[0],m[1])}}function s(w,I){if(w.type=I.get("type"),w.scale=f(I),w.onBand=I.get("boundaryGap")&&w.type==="category",w.inverse=I.get("inverse"),I.mainType==="angleAxis"){w.inverse^=I.get("clockwise");var C=I.get("startAngle");w.setExtent(C,C+(w.inverse?-360:360))}I.axis=w,w.model=I}u(44887);var l={dimensions:S.prototype.dimensions,create:function(w,I){var C=[];return w.eachComponent("polar",function(h,c){var m,T,D,O,N,z,H=new S(c);H.update=b;var $=H.getRadiusAxis(),V=H.getAngleAxis(),P=h.findAxisModel("radiusAxis"),U=h.findAxisModel("angleAxis");s($,P),s(V,U),m=h.get("center"),T=I.getWidth(),D=I.getHeight(),H.cx=_(m[0],T),H.cy=_(m[1],D),O=H.getRadiusAxis(),N=Math.min(T,D)/2,z=_(h.get("radius"),N),O.inverse?O.setExtent(z,0):O.setExtent(0,z),C.push(H),h.coordinateSystem=H,H.model=h}),w.eachSeries(function(h){if(h.get("coordinateSystem")==="polar"){var c=w.queryComponents({mainType:"polar",index:h.get("polarIndex"),id:h.get("polarId")})[0];h.coordinateSystem=c.coordinateSystem}}),C}};d.register("polar",l)},78147:function(E,A,u){var o=u(23405);function S(_,p){return o.map(["Radius","Angle"],function(f,y){var d=this["get"+f+"Axis"](),v=p[y],b=_[y]/2,s="dataTo"+f,l=d.type==="category"?d.getBandWidth():Math.abs(d[s](v-b)-d[s](v+b));return f==="Angle"&&(l=l*Math.PI/180),l},this)}E.exports=function(_){var p=_.getRadiusAxis(),f=_.getAngleAxis(),y=p.getExtent();return y[0]>y[1]&&y.reverse(),{coordSys:{type:"polar",cx:_.cx,cy:_.cy,r:y[1],r0:y[0]},api:{coord:o.bind(function(d){var v=p.dataToRadius(d[0]),b=f.dataToAngle(d[1]),s=_.coordToPoint([v,b]);return s.push(v,b*Math.PI/180),s}),size:o.bind(S,_)}}}},61934:function(E,A,u){var o=u(23405),S=u(7371);function _(p,f,y){S.call(this,p,f,y),this.type="value",this.angle=0,this.name="",this.model}o.inherits(_,S),E.exports=_},6717:function(E,A,u){var o=u(23405),S=u(61934),_=u(86855),p=u(54684),f=u(51261),y=f.getScaleExtent,d=f.niceScaleExtent,v=u(17234);function b(s,l,w){this._model=s,this.dimensions=[],this._indicatorAxes=o.map(s.getIndicatorModels(),function(I,C){var h="indicator_"+C,c=new S(h,new _);return c.name=I.get("name"),c.model=I,I.axis=c,this.dimensions.push(h),c},this),this.resize(s,w),this.cx,this.cy,this.r,this.r0,this.startAngle}b.prototype.getIndicatorAxes=function(){return this._indicatorAxes},b.prototype.dataToPoint=function(s,l){var w=this._indicatorAxes[l];return this.coordToPoint(w.dataToCoord(s),l)},b.prototype.coordToPoint=function(s,l){var w=this._indicatorAxes[l].angle;return[this.cx+s*Math.cos(w),this.cy-s*Math.sin(w)]},b.prototype.pointToData=function(s){var l,w=s[0]-this.cx,I=s[1]-this.cy,C=Math.sqrt(w*w+I*I);w/=C;for(var h=Math.atan2(-(I/=C),w),c=1/0,m=-1,T=0;T<this._indicatorAxes.length;T++){var D=this._indicatorAxes[T],O=Math.abs(h-D.angle);O<c&&(l=D,m=T,c=O)}return[m,+(l&&l.coodToData(C))]},b.prototype.resize=function(s,l){var w=s.get("center"),I=l.getWidth(),C=l.getHeight(),h=Math.min(I,C)/2;this.cx=p.parsePercent(w[0],I),this.cy=p.parsePercent(w[1],C),this.startAngle=s.get("startAngle")*Math.PI/180;var c=s.get("radius");(typeof c=="string"||typeof c=="number")&&(c=[0,c]),this.r0=p.parsePercent(c[0],h),this.r=p.parsePercent(c[1],h),o.each(this._indicatorAxes,function(m,T){m.setExtent(this.r0,this.r);var D=this.startAngle+T*Math.PI*2/this._indicatorAxes.length;m.angle=Math.atan2(Math.sin(D),Math.cos(D))},this)},b.prototype.update=function(s,l){var w=this._indicatorAxes,I=this._model;o.each(w,function(c){c.scale.setExtent(1/0,-1/0)}),s.eachSeriesByType("radar",function(c,m){if(c.get("coordinateSystem")==="radar"&&s.getComponent("radar",c.get("radarIndex"))===I){var T=c.getData();o.each(w,function(D){D.scale.unionExtentFromData(T,T.mapDimension(D.dim))})}},this);var C=I.get("splitNumber");function h(c){var m=Math.pow(10,Math.floor(Math.log(c)/Math.LN10)),T=c/m;return T===2?T=5:T*=2,T*m}o.each(w,function(c,m){var T,D,O=y(c.scale,c.model);d(c.scale,c.model);var N=c.model,z=c.scale,H=N.getMin(),$=N.getMax(),V=z.getInterval();if(H!=null&&$!=null)z.setExtent(+H,+$),z.setInterval(($-H)/C);else if(H!=null)do T=H+V*C,z.setExtent(+H,T),z.setInterval(V),V=h(V);while(T<O[1]&&isFinite(T)&&isFinite(O[1]));else if($!=null)do D=$-V*C,z.setExtent(D,+$),z.setInterval(V),V=h(V);while(D>O[0]&&isFinite(D)&&isFinite(O[0]));else{z.getTicks().length-1>C&&(V=h(V));var P=Math.round((O[0]+O[1])/2/V)*V,U=Math.round(C/2);z.setExtent(p.round(P-U*V),p.round(P+(C-U)*V)),z.setInterval(V)}})},b.dimensions=[],b.create=function(s,l){var w=[];return s.eachComponent("radar",function(I){var C=new b(I,s,l);w.push(C),I.coordinateSystem=C}),s.eachSeriesByType("radar",function(I){I.get("coordinateSystem")==="radar"&&(I.coordinateSystem=w[I.get("radarIndex")||0])}),w},v.register("radar",b),E.exports=b},87775:function(E,A,u){var o=u(87930),S=u(23405),_=u(68639),p=u(46082),f=u(98477),y=_.valueAxis;function d(v,b){return S.defaults({show:b},v)}E.exports=o.extendComponentModel({type:"radar",optionUpdated:function(){var v=this.get("boundaryGap"),b=this.get("splitNumber"),s=this.get("scale"),l=this.get("axisLine"),w=this.get("axisTick"),I=this.get("axisLabel"),C=this.get("name"),h=this.get("name.show"),c=this.get("name.formatter"),m=this.get("nameGap"),T=this.get("triggerEvent"),D=S.map(this.get("indicator")||[],function(O){O.max!=null&&O.max>0&&!O.min?O.min=0:O.min!=null&&O.min<0&&!O.max&&(O.max=0);var N=C;if(O.color!=null&&(N=S.defaults({color:O.color},C)),O=S.merge(S.clone(O),{boundaryGap:v,splitNumber:b,scale:s,axisLine:l,axisTick:w,axisLabel:I,name:O.text,nameLocation:"end",nameGap:m,nameTextStyle:N,triggerEvent:T},!1),h||(O.name=""),typeof c=="string"){var z=O.name;O.name=c.replace("{value}",z??"")}else typeof c=="function"&&(O.name=c(O.name,O));var H=S.extend(new p(O,null,this.ecModel),f);return H.mainType="radar",H.componentIndex=this.componentIndex,H},this);this.getIndicatorModels=function(){return D}},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"75%",startAngle:90,name:{show:!0},boundaryGap:[0,0],splitNumber:5,nameGap:15,scale:!1,shape:"polygon",axisLine:S.merge({lineStyle:{color:"#bbb"}},y.axisLine),axisLabel:d(y.axisLabel,!1),axisTick:d(y.axisTick,!1),splitLine:d(y.splitLine,!0),splitArea:d(y.splitArea,!0),indicator:[]}})},27252:function(E,A,u){var o=u(23405),S=u(28628),_=u(47329),p=u(98477),f=S.extend({type:"singleAxis",layoutMode:"box",axis:null,coordinateSystem:null,getCoordSysModel:function(){return this}});o.merge(f.prototype,p),_("single",f,function(y,d){return d.type||(d.data?"category":"value")},{left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:2,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:2}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}}),E.exports=f},64135:function(E,A,u){var o=u(12337),S=u(51261),_=u(62751).getLayoutRect,p=u(23405).each;function f(y,d,v){this.dimension="single",this.dimensions=["single"],this._axis=null,this._rect,this._init(y,d,v),this.model=y}f.prototype={type:"singleAxis",axisPointerEnabled:!0,constructor:f,_init:function(y,d,v){var b=new o(this.dimension,S.createScaleByModel(y),[0,0],y.get("type"),y.get("position")),s=b.type==="category";b.onBand=s&&y.get("boundaryGap"),b.inverse=y.get("inverse"),b.orient=y.get("orient"),y.axis=b,b.model=y,b.coordinateSystem=this,this._axis=b},update:function(y,d){y.eachSeries(function(v){if(v.coordinateSystem===this){var b=v.getData();p(b.mapDimension(this.dimension,!0),function(s){this._axis.scale.unionExtentFromData(b,s)},this),S.niceScaleExtent(this._axis.scale,this._axis.model)}},this)},resize:function(y,d){this._rect=_({left:y.get("left"),top:y.get("top"),right:y.get("right"),bottom:y.get("bottom"),width:y.get("width"),height:y.get("height")},{width:d.getWidth(),height:d.getHeight()}),this._adjustAxis()},getRect:function(){return this._rect},_adjustAxis:function(){var y=this._rect,d=this._axis,v=d.isHorizontal(),b=v?[0,y.width]:[0,y.height],s=+!!d.reverse;d.setExtent(b[s],b[1-s]),this._updateAxisTransform(d,v?y.x:y.y)},_updateAxisTransform:function(y,d){var v=y.getExtent(),b=v[0]+v[1],s=y.isHorizontal();y.toGlobalCoord=s?function(l){return l+d}:function(l){return b-l+d},y.toLocalCoord=s?function(l){return l-d}:function(l){return b-l+d}},getAxis:function(){return this._axis},getBaseAxis:function(){return this._axis},getAxes:function(){return[this._axis]},getTooltipAxes:function(){return{baseAxes:[this.getAxis()]}},containPoint:function(y){var d=this.getRect(),v=this.getAxis();return v.orient==="horizontal"?v.contain(v.toLocalCoord(y[0]))&&y[1]>=d.y&&y[1]<=d.y+d.height:v.contain(v.toLocalCoord(y[1]))&&y[0]>=d.y&&y[0]<=d.y+d.height},pointToData:function(y){var d=this.getAxis();return[d.coordToData(d.toLocalCoord(y[+(d.orient!=="horizontal")]))]},dataToPoint:function(y){var d=this.getAxis(),v=this.getRect(),b=[],s=+(d.orient!=="horizontal");return y instanceof Array&&(y=y[0]),b[s]=d.toGlobalCoord(d.dataToCoord(+y)),b[1-s]=s===0?v.y+v.height/2:v.x+v.width/2,b}},E.exports=f},12337:function(E,A,u){var o=u(23405),S=u(7371),_=function(p,f,y,d,v){S.call(this,p,f,y),this.type=d||"value",this.position=v||"bottom",this.orient=null};_.prototype={constructor:_,model:null,isHorizontal:function(){var p=this.position;return p==="top"||p==="bottom"},pointToData:function(p,f){return this.coordinateSystem.pointToData(p,f)[0]},toGlobalCoord:null,toLocalCoord:null},o.inherits(_,S),E.exports=_},65596:function(E,A,u){var o=u(23405);function S(_,p){var f=this.getAxis(),y=p instanceof Array?p[0]:p,d=(_ instanceof Array?_[0]:_)/2;return f.type==="category"?f.getBandWidth():Math.abs(f.dataToCoord(y-d)-f.dataToCoord(y+d))}E.exports=function(_){var p=_.getRect();return{coordSys:{type:"singleAxis",x:p.x,y:p.y,width:p.width,height:p.height},api:{coord:function(f){return _.dataToPoint(f)},size:o.bind(S,_)}}}},91456:function(E,A,u){var o=u(23405);A.layout=function(S,_){_=_||{};var p=S.coordinateSystem,f=S.axis,y={},d=f.position,v=f.orient,b=p.getRect(),s=[b.x,b.x+b.width,b.y,b.y+b.height],l={horizontal:{top:s[2],bottom:s[3]},vertical:{left:s[0],right:s[1]}};y.position=[v==="vertical"?l.vertical[d]:s[0],v==="horizontal"?l.horizontal[d]:s[3]],y.rotation=Math.PI/2*{horizontal:0,vertical:1}[v],y.labelDirection=y.tickDirection=y.nameDirection={top:-1,bottom:1,right:1,left:-1}[d],S.get("axisTick.inside")&&(y.tickDirection=-y.tickDirection),o.retrieve(_.labelInside,S.get("axisLabel.inside"))&&(y.labelDirection=-y.labelDirection);var w=_.rotate;return w==null&&(w=S.get("axisLabel.rotate")),y.labelRotation=d==="top"?-w:w,y.z2=1,y}},42200:function(E,A,u){var o=u(64135);u(17234).register("single",{create:function(S,_){var p=[];return S.eachComponent("singleAxis",function(f,y){var d=new o(f,S,_);d.name="single_"+y,d.resize(f,_),f.coordinateSystem=d,p.push(d)}),S.eachSeries(function(f){if(f.get("coordinateSystem")==="singleAxis"){var y=S.queryComponents({mainType:"singleAxis",index:f.get("singleAxisIndex"),id:f.get("singleAxisId")})[0];f.coordinateSystem=y&&y.coordinateSystem}}),p},dimensions:o.prototype.dimensions})},99018:function(E){function A(S){return S}function u(S,_,p,f,y){this._old=S,this._new=_,this._oldKeyGetter=p||A,this._newKeyGetter=f||A,this.context=y}function o(S,_,p,f,y){for(var d=0;d<S.length;d++){var v="_ec_"+y[f](S[d],d),b=_[v];b==null?(p.push(v),_[v]=d):(b.length||(_[v]=b=[b]),b.push(d))}}u.prototype={constructor:u,add:function(S){return this._add=S,this},update:function(S){return this._update=S,this},remove:function(S){return this._remove=S,this},execute:function(){var S,_=this._old,p=this._new,f={},y=[],d=[];for(o(_,{},y,"_oldKeyGetter",this),o(p,f,d,"_newKeyGetter",this),S=0;S<_.length;S++){var v=y[S],b=f[v];if(b!=null){var s=b.length;s?(s===1&&(f[v]=null),b=b.unshift()):f[v]=null,this._update&&this._update(b,S)}else this._remove&&this._remove(S)}for(var S=0;S<d.length;S++){var v=d[S];if(f.hasOwnProperty(v)){var b=f[v];if(b==null)continue;if(b.length)for(var l=0,s=b.length;l<s;l++)this._add&&this._add(b[l]);else this._add&&this._add(b)}}}},E.exports=u},58772:function(E,A,u){u(9129).__DEV__;var o=u(23405),S=u(92161).enableClassCheck;function _(b){return"_EC_"+b}var p=function(b){this._directed=b||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this.data,this.edgeData},f=p.prototype;function y(b,s){this.id=b??"",this.inEdges=[],this.outEdges=[],this.edges=[],this.hostGraph,this.dataIndex=s??-1}function d(b,s,l){this.node1=b,this.node2=s,this.dataIndex=l??-1}f.type="graph",f.isDirected=function(){return this._directed},f.addNode=function(b,s){b=b||""+s;var l=this._nodesMap;if(!l[_(b)]){var w=new y(b,s);return w.hostGraph=this,this.nodes.push(w),l[_(b)]=w,w}},f.getNodeByIndex=function(b){var s=this.data.getRawIndex(b);return this.nodes[s]},f.getNodeById=function(b){return this._nodesMap[_(b)]},f.addEdge=function(b,s,l){var w=this._nodesMap,I=this._edgesMap;if(typeof b=="number"&&(b=this.nodes[b]),typeof s=="number"&&(s=this.nodes[s]),y.isInstance(b)||(b=w[_(b)]),y.isInstance(s)||(s=w[_(s)]),b&&s){var C=b.id+"-"+s.id;if(!I[C]){var h=new d(b,s,l);return h.hostGraph=this,this._directed&&(b.outEdges.push(h),s.inEdges.push(h)),b.edges.push(h),b!==s&&s.edges.push(h),this.edges.push(h),I[C]=h,h}}},f.getEdgeByIndex=function(b){var s=this.edgeData.getRawIndex(b);return this.edges[s]},f.getEdge=function(b,s){y.isInstance(b)&&(b=b.id),y.isInstance(s)&&(s=s.id);var l=this._edgesMap;return this._directed?l[b+"-"+s]:l[b+"-"+s]||l[s+"-"+b]},f.eachNode=function(b,s){for(var l=this.nodes,w=l.length,I=0;I<w;I++)l[I].dataIndex>=0&&b.call(s,l[I],I)},f.eachEdge=function(b,s){for(var l=this.edges,w=l.length,I=0;I<w;I++)l[I].dataIndex>=0&&l[I].node1.dataIndex>=0&&l[I].node2.dataIndex>=0&&b.call(s,l[I],I)},f.breadthFirstTraverse=function(b,s,l,w){if(y.isInstance(s)||(s=this._nodesMap[_(s)]),s){for(var I=l==="out"?"outEdges":l==="in"?"inEdges":"edges",C=0;C<this.nodes.length;C++)this.nodes[C].__visited=!1;if(!b.call(w,s,null))for(var h=[s];h.length;)for(var c=h.shift(),m=c[I],C=0;C<m.length;C++){var T=m[C],D=T.node1===c?T.node2:T.node1;if(!D.__visited){if(b.call(w,D,c))return;h.push(D),D.__visited=!0}}}},f.update=function(){for(var b=this.data,s=this.edgeData,l=this.nodes,w=this.edges,I=0,C=l.length;I<C;I++)l[I].dataIndex=-1;for(var I=0,C=b.count();I<C;I++)l[b.getRawIndex(I)].dataIndex=I;s.filterSelf(function(h){var c=w[s.getRawIndex(h)];return c.node1.dataIndex>=0&&c.node2.dataIndex>=0});for(var I=0,C=w.length;I<C;I++)w[I].dataIndex=-1;for(var I=0,C=s.count();I<C;I++)w[s.getRawIndex(I)].dataIndex=I},f.clone=function(){for(var b=new p(this._directed),s=this.nodes,l=this.edges,w=0;w<s.length;w++)b.addNode(s[w].id,s[w].dataIndex);for(var w=0;w<l.length;w++){var I=l[w];b.addEdge(I.node1.id,I.node2.id,I.dataIndex)}return b},y.prototype={constructor:y,degree:function(){return this.edges.length},inDegree:function(){return this.inEdges.length},outDegree:function(){return this.outEdges.length},getModel:function(b){if(!(this.dataIndex<0))return this.hostGraph.data.getItemModel(this.dataIndex).getModel(b)}},d.prototype.getModel=function(b){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(b)};var v=function(b,s){return{getValue:function(l){var w=this[b][s];return w.get(w.getDimension(l||"value"),this.dataIndex)},setVisual:function(l,w){this.dataIndex>=0&&this[b][s].setItemVisual(this.dataIndex,l,w)},getVisual:function(l,w){return this[b][s].getItemVisual(this.dataIndex,l,w)},setLayout:function(l,w){this.dataIndex>=0&&this[b][s].setItemLayout(this.dataIndex,l,w)},getLayout:function(){return this[b][s].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[b][s].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[b][s].getRawIndex(this.dataIndex)}}};o.mixin(y,v("hostGraph","data")),o.mixin(d,v("hostGraph","edgeData")),p.Node=y,p.Edge=d,S(y),S(d),E.exports=p},80023:function(E,A,u){u(9129).__DEV__;var o=u(23405),S=u(46082),_=u(99018),p=u(42480),f=u(45435),y=f.defaultDimValueGetters,d=f.DefaultDataProvider,v=u(30186).summarizeDimensions,b=o.isObject,s="undefined",l={float:typeof Float64Array===s?Array:Float64Array,int:typeof Int32Array===s?Array:Int32Array,ordinal:Array,number:Array,time:Array},w=typeof Uint32Array===s?Array:Uint32Array,I=typeof Int32Array===s?Array:Int32Array,C=typeof Uint16Array===s?Array:Uint16Array;function h(J){return J._rawCount>65535?w:C}var c=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],m=["_extent","_approximateExtent","_rawExtent"];function T(J,q){o.each(c.concat(q.__wrappedMethods||[]),function(te){q.hasOwnProperty(te)&&(J[te]=q[te])}),J.__wrappedMethods=q.__wrappedMethods,o.each(m,function(te){J[te]=o.clone(q[te])}),J._calculationInfo=o.extend(q._calculationInfo)}var D=function(J,q){J=J||["x","y"];for(var te={},re=[],ie={},ne=0;ne<J.length;ne++){var le=J[ne];o.isString(le)&&(le={name:le});var fe=le.name;le.type=le.type||"float",le.coordDim||(le.coordDim=fe,le.coordDimIndex=0),le.otherDims=le.otherDims||{},re.push(fe),te[fe]=le,le.index=ne,le.createInvertedIndices&&(ie[fe]=[])}this.dimensions=re,this._dimensionInfos=te,this.hostModel=q,this.dataType,this._indices=null,this._count=0,this._rawCount=0,this._storage={},this._nameList=[],this._idList=[],this._optionModels=[],this._visual={},this._layout={},this._itemVisuals=[],this.hasItemVisual={},this._itemLayouts=[],this._graphicEls=[],this._chunkSize=1e5,this._chunkCount=0,this._rawData,this._rawExtent={},this._extent={},this._approximateExtent={},this._dimensionsSummary=v(this),this._invertedIndicesMap=ie,this._calculationInfo={}},O=D.prototype;function N(J,q,te,re,ie){var ne=l[q.type],le=re-1,fe=q.name,we=J[fe][le];if(we&&we.length<te){for(var pe=new ne(Math.min(ie-le*te,te)),ve=0;ve<we.length;ve++)pe[ve]=we[ve];J[fe][le]=pe}for(var be=re*te;be<ie;be+=te)J[fe].push(new ne(Math.min(ie-be,te)))}function z(J){var q=J._invertedIndicesMap;o.each(q,function(te,re){var ie=J._dimensionInfos[re].ordinalMeta;if(ie){te=q[re]=new I(ie.categories.length);for(var ne=0;ne<te.length;ne++)te[ne]=-1;for(var ne=0;ne<J._count;ne++)te[J.get(re,ne)]=ne}})}function H(J,q,te){var re;if(q!=null){var ie=J._chunkSize,ne=Math.floor(te/ie),le=J.dimensions[q],fe=J._storage[le][ne];if(fe){re=fe[te%ie];var we=J._dimensionInfos[le].ordinalMeta;we&&we.categories.length&&(re=we.categories[re])}}return re}function $(J){return J}function V(J){return J<this._count&&J>=0?this._indices[J]:-1}function P(J,q){var te=J._idList[q];return te==null&&(te=H(J,J._idDimIdx,q)),te==null&&(te="e\0\0"+q),te}function U(J){return o.isArray(J)||(J=[J]),J}function Y(J,q){var te=J.dimensions,re=new D(o.map(te,J.getDimensionInfo,J),J.hostModel);T(re,J);for(var ie=re._storage={},ne=J._storage,le=0;le<te.length;le++){var fe=te[le];ne[fe]&&(o.indexOf(q,fe)>=0?(ie[fe]=function(we){for(var pe=Array(we.length),ve=0;ve<we.length;ve++)pe[ve]=function(be){var Ee=be.constructor;return Ee===Array?be.slice():new Ee(be)}(we[ve]);return pe}(ne[fe]),re._rawExtent[fe]=Z(),re._extent[fe]=null):ie[fe]=ne[fe])}return re}function Z(){return[1/0,-1/0]}O.type="list",O.hasItemOption=!0,O.getDimension=function(J){return isNaN(J)||(J=this.dimensions[J]||J),J},O.getDimensionInfo=function(J){return this._dimensionInfos[this.getDimension(J)]},O.getDimensionsOnCoord=function(){return this._dimensionsSummary.dataDimsOnCoord.slice()},O.mapDimension=function(J,q){var te=this._dimensionsSummary;if(q==null)return te.encodeFirstDimNotExtra[J];var re=te.encode[J];return q===!0?(re||[]).slice():re&&re[q]},O.initData=function(J,q,te){(p.isInstance(J)||o.isArrayLike(J))&&(J=new d(J,this.dimensions.length)),this._rawData=J,this._storage={},this._indices=null,this._nameList=q||[],this._idList=[],this._nameRepeatCount={},te||(this.hasItemOption=!1),this.defaultDimValueGetter=y[this._rawData.getSource().sourceFormat],this._dimValueGetter=te=te||this.defaultDimValueGetter,this._dimValueGetterArrayRows=y.arrayRows,this._rawExtent={},this._initDataFromProvider(0,J.count()),J.pure&&(this.hasItemOption=!1)},O.getProvider=function(){return this._rawData},O.appendData=function(J){var q=this._rawData,te=this.count();q.appendData(J);var re=q.count();q.persistent||(re+=te),this._initDataFromProvider(te,re)},O.appendValues=function(J,q){for(var te=this._chunkSize,re=this._storage,ie=this.dimensions,ne=ie.length,le=this._rawExtent,fe=this.count(),we=fe+Math.max(J.length,q?q.length:0),pe=this._chunkCount,ve=0;ve<ne;ve++){var be=ie[ve];le[be]||(le[be]=Z()),re[be]||(re[be]=[]),N(re,this._dimensionInfos[be],te,pe,we),this._chunkCount=re[be].length}for(var Ee=Array(ne),Re=fe;Re<we;Re++){for(var Ne=Re-fe,Le=Math.floor(Re/te),Se=Re%te,Ie=0;Ie<ne;Ie++){var be=ie[Ie],_e=this._dimValueGetterArrayRows(J[Ne]||Ee,be,Ne,Ie);re[be][Le][Se]=_e;var Ae=le[be];_e<Ae[0]&&(Ae[0]=_e),_e>Ae[1]&&(Ae[1]=_e)}q&&(this._nameList[Re]=q[Ne])}this._rawCount=this._count=we,this._extent={},z(this)},O._initDataFromProvider=function(J,q){if(!(J>=q)){for(var te,re=this._chunkSize,ie=this._rawData,ne=this._storage,le=this.dimensions,fe=le.length,we=this._dimensionInfos,pe=this._nameList,ve=this._idList,be=this._rawExtent,Ee=this._nameRepeatCount={},Re=this._chunkCount,Ne=0;Ne<fe;Ne++){var Le=le[Ne];be[Le]||(be[Le]=Z());var Se=we[Le];Se.otherDims.itemName===0&&(te=this._nameDimIdx=Ne),Se.otherDims.itemId===0&&(this._idDimIdx=Ne),ne[Le]||(ne[Le]=[]),N(ne,Se,re,Re,q),this._chunkCount=ne[Le].length}for(var Ie=Array(fe),_e=J;_e<q;_e++){Ie=ie.getItem(_e,Ie);for(var Ae=Math.floor(_e/re),ue=_e%re,ke=0;ke<fe;ke++){var Le=le[ke],Pe=ne[Le][Ae],Ve=this._dimValueGetter(Ie,Le,_e,ke);Pe[ue]=Ve;var je=be[Le];Ve<je[0]&&(je[0]=Ve),Ve>je[1]&&(je[1]=Ve)}if(!ie.pure){var it=pe[_e];if(Ie&&it==null){if(Ie.name!=null)pe[_e]=it=Ie.name;else if(te!=null){var rt=le[te],mt=ne[rt][Ae];if(mt){it=mt[ue];var yt=we[rt].ordinalMeta;yt&&yt.categories.length&&(it=yt.categories[it])}}}var st=Ie==null?null:Ie.id;st==null&&it!=null&&(Ee[it]=Ee[it]||0,st=it,Ee[it]>0&&(st+="__ec__"+Ee[it]),Ee[it]++),st!=null&&(ve[_e]=st)}}!ie.persistent&&ie.clean&&ie.clean(),this._rawCount=this._count=q,this._extent={},z(this)}},O.count=function(){return this._count},O.getIndices=function(){var J,q=this._indices;if(q){var te=q.constructor,re=this._count;if(te===Array){J=new te(re);for(var ie=0;ie<re;ie++)J[ie]=q[ie]}else J=new te(q.buffer,0,re)}else for(var te=h(this),J=new te(this.count()),ie=0;ie<J.length;ie++)J[ie]=ie;return J},O.get=function(J,q){if(!(q>=0&&q<this._count))return NaN;var te=this._storage;if(!te[J])return NaN;var re=Math.floor((q=this.getRawIndex(q))/this._chunkSize),ie=q%this._chunkSize;return te[J][re][ie]},O.getByRawIndex=function(J,q){if(!(q>=0&&q<this._rawCount))return NaN;var te=this._storage[J];if(!te)return NaN;var re=Math.floor(q/this._chunkSize),ie=q%this._chunkSize;return te[re][ie]},O._getFast=function(J,q){var te=Math.floor(q/this._chunkSize),re=q%this._chunkSize;return this._storage[J][te][re]},O.getValues=function(J,q){var te=[];o.isArray(J)||(q=J,J=this.dimensions);for(var re=0,ie=J.length;re<ie;re++)te.push(this.get(J[re],q));return te},O.hasValue=function(J){for(var q=this._dimensionsSummary.dataDimsOnCoord,te=this._dimensionInfos,re=0,ie=q.length;re<ie;re++)if(te[q[re]].type!=="ordinal"&&isNaN(this.get(q[re],J)))return!1;return!0},O.getDataExtent=function(J){J=this.getDimension(J);var q,te=this._storage[J],re=Z();if(!te)return re;var ie=this.count();if(!this._indices)return this._rawExtent[J].slice();if(q=this._extent[J])return q.slice();for(var ne=(q=re)[0],le=q[1],fe=0;fe<ie;fe++){var we=this._getFast(J,this.getRawIndex(fe));we<ne&&(ne=we),we>le&&(le=we)}return q=[ne,le],this._extent[J]=q,q},O.getApproximateExtent=function(J){return J=this.getDimension(J),this._approximateExtent[J]||this.getDataExtent(J)},O.setApproximateExtent=function(J,q){q=this.getDimension(q),this._approximateExtent[q]=J.slice()},O.getCalculationInfo=function(J){return this._calculationInfo[J]},O.setCalculationInfo=function(J,q){b(J)?o.extend(this._calculationInfo,J):this._calculationInfo[J]=q},O.getSum=function(J){var q=this._storage[J],te=0;if(q)for(var re=0,ie=this.count();re<ie;re++){var ne=this.get(J,re);isNaN(ne)||(te+=ne)}return te},O.getMedian=function(J){var q=[];this.each(J,function(ie,ne){isNaN(ie)||q.push(ie)});var te=[].concat(q).sort(function(ie,ne){return ie-ne}),re=this.count();return re===0?0:re%2==1?te[(re-1)/2]:(te[re/2]+te[re/2-1])/2},O.rawIndexOf=function(J,q){var te=(J&&this._invertedIndicesMap[J])[q];return te==null||isNaN(te)?-1:te},O.indexOfName=function(J){for(var q=0,te=this.count();q<te;q++)if(this.getName(q)===J)return q;return-1},O.indexOfRawIndex=function(J){if(!this._indices)return J;if(J>=this._rawCount||J<0)return-1;var q=this._indices,te=q[J];if(te!=null&&te<this._count&&te===J)return J;for(var re=0,ie=this._count-1;re<=ie;){var ne=(re+ie)/2|0;if(q[ne]<J)re=ne+1;else{if(!(q[ne]>J))return ne;ie=ne-1}}return-1},O.indicesOfNearest=function(J,q,te){var re=this._storage[J],ie=[];if(!re)return ie;te==null&&(te=1/0);for(var ne=Number.MAX_VALUE,le=-1,fe=0,we=this.count();fe<we;fe++){var pe=q-this.get(J,fe),ve=Math.abs(pe);pe<=te&&ve<=ne&&((ve<ne||pe>=0&&le<0)&&(ne=ve,le=pe,ie.length=0),ie.push(fe))}return ie},O.getRawIndex=$,O.getRawDataItem=function(J){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(J));for(var q=[],te=0;te<this.dimensions.length;te++){var re=this.dimensions[te];q.push(this.get(re,J))}return q},O.getName=function(J){var q=this.getRawIndex(J);return this._nameList[q]||H(this,this._nameDimIdx,q)||""},O.getId=function(J){return P(this,this.getRawIndex(J))},O.each=function(J,q,te,re){if(this._count){typeof J=="function"&&(re=te,te=q,q=J,J=[]),te=te||re||this;for(var ie=(J=o.map(U(J),this.getDimension,this)).length,ne=0;ne<this.count();ne++)switch(ie){case 0:q.call(te,ne);break;case 1:q.call(te,this.get(J[0],ne),ne);break;case 2:q.call(te,this.get(J[0],ne),this.get(J[1],ne),ne);break;default:for(var le=0,fe=[];le<ie;le++)fe[le]=this.get(J[le],ne);fe[le]=ne,q.apply(te,fe)}}},O.filterSelf=function(J,q,te,re){if(this._count){typeof J=="function"&&(re=te,te=q,q=J,J=[]),te=te||re||this,J=o.map(U(J),this.getDimension,this);for(var ie=this.count(),ne=new(h(this))(ie),le=[],fe=J.length,we=0,pe=J[0],ve=0;ve<ie;ve++){var be,Ee=this.getRawIndex(ve);if(fe===0)be=q.call(te,ve);else if(fe===1){var Re=this._getFast(pe,Ee);be=q.call(te,Re,ve)}else{for(var Ne=0;Ne<fe;Ne++)le[Ne]=this._getFast(pe,Ee);le[Ne]=ve,be=q.apply(te,le)}be&&(ne[we++]=Ee)}return we<ie&&(this._indices=ne),this._count=we,this._extent={},this.getRawIndex=this._indices?V:$,this}},O.selectRange=function(J){if(this._count){var q=[];for(var te in J)J.hasOwnProperty(te)&&q.push(te);var re=q.length;if(re){var ie=this.count(),ne=new(h(this))(ie),le=0,fe=q[0],we=J[fe][0],pe=J[fe][1],ve=!1;if(!this._indices){var be=0;if(re===1){for(var Ee=this._storage[q[0]],Re=0;Re<this._chunkCount;Re++)for(var Ne=Ee[Re],Le=Math.min(this._count-Re*this._chunkSize,this._chunkSize),Se=0;Se<Le;Se++){var Ie=Ne[Se];(Ie>=we&&Ie<=pe||isNaN(Ie))&&(ne[le++]=be),be++}ve=!0}else if(re===2){for(var Ee=this._storage[fe],_e=this._storage[q[1]],Ae=J[q[1]][0],ue=J[q[1]][1],Re=0;Re<this._chunkCount;Re++)for(var Ne=Ee[Re],ke=_e[Re],Le=Math.min(this._count-Re*this._chunkSize,this._chunkSize),Se=0;Se<Le;Se++){var Ie=Ne[Se],Pe=ke[Se];(Ie>=we&&Ie<=pe||isNaN(Ie))&&(Pe>=Ae&&Pe<=ue||isNaN(Pe))&&(ne[le++]=be),be++}ve=!0}}if(!ve)if(re===1)for(var Se=0;Se<ie;Se++){var Ve=this.getRawIndex(Se),Ie=this._getFast(fe,Ve);(Ie>=we&&Ie<=pe||isNaN(Ie))&&(ne[le++]=Ve)}else for(var Se=0;Se<ie;Se++){for(var je=!0,Ve=this.getRawIndex(Se),Re=0;Re<re;Re++){var it=q[Re],Ie=this._getFast(te,Ve);(Ie<J[it][0]||Ie>J[it][1])&&(je=!1)}je&&(ne[le++]=this.getRawIndex(Se))}return le<ie&&(this._indices=ne),this._count=le,this._extent={},this.getRawIndex=this._indices?V:$,this}}},O.mapArray=function(J,q,te,re){typeof J=="function"&&(re=te,te=q,q=J,J=[]),te=te||re||this;var ie=[];return this.each(J,function(){ie.push(q&&q.apply(this,arguments))},te),ie},O.map=function(J,q,te,re){te=te||re||this;var ie=Y(this,J=o.map(U(J),this.getDimension,this));ie._indices=this._indices,ie.getRawIndex=ie._indices?V:$;for(var ne=ie._storage,le=[],fe=this._chunkSize,we=J.length,pe=this.count(),ve=[],be=ie._rawExtent,Ee=0;Ee<pe;Ee++){for(var Re=0;Re<we;Re++)ve[Re]=this.get(J[Re],Ee);ve[we]=Ee;var Ne=q&&q.apply(te,ve);if(Ne!=null){typeof Ne!="object"&&(le[0]=Ne,Ne=le);for(var Le=this.getRawIndex(Ee),Se=Math.floor(Le/fe),Ie=Le%fe,_e=0;_e<Ne.length;_e++){var Ae=J[_e],ue=Ne[_e],ke=be[Ae],Pe=ne[Ae];Pe&&(Pe[Se][Ie]=ue),ue<ke[0]&&(ke[0]=ue),ue>ke[1]&&(ke[1]=ue)}}}return ie},O.downSample=function(J,q,te,re){for(var ie=Y(this,[J]),ne=ie._storage,le=[],fe=Math.floor(1/q),we=ne[J],pe=this.count(),ve=this._chunkSize,be=ie._rawExtent[J],Ee=new(h(this))(pe),Re=0,Ne=0;Ne<pe;Ne+=fe){fe>pe-Ne&&(le.length=fe=pe-Ne);for(var Le=0;Le<fe;Le++){var Se=this.getRawIndex(Ne+Le),Ie=Math.floor(Se/ve),_e=Se%ve;le[Le]=we[Ie][_e]}var Ae=te(le),ue=this.getRawIndex(Math.min(Ne+re(le,Ae)||0,pe-1)),ke=Math.floor(ue/ve),Pe=ue%ve;we[ke][Pe]=Ae,Ae<be[0]&&(be[0]=Ae),Ae>be[1]&&(be[1]=Ae),Ee[Re++]=ue}return ie._count=Re,ie._indices=Ee,ie.getRawIndex=V,ie},O.getItemModel=function(J){var q=this.hostModel;return new S(this.getRawDataItem(J),q,q&&q.ecModel)},O.diff=function(J){var q=this;return new _(J?J.getIndices():[],this.getIndices(),function(te){return P(J,te)},function(te){return P(q,te)})},O.getVisual=function(J){var q=this._visual;return q&&q[J]},O.setVisual=function(J,q){if(b(J)){for(var te in J)J.hasOwnProperty(te)&&this.setVisual(te,J[te]);return}this._visual=this._visual||{},this._visual[J]=q},O.setLayout=function(J,q){if(b(J)){for(var te in J)J.hasOwnProperty(te)&&this.setLayout(te,J[te]);return}this._layout[J]=q},O.getLayout=function(J){return this._layout[J]},O.getItemLayout=function(J){return this._itemLayouts[J]},O.setItemLayout=function(J,q,te){this._itemLayouts[J]=te?o.extend(this._itemLayouts[J]||{},q):q},O.clearItemLayouts=function(){this._itemLayouts.length=0},O.getItemVisual=function(J,q,te){var re=this._itemVisuals[J],ie=re&&re[q];return ie!=null||te?ie:this.getVisual(q)},O.setItemVisual=function(J,q,te){var re=this._itemVisuals[J]||{},ie=this.hasItemVisual;if(this._itemVisuals[J]=re,b(q)){for(var ne in q)q.hasOwnProperty(ne)&&(re[ne]=q[ne],ie[ne]=!0);return}re[q]=te,ie[q]=!0},O.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var X=function(J){J.seriesIndex=this.seriesIndex,J.dataIndex=this.dataIndex,J.dataType=this.dataType};O.setItemGraphicEl=function(J,q){var te=this.hostModel;q&&(q.dataIndex=J,q.dataType=this.dataType,q.seriesIndex=te&&te.seriesIndex,q.type==="group"&&q.traverse(X,q)),this._graphicEls[J]=q},O.getItemGraphicEl=function(J){return this._graphicEls[J]},O.eachItemGraphicEl=function(J,q){o.each(this._graphicEls,function(te,re){te&&J&&J.call(q,te,re)})},O.cloneShallow=function(J){if(J||(J=new D(o.map(this.dimensions,this.getDimensionInfo,this),this.hostModel)),J._storage=this._storage,T(J,this),this._indices){var q=this._indices.constructor;J._indices=new q(this._indices)}else J._indices=null;return J.getRawIndex=J._indices?V:$,J},O.wrapMethod=function(J,q){var te=this[J];typeof te=="function"&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(J),this[J]=function(){var re=te.apply(this,arguments);return q.apply(this,[re].concat(o.slice(arguments)))})},O.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],O.CHANGABLE_METHODS=["filterSelf","selectRange"],E.exports=D},85508:function(E,A,u){var o=u(23405),S=o.createHashMap,_=o.isObject,p=o.map;function f(b){this.categories=b.categories||[],this._needCollect=b.needCollect,this._deduplication=b.deduplication,this._map}f.createByAxisModel=function(b){var s=b.option,l=s.data,w=l&&p(l,v);return new f({categories:w,needCollect:!w,deduplication:s.dedplication!==!1})};var y=f.prototype;function d(b){return b._map||(b._map=S(b.categories))}function v(b){return _(b)&&b.value!=null?b.value:b+""}y.getOrdinal=function(b){return d(this).get(b)},y.parseAndCollect=function(b){var s,l=this._needCollect;if(typeof b!="string"&&!l)return b;if(l&&!this._deduplication)return s=this.categories.length,this.categories[s]=b,s;var w=d(this);return(s=w.get(b))==null&&(l?(s=this.categories.length,this.categories[s]=b,w.set(b,s)):s=NaN),s},E.exports=f},42480:function(E,A,u){var o=u(23405),S=o.createHashMap,_=o.isTypedArray,p=u(92161).enableClassCheck,f=u(24659),y=f.SOURCE_FORMAT_ORIGINAL,d=f.SERIES_LAYOUT_BY_COLUMN,v=f.SOURCE_FORMAT_UNKNOWN,b=f.SOURCE_FORMAT_TYPED_ARRAY,s=f.SOURCE_FORMAT_KEYED_COLUMNS;function l(w){this.fromDataset=w.fromDataset,this.data=w.data||(w.sourceFormat===s?{}:[]),this.sourceFormat=w.sourceFormat||v,this.seriesLayoutBy=w.seriesLayoutBy||d,this.dimensionsDefine=w.dimensionsDefine,this.encodeDefine=w.encodeDefine&&S(w.encodeDefine),this.startIndex=w.startIndex||0,this.dimensionsDetectCount=w.dimensionsDetectCount}l.seriesDataToSource=function(w){return new l({data:w,sourceFormat:_(w)?b:y,fromDataset:!1})},p(l),E.exports=l},93455:function(E,A,u){var o=u(23405),S=u(46082),_=u(82576),p=u(80023),f=u(61554),y=function(v,b){this.name=v||"",this.depth=0,this.height=0,this.parentNode=null,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.hostTree=b};function d(v,b,s){this.root,this.data,this._nodes=[],this.hostModel=v,this.levelModels=o.map(b||[],function(l){return new S(l,v,v.ecModel)}),this.leavesModel=new S(s||{},v,v.ecModel)}y.prototype={constructor:y,isRemoved:function(){return this.dataIndex<0},eachNode:function(v,b,s){typeof v=="function"&&(s=b,b=v,v=null),v=v||{},o.isString(v)&&(v={order:v});var l,w=v.order||"preorder",I=this[v.attr||"children"];w==="preorder"&&(l=b.call(s,this));for(var C=0;!l&&C<I.length;C++)I[C].eachNode(v,b,s);w==="postorder"&&b.call(s,this)},updateDepthAndHeight:function(v){var b=0;this.depth=v;for(var s=0;s<this.children.length;s++){var l=this.children[s];l.updateDepthAndHeight(v+1),l.height>b&&(b=l.height)}this.height=b+1},getNodeById:function(v){if(this.getId()===v)return this;for(var b=0,s=this.children,l=s.length;b<l;b++){var w=s[b].getNodeById(v);if(w)return w}},contains:function(v){if(v===this)return!0;for(var b=0,s=this.children,l=s.length;b<l;b++){var w=s[b].contains(v);if(w)return w}},getAncestors:function(v){for(var b=[],s=v?this:this.parentNode;s;)b.push(s),s=s.parentNode;return b.reverse(),b},getValue:function(v){var b=this.hostTree.data;return b.get(b.getDimension(v||"value"),this.dataIndex)},setLayout:function(v,b){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,v,b)},getLayout:function(){return this.hostTree.data.getItemLayout(this.dataIndex)},getModel:function(v){if(!(this.dataIndex<0)){var b,s=this.hostTree,l=s.data.getItemModel(this.dataIndex),w=this.getLevelModel();return w||this.children.length!==0&&(this.children.length===0||this.isExpand!==!1)||(b=this.getLeavesModel()),l.getModel(v,(w||b||s.hostModel).getModel(v))}},getLevelModel:function(){return(this.hostTree.levelModels||[])[this.depth]},getLeavesModel:function(){return this.hostTree.leavesModel},setVisual:function(v,b){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,v,b)},getVisual:function(v,b){return this.hostTree.data.getItemVisual(this.dataIndex,v,b)},getRawIndex:function(){return this.hostTree.data.getRawIndex(this.dataIndex)},getId:function(){return this.hostTree.data.getId(this.dataIndex)},isAncestorOf:function(v){for(var b=v.parentNode;b;){if(b===this)return!0;b=b.parentNode}return!1},isDescendantOf:function(v){return v!==this&&v.isAncestorOf(this)}},d.prototype={constructor:d,type:"tree",eachNode:function(v,b,s){this.root.eachNode(v,b,s)},getNodeByDataIndex:function(v){var b=this.data.getRawIndex(v);return this._nodes[b]},getNodeByName:function(v){return this.root.getNodeByName(v)},update:function(){for(var v=this.data,b=this._nodes,s=0,l=b.length;s<l;s++)b[s].dataIndex=-1;for(var s=0,l=v.count();s<l;s++)b[v.getRawIndex(s)].dataIndex=s},clearLayouts:function(){this.data.clearItemLayouts()}},d.createTree=function(v,b,s){var l=new d(b,s.levels,s.leaves),w=[],I=1;(function h(c,m){var T,D,O,N=c.value;I=Math.max(I,o.isArray(N)?N.length:1),w.push(c);var z=new y(c.name,l);m?(T=z,O=(D=m).children,T.parentNode!==D&&(O.push(T),T.parentNode=D)):l.root=z,l._nodes.push(z);var H=c.children;if(H)for(var $=0;$<H.length;$++)h(H[$],z)})(v),l.root.updateDepthAndHeight(0);var C=new p(f(w,{coordDimensions:["value"],dimensionsCount:I}),b);return C.initData(w),_({mainData:C,struct:l,structAttr:"tree"}),l.update(),l},E.exports=d},40256:function(E,A,u){var o=u(23405),S=o.createHashMap,_=o.each,p=o.isString,f=o.defaults,y=o.extend,d=o.isObject,v=o.clone,b=u(51064).normalizeToArray,s=u(52009).guessOrdinal,l=u(42480),w=u(30186).OTHER_DIMENSIONS;function I(C,h,c){if(c||h.get(C)!=null){for(var m=0;h.get(C+m)!=null;)m++;C+=m}return h.set(C,!0),C}E.exports=function(C,h,c){l.isInstance(h)||(h=l.seriesDataToSource(h)),c=c||{},C=(C||[]).slice();for(var m,T,D,O,N,z=(c.dimsDef||[]).slice(),H=S(c.encodeDef),$=S(),V=S(),P=[],U=(m=h,T=C,D=z,O=c.dimCount,N=Math.max(m.dimensionsDetectCount||1,T.length,D.length,O||0),_(T,function(we){var pe=we.dimsDef;pe&&(N=Math.max(N,pe.length))}),N),Y=0;Y<U;Y++){var Z=z[Y]=y({},d(z[Y])?z[Y]:{name:z[Y]}),X=Z.name,J=P[Y]={otherDims:{}};X!=null&&$.get(X)==null&&(J.name=J.displayName=X,$.set(X,Y)),Z.type!=null&&(J.type=Z.type),Z.displayName!=null&&(J.displayName=Z.displayName)}H.each(function(we,pe){if((we=b(we).slice()).length===1&&we[0]<0)return void H.set(pe,!1);var ve=H.set(pe,[]);_(we,function(be,Ee){p(be)&&(be=$.get(be)),be!=null&&be<U&&(ve[Ee]=be,te(P[be],pe,Ee))})});var q=0;function te(we,pe,ve){w.get(pe)!=null?we.otherDims[pe]=ve:(we.coordDim=pe,we.coordDimIndex=ve,V.set(pe,!0))}_(C,function(we,pe){if(p(we))Ee=we,we={};else{var we,ve,be,Ee=we.name,Re=we.ordinalMeta;we.ordinalMeta=null,(we=v(we)).ordinalMeta=Re,ve=we.dimsDef,be=we.otherDims,we.name=we.coordDim=we.coordDimIndex=we.dimsDef=we.otherDims=null}var Ne=H.get(Ee);if(Ne!==!1){var Ne=b(Ne);if(!Ne.length)for(var Le=0;Le<(ve&&ve.length||1);Le++){for(;q<P.length&&P[q].coordDim!=null;)q++;q<P.length&&Ne.push(q++)}_(Ne,function(Ie,_e){var Ae=P[Ie];if(te(f(Ae,we),Ee,_e),Ae.name==null&&ve){var ue=ve[_e];d(ue)||(ue={name:ue}),Ae.name=Ae.displayName=ue.name,Ae.defaultTooltip=ue.defaultTooltip}be&&f(Ae.otherDims,be)})}});var re=c.generateCoord,ie=c.generateCoordCount,ne=ie!=null;ie=re?ie||1:0;for(var le=re||"value",fe=0;fe<U;fe++){var J=P[fe]=P[fe]||{};J.coordDim==null&&(J.coordDim=I(le,V,ne),J.coordDimIndex=0,(!re||ie<=0)&&(J.isExtraCoord=!0),ie--),J.name==null&&(J.name=I(J.coordDim,$)),J.type==null&&s(h,fe,J.name)&&(J.type="ordinal")}return P}},61554:function(E,A,u){var o=u(40256);E.exports=function(S,_){return o((_=_||{}).coordDimensions||[],S,{dimsDef:_.dimensionsDefine||S.dimensionsDefine,encodeDef:_.encodeDefine||S.encodeDefine,dimCount:_.dimensionsCount,generateCoord:_.generateCoord,generateCoordCount:_.generateCoordCount})}},45435:function(E,A,u){u(9129).__DEV__;var o=u(23405);o.isTypedArray;var S=o.extend;o.assert;var _=o.each,p=o.isObject,f=u(51064),y=f.getDataItemValue,d=f.isDataItemOption,v=u(54684).parseDate,b=u(42480),s=u(24659),l=s.SOURCE_FORMAT_TYPED_ARRAY,w=s.SOURCE_FORMAT_ARRAY_ROWS,I=s.SOURCE_FORMAT_ORIGINAL,C=s.SOURCE_FORMAT_OBJECT_ROWS;function h(V,P){b.isInstance(V)||(V=b.seriesDataToSource(V)),this._source=V;var U=this._data=V.data,Y=V.sourceFormat;Y===l&&(this._offset=0,this._dimSize=P,this._data=U),S(this,m[Y===w?Y+"_"+V.seriesLayoutBy:Y])}var c=h.prototype;c.pure=!1,c.persistent=!0,c.getSource=function(){return this._source};var m={arrayRows_column:{pure:!0,count:function(){return Math.max(0,this._data.length-this._source.startIndex)},getItem:function(V){return this._data[V+this._source.startIndex]},appendData:O},arrayRows_row:{pure:!0,count:function(){var V=this._data[0];return V?Math.max(0,V.length-this._source.startIndex):0},getItem:function(V){V+=this._source.startIndex;for(var P=[],U=this._data,Y=0;Y<U.length;Y++){var Z=U[Y];P.push(Z?Z[V]:null)}return P},appendData:function(){throw Error('Do not support appendData when set seriesLayoutBy: "row".')}},objectRows:{pure:!0,count:T,getItem:D,appendData:O},keyedColumns:{pure:!0,count:function(){var V=this._source.dimensionsDefine[0].name,P=this._data[V];return P?P.length:0},getItem:function(V){for(var P=[],U=this._source.dimensionsDefine,Y=0;Y<U.length;Y++){var Z=this._data[U[Y].name];P.push(Z?Z[V]:null)}return P},appendData:function(V){var P=this._data;_(V,function(U,Y){for(var Z=P[Y]||(P[Y]=[]),X=0;X<(U||[]).length;X++)Z.push(U[X])})}},original:{count:T,getItem:D,appendData:O},typedArray:{persistent:!1,pure:!0,count:function(){return this._data?this._data.length/this._dimSize:0},getItem:function(V,P){V-=this._offset,P=P||[];for(var U=this._dimSize*V,Y=0;Y<this._dimSize;Y++)P[Y]=this._data[U+Y];return P},appendData:function(V){this._data=V},clean:function(){this._offset+=this.count(),this._data=null}}};function T(){return this._data.length}function D(V){return this._data[V]}function O(V){for(var P=0;P<V.length;P++)this._data.push(V[P])}var N={arrayRows:z,objectRows:function(V,P,U,Y){return U!=null?V[Y]:V},keyedColumns:z,original:function(V,P,U,Y){var Z=y(V);return U!=null&&Z instanceof Array?Z[U]:Z},typedArray:z};function z(V,P,U,Y){return U!=null?V[U]:V}function H(V,P,U,Y){return $(V[Y],this._dimensionInfos[P])}function $(V,P){var U=P&&P.type;if(U==="ordinal"){var Y=P&&P.ordinalMeta;return Y?Y.parseAndCollect(V):V}return U==="time"&&typeof V!="number"&&V!=null&&V!=="-"&&(V=+v(V)),V==null||V===""?NaN:+V}A.DefaultDataProvider=h,A.defaultDimValueGetters={arrayRows:H,objectRows:function(V,P,U,Y){return $(V[P],this._dimensionInfos[P])},keyedColumns:H,original:function(V,P,U,Y){var Z=V&&(V.value==null?V:V.value);return!this._rawData.pure&&d(V)&&(this.hasItemOption=!0),$(Z instanceof Array?Z[Y]:Z,this._dimensionInfos[P])},typedArray:function(V,P,U,Y){return V[Y]}},A.retrieveRawValue=function(V,P,U){if(V){var Y,Z,X=V.getRawDataItem(P);if(X!=null){var J=V.getProvider().getSource().sourceFormat,q=V.getDimensionInfo(U);return q&&(Y=q.name,Z=q.index),N[J](X,P,Z,Y)}}},A.retrieveRawAttr=function(V,P,U){if(V){var Y=V.getProvider().getSource().sourceFormat;if(Y===I||Y===C){var Z=V.getRawDataItem(P);if(Y!==I||p(Z)||(Z=null),Z)return Z[U]}}}},91968:function(E,A,u){var o=u(23405),S=o.each,_=o.isString;function p(f,y){return!!y&&y===f.getCalculationInfo("stackedDimension")}A.enableDataStack=function(f,y,d){var v,b,s,l,w=(d=d||{}).byIndex,I=d.stackedCoordDimension,C=!!(f&&f.get("stack"));if(S(y,function(T,D){_(T)&&(y[D]=T={name:T}),C&&!T.isExtraCoord&&(w||v||!T.ordinalMeta||(v=T),b||T.type==="ordinal"||T.type==="time"||I&&I!==T.coordDim||(b=T))}),!b||w||v||(w=!0),b){s="__\0ecstackresult",l="__\0ecstackedover",v&&(v.createInvertedIndices=!0);var h=b.coordDim,c=b.type,m=0;S(y,function(T){T.coordDim===h&&m++}),y.push({name:s,coordDim:h,coordDimIndex:m,type:c,isExtraCoord:!0,isCalculationCoord:!0}),m++,y.push({name:l,coordDim:l,coordDimIndex:m,type:c,isExtraCoord:!0,isCalculationCoord:!0})}return{stackedDimension:b&&b.name,stackedByDimension:v&&v.name,isStackedByIndex:w,stackedOverDimension:l,stackResultDimension:s}},A.isDimensionStacked=p,A.getStackedDimension=function(f,y){return p(f,y)?f.getCalculationInfo("stackResultDimension"):y}},30186:function(E,A,u){var o=u(23405),S=o.each,_=o.createHashMap;o.assert,u(9129).__DEV__;var p=_(["tooltip","label","itemName","itemId","seriesName"]);A.OTHER_DIMENSIONS=p,A.summarizeDimensions=function(f){var y={},d=y.encode={},v=_(),b=[],s=[];S(f.dimensions,function(h){var c=f.getDimensionInfo(h),m=c.coordDim;if(m){var T,D=d[m];d.hasOwnProperty(m)||(D=d[m]=[]),D[c.coordDimIndex]=h,c.isExtraCoord||(v.set(m,1),(T=c.type)!=="ordinal"&&T!=="time"&&(b[0]=h)),c.defaultTooltip&&s.push(h)}p.each(function(O,N){var z=d[N];d.hasOwnProperty(N)||(z=d[N]=[]);var H=c.otherDims[N];H!=null&&H!==!1&&(z[H]=c.name)})});var l=[],w={};v.each(function(h,c){var m=d[c];w[c]=m[0],l=l.concat(m)}),y.dataDimsOnCoord=l,y.encodeFirstDimNotExtra=w;var I=d.label;I&&I.length&&(b=I.slice());var C=d.tooltip;return C&&C.length?s=C.slice():s.length||(s=b.slice()),d.defaultedLabel=b,d.defaultedTooltip=s,y},A.getDimensionTypeByAxis=function(f){return f==="category"?"ordinal":f==="time"?"time":"float"}},82576:function(E,A,u){var o=u(23405),S=o.each,_="\0__link_datas",p="\0__link_mainData";function f(l,w){var I;if(I=this,I[p]===I){var C=o.extend({},this[_]);C[this.dataType]=w,b(w,C,l)}else s(w,this.dataType,this[p],l);return w}function y(l,w){return l.struct&&l.struct.update(this),w}function d(l,w){return S(w[_],function(I,C){I!==w&&s(I.cloneShallow(),C,w,l)}),w}function v(l){var w=this[p];return l==null||w==null?w:w[_][l]}function b(l,w,I){l[_]={},S(w,function(C,h){s(C,h,l,I)})}function s(l,w,I,C){I[_][w]=l,l[p]=I,l.dataType=w,C.struct&&(l[C.structAttr]=C.struct,C.struct[C.datasAttr[w]]=l),l.getLinkedData=v}E.exports=function(l){var w=l.mainData,I=l.datas;I||(I={main:w},l.datasAttr={main:"data"}),l.datas=l.mainData=null,b(w,I,l),S(I,function(C){S(w.TRANSFERABLE_METHODS,function(h){C.wrapMethod(h,o.curry(f,l))})}),w.wrapMethod("cloneShallow",o.curry(d,l)),S(w.CHANGABLE_METHODS,function(C){w.wrapMethod(C,o.curry(y,l))}),o.assert(I[w.dataType]===w)}},52009:function(E,A,u){u(9129).__DEV__;var o=u(51064),S=o.makeInner,_=o.getDataItemValue,p=u(83813).getCoordSysDefineBySeries,f=u(23405),y=f.createHashMap,d=f.each,v=f.map,b=f.isArray,s=f.isString,l=f.isObject,w=f.isTypedArray,I=f.isArrayLike,C=f.extend;f.assert;var h=u(42480),c=u(24659),m=c.SOURCE_FORMAT_ORIGINAL,T=c.SOURCE_FORMAT_ARRAY_ROWS,D=c.SOURCE_FORMAT_OBJECT_ROWS,O=c.SOURCE_FORMAT_KEYED_COLUMNS,N=c.SOURCE_FORMAT_UNKNOWN,z=c.SOURCE_FORMAT_TYPED_ARRAY,H=c.SERIES_LAYOUT_BY_ROW,$=S();function V(Y){if(Y){var Z=y();return v(Y,function(X,J){if((X=C({},l(X)?X:{name:X})).name==null)return X;X.name+="",X.displayName==null&&(X.displayName=X.name);var q=Z.get(X.name);return q?X.name+="-"+q.count++:Z.set(X.name,{count:1}),X})}}function P(Y,Z,X,J){if(J==null&&(J=1/0),Z===H)for(var q=0;q<X.length&&q<J;q++)Y(X[q]?X[q][0]:null,q);else for(var te=X[0]||[],q=0;q<te.length&&q<J;q++)Y(te[q],q)}function U(Y,Z,X,J,q,te){var re,ie;if(w(Y))return!1;if(J&&(ie=l(ie=J[te])?ie.name:ie),Z===T)if(X===H){for(var ne=Y[te],le=0;le<(ne||[]).length&&le<5;le++)if((re=ve(ne[q+le]))!=null)return re}else for(var le=0;le<Y.length&&le<5;le++){var fe=Y[q+le];if(fe&&(re=ve(fe[te]))!=null)return re}else if(Z===D){if(!ie)return;for(var le=0;le<Y.length&&le<5;le++){var we=Y[le];if(we&&(re=ve(we[ie]))!=null)return re}}else if(Z===O){if(!ie)return;var ne=Y[ie];if(!ne||w(ne))return!1;for(var le=0;le<ne.length&&le<5;le++)if((re=ve(ne[le]))!=null)return re}else if(Z===m)for(var le=0;le<Y.length&&le<5;le++){var we=Y[le],pe=_(we);if(!b(pe))return!1;if((re=ve(pe[te]))!=null)return re}function ve(be){return(!(be!=null&&isFinite(be))||be==="")&&(!!s(be)&&be!=="-"||void 0)}return!1}A.detectSourceFormat=function(Y){var Z=Y.option.source,X=N;if(w(Z))X=z;else if(b(Z)){Z.length===0&&(X=T);for(var J=0,q=Z.length;J<q;J++){var te=Z[J];if(te!=null){if(b(te)){X=T;break}else if(l(te)){X=D;break}}}}else if(l(Z)){for(var re in Z)if(Z.hasOwnProperty(re)&&I(Z[re])){X=O;break}}else if(Z!=null)throw Error("Invalid data");$(Y).sourceFormat=X},A.getSource=function(Y){return $(Y).source},A.resetSourceDefaulter=function(Y){$(Y).datasetMap=y()},A.prepareSource=function(Y){var Z=Y.option,X=Z.data,J=w(X)?z:m,q=!1,te=Z.seriesLayoutBy,re=Z.sourceHeader,ie=Z.dimensions,ne=function(pe){var ve=pe.option;if(!ve.data)return pe.ecModel.getComponent("dataset",ve.datasetIndex||0)}(Y);if(ne){var le=ne.option;X=le.source,J=$(ne).sourceFormat,q=!0,te=te||le.seriesLayoutBy,re==null&&(re=le.sourceHeader),ie=ie||le.dimensions}var fe=function(pe,ve,be,Ee,Re){if(!pe)return{dimensionsDefine:V(Re)};if(ve===T)Ee==="auto"||Ee==null?P(function(Ae){Ae!=null&&Ae!=="-"&&(s(Ae)?Le==null&&(Le=1):Le=0)},be,pe,10):Le=+!!Ee,Re||Le!==1||(Re=[],P(function(Ae,ue){Re[ue]=Ae??""},be,pe)),Ne=Re?Re.length:be===H?pe.length:pe[0]?pe[0].length:null;else if(ve===D)Re||(Re=function(Ae){for(var ue,ke=0;ke<Ae.length&&!(ue=Ae[ke++]););if(ue){var Pe=[];return d(ue,function(Ve,je){Pe.push(je)}),Pe}}(pe),Se=!0);else if(ve===O)Re||(Re=[],Se=!0,d(pe,function(Ae,ue){Re.push(ue)}));else if(ve===m){var Ne,Le,Se,Ie,_e=_(pe[0]);Ne=b(_e)&&_e.length||1}return Se&&d(Re,function(Ae,ue){(l(Ae)?Ae.name:Ae)==="name"&&(Ie=ue)}),{startIndex:Le,dimensionsDefine:V(Re),dimensionsDetectCount:Ne,potentialNameDimIndex:Ie}}(X,J,te,re,ie),we=Z.encode;!we&&ne&&(we=function(pe,ve,be,Ee,Re,Ne){var Le,Se=p(pe),Ie={},_e=[],Ae=[],ue=pe.subType,ke=y(["pie","map","funnel"]),Pe=y(["line","bar","pictorialBar","scatter","effectScatter","candlestick","boxplot"]);if(Se&&Pe.get(ue)!=null){var Ve=$(pe.ecModel).datasetMap,je=ve.uid+"_"+Re,it=Ve.get(je)||Ve.set(je,{categoryWayDim:1,valueWayDim:0});d(Se.coordSysDims,function(yt){if(Se.firstCategoryDimIndex==null){var st=it.valueWayDim++;Ie[yt]=st,Ae.push(st)}else if(Se.categoryAxisMap.get(yt))Ie[yt]=0,_e.push(0);else{var st=it.categoryWayDim++;Ie[yt]=st,Ae.push(st)}})}else if(ke.get(ue)!=null){for(var rt=0;rt<5&&Le==null;rt++)U(be,Ee,Re,Ne.dimensionsDefine,Ne.startIndex,rt)||(Le=rt);if(Le!=null){Ie.value=Le;var mt=Ne.potentialNameDimIndex||Math.max(Le-1,0);Ae.push(mt),_e.push(mt)}}return _e.length&&(Ie.itemName=_e),Ae.length&&(Ie.seriesName=Ae),Ie}(Y,ne,X,J,te,fe)),$(Y).source=new h({data:X,fromDataset:q,seriesLayoutBy:te,sourceFormat:J,dimensionsDefine:fe.dimensionsDefine,startIndex:fe.startIndex,dimensionsDetectCount:fe.dimensionsDetectCount,encodeDefine:we})},A.guessOrdinal=function(Y,Z){return U(Y.data,Y.sourceFormat,Y.seriesLayoutBy,Y.dimensionsDefine,Y.startIndex,Z)}},24659:function(E,A){A.SOURCE_FORMAT_ORIGINAL="original",A.SOURCE_FORMAT_ARRAY_ROWS="arrayRows",A.SOURCE_FORMAT_OBJECT_ROWS="objectRows",A.SOURCE_FORMAT_KEYED_COLUMNS="keyedColumns",A.SOURCE_FORMAT_UNKNOWN="unknown",A.SOURCE_FORMAT_TYPED_ARRAY="typedArray",A.SERIES_LAYOUT_BY_COLUMN="column",A.SERIES_LAYOUT_BY_ROW="row"},87930:function(E,A,u){u(9129).__DEV__;var o=u(98709),S=u(23405),_=u(86049),p=u(23584),f=u(32553),y=u(62271),d=u(47409),v=u(60089),b=u(17234),s=u(22216),l=u(8381),w=u(93689),I=u(28628),C=u(95166),h=u(44152),c=u(4695),m=u(51747),T=u(51064),D=u(94127).throttle,O=u(35425),N=u(43203),z=u(30427),H=u(78796),$=u(43759),V=u(66568);u(22253);var P=u(95723),U=S.assert,Y=S.each,Z=S.isFunction,X=S.isObject,J=I.parseClassType,q="__flagInMainProcess",te="__optionUpdated",re=/^[a-zA-Z0-9_]+$/;function ie(Ge){return function(et,vt,wt){et=et&&et.toLowerCase(),y.prototype[Ge].call(this,et,vt,wt)}}function ne(){y.call(this)}function le(Ge,Dt,vt){vt=vt||{},typeof Dt=="string"&&(Dt=Qe[Dt]),this.id,this.group,this._dom=Ge;var wt,Ct,bt,Rt,Lt=this._zr=o.init(Ge,{renderer:vt.renderer||"canvas",devicePixelRatio:vt.devicePixelRatio,width:vt.width,height:vt.height});this._throttledZrFlush=D(S.bind(Lt.flush,Lt),17);var Dt=S.clone(Dt);Dt&&l(Dt,!0),this._theme=Dt,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new b;var Jt=this._api=(wt=this,Ct=wt._coordSysMgr,S.extend(new v(wt),{getCoordinateSystems:S.bind(Ct.getCoordinateSystems,Ct),getComponentByElement:function(nn){for(;nn;){var An=nn.__ecComponentInfo;if(An!=null)return wt._model.getComponent(An.mainType,An.index);nn=nn.parent}}}));function zt(nn,An){return nn.__prio-An.__prio}f(st,zt),f(rt,zt),this._scheduler=new H(this,Jt,rt,st),y.call(this,this._ecEventProcessor=new Ve),this._messageCenter=new ne,this._initEvents(),this.resize=S.bind(this.resize,this),this._pendingActions=[],Lt.animation.on("frame",this._onframe,this),bt=Lt,Rt=this,bt.on("rendered",function(){Rt.trigger("rendered"),!bt.animation.isFinished()||Rt[te]||Rt._scheduler.unfinished||Rt._pendingActions.length||Rt.trigger("finished")}),S.setAsPrimitive(this)}ne.prototype.on=ie("on"),ne.prototype.off=ie("off"),ne.prototype.one=ie("one"),S.mixin(ne,y);var fe=le.prototype;function we(Ge,et,vt){var wt,Ct=this._model,bt=this._coordSysMgr.getCoordinateSystems();et=T.parseFinder(Ct,et);for(var Rt=0;Rt<bt.length;Rt++){var Lt=bt[Rt];if(Lt[Ge]&&(wt=Lt[Ge](Ct,et,vt))!=null)return wt}}fe._onframe=function(){if(!this._disposed){var Ge=this._scheduler;if(this[te]){var et=this[te].silent;this[q]=!0,ve(this),pe.update.call(this),this[q]=!1,this[te]=!1,Ne.call(this,et),Le.call(this,et)}else if(Ge.unfinished){var vt=1,wt=this._model,Ct=this._api;Ge.unfinished=!1;do{var bt=+new Date;Ge.performSeriesTasks(wt),Ge.performDataProcessorTasks(wt),Ee(this,wt),Ge.performVisualTasks(wt),Ae(this,this._model,Ct,"remain"),vt-=+new Date-bt}while(vt>0&&Ge.unfinished);Ge.unfinished||this._zr.flush()}}},fe.getDom=function(){return this._dom},fe.getZr=function(){return this._zr},fe.setOption=function(Ge,et,vt){var wt;if(X(et)&&(vt=et.lazyUpdate,wt=et.silent,et=et.notMerge),this[q]=!0,!this._model||et){var Ct=new s(this._api),bt=this._theme,Rt=this._model=new d(null,null,bt,Ct);Rt.scheduler=this._scheduler,Rt.init(null,null,bt,Ct)}this._model.setOption(Ge,mt),vt?(this[te]={silent:wt},this[q]=!1):(ve(this),pe.update.call(this),this._zr.flush(),this[te]=!1,this[q]=!1,Ne.call(this,wt),Le.call(this,wt))},fe.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},fe.getModel=function(){return this._model},fe.getOption=function(){return this._model&&this._model.getOption()},fe.getWidth=function(){return this._zr.getWidth()},fe.getHeight=function(){return this._zr.getHeight()},fe.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},fe.getRenderedCanvas=function(Ge){if(p.canvasSupported)return(Ge=Ge||{}).pixelRatio=Ge.pixelRatio||1,Ge.backgroundColor=Ge.backgroundColor||this._model.get("backgroundColor"),this._zr.painter.getRenderedCanvas(Ge)},fe.getSvgDataUrl=function(){if(p.svgSupported){var Ge=this._zr,et=Ge.storage.getDisplayList();return S.each(et,function(vt){vt.stopAnimation(!0)}),Ge.painter.pathToDataUrl()}},fe.getDataURL=function(Ge){var et=(Ge=Ge||{}).excludeComponents,vt=this._model,wt=[],Ct=this;Y(et,function(Rt){vt.eachComponent({mainType:Rt},function(Lt){var Dt=Ct._componentsMap[Lt.__viewId];Dt.group.ignore||(wt.push(Dt),Dt.group.ignore=!0)})});var bt=this._zr.painter.getType()==="svg"?this.getSvgDataUrl():this.getRenderedCanvas(Ge).toDataURL("image/"+(Ge&&Ge.type||"png"));return Y(wt,function(Rt){Rt.group.ignore=!1}),bt},fe.getConnectedDataURL=function(Ge){if(p.canvasSupported){var et=this.group,vt=Math.min,wt=Math.max,Ct=1/0;if(!cn[et])return this.getDataURL(Ge);var bt=Ct,Rt=Ct,Lt=-Ct,Dt=-Ct,Jt=[],zt=Ge&&Ge.pixelRatio||1;S.each(Xt,function(ri,zi){if(ri.group===et){var ba=ri.getRenderedCanvas(S.clone(Ge)),Ro=ri.getDom().getBoundingClientRect();bt=vt(Ro.left,bt),Rt=vt(Ro.top,Rt),Lt=wt(Ro.right,Lt),Dt=wt(Ro.bottom,Dt),Jt.push({dom:ba,left:Ro.left,top:Ro.top})}}),bt*=zt,Rt*=zt,Lt*=zt,Dt*=zt;var nn=Lt-bt,An=Dt-Rt,lr=S.createCanvas();lr.width=nn,lr.height=An;var $r=o.init(lr);return Y(Jt,function(ri){var zi=new m.Image({style:{x:ri.left*zt-bt,y:ri.top*zt-Rt,image:ri.dom}});$r.add(zi)}),$r.refreshImmediately(),lr.toDataURL("image/"+(Ge&&Ge.type||"png"))}},fe.convertToPixel=S.curry(we,"convertToPixel"),fe.convertFromPixel=S.curry(we,"convertFromPixel"),fe.containPixel=function(Ge,et){var vt,wt=this._model;return Ge=T.parseFinder(wt,Ge),S.each(Ge,function(Ct,bt){bt.indexOf("Models")>=0&&S.each(Ct,function(Rt){var Lt=Rt.coordinateSystem;if(Lt&&Lt.containPoint)vt|=!!Lt.containPoint(et);else if(bt==="seriesModels"){var Dt=this._chartsMap[Rt.__viewId];Dt&&Dt.containPoint&&(vt|=Dt.containPoint(et,Rt))}},this)},this),!!vt},fe.getVisual=function(Ge,et){var vt=this._model,wt=(Ge=T.parseFinder(vt,Ge,{defaultMainType:"series"})).seriesModel.getData(),Ct=Ge.hasOwnProperty("dataIndexInside")?Ge.dataIndexInside:Ge.hasOwnProperty("dataIndex")?wt.indexOfRawIndex(Ge.dataIndex):null;return Ct!=null?wt.getItemVisual(Ct,et):wt.getVisual(et)},fe.getViewOfComponentModel=function(Ge){return this._componentsMap[Ge.__viewId]},fe.getViewOfSeriesModel=function(Ge){return this._chartsMap[Ge.__viewId]};var pe={prepareAndUpdate:function(Ge){ve(this),pe.update.call(this,Ge)},update:function(Ge){var et=this._model,vt=this._api,wt=this._zr,Ct=this._coordSysMgr,bt=this._scheduler;if(et){bt.restoreData(et,Ge),bt.performSeriesTasks(et),Ct.create(et,vt),bt.performDataProcessorTasks(et,Ge),Ee(this,et),Ct.update(et,vt),Ie(et),bt.performVisualTasks(et,Ge),_e(this,et,vt,Ge);var Rt=et.get("backgroundColor")||"transparent";if(p.canvasSupported)wt.setBackgroundColor(Rt);else{var Lt=_.parse(Rt);Rt=_.stringify(Lt,"rgb"),Lt[3]===0&&(Rt="transparent")}ue(et,vt)}},updateTransform:function(Ge){var et=this._model,vt=this,wt=this._api;if(et){var Ct=[];et.eachComponent(function(Rt,Lt){var Dt=vt.getViewOfComponentModel(Lt);if(Dt&&Dt.__alive)if(Dt.updateTransform){var Jt=Dt.updateTransform(Lt,et,wt,Ge);Jt&&Jt.update&&Ct.push(Dt)}else Ct.push(Dt)});var bt=S.createHashMap();et.eachSeries(function(Rt){var Lt=vt._chartsMap[Rt.__viewId];if(Lt.updateTransform){var Dt=Lt.updateTransform(Rt,et,wt,Ge);Dt&&Dt.update&&bt.set(Rt.uid,1)}else bt.set(Rt.uid,1)}),Ie(et),this._scheduler.performVisualTasks(et,Ge,{setDirty:!0,dirtyMap:bt}),Ae(vt,et,wt,Ge,bt),ue(et,this._api)}},updateView:function(Ge){var et=this._model;et&&(c.markUpdateMethod(Ge,"updateView"),Ie(et),this._scheduler.performVisualTasks(et,Ge,{setDirty:!0}),_e(this,this._model,this._api,Ge),ue(et,this._api))},updateVisual:function(Ge){pe.update.call(this,Ge)},updateLayout:function(Ge){pe.update.call(this,Ge)}};function ve(Ge){var et=Ge._model,vt=Ge._scheduler;vt.restorePipelines(et),vt.prepareStageTasks(),Se(Ge,"component",et,vt),Se(Ge,"chart",et,vt),vt.plan()}function be(Ge,et,vt,wt,Ct){var bt=Ge._model;if(!wt)return void Y(Ge._componentsViews.concat(Ge._chartsViews),Jt);var Rt={};Rt[wt+"Id"]=vt[wt+"Id"],Rt[wt+"Index"]=vt[wt+"Index"],Rt[wt+"Name"]=vt[wt+"Name"];var Lt={mainType:wt,query:Rt};Ct&&(Lt.subType=Ct);var Dt=vt.excludeSeriesId;function Jt(zt){zt&&zt.__alive&&zt[et]&&zt[et](zt.__model,bt,Ge._api,vt)}Dt!=null&&(Dt=S.createHashMap(T.normalizeToArray(Dt))),bt&&bt.eachComponent(Lt,function(zt){Dt&&Dt.get(zt.id)!=null||Jt(Ge[wt==="series"?"_chartsMap":"_componentsMap"][zt.__viewId])},Ge)}function Ee(Ge,et){var vt=Ge._chartsMap,wt=Ge._scheduler;et.eachSeries(function(Ct){wt.updateStreamModes(Ct,vt[Ct.__viewId])})}function Re(Ge,et){var vt,wt=Ge.type,Ct=Ge.escapeConnect,bt=je[wt],Rt=bt.actionInfo,Lt=(Rt.update||"update").split(":"),Dt=Lt.pop();Lt=Lt[0]!=null&&J(Lt[0]),this[q]=!0;var Jt=[Ge],zt=!1;Ge.batch&&(zt=!0,Jt=S.map(Ge.batch,function(lr){return(lr=S.defaults(S.extend({},lr),Ge)).batch=null,lr}));var nn=[],An=wt==="highlight"||wt==="downplay";Y(Jt,function(lr){(vt=(vt=bt.action(lr,this._model,this._api))||S.extend({},lr)).type=Rt.event||vt.type,nn.push(vt),An?be(this,Dt,lr,"series"):Lt&&be(this,Dt,lr,Lt.main,Lt.sub)},this),Dt==="none"||An||Lt||(this[te]?(ve(this),pe.update.call(this,Ge),this[te]=!1):pe[Dt].call(this,Ge)),vt=zt?{type:Rt.event||wt,escapeConnect:Ct,batch:nn}:nn[0],this[q]=!1,et||this._messageCenter.trigger(vt.type,vt)}function Ne(Ge){for(var et=this._pendingActions;et.length;){var vt=et.shift();Re.call(this,vt,Ge)}}function Le(Ge){Ge||this.trigger("updated")}function Se(Ge,et,vt,wt){for(var Ct=et==="component",bt=Ct?Ge._componentsViews:Ge._chartsViews,Rt=Ct?Ge._componentsMap:Ge._chartsMap,Lt=Ge._zr,Dt=Ge._api,Jt=0;Jt<bt.length;Jt++)bt[Jt].__alive=!1;function zt(An){var lr="_ec_"+An.id+"_"+An.type,$r=Rt[lr];if(!$r){var ri=J(An.type);($r=new(Ct?h.getClass(ri.main,ri.sub):c.getClass(ri.sub))).init(vt,Dt),Rt[lr]=$r,bt.push($r),Lt.add($r.group)}An.__viewId=$r.__id=lr,$r.__alive=!0,$r.__model=An,$r.group.__ecComponentInfo={mainType:An.mainType,index:An.componentIndex},Ct||wt.prepareView($r,An,vt,Dt)}Ct?vt.eachComponent(function(An,lr){An!=="series"&&zt(lr)}):vt.eachSeries(zt);for(var Jt=0;Jt<bt.length;){var nn=bt[Jt];nn.__alive?Jt++:(Ct||nn.renderTask.dispose(),Lt.remove(nn.group),nn.dispose(vt,Dt),bt.splice(Jt,1),delete Rt[nn.__id],nn.__id=nn.group.__ecComponentInfo=null)}}function Ie(Ge){Ge.clearColorPalette(),Ge.eachSeries(function(et){et.clearColorPalette()})}function _e(Ge,et,vt,wt){var Ct,bt,Rt,Lt;Ct=Ge,bt=et,Rt=vt,Lt=wt,Y(Ct._componentsViews,function(Dt){var Jt=Dt.__model;Dt.render(Jt,bt,Rt,Lt),Pe(Jt,Dt)}),Y(Ge._chartsViews,function(Dt){Dt.__alive=!1}),Ae(Ge,et,vt,wt),Y(Ge._chartsViews,function(Dt){Dt.__alive||Dt.remove(et,vt)})}function Ae(Ge,et,vt,wt,Ct){var bt,Rt,Lt,Dt,Jt,zt=Ge._scheduler;et.eachSeries(function(nn){var An,lr,$r,ri=Ge._chartsMap[nn.__viewId];ri.__alive=!0;var zi=ri.renderTask;zt.updatePayload(zi,wt),Ct&&Ct.get(nn.uid)&&zi.dirty(),Jt|=zi.perform(zt.getPerformArgs(zi)),ri.group.silent=!!nn.get("silent"),Pe(nn,ri),An=nn,lr=ri,$r=An.get("blendMode")||null,lr.group.traverse(function(ba){ba.isGroup||ba.style.blend===$r||ba.setStyle("blend",$r),ba.eachPendingDisplayable&&ba.eachPendingDisplayable(function(Ro){Ro.setStyle("blend",$r)})})}),zt.unfinished|=Jt,bt=Ge._zr,Rt=et,Lt=bt.storage,Dt=0,Lt.traverse(function(nn){!nn.isGroup&&Dt++}),Dt>Rt.get("hoverLayerThreshold")&&!p.node&&Lt.traverse(function(nn){nn.isGroup||(nn.useHoverLayer=!0)}),N(Ge._zr.dom,et)}function ue(Ge,et){Y(yt,function(vt){vt(Ge,et)})}fe.resize=function(Ge){this._zr.resize(Ge);var et=this._model;if(this._loadingFX&&this._loadingFX.resize(),et){var vt=et.resetOption("media"),wt=Ge&&Ge.silent;this[q]=!0,vt&&ve(this),pe.update.call(this),this[q]=!1,Ne.call(this,wt),Le.call(this,wt)}},fe.showLoading=function(Ge,et){if(X(Ge)&&(et=Ge,Ge=""),Ge=Ge||"default",this.hideLoading(),At[Ge]){var vt=At[Ge](this._api,et),wt=this._zr;this._loadingFX=vt,wt.add(vt)}},fe.hideLoading=function(){this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},fe.makeActionFromEvent=function(Ge){var et=S.extend({},Ge);return et.type=it[Ge.type],et},fe.dispatchAction=function(Ge,et){if(X(et)||(et={silent:!!et}),je[Ge.type]&&this._model){if(this[q])return void this._pendingActions.push(Ge);Re.call(this,Ge,et.silent),et.flush?this._zr.flush(!0):et.flush!==!1&&p.browser.weChat&&this._throttledZrFlush(),Ne.call(this,et.silent),Le.call(this,et.silent)}},fe.appendData=function(Ge){var et=Ge.seriesIndex;this.getModel().getSeriesByIndex(et).appendData(Ge),this._scheduler.unfinished=!0},fe.on=ie("on"),fe.off=ie("off"),fe.one=ie("one");var ke=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function Pe(Ge,et){var vt=Ge.get("z"),wt=Ge.get("zlevel");et.group.traverse(function(Ct){Ct.type!=="group"&&(vt!=null&&(Ct.z=vt),wt!=null&&(Ct.zlevel=wt))})}function Ve(){this.eventInfo}fe._initEvents=function(){Y(ke,function(Ge){var et=function(vt){var wt,Ct=this.getModel(),bt=vt.target;if(Ge==="globalout")wt={};else if(bt&&bt.dataIndex!=null){var Rt=bt.dataModel||Ct.getSeriesByIndex(bt.seriesIndex);wt=Rt&&Rt.getDataParams(bt.dataIndex,bt.dataType,bt)||{}}else bt&&bt.eventData&&(wt=S.extend({},bt.eventData));if(wt){var Lt=wt.componentType,Dt=wt.componentIndex;(Lt==="markLine"||Lt==="markPoint"||Lt==="markArea")&&(Lt="series",Dt=wt.seriesIndex);var Jt=Lt&&Dt!=null&&Ct.getComponent(Lt,Dt),zt=Jt&&this[Jt.mainType==="series"?"_chartsMap":"_componentsMap"][Jt.__viewId];wt.event=vt,wt.type=Ge,this._ecEventProcessor.eventInfo={targetEl:bt,packedEvent:wt,model:Jt,view:zt},this.trigger(Ge,wt)}};et.zrEventfulCallAtLast=!0,this._zr.on(Ge,et,this)},this),Y(it,function(Ge,et){this._messageCenter.on(et,function(vt){this.trigger(et,vt)},this)},this)},fe.isDisposed=function(){return this._disposed},fe.clear=function(){this.setOption({series:[]},!0)},fe.dispose=function(){if(!this._disposed){this._disposed=!0,T.setAttribute(this.getDom(),bn,"");var Ge=this._api,et=this._model;Y(this._componentsViews,function(vt){vt.dispose(et,Ge)}),Y(this._chartsViews,function(vt){vt.dispose(et,Ge)}),this._zr.dispose(),delete Xt[this.id]}},S.mixin(le,y),Ve.prototype={constructor:Ve,normalizeQuery:function(Ge){var et={},vt={},wt={};if(S.isString(Ge)){var Ct=J(Ge);et.mainType=Ct.main||null,et.subType=Ct.sub||null}else{var bt=["Index","Name","Id"],Rt={name:1,dataIndex:1,dataType:1};S.each(Ge,function(Lt,Dt){for(var Jt=!1,zt=0;zt<bt.length;zt++){var nn=bt[zt],An=Dt.lastIndexOf(nn);if(An>0&&An===Dt.length-nn.length){var lr=Dt.slice(0,An);lr!=="data"&&(et.mainType=lr,et[nn.toLowerCase()]=Lt,Jt=!0)}}Rt.hasOwnProperty(Dt)&&(vt[Dt]=Lt,Jt=!0),Jt||(wt[Dt]=Lt)})}return{cptQuery:et,dataQuery:vt,otherQuery:wt}},filter:function(Ge,et,vt){var wt=this.eventInfo;if(!wt)return!0;var Ct=wt.targetEl,bt=wt.packedEvent,Rt=wt.model,Lt=wt.view;if(!Rt||!Lt)return!0;var Dt=et.cptQuery,Jt=et.dataQuery;return zt(Dt,Rt,"mainType")&&zt(Dt,Rt,"subType")&&zt(Dt,Rt,"index","componentIndex")&&zt(Dt,Rt,"name")&&zt(Dt,Rt,"id")&&zt(Jt,bt,"name")&&zt(Jt,bt,"dataIndex")&&zt(Jt,bt,"dataType")&&(!Lt.filterForExposedEvent||Lt.filterForExposedEvent(Ge,et.otherQuery,Ct,bt));function zt(nn,An,lr,$r){return nn[lr]==null||An[$r||lr]===nn[lr]}},afterTrigger:function(){this.eventInfo=null}};var je={},it={},rt=[],mt=[],yt=[],st=[],Qe={},At={},Xt={},cn={},Sn=new Date-0,Vn=new Date-0,bn="_echarts_instance_";function En(Ge){cn[Ge]=!1}function pn(Ge){return Xt[T.getAttribute(Ge,bn)]}function Un(Ge){mt.push(Ge)}function Pn(Ge,et){Mt(rt,Ge,et,1e3)}function On(Ge,et,vt){typeof et=="function"&&(vt=et,et="");var wt=X(Ge)?Ge.type:[Ge,Ge={event:et}][0];Ge.event=(Ge.event||wt).toLowerCase(),et=Ge.event,U(re.test(wt)&&re.test(et)),je[wt]||(je[wt]={action:vt,actionInfo:Ge}),it[et]=wt}function Ht(Ge,et){Mt(st,Ge,et,3e3,"visual")}function Mt(Ge,et,vt,wt,Ct){(Z(et)||X(et))&&(vt=et,et=wt);var bt=H.wrapStageHandler(vt,Ct);return bt.__prio=et,bt.__raw=vt,Ge.push(bt),bt}Ht(2e3,O),Un(l),Pn(5e3,w),At.default=z,On({type:"highlight",event:"highlight",update:"highlight"},S.noop),On({type:"downplay",event:"downplay",update:"downplay"},S.noop),Qe.light=$,Qe.dark=V,A.version="4.2.1",A.dependencies={zrender:"4.0.6"},A.PRIORITY={PROCESSOR:{FILTER:1e3,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,GLOBAL:2e3,CHART:3e3,COMPONENT:4e3,BRUSH:5e3}},A.init=function(Ge,et,vt){var wt=pn(Ge);if(wt)return wt;var Ct=new le(Ge,et,vt);Ct.id="ec_"+Sn++,Xt[Ct.id]=Ct,T.setAttribute(Ge,bn,Ct.id);var bt="__connectUpdateStatus";function Rt(Lt,Dt){for(var Jt=0;Jt<Lt.length;Jt++)Lt[Jt][bt]=Dt}return Y(it,function(Lt,Dt){Ct._messageCenter.on(Dt,function(Jt){if(cn[Ct.group]&&Ct[bt]!==0&&(!Jt||!Jt.escapeConnect)){var zt=Ct.makeActionFromEvent(Jt),nn=[];Y(Xt,function(An){An!==Ct&&An.group===Ct.group&&nn.push(An)}),Rt(nn,0),Y(nn,function(An){An[bt]!==1&&An.dispatchAction(zt)}),Rt(nn,2)}})}),Ct},A.connect=function(Ge){if(S.isArray(Ge)){var et=Ge;Ge=null,Y(et,function(vt){vt.group!=null&&(Ge=vt.group)}),Ge=Ge||"g_"+Vn++,Y(et,function(vt){vt.group=Ge})}return cn[Ge]=!0,Ge},A.disConnect=En,A.disconnect=En,A.dispose=function(Ge){typeof Ge=="string"?Ge=Xt[Ge]:Ge instanceof le||(Ge=pn(Ge)),Ge instanceof le&&!Ge.isDisposed()&&Ge.dispose()},A.getInstanceByDom=pn,A.getInstanceById=function(Ge){return Xt[Ge]},A.registerTheme=function(Ge,et){Qe[Ge]=et},A.registerPreprocessor=Un,A.registerProcessor=Pn,A.registerPostUpdate=function(Ge){yt.push(Ge)},A.registerAction=On,A.registerCoordinateSystem=function(Ge,et){b.register(Ge,et)},A.getCoordinateSystemDimensions=function(Ge){var et=b.get(Ge);if(et)return et.getDimensionsInfo?et.getDimensionsInfo():et.dimensions.slice()},A.registerLayout=function(Ge,et){Mt(st,Ge,et,1e3,"layout")},A.registerVisual=Ht,A.registerLoading=function(Ge,et){At[Ge]=et},A.extendComponentModel=function(Ge){return I.extend(Ge)},A.extendComponentView=function(Ge){return h.extend(Ge)},A.extendSeriesModel=function(Ge){return C.extend(Ge)},A.extendChartView=function(Ge){return c.extend(Ge)},A.setCanvasCreator=function(Ge){S.$override("createCanvas",Ge)},A.registerMap=function(Ge,et,vt){P.registerMap(Ge,et,vt)},A.getMap=function(Ge){var et=P.retrieveMap(Ge);return et&&et[0]&&{geoJson:et[0].geoJSON,specialAreas:et[0].specialAreas}},A.dataTool={};var Gt=u(20297);for(var Bt in Gt)Gt.hasOwnProperty(Bt)&&(A[Bt]=Gt[Bt])},20297:function(E,A,u){A.zrender=u(98709),A.matrix=u(79442),A.vector=u(76414);var o=u(23405);A.color=u(86049);var S=u(51747);A.number=u(54684),A.format=u(60653);var _=u(94127);_.throttle,A.throttle=_.throttle,A.helper=u(4415);var p=u(61167);A.parseGeoJSON=p,A.List=u(80023),A.Model=u(46082),A.Axis=u(7371),A.env=u(23584);var f={};o.each(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],function(d){f[d]=o[d]});var y={};o.each(["extendShape","extendPath","makePath","makeImage","mergePath","resizePath","createIcon","setHoverStyle","setLabelStyle","setTextStyle","setText","getFont","updateProps","initProps","getTransform","clipPointsByRect","clipRectByRect","Group","Image","Text","Circle","Sector","Ring","Polygon","Polyline","Rect","Line","BezierCurve","Arc","IncrementalDisplayable","CompoundPath","LinearGradient","RadialGradient","BoundingRect"],function(d){y[d]=S[d]}),A.parseGeoJson=p,A.util=f,A.graphic=y},4415:function(E,A,u){var o=u(23405),S=u(74107),_=u(51261),p=u(98477),f=u(46082),y=u(62751);y.getLayoutRect,A.getLayoutRect=y.getLayoutRect;var d=u(91968),v=d.enableDataStack,b=d.isDimensionStacked,s=d.getStackedDimension;A.completeDimensions=u(40256),A.createDimensions=u(61554),A.createSymbol=u(30696).createSymbol,A.createList=function(l){return S(l.getSource(),l)},A.dataStack={isDimensionStacked:b,enableDataStack:v,getStackedDimension:s},A.createScale=function(l,w){var I=w;f.isInstance(w)||(I=new f(w),o.mixin(I,p));var C=_.createScaleByModel(I);return C.setExtent(l[0],l[1]),_.niceScaleExtent(C,I),C},A.mixinAxisModelCommonMethods=function(l){o.mixin(l,p)}},12414:function(E){E.exports={toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}}},76918:function(E,A,u){var o=u(23405),S=u(54684).parsePercent,_=u(91968).isDimensionStacked,p=u(52227),f="__ec_stack_",y=typeof Float32Array<"u"?Float32Array:Array;function d(m){return m.get("stack")||f+m.seriesIndex}function v(m){return m.dim+m.index}function b(m,T){var D=[];return T.eachSeriesByType(m,function(O){C(O)&&!h(O)&&D.push(O)}),D}function s(m){var T=[];return o.each(m,function(D){var O=D.getData(),N=D.coordinateSystem.getBaseAxis(),z=N.getExtent(),H=N.type==="category"?N.getBandWidth():Math.abs(z[1]-z[0])/O.count(),$=S(D.get("barWidth"),H),V=S(D.get("barMaxWidth"),H),P=D.get("barGap"),U=D.get("barCategoryGap");T.push({bandWidth:H,barWidth:$,barMaxWidth:V,barGap:P,barCategoryGap:U,axisKey:v(N),stackId:d(D)})}),l(T)}function l(m){var T={};o.each(m,function(O,N){var z=O.axisKey,H=O.bandWidth,$=T[z]||{bandWidth:H,remainedWidth:H,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},V=$.stacks;T[z]=$;var P=O.stackId;!V[P]&&$.autoWidthCount++,V[P]=V[P]||{width:0,maxWidth:0};var U=O.barWidth;U&&!V[P].width&&(V[P].width=U,U=Math.min($.remainedWidth,U),$.remainedWidth-=U);var Y=O.barMaxWidth;Y&&(V[P].maxWidth=Y);var Z=O.barGap;Z!=null&&($.gap=Z);var X=O.barCategoryGap;X!=null&&($.categoryGap=X)});var D={};return o.each(T,function(O,N){D[N]={};var z,H=O.stacks,$=O.bandWidth,V=S(O.categoryGap,$),P=S(O.gap,1),U=O.remainedWidth,Y=O.autoWidthCount,Z=(U-V)/(Y+(Y-1)*P);Z=Math.max(Z,0),o.each(H,function(q,te){var re=q.maxWidth;re&&re<Z&&(re=Math.min(re,U),q.width&&(re=Math.min(re,q.width)),U-=re,q.width=re,Y--)}),Z=Math.max(Z=(U-V)/(Y+(Y-1)*P),0);var X=0;o.each(H,function(q,te){q.width||(q.width=Z),z=q,X+=q.width*(1+P)}),z&&(X-=z.width*P);var J=-X/2;o.each(H,function(q,te){D[N][te]=D[N][te]||{offset:J,width:q.width},J+=q.width*(1+P)})}),D}function w(m,T,D){if(m&&T){var O=m[v(T)];return O!=null&&D!=null&&(O=O[d(D)]),O}}var I={seriesType:"bar",plan:p(),reset:function(m){if(C(m)&&h(m)){var T=m.getData(),D=m.coordinateSystem,O=D.getBaseAxis(),N=D.getOtherAxis(O),z=T.mapDimension(N.dim),H=T.mapDimension(O.dim),$=N.isHorizontal(),V=+!$,P=w(s([m]),O,m).width;return P>.5||(P=.5),{progress:function(U,Y){for(var Z,X=new y(2*U.count),J=[],q=[],te=0;(Z=U.next())!=null;)q[V]=Y.get(z,Z),q[1-V]=Y.get(H,Z),J=D.dataToPoint(q,null,J),X[te++]=J[0],X[te++]=J[1];Y.setLayout({largePoints:X,barWidth:P,valueAxisStart:c(O,N),valueAxisHorizontal:$})}}}}};function C(m){return m.coordinateSystem&&m.coordinateSystem.type==="cartesian2d"}function h(m){return m.pipelineContext&&m.pipelineContext.large}function c(m,T,D){var O,N,z=T.getGlobalExtent();z[0]>z[1]?(O=z[1],N=z[0]):(O=z[0],N=z[1]);var H=T.toGlobalCoord(T.dataToCoord(0));return H<O&&(H=O),H>N&&(H=N),H}A.getLayoutOnAxis=function(m){var T=[],D=m.axis,O="axis0";if(D.type==="category"){for(var N=D.getBandWidth(),z=0;z<m.count;z++)T.push(o.defaults({bandWidth:N,axisKey:O,stackId:f+z},m));for(var H=l(T),$=[],z=0;z<m.count;z++){var V=H[O][f+z];V.offsetCenter=V.offset+V.width/2,$.push(V)}return $}},A.prepareLayoutBarSeries=b,A.makeColumnLayout=s,A.retrieveColumnLayout=w,A.layout=function(m,T){var D=b(m,T),O=s(D),N={};o.each(D,function(z){var H=z.getData(),$=z.coordinateSystem,V=$.getBaseAxis(),P=d(z),U=O[v(V)][P],Y=U.offset,Z=U.width,X=$.getOtherAxis(V),J=z.get("barMinHeight")||0;N[P]=N[P]||[],H.setLayout({offset:Y,size:Z});for(var q=H.mapDimension(X.dim),te=H.mapDimension(V.dim),re=_(H,q),ie=X.isHorizontal(),ne=c(V,X),le=0,fe=H.count();le<fe;le++){var we,pe,ve,be,Ee=H.get(q,le),Re=H.get(te,le);if(!isNaN(Ee)){var Ne=Ee>=0?"p":"n",Le=ne;if(re&&(N[P][Re]||(N[P][Re]={p:ne,n:ne}),Le=N[P][Re][Ne]),ie){var Se=$.dataToPoint([Ee,Re]);we=Le,pe=Se[1]+Y,ve=Se[0]-ne,be=Z,Math.abs(ve)<J&&(ve=(ve<0?-1:1)*J),re&&(N[P][Re][Ne]+=ve)}else{var Se=$.dataToPoint([Re,Ee]);we=Se[0]+Y,pe=Le,ve=Z,Math.abs(be=Se[1]-ne)<J&&(be=(be<=0?-1:1)*J),re&&(N[P][Re][Ne]+=be)}H.setItemLayout(le,{x:we,y:pe,width:ve,height:be})}}},this)},A.largeLayout=I},63764:function(E,A,u){var o=u(23405),S=u(54684).parsePercent,_=u(91968).isDimensionStacked;function p(f){return f.get("stack")||"__ec_stack_"+f.seriesIndex}E.exports=function(f,y,d){d.getWidth(),d.getHeight();var v,b,s,l={},w=(v=o.filter(y.getSeriesByType(f),function(I){return!y.isSeriesFiltered(I)&&I.coordinateSystem&&I.coordinateSystem.type==="polar"}),b={},o.each(v,function(I,C){var h=I.getData(),c=I.coordinateSystem.getBaseAxis(),m=c.getExtent(),T=c.type==="category"?c.getBandWidth():Math.abs(m[1]-m[0])/h.count(),D=b[c.dim]||{bandWidth:T,remainedWidth:T,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},O=D.stacks;b[c.dim]=D;var N=p(I);!O[N]&&D.autoWidthCount++,O[N]=O[N]||{width:0,maxWidth:0};var z=S(I.get("barWidth"),T),H=S(I.get("barMaxWidth"),T),$=I.get("barGap"),V=I.get("barCategoryGap");z&&!O[N].width&&(z=Math.min(D.remainedWidth,z),O[N].width=z,D.remainedWidth-=z),H&&(O[N].maxWidth=H),$!=null&&(D.gap=$),V!=null&&(D.categoryGap=V)}),s={},o.each(b,function(I,C){s[C]={};var h,c=I.stacks,m=I.bandWidth,T=S(I.categoryGap,m),D=S(I.gap,1),O=I.remainedWidth,N=I.autoWidthCount,z=(O-T)/(N+(N-1)*D);z=Math.max(z,0),o.each(c,function(V,P){var U=V.maxWidth;U&&U<z&&(U=Math.min(U,O),V.width&&(U=Math.min(U,V.width)),O-=U,V.width=U,N--)}),z=Math.max(z=(O-T)/(N+(N-1)*D),0);var H=0;o.each(c,function(V,P){V.width||(V.width=z),h=V,H+=V.width*(1+D)}),h&&(H-=h.width*D);var $=-H/2;o.each(c,function(V,P){s[C][P]=s[C][P]||{offset:$,width:V.width},$+=V.width*(1+D)})}),s);y.eachSeriesByType(f,function(I){if(I.coordinateSystem.type==="polar"){var C=I.getData(),h=I.coordinateSystem,c=h.getBaseAxis(),m=p(I),T=w[c.dim][m],D=T.offset,O=T.width,N=h.getOtherAxis(c),z=I.coordinateSystem.cx,H=I.coordinateSystem.cy,$=I.get("barMinHeight")||0,V=I.get("barMinAngle")||0;l[m]=l[m]||[];for(var P=C.mapDimension(N.dim),U=C.mapDimension(c.dim),Y=_(C,P),Z=N.getExtent()[0],X=0,J=C.count();X<J;X++){var q,te,re,ie,ne=C.get(P,X),le=C.get(U,X);if(!isNaN(ne)){var fe=ne>=0?"p":"n",we=Z;if(Y&&(l[m][le]||(l[m][le]={p:Z,n:Z}),we=l[m][le][fe]),N.dim==="radius"){var pe=N.dataToRadius(ne)-Z,ve=c.dataToAngle(le);Math.abs(pe)<$&&(pe=(pe<0?-1:1)*$),q=we,te=we+pe,ie=(re=ve-D)-O,Y&&(l[m][le][fe]=te)}else{var be=N.dataToAngle(ne,!0)-Z,Ee=c.dataToRadius(le);Math.abs(be)<V&&(be=(be<0?-1:1)*V),te=(q=Ee+D)+O,re=we,ie=we+be,Y&&(l[m][le][fe]=ie)}C.setItemLayout(X,{cx:z,cy:H,r0:q,r:te,startAngle:-re*Math.PI/180,endAngle:-ie*Math.PI/180})}}}},this)}},21188:function(E,A,u){var o=u(23405).map,S=u(52227),_=u(91968).isDimensionStacked;E.exports=function(p){return{seriesType:p,plan:S(),reset:function(f){var y=f.getData(),d=f.coordinateSystem,v=f.pipelineContext.large;if(d){var b=o(d.dimensions,function(w){return y.mapDimension(w)}).slice(0,2),s=b.length,l=y.getCalculationInfo("stackResultDimension");return _(y,b[0])&&(b[0]=l),_(y,b[1])&&(b[1]=l),s&&{progress:function(w,I){for(var C,h=w.end-w.start,c=v&&new Float32Array(h*s),m=w.start,T=0,D=[],O=[];m<w.end;m++){if(s===1){var N=I.get(b[0],m);C=!isNaN(N)&&d.dataToPoint(N,null,O)}else{var N=D[0]=I.get(b[0],m),z=D[1]=I.get(b[1],m);C=!isNaN(N)&&!isNaN(z)&&d.dataToPoint(D,null,O)}v?(c[T++]=C?C[0]:NaN,c[T++]=C?C[1]:NaN):I.setItemLayout(m,C&&C.slice()||[NaN,NaN])}v&&I.setLayout("symbolPoints",c)}}}}}}},30427:function(E,A,u){var o=u(23405),S=u(51747),_=Math.PI;E.exports=function(p,f){f=f||{},o.defaults(f,{text:"loading",color:"#c23531",textColor:"#000",maskColor:"rgba(255, 255, 255, 0.8)",zlevel:0});var y=new S.Rect({style:{fill:f.maskColor},zlevel:f.zlevel,z:1e4}),d=new S.Arc({shape:{startAngle:-_/2,endAngle:-_/2+.1,r:10},style:{stroke:f.color,lineCap:"round",lineWidth:5},zlevel:f.zlevel,z:10001}),v=new S.Rect({style:{fill:"none",text:f.text,textPosition:"right",textDistance:10,textFill:f.textColor},zlevel:f.zlevel,z:10001});d.animateShape(!0).when(1e3,{endAngle:3*_/2}).start("circularInOut"),d.animateShape(!0).when(1e3,{startAngle:3*_/2}).delay(300).start("circularInOut");var b=new S.Group;return b.add(d),b.add(v),b.add(y),b.resize=function(){var s=p.getWidth()/2,l=p.getHeight()/2;d.setShape({cx:s,cy:l});var w=d.shape.r;v.setShape({x:s-w,y:l-w,width:2*w,height:2*w}),y.setShape({x:0,y:0,width:p.getWidth(),height:p.getHeight()})},b.resize(),b}},28628:function(E,A,u){var o=u(23405),S=u(46082),_=u(91342),p=u(92161),f=p.enableClassManagement,y=p.parseClassType,d=u(51064).makeInner,v=u(62751),b=u(57638),s=d(),l=S.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(w,I,C,h){S.call(this,w,I,C,h),this.uid=_.getUID("ec_cpt_model")},init:function(w,I,C,h){this.mergeDefaultAndTheme(w,C)},mergeDefaultAndTheme:function(w,I){var C=this.layoutMode,h=C?v.getLayoutParams(w):{},c=I.getTheme();o.merge(w,c.get(this.mainType)),o.merge(w,this.getDefaultOption()),C&&v.mergeLayoutParam(w,h,C)},mergeOption:function(w,I){o.merge(this.option,w,!0);var C=this.layoutMode;C&&v.mergeLayoutParam(this.option,w,C)},optionUpdated:function(w,I){},getDefaultOption:function(){var w=s(this);if(!w.defaultOption){for(var I=[],C=this.constructor;C;){var h=C.prototype.defaultOption;h&&I.push(h),C=C.superClass}for(var c={},m=I.length-1;m>=0;m--)c=o.merge(c,I[m],!0);w.defaultOption=c}return w.defaultOption},getReferringComponents:function(w){return this.ecModel.queryComponents({mainType:w,index:this.get(w+"Index",!0),id:this.get(w+"Id",!0)})}});f(l,{registerWhenExtend:!0}),_.enableSubTypeDefaulter(l),_.enableTopologicalTravel(l,function(w){var I=[];return o.each(l.getClassesByMainType(w),function(C){I=I.concat(C.prototype.dependencies||[])}),I=o.map(I,function(C){return y(C).main}),w!=="dataset"&&0>=o.indexOf(I,"dataset")&&I.unshift("dataset"),I}),o.mixin(l,b),E.exports=l},47409:function(E,A,u){u(9129).__DEV__;var o=u(23405),S=o.each,_=o.filter,p=o.map,f=o.isArray,y=o.indexOf,d=o.isObject,v=o.isString,b=o.createHashMap,s=o.assert,l=o.clone,w=o.merge,I=o.extend,C=o.mixin,h=u(51064),c=u(46082),m=u(28628),T=u(31060),D=u(94738),O=u(52009).resetSourceDefaulter,N="\0_ec_inner",z=c.extend({init:function(P,U,Y,Z){Y=Y||{},this.option=null,this._theme=new c(Y),this._optionManager=Z},setOption:function(P,U){s(!(N in P),"please use chart.getOption()"),this._optionManager.setOption(P,U),this.resetOption(null)},resetOption:function(P){var U=!1,Y=this._optionManager;if(!P||P==="recreate"){var Z=Y.mountOption(P==="recreate");this.option&&P!=="recreate"?(this.restoreData(),this.mergeOption(Z)):H.call(this,Z),U=!0}if((P==="timeline"||P==="media")&&this.restoreData(),!P||P==="recreate"||P==="timeline"){var X=Y.getTimelineOption(this);X&&(this.mergeOption(X),U=!0)}if(!P||P==="recreate"||P==="media"){var J=Y.getMediaOption(this,this._api);J.length&&S(J,function(q){this.mergeOption(q,U=!0)},this)}return U},mergeOption:function(P){var U=this.option,Y=this._componentsMap,Z=[];O(this),S(P,function(X,J){X!=null&&(m.hasClass(J)?J&&Z.push(J):U[J]=U[J]==null?l(X):w(U[J],X,!0))}),m.topologicalTravel(Z,m.getAllClassMainTypes(),function(X,J){var q,te,re,ie=h.normalizeToArray(P[X]),ne=h.mappingToExists(Y.get(X),ie);h.makeIdAndName(ne),S(ne,function(fe,we){var pe,ve,be,Ee=fe.option;d(Ee)&&(fe.keyInfo.mainType=X,fe.keyInfo.subType=(pe=X,ve=Ee,be=fe.exist,ve.type?ve.type:be?be.subType:m.determineSubType(pe,ve)))});var le=(q=Y,f(te=J)||(te=te?[te]:[]),re={},S(te,function(fe){re[fe]=(q.get(fe)||[]).slice()}),re);U[X]=[],Y.set(X,[]),S(ne,function(fe,we){var pe=fe.exist,ve=fe.option;if(s(d(ve)||pe,"Empty component definition"),ve){var be=m.getClass(X,fe.keyInfo.subType,!0);if(pe&&pe instanceof be)pe.name=fe.keyInfo.name,pe.mergeOption(ve,this),pe.optionUpdated(ve,!1);else{var Ee=I({dependentModels:le,componentIndex:we},fe.keyInfo);I(pe=new be(ve,this,this,Ee),Ee),pe.init(ve,this,this,Ee),pe.optionUpdated(null,!0)}}else pe.mergeOption({},this),pe.optionUpdated({},!1);Y.get(X)[we]=pe,U[X][we]=pe.option},this),X==="series"&&$(this,Y.get("series"))},this),this._seriesIndicesMap=b(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var P=l(this.option);return S(P,function(U,Y){if(m.hasClass(Y)){for(var U=h.normalizeToArray(U),Z=U.length-1;Z>=0;Z--)h.isIdInner(U[Z])&&U.splice(Z,1);P[Y]=U}}),delete P[N],P},getTheme:function(){return this._theme},getComponent:function(P,U){var Y=this._componentsMap.get(P);if(Y)return Y[U||0]},queryComponents:function(P){var U,Y=P.mainType;if(!Y)return[];var Z=P.index,X=P.id,J=P.name,q=this._componentsMap.get(Y);if(!q||!q.length)return[];if(Z!=null)f(Z)||(Z=[Z]),U=_(p(Z,function(ie){return q[ie]}),function(ie){return!!ie});else if(X!=null){var te=f(X);U=_(q,function(ie){return te&&y(X,ie.id)>=0||!te&&ie.id===X})}else if(J!=null){var re=f(J);U=_(q,function(ie){return re&&y(J,ie.name)>=0||!re&&ie.name===J})}else U=q.slice();return V(U,P)},findComponents:function(P){var U,Y,Z,X,J,q=P.query,te=P.mainType,re=(U=q,Y=te+"Index",Z=te+"Id",X=te+"Name",U&&(U[Y]!=null||U[Z]!=null||U[X]!=null)?{mainType:te,index:U[Y],id:U[Z],name:U[X]}:null);return J=V(re?this.queryComponents(re):this._componentsMap.get(te),P),P.filter?_(J,P.filter):J},eachComponent:function(P,U,Y){var Z=this._componentsMap;typeof P=="function"?(Y=U,U=P,Z.each(function(X,J){S(X,function(q,te){U.call(Y,J,q,te)})})):v(P)?S(Z.get(P),U,Y):d(P)&&S(this.findComponents(P),U,Y)},getSeriesByName:function(P){return _(this._componentsMap.get("series"),function(U){return U.name===P})},getSeriesByIndex:function(P){return this._componentsMap.get("series")[P]},getSeriesByType:function(P){return _(this._componentsMap.get("series"),function(U){return U.subType===P})},getSeries:function(){return this._componentsMap.get("series").slice()},getSeriesCount:function(){return this._componentsMap.get("series").length},eachSeries:function(P,U){S(this._seriesIndices,function(Y){var Z=this._componentsMap.get("series")[Y];P.call(U,Z,Y)},this)},eachRawSeries:function(P,U){S(this._componentsMap.get("series"),P,U)},eachSeriesByType:function(P,U,Y){S(this._seriesIndices,function(Z){var X=this._componentsMap.get("series")[Z];X.subType===P&&U.call(Y,X,Z)},this)},eachRawSeriesByType:function(P,U,Y){return S(this.getSeriesByType(P),U,Y)},isSeriesFiltered:function(P){return this._seriesIndicesMap.get(P.componentIndex)==null},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(P,U){$(this,_(this._componentsMap.get("series"),P,U))},restoreData:function(P){var U=this._componentsMap;$(this,U.get("series"));var Y=[];U.each(function(Z,X){Y.push(X)}),m.topologicalTravel(Y,m.getAllClassMainTypes(),function(Z,X){S(U.get(Z),function(J){Z==="series"&&function(q,te){if(te){var re=te.seiresIndex,ie=te.seriesId,ne=te.seriesName;return re!=null&&q.componentIndex!==re||ie!=null&&q.id!==ie||ne!=null&&q.name!==ne}}(J,P)||J.restoreData()})})}});function H(P){var U,Y;this.option={},this.option[N]=1,this._componentsMap=b({series:[]}),this._seriesIndices,this._seriesIndicesMap,U=this._theme.option,Y=P.color&&!P.colorLayer,S(U,function(Z,X){(X!=="colorLayer"||!Y)&&(m.hasClass(X)||(typeof Z=="object"?P[X]=P[X]?w(P[X],Z,!1):l(Z):P[X]==null&&(P[X]=Z)))}),w(P,T,!1),this.mergeOption(P)}function $(P,U){P._seriesIndicesMap=b(P._seriesIndices=p(U,function(Y){return Y.componentIndex})||[])}function V(P,U){return U.hasOwnProperty("subType")?_(P,function(Y){return Y.subType===U.subType}):P}C(z,D),E.exports=z},46082:function(E,A,u){var o=u(23405),S=u(23584),_=u(51064).makeInner,p=u(92161),f=p.enableClassExtend,y=p.enableClassCheck,d=u(77466),v=u(31169),b=u(25332),s=u(42065),l=o.mixin,w=_();function I(c,m,T){this.parentModel=m,this.ecModel=T,this.option=c}function C(c,m,T){for(var D=0;D<m.length&&(!m[D]||(c=c&&typeof c=="object"?c[m[D]]:null)!=null);D++);return c==null&&T&&(c=T.get(m)),c}function h(c,m){var T=w(c).getParent;return T?T.call(c,m):c.parentModel}I.prototype={constructor:I,init:null,mergeOption:function(c){o.merge(this.option,c,!0)},get:function(c,m){return c==null?this.option:C(this.option,this.parsePath(c),!m&&h(this,c))},getShallow:function(c,m){var T=this.option,D=T==null?T:T[c],O=!m&&h(this,c);return D==null&&O&&(D=O.getShallow(c)),D},getModel:function(c,m){var T;return new I(c==null?this.option:C(this.option,c=this.parsePath(c)),m=m||(T=h(this,c))&&T.getModel(c),this.ecModel)},isEmpty:function(){return this.option==null},restoreData:function(){},clone:function(){return new this.constructor(o.clone(this.option))},setReadOnly:function(c){},parsePath:function(c){return typeof c=="string"&&(c=c.split(".")),c},customizeGetParent:function(c){w(this).getParent=c},isAnimationEnabled:function(){if(!S.node){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}},f(I),y(I),l(I,d),l(I,v),l(I,b),l(I,s),E.exports=I},22216:function(E,A,u){var o=u(23405),S=u(51064),_=u(28628),p=o.each,f=o.clone,y=o.map,d=o.merge,v=/^(min|max)?(.+)$/;function b(l){this._api=l,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function s(l,w,I){var C,h,c=[],m=[],T=l.timeline;return l.baseOption&&(h=l.baseOption),(T||l.options)&&(h=h||{},c=(l.options||[]).slice()),l.media&&(h=h||{},p(l.media,function(D){D&&D.option&&(D.query?m.push(D):C||(C=D))})),h||(h=l),h.timeline||(h.timeline=T),p([h].concat(c).concat(o.map(m,function(D){return D.option})),function(D){p(w,function(O){O(D,I)})}),{baseOption:h,timelineOptions:c,mediaDefault:C,mediaList:m}}b.prototype={constructor:b,setOption:function(l,w){l&&o.each(S.normalizeToArray(l.series),function(c){c&&c.data&&o.isTypedArray(c.data)&&o.setAsPrimitive(c.data)}),l=f(l,!0);var I,C=this._optionBackup,h=s.call(this,l,w,!C);this._newBaseOption=h.baseOption,C?(I=C.baseOption,p(h.baseOption||{},function(c,m){if(c!=null){var T=I[m];if(_.hasClass(m)){c=S.normalizeToArray(c),T=S.normalizeToArray(T);var D=S.mappingToExists(T,c);I[m]=y(D,function(O){return O.option&&O.exist?d(O.exist,O.option,!0):O.exist||O.option})}else I[m]=d(T,c,!0)}}),h.timelineOptions.length&&(C.timelineOptions=h.timelineOptions),h.mediaList.length&&(C.mediaList=h.mediaList),h.mediaDefault&&(C.mediaDefault=h.mediaDefault)):this._optionBackup=h},mountOption:function(l){var w=this._optionBackup;return this._timelineOptions=y(w.timelineOptions,f),this._mediaList=y(w.mediaList,f),this._mediaDefault=f(w.mediaDefault),this._currentMediaIndices=[],f(l?w.baseOption:this._newBaseOption)},getTimelineOption:function(l){var w,I=this._timelineOptions;if(I.length){var C=l.getComponent("timeline");C&&(w=f(I[C.getCurrentIndex()],!0))}return w},getMediaOption:function(l){var w,I,C=this._api.getWidth(),h=this._api.getHeight(),c=this._mediaList,m=this._mediaDefault,T=[],D=[];if(!c.length&&!m)return D;for(var O=0,N=c.length;O<N;O++)(function(z,H,$){var V={width:H,height:$,aspectratio:H/$},P=!0;return o.each(z,function(U,Y){var Z=Y.match(v);if(Z&&Z[1]&&Z[2]){var X,J,q,te=Z[1];X=V[Z[2].toLowerCase()],J=U,((q=te)==="min"?X>=J:q==="max"?X<=J:X===J)||(P=!1)}}),P})(c[O].query,C,h)&&T.push(O);return!T.length&&m&&(T=[-1]),T.length&&(w=T,I=this._currentMediaIndices,w.join(",")!==I.join(","))&&(D=y(T,function(z){return f(z===-1?m.option:c[z].option)})),this._currentMediaIndices=T,D}},E.exports=b},95166:function(E,A,u){u(9129).__DEV__;var o=u(23405),S=u(23584),_=u(60653),p=_.formatTime,f=_.encodeHTML,y=_.addCommas,d=_.getTooltipMarker,v=u(51064),b=u(28628),s=u(94738),l=u(62369),w=u(62751),I=w.getLayoutParams,C=w.mergeLayoutParam,h=u(53833).createTask,c=u(52009),m=c.prepareSource,T=c.getSource,D=u(45435).retrieveRawValue,O=v.makeInner(),N=b.extend({type:"series.__base__",seriesIndex:0,coordinateSystem:null,defaultOption:null,legendDataProvider:null,visualColorAccessPath:"itemStyle.color",layoutMode:null,init:function(Z,X,J,q){this.seriesIndex=this.componentIndex,this.dataTask=h({count:H,reset:$}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(Z,J),m(this);var te=this.getInitialData(Z,J);P(te,this),this.dataTask.context.data=te,O(this).dataBeforeProcessed=te,z(this)},mergeDefaultAndTheme:function(Z,X){var J=this.layoutMode,q=J?I(Z):{},te=this.subType;b.hasClass(te)&&(te+="Series"),o.merge(Z,X.getTheme().get(this.subType)),o.merge(Z,this.getDefaultOption()),v.defaultEmphasis(Z,"label",["show"]),this.fillDataTextStyle(Z.data),J&&C(Z,q,J)},mergeOption:function(Z,X){Z=o.merge(this.option,Z,!0),this.fillDataTextStyle(Z.data);var J=this.layoutMode;J&&C(this.option,Z,J),m(this);var q=this.getInitialData(Z,X);P(q,this),this.dataTask.dirty(),this.dataTask.context.data=q,O(this).dataBeforeProcessed=q,z(this)},fillDataTextStyle:function(Z){if(Z&&!o.isTypedArray(Z))for(var X=["show"],J=0;J<Z.length;J++)Z[J]&&Z[J].label&&v.defaultEmphasis(Z[J],"label",X)},getInitialData:function(){},appendData:function(Z){this.getRawData().appendData(Z.data)},getData:function(Z){var X=Y(this);if(!X)return O(this).data;var J=X.context.data;return Z==null?J:J.getLinkedData(Z)},setData:function(Z){var X=Y(this);if(X){var J=X.context;J.data!==Z&&X.modifyOutputEnd&&X.setOutputEnd(Z.count()),J.outputData=Z,X!==this.dataTask&&(J.data=Z)}O(this).data=Z},getSource:function(){return T(this)},getRawData:function(){return O(this).dataBeforeProcessed},getBaseAxis:function(){var Z=this.coordinateSystem;return Z&&Z.getBaseAxis&&Z.getBaseAxis()},formatTooltip:function(Z,X,J,q){var te,re=this,ie=(q=q||"html")==="html"?"<br/>":`
`,ne=q==="richText",le={},fe=0,we=this.getData(),pe=we.mapDimension("defaultedTooltip",!0),ve=pe.length,be=this.getRawValue(Z),Ee=o.isArray(be),Re=we.getItemVisual(Z,"color");o.isObject(Re)&&Re.colorStops&&(Re=(Re.colorStops[0]||{}).color),Re=Re||"transparent";var Ne=(ve>1||Ee&&!ve?function(ue){var ke=o.reduce(ue,function(rt,mt,yt){var st=we.getDimensionInfo(yt);return rt|(st&&st.tooltip!==!1&&st.displayName!=null)},0),Pe=[];function Ve(rt,mt){var yt=we.getDimensionInfo(mt);if(yt&&yt.otherDims.tooltip!==!1){var st=yt.type,Qe="sub"+re.seriesIndex+"at"+fe,At=d({color:Re,type:"subItem",renderMode:q,markerId:Qe}),Xt=typeof At=="string"?At:At.content,cn=(ke?Xt+f(yt.displayName||"-")+": ":"")+f(st==="ordinal"?rt+"":st==="time"?X?"":p("yyyy/MM/dd hh:mm:ss",rt):y(rt));cn&&Pe.push(cn),ne&&(le[Qe]=Re,++fe)}}pe.length?o.each(pe,function(rt){Ve(D(we,Z,rt),rt)}):o.each(ue,Ve);var je=ke?ne?`
`:"<br/>":"",it=je+Pe.join(je||", ");return{renderMode:q,content:it,style:le}}(be):(te=ve?D(we,Z,pe[0]):Ee?be[0]:be,{content:f(y(te))})).content,Le=re.seriesIndex+"at"+fe,Se=d({color:Re,type:"item",renderMode:q,markerId:Le});le[Le]=Re,++fe;var Ie=we.getName(Z),_e=this.name;v.isNameSpecified(this)||(_e=""),_e=_e?f(_e)+(X?": ":ie):"";var Ae=typeof Se=="string"?Se:Se.content;return{html:X?Ae+_e+Ne:_e+Ae+(Ie?f(Ie)+": "+Ne:Ne),markers:le}},isAnimationEnabled:function(){if(S.node)return!1;var Z=this.getShallow("animation");return Z&&this.getData().count()>this.getShallow("animationThreshold")&&(Z=!1),Z},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(Z,X,J){var q=this.ecModel,te=s.getColorFromPalette.call(this,Z,X,J);return te||(te=q.getColorFromPalette(Z,X,J)),te},coordDimToDataDim:function(Z){return this.getRawData().mapDimension(Z,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});function z(Z){var X,J,q,te=Z.name;v.isNameSpecified(Z)||(Z.name=(J=(X=Z.getRawData()).mapDimension("seriesName",!0),q=[],o.each(J,function(re){var ie=X.getDimensionInfo(re);ie.displayName&&q.push(ie.displayName)}),q.join(" ")||te))}function H(Z){return Z.model.getRawData().count()}function $(Z){var X=Z.model;return X.setData(X.getRawData().cloneShallow()),V}function V(Z,X){Z.end>X.outputData.count()&&X.model.getRawData().cloneShallow(X.outputData)}function P(Z,X){o.each(Z.CHANGABLE_METHODS,function(J){Z.wrapMethod(J,o.curry(U,X))})}function U(Z){var X=Y(Z);X&&X.setOutputEnd(this.count())}function Y(Z){var X=(Z.ecModel||{}).scheduler,J=X&&X.getPipeline(Z.uid);if(J){var q=J.currentTask;if(q){var te=q.agentStubMap;te&&(q=te.get(Z.uid))}return q}}o.mixin(N,l),o.mixin(N,s),E.exports=N},31060:function(E){var A="";typeof navigator<"u"&&(A=navigator.platform||""),E.exports={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:A.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,animation:"auto",animationDuration:1e3,animationDurationUpdate:300,animationEasing:"exponentialOut",animationEasingUpdate:"cubicOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1}},31169:function(E,A,u){var o=u(74106)([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]);E.exports={getAreaStyle:function(S,_){return o(this,S,_)}}},57638:function(E){E.exports={getBoxLayoutParams:function(){return{left:this.get("left"),top:this.get("top"),right:this.get("right"),bottom:this.get("bottom"),width:this.get("width"),height:this.get("height")}}}},94738:function(E,A,u){var o=u(51064),S=o.makeInner,_=o.normalizeToArray,p=S();E.exports={clearColorPalette:function(){p(this).colorIdx=0,p(this).colorNameMap={}},getColorFromPalette:function(f,y,d){var v=p(y=y||this),b=v.colorIdx||0,s=v.colorNameMap=v.colorNameMap||{};if(s.hasOwnProperty(f))return s[f];var l=_(this.get("color",!0)),w=this.get("colorLayer",!0),I=d!=null&&w?function(h,c){for(var m=h.length,T=0;T<m;T++)if(h[T].length>c)return h[T];return h[m-1]}(w,d):l;if((I=I||l)&&I.length){var C=I[b];return f&&(s[f]=C),v.colorIdx=(b+1)%I.length,C}}}},62369:function(E,A,u){var o=u(45435).retrieveRawValue,S=u(60653),_=S.getTooltipMarker,p=S.formatTpl,f=u(51064).getTooltipRenderMode,y=/\{@(.+?)\}/g;E.exports={getDataParams:function(d,v){var b=this.getData(v),s=this.getRawValue(d,v),l=b.getRawIndex(d),w=b.getName(d),I=b.getRawDataItem(d),C=b.getItemVisual(d,"color"),h=this.ecModel.getComponent("tooltip"),c=f(h&&h.get("renderMode")),m=this.mainType,T=m==="series";return{componentType:m,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:T?this.subType:null,seriesIndex:this.seriesIndex,seriesId:T?this.id:null,seriesName:T?this.name:null,name:w,dataIndex:l,data:I,dataType:v,value:s,color:C,marker:_({color:C,renderMode:c}),$vars:["seriesName","name","value"]}},getFormattedLabel:function(d,v,b,s,l){v=v||"normal";var w=this.getData(b),I=w.getItemModel(d),C=this.getDataParams(d,b);s!=null&&C.value instanceof Array&&(C.value=C.value[s]);var h=I.get(v==="normal"?[l||"label","formatter"]:[v,l||"label","formatter"]);return typeof h=="function"?(C.status=v,h(C)):typeof h=="string"?p(h,C).replace(y,function(c,m){var T=m.length;return m.charAt(0)==="["&&m.charAt(T-1)==="]"&&(m=+m.slice(1,T-1)),o(w,d,m)}):void 0},getRawValue:function(d,v){return o(this.getData(v),d)},formatTooltip:function(){}}},42065:function(E,A,u){var o=u(74106)([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]);E.exports={getItemStyle:function(S,_){var p=o(this,S,_),f=this.getBorderLineDash();return f&&(p.lineDash=f),p},getBorderLineDash:function(){var S=this.get("borderType");return S==="solid"||S==null?null:S==="dashed"?[5,5]:[1,1]}}},77466:function(E,A,u){var o=u(74106)([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]);E.exports={getLineStyle:function(S){var _=o(this,S),p=this.getLineDash(_.lineWidth);return p&&(_.lineDash=p),_},getLineDash:function(S){S==null&&(S=1);var _=this.get("type"),p=Math.max(S,2),f=4*S;return _==="solid"||_==null?null:_==="dashed"?[f,f]:[p,p]}}},74106:function(E,A,u){var o=u(23405);E.exports=function(S){for(var _=0;_<S.length;_++)S[_][1]||(S[_][1]=S[_][0]);return function(p,f,y){for(var d={},v=0;v<S.length;v++){var b=S[v][1];if(!(f&&o.indexOf(f,b)>=0||y&&0>o.indexOf(y,b))){var s=p.getShallow(b);s!=null&&(d[S[v][0]]=s)}}return d}}},25332:function(E,A,u){var o=u(24570),S=u(51747),_=["textStyle","color"];E.exports={getTextColor:function(p){var f=this.ecModel;return this.getShallow("color")||(!p&&f?f.get(_):null)},getFont:function(){return S.getFont({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(p){return o.getBoundingRect(p,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("lineHeight"),this.getShallow("rich"),this.getShallow("truncateText"))}}},83813:function(E,A,u){u(9129).__DEV__;var o=u(23405),S=o.createHashMap;o.retrieve;var _=o.each,p={cartesian2d:function(y,d,v,b){var s=y.getReferringComponents("xAxis")[0],l=y.getReferringComponents("yAxis")[0];d.coordSysDims=["x","y"],v.set("x",s),v.set("y",l),f(s)&&(b.set("x",s),d.firstCategoryDimIndex=0),f(l)&&(b.set("y",l),d.firstCategoryDimIndex=1)},singleAxis:function(y,d,v,b){var s=y.getReferringComponents("singleAxis")[0];d.coordSysDims=["single"],v.set("single",s),f(s)&&(b.set("single",s),d.firstCategoryDimIndex=0)},polar:function(y,d,v,b){var s=y.getReferringComponents("polar")[0],l=s.findAxisModel("radiusAxis"),w=s.findAxisModel("angleAxis");d.coordSysDims=["radius","angle"],v.set("radius",l),v.set("angle",w),f(l)&&(b.set("radius",l),d.firstCategoryDimIndex=0),f(w)&&(b.set("angle",w),d.firstCategoryDimIndex=1)},geo:function(y,d,v,b){d.coordSysDims=["lng","lat"]},parallel:function(y,d,v,b){var s=y.ecModel,l=s.getComponent("parallel",y.get("parallelIndex")),w=d.coordSysDims=l.dimensions.slice();_(l.parallelAxisIndex,function(I,C){var h=s.getComponent("parallelAxis",I),c=w[C];v.set(c,h),f(h)&&d.firstCategoryDimIndex==null&&(b.set(c,h),d.firstCategoryDimIndex=C)})}};function f(y){return y.get("type")==="category"}A.getCoordSysDefineBySeries=function(y){var d=y.get("coordinateSystem"),v={coordSysName:d,coordSysDims:[],axisMap:S(),categoryAxisMap:S()},b=p[d];if(b)return b(y,v,v.axisMap,v.categoryAxisMap),v}},8381:function(E,A,u){var o=u(23405),S=o.each,_=o.isArray,p=o.isObject,f=u(469),y=u(51064).normalizeToArray;function d(s){S(v,function(l){l[0]in s&&!(l[1]in s)&&(s[l[1]]=s[l[0]])})}var v=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],b=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"];E.exports=function(s,l){f(s,l),s.series=y(s.series),S(s.series,function(w){if(p(w)){var I=w.type;if((I==="pie"||I==="gauge")&&w.clockWise!=null&&(w.clockwise=w.clockWise),I==="gauge"){var C=function(h,c){c=c.split(",");for(var m=h,T=0;T<c.length&&(m=m&&m[c[T]])!=null;T++);return m}(w,"pointer.color");C!=null&&function(h,c,m,T){c=c.split(",");for(var D,O=h,N=0;N<c.length-1;N++)O[D=c[N]]==null&&(O[D]={}),O=O[D];O[c[N]]==null&&(O[c[N]]=m)}(w,"itemStyle.normal.color",C)}d(w)}}),s.dataRange&&(s.visualMap=s.dataRange),S(b,function(w){var I=s[w];I&&(_(I)||(I=[I]),S(I,function(C){d(C)}))})}},469:function(E,A,u){var o=u(23405),S=u(51064),_=o.each,p=o.isObject,f=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function y(I){var C=I&&I.itemStyle;if(C)for(var h=0,c=f.length;h<c;h++){var m=f[h],T=C.normal,D=C.emphasis;T&&T[m]&&(I[m]=I[m]||{},I[m].normal?o.merge(I[m].normal,T[m]):I[m].normal=T[m],T[m]=null),D&&D[m]&&(I[m]=I[m]||{},I[m].emphasis?o.merge(I[m].emphasis,D[m]):I[m].emphasis=D[m],D[m]=null)}}function d(I,C,h){if(I&&I[C]&&(I[C].normal||I[C].emphasis)){var c=I[C].normal,m=I[C].emphasis;c&&(h?(I[C].normal=I[C].emphasis=null,o.defaults(I[C],c)):I[C]=c),m&&(I.emphasis=I.emphasis||{},I.emphasis[C]=m)}}function v(I){d(I,"itemStyle"),d(I,"lineStyle"),d(I,"areaStyle"),d(I,"label"),d(I,"labelLine"),d(I,"upperLabel"),d(I,"edgeLabel")}function b(I,C){var h=p(I)&&I[C],c=p(h)&&h.textStyle;if(c)for(var m=0,T=S.TEXT_STYLE_OPTIONS.length;m<T;m++){var C=S.TEXT_STYLE_OPTIONS[m];c.hasOwnProperty(C)&&(h[C]=c[C])}}function s(I){I&&(v(I),b(I,"label"),I.emphasis&&b(I.emphasis,"label"))}function l(I){return o.isArray(I)?I:I?[I]:[]}function w(I){return(o.isArray(I)?I[0]:I)||{}}E.exports=function(I,C){_(l(I.series),function(c){p(c)&&function(m){if(p(m)){y(m),v(m),b(m,"label"),b(m,"upperLabel"),b(m,"edgeLabel"),m.emphasis&&(b(m.emphasis,"label"),b(m.emphasis,"upperLabel"),b(m.emphasis,"edgeLabel"));var z=m.markPoint;z&&(y(z),s(z));var $=m.markLine;$&&(y($),s($));var T=m.markArea;T&&s(T);var D=m.data;if(m.type==="graph"){D=D||m.nodes;var O=m.links||m.edges;if(O&&!o.isTypedArray(O))for(var N=0;N<O.length;N++)s(O[N]);o.each(m.categories,function(P){v(P)})}if(D&&!o.isTypedArray(D))for(var N=0;N<D.length;N++)s(D[N]);var z=m.markPoint;if(z&&z.data)for(var H=z.data,N=0;N<H.length;N++)s(H[N]);var $=m.markLine;if($&&$.data)for(var V=$.data,N=0;N<V.length;N++)o.isArray(V[N])?(s(V[N][0]),s(V[N][1])):s(V[N]);m.type==="gauge"?(b(m,"axisLabel"),b(m,"title"),b(m,"detail")):m.type==="treemap"?(d(m.breadcrumb,"itemStyle"),o.each(m.levels,function(P){v(P)})):m.type==="tree"&&v(m.leaves)}}(c)});var h=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];C&&h.push("valueAxis","categoryAxis","logAxis","timeAxis"),_(h,function(c){_(l(I[c]),function(m){m&&(b(m,"axisLabel"),b(m.axisPointer,"label"))})}),_(l(I.parallel),function(c){var m=c&&c.parallelAxisDefault;b(m,"axisLabel"),b(m&&m.axisPointer,"label")}),_(l(I.calendar),function(c){d(c,"itemStyle"),b(c,"dayLabel"),b(c,"monthLabel"),b(c,"yearLabel")}),_(l(I.radar),function(c){b(c,"name")}),_(l(I.geo),function(c){p(c)&&(s(c),_(l(c.regions),function(m){s(m)}))}),_(l(I.timeline),function(c){s(c),d(c,"label"),d(c,"itemStyle"),d(c,"controlStyle",!0);var m=c.data;o.isArray(m)&&o.each(m,function(T){o.isObject(T)&&(d(T,"label"),d(T,"itemStyle"))})}),_(l(I.toolbox),function(c){d(c,"iconStyle"),_(c.feature,function(m){d(m,"iconStyle")})}),b(w(I.axisPointer),"label"),b(w(I.tooltip).axisPointer,"label")}},74278:function(E){E.exports=function(A){return{seriesType:A,reset:function(u,o){var S=o.findComponents({mainType:"legend"});if(S&&S.length){var _=u.getData();_.filterSelf(function(p){for(var f=_.getName(p),y=0;y<S.length;y++)if(!S[y].isSelected(f))return!1;return!0})}}}}},29772:function(E){var A={average:function(o){for(var S=0,_=0,p=0;p<o.length;p++)!isNaN(o[p])&&(S+=o[p],_++);return _===0?NaN:S/_},sum:function(o){for(var S=0,_=0;_<o.length;_++)S+=o[_]||0;return S},max:function(o){for(var S=-1/0,_=0;_<o.length;_++)o[_]>S&&(S=o[_]);return isFinite(S)?S:NaN},min:function(o){for(var S=1/0,_=0;_<o.length;_++)o[_]<S&&(S=o[_]);return isFinite(S)?S:NaN},nearest:function(o){return o[0]}},u=function(o,S){return Math.round(o.length/2)};E.exports=function(o){return{seriesType:o,modifyOutputEnd:!0,reset:function(S,_,p){var f=S.getData(),y=S.get("sampling"),d=S.coordinateSystem;if(d.type==="cartesian2d"&&y){var v,b=d.getBaseAxis(),s=d.getOtherAxis(b),l=b.getExtent(),w=l[1]-l[0],I=Math.round(f.count()/w);I>1&&(typeof y=="string"?v=A[y]:typeof y=="function"&&(v=y),v&&S.setData(f.downSample(f.mapDimension(s.dim),1/I,v,u)))}}}}},93689:function(E,A,u){var o=u(23405),S=o.createHashMap,_=o.each;function p(f){_(f,function(y,d){var v=[],b=[NaN,NaN],s=[y.stackResultDimension,y.stackedOverDimension],l=y.data,w=y.isStackedByIndex,I=l.map(s,function(C,h,c){var m,T,D=l.get(y.stackedDimension,c);if(isNaN(D))return b;w?T=l.getRawIndex(c):m=l.get(y.stackedByDimension,c);for(var O=NaN,N=d-1;N>=0;N--){var z=f[N];if(w||(T=z.data.rawIndexOf(z.stackedByDimension,m)),T>=0){var H=z.data.getByRawIndex(z.stackResultDimension,T);if(D>=0&&H>0||D<=0&&H<0){D+=H,O=H;break}}}return v[0]=D,v[1]=O,v});l.hostModel.setData(I),y.data=I})}E.exports=function(f){var y=S();f.eachSeries(function(d){var v=d.get("stack");if(v){var b=y.get(v)||y.set(v,[]),s=d.getData(),l={stackResultDimension:s.getCalculationInfo("stackResultDimension"),stackedOverDimension:s.getCalculationInfo("stackedOverDimension"),stackedDimension:s.getCalculationInfo("stackedDimension"),stackedByDimension:s.getCalculationInfo("stackedByDimension"),isStackedByIndex:s.getCalculationInfo("isStackedByIndex"),data:s,seriesModel:d};if(!l.stackedDimension||!(l.isStackedByIndex||l.stackedByDimension))return;b.length&&s.setCalculationInfo("stackedOnSeries",b[b.length-1].seriesModel),b.push(l)}}),y.each(p)}},86855:function(E,A,u){var o=u(54684),S=u(60653),_=u(49065),p=u(82215),f=o.round,y=_.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(d,v){var b=this._extent;isNaN(d)||(b[0]=parseFloat(d)),isNaN(v)||(b[1]=parseFloat(v))},unionExtent:function(d){var v=this._extent;d[0]<v[0]&&(v[0]=d[0]),d[1]>v[1]&&(v[1]=d[1]),y.prototype.setExtent.call(this,v[0],v[1])},getInterval:function(){return this._interval},setInterval:function(d){this._interval=d,this._niceExtent=this._extent.slice(),this._intervalPrecision=p.getIntervalPrecision(d)},getTicks:function(){return p.intervalScaleGetTicks(this._interval,this._extent,this._niceExtent,this._intervalPrecision)},getLabel:function(d,v){if(d==null)return"";var b=v&&v.precision;return b==null?b=o.getPrecisionSafe(d)||0:b==="auto"&&(b=this._intervalPrecision),d=f(d,b,!0),S.addCommas(d)},niceTicks:function(d,v,b){d=d||5;var s=this._extent,l=s[1]-s[0];if(isFinite(l)){l<0&&(l=-l,s.reverse());var w=p.intervalScaleNiceTicks(s,d,v,b);this._intervalPrecision=w.intervalPrecision,this._interval=w.interval,this._niceExtent=w.niceTickExtent}},niceExtent:function(d){var v=this._extent;if(v[0]===v[1])if(v[0]!==0){var b=v[0];d.fixMax||(v[1]+=b/2),v[0]-=b/2}else v[1]=1;isFinite(v[1]-v[0])||(v[0]=0,v[1]=1),this.niceTicks(d.splitNumber,d.minInterval,d.maxInterval);var s=this._interval;d.fixMin||(v[0]=f(Math.floor(v[0]/s)*s)),d.fixMax||(v[1]=f(Math.ceil(v[1]/s)*s))}});y.create=function(){return new y},E.exports=y},28010:function(E,A,u){var o=u(23405),S=u(49065),_=u(54684),p=u(86855),f=S.prototype,y=p.prototype,d=_.getPrecisionSafe,v=_.round,b=Math.floor,s=Math.ceil,l=Math.pow,w=Math.log,I=S.extend({type:"log",base:10,$constructor:function(){S.apply(this,arguments),this._originalScale=new p},getTicks:function(){var C=this._originalScale,h=this._extent,c=C.getExtent();return o.map(y.getTicks.call(this),function(m){var T=_.round(l(this.base,m));return T=m===h[0]&&C.__fixMin?v(T,d(c[0])):T,T=m===h[1]&&C.__fixMax?v(T,d(c[1])):T},this)},getLabel:y.getLabel,scale:function(C){return C=f.scale.call(this,C),l(this.base,C)},setExtent:function(C,h){var c=this.base;C=w(C)/w(c),h=w(h)/w(c),y.setExtent.call(this,C,h)},getExtent:function(){var C,h,c=this.base,m=f.getExtent.call(this);m[0]=l(c,m[0]),m[1]=l(c,m[1]);var T=this._originalScale,D=T.getExtent();return T.__fixMin&&(m[0]=(C=m[0],v(C,d(D[0])))),T.__fixMax&&(m[1]=(h=m[1],v(h,d(D[1])))),m},unionExtent:function(C){this._originalScale.unionExtent(C);var h=this.base;C[0]=w(C[0])/w(h),C[1]=w(C[1])/w(h),f.unionExtent.call(this,C)},unionExtentFromData:function(C,h){this.unionExtent(C.getApproximateExtent(h))},niceTicks:function(C){C=C||10;var h=this._extent,c=h[1]-h[0];if(c!==1/0&&!(c<=0)){var m=_.quantity(c);for(C/c*m<=.5&&(m*=10);!isNaN(m)&&1>Math.abs(m)&&Math.abs(m)>0;)m*=10;var T=[_.round(s(h[0]/m)*m),_.round(b(h[1]/m)*m)];this._interval=m,this._niceExtent=T}},niceExtent:function(C){y.niceExtent.call(this,C);var h=this._originalScale;h.__fixMin=C.fixMin,h.__fixMax=C.fixMax}});o.each(["contain","normalize"],function(C){I.prototype[C]=function(h){return h=w(h)/w(this.base),f[C].call(this,h)}}),I.create=function(){return new I},E.exports=I},20741:function(E,A,u){var o=u(23405),S=u(49065),_=u(85508),p=S.prototype,f=S.extend({type:"ordinal",init:function(y,d){(!y||o.isArray(y))&&(y=new _({categories:y})),this._ordinalMeta=y,this._extent=d||[0,y.categories.length-1]},parse:function(y){return typeof y=="string"?this._ordinalMeta.getOrdinal(y):Math.round(y)},contain:function(y){return y=this.parse(y),p.contain.call(this,y)&&this._ordinalMeta.categories[y]!=null},normalize:function(y){return p.normalize.call(this,this.parse(y))},scale:function(y){return Math.round(p.scale.call(this,y))},getTicks:function(){for(var y=[],d=this._extent,v=d[0];v<=d[1];)y.push(v),v++;return y},getLabel:function(y){if(!this.isBlank())return this._ordinalMeta.categories[y]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(y,d){this.unionExtent(y.getApproximateExtent(d))},getOrdinalMeta:function(){return this._ordinalMeta},niceTicks:o.noop,niceExtent:o.noop});f.create=function(){return new f},E.exports=f},49065:function(E,A,u){var o=u(92161);function S(_){this._setting=_||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}S.prototype.parse=function(_){return _},S.prototype.getSetting=function(_){return this._setting[_]},S.prototype.contain=function(_){var p=this._extent;return _>=p[0]&&_<=p[1]},S.prototype.normalize=function(_){var p=this._extent;return p[1]===p[0]?.5:(_-p[0])/(p[1]-p[0])},S.prototype.scale=function(_){var p=this._extent;return _*(p[1]-p[0])+p[0]},S.prototype.unionExtent=function(_){var p=this._extent;_[0]<p[0]&&(p[0]=_[0]),_[1]>p[1]&&(p[1]=_[1])},S.prototype.unionExtentFromData=function(_,p){this.unionExtent(_.getApproximateExtent(p))},S.prototype.getExtent=function(){return this._extent.slice()},S.prototype.setExtent=function(_,p){var f=this._extent;isNaN(_)||(f[0]=_),isNaN(p)||(f[1]=p)},S.prototype.isBlank=function(){return this._isBlank},S.prototype.setBlank=function(_){this._isBlank=_},S.prototype.getLabel=null,o.enableClassExtend(S),o.enableClassManagement(S,{registerWhenExtend:!0}),E.exports=S},74635:function(E,A,u){var o=u(23405),S=u(54684),_=u(60653),p=u(82215),f=u(86855),y=f.prototype,d=Math.ceil,v=Math.floor,b=function(w,I,C,h){for(;C<h;){var c=C+h>>>1;w[c][1]<I?C=c+1:h=c}return C},s=f.extend({type:"time",getLabel:function(w){var I=this._stepLvl,C=new Date(w);return _.formatTime(I[0],C,this.getSetting("useUTC"))},niceExtent:function(w){var I=this._extent;if(I[0]===I[1]&&(I[0]-=864e5,I[1]+=864e5),I[1]===-1/0&&I[0]===1/0){var C=new Date;I[1]=+new Date(C.getFullYear(),C.getMonth(),C.getDate()),I[0]=I[1]-864e5}this.niceTicks(w.splitNumber,w.minInterval,w.maxInterval);var h=this._interval;w.fixMin||(I[0]=S.round(v(I[0]/h)*h)),w.fixMax||(I[1]=S.round(d(I[1]/h)*h))},niceTicks:function(w,I,C){w=w||10;var h=this._extent,c=h[1]-h[0],m=c/w;I!=null&&m<I&&(m=I),C!=null&&m>C&&(m=C);var T=l.length,D=b(l,m,0,T),O=l[Math.min(D,T-1)],N=O[1];if(O[0]==="year"){var z=c/N;N*=S.nice(z/w,!0)}var H=this.getSetting("useUTC")?0:60*new Date(+h[0]||+h[1]).getTimezoneOffset()*1e3,$=[Math.round(d((h[0]-H)/N)*N+H),Math.round(v((h[1]-H)/N)*N+H)];p.fixExtent($,h),this._stepLvl=O,this._interval=N,this._niceExtent=$},parse:function(w){return+S.parseDate(w)}});o.each(["contain","normalize"],function(w){s.prototype[w]=function(I){return y[w].call(this,this.parse(I))}});var l=[["hh:mm:ss",1e3],["hh:mm:ss",5e3],["hh:mm:ss",1e4],["hh:mm:ss",15e3],["hh:mm:ss",3e4],[`hh:mm
MM-dd`,6e4],[`hh:mm
MM-dd`,3e5],[`hh:mm
MM-dd`,6e5],[`hh:mm
MM-dd`,9e5],[`hh:mm
MM-dd`,18e5],[`hh:mm
MM-dd`,36e5],[`hh:mm
MM-dd`,72e5],[`hh:mm
MM-dd`,216e5],[`hh:mm
MM-dd`,432e5],[`MM-dd
yyyy`,864e5],[`MM-dd
yyyy`,1728e5],[`MM-dd
yyyy`,2592e5],[`MM-dd
yyyy`,3456e5],[`MM-dd
yyyy`,432e6],[`MM-dd
yyyy`,5184e5],["week",6048e5],[`MM-dd
yyyy`,864e6],["week",12096e5],["week",18144e5],["month",26784e5],["week",36288e5],["month",53568e5],["week",6048e6],["quarter",8208e6],["month",107136e5],["month",13392e6],["half-year",16416e6],["month",214272e5],["month",26784e6],["year",32832e6]];s.create=function(w){return new s({useUTC:w.ecModel.get("useUTC")})},E.exports=s},82215:function(E,A,u){var o=u(54684),S=o.round;function _(y){return o.getPrecisionSafe(y)+2}function p(y,d,v){y[d]=Math.max(Math.min(y[d],v[1]),v[0])}function f(y,d){isFinite(y[0])||(y[0]=d[0]),isFinite(y[1])||(y[1]=d[1]),p(y,0,d),p(y,1,d),y[0]>y[1]&&(y[0]=y[1])}A.intervalScaleNiceTicks=function(y,d,v,b){var s={},l=y[1]-y[0],w=s.interval=o.nice(l/d,!0);v!=null&&w<v&&(w=s.interval=v),b!=null&&w>b&&(w=s.interval=b);var I=s.intervalPrecision=_(w);return f(s.niceTickExtent=[S(Math.ceil(y[0]/w)*w,I),S(Math.floor(y[1]/w)*w,I)],y),s},A.getIntervalPrecision=_,A.fixExtent=f,A.intervalScaleGetTicks=function(y,d,v,b){var s=[];if(!y)return s;d[0]<v[0]&&s.push(d[0]);for(var l=v[0];l<=v[1]&&(s.push(l),(l=S(l+y,b))!==s[s.length-1]);)if(s.length>1e4)return[];return d[1]>(s.length?s[s.length-1]:v[1])&&s.push(d[1]),s}},78796:function(E,A,u){var o,S=u(23405),_=S.each,p=S.map,f=S.isFunction,y=S.createHashMap,d=S.noop,v=u(53833).createTask,b=u(91342).getUID,s=u(47409),l=u(60089),w=u(51064).normalizeToArray;function I(X,J,re,ie){this.ecInstance=X,this.api=J,this.unfinished;var re=this._dataProcessorHandlers=re.slice(),ie=this._visualHandlers=ie.slice();this._allHandlers=re.concat(ie),this._stageTaskMap=y()}var C=I.prototype;function h(X,J,q,te,re){var ie;function ne(le,fe){return le.setDirty&&(!le.dirtyMap||le.dirtyMap.get(fe.__pipeline.id))}re=re||{},_(J,function(le,fe){if(!re.visualType||re.visualType===le.visualType){var we=X._stageTaskMap.get(le.uid),pe=we.seriesTaskMap,ve=we.overallTask;if(ve){var be,Ee=ve.agentStubMap;Ee.each(function(Ne){ne(re,Ne)&&(Ne.dirty(),be=!0)}),be&&ve.dirty(),c(ve,te);var Re=X.getPerformArgs(ve,re.block);Ee.each(function(Ne){Ne.perform(Re)}),ie|=ve.perform(Re)}else pe&&pe.each(function(Ne,Le){ne(re,Ne)&&Ne.dirty();var Se=X.getPerformArgs(Ne,re.block);Se.skip=!le.performRawSeries&&q.isSeriesFiltered(Ne.context.model),c(Ne,te),ie|=Ne.perform(Se)})}}),X.unfinished|=ie}C.restoreData=function(X,J){X.restoreData(J),this._stageTaskMap.each(function(q){var te=q.overallTask;te&&te.dirty()})},C.getPerformArgs=function(X,J){if(X.__pipeline){var q=this._pipelineMap.get(X.__pipeline.id),te=q.context,re=!J&&q.progressiveEnabled&&(!te||te.progressiveRender)&&X.__idxInPipeline>q.blockIndex?q.step:null,ie=te&&te.modDataCount,ne=ie!=null?Math.ceil(ie/re):null;return{step:re,modBy:ne,modDataCount:ie}}},C.getPipeline=function(X){return this._pipelineMap.get(X)},C.updateStreamModes=function(X,J){var q=this._pipelineMap.get(X.uid),te=X.getData().count(),re=q.progressiveEnabled&&J.incrementalPrepareRender&&te>=q.threshold,ie=X.get("large")&&te>=X.get("largeThreshold"),ne=X.get("progressiveChunkMode")==="mod"?te:null;X.pipelineContext=q.context={progressiveRender:re,modDataCount:ne,large:ie}},C.restorePipelines=function(X){var J=this,q=J._pipelineMap=y();X.eachSeries(function(te){var re=te.getProgressive(),ie=te.uid;q.set(ie,{id:ie,head:null,tail:null,threshold:te.getProgressiveThreshold(),progressiveEnabled:re&&!(te.preventIncremental&&te.preventIncremental()),blockIndex:-1,step:Math.round(re||700),count:0}),P(J,te,te.dataTask)})},C.prepareStageTasks=function(){var X=this._stageTaskMap,J=this.ecInstance.getModel(),q=this.api;_(this._allHandlers,function(te){var re=X.get(te.uid)||X.set(te.uid,[]);te.reset&&function(ie,ne,le,fe,we){var pe=le.seriesTaskMap||(le.seriesTaskMap=y()),ve=ne.seriesType,be=ne.getTargetSeries;function Ee(Ne){var Le=Ne.uid,Se=pe.get(Le)||pe.set(Le,v({plan:N,reset:z,count:V}));Se.context={model:Ne,ecModel:fe,api:we,useClearVisual:ne.isVisual&&!ne.isLayout,plan:ne.plan,reset:ne.reset,scheduler:ie},P(ie,Ne,Se)}ne.createOnAllSeries?fe.eachRawSeries(Ee):ve?fe.eachRawSeriesByType(ve,Ee):be&&be(fe,we).each(Ee);var Re=ie._pipelineMap;pe.each(function(Ne,Le){Re.get(Le)||(Ne.dispose(),pe.removeKey(Le))})}(this,te,re,J,q),te.overallReset&&function(ie,ne,le,fe,we){var pe=le.overallTask=le.overallTask||v({reset:m});pe.context={ecModel:fe,api:we,overallReset:ne.overallReset,scheduler:ie};var ve=pe.agentStubMap=pe.agentStubMap||y(),be=ne.seriesType,Ee=ne.getTargetSeries,Re=!0,Ne=ne.modifyOutputEnd;function Le(Ie){var _e=Ie.uid,Ae=ve.get(_e);Ae||(Ae=ve.set(_e,v({reset:T,onDirty:O})),pe.dirty()),Ae.context={model:Ie,overallProgress:Re,modifyOutputEnd:Ne},Ae.agent=pe,Ae.__block=Re,P(ie,Ie,Ae)}be?fe.eachRawSeriesByType(be,Le):Ee?Ee(fe,we).each(Le):(Re=!1,_(fe.getSeries(),Le));var Se=ie._pipelineMap;ve.each(function(Ie,_e){Se.get(_e)||(Ie.dispose(),pe.dirty(),ve.removeKey(_e))})}(this,te,re,J,q)},this)},C.prepareView=function(X,J,q,te){var re=X.renderTask,ie=re.context;ie.model=J,ie.ecModel=q,ie.api=te,re.__block=!X.incrementalPrepareRender,P(this,J,re)},C.performDataProcessorTasks=function(X,J){h(this,this._dataProcessorHandlers,X,J,{block:!0})},C.performVisualTasks=function(X,J,q){h(this,this._visualHandlers,X,J,q)},C.performSeriesTasks=function(X){var J;X.eachSeries(function(q){J|=q.dataTask.perform()}),this.unfinished|=J},C.plan=function(){this._pipelineMap.each(function(X){var J=X.tail;do{if(J.__block){X.blockIndex=J.__idxInPipeline;break}J=J.getUpstream()}while(J)})};var c=C.updatePayload=function(X,J){J!=="remain"&&(X.context.payload=J)};function m(X){X.overallReset(X.ecModel,X.api,X.payload)}function T(X,J){return X.overallProgress&&D}function D(){this.agent.dirty(),this.getDownstream().dirty()}function O(){this.agent&&this.agent.dirty()}function N(X){return X.plan&&X.plan(X.model,X.ecModel,X.api,X.payload)}function z(X){X.useClearVisual&&X.data.clearAllVisual();var J=X.resetDefines=w(X.reset(X.model,X.ecModel,X.api,X.payload));return J.length>1?p(J,function(q,te){return $(te)}):H}var H=$(0);function $(X){return function(J,q){var te=q.data,re=q.resetDefines[X];if(re&&re.dataEach)for(var ie=J.start;ie<J.end;ie++)re.dataEach(te,ie);else re&&re.progress&&re.progress(J,te)}}function V(X){return X.data.count()}function P(X,J,q){var te=J.uid,re=X._pipelineMap.get(te);re.head||(re.head=q),re.tail&&re.tail.pipe(q),re.tail=q,q.__idxInPipeline=re.count++,q.__pipeline=re}I.wrapStageHandler=function(X,J){return f(X)&&(X={overallReset:X,seriesType:function(q){o=null;try{q(U,Y)}catch{}return o}(X)}),X.uid=b("stageHandler"),J&&(X.visualType=J),X};var U={},Y={};function Z(X,J){for(var q in J.prototype)X[q]=d}Z(U,s),Z(Y,l),U.eachSeriesByType=U.eachRawSeriesByType=function(X){o=X},U.eachComponent=function(X){X.mainType==="series"&&X.subType&&(o=X.subType)},E.exports=I},53833:function(E,A,u){var o=u(23405);o.assert;var S=o.isArray;function _(d){d=d||{},this._reset=d.reset,this._plan=d.plan,this._count=d.count,this._onDirty=d.onDirty,this._dirty=!0,this.context}u(9129).__DEV__;var p=_.prototype;p.perform=function(d){var v,b,s,l,w,I,C,h,c,m=this._upstream,T=d&&d.skip;if(this._dirty&&m){var D=this.context;D.data=D.outputData=m.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!T&&(h=this._plan(this.context));var O=((v=this._modBy)>=1||(v=1),v),N=this._modDataCount||0,z=((b=d&&d.modBy)>=1||(b=1),b),H=d&&d.modDataCount||0;(O!==z||N!==H)&&(h="reset"),(this._dirty||h==="reset")&&(this._dirty=!1,s=this,l=T,s._dueIndex=s._outputDueEnd=s._dueEnd=0,s._settedOutputEnd=null,!l&&s._reset&&((w=s._reset(s.context))&&w.progress&&(I=w.forceFirstProgress,w=w.progress),S(w)&&!w.length&&(w=null)),s._progress=w,s._modBy=s._modDataCount=null,(C=s._downstream)&&C.dirty(),c=I),this._modBy=z,this._modDataCount=H;var $=d&&d.step;if(m?this._dueEnd=m._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var V=this._dueIndex,P=Math.min($!=null?this._dueIndex+$:1/0,this._dueEnd);if(!T&&(c||V<P)){var U=this._progress;if(S(U))for(var Y=0;Y<U.length;Y++)y(this,U[Y],V,P,z,H);else y(this,U,V,P,z,H)}this._dueIndex=P;var Z=this._settedOutputEnd!=null?this._settedOutputEnd:P;this._outputDueEnd=Z}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd!=null?this._settedOutputEnd:this._dueEnd;return this.unfinished()};var f=function(){var d,v,b,s,l,w={reset:function(h,c,m,T){v=h,d=c,b=m,l=Math.ceil((s=T)/b),w.next=b>1&&s>0?C:I}};return w;function I(){return v<d?v++:null}function C(){var h=v%l*b+Math.ceil(v/l),c=v>=d?null:h<s?h:v;return v++,c}}();function y(d,v,b,s,l,w){f.reset(b,s,l,w),d._callingProgress=v,d._callingProgress({start:b,end:s,count:s-b,next:f.next},d.context)}p.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},p.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},p.pipe=function(d){(this._downstream!==d||this._dirty)&&(this._downstream=d,d._upstream=this,d.dirty())},p.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},p.getUpstream=function(){return this._upstream},p.getDownstream=function(){return this._downstream},p.setOutputEnd=function(d){this._outputDueEnd=this._settedOutputEnd=d},A.createTask=function(d){return new _(d)}},66568:function(E){var A="#eee",u=function(){return{axisLine:{lineStyle:{color:A}},axisTick:{lineStyle:{color:A}},axisLabel:{textStyle:{color:A}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:A}}}},o=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],S={color:o,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:A},crossStyle:{color:A}}},legend:{textStyle:{color:A}},textStyle:{color:A},title:{textStyle:{color:A}},toolbox:{iconStyle:{normal:{borderColor:A}}},dataZoom:{textStyle:{color:A}},visualMap:{textStyle:{color:A}},timeline:{lineStyle:{color:A},itemStyle:{normal:{color:o[1]}},label:{normal:{textStyle:{color:A}}},controlStyle:{normal:{color:A,borderColor:A}}},timeAxis:u(),logAxis:u(),valueAxis:u(),categoryAxis:u(),line:{symbol:"circle"},graph:{color:o},gauge:{title:{textStyle:{color:A}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};S.categoryAxis.splitLine.show=!1,E.exports=S},43759:function(E){var A=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"];E.exports={color:A,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],A]}},7762:function(E,A,u){var o=u(23405);A.createWrap=function(){var S,_=[],p={};return{add:function(f,y,d,v,b){return o.isString(v)&&(b=v,v=0),!p[f.id]&&(p[f.id]=1,_.push({el:f,target:y,time:d,delay:v,easing:b}),!0)},done:function(f){return S=f,this},start:function(){for(var f=_.length,y=0,d=_.length;y<d;y++){var v=_[y];v.el.animateTo(v.target,v.time,v.delay,v.easing,b)}return this;function b(){--f||(_.length=0,p={},S&&S())}}}}},92161:function(E,A,u){u(9129).__DEV__;var o=u(23405),S="___EC__COMPONENT__CONTAINER___";function _(d){var v={main:"",sub:""};return d&&(v.main=(d=d.split("."))[0]||"",v.sub=d[1]||""),v}var p=0;function f(d,v){var b=o.slice(arguments,2);return this.superClass.prototype[v].apply(d,b)}function y(d,v,b){return this.superClass.prototype[v].apply(d,b)}A.parseClassType=_,A.enableClassExtend=function(d,v){d.$constructor=d,d.extend=function(b){var s=this,l=function(){b.$constructor?b.$constructor.apply(this,arguments):s.apply(this,arguments)};return o.extend(l.prototype,b),l.extend=this.extend,l.superCall=f,l.superApply=y,o.inherits(l,this),l.superClass=s,l}},A.enableClassCheck=function(d){var v=["__\0is_clz",p++,Math.random().toFixed(3)].join("_");d.prototype[v]=!0,d.isInstance=function(b){return!!(b&&b[v])}},A.enableClassManagement=function(d,v){v=v||{};var b={};if(d.registerClass=function(l,w){if(w){var I,C,h;I=w,o.assert(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(I),'componentType "'+I+'" illegal'),(w=_(w)).sub?w.sub!==S&&(((h=b[(C=w).main])&&h[S]||((h=b[C.main]={})[S]=!0),h)[w.sub]=l):b[w.main]=l}return l},d.getClass=function(l,w,I){var C=b[l];if(C&&C[S]&&(C=w?C[w]:null),I&&!C)throw Error(w?"Component "+l+"."+(w||"")+" not exists. Load it first.":l+".type should be specified.");return C},d.getClassesByMainType=function(l){l=_(l);var w=[],I=b[l.main];return I&&I[S]?o.each(I,function(C,h){h!==S&&w.push(C)}):w.push(I),w},d.hasClass=function(l){return!!b[(l=_(l)).main]},d.getAllClassMainTypes=function(){var l=[];return o.each(b,function(w,I){l.push(I)}),l},d.hasSubTypes=function(l){var w=b[(l=_(l)).main];return w&&w[S]},d.parseClassType=_,v.registerWhenExtend){var s=d.extend;s&&(d.extend=function(l){var w=s.call(this,l);return d.registerClass(w,l.type)})}return d},A.setReadOnly=function(d,v){}},91342:function(E,A,u){var o=u(23405),S=u(92161).parseClassType,_=0;A.getUID=function(p){return[p||"",_++,Math.random().toFixed(5)].join("_")},A.enableSubTypeDefaulter=function(p){var f={};return p.registerSubTypeDefaulter=function(y,d){f[(y=S(y)).main]=d},p.determineSubType=function(y,d){var v=d.type;if(!v){var b=S(y).main;p.hasSubTypes(y)&&f[b]&&(v=f[b](d))}return v},p},A.enableTopologicalTravel=function(p,f){p.topologicalTravel=function(d,v,b,s){if(d.length){var l,w,I,C=(l=v,w={},I=[],o.each(l,function(H){var $,V,P,U=y(w,H),Y=($=U.originalDeps=f(H),V=l,P=[],o.each($,function(Z){o.indexOf(V,Z)>=0&&P.push(Z)}),P);U.entryCount=Y.length,U.entryCount===0&&I.push(H),o.each(Y,function(Z){0>o.indexOf(U.predecessor,Z)&&U.predecessor.push(Z);var X=y(w,Z);0>o.indexOf(X.successor,Z)&&X.successor.push(H)})}),{graph:w,noEntryList:I}),h=C.graph,c=C.noEntryList,m={};for(o.each(d,function(H){m[H]=!0});c.length;){var T=c.pop(),D=h[T],O=!!m[T];O&&(b.call(s,T,D.originalDeps.slice()),delete m[T]),o.each(D.successor,O?z:N)}o.each(m,function(){throw Error("Circle dependency may exists")})}function N(H){h[H].entryCount--,h[H].entryCount===0&&c.push(H)}function z(H){m[H]=!0,N(H)}};function y(d,v){return d[v]||(d[v]={predecessor:[],successor:[]}),d[v]}}},60653:function(E,A,u){var o=u(23405),S=u(24570),_=u(54684),p=o.normalizeCssArray,f=/([&<>"'])/g,y={"&":"&","<":"<",">":">",'"':""","'":"'"};function d(w){return w==null?"":(w+"").replace(f,function(I,C){return y[C]})}var v=["a","b","c","d","e","f","g"],b=function(w,I){return"{"+w+(I??"")+"}"};function s(w,I){return w+="","0000".substr(0,I-w.length)+w}var l=S.truncateText;A.addCommas=function(w){return isNaN(w)?"-":(w=(w+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(w.length>1?"."+w[1]:"")},A.toCamelCase=function(w,I){return w=(w||"").toLowerCase().replace(/-(.)/g,function(C,h){return h.toUpperCase()}),I&&w&&(w=w.charAt(0).toUpperCase()+w.slice(1)),w},A.normalizeCssArray=p,A.encodeHTML=d,A.formatTpl=function(w,I,C){o.isArray(I)||(I=[I]);var h=I.length;if(!h)return"";for(var c=I[0].$vars||[],m=0;m<c.length;m++){var T=v[m];w=w.replace(b(T),b(T,0))}for(var D=0;D<h;D++)for(var O=0;O<c.length;O++){var N=I[D][c[O]];w=w.replace(b(v[O],D),C?d(N):N)}return w},A.formatTplSimple=function(w,I,C){return o.each(I,function(h,c){w=w.replace("{"+c+"}",C?d(h):h)}),w},A.getTooltipMarker=function(w,c){var C=(w=o.isString(w)?{color:w,extraCssText:c}:w||{}).color,h=w.type,c=w.extraCssText,m=w.renderMode||"html",T=w.markerId||"X";return C?m==="html"?h==="subItem"?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+d(C)+";"+(c||"")+'"></span>':'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+d(C)+";"+(c||"")+'"></span>':{renderMode:m,content:"{marker"+T+"|} ",style:{color:C}}:""},A.formatTime=function(w,I,C){(w==="week"||w==="month"||w==="quarter"||w==="half-year"||w==="year")&&(w=`MM-dd
yyyy`);var h=_.parseDate(I),c=C?"UTC":"",m=h["get"+c+"FullYear"](),T=h["get"+c+"Month"]()+1,D=h["get"+c+"Date"](),O=h["get"+c+"Hours"](),N=h["get"+c+"Minutes"](),z=h["get"+c+"Seconds"](),H=h["get"+c+"Milliseconds"]();return w=w.replace("MM",s(T,2)).replace("M",T).replace("yyyy",m).replace("yy",m%100).replace("dd",s(D,2)).replace("d",D).replace("hh",s(O,2)).replace("h",O).replace("mm",s(N,2)).replace("m",N).replace("ss",s(z,2)).replace("s",z).replace("SSS",s(H,3))},A.capitalFirst=function(w){return w&&w.charAt(0).toUpperCase()+w.substr(1)},A.truncateText=l,A.getTextBoundingRect=function(w){return S.getBoundingRect(w.text,w.font,w.textAlign,w.textVerticalAlign,w.textPadding,w.textLineHeight,w.rich,w.truncate)},A.getTextRect=function(w,I,C,h,c,m,T,D){return S.getBoundingRect(w,I,C,h,c,D,m,T)}},51747:function(E,A,u){var o=u(23405),S=u(49884),_=u(86049),p=u(79442),f=u(76414),y=u(74582),d=u(1965),v=u(91222);A.Image=v,A.Group=u(18583),A.Text=u(96296),A.Circle=u(15062),A.Sector=u(84521),A.Ring=u(38839),A.Polygon=u(88217),A.Polyline=u(84214),A.Rect=u(86367),A.Line=u(1147),A.BezierCurve=u(38734),A.Arc=u(62734),A.CompoundPath=u(96113),A.LinearGradient=u(67725),A.RadialGradient=u(76636),A.BoundingRect=u(28761),A.IncrementalDisplayable=u(95028);var b=Math.round,s=Math.max,l=Math.min,w={};function I(pe,ve,be,Ee){var Re=S.createFromString(pe,ve);return be&&(Ee==="center"&&(be=C(be,Re.getBoundingRect())),c(Re,be)),Re}function C(pe,ve){var be,Ee=ve.width/ve.height,Re=pe.height*Ee;return be=Re<=pe.width?pe.height:(Re=pe.width)/Ee,{x:pe.x+pe.width/2-Re/2,y:pe.y+pe.height/2-be/2,width:Re,height:be}}var h=S.mergePath;function c(pe,ve){if(pe.applyTransform){var be=pe.getBoundingRect().calculateTransform(ve);pe.applyTransform(be)}}function m(pe,ve,be){var Ee=b(2*pe);return(Ee+b(ve))%2==0?Ee/2:(Ee+(be?1:-1))/2}function T(pe){return pe!=null&&pe!=="none"}var D=o.createHashMap(),O=0;function N(pe){var ve=pe.__hoverStl;if(ve&&!pe.__highlighted){var be=pe.useHoverLayer;pe.__highlighted=be?"layer":"plain";var Ee=pe.__zr;if(Ee||!be){var Re=pe,Ne=pe.style;be&&(Ne=(Re=Ee.addHover(pe)).style),ne(Ne),be||function(Le){if(Le.__hoverStlDirty){Le.__hoverStlDirty=!1;var Se=Le.__hoverStl;if(!Se){Le.__cachedNormalStl=Le.__cachedNormalZ2=null;return}var Ie=Le.__cachedNormalStl={};Le.__cachedNormalZ2=Le.z2;var _e=Le.style;for(var Ae in Se)Se[Ae]!=null&&(Ie[Ae]=_e[Ae]);Ie.fill=_e.fill,Ie.stroke=_e.stroke}}(Re),Ne.extendFrom(ve),z(Ne,ve,"fill"),z(Ne,ve,"stroke"),ie(Ne),be||(pe.dirty(!1),pe.z2+=1)}}}function z(pe,ve,be){!T(ve[be])&&T(pe[be])&&(pe[be]=function(Ee){if(typeof Ee!="string")return Ee;var Re=D.get(Ee);return!Re&&(Re=_.lift(Ee,-.1),O<1e4&&(D.set(Ee,Re),O++)),Re}(pe[be]))}function H(pe){var ve=pe.__highlighted;if(ve){if(pe.__highlighted=!1,ve==="layer")pe.__zr&&pe.__zr.removeHover(pe);else if(ve){var be=pe.style,Ee=pe.__cachedNormalStl;Ee&&(ne(be),pe.setStyle(Ee),ie(be));var Re=pe.__cachedNormalZ2;Re!=null&&pe.z2-Re==1&&(pe.z2=Re)}}}function $(pe,ve){pe.isGroup?pe.traverse(function(be){be.isGroup||ve(be)}):ve(pe)}function V(pe,ve){ve=pe.__hoverStl=ve!==!1&&(ve||{}),pe.__hoverStlDirty=!0,pe.__highlighted&&(pe.__cachedNormalStl=null,H(pe),N(pe))}function P(pe){this.__hoverSilentOnTouch&&pe.zrByTouch||this.__isEmphasisEntered||$(this,N)}function U(pe){this.__hoverSilentOnTouch&&pe.zrByTouch||this.__isEmphasisEntered||$(this,H)}function Y(){this.__isEmphasisEntered=!0,$(this,N)}function Z(){this.__isEmphasisEntered=!1,$(this,H)}function X(pe,ve){var be=ve===!1;if(pe.__hoverSilentOnTouch=ve!=null&&ve.hoverSilentOnTouch,!be||pe.__hoverStyleTrigger){var Ee=be?"off":"on";pe[Ee]("mouseover",P)[Ee]("mouseout",U),pe[Ee]("emphasis",Y)[Ee]("normal",Z),pe.__hoverStyleTrigger=!be}}function J(pe,ve,be,Ee,Re){return q(pe,ve,Ee,Re),be&&o.extend(pe,be),pe}function q(pe,ve,be,Ee){if((be=be||w).isRectText){var Re,Ne=ve.getShallow("position")||(Ee?null:"inside");Ne==="outside"&&(Ne="top"),pe.textPosition=Ne,pe.textOffset=ve.getShallow("offset");var Le=ve.getShallow("rotate");Le!=null&&(Le*=Math.PI/180),pe.textRotation=Le,pe.textDistance=o.retrieve2(ve.getShallow("distance"),Ee?null:5)}var Se=ve.ecModel,Ie=Se&&Se.option.textStyle,_e=function(ke){for(var Pe;ke&&ke!==ke.ecModel;){var Ve=(ke.option||w).rich;if(Ve)for(var je in Pe=Pe||{},Ve)Ve.hasOwnProperty(je)&&(Pe[je]=1);ke=ke.parentModel}return Pe}(ve);if(_e){for(var Ae in Re={},_e)if(_e.hasOwnProperty(Ae)){var ue=ve.getModel(["rich",Ae]);te(Re[Ae]={},ue,Ie,be,Ee)}}return pe.rich=Re,te(pe,ve,Ie,be,Ee,!0),be.forceRich&&!be.textStyle&&(be.textStyle={}),pe}function te(pe,ve,be,Ee,Re,Ne){be=!Re&&be||w,pe.textFill=re(ve.getShallow("color"),Ee)||be.color,pe.textStroke=re(ve.getShallow("textBorderColor"),Ee)||be.textBorderColor,pe.textStrokeWidth=o.retrieve2(ve.getShallow("textBorderWidth"),be.textBorderWidth),pe.insideRawTextPosition=pe.textPosition,Re||(Ne&&(pe.insideRollbackOpt=Ee,ie(pe)),pe.textFill==null&&(pe.textFill=Ee.autoColor)),pe.fontStyle=ve.getShallow("fontStyle")||be.fontStyle,pe.fontWeight=ve.getShallow("fontWeight")||be.fontWeight,pe.fontSize=ve.getShallow("fontSize")||be.fontSize,pe.fontFamily=ve.getShallow("fontFamily")||be.fontFamily,pe.textAlign=ve.getShallow("align"),pe.textVerticalAlign=ve.getShallow("verticalAlign")||ve.getShallow("baseline"),pe.textLineHeight=ve.getShallow("lineHeight"),pe.textWidth=ve.getShallow("width"),pe.textHeight=ve.getShallow("height"),pe.textTag=ve.getShallow("tag"),Ne&&Ee.disableBox||(pe.textBackgroundColor=re(ve.getShallow("backgroundColor"),Ee),pe.textPadding=ve.getShallow("padding"),pe.textBorderColor=re(ve.getShallow("borderColor"),Ee),pe.textBorderWidth=ve.getShallow("borderWidth"),pe.textBorderRadius=ve.getShallow("borderRadius"),pe.textBoxShadowColor=ve.getShallow("shadowColor"),pe.textBoxShadowBlur=ve.getShallow("shadowBlur"),pe.textBoxShadowOffsetX=ve.getShallow("shadowOffsetX"),pe.textBoxShadowOffsetY=ve.getShallow("shadowOffsetY")),pe.textShadowColor=ve.getShallow("textShadowColor")||be.textShadowColor,pe.textShadowBlur=ve.getShallow("textShadowBlur")||be.textShadowBlur,pe.textShadowOffsetX=ve.getShallow("textShadowOffsetX")||be.textShadowOffsetX,pe.textShadowOffsetY=ve.getShallow("textShadowOffsetY")||be.textShadowOffsetY}function re(pe,ve){return pe!=="auto"?pe:ve&&ve.autoColor?ve.autoColor:null}function ie(pe){var ve,be=pe.insideRollbackOpt;if(be&&pe.textFill==null){var Ee=be.useInsideStyle,Re=pe.insideRawTextPosition,Ne=be.autoColor;Ee!==!1&&(Ee===!0||be.isRectText&&Re&&typeof Re=="string"&&Re.indexOf("inside")>=0)?(ve={textFill:null,textStroke:pe.textStroke,textStrokeWidth:pe.textStrokeWidth},pe.textFill="#fff",pe.textStroke==null&&(pe.textStroke=Ne,pe.textStrokeWidth==null&&(pe.textStrokeWidth=2))):Ne!=null&&(ve={textFill:null},pe.textFill=Ne),ve&&(pe.insideRollback=ve)}}function ne(pe){var ve=pe.insideRollback;ve&&(pe.textFill=ve.textFill,pe.textStroke=ve.textStroke,pe.textStrokeWidth=ve.textStrokeWidth,pe.insideRollback=null)}function le(pe,ve,be,Ee,Re,Ne){if(typeof Re=="function"&&(Ne=Re,Re=null),Ee&&Ee.isAnimationEnabled()){var Le=pe?"Update":"",Se=Ee.getShallow("animationDuration"+Le),Ie=Ee.getShallow("animationEasing"+Le),_e=Ee.getShallow("animationDelay"+Le);typeof _e=="function"&&(_e=_e(Re,Ee.getAnimationDelayParams?Ee.getAnimationDelayParams(ve,Re):null)),typeof Se=="function"&&(Se=Se(Re)),Se>0?ve.animateTo(be,Se,_e||0,Ie,Ne,!!Ne):(ve.stopAnimation(),ve.attr(be),Ne&&Ne())}else ve.stopAnimation(),ve.attr(be),Ne&&Ne()}function fe(pe,ve,be,Ee,Re){le(!0,pe,ve,be,Ee,Re)}function we(pe,ve,be){return ve&&!o.isArrayLike(ve)&&(ve=d.getLocalTransform(ve)),be&&(ve=p.invert([],ve)),f.applyTransform([],pe,ve)}A.Z2_EMPHASIS_LIFT=1,A.extendShape=function(pe){return y.extend(pe)},A.extendPath=function(pe,ve){return S.extendFromString(pe,ve)},A.makePath=I,A.makeImage=function(pe,ve,be){var Ee=new v({style:{image:pe,x:ve.x,y:ve.y,width:ve.width,height:ve.height},onload:function(Re){if(be==="center"){var Ne={width:Re.width,height:Re.height};Ee.setStyle(C(ve,Ne))}}});return Ee},A.mergePath=h,A.resizePath=c,A.subPixelOptimizeLine=function(pe){var ve=pe.shape,be=pe.style.lineWidth;return b(2*ve.x1)===b(2*ve.x2)&&(ve.x1=ve.x2=m(ve.x1,be,!0)),b(2*ve.y1)===b(2*ve.y2)&&(ve.y1=ve.y2=m(ve.y1,be,!0)),pe},A.subPixelOptimizeRect=function(pe){var ve=pe.shape,be=pe.style.lineWidth,Ee=ve.x,Re=ve.y,Ne=ve.width,Le=ve.height;return ve.x=m(ve.x,be,!0),ve.y=m(ve.y,be,!0),ve.width=Math.max(m(Ee+Ne,be,!1)-ve.x,+(Ne!==0)),ve.height=Math.max(m(Re+Le,be,!1)-ve.y,+(Le!==0)),pe},A.subPixelOptimize=m,A.setElementHoverStyle=V,A.isInEmphasis=function(pe){return pe&&pe.__isEmphasisEntered},A.setHoverStyle=function(pe,ve,be){pe.isGroup?pe.traverse(function(Ee){Ee.isGroup||V(Ee,Ee.hoverStyle||ve)}):V(pe,pe.hoverStyle||ve),X(pe,be)},A.setAsHoverStyleTrigger=X,A.setLabelStyle=function(pe,ve,be,Ee,Re,Ne,Le){var Se,Ie=(Re=Re||w).labelFetcher,_e=Re.labelDataIndex,Ae=Re.labelDimIndex,ue=be.getShallow("show"),ke=Ee.getShallow("show");(ue||ke)&&(Ie&&(Se=Ie.getFormattedLabel(_e,"normal",null,Ae)),Se==null&&(Se=o.isFunction(Re.defaultText)?Re.defaultText(_e,Re):Re.defaultText));var Pe=ue?Se:null,Ve=ke?o.retrieve2(Ie?Ie.getFormattedLabel(_e,"emphasis",null,Ae):null,Se):null;(Pe!=null||Ve!=null)&&(J(pe,be,Ne,Re),J(ve,Ee,Le,Re,!0)),pe.text=Pe,ve.text=Ve},A.setTextStyle=J,A.setText=function(pe,ve,be){var Ee,Re={isRectText:!0};be===!1?Ee=!0:Re.autoColor=be,q(pe,ve,Re,Ee)},A.getFont=function(pe,ve){var be=ve||ve.getModel("textStyle");return o.trim([pe.fontStyle||be&&be.getShallow("fontStyle")||"",pe.fontWeight||be&&be.getShallow("fontWeight")||"",(pe.fontSize||be&&be.getShallow("fontSize")||12)+"px",pe.fontFamily||be&&be.getShallow("fontFamily")||"sans-serif"].join(" "))},A.updateProps=fe,A.initProps=function(pe,ve,be,Ee,Re){le(!1,pe,ve,be,Ee,Re)},A.getTransform=function(pe,ve){for(var be=p.identity([]);pe&&pe!==ve;)p.mul(be,pe.getLocalTransform(),be),pe=pe.parent;return be},A.applyTransform=we,A.transformDirection=function(pe,ve,be){var Ee=ve[4]===0||ve[5]===0||ve[0]===0?1:Math.abs(2*ve[4]/ve[0]),Re=ve[4]===0||ve[5]===0||ve[2]===0?1:Math.abs(2*ve[4]/ve[2]),Ne=[pe==="left"?-Ee:pe==="right"?Ee:0,pe==="top"?-Re:pe==="bottom"?Re:0];return Math.abs((Ne=we(Ne,ve,be))[0])>Math.abs(Ne[1])?Ne[0]>0?"right":"left":Ne[1]>0?"bottom":"top"},A.groupTransition=function(pe,ve,be,Ee){if(pe&&ve){var Re,Ne=(Re={},pe.traverse(function(Se){!Se.isGroup&&Se.anid&&(Re[Se.anid]=Se)}),Re);ve.traverse(function(Se){if(!Se.isGroup&&Se.anid){var Ie=Ne[Se.anid];if(Ie){var _e=Le(Se);Se.attr(Le(Ie)),fe(Se,_e,be,Se.dataIndex)}}})}function Le(Se){var Ie={position:f.clone(Se.position),rotation:Se.rotation};return Se.shape&&(Ie.shape=o.extend({},Se.shape)),Ie}},A.clipPointsByRect=function(pe,ve){return o.map(pe,function(be){var Ee=be[0];Ee=l(Ee=s(Ee,ve.x),ve.x+ve.width);var Re=be[1];return[Ee,Re=l(Re=s(Re,ve.y),ve.y+ve.height)]})},A.clipRectByRect=function(pe,ve){var be=s(pe.x,ve.x),Ee=l(pe.x+pe.width,ve.x+ve.width),Re=s(pe.y,ve.y),Ne=l(pe.y+pe.height,ve.y+ve.height);if(Ee>=be&&Ne>=Re)return{x:be,y:Re,width:Ee-be,height:Ne-Re}},A.createIcon=function(pe,ve,be){var Ee=(ve=o.extend({rectHover:!0},ve)).style={strokeNoScale:!0};if(be=be||{x:-1,y:-1,width:2,height:2},pe)return pe.indexOf("image://")===0?(Ee.image=pe.slice(8),o.defaults(Ee,be),new v(ve)):I(pe.replace("path://",""),ve,be,"center")}},62751:function(E,A,u){var o=u(23405),S=u(28761),_=u(54684).parsePercent,p=u(60653),f=o.each,y=["left","right","top","bottom","width","height"],d=[["width","left","right"],["height","top","bottom"]];function v(I,C,h,c,m){var T=0,D=0;c==null&&(c=1/0),m==null&&(m=1/0);var O=0;C.eachChild(function(N,z){var H,$,V=N.position,P=N.getBoundingRect(),U=C.childAt(z+1),Y=U&&U.getBoundingRect();if(I==="horizontal"){var Z=P.width+(Y?-Y.x+P.x:0);(H=T+Z)>c||N.newline?(T=0,H=Z,D+=O+h,O=P.height):O=Math.max(O,P.height)}else{var X=P.height+(Y?-Y.y+P.y:0);($=D+X)>m||N.newline?(T+=O+h,D=0,$=X,O=P.width):O=Math.max(O,P.width)}N.newline||(V[0]=T,V[1]=D,I==="horizontal"?T=H+h:D=$+h)})}var b=o.curry(v,"vertical"),s=o.curry(v,"horizontal");function l(I,C,h){h=p.normalizeCssArray(h||0);var c=C.width,m=C.height,T=_(I.left,c),D=_(I.top,m),O=_(I.right,c),N=_(I.bottom,m),z=_(I.width,c),H=_(I.height,m),$=h[2]+h[0],V=h[1]+h[3],P=I.aspect;switch(isNaN(z)&&(z=c-O-V-T),isNaN(H)&&(H=m-N-$-D),P!=null&&(isNaN(z)&&isNaN(H)&&(P>c/m?z=.8*c:H=.8*m),isNaN(z)&&(z=P*H),isNaN(H)&&(H=z/P)),isNaN(T)&&(T=c-O-z-V),isNaN(D)&&(D=m-N-H-$),I.left||I.right){case"center":T=c/2-z/2-h[3];break;case"right":T=c-z-V}switch(I.top||I.bottom){case"middle":case"center":D=m/2-H/2-h[0];break;case"bottom":D=m-H-$}T=T||0,D=D||0,isNaN(z)&&(z=c-V-T-(O||0)),isNaN(H)&&(H=m-$-D-(N||0));var U=new S(T+h[3],D+h[0],z,H);return U.margin=h,U}function w(I,C){return C&&I&&f(y,function(h){C.hasOwnProperty(h)&&(I[h]=C[h])}),I}A.LOCATION_PARAMS=y,A.HV_NAMES=d,A.box=v,A.vbox=b,A.hbox=s,A.getAvailableSize=function(I,C,h){var c=C.width,m=C.height,T=_(I.x,c),D=_(I.y,m),O=_(I.x2,c),N=_(I.y2,m);return(isNaN(T)||isNaN(parseFloat(I.x)))&&(T=0),(isNaN(O)||isNaN(parseFloat(I.x2)))&&(O=c),(isNaN(D)||isNaN(parseFloat(I.y)))&&(D=0),(isNaN(N)||isNaN(parseFloat(I.y2)))&&(N=m),{width:Math.max(O-T-(h=p.normalizeCssArray(h||0))[1]-h[3],0),height:Math.max(N-D-h[0]-h[2],0)}},A.getLayoutRect=l,A.positionElement=function(I,C,h,c,m){var T,D=!m||!m.hv||m.hv[0],O=!m||!m.hv||m.hv[1],N=m&&m.boundingMode||"all";if(D||O){if(N==="raw")T=I.type==="group"?new S(0,0,+C.width||0,+C.height||0):I.getBoundingRect();else if(T=I.getBoundingRect(),I.needLocalTransform()){var z=I.getLocalTransform();(T=T.clone()).applyTransform(z)}C=l(o.defaults({width:T.width,height:T.height},C),h,c);var H=I.position,$=D?C.x-T.x:0,V=O?C.y-T.y:0;I.attr("position",N==="raw"?[$,V]:[H[0]+$,H[1]+V])}},A.sizeCalculable=function(I,C){return I[d[C][0]]!=null||I[d[C][1]]!=null&&I[d[C][2]]!=null},A.mergeLayoutParam=function(I,C,h){o.isObject(h)||(h={});var c=h.ignoreSize;o.isArray(c)||(c=[c,c]);var m=D(d[0],0),T=D(d[1],1);function D(H,$){var V={},P=0,U={},Y=0;if(f(H,function(J){U[J]=I[J]}),f(H,function(J){O(C,J)&&(V[J]=U[J]=C[J]),N(V,J)&&P++,N(U,J)&&Y++}),c[$])return N(C,H[1])?U[H[2]]=null:N(C,H[2])&&(U[H[1]]=null),U;if(Y===2||!P)return U;if(P>=2)return V;for(var Z=0;Z<H.length;Z++){var X=H[Z];if(!O(V,X)&&O(I,X)){V[X]=I[X];break}}return V}function O(H,$){return H.hasOwnProperty($)}function N(H,$){return H[$]!=null&&H[$]!=="auto"}function z(H,$,V){f(H,function(P){$[P]=V[P]})}z(d[0],I,m),z(d[1],I,T)},A.getLayoutParams=function(I){return w({},I)},A.copyLayoutParams=w},51064:function(E,A,u){var o=u(23405),S=u(23584),_=o.each,p=o.isObject,f=o.isArray,y="series\0";function d(l){return l instanceof Array?l:l==null?[]:[l]}function v(l){return p(l)&&l.id&&(l.id+"").indexOf("\0_ec_\0")===0}var b=0;function s(l,w){return l&&l.hasOwnProperty(w)}A.normalizeToArray=d,A.defaultEmphasis=function(l,w,I){if(l){l[w]=l[w]||{},l.emphasis=l.emphasis||{},l.emphasis[w]=l.emphasis[w]||{};for(var C=0,h=I.length;C<h;C++){var c=I[C];!l.emphasis[w].hasOwnProperty(c)&&l[w].hasOwnProperty(c)&&(l.emphasis[w][c]=l[w][c])}}},A.TEXT_STYLE_OPTIONS=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"],A.getDataItemValue=function(l){return!p(l)||f(l)||l instanceof Date?l:l.value},A.isDataItemOption=function(l){return p(l)&&!(l instanceof Array)},A.mappingToExists=function(l,w){w=(w||[]).slice();var I=o.map(l||[],function(C,h){return{exist:C}});return _(w,function(C,h){if(p(C)){for(var c=0;c<I.length;c++)if(!I[c].option&&C.id!=null&&I[c].exist.id===C.id+""){I[c].option=C,w[h]=null;return}for(var c=0;c<I.length;c++){var m=I[c].exist;if(!I[c].option&&(m.id==null||C.id==null)&&C.name!=null&&!v(C)&&!v(m)&&m.name===C.name+""){I[c].option=C,w[h]=null;return}}}}),_(w,function(C,h){if(p(C)){for(var c=0;c<I.length;c++){var m=I[c].exist;if(!I[c].option&&!v(m)&&C.id==null){I[c].option=C;break}}c>=I.length&&I.push({option:C})}}),I},A.makeIdAndName=function(l){var w=o.createHashMap();_(l,function(I,C){var h=I.exist;h&&w.set(h.id,I)}),_(l,function(I,C){var h=I.option;o.assert(!h||h.id==null||!w.get(h.id)||w.get(h.id)===I,"id duplicates: "+(h&&h.id)),h&&h.id!=null&&w.set(h.id,I),I.keyInfo||(I.keyInfo={})}),_(l,function(I,C){var h=I.exist,c=I.option,m=I.keyInfo;if(p(c)){if(m.name=c.name!=null?c.name+"":h?h.name:y+C,h)m.id=h.id;else if(c.id!=null)m.id=c.id+"";else{var T=0;do m.id="\0"+m.name+"\0"+T++;while(w.get(m.id))}w.set(m.id,I)}})},A.isNameSpecified=function(l){var w=l.name;return!!(w&&w.indexOf(y))},A.isIdInner=v,A.compressBatches=function(l,w){var I={},C={};return h(l||[],I),h(w||[],C,I),[c(I),c(C)];function h(m,T,D){for(var O=0,N=m.length;O<N;O++)for(var z=m[O].seriesId,H=d(m[O].dataIndex),$=D&&D[z],V=0,P=H.length;V<P;V++){var U=H[V];$&&$[U]?$[U]=null:(T[z]||(T[z]={}))[U]=1}}function c(m,T){var D=[];for(var O in m)if(m.hasOwnProperty(O)&&m[O]!=null)if(T)D.push(+O);else{var N=c(m[O],!0);N.length&&D.push({seriesId:O,dataIndex:N})}return D}},A.queryDataIndex=function(l,w){return w.dataIndexInside!=null?w.dataIndexInside:w.dataIndex!=null?o.isArray(w.dataIndex)?o.map(w.dataIndex,function(I){return l.indexOfRawIndex(I)}):l.indexOfRawIndex(w.dataIndex):w.name!=null?o.isArray(w.name)?o.map(w.name,function(I){return l.indexOfName(I)}):l.indexOfName(w.name):void 0},A.makeInner=function(){var l="__\0ec_inner_"+b+++"_"+Math.random().toFixed(5);return function(w){return w[l]||(w[l]={})}},A.parseFinder=function(l,w,I){if(o.isString(w)){var C={};C[w+"Index"]=0,w=C}var h=I&&I.defaultMainType;!h||s(w,h+"Index")||s(w,h+"Id")||s(w,h+"Name")||(w[h+"Index"]=0);var c={};return _(w,function(D,T){var D=w[T];if(T==="dataIndex"||T==="dataIndexInside"){c[T]=D;return}var O=T.match(/^(\w+)(Index|Id|Name)$/)||[],N=O[1],z=(O[2]||"").toLowerCase();if(!(!N||!z||D==null||z==="index"&&D==="none"||I&&I.includeMainTypes&&0>o.indexOf(I.includeMainTypes,N))){var H={mainType:N};(z!=="index"||D!=="all")&&(H[z]=D);var $=l.queryComponents(H);c[N+"Models"]=$,c[N+"Model"]=$[0]}}),c},A.setAttribute=function(l,w,I){l.setAttribute?l.setAttribute(w,I):l[w]=I},A.getAttribute=function(l,w){return l.getAttribute?l.getAttribute(w):l[w]},A.getTooltipRenderMode=function(l){return l==="auto"?S.domSupported?"html":"richText":l||"html"},A.groupData=function(l,w){var I=o.createHashMap(),C=[];return o.each(l,function(h){var c=w(h);(I.get(c)||(C.push(c),I.set(c,[]))).push(h)}),{keys:C,buckets:I}}},54684:function(E,A,u){var o=u(23405),S=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function _(p){return Math.floor(Math.log(p)/Math.LN10)}A.linearMap=function(p,f,y,d){var v=f[1]-f[0],b=y[1]-y[0];if(v===0)return b===0?y[0]:(y[0]+y[1])/2;if(d)if(v>0){if(p<=f[0])return y[0];if(p>=f[1])return y[1]}else{if(p>=f[0])return y[0];if(p<=f[1])return y[1]}else{if(p===f[0])return y[0];if(p===f[1])return y[1]}return(p-f[0])/v*b+y[0]},A.parsePercent=function(p,f){switch(p){case"center":case"middle":p="50%";break;case"left":case"top":p="0%";break;case"right":case"bottom":p="100%"}return typeof p=="string"?p.replace(/^\s+/,"").replace(/\s+$/,"").match(/%$/)?parseFloat(p)/100*f:parseFloat(p):p==null?NaN:+p},A.round=function(p,f,y){return f==null&&(f=10),f=Math.min(Math.max(0,f),20),p=(+p).toFixed(f),y?p:+p},A.asc=function(p){return p.sort(function(f,y){return f-y}),p},A.getPrecision=function(p){if(isNaN(p*=1))return 0;for(var f=1,y=0;Math.round(p*f)/f!==p;)f*=10,y++;return y},A.getPrecisionSafe=function(p){var f=p.toString(),y=f.indexOf("e");if(y>0){var d=+f.slice(y+1);return d<0?-d:0}var v=f.indexOf(".");return v<0?0:f.length-1-v},A.getPixelPrecision=function(p,f){var y=Math.log,d=Math.LN10,v=Math.min(Math.max(-Math.floor(y(p[1]-p[0])/d)+Math.round(y(Math.abs(f[1]-f[0]))/d),0),20);return isFinite(v)?v:20},A.getPercentWithPrecision=function(p,f,y){if(!p[f])return 0;var d=o.reduce(p,function(T,D){return T+(isNaN(D)?0:D)},0);if(d===0)return 0;for(var v=Math.pow(10,y),b=o.map(p,function(T){return(isNaN(T)?0:T)/d*v*100}),s=100*v,l=o.map(b,function(T){return Math.floor(T)}),w=o.reduce(l,function(T,D){return T+D},0),I=o.map(b,function(T,D){return T-l[D]});w<s;){for(var C=Number.NEGATIVE_INFINITY,h=null,c=0,m=I.length;c<m;++c)I[c]>C&&(C=I[c],h=c);++l[h],I[h]=0,++w}return l[f]/v},A.MAX_SAFE_INTEGER=9007199254740991,A.remRadian=function(p){var f=2*Math.PI;return(p%f+f)%f},A.isRadianAroundZero=function(p){return p>-1e-4&&p<1e-4},A.parseDate=function(p){if(p instanceof Date)return p;if(typeof p=="string"){var f=S.exec(p);if(!f)return new Date(NaN);if(!f[8])return new Date(+f[1],+(f[2]||1)-1,+f[3]||1,+f[4]||0,+(f[5]||0),+f[6]||0,+f[7]||0);var y=+f[4]||0;return f[8].toUpperCase()!=="Z"&&(y-=f[8].slice(0,3)),new Date(Date.UTC(+f[1],+(f[2]||1)-1,+f[3]||1,y,+(f[5]||0),+f[6]||0,+f[7]||0))}return p==null?new Date(NaN):new Date(Math.round(p))},A.quantity=function(p){return Math.pow(10,_(p))},A.nice=function(p,f){var y=_(p),d=Math.pow(10,y),v=p/d;return p=(f?v<1.5?1:v<2.5?2:v<4?3:v<7?5:10:v<1?1:v<2?2:v<3?3:v<5?5:10)*d,y>=-20?+p.toFixed(y<0?-y:0):p},A.quantile=function(p,f){var y=(p.length-1)*f+1,d=Math.floor(y),v=+p[d-1],b=y-d;return b?v+b*(p[d]-v):v},A.reformIntervals=function(p){p.sort(function(l,w){return function I(C,h,c){return C.interval[c]<h.interval[c]||C.interval[c]===h.interval[c]&&(C.close[c]-h.close[c]==(c?-1:1)||!c&&I(C,h,1))}(l,w,0)?-1:1});for(var f=-1/0,y=1,d=0;d<p.length;){for(var v=p[d].interval,b=p[d].close,s=0;s<2;s++)v[s]<=f&&(v[s]=f,b[s]=s?1:1-y),f=v[s],y=b[s];v[0]===v[1]&&b[0]*b[1]!=1?p.splice(d,1):d++}return p},A.isNumeric=function(p){return p-parseFloat(p)>=0}},30696:function(E,A,u){var o=u(23405),S=u(51747),_=u(28761),p=S.extendShape({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(I,C){var h=C.cx,c=C.cy,m=C.width/2,T=C.height/2;I.moveTo(h,c-T),I.lineTo(h+m,c+T),I.lineTo(h-m,c+T),I.closePath()}}),f=S.extendShape({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(I,C){var h=C.cx,c=C.cy,m=C.width/2,T=C.height/2;I.moveTo(h,c-T),I.lineTo(h+m,c),I.lineTo(h,c+T),I.lineTo(h-m,c),I.closePath()}}),y=S.extendShape({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(I,C){var h=C.x,c=C.y,m=C.width/5*3,T=Math.max(m,C.height),D=m/2,O=D*D/(T-D),N=c-T+D+O,z=Math.asin(O/D),H=Math.cos(z)*D,$=Math.sin(z),V=Math.cos(z),P=.6*D,U=.7*D;I.moveTo(h-H,N+O),I.arc(h,N,D,Math.PI-z,2*Math.PI+z),I.bezierCurveTo(h+H-$*P,N+O+V*P,h,c-U,h,c),I.bezierCurveTo(h,c-U,h-H+$*P,N+O+V*P,h-H,N+O),I.closePath()}}),d=S.extendShape({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(I,C){var h=C.height,c=C.width,m=C.x,T=C.y,D=c/3*2;I.moveTo(m,T),I.lineTo(m+D,T+h),I.lineTo(m,T+h/4*3),I.lineTo(m-D,T+h),I.lineTo(m,T),I.closePath()}}),v={line:S.Line,rect:S.Rect,roundRect:S.Rect,square:S.Rect,circle:S.Circle,diamond:f,pin:y,arrow:d,triangle:p},b={line:function(I,C,h,c,m){m.x1=I,m.y1=C+c/2,m.x2=I+h,m.y2=C+c/2},rect:function(I,C,h,c,m){m.x=I,m.y=C,m.width=h,m.height=c},roundRect:function(I,C,h,c,m){m.x=I,m.y=C,m.width=h,m.height=c,m.r=Math.min(h,c)/4},square:function(I,C,h,c,m){var T=Math.min(h,c);m.x=I,m.y=C,m.width=T,m.height=T},circle:function(I,C,h,c,m){m.cx=I+h/2,m.cy=C+c/2,m.r=Math.min(h,c)/2},diamond:function(I,C,h,c,m){m.cx=I+h/2,m.cy=C+c/2,m.width=h,m.height=c},pin:function(I,C,h,c,m){m.x=I+h/2,m.y=C+c/2,m.width=h,m.height=c},arrow:function(I,C,h,c,m){m.x=I+h/2,m.y=C+c/2,m.width=h,m.height=c},triangle:function(I,C,h,c,m){m.cx=I+h/2,m.cy=C+c/2,m.width=h,m.height=c}},s={};o.each(v,function(I,C){s[C]=new I});var l=S.extendShape({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},beforeBrush:function(){var I=this.style;this.shape.symbolType==="pin"&&I.textPosition==="inside"&&(I.textPosition=["50%","40%"],I.textAlign="center",I.textVerticalAlign="middle")},buildPath:function(I,C,h){var c=C.symbolType,m=s[c];C.symbolType!=="none"&&(m||(m=s[c="rect"]),b[c](C.x,C.y,C.width,C.height,m.shape),m.buildPath(I,m.shape,h))}});function w(I,C){if(this.type!=="image"){var h=this.style,c=this.shape;c&&c.symbolType==="line"?h.stroke=I:this.__isEmptyBrush?(h.stroke=I,h.fill=C||"#fff"):(h.fill&&(h.fill=I),h.stroke&&(h.stroke=I)),this.dirty(!1)}}A.createSymbol=function(I,C,h,c,m,T,D){var O,N=I.indexOf("empty")===0;return N&&(I=I.substr(5,1).toLowerCase()+I.substr(6)),(O=I.indexOf("image://")===0?S.makeImage(I.slice(8),new _(C,h,c,m),D?"center":"cover"):I.indexOf("path://")===0?S.makePath(I.slice(7),{},new _(C,h,c,m),D?"center":"cover"):new l({shape:{symbolType:I,x:C,y:h,width:c,height:m}})).__isEmptyBrush=N,O.setColor=w,O.setColor(T),O}},94127:function(E,A){var u="\0__throttleOriginMethod",o="\0__throttleRate",S="\0__throttleType";function _(p,f,y){var d,v,b,s,l,w=0,I=0,C=null;function h(){I=new Date().getTime(),C=null,p.apply(b,s||[])}f=f||0;var c=function(){d=new Date().getTime(),b=this,s=arguments;var m=l||f,T=l||y;l=null,v=d-(T?w:I)-m,clearTimeout(C),T?C=setTimeout(h,m):v>=0?h():C=setTimeout(h,-v),w=d};return c.clear=function(){C&&(clearTimeout(C),C=null)},c.debounceNextCall=function(m){l=m},c}A.throttle=_,A.createOrUpdate=function(p,f,y,d){var v=p[f];if(v){var b=v[u]||v,s=v[S];if(v[o]!==y||s!==d){if(y==null||!d)return p[f]=b;(v=p[f]=_(b,y,d==="debounce"))[u]=b,v[S]=d,v[o]=y}return v}},A.clear=function(p,f){var y=p[f];y&&y[u]&&(p[f]=y[u])}},4695:function(E,A,u){var o=u(23405).each,S=u(18583),_=u(91342),p=u(92161),f=u(51064),y=u(53833).createTask,d=u(52227),v=f.makeInner(),b=d();function s(){this.group=new S,this.uid=_.getUID("viewChart"),this.renderTask=y({plan:C,reset:h}),this.renderTask.context={view:this}}s.prototype={type:"chart",init:function(m,T){},render:function(m,T,D,O){},highlight:function(m,T,D,O){I(m.getData(),O,"emphasis")},downplay:function(m,T,D,O){I(m.getData(),O,"normal")},remove:function(m,T){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};var l=s.prototype;function w(m,T){if(m&&(m.trigger(T),m.type==="group"))for(var D=0;D<m.childCount();D++)w(m.childAt(D),T)}function I(m,T,D){var O=f.queryDataIndex(m,T);O!=null?o(f.normalizeToArray(O),function(N){w(m.getItemGraphicEl(N),D)}):m.eachItemGraphicEl(function(N){w(N,D)})}function C(m){return b(m.model)}function h(m){var T=m.model,D=m.ecModel,O=m.api,N=m.payload,z=T.pipelineContext.progressiveRender,H=m.view,$=N&&v(N).updateMethod,V=z?"incrementalPrepareRender":$&&H[$]?$:"render";return V!=="render"&&H[V](T,D,O,N),c[V]}l.updateView=l.updateLayout=l.updateVisual=function(m,T,D,O){this.render(m,T,D,O)},p.enableClassExtend(s,["dispose"]),p.enableClassManagement(s,{registerWhenExtend:!0}),s.markUpdateMethod=function(m,T){v(m).updateMethod=T};var c={incrementalPrepareRender:{progress:function(m,T){T.view.incrementalRender(m,T.model,T.ecModel,T.api,T.payload)}},render:{forceFirstProgress:!0,progress:function(m,T){T.view.render(T.model,T.ecModel,T.api,T.payload)}}};E.exports=s},44152:function(E,A,u){var o=u(18583),S=u(91342),_=u(92161),p=function(){this.group=new o,this.uid=S.getUID("viewComponent")};p.prototype={constructor:p,init:function(y,d){},render:function(y,d,v,b){},dispose:function(){},filterForExposedEvent:null};var f=p.prototype;f.updateView=f.updateLayout=f.updateVisual=function(y,d,v,b){},_.enableClassExtend(p),_.enableClassManagement(p,{registerWhenExtend:!0}),E.exports=p},32013:function(E,A,u){var o=u(23405),S=u(86049),_=u(54684).linearMap,p=o.each,f=o.isObject,y=function(T){var D,O,N=T.mappingMethod,z=T.type,H=this.option=o.clone(T);this.type=z,this.mappingMethod=N,this._normalizeData=m[N];var $=d[z];this.applyVisual=$.applyVisual,this.getColorMapper=$.getColorMapper,this._doMap=$._doMap[N],N==="piecewise"?(v(H),O=(D=H).pieceList,D.hasSpecialVisual=!1,o.each(O,function(V,P){V.originIndex=P,V.visual!=null&&(D.hasSpecialVisual=!0)})):N==="category"?H.categories?function(V){var P=V.categories,U=V.visual,Y=V.categoryMap={};if(p(P,function(J,q){Y[J]=q}),!o.isArray(U)){var Z=[];o.isObject(U)?p(U,function(J,q){var te=Y[q];Z[te??-1]=J}):Z[-1]=U,U=c(V,Z)}for(var X=P.length-1;X>=0;X--)U[X]==null&&(delete Y[P[X]],P.pop())}(H):v(H,!0):(o.assert(N!=="linear"||H.dataExtent),v(H))};y.prototype={constructor:y,mapValueToVisual:function(T){var D=this._normalizeData(T);return this._doMap(D,T)},getNormalizer:function(){return o.bind(this._normalizeData,this)}};var d=y.visualHandlers={color:{applyVisual:l("color"),getColorMapper:function(){var T=this.option;return o.bind(T.mappingMethod==="category"?function(D,O){return O||(D=this._normalizeData(D)),w.call(this,D)}:function(D,O,N){var z=!!N;return O||(D=this._normalizeData(D)),N=S.fastLerp(D,T.parsedVisual,N),z?N:S.stringify(N,"rgba")},this)},_doMap:{linear:function(T){return S.stringify(S.fastLerp(T,this.option.parsedVisual),"rgba")},category:w,piecewise:function(T,D){var O=h.call(this,D);return O==null&&(O=S.stringify(S.fastLerp(T,this.option.parsedVisual),"rgba")),O},fixed:I}},colorHue:b(function(T,D){return S.modifyHSL(T,D)}),colorSaturation:b(function(T,D){return S.modifyHSL(T,null,D)}),colorLightness:b(function(T,D){return S.modifyHSL(T,null,null,D)}),colorAlpha:b(function(T,D){return S.modifyAlpha(T,D)}),opacity:{applyVisual:l("opacity"),_doMap:C([0,1])},liftZ:{applyVisual:l("liftZ"),_doMap:{linear:I,category:I,piecewise:I,fixed:I}},symbol:{applyVisual:function(T,D,O){var N=this.mapValueToVisual(T);if(o.isString(N))O("symbol",N);else if(f(N))for(var z in N)N.hasOwnProperty(z)&&O(z,N[z])},_doMap:{linear:s,category:w,piecewise:function(T,D){var O=h.call(this,D);return O==null&&(O=s.call(this,T)),O},fixed:I}},symbolSize:{applyVisual:l("symbolSize"),_doMap:C([0,1])}};function v(T,D){var O=T.visual,N=[];o.isObject(O)?p(O,function(z){N.push(z)}):O!=null&&N.push(O),D||N.length!==1||{color:1,symbol:1}.hasOwnProperty(T.type)||(N[1]=N[0]),c(T,N)}function b(T){return{applyVisual:function(D,O,N){D=this.mapValueToVisual(D),N("color",T(O("color"),D))},_doMap:C([0,1])}}function s(T){var D=this.option.visual;return D[Math.round(_(T,[0,1],[0,D.length-1],!0))]||{}}function l(T){return function(D,O,N){N(T,this.mapValueToVisual(D))}}function w(T){var D=this.option.visual;return D[this.option.loop&&T!==-1?T%D.length:T]}function I(){return this.option.visual[0]}function C(T){return{linear:function(D){return _(D,T,this.option.visual,!0)},category:w,piecewise:function(D,O){var N=h.call(this,O);return N==null&&(N=_(D,T,this.option.visual,!0)),N},fixed:I}}function h(T){var D=this.option,O=D.pieceList;if(D.hasSpecialVisual){var N=y.findPieceIndex(T,O),z=O[N];if(z&&z.visual)return z.visual[this.type]}}function c(T,D){return T.visual=D,T.type==="color"&&(T.parsedVisual=o.map(D,function(O){return S.parse(O)})),D}var m={linear:function(T){return _(T,this.option.dataExtent,[0,1],!0)},piecewise:function(T){var D=this.option.pieceList,O=y.findPieceIndex(T,D,!0);if(O!=null)return _(O,[0,D.length-1],[0,1],!0)},category:function(T){var D=this.option.categories?this.option.categoryMap[T]:T;return D??-1},fixed:o.noop};y.listVisualTypes=function(){var T=[];return o.each(d,function(D,O){T.push(O)}),T},y.addVisualHandler=function(T,D){d[T]=D},y.isValidType=function(T){return d.hasOwnProperty(T)},y.eachVisual=function(T,D,O){o.isObject(T)?o.each(T,D,O):D.call(O,T)},y.mapVisual=function(T,D,O){var N,z=o.isArray(T)?[]:o.isObject(T)?{}:(N=!0,null);return y.eachVisual(T,function(H,$){var V=D.call(O,H,$);N?z=V:z[$]=V}),z},y.retrieveVisuals=function(T){var D,O={};return T&&p(d,function(N,z){T.hasOwnProperty(z)&&(O[z]=T[z],D=!0)}),D?O:null},y.prepareVisualTypes=function(T){if(f(T)){var D=[];p(T,function(O,N){D.push(N)}),T=D}else{if(!o.isArray(T))return[];T=T.slice()}return T.sort(function(O,N){return N==="color"&&O!=="color"&&O.indexOf("color")===0?1:-1}),T},y.dependsOn=function(T,D){return D==="color"?!!(T&&T.indexOf(D)===0):T===D},y.findPieceIndex=function(T,D,O){for(var N,z=1/0,H=0,$=D.length;H<$;H++){var V=D[H].value;if(V!=null){if(V===T||typeof V=="string"&&V===T+"")return H;O&&ve(V,H)}}for(var H=0,$=D.length;H<$;H++){var P,U,Y,Z,X,J,q,te,re,ie,ne,le,fe=D[H],we=fe.interval,pe=fe.close;if(we){if(we[0]===-1/0){if(P=pe[1],U=T,Y=we[1],P?U<=Y:U<Y)return H}else if(we[1]===1/0){if(Z=pe[0],X=we[0],J=T,Z?X<=J:X<J)return H}else if(q=pe[0],te=we[0],re=T,(q?te<=re:te<re)&&(ie=pe[1],ne=T,le=we[1],ie?ne<=le:ne<le))return H;O&&ve(we[0],H),O&&ve(we[1],H)}}if(O)return T===1/0?D.length-1:T===-1/0?0:N;function ve(be,Ee){var Re=Math.abs(be-T);Re<z&&(z=Re,N=Ee)}},E.exports=y},43203:function(E,A,u){var o=u(23405),S=u(12414),_=u(45435).retrieveRawValue;E.exports=function(p,f){var y,d=f.getModel("aria");if(d.get("show")){if(d.get("description"))return void p.setAttribute("aria-label",d.get("description"));var v=0;f.eachSeries(function(m,T){++v},this);var b=d.get("data.maxCount")||10,s=d.get("series.maxCount")||10,l=Math.min(v,s);if(!(v<1)){var w,I=((w=f.getModel("title").option)&&w.length&&(w=w[0]),w&&w.text);y=I?h(c("general.withTitle"),{title:I}):c("general.withoutTitle");var C=[];y+=h(c(v>1?"series.multiple.prefix":"series.single.prefix"),{seriesCount:v}),f.eachSeries(function(m,T){if(T<l){var D,O,N=m.get("name"),z="series."+(v>1?"multiple":"single")+".";O=h(O=c(N?z+"withName":z+"withoutName"),{seriesId:m.seriesIndex,seriesName:m.get("name"),seriesType:(D=m.subType,S.series.typeNames[D]||"自定义图")});var H=m.getData();window.data=H,H.count()>b?O+=h(c("data.partialData"),{displayCnt:b}):O+=c("data.allData");for(var $=[],V=0;V<H.count();V++)if(V<b){var P=H.getName(V),U=_(H,V);$.push(h(c(P?"data.withName":"data.withoutName"),{name:P,value:U}))}O+=$.join(c("data.separator.middle"))+c("data.separator.end"),C.push(O)}}),y+=C.join(c("series.multiple.separator.middle"))+c("series.multiple.separator.end"),p.setAttribute("aria-label",y)}}function h(m,T){if(typeof m!="string")return m;var D=m;return o.each(T,function(O,N){D=D.replace(RegExp("\\{\\s*"+N+"\\s*\\}","g"),O)}),D}function c(m){var T=d.get(m);if(T!=null)return T;for(var D=m.split("."),O=S.aria,N=0;N<D.length;++N)O=O[D[N]];return O}}},59448:function(E,A,u){var o=u(23405).createHashMap;E.exports=function(S){return{getTargetSeries:function(_){var p={},f=o();return _.eachSeriesByType(S,function(y){y.__paletteScope=p,f.set(y.uid,y)}),f},reset:function(_,p){var f=_.getRawData(),y={},d=_.getData();d.each(function(v){y[d.getRawIndex(v)]=v}),f.each(function(v){var b=y[v],s=b!=null&&d.getItemVisual(b,"color",!0);if(s)f.setItemVisual(v,"color",s);else{var l=f.getItemModel(v).get("itemStyle.color")||_.getColorFromPalette(f.getName(v)||v+"",_.__paletteScope,f.count());f.setItemVisual(v,"color",l),b!=null&&d.setItemVisual(b,"color",l)}})}}}},35425:function(E,A,u){var o=u(97722);E.exports={createOnAllSeries:!0,performRawSeries:!0,reset:function(S,_){var p=S.getData(),f=(S.visualColorAccessPath||"itemStyle.color").split("."),y=S.get(f)||S.getColorFromPalette(S.name,null,_.getSeriesCount());if(p.setVisual("color",y),!_.isSeriesFiltered(S))return typeof y!="function"||y instanceof o||p.each(function(d){p.setItemVisual(d,"color",y(S.getDataParams(d)))}),{dataEach:p.hasItemOption?function(d,v){var b=d.getItemModel(v).get(f,!0);b!=null&&d.setItemVisual(v,"color",b)}:null}}}},53414:function(E){E.exports=function(A,u,o){return{seriesType:A,performRawSeries:!0,reset:function(S,_,p){var f=S.getData(),y=S.get("symbol")||u,d=S.get("symbolSize"),v=S.get("symbolKeepAspect");if(f.setVisual({legendSymbol:o||y,symbol:y,symbolSize:d,symbolKeepAspect:v}),!_.isSeriesFiltered(S)){var b=typeof d=="function";return{dataEach:f.hasItemOption||b?function(s,l){if(typeof d=="function"){var w=S.getRawValue(l),I=S.getDataParams(l);s.setItemVisual(l,"symbolSize",d(w,I))}if(s.hasItemOption){var C=s.getItemModel(l),h=C.getShallow("symbol",!0),c=C.getShallow("symbolSize",!0),m=C.getShallow("symbolKeepAspect",!0);h!=null&&s.setItemVisual(l,"symbol",h),c!=null&&s.setItemVisual(l,"symbolSize",c),m!=null&&s.setItemVisual(l,"symbolKeepAspect",m)}}:null}}}}}},76047:function(E,A,u){var o=u(23405),S={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}};E.exports={get:function(_,p,f){var y=o.clone((S[_]||{})[p]);return f&&o.isArray(y)?y[y.length-1]:y}}},55925:function(E,A,u){var o=u(23405),S=u(32013),_=o.each;function p(f){if(f){for(var y in f)if(f.hasOwnProperty(y))return!0}}A.createVisualMappings=function(f,y,d){var v={};return _(y,function(b){var s,l=v[b]=((s=function(){}).prototype.__hidden=s.prototype,new s);_(f[b],function(w,I){if(S.isValidType(I)){var C={type:I,visual:w};d&&d(C,b),l[I]=new S(C),I==="opacity"&&((C=o.clone(C)).type="colorAlpha",l.__hidden.__alphaForOpacity=new S(C))}})}),v},A.replaceVisualOption=function(f,y,d){var v;o.each(d,function(b){y.hasOwnProperty(b)&&p(y[b])&&(v=!0)}),v&&o.each(d,function(b){y.hasOwnProperty(b)&&p(y[b])?f[b]=o.clone(y[b]):delete f[b]})},A.applyVisual=function(f,y,d,v,b,s){var l,w={};function I(c){return d.getItemVisual(l,c)}function C(c,m){d.setItemVisual(l,c,m)}function h(c,m){l=s==null?c:m;var T=d.getRawDataItem(l);if(!T||T.visualMap!==!1)for(var D=v.call(b,c),O=y[D],N=w[D],z=0,H=N.length;z<H;z++){var $=N[z];O[$]&&O[$].applyVisual(c,I,C)}}o.each(f,function(c){var m=S.prepareVisualTypes(y[c]);w[c]=m}),s==null?d.each(h):d.each([s],h)},A.incrementalApplyVisual=function(f,y,d,v){var b={};return o.each(f,function(s){var l=S.prepareVisualTypes(y[s]);b[s]=l}),{progress:function(s,l){function w(H){return l.getItemVisual(C,H)}function I(H,$){l.setItemVisual(C,H,$)}for(v!=null&&(v=l.getDimension(v));(C=s.next())!=null;){var C,h=l.getRawDataItem(C);if(!h||h.visualMap!==!1)for(var c=v!=null?l.get(v,C,!0):C,m=d(c),T=y[m],D=b[m],O=0,N=D.length;O<N;O++){var z=D[O];T[z]&&T[z].applyVisual(c,w,I)}}}}}},95670:function(E){var A=Object.prototype.hasOwnProperty,u="~";function o(){}function S(y,d,v){this.fn=y,this.context=d,this.once=v||!1}function _(y,d,v,b,s){if(typeof v!="function")throw TypeError("The listener must be a function");var l=new S(v,b||y,s),w=u?u+d:d;return y._events[w]?y._events[w].fn?y._events[w]=[y._events[w],l]:y._events[w].push(l):(y._events[w]=l,y._eventsCount++),y}function p(y,d){--y._eventsCount==0?y._events=new o:delete y._events[d]}function f(){this._events=new o,this._eventsCount=0}Object.create&&(o.prototype=Object.create(null),new o().__proto__||(u=!1)),f.prototype.eventNames=function(){var y,d,v=[];if(this._eventsCount===0)return v;for(d in y=this._events)A.call(y,d)&&v.push(u?d.slice(1):d);return Object.getOwnPropertySymbols?v.concat(Object.getOwnPropertySymbols(y)):v},f.prototype.listeners=function(y){var d=u?u+y:y,v=this._events[d];if(!v)return[];if(v.fn)return[v.fn];for(var b=0,s=v.length,l=Array(s);b<s;b++)l[b]=v[b].fn;return l},f.prototype.listenerCount=function(y){var d=u?u+y:y,v=this._events[d];return v?v.fn?1:v.length:0},f.prototype.emit=function(y,d,v,b,s,l){var w=u?u+y:y;if(!this._events[w])return!1;var I,C,h=this._events[w],c=arguments.length;if(h.fn){switch(h.once&&this.removeListener(y,h.fn,void 0,!0),c){case 1:return h.fn.call(h.context),!0;case 2:return h.fn.call(h.context,d),!0;case 3:return h.fn.call(h.context,d,v),!0;case 4:return h.fn.call(h.context,d,v,b),!0;case 5:return h.fn.call(h.context,d,v,b,s),!0;case 6:return h.fn.call(h.context,d,v,b,s,l),!0}for(C=1,I=Array(c-1);C<c;C++)I[C-1]=arguments[C];h.fn.apply(h.context,I)}else{var m,T=h.length;for(C=0;C<T;C++)switch(h[C].once&&this.removeListener(y,h[C].fn,void 0,!0),c){case 1:h[C].fn.call(h[C].context);break;case 2:h[C].fn.call(h[C].context,d);break;case 3:h[C].fn.call(h[C].context,d,v);break;case 4:h[C].fn.call(h[C].context,d,v,b);break;default:if(!I)for(m=1,I=Array(c-1);m<c;m++)I[m-1]=arguments[m];h[C].fn.apply(h[C].context,I)}}return!0},f.prototype.on=function(y,d,v){return _(this,y,d,v,!1)},f.prototype.once=function(y,d,v){return _(this,y,d,v,!0)},f.prototype.removeListener=function(y,d,v,b){var s=u?u+y:y;if(!this._events[s])return this;if(!d)return p(this,s),this;var l=this._events[s];if(l.fn)l.fn!==d||b&&!l.once||v&&l.context!==v||p(this,s);else{for(var w=0,I=[],C=l.length;w<C;w++)(l[w].fn!==d||b&&!l[w].once||v&&l[w].context!==v)&&I.push(l[w]);I.length?this._events[s]=I.length===1?I[0]:I:p(this,s)}return this},f.prototype.removeAllListeners=function(y){var d;return y?(d=u?u+y:y,this._events[d]&&p(this,d)):(this._events=new o,this._eventsCount=0),this},f.prototype.off=f.prototype.removeListener,f.prototype.addListener=f.prototype.on,f.prefixed=u,f.EventEmitter=f,E.exports=f},23395:function(E){E.exports&&(E.exports=function(){function A(o,S){S===void 0&&(S=0);var _=o.charCodeAt(S);if(55296<=_&&_<=56319&&S<o.length-1){var p=_,f=o.charCodeAt(S+1);return 56320<=f&&f<=57343?(p-55296)*1024+(f-56320)+65536:p}if(56320<=_&&_<=57343&&S>=1){var p=o.charCodeAt(S-1),f=_;return 55296<=p&&p<=56319?(p-55296)*1024+(f-56320)+65536:f}return _}function u(o){return 1536<=o&&o<=1541||o==1757||o==1807||o==2274||o==3406||o==69821||70082<=o&&o<=70083||o==72250||72326<=o&&o<=72329||o==73030?12:o==13?0:o==10?1:0<=o&&o<=9||11<=o&&o<=12||14<=o&&o<=31||127<=o&&o<=159||o==173||o==1564||o==6158||o==8203||8206<=o&&o<=8207||o==8232||o==8233||8234<=o&&o<=8238||8288<=o&&o<=8292||o==8293||8294<=o&&o<=8303||55296<=o&&o<=57343||o==65279||65520<=o&&o<=65528||65529<=o&&o<=65531||113824<=o&&o<=113827||119155<=o&&o<=119162||o==917504||o==917505||917506<=o&&o<=917535||917632<=o&&o<=917759||918e3<=o&&o<=921599?2:768<=o&&o<=879||1155<=o&&o<=1159||1160<=o&&o<=1161||1425<=o&&o<=1469||o==1471||1473<=o&&o<=1474||1476<=o&&o<=1477||o==1479||1552<=o&&o<=1562||1611<=o&&o<=1631||o==1648||1750<=o&&o<=1756||1759<=o&&o<=1764||1767<=o&&o<=1768||1770<=o&&o<=1773||o==1809||1840<=o&&o<=1866||1958<=o&&o<=1968||2027<=o&&o<=2035||2070<=o&&o<=2073||2075<=o&&o<=2083||2085<=o&&o<=2087||2089<=o&&o<=2093||2137<=o&&o<=2139||2260<=o&&o<=2273||2275<=o&&o<=2306||o==2362||o==2364||2369<=o&&o<=2376||o==2381||2385<=o&&o<=2391||2402<=o&&o<=2403||o==2433||o==2492||o==2494||2497<=o&&o<=2500||o==2509||o==2519||2530<=o&&o<=2531||2561<=o&&o<=2562||o==2620||2625<=o&&o<=2626||2631<=o&&o<=2632||2635<=o&&o<=2637||o==2641||2672<=o&&o<=2673||o==2677||2689<=o&&o<=2690||o==2748||2753<=o&&o<=2757||2759<=o&&o<=2760||o==2765||2786<=o&&o<=2787||2810<=o&&o<=2815||o==2817||o==2876||o==2878||o==2879||2881<=o&&o<=2884||o==2893||o==2902||o==2903||2914<=o&&o<=2915||o==2946||o==3006||o==3008||o==3021||o==3031||o==3072||3134<=o&&o<=3136||3142<=o&&o<=3144||3146<=o&&o<=3149||3157<=o&&o<=3158||3170<=o&&o<=3171||o==3201||o==3260||o==3263||o==3266||o==3270||3276<=o&&o<=3277||3285<=o&&o<=3286||3298<=o&&o<=3299||3328<=o&&o<=3329||3387<=o&&o<=3388||o==3390||3393<=o&&o<=3396||o==3405||o==3415||3426<=o&&o<=3427||o==3530||o==3535||3538<=o&&o<=3540||o==3542||o==3551||o==3633||3636<=o&&o<=3642||3655<=o&&o<=3662||o==3761||3764<=o&&o<=3769||3771<=o&&o<=3772||3784<=o&&o<=3789||3864<=o&&o<=3865||o==3893||o==3895||o==3897||3953<=o&&o<=3966||3968<=o&&o<=3972||3974<=o&&o<=3975||3981<=o&&o<=3991||3993<=o&&o<=4028||o==4038||4141<=o&&o<=4144||4146<=o&&o<=4151||4153<=o&&o<=4154||4157<=o&&o<=4158||4184<=o&&o<=4185||4190<=o&&o<=4192||4209<=o&&o<=4212||o==4226||4229<=o&&o<=4230||o==4237||o==4253||4957<=o&&o<=4959||5906<=o&&o<=5908||5938<=o&&o<=5940||5970<=o&&o<=5971||6002<=o&&o<=6003||6068<=o&&o<=6069||6071<=o&&o<=6077||o==6086||6089<=o&&o<=6099||o==6109||6155<=o&&o<=6157||6277<=o&&o<=6278||o==6313||6432<=o&&o<=6434||6439<=o&&o<=6440||o==6450||6457<=o&&o<=6459||6679<=o&&o<=6680||o==6683||o==6742||6744<=o&&o<=6750||o==6752||o==6754||6757<=o&&o<=6764||6771<=o&&o<=6780||o==6783||6832<=o&&o<=6845||o==6846||6912<=o&&o<=6915||o==6964||6966<=o&&o<=6970||o==6972||o==6978||7019<=o&&o<=7027||7040<=o&&o<=7041||7074<=o&&o<=7077||7080<=o&&o<=7081||7083<=o&&o<=7085||o==7142||7144<=o&&o<=7145||o==7149||7151<=o&&o<=7153||7212<=o&&o<=7219||7222<=o&&o<=7223||7376<=o&&o<=7378||7380<=o&&o<=7392||7394<=o&&o<=7400||o==7405||o==7412||7416<=o&&o<=7417||7616<=o&&o<=7673||7675<=o&&o<=7679||o==8204||8400<=o&&o<=8412||8413<=o&&o<=8416||o==8417||8418<=o&&o<=8420||8421<=o&&o<=8432||11503<=o&&o<=11505||o==11647||11744<=o&&o<=11775||12330<=o&&o<=12333||12334<=o&&o<=12335||12441<=o&&o<=12442||o==42607||42608<=o&&o<=42610||42612<=o&&o<=42621||42654<=o&&o<=42655||42736<=o&&o<=42737||o==43010||o==43014||o==43019||43045<=o&&o<=43046||43204<=o&&o<=43205||43232<=o&&o<=43249||43302<=o&&o<=43309||43335<=o&&o<=43345||43392<=o&&o<=43394||o==43443||43446<=o&&o<=43449||o==43452||o==43493||43561<=o&&o<=43566||43569<=o&&o<=43570||43573<=o&&o<=43574||o==43587||o==43596||o==43644||o==43696||43698<=o&&o<=43700||43703<=o&&o<=43704||43710<=o&&o<=43711||o==43713||43756<=o&&o<=43757||o==43766||o==44005||o==44008||o==44013||o==64286||65024<=o&&o<=65039||65056<=o&&o<=65071||65438<=o&&o<=65439||o==66045||o==66272||66422<=o&&o<=66426||68097<=o&&o<=68099||68101<=o&&o<=68102||68108<=o&&o<=68111||68152<=o&&o<=68154||o==68159||68325<=o&&o<=68326||o==69633||69688<=o&&o<=69702||69759<=o&&o<=69761||69811<=o&&o<=69814||69817<=o&&o<=69818||69888<=o&&o<=69890||69927<=o&&o<=69931||69933<=o&&o<=69940||o==70003||70016<=o&&o<=70017||70070<=o&&o<=70078||70090<=o&&o<=70092||70191<=o&&o<=70193||o==70196||70198<=o&&o<=70199||o==70206||o==70367||70371<=o&&o<=70378||70400<=o&&o<=70401||o==70460||o==70462||o==70464||o==70487||70502<=o&&o<=70508||70512<=o&&o<=70516||70712<=o&&o<=70719||70722<=o&&o<=70724||o==70726||o==70832||70835<=o&&o<=70840||o==70842||o==70845||70847<=o&&o<=70848||70850<=o&&o<=70851||o==71087||71090<=o&&o<=71093||71100<=o&&o<=71101||71103<=o&&o<=71104||71132<=o&&o<=71133||71219<=o&&o<=71226||o==71229||71231<=o&&o<=71232||o==71339||o==71341||71344<=o&&o<=71349||o==71351||71453<=o&&o<=71455||71458<=o&&o<=71461||71463<=o&&o<=71467||72193<=o&&o<=72198||72201<=o&&o<=72202||72243<=o&&o<=72248||72251<=o&&o<=72254||o==72263||72273<=o&&o<=72278||72281<=o&&o<=72283||72330<=o&&o<=72342||72344<=o&&o<=72345||72752<=o&&o<=72758||72760<=o&&o<=72765||o==72767||72850<=o&&o<=72871||72874<=o&&o<=72880||72882<=o&&o<=72883||72885<=o&&o<=72886||73009<=o&&o<=73014||o==73018||73020<=o&&o<=73021||73023<=o&&o<=73029||o==73031||92912<=o&&o<=92916||92976<=o&&o<=92982||94095<=o&&o<=94098||113821<=o&&o<=113822||o==119141||119143<=o&&o<=119145||119150<=o&&o<=119154||119163<=o&&o<=119170||119173<=o&&o<=119179||119210<=o&&o<=119213||119362<=o&&o<=119364||121344<=o&&o<=121398||121403<=o&&o<=121452||o==121461||o==121476||121499<=o&&o<=121503||121505<=o&&o<=121519||122880<=o&&o<=122886||122888<=o&&o<=122904||122907<=o&&o<=122913||122915<=o&&o<=122916||122918<=o&&o<=122922||125136<=o&&o<=125142||125252<=o&&o<=125258||917536<=o&&o<=917631||917760<=o&&o<=917999?3:127462<=o&&o<=127487?4:o==2307||o==2363||2366<=o&&o<=2368||2377<=o&&o<=2380||2382<=o&&o<=2383||2434<=o&&o<=2435||2495<=o&&o<=2496||2503<=o&&o<=2504||2507<=o&&o<=2508||o==2563||2622<=o&&o<=2624||o==2691||2750<=o&&o<=2752||o==2761||2763<=o&&o<=2764||2818<=o&&o<=2819||o==2880||2887<=o&&o<=2888||2891<=o&&o<=2892||o==3007||3009<=o&&o<=3010||3014<=o&&o<=3016||3018<=o&&o<=3020||3073<=o&&o<=3075||3137<=o&&o<=3140||3202<=o&&o<=3203||o==3262||3264<=o&&o<=3265||3267<=o&&o<=3268||3271<=o&&o<=3272||3274<=o&&o<=3275||3330<=o&&o<=3331||3391<=o&&o<=3392||3398<=o&&o<=3400||3402<=o&&o<=3404||3458<=o&&o<=3459||3536<=o&&o<=3537||3544<=o&&o<=3550||3570<=o&&o<=3571||o==3635||o==3763||3902<=o&&o<=3903||o==3967||o==4145||4155<=o&&o<=4156||4182<=o&&o<=4183||o==4228||o==6070||6078<=o&&o<=6085||6087<=o&&o<=6088||6435<=o&&o<=6438||6441<=o&&o<=6443||6448<=o&&o<=6449||6451<=o&&o<=6456||6681<=o&&o<=6682||o==6741||o==6743||6765<=o&&o<=6770||o==6916||o==6965||o==6971||6973<=o&&o<=6977||6979<=o&&o<=6980||o==7042||o==7073||7078<=o&&o<=7079||o==7082||o==7143||7146<=o&&o<=7148||o==7150||7154<=o&&o<=7155||7204<=o&&o<=7211||7220<=o&&o<=7221||o==7393||7410<=o&&o<=7411||o==7415||43043<=o&&o<=43044||o==43047||43136<=o&&o<=43137||43188<=o&&o<=43203||43346<=o&&o<=43347||o==43395||43444<=o&&o<=43445||43450<=o&&o<=43451||43453<=o&&o<=43456||43567<=o&&o<=43568||43571<=o&&o<=43572||o==43597||o==43755||43758<=o&&o<=43759||o==43765||44003<=o&&o<=44004||44006<=o&&o<=44007||44009<=o&&o<=44010||o==44012||o==69632||o==69634||o==69762||69808<=o&&o<=69810||69815<=o&&o<=69816||o==69932||o==70018||70067<=o&&o<=70069||70079<=o&&o<=70080||70188<=o&&o<=70190||70194<=o&&o<=70195||o==70197||70368<=o&&o<=70370||70402<=o&&o<=70403||o==70463||70465<=o&&o<=70468||70471<=o&&o<=70472||70475<=o&&o<=70477||70498<=o&&o<=70499||70709<=o&&o<=70711||70720<=o&&o<=70721||o==70725||70833<=o&&o<=70834||o==70841||70843<=o&&o<=70844||o==70846||o==70849||71088<=o&&o<=71089||71096<=o&&o<=71099||o==71102||71216<=o&&o<=71218||71227<=o&&o<=71228||o==71230||o==71340||71342<=o&&o<=71343||o==71350||71456<=o&&o<=71457||o==71462||72199<=o&&o<=72200||o==72249||72279<=o&&o<=72280||o==72343||o==72751||o==72766||o==72873||o==72881||o==72884||94033<=o&&o<=94078||o==119142||o==119149?5:4352<=o&&o<=4447||43360<=o&&o<=43388?6:4448<=o&&o<=4519||55216<=o&&o<=55238?7:4520<=o&&o<=4607||55243<=o&&o<=55291?8:o==44032||o==44060||o==44088||o==44116||o==44144||o==44172||o==44200||o==44228||o==44256||o==44284||o==44312||o==44340||o==44368||o==44396||o==44424||o==44452||o==44480||o==44508||o==44536||o==44564||o==44592||o==44620||o==44648||o==44676||o==44704||o==44732||o==44760||o==44788||o==44816||o==44844||o==44872||o==44900||o==44928||o==44956||o==44984||o==45012||o==45040||o==45068||o==45096||o==45124||o==45152||o==45180||o==45208||o==45236||o==45264||o==45292||o==45320||o==45348||o==45376||o==45404||o==45432||o==45460||o==45488||o==45516||o==45544||o==45572||o==45600||o==45628||o==45656||o==45684||o==45712||o==45740||o==45768||o==45796||o==45824||o==45852||o==45880||o==45908||o==45936||o==45964||o==45992||o==46020||o==46048||o==46076||o==46104||o==46132||o==46160||o==46188||o==46216||o==46244||o==46272||o==46300||o==46328||o==46356||o==46384||o==46412||o==46440||o==46468||o==46496||o==46524||o==46552||o==46580||o==46608||o==46636||o==46664||o==46692||o==46720||o==46748||o==46776||o==46804||o==46832||o==46860||o==46888||o==46916||o==46944||o==46972||o==47e3||o==47028||o==47056||o==47084||o==47112||o==47140||o==47168||o==47196||o==47224||o==47252||o==47280||o==47308||o==47336||o==47364||o==47392||o==47420||o==47448||o==47476||o==47504||o==47532||o==47560||o==47588||o==47616||o==47644||o==47672||o==47700||o==47728||o==47756||o==47784||o==47812||o==47840||o==47868||o==47896||o==47924||o==47952||o==47980||o==48008||o==48036||o==48064||o==48092||o==48120||o==48148||o==48176||o==48204||o==48232||o==48260||o==48288||o==48316||o==48344||o==48372||o==48400||o==48428||o==48456||o==48484||o==48512||o==48540||o==48568||o==48596||o==48624||o==48652||o==48680||o==48708||o==48736||o==48764||o==48792||o==48820||o==48848||o==48876||o==48904||o==48932||o==48960||o==48988||o==49016||o==49044||o==49072||o==49100||o==49128||o==49156||o==49184||o==49212||o==49240||o==49268||o==49296||o==49324||o==49352||o==49380||o==49408||o==49436||o==49464||o==49492||o==49520||o==49548||o==49576||o==49604||o==49632||o==49660||o==49688||o==49716||o==49744||o==49772||o==49800||o==49828||o==49856||o==49884||o==49912||o==49940||o==49968||o==49996||o==50024||o==50052||o==50080||o==50108||o==50136||o==50164||o==50192||o==50220||o==50248||o==50276||o==50304||o==50332||o==50360||o==50388||o==50416||o==50444||o==50472||o==50500||o==50528||o==50556||o==50584||o==50612||o==50640||o==50668||o==50696||o==50724||o==50752||o==50780||o==50808||o==50836||o==50864||o==50892||o==50920||o==50948||o==50976||o==51004||o==51032||o==51060||o==51088||o==51116||o==51144||o==51172||o==51200||o==51228||o==51256||o==51284||o==51312||o==51340||o==51368||o==51396||o==51424||o==51452||o==51480||o==51508||o==51536||o==51564||o==51592||o==51620||o==51648||o==51676||o==51704||o==51732||o==51760||o==51788||o==51816||o==51844||o==51872||o==51900||o==51928||o==51956||o==51984||o==52012||o==52040||o==52068||o==52096||o==52124||o==52152||o==52180||o==52208||o==52236||o==52264||o==52292||o==52320||o==52348||o==52376||o==52404||o==52432||o==52460||o==52488||o==52516||o==52544||o==52572||o==52600||o==52628||o==52656||o==52684||o==52712||o==52740||o==52768||o==52796||o==52824||o==52852||o==52880||o==52908||o==52936||o==52964||o==52992||o==53020||o==53048||o==53076||o==53104||o==53132||o==53160||o==53188||o==53216||o==53244||o==53272||o==53300||o==53328||o==53356||o==53384||o==53412||o==53440||o==53468||o==53496||o==53524||o==53552||o==53580||o==53608||o==53636||o==53664||o==53692||o==53720||o==53748||o==53776||o==53804||o==53832||o==53860||o==53888||o==53916||o==53944||o==53972||o==54e3||o==54028||o==54056||o==54084||o==54112||o==54140||o==54168||o==54196||o==54224||o==54252||o==54280||o==54308||o==54336||o==54364||o==54392||o==54420||o==54448||o==54476||o==54504||o==54532||o==54560||o==54588||o==54616||o==54644||o==54672||o==54700||o==54728||o==54756||o==54784||o==54812||o==54840||o==54868||o==54896||o==54924||o==54952||o==54980||o==55008||o==55036||o==55064||o==55092||o==55120||o==55148||o==55176?9:44033<=o&&o<=44059||44061<=o&&o<=44087||44089<=o&&o<=44115||44117<=o&&o<=44143||44145<=o&&o<=44171||44173<=o&&o<=44199||44201<=o&&o<=44227||44229<=o&&o<=44255||44257<=o&&o<=44283||44285<=o&&o<=44311||44313<=o&&o<=44339||44341<=o&&o<=44367||44369<=o&&o<=44395||44397<=o&&o<=44423||44425<=o&&o<=44451||44453<=o&&o<=44479||44481<=o&&o<=44507||44509<=o&&o<=44535||44537<=o&&o<=44563||44565<=o&&o<=44591||44593<=o&&o<=44619||44621<=o&&o<=44647||44649<=o&&o<=44675||44677<=o&&o<=44703||44705<=o&&o<=44731||44733<=o&&o<=44759||44761<=o&&o<=44787||44789<=o&&o<=44815||44817<=o&&o<=44843||44845<=o&&o<=44871||44873<=o&&o<=44899||44901<=o&&o<=44927||44929<=o&&o<=44955||44957<=o&&o<=44983||44985<=o&&o<=45011||45013<=o&&o<=45039||45041<=o&&o<=45067||45069<=o&&o<=45095||45097<=o&&o<=45123||45125<=o&&o<=45151||45153<=o&&o<=45179||45181<=o&&o<=45207||45209<=o&&o<=45235||45237<=o&&o<=45263||45265<=o&&o<=45291||45293<=o&&o<=45319||45321<=o&&o<=45347||45349<=o&&o<=45375||45377<=o&&o<=45403||45405<=o&&o<=45431||45433<=o&&o<=45459||45461<=o&&o<=45487||45489<=o&&o<=45515||45517<=o&&o<=45543||45545<=o&&o<=45571||45573<=o&&o<=45599||45601<=o&&o<=45627||45629<=o&&o<=45655||45657<=o&&o<=45683||45685<=o&&o<=45711||45713<=o&&o<=45739||45741<=o&&o<=45767||45769<=o&&o<=45795||45797<=o&&o<=45823||45825<=o&&o<=45851||45853<=o&&o<=45879||45881<=o&&o<=45907||45909<=o&&o<=45935||45937<=o&&o<=45963||45965<=o&&o<=45991||45993<=o&&o<=46019||46021<=o&&o<=46047||46049<=o&&o<=46075||46077<=o&&o<=46103||46105<=o&&o<=46131||46133<=o&&o<=46159||46161<=o&&o<=46187||46189<=o&&o<=46215||46217<=o&&o<=46243||46245<=o&&o<=46271||46273<=o&&o<=46299||46301<=o&&o<=46327||46329<=o&&o<=46355||46357<=o&&o<=46383||46385<=o&&o<=46411||46413<=o&&o<=46439||46441<=o&&o<=46467||46469<=o&&o<=46495||46497<=o&&o<=46523||46525<=o&&o<=46551||46553<=o&&o<=46579||46581<=o&&o<=46607||46609<=o&&o<=46635||46637<=o&&o<=46663||46665<=o&&o<=46691||46693<=o&&o<=46719||46721<=o&&o<=46747||46749<=o&&o<=46775||46777<=o&&o<=46803||46805<=o&&o<=46831||46833<=o&&o<=46859||46861<=o&&o<=46887||46889<=o&&o<=46915||46917<=o&&o<=46943||46945<=o&&o<=46971||46973<=o&&o<=46999||47001<=o&&o<=47027||47029<=o&&o<=47055||47057<=o&&o<=47083||47085<=o&&o<=47111||47113<=o&&o<=47139||47141<=o&&o<=47167||47169<=o&&o<=47195||47197<=o&&o<=47223||47225<=o&&o<=47251||47253<=o&&o<=47279||47281<=o&&o<=47307||47309<=o&&o<=47335||47337<=o&&o<=47363||47365<=o&&o<=47391||47393<=o&&o<=47419||47421<=o&&o<=47447||47449<=o&&o<=47475||47477<=o&&o<=47503||47505<=o&&o<=47531||47533<=o&&o<=47559||47561<=o&&o<=47587||47589<=o&&o<=47615||47617<=o&&o<=47643||47645<=o&&o<=47671||47673<=o&&o<=47699||47701<=o&&o<=47727||47729<=o&&o<=47755||47757<=o&&o<=47783||47785<=o&&o<=47811||47813<=o&&o<=47839||47841<=o&&o<=47867||47869<=o&&o<=47895||47897<=o&&o<=47923||47925<=o&&o<=47951||47953<=o&&o<=47979||47981<=o&&o<=48007||48009<=o&&o<=48035||48037<=o&&o<=48063||48065<=o&&o<=48091||48093<=o&&o<=48119||48121<=o&&o<=48147||48149<=o&&o<=48175||48177<=o&&o<=48203||48205<=o&&o<=48231||48233<=o&&o<=48259||48261<=o&&o<=48287||48289<=o&&o<=48315||48317<=o&&o<=48343||48345<=o&&o<=48371||48373<=o&&o<=48399||48401<=o&&o<=48427||48429<=o&&o<=48455||48457<=o&&o<=48483||48485<=o&&o<=48511||48513<=o&&o<=48539||48541<=o&&o<=48567||48569<=o&&o<=48595||48597<=o&&o<=48623||48625<=o&&o<=48651||48653<=o&&o<=48679||48681<=o&&o<=48707||48709<=o&&o<=48735||48737<=o&&o<=48763||48765<=o&&o<=48791||48793<=o&&o<=48819||48821<=o&&o<=48847||48849<=o&&o<=48875||48877<=o&&o<=48903||48905<=o&&o<=48931||48933<=o&&o<=48959||48961<=o&&o<=48987||48989<=o&&o<=49015||49017<=o&&o<=49043||49045<=o&&o<=49071||49073<=o&&o<=49099||49101<=o&&o<=49127||49129<=o&&o<=49155||49157<=o&&o<=49183||49185<=o&&o<=49211||49213<=o&&o<=49239||49241<=o&&o<=49267||49269<=o&&o<=49295||49297<=o&&o<=49323||49325<=o&&o<=49351||49353<=o&&o<=49379||49381<=o&&o<=49407||49409<=o&&o<=49435||49437<=o&&o<=49463||49465<=o&&o<=49491||49493<=o&&o<=49519||49521<=o&&o<=49547||49549<=o&&o<=49575||49577<=o&&o<=49603||49605<=o&&o<=49631||49633<=o&&o<=49659||49661<=o&&o<=49687||49689<=o&&o<=49715||49717<=o&&o<=49743||49745<=o&&o<=49771||49773<=o&&o<=49799||49801<=o&&o<=49827||49829<=o&&o<=49855||49857<=o&&o<=49883||49885<=o&&o<=49911||49913<=o&&o<=49939||49941<=o&&o<=49967||49969<=o&&o<=49995||49997<=o&&o<=50023||50025<=o&&o<=50051||50053<=o&&o<=50079||50081<=o&&o<=50107||50109<=o&&o<=50135||50137<=o&&o<=50163||50165<=o&&o<=50191||50193<=o&&o<=50219||50221<=o&&o<=50247||50249<=o&&o<=50275||50277<=o&&o<=50303||50305<=o&&o<=50331||50333<=o&&o<=50359||50361<=o&&o<=50387||50389<=o&&o<=50415||50417<=o&&o<=50443||50445<=o&&o<=50471||50473<=o&&o<=50499||50501<=o&&o<=50527||50529<=o&&o<=50555||50557<=o&&o<=50583||50585<=o&&o<=50611||50613<=o&&o<=50639||50641<=o&&o<=50667||50669<=o&&o<=50695||50697<=o&&o<=50723||50725<=o&&o<=50751||50753<=o&&o<=50779||50781<=o&&o<=50807||50809<=o&&o<=50835||50837<=o&&o<=50863||50865<=o&&o<=50891||50893<=o&&o<=50919||50921<=o&&o<=50947||50949<=o&&o<=50975||50977<=o&&o<=51003||51005<=o&&o<=51031||51033<=o&&o<=51059||51061<=o&&o<=51087||51089<=o&&o<=51115||51117<=o&&o<=51143||51145<=o&&o<=51171||51173<=o&&o<=51199||51201<=o&&o<=51227||51229<=o&&o<=51255||51257<=o&&o<=51283||51285<=o&&o<=51311||51313<=o&&o<=51339||51341<=o&&o<=51367||51369<=o&&o<=51395||51397<=o&&o<=51423||51425<=o&&o<=51451||51453<=o&&o<=51479||51481<=o&&o<=51507||51509<=o&&o<=51535||51537<=o&&o<=51563||51565<=o&&o<=51591||51593<=o&&o<=51619||51621<=o&&o<=51647||51649<=o&&o<=51675||51677<=o&&o<=51703||51705<=o&&o<=51731||51733<=o&&o<=51759||51761<=o&&o<=51787||51789<=o&&o<=51815||51817<=o&&o<=51843||51845<=o&&o<=51871||51873<=o&&o<=51899||51901<=o&&o<=51927||51929<=o&&o<=51955||51957<=o&&o<=51983||51985<=o&&o<=52011||52013<=o&&o<=52039||52041<=o&&o<=52067||52069<=o&&o<=52095||52097<=o&&o<=52123||52125<=o&&o<=52151||52153<=o&&o<=52179||52181<=o&&o<=52207||52209<=o&&o<=52235||52237<=o&&o<=52263||52265<=o&&o<=52291||52293<=o&&o<=52319||52321<=o&&o<=52347||52349<=o&&o<=52375||52377<=o&&o<=52403||52405<=o&&o<=52431||52433<=o&&o<=52459||52461<=o&&o<=52487||52489<=o&&o<=52515||52517<=o&&o<=52543||52545<=o&&o<=52571||52573<=o&&o<=52599||52601<=o&&o<=52627||52629<=o&&o<=52655||52657<=o&&o<=52683||52685<=o&&o<=52711||52713<=o&&o<=52739||52741<=o&&o<=52767||52769<=o&&o<=52795||52797<=o&&o<=52823||52825<=o&&o<=52851||52853<=o&&o<=52879||52881<=o&&o<=52907||52909<=o&&o<=52935||52937<=o&&o<=52963||52965<=o&&o<=52991||52993<=o&&o<=53019||53021<=o&&o<=53047||53049<=o&&o<=53075||53077<=o&&o<=53103||53105<=o&&o<=53131||53133<=o&&o<=53159||53161<=o&&o<=53187||53189<=o&&o<=53215||53217<=o&&o<=53243||53245<=o&&o<=53271||53273<=o&&o<=53299||53301<=o&&o<=53327||53329<=o&&o<=53355||53357<=o&&o<=53383||53385<=o&&o<=53411||53413<=o&&o<=53439||53441<=o&&o<=53467||53469<=o&&o<=53495||53497<=o&&o<=53523||53525<=o&&o<=53551||53553<=o&&o<=53579||53581<=o&&o<=53607||53609<=o&&o<=53635||53637<=o&&o<=53663||53665<=o&&o<=53691||53693<=o&&o<=53719||53721<=o&&o<=53747||53749<=o&&o<=53775||53777<=o&&o<=53803||53805<=o&&o<=53831||53833<=o&&o<=53859||53861<=o&&o<=53887||53889<=o&&o<=53915||53917<=o&&o<=53943||53945<=o&&o<=53971||53973<=o&&o<=53999||54001<=o&&o<=54027||54029<=o&&o<=54055||54057<=o&&o<=54083||54085<=o&&o<=54111||54113<=o&&o<=54139||54141<=o&&o<=54167||54169<=o&&o<=54195||54197<=o&&o<=54223||54225<=o&&o<=54251||54253<=o&&o<=54279||54281<=o&&o<=54307||54309<=o&&o<=54335||54337<=o&&o<=54363||54365<=o&&o<=54391||54393<=o&&o<=54419||54421<=o&&o<=54447||54449<=o&&o<=54475||54477<=o&&o<=54503||54505<=o&&o<=54531||54533<=o&&o<=54559||54561<=o&&o<=54587||54589<=o&&o<=54615||54617<=o&&o<=54643||54645<=o&&o<=54671||54673<=o&&o<=54699||54701<=o&&o<=54727||54729<=o&&o<=54755||54757<=o&&o<=54783||54785<=o&&o<=54811||54813<=o&&o<=54839||54841<=o&&o<=54867||54869<=o&&o<=54895||54897<=o&&o<=54923||54925<=o&&o<=54951||54953<=o&&o<=54979||54981<=o&&o<=55007||55009<=o&&o<=55035||55037<=o&&o<=55063||55065<=o&&o<=55091||55093<=o&&o<=55119||55121<=o&&o<=55147||55149<=o&&o<=55175||55177<=o&&o<=55203?10:o==9757||o==9977||9994<=o&&o<=9997||o==127877||127938<=o&&o<=127940||o==127943||127946<=o&&o<=127948||128066<=o&&o<=128067||128070<=o&&o<=128080||o==128110||128112<=o&&o<=128120||o==128124||128129<=o&&o<=128131||128133<=o&&o<=128135||o==128170||128372<=o&&o<=128373||o==128378||o==128400||128405<=o&&o<=128406||128581<=o&&o<=128583||128587<=o&&o<=128591||o==128675||128692<=o&&o<=128694||o==128704||o==128716||129304<=o&&o<=129308||129310<=o&&o<=129311||o==129318||129328<=o&&o<=129337||129341<=o&&o<=129342||129489<=o&&o<=129501?13:127995<=o&&o<=127999?14:o==8205?15:o==9792||o==9794||9877<=o&&o<=9878||o==9992||o==10084||o==127752||o==127806||o==127859||o==127891||o==127908||o==127912||o==127979||o==127981||o==128139||128187<=o&&o<=128188||o==128295||o==128300||o==128488||o==128640||o==128658?16:128102<=o&&o<=128105?17:11}return this.nextBreak=function(o,S){if(S===void 0&&(S=0),S<0)return 0;if(S>=o.length-1)return o.length;for(var _,p=u(A(o,S)),f=[],y=S+1;y<o.length;y++)if(_=y-1,!(55296<=o.charCodeAt(_)&&56319>=o.charCodeAt(_)&&56320<=o.charCodeAt(_+1)&&57343>=o.charCodeAt(_+1))){var d=u(A(o,y));if(function(v,b,s){var l=[v].concat(b).concat([s]),w=l[l.length-2],I=l.lastIndexOf(14);if(I>1&&l.slice(1,I).every(function(c){return c==3})&&[3,13,17].indexOf(v)==-1)return 2;var C=l.lastIndexOf(4);if(C>0&&l.slice(1,C).every(function(c){return c==4})&&[12,4].indexOf(w)==-1)return l.filter(function(c){return c==4}).length%2==1?3:4;if(w==0&&s==1)return 0;if(w==2||w==0||w==1)return s==14&&b.every(function(c){return c==3})?2:1;if(s==2||s==0||s==1)return 1;if(w==6&&(s==6||s==7||s==9||s==10)||(w==9||w==7)&&(s==7||s==8))return 0;if((w==10||w==8)&&s==8)return 0;if(s==3||s==15)return 0;if(s==5)return 0;if(w==12)return 0;var h=l.indexOf(3)!=-1?l.lastIndexOf(3)-1:l.length-2;return[13,17].indexOf(l[h])!=-1&&l.slice(h+1,-1).every(function(c){return c==3})&&s==14||w==15&&[16,17].indexOf(s)!=-1?0:b.indexOf(4)!=-1?2:+(w!=4||s!=4)}(p,f,d))return y;f.push(d)}return o.length},this.splitGraphemes=function(o){for(var S,_=[],p=0;(S=this.nextBreak(o,p))<o.length;)_.push(o.slice(p,S)),p=S;return p<o.length&&_.push(o.slice(p)),_},this.iterateGraphemes=function(o){var S=0,_={next:(function(){var p,f;return(f=this.nextBreak(o,S))<o.length?(p=o.slice(S,f),S=f,{value:p,done:!1}):S<o.length?(p=o.slice(S),S=o.length,{value:p,done:!1}):{value:void 0,done:!0}}).bind(this)};return typeof Symbol<"u"&&Symbol.iterator&&(_[Symbol.iterator]=function(){return _}),_},this.countGraphemes=function(o){for(var S,_=0,p=0;(S=this.nextBreak(o,p))<o.length;)p=S,_++;return p<o.length&&_++,_},this})},67199:function(E){E.exports=function(A){return!!A&&typeof A!="string"&&(A instanceof Array||Array.isArray(A)||A.length>=0&&(A.splice instanceof Function||Object.getOwnPropertyDescriptor(A,A.length-1)&&A.constructor.name!=="String"))}},35085:function(E){E.exports=function(){var A=function(h,c){var m=Array.prototype.concat,T=Array.prototype.slice,D=Object.prototype.toString;function O(ie,ne){var le=ie>ne?ie:ne;return h.pow(10,17-~~(h.log(le>0?le:-le)*h.LOG10E))}var N=Array.isArray||function(ie){return D.call(ie)==="[object Array]"};function z(ie){return D.call(ie)==="[object Function]"}function H(ie){return typeof ie=="number"&&ie-ie==0}function $(){return new $._init(arguments)}function V(){return 0}function P(){return 1}function U(ie,ne){return+(ie===ne)}$.fn=$.prototype,$._init=function(ie){if(N(ie[0]))if(N(ie[0][0])){z(ie[1])&&(ie[0]=$.map(ie[0],ie[1]));for(var ne=0;ne<ie[0].length;ne++)this[ne]=ie[0][ne];this.length=ie[0].length}else this[0]=z(ie[1])?$.map(ie[0],ie[1]):ie[0],this.length=1;else if(H(ie[0]))this[0]=$.seq.apply(null,ie),this.length=1;else{if(ie[0]instanceof $)return $(ie[0].toArray());this[0]=[],this.length=1}return this},$._init.prototype=$.prototype,$._init.constructor=$,$.utils={calcRdx:O,isArray:N,isFunction:z,isNumber:H,toVector:function(ie){return m.apply([],ie)}},$._random_fn=h.random,$.setRandom=function(ie){if(typeof ie!="function")throw TypeError("fn is not a function");$._random_fn=ie},$.extend=function(ie){var ne,le;if(arguments.length==1){for(le in ie)$[le]=ie[le];return this}for(ne=1;ne<arguments.length;ne++)for(le in arguments[ne])ie[le]=arguments[ne][le];return ie},$.rows=function(ie){return ie.length||1},$.cols=function(ie){return ie[0].length||1},$.dimensions=function(ie){return{rows:$.rows(ie),cols:$.cols(ie)}},$.row=function(ie,ne){return N(ne)?ne.map(function(le){return $.row(ie,le)}):ie[ne]},$.rowa=function(ie,ne){return $.row(ie,ne)},$.col=function(ie,ne){if(N(ne)){var le=$.arange(ie.length).map(function(){return Array(ne.length)});return ne.forEach(function(pe,ve){$.arange(ie.length).forEach(function(be){le[be][ve]=ie[be][pe]})}),le}for(var fe=Array(ie.length),we=0;we<ie.length;we++)fe[we]=[ie[we][ne]];return fe},$.cola=function(ie,ne){return $.col(ie,ne).map(function(le){return le[0]})},$.diag=function(ie){for(var ne=$.rows(ie),le=Array(ne),fe=0;fe<ne;fe++)le[fe]=[ie[fe][fe]];return le},$.antidiag=function(ie){for(var ne=$.rows(ie)-1,le=Array(ne),fe=0;ne>=0;ne--,fe++)le[fe]=[ie[fe][ne]];return le},$.transpose=function(ie){var ne,le,fe,we,pe,ve=[];for(N(ie[0])||(ie=[ie]),le=ie.length,fe=ie[0].length,pe=0;pe<fe;pe++){for(we=0,ne=Array(le);we<le;we++)ne[we]=ie[we][pe];ve.push(ne)}return ve.length===1?ve[0]:ve},$.map=function(ie,ne,le){var fe,we,pe,ve,be;for(N(ie[0])||(ie=[ie]),we=ie.length,pe=ie[0].length,ve=le?ie:Array(we),fe=0;fe<we;fe++)for(ve[fe]||(ve[fe]=Array(pe)),be=0;be<pe;be++)ve[fe][be]=ne(ie[fe][be],fe,be);return ve.length===1?ve[0]:ve},$.cumreduce=function(ie,ne,le){var fe,we,pe,ve,be;for(N(ie[0])||(ie=[ie]),we=ie.length,pe=ie[0].length,ve=le?ie:Array(we),fe=0;fe<we;fe++)for(ve[fe]||(ve[fe]=Array(pe)),pe>0&&(ve[fe][0]=ie[fe][0]),be=1;be<pe;be++)ve[fe][be]=ne(ve[fe][be-1],ie[fe][be]);return ve.length===1?ve[0]:ve},$.alter=function(ie,ne){return $.map(ie,ne,!0)},$.create=function(ie,ne,le){var fe,we,pe=Array(ie);for(z(ne)&&(le=ne,ne=ie),fe=0;fe<ie;fe++)for(we=0,pe[fe]=Array(ne);we<ne;we++)pe[fe][we]=le(fe,we);return pe},$.zeros=function(ie,ne){return H(ne)||(ne=ie),$.create(ie,ne,V)},$.ones=function(ie,ne){return H(ne)||(ne=ie),$.create(ie,ne,P)},$.rand=function(ie,ne){return H(ne)||(ne=ie),$.create(ie,ne,$._random_fn)},$.identity=function(ie,ne){return H(ne)||(ne=ie),$.create(ie,ne,U)},$.symmetric=function(ie){var ne,le,fe=ie.length;if(ie.length!==ie[0].length)return!1;for(ne=0;ne<fe;ne++)for(le=0;le<fe;le++)if(ie[le][ne]!==ie[ne][le])return!1;return!0},$.clear=function(ie){return $.alter(ie,V)},$.seq=function(ie,ne,le,fe){z(fe)||(fe=!1);var we,pe=[],ve=O(ie,ne),be=(ne*ve-ie*ve)/((le-1)*ve),Ee=ie;for(we=0;Ee<=ne&&we<le;Ee=(ie*ve+be*ve*++we)/ve)pe.push(fe?fe(Ee,we):Ee);return pe},$.arange=function(ie,ne,le){var fe,we=[];if(le=le||1,c===ne&&(ne=ie,ie=0),ie===ne||le===0||ie<ne&&le<0||ie>ne&&le>0)return[];if(le>0)for(fe=ie;fe<ne;fe+=le)we.push(fe);else for(fe=ie;fe>ne;fe+=le)we.push(fe);return we},$.slice=function(){function ie(ne,le,fe,we){var pe,ve=[],be=ne.length;if(c===le&&c===fe&&c===we)return $.copy(ne);if(le=le||0,fe=fe||ne.length,we=we||1,(le=le>=0?le:be+le)===(fe=fe>=0?fe:be+fe)||we===0||le<fe&&we<0||le>fe&&we>0)return[];if(we>0)for(pe=le;pe<fe;pe+=we)ve.push(ne[pe]);else for(pe=le;pe>fe;pe+=we)ve.push(ne[pe]);return ve}return function(ne,le){if(H((le=le||{}).row)){var fe,we;return H(le.col)?ne[le.row][le.col]:ie($.rowa(ne,le.row),(fe=le.col||{}).start,fe.end,fe.step)}return H(le.col)?ie($.cola(ne,le.col),(we=le.row||{}).start,we.end,we.step):(we=le.row||{},fe=le.col||{},ie(ne,we.start,we.end,we.step).map(function(pe){return ie(pe,fe.start,fe.end,fe.step)}))}}(),$.sliceAssign=function(ie,ne,le){var fe,we;if(H(ne.row)){if(H(ne.col))return ie[ne.row][ne.col]=le;ne.col=ne.col||{},ne.col.start=ne.col.start||0,ne.col.end=ne.col.end||ie[0].length,ne.col.step=ne.col.step||1,fe=$.arange(ne.col.start,h.min(ie.length,ne.col.end),ne.col.step);var pe=ne.row;return fe.forEach(function(be,Ee){ie[pe][be]=le[Ee]}),ie}if(H(ne.col)){ne.row=ne.row||{},ne.row.start=ne.row.start||0,ne.row.end=ne.row.end||ie.length,ne.row.step=ne.row.step||1,we=$.arange(ne.row.start,h.min(ie[0].length,ne.row.end),ne.row.step);var ve=ne.col;return we.forEach(function(be,Ee){ie[be][ve]=le[Ee]}),ie}return le[0].length===c&&(le=[le]),ne.row.start=ne.row.start||0,ne.row.end=ne.row.end||ie.length,ne.row.step=ne.row.step||1,ne.col.start=ne.col.start||0,ne.col.end=ne.col.end||ie[0].length,ne.col.step=ne.col.step||1,we=$.arange(ne.row.start,h.min(ie.length,ne.row.end),ne.row.step),fe=$.arange(ne.col.start,h.min(ie[0].length,ne.col.end),ne.col.step),we.forEach(function(be,Ee){fe.forEach(function(Re,Ne){ie[be][Re]=le[Ee][Ne]})}),ie},$.diagonal=function(ie){var ne=$.zeros(ie.length,ie.length);return ie.forEach(function(le,fe){ne[fe][fe]=le}),ne},$.copy=function(ie){return ie.map(function(ne){return H(ne)?ne:ne.map(function(le){return le})})};var Y=$.prototype;Y.length=0,Y.push=Array.prototype.push,Y.sort=Array.prototype.sort,Y.splice=Array.prototype.splice,Y.slice=Array.prototype.slice,Y.toArray=function(){return this.length>1?T.call(this):T.call(this)[0]},Y.map=function(ie,ne){return $($.map(this,ie,ne))},Y.cumreduce=function(ie,ne){return $($.cumreduce(this,ie,ne))},Y.alter=function(ie){return $.alter(this,ie),this};for(var Z="transpose clear symmetric rows cols dimensions diag antidiag".split(" "),X=0;X<Z.length;X++)(function(ie){Y[ie]=function(ne){var le,fe=this;return ne?(setTimeout(function(){ne.call(fe,Y[ie].call(fe))}),this):N(le=$[ie](this))?$(le):le}})(Z[X]);for(var J="row col".split(" "),q=0;q<J.length;q++)(function(ie){Y[ie]=function(ne,le){var fe=this;return le?(setTimeout(function(){le.call(fe,Y[ie].call(fe,ne))}),this):$($[ie](this,ne))}})(J[q]);for(var te="create zeros ones rand identity".split(" "),re=0;re<te.length;re++)(function(ie){Y[ie]=function(){return $($[ie].apply(null,arguments))}})(te[re]);return $}(Math);(function(h,c){var m=h.utils.isFunction;function T(U,Y){return U-Y}function D(U,Y,Z){return c.max(Y,c.min(U,Z))}h.sum=function(U){for(var Y=0,Z=U.length;--Z>=0;)Y+=U[Z];return Y},h.sumsqrd=function(U){for(var Y=0,Z=U.length;--Z>=0;)Y+=U[Z]*U[Z];return Y},h.sumsqerr=function(U){for(var Y,Z=h.mean(U),X=0,J=U.length;--J>=0;)X+=(Y=U[J]-Z)*Y;return X},h.sumrow=function(U){for(var Y=0,Z=U.length;--Z>=0;)Y+=U[Z];return Y},h.product=function(U){for(var Y=1,Z=U.length;--Z>=0;)Y*=U[Z];return Y},h.min=function(U){for(var Y=U[0],Z=0;++Z<U.length;)U[Z]<Y&&(Y=U[Z]);return Y},h.max=function(U){for(var Y=U[0],Z=0;++Z<U.length;)U[Z]>Y&&(Y=U[Z]);return Y},h.unique=function(U){for(var Y={},Z=[],X=0;X<U.length;X++)Y[U[X]]||(Y[U[X]]=!0,Z.push(U[X]));return Z},h.mean=function(U){return h.sum(U)/U.length},h.meansqerr=function(U){return h.sumsqerr(U)/U.length},h.geomean=function(U){var Y=U.map(c.log),Z=h.mean(Y);return c.exp(Z)},h.median=function(U){var Y=U.length,Z=U.slice().sort(T);return 1&Y?Z[Y/2|0]:(Z[Y/2-1]+Z[Y/2])/2},h.cumsum=function(U){return h.cumreduce(U,function(Y,Z){return Y+Z})},h.cumprod=function(U){return h.cumreduce(U,function(Y,Z){return Y*Z})},h.diff=function(U){var Y,Z=[],X=U.length;for(Y=1;Y<X;Y++)Z.push(U[Y]-U[Y-1]);return Z},h.rank=function(U){var Y,Z=[],X={};for(Y=0;Y<U.length;Y++){var J=U[Y];X[J]?X[J]++:(X[J]=1,Z.push(J))}var q=Z.sort(T),te={},re=1;for(Y=0;Y<q.length;Y++){var J=q[Y],ie=X[J],ne=(re+(re+ie-1))/2;te[J]=ne,re+=ie}return U.map(function(le){return te[le]})},h.mode=function(U){var Y,Z=U.length,X=U.slice().sort(T),J=1,q=0,te=0,re=[];for(Y=0;Y<Z;Y++)X[Y]===X[Y+1]?J++:(J>q?(re=[X[Y]],q=J,te=0):J===q&&(re.push(X[Y]),te++),J=1);return te===0?re[0]:re},h.range=function(U){return h.max(U)-h.min(U)},h.variance=function(U,Y){return h.sumsqerr(U)/(U.length-+!!Y)},h.pooledvariance=function(U){return U.reduce(function(Y,Z){return Y+h.sumsqerr(Z)},0)/(U.reduce(function(Y,Z){return Y+Z.length},0)-U.length)},h.deviation=function(U){for(var Y=h.mean(U),Z=U.length,X=Array(Z),J=0;J<Z;J++)X[J]=U[J]-Y;return X},h.stdev=function(U,Y){return c.sqrt(h.variance(U,Y))},h.pooledstdev=function(U){return c.sqrt(h.pooledvariance(U))},h.meandev=function(U){for(var Y=h.mean(U),Z=[],X=U.length-1;X>=0;X--)Z.push(c.abs(U[X]-Y));return h.mean(Z)},h.meddev=function(U){for(var Y=h.median(U),Z=[],X=U.length-1;X>=0;X--)Z.push(c.abs(U[X]-Y));return h.median(Z)},h.coeffvar=function(U){return h.stdev(U)/h.mean(U)},h.quartiles=function(U){var Y=U.length,Z=U.slice().sort(T);return[Z[c.round(Y/4)-1],Z[c.round(Y/2)-1],Z[c.round(3*Y/4)-1]]},h.quantiles=function(U,Y,Z,X){var J,q,te,re,ie,ne,le=U.slice().sort(T),fe=[Y.length],we=U.length;for(Z===void 0&&(Z=.375),X===void 0&&(X=.375),J=0;J<Y.length;J++)te=Z+(q=Y[J])*(1-Z-X),re=we*q+te,ie=c.floor(D(re,1,we-1)),ne=D(re-ie,0,1),fe[J]=(1-ne)*le[ie-1]+ne*le[ie];return fe},h.percentile=function(U,Y,Z){var X=U.slice().sort(T),J=Y*(X.length+(Z?1:-1))+ +!Z,q=parseInt(J);return q+1<X.length?X[q-1]+(J-q)*(X[q]-X[q-1]):X[q-1]},h.percentileOfScore=function(U,Y,Z){var X,J,q=0,te=U.length,re=!1;for(Z==="strict"&&(re=!0),J=0;J<te;J++)X=U[J],(re&&X<Y||!re&&X<=Y)&&q++;return q/te},h.histogram=function(U,Y){Y=Y||4;var Z,X=h.min(U),J=(h.max(U)-X)/Y,q=U.length,te=[];for(Z=0;Z<Y;Z++)te[Z]=0;for(Z=0;Z<q;Z++)te[c.min(c.floor((U[Z]-X)/J),Y-1)]+=1;return te},h.covariance=function(U,Y){var Z,X=h.mean(U),J=h.mean(Y),q=U.length,te=Array(q);for(Z=0;Z<q;Z++)te[Z]=(U[Z]-X)*(Y[Z]-J);return h.sum(te)/(q-1)},h.corrcoeff=function(U,Y){return h.covariance(U,Y)/h.stdev(U,1)/h.stdev(Y,1)},h.spearmancoeff=function(U,Y){return U=h.rank(U),Y=h.rank(Y),h.corrcoeff(U,Y)},h.stanMoment=function(U,Y){for(var Z=h.mean(U),X=h.stdev(U),J=U.length,q=0,te=0;te<J;te++)q+=c.pow((U[te]-Z)/X,Y);return q/U.length},h.skewness=function(U){return h.stanMoment(U,3)},h.kurtosis=function(U){return h.stanMoment(U,4)-3};for(var O=h.prototype,N="cumsum cumprod".split(" "),z=0;z<N.length;z++)(function(U){O[U]=function(Y,Z){var X=[],J=0,q=this;if(m(Y)&&(Z=Y,Y=!1),Z)return setTimeout(function(){Z.call(q,O[U].call(q,Y))}),this;if(this.length>1){for(q=Y===!0?this:this.transpose();J<q.length;J++)X[J]=h[U](q[J]);return X}return h[U](this[0],Y)}})(N[z]);for(var H="sum sumsqrd sumsqerr sumrow product min max unique mean meansqerr geomean median diff rank mode range variance deviation stdev meandev meddev coeffvar quartiles histogram skewness kurtosis".split(" "),$=0;$<H.length;$++)(function(U){O[U]=function(Y,Z){var X=[],J=0,q=this;if(m(Y)&&(Z=Y,Y=!1),Z)return setTimeout(function(){Z.call(q,O[U].call(q,Y))}),this;if(this.length>1){for(U!=="sumrow"&&(q=Y===!0?this:this.transpose());J<q.length;J++)X[J]=h[U](q[J]);return Y===!0?h[U](h.utils.toVector(X)):X}return h[U](this[0],Y)}})(H[$]);for(var V="quantiles percentileOfScore".split(" "),P=0;P<V.length;P++)(function(U){O[U]=function(){var Y,Z=[],X=0,J=this,q=Array.prototype.slice.call(arguments);if(m(q[q.length-1])){Y=q[q.length-1];var te=q.slice(0,q.length-1);return setTimeout(function(){Y.call(J,O[U].apply(J,te))}),this}Y=void 0;var re=function(ie){return h[U].apply(J,[ie].concat(q))};if(this.length>1){for(J=J.transpose();X<J.length;X++)Z[X]=re(J[X]);return Z}return re(this[0])}})(V[P])})(A,Math);var u=Math;A.gammaln=function(h){var c,m,T=0,D=[76.18009172947146,-86.50532032941678,24.01409824083091,-1.231739572450155,.001208650973866179,-5395239384953e-18],O=1.000000000190015;for(m=(c=h)+5.5,m-=(h+.5)*u.log(m);T<6;T++)O+=D[T]/++c;return u.log(2.5066282746310007*O/h)-m},A.loggam=function(h){var c,m,T,D,O,N,z,H=[.08333333333333333,-.002777777777777778,.0007936507936507937,-.0005952380952380952,.0008417508417508418,-.001917526917526918,.00641025641025641,-.02955065359477124,.1796443723688307,-1.3924322169059];if(c=h,z=0,h==1||h==2)return 0;for(h<=7&&(z=u.floor(7-h),c=h+z),m=1/(c*c),T=2*u.PI,O=H[9],N=8;N>=0;N--)O*=m,O+=H[N];if(D=O/c+.5*u.log(T)+(c-.5)*u.log(c)-c,h<=7)for(N=1;N<=z;N++)D-=u.log(c-1),c-=1;return D},A.gammafn=function(h){var c,m,T,D,O=[-1.716185138865495,24.76565080557592,-379.80425647094563,629.3311553128184,866.9662027904133,-31451.272968848367,-36144.413418691176,66456.14382024054],N=[-30.8402300119739,315.35062697960416,-1015.1563674902192,-3107.771671572311,22538.11842098015,4755.846277527881,-134659.9598649693,-115132.2596755535],z=!1,H=0,$=0,V=0,P=h;if(h>171.6243769536076)return 1/0;if(P<=0){if(!(D=P%1+36e-17))return 1/0;z=(1&P?-1:1)*u.PI/u.sin(u.PI*D),P=1-P}for(c=0,T=P,m=P<1?P++:(P-=H=(0|P)-1)-1;c<8;++c)V=(V+O[c])*m,$=$*m+N[c];if(D=V/$+1,T<P)D/=T;else if(T>P)for(c=0;c<H;++c)D*=P,P++;return z&&(D=z/D),D},A.gammap=function(h,c){return A.lowRegGamma(h,c)*A.gammafn(h)},A.lowRegGamma=function(h,c){var m,T=A.gammaln(h),D=h,O=1/h,N=O,z=c+1-h,H=1/1e-30,$=1/z,V=$,P=1,U=-~(8.5*u.log(h>=1?h:1/h)+.4*h+17);if(c<0||h<=0)return NaN;if(c<h+1){for(;P<=U;P++)O+=N*=c/++D;return O*u.exp(-c+h*u.log(c)-T)}for(;P<=U;P++)z+=2,V*=($=1/($=(m=-P*(P-h))*$+z))*(H=z+m/H);return 1-V*u.exp(-c+h*u.log(c)-T)},A.factorialln=function(h){return h<0?NaN:A.gammaln(h+1)},A.factorial=function(h){return h<0?NaN:A.gammafn(h+1)},A.combination=function(h,c){return h>170||c>170?u.exp(A.combinationln(h,c)):A.factorial(h)/A.factorial(c)/A.factorial(h-c)},A.combinationln=function(h,c){return A.factorialln(h)-A.factorialln(c)-A.factorialln(h-c)},A.permutation=function(h,c){return A.factorial(h)/A.factorial(h-c)},A.betafn=function(h,c){if(!(h<=0)&&!(c<=0))return h+c>170?u.exp(A.betaln(h,c)):A.gammafn(h)*A.gammafn(c)/A.gammafn(h+c)},A.betaln=function(h,c){return A.gammaln(h)+A.gammaln(c)-A.gammaln(h+c)},A.betacf=function(h,c,m){var T,D,O,N,z=1,H=c+m,$=c+1,V=c-1,P=1,U=1-H*h/$;for(1e-30>u.abs(U)&&(U=1e-30),N=U=1/U;z<=100&&(T=2*z,U=1+(D=z*(m-z)*h/((V+T)*(c+T)))*U,1e-30>u.abs(U)&&(U=1e-30),P=1+D/P,1e-30>u.abs(P)&&(P=1e-30),N*=(U=1/U)*P,U=1+(D=-(c+z)*(H+z)*h/((c+T)*($+T)))*U,1e-30>u.abs(U)&&(U=1e-30),P=1+D/P,1e-30>u.abs(P)&&(P=1e-30),N*=O=(U=1/U)*P,!(3e-7>u.abs(O-1)));z++);return N},A.gammapinv=function(h,c){var m,T,D,O,N,z=0,H=c-1,$=A.gammaln(c);if(h>=1)return u.max(100,c+100*u.sqrt(c));if(h<=0)return 0;for(c>1?(O=u.log(H),N=u.exp(H*(O-1)-$),m=(2.30753+.27061*(T=u.sqrt(-2*u.log(h<.5?h:1-h))))/(1+T*(.99229+.04481*T))-T,h<.5&&(m=-m),m=u.max(.001,c*u.pow(1-1/(9*c)-m/(3*u.sqrt(c)),3))):m=h<(T=1-c*(.253+.12*c))?u.pow(h/T,1/c):1-u.log(1-(h-T)/(1-T));z<12;z++){if(m<=0)return 0;if(D=(A.lowRegGamma(c,m)-h)/(T=c>1?N*u.exp(-(m-H)+H*(u.log(m)-O)):u.exp(-m+H*u.log(m)-$)),(m-=T=D/(1-.5*u.min(1,D*((c-1)/m-1))))<=0&&(m=.5*(m+T)),u.abs(T)<1e-8*m)break}return m},A.erf=function(h){var c,m,T,D,O=[-1.3026537197817094,.6419697923564902,.019476473204185836,-.00956151478680863,-.000946595344482036,.000366839497852761,42523324806907e-18,-20278578112534e-18,-1624290004647e-18,130365583558e-17,15626441722e-18,-85238095915e-18,6529054439e-18,5059343495e-18,-991364156e-18,-227365122e-18,96467911e-18,2394038e-18,-6886027e-18,894487e-18,313092e-18,-112708e-18,381e-18,7106e-18,-1523e-18,-94e-18,121e-18,-28e-18],N=O.length-1,z=!1,H=0,$=0;for(h<0&&(h=-h,z=!0),m=4*(c=2/(2+h))-2;N>0;N--)T=H,H=m*H-$+O[N],$=T;return D=c*u.exp(-h*h+.5*(O[0]+m*H)-$),z?D-1:1-D},A.erfc=function(h){return 1-A.erf(h)},A.erfcinv=function(h){var c,m,T,D,O=0;if(h>=2)return-100;if(h<=0)return 100;for(D=h<1?h:2-h,c=-.70711*((2.30753+.27061*(T=u.sqrt(-2*u.log(D/2))))/(1+T*(.99229+.04481*T))-T);O<2;O++)m=A.erfc(c)-D,c+=m/(1.1283791670955126*u.exp(-c*c)-c*m);return h<1?c:-c},A.ibetainv=function(h,c,m){var T,D,O,N,z,H,$,V,P,U=c-1,Y=m-1,Z=0;if(h<=0)return 0;if(h>=1)return 1;for(c>=1&&m>=1?(z=(2.30753+.27061*(O=u.sqrt(-2*u.log(h<.5?h:1-h))))/(1+O*(.99229+.04481*O))-O,h<.5&&(z=-z),H=(z*z-3)/6,$=2/(1/(2*c-1)+1/(2*m-1)),V=z*u.sqrt(H+$)/$-(1/(2*m-1)-1/(2*c-1))*(H+.8333333333333334-2/(3*$)),z=c/(c+m*u.exp(2*V))):(T=u.log(c/(c+m)),D=u.log(m/(c+m)),V=(O=u.exp(c*T)/c)+(N=u.exp(m*D)/m),z=h<O/V?u.pow(c*V*h,1/c):1-u.pow(m*V*(1-h),1/m)),P=-A.gammaln(c)-A.gammaln(m)+A.gammaln(c+m);Z<10&&z!==0&&z!==1&&(N=(A.ibeta(z,c,m)-h)/(O=u.exp(U*u.log(z)+Y*u.log(1-z)+P)),(z-=O=N/(1-.5*u.min(1,N*(U/z-Y/(1-z)))))<=0&&(z=.5*(z+O)),z>=1&&(z=.5*(z+O+1)),!(u.abs(O)<1e-8*z)||!(Z>0));Z++);return z},A.ibeta=function(h,c,m){var T=h===0||h===1?0:u.exp(A.gammaln(c+m)-A.gammaln(c)-A.gammaln(m)+c*u.log(h)+m*u.log(1-h));return!(h<0)&&!(h>1)&&(h<(c+1)/(c+m+2)?T*A.betacf(h,c,m)/c:1-T*A.betacf(1-h,m,c)/m)},A.randn=function(h,c){var m,T,D,O,N;if(c||(c=h),h)return A.create(h,c,function(){return A.randn()});do m=A._random_fn(),T=1.7156*(A._random_fn()-.5),N=(D=m-.449871)*D+(O=u.abs(T)+.386595)*(.196*O-.25472*D);while(N>.27597&&(N>.27846||T*T>-4*u.log(m)*m*m));return T/m},A.randg=function(h,c,m){var T,D,O,N,z,H,$=h;if(m||(m=c),h||(h=1),c)return(H=A.zeros(c,m)).alter(function(){return A.randg(h)}),H;h<1&&(h+=1),T=h-.3333333333333333,D=1/u.sqrt(9*T);do{do N=1+D*(z=A.randn());while(N<=0);N=N*N*N,O=A._random_fn()}while(O>1-.331*u.pow(z,4)&&u.log(O)>.5*z*z+T*(1-N+u.log(N)));if(h==$)return T*N;do O=A._random_fn();while(O===0);return u.pow(O,1/$)*T*N};for(var o="gammaln gammafn factorial factorialln".split(" "),S=0;S<o.length;S++)(function(h){A.fn[h]=function(){return A(A.map(this,function(c){return A[h](c)}))}})(o[S]);for(var _="randn".split(" "),p=0;p<_.length;p++)(function(h){A.fn[h]=function(){return A(A[h].apply(null,arguments))}})(_[p]);for(var f=Math,y="beta centralF cauchy chisquare exponential gamma invgamma kumaraswamy laplace lognormal noncentralt normal pareto studentt weibull uniform binomial negbin hypgeom poisson triangular tukey arcsine".split(" "),d=0;d<y.length;d++)(function(h){A[h]=function O(N,z,H){return this instanceof O?(this._a=N,this._b=z,this._c=H,this):new O(N,z,H)},A.fn[h]=function(O,N,z){var H=A[h](O,N,z);return H.data=this,H},A[h].prototype.sample=function(O){var N=this._a,z=this._b,H=this._c;return O?A.alter(O,function(){return A[h].sample(N,z,H)}):A[h].sample(N,z,H)};for(var c="pdf cdf inv".split(" "),m=0;m<c.length;m++)(function(O){A[h].prototype[O]=function(N){var z=this._a,H=this._b,$=this._c;return N||N===0||(N=this.data),typeof N!="number"?A.fn.map.call(N,function(V){return A[h][O](V,z,H,$)}):A[h][O](N,z,H,$)}})(c[m]);for(var T="mean median mode variance".split(" "),D=0;D<T.length;D++)(function(O){A[h].prototype[O]=function(){return A[h][O](this._a,this._b,this._c)}})(T[D])})(y[d]);function v(h,c,m,T){for(var D,O=0,N=1,z=1,H=1,$=0,V=0;f.abs((z-V)/z)>T;)V=z,O=z+(D=-(c+$)*(c+m+$)*h/(c+2*$)/(c+2*$+1))*O,N=H+D*N,$+=1,z=O+(D=$*(m-$)*h/(c+2*$-1)/(c+2*$))*z,O/=H=N+D*H,N/=H,z/=H,H=1;return z/c}function b(h,c,m){var T=[.9815606342467192,.9041172563704749,.7699026741943047,.5873179542866175,.3678314989981802,.1252334085114689],D=[.04717533638651183,.10693932599531843,.16007832854334622,.20316742672306592,.2334925365383548,.24914704581340277],O=.5*h;if(O>=8)return 1;var N=2*A.normal.cdf(O,0,1,1,0)-1;N=N>=f.exp(-50/m)?f.pow(N,m):0;for(var z=O,H=(8-O)/(q=h>3?2:3),$=z+H,V=0,P=m-1,U=1;U<=q;U++){for(var Y=0,Z=.5*($+z),X=.5*($-z),J=1;J<=12;J++){var q,te,re=Z+X*(6<J?T[(te=12-J+1)-1]:-T[(te=J)-1]),ie=re*re;if(ie>60)break;var ne=.5*(2*A.normal.cdf(re,0,1,1,0))-.5*(2*A.normal.cdf(re,h,1,1,0));ne>=f.exp(-30/P)&&(Y+=ne=D[te-1]*f.exp(-(.5*ie))*f.pow(ne,P))}Y*=2*X*m/f.sqrt(2*f.PI),V+=Y,z=$,$+=H}return(N+=V)<=f.exp(-30/c)?0:(N=f.pow(N,c))>=1?1:N}A.extend(A.beta,{pdf:function(h,c,m){return h>1||h<0?0:c==1&&m==1?1:c<512&&m<512?f.pow(h,c-1)*f.pow(1-h,m-1)/A.betafn(c,m):f.exp((c-1)*f.log(h)+(m-1)*f.log(1-h)-A.betaln(c,m))},cdf:function(h,c,m){return h>1||h<0?(h>1)*1:A.ibeta(h,c,m)},inv:function(h,c,m){return A.ibetainv(h,c,m)},mean:function(h,c){return h/(h+c)},median:function(h,c){return A.ibetainv(.5,h,c)},mode:function(h,c){return(h-1)/(h+c-2)},sample:function(h,c){var m=A.randg(h);return m/(m+A.randg(c))},variance:function(h,c){return h*c/(f.pow(h+c,2)*(h+c+1))}}),A.extend(A.centralF,{pdf:function(h,c,m){var T;return h<0?0:c<=2?h===0&&c<2?1/0:h===0&&c===2?1:1/A.betafn(c/2,m/2)*f.pow(c/m,c/2)*f.pow(h,c/2-1)*f.pow(1+c/m*h,-(c+m)/2):(T=m/(m+h*c),c*T/2*A.binomial.pdf((c-2)/2,(c+m-2)/2,c*h/(m+h*c)))},cdf:function(h,c,m){return h<0?0:A.ibeta(c*h/(c*h+m),c/2,m/2)},inv:function(h,c,m){return m/(c*(1/A.ibetainv(h,c/2,m/2)-1))},mean:function(h,c){return c>2?c/(c-2):void 0},mode:function(h,c){return h>2?c*(h-2)/(h*(c+2)):void 0},sample:function(h,c){return 2*A.randg(h/2)/h/(2*A.randg(c/2)/c)},variance:function(h,c){if(!(c<=4))return 2*c*c*(h+c-2)/(h*(c-2)*(c-2)*(c-4))}}),A.extend(A.cauchy,{pdf:function(h,c,m){return m<0?0:m/(f.pow(h-c,2)+f.pow(m,2))/f.PI},cdf:function(h,c,m){return f.atan((h-c)/m)/f.PI+.5},inv:function(h,c,m){return c+m*f.tan(f.PI*(h-.5))},median:function(h){return h},mode:function(h){return h},sample:function(h,c){return A.randn()*f.sqrt(1/(2*A.randg(.5)))*c+h}}),A.extend(A.chisquare,{pdf:function(h,c){return h<0?0:h===0&&c===2?.5:f.exp((c/2-1)*f.log(h)-h/2-c/2*f.log(2)-A.gammaln(c/2))},cdf:function(h,c){return h<0?0:A.lowRegGamma(c/2,h/2)},inv:function(h,c){return 2*A.gammapinv(h,.5*c)},mean:function(h){return h},median:function(h){return h*f.pow(1-2/(9*h),3)},mode:function(h){return h-2>0?h-2:0},sample:function(h){return 2*A.randg(h/2)},variance:function(h){return 2*h}}),A.extend(A.exponential,{pdf:function(h,c){return h<0?0:c*f.exp(-c*h)},cdf:function(h,c){return h<0?0:1-f.exp(-c*h)},inv:function(h,c){return-f.log(1-h)/c},mean:function(h){return 1/h},median:function(h){return 1/h*f.log(2)},mode:function(){return 0},sample:function(h){return-1/h*f.log(A._random_fn())},variance:function(h){return f.pow(h,-2)}}),A.extend(A.gamma,{pdf:function(h,c,m){return h<0?0:h===0&&c===1?1/m:f.exp((c-1)*f.log(h)-h/m-A.gammaln(c)-c*f.log(m))},cdf:function(h,c,m){return h<0?0:A.lowRegGamma(c,h/m)},inv:function(h,c,m){return A.gammapinv(h,c)*m},mean:function(h,c){return h*c},mode:function(h,c){if(h>1)return(h-1)*c},sample:function(h,c){return A.randg(h)*c},variance:function(h,c){return h*c*c}}),A.extend(A.invgamma,{pdf:function(h,c,m){return h<=0?0:f.exp(-(c+1)*f.log(h)-m/h-A.gammaln(c)+c*f.log(m))},cdf:function(h,c,m){return h<=0?0:1-A.lowRegGamma(c,m/h)},inv:function(h,c,m){return m/A.gammapinv(1-h,c)},mean:function(h,c){return h>1?c/(h-1):void 0},mode:function(h,c){return c/(h+1)},sample:function(h,c){return c/A.randg(h)},variance:function(h,c){if(!(h<=2))return c*c/((h-1)*(h-1)*(h-2))}}),A.extend(A.kumaraswamy,{pdf:function(h,c,m){return h===0&&c===1?m:h===1&&m===1?c:f.exp(f.log(c)+f.log(m)+(c-1)*f.log(h)+(m-1)*f.log(1-f.pow(h,c)))},cdf:function(h,c,m){return h<0?0:h>1?1:1-f.pow(1-f.pow(h,c),m)},inv:function(h,c,m){return f.pow(1-f.pow(1-h,1/m),1/c)},mean:function(h,c){return c*A.gammafn(1+1/h)*A.gammafn(c)/A.gammafn(1+1/h+c)},median:function(h,c){return f.pow(1-f.pow(2,-1/c),1/h)},mode:function(h,c){if(h>=1&&c>=1&&h!==1&&c!==1)return f.pow((h-1)/(h*c-1),1/h)},variance:function(){throw Error("variance not yet implemented")}}),A.extend(A.lognormal,{pdf:function(h,c,m){return h<=0?0:f.exp(-f.log(h)-.5*f.log(2*f.PI)-f.log(m)-f.pow(f.log(h)-c,2)/(2*m*m))},cdf:function(h,c,m){return h<0?0:.5+.5*A.erf((f.log(h)-c)/f.sqrt(2*m*m))},inv:function(h,c,m){return f.exp(-1.4142135623730951*m*A.erfcinv(2*h)+c)},mean:function(h,c){return f.exp(h+c*c/2)},median:function(h){return f.exp(h)},mode:function(h,c){return f.exp(h-c*c)},sample:function(h,c){return f.exp(A.randn()*c+h)},variance:function(h,c){return(f.exp(c*c)-1)*f.exp(2*h+c*c)}}),A.extend(A.noncentralt,{pdf:function(h,c,m){return 1e-14>f.abs(m)?A.studentt.pdf(h,c):1e-14>f.abs(h)?f.exp(A.gammaln((c+1)/2)-m*m/2-.5*f.log(f.PI*c)-A.gammaln(c/2)):c/h*(A.noncentralt.cdf(h*f.sqrt(1+2/c),c+2,m)-A.noncentralt.cdf(h,c,m))},cdf:function(h,c,m){if(1e-14>f.abs(m))return A.studentt.cdf(h,c);var T=!1;h<0&&(T=!0,m=-m);for(var D=A.normal.cdf(-m,0,1),O=1.00000000000001,N=1.00000000000001,z=h*h/(h*h+c),H=0,$=f.exp(-m*m/2),V=f.exp(-m*m/2-.5*f.log(2)-A.gammaln(1.5))*m;H<200||N>1e-14||O>1e-14;)N=O,H>0&&($*=m*m/(2*H),V*=m*m/(2*(H+.5))),D+=.5*(O=$*A.beta.cdf(z,H+.5,c/2)+V*A.beta.cdf(z,H+1,c/2)),H++;return T?1-D:D}}),A.extend(A.normal,{pdf:function(h,c,m){return f.exp(-.5*f.log(2*f.PI)-f.log(m)-f.pow(h-c,2)/(2*m*m))},cdf:function(h,c,m){return .5*(1+A.erf((h-c)/f.sqrt(2*m*m)))},inv:function(h,c,m){return-1.4142135623730951*m*A.erfcinv(2*h)+c},mean:function(h){return h},median:function(h){return h},mode:function(h){return h},sample:function(h,c){return A.randn()*c+h},variance:function(h,c){return c*c}}),A.extend(A.pareto,{pdf:function(h,c,m){return h<c?0:m*f.pow(c,m)/f.pow(h,m+1)},cdf:function(h,c,m){return h<c?0:1-f.pow(c/h,m)},inv:function(h,c,m){return c/f.pow(1-h,1/m)},mean:function(h,c){if(!(c<=1))return c*f.pow(h,c)/(c-1)},median:function(h,c){return h*(c*f.SQRT2)},mode:function(h){return h},variance:function(h,c){if(!(c<=2))return h*h*c/(f.pow(c-1,2)*(c-2))}}),A.extend(A.studentt,{pdf:function(h,c){return c=c>1e100?1e100:c,1/(f.sqrt(c)*A.betafn(.5,c/2))*f.pow(1+h*h/c,-((c+1)/2))},cdf:function(h,c){var m=c/2;return A.ibeta((h+f.sqrt(h*h+c))/(2*f.sqrt(h*h+c)),m,m)},inv:function(h,c){var m=A.ibetainv(2*f.min(h,1-h),.5*c,.5);return m=f.sqrt(c*(1-m)/m),h>.5?m:-m},mean:function(h){return h>1?0:void 0},median:function(){return 0},mode:function(){return 0},sample:function(h){return A.randn()*f.sqrt(h/(2*A.randg(h/2)))},variance:function(h){return h>2?h/(h-2):h>1?1/0:void 0}}),A.extend(A.weibull,{pdf:function(h,c,m){return h<0||c<0||m<0?0:m/c*f.pow(h/c,m-1)*f.exp(-f.pow(h/c,m))},cdf:function(h,c,m){return h<0?0:1-f.exp(-f.pow(h/c,m))},inv:function(h,c,m){return c*f.pow(-f.log(1-h),1/m)},mean:function(h,c){return h*A.gammafn(1+1/c)},median:function(h,c){return h*f.pow(f.log(2),1/c)},mode:function(h,c){return c<=1?0:h*f.pow((c-1)/c,1/c)},sample:function(h,c){return h*f.pow(-f.log(A._random_fn()),1/c)},variance:function(h,c){return h*h*A.gammafn(1+2/c)-f.pow(A.weibull.mean(h,c),2)}}),A.extend(A.uniform,{pdf:function(h,c,m){return h<c||h>m?0:1/(m-c)},cdf:function(h,c,m){return h<c?0:h<m?(h-c)/(m-c):1},inv:function(h,c,m){return c+h*(m-c)},mean:function(h,c){return .5*(h+c)},median:function(h,c){return A.mean(h,c)},mode:function(){throw Error("mode is not yet implemented")},sample:function(h,c){return h/2+c/2+(c/2-h/2)*(2*A._random_fn()-1)},variance:function(h,c){return f.pow(c-h,2)/12}}),A.extend(A.binomial,{pdf:function(h,c,m){return m===0||m===1?+(c*m===h):A.combination(c,h)*f.pow(m,h)*f.pow(1-m,c-h)},cdf:function(h,c,m){if(h<0)return 0;if(h>=c)return 1;if(m<0||m>1||c<=0)return NaN;var T,D=(h=f.floor(h))+1,O=c-h,N=D+O,z=f.exp(A.gammaln(N)-A.gammaln(O)-A.gammaln(D)+D*f.log(m)+O*f.log(1-m));return T=m<(D+1)/(N+2)?z*v(m,D,O,1e-10):1-z*v(1-m,O,D,1e-10),f.round(1e10*(1-T))/1e10}}),A.extend(A.negbin,{pdf:function(h,c,m){return h===h>>>0&&(h<0?0:A.combination(h+c-1,c-1)*f.pow(1-m,h)*f.pow(m,c))},cdf:function(h,c,m){var T=0,D=0;if(h<0)return 0;for(;D<=h;D++)T+=A.negbin.pdf(D,c,m);return T}}),A.extend(A.hypgeom,{pdf:function(h,c,m,T){if(h!=h|0)return!1;if(h<0||h<m-(c-T)||h>T||h>m)return 0;if(2*m>c)return 2*T>c?A.hypgeom.pdf(c-m-T+h,c,c-m,c-T):A.hypgeom.pdf(T-h,c,c-m,T);if(2*T>c)return A.hypgeom.pdf(m-h,c,m,c-T);if(m<T)return A.hypgeom.pdf(h,c,T,m);for(var D=1,O=0,N=0;N<h;N++){for(;D>1&&O<T;)D*=1-m/(c-O),O++;D*=(T-N)*(m-N)/((N+1)*(c-m-T+N+1))}for(;O<T;O++)D*=1-m/(c-O);return f.min(1,f.max(0,D))},cdf:function(h,c,m,T){if(h<0||h<m-(c-T))return 0;if(h>=T||h>=m)return 1;if(2*m>c)return 2*T>c?A.hypgeom.cdf(c-m-T+h,c,c-m,c-T):1-A.hypgeom.cdf(T-h-1,c,c-m,T);if(2*T>c)return 1-A.hypgeom.cdf(m-h-1,c,m,c-T);if(m<T)return A.hypgeom.cdf(h,c,T,m);for(var D=1,O=1,N=0,z=0;z<h;z++){for(;D>1&&N<T;){var H=1-m/(c-N);O*=H,D*=H,N++}O*=(T-z)*(m-z)/((z+1)*(c-m-T+z+1)),D+=O}for(;N<T;N++)D*=1-m/(c-N);return f.min(1,f.max(0,D))}}),A.extend(A.poisson,{pdf:function(h,c){return c<0||h%1!=0||h<0?0:f.pow(c,h)*f.exp(-c)/A.factorial(h)},cdf:function(h,c){var m=[],T=0;if(h<0)return 0;for(;T<=h;T++)m.push(A.poisson.pdf(T,c));return A.sum(m)},mean:function(h){return h},variance:function(h){return h},sampleSmall:function(h){var c=1,m=0,T=f.exp(-h);do m++,c*=A._random_fn();while(c>T);return m-1},sampleLarge:function(h){var c,m,T,D,O,N,z,H,$,V;for(D=f.sqrt(h),O=f.log(h),N=-.059+.02483*(z=.931+2.53*D),H=1.1239+1.1328/(z-3.4),$=.9277-3.6224/(z-2);;)if(m=f.random()-.5,T=f.random(),V=.5-f.abs(m),c=f.floor((2*N/V+z)*m+h+.43),V>=.07&&T<=$||!(c<0)&&(!(V<.013)||!(T>V))&&f.log(T)+f.log(H)-f.log(N/(V*V)+z)<=-h+c*O-A.loggam(c+1))return c},sample:function(h){return h<10?this.sampleSmall(h):this.sampleLarge(h)}}),A.extend(A.triangular,{pdf:function(h,c,m,T){return m<=c||T<c||T>m?NaN:h<c||h>m?0:h<T?2*(h-c)/((m-c)*(T-c)):h===T?2/(m-c):2*(m-h)/((m-c)*(m-T))},cdf:function(h,c,m,T){return m<=c||T<c||T>m?NaN:h<=c?0:h>=m?1:h<=T?f.pow(h-c,2)/((m-c)*(T-c)):1-f.pow(m-h,2)/((m-c)*(m-T))},inv:function(h,c,m,T){return m<=c||T<c||T>m?NaN:h<=(T-c)/(m-c)?c+(m-c)*f.sqrt((T-c)/(m-c)*h):c+(m-c)*(1-f.sqrt((1-h)*(1-(T-c)/(m-c))))},mean:function(h,c,m){return(h+c+m)/3},median:function(h,c,m){return m<=(h+c)/2?c-f.sqrt((c-h)*(c-m))/f.sqrt(2):m>(h+c)/2?h+f.sqrt((c-h)*(m-h))/f.sqrt(2):void 0},mode:function(h,c,m){return m},sample:function(h,c,m){var T=A._random_fn();return T<(m-h)/(c-h)?h+f.sqrt(T*(c-h)*(m-h)):c-f.sqrt((1-T)*(c-h)*(c-m))},variance:function(h,c,m){return(h*h+c*c+m*m-h*c-h*m-c*m)/18}}),A.extend(A.arcsine,{pdf:function(h,c,m){return m<=c?NaN:h<=c||h>=m?0:2/f.PI*f.pow(f.pow(m-c,2)-f.pow(2*h-c-m,2),-.5)},cdf:function(h,c,m){return h<c?0:h<m?2/f.PI*f.asin(f.sqrt((h-c)/(m-c))):1},inv:function(h,c,m){return c+(.5-.5*f.cos(f.PI*h))*(m-c)},mean:function(h,c){return c<=h?NaN:(h+c)/2},median:function(h,c){return c<=h?NaN:(h+c)/2},mode:function(){throw Error("mode is not yet implemented")},sample:function(h,c){return(h+c)/2+(c-h)/2*f.sin(2*f.PI*A.uniform.sample(0,1))},variance:function(h,c){return c<=h?NaN:f.pow(c-h,2)/8}}),A.extend(A.laplace,{pdf:function(h,c,m){return m<=0?0:f.exp(-f.abs(h-c)/m)/(2*m)},cdf:function(h,c,m){return m<=0?0:h<c?.5*f.exp((h-c)/m):1-.5*f.exp(-(h-c)/m)},mean:function(h){return h},median:function(h){return h},mode:function(h){return h},variance:function(h,c){return 2*c*c},sample:function(h,c){var m=A._random_fn()-.5;return h-c*(m/f.abs(m))*f.log(1-2*f.abs(m))}}),A.extend(A.tukey,{cdf:function(h,c,m){var T=[.9894009349916499,.9445750230732326,.8656312023878318,.755404408355003,.6178762444026438,.45801677765722737,.2816035507792589,.09501250983763744],D=[.027152459411754096,.062253523938647894,.09515851168249279,.12462897125553388,.14959598881657674,.16915651939500254,.18260341504492358,.1894506104550685];if(h<=0)return 0;if(m<2||c<2)return NaN;if(!Number.isFinite(h))return 1;if(m>25e3)return b(h,1,c);var O=.5*m,N=O*f.log(m)-m*f.log(2)-A.gammaln(O),z=O-1,H=.25*m;P=m<=100?1:m<=800?.5:m<=5e3?.25:.125,N+=f.log(P);for(var $=0,V=1;V<=50;V++){for(var P,U,Y,Z=0,X=(2*V-1)*P,J=1;J<=16;J++)8<J?(U=J-8-1,Y=N+z*f.log(X+T[U]*P)-(T[U]*P+X)*H):(U=J-1,Y=N+z*f.log(X-T[U]*P)+(T[U]*P-X)*H),Y>=-30&&(Z+=b(8<J?h*f.sqrt((T[U]*P+X)*.5):h*f.sqrt((-(T[U]*P)+X)*.5),1,c)*D[U]*f.exp(Y));if(V*P>=1&&Z<=1e-14)break;$+=Z}if(Z>1e-14)throw Error("tukey.cdf failed to converge");return $>1&&($=1),$},inv:function(h,c,m){if(m<2||c<2||h<0||h>1)return NaN;if(h===0)return 0;if(h===1)return 1/0;var T,D,O,N,z,H,$=(O=.5-.5*h,z=(N=f.sqrt(f.log(1/(O*O))))+((((-453642210148e-16*N+-.204231210125)*N+-.342242088547)*N+-1)*N+.322232421088)/((((.0038560700634*N+.10353775285)*N+.531103462366)*N+.588581570495)*N+.099348462606),m<120&&(z+=(z*z*z+z)/m/4),H=.8832-.2368*z,m<120&&(H+=-1.214/m+1.208*z/m),z*(H*f.log(c-1)+1.4142)),V=A.tukey.cdf($,c,m)-h;T=V>0?f.max(0,$-1):$+1;for(var P=A.tukey.cdf(T,c,m)-h,U=1;U<50;U++)if(D=T-P*(T-$)/(P-V),V=P,$=T,D<0&&(D=0,P=-h),P=A.tukey.cdf(D,c,m)-h,T=D,1e-4>f.abs(T-$))return D;throw Error("tukey.inv failed to converge")}}),function(h,c){var m,T,D=Array.prototype.push,O=h.utils.isArray;function N($){return O($)||$ instanceof h}h.extend({add:function($,V){return N(V)?(N(V[0])||(V=[V]),h.map($,function(P,U,Y){return P+V[U][Y]})):h.map($,function(P){return P+V})},subtract:function($,V){return N(V)?(N(V[0])||(V=[V]),h.map($,function(P,U,Y){return P-V[U][Y]||0})):h.map($,function(P){return P-V})},divide:function($,V){return N(V)?(N(V[0])||(V=[V]),h.multiply($,h.inv(V))):h.map($,function(P){return P/V})},multiply:function($,V){var P,U,Y,Z,X,J,q,te;if($.length===void 0&&V.length===void 0)return $*V;if(X=$.length,J=$[0].length,q=h.zeros(X,Y=N(V)?V[0].length:J),te=0,N(V)){for(;te<Y;te++)for(P=0;P<X;P++){for(U=0,Z=0;U<J;U++)Z+=$[P][U]*V[U][te];q[P][te]=Z}return X===1&&te===1?q[0][0]:q}return h.map($,function(re){return re*V})},outer:function($,V){return h.multiply($.map(function(P){return[P]}),[V])},dot:function($,V){N($[0])||($=[$]),N(V[0])||(V=[V]);for(var P,U,Y=$[0].length===1&&$.length!==1?h.transpose($):$,Z=V[0].length===1&&V.length!==1?h.transpose(V):V,X=[],J=0,q=Y.length,te=Y[0].length;J<q;J++){for(U=0,X[J]=[],P=0;U<te;U++)P+=Y[J][U]*Z[J][U];X[J]=P}return X.length===1?X[0]:X},pow:function($,V){return h.map($,function(P){return c.pow(P,V)})},exp:function($){return h.map($,function(V){return c.exp(V)})},log:function($){return h.map($,function(V){return c.log(V)})},abs:function($){return h.map($,function(V){return c.abs(V)})},norm:function($,V){var P=0,U=0;for(isNaN(V)&&(V=2),N($[0])&&($=$[0]);U<$.length;U++)P+=c.pow(c.abs($[U]),V);return c.pow(P,1/V)},angle:function($,V){return c.acos(h.dot($,V)/(h.norm($)*h.norm(V)))},aug:function($,V){var P,U=[];for(P=0;P<$.length;P++)U.push($[P].slice());for(P=0;P<U.length;P++)D.apply(U[P],V[P]);return U},inv:function($){for(var V,P=$.length,U=$[0].length,Y=h.identity(P,U),Z=h.gauss_jordan($,Y),X=[],J=0;J<P;J++)for(X[J]=[],V=U;V<Z[0].length;V++)X[J][V-U]=Z[J][V];return X},det:function $(V){if(V.length===2)return V[0][0]*V[1][1]-V[0][1]*V[1][0];for(var P=0,U=0;U<V.length;U++){for(var Y=[],Z=1;Z<V.length;Z++){Y[Z-1]=[];for(var X=0;X<V.length;X++)X<U?Y[Z-1][X]=V[Z][X]:X>U&&(Y[Z-1][X-1]=V[Z][X])}var J=U%2?-1:1;P+=$(Y)*V[0][U]*J}return P},gauss_elimination:function($,V){var P,U,Y,Z,X=0,J=0,q=$.length,te=$[0].length,re=1,ie=0,ne=[];for(X=0,P=($=h.aug($,V))[0].length;X<q;X++){for(U=$[X][X],J=X,Z=X+1;Z<te;Z++)U<c.abs($[Z][X])&&(U=$[Z][X],J=Z);if(J!=X)for(Z=0;Z<P;Z++)Y=$[X][Z],$[X][Z]=$[J][Z],$[J][Z]=Y;for(J=X+1;J<q;J++)for(re=$[J][X]/$[X][X],Z=X;Z<P;Z++)$[J][Z]=$[J][Z]-re*$[X][Z]}for(X=q-1;X>=0;X--){for(ie=0,J=X+1;J<=q-1;J++)ie+=ne[J]*$[X][J];ne[X]=($[X][P-1]-ie)/$[X][X]}return ne},gauss_jordan:function($,V){var P,U,Y,Z=h.aug($,V),X=Z.length,J=Z[0].length,q=0;for(U=0;U<X;U++){var te=U;for(Y=U+1;Y<X;Y++)c.abs(Z[Y][U])>c.abs(Z[te][U])&&(te=Y);var re=Z[U];for(Z[U]=Z[te],Z[te]=re,Y=U+1;Y<X;Y++)for(q=Z[Y][U]/Z[U][U],P=U;P<J;P++)Z[Y][P]-=Z[U][P]*q}for(U=X-1;U>=0;U--){for(Y=0,q=Z[U][U];Y<U;Y++)for(P=J-1;P>U-1;P--)Z[Y][P]-=Z[U][P]*Z[Y][U]/q;for(Z[U][U]/=q,P=X;P<J;P++)Z[U][P]/=q}return Z},triaUpSolve:function($,V){var P,U=$[0].length,Y=h.zeros(1,U)[0],Z=!1;return V[0].length!=null&&(V=V.map(function(X){return X[0]}),Z=!0),h.arange(U-1,-1,-1).forEach(function(X){P=h.arange(X+1,U).map(function(J){return Y[J]*$[X][J]}),Y[X]=(V[X]-h.sum(P))/$[X][X]}),Z?Y.map(function(X){return[X]}):Y},triaLowSolve:function($,V){var P,U=$[0].length,Y=h.zeros(1,U)[0],Z=!1;return V[0].length!=null&&(V=V.map(function(X){return X[0]}),Z=!0),h.arange(U).forEach(function(X){P=h.arange(X).map(function(J){return $[X][J]*Y[J]}),Y[X]=(V[X]-h.sum(P))/$[X][X]}),Z?Y.map(function(X){return[X]}):Y},lu:function($){var V,P=$.length,U=h.identity(P),Y=h.zeros($.length,$[0].length);return h.arange(P).forEach(function(Z){Y[0][Z]=$[0][Z]}),h.arange(1,P).forEach(function(Z){h.arange(Z).forEach(function(X){V=h.arange(X).map(function(J){return U[Z][J]*Y[J][X]}),U[Z][X]=($[Z][X]-h.sum(V))/Y[X][X]}),h.arange(Z,P).forEach(function(X){V=h.arange(Z).map(function(J){return U[Z][J]*Y[J][X]}),Y[Z][X]=$[V.length][X]-h.sum(V)})}),[U,Y]},cholesky:function($){var V,P=$.length,U=h.zeros($.length,$[0].length);return h.arange(P).forEach(function(Y){V=h.arange(Y).map(function(Z){return c.pow(U[Y][Z],2)}),U[Y][Y]=c.sqrt($[Y][Y]-h.sum(V)),h.arange(Y+1,P).forEach(function(Z){V=h.arange(Y).map(function(X){return U[Y][X]*U[Z][X]}),U[Z][Y]=($[Y][Z]-h.sum(V))/U[Y][Y]})}),U},gauss_jacobi:function($,V,P,U){for(var Y,Z,X,J,q=0,te=0,re=$.length,ie=[],ne=[],le=[];q<re;q++)for(te=0,ie[q]=[],ne[q]=[],le[q]=[];te<re;te++)q>te?(ie[q][te]=$[q][te],ne[q][te]=le[q][te]=0):q<te?(ne[q][te]=$[q][te],ie[q][te]=le[q][te]=0):(le[q][te]=$[q][te],ie[q][te]=ne[q][te]=0);for(X=h.multiply(h.multiply(h.inv(le),h.add(ie,ne)),-1),Z=h.multiply(h.inv(le),V),Y=P,J=h.add(h.multiply(X,P),Z),q=2;c.abs(h.norm(h.subtract(J,Y)))>U;)Y=J,J=h.add(h.multiply(X,Y),Z),q++;return J},gauss_seidel:function($,V,P,U){for(var Y,Z,X,J,q,te=0,re=$.length,ie=[],ne=[],le=[];te<re;te++)for(Y=0,ie[te]=[],ne[te]=[],le[te]=[];Y<re;Y++)te>Y?(ie[te][Y]=$[te][Y],ne[te][Y]=le[te][Y]=0):te<Y?(ne[te][Y]=$[te][Y],ie[te][Y]=le[te][Y]=0):(le[te][Y]=$[te][Y],ie[te][Y]=ne[te][Y]=0);for(J=h.multiply(h.multiply(h.inv(h.add(le,ie)),ne),-1),X=h.multiply(h.inv(h.add(le,ie)),V),Z=P,q=h.add(h.multiply(J,P),X),te=2;c.abs(h.norm(h.subtract(q,Z)))>U;)Z=q,q=h.add(h.multiply(J,Z),X),te+=1;return q},SOR:function($,V,P,U,Y){for(var Z,X,J,q,te,re=0,ie=$.length,ne=[],le=[],fe=[];re<ie;re++)for(Z=0,ne[re]=[],le[re]=[],fe[re]=[];Z<ie;Z++)re>Z?(ne[re][Z]=$[re][Z],le[re][Z]=fe[re][Z]=0):re<Z?(le[re][Z]=$[re][Z],ne[re][Z]=fe[re][Z]=0):(fe[re][Z]=$[re][Z],ne[re][Z]=le[re][Z]=0);for(q=h.multiply(h.inv(h.add(fe,h.multiply(ne,Y))),h.subtract(h.multiply(fe,1-Y),h.multiply(le,Y))),J=h.multiply(h.multiply(h.inv(h.add(fe,h.multiply(ne,Y))),V),Y),X=P,te=h.add(h.multiply(q,P),J),re=2;c.abs(h.norm(h.subtract(te,X)))>U;)X=te,te=h.add(h.multiply(q,X),J),re++;return te},householder:function($){for(var V,P,U,Y,Z=$.length,X=$[0].length,J=0,q=[],te=[];J<Z-1;J++){for(V=0,Y=J+1;Y<X;Y++)V+=$[Y][J]*$[Y][J];for(V=($[J+1][J]>0?-1:1)*c.sqrt(V),P=c.sqrt((V*V-$[J+1][J]*V)/2),(q=h.zeros(Z,1))[J+1][0]=($[J+1][J]-V)/(2*P),U=J+2;U<Z;U++)q[U][0]=$[U][J]/(2*P);te=h.subtract(h.identity(Z,X),h.multiply(h.multiply(q,h.transpose(q)),2)),$=h.multiply(te,h.multiply($,te))}return $},QR:(m=h.sum,T=h.arange,function($){var V,P,U,Y=$.length,Z=$[0].length,X=h.zeros(Z,Z);for(P=0,$=h.copy($);P<Z;P++){for(V=0,X[P][P]=c.sqrt(m(T(Y).map(function(J){return $[J][P]*$[J][P]})));V<Y;V++)$[V][P]=$[V][P]/X[P][P];for(U=P+1;U<Z;U++)for(V=0,X[P][U]=m(T(Y).map(function(J){return $[J][P]*$[J][U]}));V<Y;V++)$[V][U]=$[V][U]-$[V][P]*X[P][U]}return[$,X]}),lstsq:function($,V){var P,U,Y,Z=!1;V[0].length===void 0&&(V=V.map(function(fe){return[fe]}),Z=!0);var X=h.QR($),J=X[0],q=X[1],te=$[0].length,re=h.slice(J,{col:{end:te}}),ie=(P=h.slice(q,{row:{end:te}}),U=(P=h.copy(P)).length,Y=h.identity(U),h.arange(U-1,-1,-1).forEach(function(fe){h.sliceAssign(Y,{row:fe},h.divide(h.slice(Y,{row:fe}),P[fe][fe])),h.sliceAssign(P,{row:fe},h.divide(h.slice(P,{row:fe}),P[fe][fe])),h.arange(fe).forEach(function(we){var pe=h.multiply(P[we][fe],-1),ve=h.slice(P,{row:we}),be=h.multiply(h.slice(P,{row:fe}),pe);h.sliceAssign(P,{row:we},h.add(ve,be));var Ee=h.slice(Y,{row:we}),Re=h.multiply(h.slice(Y,{row:fe}),pe);h.sliceAssign(Y,{row:we},h.add(Ee,Re))})}),Y),ne=h.transpose(re);ne[0].length===void 0&&(ne=[ne]);var le=h.multiply(h.multiply(ie,ne),V);return le.length===void 0&&(le=[[le]]),Z?le.map(function(fe){return fe[0]}):le},jacobi:function($){for(var V,P,U,Y,Z,X,J,q=1,te=$.length,re=h.identity(te,te),ie=[];q===1;){for(V=0,Z=$[0][1],U=0,Y=1;V<te;V++)for(P=0;P<te;P++)V!=P&&Z<c.abs($[V][P])&&(Z=c.abs($[V][P]),U=V,Y=P);for(V=1,X=$[U][U]===$[Y][Y]?$[U][Y]>0?c.PI/4:-c.PI/4:c.atan(2*$[U][Y]/($[U][U]-$[Y][Y]))/2,(J=h.identity(te,te))[U][U]=c.cos(X),J[U][Y]=-c.sin(X),J[Y][U]=c.sin(X),J[Y][Y]=c.cos(X),re=h.multiply(re,J),$=h.multiply(h.multiply(h.inv(J),$),J),q=0;V<te;V++)for(P=1;P<te;P++)V!=P&&c.abs($[V][P])>.001&&(q=1)}for(V=0;V<te;V++)ie.push($[V][V]);return[re,ie]},rungekutta:function($,V,P,U,Y,Z){var X,J,q,te;if(Z===2)for(;U<=P;)X=V*$(U,Y),J=V*$(U+V,Y+X),Y+=(X+J)/2,U+=V;if(Z===4)for(;U<=P;)X=V*$(U,Y),J=V*$(U+V/2,Y+X/2),q=V*$(U+V/2,Y+J/2),te=V*$(U+V,Y+q),Y+=(X+2*J+2*q+te)/6,U+=V;return Y},romberg:function($,V,P,U){for(var Y,Z,X,J,q,te=0,re=(P-V)/2,ie=[],ne=[],le=[];te<U/2;){for(q=$(V),X=V,J=0;X<=P;X+=re,J++)ie[J]=X;for(X=1,Y=ie.length;X<Y-1;X++)q+=(X%2!=0?4:2)*$(ie[X]);q=re/3*(q+$(P)),le[te]=q,re/=2,te++}for(Z=le.length,Y=1;Z!==1;){for(X=0;X<Z-1;X++)ne[X]=(c.pow(4,Y)*le[X+1]-le[X])/(c.pow(4,Y)-1);Z=ne.length,le=ne,ne=[],Y++}return le},richardson:function($,V,P,U){function Y(fe,we){for(var pe,ve=0,be=fe.length;ve<be;ve++)fe[ve]===we&&(pe=ve);return pe}for(var Z,X,J,q,te,re=c.abs(P-$[Y($,P)+1]),ie=0,ne=[],le=[];U>=re;)Z=Y($,P+U),X=Y($,P),ne[ie]=(V[Z]-2*V[X]+V[2*X-Z])/(U*U),U/=2,ie++;for(q=ne.length,J=1;q!=1;){for(te=0;te<q-1;te++)le[te]=(c.pow(4,J)*ne[te+1]-ne[te])/(c.pow(4,J)-1);q=le.length,ne=le,le=[],J++}return ne},simpson:function($,V,P,U){for(var Y,Z=(P-V)/U,X=$(V),J=[],q=V,te=0,re=1;q<=P;q+=Z,te++)J[te]=q;for(Y=J.length;re<Y-1;re++)X+=(re%2!=0?4:2)*$(J[re]);return Z/3*(X+$(P))},hermite:function($,V,P,U){for(var Y,Z=$.length,X=0,J=0,q=[],te=[],re=[],ie=[];J<Z;J++){for(Y=0,q[J]=1;Y<Z;Y++)J!=Y&&(q[J]*=(U-$[Y])/($[J]-$[Y]));for(Y=0,te[J]=0;Y<Z;Y++)J!=Y&&(te[J]+=1/($[J]-$[Y]));re[J]=(1-2*(U-$[J])*te[J])*(q[J]*q[J]),ie[J]=(U-$[J])*(q[J]*q[J]),X+=re[J]*V[J]+ie[J]*P[J]}return X},lagrange:function($,V,P){for(var U,Y,Z=0,X=0,J=$.length;X<J;X++){for(U=0,Y=V[X];U<J;U++)X!=U&&(Y*=(P-$[U])/($[X]-$[U]));Z+=Y}return Z},cubic_spline:function($,V,P){for(var U,Y=$.length,Z=0,X=[],J=[],q=[],te=[],re=[],ie=[],ne=[];Z<Y-1;Z++)re[Z]=$[Z+1]-$[Z];for(Z=1,q[0]=0;Z<Y-1;Z++)q[Z]=3/re[Z]*(V[Z+1]-V[Z])-3/re[Z-1]*(V[Z]-V[Z-1]);for(Z=1;Z<Y-1;Z++)X[Z]=[],J[Z]=[],X[Z][Z-1]=re[Z-1],X[Z][Z]=2*(re[Z-1]+re[Z]),X[Z][Z+1]=re[Z],J[Z][0]=q[Z];for(U=0,te=h.multiply(h.inv(X),J);U<Y-1;U++)ie[U]=(V[U+1]-V[U])/re[U]-re[U]*(te[U+1][0]+2*te[U][0])/3,ne[U]=(te[U+1][0]-te[U][0])/(3*re[U]);for(U=0;U<Y&&!($[U]>P);U++);return V[U-=1]+(P-$[U])*ie[U]+h.sq(P-$[U])*te[U]+(P-$[U])*h.sq(P-$[U])*ne[U]},gauss_quadrature:function(){throw Error("gauss_quadrature not yet implemented")},PCA:function($){var V,P,U=$.length,Y=$[0].length,Z=0,X=[],J=[],q=[],te=[],re=[],ie=[],ne=[],le=[],fe=[],we=[];for(Z=0;Z<U;Z++)X[Z]=h.sum($[Z])/Y;for(Z=0;Z<Y;Z++)for(V=0,ne[Z]=[];V<U;V++)ne[Z][V]=$[V][Z]-X[V];for(Z=0,ne=h.transpose(ne);Z<U;Z++)for(V=0,le[Z]=[];V<U;V++)le[Z][V]=h.dot([ne[Z]],[ne[V]])/(Y-1);for(Z=0,fe=(q=h.jacobi(le))[0],J=q[1],we=h.transpose(fe);Z<J.length;Z++)for(V=Z;V<J.length;V++)J[Z]<J[V]&&(P=J[Z],J[Z]=J[V],J[V]=P,te=we[Z],we[Z]=we[V],we[V]=te);for(Z=0,ie=h.transpose(ne);Z<U;Z++)for(V=0,re[Z]=[];V<ie.length;V++)re[Z][V]=h.dot([we[Z]],[ie[V]]);return[$,J,we,re]}});for(var z="add divide multiply subtract dot pow exp log abs norm angle".split(" "),H=0;H<z.length;H++)(function($){h.fn[$]=function(V,P){var U=this;return P?(setTimeout(function(){P.call(U,h.fn[$].call(U,V))},15),this):typeof h[$](this,V)=="number"?h[$](this,V):h(h[$](this,V))}})(z[H])}(A,Math);var s=Math,l=[].slice,w=A.utils.isNumber,I=A.utils.isArray;function C(h,c,m,T){if(h>1||m>1||h<=0||m<=0)throw Error("Proportions should be greater than 0 and less than 1");var D=(h*c+m*T)/(c+T);return(h-m)/s.sqrt(D*(1-D)*(1/c+1/T))}return A.extend({zscore:function(){var h=l.call(arguments);return w(h[1])?(h[0]-h[1])/h[2]:(h[0]-A.mean(h[1]))/A.stdev(h[1],h[2])},ztest:function(){var h,c=l.call(arguments);return I(c[1])?(h=A.zscore(c[0],c[1],c[3]),c[2]===1?A.normal.cdf(-s.abs(h),0,1):2*A.normal.cdf(-s.abs(h),0,1)):c.length>2?(h=A.zscore(c[0],c[1],c[2]),c[3]===1?A.normal.cdf(-s.abs(h),0,1):2*A.normal.cdf(-s.abs(h),0,1)):(h=c[0],c[1]===1?A.normal.cdf(-s.abs(h),0,1):2*A.normal.cdf(-s.abs(h),0,1))}}),A.extend(A.fn,{zscore:function(h,c){return(h-this.mean())/this.stdev(c)},ztest:function(h,c,m){var T=s.abs(this.zscore(h,m));return c===1?A.normal.cdf(-T,0,1):2*A.normal.cdf(-T,0,1)}}),A.extend({tscore:function(){var h=l.call(arguments);return h.length===4?(h[0]-h[1])/(h[2]/s.sqrt(h[3])):(h[0]-A.mean(h[1]))/(A.stdev(h[1],!0)/s.sqrt(h[1].length))},ttest:function(){var h,c=l.call(arguments);return c.length===5?(h=s.abs(A.tscore(c[0],c[1],c[2],c[3])),c[4]===1?A.studentt.cdf(-h,c[3]-1):2*A.studentt.cdf(-h,c[3]-1)):w(c[1])?(h=s.abs(c[0]),c[2]==1?A.studentt.cdf(-h,c[1]-1):2*A.studentt.cdf(-h,c[1]-1)):(h=s.abs(A.tscore(c[0],c[1])),c[2]==1?A.studentt.cdf(-h,c[1].length-1):2*A.studentt.cdf(-h,c[1].length-1))}}),A.extend(A.fn,{tscore:function(h){return(h-this.mean())/(this.stdev(!0)/s.sqrt(this.cols()))},ttest:function(h,c){return c===1?1-A.studentt.cdf(s.abs(this.tscore(h)),this.cols()-1):2*A.studentt.cdf(-s.abs(this.tscore(h)),this.cols()-1)}}),A.extend({anovafscore:function(){var h,c,m,T,D,O,N,z,H=l.call(arguments);if(H.length===1){for(N=0,D=Array(H[0].length);N<H[0].length;N++)D[N]=H[0][N];H=D}for(N=0,c=[];N<H.length;N++)c=c.concat(H[N]);for(N=0,m=A.mean(c),h=0;N<H.length;N++)h+=H[N].length*s.pow(A.mean(H[N])-m,2);for(h/=H.length-1,O=0,N=0;N<H.length;N++)for(z=0,T=A.mean(H[N]);z<H[N].length;z++)O+=s.pow(H[N][z]-T,2);return h/(O/=c.length-H.length)},anovaftest:function(){var h,c,m,T,D=l.call(arguments);if(w(D[0]))return 1-A.centralF.cdf(D[0],D[1],D[2]);var O=A.anovafscore(D);for(T=0,h=D.length-1,m=0;T<D.length;T++)m+=D[T].length;return c=m-h-1,1-A.centralF.cdf(O,h,c)},ftest:function(h,c,m){return 1-A.centralF.cdf(h,c,m)}}),A.extend(A.fn,{anovafscore:function(){return A.anovafscore(this.toArray())},anovaftes:function(){var h,c=0;for(h=0;h<this.length;h++)c+=this[h].length;return A.ftest(this.anovafscore(),this.length-1,c-this.length)}}),A.extend({qscore:function(){var h,c,m,T,D,O=l.call(arguments);return w(O[0])?(h=O[0],c=O[1],m=O[2],T=O[3],D=O[4]):(h=A.mean(O[0]),c=A.mean(O[1]),m=O[0].length,T=O[1].length,D=O[2]),s.abs(h-c)/(D*s.sqrt((1/m+1/T)/2))},qtest:function(){var h,c=l.call(arguments);c.length===3?(h=c[0],c=c.slice(1)):c.length===7?(h=A.qscore(c[0],c[1],c[2],c[3],c[4]),c=c.slice(5)):(h=A.qscore(c[0],c[1],c[2]),c=c.slice(3));var m=c[0],T=c[1];return 1-A.tukey.cdf(h,T,m-T)},tukeyhsd:function(h){for(var c=A.pooledstdev(h),m=h.map(function(H){return A.mean(H)}),T=h.reduce(function(H,$){return H+$.length},0),D=[],O=0;O<h.length;++O)for(var N=O+1;N<h.length;++N){var z=A.qtest(m[O],m[N],h[O].length,h[N].length,c,T,h.length);D.push([[O,N],z])}return D}}),A.extend({normalci:function(){var h,c=l.call(arguments),m=[,,];return h=c.length===4?s.abs(A.normal.inv(c[1]/2,0,1)*c[2]/s.sqrt(c[3])):s.abs(A.normal.inv(c[1]/2,0,1)*A.stdev(c[2])/s.sqrt(c[2].length)),m[0]=c[0]-h,m[1]=c[0]+h,m},tci:function(){var h,c=l.call(arguments),m=[,,];return h=c.length===4?s.abs(A.studentt.inv(c[1]/2,c[3]-1)*c[2]/s.sqrt(c[3])):s.abs(A.studentt.inv(c[1]/2,c[2].length-1)*A.stdev(c[2],!0)/s.sqrt(c[2].length)),m[0]=c[0]-h,m[1]=c[0]+h,m},significant:function(h,c){return h<c}}),A.extend(A.fn,{normalci:function(h,c){return A.normalci(h,c,this.toArray())},tci:function(h,c){return A.tci(h,c,this.toArray())}}),A.extend(A.fn,{oneSidedDifferenceOfProportions:function(h,c,m,T){var D=C(h,c,m,T);return A.ztest(D,1)},twoSidedDifferenceOfProportions:function(h,c,m,T){var D=C(h,c,m,T);return A.ztest(D,2)}}),A.models=function(){function h(c,m){var T=c.length,D=m[0].length-1,O=A.lstsq(m,c),N=A.multiply(m,O.map(function(U){return[U]})).map(function(U){return U[0]}),z=A.subtract(c,N),H=A.mean(c),$=A.sum(N.map(function(U){return Math.pow(U-H,2)})),V=A.sum(c.map(function(U,Y){return Math.pow(U-N[Y],2)})),P=$+V;return{exog:m,endog:c,nobs:T,df_model:D,df_resid:T-D-1,coef:O,predict:N,resid:z,ybar:H,SST:P,SSE:$,SSR:V,R2:$/P}}return{ols:function(c,m){var T,D,O,N,z,H,$,V,P,U,Y,Z,X,J,q=h(c,m),te=(D=(T=q.exog)[0].length,O=A.arange(D).map(function(ne){var le=A.arange(D).filter(function(fe){return fe!==ne});return h(A.col(T,ne).map(function(fe){return fe[0]}),A.col(T,le))}),N=Math.sqrt(q.SSR/q.df_resid),z=O.map(function(ne){return N/Math.sqrt(ne.SST*(1-ne.R2))}),$=(H=q.coef.map(function(ne,le){return(ne-0)/z[le]})).map(function(ne){var le=A.studentt.cdf(ne,q.df_resid);return(le>.5?1-le:le)*2}),V=A.studentt.inv(.975,q.df_resid),P=q.coef.map(function(ne,le){var fe=V*z[le];return[ne-fe,ne+fe]}),{se:z,t:H,p:$,sigmaHat:N,interval95:P}),re=(J=1-(Y=U=q.R2/q.df_model/((1-q.R2)/q.df_resid),Z=q.df_model,X=q.df_resid,A.beta.cdf(Y/(X/Z+Y),Z/2,X/2)),{F_statistic:U,pvalue:J}),ie=1-(1-q.R2)*((q.nobs-1)/q.df_resid);return q.t=te,q.f=re,q.adjust_R2=ie,q}}}(),A.extend({buildxmatrix:function(){for(var h=Array(arguments.length),c=0;c<arguments.length;c++){var m=[1];h[c]=m.concat(arguments[c])}return A(h)},builddxmatrix:function(){for(var h=Array(arguments[0].length),c=0;c<arguments[0].length;c++){var m=[1];h[c]=m.concat(arguments[0][c])}return A(h)},buildjxmatrix:function(h){for(var c=Array(h.length),m=0;m<h.length;m++)c[m]=h[m];return A.builddxmatrix(c)},buildymatrix:function(h){return A(h).transpose()},buildjymatrix:function(h){return h.transpose()},matrixmult:function(h,c){var m,T,D,O,N;if(h.cols()==c.rows()){if(c.rows()>1){for(m=0,O=[];m<h.rows();m++)for(T=0,O[m]=[];T<c.cols();T++){for(D=0,N=0;D<h.cols();D++)N+=h.toArray()[m][D]*c.toArray()[D][T];O[m][T]=N}return A(O)}for(m=0,O=[];m<h.rows();m++)for(T=0,O[m]=[];T<c.cols();T++){for(D=0,N=0;D<h.cols();D++)N+=h.toArray()[m][D]*c.toArray()[T];O[m][T]=N}return A(O)}},regress:function(h,c){var m=A.xtranspxinv(h),T=h.transpose(),D=A.matrixmult(A(m),T);return A.matrixmult(D,c)},regresst:function(h,c,m){var T,D,O,N=A.regress(h,c),z={};z.anova={};var H=A.jMatYBar(h,N);z.yBar=H;var $=c.mean();z.anova.residuals=A.residuals(c,H),z.anova.ssr=A.ssr(H,$),z.anova.msr=z.anova.ssr/(h[0].length-1),z.anova.sse=A.sse(c,H),z.anova.mse=z.anova.sse/(c.length-(h[0].length-1)-1),z.anova.sst=A.sst(c,$),z.anova.mst=z.anova.sst/(c.length-1),z.anova.r2=1-z.anova.sse/z.anova.sst,z.anova.r2<0&&(z.anova.r2=0),z.anova.fratio=z.anova.msr/z.anova.mse,z.anova.pvalue=A.anovaftest(z.anova.fratio,h[0].length-1,c.length-(h[0].length-1)-1),z.anova.rmse=Math.sqrt(z.anova.mse),z.anova.r2adj=1-z.anova.mse/z.anova.mst,z.anova.r2adj<0&&(z.anova.r2adj=0),z.stats=Array(h[0].length);for(var V=A.xtranspxinv(h),P=0;P<N.length;P++)T=Math.sqrt(z.anova.mse*Math.abs(V[P][P])),D=Math.abs(N[P]/T),O=A.ttest(D,c.length-h[0].length-1,m),z.stats[P]=[N[P],T,D,O];return z.regress=N,z},xtranspx:function(h){return A.matrixmult(h.transpose(),h)},xtranspxinv:function(h){var c=A.matrixmult(h.transpose(),h);return A.inv(c)},jMatYBar:function(h,c){var m=A.matrixmult(h,c);return new A(m)},residuals:function(h,c){return A.matrixsubtract(h,c)},ssr:function(h,c){for(var m=0,T=0;T<h.length;T++)m+=Math.pow(h[T]-c,2);return m},sse:function(h,c){for(var m=0,T=0;T<h.length;T++)m+=Math.pow(h[T]-c[T],2);return m},sst:function(h,c){for(var m=0,T=0;T<h.length;T++)m+=Math.pow(h[T]-c,2);return m},matrixsubtract:function(h,c){for(var m=Array(h.length),T=0;T<h.length;T++){m[T]=Array(h[T].length);for(var D=0;D<h[T].length;D++)m[T][D]=h[T][D]-c[T][D]}return A(m)}}),A.jStat=A,A}()},25074:function(E){var A,u;A=typeof self<"u"?self:this,u=function(){function o(){}o.prototype.saveState=function(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}},o.prototype.restoreState=function(C){this.idx=C.idx,this.input=C.input,this.groupIdx=C.groupIdx},o.prototype.pattern=function(C){this.idx=0,this.input=C,this.groupIdx=0,this.consumeChar("/");var h=this.disjunction();this.consumeChar("/");for(var c={type:"Flags",global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};this.isRegExpFlag();)switch(this.popChar()){case"g":v(c,"global");break;case"i":v(c,"ignoreCase");break;case"m":v(c,"multiLine");break;case"u":v(c,"unicode");break;case"y":v(c,"sticky")}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:c,value:h}},o.prototype.disjunction=function(){var C=[];for(C.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),C.push(this.alternative());return{type:"Disjunction",value:C}},o.prototype.alternative=function(){for(var C=[];this.isTerm();)C.push(this.term());return{type:"Alternative",value:C}},o.prototype.term=function(){return this.isAssertion()?this.assertion():this.atom()},o.prototype.assertion=function(){switch(this.popChar()){case"^":return{type:"StartAnchor"};case"$":return{type:"EndAnchor"};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary"};case"B":return{type:"NonWordBoundary"}}throw Error("Invalid Assertion Escape");case"(":switch(this.consumeChar("?"),this.popChar()){case"=":C="Lookahead";break;case"!":C="NegativeLookahead"}b(C);var C,h=this.disjunction();return this.consumeChar(")"),{type:C,value:h}}throw Error("Internal Error - Should never get here!")},o.prototype.quantifier=function(C){var h;switch(this.popChar()){case"*":h={atLeast:0,atMost:1/0};break;case"+":h={atLeast:1,atMost:1/0};break;case"?":h={atLeast:0,atMost:1};break;case"{":var c=this.integerIncludingZero();switch(this.popChar()){case"}":h={atLeast:c,atMost:c};break;case",":h=this.isDigit()?{atLeast:c,atMost:this.integerIncludingZero()}:{atLeast:c,atMost:1/0},this.consumeChar("}")}if(C===!0&&h===void 0)return;b(h)}if(C!==!0||h!==void 0)return b(h),this.peekChar(0)==="?"?(this.consumeChar("?"),h.greedy=!1):h.greedy=!0,h.type="Quantifier",h},o.prototype.atom=function(){var C;switch(this.peekChar()){case".":C=this.dotAll();break;case"\\":C=this.atomEscape();break;case"[":C=this.characterClass();break;case"(":C=this.group()}return C===void 0&&this.isPatternCharacter()&&(C=this.patternCharacter()),b(C),this.isQuantifier()&&(C.quantifier=this.quantifier()),C},o.prototype.dotAll=function(){return this.consumeChar("."),{type:"Set",complement:!0,value:[y(`
`),y("\r"),y("\u2028"),y("\u2029")]}},o.prototype.atomEscape=function(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}},o.prototype.decimalEscapeAtom=function(){return{type:"GroupBackReference",value:this.positiveInteger()}},o.prototype.characterClassEscape=function(){var C,h=!1;switch(this.popChar()){case"d":C=s;break;case"D":C=s,h=!0;break;case"s":C=w;break;case"S":C=w,h=!0;break;case"w":C=l;break;case"W":C=l,h=!0}return b(C),{type:"Set",value:C,complement:h}},o.prototype.controlEscapeAtom=function(){var C;switch(this.popChar()){case"f":C=y("\f");break;case"n":C=y(`
`);break;case"r":C=y("\r");break;case"t":C=y(" ");break;case"v":C=y("\v")}return b(C),{type:"Character",value:C}},o.prototype.controlLetterEscapeAtom=function(){this.consumeChar("c");var C=this.popChar();if(/[a-zA-Z]/.test(C)===!1)throw Error("Invalid ");return{type:"Character",value:C.toUpperCase().charCodeAt(0)-64}},o.prototype.nulCharacterAtom=function(){return this.consumeChar("0"),{type:"Character",value:y("\0")}},o.prototype.hexEscapeSequenceAtom=function(){return this.consumeChar("x"),this.parseHexDigits(2)},o.prototype.regExpUnicodeEscapeSequenceAtom=function(){return this.consumeChar("u"),this.parseHexDigits(4)},o.prototype.identityEscapeAtom=function(){return{type:"Character",value:y(this.popChar())}},o.prototype.classPatternCharacterAtom=function(){switch(this.peekChar()){case`
`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:return{type:"Character",value:y(this.popChar())}}},o.prototype.characterClass=function(){var C=[],h=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),h=!0);this.isClassAtom();){var c=this.classAtom();if(c.type==="Character"&&this.isRangeDash()){this.consumeChar("-");var m=this.classAtom();if(m.type==="Character"){if(m.value<c.value)throw Error("Range out of order in character class");C.push({from:c.value,to:m.value})}else d(c.value,C),C.push(y("-")),d(m.value,C)}else d(c.value,C)}return this.consumeChar("]"),{type:"Set",complement:h,value:C}},o.prototype.classAtom=function(){switch(this.peekChar()){case"]":case`
`:case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}},o.prototype.classEscape=function(){switch(this.consumeChar("\\"),this.peekChar()){case"b":return this.consumeChar("b"),{type:"Character",value:y("\b")};case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}},o.prototype.group=function(){var C=!0;this.consumeChar("("),this.peekChar(0)==="?"?(this.consumeChar("?"),this.consumeChar(":"),C=!1):this.groupIdx++;var h=this.disjunction();this.consumeChar(")");var c={type:"Group",capturing:C,value:h};return C&&(c.idx=this.groupIdx),c},o.prototype.positiveInteger=function(){var C=this.popChar();if(f.test(C)===!1)throw Error("Expecting a positive integer");for(;p.test(this.peekChar(0));)C+=this.popChar();return parseInt(C,10)},o.prototype.integerIncludingZero=function(){var C=this.popChar();if(p.test(C)===!1)throw Error("Expecting an integer");for(;p.test(this.peekChar(0));)C+=this.popChar();return parseInt(C,10)},o.prototype.patternCharacter=function(){var C=this.popChar();switch(C){case`
`:case"\r":case"\u2028":case"\u2029":case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":throw Error("TBD");default:return{type:"Character",value:y(C)}}},o.prototype.isRegExpFlag=function(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return!0;default:return!1}},o.prototype.isRangeDash=function(){return this.peekChar()==="-"&&this.isClassAtom(1)},o.prototype.isDigit=function(){return p.test(this.peekChar(0))},o.prototype.isClassAtom=function(C){switch(C===void 0&&(C=0),this.peekChar(C)){case"]":case`
`:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}},o.prototype.isTerm=function(){return this.isAtom()||this.isAssertion()},o.prototype.isAtom=function(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case".":case"\\":case"[":case"(":return!0;default:return!1}},o.prototype.isAssertion=function(){switch(this.peekChar(0)){case"^":case"$":return!0;case"\\":switch(this.peekChar(1)){case"b":case"B":return!0;default:return!1}case"(":return this.peekChar(1)==="?"&&(this.peekChar(2)==="="||this.peekChar(2)==="!");default:return!1}},o.prototype.isQuantifier=function(){var C=this.saveState();try{return this.quantifier(!0)!==void 0}catch{return!1}finally{this.restoreState(C)}},o.prototype.isPatternCharacter=function(){switch(this.peekChar()){case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case`
`:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}},o.prototype.parseHexDigits=function(C){for(var h="",c=0;c<C;c++){var m=this.popChar();if(_.test(m)===!1)throw Error("Expecting a HexDecimal digits");h+=m}return{type:"Character",value:parseInt(h,16)}},o.prototype.peekChar=function(C){return C===void 0&&(C=0),this.input[this.idx+C]},o.prototype.popChar=function(){var C=this.peekChar(0);return this.consumeChar(),C},o.prototype.consumeChar=function(C){if(C!==void 0&&this.input[this.idx]!==C)throw Error("Expected: '"+C+"' but found: '"+this.input[this.idx]+"' at offset: "+this.idx);if(this.idx>=this.input.length)throw Error("Unexpected end of input");this.idx++};var S,_=/[0-9a-fA-F]/,p=/[0-9]/,f=/[1-9]/;function y(C){return C.charCodeAt(0)}function d(C,h){C.length!==void 0?C.forEach(function(c){h.push(c)}):h.push(C)}function v(C,h){if(C[h]===!0)throw"duplicate flag "+h;C[h]=!0}function b(C){if(C===void 0)throw Error("Internal Error - Should never get here!")}var s=[];for(S=y("0");S<=y("9");S++)s.push(S);var l=[y("_")].concat(s);for(S=y("a");S<=y("z");S++)l.push(S);for(S=y("A");S<=y("Z");S++)l.push(S);var w=[y(" "),y("\f"),y(`
`),y("\r"),y(" "),y("\v"),y(" "),y(" "),y(" "),y(" "),y(" "),y(" "),y(" "),y(" "),y(" "),y(" "),y(" "),y(" "),y(" "),y(" "),y("\u2028"),y("\u2029"),y(" "),y(" "),y(" "),y("\uFEFF")];function I(){}return I.prototype.visitChildren=function(C){for(var h in C){var c=C[h];C.hasOwnProperty(h)&&(c.type!==void 0?this.visit(c):Array.isArray(c)&&c.forEach(function(m){this.visit(m)},this))}},I.prototype.visit=function(C){switch(C.type){case"Pattern":this.visitPattern(C);break;case"Flags":this.visitFlags(C);break;case"Disjunction":this.visitDisjunction(C);break;case"Alternative":this.visitAlternative(C);break;case"StartAnchor":this.visitStartAnchor(C);break;case"EndAnchor":this.visitEndAnchor(C);break;case"WordBoundary":this.visitWordBoundary(C);break;case"NonWordBoundary":this.visitNonWordBoundary(C);break;case"Lookahead":this.visitLookahead(C);break;case"NegativeLookahead":this.visitNegativeLookahead(C);break;case"Character":this.visitCharacter(C);break;case"Set":this.visitSet(C);break;case"Group":this.visitGroup(C);break;case"GroupBackReference":this.visitGroupBackReference(C);break;case"Quantifier":this.visitQuantifier(C)}this.visitChildren(C)},I.prototype.visitPattern=function(C){},I.prototype.visitFlags=function(C){},I.prototype.visitDisjunction=function(C){},I.prototype.visitAlternative=function(C){},I.prototype.visitStartAnchor=function(C){},I.prototype.visitEndAnchor=function(C){},I.prototype.visitWordBoundary=function(C){},I.prototype.visitNonWordBoundary=function(C){},I.prototype.visitLookahead=function(C){},I.prototype.visitNegativeLookahead=function(C){},I.prototype.visitCharacter=function(C){},I.prototype.visitSet=function(C){},I.prototype.visitGroup=function(C){},I.prototype.visitGroupBackReference=function(C){},I.prototype.visitQuantifier=function(C){},{RegExpParser:o,BaseRegExpVisitor:I,VERSION:"0.4.0"}},E.exports?E.exports=u():A.regexpToAst=u()},6890:function(E,A,u){var o=u(67199),S=Array.prototype.concat,_=Array.prototype.slice,p=E.exports=function(f){for(var y=[],d=0,v=f.length;d<v;d++){var b=f[d];o(b)?y=S.call(y,_.call(b)):y.push(b)}return y};p.wrap=function(f){return function(){return f(p(arguments))}}},83243:function(E){function A(){this.table=new Uint16Array(16),this.trans=new Uint16Array(288)}function u(m,T){this.source=m,this.sourceIndex=0,this.tag=0,this.bitcount=0,this.dest=T,this.destLen=0,this.ltree=new A,this.dtree=new A}var o,S=new A,_=new A,p=new Uint8Array(30),f=new Uint16Array(30),y=new Uint8Array(30),d=new Uint16Array(30),v=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),b=new A,s=new Uint8Array(320);function l(m,T,D,O){var N,z;for(N=0;N<D;++N)m[N]=0;for(N=0;N<30-D;++N)m[N+D]=N/D|0;for(z=O,N=0;N<30;++N)T[N]=z,z+=1<<m[N]}var w=new Uint16Array(16);function I(m,T,D,O){var N,z;for(N=0;N<16;++N)m.table[N]=0;for(N=0;N<O;++N)m.table[T[D+N]]++;for(z=0,m.table[0]=0,N=0;N<16;++N)w[N]=z,z+=m.table[N];for(N=0;N<O;++N)T[D+N]&&(m.trans[w[T[D+N]]++]=N)}function C(m,T,D){if(!T)return D;for(;m.bitcount<24;)m.tag|=m.source[m.sourceIndex++]<<m.bitcount,m.bitcount+=8;var O=m.tag&65535>>>16-T;return m.tag>>>=T,m.bitcount-=T,O+D}function h(m,T){for(;m.bitcount<24;)m.tag|=m.source[m.sourceIndex++]<<m.bitcount,m.bitcount+=8;var D=0,O=0,N=0,z=m.tag;do O=2*O+(1&z),z>>>=1,++N,D+=T.table[N],O-=T.table[N];while(O>=0);return m.tag=z,m.bitcount-=N,T.trans[D+O]}function c(m,T,D){for(;;){var O,N,z,H,$=h(m,T);if($===256)return 0;if($<256)m.dest[m.destLen++]=$;else for($-=257,O=C(m,p[$],f[$]),N=h(m,D),H=z=m.destLen-C(m,y[N],d[N]);H<z+O;++H)m.dest[m.destLen++]=m.dest[H]}}for(o=0;o<7;++o)S.table[o]=0;for(o=0,S.table[7]=24,S.table[8]=152,S.table[9]=112;o<24;++o)S.trans[o]=256+o;for(o=0;o<144;++o)S.trans[24+o]=o;for(o=0;o<8;++o)S.trans[168+o]=280+o;for(o=0;o<112;++o)S.trans[176+o]=144+o;for(o=0;o<5;++o)_.table[o]=0;for(o=0,_.table[5]=32;o<32;++o)_.trans[o]=o;l(p,f,4,3),l(y,d,2,1),p[28]=0,f[28]=258,E.exports=function(m,T){var D,O,N=new u(m,T);do{switch(D=function(z){z.bitcount--||(z.tag=z.source[z.sourceIndex++],z.bitcount=7);var H=1&z.tag;return z.tag>>>=1,H}(N),C(N,2,0)){case 0:O=function(z){for(var H,$,V;z.bitcount>8;)z.sourceIndex--,z.bitcount-=8;if((H=256*(H=z.source[z.sourceIndex+1])+z.source[z.sourceIndex])!==(65535&~(256*z.source[z.sourceIndex+3]+z.source[z.sourceIndex+2])))return-3;for(z.sourceIndex+=4,V=H;V;--V)z.dest[z.destLen++]=z.source[z.sourceIndex++];return z.bitcount=0,0}(N);break;case 1:O=c(N,S,_);break;case 2:(function(z,H,$){for(Y=0,V=C(z,5,257),P=C(z,5,1),U=C(z,4,4);Y<19;++Y)s[Y]=0;for(Y=0;Y<U;++Y){var V,P,U,Y,Z,X,J=C(z,3,0);s[v[Y]]=J}for(I(b,s,0,19),Z=0;Z<V+P;){var q=h(z,b);switch(q){case 16:var te=s[Z-1];for(X=C(z,2,3);X;--X)s[Z++]=te;break;case 17:for(X=C(z,3,3);X;--X)s[Z++]=0;break;case 18:for(X=C(z,7,11);X;--X)s[Z++]=0;break;default:s[Z++]=q}}I(H,s,0,V),I($,s,V,P)})(N,N.ltree,N.dtree),O=c(N,N.ltree,N.dtree);break;default:O=-3}if(O!==0)throw Error("Data error")}while(!D);return N.destLen<N.dest.length?typeof N.dest.slice=="function"?N.dest.slice(0,N.destLen):N.dest.subarray(0,N.destLen):N.dest}},87291:function(E,A,u){let o=u(83243),{swap32LE:S}=u(61245),_=2112;E.exports=class{constructor(p){let f=typeof p.readUInt32BE=="function"&&typeof p.slice=="function";if(f||p instanceof Uint8Array){let y;if(f)this.highStart=p.readUInt32LE(0),this.errorValue=p.readUInt32LE(4),y=p.readUInt32LE(8),p=p.slice(12);else{let d=new DataView(p.buffer);this.highStart=d.getUint32(0,!0),this.errorValue=d.getUint32(4,!0),y=d.getUint32(8,!0),p=p.subarray(12)}p=o(p,new Uint8Array(y)),S(p=o(p,new Uint8Array(y))),this.data=new Uint32Array(p.buffer)}else({data:this.data,highStart:this.highStart,errorValue:this.errorValue}=p)}get(p){let f;return p<0||p>1114111?this.errorValue:p<55296||p>56319&&p<=65535?(f=(this.data[p>>5]<<2)+(31&p),this.data[f]):p<=65535?(f=(this.data[2048+(p-55296>>5)]<<2)+(31&p),this.data[f]):p<this.highStart?(f=this.data[_-32+(p>>11)],f=((f=this.data[f+(p>>5&63)])<<2)+(31&p),this.data[f]):this.data[this.data.length-4]}}},61245:function(E){let A=new Uint8Array(new Uint32Array([305419896]).buffer)[0]===18,u=(S,_,p)=>{let f=S[_];S[_]=S[p],S[p]=f},o=S=>{let _=S.length;for(let p=0;p<_;p+=4)u(S,p,p+3),u(S,p+1,p+2)};E.exports={swap32LE:S=>{A&&o(S)}}},65426:function(E,A){A.default=(u,o)=>{let S=u.__vccOpts||u;for(let[_,p]of o)S[_]=p;return S}},40498:function(E,A,u){var o=u(46490),S=u(62271),_=u(1965),p=u(89177),f=u(23405),y=function(d){_.call(this,d),S.call(this,d),p.call(this,d),this.id=d.id||o()};y.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(d,v){switch(this.draggable){case"horizontal":v=0;break;case"vertical":d=0}var b=this.transform;b||(b=this.transform=[1,0,0,1,0,0]),b[4]+=d,b[5]+=v,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(d,v){},attrKV:function(d,v){if(d==="position"||d==="scale"||d==="origin"){if(v){var b=this[d];b||(b=this[d]=[]),b[0]=v[0],b[1]=v[1]}}else this[d]=v},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(d,v){if(typeof d=="string")this.attrKV(d,v);else if(f.isObject(d))for(var b in d)d.hasOwnProperty(b)&&this.attrKV(b,d[b]);return this.dirty(!1),this},setClipPath:function(d){var v=this.__zr;v&&d.addSelfToZr(v),this.clipPath&&this.clipPath!==d&&this.removeClipPath(),this.clipPath=d,d.__zr=v,d.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var d=this.clipPath;d&&(d.__zr&&d.removeSelfFromZr(d.__zr),d.__zr=null,d.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(d){this.__zr=d;var v=this.animators;if(v)for(var b=0;b<v.length;b++)d.animation.addAnimator(v[b]);this.clipPath&&this.clipPath.addSelfToZr(d)},removeSelfFromZr:function(d){this.__zr=null;var v=this.animators;if(v)for(var b=0;b<v.length;b++)d.animation.removeAnimator(v[b]);this.clipPath&&this.clipPath.removeSelfFromZr(d)}},f.mixin(y,p),f.mixin(y,_),f.mixin(y,S),E.exports=y},38109:function(E,A,u){var o=u(23405),S=u(76414),_=u(1046),p=u(62271),f=u(46427),y=u(28306),d="silent";function v(w){f.stop(this.event)}function b(){}b.prototype.dispose=function(){};var s=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],l=function(w,I,C,h){p.call(this),this.storage=w,this.painter=I,this.painterRoot=h,C=C||new b,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,_.call(this),this.setHandlerProxy(C)};l.prototype={constructor:l,setHandlerProxy:function(w){this.proxy&&this.proxy.dispose(),w&&(o.each(s,function(I){w.on&&w.on(I,this[I],this)},this),w.handler=this),this.proxy=w},mousemove:function(w){var I=w.zrX,C=w.zrY,h=this._hovered,c=h.target;c&&!c.__zr&&(c=(h=this.findHover(h.x,h.y)).target);var m=this._hovered=this.findHover(I,C),T=m.target,D=this.proxy;D.setCursor&&D.setCursor(T?T.cursor:"default"),c&&T!==c&&this.dispatchToElement(h,"mouseout",w),this.dispatchToElement(m,"mousemove",w),T&&T!==c&&this.dispatchToElement(m,"mouseover",w)},mouseout:function(w){this.dispatchToElement(this._hovered,"mouseout",w);var I,C=w.toElement||w.relatedTarget;do C=C&&C.parentNode;while(C&&C.nodeType!==9&&!(I=C===this.painterRoot));I||this.trigger("globalout",{event:w})},resize:function(w){this._hovered={}},dispatch:function(w,I){var C=this[w];C&&C.call(this,I)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(w){var I=this.proxy;I.setCursor&&I.setCursor(w)},dispatchToElement:function(w,I,C){var h=(w=w||{}).target;if(!h||!h.silent){for(var c,m="on"+I,T={type:I,event:C,target:(c=w).target,topTarget:c.topTarget,cancelBubble:!1,offsetX:C.zrX,offsetY:C.zrY,gestureEvent:C.gestureEvent,pinchX:C.pinchX,pinchY:C.pinchY,pinchScale:C.pinchScale,wheelDelta:C.zrDelta,zrByTouch:C.zrByTouch,which:C.which,stop:v};h&&(h[m]&&(T.cancelBubble=h[m].call(h,T)),h.trigger(I,T),h=h.parent,!T.cancelBubble););!T.cancelBubble&&(this.trigger(I,T),this.painter&&this.painter.eachOtherLayer(function(D){typeof D[m]=="function"&&D[m].call(D,T),D.trigger&&D.trigger(I,T)}))}},findHover:function(w,I,C){for(var h,c=this.storage.getDisplayList(),m={x:w,y:I},T=c.length-1;T>=0;T--)if(c[T]!==C&&!c[T].ignore&&(h=function(D,O,N){if(D[D.rectHover?"rectContain":"contain"](O,N)){for(var z,H=D;H;){if(H.clipPath&&!H.clipPath.contain(O,N))return!1;H.silent&&(z=!0),H=H.parent}return!z||d}return!1}(c[T],w,I))&&(m.topTarget||(m.topTarget=c[T]),h!==d)){m.target=c[T];break}return m},processGesture:function(w,I){this._gestureMgr||(this._gestureMgr=new y);var C=this._gestureMgr;I==="start"&&C.clear();var h=C.recognize(w,this.findHover(w.zrX,w.zrY,null).target,this.proxy.dom);if(I==="end"&&C.clear(),h){var c=h.type;w.gestureEvent=c,this.dispatchToElement({target:h.target},c,h.event)}}},o.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(w){l.prototype[w]=function(I){var C=this.findHover(I.zrX,I.zrY),h=C.target;if(w==="mousedown")this._downEl=h,this._downPoint=[I.zrX,I.zrY],this._upEl=h;else if(w==="mouseup")this._upEl=h;else if(w==="click"){if(this._downEl!==this._upEl||!this._downPoint||S.dist(this._downPoint,[I.zrX,I.zrY])>4)return;this._downPoint=null}this.dispatchToElement(C,w,I)}}),o.mixin(l,p),o.mixin(l,_),E.exports=l},33103:function(E,A,u){var o=u(23405),S=u(8598).devicePixelRatio,_=u(7609),p=u(37067);function f(){return!1}function y(v,b,s){var l=o.createCanvas(),w=b.getWidth(),I=b.getHeight(),C=l.style;return C&&(C.position="absolute",C.left=0,C.top=0,C.width=w+"px",C.height=I+"px",l.setAttribute("data-zr-dom-id",v)),l.width=w*s,l.height=I*s,l}var d=function(v,b,s){s=s||S,typeof v=="string"?l=y(v,b,s):o.isObject(v)&&(v=(l=v).id),this.id=v,this.dom=l;var l,w=l.style;w&&(l.onselectstart=f,w["-webkit-user-select"]="none",w["user-select"]="none",w["-webkit-touch-callout"]="none",w["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",w.padding=0,w.margin=0,w["border-width"]=0),this.domBack=null,this.ctxBack=null,this.painter=b,this.config=null,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.dpr=s};d.prototype={constructor:d,__dirty:!0,__used:!1,__drawIndex:0,__startIndex:0,__endIndex:0,incremental:!1,getElementCount:function(){return this.__endIndex-this.__startIndex},initContext:function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},createBackBuffer:function(){var v=this.dpr;this.domBack=y("back-"+this.id,this.painter,v),this.ctxBack=this.domBack.getContext("2d"),v!==1&&this.ctxBack.scale(v,v)},resize:function(v,b){var s=this.dpr,l=this.dom,w=l.style,I=this.domBack;w&&(w.width=v+"px",w.height=b+"px"),l.width=v*s,l.height=b*s,I&&(I.width=v*s,I.height=b*s,s!==1&&this.ctxBack.scale(s,s))},clear:function(v,h){var s,l=this.dom,w=this.ctx,I=l.width,C=l.height,h=h||this.clearColor,c=this.motionBlur&&!v,m=this.lastFrameAlpha,T=this.dpr;if(c&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(l,0,0,I/T,C/T)),w.clearRect(0,0,I,C),h&&h!=="transparent"&&(h.colorStops?(s=h.__canvasGradient||_.getGradient(w,h,{x:0,y:0,width:I,height:C}),h.__canvasGradient=s):h.image&&(s=p.prototype.getCanvasPattern.call(h,w)),w.save(),w.fillStyle=s||h,w.fillRect(0,0,I,C),w.restore()),c){var D=this.domBack;w.save(),w.globalAlpha=m,w.drawImage(D,0,0,I,C),w.restore()}}},E.exports=d},15982:function(E,A,u){var o=u(8598).devicePixelRatio,S=u(23405),_=u(45003),p=u(28761),f=u(32553),y=u(33103),d=u(76113),v=u(91222),b=u(23584);function s(C){return parseInt(C,10)}var l=new p(0,0,0,0),w=new p(0,0,0,0),I=function(C,h,c){this.type="canvas";var m=!C.nodeName||C.nodeName.toUpperCase()==="CANVAS";this._opts=c=S.extend({},c||{}),this.dpr=c.devicePixelRatio||o,this._singleCanvas=m,this.root=C;var T=C.style;T&&(T["-webkit-tap-highlight-color"]="transparent",T["-webkit-user-select"]=T["user-select"]=T["-webkit-touch-callout"]="none",C.innerHTML=""),this.storage=h;var D=this._zlevelList=[],O=this._layers={};if(this._layerConfig={},this._needsManuallyCompositing=!1,m){var N=C.width,z=C.height;c.width!=null&&(N=c.width),c.height!=null&&(z=c.height),this.dpr=c.devicePixelRatio||1,C.width=N*this.dpr,C.height=z*this.dpr,this._width=N,this._height=z;var H=new y(C,this,this.dpr);H.__builtin__=!0,H.initContext(),O[314159]=H,H.zlevel=314159,D.push(314159),this._domRoot=C}else{this._width=this._getSize(0),this._height=this._getSize(1);var $,V,P,U=this._domRoot=($=this._width,V=this._height,(P=document.createElement("div")).style.cssText=["position:relative","overflow:hidden","width:"+$+"px","height:"+V+"px","padding:0","margin:0","border-width:0"].join(";")+";",P);C.appendChild(U)}this._hoverlayer=null,this._hoverElements=[]};I.prototype={constructor:I,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var C=this.getViewportRoot();if(C)return{offsetLeft:C.offsetLeft||0,offsetTop:C.offsetTop||0}},refresh:function(C){var h=this.storage.getDisplayList(!0),c=this._zlevelList;this._redrawId=Math.random(),this._paintList(h,C,this._redrawId);for(var m=0;m<c.length;m++){var T=c[m],D=this._layers[T];if(!D.__builtin__&&D.refresh){var O=m===0?this._backgroundColor:null;D.refresh(O)}}return this.refreshHover(),this},addHover:function(C,h){if(!C.__hoverMir){var c=new C.constructor({style:C.style,shape:C.shape,z:C.z,z2:C.z2,silent:C.silent});return c.__from=C,C.__hoverMir=c,h&&c.setStyle(h),this._hoverElements.push(c),c}},removeHover:function(C){var h=C.__hoverMir,c=this._hoverElements,m=S.indexOf(c,h);m>=0&&c.splice(m,1),C.__hoverMir=null},clearHover:function(C){for(var h=this._hoverElements,c=0;c<h.length;c++){var m=h[c].__from;m&&(m.__hoverMir=null)}h.length=0},refreshHover:function(){var C=this._hoverElements,h=C.length,c=this._hoverlayer;if(c&&c.clear(),h){f(C,this.storage.displayableSortFunc),c||(c=this._hoverlayer=this.getLayer(1e5));var m={};c.ctx.save();for(var T=0;T<h;){var D=C[T],O=D.__from;if(!(O&&O.__zr)){C.splice(T,1),O.__hoverMir=null,h--;continue}T++,O.invisible||(D.transform=O.transform,D.invTransform=O.invTransform,D.__clipPaths=O.__clipPaths,this._doPaintEl(D,c,!0,m))}c.ctx.restore()}},getHoverLayer:function(){return this.getLayer(1e5)},_paintList:function(C,h,c){if(this._redrawId===c){h=h||!1,this._updateLayerStatus(C);var m=this._doPaintList(C,h);if(this._needsManuallyCompositing&&this._compositeManually(),!m){var T=this;d(function(){T._paintList(C,h,c)})}}},_compositeManually:function(){var C=this.getLayer(314159).ctx,h=this._domRoot.width,c=this._domRoot.height;C.clearRect(0,0,h,c),this.eachBuiltinLayer(function(m){m.virtual&&C.drawImage(m.dom,0,0,h,c)})},_doPaintList:function(C,h){for(var c=[],m=0;m<this._zlevelList.length;m++){var T=this._zlevelList[m],D=this._layers[T];D.__builtin__&&D!==this._hoverlayer&&(D.__dirty||h)&&c.push(D)}for(var O=!0,N=0;N<c.length;N++){var D=c[N],z=D.ctx,H={};z.save();var $=h?D.__startIndex:D.__drawIndex,V=!h&&D.incremental&&Date.now,P=V&&Date.now(),U=D.zlevel===this._zlevelList[0]?this._backgroundColor:null;if(D.__startIndex===D.__endIndex)D.clear(!1,U);else if($===D.__startIndex){var Y=C[$];Y.incremental&&Y.notClear&&!h||D.clear(!1,U)}$===-1&&(console.error("For some unknown reason. drawIndex is -1"),$=D.__startIndex);for(var Z=$;Z<D.__endIndex;Z++){var X=C[Z];if(this._doPaintEl(X,D,h,H),X.__dirty=X.__dirtyText=!1,V&&Date.now()-P>15)break}D.__drawIndex=Z,D.__drawIndex<D.__endIndex&&(O=!1),H.prevElClipPaths&&z.restore(),z.restore()}return b.wxa&&S.each(this._layers,function(J){J&&J.ctx&&J.ctx.draw&&J.ctx.draw()}),O},_doPaintEl:function(C,h,c,m){var T,D,O=h.ctx,N=C.transform;if((h.__dirty||c)&&!C.invisible&&C.style.opacity!==0&&!(N&&!N[0]&&!N[3])&&!(C.culling&&(T=this._width,D=this._height,l.copy(C.getBoundingRect()),C.transform&&l.applyTransform(C.transform),w.width=T,w.height=D,!l.intersect(w)))){var z=C.__clipPaths;if((!m.prevElClipPaths||function(V,P){if(V===P)return!1;if(!V||!P||V.length!==P.length)return!0;for(var U=0;U<V.length;U++)if(V[U]!==P[U])return!0}(z,m.prevElClipPaths))&&(m.prevElClipPaths&&(h.ctx.restore(),m.prevElClipPaths=null,m.prevEl=null),z)){O.save();for(var H=0;H<z.length;H++){var $=z[H];$.setTransform(O),O.beginPath(),$.buildPath(O,$.shape),O.clip(),$.restoreTransform(O)}m.prevElClipPaths=z}C.beforeBrush&&C.beforeBrush(O),C.brush(O,m.prevEl||null),m.prevEl=C,C.afterBrush&&C.afterBrush(O)}},getLayer:function(C,h){this._singleCanvas&&!this._needsManuallyCompositing&&(C=314159);var c=this._layers[C];return c||((c=new y("zr_"+C,this,this.dpr)).zlevel=C,c.__builtin__=!0,this._layerConfig[C]&&S.merge(c,this._layerConfig[C],!0),h&&(c.virtual=h),this.insertLayer(C,c),c.initContext()),c},insertLayer:function(C,h){var c=this._layers,m=this._zlevelList,T=m.length,D=null,O=-1,N=this._domRoot;if(c[C])return void _("ZLevel "+C+" has been used already");if(!(h&&(h.__builtin__||typeof h.resize=="function"&&typeof h.refresh=="function")))return void _("Layer of zlevel "+C+" is not valid");if(T>0&&C>m[0]){for(O=0;O<T-1&&(!(m[O]<C)||!(m[O+1]>C));O++);D=c[m[O]]}if(m.splice(O+1,0,C),c[C]=h,!h.virtual)if(D){var z=D.dom;z.nextSibling?N.insertBefore(h.dom,z.nextSibling):N.appendChild(h.dom)}else N.firstChild?N.insertBefore(h.dom,N.firstChild):N.appendChild(h.dom)},eachLayer:function(C,h){var c,m,T=this._zlevelList;for(m=0;m<T.length;m++)c=T[m],C.call(h,this._layers[c],c)},eachBuiltinLayer:function(C,h){var c,m,T,D=this._zlevelList;for(T=0;T<D.length;T++)m=D[T],(c=this._layers[m]).__builtin__&&C.call(h,c,m)},eachOtherLayer:function(C,h){var c,m,T,D=this._zlevelList;for(T=0;T<D.length;T++)m=D[T],(c=this._layers[m]).__builtin__||C.call(h,c,m)},getLayers:function(){return this._layers},_updateLayerStatus:function(C){function h(z){T&&(T.__endIndex!==z&&(T.__dirty=!0),T.__endIndex=z)}if(this.eachBuiltinLayer(function(z,H){z.__dirty=z.__used=!1}),this._singleCanvas)for(var c=1;c<C.length;c++){var m=C[c];if(m.zlevel!==C[c-1].zlevel||m.incremental){this._needsManuallyCompositing=!0;break}}for(var T=null,D=0,c=0;c<C.length;c++){var O,m=C[c],N=m.zlevel;m.incremental?((O=this.getLayer(N+.001,this._needsManuallyCompositing)).incremental=!0,D=1):O=this.getLayer(N+.01*(D>0),this._needsManuallyCompositing),O.__builtin__||_("ZLevel "+N+" has been used by unkown layer "+O.id),O!==T&&(O.__used=!0,O.__startIndex!==c&&(O.__dirty=!0),O.__startIndex=c,O.incremental?O.__drawIndex=-1:O.__drawIndex=c,h(c),T=O),m.__dirty&&(O.__dirty=!0,O.incremental&&O.__drawIndex<0&&(O.__drawIndex=c))}h(c),this.eachBuiltinLayer(function(z,H){!z.__used&&z.getElementCount()>0&&(z.__dirty=!0,z.__startIndex=z.__endIndex=z.__drawIndex=0),z.__dirty&&z.__drawIndex<0&&(z.__drawIndex=z.__startIndex)})},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(C){C.clear()},setBackgroundColor:function(C){this._backgroundColor=C},configLayer:function(C,h){if(h){var c=this._layerConfig;c[C]?S.merge(c[C],h,!0):c[C]=h;for(var m=0;m<this._zlevelList.length;m++){var T=this._zlevelList[m];if(T===C||T===C+.01){var D=this._layers[T];S.merge(D,c[C],!0)}}}},delLayer:function(C){var h=this._layers,c=this._zlevelList,m=h[C];m&&(m.dom.parentNode.removeChild(m.dom),delete h[C],c.splice(S.indexOf(c,C),1))},resize:function(C,h){if(this._domRoot.style){var c=this._domRoot;c.style.display="none";var m=this._opts;if(C!=null&&(m.width=C),h!=null&&(m.height=h),C=this._getSize(0),h=this._getSize(1),c.style.display="",this._width!==C||h!==this._height){for(var T in c.style.width=C+"px",c.style.height=h+"px",this._layers)this._layers.hasOwnProperty(T)&&this._layers[T].resize(C,h);S.each(this._progressiveLayers,function(D){D.resize(C,h)}),this.refresh(!0)}this._width=C,this._height=h}else{if(C==null||h==null)return;this._width=C,this._height=h,this.getLayer(314159).resize(C,h)}return this},clearLayer:function(C){var h=this._layers[C];h&&h.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(C){if(C=C||{},this._singleCanvas&&!this._compositeManually)return this._layers[314159].dom;var h=new y("image",this,C.pixelRatio||this.dpr);if(h.initContext(),h.clear(!1,C.backgroundColor||this._backgroundColor),C.pixelRatio<=this.dpr){this.refresh();var c=h.dom.width,m=h.dom.height,T=h.ctx;this.eachLayer(function(H){H.__builtin__?T.drawImage(H.dom,0,0,c,m):H.renderToCanvas&&(h.ctx.save(),H.renderToCanvas(h.ctx),h.ctx.restore())})}else for(var D={},O=this.storage.getDisplayList(!0),N=0;N<O.length;N++){var z=O[N];this._doPaintEl(z,h,!0,D)}return h.dom},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(C){var h=this._opts,c=["width","height"][C],m=["clientWidth","clientHeight"][C],T=["paddingLeft","paddingTop"][C],D=["paddingRight","paddingBottom"][C];if(h[c]!=null&&h[c]!=="auto")return parseFloat(h[c]);var O=this.root,N=document.defaultView.getComputedStyle(O);return(O[m]||s(N[c])||s(O.style[c]))-(s(N[T])||0)-(s(N[D])||0)|0},pathToImage:function(C,h){h=h||this.dpr;var c=document.createElement("canvas"),m=c.getContext("2d"),T=C.getBoundingRect(),D=C.style,O=D.shadowBlur*h,N=D.shadowOffsetX*h,z=D.shadowOffsetY*h,H=D.hasStroke()?D.lineWidth:0,$=Math.max(H/2,-N+O),V=Math.max(H/2,N+O),P=Math.max(H/2,-z+O),U=Math.max(H/2,z+O),Y=T.width+$+V,Z=T.height+P+U;c.width=Y*h,c.height=Z*h,m.scale(h,h),m.clearRect(0,0,Y,Z),m.dpr=h;var X={position:C.position,rotation:C.rotation,scale:C.scale};C.position=[$-T.x,P-T.y],C.rotation=0,C.scale=[1,1],C.updateTransform(),C&&C.brush(m);var J=new v({style:{x:0,y:0,image:c}});return X.position!=null&&(J.position=C.position=X.position),X.rotation!=null&&(J.rotation=C.rotation=X.rotation),X.scale!=null&&(J.scale=C.scale=X.scale),J}},E.exports=I},39723:function(E,A,u){var o=u(23405),S=u(23584),_=u(18583),p=u(32553);function f(d,v){return d.zlevel===v.zlevel?d.z===v.z?d.z2-v.z2:d.z-v.z:d.zlevel-v.zlevel}var y=function(){this._roots=[],this._displayList=[],this._displayListLen=0};y.prototype={constructor:y,traverse:function(d,v){for(var b=0;b<this._roots.length;b++)this._roots[b].traverse(d,v)},getDisplayList:function(d,v){return v=v||!1,d&&this.updateDisplayList(v),this._displayList},updateDisplayList:function(d){this._displayListLen=0;for(var v=this._roots,b=this._displayList,s=0,l=v.length;s<l;s++)this._updateAndAddDisplayable(v[s],null,d);b.length=this._displayListLen,S.canvasSupported&&p(b,f)},_updateAndAddDisplayable:function(d,v,b){if(!d.ignore||b){d.beforeUpdate(),d.__dirty&&d.update(),d.afterUpdate();var s=d.clipPath;if(s){v=v?v.slice():[];for(var l=s,w=d;l;)l.parent=w,l.updateTransform(),v.push(l),w=l,l=l.clipPath}if(d.isGroup){for(var I=d._children,C=0;C<I.length;C++){var h=I[C];d.__dirty&&(h.__dirty=!0),this._updateAndAddDisplayable(h,v,b)}d.__dirty=!1}else d.__clipPaths=v,this._displayList[this._displayListLen++]=d}},addRoot:function(d){d.__storage!==this&&(d instanceof _&&d.addChildrenToStorage(this),this.addToStorage(d),this._roots.push(d))},delRoot:function(d){if(d==null){for(var v=0;v<this._roots.length;v++){var b=this._roots[v];b instanceof _&&b.delChildrenFromStorage(this)}this._roots=[],this._displayList=[],this._displayListLen=0;return}if(d instanceof Array){for(var v=0,s=d.length;v<s;v++)this.delRoot(d[v]);return}var l=o.indexOf(this._roots,d);l>=0&&(this.delFromStorage(d),this._roots.splice(l,1),d instanceof _&&d.delChildrenFromStorage(this))},addToStorage:function(d){return d&&(d.__storage=this,d.dirty(!1)),this},delFromStorage:function(d){return d&&(d.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:f},E.exports=y},75276:function(E,A,u){var o=u(23405),S=u(46427).Dispatcher,_=u(76113),p=u(24679),f=function(y){y=y||{},this.stage=y.stage||{},this.onframe=y.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,S.call(this)};f.prototype={constructor:f,addClip:function(y){this._clips.push(y)},addAnimator:function(y){y.animation=this;for(var d=y.getClips(),v=0;v<d.length;v++)this.addClip(d[v])},removeClip:function(y){var d=o.indexOf(this._clips,y);d>=0&&this._clips.splice(d,1)},removeAnimator:function(y){for(var d=y.getClips(),v=0;v<d.length;v++)this.removeClip(d[v]);y.animation=null},_update:function(){for(var y=new Date().getTime()-this._pausedTime,d=y-this._time,v=this._clips,b=v.length,s=[],l=[],w=0;w<b;w++){var I=v[w],C=I.step(y,d);C&&(s.push(C),l.push(I))}for(var w=0;w<b;)v[w]._needsRemove?(v[w]=v[b-1],v.pop(),b--):w++;b=s.length;for(var w=0;w<b;w++)l[w].fire(s[w]);this._time=y,this.onframe(d),this.trigger("frame",d),this.stage.update&&this.stage.update()},_startLoop:function(){var y=this;this._running=!0,_(function d(){y._running&&(_(d),y._paused||y._update())})},start:function(){this._time=new Date().getTime(),this._pausedTime=0,this._startLoop()},stop:function(){this._running=!1},pause:function(){this._paused||(this._pauseStart=new Date().getTime(),this._paused=!0)},resume:function(){this._paused&&(this._pausedTime+=new Date().getTime()-this._pauseStart,this._paused=!1)},clear:function(){this._clips=[]},isFinished:function(){return!this._clips.length},animate:function(y,d){var v=new p(y,(d=d||{}).loop,d.getter,d.setter);return this.addAnimator(v),v}},o.mixin(f,S),E.exports=f},24679:function(E,A,u){var o=u(134),S=u(86049),_=u(23405).isArrayLike,p=Array.prototype.slice;function f(I,C){return I[C]}function y(I,C,h){I[C]=h}function d(I,C,h,c,m){var T=I.length;if(m===1)for(var D=0;D<T;D++)c[D]=(O=I[D],(C[D]-O)*h+O);else for(var O,N,z=T&&I[0].length,D=0;D<T;D++)for(var H=0;H<z;H++)c[D][H]=(N=I[D][H],(C[D][H]-N)*h+N)}function v(I,C,h){var c=I.length,m=C.length;if(c!==m)if(c>m)I.length=m;else for(var T=c;T<m;T++)I.push(h===1?C[T]:p.call(C[T]));for(var D=I[0]&&I[0].length,T=0;T<I.length;T++)if(h===1)isNaN(I[T])&&(I[T]=C[T]);else for(var O=0;O<D;O++)isNaN(I[T][O])&&(I[T][O]=C[T][O])}function b(I,C,h,c,m,T,D,O,N){var z=I.length;if(N===1)for(var H=0;H<z;H++)O[H]=s(I[H],C[H],h[H],c[H],m,T,D);else for(var $=I[0].length,H=0;H<z;H++)for(var V=0;V<$;V++)O[H][V]=s(I[H][V],C[H][V],h[H][V],c[H][V],m,T,D)}function s(I,C,h,c,m,T,D){var O=(h-I)*.5,N=(c-C)*.5;return(2*(C-h)+O+N)*D+(-3*(C-h)-2*O-N)*T+O*m+C}function l(I){return I[0]=Math.floor(I[0]),I[1]=Math.floor(I[1]),I[2]=Math.floor(I[2]),"rgba("+I.join(",")+")"}var w=function(I,C,h,c){this._tracks={},this._target=I,this._loop=C||!1,this._getter=h||f,this._setter=c||y,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};w.prototype={when:function(I,C){var h=this._tracks;for(var c in C)if(C.hasOwnProperty(c)){if(!h[c]){h[c]=[];var m=this._getter(this._target,c);if(m==null)continue;I!==0&&h[c].push({time:0,value:function(T){if(_(T)){var D=T.length;if(_(T[0])){for(var O=[],N=0;N<D;N++)O.push(p.call(T[N]));return O}return p.call(T)}return T}(m)})}h[c].push({time:I,value:C[c]})}return this},during:function(I){return this._onframeList.push(I),this},pause:function(){for(var I=0;I<this._clipList.length;I++)this._clipList[I].pause();this._paused=!0},resume:function(){for(var I=0;I<this._clipList.length;I++)this._clipList[I].resume();this._paused=!1},isPaused:function(){return!!this._paused},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var I=this._doneList,C=I.length,h=0;h<C;h++)I[h].call(this)},start:function(I,C){var h,c=this,m=0,T=function(){--m||c._doneCallback()};for(var D in this._tracks)if(this._tracks.hasOwnProperty(D)){var O=function(z,H,$,V,P,U){var Y,Z,X,J,q,te,re,ie=z._getter,ne=z._setter,le=H==="spline",fe=V.length;if(fe){var we=_(V[0].value),pe=!1,ve=!1,be=we?_((Y=V[V.length-1].value)&&Y[0])?2:1:0;V.sort(function(je,it){return je.time-it.time}),Z=V[fe-1].time;for(var Ee=[],Re=[],Ne=V[0].value,Le=!0,Se=0;Se<fe;Se++){Ee.push(V[Se].time/Z);var Ie=V[Se].value;if(we&&function(je,it,rt){if(je===it)return!0;var mt=je.length;if(mt!==it.length)return!1;if(rt===1){for(var yt=0;yt<mt;yt++)if(je[yt]!==it[yt])return!1}else for(var st=je[0].length,yt=0;yt<mt;yt++)for(var Qe=0;Qe<st;Qe++)if(je[yt][Qe]!==it[yt][Qe])return!1;return!0}(Ie,Ne,be)||!we&&Ie===Ne||(Le=!1),Ne=Ie,typeof Ie=="string"){var _e=S.parse(Ie);_e?(Ie=_e,pe=!0):ve=!0}Re.push(Ie)}if(U||!Le){for(var Ae=Re[fe-1],Se=0;Se<fe-1;Se++)we?v(Re[Se],Ae,be):!isNaN(Re[Se])||isNaN(Ae)||ve||pe||(Re[Se]=Ae);we&&v(ie(z._target,P),Ae,be);var ue=0,ke=0;if(pe)var Pe=[0,0,0,0];var Ve=new o({target:z._target,life:Z,loop:z._loop,delay:z._delay,onframe:function(je,it){if(it<0)st=0;else if(it<ke){for(st=Math.min(ue+1,fe-1);st>=0&&!(Ee[st]<=it);st--);st=Math.min(st,fe-2)}else{for(st=ue;st<fe&&!(Ee[st]>it);st++);st=Math.min(st-1,fe-2)}ue=st,ke=it;var rt,mt,yt,st,Qe,At=Ee[st+1]-Ee[st];if(At!==0)if(X=(it-Ee[st])/At,le)if(q=Re[st],J=Re[st===0?st:st-1],te=Re[st>fe-2?fe-1:st+1],re=Re[st>fe-3?fe-1:st+2],we)b(J,q,te,re,X,X*X,X*X*X,ie(je,P),be);else{if(pe)Qe=b(J,q,te,re,X,X*X,X*X*X,Pe,1),Qe=l(Pe);else{if(ve)return X>.5?te:q;Qe=s(J,q,te,re,X,X*X,X*X*X)}ne(je,P,Qe)}else if(we)d(Re[st],Re[st+1],X,ie(je,P),be);else{if(pe)d(Re[st],Re[st+1],X,Pe,1),Qe=l(Pe);else{if(ve)return rt=Re[st],mt=Re[st+1],X>.5?mt:rt;yt=Re[st],Qe=(Re[st+1]-yt)*X+yt}ne(je,P,Qe)}},ondestroy:$});return H&&H!=="spline"&&(Ve.easing=H),Ve}}}(this,I,T,this._tracks[D],D,C);O&&(this._clipList.push(O),m++,this.animation&&this.animation.addClip(O),h=O)}if(h){var N=h.onframe;h.onframe=function(z,H){N(z,H);for(var $=0;$<c._onframeList.length;$++)c._onframeList[$](z,H)}}return m||this._doneCallback(),this},stop:function(I){for(var C=this._clipList,h=this.animation,c=0;c<C.length;c++){var m=C[c];I&&m.onframe(this._target,1),h&&h.removeClip(m)}C.length=0},delay:function(I){return this._delay=I,this},done:function(I){return I&&this._doneList.push(I),this},getClips:function(){return this._clipList}},E.exports=w},134:function(E,A,u){var o=u(5108);function S(_){this._target=_.target,this._life=_.life||1e3,this._delay=_.delay||0,this._initialized=!1,this.loop=_.loop!=null&&_.loop,this.gap=_.gap||0,this.easing=_.easing||"Linear",this.onframe=_.onframe,this.ondestroy=_.ondestroy,this.onrestart=_.onrestart,this._pausedTime=0,this._paused=!1}S.prototype={constructor:S,step:function(_,p){if(this._initialized||(this._startTime=_+this._delay,this._initialized=!0),this._paused){this._pausedTime+=p;return}var f=(_-this._startTime-this._pausedTime)/this._life;if(!(f<0)){f=Math.min(f,1);var y=this.easing,d=typeof y=="string"?o[y]:y,v=typeof d=="function"?d(f):f;return this.fire("frame",v),f===1?this.loop?(this.restart(_),"restart"):(this._needsRemove=!0,"destroy"):null}},restart:function(_){var p=(_-this._startTime-this._pausedTime)%this._life;this._startTime=_-p+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(_,p){this[_="on"+_]&&this[_](this._target,p)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}},E.exports=S},5108:function(E){var A={linear:function(u){return u},quadraticIn:function(u){return u*u},quadraticOut:function(u){return u*(2-u)},quadraticInOut:function(u){return(u*=2)<1?.5*u*u:-.5*(--u*(u-2)-1)},cubicIn:function(u){return u*u*u},cubicOut:function(u){return--u*u*u+1},cubicInOut:function(u){return(u*=2)<1?.5*u*u*u:.5*((u-=2)*u*u+2)},quarticIn:function(u){return u*u*u*u},quarticOut:function(u){return 1- --u*u*u*u},quarticInOut:function(u){return(u*=2)<1?.5*u*u*u*u:-.5*((u-=2)*u*u*u-2)},quinticIn:function(u){return u*u*u*u*u},quinticOut:function(u){return--u*u*u*u*u+1},quinticInOut:function(u){return(u*=2)<1?.5*u*u*u*u*u:.5*((u-=2)*u*u*u*u+2)},sinusoidalIn:function(u){return 1-Math.cos(u*Math.PI/2)},sinusoidalOut:function(u){return Math.sin(u*Math.PI/2)},sinusoidalInOut:function(u){return .5*(1-Math.cos(Math.PI*u))},exponentialIn:function(u){return u===0?0:Math.pow(1024,u-1)},exponentialOut:function(u){return u===1?1:1-Math.pow(2,-10*u)},exponentialInOut:function(u){return u===0?0:u===1?1:(u*=2)<1?.5*Math.pow(1024,u-1):.5*(-Math.pow(2,-10*(u-1))+2)},circularIn:function(u){return 1-Math.sqrt(1-u*u)},circularOut:function(u){return Math.sqrt(1- --u*u)},circularInOut:function(u){return(u*=2)<1?-.5*(Math.sqrt(1-u*u)-1):.5*(Math.sqrt(1-(u-=2)*u)+1)},elasticIn:function(u){var o,S=.1;return u===0?0:u===1?1:(!S||S<1?(S=1,o=.1):o=.4*Math.asin(1/S)/(2*Math.PI),-(S*Math.pow(2,10*(u-=1))*Math.sin(2*Math.PI*(u-o)/.4)))},elasticOut:function(u){var o,S=.1;return u===0?0:u===1?1:(!S||S<1?(S=1,o=.1):o=.4*Math.asin(1/S)/(2*Math.PI),S*Math.pow(2,-10*u)*Math.sin(2*Math.PI*(u-o)/.4)+1)},elasticInOut:function(u){var o,S=.1;return u===0?0:u===1?1:(!S||S<1?(S=1,o=.1):o=.4*Math.asin(1/S)/(2*Math.PI),(u*=2)<1?-.5*(S*Math.pow(2,10*(u-=1))*Math.sin(2*Math.PI*(u-o)/.4)):S*Math.pow(2,-10*(u-=1))*Math.sin(2*Math.PI*(u-o)/.4)*.5+1)},backIn:function(u){return u*u*(2.70158*u-1.70158)},backOut:function(u){return--u*u*(2.70158*u+1.70158)+1},backInOut:function(u){return(u*=2)<1?u*u*(3.5949095*u-2.5949095)*.5:.5*((u-=2)*u*(3.5949095*u+2.5949095)+2)},bounceIn:function(u){return 1-A.bounceOut(1-u)},bounceOut:function(u){return u<.36363636363636365?7.5625*u*u:u<.7272727272727273?7.5625*(u-=.5454545454545454)*u+.75:u<.9090909090909091?7.5625*(u-=.8181818181818182)*u+.9375:7.5625*(u-=.9545454545454546)*u+.984375},bounceInOut:function(u){return u<.5?.5*A.bounceIn(2*u):.5*A.bounceOut(2*u-1)+.5}};E.exports=A},76113:function(E){E.exports=typeof window<"u"&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(A){setTimeout(A,16)}},8598:function(E,A){var u=1;typeof window<"u"&&(u=Math.max(window.devicePixelRatio||1,1));var o=u;A.debugMode=0,A.devicePixelRatio=o},589:function(E,A,u){var o=u(46500).normalizeRadian,S=2*Math.PI;A.containStroke=function(_,p,f,y,d,v,b,s,l){if(b===0)return!1;var w=Math.sqrt((s-=_)*s+(l-=p)*l);if(w-b>f||w+b<f)return!1;if(Math.abs(y-d)%S<1e-4)return!0;if(v){var I=y;y=o(d),d=o(I)}else y=o(y),d=o(d);y>d&&(d+=S);var C=Math.atan2(l,s);return C<0&&(C+=S),C>=y&&C<=d||C+S>=y&&C+S<=d}},76165:function(E,A,u){var o=u(14141);A.containStroke=function(S,_,p,f,y,d,v,b,s,l,w){return s!==0&&(!(w>_+s)||!(w>f+s)||!(w>d+s)||!(w>b+s))&&(!(w<_-s)||!(w<f-s)||!(w<d-s)||!(w<b-s))&&(!(l>S+s)||!(l>p+s)||!(l>y+s)||!(l>v+s))&&(!(l<S-s)||!(l<p-s)||!(l<y-s)||!(l<v-s))&&o.cubicProjectPoint(S,_,p,f,y,d,v,b,l,w,null)<=s/2}},41814:function(E,A){A.containStroke=function(u,o,S,_,p,f,y){if(p===0)return!1;var d=0;if(y>o+p&&y>_+p||y<o-p&&y<_-p||f>u+p&&f>S+p||f<u-p&&f<S-p)return!1;if(u===S)return Math.abs(f-u)<=p/2;d=(o-_)/(u-S);var v=d*f-y+(u*_-S*o)/(u-S);return v*v/(d*d+1)<=p/2*p/2}},47258:function(E,A,u){var o=u(93041),S=u(41814),_=u(76165),p=u(87697),f=u(589),y=u(46500).normalizeRadian,d=u(14141),v=u(49226),b=o.CMD,s=2*Math.PI,l=[-1,-1,-1],w=[-1,-1];function I(C,h,c,m,T){for(var D=0,O=0,N=0,z=0,H=0,$=0;$<C.length;){var V=C[$++];switch(V===b.M&&$>1&&!c&&(D+=v(O,N,z,H,m,T)),$===1&&(O=C[$],N=C[$+1],z=O,H=N),V){case b.M:z=C[$++],H=C[$++],O=z,N=H;break;case b.L:if(c){if(S.containStroke(O,N,C[$],C[$+1],h,m,T))return!0}else D+=v(O,N,C[$],C[$+1],m,T)||0;O=C[$++],N=C[$++];break;case b.C:if(c){if(_.containStroke(O,N,C[$++],C[$++],C[$++],C[$++],C[$],C[$+1],h,m,T))return!0}else D+=function(fe,we,pe,ve,be,Ee,Re,Ne,Le,Se){if(Se>we&&Se>ve&&Se>Ee&&Se>Ne||Se<we&&Se<ve&&Se<Ee&&Se<Ne)return 0;var Ie=d.cubicRootAt(we,ve,Ee,Ne,Se,l);if(Ie===0)return 0;for(var _e,Ae,ue=0,ke=-1,Pe=0;Pe<Ie;Pe++){var Ve=l[Pe],je=Ve===0||Ve===1?.5:1;d.cubicAt(fe,pe,be,Re,Ve)<Le||(ke<0&&(ke=d.cubicExtrema(we,ve,Ee,Ne,w),w[1]<w[0]&&ke>1&&function(){var it=w[0];w[0]=w[1],w[1]=it}(),_e=d.cubicAt(we,ve,Ee,Ne,w[0]),ke>1&&(Ae=d.cubicAt(we,ve,Ee,Ne,w[1]))),ke===2?Ve<w[0]?ue+=_e<we?je:-je:Ve<w[1]?ue+=Ae<_e?je:-je:ue+=Ne<Ae?je:-je:Ve<w[0]?ue+=_e<we?je:-je:ue+=Ne<_e?je:-je)}return ue}(O,N,C[$++],C[$++],C[$++],C[$++],C[$],C[$+1],m,T)||0;O=C[$++],N=C[$++];break;case b.Q:if(c){if(p.containStroke(O,N,C[$++],C[$++],C[$],C[$+1],h,m,T))return!0}else D+=function(fe,we,pe,ve,be,Ee,Re,Ne){if(Ne>we&&Ne>ve&&Ne>Ee||Ne<we&&Ne<ve&&Ne<Ee)return 0;var Le=d.quadraticRootAt(we,ve,Ee,Ne,l);if(Le===0)return 0;var Se=d.quadraticExtremum(we,ve,Ee);if(Se>=0&&Se<=1){for(var Ie=0,_e=d.quadraticAt(we,ve,Ee,Se),Ae=0;Ae<Le;Ae++){var ue=l[Ae]===0||l[Ae]===1?.5:1,ke=d.quadraticAt(fe,pe,be,l[Ae]);ke<Re||(l[Ae]<Se?Ie+=_e<we?ue:-ue:Ie+=Ee<_e?ue:-ue)}return Ie}var ue=l[0]===0||l[0]===1?.5:1,ke=d.quadraticAt(fe,pe,be,l[0]);return ke<Re?0:Ee<we?ue:-ue}(O,N,C[$++],C[$++],C[$],C[$+1],m,T)||0;O=C[$++],N=C[$++];break;case b.A:var P=C[$++],U=C[$++],Y=C[$++],Z=C[$++],X=C[$++],J=C[$++];$+=1;var q=1-C[$++],ne=Math.cos(X)*Y+P,le=Math.sin(X)*Z+U;$>1?D+=v(O,N,ne,le,m,T):(z=ne,H=le);var te=(m-P)*Z/Y+P;if(c){if(f.containStroke(P,U,Z,X,X+J,q,h,te,T))return!0}else D+=function(fe,we,pe,ve,be,Ee,Re,Ne){if((Ne-=we)>pe||Ne<-pe)return 0;var Le=Math.sqrt(pe*pe-Ne*Ne);l[0]=-Le,l[1]=Le;var Se=Math.abs(ve-be);if(Se<1e-4)return 0;if(Se%s<1e-4){ve=0,be=s;var Ie=Ee?1:-1;return Re>=l[0]+fe&&Re<=l[1]+fe?Ie:0}if(Ee){var Le=ve;ve=y(be),be=y(Le)}else ve=y(ve),be=y(be);ve>be&&(be+=s);for(var _e=0,Ae=0;Ae<2;Ae++){var ue=l[Ae];if(ue+fe>Re){var ke=Math.atan2(Ne,ue),Ie=Ee?1:-1;ke<0&&(ke=s+ke),(ke>=ve&&ke<=be||ke+s>=ve&&ke+s<=be)&&(ke>Math.PI/2&&ke<1.5*Math.PI&&(Ie=-Ie),_e+=Ie)}}return _e}(P,U,Z,X,X+J,q,te,T);O=Math.cos(X+J)*Y+P,N=Math.sin(X+J)*Z+U;break;case b.R:z=O=C[$++],H=N=C[$++];var re=C[$++],ie=C[$++],ne=z+re,le=H+ie;if(c){if(S.containStroke(z,H,ne,H,h,m,T)||S.containStroke(ne,H,ne,le,h,m,T)||S.containStroke(ne,le,z,le,h,m,T)||S.containStroke(z,le,z,H,h,m,T))return!0}else D+=v(ne,H,ne,le,m,T),D+=v(z,le,z,H,m,T);break;case b.Z:if(c){if(S.containStroke(O,N,z,H,h,m,T))return!0}else D+=v(O,N,z,H,m,T);O=z,N=H}}return c||1e-4>Math.abs(N-H)||(D+=v(O,N,z,H,m,T)||0),D!==0}A.contain=function(C,h,c){return I(C,0,!1,h,c)},A.containStroke=function(C,h,c,m){return I(C,h,!0,c,m)}},94457:function(E,A,u){var o=u(49226);function S(_,p){return 1e-8>Math.abs(_-p)}A.contain=function(_,p,f){var y=0,d=_[0];if(!d)return!1;for(var v=1;v<_.length;v++){var b=_[v];y+=o(d[0],d[1],b[0],b[1],p,f),d=b}var s=_[0];return S(d[0],s[0])&&S(d[1],s[1])||(y+=o(d[0],d[1],s[0],s[1],p,f)),y!==0}},87697:function(E,A,u){var o=u(14141).quadraticProjectPoint;A.containStroke=function(S,_,p,f,y,d,v,b,s){return v!==0&&(!(s>_+v)||!(s>f+v)||!(s>d+v))&&(!(s<_-v)||!(s<f-v)||!(s<d-v))&&(!(b>S+v)||!(b>p+v)||!(b>y+v))&&(!(b<S-v)||!(b<p-v)||!(b<y-v))&&o(S,_,p,f,y,d,b,s,null)<=v/2}},24570:function(E,A,u){var o=u(28761),S=u(35337),_=u(23405),p=_.getContext,f=_.extend,y=_.retrieve2,d=_.retrieve3,v=_.trim,b={},s=0,l=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,w="12px sans-serif",I={};function C(V,P){var U=V+":"+(P=P||w);if(b[U])return b[U];for(var Y=(V+"").split(`
`),Z=0,X=0,J=Y.length;X<J;X++)Z=Math.max(N(Y[X],P).width,Z);return s>5e3&&(s=0,b={}),s++,b[U]=Z,Z}function h(V,P,U){return U==="right"?V-=P:U==="center"&&(V-=P/2),V}function c(V,P,U){return U==="middle"?V-=P/2:U==="bottom"&&(V-=P),V}function m(V,P,U,Y,Z){if(!P)return"";var X=(V+"").split(`
`);Z=T(P,U,Y,Z);for(var J=0,q=X.length;J<q;J++)X[J]=D(X[J],Z);return X.join(`
`)}function T(V,P,Z,Y){(Y=f({},Y)).font=P;var Z=y(Z,"...");Y.maxIterations=y(Y.maxIterations,2);var X=Y.minChar=y(Y.minChar,0);Y.cnCharWidth=C("国",P);var J=Y.ascCharWidth=C("a",P);Y.placeholder=y(Y.placeholder,"");for(var q=V=Math.max(0,V-1),te=0;te<X&&q>=J;te++)q-=J;var re=C(Z,P);return re>q&&(Z="",re=0),q=V-re,Y.ellipsis=Z,Y.ellipsisWidth=re,Y.contentWidth=q,Y.containerWidth=V,Y}function D(V,P){var U=P.containerWidth,Y=P.font,Z=P.contentWidth;if(!U)return"";var X=C(V,Y);if(X<=U)return V;for(var J=0;;J++){if(X<=Z||J>=P.maxIterations){V+=P.ellipsis;break}var q=J===0?function(te,re,ie,ne){for(var le=0,fe=0,we=te.length;fe<we&&le<re;fe++){var pe=te.charCodeAt(fe);le+=0<=pe&&pe<=127?ie:ne}return fe}(V,Z,P.ascCharWidth,P.cnCharWidth):X>0?Math.floor(V.length*Z/X):0;X=C(V=V.substr(0,q),Y)}return V===""&&(V=P.placeholder),V}function O(V){return C("国",V)}function N(V,P){return I.measureText(V,P)}function z(V,P,U,Y,Z){V!=null&&(V+="");var X=y(Y,O(P)),J=V?V.split(`
`):[],q=J.length*X,te=q;if(U&&(te+=U[0]+U[2]),V&&Z){var re=Z.outerHeight,ie=Z.outerWidth;if(re!=null&&te>re)V="",J=[];else if(ie!=null)for(var ne=T(ie-(U?U[1]+U[3]:0),P,Z.ellipsis,{minChar:Z.minChar,placeholder:Z.placeholder}),le=0,fe=J.length;le<fe;le++)J[le]=D(J[le],ne)}return{lines:J,height:q,outerHeight:te,lineHeight:X}}function H(V,P){var U,Y={lines:[],width:0,height:0};if(V!=null&&(V+=""),!V)return Y;for(var Z=l.lastIndex=0;(U=l.exec(V))!=null;){var X=U.index;X>Z&&$(Y,V.substring(Z,X)),$(Y,U[2],U[1]),Z=l.lastIndex}Z<V.length&&$(Y,V.substring(Z,V.length));var J=Y.lines,q=0,te=0,re=[],ie=P.textPadding,ne=P.truncate,le=ne&&ne.outerWidth,fe=ne&&ne.outerHeight;ie&&(le!=null&&(le-=ie[1]+ie[3]),fe!=null&&(fe-=ie[0]+ie[2]));for(var we=0;we<J.length;we++){for(var pe=J[we],ve=0,be=0,Ee=0;Ee<pe.tokens.length;Ee++){var Re=pe.tokens[Ee],Ne=Re.styleName&&P.rich[Re.styleName]||{},Le=Re.textPadding=Ne.textPadding,Se=Re.font=Ne.font||P.font,Ie=Re.textHeight=y(Ne.textHeight,O(Se));if(Le&&(Ie+=Le[0]+Le[2]),Re.height=Ie,Re.lineHeight=d(Ne.textLineHeight,P.textLineHeight,Ie),Re.textAlign=Ne&&Ne.textAlign||P.textAlign,Re.textVerticalAlign=Ne&&Ne.textVerticalAlign||"middle",fe!=null&&q+Re.lineHeight>fe)return{lines:[],width:0,height:0};Re.textWidth=C(Re.text,Se);var _e=Ne.textWidth,Ae=_e==null||_e==="auto";if(typeof _e=="string"&&_e.charAt(_e.length-1)==="%")Re.percentWidth=_e,re.push(Re),_e=0;else{if(Ae){_e=Re.textWidth;var ue=Ne.textBackgroundColor,ke=ue&&ue.image;ke&&(ke=S.findExistImage(ke),S.isImageReady(ke)&&(_e=Math.max(_e,ke.width*Ie/ke.height)))}var Pe=Le?Le[1]+Le[3]:0;_e+=Pe;var Ve=le!=null?le-be:null;Ve!=null&&Ve<_e&&(!Ae||Ve<Pe?(Re.text="",Re.textWidth=_e=0):(Re.text=m(Re.text,Ve-Pe,Se,ne.ellipsis,{minChar:ne.minChar}),Re.textWidth=C(Re.text,Se),_e=Re.textWidth+Pe))}be+=Re.width=_e,Ne&&(ve=Math.max(ve,Re.lineHeight))}pe.width=be,pe.lineHeight=ve,q+=ve,te=Math.max(te,be)}Y.outerWidth=Y.width=y(P.textWidth,te),Y.outerHeight=Y.height=y(P.textHeight,q),ie&&(Y.outerWidth+=ie[1]+ie[3],Y.outerHeight+=ie[0]+ie[2]);for(var we=0;we<re.length;we++){var Re=re[we],je=Re.percentWidth;Re.width=parseInt(je,10)/100*te}return Y}function $(V,P,U){for(var Y=P==="",Z=P.split(`
`),X=V.lines,J=0;J<Z.length;J++){var q=Z[J],te={styleName:U,text:q,isLineHolder:!q&&!Y};if(J)X.push({tokens:[te]});else{var re=(X[X.length-1]||(X[0]={tokens:[]})).tokens,ie=re.length;ie===1&&re[0].isLineHolder?re[0]=te:(q||!ie||Y)&&re.push(te)}}}I.measureText=function(V,P){var U=p();return U.font=P||w,U.measureText(V)},A.DEFAULT_FONT=w,A.$override=function(V,P){I[V]=P},A.getWidth=C,A.getBoundingRect=function(V,P,U,Y,Z,X,J,q){var te,re,ie,ne,le,fe,we,pe,ve,be,Ee,Re,Ne,Le,Se,Ie;return J?(te=V,re=P,ie=U,ne=Y,fe=(le=H(te,{rich:J,truncate:q,font:re,textAlign:ie,textPadding:Z,textLineHeight:X})).outerWidth,we=le.outerHeight,new o(h(0,fe,ie),c(0,we,ne),fe,we)):(pe=V,ve=P,be=U,Ee=Y,Ne=z(pe,ve,Re=Z,X,q),Le=C(pe,ve),Re&&(Le+=Re[1]+Re[3]),Se=Ne.outerHeight,(Ie=new o(h(0,Le,be),c(0,Se,Ee),Le,Se)).lineHeight=Ne.lineHeight,Ie)},A.adjustTextX=h,A.adjustTextY=c,A.adjustTextPositionOnRect=function(V,P,U){var Y=P.x,Z=P.y,X=P.height,J=P.width,q=X/2,te="left",re="top";switch(V){case"left":Y-=U,Z+=q,te="right",re="middle";break;case"right":Y+=U+J,Z+=q,re="middle";break;case"top":Y+=J/2,Z-=U,te="center",re="bottom";break;case"bottom":Y+=J/2,Z+=X+U,te="center";break;case"inside":Y+=J/2,Z+=q,te="center",re="middle";break;case"insideLeft":Y+=U,Z+=q,re="middle";break;case"insideRight":Y+=J-U,Z+=q,te="right",re="middle";break;case"insideTop":Y+=J/2,Z+=U,te="center";break;case"insideBottom":Y+=J/2,Z+=X-U,te="center",re="bottom";break;case"insideTopLeft":Y+=U,Z+=U;break;case"insideTopRight":Y+=J-U,Z+=U,te="right";break;case"insideBottomLeft":Y+=U,Z+=X-U,re="bottom";break;case"insideBottomRight":Y+=J-U,Z+=X-U,te="right",re="bottom"}return{x:Y,y:Z,textAlign:te,textVerticalAlign:re}},A.truncateText=m,A.getLineHeight=O,A.measureText=N,A.parsePlainText=z,A.parseRichText=H,A.makeFont=function(V){var P=(V.fontSize||V.fontFamily)&&[V.fontStyle,V.fontWeight,(V.fontSize||12)+"px",V.fontFamily||"sans-serif"].join(" ");return P&&v(P)||V.textFont||V.font}},46500:function(E,A){var u=2*Math.PI;A.normalizeRadian=function(o){return(o%=u)<0&&(o+=u),o}},49226:function(E){E.exports=function(A,u,o,S,_,p){if(p>u&&p>S||p<u&&p<S||S===u)return 0;var f=S<u?1:-1,y=(p-u)/(S-u);(y===1||y===0)&&(f=S<u?.5:-.5);var d=y*(o-A)+A;return d===_?1/0:d>_?f:0}},18583:function(E,A,u){var o=u(23405),S=u(40498),_=u(28761),p=function(f){for(var y in f=f||{},S.call(this,f),f)f.hasOwnProperty(y)&&(this[y]=f[y]);this._children=[],this.__storage=null,this.__dirty=!0};p.prototype={constructor:p,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(f){return this._children[f]},childOfName:function(f){for(var y=this._children,d=0;d<y.length;d++)if(y[d].name===f)return y[d]},childCount:function(){return this._children.length},add:function(f){return f&&f!==this&&f.parent!==this&&(this._children.push(f),this._doAdd(f)),this},addBefore:function(f,y){if(f&&f!==this&&f.parent!==this&&y&&y.parent===this){var d=this._children,v=d.indexOf(y);v>=0&&(d.splice(v,0,f),this._doAdd(f))}return this},_doAdd:function(f){f.parent&&f.parent.remove(f),f.parent=this;var y=this.__storage,d=this.__zr;y&&y!==f.__storage&&(y.addToStorage(f),f instanceof p&&f.addChildrenToStorage(y)),d&&d.refresh()},remove:function(f){var y=this.__zr,d=this.__storage,v=this._children,b=o.indexOf(v,f);return b<0||(v.splice(b,1),f.parent=null,d&&(d.delFromStorage(f),f instanceof p&&f.delChildrenFromStorage(d)),y&&y.refresh()),this},removeAll:function(){var f,y,d=this._children,v=this.__storage;for(y=0;y<d.length;y++)f=d[y],v&&(v.delFromStorage(f),f instanceof p&&f.delChildrenFromStorage(v)),f.parent=null;return d.length=0,this},eachChild:function(f,y){for(var d=this._children,v=0;v<d.length;v++){var b=d[v];f.call(y,b,v)}return this},traverse:function(f,y){for(var d=0;d<this._children.length;d++){var v=this._children[d];f.call(y,v),v.type==="group"&&v.traverse(f,y)}return this},addChildrenToStorage:function(f){for(var y=0;y<this._children.length;y++){var d=this._children[y];f.addToStorage(d),d instanceof p&&d.addChildrenToStorage(f)}},delChildrenFromStorage:function(f){for(var y=0;y<this._children.length;y++){var d=this._children[y];f.delFromStorage(d),d instanceof p&&d.delChildrenFromStorage(f)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(f){for(var y=null,d=new _(0,0,0,0),v=f||this._children,b=[],s=0;s<v.length;s++){var l=v[s];if(!l.ignore&&!l.invisible){var w=l.getBoundingRect(),I=l.getLocalTransform(b);I?(d.copy(w),d.applyTransform(I),(y=y||d.clone()).union(d)):(y=y||w.clone()).union(w)}}return y||d}},o.inherits(p,S),E.exports=p},28761:function(E,A,u){var o,S,_,p,f=u(76414),y=u(79442),d=f.applyTransform,v=Math.min,b=Math.max;function s(l,w,I,C){I<0&&(l+=I,I=-I),C<0&&(w+=C,C=-C),this.x=l,this.y=w,this.width=I,this.height=C}s.prototype={constructor:s,union:function(l){var w=v(l.x,this.x),I=v(l.y,this.y);this.width=b(l.x+l.width,this.x+this.width)-w,this.height=b(l.y+l.height,this.y+this.height)-I,this.x=w,this.y=I},applyTransform:(o=[],S=[],_=[],p=[],function(l){if(l){o[0]=_[0]=this.x,o[1]=p[1]=this.y,S[0]=p[0]=this.x+this.width,S[1]=_[1]=this.y+this.height,d(o,o,l),d(S,S,l),d(_,_,l),d(p,p,l),this.x=v(o[0],S[0],_[0],p[0]),this.y=v(o[1],S[1],_[1],p[1]);var w=b(o[0],S[0],_[0],p[0]),I=b(o[1],S[1],_[1],p[1]);this.width=w-this.x,this.height=I-this.y}}),calculateTransform:function(l){var w=l.width/this.width,I=l.height/this.height,C=y.create();return y.translate(C,C,[-this.x,-this.y]),y.scale(C,C,[w,I]),y.translate(C,C,[l.x,l.y]),C},intersect:function(l){if(!l)return!1;l instanceof s||(l=s.create(l));var w=this.x,I=this.x+this.width,C=this.y,h=this.y+this.height,c=l.x,m=l.x+l.width,T=l.y,D=l.y+l.height;return!(I<c||m<w||h<T||D<C)},contain:function(l,w){return l>=this.x&&l<=this.x+this.width&&w>=this.y&&w<=this.y+this.height},clone:function(){return new s(this.x,this.y,this.width,this.height)},copy:function(l){this.x=l.x,this.y=l.y,this.width=l.width,this.height=l.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},s.create=function(l){return new s(l.x,l.y,l.width,l.height)},E.exports=s},28306:function(E,A,u){var o=u(46427),S=function(){this._track=[]};function _(f){var y=f[1][0]-f[0][0],d=f[1][1]-f[0][1];return Math.sqrt(y*y+d*d)}S.prototype={constructor:S,recognize:function(f,y,d){return this._doTrack(f,y,d),this._recognize(f)},clear:function(){return this._track.length=0,this},_doTrack:function(f,y,d){var v=f.touches;if(v){for(var b={points:[],touches:[],target:y,event:f},s=0,l=v.length;s<l;s++){var w=v[s],I=o.clientToLocal(d,w,{});b.points.push([I.zrX,I.zrY]),b.touches.push(w)}this._track.push(b)}},_recognize:function(f){for(var y in p)if(p.hasOwnProperty(y)){var d=p[y](this._track,f);if(d)return d}}};var p={pinch:function(f,y){var d=f.length;if(d){var v=(f[d-1]||{}).points,b=(f[d-2]||{}).points||v;if(b&&b.length>1&&v&&v.length>1){var s=_(v)/_(b);isFinite(s)||(s=1),y.pinchScale=s;var l=[(v[0][0]+v[1][0])/2,(v[0][1]+v[1][1])/2];return y.pinchX=l[0],y.pinchY=l[1],{type:"pinch",target:f[0].target,event:y}}}}};E.exports=S},26853:function(E){var A=function(){this.head=null,this.tail=null,this._len=0},u=A.prototype;u.insert=function(p){var f=new o(p);return this.insertEntry(f),f},u.insertEntry=function(p){this.head?(this.tail.next=p,p.prev=this.tail,p.next=null,this.tail=p):this.head=this.tail=p,this._len++},u.remove=function(p){var f=p.prev,y=p.next;f?f.next=y:this.head=y,y?y.prev=f:this.tail=f,p.next=p.prev=null,this._len--},u.len=function(){return this._len},u.clear=function(){this.head=this.tail=null,this._len=0};var o=function(p){this.value=p,this.next,this.prev},S=function(p){this._list=new A,this._map={},this._maxSize=p||10,this._lastRemovedEntry=null},_=S.prototype;_.put=function(p,f){var y=this._list,d=this._map,v=null;if(d[p]==null){var b=y.len(),s=this._lastRemovedEntry;if(b>=this._maxSize&&b>0){var l=y.head;y.remove(l),delete d[l.key],v=l.value,this._lastRemovedEntry=l}s?s.value=f:s=new o(f),s.key=p,y.insertEntry(s),d[p]=s}return v},_.get=function(p){var f=this._map[p],y=this._list;if(f!=null)return f!==y.tail&&(y.remove(f),y.insertEntry(f)),f.value},_.clear=function(){this._list.clear(),this._map={}},E.exports=S},93041:function(E,A,u){var o=u(14141),S=u(76414),_=u(6973),p=u(28761),f=u(8598).devicePixelRatio,y={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},d=[],v=[],b=[],s=[],l=Math.min,w=Math.max,I=Math.cos,C=Math.sin,h=Math.sqrt,c=Math.abs,m=typeof Float32Array<"u",T=function(D){this._saveData=!D,this._saveData&&(this.data=[]),this._ctx=null};T.prototype={constructor:T,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(D,O){this._ux=c(1/f/D)||0,this._uy=c(1/f/O)||0},getContext:function(){return this._ctx},beginPath:function(D){return this._ctx=D,D&&D.beginPath(),D&&(this.dpr=D.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(D,O){return this.addData(y.M,D,O),this._ctx&&this._ctx.moveTo(D,O),this._x0=D,this._y0=O,this._xi=D,this._yi=O,this},lineTo:function(D,O){var N=c(D-this._xi)>this._ux||c(O-this._yi)>this._uy||this._len<5;return this.addData(y.L,D,O),this._ctx&&N&&(this._needsDash()?this._dashedLineTo(D,O):this._ctx.lineTo(D,O)),N&&(this._xi=D,this._yi=O),this},bezierCurveTo:function(D,O,N,z,H,$){return this.addData(y.C,D,O,N,z,H,$),this._ctx&&(this._needsDash()?this._dashedBezierTo(D,O,N,z,H,$):this._ctx.bezierCurveTo(D,O,N,z,H,$)),this._xi=H,this._yi=$,this},quadraticCurveTo:function(D,O,N,z){return this.addData(y.Q,D,O,N,z),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(D,O,N,z):this._ctx.quadraticCurveTo(D,O,N,z)),this._xi=N,this._yi=z,this},arc:function(D,O,N,z,H,$){return this.addData(y.A,D,O,N,N,z,H-z,0,+!$),this._ctx&&this._ctx.arc(D,O,N,z,H,$),this._xi=I(H)*N+D,this._yi=C(H)*N+O,this},arcTo:function(D,O,N,z,H){return this._ctx&&this._ctx.arcTo(D,O,N,z,H),this},rect:function(D,O,N,z){return this._ctx&&this._ctx.rect(D,O,N,z),this.addData(y.R,D,O,N,z),this},closePath:function(){this.addData(y.Z);var D=this._ctx,O=this._x0,N=this._y0;return D&&(this._needsDash()&&this._dashedLineTo(O,N),D.closePath()),this._xi=O,this._yi=N,this},fill:function(D){D&&D.fill(),this.toStatic()},stroke:function(D){D&&D.stroke(),this.toStatic()},setLineDash:function(D){if(D instanceof Array){this._lineDash=D,this._dashIdx=0;for(var O=0,N=0;N<D.length;N++)O+=D[N];this._dashSum=O}return this},setLineDashOffset:function(D){return this._dashOffset=D,this},len:function(){return this._len},setData:function(D){var O=D.length;!(this.data&&this.data.length===O)&&m&&(this.data=new Float32Array(O));for(var N=0;N<O;N++)this.data[N]=D[N];this._len=O},appendPath:function(D){D instanceof Array||(D=[D]);for(var O=D.length,N=0,z=this._len,H=0;H<O;H++)N+=D[H].len();m&&this.data instanceof Float32Array&&(this.data=new Float32Array(z+N));for(var H=0;H<O;H++)for(var $=D[H].data,V=0;V<$.length;V++)this.data[z++]=$[V];this._len=z},addData:function(D){if(this._saveData){var O=this.data;this._len+arguments.length>O.length&&(this._expandData(),O=this.data);for(var N=0;N<arguments.length;N++)O[this._len++]=arguments[N];this._prevCmd=D}},_expandData:function(){if(!(this.data instanceof Array)){for(var D=[],O=0;O<this._len;O++)D[O]=this.data[O];this.data=D}},_needsDash:function(){return this._lineDash},_dashedLineTo:function(D,O){var N,z,H=this._dashSum,$=this._dashOffset,V=this._lineDash,P=this._ctx,U=this._xi,Y=this._yi,Z=D-U,X=O-Y,J=h(Z*Z+X*X),q=U,te=Y,re=V.length;for(Z/=J,X/=J,$<0&&($=H+$),$%=H,q-=$*Z,te-=$*X;Z>0&&q<=D||Z<0&&q>=D||Z===0&&(X>0&&te<=O||X<0&&te>=O);)q+=Z*(N=V[z=this._dashIdx]),te+=X*N,this._dashIdx=(z+1)%re,Z>0&&q<U||Z<0&&q>U||X>0&&te<Y||X<0&&te>Y||P[z%2?"moveTo":"lineTo"](Z>=0?l(q,D):w(q,D),X>=0?l(te,O):w(te,O));Z=q-D,X=te-O,this._dashOffset=-h(Z*Z+X*X)},_dashedBezierTo:function(D,O,N,z,H,$){var V,P,U,Y,Z,X=this._dashSum,J=this._dashOffset,q=this._lineDash,te=this._ctx,re=this._xi,ie=this._yi,ne=o.cubicAt,le=0,fe=this._dashIdx,we=q.length,pe=0;for(J<0&&(J=X+J),J%=X,V=0;V<1;V+=.1)le+=h((P=ne(re,D,N,H,V+.1)-ne(re,D,N,H,V))*P+(U=ne(ie,O,z,$,V+.1)-ne(ie,O,z,$,V))*U);for(;fe<we&&!((pe+=q[fe])>J);fe++);for(V=(pe-J)/le;V<=1;)Y=ne(re,D,N,H,V),Z=ne(ie,O,z,$,V),fe%2?te.moveTo(Y,Z):te.lineTo(Y,Z),V+=q[fe]/le,fe=(fe+1)%we;fe%2!=0&&te.lineTo(H,$),P=H-Y,U=$-Z,this._dashOffset=-h(P*P+U*U)},_dashedQuadraticTo:function(D,O,N,z){var H=N,$=z;N=(N+2*D)/3,z=(z+2*O)/3,D=(this._xi+2*D)/3,O=(this._yi+2*O)/3,this._dashedBezierTo(D,O,N,z,H,$)},toStatic:function(){var D=this.data;D instanceof Array&&(D.length=this._len,m&&(this.data=new Float32Array(D)))},getBoundingRect:function(){d[0]=d[1]=b[0]=b[1]=Number.MAX_VALUE,v[0]=v[1]=s[0]=s[1]=-Number.MAX_VALUE;for(var D=this.data,O=0,N=0,z=0,H=0,$=0;$<D.length;){var V=D[$++];switch($===1&&(O=D[$],N=D[$+1],z=O,H=N),V){case y.M:z=D[$++],H=D[$++],O=z,N=H,b[0]=z,b[1]=H,s[0]=z,s[1]=H;break;case y.L:_.fromLine(O,N,D[$],D[$+1],b,s),O=D[$++],N=D[$++];break;case y.C:_.fromCubic(O,N,D[$++],D[$++],D[$++],D[$++],D[$],D[$+1],b,s),O=D[$++],N=D[$++];break;case y.Q:_.fromQuadratic(O,N,D[$++],D[$++],D[$],D[$+1],b,s),O=D[$++],N=D[$++];break;case y.A:var P=D[$++],U=D[$++],Y=D[$++],Z=D[$++],X=D[$++],J=D[$++]+X;$+=1;var q=1-D[$++];$===1&&(z=I(X)*Y+P,H=C(X)*Z+U),_.fromArc(P,U,Y,Z,X,J,q,b,s),O=I(J)*Y+P,N=C(J)*Z+U;break;case y.R:z=O=D[$++],H=N=D[$++];var te=D[$++],re=D[$++];_.fromLine(z,H,z+te,H+re,b,s);break;case y.Z:O=z,N=H}S.min(d,d,b),S.max(v,v,s)}return $===0&&(d[0]=d[1]=v[0]=v[1]=0),new p(d[0],d[1],v[0]-d[0],v[1]-d[1])},rebuildPath:function(D){for(var O,N,z,H,$,V,P=this.data,U=this._ux,Y=this._uy,Z=this._len,X=0;X<Z;){var J=P[X++];switch(X===1&&(z=P[X],H=P[X+1],O=z,N=H),J){case y.M:O=z=P[X++],N=H=P[X++],D.moveTo(z,H);break;case y.L:$=P[X++],V=P[X++],(c($-z)>U||c(V-H)>Y||X===Z-1)&&(D.lineTo($,V),z=$,H=V);break;case y.C:D.bezierCurveTo(P[X++],P[X++],P[X++],P[X++],P[X++],P[X++]),z=P[X-2],H=P[X-1];break;case y.Q:D.quadraticCurveTo(P[X++],P[X++],P[X++],P[X++]),z=P[X-2],H=P[X-1];break;case y.A:var q=P[X++],te=P[X++],re=P[X++],ie=P[X++],ne=P[X++],le=P[X++],fe=P[X++],we=P[X++],pe=re>ie?re:ie,ve=re>ie?1:re/ie,be=re>ie?ie/re:1,Ee=ne+le;Math.abs(re-ie)>.001?(D.translate(q,te),D.rotate(fe),D.scale(ve,be),D.arc(0,0,pe,ne,Ee,1-we),D.scale(1/ve,1/be),D.rotate(-fe),D.translate(-q,-te)):D.arc(q,te,pe,ne,Ee,1-we),X===1&&(O=I(ne)*re+q,N=C(ne)*ie+te),z=I(Ee)*re+q,H=C(Ee)*ie+te;break;case y.R:O=z=P[X],N=H=P[X+1],D.rect(P[X++],P[X++],P[X++],P[X++]);break;case y.Z:D.closePath(),z=O,H=N}}}},T.CMD=y,E.exports=T},7189:function(E){function A(){}A.prototype={diff:function(o,S,_){_||(_=function(C,h){return C===h}),this.equals=_;var p=this;o=o.slice();var f=(S=S.slice()).length,y=o.length,d=1,v=f+y,b=[{newPos:-1,components:[]}],s=this.extractCommon(b[0],S,o,0);if(b[0].newPos+1>=f&&s+1>=y){for(var l=[],w=0;w<S.length;w++)l.push(w);return[{indices:l,count:S.length}]}for(;d<=v;){var I=function(){for(var C=-1*d;C<=d;C+=2){var h,c,m=b[C-1],T=b[C+1],D=(T?T.newPos:0)-C;m&&(b[C-1]=void 0);var O=m&&m.newPos+1<f,N=T&&0<=D&&D<y;if(!O&&!N){b[C]=void 0;continue}if(!O||N&&m.newPos<T.newPos?(c={newPos:(h=T).newPos,components:h.components.slice(0)},p.pushComponent(c.components,void 0,!0)):(c=m,c.newPos++,p.pushComponent(c.components,!0,void 0)),D=p.extractCommon(c,S,o,C),c.newPos+1>=f&&D+1>=y)return function(z,H,$,V){for(var P=0,U=H.length,Y=0,Z=0;P<U;P++){var X=H[P];if(X.removed){for(var J=[],q=Z;q<Z+X.count;q++)J.push(q);X.indices=J,Z+=X.count}else{for(var J=[],q=Y;q<Y+X.count;q++)J.push(q);X.indices=J,Y+=X.count,X.added||(Z+=X.count)}}return H}(0,c.components);b[C]=c}d++}();if(I)return I}},pushComponent:function(o,S,_){var p=o[o.length-1];p&&p.added===S&&p.removed===_?o[o.length-1]={count:p.count+1,added:S,removed:_}:o.push({count:1,added:S,removed:_})},extractCommon:function(o,S,_,p){for(var f=S.length,y=_.length,d=o.newPos,v=d-p,b=0;d+1<f&&v+1<y&&this.equals(S[d+1],_[v+1]);)d++,v++,b++;return b&&o.components.push({count:b}),o.newPos=d,v},tokenize:function(o){return o.slice()},join:function(o){return o.slice()}};var u=new A;E.exports=function(o,S,_){return u.diff(o,S,_)}},6973:function(E,A,u){var o=u(76414),S=u(14141),_=Math.min,p=Math.max,f=Math.sin,y=Math.cos,d=2*Math.PI,v=o.create(),b=o.create(),s=o.create(),l=[],w=[];A.fromPoints=function(I,C,h){if(I.length!==0){var c,m=I[0],T=m[0],D=m[0],O=m[1],N=m[1];for(c=1;c<I.length;c++)T=_(T,(m=I[c])[0]),D=p(D,m[0]),O=_(O,m[1]),N=p(N,m[1]);C[0]=T,C[1]=O,h[0]=D,h[1]=N}},A.fromLine=function(I,C,h,c,m,T){m[0]=_(I,h),m[1]=_(C,c),T[0]=p(I,h),T[1]=p(C,c)},A.fromCubic=function(I,C,h,c,m,T,D,O,N,z){var H,$=S.cubicExtrema,V=S.cubicAt,P=$(I,h,m,D,l);for(H=0,N[0]=1/0,N[1]=1/0,z[0]=-1/0,z[1]=-1/0;H<P;H++){var U=V(I,h,m,D,l[H]);N[0]=_(U,N[0]),z[0]=p(U,z[0])}for(H=0,P=$(C,c,T,O,w);H<P;H++){var Y=V(C,c,T,O,w[H]);N[1]=_(Y,N[1]),z[1]=p(Y,z[1])}N[0]=_(I,N[0]),z[0]=p(I,z[0]),N[0]=_(D,N[0]),z[0]=p(D,z[0]),N[1]=_(C,N[1]),z[1]=p(C,z[1]),N[1]=_(O,N[1]),z[1]=p(O,z[1])},A.fromQuadratic=function(I,C,h,c,m,T,D,O){var N=S.quadraticExtremum,z=S.quadraticAt,H=p(_(N(I,h,m),1),0),$=p(_(N(C,c,T),1),0),V=z(I,h,m,H),P=z(C,c,T,$);D[0]=_(I,m,V),D[1]=_(C,T,P),O[0]=p(I,m,V),O[1]=p(C,T,P)},A.fromArc=function(I,C,h,c,m,T,D,O,N){var z=o.min,H=o.max,$=Math.abs(m-T);if($%d<1e-4&&$>1e-4){O[0]=I-h,O[1]=C-c,N[0]=I+h,N[1]=C+c;return}if(v[0]=y(m)*h+I,v[1]=f(m)*c+C,b[0]=y(T)*h+I,b[1]=f(T)*c+C,z(O,v,b),H(N,v,b),(m%=d)<0&&(m+=d),(T%=d)<0&&(T+=d),m>T&&!D?T+=d:m<T&&D&&(m+=d),D){var V=T;T=m,m=V}for(var P=0;P<T;P+=Math.PI/2)P>m&&(s[0]=y(P)*h+I,s[1]=f(P)*c+C,z(O,s,O),H(N,s,N))}},14141:function(E,A,u){var o=u(76414),S=o.create,_=o.distSquare,p=Math.pow,f=Math.sqrt,y=f(3),d=1/3,v=S(),b=S(),s=S();function l(h){return h>-1e-8&&h<1e-8}function w(h){return h>1e-8||h<-1e-8}function I(h,c,m,T,D){var O=1-D;return O*O*(O*h+3*D*c)+D*D*(D*T+3*O*m)}function C(h,c,m,T){var D=1-T;return D*(D*h+2*T*c)+T*T*m}A.cubicAt=I,A.cubicDerivativeAt=function(h,c,m,T,D){var O=1-D;return 3*(((c-h)*O+2*(m-c)*D)*O+(T-m)*D*D)},A.cubicRootAt=function(h,c,m,T,D,O){var N=T+3*(c-m)-h,z=3*(m-2*c+h),H=3*(c-h),$=h-D,V=z*z-3*N*H,P=z*H-9*N*$,U=H*H-3*z*$,Y=0;if(l(V)&&l(P))if(l(z))O[0]=0;else{var Z=-H/z;Z>=0&&Z<=1&&(O[Y++]=Z)}else{var X=P*P-4*V*U;if(l(X)){var J=P/V,Z=-z/N+J,q=-J/2;Z>=0&&Z<=1&&(O[Y++]=Z),q>=0&&q<=1&&(O[Y++]=q)}else if(X>0){var te=f(X),re=V*z+1.5*N*(-P+te),ie=V*z+1.5*N*(-P-te),Z=(-z-((re=re<0?-p(-re,d):p(re,d))+(ie=ie<0?-p(-ie,d):p(ie,d))))/(3*N);Z>=0&&Z<=1&&(O[Y++]=Z)}else{var ne=Math.acos((2*V*z-3*N*P)/(2*f(V*V*V)))/3,le=f(V),fe=Math.cos(ne),Z=(-z-2*le*fe)/(3*N),q=(-z+le*(fe+y*Math.sin(ne)))/(3*N),we=(-z+le*(fe-y*Math.sin(ne)))/(3*N);Z>=0&&Z<=1&&(O[Y++]=Z),q>=0&&q<=1&&(O[Y++]=q),we>=0&&we<=1&&(O[Y++]=we)}}return Y},A.cubicExtrema=function(h,c,m,T,D){var O=6*m-12*c+6*h,N=9*c+3*T-3*h-9*m,z=3*c-3*h,H=0;if(l(N)){if(w(O)){var $=-z/O;$>=0&&$<=1&&(D[H++]=$)}}else{var V=O*O-4*N*z;if(l(V))D[0]=-O/(2*N);else if(V>0){var P=f(V),$=(-O+P)/(2*N),U=(-O-P)/(2*N);$>=0&&$<=1&&(D[H++]=$),U>=0&&U<=1&&(D[H++]=U)}}return H},A.cubicSubdivide=function(h,c,m,T,D,O){var N=(c-h)*D+h,z=(m-c)*D+c,H=(T-m)*D+m,$=(z-N)*D+N,V=(H-z)*D+z,P=(V-$)*D+$;O[0]=h,O[1]=N,O[2]=$,O[3]=P,O[4]=P,O[5]=V,O[6]=H,O[7]=T},A.cubicProjectPoint=function(h,c,m,T,D,O,N,z,H,$,V){var P,U,Y,Z,X,J=.005,q=1/0;v[0]=H,v[1]=$;for(var te=0;te<1;te+=.05)b[0]=I(h,m,D,N,te),b[1]=I(c,T,O,z,te),(Z=_(v,b))<q&&(P=te,q=Z);q=1/0;for(var re=0;re<32&&!(J<1e-4);re++)U=P-J,Y=P+J,b[0]=I(h,m,D,N,U),b[1]=I(c,T,O,z,U),Z=_(b,v),U>=0&&Z<q?(P=U,q=Z):(s[0]=I(h,m,D,N,Y),s[1]=I(c,T,O,z,Y),X=_(s,v),Y<=1&&X<q?(P=Y,q=X):J*=.5);return V&&(V[0]=I(h,m,D,N,P),V[1]=I(c,T,O,z,P)),f(q)},A.quadraticAt=C,A.quadraticDerivativeAt=function(h,c,m,T){return 2*((1-T)*(c-h)+T*(m-c))},A.quadraticRootAt=function(h,c,m,T,D){var O=h-2*c+m,N=2*(c-h),z=h-T,H=0;if(l(O)){if(w(N)){var $=-z/N;$>=0&&$<=1&&(D[H++]=$)}}else{var V=N*N-4*O*z;if(l(V)){var $=-N/(2*O);$>=0&&$<=1&&(D[H++]=$)}else if(V>0){var P=f(V),$=(-N+P)/(2*O),U=(-N-P)/(2*O);$>=0&&$<=1&&(D[H++]=$),U>=0&&U<=1&&(D[H++]=U)}}return H},A.quadraticExtremum=function(h,c,m){var T=h+m-2*c;return T===0?.5:(h-c)/T},A.quadraticSubdivide=function(h,c,m,T,D){var O=(c-h)*T+h,N=(m-c)*T+c,z=(N-O)*T+O;D[0]=h,D[1]=O,D[2]=z,D[3]=z,D[4]=N,D[5]=m},A.quadraticProjectPoint=function(h,c,m,T,D,O,N,z,H){var $,V=.005,P=1/0;v[0]=N,v[1]=z;for(var U=0;U<1;U+=.05){b[0]=C(h,m,D,U),b[1]=C(c,T,O,U);var Y=_(v,b);Y<P&&($=U,P=Y)}P=1/0;for(var Z=0;Z<32&&!(V<1e-4);Z++){var X=$-V,J=$+V;b[0]=C(h,m,D,X),b[1]=C(c,T,O,X);var Y=_(b,v);if(X>=0&&Y<P)$=X,P=Y;else{s[0]=C(h,m,D,J),s[1]=C(c,T,O,J);var q=_(s,v);J<=1&&q<P?($=J,P=q):V*=.5}}return H&&(H[0]=C(h,m,D,$),H[1]=C(c,T,O,$)),f(P)}},23584:function(E){var A,u,o,S,_,p;E.exports=typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:typeof document>"u"&&typeof self<"u"?{browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:typeof navigator>"u"?{browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:(A=navigator.userAgent,u={},o=A.match(/Firefox\/([\d.]+)/),S=A.match(/MSIE\s([\d.]+)/)||A.match(/Trident\/.+?rv:(([\d.]+))/),_=A.match(/Edge\/([\d.]+)/),p=/micromessenger/i.test(A),o&&(u.firefox=!0,u.version=o[1]),S&&(u.ie=!0,u.version=S[1]),_&&(u.edge=!0,u.version=_[1]),p&&(u.weChat=!0),{browser:u,os:{},node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:typeof SVGRect<"u",touchEventsSupported:"ontouchstart"in window&&!u.ie&&!u.edge,pointerEventsSupported:"onpointerdown"in window&&(u.edge||u.ie&&u.version>=11),domSupported:typeof document<"u"})},46427:function(E,A,u){A.Dispatcher=u(62271);var o=u(23584),S=typeof window<"u"&&!!window.addEventListener,_=/^(?:mouse|pointer|contextmenu|drag|drop)|click/;function p(d,v,b,s){return b=b||{},s||!o.canvasSupported?f(d,v,b):o.browser.firefox&&v.layerX!=null&&v.layerX!==v.offsetX?(b.zrX=v.layerX,b.zrY=v.layerY):v.offsetX!=null?(b.zrX=v.offsetX,b.zrY=v.offsetY):f(d,v,b),b}function f(d,v,b){var s=d.getBoundingClientRect?d.getBoundingClientRect():{left:0,top:0};b.zrX=v.clientX-s.left,b.zrY=v.clientY-s.top}var y=S?function(d){d.preventDefault(),d.stopPropagation(),d.cancelBubble=!0}:function(d){d.returnValue=!1,d.cancelBubble=!0};A.clientToLocal=p,A.normalizeEvent=function(d,v,b){if((v=v||window.event).zrX!=null)return v;var s=v.type;if(s&&s.indexOf("touch")>=0){var l=s!=="touchend"?v.targetTouches[0]:v.changedTouches[0];l&&p(d,l,v,b)}else p(d,v,v,b),v.zrDelta=v.wheelDelta?v.wheelDelta/120:-(v.detail||0)/3;var w=v.button;return v.which==null&&w!==void 0&&_.test(v.type)&&(v.which=1&w?1:2&w?3:4&w?2:0),v},A.addEventListener=function(d,v,b){S?d.addEventListener(v,b):d.attachEvent("on"+v,b)},A.removeEventListener=function(d,v,b){S?d.removeEventListener(v,b):d.detachEvent("on"+v,b)},A.stop=y,A.isMiddleOrRightButtonOnMouseUpDown=function(d){return d.which===2||d.which===3},A.notLeftMouse=function(d){return d.which>1}},46490:function(E){var A=2311;E.exports=function(){return A++}},45003:function(E,A,u){var o=u(8598).debugMode,S=function(){};o===1?S=function(){for(var _ in arguments)throw Error(arguments[_])}:o>1&&(S=function(){for(var _ in arguments)console.log(arguments[_])}),E.exports=S},79442:function(E,A){var u=typeof Float32Array>"u"?Array:Float32Array;function o(){var p=new u(6);return S(p),p}function S(p){return p[0]=1,p[1]=0,p[2]=0,p[3]=1,p[4]=0,p[5]=0,p}function _(p,f){return p[0]=f[0],p[1]=f[1],p[2]=f[2],p[3]=f[3],p[4]=f[4],p[5]=f[5],p}A.create=o,A.identity=S,A.copy=_,A.mul=function(p,f,y){var d=f[0]*y[0]+f[2]*y[1],v=f[1]*y[0]+f[3]*y[1],b=f[0]*y[2]+f[2]*y[3],s=f[1]*y[2]+f[3]*y[3],l=f[0]*y[4]+f[2]*y[5]+f[4],w=f[1]*y[4]+f[3]*y[5]+f[5];return p[0]=d,p[1]=v,p[2]=b,p[3]=s,p[4]=l,p[5]=w,p},A.translate=function(p,f,y){return p[0]=f[0],p[1]=f[1],p[2]=f[2],p[3]=f[3],p[4]=f[4]+y[0],p[5]=f[5]+y[1],p},A.rotate=function(p,f,y){var d=f[0],v=f[2],b=f[4],s=f[1],l=f[3],w=f[5],I=Math.sin(y),C=Math.cos(y);return p[0]=d*C+s*I,p[1]=-d*I+s*C,p[2]=v*C+l*I,p[3]=-v*I+C*l,p[4]=C*b+I*w,p[5]=C*w-I*b,p},A.scale=function(p,f,y){var d=y[0],v=y[1];return p[0]=f[0]*d,p[1]=f[1]*v,p[2]=f[2]*d,p[3]=f[3]*v,p[4]=f[4]*d,p[5]=f[5]*v,p},A.invert=function(p,f){var y=f[0],d=f[2],v=f[4],b=f[1],s=f[3],l=f[5],w=y*s-b*d;return w?(w=1/w,p[0]=s*w,p[1]=-b*w,p[2]=-d*w,p[3]=y*w,p[4]=(d*l-s*v)*w,p[5]=(b*v-y*l)*w,p):null},A.clone=function(p){var f=o();return _(f,p),f}},32553:function(E){function A(p,f,y,d){var v=f+1;if(v===y)return 1;if(0>d(p[v++],p[f])){for(;v<y&&0>d(p[v],p[v-1]);)v++;var b=p,s=f,l=v;for(l--;s<l;){var w=b[s];b[s++]=b[l],b[l--]=w}}else for(;v<y&&d(p[v],p[v-1])>=0;)v++;return v-f}function u(p,f,y,d,v){for(d===f&&d++;d<y;d++){for(var b,s=p[d],l=f,w=d;l<w;)0>v(s,p[b=l+w>>>1])?w=b:l=b+1;var I=d-l;switch(I){case 3:p[l+3]=p[l+2];case 2:p[l+2]=p[l+1];case 1:p[l+1]=p[l];break;default:for(;I>0;)p[l+I]=p[l+I-1],I--}p[l]=s}}function o(p,f,y,d,v,b){var s=0,l=0,w=1;if(b(p,f[y+v])>0){for(l=d-v;w<l&&b(p,f[y+v+w])>0;)s=w,(w=(w<<1)+1)<=0&&(w=l);w>l&&(w=l),s+=v,w+=v}else{for(l=v+1;w<l&&0>=b(p,f[y+v-w]);)s=w,(w=(w<<1)+1)<=0&&(w=l);w>l&&(w=l);var I=s;s=v-w,w=v-I}for(s++;s<w;){var C=s+(w-s>>>1);b(p,f[y+C])>0?s=C+1:w=C}return w}function S(p,f,y,d,v,b){var s=0,l=0,w=1;if(0>b(p,f[y+v])){for(l=v+1;w<l&&0>b(p,f[y+v-w]);)s=w,(w=(w<<1)+1)<=0&&(w=l);w>l&&(w=l);var I=s;s=v-w,w=v-I}else{for(l=d-v;w<l&&b(p,f[y+v+w])>=0;)s=w,(w=(w<<1)+1)<=0&&(w=l);w>l&&(w=l),s+=v,w+=v}for(s++;s<w;){var C=s+(w-s>>>1);0>b(p,f[y+C])?w=C:s=C+1}return w}function _(p,f){var y,d,v=7,b=0;p.length;var s=[];function l(w){var I=y[w],C=d[w],h=y[w+1],c=d[w+1];d[w]=C+c,w===b-3&&(y[w+1]=y[w+2],d[w+1]=d[w+2]),b--;var m=S(p[h],p,I,C,0,f);I+=m,(C-=m)!=0&&(c=o(p[I+C-1],p,h,c,c-1,f))!==0&&(C<=c?function(T,D,O,N){var z,H,$,V=0;for(V=0;V<D;V++)s[V]=p[T+V];var P=0,U=O,Y=T;if(p[Y++]=p[U++],--N==0){for(V=0;V<D;V++)p[Y+V]=s[P+V];return}if(D===1){for(V=0;V<N;V++)p[Y+V]=p[U+V];p[Y+N]=s[P];return}for(var Z=v;;){z=0,H=0,$=!1;do if(0>f(p[U],s[P])){if(p[Y++]=p[U++],H++,z=0,--N==0){$=!0;break}}else if(p[Y++]=s[P++],z++,H=0,--D==1){$=!0;break}while((z|H)<Z);if($)break;do{if((z=S(p[U],s,P,D,0,f))!==0){for(V=0;V<z;V++)p[Y+V]=s[P+V];if(Y+=z,P+=z,(D-=z)<=1){$=!0;break}}if(p[Y++]=p[U++],--N==0){$=!0;break}if((H=o(s[P],p,U,N,0,f))!==0){for(V=0;V<H;V++)p[Y+V]=p[U+V];if(Y+=H,U+=H,(N-=H)==0){$=!0;break}}if(p[Y++]=s[P++],--D==1){$=!0;break}Z--}while(z>=7||H>=7);if($)break;Z<0&&(Z=0),Z+=2}if((v=Z)<1&&(v=1),D===1){for(V=0;V<N;V++)p[Y+V]=p[U+V];p[Y+N]=s[P]}else{if(D===0)throw Error();for(V=0;V<D;V++)p[Y+V]=s[P+V]}}(I,C,h,c):function(T,D,O,N){var z=0;for(z=0;z<N;z++)s[z]=p[O+z];var H=T+D-1,$=N-1,V=O+N-1,P=0,U=0;if(p[V--]=p[H--],--D==0){for(z=0,P=V-(N-1);z<N;z++)p[P+z]=s[z];return}if(N===1){for(V-=D,H-=D,U=V+1,P=H+1,z=D-1;z>=0;z--)p[U+z]=p[P+z];p[V]=s[$];return}for(var Y=v;;){var Z=0,X=0,J=!1;do if(0>f(s[$],p[H])){if(p[V--]=p[H--],Z++,X=0,--D==0){J=!0;break}}else if(p[V--]=s[$--],X++,Z=0,--N==1){J=!0;break}while((Z|X)<Y);if(J)break;do{if((Z=D-S(s[$],p,T,D,D-1,f))!=0){for(V-=Z,H-=Z,D-=Z,U=V+1,P=H+1,z=Z-1;z>=0;z--)p[U+z]=p[P+z];if(D===0){J=!0;break}}if(p[V--]=s[$--],--N==1){J=!0;break}if((X=N-o(p[H],s,0,N,N-1,f))!=0){for(V-=X,$-=X,N-=X,U=V+1,P=$+1,z=0;z<X;z++)p[U+z]=s[P+z];if(N<=1){J=!0;break}}if(p[V--]=p[H--],--D==0){J=!0;break}Y--}while(Z>=7||X>=7);if(J)break;Y<0&&(Y=0),Y+=2}if((v=Y)<1&&(v=1),N===1){for(V-=D,H-=D,U=V+1,P=H+1,z=D-1;z>=0;z--)p[U+z]=p[P+z];p[V]=s[$]}else{if(N===0)throw Error();for(z=0,P=V-(N-1);z<N;z++)p[P+z]=s[z]}}(I,C,h,c))}y=[],d=[],this.mergeRuns=function(){for(;b>1;){var w=b-2;if(w>=1&&d[w-1]<=d[w]+d[w+1]||w>=2&&d[w-2]<=d[w]+d[w-1])d[w-1]<d[w+1]&&w--;else if(d[w]>d[w+1])break;l(w)}},this.forceMergeRuns=function(){for(;b>1;){var w=b-2;w>0&&d[w-1]<d[w+1]&&w--,l(w)}},this.pushRun=function(w,I){y[b]=w,d[b]=I,b+=1}}E.exports=function(p,f,y,d){y||(y=0),d||(d=p.length);var v=d-y;if(!(v<2)){var b=0;if(v<32){b=A(p,y,d,f),u(p,y,d,y+b,f);return}var s=new _(p,f),l=function(I){for(var C=0;I>=32;)C|=1&I,I>>=1;return I+C}(v);do{if((b=A(p,y,d,f))<l){var w=v;w>l&&(w=l),u(p,y,y+w,y+b,f),b=w}s.pushRun(y,b),s.mergeRuns(),v-=b,y+=b}while(v!==0);s.forceMergeRuns()}}},23405:function(E,A){var u,o={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},S={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},_=Object.prototype.toString,p=Array.prototype,f=p.forEach,y=p.filter,d=p.slice,v=p.map,b=p.reduce,s={};function l(H){if(H==null||typeof H!="object")return H;var $=H,V=_.call(H);if(V==="[object Array]"){if(!H[N]){$=[];for(var P=0,U=H.length;P<U;P++)$[P]=l(H[P])}}else if(S[V]){if(!H[N]){var Y=H.constructor;if(H.constructor.from)$=Y.from(H);else{$=new Y(H.length);for(var P=0,U=H.length;P<U;P++)$[P]=l(H[P])}}}else if(!o[V]&&!H[N]&&!O(H))for(var Z in $={},H)H.hasOwnProperty(Z)&&($[Z]=l(H[Z]));return $}function w(H,$,V){if(!T($)||!T(H))return V?l($):H;for(var P in $)if($.hasOwnProperty(P)){var U=H[P],Y=$[P];!(T(Y)&&T(U))||m(Y)||m(U)||O(Y)||O(U)||D(Y)||D(U)||Y[N]||U[N]?!V&&P in H||(H[P]=l($[P])):w(U,Y,V)}return H}function I(H,$,V){for(var P in $)$.hasOwnProperty(P)&&(V?$[P]!=null:H[P]==null)&&(H[P]=$[P]);return H}var C=function(){return s.createCanvas()};function h(H,$,V){if(H&&$)if(H.forEach&&H.forEach===f)H.forEach($,V);else if(H.length===+H.length)for(var P=0,U=H.length;P<U;P++)$.call(V,H[P],P,H);else for(var Y in H)H.hasOwnProperty(Y)&&$.call(V,H[Y],Y,H)}function c(H,$){var V=d.call(arguments,2);return function(){return H.apply($,V.concat(d.call(arguments)))}}function m(H){return _.call(H)==="[object Array]"}function T(H){var $=typeof H;return $==="function"||!!H&&$==="object"}function D(H){return!!o[_.call(H)]}function O(H){return typeof H=="object"&&typeof H.nodeType=="number"&&typeof H.ownerDocument=="object"}s.createCanvas=function(){return document.createElement("canvas")};var N="__ec_primitive__";function z(H){var $=m(H);this.data={};var V=this;function P(U,Y){$?V.set(U,Y):V.set(Y,U)}H instanceof z?H.each(P):H&&h(H,P)}z.prototype={constructor:z,get:function(H){return this.data.hasOwnProperty(H)?this.data[H]:null},set:function(H,$){return this.data[H]=$},each:function(H,$){for(var V in $!==void 0&&(H=c(H,$)),this.data)this.data.hasOwnProperty(V)&&H(this.data[V],V)},removeKey:function(H){delete this.data[H]}},A.$override=function(H,$){H==="createCanvas"&&(u=null),s[H]=$},A.clone=l,A.merge=w,A.mergeAll=function(H,$){for(var V=H[0],P=1,U=H.length;P<U;P++)V=w(V,H[P],$);return V},A.extend=function(H,$){for(var V in $)$.hasOwnProperty(V)&&(H[V]=$[V]);return H},A.defaults=I,A.createCanvas=C,A.getContext=function(){return u||(u=C().getContext("2d")),u},A.indexOf=function(H,$){if(H){if(H.indexOf)return H.indexOf($);for(var V=0,P=H.length;V<P;V++)if(H[V]===$)return V}return-1},A.inherits=function(H,$){var V=H.prototype;function P(){}for(var U in P.prototype=$.prototype,H.prototype=new P,V)H.prototype[U]=V[U];H.prototype.constructor=H,H.superClass=$},A.mixin=function(H,$,V){I(H="prototype"in H?H.prototype:H,$="prototype"in $?$.prototype:$,V)},A.isArrayLike=function(H){if(H)return typeof H!="string"&&typeof H.length=="number"},A.each=h,A.map=function(H,$,V){if(H&&$){if(H.map&&H.map===v)return H.map($,V);for(var P=[],U=0,Y=H.length;U<Y;U++)P.push($.call(V,H[U],U,H));return P}},A.reduce=function(H,$,V,P){if(H&&$){if(H.reduce&&H.reduce===b)return H.reduce($,V,P);for(var U=0,Y=H.length;U<Y;U++)V=$.call(P,V,H[U],U,H);return V}},A.filter=function(H,$,V){if(H&&$){if(H.filter&&H.filter===y)return H.filter($,V);for(var P=[],U=0,Y=H.length;U<Y;U++)$.call(V,H[U],U,H)&&P.push(H[U]);return P}},A.find=function(H,$,V){if(H&&$){for(var P=0,U=H.length;P<U;P++)if($.call(V,H[P],P,H))return H[P]}},A.bind=c,A.curry=function(H){var $=d.call(arguments,1);return function(){return H.apply(this,$.concat(d.call(arguments)))}},A.isArray=m,A.isFunction=function(H){return typeof H=="function"},A.isString=function(H){return _.call(H)==="[object String]"},A.isObject=T,A.isBuiltInObject=D,A.isTypedArray=function(H){return!!S[_.call(H)]},A.isDom=O,A.eqNaN=function(H){return H!=H},A.retrieve=function(H){for(var $=0,V=arguments.length;$<V;$++)if(arguments[$]!=null)return arguments[$]},A.retrieve2=function(H,$){return H??$},A.retrieve3=function(H,$,V){return H??$??V},A.slice=function(){return Function.call.apply(d,arguments)},A.normalizeCssArray=function(H){if(typeof H=="number")return[H,H,H,H];var $=H.length;return $===2?[H[0],H[1],H[0],H[1]]:$===3?[H[0],H[1],H[2],H[1]]:H},A.assert=function(H,$){if(!H)throw Error($)},A.trim=function(H){return H==null?null:typeof H.trim=="function"?H.trim():H.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},A.setAsPrimitive=function(H){H[N]=!0},A.isPrimitive=function(H){return H[N]},A.createHashMap=function(H){return new z(H)},A.concatArray=function(H,$){for(var V=new H.constructor(H.length+$.length),P=0;P<H.length;P++)V[P]=H[P];var U=H.length;for(P=0;P<$.length;P++)V[P+U]=$[P];return V},A.noop=function(){}},76414:function(E,A){var u=typeof Float32Array>"u"?Array:Float32Array;function o(f){return Math.sqrt(S(f))}function S(f){return f[0]*f[0]+f[1]*f[1]}function _(f,y){return Math.sqrt((f[0]-y[0])*(f[0]-y[0])+(f[1]-y[1])*(f[1]-y[1]))}function p(f,y){return(f[0]-y[0])*(f[0]-y[0])+(f[1]-y[1])*(f[1]-y[1])}A.create=function(f,y){var d=new u(2);return f==null&&(f=0),y==null&&(y=0),d[0]=f,d[1]=y,d},A.copy=function(f,y){return f[0]=y[0],f[1]=y[1],f},A.clone=function(f){var y=new u(2);return y[0]=f[0],y[1]=f[1],y},A.set=function(f,y,d){return f[0]=y,f[1]=d,f},A.add=function(f,y,d){return f[0]=y[0]+d[0],f[1]=y[1]+d[1],f},A.scaleAndAdd=function(f,y,d,v){return f[0]=y[0]+d[0]*v,f[1]=y[1]+d[1]*v,f},A.sub=function(f,y,d){return f[0]=y[0]-d[0],f[1]=y[1]-d[1],f},A.len=o,A.length=o,A.lenSquare=S,A.lengthSquare=S,A.mul=function(f,y,d){return f[0]=y[0]*d[0],f[1]=y[1]*d[1],f},A.div=function(f,y,d){return f[0]=y[0]/d[0],f[1]=y[1]/d[1],f},A.dot=function(f,y){return f[0]*y[0]+f[1]*y[1]},A.scale=function(f,y,d){return f[0]=y[0]*d,f[1]=y[1]*d,f},A.normalize=function(f,y){var d=o(y);return d===0?(f[0]=0,f[1]=0):(f[0]=y[0]/d,f[1]=y[1]/d),f},A.distance=_,A.dist=_,A.distanceSquare=p,A.distSquare=p,A.negate=function(f,y){return f[0]=-y[0],f[1]=-y[1],f},A.lerp=function(f,y,d,v){return f[0]=y[0]+v*(d[0]-y[0]),f[1]=y[1]+v*(d[1]-y[1]),f},A.applyTransform=function(f,y,d){var v=y[0],b=y[1];return f[0]=d[0]*v+d[2]*b+d[4],f[1]=d[1]*v+d[3]*b+d[5],f},A.min=function(f,y,d){return f[0]=Math.min(y[0],d[0]),f[1]=Math.min(y[1],d[1]),f},A.max=function(f,y,d){return f[0]=Math.max(y[0],d[0]),f[1]=Math.max(y[1],d[1]),f}},67313:function(E,A,u){var o=u(46427),S=o.addEventListener,_=o.removeEventListener,p=o.normalizeEvent,f=u(23405),y=u(62271),d=u(23584),v=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],b=["touchstart","touchend","touchmove"],s={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},l=f.map(v,function(T){var D=T.replace("mouse","pointer");return s[D]?D:T});function w(T){return T==="mousewheel"&&d.browser.firefox?"DOMMouseScroll":T}function I(T){T._touching=!0,clearTimeout(T._touchTimer),T._touchTimer=setTimeout(function(){T._touching=!1},700)}var C={mousemove:function(T){T=p(this.dom,T),this.trigger("mousemove",T)},mouseout:function(T){var D=(T=p(this.dom,T)).toElement||T.relatedTarget;if(D!==this.dom)for(;D&&D.nodeType!==9;){if(D===this.dom)return;D=D.parentNode}this.trigger("mouseout",T)},touchstart:function(T){(T=p(this.dom,T)).zrByTouch=!0,this._lastTouchMoment=new Date,this.handler.processGesture(this,T,"start"),C.mousemove.call(this,T),C.mousedown.call(this,T),I(this)},touchmove:function(T){(T=p(this.dom,T)).zrByTouch=!0,this.handler.processGesture(this,T,"change"),C.mousemove.call(this,T),I(this)},touchend:function(T){(T=p(this.dom,T)).zrByTouch=!0,this.handler.processGesture(this,T,"end"),C.mouseup.call(this,T),+new Date-this._lastTouchMoment<300&&C.click.call(this,T),I(this)},pointerdown:function(T){C.mousedown.call(this,T)},pointermove:function(T){h(T)||C.mousemove.call(this,T)},pointerup:function(T){C.mouseup.call(this,T)},pointerout:function(T){h(T)||C.mouseout.call(this,T)}};function h(T){var D=T.pointerType;return D==="pen"||D==="touch"}function c(T){var D;function O(N,z){f.each(N,function(H){S(T,w(H),z._handlers[H])},z)}y.call(this),this.dom=T,this._touching=!1,this._touchTimer,this._handlers={},D=this,f.each(b,function(N){D._handlers[N]=f.bind(C[N],D)}),f.each(l,function(N){D._handlers[N]=f.bind(C[N],D)}),f.each(v,function(N){var z,H;D._handlers[N]=(z=C[N],H=D,function(){if(!H._touching)return z.apply(H,arguments)})}),d.pointerEventsSupported?O(l,this):(d.touchEventsSupported&&O(b,this),O(v,this))}f.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(T){C[T]=function(D){D=p(this.dom,D),this.trigger(T,D)}});var m=c.prototype;m.dispose=function(){for(var T=v.concat(b),D=0;D<T.length;D++){var O=T[D];_(this.dom,w(O),this._handlers[O])}},m.setCursor=function(T){this.dom.style&&(this.dom.style.cursor=T||"default")},f.mixin(c,y),E.exports=c},96113:function(E,A,u){var o=u(74582);E.exports=o.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var S=this.__dirtyPath,_=this.shape.paths,p=0;p<_.length;p++)S=S||_[p].__dirtyPath;this.__dirtyPath=S,this.__dirty=this.__dirty||S},beforeBrush:function(){this._updatePathDirty();for(var S=this.shape.paths||[],_=this.getGlobalScale(),p=0;p<S.length;p++)S[p].path||S[p].createPathProxy(),S[p].path.setScale(_[0],_[1])},buildPath:function(S,_){for(var p=_.paths||[],f=0;f<p.length;f++)p[f].buildPath(S,p[f].shape,!0)},afterBrush:function(){for(var S=this.shape.paths||[],_=0;_<S.length;_++)S[_].__dirtyPath=!1},getBoundingRect:function(){return this._updatePathDirty(),o.prototype.getBoundingRect.call(this)}})},49181:function(E,A,u){var o=u(23405),S=u(7609),_=u(40498),p=u(12094);function f(y){for(var d in y=y||{},_.call(this,y),y)y.hasOwnProperty(d)&&d!=="style"&&(this[d]=y[d]);this.style=new S(y.style,this),this._rect=null,this.__clipPaths=[]}f.prototype={constructor:f,type:"displayable",__dirty:!0,invisible:!1,z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:!1,incremental:!1,globalScaleRatio:1,beforeBrush:function(y){},afterBrush:function(y){},brush:function(y,d){},getBoundingRect:function(){},contain:function(y,d){return this.rectContain(y,d)},traverse:function(y,d){y.call(d,this)},rectContain:function(y,d){var v=this.transformCoordToLocal(y,d);return this.getBoundingRect().contain(v[0],v[1])},dirty:function(){this.__dirty=this.__dirtyText=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(y){return this.animate("style",y)},attrKV:function(y,d){y!=="style"?_.prototype.attrKV.call(this,y,d):this.style.set(d)},setStyle:function(y,d){return this.style.set(y,d),this.dirty(!1),this},useStyle:function(y){return this.style=new S(y,this),this.dirty(!1),this}},o.inherits(f,_),o.mixin(f,p),E.exports=f},97722:function(E){var A=function(u){this.colorStops=u||[]};A.prototype={constructor:A,addColorStop:function(u,o){this.colorStops.push({offset:u,color:o})}},E.exports=A},91222:function(E,A,u){var o=u(49181),S=u(28761),_=u(23405),p=u(35337);function f(y){o.call(this,y)}f.prototype={constructor:f,type:"image",brush:function(y,d){var v=this.style,b=v.image;v.bind(y,this,d);var s=this._image=p.createOrUpdateImage(b,this._image,this,this.onload);if(s&&p.isImageReady(s)){var l=v.x||0,w=v.y||0,I=v.width,C=v.height,h=s.width/s.height;if(I==null&&C!=null?I=C*h:C==null&&I!=null?C=I/h:I==null&&C==null&&(I=s.width,C=s.height),this.setTransform(y),v.sWidth&&v.sHeight){var c=v.sx||0,m=v.sy||0;y.drawImage(s,c,m,v.sWidth,v.sHeight,l,w,I,C)}else if(v.sx&&v.sy){var c=v.sx,m=v.sy,T=I-c,D=C-m;y.drawImage(s,c,m,T,D,l,w,I,C)}else y.drawImage(s,l,w,I,C);v.text!=null&&(this.restoreTransform(y),this.drawRectText(y,this.getBoundingRect()))}},getBoundingRect:function(){var y=this.style;return this._rect||(this._rect=new S(y.x||0,y.y||0,y.width||0,y.height||0)),this._rect}},_.inherits(f,o),E.exports=f},95028:function(E,A,u){var o=u(23405).inherits,S=u(49181),_=u(28761);function p(y){S.call(this,y),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}p.prototype.incremental=!0,p.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},p.prototype.addDisplayable=function(y,d){d?this._temporaryDisplayables.push(y):this._displayables.push(y),this.dirty()},p.prototype.addDisplayables=function(y,d){d=d||!1;for(var v=0;v<y.length;v++)this.addDisplayable(y[v],d)},p.prototype.eachPendingDisplayable=function(y){for(var d=this._cursor;d<this._displayables.length;d++)y&&y(this._displayables[d]);for(var d=0;d<this._temporaryDisplayables.length;d++)y&&y(this._temporaryDisplayables[d])},p.prototype.update=function(){this.updateTransform();for(var y=this._cursor;y<this._displayables.length;y++){var d=this._displayables[y];d.parent=this,d.update(),d.parent=null}for(var y=0;y<this._temporaryDisplayables.length;y++){var d=this._temporaryDisplayables[y];d.parent=this,d.update(),d.parent=null}},p.prototype.brush=function(y,d){for(var v=this._cursor;v<this._displayables.length;v++){var b=this._displayables[v];b.beforeBrush&&b.beforeBrush(y),b.brush(y,v===this._cursor?null:this._displayables[v-1]),b.afterBrush&&b.afterBrush(y)}this._cursor=v;for(var v=0;v<this._temporaryDisplayables.length;v++){var b=this._temporaryDisplayables[v];b.beforeBrush&&b.beforeBrush(y),b.brush(y,v===0?null:this._temporaryDisplayables[v-1]),b.afterBrush&&b.afterBrush(y)}this._temporaryDisplayables=[],this.notClear=!0};var f=[];p.prototype.getBoundingRect=function(){if(!this._rect){for(var y=new _(1/0,1/0,-1/0,-1/0),d=0;d<this._displayables.length;d++){var v=this._displayables[d],b=v.getBoundingRect().clone();v.needLocalTransform()&&b.applyTransform(v.getLocalTransform(f)),y.union(b)}this._rect=y}return this._rect},p.prototype.contain=function(y,d){var v=this.transformCoordToLocal(y,d);if(this.getBoundingRect().contain(v[0],v[1])){for(var b=0;b<this._displayables.length;b++)if(this._displayables[b].contain(y,d))return!0}return!1},o(p,S),E.exports=p},67725:function(E,A,u){var o=u(23405),S=u(97722),_=function(p,f,y,d,v,b){this.x=p??0,this.y=f??0,this.x2=y??1,this.y2=d??0,this.type="linear",this.global=b||!1,S.call(this,v)};_.prototype={constructor:_},o.inherits(_,S),E.exports=_},74582:function(E,A,u){var o=u(49181),S=u(23405),_=u(93041),p=u(47258),f=u(37067).prototype.getCanvasPattern,y=Math.abs,d=new _(!0);function v(b){o.call(this,b),this.path=null}v.prototype={constructor:v,type:"path",__dirtyPath:!0,strokeContainThreshold:5,subPixelOptimize:!1,brush:function(b,s){var l,w=this.style,I=this.path||d,C=w.hasStroke(),h=w.hasFill(),c=w.fill,m=w.stroke,T=h&&!!c.colorStops,D=C&&!!m.colorStops,O=h&&!!c.image,N=C&&!!m.image;w.bind(b,this,s),this.setTransform(b),this.__dirty&&(T&&(l=l||this.getBoundingRect(),this._fillGradient=w.getGradient(b,c,l)),D&&(l=l||this.getBoundingRect(),this._strokeGradient=w.getGradient(b,m,l))),T?b.fillStyle=this._fillGradient:O&&(b.fillStyle=f.call(c,b)),D?b.strokeStyle=this._strokeGradient:N&&(b.strokeStyle=f.call(m,b));var z=w.lineDash,H=w.lineDashOffset,$=!!b.setLineDash,V=this.getGlobalScale();if(I.setScale(V[0],V[1]),this.__dirtyPath||z&&!$&&C?(I.beginPath(b),z&&!$&&(I.setLineDash(z),I.setLineDashOffset(H)),this.buildPath(I,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(b.beginPath(),this.path.rebuildPath(b)),h)if(w.fillOpacity!=null){var P=b.globalAlpha;b.globalAlpha=w.fillOpacity*w.opacity,I.fill(b),b.globalAlpha=P}else I.fill(b);if(z&&$&&(b.setLineDash(z),b.lineDashOffset=H),C)if(w.strokeOpacity!=null){var P=b.globalAlpha;b.globalAlpha=w.strokeOpacity*w.opacity,I.stroke(b),b.globalAlpha=P}else I.stroke(b);z&&$&&b.setLineDash([]),w.text!=null&&(this.restoreTransform(b),this.drawRectText(b,this.getBoundingRect()))},buildPath:function(b,s,l){},createPathProxy:function(){this.path=new _},getBoundingRect:function(){var b=this._rect,s=this.style,l=!b;if(l){var w=this.path;w||(w=this.path=new _),this.__dirtyPath&&(w.beginPath(),this.buildPath(w,this.shape,!1)),b=w.getBoundingRect()}if(this._rect=b,s.hasStroke()){var I=this._rectWithStroke||(this._rectWithStroke=b.clone());if(this.__dirty||l){I.copy(b);var C=s.lineWidth,h=s.strokeNoScale?this.getLineScale():1;s.hasFill()||(C=Math.max(C,this.strokeContainThreshold||4)),h>1e-10&&(I.width+=C/h,I.height+=C/h,I.x-=C/h/2,I.y-=C/h/2)}return I}return b},contain:function(b,s){var l=this.transformCoordToLocal(b,s),w=this.getBoundingRect(),I=this.style;if(b=l[0],s=l[1],w.contain(b,s)){var C=this.path.data;if(I.hasStroke()){var h=I.lineWidth,c=I.strokeNoScale?this.getLineScale():1;if(c>1e-10&&(I.hasFill()||(h=Math.max(h,this.strokeContainThreshold)),p.containStroke(C,h/c,b,s)))return!0}if(I.hasFill())return p.contain(C,b,s)}return!1},dirty:function(b){b==null&&(b=!0),b&&(this.__dirtyPath=b,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(b){return this.animate("shape",b)},attrKV:function(b,s){b==="shape"?(this.setShape(s),this.__dirtyPath=!0,this._rect=null):o.prototype.attrKV.call(this,b,s)},setShape:function(b,s){var l=this.shape;if(l){if(S.isObject(b))for(var w in b)b.hasOwnProperty(w)&&(l[w]=b[w]);else l[b]=s;this.dirty(!0)}return this},getLineScale:function(){var b=this.transform;return b&&y(b[0]-1)>1e-10&&y(b[3]-1)>1e-10?Math.sqrt(y(b[0]*b[3]-b[2]*b[1])):1}},v.extend=function(b){var s=function(w){v.call(this,w),b.style&&this.style.extendFrom(b.style,!1);var I=b.shape;if(I){this.shape=this.shape||{};var C=this.shape;for(var h in I)!C.hasOwnProperty(h)&&I.hasOwnProperty(h)&&(C[h]=I[h])}b.init&&b.init.call(this,w)};for(var l in S.inherits(s,v),b)l!=="style"&&l!=="shape"&&(s.prototype[l]=b[l]);return s},S.inherits(v,o),E.exports=v},37067:function(E){var A=function(u,o){this.image=u,this.repeat=o,this.type="pattern"};A.prototype.getCanvasPattern=function(u){return u.createPattern(this.image,this.repeat||"repeat")},E.exports=A},76636:function(E,A,u){var o=u(23405),S=u(97722),_=function(p,f,y,d,v){this.x=p??.5,this.y=f??.5,this.r=y??.5,this.type="radial",this.global=v||!1,S.call(this,d)};_.prototype={constructor:_},o.inherits(_,S),E.exports=_},7609:function(E,A,u){var o=u(6821),S=u(32115).ContextCachedBy,_=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],p=function(v){this.extendFrom(v,!1)};p.prototype={constructor:p,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(v,b,s){var l=s&&s.style,w=!l||v.__attrCachedBy!==S.STYLE_BIND;v.__attrCachedBy=S.STYLE_BIND;for(var I=0;I<_.length;I++){var C=_[I],h=C[0];(w||this[h]!==l[h])&&(v[h]=o(v,h,this[h]||C[1]))}(w||this.fill!==l.fill)&&(v.fillStyle=this.fill),(w||this.stroke!==l.stroke)&&(v.strokeStyle=this.stroke),(w||this.opacity!==l.opacity)&&(v.globalAlpha=this.opacity==null?1:this.opacity),(w||this.blend!==l.blend)&&(v.globalCompositeOperation=this.blend||"source-over"),this.hasStroke()&&(v.lineWidth=this.lineWidth/(this.strokeNoScale&&b&&b.getLineScale?b.getLineScale():1))},hasFill:function(){var v=this.fill;return v!=null&&v!=="none"},hasStroke:function(){var v=this.stroke;return v!=null&&v!=="none"&&this.lineWidth>0},extendFrom:function(v,b){if(v)for(var s in v)v.hasOwnProperty(s)&&(b===!0||(b===!1?!this.hasOwnProperty(s):v[s]!=null))&&(this[s]=v[s])},set:function(v,b){typeof v=="string"?this[v]=b:this.extendFrom(v,!0)},clone:function(){var v=new this.constructor;return v.extendFrom(this,!0),v},getGradient:function(v,b,s){for(var l=(b.type==="radial"?function(C,h,c){var m=c.width,T=c.height,D=Math.min(m,T),O=h.x==null?.5:h.x,N=h.y==null?.5:h.y,z=h.r==null?.5:h.r;return h.global||(O=O*m+c.x,N=N*T+c.y,z*=D),C.createRadialGradient(O,N,0,O,N,z)}:function(C,h,c){var m=h.x==null?0:h.x,T=h.x2==null?1:h.x2,D=h.y==null?0:h.y,O=h.y2==null?0:h.y2;return h.global||(m=m*c.width+c.x,T=T*c.width+c.x,D=D*c.height+c.y,O=O*c.height+c.y),m=isNaN(m)?0:m,T=isNaN(T)?1:T,D=isNaN(D)?0:D,O=isNaN(O)?0:O,C.createLinearGradient(m,D,T,O)})(v,b,s),w=b.colorStops,I=0;I<w.length;I++)l.addColorStop(w[I].offset,w[I].color);return l}};for(var f=p.prototype,y=0;y<_.length;y++){var d=_[y];d[0]in f||(f[d[0]]=d[1])}p.getGradient=f.getGradient,E.exports=p},96296:function(E,A,u){var o=u(49181),S=u(23405),_=u(24570),p=u(69824),f=u(32115).ContextCachedBy,y=function(d){o.call(this,d)};y.prototype={constructor:y,type:"text",brush:function(d,v){var b=this.style;this.__dirty&&p.normalizeTextStyle(b,!0),b.fill=b.stroke=b.shadowBlur=b.shadowColor=b.shadowOffsetX=b.shadowOffsetY=null;var s=b.text;if(s!=null&&(s+=""),!p.needDrawText(s,b)){d.__attrCachedBy=f.NONE;return}this.setTransform(d),p.renderText(this,d,s,b,null,v),this.restoreTransform(d)},getBoundingRect:function(){var d=this.style;if(this.__dirty&&p.normalizeTextStyle(d,!0),!this._rect){d.text;var v=_.getBoundingRect(d.text+"",d.font,d.textAlign,d.textVerticalAlign,d.textPadding,d.textLineHeight,d.rich);if(v.x+=d.x||0,v.y+=d.y||0,p.getStroke(d.textStroke,d.textStrokeWidth)){var b=d.textStrokeWidth;v.x-=b/2,v.y-=b/2,v.width+=b,v.height+=b}this._rect=v}return this._rect}},S.inherits(y,o),E.exports=y},32115:function(E,A){A.ContextCachedBy={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},A.WILL_BE_RESTORED=9},24280:function(E,A,u){var o=u(23584),S=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]];E.exports=function(_){return o.browser.ie&&o.browser.version>=11?function(){var p,f=this.__clipPaths,y=this.style;if(f)for(var d=0;d<f.length;d++){var v=f[d],b=v&&v.shape,s=v&&v.type;if(b&&(s==="sector"&&b.startAngle===b.endAngle||s==="rect"&&(!b.width||!b.height))){for(var l=0;l<S.length;l++)S[l][2]=y[S[l][0]],y[S[l][0]]=S[l][1];p=!0;break}}if(_.apply(this,arguments),p)for(var l=0;l<S.length;l++)y[S[l][0]]=S[l][2]}:_}},6821:function(E){var A={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1};E.exports=function(u,o,S){return A.hasOwnProperty(o)?S*u.dpr:S}},35337:function(E,A,u){var o=new(u(26853))(50);function S(){var p=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var f=0;f<p.pending.length;f++){var y=p.pending[f],d=y.cb;d&&d(this,y.cbPayload),y.hostEl.dirty()}p.pending.length=0}function _(p){return p&&p.width&&p.height}A.findExistImage=function(p){if(typeof p!="string")return p;var f=o.get(p);return f&&f.image},A.createOrUpdateImage=function(p,f,y,d,v){if(!p)return f;if(typeof p!="string")return p;if(f&&f.__zrImageSrc===p||!y)return f;var b=o.get(p),s={hostEl:y,cb:d,cbPayload:v};return b?_(f=b.image)||b.pending.push(s):((f=new Image).onload=f.onerror=S,o.put(p,f.__cachedImgObj={image:f,pending:[s]}),f.src=f.__zrImageSrc=p),f},A.isImageReady=_},42920:function(E,A,u){var o=u(40978),S=u(1956);A.buildPath=function(_,p,f){var y=p.points,d=p.smooth;if(y&&y.length>=2){if(d&&d!=="spline"){var v=S(y,d,f,p.smoothConstraint);_.moveTo(y[0][0],y[0][1]);for(var b=y.length,s=0;s<(f?b:b-1);s++){var l=v[2*s],w=v[2*s+1],I=y[(s+1)%b];_.bezierCurveTo(l[0],l[1],w[0],w[1],I[0],I[1])}}else{d==="spline"&&(y=o(y,f)),_.moveTo(y[0][0],y[0][1]);for(var s=1,C=y.length;s<C;s++)_.lineTo(y[s][0],y[s][1])}f&&_.closePath()}}},24142:function(E,A){A.buildPath=function(u,o){var S,_,p,f,y,d=o.x,v=o.y,b=o.width,s=o.height,l=o.r;b<0&&(d+=b,b=-b),s<0&&(v+=s,s=-s),typeof l=="number"?S=_=p=f=l:l instanceof Array?l.length===1?S=_=p=f=l[0]:l.length===2?(S=p=l[0],_=f=l[1]):l.length===3?(S=l[0],_=f=l[1],p=l[2]):(S=l[0],_=l[1],p=l[2],f=l[3]):S=_=p=f=0,S+_>b&&(y=S+_,S*=b/y,_*=b/y),p+f>b&&(y=p+f,p*=b/y,f*=b/y),_+p>s&&(y=_+p,_*=s/y,p*=s/y),S+f>s&&(y=S+f,S*=s/y,f*=s/y),u.moveTo(d+S,v),u.lineTo(d+b-_,v),_!==0&&u.arc(d+b-_,v+_,_,-Math.PI/2,0),u.lineTo(d+b,v+s-p),p!==0&&u.arc(d+b-p,v+s-p,p,0,Math.PI/2),u.lineTo(d+f,v+s),f!==0&&u.arc(d+f,v+s-f,f,Math.PI/2,Math.PI),u.lineTo(d,v+S),S!==0&&u.arc(d+S,v+S,S,Math.PI,1.5*Math.PI)}},1956:function(E,A,u){var o=u(76414),S=o.min,_=o.max,p=o.scale,f=o.distance,y=o.add,d=o.clone,v=o.sub;E.exports=function(b,s,l,w){var I,C,h,c,m=[],T=[],D=[],O=[];if(w){h=[1/0,1/0],c=[-1/0,-1/0];for(var N=0,z=b.length;N<z;N++)S(h,h,b[N]),_(c,c,b[N]);S(h,h,w[0]),_(c,c,w[1])}for(var N=0,z=b.length;N<z;N++){var H=b[N];if(l)I=b[N?N-1:z-1],C=b[(N+1)%z];else if(N===0||N===z-1){m.push(d(b[N]));continue}else I=b[N-1],C=b[N+1];v(T,C,I),p(T,T,s);var $=f(H,I),V=f(H,C),P=$+V;P!==0&&($/=P,V/=P),p(D,T,-$),p(O,T,V);var U=y([],H,D),Y=y([],H,O);w&&(_(U,U,h),S(U,U,c),_(Y,Y,h),S(Y,Y,c)),m.push(U),m.push(Y)}return l&&m.push(m.shift()),m}},40978:function(E,A,u){var o=u(76414).distance;function S(_,p,f,y,d,v,b){var s=(f-_)*.5,l=(y-p)*.5;return(2*(p-f)+s+l)*b+(-3*(p-f)-2*s-l)*v+s*d+p}E.exports=function(_,p){for(var f=_.length,y=[],d=0,v=1;v<f;v++)d+=o(_[v-1],_[v]);var b=d/2;b=b<f?f:b;for(var v=0;v<b;v++){var s,l,w,I=v/(b-1)*(p?f:f-1),C=Math.floor(I),h=I-C,c=_[C%f];p?(s=_[(C-1+f)%f],l=_[(C+1)%f],w=_[(C+2)%f]):(s=_[C===0?C:C-1],l=_[C>f-2?f-1:C+1],w=_[C>f-3?f-1:C+2]);var m=h*h,T=h*m;y.push([S(s[0],c[0],l[0],w[0],h,m,T),S(s[1],c[1],l[1],w[1],h,m,T)])}return y}},8827:function(E,A){var u=Math.round;function o(S,_,p){var f=u(2*S);return(f+u(_))%2==0?f/2:(f+(p?1:-1))/2}A.subPixelOptimizeLine=function(S,_,p){var f=p&&p.lineWidth;if(_&&f){var y=_.x1,d=_.x2,v=_.y1,b=_.y2;u(2*y)===u(2*d)?S.x1=S.x2=o(y,f,!0):(S.x1=y,S.x2=d),u(2*v)===u(2*b)?S.y1=S.y2=o(v,f,!0):(S.y1=v,S.y2=b)}},A.subPixelOptimizeRect=function(S,_,p){var f=p&&p.lineWidth;if(_&&f){var y=_.x,d=_.y,v=_.width,b=_.height;S.x=o(y,f,!0),S.y=o(d,f,!0),S.width=Math.max(o(y+v,f,!1)-S.x,+(v!==0)),S.height=Math.max(o(d+b,f,!1)-S.y,+(b!==0))}},A.subPixelOptimize=o},69824:function(E,A,u){var o=u(23405),S=o.retrieve2,_=o.retrieve3,p=o.each,f=o.normalizeCssArray,y=o.isString,d=o.isObject,v=u(24570),b=u(24142),s=u(35337),l=u(6821),w=u(32115),I=w.ContextCachedBy,C=w.WILL_BE_RESTORED,h=v.DEFAULT_FONT,c={left:1,right:1,center:1},m={top:1,bottom:1,middle:1},T=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]];function D(J){if(J){J.font=v.makeFont(J);var q=J.textAlign;q==="middle"&&(q="center"),J.textAlign=q==null||c[q]?q:"left";var te=J.textVerticalAlign||J.textBaseline;te==="center"&&(te="middle"),J.textVerticalAlign=te==null||m[te]?te:"top",J.textPadding&&(J.textPadding=f(J.textPadding))}}function O(J,q,te,re,ie){if(te&&q.textRotation){var ne=q.textOrigin;ne==="center"?(re=te.width/2+te.x,ie=te.height/2+te.y):ne&&(re=ne[0]+te.x,ie=ne[1]+te.y),J.translate(re,ie),J.rotate(-q.textRotation),J.translate(-re,-ie)}}function N(J,q,te,re,ie,ne,le,fe){var we=re.rich[te.styleName]||{};we.text=te.text;var pe=te.textVerticalAlign,ve=ne+ie/2;pe==="top"?ve=ne+te.height/2:pe==="bottom"&&(ve=ne+ie-te.height/2),!te.isLineHolder&&z(we)&&H(J,q,we,fe==="right"?le-te.width:fe==="center"?le-te.width/2:le,ve-te.height/2,te.width,te.height);var be=te.textPadding;be&&(le=X(le,fe,be),ve-=te.height/2-be[2]-te.textHeight/2),P(q,"shadowBlur",_(we.textShadowBlur,re.textShadowBlur,0)),P(q,"shadowColor",we.textShadowColor||re.textShadowColor||"transparent"),P(q,"shadowOffsetX",_(we.textShadowOffsetX,re.textShadowOffsetX,0)),P(q,"shadowOffsetY",_(we.textShadowOffsetY,re.textShadowOffsetY,0)),P(q,"textAlign",fe),P(q,"textBaseline","middle"),P(q,"font",te.font||h);var Ee=U(we.textStroke||re.textStroke,Ne),Re=Y(we.textFill||re.textFill),Ne=S(we.textStrokeWidth,re.textStrokeWidth);Ee&&(P(q,"lineWidth",Ne),P(q,"strokeStyle",Ee),q.strokeText(te.text,le,ve)),Re&&(P(q,"fillStyle",Re),q.fillText(te.text,le,ve))}function z(J){return!!(J.textBackgroundColor||J.textBorderWidth&&J.textBorderColor)}function H(J,q,te,re,ie,ne,le){var fe=te.textBackgroundColor,we=te.textBorderWidth,pe=te.textBorderColor,ve=y(fe);if(P(q,"shadowBlur",te.textBoxShadowBlur||0),P(q,"shadowColor",te.textBoxShadowColor||"transparent"),P(q,"shadowOffsetX",te.textBoxShadowOffsetX||0),P(q,"shadowOffsetY",te.textBoxShadowOffsetY||0),ve||we&&pe){q.beginPath();var be=te.textBorderRadius;be?b.buildPath(q,{x:re,y:ie,width:ne,height:le,r:be}):q.rect(re,ie,ne,le),q.closePath()}if(ve)if(P(q,"fillStyle",fe),te.fillOpacity!=null){var Ee=q.globalAlpha;q.globalAlpha=te.fillOpacity*te.opacity,q.fill(),q.globalAlpha=Ee}else q.fill();else if(d(fe)){var Re=fe.image;(Re=s.createOrUpdateImage(Re,null,J,$,fe))&&s.isImageReady(Re)&&q.drawImage(Re,re,ie,ne,le)}if(we&&pe)if(P(q,"lineWidth",we),P(q,"strokeStyle",pe),te.strokeOpacity!=null){var Ee=q.globalAlpha;q.globalAlpha=te.strokeOpacity*te.opacity,q.stroke(),q.globalAlpha=Ee}else q.stroke()}function $(J,q){q.image=J}function V(J,q,te){var re=q.x||0,ie=q.y||0,ne=q.textAlign,le=q.textVerticalAlign;if(te){var fe=q.textPosition;if(fe instanceof Array)re=te.x+Z(fe[0],te.width),ie=te.y+Z(fe[1],te.height);else{var we=v.adjustTextPositionOnRect(fe,te,q.textDistance);re=we.x,ie=we.y,ne=ne||we.textAlign,le=le||we.textVerticalAlign}var pe=q.textOffset;pe&&(re+=pe[0],ie+=pe[1])}return{baseX:re,baseY:ie,textAlign:ne,textVerticalAlign:le}}function P(J,q,te){return J[q]=l(J,q,te),J[q]}function U(J,q){return J==null||q<=0||J==="transparent"||J==="none"?null:J.image||J.colorStops?"#000":J}function Y(J){return J==null||J==="none"?null:J.image||J.colorStops?"#000":J}function Z(J,q){return typeof J=="string"?J.lastIndexOf("%")>=0?parseFloat(J)/100*q:parseFloat(J):J}function X(J,q,te){return q==="right"?J-te[1]:q==="center"?J+te[3]/2-te[1]/2:J+te[3]}A.normalizeTextStyle=function(J){return D(J),p(J.rich,D),J},A.renderText=function(J,q,te,re,ie,ne){var le,fe,we,pe,ve,be;re.rich?(le=J,fe=q,we=te,pe=re,ve=ie,ne!==C&&(fe.__attrCachedBy=I.NONE),(be=le.__textCotentBlock)&&!le.__dirtyText||(be=le.__textCotentBlock=v.parseRichText(we,pe)),function(Ee,Re,Ne,Le,Se){var Ie=Ne.width,_e=Ne.outerWidth,Ae=Ne.outerHeight,ue=Le.textPadding,ke=V(Ae,Le,Se),Pe=ke.baseX,Ve=ke.baseY,je=ke.textAlign,it=ke.textVerticalAlign;O(Re,Le,Se,Pe,Ve);var rt=v.adjustTextX(Pe,_e,je),mt=v.adjustTextY(Ve,Ae,it),yt=rt,st=mt;ue&&(yt+=ue[3],st+=ue[0]);var Qe=yt+Ie;z(Le)&&H(Ee,Re,Le,rt,mt,_e,Ae);for(var At=0;At<Ne.lines.length;At++){for(var Xt,cn=Ne.lines[At],Sn=cn.tokens,Vn=Sn.length,bn=cn.lineHeight,En=cn.width,pn=0,Un=yt,Pn=Qe,On=Vn-1;pn<Vn&&(!(Xt=Sn[pn]).textAlign||Xt.textAlign==="left");)N(Ee,Re,Xt,Le,bn,st,Un,"left"),En-=Xt.width,Un+=Xt.width,pn++;for(;On>=0&&(Xt=Sn[On]).textAlign==="right";)N(Ee,Re,Xt,Le,bn,st,Pn,"right"),En-=Xt.width,Pn-=Xt.width,On--;for(Un+=(Ie-(Un-yt)-(Qe-Pn)-En)/2;pn<=On;)N(Ee,Re,Xt=Sn[pn],Le,bn,st,Un+Xt.width/2,"center"),Un+=Xt.width,pn++;st+=bn}}(le,fe,be,pe,ve)):function(Ee,Re,Ne,Le,Se,Ie){var _e,Ae=z(Le),ue=!1,ke=Re.__attrCachedBy===I.PLAIN_TEXT;Ie!==C?(Ie&&(_e=Ie.style,ue=!Ae&&ke&&_e),Re.__attrCachedBy=Ae?I.NONE:I.PLAIN_TEXT):ke&&(Re.__attrCachedBy=I.NONE);var Pe=Le.font||h;ue&&Pe===(_e.font||h)||(Re.font=Pe);var Ve=Ee.__computedFont;Ee.__styleFont!==Pe&&(Ee.__styleFont=Pe,Ve=Ee.__computedFont=Re.font);var je=Le.textPadding,it=Le.textLineHeight,rt=Ee.__textCotentBlock;(!rt||Ee.__dirtyText)&&(rt=Ee.__textCotentBlock=v.parsePlainText(Ne,Ve,je,it,Le.truncate));var mt=rt.outerHeight,yt=rt.lines,st=rt.lineHeight,Qe=V(mt,Le,Se),At=Qe.baseX,Xt=Qe.baseY,cn=Qe.textAlign||"left",Sn=Qe.textVerticalAlign;O(Re,Le,Se,At,Xt);var Vn=v.adjustTextY(Xt,mt,Sn),bn=At,En=Vn;if(Ae||je){var pn=v.getWidth(Ne,Ve);je&&(pn+=je[1]+je[3]);var Un=v.adjustTextX(At,pn,cn);Ae&&H(Ee,Re,Le,Un,Vn,pn,mt),je&&(bn=X(At,cn,je),En+=je[0])}Re.textAlign=cn,Re.textBaseline="middle",Re.globalAlpha=Le.opacity||1;for(var Pn=0;Pn<T.length;Pn++){var On=T[Pn],Ht=On[0],Mt=On[1],Gt=Le[Ht];ue&&Gt===_e[Ht]||(Re[Mt]=l(Re,Mt,Gt||On[2]))}En+=st/2;var Bt=Le.textStrokeWidth,Ge=ue?_e.textStrokeWidth:null,et=!ue||Bt!==Ge,vt=!ue||et||Le.textStroke!==_e.textStroke,wt=U(Le.textStroke,Bt),Ct=Y(Le.textFill);if(wt&&(et&&(Re.lineWidth=Bt),vt&&(Re.strokeStyle=wt)),Ct&&(!ue||Le.textFill!==_e.textFill)&&(Re.fillStyle=Ct),yt.length===1)wt&&Re.strokeText(yt[0],bn,En),Ct&&Re.fillText(yt[0],bn,En);else for(var Pn=0;Pn<yt.length;Pn++)wt&&Re.strokeText(yt[Pn],bn,En),Ct&&Re.fillText(yt[Pn],bn,En),En+=st}(J,q,te,re,ie,ne)},A.getStroke=U,A.getFill=Y,A.needDrawText=function(J,q){return J!=null&&(J||q.textBackgroundColor||q.textBorderWidth&&q.textBorderColor||q.textPadding)}},12094:function(E,A,u){var o=u(69824),S=u(28761),_=u(32115).WILL_BE_RESTORED,p=new S,f=function(){};f.prototype={constructor:f,drawRectText:function(y,d){var v=this.style;d=v.textRect||d,this.__dirty&&o.normalizeTextStyle(v,!0);var b=v.text;if(b!=null&&(b+=""),o.needDrawText(b,v)){y.save();var s=this.transform;v.transformText?this.setTransform(y):s&&(p.copy(d),p.applyTransform(s),d=p),o.renderText(this,y,b,v,d,_),y.restore()}}},E.exports=f},62734:function(E,A,u){E.exports=u(74582).extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(o,S){var _=S.cx,p=S.cy,f=Math.max(S.r,0),y=S.startAngle,d=S.endAngle,v=S.clockwise,b=Math.cos(y),s=Math.sin(y);o.moveTo(b*f+_,s*f+p),o.arc(_,p,f,y,d,!v)}})},38734:function(E,A,u){var o=u(74582),S=u(76414),_=u(14141),p=_.quadraticSubdivide,f=_.cubicSubdivide,y=_.quadraticAt,d=_.cubicAt,v=_.quadraticDerivativeAt,b=_.cubicDerivativeAt,s=[];function l(w,I,C){var h=w.cpx2,c=w.cpy2;return h===null||c===null?[(C?b:d)(w.x1,w.cpx1,w.cpx2,w.x2,I),(C?b:d)(w.y1,w.cpy1,w.cpy2,w.y2,I)]:[(C?v:y)(w.x1,w.cpx1,w.x2,I),(C?v:y)(w.y1,w.cpy1,w.y2,I)]}E.exports=o.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(w,I){var C=I.x1,h=I.y1,c=I.x2,m=I.y2,T=I.cpx1,D=I.cpy1,O=I.cpx2,N=I.cpy2,z=I.percent;z!==0&&(w.moveTo(C,h),O==null||N==null?(z<1&&(p(C,T,c,z,s),T=s[1],c=s[2],p(h,D,m,z,s),D=s[1],m=s[2]),w.quadraticCurveTo(T,D,c,m)):(z<1&&(f(C,T,O,c,z,s),T=s[1],O=s[2],c=s[3],f(h,D,N,m,z,s),D=s[1],N=s[2],m=s[3]),w.bezierCurveTo(T,D,O,N,c,m)))},pointAt:function(w){return l(this.shape,w,!1)},tangentAt:function(w){var I=l(this.shape,w,!0);return S.normalize(I,I)}})},15062:function(E,A,u){E.exports=u(74582).extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(o,S,_){_&&o.moveTo(S.cx+S.r,S.cy),o.arc(S.cx,S.cy,S.r,0,2*Math.PI,!0)}})},59348:function(E,A,u){E.exports=u(74582).extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(o,S){var _=S.cx,p=S.cy,f=S.rx,y=S.ry,d=.5522848*f,v=.5522848*y;o.moveTo(_-f,p),o.bezierCurveTo(_-f,p-v,_-d,p-y,_,p-y),o.bezierCurveTo(_+d,p-y,_+f,p-v,_+f,p),o.bezierCurveTo(_+f,p+v,_+d,p+y,_,p+y),o.bezierCurveTo(_-d,p+y,_-f,p+v,_-f,p),o.closePath()}})},1147:function(E,A,u){var o=u(74582),S=u(8827).subPixelOptimizeLine,_={};E.exports=o.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(p,f){this.subPixelOptimize?(S(_,f,this.style),y=_.x1,d=_.y1,v=_.x2,b=_.y2):(y=f.x1,d=f.y1,v=f.x2,b=f.y2);var y,d,v,b,s=f.percent;s!==0&&(p.moveTo(y,d),s<1&&(v=y*(1-s)+v*s,b=d*(1-s)+b*s),p.lineTo(v,b))},pointAt:function(p){var f=this.shape;return[f.x1*(1-p)+f.x2*p,f.y1*(1-p)+f.y2*p]}})},88217:function(E,A,u){var o=u(74582),S=u(42920);E.exports=o.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(_,p){S.buildPath(_,p,!0)}})},84214:function(E,A,u){var o=u(74582),S=u(42920);E.exports=o.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(_,p){S.buildPath(_,p,!1)}})},86367:function(E,A,u){var o=u(74582),S=u(24142),_=u(8827).subPixelOptimizeRect,p={};E.exports=o.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(f,y){var d,v,b,s;this.subPixelOptimize?(_(p,y,this.style),d=p.x,v=p.y,b=p.width,s=p.height,p.r=y.r,y=p):(d=y.x,v=y.y,b=y.width,s=y.height),y.r?S.buildPath(f,y):f.rect(d,v,b,s),f.closePath()}})},38839:function(E,A,u){E.exports=u(74582).extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(o,S){var _=S.cx,p=S.cy,f=2*Math.PI;o.moveTo(_+S.r,p),o.arc(_,p,S.r,0,f,!1),o.moveTo(_+S.r0,p),o.arc(_,p,S.r0,0,f,!0)}})},84521:function(E,A,u){var o=u(74582),S=u(24280);E.exports=o.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},brush:S(o.prototype.brush),buildPath:function(_,p){var f=p.cx,y=p.cy,d=Math.max(p.r0||0,0),v=Math.max(p.r,0),b=p.startAngle,s=p.endAngle,l=p.clockwise,w=Math.cos(b),I=Math.sin(b);_.moveTo(w*d+f,I*d+y),_.lineTo(w*v+f,I*v+y),_.arc(f,y,v,b,s,!l),_.lineTo(Math.cos(s)*d+f,Math.sin(s)*d+y),d!==0&&_.arc(f,y,d,s,b,l),_.closePath()}})},89177:function(E,A,u){var o=u(24679),S=u(45003),_=u(23405),p=_.isString,f=_.isFunction,y=_.isObject,d=_.isArrayLike,v=_.indexOf,b=function(){this.animators=[]};function s(w,I,C,h,c,m,T,D){p(h)?(m=c,c=h,h=0):f(c)?(m=c,c="linear",h=0):f(h)?(m=h,h=0):f(C)?(m=C,C=500):C||(C=500),w.stopAnimation(),function $(V,P,U,Y,Z,X,J){var q={},te=0;for(var re in Y)Y.hasOwnProperty(re)&&(U[re]!=null?y(Y[re])&&!d(Y[re])?$(V,P?P+"."+re:re,U[re],Y[re],Z,X,J):(J?(q[re]=U[re],l(V,P,re,Y[re])):q[re]=Y[re],te++):Y[re]==null||J||l(V,P,re,Y[re]));te>0&&V.animate(P,!1).when(Z??500,q).delay(X||0)}(w,"",w,I,C,h,D);var O=w.animators.slice(),N=O.length;function z(){--N||!m||m()}!N&&m&&m();for(var H=0;H<O.length;H++)O[H].done(z).start(c,T)}function l(w,I,C,h){if(I){var c={};c[I]={},c[I][C]=h,w.attr(c)}else w.attr(C,h)}b.prototype={constructor:b,animate:function(w,I){var C,h=!1,c=this,m=this.__zr;if(w){var T=w.split("."),D=c;h=T[0]==="shape";for(var O=0,N=T.length;O<N;O++)D&&(D=D[T[O]]);D&&(C=D)}else C=c;if(!C)return void S('Property "'+w+'" is not existed in element '+c.id);var z=c.animators,H=new o(C,I);return H.during(function($){c.dirty(h)}).done(function(){z.splice(v(z,H),1)}),z.push(H),m&&m.animation.addAnimator(H),H},stopAnimation:function(w){for(var I=this.animators,C=I.length,h=0;h<C;h++)I[h].stop(w);return I.length=0,this},animateTo:function(w,I,C,h,c,m){s(this,w,I,C,h,c,m)},animateFrom:function(w,I,C,h,c,m){s(this,w,I,C,h,c,m,!0)}},E.exports=b},1046:function(E){function A(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this),this.on("globalout",this._dragEnd,this)}function u(o,S){return{target:o,topTarget:S&&S.topTarget}}A.prototype={constructor:A,_dragStart:function(o){var S=o.target;S&&S.draggable&&(this._draggingTarget=S,S.dragging=!0,this._x=o.offsetX,this._y=o.offsetY,this.dispatchToElement(u(S,o),"dragstart",o.event))},_drag:function(o){var S=this._draggingTarget;if(S){var _=o.offsetX,p=o.offsetY,f=_-this._x,y=p-this._y;this._x=_,this._y=p,S.drift(f,y,o),this.dispatchToElement(u(S,o),"drag",o.event);var d=this.findHover(_,p,S).target,v=this._dropTarget;this._dropTarget=d,S!==d&&(v&&d!==v&&this.dispatchToElement(u(v,o),"dragleave",o.event),d&&d!==v&&this.dispatchToElement(u(d,o),"dragenter",o.event))}},_dragEnd:function(o){var S=this._draggingTarget;S&&(S.dragging=!1),this.dispatchToElement(u(S,o),"dragend",o.event),this._dropTarget&&this.dispatchToElement(u(this._dropTarget,o),"drop",o.event),this._draggingTarget=null,this._dropTarget=null}},E.exports=A},62271:function(E){var A=Array.prototype.slice,u=function(S){this._$handlers={},this._$eventProcessor=S};function o(S,_,p,f,y,d){var v,b,s=S._$handlers;if(typeof p=="function"&&(y=f,f=p,p=null),!f||!_)return S;v=p,b=S._$eventProcessor,v!=null&&b&&b.normalizeQuery&&(v=b.normalizeQuery(v)),p=v,s[_]||(s[_]=[]);for(var l=0;l<s[_].length;l++)if(s[_][l].h===f)return S;var w={h:f,one:d,query:p,ctx:y||S,callAtLast:f.zrEventfulCallAtLast},I=s[_].length-1,C=s[_][I];return C&&C.callAtLast?s[_].splice(I,0,w):s[_].push(w),S}u.prototype={constructor:u,one:function(S,_,p,f){return o(this,S,_,p,f,!0)},on:function(S,_,p,f){return o(this,S,_,p,f,!1)},isSilent:function(S){var _=this._$handlers;return!_[S]||!_[S].length},off:function(S,_){var p=this._$handlers;if(!S)return this._$handlers={},this;if(_){if(p[S]){for(var f=[],y=0,d=p[S].length;y<d;y++)p[S][y].h!==_&&f.push(p[S][y]);p[S]=f}p[S]&&p[S].length===0&&delete p[S]}else delete p[S];return this},trigger:function(S){var _=this._$handlers[S],p=this._$eventProcessor;if(_){var f=arguments,y=f.length;y>3&&(f=A.call(f,1));for(var d=_.length,v=0;v<d;){var b=_[v];if(p&&p.filter&&b.query!=null&&!p.filter(S,b.query)){v++;continue}switch(y){case 1:b.h.call(b.ctx);break;case 2:b.h.call(b.ctx,f[1]);break;case 3:b.h.call(b.ctx,f[1],f[2]);break;default:b.h.apply(b.ctx,f)}b.one?(_.splice(v,1),d--):v++}}return p&&p.afterTrigger&&p.afterTrigger(S),this},triggerWithContext:function(S){var _=this._$handlers[S],p=this._$eventProcessor;if(_){var f=arguments,y=f.length;y>4&&(f=A.call(f,1,f.length-1));for(var d=f[f.length-1],v=_.length,b=0;b<v;){var s=_[b];if(p&&p.filter&&s.query!=null&&!p.filter(S,s.query)){b++;continue}switch(y){case 1:s.h.call(d);break;case 2:s.h.call(d,f[1]);break;case 3:s.h.call(d,f[1],f[2]);break;default:s.h.apply(d,f)}s.one?(_.splice(b,1),v--):b++}}return p&&p.afterTrigger&&p.afterTrigger(S),this}},E.exports=u},1965:function(E,A,u){var o=u(79442),S=u(76414),_=o.identity;function p(s){return s>5e-5||s<-5e-5}var f=function(s){(s=s||{}).position||(this.position=[0,0]),s.rotation==null&&(this.rotation=0),s.scale||(this.scale=[1,1]),this.origin=this.origin||null},y=f.prototype;y.transform=null,y.needLocalTransform=function(){return p(this.rotation)||p(this.position[0])||p(this.position[1])||p(this.scale[0]-1)||p(this.scale[1]-1)};var d=[];y.updateTransform=function(){var s=this.parent,l=s&&s.transform,w=this.needLocalTransform(),I=this.transform;if(!(w||l)){I&&_(I);return}I=I||o.create(),w?this.getLocalTransform(I):_(I),l&&(w?o.mul(I,s.transform,I):o.copy(I,s.transform)),this.transform=I;var C=this.globalScaleRatio;if(C!=null&&C!==1){this.getGlobalScale(d);var h=d[0]<0?-1:1,c=d[1]<0?-1:1,m=((d[0]-h)*C+h)/d[0]||0,T=((d[1]-c)*C+c)/d[1]||0;I[0]*=m,I[1]*=m,I[2]*=T,I[3]*=T}this.invTransform=this.invTransform||o.create(),o.invert(this.invTransform,I)},y.getLocalTransform=function(s){return f.getLocalTransform(this,s)},y.setTransform=function(s){var l=this.transform,w=s.dpr||1;l?s.setTransform(w*l[0],w*l[1],w*l[2],w*l[3],w*l[4],w*l[5]):s.setTransform(w,0,0,w,0,0)},y.restoreTransform=function(s){var l=s.dpr||1;s.setTransform(l,0,0,l,0,0)};var v=[],b=o.create();y.setLocalTransform=function(s){if(s){var l=s[0]*s[0]+s[1]*s[1],w=s[2]*s[2]+s[3]*s[3],I=this.position,C=this.scale;p(l-1)&&(l=Math.sqrt(l)),p(w-1)&&(w=Math.sqrt(w)),s[0]<0&&(l=-l),s[3]<0&&(w=-w),I[0]=s[4],I[1]=s[5],C[0]=l,C[1]=w,this.rotation=Math.atan2(-s[1]/w,s[0]/l)}},y.decomposeTransform=function(){if(this.transform){var s=this.parent,l=this.transform;s&&s.transform&&(o.mul(v,s.invTransform,l),l=v);var w=this.origin;w&&(w[0]||w[1])&&(b[4]=w[0],b[5]=w[1],o.mul(v,l,b),v[4]-=w[0],v[5]-=w[1],l=v),this.setLocalTransform(l)}},y.getGlobalScale=function(s){var l=this.transform;return s=s||[],l?(s[0]=Math.sqrt(l[0]*l[0]+l[1]*l[1]),s[1]=Math.sqrt(l[2]*l[2]+l[3]*l[3]),l[0]<0&&(s[0]=-s[0]),l[3]<0&&(s[1]=-s[1])):(s[0]=1,s[1]=1),s},y.transformCoordToLocal=function(s,l){var w=[s,l],I=this.invTransform;return I&&S.applyTransform(w,w,I),w},y.transformCoordToGlobal=function(s,l){var w=[s,l],I=this.transform;return I&&S.applyTransform(w,w,I),w},f.getLocalTransform=function(s,l){_(l=l||[]);var w=s.origin,I=s.scale||[1,1],C=s.rotation||0,h=s.position||[0,0];return w&&(l[4]-=w[0],l[5]-=w[1]),o.scale(l,l,I),C&&o.rotate(l,l,C),w&&(l[4]+=w[0],l[5]+=w[1]),l[4]+=h[0],l[5]+=h[1],l},E.exports=f},70318:function(E,A,u){var o=u(98242).createElement,S=u(23405),_=u(45003),p=u(74582),f=u(91222),y=u(96296),d=u(7189),v=u(71961),b=u(68941),s=u(45711),l=u(19890),w=l.path,I=l.image,C=l.text;function h(H){return parseInt(H,10)}function c(H,$){return $&&H&&$.parentNode!==H}function m(H,$,V){if(c(H,$)&&V){var P=V.nextSibling;P?H.insertBefore($,P):H.appendChild($)}}function T(H,$){if(c(H,$)){var V=H.firstChild;V?H.insertBefore($,V):H.appendChild($)}}function D(H,$){$&&H&&$.parentNode===H&&H.removeChild($)}function O(H){return H.__textSvgEl}function N(H){return H.__svgEl}var z=function(H,$,V,P){this.root=H,this.storage=$,this._opts=V=S.extend({},V||{});var U=o("svg");U.setAttribute("xmlns","http://www.w3.org/2000/svg"),U.setAttribute("version","1.1"),U.setAttribute("baseProfile","full"),U.style.cssText="user-select:none;position:absolute;left:0;top:0;",this.gradientManager=new v(P,U),this.clipPathManager=new b(P,U),this.shadowManager=new s(P,U);var Y=document.createElement("div");Y.style.cssText="overflow:hidden;position:relative",this._svgRoot=U,this._viewport=Y,H.appendChild(Y),Y.appendChild(U),this.resize(V.width,V.height),this._visibleList=[]};z.prototype={constructor:z,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getViewportRootOffset:function(){var H=this.getViewportRoot();if(H)return{offsetLeft:H.offsetLeft||0,offsetTop:H.offsetTop||0}},refresh:function(){var H=this.storage.getDisplayList(!0);this._paintList(H)},setBackgroundColor:function(H){this._viewport.style.background=H},_paintList:function(H){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();var $,V,P=this._svgRoot,U=this._visibleList,Y=H.length,Z=[];for($=0;$<Y;$++){var X,J=H[$],q=(X=J)instanceof p?w:X instanceof f?I:X instanceof y?C:w,te=N(J)||O(J);J.invisible||(J.__dirty&&(q&&q.brush(J),this.clipPathManager.update(J),J.style&&(this.gradientManager.update(J.style.fill),this.gradientManager.update(J.style.stroke),this.shadowManager.update(te,J)),J.__dirty=!1),Z.push(J))}var re=d(U,Z);for($=0;$<re.length;$++){var ie=re[$];if(ie.removed)for(var ne=0;ne<ie.count;ne++){var J=U[ie.indices[ne]],te=N(J),le=O(J);D(P,te),D(P,le)}}for($=0;$<re.length;$++){var ie=re[$];if(ie.added)for(var ne=0;ne<ie.count;ne++){var J=Z[ie.indices[ne]],te=N(J),le=O(J);V?m(P,te,V):T(P,te),te?m(P,le,te):V?m(P,le,V):T(P,le),m(P,le,te),V=le||te||V,this.gradientManager.addWithoutUpdate(te,J),this.shadowManager.addWithoutUpdate(V,J),this.clipPathManager.markUsed(J)}else if(!ie.removed)for(var ne=0;ne<ie.count;ne++){var J=Z[ie.indices[ne]];V=te=O(J)||N(J)||V,this.gradientManager.markUsed(J),this.gradientManager.addWithoutUpdate(te,J),this.shadowManager.markUsed(J),this.shadowManager.addWithoutUpdate(te,J),this.clipPathManager.markUsed(J)}}this.gradientManager.removeUnused(),this.clipPathManager.removeUnused(),this.shadowManager.removeUnused(),this._visibleList=Z},_getDefs:function(H){var $=this._svgRoot,V=this._svgRoot.getElementsByTagName("defs");if(V.length!==0)return V[0];if(!H)return null;var V=$.insertBefore(o("defs"),$.firstChild);return V.contains||(V.contains=function(P){var U=V.children;if(!U)return!1;for(var Y=U.length-1;Y>=0;--Y)if(U[Y]===P)return!0;return!1}),V},resize:function(H,$){var V=this._viewport;V.style.display="none";var P=this._opts;if(H!=null&&(P.width=H),$!=null&&(P.height=$),H=this._getSize(0),$=this._getSize(1),V.style.display="",this._width!==H||this._height!==$){this._width=H,this._height=$;var U=V.style;U.width=H+"px",U.height=$+"px";var Y=this._svgRoot;Y.setAttribute("width",H),Y.setAttribute("height",$)}},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(H){var $=this._opts,V=["width","height"][H],P=["clientWidth","clientHeight"][H],U=["paddingLeft","paddingTop"][H],Y=["paddingRight","paddingBottom"][H];if($[V]!=null&&$[V]!=="auto")return parseFloat($[V]);var Z=this.root,X=document.defaultView.getComputedStyle(Z);return(Z[P]||h(X[V])||h(Z.style[V]))-(h(X[U])||0)-(h(X[Y])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},pathToDataUrl:function(){return this.refresh(),"data:image/svg+xml;charset=UTF-8,"+this._svgRoot.outerHTML}},S.each(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(H){z.prototype[H]=function(){_('In SVG mode painter not support method "'+H+'"')}}),E.exports=z},98242:function(E,A){A.createElement=function(u){return document.createElementNS("http://www.w3.org/2000/svg",u)}},19890:function(E,A,u){var o=u(98242).createElement,S=u(93041),_=u(28761),p=u(79442),f=u(24570),y=u(69824),d=u(96296),v=S.CMD,b=Array.prototype.join,s="none",l=Math.round,w=Math.sin,I=Math.cos,C=Math.PI,h=2*Math.PI,c=180/C;function m(Y){return l(1e4*Y)/1e4}function T(Y){return Y<1e-4&&Y>-1e-4}function D(Y,Z){Z&&O(Y,"transform","matrix("+b.call(Z,",")+")")}function O(Y,Z,X){X&&(X.type==="linear"||X.type==="radial")||Y.setAttribute(Z,X)}function N(Y,Z,X,J){if((q=X?Z.textFill:Z.fill)!=null&&q!==s){var q,te,re=X?Z.textFill:Z.fill;re=re==="transparent"?s:re,Y.getAttribute("clip-path")!=="none"&&re===s&&(re="rgba(0, 0, 0, 0.002)"),O(Y,"fill",re),O(Y,"fill-opacity",Z.fillOpacity!=null?Z.fillOpacity*Z.opacity:Z.opacity)}else O(Y,"fill",s);if((te=X?Z.textStroke:Z.stroke)!=null&&te!==s){var ie=X?Z.textStroke:Z.stroke;O(Y,"stroke",ie=ie==="transparent"?s:ie),O(Y,"stroke-width",(X?Z.textStrokeWidth:Z.lineWidth)/(!X&&Z.strokeNoScale?J.getLineScale():1)),O(Y,"paint-order",X?"stroke":"fill"),O(Y,"stroke-opacity",Z.strokeOpacity!=null?Z.strokeOpacity:Z.opacity),Z.lineDash?(O(Y,"stroke-dasharray",Z.lineDash.join(",")),O(Y,"stroke-dashoffset",l(Z.lineDashOffset||0))):O(Y,"stroke-dasharray",""),Z.lineCap&&O(Y,"stroke-linecap",Z.lineCap),Z.lineJoin&&O(Y,"stroke-linejoin",Z.lineJoin),Z.miterLimit&&O(Y,"stroke-miterlimit",Z.miterLimit)}else O(Y,"stroke",s)}var z={};z.brush=function(Y){var Z=Y.style,X=Y.__svgEl;X||(Y.__svgEl=X=o("path")),Y.path||Y.createPathProxy();var J=Y.path;if(Y.__dirtyPath){J.beginPath(),J.subPixelOptimize=!1,Y.buildPath(J,Y.shape),Y.__dirtyPath=!1;var q=function(te){for(var re=[],ie=te.data,ne=te.len(),le=0;le<ne;){var fe=ie[le++],we="",pe=0;switch(fe){case v.M:we="M",pe=2;break;case v.L:we="L",pe=2;break;case v.Q:we="Q",pe=4;break;case v.C:we="C",pe=6;break;case v.A:var ve=ie[le++],be=ie[le++],Ee=ie[le++],Re=ie[le++],Ne=ie[le++],Le=ie[le++],Se=ie[le++],Ie=ie[le++],_e=Math.abs(Le),Ae=T(_e-h)&&!T(_e),ue=!1;ue=_e>=h||!T(_e)&&(Le>-C&&Le<0||Le>C)==!!Ie;var ke=m(ve+Ee*I(Ne)),Pe=m(be+Re*w(Ne));Ae&&(Le=Ie?h-1e-4:-h+1e-4,ue=!0,le===9&&re.push("M",ke,Pe));var Ve=m(ve+Ee*I(Ne+Le)),je=m(be+Re*w(Ne+Le));re.push("A",m(Ee),m(Re),l(Se*c),+ue,+Ie,Ve,je);break;case v.Z:we="Z";break;case v.R:var Ve=m(ie[le++]),je=m(ie[le++]),it=m(ie[le++]),rt=m(ie[le++]);re.push("M",Ve,je,"L",Ve+it,je,"L",Ve+it,je+rt,"L",Ve,je+rt,"L",Ve,je)}we&&re.push(we);for(var mt=0;mt<pe;mt++)re.push(m(ie[le++]))}return re.join(" ")}(J);0>q.indexOf("NaN")&&O(X,"d",q)}N(X,Z,!1,Y),D(X,Y.transform),Z.text!=null&&P(Y,Y.getBoundingRect())};var H={};H.brush=function(Y){var Z=Y.style,X=Z.image;if(X instanceof HTMLImageElement&&(X=X.src),X){var J,q,te=Z.x||0,re=Z.y||0,ie=Z.width,ne=Z.height,le=Y.__svgEl;le||(Y.__svgEl=le=o("image")),X!==Y.__imageSrc&&(J=le,q=X,J.setAttributeNS("http://www.w3.org/1999/xlink","href",q),Y.__imageSrc=X),O(le,"width",ie),O(le,"height",ne),O(le,"x",te),O(le,"y",re),D(le,Y.transform),Z.text!=null&&P(Y,Y.getBoundingRect())}};var $={},V=new _,P=function(Y,Z,X){var J,q,te=Y.style;Y.__dirty&&y.normalizeTextStyle(te,!0);var re=te.text;if(re!=null){re+="";var ie=Y.__textSvgEl;ie||(Y.__textSvgEl=ie=o("text"));var ne=te.textPosition,le=te.textDistance,fe=te.textAlign||"left";typeof te.fontSize=="number"&&(te.fontSize+="px");var we=te.font||[te.fontStyle||"",te.fontWeight||"",te.fontSize||"",te.fontFamily||""].join(" ")||f.DEFAULT_FONT,pe=U(te.textVerticalAlign),ve=(X=f.getBoundingRect(re,we,fe,pe,te.textPadding,te.textLineHeight)).lineHeight;if(ne instanceof Array)J=Z.x+ne[0],q=Z.y+ne[1];else{var be=f.adjustTextPositionOnRect(ne,Z,le);J=be.x,q=be.y,pe=U(be.textVerticalAlign),fe=be.textAlign}O(ie,"alignment-baseline",pe),we&&(ie.style.font=we);var Ee=te.textPadding;if(O(ie,"x",J),O(ie,"y",q),N(ie,te,!0,Y),Y instanceof d||Y.style.transformText)D(ie,Y.transform);else{if(Y.transform)V.copy(Z),V.applyTransform(Y.transform),Z=V;else{var Se=Y.transformCoordToGlobal(Z.x,Z.y);Z.x=Se[0],Z.y=Se[1],Y.transform=p.identity(p.create())}var Re=te.textOrigin;Re==="center"?(J=X.width/2+J,q=X.height/2+q):Re&&(J=Re[0]+J,q=Re[1]+q);var Ne=-te.textRotation||0,Le=p.create();p.rotate(Le,Le,Ne);var Se=[Y.transform[4],Y.transform[5]];p.translate(Le,Le,Se),D(ie,Le)}var Ie=re.split(`
`),_e=Ie.length,Ae=fe;Ae==="left"?(Ae="start",Ee&&(J+=Ee[3])):Ae==="right"?(Ae="end",Ee&&(J-=Ee[1])):Ae==="center"&&(Ae="middle",Ee&&(J+=(Ee[3]-Ee[1])/2));var ue=0;if(pe==="after-edge"?(ue=-X.height+ve,Ee&&(ue-=Ee[2])):pe==="middle"?(ue=(-X.height+ve)/2,Ee&&(q+=(Ee[0]-Ee[2])/2)):Ee&&(ue+=Ee[0]),Y.__text!==re||Y.__textFont!==we){var ke=Y.__tspanList||[];Y.__tspanList=ke;for(var Pe=0;Pe<_e;Pe++){var Ve=ke[Pe];Ve?Ve.innerHTML="":(Ve=ke[Pe]=o("tspan"),ie.appendChild(Ve),O(Ve,"alignment-baseline",pe),O(Ve,"text-anchor",Ae)),O(Ve,"x",J),O(Ve,"y",q+Pe*ve+ue),Ve.appendChild(document.createTextNode(Ie[Pe]))}for(;Pe<ke.length;Pe++)ie.removeChild(ke[Pe]);ke.length=_e,Y.__text=re,Y.__textFont=we}else if(Y.__tspanList.length)for(var je=Y.__tspanList.length,Pe=0;Pe<je;++Pe){var Ve=Y.__tspanList[Pe];Ve&&(O(Ve,"x",J),O(Ve,"y",q+Pe*ve+ue))}}};function U(Y){return Y==="middle"?"middle":Y==="bottom"?"after-edge":"hanging"}$.drawRectText=P,$.brush=function(Y){var Z=Y.style;Z.text!=null&&(Z.textPosition=[0,0],P(Y,{x:Z.x||0,y:Z.y||0,width:0,height:0},Y.getBoundingRect()))},A.path=z,A.image=H,A.text=$},68941:function(E,A,u){var o=u(29070),S=u(23405),_=u(79442);function p(f,y){o.call(this,f,y,"clipPath","__clippath_in_use__")}S.inherits(p,o),p.prototype.update=function(f){var y=this.getSvgElement(f);y&&this.updateDom(y,f.__clipPaths,!1);var d=this.getTextSvgElement(f);d&&this.updateDom(d,f.__clipPaths,!0),this.markUsed(f)},p.prototype.updateDom=function(f,y,d){if(y&&y.length>0){var v,b,s=this.getDefs(!0),l=y[0],w=d?"_textDom":"_dom";l[w]?(b=l[w].getAttribute("id"),v=l[w],s.contains(v)||s.appendChild(v)):(b="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,(v=this.createElement("clipPath")).setAttribute("id",b),s.appendChild(v),l[w]=v);var I=this.getSvgProxy(l);if(l.transform&&l.parent.invTransform&&!d){var C=Array.prototype.slice.call(l.transform);_.mul(l.transform,l.parent.invTransform,l.transform),I.brush(l),l.transform=C}else I.brush(l);var h=this.getSvgElement(l);v.innerHTML="",v.appendChild(h.cloneNode()),f.setAttribute("clip-path","url(#"+b+")"),y.length>1&&this.updateDom(v,y.slice(1),d)}else f&&f.setAttribute("clip-path","none")},p.prototype.markUsed=function(f){var y=this;f.__clipPaths&&f.__clipPaths.length>0&&S.each(f.__clipPaths,function(d){d._dom&&o.prototype.markUsed.call(y,d._dom),d._textDom&&o.prototype.markUsed.call(y,d._textDom)})},E.exports=p},29070:function(E,A,u){var o=u(98242).createElement,S=u(23405),_=u(74582),p=u(91222),f=u(96296),y=u(19890),d=y.path,v=y.image,b=y.text;function s(l,w,I,C,h){this._zrId=l,this._svgRoot=w,this._tagNames=typeof I=="string"?[I]:I,this._markLabel=C,this._domName=h||"_dom",this.nextId=0}s.prototype.createElement=o,s.prototype.getDefs=function(l){var w=this._svgRoot,I=this._svgRoot.getElementsByTagName("defs");return I.length!==0?I[0]:l?((I=w.insertBefore(this.createElement("defs"),w.firstChild)).contains||(I.contains=function(C){var h=I.children;if(!h)return!1;for(var c=h.length-1;c>=0;--c)if(h[c]===C)return!0;return!1}),I):null},s.prototype.update=function(l,w){if(l){var I=this.getDefs(!1);if(l[this._domName]&&I.contains(l[this._domName]))typeof w=="function"&&w(l);else{var C=this.add(l);C&&(l[this._domName]=C)}}},s.prototype.addDom=function(l){this.getDefs(!0).appendChild(l)},s.prototype.removeDom=function(l){var w=this.getDefs(!1);w&&l[this._domName]&&(w.removeChild(l[this._domName]),l[this._domName]=null)},s.prototype.getDoms=function(){var l=this.getDefs(!1);if(!l)return[];var w=[];return S.each(this._tagNames,function(I){var C=l.getElementsByTagName(I);w=w.concat([].slice.call(C))}),w},s.prototype.markAllUnused=function(){var l=this.getDoms(),w=this;S.each(l,function(I){I[w._markLabel]="0"})},s.prototype.markUsed=function(l){l&&(l[this._markLabel]="1")},s.prototype.removeUnused=function(){var l=this.getDefs(!1);if(l){var w=this.getDoms(),I=this;S.each(w,function(C){C[I._markLabel]!=="1"&&l.removeChild(C)})}},s.prototype.getSvgProxy=function(l){return l instanceof _?d:l instanceof p?v:l instanceof f?b:d},s.prototype.getTextSvgElement=function(l){return l.__textSvgEl},s.prototype.getSvgElement=function(l){return l.__svgEl},E.exports=s},71961:function(E,A,u){var o=u(29070),S=u(23405),_=u(45003),p=u(86049);function f(y,d){o.call(this,y,d,["linearGradient","radialGradient"],"__gradient_in_use__")}S.inherits(f,o),f.prototype.addWithoutUpdate=function(y,d){if(d&&d.style){var v=this;S.each(["fill","stroke"],function(b){if(d.style[b]&&(d.style[b].type==="linear"||d.style[b].type==="radial")){var s,l=d.style[b],w=v.getDefs(!0);l._dom?(s=l._dom,w.contains(l._dom)||v.addDom(s)):s=v.add(l),v.markUsed(d);var I=s.getAttribute("id");y.setAttribute(b,"url(#"+I+")")}})}},f.prototype.add=function(y){var d;if(y.type==="linear")d=this.createElement("linearGradient");else{if(y.type!=="radial")return _("Illegal gradient type."),null;d=this.createElement("radialGradient")}return y.id=y.id||this.nextId++,d.setAttribute("id","zr"+this._zrId+"-gradient-"+y.id),this.updateDom(y,d),this.addDom(d),d},f.prototype.update=function(y){var d=this;o.prototype.update.call(this,y,function(){var v=y.type,b=y._dom.tagName;v==="linear"&&b==="linearGradient"||v==="radial"&&b==="radialGradient"?d.updateDom(y,y._dom):(d.removeDom(y),d.add(y))})},f.prototype.updateDom=function(y,d){if(y.type==="linear")d.setAttribute("x1",y.x),d.setAttribute("y1",y.y),d.setAttribute("x2",y.x2),d.setAttribute("y2",y.y2);else{if(y.type!=="radial")return void _("Illegal gradient type.");d.setAttribute("cx",y.x),d.setAttribute("cy",y.y),d.setAttribute("r",y.r)}y.global?d.setAttribute("gradientUnits","userSpaceOnUse"):d.setAttribute("gradientUnits","objectBoundingBox"),d.innerHTML="";for(var v=y.colorStops,b=0,s=v.length;b<s;++b){var l=this.createElement("stop");l.setAttribute("offset",100*v[b].offset+"%");var w=v[b].color;if(w.indexOf(!1)){var I=p.parse(w)[3],C=p.toHex(w);l.setAttribute("stop-color","#"+C),l.setAttribute("stop-opacity",I)}else l.setAttribute("stop-color",v[b].color);d.appendChild(l)}y._dom=d},f.prototype.markUsed=function(y){if(y.style){var d=y.style.fill;d&&d._dom&&o.prototype.markUsed.call(this,d._dom),(d=y.style.stroke)&&d._dom&&o.prototype.markUsed.call(this,d._dom)}},E.exports=f},45711:function(E,A,u){var o=u(29070);function S(p,f){o.call(this,p,f,["filter"],"__filter_in_use__","_shadowDom")}function _(p){return p&&(p.shadowBlur||p.shadowOffsetX||p.shadowOffsetY||p.textShadowBlur||p.textShadowOffsetX||p.textShadowOffsetY)}u(23405).inherits(S,o),S.prototype.addWithoutUpdate=function(p,f){if(f&&_(f.style)){var y,d=f.style;d._shadowDom?(y=d._shadowDom,this.getDefs(!0).contains(d._shadowDom)||this.addDom(y)):y=this.add(f),this.markUsed(f);var v=y.getAttribute("id");p.style.filter="url(#"+v+")"}},S.prototype.add=function(p){var f=this.createElement("filter"),y=p.style;return y._shadowDomId=y._shadowDomId||this.nextId++,f.setAttribute("id","zr"+this._zrId+"-shadow-"+y._shadowDomId),this.updateDom(p,f),this.addDom(f),f},S.prototype.update=function(p,f){var y=f.style;if(_(y)){var d=this;o.prototype.update.call(this,f,function(v){d.updateDom(f,v._shadowDom)})}else this.remove(p,y)},S.prototype.remove=function(p,f){f._shadowDomId!=null&&(this.removeDom(f),p.style.filter="")},S.prototype.updateDom=function(p,f){var y,d,v,b,s=f.getElementsByTagName("feDropShadow");s=s.length===0?this.createElement("feDropShadow"):s[0];var l=p.style,w=p.scale&&p.scale[0]||1,I=p.scale&&p.scale[1]||1;if(l.shadowBlur||l.shadowOffsetX||l.shadowOffsetY)y=l.shadowOffsetX||0,d=l.shadowOffsetY||0,v=l.shadowBlur,b=l.shadowColor;else{if(!l.textShadowBlur)return void this.removeDom(f,l);y=l.textShadowOffsetX||0,d=l.textShadowOffsetY||0,v=l.textShadowBlur,b=l.textShadowColor}s.setAttribute("dx",y/w),s.setAttribute("dy",d/I),s.setAttribute("flood-color",b);var C=v/2/w,h=v/2/I;s.setAttribute("stdDeviation",C+" "+h),f.setAttribute("x","-100%"),f.setAttribute("y","-100%"),f.setAttribute("width",Math.ceil(v/2*200)+"%"),f.setAttribute("height",Math.ceil(v/2*200)+"%"),f.appendChild(s),l._shadowDom=f},S.prototype.markUsed=function(p){var f=p.style;f&&f._shadowDom&&o.prototype.markUsed.call(this,f._shadowDom)},E.exports=S},38801:function(E,A,u){u(19890),(0,u(98709).registerPainter)("svg",u(70318))},86049:function(E,A,u){var o=u(26853),S={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function _(T){return(T=Math.round(T))<0?0:T>255?255:T}function p(T){return T<0?0:T>1?1:T}function f(T){return T.length&&T.charAt(T.length-1)==="%"?_(parseFloat(T)/100*255):_(parseInt(T,10))}function y(T){return T.length&&T.charAt(T.length-1)==="%"?p(parseFloat(T)/100):p(parseFloat(T))}function d(T,D,O){return O<0?O+=1:O>1&&(O-=1),6*O<1?T+(D-T)*O*6:2*O<1?D:3*O<2?T+(D-T)*(.6666666666666666-O)*6:T}function v(T,D,O,N,z){return T[0]=D,T[1]=O,T[2]=N,T[3]=z,T}function b(T,D){return T[0]=D[0],T[1]=D[1],T[2]=D[2],T[3]=D[3],T}var s=new o(20),l=null;function w(T,D){l&&b(l,D),l=s.put(T,l||D.slice())}function I(T,D){if(T){D=D||[];var O=s.get(T);if(O)return b(D,O);var N=(T+="").replace(/ /g,"").toLowerCase();if(N in S)return b(D,S[N]),w(T,D),D;if(N.charAt(0)==="#"){if(N.length===4){var z=parseInt(N.substr(1),16);return z>=0&&z<=4095?(v(D,(3840&z)>>4|(3840&z)>>8,240&z|(240&z)>>4,15&z|(15&z)<<4,1),w(T,D),D):void v(D,0,0,0,1)}if(N.length===7){var z=parseInt(N.substr(1),16);return z>=0&&z<=16777215?(v(D,(16711680&z)>>16,(65280&z)>>8,255&z,1),w(T,D),D):void v(D,0,0,0,1)}return}var H=N.indexOf("("),$=N.indexOf(")");if(H!==-1&&$+1===N.length){var V=N.substr(0,H),P=N.substr(H+1,$-(H+1)).split(","),U=1;switch(V){case"rgba":if(P.length!==4)return void v(D,0,0,0,1);U=y(P.pop());case"rgb":return P.length!==3?void v(D,0,0,0,1):(v(D,f(P[0]),f(P[1]),f(P[2]),U),w(T,D),D);case"hsla":return P.length!==4?void v(D,0,0,0,1):(P[3]=y(P[3]),C(P,D),w(T,D),D);case"hsl":return P.length!==3?void v(D,0,0,0,1):(C(P,D),w(T,D),D);default:return}}v(D,0,0,0,1)}}function C(T,D){var O=(parseFloat(T[0])%360+360)%360/360,N=y(T[1]),z=y(T[2]),H=z<=.5?z*(N+1):z+N-z*N,$=2*z-H;return v(D=D||[],_(255*d($,H,O+.3333333333333333)),_(255*d($,H,O)),_(255*d($,H,O-.3333333333333333)),1),T.length===4&&(D[3]=T[3]),D}function h(T,D,O){if(D&&D.length&&T>=0&&T<=1){O=O||[];var N,z,H,$,V=T*(D.length-1),P=Math.floor(V),U=Math.ceil(V),Y=D[P],Z=D[U],X=V-P;return O[0]=_((N=Y[0],N+(Z[0]-N)*X)),O[1]=_((z=Y[1],z+(Z[1]-z)*X)),O[2]=_((H=Y[2],H+(Z[2]-H)*X)),O[3]=p(($=Y[3],$+(Z[3]-$)*X)),O}}function c(T,D,O){if(D&&D.length&&T>=0&&T<=1){var N,z,H,$,V=T*(D.length-1),P=Math.floor(V),U=Math.ceil(V),Y=I(D[P]),Z=I(D[U]),X=V-P,J=m([_((N=Y[0],N+(Z[0]-N)*X)),_((z=Y[1],z+(Z[1]-z)*X)),_((H=Y[2],H+(Z[2]-H)*X)),p(($=Y[3],$+(Z[3]-$)*X))],"rgba");return O?{color:J,leftIndex:P,rightIndex:U,value:V}:J}}function m(T,D){if(T&&T.length){var O=T[0]+","+T[1]+","+T[2];return(D==="rgba"||D==="hsva"||D==="hsla")&&(O+=","+T[3]),D+"("+O+")"}}A.parse=I,A.lift=function(T,D){var O=I(T);if(O){for(var N=0;N<3;N++)D<0?O[N]=O[N]*(1-D)|0:O[N]=(255-O[N])*D+O[N]|0,O[N]>255?O[N]=255:T[N]<0&&(O[N]=0);return m(O,O.length===4?"rgba":"rgb")}},A.toHex=function(T){var D=I(T);if(D)return(16777216+(D[0]<<16)+(D[1]<<8)+ +D[2]).toString(16).slice(1)},A.fastLerp=h,A.fastMapToColor=h,A.lerp=c,A.mapToColor=c,A.modifyHSL=function(T,D,O,N){if(T=I(T)){var z;return T=function(H){if(H){var $,V,P=H[0]/255,U=H[1]/255,Y=H[2]/255,Z=Math.min(P,U,Y),X=Math.max(P,U,Y),J=X-Z,q=(X+Z)/2;if(J===0)$=0,V=0;else{V=q<.5?J/(X+Z):J/(2-X-Z);var te=((X-P)/6+J/2)/J,re=((X-U)/6+J/2)/J,ie=((X-Y)/6+J/2)/J;P===X?$=ie-re:U===X?$=.3333333333333333+te-ie:Y===X&&($=.6666666666666666+re-te),$<0&&($+=1),$>1&&($-=1)}var ne=[360*$,V,q];return H[3]!=null&&ne.push(H[3]),ne}}(T),D!=null&&(T[0]=(z=Math.round(z=D))<0?0:z>360?360:z),O!=null&&(T[1]=y(O)),N!=null&&(T[2]=y(N)),m(C(T),"rgba")}},A.modifyAlpha=function(T,D){if((T=I(T))&&D!=null)return T[3]=p(D),m(T,"rgba")},A.stringify=m},66836:function(E,A,u){var o=u(18583),S=u(91222),_=u(96296),p=u(15062),f=u(86367),y=u(59348),d=u(1147),v=u(74582),b=u(88217),s=u(84214),l=u(67725),w=u(7609),I=u(79442),C=u(49884).createFromString,h=u(23405),c=h.isString,m=h.extend,T=h.defaults,D=h.trim,O=h.each,N=/[\s,]+/;function z(ie){for(c(ie)&&(ie=new DOMParser().parseFromString(ie,"text/xml")),ie.nodeType===9&&(ie=ie.firstChild);ie.nodeName.toLowerCase()!=="svg"||ie.nodeType!==1;)ie=ie.nextSibling;return ie}function H(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}H.prototype.parse=function(ie,ne){ne=ne||{};var le,fe,we=z(ie);if(!we)throw Error("Illegal svg");var pe=new o;this._root=pe;var ve=we.getAttribute("viewBox")||"",be=parseFloat(we.getAttribute("width")||ne.width),Ee=parseFloat(we.getAttribute("height")||ne.height);isNaN(be)&&(be=null),isNaN(Ee)&&(Ee=null),Z(we,pe,null,!0);for(var Re=we.firstChild;Re;)this._parseNode(Re,pe),Re=Re.nextSibling;if(ve){var Ne=D(ve).split(N);Ne.length>=4&&(le={x:parseFloat(Ne[0]||0),y:parseFloat(Ne[1]||0),width:parseFloat(Ne[2]),height:parseFloat(Ne[3])})}if(le&&be!=null&&Ee!=null&&(fe=re(le,be,Ee),!ne.ignoreViewBox)){var Le=pe;(pe=new o).add(Le),Le.scale=fe.scale.slice(),Le.position=fe.position.slice()}return ne.ignoreRootClip||be==null||Ee==null||pe.setClipPath(new f({shape:{x:0,y:0,width:be,height:Ee}})),{root:pe,width:be,height:Ee,viewBoxRect:le,viewBoxTransform:fe}},H.prototype._parseNode=function(ie,ne){var le,fe=ie.nodeName.toLowerCase();if(fe==="defs"?this._isDefine=!0:fe==="text"&&(this._isText=!0),this._isDefine){var we=V[fe];if(we){var pe=we.call(this,ie),ve=ie.getAttribute("id");ve&&(this._defs[ve]=pe)}}else{var we=$[fe];we&&(le=we.call(this,ie,ne),ne.add(le))}for(var be=ie.firstChild;be;)be.nodeType===1&&this._parseNode(be,le),be.nodeType===3&&this._isText&&this._parseText(be,le),be=be.nextSibling;fe==="defs"?this._isDefine=!1:fe==="text"&&(this._isText=!1)},H.prototype._parseText=function(ie,ne){if(ie.nodeType===1){var le=ie.getAttribute("dx")||0,fe=ie.getAttribute("dy")||0;this._textX+=parseFloat(le),this._textY+=parseFloat(fe)}var we=new _({style:{text:ie.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});P(ne,we),Z(ie,we,this._defs);var pe=we.style.fontSize;pe&&pe<9&&(we.style.fontSize=9,we.scale=we.scale||[1,1],we.scale[0]*=pe/9,we.scale[1]*=pe/9);var ve=we.getBoundingRect();return this._textX+=ve.width,ne.add(we),we};var $={g:function(ie,ne){var le=new o;return P(ne,le),Z(ie,le,this._defs),le},rect:function(ie,ne){var le=new f;return P(ne,le),Z(ie,le,this._defs),le.setShape({x:parseFloat(ie.getAttribute("x")||0),y:parseFloat(ie.getAttribute("y")||0),width:parseFloat(ie.getAttribute("width")||0),height:parseFloat(ie.getAttribute("height")||0)}),le},circle:function(ie,ne){var le=new p;return P(ne,le),Z(ie,le,this._defs),le.setShape({cx:parseFloat(ie.getAttribute("cx")||0),cy:parseFloat(ie.getAttribute("cy")||0),r:parseFloat(ie.getAttribute("r")||0)}),le},line:function(ie,ne){var le=new d;return P(ne,le),Z(ie,le,this._defs),le.setShape({x1:parseFloat(ie.getAttribute("x1")||0),y1:parseFloat(ie.getAttribute("y1")||0),x2:parseFloat(ie.getAttribute("x2")||0),y2:parseFloat(ie.getAttribute("y2")||0)}),le},ellipse:function(ie,ne){var le=new y;return P(ne,le),Z(ie,le,this._defs),le.setShape({cx:parseFloat(ie.getAttribute("cx")||0),cy:parseFloat(ie.getAttribute("cy")||0),rx:parseFloat(ie.getAttribute("rx")||0),ry:parseFloat(ie.getAttribute("ry")||0)}),le},polygon:function(ie,ne){var le=ie.getAttribute("points");le&&(le=U(le));var fe=new b({shape:{points:le||[]}});return P(ne,fe),Z(ie,fe,this._defs),fe},polyline:function(ie,ne){var le=new v;P(ne,le),Z(ie,le,this._defs);var fe=ie.getAttribute("points");return fe&&(fe=U(fe)),new s({shape:{points:fe||[]}})},image:function(ie,ne){var le=new S;return P(ne,le),Z(ie,le,this._defs),le.setStyle({image:ie.getAttribute("xlink:href"),x:ie.getAttribute("x"),y:ie.getAttribute("y"),width:ie.getAttribute("width"),height:ie.getAttribute("height")}),le},text:function(ie,ne){var le=ie.getAttribute("x")||0,fe=ie.getAttribute("y")||0,we=ie.getAttribute("dx")||0,pe=ie.getAttribute("dy")||0;this._textX=parseFloat(le)+parseFloat(we),this._textY=parseFloat(fe)+parseFloat(pe);var ve=new o;return P(ne,ve),Z(ie,ve,this._defs),ve},tspan:function(ie,ne){var le=ie.getAttribute("x"),fe=ie.getAttribute("y");le!=null&&(this._textX=parseFloat(le)),fe!=null&&(this._textY=parseFloat(fe));var we=ie.getAttribute("dx")||0,pe=ie.getAttribute("dy")||0,ve=new o;return P(ne,ve),Z(ie,ve,this._defs),this._textX+=we,this._textY+=pe,ve},path:function(ie,ne){var le=C(ie.getAttribute("d")||"");return P(ne,le),Z(ie,le,this._defs),le}},V={lineargradient:function(ie){var ne=new l(parseInt(ie.getAttribute("x1")||0,10),parseInt(ie.getAttribute("y1")||0,10),parseInt(ie.getAttribute("x2")||10,10),parseInt(ie.getAttribute("y2")||0,10));return function(le,fe){for(var we=le.firstChild;we;){if(we.nodeType===1){var pe=we.getAttribute("offset");pe=pe.indexOf("%")>0?parseInt(pe,10)/100:pe?parseFloat(pe):0;var ve=we.getAttribute("stop-color")||"#000000";fe.addColorStop(pe,ve)}we=we.nextSibling}}(ie,ne),ne},radialgradient:function(ie){}};function P(ie,ne){ie&&ie.__inheritedStyle&&(ne.__inheritedStyle||(ne.__inheritedStyle={}),T(ne.__inheritedStyle,ie.__inheritedStyle))}function U(ie){for(var ne=D(ie).split(N),le=[],fe=0;fe<ne.length;fe+=2){var we=parseFloat(ne[fe]),pe=parseFloat(ne[fe+1]);le.push([we,pe])}return le}var Y={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-align":"textAlign","alignment-baseline":"textBaseline"};function Z(ie,ne,le,fe){var we=ne.__inheritedStyle||{},pe=ne.type==="text";if(ie.nodeType===1&&(function(Ne,Le){var Se=Ne.getAttribute("transform");if(Se){Se=Se.replace(/,/g," ");var Ie=null,_e=[];Se.replace(q,function(Pe,Ve,je){_e.push(Ve,je)});for(var Ae=_e.length-1;Ae>0;Ae-=2){var ue=_e[Ae],ke=_e[Ae-1];switch(Ie=Ie||I.create(),ke){case"translate":ue=D(ue).split(N),I.translate(Ie,Ie,[parseFloat(ue[0]),parseFloat(ue[1]||0)]);break;case"scale":ue=D(ue).split(N),I.scale(Ie,Ie,[parseFloat(ue[0]),parseFloat(ue[1]||ue[0])]);break;case"rotate":ue=D(ue).split(N),I.rotate(Ie,Ie,parseFloat(ue[0]));break;case"skew":ue=D(ue).split(N),console.warn("Skew transform is not supported yet");break;case"matrix":var ue=D(ue).split(N);Ie[0]=parseFloat(ue[0]),Ie[1]=parseFloat(ue[1]),Ie[2]=parseFloat(ue[2]),Ie[3]=parseFloat(ue[3]),Ie[4]=parseFloat(ue[4]),Ie[5]=parseFloat(ue[5])}}Le.setLocalTransform(Ie)}}(ie,ne),m(we,function(Ne){var Le,Se=Ne.getAttribute("style"),Ie={};if(!Se)return Ie;var _e={};for(te.lastIndex=0;(Le=te.exec(Se))!=null;)_e[Le[1]]=Le[2];for(var Ae in Y)Y.hasOwnProperty(Ae)&&_e[Ae]!=null&&(Ie[Y[Ae]]=_e[Ae]);return Ie}(ie)),!fe)){for(var ve in Y)if(Y.hasOwnProperty(ve)){var be=ie.getAttribute(ve);be!=null&&(we[Y[ve]]=be)}}var Ee=pe?"textStroke":"stroke";ne.style=ne.style||new w;var Re=ne.style;we.fill!=null&&Re.set(pe?"textFill":"fill",J(we.fill,le)),we.stroke!=null&&Re.set(Ee,J(we.stroke,le)),O(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(Ne){we[Ne]!=null&&Re.set(Ne==="lineWidth"&&pe?"textStrokeWidth":Ne,parseFloat(we[Ne]))}),we.textBaseline&&we.textBaseline!=="auto"||(we.textBaseline="alphabetic"),we.textBaseline==="alphabetic"&&(we.textBaseline="bottom"),we.textAlign==="start"&&(we.textAlign="left"),we.textAlign==="end"&&(we.textAlign="right"),O(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],function(Ne){we[Ne]!=null&&Re.set(Ne,we[Ne])}),we.lineDash&&(ne.style.lineDash=D(we.lineDash).split(N)),Re[Ee]&&Re[Ee]!=="none"&&(ne[Ee]=!0),ne.__inheritedStyle=we}var X=/url\(\s*#(.*?)\)/;function J(ie,ne){var le=ne&&ie&&ie.match(X);return le?ne[D(le[1])]:ie}var q=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g,te=/([^\s:;]+)\s*:\s*([^:;]+)/g;function re(ie,ne,le){var fe=Math.min(ne/ie.width,le/ie.height),we=[-(ie.x+ie.width/2)*fe+ne/2,-(ie.y+ie.height/2)*fe+le/2];return{scale:[fe,fe],position:we}}A.parseXML=z,A.makeViewBoxTransform=re,A.parseSVG=function(ie,ne){return new H().parse(ie,ne)}},49884:function(E,A,u){var o=u(74582),S=u(93041),_=u(31386),p=Math.sqrt,f=Math.sin,y=Math.cos,d=Math.PI,v=function(h){return Math.sqrt(h[0]*h[0]+h[1]*h[1])},b=function(h,c){return(h[0]*c[0]+h[1]*c[1])/(v(h)*v(c))},s=function(h,c){return(h[0]*c[1]<h[1]*c[0]?-1:1)*Math.acos(b(h,c))};function l(h,c,m,T,D,O,N,z,H,$,V){var P=d/180*H,U=y(P)*(h-m)/2+f(P)*(c-T)/2,Y=-1*f(P)*(h-m)/2+y(P)*(c-T)/2,Z=U*U/(N*N)+Y*Y/(z*z);Z>1&&(N*=p(Z),z*=p(Z));var X=(D===O?-1:1)*p((N*N*(z*z)-N*N*(Y*Y)-z*z*(U*U))/(N*N*(Y*Y)+z*z*(U*U)))||0,J=X*N*Y/z,q=-(X*z)*U/N,te=(h+m)/2+y(P)*J-f(P)*q,re=(c+T)/2+f(P)*J+y(P)*q,ie=s([1,0],[(U-J)/N,(Y-q)/z]),ne=[(U-J)/N,(Y-q)/z],le=[(-1*U-J)/N,(-1*Y-q)/z],fe=s(ne,le);-1>=b(ne,le)&&(fe=d),b(ne,le)>=1&&(fe=0),O===0&&fe>0&&(fe-=2*d),O===1&&fe<0&&(fe+=2*d),V.addData($,te,re,N,z,ie,fe,P,O)}var w=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,I=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function C(h,c){var m=function(T){if(!T)return new S;for(var D=0,O=0,N=0,z=0,H=new S,$=S.CMD,V=T.match(w),P=0;P<V.length;P++){for(var U=V[P],Y=U.charAt(0),Z=U.match(I)||[],X=Z.length,J=0;J<X;J++)Z[J]=parseFloat(Z[J]);for(var q=0;q<X;){var te,re,ie,ne,le,fe,we,pe,ve,be=D,Ee=O;switch(Y){case"l":D+=Z[q++],O+=Z[q++],re=$.L,H.addData(re,D,O);break;case"L":D=Z[q++],O=Z[q++],re=$.L,H.addData(re,D,O);break;case"m":D+=Z[q++],O+=Z[q++],re=$.M,H.addData(re,D,O),N=D,z=O,Y="l";break;case"M":D=Z[q++],O=Z[q++],re=$.M,H.addData(re,D,O),N=D,z=O,Y="L";break;case"h":D+=Z[q++],re=$.L,H.addData(re,D,O);break;case"H":D=Z[q++],re=$.L,H.addData(re,D,O);break;case"v":O+=Z[q++],re=$.L,H.addData(re,D,O);break;case"V":O=Z[q++],re=$.L,H.addData(re,D,O);break;case"C":re=$.C,H.addData(re,Z[q++],Z[q++],Z[q++],Z[q++],Z[q++],Z[q++]),D=Z[q-2],O=Z[q-1];break;case"c":re=$.C,H.addData(re,Z[q++]+D,Z[q++]+O,Z[q++]+D,Z[q++]+O,Z[q++]+D,Z[q++]+O),D+=Z[q-2],O+=Z[q-1];break;case"S":ie=D,ne=O;var Re=H.len(),Ne=H.data;te===$.C&&(ie+=D-Ne[Re-4],ne+=O-Ne[Re-3]),re=$.C,be=Z[q++],Ee=Z[q++],D=Z[q++],O=Z[q++],H.addData(re,ie,ne,be,Ee,D,O);break;case"s":ie=D,ne=O;var Re=H.len(),Ne=H.data;te===$.C&&(ie+=D-Ne[Re-4],ne+=O-Ne[Re-3]),re=$.C,be=D+Z[q++],Ee=O+Z[q++],D+=Z[q++],O+=Z[q++],H.addData(re,ie,ne,be,Ee,D,O);break;case"Q":be=Z[q++],Ee=Z[q++],D=Z[q++],O=Z[q++],re=$.Q,H.addData(re,be,Ee,D,O);break;case"q":be=Z[q++]+D,Ee=Z[q++]+O,D+=Z[q++],O+=Z[q++],re=$.Q,H.addData(re,be,Ee,D,O);break;case"T":ie=D,ne=O;var Re=H.len(),Ne=H.data;te===$.Q&&(ie+=D-Ne[Re-4],ne+=O-Ne[Re-3]),D=Z[q++],O=Z[q++],re=$.Q,H.addData(re,ie,ne,D,O);break;case"t":ie=D,ne=O;var Re=H.len(),Ne=H.data;te===$.Q&&(ie+=D-Ne[Re-4],ne+=O-Ne[Re-3]),D+=Z[q++],O+=Z[q++],re=$.Q,H.addData(re,ie,ne,D,O);break;case"A":le=Z[q++],fe=Z[q++],we=Z[q++],pe=Z[q++],ve=Z[q++],be=D,Ee=O,D=Z[q++],l(be,Ee,D,O=Z[q++],pe,ve,le,fe,we,re=$.A,H);break;case"a":le=Z[q++],fe=Z[q++],we=Z[q++],pe=Z[q++],ve=Z[q++],be=D,Ee=O,D+=Z[q++],l(be,Ee,D,O+=Z[q++],pe,ve,le,fe,we,re=$.A,H)}}(Y==="z"||Y==="Z")&&(re=$.Z,H.addData(re),D=N,O=z),te=re}return H.toStatic(),H}(h);return(c=c||{}).buildPath=function(T){if(T.setData){T.setData(m.data);var D=T.getContext();D&&T.rebuildPath(D)}else{var D=T;m.rebuildPath(D)}},c.applyTransform=function(T){_(m,T),this.dirty(!0)},c}A.createFromString=function(h,c){return new o(C(h,c))},A.extendFromString=function(h,c){return o.extend(C(h,c))},A.mergePath=function(h,c){for(var m=[],T=h.length,D=0;D<T;D++){var O=h[D];O.path||O.createPathProxy(),O.__dirtyPath&&O.buildPath(O.path,O.shape,!0),m.push(O.path)}var N=new o(c);return N.createPathProxy(),N.buildPath=function(z){z.appendPath(m);var H=z.getContext();H&&z.rebuildPath(H)},N}},31386:function(E,A,u){var o=u(93041),S=u(76414).applyTransform,_=o.CMD,p=[[],[],[]],f=Math.sqrt,y=Math.atan2;E.exports=function(d,v){var b,s,l,w,I,C,h=d.data,c=_.M,m=_.C,T=_.L,D=_.R,O=_.A,N=_.Q;for(l=0,w=0;l<h.length;){switch(b=h[l++],w=l,s=0,b){case c:case T:s=1;break;case m:s=3;break;case N:s=2;break;case O:var z=v[4],H=v[5],$=f(v[0]*v[0]+v[1]*v[1]),V=f(v[2]*v[2]+v[3]*v[3]),P=y(-v[1]/V,v[0]/$);h[l]*=$,h[l++]+=z,h[l]*=V,h[l++]+=H,h[l++]*=$,h[l++]*=V,h[l++]+=P,h[l++]+=P,l+=2,w=l;break;case D:C[0]=h[l++],C[1]=h[l++],S(C,C,v),h[w++]=C[0],h[w++]=C[1],C[0]+=h[l++],C[1]+=h[l++],S(C,C,v),h[w++]=C[0],h[w++]=C[1]}for(I=0;I<s;I++){var C=p[I];C[0]=h[l++],C[1]=h[l++],S(C,C,v),h[w++]=C[0],h[w++]=C[1]}}}},95057:function(E,A,u){var o=u(45003),S=u(98200),_=u(23405).each;function p(y){return parseInt(y,10)}function f(y,d){S.initVML(),this.root=y,this.storage=d;var v=document.createElement("div"),b=document.createElement("div");v.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",b.style.cssText="position:absolute;left:0;top:0;",y.appendChild(v),this._vmlRoot=b,this._vmlViewport=v,this.resize();var s=d.delFromStorage,l=d.addToStorage;d.delFromStorage=function(w){s.call(d,w),w&&w.onRemove&&w.onRemove(b)},d.addToStorage=function(w){w.onAdd&&w.onAdd(b),l.call(d,w)},this._firstPaint=!0}f.prototype={constructor:f,getType:function(){return"vml"},getViewportRoot:function(){return this._vmlViewport},getViewportRootOffset:function(){var y=this.getViewportRoot();if(y)return{offsetLeft:y.offsetLeft||0,offsetTop:y.offsetTop||0}},refresh:function(){var y=this.storage.getDisplayList(!0,!0);this._paintList(y)},_paintList:function(y){for(var d=this._vmlRoot,v=0;v<y.length;v++){var b=y[v];b.invisible||b.ignore?(b.__alreadyNotVisible||b.onRemove(d),b.__alreadyNotVisible=!0):(b.__alreadyNotVisible&&b.onAdd(d),b.__alreadyNotVisible=!1,b.__dirty&&(b.beforeBrush&&b.beforeBrush(),(b.brushVML||b.brush).call(b,d),b.afterBrush&&b.afterBrush())),b.__dirty=!1}this._firstPaint&&(this._vmlViewport.appendChild(d),this._firstPaint=!1)},resize:function(v,b){var v=v??this._getWidth(),b=b??this._getHeight();if(this._width!==v||this._height!==b){this._width=v,this._height=b;var s=this._vmlViewport.style;s.width=v+"px",s.height=b+"px"}},dispose:function(){this.root.innerHTML="",this._vmlRoot=this._vmlViewport=this.storage=null},getWidth:function(){return this._width},getHeight:function(){return this._height},clear:function(){this._vmlViewport&&this.root.removeChild(this._vmlViewport)},_getWidth:function(){var y=this.root,d=y.currentStyle;return(y.clientWidth||p(d.width))-p(d.paddingLeft)-p(d.paddingRight)|0},_getHeight:function(){var y=this.root,d=y.currentStyle;return(y.clientHeight||p(d.height))-p(d.paddingTop)-p(d.paddingBottom)|0}},_(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(y){f.prototype[y]=function(){o('In IE8.0 VML mode painter not support method "'+y+'"')}}),E.exports=f},98200:function(E,A,u){var o,S=u(23584),_="urn:schemas-microsoft-com:vml",p=typeof window>"u"?null:window,f=!1,y=p&&p.document;if(y&&!S.canvasSupported)try{y.namespaces.zrvml||y.namespaces.add("zrvml",_),o=function(d){return y.createElement("<zrvml:"+d+' class="zrvml">')}}catch{o=function(v){return y.createElement("<"+v+' xmlns="'+_+'" class="zrvml">')}}A.doc=y,A.createNode=function(d){return o(d)},A.initVML=function(){if(!f&&y){f=!0;var d=y.styleSheets;d.length<31?y.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):d[0].addRule(".zrvml","behavior:url(#default#VML)")}}},26026:function(E,A,u){var o=u(23584),S=u(76414).applyTransform,_=u(28761),p=u(86049),f=u(24570),y=u(69824),d=u(12094),v=u(49181),b=u(91222),s=u(96296),l=u(74582),w=u(93041),I=u(97722),C=u(98200),h=w.CMD,c=Math.round,m=Math.sqrt,T=Math.abs,D=Math.cos,O=Math.sin,N=Math.max;if(!o.canvasSupported){var z,H="progid:DXImageTransform.Microsoft",$=function(_e){_e.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",_e.coordsize="21600,21600",_e.coordorigin="0,0"},V=function(_e,Ae,ue){return"rgb("+[_e,Ae,ue].join(",")+")"},P=function(_e,Ae){Ae&&_e&&Ae.parentNode!==_e&&_e.appendChild(Ae)},U=function(_e,Ae){Ae&&_e&&Ae.parentNode===_e&&_e.removeChild(Ae)},Y=function(_e,Ae,ue){return 1e5*(parseFloat(_e)||0)+1e3*(parseFloat(Ae)||0)+ue},Z=function(_e,Ae){return typeof _e=="string"?_e.lastIndexOf("%")>=0?parseFloat(_e)/100*Ae:parseFloat(_e):_e},X=function(_e,Ae,ue){var ke=p.parse(Ae);isNaN(ue*=1)&&(ue=1),ke&&(_e.color=V(ke[0],ke[1],ke[2]),_e.opacity=ue*ke[3])},J=function(_e){var Ae=p.parse(_e);return[V(Ae[0],Ae[1],Ae[2]),Ae[3]]},q=function(_e,Ae,ue){var ke=Ae.fill;if(ke!=null)if(ke instanceof I){var Pe,Ve=0,je=[0,0],it=0,rt=1,mt=ue.getBoundingRect(),yt=mt.width,st=mt.height;if(ke.type==="linear"){Pe="gradient";var Qe=ue.transform,At=[ke.x*yt,ke.y*st],Xt=[ke.x2*yt,ke.y2*st];Qe&&(S(At,At,Qe),S(Xt,Xt,Qe)),(Ve=180*Math.atan2(Xt[0]-At[0],Xt[1]-At[1])/Math.PI)<0&&(Ve+=360),Ve<1e-6&&(Ve=0)}else{Pe="gradientradial";var At=[ke.x*yt,ke.y*st],Qe=ue.transform,cn=ue.scale,Sn=yt,Vn=st;je=[(At[0]-mt.x)/Sn,(At[1]-mt.y)/Vn],Qe&&S(At,At,Qe);var bn=N(Sn/=21600*cn[0],Vn/=21600*cn[1]);it=0/bn,rt=2*ke.r/bn-it}var En=ke.colorStops.slice();En.sort(function(vt,wt){return vt.offset-wt.offset});for(var pn=En.length,Un=[],Pn=[],On=0;On<pn;On++){var Ht=En[On],Mt=J(Ht.color);Pn.push(Ht.offset*rt+it+" "+Mt[0]),(On===0||On===pn-1)&&Un.push(Mt)}if(pn>=2){var Gt=Un[0][0],Bt=Un[1][0],Ge=Un[0][1]*Ae.opacity,et=Un[1][1]*Ae.opacity;_e.type=Pe,_e.method="none",_e.focus="100%",_e.angle=Ve,_e.color=Gt,_e.color2=Bt,_e.colors=Pn.join(","),_e.opacity=et,_e.opacity2=Ge}Pe==="radial"&&(_e.focusposition=je.join(","))}else X(_e,ke,Ae.opacity)},te=function(_e,Ae){Ae.lineDash!=null&&(_e.dashstyle=Ae.lineDash.join(" ")),Ae.stroke==null||Ae.stroke instanceof I||X(_e,Ae.stroke,Ae.opacity)},re=function(_e,Ae,ue,ke){var Pe=Ae==="fill",Ve=_e.getElementsByTagName(Ae)[0];ue[Ae]!=null&&ue[Ae]!=="none"&&(Pe||!Pe&&ue.lineWidth)?(_e[Pe?"filled":"stroked"]="true",ue[Ae]instanceof I&&U(_e,Ve),Ve||(Ve=C.createNode(Ae)),Pe?q(Ve,ue,ke):te(Ve,ue),P(_e,Ve)):(_e[Pe?"filled":"stroked"]="false",U(_e,Ve))},ie=[[],[],[]],ne=function(_e,Ae){var ue=h.M,ke=h.C,Pe=h.L,Ve=h.A,je=h.Q,it=[],rt=_e.data,mt=_e.len();for(st=0;st<mt;){switch(yt=rt[st++],Vn="",Sn=0,yt){case ue:Vn=" m ",Sn=1,Qe=rt[st++],At=rt[st++],ie[0][0]=Qe,ie[0][1]=At;break;case Pe:Vn=" l ",Sn=1,Qe=rt[st++],At=rt[st++],ie[0][0]=Qe,ie[0][1]=At;break;case je:case ke:var yt,st,Qe,At,Xt,cn,Sn=3,Vn=" c ",Rt=rt[st++],Lt=rt[st++],bn=rt[st++],En=rt[st++];yt===je?(Xt=bn,cn=En,bn=(bn+2*Rt)/3,En=(En+2*Lt)/3,Rt=(Qe+2*Rt)/3,Lt=(At+2*Lt)/3):(Xt=rt[st++],cn=rt[st++]),ie[0][0]=Rt,ie[0][1]=Lt,ie[1][0]=bn,ie[1][1]=En,ie[2][0]=Xt,ie[2][1]=cn,Qe=Xt,At=cn;break;case Ve:var pn=0,Un=0,Pn=1,On=1,Ht=0;Ae&&(pn=Ae[4],Un=Ae[5],Pn=m(Ae[0]*Ae[0]+Ae[1]*Ae[1]),On=m(Ae[2]*Ae[2]+Ae[3]*Ae[3]),Ht=Math.atan2(-Ae[1]/On,Ae[0]/Pn));var Mt=rt[st++],Gt=rt[st++],Bt=rt[st++],Ge=rt[st++],et=rt[st++]+Ht,vt=rt[st++]+et+Ht;st++;var wt=rt[st++],Ct=Mt+D(et)*Bt,bt=Gt+O(et)*Ge,Rt=Mt+D(vt)*Bt,Lt=Gt+O(vt)*Ge,Dt=wt?" wa ":" at ";1e-4>Math.abs(Ct-Rt)&&(Math.abs(vt-et)>.01?wt&&(Ct+=.0125):1e-4>Math.abs(bt-Gt)?wt&&Ct<Mt||!wt&&Ct>Mt?Lt-=.0125:Lt+=.0125:wt&&bt<Gt||!wt&&bt>Gt?Rt+=.0125:Rt-=.0125),it.push(Dt,c(((Mt-Bt)*Pn+pn)*21600-10800),",",c(((Gt-Ge)*On+Un)*21600-10800),",",c(((Mt+Bt)*Pn+pn)*21600-10800),",",c(((Gt+Ge)*On+Un)*21600-10800),",",c((Ct*Pn+pn)*21600-10800),",",c((bt*On+Un)*21600-10800),",",c((Rt*Pn+pn)*21600-10800),",",c((Lt*On+Un)*21600-10800)),Qe=Rt,At=Lt;break;case h.R:var Jt=ie[0],zt=ie[1];Jt[0]=rt[st++],Jt[1]=rt[st++],zt[0]=Jt[0]+rt[st++],zt[1]=Jt[1]+rt[st++],Ae&&(S(Jt,Jt,Ae),S(zt,zt,Ae)),Jt[0]=c(21600*Jt[0]-10800),zt[0]=c(21600*zt[0]-10800),Jt[1]=c(21600*Jt[1]-10800),zt[1]=c(21600*zt[1]-10800),it.push(" m ",Jt[0],",",Jt[1]," l ",zt[0],",",Jt[1]," l ",zt[0],",",zt[1]," l ",Jt[0],",",zt[1]);break;case h.Z:it.push(" x ")}if(Sn>0){it.push(Vn);for(var nn=0;nn<Sn;nn++){var An=ie[nn];Ae&&S(An,An,Ae),it.push(c(21600*An[0]-10800),",",c(21600*An[1]-10800),nn<Sn-1?",":"")}}}return it.join("")};l.prototype.brushVML=function(_e){var Ae=this.style,ue=this._vmlEl;ue||($(ue=C.createNode("shape")),this._vmlEl=ue),re(ue,"fill",Ae,this),re(ue,"stroke",Ae,this);var ke=this.transform,Pe=ke!=null,Ve=ue.getElementsByTagName("stroke")[0];if(Ve){var je=Ae.lineWidth;Pe&&!Ae.strokeNoScale&&(je*=m(T(ke[0]*ke[3]-ke[1]*ke[2]))),Ve.weight=je+"px"}var it=this.path||(this.path=new w);this.__dirtyPath&&(it.beginPath(),it.subPixelOptimize=!1,this.buildPath(it,this.shape),it.toStatic(),this.__dirtyPath=!1),ue.path=ne(it,this.transform),ue.style.zIndex=Y(this.zlevel,this.z,this.z2),P(_e,ue),Ae.text!=null?this.drawRectText(_e,this.getBoundingRect()):this.removeRectText(_e)},l.prototype.onRemove=function(_e){U(_e,this._vmlEl),this.removeRectText(_e)},l.prototype.onAdd=function(_e){P(_e,this._vmlEl),this.appendRectText(_e)},b.prototype.brushVML=function(_e){var Ae,ue,ke,Pe,Ve=this.style,je=Ve.image;if(typeof(Ae=je)=="object"&&Ae.tagName&&Ae.tagName.toUpperCase()==="IMG"){var it=je.src;if(it===this._imageSrc)ue=this._imageWidth,ke=this._imageHeight;else{var rt=je.runtimeStyle,mt=rt.width,yt=rt.height;rt.width="auto",rt.height="auto",ue=je.width,ke=je.height,rt.width=mt,rt.height=yt,this._imageSrc=it,this._imageWidth=ue,this._imageHeight=ke}je=it}else je===this._imageSrc&&(ue=this._imageWidth,ke=this._imageHeight);if(je){var st=Ve.x||0,Qe=Ve.y||0,At=Ve.width,Xt=Ve.height,cn=Ve.sWidth,Sn=Ve.sHeight,Vn=Ve.sx||0,bn=Ve.sy||0,En=this._vmlEl;En||($(En=C.doc.createElement("div")),this._vmlEl=En);var pn=En.style,Un=!1,Pn=1,On=1;if(this.transform&&(Pn=m((Pe=this.transform)[0]*Pe[0]+Pe[1]*Pe[1]),On=m(Pe[2]*Pe[2]+Pe[3]*Pe[3]),Un=Pe[1]||Pe[2]),Un){var Ht=[st,Qe],Mt=[st+At,Qe],Gt=[st,Qe+Xt],Bt=[st+At,Qe+Xt];S(Ht,Ht,Pe),S(Mt,Mt,Pe),S(Gt,Gt,Pe),S(Bt,Bt,Pe);var Ge=N(Ht[0],Mt[0],Gt[0],Bt[0]),et=N(Ht[1],Mt[1],Gt[1],Bt[1]),vt=[];vt.push("M11=",Pe[0]/Pn,",","M12=",Pe[2]/On,",","M21=",Pe[1]/Pn,",","M22=",Pe[3]/On,",","Dx=",c(st*Pn+Pe[4]),",","Dy=",c(Qe*On+Pe[5])),pn.padding="0 "+c(Ge)+"px "+c(et)+"px 0",pn.filter=H+".Matrix("+vt.join("")+", SizingMethod=clip)"}else Pe&&(st=st*Pn+Pe[4],Qe=Qe*On+Pe[5]),pn.filter="",pn.left=c(st)+"px",pn.top=c(Qe)+"px";var wt=this._imageEl,Ct=this._cropEl;wt||(wt=C.doc.createElement("div"),this._imageEl=wt);var bt=wt.style;if(cn&&Sn){if(ue&&ke)bt.width=c(Pn*ue*At/cn)+"px",bt.height=c(On*ke*Xt/Sn)+"px";else{var Rt=new Image,Lt=this;Rt.onload=function(){Rt.onload=null,ue=Rt.width,ke=Rt.height,bt.width=c(Pn*ue*At/cn)+"px",bt.height=c(On*ke*Xt/Sn)+"px",Lt._imageWidth=ue,Lt._imageHeight=ke,Lt._imageSrc=je},Rt.src=je}Ct||((Ct=C.doc.createElement("div")).style.overflow="hidden",this._cropEl=Ct);var Dt=Ct.style;Dt.width=c((At+Vn*At/cn)*Pn),Dt.height=c((Xt+bn*Xt/Sn)*On),Dt.filter=H+".Matrix(Dx="+-Vn*At/cn*Pn+",Dy="+-bn*Xt/Sn*On+")",Ct.parentNode||En.appendChild(Ct),wt.parentNode!==Ct&&Ct.appendChild(wt)}else bt.width=c(Pn*At)+"px",bt.height=c(On*Xt)+"px",En.appendChild(wt),Ct&&Ct.parentNode&&(En.removeChild(Ct),this._cropEl=null);var Jt="",zt=Ve.opacity;zt<1&&(Jt+=".Alpha(opacity="+c(100*zt)+") "),bt.filter=Jt+=H+".AlphaImageLoader(src="+je+", SizingMethod=scale)",En.style.zIndex=Y(this.zlevel,this.z,this.z2),P(_e,En),Ve.text!=null&&this.drawRectText(_e,this.getBoundingRect())}},b.prototype.onRemove=function(_e){U(_e,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(_e)},b.prototype.onAdd=function(_e){P(_e,this._vmlEl),this.appendRectText(_e)};var le="normal",fe={},we=0,pe=document.createElement("div"),ve=function(_e){var Ae=fe[_e];if(!Ae){we>100&&(we=0,fe={});var ue,ke=pe.style;try{ke.font=_e,ue=ke.fontFamily.split(",")[0]}catch{}Ae={style:ke.fontStyle||le,variant:ke.fontVariant||le,weight:ke.fontWeight||le,size:0|parseFloat(ke.fontSize||12),family:ue||"Microsoft YaHei"},fe[_e]=Ae,we++}return Ae};f.$override("measureText",function(_e,Ae){var ue=C.doc;z||((z=ue.createElement("div")).style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",C.doc.body.appendChild(z));try{z.style.font=Ae}catch{}return z.innerHTML="",z.appendChild(ue.createTextNode(_e)),{width:z.offsetWidth}});for(var be=new _,Ee=function(_e,Ae,ue,ke){var Pe,Ve,je,it,rt,mt=this.style;this.__dirty&&y.normalizeTextStyle(mt,!0);var yt=mt.text;if(yt!=null&&(yt+=""),yt){if(mt.rich){var st=f.parseRichText(yt,mt);yt=[];for(var Qe=0;Qe<st.lines.length;Qe++){for(var At=st.lines[Qe].tokens,Xt=[],cn=0;cn<At.length;cn++)Xt.push(At[cn].text);yt.push(Xt.join(""))}yt=yt.join(`
`)}var Sn=mt.textAlign,Vn=mt.textVerticalAlign,bn=ve(mt.font),En=bn.style+" "+bn.variant+" "+bn.weight+" "+bn.size+'px "'+bn.family+'"';ue=ue||f.getBoundingRect(yt,En,Sn,Vn,mt.textPadding,mt.textLineHeight);var pn=this.transform;if(pn&&!ke&&(be.copy(Ae),be.applyTransform(pn),Ae=be),ke)Pe=Ae.x,Ve=Ae.y;else{var Un=mt.textPosition,Pn=mt.textDistance;if(Un instanceof Array)Pe=Ae.x+Z(Un[0],Ae.width),Ve=Ae.y+Z(Un[1],Ae.height),Sn=Sn||"left";else{var On=f.adjustTextPositionOnRect(Un,Ae,Pn);Pe=On.x,Ve=On.y,Sn=Sn||On.textAlign,Vn=Vn||On.textVerticalAlign}}Pe=f.adjustTextX(Pe,ue.width,Sn),Ve=f.adjustTextY(Ve,ue.height,Vn)+ue.height/2;var Ht=C.createNode,Mt=this._textVmlEl;Mt?it=(je=(rt=Mt.firstChild).nextSibling).nextSibling:(Mt=Ht("line"),je=Ht("path"),it=Ht("textpath"),rt=Ht("skew"),it.style["v-text-align"]="left",$(Mt),je.textpathok=!0,it.on=!0,Mt.from="0 0",Mt.to="1000 0.05",P(Mt,rt),P(Mt,je),P(Mt,it),this._textVmlEl=Mt);var Gt=[Pe,Ve],Bt=Mt.style;pn&&ke?(S(Gt,Gt,pn),rt.on=!0,rt.matrix=pn[0].toFixed(3)+","+pn[2].toFixed(3)+","+pn[1].toFixed(3)+","+pn[3].toFixed(3)+",0,0",rt.offset=(c(Gt[0])||0)+","+(c(Gt[1])||0),rt.origin="0 0",Bt.left="0px",Bt.top="0px"):(rt.on=!1,Bt.left=c(Pe)+"px",Bt.top=c(Ve)+"px"),it.string=String(yt).replace(/&/g,"&").replace(/"/g,""");try{it.style.font=En}catch{}re(Mt,"fill",{fill:mt.textFill,opacity:mt.opacity},this),re(Mt,"stroke",{stroke:mt.textStroke,opacity:mt.opacity,lineDash:mt.lineDash},this),Mt.style.zIndex=Y(this.zlevel,this.z,this.z2),P(_e,Mt)}},Re=function(_e){U(_e,this._textVmlEl),this._textVmlEl=null},Ne=function(_e){P(_e,this._textVmlEl)},Le=[d,v,b,l,s],Se=0;Se<Le.length;Se++){var Ie=Le[Se].prototype;Ie.drawRectText=Ee,Ie.removeRectText=Re,Ie.appendRectText=Ne}s.prototype.brushVML=function(_e){var Ae=this.style;Ae.text!=null?this.drawRectText(_e,{x:Ae.x||0,y:Ae.y||0,width:0,height:0},this.getBoundingRect(),!0):this.removeRectText(_e)},s.prototype.onRemove=function(_e){this.removeRectText(_e)},s.prototype.onAdd=function(_e){this.appendRectText(_e)}}},50837:function(E,A,u){u(26026),(0,u(98709).registerPainter)("vml",u(95057))},98709:function(E,A,u){var o=u(46490),S=u(23584),_=u(23405),p=u(38109),f=u(39723),y=u(15982),d=u(75276),v=u(67313),b=!S.canvasSupported,s={canvas:y},l={},w=function(I,C,h){h=h||{},this.dom=C,this.id=I;var c=this,m=new f,T=h.renderer;if(b){if(!s.vml)throw Error("You need to require 'zrender/vml/vml' to support IE8");T="vml"}else T&&s[T]||(T="canvas");var D=new s[T](C,m,h,I);this.storage=m,this.painter=D;var O=S.node||S.worker?null:new v(D.getViewportRoot());this.handler=new p(m,D,O,D.root),this.animation=new d({stage:{update:_.bind(this.flush,this)}}),this.animation.start(),this._needsRefresh;var N=m.delFromStorage,z=m.addToStorage;m.delFromStorage=function(H){N.call(m,H),H&&H.removeSelfFromZr(c)},m.addToStorage=function(H){z.call(m,H),H.addSelfToZr(c)}};w.prototype={constructor:w,getId:function(){return this.id},add:function(I){this.storage.addRoot(I),this._needsRefresh=!0},remove:function(I){this.storage.delRoot(I),this._needsRefresh=!0},configLayer:function(I,C){this.painter.configLayer&&this.painter.configLayer(I,C),this._needsRefresh=!0},setBackgroundColor:function(I){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(I),this._needsRefresh=!0},refreshImmediately:function(){this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1},refresh:function(){this._needsRefresh=!0},flush:function(){var I;this._needsRefresh&&(I=!0,this.refreshImmediately()),this._needsRefreshHover&&(I=!0,this.refreshHoverImmediately()),I&&this.trigger("rendered")},addHover:function(I,C){if(this.painter.addHover){var h=this.painter.addHover(I,C);return this.refreshHover(),h}},removeHover:function(I){this.painter.removeHover&&(this.painter.removeHover(I),this.refreshHover())},clearHover:function(){this.painter.clearHover&&(this.painter.clearHover(),this.refreshHover())},refreshHover:function(){this._needsRefreshHover=!0},refreshHoverImmediately:function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.refreshHover()},resize:function(I){I=I||{},this.painter.resize(I.width,I.height),this.handler.resize()},clearAnimation:function(){this.animation.clear()},getWidth:function(){return this.painter.getWidth()},getHeight:function(){return this.painter.getHeight()},pathToImage:function(I,C){return this.painter.pathToImage(I,C)},setCursorStyle:function(I){this.handler.setCursorStyle(I)},findHover:function(I,C){return this.handler.findHover(I,C)},on:function(I,C,h){this.handler.on(I,C,h)},off:function(I,C){this.handler.off(I,C)},trigger:function(I,C){this.handler.trigger(I,C)},clear:function(){this.storage.delRoot(),this.painter.clear()},dispose:function(){var I;this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,I=this.id,delete l[I]}},A.version="4.0.7",A.init=function(I,C){var h=new w(o(),I,C);return l[h.id]=h,h},A.dispose=function(I){if(I)I.dispose();else{for(var C in l)l.hasOwnProperty(C)&&l[C].dispose();l={}}return this},A.getInstance=function(I){return l[I]},A.registerPainter=function(I,C){s[I]=C}}},F={};function B(E){var A=F[E];if(A!==void 0)return A.exports;var u=F[E]={exports:{}};return k[E].call(u.exports,u,u.exports,B),u.exports}B.n=E=>{var A=E&&E.__esModule?()=>E.default:()=>E;return B.d(A,{a:A}),A},B.d=(E,A)=>{for(var u in A)B.o(A,u)&&!B.o(E,u)&&Object.defineProperty(E,u,{enumerable:!0,get:A[u]})},B.g=(()=>{if(typeof globalThis=="object")return globalThis;try{return this||Function("return this")()}catch{if(typeof window=="object")return window}})(),B.o=(E,A)=>Object.prototype.hasOwnProperty.call(E,A),B.r=E=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(E,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(E,"__esModule",{value:!0})};var G={};(()=>{let E,A,u,o,S;B.r(G),B.d(G,{init:()=>Vue,print:()=>$ue,destroy:()=>TW,setZoom:()=>zue,updateHighlight:()=>Uue,updateSize:()=>Wue,scrollOffset:()=>Hue});var _,p,f,y={};B.r(y),B.d(y,{calc:()=>gs,data:()=>ps,div0:()=>gr,error:()=>Bu,loading:()=>vh,na:()=>It,name:()=>Do,nil:()=>Dl,num:()=>ot,ref:()=>co,spill:()=>mc,value:()=>Xe});var d={};B.r(d),B.d(d,{columnIndexToLabel:()=>Nl,columnLabelToIndex:()=>Ia,coordToLabel:()=>Bi,coordToR1C1:()=>Pl,escapeSheetName:()=>ul,extractSheetName:()=>vs,extractString:()=>Fu,rowIndexToLabel:()=>Ol,rowLabelToIndex:()=>tu});var v={};B.r(v),B.d(v,{absoluteFormula:()=>ud,changeFormula:()=>Vg,changeFormulaKeepSheet:()=>mf,changeFormulaRange:()=>AT,changeRefMode:()=>kT,deabsoluteToken:()=>av,fromA1ToR1C1:()=>cl,fromR1C1ToA1:()=>Fb,getFormulaBound:()=>MT,isFormulaAbsolute:()=>Hg,labelToCoord:()=>bs,moveFormula:()=>RT,rangeToBound:()=>ld,rangeToCoords:()=>wh,removeFormulaRange:()=>vc,transposeR1C1:()=>ET});var b={};B.r(b),B.d(b,{CHAR:()=>zu,CLEAN:()=>e0,CODE:()=>_v,CONCAT:()=>Sv,CONCATENATE:()=>t0,DOLLAR:()=>FT,EXACT:()=>VT,FIND:()=>n0,FIXED:()=>r0,HTML2TEXT:()=>HT,LEFT:()=>i0,LEN:()=>o0,LOWER:()=>Ts,MID:()=>uu,PROPER:()=>$T,REGEXEXTRACT:()=>zT,REGEXMATCH:()=>Kg,REGEXREPLACE:()=>pd,REPLACE:()=>a0,REPT:()=>ks,RIGHT:()=>WT,SEARCH:()=>s0,SPLIT:()=>md,SUBSTITUTE:()=>Ef,T:()=>l0,TEXT:()=>u0,TRIM:()=>h0,UNICHAR:()=>Xg,UNICODE:()=>c0,UPPER:()=>Jg,VALUE:()=>Iv});var s={};B.r(s),B.d(s,{BESSELI:()=>tp,BESSELJ:()=>d0,BESSELK:()=>xv,BESSELY:()=>UT,BIN2DEC:()=>f0,BIN2HEX:()=>Wu,BIN2OCT:()=>g0,BITAND:()=>p0,BITLSHIFT:()=>GT,BITOR:()=>m0,BITRSHIFT:()=>jT,BITXOR:()=>qT,COMPLEX:()=>Di,CONVERT:()=>Tv,DEC2BIN:()=>kv,DEC2HEX:()=>Rv,DEC2OCT:()=>np,DELTA:()=>vd,ERF:()=>or,ERFC:()=>Af,GESTEP:()=>Ev,HEX2BIN:()=>_c,HEX2DEC:()=>YT,HEX2OCT:()=>Av,IMABS:()=>rp,IMAGINARY:()=>xr,IMARGUMENT:()=>Mv,IMCONJUGATE:()=>KT,IMCOS:()=>Dv,IMCOSH:()=>XT,IMCOT:()=>v0,IMCSC:()=>nk,IMCSCH:()=>rk,IMDIV:()=>Ov,IMEXP:()=>JT,IMLN:()=>ZT,IMLOG10:()=>Uu,IMLOG2:()=>Qa,IMPOWER:()=>Nv,IMPRODUCT:()=>QT,IMREAL:()=>Ti,IMSEC:()=>ek,IMSECH:()=>tk,IMSIN:()=>yd,IMSINH:()=>y0,IMSQRT:()=>w0,IMSUB:()=>ik,IMSUM:()=>ok,IMTAN:()=>b0,OCT2BIN:()=>C0,OCT2DEC:()=>ak,OCT2HEX:()=>Pv});var l={};B.r(l),B.d(l,{ERROR:()=>wd,ISBINARY:()=>_0,ISBLANK:()=>Bv,ISERR:()=>ip,ISERROR:()=>bd,ISEVEN:()=>hu,ISLOGICAL:()=>Th,ISNA:()=>sk,ISNONTEXT:()=>S0,ISNUMBER:()=>op,ISODD:()=>lk,ISTEXT:()=>I0,N:()=>uk,NA:()=>hk,TYPE:()=>ck});var w={};B.r(w),B.d(w,{AND:()=>dk,CHOOSE:()=>fk,FALSE:()=>gk,IF:()=>pk,IFERROR:()=>x0,IFNA:()=>T0,IFS:()=>mk,NOT:()=>k0,OR:()=>vk,SWITCH:()=>R0,TRUE:()=>yk,XOR:()=>wk});var I={};B.r(I),B.d(I,{getSortOrder:()=>Wv});var C={};B.r(C),B.d(C,{findUnique:()=>B0});var h={};B.r(h),B.d(h,{FILTER:()=>Lk,FLATTEN:()=>Vk,HLOOKUP:()=>Dk,IMPORTRANGE:()=>Hk,MATCH:()=>Mk,SORT:()=>Pk,SORTBY:()=>Bk,TRANSPOSE:()=>Fk,UNIQUE:()=>lp,VLOOKUP:()=>Ok,XLOOKUP:()=>Nk});var c={};B.r(c),B.d(c,{AVEDEV:()=>Wk,AVERAGE:()=>Ic,AVERAGEA:()=>hp,BETA:()=>cp,BETADIST:()=>Uk,BETAINV:()=>$0,BINOM:()=>Nf,BINOMDIST:()=>Pf,CHIDIST:()=>jk,CHIINV:()=>qk,CHISQ:()=>Gu,CHITEST:()=>Yk,COLUMN:()=>Kk,COLUMNS:()=>Xk,CONFIDENCE:()=>dp,CORREL:()=>Jk,COUNT:()=>Xv,COUNTA:()=>Jv,COUNTBLANK:()=>Zk,COUNTIN:()=>fp,COUNTUNIQUE:()=>z0,COVAR:()=>U0,COVARIANCE:()=>W0,CRITBINOM:()=>Gk,DEVSQ:()=>G0,EXPON:()=>pp,EXPONDIST:()=>Qk,F:()=>fu,FDIST:()=>eR,FINV:()=>mp,FISHER:()=>tR,FISHERINV:()=>nR,FORECAST:()=>yp,FREQUENCY:()=>j0,FTEST:()=>vp,GAMMA:()=>Bf,GAMMADIST:()=>rR,GAMMAINV:()=>iR,GAMMALN:()=>q0,GAUSS:()=>oR,GEOMEAN:()=>aR,GROWTH:()=>sR,HARMEAN:()=>lR,HYPGEOM:()=>Zv,HYPGEOMDIST:()=>uR,INTERCEPT:()=>hR,KURT:()=>cR,LARGE:()=>gl,LINEST:()=>Qv,LOGEST:()=>dR,LOGINV:()=>fR,LOGNORM:()=>Vl,LOGNORMDIST:()=>Tr,MAX:()=>Aa,MAXA:()=>_o,MEDIAN:()=>Y0,MIN:()=>gu,MINA:()=>gR,MODE:()=>Id,NEGBINOM:()=>ey,NEGBINOMDIST:()=>pR,NORM:()=>Lf,NORMDIST:()=>K0,NORMINV:()=>wp,NORMSDIST:()=>ju,NORMSINV:()=>ty,PEARSON:()=>Gi,PERCENTILE:()=>Rh,PERCENTRANK:()=>ny,PERMUT:()=>mR,PERMUTATIONA:()=>vR,PHI:()=>yR,POISSON:()=>ry,PROB:()=>J0,QUARTILE:()=>xc,RANK:()=>Cp,ROW:()=>Z0,ROWS:()=>_p,RSQ:()=>js,SKEW:()=>Tc,SLOPE:()=>wR,SMALL:()=>Q0,STANDARDIZE:()=>bR,STDEV:()=>qu,STDEVA:()=>Yu,STDEVP:()=>eC,STDEVPA:()=>Br,STDEVS:()=>iy,STEYX:()=>tC,T:()=>so,TDIST:()=>nC,TINV:()=>CR,TREND:()=>_R,TRIMMEAN:()=>rC,TTEST:()=>wi,VAR:()=>kc,VARA:()=>iC,VARP:()=>Td,VARPA:()=>oC,VARS:()=>Sp,WEIBULL:()=>oy,Z:()=>SR,ZTEST:()=>aC});var m={};B.r(m),B.d(m,{ABS:()=>IR,ACOS:()=>xR,ACOSH:()=>TR,ACOT:()=>kR,ACOTH:()=>ay,ADD:()=>pC,AGGREGATE:()=>RR,ARABIC:()=>sy,ASIN:()=>ER,ASINH:()=>AR,ATAN:()=>MR,ATAN2:()=>ia,ATANH:()=>Rs,BASE:()=>DR,CEILING:()=>Rc,COMBIN:()=>Ec,COMBINA:()=>OR,COS:()=>NR,COSH:()=>PR,COT:()=>lC,COTH:()=>BR,CSC:()=>LR,CSCH:()=>FR,DECIMAL:()=>uC,DEGREES:()=>hC,DIVIDE:()=>gE,EQ:()=>yE,EVEN:()=>VR,EXP:()=>HR,FACT:()=>Eh,FACTDOUBLE:()=>function n(e){if((e=Fe(e))instanceof Error)return e;let t=Math.floor(e);return t<0?ot:t===0||t===1?1:t*n(t-2)},FLOOR:()=>kd,GCD:()=>$R,GTE:()=>dy,INT:()=>zR,ISO:()=>WR,LCM:()=>UR,LN:()=>cC,LOG:()=>dC,LOG10:()=>GR,LT:()=>mE,LTE:()=>vE,MINUS:()=>fE,MOD:()=>jR,MROUND:()=>qR,MULTINOMIAL:()=>YR,MULTIPLY:()=>pE,NE:()=>Es,ODD:()=>KR,PI:()=>XR,POW:()=>fy,POWER:()=>fC,PRODUCT:()=>uy,QUOTIENT:()=>JR,RADIANS:()=>ZR,RAND:()=>QR,RANDARRAY:()=>eE,RANDBETWEEN:()=>tE,ROMAN:()=>nE,ROUND:()=>rE,ROUNDDOWN:()=>iE,ROUNDUP:()=>oE,SEC:()=>aE,SECH:()=>sE,SEQUENCE:()=>xE,SERIESSUM:()=>lE,SIGN:()=>uE,SIN:()=>hE,SINH:()=>cE,SQRT:()=>dE,SQRTPI:()=>cy,SUBTOTAL:()=>gC,SUM:()=>Ff,SUMPRODUCT:()=>wE,SUMSQ:()=>bE,SUMX2MY2:()=>CE,SUMX2PY2:()=>gy,SUMXMY2:()=>_E,TAN:()=>py,TANH:()=>SE,TRUNC:()=>IE});var T={};B.r(T),B.d(T,{DATE:()=>kE,DATEDIF:()=>Ue,DATEVALUE:()=>RE,DAY:()=>my,DAYS:()=>vy,DAYS360:()=>EE,EDATE:()=>AE,EOMONTH:()=>ME,HOUR:()=>DE,INTERVAL:()=>OE,ISOWEEKNUM:()=>yC,MINUTE:()=>NE,MONTH:()=>PE,NETWORKDAYS:()=>yy,NOW:()=>BE,SECOND:()=>LE,TIME:()=>FE,TIMEVALUE:()=>VE,TODAY:()=>HE,WEEKDAY:()=>$E,WEEKNUM:()=>zE,WORKDAY:()=>wy,YEAR:()=>j,YEARFRAC:()=>xe,_DAYS:()=>Ah,_YEARFRAC:()=>Be});var D={};B.r(D),B.d(D,{ACCRINT:()=>Je,CUMIPMT:()=>tt,CUMPRINC:()=>ct,DB:()=>$t,DDB:()=>Wt,DOLLARDE:()=>Qt,DOLLARFR:()=>Tn,EFFECT:()=>Qn,FV:()=>tr,FVSCHEDULE:()=>Fr,IPMT:()=>cr,IRR:()=>Kr,ISPMT:()=>ni,MIRR:()=>qs,NOMINAL:()=>es,NPER:()=>Ys,NPV:()=>So,PDURATION:()=>Hl,PMT:()=>Ks,PPMT:()=>_C,PV:()=>mte,RATE:()=>vte,RRI:()=>yte,SLN:()=>wte,SYD:()=>bte,TBILLEQ:()=>Cte,TBILLPRICE:()=>_te,TBILLYIELD:()=>Ste,XIRR:()=>Ite,XNPV:()=>xte});var O={};B.r(O),B.d(O,{ADDRESS:()=>Mte,HYPERLINK:()=>Tte,INDEX:()=>Ate,INDIRECT:()=>Rte,ISDATE:()=>Ete,OFFSET:()=>kte});var N={};B.r(N),B.d(N,{JOIN:()=>Ote,NUMBERS:()=>Nte,REFERENCE:()=>Dte});var z={};B.r(z),B.d(z,{AVERAGEIF:()=>Vte,AVERAGEIFS:()=>Hte,COUNTIF:()=>Pte,COUNTIFS:()=>Bte,MAXIFS:()=>$te,MINIFS:()=>zte,SUMIF:()=>Fte,SUMIFS:()=>Lte});var H={};B.r(H),B.d(H,{equal:()=>Cy,greaterThan:()=>jE,greaterThanOrEqual:()=>W5,lessThan:()=>GE,lessThanOrEqual:()=>z5,not:()=>U5});var $={};B.r($),B.d($,{createAddHyperlinkCommand:()=>KA,createAddValidationRangeCommand:()=>qV,createAdjustChartCommand:()=>c_,createAutofillDataCommand:()=>WA,createAutofillNumberFormatCommand:()=>WV,createCellValueCommand:()=>zA,createClearCommentCommand:()=>a8,createClearRangeDataCommand:()=>Bd,createClearRangeRelatedCommand:()=>Kf,createCommentStatusCommand:()=>ZA,createCompoundCommand:()=>qf,createCreateCfCommand:()=>Wy,createCreateCommentCommand:()=>ZV,createCreateDefineCommand:()=>eM,createCreateFilterCommand:()=>GA,createCreateFilterViewCommand:()=>r_,createCreateJsonCommentCommand:()=>e8,createCreateRuleCommand:()=>nM,createCreateValidationCommand:()=>jA,createCreateWorksheetCommand:()=>__,createDeleteWorksheetCommand:()=>S_,createDimensionStyleCommand:()=>Fh,createDupWorksheetCommand:()=>f8,createEditCommentCommand:()=>p_,createEditJsonCommentCommand:()=>i8,createEnableFilterCommand:()=>vu,createExpandFilterRangeCommand:()=>jV,createFixColumnCommand:()=>GV,createFixCommand:()=>zy,createFixRowCommand:()=>UV,createFormatCommand:()=>zV,createGlobalStyleCommand:()=>$y,createGroupCommand:()=>XA,createHiddenCommand:()=>Wl,createInsertChartCommand:()=>qA,createInsertImageCommand:()=>jy,createInsertRowColCommand:()=>Gp,createMergeCommand:()=>t_,createModifyDefineCommand:()=>v_,createModifyDrawingsByInsertCommand:()=>KV,createModifyDrawingsByMoveCommand:()=>YA,createModifyDrawingsByRemoveCommand:()=>XV,createMoveCommand:()=>jp,createMoveFormulaRangeCommand:()=>Xf,createMoveRangeCommand:()=>JV,createNoteCommand:()=>Vy,createOpenJsonCommentCommand:()=>n8,createPasteAutofillDataCommand:()=>UA,createPasteCommentCommand:()=>o8,createPivotCompoundCommand:()=>Vh,createPivotTableCommand:()=>Jf,createRemoveAllValidationCommand:()=>o_,createRemoveCfCommand:()=>Uy,createRemoveChartCommand:()=>u_,createRemoveDefineCommand:()=>tM,createRemoveExternalLinksCommand:()=>QA,createRemoveFormulaRangeCommand:()=>qp,createRemoveImageCommand:()=>l_,createRemoveInternalLinkCommand:()=>qy,createRemoveRowColCommand:()=>e_,createRemoveRuleCommand:()=>rM,createRemoveValidationCommand:()=>YV,createRenameWorksheetCommand:()=>I_,createReorderWorksheetCommand:()=>x_,createReplyCommentCommand:()=>QV,createReplyJsonCommentCommand:()=>t8,createResizeChartCommand:()=>h_,createResizeColumnCommand:()=>$V,createResizeCommand:()=>Hy,createResizeImageCommand:()=>s_,createResizeRowCommand:()=>HV,createResolveJsonCommentCommand:()=>r8,createServerCreatePivotWorksheetCommand:()=>h8,createServerCreateWithData:()=>c8,createServerCreateWorksheetCommand:()=>u8,createServerDupWorksheetCommand:()=>d8,createSetActiveFilterViewCommand:()=>Yf,createSetChartConfigCommand:()=>d_,createSetCollapseCommand:()=>Ky,createSetFilterCommand:()=>Nd,createSetWorksheetColorCommand:()=>tw,createSetWorksheetHiddenCommand:()=>ew,createSetWorksheetRtlCommand:()=>g_,createSortCommand:()=>Gy,createStyleCommand:()=>zl,createUndeleteWorksheetCommand:()=>g8,createUngroupCommand:()=>Yy,createUnmergeOverlapsCommand:()=>n_,createUpdateCfRangesCommand:()=>a_,createUpdateExternalLinksCommand:()=>m_,createUpdateFilterRangeCommand:()=>Pd,createUpdateFilterViewNameCommand:()=>i_,createUpdateGroupCommand:()=>JA,createUpdateHyperlinkCommand:()=>f_,createUpdateRuleCommand:()=>Xy,createValueCommand:()=>mu,deletePivotTableCommand:()=>Zu,groupPivotFieldItemsCommand:()=>iM,insertPivotDataFieldCommand:()=>Zy,isCreateRuleCommand:()=>s8,isRemoveRuleCommand:()=>Sre,isUpdateRuleCommand:()=>l8,movePivotAxisFieldCommand:()=>Ld,movePivotDataFieldCommand:()=>w_,movePivotTableCommand:()=>Jy,removePivotDataFieldCommand:()=>Kp,setPivotDataFieldAttrCommand:()=>b_,setPivotFieldAttrCommand:()=>Xp,setPivotFieldDatetimeGroupCommand:()=>Qy,setPivotFieldItemAttrCommand:()=>Jp,setPivotFieldNumberGroupCommand:()=>C_,setPivotTableCaptionCommand:()=>y_,ungroupPivotFieldItemsCommand:()=>oM,updatePivotTableCommand:()=>Yp});var V={};B.r(V),B.d(V,{BLANK_AS:()=>mm,CHART_TYPE:()=>Po,DEFAULT:()=>rs,DIRECTION:()=>tse,GROUPING:()=>tD,LABEL_POSITION:()=>rse,LEGEND_POSITION:()=>nse,LINE_DASH:()=>ise,MARKER_SYMBOL:()=>Uh,ORIENTATION:()=>o1});var P={};function U(n){let e=0,t=[];if(!n||!n.length)return t;for(;n[e];)t.push(n[e]),e++;return t}if(B.r(P),B.d(P,{PLOT_STYLE:()=>mo,ensureString:()=>l1,getFontHeight:()=>ag,isDefined:()=>Gh,isEmpty:()=>a1,isFunction:()=>Z9,isNumber:()=>To,isString:()=>Q9,parseHexColor:()=>nD,trimArray:()=>s1}),document.documentElement.classList){let n=function(){let e=document.createElement("div");return e.classList.add("test","test2"),e.classList.contains("test2")}();E=function(e,t){return t!==""&&e.classList.contains(t)},A=function(e,t){let r=0;if(typeof t=="string"&&(t=t.split(" ")),t=U(t),n)e.classList.add(...t);else for(;t&&t[r];)e.classList.add(t[r]),r++},u=function(e,t){let r=0;if(typeof t=="string"&&(t=t.split(" ")),t=U(t),n)e.classList.remove(...t);else for(;t&&t[r];)e.classList.remove(t[r]),r++}}else{let n=function(e){return RegExp("(\\s|^)"+e+"(\\s|$)")};E=function(e,t){return!!e.className.match(n(t))},A=function(e,t){let r=0,i=e.className;if(typeof t=="string"&&(t=t.split(" ")),i==="")i=t.join(" ");else for(;t&&t[r];)n(t[r]).test(i)||(i+=" "+t[r]),r++;e.className=i},u=function(e,t){let r=0,i=e.className;for(typeof t=="string"&&(t=t.split(" "));t&&t[r];)i=i.replace(n(t[r])," ").trim(),r++;e.className!==i&&(e.className=i)}}function Y(n){let e;for(;e=n.lastChild;)n.removeChild(e)}let Z=!!document.createTextNode("test").textContent;function X(n){let e=n;for(;e!==document.documentElement;){if(e===null)return!1;if(e.nodeType===Node.DOCUMENT_FRAGMENT_NODE)if(e.host){if(e.host.impl)return X(e.host.impl);if(e.host)return X(e.host);throw Error("Lost in Web Components world")}else return!1;if(e.style.display==="none")return!1;e=e.parentNode}return!0}let J={BACKSPACE:8,INSERT:45,DELETE:46,END:35,ENTER:13,ESCAPE:27,HOME:36,PAGE_DOWN:34,PAGE_UP:33,TAB:9,ARROW_RIGHT:39,ARROW_LEFT:37,ARROW_UP:38,ARROW_DOWN:40,F2:113,F4:115,A:65,C:67,S:83,V:86,X:88,Y:89,Z:90};function q(n){n.isViewEventEnabled=!1}function te(n){return n.isViewEventEnabled===!1}function re(n,e,t){t===void 0&&(t="left top");let r=n.style;e===1?(r.transform="",r.transformOrigin=""):(r.transform="scale("+e+")",r.transformOrigin=t)}function ie(n,e){let t=document.createElement("div");return t.className=e,n.appendChild(t),t}let ne=ht(),le=/^[\w!#$%&'*+\-/=?^`{|}~."\\,()<>]+@[\w&%!#+\-.]+$/;function fe(n){return n.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function we(n){return n[0].toUpperCase()+n.substr(1)}function pe(){function n(){return Math.floor((1+Math.random())*65536).toString(16).substring(1)}return n()+n()+n()+n()}function ve(n){let e=n.length-1;for(;e>=0&&(n[e]<"0"||"9"<n[e]&&n[e]<"a"||"e"<n[e]);)e--;return e===-1?Array(n.length+1).join("0"):n.substr(0,e)+(parseInt(n[e],16)+1).toString(16)+Array(n.length-e).join("0")}function be(n,e){return!(!n||e&&e.getQuotePrefix())&&n[0]==="="}function Ee(n){return/^"(?:""|[^"])*"$/.test(n)}function Re(n){return!!n&&typeof n=="string"&&!Ee(n)}function Ne(n){return!n||n===0||n.toLowerCase()==="general"}function Le(n){return/^[#0]+(?:\.[#0]+)?%$/.test(n)}function Se(n){return n.replace(/[\x00-\x09\x0B\x0C\x0E-\x1F\x7F-\x9F]/g,"")}function Ie(n){return n.replace(/\xA0/g," ")}function _e(n,e){let t=e.find(r=>{let[i,a]=r;return a instanceof RegExp?a.test(n):typeof a=="function"&&a(n)});return t?t[0]:null}let Ae=typeof navigator>"u"?"node":_e(navigator.userAgent,[["opera",/opera/i],["chrome",/chrome/i],["safari",/safari/i],["firefox",/gecko\/\d/i]]);function ue(){return Ae==="safari"}function ke(){return Ae==="firefox"}let Pe=typeof navigator>"u"?null:_e(navigator.userAgent,[["ios",()=>/iPhone|iPad|iPod/i.test(navigator.platform)],["ipad",()=>/MacIntel/i.test(navigator.platform)&&navigator.maxTouchPoints>1],["android",/android/i],["windows",/windows|win32/i],["linux",/linux/i],["mac",/Mac_PowerPC|Macintosh/i]]);function Ve(){return Pe==="android"}function je(){return Pe==="mac"}(function(){if(typeof performance>"u")return;let n=performance.getEntriesByType?.("navigation")[0]||performance.getEntries?.()[0];n&&n.nextHopProtocol})();let it=typeof navigator<"u"&&/mobile/i.test(navigator.userAgent);function rt(){return it||Pe==="ios"||Ve()}function mt(n,e){return e.nodeType===3&&(e=e.parentNode),n.contains(e)}let yt=class{constructor(n){this.editor=n,this.lastRange=null}save(){return this.lastRange=this.getRange(),this.lastRange}restore(){this.lastRange&&this.setRange(this.lastRange)}getSavedRange(){return this.lastRange}getRange(){let n=this._getCurrentRange();if(!n||!this.isSelectionInEditor())return null;let e=this._offsetToPos(n.startContainer,n.startOffset),t=e;return!(n.collapsed||n.startContainer===n.endContainer&&n.startOffset===n.endOffset)&&(t=this._offsetToPos(n.endContainer,n.endOffset))<e&&([e,t]=[t,e]),{start:e,end:t}}setRange(n){let e=document.createRange(),t=this.editor.getEl().lastChild;if(t===null)return;t.tagName!=="BR"&&(t=null);let r=!1,i=!1,{start:a,end:g}=n,R=a===g;function L(Q,oe){oe>=0&&e[r?"setEnd":"setStart"](Q,oe)}function W(Q,oe,se,he){let me=(oe===0||he<oe)&&oe<=he+se;if(!(i||me))return!1;if(me&&oe===he+se&&!R)return i=!0,!1;if(Q.nodeType===3)return L(Q,i?0:oe-he),!0;if(Q.tagName==="BR"){if(Q===t||i)return L(Q.parentNode,Array.prototype.indexOf.call(Q.parentNode.childNodes,Q)),!0;i=!0}}this.editor.iterateNodes((Q,oe,se)=>{let he=oe.length;if(!r&&W(Q,a,he,se)&&(i=!1,r=!0),r&&W(Q,g,he,se))return i=!1,!1});let K=window.getSelection();K.removeAllRanges(),K.addRange(e)}_offsetToPos(n,e){let t=0,r=n.nodeType===3,i=n,a=this.editor.getEl();if(!r&&n.childNodes.length>0)if(e<n.childNodes.length)i=n.childNodes[e];else if(n===a)i=null;else{let g=n;for(;g.parentNode!==a&&g.nextSibling===null;)g=g.parentNode;i=g.nextSibling}return i?this.editor.iterateNodes((g,R,L)=>{if(g===i)return t=L+(r?e:0),!1},!0):t=this.editor.getText().length,t}setCaretToLast(){let n=document.createRange(),e=this.editor.getEl(),t=e.lastChild;t?t.tagName==="BR"?n.setStartBefore(t):n.setStartAfter(t):n.setStart(e,0);let r=window.getSelection();r.removeAllRanges(),r.addRange(n)}_getCurrentRange(){let n=window.getSelection();if(n.rangeCount!==0)return n.getRangeAt(0)}getStartContainer(){let n=this._getCurrentRange();return n&&n.startContainer}deleteContents(){let n=this._getCurrentRange();n&&n.deleteContents()}shift(n){this.lastRange&&(this.lastRange.start+=n,this.lastRange.end+=n)}isSelectionInEditor(){let n=this._getCurrentRange();return n&&mt(this.editor.getEl(),n.startContainer)&&(n.collapsed||mt(this.editor.getEl(),n.endContainer))}toString(){let n=this._getCurrentRange();return n&&n.toString()}};class st{constructor(){this.range=null,this.input=null}save(e,t){this.range={...e},this.input=t}restore(){this.range&&(this.input?.setSelection(this.range),this.clear())}clear(){this.range=null,this.input=null}hasRange(){return!!this.range&&!!this.input}}let Qe={DEFAULT_ROW_COUNT:100,DEFAULT_COL_COUNT:30,ROW_HEIGHT:21,COL_WIDTH:101,MIN_COL_WIDTH:20,MAX_COL_WIDTH:2e3,MIN_ROW_HEIGHT:21,MAX_ROW_HEIGHT:2e3,ROW_HEADER_WIDTH:50,COL_HEADER_HEIGHT:25,SCHEMA_VERSION:5,DEFAULT_FONT_SIZE:10,DEFAULT_FONT_NAME:"Arial",DEFAULT_FONT_COLOR:"000000",DEFAULT_FILL_COLOR:"FFFFFF",HYPER_LINK_COLOR:"0086E5",PIVOT_TABLE_SIZE_WITH_ROW_COL_FIELD_COUNT_LIMIT:1e4,PIVOT_TABLE_MAX_ROW_COL_FIELD_COUNT:4,PIVOT_TABLE_MAX_SOURCE_SIZE:1e6,PIVOT_TABLE_MAX_ROW_COL_ITEM_COUNT:2e5,PIVOT_TABLE_MAX_CELL_COUNT:1e6};var At=B(63711),Xt=B.n(At),cn=B(94167),Sn=B.n(cn);function Vn(n){if(!n||["initial","transparent"].includes(n))return null;if(["windowtext"].includes(n))return"000000";try{let e=Xt().get(n);if(e===null||e.value[e.value-1]===0)return null;let t=e.model==="rgb"?e.value:Sn()[e.model].rgb(e.value);return Sn().rgb.hex(t)}catch{return null}}function bn(n,e){let t,r={font:null,fill:null,alignment:null,border:null,numberFormat:null,quotePrefix:n.getAttribute("data-syno-quote")==="true"},i=n.getAttribute("data-syno-numberformat");i&&(r.numberFormat={fc:i});let a=n.style;if(!a||!a.length)return r;let g=pn(n,e),R={},L={},W=null,K=Un(n);if((t=Vn(a.backgroundColor))!==null&&(R.bg=t),a.textAlign)switch(a.textAlign){case"center":L.halign="center";break;case"left":case"start":L.halign="left";break;case"right":case"end":L.halign="right"}a.verticalAlign&&["top","middle","bottom"].includes(a.verticalAlign)&&(L.valign=a.verticalAlign);let Q=n.getAttribute("style")?.match(/white-space:\s*([^;\s]+)\s*;/);if(a.whiteSpace||Q){let oe=a.whiteSpace||Q&&Q[1];oe==="clip"?L.wrap="clip":(oe==="normal"||oe==="pre-wrap")&&(L.wrap="wrap")}return g&&Object.keys(g).length!==0||(g=null),Object.keys(R).length===0&&(R=null),Object.keys(L).length===0&&(L=null),K&&(W={b:K}),r.font=g,r.fill=R,r.alignment=L,r.border=W,r}function En(n){let e={B:"bold",I:"italic",S:"strike",U:"underline"}[n.tagName];return e?{[e]:!0}:null}function pn(n,e){let t;if(!n.hasAttribute("style"))return null;let r=n.style,i={};if(n.tagName==="TH"||["bold","bolder","700","800","900"].includes(r.fontWeight)?i.bold=!0:r.fontWeight&&(i.bold=!1),r.fontStyle&&(i.italic=r.fontStyle.includes("italic")),(r.textDecoration||r.textDecorationLine)&&(i.strike=(t=r.textDecoration||r.textDecorationLine).includes("line-through"),i.underline=t.includes("underline")),(t=function(a){let g;if(!a)return null;if(g=a.match(/^((?:\d*\.)?\d+)(px|pt|%)$/)){let R=parseFloat(g[1]);switch(g[2]){case"pt":return Math.round(R);case"px":return Math.round(.75*R);case"%":return Math.round(R/100*Qe.DEFAULT_FONT_SIZE)}}return null}(r.fontSize))!==null&&(i.size=t),r.fontFamily){t=r.fontFamily.split(/,\s*/);for(let a=0;a<t.length;a++){t[a]=function(R){let L=R.length-1;return R.charAt(0)==='"'&&R.charAt(L)==='"'||R.charAt(0)==="'"||R.charAt(L)==="'"?R.slice(1,L):R}(t[a]).toLocaleLowerCase();let g=e(t[a]);if(g){i.name=g;break}}}return(t=Vn(r.color))!==null&&(i.color=t),i}function Un(n){let e,t=n.style,r=[null,null,null,null];return(e=Vn(t.borderTopColor))!==null&&(r[0]="#"+e),(e=Vn(t.borderRightColor))!==null&&(r[1]="#"+e),(e=Vn(t.borderBottomColor))!==null&&(r[2]="#"+e),(e=Vn(t.borderLeftColor))!==null&&(r[3]="#"+e),r[0]===null&&r[1]===null&&r[2]===null&&r[3]===null?null:r}class Pn{constructor(){this.DAYS=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],this.MONTHS=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]],this.DEC=".",this.GROUP=",",this.AMPM=["AM","PM"],this.SHORT_AMPM=["A","P"]}toLocaleNumber(e){let t=-1;return this.DEC!=="."&&(t=e.indexOf(".")),this.GROUP!==","&&(e=e.replace(/,/g,this.GROUP)),t!==-1&&(e=e.substr(0,t)+this.DEC+e.substr(t+1)),e}}function On(n){let e=0;switch(n.charCodeAt(0)){case 34:return(e=n.indexOf('"',1))<0?n:n.slice(0,e+1);case 91:return(e=n.indexOf("]",1))<0?n:n.slice(0,e+1);case 95:case 42:case 92:return n.slice(0,2);case 48:case 35:case 63:return/[-0#?.,%E+/ ]+/.exec(n)[0];case 89:case 77:case 68:case 72:case 83:case 121:case 109:case 100:case 104:case 115:return/[YMDHS:/]+/i.exec(n)[0];case 65:return/AM\/PM|A\/P|A/.exec(n)[0];case 46:return/\.0*/.exec(n)[0];default:return n[0]}}let Ht={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"m/d/yy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@",56:'"上午/下午 "hh"時"mm"分"ss"秒 "',65535:"General"};var Mt=B(6949),Gt=B.n(Mt);function Bt(n){let e=n.toString();return-1<e.indexOf("e")?new(Gt())(n).toFixed():e}function Ge(n,e){let t=new(Gt())(n);return t.e+=e,parseFloat(t.toFixed())}let et=/\.(\d*[1-9])0+$/,vt=/\.0*$/,wt=/\.(\d*[1-9])0+/,Ct=/\.0*[Ee]/,bt=/(E[+-])(\d)$/;function Rt(n){return n.indexOf(".")>-1?n.replace(vt,"").replace(et,".$1"):n}function Lt(n,e){switch(typeof n){case"string":return n;case"boolean":return n?"TRUE":"FALSE";case"number":return(0|n)===n?Bt(n):function(t,r){let i=Math.floor(Math.log(Math.abs(t))*Math.LOG10E),a;if(i>=-4&&i<=-1)a=t.toPrecision(10+i);else if(9>=Math.abs(i))a=function(g){let R=g<0?12:11,L=Rt(g.toFixed(12));return L.length<=R||(L=g.toPrecision(10)).length<=R?L:g.toExponential(5)}(t);else if(i===10)a=t.toFixed(10).substr(0,12);else{let g;(g=t.toFixed(11).replace(et,".$1")).length>(t<0?12:11)&&(g=t.toPrecision(6)),a=g}return a=Rt(function(g){for(let R=0;R!=g.length;++R)if(g[R]==="e")return g.replace(wt,".$1").replace(Ct,"E").replace("e","E").replace(bt,"$10$2");return g}(a)),r.DEC==="."?a:a.replace(/\./,r.DEC)}(n,e)}throw Error("unsupported value in General format: "+n)}function Dt(n,e){return n.length>=7+e&&n.substr(e,7)==="General"}function Jt(n){let e="",t=n.length-1;for(;t>=0;)e+=n.charAt(t--);return e}function zt(n,e){let t="";for(;t.length<e;)t+=n;return t}function nn(n){if(n.length<=3)return n;let e=n.length%3,t=n.substr(0,e);for(;e!=n.length;e+=3)t+=(t.length>0?",":"")+n.substr(e,3);return t}function An(n,e){let t=Bt(n);return t.length>=e?t:zt("0",e-t.length)+t}function lr(n,e){let t=Bt(n);return t.length>=e?t:zt(" ",e-t.length)+t}function $r(n,e){if(n>4294967296||n<-4294967296){var t=n;let i=Bt(Math.round(t=t<0?-Math.round(-t):Math.round(t)));return i.length>=e?i:zt("0",e-i.length)+i}let r=Bt(n=n<0?-Math.round(-n):Math.round(n));return r.length>=e?r:zt("0",e-r.length)+r}function ri(n,e){let t=Bt(n);return t.length>=e?t:t+zt(" ",e-t.length)}function zi(n,e,t){let r=n<0?-1:1,i=n*r,a=0,g=1,R=0,L=1,W=0,K=0,Q=Math.floor(i);for(;W<e&&(R=(Q=Math.floor(i))*g+a,K=Q*W+L,!(i-Q<5e-10));)i=1/(i-Q),a=g,g=R,L=W,W=K;if(K>e&&(K=W,R=g),K>e&&(K=L,R=a),!t)return[0,r*R,K];if(K===0)throw"Unexpected state: "+R+" "+g+" "+a+" "+K+" "+W+" "+L;let oe=Math.floor(r*R/K);return[oe,r*R-oe*K,K]}let ba=/%/g,Ro=/# (\?+)( ?)\/( ?)(\d+)/,no=/^#*0*\.(0+)/,il=/\).*[0#]/,Rl=/\(###\) ###\\?-####/;function Fa(n,e){let t="";if(n.match(/^#*0+.0+E[+-]0+$/)){let i=n.indexOf(".");i=i<0?n.indexOf("E"):i;let a=n.indexOf("E")-i-1;a=a<0?0:a;let g=Math.abs(e),R=Math.floor(Math.log(g)*Math.LOG10E),L=R%i<0?R%i+i:R%i;t=(0>(t=(g/Math.pow(10,R)).toPrecision(L+1+a)).indexOf("e")?(t=t.split(".").join("")).substr(0,L+1)+"."+t.substr(L+1):t.replace(/^([+-]?\d*\.?\d*)[eE]([+-]?\d+)$/,function(W,K){return K.substr(0,L+1)+"."+K.substr(L+1)}))+(R-L<0?"E":"E+")+(R-L)}let r=n.match(/E\+(0+)$/);return r&&(t=t.replace(/\d+$/,function(i){return An(+i,r[1].length)})),n.match(/E-/)&&t.match(/[eE]\+/)&&(t=t.replace(/([eE])\+/,"$1")),e<0?"-"+t:t}function Va(n){let e="",t;for(let r=0;r!=n.length;++r)switch(t=n.charCodeAt(r)){case 35:break;case 63:e+=" ";break;case 48:e+="0";break;default:e+=String.fromCharCode(t)}return e}function Au(n,e){let t=n<0?-n:n,r=Math.pow(10,e),i=Math.round((t-Math.floor(t))*r);return i>=r?i-r:i}function us(n,e){let t=Ge(Math.round(Ge(n<0?-n:n,e)),-e);return Bt(n<0?-t:t)}function ea(n,e,t){return(0|t)===t?function r(i,a,g){let R;if(i.charCodeAt(0)===40&&!a.match(il))return"("+r("n",a.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,""),g)+")";if(a.charCodeAt(a.length-1)===44){var L,W=a;let Me=W.length-1;for(;W.charCodeAt(Me-1)===44;)--Me;return ea(i,W.substr(0,Me),g/Math.pow(10,3*(W.length-Me)))}if(a.indexOf("%")!==-1){var K=a;let Me=K.replace(ba,""),Oe=K.length-Me.length;return ea(i,Me,Ge(g,2*Oe))+zt("%",Oe)}if(a.indexOf("E")!==-1)return Fa(a,g);if(a.charCodeAt(0)===36)return"$"+r(i,a.substr(a[1]==" "?2:1),g);let Q,oe,se,he=Math.abs(g),me=g<0?"-":"";if(a.match(/^0{2,}$/))return me+An(he,a.length);if(a.match(/^[#?]+$/))return R=""+g,g===0&&(R=""),R.length>a.length?R:Va(a.substr(0,a.length-R.length))+R;if((Q=a.match(Ro))!==null)return L=Q,me+(he===0?"":Bt(he))+zt(" ",L[1].length+2+L[4].length);if(a.match(/^#+0+$/)!==null)return me+An(he,a.length-a.indexOf("0"));if((Q=a.match(no))!==null)return R=Bt(g).replace(/^([^.]+)$/,"$1."+Q[1]).replace(/\.$/,"."+Q[1]).replace(/\.(\d*)$/,function(Me,Oe){return"."+Oe+zt("0",Q[1].length-Oe.length)}),a.indexOf("0.")!==-1?R:R.replace(/^0\./,".");if((Q=(a=a.replace(/^#+([0.])/,"$1")).match(/^(0*)\.(#*)$/))!==null)return me+Bt(he).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,Q[1].length?"0.":".");if((Q=a.match(/^#,##0(\.?)$/))!==null)return me+nn(Bt(he))+(a.endsWith(".")?".":"");if((Q=a.match(/^#,##0\.([#0]*0)$/))!==null)return g<0?"-"+r(i,a,-g):nn(Bt(g))+"."+zt("0",Q[1].length);if((Q=a.match(/^#,##0\.(-+)$/))!==null)return R=zt("0",Q[1].length),g<0?"-"+r(i,a,-g):nn(Bt(g))+"."+(parseInt(R,10)===0?zt("-",Q[1].length):R);if((Q=a.match(/^#,#*,#0/))!==null)return r(i,a.replace(/^#,#*,/,""),g);if((Q=a.match(/^([0#]+)(\\?-([0#]+))+$/))!==null)return R=Jt(r(i,a.replace(/[\\-]/g,""),g)),oe=0,Jt(Jt(a.replace(/\\/g,"")).replace(/[0#]/g,function(Me){return oe<R.length?R[oe++]:Me==="0"?"0":""}));if(a.match(Rl)!==null)return"("+(R=r(i,"##########",g)).substr(0,3)+") "+R.substr(3,3)+"-"+R.substr(6);let ye="";if((Q=a.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))!==null)return se=zi(he,Math.pow(10,oe=Math.min(Q[4].length,7))-1,!1),R=""+me,(ye=ea("n",Q[1],se[1]))[ye.length-1]==" "&&(ye=ye.substr(0,ye.length-1)+"0"),R+=ye+Q[2]+"/"+Q[3],(ye=ri(se[2],oe)).length<Q[4].length&&(ye=Va(Q[4].substr(Q[4].length-ye.length))+ye),R+=ye;if((Q=a.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))!==null)return me+((se=zi(he,Math.pow(10,oe=Math.min(Math.max(Q[1].length,Q[4].length),7))-1,!0))[0]||(se[1]?"":"0"))+" "+(se[1]?lr(se[1],oe)+Q[2]+"/"+Q[3]+ri(se[2],oe):zt(" ",2*oe+1+Q[2].length+Q[3].length));if((Q=a.match(/^[#0?]+$/))!==null)return R=""+g,a.length<=R.length?R:Va(a.substr(0,a.length-R.length))+R;if((Q=a.match(/^([#0]+)\.([#0]+)$/))!==null){oe=(R=""+g.toFixed(Math.min(Q[2].length,10)).replace(/([^0])0+$/,"$1")).indexOf(".");let Me=a.indexOf(".")-oe,Oe=a.length-R.length-Me;return Va(a.substr(0,Me)+R+a.substr(a.length-Oe))}if((Q=a.match(/^00,000\.([#0]*0)$/))!==null)return g<0?"-"+r(i,a,-g):nn(Bt(g)).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(Me){return"00,"+(Me.length<3?An(0,3-Me.length):"")+Me})+"."+An(0,Q[1].length);if(a==="#,###"){var Te=nn(Bt(he));return Te!=="0"?me+Te:""}throw Error("unsupported format |"+a+"|")}(n,e,t):function r(i,a,g){let R;if(i.charCodeAt(0)===40&&!a.match(il))return"("+r("n",a.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,""),g)+")";if(a.charCodeAt(a.length-1)===44){var L=a;let Me=L.length-1;for(;L.charCodeAt(Me-1)===44;)--Me;return ea(i,L.substr(0,Me),g/Math.pow(10,3*(L.length-Me)))}if(a.indexOf("%")!==-1){var W=a;let Me=W.replace(ba,""),Oe=W.length-Me.length;return ea(i,Me,Ge(g,2*Oe))+zt("%",Oe)}if(a.indexOf("E")!==-1)return Fa(a,g);if(a.charCodeAt(0)===36)return"$"+r(i,a.substr(a[1]==" "?2:1),g);let K,Q,oe,se=Math.abs(g),he=g<0?"-":"";if(a.match(/^0{2,}$/))return he+$r(se,a.length);if(a.match(/^[#?]+$/))return(R=$r(g,0))==="0"&&(R=""),R.length>a.length?R:Va(a.substr(0,a.length-R.length))+R;if((K=a.match(Ro))!==null){var me=K;let Me=parseInt(me[4],10),Oe=Math.round(se*Me),ze=Math.floor(Oe/Me),We=Oe-ze*Me;return he+(ze===0?"":""+ze)+" "+(We===0?zt(" ",me[1].length+1+me[4].length):lr(We,me[1].length)+me[2]+"/"+me[3]+An(Me,me[4].length))}if(a.match(/^#+0+$/)!==null)return he+$r(se,a.length-a.indexOf("0"));if((K=a.match(no))!==null)return R=us(g,K[1].length).replace(/^([^.]+)$/,"$1."+K[1]).replace(/\.$/,"."+K[1]).replace(/\.(\d*)$/,function(Me,Oe){return"."+Oe+zt("0",K[1].length-Oe.length)}),a.indexOf("0.")!==-1?R:R.replace(/^0\./,".");if((K=(a=a.replace(/^#+([0.])/,"$1")).match(/^(0*)\.(#*)$/))!==null)return he+us(se,K[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,K[1].length?"0.":".");if((K=a.match(/^#,##0(\.?)$/))!==null)return he+nn($r(se,0))+(a.endsWith(".")?".":"");if((K=a.match(/^#,##0\.([#0]*0)$/))!==null)return he+function(Me,Oe){let ze=new(Gt())(Me).toFixed(Oe).split(".");return ze[0]=nn(ze[0]),ze.join(".")}(se,K[1].length);if((K=a.match(/^#,##0\.(-+)$/))!==null)return Q=An(Au(g,K[1].length),K[1].length),g<0?"-"+r(i,a,-g):nn(Bt(Math.floor(g)))+"."+(parseInt(Q,0)===0?function(Me,Oe,ze){let We=Bt("-");return We.length>=Oe?We:zt("-",Oe-We.length)+We}(0,K[1].length):Q);if((K=a.match(/^#,#*,#0/))!==null)return r(i,a.replace(/^#,#*,/,""),g);if((K=a.match(/^([0#]+)(\\?-([0#]+))+$/))!==null)return R=Jt(r(i,a.replace(/[\\-]/g,""),g)),Q=0,Jt(Jt(a.replace(/\\/g,"")).replace(/[0#]/g,function(Me){return Q<R.length?R[Q++]:Me==="0"?"0":""}));if(a.match(Rl)!==null)return"("+(R=r(i,"##########",g)).substr(0,3)+") "+R.substr(3,3)+"-"+R.substr(6);let ye="";if((K=a.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))!==null)return oe=zi(se,Math.pow(10,Q=Math.min(K[4].length,7))-1,!1),R=""+he,(ye=ea("n",K[1],oe[1]))[ye.length-1]==" "&&(ye=ye.substr(0,ye.length-1)+"0"),R+=ye+K[2]+"/"+K[3],(ye=ri(oe[2],Q)).length<K[4].length&&(ye=Va(K[4].substr(K[4].length-ye.length))+ye),R+=ye;if((K=a.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))!==null)return he+((oe=zi(se,Math.pow(10,Q=Math.min(Math.max(K[1].length,K[4].length),7))-1,!0))[0]||(oe[1]?"":"0"))+" "+(oe[1]?lr(oe[1],Q)+K[2]+"/"+K[3]+ri(oe[2],Q):zt(" ",2*Q+1+K[2].length+K[3].length));if((K=a.match(/^[#0?]+$/))!==null)return R=$r(g,0),a.length<=R.length?R:Va(a.substr(0,a.length-R.length))+R;if((K=a.match(/^([#0?]+)\.([#0]+)$/))!==null){Q=(R=""+g.toFixed(Math.min(K[2].length,10)).replace(/([^0])0+$/,"$1")).indexOf(".");let Me=a.indexOf(".")-Q,Oe=a.length-R.length-Me;return Va(a.substr(0,Me)+R+a.substr(a.length-Oe))}if((K=a.match(/^00,000\.([#0]*0)$/))!==null)return Q=Au(g,K[1].length),g<0?"-"+r(i,a,-g):nn(g<2147483647&&g>-2147483648?Bt(g>=0?0|g:g-1|0):Bt(Math.floor(g))).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(Me){return"00,"+(Me.length<3?An(0,3-Me.length):"")+Me})+"."+An(Q,K[1].length);if(a==="#,###"){var Te=nn($r(se,0));return Te!=="0"?he+Te:""}throw Error("unsupported format |"+a+"|")}(n,e,t)}let Ha={TEXT:0,NUMBER:1,DATETIME:2},Mu=/^[HhMmSs]+$/,hh=/-[0-9a-f]{1,8}$/i,Du=/^([<>=]=?|!=|<>)\s*(-?\d+(?:\.\d*)?)\s*$/;function qi(n){this.isDefault=Dt(n,0)&&n.length===7,this.cond=null,this.color=null,this.tokens=[],this.hasCondition=!1,this.type=Ha.TEXT,this.dateInfo=null,this.isDefault||this.init(n)}function $a(n){this.sectionCount=0,this.posNumFmt=null,this.negNumFmt=null,this.zeroNumFmt=null,this.textFmt=null,this._parse(n)}qi.prototype.init=function(n){let e=function(t){let r,i,a,g,R=[],L="t",W="H",K=!1,Q=!1,oe=0,se="",he=0,me="";for(;oe<t.length;)switch(se=t[oe]){case"G":if(!Dt(t,oe))throw Error(`unrecognized string |${t.slice(oe)}|${t}`);R.push({t:"G",v:"General"}),oe+=7;break;case'"':if((he=t.indexOf('"',oe+1))<0)throw Error(`unterminate string |${t.slice(oe)}|`);R.push({t:"t",v:t.slice(oe+1,he)}),oe=he+1;break;case"\\":g=(se=t[oe+1])==="("||se===")"?se:"t",R.push({t:g,v:se}),oe+=2;break;case"_":R.push({t:"t",v:" "}),oe+=2;break;case"@":R.push({t:"@"}),++oe;break;case"B":case"b":if(t[oe+1]==="1"||t[oe+1]==="2"){K=!0,R.push({t:"X",v:t.substr(oe,2)}),L=se,oe+=2;break}case"M":case"D":case"Y":case"H":case"S":case"E":se=se.toLowerCase();case"m":case"d":case"y":case"h":case"s":case"e":case"g":for(K=!0,me=se;++oe<t.length&&t[oe].toLowerCase()===se;)me+=se;g=se==="m"&&L.toLowerCase()==="h"?"M":se==="h"?W:se,R.push({t:g,v:me}),L=g;break;case"A":g="A",me=se,t.substr(oe,3)==="A/P"?(K=!0,W="h",me="A/P",oe+=3):t.substr(oe,5)==="AM/PM"?(K=!0,W="h",me="AM/PM",oe+=5):(g="t",++oe),R.push({t:g,v:me}),L=se;break;case"[":if((he=t.indexOf("]",oe+1))<0)throw'unterminated "[" block';me=t.substring(oe+1,he),oe=he+1,Mu.test(me)?(R.push({t:"Z",v:"["+me.toLowerCase()+"]"}),K=!0,L=me[0]):(a=function(Me){let Oe;switch(Me.toLowerCase()){case"black":Oe="000";break;case"green":Oe="0f0";break;case"white":Oe="fff";break;case"blue":Oe="00f";break;case"magenta":Oe="f0f";break;case"yellow":Oe="ff0";break;case"cyan":Oe="0ff";break;case"red":Oe="f00"}return Oe}(me))?r=a:me.charAt(0)==="$"?(me=me.replace(hh,""),R.push({t:"t",v:me.slice(1)})):(a=me.match(Du))&&(i={op:a[1],v:parseFloat(a[2])});break;case".":if(K){for(me=se;t[++oe]==="0";)me+="0";me.length>1?R.push({t:"s",v:me}):R.push({t:"t",v:me});break}case"0":case"#":for(me=se;"0#?.,E+-%".indexOf(se=t[++oe])>-1||se=="\\"&&t[oe+1]=="-"&&"0#".indexOf(t[oe+2])>-1;)me+=se;R.push({t:"n",v:me,n:!0}),Q=!0;break;case"?":for(me=se;t[++oe]===se;)me+=se;R.push({t:se,v:me,n:!0}),L=se,Q=!0;break;case"*":++oe," *".includes(t[oe])&&++oe;break;case"(":case")":case" ":R.push({t:se,v:se}),++oe;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(me=se;"0123456789".includes(t[++oe]);)me+=t[oe];R.push({t:"D",v:me});break;default:if(",$-+/():!^&'~{}<>=€acfijklopqrtuvwxz".includes(se)===!1)throw Error("unrecognized character "+se+" in "+t);R.push({t:"t",v:se}),++oe}let ye=null;if(K){let Me=0,Oe;for(L="t",oe=R.length-1;oe>=0;--oe)switch(R[oe].t){case"h":case"H":R[oe].t=W,L="h";break;case"s":(Oe=R[oe].v.match(/\.0+$/))&&(Me=Math.max(Me,Oe[0].length-1));case"d":case"y":case"M":case"e":L=R[oe].t;break;case"m":L==="s"&&(R[oe].t="M")}ye={ss0:Me}}let Te=Ha.TEXT;return K?Te=Ha.DATETIME:Q&&(Te=Ha.NUMBER),{tokens:R,cond:i,color:r,type:Te,dateInfo:ye}}(n);if(this.cond=e.cond||null,this.color=e.color||null,this.tokens=e.tokens,this.type=e.type,this.hasCondition=this.cond!==null,this.type===Ha.DATETIME){let t=this.dateInfo=e.dateInfo;t.isDate=!0,t.isTime=!0,t.isDuration=!1;for(let r=0;r<e.tokens.length;r++)switch(e.tokens[r].t){case"Z":t.isDate=!1,t.isDuration=!0;break;case"H":case"h":case"M":case"s":t.isDate=!1;break;case"b":case"y":case"m":case"d":t.isTime=!1}}},qi.prototype.isApplicable=function(n){return!this.hasCondition||typeof n!="number"||this.checkCondition(n)},qi.prototype.checkCondition=function(n){switch(this.cond.op){case"=":if(n===this.cond.v)return!0;break;case">":if(n>this.cond.v)return!0;break;case"<":if(n<this.cond.v)return!0;break;case"<>":if(n!==this.cond.v)return!0;break;case">=":if(n>=this.cond.v)return!0;break;case"<=":if(n<=this.cond.v)return!0}return!1},qi.prototype.formatValue=function(n,e){if(this.isDefault)return Lt(n,e);switch(n){case!0:n="TRUE";break;case!1:n="FALSE";break;case"":case null:case void 0:return""}return function(t,r,i,a){let g=null,R=a?.ss0||0;if(t=t.map(K=>{let{t:Q,v:oe,n:se}=K;return{t:Q,v:oe,n:se}}),a&&(g=function(K,Q,oe,se){let he=Math.floor(K),me=Math.floor(86400*(K-he)),ye=86400*(K-he)-me,Te=0,Me=[];se.date1904&&(he+=1462);let Oe=Math.pow(10,Q);(ye=Math.round(ye*Oe)/Oe)>=1&&(ye-=1,(me+=1)===86400&&(me=0,he+=1));let ze={v:K,D:he,T:me,u:ye,y:0,m:0,d:0,H:0,M:0,S:0,q:0,valid:K>=0&&K<=2958465};if(he===60)Me=[1900,2,29],Te=3;else if(he===0)Me=[1900,1,0],Te=6;else{let We=new Date(1900,0,1),qe=he>60?he-2:he-1;We.setDate(We.getDate()+qe),Me=[We.getFullYear(),We.getMonth()+1,We.getDate()],Te=We.getDay(),he<60&&(Te=(Te+6)%7)}return ze.y=Me[0],ze.m=Me[1],ze.d=Me[2],ze.q=Te,ze.S=me%60,ze.M=(me=Math.floor(me/60))%60,ze.H=me=Math.floor(me/60),ze}(r,R,!1,i))===null)return Bt(r);let L="";for(let K=0;K<t.length;++K)switch(t[K].t){case"t":case"T":case" ":case"D":break;case"X":t[K]=void 0;break;case"d":case"m":case"y":case"h":case"H":case"M":case"s":case"e":case"b":case"Z":if(!g?.valid&&t[K].t!=="Z")return Bt(r);t[K].v=function(Q,oe,se,he,me){let ye,Te=0,Me=se.y;switch(Q){case"b":Me=se.y+543;case"y":oe.length<=2?(ye=Me%100,Te=2):(ye=Me%1e4,Te=4);break;case"m":if(oe.length===5)return me.MONTHS[se.m-1][0];if(oe.length===3)return me.MONTHS[se.m-1][1];if(oe.length>2)return me.MONTHS[se.m-1][2];ye=se.m,Te=oe.length;break;case"d":if(oe.length===3)return me.DAYS[se.q][0];if(oe.length>3)return me.DAYS[se.q][1];ye=se.d,Te=oe.length;break;case"h":if(oe.length!==1&&oe.length!==2)throw"bad hour format: "+oe;ye=1+(se.H+11)%12,Te=oe.length;break;case"H":if(oe.length!==1&&oe.length!==2)throw"bad hour format: "+oe;ye=se.H,Te=oe.length;break;case"M":if(oe.length!==1&&oe.length!==2)throw"bad minute format: "+oe;ye=se.M,Te=oe.length;break;case"s":if(se.u===0&&(oe==="s"||oe==="ss"))return An(se.S,oe.length);if(["s","ss",".0",".00",".000"].includes(oe)){let Oe=0,ze=Math.floor((Oe=he>=2?he===3?1e3:100:he===1?10:1)*(se.S+se.u));if(oe==="s")return ze===0?"0":ze/Oe+"";let We=An(ze,2+he);return oe==="ss"?We.substr(0,2):"."+We.substr(2,oe.length-1)}throw"bad second format: "+oe;case"Z":switch(oe){case"[h]":case"[hh]":ye=24*se.D+se.H;break;case"[m]":case"[mm]":ye=(24*se.D+se.H)*60+se.M;break;case"[s]":case"[ss]":ye=((24*se.D+se.H)*60+se.M)*60+se.S;break;default:throw"bad abstime format: "+oe}Te=oe.length===3?1:2;break;case"e":ye=Me,Te=1}return Te>0?An(ye,Te):""}(t[K].t,t[K].v,g,R,i),t[K].t="t";break;case"n":case"?":for(let Q=K,oe=K+1;;++oe){let se=t[oe]&&t[oe].t;if(t[oe]!=null&&(se==="?"||se==="D"||(se===" "||se==="t")&&t[oe+1]!=null&&(t[oe+1].t==="?"||t[oe+1].t==="D"||t[oe+1].t===" "||t[oe+1].t==="t"&&t[oe+1].v==="/")||t[Q].t==="("&&(se===" "||se==="n"||se===")")))t[Q].v+=t[oe].v,t[oe]=void 0;else{L+=t[Q].v,K=oe-1;break}}break;case"@":t[K].t="t",t[K].v=r;break;case"G":t[K].t="t",t[K].v=Lt(r,i);break;case"A":if(!g?.valid)return Bt(r);t[K].v==="AM/PM"?(t[K].v=i.AMPM[+(g.H>=12)],t[K].t="T"):t[K].v==="A/P"&&(t[K].v=i.SHORT_AMPM[+(g.H>=12)],t[K].t="T")}if(t=t.filter(K=>K),L.length>0){let K=ea(L==="("?"(":"n",L,r);if(K.indexOf("E")===-1){let Q=t.length;for(let se=0;se<t.length;++se)if(t[se].t==="n"&&t[se].v.indexOf(".")>-1){Q=se;break}let oe=t.length;if(Q===t.length){let se=K.length-1;for(let he=t.length-1;he>=0;--he)t[he].n&&(t[he].v=t[he].v.replace(/\\(?!\\)/g,""),se===K.length-1&&(t[he].v=t[he].v.replace(/,+$/,"")),se>=t[he].v.length-1?(se-=t[he].v.length,t[he].v=K.substr(se+1,t[he].v.length)):se<0?t[he].v="":(t[he].v=K.substr(0,se+1),se=-1),t[he].t="t",oe=he);se>=0&&oe<t.length&&(t[oe].v=K.substr(0,se+1)+t[oe].v),t[oe].v=i.toLocaleNumber(t[oe].v)}else{let se=K.indexOf(".")-1;for(let he=Q;he>=0;--he){if(!t[he].n)continue;t[he].v=t[he].v.replace(/\\(?!\\)/g,"");let me=t[he].v.indexOf(".")>-1&&he===Q?t[he].v.indexOf(".")-1:t[he].v.length-1,ye=t[he].v.substr(me+1);for(;me>=0;--me)se>=0&&(t[he].v[me]==="0"||t[he].v[me]==="#")&&(ye=K[se]+ye,se--);t[he].v=ye,t[he].t="t",oe=he}se>=0&&oe<t.length&&(t[oe].v=K.substr(0,se+1)+t[oe].v),se=K.indexOf(".")+1;for(let he=Q;he<t.length;++he){if(!t[he].n&&he!==Q)continue;let me=t[he].v.indexOf(".")>-1&&he===Q?t[he].v.indexOf(".")+1:0,ye=t[he].v.substr(0,me);for(;me<t[he].v.length;++me)se<K.length&&(ye+=K[se],se++);t[he].v=ye,t[he].t="t",oe=he}for(let he=0;he<t.length;he++)t[he].n&&(t[he].v=i.toLocaleNumber(t[he].v))}}}let W="";for(let K=0;K<t.length;K++)t[K].n===!0&&t[K].t!=="t"&&(t[K].v=i.toLocaleNumber(ea(t[K].t,t[K].v,r)),t[K].t="t"),W+=t[K].v;return W}(this.tokens,n,e,this.dateInfo)},qi.prototype.containsAtSymbol=function(){return!this.isDefault&&this.tokens.some(function(n){return n.t==="@"})},qi.prototype.isDate=function(){return this.dateInfo&&this.dateInfo.isDate},qi.prototype.isTime=function(){return this.dateInfo&&this.dateInfo.isTime},qi.prototype.isDuration=function(){return this.dateInfo&&this.dateInfo.isDuration},qi.prototype.isNumber=function(){return this.type===Ha.NUMBER},qi.prototype.isDateTime=function(){return this.type===Ha.DATETIME};let hs=new qi("General");$a.prototype._parse=function(n){let e=function(a){let g=[],R=!1;for(var L=0,W=0;L<a.length;++L)switch(a[L]){case'"':R=!R;break;case"_":case"*":case"\\":if(!R&&++L>=a.length)throw Error("Format |"+a+"| unterminated");break;case";":R||(g.push(a.slice(W,L)),W=L+1)}if(R)throw Error("Format |"+a+"| unterminated");return g.push(a.slice(W)),g}(n).map(function(a){return new qi(a)}),t=e.length;if(t>4||t===0)throw Error("Invalid number of section");let r=hs,i=e[t-1].containsAtSymbol();switch(t<4&&i&&(r=e[t-1],t--),t){case 1:this.posNumFmt=e[0],this.textFmt=r;break;case 2:this.posNumFmt=e[0],this.negNumFmt=e[1],this.textFmt=r;break;case 3:this.posNumFmt=e[0],this.negNumFmt=e[1],this.zeroNumFmt=e[2],this.textFmt=r;break;case 4:this.posNumFmt=e[0],this.negNumFmt=e[1],this.zeroNumFmt=e[2],this.textFmt=e[3];break;default:this.posNumFmt=hs,this.textFmt=r,t=1}this.sectionCount=t},$a.prototype.render=function(n,e){let t,r=!1;if(typeof n=="number"){let i=!1;if(n<0){switch(this.sectionCount){case 1:break;case 2:i=!this.posNumFmt.hasCondition&&!this.negNumFmt.hasCondition;break;case 3:case 4:i=!this.negNumFmt.hasCondition}i?(t=this.negNumFmt,n=-n):r=!0}t=i===!1?this.getApplicableFmt(n):this.negNumFmt,r&&!t.isNumber()&&(r=!1)}else t=this.textFmt;return{v:r===!1?t.formatValue(n,e):"-"+t.formatValue(-n,e),d:t.isDate(),c:t.color}},$a.prototype.formatValue=function(n,e){return this.render(n,e).v},$a.prototype.isDateTime=function(){return this.posNumFmt.isDateTime()},$a.prototype.isDate=function(){return this.posNumFmt.isDate()},$a.prototype.isTime=function(){return this.posNumFmt.isTime()},$a.prototype.isDuration=function(){return this.posNumFmt.isDuration()},$a.prototype.getApplicableFmt=function(n){return this.sectionCount===1?this.posNumFmt.isApplicable(n)?this.posNumFmt:hs:this.sectionCount===2?!this.posNumFmt.hasCondition&&n>=0||this.posNumFmt.hasCondition&&this.posNumFmt.isApplicable(n)?this.posNumFmt:!this.negNumFmt.hasCondition||this.negNumFmt.hasCondition&&this.negNumFmt.isApplicable(n)?this.negNumFmt:hs:!this.posNumFmt.hasCondition&&n>0||this.posNumFmt.hasCondition&&this.posNumFmt.isApplicable(n)?this.posNumFmt:!this.negNumFmt.hasCondition&&n<0||this.negNumFmt.hasCondition&&this.negNumFmt.isApplicable(n)?this.negNumFmt:this.zeroNumFmt};let ch=Date.UTC(1900,0,0);function di(n){let e=(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())-ch)/864e5;return e>=60?e+1:e}function za(n){let e=n>=61?n-1:n,t=Math.floor(e),r=new Date(Date.UTC(1900,0,t)+864e5*(e-t));return new Date(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate(),r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds())}function Bs(n){let e=new Date(n.getTime());return e.getMilliseconds()>=500&&e.setMilliseconds(1e3),e}let Ls=new Map([["months","MONTHS"],["days","DAYS"],["dec_sym","DEC"],["group_sym","GROUP"],["long_day_period","AMPM"],["short_day_period","SHORT_AMPM"],["currency_sym","CURRENCY_SYM"]]);class Eo{constructor(){this._locale=new Pn}format(e,t){return al(e).render(t,this._locale)}formatDateTime(e,t){let r=di(t);return this.format(e,r).v}render(e,t){try{return al(e).formatValue(t,this._locale)}catch{return t}}getLocaleData(){return this._locale}updateLocaleData(e){let t=Object.entries(e).filter(r=>Ls.has(r[0])).map(r=>[Ls.get(r[0]),r[1]]);this._locale=Object.assign(this._locale,Object.fromEntries(t))}static isDate(e){try{return al(e).isDate()}catch{return!1}}static isTime(e){try{return al(e).isTime()}catch{return!1}}static isDateTime(e){try{return al(e).isDateTime()}catch{return!1}}static isDuration(e){try{return al(e).isDuration()}catch{return!1}}static getBuiltinFormat(e){return Ht[e]}}let ol={};function al(n){return ol[n]||(ol[n]=new $a(n)),ol[n]}Eo.clearCache=function(){ol={}},Eo.increaseDecimal=function(n){let e=[],t=!1;for(let i;n.length!==0;e.push(i))switch(n=n.substr((i=On(n)).length),i.charCodeAt(0)){case 46:i=t||i.length<2?i:i+"0";break;case 48:case 35:case 63:var r;i=(r=i).indexOf("/")>=0?r:r.indexOf(".")>=0?r.replace(/\.[0#?]+/,a=>a+"0"):r.replace(/[0#?,]*[0#?]/,a=>a+".0");break;case 65:case 89:case 77:case 68:case 72:case 83:case 121:case 109:case 100:case 104:case 115:t=!0}return e.join("")},Eo.decreaseDecimal=function(n){let e=[],t=!1;for(let r;n.length!==0;e.push(r))switch(n=n.substr((r=On(n)).length),r.charCodeAt(0)){case 46:r=t?r:r.length>2?r.slice(0,-1):"";break;case 48:case 35:case 63:r=r.replace(/\.[0#?]+/,i=>i.length>2?i.slice(0,-1):"");break;case 65:case 89:case 77:case 68:case 72:case 83:case 121:case 109:case 100:case 104:case 115:t=!0}return e.join("")};class Fs{constructor(){this.index=void 0}getIndex(){return this.index}setIndex(e){this.index=e}isDefault(){return this.index===0}clone(){let e=new this.constructor;return e.assign(this),e}assign(e){if(e){let t=this.constructor.attrs;for(let r=0;r<t.length;r++){let i=t[r];e[i]!==void 0&&(this[i]=e[i])}}return this}remove(e){if(e){let t=this.constructor.attrs;for(let r=0;r<t.length;r++){let i=t[r];i in e&&(e[i]===void 0||e[i]===this[i])&&(this[i]=null)}}return this}toJSON(){let e={},t=this.constructor.attrs;for(let r=0,i=t.length;r<i;r++){let a=t[r];this[a]!==null&&(e[a]=this[a])}return e}}class Wa extends Fs{static#e=this.attrs=["name","size","bold","italic","strike","underline","color"];constructor(){super(),this.name=null,this.size=null,this.bold=null,this.italic=null,this.strike=null,this.underline=null,this.color=null}equals(e){return e.name===this.name&&e.size===this.size&&e.bold===this.bold&&e.italic===this.italic&&e.strike===this.strike&&e.underline===this.underline&&e.color===this.color}}class Jl extends Fs{static#e=this.attrs=["bg"];constructor(){super(),this.bg=null}equals(e){return e.bg===this.bg}}class uc extends Fs{static#e=this.attrs=["halign","valign","wrap","readingOrder"];constructor(){super(),this.halign=null,this.valign=null,this.wrap=null,this.readingOrder=null}equals(e){return e.halign===this.halign&&e.valign===this.valign&&e.wrap===this.wrap&&e.readingOrder===this.readingOrder}}function sl(n){return!!n.readingOrder}class Ou extends Fs{static#e=this.attrs=["b"];constructor(){super(),this.b=null}equals(e){if(e.b===null||this.b===null)return e.b===this.b;for(let t=0;t<4;t++)if(e.b[t]!==this.b[t])return!1;return!0}}function El(n,e){return n?e?[e[0]??n[0],e[1]??n[1],e[2]??n[2],e[3]??n[3]]:n:e}class Al extends Fs{static#e=this.attrs=["fc"];constructor(){super(),this.fc=null}equals(e){return e.fc===this.fc}isText(){return this.fc==="@"}isDateTime(){return!!this.fc&&Eo.isDateTime(this.fc)}isDate(){return!!this.fc&&Eo.isDate(this.fc)}isTime(){return!!this.fc&&Eo.isTime(this.fc)}isDuration(){return!!this.fc&&Eo.isDuration(this.fc)}}function Vs(n,e){return Ao(e,function(t,r){n[r]=t}),n}function Or(n){return n!==null&&typeof n=="object"?JSON.parse(JSON.stringify(n)):n}function dh(n){let e={};return Ao(n,(t,r)=>{e[r]=t}),e}function fh(n){return Object.prototype.toString.call(n)==="[object Object]"}function fi(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function Ao(n,e){for(let t in n)if(fi(n,t)&&e(n[t],t,n)===!1)break;return n}let Zl={name:"n",size:"sz",bold:"b",italic:"i",strike:"s",underline:"u",color:"c"},od={halign:"h",valign:"v",wrap:"w",readingOrder:"r"},Ql={0:"top",1:"right",2:"bottom",3:"left",top:"top",right:"right",bottom:"bottom",left:"left"};function hc(n){let e={};return Ao(n,(t,r)=>{e[t]=r}),e}let cs=hc(Zl),Nu=hc(od);function ll(n,e){if(e===null)return e;let t={};for(let r in e)fi(e,r)&&fi(n,r)&&(t[n[r]]=e[r]);return t}function Ca(n,e,t){t=t||2;for(let r=0,i=e.length;r<i;r++){let a=e[r][t];a!==null&&(e[r][t]=ll(n,a))}return e}function cc(n){switch(n.cmd){case"font":Ca(cs,n.changes);break;case"alignment":Ca(Nu,n.changes);break;case"border":Ca(Ql,n.changes);break;case"compound":for(let a=0;a<n.actions.length;a++)cc(n.actions[a]);break;case"insert_row":case"insert_col":if(n.data){let a=n.data.format;a.font&&Ca(cs,a.font),a.alignment&&Ca(Nu,a.alignment),a.border&&Ca(Ql,a.border)}break;case"row_style":case"col_style":var e=n;let r=e.type;r==="font"?gh(cs,e):r==="alignment"?gh(Nu,e):r==="border"&&gh(Ql,e);break;case"global_style":var t=n;let i=t.type;i==="font"?Pu(cs,t):i==="alignment"?Pu(Nu,t):i==="border"&&Pu(Ql,t);break;case"create_comment":case"reply_comment":case"reopen_comment":case"resolve_comment":case"edit_comment":n.json.author=n.uid}return n}function Pu(n,e){e.value=ll(n,e.value),e.rowChanges&&(e.rowChanges=Ca(n,e.rowChanges,1)),e.colChanges&&(e.colChanges=Ca(n,e.colChanges,1)),e.cellChanges&&(e.cellChanges=Ca(n,e.cellChanges,2))}function gh(n,e){e.changes=Ca(n,e.changes,1),e.cellChanges&&(e.cellChanges=Ca(n,e.cellChanges,2))}function dc(n){return n.v.map(e=>e.tx).join("")}class yo{constructor(e){this.v=e||[]}getText(){return dc(this)}removeFirstChar(){let e=this.v[0];return e&&(e.tx=e.tx.substr(1),e.tx===""&&this.v.shift()),this}insertFirst(e){return this.v.unshift({tx:e,s:null}),this}equals(e){if(this.v.length!==e.v.length)return!1;for(let i=0;i<this.v.length;i++){var t,r;let a=this.v[i],g=e.v[i];if(a.tx!==g.tx||(t=a.s,r=g.s,t===null||r===null?t!==r:!t.equals(r)))return!1}return!0}clone(){let e=new yo;for(let t=0;t<this.v.length;t++){let r=this.v[t];e.v.push({tx:r.tx,s:r.s?r.s.clone():null})}return e}setCellStyle(e){for(let t=0;t<this.v.length;t++){let r=this.v[t].s;r&&r.assign(e)}return this}removeStyle(e){for(let t=0;t<this.v.length;t++){let r=this.v[t].s;r&&r.remove(e)}return this}toJSON(){let e={t:"r",v:Array(this.v.length)};for(let t=0;t<this.v.length;t++){let r=this.v[t];e.v[t]={tx:r.tx,s:r.s?ll(Zl,r.s.toJSON()):void 0}}return e}toString(){return this.getText()}static fromJSON(e){let t=Array(e.v.length);for(let r=0;r<e.v.length;r++){let i=e.v[r];t[r]={tx:i.tx,s:i.s?new Wa().assign(ll(cs,i.s)):null}}return new yo(t)}}function Zr(n){return n&&n.constructor===yo}function _a(n){return n&&fh(n)&&n.t==="r"}function ii(n){for(let e=0;e<n.length;e++){let t=n[e][2];_a(t)&&(n[e][2]=yo.fromJSON(t))}return n}function Qr(n,e,t){if(n.length<=1)return;let r=n.length-1,i=/^\s+$/;for(;r>0;){let a=n[r],g=n[r-1],R=a[e],L=a[t],W=g[t];(R.length===0||(L===null||W===null?L===W:L.equals(W))||L===null&&i.test(R))&&(g[e]+=a[e],n.splice(r,1)),r--}}function eu(n){for(let e of(n.size||(n.size=10),n.name||(n.name="Arial"),n.color||(n.color="000000"),["bold","italic","underline","strike"]))n[e]||(n[e]=void 0);return n}function ph(n){let e=n.v;for(let t=0;t<e.length;t++){let r=e[t].s;r&&eu(r)}return Qr(n.v,"tx","s"),n}function mh(n,e){let t=new Set;for(let r of n.v)t.add(r.s?.color||e);return Array.from(t)}function Ml(n){for(var e=arguments.length,t=Array(e>1?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];return n.replace(/\{(\d+)\}/g,(i,a)=>String(t[a]))}let fc={"&":"&","<":"<",">":">",'"':"""},gc=/[&<>"]/g,pc=/[&<>]/g;function wo(n){return n&&gc.test(n)?n.replace(gc,function(e){return fc[e]}):n}class zr{constructor(e,t,r){this.text=e,this.style=t,this.startOffset=r}insert(e,t){this.text=this.text.substr(0,t)+e+this.text.substr(t)}length(){return this.text.length}toNode(e,t,r){let i=document.createElement("span");if(i.innerHTML=wo(this.text).replace(/\n/g,"<br>"),!e){let a=this.style||t;a&&zr.renderStyle(i,a,r)}return i}applyStyle(e,t){if(e===null){this.style=null;return}this.style=Ga(this.style||t,e)}split(e){let t=this.style?this.style.clone():null,r=new zr(this.text.substr(e),t,this.startOffset+e);return this.text=this.text.substring(0,e),r}static renderStyle(e,t,r){var i,a;let g,R,L;r&&(t=t.clone().assign(r));let W=(g="",(a=i=t).size&&(g+=`font-size:${a.size}pt;`),a.name&&(g+=`font-family:"${a.name}";`),R=g+=`font-weight:${a.bold?"bold":"normal"};font-style:${a.italic?"italic":"normal"};`,i.color&&(R+=`color:#${i.color};`),L="",i.underline||i.strike?(i.underline&&(L+="underline"),i.strike&&(L+=" line-through")):L="none",R+=`text-decoration:${L}`);W&&e.setAttribute("style",W),e._s=t}toJSON(){return{tx:this.text,s:this.style&&this.style.clone()}}}class Ua{constructor(e,t){this.texts=[],this.defaultStyle=e,this.overrideStyle=t}syncTo(e){e.texts=this.texts}append(e){this.texts.push(e)}assignRichText(e){let t=0;for(let r=0;r<e.v.length;r++){let i=e.v[r],a=i.s&&i.s.clone();this.append(new zr(i.tx,a,t)),t+=i.tx.length}}_merge(){Qr(this.texts,"text","style")}insert(e,t){if(this.texts.length===0)return void this.append(new zr(e,null,0));let[r]=this._slice(t,t,!0);if(r){r.insert(e,t-r.startOffset);for(let i=this.texts.indexOf(r)+1;i<this.texts.length;i++)this.texts[i].startOffset+=e.length;this._merge()}}getPlainText(){let e="";for(let t=0;t<this.texts.length;t++)e+=this.texts[t].text;return e}getValue(){return this.texts.some(e=>e.style)?new yo(this.texts.map(e=>e.toJSON())):this.getPlainText()}toFragment(e){let t=document.createDocumentFragment();for(let r=0;r<this.texts.length;r++)t.appendChild(this.texts[r].toNode(e,this.defaultStyle,this.overrideStyle));return t}parseFontStyle(e,t){let r=pn(e,t);if(!r)return null;let i=new Wa().assign(r);return this.overrideStyle&&(la(i,this.overrideStyle),i.equals(new Wa))?null:i}setStyle(e,t,r){let i=this._slice(e,t);if(i.length===0)return;let a=i[0],g=this.texts.indexOf(a),R=g+i.length-1;a.startOffset<e&&(i[0]=a.split(e-a.startOffset),this.texts.splice(g+1,0,i[0]),R+=1);let L=i[i.length-1];if(L&&t<L.startOffset+L.length()){let W=L.split(t-L.startOffset);this.texts.splice(R+1,0,W)}for(let W=0;W<i.length;W++)i[W].applyStyle(r,this.defaultStyle);this._merge()}isStyleActive(e,t,r){let i=this._slice(t,r),a=this.defaultStyle||{};return i.length>0&&i.every(g=>(g.style||a)[e]===!0)}_slice(e,t,r){let i=[],a=r?0:-1;for(let g=0;g<this.texts.length;g++){let R=this.texts[g];if(R.startOffset>t)break;R.startOffset+R.length()-e+a>=0&&t-R.startOffset+a>=0&&i.push(R)}return i}_last(){return this.texts[this.texts.length-1]}trimTail(){let e=this._last();e&&e.text===`
`&&(this.texts.length=this.texts.length-1)}getFinalValue(){this._merge();let e=this.getValue();if(!Zr(e))return Ie(Se(e));let t=eu(this.defaultStyle.clone()),r=e.v;for(let i=0;i<r.length;i++){let a=r[i];a.tx&&(a.tx=Ie(Se(a.tx))),a.s&&this.overrideStyle&&la(a.s,this.overrideStyle),a.s=Ga(t,a.s)}return Qr(r,"tx","s"),r.length===1&&(r[0].s===null||r[0].s.equals(t))?r[0].tx:e}}function la(n,e){let t=["bold","italic","underline","strike","color"];for(let r=0;r<t.length;r++){let i=t[r];n[i]!==null&&n[i]===e[i]&&(n[i]=null)}}function Ga(n,e){let t=n?n.clone():new Wa;return t.assign(e),eu(t)}class Sa{constructor(e=null){this.context=e||this,this.context.eventListeners||(this.context.eventListeners=[])}addEventListener(e,t,r){if(window.addEventListener&&(this.context.eventListeners.push({element:e,event:t,callback:r}),!this._eventSuspended))return e.addEventListener(t,r,!1),()=>{this.removeEventListener(e,t,r)}}removeEventListener(e,t,r){let i,a=this.context.eventListeners.length;for(;a--;)if((i=this.context.eventListeners[a]).event===t&&i.element===e){if(r&&r!==i.callback)continue;this.context.eventListeners.splice(a,1),i.element.removeEventListener&&i.element.removeEventListener(i.event,i.callback,!1)}}clearEvents(){this._clear(),this.context&&(this.context.eventListeners.length=0)}_clear(){if(this.context)for(let e=0;e<this.context.eventListeners.length;e++){let t=this.context.eventListeners[e];t.element.removeEventListener&&t.element.removeEventListener(t.event,t.callback,!1)}}destroy(){this.clearEvents(),this.context=null}}let Mo=class{constructor(n,e){this.textList=null,this.el=this._initEl(),this.eventManager=new Sa,this._registerEventListeners(),this.defaultStyle=null,this.overrideStyle=null,this.instance=n,this.selectionSaver=e||new st}_initEl(){let n=document.createElement("div");return n.spellcheck=!0,n.contentEditable=!0,n}_registerEventListeners(){this.eventManager.addEventListener(this.el,"keydown",n=>this.onKeyDown(n)),this.eventManager.addEventListener(this.el,"paste",n=>this.onPaste(n))}_parse(){this.textList=new Ua(this.defaultStyle,this.overrideStyle),this.el.normalize();let n=this._shouldParseStyle();this.iterateNodes((e,t,r)=>{let i=null;n&&e.parentNode!==this.el&&(i=this.textList.parseFontStyle(e.parentNode,a=>this.instance.getUIBridge().validateFontFamily(a))),this.textList.append(new zr(t,i,r))}),this.textList.trimTail()}_shouldParseStyle(){return!0}getValue(){let n=this.getText();return n[n.length-1]===`
`&&(n=n.substring(0,n.length-1)),n}getText(){let n="";return this.iterateNodes((e,t)=>{n+=t}),n}getSelection(){return new yt(this)}setSelection(n){this.getSelection().setRange(n)}saveSelection(){this.selectionSaver.save(this.getSelection().getRange(),this)}clearSavedSelection(){this.selectionSaver.clear()}restoreSavedSelection(){this.selectionSaver.restore()}iterateNodes(n,e){let t,r=[this.el],i=0;for(;t=r.pop();)if(t.nodeType===3||t.tagName==="BR"){let a=t.nodeType===3?t.nodeValue:`
`;if(n(t,a,i)===!1)break;i+=a.length}else{if(e&&n(t,"",i)===!1)break;for(let a=t.childNodes.length-1;a>=0;a--)r.push(t.childNodes[a])}}_setContents(n){this.el.innerHTML="",this.el.appendChild(n),this.el.appendChild(document.createElement("br"))}blur(){this.el.blur()}focus(n){this.el.focus(),n||this.getSelection().setCaretToLast()}isFocused(){return document.activeElement===this.el}insertText(n,e){this.isFocused()||this.focus(!0);let t=this.getSelection();t.deleteContents();let r=t.getRange()?.start;if(r===void 0)return;this._parse(),this.textList.insert(n,r);let i=e?r:r+n.length;this.onAfterInsertText(t,i)}onAfterInsertText(){this._renderTextList()}_renderTextList(){this._setContents(this.textList.toFragment())}getEl(){return this.el}onKeyDown(n){n.keyCode===13&&(this.insertText(`
`),n.preventDefault())}onPaste(n){let e=(n.clipboardData||window.clipboardData).getData("Text").replace(/\r\n/g,`
`);n.stopPropagation(),n.preventDefault(),e&&this.insertText(e)}setStyle(n,e){if(e||(e=this.getSelection().getRange()),!e)return!1;let{start:t,end:r}=e;if(t===r)return!1;this.textList.setStyle(t,r,n),this.onAfterSetStyle(e)}onAfterSetStyle(n){this._renderTextList(),this.getSelection().setRange(n)}setDefaultStyle(n){this.defaultStyle=n}setOverrideStyle(n){this.overrideStyle=n}empty(){Y(this.el)}};function ds(n){switch(typeof n){case"string":case"number":return n+"";case"object":return n===null?"":n.toString();case"undefined":return"";default:return n.toString()}}function fs(){return new Promise(n=>{setTimeout(n,0)})}let Dl=Error("#NULL!"),gr=Error("#DIV/0!"),Xe=Error("#VALUE!"),co=Error("#REF!"),Do=Error("#NAME?"),ot=Error("#NUM!"),It=Error("#N/A"),mc=Error("#SPILL!"),Bu=Error("#ERROR!"),gs=Error("#CALC!"),ps=Error("#GETTING_DATA"),vh=Error("#LOADING!"),Wn={NULL:Dl,DIV0:gr,VALUE:Xe,REF:co,NAME:Do,NUM:ot,NA:It,SPILL:mc,ERROR:Bu,CALC:gs,GETTING_DATA:ps,LOADING:vh},ua={};function ja(n){if(n==null)return 0;switch(typeof n){case"number":return n;case"string":return+n;case"boolean":return+!!n}return NaN}function Pi(n){return Object.prototype.toString.call(n)==="[object Error]"}function ms(n){return n===!0||n===!1}function Yi(n){return+n.toPrecision(15)}function Ol(n){return n>=0?(n+1).toString():""}function Nl(n){let e="";for(;n>=0;)e=String.fromCharCode(n%26+65)+e,n=n=Math.floor(n/26-1);return e}function Bi(n){return(n.isColAbs?"$":"")+Nl(n.col)+(n.isRowAbs?"$":"")+Ol(n.row)}function Lu(n,e,t){return n+(t?e.toString():`[${e}]`)}function Pl(n){return Lu("R",n.row+1,n.isRowAbs)+Lu("C",n.col+1,n.isColAbs)}function ul(n){return/^\w+$/.test(n)?n:`'${n.replace(/'/g,"''")}'`}function tu(n){let e=parseInt(n,10);return isNaN(e)||e<1?-1:e-1}function Ia(n){let e=0,t=(n||"").toUpperCase();for(let r=0;r<t.length;r++)e*=26,e+=t.charCodeAt(r)-65+1;return e-1}function Fu(n){return n.substring(1,n.length-1).replace(/""/g,'"')}function vs(n){let e=n.length;return n.charAt(0)!=="'"?n.substring(0,e-1):n.substring(1,e-2).replace(/''/g,"'")}Object.keys(Wn).forEach(n=>{let e=Wn[n];e.name=e.message,e.stack&&(e.stack=void 0),ua[e.message]=e});class Ki{constructor(e,t,r){this.from=e,this.to=t,this.shName=r}equals(e){return this.from===e.from&&this.to===e.to}clone(){return new this.constructor(this.from,this.to,this.shName)}toLabel(){let e=this._toLabel();return this.shName?ul(this.shName)+"!"+e:e}isNameRange(){return!1}}class mi extends Ki{getContainer(e){return e.getContainer()}key(){return`${this.from.row},${this.from.col},${this.to.row},${this.to.col}`}clone(){return new this.constructor(ae(this.from),ae(this.to),this.shName)}equals(e){return this.from.row===e.from.row&&this.from.col===e.from.col&&this.to.row===e.to.row&&this.to.col===e.to.col}includes(e,t){return this.from.row<=e&&this.to.row>=e&&this.from.col<=t&&this.to.col>=t}isBetweenRow(e,t){return e<=this.to.row&&t>=this.from.row}isBetweenCol(e,t){return e<=this.to.col&&t>=this.from.col}isWithinRow(e,t){return e<=this.from.row&&t>=this.to.row}isWithinCol(e,t){return e<=this.from.col&&t>=this.to.col}isInsertionWithin(e,t){return!1}willBeExpanded(e,t){return de(this.from[e],this.to[e],t)}insert(e,t,r,i){let[a,g]=[ae(this.from),ae(this.to)],R=Ce(a[e],g[e],t,r,i);return[a[e],g[e]]=R,new mi(a,g,this.shName)}remove(e,t,r){let[i,a]=[ae(this.from),ae(this.to)],g=De(i[e],a[e],t,r);return g===null?null:([i[e],a[e]]=g,new mi(i,a,this.shName))}move(e,t){let[r,i]=[ae(this.from),ae(this.to)],a=He(r[e],i[e],t);return[r[e],i[e]]=a,new mi(r,i,this.shName)}setName(e){this.shName=e}_toLabel(){let e=Bi(this.from);return(this.from.row!==this.to.row||this.from.col!==this.to.col)&&(e+=":"+Bi(this.to)),e}}class ta extends Ki{getContainer(e){return e.getRowContainer()}key(){return`${this.from},${this.to}`}includes(e,t){return this.from<=e&&this.to>=e}isBetweenRow(e,t){return e<=this.to&&t>=this.from}isBetweenCol(e,t){return!0}isWithinRow(e,t){return e<=this.from&&t>=this.to}isWithinCol(e,t){return!0}isInsertionWithin(e,t){return e==="row"&&de(this.from,this.to,t)}willBeExpanded(e,t){return e==="col"||de(this.from,this.to,t)}insert(e,t,r,i){if(e==="col")return this.clone();let[a,g]=Ce(this.from,this.to,t,r,i);return new ta(a,g,this.shName)}remove(e,t,r){if(e==="col")return this.clone();let i=De(this.from,this.to,t,r);return i?new ta(i[0],i[1],this.shName):null}move(e,t){if(e==="col")return this.clone();let[r,i]=He(this.from,this.to,t);return new ta(r,i,this.shName)}_toLabel(){return Ol(this.from)+":"+Ol(this.to)}}class na extends Ki{getContainer(e){return e.getColContainer()}key(){return`${this.from},${this.to}`}includes(e,t){return this.from<=t&&this.to>=t}isBetweenRow(e,t){return!0}isBetweenCol(e,t){return e<=this.to&&t>=this.from}isWithinRow(e,t){return!0}isWithinCol(e,t){return e<=this.from&&t>=this.to}isInsertionWithin(e,t){return e==="col"&&de(this.from,this.to,t)}willBeExpanded(e,t){return e==="row"||de(this.from,this.to,t)}insert(e,t,r,i){if(e==="row")return this.clone();let[a,g]=Ce(this.from,this.to,t,r,i);return new na(a,g,this.shName)}remove(e,t,r){if(e==="row")return this.clone();let i=De(this.from,this.to,t,r);return i?new na(i[0],i[1],this.shName):null}move(e,t){if(e==="row")return this.clone();let[r,i]=He(this.from,this.to,t);return new na(r,i,this.shName)}_toLabel(){return Nl(this.from)+":"+Nl(this.to)}}class ge{constructor(e,t){this.name=e,this.shName=t}getContainer(e){return e.getNameContainer()}includes(e,t){return!1}isBetweenRow(e,t){return!1}isBetweenCol(e,t){return!1}isNameRange(){return!0}}function ae(n){return{row:n.row,col:n.col}}function de(n,e,t){return e-n!=0&&n<t&&t<=e}function Ce(n,e,t,r,i){return i!==-1&&n<=i&&i<=e||i===-1&&n<t&&t<=e?e+=r:n>=t&&(n+=r,e+=r),[n,e]}function De(n,e,t,r){if(t+r-1<n)n-=r,e-=r;else if(t<=e){let i=Math.max(t,n),a=Math.min(t+r-1,e)-i+1;if(e-n+1<=a)return null;n-=i-t,e-=a+i-t}return[n,e]}function He(n,e,t){let{sec:[r,i],isBackward:a}=t;return n>=r.start&&n<=r.end?!a&&e>=i.start&&e<=i.end?n=r.start:n+=i.amount:n>=i.start&&n<=i.end&&(n-=r.amount),e>=r.start&&e<=r.end?e+=i.amount:e>=i.start&&e<=i.end&&(a&&n>=r.start&&n<=r.end?e=i.end:e-=r.amount),[n,e]}var Ye=B(38377);let ut={LCURLY:"{",RCURLY:"}",LPAREN:"(",RPAREN:")",SEMICOLON:";",COLON:":",COMMA:",",PERCENT:"%",EXP:"^",MUL:"*",DIV:"/",ADD:"+",SUB:"-",CONCAT:"&",EQ:"=",NE:"<>",LE:"<=",LT:"<",GE:">=",GT:">"};function dt(n){let e=ut[n];return(0,Ye.createToken)({name:n,label:e,pattern:e})}let Nt=dt("LCURLY"),tn=dt("RCURLY"),qt=dt("LPAREN"),Vt=dt("RPAREN"),Mn=dt("SEMICOLON"),Bn=dt("COLON"),Kn=dt("COMMA"),Jn=dt("PERCENT"),vn=dt("EXP"),Nr=dt("MUL"),Jr=dt("DIV"),Rr=dt("ADD"),si=dt("SUB"),Wr=dt("CONCAT"),Pr=dt("EQ"),_r=dt("NE"),vi=dt("LE"),Li=dt("LT"),ro=dt("GE"),ur=dt("GT"),Dn="[\\u00a1-\\ud7ff\\ue000-\\uffff]|[\uD800-\uDBFF][\uDC00-\uDFFF]",br=(0,Ye.createToken)({name:"NAME",pattern:RegExp(`([A-Z_]|${Dn})([A-Z0-9_.\\]|${Dn})*`,"i")}),nt=(0,Ye.createToken)({name:"SPACE",pattern:/\s+/,line_breaks:!0}),_t=(0,Ye.createToken)({name:"LOGIC",pattern:/TRUE|FALSE/i,longer_alt:br}),ft=(0,Ye.createToken)({name:"ERROR",pattern:/#DIV\/0!|#N\/A|#NAME\?|#NULL!|#NUM!|#REF!|#VALUE!|#CALC!|#SPILL!|#GETTING_DATA/i}),Ot=(0,Ye.createToken)({name:"NUMBER",pattern:/[0-9]*\.?[0-9]+([Ee][+-]?[0-9]+)?/}),Yt=(0,Ye.createToken)({name:"STRING",pattern:/"([^"]|"")*"/}),Cn=(0,Ye.createToken)({name:"FUNCTION",pattern:/[A-Z][A-Z0-9.]*(?=\()/i}),Fn=`([A-Z0-9_]|${Dn})([A-Z0-9_.]|${Dn})*`,kn=(0,Ye.createToken)({name:"SHEETNAME",pattern:RegExp(`${Fn}!|'([^']|'')+'!`,"i")}),hr="\\$?[0-9]{1,7}",pr="\\$?[A-Z]{1,3}",ir=(0,Ye.createToken)({name:"CELL_A1",pattern:RegExp(`${pr}${hr}`,"i"),longer_alt:br}),Er=(0,Ye.createToken)({name:"ROWRANGE_A1",pattern:RegExp(`${hr}:${hr}`,"i")}),oi=(0,Ye.createToken)({name:"COLRANGE_A1",pattern:RegExp(`${pr}:${pr}`,"i")}),rn="(R\\[-?\\d+\\]|R\\d*)",qn="(C\\[-?\\d+\\]|C\\d*)",Ln=(0,Ye.createToken)({name:"CELL_R1C1",pattern:RegExp(`${rn}${qn}`,"i")}),In=(0,Ye.createToken)({name:"ROWRANGE_R1C1",pattern:RegExp(`${rn}:${rn}`,"i")}),Gr=(0,Ye.createToken)({name:"COLRANGE_R1C1",pattern:RegExp(`${qn}:${qn}`,"i")});function io(n,e,t){n[n.indexOf(e)]=t}let bo=[nt,Cn,kn,ir,oi,Er,Ot,Yt,_t,ft,br,Kn,Mn,qt,Vt,Nt,tn,Bn,Jn,vn,Nr,Jr,Rr,si,Wr,_r,vi,ro,Pr,Li,ur],Wi=bo.slice();io(Wi,ir,Ln),io(Wi,Er,In),io(Wi,oi,Gr);let Fi=new Ye.Lexer({modes:{A1:bo,R1C1:Wi},defaultMode:"A1"},{skipValidations:!0});var Hs=B(65682),ra=B.n(Hs);let Vi=ra().symbols_,qa=new Map(Object.entries({...Vi,SPACE:!1,",":Vi.COMMA,";":Vi.SEMICOLON,NAME:Vi.VARIABLE,ROWRANGE:Vi.ROWRANGECELL,COLRANGE:Vi.COLRANGECELL}));class Ya{constructor(){this.setInput("")}parseError(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.yy.parser&&this.yy.parser.parseError(...t),this._handleParseError()}setInput(e,t){return this._index=0,this.tokens=[],this._initJisonState(e,t),this}lex(){let e=this.next();for(;!e;)e=this.next();return e}next(){if(this._index===0&&(this.tokens=this._initLexingTokens()),!this._validateInput())return this.setInput(this._input,this.yy).next();if(this.done)return this._translate("EOF");if(this._index>=this.tokens.length)return this.parseError(`Unrecognized text: ${this._input}`);let e=this.tokens[this._index++];this._updateJisonState(e);let t=this._getTokenLabel(e.tokenType);return this._translate(t)}pushState(e){this.conditionStack.push(e)}popState(){return this.conditionStack.length>1?this.conditionStack.pop():this.conditionStack[0]}_initLexingTokens(){let e=this.conditionStack[this.conditionStack.length-1],t=e===this.conditionStack[0]?void 0:e,{errors:r,tokens:i}=Fi.tokenize(this._input,t);if(r.length===0)return i;let a=Math.min.apply(null,r.map(g=>g.offset));return i.filter(g=>g.startOffset<a)}_initJisonState(e,t){this.yy=t||{},this._input=e,this.yytext="",this.yyleng=0,this.yylineno=0,this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.matched="",this.done=!e,this.conditionStack=["INITIAL"]}_updateJisonState(e){let{startLine:t,endLine:r,startColumn:i,endColumn:a,image:g}=e;this._input=this._input.slice(g.length),this.yytext=g,this.yyleng=g.length,this.yylineno=r-1,this.yylloc={first_line:t,last_line:r,first_column:i,last_column:a},this.matched+=g,this.done=!this._input}_handleParseError(){return this.yytext=this._input,this._input="",this.done=!0,Vi.error}_getTokenLabel(e){let t=(0,Ye.tokenLabel)(e),r=t.indexOf("_");return r<0?t:t.slice(0,r)}_translate(e){return qa.get(e)??e}_validateInput(){return!(this._index<this.tokens.length)||this.tokens[this._index].startOffset===this.matched.length}}let Gn=new Ya;ra().Parser.prototype.lexer=new Ya;let Xi=ra().Parser,Ft=ra().symbols_;class fo{constructor(e,t){this.symbol=e,this.setValue(t)}setValue(e){this.value=e}getValue(){return this.value}getText(){return this.value}isGroup(){return!1}isValid(){return this.symbol!==Ft.error}isCell(){return this.isCellRange()&&this.getValue().indexOf(":")===-1}isCellRange(){return this.symbol===Ft.CELL}isColRange(){return this.symbol===Ft.COLRANGECELL}isRowRange(){return this.symbol===Ft.ROWRANGECELL}isRange(){return this.symbol===Ft.CELL||this.symbol===Ft.COLRANGECELL||this.symbol===Ft.ROWRANGECELL}isEqualSymbol(){return this.symbol===Ft["="]}isFunction(){return this.symbol===Ft.FUNCTION}isVariable(){return this.symbol===Ft.VARIABLE}isLeftParenthesis(){return this.symbol===Ft["("]}isRightParenthesis(){return this.symbol===Ft[")"]}isParenthesis(){return this.isLeftParenthesis()||this.isRightParenthesis()}isLeftBrace(){return this.symbol===Ft["{"]}isRightBrace(){return this.symbol===Ft["}"]}isNumber(){return this.symbol===Ft.NUMBER}isComma(){return this.symbol===Ft.COMMA}isDelimiter(){return this.symbol===Ft.COMMA||this.symbol===Ft["+"]||this.symbol===Ft["-"]||this.symbol===Ft["*"]||this.symbol===Ft["/"]||this.symbol===Ft["%"]||this.symbol===Ft["^"]||this.symbol===Ft["&"]}isLeftDelimiter(){return this.isLeftParenthesis()||this.isEqualSymbol()||this.isDelimiter()}isRightDelimiter(){return this.isRightParenthesis()||this.symbol===Ft.EOF||this.isDelimiter()}isString(){return this.symbol===Ft.STRING}isWhitespace(){return this.symbol===!1}}class hl extends fo{constructor(e,t){super(e,t),this.pair=void 0}getPair(){return this.pair}bind(e){if(this.unbind(),e!==void 0)return e.pair=this,this.pair=e,e}unbind(){let e=this.pair;if(e!==void 0)return e.pair=void 0,this.pair=void 0,e}getMatchSymbol(){switch(this.symbol){case Ft["("]:return Ft[")"];case Ft[")"]:return Ft["("];case Ft["{"]:return Ft["}"];case Ft["}"]:return Ft["{"]}}isMatch(e){return e!==void 0&&e.symbol===this.getMatchSymbol()}}class $o extends fo{constructor(e,t,r){super(e,t),this.shName=r}getText(){let e=this.value||"";return this.shName===void 0?e:this.shName+e}getSheetName(){return this.shName===void 0?this.shName:vs(this.shName)}getFullSheetName(){return this.shName||""}setSheetName(e){this.shName=e}isValid(){return super.isValid()&&this.value!==void 0}}let ha=n=>class extends n{constructor(...e){let t=e.shift();super(...e),this.tokens=t||[]}getTokens(){return this.tokens}get(e){return this.tokens[e]}size(){return this.tokens.length}indexOf(e){return this.tokens.indexOf(e)}concat(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];this.tokens=this.tokens.concat(...t)}getText(){let e="";for(let t=0;t<this.tokens.length;t++)e+=this.tokens[t].getText();return e}isValid(){for(let e=0;e<this.tokens.length;e++)if(!this.tokens[e].isValid())return!1;return!0}flatten(){let e=[];for(let t=0;t<this.tokens.length;t++)this.tokens[t].isGroup()?e.push(...this.tokens[t].flatten()):e.push(this.tokens[t]);return e}getTokenByPos(e){let t=0;for(let r=0;r<this.tokens.length;r++){let i=this.tokens[r].getText().length;if(t<e&&e<=t+i)return{token:this.tokens[r],pos:t};t+=i}}getPosByToken(e){let t=0;for(let r=0;r<this.tokens.length;r++){if(e===this.tokens[r])return t;if(this.tokens[r].isGroup()){let i=this.tokens[r].getPosByToken(e);if(i>=0)return t+i}t+=this.tokens[r].getText().length}return-1}};class xa extends ha(fo){constructor(e,t){super(t,e)}getValue(){let e="",t=this.tokens;for(let r=0;r<t.length;r++)t[r].symbol!==!1&&(e+=t[r].getValue());return e}isGroup(){return!0}}class ad extends xa{getSheetName(){let e=this._findFirstCell();if(e!==void 0)return e.getSheetName()}getFullSheetName(){let e=this._findFirstCell();return e===void 0?"":e.getFullSheetName()}setSheetName(e){let t=this._findFirstCell();t!==void 0&&t.setSheetName(e)}_findFirstCell(){let e=this.tokens;for(let t=0;t<e.length;t++)if(e[t].symbol===Ft.CELL)return e[t]}}class ys extends ha(function(){}){constructor(){super([]),this.scopes=[]}getScopes(){return this.scopes}append(e,t){let r;switch(e){case Ft["("]:case Ft["{"]:r=ys.createToken(e,t),this.scopes.push(r);break;case Ft[")"]:case Ft["}"]:(r=ys.createToken(e,t)).isMatch(this.getTopScope())&&r.bind(this.scopes.pop());break;case Ft.CELL:if((r=this.reduceRangeRef(e,t))!==void 0)return r;case Ft.ROWRANGECELL:case Ft.COLRANGECELL:case Ft.VARIABLE:if((r=this.reduceCrossRef(e,t))!==void 0)return r}return r===void 0&&(r=ys.createToken(e,t)),this.tokens.push(r),r}reduceRangeRef(e,t){let r=this.getIndexWhenEndsWith([Ft.CELL,Ft[":"]]);if(r<0)return;let i=this.tokens[r];if(this.tokens.push(ys.createToken(e,t)),i.isGroup())return i.concat(this.tokens.splice(r+1)),i;let a=ys.createGroup(Ft.CELL,this.tokens.splice(r));return this.tokens.push(a),a}reduceCrossRef(e,t){let r=this.getIndexWhenEndsWith([Ft.SHEETNAME]);if(r<0||r!==this.tokens.length-1)return;let i=this.tokens[r];return i.symbol=e,i.setValue(t),i}getIndexWhenEndsWith(e){let t;if(e.length>this.tokens.length)return-1;let r=this.tokens.length,i=e.length-1;for(;i>=0;)if(--r<0||(t=this.tokens[r]).symbol!==!1&&t.symbol!==e[i--])return-1;return r}static createToken(e,t,r){switch(e){case Ft["("]:case Ft[")"]:case Ft["{"]:case Ft["}"]:return new hl(e,t);case Ft.SHEETNAME:return new $o(e,void 0,t);case Ft.CELL:case Ft.ROWRANGECELL:case Ft.COLRANGECELL:case Ft.VARIABLE:return new $o(e,t,r)}return new fo(e,t)}static createGroup(e,t){return e===Ft.CELL?new ad(e,t):new xa(e,t)}static createRangeToken(e,t,r){if(r&&(r=ul(r)+"!"),t==="row")return new $o(Ft.ROWRANGECELL,e,r);{if(t==="col")return new $o(Ft.COLRANGECELL,e,r);let i=e.split(":");if(i.length===1)return new $o(Ft.CELL,e,r);let a=[new $o(Ft.CELL,i[0],r)];for(let g=1;g<i.length;g++)a.push(new fo(Ft[":"],":"),new $o(Ft.CELL,i[g]));return ys.createGroup(Ft.CELL,a)}}getTopScope(){return this.scopes[this.scopes.length-1]}isValidFormula(){let e=this.tokens.length-1;return this.tokens[e].isValid()}forAllTokens(e){let t=0;for(let r=0;r<this.tokens.length&&e(this.tokens[r],t,r)!==!1;r++)t+=this.tokens[r].getText().length}[Symbol.iterator](){return this.tokens[Symbol.iterator]()}insertRange(e,t,r,i,a){let g=[0,0];i&&g.push(ys.createToken(Ft.COMMA,","));let R=ys.createRangeToken(e,t,a);g.push(R);let L=0;for(let W=0;W<this.tokens.length;W++){let K=this.tokens[W].getText().length;if(L<r&&r<=L+K){g[0]=W+1,Array.prototype.splice.apply(this.tokens,g);let Q=L+K;return{oldRange:[Q,Q],newRange:[Q,Q+R.getText().length+ +!!i]}}L+=K}return null}updateRange(e,t,r,i){let a=0;for(let g=0;g<this.tokens.length;g++){if(this.tokens[g]===e){let R=ys.createRangeToken(t,r,i);return this.tokens.splice(g,1,R),{oldRange:[a,a+e.getText().length],newRange:[a,a+R.getText().length]}}a+=this.tokens[g].getText().length}return null}insertFormulaText(e,t){let r=0,i=0;for(let a=0;a<this.tokens.length;a++){let g=this.tokens[a],R=g.getText().length;if(r<t&&t<=r+R){let L=[new fo(Ft.FUNCTION,e)];this.tokens[a+1]?.isLeftParenthesis()||L.push(new hl(Ft["("],"(")),g.isEqualSymbol()?(this.tokens.splice(a+1,0,...L),i=e.length+1):(this.tokens.splice(a,1,...L),i=r+e.length+1-t);break}r+=R}this.scopes=[];for(let a=0;a<this.tokens.length;a++){let g=this.tokens[a];g.isLeftParenthesis()||g.isLeftBrace()?(g.unbind(),this.scopes.push(g)):(g.isRightParenthesis()||g.isRightBrace())&&(g.unbind(),g.isMatch(this.getTopScope())&&g.bind(this.scopes.pop()))}return i}}let Ji=function(n,e){Gn.setInput(n),Gn.pushState(e||"INITIAL");let t=new ys;for(;!Gn.done;){let r=Gn.next();Gn.yytext&&t.append(r,Gn.yytext)}return t};function nu(n,e,t){return function(r,i,a){let g=!1,R=Ji(r);for(let L=0,W=R.size();L<W;L++){let K=R.get(L);if(K.isRange()||K.isVariable()){let Q=i(K.getSheetName());Q&&(K.setSheetName(ul(Q)+"!"),g=!0)}else K.isFunction()}return g?R.getText():r}(n,r=>r===e?t:void 0)}var pf=typeof _l=="object"&&_l&&_l.Object===Object&&_l,iv=typeof self=="object"&&self&&self.Object===Object&&self,Bl=pf||iv||Function("return this")(),$s=Bl.Symbol,Pb=Object.prototype,IT=Pb.hasOwnProperty,zo=Pb.toString,Oo=$s?$s.toStringTag:void 0;let xT=function(n){var e=IT.call(n,Oo),t=n[Oo];try{n[Oo]=void 0;var r=!0}catch{}var i=zo.call(n);return r&&(e?n[Oo]=t:delete n[Oo]),i};var TT=Object.prototype.toString,ov=$s?$s.toStringTag:void 0;let ru=function(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":ov&&ov in Object(n)?xT(n):TT.call(n)},ws=function(n){return n!=null&&typeof n=="object"},rr=function(n){return typeof n=="number"||ws(n)&&ru(n)=="[object Number]"},sd={CELL:/^(\$?)([A-Z]+)(\$?)(\d+)$/i,COLRANGECELL:/^(\$?)([A-Z]+):(\$?)([A-Z]+)$/i,ROWRANGECELL:/^(\$?)(\d+):(\$?)(\d+)$/},iu={CELL:/^(?:R\[(-?\d+)\]|R(\d*))(?:C\[(-?\d+)\]|C(\d*))/,COLRANGECELL:/^(?:C\[(-?\d+)\]|C(\d+)):(?:C\[(-?\d+)\]|C(\d+))/,ROWRANGECELL:/^(?:R\[(-?\d+)\]|R(\d+)):(?:R\[(-?\d+)\]|R(\d+))/},yh=/^(?:(\$?)([A-Z]+))?(?:(\$?)(\d+))?$/i;function bs(n){let e=yh.exec(n);if(e===null)return{};let t=e[4]?{isRowAbs:!!e[3],row:tu(e[4])}:null,r=e[2]?{isColAbs:!!e[1],col:Ia(e[2])}:null;return t===null||r===null?t||r||{}:{...t,...r}}function ld(n){let e=n.split(":").map(bs),t={},r={};for(let i=0;i<e.length;i++){let{row:a,col:g,isRowAbs:R,isColAbs:L}=e[i];(i===0||a===void 0||t.row>a)&&(t.row=a,t.isRowAbs=R),(i===0||g===void 0||t.col>g)&&(t.col=g,t.isColAbs=L),(i===0||a===void 0||r.row<a)&&(r.row=a,r.isRowAbs=R),(i===0||g===void 0||r.col<g)&&(r.col=g,r.isColAbs=L)}return{top:t.row,left:t.col,right:r.col,bottom:r.row,isTopAbs:t.isRowAbs,isLeftAbs:t.isColAbs,isRightAbs:r.isColAbs,isBottomAbs:r.isRowAbs}}function wh(n){let e=[],t=n.split(":");for(let r=0;r<t.length;r++)e.push(bs(t[r]));return Fg(e)}function Fg(n){let e={},t={};for(let r=0;r<n.length;r++){let{row:i,col:a}=n[r];(e.row===void 0||e.row>i)&&(e.row=i),(e.col===void 0||e.col>a)&&(e.col=a),(i===void 0||t.row<i||r===0)&&(t.row=i),(a===void 0||t.col<a||r===0)&&(t.col=a)}return[e,t]}function kT(n){let e=n.split(":");for(let t=0;t<e.length;t++){let r=yh.exec(e[t]);r!==null&&(r[4]&&!r[1]&&(r[3]=r[3]?"":"$"),r[2]&&(r[1]=r[1]?"":"$"),e[t]=r.slice(1).join(""))}return e.join(":")}function RT(n,e,t,r,i){let a="",g=Ji(e);for(let R=0;R<g.size();R++)a+=function(L,W,K,Q,oe){if(!W.isRange()||(W.getSheetName()||oe)!==Q||W.isRowRange()&&L!=="row"||W.isColRange()&&L!=="col")return W.getText();let se=function(he,me,ye){let Te=me.split(":").map(bs),[Me,Oe]=Fg(Te),ze=Me[he],We=Oe[he],qe=ye.isBackward&&ze>=ye.sec[0].start&&ze<=ye.sec[0].end,Ke=!ye.isBackward&&We>=ye.sec[1].start&&We<=ye.sec[1].end;for(let gt=0;gt<Te.length;gt++){var at;let pt=Te[gt];pt[he]!==void 0&&(pt[he]=(at=pt[he],at>=ye.sec[0].start&&at<=ye.sec[0].end?Ke?ye.sec[0].start:at+ye.sec[1].amount:at>=ye.sec[1].start&&at<=ye.sec[1].end?qe?ye.sec[1].end:at-ye.sec[0].amount:at))}return Te.map(Bi).join(":")}(L,W.getValue(),K);return se?W.getFullSheetName()+se:"#REF!"}(n,g.get(R),t,r,i);return a}function Bb(n,e,t){return n<t?n:e<0&&n+e<t?-1:n+e}function Lb(n,e,t,r){if(!n.isRange())return n.getText();let{delta:i,start:a}=e,g=n.getSheetName()||r,R=t!==void 0;if(R&&t!==g)return n.getText();let L=function(W,K,Q,oe){let se=[],he=W.split(":"),me=!0,ye={row:!0,col:!0};for(let Oe=0;Oe<he.length;Oe++){let ze=bs(he[Oe]),{row:We,col:qe}=ze;ze.row!==void 0&&K.row&&(!ze.isRowAbs||oe)&&(ze.row=Bb(ze.row,K.row,Q.row)),ze.col!==void 0&&K.col&&(!ze.isColAbs||oe)&&(ze.col=Bb(ze.col,K.col,Q.col));let Ke=ze.row<0||ze.col<0;if(ye.row=ye.row&&ze.row!==We,ye.col=ye.col&&ze.col!==qe,me=me&&Ke,!oe&&Ke)break;se.push(ze)}if(me||se.length!==he.length)return"";let Te=Q.row-+!ye.row,Me=Q.col-+!ye.col;for(let Oe=0;Oe<se.length;Oe++){let ze=se[Oe];ze.row=ze.row<0?Te:ze.row,ze.col=ze.col<0?Me:ze.col,he[Oe]=Bi(ze)}return he.join(":")}(n.getValue(),i,a,R);return L?n.getFullSheetName()+L:"#REF!"}function Vg(n,e,t,r){if(e.start||(e.start={row:0,col:0}),rr(e.delta)){let g=e.delta||0;e.delta={},e.start.row!==void 0&&(e.delta.row=g),e.start.col!==void 0&&(e.delta.col=g)}let i="",a=Ji(n);for(let g=0;g<a.size();g++)i+=Lb(a.get(g),e,t,r);return i}function mf(n,e){let t={row:0,col:0},r="",i=Ji(n);for(let a=0;a<i.size();a++){let g=i.get(a);!g.isRange()||g.getSheetName()?r+=g.getText():r+=Lb(g,{delta:e,start:t})}return r}function av(n){if(!n.isRange())return n.getText();let e=n.getValue();return e=n.isCellRange()?e.split(":").map(t=>{let r=yh.exec(t);return`${r[2]}${r[4]}`}).join(":"):e.split(":").map(t=>t.replace("$","")).join(":"),`${n.getFullSheetName()}${e}`}function $e(n){let e=bs(n);return(!Object.prototype.hasOwnProperty.call(e,"isRowAbs")||e.isRowAbs)&&(!Object.prototype.hasOwnProperty.call(e,"isColAbs")||e.isColAbs)}function ud(n){let e="",t=Ji(n);for(let r=0;r<t.size();r++)e+=function(i){if(!i.isRange())return i.getText();let a=i.getValue();return a=i.isCellRange()?a.split(":").map(g=>{let R=yh.exec(g);return"$"+R[2]+"$"+R[4]}).join(":"):a.split(":").map(g=>(0>g.indexOf("$")?"$":"")+g).join(":"),i.getFullSheetName()+a}(t.get(r));return e}function Hg(n){let e=Ji(n);for(let t=0;t<e.size();t++)if(!function r(i){return!i.isRange()||(i.isGroup()?i.getTokens().every(r):i.isRowRange()||i.isColRange()?i.getValue().split(":").every($e):$e(i.getValue()))}(e.get(t)))return!1;return!0}function cl(n,e,t){let r,i,a,g,R,L,W,K=[];for(Gn.setInput(n);!Gn.done;)switch(Gn.next()){case Ft.CELL:i=parseInt((r=sd.CELL.exec(Gn.yytext))[4],10)-1,a=Ia(r[2]),i=r[3]?`R${i+1}`:`R[${i-e}]`,K.push(i+(a=r[1]?`C${a+1}`:`C[${a-t}]`));break;case Ft.COLRANGECELL:L=Ia((r=sd.COLRANGECELL.exec(Gn.yytext))[2]),W=Ia(r[4]),L=r[1]?`C${L+1}`:`C[${L-t}]`,K.push(L+":"+(W=r[3]?`C${W+1}`:`C[${W-t}]`));break;case Ft.ROWRANGECELL:g=parseInt((r=sd.ROWRANGECELL.exec(Gn.yytext))[2],10)-1,R=parseInt(r[4],10)-1,g=r[1]?`R${g+1}`:`R[${g-e}]`,K.push(g+":"+(R=r[3]?`R${R+1}`:`R[${R-e}]`));break;default:K.push(Gn.yytext)}return K.join("")}function jr(n,e,t){let r=n[1]||n[2],i=n[3]||n[4];return[r?parseInt(r,10):e,i?parseInt(i,10):t]}function Fb(n,e,t){let r,i,a,g,R,L,W,K=[],Q=-2;for(Gn.setInput(n),Gn.pushState("R1C1");!Gn.done;)switch(Gn.next()){case Ft.CELL:if(K.length===Q+1)continue;r=iu.CELL.exec(Gn.yytext),[i,a]=jr(r,e+1,t+1),i+=r[1]?e:-1,a+=r[3]?t:-1,i<0||a<0?(Q=K.length,K.push("#REF!")):(a=(r[4]?"$":"")+Nl(a),K.push(a+(i=(r[2]?"$":"")+(i+1))));break;case Ft.COLRANGECELL:r=iu.COLRANGECELL.exec(Gn.yytext),[L,W]=jr(r,t+1,t+1),L+=r[1]?t:-1,W+=r[3]?t:-1,L<0||W<0?K.push("#REF!"):(L=(r[2]?"$":"")+Nl(L),K.push(L+":"+(W=(r[4]?"$":"")+Nl(W))));break;case Ft.ROWRANGECELL:r=iu.ROWRANGECELL.exec(Gn.yytext),[g,R]=jr(r,e+1,e+1),g+=r[1]?e:-1,R+=r[3]?e:-1,g<0||R<0?K.push("#REF!"):(g=(r[2]?"$":"")+(g+1),K.push(g+":"+(R=(r[4]?"$":"")+(R+1))));break;case Ft[":"]:K.length!==Q+1&&K.push(Gn.yytext);break;default:K.push(Gn.yytext)}return Gn.popState(),K.join("")}function ET(n){let e,t="";for(Gn.setInput(n),Gn.pushState("R1C1");!Gn.done;)switch(Gn.next()){case Ft.CELL:t+="R"+((e=iu.CELL.exec(Gn.yytext))[3]?`[${e[3]}]`:e[4]),t+="C"+(e[1]?`[${e[1]}]`:e[2]);break;case Ft.COLRANGECELL:t+=Gn.yytext.replace(/C/g,()=>"R");break;case Ft.ROWRANGECELL:t+=Gn.yytext.replace(/R/g,()=>"C");break;default:t+=Gn.yytext}return Gn.popState(),t}function AT(n,e,t,r,i,a){a===void 0&&(a=!1);let g={row:t.from.row-e.from.row,col:t.from.col-e.from.col},R=K=>{if(!K.isCellRange())return K.getText();let Q=K.getSheetName()||r,oe=K.getValue(),se=oe.split(":").map(bs),he=ld(oe),me=e.includes(he.top,he.left),ye=e.includes(he.bottom,he.right),Te=e.includes(he.top,he.right),Me=e.includes(he.bottom,he.left),Oe=t.includes(he.top,he.left),ze=t.includes(he.bottom,he.right),We=t.includes(he.top,he.right),qe=t.includes(he.bottom,he.left),Ke=g.row!==0&&g.col===0,at=g.col!==0&&g.row===0;if(e.shName===Q&&se.every(gt=>e.includes(gt.row,gt.col))){let gt=se.map(Tt=>Bi({row:Tt.row+g.row,col:Tt.col+g.col,isRowAbs:Tt.isRowAbs,isColAbs:Tt.isColAbs})).join(":"),pt=t.shName;return(i||!K.getSheetName()&&pt===r?"":`${ul(pt)}!`)+gt}if(i&&!K.getSheetName())return`${ul(e.shName)}!`+oe;if(e.shName===Q&&t.shName===Q&&((me&&Te||Me&&ye)&&Ke||(me&&Me||Te&&ye)&&at)){let gt=function(Tt,jt,on,hn,un,an){let Ut,kt,Pt,mn,Zt,dn;un===void 0&&(un=-1),an===void 0&&(an=!1),un===1?(Ut=Tt.from[hn],kt=Tt.to[hn],Pt=jt.from[hn],mn=jt.to[hn],Zt=on.from[hn],dn=on.to[hn]):(Ut=-Tt.to[hn],kt=-Tt.from[hn],Pt=-jt.to[hn],mn=-jt.from[hn],Zt=-on.to[hn],dn=-on.from[hn]),an?(Ut=Ut+Zt-Pt,kt=Math.max(kt,dn)):Zt<Pt?Ut=Ut+Zt-Pt:Zt>kt?Ut=mn+1:(Ut=Pt===Ut?Math.min(Zt,mn+1):dn>=kt?mn+1:Ut+Zt-Pt,kt=Math.max(dn,kt));let fn=new mi({row:Tt.from.row,col:Tt.from.col},{row:Tt.to.row,col:Tt.to.col},Tt.shName);return un===1?(fn.from[hn]=Ut,fn.to[hn]=kt):(fn.to[hn]=-Ut,fn.from[hn]=-kt),fn}(new mi({row:he.top,col:he.left},{row:he.bottom,col:he.right},Q),e,t,Ke?"row":"col",me?1:-1,a),pt=[Bi({row:gt.from.row,col:gt.from.col,isRowAbs:he.isTopAbs,isColAbs:he.isLeftAbs}),Bi({row:gt.to.row,col:gt.to.col,isRowAbs:he.isBottomAbs,isColAbs:he.isRightAbs})].join(":");return`${K.getFullSheetName()}${pt}`}if(t.shName===(K.getSheetName()||r)){let[gt,pt]=Fg(se);if(!Oe&&!ze)return K.getText();if(Oe&&ze)return"#REF!";if(a&&(Ke||at)){let jt=Ke?new mi(t.from,{row:e.from.row-1,col:t.to.col},t.shName):new mi(t.from,{row:t.to.row,col:e.from.col-1},t.shName),on=jt.includes(gt.row,gt.col),hn=jt.includes(gt.row,pt.col),un=jt.includes(pt.row,pt.col),an=jt.includes(pt.row,gt.col);on&&hn&&(gt.row=t.to.row+1),an&&un&&(pt.row=t.from.row-1),on&&an&&(gt.col=t.to.col+1),hn&&un&&(pt.col=t.from.col-1)}else t.from.row<gt.row&&Oe&&We&&!me&&!Te&&(gt.row=t.to.row+1),t.to.row>pt.row&&qe&&ze&&!Me&&!ye&&(pt.row=t.from.row-1),t.from.col<gt.col&&Oe&&qe&&!me&&!Me&&(gt.col=t.to.col+1),t.to.col>pt.col&&We&&ze&&!Te&&!ye&&(pt.col=t.from.col-1);let Tt=se.map(jt=>Bi({row:Math.min(Math.max(jt.row,gt.row),pt.row),col:Math.min(Math.max(jt.col,gt.col),pt.col),isRowAbs:jt.isRowAbs,isColAbs:jt.isColAbs})).join(":");return`${K.getFullSheetName()}${Tt}`}return`${K.getFullSheetName()}${K.getValue()}`},L="",W=Ji(n);for(let K=0,Q=W.size();K<Q;K++)L+=R(W.get(K));return L}function vc(n,e,t){let r=g=>{if(!g.isCellRange()||(g.getSheetName()||t)!==e.shName)return g.getText();let R=g.getValue(),L=R.split(":").map(bs),W=ld(R),K=e.includes(W.top,W.left),Q=e.includes(W.bottom,W.right),oe=e.includes(W.top,W.right),se=e.includes(W.bottom,W.left),[he,me]=Fg(L);if(!K&&!Q)return g.getText();if(K&&Q)return"#REF!";K&&oe&&(he.row=e.to.row+1),se&&Q&&(me.row=e.from.row-1),K&&se&&(he.col=e.to.col+1),oe&&Q&&(me.col=e.from.col-1);let ye=L.map(Te=>Bi({row:Math.min(Math.max(Te.row,he.row),me.row),col:Math.min(Math.max(Te.col,he.col),me.col),isRowAbs:Te.isRowAbs,isColAbs:Te.isColAbs})).join(":");return`${g.getFullSheetName()}${ye}`},i="",a=Ji(n);for(let g=0,R=a.size();g<R;g++)i+=r(a.get(g));return i}function MT(n,e){let t,r;e===void 0&&(e=!1);let i={};function a(W,K){return W?e?W[0]&&W[0].charAt(0)==="-"?parseInt(W[0].slice(1),10):null:W[0]||!W[1]?null:K(W[1]):null}function g(W){let K=a(W,tu);K!==null&&(!Object.prototype.hasOwnProperty.call(i,"row")||i.row>K)&&(i.row=K)}function R(W){let K=a(W,Ia);K!==null&&(!Object.prototype.hasOwnProperty.call(i,"col")||i.col>K)&&(i.col=K)}let L=e?iu:sd;for(let W of n)if(typeof W=="string"){for(Gn.setInput(W),e&&Gn.pushState("R1C1");!Gn.done;)switch(t=Gn.next(),r=Gn.yytext,t){case Ft.CELL:{let K=r.match(L.CELL);e?(g([K[1],K[2]]),R([K[3],K[4]])):(g([K[3],K[4]]),R([K[1],K[2]]));break}case Ft.COLRANGECELL:{let K=r.match(L.COLRANGECELL);R([K[1],K[2]]),R([K[3],K[4]]);break}case Ft.ROWRANGECELL:{let K=r.match(L.ROWRANGECELL);g([K[1],K[2]]),g([K[3],K[4]]);break}case Ft.error:i={}}e&&Gn.popState()}return i}class dl{constructor(){this.keepNull=!1,this.keepNfId=!1,this.keepLink=!1}assign(e){return Object.assign(this,e),this}}class Vb extends dl{constructor(){super(),this.skipHiddenRow=!1,this.skipHiddenCol=!1,this.skipFiltered=!1,this.skipSubtotal=!1}}function yc(n){let e={row:0,col:0},t={row:Number.MAX_VALUE,col:Number.MAX_VALUE};for(let r=0,i=n.length;r<i;r++){let{row:a,col:g}=n[r];a<t.row&&(t.row=a),g<t.col&&(t.col=g),a>e.row&&(e.row=a),g>e.col&&(e.col=g)}return{from:t,to:e}}var Hb=function(n){return n[n.ERROR=0]="ERROR",n[n.VALUE=1]="VALUE",n[n.ARRAY=2]="ARRAY",n[n.CELL_REF=3]="CELL_REF",n[n.ROW_REF=4]="ROW_REF",n[n.COL_REF=5]="COL_REF",n}(Hb||{});class Co{constructor(e,t){this.v=e,this.t=t}static fromValue(e){let t=1;return Array.isArray(e)?t=2:Pi(e)&&(t=0),new Co(e,t)}isError(){return this.t===0}isValue(){return this.t===1}isArray(){return this.t===2}isCellRef(){return this.t===3}isRowRef(){return this.t===4}isColRef(){return this.t===5}isRef(){return this.isCellRef()||this.isRowRef()||this.isColRef()}set(e,t){this.t=Hb[e],this.v=t}resolve(e,t){return this.isArray()?this.v.map(r=>r.map(i=>i instanceof Co?i.resolve(e,t):i)):this.v}finalize(e){return function t(r){return Array.isArray(r)?r.map(t):typeof r=="number"?Yi(r):r}(this._finalize(e))}_finalize(e,t){return this.resolve(e,t)}addCellRef(e){this.t=0,this.v=Wn.ERROR}}class oo extends Co{constructor(e,t,r){super(e,t),this.shName=r,this.isImplicit=!1}resolve(e,t){switch(t=t||new dl,this.t){case 3:return this.v.length>1?e.rangeValue(this,t):e.cellValue(this,t);case 4:return e.rowRangeValue(this,t);case 5:return e.colRangeValue(this,t);default:return this.v}}resolveDimension(e){switch(this.t){case 3:return this.v.length>1?e.rangeDimension(this):{height:0,width:0};case 4:return e.rowRangeDimension(this);case 5:return e.colRangeDimension(this);default:return{height:0,width:0}}}finalize(e){let t=new dl().assign({keepNfId:!0});return this.isCellRef()&&this.v.length===1&&(t.keepLink=!0),this._finalize(e,t)}setImplicit(){this.isImplicit=!0}addCellRef(e){this.t===3&&this.v&&e.t===3&&e.v?(this.v.push(e.v[0]),e.isImplicit&&this.setImplicit()):Co.prototype.addCellRef.call(this,e)}static fromCell(e,t,r){let i=new oo([e],3,t);return r&&i.setImplicit(),i}static fromRange(e,t,r){let i=oo.fromCell(e.from,t,r);return i.v.push(e.to),i}static createRangeRef(e,t){return new oo(e.split(":").map(bs),3,t)}static createCellRef(e,t){return new oo([bs(e)],3,t)}static createRowRef(e,t){let[{row:r},{row:i}]=wh(e);return new oo([r,i],4,t)}static createColRef(e,t){let[{col:r},{col:i}]=wh(e);return new oo([r,i],5,t)}toRange(){let e=this.v;switch(this.t){case 3:if(!(e.length>1))return new mi(e[0],{row:e[0].row,col:e[0].col},this.shName);{let{from:t,to:r}=yc(e);return new mi(t,r,this.shName)}case 4:return new ta(Math.min(e[0],e[1]),Math.max(e[0],e[1]),this.shName);case 5:return new na(Math.min(e[0],e[1]),Math.max(e[0],e[1]),this.shName);default:throw Error("unexpected expr type")}}toCellRef(e){let t,r=e.getInstance(this);if(!r)return null;switch(this.t){case 3:t=[(t=yc(this.v)).from,t.to];break;case 4:t=[{row:Math.min(this.v[0],this.v[1]),col:0},{row:Math.max(this.v[0],this.v[1]),col:r.countCols()-1}];break;case 5:t=[{row:0,col:Math.min(this.v[0],this.v[1])},{row:r.countRows()-1,col:Math.max(this.v[0],this.v[1])}]}if(!t)return null;let i=new oo(t,3,this.shName);return this.isImplicit&&i.setImplicit(),i}toVisibleRefExpr(){let e=new DT(this.v,this.t,this.shName);return this.isImplicit&&e.setImplicit(),e}}class DT extends oo{resolve(e,t){switch(t=t||new dl,this.t){case 3:return this.v.length>1?e.visibleRangeValue(this,t):e.visibleCellValue(this,t);case 4:return e.visibleRowRangeValue(this,t);case 5:return e.visibleColRangeValue(this,t);default:return this.v}}}class OT extends Co{constructor(e,t){super(e,1),this.href=t}finalize(e){let t=e.item;return t&&(t.href=this.href),this._finalize(e)}}function vf(n,e){return Array(n).fill(null).map(t=>Array(e))}function $g(n,e){return e===void 0&&(e=0),Array.from({length:n},(t,r)=>r+e)}function ca(n,e){return n instanceof oo?n.resolveDimension(e):(n instanceof Co&&(n=n.v),Array.isArray(n)?{height:n.length,width:Array.isArray(n[0])?n[0].length:1}:{height:0,width:0})}function sv(n){let e=function a(g){return Array.isArray(g)?1+a(g[0]):0}(n),t=n,r=1,i=1;switch(e){case 0:t=[[n]];break;case 1:r=1,i=n.length,t=[n];break;case 2:r=n.length,i=n[0].length}return{value:t,dimension:e,height:r,width:i,isCell:r===1&&i===1,isRow:r===1&&i>1,isCol:r>1&&i===1,isRange:r>1&&i>1}}function $b(n,e){let t=$g(n);for(let r=n;r<e.length;r+=2)t.push(r);return t}let Cs={};function yf(n,e){let t=n.map(sv);if(t.some(W=>W.dimension>2))return Wn.VALUE;if(t.every(W=>W.isCell))return e(t.map(W=>W.value[0][0]));let r=t.reduce((W,K)=>{let{height:Q}=K;return Math.max(W,Q)},Number.NEGATIVE_INFINITY),i=t.reduce((W,K)=>{let{width:Q}=K;return Math.max(W,Q)},Number.NEGATIVE_INFINITY),a=t.map(W=>function(K,Q,oe){let{value:se,height:he,width:me,dimension:ye,isRow:Te,isCol:Me,isCell:Oe}=K;if(!Te&&!Me&&!Oe)return se;Te&&(oe=me),Me&&(Q=he);let ze=vf(Q,oe);for(let We=0;We<Q;We++){let qe=Oe||Te?0:We;for(let Ke=0;Ke<oe;Ke++){let at=Oe||Me?0:Ke;ze[We][Ke]=se[qe][at]}}return ze}(W,r,i)),g=vf(r,i),R=a.reduce((W,K)=>Math.min(W,K.length),Number.POSITIVE_INFINITY),L=a.reduce((W,K)=>Math.min(W,K[0].length),Number.POSITIVE_INFINITY);for(let W=0;W<r;W++)for(let K=0;K<i;K++)g[W][K]=W>=R||K>=L?Wn.NA:e(a.map(Q=>Q[W][K]));return g}function zg(n,e,t){if(t===void 0&&(t=0),t===0)return e(n);let r=n.slice(0,t);return n=n.slice(t),yf(r,i=>e([...i,...n]))}function bh(n,e,t){t=t.slice();let r=n.slice();for(;t.length>0&&t[t.length-1]>=n.length;)t.pop();for(let i of t)r[i]=[[0]];return yf(r,i=>{for(let a of t)i[a]=n[a];return e(i)})}function hd(n){return function(e,t){return bh(e,t,n)}}let _s={};function Ta(n,e){let t=1,r=1;for(let i of n){let a=ca(i,e);t=Math.max(t,a.height),r=Math.max(r,a.width)}return t===1&&r===1?{height:0,width:0}:{height:t,width:r}}function zb(n,e,t){return Ta(n.filter((r,i)=>!t.includes(i)),e)}function cd(n){return function(e,t){return zb(e,t,n)}}[["IMPRODUCT","IMSUM","AND","OR","XOR","ROWS","COLUMNS","GCD","LCM","MULTINOMIAL","PRODUCT","SUM","SUMPRODUCT","SUMSQ","SUMX2MY2","SUMX2PY2","SUMXMY2","AVEDEV","AVERAGE","AVERAGEA","CHISQ.TEST","CHITEST","CONCAT","CORREL","COUNT","COUNTA","COUNTBLANK","COVAR","COVARIANCE.P","COVARIANCE.S","DEVSQ","F.TEST","FTEST","GEOMEAN","HARMEAN","INTERCEPT","KURT","MAX","MAXA","MEDIAN","MIN","MINA","MODE.SNGL","MODE","PEARSON","RSQ","SKEW.P","SKEW","SLOPE","STDEV.P","STDEV.S","STDEV","STDEVA","STDEVP","STDEVPA","STEYX","VAR.P","VAR.S","VAR","VARA","VARP","VARPA"],["NPV","SUBTOTAL","FORECAST"]].forEach((n,e)=>{if(n.length===0)return;let t=function(i,a){return zg(i,a,e)},r=function(i,a){return Ta(i.slice(0,e),a)};for(let i of n)Cs[i]=t,_s[i]=r}),["OFFSET","INDIRECT","INDEX","SEQUENCE","SORT","SORTBY","FILTER","RANDARRAY","TRANSPOSE","FLATTEN","UNIQUE"].forEach(n=>{Cs[n]=zg}),[["IRR","MIRR","TYPE","LARGE","PERCENTILE.EXC","PERCENTILE.INC","PERCENTILE","PERCENTRANK.EXC","PERCENTRANK.INC","PERCENTRANK","QUARTILE.EXC","QUARTILE.INC","QUARTILE","SMALL","TRIMMEAN"],["FVSCHEDULE","MATCH","RANK.AVG","RANK.EQ","RANK"],["NETWORKDAYS","WORKDAY"],["NETWORKDAYS.INTL","WORKDAY.INTL","SERIESSUM"]].forEach((n,e)=>{if(n.length===0)return;let t=hd([e]),r=cd([e]);for(let i of n)Cs[i]=t,_s[i]=r}),[[],["XIRR","PROB","T.TEST","TTEST","Z.TEST","ZTEST"]].forEach((n,e)=>{if(n.length===0)return;let t=hd($g(e+1)),r=cd($g(e+1));for(let i of n)Cs[i]=t,_s[i]=r}),[["SUMIF","AVERAGEIF","COUNTIF","COUNTIFS"],["SUMIFS","AVERAGEIFS","MAXIFS","MINIFS"]].forEach((n,e)=>{if(n.length===0)return;let t=function(i,a){return bh(i,a,$b(e,i))},r=function(i,a){return zb(i,a,$b(e,i))};for(let i of n)Cs[i]=t,_s[i]=r}),Cs.XNPV=hd([1,2]),_s.XNPV=cd([1,2]),Cs.ROW=zg,_s.ROW=function(n,e){let t=n[0];if(!t||!t.isRef())return{height:0,width:0};let{height:r}=t.resolveDimension(e);return{height:r,width:1}},Cs.COLUMN=zg,_s.COLUMN=function(n,e){let t=n[0];if(!t||!t.isRef())return{height:0,width:0};let{width:r}=t.resolveDimension(e);return{height:1,width:r}},Cs.HLOOKUP=hd([1,3]),_s.HLOOKUP=cd([1,3]),Cs.VLOOKUP=hd([1,3]),_s.VLOOKUP=cd([1,3]),Cs.IF=function(n,e){let{height:t,width:r}=sv(n[0]);return t>1||r>1?yf(n,e):e(n)},_s.IF=function(n,e){let t=n[0];if(!t)return{height:0,width:0};let{height:r,width:i}=ca(t,e);return r>1||i>1?Ta(n,e):ca(t.resolve(e,new dl)?n[1]:n[2],e)},Cs.XLOOKUP=hd([1,2]),_s.XLOOKUP=cd([1,2]),Cs.IFS=function(n,e){for(let t=0;t<n.length;t+=2){let{height:r,width:i}=sv(n[t]);if(r>1||i>1)return yf(n,e)}return e(n)},_s.IFS=function(n,e){for(let t=0;t<n.length;t+=2){let{height:r,width:i}=ca(n[t],e);if(r>1||i>1)return Ta(n,e)}for(let t=0;t<n.length;t+=2)if(n[t].resolve(e,new dl))return ca(n[t+1],e);return{height:0,width:0}};let NT=class{constructor(){this.visitedSet=new Set,this.stack=[]}push(n){return!this.visitedSet.has(n)&&(this.visitedSet.add(n),this.stack.push(n),!0)}pop(){if(this.stack.length===0)return;let n=this.stack.pop();return this.visitedSet.delete(n),n}top(){let n=this.stack.length;return n>0?this.stack[n-1]:null}markCircularReferences(n){let e=this.stack.indexOf(n);if(!(e<0))for(let t=e;t<this.stack.length;t++)this.stack[t].markCircularReference()}clear(){this.visitedSet.clear(),this.stack.length=0}},Wb=new Set(["OFFSET","CHOOSE","INDIRECT","INDEX","SEQUENCE","SORT","SORTBY","FILTER","RANDARRAY","TRANSPOSE","FLATTEN","UNIQUE","XLOOKUP","IMPORTRANGE"]),PT=new Set([...Wb,"IFS"]);class Ub{constructor(){this.funcState=[]}pushFuncName(e){this.funcState.push({name:e,argCount:0})}popFuncName(){this.funcState.pop()}pushArgs(e){this.funcState.length!==0&&(this.funcState[this.funcState.length-1].argCount+=e)}needRealValue(){for(let{name:e,argCount:t}of this.funcState)if(PT.has(e)||e==="IF"&&t===0)return!0;return!1}isReturnRefFunction(e){return Wb.has(e)}}class Wg{constructor(e,t){this.range=e,this.shName=e.shName,this.isImplicit=t}toRange(){return this.range}}let BT=class{constructor(n){this.workbook=n,this.footprint=new NT,this.instStack=[],this.dimHelpers=[],this._preValidateCell=null}preExec(n){let e=(n=n||{}).item;if(e&&!this.footprint.push(e))return this.footprint.markCircularReferences(e),!1;let t=this.workbook.getSheetById(n.sheetId);return!!t&&(this.instStack.push(t),this.dimHelpers.push(new Ub),n.preValidateCell&&(this._preValidateCell=n.preValidateCell),!0)}postExec(n){let e=!0,t=n.item;return t&&(this.footprint.pop(),t.circularRef&&(e=!1)),this.instStack.pop(),this.dimHelpers.pop(),n.preValidateCell&&this._preValidateCell===n.preValidateCell&&(this._preValidateCell=null),e}get item(){return this.footprint.top()}get preValidateCell(){return this._preValidateCell}cellValue(n,e){return this._getSourceData(n,function(t,r){let i=n.v[0];return t.cellValue(i.row,i.col,r,e)})}rangeValue(n,e){return this._getSourceData(n,function(t,r){let i=yc(n.v);return t.rangeValue(i.from,i.to,r,e)})}rowRangeValue(n,e){return this._getSourceData(n,function(t,r){let[i,a]=n.v;if(i>a){let g=i;i=a,a=g}return t.rangeValue({row:i,col:0},{row:a,col:Number.MAX_VALUE},r,e)})}colRangeValue(n,e){return this._getSourceData(n,function(t,r){let[i,a]=n.v;if(i>a){let g=i;i=a,a=g}return t.rangeValue({row:0,col:i},{row:Number.MAX_VALUE,col:a},r,e)})}visibleCellValue(n,e){return this._getSourceData(n,function(t,r){let i=n.v[0];return t.visibleCellValue(i.row,i.col,r,e)})}visibleRangeValue(n,e){return this._getSourceData(n,function(t,r){let i=yc(n.v);return t.visibleRangeValue(i.from,i.to,r,e)})}visibleRowRangeValue(n,e){return this._getSourceData(n,function(t,r){let[i,a]=n.v;if(i>a){let g=i;i=a,a=g}return t.visibleRangeValue({row:i,col:0},{row:a,col:Number.MAX_VALUE},r,e)})}visibleColRangeValue(n,e){return this._getSourceData(n,function(t,r){let[i,a]=n.v;if(i>a){let g=i;i=a,a=g}return t.visibleRangeValue({row:0,col:i},{row:Number.MAX_VALUE,col:a},r,e)})}createRowVector(n,e,t,r){return this._getSourceData(new Wg(n,t),function(i,a){return r(i.createRowVector(n,a,e))})}createColumnVector(n,e,t,r){return this._getSourceData(new Wg(n,t),function(i,a){return r(i.createColumnVector(n,a,e))})}createRangeVector(n,e,t,r){return this._getSourceData(new Wg(n,t),function(i,a){return r(i.createRangeVector(n,a,e))})}getExternalRange(n,e){return this.getCurrentInstance().formula.getExternalValue(n,e,this)}rangeDimension(n){return this._getRefDimension(n,e=>{let t=yc(n.v);return{height:t.to.row-t.from.row+1,width:t.to.col-t.from.col+1}})}rowRangeDimension(n){return this._getRefDimension(n,e=>{let[t,r]=n.v;if(t>r){let i=t;t=r,r=i}return{height:r-t+1,width:e.countCols()}})}colRangeDimension(n){return this._getRefDimension(n,e=>{let[t,r]=n.v;if(t>r){let i=t;t=r,r=i}return{height:e.countRows(),width:r-t+1}})}_getRefDimension(n,e){let t=n.shName?this.workbook.getSheetByName(n.shName):this.getCurrentInstance();return t?e(t):{height:1,width:1}}addItemSelfImplicit(){this.item?.setSelfImplicit()}_getSourceData(n,e){let t=this.getCurrentInstance(),r=n.shName?this.workbook.getSheetByName(n.shName):t,i=!!n.isImplicit;if(!r)return i&&this.item&&this.item.setUnknownName(n.shName),Wn.REF;let a=r!==t;a&&this.instStack.push(r),i&&this.item&&r.formula.addImplicitDep(this.item,n.toRange());let g=e(r.formula,this);return a&&this.instStack.pop(),g}getCurrentInstance(){return this.instStack[this.instStack.length-1]}getVariable(n,e){let t=this.getCurrentInstance().sheetId;if(e&&(e.charAt(0)==="'"&&(e=e.slice(1,-1).replace(/''/,"'")),t=this.workbook.getIdByName(e)),!t)return;let r=this.workbook.getNameManager();return r.get(n,t)||r.get(n)}getInstance(n){return n.shName?this.workbook.getSheetByName(n.shName):this.getCurrentInstance()}getLocale(){return this.workbook.getLocale()}getDimHelper(){return this.dimHelpers[this.dimHelpers.length-1]}};var Ka=Array.isArray;let zs=function(n){return typeof n=="string"||!Ka(n)&&ws(n)&&ru(n)=="[object String]"},ou=new dl,Vu=new dl().assign({keepNull:!0}),Gb=new dl().assign({keepNfId:!0});function Ss(n,e,t){t===void 0&&(t=ou);let r=[];for(let i of n)if(i.isError())r.push(i.v);else{let a=i.resolve(e,t);r.push(a)}return r}function wc(n,e){return Ss(n,e,Vu)}function Is(n,e,t){return Ss(function(r){for(let i=0,a=r.length;i<a;i++){let g=r[i];g.isValue()&&(ms(g.v)?g.v=+!!g.v:zs(g.v)&&g.v!==""&&!isNaN(g.v)&&(g.v=parseFloat(g.v)))}return r}(n),e,t)}function wf(n){return n}function Ch(n,e){if(n.length>0){n[0]=n[0].resolve(e,Vu);let{height:t,width:r}=ca(n[0],e);if(t>1||r>1)for(let i=1;i<n.length;i++)n[i]=n[i]?.resolve(e,ou)}return n}function Ws(n,e){return n.length>=2&&(n[1]=n[1].resolve(e,ou)),n}function lv(n,e){return n.length<2?n:[n[0].resolve(e,Vu),n[1]].concat(Ss(n.slice(2),e))}function au(n,e){return Ss(n,e,Vu)}function uv(n,e){return Is(n,e,Gb)}function _h(n,e){return Ss(n,e,Gb)}function su(n,e,t){for(let r=n;r<e.length;r+=2)e[r]=e[r].resolve(t,Vu);return e}function hv(n,e){return su(1,n,e)}function Ug(n,e){return su(2,n,e)}function bf(n,e){return Ss(n,e,Vu)}function jb(n,e){return n.length===0&&e.addItemSelfImplicit(),n}let cv={resolverTable:{ROW:jb,COLUMN:jb,ROWS:wf,COLUMNS:wf,OFFSET:function(n,e){return n.length===0?n:[n[0],...Ss(n.slice(1),e)]},SUM:uv,AVERAGE:uv,AVEDEV:Is,CHOOSE:Ch,SUBTOTAL:function(n,e){let t=n[0].resolve(e,ou),r=new Vb;r.skipHiddenRow=t>100,r.skipFiltered=!0,r.skipSubtotal=!0;let i=n.slice(1);for(let a=0;a<i.length;a++)i[a].isRef()&&(i[a]=i[a].toVisibleRefExpr());switch(t%100){case 1:case 9:r.keepNfId=!0,i=Is(i,e,r);break;case 2:i=Is(i,e,r);break;case 3:r.keepNull=!0,i=Ss(i,e,r);break;case 4:case 5:r.keepNfId=!0,i=Ss(i,e,r);break;default:i=Ss(i,e,r)}return[t].concat(i)},SUMIF:Ws,AVERAGEIF:Ws,SUMIFS:Ug,AVERAGEIFS:Ug,MAXIFS:Ug,MINIFS:Ug,IF:Ch,IFS:function(n,e){n=su(0,n,e);for(let t=0;t<n.length;t+=2){let{height:r,width:i}=ca(n[t],e);if(r>1||i>1){for(let a=1;a<n.length;a+=2)n[a]=n[a].resolve(e,ou);break}}return n},COUNT:Is,COUNTA:au,COUNTIF:hv,COUNTIFS:hv,ISBLANK:au,ISTEXT:au,ISNONTEXT:au,ISEVEN:au,ISODD:au,ISLOGICAL:au,ISNUMBER:au,TYPE:au,MATCH:lv,VLOOKUP:lv,HLOOKUP:lv,XLOOKUP:function(n,e){return n.length<3?n:[n[0].resolve(e,ou),n[1],n[2]].concat(Ss(n.slice(3),e))},MAX:_h,MIN:_h,INDIRECT:function(n,e){let t=Ss(n,e),r=t.length;return!Array.isArray(t)||r>2||r<1||(t[0]=t[0].toString(),t[1]=r===1||t[1]!==!1),t},ISDATE:wf,INDEX:function(n,e){let t=Is(n.slice(1),e);return t[0]=t[0]||0,t[1]=t[1]||0,[n[0]].concat(t)},SORT:bf,SORTBY:bf,"=":wc,">":wc,"<":wc,">=":wc,"<=":wc,"<>":wc,NOT:wc,"+":_h,"-":_h},defaultResolver:Ss},da=`{"DATE":{"description":"Converts a specified year, month, and day into date format.","arguments":[{"name":"year","description":"An integer representing the year. If between 0 and 1899 (inclusive), 1900 will be added to that value. If less than 0, equal to 10000, or greater than 10000, SpreadSheet returns the invalid #NUM!."},{"name":"month","description":"An integer representing the month. If negative, the returned date extends back into the previous year. If greater than 12, the returned date extends forward into the following year."},{"name":"day","description":"An integer representing the day. If less than 1, the returned date extends back into the previous month. If greater than the number of days in the month specified in the month argument, the returned date extends forward into the following month."}],"variadic":0,"category":"date_and_time","example":"DATE(A2, B2, C2)"},"DATEDIF":{"description":"Calculates the difference between two given dates in days, months, or years.","arguments":[{"name":"start_date","description":"The starting date."},{"name":"end_date","description":"The ending date."},{"name":"unit","description":"The abbreviation for the time unit. Acceptable units include \\"Y\\", \\"M\\", \\"D\\", \\"MD\\", \\"YM\\", and \\"YD\\".\\n\\"Y\\": Difference in years.\\n\\"M\\": Difference in months.\\n\\"D\\": Difference in days.\\n\\"MD\\": Difference in days, ignoring months and years.\\n\\"YM\\": Difference in months, ignoring years.\\n\\"YD\\": Difference in days, ignoring years.\\n"}],"variadic":0,"notes":["If the start_date value is greater than the end_date value, the result will be #NUM!."],"category":"date_and_time","example":"DATEDIF(DATE(2019,1,1),DATE(2020,3,1), \\"Y\\")"},"DATEVALUE":{"description":"Converts a date string into a value which can be recognized as a date.","arguments":[{"name":"date_text","description":"The date you want to convert into a value. The valid date_text string format depends on your locale settings, and should be enclosed in quotation marks."}],"variadic":0,"category":"date_and_time","example":"DATEVALUE(\\"1987/5/6\\")"},"DAY":{"description":"Returns the day of a given date.","arguments":[{"name":"serial_number","description":"The date that you want the day of."}],"variadic":0,"category":"date_and_time","example":"DAY(\\"1987/3/28\\")"},"DAYS360":{"description":"Calculates the number of days between two given dates, based on a 360-day year (30 days per month, 12 months per year).","arguments":[{"name":"end_date","description":"The starting date."},{"name":"start_date","description":"The ending date."},{"name":"method","description":"Enter FALSE or omit this argument if you want to use the U.S. (NASD) method. Enter TRUE if you want to use the European method.","required":false}],"variadic":0,"category":"date_and_time","example":"DAYS360(\\"2015/2/27\\", \\"2015/3/1\\")"},"EDATE":{"description":"Returns the date that is a specified number of months before or after a date.","arguments":[{"name":"start_date","description":"A date."},{"name":"months","description":"The number of months. Must be an integer."}],"variadic":0,"category":"date_and_time","example":"EDATE(\\"2015/5/23\\", 2)"},"EOMONTH":{"description":"Returns the last day of the month, that is a specified number of months before or after a given date.","arguments":[{"name":"start_date","description":"A date."},{"name":"months","description":"The number of months. Must be an integer."}],"variadic":0,"category":"date_and_time","example":"EOMONTH(\\"2016/2/16\\", 2)"},"HOUR":{"description":"Returns the hour of a given time value, in the form of an integer.","arguments":[{"name":"serial_number","description":"The time which contains the hour value that you wish to obtain."}],"variadic":0,"category":"date_and_time","example":"HOUR(\\"17:18\\")"},"MINUTE":{"description":"Returns the minute of the given time value, in the form of an integer ranging between 0 and 59.","arguments":[{"name":"serial_number","description":"The time which contains the minute value that you wish to obtain."}],"variadic":0,"category":"date_and_time","example":"MINUTE(\\"10:05\\")"},"MONTH":{"description":"Returns the month of a given date, in the form of an integer.","arguments":[{"name":"serial_number","description":"The date that you want the month of."}],"variadic":0,"category":"date_and_time","example":"MONTH(\\"2004/8/30\\")"},"NETWORKDAYS.INTL":{"description":"Calculates the number of workdays between two given dates. Weekends and holidays would not be considered as workdays.","arguments":[{"name":"start_date","description":"The starting date."},{"name":"end_date","description":"The ending date."},{"name":"weekend","description":"One or two consecutive days that would be considered as weekend. Each combination of weekend days is represented by a code.\\n1 or default: Saturday and Sunday\\n2: Sunday and Monday\\n3: Monday and Tuesday \\n4: Tuesday and Wednesday\\n5: Wednesday, Thursday\\n6: Thursday and Friday\\n7: Friday and Saturday\\n11: Sunday only\\n12: Monday only\\n13: Tuesday only\\n14: Wednesday only\\n15: Thursday only\\n16: Friday only\\n17: Saturday only\\n","required":false},{"name":"holidays","description":"The date(s) other than weekend that should not be considered as workdays.","required":false}],"variadic":0,"category":"date_and_time","example":"NETWORKDAYS.INTL(DATE(1996, 2, 12), DATE(1996, 9, 7))"},"NETWORKDAYS":{"description":"Calculates the number of workways between two given dates. All Saturdays, Sundays, and holidays will not be considered as workdays.","arguments":[{"name":"start_date","description":"The starting date."},{"name":"end_date","description":"The ending date."},{"name":"holidays","description":"The date(s) other than Saturday and Sunday that should not be considered as workdays.","required":false}],"variadic":0,"category":"date_and_time","example":"NETWORKDAYS(DATE(1956, 2, 3), DATE(1978, 3, 6), DATE(1966, 7, 15))"},"NOW":{"description":"Returns the date and time that is a specified number of days before or after the current date and time.","arguments":[],"variadic":0,"category":"date_and_time","example":"NOW()"},"SECOND":{"description":"Returns the second of the given time value, in the form of an integer ranging between 0 and 59.","arguments":[{"name":"serial_number","description":"The time which contains the second value that you wish to obtain."}],"variadic":0,"category":"date_and_time","example":"SECOND(\\"11:18:20\\")"},"TIME":{"description":"Converts hour, minute, and second values into a time in time format.","arguments":[{"name":"hour","description":"An integer between 0 and 23. If greater than 24, the returned hour will be the remainder after it has been divided by 24."},{"name":"minute","description":"An integer between 0 and 59. If greater than 60, the returned minute extends forward into the following hour."},{"name":"second","description":"An integer between 0 and 59. If greater than 60, the returned second extends forward into the following minute."}],"variadic":0,"category":"date_and_time","example":"TIME(A2,B2,C2)"},"TIMEVALUE":{"description":"Converts a time string into a value which can be recognized as a time.","arguments":[{"name":"time_text","description":"The time you want to convert into a value."}],"variadic":0,"category":"date_and_time","example":"TIMEVALUE(\\"13:40\\")"},"TODAY":{"description":"Returns the current date.","arguments":[],"variadic":0,"category":"date_and_time","example":"TODAY()"},"WEEKDAY":{"description":"Returns a number which represents the day of the week of a given date, in the form of an integer.","arguments":[{"name":"serial_number","description":"The date that you want to know the day of the week."},{"name":"return_type","description":"A code that determines the sequence of the day of the week.\\n1 or default: 1 (Sunday) to 7 (Saturday)\\n2: 1 (Monday) to 7 (Sunday)\\n3: 0 (Monday) to 6 (Sunday)\\n11: 1 (Monday) to 7 (Sunday)\\n12: 1 (Tuesday) to 7 (Monday)\\n13: 1 (Wednesday) to 7 (Tuesday)\\n14: 1 (Thursday) to 7 (Wednesday)\\n15: 1 (Friday) to 7 (Thursday)\\n16: 1 (Saturday) to 7 (Friday)\\n17: 1 (Sunday) to 7 (Saturday)\\n","required":false}],"variadic":0,"category":"date_and_time","example":"WEEKDAY(\\"2019/12/14\\", 2)"},"WEEKNUM":{"description":"Returns the week number of a given date.","arguments":[{"name":"serial_number","description":"The date that you want to get the week number of."},{"name":"return_type","description":"A code that determines which day of the week should be the first day of the week.\\n1 or default: Sunday\\n2: Monday\\n11: Monday\\n12: Tuesday\\n13: Wednesday\\n14: Thursday\\n15: Friday\\n16: Saturday\\n17: Sunday\\n21: Monday\\n","required":false}],"variadic":0,"category":"date_and_time","example":"WEEKNUM(\\"2019/11/5\\", 2)"},"WORKDAY.INTL":{"description":"Returns the work date that is a specified number of workdays after a date. Weekends and holidays would not be considered as workdays.","arguments":[{"name":"start_date","description":"The starting date."},{"name":"days","description":"The number of days. Must be an integer."},{"name":"weekend","description":"One or two consecutive days that would be considered as weekend. Each combination of weekend days is represented by a code.\\n1 or default: Saturday and Sunday\\n2: Sunday and Monday\\n3: Monday and Tuesday \\n4: Tuesday and Wednesday\\n5: Wednesday, Thursday\\n6: Thursday and Friday\\n7: Friday and Saturday\\n11: Sunday only\\n12: Monday only\\n13: Tuesday only\\n14: Wednesday only\\n15: Thursday only\\n16: Friday only\\n17: Saturday only\\n","required":false},{"name":"holidays","description":"The date(s) other than weekend that should not be considered as workdays.","required":false}],"variadic":0,"category":"date_and_time","example":"WORKDAY.INTL(DATE(2019, 11, 30), 60, 11, DATE(2020, 1, 1))"},"WORKDAY":{"description":"Returns the work date that is a specified number of workdays after a date. Weekends and holidays would not be considered as workdays.","arguments":[{"name":"start_date","description":"The starting date."},{"name":"days","description":"The number of days. Must be an integer."},{"name":"holidays","description":"The date(s) other than weekend that should not be considered as workdays.","required":false}],"variadic":0,"category":"date_and_time","example":"WORKDAY(DATE(2019, 10, 18), 150, DATE(2019, 12, 27))"},"YEAR":{"description":"Returns the year of a given time value, in the form of an integer ranging between 1900 and 9999.","arguments":[{"name":"serial_number","description":"The time which contains the year value that you wish to obtain."}],"variadic":0,"category":"date_and_time","example":"YEAR(\\"2019/12/12\\")"},"YEARFRAC":{"description":"Calculates the fraction of a year between two given dates.","arguments":[{"name":"start_date","description":"The starting date."},{"name":"end_date","description":"The ending date."},{"name":"basis","description":"A code that determines the day count basis.\\n0 or default: 30/360 (US)\\n1: actual/actual\\n2: actual/360\\n3: actual/365\\n4: 30/360 (European)\\n","required":false}],"variadic":0,"category":"date_and_time","example":"YEARFRAC(A2, A3, 3)"},"BESSELI":{"description":"Calculates the result of the modified Bessel function.","arguments":[{"name":"x","description":"The number used to evaluate the modified Bessel function."},{"name":"n","description":"The number that decides the order of the Bessel function."}],"variadic":0,"category":"engineering","example":"BESSELI(8, 2)"},"BESSELJ":{"description":"Calculates the result of the Bessel function.","arguments":[{"name":"x","description":"The number used to evaluate the Bessel function."},{"name":"n","description":"The number that decides the order of the Bessel function."}],"variadic":0,"category":"engineering","example":"BESSELJ(7, 5)"},"BESSELK":{"description":"Calculates the result of the modified Bessel function.","arguments":[{"name":"x","description":"The number used to evaluate the modified Bessel function."},{"name":"n","description":"The number that decides the order of the Bessel function."}],"variadic":0,"category":"engineering","example":"BESSELK(1, 7)"},"BESSELY":{"description":"Calculates the result of the Bessel function.","arguments":[{"name":"x","description":"The number used to evaluate the Bessel function."},{"name":"n","description":"The number that decides the order of the Bessel function."}],"variadic":0,"category":"engineering","example":"BESSELY(11, 2)"},"BIN2DEC":{"description":"Converts a binary number into a decimal number.","arguments":[{"name":"number","description":"The binary number that you want to convert. Must contain no more than 10 characters. Negative numbers should be represented using two's complement notation."}],"variadic":0,"category":"engineering","example":"BIN2DEC(101)"},"BIN2HEX":{"description":"Converts a binary number into a hexadecimal number.","arguments":[{"name":"number","description":"The binary number that you want to convert. Must contain no more than 10 characters. Negative numbers should be represented using two's complement notation."},{"name":"places","description":"The number of characters of the returned number. Must be a positive integer equal to or larger than the number of characters that the returned number needs. If left blank, the minimum number of necessary characters is used.","required":false}],"variadic":0,"category":"engineering","example":"BIN2HEX(1010)"},"BIN2OCT":{"description":"Converts a number from binary format into the octal format.","arguments":[{"name":"number","description":"The binary number that you want to convert, which should not be more than 10 characters."},{"name":"places","description":"The number of characters.","required":false}],"variadic":0,"category":"engineering","example":"BIN2OCT(101110111, 4)"},"BITAND":{"description":"Returns the result of AND function by inputting two base 10 numbers.","arguments":[{"name":"number1","description":"The first base 10 number."},{"name":"number2","description":"The second base 10 number."}],"variadic":0,"category":"engineering","example":"BITAND(165, 48)"},"BITLSHIFT":{"description":"Returns a base 10 number by converting a base 10 number into a base 2 number, adding a specified number of bits to it, and converting it back to a 10 base number.","arguments":[{"name":"number","description":"The base 10 number that you want to convert."},{"name":"shift","description":"The number of bits that you want to add."}],"variadic":0,"category":"engineering","example":"BITLSHIFT(86, 2)"},"BITOR":{"description":"Returns the result of OR function by inputting two base 10 numbers.","arguments":[{"name":"number1","description":"The first base 10 number."},{"name":"number2","description":"The second base 10 number."}],"variadic":0,"category":"engineering","example":"BITOR(165, 48)"},"BITRSHIFT":{"description":"Returns a base 10 number by converting a base 10 number into a base 2 number, eliminating a specified number of bits from it, and converting it back to a base 10 number.","arguments":[{"name":"number","description":"The base 10 number that you want to convert."},{"name":"shift","description":"The number of bits that you want to eliminate."}],"variadic":0,"category":"engineering","example":"BITRSHIFT(498, 3)"},"BITXOR":{"description":"Returns the result of XOR function by inputting two base 10 numbers.","arguments":[{"name":"number1","description":"The first base 10 number."},{"name":"number2","description":"The second base 10 number."}],"variadic":0,"category":"engineering","example":"BITXOR(165, 48)"},"COMPLEX":{"description":"Converts a real coefficient and an imaginary coefficient into a complex number.","arguments":[{"name":"real","description":"The real coefficient."},{"name":"imaginary","description":"The imaginary coefficient."},{"name":"suffix","description":"The imaginary coefficient part of the complex number, which could be \\"i\\" or \\"j\\".","required":false}],"variadic":0,"category":"engineering","example":"COMPLEX(95, 27)"},"DEC2BIN":{"description":"Converts a base 10 number into a base 2 number.","arguments":[{"name":"number","description":"The base 10 number that you want to convert. The number must be less than 511 and larger than -512."},{"name":"places","description":"The number of characters.","required":false}],"variadic":0,"category":"engineering","example":"DEC2BIN(52, 8)"},"DEC2HEX":{"description":"Converts a base 10 number into a base 16 number.","arguments":[{"name":"number","description":"The base 10 number that you want to convert."},{"name":"places","description":"The number of characters.","required":false}],"variadic":0,"category":"engineering","example":"DEC2HEX(90)"},"DEC2OCT":{"description":"Converts a base 10 number into a base 8 number.","arguments":[{"name":"number","description":"The base 10 number that you want to convert."},{"name":"places","description":"The number of characters.","required":false}],"variadic":0,"category":"engineering","example":"DEC2OCT(45, 4)"},"DELTA":{"description":"Returns 1 if the first value and the second value are equal. Returns 0 if the first value and the second value are not equal.","arguments":[{"name":"number1","description":"The first value."},{"name":"number2","description":"The second value. Default means the second value is 0.","required":false}],"variadic":0,"category":"engineering","example":"DELTA(3, 3)"},"ERF.PRECISE":{"description":"Returns the result of the error function.","arguments":[{"name":"x","description":"The lower boundary value."}],"variadic":0,"category":"engineering","example":"ERF.PRECISE(0.258)"},"ERF":{"description":"Returns the result of the error function.","arguments":[{"name":"lower_limit","description":"The lower boundary value."},{"name":"upper_limit","description":"The upper boundary value.","required":false}],"variadic":0,"category":"engineering","example":"ERF(0.2, 1)"},"ERFC.PRECISE":{"description":"Returns the result of a complementary error function between the lower boundary value and infinity.","arguments":[{"name":"x","description":"The lower boundary value."}],"variadic":0,"category":"engineering","example":"ERFC.PRECISE(3.1)"},"ERFC":{"description":"Returns the result of a complementary error function between the lower boundary value and infinity.","arguments":[{"name":"x","description":"The lower boundary value."}],"variadic":0,"category":"engineering","example":"ERFC(0.5)"},"GESTEP":{"description":"Returns 1 if the number is greater than or equal to the step. Returns 0 if the number is less than the step.","arguments":[{"name":"number","description":"The value to be tested against the step value."},{"name":"step","description":"The threshold. The default is set to 0.","required":false}],"variadic":0,"category":"engineering","example":"GESTEP(-0.2,-0.2)"},"HEX2BIN":{"description":"Converts a base 16 number into a base 2 number.","arguments":[{"name":"number","description":"The base 16 number that you want to convert."},{"name":"places","description":"The number of characters.","required":false}],"variadic":0,"category":"engineering","example":"HEX2BIN(\\"D3\\", 9)"},"HEX2DEC":{"description":"Converts a base 16 number into a base 10 number.","arguments":[{"name":"number","description":"The base 16 number that you want to convert."}],"variadic":0,"category":"engineering","example":"HEX2DEC(\\"E77\\")"},"HEX2OCT":{"description":"Converts a base 16 number into a base 8 number.","arguments":[{"name":"number","description":"The base 16 number that you want to convert."},{"name":"places","description":"The number of characters.","required":false}],"variadic":0,"category":"engineering","example":"HEX2OCT(\\"BF7\\", 5)"},"IMABS":{"description":"Returns the absolute value of a complex number.","arguments":[{"name":"inumber","description":"The complex number that you want the absolute value for. Must be in the x+yi or x+yj text format."}],"variadic":0,"category":"engineering","example":"IMABS(\\"3+4i\\")"},"IMAGINARY":{"description":"Returns the imaginary coefficient of a complex number.","arguments":[{"name":"inumber","description":"The complex number that you want the imaginary coefficient for. Must be in the x+yi or x+yj text format."}],"variadic":0,"category":"engineering","example":"IMAGINARY(\\"2+3i\\")"},"IMARGUMENT":{"description":"Calculates the result of the Theta argument.","arguments":[{"name":"inumber","description":"The complex number that you want to calculate using the Theta argument."}],"variadic":0,"category":"engineering","example":"IMARGUMENT(\\"5-3i\\")"},"IMCONJUGATE":{"description":"Returns the complex conjugate of a complex number.","arguments":[{"name":"inumber","description":"The complex number that you want the conjugate for. Must be in the x+yi or x+yj text format."}],"variadic":0,"category":"engineering","example":"IMCONJUGATE(\\"2+3i\\")"},"IMCOS":{"description":"Calculates the cosine of a complex number.","arguments":[{"name":"inumber","description":"The complex number for which you want to know the cosine."}],"variadic":0,"category":"engineering","example":"IMCOS(\\"0.3+2i\\")"},"IMCOSH":{"description":"Calculates the hyperbolic cosine of a complex number.","arguments":[{"name":"inumber","description":"The complex number for which you want to know the hyperbolic cosine."}],"variadic":0,"category":"engineering","example":"IMCOSH(\\"0.3+2i\\")"},"IMCOT":{"description":"Calculates the cotangent of a complex number.","arguments":[{"name":"inumber","description":"The complex number for which you want to know the cotangent."}],"variadic":0,"category":"engineering","example":"IMCOT(\\"0.3+2i\\")"},"IMCSC":{"description":"Returns the cosecant of a complex number.","arguments":[{"name":"inumber","description":"The complex number that you want to calculate the cosecant of. Must be in the x+yi or x+yj text format."}],"variadic":0,"category":"engineering","example":"IMCSC(\\"2+3i\\")"},"IMCSCH":{"description":"Calculates the hyperbolic cosecant of a complex number.","arguments":[{"name":"inumber","description":"The complex number for which you want to know the hyperbolic cosecant."}],"variadic":0,"category":"engineering","example":"IMCSCH(\\"0.3+2i\\")"},"IMDIV":{"description":"Divides one complex number by another and returns the quotient.","arguments":[{"name":"inumber1","description":"The numerator (i.e., the dividend). The complex number must be in the x+yi or x+yj text format."},{"name":"inumber2","description":"The denominator (i.e., the divisor). The complex number must be in the x+yi or x+yj text format."}],"variadic":0,"category":"engineering","example":"IMDIV(\\"2+3i\\", \\"-4+5i\\")"},"IMEXP":{"description":"Calculates the exponential of a complex number.","arguments":[{"name":"inumber","description":"The complex number for which you want to know the exponential."}],"variadic":0,"category":"engineering","example":"IMEXP(\\"0.3+2i\\")"},"IMLN":{"description":"Calculates the natural logarithm of a complex number.","arguments":[{"name":"inumber","description":"The complex number for which you want to know the natural logarithm."}],"variadic":0,"category":"engineering","example":"IMLN(\\"0.3+2i\\")"},"IMLOG10":{"description":"Calculates the base 10 logarithm of a complex number.","arguments":[{"name":"inumber","description":"The complex number for which you want to know the base 10 logarithm."}],"variadic":0,"category":"engineering","example":"IMLOG10(\\"0.3+2i\\")"},"IMLOG2":{"description":"Calculates the base 2 logarithm of a complex number.","arguments":[{"name":"inumber","description":"The complex number for which you want to know the base 2 logarithm."}],"variadic":0,"category":"engineering","example":"IMLOG2(\\"0.3+2i\\")"},"IMPOWER":{"description":"Calculates a complex number raised to a power.","arguments":[{"name":"inumber","description":"The complex number that you want to raise to a given power."},{"name":"number","description":"The power to which the complex number is to be raised."}],"variadic":0,"category":"engineering","example":"IMPOWER(\\"0.3+2i\\", 2)"},"IMPRODUCT":{"description":"Multiplies all given complex numbers and returns the product.","arguments":[{"name":"inumber1","description":"The first complex number to be multiplied. The complex number must be in the x+yi or x+yj text format."},{"name":"inumber2","description":"Additional complex numbers be multiplied. The complex number must be in the x+yi or x+yj text format.","required":false}],"variadic":1,"category":"engineering","example":"IMPRODUCT(\\"2+3i\\", \\"-4+5i\\")"},"IMREAL":{"description":"Returns the real coefficient of a complex number.","arguments":[{"name":"inumber","description":"The complex number that you want the real coefficient for. The complex number must be in the x+yi or x+yj text format."}],"variadic":0,"category":"engineering","example":"IMREAL(\\"2+3i\\")"},"IMSEC":{"description":"Calculates the secant of a complex number.","arguments":[{"name":"inumber","description":"The complex number for which you want to know the secant."}],"variadic":0,"category":"engineering","example":"IMSEC(\\"0.3+2i\\")"},"IMSECH":{"description":"Calculates the hyperbolic secant of a complex number.","arguments":[{"name":"inumber","description":"The complex number for which you want to know the hyperbolic secant."}],"variadic":0,"category":"engineering","example":"IMSECH(\\"0.3+2i\\")"},"IMSIN":{"description":"Calculates the sine of a complex number.","arguments":[{"name":"inumber","description":"The complex number for which you want to know the sine."}],"variadic":0,"category":"engineering","example":"IMSIN(\\"0.3+2i\\")"},"IMSINH":{"description":"Calculates the hyperbolic sine of a complex number.","arguments":[{"name":"inumber","description":"The complex number for which you want to know the hyperbolic sine."}],"variadic":0,"category":"engineering","example":"IMSINH(\\"0.3+2i\\")"},"IMSQRT":{"description":"Calculates the square root of a complex number.","arguments":[{"name":"inumber","description":"The complex number that you want to know the square root."}],"variadic":0,"category":"engineering","example":"IMSQRT(\\"2+5i\\")"},"IMSUB":{"description":"Calculates the difference between two complex numbers.","arguments":[{"name":"inumber1","description":"The first complex number."},{"name":"inumber2","description":"The second complex number."}],"variadic":0,"category":"engineering","example":"IMSUB(\\"1+i\\",\\" 2+2i\\")"},"IMSUM":{"description":"Calculates the sum of supplied complex numbers.","arguments":[{"name":"inumber1","description":"The first complex number."},{"name":"inumber2","description":"Subsequent complex numbers.","required":false}],"variadic":1,"category":"engineering","example":"IMSUM(\\"1+i\\",\\" 2+2i\\")"},"IMTAN":{"description":"Calculates the tangent of a complex number.","arguments":[{"name":"inumber","description":"The complex number for which you want to know the tangent."}],"variadic":0,"category":"engineering","example":"IMTAN(\\"3+3i\\")"},"OCT2BIN":{"description":"Converts a base 8 number into a base 2 number.","arguments":[{"name":"number","description":"The base 8 number that you want to convert. The number must be no more than 10 characters."},{"name":"places","description":"The number of characters.","required":false}],"variadic":0,"category":"engineering","example":"OCT2BIN(117, 12)"},"OCT2DEC":{"description":"Converts a base 8 number into a base 10 number.","arguments":[{"name":"number","description":"The base 8 number that you want to convert."}],"variadic":0,"category":"engineering","example":"OCT2DEC(415)"},"OCT2HEX":{"description":"Converts a base 8 number into a base 16 number.","arguments":[{"name":"number","description":"The base 8 number that you want to convert."},{"name":"places","description":"The number of characters.","required":false}],"variadic":0,"category":"engineering","example":"OCT2HEX(2354, 5)"},"ACCRINT":{"description":"Calculates the accrued interest for a security which distributes periodic interest payments.","arguments":[{"name":"issue","description":"Date the security was issued."},{"name":"first","description":"Date of first interest paid."},{"name":"settlement","description":"Date of settlement."},{"name":"rate","description":"Interest rate of security."},{"name":"par","description":"Base value of security."},{"name":"frequency","description":"Frequency the interest payment is distributed."},{"name":"basis","description":"Day count basis.","required":false}],"variadic":0,"category":"financial","example":"ACCRINT(B2, B3, B4, B5, B6, B7, B8)"},"CUMIPMT":{"description":"Calculates the cumulative interest paid between the start period and end period.","arguments":[{"name":"rate","description":"The interest rate."},{"name":"nper","description":"The number of periods of the loan."},{"name":"pv","description":"The present value of the loan."},{"name":"start_period","description":"The first period."},{"name":"end_period","description":"The last period."},{"name":"type","description":"When the payment will be made.\\n0: Pay at the end of each period.\\n1: Pay at the beginning of each period.\\n"}],"variadic":0,"category":"financial","example":"CUMIPMT(A2/12, A3*12, A4, 2, 15, 1)"},"CUMPRINC":{"description":"Calculates the cumulative payment between the start period and end period.","arguments":[{"name":"rate","description":"The interest rate."},{"name":"nper","description":"The number of periods of the loan."},{"name":"pv","description":"The present value of the loan."},{"name":"start_period","description":"The first period."},{"name":"end_period","description":"The last period."},{"name":"type","description":"When the payment will be made.\\n0: Pay at the end of each period.\\n1: Pay at the beginning of each period.\\n"}],"variadic":0,"category":"financial","example":"CUMPRINC(A2/12, A3*12, A4, 2, 15, 1)"},"DB":{"description":"Calculates the depreciation amount of an asset using the fixed declining balance method for a specified period.","arguments":[{"name":"cost","description":"The original cost of the asset."},{"name":"salvage","description":"The residual value of the asset."},{"name":"life","description":"The useful life of the asset."},{"name":"period","description":"The depreciation period."},{"name":"month","description":"The number of months in the first year. Default value is 12 months.","required":false}],"variadic":0,"category":"financial","example":"DB(A2, A3, A4, 3)"},"DDB":{"description":"Calculates the depreciation amount of an asset using the double-declining balance method or another method for a specified period.","arguments":[{"name":"cost","description":"The original cost of the asset."},{"name":"salvage","description":"The residual value of the asset."},{"name":"life","description":"The useful life of the asset."},{"name":"period","description":"The depreciation period."},{"name":"factor","description":"The declining rate. Defaults to 2.","required":false}],"variadic":0,"category":"financial","example":"DDB(A2, A3, A4, 3, 1.78)"},"DOLLARDE":{"description":"Converts a dollar value expressed as a fraction into a dollar value expressed as a decimal number.","arguments":[{"name":"dollar","description":"The dollar value you want to convert, expressed as a fraction."},{"name":"fraction","description":"The denominator in integer form."}],"variadic":0,"category":"financial","example":"DOLLARDE(2.07, 24)"},"DOLLARFR":{"description":"Converts a dollar value expressed as a decimal number into a dollar value expressed as a fraction.","arguments":[{"name":"dollar","description":"The dollar value you want to convert, expressed as a decimal number."},{"name":"fraction","description":"The denominator in integer form."}],"variadic":0,"category":"financial","example":"DOLLARFR(1.78, 5)"},"EFFECT":{"description":"Calculates the effective annual rate based on the given nominal annual rate and the number of compounding periods per year.","arguments":[{"name":"nominal_rate","description":"The nominal annual rate."},{"name":"npery","description":"The number of compounding periods."}],"variadic":0,"category":"financial","example":"EFFECT(0.787788, 2)"},"FV":{"description":"Calculates the future value of an investment.","arguments":[{"name":"rate","description":"The interest rate of each period."},{"name":"periods","description":"The total number of payment periods."},{"name":"payment","description":"The payment amount for each period."},{"name":"value","description":"The present value of the investment. The default value is 0.","required":false},{"name":"type","description":"When the payment will be made.\\n0: The default value. Pay at the end of each period.\\n1: Pay at the beginning of each period.\\n","required":false}],"variadic":0,"category":"financial","example":"FV(A2/12, A3, A4, A5)"},"FVSCHEDULE":{"description":"Calculates the future value of a principal based on a variable compound interest rate.","arguments":[{"name":"principal","description":"The present value."},{"name":"schedule","description":"A set of variable compound interest rates."}],"variadic":0,"category":"financial","example":"FVSCHEDULE(100, {0.01, 0.02, 0.03})"},"IPMT":{"description":"Calculates the amount of interest payment on a loan during a specific period, based on a constant interest rate.","arguments":[{"name":"rate","description":"The interest rate of each period."},{"name":"period","description":"The period that you want to calculate the amount of interest."},{"name":"periods","description":"The total number of payment periods."},{"name":"present","description":"The present value of the loan."},{"name":"future","description":"The future value after the final payment.","required":false},{"name":"type","description":"When the payment will be made. \\n0: Pay at the end of each period.\\n1: Pay at the beginning of each period.\\n","required":false}],"variadic":0,"category":"financial","example":"IPMT(A2/12, A3, A4*12, A5)"},"IRR":{"description":"Calculates the internal rate of return with an initial investment amount and other values in regular time intervals, such as monthly or annually. The returned value is the interest rate received for an investment and income amounts at regular time intervals.","arguments":[{"name":"values","description":"The array of cells must include both positive and negative values. Enter the payment and income values in the correct chronological order as the formula uses the order to determine the order of cash flows."},{"name":"guess","description":"An estimate of the IRR.","required":false}],"variadic":0,"category":"financial","example":"IRR(A2:A7)"},"ISPMT":{"description":"Calculates the amount of interest payment with even principal payment during a specific period.","arguments":[{"name":"rate","description":"The interest rate of each period."},{"name":"period","description":"The period that you want to calculate the amount of interest."},{"name":"periods","description":"The total number of payment periods."},{"name":"value","description":"The present value of the investment."}],"variadic":0,"category":"financial","example":"ISPMT(A2/12, A3, A4, A5)"},"MIRR":{"description":"Calculates the modified internal rate of return with the cost of investment amount and the interest of an investment converted from cash.","arguments":[{"name":"values","description":"The array of cells must include both positive and negative values. Enter the payment and income values in the correct chronological order as the formula uses the order to determine the order of cash flows."},{"name":"finance_rate","description":"The finance rate."},{"name":"reinvest_rate","description":"The reinvestment rate."}],"variadic":0,"category":"financial","example":"MIRR(A2:A5, A6, A7)"},"NOMINAL":{"description":"Calculates nominal interest rate with an effective interest rate and the number of compounding periods per year.","arguments":[{"name":"effect_rate","description":"The effective interest rate."},{"name":"periods","description":"The number of compounding periods per year."}],"variadic":0,"category":"financial","example":"NOMINAL(0.7, 2)"},"NPER":{"description":"Calculates the number of payment periods for a loan or investment, given the fixed interest rate, fixed charge, and the periodic payment amount.","arguments":[{"name":"rate","description":"The interest rate of each period."},{"name":"payment","description":"The amount of payment of each period."},{"name":"present","description":"The present value of the loan or investment."},{"name":"future","description":"The future value or cash balance of the loan or investment after the last payment.","required":false},{"name":"type","description":"When the payment will be made.\\n0: Pay at the end of each period.\\n1: Pay at the beginning of each period.\\n","required":false}],"variadic":0,"category":"financial","example":"NPER(A2/12, A3, A4, A5, 1)"},"NPV":{"description":"Calculates the net present value of an investment with future expenses and income and discount rate.","arguments":[{"name":"rate","description":"The discount rate."},{"name":"value1","description":"The original cost of the investment."},{"name":"value2","description":"The return of the first year. Enter value1 and value2 in the correct chronological order as the formula uses the order to determine the order of cash flows.","required":false}],"variadic":1,"category":"financial","example":"NPV(A2, A3, A4, A5, A6)"},"PDURATION":{"description":"Calculates the number of periods which are required to reach a specified value.","arguments":[{"name":"rate","description":"The interest rate of each period."},{"name":"present","description":"The present value of the investment."},{"name":"future","description":"The future value of the investment."}],"variadic":0,"category":"financial","example":"PDURATION(A2, A3, A4)"},"PMT":{"description":"Calculates the monthly payment of a loan.","arguments":[{"name":"rate","description":"The interest rate of the loan."},{"name":"periods","description":"The total number of payment periods."},{"name":"present","description":"The present value of the loan."},{"name":"future","description":"The future value or cash balance of the loan after the last payment. Default means 0 (zero).","required":false},{"name":"type","description":"When the payment will be made. \\n0: Pay at the end of each period.\\n1: Pay at the beginning of each period.\\n","required":false}],"variadic":0,"category":"financial","example":"PMT(A2/12, A3, A4)"},"PPMT":{"description":"Calculates the amount of payment on a principal during a specific period, based on a constant interest rate.","arguments":[{"name":"rate","description":"The interest rate per period."},{"name":"periods","description":"The specified period. Must be between 1 and nperiods."},{"name":"nperiods","description":"The total number of payment periods."},{"name":"future","description":"The future value or cash balance of the investment after the last payment. Default means 0 (zero).","required":false},{"name":"type","description":"When the payment will be made. \\n0: Pay at the end of each period.\\n1: Pay at the beginning of each period\\n","required":false}],"variadic":0,"category":"financial","example":"PPMT(A2/12, 1, A3*12, A4)"},"PV":{"description":"Calculates the present value of a loan or investment based on a fixed interest rate.","arguments":[{"name":"rate","description":"The interest rate of each period."},{"name":"periods","description":"The total number of payment periods."},{"name":"payment","description":"The amount of payment for each period."},{"name":"future","description":"The future value or cash balance of the investment after the last payment. Default means 0 (zero).","required":false},{"name":"type","description":"When the payment will be made. \\n0: Pay at the end of each period.\\n1: Pay at the beginning of each period.\\n","required":false}],"variadic":0,"category":"financial","example":"PV(A2/12, A3*12, A4, 1)"},"RATE":{"description":"Calculates the interest rate per period of an annuity.","arguments":[{"name":"periods","description":"The total number of payment periods."},{"name":"payment","description":"The amount of payment per period."},{"name":"present","description":"The present value of the loan, or the total of all payments."},{"name":"future","description":"The future value or cash balance of the investment after the last payment. Default means 0 (zero).","required":false},{"name":"type","description":"When the payment will be made.\\n0: Pay at the end of each period.\\n1: Pay at the beginning of each period.\\n","required":false},{"name":"guess","description":"An estimate for the interest rate.","required":false}],"variadic":0,"category":"financial","example":"RATE(A2*12, A3, A4)"},"RRI":{"description":"Returns the interest rate equivalent to the growth of an investment.","arguments":[{"name":"periods","description":"The number of investment periods."},{"name":"present","description":"The present value of the investment."},{"name":"future","description":"The future value of the investment."}],"variadic":0,"category":"financial","example":"RRI(75, 200, 2000)"},"SLN":{"description":"Calculates the depreciation of an asset for a period based on the straight-line depreciation method.","arguments":[{"name":"cost","description":"The initial cost of the asset."},{"name":"salvage","description":"The value of the asset at the end of the depreciation."},{"name":"life","description":"The useful life of the asset."}],"variadic":0,"category":"financial","example":"SLN(10000, 20, 6)"},"SYD":{"description":"Calculates the depreciation of an asset within a specified period, based on the sum of the years' digits.","arguments":[{"name":"cost","description":"The initial cost of the asset."},{"name":"salvage","description":"The residual value of the asset."},{"name":"life","description":"The useful life of the asset."},{"name":"per","description":"The period. The unit of the period must be the same as the unit of life."}],"variadic":0,"category":"financial","example":"SYD(A2, A3, A4, 6)"},"TBILLEQ":{"description":"Calculates bond equivalent yield of a treasury bill.","arguments":[{"name":"settlement","description":"The settlement date of the treasury bill."},{"name":"maturity","description":"The maturity date of the treasury bill."},{"name":"discount","description":"The discount rate of the treasury bill."}],"variadic":0,"category":"financial","example":"TBILLEQ(A2, A3, A4)"},"TBILLPRICE":{"description":"Calculates the price of a treasury bill per US$100 face value.","arguments":[{"name":"settlement","description":"The settlement date of the treasury bill."},{"name":"maturity","description":"The maturity date of the treasury bill."},{"name":"discount","description":"The discount rate of the treasury bill."}],"variadic":0,"category":"financial","example":"TBILLPRICE(A2, A3, A4)"},"TBILLYIELD":{"description":"Calculates the yield of a treasury bill.","arguments":[{"name":"settlement","description":"The settlement date of the treasury bill."},{"name":"maturity","description":"The maturity date of the treasury bill."},{"name":"pr","description":"The price of a treasury bill per US$100 face value."}],"variadic":0,"category":"financial","example":"TBILLYIELD(A2, A3, A4)"},"XIRR":{"description":"Calculates the internal rate of return for a series of cash flows that occur on irregular dates.","arguments":[{"name":"values","description":"A series of cash flows that have corresponding payment dates. The array of cells must include both positive and negative values. The first payment is optional. If the first value is a payment, it must be a negative value."},{"name":"dates","description":"A series of payment dates that correspond to the cash flows."},{"name":"guess","description":"An estimate of the XIRR.","required":false}],"variadic":0,"category":"financial","example":"XIRR(A2:A4, C2:C4, 0.1)"},"XNPV":{"description":"Calculates the net present value for a series of cash flows that occur on irregular dates.","arguments":[{"name":"rate","description":"The discount rate."},{"name":"values","description":"A series of cash flows that have corresponding payment dates. The array of cells must include both positive and negative values. The first payment is optional. If the first value is a payment, it must be a negative value."},{"name":"dates","description":"A series of payment dates that correspond to the cash flows."}],"variadic":0,"category":"financial","example":"XNPV(0.2, A2:A4, B2:B4)"},"ERROR.TYPE":{"description":"Receives an error value and returns a corresponding number to this error value.","arguments":[{"name":"error_val","description":"An error value. It can be an actual error value, or a reference to a cell that contains a formula."}],"variadic":0,"category":"information","example":"ERROR.TYPE(A2)"},"ISBLANK":{"description":"Returns TRUE if the value is blank. Returns FALSE if the value is not blank.","arguments":[{"name":"value","description":"The cell which you want to know if it is blank."}],"variadic":0,"category":"information","example":"ISBLANK(C2)"},"ISDATE":{"description":"Returns TRUE if the value is a valid expression of a date. Returns FALSE if the value is not a valid expression of a date.","arguments":[{"name":"value","description":"The value which you want to know if it is a valid expression of a date. The valid expression of the date depends on your locale settings."}],"variadic":0,"category":"information","example":"ISDATE(A2)"},"ISERR":{"description":"Returns TRUE if the value is an error value, except the #N/A error.","arguments":[{"name":"value","description":"The value which you want to know if it is an error value, except the #N/A error."}],"variadic":0,"category":"information","example":"ISERR(A2)"},"ISERROR":{"description":"Returns TRUE if the value is an error value. Returns FALSE if otherwise.","arguments":[{"name":"value","description":"The value which you want to know if it is an error value."}],"variadic":0,"category":"information","example":"ISERROR(A2)"},"ISEVEN":{"description":"Returns TRUE if the value is an even number. Returns FALSE if the value is an odd number.","arguments":[{"name":"number","description":"The value which you want to know if it is an even number."}],"variadic":0,"category":"information","example":"ISEVEN(A2)"},"ISLOGICAL":{"description":"Returns TRUE if the cell contains the logical values. Returns FALSE if the cell does not contain the logical values.","arguments":[{"name":"value","description":"The value which you want to know if it is a logical value."}],"variadic":0,"category":"information","example":"ISLOGICAL(A2)"},"ISNA":{"description":"Returns TRUE if the value is #N/A.","arguments":[{"name":"value","description":"The value which you want to know if it is #N/A."}],"variadic":0,"category":"information","example":"ISNA(A2)"},"ISNONTEXT":{"description":"Returns TRUE if the value is a non-text value. Returns FALSE if the value is a text value.","arguments":[{"name":"value","description":"The value which you want to know if it is a non-text value."}],"variadic":0,"category":"information","example":"ISNONTEXT(A2)"},"ISNUMBER":{"description":"Returns TRUE if the value is a number.","arguments":[{"name":"value","description":"The value which you want to know if it is a number."}],"variadic":0,"category":"information","example":"ISNUMBER(A2)"},"ISODD":{"description":"Returns TRUE if the value is an odd number. Returns FALSE if the value is an even number.","arguments":[{"name":"number","description":"The value which you want to know if it is an odd number."}],"variadic":0,"category":"information","example":"ISODD(A2)"},"ISTEXT":{"description":"Returns TRUE if the value is a text value. Returns FALSE if the value is a non-text value.","arguments":[{"name":"value","description":"The value which you want to know if it is a text value."}],"variadic":0,"category":"information","example":"ISTEXT(A2)"},"N":{"description":"Converts a value into a number.","arguments":[{"name":"value","description":"The value you want to convert into a number."}],"variadic":0,"category":"information","example":"N(A2)"},"NA":{"description":"Returns the #N/A error.","arguments":[],"variadic":0,"category":"information","example":"NA()"},"TYPE":{"description":"Converts a value into a code.","arguments":[{"name":"value","description":"The value you want to convert into a code."}],"variadic":0,"notes":["The table below lists the returned result for different types of input value.",[["If the value is","TYPE returns"],["Number",1],["Text",2],["Logical value",4],["Error value",16],["Array",64]]],"category":"information","example":"TYPE(A2)"},"AND":{"description":"Evaluates if all the conditions in the arguments are met.","arguments":[{"name":"logical1","description":"The first condition or value to evaluate in the argument."},{"name":"logical2","description":"The second condition or value to evaluate in the argument.","required":false}],"variadic":1,"category":"logical","example":"AND(A2<A3, A3=6)"},"FALSE":{"description":"Returns a value of FALSE in the cell.","arguments":[],"variadic":0,"category":"logical","example":"FALSE()"},"IF":{"description":"Returns one value if a condition is true and another if it is false.","arguments":[{"name":"logical_test","description":"A condition that is either true or false."},{"name":"value_if_true","description":"The value that the IF function returns when the result of logical_test is true."},{"name":"value_if_false","description":"The value that the IF function returns when the result of logical_test is false. If no value_if_false is provided, the IF function returns FALSE when the result of logical_test is false.","required":false}],"variadic":0,"category":"logical","example":"IF(B2>A2, B2-A2, \\"NA\\")"},"IFERROR":{"description":"Returns the first value if there is no error in the formula or the second value if there is any error in the formula.","arguments":[{"name":"value","description":"An array of cells must be included to be checked."},{"name":"value_if_error","description":"The value that will be returned if there is an error in the result. The coming error types are evaluated as: #N/A, #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME?, or #NULL!."}],"variadic":0,"category":"logical","example":"IFERROR(A2/B2, 0)"},"IFNA":{"description":"Evaluates a value and returns the value if no #N/A error found or returns another specified value if the reference value is an #N/A error.","arguments":[{"name":"value","description":"The value or the reference to evaluate."},{"name":"value_if_na","description":"The value to return when #N/A is found. Could be described as a different description."}],"variadic":0,"category":"logical","example":"IFNA(A2,\\"NA Error\\")"},"IFS":{"description":"Returns the first value that correspond to the condition in logical_test.","arguments":[{"name":"logical_test","description":"First logical test."},{"name":"value_if_true","description":"Returns as the result when the first logical test is true.","required":false}],"variadic":2,"category":"logical","example":"IFS(B2=90,\\"A\\",B2>=80,\\"B\\",B2>=70,\\"C\\",B2>=60,\\"D\\")"},"NOT":{"description":"Returns the reverse value of the argument as either TRUE or FALSE.","arguments":[{"name":"logical","description":"Values to evaluate."}],"variadic":0,"category":"logical","example":"NOT(TRUE)"},"OR":{"description":"Examines multiple conditions and returns TRUE if any of the conditions is true, or FALSE if none of the conditions is true.","arguments":[{"name":"logical1","description":"The first condition or value to evaluate."},{"name":"logical2","description":"The second condition or value to evaluate.","required":false}],"variadic":1,"category":"logical","example":"OR(A2>1, A3<300)"},"TRUE":{"description":"Returns a logical value of TRUE as a result.","arguments":[],"variadic":0,"category":"logical","example":"TRUE()"},"XOR":{"description":"Returns TRUE when the number of valid conditions is odd and returns FALSE when the number of valid conditions is even.","arguments":[{"name":"logical1","description":"The first value or condition to evaluate."},{"name":"logical2","description":"The second value or condition to evaluate.","required":false}],"variadic":1,"category":"logical","example":"XOR(A2<1, A3=100)"},"ADDRESS":{"description":"Returns the address for a cell by the indicated row and column number.","arguments":[{"name":"row_num","description":"The row number to use in the cell address."},{"name":"column_num","description":"The column number to use in the cell address."},{"name":"abs_num","description":"The type of address, which can be either absolute or relative. The default is absolute.\\n1 or left blank: absolute\\n2: absolute row and relative column\\n3: relative row and absolute column\\n4: relative\\n","required":false},{"name":"a1","description":"The style of reference, either A1 or R1C1. If TRUE or left blank, the style used is A1 style; if FALSE, the style used is R1C1.","required":false},{"name":"sheet_text","description":"The worksheet to reference. The default is the current worksheet.","required":false}],"variadic":0,"category":"lookup_and_reference","example":"ADDRESS(1, 1)"},"CHOOSE":{"description":"Chooses a value from a list of values according to index.","arguments":[{"name":"index_num","description":"An index number that specifies which value is chosen. This number must not be greater than the number of values."},{"name":"value1","description":"The first value in a list of value."},{"name":"value2","description":"Additional values in the list.","required":false}],"variadic":1,"category":"lookup_and_reference","example":"CHOOSE(2, A2, A3, A4, A5, A6)"},"COLUMN":{"description":"Returns the column number of a cell.","arguments":[{"name":"reference","description":"The cell which you want to find the column number.","required":false}],"variadic":0,"category":"lookup_and_reference","example":"COLUMN(A2)"},"COLUMNS":{"description":"Counts the number of columns of the selected cells.","arguments":[{"name":"array","description":"A series of cells that you want to find the number of columns."}],"variadic":0,"category":"lookup_and_reference","example":"COLUMNS(A3:D3)"},"FILTER":{"description":"Filters a range of data based on the criteria defined by you.","arguments":[{"name":"array","description":"The array or range to filter."},{"name":"include","description":"An array with the same height or width as the array, along with your desired filtering criteria."},{"name":"if_empty","description":"The value to return if all values in the included array are empty.","required":false}],"variadic":0,"min_version":"3.4","category":"lookup_and_reference","example":"FILTER(A1:C4, A1:A4>1)"},"FLATTEN":{"description":"Combines all the values from an array or range into a single column.","arguments":[{"name":"range1","description":"The first range or array."},{"name":"range2","description":"Subsequent ranges or arrays.","required":false}],"variadic":1,"min_version":"3.6","category":"lookup_and_reference","example":"FLATTEN(A1:B2)"},"HLOOKUP":{"description":"Horizontally look up the values in the first row of specific range of cells, and returns the desired value in the desired row.","arguments":[{"name":"lookup_value","description":"The reference value you want to look up."},{"name":"table_array","description":"The range of cells to look up the referenced value and locate the desired value."},{"name":"row_index_num","description":"The row in the range which contains the desired value. The first row of the range of table_array means 1."},{"name":"is_sorted","description":"Indicates if the first row of the range is sorted. If sorted, enter TRUE or leave blank for an exact match. If not sorted, use FALSE for an exact match. If not sorted and the argument is left blank, the returned result will be an approximate match if no exact match is found.","required":false}],"variadic":0,"category":"lookup_and_reference","example":"HLOOKUP(I1,A1:H2,2,FALSE)"},"HYPERLINK":{"description":"Creates a hyperlink.","arguments":[{"name":"link_location","description":"A path you want to link to, such as an URL."},{"name":"friendly_name","description":"A text which represents the link_location.","required":false}],"variadic":0,"category":"lookup_and_reference","example":"HYPERLINK(\\"https://www.synology.com/\\", \\"Synology\\")"},"IMPORTRANGE":{"description":"Imports a range of cells from a linked spreadsheet, keeping the data in sync.","arguments":[{"name":"spreadsheet_url","description":"The Synology Spreadsheet from which data will be imported.\\nBelow are examples of spreadsheet_url formats:\\n\\n- Synology Spreadsheet URL: https://example.com/oo/r/abc123abc123\\n\\n- Synology Spreadsheet ID: abc123abc123\\n\\n- URL with private IP: https://10.11.21.131:5001/oo/r/abc123abc123\\n\\n- URL with QuickConnect ID: https://example.quickconnect.to/d/s/abc123abc123/oqbDx28_gs9XuYfyp\\n"},{"name":"range_string","description":"A string in the format \\"[SheetName]![CellRange]\\", e.g., \\"Sheet1!A1:C3\\", which specifies the worksheet and range in the reference spreadsheet to import.\\n\\nPlease note that if the name of the worksheet contains any spaces, the name must be wrapped by single quotation marks in the formula.\\n"}],"variadic":0,"min_version":"3.5","category":"lookup_and_reference","example":"IMPORTRANGE(\\"abc123abc123\\",\\"Sheet1!A1:C3\\")"},"INDEX":{"description":"Returns the value in the specific cell.","arguments":[{"name":"reference","description":"A reference to one or more cell ranges."},{"name":"row_num","description":"The number of row to return the reference."},{"name":"column_num","description":"The number of column to return the reference.","required":false}],"variadic":0,"category":"lookup_and_reference","example":"INDEX(A1:D2,2,3)"},"INDIRECT":{"description":"Returns the value that is indirectly referenced.","arguments":[{"name":"ref_text","description":"The reference value to look up."},{"name":"a1","description":"The type of reference, in either A1- or R1C1-style. The default is A1-style.","required":false}],"variadic":0,"category":"lookup_and_reference","example":"INDIRECT(A4)"},"MATCH":{"description":"Returns the relative position of a specified value in a range of cells.","arguments":[{"name":"lookup_value","description":"The value that you want to search for. It can be a number, text or logical value, or a cell reference to a number, text or logical value."},{"name":"lookup_array","description":"The range of cells within which you search for lookup_value."},{"name":"match_type","description":"How you want the function to match lookup_value with values in lookup_array. The number 1 is the default, which causes the function to return the largest value less than or equal to lookup_value. The number 0 indicates exact match. The number -1 causes the function to return the smallest value greater than or equal to lookup_value.","required":false}],"variadic":0,"category":"lookup_and_reference","example":"MATCH(\\"skirts\\", A2:A5, 0)"},"OFFSET":{"description":"Returns a cell or range of cells from a referenced starting point.","arguments":[{"name":"reference","description":"The referenced starting point to base the offset."},{"name":"rows","description":"Number of rows from the reference point."},{"name":"cols","description":"Number of columns from the reference point."},{"name":"height","description":"Number of rows you want the returned reference to be.","required":false},{"name":"width","description":"Number of columns you want the returned reference to be.","required":false}],"variadic":0,"category":"lookup_and_reference","example":"OFFSET(A3,3,2,1,1)"},"ROW":{"description":"Returns the row number of a cell.","arguments":[{"name":"reference","description":"The cell that you want to find the row number. If the argument is left blank, the returned result is the row number of the current cell.","required":false}],"variadic":0,"category":"lookup_and_reference","example":"ROW(A2)"},"ROWS":{"description":"Counts the number of rows of the selected cells.","arguments":[{"name":"array","description":"A series of cells that you want to find the number of rows of."}],"variadic":0,"category":"lookup_and_reference","example":"ROWS(A3:D3)"},"SORT":{"description":"Sorts the contents of a range or array.","arguments":[{"name":"array","description":"The range or array to sort."},{"name":"sort_index","description":"A number indicating the row or column to sort by. Default is 1 if left blank.","required":false},{"name":"sort_order","description":"The order to use for sorting, where 1 means ascending and -1 means descending. Default is ascending.","required":false},{"name":"by_col","description":"A logical value indicating the desired sort direction. Use FALSE to sort by row and TRUE to sort by column. Default is by row.","required":false}],"variadic":0,"min_version":"3.4","category":"lookup_and_reference","example":"SORT(A1:C4, 2)"},"SORTBY":{"description":"Sorts the contents of a range or array based on the values in a corresponding range or array.","arguments":[{"name":"array","description":"The range or array to sort."},{"name":"by_array1","description":"The first range or array to sort on."},{"name":"sort_order1","description":"The order to use for sorting, where 1 means ascending and -1 means descending. Default is ascending.","required":false},{"name":"by_array2","description":"Subsequent range or array to sort on.","required":false},{"name":"sort_order2","description":"The order to use for sorting, where 1 means ascending and -1 means descending. Default is ascending.","required":false}],"variadic":2,"min_version":"3.4","category":"lookup_and_reference","example":"SORTBY(A1:C4, B1:B4, 1, C1:C4, 1)"},"TRANSPOSE":{"description":"Transposes a range.","arguments":[{"name":"array","description":"The range or array to transpose."}],"variadic":0,"min_version":"3.4","category":"lookup_and_reference","example":"TRANSPOSE(A1:C4)"},"UNIQUE":{"description":"Returns a list of values in a range or array that is unique.","arguments":[{"name":"array","description":"The range or array from which to return unique rows or columns."},{"name":"by_col","description":"A logical value that indicates the comparison method, with TRUE being compare columns against each other and return unique columns and FALSE (or blank) being compare rows against each other and return unique rows.","required":false},{"name":"exactly_once","description":"A logical value that returns rows or columns that occur exactly once in the range or array, where TRUE returns all distinct rows or columns that occur exactly once from the range or array and FALSE (or blank) returns all distinct rows or columns from the range or array.","required":false}],"variadic":0,"min_version":"3.4","category":"lookup_and_reference","example":"UNIQUE(A1:D4, TRUE, TRUE)"},"VLOOKUP":{"description":"Vertically look up the values in the first column of specific range of cells, and returns the desired value in the desired column.","arguments":[{"name":"lookup_value","description":"The reference value you want to look up."},{"name":"table_array","description":"The range of cells to look up the referenced value and locate the desired value."},{"name":"col_index_num","description":"The column in the range which contains the desired value. The first column of the range of table_array means 1."},{"name":"is_sorted","description":"Indicates if the first column of the range is sorted. If sorted, enter TRUE or leave blank for an exact match. If not sorted, use FALSE for an exact match. If not sorted and the argument is left blank, the returned result will be an approximate match if no exact match is found.","required":false}],"variadic":0,"category":"lookup_and_reference","example":"VLOOKUP(A9,A1:B8,2,FALSE)"},"XLOOKUP":{"description":"Looks up a value in the first specified range vertically (or horizontally), and returns the corresponding data in the second range.","arguments":[{"name":"lookup_value","description":"The key value that you are looking for."},{"name":"lookup_array","description":"The range or array that may contain the key value."},{"name":"return_array","description":"The range or array that may contain the data you are looking for. The returned data records should be in the same order as the keys in lookup_array."},{"name":"if_not_found","description":"The value to return if the key value is not found.","required":false},{"name":"match_mode","description":"Indicates how to match the key value against the values in lookup_array.\\n\\n0 - Exact match. If none is found, return the text specified by [if_not_found] or #N/A. This is the default.\\n1 - Exact match. If none is found, return the next larger item.\\n-1 - Exact match. If none is found, return the next smaller item.\\n2 - A wildcard matching where *, ?, and ~ have special meaning. (See Note)\\n","required":false},{"name":"search_mode","description":"Indicates how to search in lookup_array.\\n\\n1 - Perform a search from the beginning to the end. This is the default.\\n-1 - Perform a search from the end to the beginning.\\n2 - Perform a binary search by assuming lookup_array is sorted in ASCENDING order. If lookup_array is not sorted as expected, the function returns unexpected results.\\n-2 - Perform a binary search by assuming lookup_array is sorted in DESCENDING order. If lookup_array is not sorted as expected, the function returns unexpected results.\\n","required":false}],"variadic":0,"notes":["Special characters in wildcard matching:",["A ? matches any single character.","A * matches any number of characters.","A ~ followed by a ?, *, or ~ makes the following character match its original character."]],"min_version":"3.5","category":"lookup_and_reference","example":"XLOOKUP(\\"Taipei\\",A1:A8,B1:B8,\\"Not found\\")"},"ABS":{"description":"Converts a number into an absolute value.","arguments":[{"name":"number","description":"The number which you want to convert into an absolute value."}],"variadic":0,"category":"math_and_trigonometry","example":"ABS(A2)"},"ACOS":{"description":"Calculates the arccosine, or the inverse cosine, of a given number.","arguments":[{"name":"number","description":"The number which you want to calculate the arccosine of, ranging between -1 and 1."}],"variadic":0,"category":"math_and_trigonometry","example":"ACOS(-0.7)"},"ACOSH":{"description":"Calculates the inverse hyperbolic cosine of a given number.","arguments":[{"name":"number","description":"The number which you want to calculate the inverse hyperbolic cosine of. The number must be greater than or equal to 1."}],"variadic":0,"category":"math_and_trigonometry","example":"ACOSH(16)"},"ACOT":{"description":"Calculates the arccotangent of a given number.","arguments":[{"name":"number","description":"The number which you want to calculate the arccotangent of. The number must be a real number."}],"variadic":0,"category":"math_and_trigonometry","example":"ACOT(89)"},"ACOTH":{"description":"Calculates the inverse hyperbolic cotangent of a given number.","arguments":[{"name":"number","description":"The number for which you want to know the inverse hyperbolic cotangent. The absolute value of the number must be more than 1."}],"variadic":0,"category":"math_and_trigonometry","example":"ACOTH(7)"},"ASIN":{"description":"Calculates the arcsine of a given number.","arguments":[{"name":"number","description":"The number which you want to know the arcsine of, ranging between -1 and 1."}],"variadic":0,"category":"math_and_trigonometry","example":"ASIN(-0.4)"},"ASINH":{"description":"Calculates the inverse hyperbolic sine of a given number.","arguments":[{"name":"number","description":"The number which you want to know the inverse hyperbolic sine of. The number must be a real number."}],"variadic":0,"category":"math_and_trigonometry","example":"ASINH(-1.25)"},"ATAN":{"description":"Calculates the arctangent of a given number.","arguments":[{"name":"number","description":"The number which you want to know the arctangent of."}],"variadic":0,"category":"math_and_trigonometry","example":"ATAN(46)"},"ATAN2":{"description":"Calculates the arctangent of the specified coordinates.","arguments":[{"name":"number_x","description":"The x-coordinate of the point."},{"name":"number_y","description":"The y-coordinate of the point."}],"variadic":0,"category":"math_and_trigonometry","example":"ATAN2(-8, 3)"},"ATANH":{"description":"Calculates the inverse hyperbolic tangent of a given number.","arguments":[{"name":"number","description":"A real number between 1 and -1 (excluding -1 and 1)."}],"variadic":0,"category":"math_and_trigonometry","example":"ATANH(0.5)"},"BASE":{"description":"Converts a number into a text representation with the given base.","arguments":[{"name":"number","description":"The number which you want to convert. The number must be an integer greater than or equal to 0 and less than 2^53."},{"name":"radix","description":"The base that you want to convert the number into. The base must be an integer greater than or equal to 2 and less than or equal to 36."},{"name":"min_length","description":"The minimum length of the result.","required":false}],"variadic":0,"category":"math_and_trigonometry","example":"BASE(100, 36, 1)"},"CEILING.MATH":{"description":"Rounds a real number up to an integer or a specified multiple of a number.","arguments":[{"name":"number","description":"The value to be rounded up."},{"name":"significance","description":"The value whose multiple is used for rounding up the number.","required":false},{"name":"mode","description":"The direction (toward or away from 0) to round negative numbers. If left blank or 0, negative numbers will be rounded toward zero. If any other number is entered, negative numbers will be rounded away from zero.","required":false}],"variadic":0,"category":"math_and_trigonometry","example":"CEILING.MATH(5, 1)"},"CEILING.PRECISE":{"description":"Rounds a real number up to the nearest integer or the nearest multiple of an integer. If the value is negative, it is rounded up toward zero.","arguments":[{"name":"number","description":"The real number that you want to round up to the nearest integer."},{"name":"significance","description":"The multiple of an integer which would be rounded up to.","required":false}],"variadic":0,"category":"math_and_trigonometry","example":"CEILING.PRECISE(0.7)"},"CEILING":{"description":"Rounds a real number up to the nearest integer or the nearest multiple of an integer.","arguments":[{"name":"number","description":"The real number that you want to round up to the nearest integer."},{"name":"significance","description":"The multiple of an integer which would be rounded up to."}],"variadic":0,"category":"math_and_trigonometry","example":"CEILING(-9.2, 4)"},"COMBIN":{"description":"Calculates the number of all possible combinations for a given number of items.","arguments":[{"name":"number","description":"The number of items."},{"name":"number_chosen","description":"The number of items selected in each combination."}],"variadic":0,"category":"math_and_trigonometry","example":"COMBIN(10, 7)"},"COMBINA":{"description":"Calculates the number of all possible combinations, with repetition, for a given number of items.","arguments":[{"name":"number","description":"The number of items."},{"name":"number_chosen","description":"The number of items in each combination."}],"variadic":0,"category":"math_and_trigonometry","example":"COMBINA(10, 7)"},"COS":{"description":"Calculates the cosine of a given angle.","arguments":[{"name":"number","description":"The angle, in radians, for which you want to calculate the cosine."}],"variadic":0,"category":"math_and_trigonometry","example":"COS(0.1)"},"COSH":{"description":"Calculates the hyperbolic cosine of a given angle.","arguments":[{"name":"number","description":"The angle, in radians, for which you want to calculate the hyperbolic cosine."}],"variadic":0,"category":"math_and_trigonometry","example":"COSH(1)"},"COT":{"description":"Calculates the cotangent of a given angle.","arguments":[{"name":"number","description":"The angle, in radians, for which you want to calculate the cotangent."}],"variadic":0,"category":"math_and_trigonometry","example":"COT(0.8)"},"COTH":{"description":"Calculates the hyperbolic cotangent of a given angle.","arguments":[{"name":"number","description":"The angle, in radians, for which you want to calculate the hyperbolic cotangent."}],"variadic":0,"category":"math_and_trigonometry","example":"COTH(-0.6)"},"CSC":{"description":"Calculates the cosecant of a given angle.","arguments":[{"name":"number","description":"The angle, in radians, for which you want to calculate the cosecant."}],"variadic":0,"category":"math_and_trigonometry","example":"CSC(72)"},"CSCH":{"description":"Calculates the hyperbolic cosecant of a given angle.","arguments":[{"name":"number","description":"The angle, in radians, for which you want to calculate the hyperbolic cosecant."}],"variadic":0,"category":"math_and_trigonometry","example":"CSCH(2)"},"DECIMAL":{"description":"Converts a text representation of a number in a given base into a decimal number.","arguments":[{"name":"number","description":"The number which you want to convert."},{"name":"radix","description":"The base of the number."}],"variadic":0,"category":"math_and_trigonometry","example":"DECIMAL(20, 36)"},"DEGREES":{"description":"Converts radians into degrees.","arguments":[{"name":"angle","description":"The angle, in radians, that you want to convert to degrees."}],"variadic":0,"category":"math_and_trigonometry","example":"DEGREES(1)"},"EVEN":{"description":"Rounds a real number up to the nearest even integer.","arguments":[{"name":"number","description":"The real number that you want to round up to the nearest even integer. It can be a number like 3 or a cell reference like B4."}],"variadic":0,"category":"math_and_trigonometry","example":"EVEN(1.2)"},"EXP":{"description":"Returns the value of the mathematical constant e (Euler's number) raised to a specified power.","arguments":[{"name":"number","description":"The exponent number applied to Euler's number."}],"variadic":0,"category":"math_and_trigonometry","example":"EXP(5)"},"FACT":{"description":"Calculates the factorial of a number.","arguments":[{"name":"number","description":"A nonnegative integer. If this number is not an integer, it will be truncated to an integer."}],"variadic":0,"category":"math_and_trigonometry","example":"FACT(6)"},"FACTDOUBLE":{"description":"Calculates the double factorial of a given number.","arguments":[{"name":"number","description":"The number that you want to calculate the double factorial of."}],"variadic":0,"category":"math_and_trigonometry","example":"FACTDOUBLE(7.5)"},"FLOOR.MATH":{"description":"Rounds a real number down to the nearest integer or the nearest multiple of an integer.","arguments":[{"name":"number","description":"The real number that you want to round down to the nearest integer."},{"name":"significance","description":"The multiple of an integer which would be rounded down to.","required":false},{"name":"mode","description":"The direction (toward or away from 0) to round negative numbers. If left blank or 0, negative numbers will be rounded away from zero. If any other number is entered, negative numbers will be rounded toward zero.","required":false}],"variadic":0,"category":"math_and_trigonometry","example":"FLOOR.MATH(-8.6, 9)"},"FLOOR.PRECISE":{"description":"Rounds a real number down to the nearest integer or the nearest multiple of an integer. Positive numbers are rounded toward 0; negative numbers are always rounded away from 0.","arguments":[{"name":"number","description":"The real number that you want to round down to the nearest integer."},{"name":"significance","description":"The multiple of an integer which would be rounded down to.","required":false}],"variadic":0,"category":"math_and_trigonometry","example":"FLOOR.PRECISE(-7.6)"},"FLOOR":{"description":"Rounds a real number down to the nearest multiple of a number.","arguments":[{"name":"number","description":"The real number that you want to round down."},{"name":"significance","description":"The multiple of a number which would be rounded down to."}],"variadic":0,"category":"math_and_trigonometry","example":"FLOOR(-0.1, 5)"},"GAMMALN.PRECISE":{"description":"Calculates the natural logarithm of gamma function at a specified value.","arguments":[{"name":"x","description":"The value that you want to calculate the natural logarithm of gamma function."}],"variadic":0,"category":"math_and_trigonometry","example":"GAMMALN.PRECISE(4.8)"},"GCD":{"description":"Returns the greatest common divisor of two or more numbers.","arguments":[{"name":"number1","description":"The first number to calculate the greatest common divisor."},{"name":"number2","description":"Subsequent numbers to calculate the greatest common divisor.","required":false}],"variadic":1,"category":"math_and_trigonometry","example":"GCD(3, 5, 7)"},"INT":{"description":"Rounds a real number down to the nearest integer.","arguments":[{"name":"number","description":"The real number that you want to round down to the nearest integer. It can be a number like 3 or a cell reference like B4."}],"variadic":0,"category":"math_and_trigonometry","example":"INT(1.6)"},"ISO.CEILING":{"description":"Rounds a real number up to the nearest integer or the nearest multiple of an integer.","arguments":[{"name":"number","description":"The real number that you want to round up to the nearest integer."},{"name":"significance","description":"The multiple of an integer which would be rounded up to.","required":false}],"variadic":0,"category":"math_and_trigonometry","example":"ISO.CEILING(9.8, 8)"},"LCM":{"description":"Returns the lowest common multiple of two or more numbers.","arguments":[{"name":"number1","description":"The first number to calculate the lowest common multiple."},{"name":"number2","description":"The second number to calculate the lowest common multiple.","required":false}],"variadic":1,"category":"math_and_trigonometry","example":"LCM(107, 943)"},"LN":{"description":"Calculates the natural logarithm of a number.","arguments":[{"name":"number","description":"The number that you want to calculate the natural logarithm of."}],"variadic":0,"category":"math_and_trigonometry","example":"LN(3.97)"},"LOG":{"description":"Calculates the logarithm of a number to a specified base.","arguments":[{"name":"number","description":"The positive number you want to find the logarithm of."},{"name":"base","description":"The base of the logarithm. If not specified, the default base value will be 10.","required":false}],"variadic":0,"category":"math_and_trigonometry","example":"LOG(10)"},"LOG10":{"description":"Calculates the base 10 logarithm of a number.","arguments":[{"name":"number","description":"The positive number you want to find the base 10 logarithm of."}],"variadic":0,"category":"math_and_trigonometry","example":"LOG10(10)"},"MOD":{"description":"Returns the remainder after dividing a number by the divisor.","arguments":[{"name":"number","description":"The number that you want to find the remainder."},{"name":"divisor","description":"The divisor used to divide the number."}],"variadic":0,"category":"math_and_trigonometry","example":"MOD(9, 3)"},"MROUND":{"description":"Rounds a number off to the nearest multiple of an integer.","arguments":[{"name":"number","description":"The number that you want to round off to the nearest multiple of an integer."},{"name":"multiple","description":"The multiple of an integer which would be rounded off to. Must be the same sign as the number argument."}],"variadic":0,"category":"math_and_trigonometry","example":"MROUND(8.2, 2)"},"MULTINOMIAL":{"description":"Calculates the factorial of the sum of all given numbers divided by the product of the factorials of each number.","arguments":[{"name":"number1","description":"The number that you want to put into the formula."},{"name":"number2","description":"The number that you want to put into the formula.","required":false}],"variadic":1,"category":"math_and_trigonometry","example":"MULTINOMIAL(1, 2, 3)"},"ODD":{"description":"Rounds a real number up to the nearest odd integer.","arguments":[{"name":"number","description":"The real number that you want to round up to the nearest odd integer. It can be a number like 3 or a cell reference like B4."}],"variadic":0,"category":"math_and_trigonometry","example":"ODD(-1.7)"},"PI":{"description":"Returns the value of the mathematical constant pi, accurate to 10 digits.","arguments":[],"variadic":0,"category":"math_and_trigonometry","example":"PI()"},"POWER":{"description":"Calculates a number raised to a specified power.","arguments":[{"name":"number","description":"The base number."},{"name":"power","description":"The power number."}],"variadic":0,"category":"math_and_trigonometry","example":"POWER(2, 10)"},"PRODUCT":{"description":"Multiplies all given numbers and returns the product.","arguments":[{"name":"number1","description":"The first number to be multiplied. It can be a number like 3, a cell reference like B4, or a cell range like A5:G5."},{"name":"number2","description":"Additional numbers or ranges to be multiplied.","required":false}],"variadic":1,"category":"math_and_trigonometry","example":"PRODUCT(5, 3)"},"QUOTIENT":{"description":"Returns the integer part of the quotient after dividing the numerator by the denominator.","arguments":[{"name":"numerator","description":"The number to be divided."},{"name":"denominator","description":"The divisor."}],"variadic":0,"category":"math_and_trigonometry","example":"QUOTIENT(-100, 3)"},"RADIANS":{"description":"Converts degrees into radians.","arguments":[{"name":"angle","description":"The angle, in degrees, that you want to convert into radians."}],"variadic":0,"category":"math_and_trigonometry","example":"RADIANS(180)"},"RAND":{"description":"Returns a random number between 0 (inclusive) and 1 (exclusive).","arguments":[],"variadic":0,"category":"math_and_trigonometry","example":"RAND()"},"RANDARRAY":{"description":"Returns an array of random numbers.","arguments":[{"name":"rows","description":"The number of rows to be returned. Default is 1 if left blank.","required":false},{"name":"columns","description":"The number of columns to be returned. Default is 1 if left blank.","required":false},{"name":"min","description":"The minimum number you would like returned. Default is 0 if left blank.","required":false},{"name":"max","description":"The maximum number you would like returned. Default is 1 if left blank.","required":false},{"name":"whole_number","description":"Returns a whole number or a decimal value. Use TRUE to return a whole number and FALSE to return a decimal number. Default is FALSE.","required":false}],"variadic":0,"min_version":"3.4","category":"math_and_trigonometry","example":"RANDARRAY(2, 3, -2, 5, TRUE)"},"RANDBETWEEN":{"description":"Returns a random integer number between specified numbers every time the spreadsheet is opened.","arguments":[{"name":"bottom","description":"The smallest number this function will return."},{"name":"top","description":"The largest number this function will return."}],"variadic":0,"category":"math_and_trigonometry","example":"RANDBETWEEN(1, 1000)"},"ROMAN":{"description":"Converts Arabic numerals into Roman numerals.","arguments":[{"name":"number","description":"Arabic numerals you wish to convert. The number must be lower than 3999."},{"name":"form","description":"The form of Roman numerals. Each form is represented by a code.\\n0 or default: Classic\\n1: Shorter\\n2: Shorter\\n3: Shorter\\n4: Simplified\\nTRUE: Classic\\nFALSE: Simplified\\n","required":false}],"variadic":0,"category":"math_and_trigonometry","example":"ROMAN(3999, 4)"},"ROUND":{"description":"Rounds a number to a specified number of digits.","arguments":[{"name":"number","description":"The number to be rounded."},{"name":"num_digits","description":"The number of digits to which the number argument will be rounded. See examples below for its usage."}],"variadic":0,"category":"math_and_trigonometry","example":"ROUND(155.562, 2)"},"ROUNDDOWN":{"description":"Rounds a number down to a specified number of digits, moving toward zero.","arguments":[{"name":"number","description":"The number to be rounded down."},{"name":"num_digits","description":"The number of digits to which the number will be rounded down."}],"variadic":0,"category":"math_and_trigonometry","example":"ROUNDDOWN(282.47910, 2)"},"ROUNDUP":{"description":"Rounds a number up to a specified number of digits, moving away from zero.","arguments":[{"name":"number","description":"The number to be rounded up."},{"name":"num_digits","description":"The number of digits to which the number will be rounded up."}],"variadic":0,"category":"math_and_trigonometry","example":"ROUNDUP(113.47, 0)"},"SEC":{"description":"Calculates the secant of a given angle.","arguments":[{"name":"number","description":"The angle, in radians, for which you want to calculate the secant."}],"variadic":0,"category":"math_and_trigonometry","example":"SEC(-15)"},"SECH":{"description":"Calculates the hyperbolic secant of a given angle.","arguments":[{"name":"number","description":"The angle, in radians, for which you want to calculate the hyperbolic secant."}],"variadic":0,"category":"math_and_trigonometry","example":"SECH(0.6)"},"SEQUENCE":{"description":"Generates a list of sequential numbers in an array, such as 1, 2, 3, 4.","arguments":[{"name":"rows","description":"The number of rows to return."},{"name":"columns","description":"The number of columns to return. Default is 1 if left blank.","required":false},{"name":"start","description":"The first number in the sequence. Default is 1 if left blank.","required":false},{"name":"step","description":"The amount to increment each subsequent value in the array. Default is 1 if left blank.","required":false}],"variadic":0,"min_version":"3.4","category":"math_and_trigonometry","example":"SEQUENCE(2, 3, 3, 2)"},"SERIESSUM":{"description":"Returns the sum of a power series.","arguments":[{"name":"x","description":"The input value to the power series."},{"name":"n","description":"The initial power that you want to raise x."},{"name":"m","description":"The space between n."},{"name":"coefficients","description":"A set of coefficients that multiply each successive power of x. The number of coefficients in this set determines how many terms the power series will be. If there are two numbers in this set, then there will be two terms in the power series."}],"variadic":0,"category":"math_and_trigonometry","example":"SERIESSUM(7, 4, 5, 1)"},"SIGN":{"description":"Returns the sign of a given number.","arguments":[{"name":"number","description":"Any real number. The SIGN function will return 1 if the number is positive, 0 if the number is 0, and -1 if the number is negative."}],"variadic":0,"category":"math_and_trigonometry","example":"SIGN(15)"},"SIN":{"description":"Calculates the sine of a given angle.","arguments":[{"name":"number","description":"The angle, in radians, for which you want to calculate the sine."}],"variadic":0,"category":"math_and_trigonometry","example":"SIN(-0.57)"},"SINH":{"description":"Calculates the hyperbolic sine of a given angle.","arguments":[{"name":"number","description":"The angle, in radians, for which you want to calculate the hyperbolic sine."}],"variadic":0,"category":"math_and_trigonometry","example":"SINH(8)"},"SQRT":{"description":"Calculates the square root of a given number.","arguments":[{"name":"number","description":"The number which you want to calculate the square root of. The number must be a positive number."}],"variadic":0,"category":"math_and_trigonometry","example":"SQRT(64)"},"SQRTPI":{"description":"Calculates the square root of the product of a given number and pi.","arguments":[{"name":"number","description":"The number which you want to multiply by pi and calculate the square root of. The number must be a positive number."}],"variadic":0,"category":"math_and_trigonometry","example":"SQRTPI(20)"},"SUBTOTAL":{"description":"Calculates the subtotal in the specified cells or ranges by different functions.","arguments":[{"name":"function_num","description":"The types of function. Each function is represented by a code.\\n1: Average\\n2: Count\\n3: Counta\\n4: Max\\n5: Min\\n6: Product\\n7: Standard Deviation\\n8: Population Standard Deviation\\n9: Sum\\n10: Variance\\n11: Population Variance\\n"},{"name":"ref1","description":"The first cell or reference."},{"name":"ref2","description":"The last cell or reference.","required":false}],"variadic":1,"category":"math_and_trigonometry","example":"SUBTOTAL(2, A2:A4)"},"SUM":{"description":"Adds all given numbers and returns the sum.","arguments":[{"name":"number1","description":"The first number you want to add. It can be a number like 3, a cell reference like B4, or a cell range like A5:G5"},{"name":"number2","description":"Additional numbers, cell references or ranges to add.","required":false}],"variadic":1,"category":"math_and_trigonometry","example":"SUM(3, 4)"},"SUMIF":{"description":"Adds the values in a range according to a specified criteria.","arguments":[{"name":"range","description":"The range of cells to check against criteria. It can be cells including numbers or names, arrays, or references that contain numbers."},{"name":"criteria","description":"The criteria that determines which cells will be added. It can be stated in the form of a number, expression, cell reference, or text string."},{"name":"sum_range","description":"The actual cells to be added. If left blank, cells specified in range will be added.","required":false}],"variadic":0,"category":"math_and_trigonometry","example":"SUMIF(A2:A6, \\"Drinks\\", C2:C6)"},"SUMIFS":{"description":"Calculates the sum in specific cells that meet multiple criteria.","arguments":[{"name":"sum_range","description":"The range of cells that contain the numbers you want to calculate."},{"name":"criteria_range1","description":"The first range."},{"name":"criteria1","description":"The first criterion."},{"name":"criteria_range2","description":"Subsequent ranges.","required":false},{"name":"criteria2","description":"Subsequent criterion.","required":false}],"variadic":2,"category":"math_and_trigonometry","example":"SUMIFS(A2:A6, B2:B6, \\"=A*\\", C2:C6, \\"Jay\\")"},"SUMPRODUCT":{"description":"Calculates the sum of the product of several arrays of cells.","arguments":[{"name":"array1","description":"The first array containing the numbers that you want to calculate."},{"name":"array2","description":"Subsequent arrays containing the numbers that you want to calculate.","required":false}],"variadic":1,"category":"math_and_trigonometry","example":"SUMPRODUCT((A2:A4)*(B2:B4))"},"SUMSQ":{"description":"Calculates the sum of the squares of given numbers.","arguments":[{"name":"number1","description":"The first number which you want the square of."},{"name":"number2","description":"Subsequent numbers which you want the square of.","required":false}],"variadic":1,"category":"math_and_trigonometry","example":"SUMSQ(7, 8)"},"SUMX2MY2":{"description":"Calculates the sum of the differences of squares of corresponding numbers in two arrays.","arguments":[{"name":"array_x","description":"The first array containing the numbers that you want to calculate."},{"name":"array_y","description":"The second array containing the numbers that you want to calculate."}],"variadic":0,"category":"math_and_trigonometry","example":"SUMX2MY2(A2:A4, B2:B4)"},"SUMX2PY2":{"description":"Calculates the sum of the sum of the squares of corresponding numbers in two arrays.","arguments":[{"name":"array_x","description":"The first array containing the numbers that you want to calculate."},{"name":"array_y","description":"The second array containing the numbers that you want to calculate."}],"variadic":0,"category":"math_and_trigonometry","example":"SUMX2PY2(A2:A4, B2:B4)"},"SUMXMY2":{"description":"Calculates the sum of the square of the difference of corresponding numbers in two arrays.","arguments":[{"name":"array_x","description":"The first array containing the numbers that you want to calculate."},{"name":"array_y","description":"The second array containing the numbers that you want to calculate."}],"variadic":0,"category":"math_and_trigonometry","example":"SUMXMY2(A2:A4, B2:B4)"},"TAN":{"description":"Calculates the tangent of a given number.","arguments":[{"name":"number","description":"The number, in radians, for which you want to calculate the tangent."}],"variadic":0,"category":"math_and_trigonometry","example":"TAN(0.78)"},"TANH":{"description":"Calculates the hyperbolic tangent of a given number.","arguments":[{"name":"number","description":"The number, in radians, for which you want to calculate the hyperbolic tangent."}],"variadic":0,"category":"math_and_trigonometry","example":"TANH(27)"},"TRUNC":{"description":"Truncates a number to a specified decimal place.","arguments":[{"name":"number","description":"The number that to truncate."},{"name":"num_digits","description":"The number of digits to which the number will be truncated. Default means the function will return the integer part of the number.","required":false}],"variadic":0,"category":"math_and_trigonometry","example":"TRUNC(8.7456, 2)"},"AVEDEV":{"description":"Calculates the average deviation of a supplied array of values.","arguments":[{"name":"number1","description":"The first number in the array."},{"name":"number2","description":"Subsequent numbers of the mean.","required":false}],"variadic":1,"category":"statistical","example":"AVEDEV(A2:A7)"},"AVERAGE":{"description":"Returns the average value (arithmetic mean) of its arguments, ignoring text and blank cells.","arguments":[{"name":"number1","description":"The first number to include when calculating the average. It can be a number like 3, a cell reference like B4, or a cell range like A5:G5."},{"name":"number2","description":"Additional numbers, cell references or ranges to include when calculating the average.","required":false}],"variadic":1,"category":"statistical","example":"AVERAGE(A1:A5)"},"AVERAGEA":{"description":"Calculates the average of the supplied array of numbers.","arguments":[{"name":"number1","description":"The first number in the array."},{"name":"number2","description":"Subsequent numbers in the array.","required":false}],"variadic":1,"category":"statistical","example":"AVERAGEA(A2:A5)"},"AVERAGEIF":{"description":"Returns the average value (arithmetic mean) of a range according to a specified criteria.","arguments":[{"name":"range","description":"The range of cells to check against criteria. It can be cells including numbers or names, arrays, or references that contain numbers."},{"name":"criteria","description":"The criteria that determines which cells will be averaged. It can be stated in the form of a number, expression, cell reference, or text string."},{"name":"average_range","description":"The actual cells to be averaged. If left blank, cells specified in range will be averaged.","required":false}],"variadic":0,"category":"statistical","example":"AVERAGEIF(A2:A8, \\"=Monday\\", B2:B8)"},"AVERAGEIFS":{"description":"Calculates the average of the supplied array of numbers which meet certain criteria.","arguments":[{"name":"average_range","description":"An array of values to be tested against the criteria."},{"name":"criteria_range1","description":"The first range of criteria to test."},{"name":"criteria1","description":"The first criteria to test."},{"name":"criteria_range2","description":"Subsequent range of criteria to test.","required":false},{"name":"criteria2","description":"Subsequent criteria to test.","required":false}],"variadic":2,"category":"statistical","example":"AVERAGIFS(D2:D6, B2:B6, \\">2\\", C2:C6, \\">50\\")"},"BETA.DIST":{"description":"Calculates the cumulative beta distribution function or the probability density function.","arguments":[{"name":"x","description":"The value to evaluate."},{"name":"alpha","description":"The parameter of the distribution."},{"name":"beta","description":"The parameter of the distribution."},{"name":"cumulative","description":"A logical argument which specifies the distribution type, with TRUE being the cumulative distribution function and FALSE being the beta probability density function."},{"name":"A","description":"The lower bound of the interval of x.","required":false},{"name":"B","description":"The upper bound of the interval of x.","required":false}],"variadic":0,"category":"statistical","example":"BETA.DIST(A2, A3, A4, TRUE)"},"BETA.INV":{"description":"Calculates the inverse of the beta cumulative probability density function for a given probability.","arguments":[{"name":"probability","description":"The probability for which to calculate the value of x."},{"name":"alpha","description":"The parameter of the distribution."},{"name":"beta","description":"The parameter of the distribution."},{"name":"A","description":"The lower bound of the interval of x.","required":false},{"name":"B","description":"The upper bound of the interval of x.","required":false}],"variadic":0,"category":"statistical","example":"BETA.INV(A1, A2, A3, A4, A5)"},"BETADIST":{"description":"Calculates the cumulative beta distribution function or the probability density function.","arguments":[{"name":"x","description":"The value to evaluate."},{"name":"alpha","description":"The parameter of the distribution."},{"name":"beta","description":"The parameter of the distribution."},{"name":"A","description":"The lower bound of the interval of x.","required":false},{"name":"B","description":"The upper bound of the interval of x.","required":false}],"variadic":0,"category":"statistical","example":"BETADIST(A2, A3, A4)"},"BETAINV":{"description":"Calculates the inverse of the beta cumulative probability density function for a given probability.","arguments":[{"name":"probability","description":"The probability for which to calculate the value of x."},{"name":"alpha","description":"The parameter of the distribution."},{"name":"beta","description":"The parameter of the distribution."},{"name":"A","description":"The lower bound of the interval of x.","required":false},{"name":"B","description":"The upper bound of the interval of x.","required":false}],"variadic":0,"category":"statistical","example":"BETAINV(A1, A2, A3, A4, A5)"},"BINOM.DIST":{"description":"Returns the binomial distribution probability of a given number of successes for a specified number of test trials.","arguments":[{"name":"successes","description":"The number of successes to calculate the probability for."},{"name":"trials","description":"The number of independent trials."},{"name":"probability","description":"The probability of success in one trial."},{"name":"cumulative","description":"A logical number that specifies the form of the function, with TRUE being the cumulative distribution function and FALSE being the probability mass function."}],"variadic":0,"category":"statistical","example":"BINOMDIST(A2, A3, A4, TRUE)"},"BINOM.INV":{"description":"Returns the inverse of the cumulative binomial distribution.","arguments":[{"name":"trials","description":"The number of independent trials to be carried out. "},{"name":"probability","description":"The probability of success in each trial."},{"name":"alpha","description":"The criterion value."}],"variadic":0,"category":"statistical","example":"BINOM.INV(A2, A3, A4)"},"BINOMDIST":{"description":"Returns the binomial distribution probability of a given number of successes for a specified number of test trials.","arguments":[{"name":"successes","description":"The number of successes to calculate the probability for."},{"name":"trials","description":"The number of independent trials."},{"name":"probability","description":"The probability of success in one trial."},{"name":"cumulative","description":"A logical number that specifies the form of the function, with TRUE being the cumulative distribution function and FALSE being the probability mass function."}],"variadic":0,"category":"statistical","example":"BINOMDIST(A2, A3, A4, TRUE)"},"CHIDIST":{"description":"Calculates the right-tail probability of the Chi-square distribution.","arguments":[{"name":"x","description":"The value used to evaluate the distribution."},{"name":"k","description":"The degree of freedom."}],"variadic":0,"category":"statistical","example":"CHIDIST(0.1, 2)"},"CHIINV":{"description":"Calculates the inverse function of the right-tail probability of Chi-square distribution.","arguments":[{"name":"p","description":"The value used to evaluate the distribution."},{"name":"k","description":"The degree of freedom."}],"variadic":0,"category":"statistical","example":"CHIINV(0.2, 2)"},"CHISQ.DIST.RT":{"description":"Calculates the right-tail probability of the Chi-square distribution.","arguments":[{"name":"x","description":"The value used to evaluate the distribution."},{"name":"k","description":"The degree of freedom."}],"variadic":0,"category":"statistical","example":"CHISQ.DIST.RT(1, 2)"},"CHISQ.DIST":{"description":"Calculates the Chi-square distribution.","arguments":[{"name":"x","description":"The value used to evaluate the distribution."},{"name":"k","description":"The degree of freedom."},{"name":"cumulative","description":"The logical value which determines the format of the function. If TRUE, it returns the cumulative distribution function. If FALSE, it returns the probability density function.","required":false}],"variadic":0,"category":"statistical","example":"CHISQ.DIST(1, 2, FALSE)"},"CHISQ.INV.RT":{"description":"Calculates the inverse of the right-tail probability of the Chi-square distribution.","arguments":[{"name":"p","description":"The probability that is related to the Chi-square distribution."},{"name":"k","description":"The degree of freedom."}],"variadic":0,"category":"statistical","example":"CHISQ.INV.RT(0.1, 2)"},"CHISQ.INV":{"description":"Calculates the inverse of the left-tail probability of the Chi-square distribution.","arguments":[{"name":"probability","description":"The probability that is related to the Chi-square distribution."},{"name":"k","description":"The degree of freedom."}],"variadic":0,"category":"statistical","example":"CHISQ.INV(0.1, 2)"},"CHISQ.TEST":{"description":"Calculates the Chi-Square test of independence.","arguments":[{"name":"observed","description":"The range of observations that are used to examine expected value."},{"name":"expected","description":"The range of expected values. Expected values are the ratio of the product of row total and column total to the grand total."}],"variadic":0,"category":"statistical","example":"CHISQ.TEST(B2:C3, B5:C6)"},"CHITEST":{"description":"Calculates the probability of significant difference between two sets of data.","arguments":[{"name":"observed","description":"The range of observed values, which is used to test against the expected values."},{"name":"expected","description":"The range of all data."}],"variadic":0,"category":"statistical","example":"CHITEST(B2:C3, B5:C6)"},"CONFIDENCE.NORM":{"description":"Calculates the confidence interval with a normal distribution.","arguments":[{"name":"alpha","description":"The significance level, which is used to calculate the confidence level."},{"name":"standard_dev","description":"The standard deviation of a set of known data."},{"name":"size","description":"The sample size."}],"variadic":0,"category":"statistical","example":"CONFIDENCE.NORM(A2, A3, A4)"},"CONFIDENCE.T":{"description":"Calculates the confidence interval with a Student's T distribution.","arguments":[{"name":"alpha","description":"The significance level, which is used to calculate the confidence level."},{"name":"standard_dev","description":"The standard deviation of a set of known data."},{"name":"size","description":"The sample size."}],"variadic":0,"category":"statistical","example":"CONFIDENCE.T(A2, A3, A4)"},"CONFIDENCE":{"description":"Calculates the confidence interval with a normal distribution.","arguments":[{"name":"alpha","description":"The significance level, which is used to calculate the confidence level."},{"name":"standard_dev","description":"The standard deviation of a set of known data."},{"name":"size","description":"The sample size."}],"variadic":0,"category":"statistical","example":"CONFIDENCE(A2, A3, A4)"},"CORREL":{"description":"Calculates the correlation coefficient of two sets of data.","arguments":[{"name":"array1","description":"The first array of data."},{"name":"array2","description":"The second array of data."}],"variadic":0,"category":"statistical","example":"CORREL(A2:A4, B2:B4)"},"COUNT":{"description":"Counts the number of numeric values in a range.","arguments":[{"name":"value1","description":"The first value in a range within which you want to count numbers. It can be a number like 3, a cell reference like B4, or a cell range like A5:G5. Logical values \\"TRUE\\" and \\"FALSE\\" will be converted into 1 and 0, respectively, and will be counted."},{"name":"value2","description":"Additional values to be counted.","required":false}],"variadic":1,"category":"statistical","example":"COUNT(A2:A7)"},"COUNTA":{"description":"Counts the number of non-blank values in a range.","arguments":[{"name":"value1","description":"The first value to be counted. It can be any value, a cell reference like B4, or a cell range like A5:G5."},{"name":"value2","description":"Additional values to be counted.","required":false}],"variadic":1,"category":"statistical","example":"COUNTA(A2:A7)"},"COUNTBLANK":{"description":"Counts the number of empty cells in a range.","arguments":[{"name":"range","description":"The first cell or range of cells to be counted."}],"variadic":0,"category":"statistical","example":"COUNTBLANK(A2:B4)"},"COUNTIF":{"description":"Counts the number of cells within a range according to a specified criteria.","arguments":[{"name":"range","description":"The range of cells to check against criteria. It can be cells including numbers or names, arrays, or references that contain numbers."},{"name":"criteria","description":"The criteria that determines which cells will be counted. It can be stated in the form of a number, expression, cell reference, or text string."}],"variadic":0,"category":"statistical","example":"COUNTIF(A2:A6, \\"shirts\\")"},"COUNTIFS":{"description":"Calculates the number of cells in a range which satisfy a specified criteria.","arguments":[{"name":"criteria_range1","description":"The first range to be examined against the criteria."},{"name":"criteria1","description":"The first criterion."},{"name":"criteria_range2","description":"The second range to be examined against the criteria.","required":false},{"name":"criteria2","description":"The second criterion.","required":false}],"variadic":2,"category":"statistical","example":"COUNTIFS(B2:B5, \\">10\\", C2:C5, \\">5\\")"},"COVAR":{"description":"Calculates the covariance between two sets of numbers.","arguments":[{"name":"array1","description":"The first set of numbers. If this set of data contains text, logical values, or empty cells, the COVAR function will ignore the non-numerical values. If the two sets of numbers have different number of data points, the function returns the #N/A error value."},{"name":"array2","description":"The second set of numbers. If this set of data contains text, logical values, or empty cells, the COVAR function will ignore the non-numerical values. If the two sets of numbers have different number of data points, the function returns the #N/A error value."}],"variadic":0,"category":"statistical","example":"COVAR({1,7,5,8,2}, {3,8,9,10,6})"},"COVARIANCE.P":{"description":"Calculates the population covariance of two sets of data.","arguments":[{"name":"array1","description":"The first array of data."},{"name":"array2","description":"The second array of data."}],"variadic":0,"category":"statistical","example":"COVARIANCE.P(A2:A4, B2:B4)"},"COVARIANCE.S":{"description":"Calculates the sample covariance of two sets of data.","arguments":[{"name":"array1","description":"The first array of data."},{"name":"array2","description":"The second array of data."}],"variadic":0,"category":"statistical","example":"COVARIANCE.S(A2:A4, B2:B4)"},"CRITBINOM":{"description":"Calculates the smallest value for which the cumulative binomial distribution is greater than or equal to the specified criterion value.","arguments":[{"name":"trials","description":"The number of Binomial test."},{"name":"probability","description":"The probability of success in each test."},{"name":"alpha","description":"The criterion value."}],"variadic":0,"category":"statistical","example":"CRITBINOM(10, 0.7, 0.01)"},"DEVSQ":{"description":"Calculates the sum of the squared deviations from a sample mean on a given set of values.","arguments":[{"name":"number1","description":"The first number used to calculate the function."},{"name":"number2","description":"The second number used to calculate the function.","required":false}],"variadic":1,"category":"statistical","example":"DEVSQ(A2:A7)"},"EXPON.DIST":{"description":"Calculates the exponential distribution.","arguments":[{"name":"x","description":"The number at which to calculate the exponential distribution."},{"name":"lambda","description":"The parameter value."},{"name":"cumulative","description":"The logical value that decides the form of the function. If cumulative is TRUE, the function calculates with cumulative distribution function. If cumulative is FALSE, the function calculates with probability density function."}],"variadic":0,"category":"statistical","example":"EXPON.DIST(0.5, 7, TRUE)"},"EXPONDIST":{"description":"Calculates the exponential distribution.","arguments":[{"name":"x","description":"The number at which to calculate the exponential distribution."},{"name":"lambda","description":"The parameter value."},{"name":"cumulative","description":"The logical value that decides the form of the function. If cumulative is TRUE, the function calculates with cumulative distribution function. If cumulative is FALSE, the function calculates with probability density function."}],"variadic":0,"category":"statistical","example":"EXPONDIST(0.5, 7, TRUE)"},"F.DIST.RT":{"description":"Calculates the right-tailed F probability distribution.","arguments":[{"name":"x","description":"The value at which to evaluate the function."},{"name":"deg_freedom1","description":"The degree of freedom of the numerator."},{"name":"deg_freedom2","description":"The degree of freedom of denominator."}],"variadic":0,"category":"statistical","example":"F.DIST.RT(B2, B3, B4)"},"F.DIST":{"description":"Calculates the F probability distribution.","arguments":[{"name":"x","description":"The value at which to evaluate the function."},{"name":"deg_freedom1","description":"The degree of freedom for numerator."},{"name":"deg_freedom2","description":"The degree of freedom for denominator."},{"name":"cumulative","description":"The logical value that decides the form of the function. If cumulative is TRUE, the function calculates with cumulative distribution function. If cumulative is FALSE, the function calculates with probability density function."}],"variadic":0,"category":"statistical","example":"F.DIST(B2, B3, B4, TRUE)"},"F.INV.RT":{"description":"Calculates the inverse of the right-tailed F distribution.","arguments":[{"name":"probability","description":"The probability at which to evaluate the F cumulative distribution."},{"name":"deg_freedom1","description":"The degree of freedom for numerator."},{"name":"deg_freedom2","description":"The degree of freedom for denominator."}],"variadic":0,"category":"statistical","example":"F.INV.RT(B2, B3, B4)"},"F.INV":{"description":"Calculates the inverse of the F distribution.","arguments":[{"name":"probability","description":"The probability at which to evaluate the F cumulative distribution."},{"name":"deg_freedom1","description":"The degree of freedom for numerator."},{"name":"deg_freedom2","description":"The degree of freedom for denominator."}],"variadic":0,"category":"statistical","example":"F.INV(B2, B3, B4)"},"F.TEST":{"description":"Returns the result of an F-test.","arguments":[{"name":"array1","description":"The first array of data."},{"name":"array2","description":"The second array of data."}],"variadic":0,"category":"statistical","example":"F.TEST(A2:A5, B2:B5)"},"FDIST":{"description":"Calculates the F probability distribution.","arguments":[{"name":"x","description":"The value at which to evaluate the function."},{"name":"deg_freedom1","description":"The degree of freedom for numerator."},{"name":"deg_freedom2","description":"The degree of freedom for denominator."},{"name":"cumulative","description":"The logical value that decides the form of the function. If cumulative is TRUE, the function calculates with cumulative distribution function. If cumulative is FALSE, the function calculates with probability density function.","required":false}],"variadic":0,"category":"statistical","example":"FDIST(B2, B3, B4, TRUE)"},"FINV":{"description":"Calculates the inverse of the F distribution.","arguments":[{"name":"probability","description":"The probability at which to calculate the F cumulative distribution."},{"name":"deg_freedom1","description":"The degree of freedom for numerator."},{"name":"deg_freedom2","description":"The degree of freedom for denominator."}],"variadic":0,"category":"statistical","example":"FINV(B2, B3, B4)"},"FISHER":{"description":"Calculates the Fisher transformation for a given value.","arguments":[{"name":"x","description":"The value at which to calculate."}],"variadic":0,"category":"statistical","example":"FISHER(0.9)"},"FISHERINV":{"description":"Calculates the inverse of the Fisher transformation for a given value.","arguments":[{"name":"y","description":"The value at which to calculate."}],"variadic":0,"category":"statistical","example":"FISHERINV(0.47)"},"FORECAST":{"description":"Calculates or forecasts the future value of a value.","arguments":[{"name":"x","description":"The value for which you want to calculate the future value."},{"name":"data_y","description":"The firt array of known data."},{"name":"data_x","description":"The second array of known data."}],"variadic":0,"category":"statistical","example":"FORECAST(12, A2:A5, B2:B5)"},"FTEST":{"description":"Returns the result of an F-test.","arguments":[{"name":"array1","description":"The first array of data."},{"name":"array2","description":"The second array of data."}],"variadic":0,"category":"statistical","example":"FTEST(A2:A5, B2:B5)"},"GAMMA.DIST":{"description":"Returns the gamma distribution.","arguments":[{"name":"x","description":"The value at which to evaluate the function."},{"name":"alpha","description":"The parameter value to be used as an input to the gamma distribution."},{"name":"beta","description":"The parameter value to be used as an input to the gamma distribution. The function returns standard gamma distribution if beta is 1."},{"name":"cumulative","description":"The logical value that decides the form of the function. If cumulative is TRUE, the function calculates with cumulative distribution function. If cumulative is FALSE, the function calculates with probability density function."}],"variadic":0,"category":"statistical","example":"GAMMA.DIST(B2, B3, B4, FALSE)"},"GAMMA.INV":{"description":"Returns the inverse of the gamma distribution.","arguments":[{"name":"probability","description":"The probability related to the gamma distribution."},{"name":"alpha","description":"The parameter value to be used as an input to the gamma distribution."},{"name":"beta","description":"The parameter value to be used as an input to the gamma distribution. The function returns standard gamma distribution if beta is 1."}],"variadic":0,"category":"statistical","example":"GAMMA.INV(B2, B3, B4)"},"GAMMA":{"description":"Returns the value of the gamma function.","arguments":[{"name":"x","description":"The number that you want to calculate."}],"variadic":0,"category":"statistical","example":"GAMMA(0.1)"},"GAMMADIST":{"description":"Returns the gamma distribution.","arguments":[{"name":"x","description":"The value at which to evaluate the function."},{"name":"alpha","description":"The parameter value to be used as an input to the gamma distribution."},{"name":"beta","description":"The parameter value to be used as an input to the gamma distribution. The function returns standard gamma distribution if beta is 1."},{"name":"cumulative","description":"The logical value that decides the form of the function. If cumulative is TRUE, the function calculates with cumulative distribution function. If cumulative is FALSE, the function calculates with probability density function."}],"variadic":0,"category":"statistical","example":"GAMMADIST(B2, B3, B4, FALSE)"},"GAMMAINV":{"description":"Returns the inverse of the gamma distribution.","arguments":[{"name":"probability","description":"The probability related to the gamma distribution."},{"name":"alpha","description":"The parameter value to be used as an input to the gamma distribution."},{"name":"beta","description":"The parameter value to be used as an input to the gamma distribution. The function returns standard gamma distribution if beta is 1."}],"variadic":0,"category":"statistical","example":"GAMMAINV(B2, B3, B4)"},"GAMMALN":{"description":"Calculates the natural logarithm of the gamma function.","arguments":[{"name":"x","description":"The number that you want to calculate."}],"variadic":0,"category":"statistical","example":"GAMMALN(12)"},"GAUSS":{"description":"Calculates the probability that a member in a normal population will fall between the mean value and the specified number of standard deviations.","arguments":[{"name":"x","description":"The number of standard deviations."}],"variadic":0,"category":"statistical","example":"GAUSS(1)"},"GEOMEAN":{"description":"Calculates the geometric mean of a set of data.","arguments":[{"name":"number1","description":"The number used to calculate the function."},{"name":"number2","description":"The number used to calculate the function.","required":false}],"variadic":1,"category":"statistical","example":"GEOMEAN(A2:A4)"},"HARMEAN":{"description":"Calculates the harmonic mean of a set of data.","arguments":[{"name":"number1","description":"The number used to calculate the function."},{"name":"number2","description":"The number used to calculate the function.","required":false}],"variadic":1,"category":"statistical","example":"HARMEAN(A2:A4)"},"HYPGEOM.DIST":{"description":"Calculates the hypergeometric distribution for a given number of successes from a population.","arguments":[{"name":"sample_s","description":"The number of successes in the sample."},{"name":"number_sample","description":"The sample size."},{"name":"population_s","description":"The number of successes in the population."},{"name":"number_pop","description":"The population size."},{"name":"cumulative","description":"A logical value that specifies the type of distribution to use, with TRUE being cumulative distribution function and FALSE being the probability mass function."}],"variadic":0,"category":"statistical","example":"HYPGEOM.DIST(A2, A3, A4, A5, TRUE)"},"HYPGEOMDIST":{"description":"Calculates the hypergeometric distribution for a given number of successes from a population.","arguments":[{"name":"sample_s","description":"The number of successes in the sample."},{"name":"number_sample","description":"The sample size."},{"name":"population_s","description":"The number of successes in the population."},{"name":"number_pop","description":"The population size."}],"variadic":0,"category":"statistical","example":"HYPGEOMDIST(A2, A3, A4, A5)"},"INTERCEPT":{"description":"Calculates the point at which a regression line will intercept the y-axis using existing x-values and y-values.","arguments":[{"name":"known_y","description":"The array of y values."},{"name":"known_x","description":"The array of x values."}],"variadic":0,"category":"statistical","example":"INTERCEPT(A2:A5,B2:B5)"},"KURT":{"description":"Calculates the kurtosis of a given dataset.","arguments":[{"name":"number1","description":"The first value in the dataset."},{"name":"number2","description":"Subsequent values in the dataset.","required":false}],"variadic":1,"category":"statistical","example":"KURT(A2:A7)"},"LARGE":{"description":"Calculates the k-th largest value from a given dataset.","arguments":[{"name":"array","description":"The range of values to calculate the k-th largest value."},{"name":"k","description":"The k value."}],"variadic":0,"category":"statistical","example":"LARGE(A2:A8, 4)"},"LOGINV":{"description":"Calculates the inverse of the lognormal cumulative distribution.","arguments":[{"name":"probability","description":"The value at which to calculate the distribution."},{"name":"mean","description":"The arithmetic mean of ln(x)."},{"name":"standard_dev","description":"The standard deviation of ln(x)."}],"variadic":0,"category":"statistical","example":"LOGINV(A2, A3, A4)"},"LOGNORM.DIST":{"description":"Calculates the lognormal distribution of a supplied value x.","arguments":[{"name":"x","description":"The value at which to calculate the distribution."},{"name":"mean","description":"The arithmetic mean of ln(x)."},{"name":"standard_dev","description":"The standard deviation of ln(x)."},{"name":"cumulative","description":"A logical value that specifies the type of distribution to use, with TRUE being cumulative distribution function and FALSE being the probability mass function."}],"variadic":0,"category":"statistical","example":"LOGNORM.DIST(A2, A3, A4, FALSE)"},"LOGNORM.INV":{"description":"Calculates the inverse of the lognormal cumulative distribution of a suppplied value x.","arguments":[{"name":"probability","description":"The value at which to calculate the distribution."},{"name":"mean","description":"The arithmetic mean of ln(x)."},{"name":"standard_dev","description":"The standard deviation of ln(x)."}],"variadic":0,"category":"statistical","example":"LOGINV(A2, A3, A4)"},"LOGNORMDIST":{"description":"Calculates the lognormal distribution of a supplied value x.","arguments":[{"name":"x","description":"The value at which to calculate the distribution."},{"name":"mean","description":"The arithmetic mean of ln(x)."},{"name":"standard_dev","description":"The standard deviation of ln(x)."}],"variadic":0,"category":"statistical","example":"LOGNORMDIST(A2, A3, A4)"},"MAX":{"description":"Returns the maximum value in a set of numeric data.","arguments":[{"name":"number1","description":"First number in a series of numbers for which you want to identify the largest value. It can be a number like 3, a cell reference like B4, or a cell range like A5:G5."},{"name":"number2","description":"Second and subsequent numbers, cell references or ranges.","required":false}],"variadic":1,"category":"statistical","example":"MAX(A1:A5)"},"MAXA":{"description":"Returns the largest value in a dataset.","arguments":[{"name":"value1","description":"The first value in the dataset."},{"name":"value2","description":"Subsequent values in the dataset.","required":false}],"variadic":1,"category":"statistical","example":"MAX(A2:A7)"},"MAXIFS":{"description":"Returns the largest value in a dataset based on certain criteria.","arguments":[{"name":"max_range","description":"An array of values from which to find the largest value."},{"name":"criteria_range1","description":"An array of values to be tested against the first criteria."},{"name":"criteria1","description":"The criteria to be tested."},{"name":"criteria_range2","description":"Additional array of values to be tested.","required":false},{"name":"criteria2","description":"Additional criteria to be tested.","required":false}],"variadic":2,"category":"statistical","example":"MAXIFS(A1:A6, B1:B6, 58)"},"MEDIAN":{"description":"Returns the median value in a dataset.","arguments":[{"name":"number1","description":"The first value in the dataset."},{"name":"number2","description":"Subsequent values in the dataset.","required":false}],"variadic":1,"category":"statistical","example":"MEDIAN(A2:A7)"},"MIN":{"description":"Returns the minimum value in a set of numeric data.","arguments":[{"name":"number1","description":"First number in a series of numbers for which you want to identify the smallest value. It can be a number like 3, a cell reference like B4, or a cell range like A5:G5."},{"name":"number2","description":"Second and subsequent numbers, cell references or ranges.","required":false}],"variadic":1,"category":"statistical","example":"MIN(A1:A5)"},"MINA":{"description":"Returns the smallest value in a dataset.","arguments":[{"name":"value1","description":"The first value in the dataset."},{"name":"value2","description":"Subsequent values in the dataset.","required":false}],"variadic":1,"category":"statistical","example":"MINA(A2:A7)"},"MINIFS":{"description":"Returns the smallest value in a dataset based on certain criteria.","arguments":[{"name":"min_range","description":"An array of values from which to find the smallest value."},{"name":"criteria_range1","description":"An array of values to be tested against the first criteria."},{"name":"criteria1","description":"The criteria to be tested."},{"name":"criteria_range2","description":"Additional array of values to be tested.","required":false},{"name":"criteria2","description":"Additional criteria to be tested.","required":false}],"variadic":2,"category":"statistical","example":"MINIFS(A2:A6, B2:B6, \\"<85\\")"},"MODE.SNGL":{"description":"Returns the most frequently occurring value of a list of given numbers.","arguments":[{"name":"number1","description":"The first number of the given dataset to calculate the mode."},{"name":"number2","description":"Subsequent values to calculate the mode.","required":false}],"variadic":1,"category":"statistical","example":"MODE.SNGL(A2:A8)"},"MODE":{"description":"Returns the most frequently occurring value of a list of given numbers.","arguments":[{"name":"number1","description":"The first number of the given dataset to calculate the mode."},{"name":"number2","description":"Subsequent values to calculate the mode.","required":false}],"variadic":1,"category":"statistical","example":"MODE(A2:A8)"},"NEGBINOM.DIST":{"description":"Returns the negative binomial distribution.","arguments":[{"name":"number_f","description":"The number of failures."},{"name":"number_s","description":"The required number of successes."},{"name":"probability_s","description":"The probability of a success in one trial."},{"name":"cumulative","description":"A logical value that specifies the type of distribution to use, with TRUE being cumulative distribution function and FALSE being the probability mass function."}],"variadic":0,"category":"statistical","example":"NEGBINOM.DIST(A2, A3, A4, TRUE)"},"NEGBINOMDIST":{"description":"Returns the negative binomial distribution.","arguments":[{"name":"number_f","description":"The number of failures."},{"name":"number_s","description":"The required number of successes."},{"name":"probability_s","description":"The probability of a success in one trial."}],"variadic":0,"category":"statistical","example":"NEGBINOMDIST(A2, A3, A4)"},"NORM.DIST":{"description":"Calculates the normal distribution for the supplied mean and standard deviation.","arguments":[{"name":"x","description":"The value at which to calculate the distribution."},{"name":"mean","description":"The arithmetic mean of the distribution."},{"name":"standard_dev","description":"The standard deviation of the distribution."},{"name":"cumulative","description":"A logical value that specifies the type of distribution to use, with TRUE being cumulative distribution function and FALSE being the probability mass function."}],"variadic":0,"category":"statistical","example":"NORM.DIST(A2, A3, A4, TRUE)"},"NORM.INV":{"description":"Calculates the inverse of the normal cumulative distribution for the supplied mean and standard deviation.","arguments":[{"name":"probability","description":"The value at which to calculate the distribution."},{"name":"mean","description":"The arithmetic mean of the distribution."},{"name":"standard_dev","description":"The standard deviation of the distribution."}],"variadic":0,"category":"statistical","example":"NORM.INV(A2, A3, A4)"},"NORM.S.DIST":{"description":"Calculates the standard normal cumulative distribution function.","arguments":[{"name":"z","description":"The probability at which to calculate the distribution."},{"name":"cumulative","description":"A logical value that specifies the type of distribution to use, with TRUE being cumulative distribution function and FALSE being the probability mass function. The default value is FALSE.","required":false}],"variadic":0,"category":"statistical","example":"NORM.S.DIST(-1.26)"},"NORM.S.INV":{"description":"Calculates the inverse of the standard normal cumulative distribution function.","arguments":[{"name":"probability","description":"The probability at which to calculate the distribution."}],"variadic":0,"category":"statistical","example":"NORM.S.INV(0.31444)"},"NORMDIST":{"description":"Calculates the normal distribution for the supplied mean and standard deviation.","arguments":[{"name":"x","description":"The value at which to calculate the distribution."},{"name":"mean","description":"The arithmetic mean of the distribution."},{"name":"standard_dev","description":"The standard deviation of the distribution."},{"name":"cumulative","description":"A logical value that specifies the type of distribution to use, with TRUE being cumulative distribution function and FALSE being the probability mass function."}],"variadic":0,"category":"statistical","example":"NORMDIST(A2, A3, A4, TRUE)"},"NORMINV":{"description":"Calculates the inverse of the normal cumulative distribution for the supplied mean and standard deviation.","arguments":[{"name":"x","description":"The value at which to calculate the distribution."},{"name":"mean","description":"The arithmetic mean of the distribution."},{"name":"standard_dev","description":"The standard deviation of the distribution."}],"variadic":0,"category":"statistical","example":"NORMINV(A2, A3, A4)"},"NORMSDIST":{"description":"Calculates the standard normal cumulative distribution function.","arguments":[{"name":"x","description":"The probability at which to calculate the distribution."}],"variadic":0,"category":"statistical","example":"NORMSDIST(-1.26)"},"NORMSINV":{"description":"Calculates the inverse of the standard normal cumulative distribution function.","arguments":[{"name":"x","description":"The probability at which to calculate the distribution."}],"variadic":0,"category":"statistical","example":"NORMSINV(0.31444)"},"PEARSON":{"description":"Calculates the PEARSON product-moment correlation coefficient for two given sets of data.","arguments":[{"name":"array1","description":"A set of independent data."},{"name":"array2","description":"A set of dependent data."}],"variadic":0,"category":"statistical","example":"PEARSON(A2:A6, B2:B6)"},"PERCENTILE.EXC":{"description":"Returns the k-th percentile for a specified range of values and a specified k value.","arguments":[{"name":"array","description":"The range of values to calculate the k-th percentile."},{"name":"k","description":"The k value, which should be between 0 and 1 (exclusive)."}],"variadic":0,"category":"statistical","example":"PERCENTILE.EXC(A1:A5, 0.2)"},"PERCENTILE.INC":{"description":"Returns the k-th percentile for a specified range of values and a specified k value.","arguments":[{"name":"array","description":"The range of values to calculate the k-th percentile. "},{"name":"k","description":"The k value, which should be between 0 and 1 (inclusive)."}],"variadic":0,"category":"statistical","example":"PERCENTILE.INC(A2:A6, 1)"},"PERCENTILE":{"description":"Returns the k-th percentile for a specified range of values and a specified k value.","arguments":[{"name":"array","description":"The range of values to calculate the k-th percentile."},{"name":"k","description":"The k value, which should be between 0 and 1."}],"variadic":0,"category":"statistical","example":"PERCENTILE(A2:A6, 0.5)"},"PERCENTRANK.EXC":{"description":"Calculates the relative position of a value within a set of values, in the form of a percentage.","arguments":[{"name":"array","description":"The array of values to evaluate."},{"name":"x","description":"The value that you want to find the position of."},{"name":"significance","description":"The significant figures to be calculate.","required":false}],"variadic":0,"category":"statistical","example":"PERCENTRANK.EXC(A2:A9, 20, 4)"},"PERCENTRANK.INC":{"description":"Calculates the relative position of a value within a set of values, in the form of a percentage.","arguments":[{"name":"array","description":"The array of values to evaluate."},{"name":"x","description":"The value that you want to find the position of."},{"name":"significance","description":"The significant figures to be calculate.","required":false}],"variadic":0,"category":"statistical","example":"PERCENTRANK.INC(A2:A9, 20, 4)"},"PERCENTRANK":{"description":"Calculates the relative position of a value within a set of values, in the form of a percentage.","arguments":[{"name":"array","description":"The array of values to evaluate."},{"name":"x","description":"The value that you want to find the position of."},{"name":"significance","description":"The number that specifies the number of decimal points to round the percentage value to.","required":false}],"variadic":0,"category":"statistical","example":"PERCENTRANK(A2:A9, 20, 4)"},"PERMUT":{"description":"Calculates the number of permutations from a specified number of objects from a given set of objects.","arguments":[{"name":"number","description":"The total number of objects."},{"name":"number_chosen","description":"The number of objects selected from the set."}],"variadic":0,"category":"statistical","example":"PERMUT(30, 5)"},"PERMUTATIONA":{"description":"Calculates the number of permutations from a specified number of objects from a given set of objects.","arguments":[{"name":"number","description":"The total number of objects."},{"name":"number_chosen","description":"The number of objects selected from the set."}],"variadic":0,"category":"statistical","example":"ERMUTATIONA(30, 5)"},"PHI":{"description":"Calculates the value of the density function for a standard normal distribution for a given value.","arguments":[{"name":"x","description":"The number for which to calculate the density of the standard normal distribution."}],"variadic":0,"category":"statistical","example":"PHI(12)"},"POISSON.DIST":{"description":"Calculates the Poisson distribution.","arguments":[{"name":"x","description":"The number of events."},{"name":"mean","description":"The expected numeric value."},{"name":"cumulative","description":"A logical value that specifies the type of distribution to use, with TRUE being cumulative distribution function and FALSE being the probability mass function.","required":false}],"variadic":0,"category":"statistical","example":"POISSON.DIST(5, 10, TRUE)"},"POISSON":{"description":"Calculates the Poisson distribution.","arguments":[{"name":"x","description":"The number of events."},{"name":"mean","description":"The expected numeric value."},{"name":"cumulative","description":"A logical value that specifies the type of distribution to use, with TRUE being cumulative distribution function and FALSE being the probability mass function.","required":false}],"variadic":0,"category":"statistical","example":"POISSON(2, 3, TRUE)"},"PROB":{"description":"Calculate the probability that the given set of values falls between two limits.","arguments":[{"name":"x_range","description":"An array of values that have associated probabilities."},{"name":"prob_range","description":"The array of probabilities corresponding to the values in x_range."},{"name":"lower_limit","description":"The lower bound of the array of values for which to calculate the probability."},{"name":"upper_limit","description":"The upper bound of the array of values for which to calculate the probability.","required":false}],"variadic":0,"category":"statistical","example":"PROB(A2:A5, B2:B5, 2, 8)"},"QUARTILE.EXC":{"description":"Calculates the quartile of the given dataset, based on a percentile range of 0 to 1, exclusive.","arguments":[{"name":"array","description":"The set of data to calculate the quartile."},{"name":"quart","description":"The quartile value to return."}],"variadic":0,"category":"statistical","example":"QUARTILE.EXC(A2:A7, 1)"},"QUARTILE.INC":{"description":"Calculates the quartile of the given dataset, based on a percentile range of 0 to 1, inclusive.","arguments":[{"name":"array","description":"The set of data to calculate the quartile."},{"name":"quart","description":"The quartile value to return."}],"variadic":0,"category":"statistical","example":"QUARTILE.INC(A2:A10, 3)"},"QUARTILE":{"description":"Calculates the quartile of the given dataset.","arguments":[{"name":"array","description":"The set of data to calculate the quartile."},{"name":"quart","description":"The quartile value to return."}],"variadic":0,"category":"statistical","example":"QUARTILE(A2:A7, 2)"},"RANK.AVG":{"description":"Returns the statistical rank of a given value within a supplied set of values. If there are duplicate values in the set, the average rank is returned.","arguments":[{"name":"number","description":"The value whose rank you want to find."},{"name":"ref","description":"A set of values."},{"name":"order","description":"The value defines whether the order should be ascending or descending, where 0 is descending and 1 is ascending.","required":false}],"variadic":0,"category":"statistical","example":"RANK.AVG(A2,A2:A6,1)"},"RANK.EQ":{"description":"Returns the statistical rank of a given value within a supplied set of values.","arguments":[{"name":"number","description":"The value whose rank you want to find."},{"name":"ref","description":"A set of values."},{"name":"order","description":"The value defines whether the order should be ascending or descending, where 0 is descending and 1 is ascending.","required":false}],"variadic":0,"category":"statistical","example":"RANK.EQ(A2,A2:A6,1)"},"RANK":{"description":"Returns the statistical rank of a given value within a supplied set of values.","arguments":[{"name":"number","description":"The value whose rank you want to find."},{"name":"ref","description":"A set of values."},{"name":"order","description":"The value defines whether the order should be ascending or descending, where 0 is descending and 1 is ascending.","required":false}],"variadic":0,"category":"statistical","example":"RANK(A2,A2:A6,1)"},"RSQ":{"description":"Calculates the square of the Pearson product moment correlation coefficient with given sets of data.","arguments":[{"name":"data_y","description":"The bounds or array of dependent dataset."},{"name":"data_x","description":"The bounds or array of independent dataset."}],"variadic":0,"category":"statistical","example":"RSQ(A2:A6,B2:B6)"},"SKEW.P":{"description":"Calculates the skewness of a distrubtion of a specified set of values, based on a population.","arguments":[{"name":"number1","description":"The first number or range of data."},{"name":"number2","description":"Subsequent numbers or ranges of data.","required":false}],"variadic":1,"category":"statistical","example":"SKEW.P(A2:A10)"},"SKEW":{"description":"Calculates the skewness of a distrubtion of a specified set of values.","arguments":[{"name":"number1","description":"The first number or range of data."},{"name":"number2","description":"Subsequent numbers or ranges of data.","required":false}],"variadic":1,"category":"statistical","example":"SKEW(A2:A10)"},"SLOPE":{"description":"Returns the slope of the linear regression line from data points in data_x and data_y.","arguments":[{"name":"data_y","description":"An array or range of dependent data points."},{"name":"data_x","description":"The set of independent data points."}],"variadic":0,"category":"statistical","example":"SLOPE(A2:A7,B2:B7)"},"SMALL":{"description":"Returns the k-th smallest value within a set of numeric values.","arguments":[{"name":"array","description":"A range or array of numeric values."},{"name":"k","description":"The position in the array or range of data to return."}],"variadic":0,"category":"statistical","example":"SMALL(A2:A7,3)"},"STANDARDIZE":{"description":"Returns a normalized value of a distribution which is characterized by a specified mean value and standard deviation.","arguments":[{"name":"x","description":"The value to be normalized."},{"name":"mean","description":"The mean of the distribution."},{"name":"standard_dev","description":"The standard deviation of the distribution."}],"variadic":0,"category":"statistical","example":"STDEV(A2, A3, A4)"},"STDEV.P":{"description":"Calculates the standard deviation of a population based on the entire population.","arguments":[{"name":"number1","description":"The first number in the population."},{"name":"number2","description":"Subsequent number in the population.","required":false}],"variadic":1,"category":"statistical","example":"STDEV.P(A2:A11)"},"STDEV.S":{"description":"Calculates the standard deviation of a given sample while ignoring logical values and text.","arguments":[{"name":"number1","description":"The first number in the population."},{"name":"number2","description":"Subsequent number in the population.","required":false}],"variadic":1,"category":"statistical","example":"STDEV.S(A2:A12)"},"STDEV":{"description":"Calculates the standard deviation of a given sample.","arguments":[{"name":"number1","description":"The first number in the population."},{"name":"number2","description":"Subsequent number in the population.","required":false}],"variadic":1,"category":"statistical","example":"STDEV(A2:A11)"},"STDEVA":{"description":"Calculates the standard deviation of a given sample.","arguments":[{"name":"value1","description":"The first number in the population."},{"name":"value2","description":"Subsequent number in the population.","required":false}],"variadic":1,"category":"statistical","example":"STDEVA(A2:A11)"},"STDEVP":{"description":"Calculates the standard deviation of a population based on the entire population.","arguments":[{"name":"number1","description":"The first number in the population."},{"name":"number2","description":"Subsequent number in the population.","required":false}],"variadic":1,"category":"statistical","example":"STDEVP(A2:A11)"},"STDEVPA":{"description":"Calculates the standard deviation of an entire population, including logical values and text.","arguments":[{"name":"value1","description":"The first number in the population."},{"name":"value2","description":"Subsequent number in the population.","required":false}],"variadic":1,"notes":[["Arguments can be the following: numbers; names, arrays, or references that contain numbers; text representations of numbers; or logical values, such as TRUE and FALSE, in a reference.","Text representations of numbers that you type directly into the list of arguments are counted.","Arguments that contain TRUE evaluate as 1; arguments that contain text or FALSE evaluate as 0 (zero)."]],"category":"statistical","example":"STDEVPA(A2:A11)"},"STEYX":{"description":"Calculates the standard error of the regression.","arguments":[{"name":"data_y","description":"An array of the dependent values."},{"name":"data_x","description":"An array of the independent values."}],"variadic":0,"category":"statistical","example":"STEYX(A2:A7,B2:B7)"},"T.DIST.2T":{"description":"Calculates the two-tailed student's T distribution.","arguments":[{"name":"x","description":"The value at which to evaluate the distribution."},{"name":"deg_freedom","description":"The number of degrees of freedom."}],"variadic":0,"category":"statistical","example":"T.DIST.2T(A2,A3)"},"T.DIST.RT":{"description":"Calculates the right-tailed student's T distribution.","arguments":[{"name":"x","description":"The value at which to evaluate the distribution."},{"name":"deg_freedom","description":"The number of degrees of freedom."}],"variadic":0,"category":"statistical","example":"T.DIST.RT(A2, A3)"},"T.DIST":{"description":"Calculates the one-tailed Student's T distribution.","arguments":[{"name":"x","description":"The value at which to evaluate the distribution."},{"name":"deg_freedom","description":"The number of degrees of freedom."},{"name":"cumulative","description":"A logical value that the type of distribution, where TRUE equals cumulative function and FALSE equals probability density function."}],"variadic":0,"category":"statistical","example":"T.DIST(48, 2, TRUE)"},"T.INV.2T":{"description":"Calculates the inverse of the two-tailed Student's T distribution.","arguments":[{"name":"probability","description":"The probability for which to evaluate the inverse of the left-tailed Student's T distribution."},{"name":"deg_freedom","description":"The number of degrees of freedom."}],"variadic":0,"category":"statistical","example":"T.INV.2T(A2, A3)"},"T.INV":{"description":"Calculates the left-tail inverse of the Student's T distribution.","arguments":[{"name":"probability","description":"The probability for which to evaluate the inverse of the left-tailed Student's T distribution."},{"name":"deg_freedom","description":"The number of degrees of freedom."}],"variadic":0,"category":"statistical","example":"T.INV(A2, A3)"},"T.TEST":{"description":"Calculates the probability associated with the Student's T TEST, which is commonly used to test if two groups of data are likely to come from the same underlying populations with the same mean.","arguments":[{"name":"array1","description":"The first set of data."},{"name":"array2","description":"The second set of data."},{"name":"tails","description":"The number of tails for the distribution."},{"name":"type","description":"The type of T test. 1 is the paired test. 2 is the two-sample equal variance test. 3 is the two-sample unequal variance test."}],"variadic":0,"category":"statistical","example":"T.TEST(A2:A9, B2:B9, 2, 1)"},"TDIST":{"description":"Calculates the Student's T distribution.","arguments":[{"name":"x","description":"The value at which to evaluate the distribution."},{"name":"deg_freedom","description":"The number of degrees of freedom."},{"name":"tails","description":"The number of tails to return."}],"variadic":0,"category":"statistical","example":"TDIST(A2, A3, 1)"},"TINV":{"description":"Calculates the inverse of the two-tailed Student's T distribution.","arguments":[{"name":"probability","description":"The probability for which to evaluate the two-tailed Student's T distribution."},{"name":"deg_freedom","description":"The number of degrees of freedom."}],"variadic":0,"category":"statistical","example":"TINV(A2, A3)"},"TRIMMEAN":{"description":"Returns the trimmed mean of a specified set of data.","arguments":[{"name":"array","description":"A set of values to trim."},{"name":"percent","description":"The percentage of data points to exclude from the data."}],"variadic":0,"category":"statistical","example":"TRIMMEAN(A2:A11, 0.5)"},"TTEST":{"description":"Calculates the probability associated with the Student's T TEST, which is commonly used to test if two groups of data are likely to come from the same underlying populations with the same mean.","arguments":[{"name":"array1","description":"The first set of data."},{"name":"array2","description":"The second set of data."},{"name":"tails","description":"The number of tails for the distribution."},{"name":"type","description":"The type of T test. 1 is the paired test. 2 is the two-sample equal variance test. 3 is the two-sample unequal variance test."}],"variadic":0,"category":"statistical","example":"TTEST(A2:A9, B2:B9, 2, 1)"},"VAR.P":{"description":"Calculates the variance based on the entire population.","arguments":[{"name":"number1","description":"The first value or reference."},{"name":"number2","description":"Subsequent values.","required":false}],"variadic":1,"category":"statistical","example":"VAR.P(A2:A9)"},"VAR.S":{"description":"Calculates the variance based on a sample of data.","arguments":[{"name":"number1","description":"The first value or reference."},{"name":"number2","description":"Subsequent values.","required":false}],"variadic":1,"category":"statistical","example":"VAR.S(A1:A10)"},"VAR":{"description":"Calculates the variance based on a sample of data. Logical values and texts are not counted.","arguments":[{"name":"number1","description":"The first value or reference."},{"name":"number2","description":"Subsequent values.","required":false}],"variadic":1,"category":"statistical","example":"VAR(A2:A11)"},"VARA":{"description":"Calculates the variance based on a sample of data. Logical values and texts are counted.","arguments":[{"name":"value1","description":"The first value or reference."},{"name":"value2","description":"Subsequent values.","required":false}],"variadic":1,"category":"statistical","example":"VARA(A2:A9)"},"VARP":{"description":"Calculates the variance based on the entire population. Logical values and texts are not counted.","arguments":[{"name":"number1","description":"The first value or reference."},{"name":"number2","description":"Subsequent values or references.","required":false}],"variadic":1,"category":"statistical","example":"VARP(A2:A6)"},"VARPA":{"description":"Calculates the variance based on the entire population. Logical values and texts are counted.","arguments":[{"name":"value1","description":"The first value or reference."},{"name":"value2","description":"Subsequent values or references.","required":false}],"variadic":1,"category":"statistical","example":"VARPA(A2:A10)"},"WEIBULL.DIST":{"description":"Calculates the Weibull Probability Density function or the Weibull Cumulative Distribution function for a supplied set of parameters.","arguments":[{"name":"x","description":"The value to calculate, which must be greater than or equal to 0."},{"name":"alpha","description":"A parameter to the distribution."},{"name":"beta","description":"A parameter to the distribution."},{"name":"cumulative","description":"A logical argument that decides the form of distribution. A logical value that specifies the type of distribution to use, with TRUE being cumulative distribution function and FALSE being the probability mass function."}],"variadic":0,"category":"statistical","example":"WEIBULL.DIST(A2, A3, A4, TRUE)"},"WEIBULL":{"description":"Calculates the Weibull Probability Density function or the Weibull Cumulative Distribution function for a supplied set of parameters.","arguments":[{"name":"x","description":"The value to calculate, which must be greater than or equal to 0."},{"name":"alpha","description":"A parameter to the distribution."},{"name":"beta","description":"A parameter to the distribution."},{"name":"cumulative","description":"A logical argument that decides the form of distribution. A logical value that specifies the type of distribution to use, with TRUE being cumulative distribution function and FALSE being the probability mass function."}],"variadic":0,"category":"statistical","example":"WEIBULL(A2, A3, A4, TRUE)"},"Z.TEST":{"description":"Returns the one-tailed probability value of a z-test for a supplied set of values.","arguments":[{"name":"array","description":"The set of values to test against the hypothesized sample mean."},{"name":"x","description":"The assumed sample mean."},{"name":"sigma","description":"The population standard deviation.","required":false}],"variadic":0,"category":"statistical","example":"Z.TEST(A2:A8,30)"},"ZTEST":{"description":"Returns the one-tailed probability value of a z-test for a supplied set of values.","arguments":[{"name":"array","description":"The set of values to test against the hypothesized sample mean."},{"name":"x","description":"The assumed sample mean."},{"name":"sigma","description":"The population standard deviation.","required":false}],"variadic":0,"category":"statistical","example":"ZTEST(A2:A7,6)"},"ARABIC":{"description":"Converts Roman numerals into Arabic numerals.","arguments":[{"name":"text","description":"Roman numerals you wish to convert."}],"variadic":0,"category":"text_and_data","example":"ARABIC(A3)"},"CHAR":{"description":"Converts the number to code according to ASCII encoding.","arguments":[{"name":"number","description":"Number to convert."}],"variadic":0,"category":"text_and_data","example":"CHAR(64)"},"CLEAN":{"description":"Removes the non-printable characters from the given text.","arguments":[{"name":"text","description":"The text string that you want to remove non-printable characters from."}],"variadic":0,"category":"text_and_data","example":"CLEAN(A2)"},"CODE":{"description":"Converts the first letter of the text into an ASCII value.","arguments":[{"name":"text","description":"Text to convert."}],"variadic":0,"category":"text_and_data","example":"CODE(A1)"},"CONCAT":{"description":"Joins the given values and texts into one string.","arguments":[{"name":"text1","description":"Text item to concatenate. Each item can be a string or an array of strings, such as a range of cells."},{"name":"text2","description":"Additional text item to concatenate. Each item can be a string or an array of strings.","required":false}],"variadic":1,"notes":["If an argument includes a range of cells, the cells will be joined together first. Then, the results of the different arguments will be joined together."],"min_version":"3.5","category":"text_and_data","example":"CONCAT(A1:D1)"},"CONCATENATE":{"description":"Returns the result by linking different texts into one.","arguments":[{"name":"text1","description":"Text to concatenate."},{"name":"text2","description":"Text to concatenate.","required":false}],"variadic":1,"category":"text_and_data","example":"CONCATENATE(A2,B2)"},"DAYS":{"description":"Calculates the number of days between two given dates.","arguments":[{"name":"end_date","description":"The last date to include in the calculation."},{"name":"start_date","description":"The first date to include in the calculation."}],"variadic":0,"category":"text_and_data","example":"DAYS(\\"2016/2/4\\", \\"2015/5/23\\")"},"DOLLAR":{"description":"Converts a number to text in currency and decimal format.","arguments":[{"name":"number","description":"Number to convert."},{"name":"decimals","description":"The number of decimal points to display. The default is 2.","required":false}],"variadic":0,"category":"text_and_data","example":"DOLLAR(A2,1)"},"EXACT":{"description":"Compares two different groups of text or string to check if two of them are exactly the same and return TRUE if they are and FALSE if they are not.","arguments":[{"name":"text1","description":"First group of text or string to compare."},{"name":"text2","description":"Second group of text or string to compare."}],"variadic":0,"category":"text_and_data","example":"EXACT(A2,B2)"},"FIND":{"description":"Returns the first position of a text string within another text string, case sensitive.","arguments":[{"name":"find_text","description":"The text that you want to find."},{"name":"within_text","description":"The text that contains find_text. It can be a cell reference."},{"name":"start_num","description":"The position in within_text at which the search should start. The first character in within_text is 1. If start_num is left blank, the FIND function will search from the first character in within_text.","required":false}],"variadic":0,"category":"text_and_data","example":"FIND(\\"N\\", A1)"},"FIXED":{"description":"Rounds a number to a specified decimal point.","arguments":[{"name":"number","description":"The number to round."},{"name":"decimals","description":"The number of demical points to apply.","required":false},{"name":"no_commas","description":"TRUE if no commas and FALSE if yes.","required":false}],"variadic":0,"category":"text_and_data","example":"FIXED(A1,1,TRUE)"},"ISOWEEKNUM":{"description":"Returns the ISO week number of a given date.","arguments":[{"name":"date","description":"The date that you want the ISO week number of."}],"variadic":0,"category":"text_and_data","example":"ISOWEEKNUM(\\"2016/3/14\\")"},"LEFT":{"description":"Returns the number of characters from the left of the given text or string.","arguments":[{"name":"text","description":"The text or string to extract from."},{"name":"num_chars","description":"The number of characters to extract.","required":false}],"variadic":0,"category":"text_and_data","example":"RIGHT(A1,3)"},"LEN":{"description":"Returns the number of characters in a text string, spaces included.","arguments":[{"name":"text","description":"The text whose length will be returned. It can be in the form of a text string or a cell reference."}],"variadic":0,"category":"text_and_data","example":"LEN(\\"DS716+\\")"},"LOWER":{"description":"Converts the text into lowercase.","arguments":[{"name":"text","description":"The text to convert."}],"variadic":0,"category":"text_and_data","example":"LOWER(A1)"},"MID":{"description":"Returns a specific substring from a string.","arguments":[{"name":"text","description":"The string to extract from."},{"name":"start_num","description":"The position to start extracting from."},{"name":"num_chars","description":"The number of text to extract."}],"variadic":0,"category":"text_and_data","example":"MID(A1,\\"3\\",\\"5\\")"},"PROPER":{"description":"Converts the first letter of the text to uppercase and the rest to lowercase.","arguments":[{"name":"text","description":"The text to capitalize."}],"variadic":0,"category":"text_and_data","example":"PROPER(A1)"},"REPLACE":{"description":"Replaces old text in a text string with new text.","arguments":[{"name":"old_text","description":"The string or text to replace."},{"name":"start_num","description":"The character to start with."},{"name":"num_chars","description":"The length of the string or text to replace."},{"name":"new_text","description":"The new string or text to replace the old one."}],"variadic":0,"category":"text_and_data","example":"REPLACE(A1,2,3,\\"abc\\")"},"REPT":{"description":"Repeats the specific content for the specified number of times.","arguments":[{"name":"text","description":"Text to repeat."},{"name":"number_times","description":"Number of times to repeat the text."}],"variadic":0,"category":"text_and_data","example":"REPT(A1,3)"},"RIGHT":{"description":"Returns the number of characters from the right of the given text or string.","arguments":[{"name":"text","description":"The text or string to extract from."},{"name":"num_chars","description":"The number of characters to extract.","required":false}],"variadic":0,"category":"text_and_data","example":"RIGHT(A1,4)"},"SEARCH":{"description":"Searches for the specific character or text and returns its position.","arguments":[{"name":"find_text","description":"The string or text to search."},{"name":"within_text","description":"The text to search for in find_text."},{"name":"start_num","description":"Optional. The number of characters to start searching for find_text in within_text.","required":false}],"variadic":0,"category":"text_and_data","example":"SEARCH(\\"n\\",\\"prince\\")"},"SUBSTITUTE":{"description":"Substitutes new text for old text in a text string.","arguments":[{"name":"text","description":"The original text string or the cell that contains the text to be replaced."},{"name":"old_text","description":"The old text to be replaced."},{"name":"new_text","description":"The new text that you want to use."},{"name":"instance_num","description":"Specifies which occurrence of the old text will be replaced. If left blank, all occurrences of the old text within the text argument will be replaced by the new text.","required":false}],"variadic":0,"category":"text_and_data","example":"SUBSTITUTE(A1, \\"1\\", \\"3\\", 2)"},"T":{"description":"Returns the supplied text if the supplied test value is text. Otherwise, the function returns an empty text string.","arguments":[{"name":"value","description":"The value you want to test."}],"variadic":0,"category":"text_and_data","example":"T(A2)"},"TEXT":{"description":"Converts value to text in a specified format.","arguments":[{"name":"value","description":"The value to convert."},{"name":"format_text","description":"The format to apply."}],"variadic":0,"category":"text_and_data","example":"TEXT(A2,\\"0.00\\")"},"TRIM":{"description":"Removes extra spaces from text and keeps one space between words.","arguments":[{"name":"text","description":"Text from which to remove spaces."}],"variadic":0,"category":"text_and_data","example":"TRIM(\\"Synology NAS \\")"},"UNICHAR":{"description":"Converts a number into a character based on ASCII encoding.","arguments":[{"name":"number","description":"The number to you want to convert into a character."}],"variadic":0,"category":"text_and_data","example":"UNICHAR(73)"},"UNICODE":{"description":"Converts the first letter of the text in the cell, based on ASCII encoding.","arguments":[{"name":"text","description":"The text to convert."}],"variadic":0,"category":"text_and_data","example":"UNICODE(A1)"},"UPPER":{"description":"Converts the text into UPPERCASE.","arguments":[{"name":"text","description":"The text to convert."}],"variadic":0,"category":"text_and_data","example":"UPPER(A1)"},"VALUE":{"description":"Converts text that contains currency, date, or other formats into a numeric value. Usually the spreadsheet converts text into numeric values automatically.","arguments":[{"name":"text","description":"The text to convert into a numeric value."}],"variadic":0,"category":"text_and_data","example":"VALUE(\\"5,000\\")"}}`,Gg=JSON.parse(da);Gg.IFERROR.arguments[1].required=!1;let qb={};function Ll(n,e){let t=Gg[n];if(!t)return!0;let r=qb[n]??=function(i,a,g){let R=a.length-g,L=a.filter(K=>K.required!==!1).length,W=g>0?1/0:a.length;return i==="ACCRINT"?W=8:i==="INDEX"&&(W=4),{least:L,most:W,repeatableCount:g,nonRepeatableCount:R}}(n,t.arguments,t.variadic);return e.length>=r.least&&e.length<=r.most&&(r.repeatableCount===0||e.slice(r.nonRepeatableCount).length%r.repeatableCount==0)}let Cf=function(n,e){for(var t=-1,r=e.length,i=n.length;++t<r;)n[i+t]=e[t];return n},_f=function(n){return ws(n)&&ru(n)=="[object Arguments]"};var Sh=Object.prototype,Yb=Sh.hasOwnProperty,Xa=Sh.propertyIsEnumerable,Sf=_f(function(){return arguments}())?_f:function(n){return ws(n)&&Yb.call(n,"callee")&&!Xa.call(n,"callee")},Kb=$s?$s.isConcatSpreadable:void 0;let LT=function(n){return Ka(n)||Sf(n)||!!(Kb&&n&&n[Kb])},dv=function n(e,t,r,i,a){var g=-1,R=e.length;for(r||(r=LT),a||(a=[]);++g<R;){var L=e[g];t>0&&r(L)?t>1?n(L,t-1,r,i,a):Cf(a,L):a[a.length]=L}return a};var fv=1/0;function xn(){var n;return n=lu(arguments),n!=null&&n.length?dv(n,fv):[]}function lu(n){let e;return n!=null&&(e=Array.prototype.slice.call(n,0)),(e===void 0||e.length===0)&&(e=[n]),e}function Hu(n){return+n.toPrecision(15)}function Ii(n){if((n=n??!1)===!0||n===!1||n instanceof Error)return n;if(typeof n=="number")return n!==0;if(typeof n=="string"){let e=n.toUpperCase();if(e==="TRUE")return!0;if(e==="FALSE")return!1}return Xe}function Xb(n){if(isNaN(n))return Xe;let e=parseFloat(n,10);return Number.isNaN(e)?Xe:e}function Fe(n){return typeof n=="number"?n:n&&typeof n=="string"?n[n.length-1]==="%"?(n=Xb(n.slice(0,n.length-1)))!==Xe?.01*n:Xe:Xb(n):Xe}function Ui(n){let e;if(!n||(e=n.length)===0)return Xe;for(let t=0;t<e;t++){let r=Fe(n[t]);if(mr(r))return r;n[t]=r}return n}function gv(n){let e=xn(n).map(Fe);return e.some(t=>typeof t!="number")?Xe:e.some(t=>t<0)?ot:(e.forEach((t,r)=>{e[r]=Math.floor(e[r])}),e)}function Hn(n){if(n===""||n===!1||n==null)return 0;if(n===!0)return 1;if(typeof n=="string"){let e=ei(this,n);if(!mr(e))return di(e)}return Fe(n)}function jn(n){let e=Hn.call(this,n);return mr(e)?e:Math.floor(e)}function ei(n,e){if(typeof e=="number")return za(e);if(typeof e=="string"){let t=n.getLocale().getDateParser().parse(e);return t?t.v:Xe}return Xe}function pv(n,e){for(let t=0,r=e.length;t<r;t++){let i=ei(n,e[t]);if(mr(i))return i;e[t]=i}return e}function mr(n){return n===Xe}function xt(){return Array.prototype.some.call(arguments,mr)}function If(n){let e=[];for(let t=0,r=n.length;t<r;t++){let i=n[t],a=0;if(typeof i=="number")a=i;else if(i===!0)a=1;else if(i===!1)a=0;else if(typeof i=="string"){let g=Fe(i);a=mr(g)?0:g}e[t]=a}return e}function Lr(n){return typeof n=="string"?n:ms(n)?n?"TRUE":"FALSE":typeof n=="number"&&isFinite(n)?Hu(n).toString():""}function dd(n){return ms(n)?Xe:Lr(n)}function ka(n){return Array.isArray(n)?Array.isArray(n[0])?n:[n]:[[n]]}function Jb(n){return!!n?.repeat}function jg(n){let e=Hn.call(this,n);return e===Xe?n:e}function Fl(n){return function e(t){return t==null?t:Array.isArray(t)?t.map(r=>e.call(this,r)):n.call(this,t)}}function Ra(n){return{repeat:!0,converter:n}}let Ih=[],yi=[null,Ra(null)],bc=[null,Ra(null)],fd=[null,null,Ra(null),Ra(null)],Zb=[Fl(dd),Ra(Fl(dd))],xf=[null,Ra(null)];function gd(n,e){return Array.from({length:e+1},(t,r)=>Array(r).fill(n))}let _n=gd(Hn,6),Ea=gd(jn,4),Ja=gd(Lr,2),Zn=gd(dd,2),xi=gd(null,2),wn={"num-int":[Hn,jn],"num-num-int":[Hn,Hn,jn],"num-int-int":[Hn,jn,jn],"num-int-int-bool":[Hn,jn,jn,Ii],"int-any":[jn,null],"int-int-num":[jn,jn,Hn],"int-num-num":[jn,Hn,Hn],"num-num-bool":[Hn,Hn,Ii],"num-num-num-bool":[Hn,Hn,Hn,Ii],"num-array-num":[Hn,null,Hn],"num-array-array":[Hn,null,null],"array-num":[null,Hn],"array-num-num":[null,null,Hn],"array-num-int":[null,Hn,jn],"array-int":[null,jn],"array-array-int-int":[null,null,jn,jn],"str-int":[Lr,jn],"str-str-int":[Lr,Lr,jn]},Zi=_n[1],Za=xi[2],$u=[null,jn],Qb=[Fl(jg),Fl(jg)],Us=[jn,jn,Hn,Ii],qg=wn["num-int"],Tf=wn["num-num-bool"],Yg=wn["num-num-bool"],mv=[jn,jn,null],vv=[jn,jn,null,null],Gs={ABS:_n[1],ADDRESS:[Hn,Hn,Hn,Ii,Lr],ACCRINT:[jn,jn,jn,Hn,Hn,Hn,Hn,null],ACOS:Zi,ACOSH:Zi,ACOT:Zi,ACOTH:Zi,AND:xf,ARABIC:Ja[1],ASIN:Zi,ASINH:Zi,ATAN:Zi,ATAN2:_n[2],ATANH:Zi,AVEDEV:yi,AVERAGE:yi,AVERAGEA:yi,AVERAGEIF:[null,null,null],AVERAGEIFS:[null,...fd],BASE:Ea[3],BESSELI:qg,BESSELJ:qg,BESSELK:qg,BESSELY:qg,"BETA.DIST":[Hn,Hn,Hn,Ii,Hn,Hn],"BETA.INV":_n[5],BETADIST:_n[5],BETAINV:_n[5],BIN2DEC:xi[1],BIN2HEX:$u,BIN2OCT:$u,"BINOM.DIST":Us,"BINOM.INV":wn["int-num-num"],BINOMDIST:Us,BITAND:_n[2],BITLSHIFT:wn["num-int"],BITOR:_n[2],BITRSHIFT:wn["num-int"],BITXOR:_n[2],CEILING:_n[2],"CEILING.MATH":_n[3],"CEILING.PRECISE":_n[2],CHAR:Ea[1],CHIDIST:wn["num-int"],CHIINV:wn["num-int"],"CHISQ.DIST":[Hn,jn,Ii],"CHISQ.DIST.RT":wn["num-int"],"CHISQ.INV":wn["num-int"],"CHISQ.INV.RT":wn["num-int"],"CHISQ.TEST":Qb,CHITEST:Qb,CHOOSE:[jn,null,Ra(null)],CLEAN:Ja[1],CODE:Ja[1],COLUMN:xi[1],COLUMNS:xi[1],COMBIN:Ea[2],COMBINA:Ea[2],COMPLEX:[Hn,Hn,null],CONCAT:[Fl(Lr),Ra(Fl(Lr))],CONCATENATE:[Lr,Ra(Lr)],CONFIDENCE:wn["num-num-int"],"CONFIDENCE.NORM":wn["num-num-int"],"CONFIDENCE.T":wn["num-num-int"],CORREL:Za,COS:Zi,COSH:Zi,COT:Zi,COTH:Zi,COUNT:bc,COUNTA:bc,COUNTBLANK:xi[1],COUNTIF:xi[2],COUNTIFS:fd,COVAR:Za,"COVARIANCE.P":Za,"COVARIANCE.S":Za,CRITBINOM:wn["int-num-num"],CSC:Zi,CSCH:Zi,CUMIPMT:_n[6],CUMPRINC:_n[6],DATE:Ea[3],DATEDIF:[jn,jn,Lr],DATEVALUE:xi[1],DAY:Ea[1],DAYS:Ea[2],DAYS360:[jn,jn,Ii],DB:[Hn,Hn,Hn,Hn,jn],DDB:_n[5],DEC2BIN:$u,DEC2HEX:$u,DEC2OCT:$u,DECIMAL:wn["str-int"],DEGREES:_n[1],DELTA:_n[2],DEVSQ:yi,DOLLAR:wn["num-int"],DOLLARDE:wn["num-int"],DOLLARFR:wn["num-int"],EDATE:wn["num-int"],EFFECT:wn["num-int"],EOMONTH:wn["num-int"],ERF:_n[2],"ERF.PRECISE":_n[1],ERFC:_n[1],"ERFC.PRECISE":_n[1],"ERROR.TYPE":xi[1],EVEN:_n[1],EXACT:Ja[2],EXP:_n[1],"EXPON.DIST":Tf,EXPONDIST:Tf,FALSE:Ih,"F.DIST":wn["num-int-int-bool"],"F.DIST.RT":wn["num-int-int"],"F.INV":wn["num-int-int"],"F.INV.RT":wn["num-int-int"],"F.TEST":Za,FACT:Ea[1],FACTDOUBLE:Ea[1],FDIST:wn["num-int-int-bool"],FILTER:[null,null,null],FIND:wn["str-str-int"],FINV:wn["num-int-int"],FISHER:_n[1],FISHERINV:_n[1],FIXED:wn["num-num-bool"],FLOOR:_n[2],"FLOOR.MATH":_n[3],"FLOOR.PRECISE":_n[2],FORECAST:wn["num-array-array"],FTEST:Za,FV:_n[5],FVSCHEDULE:[Hn,null],GAMMA:_n[1],"GAMMA.DIST":wn["num-num-num-bool"],"GAMMA.INV":_n[3],GAMMADIST:wn["num-num-num-bool"],GAMMAINV:_n[3],GAMMALN:_n[1],"GAMMALN.PRECISE":_n[1],GAUSS:_n[1],GCD:yi,GEOMEAN:yi,GESTEP:_n[2],HARMEAN:yi,HEX2BIN:$u,HEX2DEC:xi[1],HEX2OCT:$u,HLOOKUP:[null,null,jn,Ii],HOUR:_n[1],"HYPGEOM.DIST":[jn,jn,jn,jn,Ii],HYPGEOMDIST:Ea[4],IF:[Ii,null,null],IFERROR:xi[2],IFNA:xi[2],IFS:[Ii,null,Ra(Ii),Ra(null)],IMABS:Zn[1],IMAGINARY:Zn[1],IMARGUMENT:Zn[1],IMCONJUGATE:Zn[1],IMCOS:Zn[1],IMCOSH:Zn[1],IMCOT:Zn[1],IMCSC:Zn[1],IMCSCH:Zn[1],IMDIV:Zn[2],IMEXP:Zn[1],IMLN:Zn[1],IMLOG10:Zn[1],IMLOG2:Zn[1],IMPOWER:[dd,Hn],IMPRODUCT:Zb,IMREAL:Zn[1],IMSEC:Zn[1],IMSECH:Zn[1],IMSIN:Zn[1],IMSINH:Zn[1],IMSQRT:Zn[1],IMSUB:Zn[2],IMSUM:Zb,IMTAN:Zn[1],INDEX:[null,jn,jn,jn],INDIRECT:[Lr,Ii],INT:_n[1],INTERCEPT:Za,IPMT:_n[6],IRR:wn["array-num"],ISBLANK:xi[1],ISDATE:xi[1],ISERR:xi[1],ISERROR:xi[1],ISEVEN:xi[1],ISLOGICAL:xi[1],ISNA:xi[1],ISODD:xi[1],ISNONTEXT:xi[1],ISNUMBER:xi[1],"ISO.CEILING":_n[2],ISOWEEKNUM:Ea[1],ISPMT:_n[4],ISTEXT:xi[1],KURT:yi,LARGE:wn["array-int"],LCM:yi,LEFT:wn["str-int"],LEN:Ja[1],LN:_n[1],LOG:_n[2],LOG10:_n[1],LOGINV:_n[3],"LOGNORM.DIST":wn["num-num-num-bool"],"LOGNORM.INV":_n[3],LOGNORMDIST:_n[3],LOWER:Ja[1],MATCH:[null,null,Hn],MAX:yi,MAXA:yi,MAXIFS:[null,...fd],MEDIAN:yi,MID:[Lr,jn,jn],MIN:yi,MINA:yi,MINIFS:[null,...fd],MINUTE:_n[1],MIRR:wn["array-num-num"],MOD:_n[2],MODE:yi,"MODE.SNGL":yi,MONTH:_n[1],MROUND:_n[2],MULTINOMIAL:bc,N:xi[1],NA:Ih,"NEGBINOM.DIST":[jn,jn,Hn,Ii],NEGBINOMDIST:wn["int-int-num"],NETWORKDAYS:mv,"NETWORKDAYS.INTL":vv,NOMINAL:wn["num-int"],"NORM.DIST":wn["num-num-num-bool"],"NORM.INV":_n[3],"NORM.S.DIST":[Hn,Ii],"NORM.S.INV":_n[1],NORMDIST:wn["num-num-num-bool"],NORMINV:_n[3],NORMSDIST:_n[1],NORMSINV:_n[1],NOT:[Ii],NOW:Ih,NPER:_n[5],NPV:[Hn,null,Ra(null)],OCT2BIN:$u,OCT2DEC:xi[1],OCT2HEX:$u,ODD:_n[1],OFFSET:[null,jn,jn,jn,jn],OR:xf,PDURATION:_n[3],PEARSON:Za,PERCENTILE:wn["array-num"],"PERCENTILE.EXC":wn["array-num"],"PERCENTILE.INC":wn["array-num"],PERCENTRANK:wn["array-num-int"],"PERCENTRANK.EXC":wn["array-num-int"],"PERCENTRANK.INC":wn["array-num-int"],PERMUT:Ea[2],PERMUTATIONA:Ea[2],PHI:_n[1],PI:Ih,PMT:_n[5],POISSON:Yg,"POISSON.DIST":Yg,POWER:_n[2],PPMT:_n[5],PROB:[null,null,Hn,Hn],PRODUCT:bc,PROPER:Ja[1],PV:_n[5],QUARTILE:wn["array-int"],"QUARTILE.EXC":wn["array-int"],"QUARTILE.INC":wn["array-int"],QUOTIENT:_n[2],RADIANS:_n[1],RAND:Ih,RANDARRAY:[jn,jn,Hn,Hn,Ii],RANDBETWEEN:_n[2],RANK:wn["num-array-num"],"RANK.AVG":wn["num-array-num"],"RANK.EQ":wn["num-array-num"],RATE:[jn,Hn,Hn,Hn,Hn,Hn],REPLACE:[Lr,jn,jn,Lr],REPT:wn["str-int"],RIGHT:wn["str-int"],ROMAN:[Hn,null],ROUND:wn["num-int"],ROUNDDOWN:wn["num-int"],ROUNDUP:wn["num-int"],ROW:xi[1],ROWS:xi[1],RRI:_n[3],RSQ:Za,SEARCH:wn["str-str-int"],SEC:Zi,SECH:Zi,SECOND:_n[1],SERIESSUM:[Hn,Hn,Hn,Fl(Hn)],SEQUENCE:[jn,jn,Hn,Hn],SIGN:_n[1],SIN:Zi,SINH:Zi,SKEW:yi,"SKEW.P":yi,SLN:_n[3],SLOPE:Za,SMALL:wn["array-int"],SORT:[null,jn,jn,Ii],SORTBY:[null,null,jn,Ra(null),Ra(jn)],SQRT:_n[1],SQRTPI:_n[1],STANDARDIZE:_n[3],STDEV:yi,"STDEV.P":yi,"STDEV.S":yi,STDEVA:yi,STDEVP:yi,STDEVPA:yi,STEYX:Za,SUBSTITUTE:[Lr,Lr,Lr,jn],SUBTOTAL:[null,null,Ra(null)],SUM:bc,SUMIF:[null,Lr,null],SUMIFS:[null,...fd],SUMPRODUCT:bc,SUMSQ:bc,SUMX2MY2:Za,SUMX2PY2:Za,SUMXMY2:Za,SYD:_n[4],T:xi[1],"T.DIST":[Hn,jn,Ii],"T.DIST.2T":wn["num-int"],"T.DIST.RT":wn["num-int"],"T.INV":wn["num-int"],"T.INV.2T":wn["num-int"],"T.TEST":wn["array-array-int-int"],TAN:Zi,TANH:Zi,TBILLEQ:wn["int-int-num"],TBILLPRICE:wn["int-int-num"],TBILLYIELD:wn["int-int-num"],TDIST:wn["num-int-int"],TEXT:[null,Lr],TIME:Ea[3],TIMEVALUE:xi[1],TINV:wn["num-int"],TODAY:Ih,TRANSPOSE:xi[1],TRIM:Ja[1],TRIMMEAN:[Fl(jg),Hn],TRUE:Ih,TRUNC:wn["num-int"],TTEST:wn["array-array-int-int"],TYPE:xi[1],UNICHAR:Ea[1],UNICODE:Ja[1],UNIQUE:[null,Ii,Ii],UPPER:Ja[1],VALUE:Ja[1],VAR:yi,"VAR.P":yi,"VAR.S":yi,VARA:yi,VARP:yi,VARPA:yi,VLOOKUP:[null,null,jn,Ii],WEEKDAY:wn["int-any"],WEEKNUM:wn["int-any"],WEIBULL:wn["num-num-num-bool"],"WEIBULL.DIST":wn["num-num-num-bool"],WORKDAY:mv,"WORKDAY.INTL":vv,XIRR:[null,null,Hn],XLOOKUP:[null,null,null,null,jn,jn],XNPV:wn["num-array-array"],XOR:xf,YEAR:_n[1],YEARFRAC:Ea[3],"Z.TEST":wn["array-num-num"],ZTEST:wn["array-num-num"],HYPERLINK:Ja[2],IMPORTRANGE:Ja[2],FLATTEN:[null,Ra(null)]};function xh(n,e){let t=Gs[n];if(t==null)return e;let r=t.filter(Jb).map(a=>a.converter),i=t.length-r.length;return e.forEach((a,g)=>{let R=null;(R=g>=i?r[(g-i)%r.length]:t[g])!==null&&e[g]!==void 0&&(e[g]=R.call(this,e[g]))}),e}function Cc(n){if(!Array.isArray(n))return Pi(n)?n:void 0;for(let e=0,t=n.length;e<t;e++){let r=Cc(n[e]);if(r)return r}}let kf=n=>{for(let e of n){let t=Cc(e);if(t)return t}},ti=()=>{},yv=n=>{if(Pi(n[0]))return n[0]},wv=[kf];function Rf(n){return wv[n]??=e=>kf(e.slice(n))}let bv={ROWS:ti,COLUMNS:ti,OFFSET:n=>{if(n.length===0)return;let e=n[0]?.isError()?n[0].v:Cc(n.slice(1));if(e)return e},CHOOSE:yv,SUBTOTAL:n=>{let e;if(Pi(n[0]))return n[0];switch(n[0]%100){case 2:case 3:e=ti(n.slice(1));break;default:e=kf(n.slice(1))}return e},SUMIF:ti,AVERAGEIF:ti,SUMIFS:ti,AVERAGEIFS:ti,MAXIFS:ti,MINIFS:ti,IF:yv,IFS:ti,COUNT:ti,COUNTA:ti,COUNTIF:ti,COUNTIFS:ti,ISBLANK:ti,ISNA:ti,ISERR:ti,ISERROR:ti,ISLOGICAL:ti,ISNONTEXT:ti,ISNUMBER:ti,ISTEXT:ti,IFERROR:ti,IFNA:ti,TYPE:ti,MATCH:ti,VLOOKUP:ti,HLOOKUP:ti,XLOOKUP:Rf(4),ISDATE:ti,INDEX:Rf(1),"ERROR.TYPE":ti,FILTER:n=>Cc(n[1]),SORT:Rf(1),SORTBY:n=>{for(let e=2;e<n.length;e+=2){let t=Cc(n[e]);if(t)return t}},TRANSPOSE:ti,UNIQUE:Rf(1),FLATTEN:ti};var Cv=B(35085),xs=B.n(Cv);xs().gammafn=function(n){let e,t,r,i,a=[-1.716185138865495,24.76565080557592,-379.80425647094563,629.3311553128184,866.9662027904133,-31451.272968848367,-36144.413418691176,66456.14382024054],g=[-30.8402300119739,315.35062697960416,-1015.1563674902192,-3107.771671572311,22538.11842098015,4755.846277527881,-134659.9598649693,-115132.2596755535],R=!1,L=0,W=1,K=0,Q=n;if(Q<=0){if(!(i=Q%1+36e-17))return 1/0;R=(1&Q?-1:1)*Math.PI/Math.sin(Math.PI*i),Q=1-Q}for(e=0,r=Q,t=Q<1?Q++:(Q-=L=(0|Q)-1)-1;e<8;++e)K=(K+a[e])*t,W=W*t+g[e];if(i=K/W+1,r<Q)i/=r;else if(r>Q)for(e=0;e<L;++e)i*=Q,Q++;return R&&(i=R/i),i},xs().lowRegGamma=function(n,e){let t,r=xs().gammaln(n),i=n,a=1/n,g=a,R=e+1-n,L=1/1e-30,W=1/R,K=W,Q=1,oe=-~(8.5*Math.log(n>=1?n:1/n)+.4*n+18);if(e<0||n<=0)return NaN;if(e<n+1){for(;Q<=oe;Q++)a+=g*=e/++i;return a*Math.exp(-e+n*Math.log(e)-r)}for(;Q<=oe;Q++)R+=2,K*=(W=1/(W=(t=-Q*(Q-n))*W+R))*(L=R+t/L);return 1-K*Math.exp(-e+n*Math.log(e)-r)},xs().betacf=function(n,e,t){let r,i,a,g,R=1,L=e+t,W=e+1,K=e-1,Q=1,oe=1-L*n/W;for(1e-30>Math.abs(oe)&&(oe=1e-30),g=oe=1/oe;R<=100&&(r=2*R,1e-30>Math.abs(oe=1+(i=R*(t-R)*n/((K+r)*(e+r)))*oe)&&(oe=1e-30),1e-30>Math.abs(Q=1+i/Q)&&(Q=1e-30),g*=(oe=1/oe)*Q,1e-30>Math.abs(oe=1+(i=-(e+R)*(L+R)*n/((e+r)*(W+r)))*oe)&&(oe=1e-30),1e-30>Math.abs(Q=1+i/Q)&&(Q=1e-30),g*=a=(oe=1/oe)*Q,!(1e-10>Math.abs(a-1)));R++);return g},xs().poisson.pdf=function(n,e){return e<0||n%1!=0||n<0?0:Math.exp(Math.log(e)*n-e-xs().factorialln(n))};let $n=xs();function zu(n){return(n=Fe(n))instanceof Error?n:n<=0?Xe:String.fromCharCode(n)}function e0(n){return(n=n||"").replace(/[\0-\x1F]/g,"")}function _v(n){return(n=n||"").charCodeAt(0)}function Sv(){return t0(...arguments)}function t0(){let n=xn(arguments),e=0;for(;(e=n.indexOf(!0))>-1;)n[e]="TRUE";let t=0;for(;(t=n.indexOf(!1))>-1;)n[t]="FALSE";return n.join("")}function FT(n,e){if(xt(n=Fe(n),e=e===void 0?2:Fe(e)))return Xe;let t=this.getLocale(),r=n<0?-1:1,i="[$"+(t.getData().CURRENCY_SYM||"$")+"]0";return e<=0?n=Math.round(n/r*Math.pow(10,e))/Math.pow(10,e):i=i+"."+Array(e+1).join("0"),t.getSSF().render(i+";("+i+")",n)}function VT(n,e){return(n=Lr(n))===(e=Lr(e))}function n0(n,e,t){if(arguments.length<2||arguments.length>3)return It;if(n=Lr(n),e=Lr(e),(t=t===void 0?0:t-1)<0||e.length<t)return Xe;let r=e.indexOf(n,t);return r<0?Xe:r+1}function r0(n,e,t){if(n=Fe(n),e=e===void 0?2:Fe(e),t=t!==void 0&&t,xt(n,e))return Xe;let r=n<0?-1:1,i=t?"0":"#,##0";return e<=0?n=Math.round(n/r*Math.pow(10,e))/Math.pow(10,e):i=i+"."+Array(e+1).join("0"),this.getLocale().getSSF().render(i,n)}function HT(n){let e="";return n&&(n instanceof Array?n.forEach(function(t){e!==""&&(e+=`
`),e+=t.replace(/<(?:.|\n)*?>/gm,"")}):e=n.replace(/<(?:.|\n)*?>/gm,"")),e}function i0(n,e){return(e=Fe(e=e===void 0?1:e))instanceof Error||(n=Lr(n),e<0)?Xe:n?n.substring(0,e):null}function o0(n){return arguments.length==0?It:Lr(n).length}function Ts(n){return arguments.length!=1?It:Lr(n).toLowerCase()}function uu(n,e,t){return xt(e=Fe(e),t=Fe(t))?ot:e<1||t<0?Xe:(n=Lr(n)).substr(e-1,t)}function $T(n){return n===void 0||n.length===0||(n===!0&&(n="TRUE"),n===!1&&(n="FALSE"),isNaN(n)&&typeof n=="number")?Xe:(typeof n=="number"&&(n=""+n),n.replace(/[a-zA-Z]\S*/g,function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()}))}function zT(n,e){let t=n.match(new RegExp(e));return t?t[t.length>1?t.length-1:0]:null}function Kg(n,e,t){let r=n.match(new RegExp(e));return t?r:!!r}function pd(n,e,t){return n.replace(new RegExp(e),t)}function a0(n,e,t,r){return e=Fe(e),t=Fe(t),n=Lr(n),xt(e,t)||typeof n!="string"||typeof r!="string"?Xe:n.substr(0,e-1)+r+n.substr(e-1+t)}function ks(n,e){return(e=Fe(e))instanceof Error?e:(e=Math.floor(e))<0?Xe:Array(e+1).join(n)}function WT(n,e){return(e=Fe(e=e===void 0?1:e))instanceof Error?e:(n=Lr(n))?n.substring(n.length-e):null}function s0(n,e,t){let r;return n=Lr(n),e=Lr(e),t=t===void 0?0:t,(r=e.toLowerCase().indexOf(n.toLowerCase(),t-1)+1)===0?Xe:r}function md(n,e){return n.split(e)}function Ef(n,e,t,r){if(arguments.length<3)return It;if(r<=0)return Xe;if(n=Lr(n),e=Lr(e),t=Lr(t),!n||!e)return n;if(r===void 0){let i=e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&");return n.replace(RegExp(i,"g"),t)}{r===0&&(r=1);let i=0,a=0;for(;(i=n.indexOf(e,i))>-1;){if(++a===r)return n.substring(0,i)+t+n.substring(i+e.length);i+=e.length}return n}}function l0(n){return typeof n=="string"?n:""}function u0(n,e){if(typeof n=="string"){let t=Fe(n);if(mr(t)){let r=ei(this,n);mr(r)||(n=di(r))}else n=t}return e=Lr(e),this.getLocale().getSSF().format(e,n).v}function h0(n){return(n=Lr(n)).replace(/ +/g," ").trim()}let Xg=zu,c0=_v;function Jg(n){return arguments.length!=1?It:Lr(n).toUpperCase()}function Iv(n){let e,t=this.getLocale().getInputParser();try{e=t.parse(n)?.v??n}catch{e=Xe}return typeof e!="number"?Xe:e}var Zg=B(7287),Qg=B.n(Zg);function ep(n){return/^[01]{1,10}$/.test(n)}function tp(n,e){return n=Fe(n),e=Fe(e),rr(n)&&rr(e)?0>e?ot:Hu(Qg().besseli(n,e)):Xe}function d0(n,e){return n=Fe(n),e=Fe(e),rr(n)&&rr(e)?0>e?ot:Hu(Qg().besselj(n,e)):Xe}function xv(n,e){return n=Fe(n),e=Fe(e),rr(n)&&rr(e)?0>e?ot:Hu(Qg().besselk(n,e)):Xe}function UT(n,e){return n=Fe(n),e=Fe(e),rr(n)&&rr(e)?0>e?ot:Hu(Qg().bessely(n,e)):Xe}function f0(n){if(!ep(n))return ot;let e=parseInt(n,2),t=n.toString();return t.length===10&&t.substring(0,1)==="1"?parseInt(t.substring(1),2)-512:e}function Wu(n,e){if(!ep(n))return ot;rr(n)&&(n=n.toString());let t=n.toString();if(t.length===10&&t.substring(0,1)==="1")return(0xfffffffe00+parseInt(t.substring(1),2)).toString(16).toUpperCase();let r=parseInt(n,2).toString(16).toUpperCase();return e===void 0?r:isNaN(e)?Xe:e<0?ot:(e=Math.floor(e))>=r.length?ks("0",e-r.length)+r:ot}function g0(n,e){if(!ep(n))return ot;rr(n)&&(n=n.toString());let t=n.toString();if(t.length===10&&t.substring(0,1)==="1")return(1073741312+parseInt(t.substring(1),2)).toString(8);let r=parseInt(n,2).toString(8);return e===void 0?r:isNaN(e)?Xe:e<0?ot:(e=Math.floor(e))>=r.length?ks("0",e-r.length)+r:ot}function p0(n,e){return xt(n=Fe(n),e=Fe(e))?Xe:n<0||e<0||Math.floor(n)!==n||Math.floor(e)!==e||n>0xffffffffffff||e>0xffffffffffff?ot:n&e}function GT(n,e){return xt(n=Fe(n),e=Fe(e))?Xe:n<0||Math.floor(n)!==n||n>0xffffffffffff||Math.abs(e)>53?ot:e>=0?n<<e:n>>-e}function m0(n,e){return xt(n=Fe(n),e=Fe(e))?Xe:n<0||e<0||Math.floor(n)!==n||Math.floor(e)!==e||n>0xffffffffffff||e>0xffffffffffff?ot:n|e}function jT(n,e){return xt(n=Fe(n),e=Fe(e))?Xe:n<0||Math.floor(n)!==n||n>0xffffffffffff||Math.abs(e)>53?ot:e>=0?n>>e:n<<-e}function qT(n,e){return xt(n=Fe(n),e=Fe(e))?Xe:n<0||e<0||Math.floor(n)!==n||Math.floor(e)!==e||n>0xffffffffffff||e>0xffffffffffff?ot:n^e}function Di(n,e,t){if(xt(n=Fe(n),e=Fe(e)))return n;if((t=t===void 0?"i":t)!=="i"&&t!=="j")return Xe;function r(i){return Hu(i).toString()}if(n===0&&e===0)return 0;{if(n===0)return e===1?t:r(e)+t;if(e===0)return r(n);let i=e>0?"+":"";return r(n)+i+(e===1?t:r(e)+t)}}function Tv(n,e,t){let r;if((n=Fe(n))instanceof Error)return n;let i=[["a.u. of action","?",null,"action",!1,!1,105457168181818e-48],["a.u. of charge","e",null,"electric_charge",!1,!1,160217653141414e-33],["a.u. of energy","Eh",null,"energy",!1,!1,435974417757576e-32],["a.u. of length","a?",null,"length",!1,!1,529177210818182e-25],["a.u. of mass","m?",null,"mass",!1,!1,910938261616162e-45],["a.u. of time","?/Eh",null,"time",!1,!1,241888432650516e-31],["admiralty knot","admkn",null,"speed",!1,!0,.514773333],["ampere","A",null,"electric_current",!0,!1,1],["ampere per meter","A/m",null,"magnetic_field_intensity",!0,!1,1],["ångström","Å",["ang"],"length",!1,!0,1e-10],["are","ar",null,"area",!1,!0,100],["astronomical unit","ua",null,"length",!1,!1,149597870691667e-25],["bar","bar",null,"pressure",!1,!1,1e5],["barn","b",null,"area",!1,!1,1e-28],["becquerel","Bq",null,"radioactivity",!0,!1,1],["bit","bit",["b"],"information",!1,!0,1],["btu","BTU",["btu"],"energy",!1,!0,1055.05585262],["byte","byte",null,"information",!1,!0,8],["candela","cd",null,"luminous_intensity",!0,!1,1],["candela per square metre","cd/m?",null,"luminance",!0,!1,1],["coulomb","C",null,"electric_charge",!0,!1,1],["cubic ångström","ang3",["ang^3"],"volume",!1,!0,1e-30],["cubic foot","ft3",["ft^3"],"volume",!1,!0,.028316846592],["cubic inch","in3",["in^3"],"volume",!1,!0,16387064e-12],["cubic light-year","ly3",["ly^3"],"volume",!1,!0,846786664623715e-61],["cubic metre","m?",null,"volume",!0,!0,1],["cubic mile","mi3",["mi^3"],"volume",!1,!0,416818182544058e-5],["cubic nautical mile","Nmi3",["Nmi^3"],"volume",!1,!0,6352182208],["cubic Pica","Pica3",["Picapt3","Pica^3","Picapt^3"],"volume",!1,!0,758660370370369e-22],["cubic yard","yd3",["yd^3"],"volume",!1,!0,.764554857984],["cup","cup",null,"volume",!1,!0,.0002365882365],["dalton","Da",["u"],"mass",!1,!1,166053886282828e-41],["day","d",["day"],"time",!1,!0,86400],["degree","°",null,"angle",!1,!1,.0174532925199433],["degrees Rankine","Rank",null,"temperature",!1,!0,.555555555555556],["dyne","dyn",["dy"],"force",!1,!0,1e-5],["electronvolt","eV",["ev"],"energy",!1,!0,1.60217656514141],["ell","ell",null,"length",!1,!0,1.143],["erg","erg",["e"],"energy",!1,!0,1e-7],["farad","F",null,"electric_capacitance",!0,!1,1],["fluid ounce","oz",null,"volume",!1,!0,295735295625e-16],["foot","ft",null,"length",!1,!0,.3048],["foot-pound","flb",null,"energy",!1,!0,1.3558179483314],["gal","Gal",null,"acceleration",!1,!1,.01],["gallon","gal",null,"volume",!1,!0,.003785411784],["gauss","G",["ga"],"magnetic_flux_density",!1,!0,1],["grain","grain",null,"mass",!1,!0,647989e-10],["gram","g",null,"mass",!1,!0,.001],["gray","Gy",null,"absorbed_dose",!0,!1,1],["gross registered ton","GRT",["regton"],"volume",!1,!0,2.8316846592],["hectare","ha",null,"area",!1,!0,1e4],["henry","H",null,"inductance",!0,!1,1],["hertz","Hz",null,"frequency",!0,!1,1],["horsepower","HP",["h"],"power",!1,!0,745.69987158227],["horsepower-hour","HPh",["hh","hph"],"energy",!1,!0,2684519538e-3],["hour","h",["hr"],"time",!1,!0,3600],["imperial gallon (U.K.)","uk_gal",null,"volume",!1,!0,.00454609],["imperial hundredweight","lcwt",["uk_cwt","hweight"],"mass",!1,!0,50.802345],["imperial quart (U.K)","uk_qt",null,"volume",!1,!0,.0011365225],["imperial ton","brton",["uk_ton","LTON"],"mass",!1,!0,1016.046909],["inch","in",null,"length",!1,!0,.0254],["international acre","uk_acre",null,"area",!1,!0,4046.8564224],["IT calorie","cal",null,"energy",!1,!0,4.1868],["joule","J",null,"energy",!0,!0,1],["katal","kat",null,"catalytic_activity",!0,!1,1],["kelvin","K",["kel"],"temperature",!0,!0,1],["kilogram","kg",null,"mass",!0,!0,1],["knot","kn",null,"speed",!1,!0,.514444444444444],["light-year","ly",null,"length",!1,!0,9460730472580800],["litre","L",["l","lt"],"volume",!1,!0,.001],["lumen","lm",null,"luminous_flux",!0,!1,1],["lux","lx",null,"illuminance",!0,!1,1],["maxwell","Mx",null,"magnetic_flux",!1,!1,1e-18],["measurement ton","MTON",null,"volume",!1,!0,1.13267386368],["meter per hour","m/h",["m/hr"],"speed",!1,!0,.00027777777777778],["meter per second","m/s",["m/sec"],"speed",!0,!0,1],["meter per second squared","m?s??",null,"acceleration",!0,!1,1],["parsec","pc",["parsec"],"length",!1,!0,0x6da012f958ee1c],["meter squared per second","m?/s",null,"kinematic_viscosity",!0,!1,1],["metre","m",null,"length",!0,!0,1],["miles per hour","mph",null,"speed",!1,!0,.44704],["millimetre of mercury","mmHg",null,"pressure",!1,!1,133.322],["minute","?",null,"angle",!1,!1,.000290888208665722],["minute","min",["mn"],"time",!1,!0,60],["modern teaspoon","tspm",null,"volume",!1,!0,5e-6],["mole","mol",null,"amount_of_substance",!0,!1,1],["morgen","Morgen",null,"area",!1,!0,2500],["n.u. of action","?",null,"action",!1,!1,105457168181818e-48],["n.u. of mass","m?",null,"mass",!1,!1,910938261616162e-45],["n.u. of speed","c?",null,"speed",!1,!1,299792458],["n.u. of time","?/(me?c??)",null,"time",!1,!1,128808866778687e-35],["nautical mile","M",["Nmi"],"length",!1,!0,1852],["newton","N",null,"force",!0,!0,1],["œrsted","Oe ",null,"magnetic_field_intensity",!1,!1,79.5774715459477],["ohm","Ω",null,"electric_resistance",!0,!1,1],["ounce mass","ozm",null,"mass",!1,!0,.028349523125],["pascal","Pa",null,"pressure",!0,!1,1],["pascal second","Pa?s",null,"dynamic_viscosity",!0,!1,1],["pferdestärke","PS",null,"power",!1,!0,735.49875],["phot","ph",null,"illuminance",!1,!1,1e-4],["pica (1/6 inch)","pica",null,"length",!1,!0,.00035277777777778],["pica (1/72 inch)","Pica",["Picapt"],"length",!1,!0,.00423333333333333],["poise","P",null,"dynamic_viscosity",!1,!1,.1],["pond","pond",null,"force",!1,!0,.00980665],["pound force","lbf",null,"force",!1,!0,4.4482216152605],["pound mass","lbm",null,"mass",!1,!0,.45359237],["quart","qt",null,"volume",!1,!0,.000946352946],["radian","rad",null,"angle",!0,!1,1],["second","?",null,"angle",!1,!1,484813681109536e-20],["second","s",["sec"],"time",!0,!0,1],["short hundredweight","cwt",["shweight"],"mass",!1,!0,45.359237],["siemens","S",null,"electrical_conductance",!0,!1,1],["sievert","Sv",null,"equivalent_dose",!0,!1,1],["slug","sg",null,"mass",!1,!0,14.59390294],["square ångström","ang2",["ang^2"],"area",!1,!0,1e-20],["square foot","ft2",["ft^2"],"area",!1,!0,.09290304],["square inch","in2",["in^2"],"area",!1,!0,64516e-8],["square light-year","ly2",["ly^2"],"area",!1,!0,895054210748189e17],["square meter","m?",null,"area",!0,!0,1],["square mile","mi2",["mi^2"],"area",!1,!0,2589988110336e-6],["square nautical mile","Nmi2",["Nmi^2"],"area",!1,!0,3429904],["square Pica","Pica2",["Picapt2","Pica^2","Picapt^2"],"area",!1,!0,1792111111111e-17],["square yard","yd2",["yd^2"],"area",!1,!0,.83612736],["statute mile","mi",null,"length",!1,!0,1609.344],["steradian","sr",null,"solid_angle",!0,!1,1],["stilb","sb",null,"luminance",!1,!1,1e-4],["stokes","St",null,"kinematic_viscosity",!1,!1,1e-4],["stone","stone",null,"mass",!1,!0,6.35029318],["tablespoon","tbs",null,"volume",!1,!0,147868e-10],["teaspoon","tsp",null,"volume",!1,!0,492892e-11],["tesla","T",null,"magnetic_flux_density",!0,!0,1],["thermodynamic calorie","c",null,"energy",!1,!0,4.184],["ton","ton",null,"mass",!1,!0,907.18474],["tonne","t",null,"mass",!1,!1,1e3],["U.K. pint","uk_pt",null,"volume",!1,!0,.00056826125],["U.S. bushel","bushel",null,"volume",!1,!0,.03523907],["U.S. oil barrel","barrel",null,"volume",!1,!0,.158987295],["U.S. pint","pt",["us_pt"],"volume",!1,!0,.000473176473],["U.S. survey mile","survey_mi",null,"length",!1,!0,1609.347219],["U.S. survey/statute acre","us_acre",null,"area",!1,!0,4046.87261],["volt","V",null,"voltage",!0,!1,1],["watt","W",null,"power",!0,!0,1],["watt-hour","Wh",["wh"],"energy",!1,!0,3600],["weber","Wb",null,"magnetic_flux",!0,!1,1],["yard","yd",null,"length",!1,!0,.9144],["year","yr",null,"time",!1,!0,31557600]],a={Yi:["yobi",80,12089258196146292e8,"Yi","yotta"],Zi:["zebi",70,11805916207174113e5,"Zi","zetta"],Ei:["exbi",60,1152921504606847e3,"Ei","exa"],Pi:["pebi",50,0x4000000000000,"Pi","peta"],Ti:["tebi",40,1099511627776,"Ti","tera"],Gi:["gibi",30,1073741824,"Gi","giga"],Mi:["mebi",20,1048576,"Mi","mega"],ki:["kibi",10,1024,"ki","kilo"]},g={Y:["yotta",1e24,"Y"],Z:["zetta",1e21,"Z"],E:["exa",1e18,"E"],P:["peta",1e15,"P"],T:["tera",1e12,"T"],G:["giga",1e9,"G"],M:["mega",1e6,"M"],k:["kilo",1e3,"k"],h:["hecto",100,"h"],e:["dekao",10,"e"],d:["deci",.1,"d"],c:["centi",.01,"c"],m:["milli",.001,"m"],u:["micro",1e-6,"u"],n:["nano",1e-9,"n"],p:["pico",1e-12,"p"],f:["femto",1e-15,"f"],a:["atto",1e-18,"a"],z:["zepto",1e-21,"z"],y:["yocto",1e-24,"y"]},R=null,L=null,W=e,K=t,Q=1,oe=1;for(let se=0;se<i.length;se++)r=i[se][2]===null?[]:i[se][2],(i[se][1]===W||r.indexOf(W)>=0)&&(R=i[se]),(i[se][1]===K||r.indexOf(K)>=0)&&(L=i[se]);if(R===null){let se=a[e.substring(0,2)],he=g[e.substring(0,1)];e.substring(0,2)==="da"&&(he=["dekao",10,"da"]),se?(Q=se[2],W=e.substring(2)):he&&(Q=he[1],W=e.substring(he[2].length));for(let me=0;me<i.length;me++)r=i[me][2]===null?[]:i[me][2],(i[me][1]===W||r.indexOf(W)>=0)&&(R=i[me])}if(L===null){let se=a[t.substring(0,2)],he=g[t.substring(0,1)];t.substring(0,2)==="da"&&(he=["dekao",10,"da"]),se?(oe=se[2],K=t.substring(2)):he&&(oe=he[1],K=t.substring(he[2].length));for(let me=0;me<i.length;me++)r=i[me][2]===null?[]:i[me][2],(i[me][1]===K||r.indexOf(K)>=0)&&(L=i[me])}return R===null||L===null||R[3]!==L[3]?It:n*R[6]*Q/(L[6]*oe)}function kv(n,e){if((n=Fe(n))instanceof Error)return n;if(!/^-?[0-9]{1,3}$/.test(n)||n<-512||n>511)return ot;if(n<0)return"1"+ks("0",9-(512+n).toString(2).length)+(512+n).toString(2);let t=parseInt(n,10).toString(2);return e===void 0?t:isNaN(e)?Xe:e<0?ot:(e=Math.floor(e))>=t.length?ks("0",e-t.length)+t:ot}function Rv(n,e){if((n=Fe(n))instanceof Error)return n;if(!/^-?[0-9]{1,12}$/.test(n)||n<-549755813888||n>549755813887)return ot;if(n<0)return(1099511627776+n).toString(16).toUpperCase();let t=parseInt(n,10).toString(16).toUpperCase();return e===void 0?t:isNaN(e)?Xe:e<0?ot:(e=Math.floor(e))>=t.length?ks("0",e-t.length)+t:ot}function np(n,e){if((n=Fe(n))instanceof Error)return n;if(!/^-?[0-9]{1,9}$/.test(n)||n<-536870912||n>536870911)return ot;if(n<0)return(1073741824+n).toString(8);let t=parseInt(n,10).toString(8);return e===void 0?t:isNaN(e)?Xe:e<0?ot:(e=Math.floor(e))>=t.length?ks("0",e-t.length)+t:ot}function vd(n,e){return xt(n=Fe(n),e=e===void 0?0:Fe(e))?Xe:+(n===e)}function or(n,e){return xt(n=Fe(n),e=e===void 0?0:Fe(e))?Xe:(n=n===0?0:$n.erf(n),e!==0?$n.erf(e)-n:n)}function Af(n){return isNaN(n)?Xe:n===0?1:$n.erfc(n)}function Ev(n,e){return n=Fe(n),xt(e=e===void 0?0:Fe(e),n)?Xe:+(n>=e)}function _c(n,e){if(!/^[0-9A-Fa-f]{1,10}$/.test(n))return ot;let t=n.length===10&&n.substring(0,1).toLowerCase()==="f",r=t?parseInt(n,16)-1099511627776:parseInt(n,16);if(r<-512||r>511)return ot;if(t)return"1"+ks("0",9-(512+r).toString(2).length)+(512+r).toString(2);let i=r.toString(2);return e===void 0?i:isNaN(e)?Xe:e<0?ot:(e=Math.floor(e))>=i.length?ks("0",e-i.length)+i:ot}function YT(n){if(!/^[0-9A-Fa-f]{1,10}$/.test(n))return ot;let e=parseInt(n,16);return e>=549755813888?e-1099511627776:e}function Av(n,e){if(!/^[0-9A-Fa-f]{1,10}$/.test(n))return ot;let t=parseInt(n,16);if(t>536870911&&t<0xffe0000000)return ot;if(t>=0xffe0000000)return(t-0xffc0000000).toString(8);let r=t.toString(8);return e===void 0?r:isNaN(e)?Xe:e<0?ot:(e=Math.floor(e))>=r.length?ks("0",e-r.length)+r:ot}function rp(n){let e=Ti(n),t=xr(n);return Qi(e,t)?ot:Math.sqrt(Math.pow(e,2)+Math.pow(t,2))}function xr(n){if(n===void 0||n===!0||n===!1)return Xe;if(rr(n)&&(n=n.toString()),n===0||n==="0")return 0;if(["i","j"].indexOf(n)>=0)return 1;let e=(n=n.replace("+i","+1i").replace("-i","-1i").replace("+j","+1j").replace("-j","-1j")).indexOf("+"),t=n.indexOf("-");e===0&&(e=n.indexOf("+",1)),t===0&&(t=n.indexOf("-",1));let r=n.substring(n.length-1,n.length),i=r==="i"||r==="j";return e>=0||t>=0?i?e>=0?isNaN(n.substring(0,e))||isNaN(n.substring(e+1,n.length-1))?ot:Number(n.substring(e+1,n.length-1)):isNaN(n.substring(0,t))||isNaN(n.substring(t+1,n.length-1))?ot:-Number(n.substring(t+1,n.length-1)):ot:i?isNaN(n.substring(0,n.length-1))?ot:n.substring(0,n.length-1):isNaN(n)?ot:0}function Mv(n){let e=Ti(n),t=xr(n);return Qi(e,t)?ot:e===0&&t===0?gr:e===0&&t>0?Math.PI/2:e===0&&t<0?-Math.PI/2:t===0&&e>0?0:t===0&&e<0?-Math.PI:e>0?Math.atan(t/e):e<0&&t>=0?Math.atan(t/e)+Math.PI:Math.atan(t/e)-Math.PI}function KT(n){rr(n)&&(n=n.toString());let e=Ti(n),t=xr(n);if(Qi(e,t))return ot;let r=n.substring(n.length-1);return r=r==="i"||r==="j"?r:"i",t!==0?Di(e,-t,r):n}function Dv(n){rr(n)&&(n=n.toString());let e=Ti(n),t=xr(n);if(Qi(e,t))return ot;let r=n.substring(n.length-1);return Di(Math.cos(e)*(Math.exp(t)+Math.exp(-t))/2,-Math.sin(e)*(Math.exp(t)-Math.exp(-t))/2,r=r==="i"||r==="j"?r:"i")}function XT(n){rr(n)&&(n=n.toString());let e=Ti(n),t=xr(n);if(Qi(e,t))return ot;let r=n.substring(n.length-1);return Di(Math.cos(t)*(Math.exp(e)+Math.exp(-e))/2,Math.sin(t)*(Math.exp(e)-Math.exp(-e))/2,r=r==="i"||r==="j"?r:"i")}function v0(n){let e=Ti(n),t=xr(n);if(Qi(e,t))return ot;let r="i";n.substring(n.length-1)==="j"&&(r="j");let i=Math.sin(e),a=(Math.exp(t)-Math.exp(-t))/2,g=Math.cos(e),R=(Math.exp(t)+Math.exp(-t))/2,L=R*R-g*g;return Di(i*g/L,-(a*R)/L,r)}function Ov(n,e){rr(n)&&(n=n.toString()),rr(e)&&(e=e.toString());let t=Ti(n),r=xr(n),i=Ti(e),a=xr(e);if(Qi(t,r,i,a))return ot;let g=n.substring(n.length-1),R=e.substring(e.length-1),L="i";if((g==="j"||R==="j")&&(L="j"),i===0&&a===0)return ot;let W=i*i+a*a;return Di((t*i+r*a)/W,(r*i-t*a)/W,L)}function JT(n){rr(n)&&(n=n.toString());let e=Ti(n),t=xr(n);if(Qi(e,t))return ot;let r=n.substring(n.length-1),i=Math.exp(e);return Di(i*Math.cos(t),i*Math.sin(t),r=r==="i"||r==="j"?r:"i")}function ZT(n){rr(n)&&(n=n.toString());let e=Ti(n),t=xr(n);if(Qi(e,t))return ot;let r=n.substring(n.length-1);return Di(Math.log(Math.sqrt(e*e+t*t)),Math.atan(t/e),r=r==="i"||r==="j"?r:"i")}function Uu(n){rr(n)&&(n=n.toString());let e=Ti(n),t=xr(n);if(Qi(e,t))return ot;let r=n.substring(n.length-1);return Di(Math.log(Math.sqrt(e*e+t*t))/Math.log(10),Math.atan(t/e)/Math.log(10),r=r==="i"||r==="j"?r:"i")}function Qa(n){rr(n)&&(n=n.toString());let e=Ti(n),t=xr(n);if(Qi(e,t))return ot;let r=n.substring(n.length-1);return Di(Math.log(Math.sqrt(e*e+t*t))/Math.log(2),Math.atan(t/e)/Math.log(2),r=r==="i"||r==="j"?r:"i")}function Nv(n,e){if(rr(n)&&(n=n.toString()),Qi(e=Fe(e),Ti(n),xr(n)))return ot;let t=n.substring(n.length-1);t=t==="i"||t==="j"?t:"i";let r=Math.pow(rp(n),e),i=Mv(n);return Di(r*Math.cos(e*i),r*Math.sin(e*i),t)}function QT(){if(arguments.length<1)return It;let n=xn(Array.from(arguments).filter(t=>t!=null)).map(t=>t===""?0:t);if(n.length===0)return It;let e=n[0];for(let t=1;t<n.length;t++){let r=Ti(e),i=xr(e),a=Ti(n[t]),g=xr(n[t]);if(Qi(r,i,a,g))return ot;e=Di(r*a-i*g,r*g+i*a)}return e.toString()}function Ti(n){if(n===void 0||n===!0||n===!1)return Xe;if(n===0||n==="0"||(rr(n)&&(n=n.toString()),["i","+i","1i","+1i","-i","-1i","j","+j","1j","+1j","-j","-1j"].indexOf(n)>=0))return 0;let e=n.indexOf("+"),t=n.indexOf("-");e===0&&(e=n.indexOf("+",1)),t===0&&(t=n.indexOf("-",1));let r=n.substring(n.length-1,n.length),i=r==="i"||r==="j";return e>=0||t>=0?i?e>=0?isNaN(n.substring(0,e))||isNaN(n.substring(e+1,n.length-1))?ot:Number(n.substring(0,e)):isNaN(n.substring(0,t))||isNaN(n.substring(t+1,n.length-1))?ot:Number(n.substring(0,t)):ot:i?isNaN(n.substring(0,n.length-1))?ot:0:isNaN(n)?ot:n}function ek(n){return n===!0||n===!1?Xe:Qi(Ti(n),xr(n))?ot:Ov("1",Dv(n))}function tk(n){let e=Ti(n),t=xr(n);if(Qi(e,t))return ot;let r="i";n.substring(n.length-1)==="j"&&(r="j");let i=Math.sin(t),a=(Math.exp(e)-Math.exp(-e))/2,g=Math.cos(t),R=g*g+a*a;return Di((Math.exp(e)+Math.exp(-e))/2*g/R,-(i*a)/R,r)}function yd(n){rr(n)&&(n=n.toString());let e=Ti(n),t=xr(n);if(Qi(e,t))return ot;let r=n.substring(n.length-1);return Di(Math.sin(e)*(Math.exp(t)+Math.exp(-t))/2,Math.cos(e)*(Math.exp(t)-Math.exp(-t))/2,r=r==="i"||r==="j"?r:"i")}function y0(n){rr(n)&&(n=n.toString());let e=Ti(n),t=xr(n);if(Qi(e,t))return ot;let r=n.substring(n.length-1);return Di(Math.cos(t)*(Math.exp(e)-Math.exp(-e))/2,Math.sin(t)*(Math.exp(e)+Math.exp(-e))/2,r=r==="i"||r==="j"?r:"i")}function w0(n){if(rr(n)&&(n=n.toString()),Qi(Ti(n),xr(n)))return ot;let e=n.substring(n.length-1);e=e==="i"||e==="j"?e:"i";let t=Math.sqrt(rp(n)),r=Mv(n);return Di(t*Math.cos(r/2),t*Math.sin(r/2),e)}function nk(n){return n===!0||n===!1?Xe:Qi(Ti(n),xr(n))?ot:Ov("1",yd(n))}function rk(n){if(n===!0||n===!1)return Xe;let e=Ti(n),t=xr(n);if(Qi(e,t))return ot;let r="i";n.substring(n.length-1)==="j"&&(r="j");let i=Math.sin(t),a=(Math.exp(e)-Math.exp(-e))/2,g=i*i+a*a;return Di(Math.cos(t)*a/g,-((Math.exp(e)+Math.exp(-e))/2*i)/g,r)}function ik(n,e){rr(n)&&(n=n.toString()),rr(e)&&(e=e.toString());let t=Ti(n),r=xr(n),i=Ti(e),a=xr(e);if(Qi(t,r,i,a))return ot;let g=n.substring(n.length-1),R=e.substring(e.length-1),L="i";return(g==="j"||R==="j")&&(L="j"),Di(t-i,r-a,L)}function ok(){if(arguments.length<1)return It;let n=xn(Array.from(arguments).filter(t=>t!=null)).map(t=>t===""?0:t);if(n.length===0)return It;let e=n[0];for(let t=1;t<n.length;t++){let r=Ti(e),i=xr(e),a=Ti(n[t]),g=xr(n[t]);if(Qi(r,i,a,g))return ot;e=Di(r+a,i+g)}return e.toString()}function b0(n){if(n===!0||n===!1)return Xe;let e=Ti(n),t=xr(n);if(Qi(e,t))return ot;let r="i";n.substring(n.length-1)==="j"&&(r="j");let i=Math.sin(e),a=(Math.exp(t)-Math.exp(-t))/2,g=Math.cos(e),R=g*g+a*a;return Di(i*g/R,(Math.exp(t)+Math.exp(-t))/2*a/R,r)}function C0(n,e){if(!/^[0-7]{1,10}$/.test(n))return ot;rr(n)&&(n=n.toString());let t=n.length===10&&n.substring(0,1)==="7",r=t?parseInt(n,8)-1073741824:parseInt(n,8);if(r<-512||r>511)return ot;if(t)return"1"+ks("0",9-(512+r).toString(2).length)+(512+r).toString(2);let i=r.toString(2);return e===void 0?i:isNaN(e)?Xe:e<0?ot:(e=Math.floor(e))>=i.length?ks("0",e-i.length)+i:ot}function ak(n){if(!/^[0-7]{1,10}$/.test(n))return ot;let e=parseInt(n,8);return e>=536870912?e-1073741824:e}function Pv(n,e){if(!/^[0-7]{1,10}$/.test(n))return ot;let t=parseInt(n,8);if(t>=536870912)return"FF"+(t+3221225472).toString(16).toUpperCase();let r=t.toString(16).toUpperCase();return e===void 0?r:isNaN(e)?Xe:e<0?ot:(e=Math.floor(e))>=r.length?ks("0",e-r.length)+r:ot}function Qi(){return Array.prototype.some.call(arguments,Pi)}or.PRECISE=function(n,e){return or(n,e)},Af.PRECISE=function(n){let e=or.PRECISE(n);return Pi(e)?e:1-e};let wd={};function Bv(){return arguments.length<1?It:arguments.length==1&&arguments[0]===null}function _0(n){return/^[01]{1,10}$/.test(n)}function Lv(n){for(let e in y)if(y[e].message===n)return!0;return!!(typeof n=="number"&&(isNaN(n)||!isFinite(n)))}function ip(n){return Object.prototype.toString.apply(n)==="[object Error]"&&(n=n.message),n!==It.message&&Lv(n)}function bd(n){return Object.prototype.toString.apply(n)==="[object Error]"&&(n=n.message),Lv(n)}function hu(n){return!(1&Math.floor(Math.abs(n)))}function Th(n){return n===!0||n===!1}function sk(n){return Object.prototype.toString.apply(n)==="[object Error]"&&(n=n.message),n===It.message}function S0(n){return typeof n!="string"}function op(n){return typeof n=="number"&&!isNaN(n)&&isFinite(n)}function lk(n){return!!(1&Math.floor(Math.abs(n)))}function I0(n){return typeof n=="string"}function uk(n){return op(n)?n:n===!0?1:n===!1?0:bd(n)?n:0}function hk(){return It}function ck(n){return n===null||op(n)?1:I0(n)?2:Th(n)?4:bd(n)?16:Array.isArray(n)?64:void 0}function dk(){if(arguments.length<1)return It;let n=xn(arguments),e=!0;for(let t=0;t<n.length;t++)n[t]||(e=!1);return e}function fk(){if(arguments.length<2)return It;let n=Math.floor(arguments[0]);return n<1||n>254||arguments.length<n+1?Xe:arguments[n]}function gk(){return!1}function pk(n,e,t){return arguments.length<2||arguments.length>3?It:(arguments.length==2&&(t=!1),n?e:t)}function mk(){let n=arguments.length;if(n%2==1)return It;for(let e=0;e<n;e+=2){let t=arguments[e];if(t)return bd(t)?t:arguments[e+1]}return It}function x0(n,e){return bd(n)?e:n}function T0(n,e){return Object.prototype.toString.apply(n)==="[object Error]"&&(n=n.message),n===It.message?e:n}function k0(n){return!n}function vk(){if(arguments.length<1)return It;let n=xn(arguments),e=!1;for(let t=0;t<n.length;t++)n[t]&&(e=!0);return e}function yk(){return!0}function wk(){if(arguments.length<1)return It;let n=xn(arguments),e=0;for(let t=0;t<n.length;t++)n[t]&&e++;return!!(1&Math.floor(Math.abs(e)))}function R0(){let n;if(arguments.length>0){let e=arguments[0],t=arguments.length-1,r=Math.floor(t/2),i=!1,a=t%2==0?null:arguments[arguments.length-1];if(r){for(let g=0;g<r;g++)if(e===arguments[2*g+1]){n=arguments[2*g+2],i=!0;break}}!i&&a&&(n=a)}return n}wd.TYPE=function(n){switch(Object.prototype.toString.apply(n)==="[object Error]"&&(n=n.message),n){case Dl.message:return 1;case gr.message:return 2;case Xe.message:return 3;case co.message:return 4;case Do.message:return 5;case ot.message:return 6;case It.message:return 7;case ps.message:return 8}return It};let bk=/~[?*]|[-/\\^$*+?.()|[\]{}]/g;function Ck(n){switch(n){case"~?":case"~*":return"\\"+n.charAt(1);case"*":return"[\\s\\S]*";case"?":return".";default:return"\\"+n.charAt(0)}}function E0(n){return n.indexOf("*")>-1||n.indexOf("?")>-1}function A0(n){return RegExp(["^",n.replace(bk,Ck),"$"].join(""),"i")}function _k(n){return n!==this.cond}function Sk(n){return n!==null&&n>this.cond}function fl(n){return n!==null&&n<this.cond}function Ik(n){return n!==null&&n>=this.cond}function xk(n){return n!==null&&n<=this.cond}function Fv(n){return this.cond===n}function ap(n){if(zs(n)){let e=Fe(n);mr(e)||(n=e)}return Vv.call(this,n)}function Vv(n){return!Pi(n)&&this.cond===Lr(n)}function M0(n){return typeof n=="string"&&this.cond.test(n)}function Tk(n){return!M0.call(this,n)}function D0(n){return function(e){return typeof e=="string"&&n.call(this,e.toLowerCase())}}let Hv=D0(Fv);function kk(n){return!Hv.call(this,n)}function O0(n,e){switch(n){case"<>":return _k;case">":return Sk;case"<":return fl;case">=":return Ik;case"<=":return xk;default:return e===null?Fv:ap}}function Rk(){return!1}function $v(n,e){let t=e,r=Vv;if(rr(e))r=ap;else if(e!=="")if(ms(e)||Pi(e))r=Fv;else if(e===null)r=Rk;else{var i;let a=function(R){switch(R[0]){case"<":return R[1]===">"||R[1]==="="?R.substr(0,2):R[0];case">":return R[1]==="="?R.substr(0,2):R[0];case"=":return R[0];default:return}}(t=e.toString());a&&(t=t.substr(a.length))===""&&(t=null);let g=!0;if(t!==null){let R=Fe(t);if(mr(R)){let L=n.getLocale().getDateParser().parse(t);L?R=di(L.v):g=!1}t=g?R:(!a||a==="="||a==="<>")&&E0(t)?A0(t):t.toLowerCase()}r=g?O0(a,t):zs(t)?(i=t,a==="<>"?kk:D0(O0(a,i))):a==="<>"?Tk:M0}(r===Vv||r===ap)&&(t=Lr(t)),this.cond=t,this.test=r}let fa=function(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")};var go=function(n){return n[n.OTHER=0]="OTHER",n[n.NUMBER=1]="NUMBER",n[n.STRING=2]="STRING",n[n.BOOLEAN=3]="BOOLEAN",n}({});function kh(n){return Array.isArray(n)?n.map(kh):fa(n)?{error:n.message}:n}function zv(n){return Array.isArray(n)?n.map(zv):fa(n)?ua[n.error]||Bu:n}function N0(n){let e=r=>Array.isArray(r)?e(r[0]):Pi(r)?r.message:typeof r=="boolean"?r?"True":"False":typeof r=="number"?`${r}`:`"${r??""}"`;return Array.isArray(n)?`{${n.map(r=>Array.isArray(r)?r.map(e).join(", "):e(r)).join("; ")}}`:e(n)}let P0=Math.max(...Object.values(go).filter(rr))+1;function Wv(n,e,t,r,i){let a=$g(e).sort((R,L)=>function W(K,Q,oe,se,he,me,ye){if(he>=se)return me>ye?1:-1;let Te=K(me,he),Me=K(ye,he),[Oe,ze]=[Te,Me].map(Ke=>rr(Ke)?go.NUMBER:zs(Ke)?go.STRING:ms(Ke)?go.BOOLEAN:Pi(Ke)?P0:go.OTHER);if(Te===Me||Oe===go.OTHER&&ze===go.OTHER)return W(K,Q,oe,se,he+1,me,ye);if(Oe===go.OTHER||ze===go.OTHER)return Oe===go.OTHER?1:-1;let We=(Array.isArray(oe)?oe[he]:oe)?1:-1,qe=1;return Oe!==ze?qe=Oe>ze?1:-1:Oe===go.BOOLEAN?qe=Te?1:-1:Oe===go.NUMBER?qe=Te>Me?1:-1:Oe===go.STRING?qe=Q.compare(Te,Me):Oe===P0&&(qe=0),We*qe}(n,r,i,t,0,R,L)),g=Array(a.length);for(let R=0;R<a.length;R++)g[a[R]]=R;return g}function B0(n,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);let r=new Map,i=e?n[0].map((g,R)=>JSON.stringify(n.map(L=>L[R]))):n.map(g=>JSON.stringify(g)),a=Array(i.length).fill(!0);for(let g=0;g<i.length;g++){let R=i[g];if(!r.has(R)){r.set(R,g);continue}a[g]=!1,t&&(a[r.get(R)]=!1)}return a}let Wo={Exact:0,NextGreater:1,NextLittler:-1,Regex:2},cu={Linear:1,ReversedLinear:-1,Binary:2,ReversedBinary:-2},Uv={number:1,string:2,boolean:3},Ek=new dl,Cd=new dl().assign({keepNull:!0});function L0(n,e){let t=Uv[typeof n],r=Uv[typeof e];return t===void 0||r===void 0?-1:t!==r?t<r?-1:1:(r===Uv.string&&(n=n.toLowerCase(),e=e.toLowerCase()),n===e?0:n<e?-1:1)}function F0(n,e){return-L0(n,e)}function Ak(n,e){return typeof n!="string"?-1:+(n.toLowerCase()!==e)}function Gv(n,e){return typeof n!="string"?-1:+!e.test(n)}function V0(n,e,t,r,i){let a;r===void 0&&(r=!1),i===void 0&&(i=!0);let g=-1;for(let R=0,L=e.getLength();R<L;R++){let W=r?L-R-1:R,K=e.getValue(W),Q=t(K,n);if(Q===0)return W;!i&&Q>0&&(g===-1||0>t(K,a))&&(a=K,g=W)}return g}function sp(n,e,t,r,i){r===void 0&&(r=!0),i===void 0&&(i=null);let a=L0,g=!0;return i?g=i>0:(i=e===Wo.Exact?cu.Linear:e===Wo.NextLittler?cu.Binary:cu.ReversedBinary,g=e!==Wo.NextLittler),i===cu.Binary||i===cu.ReversedBinary?(i===cu.ReversedBinary&&(a=F0),function(R,L,W,K,Q,oe){K===void 0&&(K=!0),Q===void 0&&(Q=!0),oe===void 0&&(oe=!0);let se=0,he=L.getLength()-1;for(;se<=he;){let me=Math.floor((se+he)/2),ye=W(L.getValue(me),R);if(ye===0){if(se===he)return me;oe?he=me:se=me+1}else ye>0?he=me-1:ye<0&&(se=me+1)}return se<L.getLength()&&W(L.getValue(se),R)===0?se:he>=0&&W(L.getValue(he),R)===0?he:K?-1:Q?he>=0?he:-1:se<L.getLength()?se:-1}(n,t,a,e===Wo.Exact,i*e<=0,g)):(e!==Wo.Exact?e<0&&(a=F0):typeof n=="string"&&(r&&E0(n)?(n=A0(n),a=Gv):(n=n.toLowerCase(),a=Ak)),V0(n,t,a,i===cu.ReversedLinear,e===Wo.Exact))}function Mk(n,e,t){let r=arguments.length;if(r<2||r>3||n===null)return It;let i={0:Wo.Exact,1:Wo.NextLittler,[-1]:Wo.NextGreater};if(r<3)t=Wo.NextLittler;else{if(typeof t!="number")return Xe;if(!(t in i))return It;t=i[t]}let a=-1;if(e.isRef()){let[g,R,L]=qv(e),[W,K,Q]=Yv(e);R===L?a=this.createRowVector(g,Cd,e.isImplicit,sp.bind(null,n,t)):K===Q&&(a=this.createColumnVector(W,Cd,e.isImplicit,sp.bind(null,n,t)))}else if(e.isArray()){let g=e.resolve();(g.length===1||g.every(R=>R.length===1))&&(a=sp(n,t,new Of(xn(g))))}return a<0?It:a+1}function Mf(n,e,t,r,i){let a=sp(n,e,t,r,i);return a<0?-1:a+t.getStartOffset()}function Dk(n,e,t,r){let i=arguments.length;if(i<3||i>4||n===null)return It;if(typeof t!="number"||r!=null&&typeof r!="boolean")return Xe;let a=i<4||r?Wo.NextLittler:Wo.Exact,g=0,R=-1,L=It;if(e.isRef()){let[W,K,Q]=qv(e);if((g=K+t-1)>Q)return co;L=(R=this.createRowVector(W,Cd,e.isImplicit,Mf.bind(null,n,a)))>-1?this.cellValue(oo.fromCell({row:g,col:R},W.shName,e.isImplicit),Cd):It}else if(e.isArray()){let W=ka(e.resolve());if((g=t-1)>=W.length)return co;L=(R=Mf(n,a,new Of(W[0])))>-1?W[g][R]:It}return L}function Ok(n,e,t,r){let i=arguments.length;if(i<3||i>4||n===null)return It;if(typeof t!="number"||r!=null&&typeof r!="boolean")return Xe;let a=i<4||r?Wo.NextLittler:Wo.Exact,g=-1,R=0,L=It;if(e.isRef()){let[W,K,Q]=Yv(e);if((R=K+t-1)>Q)return co;L=(g=this.createColumnVector(W,Cd,e.isImplicit,Mf.bind(null,n,a)))>-1?this.cellValue(oo.fromCell({row:g,col:R},W.shName,e.isImplicit),Cd):It}else if(e.isArray()){let W=ka(e.resolve());if((R=t-1)>=W[0].length)return co;L=(g=Mf(n,a,new Of(Kv(W,0))))>-1?W[g][R]:It}return L}function Nk(n,e,t,r,i,a){let g,R=arguments.length;if(R<3||R>6)return It;if(n=n??"",i=Fe(i??0),a=Fe(a??1),Pi(i)||Pi(a)||(i=Math.floor(i),a=Math.floor(a),!Object.values(Wo).includes(i)||!Object.values(cu).includes(a)||i===Wo.Regex&&(a===cu.Binary||a===cu.ReversedBinary)))return Xe;let L=i===Wo.Regex?Wo.Exact:i,W=i===Wo.Regex,K=It,Q=ye=>{let{height:Te,width:Me}=ca(ye,this);return{height:Te||1,width:Me||1}},oe=Q(e),se=Q(t);if(oe.width>1&&oe.height>1)return Xe;let he=oe.height>1;if(he?oe.height!==se.height:oe.width!==se.width)return Xe;if(e.isRef()){let[ye]=he?Yv(e):qv(e);g=(he?this.createColumnVector.bind(this):this.createRowVector.bind(this))(ye,Ek,e.isImplicit,Te=>Te)}else if(e.isArray()){let ye=ka(e.resolve());g=new Of(he?Kv(ye,0):ye[0])}else{if(!e.isValue())return Xe;g=new Of([e.v])}let me=Mf(n,L,g,W,a)-g.getStartOffset();if(me<0)K=r??It;else if(t.isRef()){let ye,Te,Me=t.toCellRef(this)?.toRange(),Oe=!1;if(he){let ze=Me.from.row+me;ye={row:ze,col:Me.from.col},Te={row:ze,col:Me.to.col},Oe=se.width>1}else{let ze=Me.from.col+me;ye={row:Me.from.row,col:ze},Te={row:Me.to.row,col:ze},Oe=se.height>1}K=Oe?oo.fromRange({from:ye,to:Te},Me.shName,e.isImplicit):oo.fromCell(ye,Me.shName,e.isImplicit)}else if(t.isArray()){let ye=ka(t.resolve());K=he?se.width>1?[ye[me]]:ye[me][0]:se.height>1?Kv(ye,me).map(Te=>[Te]):ye[0][me]}else{if(!t.isValue())return Xe;K=t.v}return K}function Pk(n,e,t,r){if(n=ka(n),e=Fe(e??1),t=Fe(t??1),r=Ii(r??!1),xt(e,t,r))return Xe;let i=r?n[0].length:n.length,a=r?n.length:n[0].length;if(e<1||e>a||t!==1&&t!==-1)return Xe;let g=Wv(R=>r?n[e-1][R]:n[R][e-1],i,1,this.getLocale().getCollator(),t===1);return jv(n,r,g)}function Bk(n,e,t){if(arguments.length>3&&arguments.length%2!=1)return Xe;n=ka(n),e=ka(e),t=Fe(t??1);let r=e.length,i=e[0].length,a=r===n.length&&i===1,g=i===n[0].length&&r===1;if(!a&&!g||t!==1&&t!==-1)return Xe;let R=[t===1];for(let W=3;W<arguments.length;W+=2){let K=ka(arguments[W]),Q=Fe(arguments[W+1]);if(K.length!==r||K[0].length!==i||Q!==1&&Q!==-1)return Xe;R.push(Q===1)}let L=Wv((W,K)=>{let Q=arguments[2*K+1];return Q?g?Q[0][W]:Q[W][0]:null},g?i:r,R.length,this.getLocale().getCollator(),R);return jv(n,g,L)}function jv(n,e,t){let r=vf(n.length,n[0].length);for(let i=0;i<n.length;i++)for(let a=0;a<n[0].length;a++)e?r[i][t[a]]=n[i][a]:r[t[i]][a]=n[i][a];return r}function Lk(n,e,t){n=ka(n);let r=(e=ka(e)).length===n.length&&e[0].length===1,i=e[0].length===n[0].length&&e.length===1;if(!r&&!i)return Xe;let a=i?e[0].map(Ii):e.map(g=>{let[R]=g;return Ii(R)});return xt(...a)?Xe:Df(n,a,i,t)}function Df(n,e,t,r){if(!e.some(a=>a))return r??gs;let i=(a,g)=>e[g];return t?n.map(a=>a.filter(i)):n.filter(i)}function Fk(n){return n===void 0?It:(n=ka(n))[0].map((e,t)=>n.map(r=>r[t]))}function Vk(){return arguments.length==0?It:Array.from(xn(arguments),n=>[n])}function lp(n,e,t){if(n=ka(n),xt(e=Ii(e??!1),t=Ii(t??!1)))return Xe;let r=B0(n,e,t);return Df(n,r,e)}function Hk(n,e){if(!n||!e)return It;let t=Ji(e);return t.size()===1&&t.get(0).isRange()?this.getExternalRange(n,av(t.get(0))):co}function qv(n){let e,t,r=n.toRange();return n.isCellRef()?(e=r.from.row,t=r.to.row,r.to.row=r.from.row):n.isRowRef()?(e=r.from,t=r.to,r.to=r.from):n.isColRef()&&(e=0,t=Number.MAX_VALUE,r=new mi({row:0,col:r.from},{row:0,col:r.to},r.shName)),[r,e,t]}function Yv(n){let e,t,r=n.toRange();return n.isCellRef()?(e=r.from.col,t=r.to.col,r.to.col=r.from.col):n.isRowRef()?(e=0,t=Number.MAX_VALUE,r=new mi({row:r.from,col:0},{row:r.to,col:0},r.shName)):n.isColRef()&&(e=r.from,t=r.to,r.to=r.from),[r,e,t]}function Kv(n,e){let t=[];for(let r=0;r<n.length;r++)t.push(n[r][e]);return t}class Of{constructor(e){this._array=e}getLength(){return this._array.length}getValue(e){return this._array[e]}getStartOffset(){return 0}}let Sc=function(n){return typeof n=="symbol"||ws(n)&&ru(n)=="[object Symbol]"},H0=function(n,e,t){for(var r=-1,i=n.length;++r<i;){var a=n[r],g=e(a);if(g!=null&&(R===void 0?g==g&&!Sc(g):t(g,R)))var R=g,L=a}return L},$k=function(n,e){return n>e},_d=function(n){return n},du=function(n){return n&&n.length?H0(n,_d,$k):void 0},zk=function(n,e){return n<e},up=function(n){return n&&n.length?H0(n,_d,zk):void 0};function Wk(){if(arguments.length<1)return It;let n=[],e=xn(arguments),t=e.length;for(let r=0;r<t;r++)rr(e[r])&&n.push(e[r]);return $n.sum($n(n).subtract($n.mean(n)).abs()[0])/n.length}function Ic(){if(arguments.length<1)return It;let n=xn(arguments),e=n.length,t=0,r=0;for(let i=0;i<e;i++)typeof n[i]=="number"&&(t+=n[i],++r);return r===0?gr:t/r}function hp(){let n=xn(arguments),e=n.length,t=0,r=0;for(let i=0;i<e;i++){let a=n[i];typeof a=="number"?t+=a:typeof a!="string"||a===""||isNaN(a)?a===!0&&t++:t+=parseFloat(a),a!==null&&a!==""&&r++}return r===0?gr:t/r}let cp={};function Uk(n,e,t,r,i){return cp.DIST(n,e,t,!0,r,i)}function $0(n,e,t,r,i){return n=Fe(n),e=Fe(e),t=Fe(t),xt(n,e,t,r=r===void 0?0:Fe(r),i=i===void 0?1:Fe(i))?Xe:e<=0||t<=0||n<=0||n>1||r===i?ot:$n.beta.inv(n,e,t)*(i-r)+r}cp.DIST=function(n,e,t,r,i,a){return arguments.length<4||(n=Fe(n),e=Fe(e),t=Fe(t),xt(n,e,t,i=i===void 0?0:Fe(i),a=a===void 0?1:Fe(a)))?Xe:e<=0||t<=0||n<i||n>a||i===a?ot:(n=(n-i)/(a-i),r?$n.beta.cdf(n,e,t):$n.beta.pdf(n,e,t)/(a-i))},cp.INV=$0;let Nf={};function Pf(n,e,t,r){return r===void 0?It:(n=Fe(n),e=Fe(e),t=Fe(t),r=!!r,xt(n,e,t)?Xe:(n=Math.floor(n),e=Math.floor(e),n<0||n>e||t<0||t>1?ot:r?$n.binomial.cdf(n,e,t):$n.binomial.pdf(n,e,t)))}Nf.DIST=Pf,Nf.DIST.RANGE=function(n,e,t,r){if(r=r===void 0?t:r,n=Fe(n),e=Fe(e),xt(n,e,t=Fe(t),r=Fe(r)))return Xe;let i=0;for(let a=t;a<=r;a++)i+=Ec(n,a)*Math.pow(e,a)*Math.pow(1-e,n-a);return i},Nf.INV=function(n,e,t){if(n=Fe(n),xt(n,e=Fe(e),t=Fe(t)))return Xe;if(n<0||e<=0||e>=1||t<=0||t>=1)return ot;let r=0;for(;r<=n;){if($n.binomial.cdf(r,n,e)>=t)return r;r++}};let Gk=Nf.INV,Gu={};Gu.DIST=function(n,e,t){return xt(n=Fe(n),e=Fe(e))?Xe:n<0||e<1||e>1e10?ot:t?$n.chisquare.cdf(n,e):$n.chisquare.pdf(n,e)},Gu.DIST.RT=function(n,e){return n===void 0||e===void 0?It:xt(n=Fe(n),e=Fe(e))?Xe:(e=Math.floor(e),n<0||e<1||e>1e10?ot:1-$n.chisquare.cdf(n,e))},Gu.INV=function(n,e){return xt(n=Fe(n),e=Fe(e))?Xe:(e=Math.floor(e),n<0||n>1||e<1||e>1e10?ot:$n.chisquare.inv(n,e))},Gu.INV.RT=function(n,e){return n===void 0||e===void 0?It:n<0||n>1||e<1||e>1e10?ot:typeof n!="number"||typeof e!="number"?Xe:(e=Math.floor(e),$n.chisquare.inv(1-n,e))},Gu.TEST=function(n,e){let t,r;if(arguments.length!=2)return It;if(!Array.isArray(n)||!Array.isArray(e))return Xe;if(n=ka(n),e=ka(e),n.length!==e.length)return It;let i=n.length,a=n[0].length;if(i===1&&a===1)return It;for(t=0;t<i;t++)if(n[t].length!==a||e[t].length!==a)return It;let g=0,R=Math.PI;for(t=0;t<i;t++)for(r=0;r<a;r++){if(rr(n[t][r])||(n[t][r]=0),!rr(e[t][r]))return gr;g+=Math.pow(n[t][r]-e[t][r],2)/e[t][r]}return Math.round(1e9*function(L,W){let K=Math.exp(-.5*L);W%2==1&&(K*=Math.sqrt(2*L/R));let Q=W;for(;Q>=2;)K=K*L/Q,Q-=2;let oe=K,se=W;for(;oe>1e-10*K;)se+=2,K+=oe=oe*L/se;return 1-K}(g,a===1?i-1:i===1?a-1:(i-1)*(a-1)))/1e9};let jk=Gu.DIST.RT,qk=Gu.INV.RT,Yk=Gu.TEST;function Kk(n){let e=Number.MAX_VALUE;if(n){let t=0,r=this.getInstance(n).countCols()-1;if(n.isCellRef())n.v.forEach(function(i){r=Math.min(r,i.col),t=Math.max(t,i.col)});else if(n.isRowRef())r=0,t=this.getInstance(n).countCols()-1;else if(n.isColRef())r=Math.min(n.v[0],n.v[1]),t=Math.max(n.v[0],n.v[1]);else return n.isError()?n.v:ot;return r===t?r+1:[Array(t-r+1).fill(null).map((i,a)=>a+r+1)]}return this.item&&(e=this.item.getPosition().col),e!==Number.MAX_VALUE?e+1:ot}function Xk(n){if(!n)return ot;let e=this.getInstance(n);if(n.isCellRef()){let t=yc(n.v);return t.to.col-t.from.col+1}return n.isRowRef()?e.countCols():n.isColRef()?Math.min(Math.abs(n.v[1]-n.v[0])+1,e.countCols()):n.isArray()?Array.isArray(n.v[0])?n.v[0].length:n.v.length:n.isError()?n.v:1}function dp(n,e,t){return n=Fe(n),xt(n,e=Fe(e),t=Fe(t))?Xe:(t=Math.floor(t),n<=0||n>=1||e<=0||t<1?ot:$n.normalci(1,n,e,t)[1]-1)}function Jk(n,e){return Gi(n,e)}function Xv(){let n=xn(arguments),e=n.length,t=0;for(;e--;)typeof n[e]=="number"&&++t;return t}function Jv(){let n=xn(arguments),e=0;for(let t=0;t<n.length;t++)n[t]!==null&&e++;return e}function fp(n,e){let t=0;for(let r=0;r<n.length;r++)n[r]===e&&t++;return t}function Zk(n){let e=xn(n),t=0;for(let r=0;r<e.length;r++){let i=e[r];(i===null||i==="")&&t++}return t}function z0(){return lp(xn(arguments),!0)[0].length}function Sd(n){if(!Array.isArray(n))return 0;let e=0;for(let t=0;t<n.length;t++)e+=Array.isArray(n[t])?Sd(n[t]):1;return e}function gp(n,e){if(Sd(n)!==Sd(e))return It;[n,e]=sC(n,e);let t=Math.min(n.length,e.length);if(t===0)return gr;let r=$n.mean(n),i=$n.mean(e),a=0;for(let g=0;g<t;g++)a+=(n[g]-r)*(e[g]-i);return a/t}dp.NORM=dp,dp.T=function(n,e,t){return n=Fe(n),xt(n,e=Fe(e),t=Fe(t))?Xe:(t=Math.floor(t),n<=0||n>=1||e<=0||t<1?ot:t===1?gr:$n.tci(1,n,e,t)[1]-1)};let W0={P:gp,S:function(n,e){return Sd(n)!==Sd(e)?It:([n,e]=sC(n,e),n.length<=1||e.length<=1?gr:$n.covariance(n,e))}},U0=gp;function G0(){let n=lo(arguments),e=$n.mean(n),t=0;for(let r=0;r<n.length;r++)t+=Math.pow(n[r]-e,2);return t}let pp={};pp.DIST=function(n,e,t){return xt(n=Fe(n),e=Fe(e))?Xe:n<0||e<=0?ot:t?$n.exponential.cdf(n,e):$n.exponential.pdf(n,e)};let Qk=pp.DIST,fu={};function eR(n,e,t){let r=fu.DIST(n,e,t,!0);return Pi(r)?r:1-r}fu.DIST=function(n,e,t,r){return n=Fe(n),xt(n,e=Fe(e),t=Fe(t))?Xe:(e=Math.floor(e),t=Math.floor(t),n<0||e<1||e>=1e10||t<1||t>=1e10?ot:r?$n.centralF.cdf(n,e,t):$n.centralF.pdf(n,e,t))},fu.DIST.RT=function(n,e,t){return typeof n!="number"||typeof e!="number"||typeof t!="number"?Xe:(e=Math.floor(e),t=Math.floor(t),n<0||e<1||t<1?ot:1-$n.centralF.cdf(n,e,t))},fu.INV=function(n,e,t){return n=Fe(n),xt(n,e=Fe(e),t=Fe(t))?Xe:(e=Math.floor(e),t=Math.floor(t),n<0||n>=1||e<1||t<1?ot:$n.centralF.inv(n,e,t))},fu.INV.RT=function(n,e,t){return arguments.length!=3?It:(n=Fe(n),xt(n,e=Fe(e),t=Fe(t))?Xe:(e=Math.floor(e),t=Math.floor(t),n<=0||n>1||e<1||e>=1e10||t<1||t>=1e10?ot:$n.centralF.inv(1-n,e,t)))};let mp=fu.INV.RT;fu.TEST=function(n,e){let t,r,i;if(n===void 0||e===void 0||(n=lo(n),e=lo(e),!Array.isArray(n)||!Array.isArray(e)))return It;if(n.length<2||e.length<2)return gr;let a=function(K){let Q=0;for(let oe=0;oe<K.length;oe++)Q+=K[oe]*K[oe];return Q},g=Ff(n),R=Ff(e),L=(a(n)-g*g/n.length)/(n.length-1),W=(a(e)-R*R/e.length)/(e.length-1);return L<1e-15||W<1e-15?gr:(L>W?(t=L/W,r=n.length-1,i=e.length-1):(t=W/L,r=e.length-1,i=n.length-1),2*fu.DIST.RT(t,r,i))};let vp=fu.TEST;function tR(n){return mr(n=Fe(n))?n:n<=-1||n>=1?ot:Math.log((1+n)/(1-n))/2}function nR(n){if(mr(n=Fe(n)))return n;let e=Math.exp(2*n);return(e-1)/(e+1)}function yp(n,e,t){if(n=Fe(n),xt(n,e=Ui(xn(e)),t=Ui(xn(t))))return Xe;if(e.length!==t.length)return It;if($n.variance(t)===0)return gr;let r=$n.mean(t),i=$n.mean(e),a=t.length,g=0,R=0;for(let W=0;W<a;W++)g+=(t[W]-r)*(e[W]-i),R+=Math.pow(t[W]-r,2);let L=g/R;return i-L*r+L*n}function j0(n,e){if(xt(n=Ui(xn(n)),e=Ui(xn(e))))return Xe;let t=n.length,r=e.length,i=[];for(let a=0;a<=r;a++){i[a]=0;for(let g=0;g<t;g++)a===0?n[g]<=e[0]&&(i[0]+=1):a<r?n[g]>e[a-1]&&n[g]<=e[a]&&(i[a]+=1):a===r&&n[g]>e[r-1]&&(i[r]+=1)}return i}function Bf(n){return mr(n=Fe(n))?n:n===0||parseInt(n,10)===n&&n<0?ot:$n.gammafn(n)}Bf.DIST=function(n,e,t,r){return arguments.length!=4?It:n<0||e<=0||t<=0?ot:typeof n!="number"||typeof e!="number"||typeof t!="number"?Xe:r?$n.gamma.cdf(n,e,t,!0):$n.gamma.pdf(n,e,t,!1)},Bf.INV=function(n,e,t){return arguments.length!=3?It:n<0||n>=1||e<=0||t<=0?ot:typeof n!="number"||typeof e!="number"||typeof t!="number"?Xe:$n.gamma.inv(n,e,t)};let rR=Bf.DIST,iR=Bf.INV;function q0(n){return mr(n=Fe(n))?n:n<=0?ot:$n.gammaln(n)}function oR(n){return mr(n=Fe(n))?n:$n.normal.cdf(n,0,1)-.5}function aR(){if(arguments.length<1)return It;let n=lo(arguments);for(let e=0;e<n.length;e++)if(n[e]<=0)return ot;return $n.geomean(n)}function sR(n,e,t,r){let i,a,g;if(mr(n=Ui(n=xn(n))))return n;if(e===void 0)for(i=1,e=[];i<=n.length;i++)e.push(i);else e=xn(e);if(t===void 0)for(i=1,t=[];i<=n.length;i++)t.push(i);else t=xn(t);if(xt(e=Ui(e),t=Ui(t)))return Xe;r===void 0&&(r=!0);let R=n.length,L=0,W=0,K=0,Q=0;for(i=0;i<R;i++){let se=e[i],he=Math.log(n[i]);L+=se,W+=he,K+=se*he,Q+=se*se}L/=R,W/=R,K/=R,Q/=R,r?(a=(K-L*W)/(Q-L*L),g=W-a*L):(a=K/Q,g=0);let oe=[];for(i=0;i<t.length;i++)oe.push(Math.exp(g+a*t[i]));return oe}function lR(){if(arguments.length<1)return It;let n=lo(arguments),e=n.length,t=0;for(let r=0;r<e;r++){if(n[r]<=0)return ot;t+=1/n[r]}return e/t}q0.PRECISE=function(n){return arguments.length!=1?It:n<=0?ot:typeof n!="number"?Xe:$n.gammaln(n)};let Zv={};function uR(n,e,t,r){return Zv.DIST(n,e,t,r,!1)}function hR(n,e){return xt(n=Ui(xn(n)),e=Ui(xn(e)))?Xe:n.length!==e.length?It:yp(0,n,e)}function cR(){let n=lo(arguments),e=$n.mean(n),t=n.length,r=0;for(let a=0;a<t;a++)r+=Math.pow(n[a]-e,4);let i=$n.stdev(n,!0);return i<1e-15||t<4?gr:t*(t+1)/((t-1)*(t-2)*(t-3))*(r/=Math.pow(i,4))-3*(t-1)*(t-1)/((t-2)*(t-3))}function gl(n,e){return n=lo(n),e=Math.ceil(e=Fe(e)),n.length===0||e<=0||e>n.length?ot:xt(n,e)?n:n.sort(function(t,r){return r-t})[e-1]}function Qv(n,e){let t;if(n=Ui(xn(n)),e===void 0)for(t=0,e=[];t<n.length;t++)e[t]=t+1;else e=Ui(xn(e));if(xt(n,e=Ui(xn(e))))return Xe;let r=$n.mean(n),i=$n.mean(e),a=e.length,g=0,R=0;for(t=0;t<a;t++)g+=(e[t]-i)*(n[t]-r),R+=Math.pow(e[t]-i,2);let L=g/R;return[L,r-L*i]}function dR(n,e){let t;if(n=Ui(xn(n)),e===void 0)for(t=0,e=[];t<n.length;t++)e[t]=t+1;else e=Ui(xn(e));if(xt(n,e))return Xe;for(t=0;t<n.length;t++)n[t]=Math.log(n[t]);let r=Qv(n,e);return r[0]=Math.round(1e6*Math.exp(r[0]))/1e6,r[1]=Math.round(1e6*Math.exp(r[1]))/1e6,r}Zv.DIST=function(n,e,t,r,i){if(n=Fe(n),e=Fe(e),xt(n,e,t=Fe(t),r=Fe(r)))return Xe;if(n=Math.floor(n),e=Math.floor(e),t=Math.floor(t),r=Math.floor(r),n<0||n>Math.min(e,t)||n<e-r+t||e<=0||e>r||t<0||t>r||r<=0)return ot;function a(g,R,L,W){return L<g||W-L<R-g||W<R?0:Ec(L,g)*Ec(W-L,R-g)/Ec(W,R)}return i?function(g,R,L,W){let K=0;for(let Q=0;Q<=g;Q++)K+=a(Q,R,L,W);return K}(n,e,t,r):a(n,e,t,r)};let Vl={};function Tr(n,e,t){return Vl.DIST(n,e,t,!0)}Vl.DIST=function(n,e,t,r){return n=Fe(n),xt(n,e=Fe(e),t=Fe(t))?Xe:n<=0||t<=0?ot:r?$n.lognormal.cdf(n,e,t):$n.lognormal.pdf(n,e,t)},Vl.INV=function(n,e,t){return n=Fe(n),xt(n,e=Fe(e),t=Fe(t))?Xe:n<=0||n>=1||t<=0?ot:$n.lognormal.inv(n,e,t)};let fR=Vl.INV;function Aa(){if(arguments.length<1)return It;let n=lo(arguments);return n.length===0?0:du(n)}function _o(){if(arguments.length<1)return It;let n=If(xn(arguments));return n.length===0?0:du(n)}function Y0(){if(arguments.length<1)return It;let n=If(xn(arguments));return $n.median(n)}function gu(){if(arguments.length<1)return It;let n=lo(arguments);return n.length===0?0:up(n)}function gR(){if(arguments.length<1)return It;let n=If(xn(arguments));return n.length===0?0:up(n)}function Id(){let n=xn(arguments),e=Id.MULT(n);return e instanceof Error?e:e.sort(function(t,r){return t-r})[0]}Id.MULT=function(){let n,e=lo(arguments);if(e instanceof Error)return e;let t=e.length,r={},i=[],a=0;for(let g=0;g<t;g++)r[n=e[g]]=r[n]?r[n]+1:1,r[n]>a&&(a=r[n],i=[]),r[n]===a&&(i[i.length]=n);return a<=1?It:i},Id.SNGL=Id;let ey={};function pR(n,e,t){return ey.DIST(n,e,t,!1)}function K0(n,e,t,r){return n=Fe(n),xt(n,e=Fe(e),t=Fe(t))?Xe:t<=0?ot:r?$n.normal.cdf(n,e,t):$n.normal.pdf(n,e,t)}function wp(n,e,t){return n=Fe(n),xt(n,e=Fe(e),t=Fe(t))?Xe:n<=0||n>=1||t<=0?ot:$n.normal.inv(n,e,t)}ey.DIST=function(n,e,t,r){return n=Fe(n),xt(n,e=Fe(e),t=Fe(t))?Xe:(n=Math.floor(n),e=Math.floor(e),t<0||t>1||n<0||e<1?ot:r?$n.negbin.cdf(n,e,t):$n.negbin.pdf(n,e,t))};let bp={};function ju(n){return bp.DIST(n,!0)}function ty(n){return mr(n=Fe(n))?Xe:n<=0||n>=1?ot:$n.normal.inv(n,0,1)}bp.DIST=function(n,e){return mr(n=Fe(n))?Xe:e?$n.normal.cdf(n,0,1):$n.normal.pdf(n,0,1)},bp.INV=ty;let Lf={DIST:K0,INV:wp,S:bp};function Gi(n,e){if(e=xn(e),n=xn(n),e.length===0||n.length===0||e.length!==n.length)return It;let t=0,r=0,i=0,a=0,g=0,R=0;for(let Q=0;Q<n.length;Q++){let oe=Fe(e[Q]),se=Fe(n[Q]);xt(oe,se)||(t++,r+=oe*oe,i+=se*se,a+=oe*se,g+=oe,R+=se)}let L=a-g*R/t,W=r-Math.pow(g/t,2)*t,K=i-Math.pow(R/t,2)*t;return t===0||W<1e-15||K<1e-15?gr:L/Math.sqrt(W*K)}function ao(n,e){if(xt(e=Fe(e)))return Xe;if((n=lo(n)).length===0||e<0||e>1)return ot;let t=(n=n.sort(function(a,g){return a-g})).length;if(t===1)return n[0];let r=e*(t-1),i=Math.floor(r);return Hu(r===i?n[r]:n[i]+(r-i)*(n[i+1]-n[i]))}let Rh=ao;function X0(n,e,t){if(t=t===void 0?3:t,n=(n=xn(n||[])).filter(function(K){return!xt(Fe(K))}),xt(n,e=Fe(e),t=Fe(t)))return Xe;if((t=Math.floor(t))<1||n.length===0)return ot;if(e<(n=n.sort(function(K,Q){return K-Q}))[0]||e>n[n.length-1])return It;let r=lp(n,!0)[0],i=n.length,a=r.length,g=Math.pow(10,t),R=0,L=!1,W=0;if(i===1)return 1;for(;!L&&W<a;)e===r[W]?(R=n.indexOf(r[W])/(i-1),L=!0):e>=r[W]&&(e<r[W+1]||W===a-1)&&(R=(n.indexOf(r[W])+(e-r[W])/(r[W+1]-r[W]))/(i-1),L=!0),W++;return Math.floor(R*g)/g}Rh.EXC=function(n,e){if(xt(n=lo(n),e=Fe(e)))return Xe;let t=(n=n.sort(function(a,g){return a-g})).length;if(t===1)return n[0];if(e<1/(t+1)||e>1-1/(t+1))return ot;let r=e*(t+1)-1,i=Math.floor(r);return Hu(r===i?n[r]:n[i]+(r-i)*(n[i+1]-n[i]))},Rh.INC=ao;let ny=X0;function mR(n,e){return xt(n=Fe(n),e=Fe(e))?Xe:(n=Math.floor(n),e=Math.floor(e),n<=0||e<0||n<e?ot:Eh(n)/Eh(n-e))}function vR(n,e){return xt(n=Fe(n),e=Fe(e))?Xe:n<0||e<0?ot:Math.pow(n,e)}function yR(n){return mr(n=Fe(n))?Xe:Math.exp(-.5*n*n)/2.5066282746310002}function ry(n,e,t){return xt(n=Fe(n),e=Fe(e))?Xe:(n=Math.floor(n))<0||e<0?ot:t?$n.poisson.cdf(n,e):$n.poisson.pdf(n,e)}function J0(n,e,t,r){if(r=r===void 0?t:r,n=xn(n||[]),e=xn(e||[]),xt(t=Fe(t),r=Fe(r)))return Xe;if(n.length===0||e.length===0||n.length!==e.length)return It;let i=0,a=0;for(let g=0;g<n.length;g++){let R=Fe(n[g]),L=Fe(e[g]);if(!xt(R,L)){if(L<=0||L>1)return ot;i+=L,R<=r&&R>=t&&(a+=L)}}return i===0?gr:Math.abs(i-1)>1e-15?ot:a}function xd(n,e){return xt(n=lo(n),e=Fe(e))?Xe:n.length===0||(e=Math.floor(e))<0||e>4?ot:Rh.INC(n,.25*e)}ny.EXC=function(n,e,t){if(t=t===void 0?3:t,n=(n=xn(n||[])).filter(function(K){return!xt(Fe(K))}),xt(n,e=Fe(e),t=Fe(t)))return Xe;if((t=Math.floor(t))<1||n.length===0)return ot;if(e<(n=n.sort(function(K,Q){return K-Q}))[0]||e>n[n.length-1])return It;let r=lp(n,!0)[0],i=n.length,a=r.length,g=Math.pow(10,t),R=0,L=!1,W=0;if(i===1)return 1;for(;!L&&W<a;)e===r[W]?(R=(n.indexOf(r[W])+1)/(i+1),L=!0):e>=r[W]&&(e<r[W+1]||W===a-1)&&(R=(n.indexOf(r[W])+1+(e-r[W])/(r[W+1]-r[W]))/(i+1),L=!0),W++;return Math.floor(R*g)/g},ny.INC=X0,ry.DIST=ry;let xc=xd;function Cp(n,e,t){if(xt(n=Fe(n),e=lo(e)))return Xe;let r=(t=t||!1)?function(a,g){return a-g}:function(a,g){return g-a},i=(e=e.sort(r)).indexOf(n);return i===-1?It:i+1}function Z0(n){let e=Number.MAX_VALUE;if(n){let t=0,r=this.getInstance(n).countRows()-1;if(n.isCellRef())n.v.forEach(function(i){r=Math.min(r,i.row),t=Math.max(t,i.row)});else if(n.isRowRef())r=Math.min(n.v[0],n.v[1]),t=Math.max(n.v[0],n.v[1]);else if(n.isColRef())r=0,t=this.getInstance(n).countRows()-1;else return n.isError()?n.v:ot;return r===t?r+1:Array(t-r+1).fill(null).map((i,a)=>[a+r+1])}return this.item&&(e=this.item.getPosition().row),e!==Number.MAX_VALUE?e+1:ot}function _p(n){if(!n)return ot;let e=this.getInstance(n);if(n.isCellRef()){let t=yc(n.v);return t.to.row-t.from.row+1}return n.isRowRef()?Math.min(Math.abs(n.v[1]-n.v[0])+1,e.countRows()):n.isColRef()?e.countRows():n.isArray()?n.v.length:n.isError()?n.v:1}function js(n,e){let t=Gi(n,e);return Pi(t)?t:t*t}function Tc(){let n=lo(arguments);if(n.length<3)return gr;let e=$n.mean(n),t=n.length,r=0;for(let a=0;a<t;a++)r+=Math.pow(n[a]-e,3);let i=$n.stdev(n,!0);return i<1e-15?gr:t*r/((t-1)*(t-2)*Math.pow(i,3))}function wR(n,e){if(n=xn(n),e=xn(e),n.length===0||e.length===0||n.length!==e.length)return It;let t=0,r=0,i=0,a=0,g=0;for(let W=0;W<e.length;W++){let K=Fe(n[W]),Q=Fe(e[W]);xt(K,Q)||(t++,r+=Q*Q,i+=K*Q,a+=K,g+=Q)}let R=i-a*g/t,L=r-g*g/t;return t===0||L<1e-15?gr:R/L}function Q0(n,e){return n=lo(n),e=Math.floor(e=Fe(e)),n.length===0||e<=0||e>n.length?ot:n.sort(function(t,r){return t-r})[e-1]}function bR(n,e,t){return n=Fe(n),xt(n,e=Fe(e),t=Fe(t))?Xe:t<=1e-15?ot:(n-e)/t}function iy(){if(arguments.length<1)return It;let n=Sp.apply(this,arguments);return n instanceof Error?n:Math.sqrt(n)}function eC(){if(arguments.length<1)return It;let n=Td.apply(this,arguments);return n instanceof Error?n:Math.sqrt(n)}xc.INC=xd,xc.EXC=function(n,e){return xt(n=lo(n),e=Fe(e))?Xe:n.length===0||(e=Math.floor(e))<=0||e>=4?ot:Rh.EXC(n,.25*e)},Cp.EQ=Cp,Cp.AVG=function(n,e,t){if(xt(n=Fe(n),e=lo(e)))return Xe;e=xn(e);let r=(t=t||!1)?function(g,R){return g-R}:function(g,R){return R-g},i=(e=e.sort(r)).length,a=0;for(let g=0;g<i;g++)e[g]===n&&a++;return a===0?It:a>1?(2*e.indexOf(n)+a+1)/2:e.indexOf(n)+1},Tc.P=function(){let n=lo(arguments);if(n.length<3)return gr;let e=$n.mean(n),t=n.length,r=0,i=0;for(let a=0;a<t;a++)i+=Math.pow(n[a]-e,3),r+=Math.pow(n[a]-e,2);return i/=t,(r/=t)<1e-15?gr:i/Math.pow(r,1.5)};let qu=iy;function Yu(){if(arguments.length<1)return It;let n=iC.apply(this,arguments);return n instanceof Error?n:Math.sqrt(n)}function Br(){if(arguments.length<1)return It;let n=oC.apply(this,arguments);return n instanceof Error?n:Math.sqrt(n)}function tC(n,e){if(n=xn(n),e=xn(e),n.length===0||e.length===0||n.length!==e.length)return It;let t=0,r=0,i=0,a=0,g=0,R=0;for(let Q=0;Q<e.length;Q++){let oe=Fe(n[Q]),se=Fe(e[Q]);xt(oe,se)||(t++,r+=oe*oe,i+=se*se,a+=oe*se,g+=oe,R+=se)}let L=r-Math.pow(g,2)/t,W=i-Math.pow(R,2)/t,K=a-g*R/t;return t<3||W<1e-15?gr:Math.sqrt((L-Math.pow(K,2)/W)/(t-2))}qu.S=iy,qu.P=eC;let so=l0;function nC(n,e,t){return xt(n=Fe(n),e=Fe(e))?Xe:t!==1&&t!==2?ot:t===1?so.DIST.RT(n,e):so.DIST["2T"](n,e)}function CR(n,e){return so.INV["2T"](n,e)}function wi(n,e,t,r){let i,a,g;if(t=Fe(t),r=Fe(r),xt(n=Ui(xn(n)),e=Ui(xn(e)),t,r))return Xe;if(n.length<=1||e.length<=1)return gr;if(t=Math.floor(t),r=Math.floor(r),t<1||t>2||r<1||r>3)return ot;if(r===1&&n.length!==e.length)return It;let R=0,L=0,W=0,K=0;if(r===2){for(i=0;i<n.length;i++)L+=n[i],R+=Math.pow(n[i],2);for(i=0;i<e.length;i++)K+=e[i],W+=Math.pow(e[i],2);R=(R-L*L/n.length)/(n.length-1),W=(W-K*K/e.length)/(e.length-1),a=Math.abs(L/n.length-K/e.length)/Math.sqrt((n.length-1)*R+(e.length-1)*W)*Math.sqrt(n.length*e.length*(n.length+e.length-2)/(n.length+e.length)),g=n.length+e.length-2}else if(r===3){for(i=0;i<n.length;i++)L+=n[i],R+=Math.pow(n[i],2);for(i=0;i<e.length;i++)K+=e[i],W+=Math.pow(e[i],2);R=(R-L*L/n.length)/(n.length-1)/n.length,W=(W-K*K/e.length)/(e.length-1)/e.length,a=Math.abs(L/n.length-K/e.length)/Math.sqrt(R+W);let Q=R/(R+W);g=1/(Q*Q/(n.length-1)+(1-Q)*(1-Q)/(e.length-1))}else{for(i=0;i<n.length;i++)L+=n[i],K+=e[i],R+=Math.pow(n[i]-e[i],2);a=Math.sqrt(n.length-1)*Math.abs(L-K)/Math.sqrt(n.length*R-Math.pow(L-K,2)),g=n.length-1}return t===1?so.DIST.RT(a,g):so.DIST["2T"](a,g)}function _R(n,e,t){let r;if(n=Ui(xn(n)),e===void 0)for(r=0,e=[];r<n.length;r++)e[r]=r+1;else e=Ui(xn(e));if(t===void 0)for(r=0,t=[];r<n.length;r++)t[r]=r+1;else t=Ui(xn(t));if(xt(n,e,t))return Xe;let i=Qv(n,e),a=i[0],g=i[1],R=[];return t.forEach(function(L){R.push(a*L+g)}),R}function rC(n,e){if(xt(n=lo(n),e=Fe(e)))return Xe;if(e<0||e>=1)return ot;if(n.length===0)return gr;let t=kd(n.length*e,2)/2,r=n.sort((i,a)=>i-a);return $n.mean(r.slice(t,r.length-t))}function Td(){if(arguments.length<1)return It;let n=lo(arguments),e=n.length;if(e<=0)return gr;let t=0,r=Ic(n);for(let i=0;i<e;i++)t+=Math.pow(n[i]-r,2);return t/e}function Sp(){if(arguments.length<1)return It;let n=lo(arguments),e=n.length;if(e<=1)return gr;let t=0,r=Ic(n);for(let i=0;i<e;i++)t+=Math.pow(n[i]-r,2);return t/(e-1)}function iC(){if(arguments.length<1)return It;let n=xn(arguments),e=n.length,t=0,r=0,i=hp(n);for(let a=0;a<e;a++){let g=n[a];typeof g=="number"?t+=Math.pow(g-i,2):g===!0?t+=Math.pow(1-i,2):t+=Math.pow(0-i,2),g!==null&&r++}return r<=1?gr:t/(r-1)}so.DIST=function(n,e,t){return xt(n=Fe(n),e=Fe(e))?Xe:e<1?ot:t?$n.studentt.cdf(n,e):$n.studentt.pdf(n,e)},so.DIST["2T"]=function(n,e){return arguments.length!=2?It:n<0||e<1?ot:typeof n!="number"||typeof e!="number"?Xe:(1-$n.studentt.cdf(n,e))*2},so.DIST.RT=function(n,e){return arguments.length!=2?It:n<0||e<1?ot:typeof n!="number"||typeof e!="number"?Xe:1-$n.studentt.cdf(n,e)},so.INV=function(n,e){return xt(n=Fe(n),e=Fe(e))?Xe:(e=Math.floor(e),n<=0||n>=1||e<1?ot:$n.studentt.inv(n,e))},so.INV["2T"]=function(n,e){return xt(n=Fe(n),e=Fe(e))?Xe:(e=Math.floor(e),n<=0||n>=1||e<1?ot:Math.abs($n.studentt.inv(n/2,e)))},so.TEST=wi;let kc=Sp;function oC(){if(arguments.length<1)return It;let n=xn(arguments),e=n.length,t=0,r=0,i=hp(n);for(let a=0;a<e;a++){let g=n[a];typeof g=="number"?t+=Math.pow(g-i,2):g===!0?t+=Math.pow(1-i,2):t+=Math.pow(0-i,2),g!==null&&r++}return r<=0?gr:t/r}function oy(n,e,t,r){return n=Fe(n),xt(n,e=Fe(e),t=Fe(t))?Xe:n<0||e<=0||t<=0?ot:r?1-Math.exp(-Math.pow(n/t,e)):Math.pow(n,e-1)*Math.exp(-Math.pow(n/t,e))*e/Math.pow(t,e)}function aC(n,e,t){if(xt(n=lo(n),e=Fe(e)))return Xe;if(n.length<=0)return gr;if(t<=0)return ot;if(Pi(t=t??qu.S(n)))return t;if(t<=0)return gr;let r=n.length;return 1-Lf.S.DIST((Ic(n)-e)/(t/Math.sqrt(r)),!0)}kc.S=Sp,kc.P=Td,oy.DIST=oy;let SR={TEST:aC};function sC(n,e){let t=[],r=[];n=xn(n),e=xn(e);for(let i=0;i<n.length;i++){let a=Fe(n[i]),g=Fe(e[i]);mr(a)||mr(g)||(t.push(a),r.push(g))}return[t,r]}function lo(n){n=xn(n);let e=[];if(!n)return e;for(let t=0,r=n.length;t<r;t++){let i=n[t];if(typeof i=="number")e.push(i);else if(typeof i=="string"){let a=Fe(i);mr(a)||e.push(a)}}return e}function IR(n){return mr(n=Fe(n))?n:Math.abs(Fe(n))}function xR(n){return mr(n=Fe(n))?n:n<-1||n>1?ot:Math.acos(n)}function TR(n){return mr(n=Fe(n))?n:n<1?ot:Math.log(n+Math.sqrt(n*n-1))}function kR(n){return mr(n=Fe(n))?n:Math.atan(1/n)}function ay(n){return mr(n=Fe(n))?n:n<-1||n>1?.5*Math.log((n+1)/(n-1)):ot}function RR(n,e,t,r){if(n=Fe(n),e=Fe(n),xt(n,e))return Xe;switch(n){case 1:return Ic(t);case 2:return Xv(t);case 3:return Jv(t);case 4:return Aa(t);case 5:return gu(t);case 6:return uy(t);case 7:return qu.S(t);case 8:return qu.P(t);case 9:return Ff(t);case 10:return kc.S(t);case 11:return kc.P(t);case 12:return Y0(t);case 13:return Id.SNGL(t);case 14:return gl(t,r);case 15:return Q0(t,r);case 16:return Rh.INC(t,r);case 17:return xc.INC(t,r);case 18:return Rh.EXC(t,r);case 19:return xc.EXC(t,r)}}function sy(n){if(n=n.toUpperCase(),!/^M*(?:D?C{0,3}|C[MD])(?:L?X{0,3}|X[CL])(?:V?I{0,3}|I[XV])$/.test(n))return Xe;let e=0;return n.replace(/[MDLV]|C[MD]?|X[CL]?|I[XV]?/g,function(t){e+={M:1e3,CM:900,D:500,CD:400,C:100,XC:90,L:50,XL:40,X:10,IX:9,V:5,IV:4,I:1}[t]}),e}function ER(n){return(n=Fe(n))instanceof Error?n:n>1||n<-1?ot:Math.asin(n)}function AR(n){return(n=Fe(n))instanceof Error?n:Math.log(n+Math.sqrt(n*n+1))}function MR(n){return(n=Fe(n))instanceof Error?n:Math.atan(n)}function ia(n,e){return xt(n=Fe(n),e=Fe(e))?Xe:n===0&&e===0?gr:Math.atan2(e,n)}function Rs(n){return(n=Fe(n))instanceof Error?n:n>=1||n<=-1?ot:Math.log((1+n)/(1-n))/2}function DR(n,e,t){if(t=t||0,n=Fe(n),xt(n,e=Fe(e),t=Fe(t)))return Xe;if(t=t===void 0?0:t,n<0||e<2||e>36||t<0)return ot;let r=n.toString(e);return Array(Math.max(t+1-r.length,0)).join("0")+r}function ly(n,e){let t=Math.sign(n),r=(n=Math.abs(n))/e,i=Math.floor(r),a=5*Math.pow(10,Math.floor(Math.log10(Math.abs(r)))-15);return r-i>a&&(i+=1),t*i*e}function Rc(n,e){return xt(n=Fe(n),e=Fe(e))?Xe:Rc.MATH(n,e,+(e<0))}function Ec(n,e){return xt(n=Fe(n),e=Fe(e))?Xe:n<0||e<0||e>n?ot:Eh(n)/(Eh(e)*Eh(n-e))}function OR(n,e){return xt(n=Fe(n),e=Fe(e))?Xe:n===0&&e===0?1:Ec(n+e-1,n-1)}function NR(n){return(n=Fe(n))instanceof Error?n:Math.cos(n)}function PR(n){return(n=Fe(n))instanceof Error?n:(Math.exp(n)+Math.exp(-n))/2}function lC(n){return(n=Fe(n))instanceof Error?n:1/Math.tan(n)}function BR(n){if((n=Fe(n))instanceof Error)return n;if(n>15)return 1;let e=Math.exp(2*n);return(e+1)/(e-1)}function LR(n){return(n=Fe(n))instanceof Error?n:1/Math.sin(n)}function FR(n){return(n=Fe(n))instanceof Error?n:2/(Math.exp(n)-Math.exp(-n))}function uC(n,e){if(arguments.length<1)return Xe;(n===void 0||n==="")&&(n="0");let t=parseInt(n,e);return Number.isNaN(t)?ot:t}function hC(n){return(n=Fe(n))instanceof Error?n:180*n/Math.PI}function VR(n){return(n=Fe(n))instanceof Error?n:Rc(n,-2)}Rc.MATH=function(n,e,t){return n=Fe(n),xt(n,t=t===void 0?0:Fe(t),e=e===void 0?1:Fe(Math.abs(e)))?Xe:e===0||n===0?0:n<0&&t===0?Ku(n,e):ly(n,e)},Rc.PRECISE=function(n,e){return Rc.MATH(n,e,0)};let HR=Math.exp,Ip=[1,1];function Eh(n){let e;if((n=Fe(n))instanceof Error)return n;let t=Math.floor(n);if(t<0)return ot;for(let r=Ip.length;r<=t;r++){if(!isFinite(e=Ip[r-1]*r))return It;Ip[r]=e}return Ip[t]}function Ku(n,e){let t=Math.sign(n),r=(n=Math.abs(n))/e,i=5*Math.pow(10,Math.floor(Math.log10(Math.abs(r)))-15);return t*Math.floor(r+i)*e}function kd(n,e){return xt(n=Fe(n),e=Fe(e))?Xe:0>e&&0<n?ot:kd.MATH(n,e,+(e<0))}function $R(){if(arguments.length<1)return It;let n=gv(arguments);if(n instanceof Error)return n;if(n.length===0||n.every(i=>i===0))return 0;let e=n.length,t=n[0],r=t<0?-t:t;for(let i=1;i<e;i++){let a=n[i],g=a<0?-a:a;for(;r&&g;)r>g?r%=g:g%=r;r+=g}return r}function zR(n){return(n=Fe(n))instanceof Error?n:Math.floor(n)}kd.MATH=function(n,e,t){return n=Fe(n),xt(n,e=e===void 0?1:Fe(Math.abs(e)),t=t===void 0?0:Fe(t))?Xe:e===0||n===0?0:n<0&&t===0?ly(n,e):Ku(n,e)},kd.PRECISE=function(n,e){return kd.MATH(n,e,0)};let WR={CEILING:function(n,e){return Rc.MATH(n,e)}};function UR(){if(arguments.length<1)return It;let n=gv(arguments);if(n instanceof Error)return n;if(n.length===0||n.includes(0))return 0;for(var e,t,r,i,a=1;(r=n.pop())!==void 0;)for(;r>1;){if(r%2){for(e=3,t=Math.floor(Math.sqrt(r));e<=t&&r%e;e+=2);i=e<=t?e:r}else i=2;for(r/=i,a*=i,e=n.length;e;n[--e]%i==0&&(n[e]/=i)==1&&n.splice(e,1));}return a}function cC(n){return(n=Fe(n))instanceof Error?n:n<=0?ot:Math.log(n)}function dC(n,e){return xt(n=Fe(n),e=e===void 0?10:Fe(e))?Xe:n<=0||e<=0?ot:Math.log(n)/Math.log(e)}function GR(n){return(n=Fe(n))instanceof Error?n:n<=0?ot:Math.log(n)/Math.log(10)}function jR(n,e){return xt(n=Fe(n),e=Fe(e))?Xe:e===0?gr:n-e*Math.floor(n/e)}function qR(n,e){if(xt(n=Fe(n),e=Fe(e)))return Xe;if(n*e<0)return ot;let t=n+e/2,r=Math.sign(t),i=Math.pow(10,Math.floor(Math.log10(Math.abs(t)))-15+1),a=.5*r*i,g=(t+a)/i,R=(g=g/Math.abs(g)*Math.floor(Math.abs(g)))*i/e;return a=R/Math.abs(R)*5*Math.pow(10,Math.floor(Math.log10(Math.abs(R)))-15),R+=a,(R|=R)*e}function YR(){if(arguments.length<1)return It;let n=gv(arguments);if(n instanceof Error)return n;if(n.length===0||n.every(r=>r===0))return 1;let e=0,t=1;for(let r=0;r<n.length;r++)e+=n[r],t*=Eh(n[r]);return Eh(e)/t}function KR(n){if((n=Fe(n))instanceof Error)return n;let e=Math.ceil(Math.abs(n));return e=1&e?e:e+1,n>=0?e:-e}function XR(){return arguments.length!=0?It:Math.PI}function fC(n,e){if(arguments.length!=2)return It;if(e??=0,typeof(n??=0)!="number"||typeof e!="number")return Xe;if(n===0&&e===0)return ot;if(n===0&&e<0)return gr;let t=Math.pow(n,e);return isNaN(t)?ot:t}function uy(){let n=xn(arguments),e=!1,t=1;for(let r=0;r<n.length;r++)typeof n[r]=="number"&&(e=!0,t*=n[r]);return e?t:0}function JR(n,e){return xt(n=Fe(n),e=Fe(e))?Xe:e===0?gr:parseInt(n/e,10)}function ZR(n){return(n=Fe(n))instanceof Error?n:n*Math.PI/180}function hy(){return globalThis.crypto.getRandomValues(new Uint32Array(1))[0]/4294967296}function QR(){return arguments.length>0?It:hy()}function eE(n,e,t,r,i){if(n=Fe(n??1),e=Fe(e??1),t=Fe(t??0),r=Fe(r??1),i=Ii(i??!1),xt(n,e,t,r,i)||t>r||n<1||e<1||i&&(!Number.isInteger(t)||!Number.isInteger(r)))return Xe;let a=i?()=>Math.floor(hy()*(r-t+1)+t):()=>hy()*(r-t)+t;return Array.from({length:n},()=>Array.from({length:e},a))}function tE(n,e){return xt(n=Fe(n),e=Fe(e))?Xe:n+Math.ceil((e-n+1)*Math.random())-1}function nE(n,e){if(xt(n=Fe(n),e=e===void 0||e===!0?0:e===!1?4:Fe(e))||e<0||e>4||0>n||3999<n)return Xe;let t=String(n).split(""),r=["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM","","X","XX","XXX","XL","L","LX","LXX","LXXX","XC","","I","II","III","IV","V","VI","VII","VIII","IX"],i="",a=3;for(;a--;)i=(r[+t.pop()+10*a]||"")+i;let g=Array(+t.join("")+1).join("M")+i;return e>0&&(g=(g=(g=(g=(g=g.replace(/XLV/g,"VL")).replace(/XCV/g,"VC")).replace(/CDL/g,"LD")).replace(/CML/g,"LM")).replace(/CMVC/g,"LMVL")),e===1&&(g=(g=(g=(g=(g=g.replace(/CDXC/g,"LDXL")).replace(/CDVC/g,"LDVL")).replace(/CMXC/g,"LMXL")).replace(/XCIX/g,"VCIV")).replace(/XLIX/g,"VLIV")),e>1&&(g=(g=(g=(g=(g=(g=(g=(g=g.replace(/XLIX/g,"IL")).replace(/XCIX/g,"IC")).replace(/CDXC/g,"XD")).replace(/CDVC/g,"XDV")).replace(/CDIC/g,"XDIX")).replace(/LMVL/g,"XMV")).replace(/CMIC/g,"XMIX")).replace(/CMXC/g,"XM")),e>2&&(g=(g=(g=(g=g.replace(/XDV/g,"VD")).replace(/XDIX/g,"VDIV")).replace(/XMV/g,"VM")).replace(/XMIX/g,"VMIV")),e===4&&(g=(g=g.replace(/VDIV/g,"ID")).replace(/VMIV/g,"IM")),g}function rE(n,e){if(xt(n=Fe(n),e=Fe(e)))return Xe;let t=Math.pow(10,-e),r=Math.sign(n);return Ku(n+=r*t/2,t)}function iE(n,e){return xt(n=Fe(n),e=Fe(e))?Xe:Ku(n,Math.pow(10,-e))}function oE(n,e){return xt(n=Fe(n),e=Fe(e))?Xe:ly(n,Math.pow(10,-e))}function aE(n){return(n=Fe(n))instanceof Error?n:1/Math.cos(n)}function sE(n){return(n=Fe(n))instanceof Error?n:2/(Math.exp(n)+Math.exp(-n))}function lE(n,e,t,r){if(n=Fe(n),e=Fe(e),t=Fe(t),!Ka(r=xn(r)))return r*Math.pow(n,e);let i=r[0]*Math.pow(n,e);for(let a=1;a<r.length;a++)i+=r[a]*Math.pow(n,e+a*t);return i}function uE(n){return(n=Fe(n))instanceof Error?n:n<0?-1:+(n!==0)}function hE(n){return(n=Fe(n))instanceof Error?n:Math.sin(n)}function cE(n){return(n=Fe(n))instanceof Error?n:(Math.exp(n)-Math.exp(-n))/2}function dE(n){return(n=Fe(n))instanceof Error?n:n<0?ot:Math.sqrt(n)}function cy(n){return(n=Fe(n))instanceof Error?n:n<0?ot:Math.sqrt(n*Math.PI)}function gC(n){if((n=Fe(n))instanceof Error)return n;let e=Array.prototype.slice.call(arguments,1);switch(n){case 1:case 101:return Ic(e);case 2:case 102:return Xv(e);case 3:case 103:return Jv(e);case 4:case 104:return Aa(e);case 5:case 105:return gu(e);case 6:case 106:return uy(e);case 7:case 107:return qu.S(e);case 8:case 108:return qu.P(e);case 9:case 109:return Ff(e);case 10:case 110:return kc.S(e);case 11:case 111:return kc.P(e)}return Xe}function pC(n,e){return arguments.length!=2?It:xt(n=Fe(n),e=Fe(e))?Xe:n+e}function fE(n,e){return arguments.length!=2?It:xt(n=Fe(n),e=Fe(e))?Xe:n-e}function gE(n,e){return arguments.length!=2?It:xt(n=Fe(n),e=Fe(e))?Xe:e===0?gr:n/e}function pE(n,e){return arguments.length!=2?It:xt(n=Fe(n),e=Fe(e))?Xe:n*e}function dy(n,e){return arguments.length!=2?It:xt(n=Fe(n),e=Fe(e))?Xe:n>=e}function mE(n,e){return arguments.length!=2?It:xt(n=Fe(n),e=Fe(e))?Xe:n<e}function vE(n,e){return arguments.length!=2?It:xt(n=Fe(n),e=Fe(e))?Xe:n<=e}function yE(n,e){return arguments.length!=2?It:n===e}function Es(n,e){return arguments.length!=2?It:n!==e}function fy(n,e){return arguments.length!=2?It:xt(n=Fe(n),e=Fe(e))?Xe:fC(n,e)}function Ff(){let n=0,e=xn(arguments);for(let t=0;t<e.length;++t)typeof e[t]=="number"&&(n+=e[t]);return n}function wE(){let n,e,t,r,i,a=0,g=!1,R=arguments.length;if(R<1)return Xe;let L=[];for(r=0;r<R;r++)L[r]=ka(arguments[r]);let W=L[0].length,K=L[0][0].length;for(r=0;r<R;r++){if(L[r].length!==W)return Xe;for(e=0;e<W;e++)if(L[r][e].length!==K)return Xe}for(e=0;e<W;e++)for(t=0;t<K;t++){for(r=0,n=1,g=!0;r<R;r++){if(!rr(i=L[r][e][t])){g=!1;break}n*=i}g&&(a+=n)}return a}function bE(){let n=xn(arguments),e=0,t=n.length;for(let r=0;r<t;r++)e+=op(n[r])?n[r]*n[r]:0;return e}function CE(n,e){if(n=xn(n),e=xn(e),n.length!==e.length)return It;let t=0;for(let r=0;r<n.length;r++)rr(n[r])&&rr(e[r])&&(t+=n[r]*n[r]-e[r]*e[r]);return t}function gy(n,e){let t=0;if(n=xn(n),e=xn(e),n.length!==e.length)return It;for(let r=0;r<n.length;r++)rr(n[r])&&rr(e[r])&&(t+=n[r]*n[r]+e[r]*e[r]);return t}function _E(n,e){let t=0;if(n=xn(n),e=xn(e),n.length!==e.length)return It;for(let r=0;r<n.length;r++)rr(n[r])&&rr(e[r])&&(t+=Math.pow(n[r]-e[r],2));return t}function py(n){return(n=Fe(n))instanceof Error?n:Math.tan(n)}function SE(n){if((n=Fe(n))instanceof Error)return n;let e=Math.exp(2*n);return(e-1)/(e+1)}function IE(n,e){return xt(n=Fe(n),e=e===void 0?0:Fe(e))?Xe:(n>0?1:-1)*Math.floor(Math.abs(n)*Math.pow(10,e))/Math.pow(10,e)}function xE(n,e,t,r){return[n,e,t,r]=[n,e,t,r].map(i=>i===void 0?1:Fe(i)),xt(n,e,t,r)?Xe:n<1||e<1?ot:Array.from({length:n},(i,a)=>Array.from({length:e},(g,R)=>(a*e+R)*r+t))}let TE=[void 0,0,1,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,1,2,3,4,5,6,0],mC=[[],[1,2,3,4,5,6,7],[7,1,2,3,4,5,6],[6,0,1,2,3,4,5],[],[],[],[],[],[],[],[7,1,2,3,4,5,6],[6,7,1,2,3,4,5],[5,6,7,1,2,3,4],[4,5,6,7,1,2,3],[3,4,5,6,7,1,2],[2,3,4,5,6,7,1],[1,2,3,4,5,6,7]],vC=[void 0,[1,0,0,0,0,0,1],[1,1,0,0,0,0,0],[0,1,1,0,0,0,0],[0,0,1,1,0,0,0],[0,0,0,1,1,0,0],[0,0,0,0,1,1,0],[0,0,0,0,0,1,1],void 0,void 0,void 0,[1,0,0,0,0,0,0],[0,1,0,0,0,0,0],[0,0,1,0,0,0,0],[0,0,0,1,0,0,0],[0,0,0,0,1,0,0],[0,0,0,0,0,1,0],[0,0,0,0,0,0,1]];function kE(n,e,t){if(n=Fe(n),xt(n,e=Fe(e),t=Fe(t)))return Xe;if(n<=1899&&(n+=1900),n===1900&&e===2&&t===29)return 60;let r=new Date(n,e-1,t),i=Math.floor(di(r));return i<0||r.getFullYear()>=1e4?ot:i}function RE(n){if(typeof n!="string")return Xe;let e=this.getLocale().getDateParser().parse(n);return e===null?Xe:Math.floor(di(e.v))}function my(n){let e=ei(this,n);return mr(e)?Xe:e.getDate()}function vy(n,e){return arguments.length!=2?It:(n=ei(this,n),e=ei(this,e),mr(n)||mr(e)?Xe:Ah(n,e))}function Ah(n,e){return Math.floor(di(n))-Math.floor(di(e))}function EE(n,e,t){let r,i;if(t=t!==void 0&&Ii(t),xt(n=ei(this,n),e=ei(this,e),t))return Xe;let a=n.getMonth(),g=e.getMonth();if(t)r=n.getDate()===31?30:n.getDate(),i=e.getDate()===31?30:e.getDate();else{let R=L=>L.getDate()===new Date(L.getFullYear(),L.getMonth()+1,0).getDate();r=R(n)?30:n.getDate(),i=a===1&&R(n)&&g===1&&R(e)?e.getDate():r===30&&e.getDate()===31?30:e.getDate()}return 360*(e.getFullYear()-n.getFullYear())+30*(g-a)+(i-r)}function AE(n,e){if(mr(n=ei(this,n))||isNaN(e))return Xe;e=parseInt(e,10);let t=new Date(n);return t.setMonth(t.getMonth()+e),t.getDate()!==n.getDate()&&t.setDate(0),di(t)}function ME(n,e){return mr(n=ei(this,n))||isNaN(e)?Xe:(e=parseInt(e,10),di(new Date(n.getFullYear(),n.getMonth()+e+1,0)))}function DE(n){return mr(n=ei(this,n))?Xe:n.getHours()}function OE(n){if(typeof n!="number"&&typeof n!="string")return Xe;let e=Math.floor((n=parseInt(n,10))/94608e4),t=Math.floor((n%=94608e4)/2592e3),r=Math.floor((n%=2592e3)/86400),i=Math.floor((n%=86400)/3600),a=Math.floor((n%=3600)/60),g=n%=60;return"P"+(e=e>0?e+"Y":"")+(t=t>0?t+"M":"")+(r=r>0?r+"D":"")+"T"+(i=i>0?i+"H":"")+(a=a>0?a+"M":"")+(g=g>0?g+"S":"")}function yC(n){if(mr(n=ei(this,n)))return Xe;n.setHours(0,0,0),n.setDate(n.getDate()+4-(n.getDay()||7));let e=new Date(n.getFullYear(),0,1);return Math.ceil((di(n)-di(e)+1)/7)}function NE(n){return mr(n=ei(this,n))?Xe:n.getMinutes()}function PE(n){return mr(n=ei(this,n))?Xe:n.getMonth()+1}function yy(n,e,t){return yy.INTL.call(this,n,e,1,t)}function BE(){return di(new Date)}function LE(n){return mr(n=ei(this,n))?Xe:n.getSeconds()}function FE(n,e,t){return n=Fe(n),xt(n,e=Fe(e),t=Fe(t))?Xe:n<0||e<0||t<0?ot:(3600*n+60*e+t)/86400}function VE(n){let e=ei(this,n);return mr(e)?Xe:(3600*e.getHours()+60*e.getMinutes()+e.getSeconds())/86400}function HE(){return Math.floor(di(new Date))}function $E(n,e){if(mr(n=ei(this,n)))return Xe;e===void 0&&(e=1);let t=n.getDay();return mC[e][t]}function zE(n,e){let t=ei(this,n);if(mr(t))return Xe;if(n=di(t),e===void 0&&(e=1),e===21)return yC(n);let r=TE[e],i=new Date(t.getFullYear(),0,1),a=+(i.getDay()<r);return Math.floor((n-(di(i)-Math.abs(i.getDay()-r)))/7+1)+a}function wy(n,e,t){return wy.INTL.call(this,n,e,1,t)}function wC(n){if(n===void 0)return vC[1];if(rr(n))return vC[n]||ot;if(!zs(n)||n.length!==7)return Xe;let e=n;n=[];for(let t=0;t<7;t++){if(e[t]!=="0"&&e[t]!=="1")return Xe;n[(t+1)%7]=+e[t]}return n}function bC(n,e){return pv(n,(e===void 0?[]:xn([e])).filter(t=>t!==""))}function CC(n,e,t){if(e[n.getDay()]===1)return!1;for(let r=0;r<t.length;r++){let i=t[r];if(i.getDate()===n.getDate()&&i.getMonth()===n.getMonth()&&i.getFullYear()===n.getFullYear())return!1}return!0}function j(n){if(mr(n=ei(this,n)))return Xe;let e=n.getFullYear();return e<1900||e>9999?ot:e}function ee(n){return new Date(n,1,29).getMonth()===1}function ce(n,e){return Math.ceil(di(e)-di(n))}function xe(n,e,t){return n=ei(this,n),e=ei(this,e),mr(n)||mr(e)?Xe:Be(n,e,t)}function Be(n,e,t){t=t||0;let r=n.getDate(),i=n.getMonth()+1,a=n.getFullYear(),g=e.getDate(),R=e.getMonth()+1,L=e.getFullYear();switch(t){case 0:return r===31&&g===31?(r=30,g=30):r===31?r=30:r===30&&g===31&&(g=30),(g+30*R+360*L-(r+30*i+360*a))/360;case 1:var W=365;if(a===L||a+1===L&&(i>R||i===R&&r>=g))return(a===L&&ee(a)||function(oe,se){let he=oe.getFullYear(),me=new Date(he,2,1);if(ee(he)&&oe<me&&se>=me)return!0;let ye=se.getFullYear(),Te=new Date(ye,2,1);return ee(ye)&&se>=Te&&oe<Te}(n,e)||R===1&&g===29)&&(W=366),ce(n,e)/W;var K=L-a+1,Q=(new Date(L+1,0,1)-new Date(a,0,1))/1e3/60/60/24;return ce(n,e)/(Q/K);case 2:return ce(n,e)/360;case 3:return ce(n,e)/365;case 4:return(g+30*R+360*L-(r+30*i+360*a))/360}}function Ue(n,e,t){if(xt(n=ei(this,n),e=ei(this,e))||n>e||!zs(t))return ot;switch(t.toUpperCase()){case"Y":{let r=e.getMonth()-n.getMonth();return e.getFullYear()-n.getFullYear()-+(r<0||r===0&&e.getDate()<n.getDate())}case"M":return(e.getFullYear()-n.getFullYear())*12+e.getMonth()-n.getMonth()-+(e.getDate()<n.getDate());case"D":return Math.floor(di(e)-di(n));case"MD":return e.getDate()>=n.getDate()?e.getDate()-n.getDate():Math.floor(Math.abs(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate())-Date.UTC(n.getFullYear(),n.getMonth()+1,e.getDate()))/864e5);case"YM":{let r=e.getMonth()-n.getMonth(),i=e.getDate()<n.getDate(),a=r;return i&&(a-=1),(r<0||r===0&&i)&&(a+=12),a}case"YD":return Math.abs(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate())-Date.UTC(n.getFullYear()+(e.getMonth()>=n.getMonth()?0:1),e.getMonth(),e.getDate()))/864e5;default:return ot}}function Je(n,e,t,r,i,a,g){return n=ei(this,n),e=ei(this,e),t=ei(this,t),g===void 0&&(g=0),xt(n,e,t)?Xe:r<=0||i<=0||[1,2,4].indexOf(a)===-1||[0,1,2,3,4].indexOf(g)===-1||t<=n?ot:(i=i||0)*r*Be(n,t,g=g||0)}function tt(n,e,t,r,i,a){if(n=Fe(n),xt(n,e=Fe(e),t=Fe(t)))return Xe;if(n<=0||e<=0||t<=0||r<1||i<1||r>i||a!==0&&a!==1)return ot;let g=Ks(n,e,t,0,a),R=0;r===1&&(a<=0&&(R=-t),r++);for(let L=r;L<=i;L++)a>0?R+=tr(n,L-2,g,t,1)-g:R+=tr(n,L-1,g,t,0);return R*n}function ct(n,e,t,r,i,a){if(n=Fe(n),xt(n,e=Fe(e),t=Fe(t)))return Xe;if(n<=0||e<=0||t<=0||r<1||i<1||r>i||a!==0&&a!==1)return ot;let g=Ks(n,e,t,0,a),R=0;r===1&&(R=a===0?g+t*n:g,r++);for(let L=r;L<=i;L++)a>0?R+=g-(tr(n,L-2,g,t,1)-g)*n:R+=g-tr(n,L-1,g,t,0)*n;return R}function $t(n,e,t,r,i){let a;if(n=Fe(n),e=Fe(e),t=Fe(t),xt(n,e,t,r=Fe(r),i=i===void 0?12:Fe(i)))return Xe;if(n<0||e<0||t<0||r<0||[1,2,3,4,5,6,7,8,9,10,11,12].indexOf(i)===-1)return ot;let g=+(i!==12);if(r>t+g)return ot;let R=(1-Math.pow(e/n,1/t)).toFixed(3),L=n*R*i/12,W=L,K=0,Q=r===t+g?r-1:r;for(let oe=2;oe<=Q;oe++)K=(n-W)*R,W+=K;return r===1?a=L:r===t+g?(K=(n-W)*R,a=g===1?K*(12-i)/12:K):a=K,a}function Wt(n,e,t,r,i){if(n=Fe(n),e=Fe(e),t=Fe(t),xt(n,e,t,r=Fe(r),i=i===void 0?2:Fe(i)))return Xe;if(n<0||e<0||t<0||r<0||i<=0||r>t)return ot;if(e>=n)return 0;let a=0,g=0;for(let R=1;R<=r;R++)g=Math.min(i/t*(n-a),n-e-a),a+=g;return g}function Qt(n,e){if(xt(n=Fe(n),e=Fe(e)))return Xe;if(e<0)return ot;if(e>=0&&e<1)return gr;e=parseInt(e,10);let t=parseInt(n,10);t+=n%1*Math.pow(10,Math.ceil(Math.log(e)/Math.LN10))/e;let r=Math.pow(10,Math.ceil(Math.log(e)/Math.LN2)+1);return Math.round(t*r)/r}function Tn(n,e){return xt(n=Fe(n),e=Fe(e))?Xe:e<0?ot:e>=0&&e<1?gr:(e=parseInt(e,10),parseInt(n,10)+n%1*Math.pow(10,-Math.ceil(Math.log(e)/Math.LN10))*e)}function Qn(n,e){return xt(n=Fe(n),e=Fe(e))?Xe:n<=0||e<1?ot:Math.pow(1+n/(e=parseInt(e,10)),e)-1}function tr(n,e,t,r,i){let a;if(n=Fe(n),e=Fe(e),t=Fe(t),xt(n,e,t,r=r===void 0?0:Fe(r),i=i===void 0?0:Fe(i)))return Xe;if(n===0)a=r+t*e;else{let g=Math.pow(1+n,e);a=i===1?r*g+t*(1+n)*(g-1)/n:r*g+t*(g-1)/n}return-a}function Fr(n,e){if(n=Fe(n),Ka(e)||(e=[e]),xt(n,e=Ui(xn(e))))return Xe;let t=e.length,r=n;for(let i=0;i<t;i++)r*=1+e[i];return r}function cr(n,e,t,r,i,a){if(n=Fe(n),e=Fe(e),t=Fe(t),r=Fe(r),xt(n,e,t,r,i=i===void 0?0:Fe(i),a=a===void 0?0:Fe(a)))return Xe;let g=Ks(n,t,r,i,a);return(e===1?a===1?0:-r:a===1?tr(n,e-2,g,r,1)-g:tr(n,e-1,g,r,0))*n}function Kr(n,e){let t,r,i;if(xt(n=Ui(xn(n)),e=e===void 0?0:Fe(e)))return Xe;let a=[],g=!1,R=!1;for(let K=0;K<n.length;K++)a[K]=K===0?0:a[K-1]+365,n[K]>0&&(g=!0),n[K]<0&&(R=!0);if(!g||!R)return ot;let L=e=e===void 0?.1:e,W=!0;do i=function(K,Q,oe){let se=oe+1,he=K[0];for(let me=1;me<K.length;me++)he+=K[me]/Math.pow(se,(Q[me]-Q[0])/365);return he}(n,a,L),r=Math.abs((t=L-i/function(K,Q,oe){let se=oe+1,he=0;for(let me=1;me<K.length;me++){let ye=(Q[me]-Q[0])/365;he-=ye*K[me]/Math.pow(se,ye+1)}return he}(n,a,L))-L),L=t,W=r>1e-10&&Math.abs(i)>1e-10;while(W);return L}function ni(n,e,t,r){return n=Fe(n),e=Fe(e),xt(n,e,t=Fe(t),r=Fe(r))?Xe:r*n*(e/t-1)}function qs(n,e,t){if(n=Ui(xn(n)),xt(n,e=Fe(e),t=Fe(t)))return Xe;let r=n.length;e++,t++;let i=0,a=1,g=0,R=1,L=!1,W=!1;for(let Q=0;Q<r;Q++)n[Q]>0?(W=!0,i+=n[Q]*a):n[Q]<0&&(L=!0,g+=n[Q]*R),a/=t,R/=e;if(!(L&&W))return gr;let K=-i/g;return Math.pow(K*=Math.pow(t,r-1),1/(r-1))-1}function es(n,e){return xt(n=Fe(n),e=Fe(e))?Xe:n<=0||e<1?ot:(Math.pow(n+1,1/(e=parseInt(e,10)))-1)*e}function Ys(n,e,t,r,i){return n=Fe(n),e=Fe(e),t=Fe(t),xt(n,e,t,r=r===void 0?0:Fe(r),i=i===void 0?0:Fe(i))?Xe:n===0?-(t+r)/e:Math.log((e*(1+n*i)-r*n)/(t*n+e*(1+n*i)))/Math.log(1+n)}function So(){if(arguments.length<2)return It;let n=Ui(xn(arguments).map(r=>r===""||r==null?0:r));if(n instanceof Error)return n;let e=n[0],t=0;for(let r=1;r<n.length;r++)t+=n[r]/Math.pow(1+e,r);return t}function Hl(n,e,t){return n=Fe(n),xt(n,e=Fe(e),t=Fe(t))?Xe:n<=0?ot:(Math.log(t)-Math.log(e))/Math.log(1+n)}function Ks(n,e,t,r,i){let a;if(n=Fe(n),e=Fe(e),t=Fe(t),xt(n,e,t,r=r===void 0?0:Fe(r),i=i===void 0?0:Fe(i)))return Xe;if(n===0)a=(t+r)/e;else{let g=Math.pow(1+n,e);a=i===1?(r*n/(g-1)+t*n/(1-1/g))/(1+n):r*n/(g-1)+t*n/(1-1/g)}return-a}function _C(n,e,t,r,i,a){return n=Fe(n),t=Fe(t),r=Fe(r),xt(n,t,r,i=i===void 0?0:Fe(i),a=a===void 0?0:Fe(a))?Xe:Ks(n,t,r,i,a)-cr(n,e,t,r,i,a)}function mte(n,e,t,r,i){return n=Fe(n),e=Fe(e),t=Fe(t),xt(n,e,t,r=r===void 0?0:Fe(r),i=i===void 0?0:Fe(i))?Xe:n===0?-t*e-r:((1-Math.pow(1+n,e))/n*t*(1+n*i)-r)/Math.pow(1+n,e)}function vte(n,e,t,r,i,a){if(n=Fe(n),e=Fe(e),t=Fe(t),r=r===void 0?0:Fe(r),xt(n,e,t,r,i=i===void 0?0:Fe(i),a=a===void 0?.01:Fe(a)))return Xe;let g=0,R=!1,L=a;for(;g<100&&!R;){let W=Math.pow(L+1,n),K=Math.pow(L+1,n-1),Q=r+W*t+e*(W-1)*(L*i+1)/L,oe=n*K*t-e*(W-1)*(L*i+1)/Math.pow(L,2),se=n*e*K*(L*i+1)/L+e*(W-1)*i/L,he=L-Q/(oe+se);1e-7>Math.abs(he-L)&&(R=!0),g++,L=he}return R?L:ot}function yte(n,e,t){return n=Fe(n),xt(n,e=Fe(e),t=Fe(t))?Xe:n===0||e===0?ot:Math.pow(t/e,1/n)-1}function wte(n,e,t){return n=Fe(n),xt(n,e=Fe(e),t=Fe(t))?Xe:t===0?ot:(n-e)/t}function bte(n,e,t,r){return n=Fe(n),e=Fe(e),xt(n,e,t=Fe(t),r=Fe(r))?Xe:t===0||r<1||r>t?ot:(n-e)*(t-(r=parseInt(r,10))+1)*2/(t*(t+1))}function Cte(n,e,t){if(n=ei(this,n),xt(n,e=ei(this,e),t=Fe(t)))return Xe;if(t<=0||n>e||e-n>31536e6)return ot;let r=Ah(e,n);if(!(e-n>157248e5))return 365*t/(360-t*r);{let i=(r/365-.5)/2,a=r/365;return(Math.sqrt(a*a-4*i*(-t*r/(360-t*r)))-a)/(2*i)}}function _te(n,e,t){if(n=ei(this,n),xt(n,e=ei(this,e),t=Fe(t)))return Xe;if(t<=0||n>e||e-n>31536e6)return ot;let r=100*(1-t*Ah(e,n)/360);return r>=0?r:ot}function Ste(n,e,t){return n=ei(this,n),xt(n,e=ei(this,e),t=Fe(t))?Xe:t<=0||n>e||e-n>31536e6?ot:(100-t)*360/(t*Ah(e,n))}function Ite(n,e,t){let r,i,a;if(n=Ui(xn(n)),xt(n,e=pv(this,xn(e)),t=t===void 0?.1:Fe(t)))return Xe;let g=!1,R=!1;for(let K=0;K<n.length;K++)n[K]>0&&(g=!0),n[K]<0&&(R=!0);if(!g||!R||n.length!==e.length)return ot;let L=t=t||.1,W=!0;do a=function(K,Q,oe){let se=oe+1,he=K[0];for(let me=1;me<K.length;me++)he+=K[me]/Math.pow(se,Ah(Q[me],Q[0])/365);return he}(n,e,L),i=Math.abs((r=L-a/function(K,Q,oe){let se=oe+1,he=0;for(let me=1;me<K.length;me++){let ye=Ah(Q[me],Q[0])/365;he-=ye*K[me]/Math.pow(se,ye+1)}return he}(n,e,L))-L),L=r,W=i>1e-10&&Math.abs(a)>1e-10;while(W);return L}function xte(n,e,t){if(n=Fe(n),xt(n,e=Ui(xn(e)),t=pv(this,xn(t))))return Xe;let r=0;for(let i=0;i<e.length;i++)r+=e[i]/Math.pow(1+n,Ah(t[i],t[0])/365);return r}yy.INTL=function(n,e,t,r){let i=!0;if(n=ei(this,n),e=ei(this,e),mr(n)||mr(e))return Xe;if(!Array.isArray(t=wC(t)))return t;if(mr(r=bC(this,r)))return Xe;n>e&&([n,e]=[e,n],i=!1);let a=Math.floor(di(e))-Math.floor(di(n))+1,g=a,R=n;for(let L=0;L<a;L++)!CC(R,t,r)&&g--,R.setDate(R.getDate()+1);return i?g:-g},wy.INTL=function(n,e,t,r){let i=ei(this,n);if(e=e?Fe(e):0,mr(i)||mr(e))return Xe;if(!Array.isArray(t=wC(t)))return t;if(mr(r=bC(this,r)))return Xe;for(let a=0,g=Math.abs(e);a<g;)i.setDate(i.getDate()+(e>0?1:-1)),CC(i,t,r)&&a++;return Math.floor(di(i))};let Vf={DATETIME:-1,DATE:-2,TIME:-3,CURRENCY:-4,PERCENTAGE:-5,isDate:function(n){return n===this.DATE}};function Tte(n,e){return n!=="HYPERLINK"||e?(e||(e=n),0>n.indexOf("://")&&n.indexOf("mailto:")!==0&&n.indexOf("#tid=")!==0&&n.indexOf("#dlink=")!==0&&(n="http://"+n),{text:e,href:n}):Do}function kte(n,e,t,r,i){if(arguments.length<3||arguments.length>5)return It;if(Number.isNaN(e=ja(e))||Number.isNaN(t=ja(t))||r!==void 0&&(Number.isNaN(r=ja(r))||r<1)||i!==void 0&&(Number.isNaN(i=ja(i))||i<1))return Xe;if(!n.isRef())return It;if(!(n=n.toCellRef(this)))return co;let a=this.getInstance(n),g=a.countRows(),R=a.countCols();return n.v[0].row+=e,n.v[0].col+=t,n.v[1].row=r?n.v[0].row+r-1:n.v[1].row+e,n.v[1].col=i?n.v[0].col+i-1:n.v[1].col+t,n.v[0].row<0||n.v[0].col<0||n.v[1].row>=g||n.v[1].col>=R?co:D5(n)}function Rte(n,e){let t=Ji(n,e?void 0:"R1C1");if(t.size()!==1)return co;let r=t.get(0),i=r.getValue();if(r.isRange()){let a=this.item;i=e?i:Fb(r.getValue(),a.row,a.col)}else{if(!r.isVariable())return co;let a=this.getVariable(r.getValue(),r.getSheetName());if(!a||(r=(t=Ji(a)).get(0),t.size()!==1||!r.isRange()))return co;i=r.getValue()}return r.isRowRange()?oo.createRowRef(i,r.getSheetName()):r.isColRange()?oo.createColRef(i,r.getSheetName()):oo.createRangeRef(i,r.getSheetName())}function Ete(n){if(arguments.length!=1)return It;if(n.isRowRef()||n.isColRef())return!1;let e=n.resolve(this);if(Pi(e))return e;if(Array.isArray(e))return!1;if(typeof e=="string")return this.getLocale().getDateParser().parse(e)!==null;if(typeof e=="number"){if(!n.isCellRef())return Vf.isDate(this.item.nfId);let{v:[{row:t,col:r}]}=n,i=this.getInstance(n),a=i.worksheet.getComputedCellStyle(t,r).getNumberFormat();if(a.isDate())return!0;if(a.isDefault())return Vf.isDate(i.formula.getNumberFormatHint(t,r))}return!1}function Ate(n,e,t){if(arguments.length>4||arguments.length<1||n===void 0)return It;if(typeof e!="number"||e<0||typeof t!="number"||t<0)return Xe;if(n.isArray()){let r=n.resolve(this);if(r.length<e)return co;r=e>0?[r[e-1]]:r;let i=[];for(let a=0;a<r.length;a++){if(r[a].length<t)return co;i.push(t>0?[r[a][t-1]]:r[a])}return i}if(n.isRef()){let r=n.toCellRef(this);return!r||r.v[1].row-r.v[0].row+1<e||r.v[1].col-r.v[0].col+1<t?co:(e>0&&(r.v[1].row=r.v[0].row+=e-1),t>0&&(r.v[1].col=r.v[0].col+=t-1),D5(r))}return co}function Mte(n,e,t,r,i){if(t===void 0&&(t=1),r===void 0&&(r=!0),arguments.length<2||arguments.length>5||!rr(n)||n<1||!rr(e)||e<1)return Xe;let a={row:n-1,col:e-1,isRowAbs:t!==3&&t!==4,isColAbs:t!==2&&t!==4},g=r?Bi(a):Pl(a);return i?`${ul(i)}!${g}`:g}function D5(n){if(n.v.length<2)return n;let[e,t]=n.v;return e.row===t.row&&e.col===t.col?oo.fromCell(e,n.shName,n.isImplicit):n}function Dte(n,e){try{let t=e.split("."),r=n;for(let i=0;i<t.length;++i){let a=t[i];if(a[a.length-1]==="]"){let g=a.indexOf("["),R=a.substring(g+1,a.length-1);r=r[a.substring(0,g)][R]}else r=r[a]}return r}catch{}}function Ote(n,e){return n.join(e)}function Nte(){return xn(arguments).filter(function(e){return typeof e=="number"})}let O5=new dl().assign({keepNull:!0});function Pte(n,e){if(n===void 0||e===void 0)return It;let t=new $v(this,e),r=0;function i(a,g,R){let L=R.getCellValue(a,g);t.test(L)&&r++}return SC(this,n,function(a){L5(a,i)}),r}function Bte(){let n=lu(arguments);if(n.length<2||n.length%2!=0)return It;let e=B5(this,n);return e!==Xe?e.length:Xe}function by(n,e,t,r,i){return e.length<3||e.length%2==0?It:SC(n,e[0],function(a){let g=t?[a.getHeight(),a.getWidth()]:null,R=B5(n,e.slice(1),g);if(R===Xe)return Xe;let L=r,W=a.getRowOffset(),K=a.getColOffset();for(let Q=0;Q<R.length;Q++){let oe=R[Q],se=a.getCellValue(oe[0]+W,oe[1]+K);typeof se=="number"&&(L=i(L,se))}return L})}function N5(n,e){return n+e}function Lte(){return by(this,lu(arguments),!0,0,N5)}function Fte(n,e,t){return by(this,[t||n,n,e],!1,0,N5)}function Vte(n,e,t){return P5(this,[t||n,n,e],!1)}function Hte(){return P5(this,lu(arguments),!0)}function P5(n,e,t){let r=0,i=by(n,e,t,0,function(a,g){return r++,a+g});return i===It||i===Xe?i:r>0?i/r:gr}function $te(){let n=by(this,lu(arguments),!0,Number.MIN_VALUE,Math.max);return n!==Number.MIN_VALUE?n:0}function zte(){let n=by(this,lu(arguments),!0,Number.MAX_VALUE,Math.min);return n!==Number.MAX_VALUE?n:0}function B5(n,e,t){let r,i=e[0],a=new $v(n,e[1]),g=0,R=0,L=[];if((r=SC(n,i,function(K){if(g=K.getHeight(),R=K.getWidth(),t&&(t[0]!==g||t[1]!==R))return Xe;L5(K,function(Q,oe,se){let he=se.getCellValue(Q,oe);a.test(he)&&L.push([Q-se.getRowOffset(),oe-se.getColOffset()])})}))===Xe)return r;function W(K){if(K.getHeight()!==g||K.getWidth()!==R)return Xe;let Q=[],oe=K.getRowOffset(),se=K.getColOffset();for(let he=0;he<L.length;he++){let me=L[he];a.test(K.getCellValue(me[0]+oe,me[1]+se))&&Q.push(me)}L=Q}for(let K=1,Q=e.length/2;K<Q;K++)if(a=new $v(n,e[2*K+1]),(r=SC(n,e[2*K],W))===Xe)return r;return L}class Wte{constructor(e){this._array=Array.isArray(e)?e:[[e]]}getRowOffset(){return 0}getColOffset(){return 0}getCellValue(e,t){return this._array[e]&&this._array[e][t]}getHeight(){return this._array.length}getWidth(){return this._array[0]?this._array[0].length:0}}function SC(n,e,t){return e.isRef()?n.createRangeVector(e.toRange(),O5,e.isImplicit,t):t(new Wte(e.resolve(n,O5)))}function L5(n,e){let t=n.getRowOffset(),r=n.getColOffset(),i=t+n.getHeight(),a=r+n.getWidth();for(let g=t;g<i;g++)for(let R=r;R<a;R++)e(g,R,n)}let F5=[s,w,m,b,T,D,l,h,O,c,N,z],V5={};for(let n in F5){let e=F5[n];for(let t in e)V5[t]=e[t]}function H5(n){if(n===0)return{sign:0,exp:-15,base:0};let e=n>0?1:-1,t=Math.floor(Math.log10(n=Math.abs(n)))-15+1,r=Math.round(n/Math.pow(10,t));return r>=1e15&&(t+=1,r/=10),{sign:e,exp:t,base:r}}function WE(n,e){let t=H5(n),r=H5(e),i=0;return t.sign===r.sign?(i=t.exp===r.exp?t.base===r.base?0:t.base>r.base?1:-1:t.exp>r.exp?1:-1,t.sign===-1&&(i=-i)):i=t.sign>r.sign?1:-1,i}function $5(n){for(;Array.isArray(n)&&n.length>0;)n=n[0];return n}function xp(n,e){let t=function(r,i){if(r!==null||i===null)return $5(r);switch(typeof i){case"string":return"";case"number":return 0;case"boolean":return!1;default:return $5(r)}}(n,e);return{val:t,type:function(r){switch(typeof r){case"number":return go.NUMBER;case"string":return go.STRING;case"boolean":return go.BOOLEAN;default:return go.OTHER}}(t)}}function UE(n,e){n.type===go.STRING&&e.type===go.STRING&&(n.val=n.val.toLowerCase(),e.val=e.val.toLowerCase())}function GE(n,e){let t=xp(n,e),r=xp(e,n);return t.type!==r.type?t.type<r.type:t.type===go.NUMBER?WE(t.val,r.val)===-1:(UE(t,r),t.val<r.val)}function jE(n,e){let t=xp(n,e),r=xp(e,n);return t.type!==r.type?t.type>r.type:t.type===go.NUMBER?WE(t.val,r.val)===1:(UE(t,r),t.val>r.val)}function Cy(n,e){let t=xp(n,e),r=xp(e,n);return t.type===r.type&&(t.type===go.NUMBER?WE(t.val,r.val)===0:(UE(t,r),t.val===r.val))}function z5(n,e){return Cy(n,e)||GE(n,e)}function W5(n,e){return Cy(n,e)||jE(n,e)}function U5(n,e){return!Cy(n,e)}function _y(n){return function(e,t){var r=e,i=t;if(r=ja(r),i=ja(i),isNaN(r)||isNaN(i))return Wn.VALUE;let a=n(r,i);return isFinite(a)||Pi(a)?a:Wn.NUM}}let Ute={"&":function(n,e){return typeof n=="number"&&(n=Yi(n)),typeof e=="number"&&(e=Yi(e)),n+""+e},"=":Cy,">":jE,"<":GE,">=":W5,"<=":z5,"<>":U5,"%":function(n){return .01*ja(n)},"+":_y(function(n,e){return n+e}),"-":_y(function(n,e){return n-e}),"*":_y(function(n,e){return n*e}),"/":_y(function(n,e){if(e===0)return Wn.DIV0;let t=n/e;return t===1/0?Wn.DIV0:isNaN(t)?Wn.VALUE:t}),"^":_y(function(n,e){return Math.pow(n,e)}),invert:function(n){let e=-1*ja(n);return isNaN(e)?Wn.VALUE:e},plus:function(n){return n}};function Hf(n){return Co.fromValue(n??null)}function $f(n){return n instanceof Co?((n.isCellRef()||n.isRowRef()||n.isColRef())&&n.setImplicit(),n.isValue()&&n.v===void 0&&(n.v=null),n):Hf(n)}function Sy(n,e,t){return e.item&&e.item.setNfIdHint(t,!0),Hf(n)}function Iy(n,e){return Sy(n,e,Vf.DATE)}function Mh(n,e){return Sy(n,e,Vf.CURRENCY)}function qE(n,e){return Sy(n,e,Vf.PERCENTAGE)}function Gte(n,e){return e.item&&e.item.resetNfIdHint(),Hf(n)}let G5={IF:$f,CHOOSE:$f,OFFSET:$f,INDIRECT:$f,INDEX:$f,IFS:$f,SUBTOTAL:function(n,e){return e.item&&e.item.markSubtotal(),Hf(n)},HYPERLINK:function(n,e,t){return Pi(n)?Hf(n):new OT(n.text,n.href)},NOW:function(n,e){return Sy(n,e,Vf.DATETIME)},TIME:function(n,e){return Sy(n,e,Vf.TIME)},TODAY:Iy,WORKDAY:Iy,DATE:Iy,EDATE:Iy,EOMONTH:Iy,DB:Mh,DDB:Mh,FV:Mh,FVSCHEDULE:Mh,IPMT:Mh,IRR:qE,MIRR:qE,NPV:Mh,PMT:Mh,PPMT:Mh,PV:Mh,RATE:qE,SLN:Mh,XLOOKUP:function(n,e){if(n instanceof Co)return $f(n);if(n instanceof Array)for(let t in n)for(let r in n[t]){let i=n[t][r];if(i instanceof Co)(i.isCellRef()||i.isRowRef()||i.isColRef())&&(i.v=i.toCellRef(e)?.v.slice(0,1)??i.v);else for(;i instanceof Array;)i=i[0];n[t][r]=i}return Hf(n)}};["COUNT","COUNTA","COUNTBLANK","COUNTIF","COUNTIFS","SUMIF","SUMIFS","AVERAGEIF","AVERAGEIFS","MAXIFS","MINIFS","DAY","DAYS","DATEDIF","MONTH","YEAR","WEEKDAY","HOUR","MINUTE","SECOND","WEEKNUM","YEARFRAC","ISOWEEKNUM","NETWORKDAYS.INTL","NETWORKDAYS","TIMEVALUE",">","<","=","<>",">=","<=","OR","AND","NOT","XOR"].forEach(function(n){G5[n]=Gte});let j5={table:G5,defaultHandler:Hf},jte=["ABS","ADDRESS","ACCRINT","ACOS","ACOSH","ACOT","ACOTH","AND","ARABIC","ASIN","ASINH","ATAN","ATAN2","ATANH","AVEDEV","AVERAGE","AVERAGEA","AVERAGEIF","AVERAGEIFS","BASE","BESSELI","BESSELJ","BESSELK","BESSELY","BETA.DIST","BETA.INV","BETADIST","BETAINV","BIN2DEC","BIN2HEX","BIN2OCT","BINOM.DIST","BINOM.INV","BINOMDIST","BITAND","BITLSHIFT","BITOR","BITRSHIFT","BITXOR","CEILING","CEILING.MATH","CEILING.PRECISE","CHAR","CHIDIST","CHIINV","CHISQ.DIST","CHISQ.DIST.RT","CHISQ.INV","CHISQ.INV.RT","CHISQ.TEST","CHITEST","CHOOSE","CLEAN","CODE","COLUMN","COLUMNS","COMBIN","COMBINA","COMPLEX","CONCAT","CONCATENATE","CONFIDENCE","CONFIDENCE.NORM","CONFIDENCE.T","CORREL","COS","COSH","COT","COTH","COUNT","COUNTA","COUNTBLANK","COUNTIF","COUNTIFS","COVAR","COVARIANCE.P","COVARIANCE.S","CRITBINOM","CSC","CSCH","CUMIPMT","CUMPRINC","DATE","DATEDIF","DATEVALUE","DAY","DAYS","DAYS360","DB","DDB","DEC2BIN","DEC2HEX","DEC2OCT","DECIMAL","DEGREES","DELTA","DEVSQ","DOLLAR","DOLLARDE","DOLLARFR","EDATE","EFFECT","EOMONTH","ERF","ERF.PRECISE","ERFC","ERFC.PRECISE","ERROR.TYPE","EVEN","EXACT","EXP","EXPON.DIST","EXPONDIST","FALSE","F.DIST","F.DIST.RT","F.INV","F.INV.RT","F.TEST","FACT","FACTDOUBLE","FDIST","FIND","FINV","FISHER","FISHERINV","FIXED","FLOOR","FLOOR.MATH","FLOOR.PRECISE","FORECAST","FTEST","FV","FVSCHEDULE","GAMMA","GAMMA.DIST","GAMMA.INV","GAMMADIST","GAMMAINV","GAMMALN","GAMMALN.PRECISE","GAUSS","GCD","GEOMEAN","GESTEP","HARMEAN","HEX2BIN","HEX2DEC","HEX2OCT","HLOOKUP","HOUR","HYPGEOM.DIST","HYPGEOMDIST","IF","IFERROR","IFNA","IMABS","IMAGINARY","IMARGUMENT","IMCONJUGATE","IMCOS","IMCOSH","IMCOT","IMCSC","IMCSCH","IMDIV","IMEXP","IMLN","IMLOG10","IMLOG2","IMPOWER","IMPRODUCT","IMREAL","IMSEC","IMSECH","IMSIN","IMSINH","IMSQRT","IMSUB","IMSUM","IMTAN","INDIRECT","INT","INTERCEPT","IPMT","IRR","ISBLANK","ISERR","ISERROR","ISEVEN","ISLOGICAL","ISNA","ISODD","ISNONTEXT","ISNUMBER","ISO.CEILING","ISOWEEKNUM","ISPMT","ISTEXT","TEXT","KURT","LARGE","LCM","LEFT","LEN","LN","LOG","LOG10","LOGINV","LOGNORM.DIST","LOGNORM.INV","LOGNORMDIST","LOWER","MATCH","MAX","MAXA","MAXIFS","MEDIAN","MID","MIN","MINA","MINIFS","MINUTE","MIRR","MOD","MODE","MODE.SNGL","MONTH","MROUND","MULTINOMIAL","N","NA","NEGBINOM.DIST","NEGBINOMDIST","NETWORKDAYS","NETWORKDAYS.INTL","NOMINAL","NORM.DIST","NORM.INV","NORM.S.DIST","NORM.S.INV","NORMDIST","NORMINV","NORMSDIST","NORMSINV","NOT","NOW","NPER","NPV","OCT2BIN","OCT2DEC","OCT2HEX","ODD","OFFSET","OR","PDURATION","PEARSON","PERCENTILE","PERCENTILE.EXC","PERCENTILE.INC","PERCENTRANK","PERCENTRANK.EXC","PERCENTRANK.INC","PERMUT","PERMUTATIONA","PHI","PI","PMT","POISSON","POISSON.DIST","POWER","PPMT","PROB","PRODUCT","PROPER","PV","QUARTILE","QUARTILE.EXC","QUARTILE.INC","QUOTIENT","RADIANS","RAND","RANDBETWEEN","RANK","RANK.AVG","RANK.EQ","RATE","REPLACE","REPT","RIGHT","ROMAN","ROUND","ROUNDDOWN","ROUNDUP","ROW","ROWS","RRI","RSQ","SEARCH","SEC","SECH","SECOND","SERIESSUM","SIGN","SIN","SINH","SKEW","SKEW.P","SLN","SLOPE","SMALL","SQRT","SQRTPI","STANDARDIZE","STDEV","STDEV.P","STDEV.S","STDEVA","STDEVP","STDEVPA","STEYX","SUBSTITUTE","SUBTOTAL","SUM","SUMIF","SUMIFS","SUMPRODUCT","SUMSQ","SUMX2MY2","SUMX2PY2","SUMXMY2","SYD","T","T.DIST","T.DIST.2T","T.DIST.RT","T.INV","T.INV.2T","T.TEST","TAN","TANH","TBILLEQ","TBILLPRICE","TBILLYIELD","TDIST","TIME","TIMEVALUE","TINV","TODAY","TRIM","TRIMMEAN","TRUE","TRUNC","TTEST","TYPE","UNICHAR","UNICODE","UPPER","VALUE","VAR","VAR.P","VAR.S","VARA","VARP","VARPA","VLOOKUP","WEEKDAY","WEEKNUM","WEIBULL","WEIBULL.DIST","WORKDAY","WORKDAY.INTL","XIRR","XLOOKUP","XNPV","XOR","YEAR","YEARFRAC","Z.TEST","ZTEST","HYPERLINK","ISDATE","INDEX","IFS","SEQUENCE","SORT","SORTBY","FILTER","RANDARRAY","TRANSPOSE","UNIQUE","IMPORTRANGE","FLATTEN"].reduce((n,e)=>{let t=V5,r=e.split(".");for(let i=0;i<r.length&&t;i++)t=t[r[i]];return t&&(n[e]=t),n},{});function YE(n){let e=new Xi;return e.parseError=()=>{throw Wn.ERROR},e.yy={handler:n},e}class q5{constructor(e){this.ctx=e}getErrorFromText(e){return ua[e]||Bu}numberify(e){return ja(e)}extractString(e){return Fu(e)}addCellRef(e,t){e.addCellRef(t)}enterFunction(e){}leaveFunction(e){}exec(e,t,r){let i=cv.resolverTable[e]||cv.defaultResolver,a=bv[e]||kf,g=Cs[e]||yf,R=Ll(e,r)?g(i(r,this.ctx),L=>{let W=a(L);return W||(xh.call(this.ctx,e,L),W=a(L))?W:t.apply(this.ctx,L)}):Wn.NA;return(j5.table[e]||j5.defaultHandler)(R,this.ctx)}callFunction(e,t,r){t=t||[];let i=jte[e];return i?this.exec(e,i,t):Co.fromValue(Wn.NAME)}callOperator(e,t){let r=Ute[e];return this.exec(e,r,t)}createConstantArrayExpr(e){let t=e.length,r=e[0].length;if(t===1&&r===1)return this.createExpr(e[0][0]);for(let i=1;i<t;i++)if(e[i].length!==r)return this.createExpr(Wn.VALUE);return this.createExpr(e)}createExpr(e){return Co.fromValue(e)}createCellRefExpr(e,t){return t&&(t=vs(t)),oo.createCellRef(e,t)}createColRefExpr(e,t){return t&&(t=vs(t)),oo.createColRef(e,t)}createRowRefExpr(e,t){return t&&(t=vs(t)),oo.createRowRef(e,t)}getVariableExpr(e,t){let r=this.ctx.getVariable(e,t);return r===void 0?this.createExpr(Wn.NAME):YE(this).parse(r)}createArgs(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return t}pushArgs(e,t){e.push(t)}nextArgument(){}}class qte extends q5{enterFunction(e){this.ctx.getDimHelper().pushFuncName(e)}leaveFunction(){this.ctx.getDimHelper().popFuncName()}callFunction(e,t,r){var i;if(this.ctx.getDimHelper().needRealValue()||this.ctx.getDimHelper().isReturnRefFunction(e))return super.callFunction(e,t,r);if(!Ll(e,t))return this.createExpr(Wn.NA);let{height:a,width:g}=(i=this.ctx,(_s[e]||Ta)(t,i)),R=a>0&&g>0?vf(a,g):0;return this.createExpr(R)}callOperator(e,t){var r;if(this.ctx.getDimHelper().needRealValue())return super.callOperator(e,t);let{height:i,width:a}=(r=this.ctx,(_s[e]||Ta)(t,r)),g=i>0&&a>0?vf(i,a):0;return this.createExpr(g)}createArgs(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.ctx.getDimHelper().pushArgs(t.length),t}pushArgs(e,t){super.pushArgs(e,t),this.ctx.getDimHelper().pushArgs(1)}}let Yte=`Maximum call stack size exceeded${ue()?".":""}`,Kte=ke()?n=>n instanceof Error&&n.message==="too much recursion":n=>n instanceof RangeError&&n.message===Yte,Xte=class{constructor(n){this.ctx=new BT(n),this.parser=YE(new q5(this.ctx)),this.dimParser=YE(new qte(this.ctx))}exec(n,e){if(!this.ctx.preExec(e))return{error:Wn.REF,result:null};let t=this._parse(n,e);return this.ctx.postExec(e)?t:{error:Wn.REF,result:null}}parseRange(n,e){let t;if(!this.ctx.preExec(e))return null;try{t=this.parser.parse(n)}catch{}return this.ctx.postExec(e)&&t&&t instanceof oo?t.toRange():null}execArrayDimension(n,e){let t={height:0,width:0};if(!this.ctx.preExec(e))return t;let r=null;try{r=this.dimParser.parse(n)}catch{}let i=ca(r,this.ctx);return this.ctx.postExec(e)?i:t}getRangeValues(n,e,t){if(!this.ctx.preExec(e))return Wn.REF;let r=this.ctx.visibleRangeValue(oo.fromRange(n,void 0),t);return this.ctx.postExec(e)?r:Wn.REF}_parse(n,e){let t=null,r=null,i=!1;try{t=this.parser.parse(n).finalize(this.ctx),Pi(t)&&(r=t,t=null)}catch(a){if(Kte(a)){if(r=Wn.CALC,i=!0,e.item)for(;this.ctx.item!==e.item;)this.ctx.postExec(e)}else r=Wn.ERROR;t=null}return{error:r,result:t,delayCalc:i}}},Ar={Comparator:H,...v,...d,...I,...C},Tp={date:{serialize:di,deserialize:za,roundTime:Bs},number:{toEffective:Yi},error:{isError:Pi}},{fromA1ToR1C1:Xu,fromR1C1ToA1:po,isFormulaAbsolute:Y5,transposeR1C1:Jte}=Ar;function KE(n){let e,t;switch(n.symbol){case Ft.CELL:return[e,t]=Ar.rangeToCoords(n.getValue()),new mi(e,t,n.getSheetName());case Ft.ROWRANGECELL:return[e,t]=Ar.rangeToCoords(n.getValue()),new ta(e.row,t.row,n.getSheetName());case Ft.COLRANGECELL:return[e,t]=Ar.rangeToCoords(n.getValue()),new na(e.col,t.col,n.getSheetName());case Ft.VARIABLE:return new ge(n.getValue().toLowerCase(),n.getSheetName())}return null}function Ac(n){let e=[],t=Ji(n);for(let r=0,i=t.size();r<i;r++){let a=KE(t.get(r));a&&e.push(a)}return e}function zf(n){let e=Ji(n);if(e.size()!==1)return null;let t=e.get(0);return t.isRange()?KE(t):null}let Zte=/^[^!,]+!|^'(?:[^']|'')+'!/;function kp(n){let e=[];for(n=n.trim();n.length>0;n=n.trim()){let t=Zte.exec(n),r=n.indexOf(",",t?t[0].length:0),i=r<0?n:n.slice(0,r);e.push(i.trim()),n=n.slice(i.length+1)}return e}function K5(n,e){let t=Ar.getFormulaBound([n,e],!0);return{row:t.row||0,col:t.col||0}}function X5(n){let e=Ji(n,"R1C1");for(let t=0;t<e.size();t++){let r=e.get(t);if(!r.isRange())continue;let i=r.getText();if(i!=="R[0]C[0]"&&i!=="R[0]C[0]:R[0]C[0]")return!1}return!0}let J5=class{constructor(n){this.range=n}assertRange(){if(!this.range)throw Error("range is missing.")}getRange(){return this.assertRange(),this.range.clone()}search(n){return this.assertRange(),this.range.isEqual(n)}hasOverlap(n){return this.assertRange(),this.range.overlaps(n)}onCreateRowCol(n,e,t){this.assertRange(),this.range.createRowCol(n,e,t)}onRemoveRowCol(n,e,t){this.assertRange(),this.range.removeRowCol(n,e,t)}},Z5=class extends J5{constructor(n,e,t){super(sn.fromArray(n.toArray())),this.prev=e||null,this.next=t||null}};function Rp(n){return(n.to.row-n.from.row+1)*(n.to.col-n.from.col+1)}function Rd(n,e){let t=n&&n.getLastRangeNode?n.getLastRangeNode():n,r=e&&e.getFirstRangeNode?e.getFirstRangeNode():e;t&&(t.next=r),r&&(r.prev=t)}let XE=class extends J5{constructor(n){super(null),this.children=n||[],this._updateInfo()}insert(n){return this._insertRangeNode(n),this._isOverflow()?this._splitNodeOnOverflow():null}delete(n){if(!this.range||!this.range.includesRange(n))return!1;let e=-1;for(let t=0;t<this.children.length;t++)if(this._checkChildDeletion(t,n)){e=t;break}return e!==-1&&(this._adjustOnDeletion(e),this._updateRange(),!0)}search(n){return this.assertRange(),!!this.range.includesRange(n)&&this.children.some(e=>e.search(n))}hasOverlap(n){return this.assertRange(),!!this.range.overlaps(n)&&this.children.some(e=>e.hasOverlap(n))}onCreateRowCol(n,e,t){if(this.range&&!(e>this.range.to[n])){super.onCreateRowCol(n,e,t);for(let r=0,i=this.children.length;r<i;r++)this.children[r].onCreateRowCol(n,e,t)}}onRemoveRowCol(n,e,t){if(this.range&&!(e>this.range.to[n])){super.onRemoveRowCol(n,e,t);for(let r=0,i=this.children.length;r<i;r++)this.children[r].onRemoveRowCol(n,e,t)}}getChildren(){return this.children.slice()}mergeNextSibling(n){let e=n.getChildren();for(let a=0,g=e.length;a<g;a++)this.children.push(e[a]),this.assertRange(),this.range.expandByRange(e[a].getRange());if(!this._isOverflow())return null;let t=this._splitNodeOnOverflow(),r=this.getLastRangeNode(),i=r.next;return Rd(r,t.getFirstRangeNode()),Rd(t.getLastRangeNode(),i),t}_isOverflow(){return this.children.length>3}_updateInfo(){this._updateRange();let n=this.children.length,e=null;for(let t=0;t<n;t++)Rd(e,this.children[t]),e=this.children[t];Rd(e,null)}_updateRange(){let n=this.children.length;if(n===0){this.range=null;return}this.range=this.children[0].getRange();for(let e=1;e<n;e++)this.range.expandByRange(this.children[e].getRange())}_splitNodeOnOverflow(){let n=this.getFirstRangeNode().prev,e=this.getLastRangeNode().next,[t,r]=function(i){let a=i.length;if(a===0)return[[],[]];if(a===1)return[[i[0]],[]];let g=0,R=0,L=1;for(let oe=0;oe<a-1;oe++)for(let se=oe+1;se<a;se++){let he=i[oe].getRange();he.expandByRange(i[se].getRange());let me=Rp(he);me>g&&(g=me,R=oe,L=se)}let W=[[i[R]],[i[L]]],K=[i[R].getRange(),i[L].getRange()];i[L]=i[--a],i[R]=i[--a];let Q=0;for(;a>0;){let oe=Number.MAX_VALUE,se=0,he=Rp(K[Q]);for(let me=0;me<a;me++){let ye=i[me].getRange();ye.expandByRange(K[Q]);let Te=Rp(ye)-he;Te<oe&&(oe=Te,se=me)}W[Q].push(i[se]),K[Q].expandByRange(i[se].getRange()),i[se]=i[--a],Q=(Q+1)%2}return W}(this.children);return this.children=t,this._updateInfo(),Rd(n,this),Rd(this,e),this._createSibling(r)}_appendNode(n){if(this.children.length>0){let e=this.getLastRangeNode(),t=e.next;Rd(e,n),Rd(n,t)}this.children.push(n),this.range?this.range.expandByRange(n.getRange()):this.range=n.getRange()}};class IC extends XE{_insertRangeNode(e){this._appendNode(e)}_checkChildDeletion(e,t){return this.children[e].search(t)}_adjustOnDeletion(e){let t=this.children[e],r=t.prev,i=t.next;r&&(r.next=i),i&&(i.prev=r),this.children.splice(e,1)}getOverlap(e){return this.children.map(t=>t.getRange()).filter(t=>t.overlaps(e))}getFirstRangeNode(){return this.children.length?this.children[0]:null}getLastRangeNode(){return this.children.length?this.children[this.children.length-1]:null}_createSibling(e){return new IC(e)}}class xC extends XE{_insertRangeNode(e){let t=e.getRange(),r=function(i,a){let g=Number.MAX_VALUE,R=null;for(let L=0,W=i.length;L<W&&g>0;L++){let K=i[L].getRange(),Q=Rp(K);K.expandByRange(a);let oe=Rp(K);oe-Q<g&&(g=oe-Q,R=i[L])}if(!R)throw Error("No expanded node is found.");return R}(this.children,t).insert(e);r?this._appendNode(r):(this.assertRange(),this.range.expandByRange(t))}_checkChildDeletion(e,t){return this.children[e].delete(t)}_adjustOnDeletion(e){let t=this.children[e];if(t.getChildren().length>=1.5)return;let r=this.children[e-1],i=this.children[e+1],a=r?t:i,g=r||t,R=r?e:e+1,L=g.mergeNextSibling(a);L?this.children[R]=L:this.children.splice(R,1)}getOverlap(e){return this.assertRange(),this.range.overlaps(e)?this.children.reduce((t,r)=>t.concat(r.getOverlap(e)),[]):[]}getFirstRangeNode(){return this.children.length?this.children[0].getFirstRangeNode():null}getLastRangeNode(){return this.children.length?this.children[this.children.length-1].getLastRangeNode():null}_createSibling(e){return new xC(e)}}function Q5(n,e){return n.from.row-e.from.row||n.to.row-e.to.row}function Qte(n,e){return n.from.col-e.from.col||n.to.col-e.to.col}function e6(n,e){let t=[],r=0;for(let i=0,a=e.length;i<a;i++){let g=r+e[i];t.push(n.slice(r,g)),r=g}return t}function t6(n){let e=0;for(let t=0;t<n.length;t++){let r=n[t][0].clone();for(let i=1;i<n[t].length;i++)r.expandByRange(n[t][i]);e+=Rp(r)}return e}let n6=class{constructor(){this.root=null,this.count=0}init(n){this.root=this._createTreeByRanges(n),this.count=n.length}insert(n){let e=new Z5(n);if(this.root){let t=this.root.insert(e);t&&(this.root=new xC([this.root,t]))}else this.root=new IC([e]);this.count+=1}delete(n){if(!this.root)return!1;if(this.root.delete(n)){let e=this.root.getChildren();return e.length===1&&e[0]instanceof XE?this.root=e[0]:e.length===0&&(this.root=null),this.count-=1,!0}return!1}search(n){return!!this.root&&this.root.search(n)}hasOverlap(n){return!!this.root&&this.root.hasOverlap(n)}getOverlap(n){return this.root?this.root.getOverlap(n):[]}getCount(){return this.count}getCoverRange(){return this.root?this.root.getRange():null}*traverse(){if(!this.root)return;let n=this.root.getFirstRangeNode();for(;n;)yield n.getRange(),n=n.next}onCreateRowCol(n,e,t){this.root&&this.root.onCreateRowCol(n,e,t)}onRemoveRowCol(n,e,t){if(!this.root)return;let r=this.root.getRange();r.from[n]=e,r.to[n]=e+t-1,this.getOverlap(r).forEach(i=>{let a=i.clone();(!a.removeRowCol(n,e,t)||a.isSingle())&&this.delete(i)}),this.root&&this.root.onRemoveRowCol(n,e,t)}onMoveRowCol(n,e){if(!this.root)return;let t=this.root.getRange();t.from[n]=e.sec[0].start,t.to[n]=e.sec[0].end;let r=this.getOverlap(t);r.forEach(a=>this.delete(a)),t.from[n]=e.sec[1].start,t.to[n]=e.sec[1].end;let i=this.getOverlap(t);i.forEach(a=>this.delete(a)),r.forEach(a=>{e.sec[0].start<=a.from[n]&&a.to[n]<=e.sec[0].end&&(a.from[n]+=e.sec[1].amount,a.to[n]+=e.sec[1].amount,this.insert(a))}),i.forEach(a=>{e.sec[1].start<=a.from[n]&&a.to[n]<=e.sec[1].end&&(a.from[n]-=e.sec[0].amount,a.to[n]-=e.sec[0].amount,this.insert(a))})}_createTreeByRanges(n){let e=n.length;if(e===0)return null;let t=Math.pow(3,Math.ceil(Math.log(e)/Math.log(3))-1);return function r(i,a,g){if(i.length<=3)return new IC(i.map(se=>new Z5(se)));let R=Array(Math.floor(i.length/g)).fill(g),L=i.length%g;if(L>0){let se=Math.floor((L+g)/2);R[R.length-1]=L+g-se,R.push(se)}let W=a==="row"?i:i.slice().sort(Q5),K=a==="col"?i:i.slice().sort(Qte),Q=e6(W,R),oe=e6(K,R);return new xC(t6(Q)<=t6(oe)?Q.map(se=>r(se,"row",g/3)):oe.map(se=>r(se,"col",g/3)))}(n.sort(Q5),"row",t)}};var Dh=function(n){return n[n.none=0]="none",n[n.partial=1]="partial",n[n.full=2]="full",n}({}),qr=function(n){return n[n.cell=0]="cell",n[n.row=1]="row",n[n.col=2]="col",n[n.all=3]="all",n}({});function Ep(n,e){return{row:n.row+(e.row??0),col:n.col+(e.col??0)}}function JE(n,e){return{from:Ep(n.from,e),to:Ep(n.to,e)}}function r6(n,e){return n.from.row<=e.row&&n.to.row>=e.row&&n.from.col<=e.col&&n.to.col>=e.col}function i6(n,e,t){for(let r=n.row;r<=e.row;r++)for(let i=n.col;i<=e.col;i++)if(t(r,i)===!1)return!1}class sn{constructor(e,t,r,i,a){this.from={row:e,col:t},this.to={row:r,col:i},this.type=a||0}isSingle(){return this.from.row===this.to.row&&this.from.col===this.to.col}isRowType(){return!!(1&this.type)}isColType(){return!!(2&this.type)}getHeight(){return Math.max(this.from.row,this.to.row)-Math.min(this.from.row,this.to.row)+1}getWidth(){return Math.max(this.from.col,this.to.col)-Math.min(this.from.col,this.to.col)+1}getSize(e){return e==="row"?this.getHeight():this.getWidth()}clone(){return new sn(this.from.row,this.from.col,this.to.row,this.to.col,this.type)}isEqual(e){if(e.type!==this.type)return!1;let t=this.getTopLeftCorner(),r=this.getBottomRightCorner(),i=e.getTopLeftCorner(),a=e.getBottomRightCorner();return this.type===3||(1&this.type?i.row===t.row&&a.row===r.row:2&this.type?i.col===t.col&&a.col===r.col:t.row===i.row&&t.col===i.col&&r.row===a.row&&r.col===a.col)}includes(e,t){t===void 0&&(t=!0);let r=this.getTopLeftCorner(),i=this.getBottomRightCorner(),a=t&&e.row<0?0:e.row,g=t&&e.col<0?0:e.col;return this.type===3||(1&this.type?r.row<=a&&a<=i.row:2&this.type?r.col<=g&&g<=i.col:r6({from:r,to:i},{row:a,col:g}))}includesRange(e){return!(e.type&~this.type)&&this.includes(e.getTopLeftCorner())&&this.includes(e.getBottomRightCorner())}overlaps(e){let t=this.getTopLeftCorner(),r=this.getBottomRightCorner(),i=e.getTopLeftCorner(),a=e.getBottomRightCorner(),g=!!((e.type|this.type)&2)||t.row<=a.row&&r.row>=i.row,R=!!((e.type|this.type)&1)||t.col<=a.col&&r.col>=i.col;return g&&R}expand(e){let t=this.getTopLeftCorner(),r=this.getBottomRightCorner();return(e.row<t.row||e.col<t.col||e.row>r.row||e.col>r.col)&&(this.from={row:Math.min(t.row,e.row),col:Math.min(t.col,e.col)},this.to={row:Math.max(r.row,e.row),col:Math.max(r.col,e.col)},!0)}expandByRange(e){if(this.includesRange(e))return!1;let t=this.getDirection(),r=this.getTopLeftCorner(),i=this.getBottomRightCorner(),a=e.getTopLeftCorner(),g=e.getBottomRightCorner();return this.from.row=Math.min(r.row,a.row),this.from.col=Math.min(r.col,a.col),this.to.row=Math.max(i.row,g.row),this.to.col=Math.max(i.col,g.col),this.setDirection(t),!0}getDirection(){return this.from.row<=this.to.row&&this.from.col<=this.to.col?"NW-SE":this.from.row<=this.to.row&&this.from.col>=this.to.col?"NE-SW":this.from.row>=this.to.row&&this.from.col>=this.to.col?"SE-NW":this.from.row>=this.to.row&&this.from.col<=this.to.col?"SW-NE":"NW-SE"}setDirection(e){let t,r;switch(e){case"NW-SE":t=this.getTopLeftCorner(),r=this.getBottomRightCorner(),this.from=t,this.to=r;break;case"NE-SW":t=this.getTopRightCorner(),r=this.getBottomLeftCorner(),this.from=t,this.to=r;break;case"SE-NW":t=this.getBottomRightCorner(),r=this.getTopLeftCorner(),this.from=t,this.to=r;break;case"SW-NE":t=this.getBottomLeftCorner(),r=this.getTopRightCorner(),this.from=t,this.to=r}}getTopLeftCorner(){return{row:Math.min(this.from.row,this.to.row),col:Math.min(this.from.col,this.to.col)}}getBottomRightCorner(){return{row:Math.max(this.from.row,this.to.row),col:Math.max(this.from.col,this.to.col)}}getTopRightCorner(){return{row:Math.min(this.from.row,this.to.row),col:Math.max(this.from.col,this.to.col)}}getBottomLeftCorner(){return{row:Math.max(this.from.row,this.to.row),col:Math.min(this.from.col,this.to.col)}}getBordersSharedWith(e){if(!this.includesRange(e))return[];let t={top:Math.min(this.from.row,this.to.row),bottom:Math.max(this.from.row,this.to.row),left:Math.min(this.from.col,this.to.col),right:Math.max(this.from.col,this.to.col)},r={top:Math.min(e.from.row,e.to.row),bottom:Math.max(e.from.row,e.to.row),left:Math.min(e.from.col,e.to.col),right:Math.max(e.from.col,e.to.col)},i=[];return t.top===r.top&&i.push("top"),t.right===r.right&&i.push("right"),t.bottom===r.bottom&&i.push("bottom"),t.left===r.left&&i.push("left"),i}forAll(e){return i6(this.getTopLeftCorner(),this.getBottomRightCorner(),e)}*iterateCoords(){let e=this.getTopLeftCorner(),t=this.getBottomRightCorner();for(let r=e.row;r<=t.row;r++)for(let i=e.col;i<=t.col;i++)yield{row:r,col:i}}normalize(){let e=this.getTopLeftCorner(),t=this.getBottomRightCorner();return this.from=e,this.to=t,this}expandRowCol(e,t,r){this.from[e]=Math.min(t,this.from[e]),this.to[e]=Math.max(r,this.to[e])}expandRow(e,t){this.expandRowCol("row",e,t)}expandCol(e,t){this.expandRowCol("col",e,t)}isMergeable(e,t,r){return e==="row"?this.isVertMergeable(t,r):this.isHoriMergeable(t,r)}isHoriMergeable(e,t){let r=this.getTopLeftCorner(),i=this.getBottomRightCorner(),a=e.getTopLeftCorner(),g=e.getBottomRightCorner();if(r.row===a.row&&i.row===g.row){if(!t&&r.col<=g.col+1&&a.col<=i.col+1)return!0;if(t&&(r.col===g.col+1||a.col===i.col+1))return!0}return!1}isVertMergeable(e,t){let r=this.getTopLeftCorner(),i=this.getBottomRightCorner(),a=e.getTopLeftCorner(),g=e.getBottomRightCorner();if(r.col===a.col&&i.col===g.col){if(!t&&r.row<=g.row+1&&a.row<=i.row+1)return!0;if(t&&(r.row===g.row+1||a.row===i.row+1))return!0}return!1}insertAndSplit(e,t,r){let i=this.getDirection(),a=null;return this.normalize(),this.from[e]>=t?(this.from[e]+=r,this.to[e]+=r):this.to[e]>=t&&((a=this.clone()).from[e]=t+r,a.to[e]+=r,this.to[e]=t-1),this.setDirection(i),a}getOverlap(e){if(!this.overlaps(e))return null;let t=this.getTopLeftCorner(),r=this.getBottomRightCorner(),i=e.getTopLeftCorner(),a=e.getBottomRightCorner(),g=Math.max(t.row,i.row),R=Math.min(r.row,a.row);return new sn(g,Math.max(t.col,i.col),R,Math.min(r.col,a.col))}toArray(){let e=this.getTopLeftCorner(),t=this.getBottomRightCorner();return[e.row,e.col,t.row,t.col]}diff(e,t,r){let i=this.clone().normalize();if(t>this.to[e]||r<=0)return i;let a=t+r-1,g=Math.max(t,i.from[e]),R=Math.min(a,i.to[e])-g+1;return(e==="row"?i.getHeight():i.getWidth())<=R?null:(a<this.from[e]?(i.from[e]-=r,i.to[e]-=r):(i.from[e]-=g-t,i.to[e]-=R+g-t),i)}diffRow(e,t){return this.diff("row",e,t)}diffCol(e,t){return this.diff("col",e,t)}shiftOffset(e){return this.shift("row",e.row??0).shift("col",e.col??0)}shift(e,t){return this.from[e]+=t,this.to[e]+=t,this}listRows(){let e=[],t=this.getTopLeftCorner(),r=this.getBottomRightCorner();for(let i=t.row;i<=r.row;i++)e.push(i);return e}listCols(){let e=[],t=this.getTopLeftCorner(),r=this.getBottomRightCorner();for(let i=t.col;i<=r.col;i++)e.push(i);return e}sliceRow(){let e=[],t=this.getTopLeftCorner(),r=this.getBottomRightCorner();for(let i=t.row;i<=r.row;i++)e.push(new sn(i,t.col,i,r.col));return e}sliceCol(){let e=[],t=this.getTopLeftCorner(),r=this.getBottomRightCorner();for(let i=t.col;i<=r.col;i++)e.push(new sn(t.row,i,r.row,i));return e}move(e,t){let r=this.getDirection();this.normalize();let i=this.from[e],a=this.to[e];i>=t.sec[0].start&&i<=t.sec[0].end?!t.isBackward&&a>=t.sec[1].start&&a<=t.sec[1].end?i=t.sec[0].start:i+=t.sec[1].amount:i>=t.sec[1].start&&i<=t.sec[1].end&&(i-=t.sec[0].amount),a>=t.sec[0].start&&a<=t.sec[0].end?a+=t.sec[1].amount:a>=t.sec[1].start&&a<=t.sec[1].end&&(t.isBackward&&this.from[e]>=t.sec[0].start&&this.from[e]<=t.sec[0].end?a=t.sec[1].end:a-=t.sec[0].amount);let g=e==="row"?this.getHeight():this.getWidth(),R=null;if(a-i+1!==g){let L;R=this.clone(),L=i<this.from[e]||a<this.to[e]?t.sec[0]:t.sec[1],R.from[e]=L.start,R.to[e]=L.end,i<this.from[e]&&a<this.to[e]?R.from[e]=this.from[e]:i>this.from[e]&&a>this.to[e]&&(R.to[e]=this.to[e])}return this.from[e]=i,this.to[e]=a,this.setDirection(r),R}moveAndSplit(e,t){let r=this.getDirection();this.normalize();let i=null,a=null,g=null,R=t.isBackward?t.sec[1]:t.sec[0],L=e==="row"&&2&this.type||e==="col"&&1&this.type;if(this.from[e]>t.sec[1].end||this.to[e]<t.sec[0].start||L)i=this;else{if((g=this.clone()).from[e]=R.start,g.to[e]=R.end,g=this.getOverlap(g),i=this.diff(e,R.start,R.amount)){let W=t.isBackward?t.sec[0].start:t.sec[0].start+t.sec[1].amount,K=t.isBackward?t.sec[1].amount:t.sec[0].amount;a=i.insertAndSplit(e,W,K)}g&&g.shift(e,t.delta)}return this.setDirection(r),{remain:i,bottom:a,splited:g}}createRowCol(e,t,r){if(e==="row"&&2&this.type||e==="col"&&1&this.type){this.to[e]+=r;return}this.from[e]>=t&&(this.from[e]+=r),this.to[e]>=t&&(this.to[e]+=r)}removeRowCol(e,t,r){return o6(this.from,e,t,r),o6(this.to,e,t,r),(!(this.from[e]<0)||!(this.to[e]<0))&&(this.from[e]<0&&(this.from[e]=this.to[e]>=t?t:t-1),this.to[e]<0&&(this.to[e]=this.from[e]>=t?t:t-1),!0)}static fromArray(e){return new sn(e[0],e[1],e[2],e[3])}static fromRange(e){return new sn(e.from.row,e.from.col,e.to.row,e.to.col)}}class Ap extends sn{constructor(e,t,r,i,a,g){super(e,t,r,i,a),this.highlight=g||new sn(this.from.row,this.from.col,this.from.row,this.from.col)}clone(){return new Ap(this.from.row,this.from.col,this.to.row,this.to.col,this.type,this.highlight.clone())}createRowCol(e,t,r){super.createRowCol(e,t,r),this.highlight.createRowCol(e,t,r)}removeRowCol(e,t,r){let i=super.removeRowCol(e,t,r),a=this.highlight.removeRowCol(e,t,r);if(i===!1)return!1;if(a===!1){let g=this.highlight;g.from.row=g.to.row=this.from.row,g.from.col=g.to.col=this.from.col}return!0}}function o6(n,e,t,r){n[e]>t+r-1?n[e]-=r:n[e]>=t&&(n[e]=-1)}function a6(n,e,t,r){let i=Math.max(Math.min(n.row,e.row),0),a=Math.max(Math.min(n.col,e.col),0);return[i,a,Math.min(Math.max(n.row,e.row),t),Math.min(Math.max(n.col,e.col),r)]}function TC(n){let e=new n6;for(let t of n){if(e.hasOverlap(t))return!0;e.insert(t)}return!1}function oa(n,e,t,r,i){return new sn(n,e,t,r,i)}function Cr(n){return n==null||n===""}function kC(n,e){return n!==e&&!(Cr(n)&&Cr(e))&&!(Zr(n)&&Zr(e)&&n.equals(e))}function RC(n){return kC(n[2],n[3])}function s6(n){if(!be(n))return n;let e=0,t=!1;for(let r=0;r<n.length;r++)switch(n.charAt(r)){case"(":!t&&e++;break;case")":if(!t&&--e<0)return n;break;case'"':t=!t}return t?n:n+Array(e+1).join(")")}let ene=new Map([[-1,"datetime"],[-2,"short_date"],[-3,"long_time"],[-4,"current_format"]]);function ZE(n,e){if(e===-5)return"0.00%";if(e>0)return n.getStyleManager().getNumberFormat(e).fc;let t=ene.get(e);return n.getLocale().getData()[t]||""}function Ma(n,e,t,r){fi(n,e)||(n[e]={}),fi(n[e],t)||(n[e][t]=[]),n[e][t].push(r)}function Mp(n,e,t){fi(n,e)||(n[e]=[]),n[e].push(t)}function ga(n){return n!=null}class nr{constructor(e,t,r,i){this.sheetInfo=e??void 0,this.from=t,this.to=r,this.type=i}toRange(){let e=this.sheetInfo?.shName;switch(this.type){case qr.all:case qr.row:return new ta(this.from.row,this.to.row,e);case qr.col:return new na(this.from.col,this.to.col,e);default:return new mi(this.from,this.to,e)}}toSynoRange(){return oa(this.from.row,this.from.col,this.to.row,this.to.col,this.type)}toLabel(){return this.toRange().toLabel()}getWidth(){return this.to.col-this.from.col+1}getHeight(){return this.to.row-this.from.row+1}eachCell(e){for(let t=this.from.row;t<=this.to.row;t++)for(let r=this.from.col;r<=this.to.col&&e(t,r)!==!1;r++);}static create(e,t){return nr.createByWorkbook(e,t.getWorkbook(),t.sheetId)}static createRanges(e,t){let r=t.getWorkbook();return kp(e).map(i=>nr.createByWorkbook(i,r,t.sheetId)).filter(ga)}static createByWorkbook(e,t,r){let i=zf(t.getNameManager().getVariable(e)?.value??e);return i?nr.createFromRangeByWorkbook(i,t,r):null}static toLabel(e,t){return new nr(t?{sheetId:t.sheetId,shName:t.getName()}:null,e.from,e.to,e.type).toLabel()}static createFromRange(e,t){let r=t.getWorkbook(),i=r.getIdByName(e.shName??"")??t.sheetId;return nr.createFromRangeByWorkbook(e,r,i)}static createFromRangeByWorkbook(e,t,r){let i,a;if(e.shName){let K=t.getIdByName(e.shName);if(!K)return null;r=K}if(!r||!t.hasSheet(r))return null;let g=e.shName??t.getNameById(r),{rowCount:R,colCount:L}=t.getSheetDimension(r),W=qr.cell;if(e.constructor===mi)i={...e.from},a={...e.to};else if(e.constructor===ta)i={row:e.from,col:0},a={row:e.to,col:L-1},W=qr.row;else{if(e.constructor!==na)return null;i={row:0,col:e.from},a={row:R-1,col:e.to},W=qr.col}if(i.row>=R||i.col>=L)return null;if(a.row>=R&&(a.row=R-1),a.col>=L&&(a.col=L-1),W===qr.cell){let K=i.col===0&&a.col===L-1,Q=i.row===0&&a.row===R-1;W=(K?qr.row:qr.cell)|(Q?qr.col:qr.cell)}return new nr({sheetId:r,shName:g},i,a,W)}static createFromCoords(e,t,r){return nr.createFromSynoRange(oa(e,t,e,t),r)}static eachCell(e,t,r){let i=nr.create(e,t);i!==null&&i.eachCell(r)}static textToRange(e,t){let r=zf(e);if(!r||!t)return;let i=nr.createFromRange(r,t);if(i)return i.toSynoRange()}static textToRangeByWorkbook(e,t,r){let i=zf(e);if(i)return nr.createFromRangeByWorkbook(i,t,r)?.toSynoRange()}static textToMultiRanges(e,t){var r,i;return r=e,i=t,kp(r).map(a=>nr.textToRange(a,i)).filter(ga)}static createFromSynoRange(e,t){return new nr(t?{sheetId:t.sheetId,shName:t.getName()}:null,e.from,e.to,e.type)}}function Wf(n){return n.map(e=>nr.toLabel(e))}class QE extends zr{constructor(e,t,r){super(e,null,t),this.cls=r}toNode(){let e=super.toNode();return this.cls&&(e.className=this.cls),e}split(e){let t=new QE(this.text.substr(e),this.startOffset+e);return this.text=this.text.substring(0,e),t}}class l6 extends Ua{constructor(e,t){super(null,null);let r=Ji(e.getWorkbook().getLocale().getLocaleConverter().normalize(t));this.setTokenList(r,e,t)}setTokenList(e,t,r){this.tokenList=e,this.fillTexts(t,r)}getTokenList(){return this.tokenList}fillTexts(e,t){this.texts.length=0;let r=0,i=0,a=e.getWorkbook().getLocale().getLocaleConverter(),g=[];this.tokenList.forAllTokens(R=>{let L=t?t.slice(r,r+R.getText().length):a.localizeToken(R,g),W=new QE(L,r,"formula-text");r+=L.length,(R.isRange()||R.isVariable()&&nr.create(R.getValue(),e))&&(i=i%8+1,W.cls+=` formula-range-${i}`),this.texts.push(W)})}}let tne=class{constructor(n){this.limit=n,this.stack=[],this.index=-1}undo(n){let e=this.index-1,t=this.stack[e];t&&(this.index=e,n(t))}redo(n){let e=this.index+1,t=this.stack[e];t&&(this.index=e,n(t))}add(n){this.stack.length>this.index+1&&(this.stack.length=this.index+1),this.stack.length>=this.limit&&this.stack.shift(),this.index++,this.stack.push(n)}clear(){this.stack.length=0,this.index=-1}},eA=function(){return Bl.Date.now()};var nne=/\s/;let rne=function(n){for(var e=n.length;e--&&nne.test(n.charAt(e)););return e};var ine=/^\s+/,u6=NaN,one=/^[-+]0x[0-9a-f]+$/i,ane=/^0b[01]+$/i,sne=/^0o[0-7]+$/i,lne=parseInt;let Dp=function(n){if(typeof n=="number")return n;if(Sc(n))return u6;if(fa(n)){var e,t=typeof n.valueOf=="function"?n.valueOf():n;n=fa(t)?t+"":t}if(typeof n!="string")return n===0?n:+n;n=(e=n)?e.slice(0,rne(e)+1).replace(ine,""):e;var r=ane.test(n);return r||sne.test(n)?lne(n.slice(2),r?2:8):one.test(n)?u6:+n};var une=Math.max,hne=Math.min;let tA=function(n,e,t){var r,i,a,g,R,L,W=0,K=!1,Q=!1,oe=!0;if(typeof n!="function")throw TypeError("Expected a function");function se(Me){var Oe=r,ze=i;return r=i=void 0,W=Me,g=n.apply(ze,Oe)}function he(Me){var Oe=Me-L,ze=Me-W;return L===void 0||Oe>=e||Oe<0||Q&&ze>=a}function me(){var Me,Oe,ze,We=eA();if(he(We))return ye(We);R=setTimeout(me,(Me=We-L,Oe=We-W,ze=e-Me,Q?hne(ze,a-Oe):ze))}function ye(Me){return R=void 0,oe&&r?se(Me):(r=i=void 0,g)}function Te(){var Me,Oe=eA(),ze=he(Oe);if(r=arguments,i=this,L=Oe,ze){if(R===void 0)return W=Me=L,R=setTimeout(me,e),K?se(Me):g;if(Q)return clearTimeout(R),R=setTimeout(me,e),se(L)}return R===void 0&&(R=setTimeout(me,e)),g}return e=Dp(e)||0,fa(t)&&(K=!!t.leading,a=(Q="maxWait"in t)?une(Dp(t.maxWait)||0,e):a,oe="trailing"in t?!!t.trailing:oe),Te.cancel=function(){R!==void 0&&clearTimeout(R),W=0,r=L=i=R=void 0},Te.flush=function(){return R===void 0?g:ye(eA())},Te},h6=function(n,e,t){var r=!0,i=!0;if(typeof n!="function")throw TypeError("Expected a function");return fa(t)&&(r="leading"in t?!!t.leading:r,i="trailing"in t?!!t.trailing:i),tA(n,e,{leading:r,maxWait:e,trailing:i})},pl=function(n){var e=n==null?0:n.length;return e?n[e-1]:void 0},nA=new tne(100);class c6 extends Mo{constructor(e,t,r){super(e,r),this.pair=t||null,this.isActive=!1,this.keydownStatus=null,this.isFullEditMode=!1,this.formulaMenu=null,this.validMenu=null,this._saveStateAfterInput=h6(this._saveState.bind(this),400),this.formulaTip=null,this._initInputMode(),(0,ne.watch)(this.instance.cellEditorData.direction,i=>{this._setDirection(i)}),(0,ne.watch)(this.instance.cellEditorData.isFormulaMode,()=>{this.setSpellCheck()})}get isFormulaMode(){return this.instance.cellEditorData.isFormulaMode.value}set isFormulaMode(e){this.instance.cellEditorData.setFormulaMode(e)}updateKeydownStatus(){this.keydownStatus={textSelection:null};let e=null;this.isFormulaMode&&(e=this.getSelection().getRange())&&(this.keydownStatus.textSelection={...e})}clearKeydownStatus(){this.keydownStatus=null}_initEl(){let e=super._initEl();return A(e,["selectabletext","synoInput","syno-sh-editor-comp"]),e}_renderTextList(){this._render(),this._syncPair()}focus(e){super.focus(e),e||(this.onPositionChange(),this.onUserChangeSelection())}_initInputMode(){this._setInputMode("none")}_syncPair(){this.pair&&(this.pair.textList?this.textList.syncTo(this.pair.textList):this.pair.textList=this.textList,this.pair._render())}_render(){this._setContents(this.textList.toFragment())}_parse(){super._parse(),this.textList=this._transformIfFormula(this.textList),this._updateDirection()}_transformIfFormula(e){let t=e.texts[0];if(this.isFormulaMode=!!(t&&be(t.text)),this.isFormulaMode)return new l6(this.instance.sheet,e.getPlainText());if(e instanceof l6){let r=e.getPlainText();(e=new Ua(this.defaultStyle,this.overrideStyle)).append(new zr(r,null,0))}return e}_updateDirection(){this.instance.cellEditorData.triggerAutoUpdateDir(this.textList.getPlainText())}_shouldParseStyle(){let e=!1;return this.iterateNodes((t,r)=>(e=be(r),!1)),!e}_registerEventListeners(){super._registerEventListeners();let{eventManager:e,el:t}=this;e.addEventListener(t,"compositionstart",r=>{this.isIMEComposition=!0,this._notifyInputStart()}),e.addEventListener(t,"compositionend",()=>{this.isIMEComposition=!1,this.isActive&&(ke()&&this.onInput(),this._onTextChanged(this.getSelection(),this.isFormulaMode,{forceRender:!0}))}),e.addEventListener(t,"cut",r=>this.onCut(r)),e.addEventListener(t,"copy",r=>this.onCopy(r)),e.addEventListener(t,"keyup",r=>this.onKeyUp(r)),e.addEventListener(t,"input",r=>{r.inputType.startsWith("insert")&&this._notifyInputStart(),this.onInput()}),e.addEventListener(t,"mouseup",()=>this.onMouseUp()),e.addEventListener(t,"click",r=>this.onClick(r)),e.addEventListener(t,"wheel",r=>r.stopPropagation()),e.addEventListener(t,"focusout",r=>this.onFocusOut(r)),e.addEventListener(t,"focusin",()=>this.onFocusIn()),e.addEventListener(document,"selectionchange",()=>this.onPositionChange()),e.addEventListener(t,"contextmenu",r=>{this.isActive&&r.stopPropagation()})}_notifyInputStart(){this.isActive||this.instance.runHooks("inputStart")}_handleNumpadDecimalKeyDown(e){if(e.keyCode===110&&!e.shiftKey&&!e.altKey&&!e.ctrlKey&&!e.metaKey){let t=this.instance.sheet.getWorkbook().getLocale().getData().dec_sym;if(t!==".")return this._notifyInputStart(),this.insertText(t),e.preventDefault(),!0}return!1}onKeyDown(e){if(this._handleNumpadDecimalKeyDown(e)||!this.isActive)return;this.keydownStatus===null&&this.updateKeydownStatus(),this.instance.runHooks("onInputKeyDown",this,e);let t=e.shiftKey,r=e.altKey,i=(e.ctrlKey||e.metaKey)&&!r,a=this._getFormulaMenu();switch(e.keyCode){case 17:case 224:case 91:case 93:e.stopPropagation();return;case J.BACKSPACE:case J.DELETE:case J.HOME:case J.END:e.stopPropagation();break;case J.ARROW_UP:if(a.isExpanded()&&a.hasSelectableFormulas())a.selectPrev(),e.preventDefault();else if(this.validMenu&&this.validMenu.isVisible())this.validMenu.onUp(e),e.preventDefault();else{if(!this.isFullEditMode&&!this.isFormulaMode)return;a.isExpanded()&&a.collapse(),this.onMoveKey({row:-1,col:0},e)}e.stopPropagation();break;case J.ARROW_DOWN:if(a.isExpanded()&&a.hasSelectableFormulas())a.selectNext(),e.preventDefault();else if(this.validMenu&&this.validMenu.isVisible())this.validMenu.onDown(e),e.preventDefault();else{if(!this.isFullEditMode&&!this.isFormulaMode)return;a.isExpanded()&&a.collapse(),this.onMoveKey({row:1,col:0},e)}e.stopPropagation();break;case J.ARROW_LEFT:if(!this.isFullEditMode&&!this.isFormulaMode)return;a.isExpanded()?a.hasSelectableFormulas()||(a.collapse(),this.onMoveKey({row:0,col:-1},e)):this.onMoveKey({row:0,col:-1},e),e.stopPropagation();break;case J.ARROW_RIGHT:if(!this.isFullEditMode&&!this.isFormulaMode)return;a.isExpanded()?a.hasSelectableFormulas()||(a.collapse(),this.onMoveKey({row:0,col:1},e)):this.onMoveKey({row:0,col:1},e),e.stopPropagation();break;case J.ENTER:i||r?(this.insertText(`
`),e.stopPropagation()):a.isExpanded()?(a.select(),e.stopPropagation()):this.validMenu&&this.validMenu.isVisible()&&this.validMenu.activeItem?(this.validMenu.onEnter(e),e.stopPropagation()):this.onInput(),this.clearKeydownStatus(),e.preventDefault();break;case J.TAB:!i&&!r&&a.isExpanded()&&(a.select(),e.stopPropagation(),e.preventDefault()),this.clearKeydownStatus();break;case J.ESCAPE:a.isExpanded()&&(a.collapse(),e.stopPropagation()),this.clearKeydownStatus();break;case J.A:case J.X:case J.C:case J.V:i&&e.stopPropagation(),i&&e.keyCode===J.A||this.clearKeydownStatus();break;case J.S:i&&e.preventDefault();break;case J.Y:case J.Z:i&&(nA[e.keyCode!==J.Z||t?"redo":"undo"](g=>this._restoreState(g)),this.clearKeydownStatus(),e.stopPropagation(),e.preventDefault());break;case J.F4:this.isFormulaMode&&(this._changeRefMode(),e.stopPropagation())}}onInput(){if(!this.isActive)return;let e=this.textList,t=this.isFormulaMode,r=this._getPlainText();this._parse(),e&&this.textList.getPlainText()===r||(this._onTextChanged(this.getSelection(),t),this.clearKeydownStatus())}onKeyUp(){if(!this.isActive||!this.keydownStatus)return;let{textSelection:e}=this.keydownStatus,t=this.getSelection().getRange();t&&(t.start!==e?.start||t.end!==e?.end)&&this.onUserChangeSelection(),this.clearKeydownStatus()}onAfterInsertText(e,t){this.textList=this._transformIfFormula(this.textList),this._updateDirection(),this._onTextChanged(e,this.isFormulaMode,{forceRender:!0,ignoreCaret:!0,selectionRange:{start:t,end:t}})}_onTextChanged(e,t,r){if(this.isIMEComposition)return void this._syncPair();let{forceRender:i,ignoreCaret:a,skipUndoStack:g,selectionRange:R}=r||{},L=this.isFormulaMode,W=t!==L;(L||W||i)&&(a||e.save(),this._renderTextList(),a||e.restore()),R&&e.setRange(R);let K=this.getTokenList();if(L){let{start:Q}=e.getSavedRange()||e.getRange();this._updateFormulaTips(K,Q,!0),this.instance.runHooks("afterFormatFormula",K,Q)}else this._syncPair(),this._getFormulaMenu().collapse();this._notifyFormulaPreview(K),W&&(this.setSpellCheck(),this.instance.runHooks("formulaModeChange",L)),(L||W)&&this.instance.fastRender(),g||this._saveStateAfterInput(e.getSavedRange()||e.getRange()),this.instance.runHooks("inputTextChanged",this.textList.getPlainText())}renderByTokenList(e){e===void 0&&(e=null);let t=this.getTokenList();t&&(this.textList.fillTexts(this.instance.sheet),this._renderTextList(),this.clearKeydownStatus(),this._notifyFormulaPreview(t),e!==null&&this.getSelection().setRange(typeof e=="number"?{start:e,end:e}:e))}onClick(e){this.onUserChangeSelection(),this.instance.runHooks("onInputClicked",this,e),e.stopPropagation()}onMouseUp(){this.onUserChangeSelection()}onMoveKey(e,t){this.instance.runHooks("onInputMoveKey",this,e,t),this.instance.fastRender()}onFocusOut(e){this.instance.cellEditorData.setFocusState(!1),(!ue()||this.getSelection().isSelectionInEditor())&&(e.relatedTarget?.classList.contains("synoInput")?this.clearSavedSelection():this.saveSelection())}onFocusIn(){this.instance.cellEditorData.setFocusState(!0),this.isActive&&this.restoreSavedSelection()}onPositionChange(){let e=this.getSelection();if(this.isActive&&e.isSelectionInEditor())if(this.isFormulaMode){let{start:t}=e.getSavedRange()||e.getRange(),r=this.getTokenList();this._setParentheses(r,t)}else this._updateToolbarStatus(e)}onUserChangeSelection(){let e=this.getSelection();if(!this.isActive||!e.isSelectionInEditor()||!this.isFormulaMode)return;let{start:t}=e.getSavedRange()||e.getRange(),r=this.getTokenList();this._updateFormulaTips(r,t,!1),this.instance.runHooks("afterUserChangedInputPosition",r,t)}_updateToolbarStatus(e){let t=e.getStartContainer(),r=t&&t.nodeType===3?t.parentNode:t,i=r&&r._s||this.defaultStyle;i&&this.instance.getUIBridge().editor.onTextSelectionChange(i)}_setParentheses(e,t){var r,i,a;let g="syno-o-sh-formula-match-paren",R=this.el.getElementsByClassName(g);for(let Q=R.length-1;Q>=0;Q--)r=R[Q],u(r,g);if(!e)return;let L=e.getTokenByPos(t),W=L&&L.token;if(!W||!W.isParenthesis()||!W.getPair())return;let K=W.getPair();i=this._getSpanAtPosition(L.pos+W.getText().length),A(i,g),a=this._getSpanAtPosition(e.getPosByToken(K)+K.getText().length),A(a,g)}_getSpanAtPosition(e){let t=null;return this.iterateNodes((r,i,a)=>{if(a<e&&e<=a+i.length)return t=r,!1}),t&&t.nodeType===3?t.parentNode:t}_isFixedEditor(){return!1}_updateFormulaTips(e,t,r){r===void 0&&(r=!1);let i=0,a=[],g=null;if(!e)return;e.forAllTokens((Q,oe,se)=>{if(Q.isLeftParenthesis()){i++;let he=pl(a);he&&he.depth+1===i&&he.argsCount++}else if(Q.isRightParenthesis())i--,pl(a)&&pl(a).depth===i&&a.pop();else if(Q.isFunction())a.push({token:Q,depth:i,argsCount:-1});else if(Q.isComma()){let he=pl(a);he&&he.depth+1===i&&he.argsCount++}if(oe<t&&t<=oe+Q.getText().length)return g={token:Q,depth:i},!1});let R=pl(a),L=g&&g.token,W=this._getFormulaMenu();L?.getText()==="="&&t===1&&e.size()===1?W.showAiItem()?W.align(this.getEl()):W.collapse():(L?.isFunction()||L?.isVariable())&&r?(W.query(L.getText()),W.align(this.getEl())):W.collapse();let K=this.getFormulaTip();if(R&&g&&!W.isExpanded()){let Q=R.token.getText();K.setState(Q,R.argsCount),K.align(this.getEl(),this._isFixedEditor())}else K.collapse()}_changeRefMode(){let e,t,r,i,{start:a,end:g}=this.getSelection().getRange(),R=this.getTokenList(),L=this._getPlainText().length,W=0;for(let Q of R.flatten()){let oe=W,se=W+Q.getText().length;if(W=se,oe<=a&&a<=se&&(e={token:Q,offset:a-oe}),oe<=g&&g<=se&&(t={token:Q,offset:g-oe}),oe<=g&&se>=a&&Q.isRange()){let he=Ar.changeRefMode(Q.getValue());Q.setValue(he),r??=Q,i=Q,Q===e?.token&&(e.offset=Math.min(e.offset,e.token.getText().length)),Q===t?.token&&(t.offset=Math.min(t.offset,t.token.getText().length))}if(W>g)break}if(!r||!i||!e||!t)return;let K={start:Math.min(R.getPosByToken(r),R.getPosByToken(e.token)+e.offset),end:Math.max(R.getPosByToken(i)+i.getText().length,R.getPosByToken(t.token)+t.offset)};a===g&&g===L&&(K.start=K.end),this.renderByTokenList(K)}_notifyFormulaPreview(e){this.instance.runHooks("afterRefreshTokens",e,this)}_saveState(e){nA.add({range:e,value:this.textList?this.textList.getValue():""})}_restoreState(e){let{range:t,value:r}=e,i=this.getSelection();this._setValue(r),this._onTextChanged(i,this.isFormulaMode,{skipUndoStack:!0,ignoreCaret:!0,forceRender:!0,selectionRange:t}),t||i.setCaretToLast()}insertFormulaText(e){let t=this.getSelection(),r=this.getTokenList();if(!r)return;t.save();let i=r.insertFormulaText(e,t.getSavedRange().start);this.textList.setTokenList(r,this.instance.sheet),t.shift(i),this._onTextChanged(t,this.isFormulaMode,{ignoreCaret:!0}),t.restore()}_getFormulaMenu(){return this.formulaMenu}setFormulaMenu(e){this.formulaMenu=e}closeFormulaMenu(){this._getFormulaMenu().collapse()}setValidMenu(e){this.validMenu=e}_setActive(e){this.isActive=e}setFullEditMode(e){this.isFullEditMode=e}setReadonly(e){var t,r;this.el.contentEditable=!e;let i="readonly";e?(t=this.el,A(t,i)):(r=this.el,u(r,i))}createPair(){return this.pair||(this.pair=new cne(this.instance,this,this.selectionSaver))}setFormulaTip(e){this.formulaTip=e}getFormulaTip(){return this.formulaTip}setSpellCheck(){this.el.spellcheck=!this.isFormulaMode}_setInputMode(e){this.el.inputMode=e}_setDirection(e){this.el.dir=e}onOpen(e){e!=="input"&&this._setInputMode(""),this.clearSavedSelection(),this._setActive(!0),this.instance.cellEditorData.setOpenState(!0),this.updateKeydownStatus(),this.setSpellCheck(),this._saveState(null)}onClose(){this._setInputMode("none"),this.clearSavedSelection(),this._setActive(!1),this.instance.cellEditorData.setOpenState(!1),this.textList=null,this.isFormulaMode=!1,this.setFullEditMode(!1),this.setDefaultStyle(null),this.setOverrideStyle(null),this.getFormulaTip().collapse(),this._getFormulaMenu().collapse(),nA.clear(),this.empty()}onAfterSetStyle(e){super.onAfterSetStyle(e),this._saveState(e)}_setValue(e){let t=new Ua(this.defaultStyle,this.overrideStyle);Zr(e)?t.assignRichText(e):t.append(new zr(ds(e),null,0)),this.textList=this._transformIfFormula(t),this._updateDirection()}setValue(e,t){t===void 0&&(t=!1),this._setValue(e),t&&this._syncPair(),this._render()}getValue(){return this.textList?this.textList.getFinalValue():super.getValue()}_getPlainText(){return this.textList?this.textList.getPlainText():super.getValue()}getTokenList(){return this.textList&&this.textList.tokenList}setStyle(e,t){this.isFormulaMode||super.setStyle(e,t)}toggleStyle(e,t){if(!(t=t||this.getSelection().getRange())||!this.textList)return!1;let r=!this.textList.isStyleActive(e,t.start,t.end);return this.setStyle({[e]:r},t),r}destroy(){this.eventManager.destroy()}onCopy(e){this.instance.getPlugin("synoCopyPaste").reset(),e.stopPropagation()}onCut(e){this.instance.getPlugin("synoCopyPaste").reset(),e.stopPropagation()}}class cne extends c6{constructor(e,t,r){super(e,t,r),this._setActive(!0),this.setFullEditMode(!0)}_initInputMode(){this._setInputMode("")}_render(){this._setContents(this.textList.toFragment(!0))}_shouldParseStyle(){return!1}getFormulaTip(){return this.pair.getFormulaTip()}_getFormulaMenu(){return this.pair._getFormulaMenu()}setStyle(e,t){(t=t||this.getSelection().getRange())&&this.pair.setStyle(e,t)}_isFixedEditor(){return!0}onCopy(e){super.onCopy(e),e.preventDefault(),(e.clipboardData||window.clipboardData).setData("Text",this.getSelection().toString())}onCut(e){this.onCopy(e),this.getSelection().deleteContents(),setTimeout(()=>this.onInput(),0)}}let rA=function(n){return n===!0||n===!1||ws(n)&&ru(n)=="[object Boolean]"},Op=function(n){return n==null};function d6(n,e,t,r){let i=n.getDataAtCell(e,t),a=n.getCellStyle(e,t);return Cr(i)&&!a?Cr(r)?"":r.toString():(arguments.length<4&&(r=i),function(g,R,L,W){Cr(g)&&(g="");let K=W.getSSF(),Q=W.getData();return Zr(g)?(g=g.clone(),L?g.insertFirst("'"):g):L?"'"+g:R?.isDate()?K.render(Q.short_date,g):R?.isDuration()?K.render(Q.duration,g):R?.isTime()&&!Op(g)&&g<1?K.render(Q.long_time,g):R?.isDateTime()?K.render(Q.datetime,g):rA(g)?g?"TRUE":"FALSE":R?.fc&&Le(R.fc)?K.render(R.fc,g):(rr(g)&&(g=Yi(g)),W.getLocaleConverter().localize(g).toString())}(r,a?.getNumberFormat(),a?.getQuotePrefix()??!1,n.getWorkbook().getLocale()))}function iA(n,e,t){if(be(e))return e.substr(1);let r=t&&t.text?null:n.getInputParser().parse(e)?.v;return rr(r)||rA(r)?r:e?xy(e):""}function xy(n){return`"${n.replaceAll('"','""')}"`}function oA(n,e,t){if(rr(e)){if(t&&t.date){let r=n.getData().short_date;try{let i=n.getSSF().format(r,e);if(i.d)return i.v}catch{}}return e.toString()}return rA(e)?e?"TRUE":"FALSE":Ee(e)?aA(e):e?"="+e:""}function aA(n){return n.slice(1,n.length-1).replaceAll('""','"')}let sA=/(https?:\/\/)?(?:www\.)?[-\w@:%.+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b[-\w()@:%+.~#?&/=*]*/,dne=RegExp("^"+sA.source+"$");function lA(n){return zs(n)&&dne.test(n)}function f6(n){if(!zs(n)||n[0]==="=")return;let e=n.match(sA);if(!e||(e.index??0)!==0)return;let t=e[0];if(!sA.test(n.slice((e.index||0)+t.length))){if(!e[1])if(function(r){let i=r.indexOf("/"),a=r;return i>-1&&(a=r.substring(0,i)),["com","ru","net","org","de","jp","uk","br","pl","in","it","fr","info","au","nl","cn","ir","es","cz","biz","kr","ca","eu","za","ua","co","gr","ro","se","tw","mx","vn","ch","at","be","tr","dk","tv","hu","me","ar","us","no","sk","fi","cl","id","nz","pt","by","ie","kz","il","my","cc","hk","sg","lt","edu","io","su","pk","xyz","bg","th","рф","hr","lv","pe","az","ae","rs","tk","ph","si","ee","mobi","pro","ws","ve","asia","ng","pw","gov","sa","nu","club","ma","cat","lk","ge","xxx","fm","uz","is","am","name","gl","moe"].includes(a=a.substr(a.lastIndexOf(".")+1).toLowerCase())}(t))t="http://"+t;else return;return{display:n,location:t}}}class g6{constructor(e){this.instance=e,this.createElements(),this.enabled=!0}createElements(){var e;this.panel=document.createElement("div"),this.instance.rootElement.appendChild(this.panel),e=this.panel,A(e,"editor-tooltip"),this.hide()}show(){this.enabled&&(this.panel.style.display="block")}hide(){this.panel.style.display="none"}setValue(e){this.panel.textContent=e}showAboveEditor(e,t){let r=this.instance.view.getCanvasBound(),i=r.y+2-30,a=r.x;this.panel.style.top=`${e+i}px`,this.panel.style.left=`${t+a}px`,this.show()}isVisible(){return this.panel.style.display==="block"}}class fne extends g6{createElements(){var e;super.createElements(),e=this.panel,A(e,"formula-preview")}showAboveInput(){this.panel.style.top="55px",this.panel.style.left="110px",this.show()}setEnable(e){this.enabled=e,this.enabled||this.hide()}isEnabled(){return this.enabled}setArrow(e){var t,r;e?(t=this.panel,A(t,"tooltip-arrow")):(r=this.panel,u(r,"tooltip-arrow"))}}class gne extends g6{createElements(){var e;super.createElements(),e=this.panel,A(e,"editor-location")}getWidth(){let e=this.panel.offsetWidth;return e>0?e+4:e}}var Nn=function(n){return n.Alter="alter",n.ApplyLink="applyLink",n.Autofill="autofill",n.ClearFormat="clearFormat",n.Cut="cut",n.Edit="edit",n.Format="format",n.Formula="formula",n.InsertedData="inserted_data",n.MergeCell="merge_cell",n.Paste="paste",n.PopulateData="populateData",n.Redo="redo",n.Remote="remote",n.RemoveLink="removeLink",n.RemoveValue="removeValue",n.Undo="undo",n.Validation="validation",n.PivotTable="pivotTable",n}({}),pu=B(95670),p6=B.n(pu);let Uf=15*!rt();class pne extends pu.EventEmitter{constructor(){super(),this.viewWidth=0,this.viewHeight=0,this.frozenWidth=0,this.frozenHeight=0,this.totalWidth=0,this.totalHeight=0,this.scrollTop=0,this.scrollLeft=0,this.rafTimer=null,this.debounceFireScrollEvent=tA(()=>this.emit("scroll"),0)}updateViewSize(e){this.viewWidth=Math.ceil(e.offsetWidth)-Uf,this.viewHeight=Math.ceil(e.offsetHeight)-Uf}getViewWidth(){return this.viewWidth}getViewHeight(){return this.viewHeight}getClientWidth(){return this.viewWidth-this.frozenWidth}getClientHeight(){return this.viewHeight-this.frozenHeight}getScrollWidth(){return this.totalWidth-this.frozenWidth}getScrollHeight(){return this.totalHeight-this.frozenHeight}setScrollTop(e){e=Math.ceil(Math.max(0,Math.min(this.totalHeight-this.viewHeight,e))),this.scrollTop!==e&&(this.scrollTop=e,this.scheduleUpdate(),this.debounceFireScrollEvent())}setScrollLeft(e){e=Math.ceil(Math.max(0,Math.min(this.totalWidth-this.viewWidth,e))),this.scrollLeft!==e&&(this.scrollLeft=e,this.scheduleUpdate(),this.debounceFireScrollEvent())}getScrollTop(){return this.scrollTop}getScrollLeft(){return this.scrollLeft}setFrozenHeight(e){this.frozenHeight=e,this.scheduleUpdate()}setFrozenWidth(e){this.frozenWidth=e,this.scheduleUpdate()}getFrozenHeight(){return this.frozenHeight}getFrozenWidth(){return this.frozenWidth}setTotalWidth(e){this.totalWidth!==e&&(this.totalWidth=e,this.setScrollLeft(this.scrollLeft),this.scheduleUpdate())}setTotalHeight(e){this.totalHeight!==e&&(this.totalHeight=e,this.setScrollTop(this.scrollTop),this.scheduleUpdate())}scheduleUpdate(){this.rafTimer===null&&(this.rafTimer=window.requestAnimationFrame(()=>{this.emit("update"),this.rafTimer=null}))}}class mne{constructor(e){this.instance=e,this.range=new sn(0,0,0,0),this.sheetId=null,this._opened=!1,this._refreshDeferred=!1,this.input=new c6(this.instance),this.inputHolder=this._createElements(),this._bindEvents(),this.locator=new gne(this.instance),this.preview=new fne(this.instance),this.originalValue=null,this.originalEditorValue="",this.nf=null,this.isLink=null,this.pivotMeta=null,this.sizeCssText="",this.cellCssText="",this.waitingRenderFn=null,this.hide()}_createElements(){let e=document.createElement("div");A(e,"syno-o-sh-editor-holder");let t=e.style;return t.top="0",t.left="0",e.appendChild(this.input.getEl()),this.instance.rootElement.appendChild(e),e}getValue(){return this.input.getValue()}setValue(e,t){let{syncPair:r,caretPosition:i}=t===void 0?{}:t;this.input.setValue(e,r),i!==void 0&&this.input===this.getActiveInput()&&this.input.onAfterInsertText(this.input.getSelection(),i)}insertText(e,t){this.input.insertText(e,t)}getInputPair(){return this.input.createPair()}getCellStyleCssText(e,t){let r=this.instance.sheet;if(!r)return"";let i=r.getCellProperty(e,t,"cfStyle")??{},a=this._getCellStyle(),g=a.getFont();return`background-color:#${i.bgColor||a.getFill().bg||"fff"};font-size:${g.size||10}pt;;font-family:"${g.name||"Arial"}";;color:#${i.color||g.color||"000000"};font-weight:${i.bold||g.bold?"bold":"normal"};font-style:${i.italic||g.italic?"italic":"normal"};`}_open(e,t){this._opened=!0;let{row:r,col:i}=this.range.from;this.cellCssText=this.getCellStyleCssText(r,i),this.deferRefreshDimensions(),this.input.onOpen(t),this.instance.runHooks("openEditor",r,i,e,t),e!==!1&&this.focus(e!=="tail")}close(){this.hide(),this.input.onClose(),this.preview.hide(),this.locator.hide();let e=this.input.getEl().style;e.minWidth="",e.maxWidth="",this._hideDatePicker(),this.originalValue=null,this.originalEditorValue="",this.pivotMeta=null,this.isLink=null,this.nf=null,this.instance.runHooks("closeEditor"),this.instance.fastRender()}focus(e){this.input.focus(e)}_refreshDimensions(){if(!this.isOpened())return;let e=this.instance.view,{from:{row:t,col:r}}=this.range,i=e.getCellEditBound(t,r);if(!i)return;let{x:a,y:g,width:R,height:L}=i;e.isRtl()?a=e.getViewWidth()-a-R+Uf:a-=1,g-=1,R+=1,L+=1;let W=e.getViewHeight(),K=e.getViewWidth();this.inputHolder.style.top=g+"px",this.inputHolder.style.left=`${a}px`;let Q=e.viewport.getZoomLevel();L/=Q,R=R/Q-10;let oe=Math.max(W-g-2,23)/Q,se=(K-a-9)/Q;this.inputHolder.style.display="block",this.sizeCssText=["min-height:"+Math.min(L,oe)+"px","max-height:"+oe+"px","min-width:"+Math.min(R,se)+"px","max-width:"+se+"px"].join(";"),this.updateEditorStyle(this.instance.cellEditorData.isFormulaMode.value)}setZoomLevel(e){re(this.inputHolder,e)}updateEditorStyle(e){let t=this.input.getEl(),r=this.cellCssText||"",i=this.sizeCssText||"";e?t.style.cssText=i:t.style.cssText=[i,r].join(";")}async updateFormulaPreview(e,t){if(!e||!this.preview.enabled||!this.sheetId)return void this.preview.hide();let r=s6(e.getText()).substr(1),{result:i,nfId:a,isLink:g}=await this.instance.getDataBridge().previewFormula(r,this.sheetId);Cr(i)||g?this.preview.hide():this.showFormulaPreview(i,a,t)}deferRefreshDimensions(){this._refreshDeferred=!0}showFormulaPreview(e,t,r){let i="General",a=this.instance.getDataBridge().getWorkbook();this.nf&&!Ne(this.nf.fc)?i=this.nf.fc:t&&(i=ZE(a,t));let g=a.getLocale().getSSF();this.preview.setValue(g.render(i,e)),this.refreshPreview(r)}getActiveInput(){return this.input.pair&&document.activeElement===this.input.pair.getEl()?this.input.pair:this.input}showEditorLocation(){this.refreshLocator(),this.preview.isVisible()&&this.refreshPreview(this.getActiveInput())}refreshLocator(){let e=this.instance.getDataBridge().getWorkbook(),t=new nr(this.sheetId&&this.isCrossSheet()?{sheetId:this.sheetId,shName:e.getNameById(this.sheetId)??""}:null,this.range.from,this.range.to,this.range.type).toLabel();this.locator.setValue(t);let{offsetTop:r,offsetLeft:i}=this.inputHolder;this.locator.showAboveEditor(r,i)}refreshPreview(e){let{offsetTop:t,offsetLeft:r}=this.inputHolder;e===this.input?(this.preview.setArrow(!this.locator.isVisible()),this.preview.showAboveEditor(t,r+this.locator.getWidth())):(this.preview.setArrow(!0),this.preview.showAboveInput())}_bindEvents(){if(this.instance.addHook("afterScroll",()=>{this.isOpened()&&this.showEditorLocation()}),this.instance.addHook("afterRender",()=>{this._refreshDeferred&&(this._refreshDeferred=!1,this._refreshDimensions()),this.waitingRenderFn&&this.waitingRenderFn()}),this.instance.addHook("formulaModeChange",e=>{this.updateEditorStyle(e),e||this.preview.hide()}),this.instance.addHook("afterRefreshTokens",(e,t)=>{this.updateFormulaPreview(e,t)}),this.instance.addHook("afterShowSheet",()=>{this.isOpened()&&this.showEditorLocation()}),this.instance.addHook("onInputClicked",e=>{this.preview.isVisible()&&this.refreshPreview(e)}),this.instance.addHook("onInputKeyDown",()=>{this._hideDatePicker()}),this.instance.addHook("onTargetMouseDown",e=>{this.inputHolder.contains(e.target)&&q(e)}),navigator.maxTouchPoints>0){let e=t=>t.stopPropagation();this.inputHolder.addEventListener("touchstart",e),this.inputHolder.addEventListener("touchmove",e),this.inputHolder.addEventListener("touchend",e),this.inputHolder.addEventListener("touchcancel",e)}}_getCellStyle(){let e=this.instance.sheet;return e?e.getComputedCellStyle(this.range.from.row,this.range.from.col):this.instance.getDataBridge().getWorkbook().getStyleManager().getDefaultStyle()}_getCfFont(){let e=this.instance.sheet;if(!e)return null;let{row:t,col:r}=this.range.from,i=e.getCellProperty(t,r,"cfStyle");return i?new Wa().assign(i).toJSON():null}updateEditorCell(e){this.range=this.instance.getPlugin("synoMergeCell")?.expandCoords(e)??new sn(e.row,e.col,e.row,e.col)}isOpened(){return this._opened}beginEditing(e,t,r,i){let a=this.instance.sheet;if(!a)return;let g=this.instance.getUIBridge().getUserInfo();a.getWorkbook().isCellEditable(e.row,e.col,g)?this._beginEditing(e,t,r,i):setTimeout(()=>this.input.empty(),0)}_beginEditing(e,t,r,i){if(this.isOpened())return;let a=this.instance.sheet;this.sheetId=a.sheetId,this.updateEditorCell(e);let{row:g,col:R}=this.range.from;this.originalValue=a.getDataAtCell(g,R)??null;let L=a.getCellProperty(g,R,"pivot");this.pivotMeta=L?.edit!=null?L:null;let W=d6(a,g,R,t===null?this.originalValue:t);this.originalEditorValue=W,this.nf=this._getCellStyle().getNumberFormat();let K=this._getCellStyle().getFont().clone();this.isLink=!!a.getCellTextDesc(g,R)?.l,this.isLink&&K.assign({underline:!0,color:K.color?void 0:Qe.HYPER_LINK_COLOR}),this.input.setDefaultStyle(K),this.input.setOverrideStyle(this._getCfFont()),(W!==""||i==="top")&&this.setValue(W),this.instance.scrollToRange(g,R),this._open(r,i),this.instance.render(),i==="mouse"&&this.nf.isDate()&&!this.pivotMeta&&(this._showDatePicker(W),setTimeout(()=>this.input.focus(),100));let Q=a.getCellFormulaItemState(g,R);!Q||Cr(Q.previewValue)||Q.href||this.showFormulaPreview(Q.previewValue,Q.nfId,i==="top"?this.input.pair:this.input)}getChanges(e){if(!e&&this.sheetId){let t=this.getValue(),{row:r,col:i}=this.range.from;if(kC(t,this.originalEditorValue)){let a=Zr(t)?t.getText():t,g=s6(a);return g!==a&&(t=g),[[r,i,t]]}}return[]}async finishEditing(e){if(e===void 0&&(e=!1),!this.isOpened())return;let t=this.sheetId,{row:r,col:i}=this.range.from,a=this.getChanges(e);if(a.length>0&&t){if(this.pivotMeta){let g=Zr(a[0][2])?a[0][2].getText():`${a[0][2]}`;await this.instance.pivotTableView.setPivotCellValue(r,i,g)}else{let g=f6(a[0][2]);if(g)await this.instance.getAction().applyLink(t,r,i,g.display,g.location);else{if(this.isLink&&Zr(a[0][2])&&a[0][2].v.length===1){let R=a[0][2].v[0];R.s&&(R.s.underline=null,R.s.color===Qe.HYPER_LINK_COLOR&&(R.s.color=null))}await this.instance.getAction().setValues(t,a,Nn.Edit)}}await this.waitForRenderReady(t,r,i,this.originalValue)}this.close(),this._opened=!1,t&&this.instance.getUIBridge().onFinishEditing(t,e)}async waitForRenderReady(e,t,r,i){if(this.waitingRenderFn)return;let a=this.instance,g=new Promise(R=>{this.waitingRenderFn=()=>{a.sheetId===e&&kC(a.sheet?.getDataAtCell(t,r),i)&&(this.waitingRenderFn=null,R())}});await Promise.race([g,new Promise(R=>{window.setTimeout(R,50)})]),this.waitingRenderFn=null}isCrossSheet(){return this.instance.sheetId!==this.sheetId}hide(){this.inputHolder.style.top="-9999px",this.inputHolder.style.left="-9999px"}_showDatePicker(e){let t=this.instance.view,{from:{row:r,col:i},to:{row:a,col:g}}=this.range,{x:R,y:L,height:W}=t.getRangeBound(r,i,a,g);this.instance.getUIBridge().editor.datePicker.show([R,L+W],e)}_hideDatePicker(){this.instance.getUIBridge().editor.datePicker.hide()}enableFullEditMode(){this.input.setFullEditMode(!0)}setValidMenu(e){this.input.setValidMenu(e)}destroy(){this.input.destroy()}getRange(){return this.range}}class vne{constructor(e){this.instance=e,this.activeEditor=new mne(e),this.delayPageChange=null,this._onKeyDownRef=this._onKeyDown.bind(this),this._bindEvents()}_bindEvents(){let e=this.instance;e.rootElement.addEventListener("keydown",this._onKeyDownRef),e.rootElement.addEventListener("contextmenu",this._onContextMenuRef=t=>{t.preventDefault(),t.stopPropagation();let r=t.pageX<=0&&t.pageY<=0,i=e.view.getCoordFromEvent(t);!r&&(i.row<-1||i.col<-1)?e.runHooks("afterOnGroupContextMenu",t,i):e.runHooks("triggerContextMenu",t,r)}),e.addHook("afterOnCellDblClick",(t,r)=>{r.row>=0&&r.col>=0&&(this._openEditor(r,null,"tail","mouse"),this.activeEditor.enableFullEditMode())}),e.addHook("afterScroll",()=>{let t=this.delayPageChange;if(t){let r=this.instance.view,i=r.getFirstVisibleRow(),a=r.getLastVisibleRow(),g=Math.min(i+t.rowOffset,a);this._rangeModifier(g,t.col,t.shiftKey),this.delayPageChange=null}}),this.instance.addHook("inputStart",()=>{this.isEditorOpened()||this._openEditor(null,"",!1,"input")})}destroy(){this.instance.rootElement.removeEventListener("keydown",this._onKeyDownRef),this.instance.rootElement.removeEventListener("contextmenu",this._onContextMenuRef),this.activeEditor.destroy()}_getSelections(){return this.instance.selections.multiSelections}_isMultipleSelection(){let e=this._getSelections();return e.getLength()>1||e.isMultiple()}_onNav(e){let t=this._getSelections();this._isMultipleSelection()?(t.nextHighlight(e),this.instance.fastRender()):this._moveSelection(e==="down"?1:e==="up"?-1:0,e==="right"?1:e==="left"?-1:0,!1)}_moveSelection(e,t,r){let i=this._getSelections();r?i.transformEnd(e,t):(i.removeRedundantSel(),i.transformStart(e,t)),i.finishSelect(),this.instance.fastRender()}_rangeModifier(e,t,r){let i={row:e,col:t},a=this._getSelections();r?a.setRangeEnd(i,!0):a.setRange(i,i,!0),a.finishSelect(),this.instance.fastRender()}_pageChange(e,t){this.closeEditor(!1);let r=this._getSelections().getActive();if(!r||!r.cellRange)return;let i=t?r.cellRange.to:r.cellRange.highlight.from,a=this.instance.view,g=a.getViewHeight()-a.getFreezeSize().freezeHeight,R=a.viewport.getScrollTop(),L=a.getFirstVisibleRow(),W=a.getLastVisibleRow();a.viewport.setScrollTop(R+g*e),a.viewport.getScrollTop()!==R?this.delayPageChange={rowOffset:Math.max(0,i.row-L),col:i.col,shiftKey:t}:t&&this._rangeModifier(e>0?W:L,i.col,t)}_jumpCoord(e,t,r,i,a){let g=this.instance.sheet,R=g.countRows(),L=g.countCols(),W=Cr(g.getDataAtCell(e,t))||Cr(g.getDataAtCell(e+r,t+i));do{var K,Q;if(K=e,Q=t,K<=0&&r<0||K>=R-1&&r>0||Q<=0&&i<0||Q>=L-1&&i>0)break;e+=r,t+=i}while(W&&Cr(g.getDataAtCell(e,t))||!W&&!Cr(g.getDataAtCell(e+r,t+i)));this._rangeModifier(e,t,a)}_onKeyDown(e){var t;let r=this.instance;if(r.runHooks("beforeKeyDown",e),te(e))return;let i=this._getSelections();if(!i.isSelected()&&!this.isEditorOpened())return;let a=this.activeEditor,g=((t=e).ctrlKey||t.metaKey)&&!t.altKey,R=e.shiftKey,L=e.altKey,W=!1;switch(e.keyCode){case J.A:this.isEditorOpened()||!g||R||(r.selectCell(0,0,r.sheet.countRows()-1,r.sheet.countCols()-1,!1),W=!0);break;case J.ARROW_UP:case J.ARROW_DOWN:case J.ARROW_LEFT:case J.ARROW_RIGHT:{if(L)break;this.closeEditor(!1);let K=e.keyCode===J.ARROW_UP?-1:+(e.keyCode===J.ARROW_DOWN),Q=this.instance.view.reverseIfRtl(e.keyCode===J.ARROW_LEFT?-1:+(e.keyCode===J.ARROW_RIGHT));if(g){let oe=i.getActive(),se=R?oe.cellRange.to:oe.cellRange.highlight.from;this._jumpCoord(se.row,se.col,K,Q,R)}else this._moveSelection(K,Q,R);W=!0;break}case J.TAB:this.onTabKey(e),W=!0;break;case J.F2:R||(this._openEditor(null,null,"tail","f2"),a.enableFullEditMode(),W=!0);break;case J.ENTER:if(g||L)break;this.onEnterKey(e),W=!0;break;case J.ESCAPE:this.isEditorOpened()&&(this.onEscKey(),W=!0);break;case J.HOME:case J.END:{let K=i.getActive();if(K&&K.cellRange){let Q,oe,se=R?K.cellRange.to:K.cellRange.highlight.from;g?(Q=e.keyCode===J.HOME?0:r.sheet.countRows()-1,oe=se.col):(Q=se.row,oe=e.keyCode===J.HOME?0:r.sheet.countCols()-1),this._rangeModifier(Q,oe,R),W=!0}break}case J.PAGE_UP:g&&R||(this._pageChange(-1,R),W=!0);break;case J.PAGE_DOWN:g&&R||(this._pageChange(1,R),W=!0)}W&&(e.preventDefault(),e.stopPropagation())}onEnterKey(e){let t=this.isEditorOpened(),r=this._isMultipleSelection();return this.closeEditor(!1).then(()=>{if(t&&!r){let i=this._getSelections(),a=i.getTabCoords();a&&i.setRange(a,a)}t||r?this._onNav(e.shiftKey?"up":"down"):(this._openEditor(null,null,"tail","enter"),this.activeEditor.enableFullEditMode())})}onTabKey(e){let t=e.shiftKey;return this.closeEditor(!1).then(()=>{t||this._isMultipleSelection()||this._getSelections().saveTabCoords(),this._onNav(t?"left":"right")})}onEscKey(){return this.closeEditor(!0)}getActiveEditor(){return this.activeEditor}isEditorOpened(){return this.activeEditor.isOpened()}_openEditor(e,t,r,i){let a=this.instance.getDataBridge().getWorkbook().isReadonly(),g=this.activeEditor;e=e||this._getSelections().getHighlightCoord(),g&&!a&&e&&g.beginEditing(e,t,r,i)}closeEditor(e){return this.activeEditor.finishEditing(e)}onSelectionUpdated(){if(!this.isEditorOpened())return;let e=this._getSelections().getHighlightRange();e?e.isEqual(this.activeEditor.range)||(this.activeEditor.range=e.clone(),this.activeEditor.deferRefreshDimensions()):this.closeEditor(!0)}onMoveRowCol(e,t){if(!this.isEditorOpened())return;let r=this.activeEditor.range,i=r.clone();r.move(e,t),r.isEqual(i)||this.activeEditor.deferRefreshDimensions()}onResizeRowCol(){this.activeEditor.deferRefreshDimensions()}onMergedCellsUpdated(e){if(!this.isEditorOpened())return;let t=this.activeEditor,r=t.range;if(r.overlaps(e)){let i=r.clone();t.updateEditorCell(r.from),i.isEqual(t.range)||t.deferRefreshDimensions()}}}function Sr(n,e){let t=-1,r=n.length;for(;++t<r&&e(n[t],t,n)!==!1;);return n}function ts(n){let e=[],t=new Set;for(let r=0,i=n.length;r<i;r++)t.has(n[r])||(t.add(n[r]),e.push(n[r]));return e}function Oh(n,e,t,r){let i=n.slice(e,e+t+r);for(let a=0;a<t+r;a++){let g=a<t?e+a+r:e+a-t;(n[g]!==void 0||i[a]!==void 0)&&(n[g]=i[a])}return n}function ki(n,e){for(let t=0,r=e.length;t<r;t++)n.push(e[t]);return n}function uA(n,e){let t=0,r=n.length;for(;t<r;){let i=t+r>>1;e(n[i])?t=i+1:r=i}return t}function Xs(n,e){return uA(n,t=>t<e)}function Ty(n,e){let t=0,r=n.length;for(;t<r;){let i=t+r>>1;n[i]<=e?t=i+1:r=i}return t}function Nh(n,e){let t=Xs(n,e);return t<n.length&&n[t]===e?t:-1}function Mc(n,e,t){let r=n.splice(e);n.length+=t;for(let i=0;i<r.length;i++)n.push(r[i]);return n}function ky(n,e){for(let t=0;t<n.length;t++)for(let r=0;r<n[t].length;r++)e(n[t][r],t,r,n)}function hA(n,e){for(let t=0;t<n.length;t++)n[t].length<e&&(n[t].length=e)}function Np(n){if(!Array.isArray(n)||n.length===0)return n;let e=Array(n[0].length);for(let t=0;t<e.length;t++)e[t]=Array(n.length);return ky(n,(t,r,i)=>{e[i][r]=t}),e}function Ph(n){return Array.isArray(n)?n:[n]}function yne(n,e,t,r){let i=n.length,a=n.indexOf(e),g=r?a-i:0;for(let R=a-1;R>=g;R--){let L=n[(R+i)%i];if(!t(L))return L}}function wne(n,e,t,r){let i=n.length,a=n.indexOf(e),g=r?a+1+i:i;for(let R=a+1;R<g;R++){let L=n[R%i];if(!t(L))return L}}function Ed(n,e,t){return Array.from({length:n},(r,i)=>Array.from({length:e},(a,g)=>t(i,g)))}function bne(n,e){e===void 0&&(e=Op);let t=0,r=0;for(let i=n.length-1;i>=0;i--)for(let a=n[i].length-1;a>=t;a--)e(n[i][a])||(r=Math.max(r,i+1),t=Math.max(t,a+1));n.length=r,n.forEach(i=>i.length=t)}function m6(n,e,t){for(var r=arguments.length,i=Array(r>3?r-3:0),a=3;a<r;a++)i[a-3]=arguments[a];let g=n.slice();return i.length>0?g.splice(e,t,...i):g.splice(e,t),g}let Ry=new WeakMap;class v6{constructor(e,t){this.sheet=e,function(r,i,a,g){g.value=a,g.writable=g.writable!==!1,g.enumerable=g.enumerable!==!1,g.configurable=g.configurable!==!1,Object.defineProperty(r,i,g)}(this,"sheet",e,{writable:!1}),Ry.set(this,{}),this.pluginName=t,this.workbookHooks=new Map,this.addHook("beforeInit",()=>this.init())}init(){this.enablePlugin()}enablePlugin(){}addHook(e,t){let r=Ry.get(this)[e]||[];this.sheet.addHook(e,t),r.push(t),Ry.get(this)[e]=r}removeHooks(e){Sr(Ry.get(this)[e]||[],t=>{this.sheet.removeHook(e,t)})}registerWorkbookHook(e,t){this.sheet.getWorkbook().hooks.add(e,t),this.workbookHooks.set(e,t)}_clearHooks(){let e=Ry.get(this);for(let[t,r]of(Object.keys(e).forEach(i=>this.removeHooks(i)),e.length=0,this.workbookHooks))this.sheet.getWorkbook().hooks.remove(t,r)}destroy(){this._clearHooks(),Object.keys(this).forEach(e=>{e!=="sheet"&&(this[e]=null)}),delete this.sheet}}class EC extends v6{}let Dc=v6,Cne=class{constructor(n){this.values=n,this.ranges=this.createTree(this.values.length),this.counts=Array(this.ranges.length).fill(0)}createTree(n){let e=0,t=n-1;for(let a=1;a<t;a*=2)e=2*e+1;let r=2*e+1,i=[[0,t]];for(let a=1;a<r;a++){let[g,R]=i[a%2?(a-1)/2:a/2-1],L=(R-g)%2?(R+g-1)/2:(R+g)/2;i[a]=a%2?[g,L]:[L,R]}return i}update(n,e){let[t,r]=n;return this.updateFromIndex(t,r,e,0)}updateFromIndex(n,e,t,r){let[i,a]=this.ranges[r],g=this.values[i],R=this.values[a],L=this.values[(a-i)%2?(a+i-1)/2:(a+i)/2];this.splitNode(r),g===n&&R===e?this.counts[r]+=t:e<=L?this.updateFromIndex(n,e,t,2*r+1):n>=L?this.updateFromIndex(n,e,t,2*r+2):(this.updateFromIndex(n,L,t,2*r+1),this.updateFromIndex(L,e,t,2*r+2)),this.mergeNode(r)}splitNode(n){let e=2*n+2;e<this.counts.length&&(this.counts[2*n+1]+=this.counts[n],this.counts[e]+=this.counts[n],this.counts[n]=0)}mergeNode(n){let e=2*n+1,t=2*n+2;if(t<this.counts.length){let r=this.counts[e],i=this.counts[t],a=r<i?r:i;this.counts[e]-=a,this.counts[t]-=a,this.counts[n]+=a}}query(){return this.queryFromIndex(0).map(n=>[this.values[n[0]],this.values[n[1]]])}queryFromIndex(n){if(this.counts[n]!==0)return this.counts[n]?[this.ranges[n]]:[];let e=this.queryFromIndex(2*n+1),t=this.queryFromIndex(2*n+2);return this.mergeRangeList(e,t)}mergeRangeList(n,e){if(n.length>0&&e.length>0){let t=n.length-1;n[t][1]===e[0][0]&&(e[0]=[n.pop()[0],e[0][1]])}return n.concat(e)}};function Gf(n,e){let t=[],r={from:-2,to:-2};return n.map(i=>{let a=i.getTopLeftCorner(),g=i.getBottomRightCorner();return{from:a[e],to:g[e]}}).sort((i,a)=>i.from-a.from).forEach(i=>{1<i.from-r.to?(r={from:i.from,to:i.to},t.push(r)):r.to=Math.max(r.to,i.to)}),t}function AC(n,e,t){let r=new Oc;return Gf(n,e).forEach(i=>{for(let a=i.from;a<=i.to;a++)t(a)===!0&&r.push(a)}),r.getResult()}async function Pp(n,e,t,r){for(let i of n){let a=i.getTopLeftCorner(),g=i.getBottomRightCorner(),R=await e(a,g),L=await r(a.row,g.row);for(let W=a.row;W<=g.row;W++)if(!L[W-a.row])for(let K=a.col;K<=g.col;K++)t(W,K,R[W-a.row][K-a.col])}}function y6(n,e,t){if(n.length===0)return{dimRanges:[],cellRanges:t};n.sort((g,R)=>g.from[e]-R.from[e]);let r=[],i=n[0];for(let g=1;g<n.length;g++){let R=n[g];i.to[e]+1>=R.from[e]?i.to[e]=Math.max(i.to[e],R.to[e]):(r.push(i),i=R)}r.push(i);let a=[];for(let g of t){let R=g,L=uA(r,W=>W.to[e]<g.from[e]);for(;R&&L<r.length;){let W=r[L];if(W.to[e]<R.to[e]){if(W.from[e]>R.from[e]){let K=R.clone();K.to[e]=W.from[e]-1,a.push(K)}R.from[e]=W.to[e]+1}else{if(W.from[e]>R.from[e]){let K=R.clone();K.to[e]=Math.min(K.to[e],W.from[e]-1),a.push(K)}R=null}L+=1}R&&a.push(R)}return{dimRanges:r,cellRanges:a}}function As(n,e){let t=[],r=[];for(let i of n.map(a=>a.clone()))i.overlaps(e)?(i.from.row<e.from.row&&(t.push(new sn(i.from.row,i.from.col,e.from.row-1,i.to.col)),i.from.row=e.from.row),i.to.row>e.to.row&&(t.push(new sn(e.to.row+1,i.from.col,i.to.row,i.to.col)),i.to.row=e.to.row),i.from.col<e.from.col&&(t.push(new sn(i.from.row,i.from.col,i.to.row,e.from.col-1)),i.from.col=e.from.col),i.to.col>e.to.col&&(t.push(new sn(i.from.row,e.to.col+1,i.to.row,i.to.col)),i.to.col=e.to.col),r.push(i)):t.push(i);return{newRanges:t,removeRanges:r}}function cA(n){let e=n.reduce((R,L)=>(R.push({coord:L[1]+0,start:!0,range:[L[0],L[2]+1]}),R.push({coord:L[3]+1,start:!1,range:[L[0],L[2]+1]}),R),[]).sort((R,L)=>R.coord-L.coord),t=Object.keys(n.reduce((R,L)=>(R[L[0]]=R[L[2]+1]=!0,R),{})).map(R=>+R).sort((R,L)=>R-L),r=[],i=new Cne(t);for(let R=0,L=0;R<e.length;R++){let W=e[L].coord,K=e[R].coord;if(W!==K){L=R;let se=i.query();for(let he=0;he<se.length;he++){let me=se[he];r.push([me[0],W,me[1]-1,K-1])}}let{start:Q,range:oe}=e[R];i.update(oe,Q?1:-1)}let a=[],g=new Set;return r.forEach(R=>{let L=a.length,W=null;g.forEach(K=>K[3]<R[1]-1?a.push(K):W||K[0]!==R[0]||K[2]!==R[2]||K[3]+1!==R[1]?void 0:W=K);for(let K=L;K<a.length;K++)g.delete(a[K]);W&&(R[1]=W[1],g.delete(W)),g.add(R)}),g.forEach(R=>a.push(R)),a}class Oc{constructor(e){this._result=[],this._frag={from:-2,to:-2},this._init(e)}_init(e){if(Array.isArray(e))for(let t=0;t<e.length;t++)this.push(e[t])}push(e){e===this._frag.to+1?this._frag.to=e:(this._frag={from:e,to:e},this._result.push(this._frag))}getResult(){return this._result}}function Ey(n){return(n.range?[n.range]:[]).concat(n.pageRanges)}function Ay(n){return Ey(n).map(sn.fromRange)}function Bp(n,e){let t=Ay(n),r=!1;for(let i of e){let a=As(t,i);t=a.newRanges,r||=a.removeRanges.length>0}return t.length===0?Dh.full:r?Dh.partial:Dh.none}function No(n,e){let t=[],r=[];for(let i of e){let a=Bp(i.location,n);a===Dh.partial?r.push(i):a===Dh.full&&t.push(i)}return{full:t,partial:r}}function Lp(n,e,t,r){return{sec:[{start:n,end:n+e-1,amount:e},{start:n+e,end:n+e+t-1,amount:t}],isBackward:r,delta:r?-e:t}}class w6{constructor(){this.contextPool=new WeakMap}getBucket(e){return this.contextPool.get(e)}getOrCreateBucket(e){let t=this.getBucket(e);return t||(t=Object.create(null),this.contextPool.set(e,t)),t}add(e,t,r){let i=this.getOrCreateBucket(r);if(!i)return;let a=i[e];a===void 0&&(a=i[e]=[]),a.includes(t)||a.push(t)}once(e,t,r){t.once=!0,this.add(e,t,r)}remove(e,t,r){let i=this.getBucket(r);if(!i||!i[e])return;let a=i[e].indexOf(t);a>-1&&i[e].splice(a,1)}has(e,t){let r=this.getBucket(t);return!!r&&!!r[e]&&r[e].length>0}runWithArgs(e,t,r){if(!e)return;let i=this.getBucket(e);i&&b6(i,e,t,r)}run(e,t){for(var r=arguments.length,i=Array(r>2?r-2:0),a=2;a<r;a++)i[a-2]=arguments[a];this.runWithArgs(e,t,i)}removeContext(e){let t=this.getBucket(e);t&&Ao(t,(r,i,a)=>a[i].length=0)}destroy(){}}function b6(n,e,t,r){let i=n[t];if(!i)return;let a=!1;for(let g=0,R=i.length;g<R;g++){let L=i[g];L.apply(e,r),L.once&&(a=!0)}a&&(n[t]=i.filter(g=>!g.once))}class _ne extends w6{constructor(){super(),this.globalBucket=Object.create(null)}getBucket(e){return e?super.getBucket(e):this.globalBucket}getOrCreateBucket(e){return e?super.getOrCreateBucket(e):this.globalBucket}runWithArgs(e,t,r){e&&(super.runWithArgs(e,t,r),b6(this.globalBucket,e,t,r))}destroy(){super.destroy(),this.removeContext(null)}}class Ad{constructor(e,t,r,i,a,g,R){this.cellRange=e||null,this.color=t||null,this.borderStyle=r||null,this.className=i||null,this.hasHighlight=a||!1,this.hasCorner=g||!1,this.outerOffset=R||0,this.hasBackground=!0}isEmpty(){return this.cellRange===null}clear(){this.cellRange=null}setRange(e){this.cellRange=e}setHasHighlight(e){this.hasHighlight=e}setHasCorner(e){this.hasCorner=e}setHasBackground(e){this.hasBackground=e}getClassName(){return this.className}preventPointer(){return this.hasHighlight}}class Sne extends Ad{constructor(){super(null,null,"2px dashed #009959","copy-selection",!1,!1,1),this._draggingData=null}getClassName(){return this.isDragging()?"copy-selection-dragging":super.getClassName()}preventPointer(){return!this.isDragging()&&super.preventPointer()}startDragging(e,t){e=e.clone().normalize(),this._draggingData={range:e.clone(),coord:{row:Math.min(e.to.row,Math.max(e.from.row,t.row)),col:Math.min(e.to.col,Math.max(e.from.col,t.col))}},this.setRange(e)}updateDragging(e,t){if(!this.isDragging())return;let r=this.cellRange,{range:i,coord:{row:a,col:g}}=this._draggingData,R=Math.min(t.row-i.to.row,Math.max(-i.from.row,e.row-a)),L=Math.min(t.col-i.to.col,Math.max(-i.from.col,e.col-g));r.from.row=i.from.row+R,r.from.col=i.from.col+L,r.to.row=i.to.row+R,r.to.col=i.to.col+L}endDragging(){if(!this.isDragging())return;let e=this._draggingData.range,t=this.cellRange;return this._draggingData=null,this.clear(),{srcRange:e,targetRange:t}}isDragging(){return this._draggingData!==null}}class C6{constructor(e){this.instance=e,this.multiSelections=[],this.inProgress=!1,this.lastActive=-1,this.selectedHeader={row:!1,col:!1},this.length=0}push(e){this._push(e)}_push(e,t,r,i){this.length<this.multiSelections.length?this.multiSelections[this.length].cellRange=e:this.multiSelections.push(new Ad(e,t||null,r||null,i||null)),this.length++}getLength(){return this.length}isInProgress(){return this.inProgress}get(e){return this.multiSelections[e]}resetActive(){this.lastActive=-1}setActive(e){this.lastActive!==e&&this.get(e)&&(this.lastActive=e)}getActive(){return this.get(this.lastActive)}setSelectedHeaders(e,t){e!==void 0&&(this.selectedHeader.row=e),t!==void 0&&(this.selectedHeader.col=t)}beginSelect(e,t){this.inProgress=!0,this.setSelectedHeaders(t.col<0,t.row<0),t.row=Math.max(t.row,0),t.col=Math.max(t.col,0);let r=this.getActive();e.shiftKey&&r&&r.cellRange?this.moveSelect(t):this._handleSelect(e,t)}_handleSelect(e,t){this.setRangeStart(t),this.moveSelect(t)}moveSelect(e){let t=this.getActive();if(!t||!t.cellRange)return;let r=this.instance.sheet;if(!r)return;let i=t.cellRange;i.type=(this.selectedHeader.row?qr.row:qr.cell)|(this.selectedHeader.col?qr.col:qr.cell),this.selectedHeader.col&&(i.from.row=0,i.to.row=r.countRows()-1,i.to.col=Math.max(e.col,0)),this.selectedHeader.row&&(i.from.col=0,i.to.col=r.countCols()-1,i.to.row=this.selectedHeader.col?i.to.row:Math.max(e.row,0)),this.selectedHeader.row||this.selectedHeader.col?this._rangeSelected():this.setRangeEnd(e)}_rangeSelected(){}finishSelect(){this.inProgress=!1}transformStart(e,t){let r=this.getActive(),i=r?.cellRange,a=this.instance.sheet;if(!i||!a)return;let g={row:e,col:t};this.instance.runHooks("modifyTransformStart",g,i);let R=a.countRows(),L=a.countCols(),W={row:i.highlight.from.row+g.row,col:i.highlight.from.col+g.col};W.row<0?W.row=0:W.row>=R&&(W.row=R-1),W.col<0?W.col=0:W.col>=L&&(W.col=L-1),this.setRange(W,W,!0)}transformEnd(e,t){let r=this.getActive(),i=this.instance.sheet;if(!r||!r.cellRange||!i)return;let a={row:e,col:t};this.instance.runHooks("modifyTransformEnd",a,r.cellRange);let g=i.countRows(),R=i.countCols(),L={row:r.cellRange.to.row+a.row,col:r.cellRange.to.col+a.col};L.row<0?L.row=0:L.row>=g&&(L.row=g-1),L.col<0?L.col=0:L.col>=R&&(L.col=R-1),this.setRangeEnd(L,!0)}addRange(e){this.resetActive(),this.setRange({row:e[0],col:e[1]},{row:e[2],col:e[3]},!1)}setRange(e,t,r){this.setSelectedHeaders(!1,!1),this.setRangeStart(e),this.setRangeEnd(t,r);let i=this.getActive()?.cellRange,a=this.instance.sheet;if(!i||!a)return;let g=i.getWidth()===a.countCols(),R=i.getHeight()===a.countRows();i.type=(g?qr.row:qr.cell)|(R?qr.col:qr.cell)}setRangeStart(e){let t;this.instance.runHooks("beforeSetRangeStart",e);let{row:r,col:i}=this.selectedHeader,a=new Ap(e.row,e.col,e.row,e.col,(t=0,r&&(t+=1),i&&(t+=2),t)),g=this.getActive();g?g.cellRange=a:(this.push(a),g=this.getActive()),this.instance.runHooks("afterSetRangeStart",g&&g.cellRange)}setRangeEnd(e,t){t===void 0&&(t=!1);let r=this.getActive();if(!r||!r.cellRange)return;let i=this.instance;if(r.cellRange.from={...r.cellRange.highlight.from},r.cellRange.to={row:e.row<0?i.getFirstVisibleRow():e.row,col:e.col<0?i.getFirstVisibleCol():e.col},i.runHooks("beforeSetRangeEnd",r.cellRange,this.selectedHeader),t){let a=r.cellRange,g=a.from&&!this._isMultiple(a)?a.from:a.to;i.scrollToRange(g.row,g.col)}this._rangeSelected()}isMultiple(){let e=this.getActive();return!!e&&!!e.cellRange&&this._isMultiple(e.cellRange)}_isMultiple(e){return this.instance.sheet?.getMergePlugin().isMultipleCells(e)??!1}getMultiRange(){let e=[];return this.forAll(t=>(t.cellRange&&e.push(t.cellRange.clone()),!0),!1),e}clear(){this.resetActive(),this.length=0,this.forAll(e=>(e.cellRange=null,!0),!0)}getAll(){return this.multiSelections.slice(0,this.length)}forAll(e,t){let r=t===!0?this.multiSelections.length:this.length;for(let i=0;i<r&&e(this.multiSelections[i])!==!1;i++);}destroy(){}}function Da(n){return n.button===2||je()&&n.ctrlKey}class Ine extends C6{constructor(e){super(e),this.tabCoords=null,e.addHook("openEditor",()=>this.openEditor()),e.addHook("closeEditor",()=>this.closeEditor())}push(e){this._push(e,"rgba(38,152,110,0.1)","2px solid #26986E","multi-area"),this.setActive(this.length-1)}resetActive(){let e=this.get(this.lastActive);e&&(e.setHasHighlight(!1),e.setHasCorner(!1)),super.resetActive()}setActive(e){if(this.lastActive===e)return;this.resetActive();let t=this.get(e);t&&(t.setHasHighlight(!0),t.setHasCorner(!0),this.lastActive=e)}clampSelections(){let e=this.instance.sheet;if(!e)return;let t=e.countRows(),r=e.countCols();this.forAll(a=>{let g=a.cellRange;return g&&(g.from.row=Math.min(g.from.row,t-1),g.from.col=Math.min(g.from.col,r-1),g.to.row=Math.min(g.to.row,t-1),g.to.col=Math.min(g.to.col,r-1)),!0});let i=this.getActive()?.cellRange?.highlight;i&&(i.from.row>=t||i.from.col>=r)&&this.setHighlight({row:Math.min(i.from.row,t-1),col:Math.min(i.from.col,r-1)})}openEditor(){let e=this.getActive();e&&e.setHasCorner(!1)}closeEditor(){let e=this.getActive();e&&e.setHasCorner(!0)}_isCoordSelected(e){return!!this.instance.sheet&&this.getAll().some(t=>t.cellRange?.includes(e,!1)??!1)}beginSelect(e,t){let r=this.instance.getActiveEditor();r.isOpened()&&r.finishEditing();let i=(je()?e.metaKey:e.ctrlKey)&&!e.altKey;Da(e)&&!i&&this._isCoordSelected(t)||super.beginSelect(e,t)}_handleSelect(e,t){(je()?e.metaKey:e.ctrlKey)&&!e.altKey?this.resetActive():this.clear(),super._handleSelect(e,t)}_rangeSelected(){let e=this.getActive(),t=e&&e.cellRange;this.instance.runHooks("afterSelection",t)}saveTabCoords(){if(this.tabCoords)this.tabCoords.skipNextClear=!0;else{let e=this.getHighlightCoord();e&&(this.tabCoords={...e,skipNextClear:!0})}}getTabCoords(){return this.tabCoords}finishSelect(){let e=this.getActive();this.instance.runHooks("afterSelectionEnd",e&&e.cellRange),this.tabCoords&&this.tabCoords.skipNextClear?this.tabCoords.skipNextClear=!1:this.tabCoords=null,super.finishSelect()}deselect(){this.length>0&&(this.clear(),this.instance.runHooks("afterDeselect"))}setRangeStart(e){super.setRangeStart(e);let t=this.getActive();this.instance.runHooks("highlightchanged",t?.cellRange?.highlight)}getHighlightRange(){let e=this.getActive();return e&&e.cellRange?e.cellRange.highlight:null}getHighlightCoord(){let e=this.getHighlightRange();return e?e.from:null}removeRedundantSel(){if(this.length<2)return;let e=this.getActive();for(this.multiSelections[0].cellRange=e?e.cellRange:null;this.length>1;)this.length-=1,this.multiSelections[this.length].cellRange=null;this.setActive(0)}isSelected(){return this.length>0&&this.multiSelections[0].cellRange!==null}onCreateRowCol(e,t,r){this.forAll(i=>{let a=i.cellRange;return a&&a.createRowCol(e,t,r),!0})}onRemoveRowCol(e,t,r){let i=0;for(let a=0;a<this.length;a++){let g=this.multiSelections[a].cellRange;g&&g.removeRowCol(e,t,r)===!0&&(this.multiSelections[i++].cellRange=g)}for(let a=i;a<this.length;a++)this.multiSelections[a].cellRange=null;this.length=i,this.setActive(this.length-1)}nextHighlight(e){let t=this.getActive(),r=t?.cellRange;if(!r)return;let i=this.instance.getPlugin("synoMergeCell").nextHighlight(r,e);if(!i){let a=this.getLength(),g=["down","right"].includes(e);a>1&&(this.setActive((this.lastActive+(g?1:-1)+a)%a),r=this.getActive().cellRange),i=g?r.getTopLeftCorner():r.getBottomRightCorner()}this.setHighlight(i)}setHighlight(e){let t=this.getActive()?.cellRange;if(!t)return;let r=t.highlight;r.from.row=r.to.row=e.row,r.from.col=r.to.col=e.col,this.instance.getPlugin("synoMergeCell")?.modifyHighlight(r),this.instance.runHooks("highlightchanged",r)}toJSON(){let e=this.getHighlightCoord();return{ranges:this.getMultiRange().map(t=>[t.from.row,t.from.col,t.to.row,t.to.col]),activeIndex:this.lastActive,highlight:e?{...e}:null}}hasOverlaps(){return TC(this.getMultiRange())}}let _6=["0, 172, 229","242, 182, 0","51, 128, 204","250, 145, 25","163, 108, 217","18, 178, 178","242, 121, 141","98, 179, 18"];class xne extends C6{constructor(e){super(e),this.selectingInput=null,this.selectingPos=null,this.prepareSelecting=!1,e.addHook("afterFormatFormula",(t,r)=>this.afterFormatFormula(t,r)),e.addHook("formulaModeChange",t=>this.onFormulaModeChange(t)),e.addHook("afterUserChangedInputPosition",(t,r)=>this.afterUserChangedInputPosition(t,r)),e.addHook("onInputMoveKey",(t,r,i)=>this.onInputMoveKey(t,r,i)),e.addHook("openEditor",()=>this.openEditor()),e.addHook("closeEditor",()=>this.closeEditor()),e.addHook("afterShowSheet",()=>this.afterShowSheet()),this._onMouseMoveRef=t=>{this.isInProgress()&&t.preventDefault()},document.documentElement.addEventListener("mousemove",this._onMouseMoveRef)}push(e){if(this.length<this.multiSelections.length)this._push(e);else{let t=_6[this.length%_6.length],r=`rgba(${t}, 0.05)`,i=`2px dashed rgb(${t})`;this._push(e,r,i,"formula-selection")}this.multiSelections[this.length-1].setHasBackground(!1)}redrawCellSelection(e,t,r){var i,a,g;let R=this.instance.getCell(e,t,!0);R&&(i=r.settings.className,E(R,i))&&(r.active?(a=r.settings.activeCls,A(R,a)):(g=r.settings.activeCls,u(R,g)))}resetActive(){let e=this.get(this.lastActive);e&&(e.setHasBackground(!1),this.instance.selectionView.hideSelectionBackground(e)),super.resetActive()}setActive(e){if(this.lastActive===e)return;this.resetActive();let t=this.get(e);t&&(t.setHasBackground(!0),this.instance.selectionView.updateSelection(t),this.lastActive=e)}redrawSelection(e){let t=e.cellRange;if(!t)return;let r=t.getTopLeftCorner(),i=t.getBottomRightCorner(),a=this.instance.view.wt.wtViewport.rowsRenderCalculator,g=this.instance.view.wt.wtViewport.columnsRenderCalculator,R=Math.max(a.startRow,r.row),L=Math.min(a.endRow,i.row),W=Math.max(g.startColumn,r.col),K=Math.min(g.endColumn,i.col);for(let ye=R;ye<=L;ye++)for(let Te=W;Te<=K;Te++)this.redrawCellSelection(ye,Te,e);let Q=this.instance.sheet.getFreezePlugin(),oe=Q.fixedRowsTop,se=Q.fixedColumnsLeft,he=Math.min(oe-1,i.row),me=Math.min(se-1,i.col);for(let ye=r.row;ye<=he;ye++)for(let Te=W;Te<=K;Te++)this.redrawCellSelection(ye,Te,e);for(let ye=R;ye<=L;ye++)for(let Te=r.col;Te<=me;Te++)this.redrawCellSelection(ye,Te,e);for(let ye=r.row;ye<he;ye++)for(let Te=r.col;Te<me;Te++)this.redrawCellSelection(ye,Te,e)}_handleSelect(e,t){let r,i=this.instance.getActiveEditor(),a=i.getActiveInput(),g=Bi(t),R=a.getSelection().getRange();if(!R)return;let L=R.end??0;if(L===0)return;let W=a.getTokenList(),K=(e.ctrlKey||e.metaKey)&&!e.altKey;i.isCrossSheet()&&(r=this.instance.sheet.getName());let Q=null,oe=W.getTokenByPos(L)?.token;(Q=oe?.isRange()?K?W.insertRange(g,"cell",L,!0,r):W.updateRange(oe,g,"cell",r):W.insertRange(g,"cell",L,!1,r))&&(L=Q.newRange[1]),this.updateSelection(W,L),this.saveSelecting(a,L),this.selectingInput.closeFormulaMenu(),this.moveSelect(t),this.prepareSelecting="all"}_rangeSelected(){let e,t=this.getActive();if(!t||!t.cellRange)return;let r=this.selectingInput.getTokenList(),i=r.getTokenByPos(this.selectingPos);if(!i)return;this.instance.getActiveEditor().isCrossSheet()&&(e=this.instance.sheet.getName());let a=t.cellRange,g=this.isMultiple()?nr.toLabel(a):Bi(a.from),R=a.type&qr.row?"row":a.type&qr.col?"col":"cell";i.token.isRange()?(this.selectingPos=r.updateRange(i.token,g,R,e)?.newRange[1]??this.selectingPos,this.selectingInput.renderByTokenList(this.selectingPos)):(this.selectingPos=r.insertRange(g,R,this.selectingPos,!1,e)?.newRange[1]??this.selectingPos,this.selectingInput.renderByTokenList(this.selectingPos),this.updateSelection(r,this.selectingPos)),this.prepareSelecting="all"}finishSelect(){this.selectingInput&&(this.selectingInput.getEl().focus(),this.selectingInput.updateKeydownStatus()),super.finishSelect()}onFormulaModeChange(e){e||(this.clearSelecting(),this.clear())}afterShowSheet(){let e=this.instance.getActiveEditor().input;this.instance.getActiveEditor().isOpened()&&this.updateSelection(e.getTokenList(),this.selectingPos)}afterFormatFormula(e,t){this.updateSelection(e,t),this.clearSelecting(),this.prepareFormulaSelect(e,t,!1)}afterUserChangedInputPosition(e,t){if(e){let r=0;e.forAllTokens((i,a)=>{let g=i.getText().length;if(a<t&&t<=a+g)return i.isRange()?this.setActive(r):this.getActive()&&this.resetActive(),!1;i.isRange()&&(r+=1)})}this.clearSelecting(),this.prepareFormulaSelect(e,t,!0)}checkFormulaSelecting(){let e=this.instance.getActiveEditor().getActiveInput();return!!e.isActive&&!!e.getSelection().isSelectionInEditor()&&this.prepareSelecting}prepareFormulaSelect(e,t,r){this.prepareSelecting=!1,e&&e.get(0).isEqualSymbol()&&!(t<=0)&&e.forAllTokens((i,a,g)=>{let R,L,W=i.getText().length;if(!(a>=t)&&!(t>a+W))return i.symbol===!1?(R=e.get(g-1),L=e.get(g+1)):(R=i,(L=e.get(g+1))&&L.symbol===!1&&(L=e.get(g+2))),R&&R.isLeftDelimiter()&&(!L||L.isRightDelimiter())&&(this.prepareSelecting=r?"mouse":"all"),!1})}onInputMoveKey(e,t,r){if(e!==this.instance.getActiveEditor().input||this.prepareSelecting!=="all")return;let i=this.getActive();if(!i||!i.cellRange){let a=this.instance.getActiveEditor().range,g=new Ap(a.from.row,a.from.col,a.to.row,a.to.col);this.push(g),this.setActive(this.length-1),this.saveSelecting(e,e.getSelection().getRange().start)}r.shiftKey?this.transformEnd(t.row,t.col):this.transformStart(t.row,t.col),this.finishSelect(),r.preventDefault()}openEditor(){let e=this.instance.getActiveEditor().input.getTokenList();e&&this.updateSelection(e)}closeEditor(){this.clear(),this.clearSelecting()}updateSelection(e,t){if(this.clear(),!e)return;let r=this.instance.getDataBridge().getWorkbook(),i=this.instance.sheetId,a=this.instance.getActiveEditor().sheetId;e.forAllTokens((g,R)=>{if(!g.isRange()&&!g.isVariable())return;let L=nr.createByWorkbook(g.getText(),r,a);if(!L&&g.isVariable())return;let W=null;L&&L.sheetInfo.sheetId===i&&(W=new Ap(L.from.row,L.from.col,L.to.row,L.to.col)),this.push(W);let K=g.getText().length;W&&R<t&&t<=R+K&&this.setActive(this.length-1)})}saveSelecting(e,t){this.selectingInput=e,this.selectingPos=t}clearSelecting(){this.selectingInput=null,this.selectingPos=null,this.prepareSelecting=!1}destroy(){document.documentElement.removeEventListener("mousemove",this._onMouseMoveRef)}}class Tne{constructor(e){this.instance=e,this.displayRow=!1,this.displayCol=!1,this.searchDisplay=!1,this.hasActive=!1,this.rowHint=this.createSelection(qr.row),this.colHint=this.createSelection(qr.col),this.instance.addHook("highlightchanged",this.onHighlightChanged.bind(this))}createSelection(e){return new Ad(new sn(0,0,0,0,e),"#FF7C001A",null,"hint-selection",!1,!1)}getAll(){if(!this.hasActive)return[];let e=[];return(this.displayRow||this.searchDisplay)&&e.push(this.rowHint),(this.displayCol||this.searchDisplay)&&e.push(this.colHint),e}setDisplay(e){let{row:t,col:r}=e;this.displayRow=t,this.displayCol=r}setSearchDisplay(e){this.searchDisplay=e}setRange(e){if(!e){this.hasActive=!1;return}this.hasActive=!0;let t=this.rowHint.cellRange;t&&(t.from.row=e.from.row,t.to.row=e.to.row);let r=this.colHint.cellRange;r&&(r.from.col=e.from.col,r.to.col=e.to.col)}onHighlightChanged(e){this.setRange(e)}}var My=function(n){return n[n.TEXT=1]="TEXT",n[n.NUM=2]="NUM",n[n.BOOL=3]="BOOL",n[n.LINK=4]="LINK",n[n.RICH_TEXT=5]="RICH_TEXT",n}({});class Fp{static#e=this.Type=My;constructor(){this.v="",this.t=1,this.c=void 0,this.e=void 0,this.l=!1}getState(){return{v:this.v,t:this.t,c:this.c,e:this.e,l:this.l}}isLink(){return this.l}isNumber(){return this.t===2}isRichText(){return this.t===5}getExtra(){return this.e}getText(){return this.v}getColor(){return this.c}generalRenderer(e,t,r){let i;r=r||"General";try{i=e.format(r,t)}catch{}i?(this.v=i.v,i.c&&(this.c=i.c)):this.v=ds(t)}htmlRenderer(e,t){this.v=e.render("General",t)}textRenderer(e,t){this.t===2?this.v=e.render("General",t):this.v=ds(t)}richTextRenderer(e){this.t=5,this.v=e.getText()}}function dA(n,e,t){let r=n.getCellModel(e,t),i=r?.getValue()??"",a=n.getDataModel().getComputedCellStyle(e,t),g=!!r?.getProperties()?.link,R=a.getNumberFormat(),L=new Fp,W=n.getWorkbook(),K=R.fc;function Q(se){se.nfId&&R.isDefault()&&(K=ZE(W,se.nfId))}if(g&&(L.l=!0),!r||Cr(i)){let se=n.formula.getSpillItem(e,t);if(se){Q(se);let he=n.formula.getCellValue(e,t)??"";i=Tp.error.isError(he)?he.message:he}}else if(be(i,a)){let se,he=r.getFormulaItem();se=n.formula.getCellValue(he.row,he.col)??"",he.isLink()&&(L.l=!0,L.e=he.href),he.error?se=he.error.getValue():he.getSpillRange()&&he.spillError&&(se=he.spillError.getValue()),i=se===null?"":Tp.error.isError(se)?se.message:se,Q(he)}let oe=W.getLocale().getSSF();return Zr(i)?L.richTextRenderer(i):R.isText()?(L.t=1,L.textRenderer(oe,i)):(typeof i=="number"?L.t=2:typeof i=="boolean"&&(L.t=3),L.generalRenderer(oe,i,K)),L}let Oa={FILL_COLOR:`#${Qe.DEFAULT_FILL_COLOR}`,BORDER_COLOR:"rgba(0, 0, 0, 0.1)",COMMENT_COLOR:"#FFBF00",NOTE_COLOR:"#56585A",VALIDATION_COLOR:"#F2616D",FONT_SIZE:Qe.DEFAULT_FONT_SIZE,FONT_NAME:Qe.DEFAULT_FONT_NAME,FONT_COLOR:Qe.DEFAULT_FONT_COLOR,V_ALIGN:"middle",HYPER_LINK_COLOR:Qe.HYPER_LINK_COLOR},S6="#F6F8FA",I6="rgba(0, 0, 0, 0.1)",kne={font:"#63A68C",normal:{fill:Oa.FILL_COLOR,select:S6},filter:{fill:"#EAF7F2",select:"#D2F0E4"}},Rne={font:"#FFFFFF",normal:{fill:"#66686A",select:"#383A3C"},filter:{fill:"#7D7D7D",select:"#212121"}};class Dy{constructor(){this.fill=Oa.FILL_COLOR,this.borderTopColor=null,this.borderLeftColor=null,this.borderRightColor=null,this.borderBottomColor=null}setFill(e){this.fill=e}setTopBorder(e){this.borderTopColor=e}setLeftBorder(e){this.borderLeftColor=e}setRightBorder(e){this.borderRightColor=e}setBottomBorder(e){this.borderBottomColor=e}setBorder(e){let t=e.b;this.setTopBorder(t&&t[0]),this.setRightBorder(t&&t[1]),this.setBottomBorder(t&&t[2]),this.setLeftBorder(t&&t[3])}mergeBorder(e){let t=e.b;t&&(t[0]&&this.setTopBorder(t[0]),t[1]&&this.setRightBorder(t[1]),t[2]&&this.setBottomBorder(t[2]),t[3]&&this.setLeftBorder(t[3]))}setStyle(e,t){if(t===void 0&&(t=!0),!e.isDefault()){let r=e.getFill();r.bg&&this.setFill("#"+r.bg);let i=e.getBorder();i&&(t?this.setBorder(i):this.mergeBorder(i))}return this}}class MC{constructor(e){this.text=e,this.font=null,this.cfStyle=null,this.tableFont=null,this.fontColor=null,this.underline=!1,this.bold=!1,this._halign=e?.getDirection()==="rtl"?"right":"left",this.valign=Oa.V_ALIGN,this.notify=null,this.dropdown=null,this._dropdownPadding=0,this.fold=null,this.indent=0}setFontColor(e){this.fontColor=e}setBold(e){this.bold=e}setUnderline(e){this.underline=e}setHalign(e){this._halign=e}get halign(){return this.fold?"left":this._halign}setValign(e){this.valign=e}setNotify(e){this.notify=e}setDropdown(e){this.dropdown=e}setDropdownPadding(e){this._dropdownPadding=e}get dropdownPadding(){return this.dropdown?.getPadding()??this._dropdownPadding}setFold(e){this.fold=e}setIndent(e){this.indent=e}setAlignmentStyle(e){e&&(e.halign&&this.setHalign(e.halign),e.valign&&this.setValign(e.valign))}setFont(e){this.font=e}setCfStyle(e){this.cfStyle=e}setTableFont(e){this.tableFont=e}setTextDesc(e){switch(e.t){case Fp.Type.TEXT:break;case Fp.Type.NUM:this.setHalign("right");break;case Fp.Type.BOOL:this.setHalign("center")}e.l&&e.t!==Fp.Type.RICH_TEXT&&(this.setUnderline(!0),this.font&&this.font.color||this.setFontColor(Oa.HYPER_LINK_COLOR)),e.c&&this.setFontColor(e.c)}setNotifyByMeta(e){let{comment:t,note:r,synoInvalid:i}=e;t?this.setNotify(Oa.COMMENT_COLOR):r?this.setNotify(Oa.NOTE_COLOR):i&&this.setNotify(Oa.VALIDATION_COLOR)}}class x6{constructor(e){this._hover=e}setHover(e){this._hover=e}getColor(){}getPadding(){}}function fA(n,e){return e===void 0&&(e=1),{x:n.x+n.width-(1+$l.getPadding())*e,y:n.y+4*e,width:$l.getWidth()*e,height:$l.getHeight()*e}}class $l extends x6{constructor(e,t,r=!1){super(e),this._active=t,this.disabled=r}isActive(){return this._active}getColor(){return"#56585A"}getBgColor(){return this._hover?"#F6F8FA":"rgba(255, 255, 255, 0.85)"}getPadding(){return $l.getPadding()}static getPadding(){return 16}static getHeight(){return 13}static getWidth(){return 13}}class Bh extends x6{constructor(e,t){super(e),this._isDarkBg=t}getColor(){return this._isDarkBg?`rgba(255,255,255,${this._hover?"0.7":"0.4"})`:this._hover?"#888A8B":"#BBBCBD"}getPadding(){return Bh.getPadding()}static getPadding(){return 13}static getHeight(){return 12}}class gA{constructor(e,t,r,i){this.text=e,this.width=Math.ceil(t),this.font=r||null,this.rtl=i}getText(){return this.text}getWidth(){return this.width}getFont(){return this.font}getRtl(){return this.rtl}}class DC{constructor(e){this.frags=[],this.lineHeight=Math.ceil(e.height),this.width=0,this.baselineOffset=e.lineBoxAscent}addTextFragment(e){this.width+=e.getWidth(),this.frags.push(e)}getLineHeight(){return this.lineHeight}getBaselineOffset(){return this.baselineOffset}getWidth(){return this.width}[Symbol.iterator](){return this.frags[Symbol.iterator]()}}class Oy{constructor(e){this.lines=[],this.height=0,this.width=0,this.direction=e||"ltr"}addTextLine(e){this.height+=e.getLineHeight(),this.width=Math.max(this.width,e.getWidth()),this.lines.push(e)}getHeight(){return this.height}getWidth(){return this.width}getDirection(){return this.direction}[Symbol.iterator](){return this.lines[Symbol.iterator]()}}let T6=new WeakMap;function k6(n,e,t){if((!e||n.bold)&&(!t||n.italic))return n;let r=T6.get(n);r||(r=[null,null,null],T6.set(n,r));let i=+!!e+2*!!t,a=r[i];return a||(a=new Wa().assign(n),e&&(a.bold=!0),t&&(a.italic=!0),r[i]=a),a}function Ny(n){let e="";return n.italic&&(e+="italic "),n.bold&&(e+="bold "),e+=(n.size||Oa.FONT_SIZE)+"pt ",e+=n.name?`"${n.name}"`:Oa.FONT_NAME}function Vp(n){return n===32||n===9||n===10}function Py(n){return n===12288}function pA(n){return Vp(n)||Py(n)}let Ene=(()=>{function n(){for(var t=arguments.length,r=Array(t),i=0;i<t;i++)r[i]=arguments[i];let[a,g,R,L,W,K,Q,oe]=r;return a|g<<1|R<<2|L<<3|W<<4|K<<5|Q<<6|oe<<7}let e=[0,0,0,0,0,0,0,0,0,0,0,0];return[[n(0,0,0,0,0,0,0,1),n(0,0,0,0,0,0,0,0),0,n(0,0,0,1,0,0,0,0),0,0,0,n(0,0,1,0,0,0,0,0),0,0,0,n(0,0,1,0,0,0,0,0)],[n(0,0,0,0,0,0,0,1),n(0,0,0,0,0,0,0,0),0,n(0,0,0,1,0,0,0,0),0,0,0,n(0,0,1,0,0,0,0,0),0,0,0,n(0,0,1,0,0,0,0,0)],[n(0,0,0,0,0,0,0,1),n(0,0,0,0,0,0,0,0),0,n(0,0,0,1,0,0,0,0),0,0,0,n(0,0,1,0,0,0,0,0),0,0,0,n(0,0,1,0,0,0,0,0)],[n(0,0,0,0,0,0,0,0),n(0,0,0,0,0,0,0,0),0,n(0,0,0,0,0,0,0,0),0,0,0,n(0,0,0,0,0,0,0,0),0,0,0,n(0,0,0,0,0,0,0,0)],[n(0,0,0,0,0,0,0,1),n(0,0,0,0,0,0,0,0),0,n(0,0,0,1,0,0,0,0),0,0,0,n(0,0,1,0,0,0,0,0),0,0,0,n(0,0,1,0,0,0,0,0)],[n(0,0,0,0,0,0,0,1),n(0,0,0,0,0,0,0,0),0,n(0,0,0,1,0,0,0,0),0,0,0,n(0,0,1,0,0,0,0,0),0,0,0,n(0,0,1,0,0,0,0,0)],[n(0,0,0,0,0,0,0,0),n(0,0,0,0,0,0,0,0),0,n(0,0,0,0,0,0,0,0),0,0,0,n(0,0,0,0,0,0,0,0),0,0,0,n(0,0,0,0,0,0,0,0)],[n(0,0,0,0,0,0,0,0),n(0,0,0,0,0,0,0,0),0,n(0,0,0,0,0,0,0,0),0,0,0,n(0,0,0,0,0,0,0,0),0,0,0,n(0,0,0,0,0,0,0,0)],[n(0,0,0,0,0,0,0,1),n(0,0,0,0,0,0,0,0),0,n(0,0,0,1,0,0,0,0),0,0,0,n(0,0,1,0,0,0,0,0),0,0,0,n(0,0,1,0,0,0,0,0)],[n(0,0,0,0,0,0,0,1),n(0,0,0,0,0,0,0,0),0,n(0,0,0,1,0,0,0,0),0,0,0,n(0,0,1,0,0,0,0,0),0,0,0,n(0,0,1,0,0,0,0,0)],[n(0,0,0,0,0,0,0,1),n(0,0,0,0,0,0,0,0),0,n(0,0,0,1,0,0,0,0),0,0,0,n(0,0,1,0,0,0,0,0),0,0,0,n(0,0,1,0,0,0,0,0)],[n(0,0,0,0,0,0,0,1),n(0,0,0,0,0,0,0,0),0,n(0,0,0,1,0,0,0,0),0,0,0,n(0,0,1,0,0,0,0,0),0,0,0,n(0,0,1,0,0,0,0,0)],[n(0,1,1,0,1,1,1,1),n(0,1,1,0,1,0,0,0),0,n(0,0,0,1,1,1,0,1),255,255,255,n(1,1,1,1,0,1,1,1),255,255,255,n(1,1,1,1,0,1,1,1)],[n(0,0,0,0,0,0,0,1),n(0,0,0,0,0,0,0,0),0,n(0,0,0,1,0,0,0,0),0,0,0,n(0,0,1,0,0,0,0,0),0,0,0,n(0,0,1,0,0,0,0,0)],[n(0,0,0,0,0,0,0,0),n(0,0,0,0,0,0,0,0),0,n(0,0,0,0,0,0,0,0),0,0,0,n(0,0,0,0,0,0,0,0),0,0,0,n(0,0,0,0,0,0,0,0)],e,e,e,e,e,e,e,e,e,e,[n(0,0,0,0,0,0,0,1),n(0,0,0,0,0,0,0,0),0,n(0,0,0,1,0,0,0,0),0,0,0,n(0,0,1,0,0,0,0,0),0,0,0,n(0,0,1,0,0,0,0,0)],[n(0,0,0,0,0,0,0,1),n(0,0,0,0,0,0,0,0),0,n(0,0,0,1,0,0,0,0),0,0,0,n(0,0,1,0,0,0,0,0),0,0,0,n(0,0,1,0,0,0,0,0)],[n(0,0,0,0,0,0,0,0),n(0,0,0,0,0,0,0,0),0,n(0,0,0,0,0,0,0,0),0,0,0,n(0,0,0,0,0,0,0,0),0,0,0,n(0,0,0,0,0,0,0,0)],[n(0,0,0,0,0,0,0,1),n(0,0,0,0,0,0,0,0),0,n(0,0,0,1,0,0,0,0),0,0,0,n(0,0,1,0,0,0,0,0),0,0,0,n(0,0,1,0,0,0,0,0)],[n(0,0,0,0,0,0,0,1),n(0,0,0,0,0,0,0,0),0,n(0,0,0,1,0,0,0,0),0,0,0,n(0,0,1,0,0,0,0,0),0,0,0,n(0,0,1,0,0,0,0,0)],[n(0,0,1,1,1,1,0,1),n(0,1,1,0,1,0,0,1),255,n(1,0,0,1,1,1,0,1),255,255,255,n(1,1,1,1,0,1,1,1),255,255,255,n(1,1,1,1,0,1,1,0)],[n(0,0,0,0,0,0,0,0),n(0,0,0,0,0,0,0,0),0,n(0,0,0,0,0,0,0,0),0,0,0,n(0,0,0,0,0,0,0,0),0,0,0,n(0,0,0,0,0,0,0,0)],e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,[n(0,0,0,0,0,0,0,0),n(0,0,0,0,0,0,0,0),0,n(0,0,0,0,0,0,0,0),0,0,0,n(0,0,0,0,0,0,0,0),0,0,0,n(0,0,0,0,0,0,0,0)],[n(0,0,0,0,0,0,0,1),n(0,0,0,0,0,0,0,0),0,n(0,0,0,1,0,0,0,0),0,0,0,n(0,0,1,0,0,0,0,0),0,0,0,n(0,0,1,0,0,0,0,0)],[n(0,0,0,0,0,0,0,1),n(0,0,0,0,0,0,0,0),0,n(0,0,0,1,0,0,0,0),0,0,0,n(0,0,1,0,0,0,0,0),0,0,0,n(0,0,1,0,0,0,0,0)],[n(0,0,0,0,0,0,0,0),n(0,0,0,0,0,0,0,0),0,n(0,0,0,0,0,0,0,0),0,0,0,n(0,0,0,0,0,0,0,0),0,0,0,n(0,0,0,0,0,0,0,0)],[n(0,0,0,0,0,0,0,0),n(0,0,0,0,0,0,0,0),0,n(0,0,0,0,0,0,0,0),0,0,0,n(0,0,0,0,0,0,0,0),0,0,0,n(0,0,0,0,0,0,0,0)],[n(0,0,0,0,0,0,0,0),n(0,0,0,0,0,0,0,0),0,n(0,0,0,0,0,0,0,0),0,0,0,n(0,0,0,0,0,0,0,0),0,0,0,n(0,0,0,0,0,0,0,0)],e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,[n(0,0,0,0,0,0,0,0),n(0,0,0,0,0,0,0,0),0,n(0,0,0,0,0,0,0,0),0,0,0,n(0,0,0,0,0,0,0,0),0,0,0,n(0,0,0,0,0,0,0,0)],[n(0,0,0,0,0,0,0,1),n(0,0,0,0,0,0,0,0),0,n(0,0,0,1,0,0,0,0),0,0,0,n(0,0,1,0,0,0,0,0),0,0,0,n(0,0,1,0,0,0,0,0)],[n(0,0,0,0,0,0,0,1),n(0,0,0,0,0,0,0,0),0,n(0,0,0,1,0,0,0,0),0,0,0,n(0,0,1,0,0,0,0,0),0,0,0,n(0,0,1,0,0,0,0,0)],[n(0,0,0,0,0,0,0,1),n(0,0,0,0,0,0,0,0),0,n(0,0,0,1,0,0,0,0),0,0,0,n(0,0,1,0,0,0,0,0),0,0,0,n(0,0,1,0,0,0,0,0)],[n(0,0,0,0,0,0,0,0),n(0,0,0,0,0,0,0,0),0,n(0,0,0,0,0,0,0,0),0,0,0,n(0,0,0,0,0,0,0,0),0,0,0,n(0,0,0,0,0,0,0,0)]]})();function R6(n){return n>=48&&n<=57}function E6(n){return typeof n!="string"?{textWrapping:n?.textWrapping??"wrap",endOfLineSpace:n?.endOfLineSpace??"wrap",endOfLineOtherSpace:n?.endOfLineOtherSpace??"wrap"}:n==="pre-wrap"?{textWrapping:"wrap",endOfLineSpace:"hang",endOfLineOtherSpace:"hang"}:{textWrapping:"wrap",endOfLineSpace:"wrap",endOfLineOtherSpace:"wrap"}}function A6(n){return n>=56320&&n<=57343}function mA(n){return n>=0&&n<65536}function M6(n){return n>=65536&&n<=1114111}var Ane=B(23395),Mne=B.n(Ane);let vA=(()=>{let n;return()=>n??(n=new(Mne()))})();function*D6(n,e){let t=vA(),r=0;for(;!(r>=n.length);){let i=t.nextBreak(n,r);yield{index:r,length:i-r},r=i}}function*O6(n,e){if(e?.reversed){yield n.length;let t=Array.from(D6(n));for(let r=t.length-2;r>=0;--r){let{index:i,length:a}=t[r];yield i+a}}else for(let{index:t,length:r}of D6(n))yield t+r}class Dne{constructor(e){this.text=e,this.breakCache=[]}next(e){if(e<0)return 0;if(e>=this.text.length)return this.text.length;let{text:t,breakCache:r}=this,i=vA();for(;e>=r.length;){let a=i.nextBreak(t,r.length);for(let g=r.length;g<a;++g)r.push(a)}return r[e]}}function yA(n){return n.map(e=>Array.isArray(e)?e:[e,e]).sort((e,t)=>e[0]-t[0]).reduce((e,t)=>{var r;let i=e.length;if(i&&(r=e[i-1],mA(r[0])===mA(t[0])&&t[0]<=r[1]+1)){let a=e[i-1];a[1]<t[1]&&(e[i-1]=[a[0],t[1]])}else e.push(t);return e},[])}function ml(n,e){let t=typeof e=="string"?e.charCodeAt(0):e;for(let r of n){if(t>=r[0]&&t<=r[1])return!0;if(t<r[0])break}return!1}function Na(n){return"\\u"+n.toString(16).padStart(4,"0")}let N6=function(n){let e=Object.create(null);for(let t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=yA(n[t]));return e}({cjk:[[12544,12591],[12704,12735],[19968,40959],[13312,19903],[131072,173791],[173824,177983],[177984,178207],[178208,183983],[183984,191456],[63744,64255],[194560,195103],[12032,12255],[11904,12031],[12736,12783],[12272,12287]],kana:[[12352,12447],[12448,12543],[12784,12799],[65381,65439],[12688,12703],[110592,110847],[110848,110895],[110896,110959]],hangui:[[4352,4607],[43360,43391],[55216,55295],[12592,12687],[65440,65500],[44032,55215]],symbol:[[8192,11263],[11776,11903],[65024,65039],[65280,65519],[65520,65535]],symbolCjk:[[12288,12351],[94176,94207],[65072,65103],[65104,65135],[65040,65055],[12800,13055],[127488,127743],[13056,13311]],space:[[9,13],65279,32,160,[8192,8202],8239,8287],asciiTabNewline:[9,10,13],asciiWhitespace:[9,10,12,13,32],breakingSpace:[9,10,13,32,133,5760,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8232,8233,8287,12288,8203],surrogate:[[55296,57343]],joiningTypeLeft:[[43122,43122],[68301,68301],[68311,68311],[68864,68864]],joiningTypeRight:[[1570,1573],[1575,1575],[1577,1577],[1583,1586],[1608,1608],[1649,1651],[1653,1655],[1672,1689],[1728,1728],[1731,1739],[1741,1741],[1743,1743],[1746,1747],[1749,1749],[1774,1775],[1808,1808],[1813,1817],[1822,1822],[1832,1832],[1834,1834],[1836,1836],[1839,1839],[1869,1869],[1881,1883],[1899,1900],[1905,1905],[1907,1908],[1912,1913],[2112,2112],[2118,2119],[2121,2121],[2132,2132],[2151,2151],[2153,2154],[2218,2220],[2222,2222],[2225,2226],[2233,2233],[68293,68293],[68295,68295],[68297,68298],[68302,68306],[68317,68317],[68321,68321],[68324,68324],[68335,68335],[68481,68481],[68483,68485],[68489,68489],[68492,68492],[68494,68495],[68497,68497],[68521,68524],[68898,68898],[69427,69427],[69460,69460]],joiningTypeDual:[[1568,1568],[1574,1574],[1576,1576],[1578,1582],[1587,1599],[1601,1607],[1609,1610],[1646,1647],[1656,1671],[1690,1727],[1729,1730],[1740,1740],[1742,1742],[1744,1745],[1786,1788],[1791,1791],[1810,1812],[1818,1821],[1823,1831],[1833,1833],[1835,1835],[1837,1838],[1870,1880],[1884,1898],[1901,1904],[1906,1906],[1909,1911],[1914,1919],[1994,2026],[2113,2117],[2120,2120],[2122,2131],[2133,2133],[2144,2144],[2146,2149],[2152,2152],[2208,2217],[2223,2224],[2227,2228],[2230,2232],[2234,2237],[6151,6151],[6176,6264],[6279,6312],[6314,6314],[43072,43121],[68288,68292],[68307,68310],[68312,68316],[68318,68320],[68331,68334],[68480,68480],[68482,68482],[68486,68488],[68490,68491],[68493,68493],[68496,68496],[68525,68526],[68865,68897],[68899,68899],[69424,69426],[69428,69444],[69457,69459],[125184,125251]],joiningTypeTransparent:[[173,173],[768,879],[1155,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1552,1562],[1564,1564],[1611,1631],[1648,1648],[1750,1756],[1759,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2045,2045],[2070,2073],[2075,2083],[2085,2087],[2089,2093],[2137,2139],[2259,2273],[2275,2306],[2362,2362],[2364,2364],[2369,2376],[2381,2381],[2385,2391],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2558,2558],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2641,2641],[2672,2673],[2677,2677],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2810,2815],[2817,2817],[2876,2876],[2879,2879],[2881,2884],[2893,2893],[2902,2902],[2914,2915],[2946,2946],[3008,3008],[3021,3021],[3072,3072],[3076,3076],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3170,3171],[3201,3201],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3328,3329],[3387,3388],[3393,3396],[3405,3405],[3426,3427],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3981,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4151],[4153,4154],[4157,4158],[4184,4185],[4190,4192],[4209,4212],[4226,4226],[4229,4230],[4237,4237],[4253,4253],[4957,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6277,6278],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6683,6683],[6742,6742],[6744,6750],[6752,6752],[6754,6754],[6757,6764],[6771,6780],[6783,6783],[6832,6846],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7040,7041],[7074,7077],[7080,7081],[7083,7085],[7142,7142],[7144,7145],[7149,7149],[7151,7153],[7212,7219],[7222,7223],[7376,7378],[7380,7392],[7394,7400],[7405,7405],[7412,7412],[7416,7417],[7616,7673],[7675,7679],[8203,8203],[8206,8207],[8234,8238],[8288,8292],[8298,8303],[8400,8432],[11503,11505],[11647,11647],[11744,11775],[12330,12333],[12441,12442],[42607,42610],[42612,42621],[42654,42655],[42736,42737],[43010,43010],[43014,43014],[43019,43019],[43045,43046],[43204,43205],[43232,43249],[43263,43263],[43302,43309],[43335,43345],[43392,43394],[43443,43443],[43446,43449],[43452,43453],[43493,43493],[43561,43566],[43569,43570],[43573,43574],[43587,43587],[43596,43596],[43644,43644],[43696,43696],[43698,43700],[43703,43704],[43710,43711],[43713,43713],[43756,43757],[43766,43766],[44005,44005],[44008,44008],[44013,44013],[64286,64286],[65024,65039],[65056,65071],[65279,65279],[65529,65531],[66045,66045],[66272,66272],[66422,66426],[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[68325,68326],[68900,68903],[69446,69456],[69633,69633],[69688,69702],[69759,69761],[69811,69814],[69817,69818],[69888,69890],[69927,69931],[69933,69940],[70003,70003],[70016,70017],[70070,70078],[70089,70092],[70191,70193],[70196,70196],[70198,70199],[70206,70206],[70367,70367],[70371,70378],[70400,70401],[70459,70460],[70464,70464],[70502,70508],[70512,70516],[70712,70719],[70722,70724],[70726,70726],[70750,70750],[70835,70840],[70842,70842],[70847,70848],[70850,70851],[71090,71093],[71100,71101],[71103,71104],[71132,71133],[71219,71226],[71229,71229],[71231,71232],[71339,71339],[71341,71341],[71344,71349],[71351,71351],[71453,71455],[71458,71461],[71463,71467],[71727,71735],[71737,71738],[72148,72151],[72154,72155],[72160,72160],[72193,72202],[72243,72248],[72251,72254],[72263,72263],[72273,72278],[72281,72283],[72330,72342],[72344,72345],[72752,72758],[72760,72765],[72767,72767],[72850,72871],[72874,72880],[72882,72883],[72885,72886],[73009,73014],[73018,73018],[73020,73021],[73023,73029],[73031,73031],[73104,73105],[73109,73109],[73111,73111],[73459,73460],[78896,78904],[92912,92916],[92976,92982],[94031,94031],[94095,94098],[113821,113822],[113824,113827],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[121344,121398],[121403,121452],[121461,121461],[121476,121476],[121499,121503],[121505,121519],[122880,122886],[122888,122904],[122907,122913],[122915,122916],[122918,122922],[123184,123190],[123628,123631],[125136,125142],[125252,125259],[917505,917505],[917536,917631],[917760,917999]],joiningTypeCausing:[[1600,1600],[2042,2042],[6154,6154],[8205,8205]]});function Md(){for(var n=arguments.length,e=Array(n),t=0;t<n;t++)e[t]=arguments[t];return e.length===1?N6[e[0]]:yA(e.reduce((r,i)=>(r.push(...N6[i]),r),[]))}function*OC(n,e){e===void 0&&(e={});let{from:t=0,to:r=n.length,reversed:i=!1}=e;if(!(t>=0&&t<=n.length&&r>=0&&r<=n.length&&t<r))return;let a=i?-1:1,g=i?t:r,R=i?r:t;for(;;){let L;if(R===g||typeof(L=R+a===g?n.charCodeAt(i?R+a:R):function(oe,se,he){if(he>0)return oe.codePointAt(se);if(se>=1&&se<=oe.length){let me=oe.charCodeAt(se-1);if(!A6(me))return me;{let ye=se>=2?oe.codePointAt(se-2):void 0;return ye!==void 0&&M6(ye)?ye:me}}}(n,R,a))!="number")break;let W=M6(L),K=W?2:1,Q=R+K*a;yield{value:L,index:i?Q:R,length:K,isSupplementary:W},R=Q}}Object.keys({space:Md("space"),symbol:yA([[0,25],[33,38],[40,44],[46,47],[58,64],[91,96],[123,127],171,187,[8220,8223]]),single:Md("cjk","kana","symbolCjk"),surrogate:Md("surrogate")});let P6=Md("joiningTypeLeft","joiningTypeDual"),B6=Md("joiningTypeRight","joiningTypeDual"),NC=Md("joiningTypeTransparent"),PC=Md("joiningTypeCausing"),L6=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1519,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1564],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2046,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2144,2154],[2208,2228],[2230,2237],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67742],[67751,67759],[67808,67826],[67828,67829],[67835,67867],[67872,67897],[67903,67903],[67968,68023],[68028,68047],[68050,68096],[68112,68115],[68117,68119],[68121,68149],[68160,68168],[68176,68184],[68192,68255],[68288,68324],[68331,68342],[68352,68405],[68416,68437],[68440,68466],[68472,68497],[68505,68508],[68521,68527],[68608,68680],[68736,68786],[68800,68850],[68858,68899],[69376,69415],[69424,69445],[69457,69465],[69600,69622],[124928,125124],[125127,125135],[125184,125251],[125259,125259],[125264,125273],[125278,125279],[126065,126132],[126209,126269],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651]],wA={preceding:!1,subsequent:!1};function F6(n){return wA.preceding=n?.preceding??!1,wA.subsequent=n?.subsequent??!1,wA}let Hp={text:"",hasPrecedingJoiner:!1,hasSubsequentJoiner:!1,prefixedJoiner:"",suffixedJoiner:""};function BC(n,e,t){for(let r in n)if(Object.prototype.hasOwnProperty.call(n,r)&&e.call(t,n[r],r,n))break}let V6=function(){let n=Object.create(null);return n.px=.75,n.cm=72/2.54,n.mm=.1*n.cm,n.q=.025*n.cm,n.in=72,n.pc=12,n.pt=1,n}(),One=function(){let n=Object.create(null),e=1/V6.px;return BC(V6,function(t,r){n[r]=t*e}),n.px=1,n}();(function(){let n=Object.create(null);return BC(One,function(e,t){n[t]=1/e}),n.px=1,n})(),B(52250);function H6(n){var e,t;return e=(r,i,a)=>(r[i]=a,r),t=Object.create(null),BC(n,(r,i,a)=>{t=e(t,r,i,a)}),t}let Nne=(H6(Object.assign(Object.create(null),{none:"none",solid:"solid",dotted:"dotted",dashed:"dashed"})),Object.assign(Object.create(null),{none:"none",solid:"none",dotted:"2,2",dashed:"6,6"}));Object.assign(H6(Nne),{none:"solid"});function bA(n){if(!n)return"";if(typeof n=="string")return n;if(Array.isArray(n))return n.map(bA).join("");{let e="",{metas:t,styles:r,scripts:i}=n;if(t)for(let[a,g]of Object.entries(t))e+=`<meta http-equiv="${wo(a)}" content="${wo(g)}">`;if(r)for(let a of r)a&&(e+=`<link rel="stylesheet" type="text/css" href="${wo(a)}">`);if(i)for(let a of i)a&&(e+=`<script type="text/javascript" src="${wo(a)}"><\/script>`);return e}}["Apple Symbols","Bookshelf Symbol 7","Marlett","Symbol","Webdings","Wingdings","Wingdings 2","Wingdings 3"].map(n=>n.toLowerCase());let Pne=typeof OffscreenCanvas<"u";function $6(n){return(n?.preferOffscreen&&Pne?new OffscreenCanvas(100,100):(n?.document??document).createElement("canvas")).getContext("2d",n?.contextAttributes)}function z6(n){let e=[];for(let t of n)try{for(let r of t.cssRules)r.constructor.name==="CSSFontFaceRule"&&e.push(r)}catch(r){console.warn(r)}return e.map(Bne).join(`
`)}function Bne(n){let e=n.parentStyleSheet?.href??n.parentStyleSheet?.ownerNode?.ownerDocument?.location?.href??window.location.href;return n.cssText.replaceAll(/url\("([^"]+)"\)/g,(t,r)=>`url("${new URL(r,e).href}")`)}async function W6(n){await Promise.allSettled(Array.from(n,async e=>{try{await e.load()}catch{}}))}let U6=["base","link","meta","noscript","script","style","template","title","command"],Lne=["embed","iframe","object","head"].concat(U6),G6=["table","caption","col","colgroup","tbody","td","tfoot","th","thead","tr"],Fne=["address","article","aside","blockquote","dd","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","menu","nav","ol","p","pre","section","ul"].concat(G6),CA={metadata:U6,heading:["h1","h2","h3","h4","h5","h6","hgroup"],phrasing:["a","abbr","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","label","map","mark","math","meter","noscript","object","output","picture","progress","q","ruby","s","samp","script","select","slot","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","command","keygen"],embedded:["audio","canvas","embed","iframe","img","math","object","picture","svg","video"],ignored:Lne,list:["ol","ul"],table:G6,textblock:["p","li","h1","h2","h3","h4","h5","h6"],block:Fne};(function(n,e,t){let r=Object.create(null);BC(n,(i,a,g)=>{r[a]=e.call(void 0,i,a,g)})})(CA,n=>n.reduce((e,t)=>(e[t.toLowerCase()]=e[t.toUpperCase()]=!0,e),Object.create(null)));function _A(n){if(!n)return"10px sans-serif";if(n.font)return n.font;let{fontStyle:e="",fontVariant:t="",fontWeight:r="",fontStretch:i="",fontSize:a="10px",fontFamily:g="sans-serif",lineHeight:R=""}=n,L=typeof a=="string"?a:`${a}px`,W=typeof R=="string"?R:`${R}`,K=typeof g=="string"?g:g.map(oe=>((oe=oe.trim()).length>=2&&(oe[0]!=="'"&&oe[0]!=='"'||oe.at(-1)!=="'"||oe.at(-1)!=='"')&&(oe=`"${oe}"`),oe)).join(","),Q=[];return e&&Q.push(e),t&&Q.push(t),r&&Q.push(r),i&&Q.push(i),Q.push(L),W&&Q.push(`/ ${W}`),Q.push(K),Q.join(" ")}function j6(n){return{direction:n?.direction??"ltr",font:_A(n),fontStretch:n?.fontStretch??"normal"}}let LC=null;class q6{constructor(e){this.metrics=e}get actualBoundingBoxAscent(){return this.metrics.actualBoundingBoxAscent}get actualBoundingBoxDescent(){return this.metrics.actualBoundingBoxDescent}get actualBoundingBoxLeft(){return this.metrics.actualBoundingBoxLeft}get actualBoundingBoxRight(){return this.metrics.actualBoundingBoxRight}get fontBoundingBoxAscent(){return this.metrics.fontBoundingBoxAscent??this.metrics.actualBoundingBoxAscent}get fontBoundingBoxDescent(){return this.metrics.fontBoundingBoxDescent??this.metrics.actualBoundingBoxDescent}get width(){return this.metrics.width}get height(){return this.fontBoundingBoxAscent+this.fontBoundingBoxDescent}get actualWidth(){return this.metrics.actualBoundingBoxLeft+this.metrics.actualBoundingBoxRight}get actualHeight(){return this.metrics.actualBoundingBoxAscent+this.metrics.actualBoundingBoxDescent}}function FC(n,e){var t;let r=(t=e)&&"measureText"in t?t:LC||(LC=$6())?(Object.assign(LC,j6(t)),LC):null;return new q6(r?r.measureText(n):{actualBoundingBoxAscent:0,actualBoundingBoxDescent:0,actualBoundingBoxLeft:0,actualBoundingBoxRight:0,fontBoundingBoxAscent:0,fontBoundingBoxDescent:0,width:0})}function Y6(n){let e=n.createElement("div");return Object.assign(e.style,{position:"absolute",left:"0",top:"0",margin:"0",padding:"0",wordWrap:"normal",whiteSpace:"nowrap"}),e}function SA(n){let e=function(i){let a=i.createElement("span");return Object.assign(a.style,{verticalAlign:"baseline"}),a}(n),t=function(i){let a=i.createElement("img");return a.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=",a.width=1,a.height=1,Object.assign(a.style,{margin:"0",padding:"0"}),a}(n),r=function(i){let a=i.createElement("span");return a.textContent="",a}(n);return e.append(t,r),{inline:e,ruler:t,text:r}}function K6(n,e){let t=Y6(n),{inline:r,ruler:i}=SA(n),{inline:a,ruler:g}=SA(n);return a.style.verticalAlign=e?"super":"sub",t.append(r,a),{line:t,baseRuler:i,scriptRuler:g}}let X6=new Map;function By(n){let e={font:_A(n)},t=e.font,r=X6.get(t);if(r)return r;let i=function(a){let{body:g,baselineLine:R,baselineRuler:L,baselineText:W,superBaseRuler:K,superScriptRuler:Q,subBaseRuler:oe,subScriptRuler:se}=function(){if(o)return o;let ze=function(un){un===void 0&&(un={});let an=un.preset,{parentNode:Ut=document.body,inheritFontFaces:kt=an==="metrics"}=un,Pt=document.createElement("iframe");an&&(an==="hidden"||an==="metrics")&&Object.assign(Pt.style,{position:"absolute",left:"-5566px",top:"-5566px",width:"5566px",height:"5566px",opacity:"0",border:"0",overflow:"hidden","pointer-events":"none","z-index":"0"}),Ut.appendChild(Pt);let mn=Pt.contentDocument;if(mn){var Zt,dn={...un,headContent:[un.headContent,kt&&Ut.ownerDocument?`<style>${(Zt=z6(Ut.ownerDocument.styleSheets))&&pc.test(Zt)?Zt.replace(pc,function(Zs){return fc[Zs]}):Zt}</style>`:void 0]};dn===void 0&&(dn={});let{lang:fn,headContent:er="",bodyContent:yr=""}=dn,Ei=fn?` lang="${wo(fn)}"`:"";if(mn.open(),mn.write(`<!DOCTYPE html><html${Ei}><head><meta charset="utf-8">${bA(er)}</head><body>${bA(yr)}</body></html>`),mn.close(),an==="metrics"){let Zs=mn.body.style;Zs["-moz-text-size-adjust"]="none",Zs["-webkit-text-size-adjust"]="none",Zs["text-size-adjust"]="none",mn.fonts&&W6(mn.fonts)}}return Pt}({preset:"metrics"}),We=ze.contentDocument;if(!We)throw Error("Content document of measurement iframe is not available.");let{line:qe,ruler:Ke,text:at}=function(un){let an=Y6(un),{inline:Ut,ruler:kt,text:Pt}=SA(un);return an.append(Ut),{line:an,ruler:kt,text:Pt}}(We),{line:gt,baseRuler:pt,scriptRuler:Tt}=K6(We,!0),{line:jt,baseRuler:on,scriptRuler:hn}=K6(We,!1);return We.body.append(qe,gt,jt),o={iframe:ze,body:We.body,baselineLine:qe,baselineRuler:Ke,baselineText:at,superLine:gt,superBaseRuler:pt,superScriptRuler:Tt,subLine:jt,subBaseRuler:on,subScriptRuler:hn}}();g.style.font=a.font;let he=R.getBoundingClientRect().height,me=L.getBoundingClientRect().bottom,ye=W.getBoundingClientRect().height,Te=me-W.getBoundingClientRect().top,Me=K.getBoundingClientRect().bottom-Q.getBoundingClientRect().bottom,Oe=oe.getBoundingClientRect().bottom-se.getBoundingClientRect().bottom;return{height:he,lineBoundingBoxAscent:me,lineBoundingBoxDescent:he-me,textHeight:ye,textBoundingBoxAscent:Te,textBoundingBoxDescent:ye-Te,superBaselineAscent:Me,superBaselineDescent:-Me,subBaselineAscent:Oe,subBaselineDescent:-Oe}}(e);return X6.set(t,i),i}let IA=[0,0];function VC(n){n.font=_A(n)}function J6(n){if(VC(n),n.verticalAlignReferenceStyle&&VC(n.verticalAlignReferenceStyle),n.additionalLineStyles){let e=n.additionalLineStyles;Array.isArray(e)?e.forEach(VC):VC(e)}return n}function Z6(n,e){if(n){let t={...e,...n};if(n.verticalAlignReferenceStyle&&(t.verticalAlignReferenceStyle={...e,...n.verticalAlignReferenceStyle}),n.additionalLineStyles){let r=n.additionalLineStyles;Array.isArray(r)?t.additionalLineStyles=r.map(i=>({...e,...i})):t.additionalLineStyles={...e,...r}}return J6(t)}if(e)return J6({...e})}function Q6(n,e){return{width:n.width,height:n.height,textBoxAscent:n.fontBoundingBoxAscent,textBoxDescent:n.fontBoundingBoxDescent,lineBoxAscent:e.lineBoundingBoxAscent,lineBoxDescent:e.lineBoundingBoxDescent}}function eV(n){let e=n?.textBoxAscent??0,t=n?.textBoxDescent??0,r=n?.lineBoxAscent??0,i=n?.lineBoxDescent??0;return{width:n?.width??0,height:e+t,textBoxAscent:e,textBoxDescent:t,lineBoxAscent:r,lineBoxDescent:i}}function tV(n,e){let t=Math.max(n.textBoxAscent,e.textBoxAscent),r=Math.max(n.textBoxDescent,e.textBoxDescent),i=Math.max(n.lineBoxAscent,e.lineBoxAscent),a=Math.max(n.lineBoxDescent,e.lineBoxDescent);return{width:n.width+e.width,height:t+r,textBoxAscent:t,textBoxDescent:r,lineBoxAscent:i,lineBoxDescent:a}}function xA(n,e){return{text:FC(n,e),line:By(e)}}function HC(n,e){return e?n=function(t,r){let i=r.additionalLineStyles;if(!i)return t;for(let a of(t={...t},Array.isArray(i)?i:[i])){let{lineBoundingBoxAscent:g,lineBoundingBoxDescent:R}=By(a);t.lineBoxAscent=Math.max(t.lineBoxAscent,g),t.lineBoxDescent=Math.max(t.lineBoxDescent,R)}return t}(n=function(t,r){let i=r.verticalAlign;if(i!=="super"&&i!=="sub")return t;let a=By(r.verticalAlignReferenceStyle??r),g=i==="super"?a.superBaselineAscent:a.subBaselineAscent;return{width:t.width,height:t.height,textBoxAscent:t.textBoxAscent+g,textBoxDescent:t.textBoxDescent-g,lineBoxAscent:Math.max(t.lineBoxAscent+g,a.lineBoundingBoxAscent),lineBoxDescent:Math.max(t.lineBoxDescent-g,a.lineBoundingBoxDescent)}}(n,e),e):n}function nV(n){if(typeof n=="number")return{total:n,width:n,margin:[0,0],filled:void 0};{let{width:e,margin:t=[0,0],filled:r}=n;return{total:e-t[0]-t[1],width:e,margin:t,filled:r&&eV(r)}}}function $C(n,e){return Z6(n.style,e?.defaultStyle)}function rV(n){let e="border"in n?n.border:void 0;return{left:e?.left??0,top:e?.top??0,right:e?.right??0,bottom:e?.bottom??0}}function TA(n,e,t){let{text:r,line:i}=xA(n,e),a=rV(t),g=r.fontBoundingBoxAscent+a.top,R=r.fontBoundingBoxDescent+a.bottom,L=i.lineBoundingBoxAscent+a.top,W=i.lineBoundingBoxDescent+a.bottom;return HC({width:r.width+a.left+a.right,height:g+R,textBoxAscent:g,textBoxDescent:R,lineBoxAscent:L,lineBoxDescent:W},e)}var Vne=B(87291),Hne=B(64806),iV={};let $ne=[[4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,3,4,4,4,4,4,4,4,4,4,4,4],[0,4,4,1,1,4,4,4,4,1,1,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[0,4,4,1,1,4,4,4,4,1,1,1,1,1,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[4,4,4,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,4,2,4,1,1,1,1,1,1,1,1,1,1],[1,4,4,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,4,2,4,1,1,1,1,1,1,1,1,1,1],[0,4,4,1,1,1,4,4,4,0,0,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[0,4,4,1,1,1,4,4,4,0,0,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[0,4,4,1,1,1,4,4,4,0,0,1,0,1,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[0,4,4,1,1,1,4,4,4,0,0,1,1,1,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[1,4,4,1,1,1,4,4,4,0,0,1,1,1,1,1,1,1,0,0,4,2,4,1,1,1,1,1,0,1,1,1,0],[1,4,4,1,1,1,4,4,4,0,0,1,1,1,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[1,4,4,1,1,1,4,4,4,1,1,1,1,1,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[1,4,4,1,1,1,4,4,4,1,1,1,1,1,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[1,4,4,1,1,1,4,4,4,1,1,1,1,1,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[0,4,4,1,1,1,4,4,4,0,1,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[0,4,4,1,1,1,4,4,4,0,0,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[0,4,4,1,0,1,4,4,4,0,0,1,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[0,4,4,1,0,1,4,4,4,0,0,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[1,4,4,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,4,2,4,1,1,1,1,1,1,1,1,1,0],[0,4,4,1,1,1,4,4,4,0,0,0,0,0,0,1,1,1,0,4,4,2,4,0,0,0,0,0,0,0,0,1,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0],[1,4,4,1,1,1,4,4,4,1,1,1,1,1,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[1,4,4,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,4,2,4,1,1,1,1,1,1,1,1,1,1],[0,4,4,1,1,1,4,4,4,0,1,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,1,1,0,0,0,1,0],[0,4,4,1,1,1,4,4,4,0,1,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,1,0,0,0,1,0],[0,4,4,1,1,1,4,4,4,0,1,0,0,0,0,1,1,1,0,0,4,2,4,1,1,1,1,0,0,0,0,1,0],[0,4,4,1,1,1,4,4,4,0,1,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,1,1,0,0,0,1,0],[0,4,4,1,1,1,4,4,4,0,1,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,1,0,0,0,1,0],[0,4,4,1,1,1,4,4,4,0,0,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,0,1,0,0,1,0],[0,4,4,1,1,1,4,4,4,0,1,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,1,1,0],[0,4,4,1,1,1,4,4,4,0,1,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[1,4,4,1,1,1,4,4,4,1,1,1,1,1,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[0,4,4,1,1,0,4,4,4,0,0,0,0,0,0,0,0,0,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0]],zne=new Vne(Hne.toByteArray("AAgOAAAAAAAQ4QAAAQ0P8vDtnQuMXUUZx+eyu7d7797d9m5bHoWltKVUlsjLWE0VJNigQoMVqkStEoNQQUl5GIo1KKmogEgqkKbBRki72lYabZMGKoGAjQRtJJDaCCIRiiigREBQS3z+xzOTnZ3O+3HOhd5NfpkzZx7fN9988zivu2M9hGwB28F94DnwEngd/Asc1EtIs9c/bIPDwCxwLDgezHcodyo4w5C+CCwBS8FnwSXgCnA1uFbI93XwbXAbWAfWgx+CzWAb+An4KfgFeAzsYWWfYuFz4CXwGvgb+Dfo6yNkEEwGh4CZYB44FpwI3g1OY+kfBItZOo2fB84Hy8DF4HJwNbiWpV8PVoO1LH4n2NRXyN+KcAd4kNVP9XsY4aPgcfAbsBfs6SniL4K/sPjfEf6HlanXCRkCw2BGvUh/keWfXS/CY+pFXs7x9XHmM94LTmWIeU2cgbxnS/k/B3kf86jDhU8L9V2E40vAFWAlWFUfb++NOL4F3C7JX4/4GiE+hvgWsF0oS7mXldspnN+F493gyXrh9xTav0cg3EvzgVfBG6wsmVSEkxBOBgdPGpd7JI6PnqRvJ68/xlbHof53gPeA94OzwLngk+ACsAwsByvASrAK3MB0Ws3CtQjvBJvAVrADPMDSHkb4CNijaccTwvnf4fiPEs8Lxy+D18A/QU8/xjgYBjPAbDAKTgYLwOngTHAO+EQ/8wuEF4EvsPiVCFf2+9tsFStzA8LVHuXXBsi6QyqzUYiPMR/7Mc7dAx7oL8bzw/3u/Bw8Bp4Az4AXwCtgHzsmDXP5fiF9iiVvly5d0sHngar16NKlS5cuXbp06fLmYlqHXrcd3ph4P0THUY3iXh49novju4S0tzfs5d+JPKewfAsRntZb3K9ZhOMlrO6lCC8An28U9+OuovcPcPxlVu5rCL/VmHh/iHIrzn3fIPu7SN8Axmg+8AOwEWwCm7tp3bRuWjetm5Y8bSu4B9zbKO6ZVsnORrVU3f4uXTqZ2H3sLoyx3eDXjfDndE9qyj6L838CfwVvgFpzYnof4oNgOhgBc8Fos9DrZIQLmtXPP1MmF6wGj4H+KXoWguvADkXaPil+YpuQy8Am8Ey7ODdtmJDF4HowBp4De6HDTNjhfHAHeBr0DBBy0kDxfPbcgSIusgrcWhtnJ8vL+TPix7UIOQtcBq4C28Cr4KRBnANbwSuDE+s50JgyNNFuXbp06XIgsXjIvPafjvXozKY+fVFz/z0LT1uCtKVSWbrOLWPnztG8e0Xfy7ol8XtZJi7WtG+5od2UFXQ/A12vUeS7jp27yVKHjdsU9lXB869TyNvAzt0lpP2oWbwLdjiO78bx/Sz+EMJHwK9Y/LcIfw+eZ3F67/Hl5vh9xX80J+rwX8SvRDhpgL17iPAQMHNArfPrqHPewLheI+AERV6efwV418B4nOZ/H+IfYHV8GOF5LJ3eAz0fx8sM9S0fUNud39O9CulfGZhY5huI3wzWgNvBelbHZoTbNPVpfYjKQpkHwUNgl0LWblbnk0LbbDxr0OMFpL3iqWdu9nWYPlVAWkXY39LnGdCkDbeqv1YNbfcMQ3t9oe8lzm6NH9N1ZB6Ln4BwfkJZJk7RyFnYKt6b/JDQXx9p5X+eFdqOjzM9P9MB/lUlFzr20aXIdzlY4dmn9F3YqtvoO76/2hp/D/xA5Zue88nNyL8GbFbs075X0tyUig3Qd2MCnf//HjnzpbsR3g9+1kHzzVjdnE71/qVBX9rGPUh/ysNWe1neFzvIDi5zAufV1sT0N0poR22wkFUfTOPfA4N2mbZ5fSrqOHSw+IbkSBbOGSzSRgf91/GTUWYBOB2cIZQ/G8cfBZ8CFwrnL8XxF8FKcA24jqXdiPA7Qr61OF7H4mMItwzuv2/YLth1ISt3Hzu3k4W7EH5JqPdRHD/O4k+z8A8IX5Lq3y7Z4nXE9xn6kX6vQ4bKfy+ok+hH+xf3hq9dnTTHhjKd2GmDuWA242iHMq4cC7A8kJ7i8o1+skSa7Jieo38HCWnoNjKFhdSFBxzpZ7QE6lI8N4S14aASZcryaV/WWHw66f6NHuCoxuQxmvM56GX9QMd8Q4D65ywGP+ZzRJuM+zQvx/MOS2VFeqQ4IXnH26zM9Xe6/E6D+4foAzzuajPZp8Qyw5ayZVDWuH0z0BtYRkeIDqH9KO9VbH1btd/lhNqCzvl8zeLnG0S/hnU6baHfpiuO6yy0rd+DHURo/zYF5H26j03rQsip2ndzz82u1z9N4VjWKWeb68Tedpt95HRVXp7H1R6p+/Wt4FPy/PpWwscOLRJ+PVWF/+W0iVyGzs18TIvXkOJ1Wxm66vSXz+vylenrZcj1ub439W+K8RNCGTJi2p/TJ1K23VaXr35tRpnzmjxequgfcfyk6B/TGBVlyedsNgpdd/h+W1U3P99QyFPNo1X3TwpM/WLTIWYfoBqXrv6iskHZ/RFr79R6hIyHBrH3f1nrUVnjP8SnZZ+rYtzr9Exld5MNbPNErusAPg+77u/eDOPftU9yj39TH7rezxd1LvsZQJlzkWlOirG/79zjMj/mtHUKu7vKy+3/LnXr9okyKedjX5/0He9iP/j63LwOQdarEVlfy8OO/Lqw023j6xcqmwxLiOd6heM2i9cV9LJy8jMJ23yQ+rpbfu7EQ/pXE8KYvUSqvVnb4XzZa6LrHMXHR+zcLvqWbm/Bn0/HzIs6fWPHoat8XfnDKmZGxRxeMbn2UqZ5Q94nmcZRbqqUXbZ8+lcjE+cPX11t814orvvAXNcG8vqj2vvk1MGn3anlj0bIT72v47bvE+Lc98T9b6r7AKn6j+8Duf7D0nnZx/j7Zjn0j9nbpSTndaLr9WNLivP+iN23xF7L+fqv6ZouFyb78jxVXvv5jJ9YUs9/sddO8h7KNg5jrhfaJGztT6G7KF+1d6yCmD5Kdb2fan60rSc552fZr3zeQ9DpnPp+Si5cx5Ktv2QfSzF/mMbWdOm46rFI4XstnU9xeqX4NKb7TKEdcr6pZOK3ID1k/LvFHkVczEuZLEDr499YqvqBym1aEHWgcvoYOtv0M91qQl5TfpO/in6rWx8OVpT1Wedkv3f5xom3T/xeR/6Gx6V86PWAOB4bBpqWdN+yTcVxjIyGRz/FrDGu6w/3d7kPm8StX8RyPu+uuvpNju/vTLJV37GpvoM0oZPnW87VLnL/5pDno1NoW1R6yedU6TyUv3u19a3KFnIbTLYz+ZCLP4T0tU1uivFgso0pnsJ/UtXvarNY28Xq5cvkBDrQP/E5ZaiuQwwfmTlsOiQRU1fMuqrDd/3ISSuwjOwXOfTyGUMpZIXq4GpLn3pUcdfzch2x7XO1u2uZHOPb1G6b3Xg9PH1IIWeEpJlPQtqos2EKW8b0u8rnuP1UeVLoXJb9be0uG9nnbchjU+XTszT5VeNBThPHnc5OKj1U9aj0GTHIVaGy1YhEWT4ixns00DT+XEzWn/7VAsIc63Cov3OdyhwjrnaqQqZvWKXdypRdlq+k8msZ031U+Rm4fA+3TtyeR9hwfW9G9yxDN0fZMN33F+9TE6md4hwoxumfaUzI9fN3PFT3xVV2msrQ3UsnChm6Nulk8TndpS28D3zX9tTIPsF/z7Am5OkTjm1tI1JZW74+4VgsZ0N3L1yXV3WeP5uR7TGHHdvC3JQlxybfpd22tDlk/2eofRK8TzrN/qnar/K/OUTth6I/+jAnEptNbPvFHP2gs40N3+dfMWtwqvVct7/wfd8gtQ7imifial9ZJ9/3IHLYU6eDj3+4PhsNhX+vwvcWLnu6kGfEMe8DuciPfUfGZB8X/7HJy/Gefe5n+VRGFd/wyP2ta7/LO4yh/sbLV/k9lev6kfO9Dt/5U67b1/6u/epqB1U9Me23jfHY9sscAg4tkbLl+e4/U36rJ9ddxfd6sg5vq5ice42Wpk/pb9FOJ36/W9tpv4kbC79nUbZceX8Zu6/qJ+P3WvhvA8v3reh7Jbn2d6rrNC7XNZTLma4Ba0JI9efX2uLzF5scG/w9UNU1ZxW+ymUfzELeTllXlQ1rUuhzjS5fp9c964iFBOqeSz63bU065nZKdU+mDEz3qHIjjifquw0pnb/raRtvrnsYcb46ihT3taoYz6brdNW9l6rWRnE/navdPn1XlR1km7hcz1WlH/elKuSOSvLLuE8U6m8uzwRdfcGl73VyTHuyMvzJ1Sa2cWDTP/Z63Kc94n2B1PYr24dz1JlyHLlcP+S4B6vD1c9EW4q2LWstCvUjeVy63k/LMYdUNd5D1xQfvVTzX1VjkMsUv88N8VH5fReVn/Fjn++/h6X6Q8a6b1/q3g/i/ewi0/Scs8zxXeV6mWIOUPlPzBgdFerW+bZrm2P18dnjuK6HunEp+rHvPMXbr+sHVb/lnL+pTP57jPw9Cvk3PW178JD9qChfzuvTf7Htl38L1QUf/VKu9SFjwWbTWPvFEvu7Uq76y7+31g6QlYPc669pbsm9Xur2LWI9Pu8ypfDXqm3A2z8s1FWGn4ntL9NfQu2oSlftX9uetvTtv7J8Ql4zxfXGZ3zk8PeQ9w59x2uMfqI8/q5eKh/l9cb2rwsu9rSNl06ZP2Pmxtz+rNMx93yno0n2/82rVH7rQ+y9P15H6FyRun9ViH81ATmffI7nJ5r8uXXW6enbP6b/B8/l5OifVHYLnb9S39s2zcc+Ph+rh8+eQgVPS72elzGWY/tUtbbabBpDiI7yN1q6/4th2y+ErAc5+9BVvu/7KamJbWNZeuqI/R4tRf+YyD1HmOZM1bMV3/14Sn10c0Xu+Sj1nOXb5jL73ncdy02uvlXZNde65dOHYl7Vs4KYuS6FzWLn2zJlpZqPXPVPOa5yzKOyn1VhT9lmMfdbfH7D11Wf2PXN5h9y+dD287+qxgSnaYmnIrRtIb8pJe6/Uv9OVer6Whn0zfGO/BEloZI9ojmfAlUflClDd178bTmVHVTpZXOkAlk/lb42UujmI89HH5V+cl7XtowY6vTxLVWok6UrGzoGTHN+bB+6ri05687VNpvfuvRfaP2uMlNQth1D5JjGelm/8yn+9p3p/7qk9gnfeddXZmq/Sm333PJT659Kv1zjNbZ9uv2Oi//67CV8/N1nj1DmviyXDNVeJkaeaX8UsyesYg8cu2+NvdaPfb+lLDu5tvt/")),oV=function(n){switch(n){case 33:case 39:case 40:case 42:return 12;case 35:return 5;default:return n}},aV=function(n){switch(n){case 37:case 38:return 34;case 41:return 22;default:return n}};class kA{constructor(e,t=!1){this.position=e,this.required=t}}iV=class{nextCodePoint(){let n=this.string.charCodeAt(this.pos++),e=this.string.charCodeAt(this.pos);return 55296<=n&&n<=56319&&56320<=e&&e<=57343?(this.pos++,(n-55296)*1024+(e-56320)+65536):n}nextCharClass(){return oV(zne.get(this.nextCodePoint()))}getSimpleBreak(){switch(this.nextClass){case 41:return!1;case 34:case 37:case 38:return this.curClass=34,!1;case 36:return this.curClass=36,!1}return null}getPairTableBreak(n){let e=!1;switch($ne[this.curClass][this.nextClass]){case 0:e=!0;break;case 1:e=n===41;break;case 2:if(!(e=n===41))return!1;break;case 3:if(n!==41)return e}return this.LB8a&&(e=!1),this.LB21a&&(this.curClass===16||this.curClass===17)?(e=!1,this.LB21a=!1):this.LB21a=this.curClass===13,this.curClass===28?(this.LB30a++,this.LB30a==2&&this.nextClass===28&&(e=!0,this.LB30a=0)):this.LB30a=0,this.curClass=this.nextClass,e}nextBreak(){if(this.curClass==null){let n=this.nextCharClass();this.curClass=aV(n),this.nextClass=n,this.LB8a=n===31,this.LB30a=0}for(;this.pos<this.string.length;){this.lastPos=this.pos;let n=this.nextClass;if(this.nextClass=this.nextCharClass(),this.curClass===34||this.curClass===36&&this.nextClass!==37)return this.curClass=aV(oV(this.nextClass)),new kA(this.lastPos,!0);let e=this.getSimpleBreak();if(e===null&&(e=this.getPairTableBreak(n)),this.LB8a=this.nextClass===31,e)return new kA(this.lastPos)}return this.lastPos<this.string.length?(this.lastPos=this.string.length,new kA(this.string.length)):null}constructor(n){this.string=n,this.pos=0,this.lastPos=0,this.curClass=null,this.nextClass=null,this.LB8a=!1,this.LB21a=!1,this.LB30a=0}};class Wne{constructor(e,t={}){this.implementation=new iV(e),this.breakOpportunityCaches=[],this.pos=0}get textLength(){return this.implementation.string.length}nextToPos(){let{pos:e}=this;if(e>=this.textLength)return null;let{implementation:t,breakOpportunityCaches:r}=this;for(;r.length<=e;){let a=t.lastPos,g=t.nextBreak();if(!g)return null;let{position:R}=g;for(let L=a;L<R;++L)r.push(g)}let i=r[e];return this.seek(i.position),i}seek(e){let t=this.textLength;return e<0&&(e+=t),e>=0&&e<=t?(this.pos=e,!0):(this.pos=t,!1)}next(e){return typeof e=="number"&&this.seek(e),this.nextToPos()}}function sV(n){return n>127&&n!==160}class Une{constructor(e,t={}){this.text=e,this.breakSpaceType=t.breakSpaceType??"after_every_spaces",this.icuLineBreaker=void 0}getBreakSpaceType(){return this.breakSpaceType}ensureIcuLineBreaker(){return this.icuLineBreaker??(this.icuLineBreaker=new Wne(this.text))}next(e){let t,r,{text:i,breakSpaceType:a}=this,g=i.length;if(!(e>=0&&e<g))return-1;let R=-1,L=++e>=2?i.charCodeAt(e-2):0,W=i.charCodeAt(e-1),K=Vp(W);for(let Q=e;Q<g;++Q,L=W,W=t,K=r){switch(r=Vp(t=i.charCodeAt(Q)),a){case"before_every_spaces":if(r||Py(t))return Q;break;case"before_space_run":if(r){if(!K)return Q;continue}break;case"after_space_run":if(K){if(!r)return Q;continue}break;case"after_every_spaces":if(K||Py(W))return Q;if(r||Py(t))return Q+1}if(function(oe,se,he){if(se===45&&R6(he))return R6(oe)||(32|oe)>=97&&(32|oe)<=122;if(se>=33&&se<=127&&he>=33&&he<=127){let me=he-33,ye=me%8;return!!(Ene[se-33][(me-ye)/8]&1<<ye)}return!1}(L,W,t)||(sV(t)||sV(W))&&(R<Q&&(R=this.ensureIcuLineBreaker().next(Q-1)?.position??-1),Q===R&&!K))return Q}return g}}function Ly(n,e,t){let r=n.at(-1)?.to??0;e<=r||n.push({from:r,to:e,forceBreak:t})}class Gne{constructor(e,t,r={}){this.textMetas=t,this.textChunks=[],this.lastTextMetaIndex=-1,this.initTextChunks(e,r)}collectTextChunks(e,t,r,i,a){for(let g=i;g<a;++g){let R=e.charCodeAt(g);R===10?Ly(this.textChunks,g+1,!0):R===9&&this.findTextMeta(g).item.type==="tab"&&Ly(this.textChunks,g,!1)}(e.charCodeAt(r-1)!==9||this.findTextMeta(r-1).item.type!=="tab")&&Ly(this.textChunks,r,!1)}initTextChunksForWrap(e,t){let r=new Une(e,t),{spaceBefore:i,spaceChecker:a}=function(R){let L,W;switch(R){case"before_every_spaces":L=!0,W=pA;break;case"before_space_run":L=!0,W=Vp;break;case"after_space_run":L=!1,W=Vp;break;case"after_every_spaces":L=!1,W=pA;break;default:throw Error(`Invalid break space type: ${R}`)}return{spaceBefore:L,spaceChecker:W}}(r.getBreakSpaceType()),g=0;for(;;){let R=r.next(g);if(R<0)break;let L=g,W=R;if(i){for(let K=g;K<R;++K)if(!a(e.charCodeAt(K))){W=K;break}}else for(let K=R-1;K>=g;--K)if(!a(e.charCodeAt(K))){L=K+1;break}this.collectTextChunks(e,g,R,L,W),g=R}}initTextChunksForNoWrap(e,t){for(let r=0,i=e.length;r<i;++r)e.charCodeAt(r)===10&&Ly(this.textChunks,r+1,!0)}initTextChunks(e,t){let{textWrapping:r}=E6(t.whiteSpaceRule);r==="wrap"?this.initTextChunksForWrap(e,t):this.initTextChunksForNoWrap(e,t),Ly(this.textChunks,e.length,!1)}findTextMeta(e){let{textMetas:t,lastTextMetaIndex:r}=this,i=function(a,g,R){let L=g>=0?a[g]:null;if(L&&R>=L.from&&R<L.to)return g;let W=L&&R>=L.to?g+1:0;for(let K=W,Q=a.length;K<Q;++K)if(R<a[K].to)return K;throw Error(`Given position is out of range. pos: ${R}, range: ${[a.at(0)?.from,a.at(-1)?.to]}`)}(t,r,e);return this.lastTextMetaIndex=i,t[i]}*iterateTextChunks(){yield*this.textChunks}}let RA={preceding:!1,subsequent:!1},jne=(()=>{let n;return function(){return n!==void 0?n:n=$6()}})();class qne{constructor(e={}){let t=e.canvas?e.canvas.getContext("2d"):jne();if(!t)throw Error("The canvas does not have 2D context.");this.whiteSpaceRule=E6(e.whiteSpaceRule),this.overflowWrapType=e.overflowWrapType??"normal",this.renderingContext=t,this.defaultStyle=e.defaultStyle,this.hangingSpaceChecker=function(r){let i=r.endOfLineSpace==="hang",a=r.endOfLineOtherSpace==="hang";return i&&a?pA:i?Vp:a?Py:void 0}(this.whiteSpaceRule),this.canvasStyle={direction:t.direction,font:t.font,fontStretch:t.fontStretch}}getWhiteSpaceRule(){return this.whiteSpaceRule}getOverflowWrapType(){return this.overflowWrapType}generateEffectiveTextDrawingStyle(e){return j6(this.defaultStyle?{...this.defaultStyle,...e}:e)}doSetupCanvasContext(e){let t=this.canvasStyle=this.generateEffectiveTextDrawingStyle(e);Object.assign(this.renderingContext,t)}createTextResult(e,t){let r={...function(i,a){let{preceding:g,subsequent:R}=F6(a),L="",W=function(oe,se,he){for(let{value:me}of OC(oe,{from:0})){if(ml(B6,me))return he?me:void 0;if(ml(PC,me))he=!0;else if(!ml(NC,me))break}}(i,0,g);W!==void 0&&(i=(L=ml(L6,W)?"":"")+i);let K="",Q=function(oe,se,he){for(let{value:me}of OC(oe,{to:se,reversed:!0})){if(ml(P6,me))return he?me:void 0;if(ml(PC,me))he=!0;else if(!ml(NC,me))break}}(i,i.length,R);return Q!==void 0&&(i+=K=ml(L6,Q)?"":""),Hp.text=i,Hp.hasPrecedingJoiner=g,Hp.hasSubsequentJoiner=R,Hp.prefixedJoiner=L,Hp.suffixedJoiner=K,Hp}(e,t)};return{text:e,displayTextResult:r,displayStyle:this.canvasStyle,metrics:new q6(this.renderingContext.measureText(r.text))}}measureText(e,t){return this.doSetupCanvasContext(t?.style),this.createTextResult(e,t?.joiningRule)}fitText(e,t,r){return this.doSetupCanvasContext(r?.style),r?.enableOverflowWrap?this.fitTextWithWrap(e,t,r):this.fitTextSimple(e,t,r)}fitTextWithWrap(e,t,r){return this.overflowWrapType==="break-word"?this.fitTextWithWrapBreakWord(e,t,r):this.fitTextWithWrapNormal(e,t,r)}fitTextWithWrapBreakWord(e,t,r){let i=this.findHangingSpaceOffset(t);if(i===0)return this.createTextResultForFit(t,t.length,r);let a=r?.enableOverflowWrap==="allow_overflow";if(e>=0){let R=t.slice(0,i),L=function(W,K){let Q=function(me){let ye=me?.fontSize;return typeof ye=="number"?ye:10}(K);if(!(Q>0))return null;let oe=Q*W.length,[se,he]=S??(S=function(){let me={font:"240px Arial"};return[Math.min(...["i","l"].map(ye=>FC(ye,me).width))/240,Math.max(...[" "].map(ye=>FC(ye,me).width))/240]}());return IA[0]=oe*se,IA[1]=oe*he,IA}(R,r?.style);if(L&&e>=L[1]){let W;for(let K of O6(R,{reversed:!0})){let Q=this.createTextResultForFit(R,K,r);if(Q.metrics.width<=e)return this.maybeExtendTextResultForFit(Q,t,i,r);W=Q}if(W)return a?this.maybeExtendTextResultForFit(W,t,i,r):null}else if(L&&e<=L[0]){let W;for(let K of O6(R)){let Q=this.createTextResultForFit(R,K,r);if(Q.metrics.width>e)return W?this.maybeExtendTextResultForFit(W,t,i,r):a?this.maybeExtendTextResultForFit(Q,t,i,r):null;W=Q}if(W)return this.maybeExtendTextResultForFit(W,t,i,r)}else{let W,K=new Dne(R);if(function(Q,oe,se){let he=0,me=Q.length;for(;he<me;){let ye=Math.floor((he+me)/2),Te=oe.call(void 0,Q[ye],ye);if(Te>0)he=ye+1;else if(Te<0)me=ye;else break}}(R,(Q,oe)=>{let se=K.next(oe);if(W&&W.text.length>=se)return 1;let he=this.createTextResultForFit(R,se,r);return he.metrics.width<=e?(W=he,1):-1}),W)return this.maybeExtendTextResultForFit(W,t,i,r)}}if(!a)return null;let g=function(R,L){let W=vA();return A6(R.charCodeAt(0))?0+W.nextBreak(R.slice(L),0):W.nextBreak(R,L)}(t,0);return this.createTextResultForFit(t,g<i?g:t.length,r)}fitTextWithWrapNormal(e,t,r){return r?.enableOverflowWrap==="allow_overflow"?this.createTextResultForFit(t,t.length,r):this.fitTextSimple(e,t,r)}fitTextSimple(e,t,r){let i=this.findHangingSpaceOffset(t);if(i===0)return this.createTextResultForFit(t,t.length,r);{if(e<0)return null;let a=this.createTextResultForFit(t,i,r);return e<a.metrics.width?null:i===t.length?a:this.createTextResultForFit(t,t.length,r)}}findHangingSpaceOffset(e){let t=this.hangingSpaceChecker;if(!t)return e.length;for(let r=e.length-1;r>=0;--r)if(!t(e.charCodeAt(r)))return r+1;return 0}createTextResultForFit(e,t,r){let i;return t===e.length?i=r?.joiningRule:(e=e.slice(0,t),RA.preceding=F6(r?.joiningRule).preceding,RA.subsequent=!1,i=RA),this.createTextResult(e,i)}maybeExtendTextResultForFit(e,t,r,i){return e.text.length===r&&t.length!==r?this.createTextResultForFit(t,t.length,i):e}}class Yne{constructor(e={}){this.tabStops=e.tabStops??[],this.defaultTabStopStep=Math.max(e.defaultTabStopStep??0,0),this.tabStopIndexCache=0}getDefaultTabStopStep(){return this.defaultTabStopStep}findNextTabStop(e){let t=this.tabStops;if(t.length===0)return null;for(this.tabStopIndexCache>0&&e<t[Math.min(this.tabStopIndexCache,t.length)-1].pos&&(this.tabStopIndexCache=0);this.tabStopIndexCache<t.length;++this.tabStopIndexCache){let r=t[this.tabStopIndexCache];if(e<r.pos)return r}return null}computeNextDefaultTabStopDiff(e){let t=this.getDefaultTabStopStep();return t<=0?0:t-(e>=0?e%t:(t- -e%t)%t)}doComputeTabInitialWidth(e,t){return e?e.type==="left"?e.pos-t:0:this.computeNextDefaultTabStopDiff(t)}doComputeTabExtraWidth(e,t,r){if(!e)return 0;{let i=e.type;return i==="right"?Math.max(e.pos-t-r,0):i==="center"?Math.max(e.pos-t-r/2,0):0}}computeTabInitialWidth(e,t){return t===void 0&&(t=this.findNextTabStop(e)),this.doComputeTabInitialWidth(t,e)}computeTabExtraWidth(e,t,r){return r===void 0&&(r=this.findNextTabStop(e)),this.doComputeTabExtraWidth(r,e,t)}computeTabWidth(e,t,r){return r===void 0&&(r=this.findNextTabStop(e)),this.doComputeTabInitialWidth(r,e)+this.doComputeTabExtraWidth(r,e,t)}}function EA(n,e){let t=n.text+e.text,{hasPrecedingJoiner:r,prefixedJoiner:i}=n.displayTextResult,{hasSubsequentJoiner:a,suffixedJoiner:g}=e.displayTextResult;return{item:n.item,text:t,displayTextResult:{text:i+t+g,hasPrecedingJoiner:r,hasSubsequentJoiner:a,prefixedJoiner:i,suffixedJoiner:g},displayStyle:n.displayStyle,displayTabStop:n.displayTabStop,metrics:tV(n.metrics,e.metrics)}}class Kne{constructor(e,t){this.lineSpaceGetter=function(i){if(typeof i=="function")return a=>nV(i(a));{let a=nV(i);return()=>a}}(e),this.defaultLineBoxMetrics=t?.defaultLineBoxMetrics,this.onBeforeWrap=t?.onBeforeWrap,this.onAfterWrap=t?.onAfterWrap,this.lines=[],this.tagMap=new Map;let r=this.getNextLineSpace();this.lineResult={from:0,to:0,reason:"overflow",space:r,metrics:this.createLineBoxMetrics(r),inlines:[]},this.pos=0,this.filledWidth=this.lineResult.metrics.width,this.committedInlineCount=0,this.committedPos=this.pos,this.committedFilledWidth=this.filledWidth,this.firstInlineExtend=null}getNextLineSpace(){return this.lineSpaceGetter.call(null,this.lines.length)}createLineBoxMetrics(e){let t=this.defaultLineBoxMetrics,r=e.filled;return t&&r?tV(t,r):t?{...t}:r?{...r}:eV()}getMargin(){return this.lineResult.space.margin}getPosition(){return this.pos}getCommittedPosition(){return this.committedPos}getFilledWidth(){return this.filledWidth}getFilledWidthTo(e){let t=this.lineResult.inlines;if(e>=t.length)return this.getFilledWidth();{let r=this.lineResult.metrics.width;for(let i=0;i<e;++i)r+=t[i].metrics.width;return this.firstInlineExtend&&e>=this.committedInlineCount&&(r+=this.firstInlineExtend.metrics.width),r}}getRemainingWidth(){return this.lineResult.space.total-this.filledWidth}getInlineWidth(e){let t=this.lineResult.inlines;if(e<0||e>=t.length)return 0;let r=t[e].metrics.width;return this.firstInlineExtend&&e===this.committedInlineCount-1&&(r+=this.firstInlineExtend.metrics.width),r}getCommittedCount(){return this.committedInlineCount}hasCommittedChanges(){return this.committedInlineCount!==0}getUncommittedCount(){return this.lineResult.inlines.length-this.committedInlineCount+ +!!this.firstInlineExtend}hasUncommittedChanges(){return this.committedInlineCount!==this.lineResult.inlines.length||!!this.firstInlineExtend}getInlineCount(){return this.lineResult.inlines.length}getInlineResult(e){return this.lineResult.inlines[e]}getLineResults(){return this.lines}addInline(e){this.lineResult.inlines.push(e),this.pos+=e.text.length,this.filledWidth+=e.metrics.width}extendInline(e){if(e.item.type!=="text")return this.addInline(e);let t=this.lineResult.inlines,r=t.length;if(r===0)t.push(e);else if(r!==this.committedInlineCount){let i=r-1;t[i].item.type==="text"?t[i]=EA(t[i],e):t.push(e)}else this.firstInlineExtend?this.firstInlineExtend=EA(this.firstInlineExtend,e):t[r-1].item.type==="text"?this.firstInlineExtend=e:t.push(e);this.pos+=e.text.length,this.filledWidth+=e.metrics.width}squash(e,t){let r=this.lineResult.inlines;if(e>=r.length)return;let i=r[e];if(t.displayTextResult!==void 0&&(i.displayTextResult=t.displayTextResult),t.displayStyle!==void 0&&(i.displayStyle=t.displayStyle),t.metrics&&t.metrics.width!==void 0){let a=i.metrics.width;i.metrics={...i.metrics,width:t.metrics.width},this.filledWidth+=t.metrics.width-a}}tag(e){let t=this.lineResult.inlines.length;if(t===0)return;let r={id:e,inlineIndex:t-1};return this.tagMap.set(e,r),r}getTag(e){return this.tagMap.get(e)}deleteTag(e){return this.tagMap.delete(e)}commit(){if(this.firstInlineExtend){let e=this.lineResult.inlines;e[this.committedInlineCount-1]=EA(e[this.committedInlineCount-1],this.firstInlineExtend),this.firstInlineExtend=null}this.committedInlineCount=this.lineResult.inlines.length,this.committedPos=this.pos,this.committedFilledWidth=this.filledWidth}rollback(){let e={pos:0,width:0,inlines:[],tags:[]},t=-this.committedInlineCount+ +!!this.firstInlineExtend;this.firstInlineExtend&&(e.inlines.push(this.firstInlineExtend),this.firstInlineExtend=null);let r=this.lineResult.inlines;for(let a=this.committedInlineCount,g=r.length;a<g;++a)e.inlines.push(r[a]);r.length=this.committedInlineCount,e.pos=this.pos-this.committedPos,e.width=this.filledWidth-this.committedFilledWidth,this.pos=this.committedPos,this.filledWidth=this.committedFilledWidth;let i=this.tagMap;for(let a of i.values())a.inlineIndex>=this.committedInlineCount&&(a.inlineIndex+=t,e.tags.push(a),i.delete(a.id));return e}fillLineBoxMetrics(e){let t=e.metrics,r=t.width,i=t.lineBoxAscent,a=t.lineBoxDescent;for(let{metrics:{width:g,lineBoxAscent:R,lineBoxDescent:L}}of e.inlines)r+=g,i<R&&(i=R),a<L&&(a=L);t.width=r,t.height=i+a,t.textBoxAscent=i,t.textBoxDescent=a,t.lineBoxAscent=i,t.lineBoxDescent=a}wrap(e){let t=this.rollback();this.onBeforeWrap&&(this.onBeforeWrap.call(null,this),this.commit()),this.lineResult.to=this.committedPos,this.lineResult.reason=e,this.fillLineBoxMetrics(this.lineResult),this.lines.push(this.lineResult);let r=this.getNextLineSpace();for(let i of(this.lineResult={from:this.committedPos,to:this.committedPos,reason:"overflow",space:r,metrics:this.createLineBoxMetrics(r),inlines:t.inlines},this.pos+=t.pos,this.filledWidth=this.lineResult.metrics.width+t.width,this.committedInlineCount=0,this.committedFilledWidth=this.lineResult.metrics.width,t.tags))this.tagMap.set(i.id,i);this.onAfterWrap&&this.onAfterWrap.call(null,this)}commitWrap(e){this.commit(),this.wrap(e)}}class Xne{constructor(e,t,r={}){this.textSegmenter=new Gne(e,t,r),this.textFitter=new qne({...r,defaultStyle:void 0}),this.tabHandler=new Yne(r),this.text=e,this.splitInlinesByBreakOpportunities=r.splitInlinesByBreakOpportunities??!1,this.defaultLineBoxMetrics=function(i){let{text:a,line:g}=xA("",i);return HC(Q6(a,g),i)}(Z6(r.defaultStyle)),this.suppressEmptyLine=r.suppressEmptyLine??!1}breakLines(e){let t=new Kne(e,{defaultLineBoxMetrics:this.defaultLineBoxMetrics,onBeforeWrap:this.onContextBeforeWrap.bind(this),onAfterWrap:this.onContextAfterWrap.bind(this)}),r=0;for(let i of this.textSegmenter.iterateTextChunks()){if(t.getRemainingWidth()===1/0&&!i.forceBreak&&i.to!==this.text.length)continue;let a=i.to;for(;t.getPosition()<a;)this.handleLineBreakOpportunity(t,r,a,i.forceBreak);r=a}return(!this.suppressEmptyLine||t.hasCommittedChanges())&&t.commitWrap("end"),t.getLineResults()}handleLineBreakOpportunity(e,t,r,i){let a=this.textFitter.getOverflowWrapType()!=="normal",g=this.computeEnableOverflowWrap(e);for(;;){let R=e.getPosition(),{item:L,from:W,to:K,style:Q,metrics:oe}=this.textSegmenter.findTextMeta(R),se=L.type==="tab"&&oe;se&&this.handlePreviousTab(e);let he=0;if(oe){let me=g==="allow_overflow";if(me||e.getRemainingWidth()>=0){let ye,Te;if(se){let Me=e.getMargin()[0]+e.getFilledWidth();Te=this.tabHandler.findNextTabStop(Me),ye={...oe,width:this.tabHandler.computeTabInitialWidth(Me,Te)}}else Te=null,ye=oe;if(me||ye.width<=e.getRemainingWidth()){let Me=this.text.slice(R,K),Oe={item:L,text:Me,displayTextResult:{text:Me,hasPrecedingJoiner:!1,hasSubsequentJoiner:!1,prefixedJoiner:"",suffixedJoiner:""},displayStyle:this.textFitter.generateEffectiveTextDrawingStyle(Q),displayTabStop:Te,metrics:ye};e.addInline(Oe),he=1,se&&e.tag("tab")}}}else{let me=Math.min(K,r),ye=this.text.slice(R,me),Te=this.textFitter.fitText(e.getRemainingWidth(),ye,{joiningRule:{preceding:e.getInlineCount()!==0&&function(Me,Oe){for(let{value:ze}of OC(Me,{to:Oe,reversed:!0})){if(ml(P6,ze)||ml(PC,ze))return ze;if(!ml(NC,ze))break}}(this.text,R)!==void 0,subsequent:function(Me,Oe){for(let{value:ze}of OC(Me,{from:Oe})){if(ml(B6,ze)||ml(PC,ze))return ze;if(!ml(NC,ze))break}}(this.text,me)!==void 0},style:Q,enableOverflowWrap:g});if(Te){let{text:Me,displayTextResult:Oe,displayStyle:ze,metrics:We}=Te,qe={item:L,text:Me,displayTextResult:Oe,displayStyle:ze,displayTabStop:null,metrics:HC(Q6(We,By(Q)),Q)};R===W||this.splitInlinesByBreakOpportunities&&R===t?e.addInline(qe):e.extendInline(qe),he=Me.length===ye.length?1:2}}if(he===0){g===void 0?e.wrap("overflow"):e.commitWrap("overflow");break}if(he===2){e.commitWrap("overflow");break}if(K>=r){i?e.commitWrap("break"):e.commit();break}a&&(g=this.computeEnableOverflowWrap(e))}}computeEnableOverflowWrap(e){if(!e.hasCommittedChanges()){if(this.textFitter.getOverflowWrapType()==="normal")return"allow_overflow";let t=e.getUncommittedCount();if(t===0)return"allow_overflow";if(t!==1)return"prevent_overflow";{let r=e.getTag("tab");return r&&r.inlineIndex===e.getInlineCount()-1?"allow_overflow":"prevent_overflow"}}}onContextBeforeWrap(e){this.handleLastJoiner(e),this.handlePreviousTab(e)}handleLastJoiner(e){let t=e.getInlineCount();if(t===0)return;let{item:r,text:i,displayTextResult:a,displayStyle:g}=e.getInlineResult(t-1);if(r.type!=="text"||!a.hasSubsequentJoiner)return;let R=this.textFitter.measureText(i,{joiningRule:{preceding:a.hasPrecedingJoiner,subsequent:!1},style:g});e.squash(t-1,{displayTextResult:R.displayTextResult,displayStyle:R.displayStyle,metrics:{width:R.metrics.width}})}handlePreviousTab(e){let t=e.getTag("tab");if(!t)return;e.deleteTag("tab");let{inlineIndex:r}=t,i=e.getMargin(),a=e.getFilledWidthTo(r),g=e.getInlineWidth(r),R=Math.min(this.tabHandler.computeTabExtraWidth(i[0]+a,e.getFilledWidth()-a-g),e.getRemainingWidth()+Math.max(i[1],0));R<=0||e.squash(r,{metrics:{width:g+R}})}onContextAfterWrap(e){this.handleFirstJoiner(e),this.handleWrappedTab(e)}handleFirstJoiner(e){if(e.getInlineCount()===0)return;let{item:t,text:r,displayTextResult:i,displayStyle:a}=e.getInlineResult(0);if(t.type!=="text"||!i.hasPrecedingJoiner)return;let g=this.textFitter.measureText(r,{joiningRule:{preceding:!1,subsequent:i.hasSubsequentJoiner},style:a});e.squash(0,{displayTextResult:g.displayTextResult,displayStyle:g.displayStyle,metrics:{width:g.metrics.width}})}handleWrappedTab(e){let t=e.getTag("tab");if(!t)return;let{inlineIndex:r}=t,i=this.tabHandler.computeTabInitialWidth(e.getMargin()[0]+e.getFilledWidthTo(r));e.squash(r,{metrics:{width:i}})}static create(e,t){let{text:r,textMetas:i}=function(a,g){let R=[],L=[],W=0;for(let K of a)switch(K.type){case"text":W=function(Q,oe,se,he,me){let ye=he.text;if(ye.length===0)throw Error("Inline text item should not be empty.");let Te=$C(he,me),Me=se+ye.length;return Q.push(ye),oe.push({item:he,from:se,to:Me,style:Te}),Me}(R,L,W,K,g);break;case"break":W=function(Q,oe,se,he,me){let ye=$C(he,me),Te=se+1;return Q.push(`
`),oe.push({item:he,from:se,to:Te,style:ye,metrics:TA("",ye,he)}),Te}(R,L,W,K,g);break;case"tab":W=function(Q,oe,se,he,me){let ye=$C(he,me),Te=se+1;return Q.push(" "),oe.push({item:he,from:se,to:Te,style:ye,metrics:TA("",ye,he)}),Te}(R,L,W,K,g);break;case"object":W=function(Q,oe,se,he,me){let ye,{inlineText:Te,size:Me}=he,Oe=$C(he,me),ze=se+1;return ye=Te!==void 0?TA(Te,Oe,he):function(We,qe,Ke){let{text:at,line:gt}=xA("",qe),pt=rV(Ke),Tt=We.width+pt.left+pt.right,jt=We.height+pt.top+pt.bottom,on=Math.max(at.fontBoundingBoxAscent,jt),hn=at.fontBoundingBoxDescent;return HC({width:Tt,height:on+hn,textBoxAscent:on,textBoxDescent:hn,lineBoxAscent:Math.max(gt.lineBoundingBoxAscent,jt),lineBoxDescent:gt.lineBoundingBoxDescent},qe)}({width:Me?.width??0,height:Me?.height??0},Oe,he),Q.push(""),oe.push({item:he,from:se,to:ze,style:Oe,metrics:ye}),ze}(R,L,W,K,g);break;default:throw Error(`Unknown inline item: ${K.type}`)}return{text:R.join(""),textMetas:L}}(e,t=function(a){if(!a)return a;let g=a.defaultStyle,R=function(L){if(L)return"verticalAlign"in L||"verticalAlignReferenceStyle"in L||"additionalLineStyles"in L?{...L,verticalAlign:void 0,verticalAlignReferenceStyle:void 0,additionalLineStyles:void 0}:L}(g);return g===R?a:{...a,defaultStyle:R}}(t));return new this(r,i,t)}}let lV="֑-߿יִ-﷽ﹰ-ﻼ",uV="A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--",Jne=RegExp("^[^"+uV+"]*["+lV+"]"),Zne=RegExp("^[^"+lV+"]*["+uV+"]"),AA=function(n){var e,t,r,i,a={R:"13k,1a,2,3,3,2+1j,ch+16,a+1,5+2,2+n,5,a,4,6+16,4+3,h+1b,4mo,179q,2+9,2+11,2i9+7y,2+68,4,3+4,5+13,4+3,2+4k,3+29,8+cf,1t+7z,w+17,3+3m,1t+3z,16o1+5r,8+30,8+mc,29+1r,29+4v,75+73",EN:"1c+9,3d+1,6,187+9,513,4+5,7+9,sf+j,175h+9,qw+q,161f+1d,4xt+a,25i+9",ES:"17,2,6dp+1,f+1,av,16vr,mx+1,4o,2",ET:"z+2,3h+3,b+1,ym,3e+1,2o,p4+1,8,6u,7c,g6,1wc,1n9+4,30+1b,2n,6d,qhx+1,h0m,a+1,49+2,63+1,4+1,6bb+3,12jj",AN:"16o+5,2j+9,2+1,35,ed,1ff2+9,87+u",CS:"18,2+1,b,2u,12k,55v,l,17v0,2,3,53,2+1,b",B:"a,3,f+2,2v,690",S:"9,2,k",WS:"c,k,4f4,1vk+a,u,1j,335",ON:"x+1,4+4,h+5,r+5,r+3,z,5+3,2+1,2+1,5,2+2,3+4,o,w,ci+1,8+d,3+d,6+8,2+g,39+1,9,6+1,2,33,b8,3+1,3c+1,7+1,5r,b,7h+3,sa+5,2,3i+6,jg+3,ur+9,2v,ij+1,9g+9,7+a,8m,4+1,49+x,14u,2+2,c+2,e+2,e+2,e+1,i+n,e+e,2+p,u+2,e+2,36+1,2+3,2+1,b,2+2,6+5,2,2,2,h+1,5+4,6+3,3+f,16+2,5+3l,3+81,1y+p,2+40,q+a,m+13,2r+ch,2+9e,75+hf,3+v,2+2w,6e+5,f+6,75+2a,1a+p,2+2g,d+5x,r+b,6+3,4+o,g,6+1,6+2,2k+1,4,2j,5h+z,1m+1,1e+f,t+2,1f+e,d+3,4o+3,2s+1,w,535+1r,h3l+1i,93+2,2s,b+1,3l+x,2v,4g+3,21+3,kz+1,g5v+1,5a,j+9,n+v,2,3,2+8,2+1,3+2,2,3,46+1,4+4,h+5,r+5,r+a,3h+2,4+6,b+4,78,1r+24,4+c,4,1hb,ey+6,103+j,16j+c,1ux+7,5+g,fsh,jdq+1t,4,57+2e,p1,1m,1m,1m,1m,4kt+1,7j+17,5+2r,d+e,3+e,2+e,2+10,m+4,w,1n+5,1q,4z+5,4b+rb,9+c,4+c,4+37,d+2g,8+b,l+b,5+1j,9+9,7+13,9+t,3+1,27+3c,2+29,2+3q,d+d,3+4,4+2,6+6,a+o,8+6,a+2,e+6,16+42,2+1i",BN:"0+8,6+d,2s+5,2+p,e,4m9,1kt+2,2b+5,5+5,17q9+v,7k,6p+8,6+1,119d+3,440+7,96s+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+75,6p+2rz,1ben+1,1ekf+1,1ekf+1",NSM:"lc+33,7o+6,7c+18,2,2+1,2+1,2,21+a,1d+k,h,2u+6,3+5,3+1,2+3,10,v+q,2k+a,1n+8,a,p+3,2+8,2+2,2+4,18+2,3c+e,2+v,1k,2,5+7,5,4+6,b+1,u,1n,5+3,9,l+1,r,3+1,1m,5+1,5+1,3+2,4,v+1,4,c+1,1m,5+4,2+1,5,l+1,n+5,2,1n,3,2+3,9,8+1,c+1,v,1q,d,1f,4,1m+2,6+2,2+3,8+1,c+1,u,1n,g+1,l+1,t+1,1m+1,5+3,9,l+1,u,21,8+2,2,2j,3+6,d+7,2r,3+8,c+5,23+1,s,2,2,1k+d,2+4,2+1,6+a,2+z,a,2v+3,2+5,2+1,3+1,q+1,5+2,h+3,e,3+1,7,g,jk+2,qb+2,u+2,u+1,v+1,1t+1,2+6,9,3+a,a,1a+2,3c+1,z,3b+2,5+1,a,7+2,64+1,3,1n,2+6,2,2,3+7,7+9,3,1d+g,1s+3,1d,2+4,2,6,15+8,d+1,x+3,3+1,2+2,1l,2+1,4,2+2,1n+7,3+1,49+2,2+c,2+6,5,7,4+1,5j+1l,2+4,k1+w,2db+2,3y,2p+v,ff+3,30+1,n9x+3,2+9,x+1,29+1,7l,4,5,q+1,6,48+1,r+h,e,13+7,q+a,1b+2,1d,3+3,3+1,14,1w+5,3+1,3+1,d,9,1c,1g,2+2,3+1,6+1,2,17+1,9,6n,3,5,fn5,ki+f,h+f,r2,6b,46+4,1af+2,2+1,6+3,15+2,5,4m+1,fy+3,as+1,4a+a,4x,1j+e,1l+2,1e+3,3+1,1y+2,11+4,2+7,1r,d+1,1h+8,b+3,3,2o+2,3,2+1,7,4h,4+7,m+1,1m+1,4,12+6,4+4,5g+7,3+2,2,o,2d+5,2,5+1,2+1,6n+3,7+1,2+1,s+1,2e+7,3,2+1,2z,2,3+5,2,2u+2,3+3,2+4,78+8,2+1,75+1,2,5,41+3,3+1,5,x+5,3+1,15+5,3+3,9,a+5,3+2,1b+c,2+1,bb+6,2+5,2d+l,3+6,2+1,2+1,3f+5,4,2+1,2+6,2,21+1,4,2,9o+1,f0c+4,1o+6,t5,1s+3,2a,f5l+1,43t+2,i+7,3+6,v+3,45+2,1j0+1i,5+1d,9,f,n+4,2+e,11t+6,2+g,3+6,2+1,2+4,7a+6,c6+3,15t+6,32+6,gzhy+6n",AL:"16w,3,2,e+1b,z+2,2+2s,g+1,8+1,b+m,2+t,s+2i,c+e,4h+f,1d+1e,1bwe+dp,3+3z,x+c,2+1,35+3y,2rm+z,5+7,b+5,dt+l,c+u,17nl+27,1t+27,4x+6n,3+d",LRO:"6ct",RLO:"6cu",LRE:"6cq",RLE:"6cr",PDF:"6cs",LRI:"6ee",RLI:"6ef",FSI:"6eg",PDI:"6eh"},g={},R={};g.L=1,R[1]="L",Object.keys(a).forEach(function(dr,to){g[dr]=1<<to+1,R[g[dr]]=dr}),Object.freeze(g);var L=g.LRI|g.RLI|g.FSI,W=g.L|g.R|g.AL,K=g.B|g.S|g.WS|g.ON|g.FSI|g.LRI|g.RLI|g.PDI,Q=g.BN|g.RLE|g.LRE|g.RLO|g.LRO|g.PDF,oe=g.S|g.WS|g.B|L|g.PDI|Q,se=null;function he(dr){if(!se){se=new Map;var to=function(Oi){if(a.hasOwnProperty(Oi)){var Ir=0;a[Oi].split(",").forEach(function(gi){var wr=gi.split("+"),Hi=wr[0],is=wr[1];Hi=parseInt(Hi,36),is=is?parseInt(is,36):0,se.set(Ir+=Hi,g[Oi]);for(var li=0;li<is;li++)se.set(++Ir,g[Oi])})}};for(var Rn in a)to(Rn)}return se.get(dr.codePointAt(0))||g.L}var me={pairs:"14>1,1e>2,u>2,2wt>1,1>1,1ge>1,1wp>1,1j>1,f>1,hm>1,1>1,u>1,u6>1,1>1,+5,28>1,w>1,1>1,+3,b8>1,1>1,+3,1>3,-1>-1,3>1,1>1,+2,1s>1,1>1,x>1,th>1,1>1,+2,db>1,1>1,+3,3>1,1>1,+2,14qm>1,1>1,+1,4q>1,1e>2,u>2,2>1,+1",canonical:"6f1>-6dx,6dy>-6dx,6ec>-6ed,6ee>-6ed,6ww>2jj,-2ji>2jj,14r4>-1e7l,1e7m>-1e7l,1e7m>-1e5c,1e5d>-1e5b,1e5c>-14qx,14qy>-14qx,14vn>-1ecg,1ech>-1ecg,1edu>-1ecg,1eci>-1ecg,1eda>-1ecg,1eci>-1ecg,1eci>-168q,168r>-168q,168s>-14ye,14yf>-14ye"};function ye(dr,to){var Rn,Oi=0,Ir=new Map,gi=to&&new Map;return dr.split(",").forEach(function wr(Hi){if(Hi.indexOf("+")!==-1)for(var is=+Hi;is--;)wr(Rn);else{Rn=Hi;var li=Hi.split(">"),pa=li[0],wl=li[1];pa=String.fromCodePoint(Oi+=parseInt(pa,36)),wl=String.fromCodePoint(Oi+=parseInt(wl,36)),Ir.set(pa,wl),to&&gi.set(wl,pa)}}),{map:Ir,reverseMap:gi}}function Te(){if(!e){var dr=ye(me.pairs,!0),to=dr.map,Rn=dr.reverseMap;e=to,t=Rn,r=ye(me.canonical,!1).map}}function Me(dr){return Te(),e.get(dr)||null}function Oe(dr){return Te(),t.get(dr)||null}function ze(dr){return Te(),r.get(dr)||null}var We=g.L,qe=g.R,Ke=g.EN,at=g.ES,gt=g.ET,pt=g.AN,Tt=g.CS,jt=g.B,on=g.S,hn=g.ON,un=g.BN,an=g.NSM,Ut=g.AL,kt=g.LRO,Pt=g.RLO,mn=g.LRE,Zt=g.RLE,dn=g.PDF,fn=g.LRI,er=g.RLI,yr=g.FSI,Ei=g.PDI;function Zs(dr){if(!i){var to=ye("14>1,j>2,t>2,u>2,1a>g,2v3>1,1>1,1ge>1,1wd>1,b>1,1j>1,f>1,ai>3,-2>3,+1,8>1k0,-1jq>1y7,-1y6>1hf,-1he>1h6,-1h5>1ha,-1h8>1qi,-1pu>1,6>3u,-3s>7,6>1,1>1,f>1,1>1,+2,3>1,1>1,+13,4>1,1>1,6>1eo,-1ee>1,3>1mg,-1me>1mk,-1mj>1mi,-1mg>1mi,-1md>1,1>1,+2,1>10k,-103>1,1>1,4>1,5>1,1>1,+10,3>1,1>8,-7>8,+1,-6>7,+1,a>1,1>1,u>1,u6>1,1>1,+5,26>1,1>1,2>1,2>2,8>1,7>1,4>1,1>1,+5,b8>1,1>1,+3,1>3,-2>1,2>1,1>1,+2,c>1,3>1,1>1,+2,h>1,3>1,a>1,1>1,2>1,3>1,1>1,d>1,f>1,3>1,1a>1,1>1,6>1,7>1,13>1,k>1,1>1,+19,4>1,1>1,+2,2>1,1>1,+18,m>1,a>1,1>1,lk>1,1>1,4>1,2>1,f>1,3>1,1>1,+3,db>1,1>1,+3,3>1,1>1,+2,14qm>1,1>1,+1,6>1,4j>1,j>2,t>2,u>2,2>1,+1",!0),Rn=to.map;to.reverseMap.forEach(function(Oi,Ir){Rn.set(Ir,Oi)}),i=Rn}return i.get(dr)||null}function _u(dr,to,Rn,Oi){var Ir=dr.length;Rn=Math.max(0,Rn==null?0:+Rn),Oi=Math.min(Ir-1,Oi==null?Ir-1:+Oi);var gi=[];return to.paragraphs.forEach(function(wr){var Hi=Math.max(Rn,wr.start),is=Math.min(Oi,wr.end);if(Hi<is){for(var li=to.levels.slice(Hi,is+1),pa=is;pa>=Hi&&he(dr[pa])&oe;pa--)li[pa]=wr.level;for(var wl=wr.level,ug=1/0,hg=0;hg<li.length;hg++){var Ud=li[hg];Ud>wl&&(wl=Ud),Ud<ug&&(ug=1|Ud)}for(var Bo=wl;Bo>=ug;Bo--)for(var $i=0;$i<li.length;$i++)if(li[$i]>=Bo){for(var Su=$i;$i+1<li.length&&li[$i+1]>=Bo;)$i++;$i>Su&&gi.push([Su+Hi,$i+Hi])}}}),gi}function Wd(dr,to,Rn,Oi){for(var Ir=_u(dr,to,Rn,Oi),gi=[],wr=0;wr<dr.length;wr++)gi[wr]=wr;return Ir.forEach(function(Hi){for(var is=Hi[0],li=Hi[1],pa=gi.slice(is,li+1),wl=pa.length;wl--;)gi[li-wl]=pa[wl]}),gi}return n.closingToOpeningBracket=Oe,n.getBidiCharType=he,n.getBidiCharTypeName=function(dr){return R[he(dr)]},n.getCanonicalBracket=ze,n.getEmbeddingLevels=function(dr,to){for(var Rn=new Uint32Array(dr.length),Oi=0;Oi<dr.length;Oi++)Rn[Oi]=he(dr[Oi]);var Ir=new Map;function gi(Iu,qd){var Hc=Rn[Iu];Rn[Iu]=qd,Ir.set(Hc,Ir.get(Hc)-1),Hc&K&&Ir.set(K,Ir.get(K)-1),Ir.set(qd,(Ir.get(qd)||0)+1),qd&K&&Ir.set(K,(Ir.get(K)||0)+1)}for(var wr=new Uint8Array(dr.length),Hi=new Map,is=[],li=null,pa=0;pa<dr.length;pa++)li||is.push(li={start:pa,end:dr.length-1,level:to==="rtl"?1:to==="ltr"?0:eU(pa,!1)}),Rn[pa]&jt&&(li.end=pa,li=null);for(var wl=Zt|mn|Pt|kt|L|Ei|dn|jt,ug=function(Iu){return Iu+(1&Iu?1:2)},hg=function(Iu){return Iu+(1&Iu?2:1)},Ud=0;Ud<is.length;Ud++){var Bo=[{_level:(li=is[Ud]).level,_override:0,_isolate:0}],$i=void 0,Su=0,Gd=0,ED=0;Ir.clear();for(var os=li.start;os<=li.end;os++){var as=Rn[os];if($i=Bo[Bo.length-1],Ir.set(as,(Ir.get(as)||0)+1),as&K&&Ir.set(K,(Ir.get(K)||0)+1),as&wl)if(as&(Zt|mn)){wr[os]=$i._level;var kW=(as===Zt?hg:ug)($i._level);!(kW<=125)||Su||Gd?!Su&&Gd++:Bo.push({_level:kW,_override:0,_isolate:0})}else if(as&(Pt|kt)){wr[os]=$i._level;var RW=(as===Pt?hg:ug)($i._level);!(RW<=125)||Su||Gd?!Su&&Gd++:Bo.push({_level:RW,_override:as&Pt?qe:We,_isolate:0})}else if(as&L){as&yr&&(as=eU(os+1,!0)===1?er:fn),wr[os]=$i._level,$i._override&&gi(os,$i._override);var EW=(as===er?hg:ug)($i._level);EW<=125&&Su===0&&Gd===0?(ED++,Bo.push({_level:EW,_override:0,_isolate:1,_isolInitIndex:os})):Su++}else if(as&Ei){if(Su>0)Su--;else if(ED>0){for(Gd=0;!Bo[Bo.length-1]._isolate;)Bo.pop();var AD=Bo[Bo.length-1]._isolInitIndex;AD!=null&&(Hi.set(AD,os),Hi.set(os,AD)),Bo.pop(),ED--}$i=Bo[Bo.length-1],wr[os]=$i._level,$i._override&&gi(os,$i._override)}else as&dn?(Su===0&&(Gd>0?Gd--:!$i._isolate&&Bo.length>1&&(Bo.pop(),$i=Bo[Bo.length-1])),wr[os]=$i._level):as&jt&&(wr[os]=li.level);else wr[os]=$i._level,$i._override&&as!==un&&gi(os,$i._override)}for(var Sm=[],Yh=null,cg=li.start;cg<=li.end;cg++){var MD=Rn[cg];if(!(MD&Q)){var AW=wr[cg],MW=MD&L,Gue=MD===Ei;Yh&&AW===Yh._level?(Yh._end=cg,Yh._endsWithIsolInit=MW):Sm.push(Yh={_start:cg,_end:cg,_level:AW,_startsWithPDI:Gue,_endsWithIsolInit:MW})}}for(var DD=[],k1=0;k1<Sm.length;k1++){var R1=Sm[k1];if(!R1._startsWithPDI||R1._startsWithPDI&&!Hi.has(R1._start)){for(var OD=[Yh=R1],DW=void 0;Yh&&Yh._endsWithIsolInit&&(DW=Hi.get(Yh._end))!=null;)for(var E1=k1+1;E1<Sm.length;E1++)if(Sm[E1]._start===DW){OD.push(Yh=Sm[E1]);break}for(var Im=[],ND=0;ND<OD.length;ND++)for(var OW=OD[ND],PD=OW._start;PD<=OW._end;PD++)Im.push(PD);for(var jue=wr[Im[0]],NW=li.level,A1=Im[0]-1;A1>=0;A1--)if(!(Rn[A1]&Q)){NW=wr[A1];break}var BD=Im[Im.length-1],que=wr[BD],PW=li.level;if(!(Rn[BD]&L)){for(var M1=BD+1;M1<=li.end;M1++)if(!(Rn[M1]&Q)){PW=wr[M1];break}}DD.push({_seqIndices:Im,_sosType:Math.max(NW,jue)%2?qe:We,_eosType:Math.max(PW,que)%2?qe:We})}}for(var LD=0;LD<DD.length;LD++){var FD=DD[LD],ar=FD._seqIndices,Dw=FD._sosType,Yue=FD._eosType,xm=1&wr[ar[0]]?qe:We;if(Ir.get(an))for(var D1=0;D1<ar.length;D1++){var BW=ar[D1];if(Rn[BW]&an){for(var VD=Dw,O1=D1-1;O1>=0;O1--)if(!(Rn[ar[O1]]&Q)){VD=Rn[ar[O1]];break}gi(BW,VD&(L|Ei)?hn:VD)}}if(Ir.get(Ke))for(var N1=0;N1<ar.length;N1++){var LW=ar[N1];if(Rn[LW]&Ke)for(var P1=N1-1;P1>=-1;P1--){var FW=P1===-1?Dw:Rn[ar[P1]];if(FW&W){FW===Ut&&gi(LW,pt);break}}}if(Ir.get(Ut))for(var HD=0;HD<ar.length;HD++){var VW=ar[HD];Rn[VW]&Ut&&gi(VW,qe)}if(Ir.get(at)||Ir.get(Tt))for(var Ow=1;Ow<ar.length-1;Ow++){var $D=ar[Ow];if(Rn[$D]&(at|Tt)){for(var Nw=0,HW=0,zD=Ow-1;zD>=0&&(Nw=Rn[ar[zD]])&Q;zD--);for(var WD=Ow+1;WD<ar.length&&(HW=Rn[ar[WD]])&Q;WD++);Nw===HW&&(Rn[$D]===at?Nw===Ke:Nw&(Ke|pt))&&gi($D,Nw)}}if(Ir.get(Ke)){for(var Kh=0;Kh<ar.length;Kh++)if(Rn[ar[Kh]]&Ke){for(var B1=Kh-1;B1>=0&&Rn[ar[B1]]&(gt|Q);B1--)gi(ar[B1],Ke);for(Kh++;Kh<ar.length&&Rn[ar[Kh]]&(gt|Q|Ke);Kh++)Rn[ar[Kh]]!==Ke&&gi(ar[Kh],Ke)}}if(Ir.get(gt)||Ir.get(at)||Ir.get(Tt))for(var Pw=0;Pw<ar.length;Pw++){var $W=ar[Pw];if(Rn[$W]&(gt|at|Tt)){gi($W,hn);for(var L1=Pw-1;L1>=0&&Rn[ar[L1]]&Q;L1--)gi(ar[L1],hn);for(var F1=Pw+1;F1<ar.length&&Rn[ar[F1]]&Q;F1++)gi(ar[F1],hn)}}if(Ir.get(Ke))for(var UD=0,zW=Dw;UD<ar.length;UD++){var WW=ar[UD],GD=Rn[WW];GD&Ke?zW===We&&gi(WW,We):GD&W&&(zW=GD)}if(Ir.get(K)){for(var Bw=qe|Ke|pt,UW=Bw|We,V1=[],Tm=[],km=0;km<ar.length;km++)if(Rn[ar[km]]&K){var Lw=dr[ar[km]],GW=void 0;if(Me(Lw)!==null)if(Tm.length<63)Tm.push({char:Lw,seqIndex:km});else break;else if((GW=Oe(Lw))!==null)for(var Fw=Tm.length-1;Fw>=0;Fw--){var jD=Tm[Fw].char;if(jD===GW||jD===Oe(ze(Lw))||Me(ze(jD))===Lw){V1.push([Tm[Fw].seqIndex,km]),Tm.length=Fw;break}}}V1.sort(function(Iu,qd){return Iu[0]-qd[0]});for(var qD=0;qD<V1.length;qD++){for(var jW=V1[qD],H1=jW[0],YD=jW[1],qW=!1,Xh=0,KD=H1+1;KD<YD;KD++){var YW=ar[KD];if(Rn[YW]&UW){qW=!0;var KW=Rn[YW]&Bw?qe:We;if(KW===xm){Xh=KW;break}}}if(qW&&!Xh){Xh=Dw;for(var XD=H1-1;XD>=0;XD--){var XW=ar[XD];if(Rn[XW]&UW){var JW=Rn[XW]&Bw?qe:We;Xh=JW!==xm?JW:xm;break}}}if(Xh){if(Rn[ar[H1]]=Rn[ar[YD]]=Xh,Xh!==xm){for(var Vw=H1+1;Vw<ar.length;Vw++)if(!(Rn[ar[Vw]]&Q)){he(dr[ar[Vw]])&an&&(Rn[ar[Vw]]=Xh);break}}if(Xh!==xm){for(var Hw=YD+1;Hw<ar.length;Hw++)if(!(Rn[ar[Hw]]&Q)){he(dr[ar[Hw]])&an&&(Rn[ar[Hw]]=Xh);break}}}}for(var jd=0;jd<ar.length;jd++)if(Rn[ar[jd]]&K){for(var ZW=jd,JD=jd,ZD=Dw,$w=jd-1;$w>=0;$w--)if(Rn[ar[$w]]&Q)ZW=$w;else{ZD=Rn[ar[$w]]&Bw?qe:We;break}for(var QW=Yue,zw=jd+1;zw<ar.length;zw++)if(Rn[ar[zw]]&(K|Q))JD=zw;else{QW=Rn[ar[zw]]&Bw?qe:We;break}for(var QD=ZW;QD<=JD;QD++)Rn[ar[QD]]=ZD===QW?ZD:xm;jd=JD}}}for(var Gl=li.start;Gl<=li.end;Gl++){var Kue=wr[Gl],$1=Rn[Gl];if(1&Kue?$1&(We|Ke|pt)&&wr[Gl]++:$1&qe?wr[Gl]++:$1&(pt|Ke)&&(wr[Gl]+=2),$1&Q&&(wr[Gl]=Gl===0?li.level:wr[Gl-1]),Gl===li.end||he(dr[Gl])&(on|jt))for(var z1=Gl;z1>=0&&he(dr[z1])&oe;z1--)wr[z1]=li.level}}return{levels:wr,paragraphs:is};function eU(Iu,qd){for(var Hc=Iu;Hc<dr.length;Hc++){var W1=Rn[Hc];if(W1&(qe|Ut))return 1;if(W1&(jt|We)||qd&&W1===Ei)break;if(W1&L){var tU=function(Xue){for(var nU=1,U1=Xue+1;U1<dr.length;U1++){var eO=Rn[U1];if(eO&jt)break;if(eO&Ei){if(--nU==0)return U1}else eO&L&&nU++}return-1}(Hc);Hc=tU===-1?dr.length:tU}}return 0}},n.getMirroredCharacter=Zs,n.getMirroredCharactersMap=function(dr,to,Rn,Oi){var Ir=dr.length;Rn=Math.max(0,Rn==null?0:+Rn),Oi=Math.min(Ir-1,Oi==null?Ir-1:+Oi);for(var gi=new Map,wr=Rn;wr<=Oi;wr++)if(1&to[wr]){var Hi=Zs(dr[wr]);Hi!==null&&gi.set(wr,Hi)}return gi},n.getReorderSegments=_u,n.getReorderedIndices=Wd,n.getReorderedString=function(dr,to,Rn,Oi){var Ir=Wd(dr,to,Rn,Oi),gi=[].concat(dr);return Ir.forEach(function(wr,Hi){gi[Hi]=(1&to.levels[wr]?Zs(dr[wr]):null)||dr[wr]}),gi.join("")},n.openingToClosingBracket=Me,Object.defineProperty(n,"__esModule",{value:!0}),n}({}),hV=new Map;function cV(n,e){let t=hV.get(n);return t||(t=AA.getEmbeddingLevels(n,e),hV.set(n,t)),t}function dV(n,e){if(e===2)return"rtl";if(e===1)return"ltr";let t=function(r){let i=String(r||"");return Jne.test(i)?"rtl":Zne.test(i)?"ltr":"neutral"}(n);return t==="neutral"?"ltr":t}let fV=new WeakMap,gV=new WeakMap,Qne={fontFamily:Oa.FONT_NAME,fontSize:Oa.FONT_SIZE+"pt"};function zC(n,e,t,r){r===void 0&&(r=1/0);let{runs:i}=function(L,W){let K,Q;typeof L=="string"?(Q=L,K=[{tx:L,s:null}]):(Q=L.getText(),K=L.v);let oe=[],{levels:se}=cV(Q,W),he=0;for(let me of K){let ye=0;for(;ye<me.tx.length;){let Te=se[he+ye]%2==1,Me=ye+1;for(;Me<me.tx.length&&se[he+Me]%2==1===Te;)Me++;let Oe=me.tx.slice(ye,Me);oe.push({text:Oe,font:me.s,isRtl:Te}),ye=Me}he+=me.tx.length}return{runs:oe}}(n,t);var a=mV(pV(i,e),r),g=t;let R=new Oy(g);for(let{inlines:L,metrics:W}of a){let K=new DC(W);for(let Q of L)K.addTextFragment(vV(Q));R.addTextLine(K)}return R}function pV(n,e){let{font:t,forceBold:r=!1,forceItalic:i=!1}=e,a=[],g=k6(t,r,i);for(let{text:R,isRtl:L,font:W}of n){let K=W?k6(W,r,i):g,Q={font:Ny(K)},oe=R.split(`
`);for(let se=0;se<oe.length;se++){let he=oe[se];if(se>0&&a.push({type:"break"}),he.length>0){let me={type:"text",text:he,style:Q};fV.set(me,L),gV.set(me,K),a.push(me)}}}return a}function mV(n,e){return Xne.create(n,{overflowWrapType:"break-word",whiteSpaceRule:{textWrapping:e===1/0?"nowrap":"wrap",endOfLineSpace:"hang",endOfLineOtherSpace:"hang"},defaultStyle:Qne}).breakLines(e)}function vV(n){let{metrics:e,displayTextResult:{text:t},item:r}=n;return new gA(t,e.width,gV.get(r)||null,fV.get(r)||!1)}let ere=n=>class extends n{getGroupRange(e,t){let r=e==="row"?this.getRowGroupLevel(t):this.getColGroupLevel(t);return{...this.getGroupRangeWithLevel(e,t,r),level:r}}getGroupRangeWithLevel(e,t,r){let i=t,a=t,g=e==="row"?L=>this.getRowGroupLevel(L):L=>this.getColGroupLevel(L),R=e==="row"?this.sheet.countRows():this.sheet.countCols();if(r>0&&g(t)>=r){for(;i>0&&g(i-1)>=r;)i-=1;for(;a<R-1&&g(a+1)>=r;)a+=1}return{start:i,end:a}}};class tre extends Dc{constructor(e){super(e,"synoGroup")}groupRows(e,t){let r=this.sheet.getDataModel();for(let i=e;i<=t;i++){let a=(r.getRowInfo(i)?.outlineLevel??0)+1;r.updateRowAttr(i,"outlineLevel",Math.min(a,8))}this.sheet.notifySheetChanges(["rows"]),this.sheet.runHooks("afterGroup","row",e,t)}groupCols(e,t){let r=this.sheet.getDataModel();for(let i=e;i<=t;i++){let a=(r.getColInfo(i)?.outlineLevel??0)+1;r.updateColAttr(i,"outlineLevel",Math.min(a,8))}this.sheet.notifySheetChanges(["cols"]),this.sheet.runHooks("afterGroup","col",e,t)}ungroupRows(e,t){let r=this.sheet.getDataModel();for(let i=e;i<=t;i++){let a=(r.getRowInfo(i)?.outlineLevel??0)-1;r.updateRowAttr(i,"outlineLevel",a<1?void 0:a)}this.sheet.notifySheetChanges(["rows"]),this.sheet.runHooks("afterUngroup","row",e,t)}ungroupCols(e,t){let r=this.sheet.getDataModel();for(let i=e;i<=t;i++){let a=(r.getColInfo(i)?.outlineLevel??0)-1;r.updateColAttr(i,"outlineLevel",a<1?void 0:a)}this.sheet.notifySheetChanges(["cols"]),this.sheet.runHooks("afterUngroup","col",e,t)}getMaxRowGroupLevel(){return this.sheet.getDataModel().getMaxRowGroupLevel()}getMaxColGroupLevel(){return this.sheet.getDataModel().getMaxColGroupLevel()}getRowGroupLevel(e){return this.sheet.getDataModel().getRowInfo(e)?.outlineLevel??0}getColGroupLevel(e){return this.sheet.getDataModel().getColInfo(e)?.outlineLevel??0}updateGroup(e,t,r){let i=[];for(let a=0;a<r.length;a++){let g=t+a;i.push(e==="row"?this.getRowGroupLevel(g):this.getColGroupLevel(g)),this.sheet.getDataModel().updateDimAttr(e,g,"outlineLevel",r[a]>0?r[a]:void 0)}this.sheet.notifySheetChanges([`${e}s`]),this.sheet.runHooks("afterUpdateGroup",e,t,r,i)}setCollapse(e,t,r){let i=Array.isArray(r)?r:Array(t.length).fill(r),a=this.sheet.getDataModel(),g=[];for(let R=0;R<t.length;R++)g.push(a[e==="row"?"getRowInfo":"getColInfo"](t[R])?.collapse??!1),a.updateDimAttr(e,t[R],"collapse",i[R]||void 0);this.sheet.runHooks("afterSetCollapse",e,t,r,g)}repairRow(e,t){this.updateGroup("row",t,e)}repairCol(e,t){this.updateGroup("col",t,e)}}class nre extends tre{enablePlugin(){this.addHook("collectRemovedRowInfo",(e,t,r)=>this.collectRemovedInfo("row",e,t,r)),this.addHook("collectRemovedColInfo",(e,t,r)=>this.collectRemovedInfo("col",e,t,r)),super.enablePlugin()}collectRemovedInfo(e,t,r,i){let a=e==="row"?R=>this.getRowGroupLevel(R):R=>this.getColGroupLevel(R),g=Array.from({length:i},(R,L)=>a(r+L));g.some(R=>R>0)&&(e==="row"?t.push({pluginName:this.pluginName,rowInfo:g}):t.push({pluginName:this.pluginName,colInfo:g}))}}class rre extends ere(nre){}class ns{static#e=this.pluginName="";constructor(e,t){this.hot=e}init(){this.initHook()}initHook(){}destroy(){}getHot(){return this.hot}getView(){return this.getHot().view}getSheet(){return this.getHot().sheet}getDataBridge(){return this.getHot().getDataBridge()}getWorkbook(){return this.getDataBridge().getWorkbook()}getAction(){return this.getHot().getAction()}}let WC=Math.ceil(7.5);function UC(n){return n>0?23*n+8:0}function MA(n,e){let t=Ty(n,e)-1;return t>n.length-2?n.length-2:t<0?0:t}var vl=function(n){return n[n.Absolute=0]="Absolute",n[n.OneAnchor=1]="OneAnchor",n[n.TwoAnchor=2]="TwoAnchor",n}({});function yV(n){return"type"in n&&n.type!=null}function Ju(n){return n.type===0}function DA(n){return n.type===1}function Dd(n){return n.type===2}function OA(n,e){return n.row===e.row&&n.col===e.col&&n.rowOffset===e.rowOffset&&n.colOffset===e.colOffset}function wV(n,e){return n.type===e.type&&(Ju(n)&&Ju(e)?n.top===e.top&&n.left===e.left&&n.width===e.width&&n.height===e.height:DA(n)&&DA(e)?!!n.from==!!e.from&&OA(n.from,e.from)&&n.width===e.width&&n.height===e.height:!!(Dd(n)&&Dd(e))&&!!n.from==!!e.from&&OA(n.from,e.from)&&!!n.to==!!e.to&&OA(n.to,e.to))}function bV(n,e){return n.top===e.top&&n.left===e.left&&n.width===e.width&&n.height===e.height}function CV(n,e){return n.top<=e.top&&n.bottom>=e.bottom&&n.left<=e.left&&n.right>=e.right}function _V(n,e){return n.top<e.bottom&&e.top<n.bottom&&n.left<e.right&&e.left<n.right}class SV{constructor(e){this.offsetter=e}drawingPositionToBBox(e){let t,r,i,a;return Ju(e)?{left:r,top:t}=e:{x:r,y:t}=this.relativeOffsetToAbsolute(e.from),Dd(e)?{x:i,y:a}=this.relativeOffsetToAbsolute(e.to):(i=r+e.width,a=t+e.height),{top:t,left:r,bottom:a,right:i}}toAbsolutePosition(e){let{top:t,left:r,bottom:i,right:a}=this.drawingPositionToBBox(e);return{type:vl.Absolute,top:t,left:r,height:i-t,width:a-r}}toPositionOfType(e,t){let r,i,a,g,R;if(yV(e)||(e={type:vl.Absolute,...e}),!yV(e))throw Error("not a DrawingPosition");if(e.type===t)return e;if(Ju(e)?({left:i,top:r}=e,R=this.absoluteOffsetToRelative(i,r)):(R=e.from,{x:i,y:r}=this.relativeOffsetToAbsolute(R)),Dd(e)){let{x:L,y:W}=this.relativeOffsetToAbsolute(e.to);g=L-i,a=W-r}else({width:g,height:a}=e);if(t===vl.Absolute)return{type:t,top:r,left:i,height:a,width:g};{if(t===vl.OneAnchor)return{type:t,from:R,height:a,width:g};let L=i+g,W=r+a;return{type:t,from:R,to:this.absoluteOffsetToRelative(L,W)}}}relativeOffsetToAbsolute(e){let{col:t,row:r,colOffset:i,rowOffset:a}=e;return{x:Math.min(this.offsetter.getColOffset(t)+i,this.offsetter.getColOffset(t+1)),y:Math.min(this.offsetter.getRowOffset(r)+a,this.offsetter.getRowOffset(r+1))}}absoluteOffsetToRelative(e,t){let r=this.offsetter.getColByOffset(e),i=this.offsetter.getRowByOffset(t),a=e-this.offsetter.getColOffset(r),g=t-this.offsetter.getRowOffset(i);return{col:r,row:i,colOffset:a,rowOffset:g}}}class ire{constructor(e){this.viewport=e}getColOffset(e){return this.viewport.getColOffset(e)/this.viewport.getZoomLevel()-Qe.ROW_HEADER_WIDTH}getRowOffset(e){return this.viewport.getRowOffset(e)/this.viewport.getZoomLevel()-Qe.COL_HEADER_HEIGHT}getColByOffset(e){return this.viewport.getColByOffset((e+Qe.ROW_HEADER_WIDTH)*this.viewport.getZoomLevel())}getRowByOffset(e){return this.viewport.getRowByOffset((e+Qe.COL_HEADER_HEIGHT)*this.viewport.getZoomLevel())}}let ore=class{constructor(n,e){this._sheetId=null,this._rowOffset=null,this._colOffset=null,this._recalcRowFlag=!1,this._recalcColFlag=!1,this._minPadding=e,this._paddingTop=0,this._paddingLeft=0,this.zoomLevel=1,this.scroller=new pne(n)}clearSheetId(){this._sheetId=null}destroy(){this.clearSheetId()}updateViewSize(n){this.scroller.updateViewSize(n)}updateSheet(n){this._sheetId!==n.sheetId&&(this._sheetId=n.sheetId,this._recalcRowFlag=!0,this._recalcColFlag=!0),this.updateRowOffset(n),this.updateColOffset(n)}updateRowOffset(n){if(!this._recalcRowFlag)return;let e=n.countRows();this._paddingTop=UC(n.getGroupPlugin().getMaxColGroupLevel())*this.zoomLevel;let t=Qe.COL_HEADER_HEIGHT*this.zoomLevel+this._paddingTop;this._rowOffset=[t];for(let r=0;r<e;r++)t+=n.getRowHeight(r)*this.zoomLevel,this._rowOffset.push(t);this.scroller.setTotalHeight(t+this._minPadding),this._recalcRowFlag=!1}updateColOffset(n){if(!this._recalcColFlag)return;let e=n.countCols();this._paddingLeft=UC(n.getGroupPlugin().getMaxRowGroupLevel())*this.zoomLevel;let t=Qe.ROW_HEADER_WIDTH*this.zoomLevel+this._paddingLeft;this._colOffset=[t];for(let r=0;r<e;r++)t+=n.getColWidth(r)*this.zoomLevel,this._colOffset.push(t);this.scroller.setTotalWidth(t+this._minPadding),this._recalcColFlag=!1}setRecalcRow(){this._recalcRowFlag=!0}setRecalcCol(){this._recalcColFlag=!0}setZoomLevel(n){this.zoomLevel=n,this._recalcRowFlag=!0,this._recalcColFlag=!0}getZoomLevel(){return this.zoomLevel}getRowByOffset(n){return n<this._paddingTop?-2:n<this._rowOffset[0]?-1:MA(this._rowOffset,n)}getColByOffset(n){return n<this._paddingLeft?-2:n<this._colOffset[0]?-1:MA(this._colOffset,n)}getRowOffset(n){return n<=-2?0:n===-1?this._paddingTop:this._rowOffset[n]}getColOffset(n){return n<=-2?0:n===-1?this._paddingLeft:this._colOffset[n]}getScroller(){return this.scroller}setScrollTop(n){this.scroller.setScrollTop(n)}getScrollTop(){return this.scroller.getScrollTop()}setScrollLeft(n){this.scroller.setScrollLeft(n)}getScrollLeft(){return this.scroller.getScrollLeft()}getViewWidth(){return this.scroller.getViewWidth()}getViewHeight(){return this.scroller.getViewHeight()}getTopOffset(){return this._rowOffset[0]}getLeftOffset(){return this._colOffset[0]}getBottomOffset(){return this._rowOffset[this._rowOffset.length-1]}getRightOffset(){return this._colOffset[this._colOffset.length-1]}getDrawingPositionConverter(){if(!this._drawingPosConverter){let n=new ire(this);this._drawingPosConverter=new SV(n)}return this._drawingPosConverter}sectionToBBox(n,e,t){let r=this.getZoomLevel();return n==="row"?{top:this.getRowOffset(e)/r-Qe.COL_HEADER_HEIGHT,left:Number.NEGATIVE_INFINITY,bottom:this.getRowOffset(t+1)/r-Qe.COL_HEADER_HEIGHT,right:Number.POSITIVE_INFINITY}:{top:Number.NEGATIVE_INFINITY,left:this.getColOffset(e)/r-Qe.ROW_HEADER_WIDTH,bottom:Number.POSITIVE_INFINITY,right:this.getColOffset(t+1)/r-Qe.ROW_HEADER_WIDTH}}};class are extends ns{static#e=this.pluginName="synoGroup";initHook(){super.initHook(),this.getHot().addHook("afterOnGroupMouseUp",(e,t)=>this.handleGroupMouseUp(e,t)),this.getHot().addHook("afterOnGroupContextMenu",(e,t)=>this.handleGroupContextMenu(e,t))}handleGroupMouseUp(e,t){if(t.col<-1&&t.row<-1||(this.getHot().getDataBridge()?.getWorkbook().isReadonly()??!0)||Da(e))return;let r=t.col>=-1?"col":"row",i={x:e.clientX,y:e.clientY},a=this.getView().getViewPoint(i),g=this.getGroupAction(r,a,t);g&&(g.expand?this.expandGroup(r,g.index,g.level):this.collapseGroup(r,g.index,g.level))}handleGroupContextMenu(e,t){if(t.col<-1&&t.row<-1||(this.getHot().getDataBridge()?.getWorkbook().isReadonly()??!0))return;let r=t.col>=-1?"col":"row",i={x:e.clientX,y:e.clientY},a=this.getView().getViewPoint(i),g=this.getGroupAction(r,a,t);this.getHot().getUIBridge().editor.groupMenu.show(i,r,g)}async expandGroup(e,t,r){let i=this.getSheet(),{start:a,end:g}=i.getGroupPlugin().getGroupRangeWithLevel(e,t,r);if(!await this.getAction().expandGroup(i.sheetId,e,t,r))return;let R=[0,0,i.countRows()-1,i.countCols()-1];e==="row"?(R[0]=a,R[2]=g):(R[1]=a,R[3]=g),this.getHot().selectRanges([R],"from",!1)}async collapseGroup(e,t,r){let i=this.getSheet(),a=this.getHot().getSelectedRange()?.clone().normalize(),{start:g,end:R}=i.getGroupPlugin().getGroupRangeWithLevel(e,t,r),L=e==="row"?i.countRows():i.countCols();if(!await this.getAction().collapseGroup(i.sheetId,e,t,r)||!a)return;let W=R===L-1?g-1:R+1;g<=a.from[e]&&a.from[e]<=R&&(a.from[e]=W),g<=a.to[e]&&a.to[e]<=R&&(a.to[e]=W),this.getHot().selectRanges([a.toArray()])}async removeGroup(e,t,r){await this.getAction().removeGroup(this.getSheet().sheetId,e,t,r)}async expandAllGroup(e){await this.getAction().expandAllGroup(this.getSheet().sheetId,e)}async collapseAllGroup(e){let t=this.getSheet(),r=this.getHot().getSelectedRange()?.clone().normalize(),i=e==="row"?t.countRows():t.countCols(),a=t.getGroupPlugin(),{start:g,end:R}=a.getGroupRangeWithLevel(e,r.from[e],1),{start:L,end:W}=r.to[e]<R?{start:g,end:R}:a.getGroupRangeWithLevel(e,r.to[e],1);await this.getAction().collapseAllGroup(this.getSheet().sheetId,e)&&(r.from[e]=R===i-1?g-1:R+1,r.to[e]=W===i-1?L-1:W+1,this.getHot().selectRanges([r.toArray()]))}async removeAllGroup(e){await this.getAction().removeAllGroup(this.getSheet().sheetId,e)}getGroupAction(e,t,r){var i;let a=this.getHot().getZoomLevel(),g=(i=(e==="row"?t.x:t.y)/a)%23<8?0:Math.floor(i/23)+1;if(g===0)return null;let R=this.getView(),L=R.getGroupRenderInfo(e,r[e])?.[g-1];if(!L)return null;let W=R.getHeaderBound(e,r[e]);return W&&this.isActionOnIcon(e,t,L,W)?{level:g,index:r[e]+ +!!L.icon,expand:L.icon?.isCollapse??!1}:null}isActionOnIcon(e,t,r,i){let a=this.getHot().getZoomLevel(),g=e==="row"?t.y:t.x,R=(e==="row"?i.y:i.x)*a,L=(e==="row"?i.y+i.height:i.x+i.width)*a,W=Math.floor((R+L)/2);return r.icon&&(R=W-WC*a,r.icon.isCollapse&&(L=R+15*a)),r.isLast&&(L=W),R<=g&&g<=L}}function IV(n,e){return TV(e,t=>n.getGroupPlugin().getRowGroupLevel(t),t=>n.isHiddenRow(t),n.countRows())}function xV(n,e){return TV(e,t=>n.getGroupPlugin().getColGroupLevel(t),t=>n.isHiddenCol(t),n.countCols())}function TV(n,e,t,r){return n.map((i,a)=>{let g=[],R=e(i),L=e(i-1),W=e(i+1),K=Math.max(R,W);for(let Q=1;Q<=K;Q++){let oe={isFirst:!1,isLast:!1,icon:null};L<Q&&Q<=R&&(oe.isFirst=!0),R<Q&&Q<=W?oe.icon={isCollapse:!1}:W<Q&&Q<=R&&(oe.isLast=!0),g.push(oe)}if(W>R){let Q=a===n.length-1?r:n[a+1],oe=W+1;for(let se=i+1;se<Q&&t(se);se++)oe=Math.min(oe,e(se+1)+1);for(let se=oe;se<=W;se++){let he=g[se-1].icon;he&&(he.isCollapse=!0)}}return g})}function NA(n,e){return`${n}-${e}`}class sre{constructor(e){this.range=e,this.cellWithPadding=new Set}addCellWithPadding(e,t){this.cellWithPadding.add(NA(e,t))}removeCellWithPadding(e,t){this.cellWithPadding.delete(NA(e,t))}hasPadding(e,t){return this.cellWithPadding.has(NA(e,t))}}var Lh=function(n){return n.None="None",n.Normal="Normal",n.Filtered="Filtered",n}({}),Od=function(n){return n.None="None",n.Fold="Fold",n.Unfold="Unfold",n}({}),Uo=function(n){return n.ItemName="ItemName",n.FieldName="FieldName",n.DataFieldName="DataFieldName",n.FilterItem="FilterItem",n.SubtotalCaption="SubtotalCaption",n.GrandTotalCaption="GrandTotalCaption",n.ColumnHeaderCaption="ColumnHeaderCaption",n.RowHeaderCaption="RowHeaderCaption",n.ValuesCaption="ValuesCaption",n}({});function Nc(n){return n===void 0&&(n={}),{indent:0,field:null,tooltip:"",filterBtn:"None",foldBtn:"None",rowSelect:!1,colSelect:!1,...n}}function GC(n,e,t,r){e.forAll((i,a)=>{let g=r?.[i-e.from.row]?.[a-e.from.col]??Nc();n.setCellMeta(i,a,[["pivot",t?{...g,tableId:t}:void 0]])})}let PA=Math.floor(6.5);function $p(n){if(!n)return 0;let e=n.indent;return("foldBtn"in n?n.foldBtn!==Od.None:n.fold)||e>0?(e+1)*17:0}function kV(n,e,t,r,i){return i===void 0&&(i=1),{x:n.x+(4+17*e+PA)*i,y:function(a,g,R,L){if(L===void 0&&(L=1),g==="middle")return a.y+a.height/2;let W=Math.max(Math.floor(R/2),PA);return g==="bottom"?a.y+a.height-(3+W)*L:a.y+(2+W)*L}(n,t,r,i)}}function RV(n,e){e===void 0&&(e={});let t=new Wa().assign({size:9,name:"Arial",...e}),r={font:Ny(t)},{lineBoundingBoxAscent:i}=By(r),a=new DC({height:18,lineBoxAscent:i}),{width:g}=FC(n,r);return a.addTextFragment(new gA(n,g,t,!1)),a}function BA(n,e){e===void 0&&(e={});let t=new Oy;t.addTextLine(RV(n,e));let r=new MC(t);return r.setValign("top"),r}class lre{constructor(e){this.hot=e,this._filterInfo=null,this._foldInfo=null,this._filterMenuCoord=null,this.initHook()}initHook(){this.hot.addHook("afterOnCellDblClick",(e,t)=>this.onCellDblClick(t)),this.hot.addHook("beforeOnCellMouseDown",(e,t)=>this.checkMouseDown(e,t)),this.hot.addHook("afterOnCellMouseOver",(e,t,r,i)=>this.afterOnCellMouseOver(e,t,r,i))}isPivotTableEnabled(){return this.hot.getDataBridge().getWorkbook().isPivotTableEnabled()}async onCellDblClick(e){let t=this.hot.sheet;if(!t||t.getWorkbook().isReadonly())return;let r=t.getCellProperty(e.row,e.col,"pivot");if(!this.isPivotTableEnabled()||t.getWorkbook().getPivotTableManager().isIncompatibleTable(r?.tableId??"")||r?.axis!=="data")return;let i=await this.hot.getAction().createPivotDetailSheet(r.tableId,e.row,e.col);i&&this.hot.getDataBridge().setCurrent(i)}checkMouseDown(e,t){let r=this.hot.sheet;if(te(e)||!r||r.getWorkbook().isReadonly()||Da(e))return;let i=r.getMergePlugin().getMergedRange(t.row,t.col),a=i?i.from:t,g=i?i.to:t,R=this.hot.view.getRangeViewBound(a.row,a.col,g.row,g.col,!1),{row:L,col:W}=a,K=r.getCellProperty(L,W,"pivot"),Q=this.hot.view.getViewPoint({x:e.pageX,y:e.pageY});this.checkHoverFilter(Q,L,W,R,K),this.checkHoverFold(Q,L,W,R,K),this.checkFilterMouseDown(e)||this.checkFoldMouseDown(e)}checkFilterMouseDown(e){if(!this._filterInfo)return!1;q(e),e.stopPropagation();let{row:t,col:r,dropdownBound:i,tableId:a,fieldId:g,axis:R}=this._filterInfo;return this.clearMenu(),this.setMenu(t,r),this.hot.getUIBridge().editor.filter.show(i,{row:t,col:r},{tableId:a,fieldId:g,axis:R}),!0}async checkFoldMouseDown(e){if(!this._foldInfo)return!1;q(e),e.stopPropagation();let t=this._foldInfo,{tableId:r,fieldId:i,item:a,folded:g}=t;return await this.hot.getAction().setPivotFieldItemAttr(r,i,"folded",[[a,g]])&&t===this._foldInfo&&this._setFoldInfo({...this._foldInfo,folded:!g}),!0}afterOnCellMouseOver(e,t,r,i){let a=this.hot.sheet;if(!a||a.getWorkbook().isReadonly())return;let{row:g,col:R}=r?.from??t,L=a.getCellProperty(g,R,"pivot"),W=this.hot.view.getViewPoint({x:e.pageX,y:e.pageY});this.checkHoverFilter(W,g,R,i,L),this.checkHoverFold(W,g,R,i,L)}checkHoverFilter(e,t,r,i,a){if(!a||!a.axis||a.filterBtn===Lh.None||!this.isPivotTableEnabled()||this.isIncompatibleTable(a.tableId))return void this._clearFilterInfo();let g=fA(i,this.hot.view.viewport.getZoomLevel());if(e.x<g.x||e.x>g.x+g.width||e.y<g.y||e.y>g.y+g.height)return void this._clearFilterInfo();this._clearFilterInfo();let R=this.hot.view.toPageBound(g);this._setFilterInfo({row:t,col:r,dropdownBound:R,tableId:a.tableId,axis:a.axis,fieldId:a.field})}checkHoverFold(e,t,r,i,a){let{x:g,y:R}=e;if(!a||a.foldBtn===Od.None||!a.field||!a.item||!this.isPivotTableEnabled()||this.isIncompatibleTable(a.tableId))return void this._clearFoldInfo();let L=this.hot.view.getRenderInfo(t,r),W=L?.foreInfo.valign??"top",K=L?.foreInfo.text?.getHeight()??13,Q=this.hot.view.viewport.getZoomLevel(),oe=kV(i,a.indent,W,K,Q),se=PA*Q;if(g<oe.x-se||g>oe.x+se||R<oe.y-se||R>oe.y+se)return void this._clearFoldInfo();this._clearFoldInfo(),this._setFoldInfo({row:t,col:r,tableId:a.tableId,fieldId:a.field,item:a.item,folded:a.foldBtn!==Od.Unfold})}isIncompatibleTable(e){let t=this.hot.sheet?.getWorkbook().getPivotTableManager();return!!t&&t.isIncompatibleTable(e)}setMenu(e,t){this._filterMenuCoord={row:e,col:t},this.hot.view.rerenderFilterDropdown(e,t,!0)}clearMenu(){if(!this._filterMenuCoord)return;let{row:e,col:t}=this._filterMenuCoord;this.hot.view.rerenderFilterDropdown(e,t,!1),this._filterMenuCoord=null}_setFilterInfo(e){this._filterInfo=e;let{row:t,col:r}=this._filterInfo;this.hot.view.rerenderFilterDropdown(t,r,!0)}_clearFilterInfo(){if(!this._filterInfo)return;let{row:e,col:t}=this._filterInfo;this._filterInfo=null,this._filterMenuCoord&&this._filterMenuCoord.row===e&&this._filterMenuCoord.col===t||this.hot.view.rerenderFilterDropdown(e,t,!1)}_setFoldInfo(e){this._foldInfo=e;let{row:t,col:r}=this._foldInfo;this.hot.view.rerenderPivotFold(t,r,!0)}_clearFoldInfo(){if(!this._foldInfo)return;let{row:e,col:t}=this._foldInfo;this._foldInfo=null,this.hot.view.rerenderPivotFold(e,t,!1)}async setPivotCellValue(e,t,r){let i=this.hot.sheet;if(!i||i.getWorkbook().isReadonly())return!1;let a=i.getCellProperty(e,t,"pivot");if(!a||a.edit==null)return!1;let{edit:g,tableId:R,field:L,item:W,axis:K}=a,Q=this.hot.getAction();return g===Uo.ItemName?Q.setPivotCellAsItemName(R,L,W,r):g===Uo.FieldName||g===Uo.ValuesCaption?Q.setPivotCellAsFieldName(R,L,K,r,g===Uo.ValuesCaption):g===Uo.DataFieldName?Q.setPivotCellAsDataFieldName(R,L,W,r):g===Uo.FilterItem?Q.setPivotCellAsFilterItem(R,L,W,r):g===Uo.SubtotalCaption?Q.setPivotCellAsSubtotalCaption(R,L,W,r):g===Uo.GrandTotalCaption?Q.setPivotCellAsGrandTotalCaption(R,r):g===Uo.ColumnHeaderCaption?Q.setPivotCellAsColumnHeaderCaption(R,r):g===Uo.RowHeaderCaption?Q.setPivotCellAsRowHeaderCaption(R,r):!1}}function EV(n){return n.getHeight()+4}function jC(n,e,t,r){let i=n.getComputedCellStyle(e,t).getBorder().b;return i&&i[r]}class qC{constructor({drawer:e,topDrawer:t},r,i,a,g,R){this.sheet=r,this.rowIndices=i,this.colIndices=a,this._initFromOptions(g||{}),this._uiBridge=R,this._plugins={condition:this.sheet.getCfPlugin(),filter:this.sheet.getFilterPlugin(),merge:this.sheet.getMergePlugin(),hidden:this.sheet.getHiddenPlugin(),validation:this.sheet.getValidationPlugin()},this._drawer=e,this._topDrawer=t,this._mergedInfos=this._cacheMergedInfos(),this._textViewCache=[],this._renderInfo=null,this._firstRowGroupInfo=[],this._rowGroupInfo=[],this._firstColGroupInfo=[],this._colGroupInfo=[],this._rowSelected=[],this._colSelected=[],this._filterInfo=this.isHistory()||this.isPrint()?null:function(L){let W=L.getFilterPlugin().getActiveFilterJSON()?.range;if(!W)return null;let K=new sre(W),Q=W[0];for(let oe=W[1];oe<=W[3];oe++)K.addCellWithPadding(Q,oe);for(let oe of L.getMergePlugin().getOverlap(new sn(W[0],W[1],W[0],W[3]))){let se=Math.max(oe.from.col,W[1]),he=Math.min(oe.to.col,W[3]);for(let me=se;me<=he;me++)K.removeCellWithPadding(Q,me);K.addCellWithPadding(oe.from.row,oe.from.col)}return K}(this.sheet),this._rowHeaderBound=[],this._colHeaderBound=[],this._fixedWidth=null,this._fixedHeight=null}_initFromOptions(e){this.includeHeader=!!e.includeHeader,this.scaleRatio=e.scaleRatio||1,this._gridColor=e.gridColor===void 0?Oa.BORDER_COLOR:e.gridColor,this._headerColor=e.isFilterView?Rne:kne,this._mode=e.mode||"normal",this._fixedRowIndex=e.fixedRowIndex!==void 0&&e.fixedRowIndex,this._fixedRowAmount=this._fixedRowIndex===!1?0:this._fixedRowIndex+1,this._fixedColIndex=e.fixedColIndex!==void 0&&e.fixedColIndex,this._fixedColAmount=this._fixedColIndex===!1?0:this._fixedColIndex+1,this._startGridX=this.isPrint()?0:UC(this.sheet.getGroupPlugin().getMaxRowGroupLevel()),this._startGridY=this.isPrint()?0:UC(this.sheet.getGroupPlugin().getMaxColGroupLevel()),this._startX=e.startX??(this.includeHeader?Qe.ROW_HEADER_WIDTH+this._startGridX:1),this._startY=e.startY??(this.includeHeader?Qe.COL_HEADER_HEIGHT+this._startGridY:1),this._bottomRightOffsetY=e.bottomRightOffsetY??0,this._bottomRightOffsetX=e.bottomRightOffsetX??0}isHistory(){return this._mode==="history"}isPrint(){return this._mode==="print"}trimRow(e){this.rowIndices.length=e,this._textViewCache.length=e,this._mergedInfos.length=e}_calcWidth(e,t){let r=0;for(let i=e;i<=t;i++)r+=this.sheet.getColWidth(i);return r}_calcHeight(e,t){let r=0;for(let i=e;i<=t;i++)r+=this.sheet.getRowHeight(i);return r}_createBound(e,t,r,i){return{x:e,y:t,width:r,height:i}}_generateRowHeaderBound(){let e=this._startY;this._rowHeaderBound=[];for(let t=0;t<this.rowIndices.length;t++){let r=t===this._fixedRowAmount?this._bottomRightOffsetY:0,i=this.rowIndices[t],a=this.sheet.getRowHeight(i),g=this._createBound(this._startGridX,e+r,Qe.ROW_HEADER_WIDTH,a);this._rowHeaderBound.push({cellBound:g,clipBound:r===0?g:this._createBound(this._startGridX,e,Qe.ROW_HEADER_WIDTH,a+r)}),e+=a+r}}_generateColHeaderBound(){let e=this._startX;this._colHeaderBound=[];for(let t=0;t<this.colIndices.length;t++){let r=t===this._fixedColAmount?this._bottomRightOffsetX:0,i=this.colIndices[t],a=this.sheet.getColWidth(i),g=this._createBound(e+r,this._startGridY,a,Qe.COL_HEADER_HEIGHT);this._colHeaderBound.push({cellBound:g,clipBound:r===0?g:this._createBound(e,this._startGridY,a+r,Qe.COL_HEADER_HEIGHT)}),e+=a+r}}getFixedWidth(){return this._fixedWidth??=this._fixedColAmount>0?this._calcWidth(0,this._fixedColAmount-1):0}getFixedHeight(){return this._fixedHeight??=this._fixedRowAmount>0?this._calcHeight(0,this._fixedRowAmount-1):0}getAreaBound(){let e=this.getFixedWidth(),t=this.getFixedHeight(),r=this.getRightOffset()-e,i=this.getBottomOffset()-t;return{topLeft:this._createBound(this._startX,this._startY,e,t),topRight:this._createBound(this._startX+e,this._startY,r,t),bottomLeft:this._createBound(this._startX,this._startY+t,e,i),bottomRight:this._createBound(this._startX+e,this._startY+t,r,i)}}_overrideForeInfo(e,t,r){e&&t&&EV(t)>r.height&&e.setValign("top")}generateRenderInfo(){this._renderInfo=this._createEmptyCache(),this._generateRowHeaderBound(),this._generateColHeaderBound();for(let e=0,t=this.rowIndices.length;e<t;e++){let r=this.rowIndices[e];for(let i=0,a=this.colIndices.length;i<a;i++){let g=this.colIndices[i],R=null,L=null,W=this.getMergedInfo(e,i),K=this._getTextView(e,i);if(this._isVisibleCell(e,i)){let{startRow:Q=r,startCol:oe=g}=W||{},se=this.sheet.getComputedCellStyle(Q,oe);R=this._createBackInfo(Q,oe,se),L=this._createForeInfo(Q,oe,se,K,R)}if(this._isMergedEdge(e,i)&&(R=this._adjustMergedBackInfo(e,i,W,R)),R!==null||L!==null){let Q,{y:oe,height:se}=this._rowHeaderBound[e].cellBound,{x:he,width:me}=this._colHeaderBound[i].cellBound,{cellBound:ye,textBound:Te,borderBound:Me}=this._generateBound(r,g,he,oe,me,se,W);if(e===this._fixedRowAmount||i===this._fixedColAmount){let Oe=Math.max(ye.x,this._colHeaderBound[i].clipBound.x),ze=Math.max(ye.y,this._rowHeaderBound[e].clipBound.y);Q=this._createBound(Oe,ze,ye.x+ye.width-Oe,ye.y+ye.height-ze)}this._overrideForeInfo(L,K,ye),this._renderInfo[e][i]={foreInfo:L,backInfo:R,cellBound:ye,textBound:Te,borderBound:Me,clipBound:Q}}}}this._calcTextOverflow()}isEmpty(){return this._renderInfo===null||this._renderInfo.length===0}drawAll(e){this.rowIndices.length!==0&&this.colIndices.length!==0&&(this._drawer.drawCanvasBackground(this.isPrint()?"#FFFFFF":"#ECEEF0"),this.isPrint()||this.drawGroup(),this.drawEach(this._backgroundDrawer,this._isNormal),this.drawGridLine(),this.drawEach(this._backgroundDrawer,this._isMerged),this.drawEach(this._borderDrawer,this._hasBorderCell),this.drawEach(this._foregroundDrawer),this._drawAllFilterDropdown(),this.includeHeader&&(this.drawHeader(e),this.drawTopLayer()),this.drawEmptyPivotTable())}drawHeader(e){this._translateSelections(e);let t=new Dy;t.setFill(this._headerColor.normal.fill);let r=this._createBound(this._startGridX,this._startGridY,Qe.ROW_HEADER_WIDTH,Qe.COL_HEADER_HEIGHT);this._drawer.drawCellBackground(t,r);for(let i=0,a=this.rowIndices.length;i<a;i++)this._drawRowHeader(i);for(let i=0,a=this.colIndices.length;i<a;i++)this._drawColHeader(i)}drawTopLayer(){this._topDrawer.clear();let e=this._startGridX+Qe.ROW_HEADER_WIDTH,t=this._startGridY+Qe.COL_HEADER_HEIGHT;this._gridColor!==null&&(this._topDrawer.drawAxisLine(this._startGridX,t,this.getRightOffset(),t,this._gridColor),this._topDrawer.drawAxisLine(e,this._startGridY,e,this.getBottomOffset(),this._gridColor)),this._drawHorizontalFreezeBar(),this._drawVerticalFreezeBar()}_drawHorizontalFreezeBar(){if(this._fixedRowIndex===!1)return;let e=this._fixedRowIndex!==-1,t=this._rowHeaderBound[e?this._fixedRowIndex:0].cellBound;if(t){let r=e?t.y+t.height:t.y;this._topDrawer.drawHorizontalLine(r-.5,0,this.getRightOffset(),I6,3)}}_drawVerticalFreezeBar(){if(this._fixedColIndex===!1)return;let e=this._fixedColIndex!==-1,t=this._colHeaderBound[e?this._fixedColIndex:0].cellBound;if(t){let r=e?t.x+t.width:t.x;this._topDrawer.drawVerticalLine(r-.5,0,this.getBottomOffset(),I6,3)}}_translateSelections(e){if(this._rowSelected=[],this._colSelected=[],e&&e.length!==0)for(let t=0;t<e.length;t++){let r=e[t].cellRange;if(!r)continue;let i=r.getTopLeftCorner(),a=r.getBottomRightCorner(),g=Xs(this.rowIndices,i.row);for(;g<this.rowIndices.length&&this.rowIndices[g]<=a.row;g++)this._rowSelected[g]=!0;let R=Xs(this.colIndices,i.col);for(;R<this.colIndices.length&&this.colIndices[R]<=a.col;R++)this._colSelected[R]=!0}}_drawRowHeader(e){let t=this.rowIndices[e],{cellBound:r,clipBound:i}=this._rowHeaderBound[e],a=new Dy;a.setBottomBorder(this._gridColor);let g=this._filterInfo?.range,R=g&&g[0]<=t&&g[2]>=t,L=this._headerColor[R?"filter":"normal"];a.setFill(this._rowSelected[e]?L.select:L.fill),this._drawer.drawCellBackground(a,i),this._drawer.drawCellBorder(a,r,i),this._drawer.drawHeaderText(""+(t+1),r,i,this._headerColor.font),this._plugins.hidden.hasDownArrow(t)&&this._drawer.drawDownArrowSpreader(r,i,!1),this._plugins.hidden.hasUpArrow(t)&&this._drawer.drawUpArrowSpreader(r,i,!1)}_drawColHeader(e){let t=this.colIndices[e],{cellBound:r,clipBound:i}=this._colHeaderBound[e],a=new Dy;a.setRightBorder(this._gridColor);let g=this._filterInfo?.range,R=g&&g[1]<=t&&g[3]>=t,L=this._headerColor[R?"filter":"normal"];a.setFill(this._colSelected[e]?L.select:L.fill),this._drawer.drawCellBackground(a,i),this._drawer.drawCellBorder(a,r,i),this._drawer.drawHeaderText(function(W){let K,Q=W+1,oe="";for(;Q>0;)oe=String.fromCharCode(65+(K=(Q-1)%26))+oe,Q=parseInt((Q-K)/26,10);return oe}(t),r,i,this._headerColor.font),this._plugins.hidden.hasRightArrow(t)&&this._drawer.drawRightArrowSpreader(r,i,!1),this._plugins.hidden.hasLeftArrow(t)&&this._drawer.drawLeftArrowSpreader(r,i,!1)}_isNormal(e,t){return this.getMergedInfo(e,t)===null}_isMerged(e,t){let r=this.getMergedInfo(e,t);if(r===null)return!1;let{startRowIndex:i,startColIndex:a}=r;return e===i&&t===a}_isMergedEdge(e,t){let r=this.getMergedInfo(e,t);if(r===null)return!1;let{startRowIndex:i,startColIndex:a,endRowIndex:g,endColIndex:R}=r;return e===i||e===g||t===a||t===R}_isVisibleCell(e,t){return this._isNormal(e,t)||this._isMerged(e,t)}_hasBorderCell(e,t){return this._isNormal(e,t)||this._isMergedEdge(e,t)}_borderDrawer(e){let{backInfo:t,borderBound:r,clipBound:i}=e;this._drawer.drawCellBorder(t,r,i)}_backgroundDrawer(e){let{backInfo:t,cellBound:r,clipBound:i}=e;this._drawer.drawCellBackground(t,i||r)}_foregroundDrawer(e){let{foreInfo:t,backInfo:r,cellBound:i,clipBound:a,textBound:g,textClipBound:R}=e;this._drawer.drawCellForeground(t,i,g,r.fill,R??a)}drawEach(e,t){t===void 0&&(t=this._isVisibleCell);for(let r=0,i=this.rowIndices.length;r<i;r++)for(let a=0,g=this.colIndices.length;a<g;a++)if(t.call(this,r,a)){let R=this._renderInfo[r][a];R&&e.call(this,R)}}drawGridLine(){if(this._gridColor===null)return;let e=this.getRightOffset();this._drawer.drawAxisLine(this._startGridX,this._startY,e,this._startY,this._gridColor);for(let r=0;r<this._rowHeaderBound.length;r++){let i=this._rowHeaderBound[r].clipBound,a=i.y+i.height;this._drawer.drawAxisLine(this._startGridX,a,e,a,this._gridColor)}let t=this.getBottomOffset();this._drawer.drawAxisLine(this._startX,this._startGridY,this._startX,t,this._gridColor);for(let r=0;r<this._colHeaderBound.length;r++){let i=this._colHeaderBound[r].clipBound,a=i.x+i.width;this._drawer.drawAxisLine(a,this._startGridY,a,t,this._gridColor)}}drawGroup(){this._firstRowGroupInfo=IV(this.sheet,[-1])[0],this._drawer.drawGroupInfoArray("row",this._firstRowGroupInfo,this._colHeaderBound[0].cellBound),this._rowGroupInfo=IV(this.sheet,this.rowIndices);for(let e=0;e<this._rowGroupInfo.length;e++){let t=this._rowGroupInfo[e],r=this._rowHeaderBound[e],i=e===this._fixedRowAmount?{x:0,y:r.clipBound.y,width:this._startGridX,height:r.clipBound.height}:void 0;this._drawer.drawGroupInfoArray("row",t,r.cellBound,i)}this._firstColGroupInfo=xV(this.sheet,[-1])[0],this._drawer.drawGroupInfoArray("col",this._firstColGroupInfo,this._rowHeaderBound[0].cellBound),this._colGroupInfo=xV(this.sheet,this.colIndices);for(let e=0;e<this._colGroupInfo.length;e++){let t=this._colGroupInfo[e],r=this._colHeaderBound[e],i=e===this._fixedColAmount?{x:r.clipBound.x,y:0,width:r.clipBound.width,height:this._startGridY}:void 0;this._drawer.drawGroupInfoArray("col",t,r.cellBound,i)}}_drawFilterDropdown(e,t,r){let i=this.getMergedInfo(e,t),{backInfo:a,clipBound:g}=i?this._renderInfo[i.startRowIndex][i.startColIndex]:this._renderInfo[e][t],R=this._createBound(this._colHeaderBound[t].cellBound.x,this._rowHeaderBound[e].cellBound.y,this._colHeaderBound[t].cellBound.width,this._rowHeaderBound[e].cellBound.height),L=new $l(r,this._plugins.filter.hasCondition(this.colIndices[t]),!1);this._drawer.drawFilterDropdown(R,R,L,a.fill,g)}_drawAllFilterDropdown(){if(!this._filterInfo)return;let e=this._filterInfo.range,t=e[0],r=this.rowIndices.indexOf(t);if(r===-1)return;let i=Xs(this.colIndices,e[1]);for(;i<this.colIndices.length&&this.colIndices[i]<=e[3];)this._drawFilterDropdown(r,i,!1),i+=1}redrawFilterDropdown(e,t,r){if(this._filterInfo?.range[0]===e&&this._filterInfo.range[1]<=t&&this._filterInfo.range[3]>=t){let i=Nh(this.rowIndices,e),a=Nh(this.colIndices,t);i!==-1&&a!==-1&&this._drawFilterDropdown(i,a,r)}else this._redrawDropdown(e,t,i=>{let{cellBound:a,textBound:g,clipBound:R,foreInfo:L,backInfo:W}=i,{dropdown:K}=L,{fill:Q}=W;K.constructor===$l&&(K.setHover(r),this._drawer.drawFilterDropdown(a,g,K,Q,R))})}redrawValidationDropdown(e,t,r){this._redrawDropdown(e,t,i=>{let{cellBound:a,textBound:g,clipBound:R,foreInfo:L,backInfo:W}=i,{dropdown:K}=L,{fill:Q}=W;K.constructor===Bh&&(K.setHover(r),this._drawer.drawValidationDropdown(a,g,K,Q,R))})}_redrawDropdown(e,t,r){let i=Nh(this.rowIndices,e),a=Nh(this.colIndices,t);if(i===-1||a===-1)return;let g=this.getMergedInfo(i,a);g&&(e=g.startRow,t=g.startCol,i=g.startRowIndex,a=g.startColIndex);let R=this._renderInfo[i][a];R?.foreInfo.dropdown&&r(R)}redrawRowSpreader(e,t,r){let i=Nh(this.rowIndices,e);if(i===-1)return;let a=t?i:i-1,g=t?i+1:i;this._redrawRowSpreader(a,!0,r),this._redrawRowSpreader(g,!1,r)}_redrawRowSpreader(e,t,r){if(e<0||e>=this._rowHeaderBound.length)return;if(!r)return void this._drawRowHeader(e);let{cellBound:i,clipBound:a}=this._rowHeaderBound[e];t?this._drawer.drawUpArrowSpreader(i,a,r):this._drawer.drawDownArrowSpreader(i,a,r)}redrawColSpreader(e,t,r){let i=Nh(this.colIndices,e);if(i===-1)return;let a=t?i:i-1,g=t?i+1:i;this._redrawColSpreader(a,!0,r),this._redrawColSpreader(g,!1,r)}_redrawColSpreader(e,t,r){if(e<0||e>=this._colHeaderBound.length)return;if(!r)return void this._drawColHeader(e);let{cellBound:i,clipBound:a}=this._colHeaderBound[e];t?this._drawer.drawLeftArrowSpreader(i,a,r):this._drawer.drawRightArrowSpreader(i,a,r)}reDrawPivotFold(e,t,r){this._redrawPivotFold(e,t,i=>{let{foreInfo:a,textBound:g,clipBound:R,backInfo:L}=i;a.fold&&(a.fold.hover=r,this._drawer.drawPivotFold(a,g,L.fill,R))})}_redrawPivotFold(e,t,r){let i=Nh(this.rowIndices,e),a=Nh(this.colIndices,t);if(i===-1||a===-1)return;let g=this.getMergedInfo(i,a);g&&(e=g.startRow,t=g.startCol,i=g.startRowIndex,a=g.startColIndex),r(this._renderInfo[i][a])}_createPivotForeInfo(){let e=this._uiBridge.getString("pivot_table","axis_row"),t=this._uiBridge.getString("pivot_table","axis_col"),r=this._uiBridge.getString("pivot_table","axis_data"),i=this._uiBridge.getString("pivot_table","empty_pivot_table_message").split("<br/>");if(e&&t&&r&&i[0])return function(a){let g=BA(a.row),R=BA(a.col,{color:"FFFFFF"}),L=BA(a.value),W=new MC(new Oy);for(let K of a.message)W.text.addTextLine(RV(K));return W.setValign("middle"),W.setHalign("center"),{row:g,col:R,value:L,message:W}}({row:e,col:t,value:r,message:i})}drawEmptyPivotTable(){let e=this.getAreaBound(),t=this._createPivotForeInfo();for(let{from:r,to:i}of this.sheet.getWorkbook().getPivotTableManager().listEmptyPivotRanges(this.sheet.sheetId)){let a=Xs(this.rowIndices,r.row),g=Ty(this.rowIndices,i.row)-1,R=Xs(this.colIndices,r.col),L=Ty(this.colIndices,i.col)-1;if(a===this.rowIndices.length||R===this.colIndices.length||a>g||R>L)continue;let W={x:this._colHeaderBound[L].cellBound.x-this._calcWidth(r.col,this.colIndices[L]-1),y:this._rowHeaderBound[g].cellBound.y-this._calcHeight(r.row,this.rowIndices[g]-1)},K={x:this._colHeaderBound[R].cellBound.x,y:this._rowHeaderBound[a].cellBound.y},Q={width:this._calcWidth(r.col,r.col),height:this._calcHeight(r.row,r.row)},oe={width:this._calcWidth(r.col+1,i.col),height:this._calcHeight(r.row+1,i.row)},se={x:0,y:this._calcHeight(r.row+1,r.row+2)},he={width:this._calcWidth(r.col+1,Math.min(r.col+3,i.col)),height:this._calcHeight(r.row+3,i.row-4)};if(this._fixedRowAmount>a&&this._fixedColAmount>R){let me={...K};this._drawer.drawPivotTable(me,Q,oe,se,he,e.topLeft,t)}if(this._fixedRowAmount>a&&this._fixedColAmount<=L){let me={x:W.x,y:K.y};this._drawer.drawPivotTable(me,Q,oe,se,he,e.topRight,t)}if(this._fixedRowAmount<=g&&this._fixedColAmount>R){let me={x:K.x,y:W.y};this._drawer.drawPivotTable(me,Q,oe,se,he,e.bottomLeft,t)}if(this._fixedRowAmount<=g&&this._fixedColAmount<=L){let me={...W};this._drawer.drawPivotTable(me,Q,oe,se,he,e.bottomRight,t)}}}_createEmptyCache(){let e=this.rowIndices.length,t=this.colIndices.length;if(e===0||t===0)return[];let r=[];for(let a=0;a<t;a++)r.push(null);let i=[r];for(let a=1;a<e;a++)i.push(r.slice());return i}_createMergedInfo(e){let{from:{row:t,col:r},to:{row:i,col:a}}=e,g=Xs(this.rowIndices,t);if(g>=this.rowIndices.length||this.rowIndices[g]>i)return null;let R=Ty(this.rowIndices,i)-1;if(R===-1)return null;let L=Xs(this.colIndices,r);if(L>=this.colIndices.length||this.colIndices[L]>a)return null;let W=Ty(this.colIndices,a)-1;return W===-1?null:{startRow:t,startCol:r,endRow:i,endCol:a,startRowIndex:g,startColIndex:L,endRowIndex:R,endColIndex:W}}_cacheMergedInfos(){let e=this._createEmptyCache();for(let t of this._plugins.merge.traverseMergedRange()){let r=this._createMergedInfo(t);if(r===null)continue;let{startRowIndex:i,startColIndex:a,endRowIndex:g,endColIndex:R}=r;for(let L=i;L<=g;L++)for(let W=a;W<=R;W++)e[L][W]=r}return e}getMergedInfo(e,t){return this._mergedInfos[e][t]}measureGrid(){let e=this._createEmptyCache(),t=new Map;for(let r=0,i=this.rowIndices.length;r<i;r++){let a=this.rowIndices[r];for(let g=0,R=this.colIndices.length;g<R;g++){let L,W=this.colIndices[g],{startRow:K=a,startCol:Q=W,endCol:oe=W,startRowIndex:se=r,startColIndex:he=g,endRowIndex:me=r}=this.getMergedInfo(r,g)||{};if(r!==se||g!==he)continue;let ye=this.sheet.getCellTextDesc(K,Q)?.v;if(!ye)continue;let Te=this.sheet.getComputedCellStyle(K,Q),Me=this.sheet.getCellProperty(K,Q,"pivot"),Oe=this._plugins?.condition?.getComputedCfStyle(K,Q),ze=Me?Me.filterBtn!==Lh.None:this._filterInfo?.hasPadding(K,Q)??!1,We=Me?void 0:this.sheet.getCellProperty(K,Q,"validId"),qe=Oe?.bold||ze,Ke=Oe?.italic;if(Te.getAlignment().wrap==="wrap"){L=this._calcWidth(Q,oe);let pt=1;ze?pt+=$l.getPadding()+4:We&&this._plugins?.validation?.isDropdownValidation(We)?pt+=Bh.getPadding()+4:pt+=8,Me&&(pt+=$p(Me)),L-=pt}let at=this.sheet.getDataAtCell(K,Q),gt=this._createTextCellView(Zr(at)?at:ye,{font:Te.getFont(),forceBold:qe,forceItalic:Ke},this.sheet.ensureCellDirection(K,Q),L);if(e[r][g]=gt,se===me){let pt=EV(gt);pt>(t.get(a)?.height??0)&&t.set(a,{col:W,height:pt})}}}return this._textViewCache=e,Array.from(t).map(r=>{let[i,{col:a,height:g}]=r;return{row:i,col:a,height:g}})}_createTextCellView(e,t,r,i){return zC(e,t,r,i)}_getTextView(e,t){return this._textViewCache[e][t]}_adjustMergedBackInfo(e,t,r,i){i=i||new Dy;let{startRowIndex:a,startColIndex:g,endRowIndex:R,endColIndex:L,startRow:W,startCol:K,endRow:Q,endCol:oe}=r,se=this.rowIndices[e],he=this.colIndices[t];return i.setTopBorder(e===a?jC(this.sheet,W,he,0):null),i.setLeftBorder(t===g?jC(this.sheet,se,K,3):null),i.setRightBorder(t===L?jC(this.sheet,se,oe,1)||this._gridColor:null),i.setBottomBorder(e===R?jC(this.sheet,Q,he,2)||this._gridColor:null),i}_createBackInfo(e,t,r){let i=new Dy,a=this.sheet.getCellProperty(e,t,"pivot");if(a?.style){let R=a.style;R.fill?.bg&&i.setFill(`#${R.fill.bg}`),R.border&&i.setBorder(R.border)}i.setStyle(r,!1);let g=this._plugins.condition.getComputedCfStyle(e,t);return g&&g.bgColor&&i.setFill("#"+g.bgColor),i}_createForeInfo(e,t,r,i,a){let g=new MC(i);g.setFont(r.getFont());let R=!this.isPrint(),L=this.sheet.getCellTextDesc(e,t);L&&g.setTextDesc(L),R&&g.setNotifyByMeta({comment:this.sheet.getCellProperty(e,t,"comment")?.[0],note:this.sheet.getCellNote(e,t),synoInvalid:this.sheet.getCellProperty(e,t,"synoInvalid")});let W=this._plugins.condition.getComputedCfStyle(e,t);return g.setCfStyle(W),g.setAlignmentStyle(r.getAlignment()),R&&this._generateDropdown(g,e,t,a),this._fillByPivotMeta(g,e,t),g}_generateDropdown(e,t,r,i){let a=this.sheet.getCellProperty(t,r,"pivot");if(a){if(!this.isHistory()&&a.filterBtn!==Lh.None){let g=this.sheet.getWorkbook().isReadonly()||!this.sheet.getWorkbook().isPivotTableEnabled()||this.sheet.getWorkbook().getPivotTableManager().isIncompatibleTable(a.tableId);e.setDropdown(new $l(!1,a.filterBtn===Lh.Filtered,g))}return}if(this._filterInfo?.hasPadding(t,r))e.setBold(!0),e.setDropdownPadding($l.getPadding());else if(this._plugins.validation.isDropdownValidation(this.sheet.getCellProperty(t,r,"validId"))){let g=!!i.fill&&function(R){let L=parseInt(R,16);return 299*(L>>16&255)+587*(L>>8&255)+114*(255&L)<128e3}(i.fill.substr(1));e.setDropdown(new Bh(!1,g))}}_fillByPivotMeta(e,t,r){let i=this.sheet.getCellProperty(t,r,"pivot");if(i){if(i.indent>0&&e.setIndent(i.indent),i.foldBtn!==Od.None){let a=this.sheet.getWorkbook().isReadonly()||!this.sheet.getWorkbook().isPivotTableEnabled()||this.sheet.getWorkbook().getPivotTableManager().isIncompatibleTable(i.tableId);e.setFold({collapsed:i.foldBtn===Od.Unfold,disabled:a})}i.style&&e.setTableFont(i.style.font??null)}}_generateBound(e,t,r,i,a,g,R){let L=this._createBound(r,i,a,g),W=L,K=L;if(R!==null){let Q=a+this._calcWidth(t+1,R.endCol),oe=g+this._calcHeight(e+1,R.endRow);W=this._createBound(r,i,Q,oe);let se=Q+this._calcWidth(R.startCol,t-1),he=oe+this._calcHeight(R.startRow,e-1),me=W.x-(se-W.width),ye=W.y-(he-W.height);K=this._createBound(me,ye,se,he)}return{cellBound:W,textBound:K,borderBound:L}}_calcTextOverflow(){for(let e=0,t=this.rowIndices.length;e<t;e++){let r=this.rowIndices[e];for(let i=0,a=this.colIndices.length;i<a;i++){if(this.getMergedInfo(e,i))continue;let g=this._renderInfo[e][i];if(!g||g.foreInfo.dropdownPadding>0)continue;let R=this.colIndices[i];if(!g.foreInfo.text){Cr(this.sheet.getDataAtCell(r,R))&&(i===this._fixedColAmount&&this._findOutsideOverflow(e,i,g,!0),(i===a-1||i===this._fixedColAmount-1)&&this._findOutsideOverflow(e,i,g,!1));continue}let L=this.sheet.getCellTextDesc(r,R)?.t,W=$p(g.foreInfo);if((L===My.NUM||L===My.BOOL||W>0)&&g.cellBound.width<W+8+1+g.foreInfo.text.getWidth()&&g.foreInfo.setHalign("left"),this.sheet.getComputedCellStyle(r,R).getAlignment().wrap)continue;let K=qC.getOverflowWidth(g.cellBound.width,g.foreInfo.text,g.foreInfo.halign,W);K.left<=0&&K.right<=0||(g.textClipBound=dh(g.clipBound||g.cellBound),this._calcTextClipBound(g.textClipBound,e,i,K.left,K.right))}}}_calcTextClipBound(e,t,r,i,a){let g=(he,me)=>{if(this.getMergedInfo(he,me))return!1;let ye=this.rowIndices[he],Te=this.colIndices[me];if(!Cr(this.sheet.getDataAtCell(ye,Te))||this.sheet.getSpillRange(ye,Te))return!1;let Me=this._renderInfo[he][me];return!Me||!(Me.foreInfo.dropdownPadding>0)&&!Me.foreInfo.fold},R=r-1,L=r>=this._fixedColAmount?this._fixedColAmount:0,W=this.sheet.isRtl(),K=W?a:i,Q=W?i:a;for(;K>0&&R>=L&&g(t,R);){let he=this._colHeaderBound[R].clipBound.width,me=this._renderInfo[t][R+1];me.backInfo.setLeftBorder(null),(me=this._renderInfo[t][R]).backInfo.setRightBorder(me.backInfo.fill),e.x-=he,e.width+=he,K-=he,R-=1}let oe=r+1,se=r<this._fixedColAmount?this._fixedColAmount-1:this.colIndices.length-1;for(;Q>0&&oe<=se&&g(t,oe);){let he=this._colHeaderBound[oe].clipBound.width,me=this._renderInfo[t][oe];me.backInfo.setLeftBorder(null),(me=this._renderInfo[t][oe-1]).backInfo.setRightBorder(me.backInfo.fill),e.width+=he,Q-=he,oe+=1}}_findOutsideOverflow(e,t,r,i){let a=this.rowIndices[e],g=this.colIndices[t],R=i?-1:1,L=i?-1:this.sheet.countCols(),W=0,K=g+R,Q=!this.sheet.isRtl()===i,oe=Q?"left":"right";for(;K!==L;){if(this.sheet.isHiddenCol(K)){K+=R;continue}if(!this.isHistory()&&this._plugins.filter.hasDropdown(a,K)||this._plugins.validation.isDropdownValidation(this.sheet.getCellProperty(a,K,"validId"))||this._plugins.merge.getMergedRange(a,K))return;let se=this.sheet.getDataAtCell(a,K),he=this.sheet.getColWidth(K);if(Cr(se)){W+=he,K+=R;continue}let me=this.sheet.getCellTextDesc(a,K),ye=me?.v;if(!ye)return;let Te=this.sheet.getComputedCellStyle(a,K),Me=Te.getAlignment(),Oe=this.sheet.ensureCellDirection(a,K),ze=Me.halign||(Oe==="rtl"?"right":"left");if(ze!==oe&&ze!=="center"||Me.wrap)return;let We=this._plugins.condition.getComputedCfStyle(a,K),qe=zC(Zr(se)?se:ye,{font:Te.getFont(),forceBold:We?.bold,forceItalic:We?.italic},Oe),Ke=$p(this.sheet.getCellProperty(a,K,"pivot")),at=qC.getOverflowWidth(he,qe,ze,Ke)[Q?"right":"left"];if((at-=W)<0)return;let gt=new MC(qe);gt.setFont(Te.getFont()),gt.setTextDesc(me),gt.setNotify(r.foreInfo&&r.foreInfo.notify),gt.setCfStyle(We),gt.setAlignmentStyle(Me),this._overrideForeInfo(gt,qe,r.cellBound),this._fillByPivotMeta(gt,a,K),r.foreInfo=gt;let pt=dh(r.textBound);pt.x=i?pt.x-W-he:pt.x+W+pt.width,pt.width=he,r.textBound=pt,r.textClipBound=dh(r.clipBound||r.cellBound),Q?this._calcTextClipBound(r.textClipBound,e,t,0,at-r.cellBound.width):this._calcTextClipBound(r.textClipBound,e,t,at-r.cellBound.width,0);return}}getBottomOffset(){if(this._rowHeaderBound.length===0)return this._startY;let e=this._rowHeaderBound[this._rowHeaderBound.length-1].cellBound;return e.y+e.height}getRightOffset(){if(this._colHeaderBound.length===0)return this._startX;let e=this._colHeaderBound[this._colHeaderBound.length-1].cellBound;return e.x+e.width}getRenderInfo(e,t){let r=Xs(this.rowIndices,e);if(r>=this.rowIndices.length)return null;let i=Xs(this.colIndices,t);return i>=this.colIndices.length?null:this._renderInfo[r][i]}_getRenderIndex(e,t){let r=e==="row"?this.rowIndices:this.colIndices,i=Xs(r,t);return i>=r.length||r[i]!==t?-1:i}getGroupInfo(e,t){if(t===-1)return e==="row"?this._firstRowGroupInfo:this._firstColGroupInfo;let r=this._getRenderIndex(e,t);return r===-1?null:(e==="row"?this._rowGroupInfo[r]:this._colGroupInfo[r])??null}getHeaderBound(e,t){if(t===-1){let i=this._rowHeaderBound[0].cellBound,a=this._colHeaderBound[0].cellBound;return{x:i.x,y:a.y,width:i.width,height:a.height}}let r=this._getRenderIndex(e,t);return r===-1?null:(e==="row"?this._rowHeaderBound[r]:this._colHeaderBound[r])?.clipBound??null}getClipBound(e,t){let r=this.getRenderInfo(e,t);return r?r.clipBound||r.cellBound:null}static getOverflowWidth(e,t,r,i){let a=Math.max(0,t.getWidth()+i-e+8),g=0,R=0;switch(r){case"right":g=a;break;case"center":g=R=a/2;break;default:R=a}return{left:g,right:R}}}let Fy=qC;class ure{constructor(e){this.view=e;let t=document.createDocumentFragment(),r=ie(t,"scroller scroller-y"),i=ie(t,"scroller scroller-x"),a=ie(r,"scroller-track scroller-track-y"),g=ie(i,"scroller-track scroller-track-x"),R=ie(i,"scroller-corner"),L=ie(a,"scroller-thumb scroller-thumb-y"),W=ie(g,"scroller-thumb scroller-thumb-x");if(rt()){let K="invisible";i.classList.add(K),r.classList.add(K)}e.rootElement.appendChild(t),this.containerY=r,this.containerX=i,this.corner=R,this.trackX=g,this.trackY=a,this.thumbX=W,this.thumbY=L,this.minLength=45,this.setupEventListeners(),this.borderSize=+!rt()}setupEventListeners(){this.trackX.addEventListener("mousedown",e=>this.onTrackPointerDown(e,"x")),this.trackY.addEventListener("mousedown",e=>this.onTrackPointerDown(e,"y")),this.trackX.addEventListener("touchstart",e=>this.onTrackPointerDown(e,"x")),this.trackY.addEventListener("touchstart",e=>this.onTrackPointerDown(e,"y")),this.thumbX.addEventListener("mousedown",e=>this.onThumbPointerDown(e,"x")),this.thumbY.addEventListener("mousedown",e=>this.onThumbPointerDown(e,"y")),this.thumbX.addEventListener("touchstart",e=>this.onThumbPointerDown(e,"x")),this.thumbY.addEventListener("touchstart",e=>this.onThumbPointerDown(e,"y")),this.containerY.addEventListener("mousedown",e=>this.onContainerPointerDown(e)),this.containerX.addEventListener("mousedown",e=>this.onContainerPointerDown(e)),this.containerY.addEventListener("touchstart",e=>this.onContainerPointerDown(e)),this.containerX.addEventListener("touchstart",e=>this.onContainerPointerDown(e)),this.containerY.addEventListener("contextmenu",e=>this.onContextMenu(e)),this.containerX.addEventListener("contextmenu",e=>this.onContextMenu(e)),this.getScroller().on("update",()=>this.updateScroller())}updateRtl(e){for(let t of[this.corner,this.trackX,this.containerY])t.classList.toggle("rtl",e);this.updateScroller()}getScroller(){return this.view.viewport.getScroller()}getTrackWidth(){return this.getScroller().getClientWidth()}getTrackHeight(){return this.getScroller().getClientHeight()}updateScroller(){let e=this.getScroller(),t=e.getScrollTop(),r=e.getScrollLeft(),i=e.getFrozenWidth(),a=e.getFrozenHeight(),g=e.getClientHeight(),R=e.getClientWidth(),L=e.getScrollHeight(),W=e.getScrollWidth(),K=this.thumbY.style,Q=L>g;if(Q){let he=this.trackY.style,me=this.getTrackHeight();he.top=zp(a-this.borderSize),he.height=zp(me);let ye=Math.max(me*g/L,this.minLength),Te=(me-ye)*t/(L-g);K.height=zp(ye),K.top=zp(Te)}K.display=Q?"":"none";let oe=this.thumbX.style,se=W>R;if(se){let he=this.trackX.style,me=this.getTrackWidth();this.view.setViewPosition(this.trackX,0,i-this.borderSize),he.width=zp(me);let ye=Math.max(me*R/W,this.minLength),Te=(me-ye)*r/(W-R);oe.width=zp(ye),this.view.setViewPosition(this.thumbX,0,Te)}oe.display=se?"":"none",rt()&&this.fadeOut()}fadeOut(){let e="fade";this.thumbX.classList.remove(e),this.thumbY.classList.remove(e),setTimeout(()=>{this.thumbX.classList.add(e),this.thumbY.classList.add(e)},1e3)}onThumbPointerDown(e,t){if(e instanceof MouseEvent&&Da(e)){e.stopPropagation(),e.preventDefault();return}e.stopPropagation();let r=YC(e),i=LA(e),a=this.getScroller(),g=a.getScrollTop(),R=a.getScrollLeft(),L=a.getScrollHeight(),W=a.getScrollWidth(),K=a.getClientHeight(),Q=a.getClientWidth(),oe=this.getTrackHeight(),se=this.getTrackWidth(),he=Te=>{Te.preventDefault(),window.requestAnimationFrame(()=>{if(t==="y"){let Me=this.thumbY.offsetHeight,Oe=LA(Te)-i;a.setScrollTop(g+(L-K)/(oe-Me)*Oe)}else if(t==="x"){let Me=this.thumbX.offsetWidth,Oe=YC(Te)-r;a.setScrollLeft(this.view.reverseIfRtl(R+(W-Q)/(se-Me)*Oe))}})},me=t==="y"?this.thumbY:this.thumbX,ye=Te=>{document.removeEventListener("mousemove",he),document.removeEventListener("mouseup",ye),me.removeEventListener("touchmove",he),me.removeEventListener("touchend",ye),me.removeEventListener("touchcancel",ye)};document.addEventListener("mousemove",he),document.addEventListener("mouseup",ye,{once:!0}),me.addEventListener("touchmove",he,{passive:!1}),me.addEventListener("touchend",ye,{once:!0}),me.addEventListener("touchcancel",ye,{once:!0})}onTrackPointerDown(e,t){if(e instanceof MouseEvent&&Da(e)){e.stopPropagation(),e.preventDefault();return}let r=e.target?.getBoundingClientRect();if(!r||rt())return;e.stopPropagation();let i=this.getScroller();if(t==="y"){let a=this.thumbY.offsetHeight,g=LA(e)-r.top-a/2;i.setScrollTop(g*i.getScrollHeight()/i.getClientHeight())}else if(t==="x"){let a=this.thumbX.offsetWidth,g=(this.view.isRtl()?r.right-YC(e):YC(e)-r.left)-a/2;i.setScrollLeft(g*i.getScrollWidth()/i.getClientWidth())}}onContainerPointerDown(e){e.preventDefault(),e.stopPropagation()}onContextMenu(e){e.preventDefault(),e.stopPropagation()}}function YC(n){return n instanceof MouseEvent?n.pageX:n.targetTouches?.[0]?.pageX}function LA(n){return n instanceof MouseEvent?n.pageY:n.targetTouches?.[0]?.pageY}function zp(n){return Math.ceil(n)+"px"}var ji=function(n){return n[n.WholeTable=0]="WholeTable",n[n.HeaderRow=1]="HeaderRow",n[n.TotalRow=2]="TotalRow",n[n.FirstColumn=3]="FirstColumn",n[n.LastColumn=4]="LastColumn",n[n.FirstRowStripe=5]="FirstRowStripe",n[n.SecondRowStripe=6]="SecondRowStripe",n[n.FirstColumnStripe=7]="FirstColumnStripe",n[n.SecondColumnStripe=8]="SecondColumnStripe",n[n.FirstHeaderCell=9]="FirstHeaderCell",n[n.LastHeaderCell=10]="LastHeaderCell",n[n.FirstTotalCell=11]="FirstTotalCell",n[n.LastTotalCell=12]="LastTotalCell",n[n.FirstSubtotalColumn=13]="FirstSubtotalColumn",n[n.SecondSubtotalColumn=14]="SecondSubtotalColumn",n[n.ThirdSubtotalColumn=15]="ThirdSubtotalColumn",n[n.FirstSubtotalRow=16]="FirstSubtotalRow",n[n.SecondSubtotalRow=17]="SecondSubtotalRow",n[n.ThirdSubtotalRow=18]="ThirdSubtotalRow",n[n.BlankRow=19]="BlankRow",n[n.FirstColumnSubheading=20]="FirstColumnSubheading",n[n.SecondColumnSubheading=21]="SecondColumnSubheading",n[n.ThirdColumnSubheading=22]="ThirdColumnSubheading",n[n.FirstRowSubheading=23]="FirstRowSubheading",n[n.SecondRowSubheading=24]="SecondRowSubheading",n[n.ThirdRowSubheading=25]="ThirdRowSubheading",n[n.PageFieldLabels=26]="PageFieldLabels",n[n.PageFieldValues=27]="PageFieldValues",n}({});class hre{constructor(e,t,r,i,a,g=Wp){this.rowHeaderWidth=e,this.colHeaderHeight=i,this.height=t+i,this.grandRowCount=a,this.rowSubtotal=[],this.tableStyle=g}addRowSubtotal(e,t,r){this.rowSubtotal[e-this.colHeaderHeight]={col:t,level:r}}createStyle(e,t,r){let i;r===void 0&&(r=0),t<this.rowHeaderWidth&&(i=this.mergeStyleJSON(i??{},this.tableStyle[ji.FirstColumn])),e<this.colHeaderHeight&&(i=this.mergeStyleJSON(i??{},this.tableStyle[ji.HeaderRow])),e<this.colHeaderHeight&&t<this.rowHeaderWidth&&(i=this.mergeStyleJSON(i??{},this.tableStyle[ji.FirstHeaderCell]));let a=this.rowSubtotal[e-this.colHeaderHeight],g=a&&a.col<=t?a.level:0;if(g>0&&(i=g===1?this.mergeStyleJSON(i??{},this.tableStyle[ji.FirstSubtotalRow]):g%2==0?this.mergeStyleJSON(i??{},this.tableStyle[ji.SecondSubtotalRow]):this.mergeStyleJSON(i??{},this.tableStyle[ji.ThirdSubtotalRow])),r>0&&(i=r===1?this.mergeStyleJSON(i??{},this.tableStyle[ji.FirstColumnSubheading]):r%2==0?this.mergeStyleJSON(i??{},this.tableStyle[ji.SecondColumnSubheading]):this.mergeStyleJSON(i??{},this.tableStyle[ji.ThirdColumnSubheading])),e>=this.height-this.grandRowCount){let R={firstRow:e===this.height-this.grandRowCount};i=this.mergeStyleJSON(i??{},this.tableStyle[ji.TotalRow],R)}return i}mergeStyleJSON(e,t,r){if(r===void 0&&(r={}),t?.font&&(e.font={...e.font,...t.font}),t?.fill&&(e.fill={...e.fill,...t.fill}),t?.border?.b){let i=t.border.b.slice();r.firstRow||(i[0]=null),e.border=e.border?.b?{b:El(e.border.b,i)}:{b:i}}return e}}let KC={bg:"DDDDDD"},FA={font:{color:"FFFFFF"},fill:{bg:"82B0BE"}},Wp={[ji.PageFieldLabels]:{fill:{bg:"E3F3F6"}},[ji.PageFieldValues]:{fill:{bg:"F2F2F2"}},[ji.FirstColumn]:{fill:{bg:"F2F2F2"}},[ji.HeaderRow]:{fill:{bg:"E3F3F6"}},[ji.FirstHeaderCell]:{fill:{bg:"E3F3F6"}},[ji.FirstSubtotalRow]:{fill:KC},[ji.SecondSubtotalRow]:{fill:KC},[ji.ThirdSubtotalRow]:{fill:KC},[ji.FirstColumnSubheading]:FA,[ji.SecondColumnSubheading]:FA,[ji.ThirdColumnSubheading]:FA,[ji.TotalRow]:{font:{bold:!0},fill:KC,border:{b:["#000000",null,null,null]}}};function AV(n,e){let t=n.cfStyle,r=n.tableFont,i=e.getFont()??n.font;return{bold:i.bold||t?.bold||n.bold||r?.bold||!1,italic:i.italic||t?.italic||!1,size:i.size||Oa.FONT_SIZE,name:i.name?i.name:Oa.FONT_NAME,color:`#${t?.color||n.fontColor||i.color||r?.color||Oa.FONT_COLOR}`,strike:i.strike||t?.strike||!1,underline:i.underline||t?.underline||n.underline||!1}}class Up{constructor(e,t={}){this.canvas=e,this.ctx=e.getContext("2d"),this.scale=t?.scale??1,this.rtl=t?.rtl??!1,this.rtl?this.ctx.transform(-1*this.scale,0,0,this.scale,this.canvas.width,0):this.scale!==1&&this.ctx.scale(this.scale,this.scale)}withRtlRectTransform(e,t,r){if(!this.rtl)return void r();this.ctx.save(),this.ctx.transform(-1,0,0,1,e+t+e,0),r(),this.ctx.restore()}drawCanvasBackground(e){this.ctx.save(),this.ctx.fillStyle=e,this.scale!==1&&this.ctx.scale(1/this.scale,1/this.scale),this.ctx.fillRect(0,0,this.canvas.width,this.canvas.height),this.ctx.restore()}clear(){this.ctx.save(),this.scale!==1&&this.ctx.scale(1/this.scale,1/this.scale),this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.ctx.restore()}_clipBound(e){let{x:t,y:r,width:i,height:a}=e;this.ctx.beginPath(),this.ctx.rect(t,r,i,a),this.ctx.clip()}drawCellBackground(e,t){this.ctx.save();let{x:r,y:i,width:a,height:g}=t;this.ctx.fillStyle=e.fill,this.ctx.fillRect(r,i,a,g),this.ctx.restore()}drawCellBorder(e,t,r){this.ctx.save();let{x:i,y:a,width:g,height:R}=t;r&&this._clipBound({x:r.x-1,y:r.y-1,width:r.width+1,height:r.height+1}),e.borderTopColor&&this.drawAxisLine(i,a,i+g,a,e.borderTopColor),e.borderLeftColor&&this.drawAxisLine(i,a,i,a+R,e.borderLeftColor),e.borderRightColor&&this.drawAxisLine(i+g,a,i+g,a+R,e.borderRightColor),e.borderBottomColor&&this.drawAxisLine(i,a+R,i+g,a+R,e.borderBottomColor),this.ctx.restore()}drawCellForeground(e,t,r,i,a){this.drawCellText(e,a||t,r),e.notify&&this.drawCellNotify(t.x+t.width,t.y,e.notify,a||t),e.dropdown&&this.drawDropdown(t,r,e.dropdown,i,a),e.fold&&this.drawPivotFold(e,r,i,a||t)}drawCellText(e,t,r){if(!e.text)return;this.ctx.save();let i=e.dropdownPadding,a=$p(e);this.ctx.beginPath(),this._clipBound({...t,width:t.width-i});let{x:g,y:R,width:L,height:W}=r;g+=a,L-=i+a,this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",this.withRtlRectTransform(g,L,()=>{let K;switch(e.valign){case"top":K=R+2;break;case"bottom":K=R+W-1-2-e.text.getHeight();break;default:K=R+Math.round((W-e.text.getHeight())/2)}for(let Q of e.text){let oe;switch(e.halign){case"right":oe=g+L-1-4-Q.getWidth();break;case"center":oe=g+Math.round((L-Q.getWidth())/2);break;default:oe=g+4}this._drawTextLine(oe,K,Q,e),K+=Q.getLineHeight()}}),this.ctx.restore()}_getTextFragmentsWithDir(e,t){let r=[],i=[],a=t==="rtl";for(let g of e)g.getRtl()!==a?i.push(g):(i.length&&(r.push(...i.reverse()),i.length=0),r.push(g));return r.push(...i.reverse()),a?r.reverse():r}_drawTextLine(e,t,r,i){let a=t+r.getBaselineOffset(),g=i.text.getDirection();for(let R of this._getTextFragmentsWithDir(r,g)){let L=R.getWidth(),W=AV(i,R);if(this.ctx.fillStyle=W.color,this.ctx.font=Ny(W),this.ctx.direction=g,this.ctx.fillText(R.getText(),e,a),W.strike){let K=a-Math.round(.2*r.getLineHeight());this.drawDecoration(K,e,e+L,W.color,W.size)}if(W.underline){let K=a+Math.max(1,Math.round(.1*r.getLineHeight()));this.drawDecoration(K,e,e+L,W.color,W.size)}e+=L}}drawDecoration(e,t,r,i,a){let g=Math.max(1,Math.round(4*a/45));this.drawHorizontalLine(e-g/2,t,r,i,g)}drawHeaderText(e,t,r,i){this.withRtlRectTransform(t.x,t.width,()=>{this.ctx.save(),this._clipBound(r),this.ctx.textAlign="center",this.ctx.textBaseline="middle",this.ctx.fillStyle=i,this.ctx.font="12px Roboto",this.ctx.fillText(e,t.x+t.width/2,t.y+t.height/2),this.ctx.restore()})}drawCellNotify(e,t,r,i){this.ctx.save(),i&&this._clipBound(i),this.ctx.fillStyle=r,this.ctx.beginPath(),this.ctx.moveTo(e-6,t),this.ctx.lineTo(e,t),this.ctx.lineTo(e,t+6),this.ctx.closePath(),this.ctx.fill(),this.ctx.restore()}drawDropdown(e,t,r,i,a){r&&(r.constructor===$l?this.drawFilterDropdown(e,t,r,i,a):r.constructor===Bh&&this.drawValidationDropdown(e,t,r,i,a))}drawFilterDropdown(e,t,r,i,a){this.ctx.save(),a&&this._clipBound(a);let{x:g,y:R,width:L,height:W}=fA(e);this._drawRoundRect(g-.5,R-.5,L+1,W+1,2),this.ctx.fillStyle=i,this.ctx.fill(),r.disabled&&(this.ctx.globalAlpha=.4),this.ctx.fillStyle=r.getBgColor(),this.ctx.fill(),r.isActive()?(this.ctx.beginPath(),this.ctx.moveTo(g+2,R+2),this.ctx.lineTo(g+11,R+2),this.ctx.lineTo(g+11,R+3.68),this.ctx.lineTo(g+7.14,R+7.54),this.ctx.lineTo(g+7.14,R+10.36),this.ctx.lineTo(g+6.5,R+11),this.ctx.lineTo(g+5.86,R+11),this.ctx.lineTo(g+5.86,R+7.54),this.ctx.lineTo(g+2,R+3.68),this.ctx.lineTo(g+2,R+2),this.ctx.closePath(),this.ctx.fillStyle=r.getColor(),this.ctx.fill()):(this.drawHorizontalLine(R+3.5,g+2,g+11,r.getColor()),this.drawHorizontalLine(R+6.5,g+3,g+10,r.getColor()),this.drawHorizontalLine(R+9.5,g+4,g+9,r.getColor())),this.ctx.restore()}drawValidationDropdown(e,t,r,i,a){this.ctx.save(),a&&this._clipBound(a);let g=e.x+e.width-1-r.getPadding()+4,R=t.y+t.height/2;R>e.y&&(this.ctx.beginPath(),this.ctx.moveTo(g,R),this.ctx.lineTo(g+6,R),this.ctx.lineTo(g+3,R+3),this.ctx.lineTo(g,R),this.ctx.closePath(),this.ctx.fillStyle=i,this.ctx.fill(),this.ctx.fillStyle=r.getColor(),this.ctx.fill()),this.ctx.restore()}drawUpArrowSpreader(e,t,r){let i=e.x+3,a=e.y+e.height-4;this._drawArrowSpreader(e.x,e.y+e.height-10,[{x:i,y:a},{x:i+3,y:a-3},{x:i+6,y:a}],t,r)}drawDownArrowSpreader(e,t,r){let i=e.x+3,a=e.y+4;this._drawArrowSpreader(e.x,e.y,[{x:i,y:a},{x:i+3,y:a+3},{x:i+6,y:a}],t,r)}drawLeftArrowSpreader(e,t,r){let i=e.x+e.width-4,a=e.y+3;this._drawArrowSpreader(e.x+e.width-10,e.y,[{x:i,y:a},{x:i-3,y:a+3},{x:i,y:a+6}],t,r)}drawRightArrowSpreader(e,t,r){let i=e.x+4,a=e.y+3;this._drawArrowSpreader(e.x,e.y,[{x:i,y:a},{x:i+3,y:a+3},{x:i,y:a+6}],t,r)}_drawArrowSpreader(e,t,r,i,a){this.ctx.save(),i&&this._clipBound(i),a&&(this.ctx.fillStyle="#F6F8FA",this.ctx.fillRect(e,t,10,10),this.ctx.strokeStyle="#D8DADC",this.ctx.strokeRect(e,t,10,10)),this.ctx.beginPath(),this.ctx.moveTo(r[0].x,r[0].y),this.ctx.lineTo(r[1].x,r[1].y),this.ctx.lineTo(r[2].x,r[2].y),this.ctx.closePath(),this.ctx.fillStyle=a?"#2DB37B":"#56585A",this.ctx.fill(),this.ctx.restore()}drawGroupInfoArray(e,t,r,i){this.ctx.save(),i&&this._clipBound(i);let a="#BABCBE",g=e==="row"?r.y:r.x,R=e==="row"?r.y+r.height:r.x+r.width,L=Math.floor((g+R)/2);for(let W=1;W<=t.length;W++){let{isFirst:K,isLast:Q,icon:oe}=t[W-1],se=23*W-8,he=g,me=R;if(oe){if(this._drawGroupIcon(e==="row"?se:L,e==="row"?L:se,oe.isCollapse),oe.isCollapse)continue;he=L+WC}else(K||Q)&&(e==="row"?this.drawHorizontalLine(L,se,se+WC,a):this.drawVerticalLine(L,se,se+WC,a),Q&&(me=L));e==="row"?this.drawVerticalLine(se,he,me,a):this.drawHorizontalLine(se,he,me,a)}this.ctx.restore()}drawPivotFold(e,t,r,i){var a,g;if(!e.fold)return;this.ctx.save();let{x:R,y:L}=kV(t,e.indent,e.valign,e.text?.getHeight()??13);i&&this._clipBound(i);let W=(a=e.fold.collapsed,g=e.fold.hover,a?g?"rgba(86, 88, 90)":"rgba(86, 88, 90, 0.85)":g?S6:"rgba(255, 255, 255, 0.85)");this._drawGroupIcon(R,L,e.fold.collapsed,e.fold.disabled,13,W,r),this.ctx.restore()}_drawGroupIcon(e,t,r,i,a,g,R){i===void 0&&(i=!1),a===void 0&&(a=15),g===void 0&&(g=r?"#56585A":"#FFFFFF");let L=Math.floor(a/2);this.ctx.save(),this._drawRoundRect(e-L,t-L,a,a,2),R&&(this.ctx.fillStyle=R,this.ctx.fill()),i&&(this.ctx.globalAlpha=.4),this.ctx.fillStyle=g,this.ctx.fill(),this.ctx.lineCap="round",this.drawHorizontalLine(t+.5,e-3,e+4,`#${r?"FFFFFF":"56585A"}`),r&&this.drawVerticalLine(e+.5,t-3,t+4,"#FFFFFF"),this.ctx.restore()}drawPivotTable(e,t,r,i,a,g,R){let L={x:e.x+t.width,y:e.y+t.height};if(this.ctx.save(),g&&this._clipBound(g),this.ctx.fillStyle=`#${Wp[ji.HeaderRow]?.fill?.bg??"FFFFFF"}`,this.ctx.fillRect(e.x,e.y,t.width,t.height),this.ctx.fillStyle=`#${Wp[ji.FirstColumn]?.fill?.bg??"FFFFFF"}`,this.ctx.fillRect(e.x,L.y,t.width,r.height-1),this.ctx.fillStyle=`#${Wp[ji.FirstColumnSubheading]?.fill?.bg??"FFFFFF"}`,this.ctx.fillRect(L.x,e.y,r.width-1,t.height-1),this.ctx.fillStyle="#FFFFFF",this.ctx.fillRect(L.x,L.y,r.width-1,r.height-1),R){this.drawCellText(R.row,g,{x:e.x,y:L.y,width:t.width,height:r.height}),this.drawCellText(R.col,g,{x:L.x,y:e.y,width:r.width,height:t.height}),this.drawCellText(R.value,g,{x:L.x,y:L.y,width:r.width,height:r.height});let W={x:L.x+i.x,y:L.y+i.y,...a};this._drawBoxShadow(W,0,4,16,"rgba(0, 0, 0, 0.25)"),this.drawCellText(R.message,function(K,Q){let oe=Math.max(K.x,Q.x),se=Math.max(K.y,Q.y);return{x:oe,y:se,width:Math.max(0,Math.min(K.x+K.width,Q.x+Q.width)-oe),height:Math.max(0,Math.min(K.y+K.height,Q.y+Q.height)-se)}}(g,W),W)}this.ctx.restore()}_drawRoundRect(e,t,r,i,a){a===void 0&&(a=0),this.ctx.beginPath(),this.ctx.moveTo(e+a,t),this.ctx.lineTo(e+r-a,t),this.ctx.quadraticCurveTo(e+r,t,e+r,t+a),this.ctx.lineTo(e+r,t+i-a),this.ctx.quadraticCurveTo(e+r,t+i,e+r-a,t+i),this.ctx.lineTo(e+a,t+i),this.ctx.quadraticCurveTo(e,t+i,e,t+i-a),this.ctx.lineTo(e,t+a),this.ctx.quadraticCurveTo(e,t,e+a,t),this.ctx.closePath()}drawAxisLine(e,t,r,i,a){e===r&&(e-=.5,r-=.5),t===i&&(t-=.5,i-=.5),this.ctx.save(),this._drawLine(e,t,r,i,a),this.ctx.restore()}drawHorizontalLine(e,t,r,i,a){a===void 0&&(a=1),this.ctx.save(),this.ctx.lineWidth=a,this._drawLine(t,e,r,e,i),this.ctx.restore()}drawVerticalLine(e,t,r,i,a){a===void 0&&(a=1),this.ctx.save(),this.ctx.lineWidth=a,this._drawLine(e,t,e,r,i),this.ctx.restore()}_drawLine(e,t,r,i,a){this.ctx.strokeStyle=a,this.ctx.beginPath(),this.ctx.moveTo(e,t),this.ctx.lineTo(r,i),this.ctx.stroke()}_drawBoxShadow(e,t,r,i,a){this.ctx.save(),this.ctx.shadowOffsetX=t,this.ctx.shadowOffsetY=r,this.ctx.shadowBlur=i,this.ctx.shadowColor=a,this.ctx.fillRect(e.x,e.y,e.width,e.height),this.ctx.restore()}}let XC="syno-o-sh-view-corner-container",JC="syno-o-sh-view-corner-scrollable",cre=class{constructor(n,e){var t,r;let i=document.createDocumentFragment();this.canvas=document.createElement("canvas"),t=this.canvas,A(t,"syno-o-sh-view-canvas"),i.appendChild(this.canvas),this.topLayer=document.createElement("canvas"),r=this.topLayer,A(r,"syno-o-sh-view-canvas"),i.appendChild(this.topLayer),this._blockTopLeft=ie(i,XC+" top left"),this._blockTopRight=ie(i,XC+" top right"),this._blockBottomLeft=ie(i,XC+" bottom left"),this._blockBottomRight=ie(i,XC+" bottom right"),this.scrollableTopLeft=ie(this._blockTopLeft,JC),this.scrollableTopRight=ie(this._blockTopRight,JC),this.scrollableBottomLeft=ie(this._blockBottomLeft,JC),this.scrollableBottomRight=ie(this._blockBottomRight,JC),this.footer=ie(i,"syno-o-sh-view-footer"),n.appendChild(i),this.viewport=new ore(n,60),this.pluginElements={},this.rootElement=n,this._hot=e,this._renderer=null,this._canvasBound=null,this._freezeSize={freezeWidth:0,freezeHeight:0},this._scaleRatio=1,this._rtl=!1,this._bottomOversizeRow=-1,this.scrollerView=new ure(this),this.adjustCanvasSize()}destroy(){this.viewport.destroy(),Ao(this.pluginElements,n=>{n._destructor&&n._destructor()})}fullRender(n,e,t){let{ranges:r,rowIndices:i,colIndices:a,fixedRowIndex:g,fixedColIndex:R,bottomRightOffsetX:L,bottomRightOffsetY:W}=this.prepareRenderRanges(n),K=n.getWorkbook().getCurrentSheet(),Q=K.isRtl();this.updateRtl(Q);let oe=this.viewport.getScrollTop(),se=this.getViewHeight(),he={scaleRatio:this._scaleRatio*this.viewport.getZoomLevel(),includeHeader:!0,mode:K.getWorkbook().isHistoryMode()?"history":"normal",fixedRowIndex:g,fixedColIndex:R,isFilterView:K.getFilterPlugin().isInViewState(),bottomRightOffsetX:L,bottomRightOffsetY:W};n.calcRenderRanges(K.sheetId,r),this.canvas.getContext("2d").resetTransform(),this.topLayer.getContext("2d").resetTransform();let me={scale:he.scaleRatio,rtl:Q};this._renderer=new Fy({drawer:new Up(this.canvas,me),topDrawer:new Up(this.topLayer,me)},K,i,a,he,t);let ye=this._renderer.measureGrid();n.setRenderHeights(K.sheetId,ye),this.viewport.updateRowOffset(K);let Te=this.viewport.getRowByOffset(oe+se);for(;i.length>0;){if(i[i.length-1]<=Te){this._renderer.trimRow(i.length);break}i.length-=1}this._renderer.generateRenderInfo(),this._renderer.drawAll(e),this.adjustCornerContainerSize(K),this._adjustFooter(),this._markBottomOverSize(K),this._hot.runHooks("afterRender")}prepareRenderRanges(n){let e=n.getWorkbook().getCurrentSheet(),t=this.viewport.getScrollTop(),r=this.viewport.getScrollLeft(),i=this.getViewWidth(),a=this.getViewHeight();this.viewport.updateSheet(e);let[g,R,L]=this._calcRowInfos(e,t,a),[W,K,Q]=this._calcColInfos(e,r,i),oe=new sn(g[(R===!1?-1:R)+1],W[(K===!1?-1:K)+1],pl(g),pl(W)),se=[oe];return R!==!1&&K!==!1&&se.push(new sn(0,0,g[R],W[K])),R!==!1&&se.push(new sn(0,oe.from.col,g[R],oe.to.col)),K!==!1&&se.push(new sn(oe.from.row,0,oe.to.row,W[K])),{ranges:se,rowIndices:g,colIndices:W,fixedRowIndex:R,fixedColIndex:K,bottomRightOffsetX:Q,bottomRightOffsetY:L}}updateRtl(n){if(n!==this._rtl){for(let e of(this._rtl=n,[this.canvas,this.topLayer,this._blockTopLeft,this._blockTopRight,this._blockBottomLeft,this._blockBottomRight]))e.classList.toggle("rtl",n);this.updateCanvasBound(),this.scrollerView.updateRtl(n),this._hot.runHooks("afterUpdateRtl")}}isRtl(){return this._rtl}reverseIfRtl(n){return this._rtl?-n:n}setViewPosition(n,e,t){n.style.top=`${e}px`,n.style.left=this._rtl?"":`${t}px`,n.style.right=this._rtl?`${t}px`:""}rerenderHeader(n){this._renderer&&this._renderer.drawHeader(n)}rerenderFilterDropdown(n,e,t){this._renderer&&this._renderer.redrawFilterDropdown(n,e,t)}rerenderValidationDropdown(n,e,t){this._renderer&&this._renderer.redrawValidationDropdown(n,e,t)}rerenderRowSpreader(n,e,t){this._renderer&&this._renderer.redrawRowSpreader(n,e,t)}rerenderColSpreader(n,e,t){this._renderer&&this._renderer.redrawColSpreader(n,e,t)}rerenderPivotFold(n,e,t){this._renderer&&this._renderer.reDrawPivotFold(n,e,t)}_calcRowInfos(n,e,t){let r=[],i=n.getFreezePlugin().fixedRowsTop,a=Math.min(this.viewport.getRowByOffset(t),i-1);for(let K=0;K<=a;K++)n.isHiddenRow(K)||r.push(K);let g=i>0&&r.length-1;if(i>=n.countRows())return[r,g,0];let R=this.viewport.getRowOffset(a+1);if(R>=t)return[r,!1,0];let L=this.viewport.getRowByOffset(e+R),W=this.viewport.getRowByOffset(e+t);for(let K=L;K<=W;K++)n.isHiddenRow(K)||r.push(K);return[r,g,(this.viewport.getRowOffset(L)-e-R)/this.viewport.getZoomLevel()]}_calcColInfos(n,e,t){let r=[],i=n.getFreezePlugin().fixedColumnsLeft,a=Math.min(this.viewport.getColByOffset(t),i-1);for(let K=0;K<=a;K++)n.isHiddenCol(K)||r.push(K);let g=i>0&&r.length-1;if(i>=n.countCols())return[r,g,0];let R=this.viewport.getColOffset(a+1);if(R>=t)return[r,!1,0];let L=this.viewport.getColByOffset(e+R),W=this.viewport.getColByOffset(e+t);for(let K=L;K<=W;K++)n.isHiddenCol(K)||r.push(K);return[r,g,(this.viewport.getColOffset(L)-e-R)/this.viewport.getZoomLevel()]}updateCanvasBound(){let n=this.canvas.getBoundingClientRect();this._canvasBound={x:n.left,y:n.top,width:n.width,height:n.height}}adjustCanvasSize(){this._updateScaleRatio(),this.viewport.updateViewSize(this.rootElement);let n=this.viewport.getViewWidth(),e=this.viewport.getViewHeight();[this.canvas,this.topLayer].forEach(r=>{var i=this._scaleRatio;let a=Math.ceil(n*i),g=Math.ceil(e*i);r.width=a,r.height=g,i===1?(r.style.width="",r.style.height=""):(r.style.width=a/i+"px",r.style.height=g/i+"px")}),this.updateCanvasBound();let t=this.getCanvasBound();if(t.width<this._freezeSize.freezeWidth)this._freezeSize.freezeWidth=t.width,this._blockTopLeft.style.width=t.width+"px",this._blockTopRight.style.width="0px",this._blockBottomLeft.style.width=t.width+"px",this._blockBottomRight.style.width="0px";else{let r=t.width-this._freezeSize.freezeWidth;this._blockTopRight.style.width=r+"px",this._blockBottomRight.style.width=r+"px"}if(t.height<this._freezeSize.freezeHeight)this._freezeSize.freezeHeight=t.height,this._blockTopLeft.style.height=t.height+"px",this._blockTopRight.style.height=t.height+"px",this._blockBottomLeft.style.height="0px",this._blockBottomRight.style.height="0px";else{let r=t.height-this._freezeSize.freezeHeight;this._blockBottomLeft.style.height=r+"px",this._blockBottomRight.style.height=r+"px"}this.viewport.setRecalcRow(),this.viewport.setRecalcCol()}adjustCornerContainerSize(n){let e=n.getFreezePlugin(),t=this.viewport.getScroller(),r=this.viewport.getRowOffset(e.fixedRowsTop),i=this.viewport.getColOffset(e.fixedColumnsLeft),a=this.getViewHeight(),g=this.getViewWidth(),R=Math.min(r,a),L=Math.min(i,g);if(R!==this._freezeSize.freezeHeight){let Q=a-R;this._blockTopLeft.style.height=R+"px",this._blockTopRight.style.height=R+"px",this._blockBottomLeft.style.height=Q+"px",this._blockBottomRight.style.height=Q+"px",this._freezeSize.freezeHeight=R,t.setFrozenHeight(R)}if(L!==this._freezeSize.freezeWidth){let Q=g-L;this._blockTopLeft.style.width=L+"px",this._blockTopRight.style.width=Q+"px",this._blockBottomLeft.style.width=L+"px",this._blockBottomRight.style.width=Q+"px",this._freezeSize.freezeWidth=L,t.setFrozenWidth(L)}let W=e.fixedRowsTop>=n.countRows()?r:r+t.getScrollTop(),K=e.fixedColumnsLeft>=n.countCols()?i:i+t.getScrollLeft();this.setViewPosition(this.scrollableTopLeft,0,0),this.setViewPosition(this.scrollableTopRight,0,-K),this.setViewPosition(this.scrollableBottomLeft,-W,0),this.setViewPosition(this.scrollableBottomRight,-W,-K)}_adjustFooter(){if(this._renderer.isEmpty())return;let n=this._renderer.getBottomOffset()*this.viewport.getZoomLevel();n>this.getViewHeight()?this.footer.style.display="none":(this.footer.style.display="block",this.footer.style.top=n+8+"px")}_markBottomOverSize(n){let e=this.getViewHeight()-this._freezeSize.freezeHeight,t=this.getLastVisibleRow(),r=this.viewport.getZoomLevel(),i=n.getRowHeight(t)*r>e;this._bottomOversizeRow=i?t:-1}hasRenderer(){return this._renderer!==null}isEventInView(n){return this.rootElement.contains(n.target)}getCanvasBound(){return this._canvasBound}pageToOffset(n,e,t){t===void 0&&(t=!0);let{x:r,y:i}=this.getViewPoint({x:n,y:e});return(!t||r>=this._freezeSize.freezeWidth)&&(r+=this.viewport.getScrollLeft()),(!t||i>=this._freezeSize.freezeHeight)&&(i+=this.viewport.getScrollTop()),[r,i]}getCoordFromEvent(n,e){e===void 0&&(e=!0);let[t,r]=this.pageToOffset(n.pageX,n.pageY,e),i=this.viewport.getColByOffset(Math.min(t,this.viewport.getRightOffset()-1));return{row:this.viewport.getRowByOffset(Math.min(r,this.viewport.getBottomOffset()-1)),col:i}}toPageBound(n){return this.isRtl()&&(n.x=this.viewport.getViewWidth()-(n.x+n.width)),n.x+=this._canvasBound.x,n.y+=this._canvasBound.y,n}getRangeBound(n,e,t,r){return this.toPageBound(this.getRangeViewBound(n,e,t,r,!0))}getRangeViewBound(n,e,t,r,i){let a=this.getRangeViewOffset(n,e,t,r),g=this._freezeSize.freezeWidth,R=this._freezeSize.freezeHeight,L=this.getViewWidth(),W=this.getViewHeight();return a.x>=g&&(a.x-=this.getScrollLeft(),i&&a.x<g&&(a.width-=g-a.x,a.x=g)),i&&a.x+a.width>=L&&(a.width=Math.max(L-a.x,0),a.x=Math.min(a.x,L)),a.y>=R&&(a.y-=this.getScrollTop(),i&&a.y<R&&(a.height-=R-a.y,a.y=R)),i&&a.y+a.height>=W&&(a.height=Math.max(W-a.y,0),a.y=Math.min(a.y,W)),a}getRangeViewOffset(n,e,t,r,i,a){let g,R,L,W;return i?(g=this.viewport.getLeftOffset(),L=this.viewport.getRightOffset()-g):(g=this.viewport.getColOffset(e),L=this.viewport.getColOffset(r+1)-g),a?(R=this.viewport.getTopOffset(),W=this.viewport.getBottomOffset()-R):(R=this.viewport.getRowOffset(n),W=this.viewport.getRowOffset(t+1)-R),{x:g,y:R,width:L,height:W}}getViewPoint(n){let e=this.getCanvasBound(),t=n.x-e.x;return this._rtl&&(t=e.width-t),{x:t,y:n.y-e.y}}getViewHeight(){return this._canvasBound.height}getViewWidth(){return this._canvasBound.width}getFreezeSize(){return this._freezeSize}getScrollTop(){return this.viewport.getScrollTop()}getScrollLeft(){return this.viewport.getScrollLeft()}getFirstVisibleRow(){return this.viewport.getRowByOffset(this._freezeSize.freezeHeight+this.viewport.getScrollTop())}getLastVisibleRow(){return this.viewport.getRowByOffset(this.getViewHeight()+this.viewport.getScrollTop())}getFirstVisibleCol(){return this.viewport.getColByOffset(this._freezeSize.freezeWidth+this.viewport.getScrollLeft())}getLastVisibleCol(){return this.viewport.getColByOffset(this.getViewWidth()+this.viewport.getScrollLeft())}getRectVisibleBound(n){let{y:e,x:t,width:r,height:i}=n,{freezeHeight:a,freezeWidth:g}=this.getFreezeSize(),R=this.getScrollTop(),L=this.getScrollLeft(),W=this.getViewHeight(),K=this.getViewWidth();function Q(me,ye,Te,Me){return me<Te?Math.min(Math.max(me,0),Me):Math.min(Math.max(me-ye,Te),Me)}let oe=Q(e,R,a,W),se=Q(t,L,g,K),he=Q(e+i,R,a,W);return{y:oe,x:se,width:Q(t+r,L,g,K)-se,height:he-oe}}isRangeVisible(n){let[e,t,r,i]=n.toArray(),a=this.viewport.getRowOffset(r+1),g=this.viewport.getColOffset(i+1),R=this._freezeSize.freezeHeight+this.viewport.getScrollTop(),L=this.getViewHeight()+this.viewport.getScrollTop(),W=this._freezeSize.freezeWidth+this.viewport.getScrollLeft(),K=this.getViewWidth()+this.viewport.getScrollLeft(),Q=a<=this._freezeSize.freezeHeight||R<=this.viewport.getRowOffset(e)&&a<=L,oe=g<=this._freezeSize.freezeWidth||W<=this.viewport.getColOffset(t)&&g<=K;return Q&&oe}scrollToRange(n,e){e===void 0&&(e=!1),n=n.normalize(),this.isRangeVisible(n)||(this.scrollToRow(n,e),this.scrollToCol(n,e))}scrollToRow(n,e){e===void 0&&(e=!1);let t=n.from.row,r=n.to.row,i=this.viewport.getRowOffset(t),a=this.viewport.getRowOffset(r+1);i!==void 0&&this.scrollToOffset("row",i,a,e)}scrollToCol(n,e){e===void 0&&(e=!1);let t=n.from.col,r=n.to.col,i=this.viewport.getColOffset(t),a=this.viewport.getColOffset(r+1);i!==void 0&&this.scrollToOffset("col",i,a,e)}scrollToOffset(n,e,t,r){r===void 0&&(r=!1);let i=n==="col"?W=>this.viewport.setScrollLeft(W):W=>this.viewport.setScrollTop(W),a=n==="col"?this.viewport.getScrollLeft():this.viewport.getScrollTop(),g=n==="col"?this._freezeSize.freezeWidth:this._freezeSize.freezeHeight,R=n==="col"?this.viewport.getScroller().getClientWidth():this.viewport.getScroller().getClientHeight(),L=t-e;r&&L<R?i(e+L/2-R/2-g):e<g+a||L>=R?i(e-g):t>g+a+R&&i(t-R-g)}scrollToRect(n,e){e===void 0&&(e=!1);let{left:t,top:r,width:i,height:a}=n;this.scrollToOffset("col",t,t+i,e),this.scrollToOffset("row",r,r+a,e)}scrollOffset(n,e){let t=this.viewport;if(e!==0){let r=t.getScrollTop();t.setScrollTop(r+e)}if(n!==0){let r=t.getScrollLeft();t.setScrollLeft(r+n)}}getScaleRatio(){return this._scaleRatio}_updateScaleRatio(){let n=window.devicePixelRatio||1;ue()&&(n*=2);let e=this.canvas.getContext("2d"),t=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;this._scaleRatio=n/t}getRenderInfo(n,e){return this._renderer.getRenderInfo(n,e)}getGroupRenderInfo(n,e){return this._renderer.getGroupInfo(n,e)}getHeaderBound(n,e){return this._renderer.getHeaderBound(n,e)}getCellEditBound(n,e){let t=this._renderer.getClipBound(n,e);if(!t)return null;let{x:r,y:i,width:a,height:g}=t,R=this.viewport.getZoomLevel();return r*=R,i*=R,{x:r,y:i,width:a*=R,height:g*=R}}},MV="syno-o-sh-view-selection"+(rt()?" mobile-selection":""),VA="selection-border-movable",dre=["top-border","right-border","bottom-border","left-border"],DV="syno-o-sh-view-selection-corner",OV=["bottom-right","top-left"],fre=class{constructor(n){this._hot=n,this._view=n.view,this._divCollection=[],this._divMapping=new Map}destroy(){this._view=null}refreshSelections(n){this._divMapping.clear();for(let e=0;e<n.length;e++){let t=n[e],r=this._renewDiv(e);this._divMapping.set(t,r),this._drawSelection(t,r)}for(let e=n.length;e<this._divCollection.length;e++)this._hideSelection(this._divCollection[e])}updateSelection(n){let e=this._divMapping.get(n);e||(e=this._renewDiv(this._divMapping.size),this._divMapping.set(n,e)),this._drawSelection(n,e)}getSelectionScreenRects(n){let e=this._divMapping.get(n);if(e)return e.map(t=>t.container.getClientRects()[0])}hideSelectionBorder(n){let e=this._divMapping.get(n);if(e)for(let t=0;t<4;t++){for(let r=0;r<4;r++)e[t].divBorders[r].style.display="none";e[t].divCorner.forEach(r=>r.style.display="none")}}hideSelectionBackground(n){let e=this._divMapping.get(n);if(e)for(let t=0;t<4;t++)e[t].divBackground.style.display="none"}isEventOnSelectionCorner(n){var e;return n.target.nodeType===document.ELEMENT_NODE&&(e=n.target,E(e,DV))}isEventOnSelectionMovableBorder(n){var e;return n.target.nodeType===document.ELEMENT_NODE&&(e=n.target,E(e,VA))}isBottomRightCorner(n){var e;return e=OV[0],E(n,e)}_drawSelection(n,e){if(n.isEmpty())return void this._hideSelection(e);let t=n.cellRange,r=t.getTopLeftCorner(),i=t.getBottomRightCorner(),{x:a,y:g,width:R,height:L}=this._view.getRangeViewOffset(r.row,r.col,i.row,i.col,t.isRowType(),t.isColType());if(R<=0||L<=0)return void this._hideSelection(e);let{freezeWidth:W,freezeHeight:K}=this._view.getFreezeSize(),Q=K>g,oe=W>a;a-=1,g-=1,R+=1,L+=1;let se=n.outerOffset;se&&(a-=se,g-=se,R+=2*se,L+=2*se);let he=n.preventPointer()?"none":"",me=n.getClassName();for(let ye=0;ye<4;ye++){let Te=e[ye].container;me&&A(Te,me);let Me=Te.style;this._view.setViewPosition(Te,g,a),Me.width=R+"px",Me.height=L+"px",Me.pointerEvents=he}this._drawSelectionBackground(e,n,a,g,R,L),this._drawSelectionBorder(e,n,R,L),this._drawSelectionCorner(e,n,R,L),this._showSelection(e,Q,oe)}_renewDiv(n){if(this._divCollection[n])for(let e=0;e<4;e++)this._divCollection[n][e].container.className=MV;else{let e=[this._createDiv(this._view.scrollableTopLeft),this._createDiv(this._view.scrollableTopRight),this._createDiv(this._view.scrollableBottomLeft),this._createDiv(this._view.scrollableBottomRight)];this._divCollection[n]=e}return this._divCollection[n]}_createDiv(n){let e=ie(n,MV),t=[];for(let g=0;g<4;g++)t[g]=ie(e,dre[g]);let r=ie(e,""),i=[],a=rt()?2:1;for(let g=0;g<a;g++)i[g]=ie(e,`${DV} ${OV[g]}`);return{container:e,divBorders:t,divBackground:r,divCorner:i}}_showSelection(n,e,t){let r=[e&&t,e,t,!0].map(i=>i?"block":"none");for(let i=0;i<4;i++)n[i].container.style.display=r[i]}_hideSelection(n){for(let e=0;e<4;e++)n[e].container.style.display="none"}_drawSelectionBackground(n,e,t,r,i,a){if(!e.color||!e.hasBackground){for(let g=0;g<4;g++)n[g].divBackground.style.display="none";return}if(e.hasHighlight){let g=e.cellRange.highlight,R=this._view.getRangeViewOffset(g.from.row,g.from.col,g.to.row,g.to.col);if(R.width>0&&R.height>0){R.x<t&&(R.width-=t-R.x,R.x=t),R.width=Math.min(R.width,t+i-R.x),R.y<r&&(R.height-=r-R.y,R.y=r),R.height=Math.min(R.height,r+a-R.y);let L=R.x-t,W=R.y-r,K=i-R.width-L,Q=a-R.height-W,oe="px solid "+e.color;for(let se=0;se<4;se++){let he=n[se].divBackground.style;he.width=R.width+"px",he.height=R.height+"px",he.borderTop=W+oe,he.borderRight=`${this._view.isRtl()?L:K}${oe}`,he.borderBottom=Q+oe,he.borderLeft=`${this._view.isRtl()?K:L}${oe}`,he.backgroundColor="transparent",he.display="block"}return}}for(let g=0;g<4;g++){let R=n[g].divBackground.style;R.width=i+"px",R.height=a+"px",R.backgroundColor=e.color,R.border="0",R.display="block"}}_drawSelectionBorder(n,e,t,r){let i=["width","height","width","height"],a=[t,r,t,r],g=["borderTop","borderRight","borderBottom","borderLeft"];for(let R=0;R<4;R++)for(let L=0;L<4;L++){let W=n[R].divBorders[L];W.style[i[L]]=a[L]+"px",W.style[g[L]]=e.borderStyle,W.style.display="block",!this._hot.isReadonly()&&e.hasHighlight?(W.classList.add(VA),W.style.pointerEvents="auto"):(W.classList.remove(VA),W.style.pointerEvents="")}}_drawSelectionCorner(n,e){let t=this._view.isRtl();for(let r=0;r<4;r++)this._hot.isReadonly()||!e.hasCorner?n[r].divCorner.forEach(i=>i.style.display="none"):n[r].divCorner.forEach(i=>{i.style.display="block",i.classList.toggle("rtl",t)})}};class gre{constructor(e){this.view=e}getScales(){return{x:this.view.isRtl()?-1:1,y:1}}getViewportBound(){let{x:e,y:t,width:r,height:i}=this.view.getCanvasBound()||{x:0,y:0,width:0,height:0};return{x:e,y:t,width:r,height:i}}getScrollOffset(){let e=this.view.viewport,t=e.getScrollTop();return{x:e.getScrollLeft(),y:t}}getZoomLevel(){return this.view.viewport.getZoomLevel()}pointOnContent(e){let[t,r]=this.view.pageToOffset(e.x,e.y,!1);return{x:t,y:r}}pointOnViewport(e){let t=this.getViewportBound();return{x:e.x-t.x,y:e.y-t.y}}normalizeZoomLevel(e){return e=Math.round(100*(e=Math.min(Math.max(e,.25),2)))/100}}function ZC(n,e){return Array.prototype.findIndex.call(n,t=>t.identifier===e)}class NV{constructor(e){this.identifier=e.identifier,this.pageX=e.pageX,this.pageY=e.pageY,this.clientX=e.clientX,this.clientY=e.clientY,this.screenX=e.screenX,this.screenY=e.screenY,this.timestamp=Date.now()}get x(){return this.pageX}get y(){return this.pageY}createMouseEvent(e,t){return new MouseEvent(e,{clientX:this.clientX,clientY:this.clientY,movementX:0,movementY:0,relatedTarget:null,screenX:this.screenX,screenY:this.screenY,bubbles:!0,cancelable:!0,...t})}}class pre extends pu.EventEmitter{constructor(e){super(),this.scrollCalc=this.createScrollCalculator(e.view,e.scrollOptions),this.preventDefault=e.preventDefault??!1,this.stopPropagation=e.stopPropagation??!1,this.stopImmediatePropagation=e.stopImmediatePropagation??!1,this.recoverMouseEvents=e.recoverMouseEvents??!1,this.isPassive=e.isPassive??!0,this.eventTarget=null,this.startTouches=[],this.currentTouches=[],this.unmovedTouches=new Set,this.scrollingSpeed={deltaX:0,deltaY:0,timer:null},this.onTouchStart=this.onTouchStart.bind(this),this.onTouchMove=this.onTouchMove.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this),this.onTouchCancel=this.onTouchCancel.bind(this)}start(e){this.end(),this.eventTarget=e;let t={passive:this.isPassive};e.addEventListener("touchstart",this.onTouchStart,t),e.addEventListener("touchmove",this.onTouchMove,t),e.addEventListener("touchend",this.onTouchEnd,t),e.addEventListener("touchcancel",this.onTouchCancel,t)}end(){let e=this.eventTarget;e&&(this.eventTarget=null,e.removeEventListener("touchstart",this.onTouchStart),e.removeEventListener("touchmove",this.onTouchMove),e.removeEventListener("touchend",this.onTouchEnd),e.removeEventListener("touchcancel",this.onTouchCancel))}createScrollCalculator(e,t){return HA.create(e,t)}onTouchStart(e){this.pruneTouches(e.touches),this.addTouches(e.changedTouches),this.stopSmoothScroll(),this.startNewGesture(this.currentTouches),this.onEvent(e)}onTouchMove(e){if(!e.defaultPrevented&&this.hasTouches()){let t=this.currentTouches.slice();for(let r of Array.from(e.changedTouches)){let i=ZC(this.currentTouches,r.identifier);i!==-1&&(this.currentTouches[i]=new NV(r),this.unmovedTouches.has(r.identifier)&&!function(a,g){let R=g.x-a.x,L=g.y-a.y;return 5>Math.abs(R)&&5>Math.abs(L)}(this.startTouches[i],this.currentTouches[i])&&this.unmovedTouches.delete(r.identifier))}this.onHandle(t,this.currentTouches)}this.onEvent(e)}onTouchEnd(e){let t=this.removeRecordTouches(e.changedTouches);this.startNewGesture(this.currentTouches);let r=this.currentTouches.length===0,i=t.length===1;if(this.recoverMouseEvents&&i&&t[0].unmoved&&this.doPress(t[0].start,t[0].target),!e.defaultPrevented&&i&&r&&this.scrollingSpeed){let a=this.decayScrollingSpeed(this.scrollingSpeed,Date.now()-t[0].end.timestamp);a.deltaX||a.deltaY?(this.resetScrollingSpeed(a),this.doSmoothScroll()):this.resetScrollingSpeed({deltaX:0,deltaY:0,timer:null})}this.onEvent(e)}onTouchCancel(e){this.removeRecordTouches(e.changedTouches),this.startNewGesture(this.currentTouches),this.onEvent(e)}isEventMatched(e,t){return typeof t=="boolean"?t:t.includes(e.type)}onEvent(e){this.isEventMatched(e,this.preventDefault)&&e.preventDefault(),this.isEventMatched(e,this.stopPropagation)&&e.stopPropagation(),this.isEventMatched(e,this.stopImmediatePropagation)&&e.stopImmediatePropagation()}hasTouches(){return this.currentTouches.length>0}pruneTouches(e){for(let t=this.currentTouches.length-1;t>=0;--t){let r=this.currentTouches[t];ZC(e,r.identifier)>=0||(this.currentTouches.splice(t,1),this.startTouches.splice(t,1),this.unmovedTouches.delete(r.identifier))}}addTouches(e){for(let t of e){let r=t.identifier,i=ZC(this.currentTouches,r);if(i<0&&this.currentTouches.length>=2)continue;let a=new NV(t);i>=0?(this.startTouches[i]=a,this.currentTouches[i]=a):(this.startTouches.push(a),this.currentTouches.push(a)),this.unmovedTouches.add(r)}}removeRecordTouches(e){let t=[];for(let r of Array.from(e)){let i=ZC(this.currentTouches,r.identifier);if(i===-1)continue;let[a]=this.currentTouches.splice(i,1),[g]=this.startTouches.splice(i,1),R=this.unmovedTouches.has(r.identifier),L=r.target;this.unmovedTouches.delete(r.identifier),t.push({start:g,end:a,unmoved:R,target:L})}return t}startNewGesture(e){return e.length===1&&!!this.scrollCalc&&(this.scrollCalc.start(e[0]),!0)}onHandle(e,t){return t.length===1&&!!this.scrollCalc&&(this.doScroll(e[0],t[0]),!0)}doScroll(e,t){let r=this.scrollCalc?.calc(t);if(!r)return;this.emit("scrollTo",r.scrollLeft,r.scrollTop);let i=t.x-e.x,a=t.y-e.y,g=t.timestamp-e.timestamp;g>0&&this.resetScrollingSpeed({deltaX:i/g,deltaY:a/g,timer:null})}stopSmoothScroll(){let e=this.scrollingSpeed.timer;e!=null&&(clearInterval(e),this.scrollingSpeed.timer=null)}resetScrollingSpeed(e){this.stopSmoothScroll(),this.scrollingSpeed=e}decayScrollingSpeed(e,t){let r=Math.pow(.8,t/10),i=e.deltaX*r,a=e.deltaY*r;return this.scrollCalc?.calcSmoothScroll({x:i,y:a})?{deltaX:i,deltaY:a,timer:null}:{deltaX:0,deltaY:0,timer:null}}doSmoothScroll(){this.scrollingSpeed.timer||(this.scrollingSpeed.timer=setInterval(()=>{let{deltaX:e,deltaY:t}=this.scrollingSpeed,r=this.scrollCalc?.calcSmoothScroll({x:e,y:t});if(!r)return void this.resetScrollingSpeed({deltaX:0,deltaY:0,timer:null});this.scrollingSpeed.deltaX*=.8,this.scrollingSpeed.deltaY*=.8,this.emit("scroll",r.x,r.y)},10))}doPress(e,t){let r=t??this.eventTarget;if(!r)return;let i={button:2*(Date.now()-e.timestamp>300)};r.dispatchEvent(e.createMouseEvent("mousedown",i)),r.dispatchEvent(e.createMouseEvent("mouseup",i))}}class mre extends pre{constructor(e){super(e),this.touchView=e.view,this.pinchCalc=e.enablePinch??!0?new vre(this.touchView):null}startNewGesture(e){return!!super.startNewGesture(e)||e.length===2&&!!this.pinchCalc&&(this.pinchCalc.start(e),!0)}onHandle(e,t){let r=t.length;return!!super.onHandle(e,t)||r===2&&!!this.pinchCalc&&(this.doPinch(e,t),!0)}doPinch(e,t){let r=this.pinchCalc?.calc(t);r&&this.emit("zoomTo",r.zoomLevel,r.left,r.top)}}class HA{static create(e,t){return t&&t.enableX===!1&&t.enableY===!1?null:new HA(e,t??{})}constructor(e,t){this.view=e,this.isXDirectionEnabled=t.enableX??!0,this.isYDirectionEnabled=t.enableY??!0,this.startState=null}getScales(){return this.view.getScales?.()||{x:1,y:1}}start(e){let t=this.view.getScrollOffset(),{x:r,y:i}=this.getScales();this.startState={touch:e,scrollLeft:t.x,xScale:r,scrollTop:t.y,yScale:i}}calc(e){if(!this.startState)return;let t=this.startState,r=this.isXDirectionEnabled?(e.x-t.touch.x)*t.xScale:0,i=this.isYDirectionEnabled?(e.y-t.touch.y)*t.yScale:0;return{scrollLeft:t.scrollLeft-r,scrollTop:t.scrollTop-i}}calcSmoothScroll(e){let{x:t,y:r}=e;if(.01>Math.abs(t)&&.01>Math.abs(r))return null;let i=this.getScales();return{x:-t*i.x*30,y:-r*i.y*30}}}class vre{constructor(e){this.view=e,this.startState=null}isInverted(){let e=this.view.getScales?.();return e?{x:e.x<0,y:e.y<0}:null}start(e){let t=PV(e[0],e[1]),r=BV(e[0],e[1]),i=this.view.getZoomLevel(),a=this.view.getViewportBound(),g=this.view.pointOnViewport(t),R=this.view.pointOnContent(t);this.startState={pinchCenter:t,pinchDist:r,zoomLevel:i,viewportBound:a,pointOnViewport:g,pointOnContentWithoutZoom:{x:R.x/i,y:R.y/i}}}calc(e){if(!this.startState)return;let t=BV(e[0],e[1]),r=PV(e[0],e[1]),{pinchDist:i,pinchCenter:a,zoomLevel:g,viewportBound:R,pointOnViewport:L,pointOnContentWithoutZoom:W}=this.startState,K=r.x-a.x,Q=r.y-a.y,oe=this.view.normalizeZoomLevel(t/i*g),se=W.x*oe,he=W.y*oe,me=L.x+K,ye=L.y+Q,Te=this.isInverted();return{zoomLevel:oe,left:se-(Te?.x?R.x+R.width-me:me),top:he-(Te?.y?R.y+R.height-ye:ye)}}}function PV(n,e){return{x:(n.x+e.x)/2,y:(n.y+e.y)/2}}function BV(n,e){let t=e.x-n.x,r=e.y-n.y;return Math.sqrt(t*t+r*r)}class yre extends mre{constructor(e){super({preventDefault:!0,stopPropagation:!0,recoverMouseEvents:!0,isPassive:!1,...e}),this.hot=e.hot,this.selectionAdjustState=null}onTouchEvent(e,t){let r=new Set(e.changedTouches);for(let i of e.changedTouches)this.isSelectionAdjustTouch(i,t)&&(this[`selectionAdjust${t}`](i),r.delete(i));r.size>0&&super[`onTouch${t}`](function(i,a){let g=new Set(Array.from(a).map(K=>K.identifier)),R=[...i.touches],L=Array.from(i.targetTouches).filter(K=>g.has(K.identifier)),W=Array.from(i.changedTouches).filter(K=>g.has(K.identifier));return new TouchEvent(i.type,{...i,touches:R,targetTouches:L,changedTouches:W})}(e,r)),e.stopPropagation(),this.hot.view.footer.contains(e.target)||e.preventDefault()}onTouchStart(e){this.onTouchEvent(e,"Start")}onTouchMove(e){this.onTouchEvent(e,"Move")}onTouchEnd(e){this.onTouchEvent(e,"End")}onTouchCancel(e){this.onTouchEvent(e,"Cancel")}isAdjustingSelection(){return!!this.selectionAdjustState}isSelectionAdjustTouch(e,t){if(t==="Start"){let r=this.hot.selections.multiSelections.getActive();return!!(!this.selectionAdjustState&&r?.cellRange&&this.hot.selectionView.isEventOnSelectionCorner(e))}return this.selectionAdjustState?.touchId===e.identifier}selectionAdjustStart(e){if(this.selectionAdjustState)return;let t=this.hot.selections.multiSelections.getActive();if(!t?.cellRange)return;let r=this.hot.selectionView.isBottomRightCorner(e.target)?t.cellRange.getTopLeftCorner():t.cellRange.getBottomRightCorner();this.selectionAdjustState={touchId:e.identifier,selection:t,from:r,to:r}}selectionAdjustMove(e){if(!this.selectionAdjustState)return;let t=this.selectionAdjustState,r=this.hot.view.getCoordFromEvent(e,!1);(r.row!==t.to.row||r.col!==t.to.col)&&(this.hot.selectCell(t.from.row,t.from.col,r.row,r.col,!0,!1),t.to=r)}selectionAdjustEnd(e){this.selectionAdjustState=null}selectionAdjustCancel(e){this.selectionAdjustEnd(e)}}let $A=function(n,e,t){var r,i,a;return t===void 0&&(t=e,e=void 0),t!==void 0&&(t=(t=Dp(t))==t?t:0),e!==void 0&&(e=(e=Dp(e))==e?e:0),r=Dp(n),i=e,a=t,r==r&&(a!==void 0&&(r=r<=a?r:a),i!==void 0&&(r=r>=i?r:i)),r};class wre{constructor({speed:e=.5,deltaLimit:t=20,resetTime:r=3e3,levelDependent:i=!0}={}){this.accumulated=0,this.speed=e,this.deltaLimit=t,this.levelDependent=i,this.setTimerToReset=tA(this.resetAccumulated,r)}resetAccumulated(){this.accumulated=0}accumulate(e){return this.accumulated+=isNaN(e)?0:e,this.accumulated}add(e,t){let r=this.accumulate($A(e,-this.deltaLimit,this.deltaLimit)),i=this.levelDependent&&(t??100)<80?.5:1,a=this.speed*i,g=Math.round(r*a);return g!==0&&this.accumulate(-g/a),this.setTimerToReset(),g}}function QC(){return"ontouchstart"in window}class bre{constructor(){this._isMouseDown=!1,this._isDblClick=!1,this._mouseDownTarget=null,this._mouseUpTarget=null,this._mouseDownTimer=null,this._mouseUpTimer=null,this._dblClickTimeout=null}mouseDown(e,t){this._isMouseDown=!0,!t||Da(e)||(this._mouseDownTarget=t,clearTimeout(this._mouseDownTimer),this._mouseDownTimer=setTimeout(()=>{this._mouseDownTarget=null},1e3))}mouseUp(e,t){this._isMouseDown=!1,!(!t||Da(e))&&(this.targetEqual(this._mouseDownTarget,t)&&this.targetEqual(this._mouseUpTarget,t)?(this._mouseDownTarget=null,this._mouseUpTarget=null,this._isDblClick=!0,this._dblClickTimeout=setTimeout(()=>{this._isDblClick=!1},0)):this.targetEqual(this._mouseDownTarget,t)&&(this._mouseUpTarget=t,clearTimeout(this._mouseUpTimer),this._mouseUpTimer=setTimeout(()=>{this._mouseUpTarget=null},500)))}isMouseDown(){return this._isMouseDown}isDblClick(){return this._isDblClick}targetEqual(e,t){return!!e&&!!t&&(e===t||fi(e,"row")&&e.row===t.row&&fi(e,"col")&&e.col===t.col)}destroy(){clearTimeout(this._mouseDownTimer),clearTimeout(this._mouseUpTimer),clearTimeout(this._dblClickTimeout)}}let Cre=class{constructor(n){this.hot=n,this._touchHandler=null,this._touchCtrl=null,this._eventManager=this._createEventManager(),this._mouseStatus=new bre,this._wheelZoomCalculator=new wre,this._mouseDownInSelection=!1}destroy(){this.hot=null,this._eventManager.destroy(),this._mouseStatus.destroy()}isDestroyed(){return this.hot===null}_createEventManager(){let n=new Sa(this),e=this.hot.rootElement;if(this.hot.view.viewport.getScroller().on("scroll",()=>this._handleScroll()),n.addEventListener(e,"wheel",i=>this._handleWheel(i)),n.addEventListener(document.documentElement,"mousemove",h6(i=>this._handleMouseMove(i),16)),n.addEventListener(document.documentElement,"mousedown",i=>this._handleMouseDown(i)),n.addEventListener(window,"mouseup",i=>this._handleMouseUp(i)),n.addEventListener(e,"dragover",i=>this._handleDragOver(i)),n.addEventListener(e,"drop",i=>this._handleDrop(i)),n.addEventListener(document.documentElement,"keydown",()=>this._handleKeydown()),QC()){let i=new yre({hot:this.hot,view:new gre(this.hot.view),enableScroll:!0,enablePinch:!0});i.on("scroll",(a,g)=>this._scroll(a,g)),i.on("scrollTo",this._scrollTo.bind(this)),i.on("zoomTo",this._zoomTo.bind(this)),i.on("click",a=>{this.hot.rootElement.dispatchEvent(new MouseEvent("mousedown",a)),this.hot.rootElement.dispatchEvent(new MouseEvent("mouseup",a))}),i.start(this.hot.rootElement),this._touchHandler=i}let t=this.hot.view.footer;function r(i){i.stopPropagation()}return n.addEventListener(t,"mousedown",r),n.addEventListener(t,"keydown",r),(Pe==="ios"||Pe==="ipad"||Ve())&&n.addEventListener(t,"mouseup",r),this._listenPixelRatioChange(n),n}_listenPixelRatioChange(n){let e=window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`),t=n.addEventListener(e,"change",()=>{t(),this.hot.runHooks("afterPixelRatioChange"),this._listenPixelRatioChange(n),this.hot.render("delay")})}_handleScroll(){this.hot.render(),this.hot.runHooks("afterScroll")}_handleWheel(n){let e=n.deltaX,t=n.deltaY;if(n.deltaMode===1&&(e*=10,t*=10),n.shiftKey&&!je()){let r=e;e=t,t=r,this.hot.view.isRtl()&&(e=-e)}if(n.ctrlKey){let r=this.hot.getZoomLevel(),i=this._wheelZoomCalculator.add(n.deltaY,100*r);i!==0&&this._zoom(r+-(.01*i),n.pageX,n.pageY)}else this._scroll(e,t);n.stopPropagation(),n.preventDefault()}_handleMouseMove(n){if(this.isDestroyed())return;let e=this.hot.view;if(!e.hasRenderer()||(this.hot.runHooks("onTargetMouseOver",n,this._mouseStatus.isMouseDown()),te(n)))return;let t=e.getCoordFromEvent(n),r=this.hot.selections;if(r.copy.isDragging()){r.copy.updateDragging(t,{row:this.hot.sheet.countRows()-1,col:this.hot.sheet.countCols()-1}),this.hot.selectionView.updateSelection(r.copy);return}if(r.formulaSelections.isInProgress()){if(this._mouseStatus.isMouseDown()){r.formulaSelections.moveSelect(t);let i=r.formulaSelections.getActive();i&&this.hot.selectionView.updateSelection(i)}return}if(r.multiSelections.isInProgress()){if(this._mouseStatus.isMouseDown()){r.multiSelections.moveSelect(t);let i=r.multiSelections.getActive();i&&this.hot.selectionView.updateSelection(i),this.hot.view.rerenderHeader(r.multiSelections.getAll())}return}if(e.isEventInView(n)){let i=this.hot.sheet.getMergePlugin().getMergedRange(t.row,t.col),a=i?i.from:t,g=i?i.to:t,R=this.hot.view.getRangeViewBound(a.row,a.col,g.row,g.col,!1);this.hot.runHooks("afterOnCellMouseOver",n,t,i,R)}}_handleMouseDown(n){this._mouseDownInSelection=!1,this.hot.setSearchHintSelectionsDisplay(!1);let e=this.hot.view;if(!e.hasRenderer()||(this.hot.view.footer.contains(document.activeElement)&&this.hot.focusInputField(!0),QC()&&this._touchHandler.isAdjustingSelection()))return;if(!this.hot.isReadonly()&&this.hot.selectionView.isEventOnSelectionCorner(n)){this._mouseStatus.mouseDown(n,n.target),this.hot.runHooks("afterOnCellCornerMouseDown",n);return}if(this.hot.runHooks("onTargetMouseDown",n),te(n))return void this._mouseStatus.mouseDown(n,n.customTarget||n.target);if(!e.isEventInView(n)){let i=n.target;for(;i!==document.documentElement;){if(i===null||i===this.hot.rootElement||E(i,"syno-sh-editor-comp"))return;i=i.parentNode}this.hot.destroyEditor();return}n.preventDefault();let t=e.getCoordFromEvent(n);if(t.row<-1||t.col<-1){e.isEventInView(n)&&this.hot.runHooks("afterOnGroupMouseDown",n,t);return}if(!this.hot.isReadonly()&&this.hot.selectionView.isEventOnSelectionMovableBorder(n)){if(this._mouseStatus.mouseDown(n,n.target),this.hot.runHooks("afterOnSelectionBorderMouseDown",n),Da(n))return;let i=this.hot.selections.multiSelections.getActive();this.hot.selections.copy.startDragging(i.cellRange,t),this.hot.selectionView.updateSelection(i),this.hot.selectionView.updateSelection(this.hot.selections.copy);return}if(this.hot.runHooks("beforeOnCellMouseDown",n,t),te(n))return void this._mouseStatus.mouseDown(n,n.target);this._mouseStatus.mouseDown(n,{row:t.row,col:t.col});let r=this.hot.selections;r.formulaSelections.checkFormulaSelecting()&&!Da(n)?(r.formulaSelections.beginSelect(n,t),this.hot.runHooks("afterFormulaSelect")):((!this.hot.hasFocus()||this._isFormulaSyntaxFocused())&&this.hot.focusInputField(!0),QC()&&t.row>=0&&t.row<this.hot.sheet.countRows()&&t.col>=0&&t.col<this.hot.sheet.countCols()&&r.multiSelections.getAll().some(i=>i.cellRange.includes(t))?this._mouseDownInSelection=!0:r.multiSelections.beginSelect(n,t),this.hot.runHooks("afterOnCellMouseDown",n,t)),this.hot.fastRender()}_handleMouseUp(n){let e=this.hot.view;if(!e.hasRenderer()||QC()&&this._touchHandler.isAdjustingSelection())return;if(this.hot.runHooks("onTargetMouseUp",n),te(n)){this._mouseStatus.mouseUp(n,n.customTarget||n.target),this._mouseStatus.isDblClick()&&this.hot.runHooks("onTargetDblClick",n);return}let t=this.hot.selections;if(t.copy.isDragging()){let{srcRange:i,targetRange:a}=t.copy.endDragging();i.isEqual(a)||this.hot.runHooks("onMoveSelection",i,a),this.hot.selectionView.updateSelection(t.copy)}else t.multiSelections.isInProgress()?t.multiSelections.finishSelect():t.formulaSelections.isInProgress()&&t.formulaSelections.finishSelect();if(this.hot.selectionView.isEventOnSelectionCorner(n)){this._mouseStatus.mouseUp(n,n.target),this._mouseStatus.isDblClick()&&this.hot.runHooks("afterOnCellCornerDblClick",n);return}let r=e.getCoordFromEvent(n);if(r.row<-1||r.col<-1){e.isEventInView(n)&&this.hot.runHooks("afterOnGroupMouseUp",n,r);return}this._mouseStatus.mouseUp(n,{row:r.row,col:r.col}),this._mouseStatus.isDblClick()&&this.hot.runHooks("afterOnCellDblClick",n,r),e.isEventInView(n)&&(this.hot.runHooks("afterOnCellMouseUp",n,r),this._mouseDownInSelection&&this.hot.runHooks("triggerContextMenu",n))}_handleDragOver(n){this.hot.runHooks("onRootDragOver",n)}_handleDrop(n){this.hot.runHooks("onRootDrop",n)}_handleKeydown(){this.hot.setSearchHintSelectionsDisplay(!1)}_scroll(n,e){this.hot.view.scrollOffset(Math.round(n),Math.round(e))}_zoom(n,e,t,r,i){r===void 0&&(r=0),i===void 0&&(i=0),this.hot.setZoomLevelWithCenter(n,this.hot.view.getViewPoint({x:e,y:t})),this._scroll(r,i)}_scrollTo(n,e){this.hot.view.viewport.setScrollLeft(n),this.hot.view.viewport.setScrollTop(e)}_zoomTo(n,e,t){this.hot.setZoomLevel(n,{left:e,top:t})}_isFormulaSyntaxFocused(){let n=this.hot.getActiveEditor().getActiveInput().getFormulaTip();return!!n&&n.isFocused()}},_re=class{constructor(n,e=[],t,r){for(let i of(this.rootElement=n,this._handleCommandRef=(a,g)=>this._handleCommand(a,g),this._flushViewportRef=()=>{this.view.viewport.setRecalcRow(),this.view.viewport.setRecalcCol(),this.selections.multiSelections.clampSelections()},this._flushSearchRef=()=>{this.getPlugin("synoSearch").update()},this._flushCurrentRef=()=>this.updateSheet(),this.guid="ht_"+pe(),n.id&&n.id.substring(0,3)!=="ht_"||(this.rootElement.id=this.guid),n.classList.add("table-wrapper"),rt()&&n.classList.add("mobile"),this.vHooks=new w6,this.renderTimer=null,this.forceFullRender=!1,this.view=new cre(this.rootElement,this),this.viewEvent=new Cre(this),this.selectionView=new fre(this),this.selections={multiSelections:new Ine(this),hintSelections:new Tne(this),formulaSelections:new xne(this),onlinePeerSelections:[],fill:new Ad(null,null,"1px dashed #009959","fill-selection",!1,!1),filter:new Ad(null,null,"1px solid #21CC76","filter-selection",!1,!1),copy:new Sne,rule:new Ad(null,null,"2px solid #9CDCBE","rule-selection",!1,!1),arrayFormula:new Ad(null,null,"2px solid #9CDCBE","array-formula-selection",!1,!1)},this.cellEditorData=function(){let a=(0,ne.ref)("ltr"),g=(0,ne.ref)(!0),R=(0,ne.ref)(!1),L=(0,ne.ref)(!1),W=(0,ne.ref)(!1);return{direction:(0,ne.computed)(()=>R.value?"ltr":a.value),autoUpdateDir:g,isFormulaMode:R,isOpened:L,isFocused:W,setBidi:function(K,Q){a.value=K,g.value=Q},triggerAutoUpdateDir:function(K){g.value&&(a.value=dV(K))},setFormulaMode:function(K){R.value=K},setFocusState:function(K){W.value=K},setOpenState:function(K){L.value=K}}}(),this._editorManager=new vne(this),this.plugins={},this.sheetId=void 0,this.selectionRecord={},this.pivotTableView=new lre(this),this._uiBridge=t,this._dataBridge=null,this._action=null,this.zoomLimit={min:r?.zoom?.min??.1,max:r?.zoom?.max??5},e)){let a=new i(this,r);a.init(),this.plugins[i.pluginName]=a}this.ro=new ResizeObserver(()=>{n.scrollTop=0,this.view.adjustCanvasSize(),this.render()}),this.ro.observe(n)}getPlugin(n){return this.plugins[n]}getDataBridge(){return this._dataBridge}getUIBridge(){return this._uiBridge}getAction(){return this._action}get sheet(){return this.getDataBridge().getWorkbook().getCurrentSheet()}destroyEditor(n){return this._editorManager.closeEditor(n)}getSelected(){let n=this.selections.multiSelections.getActive();if(!n||!n.cellRange)return null;let e=n.cellRange;return[e.from.row,e.from.col,e.to.row,e.to.col]}getSelectedRange(){let n=this.selections.multiSelections.getActive();if(n&&n.cellRange)return n.cellRange}getHighlightRange(){return this.selections.multiSelections.getHighlightRange()}getMultiSelectedRange(){return this.selections.multiSelections.getMultiRange()}clearMultiSelections(){this.selections.multiSelections.clear()}serializeSelections(){return this.selections.multiSelections.toJSON()}isRangeSelecting(){return this.selections.multiSelections.isInProgress()||this.selections.formulaSelections.isInProgress()||(this.plugins.synoAutofill?.isInProgress()??!1)}renderSheet(n,e){n===this.sheetId&&this.render(e)}isReadonly(){return this.sheet?.isReadonly()??!0}async forceUpdate(){let n=this.getDataBridge();if(!n)return;await n.forceUpdate();let e=n.getWorkbook().getCurrentSheet();e&&this.view.viewport.updateSheet(e)}render(n){this.forceFullRender=!0,this.fastRender(n)}fastRender(n){if(!this.sheetId||n===!1)return;let e=()=>{this.renderTimer&&(clearTimeout(this.renderTimer),this.renderTimer=null),this._render()};if(n==="delay"){this.renderTimer===null&&(this.renderTimer=setTimeout(e,1));return}e()}_render(){this.cancelScheduledRender();let n=this.sheet;if(this.view&&this.sheetId&&n&&this.sheetId===n.sheetId){this.forceFullRender?(this.forceFullRender=!1,this.view.fullRender(this.getDataBridge(),this.selections.multiSelections.getAll(),this._uiBridge)):this.view.rerenderHeader(this.selections.multiSelections.getAll()),this.runHooks("afterRenderComplete");let e=this.getActiveEditor(),t=e.isOpened()&&e.isCrossSheet()?[]:this.selections.multiSelections.getAll();this.runHooks("beforeRefreshSelections");let r=this.selections.multiSelections.getHighlightRange();this.updateArrayFormulaSelection(r?.from);let i=[].concat(t,this.selections.hintSelections.getAll(),this.selections.formulaSelections.getAll(),this.selections.fill,this.selections.copy,this.selections.filter,this.selections.onlinePeerSelections,this.selections.rule,this.selections.arrayFormula);this.selectionView.refreshSelections(i)}}cancelScheduledRender(){this.renderTimer&&(clearTimeout(this.renderTimer),this.renderTimer=null)}async setActiveSheet(n){let e=this.getDataBridge();e&&n!==e.getWorkbook().getCurrentSheet()?.sheetId&&(this.cellEditorData.isFormulaMode.value||await this.destroyEditor(),await e.setCurrent(n))}updateSheet(){let n=this.getDataBridge().getWorkbook().getCurrentSheet();if(!n||n.sheetId===this.sheetId)return;let e=this.view.viewport,t=!!this.sheetId;if(this.sheetId&&(this.selectionRecord[this.sheetId]={top:e.getScrollTop(),left:e.getScrollLeft(),sel:this.getSelected()},this.cancelScheduledRender(),this.runHooks("beforeHideSheet",this.sheetId)),this.sheetId=n.sheetId,this.runHooks("afterShowSheet",this.sheetId),t){e.updateSheet(n);let{top:r=0,left:i=0,sel:a}=this.selectionRecord[this.sheetId]||{};a??=[0,0,0,0],this.getPlugin("synoCopyPaste").isInteractiveMode()||this.selectCell(...a,!1),e.setScrollTop(r),e.setScrollLeft(i)}this.render()}constraintZoomLevel(n){return Math.min(Math.max(Math.round(100*n)/100,this.zoomLimit.min),this.zoomLimit.max)}setZoomLevelWithCenter(n,e){let{x:t,y:r}=e,i=this.constraintZoomLevel(n),a=this.getZoomLevel();if(i===a)return;let g=(t+this.view.getScrollLeft())*i/a-t,R=(r+this.view.getScrollTop())*i/a-r;this.setZoomLevel(i,{left:g,top:R})}setZoomLevel(n,e){e===void 0&&(e=null);let t=this.getZoomLevel(),r=this.constraintZoomLevel(n),i=r&&r!==t,a=this.view.viewport,g=this.getActiveEditor();if(i){g.setZoomLevel(r),a.setZoomLevel(r);let R=this.sheet;a.updateRowOffset(R),a.updateColOffset(R),this.view.adjustCornerContainerSize(R)}if(e)a.setScrollLeft(e.left),a.setScrollTop(e.top);else if(i){let R=a.getScrollTop(),L=a.getScrollLeft();a.setScrollTop(R*r/t),a.setScrollLeft(L*r/t)}i&&(this.runHooks("afterSetZoomLevel",r),this.render())}getZoomLevel(){return this.view.viewport.getZoomLevel()}getFormulaPreview(){return this.getActiveEditor().preview.isEnabled()}setFormulaPreview(n){this.getActiveEditor().preview.setEnable(n)}setHintSelectionsDisplay(n){this.selections.hintSelections.setDisplay(n),this.fastRender()}setSearchHintSelectionsDisplay(n){this.selections.hintSelections.setSearchDisplay(n),this.fastRender()}hasFocus(){return this.rootElement.contains(document.activeElement)}focusInputField(n){let e=()=>this.getActiveEditor().input.focus(!0);n===!0?e():setTimeout(e,n=typeof n=="number"?n:100)}getHighlightBound(){let n=this.selections.multiSelections.getHighlightRange();if(!n)return null;let e=n.getTopLeftCorner(),t=n.getBottomRightCorner();return this.view.getRangeBound(e.row,e.col,t.row,t.col)}getCellBound(n,e){let t,r,i,a,g=this.sheet.getMergePlugin().getMergedRange(n,e);return g?(t=g.from.row,r=g.from.col,i=g.to.row,a=g.to.col):(t=i=n,r=a=e),this.view.getRangeBound(t,r,i,a)}getFirstVisibleRow(){let{fixedRowsTop:n}=this.sheet.getFreezePlugin();for(let e=0;e<n;e++)if(!this.sheet.isHiddenRow(e))return e;return this.view.getFirstVisibleRow()}getFirstVisibleCol(){let{fixedColumnsLeft:n}=this.sheet.getFreezePlugin();for(let e=0;e<n;e++)if(!this.sheet.isHiddenCol(e))return e;return this.view.getFirstVisibleCol()}selectCell(n,e,t,r,i,a){i===void 0&&(i=!0),a===void 0&&(a=!1),this.selectRanges([t===void 0?[n,e,n,e]:[n,e,t,r]],i===!1?void 0:"to",a)}selectRanges(n,e,t){t===void 0&&(t=!1);let r=this.sheet.countCols(),i=this.sheet.countRows(),a=this.selections.multiSelections;a.clear(),n.forEach(R=>{R[0]=Math.min(Math.max(R[0],0),i-1),R[1]=Math.min(Math.max(R[1],0),r-1),R[2]=Math.min(Math.max(R[2],0),i-1),R[3]=Math.min(Math.max(R[3],0),r-1),a.addRange(R)});let g=this.getSelectedRange();if(g){if(a.setSelectedHeaders(g.getWidth()===this.sheet.countCols(),g.getHeight()===this.sheet.countRows()),this.getActiveEditor().isOpened()&&a.getActive().setHasCorner(!1),this.runHooks("afterSelectionEnd",g),this.fastRender(),e==="range")this.scrollToRange(g.from.row,g.from.col,g.to.row,g.to.col,t);else if(e!==void 0){let R=e==="from"?g.from:g.to;this.scrollToRange(R.row,R.col,R.row,R.col,t)}}}async scrollToRange(n,e,t,r,i){i===void 0&&(i=!0);let a=new sn(n,e,t??n,r??e);return this._asyncScrollTask(()=>this.view.scrollToRange(a,i))}async scrollToDrawing(n,e){e===void 0&&(e=!0);let t=this.getPlugin("synoDrawingController");return this._asyncScrollTask(()=>t.scrollToDrawing(n,e))}async _asyncScrollTask(n){n();let e=this._scrollViewportPromise=(async()=>{let t=this.getDataBridge(),{ranges:r}=this.view.prepareRenderRanges(t);await t.calcRenderRanges(this.sheetId,r),await t.forceUpdate(),this._scrollViewportPromise===e&&(this.render(),n())})();return e}deselectCell(n){this.selections.multiSelections.isSelected()&&(this.selections.multiSelections.deselect(),this.destroyEditor().then(()=>this.fastRender(n)))}getRowColSelected(){let n=this.getSelectedRange(),e=!!n;return{row:e&&n.getWidth()===this.sheet.countCols(),col:e&&n.getHeight()===this.sheet.countRows()}}destroy(){this.sheetId&&this.runHooks("beforeHideSheet",this.sheetId),this.vHooks.run(this,"beforeHotDestroy"),this.view&&(this.view.destroy(),this.selectionView.destroy(),this.viewEvent.destroy());let n=this.selections;n.formulaSelections.destroy(),n.multiSelections.destroy(),Y(this.rootElement),this.ro.disconnect(),this._editorManager.destroy(),this.vHooks.destroy()}updateArrayFormulaSelection(n){let e=n&&this.sheet?.getSpillRange(n.row,n.col);e?this.selections.arrayFormula.setRange(e.clone()):this.selections.arrayFormula.clear()}getActiveEditor(){return this._editorManager.getActiveEditor()}addHook(n,e){this.vHooks.add(n,e,this)}addHookOnce(n,e){this.vHooks.once(n,e,this)}removeHook(n,e){this.vHooks.remove(n,e,this)}runHooks(n){for(var e=arguments.length,t=Array(e>1?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];this.vHooks.runWithArgs(this,n,t)}observe(n){let{dataBridge:e,action:t}=n;this._dataBridge&&(this.sheetId=void 0,this.view.viewport.clearSheetId(),this._dataBridge.off("afterCommand",this._handleCommandRef),this._dataBridge.off("flush:viewport",this._flushViewportRef),this._dataBridge.off("flush:search",this._flushSearchRef),this._dataBridge.off("flush:current",this._flushCurrentRef)),this._dataBridge=e,e.on("afterCommand",this._handleCommandRef),e.on("flush:viewport",this._flushViewportRef),e.on("flush:search",this._flushSearchRef),e.on("flush:current",this._flushCurrentRef),this._action=t}_markRowSizeDirty(n){this.sheetId===n&&this.view.viewport.setRecalcRow()}_markColSizeDirty(n){this.sheetId===n&&(this.view.viewport.setRecalcRow(),this.view.viewport.setRecalcCol())}_setRecalcRowCol(n){n==="col"&&this.view.viewport.setRecalcCol(),this.view.viewport.setRecalcRow()}_onAlterGridCommand(n,e,t,r,i,a){var g,R;if(this.runHooks(`after${we(e)}${we(t)}`,n,r,i),this.sheetId!==n||(this._setRecalcRowCol(t),a))return;let L=this.selections.multiSelections,W=L.getHighlightRange();if(!W)return;let K=W.clone();L[e==="create"?"onCreateRowCol":"onRemoveRowCol"](t,r,i),this._editorManager.onSelectionUpdated();let Q=L.getHighlightRange();g=K,R=Q,(g&&R?g.isEqual(R):g===R)||(Q?this.runHooks("updatePeerSelection",Q):this.runHooks("afterDeselect"))}_onResizeCommand(n,e){this.sheetId===n&&(this.view.viewport.setRecalcRow(),e==="col"&&(this.view.viewport.setRecalcCol(),this._editorManager.onResizeRowCol()))}_onHiddenCommand(n,e){e==="row"?this._markRowSizeDirty(n):e==="col"&&this._markColSizeDirty(n)}_onMoveRowColCommand(n,e,t){this.sheetId===n&&(this._setRecalcRowCol(e),this._editorManager.onMoveRowCol(e,t))}_onUnmergeCellCommand(n,e){if(this.sheetId!==n)return;let t=this.selections.multiSelections.getHighlightRange();t&&t.overlaps(e)&&(t.to.row=t.from.row,t.to.col=t.from.col,this._editorManager.onSelectionUpdated())}_handleCommand(n,e){switch(n.cmd){case"compound":for(let t of n.actions)this._handleCommand(t,e);break;case"insert_row":this._onAlterGridCommand(n.id,"create","row",n.index,n.amount,e);break;case"insert_col":this._onAlterGridCommand(n.id,"create","col",n.index,n.amount,e);break;case"remove_row":this._onAlterGridCommand(n.id,"remove","row",n.index,n.amount,e);break;case"remove_col":this._onAlterGridCommand(n.id,"remove","col",n.index,n.amount,e);break;case"resize_row":this._onResizeCommand(n.id,"row");break;case"resize_col":this._onResizeCommand(n.id,"col");break;case"hidden_row":this._onHiddenCommand(n.id,"row");break;case"hidden_col":this._onHiddenCommand(n.id,"col");break;case"move_row":this._onMoveRowColCommand(n.id,"row",Lp(n.start,n.amount1,n.amount2,n.isBackward));break;case"move_col":this._onMoveRowColCommand(n.id,"col",Lp(n.start,n.amount1,n.amount2,n.isBackward));break;case"unmerge":this._onUnmergeCellCommand(n.id,new sn(...n.range))}}};var en=function(n){return n[n.MERGE_FREEZED=2]="MERGE_FREEZED",n[n.CLEAR_MERGE_DATA=3]="CLEAR_MERGE_DATA",n[n.FREEZE_MERGED=4]="FREEZE_MERGED",n[n.HIDE_ALL_ROW=5]="HIDE_ALL_ROW",n[n.HIDE_ALL_COL=6]="HIDE_ALL_COL",n[n.VERT_MERGE_IN_FILTER=7]="VERT_MERGE_IN_FILTER",n[n.FILTER_VERT_MERGED=8]="FILTER_VERT_MERGED",n[n.REMOVE_ALL_ROW=9]="REMOVE_ALL_ROW",n[n.REMOVE_ALL_COL=10]="REMOVE_ALL_COL",n[n.SORT_MERGED=11]="SORT_MERGED",n[n.MOVE_FIRST_FILTER=12]="MOVE_FIRST_FILTER",n[n.MOVE_MERGE_CELL=13]="MOVE_MERGE_CELL",n[n.MERGE_PARTIAL=14]="MERGE_PARTIAL",n[n.EXCEED_CELL_QUOTA=15]="EXCEED_CELL_QUOTA",n[n.FILTER_AT_LEAST_TWO=16]="FILTER_AT_LEAST_TWO",n[n.MERGE_CROSS_FILTER=17]="MERGE_CROSS_FILTER",n[n.PROTECTION_WARNING=18]="PROTECTION_WARNING",n[n.PROTECTION_REJECT=19]="PROTECTION_REJECT",n[n.PROTECTION_DELETE=20]="PROTECTION_DELETE",n[n.REMOVE_DUP_NO_DATA=21]="REMOVE_DUP_NO_DATA",n[n.REMOVE_DUP_NOT_ALIGNED=22]="REMOVE_DUP_NOT_ALIGNED",n[n.REMOVE_DUP_MULTI_RANGE=23]="REMOVE_DUP_MULTI_RANGE",n[n.REMOVE_DUP_ONE_ROW=24]="REMOVE_DUP_ONE_ROW",n[n.REMOVE_DUP_DONE=25]="REMOVE_DUP_DONE",n[n.REMOVE_DUP_HIDDEN_ROW=26]="REMOVE_DUP_HIDDEN_ROW",n[n.INVALID_CHANGE=27]="INVALID_CHANGE",n[n.PIVOT_TABLE_NO_SHEET=28]="PIVOT_TABLE_NO_SHEET",n[n.PIVOT_TABLE_MISSING_ROW_HEADER=29]="PIVOT_TABLE_MISSING_ROW_HEADER",n[n.PIVOT_TABLE_ROW_NOT_ENOUGH=30]="PIVOT_TABLE_ROW_NOT_ENOUGH",n[n.PIVOT_TABLE_CONTAIN_MERGE_CELL=31]="PIVOT_TABLE_CONTAIN_MERGE_CELL",n[n.PIVOT_TABLE_OVERWRITE_CELL=32]="PIVOT_TABLE_OVERWRITE_CELL",n[n.PIVOT_TABLE_BLOCK_BY_OTHER=33]="PIVOT_TABLE_BLOCK_BY_OTHER",n[n.PIVOT_TABLE_REMOVE_PARTIAL=34]="PIVOT_TABLE_REMOVE_PARTIAL",n[n.PIVOT_TABLE_MOVE_PARTIAL=35]="PIVOT_TABLE_MOVE_PARTIAL",n[n.PIVOT_TABLE_MODIFY_PARTIAL=36]="PIVOT_TABLE_MODIFY_PARTIAL",n[n.PIVOT_TABLE_INSERT_AMONG=37]="PIVOT_TABLE_INSERT_AMONG",n[n.PIVOT_TABLE_GROUP_FAIL=38]="PIVOT_TABLE_GROUP_FAIL",n[n.PIVOT_TABLE_NULL_NAME=39]="PIVOT_TABLE_NULL_NAME",n[n.PIVOT_TABLE_FIELD_NAME_EXIST=40]="PIVOT_TABLE_FIELD_NAME_EXIST",n[n.PIVOT_TABLE_NOT_AN_ITEM=41]="PIVOT_TABLE_NOT_AN_ITEM",n[n.PIVOT_TABLE_RENAME_ITEM=42]="PIVOT_TABLE_RENAME_ITEM",n[n.PIVOT_TABLE_TOO_MANY_FIELD=43]="PIVOT_TABLE_TOO_MANY_FIELD",n[n.PIVOT_TABLE_TOO_MANY_ITEM=44]="PIVOT_TABLE_TOO_MANY_ITEM",n[n.PIVOT_TABLE_TOO_MANY_CELL=45]="PIVOT_TABLE_TOO_MANY_CELL",n[n.PIVOT_TABLE_CONVERT_TOO_MANY_RECORD=46]="PIVOT_TABLE_CONVERT_TOO_MANY_RECORD",n[n.PIVOT_TABLE_CONVERT_TOO_MANY_FIELD=47]="PIVOT_TABLE_CONVERT_TOO_MANY_FIELD",n[n.PIVOT_TABLE_CONVERT_TOO_MANY_ITEM=48]="PIVOT_TABLE_CONVERT_TOO_MANY_ITEM",n[n.PIVOT_TABLE_CONVERT_TOO_MANY_CELL=49]="PIVOT_TABLE_CONVERT_TOO_MANY_CELL",n[n.MOVE_OVERWRITE_CELL=50]="MOVE_OVERWRITE_CELL",n[n.SORT_PARTIAL_MERGED=51]="SORT_PARTIAL_MERGED",n[n.CANNOT_ACTION_ON_MERGE_CELL=52]="CANNOT_ACTION_ON_MERGE_CELL",n}(en||{});let LV=["data","format","notes","validation","cf","hyperlink","comment"];function FV(n){if(!n.data)return n;let e=n.data.map(t=>t.map(r=>_a(r)?yo.fromJSON(r):r));return{...n,data:e}}function VV(n){if(!n.data)return n;let e=n.data.map(t=>t.map(r=>Zr(r)?r.toJSON():r));return{...n,data:e}}function jf(n){return Array.isArray(n)?n:n.toArray()}function qf(n){return{cmd:"compound",actions:n}}function mu(n,e,t){return{cmd:"value",id:n,changes:e.map(r=>[r[0],r[1],Zr(r[2])?r[2].toJSON():r[2]]),source:t}}function zA(n,e,t,r){return{cmd:"value",id:n,changes:e,nfRefs:t,nfs:r}}function Vy(n,e){return{cmd:"note",id:n,changes:e}}function HV(n,e,t,r){return{cmd:"resize_row",id:n,from:e,to:t,height:r}}function $V(n,e,t,r){return{cmd:"resize_col",id:n,from:e,to:t,width:r}}function Hy(n,e,t,r,i){return e==="row"?HV(n,t,r,i):$V(n,t,r,i)}function Gp(n,e,t,r,i,a){return{cmd:`insert_${e}`,id:n,index:t,amount:r,refIndex:i,data:a}}function e_(n,e,t,r,i,a){return{cmd:`remove_${e}`,id:n,index:t,amount:r,refIndex:i,data:a}}function t_(n,e,t){return{cmd:e?"merge":"unmerge",id:n,range:Array.isArray(t)?t:t.toArray()}}function n_(n,e){return{cmd:"unmerge_overlaps",id:n,range:e.toArray()}}function zV(n,e,t,r){return{cmd:"format",id:n,changes:e,overwrite:t,source:r}}function zl(n,e,t,r,i){return{cmd:e.toLowerCase(),id:n,changes:t,overwrite:r,source:i}}function Fh(n,e,t,r,i,a,g){return{cmd:`${e}_style`,id:n,type:t.toLowerCase(),changes:r,revert:i,cellChanges:a,source:g}}function $y(n,e,t,r,i,a,g,R){return{cmd:"global_style",id:n,type:e.toLowerCase(),value:t,revert:r,rowChanges:a,colChanges:g,cellChanges:i}}function WA(n,e,t,r,i){return{cmd:"populate_autofill_data",id:n,range:e.toArray(),data:VV(t),direction:r,source:i}}function UA(n,e,t,r,i){return{cmd:"paste_autofill_data",id:n,range:e.toArray(),data:VV(t),expandFilter:r,source:i}}function WV(n,e,t,r,i){return{cmd:"autofill_number_format",id:n,range:e.toArray(),fc:t,direction:r,source:i}}function UV(n,e){return{cmd:"fix_row",id:n,row:e}}function GV(n,e){return{cmd:"fix_col",id:n,col:e}}function zy(n,e,t){return e==="row"?UV(n,t):GV(n,t)}function Wl(n,e,t,r,i){return{cmd:`${e?"hide":"show"}_${t}s`,id:n,from:r,to:i}}function GA(n,e,t){return{cmd:"create_filter",id:n,filterId:e,range:jf(t)}}function vu(n,e,t,r,i){return{cmd:`${t?"enable":"disable"}_filter${r?"_view":""}`,id:n,filterId:e,hiddenInfo:i}}function Nd(n,e,t,r,i,a){return{cmd:`set_filter${t?"_view_condition":""}`,id:n,filterId:e,col:r,condition:i,hiddenInfo:a}}function Pd(n,e,t,r,i){return{cmd:`update_filter${t?"_view":""}_range`,id:n,filterId:e,range:r?jf(r):null,conditions:i}}function r_(n,e,t,r,i){return{cmd:"create_filter_view",id:n,filterId:e,range:jf(t),name:r,isPrivate:i}}function i_(n,e,t){return{cmd:"update_filter_view_name",id:n,filterId:e,name:t}}function jV(n,e,t){return{cmd:"expand_filter_range",id:n,range:[e,t,e,t]}}function Yf(n,e){return{cmd:"set_active_filter_view",id:n,filterId:e}}function qV(n,e,t){return{cmd:"add_validation_range",id:n,validId:e,range:t.toArray()}}function jA(n,e,t){return{cmd:"create_validation",id:n,validation:e,range:t}}function YV(n,e,t){return{cmd:"remove_validation",id:n,validId:e,range:t}}function o_(n,e){return{cmd:"remove_all_validation",id:n,range:e.toArray()}}function Wy(n,e,t){return{cmd:"create_cf",id:n,cf:e,index:t}}function Uy(n,e){return{cmd:"remove_cf",id:n,cfId:e}}function a_(n,e,t){return{cmd:"update_cf_ranges",id:n,cfId:e,ranges:t}}function Gy(n,e,t,r){return{cmd:"sort",id:n,rowOrder:e,range:jf(t),applyData:r}}function jy(n,e,t){return{cmd:"insert_image",id:n,imageId:e,position:t}}function s_(n,e,t){return{cmd:"resize_image",id:n,imageId:e,position:t}}function l_(n,e){return{cmd:"remove_image",id:n,imageId:e}}function qA(n,e,t,r){return{cmd:"insert_chart",id:n,chartId:e,position:t,chartObj:r}}function u_(n,e){return{cmd:"remove_chart",id:n,chartId:e}}function h_(n,e,t){return{cmd:"resize_chart",id:n,chartId:e,position:t}}function c_(n,e,t){return{cmd:"adjust_chart",id:n,chartId:e,chartObj:t}}function d_(n,e,t,r){return{cmd:"set_chart_config",id:n,chartId:e,name:t,args:r}}function KV(n,e,t,r){return{cmd:"modify_drawings_by_insert",id:n,type:e,index:t,amount:r}}function XV(n,e,t,r){return{cmd:"modify_drawings_by_remove",id:n,type:e,index:t,amount:r}}function YA(n,e,t,r,i,a){return{cmd:"modify_drawings_by_move",id:n,type:e,start:t,amount1:r,amount2:i,isBackward:a}}function jp(n,e,t,r,i,a,g){return{cmd:`move_${e}`,id:n,start:t,amount1:r,amount2:i,isBackward:a,data:g}}function JV(n,e,t,r){return{cmd:"move_range",id:n,srcRange:e.toArray(),targetRange:t.toArray(),clearMerge:r}}function Bd(n,e,t){return{cmd:"clear_range_data",id:n,range:e.toArray(),source:t}}function Kf(n,e,t,r){return{cmd:"clear_range_related",id:n,range:e.toArray(),source:r,clearMerge:t}}function Xf(n,e,t,r,i,a){return{cmd:"move_formula_range",id:n,srcRange:jf(e),targetSheetId:t,targetRange:jf(r),keepMovingPart:i,applyData:a}}function qp(n,e,t){return{cmd:"remove_formula_range",id:n,srcRange:jf(e),applyData:t}}function KA(n,e){return{cmd:"add_internal_link",id:n,json:e}}function f_(n,e){return{cmd:"update_internal_link",id:n,json:e}}function qy(n,e){return{cmd:"remove_internal_link",id:n,linkId:e}}function XA(n,e,t,r){return{cmd:"group",id:n,type:e,from:t,to:r}}function Yy(n,e,t,r){return{cmd:"ungroup",id:n,type:e,from:t,to:r}}function JA(n,e,t,r){return{cmd:"update_group",id:n,type:e,from:t,levels:r}}function Ky(n,e,t,r){return{cmd:"set_collapse",id:n,type:e,index:t,collapse:r}}function g_(n,e){return{cmd:"set_worksheet_rtl",id:n,rtl:e}}function ZV(n,e){return{cmd:"create_comment_local",author:n,config:e}}function QV(n,e){return{cmd:"reply_comment_local",author:n,config:e}}function ZA(n,e,t,r){return{cmd:r?"reopen_comment_local":"resolve_comment_local",author:n,threadId:e,authorName:t}}function p_(n,e,t,r){return{cmd:"edit_comment_local",author:n,threadId:e,replyId:t,text:r}}function e8(n){return{cmd:"create_comment",json:n}}function t8(n){return{cmd:"reply_comment",json:n}}function n8(n){return{cmd:"reopen_comment",json:n}}function r8(n){return{cmd:"resolve_comment",json:n}}function i8(n){return{cmd:"edit_comment",json:n}}function o8(n){return{cmd:"paste_comment",jsonArray:n}}function a8(n){return{cmd:"clear_comment",jsonArray:n}}function m_(n){return{cmd:"update_external_links",entry:n}}function QA(n){return{cmd:"remove_external_links",linkIds:n}}function eM(n,e,t){return{cmd:"create_define",name:n,value:e,scope:t}}function tM(n,e){return{cmd:"remove_define",name:n,scope:e}}function v_(n,e,t){return{cmd:"modify_define",name:n,scope:t,change:e}}function s8(n){return n.cmd==="create_rule"}function l8(n){return n.cmd==="update_rule"}function Sre(n){return n.cmd==="remove_rule"}function nM(n){return{cmd:"create_rule",rule:n}}function Xy(n,e){return{cmd:"update_rule",ruleId:n,props:e}}function rM(n){return{cmd:"remove_rule",ruleId:n}}function Vh(n){return{cmd:"pivot_compound",actions:n}}function Jf(n,e){return{cmd:"create_pivot_table",table:n,cache:e}}function Zu(n){return{cmd:"delete_pivot_table",tableId:n}}function Yp(n,e){return{cmd:"update_pivot_table",table:n,cache:e}}function Jy(n,e,t){return{cmd:"move_pivot_table",tableId:n,sheetId:e,coord:t}}function y_(n,e,t){return{cmd:"set_pivot_table_caption",tableId:n,key:e,value:t}}function Ld(n,e,t,r,i,a){return{cmd:"move_pivot_axis_field",tableId:n,fieldId:e,axis:t,position:r,coordShift:i,filterUpdate:a}}function Zy(n,e,t,r){return{cmd:"insert_pivot_data_field",tableId:n,fieldId:e,position:t,json:r}}function w_(n,e,t){return{cmd:"move_pivot_data_field",tableId:n,dataFieldId:e,position:t}}function Kp(n,e){return{cmd:"remove_pivot_data_field",tableId:n,dataFieldId:e}}function Xp(n,e,t){return{cmd:"set_pivot_field_attr",tableId:n,fieldId:e,changes:t}}function b_(n,e,t){return{cmd:"set_pivot_data_field_attr",tableId:n,dataFieldId:e,changes:t}}function Jp(n,e,t,r){return{cmd:`set_pivot_field_item_${t}`,tableId:n,fieldId:e,changes:r}}function iM(n,e){return{cmd:"group_pivot_field_item",tableId:n,changes:e}}function oM(n,e){return{cmd:"ungroup_pivot_field_item",tableId:n,changes:e}}function C_(n,e,t,r){return{cmd:"set_pivot_field_number_group",tableId:n,fieldId:e,changes:t,itemsInfo:r}}function Qy(n,e,t,r,i,a){return i===void 0&&(i=!1),{cmd:"set_pivot_field_datetime_group",tableId:n,fieldId:e,changes:t,positions:r,autoFold:i,itemsInfo:a}}function u8(n,e){return{cmd:"worksheet.create",pos:n,titleTpl:e}}function h8(n,e,t,r){return{cmd:"worksheet.create_pivot_table",pos:n,titleTpl:e,cacheJson:t,tableJson:r}}function c8(n,e,t,r){return{cmd:"worksheet.create_with_data",titleTpl:n,content:e,pos:t,tabColor:r}}function __(n,e,t,r,i){return{cmd:"worksheet.create",id:n,pos:e,title:t,tabColor:r,content:i}}function d8(n,e,t,r){return{cmd:"worksheet.dup",id:n,pos:e,title:t,pivotTableIdMapping:r}}function f8(n,e,t,r,i){return{cmd:"worksheet.dup",id:n,pos:e,title:t,newId:r,pivotTableIdMapping:i}}function g8(n,e,t,r){return{cmd:"worksheet.undelete",id:n,pos:e,info:t,content:r}}function S_(n,e){return{cmd:"worksheet.delete",id:n,includeSnapshotData:e}}function I_(n,e){return{cmd:"worksheet.rename",id:n,title:e}}function x_(n){return{cmd:"worksheet.set_order",order:n}}function ew(n,e){return{cmd:"worksheet.set_hidden",id:n,hidden:e}}function tw(n,e){return{cmd:"worksheet.set_color",id:n,color:e}}class Hh{static getName(){return"Action"}constructor(){this.userSels=void 0}pushToQueue(){return!0}_toData(){return this.getRedoCommand()}toData(){return this._toData()}needInstance(){return!1}needSync(){return!0}needLockUI(){return!1}setSelections(e){this.userSels=e}getSelections(){return this.userSels}serialize(){return{name:this.constructor.getName(),args:this.dumpArgs()}}}class p8 extends Hh{static getName(){return"CompoundedAction"}constructor(e){super(),this.actions=e}needInstance(){return this.actions.some(e=>e.needInstance())}needLockUI(){return this.actions.some(e=>e.needLockUI())}getUndoCommand(){return qf(this.actions.map(e=>e.getUndoCommand()).reverse())}getRedoCommand(){return qf(this.actions.map(e=>e.getRedoCommand()))}_toData(){return qf(this.actions.filter(e=>e.needSync()).map(e=>e.toData()))}*iterateActions(){for(let e of this.actions)yield e}dumpArgs(){return[this.actions.map(e=>e.serialize())]}}class yu{static getOld(e){let t=[];for(let r=0,i=e.length;r<i;r++){let a=e[r];t.push([a[0],a[1],a[2]])}return t}static getNew(e){let t=[];for(let r=0,i=e.length;r<i;r++){let a=e[r];t.push([a[0],a[1],a[3]])}return t}}class ai extends Hh{constructor(e){super(),this.sheetId=e}needInstance(){return!0}}class aM extends ai{static getName(){return"ChangeAction"}constructor(e,t,r,i){super(e),this.changes=t,this.nfRefs=r??[],this.nfs=i??[]}getUndoCommand(){return mu(this.sheetId,yu.getOld(this.changes),Nn.Undo)}getRedoCommand(){return mu(this.sheetId,yu.getNew(this.changes),Nn.Redo)}_toData(){return zA(this.sheetId,yu.getNew(this.changes),this.nfRefs,this.nfs)}fillNumberFormats(e){e(this.changes,this.nfRefs,this.nfs)}dumpArgs(){return[this.sheetId,this.changes,this.nfRefs,this.nfs]}}class T_ extends ai{constructor(e,t,r,i,a,g,R){super(e),this.isInsert=t,this.type=r,this.index=i,this.amount=a,this.refIndex=g,this.data=R?Or(R):void 0}getUndoCommand(){let e=!this.data||this.isInsert?void 0:Or(this.data);return this.isInsert?e_(this.sheetId,this.type,this.index,this.amount,-1,e):Gp(this.sheetId,this.type,this.index,this.amount,-1,e)}getRedoCommand(){let e=this.data&&this.isInsert?Or(this.data):void 0;return this.isInsert?Gp(this.sheetId,this.type,this.index,this.amount,this.refIndex,e):e_(this.sheetId,this.type,this.index,this.amount,this.refIndex,e)}dumpArgs(){let e=this.data;return[this.sheetId,this.index,this.amount,this.isInsert?this.refIndex:e,this.isInsert?e:void 0]}}class sM extends T_{static getName(){return"CreateRowAction"}constructor(e,t,r,i,a){super(e,!0,"row",t,r,i,a)}fillNumberFormats(e){this.data&&this.data.nfRefs&&this.data.nfs&&e(this.data.changes,this.data.nfRefs,this.data.nfs)}}class lM extends T_{static getName(){return"CreateColumnAction"}constructor(e,t,r,i,a){super(e,!0,"col",t,r,i,a)}fillNumberFormats(e){this.data&&this.data.nfRefs&&this.data.nfs&&e(this.data.changes,this.data.nfRefs,this.data.nfs)}}class m8 extends T_{static getName(){return"RemoveRowAction"}constructor(e,t,r,i){super(e,!1,"row",t,r,-1,i)}}class v8 extends T_{static getName(){return"RemoveColumnAction"}constructor(e,t,r,i){super(e,!1,"col",t,r,-1,i)}}class y8 extends ai{constructor(e,t,r,i,a,g){super(e),this.type=t,this.from=r,this.to=i,this.oldSize=a||null,this.newSize=g||null}getUndoCommand(){return Hy(this.sheetId,this.type,this.from,this.to,this.oldSize)}getRedoCommand(){return Hy(this.sheetId,this.type,this.from,this.to,this.newSize)}dumpArgs(){return[this.sheetId,this.from,this.to,this.oldSize,this.newSize]}}class w8 extends y8{static getName(){return"ResizeRowAction"}constructor(e,t,r,i,a){super(e,"row",t,r,i,a)}}class b8 extends y8{static getName(){return"ResizeColumnAction"}constructor(e,t,r,i,a){super(e,"col",t,r,i,a)}}class Zf extends ai{static getName(){return"StyleChangeAction"}constructor(e,t,r,i){super(e),this.type=t,this.changes=r,this.overwrite=i}getUndoCommand(){return zl(this.sheetId,this.type,yu.getOld(this.changes),!0,Nn.Undo)}getRedoCommand(){return zl(this.sheetId,this.type,yu.getNew(this.changes),this.overwrite,Nn.Redo)}_toData(){return zl(this.sheetId,this.type,yu.getNew(this.changes),this.overwrite)}dumpArgs(){return[this.sheetId,this.type,this.changes,this.overwrite]}}class uM extends ai{static getName(){return"MergeCellAction"}constructor(e,t){super(e),this.range=t}getUndoCommand(){return t_(this.sheetId,!1,this.range)}getRedoCommand(){return t_(this.sheetId,!0,this.range)}dumpArgs(){return[this.sheetId,this.range]}}class C8 extends uM{static getName(){return"UnmergeCellAction"}getUndoCommand(){return super.getRedoCommand()}getRedoCommand(){return super.getUndoCommand()}}class _8 extends ai{constructor(e,t,r,i){super(e),this.type=t,this.newValue=r,this.oldValue=i}getUndoCommand(){return zy(this.sheetId,this.type,this.oldValue)}getRedoCommand(){return zy(this.sheetId,this.type,this.newValue)}dumpArgs(){return[this.sheetId,this.newValue,this.oldValue]}}class S8 extends _8{static getName(){return"FixedRowAction"}constructor(e,t,r){super(e,"row",t,r)}}class I8 extends _8{static getName(){return"FixedColAction"}constructor(e,t,r){super(e,"col",t,r)}}class k_ extends ai{constructor(e,t,r,i,a){super(e),this.hidden=t,this.type=r,this.from=i,this.to=a}getUndoCommand(){return Wl(this.sheetId,!this.hidden,this.type,this.from,this.to)}getRedoCommand(){return Wl(this.sheetId,this.hidden,this.type,this.from,this.to)}dumpArgs(){return[this.sheetId,this.from,this.to]}}class x8 extends k_{static getName(){return"HideRowsAction"}constructor(e,t,r){super(e,!0,"row",t,r)}}class T8 extends k_{static getName(){return"ShowRowsAction"}constructor(e,t,r){super(e,!1,"row",t,r)}}class k8 extends k_{static getName(){return"HideColsAction"}constructor(e,t,r){super(e,!0,"col",t,r)}}class R8 extends k_{static getName(){return"ShowColsAction"}constructor(e,t,r){super(e,!1,"col",t,r)}}class E8 extends ai{static getName(){return"SortAction"}constructor(e,t,r,i,a){super(e),this.range=r,this.rowOrder=t,this.collectedData=i,this.applyData=a}getUndoCommand(){let e=Array(this.rowOrder.length);for(let t=0,r=this.rowOrder.length;t<r;t++)e[this.rowOrder[t]]=t;return Gy(this.sheetId,e,this.range,this.collectedData)}getRedoCommand(){return Gy(this.sheetId,this.rowOrder,this.range)}_toData(){return Gy(this.sheetId,this.rowOrder,this.range,this.applyData)}dumpArgs(){return[this.sheetId,this.rowOrder,this.range,this.collectedData,this.applyData]}}class A8 extends ai{static getName(){return"NoteChangeAction"}constructor(e,t){super(e),this.changes=t}getUndoCommand(){return Vy(this.sheetId,yu.getOld(this.changes))}getRedoCommand(){return Vy(this.sheetId,yu.getNew(this.changes))}dumpArgs(){return[this.sheetId,this.changes]}}class M8 extends ai{static getName(){return"CreateFilterAction"}constructor(e,t,r){super(e),this.range=t,this.filterId=r}getUndoCommand(){return vu(this.sheetId,this.filterId,!1,!1)}getRedoCommand(){return vu(this.sheetId,this.filterId,!0,!1,{})}_toData(){return GA(this.sheetId,this.filterId,this.range)}dumpArgs(){return[this.sheetId,this.range,this.filterId]}}class D8 extends ai{static getName(){return"EnableFilterAction"}constructor(e,t,r){super(e),this.filterId=t,this.hide=r.hide||[]}getUndoCommand(){return vu(this.sheetId,this.filterId,!1,!1)}getRedoCommand(){return vu(this.sheetId,this.filterId,!0,!1,{hide:this.hide})}dumpArgs(){return[this.sheetId,this.filterId,{hide:this.hide}]}}class O8 extends ai{static getName(){return"DisableFilterAction"}constructor(e,t,r){super(e),this.filterId=t,this.show=r.show||[]}getUndoCommand(){return vu(this.sheetId,this.filterId,!0,!1,{hide:this.show})}getRedoCommand(){return vu(this.sheetId,this.filterId,!1,!1)}_toData(){return vu(this.sheetId,this.filterId,!1,!1,{show:this.show})}dumpArgs(){return[this.sheetId,this.filterId,{show:this.show}]}}class N8 extends ai{static getName(){return"SetFilterAction"}constructor(e,t,r,i,a,g){super(e),this.filterId=t,this.col=r,this.newCondition=i,this.oldCondition=a,this.show=g.show||[],this.hide=g.hide||[]}getUndoCommand(){return Nd(this.sheetId,this.filterId,!1,this.col,this.oldCondition,{show:this.hide,hide:this.show})}getRedoCommand(){return Nd(this.sheetId,this.filterId,!1,this.col,this.newCondition,{show:this.show,hide:this.hide})}dumpArgs(){return[this.sheetId,this.filterId,this.col,this.newCondition,this.oldCondition,{show:this.show,hide:this.hide}]}}class P8 extends ai{static getName(){return"UpdateFilterRangeAction"}constructor(e,t,r,i,a,g){super(e),this.filterId=t,this.oldRange=r??null,this.newRange=i??null,this.oldConditions=a,this.newConditions=g}getUndoCommand(){return Pd(this.sheetId,this.filterId,!1,this.oldRange,this.oldConditions)}getRedoCommand(){return Pd(this.sheetId,this.filterId,!1,this.newRange)}_toData(){return Pd(this.sheetId,this.filterId,!1,this.newRange,this.newConditions)}dumpArgs(){return[this.sheetId,this.filterId,this.oldRange,this.newRange,this.oldConditions,this.newConditions]}}class R_ extends ai{constructor(e,t,r){super(e),this.filterId=t,this.isPrivate=r}needSync(){return!this.isPrivate}dumpArgs(){return[this.sheetId,this.filterId,this.isPrivate]}}class B8 extends R_{getUndoCommand(){return vu(this.sheetId,this.filterId,!1,!0)}getRedoCommand(){return vu(this.sheetId,this.filterId,!0,!0)}}class L8 extends B8{static getName(){return"CreateFilterViewAction"}constructor(e,t,r,i,a){super(e,t,a),this.range=r,this.name=i}_toData(){return r_(this.sheetId,this.filterId,this.range,this.name,this.isPrivate)}dumpArgs(){return[this.sheetId,this.filterId,this.range,this.name,this.isPrivate]}}class hM extends B8{static getName(){return"EnableFilterViewAction"}_toData(){return this.getRedoCommand()}}class F8 extends hM{static getName(){return"DisableFilterViewAction"}getUndoCommand(){return super.getRedoCommand()}getRedoCommand(){return super.getUndoCommand()}}class V8 extends R_{static getName(){return"SetFilterViewConditionAction"}constructor(e,t,r,i,a,g){super(e,t,g),this.col=r,this.oldCondition=i,this.newCondition=a}getUndoCommand(){return Nd(this.sheetId,this.filterId,!0,this.col,this.oldCondition)}getRedoCommand(){return Nd(this.sheetId,this.filterId,!0,this.col,this.newCondition)}dumpArgs(){return[this.sheetId,this.filterId,this.col,this.oldCondition,this.newCondition,this.isPrivate]}}class H8 extends R_{static getName(){return"UpdateFilterViewNameAction"}constructor(e,t,r,i,a){super(e,t,a),this.oldName=r,this.newName=i}getUndoCommand(){return i_(this.sheetId,this.filterId,this.oldName)}getRedoCommand(){return i_(this.sheetId,this.filterId,this.newName)}dumpArgs(){return[this.sheetId,this.filterId,this.oldName,this.newName,this.isPrivate]}}class $8 extends R_{static getName(){return"UpdateFilterViewRangeAction"}constructor(e,t,r,i,a,g,R){super(e,t,R),this.oldRange=r??null,this.newRange=i??null,this.oldConditions=a,this.newConditions=g}getUndoCommand(){return Pd(this.sheetId,this.filterId,!0,this.oldRange,this.oldConditions)}getRedoCommand(){return Pd(this.sheetId,this.filterId,!0,this.newRange)}_toData(){return Pd(this.sheetId,this.filterId,!0,this.newRange,this.newConditions)}dumpArgs(){return[this.sheetId,this.filterId,this.oldRange,this.newRange,this.oldConditions,this.newConditions,this.isPrivate]}}class z8 extends ai{static getName(){return"SetActiveFilterViewAction"}constructor(e,t,r){super(e),this.oldId=t,this.newId=r}needSync(){return!1}getUndoCommand(){return Yf(this.sheetId,this.oldId)}getRedoCommand(){return Yf(this.sheetId,this.newId)}dumpArgs(){return[this.sheetId,this.oldId,this.newId]}}class W8 extends ai{constructor(e,t,r){super(e),this.validation=t,this.rangeText=r}createRemoveValidationCommand(){return YV(this.sheetId,this.validation.validId,this.rangeText)}createCreateValidationCommand(){return jA(this.sheetId,this.validation,this.rangeText)}dumpArgs(){return[this.sheetId,this.validation,this.rangeText]}}class U8 extends W8{static getName(){return"CreateValidAction"}getUndoCommand(){return this.createRemoveValidationCommand()}getRedoCommand(){return this.createCreateValidationCommand()}}class G8 extends W8{static getName(){return"RemoveValidAction"}constructor(e,t,r){super(e,{validId:t},r)}getUndoCommand(){return this.createCreateValidationCommand()}getRedoCommand(){return this.createRemoveValidationCommand()}dumpArgs(){return[this.sheetId,this.validation.validId,this.rangeText]}}class j8 extends ai{constructor(e,t,r){super(e),this.cf=t,this.index=r}createRemoveCfCommand(){return Uy(this.sheetId,this.cf.cfId)}createCreateCfCommand(){return Wy(this.sheetId,this.cf,this.index)}dumpArgs(){return[this.sheetId,this.cf,this.index]}}class q8 extends j8{static getName(){return"CreateCfAction"}getUndoCommand(){return this.createRemoveCfCommand()}getRedoCommand(){return this.createCreateCfCommand()}}class Y8 extends j8{static getName(){return"RemoveCfAction"}getUndoCommand(){return this.createCreateCfCommand()}getRedoCommand(){return this.createRemoveCfCommand()}}class K8 extends ai{static getName(){return"UpdateCfRangesAction"}constructor(e,t,r,i){super(e),this.cfId=t,this.ranges=r,this.oldRanges=i}getUndoCommand(){return a_(this.sheetId,this.cfId,this.oldRanges)}getRedoCommand(){return a_(this.sheetId,this.cfId,this.ranges)}dumpArgs(){return[this.sheetId,this.cfId,this.ranges,this.oldRanges]}}class X8 extends ai{constructor(e,t,r){super(e),this.imageId=t,this.position=r}createRemoveImageCommand(){return l_(this.sheetId,this.imageId)}createImageCommand(){return jy(this.sheetId,this.imageId,this.position)}dumpArgs(){return[this.sheetId,this.imageId,this.position]}}class J8 extends X8{static getName(){return"InsertImageAction"}getUndoCommand(){return this.createRemoveImageCommand()}getRedoCommand(){return this.createImageCommand()}}class Z8 extends X8{static getName(){return"RemoveImageAction"}getUndoCommand(){return this.createImageCommand()}getRedoCommand(){return this.createRemoveImageCommand()}}class Q8 extends ai{static getName(){return"ResizeImageAction"}constructor(e,t,r,i){super(e),this.imageId=t,this.oldPosition=r,this.newPosition=i}getUndoCommand(){return s_(this.sheetId,this.imageId,this.oldPosition)}getRedoCommand(){return s_(this.sheetId,this.imageId,this.newPosition)}dumpArgs(){return[this.sheetId,this.imageId,this.oldPosition,this.newPosition]}}class eH extends ai{constructor(e,t,r,i){super(e),this.chartId=t,this.position=r,this.chartObj=i}createRemoveChartCommand(){return u_(this.sheetId,this.chartId)}createInsertChartCommand(){return qA(this.sheetId,this.chartId,this.position,this.chartObj)}dumpArgs(){return[this.sheetId,this.chartId,this.position,this.chartObj]}}class tH extends eH{static getName(){return"InsertChartAction"}getUndoCommand(){return this.createRemoveChartCommand()}getRedoCommand(){return this.createInsertChartCommand()}}class nH extends eH{static getName(){return"RemoveChartAction"}getUndoCommand(){return this.createInsertChartCommand()}getRedoCommand(){return this.createRemoveChartCommand()}}class rH extends ai{static getName(){return"ResizeChartAction"}constructor(e,t,r,i){super(e),this.chartId=t,this.oldPosition=r,this.newPosition=i}getUndoCommand(){return h_(this.sheetId,this.chartId,this.oldPosition)}getRedoCommand(){return h_(this.sheetId,this.chartId,this.newPosition)}dumpArgs(){return[this.sheetId,this.chartId,this.oldPosition,this.newPosition]}}class iH extends ai{static getName(){return"AdjustChartAction"}constructor(e,t,r,i){super(e),this.chartId=t,this.oldChartObj=r,this.newChartObj=i}getUndoCommand(){return c_(this.sheetId,this.chartId,this.oldChartObj)}getRedoCommand(){return c_(this.sheetId,this.chartId,this.newChartObj)}dumpArgs(){return[this.sheetId,this.chartId,this.oldChartObj,this.newChartObj]}}class oH extends ai{static getName(){return"SetChartConfigAction"}constructor(e,t,r,i,a){super(e),this.chartId=t,this.name=r,this.args=i,this.invertCmd=a}getUndoCommand(){let e=this.invertCmd.map(t=>{let{name:r,args:i}=t;return d_(this.sheetId,this.chartId,r,i)});return e.length===1?e[0]:qf(e.reverse())}getRedoCommand(){return d_(this.sheetId,this.chartId,this.name,this.args)}dumpArgs(){return[this.sheetId,this.chartId,this.name,this.args,this.invertCmd]}}class aH extends Hh{needInstance(){return!1}}class nw extends aH{constructor(e){super(),this.json=e}pushToQueue(){return!1}dumpArgs(){return[this.json]}}class sH extends nw{static getName(){return"CreateCommentAction"}getUndoCommand(){return p_(this.json.author,this.json.id,this.json.id,null)}getRedoCommand(){return e8(this.json)}}class lH extends nw{static getName(){return"ReplyCommentAction"}getUndoCommand(){return p_(this.json.author,this.json.target,this.json.id,null)}getRedoCommand(){return t8(this.json)}}class uH extends nw{static getName(){return"ReopenCommentAction"}getUndoCommand(){throw Error("cant undo")}getRedoCommand(){return n8(this.json)}}class hH extends nw{static getName(){return"ResolveCommentAction"}getUndoCommand(){throw Error("cant undo")}getRedoCommand(){return r8(this.json)}}class cH extends nw{static getName(){return"EditCommentAction"}getUndoCommand(){throw Error("cant undo")}getRedoCommand(){return i8(this.json)}}class dH extends aH{constructor(e){super(),this.jsonArray=e}getClearCommand(){return a8(this.jsonArray)}getPasteCommand(){return o8(this.jsonArray)}dumpArgs(){return[this.jsonArray]}}class fH extends dH{static getName(){return"PasteCommentAction"}getUndoCommand(){return this.getClearCommand()}getRedoCommand(){return this.getPasteCommand()}}class gH extends dH{static getName(){return"ClearCommentAction"}getUndoCommand(){return this.getPasteCommand()}getRedoCommand(){return this.getClearCommand()}}function Qf(n,e){return n.map(t=>[t[0],t[e]])}class cM extends ai{static getName(){return"DimensionStyleChangeAction"}constructor(e,t,r,i,a,g){super(e),this.type=r,this.dim=t,this.changes=i,this.revert=a,this.cellChanges=g}getUndoCommand(){return Fh(this.sheetId,this.dim,this.type,Qf(this.changes,1),!0,yu.getOld(this.cellChanges),Nn.Undo)}getRedoCommand(){return Fh(this.sheetId,this.dim,this.type,Qf(this.changes,2),!1,void 0,Nn.Redo)}_toData(){return Fh(this.sheetId,this.dim,this.type,Qf(this.changes,2),this.revert,this.revert?yu.getNew(this.cellChanges):void 0)}dumpArgs(){return[this.sheetId,this.dim,this.type,this.changes,this.revert,this.cellChanges]}}class pH extends ai{static getName(){return"GlobalStyleChangeAction"}constructor(e,t,r,i,a,g,R){super(e),this.type=t,this.change=r,this.revert=i,this.rowChanges=a,this.colChanges=g,this.cellChanges=R}getUndoCommand(){return $y(this.sheetId,this.type,this.change[0],!0,yu.getOld(this.cellChanges),Qf(this.rowChanges,1),Qf(this.colChanges,1),Nn.Undo)}getRedoCommand(){return $y(this.sheetId,this.type,this.change[1],!1,void 0,void 0,void 0,Nn.Redo)}_toData(){return $y(this.sheetId,this.type,this.change[1],this.revert,this.revert?yu.getNew(this.cellChanges):void 0,this.revert?Qf(this.rowChanges,2):void 0,this.revert?Qf(this.colChanges,2):void 0)}dumpArgs(){return[this.sheetId,this.type,this.change,this.revert,this.rowChanges,this.colChanges,this.cellChanges]}}class mH extends Hh{needInstance(){return!1}}class vH extends mH{constructor(e,t,r){super(),this.name=e,this.value=t,this.scope=r}createRemoveDefineCommand(){return tM(this.name,this.scope)}createCreateDefineCommand(){return eM(this.name,this.value,this.scope)}dumpArgs(){return[this.name,this.value,this.scope]}}class yH extends vH{static getName(){return"CreateDefinedNameAction"}getUndoCommand(){return this.createRemoveDefineCommand()}getRedoCommand(){return this.createCreateDefineCommand()}}class wH extends vH{static getName(){return"RemoveDefinedNameAction"}getUndoCommand(){return this.createCreateDefineCommand()}getRedoCommand(){return this.createRemoveDefineCommand()}}class bH extends mH{static getName(){return"ModifyDefinedNameAction"}constructor(e){super(),[this.oldName,this.newName]=e.name,[this.oldValue,this.newValue]=e.value,this.scope=e.scope}getUndoCommand(){return v_(this.newName,{name:this.oldName,value:this.oldValue},this.scope)}getRedoCommand(){return v_(this.oldName,{name:this.newName,value:this.newValue},this.scope)}dumpArgs(){return[{name:[this.oldName,this.newName],value:[this.oldValue,this.newValue]},this.scope]}}class CH extends ai{constructor(e,t,r,i,a){super(e),this.dim=t,this.start=r.sec[0].start,this.amount1=r.sec[0].amount,this.amount2=r.sec[1].amount,this.isBackward=r.isBackward,this.data=i,this.collectedData=a}getUndoCommand(){return jp(this.sheetId,this.dim,this.start,this.amount2,this.amount1,!this.isBackward,this.collectedData)}getRedoCommand(){return jp(this.sheetId,this.dim,this.start,this.amount1,this.amount2,this.isBackward)}_toData(){return jp(this.sheetId,this.dim,this.start,this.amount1,this.amount2,this.isBackward,this.data)}dumpArgs(){return[this.sheetId,Lp(this.start,this.amount1,this.amount2,this.isBackward),this.data,this.collectedData]}}class _H extends CH{static getName(){return"MoveRowAction"}constructor(e,t,r,i){super(e,"row",t,r,i)}}class SH extends CH{static getName(){return"MoveColAction"}constructor(e,t,r,i){super(e,"col",t,r,i)}}class IH extends ai{static getName(){return"MoveFormulaRangeAction"}constructor(e,t,r,i,a,g,R){super(e),this.srcSheetId=e,this.srcRange=t,this.targetSheetId=r,this.targetRange=i,this.keepMovingPart=a,this.applyData=g,this.collectedData=R}getUndoCommand(){return Xf(this.targetSheetId,this.targetRange,this.srcSheetId,this.srcRange,this.keepMovingPart,this.collectedData)}getRedoCommand(){return Xf(this.srcSheetId,this.srcRange,this.targetSheetId,this.targetRange,this.keepMovingPart)}_toData(){return Xf(this.srcSheetId,this.srcRange,this.targetSheetId,this.targetRange,this.keepMovingPart,this.applyData)}dumpArgs(){return[this.sheetId,this.srcRange,this.targetSheetId,this.targetRange,this.keepMovingPart,this.applyData,this.collectedData]}}class xH extends ai{static getName(){return"RemoveFormulaRangeAction"}constructor(e,t,r,i){super(e),this.srcSheetId=e,this.srcRange=t,this.applyData=r,this.collectedData=i}getUndoCommand(){return qp(this.srcSheetId,this.srcRange,this.collectedData)}getRedoCommand(){return qp(this.srcSheetId,this.srcRange)}_toData(){return qp(this.srcSheetId,this.srcRange,this.applyData)}dumpArgs(){return[this.sheetId,this.srcRange,this.applyData,this.collectedData]}}class TH extends ai{constructor(e,t){super(e),this.json=t}createRemoveInternalLinkCommand(){return qy(this.sheetId,this.json.id)}createHyperlinkCommand(){return KA(this.sheetId,this.json)}dumpArgs(){return[this.sheetId,this.json]}}class kH extends TH{static getName(){return"AddInternalLinkAction"}getUndoCommand(){return this.createRemoveInternalLinkCommand()}getRedoCommand(){return this.createHyperlinkCommand()}}class RH extends ai{static getName(){return"UpdateInternalLinkAction"}constructor(e,t,r){super(e),this.json=t,this.oldJson=r}getUndoCommand(){return f_(this.sheetId,this.oldJson)}getRedoCommand(){return f_(this.sheetId,this.json)}dumpArgs(){return[this.sheetId,this.json,this.oldJson]}}class EH extends TH{static getName(){return"RemoveInternalLinkAction"}getUndoCommand(){return this.createHyperlinkCommand()}getRedoCommand(){return this.createRemoveInternalLinkCommand()}}class AH extends ai{constructor(e,t,r,i){super(e),this.type=t,this.from=r,this.to=i}createGroupCommand(){return XA(this.sheetId,this.type,this.from,this.to)}createUngroupCommand(){return Yy(this.sheetId,this.type,this.from,this.to)}dumpArgs(){return[this.sheetId,this.type,this.from,this.to]}}class MH extends AH{static getName(){return"GroupAction"}getUndoCommand(){return super.createUngroupCommand()}getRedoCommand(){return super.createGroupCommand()}}class DH extends AH{static getName(){return"UngroupAction"}getUndoCommand(){return super.createGroupCommand()}getRedoCommand(){return super.createUngroupCommand()}}class OH extends ai{static getName(){return"UpdateGroupAction"}constructor(e,t,r,i,a){super(e),this.type=t,this.from=r,this.newLevels=i,this.oldLevels=a}getUndoCommand(){return JA(this.sheetId,this.type,this.from,this.oldLevels)}getRedoCommand(){return JA(this.sheetId,this.type,this.from,this.newLevels)}dumpArgs(){return[this.sheetId,this.type,this.from,this.newLevels,this.oldLevels]}}class NH extends ai{static getName(){return"SetCollapseAction"}constructor(e,t,r,i,a){super(e),this.type=t,this.index=r,this.newCollapse=i,this.oldCollapse=a}getUndoCommand(){return Ky(this.sheetId,this.type,this.index,this.oldCollapse)}getRedoCommand(){return Ky(this.sheetId,this.type,this.index,this.newCollapse)}dumpArgs(){return[this.sheetId,this.type,this.index,this.newCollapse,this.oldCollapse]}}class PH extends ai{static getName(){return"SetWorksheetRtlAction"}constructor(e,t){super(e),this.rtl=t}getUndoCommand(){return g_(this.sheetId,!this.rtl)}getRedoCommand(){return g_(this.sheetId,this.rtl)}dumpArgs(){return[this.sheetId,this.rtl]}}class BH extends Hh{needInstance(){return!1}}class LH extends BH{constructor(e){super(),this.rule=e}createRemoveRuleCommand(){return rM(this.rule.ruleId)}createCreateRuleCommand(){return nM(this.rule)}dumpArgs(){return[this.rule]}}class FH extends LH{static getName(){return"CreateRuleAction"}getUndoCommand(){return this.createRemoveRuleCommand()}getRedoCommand(){return this.createCreateRuleCommand()}}class VH extends BH{static getName(){return"UpdateRuleAction"}constructor(e,t,r){super(),this.ruleId=e,this.originalProps=t,this.props=r}getUndoCommand(){return Xy(this.ruleId,this.originalProps)}getRedoCommand(){return Xy(this.ruleId,this.props)}dumpArgs(){return[this.ruleId,this.originalProps,this.props]}}class HH extends LH{static getName(){return"RemoveRuleAction"}getUndoCommand(){return this.createCreateRuleCommand()}getRedoCommand(){return this.createRemoveRuleCommand()}}class $H extends Hh{pushToQueue(){return!1}getUndoCommand(){throw Error("cant undo")}getRedoCommand(){throw Error("cant redo")}needInstance(){return!1}}class zH extends $H{static getName(){return"UpdateExternalLinks"}constructor(e){super(),this.entry=e}_toData(){return m_(this.entry)}dumpArgs(){return[this.entry]}}class WH extends $H{static getName(){return"RemoveExternalLinks"}constructor(e){super(),this.linkIds=e}_toData(){return QA(this.linkIds)}dumpArgs(){return[this.linkIds]}}class Js extends Hh{needInstance(){return!1}_toData(){return this.getRedoCommand()}toData(){return this._toData()}needLockUI(){return!0}}class UH extends Js{constructor(e){super(),this.actions=e}static getName(){return"PivotCompoundAction"}needInstance(){return this.actions.some(e=>e.needInstance())}getUndoCommand(){return Vh(this.actions.map(e=>e.getUndoCommand()).reverse())}getRedoCommand(){return Vh(this.actions.map(e=>e.getRedoCommand()))}_toData(){return Vh(this.actions.filter(e=>e.needSync()).map(e=>e.toData()))}*iterateActions(){for(let e of this.actions)yield e}dumpArgs(){return[this.actions.map(e=>e.serialize())]}}class GH extends Js{constructor(e,t){super(),this.table=e,this.cache=t}dumpArgs(){return[this.table,this.cache]}}class jH extends GH{static getName(){return"CreatePivotTableAction"}getUndoCommand(){return Zu(this.table.id)}getRedoCommand(){return Jf(this.table,this.cache)}}class qH extends GH{static getName(){return"DeletePivotTableAction"}getUndoCommand(){return Jf(this.table,this.cache)}getRedoCommand(){return Zu(this.table.id)}}class YH extends Js{static getName(){return"UpdatePivotTableAction"}constructor(e,t,r,i){super(),this.oldTable=e,this.newTable=t,this.oldCache=r,this.newCache=i}getUndoCommand(){return Yp(this.oldTable,this.oldCache)}getRedoCommand(){return Yp(this.newTable,this.newCache)}dumpArgs(){return[this.oldTable,this.newTable,this.oldCache,this.newCache]}}class KH extends Js{static getName(){return"MovePivotTableAction"}constructor(e,t,r,i,a){super(),this.tableId=e,this.oldSheetId=t,this.oldCoord=r,this.sheetId=i,this.coord=a}getUndoCommand(){return Jy(this.tableId,this.oldSheetId,this.oldCoord)}getRedoCommand(){return Jy(this.tableId,this.sheetId,this.coord)}dumpArgs(){return[this.tableId,this.oldSheetId,this.oldCoord,this.sheetId,this.coord]}}class XH extends Js{static getName(){return"SetPivotTableCaptionAction"}constructor(e,t,r,i){super(),this.tableId=e,this.key=t,this.oldValue=r,this.newValue=i}getUndoCommand(){return y_(this.tableId,this.key,this.oldValue)}getRedoCommand(){return y_(this.tableId,this.key,this.newValue)}dumpArgs(){return[this.tableId,this.key,this.oldValue,this.newValue]}}class JH extends Js{static getName(){return"MovePivotAxisFieldAction"}constructor(e,t,r,i,a,g,R){super(),this.tableId=e,this.fieldId=t,this.oldPosition=r,this.newPosition=i,this.coordShift=a,this.oldFilter=g,this.newFilter=R}getReversedShift(){return this.coordShift&&{row:-this.coordShift.row,col:-this.coordShift.col}}getUndoCommand(){return Ld(this.tableId,this.fieldId,this.oldPosition.axis,this.oldPosition.position,this.getReversedShift(),this.oldFilter)}getRedoCommand(){return Ld(this.tableId,this.fieldId,this.newPosition.axis,this.newPosition.position,this.coordShift,this.newFilter)}dumpArgs(){return[this.tableId,this.fieldId,this.oldPosition,this.newPosition,this.coordShift,this.oldFilter,this.newFilter]}}class ZH extends Js{static getName(){return"InsertPivotDataFieldAction"}constructor(e,t,r){super(),this.tableId=e,this.dataField=t,this.position=r}getUndoCommand(){return Kp(this.tableId,this.dataField.id)}getRedoCommand(){return Zy(this.tableId,this.dataField.fieldId,this.position,this.dataField)}dumpArgs(){return[this.tableId,this.dataField,this.position]}}class QH extends Js{static getName(){return"MovePivotDataFieldAction"}constructor(e,t,r,i){super(),this.tableId=e,this.dataFieldId=t,this.oldPosition=r,this.newPosition=i}getUndoCommand(){return w_(this.tableId,this.dataFieldId,this.oldPosition)}getRedoCommand(){return w_(this.tableId,this.dataFieldId,this.newPosition)}dumpArgs(){return[this.tableId,this.dataFieldId,this.oldPosition,this.newPosition]}}class e$ extends Js{static getName(){return"RemovePivotDataFieldAction"}constructor(e,t,r){super(),this.tableId=e,this.dataField=t,this.position=r}getUndoCommand(){return Zy(this.tableId,this.dataField.fieldId,this.position,this.dataField)}getRedoCommand(){return Kp(this.tableId,this.dataField.id)}dumpArgs(){return[this.tableId,this.dataField,this.position]}}class t$ extends Js{static getName(){return"SetPivotFieldAttrAction"}constructor(e,t,r){super(),this.tableId=e,this.fieldId=t,this.changes=r}getUndoCommand(){return Xp(this.tableId,this.fieldId,this.changes.map(e=>{let[t,r,i]=e;return[t,r]}))}getRedoCommand(){return Xp(this.tableId,this.fieldId,this.changes.map(e=>{let[t,r,i]=e;return[t,i]}))}dumpArgs(){return[this.tableId,this.fieldId,this.changes]}}class n$ extends Js{static getName(){return"SetPivotDataFieldAttrAction"}constructor(e,t,r){super(),this.tableId=e,this.fieldId=t,this.changes=r}getUndoCommand(){return b_(this.tableId,this.fieldId,this.changes.map(e=>{let[t,r,i]=e;return[t,r]}))}getRedoCommand(){return b_(this.tableId,this.fieldId,this.changes.map(e=>{let[t,r,i]=e;return[t,i]}))}dumpArgs(){return[this.tableId,this.fieldId,this.changes]}}class r$ extends Js{static getName(){return"SetPivotFieldItemAttrAction"}constructor(e,t,r,i){super(),this.tableId=e,this.fieldId=t,this.changes=i,this.attr=r}getUndoCommand(){let e=this.changes.map(t=>{let[r,i,a]=t;return[r,i]});return Jp(this.tableId,this.fieldId,this.attr,e)}getRedoCommand(){let e=this.changes.map(t=>{let[r,i,a]=t;return[r,a]});return Jp(this.tableId,this.fieldId,this.attr,e)}dumpArgs(){return[this.tableId,this.fieldId,this.attr,this.changes]}}class i$ extends Js{constructor(e,t){super(),this.tableId=e,this.changes=t}dumpArgs(){return[this.tableId,this.changes]}getChangesOld(){return this.changes.map(e=>({...e,changes:e.changes.map(t=>[t[0],t[1]]),itemsInfo:e.itemsInfo?.[0]??null})).reverse()}getChangesNew(){return this.changes.map(e=>({...e,changes:e.changes.map(t=>[t[0],t[2]]),itemsInfo:e.itemsInfo?.[1]??null}))}getGroupCommand(e){let t=e.map(r=>{let{fieldId:i,childFieldIds:a,changes:g,insertPosition:R,itemsInfo:L}=r;return{fieldId:i,childFieldIds:a,changes:g,insertPosition:R,itemsInfo:L}});return iM(this.tableId,t)}getUngroupCommand(e){let t=e.map(r=>{let{fieldId:i,changes:a,itemsInfo:g}=r;return{fieldId:i,changes:a,itemsInfo:g}});return oM(this.tableId,t)}}class o$ extends i${static getName(){return"GroupPivotFieldItemAction"}getUndoCommand(){return this.getUngroupCommand(this.getChangesOld())}getRedoCommand(){return this.getGroupCommand(this.getChangesNew())}}class a$ extends i${static getName(){return"UngroupPivotFieldItemAction"}getUndoCommand(){return this.getGroupCommand(this.getChangesOld())}getRedoCommand(){return this.getUngroupCommand(this.getChangesNew())}}class s$ extends Js{static getName(){return"SetPivotFieldNumberGroupAction"}constructor(e){super(),this.changesInfo=e}getUndoCommand(){let{tableId:e,fieldId:t,oldGrouping:r,oldItems:i}=this.changesInfo;return C_(e,t,r,i)}getRedoCommand(){let{tableId:e,fieldId:t,newGrouping:r,newItems:i}=this.changesInfo;return C_(e,t,r,i)}dumpArgs(){return[this.changesInfo]}}class l$ extends Js{static getName(){return"SetPivotFieldDatetimeGroupAction"}constructor(e){super(),this.changesInfo=e}getUndoCommand(){let{tableId:e,fieldId:t,oldGrouping:r,oldPositions:i,oldItems:a}=this.changesInfo;return Qy(e,t,r,i,void 0,a)}getRedoCommand(){let{tableId:e,fieldId:t,newGrouping:r,newPositions:i,newItems:a}=this.changesInfo;return Qy(e,t,r,i,void 0,a)}dumpArgs(){return[this.changesInfo]}}[aM,sM,m8,lM,v8,w8,b8,Zf,uM,C8,S8,I8,x8,T8,k8,R8,E8,A8,M8,D8,O8,N8,P8,L8,hM,F8,V8,H8,$8,z8,U8,G8,q8,Y8,K8,J8,Z8,Q8,tH,nH,rH,iH,oH,sH,lH,uH,hH,fH,gH,cH,cM,pH,_H,SH,IH,xH,kH,RH,EH,MH,DH,OH,NH,PH,p8,yH,wH,bH,FH,VH,HH,zH,WH,UH,jH,qH,YH,KH,XH,JH,ZH,QH,e$,t$,n$,r$,o$,a$,s$,l$].reduce((n,e)=>(n[e.getName()]=e,n),{});class E_ extends Hh{constructor(e){super(),this.sheetId=e}needInstance(){return!0}needLockUI(){return!0}}class Ire extends Hh{constructor(e){super(),this.payload=e}needInstance(){return!1}getUndoCommand(){throw Error("cant undo")}getRedoCommand(){throw Error("cant redo")}_toData(){return this.payload}dumpArgs(){throw Error("RPCAction should not dump")}}class u$ extends E_{constructor(e,t,r,i){super(e),this.pos=t,this.info=r,this.content=i}createUndeleteWorksheetCommand(){return g8(this.sheetId,this.pos,this.info,this.content)}createDeleteWorksheetCommand(){return S_(this.sheetId,!1)}needInstance(){return!1}dumpArgs(){return[this.sheetId,this.pos,this.info,this.content]}}class h$ extends u${static getName(){return"DeleteWorksheetAction"}getUndoCommand(){return this.createUndeleteWorksheetCommand()}getRedoCommand(){return this.createDeleteWorksheetCommand()}}class Zp extends u${static getName(){return"UndeleteWorksheetAction"}getUndoCommand(){return this.createDeleteWorksheetCommand()}getRedoCommand(){return this.createUndeleteWorksheetCommand()}}class c$ extends Hh{static getName(){return"SetWorksheetOrderAction"}constructor(e,t){super(),this.oldOrder=e,this.newOrder=t}getUndoCommand(){return x_(this.oldOrder)}getRedoCommand(){return x_(this.newOrder)}needInstance(){return!1}dumpArgs(){return[this.oldOrder,this.newOrder]}}class d$ extends E_{static getName(){return"RenameWorksheetAction"}constructor(e,t,r){super(e),this.oldTitle=t,this.newTitle=r}getUndoCommand(){return I_(this.sheetId,this.oldTitle)}getRedoCommand(){return I_(this.sheetId,this.newTitle)}dumpArgs(){return[this.sheetId,this.oldTitle,this.newTitle]}}class f$ extends E_{static getName(){return"SetWorksheetHiddenAction"}constructor(e,t){super(e),this.hidden=t}getUndoCommand(){return ew(this.sheetId,!this.hidden)}getRedoCommand(){return ew(this.sheetId,this.hidden)}dumpArgs(){return[this.sheetId,this.hidden]}}class g$ extends E_{static getName(){return"SetWorksheetColorAction"}constructor(e,t,r){super(e),this.oldColor=t,this.newColor=r}getUndoCommand(){return tw(this.sheetId,this.oldColor)}getRedoCommand(){return tw(this.sheetId,this.newColor)}dumpArgs(){return[this.sheetId,this.oldColor,this.newColor]}}[h$,Zp,c$,d$,f$,g$].reduce((n,e)=>(n[e.getName()]=e,n),{});function Qp(n,e,t){let r="";switch(typeof t=="number"&&(t='"'+t+'"'),n){case"containsBlanks":r=`LEN(TRIM(${e}))=0`;break;case"notContainsBlanks":r=`LEN(TRIM(${e}))>0`;break;case"containsText":r=`NOT(ISERROR(SEARCH((${t}),(${e}))))`;break;case"notContainsText":r=`ISERROR(SEARCH((${t}),(${e})))`;break;case"beginsWith":r=`LEFT((${e}),LEN(${t}))=(${t})`;break;case"endsWith":r=`RIGHT((${e}),LEN(${t}))=(${t})`;break;case"exactText":r=`EXACT((${e}), (${t}))`;break;case"cellIs":r=t}return r}function p$(n,e,t,r){let i;switch(n){case"greaterThan":i=`(${e})>(${t})`;break;case"greaterThanOrEqual":i=`(${e})>=(${t})`;break;case"lessThan":i=`(${e})<(${t})`;break;case"lessThanOrEqual":i=`(${e})<=(${t})`;break;case"equal":i=`(${e})=(${t})`;break;case"notEqual":i=`(${e})<>(${t})`;break;case"between":i=`AND((${e})>=(${t}),(${e})<=(${r}))`;break;case"notBetween":i=`OR((${e})<(${t}),(${e})>(${r}))`;break;default:i=`${t}`}return i}function m$(n,e){return n.constructor===e.constructor&&n.equals(e)&&(!n.shName||n.shName===e.shName)}function v$(n,e){let t=[];for(let r=0;r<n.length;r++){let i=n[r];m$(i,e)||t.push(i)}return t}function y$(n,e,t,r){r&&(r.unregisterImplicit(),r.unregisterResult());let i=Ar.changeFormula(e,{delta:t}),a=n.getWorkbook(),g=a.getFormulaParser().parseRange(i,{sheetId:n.sheetId,item:r});if(r){let R={row:r.row,col:r.col},L=new mi(R,R,a.getNameById(n.sheetId));if(r.needUpdate){let W=Ac(i),K=n.formula.mapFormulaRange(v$(W,L));r.register(K)}if(g&&!m$(g,L)){let W=n.formula.mapFormulaRange([g])[0];r.registerResult(W)}}return g}function Fd(n,e,t,r,i){return r.isFormula?function(a,g,R,L,W){L&&L.unregisterImplicit();let K=Ar.changeFormula(g,{delta:R}),Q=a.getWorkbook(),oe=Q.getFormulaParser().exec(K,{sheetId:a.sheetId,item:L,preValidateCell:W});if(L&&L.needUpdate){let se={row:L.row,col:L.col},he=new mi(se,se,Q.getNameById(a.sheetId)),me=v$(Ac(K),he);if(!a.formula.checkCrossRefError(me)){let ye=a.formula.mapFormulaRange(me);L.register(ye)}}return!!oe.result}(n,r.formula1,r.delta,r.item,r.preValidateCell):w$(i=i===void 0?n.formula.getCellValue(e,t):i,r)}function w$(n,e){let t=!1,r=Ar.Comparator,i=e.formula1,a=e.formula2;if(e.strictType&&(typeof i!=typeof n||a&&typeof a!=typeof n))return e.operator==="notEqual";switch(e.operator){case"greaterThan":t=r.greaterThan(n,i);break;case"greaterThanOrEqual":t=r.greaterThanOrEqual(n,i);break;case"lessThan":t=r.lessThan(n,i);break;case"lessThanOrEqual":t=r.lessThanOrEqual(n,i);break;case"equal":t=r.equal(n,i);break;case"notEqual":t=r.not(n,i);break;case"between":t=r.greaterThanOrEqual(n,i)&&r.lessThanOrEqual(n,a);break;case"notBetween":t=r.lessThan(n,i)||r.greaterThan(n,a)}return t}function b$(n,e,t){let{ranges:r,text:i,altType:a}=n,{type:g,operator:R,f1:L,f2:W}=n;if(g==="cellIs")switch(R){case"beginsWith":case"containsText":case"endsWith":g=R;break;case"notContains":R=g="notContainsText"}let K=kp(r).map(oe=>nr.textToRangeByWorkbook(oe,e,t)).filter(ga),Q=e.getLocale();return L?(L=iA(Q,L),W=iA(Q,W)):L=Qp(g,Bi(K[0].from),iA(Q,i,{text:!0})),{cfId:n.id,type:g,op:R,ranges:Wf(K),style:n.style,f1:L,f2:W,text:i,altType:a}}function A_(n){let e=n.split(":");if(e.length>2)return null;let t=C$(e[0]);if(t===null)return null;let[r,i,a]=t,g=r,R=i,L=a;if(e.length===2){let W=C$(e[1]);if(W===null||([g,R,L]=W,g!==r))return null}switch(i>R&&([i,R]=[R,i]),a>L&&([a,L]=[L,a]),r){case 0:return new mi({row:i,col:a},{row:R,col:L});case 2:return new na(a,L);case 1:return new ta(i,R);default:return null}}let xre=/^\$?([A-Z]+)?\$?(\d+)?$/i;function C$(n){let e=xre.exec(n);if(!e)return null;let t=e[1]!==void 0?Ia(e[1]):-1,r=e[2]!==void 0?tu(e[2]):-1,i=0;return r===-1&&t===-1?null:(r===-1?i=2:t===-1&&(i=1),[i,r,t])}var em=function(n){return n[n.NOTHING=0]="NOTHING",n[n.WARNING=1]="WARNING",n[n.REJECT=2]="REJECT",n}({});function rw(n,e){return n.isRangeAllowed(e)}function tm(n,e,t){return rw(n,new ta(e,t))}function iw(n,e,t){return rw(n,new na(e,t))}function _$(n,e){let t=A_(e);return t&&rw(n,t)}function dM(n,e,t){return n.isInsertable(e,t)}let Tre=class{isGrantable(n,e,t){let r=this.getStore().find(n);return!!r&&r.isGrantable(e,t)}create(n){this.getStore().create(n)&&this.emit("createRule",n)}delete(n){let e=this.getStore().delete(n);e&&this.emit("removeRule",e)}update(n,e){let t=this.getStore().find(n);if(!t)return;let r=t.getProps();this.getStore().update(n,e)&&this.emit("updateRule",t.id,r,e)}isEmpty(){return this.getStore().list().length===0}getNonPermittedRules(n,e,t){return this.getStore().list().filter(r=>r.isACLMode()&&r.getSheetId()===n&&!r.validateACL(e,t))}getWarningRules(n){return this.getStore().list().filter(e=>!e.isACLMode()&&e.getSheetId()===n)}validateCommand(n,e,t,r){if(n.cmd==="compound")return n.actions&&n.actions.every(a=>this.validateCommand(a,e,t,r));let i=n.id;return!(i&&this.getNonPermittedRules(i,e,t).some(a=>!function(g,R){switch(R.cmd){case"value":case"font":case"fill":case"alignment":case"border":case"format":case"quotePrefix":case"note":var L,W;return L=g,!!Array.isArray(W=R.changes)&&W.every(se=>{let[he,me]=se;return L.isCoordsAllowed(he,me)});case"create_row":return tm(g,R.index,R.index);case"create_col":return iw(g,R.index,R.index);case"remove_row":return tm(g,R.index,R.index+R.amount-1);case"remove_col":return iw(g,R.index,R.index+R.amount-1);case"resize_row":case"hide_rows":case"show_rows":return tm(g,R.from,R.to);case"resize_col":case"hide_cols":case"show_cols":return iw(g,R.from,R.to);case"merge":case"unmerge":case"sort":case"create_filter":return function(se,he){let[me,ye,Te,Me]=he;return rw(se,new mi({row:me,col:ye},{row:Te,col:Me}))}(g,R.range);case"enable_filter":case"disable_filter":case"set_filter":let oe=function(se){return tm(K,se.from,se.to)};var K=g,Q=R.hiddenInfo;return Q?!(Array.isArray(Q.show)&&!Q.show.every(oe)||Array.isArray(Q.hide)&&!Q.hide.every(oe)):!1;case"create_validation":case"remove_validation":return _$(g,R.range);case"create_cf":return R.cf&&Array.isArray(R.cf.ranges)&&R.cf.ranges.every(se=>_$(g,se));case"row_style":return Array.isArray(R.changes)&&R.changes.every(se=>tm(g,se[0],se[0]));case"col_style":return Array.isArray(R.changes)&&R.changes.every(se=>iw(g,se[0],se[0]));case"global_style":case"worksheet.delete":return!1;case"move_row":return tm(g,R.start,R.start+R.amount1-1)&&dM(g,"row",R.start+R.amount1+R.amount2);case"move_col":return iw(g,R.start,R.start+R.amount1-1)&&dM(g,"col",R.start+R.amount1+R.amount2);case"worksheet.rename":case"worksheet.set_hidden":case"worksheet.set_color":return g.getType()!=="worksheet"}return!0}(a,n)))&&(!["update_rule","remove_rule","create_rule"].includes(n.cmd)||2>this.validateRuleCommand(n,{uid:e,gids:t,canOrganize:r}))}validateRuleCommand(n,e){let{uid:t,gids:r,canOrganize:i}=e;if(t===4294967295)return 2;if(s8(n))return this.validateRuleAction(n.rule,e);if(!i&&!this.isGrantable(n.ruleId,t,r))return 2;if(l8(n)){let a=this.getStore().find(n.ruleId);return a?this.validateRuleAction({...a.toJSON(),...n.props},e):2}return 0}validateRuleAction(n,e,t){return n.type==="worksheet"?this.checkProtectedWorksheet(n.sheetId,!0,e,t):this.checkProtectRefRange(Ph(n.range||"").map(A_),n.sheetId,e,t)}checkProtectRefRange(n,e,t,r){let i=Ph(n);return this.checkProtection(a=>{var g;return g=a,i.every(R=>rw(g,R))},e,t,{ruleId:r})}checkProtectedWorksheet(n,e,t,r){return this.checkProtection(i=>!e&&i.getType()!=="worksheet",n,t,{ruleId:r})}checkProtectedWorksheets(n,e,t,r){return Math.max(...n.map(i=>this.checkProtectedWorksheet(i,e,t,r)))}checkProtectedCoords(n,e,t,r){return this.checkProtection(i=>{var a;return a=i,e.every(g=>{let{row:R,col:L}=g;return a.isCoordsAllowed(R,L)})},n,t,r)}checkProtectedInsertable(n,e,t,r,i){return this.checkProtection(a=>dM(a,e,t),n,r,i)}checkProtection(n,e,t,r){if(r===void 0&&(r={}),this.isEmpty())return 0;let i=r.ruleId?L=>r.ruleId===L.id||n(L):n,{uid:a,gids:g,canOrganize:R}=t;return R||this.getNonPermittedRules(e,a,g).every(i)?+!(r.warning||this.getWarningRules(e).every(i)):2}};var ow=function(n){return n[n.NONE=0]="NONE",n[n.TOP=1]="TOP",n[n.RIGHT=2]="RIGHT",n[n.BOTTOM=4]="BOTTOM",n[n.LEFT=8]="LEFT",n[n.OUTER=15]="OUTER",n[n.HORIZONTAL=16]="HORIZONTAL",n[n.VERTICAL=32]="VERTICAL",n[n.INNER=48]="INNER",n[n.ALL=63]="ALL",n}({});let fM=["top","right","bottom","left"];function Qu(n){return n&&typeof n!="string"?Array.isArray(n)?{top:n[0],right:n[1],bottom:n[2],left:n[3]}:n:{top:n,right:n,bottom:n,left:n}}function M_(n){return!n||n.top===null&&n.right===null&&n.bottom===null&&n.left===null}function eg(n,e,t){e=Qu(e);let r=n?{...n}:Qu(n);for(let i=0;i<fM.length;i++){let a=fM[i];t&ow[fM[i].toUpperCase()]&&(r[a]=e[a])}return r}function aw(n,e,t,r,i,a){return I$(S$(n,e,t,r,i),a)}function S$(n,e,t,r,i){let a=ow[r.toUpperCase()]||0;if(a===16&&t.getHeight()===1||a===32&&t.getWidth()===1||a===48&&t.getHeight()===1&&t.getWidth()===1)return[];let g=[],R=Qu(i);return t.normalize().forAll((L,W)=>{let K,Q=(K=0,L===t.from.row&&(K|=1&a),W===t.to.col&&(K|=2&a),L===t.to.row&&(K|=4&a),W===t.from.col&&(K|=8&a),16&a&&(L>t.from.row&&(K|=1),L<t.to.row&&(K|=4)),32&a&&(W>t.from.col&&(K|=8),W<t.to.col&&(K|=2)),K);if(Q===0)return!0;15&Q&&g.push({row:L,col:W,pattern:15&Q,colors:R})}),[...g,...function(L,W,K,Q){let oe=[],se=K.getTopLeftCorner(),he=K.getBottomRightCorner();if(1&Q&&se.row>0){let me=se.row-1;for(let ye=se.col;ye<=he.col;ye++)oe.push({row:me,col:ye,pattern:4,colors:null})}if(2&Q&&he.col+1<W){let me=he.col+1;for(let ye=se.row;ye<=he.row;ye++)oe.push({row:ye,col:me,pattern:8,colors:null})}if(4&Q&&he.row+1<L){let me=he.row+1;for(let ye=se.col;ye<=he.col;ye++)oe.push({row:me,col:ye,pattern:1,colors:null})}if(8&Q&&se.col>0){let me=se.col-1;for(let ye=se.row;ye<=he.row;ye++)oe.push({row:ye,col:me,pattern:2,colors:null})}return oe}(n,e,t,a)]}function I$(n,e){let t=new Map;for(let{row:i,col:a,pattern:g,colors:R}of n){let L=`${i}-${a}`,W=t.get(L);W?(W.pattern|=g,W.colors=eg(W.colors,R,g)):t.set(L,{row:i,col:a,pattern:g,colors:R})}let r=[];for(let{row:i,col:a,pattern:g,colors:R}of t.values()){let L=Qu(e(i,a)),W=eg(L,R,g);!function(K,Q){let oe=M_(K),se=M_(Q);return oe||se?oe===se:K.top===Q.top&&K.right===Q.right&&K.bottom===Q.bottom&&K.left===Q.left}(W,L)&&(M_(W)&&(15&g)==15?r.push([i,a,null]):r.push([i,a,eg(void 0,W,g)]))}return r}function x$(n,e,t,r){let i=[],a=ow[t.toUpperCase()]||0,g=e.getTopLeftCorner(),R=e.getBottomRightCorner();return 1&a&&g.row>0&&i.push([g.row-1,eg(void 0,r,4)]),4&a&&R.row+1<n&&i.push([R.row+1,eg(void 0,r,1)]),i}function T$(n,e,t,r){let i=[],a=ow[t.toUpperCase()]||0,g=e.getTopLeftCorner(),R=e.getBottomRightCorner();return 8&a&&g.col>0&&i.push([g.col-1,eg(void 0,r,2)]),2&a&&R.col+1<n&&i.push([R.col+1,eg(void 0,r,8)]),i}class gM{constructor(){this.fRanges=new Map}add(e){let t=e._range.key();this.fRanges.has(t)||this.fRanges.set(t,e)}getFormulaRange(e){return this.fRanges.get(e.key())}matchFormulaRanges(e,t){let r=[];return this.fRanges.forEach(i=>{i.hasCoord(e,t)&&r.push(i)}),r}getCoverFormulaRanges(e,t){let r=[];return this.fRanges.forEach(i=>{i.isWithinRow(e.row,t.row)&&i.isWithinCol(e.col,t.col)&&r.push(i)}),r}getAllFormulaRanges(){let e=Array(this.fRanges.size),t=0;return this.fRanges.forEach(r=>{e[t++]=r}),e}getFormulaRangeBetweenRow(e,t){let r=[];return this.fRanges.forEach(i=>{i.isBetweenRow(e,t)&&r.push(i)}),r}getFormulaRangeBetweenCol(e,t){let r=[];return this.fRanges.forEach(i=>{i.isBetweenCol(e,t)&&r.push(i)}),r}}class D_{constructor(e){this._range=e,this.formulaItems=[],this.condItems=[],this.unitItems=[],this.spillItem=null}getRange(){return this._range}register(e){this.formulaItems.push(e)}unregister(e){let t=this.formulaItems.indexOf(e);t>=0&&this.formulaItems.splice(t,1)}getRegisteredItems(){return this.formulaItems}registerCond(e){this.condItems.push(e)}unregisterCond(e){let t=this.condItems.indexOf(e);t>=0&&this.condItems.splice(t,1)}getRegisteredConds(){return this.condItems}registerUnit(e){this.unitItems.push(e)}unregisterUnit(e){let t=this.unitItems.indexOf(e);t>=0&&this.unitItems.splice(t,1)}getRegisteredUnits(){return this.unitItems}registerSpillItem(e){if(this.spillItem)throw Error("need unregister spill item first");this.spillItem=e}unregisterSpillItem(){this.spillItem=null}getSpillItem(){return this.spillItem}rangeEqual(e){return this._range.equals(e)}hasCoord(e,t){return this._range.includes(e,t)}isBetweenRow(e,t){return this._range.isBetweenRow(e,t)}isBetweenCol(e,t){return this._range.isBetweenCol(e,t)}isWithinRow(e,t){return this._range.isWithinRow(e,t)}isWithinCol(e,t){return this._range.isWithinCol(e,t)}}class pM{constructor(){this.blocks=[]}getFormulaRange(e){let t=this._getFirstBlock(e);return t&&t.getFormulaRange(e)}getOrCreateFormulaRange(e){let t=this.getFormulaRange(e);if(t)return t;let r=new D_(e);return this.addFormulaRange(r),r}addFormulaRange(){}_getFirstBlock(e){return this._getBlock(e.from)}_getBlock(){}_getBlockByIndex(){}matchFormulaRanges(e,t){return this._getBlock(e,t)?.matchFormulaRanges(e,t)??[]}getCoverFormulaRanges(e,t){return this._getBlock(e.row,e.col)?.getCoverFormulaRanges(e,t)??[]}getRefItemsToRow(){}getRefItemsToColumn(){}_each(e){for(let t=0;t<this.blocks.length&&(!this.blocks[t]||e(this.blocks[t],t)!==!1);t++);}getAllFormulaRanges(){let e=new Set,t=[];return this._each(r=>{let i=r.getAllFormulaRanges();for(let a=0;a<i.length;a++){let g=i[a];e.has(g)||(e.add(g),t.push(g))}}),t}}class k$ extends pM{addFormulaRange(e){let{from:t,to:r}=e._range,i=$h(t.row),a=$h(r.row),g=t.col>>4,R=r.col>>4;for(let L=i;L<=a;L++)for(let W=g;W<=R;W++)this._getBlockByIndex(L,W,!0).add(e);return e}_getFirstBlock(e){return this._getBlock(e.from.row,e.from.col)}_getBlock(e,t){let r=$h(e),i=t>>4;return this._getBlockByIndex(r,i,!1)}_getBlockByIndex(e,t,r){if(r&&(this.blocks[e]||(this.blocks[e]=[]),this.blocks[e][t]||(this.blocks[e][t]=new gM)),this.blocks[e])return this.blocks[e][t]}getRefItemsToRow(e,t){let r=$h(e),i=$h(t),a=[];if(this.blocks[r])for(let g=0;g<this.blocks[r].length;g++)this.blocks[r][g]&&ki(a,this.blocks[r][g].getFormulaRangeBetweenRow(e,t));for(let g=r+1;g<i;g++)if(this.blocks[g])for(let R=0;R<this.blocks[g].length;R++)this.blocks[g][R]&&ki(a,this.blocks[g][R].getAllFormulaRanges());if(i!==r&&this.blocks[i])for(let g=0;g<this.blocks[i].length;g++)this.blocks[i][g]&&ki(a,this.blocks[i][g].getFormulaRangeBetweenRow(e,t));return a}getRefItemsToColumn(e,t){let r=[],i=e>>4,a=t>>4;for(let g=0;g<this.blocks.length;g++)if(this.blocks[g]){this.blocks[g][i]&&ki(r,this.blocks[g][i].getFormulaRangeBetweenCol(e,t));for(let R=i+1;R<a;R++)this.blocks[g][R]&&ki(r,this.blocks[g][R].getAllFormulaRanges());a!==i&&this.blocks[g][a]&&ki(r,this.blocks[g][a].getFormulaRangeBetweenCol(e,t))}return r}_each(e){for(let t=0;t<this.blocks.length;t++){let r=this.blocks[t];if(r){for(let i=0;i<r.length;i++)if(r[i]&&e(r[i])===!1)return}}}}class kre extends pM{addFormulaRange(e){let t=$h(e._range.from),r=$h(e._range.to);for(let i=t;i<=r;i++)this._getBlockByIndex(i,!0).add(e);return e}_getBlock(e){return this._getBlockByIndex($h(e),!1)}_getBlockByIndex(e,t){return t&&!this.blocks[e]&&(this.blocks[e]=new gM),this.blocks[e]}getRefItemsToRow(e,t){let r=[],i=$h(e),a=$h(t);this.blocks[i]&&ki(r,this.blocks[i].getFormulaRangeBetweenRow(e,t));for(let g=i+1;g<a;g++)this.blocks[g]&&ki(r,this.blocks[g].getAllFormulaRanges());return a!==i&&this.blocks[a]&&ki(r,this.blocks[a].getFormulaRangeBetweenRow(e,t)),r}getRefItemsToColumn(){let e=[];for(let t=0;t<this.blocks.length;t++)this.blocks[t]&&ki(e,this.blocks[t].getAllFormulaRanges());return e}}class Rre extends pM{addFormulaRange(e){let t=e._range.from>>4,r=e._range.to>>4;for(let i=t;i<=r;i++)this._getBlockByIndex(i,!0).add(e);return e}_getFirstBlock(e){return this._getBlock(0,e.from)}_getBlock(e,t){return this._getBlockByIndex(t>>4,!1)}_getBlockByIndex(e,t){return t&&!this.blocks[e]&&(this.blocks[e]=new gM),this.blocks[e]}getRefItemsToRow(){let e=[];for(let t=0;t<this.blocks.length;t++)this.blocks[t]&&ki(e,this.blocks[t].getAllFormulaRanges());return e}getRefItemsToColumn(e,t){let r=[],i=e>>4,a=t>>4;this.blocks[i]&&ki(r,this.blocks[i].getFormulaRangeBetweenCol(e,t));for(let g=i+1;g<a;g++)this.blocks[g]&&ki(r,this.blocks[g].getAllFormulaRanges());return a!==i&&this.blocks[a]&&ki(r,this.blocks[a].getFormulaRangeBetweenCol(e,t)),r}}function $h(n){if(n<32768)return n>>7;let e=Math.floor(Math.log(n)/Math.log(2))-14;return(n-(1<<14+e)>>7+e)+256+(e-1)*128}class sw{constructor(e){this.href=void 0,this.circularRef=!1,this.isSubtotal=void 0,this.needUpdate=!!e,this.nfId=void 0}markSubtotal(){this.isSubtotal=!0}setNfIdHint(e,t){t===void 0&&(t=!1),(!this.nfId||t)&&(this.nfId=e||0)}resetNfIdHint(){this.nfId&&(this.nfId=void 0)}reset(){this.href=void 0,this.resetNfIdHint(),this.circularRef=!1}isLink(){return this.href!==void 0}markCircularReference(){this.circularRef=!0}setUnknownName(e){}setSelfImplicit(){}}class R$ extends sw{setLinkId(e){this.linkId=e}getLinkId(){return this.linkId}}class O_{register(e){this.unregister();for(let t=0;t<e.length;t++){let r=e[t];this.deps.push(r),this.registerRange(r)}}unregister(){if(this.deps.length!==0){for(let e=0;e<this.deps.length;e++)this.unregisterRange(this.deps[e]);this.deps.length=0}}}class E$ extends sw{constructor(e){super(e),this.deps=[],this.implicitDeps=void 0}registerImplicit(e){this.isRegistered(e)||(this.implicitDeps?this.implicitDeps.push(e):this.implicitDeps=[e],this.registerRange(e))}unregisterImplicit(){if(this.hasImplicitDeps()&&this.implicitDeps){for(let e of this.implicitDeps)this.unregisterRange(e);this.implicitDeps.length=0}}hasImplicitDeps(){return this.implicitDeps!==void 0&&this.implicitDeps.length>0}isRegistered(e){return this.deps.indexOf(e)>=0||this.implicitDeps!==void 0&&this.implicitDeps.indexOf(e)>=0}register(e){O_.prototype.register.call(this,e)}unregister(){O_.prototype.unregister.call(this)}registerRange(e){e.register(this)}unregisterRange(e){e.unregister(this)}unregisterAll(){this.unregister(),this.unregisterImplicit()}}class A$ extends E${constructor(e){super(),this.value=[],this.formulaItems=new Set,this.register([e])}getFormulaItems(){return this.formulaItems}addFormulaItem(e){this.formulaItems.add(e)}getValueAt(e,t,r){return this.value[e]||(this.value[e]=[]),this.value[e][t]===void 0&&(this.value[e][t]=r()),this.value[e][t]}clear(){this.value=[],this.formulaItems.clear(),this.unregisterAll()}}function Vd(n){return n.constructor===A$}class nm extends E${constructor(e,t,r,i,a){super(a),this.sheet=e,this.row=t,this.col=r,this.formula=i,this.value=null,this.needDimension=!0,this.spillRange=null,this.externalRef=null,this.needCheckSpill=!1,this.spillError=null,this.selfImplicit=!1}notifySpillRange(){if(!this.spillRange)return;let e=nr.createFromRange(this.spillRange.getRange(),this.sheet);e&&this.sheet.notifyRangeChanges(e)}setSpillRange(e){this.spillRange&&e&&this.spillRange.rangeEqual(e.getRange())||this.spillRange===e||(this.spillRange&&(this.spillRange.unregisterSpillItem(),this.notifySpillRange()),this.spillRange=e,e&&(e.registerSpillItem(this),this.notifySpillRange()),this.sheet.notifySheetChanges(["formulaDimensions"]),this.needCheckSpill=!0)}getSpillRange(){return this.spillRange}setSpillError(e){this.spillError=e}setSpillResult(e){!this.spillError!=!e&&this.notifySpillRange(),this.setSpillError(e),this.needCheckSpill=!1}getSpillErrorValue(){if(!this.spillError)throw Error("need check spill error first");return this.spillError.err}addExternalRef(e){this.externalRef||(this.externalRef=new Set),this.externalRef.add(e),e.addFormulaItem(this)}clearExternalRef(){if(this.externalRef){for(let e of this.externalRef)e.deleteFormulaItem(this);this.externalRef.clear()}}unregisterAll(){super.unregisterAll(),this.setSpillRange(null),this.clearExternalRef()}isDependSelfOnly(){return this.deps.length===0}getValue(){return this.error===void 0?this.value:this.error.err}getValueSize(){let e=this.getValue(),t=1,r=1;return Array.isArray(e)&&(t=e.length,Array.isArray(e[0])&&(r=e[0].length)),{height:t,width:r}}getPosition(){return{row:this.row,col:this.col}}reset(){super.reset(),this.needUpdate=!0,this.error&&(this.error=void 0),this.clearExternalRef(),this.unregisterImplicit()}setUnknownName(e){this.sheet.getWorkbook().getUnknownRefManager().addItem(e,this)}setSelfImplicit(){this.selfImplicit=!0}getStateJSON(){return{previewValue:Array.isArray(this.value)?null:this.value,href:this.href,nfId:this.nfId,formula:this.formula,hasSpillError:!!this.spillError}}static createId(e,t){return`${e},${t}`}}function mM(n){return n instanceof nm}class N_{registerRange(e){e.registerCond(this)}unregisterRange(e){e.unregisterCond(this)}}class M$ extends nm{constructor(e,t,r,i){super(e,t,r,"",!0),this.cond=i}notifyUpdate(){this.cond.onDepUpdate(this.row,this.col)}registerRange(e){N_.prototype.registerRange.call(this,e)}unregisterRange(e){N_.prototype.unregisterRange.call(this,e)}}class Ere extends M${constructor(e,t,r,i){super(e,t,r,i),this.resultDep=null}registerResult(e){this.unregisterResult(),this.resultDep=e,this.registerRange(e)}unregisterResult(){this.resultDep&&(this.unregisterRange(this.resultDep),this.resultDep=null)}unregisterAll(){super.unregisterAll(),this.unregisterResult()}}class Are extends O_{constructor(e){super(),this.cond=e,this.deps=[]}notifyUpdate(){this.cond.onDepUpdate()}registerRange(e){N_.prototype.registerRange.call(this,e)}unregisterRange(e){N_.prototype.unregisterRange.call(this,e)}}class P_ extends O_{constructor(e){super(),this.unit=e,this.deps=[]}notifyAlterGrid(e,t,r,i,a,g){this.unit.notifyAlterGrid(e,t,r,i,a,g)}notifyMove(e,t,r,i){this.unit.notifyMove(e,t,r,i)}notifyRename(e,t,r){this.unit.notifyRename(e,t,r)}notifyMoveFormulaRange(e,t,r,i){this.unit.notifyMoveFormulaRange(e,t,r,i)}notifyRemoveFormulaRange(e,t){this.unit.notifyRemoveFormulaRange(e,t)}notifyRecalcUnknown(){this.unit.notifyRecalcUnknown()}notifyDeleteSheet(){this.unit.notifyDeleteSheet()}getSheet(){return this.unit.getSheet()}registerRange(e){e.registerUnit(this)}unregisterRange(e){e.unregisterUnit(this)}}class Mre{constructor(e){this.container=new k$,this.rowContainer=new kre,this.colContainer=new Rre,this.nameContainer=e.getNameManager().getContainer(),this.spillContainer=new k$}getContainer(){return this.container}getRowContainer(){return this.rowContainer}getColContainer(){return this.colContainer}getNameContainer(){return this.nameContainer}getSpillContainer(){return this.spillContainer}matchFormulaRanges(e,t,r){let i,a=[];return(i=this.container.matchFormulaRanges(e,t))&&ki(a,i),(i=this.rowContainer.matchFormulaRanges(e,0))&&ki(a,i),(i=this.colContainer.matchFormulaRanges(0,t))&&ki(a,i),(i=this.nameContainer.matchFormulaRanges(e,t,r))&&ki(a,i),(i=this.spillContainer.matchFormulaRanges(e,t))&&ki(a,i),a}getDependencies(e,t,r){let i=[],a=new Set,g=new Set,R=[],L=new Set,W=[],K=new Set,Q=new Set,oe=[];function se(me){for(let ye=0;ye<me.length;ye++)g.has(me[ye])||(g.add(me[ye]),oe.push(me[ye]))}let he=e.getNameById(t.sheetId);for(let me=0;me<r.length;me++)se(this.matchFormulaRanges(r[me].row,r[me].col,he));for(let me of oe){let ye=me.getSpillItem();if(ye&&!ye.needCheckSpill){let Te=ye.sheet;nr.createFromRange(me.getRange(),Te)?.eachCell((Oe,ze)=>{se(Te.getFormulaDepManager().matchFormulaRanges(Oe,ze,Te.getName()))}),W.push(ye)}}for(;oe.length>0;){let me=oe.pop();(function Te(Me){for(let Oe of Me){if(Vd(Oe)){Q.has(Oe)||(Q.add(Oe),Te(Oe.getFormulaItems()));return}if(!a.has(Oe)&&!Oe.needUpdate){a.add(Oe),i.push(Oe);let ze=Oe.sheet,We=ze.getFormulaDepManager(),qe=e.getNameById(ze.sheetId);se(We.matchFormulaRanges(Oe.row,Oe.col,qe))}K.has(Oe)||Oe.needDimension||K.add(Oe)}})(me.getRegisteredItems());let ye=me.getRegisteredConds();for(let Te=0;Te<ye.length;Te++)L.has(ye[Te])||R.push(ye[Te])}return{deps:i,conds:R,vectorSet:Q,spills:W,dimMayChange:K}}getCoverItems(e){let t=this.container.getCoverFormulaRanges(e.from,e.to)??[];return this._getUniqItems(t)}getItemsByCoords(e){let t=new Set;for(let r of e)for(let i of this.container.matchFormulaRanges(r.row,r.col))t.has(i)||t.add(i);return this._getUniqItems(Array.from(t))}getRefItemsToRowCol(e,t,r){return e==="row"?this.getRefItemsToRow(t,r):e==="col"?this.getRefItemsToColumn(t,r):void 0}getRefItemsToRow(e,t){let r=this.container.getRefItemsToRow(e,t).concat(this.rowContainer.getRefItemsToRow(e,t),this.colContainer.getRefItemsToRow(e,t),this.nameContainer.getRefItemsToRow(e,t),this.spillContainer.getRefItemsToRow(e,t));return r=ts(r),this._getUniqItems(r)}getRefItemsToColumn(e,t){let r=this.container.getRefItemsToColumn(e,t).concat(this.rowContainer.getRefItemsToColumn(e,t),this.colContainer.getRefItemsToColumn(e,t),this.nameContainer.getRefItemsToColumn(e,t),this.spillContainer.getRefItemsToColumn(e,t));return r=ts(r),this._getUniqItems(r)}_getUniqItems(e){let t=[],r=[],i=[],a=new Set;for(let g=0;g<e.length;g++){ki(t,e[g].getRegisteredItems()),ki(r,e[g].getRegisteredConds()),ki(i,e[g].getRegisteredUnits());let R=e[g].getSpillItem();R&&a.add(R)}return{deps:ts(t),conds:ts(r),units:ts(i),spills:a}}getNotMyOwnItems(e){let t=this.container.getAllFormulaRanges().concat(this.rowContainer.getAllFormulaRanges(),this.colContainer.getAllFormulaRanges(),this.nameContainer.getAllFormulaRanges()),{deps:r,conds:i,units:a}=this._getUniqItems(t),g=R=>R.sheet!==e;return{items:r.filter(R=>!Vd(R)&&g(R)),conds:i.filter(g),units:a.filter(R=>R.getSheet()!==e)}}getRenameRelatedItems(){let e=this.container.getAllFormulaRanges().concat(this.rowContainer.getAllFormulaRanges(),this.colContainer.getAllFormulaRanges()),t=[],r=[];for(let i=0;i<e.length;i++)ki(t,e[i].getRegisteredItems().filter(a=>!Vd(a))),ki(r,e[i].getRegisteredUnits());return{deps:ts(t),units:ts(r)}}}class Dre{constructor(){this.cells=[]}addCell(e,t){this.cells[e]=t}getCell(e){return this.cells[e]||null}_getCells(){return this.cells}getColLength(){return this.cells.length}forEach(e,t){this.cells.forEach(e,t)}}let lw=function(n,e){for(var t=-1,r=n==null?0:n.length,i=Array(r);++t<r;)i[t]=e(n[t],t,n);return i},B_=function(n,e){return n===e||n!=n&&e!=e},L_=function(n,e){for(var t=n.length;t--;)if(B_(n[t][0],e))return t;return-1};var Ore=Array.prototype.splice;function Pc(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var r=n[e];this.set(r[0],r[1])}}Pc.prototype.clear=function(){this.__data__=[],this.size=0},Pc.prototype.delete=function(n){var e=this.__data__,t=L_(e,n);return!(t<0)&&(t==e.length-1?e.pop():Ore.call(e,t,1),--this.size,!0)},Pc.prototype.get=function(n){var e=this.__data__,t=L_(e,n);return t<0?void 0:e[t][1]},Pc.prototype.has=function(n){return L_(this.__data__,n)>-1},Pc.prototype.set=function(n,e){var t=this.__data__,r=L_(t,n);return r<0?(++this.size,t.push([n,e])):t[r][1]=e,this};let D$=function(n){if(!fa(n))return!1;var e=ru(n);return e=="[object Function]"||e=="[object GeneratorFunction]"||e=="[object AsyncFunction]"||e=="[object Proxy]"};var vM=Bl["__core-js_shared__"],O$=function(){var n=/[^.]+$/.exec(vM&&vM.keys&&vM.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),Nre=Function.prototype.toString;let tg=function(n){if(n!=null){try{return Nre.call(n)}catch{}try{return n+""}catch{}}return""};var Pre=/^\[object .+?Constructor\]$/,Bre=Object.prototype,Lre=Function.prototype.toString,Fre=Bre.hasOwnProperty,Vre=RegExp("^"+Lre.call(Fre).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");let Hre=function(n){return!!fa(n)&&(!O$||!(O$ in n))&&(D$(n)?Vre:Pre).test(tg(n))},ng=function(n,e){var t=n?.[e];return Hre(t)?t:void 0};var uw=ng(Bl,"Map"),hw=ng(Object,"create"),$re=Object.prototype.hasOwnProperty,zre=Object.prototype.hasOwnProperty;function rg(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var r=n[e];this.set(r[0],r[1])}}rg.prototype.clear=function(){this.__data__=hw?hw(null):{},this.size=0},rg.prototype.delete=function(n){var e=this.has(n)&&delete this.__data__[n];return this.size-=+!!e,e},rg.prototype.get=function(n){var e=this.__data__;if(hw){var t=e[n];return t==="__lodash_hash_undefined__"?void 0:t}return $re.call(e,n)?e[n]:void 0},rg.prototype.has=function(n){var e=this.__data__;return hw?e[n]!==void 0:zre.call(e,n)},rg.prototype.set=function(n,e){var t=this.__data__;return this.size+=+!this.has(n),t[n]=hw&&e===void 0?"__lodash_hash_undefined__":e,this};let Wre=function(n){var e=typeof n;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?n!=="__proto__":n===null},F_=function(n,e){var t=n.__data__;return Wre(e)?t[typeof e=="string"?"string":"hash"]:t.map};function Bc(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var r=n[e];this.set(r[0],r[1])}}function zh(n){var e=this.__data__=new Pc(n);this.size=e.size}Bc.prototype.clear=function(){this.size=0,this.__data__={hash:new rg,map:new(uw||Pc),string:new rg}},Bc.prototype.delete=function(n){var e=F_(this,n).delete(n);return this.size-=+!!e,e},Bc.prototype.get=function(n){return F_(this,n).get(n)},Bc.prototype.has=function(n){return F_(this,n).has(n)},Bc.prototype.set=function(n,e){var t=F_(this,n),r=t.size;return t.set(n,e),this.size+=+(t.size!=r),this},zh.prototype.clear=function(){this.__data__=new Pc,this.size=0},zh.prototype.delete=function(n){var e=this.__data__,t=e.delete(n);return this.size=e.size,t},zh.prototype.get=function(n){return this.__data__.get(n)},zh.prototype.has=function(n){return this.__data__.has(n)},zh.prototype.set=function(n,e){var t=this.__data__;if(t instanceof Pc){var r=t.__data__;if(!uw||r.length<199)return r.push([n,e]),this.size=++t.size,this;t=this.__data__=new Bc(r)}return t.set(n,e),this.size=t.size,this};let Ure=function(n,e){for(var t=-1,r=n==null?0:n.length;++t<r&&e(n[t],t,n)!==!1;);return n};var V_=function(){try{var n=ng(Object,"defineProperty");return n({},"",{}),n}catch{}}();let N$=function(n,e,t){e=="__proto__"&&V_?V_(n,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):n[e]=t};var Gre=Object.prototype.hasOwnProperty;let yM=function(n,e,t){var r=n[e];Gre.call(n,e)&&B_(r,t)&&(t!==void 0||e in n)||N$(n,e,t)},cw=function(n,e,t,r){var i=!t;t||(t={});for(var a=-1,g=e.length;++a<g;){var R=e[a],L=void 0;L===void 0&&(L=n[R]),i?N$(t,R,L):yM(t,R,L)}return t},jre=function(n,e){for(var t=-1,r=Array(n);++t<n;)r[t]=e(t);return r};var P$=M&&!M.nodeType&&M,B$=P$&&!0&&x&&!x.nodeType&&x,L$=B$&&B$.exports===P$?Bl.Buffer:void 0;let H_=(L$?L$.isBuffer:void 0)||function(){return!1};var qre=/^(?:0|[1-9]\d*)$/;let $_=function(n,e){var t=typeof n;return!!(e=e??9007199254740991)&&(t=="number"||t!="symbol"&&qre.test(n))&&n>-1&&n%1==0&&n<e},wM=function(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=9007199254740991};var uo={};uo["[object Float32Array]"]=uo["[object Float64Array]"]=uo["[object Int8Array]"]=uo["[object Int16Array]"]=uo["[object Int32Array]"]=uo["[object Uint8Array]"]=uo["[object Uint8ClampedArray]"]=uo["[object Uint16Array]"]=uo["[object Uint32Array]"]=!0,uo["[object Arguments]"]=uo["[object Array]"]=uo["[object ArrayBuffer]"]=uo["[object Boolean]"]=uo["[object DataView]"]=uo["[object Date]"]=uo["[object Error]"]=uo["[object Function]"]=uo["[object Map]"]=uo["[object Number]"]=uo["[object Object]"]=uo["[object RegExp]"]=uo["[object Set]"]=uo["[object String]"]=uo["[object WeakMap]"]=!1;let z_=function(n){return function(e){return n(e)}};var F$=M&&!M.nodeType&&M,dw=F$&&!0&&x&&!x.nodeType&&x,bM=dw&&dw.exports===F$&&pf.process,rm=function(){try{var n=dw&&dw.require&&dw.require("util").types;return n||bM&&bM.binding&&bM.binding("util")}catch{}}(),V$=rm&&rm.isTypedArray,H$=V$?z_(V$):function(n){return ws(n)&&wM(n.length)&&!!uo[ru(n)]},Yre=Object.prototype.hasOwnProperty;let $$=function(n,e){var t=Ka(n),r=!t&&Sf(n),i=!t&&!r&&H_(n),a=!t&&!r&&!i&&H$(n),g=t||r||i||a,R=g?jre(n.length,String):[],L=R.length;for(var W in n)(e||Yre.call(n,W))&&!(g&&(W=="length"||i&&(W=="offset"||W=="parent")||a&&(W=="buffer"||W=="byteLength"||W=="byteOffset")||$_(W,L)))&&R.push(W);return R};var Kre=Object.prototype;let CM=function(n){var e=n&&n.constructor;return n===(typeof e=="function"&&e.prototype||Kre)},z$=function(n,e){return function(t){return n(e(t))}};var Xre=z$(Object.keys,Object),Jre=Object.prototype.hasOwnProperty;let Zre=function(n){if(!CM(n))return Xre(n);var e=[];for(var t in Object(n))Jre.call(n,t)&&t!="constructor"&&e.push(t);return e},fw=function(n){return n!=null&&wM(n.length)&&!D$(n)},gw=function(n){return fw(n)?$$(n):Zre(n)},Qre=function(n){var e=[];if(n!=null)for(var t in Object(n))e.push(t);return e};var eie=Object.prototype.hasOwnProperty;let tie=function(n){if(!fa(n))return Qre(n);var e=CM(n),t=[];for(var r in n)r=="constructor"&&(e||!eie.call(n,r))||t.push(r);return t},_M=function(n){return fw(n)?$$(n,!0):tie(n)};var W$=M&&!M.nodeType&&M,U$=W$&&!0&&x&&!x.nodeType&&x,G$=U$&&U$.exports===W$?Bl.Buffer:void 0,j$=G$?G$.allocUnsafe:void 0;let nie=function(n,e){if(e)return n.slice();var t=n.length,r=j$?j$(t):new n.constructor(t);return n.copy(r),r},rie=function(n,e){var t=-1,r=n.length;for(e||(e=Array(r));++t<r;)e[t]=n[t];return e},iie=function(n,e){for(var t=-1,r=n==null?0:n.length,i=0,a=[];++t<r;){var g=n[t];e(g,t,n)&&(a[i++]=g)}return a},q$=function(){return[]};var oie=Object.prototype.propertyIsEnumerable,Y$=Object.getOwnPropertySymbols,SM=Y$?function(n){return n==null?[]:iie(Y$(n=Object(n)),function(e){return oie.call(n,e)})}:q$,IM=z$(Object.getPrototypeOf,Object),K$=Object.getOwnPropertySymbols?function(n){for(var e=[];n;)Cf(e,SM(n)),n=IM(n);return e}:q$;let X$=function(n,e,t){var r=e(n);return Ka(n)?r:Cf(r,t(n))},xM=function(n){return X$(n,gw,SM)},J$=function(n){return X$(n,_M,K$)};var TM=ng(Bl,"DataView"),kM=ng(Bl,"Promise"),im=ng(Bl,"Set"),RM=ng(Bl,"WeakMap"),Z$="[object Map]",Q$="[object Promise]",e7="[object Set]",t7="[object WeakMap]",n7="[object DataView]",aie=tg(TM),sie=tg(uw),lie=tg(kM),uie=tg(im),hie=tg(RM),ig=ru;(TM&&ig(new TM(new ArrayBuffer(1)))!=n7||uw&&ig(new uw)!=Z$||kM&&ig(kM.resolve())!=Q$||im&&ig(new im)!=e7||RM&&ig(new RM)!=t7)&&(ig=function(n){var e=ru(n),t=e=="[object Object]"?n.constructor:void 0,r=t?tg(t):"";if(r)switch(r){case aie:return n7;case sie:return Z$;case lie:return Q$;case uie:return e7;case hie:return t7}return e});let pw=ig;var cie=Object.prototype.hasOwnProperty;let die=function(n){var e=n.length,t=new n.constructor(e);return e&&typeof n[0]=="string"&&cie.call(n,"index")&&(t.index=n.index,t.input=n.input),t};var W_=Bl.Uint8Array;let EM=function(n){var e=new n.constructor(n.byteLength);return new W_(e).set(new W_(n)),e},fie=function(n,e){var t=e?EM(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.byteLength)};var gie=/\w*$/;let pie=function(n){var e=new n.constructor(n.source,gie.exec(n));return e.lastIndex=n.lastIndex,e};var r7=$s?$s.prototype:void 0,i7=r7?r7.valueOf:void 0;let mie=function(n,e){var t=e?EM(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.length)},vie=function(n,e,t){var r=n.constructor;switch(e){case"[object ArrayBuffer]":return EM(n);case"[object Boolean]":case"[object Date]":return new r(+n);case"[object DataView]":return fie(n,t);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 mie(n,t);case"[object Map]":case"[object Set]":return new r;case"[object Number]":case"[object String]":return new r(n);case"[object RegExp]":return pie(n);case"[object Symbol]":return i7?Object(i7.call(n)):{}}};var o7=Object.create,yie=function(){function n(){}return function(e){if(!fa(e))return{};if(o7)return o7(e);n.prototype=e;var t=new n;return n.prototype=void 0,t}}(),a7=rm&&rm.isMap,wie=a7?z_(a7):function(n){return ws(n)&&pw(n)=="[object Map]"},s7=rm&&rm.isSet,bie=s7?z_(s7):function(n){return ws(n)&&pw(n)=="[object Set]"},l7="[object Arguments]",u7="[object Function]",h7="[object Object]",eo={};eo[l7]=eo["[object Array]"]=eo["[object ArrayBuffer]"]=eo["[object DataView]"]=eo["[object Boolean]"]=eo["[object Date]"]=eo["[object Float32Array]"]=eo["[object Float64Array]"]=eo["[object Int8Array]"]=eo["[object Int16Array]"]=eo["[object Int32Array]"]=eo["[object Map]"]=eo["[object Number]"]=eo[h7]=eo["[object RegExp]"]=eo["[object Set]"]=eo["[object String]"]=eo["[object Symbol]"]=eo["[object Uint8Array]"]=eo["[object Uint8ClampedArray]"]=eo["[object Uint16Array]"]=eo["[object Uint32Array]"]=!0,eo["[object Error]"]=eo[u7]=eo["[object WeakMap]"]=!1;let c7=function n(e,t,r,i,a,g){var R,L=1&t,W=2&t,K=4&t;if(r&&(R=a?r(e,i,a,g):r(e)),R!==void 0)return R;if(!fa(e))return e;var Q=Ka(e);if(Q){if(R=die(e),!L)return rie(e,R)}else{var oe,se,he,me,ye,Te=pw(e),Me=Te==u7||Te=="[object GeneratorFunction]";if(H_(e))return nie(e,L);if(Te==h7||Te==l7||Me&&!a){if(R=W||Me||typeof(oe=e).constructor!="function"||CM(oe)?{}:yie(IM(oe)),!L)return W?(he=(se=R)&&cw(e,_M(e),se),cw(e,K$(e),he)):(ye=(me=R)&&cw(e,gw(e),me),cw(e,SM(e),ye))}else{if(!eo[Te])return a?e:{};R=vie(e,Te,L)}}g||(g=new zh);var Oe=g.get(e);if(Oe)return Oe;g.set(e,R),bie(e)?e.forEach(function(qe){R.add(n(qe,t,r,qe,e,g))}):wie(e)&&e.forEach(function(qe,Ke){R.set(Ke,n(qe,t,r,Ke,e,g))});var ze=K?W?J$:xM:W?_M:gw,We=Q?void 0:ze(e);return Ure(We||e,function(qe,Ke){We&&(qe=e[Ke=qe]),yM(R,Ke,n(qe,t,r,Ke,e,g))}),R};var Cie=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,_ie=/^\w*$/;let AM=function(n,e){if(Ka(n))return!1;var t=typeof n;return!!(t=="number"||t=="symbol"||t=="boolean"||n==null||Sc(n))||_ie.test(n)||!Cie.test(n)||e!=null&&n in Object(e)};function MM(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw TypeError("Expected a function");var t=function(){var r=arguments,i=e?e.apply(this,r):r[0],a=t.cache;if(a.has(i))return a.get(i);var g=n.apply(this,r);return t.cache=a.set(i,g)||a,g};return t.cache=new(MM.Cache||Bc),t}MM.Cache=Bc;var Sie=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Iie=/\\(\\)?/g,xie=function(n){var e=MM(n,function(r){return t.size===500&&t.clear(),r}),t=e.cache;return e}(function(n){var e=[];return n.charCodeAt(0)===46&&e.push(""),n.replace(Sie,function(t,r,i,a){e.push(i?a.replace(Iie,"$1"):r||t)}),e}),d7=$s?$s.prototype:void 0,f7=d7?d7.toString:void 0;let Tie=function n(e){if(typeof e=="string")return e;if(Ka(e))return lw(e,n)+"";if(Sc(e))return f7?f7.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t},U_=function(n){return n==null?"":Tie(n)},om=function(n,e){return Ka(n)?n:AM(n,e)?[n]:xie(U_(n))},am=function(n){if(typeof n=="string"||Sc(n))return n;var e=n+"";return e=="0"&&1/n==-1/0?"-0":e},mw=function(n,e){e=om(e,n);for(var t=0,r=e.length;n!=null&&t<r;)n=n[am(e[t++])];return t&&t==r?n:void 0},g7=function(n,e,t){var r=-1,i=n.length;e<0&&(e=-e>i?0:i+e),(t=t>i?i:t)<0&&(t+=i),i=e>t?0:t-e>>>0,e>>>=0;for(var a=Array(i);++r<i;)a[r]=n[r+e];return a},kie=function(n,e){var t,r;return e=om(e,n),t=n,(n=(r=e).length<2?t:mw(t,g7(r,0,-1)))==null||delete n[am(pl(e))]};var Rie=Object.prototype,p7=Function.prototype.toString,Eie=Rie.hasOwnProperty,Aie=p7.call(Object);let Mie=function(n){if(!ws(n)||ru(n)!="[object Object]")return!1;var e=IM(n);if(e===null)return!0;var t=Eie.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&p7.call(t)==Aie},Die=function(n){return Mie(n)?void 0:n},Oie=function(n){return n!=null&&n.length?dv(n,1):[]},Nie=function(n,e,t){switch(t.length){case 0:return n.call(e);case 1:return n.call(e,t[0]);case 2:return n.call(e,t[0],t[1]);case 3:return n.call(e,t[0],t[1],t[2])}return n.apply(e,t)};var m7=Math.max;let v7=function(n,e,t){return e=m7(e===void 0?n.length-1:e,0),function(){for(var r=arguments,i=-1,a=m7(r.length-e,0),g=Array(a);++i<a;)g[i]=r[e+i];i=-1;for(var R=Array(e+1);++i<e;)R[i]=r[i];return R[e]=t(g),Nie(n,this,R)}};var Pie=Date.now,y7=function(n){var e=0,t=0;return function(){var r=Pie(),i=16-(r-t);if(t=r,i>0){if(++e>=800)return arguments[0]}else e=0;return n.apply(void 0,arguments)}}(V_?function(n,e){return V_(n,"toString",{configurable:!0,enumerable:!1,value:function(){return e},writable:!0})}:_d);let w7=function(n){return y7(v7(n,void 0,Oie),n+"")};var sm=w7(function(n,e){var t={};if(n==null)return t;var r=!1;e=lw(e,function(a){return a=om(a,n),r||(r=a.length>1),a}),cw(n,J$(n),t),r&&(t=c7(t,7,Die));for(var i=e.length;i--;)kie(t,e[i]);return t});function DM(n,e){return["w","s","outlineLevel"].every(t=>n[t]===e[t])&&["hidden","collapse"].every(t=>(n[t]??!1)===(e[t]??!1))}class Bie{constructor(){this.list=[{start:1,data:null}]}set(e,t,r){e>t&&([e,t]=[t,e]),e=$A(e,1,16384),t=$A(t,1,16384);let i=this.cutAt(e),a=this.cutAt(t+1);i!==-1&&(a>i+1&&this.list.splice(i+1,a-i-1),this.list[i].data=r)}cutAt(e){let t=this.find(e);if(t<=-1)return-1;let r=this.list[t];return r.start===e?t:(this.list.splice(t+1,0,{start:e,data:r.data}),t+1)}find(e){if(e<1)return 0;if(e>16384)return-1;for(let t=this.list.length-1;t>=0;t--){let r=this.list[t],i=this.list[t+1];if(r.start<=e&&(!i||e<i.start))return t}return-1}generateCols(e){let t=[],r=this.getGlobalStyle();for(let i=0;i<this.list.length;i++){let a=this.list[i],g=a.start,R=this.list[i+1]?.start??16385;for(let L=g;L<R&&L<=e;L++)if(a.data){let W={...a.data},K=W.s??0;K===r?delete W.s:W.s=K,Object.keys(W).length>0&&(t[L-1]=W)}else r>0&&(t[L-1]={s:0})}return t}getGlobalStyle(){return this.list.at(-1)?.data?.s??0}}function G_(n,e){for(let t in n)if(Object.prototype.hasOwnProperty.call(n,t)&&e(n[t],parseInt(t,10))===!1)break}class Lie{constructor(e,t){this.cellCollections=[],this.rowInfos=[],this.colInfos=[],this.globalInfo={},this.rowCount=t.rowCount||0,this.colCount=t.colCount||0,this.rtl=t.rightToLeft??!1,this.workbook=e,this.initRowCol(t),this.initData(t),this.initNote(t),["rowCount","colCount","rows","cols","global","cells"].forEach(r=>{delete t[r]})}initRowCol(e){if(G_(e.rows,(t,r)=>{Op(r)||(t.h&&this.updateRowAttr(r,"h",t.h),t.hidden&&this.updateRowAttr(r,"hidden",!0),typeof t.s=="number"&&this.updateRowAttr(r,"s",t.s),typeof t.outlineLevel=="number"&&this.updateRowAttr(r,"outlineLevel",t.outlineLevel))}),e.colSpans){let{cols:t,global:r}=function(i,a){let g=new Bie;for(let R of i)g.set(R.start,R.end,sm(R,["start","end"]));return{cols:g.generateCols(a),global:{s:g.getGlobalStyle()}}}(e.colSpans,e.colCount);e.cols=t,e.global={...r,h:e.global?.h,w:e.global?.w}}if(G_(e.cols,(t,r)=>{Op(r)||(t.w&&this.updateColAttr(r,"w",t.w),t.hidden&&this.updateColAttr(r,"hidden",!0),typeof t.s=="number"&&this.updateColAttr(r,"s",t.s),typeof t.outlineLevel=="number"&&this.updateColAttr(r,"outlineLevel",t.outlineLevel))}),e.global){let t=this.getGlobalInfo();e.global.s&&(t.s=e.global.s),e.global.h&&(t.h=e.global.h),e.global.w&&(t.w=e.global.w)}}initData(e){let t=e.cells;for(let r in t)if(fi(t,r)){let i=parseInt(r,10);for(let a in t[r])if(fi(t[r],a)){let g=t[r][a];if(g===null)continue;let R=parseInt(a,10),L=this.getOrCreateCell(i,R,g.s||0);if("v"in g){let W=_a(g.v)?yo.fromJSON(g.v):g.v;L.setValue(W??null)}g.n&&L.setNote(g.n)}}}initNote(e){for(let t of e.notes||[])this.getOrCreateCell(t.row,t.col).setNote(t.text)}getRow(e){return this.cellCollections[e]||null}updateRow(e,t){let{data:r,info:i}=t;this.rowInfos[e]=i,this.cellCollections[e]=r}getRowLength(){return this.cellCollections.length}getCell(e,t){let r=this.getRow(e);return r?r.getCell(t):null}createRowModel(e){let t=new Dre;return this.cellCollections[e]=t,t}getOrCreateCell(e,t,r){let i=this.cellCollections[e];i||(i=this.createRowModel(e));let a=i.getCell(t);return a||(a=this.workbook.getStyleManager().createRefCell(null,r??this.getEmptyXf(e,t)),i.addCell(t,a)),a}getComputedCellStyle(e,t){let r=this.getCell(e,t);return r?r.getCellStyle():this.getEmptyStyle(e,t)}getEmptyStyle(e,t){return this.workbook.getStyleManager().getCellStyle(this.getEmptyXf(e,t))}getEmptyXf(e,t){return this.rowInfos[e]?.s!==void 0?this.rowInfos[e]?.s??0:this.colInfos[t]?this.colInfos[t]?.s??0:this.globalInfo.s?this.globalInfo.s:0}getGlobalXf(){return this.getGlobalInfo().s||0}createRow(e,t,r){t>0&&(Mc(this.cellCollections,e,t),Mc(this.rowInfos,e,t),r>=0&&this._populateAfterRowCreate(e,t,r),this.rowCount+=t)}createCol(e,t,r){if(t>0){for(let i=0;i<this.rowCount;i++){let a=this.getRow(i);a&&Mc(a._getCells(),e,t)}Mc(this.colInfos,e,t),r>=0&&this._populateAfterColCreate(e,t,r),this.colCount+=t}}collectRangeNote(e,t){let{from:r,to:i}=e;t===void 0&&(t=()=>!1);let{row:a,col:g}=r,{row:R,col:L}=i,W=[];for(let K=a;K<=R;K++){if(t&&t(K))continue;let Q=[];for(let oe=g;oe<=L;oe++)Q.push(this.getCell(K,oe)?.getNote()??"");W.push(Q)}return W}removeRow(e,t){t>0&&(this.cellCollections.splice(e,t),this.rowInfos.splice(e,t),this.rowCount-=t)}removeCol(e,t){if(t>0){for(let r=0;r<this.rowCount;r++){let i=this.getRow(r);i&&i._getCells().splice(e,t)}this.colInfos.splice(e,t),this.colCount-=t}}_populateAfterRowCreate(e,t,r){let i;r>=e&&(r+=t);let a=e+t,g=this.getRowInfo(r);if(g){let L=[];if((g.s??0)>0&&L.push(["s",g.s]),g.h&&L.push(["h",g.h]),(g.outlineLevel??0)>0&&L.push(["outlineLevel",g.outlineLevel]),L.length>0)for(i=e;i<a;i++)for(let[W,K]of L)this.updateRowAttr(i,W,K)}let R=this.getRow(r);R&&R.forEach((L,W)=>{let K=L?L.getXfId():-1;if(!(K<0))for(i=e;i<a;i++)K!==this.getEmptyXf(i,W)&&this.getOrCreateCell(i,W,K)})}_populateAfterColCreate(e,t,r){let i,a;r>=e&&(r+=t);let g=e+t,R=this.getColInfo(r);if(R){let W=[];for((R.s??0)>0&&W.push(["s",R.s]),R.w&&W.push(["w",R.w]),(R.outlineLevel??0)>0&&W.push(["outlineLevel",R.outlineLevel]),i=e;i<g;i++)for(let[K,Q]of W)this.updateColAttr(i,K,Q)}let L=[];this.cellCollections.forEach((W,K)=>{W&&(a=W.getCell(r))&&a.getXfId()>=0&&L.push([K,a.getXfId()])}),L.forEach(W=>{let[K,Q]=W;for(i=e;i<g;i++)Q!==this.getEmptyXf(K,i)&&this.getOrCreateCell(K,i,Q)})}moveRow(e,t,r){Oh(this.cellCollections,e,t,r),Oh(this.rowInfos,e,t,r)}moveCol(e,t,r){for(let i=0;i<this.cellCollections.length;i++){let a=this.cellCollections[i];a&&Oh(a._getCells(),e,t,r)}Oh(this.colInfos,e,t,r)}getRowCount(){return this.rowCount}getColCount(){return this.colCount}getValue(e,t){let r=this.getCell(e,t);return r?r.getValue():null}setValue(e,t,r){this.getOrCreateCell(e,t).setValue(r)}getRowInfo(e){return this.rowInfos[e]??void 0}getColInfo(e){return this.colInfos[e]??void 0}getDefaultRowHeight(){return this.globalInfo.h??Qe.ROW_HEIGHT}getDefaultColWidth(){return this.globalInfo.w??Qe.COL_WIDTH}getGlobalInfo(){return this.globalInfo}getNormalizedGlobalInfo(){let e={};return this.getGlobalXf()>0&&(e.s=this.getGlobalXf()),this.getDefaultRowHeight()!==Qe.ROW_HEIGHT&&(e.h=this.getDefaultRowHeight()),this.getDefaultColWidth()!==Qe.COL_WIDTH&&(e.w=this.getDefaultColWidth()),Object.keys(e).length>0?e:null}updateDimAttr(e,t,r,i){e==="row"?this.updateRowAttr(t,r,i):this.updateColAttr(t,r,i)}updateRowAttr(e,t,r){let i=this.rowInfos[e];i||(i=this.rowInfos[e]={}),i[t]=r}updateColAttr(e,t,r){let i=this.colInfos[e];if(!i){i=this.colInfos[e]={};let a=this.getGlobalXf();a>0&&(i.s=a)}i[t]=r}updateGlobalStyle(e){this.globalInfo.s=e}getMaxRowGroupLevel(){return du(this.rowInfos.map(e=>e?.outlineLevel??0))??0}getMaxColGroupLevel(){return du(this.colInfos.map(e=>e?.outlineLevel??0))??0}getWorkbook(){return this.workbook}getWorksheetRtl(){return this.rtl}setWorksheetRtl(e){this.rtl=e}}function OM(n){switch(n){case"Font":return Fie;case"Fill":return Vie;case"Alignment":return Hie;case"Format":return $ie;case"Border":return zie;case"QuotePrefix":return Wie;default:throw Error(`Unknown style type: ${n}`)}}function Fie(n,e,t,r){let i,a=n.getCellStyle(e).getFont();if(t===null&&a.isDefault())return;let g=a.isDefault()?null:a.toJSON();i=t===null?n.getFont(0).clone():r?n.createFont(t):a.clone().assign(t);let R=n.addFont(i),L=lm(n,e,"fontId",R);return[e,L,g,t]}function Vie(n,e,t,r){let i,a=n.getCellStyle(e).getFill();if(t===null&&a.isDefault())return;let g=a.isDefault()?null:a.toJSON();i=t===null?n.getFill(0).clone():r?n.createFill(t):a.clone().assign(t);let R=n.addFill(i),L=lm(n,e,"fillId",R);return[e,L,g,t]}function Hie(n,e,t,r){let i,a=n.getCellStyle(e).getAlignment();if(t===null&&a.isDefault())return;let g=a.isDefault()?null:a.toJSON();i=t===null?n.getAlignment(0).clone():r?n.createAlignment(t):a.clone().assign(t);let R=n.addAlignment(i),L=lm(n,e,"alignmentId",R);return[e,L,g,t]}function $ie(n,e,t){let r,i=n.getCellStyle(e).getNumberFormat().fc;if(t===i)return;r=t===null?n.getNumberFormat(0).clone():n.createNumberFormat({fc:t});let a=n.addNumberFormat(r),g=lm(n,e,"nfId",a);return[e,g,i,t]}function zie(n,e,t){let r,i=n.getCellStyle(e).getBorder(),a=i.isDefault()?null:i.b,g=t?t&&typeof t!="string"?Array.isArray(t)?t:[t.top,t.right,t.bottom,t.left]:[t,t,t,t]:null;if(function(W,K){let Q=Array.isArray(W),oe=Array.isArray(K);if(!Q||!oe)return Q===oe;for(let se=0;se<W.length;se++)if(W[se]!==K[se])return!1;return!0}(a,g))return;if(g!==null){let W=function(K,Q){let oe=[null,null,null,null],se=!0;for(let he=0;he<oe.length;he++)oe[he]=(Q[he]!==void 0?Q[he]:K[he])??null,oe[he]&&(se=!1);return se?null:oe}(a??[null,null,null,null],g);r=n.createBorder({b:W})}else r=n.getBorder(0).clone();let R=n.addBorder(r),L=lm(n,e,"borderId",R);return g===null||g.every(W=>W!==void 0)?[e,L,Qu(a),Qu(g)]:[e,L,Qu(g.map((W,K)=>W===void 0?void 0:a?.[K]??null)),Qu(g.map((W,K)=>W===void 0?void 0:W))]}function Wie(n,e,t){let r=n.getCellStyle(e).getQuotePrefix();if(t===r)return;let i=lm(n,e,"quotePrefix",t>0);return[e,i,r,t]}function lm(n,e,t,r){let i=n.getCellStyle(e);if(r===i[t])return e;let a=i.clone();return a[t]=r,n.addCellStyle(a)}function b7(n){return Ne(n)?null:n}function j_(n,e,t,r,i){let a=n.worksheet,g=n.getStyleManager(),R=OM(t),L=e==="row"?a.getRowInfo:a.getColInfo,W=[],K=a.getGlobalXf();for(let Q=0,oe=r.length;Q<oe;Q++){let se=r[Q][0],he=r[Q][1];if(he===void 0)continue;let me=L.call(a,se),ye=me&&me.s!==void 0?me.s:K,Te=R(g,ye,he,i);if(!Te){W.push([se,null,he]);continue}let Me=Te[1];ye!==Me&&n.setDimensionStyle(e,se,Me),W.push([se,Te[2],Te[3]])}return W}let Uie=class{constructor(n){this.sheet=n}setStyleByType(n,e,t,r,i){n==="Format"?this.styleSetter("Format",b7,e,t,r,i):this.styleSetter(n,null,e,t,r,i)}setFont(n,e,t,r){this.styleSetter("Font",null,n,e,t,r)}setFill(n,e,t,r){this.styleSetter("Fill",null,n,e,t,r)}setAlignment(n,e,t,r){this.styleSetter("Alignment",null,n,e,t,r)}setBorder(n,e,t,r){this.styleSetter("Border",null,n,e,t,r)}setFormat(n,e,t,r){this.styleSetter("Format",b7,n,e,t,r)}setQuotePrefix(n,e,t,r){this.styleSetter("QuotePrefix",null,n,e,t,r)}styleSetter(n,e,t,r,i,a){let g=OM(n),R=[],L=[],W=this.sheet.getStyleManager();r=!!r,i=i||"";for(let K=0,Q=t.length;K<Q;K++){let oe=t[K],se=oe[0],he=oe[1],me=oe[2];e&&(me=e(me));let ye=this.sheet.getCellModel(se,he),Te=ye?ye.getXfId():this.sheet.worksheet.getEmptyXf(se,he);if(Te===0&&me===null){L.push([se,he,me]);continue}let Me=g(W,Te,me,r);if(!Me||Me[0]===Me[1]){L.push([se,he,Me?Me[2]:me]);continue}R.push([se,he,Me[2],Me[3]]),this.sheet.setCellXf(se,he,Me[1])}if(a)return void a(R,L);R.length>0&&this.sheet.runHooks("after"+n+"Change",R,r,i),n==="Alignment"&&this.onAlignmentChanged({cellChanges:t})}setRowStyle(n,e,t,r,i){let a,g,R;if(t=!!t,i=i||"",!Array.isArray(e))return;let L=this.sheet.worksheet,W=new Set(r?.map(se=>{let[he,me]=se;return he+","+me}));r??=[];let K=function(se,he){se&&se.s!==void 0&&R!==void 0&&r.push([a,he,R])};for(let se=0,he=e.length;se<he;se++){a=e[se][0],R=e[se][1];let me=L.getRow(a);if(me){let ye=Math.min(Math.max(me.getColLength(),L.colInfos.length),this.sheet.countCols());for(g=0;g<ye;g++)W.has(a+","+g)||(me.getCell(g)?r.push([a,g,R]):K(L.getColInfo(g),g))}else L.colInfos.forEach((ye,Te)=>{if(!W.has(a+","+Te))return K(ye,Te)})}let Q=[];r&&r.length>0&&this.setStyleByType(n,r,t,i,(se,he)=>{for(let[me,ye,Te]of(Q=se.slice(),he))Q.push([me,ye,Te,Te]),this.sheet.getOrCreateCell(me,ye),this.sheet.notifyCellChanges(me,ye)});let oe=j_(this.sheet,"row",n,e,t);this.sheet.runHooks("afterRowStyleChange",n,oe,t,{cellChanges:Q},i),n==="Alignment"&&this.onAlignmentChanged({rowChanges:e})}setColStyle(n,e,t,r,i){let a,g,R;if(t=!!t,i=i||"",!Array.isArray(e))return;let L=this.sheet.worksheet,W=new Set(r?.map(se=>{let[he,me]=se;return he+","+me}));r??=[];let K=Math.min(Math.max(L.getRowLength(),L.rowInfos.length),this.sheet.countRows());for(a=0;a<K;a++){let se=L.getRowInfo(a),he=L.getRow(a);for(let me=0,ye=e.length;me<ye;me++)g=e[me][0],R=e[me][1],!W.has(a+","+g)&&(he&&he.getCell(g)?r.push([a,g,R]):se&&se.s!==void 0&&R!==void 0&&r.push([a,g,R]))}let Q=[];r&&r.length>0&&this.setStyleByType(n,r,t,i,(se,he)=>{for(let[me,ye,Te]of(Q=se.slice(),he))Q.push([me,ye,Te,Te]),this.sheet.getOrCreateCell(me,ye),this.sheet.notifyCellChanges(me,ye)});let oe=j_(this.sheet,"col",n,e,t);this.sheet.runHooks("afterColStyleChange",n,oe,t,{cellChanges:Q},i),n==="Alignment"&&this.onAlignmentChanged({colChanges:e})}setGlobalStyle(n,e,t,r,i,a,g){t=!!t,g=g||"";let R=this.sheet.worksheet,L=this.sheet.getStyleManager(),W=R.getGlobalInfo();if(e===void 0)return;let K=[],Q=[],oe=[],se=new Map(r),he=new Map(i),me=new Set(a?.map(Oe=>{let[ze,We]=Oe;return ze+","+We}));a??=[];for(let Oe=0;Oe<R.getRowLength();Oe++){let ze=R.getRow(Oe);if(ze)for(let We=0;We<ze.getColLength();We++)!me.has(Oe+","+We)&&ze.getCell(We)&&a.push([Oe,We,se.get(Oe)??he.get(We)??e])}a&&a.length>0&&this.setStyleByType(n,a,t,g,function(Oe,ze){oe=Oe.concat(ze.map(We=>{let[qe,Ke,at]=We;return[qe,Ke,at,at]}))}),r??=[],R.rowInfos.forEach(function(Oe,ze){!se.has(ze)&&Oe&&Oe.s!==void 0&&r.push([ze,e])}),i??=[],R.colInfos.forEach(function(Oe,ze){!he.has(ze)&&Oe&&i.push([ze,e])},this),K=j_(this.sheet,"row",n,r||[],t),Q=j_(this.sheet,"col",n,i||[],t);let ye=[null,e],Te=W.s||0,Me=OM(n)(L,Te,e,t);Me&&(this.sheet.setGlobalStyle(Me[1]),ye[0]=Me[2]),this.sheet.runHooks("afterGlobalStyleChange",n,ye,t,{rowChanges:K,colChanges:Q,cellChanges:oe},g),n==="Alignment"&&this.onAlignmentChanged({globalVal:e})}onAlignmentChanged(n){(function(e){let{cellChanges:t,rowChanges:r,colChanges:i,globalVal:a}=e;return!!(a&&sl(a)||r?.some(g=>{let[,R]=g;return R&&sl(R)})||i?.some(g=>{let[,R]=g;return R&&sl(R)})||t?.some(g=>{let[,,R]=g;return R&&sl(R)}))})(n)&&this.sheet.getWorkbook().getNotifier()?.onRtlDataAdded()}},Gie=new Set([Nn.Edit,Nn.Format,Nn.ApplyLink,Nn.RemoveLink,Nn.Validation,Nn.RemoveValue]),jie=new Set([Nn.Edit,Nn.ApplyLink,Nn.RemoveLink]),qie=function(n,e,t){if(!Gie.has(t))return;let r=n.getWorkbook().getLocale(),i=r.getLocaleConverter(),a=r.getInputParser(),g=[];for(let oe=0,se=e.length;oe<se;oe++){var R;let[he,me,,ye]=e[oe],Te=n.worksheet.getComputedCellStyle(he,me),Me=Zr(ye),Oe=typeof ye=="string"||Me,ze=Me?ye.getText():ye,We=Oe&&!!(R=ze)&&R[0]==="'";e[oe].push(Te.getQuotePrefix(),We);let qe=Te.getNumberFormat();if(We)e[oe][3]=Me?ye.removeFirstChar():ye.substr(1),g.push(qe.isDefault()?null:[he,me,null]);else if(Oe&&be(ze)){let Ke=i.normalizeFormula(ze);e[oe][3]=function(at){let gt="IMPORTRANGE";if(!at.toUpperCase().includes(gt+"("))return at;let pt=!1,Tt=Ji(at);for(let jt=0;jt<Tt.size();jt++){let on=Tt.get(jt);if(on.isFunction()&&on.getText().toUpperCase()===gt&&Tt.get(jt+1)?.isLeftParenthesis()){let[hn,un]=function(an,Ut){let kt=[],Pt=[kt],mn=0;for(let Zt of function*(dn,fn){for(let er=fn;er<dn.size();er++){let yr=dn.get(er);yr.isWhitespace()||(yield yr)}}(an,Ut))if(Zt.isComma()&&mn===0?(kt=[],Pt.push(kt)):Zt.isLeftParenthesis()?mn+=1:Zt.isRightParenthesis()?mn-=1:kt.push(Zt),mn<0||Pt.length>2)break;return Pt.slice(0,2).map(Zt=>Zt.length===1?Zt[0]:null)}(Tt,jt+2);if(hn?.isString()){let an=hn.getText().match(/\/oo\/r\/(\w+)|d\/s\/(\w+\/[-\w]+)/);an&&(hn.setValue(`"${an[1]??an[2]}"`),pt=!0)}if(un?.isString()){let an=un.getText().slice(1,-1),Ut=an.lastIndexOf("!");if(Ut>0&&(an.charAt(0)!=="'"||an.charAt(Ut-1)!=="'")){let kt=`'${an.slice(0,Ut).replace("'","''")}'!${an.slice(Ut+1)}`,Pt=Ji(kt);Pt.size()===1&&Pt.get(0).isRange()&&(un.setValue(`"${kt}"`),pt=!0)}}}}return pt?Tt.getText():at}(Ke),g.push(null)}else if(Oe&&!qe.isText()){let Ke=a.parse(ze)??{v:ze};Ke.v!==ze&&(e[oe][3]=Ke.v,jie.has(t)&&Ke.numeric&&Le(qe.fc)&&(e[oe][3]=Ke.v/100)),(t!==Nn.Validation||Ne(qe.fc))&&g.push(function(at,gt,pt,Tt,jt){let on=[at,gt,pt.fc];return jt===Nn.Validation?on:Tt.isDefault()?Ne(pt.fc)?null:on:Tt.isDate()?pt.d?null:on:Tt.isTime()?pt.t?null:on:Tt.isDateTime()?pt.datetime?null:on:pt.numeric||Ne(pt.fc)?null:on}(he,me,Ke,qe,t))}else g.push(null)}n.runHooks("beforeChangeForValid",e,t);let L=[],W=[],K=-1,Q=-1;for(let oe=0,se=e.length;oe<se;oe++){if(e[oe]===null)continue;let[he,me]=e[oe].splice(-2);he!==me&&L.push([e[oe][0],e[oe][1],me]),g[oe]!==null&&++Q!==oe&&(g[Q]=g[oe]);let ye=e[oe][3];if(Zr(ye)&&ye.v.length===1){let Te=ye.v[0].s;e[oe][3]=ye.getText();let Me=function(Oe){if(!Oe)return null;let ze=Oe.clone();ze.name===Qe.DEFAULT_FONT_NAME&&(ze.name=null),ze.size===Qe.DEFAULT_FONT_SIZE&&(ze.size=null),ze.color===Qe.DEFAULT_FONT_COLOR&&(ze.color=null);let We=ze.toJSON();return Object.keys(We).length>0?We:null}(Te);W.push([e[oe][0],e[oe][1],Me])}RC(e[oe])&&++K!==oe&&(e[K]=e[oe])}return e.splice(K+1),g.splice(Q+1),[g,L,W]},Yie=class extends Uie{setDataAtCell(n,e){if(n.length===0)return;if(e!==Nn.PivotTable){let r=this.sheet.getWorkbook().getPivotTableManager().listPivotTableLocations(this.sheet.sheetId).map(i=>{let{location:a}=i;return Ey(a)}).flat();n=n.filter(i=>{let[a,g]=i;return r.every(R=>!r6(R,{row:a,col:g}))})}let t=[];for(let r=0,i=n.length;r<i;r++)t.push([n[r][0],n[r][1],this.sheet.getDataAtCell(n[r][0],n[r][1]),n[r][2]]);this._applyChanges(t,e),this.sheet.formula.generateChangeDep(t)}_applyChanges(n,e){let t=qie(this.sheet,n,e);this._applyCompoundChanges(t,e);for(let r=0,i=n.length;r<i;r++){let a=this.sheet.countRows();n[r][0]>a-1&&this._createRow(a,n[r][0]-(a-1),a-1,!0);let g=this.sheet.countCols();n[r][1]>g-1&&this._createCol(g,n[r][1]-(g-1),g-1,!0),this.sheet.setDataAtCell(n[r][0],n[r][1],n[r][3])}this.sheet.runHooks("afterChange",n,e||Nn.Edit)}_applyCompoundChanges(n,e){if(n===void 0)return;let[t,r,i]=n,a=e!==Nn.Format&&t.length>0,g=r.length>0,R=i.length>0;(a||g||R)&&(a&&this.setFormat(t,!0,e),g&&this.setQuotePrefix(r,!0,e),R&&this.setFont(i,!0,e))}addInternalLink(n){this.sheet.getHyperlinkModel().addInternalLink(n)}updateInternalLink(n){this.sheet.getHyperlinkModel().updateInternalLink(n)}removeInternalLink(n){this.sheet.getHyperlinkModel().removeInternalLink(n)}removeRangeInternalLink(n){n.forAll((e,t)=>{let r=this.sheet.getCellMeta(e,t)?.link?.getId();r&&this.removeInternalLink(r)})}groupRows(n,e){this.sheet.getPlugin("synoGroup").groupRows(n,e)}groupCols(n,e){this.sheet.getPlugin("synoGroup").groupCols(n,e)}ungroupRows(n,e){this.sheet.getPlugin("synoGroup").ungroupRows(n,e)}ungroupCols(n,e){this.sheet.getPlugin("synoGroup").ungroupCols(n,e)}updateGroup(n,e,t){this.sheet.getPlugin("synoGroup").updateGroup(n,e,t)}setCollapse(n,e,t){this.sheet.getPlugin("synoGroup").setCollapse(n,e,t)}setNote(n,e){let t=[];e=e||"",n.forEach(r=>{let i=r[0],a=r[1],g=r[2]||"",R=this.sheet.getCellNote(i,a)??"";R!==g&&(this.sheet.setCellNote(i,a,g===""?void 0:g),t.push([i,a,R,g]))}),t.length>0&&this.sheet.runHooks("afterNoteChange",t,e)}removeRangeNotes(n,e){let t=[];n.forAll((r,i)=>{t.push([r,i,null])}),this.setNote(t,e)}mergeCells(n,e){this.sheet.getWorkbook().getPivotTableManager().listPivotTableLocations(this.sheet.sheetId).some(t=>{let{location:r}=t;return Bp(r,[n])!==Dh.none})||(n.normalize(),this.sheet.getPlugin("synoMergeCell").mergeRange(n,e))}unmergeCells(n,e){n.normalize(),this.sheet.getPlugin("synoMergeCell").unmergeRange(n,e)}resizeRow(n,e,t){this.sheet.getPlugin("synoManualRowResize").applyResizeChange(n,e,t)}resizeColumn(n,e,t){this.sheet.getPlugin("synoManualColumnResize").applyResizeChange(n,e,t)}alterGrid(n,e,t,r,i){let a=n.startsWith("insert");if(!a||e>0){let R=this.sheet.getWorkbook().getPivotTableManager().listPivotTableLocations(this.sheet.sheetId),L=new sn(0,0,this.sheet.countRows()-1,this.sheet.countCols()-1),W=n.endsWith("row")?"row":"col";if(a?L.to[W]=e-1:(L.from[W]=e,L.to[W]=e+t-1),No([L],R).partial.length>0)return}let g=Or(i);switch(n){case"insert_row":this._createRow(e,t,r,!1,g);break;case"insert_col":this._createCol(e,t,r,!1,g);break;case"remove_row":this._removeRow(e,t);break;case"remove_col":this._removeCol(e,t);break;default:return}if(g){let R,L,W="inserted_data";if(g.format.font.length>0&&this.setFont(g.format.font,!0,W),g.format.fill.length>0&&this.setFill(g.format.fill,!0,W),g.format.alignment.length>0&&this.setAlignment(g.format.alignment,!0,W),g.format.border.length>0&&this.setBorder(g.format.border,!0,W),g.format.numberFormat.length>0&&this.setFormat(g.format.numberFormat,!0,W),g.format.quotePrefix.length>0&&this.setQuotePrefix(g.format.quotePrefix,!0,W),g.changes&&this.setDataAtCell(ii(g.changes),W),g.notes&&this.setNote(g.notes,W),g.hyperlinks)for(let Q of g.hyperlinks)this.addInternalLink(Q);let K=g.info;if(n==="insert_row")for(R=0;R<K.length;R++)typeof(L=this.sheet.getPlugin(K[R].pluginName)).repairRow=="function"&&L.repairRow(K[R].rowInfo,e,t);else if(n==="insert_col")for(R=0;R<K.length;R++)typeof(L=this.sheet.getPlugin(K[R].pluginName)).repairCol=="function"&&L.repairCol(K[R].colInfo,e,t);this.repairCrossData(g)}}_createRow(n,e,t,r,i){let a=this.sheet.countRows();return(n<0||n>a)&&(n=a),(e=e||1)<0?0:(this.sheet.runHooks("beforeCreateRow",n,e,t,r,i),this.sheet.createRow(n,e,t),this.sheet.getHyperlinkModel().createRowCol("row",n,e),this.sheet.getWorkbook().getPivotTableManager().onAlterGrid(this.sheet.sheetId,"row",n,e),this.sheet.runHooks("afterCreateRow",n,e,t,r,i),e)}_createCol(n,e,t,r,i){let a=this.sheet.countCols();return(n<0||n>a)&&(n=a),(e=e||1)<0?0:(this.sheet.runHooks("beforeCreateCol",n,e,t,r,i),this.sheet.createCol(n,e,t),this.sheet.getHyperlinkModel().createRowCol("col",n,e),this.sheet.getWorkbook().getPivotTableManager().onAlterGrid(this.sheet.sheetId,"col",n,e),this.sheet.runHooks("afterCreateCol",n,e,t,r,i),e)}_removeRow(n,e){let t=this.sheet.countRows();return e=e||1,(n<0||n>=t)&&(n=-e),n=(t+n)%t,t-e<=0&&(e=t-1),e<=0?0:(this.sheet.runHooks("beforeRemoveRow",n,e),this.sheet.removeRow(n,e),this.sheet.getHyperlinkModel().removeRowCol("row",n,e),this.sheet.getWorkbook().getPivotTableManager().onAlterGrid(this.sheet.sheetId,"row",n,-e),this.sheet.runHooks("afterRemoveRow",n,e),e)}_removeCol(n,e){let t=this.sheet.countCols();return e=e||1,(n<0||n>=t)&&(n=-e),n=(t+n)%t,t-e<=0&&(e=t-1),e<=0?0:(this.sheet.runHooks("beforeRemoveCol",n,e),this.sheet.removeCol(n,e),this.sheet.getHyperlinkModel().removeRowCol("col",n,e),this.sheet.getWorkbook().getPivotTableManager().onAlterGrid(this.sheet.sheetId,"col",n,-e),this.sheet.runHooks("afterRemoveCol",n,e),e)}repairCrossData(n){let{crossInfo:e,define:t,pivotTable:r}=n;if(e){let i=this.sheet.getWorkbook();Ao(e,(a,g)=>{let R=i.getSheetById(g);R&&(R.runHooks("repairCross",a),R.getHyperlinkModel().repairCross(a.hyperlink))})}t&&this.sheet.getWorkbook().getController().nameController.repair(t),r&&this.sheet.getWorkbook().getPivotTableManager().repairSourceRange(r.sources)}_unmergeOverlaps(n,e){let t=this.sheet.getPlugin("synoMergeCell"),r=t.getOverlap(n);for(let i=0;i<r.length;i++)t.unmergeRange(r[i],e)}fixedRow(n){this.sheet.getPlugin("synoFreezeBar").fixedRow(n)}fixedCol(n){this.sheet.getPlugin("synoFreezeBar").fixedCol(n)}hideRows(n,e){this.sheet.getPlugin("synoHideRowCol").hideRows(n,e)}showRows(n,e){this.sheet.getPlugin("synoHideRowCol").showRows(n,e)}hideCols(n,e){this.sheet.getPlugin("synoHideRowCol").hideCols(n,e)}showCols(n,e){this.sheet.getPlugin("synoHideRowCol").showCols(n,e)}applyRowOrder(n,e,t){this.sheet.getPlugin("synoSort").applyRowOrder(n,e,t)}_getFilterPlugin(){return this.sheet.getPlugin("synoFilter")}createFilter(n,e){this._getFilterPlugin().createFilter(n,e)}enableFilter(n,e){return this._getFilterPlugin().enableFilter(n,e)}disableFilter(n,e){return this._getFilterPlugin().disableFilter(n,e)}updateFilterRange(n,e,t){this._getFilterPlugin().updateFilterRange(n,e,t)}setFilter(n,e,t,r){this._getFilterPlugin().setFilter(n,e,t,r)}createFilterView(n,e,t,r){this._getFilterPlugin().createFilterView(n,e,t,r)}enableFilterView(n){this._getFilterPlugin().enableFilterView(n)}disableFilterView(n){this._getFilterPlugin().disableFilterView(n)}setFilterViewCondition(n,e,t){this._getFilterPlugin().setFilterViewCondition(n,e,t)}updateFilterViewRange(n,e,t){this._getFilterPlugin().updateFilterViewRange(n,e,t)}updateFilterViewName(n,e){this._getFilterPlugin().updateFilterViewName(n,e)}setActiveFilterView(n){this._getFilterPlugin().setActiveFilterView(n)}expandFilterRange(n){this._getFilterPlugin().expandRangeByData(n)}addValidRange(n,e){this.sheet.getPlugin("synoValidation").addValidRange(n,e)}createValidation(n,e){this.sheet.getPlugin("synoValidation").createValidation(n,e)}removeValidation(n,e){this.sheet.getPlugin("synoValidation").removeValidation(n,e)}removeAllValidation(n){let e=this.sheet.getPlugin("synoValidation");for(let t=n.from.row;t<=n.to.row;t++)for(let r=n.from.col;r<=n.to.col;r++){let i=this.sheet.getCellMeta(t,r),a=i?e.getValidation(i.validId):null;if(!a)continue;let g=[];for(let R=0;R<a.ranges.length;R++)g.push(a.ranges[R].getOverlap(n));for(let R=0;R<g.length;R++){let L=g[R];L&&this.removeValidation(a.validId,L)}}}addCf(n,e){this.sheet.getPlugin("synoConditionalFormat").addCf(n,e)}removeCf(n){this.sheet.getPlugin("synoConditionalFormat").removeCf(n)}updateCfRanges(n,e){this.sheet.getPlugin("synoConditionalFormat").updateCfRanges(n,e)}removeRangeCf(n){let e=new Set;for(let t of(n.forAll((r,i)=>{let a=this.sheet.getCellMeta(r,i);if(a&&a.refCf)for(let g of a.refCf)e.has(g)||e.add(g)}),e)){let{newRanges:r}=As(t.ranges,n);r.length===0?this.removeCf(t.id):this.updateCfRanges(t.id,function(i){i=i.map(Q=>Q.clone().normalize());let a=[],g=[],R=[];for(let Q of i)Q.type===qr.row?a.push(Q):Q.type===qr.col?g.push(Q):R.push(Q);let L=y6(a,"row",R),W=y6(g,"col",L.cellRanges),K=function(Q){if(Q.length===0)return[];Q=Q.sort((me,ye)=>me.from.row-ye.from.row||me.from.col-ye.from.col);let oe=(me,ye)=>{let Te=[],Me=[];for(let Oe of me)Oe.from.row<ye?Oe.to.row>ye-1?(Te.push(new sn(Oe.from.row,Oe.from.col,ye-1,Oe.to.col)),Me.push(new sn(ye,Oe.from.col,Oe.to.row,Oe.to.col))):Oe.to.row===ye-1&&Te.push(Oe):Me.push(Oe);return{result:Te,remain:Me}},se=me=>{if(me.length===0)return[];let ye=[];me.sort((Me,Oe)=>Me.from.col-Oe.from.col);let Te=me[0];ye.push(Te);for(let Me=1;Me<me.length;Me++)Te.isHoriMergeable(me[Me])?Te.expandCol(me[Me].from.col,me[Me].to.col):ye.push(Te=me[Me]);return ye},he=[];for(let me of Q.reduce((ye,Te)=>(ye.push(Te.from.row,Te.to.row+1),ye),[]).sort((ye,Te)=>ye-Te)){let{result:ye,remain:Te}=oe(Q,me);Q=Te,he=he.concat(se(ye))}return(me=>{let ye=[];for(let Te=0;Te<me.length;Te++){let Me=me[Te];if(Me){ye.push(Me);for(let Oe=Te+1;Oe<me.length;Oe++){let ze=me[Oe];if(ze){if(ze.from.row>Me.to.row+1)break;Me.isVertMergeable(ze)&&(Me.expandRow(ze.from.row,ze.to.row),me[Oe]=null)}}}}return ye})(he)}(W.cellRanges);return[...L.dimRanges,...W.dimRanges,...K]}(r))}}insertImage(n,e){this.sheet.getPlugin("synoDrawingController").insertImage(n,e)}removeImage(n){this.sheet.getPlugin("synoDrawingController").removeImage(n)}resizeImage(n,e){this.sheet.getPlugin("synoDrawingController").resizeImage(n,e)}insertChart(n,e,t){this.sheet.getPlugin("synoDrawingController").insertChart(n,e,t)}removeChart(n){this.sheet.getPlugin("synoDrawingController").removeChart(n)}resizeChart(n,e){this.sheet.getPlugin("synoDrawingController").resizeChart(n,e)}adjustChart(n,e){this.sheet.getPlugin("synoDrawingController").adjustChart(n,e)}setChartConfig(n,e,t){this.sheet.getPlugin("synoDrawingController").setChartConfig(n,e,t)}modifyDrawingsByInsertRowCol(n,e,t){this.sheet.getPlugin("synoDrawingController").modifyDrawingsByInsertRowCol(n,e,t)}modifyDrawingByRemoveRowCol(n,e,t){this.sheet.getPlugin("synoDrawingController").modifyDrawingsByRemoveRowCol(n,e,t)}modifyDrawingsByMoveRowCol(n,e,t,r,i){this.sheet.getPlugin("synoDrawingController").modifyDrawingsByMoveRowCol(n,e,t,r,i)}moveRow(n,e,t,r,i){this.sheet.getPlugin("synoManualMove").moveRow(n,e,t,r,i)}moveCol(n,e,t,r,i){this.sheet.getPlugin("synoManualMove").moveCol(n,e,t,r,i)}moveRange(n,e,t){t===void 0&&(t=!0);let r=this.sheet.getWorkbook().getPivotTableManager().listPivotTableLocations(this.sheet.sheetId);if(No([n],r).partial.length>0||No(As([e],n).newRanges,r).partial.length>0)return;let i=this.sheet,a=i.getPlugin("synoAutofill").getAutofillData(n,()=>!1,Nn.Cut),{mergedBorders:g,mergeRangeChanges:R}=i.getMergedCellFormatChanges(e,a);a.mergedBorders=g,a.mergeRanges=R,i.controller.clearRangeRelated(n,t,void 0);let{newRanges:L}=As([n],e);for(let W of L)i.controller.clearRangeData(W,void 0);i.controller.pasteAutofillData(e,a,!1),i.controller.moveFormulaRange(n,i.sheetId,e,!1,null)}moveFormulaRange(n,e,t,r,i){let a={};i?this.repairCrossData(i):this.sheet.formula.moveFormulaRange(n,e,t,r,a),this.sheet.sheetId===e&&this.sheet.getPlugin("synoFilter").notifyMoveRange(n,t,r,i?.filter,a),this.sheet.runHooks("afterMoveFormulaRange",n,e,t,r,i,i?void 0:a)}removeFormulaRange(n,e){let t={};e?this.repairCrossData(e):this.sheet.formula.removeFormulaRange(n,t),this.sheet.getPlugin("synoFilter").notifyRemoveRange(n,e?.filter,t),this.sheet.runHooks("afterRemoveFormulaRange",n,e,e?void 0:t)}pasteAutofillData(n,e,t,r){t===void 0&&(t=!0),this.ensureRowColExisted(n.to),t&&e.data&&this.sheet.getPlugin("synoFilter").expandRangeByData(n),this.sheet.getPlugin("synoAutofill").populateAutofillData(n.from,n.to,e,void 0,r)}populateAutofillData(n,e,t,r){this.sheet.getPlugin("synoAutofill").populateAutofillData(n.from,n.to,e,t,r)}autofillNumberFormat(n,e,t,r){this.sheet.getPlugin("synoAutofill").fillNumberFormat(n.from,n.to,e,t,r)}ensureRowColExisted(n){let{row:e,col:t}=n,r=this.sheet.countRows(),i=this.sheet.countCols();e>=r&&this.alterGrid("insert_row",r,e-r+1,r-1,null),t>=i&&this.alterGrid("insert_col",i,t-i+1,i-1,null)}setRangeData(n,e,t){let r=[],i=n.getTopLeftCorner();n.forAll((a,g)=>{let R=a-i.row,L=g-i.col;r.push([a,g,e[R]?.[L]??null])}),this.setDataAtCell(r,t)}setRangeFormat(n,e,t){let r=[],i=[],a=[],g=[],R=[],L=[],W=n.getTopLeftCorner(),K=n.getBottomRightCorner();n.forAll((Q,oe)=>{let se=Q-W.row,he=oe-W.col;r.push([Q,oe,Or(e.font?.[se][he])??null]),i.push([Q,oe,Or(e.fill?.[se][he])??null]),a.push([Q,oe,Or(e.alignment?.[se][he])??null]),g.push([Q,oe,e.border?.[se][he]?.b?.slice(0)??null]),R.push([Q,oe,e.numberFormat?.[se][he]?.fc??null]),L.push([Q,oe,e.quotePrefix?.[se][he]??!1])}),r.length>0&&(this.setFont(r,!0,t),this.setFill(i,!0,t),this.setAlignment(a,!0,t),this.setBorder(g,!0,t),this.setFormat(R,!0,t),this.setQuotePrefix(L,!0,t)),e.rowHeight&&this.resizeRow(W.row,K.row,e.rowHeight),e.colWidth&&this.resizeColumn(W.col,K.col,e.colWidth)}clearRangeData(n,e){let t=[],r=[],i=[],a=[],g=[],R=[];n.forAll((L,W)=>{t.push([L,W,null]),r.push([L,W,null]),i.push([L,W,null]),a.push([L,W,null]),g.push([L,W,null]),R.push([L,W,null])}),this.setFont(r,!0,e),this.setFill(i,!0,e),this.setAlignment(a,!0,e),this.setBorder(R,!0,e),this.setFormat(g,!0,e),this.setDataAtCell(t,e)}clearRangeRelated(n,e,t){this.removeRangeNotes(n,t),this.removeAllValidation(n),this.removeRangeCf(n),this.removeRangeInternalLink(n),this.sheet.getWorkbook().getController().commentController.clearRangeComment(this.sheet.sheetId,n),e!==!1&&this._unmergeOverlaps(n,t)}setWorksheetRtl(n){this.sheet.setWorksheetRtl(n),this.sheet.runHooks("afterSetWorksheetRtl",n)}};class C7{constructor(e,t){this.sheet=t,this.id=e.id,this.row=e.row,this.col=e.col,this.display=e.display,this.location=e.location}isInternal(){return!1}toJSON(){return{id:this.id,row:this.row,col:this.col,display:this.display,location:this.location}}getStateJSON(){return Object.assign(this.toJSON(),{href:this.location})}getId(){return this.id}getDisplay(){return this.display}setDisplay(e){this.display=e}getLocation(){return this.location}setLocation(e){this.location=e}getCoords(){return{row:this.row,col:this.col}}updateCoords(e){let{row:t,col:r}=e;this.row=t,this.col=r}repair(e){let{location:t}=e;this.setLocation(t)}}class Kie extends C7{constructor(e,t){super(e,t),this.item=new P_(this),this.hash="#",this.registerItem()}registerItem(){this.item.unregister();let e=zf(this.location),t=e?.shName&&this.sheet.getWorkbook().getSheetByName(e.shName);if(!t){this.hash="#";return}let r=e.getContainer(t.getFormulaDepManager()),i=r.getFormulaRange(e);i||(i=new D_(e),r.addFormulaRange(i)),this.hash=`#tid=${t.sheetId.slice(3)}&range=${this.location.slice(this.location.lastIndexOf("!")+1)}`,this.item.register([i])}changeLocationBy(e,t){let r=e(this.location);r!==this.location&&(Ma(t,this.sheet.sheetId,"hyperlink",{id:this.id,location:this.location}),this.location=r,this.getSheet().notifyCellChanges(this.row,this.col),this.registerItem())}isInternal(){return!0}setLocation(e){super.setLocation(e),this.registerItem()}getHash(){return this.hash}getStateJSON(){return Object.assign(this.toJSON(),{href:this.getHash()})}notifyAlterGrid(e,t,r,i,a,g){this.changeLocationBy(R=>Ar.changeFormula(R,{delta:i,start:{[e]:r}},t.getName()),g)}notifyMove(e,t,r,i){this.changeLocationBy(a=>Ar.moveFormula(e,a,r,t.getName(),this.sheet.getName()),i)}notifyRename(e,t,r){this.changeLocationBy(i=>nu(i,e,t),r)}notifyMoveFormulaRange(e,t,r,i){this.changeLocationBy(a=>Ar.changeFormulaRange(a,e,t,this.sheet.getName(),void 0,r),i)}notifyRemoveFormulaRange(e,t){this.changeLocationBy(r=>Ar.removeFormulaRange(r,e,this.sheet.getName()),t)}notifyRecalcUnknown(){}notifyDeleteSheet(){}getSheet(){return this.sheet}recalcUnknownRefs(){this.hash==="#"&&this.registerItem()}repair(e){super.repair(e),this.getSheet().notifyCellChanges(this.row,this.col)}}class Xie{constructor(e){this.sheet=e,this.hyperlinks=new Map}init(e){for(let t of e)this.addHyperlink(t)}addInternalLink(e){this.addHyperlink(e),this.sheet.runHooks("afterAddInternalLink",e)}updateInternalLink(e){let t=this.hyperlinks.get(e.id);if(!t)return;let r={id:e.id,display:t.getDisplay(),location:t.getLocation()};!!zf(e.location)===t.isInternal()?(t.setDisplay(e.display),t.setLocation(e.location)):this.addHyperlink(Object.assign(t.toJSON(),e)),this.sheet.runHooks("afterUpdateInternalLink",e,r);let{row:i,col:a}=t.getCoords();this.sheet.notifyCellChanges(i,a)}removeInternalLink(e){let t=this.removeHyperlink(e);t&&this.sheet.runHooks("afterRemoveInternalLink",t.toJSON())}toJSON(){return Array.from(this.hyperlinks.values()).map(e=>e.toJSON())}addHyperlink(e){let t=zf(e.location)?new Kie(e,this.sheet):new C7(e,this.sheet);this.hyperlinks.set(e.id,t),this.sheet.setCellMeta(e.row,e.col,[["link",t]])}removeHyperlink(e){let t=this.hyperlinks.get(e);if(!t)return null;this.hyperlinks.delete(e);let{row:r,col:i}=t.getCoords(),a=this.sheet.getCellMeta(r,i);return a&&a.link&&this.sheet.setCellMeta(r,i,[["link",null]]),t}createRowCol(e,t,r){for(let[,i]of this.hyperlinks){let a=i.getCoords();a[e]>=t&&(a[e]+=r,i.updateCoords(a))}}removeRowCol(e,t,r){for(let[i,a]of this.hyperlinks){let g=a.getCoords();g[e]<t||(g[e]<t+r?this.hyperlinks.delete(i):(g[e]-=r,a.updateCoords(g)))}}moveRowCol(e,t){for(let r of this.hyperlinks.values()){let i=r.getCoords(),a=i[e];t.sec[0].start<=a&&a<=t.sec[0].end?i[e]+=t.sec[1].amount:t.sec[1].start<=a&&a<=t.sec[1].end&&(i[e]-=t.sec[0].amount),r.updateCoords(i)}}sort(e,t){for(let r of this.hyperlinks.values()){let i=r.getCoords();t.includes(i)&&(i.row=e[i.row-t.from.row]+t.from.row,r.updateCoords(i),this.sheet.setCellMeta(i.row,i.col,[["link",r]]))}}getHyperlinksByDim(e,t,r){return Array.from(this.hyperlinks.values()).filter(i=>{let a=i.getCoords();return t<=a[e]&&a[e]<=r}).map(i=>i.toJSON())}collectRangeInfo(e,t){t===void 0&&(t=()=>!1);let r=[];for(let i=e.from.row;i<=e.to.row;i++){if(t(i))continue;let a=Array(e.getWidth());for(let g=e.from.col;g<=e.to.col;g++)a[g-e.from.col]=this.sheet.getCellMeta(i,g)?.link?.toJSON();r.push(a)}return r}repairCross(e){if(e)for(let{id:t,location:r}of e)this.hyperlinks.get(t)?.repair({location:r})}recalcUnknownRefs(){for(let e of this.hyperlinks.values())e.isInternal()&&e.recalcUnknownRefs()}}class q_{constructor(e){this.dom=e,this.maxRowCount=0,this.maxColCount=0}run(){if(!this.dom)return;let e=this.dom.rows,t=[];for(let r=0;r<e.length;r++){let i=e[r],a=i.rowIndex,g=0;if(this.onRow(i)===!1)break;for(let R=0;R<i.cells.length;R++){let L=i.cells[R];if(L.style.display!=="none"){for(;t[g]&&a<t[g].row;)g=t[g].col;if(this.onCell(L,a,g)===!1)break;(L.rowSpan>1||L.colSpan>1)&&(t[g]={row:a+L.rowSpan,col:g+L.colSpan}),g+=L.colSpan}}}}onCell(e,t,r){this.maxRowCount=Math.max(this.maxRowCount,t+e.rowSpan),this.maxColCount=Math.max(this.maxColCount,r+e.colSpan)}}class Jie extends q_{constructor(e,t){super(e),this.data=[],this.maxColCount=0,this.getCellData=t==="syno-formula"?noe:t==="syno-value"?toe:roe}run(){return super.run(),{data:this.data,colCount:this.maxColCount}}onRow(e){this.data.push([])}onCell(e,t,r){super.onCell(e,t,r),this.data[t][r]=this.getCellData(e)}}class Zie extends q_{constructor(e){super(e),this.notes=[]}run(){return super.run(),this.notes}onRow(e){this.notes.push([])}onCell(e,t,r){super.onCell(e,t,r),this.notes[t][r]=e.getAttribute("data-sheets-note")||null}}class Qie extends q_{constructor(e){super(e),this.hyperlinks=[]}run(){return super.run(),this.hyperlinks}onRow(e){this.hyperlinks.push([])}onCell(e,t,r){super.onCell(e,t,r);let i=e.getElementsByTagName("a")[0];this.hyperlinks[t][r]=i&&lA(i.href)?i.href:null}}let NM=["border","numberFormat","quotePrefix"],Y_=["font","fill","alignment",...NM];class _7 extends q_{constructor(e,t){super(e),this.format={font:[],fill:[],alignment:[],border:[],numberFormat:[],quotePrefix:[],mergeCells:[]},this.rowFormat=null,this.validateFont=t}run(){return super.run(),this.normalizeMergeCells(),this.format}onRow(e){Ao(this.format,t=>t.push([])),this.rowFormat=bn(e,this.validateFont)}onCell(e,t,r){super.onCell(e,t,r);let i=K_(this.rowFormat,this.parseTDStyle(e));for(let a=0;a<Y_.length;a++){let g=Y_[a];this.format[g][t][r]=i[g]}(e.rowSpan>1||e.colSpan>1)&&(this.format.mergeCells[t][r]=[e.rowSpan,e.colSpan,Un(e)])}parseTDStyle(e){var t;let r=bn(e,this.validateFont);if(!e.firstChild)return r;let i={},a=e.firstChild;for(;a;)if(a.nodeType===1){let W=bn(a,this.validateFont),K=En(a);K&&(W.font=Object.assign(K,W.font)),i=K_(i,W),a=a.firstChild}else if(a.nodeType===Node.TEXT_NODE&&a.nodeValue?.match(/^\s*$/))a=a.nextSibling;else break;for(let W=0;W<NM.length;W++){let K=NM[W];r[K]&&(i[K]=r[K])}let g=K_(r,i);g.alignment=g.alignment||{},g.alignment.valign=g.alignment.valign||"middle";let R=e.getAttribute("valign");R&&["top","middle","bottom"].includes(R)&&(g.alignment.valign=R);let L=e.getAttribute("align");return L&&["left","center","right"].includes(L)&&(g.alignment.halign=L),(!((t=g.border)&&Array.isArray(t.b))||t.b.every(W=>W==="#CCCCCC"||W===null))&&(g.border=null),g}normalizeMergeCells(){let e=this.format.mergeCells;for(let t=0;t<this.maxRowCount;t++)e[t]?e[t].length=this.maxColCount:e[t]=Array(this.maxColCount)}}class eoe extends _7{constructor(e){super(null,()=>null),Ao(this.format,(t,r)=>{let i=e[r];t.push(i!==void 0?[i]:[])})}run(){return this.format}}var Ms=function(n){return n[n.Normal=0]="Normal",n[n.RichText=1]="RichText",n[n.R1C1=2]="R1C1",n[n.SheetValue=3]="SheetValue",n}({});function S7(n){let e;if(e=n.getAttribute("data-sheets-formula"))return{value:e,type:2};if(e=n.getAttribute("data-syno-value"))try{let t=JSON.parse(e);return{value:t,type:_a(t)?1:3}}catch{}return null}function toe(n){let e={value:null,type:0},t=n.getAttribute("data-syno-value");if(t)try{let r=JSON.parse(t);_a(r)&&(r=yo.fromJSON(r).getText()),e.value=r,e.type=3}catch{}else e.value=PM(n);return e}function PM(n){let e=n.textContent||"";return(e.includes(`
`)||n.querySelector("p, br"))&&(n.innerHTML=n.innerHTML.replace(/<br[^>]*>/gi,"<br>").replace(/<br\s*\/?>([^\n]*)\n +/gi,"<br>$1").replace(/\n /g,"").replace(/<br>/g,`
`).replace(/<\/p\s*>/g,`</p>
`),e=n.textContent||""),e.trim()}function noe(n){return S7(n)||{value:null,type:0}}function roe(n){let e,t=S7(n);if(t){if(n.hasAttribute("data-sheets-value")||(e=PM(n))===n.getAttribute("data-syno-repr"))return t}else e=PM(n);return{value:e,type:0}}function K_(n,e){return[["font",Wa],["fill",Jl],["alignment",uc]].forEach(t=>{let[r,i]=t,a=e[r],g=n[r];!a&&g?e[r]=g:g&&a&&(e[r]=new i().assign(g).assign(a).toJSON())}),e}function I7(n){let e=n?.mergeCells;if(!e)return!1;let t=e[0][0];return e.length===1&&e[0].length===1||!!t&&t[0]===e.length&&t[1]===e[0].length}let X_=new WeakMap,ioe=class{constructor(n){this.formulaDepManager=new Mre(n),this.hyperlinkCollection=new Xie(this),this.controller=new Yie(this),this.workbook=n,this.renderCache=null}init(n){this._snapshot=function(e){let t=function(a){let g=0;for(let R in a)if(a[R]){let L=parseInt(R,10);L>g&&(g=L)}return g+1}(e.cells),r=t>(e.rowCount||100)?t:e.rowCount,i={...e,rowCount:r};return i.rowCount??=100,i.colCount??=30,i.rows??=[],i.cols??=[],i.cells??={},i.global??={},i.mergeCells??=[],i.fixedRowTop??=0,i.fixedColumnLeft??=0,i.cfs??=[],i.filter??=null,i.validation??={},i.drawing??=[],i.hyperlinks??=[],i.notes??=[],i}(n.snapshot),this._loadPlugins(n.plugins),this.runHooks("beforeInit"),this.sheetId=n.sheetId,this.worksheet=new Lie(this.workbook,this._snapshot),this.hyperlinkCollection.init(this._snapshot.hyperlinks),this.renderCache=this.getPlugin("synoRenderCache"),n.deferInit!==!0&&(this.notifyDataReady(),this.notifyPluginsReady())}notifyDataReady(){this.runHooks("init")}notifyPluginsReady(){this.runHooks("afterInit",this._snapshot),this._snapshot=void 0}destroy(){this.runHooks("beforeDestroy"),this._destroyPlugins(),this.runHooks("afterDestroy"),this.workbook.hooks.removeContext(this)}notifyCellChanges(n,e){this.getWorkbook().getNotifier()?.onCoordsChanges(this.sheetId,[{row:n,col:e}])}notifyRangeChanges(n){let e=[];i6(n.from,n.to,(t,r)=>{e.push({row:t,col:r})}),this.getWorkbook().getNotifier()?.onCoordsChanges(this.sheetId,e)}notifyAlterGrid(){this.getWorkbook().getNotifier()?.onAlterGrid(this.sheetId,this.countRows(),this.countCols())}notifySheetChanges(n){this.getWorkbook().getNotifier()?.onSheetChanges(this.sheetId,n)}notifyPluginChanges(n){this.getWorkbook().getNotifier()?.onSheetPluginChanges(this.sheetId,n)}getFormulaDepManager(){return this.formulaDepManager}isActive(){return this.workbook.current===this}addHook(n,e){this.workbook.hooks.add(n,e,this)}addHookOnce(n,e){this.workbook.hooks.once(n,e,this)}removeHook(n,e){this.workbook.hooks.remove(n,e,this)}runHooks(n){for(var e=arguments.length,t=Array(e>1?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];return this.workbook.hooks.runWithArgs(this,n,t)}getDataAtCell(n,e){return this.worksheet.getValue(n,e)}setDataAtCell(n,e,t){this.worksheet.setValue(n,e,t),this.notifyCellChanges(n,e)}isEmptyCell(n,e){return Cr(this.getDataAtCell(n,e))}isEmptyRange(n){return n.forAll((e,t)=>{if(!this.isEmptyCell(e,t))return!1})!==!1}getCellModel(n,e){return this.worksheet.getCell(n,e)}getOrCreateCell(n,e){return this.worksheet.getOrCreateCell(n,e)}setCellXf(n,e,t){this.getOrCreateCell(n,e).setXfId(t),this.notifyCellChanges(n,e)}getCellStyle(n,e){let t=this.getCellModel(n,e);return t?t.getCellStyle():null}getComputedCellStyle(n,e){return this.worksheet.getComputedCellStyle(n,e)}setCellMeta(n,e,t){if(t.length===0)return;let r=this.getOrCreateCell(n,e);for(let i of t){let[a,g]=i;r.setProperty(a,g)}this.notifyCellChanges(n,e)}getCellMeta(n,e){let t=this.getCellModel(n,e);return t?t.getProperties():null}getCellProperty(n,e,t){return this.getCellMeta(n,e)?.[t]||null}getCellNote(n,e){return this.getCellModel(n,e)?.note}setCellNote(n,e,t){this.getOrCreateCell(n,e).setNote(t),this.notifyCellChanges(n,e)}getCellHyperlinkState(n,e){return this.getCellMeta(n,e)?.link?.getStateJSON()}getCellFormulaItemState(n,e){return this.getFormulaItem(n,e)?.getStateJSON()}ensureCellDirection(n,e){return this.getCellMeta(n,e)?.dir||"ltr"}getDataModel(){return this.worksheet}getStyleManager(){return this.workbook.getStyleManager()}getWorkbook(){return this.workbook}getFormulaItem(n,e){let t=this.getCellModel(n,e);return t?t.getFormulaItem():void 0}setFormulaItem(n,e,t){this.setCellMeta(n,e,[["formulaItem",t]])}createRow(n,e,t){this.worksheet.createRow(n,e,t),this.notifyAlterGrid()}createCol(n,e,t){this.worksheet.createCol(n,e,t),this.notifyAlterGrid()}removeRow(n,e){this.worksheet.removeRow(n,e),this.notifyAlterGrid()}removeCol(n,e){this.worksheet.removeCol(n,e),this.notifyAlterGrid()}setDimensionStyle(n,e,t){n==="row"?(this.worksheet.updateRowAttr(e,"s",t),this.notifySheetChanges(["rows"])):(this.worksheet.updateColAttr(e,"s",t),this.notifySheetChanges(["cols"]))}setGlobalStyle(n){this.worksheet.updateGlobalStyle(n),this.notifySheetChanges(["global"])}countRows(){return this.worksheet.getRowCount()}countCols(){return this.worksheet.getColCount()}getPlugin(n){return X_.get(this)[n]}_loadPlugins(n){let e={};Sr(n||[],t=>{let r=new t(this);e[r.pluginName]=r}),X_.set(this,e)}_destroyPlugins(){Ao(X_.get(this),n=>n.destroy()),X_.delete(this)}isReadonly(){return this.workbook.readonly}isCommentable(){return this.workbook.commentable}getName(){return this.workbook.getNameById(this.sheetId)}isRtl(){return this.worksheet.getWorksheetRtl()}setWorksheetRtl(n){this.worksheet.setWorksheetRtl(n),this.notifySheetChanges(["rtl"]),n&&this.workbook.getNotifier()?.onRtlDataAdded()}getHyperlinkModel(){return this.hyperlinkCollection}getRangeBound(n,e){return a6(n,e,this.countRows()-1,this.countCols()-1)}getOverlapCellRanges(n){let e=this.getPlugin("synoMergeCell"),t={};return n.forAll((r,i)=>{let a=e.getMergedRange(r,i)||new sn(r,i,r,i),g=`${a.from.row},${a.from.col}`;t[g]||(t[g]=a)}),Object.values(t)}getMergedCellFormatChanges(n,e){let t=e?.format?.mergeCells;return Array.isArray(t)&&t.length!==0?!I7(e.format)||n.isSingle()||this.getPlugin("synoMergeCell").isMultipleCells(n)?{mergeRangeChanges:this.getPlugin("synoAutofill").getMappingMergeRanges(n.from,n.to,t,"down")}:{mergedBorders:this.modifyByMerged(n,e.format)}:{}}modifyByMerged(n,e){let t=e.border;if(!t||t.length===0)return;let r=t[0][0],i=pl(pl(t)),a=Qu([r?.b[0]??null,i?.b[1]??null,i?.b[2]??null,r?.b[3]??null]);return ky(t,(g,R,L,W)=>{W[R][L]=null}),aw(this.countRows(),this.countCols(),n,"OUTER",a,(g,R)=>this.getDataModel().getComputedCellStyle(g,R).getBorder().b)}};function ooe(n,e,t){let r=e,i=t,a=1;for(;n.isHiddenRow(r);)if(r+=a,n.countRows()===r&&(a=-1,r=e-1),r===-1){r=e;break}for(a=1;n.isHiddenCol(i);)if(i+=a,n.countCols()===i&&(a=-1,i=t-1),i===-1){i=t;break}return{row:r,col:i}}function x7(n,e){let t=n.getMergePlugin(),r=n.countRows(),i=n.countCols(),[a,g,R,L]=e,W=[];function K(se,he,me){let ye=[];return me?(se<me.from&&ye.push({from:se,to:me.from-1}),he>me.to&&ye.push({from:me.to+1,to:he})):ye.push({from:se,to:he}),ye}function Q(se,he,me,ye){if(!(se<0)&&!(se>=r))for(let{from:Te,to:Me}of K(he,me,ye))for(let Oe=Te;Oe<=Me;Oe++)W.push({row:se,col:Oe})}function oe(se,he,me,ye){if(!(se<0)&&!(se>=i))for(let{from:Te,to:Me}of K(he,me,ye))for(let Oe=Te;Oe<=Me;Oe++)W.push({row:Oe,col:se})}for(Q(a-1,g,L),Q(R+1,g,L),oe(g-1,a,R),oe(L+1,a,R);W.length>0;){let se=W.shift(),{row:he,col:me}=t.getMergedRange(se.row,se.col)?.from??se;if(a<=he&&he<=R&&g<=me&&me<=L||n.isEmptyCell(he,me))continue;let ye=sn.fromArray([Math.min(a,he),Math.min(g,me),Math.max(R,he),Math.max(L,me)]);t.expandSelection(ye);let{from:Te,to:Me}=ye;Q(Te.row-1,Te.col,Me.col,Te.row===a?{from:g,to:L}:void 0),Q(Me.row+1,Te.col,Me.col,Me.row===R?{from:g,to:L}:void 0),oe(Te.col-1,Te.row,Me.row,Te.col===g?{from:a,to:R}:void 0),oe(Me.col+1,Te.row,Me.row,Me.col===L?{from:a,to:R}:void 0),[a,g,R,L]=ye.toArray()}return[a,g,R,L]}function T7(n,e,t,r){for(let i=t;i<=r;i++)if(!n.isEmptyCell(e,i))return!0;return!1}function aoe(n,e){e.isSingle()&&(e=sn.fromArray(x7(n,e.toArray())));let t=e.from.row,r=e.from.col,i=e.to.col;for(;t<=e.to.row&&!(!n.isHiddenRow(t)&&T7(n,t,r,i));)t+=1;if(t>e.to.row)return null;for(;r<=i&&(n.isEmptyCell(t,r)||n.isHiddenCol(r));)r+=1;for(;i>=r&&(n.isEmptyCell(t,i)||n.isHiddenCol(i));)i-=1;if(r>i)return null;let a=e.to.row;for(;a>=t&&!(!n.isHiddenRow(a)&&T7(n,a,r,i));)a-=1;return t>a?null:new sn(t,r,a,i)}function um(n,e,t){let r=n[Symbol.iterator](),i=r.next();for(let a=0;a<t;a++){for(;!i.done&&i.value.to<a;)i=r.next();if(!e(a)&&(i.done||i.value.from>a))return!1}return!0}let k7=class extends ioe{getColWidth(n){let e=this.getDefaultColWidth(),t=this.worksheet.getColInfo(n);return t&&(t.hidden===!0?e=0:t.w&&(e=t.w)),e}getRowHeight(n){if(this.isHiddenRow(n))return 0;let e=this.worksheet.getRowInfo(n);return Math.max(e?.h??this.renderCache.modifyRowHeight(n,this.getDefaultRowHeight()),Qe.MIN_ROW_HEIGHT)}getDefaultRowHeight(){return this.worksheet.getDefaultRowHeight()}getDefaultColWidth(){return this.worksheet.getDefaultColWidth()}isHiddenRowExcludeFilter(n){let e=this.getPlugin("synoFilter");return this.hidden.isHiddenRow(n)&&!e.isFilteredRow(n,!1)}isFilteredRow(n){let e=this.getPlugin("synoFilter");return e.isInViewState()?e.isViewHidden(n)&&e.isFilteredRow(n,!0):this.hidden.isHiddenRow(n)&&e.isFilteredRow(n,!1)}isHiddenRow(n){return this.isHiddenRowExcludeFilter(n)||this.isFilteredRow(n)}isHiddenCol(n){return this.hidden.isHiddenCol(n)}isHiddenCell(n,e){return this.isHiddenRow(n)||this.isHiddenCol(e)}isRowHidable(n,e){for(let t=0;t<n;t++)if(!this.isHiddenRow(t))return!0;for(let t=this.countRows()-1;t>e;t--)if(!this.isHiddenRow(t))return!0;return!1}isColHidable(n,e){for(let t=0;t<n;t++)if(!this.isHiddenCol(t))return!0;for(let t=this.countCols()-1;t>e;t--)if(!this.isHiddenCol(t))return!0;return!1}getHiddenPlugin(){return this.hidden}getFilterPlugin(){return this.getPlugin("synoFilter")}getMergePlugin(){return this.getPlugin("synoMergeCell")}getValidationPlugin(){return this.getPlugin("synoValidation")}getCfPlugin(){return this.getPlugin("synoConditionalFormat")}getFreezePlugin(){return this.getPlugin("synoFreezeBar")}getRowResizePlugin(){return this.getPlugin("synoManualRowResize")}getColResizePlugin(){return this.getPlugin("synoManualColumnResize")}getDrawingPlugin(){return this.getPlugin("synoDrawingController")}getGroupPlugin(){return this.getPlugin("synoGroup")}containsAllVisibleRanges(n,e){return um(n,(e==="row"?this.isHiddenRow:this.isHiddenCol).bind(this),e==="row"?this.countRows():this.countCols())}findClosestCell(n,e){return ooe(this,n,e)}getNonEmptyNeighborRange(n){return x7(this,n)}findSuggestionDataRange(n){return aoe(this,n)}setRenderHeights(n){this.getPlugin("synoRenderCache").setRenderHeights(n)}calcRenderRanges(n){for(let e of n)e.forAll((t,r)=>{let i=this.getCellModel(t,r);if(i)if(this.isEmptyCell(t,r)){let a=i.getProperties();this.getPlugin("synoConditionalFormat").afterDataRenderer(t,r,i,a),this.getPlugin("synoValidation").afterDataRenderer(t,r,i,a)}else{let a=this.getFormulaItem(t,r);a&&this.formula.updateItem(a),this.renderCache.renderData(t,r,i)}});this.getFilterPlugin().calcRenderRanges(n),this.getDrawingPlugin().updateAllChartData()}getComputedBackgroundColor(n,e){let t=this.getCellModel(n,e),r=t&&this.getPlugin("synoConditionalFormat").getCfStyle(n,e,t,t.getProperties());return r?.bgColor?r.bgColor:this.worksheet.getComputedCellStyle(n,e)?.getFill()?.bg||Qe.DEFAULT_FILL_COLOR}getComputedTextColors(n,e){let t=this.getCellModel(n,e);if(!t||!t.value)return[];let r=this.getPlugin("synoConditionalFormat").getCfStyle(n,e,t,t.getProperties());if(r?.color)return[r.color];let i=this.renderCache.getCellTextDesc(n,e),a=i?.getColor();if(a){let L=Vn(`#${a}`);if(L)return[L.toLowerCase()]}let g=this.worksheet.getComputedCellStyle(n,e)?.getFont(),R=g?.color||Qe.DEFAULT_FONT_COLOR;return Zr(t.value)?mh(t.value,R):i?.l?[g?.color||Qe.HYPER_LINK_COLOR]:[R]}getVisibleRangeValues(n){let e=this.getWorkbook(),t=e.createBaseFormulaItem(),r=new Vb().assign({keepNull:!0,keepNfId:!0,keepLink:!1,skipHiddenRow:!0,skipHiddenCol:!0,skipFiltered:!0});return{values:e.getFormulaParser().getRangeValues(n,{sheetId:this.sheetId,item:t},r),nfId:t.nfId}}getRangeTexts(n,e){let t,{rowStep:r=1,colStep:i=1}=e===void 0?{}:e,a=[],[g,R,L,W]=n.toArray();for(let K=g;K<=L;K+=r){a.push(t=[]);for(let Q=R;Q<=W;Q+=i){let oe=this.renderCache.getCellText(K,Q);t.push(oe)}}return a}getAllTexts(n){n===void 0&&(n=!1);let e=new sn(0,0,this.countRows()-1,this.countCols()-1),t=this.getRangeTexts(e);return n&&bne(t,r=>!r),t}getCellTextDesc(n,e){return this.renderCache.getCellTextDesc(n,e)}getSpillRange(n,e){let t=this.formula.getSpillItem(n,e);return t?nr.createFromRange(t.getSpillRange()?.getRange(),this)?.toSynoRange()??null:null}getCellFormulaValue(n,e){return this.formula.getCellValue(n,e)}getPartialStateJSON(n){let e={};for(let t of n)switch(t){case"cells":e[t]=this.getCellsStateJSON();break;case"rows":e[t]=this.getRowsStateJSON();break;case"cols":e[t]=this.getColsStateJSON();break;case"rowCount":e[t]=this.countRows();break;case"colCount":e[t]=this.countCols();break;case"global":e[t]=this.worksheet.getGlobalInfo();break;case"formulaDimensions":e[t]=this.getFormulaDimensions();break;case"rtl":e[t]=this.isRtl()}return e}getPluginStateJSON(n){let e={};for(let t of n)switch(t){case"filter":e[t]=this.getFilterPlugin().getStateJSON();break;case"merge":e[t]=this.getPlugin("synoMergeCell").getStateJSON();break;case"validation":e[t]=this.getValidationPlugin().getStateJSON();break;case"cf":e[t]=this.getCfPlugin().getStateJSON();break;case"freeze":e[t]=this.getFreezePlugin().getStateJSON();break;case"drawing":e[t]=this.getDrawingPlugin().getStateJSON()}return e}getStateJSON(){return{worksheet:this.getPartialStateJSON(["rowCount","colCount","rows","cols","global","cells","formulaDimensions","rtl"]),plugins:this.getPluginStateJSON(["freeze","merge","cf","filter","validation","drawing"])}}getDimensionStateJSON(){return{rowCount:this.countRows(),colCount:this.countCols()}}getRowsStateJSON(){return Array.from({length:this.countRows()},(n,e)=>{let t=this.worksheet.getRowInfo(e),r={hidden:this.hidden.isHiddenRow(e),...this.getDimStateJSON(t)};return t?.h&&(r.h=t.h),r})}getColsStateJSON(){return Array.from({length:this.countCols()},(n,e)=>({hidden:this.hidden.isHiddenCol(e),w:this.getColWidth(e),...this.getDimStateJSON(this.worksheet.getColInfo(e))}))}getDimStateJSON(n){let e={};return n?.s!==void 0&&(e.s=n?.s),n?.outlineLevel!==void 0&&(e.outlineLevel=n?.outlineLevel),n?.collapse!==void 0&&(e.collapse=n?.collapse),e}getCellsStateJSON(){let n=this.countRows(),e=this.countCols(),t={};for(let r=0;r<n;r++){let i=!1;for(let a=0;a<e;a++){let g=this.getCellStateJSON(r,a);g&&(i||(t[r]={},i=!0),t[r][a]=g)}}return t}getScatterCellsStateJSON(n){return n.map(e=>{let{row:t,col:r}=e;return this.getCellStateJSON(t,r)})}getCellStateJSON(n,e){let t=this.getCellModel(n,e),r=t?.getValue(),i=Cr(r)?this.formula.getSpillItem(n,e):null;if(!t&&(!i||i.needUpdate||i.needCheckSpill||i.spillError))return null;let a=t?.getProperties(),g=i?this.formula.getSpillValue(i.getValue(),n-i.row,e-i.col):t?.getFormulaItem()?.getValue()??null;for(;Array.isArray(g);)g=g[0];return{v:Zr(r)?r.toJSON():r,n:t?.note,s:t?.xfId,link:a?.link?.getStateJSON()??null,comment:a?.comment,cfStyle:a?.cfStyle,validId:a?.validId,synoInvalid:a?.synoInvalid,pivot:a?.pivot,dir:a?.dir,formulaItem:t?.getFormulaItem()?.getStateJSON(),cellFormulaValue:kh(g),renderDesc:this.renderCache.getCellDescState(n,e)}}getFormulaDimensions(){return this.getFormulaDepManager().getSpillContainer().getAllFormulaRanges().map(n=>{if(!n.getSpillItem())return null;let e=n.getRange();return[e.from.row,e.from.col,e.to.row,e.to.col]}).filter(ga)}};function Pa(n){let e=n.type,t=n.value;if(typeof t=="number"&&e!=="number"&&e!=="datetime"||typeof t=="string"&&e!=="string"&&e!=="error"||typeof t=="boolean"&&e!=="boolean"||t===null&&e!=="missing")throw Error("Invalid value item");return{type:e,value:t}}function Wh(n){return{type:"string",value:n,contains:[]}}let soe={n:"number",d:"datetime",b:"boolean",s:"string",e:"error",m:"missing"};function Io(n){return n.type[0]+":"+n.value}function R7(n){let e=n[0],t=n.slice(2);return{type:soe[e],value:e==="n"||e==="d"?Number(t)||0:e==="b"?t==="true":e==="m"?null:t}}var wu=function(n){return n[n.number=0]="number",n[n.datetime=1]="datetime",n[n.text=2]="text",n}({}),Xr=function(n){return n.seconds="seconds",n.minutes="minutes",n.hours="hours",n.days="days",n.months="months",n.quarters="quarters",n.years="years",n}({});let bu=Object.freeze(Object.values(Xr));var E7=function(n){return n.avg="avg",n.count="count",n.countA="countA",n.max="max",n.min="min",n.product="product",n.stdDev="stdDev",n.stdDevP="stdDevP",n.sum="sum",n.var="var",n.varP="varP",n}({}),A7=function(n){return n.normal="normal",n.percentOfTotal="percentOfTotal",n.percentOfRow="percentOfRow",n.percentOfCol="percentOfCol",n.percentOfParentRow="percentOfParentRow",n.percentOfParentCol="percentOfParentCol",n.index="index",n}({});let M7={number:0,datetime:1,boolean:2,string:3,error:4,missing:5};function BM(n,e,t){let r=Pa(n),i=Pa(e),a=M7[r.type]-M7[i.type];return a!==0?a:["number","datetime"," boolean"].includes(r.type)?r.value-i.value:r.value==null||i.value==null?0:t?t.getCollator().compare(r.value+"",i.value+""):(r.value+"").localeCompare(i.value+"")}function Ba(n,e,t){return t?BM(n,e,t)===0:n.type===e.type&&n.value===e.value}let loe=new Eo;function J_(n,e){switch(e===void 0&&(e=""),n.type){case"missing":return e;case"number":return n.value.toString();case"datetime":return loe.render(D7(n),n.value);case"boolean":return n.value.toString().toUpperCase();case"string":case"error":return n.value}}function D7(n){return n.type==="datetime"?Number.isInteger(n.value)?"yyyy/mm/dd":"yyyy/mm/dd hh:mm:ss":"General"}function LM(n,e){let t=new Set(n.map(r=>r.toLocaleLowerCase()));for(let r=0;r<Number.MAX_SAFE_INTEGER;r++){let i=e(r);if(!t.has(i.toLocaleLowerCase()))return i}return null}function O7(n){let e=0n;for(let t of n)e|=1n<<BigInt(t);return e}function vw(n,e){let t=[],r=Array(n.length).fill(!1);if(e&&e.length>0){let i=Object.create(null);for(let a=0;a<n.length;a++)i[Io(n[a]).toLowerCase()]=a;for(let a=0;a<e.length;a++){let g=e[a],R=i[Io(g).toLowerCase()]??-1;if(R<0)continue;let L=n[R],W={...g,value:L.value,sharedIndex:R};t.push(W),r[R]=!0}}for(let i=0;i<n.length;i++)r[i]||t.push(hm.makeItem(n[i],i));return t}function N7(n,e,t,r){t===void 0&&(t="asc");let i=[];for(let g of n)g.caption!==null&&(i[g.sharedIndex]=Pa({type:"string",value:g.caption}));let a=t==="asc"?1:-1;return n.sort((g,R)=>BM(i[g.sharedIndex]??e[g.sharedIndex],i[R.sharedIndex]??e[R.sharedIndex],r)*a),n}class hm{constructor(e,t,r){if(this.table=e,this.cacheField=t??null,r?.items){let i=this.cacheField?.getItemsForPivotField()??[];this.items=function(a,g){let R=[],L=Array(g.length).fill(!1);for(let W of a){let K=W.sharedIndex;if(K<0||K>=g.length)continue;let Q=g[K],oe={type:Q.type,value:Q.value,...W,sharedIndex:K};R.push(oe),L[K]=!0}if(R.length===g.length)return R;for(let W=0;W<g.length;W++)L[W]||R.push(hm.makeItem(g[W],W));return R}(r?.items,i)}else this.items=vw(this.cacheField?.getItemsForPivotField()??[]);this.baseItemSetMap=null,this._valueItemStrings=null,this.id=t?.getId()??null,this.name=r?.name??null,this.useSuffix=r?.useSuffix??!0,this.axis=r?.axis??null,this.dataField=r?.dataField??!1,this.numFmt=r?.numFmt??null,this.sorting=r?.sorting??{type:"manual",fieldId:null},this.filter=r?.filter??null,this.subtotals=Or(r?.subtotals)??"default",this.axisCapacity=Or(r?.axisCapacity)??{row:!0,col:!0,page:!0,data:!0,off:!0},this.subtotalCaption=r?.subtotalCaption,this.outline=r?.outline??!0,this.compact=r?.compact??!0,this.subtotalTop=r?.subtotalTop??!0,this.repeatLabel=r?.repeatLabel??!1,this.blankRow=r?.blankRow??!1,this.pageBreak=r?.pageBreak??!1,this.showAll=r?.showAll??!1}getId(){if(!this.cacheField)throw Error(`Pivot field '${this.getName()}' has no cache field`);return this.cacheField.getId()}getIndex(){return this.table.getPivotFields().indexOf(this)}isFiltered(){return this.filter!==null||this.items.some(e=>e.hidden)}isFromData(){return!!this.cacheField?.isFromData()}hasGroupSetting(){return!!this.getGroupSetting()}usingGroupItems(){return!!this.cacheField?.usingGroupItems()}isMultipleSubtotals(){return Array.isArray(this.subtotals)&&this.subtotals.length>1}getName(e){return e===void 0&&(e=!0),(this.name??this.cacheField?.getName()??"")+(e&&this.useSuffix?this.getSuffix():"")}getSuffix(){return this.cacheField?.getSuffix()??""}getSubtotalCaption(){return this.subtotalCaption}setSubtotalCaption(e){this.subtotalCaption=e}getNumFmt(){return this.numFmt??this.cacheField?.getNumFmt()??"General"}getItemNumFmt(e){let t=this.getNumFmt();return t==="General"?D7(e):t}getType(){return this.cacheField?.getType()??wu.text}getItemCount(){return this.items.length}getRawItemCount(){return this.isFromData()?this.cacheField?.getSharedItems().length??0:0}getGroupSetting(){return this.cacheField?.getGroupSetting()??null}getGroupBaseField(){let e=this.getGroupSetting();return e&&this.table.getPivotFieldById(e.base??"")}getBaseToGroupIndexMap(){let e=this.cacheField?.getGroupItems();if(!e)return null;let t=this.getGroupBaseField()??this,r=Array(t?.cacheField?.getSharedItems().length??0);for(let i=0;i<e.length;i++)for(let a of e[i].contains){let g=t?.cacheField?.getItemSharedIndex(a)??-1;g>=0&&(r[g]=i)}return r}generateBaseItemSetMap(){let e=this.cacheField;if(!e)throw Error(`Pivot field '${this.getName()}' has no cache field`);let t=new Map,r=this.getGroupSetting();if(!r)return t;let i=this.getGroupBaseField()?.cacheField??e,a=g=>i.getItemSharedIndex(g);for(let g of r.items){let R=e.getGroupItemIndex(g),L=O7(g.contains.map(a));t.set(R,L)}return t}getBaseItemSetMap(){return this.usingGroupItems()&&this.getGroupSetting()?this.baseItemSetMap??=this.generateBaseItemSetMap():null}getBaseItemSetFromGroupItemIndex(e){let t=this.getBaseItemSetMap();return t?t.get(e)??null:1n<<BigInt(e)}getItemRawIndex(e){return this.cacheField?.getItemIndex(e)??-1}getBaseItemsFromGroupItem(e){if(!this.usingGroupItems())return[Pa(e)];let t=this.getGroupSetting();if(!t)return null;let r=t.items.find(i=>Ba(i,e));return r?r.contains:null}getGroupItemByBaseItem(e){if(!this.usingGroupItems())return this.getItemByValue(e)??null;let t=this.getGroupSetting();if(!t)return null;let r=t.map?.[Io(e)];return r?this.getItemByValue(Pa(r))??null:null}getItemValues(e,t){let r;return e===void 0&&(e=!1),t===void 0&&(t=!1),e?r=this.isFromData()?this.cacheField?.getSharedItems()??[]:[]:(r=this.items,t&&(r=r.slice().sort((i,a)=>i.sharedIndex-a.sharedIndex))),r.map(Pa)}_clearValueItemStringsCache(){this._valueItemStrings=null}_getRawValueItemStrings(){return(this.isFromData()?this.cacheField?.getSharedItems()??[]:[]).map(Io)}getRawValueItemStrings(){return this._valueItemStrings??=this._getRawValueItemStrings()}getItemByValue(e){return this.items.find(t=>Ba(t,e))}getItemBySharedIndex(e){return this.items.find(t=>t.sharedIndex===e)}getItemByOrder(e){return this.items[e]}getItemOrderBySharedIndex(e){let t=this.items.findIndex(r=>r.sharedIndex===e);return t>=0?t:void 0}getItemLabelBySharedIndex(e){let t=this.getItemOrderBySharedIndex(e);if(t!==void 0)return this.getItemLabelByOrder(t)}getItemLabelByOrder(e){let t=this.items[e]?.caption;return t!==null?t:this.getItemByOrder(e)?.value}getItemLabel(e){let t=this.items.findIndex(r=>Ba(r,e));if(!(t<0))return this.getItemLabelByOrder(t)}getNonHiddenItems(){return this.items.filter(e=>!e.hidden).map(e=>Pa(e))}foldItems(){for(let e of this.items)e.folded=!0}sortItems(e,t){e===void 0&&(e="asc"),this.cacheField&&N7(this.items,this.cacheField.getItemsForPivotField(),e,t)}reorderItems(e){if(e.length!==this.items.length)return!1;let t=new Map(e.map((i,a)=>[i.toLowerCase(),a])),r=[];for(let i of this.items){let a=Io(i).toLowerCase(),g=t.get(a)??null;if(g===null)return!1;r[g]=i}return this.items=r,!0}updateItemAttrs(e){let t=new Map(e.map(r=>[Io(r).toLowerCase(),r]));for(let r of this.items){let i=Io(r).toLowerCase(),a=t.get(i);a&&(r.caption=a.caption??r.caption,r.folded=a.folded??r.folded,r.hidden=a.hidden??r.hidden)}}updateItems(){this.cacheField&&(this.items=vw(this.cacheField.getItemsForPivotField(),this.items),this._clearValueItemStringsCache())}toJSON(){return{id:this.id,name:this.name,useSuffix:this.useSuffix,axis:this.axis,dataField:this.dataField,numFmt:this.numFmt,sorting:this.sorting,filter:this.filter,axisCapacity:Or(this.axisCapacity),subtotals:Or(this.subtotals),items:this.items.map(e=>{let{caption:t,sharedIndex:r,folded:i,hidden:a}=e;return{caption:t,sharedIndex:r,folded:i,hidden:a}}),subtotalCaption:this.subtotalCaption,outline:this.outline,compact:this.compact,subtotalTop:this.subtotalTop,repeatLabel:this.repeatLabel,blankRow:this.blankRow,pageBreak:this.pageBreak,showAll:this.showAll}}static makeItem(e,t){return{type:e.type,value:e.value,caption:null,sharedIndex:t,hidden:!1,folded:!1}}}let Ds="values_field";class Go extends hm{static#e=this.id=Ds;static#t=this.index=-2;constructor(e,t,r=e.getLocale().getText("default_values_field_caption")){super(e),this.name=r,this.axisCapacity={page:!1,row:!0,col:!0,data:!1,off:!0},this.axis=t,this.defaultAxis=t??"col",this.defaultPosition=void 0}getId(){return Go.id}getIndex(){return-2}}class FM{constructor(e){this.table=e,this.slices=new Map}get(e,t){t===void 0&&(t=!1);let r=this.slices.get(e);return!r&&t&&(r=new uoe(this.table,e),this.slices.set(e,r)),r}hasKey(e){return this.slices.has(e)}values(){return this.slices.values()}}class uoe{constructor(e,t){this.key=t,this.table=e,this.records=null,this.children=null,this.stats=null}getKey(){return this.key}isJustCreated(){return this.records===null&&this.children===null}addRecord(e){(this.records??=[]).push(e),this._resetIsEmpty()}setChildren(e,t){this._resetIsEmpty(),this.children??={row:null,col:null};let r=this.children[e];if(r){for(let i of(r.clear(),t))r.add(i);return r}return this.children[e]=new Set(t)}addChildren(e,t){this._resetIsEmpty();let r=this.children?.[e];if(!r)return this.setChildren(e,t);for(let i of t)r.add(i);return r}isEmpty(){return this._empty??=this._isEmpty()}_isEmpty(){if(this.records)return this.records.length===0;let e=this.getChildren();if(!e)return!0;for(let t of e)if(!t.isEmpty())return!1;return!0}_resetIsEmpty(){this._empty=void 0}getChildren(e){return this.children?e!==void 0?this.children[e]??null:this.children.row??this.children.col??null:null}getAllRecords(){if(this.records)return this.records;let e=[];for(let t of this.getChildren()??[])e=e.concat(t.getAllRecords());return e}getAggregateValue(e,t){let r=this.stats?.get(e);if(!r){let i=this.getBaseFieldId(e);i===e?r=this.computeStat(i):(r=this.stats?.get(i)??this.computeStat(i),this.stats?.set(e,r))}try{return new hoe(r).calc(t)}catch(i){if(Pi(i))return i.message;throw i}}getBaseFieldId(e){try{return this.table.getCache().getBaseField(e)?.getId()??e}catch{return e}}createEmptyStat(){return{count:0,numberCount:0,sum:0,sqSum:0,product:1,max:Number.NEGATIVE_INFINITY,min:Number.POSITIVE_INFINITY}}computeStat(e){let t=this.createEmptyStat();if(this.children)for(let r of this.getChildren()??[]){let i=r.stats?.get(e);i||(i=r.computeStat(e)),t.count+=i.count,i.numberCount!==0&&(t.numberCount+=i.numberCount,t.sum+=i.sum,t.sqSum+=i.sqSum,t.product*=i.product,t.max=Math.max(t.max,i.max),t.min=Math.min(t.min,i.min))}else if(this.records){let r=this.table.getCache().getFields(),i=r.findIndex(R=>R.getId()===e);if(i<0)throw Error("Invalid pivot field id");let a=r[i];if(a.isFormulaField())return t;let g=a.getSharedItems();for(let R of this.records){let L=R[i];if(L&&(L.type==="shared"&&(L=g[L.value]),L.type!=="missing"&&t.count++,L.type==="number"||L.type==="datetime")){let W=L.value;t.numberCount++,t.max=Math.max(t.max,W),t.min=Math.min(t.min,W),t.product=t.product*W,t.sum=t.sum+W,t.sqSum=t.sqSum+W*W}}}return this.stats??=new Map,this.stats.set(e,t),t}}class hoe{constructor(e){this.stat=e}calc(e){return this.stat.count===0?0:this[e]()}sum(){return this.stat.sum}avg(){if(this.stat.numberCount===0)throw Wn.DIV0;return this.stat.sum/this.stat.numberCount}count(){return this.stat.numberCount}countA(){return this.stat.count}max(){return this.stat.numberCount===0?0:this.stat.max}min(){return this.stat.numberCount===0?0:this.stat.min}product(){return this.stat.numberCount===0?0:this.stat.product}stdDev(){return Math.sqrt(this.var())}stdDevP(){return Math.sqrt(this.varP())}var(){if(this.stat.numberCount<2)throw Wn.DIV0;let e=this.avg();return this.stat.sqSum/(this.stat.numberCount-1)-e*e*this.stat.numberCount/(this.stat.numberCount-1)}varP(){if(this.stat.numberCount<1)throw Wn.DIV0;let e=this.avg();return this.stat.sqSum/this.stat.numberCount-e*e}}function Lc(n,e,t){let r={type:n,items:e};return t!==void 0&&(r.dataField=t),r}class cm{constructor(e,t,r){this.itemKey=r,this.table=e,this.axis=t,this.slice=null;let i=this.table.getAxisFields(t),a=this.table.getPivotFieldById(i[r.length-1]?.fieldId),g=a?.getItemBySharedIndex(r[r.length-1]),R=this.table.getPivotFieldById(i[r.length]?.fieldId);this.field=a,this.fieldItem=g??null,this.childField=R;let{axis:L,level:W}=this.table.getValuesVirtualFieldInfo();this.dataFieldIndex=t===L?this.itemKey[W]??null:null,this.childrenMap=new Map}getSlice(){if(this.slice)return this.slice;let e=this.axis==="row"?this.itemKey:[],t=this.axis==="col"?this.itemKey:[];return this.slice=this.table.getSliceByRowColItemKeys(e,t),this.slice}getChildrenOf(e){if(!this.childField||!this.field?.showAll&&this.getSlice().isEmpty())return this;let t=this.itemKey.slice();t[this.itemKey.length]=e;let r=this.childrenMap.get(e);return r||(r=new cm(this.table,this.axis,t),this.childrenMap.set(e,r)),r}buildAllChildren(){if(!this.childField)return;let e=this.itemKey.length;for(let t of this.childField.items){let r=t.sharedIndex,i=this.childrenMap.get(r),a=this.itemKey.slice();a[e]=r,i||(i=new cm(this.table,this.axis,a),this.childrenMap.set(r,i))}}getSortedChildren(){if(!this.childField||this.childrenMap.size<=1)return Array.from(this.childrenMap.values());let e=Array.from(this.childrenMap.values()),t=new Map,r=this.childField.sorting.type,i=r!=="manual"&&this.childField.sorting.fieldId!==null&&this.childField.sorting.fieldId!==this.childField.id,a=this.childField.sorting.fieldId!==null?this.table.getDataField(this.childField.sorting.fieldId):null,g=1;if(i&&a){for(let R of e)t.set(R,R.getSlice().getAggregateValue(a.fieldId,a.aggregation)??0);r==="desc"&&(g=-1)}else{r==="manual"||i||this.childField.sortItems(r);let R=this.childField.items;for(let L of e)t.set(L,R.indexOf(L.fieldItem))}return e.sort((R,L)=>{let W=t.get(R)??0,K=t.get(L)??0;return typeof W=="string"?+(typeof K!="string"):typeof K=="string"?-1:(W-K)*g}),e}getSubtreeByItemKey(e){if(this.itemKey.every((t,r)=>this.itemKey[r]===e[r])){if(this.itemKey.length===e.length)return this;let t=this.itemKey.length;return this.childrenMap.get(e[t])?.getSubtreeByItemKey(e)??null}return null}getField(){return this.field}getFieldItem(){return this.fieldItem}getLevel(){return this.itemKey.length}isRoot(){return this.itemKey.length===0}isLeaf(){let e=this.table.getAxisFields(this.axis);return this.itemKey.length===e.length}isEmpty(){return this.getSlice().isEmpty()}isValuesFieldInAxis(){let{axis:e}=this.table.getValuesVirtualFieldInfo();return this.axis===e}isAboveValuesField(){let{axis:e,level:t}=this.table.getValuesVirtualFieldInfo();return this.axis===e&&this.itemKey.length-1<t}isOutlineMode(){return this.axis!=="col"&&this.field!==null&&this.field.outline}shouldShowSubtotalBeforeChild(){return!(this.isAboveValuesField()||this.isLeaf())&&(!!this.fieldItem?.folded||!(this.childField?.subtotals==="none"||this.childField?.isMultipleSubtotals())&&!!this.isOutlineMode()&&!!this.childField?.subtotalTop)}shouldShowSubtotalAfterChild(){let e=this.table.getAxisFields(this.axis),t=this.itemKey.length===e.length-1&&this.isAboveValuesField();return!(this.childField?.subtotals==="none"||this.isLeaf()||this.fieldItem?.folded)&&!t&&(!!(this.childField?.isMultipleSubtotals()||this.isAboveValuesField())||!(this.isOutlineMode()&&this.childField?.subtotalTop))}getItemsBeforeChildren(){return this.isRoot()&&this.isLeaf()?this.table.getAxisFields("data").length>=1?[Lc("data",this.itemKey)]:[]:this.isOutlineMode()||!this.childField||this.isLeaf()||this.fieldItem?.folded&&!this.isAboveValuesField()?this.dataFieldIndex!==null?[Lc("data",this.itemKey,this.dataFieldIndex)]:[Lc("data",this.itemKey)]:[]}getItemsFromChildren(e,t){if(!this.fieldItem?.folded){let a=this.isEmpty()&&(t||!!this.field?.showAll);for(let g of((a||t||this.childField?.showAll)&&this.buildAllChildren(),this.getSortedChildren()))for(let R of g.getItems(a))e.push(R);return e}if(!this.isAboveValuesField())return e;let{level:r}=this.table.getValuesVirtualFieldInfo(),i=this.table.getAxisFields("data");for(let a=0;a<i.length;a++){let g=this.itemKey.slice();g[r]=a,e.push(Lc("data",g,a))}return e}getItemsAfterChildren(e){if(this.isRoot()||!this.field||!this.fieldItem){if(this.isLeaf()||this.childField?.subtotals==="none")return e;if(this.isValuesFieldInAxis()){if(this.table.getAxisFields(this.axis).length>1||this.isRoot()&&this.isEmpty()){let t=this.table.getAxisFields("data");for(let r=0;r<t.length;r++)e.push(Lc("grand",[],r))}}else e.push(Lc("grand",[]));return e}if(this.shouldShowSubtotalAfterChild())for(let t of this.childField?.subtotals==="default"?["default"]:this.childField?.subtotals)if(this.isAboveValuesField()){let r=this.table.getAxisFields("data");for(let i=0;i<r.length;i++)e.push(Lc(t,this.itemKey,i))}else e.push(Lc(t,this.itemKey));return this.axis!=="col"&&this.field.blankRow&&e.at(-1)?.type!=="blank"&&e.push(Lc("blank",this.itemKey)),e}getItems(e){if(e===void 0&&(e=!1),this.fieldItem?.hidden||!e&&!this.field?.showAll&&this.isEmpty()&&!this.isRoot())return[];let t=this.getItemsBeforeChildren();return t=this.getItemsFromChildren(t,e),t=this.getItemsAfterChildren(t)}}class coe{constructor(e){this.value=e}}class doe{get length(){return this._length}push(e){let t=new coe(e);this.head||(this.head=t),this.tail&&(this.tail.next=t),this.tail=t,this._length++}shift(){if(!this.head)return;let e=this.head.value;return this.head=this.head.next,this.head||(this.tail=void 0),this._length--,e}clear(){this.head=void 0,this.tail=void 0,this._length=0}constructor(){this._length=0}}let foe=function(n,e,t,r){var i=-1,a=n==null?0:n.length;for(r;++i<a;)t=e(t,n[i],i,n);return t};var goe=function(n){return function(e){return n?.[e]}}({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),poe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,moe=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g"),voe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,yoe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,P7="\uD800-\uDFFF",B7="\\u2700-\\u27bf",L7="a-z\\xdf-\\xf6\\xf8-\\xff",F7="A-Z\\xc0-\\xd6\\xd8-\\xde",V7="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",H7="['’]",$7="["+V7+"]",z7="["+L7+"]",W7="[^"+P7+V7+"\\d+"+B7+L7+F7+"]",U7="(?:\uD83C[\uDDE6-\uDDFF]){2}",G7="[\uD800-\uDBFF][\uDC00-\uDFFF]",dm="["+F7+"]",j7="(?:"+z7+"|"+W7+")",woe="(?:"+dm+"|"+W7+")",q7="(?:"+H7+"(?:d|ll|m|re|s|t|ve))?",Y7="(?:"+H7+"(?:D|LL|M|RE|S|T|VE))?",K7="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\uD83C[\uDFFB-\uDFFF])?",X7="[\\ufe0e\\ufe0f]?",boe="(?:\\u200d(?:"+["[^"+P7+"]",U7,G7].join("|")+")"+X7+K7+")*",Coe="(?:"+["["+B7+"]",U7,G7].join("|")+")"+(X7+K7+boe),_oe=RegExp([dm+"?"+z7+"+"+q7+"(?="+[$7,dm,"$"].join("|")+")",woe+"+"+Y7+"(?="+[$7,dm+j7,"$"].join("|")+")",dm+"?"+j7+"+"+q7,dm+"+"+Y7,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])","\\d+",Coe].join("|"),"g");let Soe=function(n,e,t){if(n=U_(n),(e=e)===void 0){var r;return r=n,yoe.test(r)?n.match(_oe)||[]:n.match(voe)||[]}return n.match(e)||[]};var Ioe=RegExp("['’]","g"),xoe=(p=function(n,e,t){return n+(t?"_":"")+e.toLowerCase()},function(n){var e;return foe(Soe(((e=U_(e=n))&&e.replace(poe,goe).replace(moe,"")).replace(Ioe,"")),p,"")});let VM={default_column_labels_caption:"Column Labels",default_row_labels_caption:"Row Labels",default_values_field_caption:"Values",default_data_field_name_template:"{1} of {0}",grand_total:"Grand Total",grand_total_with_data:"Total {0}",subtotal_template:"{0} Total",page_filter_all:"(No selected item)",page_filter_multi_item:"(Selected {0} items)",default_missing_item_label:"(Blank)",default_group_name:"Group",unnamed_group_name:"Unnamed group",datetime_group_item_label_quarter:"Qtr{0}",or:"or",date_group_seconds:"Seconds",date_group_minutes:"Minutes",date_group_hours:"Hours",date_group_days:"Days",date_group_months:"Months",date_group_quarters:"Quarters",date_group_years:"Years",sum:"Sum",avg:"Average",count:"Count Numbers",count_a:"Count",max:"Max",min:"Min",product:"Product",std_dev:"StdDev",std_dev_p:"StdDevP",var:"Var",var_p:"VarP"};class HM{constructor(e){this.locale=e,this.texts={...VM,...e?.getData().pivot_table},this.datePattern=this.getDatePattern(e)}getText(e){return this.texts[e]}getNameOfDatetimeGroupLevel(e){var t,r;return t=e,(r=this.texts)===void 0&&(r=VM),r[`date_group_${t}`]}getNameOfAggregationFunction(e){var t,r;return t=e,(r=this.texts)===void 0&&(r=VM),r[xoe(t)]}getDatetimeLevelItem(e,t){if(!this.locale)return this.getDefaultDatetimeLevelItem(e,t);let r=this.locale.getSSF(),i=this.locale.getData();switch(e){case Xr.seconds:return r.render(":ss",t/86400);case Xr.minutes:return r.render("hh :mm",t/1440).split(" ")[1];case Xr.hours:return r.render("hh AM/PM",t/24);case Xr.days:return r.render(this.datePattern,t+1461);case Xr.months:return i.months[t-1][2];case Xr.quarters:return Ml(this.texts.datetime_group_item_label_quarter,t);case Xr.years:return`${t}`}}getDefaultDatetimeLevelItem(e,t){switch(e){case Xr.seconds:return`Second ${t}`;case Xr.minutes:return`Minute ${t}`;case Xr.hours:return`Hour ${t}`;case Xr.days:{let r=new Date(new Date("1904/01/01").setDate(t));return`${r.getMonth()+1}/${r.getDate()}`}case Xr.months:return`Month ${t}`;case Xr.quarters:return`Quarter ${t}`;case Xr.years:return`${t}`}}getDatePattern(e){return(e?.getCode()==="ja_JP"||e?.getCode()==="zh_CN"?"M月D日":e?.getData().date_patterns.find(t=>!t.match(/[yY]/))??"mm/dd").replace(/([^mMdD]+)/g,'"$1"')}}function Toe(n){return["row","col","data","page"].some(e=>n[e].length>0)}function koe(n,e,t,r){let i=[n.range].concat(n.pageRanges).filter(ga);return n.sheetId===e&&i.some(a=>a.from.row<=t&&t<=a.to.row&&a.from.col<=r&&r<=a.to.col)}function J7(n){return"toJSON"in n?n.getPartRanges():Ey(n.location)}class Roe{constructor(e,t){this.value=e,this.xfId=t,this.properties={}}getValue(){return this.value}setValue(e){this.value=e}setXfId(e){this.xfId=e}getXfId(){return this.xfId}getCellStyle(){return this._sm.getCellStyle(this.xfId)}isDefaultCellStyle(){return this.xfId===0}setNote(e){this.note=e}getNote(){return this.note}setProperty(e,t){this.properties[e]=t}getProperties(){return this.properties}getFormulaItem(){return this.getProperties().formulaItem}getLink(){let e=this.getFormulaItem();return e&&e.href||""}}class Eoe{constructor(){this.fontId=0,this.fillId=0,this.alignmentId=0,this.borderId=0,this.nfId=0,this.quotePrefix=!1,this._refCount=0,this.index=0}equals(e){return e.fontId===this.fontId&&e.fillId===this.fillId&&e.alignmentId===this.alignmentId&&e.borderId===this.borderId&&e.nfId===this.nfId&&e.quotePrefix===this.quotePrefix}clone(){let e=new this.constructor;return e.fontId=this.fontId,e.fillId=this.fillId,e.alignmentId=this.alignmentId,e.borderId=this.borderId,e.nfId=this.nfId,e.quotePrefix=this.quotePrefix,e}isDefault(){return this===this._sm.getDefaultStyle()}getFont(){return this._sm.getFont(this.fontId)}getFill(){return this._sm.getFill(this.fillId)}getAlignment(){return this._sm.getAlignment(this.alignmentId)}getBorder(){return this._sm.getBorder(this.borderId)}getNumberFormat(){return this._sm.getNumberFormat(this.nfId)}getQuotePrefix(){return this.quotePrefix}setIndex(e){this.index=e}getIndex(){return this.index}toJSON(){return[this._refCount,this.fontId,this.fillId,this.alignmentId,this.borderId,this.nfId,+!!this.quotePrefix]}toStyleJSON(){return{font:this.getFont().toJSON(),fill:this.getFill().toJSON(),alignment:this.getAlignment().toJSON(),border:this.getBorder().toJSON(),nf:this.getNumberFormat().toJSON(),quoteprefix:!!this.quotePrefix}}}class fm extends p6(){static#e=this.attrs=["fonts","fills","alignments","borders","numberFormats"];constructor(){super(),this._cellStyleCls=this._createRefCellStyleClass(),this._cellCls=this._createRefCellClass(),this.fonts=[this.createFont()],this.fills=[this.createFill()],this.alignments=[this.createAlignment()],this.borders=[this.createBorder()],this.numberFormats=[this.createNumberFormat()],this.styles=[new this._cellStyleCls],this.fonts[0].setIndex(0),this.fills[0].setIndex(0),this.alignments[0].setIndex(0),this.borders[0].setIndex(0),this.numberFormats[0].setIndex(0)}getStyle(e){return this[e]}_createRefCellStyleClass(){class e extends Eoe{}return e.prototype._sm=this,e}_createRefCellClass(){class e extends Roe{}return e.prototype._sm=this,e}createRefCell(e,t){return new this._cellCls(e,t)}getCellStyle(e){return this.styles[e]}addCellStyle(e){let t=this._getXfId(e);return t===-1&&(t=this.styles.push(e)-1,e.setIndex(t),this.emit("style_added")),t}getDefaultStyle(){return this.getCellStyle(0)}getFont(e){return this.fonts[e]}getFill(e){return this.fills[e]}getAlignment(e){return this.alignments[e]}getBorder(e){return this.borders[e]}getNumberFormat(e){return this.numberFormats[e]}createFont(e){return new Wa().assign(e)}createFill(e){return new Jl().assign(e)}createAlignment(e){return new uc().assign(e)}createBorder(e){return new Ou().assign(e)}createNumberFormat(e){return new Al().assign(e)}createRichText(e){return yo.fromJSON(e)}addFont(e){let t=this._getFontId(e);return t===-1&&(t=this.fonts.push(e)-1,e.setIndex(t),this.emit("color_added")),t}addFill(e){let t=this._getFillId(e);return t===-1&&(t=this.fills.push(e)-1,e.setIndex(t),this.emit("color_added")),t}addAlignment(e){let t=this._getAlignmentId(e);return t===-1&&(t=this.alignments.push(e)-1,e.setIndex(t)),t}addBorder(e){let t=this._getBorderId(e);return t===-1&&(t=this.borders.push(e)-1,e.setIndex(t),this.emit("color_added")),t}addNumberFormat(e){let t=this._getNumberFormatId(e);return t===-1&&(t=this.numberFormats.push(e)-1,e.setIndex(t)),t}_getFontId(e){return this._findIndexOf("fonts",e)}_getFillId(e){return this._findIndexOf("fills",e)}_getAlignmentId(e){return this._findIndexOf("alignments",e)}_getBorderId(e){return this._findIndexOf("borders",e)}_getNumberFormatId(e){return this._findIndexOf("numberFormats",e)}_getXfId(e){return this._findIndexOf("styles",e)}_findIndexOf(e,t){let r=this[e];for(let i=0,a=r.length;i<a;i++)if(r[i].equals(t))return i;return-1}createStyle(e){let t=new this._cellStyleCls;return t._refCount=0,t.fontId=e[1],t.fillId=e[2],t.alignmentId=e[3],t.borderId=e[4],t.nfId=e[5],t.quotePrefix=e[6]>0,t}init(e){e.fonts.forEach((t,r)=>{let i=this.createFont(t);i.setIndex(r+1),this.fonts.push(i)}),e.fills.forEach((t,r)=>{let i=this.createFill(t);i.setIndex(r+1),this.fills.push(i)}),e.alignments.forEach((t,r)=>{let i=this.createAlignment(t);i.setIndex(r+1),this.alignments.push(i)}),e.borders.forEach((t,r)=>{let i=this.createBorder(t);i.setIndex(r+1),this.borders.push(i)}),e.numberFormats.forEach((t,r)=>{let i=this.createNumberFormat(t);i.setIndex(r+1),this.numberFormats.push(i)}),e.styles.forEach(t=>{let r=this.createStyle(t),i=this.styles.push(r)-1;r.setIndex(i)})}getParts(e){let t={styles:[],fonts:[],fills:[],alignments:[],borders:[],numberFormats:[]};function r(Q){return Array(Q.length).fill(!1)}let i=r(this.fonts),a=r(this.fills),g=r(this.alignments),R=r(this.borders),L=r(this.numberFormats);e.forEach(Q=>{let oe=this.getCellStyle(Q);t.styles.push([Q,oe.toJSON()]),i[oe.fontId]=!0,a[oe.fillId]=!0,g[oe.alignmentId]=!0,R[oe.borderId]=!0,L[oe.nfId]=!0});let W=this;function K(Q,oe){return Q[0]=!1,Q.reduce((se,he,me)=>(he&&se.push([me,oe.call(W,me)]),se),[])}return t.fonts=K(i,this.getFont),t.fills=K(a,this.getFill),t.alignments=K(g,this.getAlignment),t.borders=K(R,this.getBorder),t.numberFormats=K(L,this.getNumberFormat),t}addParts(e){let t=new Map;e.fonts.forEach(L=>{let[W,K]=L;t.set(W,this.addFont(this.createFont(K)))});let r=new Map;e.fills.forEach(L=>{let[W,K]=L;r.set(W,this.addFill(this.createFill(K)))});let i=new Map;e.alignments.forEach(L=>{let[W,K]=L;i.set(W,this.addAlignment(this.createAlignment(K)))});let a=new Map;e.borders.forEach(L=>{let[W,K]=L;a.set(W,this.addBorder(this.createBorder(K)))});let g=new Map;e.numberFormats.forEach(L=>{let[W,K]=L;g.set(W,this.addNumberFormat(this.createNumberFormat(K)))});let R=new Map;return e.styles.forEach(L=>{let[W,K]=L,Q=this.createStyle(K);Q.fontId>0&&(Q.fontId=t.get(Q.fontId)||0),Q.fillId>0&&(Q.fillId=r.get(Q.fillId)||0),Q.alignmentId>0&&(Q.alignmentId=i.get(Q.alignmentId)||0),Q.borderId>0&&(Q.borderId=a.get(Q.borderId)||0),Q.nfId>0&&(Q.nfId=g.get(Q.nfId)||0),R.set(W,this.addCellStyle(Q))}),R}transform(e){let t=this._checkExtendable(e);return t.every(r=>r)?(this._extend(e),null):this._remap(e,t)}_checkExtendable(e){let t=fm.attrs,r=[this.styles.every((i,a)=>i.equals(e.styles[a]))];for(let i of t){let a=this.getStyle(i),g=e.getStyle(i);r.push(a.every((R,L)=>R.equals(g[L])))}return r}_extend(e){for(let t of fm.attrs){let r=this.getStyle(t),i=e.getStyle(t);r.push(...i.slice(r.length))}e.styles.slice(this.styles.length).forEach(t=>{let r=this.createStyle(t.toJSON()),i=this.styles.push(r)-1;r.setIndex(i),this.emit("style_added")})}_remap(e,t){let r=fm.attrs,i=t.slice(1),a={fonts:"fontId",fills:"fillId",alignments:"alignmentId",borders:"borderId",numberFormats:"nfId"},g=e.styles;return r.forEach((R,L)=>{let W=this.getStyle(R),K=e.getStyle(R);if(i[L])return void W.push(...K.slice(W.length));let Q=a[R],oe=this._remapStyle(R,K);for(let se of g)se[Q]=oe[se[Q]]||0}),g.map(R=>this.addCellStyle(this.createStyle(R.toJSON())))}_remapStyle(e,t){switch(e){case"fonts":return t.map(r=>this.addFont(r));case"fills":return t.map(r=>this.addFill(r));case"alignments":return t.map(r=>this.addAlignment(r));case"borders":return t.map(r=>this.addBorder(r));case"numberFormats":return t.map(r=>this.addNumberFormat(r))}throw Error("unexpected style key")}collectColor(e){return this.fonts.forEach(t=>{t.color&&e.add(t.color.toLowerCase())}),this.fills.forEach(t=>{t.bg&&e.add(t.bg.toLowerCase())}),this.borders.forEach(t=>{let r=t.b;if(r)for(let i of r)i&&e.add(i.replace("#","").toLowerCase())}),e}getStateJSON(e){let t={styles:[],fonts:[],fills:[],alignments:[],borders:[],numberFormats:[]};for(let[r,i]of Object.entries(e)){let a=r==="styles"?this.styles:this.getStyle(r);for(let g=i;g<a.length;g++)t[r].push(a[g].toJSON())}return t}toJSON(){function e(t){let r=Array(t.length-1);for(let i=1;i<t.length;i++)r[i-1]=t[i].toJSON();return r}return{styles:e(this.styles),fonts:e(this.fonts).map(t=>ll(Zl,t)),fills:e(this.fills),borders:e(this.borders),alignments:e(this.alignments).map(t=>ll(od,t)),numberFormats:e(this.numberFormats)}}}let Aoe=Object.freeze({bg:"666666",color:"FFFFFF"}),Z7=Object.freeze({bg:"F2F2F2"});class Moe{constructor(){this.sm=new fm,this.headerStyleIndex=void 0,this.secondRowStyleIndex=void 0}createStyle(e){let{bg:t,color:r,fc:i}=e,a=t?this.sm.addFill(this.sm.createFill({bg:t})):0,g=r?this.sm.addFont(this.sm.createFont({color:r})):0,R=i?this.sm.addNumberFormat(this.sm.createNumberFormat({fc:i})):0,L=this.sm.getDefaultStyle().clone();return L.fillId=a,L.fontId=g,L.nfId=R,this.sm.addCellStyle(L)}ensureHeaderStyle(){return this.headerStyleIndex??=this.createStyle(Aoe)}ensureFirstRowStyle(e){return e?this.createStyle({fc:e}):0}ensureSecondRowStyle(e){return e?this.createStyle({...Z7,fc:e}):this.secondRowStyleIndex??=this.createStyle(Z7)}getXfId(e,t){return e===0?this.ensureHeaderStyle():e%2==1?this.ensureFirstRowStyle(t):this.ensureSecondRowStyle(t)}getStyles(){return this.sm.getParts(Array.from(this.sm.styles,(e,t)=>t))}}var Doe=function(n){return n.VALUE="value",n.TEXT="text",n.CUSTOM="custom",n.COLOR="color",n}({});function Q7(n){return n.type==="value"}function Z_(n){return n.type==="text"}function $M(n){return n.type==="custom"}function eh(n){if(n===null)throw Error("Range is null")}class Ooe extends pu.EventEmitter{constructor(e,t,r,i,a,g){super(),this.id=e,this.range=t||null,this.conditions=r||[],this.enabled=!!i,this.name=a||"",this.isPrivate=g}toJSON(){return{id:this.id,range:this.range?.toArray()||null,enabled:this.enabled,filters:Or(this.conditions),name:this.name,isPrivate:this.isPrivate}}afterCreateRow(e,t){if(this.range&&!(e>this.range.to.row)&&!(t<=0)){if(e<=this.range.from.row){this.range.shift("row",t),this.emit("rangeChange");return}this._insertRowRange(e-this.range.from.row,t),this.range.to.row+=t,this.emit("rangeChange")}}afterCreateCol(e,t){if(this.range&&!(e>this.range.to.col)&&!(t<=0)){if(e<=this.range.from.col){this.range.shift("col",t),this.emit("rangeChange");return}this._insertColRange(e-this.range.from.col,t),this.range.to.col+=t,this.emit("rangeChange")}}afterRemoveRow(e,t){if(!this.range||e>this.range.to.row||t<=0)return;if(e+t-1<this.range.from.row){this.range.shift("row",-t),this.emit("rangeChange");return}let r=Math.max(e,this.range.from.row),i=Math.min(e+t-1,this.range.to.row)-r+1;this.range.getHeight()<=i?this.setRange(null):(this._removeRowRange(r-this.range.from.row,i),this.range.to.row-=i+r-e,this.range.from.row-=r-e,this.emit("rangeChange"))}afterRemoveCol(e,t){if(!this.range||e>this.range.to.col||t<=0)return;if(e+t-1<this.range.from.col){this.range.shift("col",-t),this.emit("rangeChange");return}let r=Math.max(e,this.range.from.col),i=Math.min(e+t-1,this.range.to.col)-r+1;this.range.getWidth()<=i?this.setRange(null):(this._removeColRange(r-this.range.from.col,i),this.range.to.col-=i+r-e,this.range.from.col-=r-e,this.emit("rangeChange"))}collectRemovedColInfo(e,t){if(!this.range)return null;let r=oa(this.range.from.row,e,this.range.to.row,e+t-1).getOverlap(this.range);return r?(r.shift("col",-e),{filterId:this.id,filters:this.conditions.slice(r.from.col+e-this.range.from.col,e-this.range.from.col+r.getWidth()),range:r.toArray(),index:e,amount:t,dim:"col"}):null}collectRemovedRowInfo(e,t){if(!this.range)return null;let r=oa(e,this.range.from.col,e+t-1,this.range.to.col).getOverlap(this.range);if(!r)return null;r.from.row-=e,r.to.row-=e;let i={filterId:this.id,range:r.toArray(),index:e,amount:t,dim:"row"};return r.getHeight()===this.range.getHeight()&&(i.filters=this.conditions.slice(0)),i}repairCol(e,t){if(!e.range)return;let r=oa(e.range[0],e.range[1],e.range[2],e.range[3]);if(this.range){if(r.to.col+t+1===this.range.from.col)this._insertColRange(0,r.getWidth()),this.range.from.col=r.from.col+t,this.emit("rangeChange");else if(r.from.col+t===this.range.to.col+1)this._insertColRange(this.range.getWidth(),r.getWidth()),this.range.to.col=r.to.col+t,this.emit("rangeChange");else if(!(r.from.col+t>=this.range.from.col&&r.to.col+t<=this.range.to.col))return}else r.shift("col",t),this.setRange(r);e.filters&&Sr(e.filters,(i,a)=>{this.setCondition(a+r.from.col+t,i)})}repairRow(e,t){if(!e.range)return;let r=oa(e.range[0],e.range[1],e.range[2],e.range[3]);this.range?r.to.row+t+1===this.range.from.row?(this._insertRowRange(0,r.getHeight()),this.range.from.row=r.from.row+t,this.emit("rangeChange")):r.from.row+t===this.range.to.row+1&&(this._insertRowRange(this.range.getHeight(),r.getHeight()),this.range.to.row=r.to.row+t,this.emit("rangeChange")):(r.shift("row",t),this.setRange(r),e.filters&&Sr(e.filters,(i,a)=>{this.setCondition(a+r.from.col,i)}))}checkMoveEnable(e,t,r,i){if(!this.isFilterEnabled())return!0;eh(this.range);let a=this.range.from.row;return(i?e+t:e)>a||a>(i?e+t+r-1:e+t-1)}beforeMove(e,t,r){return this.isFilterEnabled()?r?(this._applyMoveData(e,r),null):this._beforeMove(e,t):null}_applyMoveData(e,t){if("range"in t&&t.range)return void this._applyRangeData(t);if(eh(this.range),"shift"in t&&t.shift&&this.range.shift(e,t.shift),"amount"in t&&t.amount&&(this.range.to[e]+=t.amount,this.emit("rangeChange"),this._insertRange(e,t.index,t.amount),t.filters))for(let r=0;r<t.amount;r++)t.filters[r]&&this.setCondition(t.index+r+this.range.from.col,t.filters[r])}_applyRangeData(e){if(this.range){let[t,r,i,a]=e.range,g=e.dim==="row"?this.range.getHeight():this.range.getWidth(),R=(e.dim==="row"?i-t+1:a-r+1)-g,L=R-e.amount;e.dim==="row"?(this.range.from.row=t,this.range.to.row=i):(this.range.from.col=r,this.range.to.col=a),R>0?(this._insertRange(e.dim,e.index,e.amount),this._insertRange(e.dim,g+e.amount,L)):this._removeRange(e.dim,L+R,-R)}else this.range=oa(...e.range),this.conditions=[],this._insertRowRange(0,this.range.getHeight()),this._insertColRange(0,this.range.getWidth());if(e.filters){let t=e.dim==="col"?e.amount:this.range.getWidth(),r=e.dim==="col"?e.index:0;for(let i=0;i<t;i++)if(e.filters[i]){let a=r+i;this.setCondition(this.range.from.col+a,e.filters[i])}}this.emit("rangeChange")}_beforeMove(e,t){eh(this.range);let r=this.range.from[e],i=this.range.to[e],a=null,g=this.range.move(e,t);return g?g.from[e]>=r&&g.to[e]<=i?(a={filterId:this.id,index:g.from[e]-r,amount:g.to[e]-g.from[e]+1,shift:r-this.range.from[e]},e==="col"&&(a.filters=this.conditions.slice(a.index,a.index+a.amount)),this._removeRange(e,g.from[e]-r,g.to[e]-g.from[e]+1)):g.from[e]<r?this._insertRange(e,t.sec[1].end-r+1,g.to[e]-g.from[e]+1):g.from[e]>i&&this._insertRange(e,t.sec[0].start-r,g.to[e]-g.from[e]+1):r<t.sec[0].start&&t.sec[1].end<i&&this._moveRange(e,t.sec[0].start-r,t.sec[0].amount,t.sec[1].amount),a}notifyMoveRange(e,t,r,i){if(i&&"range"in i)return this._applyRangeData(i),this.range?this.collectRemovedColInfo(0,this.range.getWidth()):null;if(!this.isFilterEnabled())return null;eh(this.range);let a=null,g=this.range.getTopLeftCorner(),R=this.range.getTopRightCorner(),L=this.range.getBottomLeftCorner(),W=this.range.getBottomRightCorner(),K=e.includesRange(this.range),Q=e.from.col===t.from.col&&e.to.col===t.to.col,oe=e.from.row===t.from.row&&e.to.row===t.to.row,se=Q?"row":"col";if(i)this._applyMoveData(se,i);else if(K)this.range.shift("row",t.from.row-e.from.row),this.range.shift("col",t.from.col-e.from.col),this.emit("rangeChange");else if(r)(Q&&t.from.row<=W.row&&t.from.col<=L.col&&t.to.col>=W.col||oe&&t.from.col<=W.col&&t.from.row<=R.row&&t.to.row>=W.row)&&(a=this._removeRangeWithShift(se,t.from[se],e.from[se]-1));else if(Q){if(e.includes(L)&&e.includes(W)){let he=Math.min(e.from.row,t.from.row),me=Math.max(e.from.row,t.from.row),ye=e.from.row===me,Te=ye?me-he:e.getHeight(),Me=ye?e.getHeight():me-he;a=this._beforeMove("row",Lp(he,Te,Me,ye))}}else if(oe&&(e.includes(g)&&e.includes(L)||e.includes(R)&&e.includes(W))){let he=Math.min(e.from.col,t.from.col),me=Math.max(e.from.col,t.from.col),ye=e.from.col===me,Te=ye?me-he:e.getWidth(),Me=ye?e.getWidth():me-he;a=this._beforeMove("col",Lp(he,Te,Me,ye))}return a}_removeRangeWithShift(e,t,r){eh(this.range);let i=r+1-t,a=Math.max(this.range.from[e],t),g=a-this.range.from[e],R=r+1-a,L={filterId:this.id,range:this.range.toArray(),index:g,amount:R,dim:e};return e==="row"?this._removeRowRange(g,R):(L.filters=this.conditions.slice(g,g+R),this._removeColRange(g,R)),t<this.range.from[e]?r<this.range.from[e]?(this.range.from[e]-=i,this.range.to[e]-=i):r<this.range.to[e]?(this.range.from[e]=t,this.range.to[e]-=i):this.range=null:t<=this.range.to[e]&&(r<this.range.to[e]?this.range.to[e]-=i:t===this.range.from[e]?this.range=null:this.range.to[e]=t-1),this.range===null&&e==="row"&&(L.filters=this.conditions.slice()),L}afterRemoveRange(e){eh(this.range);let t=e.includes(this.range.getTopLeftCorner()),r=e.includes(this.range.getTopRightCorner()),i=e.includes(this.range.getBottomLeftCorner()),a=e.includes(this.range.getBottomRightCorner()),g=t&&r||i&&a?"row":t&&i||r&&a?"col":null;if(g===null)return null;let R=null,L=e.from[g],W=g==="row"?e.getHeight():e.getWidth(),K=Math.max(L,this.range.from[g]),Q=Math.min(L+W-1,this.range.to[g])-K+1;return R=g==="row"?this.collectRemovedRowInfo(L,W):this.collectRemovedColInfo(L,W),Q>=(g==="row"?this.range.getHeight():this.range.getWidth())?this.setRange(null):(this._removeRange(g,K-this.range.from[g],Q),t?this.range.from[g]=e.to[g]+1:this.range.to[g]=e.from[g]-1,this.emit("rangeChange")),R}notifyRemoveRange(e,t){if(!this.isFilterEnabled())return null;eh(this.range);let r=null;return t?e.from.col<=this.range.getTopLeftCorner().col&&this.range.getBottomRightCorner().col<=e.to.col?this.repairRow(t,e.from.row):this.repairCol(t,e.from.col):r=this.afterRemoveRange(e),r}_insertRange(e,t,r){return e==="row"?this._insertRowRange(t,r):this._insertColRange(t,r)}_insertRowRange(e,t){t<=0||this.emit("insertRowRange",e,t)}_insertColRange(e,t){t<=0||(e<this.conditions.length&&Mc(this.conditions,e,t),this.emit("insertColRange",e,t))}_removeRange(e,t,r){return e==="row"?this._removeRowRange(t,r):this._removeColRange(t,r)}_removeRowRange(e,t){this.emit("removeRowRange",e,t)}_removeColRange(e,t){e+t>=this.conditions.length?this.conditions.length=e:this.conditions.splice(e,t),this.emit("removeColRange",e,t)}_moveRange(e,t,r,i){return e==="row"?this._moveRowRange(t,r,i):this._moveColRange(t,r,i)}_moveRowRange(e,t,r){this.emit("moveRowRange",e,t,r)}_moveColRange(e,t,r){Oh(this.conditions,e,t,r),this.emit("moveColRange",e,t,r)}isFilterEnabled(){return this.enabled&&this.range!==null}isFilterPrivate(){return!!this.isPrivate}getId(){return this.id}getName(){return this.name}getCondition(e){return this.isFilterEnabled()?(eh(this.range),this.conditions[e-this.range.from.col]):null}getAllConditions(){return this.isFilterEnabled()?this.conditions.slice(0):[]}setCondition(e,t,r){if(r===void 0&&(r=!1),!this.isFilterEnabled()||(eh(this.range),e<this.range.from.col||e>this.range.to.col))return!1;let i=e-this.range.from.col;return this.conditions[i]=t,r||this.emit("setCondition",i),!0}setRange(e){if(this.range===null&&e===null)return;if(this.range===null){eh(e),this._insertRowRange(0,e.getHeight()),this._insertColRange(0,e.getWidth()),this.range=e.clone(),this.emit("rangeChange");return}if(e===null){this._removeColRange(0,this.range.getWidth()),this._removeRowRange(0,this.range.getHeight()),this.range=null,this.emit("rangeChange");return}if(this.range.isEqual(e))return;let t=this.range.clone();e.from.row<t.from.row&&(this._insertRowRange(0,t.from.row-e.from.row),t.from.row=e.from.row),e.to.row>t.to.row&&(this._insertRowRange(t.getHeight(),e.to.row-t.to.row),t.to.row=e.to.row),e.from.row>t.from.row&&(this._removeRowRange(0,e.from.row-t.from.row),t.from.row=e.from.row),e.to.row<t.to.row&&(this._removeRowRange(e.getHeight(),t.to.row-e.to.row),t.to.row=e.to.row),e.from.col<t.from.col&&(this._insertColRange(0,t.from.col-e.from.col),t.from.col=e.from.col),e.to.col>t.to.col&&(this._insertColRange(t.getWidth(),e.to.col-t.to.col),t.to.col=e.to.col),e.from.col>t.from.col&&(this._removeColRange(0,e.from.col-t.from.col),t.from.col=e.from.col),e.to.col<t.to.col&&(this._removeColRange(e.getWidth(),t.to.col-e.to.col),t.to.col=e.to.col),this.range.from.row=t.from.row,this.range.from.col=t.from.col,this.range.to.row=t.to.row,this.range.to.col=t.to.col,this.emit("rangeChange")}setName(e){this.name=e}setEnabled(e){this.enabled=e}isFirstRow(e,t){return!!this.isFilterEnabled()&&(eh(this.range),t>=this.range.from.col&&t<=this.range.to.col&&e===this.range.from.row)}hasRange(){return this.range!==null}getRange(){return this.range}cloneRange(){return this.range?.clone()??null}hasCondition(e){return this.isFilterEnabled()&&!!this.getCondition(e)}getDataView(){let e={};if(!this.isFilterEnabled())return e;let t=this.range&&nr.toLabel(this.range);return t&&(e.range=t),e.conditions=this.conditions.map(r=>!!r),e}}let Noe={row:2,col:0};function e9(n,e){return(n.name??e.getName()??"")+(n.useSuffix?e.getSuffix()??"":"")}function t9(n,e,t,r){let i=[],a={row:Or(t?.getAxisFields("row"))??[],col:Or(t?.getAxisFields("col"))??[],page:Or(t?.getAxisFields("page"))??[],data:Or(t?.getAxisFields("data"))??[]},g=t?.getPivotFields()??[],R=new Map;for(let K=0;K<n.length;K++){let Q=n[K],oe={id:null,name:null,useSuffix:!0,axis:null,dataField:!1,numFmt:null,sorting:{type:"manual",fieldId:null},filter:null,subtotals:"default",axisCapacity:{row:!0,col:!0,page:!0,data:!0,off:!0},items:[],outline:!0,compact:!0,subtotalTop:!0,repeatLabel:!1,blankRow:!1,pageBreak:!1,showAll:!1};oe.numFmt=Q.getNumFmt()??null,i.push(oe);let se=g.findIndex(me=>me.getId()===Q.getId());if(se<0){let me=vw(Q.getItemsForPivotField()),ye=Q.getGroupSetting();(Q.isFromData()&&!Q.usingGroupItems()||ye&&ye.type==="manual"&&ye.base!==null)&&me.sort(BM),oe.items=me}else{let[me]=g.splice(se,1),ye=r?.has(me.getId());oe.items=vw(Q.getItemsForPivotField(),ye?void 0:me.items),oe.name=me.name,oe.useSuffix=me.useSuffix,oe.axis=me.axis,oe.dataField=me.dataField,oe.showAll=me.showAll,oe.sorting.type=me.sorting.type,oe.sorting.fieldId=me.sorting.fieldId,oe.axisCapacity={...me.axisCapacity},oe.subtotals=Array.isArray(me.subtotals)?Array.from(me.subtotals):me.subtotals}let he=e9(oe,Q).toLocaleLowerCase();R.set(he,(R.get(he)??0)+1)}for(let K=0;K<n.length;K++){let Q=e9(i[K],n[K]);(R.get(Q.toLocaleLowerCase())??0)<=1||(i[K].name=`${Q} (${Bi({row:e.row,col:e.col+K})})`)}let L=new Set(g.map(K=>K.getId())),W=K=>K.filter(Q=>!L.has(Q.fieldId));for(let K of(a.data=W(a.data),a.data.length<=1&&L.add(Ds),a.row=W(a.row),a.col=W(a.col),a.page=W(a.page),i))K.sorting.fieldId&&!a.data.some(Q=>Q.id===K.sorting.fieldId)&&(K.sorting.fieldId=null,K.sorting.type="manual");return{pivotFields:i,fields:a}}function n9(n){let e={row:0,col:0};for(let t of n)t.from.row<0&&(e.row=Math.max(e.row,-t.from.row));return e}class Hd{constructor(e,t,r=new HM){this._valuesFieldInfo=null,this._axisFieldsInfo=null,this._rowFields=null,this._colFields=null,this._unitKeySize=null,this.locale=r,this.id=t.id,this.cache=e,this.location=Or(t.location);let i=e.getFields();this.pivotFields=t.pivotFields?.map((g,R)=>new hm(this,i[R],g))??[],this.fields={row:t.fields?.row??[],col:t.fields?.col??[],page:t.fields?.page??[],data:t.fields?.data??[]},this.rowItems=t.rowItems??[],this.colItems=t.colItems??[],this.styles=t.styles??{name:null,showRowHeaders:!0,showColHeaders:!0,showRowStripes:!1,showColStripes:!1,showLastColumn:!0,formats:[]},this.captions=t.captions??{},this.compact=!0,this.outline=!0,this.incompatible=t.incompatible??!1,this.slices=null,this.rowItemTree=null,this.colItemTree=null;let a=t.fields?.row.find(g=>g.fieldId===Go.id)?"row":t.fields?.col.find(g=>g.fieldId===Go.id)?"col":null;this.valuesVirtualField=new Go(this,a,this.captions.values),this.valuesVirtualField.defaultAxis=t.styles?.valuesAxis??"col",this.result=null,this.pageArea=null}getLocale(){return this.locale}getId(){return this.id}getCache(){return this.cache}getPivotFields(){return[...this.pivotFields]}getAxisFields(e){return this.fields[e]}getAxisFieldCount(){return{row:this.fields.row.length,col:this.fields.col.length,page:this.fields.page.length,data:this.fields.data.length}}hasAxisFields(){return Toe(this.fields)}getCaptions(){return{...this.captions}}setCaption(e,t){if(e==="values"){if(t==null)return!1;this.valuesVirtualField.name=t}return this.captions??={},this.captions[e]=t??void 0,!0}isIncompatible(){return this.incompatible}getLocation(){return Or(this.location)}setLocation(e){if(e.sheetId&&(this.location.sheetId=e.sheetId),e.coord){let t=this.location.coord,r={row:e.coord.row-t.row,col:e.coord.col-t.col};for(let i of[this.location.range].concat(this.location.pageRanges))i&&Object.assign(i,JE(i,r));this.location.coord={row:t.row+r.row,col:t.col+r.col}}}shiftLocation(e){let t=this.location.coord;return this.location.coord={row:t.row+e.row,col:t.col+e.col},Or(this.location.coord)}moveTable(e,t){this.setLocation({sheetId:e,coord:t});let r=n9([this.getBoundRange()].filter(ga));return this.shiftLocation(r),!0}onSheetAlterGrid(e,t,r,i){let a=this.location,g=t==="row"?this.getBoundRange():null;return!(a.sheetId!==e||(g?.from[t]??a.coord[t])<r)&&(this.setLocation({coord:Ep(a.coord,{[t]:i})}),!0)}onSheetMoveRowCol(e,t,r){let i=this.location;if(i.sheetId!==e||i.coord[t]<r.sec[0].start||i.coord[t]>r.sec[1].end)return!1;let a=i.coord[t]<=r.sec[0].end?r.sec[1].amount:-r.sec[0].amount;return this.setLocation({coord:Ep(i.coord,{[t]:a})}),!0}updateLocationByResult(){let e=this.location.coord,t=this.hasAxisFields()?this.getTableSize():{height:10,width:5};this.location.range=t.height===0||t.width===0?null:{from:{row:e.row,col:e.col},to:{row:e.row+t.height-1,col:e.col+t.width-1}};let r=this.getPageAreaSize();return this.location.pageRanges=r.height!==0&&r.width!==0?this.calcPageRanges(r.height):[],this.getLocation()}calcPageRanges(e){if(e===void 0&&(e=this.fields.page.length),e===0)return[];let t=[],r=this.location.coord,i=this.location.pageRowCount||e,a={row:r.row-1-Math.min(i,e),col:r.col},g=e;for(;g>0;){let R=Math.min(i,g);t.push({from:Or(a),to:{row:a.row+R-1,col:a.col+1}}),g-=R,a.col+=3}return t}getParts(){let e=[];this.location.range&&e.push([this.location.range,this.result]);let t=0;for(let r of this.location.pageRanges){let i=r.to.row-r.from.row+1;e.push([r,this.pageArea?this.pageArea.slice(t,t+i):null]),t+=i}return e}getPartRanges(){return Ey(this.location)}getBoundRange(){let e=this.getPartRanges();return e.length===0?null:e.reduce((t,r)=>({from:{row:Math.min(t.from.row,r.from.row),col:Math.min(t.from.col,r.from.col)},to:{row:Math.max(t.to.row,r.to.row),col:Math.max(t.to.col,r.to.col)}}),e[0])}getPageAreaSize(){var e;return(e=this.pageArea)&&e.length!==0&&e[0]?.length!==0?{height:e.length,width:e[0].length}:{height:0,width:0}}toJSON(){let e={id:this.id,cacheId:this.cache.getId(),location:{...this.location,firstDataRow:0,firstDataCol:0,firstHeaderRow:0,pageColCount:0},pivotFields:this.pivotFields.map(t=>t.toJSON()),fields:Or(this.fields),rowItems:this.rowItems,colItems:this.colItems,styles:{...this.styles,valuesAxis:this.valuesVirtualField.defaultAxis},captions:this.captions};return this.incompatible&&(e.incompatible=!0),e}static fromJSON(e,t,r){if(e.getId()===t.cacheId)return new Hd(e,t,r)}calc(e){this.buildSlices(),e?.rowColItems!==!1&&this.generateRowColItems(),e?.fillResult!==!1&&this.fillTableResult(),this.fillPageArea(),e?.updateLocation!==!1&&this.updateLocationByResult()}updatePivotFieldsByCache(e){let t=this.cache.getFields(),{pivotFields:r,fields:i}=t9([...t],this.cache.getSource().range.from,this,e);this.pivotFields=r.map((a,g)=>new hm(this,t[g],a)),this.fields=i,this._valuesFieldInfo=null,this._axisFieldsInfo=null,this._rowFields=null,this._colFields=null,this._unitKeySize=null}getUpdatedValuesVirtualField(){return this.valuesVirtualField.items=this.fields.data.map((e,t)=>({caption:null,type:"string",value:e.name,sharedIndex:t,hidden:!1,folded:!1})),this.valuesVirtualField}getValuesVirtualFieldInfo(){let e=this.valuesVirtualField.axis;return this._valuesFieldInfo??=e?{axis:e,level:this.fields[e].findIndex(t=>t.fieldId===Go.id)}:{axis:null,level:-1},this._valuesFieldInfo}getFieldAxisInfo(e){let t=this.getPivotFieldById(e);if(!t||t.axis==="data"||t.axis===null)return{axis:null,position:-1};let r=t.axis,i=this.fields[r].findIndex(a=>a.fieldId===e);return{axis:r,position:i}}getDataFieldIndex(e){return this.fields.data.findIndex(t=>t.id===e)}enableValuesField(e){e?this.valuesVirtualField.axis===null&&this.addAxisField(this.valuesVirtualField.defaultAxis,Go.id,this.valuesVirtualField.defaultPosition):(this.removeAxisField("row",Go.id),this.removeAxisField("col",Go.id))}getPivotFieldByIndex(e){if(e===Go.index)return this.getUpdatedValuesVirtualField(),this.valuesVirtualField;if(e<0||e>=this.pivotFields.length)throw Error(`Invalid pivot field index: ${e}`);return this.pivotFields[e]}getPivotFieldById(e){return e===Go.id?(this.getUpdatedValuesVirtualField(),this.valuesVirtualField):this.pivotFields.find(t=>t.getId()===e)??null}getAxisPivotFields(e,t){if(t===void 0&&(t=!1),!t){if(e==="row"&&this._rowFields)return this._rowFields;if(e==="col"&&this._colFields)return this._colFields}let r=this.fields[e].map(i=>this.getPivotFieldById(i.fieldId));if(t||(r=r.filter(i=>i?.getId()!==Go.id)),r.some(i=>i===null))throw Error(`Invalid fields in axis '${e}'`);return t||(e==="row"&&(this._rowFields=r),e==="col"&&(this._colFields=r)),r}getAxisPivotField(e,t){return this.isPivotFieldInAxis(e,t)?this.getPivotFieldById(t):null}getDataPivotField(e){let t=this.getDataField(e);return t?this.getPivotFieldById(t?.fieldId):null}getDataField(e){return this.fields.data.find(t=>t.id===e)??null}isPivotFieldInAxis(e,t){return this.fields[e].find(r=>r.fieldId===t)!==void 0}addAxisField(e,t,r){let i,a=this.getPivotFieldById(t);if(!a)throw Error("Invalid pivot field id");if(!a.axisCapacity[e])throw Error(`This field cannot be placed in the axis '${e}'`);a.axis!==null&&a.axis!=="data"&&(a.axis==="page"&&e==="page"&&(i=this.fields.page.find(g=>g.fieldId===t)),this.removeAxisField(a.axis,t)),e==="row"||e==="col"?this.fields[e].splice(r??this.fields[e].length,0,{fieldId:t}):e==="page"&&(this.fields.page.splice(r??this.fields.page.length,0,{fieldId:t,selected:i?.selected??null,allowMultiple:i?.allowMultiple??!0}),a.filter=null),a.axis=e,a===this.valuesVirtualField&&(e==="row"||e==="col")&&(this.valuesVirtualField.defaultAxis=e),this._valuesFieldInfo=null,this._axisFieldsInfo=null,this._rowFields=null,this._colFields=null,this._unitKeySize=null}getAllFieldNames(){return this.pivotFields.map(e=>e.getName()).concat(this.fields.data.map(e=>e.name))}generateDataFieldId(){return"data-"+pe()}generateDataFieldName(e,t){let r=Ml(this.locale.getText("default_data_field_name_template"),e.getName(),this.locale.getNameOfAggregationFunction(t));return LM(this.getAllFieldNames(),i=>i===0?r:`${r}${i+1}`)??r}addDataField(e,t,r){let i=this.getPivotFieldById(e);if(!i||!i.axisCapacity.data||r?.id&&this.getDataField(r.id))return null;let a=r?.aggregation??(i.getType()===wu.number?E7.sum:E7.countA),g={id:r?.id??this.generateDataFieldId(),name:r?.name??this.generateDataFieldName(i,a),fieldId:e,numFmt:r?.numFmt??i.getNumFmt(),aggregation:a,displayType:r?.displayType??"normal",baseField:r?.baseField??null,baseItem:r?.baseItem??null};return this.fields.data.splice(t??this.fields.data.length,0,g),i.dataField=!0,i.axis===null&&(i.axis="data"),this.fields.data.length===2&&this.enableValuesField(!0),g}removeAxisField(e,t){let r=this.fields[e],i=r.findIndex(g=>g.fieldId===t);if(i<0)return;let a=this.getPivotFieldById(t);if(a&&!a.axisCapacity.off)throw Error("This field cannot be removed");r.splice(i,1),this._valuesFieldInfo=null,this._axisFieldsInfo=null,this._rowFields=null,this._colFields=null,this._unitKeySize=null,a&&(a.axis=a.dataField?"data":null)}removeDataField(e){let t=this.fields.data.findIndex(a=>a.id===e);if(t<0)return!1;let r=this.fields.data[t];this.fields.data.splice(t,1),this.fields.data.length<=1&&this.enableValuesField(!1);let i=this.getPivotFieldById(r.fieldId);return!i||(i.dataField=this.isPivotFieldInAxis("data",r.fieldId),i.axis!=="data"||i.dataField||(i.axis=null),!0)}moveAxisField(e,t,r,i){if(!this.getPivotFieldById(e))return!1;if(e===Go.id){if(t==="page"||t===null||this.getAxisFields("data").length<=1)return!1;r=-1}let a=this.getFieldAxisInfo(e);if(t===null){if(a.axis===null)return!1;this.removeAxisField(a.axis,e)}else{let R=this.getAxisFields(t);if(r=r===-1?R.length:Math.min(R.length,r),R[r-1]?.fieldId===Go.id&&(r-=a.axis===t&&a.position<r?2:1),t===a.axis&&(r===a.position||e===Go.id))return!1;this.addAxisField(t,e,r)}let g=n9(this.calcPageRanges());return(i??={row:0,col:0}).row=g.row!==0&&g.row>i.row?g.row:i.row,i.col=g.col!==0&&g.col>i.col?g.col:i.col,this.shiftLocation(i),!0}moveDataField(e,t){let r=this.fields.data.findIndex(a=>a.id===e);if(r<0)return!1;let i=this.fields.data[r];return this.fields.data.splice(r,1),this.fields.data.splice(t,0,i),!0}resetAllAxis(){this.getAxisFields("data").slice().forEach(e=>{let{id:t}=e;return this.removeDataField(t)}),this.getAxisFields("page").slice().forEach(e=>{let{fieldId:t}=e;return this.removeAxisField("page",t)}),this.getAxisFields("row").slice().forEach(e=>{let{fieldId:t}=e;return this.removeAxisField("row",t)}),this.getAxisFields("col").slice().forEach(e=>{let{fieldId:t}=e;return this.removeAxisField("col",t)})}applyAllAxis(e){for(let t of Object.keys(e)){let r=e[t];if(r)for(let i=0;i<r.length;i++)if(t==="data"){let a=this.getDataField(r[i].id);a?this.moveDataField(a.id,i):this.addDataField(r[i].fieldId,void 0,r[i])}else this.addAxisField(t,r[i].fieldId,i)}}resetFields(){for(let e of this.pivotFields)for(let t of e.items)t.hidden=!1,t.folded=!1}setFieldAttr(e,t){let r=this.getPivotFieldById(e);if(!r)return[];let i=[];for(let[a,g]of t)a==="filter"?(i.push(["filter",r.filter,g]),r.filter=g):a==="sorting"?(i.push(["sorting",r.sorting,g]),r.sorting=g):a==="subtotals"?(i.push(["subtotals",r.subtotals,g]),r.subtotals=g):a==="name"?(i.push(["name",r.name,g]),r.name=g):a==="useSuffix"?(i.push(["useSuffix",r.useSuffix,g]),r.useSuffix=g):a==="subtotalCaption"&&(i.push(["subtotalCaption",r.subtotalCaption,g]),r.subtotalCaption=g);return i}setDataFieldAttr(e,t){let r=this.getDataField(e);if(!r)return[];let i=[];for(let[a,g]of t)if(a==="aggregation"){i.push(["aggregation",r.aggregation,g]),r.aggregation=g;let R=this.getPivotFieldById(r.fieldId);(r.autoName??!0)&&R&&(r.name=this.generateDataFieldName(R,r.aggregation))}else a==="displayType"?(i.push(["displayType",r.displayType,g]),r.displayType=g):a==="name"?(i.push(["name",r.name,g]),r.name=g):a==="autoName"&&(i.push(["autoName",r.autoName,g]),r.autoName=g);return i}setFieldItemAttr(e,t,r){let i=this.getPivotFieldById(e);if(!i)return[];let a=[];if(t==="order"){let g=new Map,R=new Set;for(let[K,Q]of r){let oe=i.items.findIndex(se=>Ba(se,K));oe!==-1&&(a.push([K,oe,Q]),g.set(oe,Q),R.add(Q))}let L=[],W=0;for(let K=0;K<i.items.length;K++){let Q=g.get(K);if(Q!==void 0)L[Q]=i.items[K];else{for(;R.has(W);)W++;L[W]=i.items[K],W++}}i.items=L}else if(t==="folded"||t==="hidden"||t==="caption")for(let[g,R]of r){let L=i.items.find(W=>Ba(W,g));L&&(a.push([g,L[t],R]),L[t]=R)}return a}getBasePivotFields(){return this.pivotFields.filter(e=>e.isFromData())}getSlicePivotFields(){let e=new Set(this.fields.page.concat(this.fields.row,this.fields.col).map(t=>t.fieldId));return this.pivotFields.filter(t=>e.has(t.getId()))}getSliceBasePivotFields(){let e=this.getSlicePivotFields();return this.getBasePivotFields().filter(t=>e.includes(t)||e.some(r=>r.getGroupSetting()?.base===t.getId()))}getAxisFieldsInfo(e){return(this._axisFieldsInfo??={})[e]??=this.getAxisPivotFields(e,!0).map(t=>{let r=t.usingGroupItems(),i=t.getGroupBaseField()??t,a=t.getBaseToGroupIndexMap(),g=i.getIndex();return{field:t,usingGroupItems:r,baseField:i,baseToGroupIndex:a,baseIndex:g}})}getItemsFilteredByPageFieldSelect(e){let t=e.getId(),r=this.fields.page.find(i=>i.fieldId===t);return r&&r.allowMultiple!==!0?r.selected!==null?[e.items[r.selected]]:e.items:null}getItemsFilteredByConditionFilter(e){let t=e.filter;return t?e.items.filter(r=>{if(!t)return!r.hidden;if(Z_(t))return function(i,a){let g=!1;if(a.strictType&&typeof a.formula1!="string")return!1;let R=`${a.formula1}`;switch(a.operator){case"containsBlanks":g=Cr(i);break;case"notContainsBlanks":g=!Cr(i);break;case"containsText":g=!Cr(i)&&i.indexOf(R)>=0;break;case"notContainsText":g=Cr(i)||0>i.indexOf(R);break;case"beginsWith":g=i.startsWith(R);break;case"endsWith":g=i.endsWith(R);break;case"exactText":g=i===R}return g}(J_(Pa(r),"").toLocaleLowerCase(),{operator:t.operator[0],formula1:t.value[0].toLocaleLowerCase()});if($M(t)){let i=r.value,a=t.and||!1;for(let g=0;g<t.value.length;g++){let R=typeof i==typeof t.value[g]&&w$(i,{operator:t.operator[g]||"equal",formula1:t.value[g]});a=t.and?a&&R:a||R}return a}return!0}):null}getFilterInfos(){let e=new Map;for(let t of["row","col","page"])for(let{field:r,baseField:i,baseIndex:a,baseToGroupIndex:g,usingGroupItems:R}of this.getAxisFieldsInfo(t)){if(!r||r===this.valuesVirtualField)continue;let L=this.getItemsFilteredByPageFieldSelect(r)||this.getItemsFilteredByConditionFilter(r)||r.items.filter(he=>!he.hidden);if(r.items.length===L.length)continue;let W=new Set(L.map(he=>he.sharedIndex)),K=[],Q=i.getRawItemCount();for(let he=0;he<Q;he++){let me=R?g?.[he]:he;me!==void 0&&W.has(me)&&K.push(he)}let oe=e.get(a),se=O7(K);oe!==void 0?e.set(a,oe&se):e.set(a,se)}return Array.from(e.entries())}getRowColItemKeyByRecord(e,t){let r=[];for(let i of this.getAxisFieldsInfo(e)){let{usingGroupItems:a,baseToGroupIndex:g,baseIndex:R}=i;if(R===Go.index)continue;let L=t[R];if(L.type!=="shared")throw Error("Some record items are not shared");let W=L.value;a&&(W=g?.[L.value]??L.value),r.push(W)}return r}buildSlices(){this.slices=new FM(this);let e=this.cache.getRecords(),t=this.getFilterInfos(),r=a=>{for(let[g,R]of t){let L=a[g];if(L.type!=="shared")throw Error("Some record items are not shared");if(!(R&1n<<BigInt(L.value)))return!1}return!0},i=new doe;for(let a=0;a<e.length;a++){let g=e[a];if(!r(g))continue;let R=this.getRowColItemKeyByRecord("row",g),L=this.getRowColItemKeyByRecord("col",g),W=this.getSliceByRowColItemKeys(R,L);W.isJustCreated()&&i.push([R,L,W]),W.addRecord(g)}for(;i.length;){let a=i.shift();if(!a)break;let[g,R,L]=a;if(g.length>0){let W=g.slice(0,-1),K=this.getSliceByRowColItemKeys(W,R);K.isJustCreated()&&i.push([W,R,K]),K!==L&&K.addChildren("row",[L])}if(R.length>0){let W=R.slice(0,-1),K=this.getSliceByRowColItemKeys(g,W);K.isJustCreated()&&i.push([g,W,K]),K!==L&&K.addChildren("col",[L])}}}isUnitItemKeySize(e,t){let r=this.getUnitItemKeySize();return r.row===e&&r.col===t}getUnitItemKeySize(){return this._unitKeySize??={row:this.getAxisFields("row").reduce((e,t)=>t.fieldId!==Go.id?e+1:e,0),col:this.getAxisFields("col").reduce((e,t)=>t.fieldId!==Go.id?e+1:e,0)}}getSliceByRowColItemKeys(e,t){var r,i;let a,g,{axis:R,level:L}=this.getValuesVirtualFieldInfo();R==="row"?e=m6(e,L,1):R==="col"&&(t=m6(t,L,1));let W=(r=e,i=t,a=r.join(),g=i.join(),a.endsWith(",")&&(a=a.replace(/,+$/g,"")),g.endsWith(",")&&(g=g.replace(/,+$/g,"")),`${a};${g}`);return this.slices??=new FM(this),this.slices.get(W,!0)}generateRowColItems(){let e={row:this.getAxisFieldsInfo("row"),col:this.getAxisFieldsInfo("col")};this.rowItemTree=new cm(this,"row",[]),this.colItemTree=new cm(this,"col",[]);let t={row:this.rowItemTree,col:this.colItemTree},r=(a,g,R)=>{let L=a.getLevel();if(L>=R.length)return;let{usingGroupItems:W,baseToGroupIndex:K,baseIndex:Q}=R[L];if(Q===-2){for(let me=0;me<this.fields.data.length;me++){let ye=a.getChildrenOf(me);ye!==a&&r(ye,g,R)}return}let oe=g[Q];if(oe.type!=="shared")throw Error("Some record items are not shared");let se=oe.value;W&&(se=K?.[oe.value]??oe.value);let he=a.getChildrenOf(se);he!==a&&r(he,g,R)},i=this.cache.getRecords();for(let a=0;a<i.length;a++){let g=i[a];r(t.row,g,e.row),r(t.col,g,e.col)}this.rowItems=this.rowItemTree.getItems(),this.colItems=this.colItemTree.getItems()}getRowHeaderWidth(){return this.getAxisPivotFields("row",!0).reduce((e,t)=>t.compact?e||1:e+1,0)||+(this.fields.data.length===1&&this.fields.col.length>0)}getRowHeaderHeight(){return this.fields.row.length>0?this.rowItems.length:+(this.fields.data.length>=1)}getColHeaderWidth(){let e=this.fields.col.some(t=>!!this.getPivotFieldById(t.fieldId)?.compact);return Math.max(this.colItems.length,e&&this.fields.col.length>0?1:this.fields.col.length)||+(this.fields.data.length>=1||this.fields.col.length>=1)}getColHeaderHeight(){return this.styles.showValuesRow||this.fields.col.length!==1||this.fields.col[0].fieldId!==Ds?this.fields.col.length+1:1}getTableHeight(){return this.getRowHeaderHeight()+this.getColHeaderHeight()}getTableWidth(){return this.getRowHeaderWidth()+this.getColHeaderWidth()}getTableSize(){return{height:this.getTableHeight(),width:this.getTableWidth()}}getRowColItemLabels(e,t){let r=this.getAxisPivotFields(e,!0);return t.items.map((i,a)=>{let g=r[a].getItemLabelBySharedIndex(i);return`${g===null?this.locale.getText("default_missing_item_label"):g===void 0?"":g}`})}getItemDisplay(e,t){let r=Pa((t=t??null)??{type:"missing",value:null}),i=t&&(t.caption||J_(r,this.locale.getText("default_missing_item_label"))),a=e.getItemNumFmt(r),g=t&&(t.type==="datetime"||t.type==="number"||t.type==="boolean")&&!t.caption?t.value:i;return{label:i,value:g,numFmt:a}}hasResult(){return this.result!==null}getResults(){return Or(this.result)}fillTableResult(){let e=this.getAxisPivotFields("col",!0),t=this.getAxisPivotFields("row",!0),{axis:r,level:i}=this.getValuesVirtualFieldInfo(),a=this.getRowHeaderWidth(),g=this.getRowHeaderHeight(),R=this.getColHeaderWidth(),L=this.getColHeaderHeight(),W=g+L,K=a+R,Q=0;for(;Q<g&&this.rowItems.at(-1-Q)?.type==="grand";)++Q;let oe=new hre(a,g,R,L,Q),se=[];for(let Me=0;Me<W;Me++){se[Me]=[];for(let Oe=0;Oe<K;Oe++)se[Me][Oe]={value:null,numFmt:null,meta:Nc({style:oe.createStyle(Me,Oe)})}}if(this.fields.data.length===1){let Me=this.fields.data[0],Oe=this.fields.row.length>0,ze=this.fields.col.length>0,We=0,qe=0;Oe&&!ze?qe=K-1:!Oe&&ze&&(We=W-1),se[We][qe]={value:Me.name,numFmt:null,meta:Nc({field:Me.id,rowSelect:qe===0,colSelect:!0,style:oe.createStyle(We,qe),edit:Uo.DataFieldName})}}let he=this.fields.col.length===1&&this.fields.col[0].fieldId===Ds&&!this.styles.showValuesRow,me=this.locale.getText("subtotal_template"),ye=Me=>{let Oe=Me==="row",ze=Oe?t:e;if(ze.length===0||Me==="col"&&he)return;let We=this.outline&&this.compact||Oe&&t.some(Tt=>Tt.compact),qe=r===Me&&ze.length===1,Ke=[];Ke=We?[{caption:qe?this.valuesVirtualField.getName():Oe?this.captions.rowHeader??this.locale.getText("default_row_labels_caption"):this.captions.colHeader??this.locale.getText("default_column_labels_caption"),filtered:ze.some(Tt=>Tt.isFiltered()),fieldId:qe?Ds:null}]:(Oe?t.filter((Tt,jt)=>!Tt.compact||jt===t.length-1):e).map(Tt=>({caption:Tt.getName(),filtered:Tt.isFiltered(),fieldId:Tt.getId()}));let at=Oe?0:a,gt=Oe?a:K,pt=Oe?L-1:0;for(let Tt=at;Tt<gt;Tt++){let jt=Tt-a,on=Ke.at(jt)??null,hn=on!==null&&on.fieldId!==Go.id,un=on===null?null:on?.fieldId==null?Oe?Uo.RowHeaderCaption:Uo.ColumnHeaderCaption:on.fieldId===Ds?Uo.ValuesCaption:Uo.FieldName;se[pt][Tt]={value:on?.caption,numFmt:null,meta:Nc({field:on?.fieldId??null,filterBtn:hn?on.filtered?Lh.Filtered:Lh.Normal:Lh.None,colSelect:We?on===null:on!==null,style:oe.createStyle(pt,Tt),axis:Me,edit:un})}}};ye("col"),ye("row");let Te=Me=>{let Oe=this.fields[Me];if(Oe.length===0)return;let ze=this.getAxisPivotFields(Me,!0),We=Me==="row",qe=(Ut,kt)=>We?se[Ut][kt]:se[kt][Ut],Ke=(Ut,kt,Pt)=>{Object.assign(qe(Ut,kt),Pt)},at=(Ut,kt,Pt)=>(Pt===void 0&&(Pt=0),We?oe.createStyle(Ut,kt):oe.createStyle(kt,Ut,Pt)),gt=Me==="row"?this.rowItems:this.colItems,pt=We?t.reduce((Ut,kt,Pt)=>Ut.concat([(Ut[Pt-1]??-1)+ +!t[Pt-1]?.compact]),[]):he?[0]:e.map((Ut,kt)=>kt+1),Tt=Oe.map((Ut,kt)=>Ut.fieldId!==Go.id&&kt!==Oe.length-1&&(kt!==Oe.length-2||Oe[kt+1].fieldId!==Go.id)),jt=Me===r,on=We?L:a,hn=We?W:K,un=We||he?0:1,an=We?a:L;for(let Ut=on;Ut<hn;Ut++){let kt=Ut-on,Pt=gt[kt]??void 0,mn=gt[kt-1]??void 0,Zt=Pt&&Pt.dataField!==void 0?this.fields.data[Pt.dataField].name:"";if(!Pt||Pt.type==="grand"){let dn=Pt?jt?Ml(this.locale.getText("grand_total_with_data"),Zt):this.captions.grandTotal??this.locale.getText("grand_total"):null;for(let fn=un;fn<an;fn++)Ke(Ut,fn,{value:fn===un?dn:null,numFmt:null,meta:Nc({rowSelect:!!We&&fn===un,colSelect:!!We||fn===un,style:at(Ut,fn),edit:Pt&&fn===un&&!jt?Uo.GrandTotalCaption:null})});continue}for(let dn=un;dn<an;dn++){let fn=pt.indexOf(dn),er=pt.lastIndexOf(dn),yr=Math.min(Pt.items.length-1,er),Ei=ze[yr];if(!Ei)continue;if(fn>yr&&dn>un){let Hi=qe(Ut,dn-1);Ke(Ut,dn,{value:null,numFmt:null,meta:Nc({field:Hi.meta.field,style:at(Ut,dn,yr+1),axis:Me})});continue}let Zs=Pt.items[yr],_u=Ei.getItemBySharedIndex(Zs),Wd=this.getItemDisplay(Ei,_u),dr=Wd.label,to=Wd.numFmt,Rn=Pt.type!=="data"&&Pt.type!=="blank"&&yr===Pt.items.length-1,Oi=Tt[yr],Ir=!Rn&&mn&&Pt.items[yr]===mn.items[yr];We&&Rn&&oe.addRowSubtotal(Ut,dn,yr+1);let gi=Ei.getSubtotalCaption()??me,wr=Rn?jt?`${dr} ${Zt}`:Ml(gi,dr+""):Wd.value;Ke(Ut,dn,{value:!Ir||Ei.repeatLabel?wr:null,numFmt:to,meta:Nc({indent:yr>fn?yr-fn:0,field:Ei.getId(),foldBtn:!Ir&&Oi&&Pt.type==="data"?_u?.folded?Od.Unfold:Od.Fold:Od.None,rowSelect:We,colSelect:!!We||wr!==null,style:at(Ut,dn,yr+1),item:_u?Pa(_u):void 0,axis:Me,edit:Ei===this.valuesVirtualField?Uo.DataFieldName:Rn?jt?null:Uo.SubtotalCaption:!Ir||Ei.repeatLabel?Uo.ItemName:null})})}}};if(Te("col"),Te("row"),this.fields.data.length===0){this.result=se;return}this.slices||(this.slices=new FM(this));for(let Me=0;Me<this.rowItems.length;Me++){let Oe=L+Me,ze=this.rowItems[Me],We=null,qe=ze.items.length===this.fields.row.length;for(let Ke=0;Ke<this.colItems.length;Ke++){let at=a+Ke,gt=this.colItems[Ke];if(this.fields.data.length>1&&(ze.dataField??gt.dataField)==null)continue;let pt=this.fields.data[ze.dataField??gt.dataField??0],Tt=null,jt=null;if(pt.displayType in A7)if(ze.type!=="data"||qe||(We===null?We=new cm(this,"row",ze.items).shouldShowSubtotalBeforeChild():We)){let hn=this.getSliceByRowColItemKeys(ze.items,gt.items),un=hn.getAggregateValue(pt.fieldId,pt.aggregation),an="#DIV/0!";if(typeof un!="number")Tt=un;else if(pt.displayType==="normal")hn.isEmpty()||(Tt=un);else if(pt.displayType==="index"){let Ut=this.getSliceByRowColItemKeys([],[]),kt=this.getSliceByRowColItemKeys(ze.items,[]),Pt=this.getSliceByRowColItemKeys([],gt.items),mn=Ut.getAggregateValue(pt.fieldId,pt.aggregation),Zt=kt.getAggregateValue(pt.fieldId,pt.aggregation),dn=Pt.getAggregateValue(pt.fieldId,pt.aggregation);Tt=Zt===0||Zt===null||dn===0||dn===null?an:typeof mn=="string"?mn:typeof Zt=="string"?Zt:typeof dn=="string"?dn:un*(mn??0)/(Zt*dn)}else{let Ut,kt=(Pt,mn)=>{let Zt=mn.length-1;for(;Zt>=0&&(mn[Zt]==null||r===Pt&&i===Zt);)Zt--;return Zt--,r===Pt&&i===Zt&&Zt--,mn.slice(0,Zt+1)};if(pt.displayType==="percentOfTotal")Ut=this.getSliceByRowColItemKeys([],[]);else if(pt.displayType==="percentOfRow")Ut=this.getSliceByRowColItemKeys(ze.items,[]);else if(pt.displayType==="percentOfCol")Ut=this.getSliceByRowColItemKeys([],gt.items);else if(pt.displayType==="percentOfParentRow")Ut=this.getSliceByRowColItemKeys(kt("row",ze.items),gt.items);else if(pt.displayType==="percentOfParentCol")Ut=this.getSliceByRowColItemKeys(ze.items,kt("col",gt.items));else throw Error("Unexpected display type");if(!Ut.isEmpty()){let Pt=Ut.getAggregateValue(pt.fieldId,pt.aggregation);Pt===0||Pt===null?Tt=an:typeof Pt=="string"?Tt=Pt:(Tt=un/Pt,jt="0.00%")}}}else Tt=null;else Tt=null;let on=se[Oe][at];on.value=Tt,on.numFmt=jt,on.meta.field=pt.fieldId,on.meta.style=oe.createStyle(Oe,at),on.meta.axis="data"}}this.result=se}hasPageArea(){return this.pageArea!==null}getPageArea(){return Or(this.pageArea)}fillPageArea(){let e=this.getAxisPivotFields("page",!0);if(e.length===0){this.pageArea=null;return}let t=e.map(r=>{let i={value:r.getName(),numFmt:null,meta:Nc({field:r.getId(),style:Wp[ji.PageFieldLabels],axis:"page",edit:Uo.FieldName})},a=r.getItemValues(),g=r.getNonHiddenItems(),R=a.length===g.length?this.locale.getText("page_filter_all"):g.length>1?Ml(this.locale.getText("page_filter_multi_item"),g.length):g.length===0?"":r.getItemLabel(g[0]),L=a.length!==g.length&&g.length===1?g[0]:null;return[i,{value:R,numFmt:L?r.getItemNumFmt(L):r.getNumFmt(),meta:Nc({field:r.getId(),filterBtn:r.isFiltered()?Lh.Filtered:Lh.Normal,style:Wp[ji.PageFieldValues],item:g.length===1?g[0]:void 0,axis:"page",edit:Uo.FilterItem})}]});this.pageArea=t}getDetailContent(e,t){if(!this.location.range)return null;this.hasResult()||this.calc({rowColItems:!1,updateLocation:!1});let r=this.getRowHeaderWidth(),i=this.getColHeaderHeight(),a=e-this.location.range.from.row-i,g=t-this.location.range.from.col-r;if(a<0||g<0)return null;let R=this.rowItems[a].items,L=this.colItems[g].items,W=[];for(let se of["row","col"]){let he=this.fields[se],me=se==="row"?R:L,ye=Math.max(0,me.length-2),Te=Math.min(ye+Math.min(me.length,2),he.length);for(let Me=ye;Me<Te;Me++){let Oe=this.getPivotFieldById(he[Me].fieldId);if(!Oe)continue;let ze=Oe.getItemBySharedIndex(me[Me]);ze&&W.push({fc:Oe.getItemNumFmt(Pa(ze)),value:ze.value})}}let K=this.getSliceByRowColItemKeys(R,L).getAllRecords(),Q=this.cache.getFields().filter(se=>se.isFromData()),oe=K.map(se=>Q.map((he,me)=>{let ye=se[me],Te=he.getNumFmt();return{value:ye.type!=="shared"?ye.value:he.getSharedItem(ye.value)?.value??null,fc:Te}}));return oe.unshift(Q.map(se=>({value:se.getName()}))),{titleItems:W,content:function(se){let he=new Moe,me={};for(let ye=0;ye<se.length;ye++){me[ye]={};for(let Te=0;Te<se[ye].length;Te++){let Me=se[ye][Te];me[ye][Te]={v:Me.value,s:he.getXfId(ye,Me.fc)}}}return{ws:JSON.stringify({cells:me,filter:se.length===0?null:{id:pe(),range:[0,0,se.length-1,se[0].length-1],enabled:!0,filters:[]},rowCount:se.length||100,colCount:se[0]?.length||30,rows:{},cols:{},global:{},fixedRowTop:0,fixedColumnLeft:0,mergeCells:[],cfs:[],validation:{},drawing:[],hyperlinks:[],notes:[]}),style:JSON.stringify(he.getStyles())}}(oe)}}}var Poe=Math.ceil,Boe=Math.max;let Loe=function(n,e,t,r){for(var i=-1,a=Boe(Poe((e-n)/(t||1)),0),g=Array(a);a--;)g[++i]=n,n+=t;return g},zM=function(n,e,t){if(!fa(t))return!1;var r=typeof e;return(r=="number"?!!(fw(t)&&$_(e,t.length)):r=="string"&&e in t)&&B_(t[e],n)};var Foe=1/0;let WM=function(n){return n?(n=Dp(n))===Foe||n===-1/0?(n<0?-1:1)*17976931348623157e292:n==n?n:0:n===0?n:0},Fc=function(n,e,t){return t&&typeof t!="number"&&zM(n,e,t)&&(e=t=void 0),n=WM(n),e===void 0?(e=n,n=0):e=WM(e),t=t===void 0?n<e?1:-1:WM(t),Loe(n,e,t)};function r9(){return{autoStart:!0,autoEnd:!0,start:0,end:0,interval:null,seconds:!1,minutes:!1,hours:!1,days:!1,months:!1,quarters:!1,years:!1}}function i9(n){let e={[Xr.years]:!1,[Xr.quarters]:!1,[Xr.months]:!1,[Xr.days]:!1,[Xr.hours]:!1,[Xr.minutes]:!1,[Xr.seconds]:!1};for(let t of n)e[t]=!0;return e}function Voe(n){let e=new Set;for(let t of n){let r=t.interval;typeof r=="string"&&e.add(r)}return i9(Array.from(e))}function UM(n,e,t,r,i,a,g){let R=e?.getCache();if(!R)return null;let L=null;try{L=R.getBaseField(t)}catch{}if(!L&&r)try{L=R.getBaseField(r)}catch{}if(!L||L.getType()!==wu.text)return null;let W=R.getField(t),K=Or(W?.getGroupSetting()?.grouping),Q=[L];if(n==="ungroup"){if(!W||!K)return null;g=e.getFieldAxisInfo(t),Q=R.getChildrenFields(t)}let oe=e.getPivotFieldById(L.getId())?.getName()??"",se=r?e.getPivotFieldById(r):e.getPivotFieldById(R.getChildField(t)?.getId()??"")??e.getPivotFieldById(L.getId());if(!R.setManualGroup(t,r??void 0,i,oe))return null;let he=e.getPivotFieldById(t),me=Or(he?.items)??null,ye=a?.map(We=>Io(We))??function(We,qe,Ke,at){let gt=(We??qe)?.getItemValues();if(!gt)return[];let pt=qe?.getGroupSetting()?.grouping,Tt=qe?qe.getItemValues().map(Io):[],jt=(un,an)=>Tt.indexOf(un)-Tt.indexOf(an),on={};for(let[un,an]of at){let Ut=Io(un),kt=Ke?.[Ut]??pt?.[Ut]??null,Pt=an??pt?.[Ut]??null,mn=kt?Io(kt):Ut,Zt=Pt?Io(Pt):Ut;(on[mn]??=[]).push(Zt)}let hn=new Set;for(let un=0;un<gt.length;un++){let an=Io(gt[un]);if(an in on)for(let Ut of on[an].sort(jt))hn.add(Ut);else hn.add(an)}return Array.from(hn.values())}(he,se,K??null,i);e.updatePivotFieldsByCache();let Te=e.getPivotFieldById(t);ye.length>0&&Te?.reorderItems(ye),a&&Te&&Te.updateItemAttrs(a);let Me=Or(Te?.items)??null,Oe=R.getField(t)?.getGroupSetting()?.grouping;if(n==="group"){if(!Oe)throw Error("Field group should exist after grouping");if(Q=R.getChildrenFields(t),!W){if(g&&g.axis!==null)e.addAxisField(g.axis,t,g.position);else for(let We of Q.map(qe=>qe.getId()).reverse())if((g=e.getFieldAxisInfo(We))&&g.axis!==null){e.addAxisField(g.axis,t,g.position);break}}}let ze=i.map(We=>{let[qe]=We,Ke=Io(qe);return[qe,K?.[Ke]??null,Oe?.[Ke]??null]});return{childFieldIds:Q.reverse().map(We=>We.getId()),changes:ze,insertPosition:g,itemsInfo:[me,Me]}}function o9(n){return Object.fromEntries(n.map(e=>[Io(e),e]))}function a9(n){let e=new Map;for(let[t,r]of Object.entries(n)){let i=Io(r),a=R7(t),g=e.get(i);g?g.contains.push(a):e.set(i,{...r,contains:[a]})}return Array.from(e.values())}function s9(n,e){return Object.keys(n).every(t=>Ba(n[t],e[t]))}function l9(n,e){let t=[],r=[],i=g=>{let R=g!==null?Bs(za(g)):null;return L=>g===null||R===null?"start"in L&&"end"in L&&L.start===null:"second"in L?R.getSeconds()===L.second:"minute"in L?R.getMinutes()===L.minute:"hour"in L?R.getHours()===L.hour:"day"in L?R.getMonth()+1===L.month&&R.getDate()===L.day:"month"in L?R.getMonth()+1===L.month:"quarter"in L?Math.floor(R.getMonth()/3)+1===L.quarter:"year"in L?R.getFullYear()===L.year:"start"in L&&"end"in L?L.start===null?L.includeEnd?g<=L.end:g<L.end:L.end===null?L.includeStart?g>=L.start:g>L.start:(L.includeStart?g>=L.start:g>L.start)&&(L.includeEnd?g<=L.end:g<L.end):!1},a=e[e.length-1];for(let g=0;g<n.length;g++){let R=i(n[g]),L=R(a)?e.length-1:e.findIndex(R);r[g]=L,(t[L]??=[]).push(g)}return{map:r,contains:t}}function Q_(n,e,t,r){r===void 0&&(r=ye=>ye+"");let i=n.getSharedItemFlags();if(i.containsString||i.containsMixedTypes)return null;let a=n.getSharedItems(),g=i.minValue??up(a.map(ye=>ye.value)),R=i.maxValue??du(a.map(ye=>ye.value)),L=e.autoStart?g:e.start??g,W=e.autoEnd?R:e.end??R,K=e.interval,Q=!!i.containsDate||!!i.containsInteger&&!i.containsMixedTypes&&Number.isInteger(L)&&Number.isInteger(W)&&Number.isInteger(K);if(L>=W||K<=0)return null;let oe=function(ye,Te,Me,Oe){let ze=[{start:null,end:ye}],We=ye;for(;We<Te;){let qe=Yi(We+Me+(Oe&&We+Me!==Te?-1:0));ze.push({start:We,end:qe,includeStart:!0,includeEnd:Oe||qe===Te}),We=Yi(We+Me)}return ze.push({start:We,end:null,includeStart:We>Te}),ze}(L,W,K,Q),se=oe.map(ye=>Wh(ye.start===null?`<${r(ye.end)}`:ye.end===null?`>${r(ye.start)}`:`${r(ye.start)}-${r(ye.end)}`)),{map:he,contains:me}=l9(a.map(ye=>ye.value),oe);return se.forEach((ye,Te)=>{ye.contains=me[Te]?.map(Me=>a[Me])??[]}),p9(se,t),{items:se,map:Object.fromEntries(he.map((ye,Te)=>{let Me=a[Te],Oe=se[ye];return[Io(Me),Pa(Oe)]}))}}function u9(n,e,t,r){r===void 0&&(r=null);let i=n?.getCache(),a=i?.getField(e);if(!n||!i||!a||a.getType()!==wu.number||a.hasGroupSetting()&&a.getGroupType()!=="number")return null;let g=Or(a.getGroupSetting()?.grouping??null),R=t===null,L=!1;try{L=R?i.removeGrouping(e):i.setNumberGrouping(e,t)}catch{}if(!L)return null;let W=Or(n.getPivotFieldById(e)?.items);n.updatePivotFieldsByCache(new Set([e])),R&&n.getPivotFieldById(e)?.sortItems();let K=n.getPivotFieldById(e);K&&r&&(K.updateItemAttrs(r),K.reorderItems(r.map(se=>Io(se))));let Q=Or(n.getPivotFieldById(e)?.items),oe=Or(a.getGroupSetting()?.grouping??null);if(g!==null&&oe!==null)for(let se of["autoStart","autoEnd","start","end","interval"])g[se]===oe[se]&&(delete g[se],delete oe[se]);return{tableId:n.getId(),fieldId:e,oldGrouping:g,newGrouping:oe,oldItems:W,newItems:Q}}function og(n,e){return`${n}-group-${e}`}function h9(n,e,t){for(let r of["row","col","page"])for(let i of n[r])if(i.fieldId===e)return i.fieldId=t,!0;return!1}function c9(n,e,t,r){return n[t].splice(r,0,{fieldId:e}),!0}function GM(n,e,t){for(let r of["row","col","page"])for(let i=0;i<n[r].length;i++)if(n[r][i].fieldId===e)return n[r].splice(i,1),t&&t.axis===r&&t.position>i&&t.position--,!0;return!1}function d9(n,e){let t=n.getCache().getGroupFields(e);if(t.length===0)return;let r=jM();for(let i of bu){let a=t.find(g=>g.getDatetimeGroupLevel()===i);if(a){let g=n.getFieldAxisInfo(a.getId());r[i]=g}}return r}function jM(){return Object.fromEntries(bu.map(n=>[n,{axis:null,position:-1}]))}function f9(n,e){let t=n.getCache().getGroupFields(e);if(t.length===0)return;let r=Object.fromEntries(bu.map(a=>[a,null]));for(let a of bu){let g=t.find(R=>R.getDatetimeGroupLevel()===a);if(g){let R=n.getPivotFieldById(g.getId());r[a]=Or(R?.items)??null}}let i=n.getPivotFieldById(e);return r.raw=i&&!i.usingGroupItems()?Or(i.items):null,r}function g9(n,e,t,r,i,a){let g;i===void 0&&(i=!1);let R=n?.getCache();try{g=R?.getBaseField(e)}catch{return null}if(!n||!R||!g||g.getType()!==wu.datetime||g.hasGroupSetting()&&g.getGroupType()!=="datetime")return null;let L=g.getId(),W=R.getDatetimeFullGrouping(L),K=f9(n,L),Q=n.getPivotFieldById(L)?.getName(!1),oe=d9(n,L)??jM(),se=t===null,he=!1;try{he=se?R.removeGrouping(L):R.setDatetimeGrouping(L,t,Q)}catch{}if(!he)return null;let me=t?Object.assign(r9(),W,t):null,ye=function(We,qe,Ke,at,gt){We=Or(We);let pt=bu.find(on=>Ke?.[on]===!0),Tt=bu.find(on=>at?.[on]===!0);for(let on of(pt?Tt&&h9(We,qe,og(qe,pt)):Tt&&GM(We,qe),bu.filter(hn=>at?!!Ke?.[hn]&&!at?.[hn]:hn!==pt)))GM(We,og(qe,on),gt.default);let jt=bu.filter(on=>!Ke?.[on]&&!!at?.[on]);if(gt.default){let{axis:on,position:hn}=gt.default;if(on!==null)for(let un of jt)c9(We,og(qe,un),on,hn)}else{for(let on of bu.filter(hn=>at?.[hn]===!0))GM(We,og(qe,on));for(let[on,hn]of function(un){let an=Object.entries(un),Ut={off:0,row:1,col:2,page:3};return an.sort((kt,Pt)=>{let[,mn]=kt,[,Zt]=Pt;return mn.axis!==Zt.axis?Ut[mn.axis??"off"]-Ut[Zt.axis??"off"]:mn.position-Zt.position})}(sm(gt,"default"))){let{axis:un,position:an}=hn;un!==null&&c9(We,og(qe,on),un,an)}}return Tt&&h9(We,og(qe,Tt),qe),We}({row:n.getAxisFields("row"),col:n.getAxisFields("col"),page:n.getAxisFields("page")},L,W,me,r),Te=R.getGroupFields(L),Me=Te.map(We=>We.getId());if(n.updatePivotFieldsByCache(new Set(Me)),i)for(let We of Me)n.getPivotFieldById(We)?.foldItems();if(se&&n.getPivotFieldById(L)?.sortItems(),n.applyAllAxis(ye),a)for(let We of Te){if(!We)continue;let qe=We.usingGroupItems()?We.getDatetimeGroupLevel():"raw",Ke=n.getPivotFieldById(We.getId());if(!Ke||!qe)continue;let at=a[qe];at&&(Ke.updateItemAttrs(at),Ke.reorderItems(at.map(gt=>Io(gt))))}let Oe=d9(n,L)??jM(),ze=f9(n,L);return{tableId:n.getId(),fieldId:L,oldGrouping:W,newGrouping:me,oldPositions:oe,newPositions:Oe,oldItems:K,newItems:ze}}function qM(n,e,t){let r=n.getSharedItemFlags();if(r.containsString||r.containsMixedTypes)return null;let i=Te=>{let Me=Bs(za(Te));return`${Me.getFullYear()}/${Me.getMonth()+1}/${Me.getDate()}`},a=e.interval;if(typeof a=="number")return Q_(n,{...e,interval:a},t,i);let g=n.getSharedItems(),R=r.minValue??up(g.map(Te=>Te.value)),L=r.maxValue??du(g.map(Te=>Te.value)),W=e.autoStart?R:e.start??R,K=e.autoEnd?L:e.end??L,Q=Bs(za(W)),oe=Bs(za(K));if(Q.getTime()>=oe.getTime())return null;let se=[];if(a==="seconds")se=Fc(60).map(Te=>({second:Te}));else if(a==="minutes")se=Fc(60).map(Te=>({minute:Te}));else if(a==="hours")se=Fc(24).map(Te=>({hour:Te}));else if(a==="days")se=Fc(366).map(Te=>new Date(new Date("1972/1/1").setDate(1+Te))).map(Te=>({month:Te.getMonth()+1,day:Te.getDate()}));else if(a==="months")se=Fc(12).map(Te=>({month:Te+1}));else if(a==="quarters")se=Fc(4).map(Te=>({quarter:Te+1}));else if(a==="years")se=Fc(Q.getFullYear(),oe.getFullYear()+1).map(Te=>({year:Te}));else throw Error(`Unsupported datetime group level: ${a}`);se.unshift({start:null,end:W}),se.push({start:K,end:null});let he=se.map(Te=>{if("end"in Te&&Te.start===null)return Wh(`<${i(Te.end)}`);if("start"in Te&&Te.end===null)return Wh(`>${i(Te.start)}`);if("second"in Te)return Wh(t.getDatetimeLevelItem(Xr.seconds,Te.second));if("minute"in Te)return Wh(t.getDatetimeLevelItem(Xr.minutes,Te.minute));if("hour"in Te)return Wh(t.getDatetimeLevelItem(Xr.hours,Te.hour));if("day"in Te){let Me=(new Date(`1904/${Te.month}/${Te.day}`).getTime()-new Date("1903/12/31").getTime())/864e5;return Wh(t.getDatetimeLevelItem(Xr.days,Me))}else{if("month"in Te)return Wh(t.getDatetimeLevelItem(Xr.months,Te.month));if("quarter"in Te)return Wh(t.getDatetimeLevelItem(Xr.quarters,Te.quarter));if("year"in Te)return Wh(t.getDatetimeLevelItem(Xr.years,Te.year))}throw Error("Invalid group condition")}),{map:me,contains:ye}=l9(g.map(Te=>Te.value),se);return he.forEach((Te,Me)=>{Te.contains=ye[Me]?.map(Oe=>g[Oe])??[]}),p9(he,t),{items:he,map:Object.fromEntries(me.map((Te,Me)=>{let Oe=g[Me],ze=he[Te];return[Io(Oe),Pa(ze)]}))}}function p9(n,e){let t=n[0];t.type==="string"&&t.value.startsWith("<")&&t.contains.some(r=>{let{type:i}=r;return i==="missing"})&&(t.value=t.contains.length>1?`${t.value} ${e.getText("or")} ${e.getText("default_missing_item_label")}`:e.getText("default_missing_item_label"))}class m9{constructor(e){if(this.maps={number:new Map,datetime:new Map,boolean:new Map,string:new Map,error:new Map,missing:new Map},!!e)for(let[t,r]of e)this.set(t,r)}clear(){this.maps.number.clear(),this.maps.datetime.clear(),this.maps.boolean.clear(),this.maps.string.clear(),this.maps.error.clear(),this.maps.missing.clear()}delete(e){return this.maps[e.type].delete(e.type==="string"?e.value.toLocaleLowerCase():e.value)}get(e){return this.maps[e.type].get(e.type==="string"?e.value.toLocaleLowerCase():e.value)}has(e){return this.maps[e.type].has(e.type==="string"?e.value.toLocaleLowerCase():e.value)}set(e,t){return this.maps[e.type].set(e.type==="string"?e.value.toLocaleLowerCase():e.value,t),this}get size(){return Object.values(this.maps).reduce((e,t)=>e+t.size,0)}get[Symbol.toStringTag](){return"ValueItemMap"}}function v9(n){if(!n.containsString&&!n.containsMixedTypes){if(n.containsNumber)return wu.number;if(n.containsDate)return wu.datetime}return wu.text}class gm{constructor(e){if(this.id=e.id,this.name=e.name,this.suffix=e.suffix,this.fromData=e.fromData,this.sharedItems=e.sharedItems,this.types=new Set(this.sharedItems.items.map(t=>t.type)),this.sharedItemsIndexMap=new m9(this.sharedItems.items.map((t,r)=>[t,r])),this.groupItemsIndexMap=null,e.formula&&(this.formula=e.formula),e.numFmt&&(this.numFmt=e.numFmt),e.group){let t=[];if(e.group.map)for(let a in e.group.map){let g=e.group.map[a],R=e.group.items.findIndex(W=>Ba(W,g));if(R<0)continue;let L=R7(a);t[R]??=[],t[R].push(L)}let r=e.group.items.map((a,g)=>({...a,contains:t[g]??[]})),i={...sm(e.group,"items"),items:r};this.group=i}else this.group=null}getId(){return this.id}getName(){return this.name}getSuffix(){return this.suffix}setSuffix(e){this.suffix=e}isFromData(){return this.fromData}isFormulaField(){return!!this.formula}getSharedItem(e){return this.sharedItems.items[e]??null}getSharedItems(){return this.sharedItems.items}getSharedItemFlags(){return sm(this.sharedItems,"items")}getTypes(){return this.types}getType(){return v9(this.sharedItems)}getGroupType(){return this.getGroupSetting()?.type??null}getNumFmt(){return this.numFmt}setNumFmt(e){this.numFmt=e}getGroupSetting(){return this.group}hasGroupSetting(){return!!this.getGroupSetting()}setGroupSetting(e){e===null?this.group=null:this.group=Object.assign({base:null,parent:null,type:"manual",grouping:null,items:[],map:null},this.group,e)}getDatetimeGroupLevel(){let e=this.getGroupSetting();if(!e||e.type!=="datetime")return null;let t=e.grouping.interval;return typeof t=="number"?Xr.days:t}setGroupItems(e){this.group&&(this.group.items=e)}usingGroupItems(){return this.getGroupItems()!==null}getItemSharedIndex(e){return this.sharedItemsIndexMap.get(e)??-1}getGroupItemIndex(e){if(!this.groupItemsIndexMap){let t=this.getGroupItems();if(!t)return-1;this.groupItemsIndexMap=new m9(t.map((r,i)=>[r,i]))}return this.groupItemsIndexMap.get(e)??-1}onGroupItemsChanged(){this.groupItemsIndexMap=null}getItemIndex(e){return this.usingGroupItems()?this.getGroupItemIndex(e):this.getItemSharedIndex(e)}createSharedItem(e){let t=this.sharedItemsIndexMap.get(e)??-1;if(t<0){t=this.sharedItems.items.length,this.sharedItemsIndexMap.set(e,t);let r=this.types.has("number");this.sharedItems.items.push(e),this.types.add(e.type),this.sharedItems.containsInteger??=!1,e.type==="number"&&(this.sharedItems.containsInteger=(!r||this.sharedItems.containsInteger)&&Number.isInteger(e.value)),this.sharedItems.containsInteger&&=e.type!=="datetime"&&!this.sharedItems.containsDate,this.sharedItems.containsDate||=e.type==="datetime",this.sharedItems.containsNumber=(this.sharedItems.containsNumber||e.type==="number")&&!this.sharedItems.containsDate,this.sharedItems.containsNonDate||=e.type!=="datetime"&&e.type!=="missing",this.sharedItems.containsBlank||=e.type==="missing",this.sharedItems.containsString||=e.type==="string"||e.type==="boolean"||e.type==="error",this.sharedItems.containsSemiMixedTypes||=e.type!=="number"&&e.type!=="datetime",this.sharedItems.containsMixedTypes=new Set(Array.from(this.types).filter(i=>i!=="missing").map(i=>i==="boolean"||i==="error"?"string":i)).size>1,this.sharedItems.longText||=e.type==="string"&&e.value.length>=256,this.sharedItems.containsDate&&(e.type==="datetime"||e.type==="number")&&(this.sharedItems.minDate=Math.min(e.value,this.sharedItems.minDate??Number.POSITIVE_INFINITY),this.sharedItems.maxDate=Math.max(e.value,this.sharedItems.maxDate??Number.NEGATIVE_INFINITY)),this.sharedItems.containsDate||e.type!=="number"||(this.sharedItems.minValue=Math.min(e.value,this.sharedItems.minValue??Number.POSITIVE_INFINITY),this.sharedItems.maxValue=Math.max(e.value,this.sharedItems.maxValue??Number.NEGATIVE_INFINITY))}return{type:"shared",value:t}}getGroupItems(){return this.group&&(this.group.type!=="manual"||this.group.base!==null)?this.group.items:null}getItemsForPivotField(){return this.getGroupItems()??this.getSharedItems()}toJSON(){let e=this.numFmt,t=this.group&&Object.assign(sm(this.group,["items"]),{items:this.group.items.map(i=>Pa(i))}),r=this.formula;return{id:this.id,name:this.name,suffix:this.suffix,fromData:this.fromData,sharedItems:this.sharedItems,...e&&{numFmt:e},...t&&{group:t},...r&&{formula:r}}}}async function Vc(n,e){let{uiBridge:t}=n;return(e=Ph(e)).includes(em.REJECT)?(await t.onAlert(en.PROTECTION_REJECT),!1):!e.includes(em.WARNING)||t.onConfirm(en.PROTECTION_WARNING).catch(()=>!1)}async function e1(n,e){let{uiBridge:t}=n;return await e(t.getUserInfo())}async function y9(n,e){let t=await e1(n,e);return Vc(n,t)}async function jo(n,e,t){return await y9(n,r=>n.dataBridge.checkProtectedWorksheets(e,t,r))}async function Vr(n,e,t){return Vc(n,await pm(n,e,t))}async function w9(n,e,t){return Vc(n,await b9(n,e,t))}async function Hoe(n,e,t,r){return Vc(n,await YM(n,e,t,r))}async function pm(n,e,t){let r=Ph(e).map(function(i){return i instanceof sn&&(i=new nr(null,i.from,i.to,i.type)),i.toRange()});return await e1(n,i=>n.dataBridge.checkProtectRefRange(r,t,i))}async function b9(n,e,t){let r=e.map(i=>{let[a,g]=i;return{row:a,col:g}});return await e1(n,i=>n.dataBridge.checkProtectedCoords(t,r,i,{warning:!1}))}async function YM(n,e,t,r){return await e1(n,i=>n.dataBridge.checkProtectedInsertable(e,t,r,i,{warning:!1}))}async function C9(n,e){return await y9(n,t=>n.dataBridge.validateRuleCommand(e,t))}async function $oe(n,e,t,r){if(!n.dataBridge.getWorkbook().hasSheet(e)||!await w9(n,t,e))return;let i=await n.dataBridge.listPivotTableLocations(e);if(No(t.map(g=>{let[R,L]=g;return new sn(R,L,R,L)}),i).partial.length>0)return en.PIVOT_TABLE_MODIFY_PARTIAL;let a=[];if(t.length===1&&!Cr(t[0][2])){let[g,R]=t[0];a.push(jV(e,g,R))}return a.push(mu(e,t,r)),a.push(...await zoe(n,e,t)),a}async function zoe(n,e,t){let{dataBridge:r}=n;return(await Promise.all(t.map(async i=>{let[a,g,R]=i;if(!Cr(R))return;let L=(await r.getRangeHyperlink(e,{row:a,col:g},{row:a,col:g}))?.[0][0];if(L)return qy(e,L.id)}))).filter(ga)}async function $d(n,e){let{cls:t,value:r,sheetId:i,rowCount:a,colCount:g,multiRange:R,overwrite:L,skip:W}=n;if(L=!!L,W=W||{},!R||R.length===0)return[];let K=function(oe,se,he){let me={rows:[],cols:[],all:[],normals:[]};for(let ye=0;ye<oe.length;ye++){let Te=oe[ye].normalize(),Me=Te.getWidth()===he,Oe=Te.getHeight()===se;Me&&Oe?me.all.push(Te):Me?me.rows.push(Te):Oe?me.cols.push(Te):me.normals.push(Te)}return me}(R,a,g),Q=[];if(K.all.length>0&&!W.global)Q.push($y(i,t,r,!1));else{let oe,se,he,me=[],ye=[],Te=[];if(!W.row)for(oe=0;oe<K.rows.length;oe++)for(se=(he=K.rows[oe]).from.row;se<=he.to.row;se++)W.filtered?.[se]!==!0&&me.push([se,r]);if(!W.col)for(oe=0;oe<K.cols.length;oe++)for(se=(he=K.cols[oe]).from.col;se<=he.to.col;se++)ye.push([se,r]);if(!W.cell&&K.normals.length>0)for(oe=0;oe<K.normals.length;oe++){he=K.normals[oe];for(let Me=he.from.row;Me<=he.to.row;Me++)if(W.filtered?.[Me]!==!0)for(let Oe=he.from.col;Oe<=he.to.col;Oe++)Te.push([Me,Oe,r])}me.length>0&&Q.push(Fh(i,"row",t,me,!1)),ye.length>0&&Q.push(Fh(i,"col",t,ye,!1)),Te.length>0&&Q.push(zl(i,t,Te,L))}return e&&Q.push(...await e(K)),Q}async function Woe(n,e,t,r){let{dataBridge:i}=n,a=(await Promise.all(cA(t.map(g=>g.toArray())).map(async g=>{let[R,L,W,K]=g,Q=await i.getRangeData(e,{row:R,col:L},{row:W,col:K}),oe=await i.getFilteredRows(e,R,W),se=[];for(let he=R;he<=W;he++)if(!oe[he-R])for(let me=L;me<=K;me++){let ye=Q[he-R][me-L];if(_a(ye)){let Te=yo.fromJSON(ye).setCellStyle(r);se.push([he,me,ph(Te)])}}return se}))).flat();return a.length>0?[mu(e,a,Nn.Format)]:[]}async function Uoe(n,e,t,r,i,a){let{dataBridge:g}=n;if(!g.getWorkbook().hasSheet(e)||!await Vr(n,t,e))return;t=t.map(he=>he.clone().normalize());let{rowCount:R,colCount:L}=await g.getSheetDimension(e),W=R-1,K=0;for(let he of t)W=Math.min(W,he.from.row),K=Math.max(K,he.to.row);let Q=Array(W).fill(!1).concat(...await g.getFilteredRows(e,W,K)),oe={[i]:a},se=await $d({cls:r,value:oe,sheetId:e,rowCount:R,colCount:L,multiRange:t,skip:{filtered:Q}});return r==="Font"&&se.push(...await Woe(n,e,t,oe)),se}async function Goe(n,e,t,r,i){let{dataBridge:a}=n;if(!a.getWorkbook().hasSheet(e)||!await Vr(n,t,e))return;let{rowCount:g,colCount:R}=await a.getSheetDimension(e),L=await $d({cls:"Format",value:i,sheetId:e,rowCount:g,colCount:R,multiRange:t});return 0<r.length&&L.push(mu(e,r,Nn.Format)),L}async function joe(n,e,t){let{dataBridge:r}=n;if(!r.getWorkbook().hasSheet(e)||!await Vr(n,t,e))return;let i=[];await Pp(t,async(W,K)=>await r.getRangeData(e,W,K),(W,K,Q)=>{_a(Q)&&i.push([W,K,dc(Q)])},async(W,K)=>await r.getFilteredRows(e,W,K));let{rowCount:a,colCount:g}=await r.getSheetDimension(e),R={value:null,sheetId:e,rowCount:a,colCount:g,multiRange:t,overwrite:!0},L=await $d(Vs(R,{cls:"Font"}));return L.push(...await $d(Vs(R,{cls:"Fill"}))),L.push(...await $d(Vs(R,{cls:"Alignment"}))),L.push(...await $d(Vs(R,{cls:"Border"}))),i.length>0&&L.push(mu(e,i,Nn.ClearFormat)),L}async function qoe(n,e,t,r,i){let{dataBridge:a}=n;if(!a.getWorkbook().hasSheet(e)||t.length===0||!await Vr(n,t,e))return;let g=r.split("_")[0];if(0>["top","right","bottom","left","outer","horizontal","vertical","inner"].indexOf(g))return;let{rowCount:R,colCount:L}=await a.getSheetDimension(e),W=(await Promise.all(t.map(async K=>{let Q=K.getTopLeftCorner(),oe=K.getBottomRightCorner(),se={row:Math.max(Q.row-1,0),col:Math.max(Q.col-1,0)},he=await a.getRangeComputedStyle(e,se,{row:oe.row+1,col:oe.col+1});return aw(R,L,K,g,i,(me,ye)=>he[me-se.row][ye-se.col].border.b)}))).reduce((K,Q)=>(K.push(...Q),K),[]);return[zl(e,"Border",W)]}async function KM(n,e,t){let{dataBridge:r}=n,i=t.getTopLeftCorner(),a=t.getBottomRightCorner(),g={row:Math.max(0,i.row-1),col:Math.max(0,i.col-1)},R={row:a.row+1,col:a.col+1},L=await r.getRangeComputedStyle(e,g,R);return(W,K)=>L[W-g.row][K-g.col].border.b}async function Yoe(n,e,t,r){let{dataBridge:i}=n;if(!i.getWorkbook().hasSheet(e)||t.length===0||!await Vr(n,t,e))return;let a=[],g=[],{rowCount:R,colCount:L}=await i.getSheetDimension(e),W=await Promise.all(t.map(async se=>{let he=se.getTopLeftCorner();return(await i.getMergedRange(e,he.row,he.col))?.isEqual(se)??!1}));for(let se=0;se<t.length;se++){let he=t[se];W[se]?a.push(he):g.push(he)}let K=[],Q=await Promise.all(a.map(se=>KM(n,e,se)));for(let se=0;se<a.length;se++)K.push(...aw(R,L,a[se],"outer",r,Q[se]));let oe=[];return K.length>0&&oe.push(zl(e,"Border",K)),oe.push(...await $d({cls:"Border",value:Qu(r),sheetId:e,rowCount:R,colCount:L,multiRange:g,overwrite:!0,skip:{cell:!0}},async se=>{if(se.all.length>0)return[];let{rows:he,cols:me,normals:ye}=se,Te=[];for(let Oe=0;Oe<he.length;Oe++)Te.push(Fh(e,"row","Border",x$(R,he[Oe],"all",null)));for(let Oe=0;Oe<me.length;Oe++)Te.push(Fh(e,"col","Border",T$(L,me[Oe],"all",null)));let Me=await Promise.all(ye.map(Oe=>KM(n,e,Oe)));for(let Oe=0;Oe<ye.length;Oe++)Te.push(zl(e,"Border",aw(R,L,ye[Oe],"ALL",r,Me[Oe])));return Te})),oe}async function Koe(n,e,t){let{dataBridge:r}=n;if(!r.getWorkbook().hasSheet(e)||!await Vr(n,t,e))return;let{rowCount:i,colCount:a}=await r.getSheetDimension(e);return await $d({cls:"Border",value:null,sheetId:e,rowCount:i,colCount:a,multiRange:t,overwrite:!0,skip:{cell:!0}},async g=>{if(g.all.length>0)return[];let R=[],{rows:L,cols:W,normals:K}=g;for(let oe=0;oe<L.length;oe++)R.push(Fh(e,"row","Border",x$(i,L[oe],"all",null)));for(let oe=0;oe<W.length;oe++)R.push(Fh(e,"col","Border",T$(a,W[oe],"all",null)));let Q=await Promise.all(K.map(oe=>KM(n,e,oe)));for(let oe=0;oe<K.length;oe++)R.push(zl(e,"Border",aw(i,a,K[oe],"ALL",null,Q[oe])));return R})}async function _9(n,e,t){return(await n.getMergedOverlap(e,t)).every(r=>t.some(i=>i.includesRange(r)))?null:en.MERGE_PARTIAL}async function t1(n,e,t){if(t)return await n.checkMergeRangesError(e,t)}async function Xoe(n,e,t,r){let{from:i,to:a}=t,g=[],R={font:[],fill:[],alignment:[]},L=[],W=null,K=await n.getRangeData(e,i,a);for(let ze=i.row;ze<=a.row;ze++)for(let We=i.col;We<=a.col;We++)Cr(K[ze-i.row][We-i.col])||(W?g.push([ze,We,null]):W={row:ze,col:We});let Q=!!W&&g.length>0;if(W||(W={row:i.row,col:i.col}),W.row!==i.row||W.col!==i.col){let ze=K[W.row-i.row][W.col-i.col];g.push([W.row,W.col,null],[i.row,i.col,_a(ze)?yo.fromJSON(ze):ze])}let oe=(await n.getRangeValidId(e,W,W))[0][0],se=(await n.getRangeComputedStyle(e,W,W))[0][0],he=Object.keys(se.font).length===0?null:se.font,me=Object.keys(se.fill).length===0?null:se.fill,ye=Object.keys(se.font).length===0?null:se.alignment;t.forAll((ze,We)=>{L.push({row:ze,col:We,pattern:ow.OUTER,colors:null}),(W.row!==ze||W.col!==We)&&(R.font.push([ze,We,he]),R.fill.push([ze,We,me]),R.alignment.push([ze,We,ye]))});let{rowCount:Te,colCount:Me}=r||await n.getSheetDimension(e),Oe=Qu(se.border.b);return M_(Oe)||L.push(...S$(Te,Me,t,"outer",Oe)),{range:t,data:g,...R,needConfirm:Q,refValidId:oe,borderOp:L}}async function Joe(n,e,t){let r=1/0,i=1/0,a=-1,g=-1;for(let{row:L,col:W}of t)r=Math.min(r,L),i=Math.min(i,W),a=Math.max(a,L),g=Math.max(g,W);let R=await n.getRangeComputedStyle(e,{row:r,col:i},{row:a,col:g});return I$(t,(L,W)=>R[L-r][W-i].border.b)}async function Zoe(n,e,t){if(!(t=t&&Ph(t))||t.length===0||(t=t.map(Q=>Q.clone().normalize())).every(Q=>Q.getWidth()===1&&Q.getHeight()===1)||TC(t))return;let{dataBridge:r,uiBridge:i}=n;if(!r.getWorkbook().hasSheet(e)||!await Vr(n,t,e))return;let a=await t1(r,e,t)??await _9(r,e,t);if(a)return a;if((await r.listPivotTableLocations(e)).some(Q=>{let{location:oe}=Q;return Bp(oe,t)!==Dh.none}))return en.PIVOT_TABLE_MODIFY_PARTIAL;let g=await r.getSheetDimension(e),R=await Promise.all(t.map(Q=>Xoe(r,e,Q,g)));if(R.some(Q=>Q.needConfirm)&&!await i.onConfirm(en.CLEAR_MERGE_DATA))return;let L={data:R.map(Q=>Q.data).flat(),font:R.map(Q=>Q.font).flat(),fill:R.map(Q=>Q.fill).flat(),alignment:R.map(Q=>Q.alignment).flat(),border:await Joe(r,e,R.map(Q=>Q.borderOp).flat())},W=[];for(let Q of t)W.push(n_(e,Q));let K=Nn.MergeCell;for(let{range:Q,refValidId:oe}of(L.data&&0<L.data.length&&W.push(mu(e,L.data,K)),L.font&&0<L.font.length&&W.push(zl(e,"Font",L.font,!0,K)),L.fill&&0<L.fill.length&&W.push(zl(e,"Fill",L.fill,!0,K)),L.alignment&&0<L.alignment.length&&W.push(zl(e,"Alignment",L.alignment,!0,K)),L.border&&0<L.border.length&&W.push(zl(e,"Border",L.border,!0,K)),R))W.push(o_(e,Q)),oe&&W.push(qV(e,oe,Q));for(let Q of t)W.push(t_(e,!0,Q));return W}async function Qoe(n,e,t){t=t&&Ph(t);let{dataBridge:r}=n,i=r.getWorkbook();if(t&&t.length!==0&&i.hasSheet(e)&&await Vr(n,t,e))return t.map(a=>n_(e,a))}class eae{constructor({dataBridge:e,uiBridge:t,undoRedo:r,transport:i}){this.createPivotTable=Ri(this._createPivotTable),this.deletePivotTable=Ri(this._deletePivotTable),this.refreshPivotTableData=Ri(this._refreshPivotTableData),this.changePivotTableSource=Ri(this._changePivotTableSource),this.clonePivotTable=Ri(this._clonePivotTable),this.movePivotTable=Ri(this._movePivotTable),this.convertPivotTableToCompatible=Ri(this._convertPivotTableToCompatible),this.setPivotTableCaption=Ri(this._setPivotTableCaption),this.movePivotAxisFieldCommand=Ri(this._movePivotAxisFieldCommand),this.unusePivotField=Ri(this._unusePivotField),this.setPivotTableValuesFieldAxis=Ri(this._setPivotTableValuesFieldAxis),this.insertPivotDataFieldCommand=Ri(this._insertPivotDataFieldCommand),this.movePivotDataFieldCommand=Ri(this._movePivotDataFieldCommand),this.removePivotDataFieldCommand=Ri(this._removePivotDataFieldCommand),this.setPivotFieldFilter=Ri(this._setPivotFieldFilter),this.setPivotFieldAttr=Ri(this._setPivotFieldAttr),this.setPivotDataFieldAttr=Ri(this._setPivotDataFieldAttr),this.setPivotFieldItemAttr=Ri(this._setPivotFieldItemAttr),this.groupPivotFieldItems=Ri(this._groupPivotFieldItems),this.ungroupPivotFieldItems=Ri(this._ungroupPivotFieldItems),this.setPivotFieldNumberGroup=Ri(this._setPivotFieldNumberGroup),this.setPivotFieldDatetimeGroup=Ri(this._setPivotFieldDatetimeGroup),this.setPivotCellAsItemName=Ri(this._setPivotCellAsItemName),this.setPivotCellAsFieldName=Ri(this._setPivotCellAsFieldName),this.setPivotCellAsDataFieldName=Ri(this._setPivotCellAsDataFieldName),this.setPivotCellAsFilterItem=Ri(this._setPivotCellAsFilterItem),this.setPivotCellAsSubtotalCaption=Ri(this._setPivotCellAsSubtotalCaption),this.setPivotCellAsGrandTotalCaption=Ri(this._setPivotCellAsGrandTotalCaption),this.setPivotCellAsColumnHeaderCaption=Ri(this._setPivotCellAsColumnHeaderCaption),this.setPivotCellAsRowHeaderCaption=Ri(this._setPivotCellAsRowHeaderCaption),this.createPivotDetailSheet=Ri(this._createPivotDetailSheet),this.createPivotTableSheet=Ri(this._createPivotTableSheet),this.dataBridge=e,this.uiBridge=t,this.hot=null,this.undoRedo=r??null,this.transport=i??null}bindHot(e){return this.hot=e,this}async execCompound(e,t){await this._recordSels(async()=>{let r=await e();r.length>0&&await this.execCommand(r.length===1?r[0]:qf(r))},t)}async execCommand(e){return this.reserveLocalCommand(async()=>{let t=await this._getDataBridge().execCommand(e);return t&&this.undoRedo?.done(t),t?{action:t}:void 0})}async reserveLocalCommand(e){return this.transport?this.transport.reserveLocalCommand(e):(await e())?.action}async _recordSels(e,t){let r=pl(this.undoRedo?.doneActions??[]);t=t||this._getUserSelections(),await e();let i=pl(this.undoRedo?.doneActions??[]);r!==i&&i.setSelections(t)}_getUserSelections(){return this.hot?.serializeSelections()}fail(e){return Promise.reject({message:e})}async done(e){return this.getUIBridge().onActionDone(e),await this._getDataBridge().forceUpdate(),!0}_getUserInfo(){return this.getUIBridge().getUserInfo()}_getBridges(){return{dataBridge:this._getDataBridge(),uiBridge:this.getUIBridge()}}async checkProtectedWorksheet(e,t){return jo(this._getBridges(),[e],t)}async _handleCommandResult(e,t){return Array.isArray(e)?(await this.execCompound(()=>e,t),this.done()):this.fail(e)}async setValues(e,t,r){let i=this._getUserSelections();return this._handleCommandResult(await $oe(this._getBridges(),e,t,r),i)}async setStyleMeta(e,t,r,i,a){return this._handleCommandResult(await Uoe(this._getBridges(),e,t,r,i,a))}async setDataAndFormat(e,t,r,i){return this._handleCommandResult(await Goe(this._getBridges(),e,t,r,i))}async setFormat(e,t,r){if(!this._getWorkbook().hasSheet(e))return this.fail();let i=[];return await Pp(t,async(a,g)=>await this.dataBridge.getRangeCellByKey(e,a,g,["v","renderDesc"]),(a,g,R)=>{let{v:L,renderDesc:W}=R;if(L==null||be(L))return;let K=typeof L=="string";_a(L)&&(L=new yo(L.v).getText(),K=!0),r!=="@"||K?r!=="@"&&K&&i.push([a,g,L]):i.push([a,g,W.v])},async(a,g)=>await this.dataBridge.getFilteredRows(e,a,g)),this.setDataAndFormat(e,t,i,r)}async fillDatetime(e,t,r,i){if(!this._getWorkbook().hasSheet(e))return this.fail();let a=[];return await Pp(r,(g,R)=>Array(R.row-g.row+1).fill([]),(g,R)=>{a.push([g,R,t])},async(g,R)=>await this.dataBridge.getFilteredRows(e,g,R)),this.setDataAndFormat(e,r,a,i)}async clearFormat(e,t){return this._handleCommandResult(await joe(this._getBridges(),e,t))}async setBorder(e,t,r,i){return this._handleCommandResult(await qoe(this._getBridges(),e,t,r,i))}async setAllBorder(e,t,r){return this._handleCommandResult(await Yoe(this._getBridges(),e,t,r))}async removeBorder(e,t){return this._handleCommandResult(await Koe(this._getBridges(),e,t))}async hasCrossingMergeCells(e,t){let r=this._getDataBridge();return(await Promise.all(t.map(i=>r.checkIncompleteMergedCells(e,i)))).some(i=>i)}async mergeCells(e,t){return this._handleCommandResult(await Zoe(this._getBridges(),e,t))}async unmergeCells(e,t){return this._handleCommandResult(await Qoe(this._getBridges(),e,t))}async isMerged(e,t){if(!t||!this._getWorkbook().hasSheet(e))return!0;Array.isArray(t)&&(t=oa(...t));let r=t.getTopLeftCorner();return(await this.dataBridge.getMergedRange(e,r.row,r.col))?.isEqual(t)??!1}async fixRow(e,t){if(typeof t!="number"||t<0||!this._getWorkbook().hasSheet(e)||!await jo(this._getBridges(),[e]))return this.fail();let r=this.dataBridge,{colCount:i}=await r.getSheetDimension(e);if(t>0){let a=new sn(t,0,t,i-1);if((await r.getMergedOverlap(e,[a])).some(g=>g.from.row<t&&g.to.row>=t))return this.fail(en.FREEZE_MERGED)}return await this._recordSels(async()=>{await this.execCommand(zy(e,"row",t))}),this.done()}async fixCol(e,t){if(typeof t!="number"||t<0||!this._getWorkbook().hasSheet(e)||!await jo(this._getBridges(),[e]))return this.fail();let r=this.dataBridge,{rowCount:i}=await r.getSheetDimension(e);if(t>0){let a=new sn(0,t,i-1,t);if((await r.getMergedOverlap(e,[a])).some(g=>g.from.col<t&&g.to.col>=t))return this.fail(en.FREEZE_MERGED)}return await this._recordSels(async()=>{await this.execCommand(zy(e,"col",t))}),this.done()}async hideRows(e,t){if(!this._getWorkbook().hasSheet(e)||t.length===0||!await Vr(this._getBridges(),t,e))return this.fail();let r=await this.dataBridge.getRowInfo(e),{rowCount:i}=await this.dataBridge.getSheetDimension(e),a=AC(t,"row",g=>!r[g]?.hidden);return um(a,g=>r[g]?.hidden??!1,i)?this.fail(en.HIDE_ALL_ROW):(await this.execCompound(()=>a.map(g=>Wl(e,!0,"row",g.from,g.to))),this.done())}async hideCols(e,t){if(!this._getWorkbook().hasSheet(e)||t.length===0||!await Vr(this._getBridges(),t,e))return this.fail();let r=await this.dataBridge.getColInfo(e),{colCount:i}=await this.dataBridge.getSheetDimension(e),a=Gf(t,"col");return um(a,g=>r[g]?.hidden??!1,i)?this.fail(en.HIDE_ALL_COL):(await this.execCompound(()=>a.map(g=>Wl(e,!0,"col",g.from,g.to))),this.done())}async showRows(e,t){if(!this._getWorkbook().hasSheet(e)||t.length===0||!await Vr(this._getBridges(),t,e))return this.fail();let r=t[0].from.row,i=0;for(let L of t)r=Math.min(L.getTopLeftCorner().row,r),i=Math.max(L.getBottomRightCorner().row,i);let a=await this.dataBridge.getFilteredRows(e,r,i),g=await this.dataBridge.getRowInfo(e),R=AC(t,"row",L=>!!g[L]?.hidden&&!a[L-r]);return await this.execCompound(()=>R.map(L=>Wl(e,!1,"row",L.from,L.to))),this.done()}async showCols(e,t){if(!this._getWorkbook().hasSheet(e)||t.length===0||!await Vr(this._getBridges(),t,e))return this.fail();let r=await this.dataBridge.getColInfo(e),i=AC(t,"col",a=>r[a]?.hidden??!1);return await this.execCompound(()=>i.map(a=>Wl(e,!1,"col",a.from,a.to))),this.done()}async _getAutoFilterRange(e,t){return t&&(t=await this.dataBridge.getAutoFilterRange(e,t)),t}async createFilter(e,t){if(!this._getWorkbook().hasSheet(e))return this.fail();let r=await this._getAutoFilterRange(e,t),i=this._checkFilterRange(r);function a(){return{range:r}}return i?this.fail(i).then(a,a):await Vr(this._getBridges(),r,e)?(await this._recordSels(async()=>{let g=pe();await this.execCommand(GA(e,g,r))}),this.done().then(a)):this.fail()}async _checkProtectedFilter(e,t){let r=await this.dataBridge.getActiveFilterData(t);return!r||e!==r.id||Vr(this._getBridges(),r.range,t)}async disableFilter(e,t){if(!this._getWorkbook().hasSheet(e)||!await this._checkProtectedFilter(t,e))return this.fail();let r=await this.dataBridge.getActiveFilterData(e);return await this.execCompound(()=>{let i=[];return t===r?.id?i.push(vu(e,t,!1,!1)):(t===r?.activeId&&i.push(Yf(e,null)),i.push(vu(e,t,!1,!0))),i}),this.done()}async setFilter(e,t,r,i){if(!this._getWorkbook().hasSheet(e)||!await this._checkProtectedFilter(t,e))return this.fail();let a=await this.dataBridge.getActiveFilterData(e);return await this._recordSels(async()=>{t===a?.id?await this.execCommand(Nd(e,t,!1,r,i)):await this.execCommand(Nd(e,t,!0,r,i))}),this.done()}async createFilterView(e,t,r,i){if(!this._getWorkbook().hasSheet(e))return this.fail();let a=await this._getAutoFilterRange(e,r),g=this._checkFilterRange(a);function R(){return{range:a}}return g?this.fail(g).then(R,R):(await this.execCompound(()=>[r_(e,t,a,i),Yf(e,t)]),this.done().then(R))}async createPrivateFilterView(e,t,r,i){return this._getWorkbook().hasSheet(e)?(await this.execCompound(()=>{let a=pe(),g=[r_(e,a,t,r,!0),Yf(e,a)];return i.forEach((R,L)=>g.push(Nd(e,a,!0,t[1]+L,R))),g}),this.done()):this.fail()}async updateFilterViewName(e,t,r){return this._getWorkbook().hasSheet(e)&&r?(await this._recordSels(async()=>{await this.execCommand(i_(e,t,r))}),this.done()):this.fail()}async updateFilterViewRange(e,t,r){if(!this._getWorkbook().hasSheet(e))return this.fail();let i=this._checkFilterRange(r);return i?this.fail(i):(await this._recordSels(async()=>{await this.execCommand(Pd(e,t,!0,r))}),this.done())}async setActiveFilterView(e,t){return this._getWorkbook().hasSheet(e)?(await this._recordSels(async()=>{await this.execCommand(Yf(e,t))}),this.done()):this.fail()}async applyLink(e,t,r,i,a,g){var R,L;return g===void 0&&(g=!0),i||(i=a),L=R=a,le.test(L)?R="mailto:"+R:!R.startsWith("mailto:")&&0>R.indexOf("://")&&R.indexOf("#tid=")!==0&&R.indexOf("#dlink=")!==0&&(R="http://"+R),a=R,this._applyInternalLink(e,t,r,i,a,g)}async applyInternalLink(e,t,r,i,a,g){let{sheetId:R,range:L}=a;if(g===void 0&&(g=!0),!this._getWorkbook().hasSheet(R))return this.fail();let W=this._getWorkbook(),K=`${ul(W.getNameById(R))}!${L}`;return this._applyInternalLink(e,t,r,i,K,g)}async _applyInternalLink(e,t,r,i,a,g){return g===void 0&&(g=!0),this._getWorkbook().hasSheet(e)&&t>=0&&r>=0&&await w9(this._getBridges(),[[t,r]],e)?(await this.execCompound(async()=>{let R=[];g&&((await this.dataBridge.getRangeStyle(e,{row:t,col:r},{row:t,col:r}))[0][0]?.nf.fc&&R.push(zV(e,[[t,r,null]],!0,Nn.ApplyLink)),R.push(mu(e,[[t,r,i]],Nn.ApplyLink)));let L=(await this.dataBridge.getRangeHyperlink(e,{row:t,col:r},{row:t,col:r}))?.[0][0];if(L)L.location!==a&&R.push(f_(e,{id:L.id,display:i,location:a}));else{let W=pe();R.push(KA(e,{id:W,row:t,col:r,display:i,location:a}))}return R}),this.done()):this.fail()}async removeLink(e,t){return this._getWorkbook().hasSheet(e)&&t.length!==0&&await Vr(this._getBridges(),t,e)?(await this.execCompound(async()=>{let r=[],i=[];return await Pp(t,async(a,g)=>await this.dataBridge.getRangeCellByKey(e,a,g,["v","link","renderDesc"]),(a,g,R)=>{let{v:L,link:W,renderDesc:K}=R;if(K.l){if(_a(L)){let Q=yo.fromJSON(L).removeStyle({underline:!0,color:Qe.HYPER_LINK_COLOR});i.push([a,g,ph(Q)])}else K?.e&&i.push([a,g,K.v]);W&&r.push(qy(e,W.id))}},async(a,g)=>await this.dataBridge.getFilteredRows(e,a,g)),0<i.length&&r.push(mu(e,i,Nn.RemoveLink)),r}),this.done()):this.fail()}async group(e,t,r){let i=r.getTopLeftCorner()[t],a=r.getBottomRightCorner()[t];if(r=new sn(i,i,a,a,qr[t]),!this._getWorkbook().hasSheet(e)||!await Vr(this._getBridges(),[r],e))return this.fail();let g=this._getDataBridge(),R=await(t==="row"?g.getRowInfo(e):g.getColInfo(e)),L=new Oc;for(let W=r.from[t];W<=r.to[t];W++)(R[W]?.outlineLevel??0)<8&&L.push(W);return await this.execCompound(async()=>L.getResult().map(W=>XA(e,t,W.from,W.to))),this.done()}async ungroup(e,t,r){let i=r.getTopLeftCorner()[t],a=r.getBottomRightCorner()[t];if(r=new sn(i,i,a,a,qr[t]),!this._getWorkbook().hasSheet(e)||!await Vr(this._getBridges(),[r],e))return this.fail();let g=this._getDataBridge(),R=await(t==="row"?g.getRowInfo(e):g.getColInfo(e)),L=new Oc;for(let W=i;W<=a;W++)(R[W]?.outlineLevel??0)>0&&L.push(W);return await this.execCompound(async()=>L.getResult().map(W=>Yy(e,t,W.from,W.to))),this.done()}_findGroupRange(e,t,r){let i=t,a=t,g=e[t]?.outlineLevel??r;for(;i>0;){let R=e[i-1]?.outlineLevel??0;if(R<r)break;g=Math.min(R,g),i-=1}for(;a<e.length-1;){let R=e[a+1]?.outlineLevel??0;if(R<r)break;g=Math.min(R,g),a+=1}return{start:i,end:a,minLevel:g}}_getSingleGroupSections(e,t,r,i){let{start:a,end:g,minLevel:R}=this._findGroupRange(e,t,r),L=new Oc,W=e[a-1]?.outlineLevel??0,K=!1;i&&(r=R);for(let Q=a;Q<=g;Q++){let{hidden:oe=!1,outlineLevel:se=0}=e[Q]??{};i&&(se===r?K=!1:se>W&&e[Q]?.collapse&&(K=!0)),oe!==i||K||L.push(Q),W=se}return{sections:L.getResult(),collapse:i?[]:[a]}}_getAllGroupSections(e,t,r){let i=new Oc,a=[],g=0;for(let R=0;R<t;R++){let{hidden:L=!1,outlineLevel:W=0}=e[R]??{};L===r&&W>0&&i.push(R),!r&&W>g&&a.push(R),g=W}return{sections:i.getResult(),collapse:a}}async _getGroupRanges(e,t,r,i,a){let g=this._getDataBridge(),R=await(t==="row"?g.getRowInfo(e):g.getColInfo(e)),{rowCount:L,colCount:W}=await g.getSheetDimension(e),K=t==="row"?L:W;if((R[r]?.outlineLevel??0)<i)return{ranges:[],collapse:[],error:{}};let{sections:Q,collapse:oe}=i===0?this._getAllGroupSections(R,K,a):this._getSingleGroupSections(R,r,i,a);if(!a&&um(Q,he=>R[he]?.hidden??!1,K))return{ranges:[],collapse:oe,error:{message:t==="row"?en.HIDE_ALL_ROW:en.HIDE_ALL_COL}};let se=Q.map(he=>{let{from:me,to:ye}=he;return new sn(me,me,ye,ye,qr[t])});return await Vr(this._getBridges(),se,e)?{ranges:se,collapse:oe}:{ranges:[],collapse:oe,error:{}}}async collapseGroup(e,t,r,i){if(!this._getWorkbook().hasSheet(e))return this.fail();let{ranges:a,collapse:g,error:R}=await this._getGroupRanges(e,t,r,i,!1);if(R||a.length===0)return this.fail(R?.message);let L=a.map(W=>Wl(e,!0,t,W.from[t],W.to[t]));return L.push(Ky(e,t,g,!0)),await this.execCompound(async()=>L),this.done()}async expandGroup(e,t,r,i){if(!this._getWorkbook().hasSheet(e))return this.fail();let{ranges:a,error:g}=await this._getGroupRanges(e,t,r,i,!0);return g||a.length===0?this.fail(g?.message):(await this.execCompound(async()=>a.map(R=>Wl(e,!1,t,R.from[t],R.to[t]))),this.done())}async expandAllGroup(e,t){if(!this._getWorkbook().hasSheet(e))return this.fail();let{ranges:r,error:i}=await this._getGroupRanges(e,t,0,0,!0);return i||r.length===0?this.fail(i?.message):(await this.execCompound(async()=>r.map(a=>Wl(e,!1,t,a.from[t],a.to[t]))),this.done())}async collapseAllGroup(e,t){if(!this._getWorkbook().hasSheet(e))return this.fail();let{ranges:r,collapse:i,error:a}=await this._getGroupRanges(e,t,0,0,!1);if(a||r.length===0)return this.fail(a?.message);let g=r.map(R=>Wl(e,!0,t,R.from[t],R.to[t]));return g.push(Ky(e,t,i,!0)),await this.execCompound(async()=>g),this.done()}async removeGroup(e,t,r,i){if(!this._getWorkbook().hasSheet(e)||i<=0)return this.fail();let a=this._getDataBridge(),g=await(t==="row"?a.getRowInfo(e):a.getColInfo(e));if((g[r]?.outlineLevel??0)<i)return this.fail();let R=[],{start:L,end:W}=this._findGroupRange(g,r,i),K=new sn(L,L,W,W,qr[t]);if(!await Vr(this._getBridges(),[K],e))return this.fail();g.slice(L,W+1).every(Q=>Q?.hidden)&&R.push(Wl(e,!1,t,L,W)),R.push(Yy(e,t,L,W)),await this.execCompound(async()=>R),await this.done()}async removeAllGroup(e,t){if(!this._getWorkbook().hasSheet(e))return this.fail();let r=this._getDataBridge(),i=await(t==="row"?r.getRowInfo(e):r.getColInfo(e)),a=[],g=[],R=[],L=[],W=0,K=0;for(let Q=0;Q<=i.length;Q++){let oe=i[Q]?.outlineLevel??0,se=i[Q]?.hidden??!1;if(oe>W)for(;R.length<oe;)R.push({start:Q,collapsed:!0});else if(oe<W){for(;R.length>oe;){let{start:he,collapsed:me}=R.pop();me&&function(ye,Te){for(;g.length>0&&pl(g).end>=ye;)g.pop();g.push({start:ye,end:Te})}(he,Q-1),a.push(Yy(e,t,he,Q-1)),R.length===0&&L.push(new sn(he,he,Q-1,Q-1,qr[t]))}K=Math.min(K,R.length)}if(!se){for(let he=K;he<R.length;he++)R[he].collapsed=!1;K=R.length}W=oe}if(!await Vr(this._getBridges(),L,e))return this.fail();for(let{start:Q,end:oe}of g)a.push(Wl(e,!1,t,Q,oe));return this.execCompound(async()=>a),this.done()}async applyNote(e,t,r){if(!this._getWorkbook().hasSheet(e)||!t||!await Vr(this._getBridges(),t,e))return this.fail();let i=[];return t.forAll((a,g)=>{i.push([a,g,r])}),await this._recordSels(async()=>{await this.execCommand(Vy(e,i))}),this.done()}async removeNote(e,t){if(!this._getWorkbook().hasSheet(e)||t.length===0||!await Vr(this._getBridges(),t,e))return this.fail();let r=[];return await Pp(t,(i,a)=>Array(a.row-i.row+1).fill([]),(i,a)=>{r.push([i,a,""])},async(i,a)=>await this.dataBridge.getFilteredRows(e,i,a)),await this._recordSels(async()=>{await this.execCommand(Vy(e,r))}),this.done()}async sort(e,t,r,i){if(!this._getWorkbook().hasSheet(e)||!t||!await Vr(this._getBridges(),t,e))return this.fail();let a=await this.dataBridge.getMergedOverlap(e,[t]),g=(L,W)=>{let K=a.filter(L);return K.length>0&&(this.getUIBridge().onAlert(W,[K.map(Q=>nr.toLabel(Q))]),!0)};if(g(L=>L.getHeight()>1,en.SORT_MERGED)||g(L=>L.from.col<t.from.col||L.to.col>t.to.col,en.SORT_PARTIAL_MERGED))return this.fail();let R=await this.dataBridge.getRowOrder(e,t,r,i);return R?(await this._getDataBridge().listPivotTableLocations(e)).some(L=>{let{location:W}=L;return Bp(W,[t])!==Dh.none})?this.fail(en.PIVOT_TABLE_MODIFY_PARTIAL):(await this._recordSels(async()=>{let{rowOrder:L,range:W}=R;L.length>0&&await this.execCommand(Gy(e,L,W))}),this.done()):this.fail()}_getNormalizedDataRange(e,t){let r=this._getWorkbook().getCurrentSheet().getMergePlugin(),i=e.clone().normalize();if(t){let a=i.clone();if(a.to.row=a.from.row,r.expandSelection(a),i.from.row=a.normalize().to.row+1,i.from.row>i.to.row)return null}return i}_getAlignedCellSize(e){let t=this._getWorkbook().getCurrentSheet().getMergePlugin(),[r,i,a,g]=e.toArray(),R=1,L=1,W=t.getOverlap(e);if(W.length>0){R=W[0].getWidth(),L=W[0].getHeight();for(let K=r;K<=a;K+=L)for(let Q=i;Q<=g;Q+=R){let oe=new sn(K,Q,K,Q),se=t.expandSelection(oe);if(se.getHeight()!==L||se.getWidth()!==R)return null}}return[L,R]}getRemoveDuplicatesRanges(){let e=this.hot?.selections.multiSelections.getMultiRange()??[];if(e.length>1)return void this.fail(en.REMOVE_DUP_MULTI_RANGE);if(e.length<1)return void this.fail(en.REMOVE_DUP_NO_DATA);let t=e[0].clone().normalize(),[r,i]=this._getAlignedCellSize(t)||[];if(r===void 0)return void this.fail(en.REMOVE_DUP_NOT_ALIGNED);let a=this._getWorkbook().getCurrentSheet(),g=t.getHeight()/r==1,R=t.getWidth()/i==1,L=a.isEmptyRange(t);if(g||L){let W=sn.fromArray(a.getNonEmptyNeighborRange(t.toArray()));return W.isEqual(t)?void this.fail(L?en.REMOVE_DUP_NO_DATA:en.REMOVE_DUP_ONE_ROW):(this.hot?.selectCell(...W.toArray(),!1),this.getRemoveDuplicatesRanges())}if(R&&!L){let W=sn.fromArray(a.getNonEmptyNeighborRange(t.toArray()));if(!W.isEqual(t))return{range:t,suggestRange:W}}return{range:t}}getRemoveDuplicatesResult(e,t,r){r===void 0&&(r=!1);let i=this._getNormalizedDataRange(e,r),[a,g]=this._getAlignedCellSize(i)||[];if(a===void 0)return{error:{message:en.REMOVE_DUP_NOT_ALIGNED}};let R=this._getWorkbook().getCurrentSheet().getRangeTexts(i,{rowStep:a,colStep:g});g>1&&(t=t.filter((he,me)=>me%g==0));let L=function(he,me){let ye=he.map(Oe=>Oe.filter((ze,We)=>me[We])),Te=Ar.findUnique(ye),Me=[];for(let Oe=0;Oe<ye.length;Oe++)Te[Oe]&&Me.push(Oe);return Me}(R,t),W=L.length,K=R.length-W,Q=R.map(he=>he.some(me=>me)).lastIndexOf(!0),oe=Q===-1?R.length:Q+1,se=L.filter(he=>he<oe).length;return{dataRange:i,remainRows:L,remainCount:W,deletedCount:K,dataCount:oe,remainDataCount:se,cellHeight:a,cellWidth:g}}async removeDuplicates(e,t,r){r===void 0&&(r=!1);let{error:i,dataRange:a,remainRows:g,remainCount:R,deletedCount:L,dataCount:W,remainDataCount:K,cellHeight:Q}=this.getRemoveDuplicatesResult(e,t,r),oe=this._getWorkbook().getCurrentSheet(),se=oe.sheetId;if(i||!await Vr(this._getBridges(),a,se))return this.fail(i?.message);if((await this._getDataBridge().listPivotTableLocations(se)).some(We=>{let{location:qe}=We;return Bp(qe,[a])!==Dh.none}))return this.fail(en.PIVOT_TABLE_MODIFY_PARTIAL);let[he,me,ye,Te]=a.toArray(),Me=L>0?sn.fromArray([he+R*Q,me,ye,Te]):null,Oe=[],ze=new Set(a.listRows());return g.forEach((We,qe)=>{let Ke=he+We*Q,at=he+qe*Q,gt=sn.fromArray([Ke,me,Ke+Q-1,Te]),pt=sn.fromArray([at,me,at+Q-1,Te]);gt.listRows().forEach(Tt=>ze.delete(Tt)),We!==qe&&Oe.push([gt,pt])}),Array.from(ze).some(We=>oe.isHiddenRow(We))&&!await this.getUIBridge().onConfirm(en.REMOVE_DUP_HIDDEN_ROW).catch(()=>!1)?this.fail():(await this.execCompound(()=>{let We=[],qe=oe.sheetId;for(let[Ke,at]of Oe)We.push(JV(qe,Ke,at,!1));return Me&&We.push(Kf(qe,Me,!1,void 0),Bd(qe,Me,void 0)),We}),this.getUIBridge().onMessage(en.REMOVE_DUP_DONE,[(W-K)*Q,K*Q]),this.done())}async createValidation(e,t,r){if(Array.isArray(r)||(r=[r]),(r=cA(r.map(W=>W.toArray())).map(sn.fromArray)).length===0||!this._getWorkbook().hasSheet(e)||!await Vr(this._getBridges(),r,e))return this.fail();let i=this._getWorkbook().getNameById(e),a=await this._getDataBridge().checkExistValidation(e,t,r),g=[],R=[];for(let W of r){let K=W.getTopLeftCorner(),Q=W.getBottomRightCorner();if(a&&(await this._getDataBridge().getRangeValidId(e,K,Q)).every(se=>se.every(he=>he===a)))continue;let oe=new nr({sheetId:e,shName:i},K,Q,r.type).toLabel();g.push(o_(e,W)),R.push(jA(e,t,oe))}let L=g.concat(R);return L.length===0?this.fail():(await this.execCompound(()=>L),this.done())}async removeValidation(e,t){return this._getWorkbook().hasSheet(e)&&await Vr(this._getBridges(),t,e)?(await this.execCompound(()=>t.map(r=>r?o_(e,r):null).filter(ga)),this.done()):this.fail()}async insertImage(e,t,r){return this._getWorkbook().hasSheet(e)&&await jo(this._getBridges(),[e])?(await this.execCommand(jy(e,t,r)),this.done()):this.fail()}async resizeImage(e,t,r){return this._getWorkbook().hasSheet(e)&&await jo(this._getBridges(),[e])?(await this.execCommand(s_(e,t,r)),this.done()):this.fail()}async removeImage(e,t){return this._getWorkbook().hasSheet(e)&&await jo(this._getBridges(),[e])?(await this.execCommand(l_(e,t)),this.done()):this.fail()}async replaceImage(e,t,r,i){return this._getWorkbook().hasSheet(e)&&await jo(this._getBridges(),[e])?(await this.execCompound(()=>[l_(e,t),jy(e,r,i)]),this.done()):this.fail()}async addCf(e,t){t.id||(t.id=pe());let r=this._getWorkbook();if(!r.hasSheet(e))return this.fail();let i=b$(t,r,e),a=i.ranges.map(g=>nr.createByWorkbook(g,r,e));return await Vr(this._getBridges(),a,e)?(await this._recordSels(async()=>{await this.execCommand(Wy(e,i))}),this.done()):this.fail()}async updateCf(e,t,r){let i=this._getWorkbook();if(!i.hasSheet(e))return this.fail();let a=b$(r,i,e),g=a.ranges.map(L=>nr.createByWorkbook(L,i,e));if(!await Vr(this._getBridges(),g,e))return this.fail();let R=await this.dataBridge.getCfIndexById(e,t);return await this.execCompound(()=>{let L=[];return R>-1?(L.push(Uy(e,t)),a.cfId=t):(a.cfId=pe(),R=void 0),L.push(Wy(e,a,R)),L}),this.done()}async updateCfRanges(e,t,r){let i=this._getWorkbook(),a=await this.dataBridge.getCfJSONById(e,t);return a&&await Vr(this._getBridges(),[...a.ranges.map(g=>nr.createByWorkbook(g,i,e)),...r.map(g=>nr.createByWorkbook(g,i,e))],e)?(await this.execCommand(a_(e,t,r)),this.done()):this.fail()}async reorderCf(e,t,r){let i=this._getWorkbook(),a=await this.dataBridge.getCfJSONById(e,t);return a&&await Vr(this._getBridges(),a.ranges.map(g=>nr.createByWorkbook(g,i,e)),e)?(await this.execCompound(()=>a?[Uy(e,t),Wy(e,a,r)]:[]),this.done()):this.fail()}async removeCf(e,t){let r=this._getWorkbook(),i=await this.dataBridge.getCfJSONById(e,t);return i&&await Vr(this._getBridges(),i.ranges.map(a=>nr.createByWorkbook(a,r,e)),e)?(await this._recordSels(async()=>{await this.execCommand(Uy(e,t))}),this.done()):this.fail()}async insertChart(e,t,r,i){return this._getWorkbook().hasSheet(e)&&await jo(this._getBridges(),[e])?(await this.execCommand(qA(e,t,r,i)),this.done()):this.fail()}async resizeChart(e,t,r){return this._getWorkbook().hasSheet(e)&&await jo(this._getBridges(),[e])?(await this.execCommand(h_(e,t,r)),this.done()):this.fail()}async adjustChart(e,t,r){return this._getWorkbook().hasSheet(e)&&await jo(this._getBridges(),[e])?(await this.execCommand(c_(e,t,r)),this.done()):this.fail()}async setChartConfig(e,t,r,i){return this._getWorkbook().hasSheet(e)&&await jo(this._getBridges(),[e])?(await this.execCommand(d_(e,t,r,i)),this.done()):this.fail()}async removeChart(e,t){return this._getWorkbook().hasSheet(e)&&await jo(this._getBridges(),[e])?(await this.execCommand(u_(e,t)),this.done()):this.fail()}async convertChartToImage(e,t,r){let i=await this.dataBridge.getChartPosition(e,t);return i&&await jo(this._getBridges(),[e])?(await this.execCompound(()=>[u_(e,t),jy(e,r,i)]),this.done()):this.fail()}async replaceAll(e){let t=e.searchNextSheet?this._getWorkbook().getVisibleOrder():[this._getWorkbook().getCurrentSheet().sheetId];try{let r=await this.dataBridge.getReplaceAllChanges(t,e),i=await Promise.all(r.map(a=>{let[g,R]=a;return b9(this._getBridges(),R,g)}));return await Vc(this._getBridges(),i)?(await this.execCompound(()=>r.map(a=>{let[g,R]=a;return mu(g,R,Nn.Edit)})),this.done()):this.fail()}catch{return this.fail()}}async resizeRows(e,t,r){if(!this._getWorkbook().hasSheet(e)||!await Vr(this._getBridges(),t,e))return this.fail();let i=await this.dataBridge.getRowInfo(e),a=Gf(t,"row"),g=this._createResizeChanges(R=>i[R]?.h??null,a,r);return await this.execCompound(()=>g.map(R=>{let{from:L,to:W,size:K}=R;return Hy(e,"row",L,W,K)})),this.done()}async resizeCols(e,t,r){if(!this._getWorkbook().hasSheet(e)||!await Vr(this._getBridges(),t,e))return this.fail();let i=await this.dataBridge.getColInfo(e),a=Gf(t,"col"),g=this._createResizeChanges(R=>i[R]?.w??null,a,r);return await this.execCompound(()=>g.map(R=>{let{from:L,to:W,size:K}=R;return Hy(e,"col",L,W,K)})),this.done()}_createResizeChanges(e,t,r){let i=[];return t.forEach((a,g)=>{let R,L=Array.isArray(r)?r[g]:Array(a.to-a.from+1).fill(r);for(let W=a.from;W<=a.to;W++){let K=L[W-a.from];e(W)!==K&&(R&&W===R.to+1?(R.to++,R.size.push(K)):(R={from:W,to:W,size:[K]},i.push(R)))}}),i}async applyInsertRowCol(e,t,r,i,a){let g=t==="insert_row"?"row":"col",R=this._getWorkbook();if(!this._getWorkbook().hasSheet(e))return this.fail();let L=this.getInsertRowColChanges(r,i,a);if(L.length===0)return this.fail();if(L.reduce((K,Q)=>{let[,oe]=Q;return K+oe},0)>(g==="row"?R.getAvailableRowCount(e):R.getAvailableColCount(e)))return this.fail(en.EXCEED_CELL_QUOTA);let W=await Promise.all(L.map(K=>{let[Q]=K;return this._checkInsertable(e,g,Q)}));return W.every(K=>{let{result:Q}=K;return Q})?(await this.execCompound(()=>L.reverse().map(K=>{let[Q,oe,se]=K;return[KV(e,g,Q,oe),Gp(e,g,Q,oe,se)]}).flat()),this.done({resetCopySelection:!1})):this.fail(W.find(K=>{let{reason:Q}=K;return Q}).reason)}getInsertRowColChanges(e,t,r){e=Ph(e),t=Ph(t),r=Ph(r);let i=Math.max(e.length,t.length,r.length);if(i>1&&(e.length===1&&(e=Array(i).fill(e[0])),t.length===1&&(t=Array(i).fill(t[0])),r.length===1&&(r=Array(i).fill(r[0])),e.length!==i||t.length!==i||r.length!==i))return[];let a=new Map;for(let g=0;g<i;g++){let R=e[g];a.has(R)?a.get(R).amount+=t[g]:a.set(R,{amount:t[g],refIndex:r[g]})}return Array.from(a.keys()).sort((g,R)=>g-R).map(g=>{let R=a.get(g);return[g,R.amount,R.refIndex]})}async _checkInsertable(e,t,r){if(!await Hoe(this._getBridges(),e,t,r))return{result:!1};if(r>0){let{rowCount:i,colCount:a}=await this._getDataBridge().getSheetDimension(e),g=await this._getDataBridge().listPivotTableLocations(e),R=new sn(0,0,i-1,a-1);if(R.to[t]=r-1,No([R],g).partial.length>0)return{result:!1,reason:en.PIVOT_TABLE_INSERT_AMONG}}return{result:!0}}async removeRowColByRanges(e,t,r){let i;if(r.length===0||!this._getWorkbook().hasSheet(e)||!await Vr(this._getBridges(),r,e))return this.fail();let a=this._getDataBridge(),{rowCount:g,colCount:R}=await a.getSheetDimension(e),L=[],W=t==="remove_row";if(W){let se=await a.getRowInfo(e),he=await a.getFilteredRows(e,0,g-1);if(um(i=AC(r,"row",me=>!he[me]),me=>se[me]?.hidden??!1,g))return this.fail(en.REMOVE_ALL_ROW);L=i.map(me=>new sn(me.from,0,me.to,R-1))}else{let se=await a.getColInfo(e);if(um(i=Gf(r,"col"),he=>se[he]?.hidden??!1,R))return this.fail(en.REMOVE_ALL_COL);L=i.map(he=>new sn(0,he.from,g-1,he.to))}let{full:K,partial:Q}=No(L,await a.listPivotTableLocations(e));if(Q.length>0)return this.fail(en.PIVOT_TABLE_REMOVE_PARTIAL);let oe=W?"row":"col";return await this.execCompound(()=>{let se=K.map(he=>{let{id:me}=he;return Zu(me)});for(let he=i.length-1;he>=0;he--){let{from:me,to:ye}=i[he],Te=ye-me+1;se.push(XV(e,oe,me,Te),e_(e,oe,me,Te))}return se}),this.done({resetCopySelection:!1})}async createDefinedName(e,t,r){return await this._recordSels(async()=>{await this.execCommand(eM(e,t,r))}),this.done()}async removeDefinedName(e,t){return await this._recordSels(async()=>{await this.execCommand(tM(e,t))}),this.done()}async modifyDefinedName(e,t,r){return await this._recordSels(async()=>{await this.execCommand(v_(e,t,r))}),this.done()}async createRule(e){e.ruleId=pe();let t=nM(e);return await C9(this._getBridges(),t)?(await this._recordSels(async()=>{await this.execCommand(t)}),this.done()):this.fail()}async updateRule(e,t){let r=Xy(e,t);return await C9(this._getBridges(),r)?(await this._recordSels(async()=>{await this.execCommand(Xy(e,t))}),this.done()):this.fail()}async deleteRule(e){let t=rM(e);return await this._getDataBridge().validateRuleCommand(t,this._getUserInfo())===em.NOTHING&&await this.getUIBridge().onConfirm(en.PROTECTION_DELETE)?(await this._recordSels(async()=>{await this.execCommand(t)}),this.done()):this.fail()}async moveRow(e,t,r,i,a){if(!this._getWorkbook().hasSheet(e))return this.fail();let g=this._getDataBridge(),R=await g.checkMoveEnable(e,"row",t,r,i,a);if(R)return this.fail(R);let L=new sn(t,-1,t+r-1,-1,qr.row),W=t+r+i;if(!await Vc(this._getBridges(),[await pm(this._getBridges(),L,e),await YM(this._getBridges(),e,"row",W)]))return this.fail();let K=await g.listPivotTableLocations(e),{colCount:Q}=await g.getSheetDimension(e);return No([new sn(t,0,t+r-1,Q-1)],K).partial.length>0||No([new sn(t+r,0,W-1,Q-1)],K).partial.length>0?this.fail(en.PIVOT_TABLE_MOVE_PARTIAL):(await this.execCompound(()=>[YA(e,"row",t,r,i,a),jp(e,"row",t,r,i,a)]),this.done())}async moveCol(e,t,r,i,a){if(!this._getWorkbook().hasSheet(e))return this.fail();let g=this._getDataBridge(),R=await g.checkMoveEnable(e,"col",t,r,i,a);if(R)return this.fail(R);let L=new sn(-1,t,-1,t+r-1,qr.col),W=t+r+i;if(!await Vc(this._getBridges(),[await pm(this._getBridges(),L,e),await YM(this._getBridges(),e,"col",W)]))return this.fail();let K=await g.listPivotTableLocations(e),{rowCount:Q}=await g.getSheetDimension(e);return No([new sn(0,t,Q-1,t+r-1)],K).partial.length>0||No([new sn(0,t+r,Q-1,W-1)],K).partial.length>0?this.fail(en.PIVOT_TABLE_MOVE_PARTIAL):(await this.execCompound(()=>[YA(e,"col",t,r,i,a),jp(e,"col",t,r,i,a)]),this.done())}async removeRanges(e,t){if(!this._getWorkbook().hasSheet(e)||!await Vc(this._getBridges(),await pm(this._getBridges(),t,e)))return this.fail();let r=this._getDataBridge(),i=await r.listPivotTableLocations(e),{full:a,partial:g}=No(t,i);if(g.length>0)return this.fail(en.PIVOT_TABLE_REMOVE_PARTIAL);for(let{location:he}of a)t=function(me,ye){for(let Te of Ay(ye))me=As(me,Te).newRanges;return me}(t,he);let R=await r.getMergedOverlap(e,t),L=Math.min(...R.map(he=>he.from.row)),W=Math.max(...R.map(he=>he.to.row)),K=await r.getFilteredRows(e,L,W);if(R.some(he=>K[he.from.row-L]))return this.fail(en.CANNOT_ACTION_ON_MERGE_CELL);let Q=[],oe=[];await Pp(t,(he,me)=>r.getRangeHyperlink(e,he,me),(he,me,ye)=>{ye&&oe.push(qy(e,ye.id)),Q.push([he,me,null])},(he,me)=>r.getFilteredRows(e,he,me));let se=a.map(he=>{let{id:me}=he;return Zu(me)}).concat([zA(e,Q)]).concat(oe);return await this.execCompound(()=>se),this.done()}async _getMoveAutofillData(e,t,r,i){let a=this._getDataBridge(),g=await a.getAutofillObject(e,t.getTopLeftCorner(),t.getBottomRightCorner(),LV,"down",!1,Nn.Cut),{mergedBorders:R,mergeRangeChanges:L}=await a.getMergedCellFormatChanges(r,i,g);return g.mergedBorders=R,g.mergeRanges=L,e===r&&g&&g.format&&(delete g.format.defaultColWidth,delete g.format.defaultRowHeight),g}_createMoveActionCommands(e,t,r,i,a,g,R,L){g===void 0&&(g=[]),L===void 0&&(L=!1);let W=this._createMoveActionCommandsBySteps(e,t,r,i,a,R,L);return[...W.clear,...g,...W.fillData,...W.moveFormula]}_createMoveActionCommandsBySteps(e,t,r,i,a,g,R){return R===void 0&&(R=!1),g??=e===r?As([t],i).newRanges:[],{clear:[Kf(e,t),...g.map(L=>Bd(e,L))],fillData:[UA(r,i,a,!1,Nn.Cut)],moveFormula:[Xf(e,t,r,i,R)]}}async moveRange(e,t,r,i,a){a===void 0&&(a=!1);let g=this._getDataBridge(),R=g.getWorkbook();if(!R.hasSheet(e)||!R.hasSheet(r))return this.fail();let L=[await pm(this._getBridges(),t,e),await pm(this._getBridges(),i,r)];if(!await Vc(this._getBridges(),L))return this.fail();if(!R.isDimensionAvailable(r,i.to.row+1,i.to.col+1))return this.fail(en.EXCEED_CELL_QUOTA);let W=await this._getMoveAutofillData(e,t,r,i),K=await t1(g,r,W.mergeRanges?.map(qe=>{let[Ke]=qe;return oa(...Ke)}));if(K)return this.fail(K);let Q=await g.listPivotTableLocations(e),{full:oe,partial:se}=No([t],Q);if(se.length>0)return this.fail(en.PIVOT_TABLE_MOVE_PARTIAL);if(a){let qe=await this.dataBridge.getRangeData(e,i.from,i.to),Ke=!1;for(let{row:at,col:gt}of i.iterateCoords())if(!t.includes({row:at,col:gt})&&qe[at-i.from.row][gt-i.from.col]){Ke=!0;break}if(Ke&&!await this.getUIBridge().onConfirm(en.MOVE_OVERWRITE_CELL))return this.fail()}let he={row:i.from.row-t.from.row,col:i.from.col-t.from.col},me=oe.map(qe=>{let{location:Ke}=qe;return Ay(Ke)}).flat(),ye=[t];for(let qe of me)ye=As(ye,qe).newRanges;let Te=[i];e===r&&({newRanges:ye}=As(ye,i),Te=As(Te,t).newRanges);let{full:Me,partial:Oe}=No(Te,e===r?Q:await g.listPivotTableLocations(r));if(Oe.length>0)return this.fail(en.PIVOT_TABLE_REMOVE_PARTIAL);let ze=this._createMovePivotTableCommands(oe,r,he),We=Me.map(qe=>{let{id:Ke}=qe;return Zu(Ke)}).concat(this._createMoveActionCommands(e,t,r,i,W,ze,ye));return await this.execCompound(()=>We,{ranges:[i.toArray()],activeIndex:0}),this.done()}async pasteRange(e,t,r,i){i===void 0&&(i=[]);let a=this._getDataBridge(),g=this._getWorkbook();if(!this._getWorkbook().hasSheet(e)||!await Vr(this._getBridges(),t,e))return this.fail();if(!g.isDimensionAvailable(e,t.to.row+1,t.to.col+1))return this.fail(en.EXCEED_CELL_QUOTA);let{mergedBorders:R,mergeRangeChanges:L}=await this.dataBridge.getMergedCellFormatChanges(e,t,r),W=await t1(a,e,L?.map(oe=>{let[se]=oe;return oa(...se)}));if(W)return this.fail(W);r.mergedBorders=R,r.mergeRanges=L;let{full:K,partial:Q}=No([t],await a.listPivotTableLocations(e));return Q.length>0?this.fail(en.PIVOT_TABLE_REMOVE_PARTIAL):(await this.execCompound(()=>[...K.map(oe=>{let{id:se}=oe;return Zu(se)}),...i.map(oe=>{let{tableJson:se,cacheJson:he}=oe;return Jf(se,he)}),UA(e,t,r)],{ranges:[t.toArray()],activeIndex:0}),this.done({resetCopySelection:!1}))}async _insertCellsOneRange(e,t,r){let i=this._getWorkbook();if(!this._getWorkbook().hasSheet(e)||!t)return this.fail();let{rowCount:a,colCount:g}=await this.dataBridge.getSheetDimension(e);t=t.clone().normalize();let R=r==="right"?"col":"row",L=R==="col"?g:a,W=R==="col"?t.getWidth():t.getHeight(),K=t.clone();K.to[R]=L-1;let Q=K.clone().shift(R,W),oe=K.clone();if(oe.to[R]=oe.from[R],!await Vr(this._getBridges(),K,e))return this.fail();let se=this.dataBridge;if(await se.checkIncompleteMergedCells(e,K))return this.fail(en.MOVE_MERGE_CELL);if(!i.isDimensionAvailable(e,Q.to.row+1,Q.to.col+1))return this.fail(en.EXCEED_CELL_QUOTA);let{full:he,partial:me}=No([K],await se.listPivotTableLocations(e));if(me.length>0)return this.fail(en.PIVOT_TABLE_MOVE_PARTIAL);let ye=await this._getMoveAutofillData(e,K,e,Q),Te=this._createMovePivotTableCommands(he,e,{[R]:W}),Me=this._createMoveActionCommands(e,K,e,Q,ye,Te);return await this.execCompound(()=>Me),this.done()}async insertCells(e,t,r){if(Array.isArray(t)||(t=[t]),t.length===1)return this._insertCellsOneRange(e,t[0],r);let i=this._getWorkbook();if(!i.hasSheet(e)||TC(t))return this.fail();let a=this._getDataBridge(),{rowCount:g,colCount:R}=await a.getSheetDimension(e),L=r==="right"?"col":"row",W=L==="col"?R:g,K=(t=t.map(We=>We.clone().normalize())).map(We=>{let qe=We.getSize(L),Ke=We.clone();Ke.to[L]=W-1;let at=Ke.clone().shift(L,qe);return{selectRange:We,srcRange:Ke,dstRange:at}}).map(We=>{let{srcRange:qe}=We;return qe});if(!await Vr(this._getBridges(),K,e))return this.fail();if(await this.hasCrossingMergeCells(e,K))return this.fail(en.MOVE_MERGE_CELL);let Q=this.getRangeMovementsOnInsertion(L,t,W),oe=Q.reduce((We,qe)=>{let{dstRange:Ke}=qe;return We.rowCount=Math.max(We.rowCount,Ke.to.row+1),We.colCount=Math.max(We.colCount,Ke.to.col+1),We},{rowCount:g,colCount:R});if(!i.isDimensionAvailable(e,oe.rowCount,oe.colCount))return this.fail(en.EXCEED_CELL_QUOTA);let se=[],he=[];for(let{srcRange:We,dstRange:qe}of Q){let Ke=await this._getMoveAutofillData(e,We,e,qe),at=this._createMoveActionCommandsBySteps(e,We,e,qe,Ke);se.push(at.clear),he.push(at.fillData)}let me=await a.listPivotTableLocations(e),ye=new Map;for(let We=0;We<t.length;We++){let{full:qe,partial:Ke}=No([K[We]],me);if(Ke.length>0)return this.fail(en.PIVOT_TABLE_MOVE_PARTIAL);let at=t[We].getSize(L);for(let gt of qe){let{id:pt}=gt,Tt=ye.get(pt);Tt?Tt.amount+=at:ye.set(pt,{table:gt,amount:at})}}let Te=[],Me=[];for(let{table:We,amount:qe}of ye.values())Te.push(We),Me.push({[L]:qe});let Oe=this._createMovePivotTableCommands(Te,e,Me),ze=[];for(let We of t.slice().sort((qe,Ke)=>Ke.from[L]-qe.from[L])){let qe=We.getSize(L),Ke=We.clone().normalize();Ke.to[L]=W-1;let at=Ke.clone().shift(L,qe);ze.push(Xf(e,Ke,e,at,!1))}return await this.execCompound(()=>[...se.flat(),...Oe.flat(),...he.flat(),...ze]),this.done()}getRangeMovementsOnInsertion(e,t,r){if(t.length===0)return[];let i=e==="row"?"col":"row",a=t.map(oe=>({from:oe.from[i],to:oe.to[i],index:oe.from[e],amount:oe.getSize(e)})),g={ADD:1,DEL:0},R=a.map(oe=>[{type:g.ADD,cutAt:oe.from,index:oe.index,insertion:oe},{type:g.DEL,cutAt:oe.to+1,index:oe.index,insertion:oe}]).flat().sort((oe,se)=>oe.cutAt-se.cutAt||oe.type-se.type),L=[],W={},K=0;for(let oe of R){let{type:se,cutAt:he,index:me,insertion:ye}=oe;he!==K&&(L.push({from:K,to:he-1,insertions:Array.from(Object.values(W))}),K=he),se===g.ADD?W[me]=ye:delete W[me]}let Q=[];for(let oe of L){let se=0,he=oe.from,me=oe.to;for(let ye=0;ye<oe.insertions.length;ye++){let Te=oe.insertions[ye];se+=Te.amount;let Me=ye===oe.insertions.length-1?r-1:oe.insertions[ye+1].index-1,Oe=sn.fromRange({from:{[e]:Te.index,[i]:he},to:{[e]:Me,[i]:me}}),ze=Oe.clone().shift(e,se);Q.push({srcRange:Oe,dstRange:ze})}}return Q}async removeCellsOneRange(e,t,r){if(!this._getWorkbook().hasSheet(e)||!t)return this.fail();let i=this._getDataBridge(),{rowCount:a,colCount:g}=await i.getSheetDimension(e),R=r==="left"?"col":"row",L=R==="col"?g:a,W=R==="col"?t.getWidth():t.getHeight(),K=t.clone().normalize(),Q=K.clone(),oe=K.clone(),se=null,he=K.to[R]<L-1;if(he&&(Q.from[R]=K.to[R]+1,Q.to[R]=L-1,oe.to[R]=L-1-W,oe.to[R]+1<=Q.from[R]-1&&((se=K.clone()).from[R]=oe.to[R]+1,se.to[R]=Q.from[R]-1)),!await Vr(this._getBridges(),he?[K,Q]:K,e))return this.fail();if(await i.checkIncompleteMergedCells(e,K)||he&&await i.checkIncompleteMergedCells(e,Q))return this.fail(en.MOVE_MERGE_CELL);let me=await i.listPivotTableLocations(e),{full:ye,partial:Te}=No([K],me);if(Te.length>0)return this.fail(en.PIVOT_TABLE_REMOVE_PARTIAL);let Me=[];if(he){let{full:ze,partial:We}=No([Q],me);if(We.length>0)return this.fail(en.PIVOT_TABLE_MOVE_PARTIAL);Me=ze}let Oe=ye.map(ze=>{let{id:We}=ze;return Zu(We)});if(he){let ze=await this._getMoveAutofillData(e,Q,e,oe),We=[...se?[Kf(e,se,!0,void 0),Bd(e,se,void 0)]:[],...this._createMovePivotTableCommands(Me,e,{[R]:-W})];Oe.push(...this._createMoveActionCommands(e,Q,e,oe,ze,We,void 0,!0))}else Oe.push(Kf(e,K,!0,void 0),Bd(e,K,void 0),qp(e,K,void 0));return await this.execCompound(()=>Oe),this.done()}async removeCells(e,t,r){if(Array.isArray(t)||(t=[t]),t.length===1)return this.removeCellsOneRange(e,t[0],r);if(!this._getWorkbook().hasSheet(e)||TC(t))return this.fail();let i=this._getDataBridge(),{rowCount:a,colCount:g}=await i.getSheetDimension(e),R=r==="left"?"col":"row",L=R==="col"?g:a,W=(t=t.map(Ke=>Ke.clone().normalize())).map(Ke=>{let at=Ke.getSize(R),gt=Ke.to[R]<L-1,pt=gt?Ke.clone():null;pt&&(pt.from[R]=Ke.to[R]+1,pt.to[R]=L-1);let Tt=gt?pt.clone().shift(R,-at):null,jt=gt&&Tt.to[R]+1<=pt.from[R]-1?pt.clone():null;return jt&&(jt.from[R]=Tt.to[R]+1,jt.to[R]=pt.from[R]-1),{selectRange:Ke,srcRange:pt,dstRange:Tt,betweenRange:jt}}),K=W.map(Ke=>{let{srcRange:at}=Ke;return at}).filter(ga),Q=t.concat(K);if(!await Vr(this._getBridges(),Q,e))return this.fail();if(await this.hasCrossingMergeCells(e,Q))return this.fail(en.MOVE_MERGE_CELL);let oe=await i.listPivotTableLocations(e),se=new Map;for(let{selectRange:Ke,srcRange:at}of W){let gt=No([Ke],oe);if(gt.partial.length>0)return this.fail(en.PIVOT_TABLE_REMOVE_PARTIAL);for(let jt of gt.full){let{id:on}=jt,hn=se.get(on);hn?hn.remove=!0:se.set(on,{table:jt,shift:0,remove:!0})}if(!at)continue;let pt=No([at],oe);if(pt.partial.length>0)return this.fail(en.PIVOT_TABLE_MOVE_PARTIAL);let Tt=Ke.getSize(R);for(let jt of pt.full){let{id:on}=jt,hn=se.get(on);hn?hn.shift+=Tt:se.set(on,{table:jt,shift:Tt,remove:!1})}}let he=[],me=[],ye=[];for(let{table:Ke,shift:at,remove:gt}of se.values())gt?he.push(Ke):(me.push(Ke),ye.push({[R]:-at}));let Te=he.map(Ke=>{let{id:at}=Ke;return Zu(at)}),Me=this._createMovePivotTableCommands(me,e,ye),Oe=this.getRangeMovementsOnRemoval(R,t,L),ze=[],We=[];for(let{srcRange:Ke,dstRange:at}of Oe)if(at){let gt=await this._getMoveAutofillData(e,Ke,e,at),pt=this._createMoveActionCommandsBySteps(e,Ke,e,at,gt);ze.push(pt.clear),We.push(pt.fillData)}else ze.push(Kf(e,Ke,!0,void 0),Bd(e,Ke,void 0));let qe=[];for(let{selectRange:Ke,srcRange:at,dstRange:gt}of W.slice().sort((pt,Tt)=>Tt.selectRange.to[R]-pt.selectRange.to[R]))at?qe.push(Xf(e,at,e,gt,!0)):qe.push(qp(e,Ke,void 0));return await this.execCompound(()=>[...Te.flat(),...ze.flat(),...Me.flat(),...We.flat(),...qe]),this.done()}getRangeMovementsOnRemoval(e,t,r){if(t.length===0)return[];let i=e==="row"?"col":"row",a=t.map(oe=>({from:oe.from[i],to:oe.to[i],index:oe.from[e],amount:oe.getSize(e)})),g={ADD:1,DEL:0},R=a.map(oe=>[{type:g.ADD,cutAt:oe.from,index:oe.index,removal:oe},{type:g.DEL,cutAt:oe.to+1,index:oe.index,removal:oe}]).flat().sort((oe,se)=>oe.cutAt-se.cutAt||oe.type-se.type),L=[],W={},K=0;for(let oe of R){let{type:se,cutAt:he,index:me,removal:ye}=oe;he!==K&&(L.push({from:K,to:he-1,removals:Array.from(Object.values(W))}),K=he),se===g.ADD?W[me]=ye:delete W[me]}let Q=[];for(let oe of L){let se=0,he=0,me=oe.from,ye=oe.to;for(let Te=0;Te<oe.removals.length;Te++){let Me=oe.removals[Te];se+=Me.amount;let Oe=Me.index+Me.amount,ze=Te===oe.removals.length-1?r-1:oe.removals[Te+1].index-1;if(Oe>ze)continue;let We=sn.fromRange({from:{[e]:Oe,[i]:me},to:{[e]:ze,[i]:ye}}),qe=We.clone().shift(e,-se);he=qe.to[e],Q.push({srcRange:We,dstRange:qe})}for(let Te=0;Te<oe.removals.length;Te++){let Me=oe.removals[Te],Oe=Math.max(Me.index,he+1),ze=Me.index+Me.amount-1;if(Oe>ze)continue;let We=sn.fromRange({from:{[e]:Oe,[i]:me},to:{[e]:ze,[i]:ye}});Q.push({srcRange:We})}}return Q}_checkFilterRange(e){if(!e||e.isSingle())return en.FILTER_AT_LEAST_TWO}async autofill(e,t,r,i,a){let g=new sn(t.row,t.col,r.row,r.col);if(!this._getWorkbook().hasSheet(e)||!await Vr(this._getBridges(),g,e)||!(t&&t.row>-1&&t.col>-1))return this.fail();let{full:R,partial:L}=No([g],await this._getDataBridge().listPivotTableLocations(e));if(L.length>0)return this.fail(en.PIVOT_TABLE_REMOVE_PARTIAL);let W=await this.dataBridge.getAutofillObject(e,i.getTopLeftCorner(),i.getBottomRightCorner(),["data","format","validation","cf","hyperlink"],a,!0);if(W.mergeRanges=(await this.dataBridge.getMergedCellFormatChanges(e,g,W))?.mergeRangeChanges,W.mergeRanges)for(let[K]of W.mergeRanges){let Q=oa(...K),oe=await t1(this.dataBridge,e,[Q])??await _9(this.dataBridge,e,[Q]);if(oe)return this.fail(oe)}return await this.execCompound(()=>[...R.map(K=>{let{id:Q}=K;return Zu(Q)}),WA(e,new sn(t.row,t.col,r.row,r.col),W,a,Nn.Autofill)]),this.done()}async splitTextOfRange(e,t){if(e?.getWidth()!==1)return this.fail();e=e.clone().normalize();let r=this._getWorkbook().getCurrentSheet();if(!r)return this.fail();let i=r.sheetId,a=(await this.dataBridge.getRangeRenderedTexts(i,e.from,e.to)).map(he=>he[0]);if(a.length===0)return this.fail();let g=a.map(he=>function(me,ye){let Te=ye.delimiters||[","],Me=ye.trimWhitespaces??!0,Oe=ye.consecutiveAsOne??!1,ze=fe('"'),We="("+Te.map(un=>fe(un)).join("|")+")",qe=`(?!${We})`,Ke=`(${qe}.)`,at=`${qe}${ze}([^${ze}]|(${ze}${ze}))*(${ze}|$)`,gt=Oe?"+":"",pt=Me?`(${qe}\\s)*`:"",Tt=RegExp(`^$|(${We}${gt})|((${pt}${at}${Ke}*)|${Ke}+)`,"gs"),jt=me.match(Tt)||[],on=un=>!!un.match(RegExp(`^${We}${gt}$`,"s")),hn=[];for(let un=0;un<jt.length;un++){let an=jt[un],Ut=jt[un-1];if(on(an))(Ut===void 0||on(Ut))&&hn.push("");else{let kt=function(Pt,mn){if(Pt[0]!=='"')return Pt;let Zt=[],dn=!0,fn=!1;for(let er of Pt.slice(1))dn?er==='"'?fn?(Zt.push(mn),fn=!1):fn=!0:(fn&&(dn=!1),Zt.push(er)):Zt.push(er);return Zt.join("")}(Me?an.trim():an,'"');hn.push(kt)}}return on(jt[jt.length-1])&&hn.push(""),hn}(he,t)),R=du(g.map(he=>he.length));g.forEach(he=>{he.length=R});let L=new sn(e.from.row,e.from.col,e.to.row,e.from.col+R-1),W=this.hot?.getMultiSelectedRange().map(he=>he.toArray())??[];if(this.hot?.selectRanges([L.toArray()]),!await Vr(this._getBridges(),L,i))return this.hot?.selectRanges(W),this.fail();if((await this._getDataBridge().listPivotTableLocations(i)).some(he=>{let{location:me}=he;return Bp(me,[L])!==Dh.none}))return this.fail(en.PIVOT_TABLE_MODIFY_PARTIAL);if((await this._getDataBridge().getRangeData(i,{row:L.from.row,col:L.from.col+1},L.to)).some(he=>he.some(me=>me))&&!await this.getUIBridge().onConfirm(en.MOVE_OVERWRITE_CELL))return this.fail();let K=r.getWorkbook().getLocale().getInputParser(),Q=[],oe=[];for(let he of g){let me=Array(he.length),ye=Array(he.length);Q.push(me),oe.push(ye);for(let Te=0;Te<he.length;Te++){let Me=K.parse(he[Te]);Me?(me[Te]=Me.fc??"General",ye[Te]=Me.v):(me[Te]="General",ye[Te]=he[Te])}}let se=(await this.dataBridge.getAutofillObject(r.sheetId,e.from,e.to,["format"],"down",!0))?.format;return se?(delete se.colWidth,await this.execCompound(()=>{let he=r.sheetId;return[n_(he,L),WA(he,L,{format:se,data:oe}),WV(he,L,Q)]}),this.done()):this.fail()}async setSheetRtl(e,t){return await jo(this._getBridges(),[e])?(await this.execCommand(g_(e,t)),this.done()):this.fail()}async createComment(e,t){return await this._recordSels(async()=>{await this.execCommand(ZV(e,t))}),this.done()}async replyComment(e,t){return await this._recordSels(async()=>{await this.execCommand(QV(e,t))}),this.done()}async reopenComment(e,t){return await this._recordSels(async()=>{await this.execCommand(ZA(e,t.target,t.authorName,!0))}),this.done()}async resolveComment(e,t){return await this._recordSels(async()=>{await this.execCommand(ZA(e,t.target,t.authorName,!1))}),this.done()}async editComment(e,t,r,i){return await this._recordSels(async()=>{await this.execCommand(p_(e,t,r,i))}),this.done()}async updateExternal(e,t){let r=await this._getDataBridge().calculateExternalChanges(e,t);r&&await this.execCommand(m_([[e,r]]))}async unlinkExternal(e){let t=await this._getDataBridge().getUnlinkChanges(e);await this.execCompound(()=>t.map(r=>{let[i,a]=r;return mu(i,a)}))}async removeExternalLinks(e){await this.execCommand(QA(e))}async clearEmptyExternalLinks(){let e=await this._getDataBridge().calculateEmptyRefExternalChanges();await this.execCommand(m_(e))}async _createPivotTableJson(e,t,r){let i=this._getDataBridge(),{cacheContent:a,message:g}=await i.calcPivotCacheContent(e.sheetId,e.range);if(g)return{cacheJson:null,tableJson:null,message:g};let R=await i.calcPivotTableContent(a.fields,e.range.from),L={id:pe(),source:e,...a};return{tableJson:{id:pe(),cacheId:L.id,location:{sheetId:t,coord:r,range:null,pageRanges:[]},styles:{},...R},cacheJson:L,message:null}}_getPivotTableRanges(e){let t=this._getWorkbook().getPivotTableManager().getTableById(e);return(t?J7(t):[]).map(sn.fromRange)}async checkPivotTableCommands(e,t,r){let i=await this._getDataBridge().calcPivotTableNewResult(e,r);if(!i)return null;if(i.message)return await this.pivotTableAlerts(i.message),null;let a=i.ranges.map(sn.fromRange),g=this._getPivotTableRanges(e),R=await this._getDataBridge().checkPivotTableRanges(e,t,g,a,this._getUserInfo());return await this.pivotTableAlerts(R)?{oldRanges:g,newRanges:a}:null}async pivotTableAlerts(e){e=Ph(e);let t=[en.PIVOT_TABLE_TOO_MANY_FIELD,en.PIVOT_TABLE_TOO_MANY_ITEM,en.PIVOT_TABLE_TOO_MANY_CELL,en.PROTECTION_REJECT,en.PIVOT_TABLE_BLOCK_BY_OTHER,en.EXCEED_CELL_QUOTA],r=[en.PROTECTION_WARNING,en.PIVOT_TABLE_OVERWRITE_CELL,en.PIVOT_TABLE_CONVERT_TOO_MANY_RECORD,en.PIVOT_TABLE_CONVERT_TOO_MANY_FIELD,en.PIVOT_TABLE_CONVERT_TOO_MANY_ITEM,en.PIVOT_TABLE_CONVERT_TOO_MANY_CELL];for(let i of t)if(e.includes(i))return await this.getUIBridge().onAlert(i).catch(()=>{}),!1;for(let i of r)if(e.includes(i)&&!await this.getUIBridge().onConfirm(i).catch(()=>!1))return!1;return!0}getActionsToEnsureRangeExist(e,t){let r=0,i=0;for(let K of t)r=Math.max(r,K.from.row,K.to.row),i=Math.max(i,K.from.col,K.to.col);let{rowCount:a,colCount:g}=this._getWorkbook().getSheetDimension(e),R=r+1-a,L=i+1-g,W=[];return R>0&&W.push(Gp(e,"row",a,R,a-1)),L>0&&W.push(Gp(e,"col",g,L,g-1)),W}async execPivotCommand(e,t,r){let i=await this.checkPivotTableCommands(t,e,r);if(!i)return!1;let{oldRanges:a,newRanges:g}=i,R=g;for(let K of a)R=As(R,K).newRanges;let L=this.getActionsToEnsureRangeExist(e,g),W=R.map(K=>[Kf(e,K,!0,void 0),Bd(e,K,Nn.RemoveValue)]).flat();return await this.execCompound(()=>[...L,...W,...r]),!0}async _createPivotTable(e,t,r){let{tableJson:i,cacheJson:a,message:g}=await this._createPivotTableJson(e,t,r);if(g)return this.fail(g);let R=[Jf(i,a)];return await this.execPivotCommand(t,null,R)?this.done():this.fail()}async _deletePivotTable(e){let t=this._getWorkbook().getPivotTableManager().getTableById(e);if(!t)return this.fail();let r=t.location.sheetId,i=this._getPivotTableRanges(e),a=await this._getDataBridge().checkPivotTableRanges(e,r,i,[],this._getUserInfo());return await this.pivotTableAlerts(a)?(await this.execCompound(()=>[Zu(e)]),this.done()):this.fail()}async _refreshPivotTableData(e){let t=this._getDataBridge(),r=await t.getPivotTable(e);if(!r)return this.fail();let i=await t.getPivotCache(r.cacheId);if(!i)return this.fail();let{cacheContent:a,message:g}=await t.calcPivotCacheContent(i.source.sheetId,i.source.range,i.id);if(g)return this.fail(g);let R=i.source,L=await t.calcPivotTableContent(a.fields,R.range.from,e),W={id:r.cacheId,source:R,...a},K={...r,rowItems:[],colItems:[],...L},Q=K.location.sheetId,oe=[Yp(K,W)];return await this.execPivotCommand(Q,e,oe)?this.done():this.fail()}async _changePivotTableSource(e,t){let r=this._getDataBridge(),i=await r.getPivotTable(e);if(!i)return this.fail();let a=await r.getPivotCache(i.cacheId);if(!a)return this.fail();let{cacheContent:g,message:R}=await r.calcPivotCacheContent(t.sheetId,t.range,a.id);if(R)return this.fail(R);let L=await r.calcPivotTableContent(g.fields,t.range.from,e),W={id:i.cacheId,source:t,...g},K={...i,rowItems:[],colItems:[],...L},Q=K.location.sheetId,oe=[Yp(K,W)];return await this.execPivotCommand(Q,e,oe)?this.done():this.fail()}createCopiedPivotTableJsons(e,t,r){let{tableJson:i,cacheJson:a}=e,g={...a,id:pe()};return{tableJson:{...i,id:pe(),cacheId:g.id,rowItems:[],colItems:[],location:{sheetId:t,coord:Ep(i.location.coord,r),range:i.location.range&&JE(i.location.range,r),pageRanges:i.location.pageRanges.map(R=>JE(R,r))}},cacheJson:g}}async _clonePivotTable(e,t,r){let i=this._getDataBridge(),a=await i.getPivotTable(e);if(!a)return this.fail();let g=await i.getPivotCache(a.cacheId);if(!g)return this.fail();let R={row:r.row-a.location.coord.row,col:r.col-a.location.coord.col},{tableJson:L,cacheJson:W}=this.createCopiedPivotTableJsons({tableJson:a,cacheJson:g},t,R),K=[Jf(L,W)];return await this.execPivotCommand(t,null,K)?this.done():this.fail()}_createMovePivotTableCommands(e,t,r){if(e.length===0)return[];if(Array.isArray(r)){if(r.length!==e.length)throw Error("The length of shiftOffset should be equal to the length of tables")}else r=Array(e.length).fill(r);let i=t===e[0].location.sheetId,a=e.map((W,K)=>{let{id:Q,location:oe}=W;return Jy(Q,t,Ep(oe.coord,r[K]))}),g=e.map(W=>{let{location:K}=W;return Ay(K)}),R=g.flat(),L=g.map((W,K)=>W.map(Q=>Q.clone().shiftOffset(r[K]))).flat();if(i)for(let W of R)L=As(L,W).newRanges;return L.map(W=>Bd(t,W)).concat(a)}async _movePivotTable(e,t,r){if(!await this._getDataBridge().getPivotTable(e))return this.fail();let a=[Jy(e,t,r)];return await this.execPivotCommand(t,e,a)?this.done():this.fail()}async _convertPivotTableToCompatible(e){let t=this._getDataBridge(),r=await t.checkPivotTableConvertMessages(e);if(!await this.pivotTableAlerts(r))return this.fail();let i=await t.convertIncompatiblePivotTable(e);if(!i)return this.fail();let{table:a,cache:g}=i,R=a.location.sheetId,L=[Yp(a,g)];return await this.execPivotCommand(R,e,L)?this.done():this.fail()}async _setPivotTableCaption(e,t,r){let i=this._getDataBridge(),a=await i.getPivotTable(e);if(!a)return this.fail();let g=J7(a).map(sn.fromRange);return await Vr(this._getBridges(),g,a.location.sheetId)?(await this._recordSels(async()=>{await this.execCommand(y_(e,t,r))}),this.done()):this.fail()}async _movePivotAxisFieldCommand(e,t,r,i){let a=this._getDataBridge(),g=await a.getPivotTable(e);if(!g)return this.fail();let R=g.pivotFields.find(Q=>Q.id===t),L=Number.POSITIVE_INFINITY;if((r==="row"||r==="col")&&R&&R.axis!=="row"&&R.axis!=="col"&&(L=await a.getPivotFieldRemainCount(e))<=0)return this.fail(en.PIVOT_TABLE_TOO_MANY_FIELD);let W=[];if(r==="data")W=[Ld(e,t,null,-1),Zy(e,t,i)];else{W=[Ld(e,t,r,r===null?-1:i)];let Q=await a.getPivotCache(g.cacheId),oe=Q?.fields.find(se=>se.id===t);if(oe?.fromData&&!oe.group&&v9(oe.sharedItems)===wu.datetime&&R?.axis===null&&(r==="row"||r==="col")){let se=function(he){if(he.length<2)return[];function me(Oe){let ze=Bs(za(Oe));return{[Xr.years]:ze.getFullYear(),[Xr.quarters]:ze.getFullYear(),[Xr.months]:ze.getMonth(),[Xr.days]:ze.getDate(),[Xr.hours]:ze.getHours(),[Xr.minutes]:ze.getMinutes(),[Xr.seconds]:ze.getSeconds()}}let ye=new Set,Te=me(he[0]);for(let Oe=1;Oe<he.length;Oe++){let ze=me(he[Oe]);for(let We of bu)Te[We]!==ze[We]&&ye.add(We);if(ye.size===bu.length)break}let Me=[];for(let Oe of bu.slice().reverse()){if(Me.length>2)break;if(ye.has(Oe))Me.push(Oe);else if(Me.length>0)break}return Me}(oe.sharedItems.items.map(he=>he.value).filter(ga));if(Number.isFinite(L)&&se.splice(L),se.length>0){let he=i===g.fields[r].length;W.push(Qy(e,t,i9(se),{default:{axis:r,position:i}},he))}}}let K=g.location.sheetId;return W=W.length>1?[Vh(W)]:W,await this.execPivotCommand(K,e,W)?this.done():this.fail()}async _unusePivotField(e,t){let r=this._getDataBridge(),i=await r.getPivotTable(e),a=i.pivotFields.find(L=>L.id===t);if(!i||!a)return this.fail();let g=[...["row","col","page"].includes(a.axis)?[Ld(e,t,null,-1)]:[],...i.fields.data.filter(L=>L.fieldId===t).map(L=>Kp(e,L.id))],R=i.location.sheetId;return g=g.length>1?[Vh(g)]:g,await this.execPivotCommand(R,e,g)?this.done():this.fail()}async _setPivotTableValuesFieldAxis(e,t){let r=this._getDataBridge(),i=await r.getPivotTable(e);if(!i||i.fields.data.length<=1)return this.fail();let a=[Ld(e,Ds,t,-1)],g=i.location.sheetId;return await this.execPivotCommand(g,e,a)?this.done():this.fail()}async _insertPivotDataFieldCommand(e,t,r,i){let a=this._getDataBridge(),g=await a.getPivotTable(e);if(!g)return this.fail();let R=[Zy(e,t,r,i)],L=g.location.sheetId;return await this.execPivotCommand(L,e,R)?this.done():this.fail()}async _movePivotDataFieldCommand(e,t,r,i){let a=this._getDataBridge(),g=await a.getPivotTable(e),R=g?.fields.data.find(K=>K.id===t);if(!g||!R)return this.fail();let L=[];L=i!==void 0?[Kp(e,t),Ld(e,R.fieldId,i,r)]:[w_(e,t,r)];let W=g.location.sheetId;return L=L.length>1?[Vh(L)]:L,await this.execPivotCommand(W,e,L)?this.done():this.fail()}async _removePivotDataFieldCommand(e,t){let r=this._getDataBridge(),i=await r.getPivotTable(e);if(!i)return this.fail();let a=[Kp(e,t)],g=i.location.sheetId;return await this.execPivotCommand(g,e,a)?this.done():this.fail()}async _setPivotFieldFilter(e,t,r){let i=this._getDataBridge(),a=await i.getPivotTable(e);if(!a)return this.fail();let g=await i.getPivotCache(a.cacheId);if(!g)return this.fail();let R=a.pivotFields.find(he=>he.id===t),L=g.fields.find(he=>he.id===t);if(!R||!L)return this.fail();let W=[],K=r&&Q7(r)?new Set(r.value):null,Q=[];for(let he of function(me,ye){let Te=ye.group?.grouping?ye.group.items:ye.sharedItems.items;return me.items.map(Me=>{let Oe=Te[Me.sharedIndex];return{name:Me.caption??J_(Oe,""),valueItem:Oe,hidden:Me.hidden}})}(R,L)){let me=K!==null&&!K.has(he.name);he.hidden!==me&&Q.push([he.valueItem,me])}Q.length>0&&W.push(Jp(e,t,"hidden",Q));let oe=r&&(Z_(r)||$M(r));(R.filter!==null||oe)&&W.push(Xp(e,t,[["filter",oe?r:null]]));let se=a.location.sheetId;return W=W.length>1?[Vh(W)]:W,await this.execPivotCommand(se,e,W)?this.done():this.fail()}async _setPivotFieldAttr(e,t,r){let i=this._getDataBridge(),a=await i.getPivotTable(e);if(!a)return this.fail();let g=[Xp(e,t,r)],R=r.find(W=>W[0]==="sorting");if(R){let W=R[1].type,K=(await i.getPivotFieldItemNames(e,t,W)).map((Q,oe)=>[Pa(Q),oe]);g.unshift(Jp(e,t,"order",K))}g=g.length>1?[Vh(g)]:g;let L=a.location.sheetId;return await this.execPivotCommand(L,e,g)?this.done():this.fail()}async _setPivotDataFieldAttr(e,t,r){let i=this._getDataBridge(),a=await i.getPivotTable(e);if(!a)return this.fail();let g=[b_(e,t,r)],R=a.location.sheetId;return await this.execPivotCommand(R,e,g)?this.done():this.fail()}async _setPivotFieldItemAttr(e,t,r,i){let a=this._getDataBridge(),g=await a.getPivotTable(e);if(!g)return this.fail();let R=[Jp(e,t,r,i)];(r==="order"||r==="caption")&&R.unshift(Xp(e,t,[["sorting",{type:"manual",fieldId:null}]]));let L=g.location.sheetId;return R=R.length>1?[Vh(R)]:R,await this.execPivotCommand(L,e,R)?this.done():this.fail()}async _groupPivotFieldItems(e,t){let r=await this._getDataBridge().getManualGroupChanges(e,t);if(!r)return this.fail(en.PIVOT_TABLE_GROUP_FAIL);let{fieldId:i,childFieldId:a,changes:g}=r,R=this._getDataBridge(),L=await R.getPivotTable(e);if(!L)return this.fail();if(!L.pivotFields.find(Q=>Q.id===i)&&await R.getPivotFieldRemainCount(e)<=0)return this.fail(en.PIVOT_TABLE_TOO_MANY_FIELD);let W=[iM(e,[{fieldId:i,childFieldIds:[a],changes:g,insertPosition:null}])],K=L.location.sheetId;return await this.execPivotCommand(K,e,W)?this.done():this.fail()}async _ungroupPivotFieldItems(e,t){let r=await this._getDataBridge().getManualUngroupChanges(e,t);if(!r||r.length===0)return this.fail();let i=this._getDataBridge(),a=await i.getPivotTable(e);if(!a)return this.fail();let g=[oM(e,r)],R=a.location.sheetId;return await this.execPivotCommand(R,e,g)?this.done():this.fail()}async _setPivotFieldNumberGroup(e,t,r){let i=this._getDataBridge(),a=await i.getPivotTable(e);if(!a)return this.fail();let g=[C_(e,t,r)],R=a.location.sheetId;return await this.execPivotCommand(R,e,g)?this.done():this.fail()}async _setPivotFieldDatetimeGroup(e,t,r,i){let a=this._getDataBridge(),g=await a.getPivotTable(e);if(!g||!await a.getPivotCache(g.cacheId))return this.fail();let R=[Qy(e,t,r,i)],L=g.location.sheetId;return await this.execPivotCommand(L,e,R)?this.done():this.fail()}async _setPivotCellAsItemName(e,t,r,i){if(!t||!r)return this.fail();if(i==="")return this.fail(en.PIVOT_TABLE_NULL_NAME);let a=this._getDataBridge(),g=await a.getPivotFieldItemNames(e,t),R=g.find(L=>L.name.toLocaleLowerCase()===i.toLocaleLowerCase());if(!R||Ba(R,r))return this._setPivotFieldItemAttr(e,t,"caption",[[r,i]]);{let L=g.findIndex(W=>Ba(W,r));return L<0?this.fail():this._setPivotFieldItemAttr(e,t,"order",[[{type:R.type,value:R.value},L]])}}async _setPivotCellAsFieldName(e,t,r,i,a){if(a===void 0&&(a=!1),!t)return this.fail();if(i==="")return this.fail(en.PIVOT_TABLE_NULL_NAME);let g=this._getDataBridge(),R=await g.getPivotFieldNames(e);if(R.dataFields.find(W=>W.name.toLocaleLowerCase()===i.toLocaleLowerCase()))return this.fail(en.PIVOT_TABLE_FIELD_NAME_EXIST);let L=R.pivotFields.find(W=>W.name.toLocaleLowerCase()===i.toLocaleLowerCase());if(L&&L.id!==t){let W=await g.getPivotTable(e);if(!W||!r)return this.fail();let K=a?0:W.fields[r].findIndex(Q=>Q.fieldId===t);return K<0?this.fail():this._movePivotAxisFieldCommand(e,L.id,r,K)}{if(a)return this._setPivotTableCaption(e,"values",i);let W=R.pivotFields.find(oe=>oe.id===t),K=i.toLocaleLowerCase().endsWith(W.suffix.toLocaleLowerCase())&&i.length>W.suffix.length,Q=K&&W.suffix.length>0?i.slice(0,-W.suffix.length):i;return this._setPivotFieldAttr(e,t,[["name",Q],["useSuffix",K]])}}async _setPivotCellAsDataFieldName(e,t,r,i){if(!t||t===Ds&&!r)return this.fail();if(i==="")return this.fail(en.PIVOT_TABLE_NULL_NAME);let a=this._getDataBridge(),g=await a.getPivotFieldNames(e);if(g.pivotFields.find(W=>W.name.toLocaleLowerCase()===i.toLocaleLowerCase()))return this.fail(en.PIVOT_TABLE_FIELD_NAME_EXIST);let R=t!==Ds?t:g.dataFields.find(W=>W.name===r.value)?.id;if(!R)return this.fail();let L=g.dataFields.find(W=>W.name.toLocaleLowerCase()===i.toLocaleLowerCase());if(!L||L.id===R)return this._setPivotDataFieldAttr(e,R,[["name",i],["autoName",!1]]);{let W=await a.getPivotTable(e);if(!W)return this.fail();let K=W.fields.data.findIndex(Q=>Q.id===R);return K<0?this.fail():this._movePivotDataFieldCommand(e,L.id,K)}}async _setPivotCellAsFilterItem(e,t,r,i){if(!t)return this.fail();if(i==="")return this.fail(en.PIVOT_TABLE_NULL_NAME);let a=this._getDataBridge(),g=await a.getPivotFieldItemNames(e,t),R=g.find(W=>W.name.toLocaleLowerCase()===i.toLocaleLowerCase());if(R&&!(r&&Ba(R,r)))return this._setPivotFieldFilter(e,t,{type:Doe.VALUE,value:[R.name]});let L=r&&g.find(W=>Ba(W,r));return L?await this.getUIBridge().onConfirm(en.PIVOT_TABLE_RENAME_ITEM,[L.name,i])?this._setPivotFieldItemAttr(e,t,"caption",[[r,i]]):this.fail():(await this.getUIBridge().onAlert(en.PIVOT_TABLE_NOT_AN_ITEM,[i]),this.fail())}async _setPivotCellAsSubtotalCaption(e,t,r,i){if(!t||!r)return this.fail();if(i==="")return this.fail(en.PIVOT_TABLE_NULL_NAME);let a=this._getDataBridge(),g=await a.getPivotFieldItemNames(e,t),R=g.find(W=>Ba(W,r))?.name??"";if(!R)return this.fail();let L=(R[0].match(/\w/)?"\\b":"")+R+(R.at(-1).match(/\w/)?"\\b":"");return i=i.replaceAll(RegExp(L,"g"),"{0}"),this._setPivotFieldAttr(e,t,[["subtotalCaption",i]])}async _setPivotCellAsGrandTotalCaption(e,t){return t===""?this.fail(en.PIVOT_TABLE_NULL_NAME):this._setPivotTableCaption(e,"grandTotal",t)}async _setPivotCellAsColumnHeaderCaption(e,t){return this._setPivotTableCaption(e,"colHeader",t)}async _setPivotCellAsRowHeaderCaption(e,t){return this._setPivotTableCaption(e,"rowHeader",t)}async _createPivotDetailSheet(e,t,r){let i=this._getDataBridge(),a=await i.getPivotTable(e);if(!a)return void await this.fail();let g=i.getWorkbook(),R=g.getSheetPos(a.location.sheetId)+1,L=await i.getTableDetailContent(e,t,r);if(!L)return void await this.fail();let W=g.getLocale().getSSF(),K=L.titleItems.map(he=>{let{fc:me,value:ye}=he;return W.render(me,ye)}).join("-"),{id:Q,pos:oe,title:se}=await this._rpc(c8(`${this.getUIBridge().getString("pivot_table","show_detail_title_prefix")}-${K}`,L.content,R));return await this.execCommand(__(Q,oe,se,void 0,L.content)),this.undoRedo?.done(new Zp(Q)),await this.done(),Q}_rpc(e){return new Promise((t,r)=>{this.reserveLocalCommand(()=>({action:new Ire(e),callback:(i,a,g)=>{a&&g?t(g):r()}}))})}async _createPivotTableSheet(e,t){let{tableJson:r,cacheJson:i,message:a}=await this._createPivotTableJson(e,e.sheetId,Noe);if(a)return this.fail(a);let g=this._getWorkbook(),{id:R,pos:L,title:W}=await this._rpc(h8(g.getSheetPos(e.sheetId)+1,t,i,r));return r.location.sheetId=R,await this._getDataBridge().execCommand(qf([__(R,L,W),Jf(r,i)])),this.undoRedo?.done(new Zp(R)),await this.done(),R}async createSheet(e){let t=this._getWorkbook(),{id:r,pos:i,title:a}=await this._rpc(u8(t.getSheetCount(),e));return await this.execCommand(__(r,i,a)),this.undoRedo?.done(new Zp(r)),await this.done({resetCopySelection:!1}),r}async dupSheet(e,t,r){let i=(await this._getDataBridge().listPivotTableLocations(e)).reduce((R,L)=>(R[L.id]={tableId:pe(),cacheId:pe()},R),{}),{id:a,pos:g}=await this._rpc(d8(e,t,r,i));return await this._getDataBridge().execCommand(f8(e,g,r,a,i)),this.undoRedo?.done(new Zp(a)),await this.done(),e}async renameSheet(e,t){return await jo(this._getBridges(),[e])?(await this.execCommand(I_(e,t)),this.done({resetCopySelection:!1})):this.fail()}async removeSheets(e){let t=this._getDataBridge().getWorkbook().getCurrentSheet()?.sheetId,r=e.includes(t);if(!await jo(this._getBridges(),e,!0))return this.fail();for(let i of e)await this.execCommand(S_(i));return this.done({resetCopySelection:r})}async removeSheet(e){let t=this._getDataBridge().getWorkbook().getCurrentSheet()?.sheetId===e;return await jo(this._getBridges(),[e],!0)?(await this.execCommand(S_(e)),this.done({resetCopySelection:t})):this.fail()}async setSheetsHidden(e,t){if(!await jo(this._getBridges(),e,!0))return this.fail();for(let r of e)await this.execCommand(ew(r,t));return this.done({resetCopySelection:!1})}async setSheetHidden(e,t){return await jo(this._getBridges(),[e])?(await this.execCommand(ew(e,t)),this.done({resetCopySelection:!1})):this.fail()}async setSheetsColor(e,t){if(!await jo(this._getBridges(),e,!0))return this.fail();for(let r of e)await this.execCommand(tw(r,t));return this.done({resetCopySelection:!1})}async setSheetColor(e,t){return await jo(this._getBridges(),[e])?(await this.execCommand(tw(e,t)),this.done({resetCopySelection:!1})):this.fail()}async reorderSheet(e){return await this.execCommand(x_(e)),this.done({resetCopySelection:!1})}getCommandFactory(){return $}_getDataBridge(){return this.dataBridge}_getWorkbook(){return this.dataBridge.getWorkbook()}getUIBridge(){return this.uiBridge}}function Ri(n){return async function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];try{return this.getUIBridge().onLockUI(),await n.call(this,...t)}finally{this.getUIBridge().onReleaseUI()}}}let tae=class extends eae{fail(n){return super.fail(n).catch(async e=>{let{message:t}=e;return t&&await this.getUIBridge().onAlert(t),!1})}async done(n){return await super.done(n??{resetCopySelection:!0}),!0}};class XM extends pu.EventEmitter{fireAddEvent(){this.emit("add")}}class nae extends XM{constructor(e){super(),this.workbook=e}hasTask(){return this.findCalculateSheet()!==null}*runTask(){let e=this.findCalculateSheet();e&&(yield*e.renderCache.calcNeedRenderCell())}findCalculateSheet(){for(let e of this.iterateSheet())if(e&&e.renderCache.getNeedRenderSize()>0)return e;return null}*iterateSheet(){let e=this.workbook.current?.sheetId;for(let t of(e&&(yield this.workbook.current),this.workbook.getOrder()))t!==e&&(yield this.workbook.getSheetById(t))}}class rae extends XM{constructor(e){super(),this.workbook=e,this.needDimensionItemMap=new Map,this.calculatedItem=new Set}hasTask(){return this.calculatedItem.size>0||!!this.findCalculateTarget()}*runTask(){let e=this.workbook.current?this.needDimensionItemMap.get(this.workbook.current.sheetId):null;for(let t of(e&&e.size!==0||(e=this.findCalculateTarget()),e?Array.from(e):[]))this.checkArrayDimension(t),yield}findCalculateTarget(){for(let e of this.needDimensionItemMap.values())if(e.size>0)return e;return null}updateCalculated(){for(let e of this.calculatedItem){if(e.needUpdate)continue;let t=e.getValue(),r=0,i=0;Array.isArray(t)&&(r=t.length,Array.isArray(t[0])&&(i=t[0].length)),this.updateItemDimension(e,r,i)}this.calculatedItem.clear()}addCalculatedItem(e){this.calculatedItem.add(e),this.fireAddEvent()}updateItemSpillRange(e,t){e.setSpillRange(t)}updateItemDimension(e,t,r){if(!e.needDimension)return;let i=[],a=e.sheet,g=e.getSpillRange()?.getRange()??null;if(t<1||r<1)this.updateItemSpillRange(e,null);else{let R=new mi({row:e.row,col:e.col},{row:e.row+t-1,col:e.col+r-1}),L=a.getFormulaDepManager().getSpillContainer().getOrCreateFormulaRange(R);if(this.updateItemSpillRange(e,L),!g||g.to.row-g.from.row+1!==t||g.to.col-g.from.col+1!==r){let W=g?g.to.row:-1,K=g?g.to.col:-1;for(let Q=R.from.row;Q<=R.to.row;Q++)for(let oe=R.from.col;oe<=R.to.col;oe++)(Q>W||oe>K)&&i.push({row:Q,col:oe})}}i.length>0&&a.formula.fireUpdateEvent(i),a.notifySheetChanges(["formulaDimensions"])}setNeedDimension(e){e.needDimension=!0;let t=e.sheet.sheetId;this.needDimensionItemMap.has(t)||this.needDimensionItemMap.set(t,new Set),this.needDimensionItemMap.get(t).add(e),this.fireAddEvent()}removeNeedDimension(e){e.needDimension=!1;let t=e.sheet.sheetId;this.needDimensionItemMap.get(t)?.delete(e),this.calculatedItem.delete(e)}checkArrayDimension(e){if(!e.needDimension)return;let{height:t,width:r}=this.workbook.getFormulaParser().execArrayDimension(e.formula,{sheetId:e.sheet.sheetId});this.updateItemDimension(e,t,r),this.removeNeedDimension(e)}}class iae extends XM{constructor(){super(),this.recalculateSet=new Set}hasTask(){return this.recalculateSet.size>0}*runTask(){for(let e of Array.from(this.recalculateSet)){let t=e.sheet.formula;t.generateChangeDep([[e.row,e.col]],"reset"),t.updateItem(e),this.removeTask(e),yield}}addTask(e){this.recalculateSet.add(e)}removeTask(e){this.recalculateSet.delete(e)}}class oae{constructor(e,t=!1){for(let r of(this.taskHandlers=[this.formulaRecalculator=new iae],t&&this.taskHandlers.push(new nae(e)),this.taskHandlers.push(this.formulaDimensioner=new rae(e)),this.taskHandlers))r.on("add",()=>this.runTask());this.taskPromise=null,this.run=!1}start(){return this.run=!0,this.runTask()}stop(){this.run=!1}async runTask(){return this.taskPromise?this.taskPromise:this.run&&this.needCalculate()?this.taskPromise=fs().then(()=>(this.calculate(),this.taskPromise=null,this.runTask())):void 0}needCalculate(){return this.taskHandlers.some(e=>e.hasTask())}calculate(){this.formulaDimensioner.updateCalculated();let e=this.taskHandlers.find(i=>i.hasTask());if(!e)return;let t=Date.now(),r=e.runTask();for(;!r.next().done&&!(Date.now()-t>4););}getFormulaDimensioner(){return this.formulaDimensioner}getFormulaRecalculator(){return this.formulaRecalculator}}class aae{constructor(e,t,r,i){this.sheet=e,this.name=t,this.color=r||"",this.hidden=!!i}}let sae=class{constructor(){this.sheetsInfo=new Map,this.sheetsOrder=[],this.nameMap=new Map,this.maxIndex=0,this.maxPivotTableIndex=0}destroy(){this.sheetsInfo.forEach(n=>{n.sheet.destroy()})}hasSheet(n){return this.sheetsInfo.has(n)}addSheet(n,e,t,r,i,a){return!this.hasSheet(n)&&(e.id=n.slice(3),this.sheetsInfo.set(n,new aae(e,t,i,a)),r>=this.sheetsOrder.length?this.sheetsOrder.push(n):this.sheetsOrder.splice(r,0,n),this.nameMap.set(t,n),!0)}removeSheet(n){let e=this.sheetsInfo.get(n);return e&&(this.sheetsInfo.delete(n),this.nameMap.delete(e.name)),this.sheetsOrder=this.sheetsOrder.filter(t=>t!==n),e&&e.sheet}hasSheetName(n){return this.nameMap.has(n)}getSheetByName(n){let e=this.nameMap.get(n);return typeof e=="string"?this.getSheetById(e):void 0}getSheetById(n){let e=this.sheetsInfo.get(n);return e&&e.sheet}getNameById(n){let e=this.sheetsInfo.get(n);return e&&e.name}getIdByName(n){return this.nameMap.get(n)}rename(n,e){let t=this.sheetsInfo.get(n);return t&&(this.nameMap.delete(t.name),t.name=e,this.nameMap.set(e,n)),!!t}setSheetHidden(n,e){let t=this.sheetsInfo.get(n);return t&&(t.hidden=!!e),!!t}isSheetHidden(n){let e=this.sheetsInfo.get(n);return!!e&&e.hidden}setSheetColor(n,e){let t=this.sheetsInfo.get(n);return t&&(t.color=e),!!t}getSheetColor(n){let e=this.sheetsInfo.get(n);return e&&e.color}setOrder(n){let e=new Set(n);return!(this.sheetsOrder.length!==n.length||this.sheetsOrder.some(t=>!e.has(t)))&&(this.sheetsOrder=n.slice(),!0)}getOrder(){return this.sheetsOrder.slice()}getSheetCount(){return this.sheetsOrder.length}getSheetPos(n){return this.sheetsOrder.indexOf(n)}getSheetInfo(n){return this.sheetsInfo.get(n)}getMaxIndex(){return this.maxIndex}setMaxIndex(n){this.maxIndex=n}getMaxPivotTableIndex(){return this.maxPivotTableIndex}setMaxPivotTableIndex(n){this.maxPivotTableIndex=n}};class lae extends pu.EventEmitter{constructor(e,t=!1){super(),this.value=zv(e.value),this.fc=e.fc,this.loading=t,this.formulaItems=new Set}isLoading(){return this.loading}isEqual(e){let{value:t,fc:r}=e;return function i(a,g){let R=Array.isArray(a),L=Array.isArray(g);return R&&L?a.length===g.length&&a.every((W,K)=>i(W,g[K])):!R&&fa(a)&&!L&&fa(g)?a.message===g.error:a===g}(this.value,t)&&this.fc===r}updateValue(e,t){let{value:r,fc:i}=e;for(let a of(t===void 0&&(t=!1),this.value=zv(r),this.fc=i,this.loading=t,Array.from(this.formulaItems)))a.sheet.formula.generateChangeDep([[a.row,a.col]],"renew")}getValue(){return this.value}getFc(){return this.fc}addFormulaItem(e){this.formulaItems.add(e),this.emit("external_changed")}deleteFormulaItem(e){this.formulaItems.delete(e),this.emit("external_changed")}getReferenceCount(){return this.formulaItems.size}*iterateReference(){for(let e of this.formulaItems)yield e}toJSON(){let e={value:kh(this.value)};return this.fc&&(e.fc=this.fc),e}}function uae(n,e){let t=uA(n,r=>hae(r,e));t>=n.length?n.push(e):(n[t].row!==e.row||n[t].col!==e.col)&&n.splice(t,0,e)}function hae(n,e){return n.row<e.row||n.row===e.row&&n.col<e.col}class cae{}class S9 extends cae{constructor(e){super(),this.workbook=e}process(e){if(e.cmd==="compound")for(let t=0;t<e.actions.length;t++)this.process(e.actions[t]);else this._processCommand(e)}_processCommand(e){let t=Nn.Remote;if(this._processComment(e)||this._processWorksheet(e)||this._processDefinedName(e)||this._processProtection(e)||this._processExternalLinks(e)||this._processPivotTable(e))return;let{id:r}=e,i=this.workbook.getSheetById(r);if(!i)return;let a=i.controller;switch(e.cmd){case"value":{let{changes:g,source:R}=e;a.setDataAtCell(ii(g),R??t);break}case"note":{let{changes:g}=e;a.setNote(g,t);break}case"resize_row":{let{from:g,to:R,height:L}=e;a.resizeRow(g,R,L);break}case"resize_col":{let{from:g,to:R,width:L}=e;a.resizeColumn(g,R,L);break}case"insert_row":case"remove_row":case"insert_col":case"remove_col":{let{index:g,amount:R,refIndex:L,data:W}=e;a.alterGrid(e.cmd,g,R,L,W);break}case"merge":{let{range:g}=e;a.mergeCells(qo(g));break}case"unmerge":{let{range:g}=e;a.unmergeCells(qo(g));break}case"unmerge_overlaps":{let{range:g}=e;a._unmergeOverlaps(qo(g));break}case"format":{let{changes:g,overwrite:R,source:L}=e;a.setFormat(g,R??!0,L??t);break}case"quoteprefix":case"font":case"fill":case"alignment":case"border":{let{changes:g,overwrite:R,source:L}=e,W=e.cmd==="quoteprefix"?"QuotePrefix":we(e.cmd);a.setStyleByType(W,g,R,L??t);break}case"row_style":{let{type:g,changes:R,revert:L,cellChanges:W,source:K}=e;a.setRowStyle(we(g),R,L,W,K??t);break}case"col_style":{let{type:g,changes:R,revert:L,cellChanges:W,source:K}=e;a.setColStyle(we(g),R,L,W,K??t);break}case"global_style":{let{type:g,value:R,revert:L,rowChanges:W,colChanges:K,cellChanges:Q,source:oe}=e;a.setGlobalStyle(we(g),R,L,W,K,Q,oe??t);break}case"paste_autofill_data":{let{range:g,data:R,expandFilter:L,source:W}=e;a.pasteAutofillData(qo(g),FV(R),L,W);break}case"populate_autofill_data":{let{range:g,data:R,direction:L,source:W}=e;a.populateAutofillData(qo(g),FV(R),L,W);break}case"autofill_number_format":{let{range:g,fc:R,direction:L,source:W}=e;a.autofillNumberFormat(qo(g),R,L,W);break}case"fix_row":{let{row:g}=e;a.fixedRow(g);break}case"fix_col":{let{col:g}=e;a.fixedCol(g);break}case"hide_rows":{let{from:g,to:R}=e;a.hideRows(g,R);break}case"show_rows":{let{from:g,to:R}=e;a.showRows(g,R);break}case"hide_cols":{let{from:g,to:R}=e;a.hideCols(g,R);break}case"show_cols":{let{from:g,to:R}=e;a.showCols(g,R);break}case"create_filter":{let{range:g,filterId:R}=e;a.createFilter(qo(g),R);break}case"enable_filter":{let{filterId:g,hiddenInfo:R}=e;a.enableFilter(g,R);break}case"disable_filter":{let{filterId:g,hiddenInfo:R}=e;a.disableFilter(g,R);break}case"set_filter":{let{filterId:g,col:R,condition:L,hiddenInfo:W}=e;a.setFilter(g,R,L,W);break}case"update_filter_range":{let{filterId:g,range:R,conditions:L}=e;a.updateFilterRange(g,R?qo(R):null,L);break}case"create_filter_view":{let{filterId:g,range:R,name:L,isPrivate:W}=e;a.createFilterView(g,qo(R),L,W);break}case"enable_filter_view":{let{filterId:g}=e;a.enableFilterView(g);break}case"disable_filter_view":{let{filterId:g}=e;a.disableFilterView(g);break}case"set_filter_view_condition":{let{filterId:g,col:R,condition:L}=e;a.setFilterViewCondition(g,R,L);break}case"update_filter_view_name":{let{filterId:g,name:R}=e;a.updateFilterViewName(g,R);break}case"update_filter_view_range":{let{filterId:g,range:R,conditions:L}=e;a.updateFilterViewRange(g,R?qo(R):null,L);break}case"expand_filter_range":{let{range:g}=e;a.expandFilterRange(qo(g));break}case"set_active_filter_view":{let{filterId:g}=e;a.setActiveFilterView(g);break}case"add_validation_range":{let{validId:g,range:R}=e;a.addValidRange(g,qo(R));break}case"create_validation":{let{validation:g,range:R}=e,L=nr.textToRange(R,i);L&&a.createValidation(g,L);break}case"remove_validation":{let{validId:g,range:R}=e,L=nr.textToRange(R,i);L&&a.removeValidation(g,L);break}case"remove_all_validation":{let{range:g}=e;a.removeAllValidation(qo(g));break}case"create_cf":{let{cf:g,index:R}=e;a.addCf(g,R);break}case"remove_cf":{let{cfId:g}=e;a.removeCf(g);break}case"update_cf_ranges":{let{ranges:g,cfId:R}=e;a.updateCfRanges(R,g.map(L=>nr.textToRange(L,i)).filter(ga));break}case"sort":{let{rowOrder:g,range:R,applyData:L}=e;a.applyRowOrder(g,qo(R),L);break}case"insert_image":{let{imageId:g,position:R}=e;a.insertImage(g,R);break}case"remove_image":{let{imageId:g}=e;a.removeImage(g);break}case"resize_image":{let{imageId:g,position:R}=e;a.resizeImage(g,R);break}case"insert_chart":{let{chartId:g,position:R,chartObj:L}=e;a.insertChart(g,R,L);break}case"remove_chart":{let{chartId:g}=e;a.removeChart(g);break}case"resize_chart":{let{chartId:g,position:R}=e;a.resizeChart(g,R);break}case"adjust_chart":{let{chartId:g,chartObj:R}=e;a.adjustChart(g,R);break}case"set_chart_config":{let{chartId:g,name:R,args:L}=e;a.setChartConfig(g,R,L);break}case"modify_drawings_by_insert":{let{type:g,index:R,amount:L}=e;a.modifyDrawingsByInsertRowCol(g,R,L);break}case"modify_drawings_by_remove":{let{type:g,index:R,amount:L}=e;a.modifyDrawingByRemoveRowCol(g,R,L);break}case"modify_drawings_by_move":{let{type:g,start:R,amount1:L,amount2:W,isBackward:K}=e;a.modifyDrawingsByMoveRowCol(g,R,L,W,K);break}case"move_row":{let{start:g,amount1:R,amount2:L,isBackward:W,data:K}=e;a.moveRow(g,R,L,W,K);break}case"move_col":{let{start:g,amount1:R,amount2:L,isBackward:W,data:K}=e;a.moveCol(g,R,L,W,K);break}case"move_range":{let{srcRange:g,targetRange:R,clearMerge:L}=e;a.moveRange(qo(g),qo(R),L);break}case"clear_range_data":{let{range:g,source:R}=e;a.clearRangeData(qo(g),R);break}case"clear_range_related":{let{range:g,source:R,clearMerge:L}=e;a.clearRangeRelated(qo(g),L,R);break}case"move_formula_range":{let{srcRange:g,targetSheetId:R,targetRange:L,keepMovingPart:W,applyData:K}=e;a.moveFormulaRange(qo(g),R,qo(L),W,K);break}case"remove_formula_range":{let{srcRange:g,applyData:R}=e;a.removeFormulaRange(qo(g),R);break}case"add_internal_link":{let{json:g}=e;a.addInternalLink(g);break}case"update_internal_link":{let{json:g}=e;a.updateInternalLink(g);break}case"remove_internal_link":{let{linkId:g}=e;a.removeInternalLink(g);break}case"group":e.type==="col"?a.groupCols(e.from,e.to):a.groupRows(e.from,e.to);break;case"ungroup":e.type==="col"?a.ungroupCols(e.from,e.to):a.ungroupRows(e.from,e.to);break;case"update_group":a.updateGroup(e.type,e.from,e.levels);break;case"set_collapse":a.setCollapse(e.type,e.index,e.collapse);break;case"set_worksheet_rtl":a.setWorksheetRtl(e.rtl)}}_processComment(e){let t=this.workbook.getController().commentController,r=!0;switch(e.cmd){case"create_comment":t.createCommentFromJSON(e.json);break;case"create_comment_local":{let{author:i,config:a}=e;t.createComment(i,a);break}case"reply_comment":t.replyCommentFromJSON(e.json);break;case"reply_comment_local":{let{author:i,config:a}=e;t.replyComment(i,a);break}case"reopen_comment":t.reopenCommentFromJSON(e.json);break;case"reopen_comment_local":{let{author:i,threadId:a,authorName:g}=e;t.reopenComment(i,a,g);break}case"resolve_comment":t.resolveCommentFromJSON(e.json);break;case"resolve_comment_local":{let{author:i,threadId:a,authorName:g}=e;t.resolveComment(i,a,g);break}case"edit_comment":t.changeCommentFromJSON(e.json);break;case"edit_comment_local":{let{author:i,threadId:a,replyId:g,text:R}=e;t.editComment(i,a,g,R);break}case"paste_comment":t.pasteCommentFromJson(e.jsonArray);break;case"clear_comment":t.clearCommentFromJson(e.jsonArray);break;default:r=!1}return r}_processDefinedName(e){let t=!0,r=this.workbook.getController().nameController;switch(e.cmd){case"create_define":{let{name:i,value:a,scope:g}=e;r.create(i,a,g);break}case"remove_define":{let{name:i,scope:a}=e;r.remove(i,a);break}case"modify_define":{let{name:i,change:a,scope:g}=e;r.modify(i,a,g);break}default:t=!1}return t}_processProtection(e){let t=!0,r=this.workbook.getController().ruleController;switch(e.cmd){case"create_rule":{let{rule:i}=e;r.create(i);break}case"update_rule":{let{ruleId:i,props:a}=e;r.update(i,a);break}case"remove_rule":{let{ruleId:i}=e;r.delete(i);break}default:t=!1}return t}_processExternalLinks(e){switch(e.cmd){case"update_external_links":return this.workbook.getController().updateExternalLinks(e.entry),!0;case"remove_external_links":return this.workbook.getController().removeExternalLinks(e.linkIds),!0}return!1}_processPivotTable(e){let t=this.workbook.getPivotTableManager();switch(e.cmd){case"pivot_compound":case"create_pivot_table":case"delete_pivot_table":case"update_pivot_table":case"move_pivot_table":case"set_pivot_table_caption":case"move_pivot_axis_field":case"insert_pivot_data_field":case"move_pivot_data_field":case"remove_pivot_data_field":case"set_pivot_field_attr":case"set_pivot_data_field_attr":case"set_pivot_field_item_order":case"set_pivot_field_item_folded":case"set_pivot_field_item_hidden":case"set_pivot_field_item_caption":case"group_pivot_field_item":case"ungroup_pivot_field_item":case"set_pivot_field_number_group":case"set_pivot_field_datetime_group":return t.execCommand(e),!0}return!1}_processWorksheet(e){let t=e.cmd;if(!t||!t.startsWith("worksheet."))return!1;let r=this.workbook.getController();switch(t){case"worksheet.create":{let{id:i,pos:a,title:g,tabColor:R,content:L}=e;r.createWorksheet(i,a,{title:g,tabColor:R},L);break}case"worksheet.create_pivot_table":{let{id:i,pos:a,title:g,tableJson:R,cacheJson:L}=e;r.createWorksheet(i,a,{title:g})&&(this.workbook.setMaxPivotTableIndex(this.workbook.getMaxPivotTableIndex()+1),this.workbook.getPivotTableManager().createPivotTable(R,L));break}case"worksheet.dup":{let{id:i,pos:a,title:g,newId:R,pivotTableIdMapping:L}=e;r.dupWorksheet(i,a,g,R,L);break}case"worksheet.undelete":{let{id:i,pos:a,info:g,content:R}=e;r.undeleteWorksheet(i,a,g,R);break}case"worksheet.delete":{let{id:i,includeSnapshotData:a}=e;r.deleteWorksheet(i,a);break}case"worksheet.rename":{let{id:i,title:a}=e;r.renameWorksheet(i,a);break}case"worksheet.set_order":{let{order:i}=e;r.reorderWorksheet(i);break}case"worksheet.set_hidden":{let{id:i,hidden:a}=e;r.setWorksheetHidden(i,a);break}case"worksheet.set_color":{let{id:i,color:a}=e;r.setWorksheetColor(i,a)}}return!0}}function qo(n){return oa(n[0],n[1],n[2],n[3])}class I9{constructor(e){if(e.status===void 0)throw Error("not given a status");this.id=e.id,typeof e.author=="number"?(this.author=e.author,this.authorName=e.authorName||""):(this.author=0,this.authorName=e.authorName||e.author||""),this.status=e.status,this.text=e.text||"",this.timestamp=e.timestamp||0,this.lastModified=e.lastModified||0}isOpened(){return this.status===0}isResolved(){return this.status===1}isAuthor(e){return e===0||this.author===e}editText(e){if(!e.text)throw Error("empty string is not allowed");return this.copy({text:e.text,lastModified:e.lastModified})}toJSON(){return{id:this.id,author:this.author,authorName:this.authorName||void 0,status:this.status,text:this.text,timestamp:this.timestamp,lastModified:this.lastModified}}static fromJSON(e){throw Error("BaseComment is not constructable.")}}class x9 extends I9{constructor(e){super(e)}isReopened(){return this.status===2}copy(e){return new this.constructor(Object.assign(this.toObject(),e))}toObject(){return this.toJSON()}static fromJSON(e){return new this(e)}}class T9 extends I9{constructor(e){super(e),this.type=e.type,this.replies=e.replies||[]}isDiscussion(){return this.type===0}isSuggestion(){return this.type===1}getReply(e){return this._ensureReplyIndexInBound(e),this.replies[e]}_ensureReplyIndexInBound(e){if(e<0||e>=this.replies.length){var t;throw t=this.replies.length,Error(`Request #${e}, only ${t} replies`)}}reply(e){if(this.status===1){let t=this.constructor.createReply({...e,status:2});return this.copy({status:0,replies:this.replies.concat(t)})}{let t=this.constructor.createReply(e);return this.copy({replies:this.replies.concat(t)})}}resolve(e){return this._setStatus(e,1,1)}reopen(e){return this._setStatus(e,0,2)}_setStatus(e,t,r){if(this.status===t)return this;let i=this.constructor.createReply({...e,status:r,text:""});return this.copy({status:t,replies:this.replies.concat(i)})}removeReply(e){this._ensureReplyIndexInBound(e.replyIndex);let t=this.replies.slice();return t.splice(e.replyIndex,1),this.copy({replies:t})}editReplyText(e){this._ensureReplyIndexInBound(e.replyIndex);let t=this.replies.slice();return t[e.replyIndex]=t[e.replyIndex].editText(e),this.copy({replies:t})}copy(e){return new this.constructor(Object.assign(this.toObject(),e))}toObject(){return Object.assign(super.toJSON(),{type:this.type,replies:this.replies.slice()})}toJSON(){return Object.assign(super.toJSON(),{type:this.type,replies:this.replies.map(e=>e.toJSON())})}static fromJSON(e){return new this({...e,replies:(e.replies||[]).map(this.createReply,this)})}static createReply(e){return x9.fromJSON(e)}}class dae extends pu.EventEmitter{constructor(e){super(),this.comments=e||Object.create(null)}getCommentById(e,t){t===void 0&&(t=!1);let r=this.comments[e]||null;if(!r&&t)throw Error(`Comment id: "${e}" Not Found`);return r}getBy(e,t){return this.getCommentById(e,t)}getComments(){return this.comments}getAllCommentIds(){return Object.keys(this.comments)}getAllCommentValues(){return Object.values(this.comments)}getCommentCount(){return this.getAllCommentIds().length}forEach(e,t){let r=this.comments;for(let i in r)if(Object.prototype.hasOwnProperty.call(r,i)&&e.call(t,r[i],i,r))break}copy(){return Object.assign(Object.create(Object.getPrototypeOf(this)),this,{comments:{...this.comments}})}setComment(e){let t=this.copy();return t.comments[e.id]=e,this.emit("commentChanged",[[e.id,e.toJSON()]]),t}deleteComment(e){let t=this.copy();return delete t.comments[e],this.emit("commentChanged",[[e,null]]),t}createComment(e,t){if(this.getCommentById(t.id))throw Error(`Comment id "${t.id}" already exists in store`);if(e!==t.author)throw Error("Can only create comment by yourself");if(t.type===0&&t.status!==0)throw Error("Can only create open status discussion.");let r=this.constructor.createComment(t);return this.setComment(r)}removeComment(e,t){if(!this.getCommentById(t.target,!0).isAuthor(e))throw Error("Can only remove comment created by self");return this.deleteComment(t.target)}reply(e,t){let r=this.getCommentById(t.target,!0);return this.setComment(r.reply(t))}removeReply(e,t){let r=this.getCommentById(t.target,!0),i=r.getReply(t.replyIndex);if(!i.isAuthor(e))throw Error(`No permission to remove reply in reply \`${i.id}\` of comment \`${r.id}\` by uid ${e}.`);return this.setComment(r.removeReply(t))}resolve(e,t){let r=this.getCommentById(t.target,!0);return this.setComment(r.resolve(t))}reopen(e,t){let r=this.getCommentById(t.target,!0);return this.setComment(r.reopen(t))}editCommentText(e,t){let r=this.getCommentById(t.target,!0);if(!r.isOpened())throw Error(`Unable to edit comment text in a resolved comment \`${r.id}\`.`);if(!r.isAuthor(e))throw Error(`No permission to edit comment text in comment \`${r.id}\` by uid ${e}.`);return this.setComment(r.editText(t))}editReplyText(e,t){let r=this.getCommentById(t.target,!0);if(!r.isOpened())throw Error(`Unable to edit reply text in a resolved comment \`${r.id}\`.`);let i=r.getReply(t.replyIndex);if(i.isResolved()||i.isReopened()&&!i.text)throw Error(`Unable to edit reply text in a resolved/reopened reply \`${i.id}\` of comment \`${r.id}\`.`);if(!i.isAuthor(e))throw Error(`No permission to edit reply text in reply \`${i.id}\` of comment \`${r.id}\` by uid ${e}.`);return this.setComment(r.editReplyText(t))}toJSON(){return Object.keys(this.comments).map(e=>this.comments[e].toJSON())}static fromJSON(e){return new this(this.createComments(e||[]))}static createComment(e){return T9.fromJSON(e)}static createComments(e){return e.reduce((t,r)=>{let i=this.createComment(r);return t[i.id]=i,t},Object.create(null))}}(function(n){n.direct="direct",n.patchObject="patch object",n.patchFunction="patch function"})(f||(f={})),typeof window=="object"&&window.window===window||typeof self=="object"&&self.self===self||typeof _l=="object"&&_l.global===_l&&_l;function yw(n){var e=-1,t=n==null?0:n.length;for(this.__data__=new Bc;++e<t;)this.add(n[e])}yw.prototype.add=yw.prototype.push=function(n){return this.__data__.set(n,"__lodash_hash_undefined__"),this},yw.prototype.has=function(n){return this.__data__.has(n)};let fae=function(n,e){for(var t=-1,r=n==null?0:n.length;++t<r;)if(e(n[t],t,n))return!0;return!1},k9=function(n,e){return n.has(e)},R9=function(n,e,t,r,i,a){var g=1&t,R=n.length,L=e.length;if(R!=L&&!(g&&L>R))return!1;var W=a.get(n),K=a.get(e);if(W&&K)return W==e&&K==n;var Q=-1,oe=!0,se=2&t?new yw:void 0;for(a.set(n,e),a.set(e,n);++Q<R;){var he=n[Q],me=e[Q];if(r)var ye=g?r(me,he,Q,e,n,a):r(he,me,Q,n,e,a);if(ye!==void 0){if(ye)continue;oe=!1;break}if(se){if(!fae(e,function(Te,Me){if(!k9(se,Me)&&(he===Te||i(he,Te,t,r,a)))return se.push(Me)})){oe=!1;break}}else if(!(he===me||i(he,me,t,r,a))){oe=!1;break}}return a.delete(n),a.delete(e),oe},gae=function(n){var e=-1,t=Array(n.size);return n.forEach(function(r,i){t[++e]=[i,r]}),t},JM=function(n){var e=-1,t=Array(n.size);return n.forEach(function(r){t[++e]=r}),t};var E9=$s?$s.prototype:void 0,ZM=E9?E9.valueOf:void 0;let pae=function(n,e,t,r,i,a,g){switch(t){case"[object DataView]":if(n.byteLength!=e.byteLength||n.byteOffset!=e.byteOffset)break;n=n.buffer,e=e.buffer;case"[object ArrayBuffer]":if(n.byteLength!=e.byteLength||!a(new W_(n),new W_(e)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return B_(+n,+e);case"[object Error]":return n.name==e.name&&n.message==e.message;case"[object RegExp]":case"[object String]":return n==e+"";case"[object Map]":var R=gae;case"[object Set]":var L=1&r;if(R||(R=JM),n.size!=e.size&&!L)break;var W=g.get(n);if(W)return W==e;r|=2,g.set(n,e);var K=R9(R(n),R(e),r,i,a,g);return g.delete(n),K;case"[object Symbol]":if(ZM)return ZM.call(n)==ZM.call(e)}return!1};var mae=Object.prototype.hasOwnProperty;let vae=function(n,e,t,r,i,a){var g=1&t,R=xM(n),L=R.length;if(L!=xM(e).length&&!g)return!1;for(var W=L;W--;){var K=R[W];if(!(g?K in e:mae.call(e,K)))return!1}var Q=a.get(n),oe=a.get(e);if(Q&&oe)return Q==e&&oe==n;var se=!0;a.set(n,e),a.set(e,n);for(var he=g;++W<L;){var me=n[K=R[W]],ye=e[K];if(r)var Te=g?r(ye,me,K,e,n,a):r(me,ye,K,n,e,a);if(!(Te===void 0?me===ye||i(me,ye,t,r,a):Te)){se=!1;break}he||(he=K=="constructor")}if(se&&!he){var Me=n.constructor,Oe=e.constructor;Me!=Oe&&"constructor"in n&&"constructor"in e&&!(typeof Me=="function"&&Me instanceof Me&&typeof Oe=="function"&&Oe instanceof Oe)&&(se=!1)}return a.delete(n),a.delete(e),se};var A9="[object Arguments]",M9="[object Array]",n1="[object Object]",D9=Object.prototype.hasOwnProperty;let yae=function(n,e,t,r,i,a){var g=Ka(n),R=Ka(e),L=g?M9:pw(n),W=R?M9:pw(e);L=L==A9?n1:L,W=W==A9?n1:W;var K=L==n1,Q=W==n1,oe=L==W;if(oe&&H_(n)){if(!H_(e))return!1;g=!0,K=!1}if(oe&&!K)return a||(a=new zh),g||H$(n)?R9(n,e,t,r,i,a):pae(n,e,L,t,r,i,a);if(!(1&t)){var se=K&&D9.call(n,"__wrapped__"),he=Q&&D9.call(e,"__wrapped__");if(se||he){var me=se?n.value():n,ye=he?e.value():e;return a||(a=new zh),i(me,ye,t,r,a)}}return!!oe&&(a||(a=new zh),vae(n,e,t,r,i,a))},O9=function n(e,t,r,i,a){return e===t||(e!=null&&t!=null&&(ws(e)||ws(t))?yae(e,t,r,i,n,a):e!=e&&t!=t)},wae=function(n,e,t,r){var i=t.length,a=i;if(n==null)return!a;for(n=Object(n);i--;){var g=t[i];if(g[2]?g[1]!==n[g[0]]:!(g[0]in n))return!1}for(;++i<a;){var R=(g=t[i])[0],L=n[R],W=g[1];if(g[2]){if(L===void 0&&!(R in n))return!1}else{var K=new zh,Q;if(!(Q===void 0?O9(W,L,3,r,K):Q))return!1}}return!0},N9=function(n){return n==n&&!fa(n)},bae=function(n){for(var e=gw(n),t=e.length;t--;){var r=e[t],i=n[r];e[t]=[r,i,N9(i)]}return e},P9=function(n,e){return function(t){return t!=null&&t[n]===e&&(e!==void 0||n in Object(t))}},Cae=function(n){var e=bae(n);return e.length==1&&e[0][2]?P9(e[0][0],e[0][1]):function(t){return t===n||wae(t,n,e)}},_ae=function(n,e,t){var r=n==null?void 0:mw(n,e);return r===void 0?t:r},Sae=function(n,e){return n!=null&&e in Object(n)},Iae=function(n,e,t){e=om(e,n);for(var r=-1,i=e.length,a=!1;++r<i;){var g=am(e[r]);if(!(a=n!=null&&t(n,g)))break;n=n[g]}return a||++r!=i?a:!!(i=n==null?0:n.length)&&wM(i)&&$_(g,i)&&(Ka(n)||Sf(n))},B9=function(n,e){return n!=null&&Iae(n,e,Sae)},xae=function(n){var e;return AM(n)?(e=am(n),function(t){return t?.[e]}):function(t){return mw(t,n)}},Tae=function(n){if(typeof n=="function")return n;if(n==null)return _d;if(typeof n=="object"){var e,t;return Ka(n)?(e=n[0],t=n[1],AM(e)&&N9(t)?P9(am(e),t):function(r){var i=_ae(r,e);return i===void 0&&i===t?B9(r,e):O9(t,i,3)}):Cae(n)}return xae(n)},kae=function(n,e,t){for(var r=-1,i=Object(n),a=t(n),g=a.length;g--;){var R=a[++r];if(e(i[R],R,i)===!1)break}return n};var Rae=(_=function(n,e){return n&&kae(n,e,gw)},function(n,e){if(n==null)return n;if(!fw(n))return _(n,e);for(var t=n.length,r=-1,i=Object(n);++r<t&&e(i[r],r,i)!==!1;);return n});let Eae=function(n,e){var t=-1,r=fw(n)?Array(n.length):[];return Rae(n,function(i,a,g){r[++t]=e(i,a,g)}),r},Aae=function(n,e){var t=n.length;for(n.sort(e);t--;)n[t]=n[t].value;return n},Mae=function(n,e){if(n!==e){var t=n!==void 0,r=n===null,i=n==n,a=Sc(n),g=e!==void 0,R=e===null,L=e==e,W=Sc(e);if(!R&&!W&&!a&&n>e||a&&g&&L&&!R&&!W||r&&g&&L||!t&&L||!i)return 1;if(!r&&!a&&!W&&n<e||W&&t&&i&&!r&&!a||R&&t&&i||!g&&i||!L)return-1}return 0},Dae=function(n,e,t){for(var r=-1,i=n.criteria,a=e.criteria,g=i.length,R=t.length;++r<g;){var L=Mae(i[r],a[r]);if(L)return r>=R?L:L*(t[r]=="desc"?-1:1)}return n.index-e.index},Oae=function(n,e,t){e=e.length?lw(e,function(i){return Ka(i)?function(a){return mw(a,i.length===1?i[0]:i)}:i}):[_d];var r=-1;return e=lw(e,z_(Tae)),Aae(Eae(n,function(i,a,g){return{criteria:lw(e,function(R){return R(i)}),index:++r,value:i}}),function(i,a){return Dae(i,a,t)})};(function(n,e){return y7(v7(n,void 0,_d),n+"")})(function(n,e){if(n==null)return[];var t=e.length;return t>1&&zM(n,e[0],e[1])?e=[]:t>2&&zM(e[0],e[1],e[2])&&(e=[e[0]]),Oae(n,dv(e,1),[])});class Nae extends T9{constructor(e){super(e),this.row=e.row,this.col=e.col,this.sheetId=e.sheetId,this.cellText=e.cellText}toJSON(){return Object.assign(super.toJSON(),this._getProperties())}toObject(){return Object.assign(super.toObject(),this._getProperties())}_getProperties(){return{row:this.row,col:this.col,sheetId:this.sheetId,cellText:this.cellText}}static createReply(e){return QM.fromJSON(e)}getReplyIndex(e){for(let t=0;t<this.replies.length;t++)if(this.replies[t].id===e)return t;return-1}}class QM extends x9{static fromJSON(e){return new QM(e)}}let Pae=class extends dae{static createComment(n){return Nae.fromJSON(n)}filterBySheet(n,e){return e===void 0&&(e=!1),this.getAllCommentValues().filter(t=>t.sheetId===n&&(!e||t.status===0))}createRowCol(n,e,t,r){let i=[];for(let a in this.comments){let g=this.comments[a];g.sheetId===n&&g[e]>=t&&(g[e]+=r,i.push([g.id,g.toJSON()]))}i.length>0&&this.emit("commentChanged",i)}removeRowCol(n,e,t,r){let i=[];for(let a in this.comments){let g=this.comments[a];g.sheetId!==n||g[e]<t||(g[e]<=t+r-1?(delete this.comments[g.id],i.push([g.id,null])):(g[e]-=r,i.push([g.id,g.toJSON()])))}i.length>0&&this.emit("commentChanged",i)}sort(n,e,t){let r=this.getAllCommentValues().filter(R=>R.sheetId===n&&t.includes(R));if(r.length===0)return[];let i=[],a=t.getTopLeftCorner().row,g=[];for(let R=0;R<r.length;R++){let L=r[R],W=e[L.row-a]+a;L.status===0&&g.push([L,L.row]),L.row=W,i.push([L.id,L.toJSON()])}return i.length>0&&this.emit("commentChanged",i),g}moveRow(n,e){this._moveRowCol("row",n,e)}moveCol(n,e){this._moveRowCol("col",n,e)}_moveRowCol(n,e,t){let r=[];this.getAllCommentValues().forEach(i=>{i.sheetId!==e||i[n]<t.sec[0].start||i[n]>t.sec[1].end||(i[n]<t.sec[1].start?i[n]+=t.sec[1].amount:i[n]-=t.sec[0].amount,r.push([i.id,i.toJSON()]))}),r.length>0&&this.emit("commentChanged",r)}copy(){return this}getStateJSON(){return{comments:this.toJSON()}}},Bae=function(n,e,t,r){if(!fa(n))return n;e=om(e,n);for(var i=-1,a=e.length,g=a-1,R=n;R!=null&&++i<a;){var L=am(e[i]),W=t;if(L==="__proto__"||L==="constructor"||L==="prototype")break;if(i!=g){var K=R[L];(W=void 0)==void 0&&(W=fa(K)?K:$_(e[i+1])?[]:{})}yM(R,L,W),R=R[L]}return n},Lae=function(n,e,t){for(var r=-1,i=e.length,a={};++r<i;){var g=e[r],R=mw(n,g);t(R,g)&&Bae(a,om(g,n),R)}return a};var L9=w7(function(n,e){return n==null?{}:Lae(n,e,function(t,r){return B9(n,r)})});async function*Fae(n,e,t){function r(W){let K=e.index.order.indexOf(W),Q=e.index.sheets[W];return n.createSheet({sheetId:W,snapshot:e[W],deferInit:!0},K,Q)}V9(n,e);let i=e.index.order.slice(0),a=function(W,K){let Q=K.order,oe=typeof W=="string"?Q.indexOf(W):-1;function se(he){return he&&!he.hidden}oe=oe<0?0:oe;for(let he=oe;he>=0;he--)if(se(K.sheets[Q[he]]))return he;for(let he=oe+1;he<Q.length;he++)if(se(K.sheets[Q[he]]))return he;return-1}(t,e.index);t=i[a];let g=null;if(t){i.splice(a,1);let W=e[t],K=L9(W,["filter","drawing","validation","cfs"]);W.cfs=null,W.validation=null,W.drawing=null,W.filter=null;let Q=r(t);Q.notifyDataReady(),Q.notifyPluginsReady(),n.setCurrent(t),g={sheet:Q,settings:K},yield{state:0}}let R=[];for(let W of i)await fs(),R.push(r(W)),yield{state:1};for(let W of R)await fs(),W.notifyDataReady(),yield{state:1};for(let W of R)await fs(),W.notifyPluginsReady(),yield{state:1};yield{state:2};let L=!1;return g&&(L=n.getController().recalcUnknownRefs(g.sheet)||L,n.forAll(W=>{W.sheet.getHyperlinkModel().recalcUnknownRefs()}),function(W){let K=!1,Q=["synoValidation","synoDrawingController","synoFilter","synoConditionalFormat"],{sheet:oe,settings:se}=W;for(let he=0;he<Q.length;he++)K=oe.getPlugin(Q[he]).initData(se)||K;return K}(g)&&(L=!0,n.current.getPlugin("synoRenderCache").clearAllHeightCache())),L}function F9(n,e,t){let{activeId:r,onActiveInit:i,runCalculator:a=!0}=t,{abort:g,processDelayInfo:R}=function(L,W){let K=!1,Q=(async()=>{let oe=await L.next();for(;!oe.done&&oe.value.state!==2;){if(K)return;oe.value.state===0&&W?.(),oe=await L.next()}})();return{processDelayInfo:()=>Q.then(async()=>{let oe=await L.next();for(;!oe.done;)oe=await L.next();return oe.value}),abort:function(){K=!0}}}(Fae(n,e,r),i);return{abort:g,processDelayInfo:async()=>{let L=await R();return a&&n.getAsyncCalculator().start(),L}}}function V9(n,e){var t,r;t=n.getStyleManager(),(r=e.style).fonts=r.fonts.map(a=>ll(cs,a)),r.alignments=r.alignments.map(a=>ll(Nu,a)),t.init(r),n.getNameManager().init(e.define),n.getPivotTableManager().init({caches:e.pivotCaches,tables:e.pivotTables});let i=Pae.fromJSON(e.comment||[]);n.setCommentStore(i),n.getRuleStore().init(e.protection||[]),n.getExternalManager().init(e.externals),n.setMaxIndex(e.index.maxIndex||0),n.setMaxPivotTableIndex(e.index.maxPivotIndex??0),e.index.order=ts(e.index.order)}class H9{constructor(e,t){this.sep="/",this.prebuilt=t,this.fields={},this.order=[],this.regex=this._parse(e)}static preBuild(e){let t=[];e.months.forEach(function(i){let a=i[2].toLowerCase();t.push(a);let g=i[1];g.charAt(g.length-1)==="."&&g.replace(/\.$/,"\\.?"),g!==a&&t.push(g.toLowerCase())}),t.sort(function(i,a){return a.length-i.length});let r={_rawMonthRegex:"(\\d\\d?|"+t.join("|")+")",monthsMap:{},abbrMonthsMap:{}};return e.months.forEach(function(i,a){r.abbrMonthsMap[i[1].replace(/\.$/,"").toLowerCase()]=a,r.monthsMap[i[2].toLowerCase()]=a}),r}_parse(e){let t=e.length;for(let r=0;r<t&&this.order.length<3;r++)switch(e.charCodeAt(r)){case 68:this.order.push("d"),this.fields.d=this.order.length;break;case 77:this.order.push("m"),this.fields.m=this.order.length;break;case 89:this.order.push("y"),this.fields.y=this.order.length}return e.indexOf("-")!==-1?this.sep="-":e.indexOf(".")!==-1&&(this.sep='"."'),e=fe(e).replace(/\s+/g,"\\s+"),this.fields.d&&(e=e.replace("D","(\\d\\d?)")),this.fields.y&&(e=e.replace("Y","(\\d{4}|\\d\\d)")),this.fields.m&&(e=e.replace("M",this.prebuilt._rawMonthRegex)),RegExp("^"+e+"$","i")}match(e,t){let r,i,a,g,R=e.match(this.regex);if(!R)return null;let L=new Date,W=0,K=0,Q=0;if(this.fields.y){if(isNaN(r=parseInt(g=R[this.fields.y],10))||r<=0)return null;W=4,g.length===2&&(r+=2e3,W=2)}else r=L.getFullYear();if(this.fields.d){if(isNaN(a=parseInt(g=R[this.fields.d],10))||a<0||a>31||r!==1900&&a===0)return null;Q=g.length===2&&a<10?2:1}else a=L.getDate();if(this.fields.m)if(g=R[this.fields.m],/^\d+$/.test(g))i=parseInt(g,10)-1,K=g.length===2&&i<9?2:1;else{let{monthsMap:se,abbrMonthsMap:he}=this.prebuilt;(g=g.replace(/\.$/,"").toLowerCase())in se?(i=se[g],K=4):g in he&&(i=he[g],K=3)}if(i===void 0||isNaN(i)||!(i>=0&&i<12))return null;let oe={v:new Date(r,i,a,0),d:!0};return t&&(oe.fc=this._getFc(W,K,Q)),oe}_getFc(e,t,r){return this.order.reduce((i,a)=>(a==="y"?i.push("y".repeat(e)):a==="m"?i.push("m".repeat(t)):a==="d"&&i.push("d".repeat(r)),i),[]).join(this.sep)}}class $9{constructor(e,t){this.prebuilt=t,this.format=e,this.regex=this.parse(e,t)}static preBuild(e){let{long_day_period:t,short_day_period:r}=e;return{tokens:/"[^"]*"|AM\\\/PM|hh|mm|ss|h|m|s|\s+/g,rawPeriodRegex:["(",t.concat(r).sort(function(i,a){return a.length-i.length}).map(function(i){return fe(i)}).join("|"),")"].join(""),rawNumberRegex:"(\\d+(?:\\.\\d+)?)",periodMap:{[r[0].toLowerCase()]:"A",[r[1].toLowerCase()]:"P",[t[0].toLowerCase()]:"AM",[t[1].toLowerCase()]:"PM"}}}parse(e,t){return RegExp("^"+fe(e).replace(t.tokens,r=>r.trim().length===0?"\\s+":r==="AM\\/PM"?t.rawPeriodRegex:r.charCodeAt(0)===34&&r.charCodeAt(r.length-1)===34?r.slice(1,-1).replace(/\s+/g,"\\s+"):r==="ss"||r==="s"?t.rawNumberRegex:"(\\d+)")+"$","i")}match(e,t){let r,i,a,g,R=e.match(this.regex);if(!R)return null;let L=this.prebuilt.periodMap,W=R.length;if((g=L[R[1].toLowerCase()])!==void 0?(r=parseInt(R[2],10),i=parseInt(R[3],10),a=R[4]?parseInt(R[4],10):0):(g=L[R[W-1].toLowerCase()])!==void 0?(r=parseInt(R[1],10),i=parseInt(R[2],10),a=R[4]?parseInt(R[3],10):0):(r=parseInt(R[1],10),i=parseInt(R[2],10),a=R[3]?parseInt(R[3],10):0),isNaN(r)||isNaN(i)||isNaN(a)||g&&r>12)return null;(g==="P"||g==="PM")&&r<12?r+=12:(g==="A"||g==="AM")&&r===12&&(r-=12);let K={v:new Date(1900,0,0,r,i,a),t:!0};return t&&(K.fc=this.getFc(this.format,r,i,a)),K}getFc(e,t,r,i){return 3600*t+60*r+i<86400?this.format:this.format.replace(/hh|h/,function(a){return"["+a+"]"})}}let Vae=class{constructor(n,e,t){this.d1900Jan0=new Date(1900,0,0);let r=H9.preBuild(n);this.dateRules=e.map(a=>new H9(a,r));let i=$9.preBuild(n);this.timeRules=t.map(a=>new $9(a,i))}parse(n,e){let t,r,i=null,a=null,g=n.split(/\s+/);for(let R=0;R<g.length;R++)if(t=g.slice(0,R).join(" "),r=g.slice(R).join(" "),i=t?this.parseDate(t,e):null,a=r?this.parseTime(r,e):null,(i||!t)&&(a||!r)||(a=t?this.parseTime(t,e):null,i=r?this.parseDate(r,e):null,(a||!t)&&(i||!r)))return this.mergeDateTime(i,a,e);return null}parseDate(n,e){let t=null;for(let r=0;r<this.dateRules.length&&(t=this.dateRules[r].match(n,e))===null;r++);return t}parseTime(n,e){let t=null;for(let r=0;r<this.timeRules.length&&(t=this.timeRules[r].match(n,e))===null;r++);return t}mergeDateTime(n,e,t){if(!n||!e)return n||e;let r={v:new Date(n.v.getTime()+(e.v.getTime()-this.d1900Jan0.getTime()))};return t&&(r.fc=[n.fc,e.fc].join(" ")),r}};function z9(n){return n==null||n===""}class Hae{constructor({dec_sym:e,group_sym:t}){this.decSymbol=e,this.groupSymbol=t;let r=fe(this.decSymbol),i=fe(this.groupSymbol),a="^([+-]?)(\\d+(?:\\.\\d*)?|\\.\\d+)([eE][+-]?\\d+)?$",g="^([+-]?)(\\d{1,3})(,\\d{3})*(\\.\\d+)?$";if(this.normalNumberSymbol=/[.,]/g,this.normalRegularNum=new RegExp(a),this.normalGroupedNum=new RegExp(g),this.decSymbol==="."){this.localizeToken=this.normalizeToken=L=>L.getText();let R=L=>L;this.localizeFormula=this.normalizeFormula=R,this.localizeNumeric=this.normalizeNumeric=R,this.localeNumberSymbol=this.normalNumberSymbol,this.localeRegularNum=this.normalRegularNum,this.localeGroupedNum=this.normalGroupedNum,this.localeFormulaNum=new RegExp(a.slice(0,-1)),this.localeTokenize=Ji}else{let R=a.replace(/\\\./g,r),L=g.replace(/\(,|\\\./g,W=>W==="(,"?`(${i}`:r);this.localeNumberSymbol=RegExp("["+r+i+"]","g"),this.localeRegularNum=new RegExp(R),this.localeGroupedNum=new RegExp(L),this.localeFormulaNum=new RegExp(R.slice(0,-1))}}localeLex(e,t){t=t&&t.symbol;let r=e._input.charAt(0);if(r==="\\")return t!==Ft["{"]?e.parseError(`Unrecognized text: ${e._input}`):(e.yytext=r,e._input=e._input.substr(1),e.matched=e.matched+e.yytext,Ft.COMMA);if(r===";")return e.yytext=r,e._input=e._input.substr(1),e.matched=e.matched+e.yytext,t===Ft["("]?Ft.COMMA:Ft.SEMICOLON;let i=this.localeFormulaNum.exec(e._input);return i!==null?(e.yytext=i[0],e._input=e._input.substr(i[0].length),e.matched=e.matched+e.yytext,Ft.NUMBER):r===","||r==="."?e.parseError(`Unrecognized text: ${e._input}`):e.next()}localeTokenize(e){let t=new ys;for(Gn.setInput(e);!Gn.done;){let r=this.localeLex(Gn,t.getTopScope());Gn.yytext&&t.append(r,Gn.yytext)}return t}normalizeToken(e){let t=e.getText();switch(e.symbol){case Ft.COMMA:return",";case Ft.NUMBER:return this.normalizeNumeric(t)}return t}normalizeFormula(e){let t="",r=this.localeTokenize(e);for(let i=0,a=r.size();i<a;i++){let g=r.get(i);t+=this.normalizeToken(g)}return t}localizeToken(e,t){let r=e.getText(),i=t[t.length-1];switch(e.symbol){case Ft["("]:case Ft["{"]:t.push(e);break;case Ft[")"]:case Ft["}"]:e.isMatch(i)&&t.pop();break;case Ft.COMMA:if((i=i&&i.symbol)===Ft["("])return";";if(i===Ft["{"])return"\\";break;case Ft.NUMBER:return this.localizeNumeric(r);case Ft.SEMICOLON:if((i=i&&i.symbol)===Ft["("])return","}return r}localizeFormula(e){let t=[],r="",i=Ji(e);for(let a=0,g=i.size();a<g;a++){let R=i.get(a);r+=this.localizeToken(R,t)}return r}normalizeNumeric(e){let t=this.decSymbol;return e.replace(this.localeNumberSymbol,r=>r===t?".":",")}localizeNumeric(e){return e.replace(this.normalNumberSymbol,t=>t==="."?this.decSymbol:this.groupSymbol)}normalize(e){return z9(e)?e:typeof e=="number"?e.toString():be(e)?this.normalizeFormula(e):this.localeRegularNum.test(e)||this.localeGroupedNum.test(e)?this.normalizeNumeric(e):e.toString()}localize(e){return z9(e)?e:typeof e=="number"?this.localizeNumeric(e.toString()):e===!0||e===!1?e?"TRUE":"FALSE":be(e)?this.localizeFormula(e):this.normalRegularNum.test(e)||this.normalGroupedNum.test(e)?this.localizeNumeric(e):e.toString()}}let $ae=class{constructor(n){this.nbsp=RegExp(" ","g"),this.localeHelper=n,this.generalCurrencySym=["$","€"];let e=n.getCode();(e==="en_US"||["zh","ja","ko"].includes(e.slice(0,e.indexOf("_"))))&&this.generalCurrencySym.push("US$")}getValidNumber(n){let e=parseFloat(n);if(Number.isNaN(e))return e;e=Tp.number.toEffective(e);try{n=n.charAt(0)==="+"?n.slice(1):n;let t=new(Gt())(n);return t.eq(e)?e:parseFloat(t.toPrecision(15))}catch{}return NaN}normalizeNumericString(n){let e=this._getLocaleData(),t=this.localeHelper.getLocaleConverter().localeNumberSymbol;return t?n.replace(t,function(r){return r===e.dec_sym?".":""}):n}parseNumericString(n){let e,t;n=n.trim();let r=this.localeHelper.getLocaleConverter();return(e=r.localeRegularNum.exec(n))!==null?isNaN(t=this.getValidNumber(this.normalizeNumericString(n)))?null:e[3]?0>e[3].indexOf("+")&&0>e[3].indexOf("-")?{v:t,fc:"0.00E-00"}:{v:t,fc:"0.00E+00"}:{v:t}:(e=r.localeGroupedNum.exec(n))!==null?isNaN(t=this.getValidNumber(this.normalizeNumericString(n)))?null:e.pop()?{v:t,fc:"#,##0.00"}:{v:t,fc:"#,##0"}:null}parsePercentageString(n){let e,t=this._getLocaleData().dec_sym;if(n.length<=1||n.charAt(n.length-1)!=="%")return null;if(e=this.parseNumericString(n.slice(0,-1))){if(e.fc=e.fc||(0>n.indexOf(t)?"0":"0.00"),e.v=+(e.v/100).toPrecision(15),e.fc.indexOf("E")>=0)return e;e.fc+="%"}return e||null}_parseCurrencyString(n,e,t,r){let i=n.indexOf(e);if(i===-1)return null;let a=!1,g,R=null,L=i+e.length;if(i===0?g=n.slice(L):i===1&&(n[0]==="+"||n[0]==="-")?g=n[0]+n.slice(L).trim():r&&L===n.length&&(g=n.slice(0,i),a=!0),g&&(R=this.parseNumericString(g)),R){let W=`[$${e}]`,K=R.fc||(n.includes(t)?"#,##0.00":"#,##0");R.fc=a?K+W:W+K}return R}parseCurrencyString(n){let{currency_sym:e,dec_sym:t}=this._getLocaleData(),r=this._parseCurrencyString(n,e,t,!0);for(let i of this.generalCurrencySym)r??=this._parseCurrencyString(n,i,t,!1);return r||null}parseFinancialString(n){let e;if(n.length<=2||n.charAt(0)+n.charAt(n.length-1)!=="()"||!(e=this.parseNumericString(n.slice(1,-1)))||e.v<0)return null;let t=this._getLocaleData().dec_sym;return e.v=-e.v,e.fc=e.fc||(0>n.indexOf(t)?"#,##0":"#,##0.00"),e.fc=e.fc+";("+e.fc+")",e}parseDateTimeString(n){let e=this.localeHelper.getDateParser().parse(n,!0);return e&&{...e,v:Tp.date.serialize(e.v)}}parseBooleanString(n){let e=n.toUpperCase();return e==="TRUE"||e==="FALSE"?{v:e==="TRUE"}:null}parse(n){let e;if(typeof n!="string")return null;let t=n.trim().replace(this.nbsp," ");return(e=this.parseBooleanString(t))||(e=this.parsePercentageString(t))||(e=this.parseCurrencyString(t))||(e=this.parseFinancialString(t))?e:(e=this.parseNumericString(t))?(e.numeric=!0,e):(e=this.parseDateTimeString(t))?(e.datetime=!0,e):null}_getLocaleData(){return this.localeHelper.getData()}},W9=class{constructor(n="en_US",e={}){this.code=n,this.collator=new Intl.Collator(n.replace("_","-"),{sensitivity:"accent"}),this.ssf=new Eo,this.localeData=this.initLocale(e),this.dateParser=this.createDateParser(this.localeData),this.localeConverter=new Hae(this.localeData),this.inputParser=new $ae(this),this.pivotLocale=new HM(this)}getCode(){return this.code}getCollator(){return this.collator}getSSF(){return this.ssf}getDateParser(){return this.dateParser}getLocaleConverter(){return this.localeConverter}getInputParser(){return this.inputParser}getPivotLocale(){return this.pivotLocale}getData(){return this.localeData}initLocale(n){let e=Object.entries(n).filter(i=>Ls.has(i[0])).map(i=>[Ls.get(i[0]),i[1]]),t=Object.assign(this.ssf.getLocaleData(),Object.fromEntries(e)),r={months:t.MONTHS,days:t.DAYS,dec_sym:t.DEC,group_sym:t.GROUP,currency_sym:t.CURRENCY_SYM,date_patterns:["M/D/Y","M/D"],long_time:"hh:mm:ss AM/PM",long_day_period:t.AMPM,short_time:"hh:mm AM/PM",short_date:"M/d/YYYY",short_day_period:t.SHORT_AMPM,pivot_table:n.pivot_table,...n};return Object.assign(this.createLocaleExt(r),r)}createLocaleExt(n){let e=n.short_time,t=e.charAt(e.lastIndexOf("h")+1)||":",r=n.short_date,i=["hh","mm","ss"].join(t);return{time_sym:t,datetime:r+" "+i,duration:["[hh]","mm","ss"].join(t)}}createDateParser(n){let e=n.date_patterns||[];["Y-M-D","Y/M/D"].forEach(i=>{e.includes(i)||e.push(i)});let t=[n.long_time,n.short_time],r=n.time_sym;return[["hh","mm","ss"].join(r),["hh","mm"].join(r)].forEach(i=>{t.includes(i)||t.push(i)}),new Vae(n,e,t)}};async function zae(n,e,t){let r=new sD(new W9(n.locale,n.locale_info),k7,t.getEnabledPlugins(),t.getConstants());if(await F9(r,n,{}).processDelayInfo(),e.length>0){let i=new S9(r);for(let a of e)i.process(cc(a)),await fs()}return r}class Wae extends pu.EventEmitter{constructor(e){super();let t=e?.entry??[];this.externalItemMap=new Map(t.map(r=>{let[i,a]=r;return[i,this.createExternalItem(a)]})),this.identifier=e?.identifier??"",this.rev=e?.rev??-1,this.title=e?.title??"",this.updateTime=e?.updateTime??0}createExternalItem(e,t){let r=new lae(e,t);return r.on("external_changed",()=>this.emit("external_changed")),r}setupWorkbookNotFound(){for(let[,e]of this.externalItemMap)e.isLoading()&&e.updateValue({value:kh(Wn.REF)})}async calculateChanges(e,t){if(!e)return this.setupWorkbookNotFound(),null;let{title:r,updateTime:i,snapshot:a,commandQueueInfo:g}=e,R=g.identifier,L=g.rev;if(R===this.identifier&&L===this.rev&&Array.from(this.externalItemMap.values()).every(Q=>!Q.isLoading()))return i===this.updateTime&&r===this.title?null:{identifier:R,rev:L,title:r,updateTime:i,changes:[]};let W=await zae(a,g.commands,t);await W.getAsyncCalculator().start();let K=[];for(let[Q,oe]of this.externalItemMap){let se=this.getWorkbookValue(W,Q);oe.isEqual(se)||K.push([Q,se]),await fs()}return{identifier:R,rev:L,title:r,updateTime:i,changes:K}}calculateEmptyRefChanges(){let e=[];for(let[t,r]of this.externalItemMap)r.getReferenceCount()===0&&e.push([t,null]);return e.length>0?{identifier:this.identifier,rev:this.rev,title:this.title,updateTime:this.updateTime,changes:e}:null}getWorkbookValue(e,t){let r=zf(t);if(!r||!r.shName)return{value:kh(Wn.REF)};let i=e.getSheetByName(r.shName);if(!i)return{value:kh(Wn.REF)};let a=new sw,g=e.getFormulaParser().exec(t,{item:a,sheetId:i.sheetId}),R={value:kh(g.error||g.result)};return a.nfId&&(R.fc=ZE(e,a.nfId)),R}updateEntries(e){let{identifier:t,rev:r,title:i,updateTime:a,changes:g}=e;for(let[R,L]of g)if(L){let W=this.externalItemMap.get(R);W?W.updateValue(L):this.externalItemMap.set(R,this.createExternalItem(L))}else this.externalItemMap.delete(R);this.identifier=t,this.rev=r,this.title=i,this.updateTime=a,this.emit("external_changed")}hasValue(e){return!!this.externalItemMap.get(e)}getValue(e){let t=this.externalItemMap.get(e);return t||(t=this.createExternalItem({value:kh(Wn.LOADING)},!0),this.externalItemMap.set(e,t)),t}toJSON(){return{entry:Array.from(this.externalItemMap).filter(e=>{let[,t]=e;return!t.isLoading()}).map(e=>{let[t,r]=e;return[t,r.toJSON()]}),identifier:this.identifier,rev:this.rev,title:this.title,updateTime:this.updateTime}}getExternalCount(){return this.externalItemMap.size}getLinkInfo(){let e={};for(let t of this.externalItemMap.values())for(let r of t.iterateReference())e[r.sheet.sheetId]||(e[r.sheet.sheetId]=[]),uae(e[r.sheet.sheetId],{row:r.row,col:r.col});return{title:this.title,updateTime:this.updateTime,ref:e}}}class Uae extends pu.EventEmitter{constructor(){super(),this.externalMap=new Map}init(e){e&&(this.externalMap=new Map(e.entry.map(t=>{let[r,i]=t;return[r,this.createExternalLink(r,i)]})))}createExternalLink(e,t){let r=new Wae(t);return r.on("external_changed",()=>this.emitExternalChanged(e)),r}getOrCreateExternalModel(e){let t=this.externalMap.get(e);return t||(t=this.createExternalLink(e),this.externalMap.set(e,t),this.emitExternalChanged(e)),t}emitExternalChanged(e){this.emit("external_changed",e,this.getLinkInfo(e))}async calculateChanges(e,t,r){return this.externalMap.get(e)?.calculateChanges(t,r)??null}calculateEmptyRefChanges(){let e=[];for(let[t,r]of this.externalMap){let i=r.calculateEmptyRefChanges();i&&e.push([t,i])}return e}updateExternal(e,t){this.getOrCreateExternalModel(e).updateEntries(t)}removeExternal(e){for(let t of e)this.externalMap.delete(t),this.emit("external_changed",t,null)}hasExternalValue(e,t){return this.externalMap.get(e)?.hasValue(t)??!1}getExternalValue(e,t){return this.getOrCreateExternalModel(e).getValue(t)}listLinkIds(){return Array.from(this.externalMap.keys())}listLinkInfo(){return Array.from(this.externalMap.entries()).map(e=>{let[t,r]=e;return{linkId:t,...r.getLinkInfo()}})}getLinkInfo(e){let t=this.externalMap.get(e);return t&&t.getExternalCount()!==0?{...t.getLinkInfo(),linkId:e}:null}toJSON(){return{entry:Array.from(this.externalMap).map(e=>{let[t,r]=e;return[t,r.toJSON()]}).filter(e=>{let[t,r]=e;return r.entry.length>0})}}}var xo=function(n){return n[n.NONE=0]="NONE",n[n.EDITOR=1]="EDITOR",n[n.WORKBOOK=2]="WORKBOOK",n[n.FILTER=4]="FILTER",n[n.DEFINE=16]="DEFINE",n[n.IMAGE=32]="IMAGE",n[n.CHART=64]="CHART",n[n.RULE=128]="RULE",n[n.VIEWPORT=256]="VIEWPORT",n[n.SEARCH=512]="SEARCH",n[n.COMMENT=1024]="COMMENT",n[n.ALL=2047]="ALL",n}({});class ww{constructor(e,t){this.name=e,this.shId=t,this.deps=[]}static createId(e,t){return`${t},${e}`}}class Gae{constructor(e){this.blocks={},this.itemCollection={},this.workbook=e}getFormulaRange(e){let t=e.name,r=this.getIdByRange(e);return this._getFormulaRange(t,r)}getIdByRange(e){let{name:t,shName:r}=e,i=r&&this.workbook.getIdByName(r);if(i===void 0)return this.workbook.getNameManager().getWorkbookScope();let a=ww.createId(t,i);return this.itemCollection[a]===void 0?this.workbook.getNameManager().getWorkbookScope():i}_getFormulaRange(e,t){return this.blocks[t]&&this.blocks[t][e]}addFormulaRange(e){let t=e._range.name,r=this.getIdByRange(e._range);this.blocks[r]===void 0&&(this.blocks[r]={}),this.blocks[r][t]=e}matchFormulaRanges(e,t,r){let i=this._getCoordDeps(e,t,r);this._addIndirectDeps(i);let a=[];for(let g=0;g<i.length;g++){let{name:R,shId:L}=i[g],W=this._getFormulaRange(R,L);W!==void 0&&a.push(W)}return a}_getCoordDeps(e,t,r){let i=[];return this.forAllRange((a,g)=>{if(a.includes(e,t)&&a.shName===r)return i.push(g),!1}),i}_getNameDeps(e,t){let r=[];return this.forAllRange((i,a)=>{if(i.name===e&&this.getIdByRange(i)===t)return r.push(a),!1}),r}_addIndirectDeps(e){let t=new Set;for(let r=0;r<e.length;r++){let{name:i,shId:a}=e[r];t.add(e[r]);let g=this._getNameDeps(i,a);for(let R=0;R<g.length;R++)t.has(g[R])||e.push(g[R])}}getNameDependencies(e,t){e=e.toLowerCase();let r=this._getNameDeps(e,t);this._addIndirectDeps(r);let i=[],a=[],g=this._getFormulaRange(e,t);g!==void 0&&(ki(i,g.getRegisteredItems()),ki(a,g.getRegisteredConds()));for(let R=0;R<r.length;R++){let{name:L,shId:W}=r[R],K=this._getFormulaRange(L,W);K!==void 0&&(ki(i,K.getRegisteredItems()),ki(a,K.getRegisteredConds()))}return{deps:ts(i),conds:ts(a)}}getRefItemsToRow(e,t){return this._getRefItemsToRowCol("row",e,t)}getRefItemsToColumn(e,t){return this._getRefItemsToRowCol("col",e,t)}_getRefItemsToRowCol(e,t,r){let i=[],a=`isBetween${we(e)}`;this.forAllRange((R,L)=>{if(R[a](t,r))return i.push(L),!1});let g=[];this._addIndirectDeps(i);for(let R=0;R<i.length;R++){let{name:L,shId:W}=i[R],K=this._getFormulaRange(L,W);K!==void 0&&g.push(K)}return ts(g)}getAllFormulaRanges(){let e=[];for(let t in this.blocks)for(let r in this.blocks[t]){let i=this.blocks[t][r];i!==void 0&&e.push(i)}return ts(e)}update(e,t,r){e=e.toLowerCase();let i=ww.createId(e,r),a=Ac(t);this.itemCollection[i]===void 0&&(this.itemCollection[i]=new ww(e,r)),this.itemCollection[i].deps=a}remove(e,t){e=e.toLowerCase();let r=ww.createId(e,t);this.itemCollection[r]!==void 0&&delete this.itemCollection[r]}forAllRange(e){for(let t in this.itemCollection)if(this.itemCollection[t]){let r=this.itemCollection[t];for(let i=0,a=r.deps.length;i<a&&e(r.deps[i],r)!==!1;i++);}}resolveRange(e){let t=e.name,r=this.getIdByRange(e),i=this._getNameDeps(t,r);this._addIndirectDeps(i);let a=[],g=this.itemCollection[ww.createId(t,r)];g!==void 0&&ki(a,g.deps);for(let R=0;R<i.length;R++)ki(a,i[R].deps);return a}}class jae{constructor(e){this.variables={},this.container=new Gae(e)}init(e){Ao(e,(t,r)=>{for(let i in t)t[i]&&this.set(i,t[i],r)})}getContainer(){return this.container}getWorkbookScope(){return"global"}getVariable(e,t){return this.variables[t]?.[e.toLowerCase()]}setVariable(e,t,r){if(this.variables[r]===void 0){if(t===void 0)return;this.variables[r]={}}let i=e.toLowerCase(),a=this.variables[r][i];return t===void 0?delete this.variables[r][i]:this.variables[r][i]={name:e,value:t},a}get(e,t){return t=t||this.getWorkbookScope(),this.getVariable(e,t)?.value}set(e,t,r){r=r||this.getWorkbookScope(),this.container.update(e,t,r);let i=this.setVariable(e,t,r);return i&&i.value}remove(e,t){t=t||this.getWorkbookScope(),this.container.remove(e,t);let r=this.setVariable(e,void 0,t);return r&&r.value}list(){let e=[];return this.each((t,r)=>{let{name:i,value:a}=t;e.push({name:i,value:a,scope:r})}),e}each(e){for(let t in this.variables)if(fi(this.variables,t)){let r=this.variables[t];for(let i in r)if(r[i]!==void 0&&e(r[i],t)===!1)return}}toJSON(){let e={};return Ao(this.variables,(t,r)=>{for(let i in e[r]={},t)if(fi(t,i)){let a=t[i];e[r][a.name]=a.value}}),e}getStateJSON(){return{workbookScope:this.getWorkbookScope(),list:this.list()}}}let U9=class{constructor(){this.buckets={},this.reverseMap=new WeakMap}getByName(n){return this.buckets[n]||[]}addItem(n,e){Array.isArray(this.buckets[n])||(this.buckets[n]=[]),this.buckets[n].push(e),this.reverseMap.set(e,n)}removeItem(n){let e=this.reverseMap.get(n),t=this.index(e,n);t!==-1&&this.buckets[e].splice(t,1)}index(n,e){let t=this.buckets[n];return t?t.indexOf(e):-1}removeBucket(n){this.buckets[n]&&delete this.buckets[n]}},qae=class{constructor(n){this.wbController=n}getWorkbook(){return this.wbController.workbook}getNameManager(){return this.getWorkbook().getNameManager()}init(){this.registerHookListener()}registerHookListener(){let n=this,e=this.getWorkbook();e.hooks.add("afterCreateRow",function(t,r){n.afterAlterGrid(this,"row",t,r)}),e.hooks.add("afterCreateCol",function(t,r){n.afterAlterGrid(this,"col",t,r)}),e.hooks.add("afterRemoveRow",function(t,r){n.afterAlterGrid(this,"row",t,-r)}),e.hooks.add("afterRemoveCol",function(t,r){n.afterAlterGrid(this,"col",t,-r)}),e.hooks.add("beforeMoveRow",function(t,r,i){n.beforeMove(this,"row",t,r,i)}),e.hooks.add("beforeMoveCol",function(t,r,i){n.beforeMove(this,"col",t,r,i)})}create(n,e,t){t=t||this.getNameManager().getWorkbookScope(),this.getNameManager().get(n,t)===void 0&&(this.getNameManager().set(n,e,t),this.wbController.emit("afterCreateDefinedName",n,e,t),this._notifyUpdate([[n,t]]))}remove(n,e){e=e||this.getNameManager().getWorkbookScope();let t=this.getNameManager().remove(n,e);return t!==void 0&&(this.wbController.emit("afterRemoveDefinedName",n,t,e),this._notifyUpdate([[n,e]])),t}modify(n,e,t){t=t||this.getNameManager().getWorkbookScope();let r=this.getNameManager().get(n,t);if(r===void 0||!e)return;let i=[],{name:a,value:g}=e;if(n!==a){if(this.getNameManager().get(a,t))return;this.getNameManager().remove(n,t),i.push([n,t])}(i.length>0||r!==g)&&(i.push([a,t]),this.getNameManager().set(a,g,t),this.wbController.emit("afterModifyDefinedName",{name:[n,a],value:[r,g],scope:t}),this._notifyUpdate(i))}afterAlterGrid(n,e,t,r){let i=[],a={delta:r,start:{[e]:t}};this.getNameManager().list().forEach(g=>{let{name:R,value:L,scope:W}=g,K=Ar.changeFormula(L,a,n.getName());L!==K&&(i.push([R,W]),this.getNameManager().set(R,K,W))}),this._notifyUpdate(i)}collectRemovedInfo(n,e,t){let r=[],i=n==="row"?"isBetweenRow":"isBetweenCol";return this.getNameManager().list().forEach(a=>{let g=Ac(a.value);for(let R=0;R<g.length;R++)if(g[R][i](e,e+t-1)){r.push(a);break}}),r}repair(n){let e=[];for(let t=0;t<n.length;t++){let{name:r,value:i,scope:a}=n[t],g=this.getNameManager().get(r,a);g!==void 0&&g!==i&&(this.getNameManager().set(r,i,a),e.push([r,a]))}this._notifyUpdate(e)}beforeMove(n,e,t,r,i){let a=r&&r.synoDefinedName||{},g=[],R={},L=!1;this.getNameManager().list().forEach(W=>{let{name:K,value:Q,scope:oe}=W,se=a[oe]&&a[oe][K],he=se===void 0;he&&(se=Ar.moveFormula(e,Q,t,n.getName())),Q!==se&&(g.push([K,oe]),this.getNameManager().set(K,se,oe),he&&(L=!0,R[oe]=R[oe]||{},R[oe][K]=Q))}),L&&(i.synoDefinedName=R),this._notifyUpdate(g)}moveFormulaRange(n,e,t,r){let i=[],a=[];this.getNameManager().list().forEach(g=>{let{name:R,value:L,scope:W}=g,K=Ar.changeFormulaRange(L,n,e,"",void 0,t);L!==K&&(a.push({name:R,value:L,scope:W}),i.push([R,W]),this.getNameManager().set(R,K,W))}),r.define=a,this._notifyUpdate(i)}removeFormulaRange(n,e){let t=[],r=[];this.getNameManager().list().forEach(i=>{let{name:a,value:g,scope:R}=i,L=Ar.removeFormulaRange(g,n,"");g!==L&&(r.push({name:a,value:g,scope:R}),t.push([a,R]),this.getNameManager().set(a,L,R))}),e.define=r,this._notifyUpdate(t)}_updateDependencies(n){let e=[],t=[],r=this.getNameManager().getContainer();for(let i=0;i<n.length;i++){let[a,g]=n[i],{deps:R,conds:L}=r.getNameDependencies(a,g);ki(e,R),ki(t,L)}for(let i of(e=ts(e),t=ts(t),e))this.getWorkbook().getAsyncCalculator().getFormulaDimensioner().setNeedDimension(i);this.wbController.recalcCrossReferences(e,"reset");for(let i=0;i<t.length;i++)t[i].notifyUpdate()}_notifyUpdate(n){n.length>0&&(this._updateDependencies(n),this.wbController.emit("afterUpdateDefinedName"),this.getWorkbook().notifyDataChange(xo.DEFINE))}onRenameSheet(n,e){let t=[],r=this.getNameManager();r.each((i,a)=>{let{value:g,name:R}=i,L=nu(g,n,e);g!==L&&(r.set(R,L,a),t.push([R,a]))}),this._notifyUpdate(t)}},Yae=class{constructor(n){this.wbController=n}getWorkbook(){return this.wbController.workbook}getCommentStore(){return this.getWorkbook().getCommentStore()}_notify(n,e){for(var t=arguments.length,r=Array(t>2?t-2:0),i=2;i<t;i++)r[i-2]=arguments[i];if(n&&n.sheetId){let a=this.getWorkbook().getSheetById(n.sheetId);a&&a.runHooks(e,...r)}}getReplyIndex(n,e){let t=this.getCommentStore().getCommentById(n);return t?t.getReplyIndex(e):-1}fillJSON(n,e){let t=Date.now();return{status:0,author:n,timestamp:t,id:pe(),lastModified:t,...e}}clearRangeComment(n,e){let t=[];for(let r of this.getCommentStore().getAllCommentValues())r.sheetId===n&&e.includes(r)&&t.push(r.toJSON());this.clearCommentFromJson(t)}populateComment(n){for(let e of n)e.id=pe();this.pasteCommentFromJson(n)}createComment(n,e){let t=this.fillJSON(n,e);this.getCommentStore().getCommentById(t.id)||(this.createCommentFromJSON(t),this.wbController.emit("afterCreateComment",t))}createCommentFromJSON(n){this.getCommentStore().createComment(n.author,n);let e=this.getCommentStore().getCommentById(n.id);e&&this._notify(e,"afterCreateComment",n)}replyComment(n,e){let t=this.fillJSON(n,e),r=this.getCommentStore().getCommentById(t.target);r&&(this.replyCommentFromJSON(t),this.wbController.emit("afterReplyComment",{...t,original_author:this.filterCommentAuthors(r)}),this._notify(r,"afterReplyComment",r))}filterCommentAuthors(n){if(!n)return;let e=new Set,t=n.author;return typeof t=="number"&&t>0&&e.add(t),n.replies?.forEach(r=>{typeof r.author=="number"&&r.author>0&&e.add(r.author)}),Array.from(e)}replyCommentFromJSON(n){this.getCommentStore().reply(n.author,n)}reopenComment(n,e,t){let r=this.fillJSON(n,{target:e,authorName:t});this.reopenCommentFromJSON(r),this.wbController.emit("afterReopenComment",r)}reopenCommentFromJSON(n){let e=this.getCommentStore().getCommentById(n.target);e&&(this.getCommentStore().reopen(n.author,n),this._notify(e,"afterReopenComment",e))}resolveComment(n,e,t){let r=this.fillJSON(n,{target:e,authorName:t});this.resolveCommentFromJSON(r),this.wbController.emit("afterResolveComment",r)}resolveCommentFromJSON(n){let e=this.getCommentStore().getCommentById(n.target);e&&(this.getCommentStore().resolve(n.author,n),this._notify(e,"afterResolveComment",e))}editComment(n,e,t,r){let i={author:n,replyId:t,text:r,lastModified:Date.now(),threadId:e};this.changeCommentFromJSON(i),this.wbController.emit("afterEditComment",i)}changeCommentFromJSON(n){let{author:e,replyId:t,text:r,lastModified:i,threadId:a}=n,g=this.getReplyIndex(a,t),R=r?"edit":"remove",L=a===t?"Comment":"Reply",W=`${R}${L}FromJSON`;switch(W){case"editCommentFromJSON":return this[W]({author:e,target:a,text:r,lastModified:i});case"editReplyFromJSON":return this[W]({author:e,target:a,text:r,replyIndex:g,lastModified:i});case"removeCommentFromJSON":return this[W]({author:e,target:a});case"removeReplyFromJSON":return this[W]({author:e,target:a,replyIndex:g})}}editCommentFromJSON(n){this.getCommentStore().getCommentById(n.target)&&this.getCommentStore().editCommentText(n.author,n)}editReplyFromJSON(n){this.getCommentStore().getCommentById(n.target)&&n.replyIndex>=0&&this.getCommentStore().editReplyText(n.author,n)}removeCommentFromJSON(n){let e=this.getCommentStore().getCommentById(n.target);e&&(this.getCommentStore().removeComment(n.author,n),this._notify(e,"afterRemoveComment",e))}removeReplyFromJSON(n){this.getCommentStore().getCommentById(n.target)&&n.replyIndex>=0&&this.getCommentStore().removeReply(n.author,n)}clearCommentFromJson(n){if(n.length!==0){for(let e of n)this.removeCommentFromJSON({author:e.author,target:e.id});this.wbController.emit("afterClearComment",n)}}pasteCommentFromJson(n){if(n.length!==0){for(let e of n)this.createCommentFromJSON(e);this.wbController.emit("afterPasteComment",n)}}},Kae=class extends Tre{constructor(n){super(),this.wbController=n}init(){this.registerHookListeners()}registerHookListeners(){let n=this.wbController.workbook.hooks,e=this;n.add("afterCreateRow",function(t,r,i){e.onInsertRowCol(this.sheetId,"row",t,r,i)}),n.add("afterCreateCol",function(t,r,i){e.onInsertRowCol(this.sheetId,"col",t,r,i)}),n.add("afterRemoveRow",function(t,r){e.onRemoveRowCol(this.sheetId,"row",t,r)}),n.add("afterRemoveCol",function(t,r){e.onRemoveRowCol(this.sheetId,"col",t,r)}),n.add("afterMoveRow",function(t){e.onMoveRowCol(this.sheetId,"row",t)}),n.add("afterMoveCol",function(t){e.onMoveRowCol(this.sheetId,"col",t)})}getStore(){return this.wbController.workbook.getRuleStore()}list(){return this.getStore().toJSON()}emit(n){for(var e=arguments.length,t=Array(e>1?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];this.wbController.emit(n,...t),this.refreshRules()}refreshRules(){this.wbController.workbook.notifyDataChange(xo.RULE)}onInsertRowCol(n,e,t,r,i){this.getStore().onInsertRowCol(n,e,t,r,i),this.refreshRules()}onRemoveRowCol(n,e,t,r){this.getStore().onRemoveRowCol(n,e,t,r),this.refreshRules()}onMoveRowCol(n,e,t){this.getStore().onMoveRowCol(n,e,t),this.refreshRules()}};class Xae extends pu.EventEmitter{constructor(e){super(),this.workbook=e,this.nameController=new qae(this),this.commentController=new Yae(this),this.ruleController=new Kae(this)}init(){this.nameController.init(),this.ruleController.init()}createWorksheet(e,t,r,i){let a=this.insertWorksheet(e,t,r,i);return a&&this.workbook.setMaxIndex(this.workbook.getMaxIndex()+1),a}deleteWorksheet(e,t){let r,i,a,g=this.workbook;if(!g.hasSheet(e)||g.getSheetCount()===1)return!1;if(!t){r=g.getSheetPos(e);let L=g.getSheetInfo(e);i={title:L.name,tabColor:L.color},a=this.workbook.generateWorksheetContent(e)||void 0}let R=g.removeSheet(e);if(R){let{items:L,conds:W,units:K}=R.getFormulaDepManager().getNotMyOwnItems(R);for(let Q of(R.destroy(),this.recalcCrossReferences(L,"renew"),W))Q.notifyUpdate();for(let Q of K)Q.notifyDeleteSheet();this.emit("deleteWorksheet",e,r,i,a),this.workbook.notifyDataChange(xo.WORKBOOK)}return!!R}dupWorksheet(e,t,r,i,a){a===void 0&&(a={});let g=this.workbook.getSheetById(e);if(!g)return null;let R={tabColor:this.workbook.getSheetColor(e),title:r},L={ws:G9(this.workbook.getWorksheetSnapshotSync(g),g.getName()||"",r)};if(!this.createWorksheet(i,t,R,L))return null;let W=this.workbook.getPivotTableManager();for(let[K,{tableId:Q,cacheId:oe}]of Object.entries(a)){let se=W.getTableById(K);if(!se)continue;let he=se.toJSON(),me=se.getCache().toJSON();he.id=Q,he.cacheId=oe,he.location.sheetId=i,me.id=oe,me.source.sheetId===e&&(me.source.sheetId=i),W.createPivotTable(he,me)}return i}undeleteWorksheet(e,t,r,i){let a=r.title;if(!a)return!1;for(;this.workbook.hasSheetName(a);)a=`${a}_conflict_${Math.floor(Date.now()/1e3)}`;a!==r.title&&(i.ws=G9(i.ws,r.title,a));let g=this.insertWorksheet(e,t,{title:a,tabColor:r.tabColor},i);return g&&(this.emit("undeleteWorksheet",e,t,r,i),this.workbook.notifyDataChange(xo.WORKBOOK)),g}reorderWorksheet(e){if(!Array.isArray(e))return!1;let t=this.workbook.getOrder(),r=this.workbook.setOrder(e);return r&&(this.emit("reorderWorksheet",t,e),this.workbook.notifyDataChange(xo.WORKBOOK)),r}renameWorksheet(e,t){let r=this.workbook.getSheetById(e);if(!(t=t.replace(RegExp("([\uD800-\uDBFF}][\uDC00-\uDFFF])|[\0-\b\v\f---\uD800-\uDFFF]","g"),"$1"))||this.workbook.hasSheetName(t)||!r)return!1;let i=r.getName()||"",a=this.workbook.rename(e,t);return a&&(this.nameController.onRenameSheet(i,t),r.formula.renameFormulaItems(i,t),this.recalcWhenSheetAdded(r),this.emit("renameWorksheet",e,i,t),this.workbook.notifyDataChange(xo.WORKBOOK|xo.RULE)),a}setWorksheetHidden(e,t){let r=this.workbook.setSheetHidden(e,t);return r&&(this.emit("setWorksheetHidden",e,t),this.workbook.notifyDataChange(xo.WORKBOOK)),r}setWorksheetColor(e,t){let r=this.workbook.getSheetColor(e),i=this.workbook.setSheetColor(e,t);return i&&(this.emit("setWorksheetColor",e,r,t),this.workbook.notifyDataChange(xo.WORKBOOK)),i}insertWorksheet(e,t,r,i){let a={},g=null;if(i)try{a=JSON.parse(i.ws),i.rewriteTitle&&j9(a,i.rewriteTitle,r.title),i.style&&(g=JSON.parse(i.style))}catch{return!1}g&&(a=function(W,K){function Q(oe){oe&&oe.s&&(oe.s=K.get(oe.s))}for(let oe in W.cells){let se=W.cells[oe];if(se)for(let he in se)Q(se[he])}return G_(W.rows,Q),G_(W.cols,Q),W.colSpans&&W.colSpans.forEach(Q),Q(W.global),W}(a,this.workbook.getStyleManager().addParts(g)));let R={sheetId:e,snapshot:a},L=this.workbook.createSheet(R,t,r);return!!L&&(this.workbook.getPivotTableManager().fillSheetMeta(e),this.recalcWhenSheetAdded(L),this.workbook.notifyDataChange(xo.WORKBOOK),!0)}recalcWhenSheetAdded(e){let t=this.workbook.getNameById(e.sheetId),r=this.workbook.getUnknownRefManager(),i=r.getByName(t);i.length>0&&(r.removeBucket(t),this.recalcCrossReferences(i,"renew"));let a=this.workbook.getUnitUnknownRefManager(),g=a.getByName(t);for(let R of(a.removeBucket(t),g))R.notifyRecalcUnknown()}recalcUnknownRefs(e){let t=[],r=e.getWorkbook(),i=r.getUnknownRefManager();r.forAll((g,R)=>{let L=r.getNameById(R),W=i.getByName(L);for(let K=0;K<W.length;K++){let Q=W[K];Q.sheet===e&&t.push([Q.row,Q.col])}});let a=t.length>0;return a&&e.formula.generateChangeDep(t,"renew"),a}recalcCrossReferences(e,t){Ao(function(r,i,a,g){let R=-1,L=r.length;for(;++R<L;)a=i(a,r[R],R,r);return a}(e,(r,i)=>{let a=i.sheet.sheetId;return(r[a]||(r[a]=[])).push([i.row,i.col]),r},{}),(r,i)=>{this.workbook.getSheetById(i).formula.generateChangeDep(r,t)})}updateExternalLinks(e){for(let[t,r]of e)this.workbook.getExternalManager().updateExternal(t,r);this.emit("afterUpdateExternalLinks",e)}removeExternalLinks(e){this.workbook.getExternalManager().removeExternal(e),this.emit("afterRemoveExternalLinks",e)}}function G9(n,e,t){let r=null;try{r=JSON.parse(n),j9(r,e,t)}catch{}return r?JSON.stringify(r):""}function j9(n,e,t){e!==t&&function(r,i){function a(g,R){if(Object.prototype.hasOwnProperty.call(g,R)){let L=g[R];typeof L=="string"&&(g[R]=i(L))}}for(let g in r.cells){let R=r.cells[g];if(!R)return;for(let L in R){let W=R[L];W&&typeof W.v=="string"&&W.v[0]==="="&&(W.v="="+i(W.v.slice(1)))}}for(let g in r.validation)a(r.validation[g],"f1"),a(r.validation[g],"f2");for(let g of(r.cfs.forEach(R=>{a(R,"f1"),a(R,"f2")}),r.drawing))if(g.type==="chart")for(let R of(a(g.chartObj,"displayRange"),g.chartObj.plotArea?.series??[]))a(R,"tx"),a(R,"cat"),a(R,"val")}(n,r=>nu(r,e,t))}class q9{constructor({ruleId:e,sheetId:t,creator:r,range:i,description:a,acl:g}){this.id=e,this.sheetId=t,this.creator=r,this.description=a,this.acl=g||null,this.initRange(i)}isGrantable(e,t){return!this.isACLMode()||this.validateACL(e,t)}validateACL(e,t){return this.creator===e||this.acl!==null&&(this.acl.uids.includes(e)||this.acl.gids.some(r=>t.includes(r)))}update(e){e.acl!==void 0&&(this.acl=e.acl),e.description!==void 0&&(this.description=e.description),e.range!==void 0&&this.initRange(e.range),e.sheetId!==void 0&&(this.sheetId=e.sheetId)}getSheetId(){return this.sheetId}isACLMode(){return this.acl!==null}_toJSON(e){return{ruleId:this.id,type:this.getType(),sheetId:this.sheetId,creator:this.creator,range:e,acl:this.acl,description:this.description}}getProps(){let e=this.toJSON();return{acl:e.acl,description:e.description||"",range:e.range,sheetId:e.sheetId}}}class Jae extends q9{getType(){return"range"}isCoordsAllowed(e,t){return!this.cellRange||!this.cellRange.includes(e,t)}isRangeAllowed(e){if(!this.cellRange)return!0;let[t,r,i,a]=Y9(this.cellRange);return!(e.isBetweenRow(t,i)&&e.isBetweenCol(r,a))}isInsertable(e,t){return!(this.cellRange&&this.cellRange.willBeExpanded(e,t))}toJSON(){return this._toJSON(this.cellRange&&this.cellRange.toLabel())}initRange(e){this.cellRange=A_(e)}onInsertRowCol(e,t,r,i){this.cellRange&&(this.cellRange=this.cellRange.insert(e,t,r,i))}onRemoveRowCol(e,t,r){if(!this.cellRange)return!0;let i=this.cellRange.remove(e,t,r);return i!==null&&(this.cellRange=i,!0)}onMoveRowCol(e,t){this.cellRange&&(this.cellRange=this.cellRange.move(e,t))}}class Zae extends q9{getType(){return"worksheet"}isCoordsAllowed(e,t){return!!this.excludes?.length&&this.excludes.some(r=>r.includes(e,t))}isRangeAllowed(e){if(!this.excludes?.length)return!1;let[t,r,i,a]=Y9(e);return this.excludes.some(g=>g.includes(t,r)&&g.includes(i,a))}isInsertable(e,t){return!!this.excludes?.length&&this.excludes.some(r=>r.isInsertionWithin(e,t))}initRange(e){this.excludes=e.map(t=>A_(t)).filter(t=>t)}toJSON(){return this._toJSON(this.excludes?.map(e=>e.toLabel()))}onInsertRowCol(e,t,r,i){this.excludes=this.excludes?.map(a=>a.insert(e,t,r,i))}onRemoveRowCol(e,t,r){return this.excludes=this.excludes?.reduce((i,a)=>{let g=a.remove(e,t,r);return g&&i.push(g),i},[]),!0}onMoveRowCol(e,t){this.excludes=this.excludes?.map(r=>r.move(e,t))}}function Y9(n){let e=-1,t=-1,r=-1,i=-1;return n.constructor===mi?(e=n.from.row,t=n.from.col,r=n.to.row,i=n.to.col):n.constructor===ta?(e=n.from,t=0,e=n.to,i=Number.MAX_VALUE):n.constructor===na&&(e=0,t=n.from,r=Number.MAX_VALUE,i=n.to),[e,t,r,i]}class r1{constructor(){this.rules=[]}init(e){this.rules=e.map(t=>r1.createRule(t)).filter(t=>!!t)}list(){return this.rules}create(e){if(!e||this.find(e.ruleId))return null;let t=r1.createRule(e);return t&&this.rules.push(t),t}update(e,t){let r=this.find(e);return r?(r.update(t),r):null}find(e){return this.rules.find(t=>t.id===e)}delete(e){let t=this.rules.findIndex(r=>r.id===e);if(t!==-1){let r=this.rules[t];return this.rules.splice(t,1),r}return null}toJSON(){return this.rules.map(e=>e.toJSON())}onInsertRowCol(e,t,r,i,a){for(let g of this.rules)g.getSheetId()===e&&g.onInsertRowCol(t,r,i,a)}onRemoveRowCol(e,t,r,i){this.rules=this.rules.filter(a=>a.getSheetId()!==e||a.onRemoveRowCol(t,r,i))}onMoveRowCol(e,t,r){this.rules.forEach(i=>{i.getSheetId()===e&&i.onMoveRowCol(t,r)})}getStateJSON(e,t){return{rules:this.rules.map(r=>({...r.toJSON(),isGrantable:r.isGrantable(e,t)}))}}static createRule(e){switch(e.type){case"range":return new Jae(e);case"worksheet":return new Zae(e);default:return null}}}let Qae=class{constructor(n,e){this.chart=n,this.chartInfo=e,this.unitItem=new P_(this),this.rangeItem=new Are(this),this.bindDeps(this.chartInfo.ensureDisplayRange()),this.dataExpired=!1}destroy(){this.unbindDeps()}fireDataChanged(){this.chart.sheet.notifyPluginChanges(["drawing"]),this.dataExpired=!1}getChartObj(){return this.chartInfo.getChartCfg()}adjust(n){this.chartInfo.ensureDisplayRange()!==n.ensureDisplayRange()&&this.rebindDeps(n.ensureDisplayRange()),this.chartInfo=n,this.fireDataChanged()}setChartConfig(n,e){let t=this.chartInfo.invert(n,e);return this.chartInfo.apply(n,e),n==="applyDisplayRange"&&this.rebindDeps(this.chartInfo.ensureDisplayRange()),this.fireDataChanged(),t}updateDisplayRange(n){this.chartInfo.applyDisplayRange(n),this.rebindDeps(n)}rebindDeps(n){this.unbindDeps(),this.bindDeps(n)}bindDeps(n){let e=this.chartInfo.sheet,t=Ac(n),r=e.formula.checkCrossRefError(t);if(r)this.chartInfo.sheet.getWorkbook().getUnitUnknownRefManager().addItem(r,this.unitItem);else{let i=e.formula.mapFormulaRange(t);this.unitItem.register(i),this.rangeItem.register(i)}}unbindDeps(){this.chartInfo.sheet.getWorkbook().getUnitUnknownRefManager().removeItem(this.unitItem),this.unitItem.unregister(),this.rangeItem.unregister()}notifyAlterGrid(n,e,t,r,i,a){let g=this.chartInfo.ensureDisplayRange(),R=this.chartInfo.sheet,L=Ar.changeFormula(g,{delta:r,start:{[n]:t}},e.getName(),R.getName());if(L===g)return!1;if(r<0){this._addToCrossRepairData(a);let W=/#REF!$/;L=kp(L).filter(K=>!W.test(K)).join(",")}return this.updateDisplayRange(L),this.setDataExpired(),!0}onDepUpdate(){this.setDataExpired()}afterHiddenChange(n,e,t,r){let i=kp(this.chartInfo.ensureDisplayRange()).map(g=>nr.create(g,this.chartInfo.sheet)).filter(ga),a=!1;Sr(i,g=>{if(g.sheetInfo?.sheetId===e.sheetId&&g.from[n]<=r&&g.to[n]>=t)return a=!0,!1}),a&&this.setDataExpired()}notifyMove(n,e,t){let r=this.chartInfo.ensureDisplayRange(),i=this.chartInfo.sheet,a=Ar.moveFormula(n,r,t,e.getName(),i.getName());a!==r&&this.updateDisplayRange(a),this.setDataExpired()}notifyRename(n,e,t){let r=this.chartInfo.ensureDisplayRange(),i=nu(r,n,e);r!==i&&(Ma(t,this.chartInfo.sheet.sheetId,"synoDrawingController",{chartId:this.chart.id,displayRange:i}),this.updateDisplayRange(i),this.setDataExpired())}notifyMoveFormulaRange(n,e,t,r){let i=this.chartInfo.ensureDisplayRange(),a=this.chartInfo.sheet.getName(),g=Ar.changeFormulaRange(i,n,e,a,void 0,t);i!==g&&(this._addToCrossRepairData(r),this.updateDisplayRange(g),this.setDataExpired())}notifyRemoveFormulaRange(n,e){let t=this.chartInfo.ensureDisplayRange(),r=this.chartInfo.sheet.getName(),i=Ar.removeFormulaRange(t,n,r);t!==i&&(this._addToCrossRepairData(e),this.updateDisplayRange(i),this.setDataExpired())}notifyRecalcUnknown(){this.rebindDeps(this.chartInfo.ensureDisplayRange()),this.setDataExpired()}notifyDeleteSheet(){this.rebindDeps(this.chartInfo.ensureDisplayRange()),this.setDataExpired()}getSheet(){return this.chartInfo.sheet}_addToCrossRepairData(n){Ma(n,this.chartInfo.sheet.sheetId,"synoDrawingController",{chartId:this.chart.id,displayRange:this.chartInfo.ensureDisplayRange()})}isDrawable(){return!this.dataExpired&&this.chartInfo.isDrawable()}getEchartParameters(n,e){return this.chartInfo.getEchartParameters(n,e)}setDataExpired(){this.dataExpired=!0}updateData(){return!!this.dataExpired&&(this.chartInfo.fillDataByRanges(),this.fireDataChanged(),!0)}getInfo(){return this.chartInfo}};function K9(n){let{height:e,width:t}=n;return{height:Math.round(e)||0,width:Math.round(t)||0}}function eD(n){return{row:Math.round(n?.row)||0,col:Math.round(n?.col)||0,rowOffset:Math.round(n?.rowOffset)||0,colOffset:Math.round(n?.colOffset)||0}}function i1(n){return Ju(n)?{type:vl.Absolute,top:Math.round(n.top)||0,left:Math.round(n.left)||0,...K9(n)}:DA(n)?{type:vl.OneAnchor,from:eD(n.from),...K9(n)}:{type:vl.TwoAnchor,from:eD(n.from),to:eD(n.to)}}class X9{constructor(e,t){this.id=e,t.type==null&&(t.type=vl.Absolute),this.position=i1(t)}destroy(){}getPosition(){return Or(this.position)}setPosition(e){this.position=i1(e)}}class ese extends X9{constructor(e,t,r){super(e,t),this.path=r.path}getJSON(){return{id:this.id,position:this.getPosition(),path:this.path}}}class J9 extends X9{constructor(e,t,r){super(e,t),this.infoHandler=new Qae(this,r.chartInfo),this.sheet=r.sheet}getJSON(){return{id:this.id,position:this.getPosition(),chartInfo:this.infoHandler.getInfo()}}destroy(){this.infoHandler.destroy(),super.destroy()}}let rs={TYPE:"bar",BAR_DIR:"col",GROUPING:"standard",DATA_DIR:"row",ORIENTATION:"minMax",MARKER_SYMBOL:"circle",LEGEND_POSITION:"r",LABEL_POSITION:"t",LINE_DASH:"solid",BLANK_AS:"gap",BACKGROUND:"#FFFFFF"},tse={ROW:"row",COL:"col"},Po={BAR:"bar",LINE:"line",AREA:"area",PIE:"pie",SCATTER:"scatter",HYBRID:"hybrid"},tD={STANDARD:"standard",STACKED:"stacked",PERCENT:"percentStacked"},o1={SEQUENCE:"minMax",REVERSE:"maxMin"},Uh={CIRCLE:"circle",DIAMOND:"diamond",TRIANGLE:"triangle",SQUARE:"square",NONE:"none"},nse={TOP:"t",LEFT:"l",RIGHT:"r",BOTTOM:"b"},rse={TOP:"t",LEFT:"l",RIGHT:"r",BOTTOM:"b",INSIDE_BASE:"inBase",INSIDE_END:"inEnd",INSIDE_CENTER:"inCenter"},ise={SOLID:"solid",DASH:"dash",DOT:"dot"},mm={ZERO:"zero",GAP:"gap",SPAN:"span"};function a1(n){return n==null||n===""}function Gh(n){return n!=null}function Z9(n){return Object.prototype.toString.call(n)==="[object Function]"}function To(n){return typeof n=="number"&&isFinite(n)}function Q9(n){return typeof n=="string"}let mo={titleGap:8,legendWidth:72,padding:{top:32,bottom:32,left:16,right:16},plotGap:12,cm2pxMultiplier:72/2.54/.75};function ag(n){return 1.4*n}function s1(n,e){let t;for(;(t=n.length)&&n[t-1]==null;)e&&(n=n.slice(),e=!1),n.pop();return n}function l1(n){return Gh(n)?String(n):""}function nD(n){if(n.length<=7)return n;let e=parseInt(n.substr(1,2),16),t=parseInt(n.substr(3,2),16),r=parseInt(n.substr(5,2),16),i=Math.round(parseInt(n.substr(7,2),16)/255*100)/100;return`rgba(${e},${t},${r},${i})`}class ez{constructor(e){this.chartInfo=e}initData(){let e=this.chartInfo.getEmptyCategory(),t=this.chartInfo.getEmptySeries();function r(R){let L=[];for(let W=0;W<R.length;W++)R[W]||L.push(W);return L}this._categoryIndexMap=r(e),this._seriesIndexMap=r(t);let i=this.chartInfo.getSeriesCat(),a=this.chartInfo.calcSeriesData(),g=(R,L)=>!e[L];for(let R of(a=a.filter((L,W)=>!t[W]),i=i.filter(g),a))R.data=R.data.filter(g);this._category=this._processCategory(i),this._data=this._processData(a)}_getNullValue(){return null}_processCategory(e){for(let t=0,r=e.length;t<r;t++)a1(e[t])&&(e[t]="");return e}_processData(e){let t=this._getNullValue();for(let r=0,i=e.length;r<i;r++){let a=e[r].data;for(let g=0,R=a.length;g<R;g++)To(a[g])||(a[g]=t);e[r].name=this._uniquifyName(e[r].name,r)}return e}_calcPlotBound(){let e=this.chartInfo.ensurePlotArea().ensureLayout();if(!e.getEnabled())return this.chartInfo.calcPlotBound();let t=(e.getTop()||0)*mo.cm2pxMultiplier,r=(e.getLeft()||0)*mo.cm2pxMultiplier;return{top:t,left:r,right:(e.getRight()||0)*mo.cm2pxMultiplier,bottom:(e.getBottom()||0)*mo.cm2pxMultiplier}}convert(e,t){return this._containerWidth=e||560,this._containerHeight=t||410,this._plotBound=this._calcPlotBound(),{title:this.convertTitle(),legend:this.convertLegend(),series:this.convertSeries(),color:this.convertColor(),backgroundColor:this.convertBackground(),textStyle:this.convertTextStyle(this.chartInfo.ensureGlobalTextStyle()),tooltip:this.convertTooltip(),animation:!1}}convertTitle(){let e={top:mo.padding.top,left:"center",itemGap:mo.titleGap},t=this.chartInfo.ensureChartTitle();t&&!t.getHidden()&&Object.assign(e,{text:t.getText(),textStyle:this.convertTextStyle(t.ensureTextStyle())});let r=this.chartInfo.ensureChartSubtitle();return r&&!r.getHidden()&&Object.assign(e,{subtext:r.getText(),subtextStyle:this.convertTextStyle(r.ensureTextStyle())}),e}convertLegend(){let e=this.chartInfo.ensureChartLegend();if(e.getHidden())return{show:!1};let t={selectedMode:!1,itemWidth:12,itemHeight:12,padding:0,formatter:this._getOriginName};switch(e.getPosition()){case"t":{let r=e.ensureTextStyle().getFontSize()||this.chartInfo.ensureGlobalTextStyle().getFontSize();t.top=this._plotBound.top-mo.plotGap-ag(r),t.orient="horizontal";break}case"b":t.bottom=mo.padding.bottom,t.orient="horizontal";break;case"l":t.top=this._plotBound.top,t.right=this._containerWidth-this._plotBound.left+mo.plotGap,t.orient="vertical";break;default:t.top=this._plotBound.top,t.left=this._containerWidth-this._plotBound.right+mo.plotGap,t.orient="vertical"}return t.textStyle=this.convertTextStyle(e.ensureTextStyle()),t.data=this._convertLegendIcon(),t}_convertLegendIcon(){return this._data.map(e=>({name:e.name,icon:"rect"}))}convertSeries(){return this._data.map((e,t)=>this._convertSeries(this.chartInfo.ensureSeries(this._seriesIndexMap[t]),e))}_convertSeries(e,t){let r={name:t.name,data:t.data,emphasis:this._convertSeriesEmphasis(),tooltip:{formatter:this._convertSeriesTooltipFormatter(e)}},i=e.ensureLabel();return i.getHidden()||(r.label=this._convertSeriesLabel(i,e)),r}_convertSeriesEmphasis(){return{itemStyle:{shadowColor:"rgba(0,0,0,0.5)",shadowBlur:6,shadowOffsetY:2}}}_convertSeriesLabel(e,t){let r={show:!0,position:this._switchSeriesLabelPosition(e,t),textBorderWidth:3,...this.convertTextStyle(e.ensureTextStyle())};return r.textBorderColor=r.position.startsWith("inside")?"auto":this.chartInfo.ensureChart().getBackgroundColor(),r}_switchSeriesLabelPosition(e){let t="top";switch(e.getPosition()){case"r":t="right";break;case"b":t="bottom";break;case"l":t="left"}return t}convertColor(){let e=this.chartInfo.getSeriesThemeColors();return this._data.map((t,r)=>(r=this._seriesIndexMap[r],this.chartInfo.getSeriesColor(r)||e[r%e.length]))}convertBackground(){return nD(this.chartInfo.ensureChart().getBackgroundColor())}convertTextStyle(e){return{fontFamily:`"${e.getFontFamily()}"`,fontSize:e.getFontSize(),fontStyle:e.getItalic()?"italic":"normal",fontWeight:e.getBold()?"bold":"normal",color:e.getColor()}}convertTooltip(){return{show:!0,position:"top",transitionDuration:0,padding:[4,12],backgroundColor:"#606264",borderWidth:1,borderColor:"#FFF",extraCssText:"box-shadow: 0 1px 4px rgba(0,0,0,0.1); border-radius: 3px;"}}_convertSeriesTooltipFormatter(e){return t=>{let r="";t.name&&(r+=`<span class="syno-o-chart-tooltip-category">${wo(t.name)}</span><br>`),r+=`<span class="syno-o-chart-tooltip-icon" style="background-color: ${wo(t.color)}"></span>`;let i=this._getOriginName(t.seriesName),a=this._tooltipValueFormatter(t.value,e.getRightAxis()?"y2":"y1");return r+`<span class="syno-o-chart-tooltip-series">${i?wo(i)+": ":""}${wo(a)}</span>`}}_tooltipValueFormatter(e,t){return this._dataFormatter(e,t)}_dataFormatter(e,t){return Z9(this.chartInfo.dataFormatter)?this.chartInfo.dataFormatter(e,t):e}_uniquifyName(e,t){return(1e3+t).toString().substr(1)+e}_getOriginName(e){return e.substr(3)}}class rD extends ez{constructor(e){super(e);let t=this.chartInfo.calcAxisBias();this._useAxis=[t<=0,t>=0]}_getGridSpace(e){return e&&e.getText()?ag(e.ensureTextStyle().getFontSize()||this.chartInfo.ensureGlobalTextStyle().getFontSize())+12:0}_calcGridBound(){let{top:e,left:t,right:r,bottom:i}=this._plotBound;return{top:e,left:t+this._getGridSpace(this._useAxis[0]&&this.chartInfo.ensureYAxis().ensureTitle()),right:r+this._getGridSpace(this._useAxis[1]&&this.chartInfo.ensureYAxis2().ensureTitle()),bottom:i+this._getGridSpace(this.chartInfo.ensureXAxis().ensureTitle())}}convert(e,t){let r=super.convert(e,t);return r.grid=this.convertGrid(),r.xAxis=this.convertXAxis(!1),r.yAxis=this.convertYAxis(!0),r}convertGrid(){return{containLabel:!0,...this._calcGridBound()}}convertXAxis(e){return this.convertCategoryAxis(this.chartInfo.ensureXAxis(),e)}convertYAxis(e){return[this.chartInfo.ensureYAxis(),this.chartInfo.ensureYAxis2()].map((t,r)=>this.convertValueAxis(this._useAxis[r]&&t,e,"y"+(r+1)))}convertCategoryAxis(e,t){return{type:"category",data:this._category,inverse:e.ensureScaling().getRevert(),...this.convertAxis(e,t)}}convertValueAxis(e,t,r){if(!e)return{show:!1};let i={splitNumber:e.getTickNumber(),scale:!0,...this.convertAxis(e,t),...this.convertAxisScale(e.ensureScaling())};return i.axisLabel.show!==!1&&(i.axisLabel.formatter=a=>this._dataFormatter(a,r)),i}convertAxisScale(e){return{type:e.getLog()&&this.chartInfo.ensureChart().getGrouping()===tD.STANDARD?"log":"value",min:e.getMin(),max:e.getMax()}}convertAxis(e,t){return{axisLine:{show:!1},axisTick:{show:!1},axisLabel:this.convertAxisLabel(e.ensureLabel(),t),splitLine:{lineStyle:this.convertAxisLine(e.ensureMajorGridLines(),t)},...this.convertAxisTitle(e.ensureTitle(),t)}}convertAxisLine(e,t){return{color:e.getHidden()?"transparent":e.getColor()}}convertAxisTitle(e,t){return!e||!e.getText()||e.getHidden()?{}:{name:e.getText(),nameTextStyle:this.convertTextStyle(e.ensureTextStyle()),nameLocation:"center",nameGap:t?56:28}}convertAxisLabel(e,t){return!e||e.getHidden()?{show:!1}:{show:!0,rotate:e.getRotate(),margin:t?12:4,...this.convertTextStyle(e.ensureTextStyle())}}convertLegend(){let e=super.convertLegend(),t=this.chartInfo.ensureChartLegend().getPosition();return(t==="l"||t==="r")&&(e.top=this._plotBound.top),e}_convertSeries(e,t){let r=super._convertSeries(e,t);return e.getRightAxis()&&(r.yAxisIndex=1),r.label&&(r.label.formatter=i=>this._labelValueFormatter(i.value,e.getRightAxis()?"y2":"y1")),r}_labelValueFormatter(e,t){return this._dataFormatter(e,t)}}class tz extends rD{constructor(e){super(e),this.stacked=this.chartInfo.ensureChart().getGrouping()===tD.STACKED}_getNullValue(){return this.stacked?0:null}convertValueAxis(e,t,r){let i=super.convertValueAxis(e,t,r);return this.stacked&&i.scale&&(i.scale=!1),i}_convertSeries(e,t){let r=super._convertSeries(e,t);return this.stacked&&(r.stack=e.getRightAxis()?"s0":"s1"),r}}class jh extends tz{_convertSeries(e,t){let r=super._convertSeries(e,t);return jh.fillSeriesOption(r,this.chartInfo,e,t)}_convertLegendIcon(){let e=super._convertLegendIcon();return e.forEach((t,r)=>{t.icon=jh.switchLegendIcon(this.chartInfo.ensureSeries(r).ensureMarker().getSymbol())}),e}static fillSeriesOption(e,t,r,i){e.type="line";let a=r.ensureMarker();e.symbol=jh.switchSeriesMarker(a.getSymbol()),e.symbolSize=a.getSize();let g=r.ensureLineStyle(),R=g.getType();switch(R){case"dot":R="dotted";break;case"dash":R="dashed";break;default:R="solid"}return e.lineStyle={type:R,width:g.getWidth()},r.getSmooth()&&(e.smooth=!0),t.ensurePlotArea().getBlankAs()===mm.SPAN&&(e.connectNulls=!0),e}static switchSeriesMarker(e){let t;switch(e){case Uh.NONE:t="image://data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=";break;case Uh.DIAMOND:t="diamond";break;case Uh.TRIANGLE:t="triangle";break;case Uh.SQUARE:t="rect";break;default:t="circle"}return t}static switchLegendIcon(e){let t="line";switch(e){case Uh.CIRCLE:t="circle";break;case Uh.DIAMOND:t="diamond";break;case Uh.TRIANGLE:t="triangle";break;case Uh.SQUARE:t="rect"}return t}}class ose extends jh{_convertSeries(e,t){let r=super._convertSeries(e,t);return r.areaStyle={opacity:e.getOpacity()},r}}class bw extends tz{convertXAxis(e){return this.chartInfo.ensureChart().getBarDir()===rs.BAR_DIR?super.convertXAxis(e):super.convertYAxis(e)}convertYAxis(e){return this.chartInfo.ensureChart().getBarDir()===rs.BAR_DIR?super.convertYAxis(e):super.convertXAxis(e)}_convertSeries(e,t){let r=super._convertSeries(e,t);return this.chartInfo.ensureChart().getBarDir()!==rs.BAR_DIR&&r.yAxisIndex&&(r.xAxisIndex=r.yAxisIndex,delete r.yAxisIndex),bw.fillSeriesOption(r,this.chartInfo,e,t)}_switchSeriesLabelPosition(e){let t=this.chartInfo.ensureChart().getBarDir()!==rs.BAR_DIR,r=t?"right":"top";switch(e.getPosition()){case"inBase":r=t?"insideLeft":"insideBottom";break;case"inCenter":r="inside";break;case"inEnd":r=t?"insideRight":"insideTop"}return r}static fillSeriesOption(e){return e.type="bar",e}}class ase extends ez{_processCategory(e){e=super._processCategory(e);for(let t=0,r=e.length;t<r;t++)e[t]=this._uniquifyName(e[t],t);return e}_processData(e){e.length=1;let t=e[0].data;for(let r=0,i=t.length;r<i;r++){let a=t[r];t[r]={value:a==null?null:Math.abs(a),name:this._category[r]}}return e}convertColor(){let e=this.chartInfo.getSeriesThemeColors(),t=e.length,r=this.chartInfo.ensurePieSeries().getPieColor(),i=[];for(let a=0,g=this._data[0].data.length;a<g;a++){let R=this._categoryIndexMap[a];i[a]=r&&r[R]||e[R%t]}return i}_convertLegendIcon(){return this._category.map(e=>({name:e,icon:"rect"}))}convertSeries(){return[this._convertSeries(this.chartInfo.ensurePieSeries(),this._data[0])]}_convertSeries(e,t){let r=this._containerWidth-this._plotBound.left-this._plotBound.right,i=this._containerHeight-this._plotBound.top-this._plotBound.bottom,a=Math.min(r,i)/2;return{type:"pie",data:t.data,emphasis:this._convertSeriesEmphasis(),selectedMode:!1,center:[this._plotBound.left+r/2,this._plotBound.top+i/2],radius:[e.getPieHoleSize()/100*a,a],itemStyle:{borderColor:nD(e.getPieBorderColor())},tooltip:{formatter:this._convertSeriesTooltipFormatter(e)},label:this._convertSeriesLabel(e.ensureLabel())}}_convertSeriesLabel(e){return{show:e.getShowCat()||e.getShowVal()||e.getShowPercent(),formatter:t=>{let r=[];return e.getShowCat()&&r.push(this._getOriginName(t.name)),e.getShowVal()&&r.push(this._dataFormatter(t.value,"y1")),e.getShowPercent()&&r.push(r.length?`(${t.percent}%)`:`${t.percent}%`),r.join(" ")},...this.convertTextStyle(e.ensureTextStyle())}}_convertSeriesTooltipFormatter(){return e=>{let t="",r=this._getOriginName(e.name);return r&&(t+=`<span class="syno-o-chart-tooltip-category">${r}</span><br>`),t+=`<span class="syno-o-chart-tooltip-icon" style="background-color: ${e.color}"></span><span class="syno-o-chart-tooltip-series">${this._tooltipValueFormatter(e.value,"y1")}</span>`}}}class sse extends rD{_processCategory(e){if(this._xHasNumber=!1,this.chartInfo.ensureXAxis().getTreatAsText())return super._processCategory(e);for(let t=0,r=e.length;t<r;t++)To(e[t])?this._xHasNumber=!0:e[t]=null;return e}convertXAxis(){let e=this.chartInfo.ensureXAxis();return e.getTreatAsText()?super.convertXAxis():this.convertValueAxis(e,!1,"x")}_convertSeries(e,t){let r=super._convertSeries(e,t);r.type="scatter",this.chartInfo.ensureXAxis().getTreatAsText()||(r.data=r.data.map((a,g)=>this._xHasNumber?[this._category[g],a]:[g,a]));let i=e.ensureMarker();return r.symbol=jh.switchSeriesMarker(i.getSymbol()),r.symbolSize=i.getSize(),r}_convertLegendIcon(){let e=super._convertLegendIcon();return e.forEach((t,r)=>{let i=jh.switchLegendIcon(this.chartInfo.ensureSeries(r).ensureMarker().getSymbol());t.icon=i==="line"?"rect":i}),e}_tooltipValueFormatter(e,t){return Array.isArray(e)?`${this._dataFormatter(e[0],"x")},${this._dataFormatter(e[1],t)}`:this._dataFormatter(e,t)}_labelValueFormatter(e,t){let r=Array.isArray(e)?e[1]:e;return this._dataFormatter(r,t)}}class lse extends rD{_convertSeries(e,t){let r=super._convertSeries(e,t);return e.getType(!0)===Po.BAR?bw.fillSeriesOption(r,this.chartInfo,e,t):jh.fillSeriesOption(r,this.chartInfo,e,t)}_convertLegendIcon(){let e=super._convertLegendIcon();return e.forEach((t,r)=>{let i=this.chartInfo.ensureSeries(r);i.getType()===Po.LINE&&(t.icon=jh.switchLegendIcon(i.ensureMarker().getSymbol()))}),e}_switchSeriesLabelPosition(e,t){return t.getType()===Po.BAR?bw.prototype._switchSeriesLabelPosition.call(this,e,t):super._switchSeriesLabelPosition(e,t)}}let use=function(n,e,t){var r=n.length;return t=t===void 0?r:t,g7(n,e,t)};var hse=RegExp("[\\u200d\uD800-\uDFFF\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");let nz=function(n){return hse.test(n)};var rz="\uD800-\uDFFF",iD="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",oD="\uD83C[\uDFFB-\uDFFF]",iz="[^"+rz+"]",oz="(?:\uD83C[\uDDE6-\uDDFF]){2}",az="[\uD800-\uDBFF][\uDC00-\uDFFF]",sz="(?:"+iD+"|"+oD+")?",lz="[\\ufe0e\\ufe0f]?",cse="(?:\\u200d(?:"+[iz,oz,az].join("|")+")"+lz+sz+")*",dse=RegExp(oD+"(?="+oD+")|"+("(?:"+[iz+iD+"?",iD,oz,az,"["+rz+"]"].join("|"))+")"+(lz+sz+cse),"g");let Cw=function(n){var e,t=nz(n=U_(n))?nz(e=n)?e.match(dse)||[]:e.split(""):void 0,r=t?t[0]:n.charAt(0),i=t?use(t,1).join(""):n.slice(1);return r.toUpperCase()+i},uz=Object.prototype.hasOwnProperty;class Ul{constructor(e,t){this.fillArgs(...arguments),t&&this.initSubConfig(t)}fillArgs(e,t){this._info=e,this._config=t}static get configName(){return""}static get subConfigList(){return null}static get configList(){return null}static get supportMap(){return uz.call(this,"_supportMap")||(this._supportMap=this.createSupportMap()),this._supportMap}static createSupportMap(){let e,t=Object.create(null);return(e=this.configList)&&e.forEach(r=>{t[r]=!0}),(e=this.subConfigList)&&e.forEach(r=>{t[r]=!0}),t}initSubConfig(e){let t=this.constructor.subConfigList;if(t)for(let r=0,i=t.length;r<i;++r){let a=t[r],g=e[a];if(Gh(g)){let R="ensure"+Cw(a);(this["_"+R]||this[R]).call(this,g)}}}_cloneConfig(e){return Object.assign(Object.create(null),e)}_getConfig(e,t,r,i){return e&&Gh(e[t])?e[t]:i||r==null?null:r}_setConfig(e,t,r){return Gh(r)?e&&e[t]===r||((e=this._cloneConfig(e))[t]=r):(!e||t in e)&&(e=this._cloneConfig(e),delete e[t]),e}build(){let e=this.getRawConfig(),t,r=this.constructor.supportMap;for(let a in e)if(uz.call(e,a)){if(r[a])continue;t||(t=this._cloneConfig(e)),delete t[a]}let i=this.constructor.subConfigList;if(i&&i.length)for(let a=0,g=i.length;a<g;++a){let R,L=i[a],W=this["get"+Cw(L)](),K=Array.isArray(W);K?(R=s1(W.map(Q=>Q&&Q.build()))).length||(R=null):R=W&&W.build(),(e&&L in e?!R||(K?!function(Q,oe){let se=Math.max(Q?Q.length:0,oe?oe.length:0);for(let he=0;he<se;++he)if((Q&&Q[he])!=(oe&&oe[he]))return!1;return!0}(R,e[L]):R!==e[L]):R)&&(t||(t=this._cloneConfig(e)),R?t[L]=R:delete t[L])}return t&&(e=t),e&&!function(a){for(let g in a)if(Object.prototype.hasOwnProperty.call(a,g))return!0;return!1}(e)&&(e=null),this.setRawConfig(e),e}compute(e){let t,r=Object.create(null);if((t=this.constructor.subConfigList)&&t.length)for(let i=0,a=t.length;i<a;++i){let g,R=t[i],L=Cw(R),W="ensure"+L,K=this[W]();if(Array.isArray(K)){let Q=this["get"+L+"Count"],oe=Q?Q.call(this):K.length;g=[];for(let se=0;se<oe;++se)g.push(this[W](se).compute(e))}else g=K.compute(e);r[R]=g}if((t=this.constructor.configList)&&t.length)for(let i=0,a=t.length;i<a;++i){let g=t[i],R=this["get"+Cw(g)];if(R){let L=R.call(this);L!=null&&(r[g]=L)}}return r}cloneRawConfig(){return Object.assign(Object.create(null),this.getRawConfig())}getRawConfig(){return this._config}setRawConfig(e){return this._config!==e&&(this._config=e,!0)}getChartInfo(){return this._info}getSubConfig(e){return this[e]}setSubConfig(e,t,r){return r||(t=this.createSubConfig(e,t)),this[e]=t}createSubConfig(e,t){let r=this.getChartInfo(),i=r.getConfigCls(e);if(!i)throw Error(`Unknown sub-config name. (${e})`);return t[0]!==r&&(t=[r].concat(t)),new i(...t)}getConfig(e,t,r){return this._getConfig(this.getRawConfig(),e,t,r)}setConfig(e,t){return this.setRawConfig(this._setConfig(this.getRawConfig(),e,t))}}let fse=["xAxis","yAxis","yAxis2","series","layout"],gse=["blankAs","useRowHeader","useColumnHeader","switchRowColumn"],pse=["plotArea","title","subtitle","legend","textStyle"],mse=["backgroundColor","chartType","barDir","grouping"];class aD extends Ul{static get configName(){return"chart"}static get subConfigList(){return pse}static get configList(){return mse}initSubConfig(e){super.initSubConfig(this.fixConfig(e))}fixConfig(e){let t=e.plotArea;if(!t||t.series)return e;let r=t.subCharts;if(!r||!r.length)return e;t=(e=this._cloneConfig(e)).plotArea=this._cloneConfig(t),delete t.subCharts;let i=t.series=[];for(let a=0,g=r.length;a<g;++a){let{type:R,series:L,barDir:W,grouping:K}=r[a];for(let Q=0,oe=L.length;Q<oe;++Q){let se=this._cloneConfig(L[Q]);se.type=R,i.push(se)}W&&(e.barDir=W),K&&(e.grouping=K)}return i.sort(vse),e.chartType=r.length>1?"hybrid":r[0].type,e}getPlotArea(){return this.getSubConfig("plotArea")}ensurePlotArea(e){return this.getPlotArea()||this.setSubConfig("plotArea",[e])}getTitle(){return this.getSubConfig("title")}ensureTitle(e){return this.getTitle()||this.setSubConfig("title",[e,"title"])}getSubtitle(){return this.getSubConfig("subtitle")}ensureSubtitle(e){return this.getSubtitle()||this.setSubConfig("subtitle",this.createSubConfig("title",[e,"subtitle"]),!0)}getLegend(){return this.getSubConfig("legend")}ensureLegend(e){return this.getLegend()||this.setSubConfig("legend",[e])}getTextStyle(){return this.getSubConfig("textStyle")}ensureTextStyle(e){return this.getTextStyle()||this.setSubConfig("textStyle",[e,"global"])}getBackgroundColor(e){return this.getConfig("backgroundColor",rs.BACKGROUND,e)}setBackgroundColor(e){return this.setConfig("backgroundColor",e)}getChartType(e){return this.getConfig("chartType",rs.TYPE,e)}setChartType(e){return this.setConfig("chartType",e)}getBarDir(e){return this.getConfig("barDir",rs.BAR_DIR,e)}setBarDir(e){return this.setConfig("barDir",e)}getGrouping(e){return this.getConfig("grouping",rs.GROUPING,e)}setGrouping(e){return this.setConfig("grouping",e)}getType(e){return this.getChartType(e)}setType(e){return this.setChartType(e)}}function vse(n,e){return n.index-e.index}let yse=["min","max","orientation","logBase"],wse=["hidden","color"],bse=["title","label","scaling","majorGridLines"],Cse=["tickNumber","treatAsText"],_se=["symbol","size"],Sse=["type","width"],Ise=["label","marker","lineStyle"],xse=["type","color","axis2","smooth","opacity","holeSize","pieColors","pieBorderColor"],Tse=["textStyle"],kse=["hidden","position"],Rse=["textStyle"],Ese=["hidden","position","rotate","showVal","showCat","showPercent"],Ase=["textStyle"],Mse=["hidden","text"],Dse={title:{fontSize:16,bold:!0},subtitle:{fontSize:13,color:"#7E8082"},axisTitle:{bold:!0},global:{fontFamily:"Arial",fontSize:12,italic:!1,bold:!1,color:"#000000"}},Ose=["fontFamily","fontSize","italic","bold","color"],Nse=["enabled","top","left","right","bottom"],Pse=[class extends Ul{static get configName(){return"plotArea"}static get subConfigList(){return fse}static get configList(){return gse}initSubConfig(n){super.initSubConfig(this.fixConfig(n))}fixConfig(n){let{nonNumericAsZero:e,zeroStart:t,xAxisTitle:r,yAxisTitle:i}=n;if(!Gh(e)&&!t&&!r&&!i)return n;if(n=this._cloneConfig(n),delete n.nonNumericAsZero,delete n.zeroStart,delete n.xAxisTitle,delete n.yAxisTitle,!n.blankAs&&Gh(e)&&(n.blankAs=e?mm.ZERO:mm.GAP),!n.xAxis&&(r||t)){let a=n.xAxis=Object.create(null);r&&(a.title=r),t&&(a.scaling={min:0})}if(!n.yAxis&&(i||t)){let a=n.yAxis=Object.create(null);i&&(a.title=i),t&&(a.scaling={min:0})}return!n.yAxis2&&t&&(n.yAxis2={scaling:{min:0}}),n}getXAxis(){return this.getSubConfig("xAxis")}ensureXAxis(n){return this.getXAxis()||this.setSubConfig("xAxis",this.createSubConfig("axis",[n]),!0)}getYAxis(){return this.getSubConfig("yAxis")}ensureYAxis(n){return this.getYAxis()||this.setSubConfig("yAxis",this.createSubConfig("axis",[n]),!0)}getYAxis2(){return this.getSubConfig("yAxis2")}ensureYAxis2(n){return this.getYAxis2()||this.setSubConfig("yAxis2",this.createSubConfig("axis",[n]),!0)}_getSeries(){return this.getSubConfig("series")}_ensureSeries(n){return this._getSeries()||this.setSubConfig("series",Array.isArray(n)?n.map((e,t)=>this.createSubConfig("series",[e,t])):[],!0)}getSeries(n){let e=this._getSeries();return e?To(n)?e[n]:e:null}ensureSeries(n,e){let t=this._ensureSeries();return To(n)?t[n]||(t[n]=this.createSubConfig("series",[e,n])):t}getSeriesCount(){return this.getChartInfo().getSeriesCount()}getLayout(){return this.getSubConfig("layout")}ensureLayout(n){return this.getLayout()||this.setSubConfig("layout",this.createSubConfig("layout",[n]),!0)}getBlankAs(n){return this.getConfig("blankAs",rs.BLANK_AS,n)}setBlankAs(n){return this.setConfig("blankAs",n)}getUseRowHeader(){return this.getConfig("useRowHeader",!0)}setUseRowHeader(n){return this.setConfig("useRowHeader",!!n)}getUseColumnHeader(){return this.getConfig("useColumnHeader",!0)}setUseColumnHeader(n){return this.setConfig("useColumnHeader",!!n)}getSwitchRowColumn(){return this.getConfig("switchRowColumn",!1)}setSwitchRowColumn(n){return this.setConfig("switchRowColumn",!!n)}},aD,class extends Ul{static get configName(){return"scaling"}static get configList(){return yse}getMin(n){return this.getConfig("min",null,n)}setMin(n){return this.setConfig("min",To(n)?n:null)}getMax(n){return this.getConfig("max",null,n)}setMax(n){return this.setConfig("max",To(n)?n:null)}getOrientation(n){return this.getConfig("orientation",rs.ORIENTATION,n)}setOrientation(n){return this.setConfig("orientation",n)}getLogBase(n){return this.getConfig("logBase",null,n)}setLogBase(n){return this.setConfig("logBase",To(n)?n:null)}getRevert(){return this.getOrientation()===o1.REVERSE}setRevert(n){return this.setOrientation(n?o1.REVERSE:o1.SEQUENCE)}getLog(){return!!Gh(this.getLogBase())}setLog(n){return this.setLogBase(n?10:null)}},class extends Ul{static get configName(){return"majorGridLines"}static get configList(){return wse}getHidden(n){return this.getConfig("hidden",!1,n)}setHidden(n){return this.setConfig("hidden",!!n)}getColor(n){return this.getConfig("color","#CCCCCC",n)}setColor(n){return this.setConfig("color",n)}},class extends Ul{static get configName(){return"axis"}static get subConfigList(){return bse}static get configList(){return Cse}getTitle(){return this.getSubConfig("title")}ensureTitle(n){return this.getTitle()||this.setSubConfig("title",[n,"axisTitle"])}getLabel(){return this.getSubConfig("label")}ensureLabel(n){return this.getLabel()||this.setSubConfig("label",[n])}getScaling(){return this.getSubConfig("scaling")}ensureScaling(n){return this.getScaling()||this.setSubConfig("scaling",[n])}getMajorGridLines(){return this.getSubConfig("majorGridLines")}ensureMajorGridLines(n){return this.getMajorGridLines()||this.setSubConfig("majorGridLines",[n])}getTickNumber(n){return this.getConfig("tickNumber",5,n)}setTickNumber(n){return this.setConfig("tickNumber",To(n)?n:null)}getTreatAsText(n){return this.getConfig("treatAsText",!1,n)}setTreatAsText(n){return this.setConfig("treatAsText",!!n)}},class extends Ul{constructor(n,e){e===!0?e=null:e===!1&&(e={symbol:Uh.NONE}),super(n,e)}static get configName(){return"marker"}static get configList(){return _se}getSymbol(n){return this.getConfig("symbol",rs.MARKER_SYMBOL,n)}setSymbol(n){return this.setConfig("symbol",n)}getSize(n){return this.getConfig("size",5,n)}setSize(n){return this.setConfig("size",To(n)?n:null)}},class extends Ul{static get configName(){return"lineStyle"}static get configList(){return Sse}getType(n){return this.getConfig("type",rs.LINE_DASH,n)}setType(n){return this.setConfig("type",n)}getWidth(n){return this.getConfig("width",2,n)}setWidth(n){return this.setConfig("width",To(n)?n:null)}},class extends Ul{constructor(n,e,t){super(n,e),this.index=To(t)?t:0}static get configName(){return"series"}static get subConfigList(){return Ise}static get configList(){return xse}getDefaultType(){let n=this.getChartInfo().ensureChart().getType();return n===Po.HYBRID?Po.BAR:n}getDefaultColor(n){let e=this.getChartInfo().getSeriesThemeColors();return e[n%e.length]}compute(n){let e=super.compute(n);if(n){let t=this.getChartInfo();t.dataHasCat()&&(e.cat=t.getSourceSeriesCat()),t.dataHasTx()&&(e.tx=t.getSourceSeriesTx(this.index)),e.val=t.getSourceSeriesVal(this.index)}return e}getLabel(){return this.getSubConfig("label")}ensureLabel(n){return this.getLabel()||this.setSubConfig("label",[n])}getMarker(){return this.getSubConfig("marker")}ensureMarker(n){return this.getMarker()||this.setSubConfig("marker",[n])}getLineStyle(){return this.getSubConfig("lineStyle")}ensureLineStyle(n){return this.getLineStyle()||this.setSubConfig("lineStyle",[n])}getType(n){let e=this.getConfig("type",null,n);return n||e?e:this.getDefaultType()}setType(n){return this.setConfig("type",n)}getColor(n){let e=this.getConfig("color",null,n);return n||e?e:this.getDefaultColor(this.index)}setColor(n){return this.setConfig("color",n)}getAxis2(n){return this.getConfig("axis2",!1,n)}setAxis2(n){return this.setConfig("axis2",!!n)}getSmooth(n){return this.getConfig("smooth",!1,n)}setSmooth(n){return this.setConfig("smooth",!!n)}getOpacity(n){return this.getConfig("opacity",.2,n)}setOpacity(n){return this.setConfig("opacity",To(n)?n:null)}getHoleSize(n){return this.getConfig("holeSize",0,n)}setHoleSize(n){return this.setConfig("holeSize",n)}getPieColors(n){return this.getConfig("pieColors",null,n)}setPieColors(n){return this.setConfig("pieColors",Array.isArray(n)?s1(n,!0):null)}getPieBorderColor(n){return this.getConfig("pieBorderColor","#FFFFFF00",n)}setPieBorderColor(n){return this.setConfig("pieBorderColor",n)}getRightAxis(n){return this.getAxis2(n)}setRightAxis(n){return this.setAxis2(n)}getLineSmooth(n){return this.getSmooth(n)}setLineSmooth(n){return this.setSmooth(n)}getAreaOpacity(n){return this.getOpacity(n)}setAreaOpacity(n){return this.setOpacity(n)}getPieHoleSize(n){return this.getHoleSize(n)}setPieHoleSize(n){return this.setHoleSize(n)}getPieColor(n,e){let t=this.getPieColors(e);return t&&Array.isArray(t)?To(n)?t[n]||this.getDefaultColor(n):t:null}setPieColor(n,e){if(To(n)){let t=this.getPieColors();(t=t?t.slice():[])[n]=e,e=s1(t)}return this.setPieColors(e)}},class extends Ul{static get configName(){return"legend"}static get subConfigList(){return Tse}static get configList(){return kse}getTextStyle(){return this.getSubConfig("textStyle")}ensureTextStyle(n){return this.getTextStyle()||this.setSubConfig("textStyle",[n])}getHidden(n){return this.getConfig("hidden",!1,n)}setHidden(n){return this.setConfig("hidden",!!n)}getPosition(n){return this.getConfig("position",rs.LEGEND_POSITION,n)}setPosition(n){return this.setConfig("position",n)}},class extends Ul{static get configName(){return"label"}static get subConfigList(){return Rse}static get configList(){return Ese}getTextStyle(){return this.getSubConfig("textStyle")}ensureTextStyle(n){return this.getTextStyle()||this.setSubConfig("textStyle",[n])}getHidden(n){return this.getConfig("hidden",!1,n)}setHidden(n){return this.setConfig("hidden",!!n)}getPosition(n){return this.getConfig("position",rs.LABEL_POSITION,n)}setPosition(n){return this.setConfig("position",n)}getRotate(n){return this.getConfig("rotate",0,n)}setRotate(n){return this.setConfig("rotate",n)}getShowVal(n){return this.getConfig("showVal",!1,n)}setShowVal(n){return this.setConfig("showVal",!!n)}getShowCat(n){return this.getConfig("showCat",!1,n)}setShowCat(n){return this.setConfig("showCat",!!n)}getShowPercent(n){return this.getConfig("showPercent",!1,n)}setShowPercent(n){return this.setConfig("showPercent",!!n)}},class extends Ul{constructor(n,e,t){Q9(e)&&(e={text:e}),super(n,e,t)}fillArgs(n,e,t){super.fillArgs(...arguments),this.styleKey=t}static get configName(){return"title"}static get subConfigList(){return Ase}static get configList(){return Mse}getTextStyle(){return this.getSubConfig("textStyle")}ensureTextStyle(n){return this.getTextStyle()||this.setSubConfig("textStyle",[n,this.styleKey])}getHidden(n){return this.getConfig("hidden",!1,n)}setHidden(n){return this.setConfig("hidden",!!n)}getText(n){return this.getConfig("text","",n)}setText(n){return this.setConfig("text",n)}},class extends Ul{constructor(n,e,t){super(n,e),this.defaultStyle=Dse[t]}static get configName(){return"textStyle"}static get configList(){return Ose}getStyleConfig(n,e){let t=this.getConfig(n,null,e);if(e||Gh(t))return t;let r=this.defaultStyle&&this.defaultStyle[n];return Gh(r)?r:this.getChartInfo().ensureGlobalTextStyle()["get"+Cw(n)]()}getFontFamily(n){return this.getStyleConfig("fontFamily",n)}setFontFamily(n){return this.setConfig("fontFamily",n)}getFontSize(n){return this.getStyleConfig("fontSize",n)}setFontSize(n){return this.setConfig("fontSize",n)}getItalic(n){return this.getStyleConfig("italic",n)}setItalic(n){return this.setConfig("italic",!!n)}getBold(n){return this.getStyleConfig("bold",n)}setBold(n){return this.setConfig("bold",!!n)}getColor(n){return this.getStyleConfig("color",n)}setColor(n){return this.setConfig("color",n)}},class extends Ul{static get configName(){return"layout"}static get configList(){return Nse}getEnabled(n){return this.getConfig("enabled",!1,n)}setEnabled(n){return this.setConfig("enabled",n)}getLeft(n){return this.getConfig("left",null,n)}setLeft(n){return this.setConfig("left",n)}getTop(n){return this.getConfig("top",null,n)}setTop(n){return this.setConfig("top",n)}getRight(n){return this.getConfig("right",null,n)}setRight(n){return this.setConfig("right",n)}getBottom(n){return this.getConfig("bottom",null,n)}setBottom(n){return this.setConfig("bottom",n)}}].reduce(function(n,e){return n[e.configName]=e,n},Object.create(null)),Bse=["#509BE6","#FFC100","#F26166","#AD70CC","#4DBF4D","#FF8F3D","#8E6F69","#00B6CE","#E25FBC","#4D5FFF","#27D790","#3B8795"],hz=class{constructor(n,e){this.readChartCfg(n),this.readOptionCfg(e),this._options=e}getConfigMap(){return Pse}getConfigCls(n){return this.getConfigMap()[n]}readChartCfg(n){this._config=new(this.getConfigCls("chart"))(this,n)}readOptionCfg(n){}getUseRowHeader(){return this.ensurePlotArea().getUseRowHeader()}getUseColumnHeader(){return this.ensurePlotArea().getUseColumnHeader()}getSwitchRowColumn(){return this.ensurePlotArea().getSwitchRowColumn()}dataHasCat(){return this.getSwitchRowColumn()?this.getUseColumnHeader():this.getUseRowHeader()}dataHasTx(){return this.getSwitchRowColumn()?this.getUseRowHeader():this.getUseColumnHeader()}setRawData(n){this.data=n}getRawData(){return this.data}cloneRawData(n){let e=this.getRawData();if(!e)return e;if(!n)return e.map(t=>t.slice());{let t=[],r=this._getDataColNumber(e),i=this._getDataRowNumber(e);for(let a=0;a<r;++a){t[a]=[];for(let g=0;g<i;++g)t[a][g]=this._getData(e,g,a)}return t}}_getData(n,e,t){let r=n&&n[e]&&n[e][t];return r??null}getData(n,e){return this._getData(this.getRawData(),n,e)}_getDataRowNumber(n){return n?n.length:0}getDataRowNumber(){return this._getDataRowNumber(this.getRawData())}_getDataColNumber(n){return n&&n[0]?n[0].length:0}getDataColNumber(){return this._getDataColNumber(this.getRawData())}ensureChart(){return this._config}ensureChartTitle(){return this.ensureChart().ensureTitle()}ensureChartSubtitle(){return this.ensureChart().ensureSubtitle()}ensureChartLegend(){return this.ensureChart().ensureLegend()}ensureChartLegendStyle(){return this.ensureChartLegend().ensureTextStyle()}ensureGlobalTextStyle(){return this.ensureChart().ensureTextStyle()}ensurePlotArea(){return this.ensureChart().ensurePlotArea()}ensureSeries(n){return this.ensurePlotArea().ensureSeries(n)}ensureSeriesLabel(n){return this.ensureSeries(n).ensureLabel()}ensureSeriesLabelStyle(n){return this.ensureSeriesLabel(n).ensureTextStyle()}ensurePieSeries(){return this.ensureSeries(0)}ensurePieLabel(){return this.ensurePieSeries().ensureLabel()}ensurePieLabelStyle(){return this.ensurePieLabel().ensureTextStyle()}ensureTitle(n){switch(n){case"title":return this.ensureChartTitle();case"subtitle":return this.ensureChartSubtitle();case"xTitle":return this.ensureXAxis().ensureTitle();case"yTitle":return this.ensureYAxis().ensureTitle();case"y2Title":return this.ensureYAxis2().ensureTitle();default:return null}}ensureTitleStyle(n){let e=this.ensureTitle(n);return e&&e.ensureTextStyle()}ensureXAxis(){return this.ensurePlotArea().ensureXAxis()}ensureYAxis(){return this.ensurePlotArea().ensureYAxis()}ensureYAxis2(){return this.ensurePlotArea().ensureYAxis2()}ensureAxis(n){switch(n){case"x":return this.ensureXAxis();case"y":return this.ensureYAxis();case"y2":return this.ensureYAxis2();default:return null}}ensureAxisScaling(n){let e=this.ensureAxis(n);return e&&e.ensureScaling()}ensureAxisMajorGridLines(n){let e=this.ensureAxis(n);return e&&e.ensureMajorGridLines()}ensureAxisLabel(n){let e=this.ensureAxis(n);return e&&e.ensureLabel()}ensureAxisLabelStyle(n){let e=this.ensureAxisLabel(n);return e&&e.ensureTextStyle()}build(){return this.ensureChart().build()}compute(n){return this.ensureChart().compute(n)}getChartSetting(){let n=this.ensureChart();return this.filterChartSetting(n.getType(),n.getBarDir(),n.getGrouping(),!0)}getSeriesCat(n){let e=+!!this.dataHasTx();if(To(n))return this.dataHasCat()?l1(this.getData(0,e+n)):"";{let t=this.getDataColNumber(),r=Array(t-e);if(this.dataHasCat())for(let i=e;i<t;++i)r[i-e]=this.getData(0,i);else r.fill("");return r}}getSourceSeriesCat(){return this.getSeriesCat()}getSeriesTx(n){let e=+!!this.dataHasCat();if(To(n))return this.dataHasTx()?l1(this.getData(e+n,0)):"";{let t=this.getDataRowNumber(),r=Array(t-e);if(this.dataHasTx())for(let i=e;i<t;++i)r[i-e]=l1(this.getData(i,0));else r.fill("");return r}}getSourceSeriesTx(n){return this.getSeriesTx(n)}getSeriesVal(n,e){let t=n+ +!!this.dataHasCat(),r=+!!this.dataHasTx();if(To(e))return this.getData(t,r+e);{let i=this.getDataColNumber(),a=[];for(let g=r;g<i;++g)a.push(this.getData(t,g));return a}}getSourceSeriesVal(n,e){return this.getSeriesVal(n,e)}getSeriesThemeColors(){return Bse}getSeriesCount(n){let e=this.getDataRowNumber()-+!!this.dataHasCat();if(n){let t=this.ensureSeries().length;e<t&&(e=t)}return e}getSeriesColor(n){return this.ensureChart().getType()===Po.PIE?this.ensurePieSeries().getPieColor(n):this.ensureSeries(n).getColor()}calcAxisBias(){let n,e;return this.forEachSeries(function(t){if(t.getRightAxis()?e=!0:n=!0,n&&e)return!0}),n&&e?0:n?-1:e?1:NaN}forEachSeries(n,e,t){for(let r=0,i=this.getSeriesCount(t);r<i;++r){let a=n.call(e,this.ensureSeries(r),r,i);if(a!=null)return a}}eachSeries(n){return this.forEachSeries(function(e,t){if(n.call(this,e,t)===!1)return!1},this)}filterChartSetting(n,e,t,r){switch(n){case Po.BAR:case Po.LINE:case Po.AREA:break;default:t=r?rs.GROUPING:null}return{type:n,barDir:n===Po.BAR?e:r?rs.BAR_DIR:null,grouping:t}}handleSeries(n,e,t){To(n)?e.call(t,this.ensureSeries(n),n):this.forEachSeries(e,t)}_handleTitle(n,e,t){let r=this.ensureTitle(n);r&&e.call(t,r,n)}handleTitle(n,e,t){n?this._handleTitle(n,e,t):["title","subtitle","xTitle","yTitle","y2Title"].forEach(r=>{this._handleTitle(r,e,t)})}_handleAxis(n,e,t){let r=this.ensureAxis(n);r&&e.call(t,r,n)}handleAxis(n,e,t){n?this._handleAxis(n,e,t):["x","y","y2"].forEach(r=>{this._handleAxis(r,e,t)})}getAllColors(){let n=[];function e(t){t&&n.push(t.substr(1).toLowerCase())}return e(this.ensureChart().getBackgroundColor(!0)),this.handleTitle(null,function(t){e(t.ensureTextStyle().getColor(!0))},this),this.forEachSeries(function(t){e(t.getColor(!0)),e(t.getPieBorderColor(!0)),e(t.ensureLabel().ensureTextStyle().getColor(!0)),(t.getPieColors(!0)||[]).forEach(e)},this,!0),e(this.ensureChartLegendStyle().getColor(!0)),this.handleAxis(null,function(t){e(t.ensureLabel().ensureTextStyle().getColor(!0)),e(t.ensureMajorGridLines().getColor(!0))},this),n}static checkCmdName(n){return n&&n in this.prototype&&n!=="apply"&&(n.startsWith("apply")||n.startsWith("_apply"))}apply(n,e){return!!this.constructor.checkCmdName(n)&&(this[n].apply(this,e),!0)}invert(n,e){if(!this.constructor.checkCmdName(n))return!1;let t=this[n.replace("apply","invert")].apply(this,e);return Array.isArray(t)||(t=[t]),t.forEach(r=>{r.name||(r.name=n)}),t}applyChartSetting(n,e,t){if({type:n,barDir:e,grouping:t}=this.filterChartSetting(n,e,t),this._applyChartType(n),n===Po.HYBRID){let r=this.getSeriesCount()/2;this.forEachSeries(function(i,a){i.setType(a<r?Po.BAR:null)},this,!0)}else this.forEachSeries(function(r,i){r.setType(null)},this,!0);this._applyChartBarDir(e),this._applyChartGrouping(t)}_applyChartType(n){this.ensureChart().setType(n)}_applyChartBarDir(n){this.ensureChart().setBarDir(n)}_applyChartGrouping(n){this.ensureChart().setGrouping(n)}applyChartBackgroundColor(n){this.ensureChart().setBackgroundColor(n)}applyChartBlankAs(n){this.ensurePlotArea().setBlankAs(n)}applyChartShowBlank(n){this.applyChartBlankAs(n?mm.SPAN:mm.GAP)}applyGlobalFontFamily(n){this.ensureGlobalTextStyle().setFontFamily(n)}applyUseColumnHeader(n){this.ensurePlotArea().setUseColumnHeader(n)}applyUseRowHeader(n){this.ensurePlotArea().setUseRowHeader(n)}applySwitchRowColumn(n){this.ensurePlotArea().setSwitchRowColumn(n)}applyPieHoleSize(n){this.ensurePieSeries().setPieHoleSize(n)}applyPieBorderColor(n){this.ensurePieSeries().setPieBorderColor(n)}applyPieLabelDisplay(n){let e=this.ensurePieLabel();e.setShowVal(n.val),e.setShowCat(n.cat),e.setShowPercent(n.percent)}applyPieLabelFontFamily(n){this.ensurePieLabelStyle().setFontFamily(n)}applyPieLabelFontSize(n){this.ensurePieLabelStyle().setFontSize(n)}applyPieLabelBold(n){this.ensurePieLabelStyle().setBold(n)}applyPieLabelItalic(n){this.ensurePieLabelStyle().setItalic(n)}applyPieLabelColor(n){this.ensurePieLabelStyle().setColor(n)}applyTitleText(n,e){this.handleTitle(n,function(t){t.setText(e)})}applyTitleFontFamily(n,e){this.handleTitle(n,function(t){t.ensureTextStyle().setFontFamily(e)})}applyTitleFontSize(n,e){this.handleTitle(n,function(t){t.ensureTextStyle().setFontSize(e)})}applyTitleBold(n,e){this.handleTitle(n,function(t){t.ensureTextStyle().setBold(e)})}applyTitleItalic(n,e){this.handleTitle(n,function(t){t.ensureTextStyle().setItalic(e)})}applyTitleColor(n,e){this.handleTitle(n,function(t){t.ensureTextStyle().setColor(e)})}applySeriesType(n,e){this.handleSeries(n,function(t){t.setType(e)})}applySeriesColor(n,e){if(To(n))return this.ensureChart().getType()===Po.PIE?this._applyPieColor(n,e):this._applySeriesColor(n,e)}_applyPieColor(n,e){this.ensurePieSeries().setPieColor(n,e)}_applySeriesColor(n,e){this.ensureSeries(n).setColor(e)}applySeriesRightAxis(n,e){this.handleSeries(n,function(t){t.setRightAxis(e)})}applySeriesSmooth(n,e){this.handleSeries(n,function(t){t.setSmooth(e)})}applySeriesOpacity(n,e){this.handleSeries(n,function(t){t.setOpacity(e)})}applySeriesLineType(n,e){this.handleSeries(n,function(t){t.ensureLineStyle().setType(e)})}applySeriesLineWidth(n,e){this.handleSeries(n,function(t){t.ensureLineStyle().setWidth(e)})}applySeriesMarkerSymbol(n,e){this.handleSeries(n,function(t){t.ensureMarker().setSymbol(e)})}applySeriesMarkerSize(n,e){this.handleSeries(n,function(t){t.ensureMarker().setSize(e)})}applySeriesLabelHidden(n,e){this.handleSeries(n,function(t){t.ensureLabel().setHidden(e)})}applySeriesLabelPosition(n,e){this.handleSeries(n,function(t){t.ensureLabel().setPosition(e)})}applySeriesLabelFontFamily(n,e){this.handleSeries(n,function(t){t.ensureLabel().ensureTextStyle().setFontFamily(e)})}applySeriesLabelFontSize(n,e){this.handleSeries(n,function(t){t.ensureLabel().ensureTextStyle().setFontSize(e)})}applySeriesLabelItalic(n,e){this.handleSeries(n,function(t){t.ensureLabel().ensureTextStyle().setItalic(e)})}applySeriesLabelBold(n,e){this.handleSeries(n,function(t){t.ensureLabel().ensureTextStyle().setBold(e)})}applySeriesLabelColor(n,e){this.handleSeries(n,function(t){t.ensureLabel().ensureTextStyle().setColor(e)})}applyLegendHidden(n){this.ensureChartLegend().setHidden(n)}applyLegendPosition(n){this.ensureChartLegend().setPosition(n),this.applyLegendHidden(!1)}applyLegendFontFamily(n){this.ensureChartLegendStyle().setFontFamily(n)}applyLegendFontSize(n){this.ensureChartLegendStyle().setFontSize(n)}applyLegendItalic(n){this.ensureChartLegendStyle().setItalic(n)}applyLegendBold(n){this.ensureChartLegendStyle().setBold(n)}applyLegendColor(n){this.ensureChartLegendStyle().setColor(n)}applyAxisTickNumber(n,e){this.handleAxis(n,function(t){t.setTickNumber(e)})}applyAxisTreatAsText(n,e){this.handleAxis(n,function(t){t.setTreatAsText(e)})}applyAxisScalingMin(n,e){this.handleAxis(n,function(t){t.ensureScaling().setMin(e)})}applyAxisScalingMax(n,e){this.handleAxis(n,function(t){t.ensureScaling().setMax(e)})}applyAxisScalingOrientation(n,e){this.handleAxis(n,function(t){t.ensureScaling().setOrientation(e)})}applyAxisScalingRevert(n,e){this.handleAxis(n,function(t){t.ensureScaling().setRevert(e)})}applyAxisScalingLogBase(n,e){this.handleAxis(n,function(t){t.ensureScaling().setLogBase(e)})}applyAxisScalingLog(n,e){this.handleAxis(n,function(t){t.ensureScaling().setLog(e)})}applyAxisGridHidden(n,e){this.handleAxis(n,function(t){t.ensureMajorGridLines().setHidden(e)})}applyAxisGridColor(n,e){this.handleAxis(n,function(t){t.ensureMajorGridLines().setColor(e)})}applyAxisLabelHidden(n,e){this.handleAxis(n,function(t){t.ensureLabel().setHidden(e)})}applyAxisLabelRotate(n,e){this.handleAxis(n,function(t){t.ensureLabel().setRotate(e)})}applyAxisLabelFontFamily(n,e){this.handleAxis(n,function(t){t.ensureLabel().ensureTextStyle().setFontFamily(e)})}applyAxisLabelFontSize(n,e){this.handleAxis(n,function(t){t.ensureLabel().ensureTextStyle().setFontSize(e)})}applyAxisLabelItalic(n,e){this.handleAxis(n,function(t){t.ensureLabel().ensureTextStyle().setItalic(e)})}applyAxisLabelBold(n,e){this.handleAxis(n,function(t){t.ensureLabel().ensureTextStyle().setBold(e)})}applyAxisLabelColor(n,e){this.handleAxis(n,function(t){t.ensureLabel().ensureTextStyle().setColor(e)})}applyPlotAreaLayoutEnabled(n,e){let t=this.ensurePlotArea().ensureLayout();t.setEnabled(n),n&&e?(t.setTop(e.top||0),t.setLeft(e.left||0),t.setRight(e.right||0),t.setBottom(e.bottom||0)):(t.setTop(null),t.setLeft(null),t.setRight(null),t.setBottom(null))}applyPlotAreaLeft(n){this.ensurePlotArea().ensureLayout().setLeft(n)}applyPlotAreaTop(n){this.ensurePlotArea().ensureLayout().setTop(n)}applyPlotAreaRight(n){this.ensurePlotArea().ensureLayout().setRight(n)}applyPlotAreaBottom(n){this.ensurePlotArea().ensureLayout().setBottom(n)}invertChartSetting(){let n=[];return n.push.apply(n,this.invert("_applyChartGrouping")),n.push.apply(n,this.invert("_applyChartBarDir")),this.forEachSeries(function(e,t){n.push.apply(n,this.invert("applySeriesType",[t]))},this,!0),n.push.apply(n,this.invert("_applyChartType")),n}_invertChartType(n){return{args:[this.ensureChart().getType(!0)]}}_invertChartBarDir(n){return{args:[this.ensureChart().getBarDir(!0)]}}_invertChartGrouping(n){return{args:[this.ensureChart().getGrouping(!0)]}}invertChartBackgroundColor(n){return{args:[this.ensureChart().getBackgroundColor(!0)]}}invertChartBlankAs(n){return{args:[this.ensurePlotArea().getBlankAs(!0)]}}invertChartShowBlank(n){return this.invert("applyChartBlankAs")}invertGlobalFontFamily(n){return{args:[this.ensureGlobalTextStyle().getFontFamily(!0)]}}invertUseColumnHeader(n){return{args:[this.ensurePlotArea().getUseColumnHeader(!0)]}}invertUseRowHeader(n){return{args:[this.ensurePlotArea().getUseRowHeader(!0)]}}invertSwitchRowColumn(n){return{args:[this.ensurePlotArea().getSwitchRowColumn(!0)]}}invertPieHoleSize(n){return{args:[this.ensurePieSeries().getPieHoleSize(!0)]}}invertPieBorderColor(n){return{args:[this.ensurePieSeries().getPieBorderColor(!0)]}}invertPieLabelDisplay(n){let e=this.ensurePieLabel();return{args:[{val:e.getShowVal(!0),cat:e.getShowCat(!0),percent:e.getShowPercent(!0)}]}}invertPieLabelFontFamily(n){return{args:[this.ensurePieLabelStyle().getFontFamily(!0)]}}invertPieLabelFontSize(n){return{args:[this.ensurePieLabelStyle().getFontSize(!0)]}}invertPieLabelBold(n){return{args:[this.ensurePieLabelStyle().getBold(!0)]}}invertPieLabelItalic(n){return{args:[this.ensurePieLabelStyle().getItalic(!0)]}}invertPieLabelColor(n){return{args:[this.ensurePieLabelStyle().getColor(!0)]}}invertTitleText(n,e){let t=[];return this.handleTitle(n,function(r,i){t.push({args:[i,r.getText(!0)]})}),t}invertTitleFontFamily(n,e){let t=[];return this.handleTitle(n,function(r,i){t.push({args:[i,r.ensureTextStyle().getFontFamily(!0)]})}),t}invertTitleFontSize(n,e){let t=[];return this.handleTitle(n,function(r,i){t.push({args:[i,r.ensureTextStyle().getFontSize(!0)]})}),t}invertTitleBold(n,e){let t=[];return this.handleTitle(n,function(r,i){t.push({args:[i,r.ensureTextStyle().getBold(!0)]})}),t}invertTitleItalic(n,e){let t=[];return this.handleTitle(n,function(r,i){t.push({args:[i,r.ensureTextStyle().getItalic(!0)]})}),t}invertTitleColor(n,e){let t=[];return this.handleTitle(n,function(r,i){t.push({args:[i,r.ensureTextStyle().getColor(!0)]})}),t}invertSeriesType(n,e){let t=[];return this.handleSeries(n,function(r,i){t.push({args:[i,r.getType(!0)]})}),t}invertSeriesColor(n,e){if(To(n))return this.ensureChart().getType()===Po.PIE?this.invert("_applyPieColor",arguments):this.invert("_applySeriesColor",arguments)}_invertPieColor(n,e){return{args:[n,this.ensurePieSeries().getPieColor(n,!0)]}}_invertSeriesColor(n,e){return{args:[n,this.ensureSeries(n).getColor(!0)]}}invertSeriesRightAxis(n,e){let t=[];return this.handleSeries(n,function(r,i){t.push({args:[i,r.getRightAxis(!0)]})}),t}invertSeriesSmooth(n,e){let t=[];return this.handleSeries(n,function(r,i){t.push({args:[i,r.getSmooth(!0)]})}),t}invertSeriesOpacity(n,e){let t=[];return this.handleSeries(n,function(r,i){t.push({args:[i,r.getOpacity(!0)]})}),t}invertSeriesLineType(n,e){let t=[];return this.handleSeries(n,function(r,i){t.push({args:[i,r.ensureLineStyle().getType(!0)]})}),t}invertSeriesLineWidth(n,e){let t=[];return this.handleSeries(n,function(r,i){t.push({args:[i,r.ensureLineStyle().getWidth(!0)]})}),t}invertSeriesMarkerSymbol(n,e){let t=[];return this.handleSeries(n,function(r,i){t.push({args:[i,r.ensureMarker().getSymbol(!0)]})}),t}invertSeriesMarkerSize(n,e){let t=[];return this.handleSeries(n,function(r,i){t.push({args:[i,r.ensureMarker().getSize(!0)]})}),t}invertSeriesLabelHidden(n,e){let t=[];return this.handleSeries(n,function(r,i){t.push({args:[i,r.ensureLabel().getHidden(!0)]})}),t}invertSeriesLabelPosition(n,e){let t=[];return this.handleSeries(n,function(r,i){t.push({args:[i,r.ensureLabel().getPosition(!0)]})}),t}invertSeriesLabelFontFamily(n,e){let t=[];return this.handleSeries(n,function(r,i){t.push({args:[i,r.ensureLabel().ensureTextStyle().getFontFamily(!0)]})}),t}invertSeriesLabelFontSize(n,e){let t=[];return this.handleSeries(n,function(r,i){t.push({args:[i,r.ensureLabel().ensureTextStyle().getFontSize(!0)]})}),t}invertSeriesLabelItalic(n,e){let t=[];return this.handleSeries(n,function(r,i){t.push({args:[i,r.ensureLabel().ensureTextStyle().getItalic(!0)]})}),t}invertSeriesLabelBold(n,e){let t=[];return this.handleSeries(n,function(r,i){t.push({args:[i,r.ensureLabel().ensureTextStyle().getBold(!0)]})}),t}invertSeriesLabelColor(n,e){let t=[];return this.handleSeries(n,function(r,i){t.push({args:[i,r.ensureLabel().ensureTextStyle().getColor(!0)]})}),t}invertLegendHidden(n){return{args:[this.ensureChartLegend().getHidden(!0)]}}invertLegendPosition(n){return[{args:[this.ensureChartLegend().getPosition(!0)]},{name:"applyLegendHidden",args:[this.ensureChartLegend().getHidden(!0)]}]}invertLegendFontFamily(n){return{args:[this.ensureChartLegendStyle().getFontFamily(!0)]}}invertLegendFontSize(n){return{args:[this.ensureChartLegendStyle().getFontSize(!0)]}}invertLegendItalic(n){return{args:[this.ensureChartLegendStyle().getItalic(!0)]}}invertLegendBold(n){return{args:[this.ensureChartLegendStyle().getBold(!0)]}}invertLegendColor(n){return{args:[this.ensureChartLegendStyle().getColor(!0)]}}invertAxisTickNumber(n,e){let t=[];return this.handleAxis(n,function(r,i){t.push({args:[i,r.getTickNumber(!0)]})}),t}invertAxisTreatAsText(n,e){let t=[];return this.handleAxis(n,function(r,i){t.push({args:[i,r.getTreatAsText(!0)]})}),t}invertAxisScalingMin(n,e){let t=[];return this.handleAxis(n,function(r,i){t.push({args:[i,r.ensureScaling().getMin(!0)]})}),t}invertAxisScalingMax(n,e){let t=[];return this.handleAxis(n,function(r,i){t.push({args:[i,r.ensureScaling().getMax(!0)]})}),t}invertAxisScalingOrientation(n,e){let t=[];return this.handleAxis(n,function(r,i){t.push({args:[i,r.ensureScaling().getOrientation(!0)]})}),t}invertAxisScalingRevert(n,e){return this.invert("applyAxisScalingOrientation",[n])}invertAxisScalingLogBase(n,e){let t=[];return this.handleAxis(n,function(r,i){t.push({args:[i,r.ensureScaling().getLogBase(!0)]})}),t}invertAxisScalingLog(n,e){return this.invert("applyAxisScalingLogBase",[n])}invertAxisGridHidden(n,e){let t=[];return this.handleAxis(n,function(r,i){t.push({args:[i,r.ensureMajorGridLines().getHidden(!0)]})}),t}invertAxisGridColor(n,e){let t=[];return this.handleAxis(n,function(r,i){t.push({args:[i,r.ensureMajorGridLines().getColor(!0)]})}),t}invertAxisLabelHidden(n,e){let t=[];return this.handleAxis(n,function(r,i){t.push({args:[i,r.ensureLabel().getHidden(!0)]})}),t}invertAxisLabelRotate(n,e){let t=[];return this.handleAxis(n,function(r,i){t.push({args:[i,r.ensureLabel().getRotate(!0)]})}),t}invertAxisLabelFontFamily(n,e){let t=[];return this.handleAxis(n,function(r,i){t.push({args:[i,r.ensureLabel().ensureTextStyle().getFontFamily(!0)]})}),t}invertAxisLabelFontSize(n,e){let t=[];return this.handleAxis(n,function(r,i){t.push({args:[i,r.ensureLabel().ensureTextStyle().getFontSize(!0)]})}),t}invertAxisLabelItalic(n,e){let t=[];return this.handleAxis(n,function(r,i){t.push({args:[i,r.ensureLabel().ensureTextStyle().getItalic(!0)]})}),t}invertAxisLabelBold(n,e){let t=[];return this.handleAxis(n,function(r,i){t.push({args:[i,r.ensureLabel().ensureTextStyle().getBold(!0)]})}),t}invertAxisLabelColor(n,e){let t=[];return this.handleAxis(n,function(r,i){t.push({args:[i,r.ensureLabel().ensureTextStyle().getColor(!0)]})}),t}invertPlotAreaLayoutEnabled(n){let e=this.ensurePlotArea().ensureLayout(),t={top:e.getTop(!0),left:e.getLeft(!0),right:e.getRight(!0),bottom:e.getBottom(!0)};return{args:[e.getEnabled(!0),t]}}invertPlotAreaLeft(n){return{args:[this.ensurePlotArea().ensureLayout().getLeft(!0)]}}invertPlotAreaTop(n){return{args:[this.ensurePlotArea().ensureLayout().getTop(!0)]}}invertPlotAreaRight(n){return{args:[this.ensurePlotArea().ensureLayout().getRight(!0)]}}invertPlotAreaBottom(n){return{args:[this.ensurePlotArea().ensureLayout().getBottom(!0)]}}isDrawable(){let n,e,t,r=this.ensureChart().getType()===Po.PIE,i=+!!this.dataHasCat(),a=+!!this.dataHasTx(),g=r?i+1:this.getDataRowNumber(),R=this.getDataColNumber();if(i>=g||a>=R)return!1;for(n=i;n<g;n++)for(e=a;e<R;e++)if(To(t=this.getData(n,e))&&(!r||t>0))return!0;return!1}getEmptyCategory(){let n=this.getSeriesCat(),e=this.getSeriesCount();return n.map((t,r)=>{if(!a1(n[r]))return!1;for(let i=0;i<e;i++)if(To(this.getSeriesVal(i,r)))return!1;return!0})}getEmptySeries(){return Array.from({length:this.getSeriesCount()},(n,e)=>this.getSeriesVal(e).every(t=>a1(t)))}calcSeriesData(n){let e=[];for(let t=0,r=this.getSeriesCount();t<r;++t)e.push({name:this.getSeriesTx(t),data:this.getSeriesVal(t)});return e}calcPlotBound(n){let{top:e,bottom:t,left:r,right:i}=mo.padding,a=this.ensureGlobalTextStyle().getFontSize(),g=this.ensureChartTitle();g.getText()&&(e+=ag(g.ensureTextStyle().getFontSize()||a));let R=this.ensureChartSubtitle();R.getText()&&(e+=ag(R.ensureTextStyle().getFontSize()||a)+(g.getText()?mo.titleGap:0));let L=this.ensureChartLegend();if(!L.getHidden())switch(L.getPosition()){case"t":e+=ag(L.ensureTextStyle().getFontSize()||a)+mo.plotGap;break;case"b":t+=ag(L.ensureTextStyle().getFontSize()||a)+mo.plotGap;break;case"l":r+=mo.legendWidth;break;default:i+=mo.legendWidth}return e+=mo.plotGap,r+=mo.plotGap,i+=mo.plotGap,n&&(e/=mo.cm2pxMultiplier,r/=mo.cm2pxMultiplier,i/=mo.cm2pxMultiplier,t/=mo.cm2pxMultiplier),{top:e,left:r,right:i,bottom:t}}getEchartParameters(n,e){let t=function(r){switch(r.ensureChart().getType()){case Po.LINE:return new jh(r);case Po.AREA:return new ose(r);case Po.BAR:return new bw(r);case Po.PIE:return new ase(r);case Po.SCATTER:return new sse(r);case Po.HYBRID:return new lse(r)}}(this);if(t)return t.initData(),t.convert(n,e)}clone(){return new this.constructor(this.getChartCfg(),this.getOptionCfg())}getConfig(){return{chartCfg:this.getChartCfg(),optionCfg:this.getOptionCfg()}}getChartCfg(){return this.build()}getOptionCfg(){return this._options}},Lse=aD.configList.concat(["displayRange"]);class cz extends aD{static get configList(){return Lse}getDisplayRange(){return this.getConfig("displayRange")}setDisplayRange(e){return this.setConfig("displayRange",e)}}let Fse=Object.assign(Object.create(null),hz.prototype.getConfigMap(),{[cz.configName]:cz});class Vse extends hz{getConfigMap(){return Fse}}let{DIRECTION:vm,DEFAULT:Hse,CHART_TYPE:$se}=V,{isDefined:u1}=P;function ym(n,e){let t=kp(n),r=[];for(let i=0;i<t.length;i++){let a=nr.create(t[i],e);a&&r.push(a)}return r}function dz(n){let e=[];for(let t=0;t<n.length;t++)e.push(n[t].toLabel());return e.join(",")}let fz=class extends Vse{constructor(n,e){(function(t,r){let i=r.sheet,a=t.plotArea,g=a&&a.series;if(!g||!Array.isArray(g)||!g.length)return;let R=!1;g.forEach(L=>{L&&(L.cat||L.tx||L.val)&&(L.cat=L.cat?ym(L.cat,i):[],L.tx=L.tx?ym(L.tx,i):[],L.val=L.val?ym(L.val,i):[],R=!0)}),R&&(u1(a.switchRowColumn)||function(L){let W=L.plotArea.series,K,Q=[];for(let oe=0,se=W.length;oe<se;oe++){let he=W[oe];if(he.val.length>0){if((K=function(me){if(me.length===0)return null;let ye=null,Te=me[0];if(Te.getWidth()>1)ye=vm.ROW;else if(Te.getHeight()>1)ye=vm.COL;else if(me.length>1){let Me=me[1];Te.to.row<Me.to.row?ye=vm.ROW:Te.to.col<Me.to.col&&(ye=vm.COL)}return ye}(he.val))!==null)break;Q=Q.concat(he.val)}}!K&&1<Q.length&&(Q[0].to.row<Q[1].to.row?K=vm.COL:Q[0].to.col<Q[1].to.col&&(K=vm.ROW)),L.plotArea.switchRowColumn=K!==Hse.DATA_DIR}(t),u1(a.useRowHeader)&&u1(a.useColumnHeader)||function(L){let W=L.plotArea.series,K=!1,Q=!1;for(let se=0,he=W.length;se<he;se++){let me=W[se];if(me.val.length!==0&&(me.cat.length>0&&(K=!0),me.tx.length>0&&(Q=!0),K&&Q))break}let oe=L.plotArea.switchRowColumn;L.plotArea.useRowHeader=oe?Q:K,L.plotArea.useColumnHeader=oe?K:Q}(t),t.displayRange||function(L){let W,K,Q,oe=[],se=L.plotArea.series,he=L.plotArea.switchRowColumn,me=he?"row":"col",ye=he?"col":"row",Te=!1,Me=!1;if(se.forEach(Ke=>{if(Ke.val.length===0)return;let at=Ke.val;if(Ke.tx.length>0){let gt=Ke.tx[0];gt.sheetInfo?.sheetId===at[0].sheetInfo?.sheetId&>.to[me]+1===at[0].from[me]?at[0].from[me]-=1:at.unshift(gt),Te=!0}oe.push(at),!W&&Ke.cat.length>0&&(W=Ke.cat,oe.unshift(W),Me=!0)}),oe.length===0){L.displayRange="";return}if(Me&&Te){let Ke=oe[1];if(Ke.length===1||1<Ke[0][me==="col"?"getWidth":"getHeight"]())W[0].from[me]-=1;else{let{row:at,col:gt}=W[0].from,pt=new nr(W[0].sheetInfo,{row:at,col:gt},{row:at,col:gt});pt.from[me]=Ke[0].from[me],pt.to[me]=Ke[0].from[me],oe[0].unshift(pt)}}let Oe=me==="col"?"isVertMergeable":"isHoriMergeable",ze=1;for(K=1;K<oe.length;K++){var We,qe;if(We=oe[K][0],qe=oe[ze-1][0],!(We.sheet===qe.sheet&&We.toSynoRange()[Oe](qe.toSynoRange(),!0))){oe[ze]=oe[K],ze+=1;continue}for(Q=0;Q<oe[ze-1].length;Q++)oe[ze-1][Q].to[ye]=oe[K][Q].to[ye]}oe.length=ze,L.displayRange=oe.map(Ke=>dz(Ke)).join(",")}(t))})(n,e),super(n,e),this.data=[],this.drawableData=[],this.init()}readOptionCfg(n){this.sheet=n&&n.sheet}init(){this.rectRange=this.checkRectRange(),this.fillDataByRanges()}getDrawableData(){return this.drawableData.map((n,e)=>n.map((t,r)=>this._getDataFromCoord(t,e,r)))}getRawData(n){return n?this.data:this.drawableData}getData(n,e,t){let r=this.getDataCoord(n,e,t);return this._getDataFromCoord(r,n,e)}_getDataFromCoord(n,e,t){let r=this.dataHasCat()&&e===0&&this.ensureChart().getType()!==$se.SCATTER,i=this.dataHasTx()&&t===0;return fh(n)?this.getSheetData(n.id,n.row,n.col,r||i):n}getDataCoord(n,e,t){return this._getData(this.getRawData(t),n,e)}getDataRowNumber(n){return this._getDataRowNumber(this.getRawData(n))}getDataColNumber(n){return this._getDataColNumber(this.getRawData(n))}setData(n,e,t){let r=this.getRawData(!0);r[n]||(r[n]=[]),r[n][e]=t}setDataByRange(n,e,t,r){let i,a,g=r.from.row,R=r.from.col,L=this.getSwitchRowColumn();r.forAll((function(W,K){i=L?K-R:W-g,a=L?W-g:K-R,this.setData(e+i,t+a,{row:W,col:K,id:n})}).bind(this))}_completeData(n){let e=0,t;for(n.forEach(function(r){r&&(e=Math.max(e,r.length))}),n[0]||(n[0]=[]),t=0;t<e;t++)fi(n[0],t)||(n[0][t]=void 0)}completeData(){this._completeData(this.data)}fillDrawableData(){this.drawableData=this.data}getSheetData(n,e,t,r){let i=this._getSheet(n);if(!i)return"";if(r)return i.renderCache.getCellText(e,t);{let a=i.formula.getCellValue(e,t);return Tp.error.isError(a)?a.message:a}}ensureDisplayRange(){return this.ensureChart().getDisplayRange()}compute(n){let e=this.getSwitchRowColumn()?"col":"row",t=[],r=this.rectRange?this.sheet.getWorkbook().getSheetById(this.rectRange.id):this.sheet,i={sheetId:r.sheetId,shName:r.getName()};function a(se){Array.isArray(se)||(se=[se]);let he=se[0].from[e],me=se[0].to[e],ye=Array(me-he+1).fill(null).map(()=>[]);se.forEach(Te=>{for(let Me=he;Me<=me;Me++){let Oe={from:{row:Te.from.row,col:Te.from.col},to:{row:Te.to.row,col:Te.to.col}};Oe.from[e]=Oe.to[e]=Me,ye[Me-he].push(new nr(Te.sheetInfo||i,Oe.from,Oe.to))}}),Array.prototype.push.apply(t,ye)}let g=this.rectRange?this.rectRange.blocks:ym(this.ensureDisplayRange(),this.sheet);if(this.rectRange&&this.getSwitchRowColumn())for(let se=0,he=g[0].length;se<he;se++){let me=[];for(let ye=0,Te=g.length;ye<Te;ye++)me.push(g[ye][se]);a(me)}else g.forEach(se=>a(se));let R=this.dataHasTx(),L=e==="row"?"col":"row";function W(se){let he="";if(R){let me=se[0];me.from[L]===me.to[L]?(he=me.toLabel(),se.shift()):(he=new nr(me.sheetInfo,me.from,me.from).toLabel(),me.from[L]+=1)}return{tx:he,val:dz(se)}}let K={cat:"",tx:[],val:[]},Q=0;this.dataHasCat()&&(K.cat=W(t[0]).val,Q+=1);for(let se=t.length;Q<se;Q++){let{tx:he,val:me}=W(t[Q]);K.tx.push(he),K.val.push(me)}this._seriesData=K;let oe=super.compute(n);return delete this._seriesData,oe}apply(n,e){let t=super.apply(n,e);return this._clearFormatCodeCache(),t}applyDisplayRange(n){this.ensureChart().setDisplayRange(n),this.rectRange=this.checkRectRange(),this.fillDataByRanges()}applySwitchRowColumn(n){super.applySwitchRowColumn(n),this.fillDataByRanges()}invertDisplayRange(){return{args:[this.ensureDisplayRange()]}}fillDataByRanges(){if(this.rectRange)return void this.fillDataByRectRange();let n=0,e,t=this.getSwitchRowColumn();this.data=[];let r=ym(this.ensureDisplayRange(),this.sheet);for(e=0;e<r.length;e++){let i=r[e].toSynoRange();this.setDataByRange(r[e].sheetInfo.sheetId,n,0,i),n+=t?i.getWidth():i.getHeight()}this.completeData(),this.fillDrawableData(),this._clearFormatCodeCache()}fillDataByRectRange(){let n=0,e=0,t,r,i=this.getSwitchRowColumn(),a=this.rectRange.blocks;for(t=0,this.data=[];t<a.length;t++){for(r=0,e=0;r<a[t].length;r++)i?this.setDataByRange(this.rectRange.id,e,n,a[t][r]):this.setDataByRange(this.rectRange.id,n,e,a[t][r]),e+=a[t][r].getWidth();n+=a[t][0].getHeight()}this.fillDrawableData(),this._clearFormatCodeCache()}checkRectRange(){let n,e;if(!this.ensureDisplayRange())return;let t=ym(this.ensureDisplayRange(),this.sheet);if(t.length===0)return!1;let r=t[0].sheetInfo?.sheetId;for(n=1;n<t.length;n++)if(t[n].sheetInfo?.sheetId!==r)return!1;let i=[t[0]],a=[i];for(n=1;n<t.length;n++)t[n].from.row!==t[n-1].from.row||t[n].to.row!==t[n-1].to.row?(i=[t[n]],a.push(i)):i.push(t[n]);let g=a[0].length;if(t.length%g!=0)return!1;for(n=1;n<a.length;n++){if(a[n].length!==g)return!1;for(e=0;e<g;e++)if(a[n][e].from.col!==a[0][e].from.col||a[n][e].to.col!==a[0][e].to.col)return!1}for(n=0;n<a.length;n++)for(e=0;e<a[n].length;e++)a[n][e]=a[n][e].toSynoRange();return{id:r,blocks:a}}_clearFormatCodeCache(){this._fc={}}_retrieveFormatCode(n){if(this._fc[n]!==void 0)return this._fc[n];let e=r=>{if(!r)return null;let i=this._getSheet(r.id);if(!i)return null;let a=i.worksheet.getComputedCellStyle(r.row,r.col).getNumberFormat();return a.isDefault()?null:a.fc},t="General";if(n==="x")this._fc.x=this.dataHasCat()?e(this.getDataCoord(0,+!!this.dataHasTx())):t;else if(n.startsWith("y")){let r=this.forEachSeries(function(i,a){let g=i.getAxis2();return g&&n==="y2"||!g&&n!=="y2"?a:null});this._fc[n]=u1(r)?e(this.getDataCoord(r+ +!!this.dataHasCat(),+!!this.dataHasTx())):t}return this._fc[n]||t}getAxisFc(){return{x:this._retrieveFormatCode("x"),y1:this._retrieveFormatCode("y1"),y2:this._retrieveFormatCode("y2")}}dataFormatter(n,e){let t=this.sheet.getWorkbook().getLocale().getSSF(),r=this._retrieveFormatCode(e);return t.render(r,n)}getSourceSeriesCat(){return this._seriesData.cat}getSourceSeriesTx(n){return this._seriesData.tx[n]}getSourceSeriesVal(n){return this._seriesData.val[n]}_getSheet(n){return this.sheet.getWorkbook().getSheetById(n)}getOptionCfg(){return{sheet:this.sheet}}};var gz=function(n){return n.IMAGE="img",n.CHART="chart",n}({});function h1(n){return n instanceof J9||!!n.infoHandler}function pz(n,e){let t,r,i,a;return Ju(n)?{left:r,top:t}=n:{x:r,y:t}=mz(n.from,e),Dd(n)?{x:i,y:a}=mz(n.to,e):(i=r+n.width,a=t+n.height),{top:t,left:r,bottom:a,right:i}}function mz(n,e){let{col:t,row:r,colOffset:i,rowOffset:a}=n;return{x:Math.min(yz(t,e?.colOffset)+i,yz(t+1,e?.colOffset)),y:Math.min(wz(r,e?.rowOffset)+a,wz(r+1,e?.rowOffset))}}function vz(n,e,t){if(n<0)return 0;let r=e?.[n];return r??n*t}function yz(n,e){return e===void 0&&(e=[]),vz(n,e,Qe.COL_WIDTH)}function wz(n,e){return e===void 0&&(e=[]),vz(n,e,Qe.ROW_HEIGHT)}let zse=class extends EC{constructor(n){super(n,"synoDrawingController"),this.images=[],this.charts=[]}drawings(){return this.images.concat(this.charts)}getImages(){return this.images}getCharts(){return this.charts}enablePlugin(){this.addHook("afterInit",n=>this.initData(n)),this.addHook("repairCross",n=>this.repairCross(n)),super.enablePlugin()}destroy(){for(let n=0;n<this.images.length;n++)this.images[n].destroy();for(let n=0;n<this.charts.length;n++)this.charts[n].destroy();super.destroy()}initData(n){let e=n.drawing,t=Array.isArray(e)&&e.length>0;return t&&Sr(e,r=>{r.pos.type==null&&(r.pos.type=vl.Absolute,r.pos.top-=Qe.COL_HEADER_HEIGHT,r.pos.left-=Qe.ROW_HEADER_WIDTH),r.type==="img"?this.images.push(this._createImage(r.id,r.pos,r.path||r.id)):r.type==="chart"&&this.charts.push(this._createChart(r.id,r.pos,r.chartObj))}),t}collectColor(n){for(let e of this.charts)e.infoHandler.getInfo().getAllColors().forEach(t=>{n.add(t)});return n}_createImage(n,e,t){return new ese(n,e,{path:t})}insertImage(n,e,t){t===void 0&&(t=!0);let r=this.getImageById(n);r||(r=this._createImage(n,e,n),this.images.push(r),t&&this.sheet.runHooks("afterInsertImage",n,e),this.sheet.notifyPluginChanges(["drawing"]))}removeImage(n,e){e===void 0&&(e=!0);let t=this.images.findIndex(a=>a.id===n);if(t<0)return;let r=this.images[t],i=r.getPosition();r.destroy(),this.images.splice(t,1),e&&this.sheet.runHooks("afterRemoveImage",n,i),this.sheet.notifyPluginChanges(["drawing"])}resizeImage(n,e){let t=this.getImageById(n);if(!t)return;let r=t.getPosition();t.setPosition(e),this.sheet.runHooks("afterResizeImage",n,r,t.getPosition()),this.sheet.notifyPluginChanges(["drawing"])}_createChart(n,e,t){return new J9(n,e,{chartInfo:this.convertChartInfo(t),sheet:this.sheet})}insertChart(n,e,t,r){r===void 0&&(r=!0);let i=this.getChartById(n);i||(i=this._createChart(n,e,t),this.charts.push(i),r&&(this.sheet.runHooks("afterInsertChart",n,e,i.infoHandler.getChartObj()),this.sheet.getWorkbook().getNotifier()?.onColorAdded()),this.sheet.notifyPluginChanges(["drawing"]))}removeChart(n,e){e===void 0&&(e=!0);let t=this.charts.findIndex(g=>g.id===n);if(t<0)return;let r=this.charts[t],i=r.getPosition(),a=r.infoHandler.getChartObj();r.destroy(),this.charts.splice(t,1),e&&this.sheet.runHooks("afterRemoveChart",n,i,a),this.sheet.notifyPluginChanges(["drawing"])}resizeChart(n,e){let t=this.getChartById(n);if(!t)return;let r=t.getPosition();t.setPosition(e),this.sheet.runHooks("afterResizeChart",n,r,t.getPosition()),this.sheet.notifyPluginChanges(["drawing"])}adjustChart(n,e){let t=this.getChartById(n);if(!t)return;let r=this.convertChartInfo(e),i=t.infoHandler.getChartObj();t.infoHandler.adjust(r),this.sheet.runHooks("afterAdjustChart",n,i,e),this.sheet.notifyPluginChanges(["drawing"])}setChartConfig(n,e,t){let r=this.getChartById(n);if(!r)return;let i=r.infoHandler.setChartConfig(e,t);this.sheet.runHooks("afterSetChartConfig",n,e,t,i),this.sheet.notifyPluginChanges(["drawing"]),this.sheet.getWorkbook().getNotifier()?.onColorAdded()}getImageById(n){return this._getDrawingById(this.images,n)}getChartById(n){return this._getDrawingById(this.charts,n)}_getDrawingById(n,e){let t=null;return Sr(n,function(r){if(r.id===e)return t=r,!1}),t}repairCross(n){let e=n[this.pluginName];e&&Sr(e,t=>{let r=this.getChartById(t.chartId);r&&t.displayRange&&r.infoHandler.updateDisplayRange(t.displayRange)})}convertChartInfo(n){return new fz(n,{sheet:this.sheet})}modifyDrawingsByInsertRowCol(n,e,t){this.drawings().forEach((r,i)=>{if(!Ju(r.position)){let a=r.getPosition();this._changePositionByInsertRowCol(a,n,e,t),h1(r)?this.resizeChart(r.id,a):this.resizeImage(r.id,a)}})}modifyDrawingsByRemoveRowCol(n,e,t){let r={start:e,end:e+t-1},i=[];this.drawings().forEach((a,g)=>{if(!Ju(a.position))if(Dd(a.position)&&this.sectionContainImage(n,r,a.position))i.push([h1(a),a.id]);else{let R=a.getPosition();this._changePositionByRemoveRowCol(R,n,e,t),h1(a)?this.resizeChart(a.id,R):this.resizeImage(a.id,R)}}),i.forEach(a=>{let[g,R]=a;return g?this.removeChart(R):this.removeImage(R)})}modifyDrawingsByMoveRowCol(n,e,t,r,i){let a=n==="row"?this.sheet.countRows():this.sheet.countCols();if(e+t+r>a&&(r=a-e-t),r<0)return;let g=Lp(e,t,r,i),R={start:g.sec[0].start,end:g.sec[1].end};this.drawings().forEach((L,W)=>{if(Ju(L.position)||!this.sectionIntersectImage(n,R,L.position))return;let K=L.getPosition();if(this.sectionContainImage(n,g.sec[0],K))this._changePositionByInsertRowCol(K,n,g.sec[0].start,g.sec[1].amount);else if(this.sectionContainImage(n,g.sec[1],K))this._changePositionByRemoveRowCol(K,n,g.sec[0].start,g.sec[0].amount);else{let Q=g.sec[+!!g.isBackward].amount,oe=g.sec[+!!g.isBackward].start,se=g.isBackward?g.sec[0].start:g.sec[0].start+g.sec[1].amount;this._changePositionByRemoveRowCol(K,n,oe,Q),this._changePositionByInsertRowCol(K,n,se,Q)}h1(L)?this.resizeChart(L.id,K):this.resizeImage(L.id,K)})}_changePositionByInsertRowCol(n,e,t,r){!Ju(n)&&n.from[e]>=t&&(n.from[e]+=r),Dd(n)&&(n.to[e]>t||n.to[e]===t&&n.to[`${e}Offset`]>0)&&(n.to[e]+=r)}_changePositionByRemoveRowCol(n,e,t,r){let i=a=>{a[e]>=t+r?a[e]-=r:a[e]>=t&&(a[e]=t,a[`${e}Offset`]=0)};Ju(n)||i(n.from),Dd(n)&&i(n.to)}sectionContainImage(n,e,t){return CV(this.sectionToBBox(n,e.start,e.end),pz(t))}sectionIntersectImage(n,e,t){return _V(this.sectionToBBox(n,e.start,e.end),pz(t))}sectionToBBox(n,e,t){return n==="row"?{top:e*this.sheet.worksheet.getDefaultRowHeight(),left:Number.NEGATIVE_INFINITY,bottom:(t+1)*this.sheet.worksheet.getDefaultRowHeight(),right:Number.POSITIVE_INFINITY}:{top:Number.NEGATIVE_INFINITY,left:e*this.sheet.worksheet.getDefaultColWidth(),bottom:Number.POSITIVE_INFINITY,right:(t+1)*this.sheet.worksheet.getDefaultColWidth()}}};class Wse{constructor(e){this.workbook=e}getIndex(e){let t={gcVer:e.gcVer,maxIndex:this.workbook.getMaxIndex(),order:this.workbook.getOrder(),schemaVersion:Qe.SCHEMA_VERSION,sheets:{},ver:e.ver};return this.workbook.getMaxPivotTableIndex()&&(t.maxPivotIndex=this.workbook.getMaxPivotTableIndex()),this.workbook.forAll((r,i)=>{let a=t.sheets[i]={deleted:!1,title:r.name};r.color&&(a.tabColor=r.color),r.hidden&&(a.hidden=r.hidden)}),t}*getWorksheetGenerator(e){let t=[];yield JSON.stringify(this.getWorksheet(e)).slice(0,-1),yield',"cells":',yield*this.getCellGenerator(e.worksheet,t),yield',"notes":',yield JSON.stringify(t),yield"}"}getStyle(){return this.workbook.getStyleManager().toJSON()}getDefine(){return this.workbook.getNameManager().toJSON()}getComment(){return this.workbook.getCommentStore().toJSON()}getProtection(){return this.workbook.getRuleStore().toJSON()}getExternalLinks(){return this.workbook.getExternalManager().listLinkIds().length>0?this.workbook.getExternalManager().toJSON():null}getPivotCaches(){return this.workbook.getPivotTableManager().serializeCaches()}getPivotTables(){return this.workbook.getPivotTableManager().serializeTables()}getFileList(){let e=new Set;this.workbook.forAll(r=>{let i=this.getDrawings(r.sheet);for(let a=0;a<i.length;a++)e.add(i[a].id)});let t=[];return e.forEach(r=>t.push(r)),t}getWorksheet(e){let t=e.getDataModel(),r=e.getPlugin("synoFreezeBar"),i={cfs:this.getCfs(e),colCount:e.countCols(),rowCount:e.countRows(),rows:{},cols:{},colSpans:function(R,L,W){(W??={}).s===0&&(W=sm(W,"s"));let K=[],Q=null;for(let oe=0;oe<L;oe++){let se=R[oe]?{...R[oe]}:{};se.s===void 0?se.s=W.s:se.s===0&&delete se.s,se=function(he){let me={};return he.hidden&&(me.hidden=he.hidden),typeof he.s=="number"&&he.s>=0&&(me.s=he.s),typeof he.w=="number"&&he.w>0&&(me.w=he.w),typeof he.outlineLevel=="number"&&he.outlineLevel>0&&(me.outlineLevel=he.outlineLevel),he.collapse===!0&&(me.collapse=he.collapse),me}(se),Q&&DM(se,Q)?Q.end=oe+1:(Q={start:oe+1,end:oe+1,...se},K.push(Q))}return Q&&DM(Q,W)?Q.end=16384:L<16384&&W.s&&K.push({start:L+1,end:16384,...W}),K=K.filter(oe=>!DM(oe,{}))}(t.colInfos,t.getColCount(),t.getGlobalInfo()),global:t.getNormalizedGlobalInfo(),drawing:this.getDrawings(e).concat(this.getCharts(e)),filter:this.getFilter(e),fixedColumnLeft:r.fixedColumnsLeft,fixedRowTop:r.fixedRowsTop,mergeCells:this.getMergeCells(e),validation:this.getValidations(e),hyperlinks:this.getHyperlinks(e)};function a(R,L,W,K){let Q=R[L];Q===void 0&&(Q=R[L]={}),Q[W]=K}let g=i.rows;return t.rowInfos.forEach((R,L)=>{R&&(R.hidden&&a(g,L,"hidden",R.hidden),typeof R.s=="number"&&R.s>=0&&a(g,L,"s",R.s),typeof R.h=="number"&&R.h>0&&a(g,L,"h",R.h),typeof R.outlineLevel=="number"&&R.outlineLevel>0&&a(g,L,"outlineLevel",R.outlineLevel),R.collapse===!0&&a(g,L,"collapse",!0))}),e.isRtl()&&(i.rightToLeft=!0),i}*getCellGenerator(e,t){yield"{";let r=0;for(let i=0,a=e.getRowLength();i<a;i++){let g=e.getRow(i);if(!g)continue;let R="",L=0;for(let W=0,K=g.getColLength();W<K;W++){let Q=g.getCell(W);if(!Q)continue;L===0&&(r>0&&(R+=","),R+=`"${i}":{`);let oe={};Q.getXfId()>0&&(oe.s=Q.getXfId()),Cr(Q.getValue())||(oe.v=Q.getValue());let se=Q.getNote();se&&t.push({row:i,col:W,text:se}),L>0&&(R+=","),R+=`"${W}":${JSON.stringify(oe)}`,L++}L>0&&(R+="}",r++,yield R)}yield"}"}getMergeCells(e){return e.getPlugin("synoMergeCell").serialize()}getCfs(e){return e.getPlugin("synoConditionalFormat").cfs.map(t=>t.serialize())}getDrawings(e){return e.getPlugin("synoDrawingController").getImages().map(t=>({id:t.id,pos:t.getPosition(),type:gz.IMAGE}))}getCharts(e){return e.getPlugin("synoDrawingController").getCharts().map(t=>({id:t.id,pos:t.getPosition(),chartObj:t.infoHandler.getChartObj(),type:gz.CHART}))}getFilter(e){let t=e.getPlugin("synoFilter"),r=t.filter,i=t.filterView,a={};return r&&(a=r.toJSON()),i.length>0&&(a.filterView=i.map(g=>g.toJSON())),a}getValidations(e){let t=e.getPlugin("synoValidation"),r={},i=t.validationMap;return Object.keys(i).forEach(a=>{let g=i[a];r[a]=Object.assign(g.cloneConfig(),{ranges:g.ranges.map(R=>nr.toLabel(R))})}),r}getHyperlinks(e){return e.getHyperlinkModel().toJSON()}}let Use=function(n,e,t,r){for(var i=n.length,a=t+-1;++a<i;)if(e(n[a],a,n))return a;return-1},Gse=function(n){return n!=n},jse=function(n,e,t){for(var r=t-1,i=n.length;++r<i;)if(n[r]===e)return r;return-1},qse=function(n,e){return!!(n!=null&&n.length)&&(e==e?jse(n,e,0):Use(n,Gse,0))>-1},Yse=function(n,e,t){for(var r=-1,i=n==null?0:n.length;++r<i;)if(t(e,n[r]))return!0;return!1};var Kse=im&&1/JM(new im([,-0]))[1]==1/0?function(n){return new im(n)}:function(){};let bz=function(n,e,t){var r=-1,i=qse,a=n.length,g=!0,R=[],L=R;if(t)g=!1,i=Yse;else if(a>=200){var W=Kse(n);if(W)return JM(W);g=!1,i=k9,L=new yw}else L=R;e:for(;++r<a;){var K=n[r],Q=K;if(K=t||K!==0?K:0,g&&Q==Q){for(var oe=L.length;oe--;)if(L[oe]===Q)continue e;R.push(K)}else i(L,Q,t)||(L!==R&&L.push(Q),R.push(K))}return R},Cz=function(n){return n&&n.length?bz(n):[]};function _z(n,e){if(e===void 0&&(e=[]),n.length<2)throw Error("Not enough rows in data");let t=new Map;for(let L of e){if(!L.isFromData())continue;let W=L.getName().toLocaleLowerCase(),K=t.get(W);K?K.push(L):t.set(W,[L])}let r=[],i=du(n.map(L=>L.length))??0,a=n.shift()??[],g=[];for(let L=0;L<i;L++){let W=(a[L]?.value??"").toString();if(W==="")throw Error("Some column names are missing");let K=t.get(W.toLocaleLowerCase())?.shift();K&&(r[L]=K),g[L]=new gm({id:K?.getId()??pe(),name:W,suffix:"",fromData:!0,sharedItems:{items:[]}})}let R=[];for(let L=0;L<n.length;L++){R[L]=[];for(let W=0;W<i;W++)R[L][W]=g[W].createSharedItem(n[L][W])}for(let L=0;L<i;L++){let W=g[L],K=g[L].getType(),Q=r[L];if(Q&&Q.getType()===K)W.setNumFmt(Q.getNumFmt()),W.setGroupSetting(Q.getGroupSetting()),W.setSuffix(Q.getSuffix());else if(K===wu.datetime){let oe=W.getSharedItems().map(he=>he.value).filter(ga),se=oe.some(he=>he>=1);oe.some(he=>!Number.isInteger(he))?se?W.setNumFmt("yyyy/mm/dd hh:mm:ss"):W.setNumFmt("hh:mm:ss"):W.setNumFmt("yyyy/mm/dd")}}return{fields:g,records:R}}function Sz(n,e,t){let r=n.getSheetById(e);if(!r)return en.PIVOT_TABLE_NO_SHEET;let[i,a,g,R]=r.getRangeBound(t.from,{row:t.to.row<0?r.countRows():t.to.row,col:t.to.col<0?r.countCols():t.to.col}),L=R-a+1;if(g-i+1<=1||L<=0)return en.PIVOT_TABLE_ROW_NOT_ENOUGH;if(r.getPlugin("synoMergeCell").getOverlap(new sn(i,a,g,R)).length>0)return en.PIVOT_TABLE_CONTAIN_MERGE_CELL;let W=[];for(let oe=i;oe<=g;oe++){let se=[];for(let he=a;he<=R;he++){var K,Q;let me=r.formula.getCellValue(oe,he);if(oe===i&&Cr(me))return en.PIVOT_TABLE_MISSING_ROW_HEADER;let ye=r.getComputedCellStyle(oe,he).getNumberFormat().isDateTime();if(Array.isArray(me))throw Error("Should not use base formula plugin");se.push((K=me,(Q=ye)===void 0&&(Q=!1),Pi(K)?{type:"error",value:K.name}:typeof K=="number"?Q?{type:"datetime",value:K}:{type:"number",value:K}:typeof K=="boolean"?{type:"boolean",value:K}:typeof K=="string"?{type:"string",value:K}:{type:"missing",value:null}))}W.push(se)}return W}function Iz(n){return`${n.getId()}-group-${pe()}`}class _w{constructor(e,t=new HM){this.locale=t,this.id=e.id,this.source={},this.fields=[],this.records=[],this.fromJSON(e)}getId(){return this.id}getSource(){return{...this.source}}getFields(){return this.fields}getField(e){return this.fields.find(t=>t.getId()===e)}getRecords(){return this.records}update(e){let t=Sz(e,this.source.sheetId,this.source.range);if(!Array.isArray(t))return;let{fields:r,records:i}=_z(t,this.fields);this.fields=r,this.records=i}updateSource(e){this.source=e}toJSON(){return{id:this.id,source:{...this.source},fields:this.fields.map(e=>e.toJSON()),records:this.records}}fromJSON(e){this.source=e.source,this.fields=e.fields.map(t=>new gm(t)),this.generateMissingGroupMaps(this.fields),this.records=e.records,this.forceRecordsShareItems(this.records,this.fields)}generateMissingGroupMaps(e){let t=r=>{let i=r.getGroupSetting();return i?.base?e.find(a=>a.getId()===i.base)??null:r};for(let r of e){let i=r.getGroupSetting();if(!i||!i.grouping||i.map!==null)continue;let a=t(r);if(a)if(i.type==="datetime"){let g=qM(a,i.grouping,this.locale);if(!g)continue;i.items=g.items,i.map=g.map}else if(i.type==="number"){let g=Q_(a,i.grouping,this.locale);if(!g)continue;i.items=g.items,i.map=g.map}else i.type==="manual"&&(i.map=i.grouping)}}forceRecordsShareItems(e,t){t=t.filter(r=>r.isFromData());for(let r=0;r<e.length;r++)for(let i=0;i<t.length;i++){let a=e[r][i]??{type:"missing",value:null};a.type!=="shared"&&(e[r][i]=t[i].createSharedItem(a))}}getBaseField(e){let t=this.getField(e);if(!t)throw Error("Non-exist field");let r=t.getGroupSetting(),i=r?.base?this.getField(r.base):t;if(!i)throw Error("Non-exist base field");return i}getParentField(e){let t=this.getField(e);if(!t)throw Error("Non-exist field");let r=t.getGroupSetting();return r?.parent&&this.getField(r.parent)||null}getChildField(e){let t=this.getGroupFields(e),r=t.findIndex(i=>i.getId()===e);if(r<0)throw Error("Non-exist field");return r===0?null:t[r-1]}getGroupFields(e){let t=this.getBaseField(e);if(!t)return[];let r=[t],i=this.getField(t.getGroupSetting()?.parent??"");for(;i;)r.push(i),i=this.getField(i.getGroupSetting()?.parent??"");return r}getFieldGroupLevel(e){return this.getGroupFields(e).findIndex(t=>t.getId()===e)}getChildrenFields(e){let t=this.getField(e);if(!t)throw Error("Invalid field id");let r=this.getGroupFields(e);return r.slice(0,r.indexOf(t))}insertParentGroupField(e,t,r,i,a){let g=this.getBaseField(e.getId()),R=this.getParentField(e.getId());t=t??Iz(g);let L=a||g.getName(),W=this.getNewFieldName(`${L} - ${this.locale.getText("default_group_name")}`,r==="manual"?1:void 0),K=new gm({id:t,name:W,suffix:"",fromData:!1,sharedItems:{items:[]},group:{base:g.getId(),parent:R?.getId()??null,type:r,grouping:i,items:[],map:null}});return e.setGroupSetting({parent:t,type:r}),this.fields.push(K),K}removeGroupField(e){let t=this.getParentField(e.getId()),r=this.getChildField(e.getId());if(!r)throw Error("Cannot remove base field");r.setGroupSetting({parent:t?.getId()??null});let i=this.fields.indexOf(e);i>=0&&this.fields.splice(i,1)}getNewFieldName(e,t){let r=/\d$/.test(e),i=LM(this.fields.map(a=>a.getName()),a=>{if(t===void 0&&a===0)return e;let g=a+(t??0);return r?`${e}_${g}`:`${e}${g}`});if(!i)throw Error("Cannot find proper field name");return i}getNewGroupName(e,t){t===void 0&&(t=[]);let r=LM(Cz(this.getGroupMappings(e).levelMaps.flat().map(i=>i.value+"").concat(t)),i=>`${this.locale.getText("default_group_name")}${i+1}`);if(!r)throw Error("Cannot find proper group name");return r}getUnnamedGroupName(){return this.locale.getText("unnamed_group_name")}getGroupMappings(e){let t=this.getGroupFields(e);if(t.length===0)throw Error("Invalid field id");let r=t[0];if(r.getGroupSetting()===null)return{fields:[r.getId()],levelMaps:[r.getItemsForPivotField()]};let i=r.getSharedItems(),a=i.map(Io),g=[];for(let R=0;R<t.length;R++){let L=t[R],W=L.getGroupSetting()?.map??{},K=[];for(let Q=0;Q<i.length;Q++)K[Q]=W[a[Q]]??g[R-1]?.[Q]??i[Q];g.push(K)}return{fields:t.map(R=>R.getId()),levelMaps:g}}getGroupBaseItems(e,t){let r=this.getField(e),i=this.getFieldGroupLevel(e);if(!r||i<0)throw Error("Invalid field id");if(!r.hasGroupSetting())return[t];let a=this.getGroupMappings(e),g=a?.levelMaps[0],R=a?.levelMaps[i],L=[];for(let W=0;W<g.length;W++)Ba(R[W],t)&&L.push(g[W]);return L}setManualGroup(e,t,r,i){let a,g,R;if(a=this.getField(e))g=this.getChildField(a.getId()),R=this.getBaseField(a.getId());else{if(t&&(g=this.getField(t)),!g||!t)return!1;R=this.getBaseField(t)}if(!g||!R)return!1;let L=g.getGroupSetting()?.grouping??o9(R.getSharedItems());a||(a=this.insertParentGroupField(g,e,"manual",{...L},i));let W=function(Q,oe,se){let he=(Q&&{...Q})??{...oe};for(let[me,ye]of se){let Te=Io(me);Te in he&&(he[Te]=ye??oe[Te])}return he}(a.getGroupSetting()?.grouping,L,r),K=a9(W);return s9(W,L)?(this.removeGroupField(a),R.getGroupSetting()?.parent===null&&R.setGroupSetting(null)):a.setGroupSetting({grouping:W,items:K,map:W}),!0}setNumberGrouping(e,t){let r=this.getField(e);if(!r)return!1;let i=r.getGroupSetting();if(i?i.type!=="number":r.getType()!==wu.number)return!1;let a=Object.assign({autoStart:!0,autoEnd:!0,start:0,end:0,interval:10},i?.grouping,t),g=Q_(r,a,this.locale);return!!g&&(r.setGroupSetting({base:r.getId(),parent:null,type:"number",grouping:a,items:g.items,map:g.map}),r.setSuffix(" - "+this.locale.getText("default_group_name")),!0)}getDatetimeGroupFieldSuffix(e){return` - ${this.locale.getNameOfDatetimeGroupLevel(e)}`}createDatetimeGroupField(e,t,r){let i=typeof t.interval=="number"?Xr.days:t.interval,a=`${r??e.getName()} - ${this.locale.getNameOfDatetimeGroupLevel(i)}`;return new gm({id:og(e.getId(),i),name:a,suffix:"",fromData:!1,sharedItems:{items:[]},group:{base:e.getId(),parent:null,type:"datetime",grouping:t,items:[],map:null}})}getDatetimeFullGrouping(e){let t=this.getBaseField(e);if(!t)return null;let r=t.getGroupSetting();if(!r||r.type!=="datetime")return null;let i=this.getGroupFields(e);if(i.length<=0)return null;let a=r.grouping,g=typeof a.interval=="number"?a.interval:null;return{...a,interval:g,...Voe(i.map(R=>R.getGroupSetting()?.grouping).filter(ga))}}setDatetimeGrouping(e,t,r){let i=this.getField(e);if(!i)return!1;let a=i.getGroupSetting();if(a?a.type!=="datetime":i.getType()!==wu.datetime)return!1;let g=this.getDatetimeFullGrouping(e),R=Object.assign(r9(),g,t),L=L9(R,["autoStart","autoEnd","start","end"]),W=Object.values(Xr).filter(oe=>R[oe]);for(let oe of this.getGroupFields(i.getId()).slice(1))this.removeGroupField(oe);let K=W.map(oe=>this.createDatetimeGroupField(i,{...L,interval:oe},r)),Q=K.shift();K.unshift(i),i.setGroupSetting(Q?.getGroupSetting()??null),i.setSuffix(this.getDatetimeGroupFieldSuffix(W[0]));for(let oe=0;oe<K.length;oe++){let se=K[oe].getGroupSetting();if(!se||!se.grouping)return!1;let he=qM(i,se.grouping,this.locale);if(!he)return!1;se.base=oe===0?null:i.getId(),se.parent=K[oe+1]?.getId()??null,se.items=he.items,se.map=he.map,oe!==0&&this.fields.push(K[oe])}return!0}removeGrouping(e){let t=this.getBaseField(e);if(!t||!t.isFromData())return!1;for(let r of this.getGroupFields(t.getId()).slice(1))this.fields.splice(this.fields.indexOf(r),1);return t.setGroupSetting(null),t.setSuffix(""),!0}}function c1(n,e,t,r){let i=n.setFieldItemAttr(e,t,r);return i.length>0?i:null}function xz(n){return(n.source.range.to.row-n.source.range.from.row+1)*(n.source.range.to.col-n.source.range.from.col+1)>Qe.PIVOT_TABLE_MAX_SOURCE_SIZE}function Tz(n,e){return!(e.source.range.to.row-e.source.range.from.row<=Qe.PIVOT_TABLE_SIZE_WITH_ROW_COL_FIELD_COUNT_LIMIT)&&n.fields.row.length+n.fields.col.length-+(n.fields.data.length>1)>Qe.PIVOT_TABLE_MAX_ROW_COL_FIELD_COUNT}function kz(n){let e=Qe.PIVOT_TABLE_MAX_ROW_COL_ITEM_COUNT;return n.rowItems.length>e||n.colItems.length>e}function Rz(n){return!!n.location.range&&(n.location.range.to.row-n.location.range.from.row+1)*(n.location.range.to.col-n.location.range.from.col+1)>Qe.PIVOT_TABLE_MAX_CELL_COUNT}function d1(n,e){let t=e.getSheetById(n.sheetId);return t?new nr({sheetId:t.sheetId,shName:t.getName()||""},n.range.from,n.range.to).toLabel():""}function f1(n,e){let t=nr.create(n,e);return t?{sheetId:t.sheetInfo?.sheetId||e.sheetId,range:{from:t.from,to:t.to}}:null}class Xse extends pu.EventEmitter{constructor(e){super(),this.createPivotTable=this.flushWhenSuccess(this._createPivotTable),this.deletePivotTable=this.flushWhenSuccess(this._deletePivotTable),this.updatePivotTable=this.flushWhenSuccess(this._updatePivotTable),this.movePivotTable=this.flushWhenSuccess(this._movePivotTable),this.setPivotTableCaption=this.flushWhenSuccess(this._setPivotTableCaption),this.movePivotAxisField=this.flushWhenSuccess(this._movePivotAxisField),this.insertPivotDataField=this.flushWhenSuccess(this._insertPivotDataField),this.movePivotDataField=this.flushWhenSuccess(this._movePivotDataField),this.removePivotDataField=this.flushWhenSuccess(this._removePivotDataField),this.setPivotFieldAttr=this.flushWhenSuccess(this._setPivotFieldAttr),this.setPivotDataFieldAttr=this.flushWhenSuccess(this._setPivotDataFieldAttr),this.setPivotFieldItemAttr=this.flushWhenSuccess(this._setPivotFieldItemAttr),this.groupPivotFieldItem=this.flushWhenSuccess(this._groupPivotFieldItem),this.ungroupPivotFieldItem=this.flushWhenSuccess(this._ungroupPivotFieldItem),this.setPivotFieldNumberGroup=this.flushWhenSuccess(this._setPivotFieldNumberGroup),this.setPivotFieldDatetimeGroup=this.flushWhenSuccess(this._setPivotFieldDatetimeGroup),this.workbook=e,this.caches=new Map,this.tables=new Map,this.modifiedTables=new Map}init(e){let{caches:t,tables:r}=e;if(t)for(let i of t)this._createCache(i);if(r)for(let i of r)this._createTable(i);this.registerHooks()}registerHooks(){let e=this.getWorkbook(),t=(r,i)=>e.hooks.add(r,function(){for(var a=arguments.length,g=Array(a),R=0;R<a;R++)g[R]=arguments[R];return i(this,...g)});t("afterCreateRow",(r,i,a)=>{this.afterAlterGrid(r,"row",i,a)}),t("afterCreateCol",(r,i,a)=>{this.afterAlterGrid(r,"col",i,a)}),t("afterRemoveRow",(r,i,a)=>{this.afterAlterGrid(r,"row",i,-a)}),t("afterRemoveCol",(r,i,a)=>{this.afterAlterGrid(r,"col",i,-a)}),t("beforeMoveRow",(r,i,a,g)=>{this.beforeMove(r,"row",i,a,g)}),t("beforeMoveCol",(r,i,a,g)=>{this.beforeMove(r,"col",i,a,g)})}getPivotLocale(){return this.workbook.getLocale().getPivotLocale()}_createCache(e){this.getCacheById(e.id)||(this._setCache(e.id,new _w(e,this.getPivotLocale())),this.workbook.getNotifier()?.onPivotCacheChange([e.id]))}_createTable(e){if(this.getTableById(e.id))return;let t=this.getCacheById(e.cacheId);t&&(this._setTable(e.id,new Hd(t,e,this.getPivotLocale())),this.getWorkbook().getNotifier()?.onPivotTableChange([e.id]))}serialize(){return{caches:this.serializeCaches(),tables:this.serializeTables()}}serializeCaches(){return Array.from(this.caches.values()).map(e=>e.toJSON())}serializeTables(){return Array.from(this.tables.values()).map(e=>e.toJSON())}pickCacheJSON(e){return e.reduce((t,r)=>(t[r]=this.caches.get(r)?.toJSON(),t),{})}pickTableJSON(e){return e.reduce((t,r)=>(t[r]=this.tables.get(r)?.toJSON(),t),{})}getWorkbook(){return this.workbook}getCacheById(e){return this.caches.get(e)??null}getTableById(e){return this.tables.get(e)??null}_setCache(e,t){this.caches.set(e,t)}_setTable(e,t){this.tables.set(e,t)}_deleteCache(e){return this.caches.delete(e)}_deleteTable(e){return this.tables.delete(e)}getCacheCount(){return this.caches.size}listEmptyPivotRanges(e){return Array.from(this.tables.values()).filter(t=>t.getLocation().sheetId===e&&!t.hasAxisFields()).map(t=>t.getLocation().range)}hasPivotTable(e,t,r){for(let i of this.tables.values())if(koe(i.getLocation(),e,t,r))return!0;return!1}getPivotFieldItemNames(e,t,r){let i=this.getTableById(e);if(!i)return[];let a=i.getCache().getField(t),g=i.getPivotFieldById(t);if(!g||!a)return[];let R=this.getPivotLocale().getText("default_missing_item_label");return(r?N7(g.items.slice(),a.getItemsForPivotField()):g.items).map((L,W)=>{let K=Pa(L);return Object.assign(K,{name:L.caption||J_(K,R)})})}getPivotFieldNames(e){let t=this.getTableById(e);if(!t)return{pivotFields:[],dataFields:[]};let r=t.getPivotFields(),i=t.getAxisFields("data");return{pivotFields:r.map(a=>({id:a.getId(),name:a.getName(),suffix:a.getSuffix()})),dataFields:i.map(a=>({id:a.id,name:a.name}))}}getPivotFieldRemainCount(e){let t=this.getTableById(e);if(!t)return 0;if(!(t.getCache().getRecords().length>Qe.PIVOT_TABLE_SIZE_WITH_ROW_COL_FIELD_COUNT_LIMIT))return Number.POSITIVE_INFINITY;let r=t.getAxisFields("row").length+t.getAxisFields("col").length-+(t.getAxisFields("data").length>1);return Math.max(Qe.PIVOT_TABLE_MAX_ROW_COL_FIELD_COUNT-r,0)}getTableDetailContent(e,t,r){return this.tables.get(e)?.getDetailContent(t,r)??null}isIncompatibleTable(e){return this.getTableById(e)?.isIncompatible()??!1}checkConvertMessages(e){let t=this.getTableById(e);if(!t||!t.isIncompatible())return[];let r=t.getCache(),i=t.toJSON(),a=r.toJSON(),g=[];return xz(a)&&g.push(en.PIVOT_TABLE_CONVERT_TOO_MANY_RECORD),Tz(i,a)&&g.push(en.PIVOT_TABLE_CONVERT_TOO_MANY_FIELD),kz(i)&&g.push(en.PIVOT_TABLE_CONVERT_TOO_MANY_ITEM),Rz(i)&&g.push(en.PIVOT_TABLE_CONVERT_TOO_MANY_CELL),g}convertIncompatibleTable(e){let t=this.getTableById(e);if(!t||!t.isIncompatible())return null;let r=t.getCache();return function(i,a){i=Or(i),a=Or(a);var g,R,L,W,K=i;for(let ye of(K.styles.compact=!0,K.styles.outline=!0,K.styles.compactData=!0,K.styles.outlineData=!0,K.pivotFields))ye.compact=!0,ye.outline=!0;i.styles.mergeItem=!1;var Q=i,oe=a;for(let ye=0;ye<oe.fields.length;ye++){let Te=oe.fields[ye];Te.group?.type==="datetime"&&typeof Te.group.grouping?.interval=="number"&&(Te.group=void 0,Q.pivotFields[ye].items=vw(Te.sharedItems.items))}for(let ye of i.fields.data)ye.displayType in A7||(ye.displayType="normal",ye.baseField=null,ye.baseItem=null);for(let ye of i.pivotFields)Array.isArray(ye.subtotals)&&(ye.subtotals="default"),ye.subtotalTop=!0;(function(ye,Te){let Me=[],Oe=[];for(let qe=0;qe<Te.fields.length;qe++){let Ke=Te.fields[qe];Ke.formula||(Me.push(Ke),Oe.push(ye.pivotFields[qe]))}let ze=new Set(Me.map(qe=>qe.id)),We=ye.fields.data.filter(qe=>ze.has(qe.fieldId));Te.fields=Me,ye.pivotFields=Oe,ye.fields.data=We})(i,a);var se=i,he=a;for(let ye=0;ye<se.fields.data.length;){let Te=se.fields.data[ye],Me=he.fields.find(Oe=>Oe.id===Te.fieldId)??null;if(Me&&Me.fromData===!1)if(Me.group?.base)Te.fieldId=Me.group?.base;else{se.fields.data.splice(ye,1);continue}ye++}var me=i;for(let ye of["row","col"]){let Te=me.fields[ye],Me=Te.findIndex(Oe=>Oe.fieldId===Ds);if(Me<Te.length-1){let[Oe]=Te.splice(Me,1);Te.push(Oe)}}for(let ye of(g=i,delete g.styles.pageWrap,delete g.styles.pageDirection,delete g.location.pageColCount,delete g.location.pageRowCount,i.pivotFields))ye.repeatLabel=!1,ye.blankRow=!1,ye.pageBreak=!1,ye.showAll=!1;for(let ye of i.pivotFields)typeof ye.filter!="object"&&(ye.filter=null);return function(ye){if(!xz(ye))return;let Te=ye.source.range.to.col-ye.source.range.from.col+1,Me=Math.floor(Qe.PIVOT_TABLE_MAX_SOURCE_SIZE/Te)-1;ye.source.range.to.row=ye.source.range.from.row+Me,ye.records.splice(Me)}(a),Tz(R=i,a)&&(R.fields.row=R.fields.row.filter(ye=>ye.fieldId===Ds),R.fields.col=R.fields.col.filter(ye=>ye.fieldId===Ds)),kz(L=i)&&(L.fields.row=L.fields.row.filter(ye=>ye.fieldId===Ds),L.fields.col=L.fields.col.filter(ye=>ye.fieldId===Ds)),Rz(W=i)&&(W.fields.row=W.fields.row.filter(ye=>ye.fieldId===Ds),W.fields.col=W.fields.col.filter(ye=>ye.fieldId===Ds)),delete i.incompatible,{table:i,cache:a}}(t.toJSON(),r.toJSON())}listPivotTableLocations(e){return Array.from(this.tables.values()).filter(t=>t.getLocation().sheetId===e).map(t=>({id:t.getId(),location:t.getLocation(),cacheId:t.getCache().getId()}))}moveSourceRange(e,t,r,i){let a=[];for(let g of this.caches.values()){let R=g.getSource(),L=function(W,K,Q,oe,se){let he=K.getSheetById(W.sheetId);if(!he)return null;let me=d1(W,K);if(me==="")return null;let ye=Ar.changeFormulaRange(me,Q,oe,void 0,void 0,se);return ye==="#REF!"?"#REF!":ye===me?null:f1(ye,he)}(R,this.workbook,e,t,r);L&&(a.push([g.getId(),{...R}]),L!=="#REF!"&&g.updateSource(L))}a.length>0&&(i.pivotTable={sources:a},this.getWorkbook().getNotifier()?.onPivotCacheChange(a.map(g=>{let[R]=g;return R})))}removeSourceRange(e,t){let r=[];for(let i of this.caches.values()){let a=i.getSource(),g=function(R,L,W){let K=L.getSheetById(R.sheetId);if(!K)return null;let Q=d1(R,L);if(Q==="")return null;let oe=Ar.removeFormulaRange(Q,W);return oe==="#REF!"?"#REF!":oe===Q?null:f1(oe,K)}(a,this.workbook,e);g&&(r.push([i.getId(),{...a}]),g!=="#REF!"&&i.updateSource(g))}r.length>0&&(t.pivotTable={sources:r},this.getWorkbook().getNotifier()?.onPivotCacheChange(r.map(i=>{let[a]=i;return a})))}repairSourceRange(e){if(e.length!==0){for(let[t,r]of e){let i=this.getCacheById(t);i&&i.updateSource(r)}this.getWorkbook().getNotifier()?.onPivotCacheChange(e.map(t=>{let[r]=t;return r}))}}collectSourceInfo(e,t,r){let i=[];for(let a of this.caches.values()){let g=a.getSource();if(g.sheetId!==e.sheetId)continue;let R=sn.fromRange({from:t,to:r});sn.fromRange(g.range).overlaps(R)&&i.push([a.getId(),{...g}])}return i}afterAlterGrid(e,t,r,i){let a=[];for(let g of this.caches.values()){if(g.getSource().sheetId!==e.sheetId)continue;let R=function(L,W,K,Q,oe){let se=d1(L,W.getWorkbook());if(se==="")return null;let he=Ar.changeFormula(se,{delta:oe,start:{[K]:Q}},W.getName());return he===se?null:f1(he,W)}(g.getSource(),e,t,r,i);R&&(a.push([g.getId(),{...g.getSource()}]),g.updateSource(R))}this.getWorkbook().getNotifier()?.onPivotCacheChange(a.map(g=>{let[R]=g;return R}))}beforeMove(e,t,r,i,a){let g=[],R=new Map(i.pivotTable?.sources??[]);for(let L of this.caches.values()){if(L.getSource().sheetId!==e.sheetId)continue;let W=R.get(L.getId())??function(K,Q,oe,se){let he=d1(K,Q.getWorkbook());if(he==="")return null;let me=Ar.moveFormula(oe,he,se,Q.getName());return me===he?null:f1(me,Q)}(L.getSource(),e,t,r);W&&(g.push([L.getId(),{...L.getSource()}]),L.updateSource(W))}g.length>0&&(a.pivotTable={sources:g}),this.getWorkbook().getNotifier()?.onPivotCacheChange(g.map(L=>{let[W]=L;return W}))}collectRangeStyle(e,t,r){for(let{id:L}of this.listPivotTableLocations(e)){let W=this.getTableById(L);W&&!W.hasResult()&&W.calc({rowColItems:!1,updateLocation:!1})}let i=this.getWorkbook().getSheetById(e),a=t.getTopLeftCorner(),g=t.getBottomRightCorner(),R=[];for(let L=a.row;L<=g.row;L++){if(r(L))continue;let W=[];for(let K=a.col;K<=g.col;K++){let Q=i?.getCellProperty(L,K,"pivot");W.push(Q?.style??null)}R.push(W)}return R}fillSheetMeta(e){let t=this.workbook.getSheetById(e);if(t){for(let r of this.tables.values())if(r.getLocation().sheetId===e&&r.hasResult())for(let[i,a]of r.getParts())a&&GC(t,sn.fromRange(i),r.getId(),a.map(g=>g.map(R=>R.meta)))}}calcRenderRanges(e,t){let r=this.workbook.getSheetById(e);if(r)for(let i of this.tables.values()){if(i.hasResult()||i.getLocation().sheetId!==e)continue;let a=i.getPartRanges().map(g=>sn.fromRange(g));if(!t.every(g=>a.every(R=>!g.overlaps(R))))for(let[g,R]of(i.calc({rowColItems:!1,updateLocation:!1}),i.getParts()))R&&GC(r,sn.fromRange(g),i.getId(),R.map(L=>L.map(W=>W.meta)))}}getTableRanges(e){let t=this.getTableById(e);if(!t)return null;let r=t.getLocation().sheetId,i=this.workbook.getSheetById(r);return i?{sheet:i,ranges:t.getPartRanges().map(sn.fromRange)}:null}clearTableRanges(e){let t=this.getTableRanges(e);t&&this.clearRanges(t.sheet,t.ranges)}clearRanges(e,t){for(let r of t)e.controller.clearRangeData(r,Nn.PivotTable),e.controller._unmergeOverlaps(r,Nn.PivotTable),GC(e,r,null)}writeTableRanges(e){let t=this.tables.get(e);if(!t)return;let r=t.getLocation().sheetId,i=this.workbook.getSheetById(r);if(i)for(let[a,g]of t.getParts()){let R=sn.fromRange(a),L=function(W){let K=W?.map(oe=>oe.map(se=>null))??[],Q=W?.map(oe=>oe.map(se=>!1))??[];return W==null||W.length===0||W[0].length===0?{}:{data:W.map(oe=>oe.map(se=>se.value??null)),format:{numberFormat:W.map(oe=>oe.map(se=>({fc:se.numFmt}))),font:K,fill:K,alignment:K,border:K,mergeCells:K,quotePrefix:Q}}}(g);L.data&&(i.controller._unmergeOverlaps(R,Nn.PivotTable),i.controller.setRangeData(R,L.data??[],Nn.PivotTable),i.controller.setRangeFormat(R,L.format??{},Nn.PivotTable)),GC(i,R,e,g?.map(W=>W.map(K=>K.meta)))}}cloneTable(e){return new Hd(new _w(e.getCache().toJSON(),this.getPivotLocale()),e.toJSON(),this.getPivotLocale())}calcPivotTableNewResult(e,t){let r=null;if(e!==null){let a=this.getTableById(e);if(!a)return null;r=this.cloneTable(a)}let i=function a(g,R){var L,W,K,Q,oe,se,he,me,ye,Te,Me,Oe,ze,We,qe,Ke,at,gt,pt,Tt,jt,on,hn,un,an,Ut,kt,Pt;let mn;if(Array.isArray(R)||R.cmd==="pivot_compound"){for(let dn of Array.isArray(R)?R:R.actions){let fn=a(g,dn);if(!fn)return null;fn.table!==void 0&&(g=fn.table)}return{success:!0,table:g}}let Zt=!1;if(g===null)return R.cmd!=="create_pivot_table"?null:(L=R.table,W=R.cache,(mn=L.id&&W.id&&L.cacheId===W.id?new Hd(new _w(W),L):null)?{success:!0,table:mn}:null);switch(R.cmd){case"delete_pivot_table":Zt=!0,mn=null;break;case"update_pivot_table":Zt=!!(mn=function(dn,fn,er){let yr=dn.getCache();if(dn.getId()!==fn.id||yr.getId()!==er.id||fn.cacheId!==er.id)return null;let Ei=yr.toJSON(),Zs=dn.toJSON();JSON.stringify(Ei)!==JSON.stringify(er)&&yr.fromJSON(er);let _u=dn;return JSON.stringify(Zs)!==JSON.stringify(fn)&&(_u=new Hd(yr,fn)),_u}(g,R.table,R.cache));break;case"move_pivot_table":Zt=(K=g,Q=R.sheetId,oe=R.coord,!!K.moveTable(Q,oe));break;case"move_pivot_axis_field":Zt=(se=g,he=R.fieldId,me=R.axis,ye=R.position,Te=R.coordShift,!!se.moveAxisField(he,me,ye,Te));break;case"insert_pivot_data_field":Zt=(Me=g,Oe=R.fieldId,ze=R.position,We=R.json,!!Me.addDataField(Oe,ze,We));break;case"move_pivot_data_field":Zt=(qe=g,Ke=R.dataFieldId,at=R.position,!!qe.moveDataField(Ke,at));break;case"remove_pivot_data_field":Zt=(gt=g,pt=R.dataFieldId,!!gt.removeDataField(pt));break;case"set_pivot_field_attr":Zt=!!function(dn,fn,er){let yr=dn.setFieldAttr(fn,er);return yr.length>0?yr:null}(g,R.fieldId,R.changes);break;case"set_pivot_data_field_attr":Zt=!!function(dn,fn,er){let yr=dn.setDataFieldAttr(fn,er);return yr.length>0?yr:null}(g,R.dataFieldId,R.changes);break;case"set_pivot_field_item_order":Zt=!!c1(g,R.fieldId,"order",R.changes);break;case"set_pivot_field_item_folded":Zt=!!c1(g,R.fieldId,"folded",R.changes);break;case"set_pivot_field_item_hidden":Zt=!!c1(g,R.fieldId,"hidden",R.changes);break;case"set_pivot_field_item_caption":Zt=!!c1(g,R.fieldId,"caption",R.changes);break;case"group_pivot_field_item":Zt=!!function(dn,fn){let er=dn?.getCache(),yr=[];for(let Ei of fn){let Zs=Ei.childFieldIds.find(Wd=>er.getField(Wd))??null,_u=UM("group",dn,Ei.fieldId,Zs,Ei.changes,Ei.itemsInfo??null,Ei.insertPosition);yr.push(!!_u)}return yr.length>0&&yr.every(Ei=>Ei)}(g,R.changes);break;case"ungroup_pivot_field_item":Zt=!!function(dn,fn){let er=[];for(let yr of fn){let Ei=UM("ungroup",dn,yr.fieldId,null,yr.changes,yr.itemsInfo??null,null);er.push(!!Ei)}return er.length>0&&er.every(yr=>yr)}(g,R.changes);break;case"set_pivot_field_number_group":Zt=(Tt=g,jt=R.fieldId,on=R.changes,!!u9(Tt,jt,on,R.itemsInfo));break;case"set_pivot_field_datetime_group":Zt=(hn=g,un=R.fieldId,an=R.changes,Ut=R.positions,kt=R.autoFold,Pt=R.itemsInfo,kt===void 0&&(kt=!1),!!g9(hn,un,an,Ut,kt,Pt))}return Zt?{success:!0,table:mn}:null}(r,t);if(!i)return null;if(i.table!==void 0&&(r=i.table),!r)return{ranges:[]};if(!r.isIncompatible()&&r.getCache().getRecords().length>Qe.PIVOT_TABLE_SIZE_WITH_ROW_COL_FIELD_COUNT_LIMIT){let a=r.getAxisFieldCount();if(a.row+a.col-+(a.data>1)>Qe.PIVOT_TABLE_MAX_ROW_COL_FIELD_COUNT)return{message:en.PIVOT_TABLE_TOO_MANY_FIELD,ranges:[]}}if(r.calc({fillResult:!1}),!r.isIncompatible()&&(r.getRowHeaderHeight()>Qe.PIVOT_TABLE_MAX_ROW_COL_ITEM_COUNT||r.getColHeaderWidth()>Qe.PIVOT_TABLE_MAX_ROW_COL_ITEM_COUNT))return{message:en.PIVOT_TABLE_TOO_MANY_ITEM,ranges:[]};if(!r.isIncompatible()){let{height:a,width:g}=r.getTableSize();if(a*g>Qe.PIVOT_TABLE_MAX_CELL_COUNT)return{message:en.PIVOT_TABLE_TOO_MANY_CELL,ranges:[]}}return{ranges:r.getPartRanges()}}checkPivotTableNewRanges(e,t,r){let i=[];if(!this.workbook.getSheetById(t))throw Error("Sheet not found");let a=du(r.map(W=>W.to.row))??0,g=du(r.map(W=>W.to.col))??0;this.workbook.isDimensionAvailable(t,a+1,g+1)||i.push(en.EXCEED_CELL_QUOTA),this.isRangesOverlapTables(t,r,[e])&&i.push(en.PIVOT_TABLE_BLOCK_BY_OTHER);let R=(this.getTableById(e)?.getPartRanges()??[]).map(sn.fromRange),L=r.map(sn.fromRange);for(let W of R)L=As(L,W).newRanges;return this.isRangesContainValues(t,L)&&i.push(en.PIVOT_TABLE_OVERWRITE_CELL),i}isRangesContainValues(e,t){let r=this.workbook.getSheetById(e);if(!r)return!1;for(let i of t){let{row:a,col:g}=i.from,{row:R,col:L}=i.to;for(let W=a;W<=R;W++)for(let K=g;K<=L;K++)if(!Cr(r.getDataAtCell(W,K)))return!0}return!1}isRangesOverlapTables(e,t,r){let i=new Set(r);for(let a of this.tables.values()){if(i.has(a.getId())||a.getLocation().sheetId!==e)continue;let g=a.getPartRanges();for(let R of t)for(let L of g)if(function(W,K){let Q=W.from.row<=K.to.row&&W.to.row>=K.from.row,oe=W.from.col<=K.to.col&&W.to.col>=K.from.col;return Q&&oe}(R,L))return!0}return!1}modifyTable(e,t){let r=this.getTableById(e),i=t(r&&this.cloneTable(r));if(i===null)return null;let a=i.table;if(a.calc(),this.isRangesOverlapTables(a.getLocation().sheetId,a.getPartRanges(),[e]))return null;this.addModifiedTables(e);let g=a.getCache();return this._setCache(g.getId(),g),this._setTable(a.getId(),a),i}clearModifiedTables(){this.modifiedTables.clear()}addModifiedTables(e){if(this.modifiedTables.has(e))return;let t=this.getTableRanges(e);this.modifiedTables.set(e,t)}flushModifiedTables(){for(let[e,t]of this.modifiedTables.entries())t&&this.clearRanges(t.sheet,t.ranges),this.writeTableRanges(e);this.modifiedTables.clear()}execCommand(e){let t;this.flushModifiedTables();try{t=this._execCommand(e)}catch(r){throw this.clearModifiedTables(),r}this.flushModifiedTables(),t&&this.emit("afterPivotCommand",t)}_execCommand(e){if(e.cmd==="pivot_compound"){let t=[];try{for(let r=0;r<e.actions.length;r++){let i=this._execCommand(e.actions[r]);i&&t.push(i)}}catch(r){try{for(let i of t.reverse())this._execCommand(i.getUndoCommand())}catch{}throw r}return new UH(t)}switch(e.cmd){case"create_pivot_table":return this._createPivotTable(e.table,e.cache);case"delete_pivot_table":return this._deletePivotTable(e.tableId);case"update_pivot_table":return this._updatePivotTable(e.table,e.cache);case"move_pivot_table":return this._movePivotTable(e.tableId,e.sheetId,e.coord);case"set_pivot_table_caption":return this._setPivotTableCaption(e.tableId,e.key,e.value);case"move_pivot_axis_field":return this._movePivotAxisField(e.tableId,e.fieldId,e.axis,e.position,e.coordShift,e.filterUpdate);case"insert_pivot_data_field":return this._insertPivotDataField(e.tableId,e.fieldId,e.position,e.json);case"move_pivot_data_field":return this._movePivotDataField(e.tableId,e.dataFieldId,e.position);case"remove_pivot_data_field":return this._removePivotDataField(e.tableId,e.dataFieldId);case"set_pivot_field_attr":return this._setPivotFieldAttr(e.tableId,e.fieldId,e.changes);case"set_pivot_data_field_attr":return this._setPivotDataFieldAttr(e.tableId,e.dataFieldId,e.changes);case"set_pivot_field_item_order":return this._setPivotFieldItemAttr(e.tableId,e.fieldId,"order",e.changes);case"set_pivot_field_item_folded":return this._setPivotFieldItemAttr(e.tableId,e.fieldId,"folded",e.changes);case"set_pivot_field_item_hidden":return this._setPivotFieldItemAttr(e.tableId,e.fieldId,"hidden",e.changes);case"set_pivot_field_item_caption":return this._setPivotFieldItemAttr(e.tableId,e.fieldId,"caption",e.changes);case"group_pivot_field_item":return this._groupPivotFieldItem(e.tableId,e.changes);case"ungroup_pivot_field_item":return this._ungroupPivotFieldItem(e.tableId,e.changes);case"set_pivot_field_number_group":return this._setPivotFieldNumberGroup(e.tableId,e.fieldId,e.changes,e.itemsInfo);case"set_pivot_field_datetime_group":return this._setPivotFieldDatetimeGroup(e.tableId,e.fieldId,e.changes,e.positions,e.autoFold,e.itemsInfo)}return null}_createPivotTable(e,t){let r=e.id;return this.getTableById(e.id)||this.getCacheById(t.id)||e.cacheId!==t.id||!this.modifyTable(r,()=>({table:new Hd(new _w(t,this.getPivotLocale()),e,this.getPivotLocale())}))?null:(this.getWorkbook().getNotifier()?.onPivotCacheChange([t.id]),this.getWorkbook().getNotifier()?.onPivotTableChange([e.id]),new jH(e,t))}_deletePivotTable(e){let t=this.getTableById(e);if(!t)return null;this.clearTableRanges(e);let r=t.getCache(),i=r.getId();return this._deleteTable(e),this._deleteCache(i),this.getWorkbook().getNotifier()?.onPivotTableChange([e]),this.getWorkbook().getNotifier()?.onPivotCacheChange([i]),new qH(t.toJSON(),r.toJSON())}_updatePivotTable(e,t){let r=this.getTableById(e.id),i=r?.getCache();if(!r||!i||e.cacheId!==t.id)return null;let a=i.getId(),g=r.getId(),R=this.modifyTable(g,()=>({table:new Hd(new _w(t,this.getPivotLocale()),e,this.getPivotLocale())}));if(!R)return null;let L=R.table,W=L.getCache();return this.getWorkbook().getNotifier()?.onPivotCacheChange([a]),this.getWorkbook().getNotifier()?.onPivotTableChange([g]),new YH(r.toJSON(),L.toJSON(),i.toJSON(),W.toJSON())}_movePivotTable(e,t,r){let i=this.workbook.getSheetById(t),a=i?.getRangeBound(r,r)??[];if(!i||a[0]!==r.row||a[1]!==r.col)return null;let g=this.getTableById(e);if(!g)return null;let R=g.getLocation(),L=this.modifyTable(e,K=>K?.moveTable(t,r)&&K?{table:K}:null);if(!L)return null;let W=L.table.getLocation();return this.getWorkbook().getNotifier()?.onPivotTableChange([g.getId()]),new KH(e,R.sheetId,R.coord,W.sheetId,W.coord)}_setPivotTableCaption(e,t,r){let i=this.getTableById(e);if(!i)return null;let a=i.getCaptions()[t];return(a??null)!==(r??null)&&i.setCaption(t,r)?(i.calc({rowColItems:!1,updateLocation:!1}),this.writeTableRanges(e),this.getWorkbook().getNotifier()?.onPivotTableChange([i.getId()]),new XH(e,t,a??null,r??null)):null}_movePivotAxisField(e,t,r,i,a,g){let R=this.getTableById(e);if(!R)return null;let L=R.getFieldAxisInfo(t),W=R.getLocation().coord,K=R.getPivotFieldById(t)?.filter,Q=this.modifyTable(e,ye=>{let Te=ye?.moveAxisField(t,r,i,a);return g!==void 0&&Te&&ye&&ye.setFieldAttr(t,[["filter",g]]),Te&&ye?{table:ye}:null});if(!Q)return null;let oe=Q.table,se=oe.getFieldAxisInfo(t),he=oe.getLocation().coord,me=oe.getPivotFieldById(t)?.filter;return a={row:he.row-W.row,col:he.col-W.col},this.getWorkbook().getNotifier()?.onPivotTableChange([e]),new JH(e,t,L,se,a,K,me)}_insertPivotDataField(e,t,r,i){let a=this.getTableById(e);if(!a||!a.getPivotFieldById(t)||i&&a.getDataField(i.id))return null;let g=this.modifyTable(e,R=>{let L=R?.addDataField(t,r,i);return L&&R?{table:R,dataField:L}:null});return g?(this.getWorkbook().getNotifier()?.onPivotTableChange([e]),new ZH(e,g.dataField,r)):null}_movePivotDataField(e,t,r){let i=this.getTableById(e);if(!i||!i.getDataField(t))return null;let a=i.getDataFieldIndex(t);return this.modifyTable(e,g=>g?.moveDataField(t,r)&&g?{table:g}:null)?(this.getWorkbook().getNotifier()?.onPivotTableChange([e]),new QH(e,t,a,r)):null}_removePivotDataField(e,t){let r=this.getTableById(e),i=r?.getDataField(t);if(!r||!i)return null;let a=r.getDataFieldIndex(t);return this.modifyTable(e,g=>g?.removeDataField(t)&&g?{table:g}:null)?(this.getWorkbook().getNotifier()?.onPivotTableChange([e]),new e$(e,i,a)):null}_setPivotFieldAttr(e,t,r){if(!this.getTableById(e))return null;let i=this.modifyTable(e,a=>{let g=a?.setFieldAttr(t,r);return a&&g&&g.length>0?{table:a,changesOldNew:g}:null});return i?(this.getWorkbook().getNotifier()?.onPivotTableChange([e]),new t$(e,t,i.changesOldNew)):null}_setPivotDataFieldAttr(e,t,r){if(!this.getTableById(e))return null;let i=this.modifyTable(e,a=>{let g=a?.setDataFieldAttr(t,r);return a&&g&&g.length>0?{table:a,changesOldNew:g}:null});return i?(this.getWorkbook().getNotifier()?.onPivotTableChange([e]),new n$(e,t,i.changesOldNew)):null}_setPivotFieldItemAttr(e,t,r,i){if(!this.getTableById(e))return null;let a=this.modifyTable(e,g=>{let R=g&&g.setFieldItemAttr(t,r,i);return g&&R&&R.length>0?{table:g,changesOldNew:R}:null});return a?(this.getWorkbook().getNotifier()?.onPivotTableChange([e]),new r$(e,t,r,a.changesOldNew)):null}_groupPivotFieldItem(e,t){return this.setPivotFieldManualGroup("group",e,t)}_ungroupPivotFieldItem(e,t){return this.setPivotFieldManualGroup("ungroup",e,t)}setPivotFieldManualGroup(e,t,r){let i=this.getTableById(t);if(!i)return null;let a=this.modifyTable(t,g=>{let R=g&&function(L,W,K){let Q=[],oe=W.getCache();for(let se of K){let he="childFieldIds"in se?se.childFieldIds.find(Me=>oe.getField(Me))??null:null,me="insertPosition"in se?se.insertPosition:null,ye=se.itemsInfo??null,Te=UM(L,W,se.fieldId,he,se.changes,ye,me);Te&&Q.push({fieldId:se.fieldId,...Te})}return Q}(e,g,r);return g&&R&&R.length>0?{table:g,changeInfo:R}:null});return a?(this.getWorkbook().getNotifier()?.onPivotCacheChange([i.getCache().getId()]),this.getWorkbook().getNotifier()?.onPivotTableChange([t]),e==="group"?new o$(t,a.changeInfo):new a$(t,a.changeInfo)):null}_setPivotFieldNumberGroup(e,t,r,i){let a=this.getTableById(e);if(!a)return null;let g=this.modifyTable(e,R=>{let L=R&&u9(R,t,r,i);return R&&L?{table:R,changeInfo:L}:null});return g?(this.getWorkbook().getNotifier()?.onPivotCacheChange([a.getCache().getId()]),this.getWorkbook().getNotifier()?.onPivotTableChange([e]),new s$(g.changeInfo)):null}_setPivotFieldDatetimeGroup(e,t,r,i,a,g){a===void 0&&(a=!1);let R=this.getTableById(e);if(!R)return null;let L=this.modifyTable(e,W=>{let K=W&&g9(W,t,r,i,a,g);return W&&K?{table:W,changeInfo:K}:null});return L?(this.getWorkbook().getNotifier()?.onPivotCacheChange([R.getCache().getId()]),this.getWorkbook().getNotifier()?.onPivotTableChange([e]),new l$(L.changeInfo)):null}onAlterGrid(e,t,r,i){let a=[];for(let g of this.tables.values())g.onSheetAlterGrid(e,t,r,i)&&a.push(g.getId());this.getWorkbook().getNotifier()?.onPivotTableChange(a)}onMoveRowCol(e,t,r){let i=[];for(let a of this.tables.values())a.onSheetMoveRowCol(e,t,r)&&i.push(a.getId());this.getWorkbook().getNotifier()?.onPivotTableChange(i)}flushWhenSuccess(e){var t=this;return function(){for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];let g=e.call(t,...i);return g&&t.flushModifiedTables(),!!g}}}var Ez=function(n){return n[n.NORMAL=0]="NORMAL",n[n.HISTORY=1]="HISTORY",n}(Ez||{});class Jse extends sae{static#e=this.EDITOR_MODE=Ez;constructor(e,t,r,i,a=!1){super(),this.nameManager=new jae(this),this.styleManager=this.createStyleManager(),this.parser=new Xte(this),this.calculator=new oae(this,a),this.current=null,this.commentStore=null,this.readonly=!1,this.editorMode=0,this.unknownRefManager=new U9,this.unitUnknownRefManager=new U9,this.hooks=new _ne,this.wbController=new Xae(this),this.ruleStore=new r1,this.pivotTableManager=new Xse(this),this.externalManager=new Uae,this.commentable=!1,this.localeHelper=e,this.notifier=null,this.SheetConstructor=t,this.enabledPlugins=r,this.constants=i,this.wbController.init(),this.styleManager.on("style_added",()=>this.notifier?.onStyleAdded()),this.styleManager.on("color_added",()=>this.notifier?.onColorAdded()),this.externalManager.on("external_changed",(g,R)=>this.notifier?.onExternalChanged(g,R))}destroy(){super.destroy(),this.current=null,this.hooks.destroy()}setCurrent(e){e!==this.current?.sheetId&&(this.current=this.getSheetById(e)||null,this.current&&this.getNotifier()?.onCurrentSheetChange(e))}getCurrentSheet(){return this.current}setCommentStore(e){this.commentStore=e,e.on("commentChanged",t=>this.notifier?.onCommentChanged(t))}getCommentStore(){return this.commentStore}getController(){return this.wbController}removeSheet(e){let t=this.current?.sheetId,r=t===e?this.getSiblingSheet(t):void 0,i=super.removeSheet(e);return t!==e||this.hasSheet(e)||this.setCurrent(r??this.getVisibleOrder()[0]),i}setSheetHidden(e,t){let r=super.setSheetHidden(e,t);if(this.current?.sheetId===e&&this.isSheetHidden(e)){let i=this.getSiblingSheet(e);i&&this.setCurrent(i)}return r}setSheetColor(e,t){let r=super.setSheetColor(e,t);return r&&this.notifier?.onColorAdded(),r}getVisibleOrder(){let e=[];for(let t=0;t<this.sheetsOrder.length;t++){let r=this.sheetsOrder[t],i=this.sheetsInfo.get(r);i&&!i.hidden&&e.push(r)}return e}getPrevSheet(e,t){return yne(this.sheetsOrder,e,r=>this.isSheetHidden(r),t)}getNextSheet(e,t){return wne(this.sheetsOrder,e,r=>this.isSheetHidden(r),t)}getSiblingSheet(e){return this.getPrevSheet(e)||this.getNextSheet(e)}forAll(e){for(let t=0;t<this.sheetsOrder.length;t++){let r=this.sheetsOrder[t],i=this.sheetsInfo.get(r);i&&e(i,r,t)}}getMaxCellCount(){return this.constants.MAX_CELL_COUNT}isPivotTableEnabled(){return this.constants.PIVOT_TABLE_ENABLED}getRemainingCellCount(){let e=0;return this.forAll(t=>{e+=t.sheet.countRows()*t.sheet.countCols()}),Math.max(this.getMaxCellCount()-e,0)}getSheetDimension(e){let t=this.getSheetById(e);return{rowCount:t?.countRows()??0,colCount:t?.countCols()??0}}getAvailableRowCount(e){let t=this.getSheetById(e);return t?Math.floor(this.getRemainingCellCount()/t.countCols()):0}getAvailableColCount(e){let t=this.getSheetById(e);return t?Math.floor(this.getRemainingCellCount()/t.countRows()):0}getAvailableMaxRow(e){let t=this.getSheetById(e);return t?t.countRows()+this.getAvailableRowCount(e):0}getAvailableMaxCol(e){let t=this.getSheetById(e);return t?t.countCols()+this.getAvailableColCount(e):0}isDimensionAvailable(e,t,r){let i=this.getSheetById(e);if(!i)return!1;let a=i.countRows(),g=i.countCols(),R=(t=Math.max(t,a))*(r=Math.max(r,g))-a*g;return R===0||this.getRemainingCellCount()>=R}isNewSheetAvailable(e){let t=e?this.getSheetById(e):null,r=t?t.countRows()*t.countCols():Qe.DEFAULT_ROW_COUNT*Qe.DEFAULT_COL_COUNT;return this.getRemainingCellCount()>=r}getFormulaParser(){return this.parser}getAsyncCalculator(){return this.calculator}createStyleManager(){return new fm}getStyleManager(){return this.styleManager}createBaseFormulaItem(){return new sw}setReadonly(e){this.readonly=e,this.notifyDataChange(xo.WORKBOOK)}isReadonly(){return this.readonly}setCommentable(e){this.commentable=e,this.notifyDataChange(xo.WORKBOOK)}isCommentable(){return this.commentable}setEditorMode(e){this.editorMode=e}isHistoryMode(){return this.editorMode===1}isCellEditable(e,t,r){if(!this.current)return!1;let i=this.current.getCellProperty(e,t,"pivot");return!this.isReadonly()&&this.getController().ruleController.checkProtectedCoords(this.current.sheetId,[{row:e,col:t}],r,{warning:!0})!==em.REJECT&&(!i?.tableId||this.isPivotTableEnabled()&&!this.getPivotTableManager().isIncompatibleTable(i?.tableId??"")&&i?.edit!=null)}setVersion(e){this.version=e}getVersion(){return this.version}getNameManager(){return this.nameManager}getPivotTableManager(){return this.pivotTableManager}getUnknownRefManager(){return this.unknownRefManager}getUnitUnknownRefManager(){return this.unitUnknownRefManager}getRuleStore(){return this.ruleStore}getExternalManager(){return this.externalManager}getLocale(){return this.localeHelper}setNotifier(e){this.notifier=e}getNotifier(){return this.notifier}notifyDataChange(e){this.notifier?.notifyDataChange(e)}createSheet(e,t,r){let i=e.sheetId;if(this.hasSheet(i))return null;let a=new this.SheetConstructor(this);return this.addSheet(e.sheetId,a,r.title,t,r.tabColor,r.hidden),a.init({plugins:this.getEnabledPlugins(),...e}),a}getEnabledPlugins(){return this.enabledPlugins}getConstants(){return this.constants}getWorksheetSnapshotSync(e){let t=new Wse(this).getWorksheetGenerator(e),r="",i=t.next();for(;!i.done;)r+=i.value,i=t.next();return r}generateWorksheetContent(e){let t=this.getSheetById(e);if(!t)return null;let r=new Set,i=t.getDataModel();for(let g=0,R=i.getRowLength();g<R;g++){let L=i.getRow(g);if(L)for(let W=0,K=L.getColLength();W<K;W++){let Q=L.getCell(W);Q&&Q.getXfId()>0&&r.add(Q.getXfId())}}function a(g){g&&g.s>0&&r.add(g.s)}return i.rowInfos.forEach(a),i.colInfos.forEach(a),a(i.getGlobalInfo()),{ws:this.getWorksheetSnapshotSync(t),style:JSON.stringify(this.getStyleManager().getParts(r))}}moveSearchResult(e,t,r){let i=e.length,a=(r??=this.current?.sheetId)?e.indexOf(r):0;a<0&&(a=0);let g=e[a],R=this.getSheetById(g)?.getPlugin("synoSearch").moveSearchResult(t);if(!R){let K=a;do t==="prev"?(a=(a-1+i)%i,R=this.getSheetById(e[a])?.getPlugin("synoSearch").getLastResult()):(a=(a+1)%i,R=this.getSheetById(e[a])?.getPlugin("synoSearch").getFirstResult());while(!R&&a!==K)}let L=0,W=0;if(R)for(let K=0;K<i;K++){let Q=this.getSheetById(e[K]).getPlugin("synoSearch").getSearchCount();W+=Q.total,K<a?L+=Q.total:K===a&&(L+=Q.index)}return{sheetId:e[a],match:R,index:L,total:W}}isSearching(){return this.current?.getPlugin("synoSearch").isSearching()??!1}getSearchingResults(e){return this.getSheetById(e)?.getPlugin("synoSearch").getSearchingResult()??[]}collectColor(){let e=new Set;return this.styleManager.collectColor(e),this.forAll(t=>{t.color&&e.add(t.color.toLowerCase());let r=t.sheet;r.getPlugin("synoDrawingController").collectColor(e),r.getPlugin("synoConditionalFormat").collectColor(e)}),e}hasRtlProperties(){for(let{sheet:e}of this.sheetsInfo.values()){if(e.isRtl())return!0;let t=e.countRows(),r=e.countCols();for(let i=0;i<t;i++)for(let a=0;a<r;a++){let g=e.getCellStyle(i,a)?.getAlignment();if(g&&sl(g))return!0}}return!1}getStateJSON(){let e={};for(let[t,r]of this.sheetsInfo.entries())e[t]={title:r.name,hidden:r.hidden,tabColor:r.color,rowCount:r.sheet.countRows(),colCount:r.sheet.countCols()};return{current:this.current?.sheetId,version:this.getVersion(),order:this.getOrder(),sheets:e,readonly:this.readonly,commentable:this.commentable,colors:Array.from(this.collectColor()),constants:this.constants}}}let sD=Jse;function yl(){}class Zse{static#e=this.Message=en;static#t=this.FLUSH_TYPE=xo;constructor(){this.editor=this.createEditorHandler()}createEditorHandler(){return{filter:{show:yl},imageFloat:{show:yl,hide:yl},chartMenu:{show:yl,hide:yl},validationList:{show:yl,hide:yl},validationTip:{show:yl,hide:yl},datePicker:{show:yl,hide:yl},contextMenu:{show:yl},groupMenu:{show:yl},onTextSelectionChange:yl}}async onAlert(e,t){}async onConfirm(e,t){return!1}onCommentChanged(e){}async onAfterUndo(e,t){}async onAfterRedo(e,t){}onAfterDoneQueueChange(){}onBeforeSync(){}onAfterSync(){}onLockUI(){}onReleaseUI(){}onFlushUI(e){}onSelectImage(){}onTextSelectionChanged(e){}onFilterViewUpdated(e){}onEditorRender(e){}onActionDone(e){}onResetCopy(e){}onFinishEditing(e,t){}onCurrentChanged(e){}getString(e,t){return""}insertImage(e){}getPeerTooltip(e){return""}onActiveChartChange(e,t){}onActiveImageChange(e,t){}openChartEditor(e){}openImageFormatPanel(e){}onExternalRequest(e){}onRtlSettingAdded(){}}function Qse(n){n.constructor.name==="MessagePort"&&n.close()}function ele(n){return tle(n,new Map,{type:"RELEASE"}).then(()=>{Qse(n)})}let Az=new WeakMap;"FinalizationRegistry"in globalThis&&new FinalizationRegistry(n=>{let e=(Az.get(n)||0)-1;Az.set(n,e),e===0&&ele(n)});function tle(n,e,t,r){return new Promise(i=>{let a=Math.trunc(Math.random()*Number.MAX_SAFE_INTEGER).toString();e.set(a,i),n.start&&n.start(),n.postMessage(Object.assign({id:a},t),r)})}class nle extends p6(){notify(e){this.emit(e)}async forceUpdate(){}async execCommand(e){let t=await this._execCommand(e);return t&&this.emit("afterCommand",t.toData(),!0),t}async execRemoteCommand(e){await this._execRemoteCommand(e),this.emit("afterCommand",e,!1)}async flushDirty(){}}class rle{onFlushUI(e){}notifyDataChange(e){}onCurrentSheetChange(e){}onCommentChanged(e){}onFilterViewUpdated(e){}onAlert(e){}onStyleAdded(){}onColorAdded(){}onRtlDataAdded(){}onExternalChanged(e,t){}onCoordsChanges(e,t){}onAlterGrid(e,t,r){}onSheetChanges(e,t){}onSheetPluginChanges(e,t){}onRenderHeightChange(e){}onRenderHeightAlterGrid(e,t,r,i){}onRenderHeightMove(e,t,r){}onSearchResultChange(e){}onPivotTableChange(e){}onPivotCacheChange(e){}onExternalRequest(e){}}class ile extends rle{constructor(e,t){super(),this.dataBridge=e,this.uiBridge=t}onFlushUI(e){e&xo.VIEWPORT?this.dataBridge.notify("flush:viewport"):e&xo.SEARCH&&this.dataBridge.notify("flush:search"),this.uiBridge.onFlushUI(e)}notifyDataChange(e){this.onFlushUI(e)}onCurrentSheetChange(e){this._onCurrentSheetChange(e)}_onCurrentSheetChange(e){this.dataBridge.notify("flush:current"),this.uiBridge.onCurrentChanged(e)}onCommentChanged(e){this.uiBridge.onCommentChanged(e)}onFilterViewUpdated(e){this._onFilterViewUpdated(e)}_onFilterViewUpdated(e){this.uiBridge.onFilterViewUpdated(e)}onExternalRequest(e){this.uiBridge.onExternalRequest(e)}onAlterGrid(e,t,r){this.dataBridge.getWorkbook().getCurrentSheet()?.sheetId===e&&this.onFlushUI(xo.VIEWPORT)}onSheetChanges(e,t){this.dataBridge.getWorkbook().getCurrentSheet()?.sheetId===e&&this._onSheetChanges(e,t)}_onSheetChanges(e,t){t.some(r=>["rows","cols","rowCount","colCount","global"].includes(r))&&this.onFlushUI(xo.VIEWPORT)}onSheetPluginChanges(e,t){this.dataBridge.getWorkbook().getCurrentSheet()?.sheetId===e&&this._onSheetPluginChanges(e,t)}_onSheetPluginChanges(e,t){let r=0;t.includes("filter")&&(this._onFilterViewUpdated(e),r|=xo.VIEWPORT),t.includes("drawing")&&(r|=xo.IMAGE|xo.CHART),r>0&&this.onFlushUI(r)}onRtlDataAdded(){this.uiBridge.onRtlSettingAdded()}onRenderHeightChange(e){this.dataBridge.getWorkbook().getCurrentSheet()?.sheetId===e&&this._onSheetChanges(e,["rows"])}onAlert(e){return this.uiBridge.onAlert(e)}}class Sw{constructor(e,t,r){this.validId=e.validId||pe(),this.type=e.type,this.operator=e.operator,this.f1=e.f1,this.f2=e.f2,this.list=e.list,this.text=e.text,this.showHelp=e.showHelp||e.message!=="",this.message=e.message,this.reject=e.reject,this.sheet=r,this.ranges=t||[],this._nextRanges=null}init(){}destroy(){this.ranges=[],this._nextRanges=null}cloneConfigBasic(){return{validId:this.validId,type:this.type,operator:this.operator,text:this.text,f1:this.f1,f2:this.f2,list:this.list,showHelp:this.showHelp,message:this.message,reject:this.reject}}cloneConfig(){return this.cloneConfigBasic()}cloneRelative(){return this.cloneConfigBasic()}isActive(){return this.ranges.length>0}isEqual(e){return this.constructor===e.constructor&&this.type===e.type&&this.showHelp===e.showHelp&&(!this.showHelp||this.message===e.message)&&this.reject===e.reject&&this.operator===e.operator}isReject(){return this.reject}isShowHelp(){return this.showHelp}hasDropdown(){return!1}updateRanges(e){this.ranges=e}_createOnRange(e,t,r,i,a,g){if(g=g||(()=>{}),i!==-1&&a.from[e]<=i&&a.to[e]>=i||i===-1&&a.from[e]<t&&a.to[e]>=t){a.to[e]+=r;let R=a.clone();R.from[e]=t,R.to[e]=t+r-1,g.call(this,R)}else a.from[e]>=t&&(a.from[e]+=r,a.to[e]+=r)}onCreateRowCol(e,t,r,i){this.isActive()&&Sr(this.ranges,a=>{this._createOnRange(e,t,r,i,a,this.addToMeta)})}_removeOnRange(e,t,r,i,a){if(a=a||(()=>{}),t+r-1<i.from[e])i.from[e]-=r,i.to[e]-=r;else if(t<=i.to[e]){let g=Math.max(t,i.from[e]),R=Math.min(t+r-1,i.to[e])-g+1;i[e==="row"?"getHeight":"getWidth"]()<=R?a(!0):(i.from[e]-=g-t,i.to[e]-=R+g-t,a(!1,g,R))}}onRemoveRowCol(e,t,r){this.updateRanges(this.ranges.filter(i=>{let a=!0;return this._removeOnRange(e,t,r,i,g=>{a=!g}),a}))}collectRemovedInfo(e,t,r){}repair(e){Sr(e,t=>{this.addValidRange(t)})}repairCross(e){}_moveRange(e,t,r){let i=this.ranges.length,a=[],g=[],R=!1;for(let L=0;L<i;L++){let{remain:W,bottom:K,splited:Q}=this.ranges[L].moveAndSplit(e,t);if(W&&a.push(W),W&&this.ranges[L].isEqual(W)||(R=!0),K&&a.push(K),Q)if(r){for(;a.length>0&&a[a.length-1].isMergeable(e,Q);){let oe=a.pop();Q.expandRowCol(e,oe.from.row,oe.to.row)}a.push(Q)}else g.push(Q)}return{nextRanges:a,newRanges:g,rangesChanged:R}}_move(e,t){let{nextRanges:r,rangesChanged:i}=this._moveRange(e,t,!0);return i&&(this._nextRanges=r),{changed:i}}beforeMove(e,t,r,i){if(this.isActive())if(r)this.setNeedValidAll(),this._nextRanges=r.ranges.map(a=>nr.textToRange(a,this.sheet)).filter(a=>!!a);else{let a={ranges:Wf(this.ranges)},{changed:g}=this._move(e,t);g&&(i[this.validId]=a)}}afterMove(e){this._nextRanges&&this.updateRanges(this._nextRanges),this._nextRanges=null,this.handleMetaAfterMove(e)}handleMetaAfterMove(e){}afterSort(e,t){}addValidRange(e){this.updateRanges(function(t,r){let i=!1;for(let a of t=t.map(g=>g.clone())){if(a.isVertMergeable(r,!1)){a.expandRow(r.from.row,r.to.row),i=!0;break}if(a.isHoriMergeable(r,!1)){a.expandCol(r.from.col,r.to.col),i=!0;break}}return i||t.push(r),t}(this.ranges,e)),this.addToMeta(e)}removeValidRange(e){let{newRanges:t,removeRanges:r}=As(this.ranges,e);for(let i of r)this.removeMeta(i);this.updateRanges(t)}forAllCell(e){for(let t=0;t<this.ranges.length;t++)this.ranges[t].forAll(e)}setNeedValid(e,t){}setNeedValidAll(){}addToMeta(e){}removeMeta(e){}createListRangeItems(e,t){return[]}getDisplayView(){return{displayF1:this.getDisplayF1(0,0),displayF2:this.getDisplayF2(0,0),displayList:this.getDisplayList()}}getDisplayF1(e,t){return this.f1?this.f1.toString():""}getDisplayF2(e,t){return this.f2?this.f2.toString():""}getDisplayList(){return[]}validate(e,t,r){return!0}_validate(e,t,r){return!0}preValidate(e,t,r){return!0}}var Cu=function(n){return n.LIST="list",n.DATE="date",n.DECIMAL="decimal",n.TEXT="text",n.CUSTOM="custom",n}({});let ole=n=>class extends n{getGridData(){let e=this.getCfsJSON();return{total:e.length,cfs:e.map(t=>this._localizeSerializedCf(t))}}_localizeSerializedCf(e){let t=e.f1,r=e.f2,i=this.sheet.getWorkbook().getLocale(),a=i.getLocaleConverter();return e.altType==="date"?be(oA(i,t,{date:!0}))&&(e.f1=a.localizeFormula(t)):(e.f1=this._localizeValue(t),e.f2=this._localizeValue(r),be(e.text)&&(e.text=a.localizeFormula(e.text))),e}_localizeValue(e){let t=this.sheet.getWorkbook().getLocale(),r=t.getLocaleConverter();return typeof e!="string"?r.localize(e):be(oA(t,e))?r.localizeFormula(e):e}},ale=n=>class extends n{hasUpArrow(e){let t=this.sheet.countRows();for(e=g1(e,!1,t,r=>this.sheet.getGroupPlugin().getRowGroupLevel(r),r=>this.isHiddenRow(r));e<t;){if(this.sheet.isFilteredRow(e)){e+=1;continue}return this.sheet.isHiddenRowExcludeFilter(e)}return!1}hasDownArrow(e){for(e=g1(e,!0,this.sheet.countRows(),t=>this.sheet.getGroupPlugin().getRowGroupLevel(t),t=>this.isHiddenRow(t));e>=0;){if(this.sheet.isFilteredRow(e)){e-=1;continue}return this.sheet.isHiddenRowExcludeFilter(e)}return!1}hasLeftArrow(e){return e=g1(e,!1,this.sheet.countCols(),t=>this.sheet.getGroupPlugin().getColGroupLevel(t),t=>this.isHiddenCol(t)),this.isHiddenCol(e)}hasRightArrow(e){return e=g1(e,!0,this.sheet.countCols(),t=>this.sheet.getGroupPlugin().getColGroupLevel(t),t=>this.isHiddenCol(t)),this.isHiddenCol(e)}getVisibleRowIndexes(e){let{from:{row:t},to:{row:r}}=e,i=[];for(let a=t;a<=r;a++)this.isHiddenRow(a)||i.push(a);return i}getVisibleColIndexes(e){let{from:{col:t},to:{col:r}}=e,i=[];for(let a=t;a<=r;a++)this.isHiddenCol(a)||i.push(a);return i}};function g1(n,e,t,r,i){let a=n+(e?-1:1),g=a+1,R=a-1,L=r(a);for(;L>0;){for(;g>0&&r(g-1)>=L;){if(!i(g-1))return a;g-=1}for(;R<t-1&&r(R+1)>=L;){if(!i(R+1))return a;R+=1}a=e?g-1:R+1,L-=1}return a}let sle=n=>class extends n{getColValues(e){let t=this.getActiveFilterJSON();if(!t?.enabled)return null;let r=t.range;if(!r)return null;let[i,,a]=r,g=this.isInViewState(),R=new Set,L=new Set;for(let W=i+1;W<=a;W++){let K=this.sheet.getCellTextDesc(W,e)?.v.trim()??"";this.isFilteredRow(W,g)&&!this.ensureHiddenCellValue(W,e,g)?L.add(K):R.add(K)}return{value:R,filtered:L}}getColColors(e,t){let r=new Set,i=this.getActiveFilterJSON(),a=i?.range;if(!a||!i?.enabled)return r;let[g,,R]=a;for(let L=g+1;L<=R;L++)for(let W of t?[this.sheet.getComputedBackgroundColor(L,e)]:this.sheet.getComputedTextColors(L,e))r.add(W.toLowerCase());return r}},lle=n=>class extends n{beforeGetCell(e){let t=this.getMergedRange(e.row,e.col);return t&&(e.row=t.from.row,e.col=t.from.col),e}isMultipleCells(e){return!e.isSingle()&&!this.searchMerge(e)}expandSelection(e){let t=!0;for(;t;){t=!1;let r=this.getOverlap(e);for(let i=0;i<r.length;i++)e.overlaps(r[i])&&e.expandByRange(r[i])&&(t=!0)}return e}nextHighlight(e,t){let{from:{row:r,col:i}}=e.highlight,a=e.getTopLeftCorner(),g=e.getBottomRightCorner();do{switch(t){case"up":if(r>a.row)r-=1;else if(r=g.row,--i<a.col)return null;break;case"down":if(r<g.row)r+=1;else if(r=a.row,++i>g.col)return null;break;case"right":if(i<g.col)i+=1;else if(i=a.col,++r>g.row)return null;break;case"left":if(i>a.col)i-=1;else if(i=g.col,--r<a.row)return null}let R=this.getMergedRange(r,i);if((!R||r===R.from.row&&i===R.from.col)&&!(this.sheet.isHiddenRow(r)||this.sheet.isHiddenCol(i)))return{row:r,col:i}}while(r>0&&i>0&&r<this.sheet.countRows()-1&&i<this.sheet.countCols()-1);return null}isMerged(e){return this.getMergedRange(e.from.row,e.from.col)?.isEqual(e)??!1}};function wm(n,e,t){return n.reduce((r,i)=>(r.row=Math.min(i.from.row,r.row),r.col=Math.min(i.from.col,r.col),r),{row:e,col:t})}class ule{constructor(){this.actions=[],this.skip=!0}accumulate(e){return this.actions=[],this.skip=!1,e(),this.skip=!0,this.finishAccumulate(this.actions)}getUndoneActions(){return this.actions}clear(){this.actions=[],this.skip=!0}addEventHook(e,t,r){var i=this;e.on(t,function(){for(var a=arguments.length,g=Array(a),R=0;R<a;R++)g[R]=arguments[R];if(i.skip)return;let L=r.call(i,...g);L&&i.actions.push(L)})}}class hle extends ule{constructor(e){super(),this.workbook=e,this.listen(e)}finishAccumulate(e){return e.map(t=>this.addHistoryTrackingInfo(t)),e.length>1?new p8(e):e[0]}listen(e){this.listenWorkbook(e),this.listenWorkbookController(e.getController()),this.addEventHook(e.getPivotTableManager(),"afterPivotCommand",this.afterPivotCommand)}listenWorkbook(e){this.addHook(e,"afterChange",this.afterChange),this.addHook(e,"afterRowResize",this.afterRowResize),this.addHook(e,"afterColumnResize",this.afterColumnResize),this.addHook(e,"afterCreateRow",this.afterCreateRow),this.addHook(e,"beforeRemoveRow",this.beforeRemoveRow),this.addHook(e,"afterCreateCol",this.afterCreateCol),this.addHook(e,"beforeRemoveCol",this.beforeRemoveCol),this.addHook(e,"afterMergeCells",this.afterMergeCells),this.addHook(e,"afterUnmergeCells",this.afterUnmergeCells),this.addHook(e,"afterFormatChange",this.afterFormatChange),this.addHook(e,"afterFontChange",this.afterFontChange),this.addHook(e,"afterFillChange",this.afterFillChange),this.addHook(e,"afterAlignmentChange",this.afterAlignmentChange),this.addHook(e,"afterBorderChange",this.afterBorderChange),this.addHook(e,"afterFixedRow",this.afterFixedRow),this.addHook(e,"afterFixedCol",this.afterFixedCol),this.addHook(e,"afterHideRows",this.afterHideRows),this.addHook(e,"afterShowRows",this.afterShowRows),this.addHook(e,"afterHideCols",this.afterHideCols),this.addHook(e,"afterShowCols",this.afterShowCols),this.addHook(e,"afterSort",this.afterSort),this.addHook(e,"afterNoteChange",this.afterNoteChange),this.addHook(e,"afterCreateFilter",this.afterCreateFilter),this.addHook(e,"afterEnableFilter",this.afterEnableFilter),this.addHook(e,"afterDisableFilter",this.afterDisableFilter),this.addHook(e,"afterSetFilter",this.afterSetFilter),this.addHook(e,"afterUpdateFilterRange",this.afterUpdateFilterRange),this.addHook(e,"afterCreateFilterView",this.afterCreateFilterView),this.addHook(e,"afterEnableFilterView",this.afterEnableFilterView),this.addHook(e,"afterDisableFilterView",this.afterDisableFilterView),this.addHook(e,"afterUpdateFilterViewRange",this.afterUpdateFilterViewRange),this.addHook(e,"afterUpdateFilterViewName",this.afterUpdateFilterViewName),this.addHook(e,"afterSetFilterViewCondition",this.afterSetFilterViewCondition),this.addHook(e,"afterActiveFilterChange",this.afterActiveFilterChange),this.addHook(e,"afterCreateValidation",this.afterCreateValidation),this.addHook(e,"afterRemoveValidation",this.afterRemoveValidation),this.addHook(e,"afterCreateConditionalFormat",this.afterCreateConditionalFormat),this.addHook(e,"afterRemoveConditionalFormat",this.afterRemoveConditionalFormat),this.addHook(e,"afterUpdateCfRanges",this.afterUpdateCfRanges),this.addHook(e,"afterInsertImage",this.afterInsertImage),this.addHook(e,"afterRemoveImage",this.afterRemoveImage),this.addHook(e,"afterResizeImage",this.afterResizeImage),this.addHook(e,"afterInsertChart",this.afterInsertChart),this.addHook(e,"afterRemoveChart",this.afterRemoveChart),this.addHook(e,"afterResizeChart",this.afterResizeChart),this.addHook(e,"afterAdjustChart",this.afterAdjustChart),this.addHook(e,"afterSetChartConfig",this.afterSetChartConfig),this.addHook(e,"afterRowStyleChange",this.afterRowStyleChange),this.addHook(e,"afterColStyleChange",this.afterColStyleChange),this.addHook(e,"afterGlobalStyleChange",this.afterGlobalStyleChange),this.addHook(e,"afterQuotePrefixChange",this.afterQuotePrefixChange),this.addHook(e,"afterMoveRow",this.afterMoveRow),this.addHook(e,"afterMoveCol",this.afterMoveCol),this.addHook(e,"afterMoveFormulaRange",this.afterMoveFormulaRange),this.addHook(e,"afterRemoveFormulaRange",this.afterRemoveFormulaRange),this.addHook(e,"afterAddInternalLink",this.afterAddInternalLink),this.addHook(e,"afterUpdateInternalLink",this.afterUpdateInternalLink),this.addHook(e,"afterRemoveInternalLink",this.afterRemoveInternalLink),this.addHook(e,"afterGroup",this.afterGroup),this.addHook(e,"afterUngroup",this.afterUngroup),this.addHook(e,"afterUpdateGroup",this.afterUpdateGroup),this.addHook(e,"afterSetCollapse",this.afterSetCollapse),this.addHook(e,"afterSetWorksheetRtl",this.afterSetWorksheetRtl)}listenWorkbookController(e){this.addWorkbookHook(e,"afterCreateDefinedName",this.afterCreateDefinedName),this.addWorkbookHook(e,"afterRemoveDefinedName",this.afterRemoveDefinedName),this.addWorkbookHook(e,"afterModifyDefinedName",this.afterModifyDefinedName),this.addWorkbookHook(e,"createRule",this.createRule),this.addWorkbookHook(e,"updateRule",this.updateRule),this.addWorkbookHook(e,"removeRule",this.removeRule),this.addWorkbookHook(e,"deleteWorksheet",this.deleteWorksheet),this.addWorkbookHook(e,"undeleteWorksheet",this.undeleteWorksheet),this.addWorkbookHook(e,"reorderWorksheet",this.reorderWorksheet),this.addWorkbookHook(e,"renameWorksheet",this.renameWorksheet),this.addWorkbookHook(e,"setWorksheetHidden",this.setWorksheetHidden),this.addWorkbookHook(e,"setWorksheetColor",this.setWorksheetColor),this.addWorkbookHook(e,"afterCreateComment",this.afterCreateComment),this.addWorkbookHook(e,"afterReplyComment",this.afterReplyComment),this.addWorkbookHook(e,"afterResolveComment",this.afterResolveComment),this.addWorkbookHook(e,"afterReopenComment",this.afterReopenComment),this.addWorkbookHook(e,"afterEditComment",this.afterEditComment),this.addWorkbookHook(e,"afterPasteComment",this.afterPasteComment),this.addWorkbookHook(e,"afterClearComment",this.afterClearComment),this.addWorkbookHook(e,"afterUpdateExternalLinks",this.afterUpdateExternalLinks),this.addWorkbookHook(e,"afterRemoveExternalLinks",this.afterRemoveExternalLinks)}addHook(e,t,r){let i=this;e.hooks.add(t,function(){for(var a=arguments.length,g=Array(a),R=0;R<a;R++)g[R]=arguments[R];if(i.skip)return;let L=r.call(i,this,...g);L&&i.actions.push(L)})}addWorkbookHook(e,t,r){this.addEventHook(e,t,r)}afterChange(e,t,r){if([Nn.InsertedData,Nn.Formula,Nn.PivotTable].includes(r))return null;let i=t.filter(RC).map(a=>[a[0],a[1],Zr(a[2])?a[2].toJSON():a[2],Zr(a[3])?a[3].toJSON():a[3]]);return i.length===0?null:new aM(e.sheetId,i,[],[])}afterRowResize(e,t,r,i,a,g){return[Nn.InsertedData,Nn.PivotTable].includes(g)||e.isReadonly()?null:new w8(e.sheetId,t,r,i,a)}afterColumnResize(e,t,r,i,a,g){return[Nn.InsertedData,Nn.PivotTable].includes(g)||e.isReadonly()?null:new b8(e.sheetId,t,r,i,a)}afterCreateRow(e,t,r,i,a,g){return a?null:new sM(e.sheetId,t,r,i,g)}afterCreateCol(e,t,r,i,a,g){return a?null:new lM(e.sheetId,t,r,i,g)}beforeRemoveRow(e,t,r){let i={row:t,col:0},a={row:t+r-1,col:e.countCols()-1},g=e.getPlugin("synoAutofill").getFormat(i,a,()=>!1),R=[];e.runHooks("collectRemovedRowInfo",R,t,r);let L=e.getPlugin("synoFormula"),W=L.getCrossInfo();return L.removeCrossInfo(),new m8(e.sheetId,t,r,{format:Mz(g,t,0),changes:Oz(e,i,a),nfRefs:[],nfs:[],notes:Dz(e,i,a),info:R,crossInfo:W,hyperlinks:e.getHyperlinkModel().getHyperlinksByDim("row",i.row,a.row),define:e.getWorkbook().getController().nameController.collectRemovedInfo("row",t,r),pivotTable:{sources:e.getWorkbook().getPivotTableManager().collectSourceInfo(e,i,a)}})}beforeRemoveCol(e,t,r){let i={row:0,col:t},a={row:e.countRows()-1,col:t+r-1},g=e.getPlugin("synoAutofill").getFormat(i,a,()=>!1),R=[];e.runHooks("collectRemovedColInfo",R,t,r);let L=e.getPlugin("synoFormula"),W=L.getCrossInfo();return L.removeCrossInfo(),new v8(e.sheetId,t,r,{format:Mz(g,0,t),changes:Oz(e,i,a),nfRefs:[],nfs:[],notes:Dz(e,i,a),info:R,crossInfo:W,hyperlinks:e.getHyperlinkModel().getHyperlinksByDim("col",i.col,a.col),define:e.getWorkbook().getController().nameController.collectRemovedInfo("col",t,r),pivotTable:{sources:e.getWorkbook().getPivotTableManager().collectSourceInfo(e,i,a)}})}afterMergeCells(e,t,r){return[Nn.InsertedData,Nn.PivotTable].includes(r)?null:new uM(e.sheetId,t.toArray())}afterUnmergeCells(e,t,r){return[Nn.InsertedData,Nn.PivotTable].includes(r)?null:new C8(e.sheetId,t.toArray())}afterFormatChange(e,t,r,i){return[Nn.InsertedData,Nn.PivotTable].includes(i)?null:new Zf(e.sheetId,"Format",t,r)}afterFontChange(e,t,r,i){return[Nn.InsertedData,Nn.PivotTable].includes(i)?null:new Zf(e.sheetId,"Font",t,r)}afterFillChange(e,t,r,i){return[Nn.InsertedData,Nn.PivotTable].includes(i)?null:new Zf(e.sheetId,"Fill",t,r)}afterAlignmentChange(e,t,r,i){return[Nn.InsertedData,Nn.PivotTable].includes(i)?null:new Zf(e.sheetId,"Alignment",t,r)}afterBorderChange(e,t,r,i){return[Nn.Alter,Nn.InsertedData,Nn.PivotTable].includes(i)?null:new Zf(e.sheetId,"Border",t,r)}afterQuotePrefixChange(e,t,r,i){return[Nn.PivotTable].includes(i)?null:new Zf(e.sheetId,"QuotePrefix",t,r)}afterFixedRow(e,t,r){return new S8(e.sheetId,t,r)}afterFixedCol(e,t,r){return new I8(e.sheetId,t,r)}afterHideRows(e,t,r,i){return i===Nn.InsertedData?null:new x8(e.sheetId,t,r)}afterShowRows(e,t,r){return new T8(e.sheetId,t,r)}afterHideCols(e,t,r,i){return i===Nn.InsertedData?null:new k8(e.sheetId,t,r)}afterShowCols(e,t,r){return new R8(e.sheetId,t,r)}afterSort(e,t,r,i,a){return new E8(e.sheetId,t,r.toArray(),i,a)}afterNoteChange(e,t,r){return-1<[Nn.InsertedData].indexOf(r)?null:new A8(e.sheetId,t)}afterCreateFilter(e,t,r){return new M8(e.sheetId,t.toArray(),r)}afterEnableFilter(e,t,r){return new D8(e.sheetId,t,r)}afterDisableFilter(e,t,r){return new O8(e.sheetId,t,r)}afterSetFilter(e,t,r,i,a,g){return new N8(e.sheetId,t,r,i,a,g)}afterUpdateFilterRange(e,t,r,i,a,g){return new P8(e.sheetId,t,r?.toArray(),i?.toArray(),a,g)}afterCreateFilterView(e,t,r,i,a){return new L8(e.sheetId,t,r.toArray(),i,a)}afterEnableFilterView(e,t){return new hM(e.sheetId,t)}afterDisableFilterView(e,t){return new F8(e.sheetId,t)}afterSetFilterViewCondition(e,t,r,i,a,g){return new V8(e.sheetId,t,r,i,a,g)}afterActiveFilterChange(e,t,r){return new z8(e.sheetId,t,r)}afterUpdateFilterViewRange(e,t,r,i,a,g,R){return new $8(e.sheetId,t,r.toArray(),i.toArray(),a,g,R)}afterUpdateFilterViewName(e,t,r,i,a){return new H8(e.sheetId,t,r,i,a)}afterCreateValidation(e,t,r){return new U8(e.sheetId,t,nr.toLabel(r))}afterRemoveValidation(e,t,r){return new G8(e.sheetId,t,nr.toLabel(r))}afterCreateConditionalFormat(e,t,r){return new q8(e.sheetId,t,r)}afterRemoveConditionalFormat(e,t,r,i){return r===void 0||i===-1?null:new Y8(e.sheetId,r,i)}afterUpdateCfRanges(e,t,r,i){return new K8(e.sheetId,t,r,i)}afterInsertImage(e,t,r){return new J8(e.sheetId,t,r)}afterRemoveImage(e,t,r){return new Z8(e.sheetId,t,r)}afterResizeImage(e,t,r,i){return wV(r,i)?null:new Q8(e.sheetId,t,r,i)}afterInsertChart(e,t,r,i){return new tH(e.sheetId,t,r,i)}afterRemoveChart(e,t,r,i){return new nH(e.sheetId,t,r,i)}afterResizeChart(e,t,r,i){return wV(r,i)?null:new rH(e.sheetId,t,r,i)}afterAdjustChart(e,t,r,i){return new iH(e.sheetId,t,r,i)}afterSetChartConfig(e,t,r,i,a){return new oH(e.sheetId,t,r,i,a)}afterRowStyleChange(e,t,r,i,a,g){return new cM(e.sheetId,"row",t,r,i,a.cellChanges)}afterColStyleChange(e,t,r,i,a,g){return new cM(e.sheetId,"col",t,r,i,a.cellChanges)}afterGlobalStyleChange(e,t,r,i,a,g){return new pH(e.sheetId,t,r,i,a.rowChanges,a.colChanges,a.cellChanges)}afterCreateDefinedName(e,t,r){return new yH(e,t,r)}afterRemoveDefinedName(e,t,r){return new wH(e,t,r)}afterModifyDefinedName(e){return new bH(e)}afterCreateComment(e){return new sH(e)}afterReplyComment(e){return new lH(e)}afterResolveComment(e){return new hH(e)}afterReopenComment(e){return new uH(e)}afterEditComment(e){return new cH(e)}afterPasteComment(e){return new fH(e)}afterClearComment(e){return new gH(e)}afterUpdateExternalLinks(e){return new zH(e)}afterRemoveExternalLinks(e){return new WH(e)}afterMoveRow(e,t,r,i){return new _H(e.sheetId,t,r,i)}afterMoveCol(e,t,r,i){return new SH(e.sheetId,t,r,i)}afterMoveFormulaRange(e,t,r,i,a,g,R){return new IH(e.sheetId,t.toArray(),r,i.toArray(),a,g,R)}afterRemoveFormulaRange(e,t,r,i){return new xH(e.sheetId,t.toArray(),r,i)}afterAddInternalLink(e,t){return new kH(e.sheetId,t)}afterUpdateInternalLink(e,t,r){return new RH(e.sheetId,t,r)}afterRemoveInternalLink(e,t){return new EH(e.sheetId,t)}afterGroup(e,t,r,i){return new MH(e.sheetId,t,r,i)}afterUngroup(e,t,r,i){return new DH(e.sheetId,t,r,i)}afterUpdateGroup(e,t,r,i,a){return new OH(e.sheetId,t,r,i,a)}afterSetCollapse(e,t,r,i,a){return new NH(e.sheetId,t,r,i,a)}afterSetWorksheetRtl(e,t){return new PH(e.sheetId,t)}createRule(e){return new FH(e)}updateRule(e,t,r){return new VH(e,t,r)}removeRule(e){return new HH(e.toJSON())}deleteWorksheet(e,t,r,i){return new h$(e,t,r,i)}undeleteWorksheet(e,t,r,i){return new Zp(e,t,r,i)}reorderWorksheet(e,t){return new c$(e,t)}renameWorksheet(e,t,r){return new d$(e,t,r)}setWorksheetHidden(e,t){return new f$(e,t)}setWorksheetColor(e,t,r){return new g$(e,t,r)}addHistoryTrackingInfo(e){(e instanceof aM||e instanceof sM||e instanceof lM)&&this.addNumberFormatToChanges(e)}addNumberFormatToChanges(e){let t=this.workbook.getSheetById(e.sheetId);t&&e.fillNumberFormats((r,i,a)=>{let g=new Map;for(let R of(i.length=0,a.length=0,r)){let[L,W]=R,K=t.getComputedCellStyle(L,W).getNumberFormat();if(!K||K.isDefault()){i.push(0);continue}let Q=K.getIndex(),oe=g.get(Q);oe===void 0&&(oe=a.push(K.fc||""),g.set(Q,oe)),i.push(oe)}})}afterPivotCommand(e){return e}}function Mz(n,e,t){let r=["font","fill","alignment"],i={font:[],fill:[],alignment:[],border:[],numberFormat:[],quotePrefix:[]};for(let a=0;a<n.font.length;a++)for(let g=0;g<n.font[a].length;g++){let R=a+e,L=g+t;for(let W=0;W<r.length;W++){let K=r[W];n[K][a][g]&&i[K].push([R,L,n[K][a][g]])}n.border[a][g]&&i.border.push([R,L,n.border[a][g].b]),n.numberFormat[a][g]&&i.numberFormat.push([R,L,n.numberFormat[a][g].fc]),n.quotePrefix[a][g]&&i.quotePrefix.push([R,L,n.quotePrefix[a][g]])}return i}function Dz(n,e,t){let r=n.getDataModel().collectRangeNote({from:e,to:t},()=>!1),i=[];for(let a=e.row;a<=t.row;a++)for(let g=e.col;g<=t.col;g++){let R=r[a-e.row][g-e.col];R&&i.push([a,g,R])}return i}function Oz(n,e,t){let r=[];for(let i=e.row;i<=t.row;i++)for(let a=e.col;a<=t.col;a++){let g=n.getDataAtCell(i,a);Cr(g)||r.push([i,a,Zr(g)?g.toJSON():g])}return r}class cle extends nle{constructor(e){super(),this.workbook=e,this.commandExecutor=new S9(this.workbook),this.actionAccumulator=new hle(this.workbook)}async asyncInit(e,t){return F9(this.workbook,e,t)}syncInit(e,t){return t===void 0&&(t={}),function(r,i,a){let{runCalculator:g=!0}=a;V9(r,i);let R=i.index.order;for(let L=0;L<R.length;L++){let W=R[L],K=i.index.sheets[W];i[W]&&r.createSheet({sheetId:W,snapshot:i[W],deferInit:!0},L,K)}r.forAll(L=>{L.sheet.notifyDataReady()}),r.forAll(L=>{L.sheet.notifyPluginsReady()}),g&&r.getAsyncCalculator().start()}(this.workbook,e,t)}getWorkbook(){return this.workbook}async setCurrent(e){this.workbook.setCurrent(e)}async setReadonly(e){this.workbook.setReadonly(e)}async setCommentable(e){this.workbook.setCommentable(e)}async _execCommand(e){let t;try{t=this.actionAccumulator.accumulate(()=>this.commandExecutor.process(e))}catch(r){let i=this.actionAccumulator.getUndoneActions();this.actionAccumulator.clear();try{for(let a of i.reverse())this.commandExecutor.process(a.getUndoCommand())}catch{}throw r}return t}async _execRemoteCommand(e){this.commandExecutor.process(e)}async*iteratePrintSheet(e){for(let t of e){let r=this.workbook.getSheetById(t.sheetId);r&&(yield[r,t])}}async generateWorksheetContent(e){return this.workbook.generateWorksheetContent(e)}async validateRuleCommand(e,t){return this.workbook.getController().ruleController.validateRuleCommand(e,t)}async checkProtectRefRange(e,t,r,i){return this.workbook.getController().ruleController.checkProtectRefRange(e,t,r,i)}async checkProtectedWorksheets(e,t,r,i){return this.workbook.getController().ruleController.checkProtectedWorksheets(e,t,r,i)}async checkProtectedCoords(e,t,r,i){return this.workbook.getController().ruleController.checkProtectedCoords(e,t,r,i)}async checkProtectedInsertable(e,t,r,i,a){return this.workbook.getController().ruleController.checkProtectedInsertable(e,t,r,i,a)}async checkCommand(e,t,r,i){return this.workbook.getController().ruleController.validateCommand(e,t,r,i)}async checkMergeRangesError(e,t){for(let r of t){let i=await this.checkMergeRangeError(e,r);if(i)return i}return null}async checkMergeRangeError(e,t){let r=this.workbook.getSheetById(e);if(!r)return null;let{from:i,to:a}=t,g=r.getPlugin("synoFreezeBar");return g.fixedRowsTop>i.row&&g.fixedRowsTop<=a.row||g.fixedColumnsLeft>i.col&&g.fixedColumnsLeft<=a.col?en.MERGE_FREEZED:null}async checkIncompleteMergedCells(e,t){return this.workbook.getSheetById(e)?.getMergePlugin().containsIncompleteMergedCells(t)??!1}async checkMoveEnable(e,t,r,i,a,g){let R=this.workbook.getSheetById(e);if(R){if(t==="row"&&!R.getFilterPlugin().checkMoveEnable(r,i,a,g))return en.MOVE_FIRST_FILTER;if(!R.getPlugin("synoMergeCell").checkMoveEnable(t,r,i,a))return en.MOVE_MERGE_CELL}}async checkExistValidation(e,t,r){let i=this.workbook.getSheetById(e);if(!i)return null;let a=i.getValidationPlugin(),g=a.getValidationFromJson(t,r);return g?a.checkExistValid(g):null}async previewFormula(e,t){let r=new sw,i=this.workbook.getFormulaParser().exec(e,{sheetId:t,item:r}).result;return{result:Array.isArray(i)?null:i,nfId:r.nfId,isLink:r.isLink()}}async parseRange(e,t){return this.workbook.getFormulaParser().parseRange(e,{sheetId:t})}async validateFormula(e,t){return this.workbook.getFormulaParser().exec(e,{sheetId:t}).error!==Wn.ERROR}async setRenderHeights(e,t){let r=this.workbook.getSheetById(e);r&&r.getPlugin("synoRenderCache").setRenderHeights(t)}async calcRenderRanges(e,t){this.workbook.getPivotTableManager().calcRenderRanges(e,t);let r=this.workbook.getSheetById(e);r&&r.calcRenderRanges(t)}async getSheetDimension(e){let t=this.workbook.getSheetById(e);return t?t.getDimensionStateJSON():{rowCount:0,colCount:0}}async getRangeStyle(e,t,r){let i=this.workbook.getSheetById(e);return i?Ed(r.row-t.row+1,r.col-t.col+1,(a,g)=>i.getCellStyle(a+t.row,g+t.col)?.toStyleJSON()??null):[]}async getRangeComputedStyle(e,t,r){let i=this.workbook.getSheetById(e);return Ed(r.row-t.row+1,r.col-t.col+1,(a,g)=>(i?i.getDataModel().getComputedCellStyle(a+t.row,g+t.col):this.workbook.getStyleManager().getDefaultStyle()).toStyleJSON())}async getRangeCellByKey(e,t,r,i){let a=this.workbook.getSheetById(e);return a?Ed(r.row-t.row+1,r.col-t.col+1,(g,R)=>{let L={},W=g+t.row,K=R+t.col;for(let Q of i)switch(Q){case"v":{let oe=a.getDataAtCell(W,K);L.v=Zr(oe)?oe.toJSON():oe;break}case"renderDesc":L.renderDesc=a.getCellTextDesc(W,K).getState();break;case"link":L.link=a.getCellMeta(W,K)?.link?.toJSON();break;case"xf":L.xf=a.getCellModel(W,K)?.getXfId()??null;break;case"formulaValue":L.formulaValue=a.getCellFormulaValue(W,K)}return L}):[]}async getRangeData(e,t,r){let i=this.workbook.getSheetById(e);return i?Ed(r.row-t.row+1,r.col-t.col+1,(a,g)=>{let R=i.getDataAtCell(a+t.row,g+t.col);return Zr(R)?R.toJSON():R}):[]}async getRangeRenderedTexts(e,t,r){let i=this.workbook.getSheetById(e);return i?Ed(r.row-t.row+1,r.col-t.col+1,(a,g)=>i.renderCache.getCellText(a+t.row,g+t.col)):[]}async getRangeHyperlink(e,t,r){let i=this.workbook.getSheetById(e);return Ed(r.row-t.row+1,r.col-t.col+1,(a,g)=>i?.getCellMeta(a+t.row,g+t.col)?.link?.toJSON()??null)}async getRangeValidId(e,t,r){let i=this.workbook.getSheetById(e);return Ed(r.row-t.row+1,r.col-t.col+1,(a,g)=>i?.getCellMeta(a+t.row,g+t.col)?.validId??null)}async getRowInfo(e){return this.workbook.getSheetById(e)?.getRowsStateJSON()??[]}async getColInfo(e){return this.workbook.getSheetById(e)?.getColsStateJSON()??[]}async getActiveFilterData(e){let t=this.workbook.getSheetById(e);if(!t)return null;let r=t.getFilterPlugin(),i=r.filter?.getId(),a=r.filter?.getRange();return i&&a?{id:i,range:a,activeId:r.getActiveId()}:null}async getFilteredRows(e,t,r){let i=this.workbook.getSheetById(e);return i?Array.from({length:r-t+1},(a,g)=>i.isFilteredRow(g+t)):[]}async getAutoFilterRange(e,t){let r=this.workbook.getSheetById(e);if(!r)return t;let i=new sn(...r.getFilterPlugin().getAutoFilterRange(t.toArray()));return r.getMergePlugin().expandSelection(i),i}async getMergedRange(e,t,r){return this.workbook.getSheetById(e)?.getMergePlugin().getMergedRange(t,r)}async getMergedOverlap(e,t){let r=this.workbook.getSheetById(e);return t.map(i=>r?.getMergePlugin().getOverlap(i)??[]).flat()}async createListRangeItems(e,t,r,i){return this.workbook.getSheetById(e)?.getValidationPlugin().getValidation(t)?.createListRangeItems(r,i)??[]}async calculateExternalChanges(e,t){let r=this.getWorkbook();return await r.getExternalManager().calculateChanges(e,t,r)}async calculateEmptyRefExternalChanges(){let e=this.getWorkbook();return e.forAll(t=>{t.sheet.formula.calculateAllImportItem()}),e.getExternalManager().calculateEmptyRefChanges()}async getUnlinkChanges(e){let t=[];return this.getWorkbook().forAll((r,i)=>{let a=r.sheet.formula.getUnlinkChanges(e);a.length>0&&t.push([i,a])}),t}async listExternalLinkIds(){return this.getWorkbook().getExternalManager().listLinkIds()}async getAutofillObject(e,t,r,i,a,g,R){let L=this.workbook.getSheetById(e);if(!L)return null;let W=L.getPlugin("synoAutofill"),K=g?Q=>L.isFilteredRow(Q):()=>!1;return W.getAutofillObject(t,r,i,K,a,R)}async getCfJSONById(e,t){return this.workbook.getSheetById(e)?.getPlugin("synoConditionalFormat").findCfJSON(t)}async getCfIndexById(e,t){return this.workbook.getSheetById(e)?.getPlugin("synoConditionalFormat").findIndexById(t)??-1}async setSearching(e){this.workbook.getCurrentSheet()?.getPlugin("synoSearch").setSearching(e)}async searchAll(e,t){await Promise.all(e.map(async r=>{await this.workbook.getSheetById(r)?.getPlugin("synoSearch").searchAll(t)}))}async getReplaceChanges(e,t){return this.workbook.getSheetById(e)?.getPlugin("synoSearch").getReplaceChanges(t)??[]}async getRowOrder(e,t,r,i){return this.workbook.getSheetById(e)?.getPlugin("synoSort").getRowOrder(t,r,i)??null}async getReplaceAllChanges(e,t){return Promise.all(e.map(r=>{let i=this.workbook.getSheetById(r);return i?i.getPlugin("synoSearch").getReplaceAllChanges(t):[r,[]]}))}async getChartPosition(e,t){return this.workbook.getSheetById(e)?.getDrawingPlugin().getChartById(t)?.position??null}async getImagesJSON(e){return this.workbook.getSheetById(e)?.getDrawingPlugin().getImagesJSON()??[]}async getMergedCellFormatChanges(e,t,r){return this.workbook.getSheetById(e)?.getMergedCellFormatChanges(t,r)??{}}async getMergedRangesArray(e){let t=this.workbook.getSheetById(e);return t?t.getMergePlugin().serialize():[]}async getFrozenRowColumn(e){let t=this.workbook.getSheetById(e);if(!t)return{row:0,col:0};let r=t.getPlugin("synoFreezeBar");return{row:r.fixedRowsTop,col:r.fixedColumnsLeft}}async getPivotCache(e){let t=this.workbook.getPivotTableManager().getCacheById(e);return t?t.toJSON():null}async getPivotCacheSource(e){let t=this.workbook.getPivotTableManager().getCacheById(e);if(!t)return null;let{sheetId:r,range:i}=t.getSource();return{sheetId:r,range:i}}async calcPivotCacheContent(e,t,r){await this.workbook.getAsyncCalculator().start();let i=r?this.workbook.getPivotTableManager().getCacheById(r)?.getFields():[];var a=this.workbook,g=i;g===void 0&&(g=[]);let R=Sz(a,e,t);if(!Array.isArray(R))return{cacheContent:null,message:R};let{fields:L,records:W}=_z(R,g);return{cacheContent:{fields:function(K,Q,oe){let se=new Map,he=new Map,me=new Map;for(let Te of K){let Me=Te.getName().toLocaleLowerCase(),Oe=se.get(Me)??[];Oe.push(Te),se.set(Me,Oe),me.set(Te.getId(),Te);let ze=Te.getGroupSetting(),We=ze?.base;if(We&&["datetime","manual"].includes(ze?.type)){if(me.get(We)?.getGroupSetting()?.type!==ze?.type)continue;let Ke=he.get(We)??[];Ke.push(Te),he.set(We,Ke)}}let ye=[];for(let Te of Q){let Me=Te.getName().toLocaleLowerCase(),Oe=se.get(Me),ze=Oe?.shift();if(!ze)continue;if(Te.isFromData()!==ze.isFromData()||Te.getType()!==ze.getType()){Te.setGroupSetting(null);continue}let We=Te.getGroupSetting();if(!We)continue;if(We.type==="number"){let Ke=Q_(Te,We.grouping,oe);Ke?(We.items=Ke.items,We.map=Ke.map):Te.setGroupSetting(null);continue}let qe=function(Ke,at){let gt=[],pt=new Map(at.map(jt=>[jt.getId(),jt])),Tt=Ke;for(;Tt;)gt.push(Tt),Tt=pt.get(Tt.getGroupSetting()?.parent??"");return gt}(Te,he.get(ze.getId())??[]);if(We.type==="datetime")for(let Ke=0;Ke<qe.length;Ke++){let at=qe[Ke],gt=at.getGroupSetting(),pt=gt?qM(Te,gt.grouping,oe):null;if(!gt||!pt){if(Ke>0){let Tt=qe[Ke-1].getGroupSetting();Tt&&(Tt.parent=qe[Ke+1]?.getId()??null)}continue}gt.map=pt.map,gt.items=pt.items,at!==Te&&ye.push(at)}else if(We.type==="manual"){let Ke=Te.getSharedItems(),at=new Map(Ke.map(Tt=>Io(Tt)).map(Tt=>[Tt.toLocaleLowerCase(),Tt])),gt=o9(Ke),pt=[Te];for(let Tt=1;Tt<qe.length;Tt++){let jt=pt[pt.length-1],on=jt.getGroupSetting()?.grouping??gt,hn=qe[Tt],un=hn.getGroupSetting(),an=un?.grouping,Ut={...on};for(let dn in an){let fn=at.get(dn.toLocaleLowerCase());fn!==void 0&&(Ut[fn]=an[dn])}let kt=a9(Ut);if(!un||s9(Ut,on)){let dn=Tt>0?jt.getGroupSetting():null;dn&&(dn.parent=qe[Tt+1]?.getId()??null);continue}let Pt={...hn.getGroupSetting()};Pt.grouping=Ut,Pt.map=Ut,Pt.items=kt;let mn=hn.toJSON();mn.group=Pt;let Zt=new gm(mn);pt.push(Zt)}pt.length>1?ye.push(...pt.slice(1)):Te.setGroupSetting(null)}}return Q.concat(ye)}(g,L,a.getLocale().getPivotLocale()).map(K=>K.toJSON()),records:W}}}async getPivotTable(e){let t=this.workbook.getPivotTableManager().getTableById(e);return t?t.toJSON():null}async calcPivotTableContent(e,t,r){return t9(e.map(i=>new gm(i)),t,r&&this.workbook.getPivotTableManager().getTableById(r)||void 0)}async calcPivotTableNewResult(e,t){return this.workbook.getPivotTableManager().calcPivotTableNewResult(e,t)}async checkPivotTableRanges(e,t,r,i,a){let g=this.workbook.getPivotTableManager().checkPivotTableNewRanges(e,t,i),R=await this.checkProtectedRanges(t,r.concat(i),a);return g.concat(R)}async checkProtectedRanges(e,t,r){let i=t.map(g=>new nr({sheetId:e,shName:""},g.from,g.to,qr.cell).toRange()),a=this.workbook.getController().ruleController.checkProtectRefRange(i,e,r);return a===em.REJECT?[en.PROTECTION_REJECT]:a===em.WARNING?[en.PROTECTION_WARNING]:[]}async checkPivotTableCommands(e,t){let r,i,a=K=>K.map(Q=>Q.cmd==="pivot_compound"?a(Q.actions):Q.cmd==="create_pivot_table"||Q.cmd==="update_pivot_table"?Q.table.id:Q.tableId).flat().filter(ga),g=new Set(a(e));if(g.size!==1)return console.warn("Compound action on multiple pivot tables is not checked."),[];let R=Array.from(g)[0],L=this.workbook.getPivotTableManager().calcPivotTableNewResult(R,e);if(!L)return[];if(L.message)return[L.message];let W=this.workbook.getPivotTableManager().getTableById(R);if(W)r=W.getPartRanges(),i=W.getLocation().sheetId;else{let K=e.find(Q=>Q.cmd==="create_pivot_table");if(!K)return[];r=Ey(K.table.location),i=K.table.location.sheetId}return this.checkPivotTableRanges(R,i,r,L.ranges,t)}async listAllPivot(){return this.workbook.getPivotTableManager().serialize()}async pickPivot(e){let{tableIds:t,cacheIds:r}=e;return{tables:this.workbook.getPivotTableManager().pickTableJSON(t),caches:this.workbook.getPivotTableManager().pickCacheJSON(r)}}async getTableDetailContent(e,t,r){return this.workbook.getPivotTableManager().getTableDetailContent(e,t,r)}async checkPivotTableConvertMessages(e){return this.workbook.getPivotTableManager().checkConvertMessages(e)}async convertIncompatiblePivotTable(e){return this.workbook.getPivotTableManager().convertIncompatibleTable(e)}async listPivotTableLocations(e){return this.workbook.getPivotTableManager().listPivotTableLocations(e)}async getPivotFieldItemNames(e,t,r){return this.workbook.getPivotTableManager().getPivotFieldItemNames(e,t,r)}async getPivotFieldNames(e){return this.workbook.getPivotTableManager().getPivotFieldNames(e)}async getPivotFieldRemainCount(e){return this.workbook.getPivotTableManager().getPivotFieldRemainCount(e)}async getManualGroupChanges(e,t){let r=this.workbook.getPivotTableManager().getTableById(e);return r?function(i,a){var g,R;if(a.length===0||!i.getField(a[0][0]))return null;let L=i.getBaseField(a[0][0]),{fields:W,levelMaps:K}=i.getGroupMappings(L.getId()),Q=K[0],oe=new Set,se=0;for(let[Oe,ze]of a){if(!i.getField(Oe))return null;let We=W.indexOf(Oe);if(We<0)return null;We>se&&(se=We);let qe=K[We],Ke=!1;for(let at=0;at<qe.length;at++)Ba(qe[at],ze)&&(Ke=!0,oe.add(at));if(!Ke)return null}let he=(g=K[se].filter((Oe,ze)=>oe.has(ze)),R=typeof(R=Ba)=="function"?R:void 0,g&&g.length?bz(g,void 0,R):[]),me=se+1>=W.length,ye=new Set(Fc(Q.length).filter(Oe=>oe.has(Oe)||he.some(ze=>Ba(ze,K[se][Oe])))),Te=i.getNewGroupName(L.getId()),Me=i.getUnnamedGroupName();return{fieldId:me?Iz(L):W[se+1],childFieldId:W[se],changes:me?Fc(Q.length).map(Oe=>[Q[Oe],Pa({type:"string",value:ye.has(Oe)?Te:Me})]):Array.from(ye).map(Oe=>[Q[Oe],Pa({type:"string",value:Te})])}}(r.getCache(),t):null}async getManualUngroupChanges(e,t){let r=this.workbook.getPivotTableManager().getTableById(e);return r?function(i,a){if(a.length===0)return null;let g=i.getBaseField(a[0][0]),{fields:R,levelMaps:L}=i.getGroupMappings(g.getId()),W=L[0],K=new Set,Q=0;for(let[he,me]of a){if(!i.getField(he))continue;let ye=R.indexOf(he);if(ye<0||(ye>Q&&(K.clear(),Q=ye),ye<Q))continue;let Te=L[ye],Me=!1;for(let Oe=0;Oe<Te.length;Oe++)Ba(Te[Oe],me)&&(Me=!0,K.add(Oe))}if(Q===0){let he=W.map(me=>[me,null]);return R.slice(1).reverse().map(me=>({fieldId:me,changes:he}))}let oe=Array.from(K),se=L[Q];return oe.every(he=>Ba(W[he],se[he]))?null:[{fieldId:R[Q],changes:oe.map(he=>[W[he],null])}]}(r.getCache(),t):null}async getNonEmptyNeighborRange(e,t){return this.workbook.getSheetById(e)?.getNonEmptyNeighborRange(t)??null}}class Nz{constructor(e){this.matrix=new Map,this.removeHandler=e||(t=>t.unregisterAll())}getCount(){return this.matrix.size}_add(e){let t=nm.createId(e.row,e.col);return this.matrix.set(t,e),e}remove(e){let t=this.matrix.get(e);return t&&this.matrix.delete(e)&&this.removeHandler(t),t}each(e){this.matrix.forEach(e)}filter(e){let t=this.matrix;this.matrix=new Map,t.forEach(r=>{e(r)?this._add(r):this.removeHandler(r)})}shift(e,t,r){this.filter(i=>{if(i[e]>=t){if(i[e]+r<t)return!1;i[e]+=r}return!0})}move(e,t){this.filter(r=>(r[e]>=t.sec[0].start&&r[e]<=t.sec[1].end&&(r[e]<=t.sec[0].end?r[e]+=t.sec[1].amount:r[e]-=t.sec[0].amount),!0))}sort(e,t,r){let[i,a,g,R]=e;this.filter(L=>{let{row:W,col:K}=L;if(!(i<=W&&W<=g&&a<=K&&K<=R))return!0;let Q=W-i,oe=Q===t[Q];return!oe&&r&&r(L),oe})}clear(){this.matrix.forEach(this.removeHandler),this.matrix.clear()}}class dle extends Nz{createItem(e,t,r,i,a){return this._add(new nm(e,t,r,i,a))}}class lD extends Nz{createItem(e,t,r,i){return this.matrix.get(nm.createId(t,r))||this._add(this._createItem(e,t,r,i))}_createItem(e,t,r,i){return new M$(e,t,r,i)}filterSafeAndShift(e,t,r,i){this.filter(a=>{let g;if(a[e]>=t&&a[e]+r<t)return!1;let R=a.isDependSelfOnly(),L=a.deps;if(a.hasImplicitDeps()&&(L=L.concat(a.implicitDeps)),R)g=!0;else{g=a[e]<t;let W="isBetween"+we(e);for(let K=0;K<L.length&&g;K++)g=!L[K][W](t,a.sheet.getWorkbook().getMaxCellCount())}return a[e]>=t&&(a[e]+=r),g||i(a),g})}onAlterGrid(e,t,r,i){this.filter(a=>a[e]<t||!(a[e]+r<t)&&(a[e]+=r,a.unregisterAll(),i(a),!0))}}class fle extends lD{_createItem(e,t,r,i){return new Ere(e,t,r,i)}}function uD(n,e,t){let r=e.ranges.length,i=[],a=[],g=!1,R=!e.isReferenceSelfOnly();for(let L=0;L<r;L++){let{remain:W,bottom:K,splited:Q}=e.ranges[L].moveAndSplit(n,t);if(W&&a.push(W),W&&e.ranges[L].isEqual(W)||(g=!0),K&&a.push(K),Q)if(R)i.push(Q);else{for(;a.length>0&&a[a.length-1].isMergeable(n,Q);){let oe=a.pop();Q.expandRowCol(n,oe.from[n],oe.to[n])}a.push(Q)}}return{newRanges:i,nextRanges:a,rangesChanged:g}}class Pz{constructor(e,t,r,i,a,g,R,L,W,K){this.sheet=e,this.id=t,this.type=r,this.op=i,this.ranges=a,this.style=g,this.f1=R,this.f2=L,this.text=W,this.altType=K,this.priority=0,this._isFormulaInput=void 0,this.conditionFormula=void 0,this.relativeCondition={},this.unitItem=new P_(this)}init(){this.priority=0,this.initRelativeCondition(),this.resetCache()}getRefCell(){return this.ranges[0].from}refCellEqualsTo(e){let t=this.getRefCell();return t.row===e.row&&t.col===e.col}initRelativeCondition(){let{row:e,col:t}=this.getRefCell(),r={};this.f1&&Re(this.f1)&&(r.f1=Xu(this.f1,e,t)),this.f2&&Re(this.f2)&&(r.f2=Xu(this.f2,e,t)),this.text&&be(this.text)&&(r.text=Xu(this.text,e,t)),this.relativeCondition=r}registerUnitItem(){if(!this.isFormula())return;let e=this.sheet.getWorkbook().getUnitUnknownRefManager();e.removeItem(this.unitItem),this.unitItem.unregister();let t=Ac(this.conditionFormula??""),r=this.sheet.formula.checkCrossRefError(t);if(r)e.addItem(r,this.unitItem);else{let i=this.sheet.formula.mapFormulaRange(t);this.unitItem.register(i)}}serializeBasic(){return{cfId:this.id,type:this.type,op:this.op,style:{...this.style},f1:this.f1,f2:this.f2,text:this.text,altType:this.altType,ranges:Wf(this.ranges)}}serialize(){let e=this.serializeBasic();if(this.isFormula()){let{row:t,col:r}=this.getRefCell(),{f1:i,f2:a,text:g}=this.relativeCondition;i&&(e.f1=po(i,t,r)),a&&(e.f2=po(a,t,r)),g&&(e.text=po(g,t,r))}return e}serializeRelative(){return this.isFormula()?Object.assign(this.serializeBasic(),this.relativeCondition):this.serialize()}isRelativeEqual(e){let t=(i,a,g)=>g.every(R=>i[R]===a[R]),r=this.serializeRelative();return t(r,e,["type","op","altType","f1","f2","text"])&&Object.keys(r.style).length===Object.keys(e.style).length&&t(r.style,e.style,Object.keys(r.style))}isReferenceSelfOnly(){if(!this.isFormula()||!this.isFormulaInput())return!0;let{f1:e,f2:t}=this.relativeCondition;return(!e||X5(e))&&(!t||X5(t))}isFormulaInput(){if(this._isFormulaInput===void 0){let e=!0;switch(this.type){case"cellIs":e=Re(this.f1)||!!(this.f2&&Re(this.f2));break;case"containsBlanks":case"notContainsBlanks":e=!1;break;case"containsText":case"beginsWith":case"endsWith":case"notContainsText":e=be(this.text)}this._isFormulaInput=e}return this._isFormulaInput}isFormula(){return!!(this.relativeCondition.f1||this.relativeCondition.f2)}updateConditionFormula(){if(!this.isFormula())return;let e=this.conditionFormula,t=this.getRefCell(),r=this.relativeCondition.f1?po(this.relativeCondition.f1,t.row,t.col):this.f1,i=this.relativeCondition.f2?po(this.relativeCondition.f2,t.row,t.col):this.f2;this.conditionFormula=this.type==="cellIs"?p$(this.op,Bi(t),r,i):r,e!==this.conditionFormula&&this.registerUnitItem()}destroy(){this.sheet.getWorkbook().getUnitUnknownRefManager().removeItem(this.unitItem),this.unitItem.unregister()}resetCache(){this.updateConditionFormula()}getRangeBound(){let{f1:e="",f2:t=""}=this.relativeCondition;return K5(e,t)}updateRanges(e){this.ranges=e,this.updateConditionFormula(),this.sheet.notifyPluginChanges(["cf"])}notifyAlterGrid(e,t,r,i,a,g){let R=this.getRefCell();if(t===this.sheet&&i<0&&(R=function(Q,oe,se,he){for(let me=0,ye=Q.length;me<ye;me++){let Te=Q[me],Me=Te.from[he],Oe={row:Te.from.row,col:Te.from.col};if(Me<oe||Me>=oe+se||(Oe[he]=oe+se,Te.includes(Oe)))return Oe}}(this.ranges,r,-i,e)),!R)return;let L={...R};t===this.sheet&&r<=L[e]&&(L[e]+=i);let W={[e]:r},K=this.changeFormulaBy(Q=>Ar.changeFormula(Q,{delta:i,start:W},t.getName(),this.sheet.getName()),R,L);(K.f1||K.f2)&&Ma(g,this.sheet.sheetId,"synoConditionalFormat",K)}notifyMove(e,t,r,i){let a=this.getRefCell();if(t===this.sheet){let{newRanges:K,nextRanges:Q}=uD(e,this,r);a=Q.length===0?K[0].from:Q[0].from}let g={...a};t===this.sheet&&g[e]>=r.sec[0].start&&g[e]<=r.sec[1].end&&(g[e]<r.sec[0].start+r.sec[1].amount?g[e]+=r.sec[0].amount:g[e]-=r.sec[1].amount);let R=t.getName(),L=this.sheet.getName(),W=this.changeFormulaBy(K=>Ar.moveFormula(e,K,r,R,L),g,a);(W.f1||W.f2)&&Ma(i,this.sheet.sheetId,"synoConditionalFormat",W)}notifyRename(e,t,r){let i=this.defaultChangeFormulaBy(a=>nu(a,e,t));(i.f1||i.f2)&&Ma(r,this.sheet.sheetId,"synoConditionalFormat",i)}notifyMoveFormulaRange(e,t,r,i){let a=this.getRefCell();if(this.sheet.getName()===t.shName&&t.includes(a.row,a.col))return;let g=this.sheet.getName(),R=this.defaultChangeFormulaBy(L=>Ar.changeFormulaRange(L,e,t,g,void 0,r));(R.f1||R.f2)&&Ma(i,this.sheet.sheetId,"synoConditionalFormat",R)}notifyRemoveFormulaRange(e,t){let r=this.sheet.getName(),i=this.defaultChangeFormulaBy(a=>Ar.removeFormulaRange(a,e,r));(i.f1||i.f2)&&Ma(t,this.sheet.sheetId,"synoConditionalFormat",i)}notifyRecalcUnknown(){this.registerUnitItem(),this.resetCache()}notifyDeleteSheet(){this.registerUnitItem(),this.resetCache()}getSheet(){return this.sheet}defaultChangeFormulaBy(e){let t=this.getRefCell();return this.changeFormulaBy(e,t,t)}changeFormulaBy(e,t,r){let i={cfId:this.id},a={},{f1:g,f2:R,text:L}=this.relativeCondition;function W(K){return Xu(K=e(K=po(K,t.row,t.col)),r.row,r.col)}if(g){let K=W(g);K!==g&&(i.f1=g,a.f1=K)}if(R){let K=W(R);K!==R&&(i.f2=R,a.f2=K)}if(L){let K=W(L);K!==L&&(i.text=L,a.text=K)}return this.updateByRelativeFormula(a),i}updateByRelativeFormula(e){let{f1:t,f2:r,text:i}=e;if(!t&&!r&&!i)return;let a=this.relativeCondition;t&&(a.f1=t),r&&(a.f2=r),i&&(a.text=i),this.sheet.notifyPluginChanges(["cf"]),this.resetCache()}repairCross(e){this.updateByRelativeFormula(e)}}class gle extends Pz{constructor(e,t,r,i,a,g,R,L,W,K){super(e,t,r,i,a,g,R,L,W,K),this.matrix=null}resetCache(){this.matrix?(this.matrix.clear(),this.resetAllCell()):this.matrix=new lD,super.resetCache()}getConditionObject(e,t){let r={isFormula:this.isFormula(),operator:this.op,formula1:this.isFormula()?this.conditionFormula:this.f1,formula2:this.f2};if(this.isFormula()){let i=this.getRefCell();r.delta={row:e-i.row,col:t-i.col}}else{let{f1:i,f2:a}=this;rr(this.f1)&&rr(this.f2)&&this.f1>this.f2&&(i=this.f2,a=this.f1),typeof i=="string"&&Ee(i)&&(i=aA(i)),typeof a=="string"&&Ee(a)&&(a=aA(a)),r.formula1=i,r.formula2=a}return r}resetAllCell(){this.forAllCell((e,t)=>this.resetCellCf(e,t))}forAllCell(e){for(let t=0,r=this.ranges.length;t<r;t++)this.ranges[t].forAll(e)}resetCellCf(e,t){Bz(this.sheet,e,t)}onDepUpdate(e,t){this.resetCellCf(e,t)}destroy(){super.destroy(),this.matrix&&this.matrix.clear()}}function Bz(n,e,t){let r=n.getCellMeta(e,t);if(r&&r.refCf&&r.needRecalcCf===!1){let i=[["needRecalcCf",!0]];r.cfStyle&&i.push(["cfStyle",null]),n.setCellMeta(e,t,i)}}let ple=class extends EC{constructor(n){super(n,"synoConditionalFormat"),this.cfs=[],this.cfNextRanges=null,this._nextRanges=new Map,this._additionCfs=[]}enablePlugin(){super.enablePlugin(),this.addHook("afterInit",n=>this.initData(n)),this._registerHookListener()}_registerHookListener(){this.addHook("afterCreateRow",(n,e,t)=>this._afterCreate("row",n,e,t)),this.addHook("afterCreateCol",(n,e,t)=>this._afterCreate("col",n,e,t)),this.addHook("beforeRemoveRow",(n,e)=>this._beforeRemove("row",n,e)),this.addHook("beforeRemoveCol",(n,e)=>this._beforeRemove("col",n,e)),this.addHook("afterRemoveRow",(n,e)=>this._afterRemove("row",n,e)),this.addHook("afterRemoveCol",(n,e)=>this._afterRemove("col",n,e)),this.addHook("beforeMoveRow",(n,e,t)=>this.beforeMove("row",n,e,t)),this.addHook("afterMoveRow",(n,e)=>this.afterMove("row",n,e)),this.addHook("beforeMoveCol",(n,e,t)=>this.beforeMove("col",n,e,t)),this.addHook("afterMoveCol",(n,e)=>this.afterMove("col",n,e)),this.addHook("repairCross",n=>this.repairCross(n))}destroy(){Sr(this.cfs,n=>n.destroy()),super.destroy()}cfFactory(){return Pz}initData(n){let e=n.cfs;return!!Array.isArray(e)&&(Sr(e,t=>{this.addCf(t,void 0,!0)}),!0)}collectColor(n){for(let e of this.cfs)e.style.color&&n.add(e.style.color),e.style.bgColor&&n.add(e.style.bgColor)}_getCfFromJSON(n){let e=n.ranges.map(t=>nr.textToRange(t,this.sheet)).filter(t=>!!t);return new(this.cfFactory())(this.sheet,n.cfId,n.type,n.op,e,n.style,n.f1,n.f2,n.text,n.altType)}addCf(n,e,t){let r=this._getCfFromJSON(n);r.init(),typeof e=="number"&&e<this.cfs.length||(e=this.cfs.length),this.cfs.splice(e,0,r),Sr(this.cfs,(i,a)=>{i.priority=a+1}),this._onAfterAddCf(r,n,e,t),this.sheet.notifyPluginChanges(["cf"]),this.sheet.getWorkbook().getNotifier()?.onColorAdded()}removeCf(n,e){let t=this.findIndexById(n);if(t<=-1)return;let r=this.cfs[t];r.destroy(),this.cfs.splice(t,1),this._onAfterRemoveCf(r,t,e),this.sheet.notifyPluginChanges(["cf"])}updateCfRanges(n,e){let t=this.findIndexById(n);t<0||this.cfs[t].updateRanges(e)}findIndexById(n){for(let e=0,t=this.cfs.length;e<t;e++)if(this.cfs[e].id===n)return e;return-1}_afterCreate(n,e,t,r){Sr(this.cfs,i=>{let a=e+t-1,g=i.ranges;if(r>=0)for(let R=0;R<g.length;R++){let L=g[R];if(L.from[n]<=r&&r<=L.to[n]){L.to[n]+=t;let W=L.clone();W.from[n]=e,W.to[n]=a,this._expandToNewRange(i,W),this.sheet.notifyPluginChanges(["cf"])}else L.from[n]>=e&&(L.from[n]+=t,L.to[n]+=t,R===0&&i.isFormula()&&i.resetCache(),this.sheet.notifyPluginChanges(["cf"]))}this._onAfterCfExpand(i,n,e,t)})}_beforeRemove(n,e,t){let r=n==="row"?sn.prototype.diffRow:sn.prototype.diffCol;this.cfNextRanges=Array(this.cfs.length),Sr(this.cfs,(i,a)=>{let g=[],R=!1;for(let L=0;L<i.ranges.length;L++){let W=r.call(i.ranges[L],e,t);W!==null&&i.ranges[L].isEqual(W)||(R=!0),W&&g.push(W)}this.cfNextRanges[a]=R?g:null})}_afterRemove(n,e,t){let r=this.cfs;Sr(r,(i,a)=>{let g=this.cfNextRanges?.[a];if(g&&g.length===0){r[a]=null;return}g!=null&&i.updateRanges(g),this._onAfterCfShrink(i,n,e,t)}),this.cfs=r.filter(i=>i!==null),this.cfNextRanges=null,this.sheet.notifyPluginChanges(["cf"])}_onAfterAddCf(n,e,t,r){}_onAfterRemoveCf(n,e,t){}_onAfterCfExpand(n,e,t,r){}_onAfterCfShrink(n,e,t,r){}_onMoveToNewRanges(n,e,t,r){}_removeCfMeta(n){}_resetCf(n){}_expandToNewRange(n,e){}_moveCf(n,e,t){if(e.isReferenceSelfOnly()){let{nextRanges:W,rangesChanged:K}=uD(n,e,t);return{changed:K,nextRanges:W}}let r=t.isBackward?t.sec[1]:t.sec[0],i=null,a=e.getRefCell();r.start<=a[n]&&r.end>=a[n]&&(i=e.serializeRelative());let{newRanges:g,nextRanges:R,rangesChanged:L}=uD(n,e,t);if(g.length>0&&!i&&(i=e.serializeRelative()),this._resetCf(e),L){if(R.length===0)i=null;else if(g.length>0){if(this._onMoveToNewRanges(n,t,e,g),e.isFormula()){let W={...g[0].from};W[n]-=t.delta,i.f1&&(i.f1=Ar.moveFormula(n,po(i.f1,W.row,W.col),t)),i.f2&&(i.f2=Ar.moveFormula(n,po(i.f2,W.row,W.col),t)),i.text&&(i.text=Ar.moveFormula(n,po(i.text,W.row,W.col),t))}i.ranges=Wf(g)}}return{changed:L,additionCf:i,nextRanges:R.length===0?g:R}}beforeMove(n,e,t,r){let i=t&&t[this.pluginName]||{},a={},g=new Set;for(let R=this.cfs.length-1;R>=0;R--){let L=this.cfs[R];if(g.add(L.id),L.id in i)i[L.id]?(this._removeCfMeta(L),this._nextRanges.set(L,i[L.id].ranges.map(W=>nr.textToRange(W,this.sheet)).filter(W=>!!W))):this.removeCf(L.id,!0);else{let{ranges:W}=L.serialize(),{additionCf:K,changed:Q,nextRanges:oe}=this._moveCf(n,L,e);Q&&(a[L.id]={ranges:W},this._nextRanges.set(L,oe)),K&&this._additionCfs.push(K)}}for(let R=this._additionCfs.length-1;R>=0;R--){let L=this._additionCfs[R];for(;g.has(L.cfId);)L.cfId=ve(L.cfId);g.add(L.cfId),a[L.cfId]=null}r[this.pluginName]=a}afterMove(n,e,t){for(let r=0;r<this._additionCfs.length;r++)this.addCf(this._additionCfs[r],0,!0);for(let[r,i]of(this._additionCfs=[],this._nextRanges.entries()))r.updateRanges(i);this._nextRanges.clear()}_repair(n,e,t){Sr(n,r=>{let i=r.cf;this.removeCf(i.cfId,!0),this.addCf(i,r.index,!0)})}repairRow(n,e,t){this._repair(n,e,t)}repairCol(n,e,t){this._repair(n,e,t)}repairCross(n){let e=n[this.pluginName];if(e)for(let t=0;t<e.length;t++){let r=this.findIndexById(e[t].cfId);r>=0&&this.cfs[r].repairCross(e[t])}}};class mle extends ple{_registerHookListener(){super._registerHookListener(),this.addHook("afterChangeResolve",e=>this.afterChangeResolve(e)),this.addHook("afterSort",(e,t)=>this.afterSort(e,t)),this.addHook("collectRemovedRowInfo",e=>this._collectRemovedInfo("row",e)),this.addHook("collectRemovedColInfo",e=>this._collectRemovedInfo("col",e))}cfFactory(){return gle}_onAfterAddCf(e,t,r,i){this._addCfMeta(e),i!==!0&&this.sheet.runHooks("afterCreateConditionalFormat",t,r)}_onAfterRemoveCf(e,t,r){this._removeCfMeta(e),r!==!0&&this.sheet.runHooks("afterRemoveConditionalFormat",e.id,e.serialize(),t)}updateCfRanges(e,t){let r=this.findCfById(e);if(!r)return;let i=r.ranges;for(let R of t)i=As(i,R).newRanges;let a=t;for(let R of r.ranges)a=As(a,R).newRanges;let g=Wf(r.ranges);for(let R of i)this.removeRangeCfMeta(r,R);for(let R of(super.updateCfRanges(e,t),a))this.addRangeCfMeta(r,R);this.sheet.runHooks("afterUpdateCfRanges",e,Wf(r.ranges),g)}_onAfterCfExpand(e,t,r,i){this._resetItemWithDeps(e,t,r,i)}_onAfterCfShrink(e,t,r,i){this._resetItemWithDeps(e,t,r,-i)}_resetCf(e){e.resetAllCell()}_onMoveToNewRanges(e,t,r,i){let a=e==="row"?t.delta:0,g=e==="col"?t.delta:0;for(let R=0;R<i.length;R++)for(let L=i[R].from.row;L<=i[R].to.row;L++)for(let W=i[R].from.col;W<=i[R].to.col;W++){let K=this.sheet.getCellMeta(L-a,W-g);K&&Iw(K)&&(K.refCf=K.refCf.filter(Q=>r!==Q))}}afterMove(e,t,r){super.afterMove(e,t,r);let i=r&&r[this.pluginName]||{};for(let a=0;a<this.cfs.length;a++){let g=this.cfs[a];i[g.id]&&this._addCfMeta(g)}}_addCfMeta(e){e.forAllCell((t,r)=>this.addCellCfMeta(e,t,r))}addRangeCfMeta(e,t){t.forAll((r,i)=>this.addCellCfMeta(e,r,i))}addCellCfMeta(e,t,r){let i=this.sheet.getOrCreateCell(t,r).getProperties();if(i.needRecalcCf=!0,Iw(i)){for(let a=i.refCf.length;a>=0;a--)if(a===0||i.refCf[a-1].priority<e.priority){i.refCf.splice(a,0,e);break}}else i.refCf=[e]}_removeCfMeta(e){e.forAllCell((t,r)=>this.removeCellCfMeta(e,t,r))}removeRangeCfMeta(e,t){t.forAll((r,i)=>this.removeCellCfMeta(e,r,i))}removeCellCfMeta(e,t,r){let i=this.sheet.getCellMeta(t,r);if(!i)return;let a=[];if(Iw(i)){let g=i.refCf.filter(R=>e!==R);g.length===0?a.push(["refCf",null],["needRecalcCf",!1]):a.push(["refCf",g],["needRecalcCf",!0])}i.cfStyle&&a.push(["cfStyle",null]),this.sheet.setCellMeta(t,r,a)}findCfById(e){let t=this.findIndexById(e);return t!==-1?this.cfs[t]:null}findCfJSON(e){return this.findCfById(e)?.serialize()}findCfByJSON(e){for(let t of this.cfs)if(t.isRelativeEqual(e))return t;return null}_recalcCellCf(e,t,r){let i={},a=!1;for(let R=r.refCf.length-1;R>=0;R--){let L=r.refCf[R],W=L.getConditionObject(e,t);W.isFormula&&(W.item=L.matrix.createItem(this.sheet,e,t,L)),Fd(this.sheet,e,t,W)&&(a=!0,Vs(i,L.style)),W.item&&(W.item.needUpdate=!1)}let g=[];a&&g.push(["cfStyle",i]),g.push(["needRecalcCf",!1]),this.sheet.setCellMeta(e,t,g)}afterChangeResolve(e){if(this.cfs.length!==0)for(let t=0,r=e.length;t<r;t++){let{row:i,col:a}=e[t];Bz(this.sheet,i,a)}}afterSort(e,t){Sr(this.cfs,r=>{let i=!1;for(let a=0;a<r.ranges.length;a++){let g=r.ranges[a].getOverlap(t);if(!g)continue;i=!0;let{from:{row:R,col:L},to:{row:W,col:K}}=g;for(let Q=R;Q<=W;Q++){let oe=Q-t.from.row;if(oe!==e[oe])for(let se=L;se<=K;se++){let he=this.sheet.getOrCreateCell(Q,se).getProperties();he.needRecalcCf=!0,(Iw(he)?he.refCf:he.refCf=[]).push(r)}}}i&&r.matrix&&r.matrix.sort(t.toArray(),e)})}_expandToNewRange(e,t){t.forAll((r,i)=>{let a=this.sheet.getOrCreateCell(r,i).getProperties();a.needRecalcCf=!0,(Iw(a)?a.refCf:a.refCf=[]).push(e)})}_afterCreate(e,t,r,i){super._afterCreate(e,t,r,i)}_afterRemove(e,t,r){super._afterRemove(e,t,r)}_getRemovedInfo(){let e=[];return Sr(this.cfs,(t,r)=>{this.cfNextRanges[r]!==null&&e.push({cf:t.serialize(),index:r})}),e}_collectRemovedInfo(e,t){let r=this._getRemovedInfo();r.length>0&&t.push({pluginName:this.pluginName,[e+"Info"]:r})}collectRangeInfo(e,t){t===void 0&&(t=()=>!1);let r=[],i={};for(let a=e.from.row;a<=e.to.row;a++){if(t(a))continue;let g=Array(e.getWidth());for(let R=e.from.col;R<=e.to.col;R++){let L=this.sheet.getCellMeta(a,R)?.refCf;if(!L){g[R-e.from.col]=null;continue}for(let W of(g[R-e.from.col]=L.map(K=>K.id),L))i[W.id]||(i[W.id]=W.serializeRelative())}r.push(g)}return{cfIds:r,cfs:i,sheetId:this.sheet.sheetId,order:this.cfs.map(a=>a.id)}}_repair(e,t,r){super._repair(e,t,r)}_resetItemWithDeps(e,t,r,i){e.matrix.filterSafeAndShift(t,r,i,a=>{e.resetCellCf(a.row,a.col)})}getCfsJSON(){return this.cfs.map(e=>e.serialize())}getStateJSON(){return{cfs:this.getCfsJSON()}}getComputedCfStyle(e,t){let r=this.sheet.getCellModel(e,t);return this.getCfStyle(e,t,r,r?.getProperties())}getCfStyle(e,t,r,i){return this.afterDataRenderer(e,t,r,i),i?.cfStyle}afterDataRenderer(e,t,r,i){return!!(i&&i.refCf)&&(i.needRecalcCf===!0&&this._recalcCellCf(e,t,i),!0)}}function Iw(n){return Array.isArray(n.refCf)}class vle extends ole(mle){}let yle=class extends EC{constructor(n){super(n,"synoFilter"),this.filter=null,this.filterView=[]}enablePlugin(){this.addHook("afterInit",n=>this.afterInit(n)),this.addHook("afterCreateRow",(n,e)=>this.afterCreateRow(n,e)),this.addHook("afterCreateCol",(n,e)=>this.afterCreateCol(n,e)),this.addHook("afterRemoveRow",(n,e)=>this.afterRemoveRow(n,e)),this.addHook("afterRemoveCol",(n,e)=>this.afterRemoveCol(n,e)),this.addHook("beforeMoveRow",(n,e,t)=>this.beforeMove("row",n,e,t)),this.addHook("beforeMoveCol",(n,e,t)=>this.beforeMove("col",n,e,t)),super.enablePlugin()}initData(n){let e=n.filter;if(!e)return!1;if(e.id){let t=e.range?sn.fromArray(e.range):null;this._fixFilterOperator(e.filters||[]),this.filter=this._createFilter(e.id,t,e.filters||[],e.enabled||!1)}return e.filterView&&(this.filterView=e.filterView.map(t=>{let r=t.range?sn.fromArray(t.range):null;return this._fixFilterOperator(t.filters),this._createFilter(t.id,r,t.filters,t.enabled,t.name)})),!1}_fixFilterOperator(n){let e={containsTexts:"containsText",notContainsTexts:"notContainsText",exactTexts:"exactText"};for(let t of n)if(t&&Z_(t))for(let r=0;r<t.operator.length;r++)e[t.operator[r]]&&(t.operator[r]=e[t.operator[r]])}_createFilter(n,e,t,r,i,a){return new Ooe(n,e,t,r,i,a)}afterInit(n){this.initData(n)}afterCreateRow(n,e){this.filter&&this.filter.afterCreateRow(n,e),Sr(this.filterView,t=>{t.afterCreateRow(n,e)})}afterCreateCol(n,e){this.filter&&this.filter.afterCreateCol(n,e),Sr(this.filterView,t=>{t.afterCreateCol(n,e)})}afterRemoveRow(n,e){this.filter&&this.filter.afterRemoveRow(n,e),Sr(this.filterView,t=>{t.afterRemoveRow(n,e)})}afterRemoveCol(n,e){this.filter&&this.filter.afterRemoveCol(n,e),Sr(this.filterView,t=>{t.afterRemoveCol(n,e)})}repairCol(n,e){let t=this.filter;if(n.filter&&t&&n.filter.filterId===t.getId()&&t.repairCol(n.filter,e),n.view)for(let r=0;r<n.view.length;r++){let i=n.view[r],a=this.getFilterView(i.filterId);a&&a.repairCol(i,e)}}repairRow(n,e){let t=this.filter;if(n.filter&&t&&n.filter.filterId===t.getId()&&t.repairRow(n.filter,e),n.view)for(let r=0;r<n.view.length;r++){let i=n.view[r],a=this.getFilterView(i.filterId);a&&a.repairRow(i,e)}}beforeMove(n,e,t,r){let i=t&&t[this.pluginName],a=this._beforeMove(n,e,i);a&&(r[this.pluginName]=a)}_beforeMove(n,e,t){return this.collectMoveData(r=>r.beforeMove(n,e,t?.filter?.filterId===r.getId()?t.filter:t?.view?.[r.getId()]??null))}notifyMoveRange(n,e,t,r,i){let a=this.collectMoveData(g=>g.notifyMoveRange(n,e,t,r?.filter?.filterId===g.getId()?r.filter:r?.view?.[g.getId()]));a&&(i.filter=a)}collectMoveData(n){let e={};if(this.filter){let r=n(this.filter);r&&(e.filter=r)}let t={};for(let r of this.filterView){let i=n(r);i&&(t[r.getId()]=i,e.view=t)}return e.filter||e.view?e:null}notifyRemoveRange(n,e,t){let r=this.collectRemoveRangeData(i=>{let a=e?.filter?.filterId===i.getId()?e.filter:e?.view?.[i.getId()];return(!e||a)&&(!a||"dim"in a)?i.notifyRemoveRange(n,a):null});r&&(t.filter=r)}collectRemoveRangeData(n){let e={};if(this.filter){let r=n(this.filter);r&&(e.filter=r)}let t={};for(let r of this.filterView){let i=n(r);i&&(t[r.getId()]=i,e.view=t)}return e.filter||e.view?e:null}createFilter(n,e){return!(this.filter&&this.filter.isFilterEnabled())&&(this.filter=this._createFilter(e,n,[],!0,""),!0)}enableFilter(n,e){return!!this.filter&&n===this.filter.getId()&&!!this.filter.hasRange()&&(this.filter.setEnabled(!0),e&&this.setHiddenInfo(e),!0)}disableFilter(n,e){return!!this.filter&&n===this.filter.getId()&&!!this.filter.isFilterEnabled()&&(this.filter.setEnabled(!1),e&&this.setHiddenInfo(e),!0)}updateFilterRange(n,e,t){return!!this.filter&&n===this.filter.getId()&&!!this.filter.isFilterEnabled()&&(this._updateFilterRange(this.filter,e,t),!0)}_updateFilterRange(n,e,t){if(n.setRange(e),e&&t)for(let r=0;r<t.length;r++)n.setCondition(r+e.from.col,t[r])}createFilterView(n,e,t,r){if(this.getFilterView(n))return!1;let i=this._createFilter(n,e,[],!0,t,r);return this.filterView.push(i),!0}enableFilterView(n){let e=this.getFilterView(n);return!!e&&(e.setEnabled(!0),!0)}disableFilterView(n){let e=this.getFilterView(n);return!!e&&(e.setEnabled(!1),!0)}updateFilterViewRange(n,e,t){let r=this.getFilterView(n);return!!r&&(this._updateFilterRange(r,e,t),!0)}updateFilterViewName(n,e){let t=this.getFilterView(n);return!!t&&(t.setName(e),!0)}setActiveFilterView(n){}getFilterView(n){for(let e=0;e<this.filterView.length;e++)if(this.filterView[e].getId()===n)return this.filterView[e]}isFilterEnabled(){return!!this.filter&&this.filter.isFilterEnabled()}setFilter(n,e,t,r){return!!this.filter&&n===this.filter.getId()&&!!this.filter.setCondition(e,t,!0)&&(r&&this.setHiddenInfo(r),!0)}setHiddenInfo(n){let e=this.sheet.getPlugin("synoHideRowCol");n.show&&e.setHiddenInfo(n.show,!1),n.hide&&e.setHiddenInfo(n.hide,!0)}setFilterViewCondition(n,e,t){let r=this.getFilterView(n);return!!r&&!!r.setCondition(e,t)}expandRangeByData(n){let e=(t,r)=>{if(!t.isFilterEnabled())return;let i=t.cloneRange();i&&this._checkNeedExpand(i,n)&&(i.to.row=n.to.row,r?this.updateFilterViewRange(t.getId(),i):this.updateFilterRange(t.getId(),i))};this.filter&&e(this.filter,!1),this.filterView.forEach(t=>{e(t,!0)})}_checkNeedExpand(n,e){if(e.from.row<n.from.row)return!1;let t=n.to.row+1,r=n.clone();if(r.from.row=r.to.row=t,!r.overlaps(e))return!1;for(let i=t;i<=e.to.row;i++)for(let a=n.from.col;a<=n.to.col;a++)if(!Cr(this.sheet.getDataAtCell(i,a)))return!1;return!0}};class wle extends yle{constructor(e){super(e),this.activeFilter=null,this.origHiddenCells=[],this.origHiddenRows=[],this.viewHiddenCells=[],this.viewHiddenRows=[],this.viewHiddenResult=[]}enablePlugin(){this.addHook("collectRemovedColInfo",(e,t,r)=>this.collectRemovedColInfo(e,t,r)),this.addHook("collectRemovedRowInfo",(e,t,r)=>this.collectRemovedRowInfo(e,t,r)),this.addHook("afterShowRows",(e,t)=>this.setHiddenResult(e,t,!1)),this.addHook("afterHideRows",(e,t)=>this.setHiddenResult(e,t,!0)),super.enablePlugin()}initData(e){return super.initData(e),this.filter&&(this.filter.isFilterEnabled()&&this.updateActiveFilter(this.filter),this.resetHiddenResult(!1)),!!this.activeFilter}_createFilter(e,t,r,i,a,g){let R=super._createFilter(e,t,r,i,a,g);return R.on("insertRowRange",(L,W)=>this._insertRowRange(R,L,W)),R.on("insertColRange",(L,W)=>this._insertColRange(R,L,W)),R.on("removeRowRange",(L,W)=>this._removeRowRange(R,L,W)),R.on("removeColRange",(L,W)=>this._removeColRange(R,L,W)),R.on("moveRowRange",(L,W,K)=>this._moveRowRange(R,L,W,K)),R.on("moveColRange",(L,W,K)=>this._moveColRange(R,L,W,K)),R.on("setCondition",L=>this._afterSetCondition(R,L)),R.on("rangeChange",()=>this._afterRangeChanged(R)),R}isInViewState(){return!!this.activeFilter&&this.activeFilter!==this.filter}getFilterJSON(){return this.filter?.toJSON()}getActiveFilterJSON(){return this.activeFilter?.toJSON()}listFilterViewInfo(){return this.filterView.filter(e=>e.isFilterEnabled()&&!e.isFilterPrivate()).map(e=>({id:e.getId(),name:e.getName()}))}getActiveId(){return this.activeFilter?.getId()}getActiveRange(){return this.activeFilter?.getRange()??null}updateActiveFilter(e){this.activeFilter=e,this.sheet.notifyPluginChanges(["filter"])}isFilteredRow(e,t){let r=t?this.activeFilter:this.filter,i=r?.getRange();if(!i||!r?.isFilterEnabled()||e<i.from.row||e>i.to.row)return!1;let a=e-i.from.row,g=t?this.viewHiddenRows:this.origHiddenRows;return g[a]===void 0&&this._calcHiddenRow(e,t),!!g[a]}isHiddenRow(e){return this.sheet.isFilteredRow(e)}isViewHidden(e){return this.viewHiddenResult[e]}afterCreateRow(e,t){var r,i;this.viewHiddenResult=(r=this.viewHiddenResult,i=Array(t).fill(!1),r.slice(0,e).concat(i,r.slice(e))),super.afterCreateRow(e,t),this.sheet.notifyPluginChanges(["filter"])}afterRemoveRow(e,t){this.viewHiddenResult.splice(e,t),super.afterRemoveRow(e,t),this.isInViewState()&&!this.activeFilter?.hasRange()&&this.leaveViewState(),this.sheet.notifyPluginChanges(["filter"])}afterRemoveCol(e,t){super.afterRemoveCol(e,t),this.isInViewState()&&!this.activeFilter?.hasRange()&&this.leaveViewState()}collectRemovedColInfo(e,t,r){let i={},a=this.filter?.collectRemovedColInfo(t,r);a&&(i.filter=a);let g=[];Sr(this.filterView,R=>{let L=R.collectRemovedColInfo(t,r);L&&g.push(L)}),g.length>0&&(i.view=g),(i.filter||i.view)&&e.push({pluginName:this.pluginName,colInfo:i})}collectRemovedRowInfo(e,t,r){let i={},a=this.filter?.collectRemovedRowInfo(t,r);a&&(i.filter=a);let g=[];Sr(this.filterView,R=>{let L=R.collectRemovedRowInfo(t,r);L&&g.push(L)}),g.length>0&&(i.view=g),this.isInViewState()&&this.activeFilter&&(i.calc={id:this.activeFilter.getId(),result:this.viewHiddenResult.slice(t,t+r)}),(i.filter||i.view||i.calc)&&e.push({pluginName:this.pluginName,rowInfo:i})}repairRow(e,t){let{calc:r,...i}=e;if(super.repairRow(i,t),!r||!this.activeFilter||r.id!==this.activeFilter.getId())return;let{result:a}=r;for(let g=0;g<a.length;g++)this.viewHiddenResult[g+t]=a[g];this.sheet.notifyPluginChanges(["filter"])}checkMoveEnable(e,t,r,i){if(this.filter&&!this.filter.checkMoveEnable(e,t,r,i))return!1;for(let a=0;a<this.filterView.length;a++)if(this.filterView[a]&&!this.filterView[a].checkMoveEnable(e,t,r,i))return!1;return!0}_beforeMove(e,t,r){return Oh(this.viewHiddenResult,t.sec[0].start,t.sec[0].amount,t.sec[1].amount),this.sheet.notifyPluginChanges(["filter"]),super._beforeMove(e,t,r)}_insertRowRange(e,t,r){if(e!==this.filter&&e!==this.activeFilter)return;let i=e===this.filter?this.origHiddenCells:this.viewHiddenCells,a=e===this.filter?this.origHiddenRows:this.viewHiddenRows;t<i.length&&(Mc(a,t,r),Mc(i,t,r));for(let g=0;g<r;g++)i[t+g]=[];this.sheet.notifyPluginChanges(["filter"])}_insertColRange(e,t,r){(e===this.filter||e===this.activeFilter)&&(Sr(e===this.filter?this.origHiddenCells:this.viewHiddenCells,i=>{Mc(i,t,r)}),this.sheet.notifyPluginChanges(["filter"]))}_removeRowRange(e,t,r){if(e!==this.filter&&e!==this.activeFilter)return;let i=e===this.filter?this.origHiddenCells:this.viewHiddenCells,a=e===this.filter?this.origHiddenRows:this.viewHiddenRows;t+r>=i.length?(a.length=t,i.length=t):(a.splice(t,r),i.splice(t,r)),this.sheet.notifyPluginChanges(["filter"])}_removeColRange(e,t,r){if(e!==this.filter&&e!==this.activeFilter)return;let i=e===this.filter?this.origHiddenCells:this.viewHiddenCells,a=e===this.filter?this.origHiddenRows:this.viewHiddenRows;for(let g=0;g<a.length;g++)if(a[g]){for(let R=t;R<t+r;R++)if(i[g][R]){a[g]=void 0;break}}Sr(i,g=>{g.splice(t,r)}),this.sheet.notifyPluginChanges(["filter"]),e===this.activeFilter&&this.onHiddenChanged()}_moveRowRange(e,t,r,i){if(e!==this.filter&&e!==this.activeFilter)return;let a=e===this.filter?this.origHiddenCells:this.viewHiddenCells;Oh(e===this.filter?this.origHiddenRows:this.viewHiddenRows,t,r,i),Oh(a,t,r,i),this.sheet.notifyPluginChanges(["filter"])}_moveColRange(e,t,r,i){(e===this.filter||e===this.activeFilter)&&(Sr(e===this.filter?this.origHiddenCells:this.viewHiddenCells,a=>{Oh(a,t,r,i)}),this.sheet.notifyPluginChanges(["filter"]))}_afterSetCondition(e,t){if(e!==this.filter&&e!==this.activeFilter)return;let r=e===this.filter?this.origHiddenCells:this.viewHiddenCells,i=e===this.filter?this.origHiddenRows:this.viewHiddenRows;e===this.activeFilter&&i.length!==0&&this.onHiddenChanged(),i.length=0,Sr(r,a=>{a.length>t&&(a[t]=void 0)}),this.sheet.notifyPluginChanges(["filter"])}_afterRangeChanged(e){if(e===this.filter){let t=e.getRange();t||e!==this.activeFilter?t&&!this.activeFilter&&this.updateActiveFilter(e):this.updateActiveFilter(null)}this.sheet.notifyPluginChanges(["filter"])}createFilter(e,t){return!!super.createFilter(e,t)&&(this.activeFilter||this.updateActiveFilter(this.filter),this.resetHiddenResult(!1),this.sheet.runHooks("afterCreateFilter",e,t),!0)}resetHiddenResult(e){let t=e?this.viewHiddenCells:this.origHiddenCells,r=e?this.viewHiddenRows:this.origHiddenRows;t.length=0,r.length=0;let i=e?this.activeFilter:this.filter,a=i?.getRange()?.getHeight()||0;for(let g=0;g<a;g++)t[g]=[];this.sheet.notifyPluginChanges(["filter"])}enableFilter(e,t){return!!super.enableFilter(e,t)&&(this.activeFilter||(this.updateActiveFilter(this.filter),this.onHiddenChanged()),this.sheet.runHooks("afterEnableFilter",e,t),this.sheet.getWorkbook().notifyDataChange(xo.FILTER),!0)}disableFilter(e,t){let r=this.filter?.getRange();if(!r)return!1;if(!t){let i=new Oc;for(let a=r.from.row+1;a<=r.to.row;a++)this.isFilteredRow(a,!1)&&i.push(a);t={show:i.getResult()}}return!!super.disableFilter(e,t)&&(this.activeFilter===this.filter&&(this.onHiddenChanged(),this.updateActiveFilter(null)),this.sheet.runHooks("afterDisableFilter",e,t),this.sheet.getWorkbook().notifyDataChange(xo.FILTER),!0)}updateFilterRange(e,t,r){if(!this.filter||e!==this.filter.getId()||!this.filter.isFilterEnabled())return!1;let i=this.filter.cloneRange(),a=this.filter.getAllConditions();return!!super.updateFilterRange(e,t,r)&&(this.activeFilter===this.filter&&this.onHiddenChanged(),this.sheet.notifyPluginChanges(["filter"]),this.sheet.runHooks("afterUpdateFilterRange",e,i,t,a,r),!0)}createFilterView(e,t,r,i){return!!super.createFilterView(e,t,r,i)&&(this.sheet.notifyPluginChanges(["filter"]),this.sheet.runHooks("afterCreateFilterView",e,t,r,i),!0)}enableFilterView(e){return!super.enableFilterView(e)||(this.sheet.notifyPluginChanges(["filter"]),this.sheet.runHooks("afterEnableFilterView",e),!1)}disableFilterView(e){return!!super.disableFilterView(e)&&(this.getFilterView(e)===this.activeFilter&&this.leaveViewState(),this.sheet.notifyPluginChanges(["filter"]),this.sheet.runHooks("afterDisableFilterView",e),!0)}updateFilterViewRange(e,t,r){let i=this.getFilterView(e);if(!i)return!1;let a=i.cloneRange(),g=i.getAllConditions(),R=i.isFilterPrivate();return!!super.updateFilterViewRange(e,t,r)&&(i===this.activeFilter&&(this.sheet.getWorkbook().getNotifier()?.onFilterViewUpdated(this.sheet.sheetId),this.onHiddenChanged()),this.sheet.notifyPluginChanges(["filter"]),this.sheet.runHooks("afterUpdateFilterViewRange",e,a,t,g,r,R),!0)}updateFilterViewName(e,t){let r=this.getFilterView(e);if(!r)return!1;let i=r.getName(),a=r.isFilterPrivate();return!!super.updateFilterViewName(e,t)&&(r===this.activeFilter&&this.sheet.getWorkbook().getNotifier()?.onFilterViewUpdated(this.sheet.sheetId),this.sheet.notifyPluginChanges(["filter"]),this.sheet.runHooks("afterUpdateFilterViewName",e,i,t,a),!0)}setActiveFilterView(e){let t=this.activeFilter?.getId()??null;e!==t&&(this.switchViewState(e),this.sheet.getWorkbook().getNotifier()?.onFilterViewUpdated(this.sheet.sheetId),this.sheet.notifyPluginChanges(["filter"]),this.sheet.runHooks("afterActiveFilterChange",t,e))}setFilter(e,t,r,i){if(!this.filter||e!==this.filter.getId())return!1;let a=this.filter.getRange();if(!a)return!1;for(let L=a.from.row+1;L<=a.to.row;L++)this.origHiddenRows[L-a.from.row]===void 0&&this._calcHiddenRow(L,!1);let g=this.filter.getCondition(t);if(!super.setFilter(e,t,r))return!1;let R=this._calcHiddenCol(t,!1);return i??=R,this.setHiddenInfo(i),this.sheet.notifyPluginChanges(["filter"]),this.sheet.runHooks("afterSetFilter",e,t,r,g,i),this.filter&&this.activeFilter&&this.filter===this.activeFilter&&this.onHiddenChanged(),!0}setFilterViewCondition(e,t,r){let i=this.getFilterView(e);if(!i)return!1;let a=i.getCondition(t),g=i.isFilterPrivate();if(!super.setFilterViewCondition(e,t,r))return!1;if(this.activeFilter===i){let{show:R,hide:L}=this._calcHiddenCol(t,!0);if(R)for(let{from:W,to:K}of R)this.setHiddenResult(W,K,!1);if(L)for(let{from:W,to:K}of L)this.setHiddenResult(W,K,!0)}return this.sheet.notifyPluginChanges(["filter"]),this.sheet.runHooks("afterSetFilterViewCondition",e,t,a,r,g),!0}expandRangeByData(e){function t(r,i){let a=r?.getRange();if(!a||!r?.isFilterEnabled())return;let g=a.getHeight();for(let R=i.length;R<g;R++)i[R]=!1}super.expandRangeByData(e),t(this.filter,this.origHiddenRows),this.activeFilter!==this.filter&&t(this.activeFilter,this.viewHiddenRows),this.sheet.notifyPluginChanges(["filter"])}setHiddenResult(e,t,r){if(this.isInViewState()){for(let i=e;i<=t;i++)this.viewHiddenResult[i]=r;this.sheet.notifyPluginChanges(["filter"])}}switchViewState(e){let t=this.activeFilter,r=t?.getRange(),i=e&&this.getFilterView(e),a=this.sheet.countRows();if(i){this.updateActiveFilter(i),this.resetHiddenResult(!0),this.viewHiddenResult=Array(a).fill(!1);let R=i.getRange();if(R)for(let L=R.from.row;L<=R.to.row;L++)this.viewHiddenResult[L]=this.isFilteredRow(L,!0);this.sheet.notifyPluginChanges(["filter"])}else this.leaveViewState();let g=this.activeFilter?.getRange();if(t!==this.activeFilter&&(r||g)){let R=Math.min(r?.from.row??a,g?.from.row??a),L=Math.max(r?.to.row??0,g?.to.row??0);this.sheet.runHooks("filterHiddenChange",R,L)}}leaveViewState(){this.filter&&this.filter.isFilterEnabled()?this.updateActiveFilter(this.filter):this.updateActiveFilter(null),this.viewHiddenResult=[],this.sheet.notifyPluginChanges(["filter"]),this.sheet.getWorkbook().getNotifier()?.onFilterViewUpdated(this.sheet.sheetId)}onHiddenChanged(){let e=this.activeFilter?.getRange();if(!e)return;let t=e.from.row+1,r=e.to.row;this.sheet.runHooks("filterHiddenChange",t,r),this.sheet.isActive()&&this.sheet.getWorkbook().notifyDataChange(xo.VIEWPORT)}setHiddenInfo(e){super.setHiddenInfo(e);let t=this.filter?.getRange();if(!t)return;let{show:r,hide:i}=e;r&&Sr(r,a=>{for(let g=a.from;g<=a.to;g++)this.origHiddenRows[g-t.from.row]=!1}),i&&Sr(i,a=>{for(let g=a.from;g<=a.to;g++)this.origHiddenRows[g-t.from.row]=!0}),this.sheet.notifyPluginChanges(["filter"])}_calcHiddenCol(e,t){let r=t?this.activeFilter:this.filter,i=r?.getRange();if(!i)return{show:[],hide:[]};let a=new Oc,g=new Oc,R=t?this.viewHiddenRows:this.origHiddenRows,L=t?this.viewHiddenCells:this.origHiddenCells,W=e-i.from.col;for(let K=i.from.row+1;K<=i.to.row;K++){let Q=K-i.from.row,oe=R[Q];this._calcHiddenCell(K,e,t)?(L[Q][W]=!0,R[Q]=!0,g.push(K)):(L[Q][W]=!1,oe&&(R[Q]=void 0,this.isFilteredRow(K,t)||a.push(K)))}return this.sheet.notifyPluginChanges(["filter"]),{show:a.getResult(),hide:g.getResult()}}_calcHiddenRow(e,t){let r=t?this.activeFilter?.getRange():this.filter?.getRange();if(!r)return;let i=t?this.viewHiddenRows:this.origHiddenRows,a=e-r.from.row;if(i[a]=!1,a<=0)return void this.sheet.notifyPluginChanges(["filter"]);for(let g=r.from.col;g<=r.to.col;g++)this.ensureHiddenCellValue(e,g,t)&&(i[a]=!0);this.sheet.notifyPluginChanges(["filter"])}ensureHiddenCellValue(e,t,r){let i=r?this.activeFilter?.getRange():this.filter?.getRange();if(!i)return!1;let a=r?this.viewHiddenCells:this.origHiddenCells,g=e-i.from.row,R=t-i.from.col;return a[g][R]===void 0&&(a[g][R]=this._calcHiddenCell(e,t,r),this.sheet.notifyPluginChanges(["filter"])),a[g][R]}_calcHiddenCell(e,t,r){let i=r?this.activeFilter:this.filter,a=i?.getRange();if(!i||!a||e-a.from.row<=0)return!1;let g=i.getCondition(t);if(!g)return!1;if(Q7(g))return 0>g.value.indexOf(this.sheet.renderCache.getCellText(e,t).trim());if(Z_(g)){let R=Bi({row:e,col:t}),L=Qp(g.operator[0],R,xy(g.value[0]));return!Fd(this.sheet,e,t,{isFormula:!0,delta:{row:0,col:0},operator:g.operator[0],formula1:L})}if($M(g)){let R=g.and||!1;for(let L=0;L<g.value.length;L++){let W=this.sheet.formula.getCellValue(e,t),K=Fd(this.sheet,e,t,{isFormula:!1,operator:g.operator[L]||"equal",formula1:g.value[L],strictType:!0},W);R=g.and?R&&K:R||K}return!R}if(g.type==="color"){let{color:R,cellColor:L}=g;return L?R!==this.sheet.getComputedBackgroundColor(e,t).toLowerCase():!this.sheet.getComputedTextColors(e,t).map(W=>W.toLowerCase()).includes(R)}return!1}hasDropdown(e,t){return!!this.activeFilter&&this.activeFilter.isFirstRow(e,t)}hasCondition(e){return!!this.activeFilter&&this.activeFilter.hasCondition(e)}getAutoFilterRange(e){let[t,r,i,a]=e;if(t===i&&r===a)[t,r,i,a]=this.sheet.getNonEmptyNeighborRange(e);else if(t===i&&r!==a){let g=this.sheet.countRows();for(let R=i+1;R<g;R++){let L=!0;for(let W=r;W<=a;W++)if(!this.sheet.isEmptyCell(R,W)){L=!1;break}if(L)break;i=R}}return[t,r,i,a]}getDataView(){if(!this.filter||!this.filter.isFilterEnabled())return{};let e=this.filter.getDataView();return e.hidden=function(t){let r={};for(let i=0;i<t.length;i++)t[i]!=null&&(r[i]=t[i]);return r}(this.origHiddenRows),e}getStateJSON(){return{activeId:this.activeFilter?.getId(),filter:this.filter?.isFilterEnabled()?this.filter.toJSON():null,filterView:this.filterView.filter(e=>e.isFilterEnabled()).map(e=>e.toJSON()),hiddenRows:this.origHiddenRows.map(e=>e??!1),hiddenCells:this.origHiddenCells.map(e=>e.map(t=>t??!1)),viewHiddenCells:this.viewHiddenCells.map(e=>e.map(t=>t??!1)),viewHiddenResult:this.viewHiddenResult}}calcRenderRanges(e){for(let t of e)for(let r=t.from.row;r<=t.to.row;r++)this.isFilteredRow(r,!1),this.isInViewState()&&this.isFilteredRow(r,!0)}}class ble extends sle(wle){}let xw=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,p1=typeof AbortController=="function"?AbortController:class{constructor(){this.signal=new Lz}abort(n=Error("This operation was aborted")){this.signal.reason=this.signal.reason||n,this.signal.aborted=!0,this.signal.dispatchEvent({type:"abort",target:this.signal})}},Cle=typeof AbortSignal=="function",_le=typeof p1.AbortSignal=="function",Lz=Cle?AbortSignal:_le?p1.AbortController:class{constructor(){this.reason=void 0,this.aborted=!1,this._listeners=[]}dispatchEvent(n){n.type==="abort"&&(this.aborted=!0,this.onabort(n),this._listeners.forEach(e=>e(n),this))}onabort(){}addEventListener(n,e){n==="abort"&&this._listeners.push(e)}removeEventListener(n,e){n==="abort"&&(this._listeners=this._listeners.filter(t=>t!==e))}},hD=new Set,cD=(n,e)=>{let t=`LRU_CACHE_OPTION_${n}`;m1(t)&&fD(t,`${n} option`,`options.${e}`,sg)},dD=(n,e)=>{let t=`LRU_CACHE_METHOD_${n}`;if(m1(t)){let{prototype:r}=sg,{get:i}=Object.getOwnPropertyDescriptor(r,n);fD(t,`${n} method`,`cache.${e}()`,i)}},Sle=(n,e)=>{let t=`LRU_CACHE_PROPERTY_${n}`;if(m1(t)){let{prototype:r}=sg,{get:i}=Object.getOwnPropertyDescriptor(r,n);fD(t,`${n} property`,`cache.${e}`,i)}},Fz=(...n)=>{typeof process=="object"&&process&&typeof process.emitWarning=="function"?process.emitWarning(...n):console.error(...n)},m1=n=>!hD.has(n),fD=(n,e,t,r)=>{hD.add(n),Fz(`The ${e} is deprecated. Please use ${t} instead.`,"DeprecationWarning",n,r)},zd=n=>n&&n===Math.floor(n)&&n>0&&isFinite(n),Vz=n=>zd(n)?n<=256?Uint8Array:n<=65536?Uint16Array:n<=4294967296?Uint32Array:n<=Number.MAX_SAFE_INTEGER?v1:null:null;class v1 extends Array{constructor(e){super(e),this.fill(0)}}class Ile{constructor(e){if(e===0)return[];let t=Vz(e);this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}}class sg{constructor(e={}){let{max:t=0,ttl:r,ttlResolution:i=1,ttlAutopurge:a,updateAgeOnGet:g,updateAgeOnHas:R,allowStale:L,dispose:W,disposeAfter:K,noDisposeOnSet:Q,noUpdateTTL:oe,maxSize:se=0,maxEntrySize:he=0,sizeCalculation:me,fetchMethod:ye,fetchContext:Te,noDeleteOnFetchRejection:Me,noDeleteOnStaleGet:Oe,allowStaleOnFetchRejection:ze,allowStaleOnFetchAbort:We,ignoreFetchAbort:qe}=e,{length:Ke,maxAge:at,stale:gt}=e instanceof sg?{}:e;if(t!==0&&!zd(t))throw TypeError("max option must be a nonnegative integer");let pt=t?Vz(t):Array;if(!pt)throw Error("invalid max value: "+t);if(this.max=t,this.maxSize=se,this.maxEntrySize=he||this.maxSize,this.sizeCalculation=me||Ke,this.sizeCalculation){if(!this.maxSize&&!this.maxEntrySize)throw TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=ye||null,this.fetchMethod&&typeof this.fetchMethod!="function")throw TypeError("fetchMethod must be a function if specified");if(this.fetchContext=Te,!this.fetchMethod&&Te!==void 0)throw TypeError("cannot set fetchContext without fetchMethod");if(this.keyMap=new Map,this.keyList=Array(t).fill(null),this.valList=Array(t).fill(null),this.next=new pt(t),this.prev=new pt(t),this.head=0,this.tail=0,this.free=new Ile(t),this.initialFill=1,this.size=0,typeof W=="function"&&(this.dispose=W),typeof K=="function"?(this.disposeAfter=K,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!Q,this.noUpdateTTL=!!oe,this.noDeleteOnFetchRejection=!!Me,this.allowStaleOnFetchRejection=!!ze,this.allowStaleOnFetchAbort=!!We,this.ignoreFetchAbort=!!qe,this.maxEntrySize!==0){if(this.maxSize!==0&&!zd(this.maxSize))throw TypeError("maxSize must be a positive integer if specified");if(!zd(this.maxEntrySize))throw TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!L||!!gt,this.noDeleteOnStaleGet=!!Oe,this.updateAgeOnGet=!!g,this.updateAgeOnHas=!!R,this.ttlResolution=zd(i)||i===0?i:1,this.ttlAutopurge=!!a,this.ttl=r||at||0,this.ttl){if(!zd(this.ttl))throw TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}if(this.max===0&&this.ttl===0&&this.maxSize===0)throw TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.max&&!this.maxSize){let Tt="LRU_CACHE_UNBOUNDED";m1(Tt)&&(hD.add(Tt),Fz("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",Tt,sg))}gt&&cD("stale","allowStale"),at&&cD("maxAge","ttl"),Ke&&cD("length","sizeCalculation")}getRemainingTTL(e){return this.has(e,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new v1(this.max),this.starts=new v1(this.max),this.setItemTTL=(r,i,a=xw.now())=>{if(this.starts[r]=i!==0?a:0,this.ttls[r]=i,i!==0&&this.ttlAutopurge){let g=setTimeout(()=>{this.isStale(r)&&this.delete(this.keyList[r])},i+1);g.unref&&g.unref()}},this.updateItemAge=r=>{this.starts[r]=this.ttls[r]!==0?xw.now():0},this.statusTTL=(r,i)=>{r&&(r.ttl=this.ttls[i],r.start=this.starts[i],r.now=e||t(),r.remainingTTL=r.now+r.ttl-r.start)};let e=0,t=()=>{let r=xw.now();if(this.ttlResolution>0){e=r;let i=setTimeout(()=>e=0,this.ttlResolution);i.unref&&i.unref()}return r};this.getRemainingTTL=r=>{let i=this.keyMap.get(r);return i===void 0?0:this.ttls[i]===0||this.starts[i]===0?1/0:this.starts[i]+this.ttls[i]-(e||t())},this.isStale=r=>this.ttls[r]!==0&&this.starts[r]!==0&&(e||t())-this.starts[r]>this.ttls[r]}updateItemAge(e){}statusTTL(e,t){}setItemTTL(e,t,r){}isStale(e){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new v1(this.max),this.removeItemSize=e=>{this.calculatedSize-=this.sizes[e],this.sizes[e]=0},this.requireSize=(e,t,r,i)=>{if(this.isBackgroundFetch(t))return 0;if(!zd(r))if(i){if(typeof i!="function")throw TypeError("sizeCalculation must be a function");if(!zd(r=i(t,e)))throw TypeError("sizeCalculation return invalid (expect positive integer)")}else throw TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return r},this.addItemSize=(e,t,r)=>{if(this.sizes[e]=t,this.maxSize){let i=this.maxSize-this.sizes[e];for(;this.calculatedSize>i;)this.evict(!0)}this.calculatedSize+=this.sizes[e],r&&(r.entrySize=t,r.totalCalculatedSize=this.calculatedSize)}}removeItemSize(e){}addItemSize(e,t){}requireSize(e,t,r,i){if(r||i)throw TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}*indexes({allowStale:e=this.allowStale}={}){if(this.size)for(let t=this.tail;this.isValidIndex(t)&&((e||!this.isStale(t))&&(yield t),t!==this.head);)t=this.prev[t]}*rindexes({allowStale:e=this.allowStale}={}){if(this.size)for(let t=this.head;this.isValidIndex(t)&&((e||!this.isStale(t))&&(yield t),t!==this.tail);)t=this.next[t]}isValidIndex(e){return e!==void 0&&this.keyMap.get(this.keyList[e])===e}*entries(){for(let e of this.indexes())this.valList[e]===void 0||this.keyList[e]===void 0||this.isBackgroundFetch(this.valList[e])||(yield[this.keyList[e],this.valList[e]])}*rentries(){for(let e of this.rindexes())this.valList[e]===void 0||this.keyList[e]===void 0||this.isBackgroundFetch(this.valList[e])||(yield[this.keyList[e],this.valList[e]])}*keys(){for(let e of this.indexes())this.keyList[e]===void 0||this.isBackgroundFetch(this.valList[e])||(yield this.keyList[e])}*rkeys(){for(let e of this.rindexes())this.keyList[e]===void 0||this.isBackgroundFetch(this.valList[e])||(yield this.keyList[e])}*values(){for(let e of this.indexes())this.valList[e]===void 0||this.isBackgroundFetch(this.valList[e])||(yield this.valList[e])}*rvalues(){for(let e of this.rindexes())this.valList[e]===void 0||this.isBackgroundFetch(this.valList[e])||(yield this.valList[e])}[Symbol.iterator](){return this.entries()}find(e,t){for(let r of this.indexes()){let i=this.valList[r],a=this.isBackgroundFetch(i)?i.__staleWhileFetching:i;if(a!==void 0&&e(a,this.keyList[r],this))return this.get(this.keyList[r],t)}}forEach(e,t=this){for(let r of this.indexes()){let i=this.valList[r],a=this.isBackgroundFetch(i)?i.__staleWhileFetching:i;a!==void 0&&e.call(t,a,this.keyList[r],this)}}rforEach(e,t=this){for(let r of this.rindexes()){let i=this.valList[r],a=this.isBackgroundFetch(i)?i.__staleWhileFetching:i;a!==void 0&&e.call(t,a,this.keyList[r],this)}}get prune(){return dD("prune","purgeStale"),this.purgeStale}purgeStale(){let e=!1;for(let t of this.rindexes({allowStale:!0}))this.isStale(t)&&(this.delete(this.keyList[t]),e=!0);return e}dump(){let e=[];for(let t of this.indexes({allowStale:!0})){let r=this.keyList[t],i=this.valList[t],a=this.isBackgroundFetch(i)?i.__staleWhileFetching:i;if(a===void 0)continue;let g={value:a};if(this.ttls){g.ttl=this.ttls[t];let R=xw.now()-this.starts[t];g.start=Math.floor(Date.now()-R)}this.sizes&&(g.size=this.sizes[t]),e.unshift([r,g])}return e}load(e){for(let[t,r]of(this.clear(),e)){if(r.start){let i=Date.now()-r.start;r.start=xw.now()-i}this.set(t,r.value,r)}}dispose(e,t,r){}set(e,t,{ttl:r=this.ttl,start:i,noDisposeOnSet:a=this.noDisposeOnSet,size:g=0,sizeCalculation:R=this.sizeCalculation,noUpdateTTL:L=this.noUpdateTTL,status:W}={}){if(g=this.requireSize(e,t,g,R),this.maxEntrySize&&g>this.maxEntrySize)return W&&(W.set="miss",W.maxEntrySizeExceeded=!0),this.delete(e),this;let K=this.size===0?void 0:this.keyMap.get(e);if(K===void 0)K=this.newIndex(),this.keyList[K]=e,this.valList[K]=t,this.keyMap.set(e,K),this.next[this.tail]=K,this.prev[K]=this.tail,this.tail=K,this.size++,this.addItemSize(K,g,W),W&&(W.set="add"),L=!1;else{this.moveToTail(K);let Q=this.valList[K];if(t!==Q){if(this.isBackgroundFetch(Q)?Q.__abortController.abort(Error("replaced")):!a&&(this.dispose(Q,e,"set"),this.disposeAfter&&this.disposed.push([Q,e,"set"])),this.removeItemSize(K),this.valList[K]=t,this.addItemSize(K,g,W),W){W.set="replace";let oe=Q&&this.isBackgroundFetch(Q)?Q.__staleWhileFetching:Q;oe!==void 0&&(W.oldValue=oe)}}else W&&(W.set="update")}if(r===0||this.ttl!==0||this.ttls||this.initializeTTLTracking(),L||this.setItemTTL(K,r,i),this.statusTTL(W,K),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return this.size===0?this.tail:this.size===this.max&&this.max!==0?this.evict(!1):this.free.length!==0?this.free.pop():this.initialFill++}pop(){if(this.size){let e=this.valList[this.head];return this.evict(!0),e}}evict(e){let t=this.head,r=this.keyList[t],i=this.valList[t];return this.isBackgroundFetch(i)?i.__abortController.abort(Error("evicted")):(this.dispose(i,r,"evict"),this.disposeAfter&&this.disposed.push([i,r,"evict"])),this.removeItemSize(t),e&&(this.keyList[t]=null,this.valList[t]=null,this.free.push(t)),this.head=this.next[t],this.keyMap.delete(r),this.size--,t}has(e,{updateAgeOnHas:t=this.updateAgeOnHas,status:r}={}){let i=this.keyMap.get(e);if(i!==void 0)if(this.isStale(i))r&&(r.has="stale",this.statusTTL(r,i));else return t&&this.updateItemAge(i),r&&(r.has="hit"),this.statusTTL(r,i),!0;else r&&(r.has="miss");return!1}peek(e,{allowStale:t=this.allowStale}={}){let r=this.keyMap.get(e);if(r!==void 0&&(t||!this.isStale(r))){let i=this.valList[r];return this.isBackgroundFetch(i)?i.__staleWhileFetching:i}}backgroundFetch(e,t,r,i){let a=t===void 0?void 0:this.valList[t];if(this.isBackgroundFetch(a))return a;let g=new p1;r.signal&&r.signal.addEventListener("abort",()=>g.abort(r.signal.reason));let R={signal:g.signal,options:r,context:i},L=(Q,oe=!1)=>{let{aborted:se}=g.signal,he=r.ignoreFetchAbort&&Q!==void 0;return r.status&&(se&&!oe?(r.status.fetchAborted=!0,r.status.fetchError=g.signal.reason,he&&(r.status.fetchAbortIgnored=!0)):r.status.fetchResolved=!0),!se||he||oe?(this.valList[t]===K&&(Q===void 0?K.__staleWhileFetching?this.valList[t]=K.__staleWhileFetching:this.delete(e):(r.status&&(r.status.fetchUpdated=!0),this.set(e,Q,R.options))),Q):W(g.signal.reason)},W=Q=>{let{aborted:oe}=g.signal,se=oe&&r.allowStaleOnFetchAbort,he=se||r.allowStaleOnFetchRejection,me=he||r.noDeleteOnFetchRejection;if(this.valList[t]===K&&(me&&K.__staleWhileFetching!==void 0?se||(this.valList[t]=K.__staleWhileFetching):this.delete(e)),he)return r.status&&K.__staleWhileFetching!==void 0&&(r.status.returnedStale=!0),K.__staleWhileFetching;if(K.__returned===K)throw Q};r.status&&(r.status.fetchDispatched=!0);let K=new Promise((Q,oe)=>{this.fetchMethod(e,a,R).then(se=>Q(se),oe),g.signal.addEventListener("abort",()=>{(!r.ignoreFetchAbort||r.allowStaleOnFetchAbort)&&(Q(),r.allowStaleOnFetchAbort&&(Q=se=>L(se,!0)))})}).then(L,Q=>(r.status&&(r.status.fetchRejected=!0,r.status.fetchError=Q),W(Q)));return K.__abortController=g,K.__staleWhileFetching=a,K.__returned=null,t===void 0?(this.set(e,K,{...R.options,status:void 0}),t=this.keyMap.get(e)):this.valList[t]=K,K}isBackgroundFetch(e){return e&&typeof e=="object"&&typeof e.then=="function"&&Object.prototype.hasOwnProperty.call(e,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(e,"__returned")&&(e.__returned===e||e.__returned===null)}async fetch(e,{allowStale:t=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:g=this.noDisposeOnSet,size:R=0,sizeCalculation:L=this.sizeCalculation,noUpdateTTL:W=this.noUpdateTTL,noDeleteOnFetchRejection:K=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:Q=this.allowStaleOnFetchRejection,ignoreFetchAbort:oe=this.ignoreFetchAbort,allowStaleOnFetchAbort:se=this.allowStaleOnFetchAbort,fetchContext:he=this.fetchContext,forceRefresh:me=!1,status:ye,signal:Te}={}){if(!this.fetchMethod)return ye&&(ye.fetch="get"),this.get(e,{allowStale:t,updateAgeOnGet:r,noDeleteOnStaleGet:i,status:ye});let Me={allowStale:t,updateAgeOnGet:r,noDeleteOnStaleGet:i,ttl:a,noDisposeOnSet:g,size:R,sizeCalculation:L,noUpdateTTL:W,noDeleteOnFetchRejection:K,allowStaleOnFetchRejection:Q,allowStaleOnFetchAbort:se,ignoreFetchAbort:oe,status:ye,signal:Te},Oe=this.keyMap.get(e);if(Oe===void 0){ye&&(ye.fetch="miss");let ze=this.backgroundFetch(e,Oe,Me,he);return ze.__returned=ze}{let ze=this.valList[Oe];if(this.isBackgroundFetch(ze)){let gt=t&&ze.__staleWhileFetching!==void 0;return ye&&(ye.fetch="inflight",gt&&(ye.returnedStale=!0)),gt?ze.__staleWhileFetching:ze.__returned=ze}let We=this.isStale(Oe);if(!me&&!We)return ye&&(ye.fetch="hit"),this.moveToTail(Oe),r&&this.updateItemAge(Oe),this.statusTTL(ye,Oe),ze;let qe=this.backgroundFetch(e,Oe,Me,he),Ke=qe.__staleWhileFetching!==void 0,at=Ke&&t;return ye&&(ye.fetch=Ke&&We?"stale":"refresh",at&&We&&(ye.returnedStale=!0)),at?qe.__staleWhileFetching:qe.__returned=qe}}get(e,{allowStale:t=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,status:a}={}){let g=this.keyMap.get(e);if(g!==void 0){let R=this.valList[g],L=this.isBackgroundFetch(R);return this.statusTTL(a,g),this.isStale(g)?(a&&(a.get="stale"),L?(a&&(a.returnedStale=t&&R.__staleWhileFetching!==void 0),t?R.__staleWhileFetching:void 0):(i||this.delete(e),a&&(a.returnedStale=t),t?R:void 0)):(a&&(a.get="hit"),L?R.__staleWhileFetching:(this.moveToTail(g),r&&this.updateItemAge(g),R))}a&&(a.get="miss")}connect(e,t){this.prev[t]=e,this.next[e]=t}moveToTail(e){e!==this.tail&&(e===this.head?this.head=this.next[e]:this.connect(this.prev[e],this.next[e]),this.connect(this.tail,e),this.tail=e)}get del(){return dD("del","delete"),this.delete}delete(e){let t=!1;if(this.size!==0){let r=this.keyMap.get(e);if(r!==void 0)if(t=!0,this.size===1)this.clear();else{this.removeItemSize(r);let i=this.valList[r];this.isBackgroundFetch(i)?i.__abortController.abort(Error("deleted")):(this.dispose(i,e,"delete"),this.disposeAfter&&this.disposed.push([i,e,"delete"])),this.keyMap.delete(e),this.keyList[r]=null,this.valList[r]=null,r===this.tail?this.tail=this.prev[r]:r===this.head?this.head=this.next[r]:(this.next[this.prev[r]]=this.next[r],this.prev[this.next[r]]=this.prev[r]),this.size--,this.free.push(r)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return t}clear(){for(let e of this.rindexes({allowStale:!0})){let t=this.valList[e];if(this.isBackgroundFetch(t))t.__abortController.abort(Error("deleted"));else{let r=this.keyList[e];this.dispose(t,r,"delete"),this.disposeAfter&&this.disposed.push([t,r,"delete"])}}if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return dD("reset","clear"),this.clear}get length(){return Sle("length","size"),this.size}static get AbortController(){return p1}static get AbortSignal(){return Lz}}class gD{constructor(e){this.err=e}getValue(){return this.err.message}}let xle=class extends Dc{constructor(n){super(n,"synoFormula"),this.matrix=new dle(e=>this.handleItemRemove(e))}enablePlugin(){this.sheet.formula=this,this.addHook("init",()=>this.onInit()),this.addHook("beforeCreateRow",(n,e,t)=>this.onAlterGrid("row",n,e,t)),this.addHook("beforeCreateCol",(n,e,t)=>this.onAlterGrid("col",n,e,t)),this.addHook("beforeRemoveRow",(n,e)=>this.onAlterGrid("row",n,-e,-1)),this.addHook("beforeRemoveCol",(n,e)=>this.onAlterGrid("col",n,-e,-1)),this.addHook("repairCross",n=>this.repairCross(n)),this.addHook("beforeMoveRow",(n,e,t)=>this.beforeMove("row",n,e,t)),this.addHook("beforeMoveCol",(n,e,t)=>this.beforeMove("col",n,e,t)),this.addHook("afterQuotePrefixChange",n=>this.generateChangeDep(n)),super.enablePlugin()}onInit(){let n=this.sheet.getDataModel(),e=n.getRowLength();for(let t=0;t<e;t++){let r=n.getRow(t);if(!r)continue;let i=r.getColLength();for(let a=0;a<i;a++){let g=r.getCell(a);if(!g)continue;let R=g.getValue();!R||!be(R,g.getCellStyle())||g.getFormulaItem()||this.initItem(t,a,R)}}}initItem(n,e,t){let r=Ac(t);return this.createItem(n,e,t,r)}createItem(n,e,t,r){let i=this.matrix.createItem(this.sheet,n,e,t.slice(1),!0);this.sheet.setFormulaItem(i.row,i.col,i),this.sheet.getWorkbook().getAsyncCalculator().getFormulaDimensioner().setNeedDimension(i);let a=this.checkCrossRefError(r);return a===void 0?i.register(this.mapFormulaRange(r)):(i.needUpdate=!1,i.error=new gD(Wn.REF),i.setUnknownName(a)),i}checkCrossRefError(n){let e=this.sheet.getWorkbook(),t=e.getNameById(this.sheet.sheetId),r=e.getNameManager().getContainer();for(let i=0;i<n.length;i++){let a=n[i].shName;if(a&&a!==t&&!e.hasSheetName(a))return a;if(n[i].isNameRange()){let g=r.resolveRange(n[i]);for(let R=0;R<g.length;R++){let L=g[R].shName;if(L&&L!==t&&!e.hasSheetName(L))return L}}}}mapFormulaRange(n){let e=[],t=this.sheet.getWorkbook(),r=t.getNameById(this.sheet.sheetId),i=this.sheet.getFormulaDepManager(),a=new Set;for(let g=0;g<n.length;g++){let R=n[g],L=R.shName,W=i;L!==void 0&&L!==r&&(W=t.getSheetByName(L).getFormulaDepManager());let K=R.getContainer(W),Q=K.getFormulaRange(R);if(Q){if(a.has(Q))continue}else Q=new D_(R),K.addFormulaRange(Q);a.add(Q),e.push(Q)}return e}removeItem(n,e){let t=nm.createId(n,e);return this.matrix.remove(t)}handleItemRemove(n){n.unregisterAll(),n.error?.err===Wn.REF&&this.sheet.getWorkbook().getUnknownRefManager().removeItem(n),this.sheet.getWorkbook().getAsyncCalculator().getFormulaDimensioner().removeNeedDimension(n),this.sheet.setFormulaItem(n.row,n.col,null)}onAlterGrid(n,e,t,r){let i=this.getFormulaChanges(n,e,t,r),a=this.sheet.getWorkbook(),g=+(n!=="row");for(let R in i)if(fi(i,R)){let L=a.getSheetById(R);if(!L)continue;let W=i[R][this.pluginName];if(!W)continue;let K=[];for(let Q=0;Q<W.length;Q++){let oe=W[Q];this.sheet.sheetId===R&&e<=oe[g]&&e>oe[g]+t||K.push([oe[0],oe[1],oe[3]])}this.updateFormula(L,K)}this.matrix.shift(n,e,t),t<0&&(this.collectedInfo=i)}getFormulaChanges(n,e,t,r){let i=(n==="row"?this.sheet.countRows():this.sheet.countCols())-1,{deps:a,conds:g,units:R,spills:L}=this.sheet.getFormulaDepManager().getRefItemsToRowCol(n,e,i),W={},K={},Q={[n]:e},oe=this.sheet.getName();for(let he=0;he<a.length;he++){let me=a[he];if(Vd(me)){this.clearVectorItem(me);continue}let ye=me.sheet,Te=ye.sheetId,Me=Ar.changeFormula(me.formula,{delta:t,start:Q},oe,ye.getName());if(Me!==me.formula)Ma(W,Te,this.pluginName,[me.row,me.col,"="+me.formula,"="+Me]);else{fi(K,Te)||(K[Te]=[]),K[Te].push([me.row,me.col]);let Oe=me.getSpillRange(),ze=(n==="row"?me.sheet.countRows():me.sheet.countCols())-1;Oe&&Oe.getRange().to[n]>=ze&&this.sheet.getWorkbook().getAsyncCalculator().getFormulaDimensioner().setNeedDimension(me)}}this.resetItemByChanges(K);for(let he=0;he<g.length;he++)g[he].notifyUpdate();for(let he=0;he<R.length;he++)R[he].notifyAlterGrid(n,this.sheet,e,t,r,W);let se=this.sheet.getWorkbook().getAsyncCalculator().getFormulaDimensioner();for(let he of L)t<0&&e<=he[n]&&he[n]<=e-t-1?se.updateItemSpillRange(he,null):se.setNeedDimension(he);return W}updateFormula(n,e){n.controller.setDataAtCell(e,Nn.Formula)}beforeMove(n,e,t,r){let i=this.sheet.getWorkbook(),a={},g={},R={},{deps:L,conds:W,units:K,spills:Q}=this.sheet.getFormulaDepManager().getRefItemsToRowCol(n,e.sec[0].start,e.sec[1].end),oe=this.sheet.getName();for(let se=0;se<L.length;se++){let he=L[se];if(Vd(he)){this.clearVectorItem(he);continue}let me=he.sheet,ye=me.sheetId,Te=Ar.moveFormula(n,he.formula,e,oe,me.getName());Te!==he.formula?(Mp(a,ye,[he.row,he.col,"="+Te]),Ma(R,ye,this.pluginName,[he.row,he.col,"="+he.formula])):Mp(g,ye,[he.row,he.col])}for(let se of Q)e.sec[0].start<=se[n]&&se[n]<=e.sec[1].end?this.sheet.getWorkbook().getAsyncCalculator().getFormulaDimensioner().setNeedDimension(se):(se.needCheckSpill=!0,Mp(g,se.sheet.sheetId,[se.row,se.col]));for(let se in this.resetItemByChanges(g),a)if(fi(a,se)){let he=i.getSheetById(se);he&&this.updateFormula(he,a[se])}this.matrix.move(n,e);for(let se=0;se<W.length;se++)W[se].notifyUpdate();for(let se=0;se<K.length;se++)K[se].notifyMove(n,this.sheet,e,R);r.cross=R}moveFormulaRange(n,e,t,r,i){let a=this.sheet.getWorkbook(),g=a.getSheetById(e);if(!g)return;let R=this.sheet,L=new mi(n.from,n.to,R.getName()),W=new mi(t.from,t.to,g.getName()),K={},Q=new Set,oe=new Set,se=Te=>{let{deps:Me,units:Oe}=Te;for(let ze of Me)Vd(ze)?this.clearVectorItem(ze):Q.add(ze);for(let ze of Oe)oe.add(ze)},he=Array.from(t.iterateCoords()),me=Array.from(n.iterateCoords());for(let{row:Te,col:Me}of(se(g.getFormulaDepManager().getItemsByCoords(he)),se(R.getFormulaDepManager().getItemsByCoords(me)),t.iterateCoords())){let Oe=g.getFormulaItem(Te,Me);se({deps:Oe?[Oe]:[],units:[]})}let ye={};for(let Te of Q){let Me=Te.formula,Oe=R!==g&&Te.sheet===g&&W.includes(Te.row,Te.col),ze=Oe?R.getName():Te.sheet.getName();Me=Ar.changeFormulaRange(Me,L,W,ze,Oe,r),Te.formula!==Me&&(Ma(ye,Te.sheet.sheetId,this.pluginName,[Te.row,Te.col,"="+Te.formula]),Mp(K,Te.sheet.sheetId,[Te.row,Te.col,"="+Me]))}for(let Te in K)if(fi(K,Te)){let Me=a.getSheetById(Te);Me&&this.updateFormula(Me,K[Te])}for(let Te of oe)Te.notifyMoveFormulaRange(L,W,r,ye);i.crossInfo=ye,a.getController().nameController.moveFormulaRange(L,W,r,i),a.getPivotTableManager().moveSourceRange(L,W,r,i)}removeFormulaRange(n,e){let t=this.sheet.getWorkbook(),r=this.sheet,i=new mi(n.from,n.to,r.getName()),a={},g=new Set,R=new Set,L=Array.from(n.iterateCoords());(Q=>{let{deps:oe,units:se}=Q;for(let he of oe)Vd(he)?this.clearVectorItem(he):g.add(he);for(let he of se)R.add(he)})(r.getFormulaDepManager().getItemsByCoords(L));let W=r.getName(),K={};for(let Q of g){let oe=Ar.removeFormulaRange(Q.formula,i,W);Q.formula!==oe&&(Ma(K,Q.sheet.sheetId,this.pluginName,[Q.row,Q.col,"="+Q.formula]),Mp(a,Q.sheet.sheetId,[Q.row,Q.col,"="+oe]))}for(let Q in a)if(fi(a,Q)){let oe=t.getSheetById(Q);oe&&this.updateFormula(oe,a[Q])}for(let Q of R)Q.notifyRemoveFormulaRange(i,K);e.crossInfo=K,t.getController().nameController.removeFormulaRange(i,e),t.getPivotTableManager().removeSourceRange(i,e)}resetItemByChanges(n){let e=this.sheet.getWorkbook();for(let t in n)if(fi(n,t)){let r=e.getSheetById(t);r&&r.formula.generateChangeDep(n[t],"reset")}}generateChangeDep(n,e){let t=[],r=null;e==="reset"?r=this.resetFormulaItem:e==="renew"&&(r=this.renewFormulaItem);for(let i=0,a=n.length;i<a;i++){let[g,R]=n[i];if(r!==null)r.call(this,g,R);else{if(!RC(n[i]))continue;this.renewFormulaItem(g,R)}t.push({row:g,col:R})}this.fireUpdateEvent(t)}onDataSorted(n,e,t){let r=this.sheet.getWorkbook().getUnknownRefManager();this.matrix.sort(n,e,i=>{i.error?.err===Wn.REF&&r.removeItem(i)});for(let i=0;i<t.length;i++){let{row:a,col:g}=t[i],R=this.sheet.getCellModel(a,g),L=R?.getValue();R&&be(L,R.getCellStyle())&&this.initItem(a,g,L)}this.fireUpdateEvent(t)}fireUpdateEvent(n){let e=this.sheet.getWorkbook(),{deps:t,conds:r,vectorSet:i,spills:a,dimMayChange:g}=this.sheet.getFormulaDepManager().getDependencies(e,this.sheet,n),R={};function L(W){let K=W.sheet.sheetId;R[K]||(R[K]=[]),R[K].push({row:W.row,col:W.col})}R[this.sheet.sheetId]=n;for(let W=0,K=t.length;W<K;W++){let Q=t[W];Q.reset(),L(Q)}for(let W of i)this.clearVectorItem(W);for(let W of a)W.needCheckSpill=!0,L(W);for(let W in R)if(fi(R,W)){let K=e.getSheetById(W);K&&K.runHooks("afterChangeResolve",R[W])}for(let W=0;W<r.length;W++)r[W].notifyUpdate();for(let W of g)this.sheet.getWorkbook().getAsyncCalculator().getFormulaDimensioner().setNeedDimension(W)}clearVectorItem(n){n.clear()}resetFormulaItem(n,e){let t=this.sheet.getFormulaItem(n,e);t&&t.reset()}renewFormulaItem(n,e){let t=this.sheet.getCellModel(n,e),r=t.getCellStyle(),i=t.getValue();t.getFormulaItem()&&this.removeItem(n,e),be(i,r)&&this.initItem(n,e,i)}getCrossInfo(){return this.collectedInfo}removeCrossInfo(){this.collectedInfo=null}repairCross(n){if(!fi(n,this.pluginName))return;let e=n[this.pluginName],t=[];for(let r=0;r<e.length;r++)t.push([e[r][0],e[r][1],e[r][2]]);this.updateFormula(this.sheet,t)}renameFormulaItems(n,e){let t={},{deps:r,units:i}=this.sheet.getFormulaDepManager().getRenameRelatedItems();for(let a=0;a<r.length;a++){let g=r[a],R=nu(g.formula,n,e);g.formula!==R&&(g.formula=R,g.sheet.setDataAtCell(g.row,g.col,"="+R),Ma(t,g.sheet.sheetId,"cells",[g.row,g.col,"="+R]))}for(let a=0;a<i.length;a++)i[a].notifyRename(n,e,t);return t}getCellValue(n,e){throw Error("Should not call")}destroy(){let n=this.sheet.getWorkbook().getUnknownRefManager();this.matrix.each(e=>{e.error?.err===Wn.REF&&n.removeItem(e)}),this.matrix.clear(),super.destroy()}};class pD{constructor(e,t,r,i,a){this._rowOffset=e.from.row,this._colOffset=e.from.col,this._length=t,this._source=r,this._context=i,this._options=a,this._item=null}getCellValue(e,t){return this._item?this._item.getValueAt(e-this._rowOffset,t-this._colOffset,()=>this._source.cellValue(e,t,{item:this._item},this._options)):this._source.cellValue(e,t,this._context,this._options)}getLength(){return this._length}getSize(){return this.getLength()}setVectorItem(e){this._item=e}}class Tle extends pD{constructor(e,t,r,i){super(e,e.to.col-e.from.col+1,t,r,i)}getValue(e){return this.getCellValue(this._rowOffset,this._colOffset+e)}getStartOffset(){return this._colOffset}}class kle extends pD{constructor(e,t,r,i){super(e,e.to.row-e.from.row+1,t,r,i)}getValue(e){return this.getCellValue(this._rowOffset+e,this._colOffset)}getStartOffset(){return this._rowOffset}}class Rle extends pD{constructor(e,t,r,i){super(e,e.to.row-e.from.row+1,t,r,i),this._width=e.to.col-e.from.col+1}getCellValue(e,t){let r=super.getCellValue(e,t);for(;Array.isArray(r);)r=r[0];return r}getWidth(){return this._width}getHeight(){return this.getLength()}getSize(){return this.getWidth()*this.getHeight()}getRowOffset(){return this._rowOffset}getColOffset(){return this._colOffset}}class Ele{constructor(){this.cache=new sg({max:10,dispose:e=>e.clear()}),this.keyMap=new WeakMap}getVectorItem(e){let t=e.getRange().key(),r=this.cache.get(t);return r||(r=new A$(e),this.cache.set(t,r),this.keyMap.set(r,t)),r}removeVectorItem(e){let t=this.keyMap.get(e);if(!t)return void e.clear();this.cache.delete(t)}}let Ale=class extends xle{constructor(n){super(n),this.itemCache=new Ele,this.importRangeItem=new Set,this.hiddenPlugin=null,this.filterPlugin=null}enablePlugin(){super.enablePlugin(),this.addHook("afterShowRows",(t,r)=>this.afterHiddenChange(t,r)),this.addHook("afterHideRows",(t,r)=>this.afterHiddenChange(t,r)),this.addHook("filterHiddenChange",(t,r)=>this.afterHiddenChange(t,r));let n=t=>this.generateChangeDep(t,"reset"),e=(t,r,i,a)=>{let g=a.cellChanges;t==="Format"&&g&&g.length>0&&n(g)};this.addHook("afterFormatChange",n),this.addHook("afterRowStyleChange",e),this.addHook("afterColStyleChange",e),this.addHook("afterGlobalStyleChange",e),this.hiddenPlugin=this.sheet.getPlugin("synoHideRowCol"),this.filterPlugin=this.sheet.getPlugin("synoFilter")}initItem(n,e,t){let r=Ji(t),i=[],a=!1;for(let R of r)if(R.isRange()||R.isVariable()){let L=KE(R);L&&i.push(L)}else R.isFunction()&&R.getText().toUpperCase()==="IMPORTRANGE"&&(a=!0);let g=this.createItem(n,e,t,i);return a&&this.importRangeItem.add(g),g}handleItemRemove(n){super.handleItemRemove(n),this.importRangeItem.delete(n),this.sheet.getWorkbook().getAsyncCalculator().getFormulaRecalculator().removeTask(n)}scheduleRecalculateItem(n){this.sheet.getWorkbook().getAsyncCalculator().getFormulaRecalculator().addTask(n)}exec(n){let e=this.sheet.getWorkbook().getFormulaParser().exec(n.formula,{sheetId:this.sheet.sheetId,item:n}),{row:t,col:r}=n;n.value=e.result,e.error&&(n.error=new gD(e.error),e.delayCalc&&Promise.resolve().then(()=>{this.scheduleRecalculateItem(n)})),n.needUpdate=!1,n.selfImplicit&&this.addImplicitDep(n,new mi({row:t,col:r},{row:t,col:r}));let{height:i,width:a}=n.getValueSize();return this.sheet.notifyRangeChanges({from:{row:t,col:r},to:{row:t+i-1,col:r+a-1}}),e}checkSpill(n){let e=n.getSpillRange();if(!e||!n.needCheckSpill)return;let t=null,r=nr.createFromRange(e.getRange(),this.sheet);if(!r){n.needCheckSpill=!1;return}r.eachCell((i,a)=>i===r.from.row&&a===r.from.col||!!Cr(this.sheet.getDataAtCell(i,a))||(t=new gD(Wn.SPILL),!1)),n.setSpillResult(t),this.sheet.notifyRangeChanges(r)}updateItem(n){n.needUpdate&&(this.exec(n),n.needDimension&&this.sheet.getWorkbook().getAsyncCalculator().getFormulaDimensioner().addCalculatedItem(n)),n.needCheckSpill&&this.checkSpill(n)}getSpillItem(n,e){let t;for(let r of this.sheet.getFormulaDepManager().getSpillContainer().matchFormulaRanges(n,e)){let i=r.getSpillItem();if(i){if(i.row===n&&i.col===e)return i;!i.spillError&&(!t||i.row<t.row||i.row===t.row&&i.col<t.col)&&(t=i)}}return t}clearVectorItem(n){this.itemCache.removeVectorItem(n)}getSpillValue(n,e,t){if(!Array.isArray(n))return e===0&&t===0?n:null;let r=n[e];return Array.isArray(r)?r[t]:t===0?r:null}getItemValueSafe(n){return this.updateItem(n),n.getValue()}getCellValue(n,e){let t=this.sheet.getDataAtCell(n,e),r=null;if(Cr(t)){r=null;let i=this.getSpillItem(n,e);i&&(this.updateItem(i),i.spillError||(r=this.getSpillValue(i.getValue(),n-i.row,e-i.col)))}else if(be(t,this.sheet.getCellStyle(n,e))){let i=this.sheet.getFormulaItem(n,e)||this.initItem(n,e,t);r=this.getItemValueSafe(i),i.getSpillRange()&&(r=i.spillError?i.getSpillErrorValue():this.getSpillValue(r,0,0))}else r=Zr(t)?t.getText():t;for(;Array.isArray(r);)r=r[0];return r}afterHiddenChange(n,e){let t={},{deps:r,conds:i}=this.sheet.getFormulaDepManager().getRefItemsToRowCol("row",n,e);for(let a of r)!Vd(a)&&a.isSubtotal&&Mp(t,a.sheet.sheetId,[a.row,a.col]);this.resetItemByChanges(t),Sr(i,a=>{a.isSubtotal&&a.notifyUpdate()})}calculateAllImportItem(){for(let n of this.importRangeItem)this.updateItem(n)}getExternalValue(n,e,t){let r=t.item,i=this.sheet.getWorkbook();if((!r||!mM(r))&&!i.getExternalManager().hasExternalValue(n,e))return Wn.LOADING;let a=i.getExternalManager().getExternalValue(n,e);return r&&(r.constructor===R$?r.setLinkId(n):mM(r)&&(r.addExternalRef(a),a.isLoading()&&i.getNotifier()?.onExternalRequest(n))),a.getValue()}getUnlinkChanges(n){let e=[];for(let t of this.importRangeItem){let r=Ji(t.formula),i={text:[],parenthesisCount:0},a=[i];for(let R of r){let L=R.getText();if(R.isFunction()&&R.getText().toUpperCase()==="IMPORTRANGE")i={text:[],parenthesisCount:0},a.push(i);else if(R.isLeftParenthesis())i.parenthesisCount+=1;else if(R.isRightParenthesis()&&(i.parenthesisCount-=1,a.length>1&&i.parenthesisCount===0)){let W=new R$;L=i.text.join("")+L;let K=this.sheet.getWorkbook().getFormulaParser().exec(L,{sheetId:this.sheet.sheetId,item:W}),Q=W.getLinkId();Q&&n.includes(Q)&&(L=K.error===Wn.LOADING?N0(Wn.REF):N0(K.error||K.result)),a.pop(),i=pl(a)}i.text.push(L)}let g=i.text.join("");t.formula!==g&&e.push([t.row,t.col,`=${g}`])}return e}cellValue(n,e,t,r){if(t.preValidateCell?.sheetId===this.sheet.sheetId&&t.preValidateCell.row===n&&t.preValidateCell.col===e)return t.preValidateCell.value;let i="",a="",{keepNull:g,keepNfId:R}=r,L=this.sheet.getCellModel(n,e),W=null;L?(a=L.getValue(),W=L.getCellStyle()):R&&(W=this.sheet.worksheet.getEmptyStyle(n,e));let K=t.item;K&&R&&K.setNfIdHint(W?.nfId??0);let Q=W&&W.getQuotePrefix();if(Cr(a)){let oe=this.getSpillItem(n,e);if(oe&&(this.updateItem(oe),oe.spillError||(i=this.getSpillValue(oe.getValue(),n-oe.row,e-oe.col)),K)){let{row:se,col:he,sheet:me}=oe;this.addImplicitDep(K,new mi({row:se,col:he},{row:se,col:he},me.getName()))}i===""&&g&&(i=null)}else if(!Q&&be(a)){let oe=L?.getFormulaItem()||this.initItem(n,e,a);this.updateItem(oe),i=oe.getValue(),oe.getSpillRange()&&(i=oe.spillError?oe.getSpillErrorValue():this.getSpillValue(i,0,0)),K&&(R&&K.setNfIdHint(oe.nfId??0),r.keepLink&&oe.href!==void 0&&K.href===void 0&&(K.href=oe.href))}else i=Zr(a)?a.getText():a;return i===null&&(!g||Q)&&(i=""),i}rangeValue(n,e,t,r){let i=Math.max(n.row,0),a=Math.max(n.col,0),g=Math.min(e.row,this.sheet.countRows()-1),R=Math.min(e.col,this.sheet.countCols()-1),L=Array(g-i+1);for(let W=i;W<=g;W++){let K=Array(R-a+1);for(let Q=a;Q<=R;Q++)K[Q-a]=this.cellValue(W,Q,t,r);L[W-i]=K}return L}visibleCellValue(n,e,t,r){let i=r.keepNull?null:"";if(r.skipHiddenRow&&this.sheet.isHiddenRow(n)||r.skipHiddenCol&&this.hiddenPlugin.isHiddenCol(n)||r.skipFiltered&&this.filterPlugin.isHiddenRow(n))return i;let a=this.cellValue(n,e,t,r);return r.skipSubtotal&&this.sheet.getFormulaItem(n,e)?.isSubtotal?i:a}visibleRangeValue(n,e,t,r){let i=Math.max(n.row,0),a=Math.max(n.col,0),g=Math.min(e.row,this.sheet.countRows()-1),R=Math.min(e.col,this.sheet.countCols()-1),{skipHiddenRow:L,skipHiddenCol:W,skipFiltered:K,skipSubtotal:Q}=r,oe=[];for(let se=i;se<=g;se++){if(L&&this.sheet.isHiddenRow(se)||K&&this.filterPlugin.isHiddenRow(se))continue;let he=[];for(let me=a;me<=R;me++){if(W&&this.hiddenPlugin.isHiddenCol(me))continue;let ye=this.cellValue(se,me,t,r);Q&&this.sheet.getCellModel(se,me)?.getFormulaItem()?.isSubtotal||he.push(ye)}oe.push(he)}return oe}_createVector(n,e,t,r){let i=nr.createFromRange(n,this.sheet);if(!i)throw Error("Range is not allowed");let a=new r(i,this,e,t);if(a.getSize()>=1e3&&!e.preValidateCell){let g=new mi(i.from,i.to,this.sheet.getName()),R=this.itemCache.getVectorItem(this.sheet.getFormulaDepManager().getContainer().getOrCreateFormulaRange(g)),L=e.item;L&&mM(L)&&R.addFormulaItem(L),a.setVectorItem(R)}return a}createRowVector(n,e,t){return this._createVector(n,e,t,Tle)}createColumnVector(n,e,t){return this._createVector(n,e,t,kle)}createRangeVector(n,e,t){return this._createVector(n,e,t,Rle)}addImplicitDep(n,e){if(!n.registerImplicit)return;let t=e.getContainer(this.sheet.getFormulaDepManager()),r=t.getFormulaRange(e);r||(r=new D_(e),t.addFormulaRange(r)),n.registerImplicit(r)}getNumberFormatHint(n,e){return this.sheet.getFormulaItem(n,e)?.nfId}},Mle=class extends Dc{constructor(n){super(n,"synoFreezeBar"),this.fixedRowsTop=0,this.fixedColumnsLeft=0}enablePlugin(){this.addHook("afterInit",n=>this.afterInit(n)),this.addHook("afterCreateRow",(n,e)=>this.afterCreateRow(n,e)),this.addHook("afterCreateCol",(n,e)=>this.afterCreateCol(n,e)),this.addHook("afterRemoveRow",(n,e)=>this.afterRemoveRow(n,e)),this.addHook("afterRemoveCol",(n,e)=>this.afterRemoveCol(n,e)),this.addHook("beforeMoveRow",(n,e,t)=>this.beforeMove("row",n,e,t)),this.addHook("beforeMoveCol",(n,e,t)=>this.beforeMove("col",n,e,t)),super.enablePlugin()}afterInit(n){this.fixedRowsTop=n.fixedRowTop||0,this.fixedColumnsLeft=n.fixedColumnLeft||0}fixedRow(n){if(n===this.fixedRowsTop)return;let e=this.fixedRowsTop;this._fixedRow(n),this.sheet.runHooks("afterFixedRow",n,e)}_fixedRow(n){this.fixedRowsTop=n,this.sheet.notifyPluginChanges(["freeze"])}fixedCol(n){if(n===this.fixedColumnsLeft)return;let e=this.fixedColumnsLeft;this._fixedCol(n),this.sheet.runHooks("afterFixedCol",n,e)}_fixedCol(n){this.fixedColumnsLeft=n,this.sheet.notifyPluginChanges(["freeze"])}afterCreateRow(n,e){this.fixedRowsTop&&n<this.fixedRowsTop&&this._fixedRow(this.fixedRowsTop+e)}afterRemoveRow(n,e){this.fixedRowsTop&&n<this.fixedRowsTop&&this._fixedRow(this.fixedRowsTop-Math.min(this.fixedRowsTop-n,e))}afterCreateCol(n,e){this.fixedColumnsLeft&&n<this.fixedColumnsLeft&&this._fixedCol(this.fixedColumnsLeft+e)}afterRemoveCol(n,e){this.fixedColumnsLeft&&n<this.fixedColumnsLeft&&this._fixedCol(this.fixedColumnsLeft-Math.min(this.fixedColumnsLeft-n,e))}beforeMove(n,e,t,r){let i,a=t&&t[this.pluginName],g=n==="row"?"_fixedRow":"_fixedCol";if(a!==void 0)return void this[g](a);let R=n==="row"?this.fixedRowsTop:this.fixedColumnsLeft;R===0||e.sec[0].start>=R||e.sec[1].end<R||(i=e.isBackward?R+Math.min(e.sec[1].amount,e.sec[1].end-R+1):R-Math.min(e.sec[0].amount,R-e.sec[0].start),r[this.pluginName]=R,this[g](i))}},Dle=class extends Dc{constructor(n){super(n,"synoHideRowCol")}enablePlugin(){this.sheet.hidden=this,super.enablePlugin()}hideRows(n,e,t){for(let r=n;r<=e;r++)this.sheet.worksheet.updateRowAttr(r,"hidden",!0);this.sheet.runHooks("afterHideRows",n,e,t),this.sheet.notifySheetChanges(["rows"])}hideCols(n,e,t){for(let r=n;r<=e;r++)this.sheet.worksheet.updateColAttr(r,"hidden",!0);this.sheet.runHooks("afterHideCols",n,e,t),this.sheet.notifySheetChanges(["cols"])}showRows(n,e,t){for(let r=n;r<=e;r++)this.sheet.worksheet.updateRowAttr(r,"hidden",void 0),this.sheet.worksheet.updateRowAttr(r,"collapse",void 0);this.sheet.runHooks("afterShowRows",n,e,t),this.sheet.notifySheetChanges(["rows"])}showCols(n,e,t){for(let r=n;r<=e;r++)this.sheet.worksheet.updateColAttr(r,"hidden",void 0),this.sheet.worksheet.updateColAttr(r,"collapse",void 0);this.sheet.runHooks("afterShowCols",n,e,t),this.sheet.notifySheetChanges(["cols"])}isHiddenRow(n){return this.sheet.worksheet.getRowInfo(n)?.hidden===!0}isHiddenCol(n){return this.sheet.worksheet.getColInfo(n)?.hidden===!0}_repair(n,e,t){if(e)for(let r=0;r<e.length;r++)e[r]===!0&&n.call(this,t+r,t+r,Nn.InsertedData)}repairRow(n,e){this._repair(this.hideRows,n,e)}repairCol(n,e){this._repair(this.hideCols,n,e)}setHiddenInfo(n,e){let t=this.sheet.countRows()-1;for(let{from:r,to:i}of n){r=Math.max(r,0),i=Math.min(i,t);for(let a=r;a<=i;a++)this.sheet.worksheet.updateRowAttr(a,"hidden",!!e||void 0)}this.sheet.notifySheetChanges(["rows"])}};class Ole extends Dle{}class Nle extends ale(Ole){constructor(e){super(e),this.minHideRow=-1,this.minHideCol=-1,this.maxHideRow=-1,this.maxHideCol=-1}enablePlugin(){this.addHook("afterInit",()=>this.afterInit()),this.addHook("afterCreateRow",(e,t)=>this.afterCreateRow(e,t)),this.addHook("afterRemoveRow",(e,t)=>this.afterRemoveRow(e,t)),this.addHook("afterCreateCol",(e,t)=>this.afterCreateCol(e,t)),this.addHook("afterRemoveCol",(e,t)=>this.afterRemoveCol(e,t)),this.addHook("afterMoveRow",e=>this.afterMoveRow(e)),this.addHook("afterMoveCol",e=>this.afterMoveCol(e)),this.addHook("collectRemovedRowInfo",(e,t,r)=>this._collectRemovedInfo("row",e,t,r)),this.addHook("collectRemovedColInfo",(e,t,r)=>this._collectRemovedInfo("col",e,t,r)),super.enablePlugin()}afterInit(){this.updateMinMaxRow(),this.updateMinMaxCol()}updateMinMaxRow(){let e=this.sheet.worksheet.rowInfos;this.minHideRow=this.sheet.countRows();for(let t=0;t<e.length;t++)if(this.isHiddenRow(t)){this.minHideRow=t;break}this.maxHideRow=-1;for(let t=e.length-1;t>=0;t--)if(this.isHiddenRow(t)){this.maxHideRow=t;break}}updateMinMaxCol(){let e=this.sheet.worksheet.colInfos;this.minHideCol=this.sheet.countCols();for(let t=0;t<e.length;t++)if(this.isHiddenCol(t)){this.minHideCol=t;break}this.maxHideCol=-1;for(let t=e.length-1;t>=0;t--)if(this.isHiddenCol(t)){this.maxHideCol=t;break}}hideRows(e,t,r){t>this.maxHideRow&&(this.maxHideRow=t),e<this.minHideRow&&(this.minHideRow=e),super.hideRows(e,t,r)}hideCols(e,t,r){t>this.maxHideCol&&(this.maxHideCol=t),e<this.minHideCol&&(this.minHideCol=e),super.hideCols(e,t,r)}showRows(e,t,r){(e<=this.minHideRow&&this.minHideRow<=t||e<=this.maxHideRow&&this.maxHideRow<=t)&&this.updateMinMaxRow(),super.showRows(e,t,r)}showCols(e,t,r){(e<=this.minHideCol&&this.minHideCol<=t||e<=this.maxHideCol&&this.maxHideCol<=t)&&this.updateMinMaxCol(),super.showCols(e,t,r)}afterCreateRow(e,t){e<=this.minHideRow&&(this.minHideRow+=t),e<=this.maxHideRow&&(this.maxHideRow+=t)}afterRemoveRow(e,t){let r=e+t-1;e<=this.minHideRow&&this.minHideRow<=r||e<=this.maxHideRow&&this.maxHideRow<=r?this.updateMinMaxCol():(r<=this.minHideRow&&(this.minHideRow-=t),r<=this.maxHideRow&&(this.maxHideRow-=t))}afterCreateCol(e,t){e<=this.minHideCol&&(this.minHideCol+=t),e<=this.maxHideCol&&(this.maxHideCol+=t)}afterRemoveCol(e,t){let r=e+t-1;e<=this.minHideCol&&this.minHideCol<=r||e<=this.maxHideCol&&this.maxHideCol<=r?this.updateMinMaxCol():(r<=this.minHideCol&&(this.minHideCol-=t),r<=this.maxHideRow&&(this.maxHideCol-=t))}_afterMove(e,t,r,i){let a=e.sec[0].start,g=e.sec[1].end;if(t>=a&&t<=g){for(let R=g;R>=a;R--)if(this[i](R)){t=R;break}}if(r>=a&&r<=g){for(let R=a;R<=g;R++)if(this[i](R)){r=R;break}}return[t,r]}afterMoveRow(e){[this.maxHideRow,this.minHideRow]=this._afterMove(e,this.maxHideRow,this.minHideRow,"isHiddenRow")}afterMoveCol(e){[this.maxHideCol,this.minHideCol]=this._afterMove(e,this.maxHideCol,this.minHideCol,"isHiddenCol")}_collectRemovedInfo(e,t,r,i){let a=e==="row"?this.isHiddenRow:this.isHiddenCol,g=Array(i);for(let R=0;R<i;R++)g[R]=a.call(this,r+R);g.some(R=>R)&&(e==="row"?t.push({pluginName:this.pluginName,rowInfo:g}):t.push({pluginName:this.pluginName,colInfo:g}))}}let Ple=class extends fz{fillDrawableData(){let n,e,t,r,i=this.getDataRowNumber(!0),a=this.getDataColNumber(!0),g=+!!this.dataHasCat(),R=+!!this.dataHasTx(),L=this.sheet.getWorkbook();for(n=0,this.drawableData=[];n<i;n++){for(e=0,t=[];e<a;e++)r=this.getDataCoord(n,e,!0),(e<R||r&&function(W){let K=L.getSheetById(W.id);return K&&!K.isHiddenCell(W.row,W.col)}(r))&&t.push(r);(R<t.length||n<g)&&this.drawableData.push(t)}this._completeData(this.drawableData)}},Ble=class extends zse{enablePlugin(){super.enablePlugin();let n=this;this.registerWorkbookHook("afterShowRows",function(e,t){n.afterHiddenChange("row",this,e,t)}),this.registerWorkbookHook("afterShowCols",function(e,t){n.afterHiddenChange("col",this,e,t)}),this.registerWorkbookHook("afterHideRows",function(e,t){n.afterHiddenChange("row",this,e,t)}),this.registerWorkbookHook("afterHideCols",function(e,t){n.afterHiddenChange("col",this,e,t)}),this.registerWorkbookHook("filterHiddenChange",function(e,t){n.afterHiddenChange("row",this,e,t)})}updateAllChartData(){Sr(this.charts,n=>{n.infoHandler.updateData()})}afterHiddenChange(n,e,t,r){Sr(this.charts,i=>{i.infoHandler.afterHiddenChange(n,e,t,r)})}getImageJSONById(n){return this.getImageById(n)?.getJSON()??null}getChartJSONById(n){return this.getChartById(n)?.getJSON()??null}getImagesJSON(){return this.images.map(n=>n.getJSON())}getChartsJSON(){return this.charts.map(n=>n.getJSON())}getStateJSON(){return{images:this.getImagesJSON(),charts:this.charts.map(n=>{let e=n.infoHandler.getChartObj(),t=n.infoHandler.getInfo().getDrawableData(),r=n.infoHandler.getInfo().getAxisFc();return{id:n.id,position:n.getPosition(),config:e,data:t,fc:r}})}}getDataView(){function n(e){return{id:e.id,position:e.getPosition()}}return{images:this.images.map(n),charts:this.charts.map(n)}}convertChartInfo(n){return new Ple(n,{sheet:this.sheet})}},Lle=class extends Dc{constructor(n){super(n,"synoManualColumnResize")}getManualSize(n){let e=this.sheet.worksheet.getColInfo(n);return e&&e.w?e.w:null}setManualSize(n,e){return typeof e=="number"&&(e=Math.max(e=Math.min(e=Math.round(e),Qe.MAX_COL_WIDTH),Qe.MIN_COL_WIDTH)),this.sheet.worksheet.updateColAttr(n,"w",e??void 0),this.sheet.notifySheetChanges(["cols"]),e}applyResizeChange(n,e,t,r){let i=Array.isArray(t)?t:[t];for(let a=n;a<=e;a++)this.setManualSize(a,i[(a-n)%i.length])}repairCol(n,e){n&&this.applyResizeChange(e,e+n.length-1,n,Nn.InsertedData)}},Fle=class extends Lle{enablePlugin(){this.addHook("collectRemovedColInfo",(n,e,t)=>this._collectRemovedInfo(n,e,t)),super.enablePlugin()}applyResizeChange(n,e,t,r){let i=[];for(let a=n;a<=e;a++)i.push(this.getManualSize(a));super.applyResizeChange(n,e,t,r),this.sheet.runHooks("afterColumnResize",n,e,i,t,r)}_collectRemovedInfo(n,e,t){let r=Array(t);for(let i=0;i<t;i++)r[i]=this.getManualSize(e+i);r.some(i=>i!==null)&&n.push({pluginName:this.pluginName,colInfo:r})}},Vle=class extends Dc{constructor(n){super(n,"synoManualRowResize")}getManualSize(n){let e=this.sheet.worksheet.getRowInfo(n);return e&&e.h?e.h:null}setManualSize(n,e){return typeof e=="number"&&(e=Math.min(e=Math.max(e=Math.round(e),Qe.MIN_ROW_HEIGHT),Qe.MAX_ROW_HEIGHT)),this.sheet.worksheet.updateRowAttr(n,"h",e??void 0),this.sheet.notifySheetChanges(["rows"]),e}applyResizeChange(n,e,t,r){let i=Array.isArray(t)?t:[t];for(let a=n;a<=e;a++)this.setManualSize(a,i[(a-n)%i.length])}repairRow(n,e){n&&this.applyResizeChange(e,e+n.length-1,n,Nn.InsertedData)}},Hle=class extends Vle{enablePlugin(){this.addHook("collectRemovedRowInfo",(n,e,t)=>this._collectRemovedInfo(n,e,t)),super.enablePlugin()}applyResizeChange(n,e,t,r){let i=[];for(let a=n;a<=e;a++)i.push(this.getManualSize(a));super.applyResizeChange(n,e,t,r),this.sheet.runHooks("afterRowResize",n,e,i,t,r)}_collectRemovedInfo(n,e,t){let r=Array(t);for(let i=0;i<t;i++)r[i]=this.getManualSize(e+i);r.some(i=>i!==null)&&n.push({pluginName:this.pluginName,rowInfo:r})}},$le=class extends Dc{constructor(n){super(n,"synoMergeCell"),this.rangeCollection=new n6}enablePlugin(){this.addHook("afterInit",n=>this.afterInit(n)),this.addHook("afterCreateCol",(n,e)=>this._afterCreateRowCol("col",n,e)),this.addHook("afterRemoveCol",(n,e)=>this._afterRemoveRowCol("col",n,e)),this.addHook("afterCreateRow",(n,e)=>this._afterCreateRowCol("row",n,e)),this.addHook("afterRemoveRow",(n,e)=>this._afterRemoveRowCol("row",n,e)),this.addHook("afterSort",(n,e)=>this._afterSort(n,e)),this.addHook("beforeMoveRow",n=>this._beforeMove("row",n)),this.addHook("beforeMoveCol",n=>this._beforeMove("col",n)),super.enablePlugin()}afterInit(n){let e=n.mergeCells;Array.isArray(e)&&this.rangeCollection.init(e.map(t=>sn.fromArray(t)))}getMergedInfoCollection(){return this.rangeCollection}_afterCreateRowCol(n,e,t){this.rangeCollection.onCreateRowCol(n,e,t),this.sheet.notifyPluginChanges(["merge"])}_afterRemoveRowCol(n,e,t){this.rangeCollection.onRemoveRowCol(n,e,t),this.sheet.notifyPluginChanges(["merge"])}_afterSort(n,e){let t=this.rangeCollection.getOverlap(e),r=[];t.forEach(i=>{this.rangeCollection.delete(i),i.from.row===i.to.row&&e.from.col<=i.from.col&&i.to.col<=e.to.col&&(i.from.row=i.to.row=n[i.from.row-e.from.row]+e.from.row,r.push(i))}),r.forEach(i=>this.rangeCollection.insert(i)),this.sheet.notifyPluginChanges(["merge"])}_beforeMove(n,e){this.rangeCollection.onMoveRowCol(n,e),this.sheet.notifyPluginChanges(["merge"])}canMergeRange(n){return!n.isSingle()}mergeRange(n,e){this.canMergeRange(n)&&(this.sheet.getOrCreateCell(n.from.row,n.to.col),this._removeOverlapInfo(n),this.rangeCollection.insert(n),this.sheet.runHooks("afterMergeCells",n,e),this.sheet.notifyPluginChanges(["merge"]))}unmergeRange(n,e){this.rangeCollection.delete(n)&&(this.sheet.runHooks("afterUnmergeCells",n,e),this.sheet.notifyPluginChanges(["merge"]))}_repairFn(n){n.forEach(e=>this.mergeRange(sn.fromArray(e),Nn.InsertedData))}repairRow(n){this._repairFn(n)}repairCol(n){this._repairFn(n)}isMergeHidden(n,e){let t=this.getMergedRange(n,e);return!!t&&(t.from.row!==n||t.from.col!==e)}_removeOverlapInfo(n){this.rangeCollection.getOverlap(n).forEach(e=>this.rangeCollection.delete(e)),this.sheet.notifyPluginChanges(["merge"])}getOverlap(n){return this.rangeCollection.getOverlap(n)}getMergedRange(n,e){return this.rangeCollection.getOverlap(oa(n,e,n,e))[0]}getCoverRange(){return this.rangeCollection.getCoverRange()}serialize(){return Array.from(this.rangeCollection.traverse(),n=>n.toArray())}};class zle extends $le{enablePlugin(){super.enablePlugin(),this.addHook("collectRemovedRowInfo",(e,t,r)=>this.collectRemovedRowInfo(e,t,r)),this.addHook("collectRemovedColInfo",(e,t,r)=>this.collectRemovedColInfo(e,t,r))}_getRemovedInfo(e,t,r){let i=this.getCoverRange();return i?(i.from[e]=t,i.to[e]=t+r-1,this.rangeCollection.getOverlap(i).map(a=>a.toArray())):[]}collectRemovedRowInfo(e,t,r){let i=this._getRemovedInfo("row",t,r);i.length>0&&e.push({pluginName:this.pluginName,rowInfo:i})}collectRemovedColInfo(e,t,r){let i=this._getRemovedInfo("col",t,r);i.length>0&&e.push({pluginName:this.pluginName,colInfo:i})}checkMoveEnable(e,t,r,i){let a=this.getCoverRange();return!a||(a.from[e]=t,a.to[e]=t+r-1,!this.rangeCollection.getOverlap(a).some(g=>!a.includesRange(g))&&(a.from[e]=t+r,a.to[e]=t+r+i-1,!this.rangeCollection.getOverlap(a).some(g=>!a.includesRange(g))))}searchMerge(e){return this.rangeCollection.search(e)}traverseMergedRange(){return this.rangeCollection.traverse()}containsIncompleteMergedCells(e){return this.getOverlap(e).some(t=>!e.includesRange(t))}getDataView(){return this.serialize()}getStateJSON(){return{mergeRanges:this.serialize()}}}class Wle extends lle(zle){}let y1="_text",Tw=new Fp,Ule=class extends Dc{constructor(n){super(n,"synoRenderCache"),this.needRenderMap=new Map}enablePlugin(){super.enablePlugin(),this.addHook("init",()=>this.onInit()),this.addHook("afterChangeResolve",n=>this.onAfterChangeResolve(n)),this.addHook("afterAddInternalLink",n=>this.clearCellCache(n.row,n.col)),this.addHook("afterRemoveInternalLink",n=>this.clearCellCache(n.row,n.col)),this.addHook("afterCreateRow",(n,e)=>this.adjustNeedRenderMapByAlterGrid("row",n,e)),this.addHook("afterRemoveRow",(n,e)=>this.adjustNeedRenderMapByAlterGrid("row",n,-e)),this.addHook("afterCreateCol",(n,e)=>this.adjustNeedRenderMapByAlterGrid("col",n,e)),this.addHook("afterRemoveCol",(n,e)=>this.adjustNeedRenderMapByAlterGrid("col",n,-e)),this.addHook("beforeMoveRow",n=>this.adjustNeedRenderMapByMove("row",n)),this.addHook("beforeMoveCol",n=>this.adjustNeedRenderMapByMove("col",n))}onInit(){let n=this.sheet.getDataModel(),e=n.getRowLength();for(let t=0;t<e;t++){let r=n.getRow(t);if(!r)continue;let i=r.getColLength();for(let a=0;a<i;a++){let g=r.getCell(a);g&&!this.isCellBlank(g)&&this.needRenderMap.set(g,{row:t,col:a})}}}clearAllHeightCache(){}modifyRowHeight(n,e){return e}clearCellCache(n,e){this._clearCellCache(n,e)}_clearCellCache(n,e){let t=this.sheet.getCellModel(n,e);t&&!this.isCellBlank(t)?(this.needRenderMap.set(t,{row:n,col:e}),this.sheet.getWorkbook().getAsyncCalculator().runTask()):this.sheet.setCellMeta(n,e,[[y1,null]])}onAfterChangeResolve(n){for(let e=0;e<n.length;e++)this._clearCellCache(n[e].row,n[e].col)}adjustNeedRenderMapByAlterGrid(n,e,t){let r=[];for(let[i,a]of this.needRenderMap)a[n]>=e&&(a[n]+=t,a[n]<e&&r.push(i));for(let i of r)this.needRenderMap.delete(i)}adjustNeedRenderMapByMove(n,e){for(let t of this.needRenderMap.values())t[n]>=e.sec[0].start&&t[n]<=e.sec[1].end&&(t[n]<=e.sec[0].end?t[n]+=e.sec[1].amount:t[n]-=e.sec[0].amount)}*calcNeedRenderCell(){for(let[,{row:n,col:e}]of function(t,r){let i=t[Symbol.iterator](),a=[];for(let g=0;g<40;g++){let{value:R,done:L}=i.next();if(L)break;a.push(R)}return a}(this.needRenderMap))this.getCellTextDesc(n,e),yield}getNeedRenderSize(){return this.needRenderMap.size}getCellText(n,e){return this.getCellTextDesc(n,e).v}getCellDescState(n,e){let t=this.sheet.getCellModel(n,e);if(!t||this.isCellBlank(t)){let r=this.sheet.formula.getSpillItem(n,e);return!r||r.needCheckSpill||r.spillError?Tw:dA(this.sheet,n,e)}return t.getProperties()[y1]||Tw}getCellTextDesc(n,e){let t=this.sheet.getCellModel(n,e),r=!!t&&this.needRenderMap.delete(t);return!t||this.isCellBlank(t)?this.sheet.formula.getSpillItem(n,e)?dA(this.sheet,n,e):Tw:r?this._updateCellText(t,n,e):t.getProperties()[y1]??Tw}isCellBlank(n){return Cr(n.getValue())&&n.getCellStyle().getQuotePrefix()===!1}_updateCellText(n,e,t){if(this.isCellBlank(n))return Tw;let r=dA(this.sheet,e,t);return this.sheet.setCellMeta(e,t,[[y1,r]]),r}renderData(n,e,t){let r=this.getCellTextDesc(n,e);return this.sheet.getPlugin("synoConditionalFormat").afterDataRenderer(n,e,t,t.getProperties()),this.sheet.getPlugin("synoValidation").afterDataRenderer(n,e,t,t.getProperties()),this.sheet.getPlugin("synoCellDirection").afterDataRenderer(n,e,t,t.getProperties()),r}},Gle=class extends Ule{constructor(n){super(n),this.heights=[]}enablePlugin(){let n=t=>this.onAfterStyleChange(t);this.addHook("afterFontChange",n),this.addHook("afterAlignmentChange",n);let e=(t,r,i,a)=>this.onDimensionStyleChange(t,a.cellChanges);this.addHook("afterRowStyleChange",e),this.addHook("afterColStyleChange",e),this.addHook("afterGlobalStyleChange",e),this.addHook("afterCreateValidation",(t,r)=>this.afterCreateValidation(t,r)),this.addHook("afterRemoveValidation",(t,r)=>this.afterRemoveValidation(t,r)),this.addHook("afterCreateFilter",(t,r)=>this.afterCreateFilter(t)),this.addHook("afterEnableFilter",t=>this.afterFilterChange()),this.addHook("afterDisableFilter",t=>this.afterFilterChange()),this.addHook("afterMergeCells",t=>this.onAfterMergeCellsUpdate(t)),this.addHook("afterUnmergeCells",t=>this.onAfterMergeCellsUpdate(t)),this.addHook("afterRowResize",(t,r,i,a)=>this.onAfterRowResize(t,r)),this.addHook("afterColumnResize",(t,r,i,a)=>this.onAfterColumnResize(t,r)),this.addHook("afterCreateRow",(t,r)=>this.onAfterCreateRow(t,r)),this.addHook("afterRemoveRow",(t,r)=>this.onAfterRemoveRow(t,r)),this.addHook("afterCreateCol",(t,r)=>this.onAfterCreateCol(t,r)),this.addHook("afterRemoveCol",(t,r)=>this.onAfterRemoveCol(t,r)),this.addHook("beforeMoveRow",t=>this.beforeMoveRow(t)),this.addHook("beforeMoveCol",t=>this.beforeMoveCol(t)),super.enablePlugin()}notifyRecalcRow(){this.sheet.getWorkbook().getNotifier()?.onRenderHeightChange(this.sheet.sheetId)}clearAllHeightCache(){let n=this.sheet.getDataModel();for(let e=0;e<this.heights.length;e++)this.heights[e]!==void 0&&(this.heights[e]=void 0,n.getRow(e)?.forEach((t,r)=>{t&&this._clearCellCache(e,r)}));this.notifyRecalcRow()}clearRowHeightsCache(n){this.heights[n]!==void 0&&(this.heights[n]=void 0,this.notifyRecalcRow())}_clearCellCache(n,e){super._clearCellCache(n,e),this.clearRowHeightsCacheByCol(n,e)}clearCellHeightCache(n,e){this.clearRowHeightsCacheByCol(n,e)}clearRowHeightsCacheByCol(n,e){let t=this.heights[n];(t===null||t&&t.col===e)&&(this.heights[n]=void 0)}_clearHeightCacheByChanges(n){let e=[];Sr(n,t=>{this.clearCellHeightCache(t[0],t[1]),e.push({row:t[0],col:t[1]})})}onAfterChangeResolve(n){super.onAfterChangeResolve(n)}onAfterStyleChange(n){this._clearHeightCacheByChanges(n)}onDimensionStyleChange(n,e){(n==="Font"||n==="Alignment")&&this.onAfterStyleChange(e)}onAfterMergeCellsUpdate(n){this.clearCellHeightCache(n.from.row,n.from.col)}onAfterRowResize(n,e){for(let t=n;t<=e;t++)this.clearRowHeightsCache(t)}onAfterColumnResize(n,e){for(let t=0,r=this.heights.length;t<r;t++){let i=this.heights[t];i&&n<=i.col&&i.col<=e&&(this.heights[t]=void 0,this.notifyRecalcRow())}}onAfterCreateRow(n,e){Mc(this.heights,n,e),this.sheet.getWorkbook().getNotifier()?.onRenderHeightAlterGrid(this.sheet.sheetId,"row",n,e)}onAfterRemoveRow(n,e){this.heights.splice(n,e),this.sheet.getWorkbook().getNotifier()?.onRenderHeightAlterGrid(this.sheet.sheetId,"row",n,-e)}onAfterCreateCol(n,e){for(let t=0,r=this.heights.length;t<r;t++){let i=this.heights[t];i&&n<=i.col&&(i.col+=e)}this.sheet.getWorkbook().getNotifier()?.onRenderHeightAlterGrid(this.sheet.sheetId,"col",n,e)}onAfterRemoveCol(n,e){let t=n+e-1;for(let r=0,i=this.heights.length;r<i;r++){let a=this.heights[r];a&&n<=a.col&&(a.col<=t?this.heights[r]=void 0:a.col-=e)}this.sheet.getWorkbook().getNotifier()?.onRenderHeightAlterGrid(this.sheet.sheetId,"col",n,-e)}beforeMoveRow(n){Oh(this.heights,n.sec[0].start,n.sec[0].amount,n.sec[1].amount),this.sheet.getWorkbook().getNotifier()?.onRenderHeightMove(this.sheet.sheetId,"row",n)}beforeMoveCol(n){for(let e=0,t=this.heights.length;e<t;e++){let r=this.heights[e];r&&n.sec[0].start<=r.col&&r.col<=n.sec[1].end&&(r.col<=n.sec[0].end?r.col+=n.sec[1].amount:r.col-=n.sec[0].amount)}this.sheet.getWorkbook().getNotifier()?.onRenderHeightMove(this.sheet.sheetId,"col",n)}setRenderHeights(n){for(let{row:e,col:t,height:r}of n)this.setHeightCache(e,t,r)}setHeightCache(n,e,t){let r=this.heights[n];r?t>r.h&&(this.heights[n]={h:t,col:e},this.notifyRecalcRow()):t>this.sheet.getDefaultRowHeight()-1?(this.heights[n]={h:t,col:e},this.notifyRecalcRow()):this.heights[n]=null}modifyRowHeight(n,e){let t=this.heights[n];if(t){let r=t.h;if((r+=1)>e)return r}return e}_removeRangeHeightCache(n){n.forAll((e,t)=>{this.clearCellHeightCache(e,t)})}afterCreateValidation(n,e){this._removeRangeHeightCache(e)}afterRemoveValidation(n,e){this._removeRangeHeightCache(e)}afterCreateFilter(n){(n=n.clone()).to.row=n.from.row,this._removeRangeHeightCache(n)}afterFilterChange(){let n=this.sheet.getPlugin("synoFilter").filter?.cloneRange();n&&(n.to.row=n.from.row,this._removeRangeHeightCache(n))}};class mD extends Sw{isEqual(e){return super.isEqual(e)&&this.conditionEqual(e)}getDisplayF1(e,t){return this._getDisplayValue(this.f1,e,t)}getDisplayF2(e,t){return this._getDisplayValue(this.f2,e,t)}_getDisplayValue(e,t,r){return oA(this.sheet.getWorkbook().getLocale(),e,{date:this.type===Cu.DATE})||""}}class kw extends mD{constructor(e,t,r){super(e,t,r),this.refCell=this.isActive()?this.calcRefCell():e.refCell,this.formula=null,this.matrix=null,this.rangeBound={row:0,col:0},this.relativeCondition={},this.unitItem=new P_(this),this.operator||Op(this.f1)||Op(this.f2)||(this.operator="between"),this.initRelativeCondition()}init(){super.init(),this.fillFormula(),this.calcRangeBound(),this.matrix=this._createMatrix()}_createMatrix(){return new lD}destroy(){this.sheet.getWorkbook().getUnitUnknownRefManager().removeItem(this.unitItem),this.unitItem.unregister(),this.matrix.clear(),super.destroy()}cloneConfig(){let e=Object.assign(super.cloneConfig(),{refCell:this.refCell}),{row:t,col:r}=this.refCell,{f1:i,f2:a,text:g}=this.relativeCondition;return i&&(e.f1=po(i,t,r)),a&&(e.f2=po(a,t,r)),g&&(e.text=`=${po(g,t,r)}`),e}conditionEqual(e){return this.relativeCondition.f1===e.relativeCondition.f1&&this.relativeCondition.f2===e.relativeCondition.f2&&this.relativeCondition.text===e.relativeCondition.text}isAbsRefOnly(){return Re(this.f1)&&Y5(this.f1)&&(!this.f2||Re(this.f2)&&Y5(this.f2))}updateRanges(e){super.updateRanges(e),this.updateRefCell(),this.updateByRelativeFormula(this.relativeCondition)}initRelativeCondition(){let{row:e,col:t}=this.refCell;this.relativeCondition={},Re(this.f1)&&(this.relativeCondition.f1=Xu(this.f1,e,t)),Re(this.f2)&&(this.relativeCondition.f2=Xu(this.f2,e,t)),be(this.text)&&(this.relativeCondition.text=Xu(this.text.slice(1),e,t))}updateByRelativeFormula(e){let{f1:t,f2:r,text:i}=e;if(!t&&!r&&!i)return;let a=this.relativeCondition;t&&(a.f1=t),r&&(a.f2=r),i&&(a.text=i),this.fillFormula(),this.onFormulaChange(),this.calcRangeBound()}fillFormula(){let e=this.formula,t=Bi(this.refCell),{row:r,col:i}=this.refCell;if(this.type===Cu.CUSTOM)this.formula=po(this.relativeCondition.f1,r,i);else if(this.type===Cu.TEXT)this.formula=Qp(this.operator,t,po(this.relativeCondition.text,this.refCell.row,this.refCell.col));else{let a=this.relativeCondition.f1?po(this.relativeCondition.f1,r,i):this.f1,g=this.relativeCondition.f2?po(this.relativeCondition.f2,r,i):this.f2;this.formula=p$(this.operator,t,a,g)}e!==this.formula&&this.registerUnitItem()}registerUnitItem(){let e=this.sheet.getWorkbook().getUnitUnknownRefManager();e.removeItem(this.unitItem),this.unitItem.unregister();let t=Ac(this.formula),r=this.sheet.formula.checkCrossRefError(t);if(r)e.addItem(r,this.unitItem),this.formula="#REF!";else{let i=this.sheet.formula.mapFormulaRange(t);this.unitItem.register(i)}}onCreateRowCol(e,t,r,i){if(!this.isActive())return;super.onCreateRowCol(e,t,r,i);let a={...this.refCell};i<a[e]&&t<=a[e]&&(a[e]+=r,this.updateRefCell(a)),this.matrix.onAlterGrid(e,t,r,g=>this.setNeedValid(g.row,g.col))}onRemoveRowCol(e,t,r){super.onRemoveRowCol(e,t,r),this.isActive()&&(this.updateRefCell(),this.matrix.onAlterGrid(e,t,-r,i=>this.setNeedValid(i.row,i.col)))}_genAdditionValid(e,t,r){let i=wm(r,this.sheet.countRows(),this.sheet.countCols()),a=this.cloneConfig();i[e]-=t.delta;let{row:g,col:R}=i;return this.relativeCondition.f1&&(a.f1=Ar.moveFormula(e,po(this.relativeCondition.f1,g,R),t)),this.relativeCondition.f2&&(a.f2=Ar.moveFormula(e,po(this.relativeCondition.f2,g,R),t)),this.relativeCondition.text&&(a.text=`=${Ar.moveFormula(e,po(this.relativeCondition.text,g,R),t)}`),[a,r]}_move(e,t){let{newRanges:r,nextRanges:i,rangesChanged:a}=this._moveRange(e,t,this.isAbsRefOnly()),g={changed:a,addition:null};return this.setNeedValidAll(),i.length>0&&r.length>0&&(g.addition=this._genAdditionValid(e,t,r)),a&&(this.ranges=i.length>0?i:r,this.updateRefCell(),this.matrix.clear()),g}beforeMove(e,t,r,i){if(!this.isActive())return;if(r){super.beforeMove(e,t,r,i),this.updateRefCell(),this.matrix.clear();return}let a={ranges:Wf(this.ranges)},{addition:g,changed:R}=this._move(e,t);return R&&(i[this.validId]=a),g?Uz(g[0],g[1],this.sheet):void 0}addValidRange(e){let t,r=[];return this.rangeBound.row>e.to.row||this.rangeBound.col>e.to.col?r.push(e.clone()):(this.rangeBound.row>e.from.row&&(r.push(oa(e.from.row,e.from.col,this.rangeBound.row-1,e.to.col)),e.from.row=this.rangeBound.row),this.rangeBound.col>e.from.col&&(r.push(oa(e.from.row,e.from.col,e.to.row,this.rangeBound.col-1)),e.from.col=this.rangeBound.col),t=this.isActive()?{row:Math.min(e.from.row,this.refCell.row),col:Math.min(e.from.col,this.refCell.col)}:{row:e.from.row,col:e.from.col},super.addValidRange(e),this.updateRefCell(t)),r}removeValidRange(e){super.removeValidRange(e),this.isActive()&&this.updateRefCell()}calcRangeBound(){this.rangeBound=K5(this.relativeCondition.f1,this.relativeCondition.f2)}calcRefCell(){return this.isActive()?wm(this.ranges,this.sheet.countRows(),this.sheet.countCols()):this.refCell}updateRefCell(e){e=e||this.calcRefCell(),(this.refCell.row!==e.row||this.refCell.col!==e.col)&&(this.refCell=e,this.fillFormula(),this.onFormulaChange(),this.calcRangeBound())}getDisplayView(){return{displayF1:this.type===Cu.TEXT?`=${this.relativeCondition.text}`:`=${this.relativeCondition.f1}`,displayF2:this.relativeCondition.f2?`=${this.relativeCondition.f2}`:super.getDisplayF2(0,0),displayList:[]}}getDisplayF1(e,t){let r=this.type===Cu.TEXT?this.relativeCondition.text:this.relativeCondition.f1;return r?`=${po(r,e,t)}`:super.getDisplayF1(e,t)}getDisplayF2(e,t){return this.relativeCondition.f2?`=${po(this.relativeCondition.f2,e,t)}`:super.getDisplayF2(e,t)}onFormulaChange(){this.matrix.clear(),this.setNeedValidAll(),this.sheet.notifyPluginChanges(["validation"])}onDepUpdate(e,t){this.setNeedValid(e,t)}notifyAlterGrid(e,t,r,i,a,g){if(!this.isActive())return;let R={...this.refCell};if(t===this.sheet&&i<0){let oe=this.ranges.map(se=>se.clone().diff(e,r,-i)).filter(se=>!!se);if(oe.length===0)return;r<=(R=wm(oe,this.sheet.countRows(),this.sheet.countCols()))[e]&&(R[e]-=i)}let L={...R};t===this.sheet&&r<=L[e]&&(L[e]+=i);let W={[e]:r},K=this.sheet.getName(),Q=this.changeFormulaBy(oe=>Ar.changeFormula(oe,{delta:i,start:W},t.getName(),K),R,L);(Q.f1||Q.f2)&&Ma(g,this.sheet.sheetId,"synoValidation",Q)}repairCross(e){this.updateByRelativeFormula(e)}notifyMove(e,t,r,i){if(!this.isActive())return;let a={...this.refCell};t===this.sheet&&this._nextRanges&&(a=wm(this._nextRanges,this.sheet.countRows(),this.sheet.countCols()));let g={...a};t===this.sheet&&g[e]>=r.sec[0].start&&g[e]<=r.sec[1].end&&(g[e]<r.sec[0].start+r.sec[1].amount?g[e]+=r.sec[0].amount:g[e]-=r.sec[1].amount);let R=this.sheet.getName(),L=this.changeFormulaBy(W=>Ar.moveFormula(e,W,r,t.getName(),R),g,a);(L.f1||L.f2)&&Ma(i,this.sheet.sheetId,"synoValidation",L)}notifyRename(e,t,r){let i=this.refCell,a=this.changeFormulaBy(g=>nu(g,e,t),i,i);(a.f1||a.f2)&&Ma(r,this.sheet.sheetId,"synoValidation",a)}notifyMoveFormulaRange(e,t,r,i){if(!this.isActive()||t.includes(this.refCell.row,this.refCell.col))return;let a=this.refCell,g=this.changeFormulaBy(R=>Ar.changeFormulaRange(R,e,t,this.sheet.getName(),void 0,r),a,a);(g.f1||g.f2)&&Ma(i,this.sheet.sheetId,"synoValidation",g)}notifyRemoveFormulaRange(e,t){if(!this.isActive())return;let r=this.refCell,i=this.changeFormulaBy(a=>Ar.removeFormulaRange(a,e,this.sheet.getName()),r,r);(i.f1||i.f2)&&Ma(t,this.sheet.sheetId,"synoValidation",i)}notifyRecalcUnknown(){this.isActive()&&(this.fillFormula(),this.onFormulaChange(),this.calcRangeBound())}notifyDeleteSheet(){this.isActive()&&(this.registerUnitItem(),this.onFormulaChange())}getSheet(){return this.sheet}changeFormulaBy(e,t,r){let i={validId:this.validId},a={},{f1:g,f2:R,text:L}=this.relativeCondition;function W(K){return Xu(K=e(K=po(K,t.row,t.col)),r.row,r.col)}if(g){let K=W(g);K!==g&&(i.f1=g,a.f1=K)}if(R){let K=W(R);K!==R&&(i.f2=R,a.f2=K)}if(L){let K=W(L);K!==L&&(i.text=L,a.text=K)}return this.updateByRelativeFormula(a),i}}let Hz=class extends kw{hasDropdown(){return!0}_createMatrix(){return new fle}fillFormula(){let{row:n,col:e}=this.refCell;this.formula=po(this.relativeCondition.f1,n,e),this.unitItem.unregister();let t=Ac(this.formula);if(this.sheet.formula.checkCrossRefError(t))this.formula="#REF!";else{let r=this.sheet.formula.mapFormulaRange(t);this.unitItem.register(r)}}getDisplayView(){return{displayF1:this.relativeCondition.f1,displayF2:"",displayList:[]}}getDisplayF1(n,e){return po(this.relativeCondition.f1,n,e)}};function w1(n){let e=n.indexOf('"');for(;e!==-1&&n.charAt(e+1)==='"';)e=n.indexOf('"',e+2);return e===-1?{content:n.replace(/""/g,'"'),isEnd:!1}:{content:`${n.slice(0,e).replace(/""/g,'"')}${n.slice(e+1)}`,isEnd:!0}}class $z extends Sw{constructor(e,t,r){super(e,t,r),this.refData=null,this.refText=null,this.displayList=e.list?function(i){let a=[],g=!1;for(let R of i.split(","))if(g){let{content:L,isEnd:W}=w1(R);a[a.length-1]+=`,${L}`,g=!W}else if(R.charAt(0)==='"'){let{content:L,isEnd:W}=w1(R.slice(1));a.push(L),g=!W}else a.push(R);return a}(e.list):e.f1.split(",")}getDisplayList(){return this.displayList}destroy(){this.refData=null,this.refText=null,super.destroy()}isEqual(e){return super.isEqual(e)&&this.list===e.list&&this.f1===e.f1}hasDropdown(){return!0}}class vD extends mD{constructor(e,t,r){super(e,t,r),this.formula=Qp(this.operator,"A1",xy(this.text))}conditionEqual(e){return this.text===e.text}getDisplayF1(){return be(this.text)?this.text.substr(1):this.text}getDisplayF2(){return""}cloneConfig(){let e=super.cloneConfig(),t=wm(this.ranges,this.sheet.countRows(),this.sheet.countCols());return e.f1=Qp(this.operator,Bi(t),xy(this.text)),e}}class zz extends mD{conditionEqual(e){return this.f1===e.f1&&this.f2===e.f2}}function Wz(n,e){return e.length>0||!!n.refCell}function Uz(n,e,t){return n.type===Cu.LIST?n.operator==="listRange"?Wz(n,e)?new Hz(n,e,t):null:new $z(n,e,t):n.type!==Cu.TEXT||be(n.text)?n.type===Cu.TEXT||n.type===Cu.CUSTOM||Re(n.f1)||Re(n.f2)?Wz(n,e)?new kw(n,e,t):null:new zz(n,e,t):new vD(n,e,t)}let jle=class extends EC{constructor(n){super(n,"synoValidation"),this.validationMap={},this._additionValidations=[]}enablePlugin(){this.addHook("afterInit",n=>this.afterInit(n)),this.addHook("afterCreateRow",(n,e,t)=>this._afterCreate("row",n,e,t)),this.addHook("afterCreateCol",(n,e,t)=>this._afterCreate("col",n,e,t)),this.addHook("afterRemoveRow",(n,e)=>this._afterRemove("row",n,e)),this.addHook("afterRemoveCol",(n,e)=>this._afterRemove("col",n,e)),this.addHook("beforeMoveRow",(n,e,t)=>this.beforeMove("row",n,e,t)),this.addHook("afterMoveRow",(n,e)=>this.afterMove(e)),this.addHook("beforeMoveCol",(n,e,t)=>this.beforeMove("col",n,e,t)),this.addHook("afterMoveCol",(n,e)=>this.afterMove(e)),this.addHook("repairCross",n=>this.repairCross(n)),super.enablePlugin()}destroy(){for(let n in this.validationMap)this.validationMap[n]&&this.validationMap[n].destroy();super.destroy()}initData(n){let e=n.validation;if(!fh(e))return!1;let t=Object.keys(e);for(let r=0;r<t.length;r++){let i=t[r];if(e[i]){let a=e[i],g=[],R=a.ranges;for(let W=0;W<R.length;W++){let K=nr.textToRange(R[W],this.sheet);K&&g.push(K)}let L=this.getValidationFromJson(a,g);if(!L)continue;L.init(),this.validationMap[i]=L}}return t.length>0}updateValidationMap(n,e){e?this.validationMap[n]=e:delete this.validationMap[n],this.sheet.notifyPluginChanges(["validation"])}getValidationFromJson(n,e){return Uz(n,e,this.sheet)}afterInit(n){this.initData(n)}_afterCreate(n,e,t,r){for(let i in this.validationMap)this.validationMap[i]&&this.validationMap[i].onCreateRowCol(n,e,t,r)}_afterRemove(n,e,t){for(let r in this.validationMap)this.validationMap[r]&&this.validationMap[r].onRemoveRowCol(n,e,t)}_checkRangeEmpty(n){let e=!0;return Ao(this.validationMap,t=>{let r=t.ranges;if(r){for(let i=0;i<r.length;i++)if(r[i].overlaps(n))return e=!1,!1}}),e}_repairFn(n,e,t,r){Sr(e,i=>{let a=this.validationMap[i.validId],g=i.ranges;if(!a||!g)return;let R=[];for(let L=0;L<g.length;L++){let W=nr.textToRange(g[L],this.sheet);W&&(W.from[n]=Math.max(W.from[n],t),W.to[n]=Math.min(W.to[n],t+r-1),this._checkRangeEmpty(W)&&R.push(W))}R.length>0&&a.repair(R)})}repairRow(n,e,t){this._repairFn("row",n,e,t)}repairCol(n,e,t){this._repairFn("col",n,e,t)}repairCross(n){let e=n[this.pluginName];if(e)for(let t=0;t<e.length;t++){let r=this.getValidation(e[t].validId);r&&r.repairCross(e[t])}}beforeMove(n,e,t,r){let i=t&&t[this.pluginName]||{},a={};for(let g in this.validationMap)if(this.validationMap[g])if(i[g]===null)this.validationMap[g].destroy(),this.updateValidationMap(g,null);else{let R=this.validationMap[g].beforeMove(n,e,i[g],a);R&&this._additionValidations.push(R)}this._additionValidations.sort((g,R)=>g.validId>R.validId?1:g.validId<R.validId?-1:0);for(let g=0;g<this._additionValidations.length;g++){let R=this._additionValidations[g];for(;R.validId in this.validationMap;)R.validId=ve(R.validId);this.updateValidationMap(R.validId,R),a[R.validId]=null}r[this.pluginName]=a}afterMove(n){let e=n&&n[this.pluginName];for(let t in this.validationMap)this.validationMap[t]&&this.validationMap[t].afterMove(e&&e[t]);for(let t=0;t<this._additionValidations.length;t++)this._additionValidations[t].init();this._additionValidations=[]}getValidation(n){return this.validationMap[n]}addValidRange(n,e){if(n&&this.validationMap[n]){let t=this.validationMap[n],r=t.addValidRange(e);r&&r.length>0&&(this.createErrorValidation(t,r),r[0].includesRange(e))||this.sheet.runHooks("afterCreateValidation",t.cloneConfig(),e)}}createValidation(n,e){this.removeBeforeCreate(e);let t=this.getValidationFromJson(n,[e]),r=n.validId||this.checkExistValid(t);if(r&&this.validationMap[r])return this.addValidRange(r,e);t.init(),this.updateValidationMap(t.validId,t),this.sheet.runHooks("afterCreateValidation",t.cloneConfig(),e)}checkExistValid(n){for(let e in this.validationMap)if(this.validationMap[e]&&this.validationMap[e].isEqual(n))return e;return null}createErrorValidation(n,e){let t=n.cloneConfig(),r="#REF!";t.f1=r,t.f2&&(t.f2=r),t.validId=null,Sr(e,i=>{this.createValidation(t,i)})}removeBeforeCreate(n){}removeValidation(n,e){let t=this.validationMap[n];t&&(t.removeValidRange(e),this.sheet.runHooks("afterRemoveValidation",t.validId,e))}},qle=Sw.prototype.destroy;function bm(n,e){return Object.assign(n,e),e}function Gz(n){n&&n.validId&&(n.needValid=!0)}bm(Sw.prototype,{init(){Sr(this.ranges,n=>{this.addToMeta(n)})},destroy(){this.setNeedValidAll(),qle.call(this)},collectRemovedInfo(n,e,t){let r;return r=n==="row"?oa(e,0,e+t-1,this.sheet.countCols()-1):oa(0,e,this.sheet.countRows()-1,e+t-1),this._collectRemovedInfo(n,e,t,r)},_collectRemovedInfo(n,e,t,r){let i=this._collectOverlap(r).map(a=>nr.toLabel(a));if(i.length>0)return{validId:this.validId,ranges:i}},_collectOverlap(n){let e=[];return Sr(this.ranges,t=>{let r=t.getOverlap(n);r&&e.push(r)}),e},setNeedValid(n,e){Gz(this.sheet.getCellMeta(n,e))},setNeedValidAll(){this.forAllCell((n,e)=>{this.setNeedValid(n,e)})},addToMeta(n){let e=[["validId",this.validId],["needValid",!0]];n.forAll((t,r)=>{this.sheet.setCellMeta(t,r,e)})},removeMeta(n){n.forAll((e,t)=>{let r=this.sheet.getCellMeta(e,t);r&&r.validId&&this.sheet.setCellMeta(e,t,[["validId",null],["needValid",!1],["synoInvalid",!1]])})},handleMetaAfterMove(n){if(n)for(let e=0;e<this.ranges.length;e++)this.addToMeta(this.ranges[e])},afterSort(n,e){for(let t=0;t<this.ranges.length;t++){let r=this.ranges[t].getOverlap(e);r&&this.addToMeta(r)}},validate(n,e,t){return t===void 0&&(t=this.sheet.formula.getCellValue(n,e)),!!Cr(t)||this._validate(n,e,t)},_validate:(n,e,t)=>!0,preValidate(n,e,t){return Cr(t)||this._validate(n,e,t)}}),bm($z.prototype,{init:function(){Sw.prototype.init.call(this),this.collectRefData()},_validate(n,e,t){return this.refData.has(t)},collectRefData(){this.refData=new Set;let n=[],e=this.displayList,t=this.sheet.getWorkbook().getLocale(),r=t.getSSF(),i=t.getData();for(let a=0,g=e.length;a<g;a++){let R=e[a].trim(),L=t.getInputParser().parse(R),W=L?.v??R,K="";Cr(K=L?L.d?r.render(i.short_date,W):L.t&&L.fc&&Eo.isDuration(L.fc)?r.render(i.duration,W):L.t&&L.v<1?r.render(i.long_time,W):L.datetime?r.render(i.datetime,W):typeof W=="boolean"?W?"TRUE":"FALSE":L.fc&&L.fc.charAt(L.fc.length-1)==="%"?e[a].trim():t.getLocaleConverter().localize(W).toString():t.getLocaleConverter().localize(W).toString())||(this.refData.add(W),n.push(K))}this.refText=ts(n)},createListRangeItems(){return this.refText.map(n=>({text:n}))}}),bm(zz.prototype,{_getConditionTemplate(){let n=rr(this.f2)&&this.f1>this.f2;return{isFormula:!1,operator:this.operator||"between",formula1:n?this.f2:this.f1,formula2:n?this.f1:this.f2}},_validate(n,e,t){return(this.type!==Cu.DECIMAL||typeof t!="string")&&Fd(this.sheet,n,e,this._getConditionTemplate(),t)}}),bm(vD.prototype,{_validate(n,e,t){let r={isFormula:!0,formula1:this.formula,delta:{row:n,col:e}};return Fd(this.sheet,n,e,r)},preValidate(n,e,t){if(Cr(t))return!0;t='"'+t+'"';let r=Qp(this.operator,t,xy(this.text));return Fd(this.sheet,n,e,{isFormula:!0,formula1:r})},cloneRelative(){let n=Object.getPrototypeOf(vD).prototype.cloneRelative.call(this);return n.isFormula=!0,n.f1=Xu(this.formula,0,0),n}}),bm(kw.prototype,{cloneRelative(){let n=Object.getPrototypeOf(kw).prototype.cloneRelative.call(this);return n.isFormula=!0,this.relativeCondition.f1&&(n.f1=this.relativeCondition.f1),this.relativeCondition.f2&&(n.f2=this.relativeCondition.f2),this.relativeCondition.text&&(n.text=this.relativeCondition.text),n},_getConditionTemplate(){return{isFormula:!0,formula1:this.formula}},_validate(n,e,t){if(this.type===Cu.DECIMAL&&typeof t=="string")return!1;let r=this._getConditionTemplate();r.delta={row:n-this.refCell.row,col:e-this.refCell.col},r.item=this.matrix.createItem(this.sheet,n,e,this);let i=Fd(this.sheet,n,e,r,t);return r.item.needUpdate=!1,i},preValidate(n,e,t){if(Cr(t))return!0;if(typeof t=="string"&&this.type===Cu.DECIMAL)return!1;let r={...this._getConditionTemplate(),isFormula:!0,delta:{row:n-this.refCell.row,col:e-this.refCell.col},preValidateCell:{sheetId:this.sheet.sheetId,row:n,col:e,value:t}};return Fd(this.sheet,n,e,r,t)},afterSort(n,e){Object.getPrototypeOf(kw).prototype.afterSort.call(this,n,e),this.ranges.some(t=>t.overlaps(e))&&this.matrix.sort(e.toArray(),n)}}),bm(Hz.prototype,{_validate(n,e,t,r){let i={row:n-this.refCell.row,col:e-this.refCell.col},a=r?null:this.matrix.createItem(this.sheet,n,e,this),g=y$(this.sheet,this.formula,i,a);a&&(a.needUpdate=!1);let R=!1,L=g&&nr.createFromRange(g,this.sheet);if(L){let W=this.sheet.getWorkbook().getSheetById(L.sheetInfo?.sheetId);L.eachCell((K,Q)=>{let oe=W.formula.getCellValue(K,Q);return oe instanceof Error&&(oe=oe.message||""),t!==oe||(R=!0,!1)})}return R},preValidate(n,e,t){return!!Cr(t)||this._validate(n,e,t,!0)},createListRangeItems(n,e){let t={row:n-this.refCell.row,col:e-this.refCell.col},r=y$(this.sheet,this.formula,t),i=[],a=r&&nr.createFromRange(r,this.sheet);if(a){let g=this.sheet.getWorkbook().getSheetById(a.sheetInfo?.sheetId),R=new Set;a.eachCell((L,W)=>{let K,Q=g.formula.getCellValue(L,W);if(Q instanceof Error)K=Q.message||"";else{let oe=d6(g,L,W,Q);K=Zr(oe)?oe.getText():oe}if(!Cr(K)&&!R.has(K)){R.add(K);let oe={text:K};Q instanceof Error||(oe.value=Q,oe.formatCode=g.getCellStyle(L,W)?.getNumberFormat().fc),i.push(oe)}return!0})}return i}});let Yle=class extends jle{enablePlugin(){this.addHook("beforeChangeForValid",(n,e)=>this.beforeChangeForValid(n,e)),this.addHook("afterChangeResolve",n=>this.afterChangeResolve(n)),this.addHook("collectRemovedColInfo",(n,e,t)=>this.collectRemovedColInfo(n,e,t)),this.addHook("collectRemovedRowInfo",(n,e,t)=>this.collectRemovedRowInfo(n,e,t)),this.addHook("afterSort",(n,e)=>this.afterSort(n,e)),super.enablePlugin()}beforeChangeForValid(n,e){if(!n||e===Nn.Remote)return;let t=!1;for(let r=n.length-1;r>=0;r--){let i=n[r];if(!i)continue;let a=i[0],g=i[1],R=this.sheet.getCellMeta(a,g),L=R?.validId?this.validationMap[R.validId]:null;if(L&&L.isReject()){if(!RC(i)){!R.needValid&&R.synoInvalid&&(t=!0);continue}let W=i[3];if(Zr(W)&&(W=W.getText()),be(W)&&!i[5]){let{result:K,error:Q}=this.sheet.getWorkbook().getFormulaParser().exec(W.substr(1),{sheetId:this.sheet.sheetId});for(W=Q||K;Array.isArray(W);)W=W[0]}L.preValidate(a,g,W)?this.sheet.setCellMeta(a,g,[["synoInvalid",!1],["needValid",!1]]):(n[r]=null,t=!0)}}t&&this.sheet.getWorkbook().getNotifier()?.onAlert(en.INVALID_CHANGE)}afterChangeResolve(n){for(let e=0;e<n.length;e++){let{row:t,col:r}=n[e];Gz(this.sheet.getCellMeta(t,r))}}_collectRemovedInfo(n,e,t){let r=[];for(let i in this.validationMap)if(this.validationMap[i]){let a=this.validationMap[i].collectRemovedInfo(n,e,t);a&&r.push(a)}return r}collectRemovedRowInfo(n,e,t){let r=this._collectRemovedInfo("row",e,t);0<r.length&&n.push({pluginName:this.pluginName,rowInfo:r})}collectRemovedColInfo(n,e,t){let r=this._collectRemovedInfo("col",e,t);0<r.length&&n.push({pluginName:this.pluginName,colInfo:r})}collectRangeInfo(n,e){e===void 0&&(e=()=>!1);let t=[],r=[];for(let i=n.from.row;i<=n.to.row;i++){if(e(i))continue;let a=Array(n.getWidth());for(let g=n.from.col;g<=n.to.col;g++){let R=this.sheet.getCellMeta(i,g);R&&R.validId&&(a[g-n.from.col]=R.validId,r.push(R.validId))}t.push(a)}return{validIds:t,validations:r=ts(r).map(i=>this.validationMap[i].cloneRelative())}}collectRangeValidation(n,e){let t=[];for(let r=0;r<n.length;r++)for(let i=0;i<e.length;i++){let a=this.sheet.getCellMeta(n[r],e[i]);a&&a.validId&&t.push(a.validId)}return ts(t).map(r=>this.validationMap[r].cloneRelative())}removeBeforeCreate(n){n.forAll((e,t)=>{let r=this.sheet.getCellMeta(e,t),i=r?r.validId:null,a=i?this.validationMap[i]:null;a&&a.removeValidRange(n)})}getValidationView(n,e,t){let r=this.getValidation(n);if(r)return Object.assign(r.cloneRelative(),{displayF1:r.getDisplayF1(e,t),displayF2:r.getDisplayF2(e,t),displayList:r.getDisplayList()})}isDropdownValidation(n){let e=this.validationMap[n];return!!e&&e.hasDropdown()}getCellInvalid(n,e){let t=this.sheet.getCellModel(n,e),r=t?.getProperties();return this.afterDataRenderer(n,e,t,r),r?.synoInvalid??!1}afterDataRenderer(n,e,t,r){if(!r||!r.validId)return!1;let i=this.validationMap[r.validId];return!!i&&(r.needValid&&this.sheet.setCellMeta(n,e,[["synoInvalid",!i.validate(n,e)],["needValid",!1]]),!0)}afterSort(n,e){for(let t in this.validationMap)this.validationMap[t]&&this.validationMap[t].afterSort(n,e)}getStateJSON(){return{validations:Object.fromEntries(Object.entries(this.validationMap).map(n=>{let[e,t]=n;return[e,Object.assign(t.cloneRelative(),t.getDisplayView())]}))}}calcRefCell(n){return wm(n,this.sheet.countRows(),this.sheet.countCols())}};function Kle(n){return n!=="html"&&n!=="head"&&n!=="body"&&!CA.metadata.includes(n)}function jz(n){return Array.from(n.matchAll(/<\/?([a-zA-Z][^>\s/]*)(?:\/| [^>]*)?>/g),e=>e[1]??"").filter(Kle).map(e=>e.toLowerCase())}function yD(n){if(!n)return{dom:null,text:null,file:null,mark:null};var e=function(i){let a=null,g=null,R=null,L=[];try{a=i.getData("text/html")}catch{}try{g=i.getData("application/x-vnd.synology.office.spreadsheet")}catch{}try{R=i.getData("text/plain")}catch{}if(i.items){for(let W of i.items)if(W.kind==="file"&&W.type.indexOf("image/")===0){let K=W.getAsFile();K&&L.push(K)}}else if(i.files)for(let W of i.files)W.type.startsWith("image/")&&L.push(W);return{html:a,mark:g,text:R,images:L}}(n);let t=null,r=null;if(e.mark)try{r=JSON.parse(e.mark)}catch{}if(e.html){let i=e.html;r||(i=i.replace(/<table\b[^>]*>[\s\S]*?<\/table>|(?:<(tbody|thead|tfoot|tr|td|th)\b[^>]*>[\s\S]*?<\/\1>\s*)+/gi,a=>a.startsWith("<table")?a:`<table>${a}</table>`)),i=i.replace(/(<colgroup [^>]*>|<col [^>]*>)[^<]+/gi,"$1"),(t=document.createElement("div")).innerHTML=i}return{dom:t,mark:r,text:e.text,file:e.images.length>0?e.images[0]:null}}function Xle(n){return!n.isTable}function wD(n){return n.isTable}let Cm=null,Jle=["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","DETAILS","DIALOG","DD","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","LI","MAIN","NAV","OL","P","PRE","SECTION","TABLE","UL"];class Zle extends pu.EventEmitter{constructor(e,t){super(),this.onCopyRef=this.onCopy.bind(this),this.onCutRef=this.onCut.bind(this),this.onPasteRef=this.onPaste.bind(this),this.el=this.createDom(e),this.uiBridge=t,this.resetInnerHTML(),this.registerEventListener(),this.data={}}createDom(e){let t=document.createElement("div");t.setAttribute("contentEditable","true"),t.inputMode="none",A(t,["syno-sh-copy-paste","selectabletext"]);let r=t.style;r.position="fixed",r.top="-10000px",r.left="-10000px",e.appendChild(t);try{document.execCommand("AutoUrlDetect",!1,"false")}catch{}return t}getEl(){return this.el}resetInnerHTML(){this.el.innerHTML="."}setData(e,t){this.data[e]=t}clearData(){this.data={}}registerEventListener(){this.el.addEventListener("cut",this.onCutRef),this.el.addEventListener("copy",this.onCopyRef),this.el.addEventListener("paste",this.onPasteRef)}destroy(){this.el.removeEventListener("cut",this.onCutRef),this.el.removeEventListener("copy",this.onCopyRef),this.el.removeEventListener("paste",this.onPasteRef)}onCopy(e){this.setClipboardData(e),this.emit("copy")}onCut(e){this.setClipboardData(e),this.emit("cut")}onPaste(e){let t=bD(yD(e.clipboardData));ue()?setTimeout(()=>{t.imageDom=this.el.cloneNode(!0),this._handleData(t),this.resetInnerHTML()},0):(this._handleData(t),e.preventDefault())}onDrop(e){let t=bD(yD(e.dataTransfer));t.htmlDom=null,t.text=null,this._handleData(t,"all")}handleDataTransfer(e,t){this._handleData(bD(yD(e)),t)}_handleData(e,t){let r,{imageDom:i,htmlDom:a,text:g,file:R,mark:L}=e,W={};if(i&&(r=function(K){if(K.childNodes.length===0)return null;let Q=K.querySelector("img");if(Q&&(K.textContent||"").trim()===""){let oe=parseInt(Q.style.width,10)||void 0,se=parseInt(Q.style.height,10)||void 0,he=parseInt(Q.getAttribute("data-syno-pos-type")||""),me=he in vl?he:void 0;return{src:Q.getAttribute("src"),width:oe,height:se,type:me,chart:JSON.parse(Q.getAttribute("data-syno-chart-info")||"null")}}return null}(i))?W.src=r:a&&(r=function(K,Q,oe){let se,he=K.innerHTML;do he=(se=he).replace(/<!--\s*\[if[^\]]*\]\s*-->(?:.(?!=<!--\s*\[))*<!--\s*\[endif\]\s*-->/,"");while(he!==se);if(K.innerHTML=he,K.childNodes.length===0)return null;let me=Array.prototype.filter.call(K.childNodes,Te=>Te.nodeType===3);if(K.childNodes.length!==me.length)for(let Te of me)Te.remove();let ye={data:[],format:[],hyperlinks:[],notes:[],width:0,height:0};for(let Te of function(Me){let Oe,ze=[],We=!1;for(let qe of Me)(!Oe||We||qe.breakStart)&&ze.push(Oe=[]),Oe.push(qe),We=qe.breakEnd;return ze}(function Me(Oe,ze,We,qe){var Ke;if(qe=qe||{},Oe instanceof Text)return[{data:{value:Oe.nodeValue,type:Ms.Normal},format:qe,notes:"",breakStart:!1,breakEnd:!1}];if(!(Oe instanceof HTMLElement))return[];if(Oe instanceof HTMLTableElement){let{data:jt,colCount:on}=new Jie(Oe,ze).run();return[{data:jt,colCount:on,format:new _7(Oe,We),hyperlinks:new Qie(Oe).run(),notes:new Zie(Oe).run(),breakStart:!0,breakEnd:!0,isTable:!0}]}if(Oe.tagName==="B"&&Oe.id.includes("docs-internal-guid")&&Oe.firstChild instanceof Text&&Oe.firstChild.nodeValue?.match(/^\s*$/)&&Oe.firstElementChild?.tagName==="TABLE"&&Oe.firstChild.remove(),Oe.tagName==="GOOGLE-SHEETS-HTML-ORIGIN"&&Oe.parentElement&&Oe.querySelectorAll("style").forEach(jt=>{jt.remove()}),Oe.getAttribute("style")==="mso-element:comment-list"||Oe.dataset.sessionid!==void 0&&Oe.dataset.shapeids!==void 0)return[];if(Oe instanceof HTMLStyleElement){let jt=(Cm||((Cm=document.createElement("iframe")).id="pasted",Cm.style.position="absolute",Cm.style.left="-9999px",document.head.append(Cm)),Cm).contentDocument;jt.head.innerHTML=Oe.outerHTML;let on=jt.styleSheets[0];try{for(let hn of on.cssRules)(function(un,an){var Ut;if(!(!an||(Ut=un,Ut.constructor.name!=="CSSStyleRule")||un.selectorText.startsWith("@"))&&un.selectorText!=="br")for(let kt of(un.selectorText==="td"&&(un.style.border="none"),an.querySelectorAll(un.selectorText)))kt instanceof HTMLElement&&(kt.dataset.elemStyles===void 0&&(kt.dataset.elemStyles=kt.style.cssText,kt.dataset.classStyles="",kt.dataset.tagStyles=""),un.selectorText[0]==="."?kt.dataset.classStyles+=un.style.cssText:kt.dataset.tagStyles+=un.style.cssText,kt.style.cssText=`${kt.dataset.tagStyles}${kt.dataset.classStyles}${kt.dataset.elemStyles}`)})(hn,Oe.parentElement)}catch(hn){console.warn(hn)}return jt.documentElement.innerHTML="",[]}if(["STYLE","SCRIPT","LINK","META","TEMPLATE","BASE","NOSCRIPT","TITLE"].includes(Oe.tagName))return[];let at=[],gt=bn(Oe,We);gt.font=Object.assign(En(Oe)||{},gt.font||{});let pt=K_(qe,gt);for(let jt=0;jt<Oe.childNodes.length;jt++){let on=Me(Oe.childNodes[jt],ze,We,pt);at.push(...on)}let Tt=` \r
\f`;for(;at.length>0;){let jt=at[0];if(wD(jt)||(jt.data.value=jt.data.value.replace(RegExp(`^[${Tt}]+`),"")))break;at.shift()}for(;at.length>0;){let jt=at[at.length-1];if(wD(jt)||(jt.data.value=jt.data.value.replace(RegExp(`[${Tt}]+$`),"")))break;at.pop()}if(Oe instanceof HTMLAnchorElement&&lA(Oe.href)){let jt=at.find(Xle);jt?jt.href=Oe.href:at.push({data:{value:Oe.href,type:Ms.Normal},format:pt,notes:"",breakStart:!1,breakEnd:!1,href:Oe.href})}return at.length>0&&(Ke=Oe,Jle.includes(Ke.tagName))&&(at[0].breakStart=!0,at[at.length-1].breakEnd=!0),at}(K,Q,oe))){if(Te.length===0)continue;let Me=Te.length===0||wD(Te[0])?Te[0]:function(Oe){var ze,We;let qe={value:(ze=Oe).map(at=>at.data.value).join(""),type:ze[0]?.data.type||Ms.Normal},Ke=new eoe(Oe[0].format);return{data:[[qe]],format:Ke,hyperlinks:[[(We=Oe,(We.find(at=>lA(at.href))?.href??null)||null)]],notes:[[Oe.map(at=>at.notes).filter(at=>at.length>0).join(`
`)||null]],breakStart:!0,breakEnd:!0,isTable:!0,colCount:1}}(Te);ye.data.push(...Me.data),ye.format.push(Me.format),ye.notes.push(...Me.notes),ye.hyperlinks.push(...Me.hyperlinks),ye.width=Math.max(ye.width,Me.colCount)}return ye.height=ye.data.length,ye.data.length===0?null:ye}(a,L?t==="value"?"syno-value":"syno-formula":"text",K=>this.uiBridge.validateFontFamily(K)))&&(W.dom=r),R&&(!a||!function(K){if(function(he,me){return/<font face="Times New Roman"|class="?Mso|style=(?:"[^"]*|'[^']*)\bmso-|\{[^}]*\bmso-|w:WordDocument/i.test(he)||/class="OutlineElement|id="?docs-internal-guid-/.test(he)}(K)){var Q;let he=K;return!((Q=jz(he=function(me,ye,Te){Te===void 0&&(Te=!1);let Me=me.lastIndexOf(ye);return Me>=0?me.slice(0,Me+(Te?0:ye.length)):me}(he=function(me,ye,Te){Te===void 0&&(Te=!1);let Me=me.indexOf(ye);return Me>=0?me.slice(Me+(Te?ye.length:0)):me}(he,"<![if !vml]>"),"<![endif]>"))).length===1?Q[0]==="img":Q.length===3&&Q[0]==="span"&&Q[1]==="img"&&Q[2]==="span")}var oe=jz(K);if(oe.length===0)return!1;let se=CA.table;return se.includes(oe[0])&&se.includes(oe[oe.length-1])}(a.innerHTML))&&(W.file={file:R}),g){let K=oe=>({value:oe,type:Ms.Normal}),Q=function(oe){let se=0,he=!1,me=[],ye=oe.split(/\r?\n/);for(let Te of(ye.length>1&&ye[ye.length-1]===""&&ye.pop(),ye)){let Me=Te.split(" ");for(let Oe=0;Oe<Me.length;Oe++){let ze=Me[Oe];if(me[se]||(me[se]=[]),he){let We=me[se].length-1,{content:qe,isEnd:Ke}=w1(ze);me[se][We]+=(Oe===0?`
`:"")+qe,he=!Ke}else if(ze.charAt(0)==='"'){let{content:We,isEnd:qe}=w1(ze.slice(1));me[se].push(We),he=!qe}else me[se].push(ze)}he||(se+=1)}return me}(g).map(oe=>oe.map(K));W.text={data:Q,width:Q.reduce((oe,se)=>Math.max(se.length,oe),0),height:Q.length}}L&&(W.mark=L),this.emit("paste",W,t)}select(){let e=this.el;e.focus();let t=document.createRange();t.selectNodeContents(e);let r=window.getSelection();r&&(r.removeAllRanges(),r.addRange(t))}setClipboardData(e){if(e.clipboardData){let t=e.clipboardData;if(this.data.html)try{t.setData("text/html",this.data.html)}catch{}if(this.data.vnd)try{t.setData("application/x-vnd.synology.office.spreadsheet",this.data.vnd)}catch{}t.setData("Text",this.data.text),e.preventDefault()}e.stopPropagation(),this.clearData()}}function bD(n){let{dom:e,file:t,text:r,mark:i}=n;return{imageDom:e,htmlDom:e,text:r,file:t,mark:i}}class qz{constructor(e){this.hot=e,this.sheetId=null,this.range=null,this.isCut=!1,this.interactiveMode=!1,this.pasted=!1}getHot(){return this.hot}getSheetId(){return this.sheetId}getRange(){return this.range}isCutMode(){return this.isCut}getInteractiveMode(){return this.interactiveMode}isPasted(){return this.pasted}set(e,t){this.sheetId=e,this.range=t}setCutMode(e){this.isCut=e}setInteractiveMode(e){this.interactiveMode=e}setPasted(e){this.pasted=e}clear(){this.sheetId=null,this.range=null,this.isCut=!1,this.interactiveMode=!1,this.pasted=!1}isEmpty(){return!this.sheetId||!this.getRange()}}var Qle=B(13546),eue=B.n(Qle);class CD{constructor(e,t=window.devicePixelRatio){this.echartInstance=eue().init(e,void 0,{devicePixelRatio:t})}destroy(){this.echartInstance.dispose()}getCanvas(){return this.echartInstance.getDom().querySelector("canvas")}getDataURL(e){return this.echartInstance.getDataURL(e)}resize(e){this.echartInstance.resize(e)}draw(e){this.echartInstance.setOption(e.getEchartParameters(this.echartInstance.getWidth(),this.echartInstance.getHeight()),!0)}}class tue{constructor(e,t,r,i){this.sheet=e,this.table=[],this.cssCollection=[],this.baseAppUrl=i,this.newlineFormat=r,this.rowIndexes=Array.from({length:t.to.row-t.from.row+1},(a,g)=>g+t.from.row).filter(a=>!e.isHiddenRow(a)),this.colIndexes=Array.from({length:t.to.col-t.from.col+1},(a,g)=>g+t.from.col).filter(a=>!e.isHiddenCol(a))}getCell(e,t){let r=this.table[e][t];if(!r){let i=this.sheet.getMergePlugin().beforeGetCell({row:this.rowIndexes[e],col:this.colIndexes[t]});if(i){let a=Nh(this.rowIndexes,i.row),g=Nh(this.colIndexes,i.col);if(a>-1&&g>-1)return this.table[a][g]}}return r}output(){this._setup();let e={html:this._html(),text:this._text()};return this._clean(),e}_text(){let e="",t=this.table.length;for(let r=0;r<t;r++){let i="";for(let a=0;a<this.table[r].length;a++){a>0&&(e+=" ");let g=this.table[r][a],R=g?g.textDesc:null;(i=R?R.v:"").indexOf(`
`)===-1?e+=i:e+=`"${i.replace(/"/g,'""')}"`}r===t-1&&(i.length>0||e.length>0)||(e+=this.newlineFormat)}return e}_html(){return`<style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--></style><table border="1" ${this._style()}>${this._colgroup()}${this._tbody()}</table>`}_style(){return`style="${_D({"border-collapse":"collapse",border:"none","table-layout":"fixed",color:"#000000","font-size":"10pt"})}"`}_colgroup(){let e="<colgroup>";for(let t=0;t<this.colIndexes.length;t++)e+=`<col style="width: ${this.sheet.getColWidth(this.colIndexes[t])}px">`;return e+"</colgroup>"}_tbody(){this._buildCssCollection();for(let t=0;t<this.rowIndexes.length;t++){let r=this.rowIndexes[t];for(let i=0;i<this.colIndexes.length;i++){let a=this.colIndexes[i],g=this.table[t][i];g&&this._renderBorder(r,a,t,i,g)}}let e="<tbody>";for(let t=0;t<this.rowIndexes.length;t++)e+=this._tr(this.rowIndexes[t],this.table[t]);return e+"</tbody>"}_setup(){let e=this.sheet.getMergePlugin(),t=new Map,r=new Set;for(let i=0;i<this.rowIndexes.length;i++){let a=this.rowIndexes[i];this.table[i]=Array(this.colIndexes.length);for(let g=0;g<this.colIndexes.length;g++){let R=this.colIndexes[g],L=e.getMergedRange(a,R),W=L?`${L.from.row},${L.from.col}`:null;if(W){let Me=t.get(W);if(Me){Me.row===a&&Me.vCell.increaseColSpan(),Me.col===R&&Me.vCell.increaseRowSpan();continue}}let K=L?L.from.row:a,Q=L?L.from.col:R,oe=this.sheet.getSpillRange(K,Q);oe&&K===oe.from.row&&Q===oe.from.col&&r.add(`${K},${Q}`);let se=this.sheet.getDataAtCell(K,Q);if(Cr(se)&&oe&&!r.has(`${oe.from.row},${oe.from.col}`)){let Me=this.sheet.getCellFormulaValue(K,Q);se=Tp.error.isError(Me)?Me.message:Me}let he=this.sheet.getComputedCellStyle(K,Q),me=this.sheet.getCellTextDesc(K,Q),ye=this.sheet.getCellProperty(K,Q,"pivot"),Te=new rue({cfStyle:this.sheet.getCfPlugin().getComputedCfStyle(K,Q),note:this.sheet.getCellNote(K,Q),href:me?.l===!0?this.sheet.getCellHyperlinkState(K,Q)?.href??me.e:null,pivotStyle:ye?.style},se,he,me,1,1,this.baseAppUrl);L&&t.set(W,{row:a,col:R,vCell:Te}),this.table[i][g]=Te}}}_clean(){this.cssCollection.length=0,this.table.length=0}_buildCssCollection(){this.cssCollection.push({});let e=this.sheet.getWorkbook().getStyleManager();for(let t=1;t<e.styles.length;t++){let r=e.styles[t],i=r.getFont(),a=r.getAlignment(),g=r.getFill(),R={};i.isDefault()||(i.name&&(R["font-family"]=`"${i.name}"`),i.size&&(R["font-size"]=`${i.size}pt`),Rw(R,i)),a.isDefault()||(a.halign&&(R["text-align"]=a.halign),a.valign&&a.valign!==Oa.V_ALIGN&&(R["vertical-align"]=a.valign),a.wrap==="wrap"?(R["word-wrap"]="break-word",R["white-space"]="pre-wrap"):a.wrap==="clip"&&(R["word-wrap"]="normal",R["white-space"]="clip")),!g.isDefault()&&g.bg&&(R["background-color"]=`#${g.bg}`),this.cssCollection.push(R)}}_tr(e,t){let r=[`style="height: ${this.sheet.getRowHeight(e)}px"`],i=`<tr ${r.join(" ")}>`;for(let a=0;a<t.length;a++){let g=t[a];g&&(i+=g.toHTML(this,e,this.colIndexes[a]))}return i+"</tr>"}_renderBorder(e,t,r,i,a){let g=a.rowSpan,R=a.colSpan,L=El(a.model.pivotStyle?.border?.b??null,a.style?.getBorder().b??null);if((g>1||R>1)&&(L=this._resolveMergedBorder(e,t,g,R,L)),!Array.isArray(L))return;let W="1px solid ",K=a.css;if(L[1]&&(K["border-right"]=W+L[1]),L[2]&&(K["border-bottom"]=W+L[2]),L[3])if(i===0)K["border-left"]=W+L[3];else for(let Q=0;Q<g;Q++){let oe=this.getCell(r+Q,i-1);oe&&!oe.css["border-right"]&&(oe.css["border-right"]=W+L[3])}if(L[0])if(r===0)K["border-top"]=W+L[0];else for(let Q=0;Q<R;Q++){let oe=this.getCell(r-1,i+Q);oe&&(oe.css["border-bottom"]=W+L[0])}}_resolveMergedBorder(e,t,r,i,a){let g=null,R=null,L;if(i>1){let W=this.sheet.getComputedCellStyle(e,t+i-1).getBorder();!W.isDefault()&&W.b&&(g=W.b[1])}return r>1&&!(L=this.sheet.getComputedCellStyle(e+r-1,t).getBorder()).isDefault()&&L.b&&(R=L.b[2]),(g||R)&&(a=a?[a[0],a[1],a[2],a[3]]:[null,null,null,null],g&&(a[1]=g),R&&(a[2]=R)),a}}let nue={padding:"2px 4px","vertical-align":Oa.V_ALIGN};class rue{constructor(e,t,r,i,a,g,R){this.model=e,this.value=t,this.style=r,this.textDesc=i,this.rowSpan=a,this.colSpan=g,this.baseAppUrl=R,this.css=Object.create(nue)}increaseRowSpan(){this.rowSpan++}increaseColSpan(){this.colSpan++}_mergeStyle(e){let t=this.css;if(this.model.pivotStyle){let a=this.model.pivotStyle;a.font&&Rw(t,a.font),a.fill?.bg&&(t["background-color"]=`#${a.fill.bg}`)}Vs(t,e.cssCollection[this.style.getIndex()]);let r=this.model.cfStyle;r&&(Rw(t,r),r.bgColor&&(t["background-color"]=`#${r.bgColor}`));let i=this.textDesc?.c;return i&&(t.color=i),!this.textDesc||this.textDesc.t!==My.NUM||"text-align"in t||(t["text-align"]="right"),t}_style(e){let t=_D(this._mergeStyle(e));return t?` style="${wo(t)}"`:""}_attr(e,t,r){let i=this._style(e);this.rowSpan>1&&(i+=` rowspan="${this.rowSpan}"`),this.colSpan>1&&(i+=` colspan="${this.colSpan}"`);let a=this.value;!Cr(a)&&(be(a,this.style)?i+=` data-sheets-formula="${wo(Xu(a,t,r))}"`:i+=` data-syno-value="${wo(JSON.stringify(a))}"`,this.textDesc&&(i+=` data-syno-repr="${wo(this.textDesc.v)}"`));let g=this.style.getNumberFormat();g.fc&&!g.isDefault()&&(i+=` data-syno-numberformat="${wo(g.fc)}"`),this.style.getQuotePrefix()&&(i+=' data-syno-quote="true"');let R=this.model.note;return R&&(i+=` data-sheets-note="${wo(R)}"`),i}toHTML(e,t,r){let i=this.textDesc,a="";return i&&(a=i.t===My.RICH_TEXT?this._getRichTextHTML():Yz(i.v),i.l&&(a=this._addLinkHTML(a))),`<td${this._attr(e,t,r)}>${a}</td>`}_addLinkHTML(e){let t="#dlink=",r=this.model.href;if(r?.startsWith(t))r=`${this.baseAppUrl}${r.slice(t.length)}`;else if(r?.startsWith("#")){let i=new URL(location.href);i.hash=r,r=i.href}return`<a href="${r}">${e}</a>`}_getRichTextHTML(){return this.value.v.reduce((e,t)=>{let r=t.s,i=this.model.cfStyle,a="";if(r||i){let g={};r&&Rw(g,r),i&&Rw(g,i),a=` style="${_D(g)}"`}return e+`<span${a}>${Yz(t.tx)}</span>`},"")}}function Rw(n,e){e.color&&(n.color=`#${e.color}`),e.bold&&(n["font-weight"]="bold"),e.italic&&(n["font-style"]="italic"),e.strike&&(n["text-decoration"]="line-through"),e.underline&&(n["text-decoration"]?n["text-decoration"]+=" underline":n["text-decoration"]="underline")}function _D(n){let e="";for(let t in n)e+=`${t}:${n[t]};`;return e}class iue{constructor(e,t){this.drawingView=e,this.drawing=t}output(){let e=document.createElement("img");e.setAttribute("src",this.drawingView.getExternalURLSync());let t=this.drawing.position,r=this.drawingView.getAbsolutePosition(t);return r&&(e.style.width=r.width+"px",e.style.height=r.height+"px",e.setAttribute("data-syno-pos-type",`${t.type??vl.Absolute}`)),e.outerHTML}}class oue{constructor(e,t,r,i){this.chartView=e,this.chart=t,this.sheetId=r,this.objectId=i}output(){let e=this.chartView.getAbsolutePosition(this.chart.position),t=e.width+2,r=e.height+2,i=document.createElement("div");i.style.width=`${t}px`,i.style.height=`${r}px`,document.body.appendChild(i);let a=new CD(i);a.draw(this.chart.chartInfo);let g=a.getCanvas(),R=g.getContext("2d");R.strokeStyle="#929496",R.strokeRect(0,0,g.width,g.height),R.imageSmoothingEnabled=!1;let L=document.createElement("img");return L.setAttribute("src",g.toDataURL("image/png")),L.style.width=e.width+2+"px",L.style.height=e.height+2+"px",a.destroy(),document.body.removeChild(i),L.setAttribute("data-syno-pos-type",`${this.chart.position.type??vl.Absolute}`),L.setAttribute("data-syno-chart-info",JSON.stringify({objectId:this.objectId,sheetId:this.sheetId,chartId:this.chart.id,chartObj:this.chart.chartInfo.getChartCfg()})),L.outerHTML}}function Yz(n){return wo(n).replaceAll(`
`,"<br>")}class qh extends ns{static#e=this.pluginName="synoCopyPaste";constructor(e){super(e),this.pasteValueOnly=!1,this.proxy=new Zle(this.getHot().rootElement,this.getHot().getUIBridge()),this.copiedInfo=new qz(this.getHot())}getProxy(){return this.proxy}initHook(){let e=this.getHot();e.addHook("afterCreateRow",(t,r,i)=>this.afterCreateRowCol(t,"row",r,i)),e.addHook("afterCreateCol",(t,r,i)=>this.afterCreateRowCol(t,"col",r,i)),e.addHook("afterRemoveRow",(t,r,i)=>this.afterRemoveRowCol(t,"row",r,i)),e.addHook("afterRemoveCol",(t,r,i)=>this.afterRemoveRowCol(t,"col",r,i)),e.addHook("beforeKeyDown",t=>this.onBeforeKeyDown(t)),e.addHook("afterShowSheet",()=>this.afterShowSheet()),e.addHook("onMoveSelection",async(t,r)=>{let i=this.getSheet(),a=i.sheetId,g=i.getMergePlugin().getMergedRange(r.from.row,r.from.col);g&&g.includesRange(r)&&(t.isSingle()||i.getMergePlugin().getMergedRange(t.from.row,t.to.row)?.isEqual(t))&&(r=g),await this.getAction().moveRange(a,t,a,r,!0)&&(e.selectRanges([r.toArray()]),e.fastRender())}),e.addHook("onRootDragOver",t=>this.onRootDragOver(t)),e.addHook("onRootDrop",t=>this.onRootDrop(t)),this.registerEventListener()}registerEventListener(){this.proxy.on("copy",this.onCopy,this).on("cut",this.onCut,this).on("paste",this.onPaste,this)}destroy(){this.proxy.off("copy",this.onCopy,this).off("cut",this.onCut,this).off("paste",this.onPaste,this),this.proxy.destroy(),super.destroy()}afterCreateRowCol(e,t,r,i){let a=this._getCopiedInfo();if(a.isEmpty()||a.getSheetId()!==e)return;let g=a.getRange();r<=g.from[t]?(g.from[t]+=i,g.to[t]+=i):r<=g.to[t]&&this.reset(!1)}afterRemoveRowCol(e,t,r,i){let a=this._getCopiedInfo();if(a.isEmpty()||a.getSheetId()!==e)return;let g=a.getRange();r>g.to[t]||(r+i-1<g.from[t]?(g.from[t]-=i,g.to[t]-=i):this.reset(!1))}onBeforeKeyDown(e){if(!this.isTargetReady()||this.isEditorEnabled()||te(e))return;let t=!je(),r=e.metaKey||e.ctrlKey&&t,i=e.shiftKey,a=e.keyCode,g=r&&(a===J.C||t&&a===J.INSERT),R=r&&a===J.X||t&&i&&a===J.DELETE,L=r&&a===J.V||t&&i&&a===J.INSERT;if(g||R){if(!this.getHot().getUIBridge().isCopyable())return void e.preventDefault();this.setCopyableContent(),q(e)}else if(L){if(this.pasteValueOnly=i&&a===J.V,!this.canTriggerPaste(e))return;this.proxy.select(),q(e)}else a!==J.ESCAPE||this._getCopiedInfo().isEmpty()||(this.reset(),e.preventDefault(),e.stopPropagation(),q(e))}canTriggerPaste(e){return!(e.altKey&&!(je()&&this.pasteValueOnly)||ue()&&this.pasteValueOnly&&!e.altKey)}isTargetReady(){return!!(this.getHot()?.getSelectedRange()||this.getCopyableDrawingView())}getCopyableDrawingView(){let e=this.getHot().getPlugin("synoDrawingController"),t=e.getActiveImage();if(t&&t.isCopyable())return this.getSheet().getDrawingPlugin().getImageJSONById(t.id)?t:null;let r=e.getActiveChart();return r&&r.isCopyable()&&this.getSheet().getDrawingPlugin().getChartJSONById(r.id)?r:null}setCopyableContent(){let e=this.getCopyableRange(),t=this.getCopyableDrawingView(),r=this.getSheet();this.clearLastCopied(),e&&this._getCopiedInfo().set(r.sheetId,e);let i=this.proxy,a={id:this.getHot().getUIBridge().getObjectId(),tid:r.id};if(t){let g=r.getDrawingPlugin(),R=g.getChartJSONById(t.id)||g.getImageJSONById(t.id);if(R){let L=t.getSerializer(R);i.setData("html",L.output()),i.setData("text",Ve()?" ":""),i.setData("vnd",JSON.stringify(a))}}else if(e){let g=new tue(r,e,Pe==="windows"?`\r
`:`
`,this.getHot().getUIBridge().getBaseAppURL()).output();i.setData("html",g.html),i.setData("text",g.text),i.setData("vnd",JSON.stringify({range:e?.toArray(),...a}))}i.select()}clearLastCopied(){let e=this._getCopiedInfo(),t=e.getSheetId();this.getSheet().sheetId!==t&&qh._clearLastCopiedSelection(e),e.clear()}onCopy(){if(this.getWorkbook().isHistoryMode())return;let e=this.getHot(),t=this._getCopiedInfo();t.setCutMode(!1),qh.setCopiedSelection(e,t.getRange(),!0),e.focusInputField(0)}onCut(){if(this.getWorkbook().isHistoryMode())return;let e=this.getHot();if(this.getWorkbook().isReadonly())return this.onCopy();let t=this._getCopiedInfo();t.setCutMode(!0);let r=t.getRange(),i=this.getCopyableDrawingView();qh.setCopiedSelection(e,r,!0),!r&&i&&this.getHot().getPlugin("synoDrawingController").removeActiveDrawing(),e.focusInputField(0)}async onPaste(e,t){let r;if(this.getWorkbook().isHistoryMode())return;let i=this.getHot();if(this.getWorkbook().isReadonly())return;t||(t=this.pasteValueOnly?"value":"all");let a=this._selectContent(e,t);a&&(a?.chart?a.chart?.objectId===this.getHot().getUIBridge().getObjectId()?r=this.triggerPasteChart(a):this.triggerPasteImage(a):a?.src||a?.file?this.triggerPasteImage(a):r=this.triggerPaste(a,t,e.mark)),this.pasteValueOnly=!1,Promise.resolve(r).finally(()=>i.focusInputField(0))}onRootDragOver(e){!this.getWorkbook().isHistoryMode()&&(e.preventDefault(),e.stopPropagation(),e.dataTransfer&&(e.dataTransfer.dropEffect="copy"))}onRootDrop(e){this.getWorkbook().isHistoryMode()||(e.preventDefault(),e.stopPropagation(),this.proxy.onDrop(e))}_selectContent(e,t){switch(t){case"all":case"transpose":return e.file||e.src||e.dom||e.text;case"value":return(e.mark?e.dom:null)||e.text;case"format":return e.dom}}_getPastedArea(e,t,r){let i=this.getHot().getSelectedRange(),a=i.getTopLeftCorner(),g=i.getBottomRightCorner(),R=this.getSheet();if(I7(r)&&!i.isSingle()&&!(R.getMergePlugin().isMultipleCells(i)??!0))return{start:a,end:g};let L=e==="format"?r.font:t,W=L.length,K=L.reduce((me,ye)=>Math.max(ye.length,me),0),Q=0,oe=g.col-a.col+1;for(let me=a.row;me<=g.row;me++)!R.isFilteredRow(me)&&Q++;if(W>0&&K>0&&(e!=="format"||i.isSingle()||R.getMergePlugin().isMerged(i))){let me=Math.floor(oe/K);Q=Math.max(Math.floor(Q/W),1)*W,oe=Math.max(me,1)*K}let se=a.col+oe-1,he=a.row;for(let me=Q-1;me>0;)he++,!R.isFilteredRow(he)&&me--;return{start:a,end:{row:he,col:se}}}async _getRangeFormat(e){let t=this.getSheet();return(await this.getDataBridge().getAutofillObject(t.sheetId,e.from,e.to,["format"],"down",!0))?.format}async triggerPasteChart(e){let t=this.getHot().getPlugin("synoDrawingController"),{top:r,left:i}=t.getInsertPosition(),{height:a,width:g,type:R}=e;if(a===void 0||g===void 0||R===void 0)return;let L=t.createDrawingPosition({top:r,left:i,height:a,width:g},R),W=e.chart?.chartObj;W&&await this.getAction().insertChart(this.getSheet().sheetId,pe(),L,W)}triggerPasteImage(e){setTimeout(()=>this.getHot().getUIBridge().insertImage(e),0)}async triggerPaste(e,t,r){let i=this.getHot();if(!i.selections.multiSelections.isSelected()||this.getWorkbook().isReadonly())return;t=t||"all";let a=await this._getCopiedInfoByMark(r),g=a.isCutMode()&&t==="all"?await this.handleCutPaste(a):await this.handleCopyPaste(e,t,a);g&&(a.setCutMode(!1),a.getInteractiveMode()!=="repeat"&&qh._clearLastCopiedSelection(a),a.setPasted(!0),i.selectRanges([g.toArray()]),i.render())}async handleCutPaste(e){let t=this.getHot().getSelectedRange();if(!t)return null;let r=e.getSheetId(),i=e.getRange(),a=this.getSheet().sheetId,g=t.clone().normalize();return await this.getAction().isMerged(r,i)&&await this.getAction().isMerged(a,t)||(g.to.row=g.from.row+i.getHeight()-1,g.to.col=g.from.col+i.getWidth()-1),await this.getAction().moveRange(r,i,a,g)?g:null}async handleCopyPaste(e,t,r){let i=t!=="format",a=t!=="value",g=["all","transpose"].includes(t),R=!1,L=e&&e.data,W=null,K=g&&e?.notes?e.notes:null,Q=null,oe=null,se=g&&e?.hyperlinks?e.hyperlinks.map(We=>We.map(qe=>qe?{display:qe,location:qe}:null)):null,he=[];if(L&&(ky(L,We=>{We&&(We.type===Ms.RichText?(We.value=yo.fromJSON(We.value),We.type=Ms.SheetValue):We.type===Ms.Normal&&be(We.value)&&(We.value=this.getWorkbook().getLocale().getLocaleConverter().normalizeFormula(We.value)))}),hA(L,e.width)),K&&hA(K,e.width),a&&!r.isEmpty()&&this.getWorkbook().hasSheet(r.getSheetId())){let We=this.getDataBridge(),qe=r.getSheetId(),Ke=r.getRange(),{from:{row:at,col:gt},to:{row:pt}}=Ke,Tt=await We.getRowInfo(qe),jt=await We.getColInfo(qe),on=Array.from({length:Ke.getHeight()},(kt,Pt)=>Pt).filter(kt=>!Tt[kt+Ke.from.row]?.hidden),hn=Array.from({length:Ke.getWidth()},(kt,Pt)=>Pt).filter(kt=>!jt[kt+Ke.from.col]?.hidden),un=await We.getMergedOverlap(qe,[Ke]);un.forEach(kt=>{kt.shift("row",-at),kt.shift("col",-gt)});let an=await this._getInternalData(r,!1);R=e===null||function(kt,Pt,mn){if(!kt||!Pt)return kt===Pt;if(kt.length!==Pt.length)return!1;let Zt=kt.length;for(let dn=0;dn<Zt;dn++)if(kt[dn].length!==Pt[dn].length)return!1;for(let dn=0;dn<Zt;dn++)for(let fn=0,er=kt[dn].length;fn<er;fn++)if(!mn(kt[dn][fn],Pt[dn][fn]))return!1;return!0}(Jz(Xz(function(kt,Pt,mn,Zt){if(!kt)return kt;let dn=Array(Pt.length);for(let fn=0;fn<Pt.length;fn++){dn[fn]=Array(mn.length);for(let er=0;er<mn.length;er++)dn[fn][er]=kt[Pt[fn]][mn[er]]}return Zt.forEach(fn=>{let er=Xs(Pt,fn.from.row),yr=Xs(mn,fn.from.col);(Pt[er]!==fn.from.row||mn[yr]!==fn.from.col)&&(er>Pt.length||Pt[er]>fn.to.row||yr>mn.length||mn[yr]>fn.to.col||(dn[er][yr]=kt[er][yr]))}),dn}(an,on,hn,un),Ke,on,hn)),Jz(L),(kt,Pt)=>!kC(kt,Pt));let Ut=await We.getFilteredRows(qe,at,pt);if(R){let kt=await We.getAutofillObject(qe,Ke.from,Ke.to,[...LV,"tableStyle"],"down",!0);if(kt){let{full:Pt}=No([Ke],g?await We.listPivotTableLocations(qe):[]);if(a&&(W=this.mergeTableStyles(kt.format,Ke,kt.tableStyle??[],g?Pt:[]),r.getSheetId()===this.getSheet().sheetId&&(delete W.defaultColWidth,delete W.defaultRowHeight)),g){K=kt.notes,Q=kt.validation,oe=kt.cf,se=kt.hyperlink;let mn=this.getHot().getSelectedRange().getTopLeftCorner(),Zt={row:mn.row-Ke.from.row,col:mn.col-Ke.from.col};he=await this.createCopiedPivotTables(Pt,Zt)}if(i&&an){let mn=[];for(let Zt=at;Zt<=pt;Zt++)Ut[Zt-at]||mn.push(Zt-at);L=Xz(mn.map(Zt=>an[Zt]),Ke,mn,void 0)}}}}else L||(L=await this._getInternalData(r,t==="value"));if(a&&!W&&e?.format){let We=(W=e.format.reduce((qe,Ke)=>(Ao(Ke.run(),(at,gt)=>{qe[gt]=(qe[gt]||[]).concat(at)}),qe),{})).font.reduce((qe,Ke)=>qe<Ke.length?Ke.length:qe,0);[...Y_,"mergeCells"].forEach(qe=>hA(W[qe],We))}if(t==="transpose"){if(L&&ky(L=Np(L),We=>{We&&We.type===Ms.R1C1&&(We.value=Jte(We.value))}),W&&(Y_.forEach(We=>{W[We]=Np(W[We])}),W.mergeCells)){let We=Np(W.mergeCells);ky(We,(qe,Ke,at,gt)=>{qe&&(gt[Ke][at]=[qe[1],qe[0]])}),W.mergeCells=We}K&&(K=Np(K)),Q&&(Q.validIds=Np(Q.validIds)),se&&(se=Np(se))}let{start:me,end:ye}=this._getPastedArea(t,L,W),Te=oa(me.row,me.col,ye.row,ye.col),Me=await this._getRangeFormat(Te),Oe=this.handleDataFormat(L,W,Me,t),ze=this.parseHyperlinks(L,se,t);return await this.getAction().pasteRange(this.getSheet().sheetId,Te,{data:Oe.data??void 0,format:Oe.format,notes:K??void 0,validation:Q??void 0,cf:oe??void 0,hyperlink:ze??void 0},he)?Te:null}mergeTableStyles(e,t,r,i){i===void 0&&(i=[]);let a=t.getTopLeftCorner(),g=[t];for(let{location:R}of i)for(let L of Ay(R))g=As(g,L).newRanges;for(let R of g)R.forAll((L,W)=>{let K=L-a.row,Q=W-a.col,oe=r[K]?.[Q];oe&&(oe.font&&(e.font[K][Q]={...oe.font,...e.font[K][Q]}),oe.fill&&(e.fill[K][Q]={...oe.fill,...e.fill[K][Q]}),oe.border&&(e.border[K][Q]={b:El(oe.border.b,e.border[K][Q]?.b)}))});return e}async createCopiedPivotTables(e,t){let r=[];if(e.length===0)return r;let i=this.getDataBridge(),a=e.reduce((W,K)=>{let{id:Q,cacheId:oe}=K;return W.tableIds.push(Q),W.cacheIds.push(oe),W},{tableIds:[],cacheIds:[]}),{tables:g,caches:R}=await i.pickPivot(a),L=this.getSheet().sheetId;for(let{id:W,cacheId:K}of e){let Q=g[W],oe=R[K];Q&&oe&&r.push(this.getAction().createCopiedPivotTableJsons({tableJson:Q,cacheJson:oe},L,t))}return r}_getCopiedInfo(){return this.copiedInfo}async _getCopiedInfoByMark(e){let t=this._getCopiedInfo(),r=t;if(t.isEmpty()&&e&&e.id===this.getHot().getUIBridge().getObjectId()){let i=new qz(this.getHot());i.set(`sh_${e.tid}`,sn.fromArray(e.range));let a=i.getSheetId();if(this.getWorkbook().hasSheet(a)&&!i.isEmpty()){let{rowCount:g,colCount:R}=await this.getDataBridge().getSheetDimension(a),L=i.getRange(),W=g-1,K=R-1;L.from.row<=W&&L.from.col<=K&&L.to.row<=W&&L.to.col<=K&&(r=i)}}return r}getCopyableRange(){let e=this.getHot().getMultiSelectedRange().map(i=>i.toArray());if(e.length===0)return null;let t=cA(e),r=t.length===1?t[0]:e[e.length-1];return Ap.fromArray(r).clone().normalize()}handleDataFormat(e,t,r,i){if(!e||i==="format")return{data:null,format:t};let a=Array(e.length),g=[],R=this.getWorkbook().getLocale().getInputParser();for(let L=0;L<e.length;L++){a[L]=Array(e[L].length);for(let W=0;W<e[L].length;W++){let K,Q=e[L][W];if(!Q){a[L][W]=null;continue}let{value:oe,type:se}=Q,he=r?.numberFormat?.[L]?.[W]?.fc,me=t?.numberFormat?.[L]?.[W]?.fc;if(zs(oe)?oe=Ie(Se(oe)):Zr(oe)&&oe.v.forEach(ye=>{ye.tx&&(ye.tx=Ie(Se(ye.tx)))}),se===Ms.R1C1)oe={formula:oe,type:se};else if(se===Ms.Normal&&zs(oe)&&(oe=oe.trim(),t||he!=="@")){let ye=R.parse(oe);ye&&({v:oe,fc:K}=ye)}a[L][W]=oe,Ne(t?me:he)&&g.push([L,W,K??null])}}if(g.length>0)for(let[L,W,K]of(t??=r,t.numberFormat??=[],g))t.numberFormat[L]??=[],t.numberFormat[L][W]={fc:K};return{data:a,format:t}}parseHyperlinks(e,t,r){if(r!=="format"){if(t??=[[]],!e||r==="value")return t;for(let i=0;i<e.length;i++){t[i]??=[];for(let a=0;a<e[i].length;a++){if(t[i][a])continue;t[i][a]=null;let g=e[i][a];g&&g.type===Ms.Normal&&zs(g.value)&&(t[i][a]=f6(Ie(Se(g.value)).trim())||null)}}return t}}static setCopiedSelection(e,t,r){return b1(e)?._setCopiedSelection(t,r)}static _clearLastCopiedSelection(e,t){return qh.setCopiedSelection(e.getHot(),null,t)}_setCopiedSelection(e,t){let r=this.getHot();r.selections.copy.cellRange=e,t===!0&&r.selectionView.updateSelection(r.selections.copy)}afterShowSheet(){let e=this.getHot().selections.copy,t=null,r=this._getCopiedInfo();r.getSheetId()!==this.getSheet().sheetId||r.isPasted()||(t=r.getRange()),e.cellRange=t}async _getInternalData(e,t){let r=e.getSheetId();if(!e.getHot().getDataBridge().getWorkbook().hasSheet(r))return[];let{from:i,to:a}=e.getRange(),{rowCount:g,colCount:R}=await e.getHot().getDataBridge().getSheetDimension(r),[L,W,K,Q]=a6(i,a,g,R),oe={row:L,col:W},se={row:K,col:Q},he=this.getDataBridge(),me=await he.getRangeData(r,oe,se),ye=await he.getRangeStyle(r,oe,se),Te=t?await he.getRangeCellByKey(r,oe,se,["renderDesc"]):[];return Ed(K-L+1,Q-W+1,(Me,Oe)=>{let ze=_a(me[Me][Oe])?yo.fromJSON(me[Me][Oe]):me[Me][Oe],We=ye[Me][Oe],qe=We?.quoteprefix!==!0&&be(ze);return t?qe?{value:Te[Me][Oe].renderDesc?.v??"",type:Ms.Normal}:{value:ze,type:Ms.SheetValue}:{value:ze,type:qe?Ms.R1C1:Ms.SheetValue}})}reset(e){e===void 0&&(e=!0);let t=this.isInteractiveMode();if(t)Kz.cancelInteractive(this.getHot());else{let r=this._getCopiedInfo();qh._clearLastCopiedSelection(r,e),r.clear()}this.getHot().getUIBridge().onResetCopy(t)}getCopyFormatController(){return Kz}isInteractiveMode(){return!!this._getCopiedInfo().getInteractiveMode()}isInternalSelected(){let e;return this._getCopiedInfo().isEmpty()||(e=this.getHot().selections.copy),!!e&&!e.isEmpty()}isEditorEnabled(){let e=this.getHot().getActiveEditor();if(e&&e.isOpened())return!0;if(this.getWorkbook().isReadonly()){let t=e.getInputPair(),r=window.getSelection(),i=r&&r.rangeCount&&r.getRangeAt(0).commonAncestorContainer;return!!(i&&t&&t.getEl()===i)}return!1}}let Kz=new class{constructor(){this.lastPastedCoords=null,this.selectionHookHandler=null}interactive(n,e){let t=n.getSelectedRange();if(!t)return;let r=b1(n);if(!r)return;let i=r._getCopiedInfo(),a=i.getInteractiveMode();i.setInteractiveMode(e),a===!1&&(t=t.clone().normalize(),i.set(n.sheetId,t),qh.setCopiedSelection(n,t,!0),this.addSelectionHook(n))}removeSelectionHook(n){this.selectionHookHandler&&n.removeHook("afterSelectionEnd",this.selectionHookHandler)}addSelectionHook(n){this.removeSelectionHook(n),this.selectionHookHandler=e=>{this._selectCopyFormat(n,e)},n.addHook("afterSelectionEnd",this.selectionHookHandler)}cancelInteractive(n){this.removeSelectionHook(n),this.lastPastedCoords=null;let e=b1(n);if(e){let t=e._getCopiedInfo();qh._clearLastCopiedSelection(t,!0),t.clear()}}_selectCopyFormat(n,e){if(!e)return;let t=e.getTopLeftCorner(),r=this.lastPastedCoords;if(r&&r.row===t.row&&r.col===t.col)return;this.lastPastedCoords=t;let i=b1(n);i?.triggerPaste(null,"format").then(function(){i._getCopiedInfo().getInteractiveMode()!=="repeat"&&i.reset()})}};function Xz(n,e,t,r){if(!n)return null;let{from:{row:i,col:a}}=e,g=[];for(let R=0;R<n.length;R++){let L=i+(t?t[R]:R),W=[];for(let K=0;K<n[R].length;K++){let Q=n[R][K];if(!Q){W.push(void 0);continue}let oe=a+(r?r[K]:K),{value:se,type:he}=Q;he===Ms.R1C1&&(se=Xu(se,L,oe)),W.push({value:se,type:he})}g.push(W)}return g}function Jz(n){if(!Array.isArray(n))return null;let e=t=>t?t.value:null;return n.map(t=>t.map(e))}function b1(n){return n.getPlugin("synoCopyPaste")}class aue extends ns{static#e=this.pluginName="synoDragToScroll";constructor(e){super(e),this.dragToScrollListening=!1,this.timer=null,this.ctx=null,this.loopScrollRef=this.loopScroll.bind(this)}initHook(){let e=this.getHot();e.addHook("afterOnCellMouseDown",t=>{if(Da(t))return;let r=this.getHot().selections.multiSelections.getActive()?.cellRange?.type;this.setupListening({disableScrollVertical:!!r&&(r&qr.col)>0,disableScrollHorizontal:!!r&&(r&qr.row)>0})}),e.addHook("afterFormulaSelect",()=>{let t=this.getHot().selections.formulaSelections.getActive()?.cellRange?.type;this.setupListening({disableScrollVertical:!!t&&(t&qr.col)>0,disableScrollHorizontal:!!t&&(t&qr.row)>0})}),e.addHook("afterOnCellCornerMouseDown",t=>{Da(t)||this.setupListening()}),e.addHook("afterOnSelectionBorderMouseDown",t=>{Da(t)||this.setupListening({blScrollOnly:!0})}),e.addHook("afterManualMoveSetup",t=>this.setupListening({blScrollOnly:!0,disableScrollHorizontal:t==="row",disableScrollVertical:t==="col"})),e.addHook("onTargetMouseOver",t=>this.onMouseMove(t)),e.addHook("onTargetMouseUp",()=>this.onMouseUp())}onMouseUp(){this.dragToScrollListening&&(this.dragToScrollListening=!1,this.ctx=null)}onMouseMove(e){this.dragToScrollListening&&this.check(e.clientX,e.clientY)}setupListening(e){let{blScrollOnly:t=!1,disableScrollVertical:r=!1,disableScrollHorizontal:i=!1}=e===void 0?{}:e,a=this.getView(),g=a.rootElement.getBoundingClientRect(),R=a.getRangeBound(-1,-1,-1,-1);this.dragToScrollListening=!0,this.ctx={clientX:0,clientY:0,scrollDiffX:0,scrollDiffY:0,boundaries:{top:R.y+R.height,left:a.isRtl()?g.left+Uf:R.x+R.width,right:a.isRtl()?R.x:g.right-Uf,bottom:g.bottom-Uf},blScrollOnly:t,disableScrollVertical:r,disableScrollHorizontal:i,lastTimestamp:null}}check(e,t){let r=0,i=0,a=this.ctx;a&&(!a.disableScrollVertical&&(t<a.boundaries.top?i=t-a.boundaries.top:t>a.boundaries.bottom&&(i=t-a.boundaries.bottom)),!a.disableScrollHorizontal&&(e<a.boundaries.left?r=e-a.boundaries.left:e>a.boundaries.right&&(r=e-a.boundaries.right)),a.clientX=e,a.clientY=t,a.scrollDiffX=r,a.scrollDiffY=i,i===0&&r===0||this.timer||(this.timer=window.requestAnimationFrame(this.loopScrollRef)))}loopScroll(e){if(!this.dragToScrollListening||!this.ctx){this.timer&&(window.cancelAnimationFrame(this.timer),this.timer=null);return}this._scrollHolder(e),this.ctx.blScrollOnly||this._changeSelection(),setTimeout(()=>this.timer=window.requestAnimationFrame(this.loopScrollRef),0)}_changeSelection(){let e=this.getHot(),t=e.getPlugin("synoAutofill"),r=!!t&&t.isInProgress(),i=e.selections.formulaSelections.isInProgress(),a=null;if(!(a=r?e.selections.fill.cellRange?.clone():i?e.selections.formulaSelections.getActive()?.cellRange:e.getSelectedRange())||!this.ctx)return;let{scrollDiffX:g,scrollDiffY:R}=this.ctx,L={row:-1,col:-1},W=this.getView(),K=this.getSheet(),Q=W.isRtl()?g>0:g<0,oe=W.isRtl()?g<0:g>0;Q?(L.col=Math.max(e.getFirstVisibleCol()-1,0),e.selections.multiSelections.selectedHeader.col&&(L.row=K.countRows()-1)):oe&&(L.col=Math.min(W.getLastVisibleCol()+1,K.countCols()-1)),R<0?L.row=Math.max(e.getFirstVisibleRow()-1,0):R>0&&(L.row=Math.min(W.getLastVisibleRow()+1,K.countRows()-1));let se=a.to,he={row:L.row===-1?se.row:L.row,col:L.col===-1?se.col:L.col};(se.row!==he.row||se.col!==he.col)&&(r?t?.showBorder(he):i?e.selections.formulaSelections.moveSelect(he):e.selections.multiSelections.moveSelect(he))}_scrollHolder(e){if(!this.ctx)return;let{scrollDiffX:t,scrollDiffY:r}=this.ctx,i=0,a=0;t!==0&&(i=1e3*(t>0?1:-1)),r!==0&&(a=1e3*(r>0?1:-1));let g=(this.ctx.lastTimestamp?e-this.ctx.lastTimestamp:16.667)*.001,R=this.getView();R.scrollOffset(R.reverseIfRtl(i*g),a*g),this.ctx.lastTimestamp=e}}class sue extends ns{static#e=this.pluginName="synoFilter";constructor(e){super(e),this._hoverCoord=null,this._menuCoord=null}getFilterPlugin(){return this.getSheet().getFilterPlugin()}initHook(){let e=this.getHot();e.addHook("afterOnCellMouseOver",(t,r,i,a)=>this.afterOnCellMouseOver(t,r,i,a)),e.addHook("beforeOnCellMouseDown",t=>{Da(t)||this.showFilterMenu(t)}),e.addHook("beforeRefreshSelections",()=>this.beforeRefreshSelections())}afterOnCellMouseOver(e,t,r,i){if(!this.getFilterPlugin().hasDropdown(t.row,t.col))return void this._clearHover();let a=this.getView(),g=a.getViewPoint({x:e.pageX,y:e.pageY});i=r?a.getRangeViewBound(t.row,t.col,t.row,t.col):i;let R=this._getDropdownViewBound(t,i);if(!R||g.x<R.x||g.x>R.x+R.width||g.y<R.y||g.y>R.y+R.height)return void this._clearHover();this.isHovering(t.row,t.col)||(this._clearHover(),this._setHover(t.row,t.col))}showFilterMenu(e){if(this.clearMenu(),this.getWorkbook().isReadonly()||!this._hoverCoord)return;let t=this.getView(),r=this._hoverCoord,i=t.getRangeViewBound(r.row,r.col,r.row,r.col,!1),a=this._getDropdownViewBound(r,i);a&&(this._setMenu(r.row,r.col),this.getHot().getUIBridge().editor.filter.show(t.toPageBound(a),r),q(e),e.stopPropagation())}beforeRefreshSelections(){let e=this.getFilterPlugin().getActiveFilterJSON()?.range;this.getHot().selections.filter.setRange(e?sn.fromArray(e):null)}_setHover(e,t){this._hoverCoord={row:e,col:t},this.getView().rerenderFilterDropdown(e,t,!0)}_clearHover(){if(!this._hoverCoord)return;let{row:e,col:t}=this._hoverCoord;this._hoverCoord=null,this._menuCoord&&this._menuCoord.row===e&&this._menuCoord.col===t||this.getView().rerenderFilterDropdown(e,t,!1)}_setMenu(e,t){this._menuCoord={row:e,col:t},this.getView().rerenderFilterDropdown(e,t,!0)}clearMenu(){if(!this._menuCoord)return;let{row:e,col:t}=this._menuCoord;this._menuCoord=null,this.getView().rerenderFilterDropdown(e,t,!1)}isHovering(e,t){return!!this._hoverCoord&&this._hoverCoord.row===e&&this._hoverCoord.col===t}_getDropdownViewBound(e,t){let r=this.getView(),{x:i,y:a,width:g,height:R}=t;if(g<=0||R<=0)return null;let L=this.getSheet().getFreezePlugin(),{freezeWidth:W,freezeHeight:K}=r.getFreezeSize();return L.fixedColumnsLeft<=e.col&&i<W||L.fixedRowsTop<=e.row&&a<K||i>=r.getViewWidth()||a>=r.getViewHeight()?null:fA(t,r.viewport.getZoomLevel())}}function C1(n,e,t,r,i){return n.x>=e&&n.x<=r&&n.y>=t&&n.y<=i}class lue extends ns{static#e=this.pluginName="synoHideRowCol";constructor(e){super(e),this._hoverRecord=null}initHook(){let e=this.getHot();e.addHook("modifyTransformStart",(t,r)=>this.modifyTransformStart(t,r)),e.addHook("modifyTransformEnd",(t,r)=>this.modifyTransformEnd(t,r)),e.addHook("afterOnCellMouseOver",(t,r,i,a)=>this.afterOnCellMouseOver(t,r,i,a)),e.addHook("beforeOnCellMouseDown",t=>this.beforeOnCellMouseDown(t))}modifyTransformStart(e,t){let r=t.from.row,i=t.from.col;this.updateDelta(e,r,i)}modifyTransformEnd(e,t){let r=t.to.row,i=t.to.col;this.updateDelta(e,r,i)}updateDelta(e,t,r){let i=this.getSheet();if(e.row>0){for(;i.isHiddenRow(t+e.row);)if(e.row++,t+e.row>=i.countRows()){e.row=0;break}}else if(e.row<0){for(;i.isHiddenRow(t+e.row);)if(e.row--,t+e.row<0){e.row=0;break}}else if(e.col>0){for(;i.isHiddenCol(r+e.col);)if(e.col++,r+e.col>=i.countCols()){e.col=0;break}}else if(e.col<0){for(;i.isHiddenCol(r+e.col);)if(e.col--,r+e.col<0){e.col=0;break}}}afterOnCellMouseOver(e,t,r,i){if(t.row<0==t.col<0)return void this._clearHover();let a=this.getView(),g=10*a.viewport.getZoomLevel(),R=this.getSheet().getHiddenPlugin(),{x:L,y:W,height:K,width:Q}=i,oe=a.getViewPoint({x:e.pageX,y:e.pageY});t.row===-1?R.hasLeftArrow(t.col)&&C1(oe,L+Q-g,W,L+Q,W+g)?this._updateHover("col",t.col,1):R.hasRightArrow(t.col)&&C1(oe,L,W,L+g,W+g)?this._updateHover("col",t.col,-1):this._clearHover():t.col===-1&&(R.hasUpArrow(t.row)&&C1(oe,L,W+K-g,L+g,W+K)?this._updateHover("row",t.row,1):R.hasDownArrow(t.row)&&C1(oe,L,W,L+g,W+g)?this._updateHover("row",t.row,-1):this._clearHover())}beforeOnCellMouseDown(e){!this.getWorkbook().isReadonly()&&this._hoverRecord&&((this._hoverRecord.type==="row"?this._showRowsByClick:this._showColsByClick).call(this,this._hoverRecord.index+this._hoverRecord.delta,this._hoverRecord.delta),this._hoverRecord=null,q(e))}async _showRowsByClick(e,t){let r=e,i=[],a=this.getSheet(),g=a.getHiddenPlugin();for(;g.isHiddenRow(r);)a.isFilteredRow(r)||i.push(r),r+=t;t<0&&i.reverse();let R=new Oc(i).getResult().map(L=>new ta(L.from,L.to)).map(L=>nr.createFromRange(L,a)?.toSynoRange()).filter(ga);if(R.length!==0)return this.getAction().showRows(a.sheetId,R)}async _showColsByClick(e,t){let r=e,i=this.getSheet(),a=i.getHiddenPlugin();for(;a.isHiddenCol(r);)r+=t;let g=Math.min(e,r-t),R=Math.max(e,r-t),L=nr.createFromRange(new na(g,R),i)?.toSynoRange();if(L)return this.getAction().showCols(this.getSheet().sheetId,[L])}_updateHover(e,t,r){if(this._hoverRecord){if(this._hoverRecord.type===e&&this._hoverRecord.index===t&&this._hoverRecord.delta===r)return;this._clearHover()}this._hoverRecord={type:e,index:t,delta:r};let i=this.getView();e==="row"?i.rerenderRowSpreader(t,r===1,!0):i.rerenderColSpreader(t,r===1,!0)}_clearHover(){if(!this._hoverRecord)return;let e=this.getView();this._hoverRecord.type==="row"?e.rerenderRowSpreader(this._hoverRecord.index,this._hoverRecord.delta===1,!1):e.rerenderColSpreader(this._hoverRecord.index,this._hoverRecord.delta===1,!1),this._hoverRecord=null}}let SD=function(n){return c7(n,4)},Zz="syno-o-sh-drawing-active",Qz="syno-o-sh-drawing-moving",_1={RIGHT:5,BOTTOM:5};function eW(n,e){let t=Math.round(n.left*e),r=Math.round(n.top*e);return{left:t,top:r,width:Math.round(n.width*e),height:Math.round(n.height*e)}}function tW(n){return{top:n.offsetTop,left:n.offsetLeft,height:n.clientHeight,width:n.clientWidth}}function ID(n,e){let t=eW(e,n.viewport.getZoomLevel());return t.left+=n.viewport.getLeftOffset(),t.top+=n.viewport.getTopOffset(),t}function nW(n,e){e===void 0&&(e="transparent"),n.style.display="block",n.style.borderColor=e}function xD(n){n.style.display="none"}function TD(n,e){return e=SD(e),e.left-=n.viewport.getLeftOffset(),e.top-=n.viewport.getTopOffset(),eW(e,1/n.viewport.getZoomLevel())}class rW{constructor(e,t,r){var i,a;this.id=e,this.sheetId=t,this.controls={},this.border={},this.state=null,this.hot=r,this.dom=document.createElement("div"),i=this.dom,A(i,"syno-o-sh-drawing-overlay"),this.wrapper=document.createElement("div"),a=this.wrapper,A(a,"syno-o-sh-drawing-wrapper"),this.dom.appendChild(this.wrapper),this.dom.appendChild(this.createBorder()),this.dom.appendChild(this.createControl()),this.selectionDom=null,this.selectionColor=null}destroy(){X(this.dom)&&this.dom.remove()}hasOverlay(e){return e===this.dom}createControl(){let e=document.createElement("div");A(e,"syno-o-sh-drawing-control");let t=document.createElement("div");return A(t,"handle"),Sr(["nw","ne","se","sw","n","e","s","w"],r=>{let i=t.cloneNode();A(i,r+"-handle"),i.style.cursor=r+"-resize",this.controls[r]=i,e.appendChild(i)}),e}createBorder(){let e=document.createElement("div");A(e,"syno-o-sh-drawing-border");let t=document.createElement("div");return A(t,"border"),Sr(["n","e","s","w"],r=>{let i=t.cloneNode();A(i,r+"-draggable"),this.border[r]=i,e.appendChild(i)}),e}appendSelectionDom(){let e=function(){let t=document.createElement("div");return A(t,"syno-o-sh-drawing-selection"),xD(t),t}();return this.dom.appendChild(e),e}ensureSelectionDom(){return this.selectionDom??=this.appendSelectionDom()}removeSelectionDom(){this.selectionDom&&(this.selectionDom.remove(),this.selectionDom=null)}isActive(){var e;return e=this.getActiveDom(),E(e,Zz)}setActive(e){(e?function(t,r){return A(t,r)}:function(t,r){return u(t,r)})(this.getActiveDom(),[Zz,"grabbable"]),this.updateSelectionDom()}setMoving(e){var t,r;e?(t=this.getActiveDom(),A(t,Qz)):(r=this.getActiveDom(),u(r,Qz))}updateSelection(e){this.selectionColor=e,this.updateSelectionDom()}updateSelectionDom(){let e=this.isActive();!e&&this.selectionColor?this._showSelection(this.selectionColor):e?this._hideSelection():this.removeSelectionDom()}_showSelection(e){nW(this.ensureSelectionDom(),e)}_hideSelection(){this.selectionDom&&xD(this.selectionDom)}getActiveDom(){return this.dom}afterDrag(){let e=this.getHiderPositionOfActiveDom();this.resize(e)}toActivePosition(e){return e}toHiderPosition(e){return e}getAbsolutePosition(e){return this.hot.view.viewport.getDrawingPositionConverter().toAbsolutePosition(e)}getAbsolutePositionInView(e){let t=this.getAbsolutePosition(e);return ID(this.hot.view,t)}getRenderPositionInView(e){return this.limitationCheck(this.getAbsolutePositionInView(e))}saveStatus(e,t){t===void 0&&(t="w"),this.state={mouseX:e.clientX,mouseY:e.clientY,controlDirection:t,viewPosition:this.getViewPosition(this.dom)}}clearStatus(){this.state=null}getAbsolutePositionOfDom(e){let t=this.getViewPosition(e);return e===this.getActiveDom()&&(t=this.toHiderPosition(t)),TD(this.hot.view,t)}getHiderPositionOfActiveDom(){let e=this.getActiveDom(),t=this.getViewPosition(e);return this.toHiderPosition(t)}getDelta(e){return this.state?{x:e.clientX-this.state.mouseX,y:e.clientY-this.state.mouseY}:{x:0,y:0}}limitationCheck(e){let t=this.hot.view.viewport.getBottomOffset(),r=this.hot.view.viewport.getRightOffset(),i=this.hot.view.viewport.getTopOffset(),a=this.hot.view.viewport.getLeftOffset();return e.top+e.height>t&&(e.top=t-e.height),e.left+e.width>r&&(e.left=r-e.width),i>e.top&&(e.top=i),a>e.left&&(e.left=a),e}onMouseMove(e){if(!this.state)return;let t=this.getDelta(e),r=SD(this.state.viewPosition);r.left+=this.hot.view.reverseIfRtl(t.x),r.top+=t.y,this.resize(r)}moveByKeyCode(e){let t={x:0,y:0};switch(e){case J.ARROW_UP:t.y-=10;break;case J.ARROW_RIGHT:t.x+=this.hot.view.reverseIfRtl(10);break;case J.ARROW_DOWN:t.y+=10;break;case J.ARROW_LEFT:t.x-=this.hot.view.reverseIfRtl(10)}return this.moveByDelta(t)}moveByDelta(e){if(e.x===0&&e.y===0)return!1;let t=this.getHiderPositionOfActiveDom();return t.left+=e.x,t.top+=e.y,t=this.limitationCheck(t),!bV(this.getHiderPositionOfActiveDom(),t)&&(this.resize(t),!0)}onResizing(e){if(!this.state)return;let t=this.getDelta(e),r=this.hot.view.viewport.getBottomOffset(),i=this.hot.view.viewport.getRightOffset(),a=this.hot.view.viewport.getTopOffset(),g=this.hot.view.viewport.getLeftOffset(),{width:R,height:L,left:W,top:K}=this.state.viewPosition,{width:Q,height:oe,left:se,top:he}=this.state.viewPosition,me=i-W-_1.RIGHT,ye=r-K-_1.BOTTOM;if(this.state.controlDirection.indexOf("e")>=0&&(me=i-W-_1.RIGHT,R=Math.max(Math.min(Q+t.x,me),20)),this.state.controlDirection.indexOf("w")>=0&&(me=W+R-g,R=Math.max(Math.min(Q-t.x,me),20)),this.state.controlDirection.indexOf("s")>=0&&(ye=r-K-_1.BOTTOM,L=Math.max(Math.min(oe+t.y,ye),20)),this.state.controlDirection.indexOf("n")>=0&&(ye=K+L-a,L=Math.max(Math.min(oe-t.y,ye),20)),this.state.controlDirection.length===2){let Me=Math.max(R/Q,L/oe);["n","s"].indexOf(this.state.controlDirection)>=0&&(Me=L/oe),["e","w"].indexOf(this.state.controlDirection)>=0&&(Me=R/Q),Me=Math.max(Me=Math.min(Me,me/Q,ye/oe),20/Q,20/oe),R=Q*Me,L=oe*Me}this.state.controlDirection.indexOf(this.hot.view.isRtl()?"e":"w")>=0&&(W=se+(Q-R)),this.state.controlDirection.indexOf("n")>=0&&(K=he+(oe-L));let Te={width:R,height:L,left:W,top:K};this.resize(Te)}updateViewPosition(e){let t=this.getAbsolutePositionInView(e);this.resize(t)}resize(e){e=this.limitationCheck(e),this._resize(this.dom,e)}_resize(e,t){X(e)&&(e.style.width=t.width+"px",e.style.height=t.height+"px",this.hot.view.setViewPosition(e,t.top,t.left))}isCopyable(){return!1}getViewPosition(e){let t=tW(e);return this.hot.view.isRtl()&&(t.left=-(t.left+t.width)),t}}class lg extends rW{constructor(e,t,r,i){super(e,t,r),this.path=i.path,this.doms=[this.dom],this.selectionDoms=[];let a=document.createElement("img");A(a,"syno-sh-image-container"),this.wrapper.appendChild(a);for(let g=1;g<4;g++)this.doms.push(this.dom.cloneNode(!0));this.activeDom=this.dom.cloneNode(!0),this.activeDom.style.visibility="hidden",this.url=null}destroy(){Sr(this.doms,e=>{X(e)&&e.remove()}),this.doms=[],X(this.activeDom)&&this.activeDom.remove()}appendSelectionDom(){let e=super.appendSelectionDom();for(let t of this.doms.slice(1)){let r=e.cloneNode(!0);t.appendChild(r),this.selectionDoms.push(r)}return e}removeSelectionDom(){for(let e of(super.removeSelectionDom(),this.selectionDoms))e.remove();this.selectionDoms=[]}_showSelection(e){for(let t of(super._showSelection(e),this.selectionDoms))nW(t,e)}_hideSelection(){for(let e of(super._hideSelection(),this.selectionDoms))xD(e)}async fillURL(e){if(this.url)return;this.url=await this._getImageDisplayURL(e);let t=[this.activeDom].concat(this.doms);for(let r=0;r<t.length;r++)t[r].querySelector("img").src=this.url}getExternalURLSync(e){return this.hot.getUIBridge().getImageExternalURLSync(this.path,e)}_getImageDisplayURL(e){return this.hot.getUIBridge().getImageDisplayURL(this.path,e)}hasOverlay(e){return-1<this.doms.indexOf(e)||e===this.activeDom}setActive(e){let t;if(super.setActive(e),e){let r=this.toActivePosition(this.getViewPosition(this.dom));this._resize(this.activeDom,r),this.activeDom.style.visibility="visible",t="hidden"}else this.activeDom.style.visibility="hidden",t="visible";Sr(this.doms,r=>{r.style.visibility=t})}getActiveDom(){return this.activeDom}toActivePosition(e){return e.top-=this.hot.view.getScrollTop(),e.left-=this.hot.view.getScrollLeft(),e}toHiderPosition(e){return e.top+=this.hot.view.getScrollTop(),e.left+=this.hot.view.getScrollLeft(),e}resize(e){e=this.limitationCheck(e),this.isActive()&&this._resize(this.activeDom,this.toActivePosition(SD(e))),Sr(this.doms,t=>{this._resize(t,e)})}isCopyable(){return!0}getSerializer(e){return new iue(this,e)}getDrawableDom(){return this.dom.querySelector("img")}getViewPosition(e){if(this.hot.view.isRtl()&&e===this.getActiveDom()){let t=tW(e);return t.left=this.hot.view.viewport.getViewWidth()-(t.left+t.width)+Uf,t}return super.getViewPosition(e)}}class Ew extends rW{constructor(e,t,r){var i;super(e,t,r),i=this.dom,A(i,"syno-o-sh-chart-overlay"),this.painter=null,this.emptyMsgDom=null}destroy(){this._destroyEchart()}_destroyEchart(){this.painter&&(this.painter.destroy(),this.painter=null)}limitationCheck(e){let{freezeHeight:t,freezeWidth:r}=this.hot.view.getFreezeSize();return t>(e=super.limitationCheck(e)).top&&(e.top=t),r>e.left&&(e.left=r),e}resize(e){e=this.limitationCheck(e);let t=this.dom.clientHeight,r=this.dom.clientWidth,i=e.height,a=e.width;this._resize(this.dom,e),this.painter&&this.dom===this.getActiveDom()&&(t!==i||r!==a)&&this.painter.resize({width:a,height:i})}_createPlaceHolder(){if(!this.emptyMsgDom){var e;this.emptyMsgDom=document.createElement("div"),e=this.emptyMsgDom,A(e,"syno-o-sh-chart-empty-msg"),this.dom.appendChild(this.emptyMsgDom)}return this.emptyMsgDom}draw(e){X(this.dom)&&(this.painter||(this.painter=new CD(this.wrapper,this.hot.view.getScaleRatio())),e.isDrawable()?(this.wrapper.style.display="",this._createPlaceHolder().style.display="none",this.painter.draw(e)):(this.wrapper.style.display="none",this._createPlaceHolder().style.display=""))}getDrawableDom(){return this.painter?.getCanvas()??null}getViewPosition(e){let t=super.getViewPosition(e);return this.hot.view.isRtl()&&(t.left-=2),t}isCopyable(){return!0}getSerializer(e){return new oue(this,e,this.sheetId,this.hot.getUIBridge().getObjectId())}}class uue extends ns{static#e=this.pluginName="synoDrawingController";constructor(e){var t;super(e),this.imageViews=new Map,this.chartViews=new Map,this.activeDrawing=null,this.activeDraggable=null,this.onMoveAction=null,this.delayResizeTimer=null,this.posConverter=this.getView().viewport.getDrawingPositionConverter(),this.chartMenuButton=document.createElement("span"),t=this.chartMenuButton,A(t,"syno-o-chart-option-btn")}initHook(){let e=this.getHot();e.addHook("beforeKeyDown",t=>this.onKeyDown(t)),e.addHook("afterOnCellMouseDown",()=>this.inactive("select")),e.addHook("afterSelectionEnd",()=>this.inactive("select")),e.addHook("onTargetMouseDown",t=>this.onMouseDown(t)),e.addHook("onTargetMouseOver",t=>this.onMouseMove(t)),e.addHook("onTargetMouseUp",t=>this.onMouseUp(t)),e.addHook("onTargetDblClick",t=>this.onMouseDblClick(t)),e.addHook("afterScroll",()=>this.inactive("scroll")),e.addHook("beforeHideSheet",()=>this.beforeHideSheet()),e.addHook("afterRender",()=>this.afterRender()),e.addHook("afterPixelRatioChange",()=>this.afterPixelRatioChange())}afterPixelRatioChange(){for(let e of this.chartViews.values())e.destroy()}_createImageView(e,t,r){let i=new lg(e,t,this.getHot(),{path:r});return this._appendImage(i),i}_appendImage(e){e.fillURL(this.getWorkbook().getVersion()),this.getHot().rootElement.appendChild(e.activeDom);let t=this.getView();t.scrollableBottomRight.appendChild(e.doms[0]),t.scrollableTopRight.appendChild(e.doms[1]),t.scrollableBottomLeft.appendChild(e.doms[2]),t.scrollableTopLeft.appendChild(e.doms[3])}_removeImageDom(e){this.getHot().rootElement.removeChild(e.activeDom);let t=this.getView();t.scrollableBottomRight.removeChild(e.doms[0]),t.scrollableTopRight.removeChild(e.doms[1]),t.scrollableBottomLeft.removeChild(e.doms[2]),t.scrollableTopLeft.removeChild(e.doms[3])}getActiveImage(){return this.activeDrawing&&this.imageViews.has(this.activeDrawing.id)?this.activeDrawing:null}getDrawingViewPosition(e){let t=this.imageViews.get(e)??this.chartViews.get(e)??null;return t?.getRenderPositionInView(this.getDrawingPosition(t))??null}getDrawingViewBound(e){let t=this.getDrawingViewPosition(e);if(!t)return null;let{y:r,x:i,height:a,width:g}=this.getView().getRectVisibleBound({y:t.top,x:t.left,height:t.height,width:t.width});return a<=0||g<=0?null:{top:r,left:i,height:a,width:g}}getDrawingByEvent(e){return this._getDrawing(e)}async setImagePositionType(e,t){let r=this.getSheet().getDrawingPlugin().getImageJSONById(e);if(!r)return!1;let i=this.posConverter.toPositionOfType(r.position,t);return this.getAction().resizeImage(this.getSheet().sheetId,e,i)}_createChartView(e,t){let r=new Ew(e,t,this.getHot());return this._appendChart(r),r}_appendChart(e){this.getView().scrollableBottomRight.appendChild(e.dom)}_removeChartDom(e){this.getView().scrollableBottomRight.removeChild(e.dom)}getActiveChart(){return this.activeDrawing&&this.chartViews.has(this.activeDrawing.id)?this.activeDrawing:null}async setChartPositionType(e,t){let r=this.getSheet().getDrawingPlugin().getChartJSONById(e);if(!r)return!1;let i=this.posConverter.toPositionOfType(r.position,t);return this.getAction().resizeChart(this.getSheet().sheetId,e,i)}async resizeDrawing(e,t){if(e instanceof lg)return this.getAction().resizeImage(e.sheetId,e.id,t);if(e instanceof Ew)return this.getAction().resizeChart(e.sheetId,e.id,t);throw Error("Unexpected Drawing Type")}getDrawingPosition(e){let t=this.getSheet().getDrawingPlugin(),r=e.id,i=t.getImageJSONById(r)||t.getChartJSONById(r);if(i)return i.position;throw Error("Drawing not found")}inactive(e){this.changeActive(null,e)}changeActiveById(e,t){let r=this.imageViews.get(e)??this.chartViews.get(e);r&&this.changeActive(r,t)}changeActive(e,t){this.activeDrawing&&(this.activeDrawing.setActive(!1),this.activeDrawing=null),this.activeDrawing=e;let r=this.getSheet().getDrawingPlugin(),i=e?r.getImageJSONById(e.id):null,a=e&&!i?r.getChartJSONById(e.id):null;this.getHot().getUIBridge().onActiveChartChange(a,t),this.getHot().getUIBridge().onActiveImageChange(i,t),this.activeDrawing&&this.activeDrawing.setActive(!0),this.updateFloat(),this.getHot().runHooks("afterActiveDrawingChange",this.activeDrawing)}removeActiveDrawing(){return!!this.activeDrawing&&(this.activeDraggable&&this.endDragging(!0),this.activeDrawing instanceof lg?this.getAction().removeImage(this.activeDrawing.sheetId,this.activeDrawing.id):this.activeDrawing instanceof Ew&&this.getAction().removeChart(this.activeDrawing.sheetId,this.activeDrawing.id),!0)}onMouseDown(e){if(rt()||this.onMoveAction!==null||this.getWorkbook().isReadonly())return;if(e.target===this.chartMenuButton){this.getHot().getUIBridge().editor.chartMenu.show(this.activeDrawing,this.chartMenuButton),q(e);return}let t=this._getDrawing(e);if(!t)return;if(e.customTarget=t,e.button!==0&&e.button!==2)return void q(e);let r=this.getHot();if(r.focusInputField(),t.isActive()&&e.button===0&&!iW(e))this.activeDraggable=t,this.setupDragging(e);else{if(t instanceof lg){let i=t.getViewPosition(t.dom),a=this.getView(),{freezeWidth:g,freezeHeight:R}=a.getFreezeSize();R>i.top&&a.viewport.setScrollTop(0),g>i.left&&a.viewport.setScrollLeft(0)}r.deselectCell(),this.changeActive(t,"select"),r.getUIBridge().onSelectImage()}q(e),e.preventDefault()}onMouseUp(e){if(rt()||e.button!==0||iW(e))return;let t=this._getDrawing(e);t&&this.activeDrawing&&t===this.activeDrawing&&(e.customTarget=t,q(e)),this.activeDraggable&&this.endDragging()}onMouseDblClick(e){if(rt()||e.target===this.chartMenuButton||!this.activeDrawing||this._getDrawing(e)!==this.activeDrawing)return;let t=this.getSheet().getDrawingPlugin();this.activeDrawing instanceof Ew?this.getHot().getUIBridge().openChartEditor(t.getChartJSONById(this.activeDrawing.id)):this.activeDrawing instanceof lg&&this.getHot().getUIBridge().openImageFormatPanel(t.getImageJSONById(this.activeDrawing.id))}_getDrawing(e){let t=this._getDrawingContainer(e);if(!t)return null;for(let r of[...this.imageViews.values(),...this.chartViews.values()])if(r.hasOverlay(t))return r;return null}_getDrawingContainer(e){let t=4,r=e.target;if(r?.nodeType!==document.ELEMENT_NODE)return null;for(;r&&t;){if(E(r,"syno-o-sh-drawing-overlay"))return r;r=r.parentElement,t-=1}return null}setupDragging(e){let t,r=e.target;if(E(r,"handle")){let i=r.className.match("([a-z]+)-handle");if(!i||!i[1])return;t=i[1],this.onMoveAction="resize"}else this.onMoveAction="move",this.activeDraggable.setMoving(!0);this.updateFloat(),this.activeDraggable.saveStatus(e,t)}endDragging(e){e===void 0&&(e=!1);let t=this.getView(),r=this.activeDraggable,i=this.getDrawingPosition(r);r.afterDrag();let a=r.getAbsolutePositionOfDom(r.getActiveDom()),g=i1(this.createDrawingPosition(a,i.type)),R=ID(t,this.posConverter.toAbsolutePosition(i)),L=ID(t,this.posConverter.toAbsolutePosition(g));e===!0||bV(R,L)||this.resizeDrawing(r,g).then(W=>{W||(r.updateViewPosition(i),this.updateFloat())}),r.setMoving(!1),r.clearStatus(),this.activeDraggable=null,this.onMoveAction=null,this.updateFloat()}onMouseMove(e){this.activeDraggable&&(this.onMoveAction==="resize"?(this.activeDraggable.onResizing(e),this.redrawChart(this.activeDraggable.id)):this.onMoveAction==="move"&&this.activeDraggable.onMouseMove(e))}onKeyDown(e){if(this.activeDrawing)switch(e.keyCode){case J.ARROW_UP:case J.ARROW_RIGHT:case J.ARROW_LEFT:case J.ARROW_DOWN:if(!this.activeDraggable){let t=this.getDrawingPosition(this.activeDrawing);if(this.activeDrawing.moveByKeyCode(e.keyCode)){this.onMoveAction="keyboard_move",this.updateFloat();let r=this.activeDrawing instanceof lg?"afterResizeImage":"afterResizeChart";this.delayResizeHooks(r,this.activeDrawing,t),q(e),e.stopPropagation(),e.preventDefault()}}}}delayResizeHooks(e,t,r){this.delayResizeTimer!==null&&clearTimeout(this.delayResizeTimer),this.delayResizeTimer=window.setTimeout(()=>{this.delayResizeTimer=null,this.onMoveAction=null,t.afterDrag();let i=t.getAbsolutePositionOfDom(t.getActiveDom()),a=i1(this.createDrawingPosition(i,r.type));this.resizeDrawing(t,a).then(g=>{g||(t.updateViewPosition(r),this.updateFloat())}),this.updateFloat()},200)}beforeHideSheet(){for(let e of(this.activeDrawing&&this.inactive("invisible"),this.imageViews.values()))this._removeImageDom(e);for(let e of(this.imageViews.clear(),this.chartViews.values()))this._removeChartDom(e);this.chartViews.clear()}afterRender(){let e=this.getSheet().getDrawingPlugin(),t=this.getSheet().sheetId,r=new Set(this.imageViews.keys());for(let a of e.getImagesJSON()){let g=a.id,R=this.imageViews.get(g);R?r.delete(g):(R=this._createImageView(g,t,a.path),this.imageViews.set(g,R)),R.updateViewPosition(a.position)}for(let a of r)this._removeImageDom(this.imageViews.get(a)),this.imageViews.delete(a);let i=new Set(this.chartViews.keys());for(let a of e.getChartsJSON()){let g=a.id,R=this.chartViews.get(g);R?i.delete(g):(R=this._createChartView(g,t),this.chartViews.set(g,R)),R.updateViewPosition(a.position),R.draw(a.chartInfo)}for(let a of i)this._removeChartDom(this.chartViews.get(a)),this.chartViews.delete(a);this.updateFloat()}redrawChart(e){let t=this.chartViews.get(e),r=this.getSheet().getDrawingPlugin().getChartJSONById(e);t&&r&&t.draw(r.chartInfo)}updateImageFloat(){this.activeDrawing&&this.activeDrawing instanceof lg&&this.onMoveAction===null?this.getHot().getUIBridge().editor.imageFloat.show(this.activeDrawing):this.getHot().getUIBridge().editor.imageFloat.hide()}updateChartButton(){this.activeDrawing&&this.activeDrawing instanceof Ew&&this.onMoveAction===null?this.activeDrawing.getActiveDom().appendChild(this.chartMenuButton):this.chartMenuButton.parentNode&&this.chartMenuButton.parentNode.removeChild(this.chartMenuButton),this.getHot().getUIBridge().editor.chartMenu.hide()}updateFloat(){this.updateImageFloat(),this.updateChartButton()}getInsertPosition(){let e,t,r=this.getHot().getSelectedRange(),i=null,a=this.getView(),g=a.viewport,R=this.getSheet().getDrawingPlugin(),L=[...R.getImagesJSON(),...R.getChartsJSON()],W=[];for(let K of L){let Q=this.posConverter.toAbsolutePosition(K.position);W.push(Q),this.activeDrawing&&K.id===this.activeDrawing.id&&(i=Q)}return r?(e=g.getRowOffset(r.from.row),t=g.getColOffset(r.from.col),{top:e,left:t}=TD(a,{top:e,left:t,width:0,height:0})):i?(e=i.top,t=i.left):(e=g.getRowOffset(a.getFirstVisibleRow()),t=g.getColOffset(a.getFirstVisibleCol()),{top:e,left:t}=TD(a,{top:e,left:t,width:0,height:0})),function K(Q,oe){for(let se of W)if(Q===se.top&&oe===se.left)return K(Q+15,oe+15);return{top:Q,left:oe}}(e,t)}sectionContainImage(e,t,r){return CV(this.getView().viewport.sectionToBBox(e,t.start,t.end),this.posConverter.drawingPositionToBBox(r))}sectionIntersectImage(e,t,r){return _V(this.getView().viewport.sectionToBBox(e,t.start,t.end),this.posConverter.drawingPositionToBBox(r))}createDrawingPosition(e,t){let{top:r,left:i,height:a,width:g}=e;return t===void 0&&(t=vl.OneAnchor),this.posConverter.toPositionOfType({type:vl.Absolute,top:r,left:i,height:a,width:g},t)}scrollToDrawing(e,t){t===void 0&&(t=!0);let r=this.imageViews.get(e)??this.chartViews.get(e)??null,i=r?.getAbsolutePositionInView(this.getDrawingPosition(r));i&&this.getView().scrollToRect(i,t)}}function iW(n){return je()&&n.ctrlKey}let hue=Qe.COL_HEADER_HEIGHT;class cue extends ns{static#e=this.pluginName="synoManualColumnResize";constructor(e){super(e),this.currentCol=0,this.currentWidth=0,this.startX=0,this.startWidth=0,this.startOffset=0,this.startTop=0,this.pressed=!1,this.dblclick=0,this.autoresizeTimeout=null,this.handleWidth=3;let t=this.getHot().rootElement;this.handle=ie(t,"manualColumnResizer"),this.guide=ie(t,"manualColumnResizerGuide")}initHook(){let e=this.getHot();e.addHook("afterSetZoomLevel",t=>this.afterSetZoomLevel(t)),e.addHook("afterOnCellMouseOver",(t,r,i,a)=>this.afterOnCellMouseOver(t,r,i,a)),e.addHook("onTargetMouseDown",t=>this.onMouseDown(t)),e.addHook("onTargetMouseOver",t=>this.onMouseMove(t)),e.addHook("onTargetMouseUp",t=>this.onMouseUp())}setupHandlePosition(e,t){if(e>=0){let{x:r,y:i,width:a}=t;this.currentCol=e,this.startOffset=r,this.startTop=i,this.startWidth=a,this.getView().setViewPosition(this.handle,i,this.startOffset+this.startWidth-this.handleWidth)}}refreshHandlePosition(){this.getView().setViewPosition(this.handle,this.startTop,this.startOffset+this.currentWidth-this.handleWidth)}setupGuidePosition(){var e,t;e=this.handle,A(e,"active"),t=this.guide,A(t,"active"),this.getView().setViewPosition(this.guide,this.startTop,this.startOffset+this.startWidth)}refreshGuidePosition(){this.getView().setViewPosition(this.guide,this.startTop,this.startOffset+this.currentWidth)}hideHandleAndGuide(){var e,t;e=this.handle,u(e,"active"),t=this.guide,u(t,"active")}afterOnCellMouseOver(e,t,r,i){t.col<0||t.row!==-1||this.pressed||this.setupHandlePosition(t.col,i)}afterMouseDownTimeout(e){this.dblclick>=2&&(this.autoResize(e),this.handle.style.left="-999px"),this.dblclick=0,this.autoresizeTimeout=null}autoResize(e){e=e??this._getMultiRanges();let t=this._getMultiRangeAutoSize(e);this.getAction().resizeCols(this.getSheet().sheetId,e,t)}onMouseDown(e){if(!Da(e)){var t;if(t=e.target,E(t,"manualColumnResizer")&&this.getView().isEventInView(e)){if(this.setupHandlePosition(this.currentCol,this.getView().getRangeViewBound(-1,this.currentCol,-1,this.currentCol,!1)),this.setupGuidePosition(),this.pressed=!0,this.autoresizeTimeout===null){let r=this._getMultiRanges();this.autoresizeTimeout=window.setTimeout(()=>{this.afterMouseDownTimeout(r)},500)}this.dblclick++,this.startX=e.pageX,this.currentWidth=this.startWidth,q(e)}}}onMouseMove(e){if(this.pressed){let t=this.getView(),r=t.reverseIfRtl(e.pageX-this.startX);this.currentWidth=this.startWidth+r;let i=t.viewport.getZoomLevel();this.currentWidth=Math.min(this.currentWidth,Qe.MAX_COL_WIDTH*i),this.currentWidth=Math.max(this.currentWidth,Qe.MIN_COL_WIDTH*i),this.refreshHandlePosition(),this.refreshGuidePosition()}}async onMouseUp(){if(this.pressed){this.hideHandleAndGuide(),this.pressed=!1;let e=Math.floor(this.currentWidth/this.getView().viewport.getZoomLevel());if(e!==(this.getSheet().getColResizePlugin().getManualSize(this.currentCol)||this.getSheet().getDefaultColWidth())){let t=this.getSheet().sheetId,r=this._getMultiRanges();await this.getAction().resizeCols(t,r,e)}this.getHot().focusInputField()}}afterSetZoomLevel(e){let t=this.handle.style;this.handleWidth=Math.floor(3*e),t.width=this.handleWidth+"px",t.height=Math.floor(hue*e)+"px",this.guide.style.marginLeft=t.width}_getMultiRanges(){let e=this.currentCol,t=this.getSheet().countRows(),r=!1,i=[];return Sr(this.getHot().getMultiSelectedRange(),a=>{a.getHeight()===t&&(i.push(a),r=r||a.includes({row:0,col:e}))}),i.length!==0&&r?i:[new sn(0,e,t-1,e,qr.col)]}_getMultiRangeAutoSize(e){let t=Gf(e,"col"),r=t.reduce((a,g)=>{for(let R=g.from;R<=g.to;R++)a.push(R);return a},[]),i=this.getColumnsAutoWidth(r);return t.map(a=>{let g=[];for(let R=a.from;R<=a.to;R++){let L=this.getSheet().getColResizePlugin().getManualSize(R);i[R]&&i[R]!==L?g.push(i[R]):g.push(L)}return g})}getColumnsAutoWidth(e){let t={},r=this.getSheet(),i=r.countRows();if(i===0||e.length===0)return t;let a=r.getMergePlugin(),g=r.getCfPlugin();for(let R=0;R<i;R++)for(let L of e){let W=a.getMergedRange(R,L);if(W&&(W.getWidth()>1||W.from.row!==R||W.from.col!==L))continue;let K=r.getCellTextDesc(R,L)?.v;if(!K)continue;let Q=r.getComputedCellStyle(R,L),oe=g.getComputedCfStyle(R,L),se=oe?.bold??!1,he=oe?.italic??!1;r.getFilterPlugin().hasDropdown(R,L)&&(se=!0);let me=r.getDataAtCell(R,L),ye=zC(Zr(me)?me:K,{font:Q.getFont(),forceBold:se,forceItalic:he},r.ensureCellDirection(R,L)),Te=r.getCellProperty(R,L,"validId"),Me=r.getCellProperty(R,L,"pivot"),Oe=ye.getWidth();r.getFilterPlugin().hasDropdown(R,L)?Oe+=5+$l.getPadding():Te&&r.getValidationPlugin().isDropdownValidation(Te)?Oe+=5+Bh.getPadding():Me?(Oe+=9+$p(Me),Me.filterBtn!==Lh.None&&(Oe+=$l.getPadding())):Oe+=9,(Oe&&!t[L]||Oe>t[L])&&(t[L]=Oe)}return t}}let due=Qe.ROW_HEADER_WIDTH;class fue extends ns{static#e=this.pluginName="synoManualRowResize";constructor(e){super(e),this.currentRow=0,this.currentHeight=0,this.startY=0,this.startHeight=0,this.startOffset=0,this.startLeft=0,this.pressed=!1,this.dblclick=0,this.autoresizeTimeout=null,this.handleHeight=3;let t=this.getHot().rootElement;this.handle=ie(t,"manualRowResizer"),this.guide=ie(t,"manualRowResizerGuide")}initHook(){let e=this.getHot();e.addHook("afterSetZoomLevel",t=>this.afterSetZoomLevel(t)),e.addHook("afterOnCellMouseOver",(t,r,i,a)=>this.afterOnCellMouseOver(t,r,i,a)),e.addHook("onTargetMouseDown",t=>this.onMouseDown(t)),e.addHook("onTargetMouseOver",t=>this.onMouseMove(t)),e.addHook("onTargetMouseUp",t=>this.onMouseUp())}setupHandlePosition(e,t){if(e>=0){let{x:r,y:i,height:a}=t;this.currentRow=e,this.startOffset=i,this.startLeft=r,this.startHeight=a,this.getView().setViewPosition(this.handle,this.startOffset+this.startHeight-this.handleHeight,r)}}refreshHandlePosition(){this.handle.style.top=this.startOffset+this.currentHeight-this.handleHeight+"px"}setupGuidePosition(){var e,t;e=this.handle,A(e,"active"),t=this.guide,A(t,"active"),this.getView().setViewPosition(this.guide,this.startOffset+this.startHeight-this.handleHeight,this.startLeft)}refreshGuidePosition(){this.guide.style.top=this.handle.style.top}hideHandleAndGuide(){var e,t;e=this.handle,u(e,"active"),t=this.guide,u(t,"active")}afterOnCellMouseOver(e,t,r,i){t.row<0||t.col!==-1||this.pressed||this.setupHandlePosition(t.row,i)}afterMouseDownTimeout(e){this.dblclick>=2&&(this.autoResize(e),this.handle.style.top="-999px"),this.dblclick=0,this.autoresizeTimeout=null}autoResize(e){e=e??this._getMultiRanges();let t=this._getMultiRangeAutoSize(e);this.getAction().resizeRows(this.getSheet().sheetId,e,t)}onMouseDown(e){if(!Da(e)){var t;if(t=e.target,E(t,"manualRowResizer")&&this.getView().isEventInView(e)){if(this.setupHandlePosition(this.currentRow,this.getView().getRangeViewBound(this.currentRow,-1,this.currentRow,-1,!1)),this.setupGuidePosition(),this.pressed=!0,this.autoresizeTimeout===null){let r=this._getMultiRanges();this.autoresizeTimeout=window.setTimeout(()=>{this.afterMouseDownTimeout(r)},500)}this.dblclick++,this.startY=e.pageY,this.currentHeight=this.startHeight,q(e)}}}onMouseMove(e){if(this.pressed){let t=e.pageY-this.startY;this.currentHeight=this.startHeight+t;let r=this.getView().viewport.getZoomLevel();this.currentHeight=Math.min(this.currentHeight,Qe.MAX_ROW_HEIGHT*r),this.currentHeight=Math.max(this.currentHeight,Qe.MIN_ROW_HEIGHT*r),this.refreshHandlePosition(),this.refreshGuidePosition()}}async onMouseUp(){if(this.pressed){this.hideHandleAndGuide(),this.pressed=!1;let e=Math.floor(this.currentHeight/this.getView().viewport.getZoomLevel());if(e!==this.getSheet().getRowResizePlugin().getManualSize(this.currentRow)){let t=this.getSheet().sheetId,r=this._getMultiRanges();await this.getAction().resizeRows(t,r,e)}this.getHot().focusInputField()}}afterSetZoomLevel(e){let t=this.handle.style;this.handleHeight=Math.floor(3*e),t.height=this.handleHeight+"px",t.width=Math.floor(due*e)+"px",this.guide.style.marginTop=t.height}_getMultiRanges(){let e=this.currentRow,t=this.getSheet().countCols(),r=!1,i=[];return Sr(this.getHot().getMultiSelectedRange(),a=>{a.getWidth()===t&&(i.push(a),r=r||a.includes({row:e,col:0}))}),i.length!==0&&r?i:[new sn(e,0,e,t-1,qr.row)]}_getMultiRangeAutoSize(e){return Gf(e,"row").map(t=>{let r=[];for(let i=t.from;i<=t.to;i++)r.push(null);return r})}}class gue extends ns{static#e=this.pluginName="synoMergeCell";constructor(e){super(e),this.lastDesiredCoords=null}initHook(){let e=this.getHot();e.addHook("modifyTransformStart",(t,r)=>this.modifyTransformStart(t,r)),e.addHook("modifyTransformEnd",(t,r)=>this.modifyTransformEnd(t,r)),e.addHook("afterSetRangeStart",t=>this.afterSetRangeStart(t)),e.addHook("beforeSetRangeEnd",(t,r)=>this.beforeSetRangeEnd(t,r)),e.addHook("beforeRefreshSelections",()=>this.beforeRefreshSelections())}modifyTransformStart(e,t){let r,i={row:e.row,col:e.col},a=this.getSheet().getMergePlugin(),g={row:t.highlight.from.row,col:t.highlight.from.col},R=a.getMergedRange(g.row,g.col);R&&(r=R.clone(),this.lastDesiredCoords&&!r.includes(this.lastDesiredCoords)&&(this.lastDesiredCoords=null),i.row=this.lastDesiredCoords?this.lastDesiredCoords.row-g.row:i.row,i.col=this.lastDesiredCoords?this.lastDesiredCoords.col-g.col:i.col,e.row>0?i.row=R.to.row-g.row+e.row:e.row<0&&(i.row=g.row-R.from.row+e.row),e.col>0?i.col=R.to.col-g.col+e.col:e.col<0&&(i.col=g.col-R.from.col+e.col));let L={row:t.highlight.from.row+i.row,col:t.highlight.from.col+i.col},W=a.getMergedRange(L.row,L.col);W&&(this.lastDesiredCoords=L,i={row:W.from.row-g.row,col:W.from.col-g.col}),i.row!==0&&(e.row=i.row),i.col!==0&&(e.col=i.col)}modifyTransformEnd(e,t){let r,i,a={row:e.row,col:e.col};for(let W of this.getSheet().getMergePlugin().traverseMergedRange()){if(i=t.getBordersSharedWith(W),W.isEqual(t))t.setDirection("NW-SE");else if(i.length>0){let oe=t.highlight,se=oe.from.row===W.from.row&&oe.from.col===W.from.col;i.indexOf("top")>-1?t.to.row>=W.from.row&&t.to.col>=W.from.col&&se?t.setDirection("NW-SE"):t.to.row>=W.from.row&&t.to.col<=W.from.col&&se&&t.setDirection("NE-SW"):i.indexOf("bottom")>-1&&(t.to.row<=W.from.row&&t.to.col>=W.from.col&&se?t.setDirection("SW-NE"):t.to.row<=W.from.row&&t.to.col<=W.from.col&&se&&t.setDirection("SE-NW"))}let K=(r={row:t.to.row+a.row,col:t.to.col+a.col}).row>=W.from.row&&r.row<=W.to.row,Q=r.col>=W.from.col&&r.col<=W.to.col;t.includesRange(W)&&(W.includes(r)||K||Q)&&(K&&(a.row<0?a.row-=W.to.row-W.from.row:a.row>0&&(a.row+=W.to.row-W.from.row)),Q&&(a.col<0?a.col-=W.to.col-W.from.col:a.col>0&&(a.col+=W.to.col-W.from.col)))}a.row!==0&&(e.row=a.row),a.col!==0&&(e.col=a.col);let g=this.getSheet(),R=g.countRows(),L=g.countCols();t.from.row<0?t.from.row=0:t.from.row>0&&t.from.row>=R&&(t.from.row=R-1),t.from.col<0?t.from.col=0:t.from.col>0&&t.from.col>=L&&(t.from.col=L-1)}afterSetRangeStart(e){this.modifyHighlight(e&&e.highlight)}modifyHighlight(e){if(!e)return;let t=this.getSheet().getMergePlugin().getMergedRange(e.from.row,e.from.col);t&&(e.from.row=t.from.row,e.from.col=t.from.col,e.to.row=t.to.row,e.to.col=t.to.col)}beforeRefreshSelections(){let e=this.getHot().selections.multiSelections,t=e.getActive();e.forAll(r=>(r.cellRange&&r.cellRange.type===qr.cell&&(this.expandSelection(r.cellRange),r===t&&(this.modifyHighlight(r.cellRange.highlight),this.getHot().runHooks("highlightchanged",r.cellRange.highlight))),!0))}beforeSetRangeEnd(e,t){t.row||t.col||this.expandSelection(e)}expandSelection(e){this.getSheet().getMergePlugin().expandSelection(e)}expandCoords(e){let{row:t,col:r}=e;return this.getSheet().getMergePlugin().getMergedRange(t,r)??new sn(t,r,t,r)}nextHighlight(e,t){return this.getSheet().getMergePlugin().nextHighlight(e,t)}}function oW(n,e){return n<0?0:n>=e.length?e[e.length-1]:e[n]}function aW(n,e){return e<n[0]?-1:MA(n,e)}class pue{constructor(e,t){this.rowOffset=e,this.colOffset=t}getColOffset(e){return oW(e,this.colOffset)}getRowOffset(e){return oW(e,this.rowOffset)}getColByOffset(e){return aW(this.colOffset,e)}getRowByOffset(e){return aW(this.rowOffset,e)}}let mue=[["cjk","symbol","symbolCjk"],["kana"],["hangui"]].reduce((n,e)=>(n&&(n+="|"),n+function(){let t,r,i;for(var a,g=arguments.length,R=Array(g),L=0;L<g;L++)R[L]=arguments[L];return a=Md(...R),t="",r="",a.forEach(W=>{let[K,Q]=W;if(mA(K))K===Q?t+=`${Na(K)}`:t+=`${Na(K)}-${Na(Q)}`;else{let oe=String.fromCodePoint(K),se=oe.charCodeAt(0),he=oe.charCodeAt(1),me=String.fromCodePoint(Q),ye=me.charCodeAt(0),Te=me.charCodeAt(1);r&&(r+="|"),K===Q?r+=`${Na(se)}${Na(he)}`:se===ye?r+=`${Na(se)}[${Na(he)}-${Na(Te)}]`:(r+=`${Na(se)}[${Na(he)}-${Na(57343)}]`,se+1<=ye-1&&(r+=`|[${Na(se+1)}-${Na(ye-1)}][${Na(56320)}-${Na(57343)}]`),r+=`|${Na(ye)}[${Na(56320)}-${Na(Te)}]`)}}),i="",t&&(i+=`[${t}]`),r&&(i&&(i+="|"),i+=`${r}`),`(${i})`}(...e)),""),vue=class extends Fy{constructor(n,e,t,r,i,a){super({drawer:new Up(n,{scale:i.scaleRatio,rtl:e.isRtl()})},e,t,r,i,a),this._pdf=n,this._ctx=this._pdf.getContext()}createRtlBidiRuns(n,e){return n.split("").map(t=>({text:AA.getMirroredCharacter(t)??t,font:e,isRtl:!1}))}createRtlTextCellView(n,e,t){t===void 0&&(t=1/0);let r=mV(pV(typeof n=="string"?this.createRtlBidiRuns(n,null):n.v.map(a=>{let{tx:g,s:R}=a;return this.createRtlBidiRuns(g,R)}).flat(),e),t),i=new Oy("ltr");for(let{inlines:a,metrics:g}of r){let R=new DC(g),L=function(W,K){let Q=cV(W,"rtl");return AA.getReorderedIndices(W,Q)}(a.map(W=>{let{text:K}=W;return K}).join(""));for(let W=0;W<a.length;W++){let K=vV(a[L[W]]);for(let Q of this.translateTextViewFragment(K,e.font))R.addTextFragment(Q)}i.addTextLine(R)}return i}translateTextViewFragment(n,e){let t=function(i){let a,g=[],R=[],L="",W="",K=RegExp(mue,"g"),Q=-1;for(;a=K.exec(i);){W=L,Q!==a.index-1&&(0<R.length&&(g.push({fontFamily:L,text:R.join("")}),R=[]),g.push({fontFamily:"",text:i.substring(Q+1,a.index)})),L="";for(let oe=1;oe<=3;oe++)if(a[oe]!==void 0){if(oe===1){L="c";break}else if(oe===2){L="j";break}else if(oe===3){L="k";break}}a.index!==0&&L!==W&&(g.push({fontFamily:W,text:R.join("")}),R=[]),R.push(a[0]),Q=a.index}return 0<R.length&&g.push({fontFamily:L,text:R.join("")}),Q+1<i.length&&g.push({fontFamily:"",text:i.substr(Q+1)}),g}(n.getText()),r=n.getFont()||e;return t.map(i=>{let a=r.clone().assign({name:i.fontFamily||"roboto"});this._ctx.font=Ny(a);let g=this._ctx.measureText(i.text).width;return new gA(i.text,g,a,n.getRtl())})}_createTextCellView(n,e,t,r){if(t==="rtl")return this.createRtlTextCellView(n,e,r);let i=super._createTextCellView(n,e,t,r),a=new Oy(i.getDirection());for(let g of i){let R=new DC({height:g.getLineHeight(),lineBoxAscent:g.getBaselineOffset()});for(let L of g)for(let W of this.translateTextViewFragment(L,e.font))R.addTextFragment(W);a.addTextLine(R)}return a}};class yue extends Up{constructor(e,t,r){super(t,r),this.currentCell=null,this.pageDom=e,this.cellTransformFn=function(i,a,g){return a?R=>`translate(${g}px) scale(${i}) translate(${-R.x-R.width}px, ${R.y}px)`:R=>`scale(${i}) translate(${R.x}px, ${R.y}px)`}(r.scale??1,r.rtl??!1,t.width),this.pageDom.style.position="relative",this.pageDom.style.overflow="hidden"}drawCellText(e,t,r){if(!e.text)return;let i=this.pageDom.appendChild(document.createElement("div"));i.style.position="absolute",i.style.left="0px",i.style.top="0px",i.style.width=`${t.width}px`,i.style.height=`${t.height}px`,i.style.overflow="hidden",i.style.transform=this.cellTransformFn(t),i.style.transformOrigin="0 0",this.currentCell={x:t.x,y:t.y,div:i},super.drawCellText(e,t,r),this.currentCell=null}_drawTextLine(e,t,r,i){if(!this.currentCell)return;let a=this.currentCell.div.appendChild(document.createElement("div"));for(let g of(a.style.position="absolute",a.style.top=`${t-this.currentCell.y}px`,a.style.left=`${e-this.currentCell.x}px`,a.style.textWrap="nowrap",a.dir=i.text.getDirection(),r)){let R=a.appendChild(document.createElement("span"));R.textContent=g.getText();let L=AV(i,g);R.style.color=L.color,R.style.font=Ny(L);let W="";L.strike&&(W+="line-through "),L.underline&&(W+="underline "),W&&(R.style.textDecoration=`${W}${L.color}`)}}}class sW{constructor(e,t,r,i){this.dataBridge=e,this.sheet=t,this.printOption=r,this.uiBridge=i,this.fitRatio=1,this.rowOffset=[],this.colOffset=[],this.setup()}setup(){this.setupRowOffset(),this.setupColOffset()}setupRowOffset(){let e=Qe.COL_HEADER_HEIGHT;this.rowOffset=[e];let t=this.sheet.countRows();for(let r=0;r<t;r++)e+=this.sheet.getRowHeight(r),this.rowOffset.push(e)}setupColOffset(){let e=Qe.ROW_HEADER_WIDTH;this.colOffset=[e];let t=this.sheet.countCols();for(let r=0;r<t;r++)e+=this.sheet.getColWidth(r),this.colOffset.push(e)}getUIBridge(){return this.uiBridge}async print(e,t){t===void 0&&(t=3);let{coordImages:r,coordCharts:i}=await this.getDrawings(e??new sn(0,0,this.sheet.countRows()-1,this.sheet.countCols()-1),t);e||(e=await this.findRange(r,i)),this.fitRatio=await this.calcFitRatio(e),await Promise.all(r.concat(i).map(a=>a.promise)),await this.printRange(e,r,i)}async calcFitRatio(e){let t=[];for(let K=e.from.row;K<=e.to.row;K++)this.sheet.isHiddenRow(K)||t.push(K);let r=[];for(let K=e.from.col;K<=e.to.col;K++)this.sheet.isHiddenCol(K)||r.push(K);let i=new Fy({drawer:new Up(document.createElement("canvas"),{scale:1,rtl:this.sheet.isRtl()})},this.sheet,t,r,{},this.getUIBridge()).measureGrid();this.sheet.setRenderHeights(i),this.setupRowOffset();let{height:a,width:g,fit:R}=this.printOption,L=a/(this.rowOffset[e.to.row+1]-this.rowOffset[e.from.row]+1),W=g/(this.colOffset[e.to.col+1]-this.colOffset[e.from.col]+1);return R===!0?Math.min(1,L,W):R==="width"?Math.min(1,W):R==="height"?Math.min(1,L):1}async findRange(e,t){let r=this.sheet,i=r.getCfPlugin(),a=r.countCols(),g=r.countRows(),R=0;for(let Q=0;Q<g;Q++)if(!r.isHiddenRow(Q)){R=Q;break}let L=0;for(let Q=0;Q<a;Q++)if(!r.isHiddenCol(Q)){L=Q;break}let W=R,K=L;for(let Q=0;Q<g;Q++)if(!r.isHiddenRow(Q))for(let oe=a-1;oe>=0;oe--){if(r.isHiddenCol(oe))continue;let se=this.sheet.getComputedCellStyle(Q,oe),he=this.sheet.getDataAtCell(Q,oe),me=r.getCellTextDesc(Q,oe)?.v;if(me){let ye=oe,Te=se.getAlignment(),Me=r.ensureCellDirection(Q,oe),Oe=Te.halign||(Me==="rtl"?"right":"left");if(me&&(Oe==="left"||Oe==="center")&&!Te.wrap){let ze=i.getComputedCfStyle(Q,oe)??void 0,We=zC(Zr(he)?he:me,{font:se.getFont(),forceBold:ze?.bold,forceItalic:ze?.italic},Me),qe=$p(this.sheet.getCellProperty(Q,oe,"pivot")),Ke=Fy.getOverflowWidth(this.colOffset[oe+1]-this.colOffset[oe],We,Oe,qe).right;ye=this.findColIndex(this.colOffset[oe+1]+Ke)}W=Q,K=Math.max(K,ye);break}!(oe>K)||se.getFill().isDefault()&&se.getBorder().isDefault()||(W=Q,K=oe)}for(let Q of r.getMergePlugin().traverseMergedRange())W=Math.max(W,Q.to.row),K=Math.max(K,Q.to.col);for(let Q=0;Q<e.length;Q++)W=Math.max(W,e[Q].endRow),K=Math.max(K,e[Q].endCol);for(let Q=0;Q<t.length;Q++)W=Math.max(W,t[Q].endRow),K=Math.max(K,t[Q].endCol);for(let Q of this.dataBridge.getWorkbook().getPivotTableManager().listEmptyPivotRanges(r.sheetId))W=Math.max(W,Q.to.row),K=Math.max(K,Q.to.col);return new sn(R,L,W=Math.min(W,g-1),K=Math.min(K,a-1))}async getDrawings(e,t){let r=this.dataBridge.getWorkbook(),i=new SV(new pue(this.rowOffset,this.colOffset)),a=this.filterDrawing(this.sheet.getDrawingPlugin().getImagesJSON(),e,i),g=this.filterDrawing(this.sheet.getDrawingPlugin().getChartsJSON(),e,i);function R(se){return new Promise(he=>{if(se.src&&se.complete)return void he();se.onload=he,se.onerror=he})}let L=r.getVersion(),W=await Promise.all(a.map(async se=>{let he=se.json,me=document.createElement("img");return me.src=await this.uiBridge.getImageDisplayURL(he.path,L),{...se,drawable:me,promise:R(me)}})),K=document.createElement("div");document.body.appendChild(K);let Q=new CD(K),oe=g.filter(se=>se.json.chartInfo.isDrawable()).map(se=>{let he=se.json.chartInfo,me=se.domPosition,ye=document.createElement("img");return K.style.width=me.width+"px",K.style.height=me.height+"px",Q.resize(),Q.draw(he),ye.src=Q.getDataURL({pixelRatio:t}),{...se,drawable:ye,promise:R(ye)}});return Q.destroy(),document.body.removeChild(K),{coordImages:W,coordCharts:oe}}filterDrawing(e,t,r){return e.map(i=>{let a=r.toAbsolutePosition(i.position),g=this.findRowIndex(a.top),R=this.findRowIndex(a.top+a.height),L=this.findColIndex(a.left),W=this.findColIndex(a.left+a.width);return g>t.to.row||R<t.from.row||L>t.to.col||L<t.from.col?null:{startRow:g,startCol:L,endRow:R,endCol:W,domPosition:a,json:i}}).filter(ga)}findRowIndex(e){return Math.max(Xs(this.rowOffset,e)-1,0)}findColIndex(e){return Math.max(Xs(this.colOffset,e)-1,0)}genRenderOptions(e){return{scaleRatio:e,includeHeader:!1,mode:"print",gridColor:this.printOption.showGrid?Oa.BORDER_COLOR:null}}cutPage(e,t,r,i){function a(g,R,L,W){let K=[],Q=e.from[g],oe=L[Q]+R,se=[];for(K.push({preOffset:-1,indices:se}),W(Q)||se.push(Q),Q+=1;Q<=e.to[g];)oe<L[Q+1]&&(oe=L[Q]+R,K.push({preOffset:-1,indices:se=[]})),W(Q)||se.push(Q),Q+=1;return K}return{rowsCut:a("row",r/i,this.rowOffset,g=>this.sheet.isHiddenRow(g)),colsCut:a("col",t/i,this.colOffset,g=>this.sheet.isHiddenCol(g))}}printPage(e,t,r,i,a,g,R){e.generateRenderInfo(),e.drawAll();let{startX:L,startY:W,scaleRatio:K}=a,Q=r[0],oe=r[r.length-1],se=i[0],he=i[i.length-1],me=this.rowOffset[Q],ye=this.colOffset[se],Te=t.getContext("2d");this.drawDrawings(Te,g,R,{row:Q,col:se,rowOffset:me-W,colOffset:ye-L},{row:oe,col:he},K)}drawDrawings(e,t,r,i,a,g){e.save(),e.scale(g,g);for(let R=0;R<t.length;R++){if(t[R].startRow>a.row||t[R].endRow<i.row||t[R].startCol>a.col||t[R].endCol<i.col)continue;let{drawable:L,domPosition:W}=t[R];e.drawImage(L,W.left-i.colOffset+1,W.top-i.rowOffset+1,W.width,W.height)}for(let R=0;R<r.length;R++){if(r[R].startRow>a.row||r[R].endRow<i.row||r[R].startCol>a.col||r[R].endCol<i.col)continue;let L=r[R].domPosition,W=L.left-i.colOffset+1,K=L.top-i.rowOffset+1;e.fillStyle="#FFFFFF",e.fillRect(W,K,L.width,L.height),r[R].drawable&&e.drawImage(r[R].drawable,W,K,L.width,L.height),e.strokeStyle="#000000",e.strokeRect(W-.5,K-.5,L.width,L.height)}e.restore()}}class wue extends sW{constructor(e,t,r,i,a,g=!1){super(e,t,i,a),this.wrapper=r,this.textOnDiv=g}createDrawer(e,t,r){return this.textOnDiv?new yue(e,t,r):new Up(t,r)}async printRange(e,t,r){let i=this.genRenderOptions(this.fitRatio),{width:a,height:g}=this.printOption,{rowsCut:R,colsCut:L}=this.cutPage(e,a,g,this.fitRatio),W=[];for(let K=0;K<R.length;K++)for(let Q=0;Q<L.length;Q++){let oe=document.createElement("canvas");oe.width=a,oe.height=g;let se=document.createElement("div");se.style.pageBreakAfter="always";let he=new Fy({drawer:this.createDrawer(se,oe,{scale:i.scaleRatio,rtl:this.sheet.isRtl()})},this.sheet,R[K].indices,L[Q].indices,i,this.getUIBridge());he.measureGrid(),this.printPage(he,oe,R[K].indices,L[Q].indices,{startX:-L[Q].preOffset,startY:-R[K].preOffset,...i},t,r);let me=document.createElement("img");me.style.width=a+"px",me.style.height=g+"px",W.push(new Promise((ye,Te)=>{me.onload=function(){ye()},me.onerror=Te,oe.toBlob(Me=>{Me?me.src=URL.createObjectURL(Me):Te()})})),se.appendChild(me),this.wrapper.appendChild(se)}await Promise.all(W)}}class bue extends sW{constructor(e,t,r,i,a){super(e,t,i,a),this.pdf=r}async printRange(e,t,r){let i=this.genRenderOptions(this.fitRatio),{width:a,height:g}=this.printOption,R=this.printOption.margin??0,{rowsCut:L,colsCut:W}=this.cutPage(e,a,g,this.fitRatio);for(let K=0;K<L.length;K++)for(let Q=0;Q<W.length;Q++)this.printPdfPage(R,L[K].indices,W[Q].indices,{startX:-W[Q].preOffset+R/this.fitRatio,startY:-L[K].preOffset+R/this.fitRatio,...i},t,r)}printPdfPage(e,t,r,i,a,g){let R=this.pdf,L=t[0],W=t[t.length-1],K=r[0],Q=r[r.length-1],oe=this.rowOffset[L],se=this.colOffset[K],he=this.rowOffset[W+1],me=this.colOffset[Q+1],ye=Math.min(R.width-2*e,me-se+1),Te=Math.min(R.height-2*e,he-oe+1);R.addPage();let Me=R.getContext();Me.save(),this.sheet.isRtl()?Me.rect(R.width-e-ye,e,ye,Te):Me.rect(e,e,ye,Te),Me.clip();let Oe=new vue(R,this.sheet,t,r,i,this.getUIBridge());Oe.measureGrid(),this.printPage(Oe,R,t,r,i,a,g),Me.restore()}}class Cue extends ns{static#e=this.pluginName="synoPrint";async printSheets(e,t,r,i){i===void 0&&(i=!1);let a=this.getHot().getDataBridge();for await(let[g,{range:R}]of a.iteratePrintSheet(t))await new wue(a,g,e,r,this.getHot().getUIBridge(),i).print(R)}analyzePrintRange(e){switch(e){case"all_sheet":return this.getWorkbook().getOrder().map(t=>({sheetId:t}));case"selection":return[{sheetId:this.getSheet().sheetId,range:this.getHot().getSelectedRange()?.clone().normalize()}];default:return[{sheetId:this.getSheet().sheetId}]}}async renderToIframe(e,t,r){let{printRange:i,orientation:a}=r,g=document.createElement("div"),R=e.contentDocument;R.body.appendChild(g);let L=this.analyzePrintRange(i);await this.printSheets(g,L,t,!0);let W=R.createElement("style");W.type="text/css",W.textContent=`@page { size: ${a}; }`,R.head.appendChild(W);let K=g.lastChild;K&&(K.style.pageBreakAfter="avoid")}async execPrint(e,t,r){let i=document.createElement("iframe");try{await new Promise((R,L)=>{i.onload=R,i.onerror=L,document.body.appendChild(i)});let a=i.contentDocument,g=a.createElement("style");g.textContent=z6(document.styleSheets),a.head.appendChild(g),a.body.style.margin="0",await W6(a.fonts),await this.renderToIframe(i,e,t),await new Promise(R=>{let L,W=i.contentWindow;W.onafterprint=function(){R(!0)};try{L=i.contentDocument.execCommand("print",!1,void 0)}catch{}L||W.print()})}catch{}i.contentDocument.querySelectorAll('img[src^="blob:"]').forEach(a=>{URL.revokeObjectURL(a.src)}),i.remove(),r&&r()}async printPdfs(e,t,r){let i=this.getHot().getDataBridge();for await(let[a,{range:g}]of i.iteratePrintSheet(this.analyzePrintRange(t)))await new bue(i,a,e,r,this.getHot().getUIBridge()).print(g,2)}}class _ue extends ns{static#e=this.pluginName="synoValidation";constructor(e){super(e),this._hoverCoord=null,this._lastValidation=null}initHook(){let e=this.getHot();e.addHook("afterOnCellMouseOver",(t,r,i,a)=>this.afterOnCellMouseOver(t,r,i,a)),e.addHook("beforeOnCellMouseDown",t=>this.beforeOnCellMouseDown(t)),e.addHook("openEditor",(t,r,i,a)=>this.showValidList(t,r,i,a)),e.addHook("closeEditor",()=>this.closeEditor())}afterOnCellMouseOver(e,t,r,i){let a=r?r.from.row:t.row,g=r?r.from.col:t.col,R=this.getSheet().getCellProperty(a,g,"validId"),L=this.getSheet().getCellProperty(a,g,"synoInvalid"),W=R?this.getSheet().getValidationPlugin().getValidationView(R,a,g):null;this._handleMouseOverDropdown(R,e,t,r,i),this._handleTip(L===!1?W:null,t,i)}_handleMouseOverDropdown(e,t,r,i,a){if(!e||!this.getSheet().getValidationPlugin().isDropdownValidation(e))return void this._clearHover();let g=i?i.from.row:r.row,R=i?i.from.col:r.col,L=this.getView(),W=L.viewport.getZoomLevel(),{x:K,y:Q,width:oe,height:se}=a,he=L.getViewPoint({x:t.pageX,y:t.pageY}),me=this.getSheet();if(g>=me.getFreezePlugin().fixedRowsTop&&Q+se/2<=L.getFreezeSize().freezeHeight||me.getFilterPlugin().hasDropdown(g,R)||he.x<K+oe-Bh.getPadding()*W||he.y<Q+se/2-Bh.getHeight()*W/2||he.y>Q+se/2+Bh.getHeight()*W/2)return void this._clearHover();this.isHovering(g,R)||(this._clearHover(),this._hoverCoord={row:g,col:R,renderedRow:r.row,renderedCol:r.col},L.rerenderValidationDropdown(r.row,r.col,!0))}_handleTip(e,t,r){if(e?.showHelp){if(this._lastValidation?.validId!==e.validId){let i=this.getView(),a=i.getCanvasBound(),g=r.x+r.width+a.x,R=r.y+r.height+a.y;this.getHot().getUIBridge().editor.validationTip.show(e,t.row,t.col,i.canvas,g,R),this._lastValidation=e}}else this.getHot().getUIBridge().editor.validationTip.hide(),this._lastValidation=null}beforeOnCellMouseDown(e){if(this.getWorkbook().isReadonly()||!this._hoverCoord||Da(e))return;let t=this.getHot(),r=t.getActiveEditor(),i=this._hoverCoord;r.finishEditing().then(()=>(t.selectCell(i.row,i.col,i.row,i.col,!1),r.beginEditing(i,null,"tail","validation"))).then(()=>{r.enableFullEditMode()}),q(e),e.stopPropagation()}async showValidList(e,t,r,i){if(this.getWorkbook().isReadonly()||i==="top"||i==="function")return;let a=this.getSheet(),g=a.getCellProperty(e,t,"validId");if(!g)return;let R=await this.getHot().getDataBridge().createListRangeItems(a.sheetId,g,e,t);this.getHot().getUIBridge().editor.validationList.show(a,e,t,R)}closeEditor(){this.getHot().getUIBridge().editor.validationList.hide()}isHovering(e,t){return!!this._hoverCoord&&this._hoverCoord.row===e&&this._hoverCoord.col===t}_clearHover(){if(!this._hoverCoord)return;let{renderedRow:e,renderedCol:t}=this._hoverCoord;this._hoverCoord=null,this.getView().rerenderValidationDropdown(e,t,!1)}}class lW{constructor(e,t){this._hot=e,this._className=t.className,this._backgroundColor=t.color,this._topMost=t.topMost??!1,this._divs=[]}destroy(){for(let e=0;e<this._divs.length;e++){let t=this._divs[e];t.parentNode?.removeChild(t)}this._divs=[]}showDivBlocks(e){let t=0;for(let{x:r,y:i,width:a,height:g}of e){if(g<=1||a<=1)continue;let R=this._getDivBlock(t);this._showBlock(R,r,i,a,g),t+=1}for(let r=t;r<this._divs.length;r++)this._hideBlock(this._divs[r])}_getDivBlock(e){if(!this._divs[e]){let t=this._divs[e]=ie(this._hot.rootElement,"syno-o-sh-cell-highlight");t.classList.add(this._topMost?"cover-highlight":"content-highlight"),this._className?t.classList.add(this._className):this._backgroundColor&&(t.style.backgroundColor=this._backgroundColor)}return this._divs[e]}_showBlock(e,t,r,i,a){this._hot.view.setViewPosition(e,r,t),e.style.width=i+"px",e.style.height=a+"px",e.style.display="block"}_hideBlock(e){e.style.display="none"}hideAllBlock(){for(let e=0;e<this._divs.length;e++)this._hideBlock(this._divs[e])}}class uW extends lW{showBlocks(e){let t=this._hot.view,r=this._hot.sheet;if(!r)return;let i=r.getMergePlugin();this.showDivBlocks(e.map(a=>{let g=i.getMergedRange(a.row,a.col);if(g&&(g.from.row!==a.row||g.from.col!==a.col))return null;let R=g?g.to.row:a.row,L=g?g.to.col:a.col;return t.getRangeViewBound(a.row,a.col,R,L,!0)}).filter(ga))}}function hW(n){return n.type==="comment"}function cW(n){return n.type==="sheet_note"}function dW(n){return n.type==="sheet_drawing"}function Sue(n){return n.type==="sheet"}class Iue extends ns{static#e=this.pluginName="synoHighlight";constructor(e,t){super(e,t),this.config=t?.highlight??{},this.cellHighlightHandler=new uW(e,{color:this.config.default?.color,className:this.config.default?.class,topMost:!0});let r=this.config.media??this.config.default;this.imageHighlightHandler=new lW(e,{color:r?.color,className:r?.class,topMost:!0}),this.highlights=(0,ne.shallowRef)([]),this.sheetHighlightMap=(0,ne.computed)(()=>{let i=new Map;for(let a of this.highlights.value){let g=null,R=null;hW(a)?g=this.changeToCellHighlight(a):cW(a)?g=a:dW(a)&&(R=a);let L=g?.sheetId??R?.sheetId;if(L){let W=i.get(L);W||(W={cell:[],drawing:[]},i.set(L,W)),g?W.cell.push(g):R&&W.drawing.push(R)}}return i})}initHook(){super.initHook();let e=this.getHot();e.addHook("afterRender",()=>this.afterRender()),e.addHook("beforeHideSheet",()=>this.hideAllBlock())}afterRender(){let e=this.getSheet().sheetId,{cell:t=[],drawing:r=[]}=this.sheetHighlightMap.value.get(e)??{};t.length>0?this.cellHighlightHandler.showBlocks(t):this.cellHighlightHandler.hideAllBlock();let i=this.getHot().getPlugin("synoDrawingController");i&&r.length>0?this.imageHighlightHandler.showDivBlocks(r.map(a=>{let g=i.getDrawingViewBound(a.drawingId);return g?{x:g.left,y:g.top,width:g.width,height:g.height}:null}).filter(ga)):this.imageHighlightHandler.hideAllBlock()}getHighlightConfig(e){return this.config[e]??{}}hideAllBlock(){this.cellHighlightHandler.hideAllBlock(),this.imageHighlightHandler.hideAllBlock()}async updateHighlight(e,t){let{skipScroll:r=!1}=t===void 0?{}:t;this.highlights.value=e,this.hideAllBlock(),r||await this.scrollToHighlight(),this.getHot().render()}getWorksheetHighlights(){return this.highlights.value.filter(Sue)}getDrawingHighlightBySheet(e){return this.sheetHighlightMap.value.get(e)?.drawing}async scrollToHighlight(){let e=this.highlights.value[0];e&&(hW(e)?await this.scrollToCommentHighlight(e):cW(e)?await this.scrollToCellHighlight(e):dW(e)?await this.scrollToDrawingHighlight(e):"sheetId"in e&&await this.scrollToWorksheetHighlight(e))}changeToCellHighlight(e){let t=this.getWorkbook().getCommentStore().getCommentById(e.commentId);return t?{sheetId:t.sheetId,row:t.row,col:t.col}:null}async scrollToCommentHighlight(e){let t=this.changeToCellHighlight(e);t&&await this.scrollToCellHighlight(t)}async scrollToCellHighlight(e){let{sheetId:t,row:r,col:i}=e;await this.scrollToWorksheetHighlight({sheetId:t}),this.getHot().scrollToRange(r,i,r,i)}async scrollToDrawingHighlight(e){let{sheetId:t,drawingId:r}=e;await this.scrollToWorksheetHighlight({sheetId:t}),this.getHot().scrollToDrawing(r)}async scrollToWorksheetHighlight(e){let{sheetId:t}=e;t!==this.getWorkbook().getCurrentSheet()?.sheetId&&await this.getDataBridge()?.setCurrent(t)}}let xue=[qh,aue,sue,lue,uue,cue,fue,gue,Cue,_ue,are,Iue],Tue=[vle,ble,Ale,class extends Mle{getDataView(){return{fixedRowsTop:this.fixedRowsTop,fixedColumnsLeft:this.fixedColumnsLeft}}getStateJSON(){return this.getDataView()}},Nle,Ble,Fle,Hle,Wle,Gle,Yle,rre,class extends Dc{constructor(n){super(n,"synoCellDirection")}enablePlugin(){super.enablePlugin(),this.addHook("afterChangeResolve",n=>this.onAfterChangeResolve(n)),this.addHook("afterAlignmentChange",n=>this.onAfterAlignmentChange(n))}afterDataRenderer(n,e,t,r){if(r.dir!==void 0)return;let i=t.getValue(),a=dV(Zr(i)?i.getText():this.sheet.getCellTextDesc(n,e).getText(),t.getCellStyle().getAlignment().readingOrder);this.sheet.setCellMeta(n,e,[["dir",a]])}onAfterChangeResolve(n){for(let{row:e,col:t}of n)this.clearDirection(e,t)}onAfterAlignmentChange(n){for(let[e,t]of n)this.clearDirection(e,t)}clearDirection(n,e){this.sheet.setCellMeta(n,e,[["dir",void 0]])}}];class kue extends Zse{constructor({objectId:e,baseUrl:t,getImageURL:r,copyable:i},{onCurrentChanged:a}){super(),this.objectId=e,this.baseUrl=t,this.getImageURL=r,this.copyable=i!==!1,this._onCurrentChanged=a}getObjectId(){return this.objectId}getBaseAppURL(){return this.baseUrl}getImageExternalURLSync(e){throw Error("unsupported")}getImageDisplayURL(e,t){let r=this.getImageURL,i=this.getObjectId();return r?r(i,e):Promise.resolve("#")}isCopyable(){return this.copyable}getUserInfo(){throw Error("unsupported")}validateFontFamily(e){throw Error("unsupported")}onCurrentChanged(e){this._onCurrentChanged(e)}}let Aw=(0,ne.createApp)({}),fW=C0e(),Rue=(0,ne.defineComponent)({components:{vButton:fW.vButton,vIcon:fW.vIcon},props:{synoId:{type:String,required:!0},iconCls:{type:String,default:""},iconHeight:{type:Number,default:24},iconWidth:{type:Number,default:24},iconIndex:{type:Number,default:0}},computed:{iconStyle(){return{height:`${this.iconHeight}px`,width:`${this.iconWidth}px`,fontSize:`${this.iconHeight}px`,"--icon-index":`${this.iconIndex}em`}}}});var Mw=B(65426);let gW={};gW.$style={btn:"IconButton_btn_Qo9X8",icon:"IconButton_icon_a5qBV"};let pW=(0,Mw.default)(Rue,[["render",function(n,e,t,r,i,a){let g=(0,ne.resolveComponent)("v-icon"),R=(0,ne.resolveComponent)("v-button");return(0,ne.openBlock)(),(0,ne.createBlock)(R,(0,ne.mergeProps)({ref:"button","syno-id":`icon-button-${n.synoId}`,class:n.$style.btn,type:"styleless",display:"icon"},n.$attrs),(0,ne.createSlots)({icon:(0,ne.withCtx)(()=>[(0,ne.createVNode)(g,{class:(0,ne.normalizeClass)([n.iconCls,n.$style.icon]),style:(0,ne.normalizeStyle)(n.iconStyle),type:"bkg-img"},null,8,["class","style"])]),_:2},[n.$slots.default?{name:"dropdown",fn:(0,ne.withCtx)(()=>[(0,ne.renderSlot)(n.$slots,"default")]),key:"0"}:void 0]),1040,["syno-id","class"])}],["__cssModules",gW]]),Eue=["textContent"],Aue=(0,ne.defineComponent)({__name:"TabItem",props:{active:{type:Boolean},selected:{type:Boolean},disabled:{type:Boolean},title:{},color:{},diff:{type:Boolean},highlight:{}},setup(n){(0,ne.useCssVars)(t=>({"45e1bd70":e.value}));let e=(0,ne.computed)(()=>n.highlight??"");return(t,r)=>((0,ne.openBlock)(),(0,ne.createElementBlock)("div",{class:(0,ne.normalizeClass)([t.$style["tab-item"],n.active?t.$style["tab-active"]:"",n.selected?t.$style["tab-selected"]:"",n.disabled?t.$style["tab-disabled"]:"",n.diff||n.highlight?t.$style["tab-diff"]:""])},[(0,ne.createElementVNode)("div",{class:(0,ne.normalizeClass)(t.$style["tab-item-text"]),textContent:(0,ne.toDisplayString)(t.title)},null,10,Eue),t.color?((0,ne.openBlock)(),(0,ne.createElementBlock)("div",{key:0,class:(0,ne.normalizeClass)(t.$style["tab-color-line"]),style:(0,ne.normalizeStyle)({borderColor:`#${t.color}`})},null,6)):(0,ne.createCommentVNode)("",!0)],2))}}),mW={};mW.$style={"tab-item":"TabItem_tab-item_pJLTK",tabItem:"TabItem_tab-item_pJLTK","tab-active":"TabItem_tab-active_vbJ9Z",tabActive:"TabItem_tab-active_vbJ9Z","tab-disabled":"TabItem_tab-disabled_m6ij9",tabDisabled:"TabItem_tab-disabled_m6ij9","tab-diff":"TabItem_tab-diff_aavVx",tabDiff:"TabItem_tab-diff_aavVx","tab-item-text":"TabItem_tab-item-text_SBlfu",tabItemText:"TabItem_tab-item-text_SBlfu","tab-selected":"TabItem_tab-selected_FvzYh",tabSelected:"TabItem_tab-selected_FvzYh","tab-color-line":"TabItem_tab-color-line_ed84C",tabColorLine:"TabItem_tab-color-line_ed84C"};let vW=(0,Mw.default)(Aue,[["__cssModules",mW]]),Mue=(0,ne.defineComponent)({__name:"SimpleTabBar",props:{visibleTabs:{},activeId:{},readonly:{type:Boolean}},emits:["update-active","context-menu","drag-drop","tab-dblclick"],setup(n,e){let{expose:t,emit:r}=e,i=(0,ne.useSlots)(),a=(0,ne.ref)(n.activeId?[n.activeId]:[]),g=(0,ne.ref)(null),{canScrollLeft:R,canScrollRight:L,update:W}=function(qe){let Ke=(0,ne.ref)(!1),at=(0,ne.ref)(!1),gt=(0,ne.ref)(!1),pt=(0,ne.ref)(!1),Tt=new ResizeObserver(an=>{jt()});function jt(){let an=qe.value;if(!an){Ke.value=!1,at.value=!1,gt.value=!1,pt.value=!1;return}Ke.value=an.scrollTop>0,at.value=an.scrollHeight-an.clientHeight-an.scrollTop>=1,gt.value=an.scrollLeft>0,pt.value=an.scrollWidth-an.clientWidth-an.scrollLeft>=1}function on(){jt()}let hn=null,un=(0,ne.watch)(qe,an=>{hn?.(),an&&(an.addEventListener("scroll",on,{passive:!0}),Tt.observe(an),hn=()=>{an.removeEventListener("scroll",on),Tt.unobserve(an)}),jt()},{immediate:!0});return(0,ne.onScopeDispose)(function(){un(),hn?.()}),{canScrollUp:Ke,canScrollDown:at,canScrollLeft:gt,canScrollRight:pt,update:jt}}(g),{match:K}=function(qe){let Ke=window.matchMedia(qe),at=(0,ne.ref)(Ke.matches);function gt(){at.value=Ke.matches}return Ke.addEventListener("change",gt),(0,ne.onScopeDispose)(function(){Ke.removeEventListener("change",gt)}),{match:at}}("(max-width: 768px)"),{posX:Q,dragging:oe,setup:se}=function(qe,Ke){let at=0,gt=(0,ne.ref)(0),pt=(0,ne.ref)(null),Tt=null,{setup:jt,clean:on}=function(Ut,kt){kt===void 0&&(kt=100);let Pt=(0,ne.ref)(null),mn=(0,ne.computed)(()=>!!Pt.value),Zt=(0,ne.watch)(Ut,(fn,er)=>{er&&dn()});function dn(){Pt.value&&window.clearInterval(Pt.value),Pt.value=null}return(0,ne.onScopeDispose)(function(){Zt(),dn()}),{keepScrolling:mn,setup:function(fn,er){fn===void 0&&(fn=0),er===void 0&&(er=0),dn();let yr=Ut.value;if(!yr)return;let Ei=()=>{yr.scrollBy({top:er,left:fn})};Pt.value=window.setInterval(Ei,kt),Ei()},clean:dn}}(qe);function hn(){(pt.value||Tt)&&(document.removeEventListener("mousemove",un),document.removeEventListener("mouseup",an),on(),at=0,gt.value=0,pt.value=null,Tt=null)}function un(Ut){if(!pt.value){if(!Tt||10>Math.abs(Tt.x-Ut.clientX))return;pt.value=Tt.dragging,Tt=null}let kt=qe.value,Pt=pt.value?.box;if(!kt||!Pt)return;let mn=kt.getBoundingClientRect();gt.value=Ut.clientX-at-mn.left,gt.value<0?jt(gt.value):gt.value+Pt.width>mn.width?jt(gt.value+Pt.width-mn.width):on()}function an(){let Ut=function(){let kt=qe.value;if(!kt||!pt.value)return-1;let{box:Pt,index:mn}=pt.value,Zt=gt.value+kt.getBoundingClientRect().left,dn=Zt+Pt.width;for(let fn=0;fn<mn;fn++){let er=kt.children[fn].getBoundingClientRect();if(dn<er.right+10||Zt<=er.x+er.width/2)return fn}for(let fn=kt.children.length-1;fn>mn;fn--){let er=kt.children[fn].getBoundingClientRect();if(Zt>er.x-10||dn>=er.x+er.width/2)return fn}return-1}();Ut>=0&&Ke(Ut),hn()}return(0,ne.onScopeDispose)(function(){hn()}),{posX:gt,dragging:pt,setup:function(Ut,kt){let Pt=qe.value;if(pt.value||!Pt)return hn;let mn=function(dn){let fn=qe.value;if(!fn)return-1;for(let er=0;er<fn.children.length;er++)if(fn.children[er].contains(dn.target))return er;return-1}(Ut);if(mn<0)return hn;document.addEventListener("mousemove",un,{passive:!0}),document.addEventListener("mouseup",an,{passive:!0});let Zt=Pt.children[mn].getBoundingClientRect();return at=Ut.clientX-Zt.left,gt.value=Ut.clientX-at-Pt.getBoundingClientRect().left,Tt={dragging:{...kt,index:mn,box:Zt},x:Ut.clientX},hn}}}(g,function(qe){let Ke=n.visibleTabs[qe]?.sheetId;if(!Ke||!oe.value)return;let{sheetId:at}=oe.value;r("drag-drop",at,Ke)}),he=(0,ne.computed)(()=>a.value.length===n.visibleTabs.length),me=(0,ne.computed)(()=>R.value||L.value),ye=(0,ne.computed)(()=>!K.value&&!!i.info);function Te(){let qe=n.visibleTabs.findIndex(at=>at.sheetId===n.activeId);g.value?.children[qe]?.scrollIntoView()}function Me(qe,Ke){Ke===void 0&&(Ke=!1);let at=g.value;at&&at.scroll({left:at.scrollLeft+qe,top:0,behavior:Ke?"smooth":"auto"})}async function Oe(qe,Ke){a.value.includes(Ke)?n.activeId&&r("context-menu",qe,n.activeId,(0,ne.toRaw)(a.value)):r("context-menu",qe,Ke,[Ke])}function ze(qe){if(qe.shiftKey)return;let Ke=qe.deltaY>0?20:qe.deltaY<0?-20:0;Ke!==0&&Me(Ke)}function We(qe){let Ke=g.value;Ke&&Me(Math.max(Ke.clientWidth-100,100)*(qe?-1:1),!0)}return(0,ne.watch)(()=>n.activeId,async qe=>{qe&&((!a.value.includes(qe)||he.value)&&(a.value=[qe]),await(0,ne.nextTick)(),Te())}),(0,ne.watch)(()=>n.visibleTabs,async()=>{await(0,ne.nextTick)(),W()}),t({scrollToActive:Te}),(qe,Ke)=>((0,ne.openBlock)(),(0,ne.createElementBlock)("div",{class:(0,ne.normalizeClass)(qe.$style["tab-bar"])},[(0,ne.createElementVNode)("div",{class:(0,ne.normalizeClass)(qe.$style["tab-left"])},[(0,ne.renderSlot)(qe.$slots,"left",{btnCls:qe.$style["tab-btn"]})],2),(0,ne.createElementVNode)("div",{class:(0,ne.normalizeClass)(qe.$style["tab-center"])},[(0,ne.createElementVNode)("div",{ref_key:"itemWrapper",ref:g,class:(0,ne.normalizeClass)([qe.$style["tab-item-wrapper"],"syno-sh-editor-comp"]),onWheel:ze},[((0,ne.openBlock)(!0),(0,ne.createElementBlock)(ne.Fragment,null,(0,ne.renderList)(n.visibleTabs,at=>{let{sheetId:gt,title:pt,color:Tt,disabled:jt,diff:on,highlight:hn}=at;return(0,ne.openBlock)(),(0,ne.createBlock)(vW,{key:gt,style:(0,ne.normalizeStyle)(gt===(0,ne.unref)(oe)?.sheetId?{visibility:"hidden"}:{}),title:pt,color:Tt,active:gt===n.activeId,selected:a.value.includes(gt),disabled:jt??!1,diff:on,highlight:hn,onMousedown:un=>function(an,Ut){if(!(an.button===2||je()&&an.ctrlKey)){if(je()?an.metaKey:an.ctrlKey)Ut!==n.activeId&&function(kt){let Pt=a.value.indexOf(kt);Pt>=0?a.value.splice(Pt,1):a.value.push(kt)}(Ut);else if(an.shiftKey){let kt=n.visibleTabs.findIndex(Zt=>Zt.sheetId===Ut),Pt=n.visibleTabs.findIndex(Zt=>Zt.sheetId===n.activeId);if(kt<0||Pt<0)return;let mn=kt<=Pt?[kt,Pt]:[Pt,kt];a.value=n.visibleTabs.filter((Zt,dn)=>mn[0]<=dn&&dn<=mn[1]).map(Zt=>Zt.sheetId)}else Ut!==n.activeId&&r("update-active",Ut);if(!n.readonly&&n.visibleTabs.length>1){let kt=n.visibleTabs.find(Zt=>Zt.sheetId===Ut);if(!kt)return;let{title:Pt,color:mn}=kt;se(an,{sheetId:Ut,title:Pt,color:mn})}an.preventDefault()}}(un,gt),onContextmenu:un=>Oe(un,gt),onDblclick:un=>{!n.readonly&&r("tab-dblclick",gt)}},null,8,["style","title","color","active","selected","disabled","diff","highlight","onMousedown","onContextmenu","onDblclick"])}),128))],34),(0,ne.unref)(oe)?((0,ne.openBlock)(),(0,ne.createBlock)(vW,{key:0,class:(0,ne.normalizeClass)(qe.$style["dragging-tab"]),style:(0,ne.normalizeStyle)({left:`${(0,ne.unref)(Q)}px`}),title:(0,ne.unref)(oe).title,color:(0,ne.unref)(oe).color,active:!0,selected:!0,disabled:!1},null,8,["class","style","title","color"])):(0,ne.createCommentVNode)("",!0),(0,ne.unref)(R)?((0,ne.openBlock)(),(0,ne.createElementBlock)("div",{key:1,class:(0,ne.normalizeClass)([qe.$style["gradient-block"],qe.$style["gradient-block-left"]])},null,2)):(0,ne.createCommentVNode)("",!0),(0,ne.unref)(L)?((0,ne.openBlock)(),(0,ne.createElementBlock)("div",{key:2,class:(0,ne.normalizeClass)([qe.$style["gradient-block"],qe.$style["gradient-block-right"]])},null,2)):(0,ne.createCommentVNode)("",!0)],2),(0,ne.createElementVNode)("div",{class:(0,ne.normalizeClass)(qe.$style["tab-right"]),style:(0,ne.normalizeStyle)({width:`${ye.value?256:52}px`})},[me.value?((0,ne.openBlock)(),(0,ne.createBlock)(pW,{key:0,"syno-id":"scroll-left-button",class:(0,ne.normalizeClass)([qe.$style["tab-btn"],"syno-sh-editor-comp"]),"icon-cls":qe.$style["tab-icon-scroll-left"],"icon-index":4,disabled:!(0,ne.unref)(R),onClick:Ke[0]||(Ke[0]=at=>We(!0))},null,8,["class","icon-cls","disabled"])):(0,ne.createCommentVNode)("",!0),me.value?((0,ne.openBlock)(),(0,ne.createBlock)(pW,{key:1,"syno-id":"scroll-right-button",class:(0,ne.normalizeClass)([qe.$style["tab-btn"],"syno-sh-editor-comp"]),"icon-cls":qe.$style["tab-icon-scroll-right"],"icon-index":8,disabled:!(0,ne.unref)(L),onClick:Ke[1]||(Ke[1]=at=>We(!1))},null,8,["class","icon-cls","disabled"])):(0,ne.createCommentVNode)("",!0),(0,ne.createElementVNode)("div",{class:(0,ne.normalizeClass)(qe.$style.space)},null,2),ye.value?(0,ne.renderSlot)(qe.$slots,"info",{key:2}):(0,ne.createCommentVNode)("",!0)],6)],2))}}),yW={};yW.$style={"tab-bar":"SimpleTabBar_tab-bar_Uk4Ao",tabBar:"SimpleTabBar_tab-bar_Uk4Ao","tab-btn":"SimpleTabBar_tab-btn_yjABN",tabBtn:"SimpleTabBar_tab-btn_yjABN","tab-icon-scroll-left":"SimpleTabBar_tab-icon-scroll-left_dnP0J",tabIconScrollLeft:"SimpleTabBar_tab-icon-scroll-left_dnP0J","tab-icon-scroll-right":"SimpleTabBar_tab-icon-scroll-right_XzcAu",tabIconScrollRight:"SimpleTabBar_tab-icon-scroll-right_XzcAu","tab-left":"SimpleTabBar_tab-left_qzOd5",tabLeft:"SimpleTabBar_tab-left_qzOd5","tab-center":"SimpleTabBar_tab-center_MhmqM",tabCenter:"SimpleTabBar_tab-center_MhmqM","tab-item-wrapper":"SimpleTabBar_tab-item-wrapper_XOZr_",tabItemWrapper:"SimpleTabBar_tab-item-wrapper_XOZr_","dragging-tab":"SimpleTabBar_dragging-tab_k32eC",draggingTab:"SimpleTabBar_dragging-tab_k32eC","gradient-block":"SimpleTabBar_gradient-block_N1GXI",gradientBlock:"SimpleTabBar_gradient-block_N1GXI","gradient-block-left":"SimpleTabBar_gradient-block-left_eY0jL",gradientBlockLeft:"SimpleTabBar_gradient-block-left_eY0jL","gradient-block-right":"SimpleTabBar_gradient-block-right_PUOta",gradientBlockRight:"SimpleTabBar_gradient-block-right_PUOta","tab-right":"SimpleTabBar_tab-right_aecEW",tabRight:"SimpleTabBar_tab-right_aecEW",space:"SimpleTabBar_space_kPlIA"};let Due=(0,Mw.default)(Mue,[["__cssModules",yW]]),Oue=(0,ne.defineComponent)({__name:"HotWrapper",props:{hotCreator:{type:Function}},setup(n,e){let{expose:t}=e,r=(0,ne.ref)(null),{hot:i}=function(a,g){let R=(0,ne.ref)(null),L=(0,ne.computed)(()=>R.value?.hot??null),W=(0,ne.watch)(a,(Q,oe)=>{oe&&K(),Q&&(R.value=(0,ne.markRaw)({hot:g(Q)}))});function K(){R.value?.hot.destroy(),R.value=null}return(0,ne.onScopeDispose)(function(){K(),W()}),{hot:L}}(r,n.hotCreator);return t({hot:i}),(a,g)=>((0,ne.openBlock)(),(0,ne.createElementBlock)("div",{ref_key:"tableWrapper",ref:r,class:(0,ne.normalizeClass)(a.$style.root)},null,2))}}),wW={};wW.$style={root:"HotWrapper_root_j42et"};let Nue=(0,Mw.default)(Oue,[["__cssModules",wW]]);class T0e extends ns{static#e=this.pluginName="synoAutofill";constructor(e){super(e),this.mouseDownOnCellCorner=!1,this.isDragged=0}initHook(){let e=this.getHot();e.addHook("onTargetMouseUp",t=>this.onMouseUp()),e.addHook("afterOnCellCornerMouseDown",t=>this.afterOnCellCornerMouseDown(t)),e.addHook("afterOnCellCornerDblClick",t=>this.afterOnCellCornerDblClick()),e.addHook("afterOnCellMouseOver",(t,r)=>this.afterOnCellMouseDrag(t,r))}onMouseUp(){this.isDragged&&(this.isDragged>1&&this.apply(),this.isDragged=0,this.mouseDownOnCellCorner=!1)}isInProgress(){return this.mouseDownOnCellCorner&&this.isDragged>0}afterOnCellCornerMouseDown(e){Da(e)||this.getSheet().isReadonly()||(this.isDragged=1,this.mouseDownOnCellCorner=!0)}afterOnCellMouseDrag(e,t){this.mouseDownOnCellCorner&&this.isDragged>0&&(this.isDragged+=1,this.showBorder(t))}afterOnCellCornerDblClick(){this.selectAdjacent()}selectAdjacent(){let e=this.getHot(),t=e.getSelectedRange();if(!t)return;let[r,i,a,g]=t.toArray(),R=this.getSheet(),L=R.countRows(),W=Cr(R.getDataAtCell(a+1,i))?function(){let K=0,Q=Cr(R.getDataAtCell(r,i-1))?g+1:i-1;for(let oe=a+1;oe<L&&!Cr(R.getDataAtCell(oe,Q));oe++){for(let se=i;se<=g;se++)if(!Cr(R.getDataAtCell(oe,se)))return K;K+=1}return K}():function(){let K=0;for(let Q=a+1;Q<L&&!Cr(R.getDataAtCell(Q,i));Q++)K+=1;return K}();W&&(e.selections.fill.cellRange=oa(r,i,a+W,g),this.apply())}apply(){let e,t,r,i=this.getHot();if(this.isDragged=0,!i.selections.fill.cellRange)return;let a=i.selections.fill.cellRange.clone().normalize();i.selections.fill.clear();let g=i.getSelectedRange();if(!g)return;let R=g.clone().normalize();a.from.row===R.from.row&&a.from.col<R.from.col?(r="left",e={row:a.from.row,col:a.from.col},t={row:a.to.row,col:R.from.col-1}):a.from.row===R.from.row&&a.to.col>R.to.col?(r="right",e={row:a.from.row,col:R.to.col+1},t={row:a.to.row,col:a.to.col}):a.from.row<R.from.row&&a.from.col===R.from.col?(r="up",e={row:a.from.row,col:a.from.col},t={row:R.from.row-1,col:a.to.col}):a.to.row>R.to.row&&a.from.col===R.from.col&&(r="down",e={row:R.to.row+1,col:a.from.col},t={row:a.to.row,col:a.to.col}),e&&t&&i.getAction().autofill(this.getSheet().sheetId,e,t,R,r).then(L=>{L?i.selectRanges([a.toArray()]):i.selectRanges([R.toArray()]),i.focusInputField()})}showBorder(e){let t=this.getHot(),r=t.getSelectedRange();if(!r)return;let i=r.clone().normalize(),a=Math.max(e.row,0),g=Math.max(e.col,0);a<i.from.row?i.from.row=a:a>i.to.row?i.to.row=a:g<i.from.col?i.from.col=g:g>i.to.col&&(i.to.col=g),t.selections.fill.setRange(i),t.selectionView.updateSelection(t.selections.fill)}}let S1="syno-o-sh-comment-highlight";class k0e extends ns{static#e=this.pluginName="synoComment";constructor(e){super(e),this._highlight=null;let t=this.getView();this.commentDivs=[ie(t.scrollableTopLeft,S1),ie(t.scrollableTopRight,S1),ie(t.scrollableBottomLeft,S1),ie(t.scrollableBottomRight,S1)]}initHook(){this.getHot().addHook("afterRender",()=>this.afterRender())}afterRender(){this.updateCommentDiv()}getHighlightRange(e){let{row:t,col:r}=e,i=this.getSheet().getMergePlugin().getMergedRange(t,r);return i?i.clone():oa(t,r,t,r)}updateHighlight(e){this.getSheet().isReadonly()||(this._highlight=e,this.updateCommentDiv())}updateCommentDiv(){this._highlight&&this._highlight.sheetId===this.getSheet().sheetId?this.showCommentDiv(this._highlight):this.hideCommentDiv()}showCommentDiv(e){let t=this.getView(),r=this.getHighlightRange(e),{x:i,y:a,height:g,width:R}=t.getRangeViewOffset(r.from.row,r.from.col,r.to.row,r.to.col);for(let L=0;L<4;L++)t.setViewPosition(this.commentDivs[L],a,i),this.commentDivs[L].style.width=R+"px",this.commentDivs[L].style.height=g+"px",this.commentDivs[L].style.display="block"}hideCommentDiv(){for(let e=0;e<4;e++)this.commentDivs[e].style.display="none"}}let bW={row:"height",col:"width"},CW="manual-move-row-grab",_W="manual-move-col-grab",th="manual-move-active";function I1(n,e,t){return n==="row"?e.viewport.getRowOffset(t):e.viewport.getColOffset(t)}class R0e extends ns{static#e=this.pluginName="synoManualMove";constructor(e){super(e),this._offsetCache={},this.activeType=null,this.from=null,this.to=null,this.delta=0;let t=this.getView();this.grab={row:ie(t.scrollableBottomLeft,CW),col:ie(t.scrollableTopRight,_W)},this.cornerGrab={row:ie(t.scrollableTopLeft,CW),col:ie(t.scrollableTopLeft,_W)};let r=this.getHot().rootElement;this.block={row:ie(r,"manual-move-row-block"),col:ie(r,"manual-move-col-block")},this.guide={row:ie(r,"manual-move-row-guide"),col:ie(r,"manual-move-col-guide")},this.mouseDownRef=i=>this.onMouseDown(i),this.mouseMoveRef=i=>this.onMouseMove(i),this.mouseUpRef=()=>this.onMouseUp(),this.selectionChangeRef=()=>this.reset()}initHook(){let e=this.getHot();e.addHook("afterSelectionEnd",()=>this.afterSelectionEnd()),e.addHook("beforeHideSheet",()=>this.beforeHideSheet()),e.addHook("afterCreateRow",(t,r)=>this.afterAlterGrid(t,"row",r)),e.addHook("afterCreateCol",(t,r)=>this.afterAlterGrid(t,"col",r)),e.addHook("afterRemoveRow",(t,r)=>this.afterAlterGrid(t,"row",r)),e.addHook("afterRemoveCol",(t,r)=>this.afterAlterGrid(t,"col",r)),e.addHook("onTargetMouseDown",this.mouseDownRef),e.addHook("afterSelection",this.selectionChangeRef),e.addHook("afterDeselect",this.selectionChangeRef)}reset(){var e,t,r,i;if(!this.activeType)return;let a=this.getHot(),g=a.selections.multiSelections.get(0);a.selectionView.updateSelection(g),e=this.grab[this.activeType],u(e,th),t=this.cornerGrab[this.activeType],u(t,th),r=this.block[this.activeType],u(r,th),i=this.guide[this.activeType],u(i,th),a.removeHook("onTargetMouseOver",this.mouseMoveRef),a.removeHook("onTargetMouseUp",this.mouseUpRef),this.activeType=null,this._offsetCache={},this.from=null,this.to=null,this.delta=0}afterSelectionEnd(){if(this.getWorkbook().isReadonly())return;let e=this.getHot().getMultiSelectedRange();if(e&&e.length===1){let t=this.getHot().selections.multiSelections.selectedHeader;if(t.row!==t.col){let r=this.getSheet(),i=e[0].clone().normalize();if(i.getHeight()===r.countRows()!=(i.getWidth()===r.countCols())){let a;if(t.row?a="row":t.col&&(a="col"),a)return void this._setupPosition(a,i)}}}this.activeType&&this.reset()}_setupPosition(e,t){var r,i;this.activeType=e;let a=this.getView();e==="row"?(t.from.col=-1,t.to.col=-1):(t.from.row=-1,t.to.row=-1);let{x:g,y:R,width:L,height:W}=a.getRangeViewOffset(t.from.row,t.from.col,t.to.row,t.to.col),K=e==="row"?R:g,Q=e==="row"?W:L;a.setViewPosition(this.cornerGrab[e],R,g),this.cornerGrab[e].style[bW[e]]=Q+"px",r=this.cornerGrab[e],A(r,th),a.setViewPosition(this.grab[e],R,g),this.grab[e].style[bW[e]]=Q+"px",i=this.grab[e],A(i,th),this._offsetCache.offset=K,this._offsetCache.size=Q,this.from=t.from[e],this.to=t.to[e]}onMouseDown(e){let t=this.activeType;if(t&&(e.target===this.grab[t]||e.target===this.cornerGrab[t])&&e.button===0&&!Da(e)){let{size:r,offset:i}=this._offsetCache;t==="row"?this.setupRowBlock(e,i,r):this.setupColBlock(e,i,r);let a=this.getHot();a.runHooks("afterManualMoveSetup",t);let g=a.selections.multiSelections.get(0);a.selectionView.hideSelectionBorder(g),a.addHook("onTargetMouseOver",this.mouseMoveRef),a.addHook("onTargetMouseUp",this.mouseUpRef),q(e)}}setupRowBlock(e,t,r){let i=this.getView();t>i.getFreezeSize().freezeHeight&&(t-=i.getScrollTop());let a=i.viewport.getLeftOffset()-Qe.ROW_HEADER_WIDTH,g=i.viewport.getRightOffset()-i.getScrollLeft(),R=Math.min(i.getViewWidth(),g)-a;this.setupBlockStyle("row",{x:a,y:t,width:R,height:r}),this._offsetCache.blockOffset=t,this._offsetCache.pagePosition=e.pageY}setupColBlock(e,t,r){let i=this.getView();t>i.getFreezeSize().freezeWidth&&(t-=i.getScrollLeft());let a=i.viewport.getTopOffset()-Qe.COL_HEADER_HEIGHT,g=i.viewport.getBottomOffset()-i.getScrollTop(),R=Math.min(i.getViewHeight(),g)-a;this.setupBlockStyle("col",{x:t,y:a,width:r,height:R}),this._offsetCache.blockOffset=t,this._offsetCache.pagePosition=e.pageX}setupBlockStyle(e,t){var r,i;let{x:a,y:g,width:R,height:L}=t;r=this.grab[e],u(r,th),i=this.cornerGrab[e],u(i,th);let W=this.getView(),K=this.block[e];W.setViewPosition(K,g,a),K.style.width=`${R}px`,K.style.height=`${L}px`;let Q=this.guide[e];W.setViewPosition(Q,g,a),e==="row"?Q.style.width=`${R}px`:Q.style.height=`${L}px`,A(K,th),A(Q,th)}onMouseMove(e){let t,r=this.activeType;if(!r)return;let i=this.getView(),a=i.isRtl(),{pagePosition:g,blockOffset:R}=this._offsetCache,L=(r==="row"?e.pageY:e.pageX)-g;r==="col"&&a&&(L*=-1);let W=r==="row"?"top":a?"right":"left";this.block[r].style[W]=Math.max(R+L,I1(r,i,0))+"px";let K=i.getCoordFromEvent(e);K[r]<0&&(K[r]=0);let Q=this.from,oe=this.to;K[r]<Q?(t=I1(r,i,K[r]),this.delta=K[r]-Q):K[r]>oe?(t=I1(r,i,K[r]+1),this.delta=K[r]-oe):(t=I1(r,i,Q),this.delta=0),t>i.getFreezeSize()[r==="row"?"freezeHeight":"freezeWidth"]&&(t-=r==="row"?i.getScrollTop():i.getScrollLeft()),this.guide[r].style[W]=t+"px"}onMouseUp(){var e;if(!this.activeType||(e=this.block[this.activeType],!E(e,th)))return;let{activeType:t,delta:r}=this,i=this.from,a=this.to,g=t==="row"?"moveRow":"moveCol",R=null,L=this.getSheet().sheetId;R=r<0?this.getAction()[g](L,i+r,-r,a-i+1,!0):r>0?this.getAction()[g](L,i,a-i+1,r,!1):Promise.resolve(!1),this.reset(),R.then(W=>{W?this._updateSelection(t,i,a,r):this.afterSelectionEnd(),this.getHot().focusInputField()}).catch(()=>{})}_updateSelection(e,t,r,i){let a=this.getSheet(),g={row:0,col:0},R={row:a.countRows()-1,col:a.countCols()-1};g[e]=t+i,R[e]=r+i,this.getHot().selectCell(g.row,g.col,R.row,R.col,!1)}beforeHideSheet(){this.activeType&&this.reset()}afterAlterGrid(e,t,r){e!==this.getSheet().sheetId||this.activeType!==t||this.to<r||this.reset()}}function x1(n){let{sheetId:e,row:t,col:r,img:i}=n;return`${e},${t??""},${r??""},${i??""}`}function kD(n){let[e]=n.split(",",1);return e}class E0e extends ns{static#e=this.pluginName="synoOnlinePeer";constructor(e){super(e),this.peers=new Map,this.targetViewMap=new Pue,this.hoveredTargets=new Set,this.showTooltipOnMove=!0,this.previousSheetId=void 0}initHook(){let e=this.getHot();e.addHook("afterOnCellMouseOver",(t,r,i,a)=>this.afterOnCellMouseOver(t,r,i,a)),e.addHook("afterSetZoomLevel",t=>this.afterSetZoomLevel(t)),e.addHook("afterUpdateRtl",t=>this.afterUpdateRtl(t)),e.addHook("beforeRefreshSelections",()=>this.beforeRefreshSelections()),e.addHook("afterRenderComplete",()=>this.afterRenderComplete())}setShowTooltipOnMove(e){this.showTooltipOnMove=e}clear(){this.peers.clear(),this.getHot().fastRender()}updatePeers(e){for(let t of e){if(!t.selection)return;this.update(t,!0)}}update(e,t){if(!e||!e.selection)return;let r=e.clientId,i=this.peers.get(r),a=null;i?(a={...i.selection},i.selection.row=e.selection.row,i.selection.col=e.selection.col,i.selection.img=e.selection.img,i.selection.sheetId=e.selection.id):(i=this.createNewPeer(e),this.peers.set(r,i)),a&&this.leaveTarget(i.clientID,a);let g=this.enterTarget(i,{...i.selection});this.showTooltipOnMove&&t&&this.setTooltipTimeout(g,r);let R=this.getCurrentSheetId();(R===a?.sheetId||R===i.selection.sheetId)&&this.getHot().fastRender("delay")}remove(e){let t=this.peers.get(e);if(!t)return;let r=t.selection;this.leaveTarget(t.clientID,r),this.peers.delete(e),this.getCurrentSheetId()===t.selection.sheetId&&this.getHot().fastRender("delay")}triggerTooltip(e){let t=this.peers.get(e);if(!t)return;let r=this.enterTarget(t,{...t.selection});this.showTooltipOnMove&&this.setTooltipTimeout(r,e),this.getCurrentSheetId()===t.selection.sheetId&&this.getHot().fastRender("delay")}showTooltipOnAvatarClick(e){let t=this.peers.get(e);t&&this.addHoveredTarget(t.selection)}beforeRefreshSelections(){let e=this.getCurrentSheetId();this.getHot().selections.onlinePeerSelections=Array.from(this.peers.values()).filter(t=>{let{selection:{sheetId:r,img:i}}=t;return r===e&&!i}).map((t,r)=>{let{selectionView:i,selection:{row:a,col:g}}=t;return a!==void 0&&g!==void 0&&(i.cellRange=this.getHot().getPlugin("synoMergeCell")?.expandCoords({row:a,col:g})??new sn(a,g,a,g),t.weight=r),i})}afterRenderComplete(){let e=this.getCurrentSheetId();for(let t of[...e?this.targetViewMap.getAllOfSheet(e):[],...this.previousSheetId!==e&&this.previousSheetId?this.targetViewMap.getAllOfSheet(this.previousSheetId):[]])this.updateTargetTooltip(t.selection);this.previousSheetId=this.getCurrentSheetId()}afterOnCellMouseOver(e,t,r,i){if(this.getHot().isRangeSelecting())return;let a=this.getCurrentSheetId();if(!a)return;this.clearHoveredTargets();let g=this.getHot().getPlugin("synoDrawingController"),R=g?.getDrawingByEvent(e);if(R)this.addHoveredTarget({sheetId:a,img:R.id});else{let L=r?r.from.row:t.row,W=r?r.from.col:t.col;this.addHoveredTarget({sheetId:a,row:L,col:W})}}afterSetZoomLevel(e){this.updateAllTooltipTransform({level:e})}afterUpdateRtl(e){this.updateAllTooltipTransform({isRtl:e})}createNewPeer(e){var t;let r=e.clientId,i=e.color;return{clientID:r,selectionView:new Ad(null,null,(t=i,`2px solid ${t}`),"online-peer"),color:i,weight:0,selection:{row:e.selection.row,col:e.selection.col,img:e.selection.img,sheetId:e.selection.id}}}enterTarget(e,t){let r=x1(t),i=this.targetViewMap.get(r);return i||(i=this.createTargetView(t),this.targetViewMap.set(r,i)),i.peers.set(e.clientID,e),i}leaveTarget(e,t){let r=x1(t),i=this.targetViewMap.get(r);i&&(i.peers.delete(e),this.deleteTooltipTimeout(i,e),i.peers.size===0&&(i.tooltipEl.remove(),this.targetViewMap.delete(r)))}setTooltipTimeout(e,t){e.timeouts.has(t)&&this.deleteTooltipTimeout(e,t);let r=setTimeout(()=>{this.deleteTooltipTimeout(e,t),this.updateTargetTooltip(e.selection)},3e3);e.timeouts.set(t,r)}deleteTooltipTimeout(e,t){let r=e.timeouts.get(t);r&&(clearTimeout(r),e.timeouts.delete(t))}addHoveredTarget(e){let t=x1(e),r=this.targetViewMap.get(t);r&&(r.isHovered=!0,this.hoveredTargets.add(t),this.updateTargetTooltip(e))}clearHoveredTargets(){for(let e of this.hoveredTargets){let t=this.targetViewMap.get(e);t&&(t.isHovered=!1,this.updateTargetTooltip(function(r){let[i,a,g,R]=r.split(",");return{sheetId:i,row:a===""?void 0:Number(a),col:g===""?void 0:Number(g),img:R||void 0}}(e)))}this.hoveredTargets.clear()}createTargetView(e){let t=this.getView(),r=ie(this.getHot().rootElement,"peerTips");return function(i){let a=i.style;a.display="none",a.position="fixed",a.boxSizing="border-box",a.padding="3px",a.color="white",a.zIndex="112",a.maxWidth="400px",a.overflowWrap="break-word"}(r),SW(r,t.viewport.getZoomLevel(),t.isRtl()),{tooltipEl:r,selection:e,peers:new Map,timeouts:new Map,isHovered:!1}}updateTargetTooltip(e){let t=this.targetViewMap.get(x1(e));if(!t)return;let r=t.tooltipEl.style;(t.timeouts.size>0||t.isHovered)&&this.getCurrentSheetId()===e.sheetId?(r.display="block",this.updateTooltipContent(t),r.display=this.updateTooltipPosition(t)?"block":"none"):r.display="none"}updateTooltipPosition(e){let t=this.getView();if(!this.getHot().sheet)return!1;let{row:r,col:i,img:a}=e.selection;if(r!==void 0&&i!==void 0){let{x:L,y:W,width:K,height:Q}=t.getRangeViewBound(r,i,r,i,!0);return!(K<=0)&&!(Q<=0)&&(this.setTooltipPosition(e,W,L-1),!0)}let g=this.getHot().getPlugin("synoDrawingController"),R=a&&g?g.getDrawingViewBound(a):null;return!!R&&(this.setTooltipPosition(e,R.top,R.left),!0)}setTooltipPosition(e,t,r){let i=this.getView(),a=this.getHot().rootElement.getBoundingClientRect(),g=e.tooltipEl.style;g.left=i.isRtl()?"":`${r+a.left}px`,g.right=i.isRtl()?`${r+(window.innerWidth-a.right)}px`:"",g.top=`${a.top+t-e.tooltipEl.offsetHeight*i.viewport.getZoomLevel()}px`}updateTooltipContent(e){let t=Cz([...e.peers.keys()]);(function(r,i){let a=r.firstChild;a&&a.nodeType===3&&a.nextSibling===null?Z?a.textContent=i:a.data=i:(Y(r),r.appendChild(document.createTextNode(i)))})(e.tooltipEl,this.getHot().getUIBridge().getPeerTooltip(t)),e.tooltipEl.style.background=this.getColor(t)}updateAllTooltipTransform(e){let{level:t,isRtl:r}=e===void 0?{}:e;for(let i of(t??=this.getView().viewport.getZoomLevel(),r??=this.getView().isRtl(),this.targetViewMap.values()))SW(i.tooltipEl,t,r)}getColor(e){let t;for(let r of e){let i=this.peers.get(r);(!t||i&&i.weight>t.weight)&&(t=i)}return t?t.color:""}getCurrentSheetId(){return this.getSheet()?.sheetId}}class Pue{constructor(){this.maps=new Map}get(e){let t=kD(e);return this.maps.get(t)?.get(e)}set(e,t){let r=kD(e),i=this.maps.get(r);i||(i=new Map,this.maps.set(r,i)),i.set(e,t)}delete(e){let t=kD(e);return this.maps.get(t)?.delete(e)??!1}*values(){for(let e of this.maps.values())yield*e.values()}getAllOfSheet(e){let t=this.maps.get(e);return t?Array.from(t.values()):[]}}function SW(n,e,t){re(n,e,t?"right top":"left top")}class A0e extends ns{static#e=this.pluginName="synoSearch";constructor(e){super(e),this._cellHighlightHandler=new uW(this.getHot(),{className:"syno-o-sh-search-result"})}initHook(){this.getHot().addHook("afterRender",()=>this.update())}update(){if(!this._cellHighlightHandler)return;let e=this.getSheet(),t=e.getWorkbook().getSearchingResults(e.sheetId);if(t.length===0)return void this._cellHighlightHandler.hideAllBlock();let r=t.map(i=>({row:i.row,col:i.col}));this._cellHighlightHandler.showBlocks(r)}destroy(){this._cellHighlightHandler.destroy(),super.destroy()}}let Bue=(0,ne.defineComponent)({__name:"HotPanel",props:{tabs:{},uiBridge:{},hotOptions:{}},emits:["hot-change"],setup(n,e){let{expose:t,emit:r}=e,i=(0,ne.ref)(null),a=(0,ne.ref)(n.tabs[0]?.sheetId),g=(0,ne.computed)(()=>i.value?.hot??void 0),R=(0,ne.computed)(()=>{let K=g.value?.getPlugin("synoHighlight"),Q=K?.getHighlightConfig("default").color,oe=new Set(K?.getWorksheetHighlights().map(se=>se.sheetId));return n.tabs.map(se=>({...se,highlight:oe.has(se.sheetId)?Q:void 0}))});function L(K){g.value?.getDataBridge()?.setCurrent(K)}function W(K){return new _re(K,xue,n.uiBridge,n.hotOptions)}return(0,ne.watch)(g,K=>{r("hot-change",K)}),t({hot:g,updateActiveId:function(K){a.value=K}}),(K,Q)=>((0,ne.openBlock)(),(0,ne.createElementBlock)("div",{class:(0,ne.normalizeClass)(K.$style.root)},[(0,ne.createVNode)((0,ne.unref)(Nue),{ref_key:"hotWrapper",ref:i,class:(0,ne.normalizeClass)(K.$style.hot),"hot-creator":W},null,8,["class"]),(0,ne.createVNode)((0,ne.unref)(Due),{class:(0,ne.normalizeClass)(K.$style.tab),"visible-tabs":R.value,"active-id":a.value,readonly:!0,onUpdateActive:L},null,8,["class","visible-tabs","active-id"])],2))}}),IW={};IW.$style={root:"HotPanel_root_fbsK0",hot:"HotPanel_hot_bE2Wl"};let Lue=(0,Mw.default)(Bue,[["__cssModules",IW]]),Fue=1,T1=new Map,RD=new WeakMap;function xW(n){return T1.get(n)?.instance}async function _m(n){let e=xW(n);if(e)return e.hot?e.hot:new Promise(t=>{let r=(0,ne.watch)(()=>e.hot,i=>{i&&r(),t(i)});RD.set(e,()=>{r(),t(void 0)})})}function TW(n){let e=T1.get(n);if(e){let{instance:t,el:r,app:i}=e;RD.get(t)?.(),i.unmount(),r.parentElement?.removeChild(r),T1.delete(n),RD.delete(t)}}function Vue(n,e,t,r,i,a){var g;let R=(g=e).index&&g.index.order.length!==0?g.index.schemaVersion<Qe.SCHEMA_VERSION?"SCHEMA_VERSION":null:"WRONG_FORMAT";if(R)return{next:()=>Promise.reject(R),abort(){}};let L=new kue(t,{onCurrentChanged:me=>xW(oe)?.updateActiveId(me)}),W=function(me,ye,Te,Me){let{locale:Oe,locale_info:ze}=me,We=new sD(new W9(Oe,ze),k7,ye,Te),qe=new cle(We);return We.setNotifier(new ile(qe,Me)),qe}(e,Tue,{MAX_CELL_COUNT:0,PIVOT_TABLE_ENABLED:!1},L),K=new tae({dataBridge:W,uiBridge:L}),Q=W.getWorkbook();Q.setReadonly(!0),Q.setEditorMode(sD.EDITOR_MODE.HISTORY);let oe=function(me,ye,Te,Me){let Oe=function(){for(var Ke,at=arguments.length,gt=Array(at),pt=0;pt<at;pt++)gt[pt]=arguments[pt];let Tt=(0,ne.createApp)(...gt);return(Ke=Tt).config.globalProperties={...Aw.config.globalProperties,...Ke.config.globalProperties},Object.assign(Ke._context,{directives:{...Aw._context.directives},provides:{...Aw._context.provides,...Ke._context.provides},components:{...Aw._context.components},mixins:[...Aw._context.mixins]}),Tt}(Lue,{tabs:ye,uiBridge:Te,hotOptions:Me}),ze=document.createElement("div");ze.style.height="100%";let We=Oe.mount(me.appendChild(ze)),qe=Fue++;return T1.set(qe,{app:Oe,instance:We,el:ze}),qe}(n,e.index.order.map(me=>{let ye=e.index.sheets[me];return{sheetId:me,title:ye.title,color:ye.tabColor??"",hidden:ye.hidden??!1}}).filter(me=>!me.hidden),L,i);async function se(){let me=await _m(oe);me&&(me.observe({dataBridge:W,action:K}),me.updateSheet(),a&&me.addHook("afterSetZoomLevel",a),r())}let he=W.asyncInit(e,{onActiveInit:se});return{async next(){let{processDelayInfo:me}=await he,ye=await me(),Te=await _m(oe);return ye&&Te&&Te.render(),oe},abort(){he.then(me=>{let{abort:ye}=me;return ye()}).then(()=>{TW(oe)})}}}async function Hue(n,e,t){(await _m(n))?.view.scrollOffset(e,t)}async function $ue(n,e){let t=await _m(n);if(!t)return;await t.getPlugin("synoPrint")?.renderToIframe(e,{width:1009,height:680,showGrid:!0},{printRange:"all_sheet",orientation:"landscape"})}async function zue(n,e){(await _m(n))?.setZoomLevel(e)}async function Wue(n){}async function Uue(n,e,t){await(await _m(n))?.getPlugin("synoHighlight")?.updateHighlight(e,t)}})(),x.exports=G})()}(ab,ab.exports)),ab.exports}var pte=_0e();const S0e=fhe(pte),I0e=Nhe({__proto__:null,default:S0e},[pte]);class x0e extends Che{getSheetApi(){return I0e}getRenderEl(){if(!this._tableWrapper)throw new Error("Please render first");return this._tableWrapper}}const G0e=eZ({__name:"FloatingBar",setup(x){const{enableZoomOut:M,enableZoomIn:k,enableZoomDisplay:F,displayText:B,displayTooltip:G,handType:E,handleZoomOut:A,handleZoomDisplay:u,handleZoomIn:o,handleCursorClick:S,handleHandClick:_}=_he({useComponentStore:lx,useZoomableStore:dF});return(p,f)=>(RL(),tZ(Ko(She),{"display-text":Ko(B),"display-tooltip":Ko(G),"enable-display-button":Ko(F),"enable-zoom-in":Ko(k),"enable-zoom-out":Ko(M),"hand-type":Ko(E),onZoomout:Ko(A),onZoomreset:Ko(u),onZoomin:Ko(o),onCursor:Ko(S),onHand:Ko(_)},null,8,["display-text","display-tooltip","enable-display-button","enable-zoom-in","enable-zoom-out","hand-type","onZoomout","onZoomreset","onZoomin","onCursor","onHand"]))}}),j0e=eZ({__name:"ItemView",setup(x,{expose:M}){const k=FL.XLSX,F=iU(null);Ihe(F,{useComponentStore:lx,useZoomableStore:dF},x0e);const B=iU(null),{show:G,showClose:E,labelText:A,loading:u,handleClose:o,handleValidate:S}=Ehe(EQ,B),{redrawHighlights:_}=The(k,()=>lx().component);return M({redrawHighlights:_}),(p,f)=>(RL(),ghe("div",{class:vhe(Ko(yhe).XLSX_VIEW)},[phe(Ko(xhe),{ref_key:"container",ref:F},null,512),Ko(G)?(RL(),tZ(Ko(Ahe),{key:0,ref_key:"dialog",ref:B,"show-close":Ko(E),"label-text":Ko(A),loading:Ko(u),onClose:Ko(o),onSubmit:Ko(S)},null,8,["show-close","label-text","loading","onClose","onSubmit"])):mhe("",!0)],2))}});export{G0e as FloatingBar,U0e as Item,j0e as ItemView,x0e as UVXlsxContent,W0e as ViewHandler};