import{Z as ge}from"./index-D2_T1wn8.js";var dr=1e-6,A=typeof Float32Array<"u"?Float32Array:Array;Math.hypot||(Math.hypot=function(){for(var r=0,e=arguments.length;e--;)r+=arguments[e]*arguments[e];return Math.sqrt(r)});function xn(){var r=new A(9);return A!=Float32Array&&(r[1]=0,r[2]=0,r[3]=0,r[5]=0,r[6]=0,r[7]=0),r[0]=1,r[4]=1,r[8]=1,r}function dn(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[4],r[4]=e[5],r[5]=e[6],r[6]=e[8],r[7]=e[9],r[8]=e[10],r}function gn(r){var e=new A(9);return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[8]=r[8],e}function vn(r,e,n,t,a,i,o,u,s){var f=new A(9);return f[0]=r,f[1]=e,f[2]=n,f[3]=t,f[4]=a,f[5]=i,f[6]=o,f[7]=u,f[8]=s,f}function mn(r,e){var n=e[0],t=e[1],a=e[2],i=e[3],o=e[4],u=e[5],s=e[6],f=e[7],c=e[8],l=c*o-u*f,x=-c*i+u*s,g=f*i-o*s,h=n*l+t*x+a*g;return h?(h=1/h,r[0]=l*h,r[1]=(-c*t+a*f)*h,r[2]=(u*t-a*o)*h,r[3]=x*h,r[4]=(c*n-a*s)*h,r[5]=(-u*n+a*i)*h,r[6]=g*h,r[7]=(-f*n+t*s)*h,r[8]=(o*n-t*i)*h,r):null}function ve(r,e,n){var t=e[0],a=e[1],i=e[2],o=e[3],u=e[4],s=e[5],f=e[6],c=e[7],l=e[8],x=n[0],g=n[1],h=n[2],d=n[3],m=n[4],v=n[5],w=n[6],M=n[7],p=n[8];return r[0]=x*t+g*o+h*f,r[1]=x*a+g*u+h*c,r[2]=x*i+g*s+h*l,r[3]=d*t+m*o+v*f,r[4]=d*a+m*u+v*c,r[5]=d*i+m*s+v*l,r[6]=w*t+M*o+p*f,r[7]=w*a+M*u+p*c,r[8]=w*i+M*s+p*l,r}function pn(r,e){return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=1,r[5]=0,r[6]=e[0],r[7]=e[1],r[8]=1,r}function yn(r,e){var n=Math.sin(e),t=Math.cos(e);return r[0]=t,r[1]=n,r[2]=0,r[3]=-n,r[4]=t,r[5]=0,r[6]=0,r[7]=0,r[8]=1,r}function bn(r,e){return r[0]=e[0],r[1]=0,r[2]=0,r[3]=0,r[4]=e[1],r[5]=0,r[6]=0,r[7]=0,r[8]=1,r}var wn=ve;function me(){var r=new A(3);return A!=Float32Array&&(r[0]=0,r[1]=0,r[2]=0),r}function Mn(r){var e=new A(3);return e[0]=r[0],e[1]=r[1],e[2]=r[2],e}function pe(r){var e=r[0],n=r[1],t=r[2];return Math.hypot(e,n,t)}function Sn(r,e,n){var t=new A(3);return t[0]=r,t[1]=e,t[2]=n,t}function Dn(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r}function $n(r,e,n,t){return r[0]=e,r[1]=n,r[2]=t,r}function Nn(r,e,n){return r[0]=e[0]+n[0],r[1]=e[1]+n[1],r[2]=e[2]+n[2],r}function _n(r,e,n){return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],r}function En(r,e,n){return r[0]=e[0]*n[0],r[1]=e[1]*n[1],r[2]=e[2]*n[2],r}function An(r,e,n){return r[0]=e[0]*n,r[1]=e[1]*n,r[2]=e[2]*n,r}function ye(r,e){var n=e[0]-r[0],t=e[1]-r[1],a=e[2]-r[2];return Math.hypot(n,t,a)}function Yn(r,e){var n=e[0],t=e[1],a=e[2],i=n*n+t*t+a*a;return i>0&&(i=1/Math.sqrt(i)),r[0]=e[0]*i,r[1]=e[1]*i,r[2]=e[2]*i,r}function On(r,e){return r[0]*e[0]+r[1]*e[1]+r[2]*e[2]}function Hn(r,e,n){var t=e[0],a=e[1],i=e[2],o=n[0],u=n[1],s=n[2];return r[0]=a*s-i*u,r[1]=i*o-t*s,r[2]=t*u-a*o,r}function Pn(r,e,n,t){var a=e[0],i=e[1],o=e[2];return r[0]=a+t*(n[0]-a),r[1]=i+t*(n[1]-i),r[2]=o+t*(n[2]-o),r}function zn(r,e,n){var t=e[0],a=e[1],i=e[2],o=n[3]*t+n[7]*a+n[11]*i+n[15];return o=o||1,r[0]=(n[0]*t+n[4]*a+n[8]*i+n[12])/o,r[1]=(n[1]*t+n[5]*a+n[9]*i+n[13])/o,r[2]=(n[2]*t+n[6]*a+n[10]*i+n[14])/o,r}function In(r,e,n){var t=e[0],a=e[1],i=e[2];return r[0]=t*n[0]+a*n[3]+i*n[6],r[1]=t*n[1]+a*n[4]+i*n[7],r[2]=t*n[2]+a*n[5]+i*n[8],r}function Tn(r,e,n){var t=n[0],a=n[1],i=n[2],o=n[3],u=e[0],s=e[1],f=e[2],c=a*f-i*s,l=i*u-t*f,x=t*s-a*u,g=a*x-i*l,h=i*c-t*x,d=t*l-a*c,m=o*2;return c*=m,l*=m,x*=m,g*=2,h*=2,d*=2,r[0]=u+c+g,r[1]=s+l+h,r[2]=f+x+d,r}function Fn(r,e){var n=r[0],t=r[1],a=r[2],i=e[0],o=e[1],u=e[2];return Math.abs(n-i)<=dr*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(t-o)<=dr*Math.max(1,Math.abs(t),Math.abs(o))&&Math.abs(a-u)<=dr*Math.max(1,Math.abs(a),Math.abs(u))}var kn=ye,jn=pe;(function(){var r=me();return function(e,n,t,a,i,o){var u,s;for(n||(n=3),t||(t=0),a?s=Math.min(a*n+t,e.length):s=e.length,u=t;u0&&(a=1/Math.sqrt(a)),r[0]=e[0]*a,r[1]=e[1]*a,r}function Bn(r,e){return r[0]*e[0]+r[1]*e[1]}function Jn(r,e,n){var t=e[0],a=e[1];return r[0]=n[0]*t+n[3]*a+n[6],r[1]=n[1]*t+n[4]*a+n[7],r}function Xn(r,e){var n=r[0],t=r[1],a=e[0],i=e[1],o=Math.sqrt(n*n+t*t)*Math.sqrt(a*a+i*i),u=o&&(n*a+t*i)/o;return Math.acos(Math.min(Math.max(u,-1),1))}function Qn(r,e){return r[0]===e[0]&&r[1]===e[1]}var Kn=we;(function(){var r=be();return function(e,n,t,a,i,o){var u,s;for(n||(n=2),t||(t=0),a?s=Math.min(a*n+t,e.length):s=e.length,u=t;u0&&i[i.length-1])&&(f[0]===6||f[0]===2)){n=0;continue}if(f[0]===3&&(!i||f[1]>i[0]&&f[1]=r.length&&(r=void 0),{value:r&&r[t++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function it(r,e){var n=typeof Symbol=="function"&&r[Symbol.iterator];if(!n)return r;var t=n.call(r),a,i=[],o;try{for(;(e===void 0||e-- >0)&&!(a=t.next()).done;)i.push(a.value)}catch(u){o={error:u}}finally{try{a&&!a.done&&(n=t.return)&&n.call(t)}finally{if(o)throw o.error}}return i}function Me(){for(var r=0,e=0,n=arguments.length;e-1?a:null}};function T(r){for(var e=[],n=1;n3?0:(r-r%10!==10?1:0)*r%10]}},tr=T({},yr),Jr=function(r){return tr=T(tr,r)},_r=function(r){return r.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},$=function(r,e){for(e===void 0&&(e=2),r=String(r);r.length0?"-":"+")+$(Math.floor(Math.abs(e)/60)*100+Math.abs(e)%60,4)},Z:function(r){var e=r.getTimezoneOffset();return(e>0?"-":"+")+$(Math.floor(Math.abs(e)/60),2)+":"+$(Math.abs(e)%60,2)}},Er=function(r){return+r-1},Ar=[null,I],Yr=[null,W],Or=["isPm",W,function(r,e){var n=r.toLowerCase();return n===e.amPm[0]?0:n===e.amPm[1]?1:null}],Hr=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(r){var e=(r+"").match(/([+-]|\d\d)/gi);if(e){var n=+e[1]*60+parseInt(e[2],10);return e[0]==="+"?n:-n}return 0}],Ee={D:["day",I],DD:["day",z],Do:["day",I+W,function(r){return parseInt(r,10)}],M:["month",I,Er],MM:["month",z,Er],YY:["year",z,function(r){var e=new Date,n=+(""+e.getFullYear()).substr(0,2);return+(""+(+r>68?n-1:n)+r)}],h:["hour",I,void 0,"isPm"],hh:["hour",z,void 0,"isPm"],H:["hour",I],HH:["hour",z],m:["minute",I],mm:["minute",z],s:["second",I],ss:["second",z],YYYY:["year",De],S:["millisecond","\\d",function(r){return+r*100}],SS:["millisecond",z,function(r){return+r*10}],SSS:["millisecond",Se],d:Ar,dd:Ar,ddd:Yr,dddd:Yr,MMM:["month",W,Nr("monthNamesShort")],MMMM:["month",W,Nr("monthNames")],a:Or,A:Or,ZZ:Hr,Z:Hr},ar={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},Xr=function(r){return T(ar,r)},Qr=function(r,e,n){if(e===void 0&&(e=ar.default),n===void 0&&(n={}),typeof r=="number"&&(r=new Date(r)),Object.prototype.toString.call(r)!=="[object Date]"||isNaN(r.getTime()))throw new Error("Invalid Date pass to format");e=ar[e]||e;var t=[];e=e.replace(Ur,function(i,o){return t.push(o),"@@@"});var a=T(T({},tr),n);return e=e.replace(Gr,function(i){return _e[i](r,a)}),e.replace(/@@@/g,function(){return t.shift()})};function Kr(r,e,n){if(n===void 0&&(n={}),typeof e!="string")throw new Error("Invalid format in fecha parse");if(e=ar[e]||e,r.length>1e3)return null;var t=new Date,a={year:t.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},i=[],o=[],u=e.replace(Ur,function(p,y){return o.push(_r(y)),"@@@"}),s={},f={};u=_r(u).replace(Gr,function(p){var y=Ee[p],S=y[0],F=y[1],H=y[3];if(s[S])throw new Error("Invalid format. "+S+" specified twice in format");return s[S]=!0,H&&(f[H]=!0),i.push(y),"("+F+")"}),Object.keys(f).forEach(function(p){if(!s[p])throw new Error("Invalid format. "+p+" is required in specified format")}),u=u.replace(/@@@/g,function(){return o.shift()});var c=r.match(new RegExp(u,"i"));if(!c)return null;for(var l=T(T({},tr),n),x=1;x11||a.month<0||a.day>31||a.day<1||a.hour>23||a.hour<0||a.minute>59||a.minute<0||a.second>59||a.second<0)return null;return v}var Ae={format:Qr,parse:Kr,defaultI18n:yr,setGlobalDateI18n:Jr,setGlobalDateMasks:Xr};const st=Object.freeze(Object.defineProperty({__proto__:null,assign:T,default:Ae,defaultI18n:yr,format:Qr,parse:Kr,setGlobalDateI18n:Jr,setGlobalDateMasks:Xr},Symbol.toStringTag,{value:"Module"}));function br(r,e,n){r.prototype=e.prototype=n,n.constructor=r}function re(r,e){var n=Object.create(r.prototype);for(var t in e)n[t]=e[t];return n}function Q(){}var B=.7,ir=1/B,C="\\s*([+-]?\\d+)\\s*",J="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",O="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ye=/^#([0-9a-f]{3,8})$/,Oe=new RegExp(`^rgb\\(${C},${C},${C}\\)$`),He=new RegExp(`^rgb\\(${O},${O},${O}\\)$`),Pe=new RegExp(`^rgba\\(${C},${C},${C},${J}\\)$`),ze=new RegExp(`^rgba\\(${O},${O},${O},${J}\\)$`),Ie=new RegExp(`^hsl\\(${J},${O},${O}\\)$`),Te=new RegExp(`^hsla\\(${J},${O},${O},${J}\\)$`),Pr={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};br(Q,wr,{copy(r){return Object.assign(new this.constructor,this,r)},displayable(){return this.rgb().displayable()},hex:zr,formatHex:zr,formatHex8:Fe,formatHsl:ke,formatRgb:Ir,toString:Ir});function zr(){return this.rgb().formatHex()}function Fe(){return this.rgb().formatHex8()}function ke(){return ee(this).formatHsl()}function Ir(){return this.rgb().formatRgb()}function wr(r){var e,n;return r=(r+"").trim().toLowerCase(),(e=Ye.exec(r))?(n=e[1].length,e=parseInt(e[1],16),n===6?Tr(e):n===3?new N(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?rr(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?rr(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Oe.exec(r))?new N(e[1],e[2],e[3],1):(e=He.exec(r))?new N(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Pe.exec(r))?rr(e[1],e[2],e[3],e[4]):(e=ze.exec(r))?rr(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Ie.exec(r))?jr(e[1],e[2]/100,e[3]/100,1):(e=Te.exec(r))?jr(e[1],e[2]/100,e[3]/100,e[4]):Pr.hasOwnProperty(r)?Tr(Pr[r]):r==="transparent"?new N(NaN,NaN,NaN,0):null}function Tr(r){return new N(r>>16&255,r>>8&255,r&255,1)}function rr(r,e,n,t){return t<=0&&(r=e=n=NaN),new N(r,e,n,t)}function je(r){return r instanceof Q||(r=wr(r)),r?(r=r.rgb(),new N(r.r,r.g,r.b,r.opacity)):new N}function fr(r,e,n,t){return arguments.length===1?je(r):new N(r,e,n,t??1)}function N(r,e,n,t){this.r=+r,this.g=+e,this.b=+n,this.opacity=+t}br(N,fr,re(Q,{brighter(r){return r=r==null?ir:Math.pow(ir,r),new N(this.r*r,this.g*r,this.b*r,this.opacity)},darker(r){return r=r==null?B:Math.pow(B,r),new N(this.r*r,this.g*r,this.b*r,this.opacity)},rgb(){return this},clamp(){return new N(j(this.r),j(this.g),j(this.b),or(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Fr,formatHex:Fr,formatHex8:qe,formatRgb:kr,toString:kr}));function Fr(){return`#${k(this.r)}${k(this.g)}${k(this.b)}`}function qe(){return`#${k(this.r)}${k(this.g)}${k(this.b)}${k((isNaN(this.opacity)?1:this.opacity)*255)}`}function kr(){const r=or(this.opacity);return`${r===1?"rgb(":"rgba("}${j(this.r)}, ${j(this.g)}, ${j(this.b)}${r===1?")":`, ${r})`}`}function or(r){return isNaN(r)?1:Math.max(0,Math.min(1,r))}function j(r){return Math.max(0,Math.min(255,Math.round(r)||0))}function k(r){return r=j(r),(r<16?"0":"")+r.toString(16)}function jr(r,e,n,t){return t<=0?r=e=n=NaN:n<=0||n>=1?r=e=NaN:e<=0&&(r=NaN),new E(r,e,n,t)}function ee(r){if(r instanceof E)return new E(r.h,r.s,r.l,r.opacity);if(r instanceof Q||(r=wr(r)),!r)return new E;if(r instanceof E)return r;r=r.rgb();var e=r.r/255,n=r.g/255,t=r.b/255,a=Math.min(e,n,t),i=Math.max(e,n,t),o=NaN,u=i-a,s=(i+a)/2;return u?(e===i?o=(n-t)/u+(n0&&s<1?0:o,new E(o,u,s,r.opacity)}function Re(r,e,n,t){return arguments.length===1?ee(r):new E(r,e,n,t??1)}function E(r,e,n,t){this.h=+r,this.s=+e,this.l=+n,this.opacity=+t}br(E,Re,re(Q,{brighter(r){return r=r==null?ir:Math.pow(ir,r),new E(this.h,this.s,this.l*r,this.opacity)},darker(r){return r=r==null?B:Math.pow(B,r),new E(this.h,this.s,this.l*r,this.opacity)},rgb(){var r=this.h%360+(this.h<0)*360,e=isNaN(r)||isNaN(this.s)?0:this.s,n=this.l,t=n+(n<.5?n:1-n)*e,a=2*n-t;return new N(gr(r>=240?r-240:r+120,a,t),gr(r,a,t),gr(r<120?r+240:r-120,a,t),this.opacity)},clamp(){return new E(qr(this.h),er(this.s),er(this.l),or(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const r=or(this.opacity);return`${r===1?"hsl(":"hsla("}${qr(this.h)}, ${er(this.s)*100}%, ${er(this.l)*100}%${r===1?")":`, ${r})`}`}}));function qr(r){return r=(r||0)%360,r<0?r+360:r}function er(r){return Math.max(0,Math.min(1,r||0))}function gr(r,e,n){return(r<60?e+(n-e)*r/60:r<180?n:r<240?e+(n-e)*(240-r)/60:e)*255}var L=0,U=0,G=0,ne=1e3,sr,V,ur=0,q=0,cr=0,X=typeof performance=="object"&&performance.now?performance:Date,te=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(r){setTimeout(r,17)};function ae(){return q||(te(Ce),q=X.now()+cr)}function Ce(){q=0}function mr(){this._call=this._time=this._next=null}mr.prototype=Ze.prototype={constructor:mr,restart:function(r,e,n){if(typeof r!="function")throw new TypeError("callback is not a function");n=(n==null?ae():+n)+(e==null?0:+e),!this._next&&V!==this&&(V?V._next=this:sr=this,V=this),this._call=r,this._time=n,pr()},stop:function(){this._call&&(this._call=null,this._time=1/0,pr())}};function Ze(r,e,n){var t=new mr;return t.restart(r,e,n),t}function Le(){ae(),++L;for(var r=sr,e;r;)(e=q-r._time)>=0&&r._call.call(null,e),r=r._next;--L}function Rr(){q=(ur=X.now())+cr,L=U=0;try{Le()}finally{L=0,Ue(),q=0}}function Ge(){var r=X.now(),e=r-ur;e>ne&&(cr-=e,ur=r)}function Ue(){for(var r,e=sr,n,t=1/0;e;)e._call?(t>e._time&&(t=e._time),r=e,e=e._next):(n=e._next,e._next=null,e=r?r._next=n:sr=n);V=r,pr(t)}function pr(r){if(!L){U&&(U=clearTimeout(U));var e=r-q;e>24?(r<1/0&&(U=setTimeout(Rr,r-X.now()-cr)),G&&(G=clearInterval(G))):(G||(ur=X.now(),G=setInterval(Ge,ne)),L=1,te(Rr))}}var Ve="*",ut=function(){function r(){this._events={}}return r.prototype.on=function(e,n,t){return this._events[e]||(this._events[e]=[]),this._events[e].push({callback:n,once:!!t}),this},r.prototype.once=function(e,n){return this.on(e,n,!0)},r.prototype.emit=function(e){for(var n=this,t=[],a=1;a=1?(n=1,e-1):Math.floor(n*e),a=r[t],i=r[t+1],o=t>0?r[t-1]:2*a-i,u=t()=>r;function se(r,e){return function(n){return r+n*e}}function an(r,e,n){return r=Math.pow(r,n),e=Math.pow(e,n)-r,n=1/n,function(t){return Math.pow(r+t*e,n)}}function xt(r,e){var n=e-r;return n?se(r,n>180||n<-180?n-360*Math.round(n/360):n):Mr(isNaN(r)?e:r)}function fn(r){return(r=+r)==1?ue:function(e,n){return n-e?an(e,n,r):Mr(isNaN(e)?n:e)}}function ue(r,e){var n=e-r;return n?se(r,n):Mr(isNaN(r)?e:r)}const dt=function r(e){var n=fn(e);function t(a,i){var o=n((a=fr(a)).r,(i=fr(i)).r),u=n(a.g,i.g),s=n(a.b,i.b),f=ue(a.opacity,i.opacity);return function(c){return a.r=o(c),a.g=u(c),a.b=s(c),a.opacity=f(c),a+""}}return t.gamma=r,t}(1);function on(r){return function(e){var n=e.length,t=new Array(n),a=new Array(n),i=new Array(n),o,u;for(o=0;o=v.length)){var D=Math.max(b-l,0),Sr=b,hr=Math.min(b+l,v.length-1),xr=D-(b-l),he=b+l-hr,xe=p[-l-1+xr]||0,de=p[-l-1+he]||0,K=y/(y-xe-de);xr>0&&(F+=K*(xr-1)*S);var Dr=Math.max(0,b-l+1);i.inside(0,v.length-1,Dr)&&(v[Dr].y+=K*1*S),i.inside(0,v.length-1,Sr+1)&&(v[Sr+1].y-=K*2*S),i.inside(0,v.length-1,hr+1)&&(v[hr+1].y+=K*1*S)}});var H=F,R=0,Y=0;return v.forEach(function(_){R+=_.y,H+=R,_.y=H,Y+=H}),Y>0&&v.forEach(function(_){_.y/=Y}),v};function u(s,f){for(var c={},l=0,x=-f;x<=f;x++)l+=s(x/f),c[x]=l;return c}r.exports.getExpectedValueFromPdf=function(s){if(!(!s||s.length===0)){var f=0;return s.forEach(function(c){f+=c.x*c.y}),f}},r.exports.getXWithLeftTailArea=function(s,f){if(!(!s||s.length===0)){for(var c=0,l=0,x=0;x=f));x++);return s[l].x}},r.exports.getPerplexity=function(s){if(!(!s||s.length===0)){var f=0;return s.forEach(function(c){var l=Math.log(c.y);isFinite(l)&&(f+=c.y*l)}),f=-f/t,Math.pow(2,f)}}})(ce);var un=ce.exports;const vt=ge(un);function mt(r,e,n,t){t=t||{};var a=t.maxIterations||100,i=t.tolerance||1e-10,o=r(e),u=r(n),s=n-e;if(o*u>0)throw"Initial bisect points must have opposite signs";if(o===0)return e;if(u===0)return n;for(var f=0;f=0&&(e=c),Math.abs(s)=h[g-1].fx){var _=!1;if(p.fx>Y.fx?(P(y,1+c,M,-c,Y),y.fx=r(y),y.fx=1)break;for(d=1;du+i*a*s||f>=v)m=a;else{if(Math.abs(l)<=-o*s)return a;l*(m-d)>=0&&(m=d),d=a,v=f}return 0}for(var h=0;h<10;++h){if(P(t.x,1,n.x,a,e),f=t.fx=r(t.x,t.fxprime),l=Z(t.fxprime,e),f>u+i*a*s||h&&f>=c)return g(x,a,c);if(Math.abs(l)<=-o*s)return a;if(l>=0)return g(a,x,f);c=f,x=a,a*=2}return a}function bt(r,e,n){var t={x:e.slice(),fx:0,fxprime:e.slice()},a={x:e.slice(),fx:0,fxprime:e.slice()},i=e.slice(),o,u,s=1,f;n=n||{},f=n.maxIterations||e.length*20,t.fx=r(t.x,t.fxprime),o=t.fxprime.slice(),Lr(o,t.fxprime,-1);for(var c=0;c