/*
* @nebula.js/sn-bar-chart v2.5.0
* Copyright (c) 2026 QlikTech International AB
* Released under the MIT license.
*/

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("@nebula.js/stardust")):"function"==typeof define&&define.amd?define(["@nebula.js/stardust"],t):(e="undefined"!=typeof globalThis?globalThis:e||self)["sn-bar-chart"]=t(e.stardust)}(this,function(e){"use strict";function t(e,t){return t.forEach(function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach(function(n){if("default"!==n&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}})}),Object.freeze(e)}var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,o=Object.getOwnPropertyDescriptor,a=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},s=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var t,i=n.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(t in e);return void 0===t||n.call(e,t)},l=function(e,t){i&&"__proto__"===t.name?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},c=function(e,t){if("__proto__"===t){if(!n.call(e,t))return;if(o)return o(e,t).value}return e[t]},u=function e(){var t,n,r,i,o,u,d=arguments[0],f=1,h=arguments.length,p=!1;for("boolean"==typeof d&&(p=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<h;++f)if(null!=(t=arguments[f]))for(n in t)r=c(d,n),d!==(i=c(t,n))&&(p&&i&&(s(i)||(o=a(i)))?(o?(o=!1,u=r&&a(r)?r:[]):u=r&&s(r)?r:{},l(d,{name:n,newValue:e(p,u,i)})):void 0!==i&&l(d,{name:n,newValue:i}));return d},d="2.11.5";function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function h(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach(function(t){h(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return f(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e){return!!e.changedTouches}function v(e){return"number"==typeof e&&!isNaN(e)}function b(e){return"number"!=typeof e||isNaN(e)}function x(e){const t=e.length;let n=NaN,r=NaN,i=NaN,o=NaN;for(let a=0;a<t;a++)n=isNaN(n)?e[a].x:Math.min(n,e[a].x),r=isNaN(r)?e[a].x:Math.max(r,e[a].x),i=isNaN(i)?e[a].y:Math.min(i,e[a].y),o=isNaN(o)?e[a].y:Math.max(o,e[a].y);return[n,i,r,o]}function S(e){return[{x:e.x1||0,y:e.y1||0},{x:e.x2||0,y:e.y2||0}]}function w(e){return[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}]}function M(e){const t=g(x(e),4),n=t[0],r=t[1];return{x:n,y:r,width:t[2]-n,height:t[3]-r}}function k(e){return{x1:e[0].x,y1:e[0].y,x2:e[1].x,y2:e[1].y}}function C(e){const t=e||{},n=t.x,r=t.y,i=t.width,o=t.height,a=t.x1,s=t.x2,l=t.y1,c=t.y2,u=t.cx,d=t.cy,f=t.r,h=t.vertices;return v(u)&&v(d)&&v(f)?"circle":v(a)&&v(s)&&v(l)&&v(c)?"line":v(n)&&v(r)&&v(i)&&v(o)?"rect":v(n)&&v(r)?"point":Array.isArray(h)?h.every(e=>Array.isArray(e))?"geopolygon":"polygon":null}function q(e,t){return{x:t.x-e,y:t.y-e,width:t.width+e,height:t.height+e}}function E(e){return function(){return e}}const D=Math.abs,T=Math.atan2,O=Math.cos,N=Math.max,A=Math.min,_=Math.sin,I=Math.sqrt,L=1e-12,P=Math.PI,R=P/2,z=2*P;function F(e){return e>=1?R:e<=-1?-R:Math.asin(e)}const j=Math.PI,B=2*j,V=1e-6,H=B-V;function $(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}class W{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?$:function(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return $;const n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,o){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+o}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,(i=+i)<0)throw new Error(`negative radius: ${i}`);let o=this._x1,a=this._y1,s=n-e,l=r-t,c=o-e,u=a-t,d=c*c+u*u;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(d>V)if(Math.abs(u*s-l*c)>V&&i){let f=n-o,h=r-a,p=s*s+l*l,m=f*f+h*h,g=Math.sqrt(p),y=Math.sqrt(d),v=i*Math.tan((j-Math.acos((p+d-m)/(2*g*y)))/2),b=v/y,x=v/g;Math.abs(b-1)>V&&this._append`L${e+b*c},${t+b*u}`,this._append`A${i},${i},0,0,${+(u*f>c*h)},${this._x1=e+x*s},${this._y1=t+x*l}`}else this._append`L${this._x1=e},${this._y1=t}`;else;}arc(e,t,n,r,i,o){if(e=+e,t=+t,o=!!o,(n=+n)<0)throw new Error(`negative radius: ${n}`);let a=n*Math.cos(r),s=n*Math.sin(r),l=e+a,c=t+s,u=1^o,d=o?r-i:i-r;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>V||Math.abs(this._y1-c)>V)&&this._append`L${l},${c}`,n&&(d<0&&(d=d%B+B),d>H?this._append`A${n},${n},0,1,${u},${e-a},${t-s}A${n},${n},0,1,${u},${this._x1=l},${this._y1=c}`:d>V&&this._append`A${n},${n},0,${+(d>=j)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function U(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(null==n)t=null;else{const e=Math.floor(n);if(!(e>=0))throw new RangeError(`invalid digits: ${n}`);t=e}return e},()=>new W(t)}function Y(e){return e.innerRadius}function K(e){return e.outerRadius}function G(e){return e.startAngle}function X(e){return e.endAngle}function J(e){return e&&e.padAngle}function Z(e,t,n,r,i,o,a){var s=e-n,l=t-r,c=(a?o:-o)/I(s*s+l*l),u=c*l,d=-c*s,f=e+u,h=t+d,p=n+u,m=r+d,g=(f+p)/2,y=(h+m)/2,v=p-f,b=m-h,x=v*v+b*b,S=i-o,w=f*m-p*h,M=(b<0?-1:1)*I(N(0,S*S*x-w*w)),k=(w*b-v*M)/x,C=(-w*v-b*M)/x,q=(w*b+v*M)/x,E=(-w*v+b*M)/x,D=k-g,T=C-y,O=q-g,A=E-y;return D*D+T*T>O*O+A*A&&(k=q,C=E),{cx:k,cy:C,x01:-u,y01:-d,x11:k*(i/S-1),y11:C*(i/S-1)}}function Q(){var e=Y,t=K,n=E(0),r=null,i=G,o=X,a=J,s=null,l=U(c);function c(){var c,u,d=+e.apply(this,arguments),f=+t.apply(this,arguments),h=i.apply(this,arguments)-R,p=o.apply(this,arguments)-R,m=D(p-h),g=p>h;if(s||(s=c=l()),f<d&&(u=f,f=d,d=u),f>L)if(m>z-L)s.moveTo(f*O(h),f*_(h)),s.arc(0,0,f,h,p,!g),d>L&&(s.moveTo(d*O(p),d*_(p)),s.arc(0,0,d,p,h,g));else{var y,v,b=h,x=p,S=h,w=p,M=m,k=m,C=a.apply(this,arguments)/2,q=C>L&&(r?+r.apply(this,arguments):I(d*d+f*f)),E=A(D(f-d)/2,+n.apply(this,arguments)),N=E,j=E;if(q>L){var B=F(q/d*_(C)),V=F(q/f*_(C));(M-=2*B)>L?(S+=B*=g?1:-1,w-=B):(M=0,S=w=(h+p)/2),(k-=2*V)>L?(b+=V*=g?1:-1,x-=V):(k=0,b=x=(h+p)/2)}var H=f*O(b),$=f*_(b),W=d*O(w),U=d*_(w);if(E>L){var Y,K=f*O(x),G=f*_(x),X=d*O(S),J=d*_(S);if(m<P)if(Y=function(e,t,n,r,i,o,a,s){var l=n-e,c=r-t,u=a-i,d=s-o,f=d*l-u*c;if(!(f*f<L))return[e+(f=(u*(t-o)-d*(e-i))/f)*l,t+f*c]}(H,$,X,J,K,G,W,U)){var Q=H-Y[0],ee=$-Y[1],te=K-Y[0],ne=G-Y[1],re=1/_(function(e){return e>1?0:e<-1?P:Math.acos(e)}((Q*te+ee*ne)/(I(Q*Q+ee*ee)*I(te*te+ne*ne)))/2),ie=I(Y[0]*Y[0]+Y[1]*Y[1]);N=A(E,(d-ie)/(re-1)),j=A(E,(f-ie)/(re+1))}else N=j=0}k>L?j>L?(y=Z(X,J,H,$,f,j,g),v=Z(K,G,W,U,f,j,g),s.moveTo(y.cx+y.x01,y.cy+y.y01),j<E?s.arc(y.cx,y.cy,j,T(y.y01,y.x01),T(v.y01,v.x01),!g):(s.arc(y.cx,y.cy,j,T(y.y01,y.x01),T(y.y11,y.x11),!g),s.arc(0,0,f,T(y.cy+y.y11,y.cx+y.x11),T(v.cy+v.y11,v.cx+v.x11),!g),s.arc(v.cx,v.cy,j,T(v.y11,v.x11),T(v.y01,v.x01),!g))):(s.moveTo(H,$),s.arc(0,0,f,b,x,!g)):s.moveTo(H,$),d>L&&M>L?N>L?(y=Z(W,U,K,G,d,-N,g),v=Z(H,$,X,J,d,-N,g),s.lineTo(y.cx+y.x01,y.cy+y.y01),N<E?s.arc(y.cx,y.cy,N,T(y.y01,y.x01),T(v.y01,v.x01),!g):(s.arc(y.cx,y.cy,N,T(y.y01,y.x01),T(y.y11,y.x11),!g),s.arc(0,0,d,T(y.cy+y.y11,y.cx+y.x11),T(v.cy+v.y11,v.cx+v.x11),g),s.arc(v.cx,v.cy,N,T(v.y11,v.x11),T(v.y01,v.x01),!g))):s.arc(0,0,d,w,S,g):s.lineTo(W,U)}else s.moveTo(0,0);if(s.closePath(),c)return s=null,c+""||null}return c.centroid=function(){var n=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-P/2;return[O(r)*n,_(r)*n]},c.innerRadius=function(t){return arguments.length?(e="function"==typeof t?t:E(+t),c):e},c.outerRadius=function(e){return arguments.length?(t="function"==typeof e?e:E(+e),c):t},c.cornerRadius=function(e){return arguments.length?(n="function"==typeof e?e:E(+e),c):n},c.padRadius=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:E(+e),c):r},c.startAngle=function(e){return arguments.length?(i="function"==typeof e?e:E(+e),c):i},c.endAngle=function(e){return arguments.length?(o="function"==typeof e?e:E(+e),c):o},c.padAngle=function(e){return arguments.length?(a="function"==typeof e?e:E(+e),c):a},c.context=function(e){return arguments.length?(s=null==e?null:e,c):s},c}function ee(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function te(e){this._context=e}function ne(e){return new te(e)}function re(e){return e[0]}function ie(e){return e[1]}function oe(e,t,n){var r=null,i=E(!0),o=null,a=ne,s=null,l=U(c);function c(c){var u,d,f,h,p,m=(c=ee(c)).length,g=!1,y=new Array(m),v=new Array(m);for(null==o&&(s=a(p=l())),u=0;u<=m;++u){if(!(u<m&&i(h=c[u],u,c))===g)if(g=!g)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(y[f],v[f]);s.lineEnd(),s.areaEnd()}g&&(y[u]=+e(h,u,c),v[u]=+t(h,u,c),s.point(r?+r(h,u,c):y[u],n?+n(h,u,c):v[u]))}if(p)return s=null,p+""||null}function u(){return function(e,t){var n=E(!0),r=null,i=ne,o=null,a=U(s);function s(s){var l,c,u,d=(s=ee(s)).length,f=!1;for(null==r&&(o=i(u=a())),l=0;l<=d;++l)!(l<d&&n(c=s[l],l,s))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+e(c,l,s),+t(c,l,s));if(u)return o=null,u+""||null}return e="function"==typeof e?e:void 0===e?re:E(e),t="function"==typeof t?t:void 0===t?ie:E(t),s.x=function(t){return arguments.length?(e="function"==typeof t?t:E(+t),s):e},s.y=function(e){return arguments.length?(t="function"==typeof e?e:E(+e),s):t},s.defined=function(e){return arguments.length?(n="function"==typeof e?e:E(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,null!=r&&(o=i(r)),s):i},s.context=function(e){return arguments.length?(null==e?r=o=null:o=i(r=e),s):r},s}().defined(i).curve(a).context(o)}return e="function"==typeof e?e:void 0===e?re:E(+e),t="function"==typeof t?t:E(void 0===t?0:+t),n="function"==typeof n?n:void 0===n?ie:E(+n),c.x=function(t){return arguments.length?(e="function"==typeof t?t:E(+t),r=null,c):e},c.x0=function(t){return arguments.length?(e="function"==typeof t?t:E(+t),c):e},c.x1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:E(+e),c):r},c.y=function(e){return arguments.length?(t="function"==typeof e?e:E(+e),n=null,c):t},c.y0=function(e){return arguments.length?(t="function"==typeof e?e:E(+e),c):t},c.y1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:E(+e),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(r).y(t)},c.defined=function(e){return arguments.length?(i="function"==typeof e?e:E(!!e),c):i},c.curve=function(e){return arguments.length?(a=e,null!=o&&(s=a(o)),c):a},c.context=function(e){return arguments.length?(null==e?o=s=null:s=a(o=e),c):o},c}function ae(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function se(e){return e}function le(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function ce(e){this._context=e}function ue(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function de(e,t){this._context=e,this._k=(1-t)/6}te.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}},ce.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:le(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:le(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},de.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:ue(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:ue(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var fe=function e(t){function n(e){return new de(e,t)}return n.tension=function(t){return e(+t)},n}(0);function he(e,t){this._context=e,this._alpha=t}he.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:!function(e,t,n){var r=e._x1,i=e._y1,o=e._x2,a=e._y2;if(e._l01_a>L){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>L){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*c+e._x1*e._l23_2a-t*e._l12_2a)/u,a=(a*c+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,o,a,e._x2,e._y2)}(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var pe=function e(t){function n(e){return t?new he(e,t):new de(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function me(e){return e<0?-1:1}function ge(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(me(o)+me(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function ye(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function ve(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function be(e){this._context=e}function xe(e){this._context=new Se(e)}function Se(e){this._context=e}function we(e){this._context=e}function Me(e){var t,n,r=e.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/o[t-1],o[t]-=n,a[t]-=n*a[t-1];for(i[r-1]=a[r-1]/o[r-1],t=r-2;t>=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function ke(e,t){this._context=e,this._t=t}function Ce(e,t){if((i=e.length)>1)for(var n,r,i,o=1,a=e[t[0]],s=a.length;o<i;++o)for(r=a,a=e[t[o]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function qe(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function Ee(e,t){return e[t]}function De(e){const t=[];return t.key=e,t}function Te(e){for(var t,n=-1,r=0,i=e.length,o=-1/0;++n<i;)(t=+e[n][1])>o&&(o=t,r=n);return r}function Oe(e){for(var t,n=0,r=-1,i=e.length;++r<i;)(t=+e[r][1])&&(n+=t);return n}function Ne(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"unspecified",r=arguments.length>2?arguments[2]:void 0;const i={},o=e||{get:()=>{},has:()=>!1,default:()=>{}};function a(e,t){if(!e||"string"!=typeof e)throw new TypeError("Invalid argument: key must be a non-empty string");return!(e in i)&&(i[e]=t,!0)}function s(e){return i[e]||o.get(e)}function l(e,i){if(void 0!==i)return a(e,i);const o=s(e);return r&&void 0===o&&r.warn("".concat(e," does not exist in ").concat(n," registry")),o||s(t)}return t=o.default(),l.add=a,l.get=s,l.has=function(e){return!!i[e]||o.has(e)},l.remove=function(e){const t=i[e];return delete i[e],t},l.getKeys=function(){return Object.keys(i)},l.getValues=function(){return Object.keys(i).map(e=>i[e])},l.default=function(e){return void 0!==e&&(t=e),t},l.register=a,l}function Ae(e,t){if(!isFinite(e)||0===e)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function _e(e){return(e=Ae(Math.abs(e)))?e[1]:NaN}be.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:ve(this,this._t0,ye(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,ve(this,ye(this,n=ge(this,e,t)),n);break;default:ve(this,this._t0,n=ge(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(xe.prototype=Object.create(be.prototype)).point=function(e,t){be.prototype.point.call(this,t,e)},Se.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}},we.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=Me(e),i=Me(t),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],e[a],t[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},ke.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};var Ie,Le=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Pe(e){if(!(t=Le.exec(e)))throw new Error("invalid format: "+e);var t;return new Re({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Re(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function ze(e,t){var n=Ae(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}Pe.prototype=Re.prototype,Re.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Fe={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>ze(100*e,t),r:ze,s:function(e,t){var n=Ae(e,t);if(!n)return Ie=void 0,e.toPrecision(t);var r=n[0],i=n[1],o=i-(Ie=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Ae(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function je(e){return e}var Be,Ve,He,$e=Array.prototype.map,We=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Ue(e){var t=void 0===e.grouping||void 0===e.thousands?je:function(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}($e.call(e.grouping,Number),e.thousands+""),n=void 0===e.currency?"":e.currency[0]+"",r=void 0===e.currency?"":e.currency[1]+"",i=void 0===e.decimal?".":e.decimal+"",o=void 0===e.numerals?je:function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}($e.call(e.numerals,String)),a=void 0===e.percent?"%":e.percent+"",s=void 0===e.minus?"−":e.minus+"",l=void 0===e.nan?"NaN":e.nan+"";function c(e,c){var u=(e=Pe(e)).fill,d=e.align,f=e.sign,h=e.symbol,p=e.zero,m=e.width,g=e.comma,y=e.precision,v=e.trim,b=e.type;"n"===b?(g=!0,b="g"):Fe[b]||(void 0===y&&(y=12),v=!0,b="g"),(p||"0"===u&&"="===d)&&(p=!0,u="0",d="=");var x=(c&&void 0!==c.prefix?c.prefix:"")+("$"===h?n:"#"===h&&/[boxX]/.test(b)?"0"+b.toLowerCase():""),S=("$"===h?r:/[%p]/.test(b)?a:"")+(c&&void 0!==c.suffix?c.suffix:""),w=Fe[b],M=/[defgprs%]/.test(b);function k(e){var n,r,a,c=x,h=S;if("c"===b)h=w(e)+h,e="";else{var k=(e=+e)<0||1/e<0;if(e=isNaN(e)?l:w(Math.abs(e),y),v&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r<n;++r)switch(e[r]){case".":i=t=r;break;case"0":0===i&&(i=r),t=r;break;default:if(!+e[r])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),k&&0===+e&&"+"!==f&&(k=!1),c=(k?"("===f?f:s:"-"===f||"("===f?"":f)+c,h=("s"!==b||isNaN(e)||void 0===Ie?"":We[8+Ie/3])+h+(k&&"("===f?")":""),M)for(n=-1,r=e.length;++n<r;)if(48>(a=e.charCodeAt(n))||a>57){h=(46===a?i+e.slice(n+1):e.slice(n))+h,e=e.slice(0,n);break}}g&&!p&&(e=t(e,1/0));var C=c.length+e.length+h.length,q=C<m?new Array(m-C+1).join(u):"";switch(g&&p&&(e=t(q+e,q.length?m-h.length:1/0),q=""),d){case"<":e=c+e+h+q;break;case"=":e=c+q+e+h;break;case"^":e=q.slice(0,C=q.length>>1)+c+e+h+q.slice(C);break;default:e=q+c+e+h}return o(e)}return y=void 0===y?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),k.toString=function(){return e+""},k}return{format:c,formatPrefix:function(e,t){var n=3*Math.max(-8,Math.min(8,Math.floor(_e(t)/3))),r=Math.pow(10,-n),i=c(((e=Pe(e)).type="f",e),{suffix:We[8+n/3]});return function(e){return i(r*e)}}}}!function(e){Be=Ue(e),Ve=Be.format,He=Be.formatPrefix}({thousands:",",grouping:[3],currency:["$",""]});const Ye=new Date,Ke=new Date;function Ge(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{const t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),i.range=(n,r,o)=>{const a=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return a;let s;do{a.push(s=new Date(+n)),t(n,o),e(n)}while(s<n&&n<r);return a},i.filter=n=>Ge(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(i.count=(t,r)=>(Ye.setTime(+t),Ke.setTime(+r),e(Ye),e(Ke),Math.floor(n(Ye,Ke))),i.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i:null)),i}const Xe=6e4,Je=864e5,Ze=6048e5,Qe=Ge(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Xe)/Je,e=>e.getDate()-1);Qe.range;const et=Ge(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Je,e=>e.getUTCDate()-1);et.range;const tt=Ge(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Je,e=>Math.floor(e/Je));function nt(e){return Ge(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+7*t)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Xe)/Ze)}tt.range;const rt=nt(0),it=nt(1),ot=nt(2),at=nt(3),st=nt(4),lt=nt(5),ct=nt(6);function ut(e){return Ge(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)},(e,t)=>(t-e)/Ze)}rt.range,it.range,ot.range,at.range,st.range,lt.range,ct.range;const dt=ut(0),ft=ut(1),ht=ut(2),pt=ut(3),mt=ut(4),gt=ut(5),yt=ut(6);dt.range,ft.range,ht.range,pt.range,mt.range,gt.range,yt.range;const vt=Ge(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());vt.every=e=>isFinite(e=Math.floor(e))&&e>0?Ge(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}):null,vt.range;const bt=Ge(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());function xt(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function St(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function wt(e){let t,n,r;function i(e,r,i=0,o=e.length){if(i<o){if(0!==t(r,r))return o;do{const t=i+o>>>1;n(e[t],r)<0?i=t+1:o=t}while(i<o)}return i}return 2!==e.length?(t=xt,n=(t,n)=>xt(e(t),n),r=(t,n)=>e(t)-n):(t=e===xt||e===St?e:Mt,n=e,r=e),{left:i,center:function(e,t,n=0,o=e.length){const a=i(e,t,n,o-1);return a>n&&r(e[a-1],t)>-r(e[a],t)?a-1:a},right:function(e,r,i=0,o=e.length){if(i<o){if(0!==t(r,r))return o;do{const t=i+o>>>1;n(e[t],r)<=0?i=t+1:o=t}while(i<o)}return i}}}function Mt(){return 0}bt.every=e=>isFinite(e=Math.floor(e))&&e>0?Ge(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null,bt.range;const kt=wt(xt).right;wt(function(e){return null===e?NaN:+e}).center;var Ct=kt;class qt extends Map{constructor(e,t=Dt){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,n]of e)this.set(t,n)}get(e){return super.get(Et(this,e))}has(e){return super.has(Et(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},n){const r=t(n);e.has(r)&&(n=e.get(r),e.delete(r));return n}(this,e))}}function Et({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function Dt(e){return null!==e&&"object"==typeof e?e.valueOf():e}const Tt=Math.sqrt(50),Ot=Math.sqrt(10),Nt=Math.sqrt(2);function At(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=Tt?10:o>=Ot?5:o>=Nt?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,i)*a,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=n&&n<2?At(e,t,2*n):[s,l,c]}function _t(e,t,n){return At(e=+e,t=+t,n=+n)[2]}function It(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Lt(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Pt(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function Rt(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=$t(i),u=Wt(i),d=$t(o),f=Wt(o),h=$t(a),p=Wt(a),m=$t(s),g=Wt(s),y=$t(l),v=Wt(l),b={a:function(e){return a[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:hn,e:hn,f:vn,g:Tn,G:Nn,H:pn,I:mn,j:gn,L:yn,m:bn,M:xn,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:er,s:tr,S:Sn,u:wn,U:Mn,V:Cn,w:qn,W:En,x:null,X:null,y:Dn,Y:On,Z:An,"%":Qn},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:_n,e:_n,f:zn,g:Gn,G:Jn,H:In,I:Ln,j:Pn,L:Rn,m:Fn,M:jn,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:er,s:tr,S:Bn,u:Vn,U:Hn,V:Wn,w:Un,W:Yn,x:null,X:null,y:Kn,Y:Xn,Z:Zn,"%":Qn},S={a:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=y.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return k(e,t,n,r)},d:nn,e:nn,f:cn,g:Zt,G:Jt,H:on,I:on,j:rn,L:ln,m:tn,M:an,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1},q:en,Q:dn,s:fn,S:sn,u:Yt,U:Kt,V:Gt,w:Ut,W:Xt,x:function(e,t,r){return k(e,n,t,r)},X:function(e,t,n){return k(e,r,t,n)},y:Zt,Y:Jt,Z:Qt,"%":un};function w(e,t){return function(n){var r,i,o,a=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(i=zt[r=e.charAt(++s)])?r=e.charAt(++s):i="e"===r?" ":"0",(o=t[r])&&(r=o(n,i)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function M(e,t){return function(n){var r,i,o=Pt(1900,void 0,1);if(k(o,e,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(t&&!("Z"in o)&&(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=Lt(Pt(o.y,0,1))).getUTCDay(),r=i>4||0===i?ft.ceil(r):ft(r),r=et.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=It(Pt(o.y,0,1))).getDay(),r=i>4||0===i?it.ceil(r):it(r),r=Qe.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?Lt(Pt(o.y,0,1)).getUTCDay():It(Pt(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Lt(o)):It(o)}}function k(e,t,n,r){for(var i,o,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=S[i in zt?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=w(n,b),b.X=w(r,b),b.c=w(t,b),x.x=w(n,x),x.X=w(r,x),x.c=w(t,x),{format:function(e){var t=w(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=M(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=w(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=M(e+="",!0);return t.toString=function(){return e},t}}}var zt={"-":"",_:" ",0:"0"},Ft=/^\s*\d+/,jt=/^%/,Bt=/[\\^$*+?|[\]().{}]/g;function Vt(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function Ht(e){return e.replace(Bt,"\\$&")}function $t(e){return new RegExp("^(?:"+e.map(Ht).join("|")+")","i")}function Wt(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function Ut(e,t,n){var r=Ft.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Yt(e,t,n){var r=Ft.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Kt(e,t,n){var r=Ft.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Gt(e,t,n){var r=Ft.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Xt(e,t,n){var r=Ft.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Jt(e,t,n){var r=Ft.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Zt(e,t,n){var r=Ft.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Qt(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function en(e,t,n){var r=Ft.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function tn(e,t,n){var r=Ft.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function nn(e,t,n){var r=Ft.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function rn(e,t,n){var r=Ft.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function on(e,t,n){var r=Ft.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function an(e,t,n){var r=Ft.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function sn(e,t,n){var r=Ft.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function ln(e,t,n){var r=Ft.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function cn(e,t,n){var r=Ft.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function un(e,t,n){var r=jt.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function dn(e,t,n){var r=Ft.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function fn(e,t,n){var r=Ft.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function hn(e,t){return Vt(e.getDate(),t,2)}function pn(e,t){return Vt(e.getHours(),t,2)}function mn(e,t){return Vt(e.getHours()%12||12,t,2)}function gn(e,t){return Vt(1+Qe.count(vt(e),e),t,3)}function yn(e,t){return Vt(e.getMilliseconds(),t,3)}function vn(e,t){return yn(e,t)+"000"}function bn(e,t){return Vt(e.getMonth()+1,t,2)}function xn(e,t){return Vt(e.getMinutes(),t,2)}function Sn(e,t){return Vt(e.getSeconds(),t,2)}function wn(e){var t=e.getDay();return 0===t?7:t}function Mn(e,t){return Vt(rt.count(vt(e)-1,e),t,2)}function kn(e){var t=e.getDay();return t>=4||0===t?st(e):st.ceil(e)}function Cn(e,t){return e=kn(e),Vt(st.count(vt(e),e)+(4===vt(e).getDay()),t,2)}function qn(e){return e.getDay()}function En(e,t){return Vt(it.count(vt(e)-1,e),t,2)}function Dn(e,t){return Vt(e.getFullYear()%100,t,2)}function Tn(e,t){return Vt((e=kn(e)).getFullYear()%100,t,2)}function On(e,t){return Vt(e.getFullYear()%1e4,t,4)}function Nn(e,t){var n=e.getDay();return Vt((e=n>=4||0===n?st(e):st.ceil(e)).getFullYear()%1e4,t,4)}function An(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Vt(t/60|0,"0",2)+Vt(t%60,"0",2)}function _n(e,t){return Vt(e.getUTCDate(),t,2)}function In(e,t){return Vt(e.getUTCHours(),t,2)}function Ln(e,t){return Vt(e.getUTCHours()%12||12,t,2)}function Pn(e,t){return Vt(1+et.count(bt(e),e),t,3)}function Rn(e,t){return Vt(e.getUTCMilliseconds(),t,3)}function zn(e,t){return Rn(e,t)+"000"}function Fn(e,t){return Vt(e.getUTCMonth()+1,t,2)}function jn(e,t){return Vt(e.getUTCMinutes(),t,2)}function Bn(e,t){return Vt(e.getUTCSeconds(),t,2)}function Vn(e){var t=e.getUTCDay();return 0===t?7:t}function Hn(e,t){return Vt(dt.count(bt(e)-1,e),t,2)}function $n(e){var t=e.getUTCDay();return t>=4||0===t?mt(e):mt.ceil(e)}function Wn(e,t){return e=$n(e),Vt(mt.count(bt(e),e)+(4===bt(e).getUTCDay()),t,2)}function Un(e){return e.getUTCDay()}function Yn(e,t){return Vt(ft.count(bt(e)-1,e),t,2)}function Kn(e,t){return Vt(e.getUTCFullYear()%100,t,2)}function Gn(e,t){return Vt((e=$n(e)).getUTCFullYear()%100,t,2)}function Xn(e,t){return Vt(e.getUTCFullYear()%1e4,t,4)}function Jn(e,t){var n=e.getUTCDay();return Vt((e=n>=4||0===n?mt(e):mt.ceil(e)).getUTCFullYear()%1e4,t,4)}function Zn(){return"+0000"}function Qn(){return"%"}function er(e){return+e}function tr(e){return Math.floor(+e/1e3)}const nr=Ne();nr("d3-number",function(e,t,n){let r,i;function o(e){return i(e)}function a(){o.locale({decimal:n||".",thousands:t||",",grouping:[3],currency:["$",""]})}return o.locale=function(t){return r=Ue(t),i=r.format(e),this},a(),o.format=function(e,i,o,s){return(o||s)&&(t=o,n=s,a()),r.format(e)(i)},o.pattern=function(t){return t&&(e=t,i=r.format(t)),e},o}),nr("d3-time",function(e){let t=Rt({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),n=t.format(e);function r(e){return n(e)}return r.format=function(e,n){return t.format(e)(n)},r.locale=function(){return t=Rt(...arguments),n=t.format(e),this},r.parse=function(e,n){return t.parse(e)(n)},r.parsePattern=function(e){return t.parse(e)},r});const rr={id:e=>"".concat(e.source,"/").concat(e.key||e.title),key:e=>String(e.key||e.title),tags:e=>e.tags,min:e=>e.min,max:e=>e.max,type:e=>e.type,title:e=>String(e.title),values:e=>e.values,value:e=>e,label:e=>e,formatter:e=>(e=>{if("function"==typeof e.formatter)return e.formatter();const t=e.formatter||{};return nr(t.type||"d3-number")(t.format||"")})(e)};function ir(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.id,r=void 0===n?rr.id:n,i=t.key,o=void 0===i?rr.key:i,a=t.min,s=void 0===a?rr.min:a,l=t.max,c=void 0===l?rr.max:l,u=t.type,d=void 0===u?rr.type:u,f=t.tags,h=void 0===f?rr.tags:f,p=t.title,m=void 0===p?rr.title:p,g=t.values,y=void 0===g?rr.values:g,v=t.value,b=void 0===v?rr.value:v,x=t.label,S=void 0===x?rr.label:x,w=t.formatter,M=void 0===w?rr.formatter:w;return{id:()=>r(e),key:()=>o(e),raw:()=>e,tags:()=>h(e),type:()=>d(e),min:()=>s(e),max:()=>c(e),title:()=>m(e),items:()=>y(e),formatter:()=>M(e),value:b,label:S}}const or=e=>e.filter(e=>"number"==typeof e&&!isNaN(e)),ar=e=>e.reduce((e,t)=>e+t,0),sr={first:e=>e[0],last:e=>e[e.length-1],min:e=>{const t=or(e);return t.length?Math.min.apply(null,t):NaN},max:e=>{const t=or(e);return t.length?Math.max.apply(null,t):NaN},sum:e=>{const t=or(e);return t.length?t.reduce((e,t)=>e+t,0):NaN},avg:e=>{const t=or(e),n=t.length;return n?ar(t)/n:NaN}};function lr(e,t,n,r){const i={},o=r.field||(void 0!==e.field?t.field(e.field):null);return Object.keys(n).forEach(a=>{const s=n[a],l=i[a]={};-1!==["number","string","boolean"].indexOf(typeof s)?(l.type="primitive",l.value=s):"function"==typeof s?(l.type="function",l.value=s,l.label=s,l.field=o):"object"==typeof s&&(s.fields?l.fields=s.fields.map(n=>lr(e,t,{main:n},r).main):void 0!==s.field?(l.type="field",l.field=t.field(s.field),l.value=l.field.value,l.label=l.field.label):o&&(l.value=o.value,l.label=o.label,l.field=o),"function"==typeof s.filter&&(l.filter=s.filter),void 0!==s.value&&(l.value=s.value),void 0!==s.label&&(l.label=s.label),"function"==typeof s.reduce?l.reduce=s.reduce:s.reduce?l.reduce=sr[s.reduce]:l.field&&l.field.reduce&&(l.reduce="string"==typeof l.field.reduce?sr[l.field.reduce]:l.field.reduce),"function"==typeof s.reduceLabel?l.reduceLabel=s.reduceLabel:s.reduceLabel?l.reduceLabel=sr[s.reduceLabel]:l.field&&l.field.reduceLabel&&(l.reduceLabel="string"==typeof l.field.reduceLabel?sr[l.field.reduceLabel]:l.field.reduceLabel))}),i}function cr(e,t){const n=lr(e,t,{main:{value:e.value,label:e.label,reduce:e.reduce,filter:e.filter}},{}).main;return{props:lr(e,t,e.props||{},n),main:n}}function ur(e,t,n,r){const i=Array(e.length),o=Array(e.length);let a;for(let t=0;t<e.length;t++)a=r?e[t][r]:e[t],i[t]=a.value,o[t]=a.label;const s=t.reduce,l=t.reduceLabel,c=s?s(i):i,u={value:c,label:l?l(o,c):n?n(c):String(c)};return r&&e[0][r].source?(u.source=e[0][r].source,u):!r&&e[0].source?(u.source=e[0].source,u):u}function dr(e,t){let n=t.main,r=t.propsArr,i=t.props,o=[];const a=n.field.formatter(),s={};return r.forEach(e=>{s[e]=i[e].field?i[e].field.formatter():e=>e}),o.push(...e.map(e=>{const t=ur(e.items,n,a);return r.forEach(n=>{t[n]=ur(e.items,i[n],s[n],n)}),t})),o}function fr(e){let t=e.cfg,n=e.itemData,r=e.obj,i=e.target,o=e.tracker;const a="function"===e.trackType?t.trackBy(n):n[t.trackBy];let s=o[a];s||(s=o[a]={items:[],id:a},i.push(s)),s.items.push(r)}function hr(e){if(e.length<1e4)return Math.max(...e);let t=-1/0;const n=e.length;for(let r=0;r<n;r++)t<e[r]&&(t=e[r]);return t}function pr(e){if(e.length<1e4)return Math.min(...e);let t=1/0;const n=e.length;for(let r=0;r<n;r++)t>e[r]&&(t=e[r]);return t}const mr={diverging:function(e,t){const n=e.length;if(n<=0)return;const r=e[t[0]].length;for(let i=0;i<r;++i){let r=0,o=0;for(let a=0;a<n;++a){const n=e[t[a]][i],s=n[1]-n[0];s>=0?(n[0]=r,r+=s,n[1]=r):s<0?(n[1]=o,o+=s,n[0]=o):n[0]=r}}},none:Ce,silhouette:function(e,t){if((n=e.length)>0){for(var n,r=0,i=e[t[0]],o=i.length;r<o;++r){for(var a=0,s=0;a<n;++a)s+=e[a][r][1]||0;i[r][1]+=i[r][0]=-s/2}Ce(e,t)}},expand:function(e,t){if((r=e.length)>0){for(var n,r,i,o=0,a=e[0].length;o<a;++o){for(i=n=0;n<r;++n)i+=e[n][o][1]||0;if(i)for(n=0;n<r;++n)e[n][o][1]/=i}Ce(e,t)}},wiggle:function(e,t){if((i=e.length)>0&&(r=(n=e[t[0]]).length)>0){for(var n,r,i,o=0,a=1;a<r;++a){for(var s=0,l=0,c=0;s<i;++s){for(var u=e[t[s]],d=u[a][1]||0,f=(d-(u[a-1][1]||0))/2,h=0;h<s;++h){var p=e[t[h]];f+=(p[a][1]||0)-(p[a-1][1]||0)}l+=d,c+=f*d}n[a-1][1]+=n[a-1][0]=o,l&&(o-=c/l)}n[a-1][1]+=n[a-1][0]=o,Ce(e,t)}}},gr={ascending:function(e){var t=e.map(Oe);return qe(e).sort(function(e,n){return t[e]-t[n]})},insideout:function(e){var t,n,r=e.length,i=e.map(Oe),o=function(e){var t=e.map(Te);return qe(e).sort(function(e,n){return t[e]-t[n]})}(e),a=0,s=0,l=[],c=[];for(t=0;t<r;++t)n=o[t],a<s?(a+=i[n],l.push(n)):(s+=i[n],c.push(n));return c.reverse().concat(l)},none:qe,reverse:function(e){return qe(e).reverse()}};function yr(e,t,n,r){const i=r||e.items,o={},a=t.stackKey,s=t.value,l=t.startProp||"start",c=t.endProp||"end",u=t.offset||"none",d=t.order||"none",f=t.valueRef||"";let h=0,p={};for(let e=0;e<i.length;e++){let t=i[e],n=f?t[f]:null;if(n&&n.source){let e="".concat(n.source.key||"","/").concat(n.source.field);p[e]||(p[e]=n.source)}let r=a(t);o[r]=o[r]||{items:[]},o[r].items.push(t),h=Math.max(h,o[r].items.length)}const m=Array.apply(null,{length:h}).map(Number.call,Number),g=Object.keys(o).map(e=>o[e].items),y=function(){var e=E([]),t=qe,n=Ce,r=Ee;function i(i){var o,a,s=Array.from(e.apply(this,arguments),De),l=s.length,c=-1;for(const e of i)for(o=0,++c;o<l;++o)(s[o][c]=[0,+r(e,s[o].key,c,i)]).data=e;for(o=0,a=ee(t(s));o<l;++o)s[a[o]].index=o;return n(s,a),s}return i.keys=function(t){return arguments.length?(e="function"==typeof t?t:E(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r="function"==typeof e?e:E(+e),i):r},i.order=function(e){return arguments.length?(t=null==e?qe:"function"==typeof e?e:E(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=null==e?Ce:e,i):n},i}().keys(m).value((e,t)=>e[t]?s(e[t]):0).order(gr[d]).offset(mr[u]);let v=y(g),b=[];for(let e=0;e<v.length;e++){let t=v[e];for(let e=0;e<t.length;e++){let n=t[e],r=t[e].data[t.key];r&&(r[l]={value:n[0]},r[c]={value:n[1]},b.push(n[0],n[1]))}}let x=Object.keys(p).map(e=>{let t=n(p[e].key);return t?t.field(p[e].field):null}).filter(e=>!!e);const S=ir({title:x.map(e=>e.title()).join(", "),min:pr(b),max:hr(b),type:"measure",formatter:x[0]?x[0].formatter:void 0});e.fields.push(S)}function vr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={};const r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).logger;if(Array.isArray(e))n.items=e.map(e=>({value:e,label:String(e)}));else if(e){if("collection"in e)n=m({},t.collection(e.collection));else{const i=t.dataset?t.dataset(e.source):null;let o=e.value||(e=>e),a=e.label||(e=>e);if(e.groupBy||e.mapTo)r.warn('Deprecated "data" configuration',e),n.items=[];else if(e.hierarchy)n.root=i.hierarchy?i.hierarchy(e.hierarchy):null,n.fields=i.fields();else if(e.items)n.items=e.skipNormalize?e.items:e.items.map(e=>({value:o(e),label:String(a(e))}));else if(e.extract){const r=Array.isArray(e.extract)?e.extract:[e.extract];n.items=[];const o=[];r.forEach(e=>{const r=e.source?t.dataset(e.source):i;r&&(n.items=[...n.items,...r.extract(e)],void 0!==e.field&&o.push(r.field(e.field)))}),o.length&&(n.fields=o),e.amend&&Array.isArray(e.amend)&&(n.items=[...n.items,...e.amend])}else if(void 0!==e.field&&i){const t=i.field(e.field);t&&(n.fields||(n.fields=[]),n.fields.push(t),"value"in e||(o=t.value||(e=>e),a=t.label||(e=>e),n.value=o),n.items=t.items().map(t=>({value:o(t),label:String(a(t)),source:{field:e.field}})))}else e.fields&&e.fields.forEach(e=>{const r="object"==typeof e&&e.source?t.dataset(e.source):i;if(!r)return;let o;o="object"==typeof e&&void 0!==e.field?r.field(e.field):r.field(e),o&&(n.fields||(n.fields=[]),n.fields.push(o))});n.items&&e.map&&(n.items=n.items.map(e.map))}e&&e.stack&&(Array.isArray(e.stack.stackByKey)?e.stack.stackByKey.forEach(r=>{const i=n.items.filter(e=>{var t;return(null===(t=e.key)||void 0===t?void 0:t.value)&&e.key.value===r});yr(n,e.stack,t.dataset,i)}):yr(n,e.stack,t.dataset,n.items))}return e&&!Array.isArray(e)&&"function"==typeof e.filter&&n.items&&(n.items=n.items.filter(e.filter)),e&&!Array.isArray(e)&&"function"==typeof e.sort&&n.items&&(n.items=n.items.sort(e.sort)),n}function br(e,t,n){let r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:vr;if(e.data){const r=i(e.data,t,n);if(r&&r.fields&&r.fields[0])return r.fields[0].formatter()}if(r=e.formatter?"".concat(e.formatter,"-").concat(e.type||"number"):e.type||"d3-number",n.formatter.has(r)){return n.formatter.get(r)(e.format||"")}throw new Error("Formatter of type '".concat(r,"' was not found"))}function xr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}const Sr=Symbol("implicit");function wr(){var e=new qt,t=[],n=[],r=Sr;function i(i){let o=e.get(i);if(void 0===o){if(r!==Sr)return r;e.set(i,o=t.push(i)-1)}return n[o%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new qt;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return wr(t,n).unknown(r)},xr.apply(i,arguments),i}function Mr(){var e,t,n=wr().unknown(void 0),r=n.domain,i=n.range,o=0,a=1,s=!1,l=0,c=0,u=.5;function d(){var n=r().length,d=a<o,f=d?a:o,h=d?o:a;e=(h-f)/Math.max(1,n-l+2*c),s&&(e=Math.floor(e)),f+=(h-f-e*(n-l))*u,t=e*(1-l),s&&(f=Math.round(f),t=Math.round(t));var p=function(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),o=new Array(i);++r<i;)o[r]=e+r*n;return o}(n).map(function(t){return f+e*t});return i(d?p.reverse():p)}return delete n.unknown,n.domain=function(e){return arguments.length?(r(e),d()):r()},n.range=function(e){return arguments.length?([o,a]=e,o=+o,a=+a,d()):[o,a]},n.rangeRound=function(e){return[o,a]=e,o=+o,a=+a,s=!0,d()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(s=!!e,d()):s},n.padding=function(e){return arguments.length?(l=Math.min(1,c=+e),d()):l},n.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),d()):l},n.paddingOuter=function(e){return arguments.length?(c=+e,d()):c},n.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},n.copy=function(){return Mr(r(),[o,a]).round(s).paddingInner(l).paddingOuter(c).align(u)},xr.apply(d(),arguments)}function kr(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Cr(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function qr(){}var Er=.7,Dr=1/Er,Tr="\\s*([+-]?\\d+)\\s*",Or="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Nr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ar=/^#([0-9a-f]{3,8})$/,_r=new RegExp(`^rgb\\(${Tr},${Tr},${Tr}\\)$`),Ir=new RegExp(`^rgb\\(${Nr},${Nr},${Nr}\\)$`),Lr=new RegExp(`^rgba\\(${Tr},${Tr},${Tr},${Or}\\)$`),Pr=new RegExp(`^rgba\\(${Nr},${Nr},${Nr},${Or}\\)$`),Rr=new RegExp(`^hsl\\(${Or},${Nr},${Nr}\\)$`),zr=new RegExp(`^hsla\\(${Or},${Nr},${Nr},${Or}\\)$`),Fr={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function jr(){return this.rgb().formatHex()}function Br(){return this.rgb().formatRgb()}function Vr(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Ar.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Hr(t):3===n?new Ur(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?$r(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?$r(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=_r.exec(e))?new Ur(t[1],t[2],t[3],1):(t=Ir.exec(e))?new Ur(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Lr.exec(e))?$r(t[1],t[2],t[3],t[4]):(t=Pr.exec(e))?$r(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Rr.exec(e))?Zr(t[1],t[2]/100,t[3]/100,1):(t=zr.exec(e))?Zr(t[1],t[2]/100,t[3]/100,t[4]):Fr.hasOwnProperty(e)?Hr(Fr[e]):"transparent"===e?new Ur(NaN,NaN,NaN,0):null}function Hr(e){return new Ur(e>>16&255,e>>8&255,255&e,1)}function $r(e,t,n,r){return r<=0&&(e=t=n=NaN),new Ur(e,t,n,r)}function Wr(e,t,n,r){return 1===arguments.length?function(e){return e instanceof qr||(e=Vr(e)),e?new Ur((e=e.rgb()).r,e.g,e.b,e.opacity):new Ur}(e):new Ur(e,t,n,null==r?1:r)}function Ur(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Yr(){return`#${Jr(this.r)}${Jr(this.g)}${Jr(this.b)}`}function Kr(){const e=Gr(this.opacity);return`${1===e?"rgb(":"rgba("}${Xr(this.r)}, ${Xr(this.g)}, ${Xr(this.b)}${1===e?")":`, ${e})`}`}function Gr(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Xr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Jr(e){return((e=Xr(e))<16?"0":"")+e.toString(16)}function Zr(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ei(e,t,n,r)}function Qr(e){if(e instanceof ei)return new ei(e.h,e.s,e.l,e.opacity);if(e instanceof qr||(e=Vr(e)),!e)return new ei;if(e instanceof ei)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new ei(a,s,l,e.opacity)}function ei(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function ti(e){return(e=(e||0)%360)<0?e+360:e}function ni(e){return Math.max(0,Math.min(1,e||0))}function ri(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}kr(qr,Vr,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:jr,formatHex:jr,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Qr(this).formatHsl()},formatRgb:Br,toString:Br}),kr(Ur,Wr,Cr(qr,{brighter(e){return e=null==e?Dr:Math.pow(Dr,e),new Ur(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?Er:Math.pow(Er,e),new Ur(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ur(Xr(this.r),Xr(this.g),Xr(this.b),Gr(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:Yr,formatHex:Yr,formatHex8:function(){return`#${Jr(this.r)}${Jr(this.g)}${Jr(this.b)}${Jr(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Kr,toString:Kr})),kr(ei,function(e,t,n,r){return 1===arguments.length?Qr(e):new ei(e,t,n,null==r?1:r)},Cr(qr,{brighter(e){return e=null==e?Dr:Math.pow(Dr,e),new ei(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?Er:Math.pow(Er,e),new ei(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Ur(ri(e>=240?e-240:e+120,i,r),ri(e,i,r),ri(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new ei(ti(this.h),ni(this.s),ni(this.l),Gr(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 e=Gr(this.opacity);return`${1===e?"hsl(":"hsla("}${ti(this.h)}, ${100*ni(this.s)}%, ${100*ni(this.l)}%${1===e?")":`, ${e})`}`}}));var ii=e=>()=>e;function oi(e){return 1===(e=+e)?ai:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):ii(isNaN(t)?n:t)}}function ai(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):ii(isNaN(e)?t:e)}var si=function e(t){var n=oi(t);function r(e,t){var r=n((e=Wr(e)).r,(t=Wr(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=ai(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function li(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,i=t.slice();return function(o){for(n=0;n<r;++n)i[n]=e[n]*(1-o)+t[n]*o;return i}}function ci(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=gi(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<i;++n)a[n]=o[n](e);return a}}function ui(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function di(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function fi(e,t){var n,r={},i={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=gi(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}var hi=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,pi=new RegExp(hi.source,"g");function mi(e,t){var n,r,i,o=hi.lastIndex=pi.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=hi.exec(e))&&(r=pi.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:di(n,r)})),o=pi.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function gi(e,t){var n,r=typeof t;return null==t||"boolean"===r?ii(t):("number"===r?di:"string"===r?(n=Vr(t))?(t=n,si):mi:t instanceof Vr?si:t instanceof Date?ui:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?li:Array.isArray(t)?ci:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?fi:di)(e,t)}function yi(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function vi(e){return+e}var bi=[0,1];function xi(e){return e}function Si(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function wi(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=Si(i,r),o=n(a,o)):(r=Si(r,i),o=n(o,a)),function(e){return o(r(e))}}function Mi(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=Si(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(t){var n=Ct(e,t,1,r)-1;return o[n](i[n](t))}}function ki(){var e,t,n,r,i,o,a=bi,s=bi,l=gi,c=xi;function u(){var e=Math.min(a.length,s.length);return c!==xi&&(c=function(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(a[0],a[e-1])),r=e>2?Mi:wi,i=o=null,d}function d(t){return null==t||isNaN(t=+t)?n:(i||(i=r(a.map(e),s,l)))(e(c(t)))}return d.invert=function(n){return c(t((o||(o=r(s,a.map(e),di)))(n)))},d.domain=function(e){return arguments.length?(a=Array.from(e,vi),u()):a.slice()},d.range=function(e){return arguments.length?(s=Array.from(e),u()):s.slice()},d.rangeRound=function(e){return s=Array.from(e),l=yi,u()},d.clamp=function(e){return arguments.length?(c=!!e||xi,u()):c!==xi},d.interpolate=function(e){return arguments.length?(l=e,u()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,u()}}function Ci(e,t,n,r){var i,o=function(e,t,n){n=+n;const r=(t=+t)<(e=+e),i=r?_t(t,e,n):_t(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}(e,t,n);switch((r=Pe(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(_e(t)/3)))-_e(Math.abs(e)))}(o,a))||(r.precision=i),He(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,_e(t)-_e(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(e){return Math.max(0,-_e(Math.abs(e)))}(o))||(r.precision=i-2*("%"===r.type))}return Ve(r)}function qi(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){if(!((n=+n)>0))return[];if((e=+e)===(t=+t))return[e];const r=t<e,[i,o,a]=r?At(t,e,n):At(e,t,n);if(!(o>=i))return[];const s=o-i+1,l=new Array(s);if(r)if(a<0)for(let e=0;e<s;++e)l[e]=(o-e)/-a;else for(let e=0;e<s;++e)l[e]=(o-e)*a;else if(a<0)for(let e=0;e<s;++e)l[e]=(i+e)/-a;else for(let e=0;e<s;++e)l[e]=(i+e)*a;return l}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return Ci(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,i,o=t(),a=0,s=o.length-1,l=o[a],c=o[s],u=10;for(c<l&&(i=l,l=c,c=i,i=a,a=s,s=i);u-- >0;){if((i=_t(l,c,n))===r)return o[a]=l,o[s]=c,t(o);if(i>0)l=Math.floor(l/i)*i,c=Math.ceil(c/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,c=Math.floor(c*i)/i}r=i}return e},e}function Ei(){var e=ki()(xi,xi);return e.copy=function(){return t=e,Ei().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());var t},xr.apply(e,arguments),qi(e)}function Di(){var e,t=[.5],n=[0,1],r=1;function i(i){return null!=i&&i<=i?n[Ct(t,i,0,r)]:e}return i.domain=function(e){return arguments.length?(t=Array.from(e),r=Math.min(t.length,n.length-1),i):t.slice()},i.range=function(e){return arguments.length?(n=Array.from(e),r=Math.min(t.length,n.length-1),i):n.slice()},i.invertExtent=function(e){var r=n.indexOf(e);return[t[r-1],t[r]]},i.unknown=function(t){return arguments.length?(e=t,i):e},i.copy=function(){return Di().domain(t).range(n).unknown(e)},xr.apply(i,arguments)}function Ti(e){return void 0===e?e=>e:t=>e(t)}function Oi(e){return Math.max(0,Math.min(1,e))}function Ni(e){return"object"==typeof e}function Ai(e,t,n){const r=Math.abs(t-n)/(e+1),i=[];for(let o=1;o<=e;o++){const e=o*r;i.push(t<n?t+e:t-e)}return i}function _i(e,t,n){if(1===e.length)return e;const r=e.concat([]);for(let i=0;i<e.length;i++){let o=e[i],a=e[i+1];0===i&&o!==n.start()?(r.push(...Ai(t,o,a)),o-=a-o,a=e[i],r.push(...Ai(t,o,a))):i===e.length-1&&a!==n.end()?(a=o+(o-e[i-1]),r.push(...Ai(t,o,a))):r.push(...Ai(t,o,a))}return r.filter(e=>e>=n.min()&&e<=n.max())}function Ii(e){let t=e.distance,n=e.scale,r=e.minorCount,i=void 0===r?0:r,o=e.unitDivider,a=void 0===o?100:o,s=e.formatter,l=void 0===s?void 0:s;const c=b(a)||b(t)?2:Math.max(t/a,2),u=Math.min(1e3,Math.round(c));let d=n.ticks(u);d.length<=1&&(d=n.ticks(u+1));const f=i>0?_i(d,i,n):d;f.sort((e,t)=>e-t);const h=f.map(Ti(l));return f.map((e,t)=>{const r=n(e);return{position:r,start:r,end:r,label:h[t],value:e,isMinor:-1===d.indexOf(e)}})}function Li(e){let t=e.distance,n=e.scale,r=e.minorCount,i=void 0===r?0:r,o=e.unitDivider,a=void 0===o?100:o,s=e.formatter,l=void 0===s?void 0:s;const c=b(a)||b(t)?2:Math.max(t/a,2),u=Math.min(1e3,Math.round(c)),d=u>10?10:u;n.nice(d);const f=n.ticks(u),h=i>0?_i(f,i,n):f;h.sort((e,t)=>e-t);const p=h.map(Ti(l));return h.map((e,t)=>{const r=n(e);return{position:r,start:r,end:r,label:p[t],value:e,isMinor:-1===f.indexOf(e)}})}function Pi(e){let t,n=e.settings,r=e.scale,i=e.distance,o=e.formatter,a=void 0===o?e=>e:o;const s=n.minorTicks&&!b(n.minorTicks.count)?Math.min(100,n.minorTicks.count):0;if(Array.isArray(n.ticks.values)){const e=n.ticks.values.filter(e=>"object"==typeof e?!b(e.value):!b(e));t=function(e){let t=e.values,n=e.scale,r=e.formatter,i=void 0===r?e=>e:r;return t.sort((e,t)=>(Ni(e)?e.value:e)-(Ni(t)?t.value:t)).filter((e,t,r)=>{const i=Ni(e)?e.value:e;return i<=n.max()&&i>=n.min()&&r.indexOf(e)===t}).map(e=>{const t=Ni(e),r=t?e.value:e,o=n(r);return{position:o,value:r,label:t&&void 0!==e.label?e.label:i(r),isMinor:!!t&&!!e.isMinor,start:t&&!isNaN(e.start)?Oi(n(e.start)):o,end:t&&!isNaN(e.end)?Oi(n(e.end)):o}})}({values:e,scale:r.copy(),formatter:a})}else if(b(n.ticks.count)){t=(n.ticks.tight?Li:Ii)({distance:i,minorCount:s,unitDivider:n.ticks.distance,scale:r,formatter:a}),n.ticks.forceBounds&&function(e,t,n){const r=e.map(e=>e.position),i=t.range();-1===r.indexOf(i[0])?e.splice(0,0,{position:i[0],start:i[0],end:i[0],label:n(t.start()),isMinor:!1,value:t.start()}):e[0]&&e[0].isMinor&&(e[0].isMinor=!1);const o=e[e.length-1];-1===r.indexOf(i[1])?e.push({position:i[1],start:i[1],end:i[1],label:n(t.end()),isMinor:!1,value:t.end()}):o&&o.isMinor&&(o.isMinor=!1)}(t,r,a)}else{t=function(e){let t=e.count,n=e.minorCount,r=e.scale,i=e.formatter;return r.ticks((t-1)*n+t).map((e,t)=>{const o=r(e);return{position:o,start:o,end:o,label:i(e),isMinor:t%(n+1)!==0,value:e}})}({count:Math.min(1e3,n.ticks.count),minorCount:s,scale:r.copy(),formatter:a})}return t}function Ri(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r={};return Object.keys(t).forEach(i=>{const o=typeof e[i];r[i]="function"===o?e[i](n):"undefined"===o?t[i]:e[i]}),r}const zi={min:NaN,max:NaN,expand:NaN,include:[],invert:!1},Fi={tight:!1,forceBounds:!1,values:void 0,count:NaN,distance:100},ji={count:NaN};function Bi(e,t){e.instance||(e.instance=t.copy(),e.instance.domain([t.start(),t.end()]),e.instance.clamp(!0),e.instance.range(e.invert?[1,0]:[0,1]))}function Vi(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=Ei(),i={instance:null,invert:!1},o={data:t,resources:n},a=Ri(e,zi,o);let s;function l(e){return b(e)?NaN:r(e)}a.ticks=Ri(e.ticks,Fi,o),a.minorTicks=Ri(e.minorTicks,ji,o),l.data=()=>t,l.invert=function(e){return r.invert(e)},l.rangeRound=function(e){return r.rangeRound(e),l},l.clamp=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return r.clamp(e),l},l.cachedTicks=function(){return s},l.clearTicksCache=function(){return s=void 0,this},l.ticks=function(e){return null!==e&&"object"==typeof e?(e.settings=e.settings||{},e.settings=u(!0,{},a,e.settings),e.scale=l,s=Pi(e),s):(s=r.ticks(e),s)},l.nice=function(e){return r.nice(e),l},l.tickFormat=function(e,t){return r.tickFormat(e,t)},l.interpolate=function(e){return r.interpolate(e),l},l.domain=function(e){return arguments.length?(r.domain(e),i.instance&&i.instance.domain([l.start(),l.end()]),l):r.domain()},l.range=function(e){return arguments.length?(r.range(e),l):r.range()},l.start=function(){return l.domain()[0]},l.end=function(){return l.domain()[this.domain().length-1]},l.min=function(){return Math.min(this.start(),this.end())},l.max=function(){return Math.max(this.start(),this.end())},l.classify=function(e){let t=(l.start()-l.end())/e,n=[l.end()],r=[],i=t/2;for(let o=0;o<e;o++){let e=n[n.length-1]||0,o=e+t,a=l(e+i);n.push(o,o),r.push(a,a)}return n.pop(),l.domain(n),l.range(r),l},l.copy=function(){const i=Vi(e,t,n);return i.domain(l.domain()),i.range(l.range()),i.clamp(r.clamp()),i},l.norm=function(e){return Bi(i,l),i.instance(e)},l.normInvert=function(e){return Bi(i,l),i.instance.invert(e)};const c=function(e,t){const n=+e.min,r=+e.max;let i=0,o=1;if(t&&t[0]){const n=t.map(e=>e.min()).filter(e=>!isNaN(e)),r=t.map(e=>e.max()).filter(e=>!isNaN(e));if(i=n.length?Math.min(...n):Number.NaN,o=r.length?Math.max(...r):Number.NaN,isNaN(i)||isNaN(o))i=-1,o=1;else if(i===o&&0===i)i=-1,o=1;else if(i===o&&i)i-=Math.abs(.1*i),o+=Math.abs(.1*o);else if(!isNaN(e.expand)){const t=o-i;i-=t*e.expand,o+=t*e.expand}if(Array.isArray(e.include)){const t=e.include.filter(e=>!isNaN(e));i=Math.min(...t,i),o=Math.max(...t,o)}}return{mini:isNaN(n)?i:n,maxi:isNaN(r)?o:r}}(a,t?t.fields:[]),d=c.mini,f=c.maxi;return l.domain([d,f]),l.range(a.invert?[1,0]:[0,1]),i.invert=a.invert,l}const Hi={padding:0,paddingInner:NaN,paddingOuter:NaN,align:.5,invert:!1,maxPxStep:NaN,range:[0,1]};function $i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={data:t,resources:arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}},r=Ri(e,Hi,n),i=t.items||[],o={},a=[],s=[];function l(e,n){e.data=()=>t,e.datum=e=>i[o[e]],e.start=function(){return e.domain()[0]},e.end=function(){return e.domain()[e.domain().length-1]},e.labels=()=>s,e.ticks=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.scale=e,function(e){let t=e.scale;const n=t.domain(),r=t.data().items,i=t.labels?t.labels():n,o=t.bandwidth();return n.map((e,n)=>{const a=t(e);return{position:a+o/2,label:"".concat(i[n]),data:r?r[n]:void 0,start:a,end:a+o}})}(t,n.trackBy)}}const c=Mr();l(c,e),c.pxScale=function(t){const n=r.maxPxStep;if(isNaN(n))return c;const i=c.domain().length,o=Math.max(1,i-c.paddingInner()+2*c.paddingOuter());if(o*n>=t)return c;const a=c.copy();a.type=c.type,l(a,e);const s=o*n/t,u=(1-s)*c.align();return a.range(r.invert?[s+u,u]:[u,s+u]),a};const d="function"==typeof e.value?e.value:e=>e.datum.value,f="function"==typeof e.label?e.label:e=>e.datum.label;for(let e=0;e<i.length;e++){const t=u({datum:i[e]},n),r=d(t,e);-1===a.indexOf(r)&&(a.push(r),s.push(f(t,e)),o[r]=e)}return c.domain(a),c.range(r.invert?r.range.slice().reverse():r.range),c.padding(isNaN(r.padding)?0:r.padding),isNaN(r.paddingInner)||c.paddingInner(r.paddingInner),isNaN(r.paddingOuter)||c.paddingOuter(r.paddingOuter),c.align(isNaN(r.align)?.5:r.align),c}const Wi={depth:0};function Ui(e,t,n){return e.ancestors().map(e=>t(u({datum:e.data},n))).reverse().slice(1).toString()}const Yi=e=>e.min(),Ki=e=>e.max();function Gi(e,t){const n=e&&!isNaN(e.min),r=e&&!isNaN(e.max);let i=n?+e.min:0,o=r?+e.max:1;if(t&&t.length){if(!n){const e=t.map(Yi).filter(v);i=e.length?Math.min(...e):i}if(!r){const e=t.map(Ki).filter(v);o=e.length?Math.max(...e):o}}return[i,o]}const Xi={domain:[],range:[],invert:!1,min:NaN,max:NaN};function Ji(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=Vi(e,t,n).clamp(!0).interpolate(si),i=Ri(e,Xi,{data:t,resources:n}),o=Array.isArray(i.domain)&&i.domain.length,a=Array.isArray(i.range)&&i.range.length,s=r;u(!0,s,r);const l=g(Gi(i,t?t.fields:[]),2),c=l[0],d=l[1],f=o?i.domain.length:-1,h=n.theme?n.theme.palette("sequential",f>0?f:2):[],p=a?i.range:h;return s.range(i.invert?p.slice().reverse():p.slice()),s.domain(o?i.domain:function(e,t,n){const r=e.length;if(2===r)return[t,n];const i=[],o=(n-t)/(r-1);i.push(t);for(let e=1;e<r-1;e++)i.push(t+o*e);return i.push(n),i}(s.range(),c,d)),s}const Zi={domain:[],range:[],invert:!1,min:NaN,max:NaN,nice:!1};function Qi(e){const t=[];for(let n=0;n<e.length-1;n++)t.push((e[n]+e[n+1])/2);return t}const eo={domain:[],range:[]};const to={domain:[],range:[],unknown:void 0},no={domain:[],range:[],override:!1};const ro=Ne();function io(e,t,n){let r=e.data;e.source&&(n.logger.warn("Deprecated: Scale data source configuration"),r={extract:[]},(Array.isArray(e.source)?e.source:[e.source]).forEach(e=>{r.extract.push({field:e})}));const i=vr(r,t,n);let o,a=e.type||function(e){return e.root?"h-band":e.fields&&e.fields[0]?function(e){const t=e.map(e=>"dimension"===e.type()?"band":"linear");return-1!==t.indexOf("linear")?"linear":"band"}(e.fields):"linear"}(i);return"color"===a&&(a=i.fields&&i.fields[0]&&"dimension"===i.fields[0].type()?"categorical-color":"sequential-color"),n.scale.has(a)&&(o=n.scale.get(a),o=o(e,i,{theme:n.theme,logger:n.logger}),o.type=a),o}ro("linear",Vi),ro("band",$i),ro("h-band",function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i={data:n,resources:r},o=Ri(t,Hi,i);o.ticks=Ri(t.ticks,Wi,i),o.value="function"==typeof t.value?t.value:e=>e.datum.value,o.label="function"==typeof t.label?t.label:e=>e.datum.value;let a=$i(o);const s=function(e,t,n){const r=t.ticks.depth,i=t.value,o=t.label,a=[],s=[],l={},c=[];let d=0;if(!e)return{values:a,labels:s,items:l,ticks:c};e.eachAfter(e=>{if(e.depth>0){const t=Ui(e,i,n),f=e.leaves()||[e],h=i(u({datum:e.data},n)),p=o(u({datum:e.data},n)),m=Array.isArray(e.children),g={key:t,count:f.length,value:h,label:p,leftEdge:Ui(f[0],i,n),rightEdge:Ui(f[Math.max(f.length-1,0)],i,n),node:e};m?(a.push("SPACER_".concat(d,"_SPACER")),d++):(a.push(t),s.push(p)),(r<=0&&!m||e.depth===r)&&c.push(g),l[t]=g}});const f=e.height-1;return f>0&&a.splice(-f),{values:a,labels:s,items:l,ticks:c}}(n.root,o,i),l=s.values,c=s.labels,d=s.items,f=s.ticks,h=function(e){const t=String(e),n=d[t];return a(n?o.invert?n.rightEdge:n.leftEdge:t)};u(!0,h,a),h.bandwidth=function(e){const t=d[String(e)],n=a.bandwidth();if(t&&!t.isLeaf){const e=h(t.leftEdge),r=h(t.rightEdge);return Math.abs(e-r)+n}return n},h.step=function(e){const t=d[String(e)],n=t?t.count:1;let r=a.step();return r*=n,r},h.data=()=>n,h.datum=e=>{const t=d[String(e)];return t?t.node.data:null},h.copy=()=>e(t,n,r),h.labels=()=>c,h.ticks=()=>f.map(e=>{const t=h(e.key),n=h.bandwidth(e.key);return{position:t+n/2,label:e.label,data:e.node.data,start:t,end:t+n}});const p=a.pxScale;return h.pxScale=function(e){return a=p(e),h},h.domain(l),h}),ro("sequential-color",Ji),ro("threshold-color",function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=Di(),i=Ri(e,Zi,{data:t,resources:n}),o=Array.isArray(i.domain)&&i.domain.length,a=Array.isArray(i.range)&&i.range.length;function s(e){return b(e)?NaN:r(e)}Object.keys(r).forEach(e=>s[e]=r[e]);const l=g(Gi(i,t.fields),2),c=l[0],u=l[1],d=o?i.domain.length:-1,f=n.theme?n.theme.palette("sequential",d>0?d:2):[];let h=a?i.range:f,p=[];return p=o?i.domain:i.nice?function(e,t,n){const r=2===e.length?10:Math.max(1,e.length),i=Ei().domain([t,n]).nice(r).ticks(r);if(!e||!e.length)return i;const o=Math.max(0,e.length-1);for(;i.length>o;)i[0]-t<=n-i[i.length-1]?i.shift():i.pop();return i}(h,c,u):[c+(u-c)/2],h.length>p.length+1?p=function(e,t,n){const r=e.length;if(2===r)return[t+(n-t)/2];const i=[],o=(n-t)/r;for(let e=1;e<r;e++)i.push(t+o*e);return i}(h,c,u):h.length<p.length+1&&(h=function(e,t,n,r){n=e[0],r=e&&e.length>=2?e[e.length-1]:r;const i=Ji().domain([n,r]).range(t);return[n,...Qi(e),r].map(e=>i(e))}(p,h,c,u)),s.data=()=>t,s.range(i.invert?h.slice().reverse():h),s.domain(p),s}),ro("categorical-color",function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=wr(),i={data:t,resources:n},o=Ri(e,eo,i),a="function"==typeof e.value?e.value:e=>e.datum.value,s="function"==typeof e.label?e.label:e=>e.datum.label,l=t.items||[],c={},d=[],f=[];for(let e=0;e<l.length;e++){const t=u({datum:l[e]},i),n=a(t,e);-1===d.indexOf(n)&&(d.push(n),f.push(s(t,e)),c[n]=e)}return r.data=()=>t,r.labels=()=>f,r.label=e=>f[d.indexOf(e)],r.datum=e=>l[c[e]],r.range(o.range),Array.isArray(o.domain)&&o.domain.length?r.domain(o.domain):r.domain(d),r}(e,t,n),i=n.theme,o=Ri(e,to,{data:t,resources:n});let a;if(o.explicit=Ri(e.explicit,no,{data:t,resources:n}),a=Array.isArray(o.range)&&0!==o.range.length?o.range.slice():i?i.palette("categorical",r.domain().length).slice():[],o.unknown)r.unknown(o.unknown);else if(i&&i.palette("unknown")){let e=i.palette("unknown");r.unknown(e[0])}if(Array.isArray(o.explicit.domain)&&o.explicit.domain.length){const e=r.domain().slice(),t=o.explicit.domain,n=Array.isArray(o.explicit.range)?o.explicit.range:[],i=Math.floor(e.length/a.length);for(let e=1;e<i+1;e*=2)a=a.concat(a);if(o.explicit.override)for(let r=0;r<t.length;r++){const i=e.indexOf(t[r]);i>-1&&(a[i]=n[r])}else{const r=t.map((t,r)=>[e.indexOf(t),t,n[r]]).sort((e,t)=>e[0]-t[0]);r.forEach(t=>{const n=e.indexOf(t[1]);-1!==n&&a.splice(n,0,t[2])})}a.length=e.length}return r.range(a),r});var oo={};function ao(){ao.init.call(this)}oo.isObject=function(e){return"object"==typeof e&&null!==e},oo.isNumber=function(e){return"number"==typeof e},oo.isUndefined=function(e){return void 0===e},oo.isFunction=function(e){return"function"==typeof e};var so=ao;ao.EventEmitter=ao,ao.prototype._events=void 0,ao.prototype._maxListeners=void 0,ao.defaultMaxListeners=10,ao.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},ao.prototype.setMaxListeners=function(e){if(!oo.isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},ao.prototype.emit=function(e){var t,n,r,i,o,a;if(this._events||(this._events={}),"error"===e&&!this._events.error)throw(t=arguments[1])instanceof Error?t:Error('Uncaught, unspecified "error" event.');if(n=this._events[e],oo.isUndefined(n))return!1;if(oo.isFunction(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(r=arguments.length,i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];n.apply(this,i)}else if(oo.isObject(n)){for(r=arguments.length,i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];for(r=(a=n.slice()).length,o=0;o<r;o++)a[o].apply(this,i)}return!0},ao.prototype.addListener=function(e,t){var n;if(!oo.isFunction(t))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,oo.isFunction(t.listener)?t.listener:t),this._events[e]?oo.isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,oo.isObject(this._events[e])&&!this._events[e].warned)&&((n=oo.isUndefined(this._maxListeners)?ao.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,oo.isFunction(console.error)&&console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),oo.isFunction(console.trace)&&console.trace()));return this},ao.prototype.on=ao.prototype.addListener,ao.prototype.once=function(e,t){if(!oo.isFunction(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},ao.prototype.removeListener=function(e,t){var n,r,i,o;if(!oo.isFunction(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(i=(n=this._events[e]).length,r=-1,n===t||oo.isFunction(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(oo.isObject(n)){for(o=i;o-- >0;)if(n[o]===t||n[o].listener&&n[o].listener===t){r=o;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},ao.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],oo.isFunction(n))this.removeListener(e,n);else if(Array.isArray(n))for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},ao.prototype.listeners=function(e){return this._events&&this._events[e]?oo.isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},ao.listenerCount=function(e,t){return e._events&&e._events[t]?oo.isFunction(e._events[t])?1:e._events[t].length:0};var lo={mixin:e=>(Object.keys(so.prototype).forEach(t=>{e[t]=so.prototype[t]}),so.init(e),e)};function co(){let e=0,t=0,n=0,r=0;n=n||e;const i={move(e){this.moveTo(n+e)},moveTo(o){const a=Math.max(e,Math.min(t-r,o));n!==a&&(n=a,i.emit("update"))},update(o){let a=!1;var s=o.min;e=void 0===s?e:s;var l=o.max;t=void 0===l?t:l,void 0!==o.viewSize&&o.viewSize!==r&&(r=o.viewSize,a=!0);const c=Math.max(e,Math.min(t-r,n));n!==c&&(n=c,a=!0),a&&i.emit("update")},getState:()=>({min:e,max:t,start:n,viewSize:r})};return lo.mixin(i),i}function uo(e,t){const n=e.min||0,r=e.max||0,i=e.viewSize||0,o=t||co();return o.update({min:n,max:r,viewSize:i}),o}function fo(e,t){return e<=t}function ho(e,t){return e<t}function po(e,t,n){let r=0;for(;r<e.length&&t>e[r];)++r;return e[r]===t&&n&&++r,r}function mo(){let e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=[];function i(){}return i.configure=function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=n.includeMax,i=void 0===r||r,o=n.includeMin;e=i?fo:ho,t=void 0===o||o?fo:ho},i.add=e=>{let t=e.min,n=e.max;const i=po(r,t),o=po(r,n,!0),a=[i,o-i];i%2==0&&a.push(t),o%2==0&&a.push(n);const s=r.join(",");r.splice(...a);return s!==r.join(",")},i.remove=e=>{let t=e.min,n=e.max;const i=po(r,t),o=po(r,n,!0),a=[i,o-i];i%2==1&&a.push(t),o%2==1&&a.push(n);const s=r.join(",");r.splice(...a);return s!==r.join(",")},i.set=e=>{const t=r.join(",");r=[],Array.isArray(e)?e.forEach(i.add):i.add(e);return t!==r.join(",")},i.clear=()=>{const e=r.length>0;return r=[],e},i.containsValue=n=>function(e,t,n,r){const i=e.length;for(let o=1;o<i;o+=2)if(n(e[o-1],t)&&r(t,e[o]))return!0;return!1}(r,n,t,e),i.containsRange=e=>{let t=e.min,n=e.max;const i=po(r,t,!0),o=po(r,n);return i===o&&o%2==1},i.toggle=e=>i.containsRange(e)?i.remove(e):i.add(e),i.ranges=()=>{const e=[];for(let t=1;t<r.length;t+=2)e.push({min:r[t-1],max:r[t]});return e},i.configure(n),i}function go(){let e=[];function t(){}return t.add=t=>-1===e.indexOf(t)&&(e.push(t),!0),t.remove=t=>{const n=e.indexOf(t);return-1!==n&&(e.splice(n,1),!0)},t.contains=t=>-1!==e.indexOf(t),t.values=()=>e.slice(),t.clear=()=>e=[],t.toString=()=>e.join(";"),t}const yo={key:void 0,includeMin:!0,includeMax:!0};function vo(e){let t=e.items,n=e.collection,r=e.vc;const i={},o=[];let a,s;for(let e=0,o=t.length;e<o;e++){a=t[e].key,n[a]||(n[a]=r()),s=t[e].values||[t[e].value];for(let e=0;e<s.length;e++)n[a].add(s[e])&&(i[a]=i[a]||[],i[a].push(s[e]))}const l=Object.keys(i);for(let e=0,t=l.length;e<t;e++)a=l[e],o.push({id:a,values:i[a]});return o}function bo(e){let t=e.items,n=e.collection;const r={},i=[];let o,a;for(let e=0,i=t.length;e<i;e++)if(o=t[e].key,n[o]){a=t[e].values||[t[e].value];for(let e=0;e<a.length;e++)n[o].remove(a[e])&&(r[o]=r[o]||[],r[o].push(a[e]))}const s=Object.keys(r);for(let e=0,t=s.length;e<t;e++)o=s[e],i.push({id:o,values:r[o]});return i}function xo(e){const t={};let n,r;for(let i=0,o=e.length;i<o;i++){n=e[i].key,r=e[i].values||[e[i].value],t[n]||(t[n]=[]);for(let e=0;e<r.length;e++){-1===t[n].indexOf(r[e])&&t[n].push(r[e])}}return t}function So(e){let t=e.key,n=e.collection,r=e.obj,i=e.fn,o=e.value;n[t]||(n[t]=i()),r[t]=r[t]||[],r[t].push(o),n[t].add(o)}function wo(e,t){const n=[],r=Object.keys(e);let i,o;const a=e=>-1===t[i].indexOf(e);for(let s=0,l=r.length;s<l;s++)i=r[s],t[i]?(o=e[i].filter(a),o.length&&n.push({id:i,values:o})):n.push({id:i,values:e[i]});return n}function Mo(e,t,n){const r=function(e,t){if(!Object.keys(t).length)return e;const n=e.length,r=Array(n);for(let i=0;i<n;i++)r[i]=e[i].key in t?u({},e[i],{key:t[e[i].key]}):e[i];return r}(t,n);return e&&e.length?e.reduce((e,t)=>t(e),r):r}function ko(e){return e.replace(/(-[a-z])/g,e=>e.toUpperCase().replace("-",""))}function Co(e){return e.replace(/([A-Z])/g,e=>"-".concat(e.toLowerCase()))}function qo(e,t,n){let r=n.ranges,i=n.interceptors,o=n.rc,a=n.aliases,s=n.rangeConfig;const l=Mo(i["".concat(t,"Ranges")],e,a);let c=!1;return l.forEach(e=>{const n=e.key;if(r[n]||(r[n]=o(s.sources[n]||s.default)),"set"===t)c=r[n][t](e.ranges||e.range)||c;else{const i=e.ranges||[e.range];for(let e=0;e<i.length;e++)c=r[n][t](i[e])||c}}),c}function Eo(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.vc,n=void 0===t?go:t,r=e.rc,i=void 0===r?mo:r,o=!1,a={},s={},l={},c={sources:{},default:u({},yo)};const d={addValues:[],removeValues:[],toggleValues:[],setValues:[],addRanges:[],setRanges:[],removeRanges:[],toggleRanges:[]},f=()=>{const e={values:{},ranges:{}};return Object.keys(s).forEach(t=>{e.values[t]=s[t].values()}),Object.keys(a).forEach(t=>{e.ranges[t]=a[t].ranges()}),e},h={ls:[],clear(){this.ls.forEach(e=>e.clear())},start(){this.ls.forEach(e=>e.start())},end(){this.ls.forEach(e=>e.end())},update(){const e=f();this.ls.forEach(t=>t._state(e))},updateValues(){const e=f();this.ls.forEach(t=>t._state({values:e.values}))},updateRanges(){const e=f();this.ls.forEach(t=>t._state({ranges:e.ranges}))}},p={configure:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Array.isArray(e.ranges)&&e.ranges.length&&(c={sources:{},default:u({},yo)},e.ranges.forEach(e=>{const t={};Object.keys(yo).filter(e=>"key"!==e).forEach(n=>{t[n]=void 0!==e[n]?e[n]:yo[n]}),void 0!==e.key?c.sources[e.key]=t:c.default=t}),Object.keys(a).forEach(e=>a[e].configure(c.sources[e]||c.default)),p.emit("update",[],[]))},link:e=>{if(p===e)throw new Error("Can't link to self");h.ls.push(e),e._state(f())},_state:e=>{if(!e)return f();if(e.values){const t=[];Object.keys(e.values).forEach(n=>{s[n]&&e.values[n].join(";")===s[n].toString()||t.push({key:n,values:e.values[n]})}),Object.keys(s).forEach(n=>{e.values[n]||t.push({key:n,values:[]})}),t.length&&p.setValues(t)}if(e.ranges){const t=[];Object.keys(e.ranges).forEach(n=>{a[n]&&e.ranges[n].join(";")===a[n].toString()||t.push({key:n,ranges:e.ranges[n]})}),Object.keys(a).forEach(n=>{e.ranges[n]||t.push({key:n,ranges:[]})}),t.length&&p.setRanges(t)}},start:function(){if(!o){o=!0;for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];p.emit("start",...t),h.start()}},end:function(){if(o){o=!1,a={},s={};for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];p.emit("end",...t),h.end()}},isActive:()=>o,clear:()=>{const e=p.brushes().filter(e=>"value"===e.type&&e.brush.values().length).map(e=>({id:e.id,values:e.brush.values()})),t=Object.keys(a).length>0||e.length;a={},s={},t&&(p.emit("update",[],e),h.clear())},brushes:()=>{let e=[];return e=e.concat(Object.keys(a).map(e=>({type:"range",id:e,brush:a[e]}))),e=e.concat(Object.keys(s).map(e=>({type:"value",id:e,brush:s[e]}))),e},addValue:(e,t)=>{p.addValues([{key:e,value:t}])},addValues:e=>{const t=Mo(d.addValues,e,l),r=vo({vc:n,collection:s,items:t});p.emit("add-values",t),r.length&&(o||(o=!0,p.emit("start")),p.emit("update",r,[]),h.updateValues())}};return p.setValues=e=>{const t=Mo(d.setValues,e,l),r=function(e){let t=e.items,n=e.vCollection,r=e.vc;const i={},o=xo(t);let a,s=[],l=[];const c={},u=Object.keys(n);for(let e=0,t=u.length;e<t;e++)a=u[e],c[a]=n[a].values().slice(),delete n[a];const d=e=>{n[a]&&n[a].contains(e)||So({key:a,value:e,collection:n,obj:i,fn:r})},f=Object.keys(o);for(let e=0,t=f.length;e<t;e++)a=f[e],o[a].forEach(d);return l=wo(c,i),s=wo(i,c),[s,l]}({items:t,vCollection:s,vc:n});p.emit("set-values",t),(r[0].length>0||r[1].length>0)&&(o||(o=!0,p.emit("start")),p.emit("update",r[0],r[1]),h.updateValues())},p.removeValue=(e,t)=>{p.removeValues([{key:e,value:t}])},p.removeValues=e=>{const t=Mo(d.removeValues,e,l),n=bo({collection:s,items:t});p.emit("remove-values",t),n.length&&(p.emit("update",[],n),h.updateValues())},p.addAndRemoveValues=(e,t)=>{const r=Mo(d.addValues,e,l),i=Mo(d.removeValues,t,l),a=vo({vc:n,collection:s,items:r}),c=bo({collection:s,items:i});p.emit("add-values",r),p.emit("remove-values",i),(a.length||c.length)&&(o||(o=!0,p.emit("start")),p.emit("update",a,c),h.updateValues())},p.toggleValue=(e,t)=>{p.toggleValues([{key:e,value:t}])},p.toggleValues=e=>{const t=Mo(d.toggleValues,e,l),r=function(e){let t=e.items,n=e.values,r=e.vc;const i={},o={},a=[],s=[],l=xo(t);let c,u,d;const f=Object.keys(l);for(let e=0,t=f.length;e<t;e++){c=f[e],d=l[c];for(let e=0,t=d.length;e<t;e++)u=d[e],n[c]&&n[c].contains(u)?n[c]&&n[c].contains(u)&&(o[c]=o[c]||[],o[c].push(u),n[c].remove(u)):So({key:c,value:u,collection:n,obj:i,fn:r})}const h=Object.keys(i);for(let e=0,t=h.length;e<t;e++)c=h[e],a.push({id:c,values:i[c]});const p=Object.keys(o);for(let e=0,t=p.length;e<t;e++)c=p[e],s.push({id:c,values:o[c]});return[a,s]}({items:t,values:s,vc:n});p.emit("toggle-values",t),(r[0].length>0||r[1].length>0)&&(o||(o=!0,p.emit("start")),p.emit("update",r[0],r[1]),h.updateValues())},p.containsValue=(e,t)=>{let n=l[e]||e;return!!s[n]&&s[n].contains(t)},p.addRange=(e,t)=>{p.addRanges([{key:e,range:t}])},p.addRanges=e=>{qo(e,"add",{ranges:a,rc:i,interceptors:d,aliases:l,rangeConfig:c})&&(o||(o=!0,p.emit("start")),p.emit("update",[],[]),h.updateRanges())},p.removeRange=(e,t)=>{p.removeRanges([{key:e,range:t}])},p.removeRanges=e=>{qo(e,"remove",{ranges:a,rc:i,interceptors:d,aliases:l,rangeConfig:c})&&(o||(o=!0,p.emit("start")),p.emit("update",[],[]),h.updateRanges())},p.setRange=(e,t)=>{p.setRanges([{key:e,range:t}])},p.setRanges=e=>{qo(e,"set",{ranges:a,rc:i,interceptors:d,aliases:l,rangeConfig:c})&&(o||(o=!0,p.emit("start")),p.emit("update",[],[]),h.updateRanges())},p.toggleRange=(e,t)=>{p.toggleRanges([{key:e,range:t}])},p.toggleRanges=e=>{qo(e,"toggle",{ranges:a,rc:i,interceptors:d,aliases:l,rangeConfig:c})&&(o||(o=!0,p.emit("start")),p.emit("update",[],[]),h.updateRanges())},p.containsRangeValue=(e,t)=>{let n=l[e]||e;return!!a[n]&&a[n].containsValue(t)},p.containsRange=(e,t)=>{let n=l[e]||e;return!!a[n]&&a[n].containsRange(t)},p.containsMappedData=(e,t,n)=>{let r=[];const i=Object.keys(e);let o,c,u,d;for(let t=0,n=i.length;t<n;t++){if(o=i[t],"value"===o)c=e,r[t]={key:"",i:t,bool:!1};else{if("source"===o)continue;c=e[o],r[t]={key:o,i:t,bool:!1}}u=c.source&&c.source.field,void 0!==u&&(void 0!==c.source.key&&(u="".concat(c.source.key,"/").concat(u)),u in l&&(u=l[u]),d=c.value,a[u]?r[t].bool=Array.isArray(d)?a[u].containsRange({min:d[0],max:d[1]}):a[u].containsValue(d):s[u]&&s[u].contains(d)&&(r[t].bool=!0))}return t?(r=r.filter(e=>-1!==t.indexOf(e.key)),"and"===n?!!r.length&&!r.some(e=>!1===e.bool):"xor"===n?!!r.length&&r.some(e=>e.bool)&&r.some(e=>!1===e.bool):r.some(e=>e.bool)):r.some(e=>e.bool)},p.intercept=(e,t)=>{const n=ko(e);d[n]&&d[n].push(t)},p.removeInterceptor=(e,t)=>{const n=ko(e);if(!d[n])return;const r=d[n].indexOf(t);-1!==r&&d[n].splice(r,1)},p.removeAllInterceptors=e=>{const t=[];if(e){const n=ko(e);d[n]&&d[n].length&&t.push({name:e,handlers:d[n]})}else Object.keys(d).forEach(e=>{d[e].length&&t.push({name:Co(e),handlers:d[e]})});t.forEach(e=>{e.handlers.slice().forEach(t=>p.removeInterceptor(e.name,t))})},p.addKeyAlias=(e,t)=>{l[e]=t},p.removeKeyAlias=e=>{delete l[e]},lo.mixin(p),p}function Do(e){return e*e*e}function To(e){return--e*e*e+1}function Oo(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}Ne();const No=["stroke","fill","color","backgroundColor","thumbColor"];function Ao(e,t){const n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n);let a;for(a=0;a<r;++a)i[a]=_o(e[a],t[a]);for(;a<n;++a)o[a]=t[a];return function(e){for(a=0;a<r;++a)o[a]=i[a](e);return o}}function _o(e,t,n){const r=typeof t;let i;return null==t||"boolean"===r?function(e){return()=>e}(t):("number"===r?di:"string"===r?(i=Vr(t))&&No.includes(n)?(t=i,si):mi:t instanceof Vr?si:t instanceof Date?ui:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?li:Array.isArray(t)?Ao:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?Io:di)(e,t)}function Io(e,t){const n={},r={};let i;for(i in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)i in e?n[i]=_o(e[i],t[i],i):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}function Lo(e,t){return e.data?e.data.value:"text"===e.type?e.text:t}const Po={fontFamily:"Arial",fontSize:"13px",color:"#595959",backgroundColor:"#ffffff",stroke:"#000000",strokeWidth:0,$fill:"#333333"},Ro=/^\$/;function zo(e){const t=typeof e;return"object"!==t&&"function"!==t&&"undefined"!==t}function Fo(e,t,n){const r=e[t];r&&r.scale&&r.scale.pxScale?r.scale=r.scale.pxScale(n):r&&r.pxScale&&(e[t]=r.pxScale(n))}function jo(e,t){return e.pxScale?e.pxScale(t):e}const Bo={normalizeSettings:function(e,t,n){const r=u({},e),i=u({},t);return Object.keys(r).forEach(e=>{i[e]={};const o=r[e],a=typeof o;if("function"==typeof o)i[e].fn=o;else if(zo(o)){let n=t[e];"string"==typeof n&&Ro.test(n)&&(n=Po[n]);const r=typeof n;i[e]="undefined"===r||r===a?o:n}else o&&"object"==typeof o&&("function"==typeof o.fn&&(i[e].fn=o.fn),void 0!==o.scale&&(i[e].scale=n.scale(o.scale)),"string"==typeof o.ref&&(i[e].ref=o.ref))}),Object.keys(t).forEach(e=>{if(e in r)return;const n=t[e];"string"===typeof n&&Ro.test(n)?i[e]=Po[n]:i[e]=n}),i},resolveForItem:function(e,t,n){const r={},i=Object.keys(t),o=i.length,a=e.datum,s=e.datum;for(let l=0;l<o;l++){const o=i[l],c=t[o],u="object"==typeof s&&void 0!==c,d=u&&"string"==typeof c.ref,f=u&&o in s,h=d?s[c.ref]:f?s[o]:a;zo(c)?r[o]=c:u&&c.fn?(c.scale&&(e.scale=c.scale),r[o]=c.fn.call(null,e,n)):u&&c.scale&&h?(r[o]=c.scale(h.value),c.scale.bandwidth&&(r[o]+=c.scale.bandwidth()/2)):d&&h?r[o]=h.value:c.fn?r[o]=c.fn.call(null,e,n):r[o]=c}return r},updateScaleSize:Fo};function Vo(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce((e,t)=>Array.isArray(t.children)?(e.push(...Vo(t.children)),e):(e.push(t),e),[])}function Ho(e,t){let n=t.context,r=t.data,i=t.style,o=t.filter,a=t.mode;const s=e.chart.brush(n),l=r,c=i.active||{},d=i.inactive||{},f=[];Object.keys(c).forEach(e=>{f.push(e)}),Object.keys(d).forEach(e=>{-1===f.indexOf(e)&&f.push(e)});const h=[];let p=!1;const m=()=>{let t=Vo(e.nodes);return"function"==typeof o&&(t=t.filter(o)),t},g=()=>{const e=m(),t=e.length;let n,r=!1;const i="function"==typeof l?l({brush:s}):l;for(let r=0;r<t;r++){if(n=e[r].data,!n)continue;e[r].__style||(e[r].__style={},f.forEach(t=>{e[r].__style[t]=e[r][t]}));const t=s.containsMappedData(n,i,a),o=h.indexOf(e[r]);let l=!1;t&&-1===o?(h.push(e[r]),l=!0):t||-1===o||(h.splice(o,1),l=!0),e[r].needToUpdate=l||p,e[r].isActive=t}for(let i=0;i<t;i++)if(n=e[i].data,n){if(e[i].needToUpdate){const t=u({},e[i],e[i].__style),n=e[i].isActive;f.forEach(r=>{e[i][r]=n&&r in c?"function"==typeof c[r]?c[r].call(null,t,h):c[r]:!n&&r in d?"function"==typeof d[r]?d[r].call(null,t,h):d[r]:e[i].__style[r]}),r=!0}delete e[i].needToUpdate}return p=!1,r},y=function(){const t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{suppressRender:!1}).suppressRender,n=m(),r=n.length;for(let e=0;e<r;e++)n[e].data&&(n[e].__style=n[e].__style||{},f.forEach(t=>{n[e].__style[t]=n[e][t],t in d&&(n[e][t]="function"==typeof d[t]?d[t].call(null,n[e]):d[t])}));p=!0,h.length=0,t||e.renderer.render(e.nodes)},v=function(){const t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{suppressRender:!1}).suppressRender,n=m(),r=n.length;for(let e=0;e<r;e++)n[e].__style&&(Object.keys(n[e].__style).forEach(t=>{n[e][t]=n[e].__style[t]}),n[e].__style=void 0);h.length=0,t||e.renderer.render(e.nodes)},b=()=>{if(g()){const t="function"==typeof e.config.sortNodes?e.config.sortNodes(e):e.nodes;"function"==typeof e.config.customRender?e.config.customRender({render:e.renderer.render,nodes:t}):e.renderer.render(t)}};return s.on("start",y),s.on("end",v),s.on("update",b),{isActive:()=>s.isActive(),update:()=>{h.length=0,p=!0,g()},cleanUp:function(){s.removeListener("start",y),s.removeListener("end",v),s.removeListener("update",b)}}}function $o(e){let t=e.nodes,n=e.action,r=e.chart,i=e.trigger;const o=[];for(let e=0;e<t.length;e++){let n=t[e].data;null!==n&&o.push(n)}!function(e){let t=e.dataPoints,n=e.action,r=e.chart,i=e.trigger;if(!i)return;const o=i.data||[""];let a={items:[],actionFn:"toggleRanges"},s={items:[],actionFn:"toggleValues"};-1!==["add","remove","set","toggle"].indexOf(n)&&(a.actionFn="".concat(n,"Ranges"),s.actionFn="".concat(n,"Values"));for(let e=0;e<t.length;e++){const n=t[e];n&&o.forEach(e=>{let t=n&&!e?n:n[e];if(t){let e={key:t.source.field};void 0!==t.source.key&&(e.key="".concat(t.source.key,"/").concat(t.source.field)),Array.isArray(t.value)?(e.range={min:t.value[0],max:t.value[1]},a.items.push(e)):(e.value=t.value,s.items.push(e))}})}i.contexts.forEach(e=>{a.items.length?r.brush(e)[a.actionFn](a.items):r.brush(e)[s.actionFn](s.items)})}({dataPoints:o,action:n,chart:r,trigger:i})}function Wo(e){let t=e.collisions,n=e.t,r=e.config,i=e.action,o=[],a=!1;t.length>0&&(o=t,a=!0,"stop"===n.propagation&&(o=[t[t.length-1]]));const s=o.map(e=>e.node);return $o({nodes:s,action:i,chart:r.chart,data:r.data,trigger:n}),a}function Uo(e,t,n){const r=n.element().getBoundingClientRect();let i=y(e)?function(e,t){return 1!==e.changedTouches.length?null:{x:e.changedTouches[0].clientX-t.left,y:e.changedTouches[0].clientY-t.top}}(e,r):function(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}(e,r);return null===i||i.x<0||i.y<0||i.x>r.width||i.y>r.height?[]:(t.touchRadius>0&&y(e)?i={cx:i.x,cy:i.y,r:t.touchRadius}:t.mouseRadius>0&&!y(e)&&(i={cx:i.x,cy:i.y,r:t.mouseRadius}),n.itemsAt(i))}function Yo(e,t,n){return e?"function"==typeof e?e(t):e:n}const Ko={fill:"fill",stroke:"stroke",opacity:"opacity",strokeWidth:"stroke-width",strokeLinejoin:"stroke-linejoin",fontFamily:"font-family",fontSize:"font-size",fontStyle:"font-style",textDecoration:"text-decoration",fontWeight:"font-weight",baseline:"dominant-baseline",dominantBaseline:"dominant-baseline",anchor:"text-anchor",textAnchor:"text-anchor",maxWidth:"maxWidth",transform:"transform",strokeDasharray:"stroke-dasharray",id:"id"};function Go(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n="";for(let t=0;t<e.length;t++){const r=e[t];n+=0===t?"M".concat(r.x," ").concat(r.y):"L".concat(r.x," ").concat(r.y),n+=" "}return t&&(n+="Z"),n}function Xo(e,t,n,r){const i=n/2,o=e-r/2,a=t-r/2,s=e-i,l=t-i;return[{x:o,y:a},{x:o,y:l},{x:o+r,y:l},{x:o+r,y:a},{x:s+n,y:a},{x:s+n,y:a+r},{x:o+r,y:a+r},{x:o+r,y:l+n},{x:o,y:l+n},{x:o,y:a+r},{x:s,y:a+r},{x:s,y:a}]}function Jo(e){return-e/180*Math.PI}function Zo(e){return function(e){let t=(.5*(Math.floor(e/Math.PI*2)+2)+.25)*Math.PI,n=Math.cos(Math.abs(t-e))*Math.sqrt(2),r=n*Math.cos(e),i=n*Math.sin(e);return{x1:r<0?1:0,y1:i<0?1:0,x2:r>=0?r:r+1,y2:i>=0?i:i+1}}(Jo(e))}function Qo(e,t){return{x:e.x+t.x,y:e.y+t.y}}function ea(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ta(e,t){return{x:e.x*t,y:e.y*t}}function na(e,t){return e.x-t.x}function ra(e,t){return e.y-t.y}function ia(e,t){return na(e,t)**2+ra(e,t)**2}function oa(e,t){return Math.sqrt(ia(e,t))}function aa(e,t){return e.x*t.x+e.y*t.y}function sa(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{x:0,y:0};const r=Math.cos(t),i=Math.sin(t),o=ea(e,n);return Qo({x:r*o.x-i*o.y,y:i*o.x+r*o.y},n)}const la={up:0,down:180,left:90,right:-90};function ca(e){let t=e.x,n=e.y,r=e.size;const i=r/2;return{type:"rect",x:t-i,y:n-i,width:r,height:r}}const ua=Ne();ua.add("circle",function(e){return{type:"circle",fill:"black",cx:e.x,cy:e.y,r:e.size/2}}),ua.add("diamond",function(e){const t=e.size,n=e.x-t/2,r=e.y-t/2;return{type:"path",fill:"black",d:Go([{x:n,y:r+t/2},{x:n+t/2,y:r},{x:n+t,y:r+t/2},{x:n+t/2,y:r+t},{x:n,y:r+t/2}])}}),ua.add("saltire",function(e){const t=Jo(45),n=e.size/2,r=isNaN(e.width)?n/2:e.width,i=Math.min(r,n);let o=e.size;const a=Math.sin(Math.asin(-t))*(i/2);o+=2*(n/Math.sin(-t)-n),o-=2*a;const s={x:e.x,y:e.y},l=Xo(e.x,e.y,o,i).map(e=>sa(e,t,s));return{type:"path",fill:"black",d:Go(l)}}),ua.add("square",function(e){const t=e.size;return{type:"rect",fill:"black",x:e.x-t/2,y:e.y-t/2,width:t,height:t}}),ua.add("triangle",function(e){const t=e.size,n={x:e.x,y:e.y},r=la[e.direction]||0,i=t/2,o=e.x-i,a=e.y-i;let s=[{x:o,y:a+t},{x:o+i,y:a},{x:o+t,y:a+t},{x:o,y:a+t}];const l=Jo(r);return s=s.map(e=>sa(e,l,n)),{type:"path",fill:"black",d:Go(s)}}),ua.add("line",function(e){const t="vertical"===e.direction,n=e.size/2,r=e.x,i=e.y;return{type:"line",stroke:"black",strokeWidth:1,x1:r-(t?0:n),y1:i-(t?n:0),x2:r+(t?0:n),y2:i+(t?n:0),collider:ca(e)}}),ua.add("star",function(e){const t=e.size,n=[],r=t/2,i=e.points||5,o=Math.min(e.innerRadius||t/2,t)/2,a=isNaN(e.startAngle)?90:e.startAngle,s=360/i;for(let t=1;t<=i;t++){const i=s*t+a,l=Jo(i),c=Jo(i+s/2),u=Math.sin(l),d=Math.cos(l),f=Math.sin(c),h=Math.cos(c);n.push({x:e.x+d*r,y:e.y+u*r}),n.push({x:e.x+h*o,y:e.y+f*o})}return{type:"path",fill:"black",d:Go(n)}}),ua.add("n-polygon",function(e){const t=[],n=e.size/2,r=Math.max(isNaN(e.sides)?6:e.sides,3),i=360/r,o=isNaN(e.startAngle)?0:e.startAngle;for(let a=1;a<=r;a++){const r=Jo(i*a+o),s=Math.sin(r),l=Math.cos(r);t.push({x:e.x+l*n,y:e.y+s*n})}return{type:"path",fill:"black",d:Go(t)}}),ua.add("cross",function(e){const t=e.x,n=e.y,r=e.size/2,i=isNaN(e.width)?r/2:e.width,o=Math.min(i,r);return{type:"path",fill:"black",d:Go(Xo(t,n,e.size,o))}}),ua.add("bar",function(e){const t={x:e.x,y:e.y},n="vertical"===e.direction,r=e.size/2,i=r/2/2;let o=[{x:t.x-r,y:t.y+i},{x:t.x-r,y:t.y-i},{x:t.x+r,y:t.y-i},{x:t.x+r,y:t.y+i}];if(n){const e=Jo(90);o=o.map(n=>sa(n,e,t))}const a=M(o);return a.type="rect",a.fill="black",a}),ua.add("rect",function(e){const t=e.x,n=e.y,r=e.size,i=void 0===e.width?r:e.width,o=void 0===e.height?r:e.height;return{type:"rect",fill:"black",x:t-i/2,y:n-o/2,width:i,height:o}}),ua.add("image",function(e){const t=e.x,n=e.y,r=e.imageSettings||{},i=r.width,o=r.height,a=r.imageSrc,s=r.position;return{type:"image",x:t,y:n,width:i,height:o,src:a,symbol:r.symbol,r:10,cx:0,cy:0,imageScalingFactor:r.imageScalingFactor,imagePosition:s}});const da=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ua;return function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=e.get(t.type);if(n){const e=n(t);return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object.keys(t).forEach(n=>{void 0!==Ko[n]&&"transform"!==n&&(e[n]=t[n])})}(e,t),void 0!==t.data&&(e.data=t.data),e}return n}};function fa(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.dock,r=void 0===n?"center":n,i=e.displayOrder,o=void 0===i?0:i,a=e.prioOrder,s=void 0===a?0:a,l=e.preferredSize,c=void 0===l?0:l,u=e.minimumLayoutMode,d=e.show,f=void 0===d||d;r=r||"center";return{computePreferredSize(e){let n=e.inner,r=e.outer,i=e.children;return"function"==typeof c?c({inner:n,outer:r,children:i,dock:this.dock()},t):c},dock(e){return void 0!==e?(r=e,this):"function"==typeof r?r(t):r},displayOrder(e){return void 0!==e?(o=e,this):"function"==typeof o?o(t):o},prioOrder(e){return void 0!==e?(s=e,this):"function"==typeof s?s(t):s},minimumLayoutMode(e){return void 0!==e?(u=e,this):"function"==typeof u?u(t):u},show(e){return void 0!==e?(f=e,this):"function"==typeof f?f(t):f}}}function ha(e,t,n){const r=t.require,i=void 0===r?[]:r,o=t.mediator||{},a=n.settings,s=n.formatter,l=n.scale,c=n.data,u=n.renderer,d=n.chart,f=n.dockConfig,h=n.mediator,p=n.instance,m=n.rect,g=n.style,y=n.registries,v=n.resolver,b=n.update,x=n._DO_NOT_USE_getInfo,S=n.symbol,w=n.isVisible;e.emit=()=>{},w&&(e.isVisible=w),Object.defineProperty(e,"settings",{get:a}),Object.defineProperty(e,"data",{get:c}),Object.defineProperty(e,"formatter",{get:s}),Object.defineProperty(e,"scale",{get:l}),Object.defineProperty(e,"mediator",{get:h}),Object.defineProperty(e,"style",{get:g}),Object.defineProperty(e,"registries",{get:y}),m&&Object.defineProperty(e,"rect",{get:m}),x&&(e._DO_NOT_USE_getInfo=x),Object.keys(t).forEach(n=>{var r;r=n,["on","preferredSize","created","beforeMount","mounted","resize","beforeUpdate","updated","beforeRender","render","beforeUnmount","beforeDestroy","destroyed","defaultSettings","data","settings","formatter","scale","chart","dockConfig","mediator","style","resolver","registries","_DO_NOT_USE_getInfo","symbol","isVisible"].some(e=>e===r)||("function"==typeof t[n]?e[n]=t[n].bind(e):e[n]=t[n])}),i.forEach(t=>{"renderer"===t?Object.defineProperty(e,"renderer",{get:u}):"chart"===t?Object.defineProperty(e,"chart",{get:d}):"dockConfig"===t?Object.defineProperty(e,"dockConfig",{get:f}):"instance"===t?Object.defineProperty(e,"instance",{get:p}):"update"===t&&b?Object.defineProperty(e,"update",{get:b}):"resolver"===t?Object.defineProperty(e,"resolver",{get:v}):"symbol"===t&&Object.defineProperty(e,"symbol",{get:S})}),Object.keys(o).forEach(t=>{e.mediator.on(t,o[t].bind(e))})}function pa(e,t,n){const r=t=>e[t]?(n.warn("Deprecation Warning the ".concat(t," property should be moved into layout: {} property")),e[t]):e.layout?e.layout[t]:void 0,i={};return i.displayOrder=r("displayOrder"),i.dock=r("dock"),i.prioOrder=r("prioOrder"),i.minimumLayoutMode=r("minimumLayoutMode"),e.layout=e.layout||{},e.layout.displayOrder=void 0!==i.displayOrder?i.displayOrder:e.layout.displayOrder,e.layout.prioOrder=void 0!==i.prioOrder?i.prioOrder:e.layout.prioOrder,e.layout.dock=i.dock||e.layout.dock,e.layout.minimumLayoutMode=i.minimumLayoutMode||e.layout.minimumLayoutMode,i.show=e.show,i.preferredSize=t,i}function ma(e,t,n){Object.keys(n.on||{}).forEach(r=>{e.eventListeners=e.eventListeners||[];const i=n.on[r].bind(e);e.eventListeners.push({event:r,listener:i}),t.on(r,i)}),e.emit=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t.emit(e,...r)}}function ga(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e.defaultSettings,r=void 0===n?{}:n,i=e._DO_NOT_USE_getInfo,o=void 0===i?()=>({}):i,a=t.chart,s=t.container,l=t.mediator,c=t.registries,d=t.theme,f=t.renderer,h=lo.mixin({});let p,g,y,v,b,x=t.settings||{},S=u(!0,{},r,x),w=[],M=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Bo,n={};return{resolve:function(r){let i=r.data,o=r.settings,a=r.defaults,s=void 0===a?{}:a,l=r.scaled;const c=n.norm=t.normalizeSettings(o,s,e.chart),u={scale:e.chart.scale,formatter:e.chart.formatter};l&&Object.keys(l).forEach(e=>{c[e]&&t.updateScaleSize(c,e,l[e])});const d=[];if(!i||!Array.isArray(i.items)){const e={data:i,resources:u};let r=t.resolveForItem(e,n.norm,-1);return{settings:n.norm,item:r}}{let e;for(let r=0,o=i.items.length;r<o;r++){e={datum:i.items[r],data:i,resources:u};let o=t.resolveForItem(e,n.norm,r);o.data=i.items[r],d.push(o)}}return{settings:n.norm,items:d}}}}({chart:a}),k=!1;const C={nodes:[],chart:a,config:S.brush||{},renderer:null},q={tap:[],over:[]},E=[],D={},T=u({},x);function O(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){const i=void 0!==e[t],o=void 0!==x[t];let a;for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];return i&&("function"==typeof e[t]?a=e[t].call(D,...l):r&&(a=e[t])),o&&("function"==typeof x[t]?a=x[t].call(T,...l):r&&(a=x[t])),i||o||(a=n.call(D,...l)),a}}const N=O("preferredSize",()=>0,!0),A=O("resize",e=>e.inner),_=O("created"),I=O("beforeMount"),L=O("mounted"),P=O("beforeUnmount"),R=O("beforeUpdate"),z=O("updated"),F=O("beforeRender"),j=O("beforeDestroy"),B=O("destroyed"),V=e.render,H=()=>{S.brush&&(S.brush.consume||[]).forEach(e=>{e.context&&e.style&&E.push(Ho(C,e))})},$=()=>{S.brush&&(S.brush.trigger||[]).forEach(e=>{"over"===e.on?q.over.push(e):q.tap.push(e)})};Object.defineProperty(C,"data",{get:()=>w});const W=S.renderer||e.renderer,U=W?f||c.renderer(W)():f||c.renderer()();"function"==typeof U.settings&&U.settings(S.rendererSettings),C.renderer=U;const Y={resources:a.logger?{logger:a.logger()}:{}};let K=fa(pa(S,N,a.logger()),Y);const G=e=>{e.key=S.key,e.element=U.element()},X=()=>{};X.dockConfig=()=>K,X.set=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e.settings&&(x=e.settings,S=u(!0,{},r,e.settings),K=fa(pa(S,N,a.logger()),Y),C.config=S.brush||{}),S.scale&&(p=a.scale(S.scale)),S.data){const e=S.rendererSettings,t="function"==typeof(null==e?void 0:e.progressive)&&e.progressive(),n=vr(S.data,{dataset:a.dataset,collection:a.dataCollection},{logger:a.logger()},a.dataCollection);t?t.isFirst?(w=n,w.items&&(w.items=[...n.items])):w.items&&(w.items=[...w.items,...n.items||[]]):w=n}else w=p?p.data():[];"string"==typeof S.formatter||"object"==typeof S.formatter?g=a.formatter(S.formatter):p&&p.data().fields&&(g=p.data().fields[0].formatter()),b=d.style(S.style||{})},X.resize=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=A({inner:e,outer:t});v=n?U.size(n):U.size(e),T.rect=u(!0,{computedPhysical:v.computedPhysical,computedOuter:t.computed||t,computedInner:e.computed||e},e),v=u(!0,{computedOuter:t.computed||t,computedInner:e.computed||e},v)},X.getRect=()=>T.rect;const J=()=>{const e=U.renderArgs?U.renderArgs.slice(0):[],t=S.rendererSettings;let n=w;const r="function"==typeof(null==t?void 0:t.progressive)&&t.progressive();return w.items&&r&&(n=m(m({},w),{},{items:w.items.slice(r.start,r.end)})),e.push({data:n}),e};let Z,Q,ee;function te(e){const t=S.rendererSettings,n="function"==typeof(null==t?void 0:t.progressive)&&t.progressive();n?n.isFirst?C.nodes=[...e||[]]:C.nodes&&(C.nodes=[...C.nodes,...e||[]]):C.nodes=e}X.beforeMount=I,X.beforeRender=()=>{F({size:v})},X.render=()=>{const e=V.call(D,...J());te(e),U.render(e),Z=e,Q=T.rect.computed},X.hide=()=>{X.unmount(),U.size({x:0,y:0,width:0,height:0}),U.clear()},X.beforeUpdate=()=>{R({settings:S,data:w})},X.update=()=>{ee&&ee.stop();const e=S,t=e.rendererSettings,n=e.brush,r=e.animations;if("function"==typeof(null==t?void 0:t.transform)&&t.transform())return U.render(),void(Z=null);const i=V.call(D,...J());te(i),E.forEach(e=>e.cleanUp()),E.length=0,q.tap=[],q.over=[],n&&(H(),$()),E.forEach(e=>{e.isActive()&&e.update()}),Z&&r&&("function"==typeof r.enabled?r.enabled():r.enabled)?(r.compensateForLayoutChanges&&r.compensateForLayoutChanges({currentNodes:Z,currentRect:T.rect.computed,previousRect:Q}),ee=function(e,t,n,r){let i,o=e.old,a=e.current,s=t.renderer,l=[],c={nodes:[],ips:[]},d={nodes:[],ips:[]},f={nodes:[],ips:[]},h=[],p=null;const m=n.trackBy||Lo,g={start(){let e={};if(o.forEach((t,n)=>{let r=m(t,n);e[r]=t}),a.forEach((t,n)=>{let r=m(t,n);if(e[r]){if("path"===t.type&&t.points&&t.points.length>0&&"trend"!==t.data.source.key){const n=function(e,t){const n=e.points.filter(e=>!e.dummy),r=t.points.filter(e=>!e.dummy),i=r.map(e=>e.data.major.value),o=n.filter(e=>i.includes(e.data.major.value)).map(e=>e.data.major.value),a=n.filter(e=>o.includes(e.data.major.value)),s=r.filter(e=>o.includes(e.data.major.value));return{old:a,current:s}}(e[r],t);f.ips.push(Io(u({},e[r],{points:n.old}),u({},t,{points:n.current}))),l.push(u({},e[r],{commonPoints:n.old}))}else f.ips.push(Io(e[r],t)),l.push(e[r]);f.nodes.push(t),e[r]=!1}else c.nodes.push(t),c.ips.push(Io(u({},t,{r:.001,opacity:0}),t))}),Object.keys(e).forEach(t=>{e[t]&&(d.nodes.push(e[t]),d.ips.push(Io(e[t],u({},e[t],{r:1e-4,opacity:0}))))}),h.push({name:"exiting",easing:Do,duration:200,tweens:d.ips,nodes:[...l]}),h.push({name:"updating",easing:Oo,duration:400,tweens:f.ips,nodes:[]}),h.push({name:"entering",easing:To,duration:200,tweens:c.ips,nodes:[...f.nodes]}),n.isMainComponent){var t;const e=null===(t=n.isMainComponent)||void 0===t?void 0:t.filterFn,i=e?l.filter(e).length:l.length,o=r.getValue("animations.updatingStageMeta"),a=o.isInit,s=o.shouldBeRemoved;!1===a?(r.setValue("animations.updatingStageMeta.shouldBeRemoved",0===i),r.setValue("animations.updatingStageMeta.isInit",!0)):r.setValue("animations.updatingStageMeta.shouldBeRemoved",s&&0===i)}h.length&&(p=s.getScene(a),h[0].started=Date.now(),"undefined"!=typeof window&&(i=window.requestAnimationFrame(g.tick)))},tick(){let e=h[0];e||g.stop(),e.started||(e.started=Date.now());let t=(Date.now()-e.started)/e.duration,o=[],a=e.tweens.map(n=>n(e.easing(Math.min(1,t))));const l=n.adjustTweenedNodes;if(l&&l(a),o.push(...a),o.push(...e.nodes),s.render(o),t>=1){h.shift();const e=r.getValue("animations.updatingStageMeta"),t=e.isInit,n=e.shouldBeRemoved;h.length?"updating"===h[0].name&&n&&h.shift():(!0===t&&r.setValue("animations.updatingStageMeta.isInit",!1),g.stop())}i&&(i=window.requestAnimationFrame(g.tick))},stop(){i&&(window.cancelAnimationFrame(i),i=!1)},inProgress:()=>!!i,get targetScene(){return p}};return g}({old:Z,current:i},{renderer:U},r,a.storage),ee.start()):U.render(i),Z=i,Q=T.rect.computed,U.setKey&&"string"==typeof x.key&&U.setKey(x.key)},X.updated=z,X.destroy=()=>{X.unmount(),j(y),U.destroy(),B(),y=null};const ne=e=>{C.nodes=e,E.forEach(e=>{e.isActive()&&e.update()}),U.render(e)};return ha(D,e,{settings:()=>S,data:()=>w,scale:()=>p,formatter:()=>g,renderer:()=>U,chart:()=>a,dockConfig:()=>K,mediator:()=>l,instance:()=>T,rect:()=>T.rect,style:()=>b,update:()=>ne,registries:()=>c,resolver:()=>M,symbol:()=>da(c.symbol)}),ha(T,x,{settings:()=>S,data:()=>w,scale:()=>p,formatter:()=>g,renderer:()=>U,chart:()=>a,dockConfig:()=>K,mediator:()=>l,style:()=>b,_DO_NOT_USE_getInfo:o.bind(D),isVisible:()=>k}),X.getBrushedShapes=function(e,t,n){const r=[];if(S.brush&&S.brush.consume){const i=a.brush(e),o=U.findShapes("*");S.brush.consume.filter(t=>t.context===e).forEach(e=>{for(let a=0;a<o.length;a++){const s=o[a];s.data&&i.containsMappedData(s.data,n||e.data,t)&&(G(s),r.push(s),o.splice(a,1),a--)}})}return r},X.findShapes=e=>{var t;const n=(null!==(t=ee)&&void 0!==t&&t.inProgress()?ee.targetScene:U).findShapes(e);for(let e=0,t=n.length;e<t;e++)G(n[e]);return n},X.shapesAt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=U.itemsAt(e);let r;r=t&&"stop"===t.propagation&&n.length>0?[n.pop().node]:n.map(e=>e.node);for(let e=0,t=r.length;e<t;e++)G(r[e]);return r},X.brushFromShapes=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.contexts=Array.isArray(t.contexts)?t.contexts:[];$o({nodes:e,action:t.action||"toggle",trigger:t,chart:a,data:C.data})},X.mount=()=>{y=U.element&&U.element()?y:U.appendTo(s),U.setKey&&"string"==typeof x.key&&U.setKey(x.key),S.brush&&(H(),$()),ma(T,h,x),ma(D,h,e),k=!0},X.mounted=()=>L(y),X.unmount=()=>{[T,D].forEach(e=>{!function(e,t){e.eventListeners&&(e.eventListeners.forEach(e=>{let n=e.event,r=e.listener;t.removeListener(n,r)}),e.eventListeners.length=0),e.emit=()=>{}}(e,h)}),q.tap=[],q.over=[],E.forEach(e=>{e.cleanUp()}),E.length=0,P(),k=!1},X.onBrushTap=e=>{q.tap.forEach(t=>{(function(e){let t=e.e,n=e.t,r=e.config;return Wo({collisions:Uo(t,n,r.renderer),t:n,config:r,action:Yo(n.action,t,"toggle")})})({e:e,t:t,config:C})&&"stop"===t.globalPropagation&&a.toggleBrushing(!0)})},X.onBrushOver=e=>{q.over.forEach(t=>{(function(e){let t=e.e,n=e.t,r=e.config;return Wo({collisions:Uo(t,n,r.renderer),t:n,config:r,action:Yo(n.action,t,"set")})})({e:e,t:t,config:C})&&"stop"===t.globalPropagation&&a.toggleBrushing(!0)})},X.def=D,X.ctx=T,X.renderer=()=>U,X.set({settings:x}),_(),X}function ya(e){const t=u(!0,{},e),n={getAll:()=>t,getValue:(e,n)=>function(e,t,n){if(void 0===e||void 0===t)return n;const r=t.split(".");let i=e;for(let e=0;e<r.length;++e){const t=r[e];if(void 0===i[t])return n;i=i[t]}return i}(t,e,n),setValue:(e,n)=>function(e,t,n){if(void 0===e||void 0===t)return;const r=t.split("."),i=r[r.length-1];let o=e;for(let e=0;e<r.length-1;++e){const t=r[e];void 0===o[t]&&(o[t]=Number.isNaN(+r[e+1])?{}:[]),o=o[t]}void 0!==n?o[i]=n:delete o[i]}(t,e,n)};return n}function va(e,t,n){const r=Qo(function(e,t){const n=aa(e,t)/aa(t,t)||1;return{x:t.x*n,y:t.y*n}}(ea(n,e),ea(t,e)),e);return r}function ba(e,t,n){return oa(e,n)+oa(t,n)-oa(e,t)<1e-12}function xa(e,t){return e.x>=t.x&&e.x+e.width<=t.x+t.width&&e.y>=t.y&&e.y+e.height<=t.y+t.height}function Sa(e){return e.x1===e.x2&&e.y1===e.y2}function wa(e){return e.width<=0||e.height<=0}function Ma(e){return e.r<=0}function ka(e){return e.edges.length<=2}function Ca(e,t){let n=!1;for(let r=0,i=t.edges.length;r<i;r++)if(n=Aa(e,k(t.edges[r])),!0===n)return!0;return!1}function qa(e,t){let n=!1;const r=t.numPolygons,i=t.polygons;for(let t=0;t<r;t++){if(n=Ba(e,i[t]),!0===n)return!0}return!1}function Ea(e,t){if(Ma(e))return!1;return ia({x:e.cx,y:e.cy},t)<=e.r**2}function Da(e,t){if(wa(t)||Ma(e))return!1;const n=t.width/2,r=t.height/2,i=t.x+n,o=t.y+r,a=e.r,s=e.cx,l=e.cy,c=Math.abs(s-i),u=Math.abs(l-o);if(c>n+a||u>r+a)return!1;if(c<=n||u<=r)return!0;return(c-n)**2+(u-r)**2<=a**2}function Ta(e,t){if(Ma(e)||Sa(t))return!1;const n=g(S(t),2),r=n[0],i=n[1];if(Ea(e,r)||Ea(e,i))return!0;const o={x:e.cx,y:e.cy},a=va(r,i,o);return ia(a,o)<=e.r**2&&ba(r,i,a)}function Oa(e,t){if(ka(t)||Ma(e))return!1;if(Na(t,{x:e.cx,y:e.cy}))return!0;const n=t.edges.length;for(let r=0;r<n;r++){if(Ta(e,k(t.edges[r])))return!0}return!1}function Na(e,t){if(ka(e)||!Pa(e.boundingRect(),t))return!1;const n=t.x,r=t.y,i=e.vertices;let o,a,s,l,c;for(o=!1,l=-1,a=i.length,s=a-1;++l<a;s=l){if(i[l].x===n&&i[l].y===r)return!0;if(i[l].y===i[s].y&&i[l].y===r&&(n-i[l].x)*(n-i[s].x)<=0)return!0;if(i[l].y<r&&r<=i[s].y||i[s].y<r&&r<=i[l].y){if(c=(i[s].x-i[l].x)*(r-i[l].y)/(i[s].y-i[l].y)+i[l].x,n===c)return!0;n<c&&(o=!o)}}return o}function Aa(e,t){if(ka(e))return!1;for(let n=0,r=e.edges.length;n<r;n++){if(za(t,k(e.edges[n])))return!0}const n=g(S(t),2),r=n[0],i=n[1];return Na(e,r)||Na(e,i)}function _a(e,t){if(ka(e))return!1;for(let n=0,r=e.edges.length;n<r;n++){if(Ra(t,k(e.edges[n])))return!0}const n=g(w(t),4),r=n[0],i=n[1],o=n[2],a=n[3];return Na(e,r)||Na(e,i)||Na(e,o)||Na(e,a)}function Ia(e,t){return!wa(e)&&!wa(t)&&(e.x<=t.x+t.width&&t.x<=e.x+e.width&&e.y<=t.y+t.height&&t.y<=e.y+e.height)}function La(e,t){if(wa(e)||wa(t))return!1;return[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}].every(t=>Pa(e,t))}function Pa(e,t){return!wa(e)&&(t.x>=e.x&&t.x<=e.x+e.width&&t.y>=e.y&&t.y<=e.y+e.height)}function Ra(e,t){if(Sa(t)||wa(e))return!1;const n=g(S(t),2),r=n[0],i=n[1];if(Pa(e,r)||Pa(e,i))return!0;const o=w(e);let a=o.length;for(let e=0;e<a;e++){if(za(k([o[e],o[3!==e?e+1:0]]),t))return!0}return!1}function za(e,t){const n=g(S(e),2),r=n[0],i=n[1],o=g(S(t),2),a=o[0],s=o[1],l=na(i,r),c=ra(i,r),u=na(s,a),d=ra(s,a),f=na(r,a),h=ra(r,a);let p=d*l-u*c;const m=u*h-d*f,y=l*h-c*f;let v,b;if(0===l&&0===c)return!1;if(0===u&&0===d)return!1;if(0===p){if(0===m&&0===y){if(0===l){if(0===c)return r.x===i.x&&r.y===i.y;v=ra(a,r)/c,b=ra(s,r)/c}else v=(a.x-r.x)/l,b=(s.x-r.x)/l;return!(v<0&&b<0||v>1&&b>1)}return!1}const x=m/p;return p=y/p,x>=0&&x<=1&&p>=0&&p<=1}function Fa(e,t){if(Sa(e))return!1;const n=g(S(e),2);return ba(n[0],n[1],t)}function ja(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!Ia(n,r)&&(La(n,r)?Ca(e,t):Ca(t,e))}function Ba(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!Ia(n,r)&&(La(r,n)?function(e,t){let n=!1;const r=e.numPolygons,i=e.polygons;for(let e=0;e<r;e++)if(n=ja(t,i[e]),!0===n)return!0;return!1}(e,t):function(e,t){let n=!1;for(let r=0,i=t.edges.length;r<i;r++)if(n=$a(e,k(t.edges[r])),!0===n)return!0;return!1}(e,t))}function Va(e,t){if(Ma(e))return!1;if(Ha(t,{x:e.cx,y:e.cy}))return!0;const n=t.numPolygons,r=t.polygons;for(let t=0;t<n;t++){const n=r[t],i=n.edges.length;for(let t=0;t<i;t++){if(Ta(e,k(n.edges[t])))return!0}}return!1}function Ha(e,t){if(!Pa(e.boundingRect(),t))return!1;const n=t.x,r=t.y,i=e.numPolygons;let o,a,s,l,c,u,d=!1;for(a=0;a<i;a++)for(o=e.vertices[a],c=-1,s=o.length,l=s-1;++c<s;l=c){if(o[c].x===n&&o[c].y===r)return!0;if(o[c].y===o[l].y&&o[c].y===r&&(n-o[c].x)*(n-o[l].x)<=0)return!0;if(o[c].y<r&&r<=o[l].y||o[l].y<r&&r<=o[c].y){if(u=(o[l].x-o[c].x)*(r-o[c].y)/(o[l].y-o[c].y)+o[c].x,n===u)return!0;n<u&&(d=!d)}}return d}function $a(e,t){const n=g(S(t),2),r=n[0],i=n[1];if(Ha(e,r)||Ha(e,i))return!0;const o=e.numPolygons,a=e.polygons;for(let e=0;e<o;e++){const n=a[e];for(let e=0,r=n.edges.length;e<r;e++){if(za(t,k(n.edges[e])))return!0}}return!1}function Wa(e,t){const n=g(w(t),4),r=n[0],i=n[1],o=n[2],a=n[3];if(Ha(e,r)||Ha(e,i)||Ha(e,o)||Ha(e,a))return!0;const s=e.numPolygons,l=e.polygons;for(let e=0;e<s;e++){const n=l[e];for(let e=0,r=n.edges.length;e<r;e++){if(Ra(t,k(n.edges[e])))return!0}}return!1}const Ua=/^\$/,Ya="@extend";function Ka(e){throw new Error('Cyclical reference for "'.concat(e,'"'))}function Ga(e,t,n){if("string"==typeof e){let r=t[e];return-1!==n.indexOf(e)&&Ka(e),Ua.test(r)?(n.push(e),Ga(r,t,n)):r}let r=e;const i=u(!0,{},t,e),o={};if(e[Ya]){const o=e[Ya];-1!==n.indexOf(o)&&Ka(o);let a=n.slice();a.push(o),r=u(!0,{},Ga(i[o],t,a),e)}return Object.keys(r).forEach(e=>{let t=n.slice();if(e===Ya||Ua.test(e))return;o[e]=r[e];let a=o[e];Ua.test(a)&&a in i?(-1!==n.indexOf(a)&&Ka(a),t.push(a),a=i[a],"object"==typeof a||Ua.test(a)&&a in i?o[e]=Ga(a,i,t):o[e]=a):"object"==typeof a&&(o[e]=Ga(a,i,t))}),o}function Xa(e,t){return Ga(e,t,[])}function Ja(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={},n=e;const r=e=>{e.forEach(e=>{const n=Array.isArray(e.colors[0])?e.colors:[e.colors];t[e.key]={colors:n,sizes:n.map(e=>e?e.length:0)}})},i={palette:(e,n)=>((e,n)=>{const r=t[e];if(!r)return[];const i=r.sizes;for(let e=0;e<i.length;e++)if(n<=i[e])return r.colors[e];return r.colors[i.length-1]})(e,n),setPalettes:r,style:e=>Xa(e,n),setStyle:t=>{n=u({},e,t)}};return r(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]),i}function Za(e){e.x=Math.floor(e.x),e.y=Math.floor(e.y),e.width=Math.floor(e.width),e.height=Math.floor(e.height)}function Qa(e){const t={center:{minWidthRatio:.5,minHeightRatio:.5,minWidth:0,minHeight:0}};return u(!0,t,e),t.center.minWidthRatio=Math.min(Math.max(t.center.minWidthRatio,0),1),t.center.minHeightRatio=Math.min(Math.max(t.center.minHeightRatio,0),1),t.center.minWidth=Math.max(t.center.minWidth,0),t.center.minHeight=Math.max(t.center.minHeight,0),t}function es(e,t,n,r,i){return{x:isNaN(e)?0:e,y:isNaN(e)?0:t,width:isNaN(e)?0:n,height:isNaN(e)?0:r,margin:isNaN(i)?0:i}}function ts(e,t,n){if(void 0===e.cachedSize){const r=e.config.dock();let i,o=e.comp.preferredSize({inner:t,outer:n,dock:r});isNaN(o)?o&&!isNaN(o.size)&&(o.width=o.size,o.height=o.size):o={width:o,height:o},i="top"===r||"bottom"===r?o.height:"right"===r||"left"===r?o.width:Math.max(o.width,o.height),e.cachedSize=Math.ceil(i),e.edgeBleed=o.edgeBleed||0}return e.cachedSize}function ns(e,t){switch(t.config.dock()){case"top":e.y+=t.cachedSize,e.height-=t.cachedSize;break;case"bottom":e.height-=t.cachedSize;break;case"left":e.x+=t.cachedSize,e.width-=t.cachedSize;break;case"right":e.width-=t.cachedSize}}function rs(e,t){const n=t.edgeBleed;n&&(e.left=Math.max(e.left,n.left||0),e.right=Math.max(e.right,n.right||0),e.top=Math.max(e.top,n.top||0),e.bottom=Math.max(e.bottom,n.bottom||0))}function is(e,t,n){t.x<n.left&&(t.width-=n.left-t.x,t.x=n.left);const r=e.width-(t.x+t.width);r<n.right&&(t.width-=n.right-r),t.y<n.top&&(t.height-=n.top-t.y,t.y=n.top);const i=e.height-(t.y+t.height);i<n.bottom&&(t.height-=n.bottom-i)}function os(e,t,n,r,i){const o=u({},t),a=u({},n);ns(o,r),rs(a,r),is(e,o,a);const s=function(e,t,n){const r=Math.min(n.center.minWidth,e.width)||Math.max(e.width*n.center.minWidthRatio,1),i=Math.min(n.center.minHeight,e.height)||Math.max(e.height*n.center.minHeightRatio,1);return t.width>=r&&t.height>=i}(e,o,i);return!!s&&(ns(t,r),rs(n,r),!0)}function as(e){return{x:e.margin.left+e.x*e.scaleRatio.x,y:e.margin.top+e.y*e.scaleRatio.y,width:e.width*e.scaleRatio.x,height:e.height*e.scaleRatio.y}}function ss(e){return M([].concat(...e.map(w)))}function ls(e){let t=e.visible,n=e.layoutRect,r=e.reducedRect,i=e.containerRect,o=e.translation;const a=es(r.x,r.y,r.width,r.height),s=es(r.x,r.y,r.width,r.height),l={},c=t.slice(),u=c.slice().sort((e,t)=>e.config.displayOrder()-t.config.displayOrder());return t.sort((e,t)=>{if(e.referencedDocks.length>0&&t.referencedDocks.length>0)return 0;if(t.referencedDocks.length>0)return-1;if(e.referencedDocks.length>0)return 1;const n=e.config.displayOrder()-t.config.displayOrder();return 0===n?c.indexOf(e)-c.indexOf(t):n}).forEach(e=>{let t={},c={};switch(e.config.dock()){case"top":t.height=c.height=e.cachedSize,t.width=n.width,c.width=a.width,t.x=n.x,c.x=a.x,t.y=c.y=a.y-e.cachedSize,a.y-=e.cachedSize,a.height+=e.cachedSize;break;case"bottom":t.x=n.x,c.x=a.x,t.y=c.y=a.y+a.height,t.width=n.width,c.width=a.width,t.height=c.height=e.cachedSize,a.height+=e.cachedSize;break;case"left":t.x=c.x=s.x-e.cachedSize,t.y=n.y,c.y=s.y,t.width=c.width=e.cachedSize,t.height=n.height,c.height=s.height,s.x-=e.cachedSize,s.width+=e.cachedSize;break;case"right":t.x=c.x=s.x+s.width,t.y=n.y,c.y=s.y,t.width=c.width=e.cachedSize,t.height=n.height,c.height=s.height,s.width+=e.cachedSize;break;case"center":t.x=c.x=r.x,t.y=c.y=r.y,t.width=c.width=r.width,t.height=c.height=r.height;break;default:if(e.referencedDocks.length>0){const n=e.referencedDocks.map(e=>l[e]).filter(e=>!!e);n.length>0&&(t=ss(n.map(e=>e.outerRect)),c=ss(n.map(e=>e.r)))}}e.key&&(l[e.key]={r:c,outerRect:t}),function(e,t,n,r){const i={x:r.width/n.width,y:r.height/n.height},o={left:0,top:0};if(n.preserveAspectRatio){const e=i.x<i.y,t=Math.min(i.x,i.y);i.x=t,i.y=t;const a=e?"height":"width",s=(r[a]-n[a]*i.x)*n.align;o.left=e?0:s,o.top=e?s:0}e.scaleRatio=i,e.margin=o,t.scaleRatio=i,t.margin=o,n.scaleRatio=i,n.margin=o}(c,t,n,i),c.edgeBleed=e.edgeBleed,c.computed=as(c),t.edgeBleed=e.edgeBleed,t.computed=as(t),c.x+=o.x,c.y+=o.y,t.x+=o.x,t.y+=o.y,e.comp.resize(c,t),e.cachedSize=void 0,e.edgeBleed=void 0}),u}function cs(e,t,n){const r=e.layoutModes||{},i=t.minimumLayoutMode();let o=t.show();return o&&"object"==typeof i?o=r[i.width]&&r[i.height]&&n.width>=r[i.width].width&&n.height>=r[i.height].height:o&&void 0!==i&&(o=r[i]&&n.width>=r[i].width&&n.height>=r[i].height),o}function us(e){if(!e.resize||"function"!=typeof e.resize)throw new Error("Component is missing resize function");if(!e.dockConfig&&!e.preferredSize)throw new Error("Component is missing preferredSize function")}function ds(e){let t=Qa(e);const n={};return n.layout=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!e||isNaN(e.x)||isNaN(e.y)||isNaN(e.width)||isNaN(e.height))throw new Error("Invalid rect");if(!n.length)return{visible:[],hidden:[],ordered:[]};const r=function(e,t){const n={x:0,y:0,width:0,height:0},r={x:0,y:0,width:0,height:0};return n.width=e.width||0,n.height=e.height||0,void 0!==t.size&&(n.width=isNaN(t.size.width)?n.width:t.size.width,n.height=isNaN(t.size.height)?n.height:t.size.height),void 0!==t.logicalSize?(r.width=isNaN(t.logicalSize.width)?n.width:t.logicalSize.width,r.height=isNaN(t.logicalSize.height)?n.height:t.logicalSize.height,r.align=isNaN(t.logicalSize.align)?.5:Math.min(Math.max(t.logicalSize.align,0),1),r.preserveAspectRatio=t.logicalSize.preserveAspectRatio):(r.width=n.width,r.height=n.height,r.preserveAspectRatio=!1),Za(r),Za(n),{logicalContainerRect:r,containerRect:n}}(e,t),i=r.logicalContainerRect,o=r.containerRect,a=function(e,t,n){const r=[],i=[];for(let o=0;o<e.length;++o){const a=e[o];us(a);let s=a.dockConfig;const l=a.key,c=s.dock(),u=/@/.test(c)?c.split(",").map(e=>e.replace(/^\s*@/,"")):[];cs(t,s,n)?r.push({comp:a,key:l,config:s,referencedDocks:u}):i.push({comp:a,key:l,config:s,referencedDocks:u})}return[r,i]}(n,t,i),s=g(a,2),l=s[0],c=s[1],u=function(e){let t=e.layoutRect,n=e.visible,r=e.hidden,i=e.settings;const o=es(t.x,t.y,t.width,t.height),a={left:0,right:0,top:0,bottom:0},s=n.slice();s.sort((e,t)=>e.config.prioOrder()-t.config.prioOrder());for(let e=0;e<s.length;++e){const n=s[e];ts(n,o,t),os(t,o,a,n,i)||(r.push(s.splice(e,1)[0]),--e)}!function(e,t){if(0!==t.length)for(let n=0;n<e.length;++n){let r=e[n];if(r.referencedDocks.length){const i=r.referencedDocks.every(e=>t.some(t=>t.key===e));i&&t.push(e.splice(n,1)[0])}}}(n,r);const l=n.filter(e=>-1!==s.indexOf(e));return n.length=0,n.push(...l),is(t,o,a),o}({layoutRect:i,visible:l,hidden:c,settings:t}),d=ls({visible:l,layoutRect:i,reducedRect:u,containerRect:o,translation:{x:e.x,y:e.y}});return c.forEach(e=>{e.comp.visible=!1;const t=es();e.comp.resize(t,t)}),{visible:l.map(e=>e.comp),hidden:c.map(e=>e.comp),ordered:d.map(e=>e.comp)}},n.settings=function(e){t=Qa(e)},n}const fs=(e,t)=>{for(let n=0;n<e.length;n++){const r=e[n];if(r.hasKey&&r.key===t)return e[n]}return null},hs=e=>null==e?void 0:e.map(e=>{const t=e.instance.dockConfig();return{preferredSize:n=>t.computePreferredSize(m(m({},n),{},{children:hs(e.children)}))}}),ps=(e,t)=>({visible:[],hidden:t,ordered:[]}),ms=e=>(t,n)=>{var r;const i=n.map((e,t)=>{const n=e.instance.dockConfig();return{index:t,key:e.key,dockConfig:n,resize:e.instance.resize,preferredSize:t=>n.computePreferredSize(m(m({},t),{},{children:hs(e.children)}))}}),o=e=>n[e.index],a=null!==(r=e(t,i))&&void 0!==r?r:{},s=a.visible,l=void 0===s?i:s,c=a.hidden,u=void 0===c?[]:c,d=a.ordered,f=void 0===d?l:d;return{visible:l.map(o),hidden:u.map(o),ordered:f.map(o)}},gs=e=>"function"==typeof e?ms(e):(e=>{const t=ds(e);return ms((e,n)=>t.layout(e,n))})(e);function ys(e,t,n){const r=t.left-n.left,i=t.top-n.top,o=C(e),a=u(!0,{},e);switch(o){case"circle":a.cx+=r,a.cy+=i;break;case"polygon":for(let e=0,t=a.vertices.length;e<t;e++){const t=a.vertices[e];t.x+=r,t.y+=i}break;case"geopolygon":for(let e=0;e<a.vertices.length;e++){const t=a.vertices[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n.x+=r,n.y+=i}}break;case"line":a.x1+=r,a.y1+=i,a.x2+=r,a.y2+=i;break;case"point":case"rect":a.x+=r,a.y+=i}return a}function vs(e,t){const n=[];let r=0;t.forEach(e=>{n.push(r),r++;const t=e.instance.def.additionalElements&&e.instance.def.additionalElements();t&&(r+=t.length)}),t.forEach((t,r)=>((e,t,n)=>{const r=t.instance.renderer().element();if(isNaN(n)||!r||!e||!e.children)return;const i=e.children[Math.max(0,n)];if(r===i)return;const o=t.instance.def.additionalElements&&t.instance.def.additionalElements().filter(Boolean);e.insertBefore&&void 0!==i?(e.insertBefore(r,i),o&&o.forEach(t=>{e.insertBefore(t,r)})):(o&&o.forEach(t=>{e.appendChild(t,r)}),e.appendChild(r))})(e,t,n[r]))}function bs(e,t){let n=e.element,r=e.data,i=void 0===r?[]:r,o=e.settings,a=void 0===o?{}:o,s=e.on,l=void 0===s?{}:s;const c=t.registries,d=t.logger,f=Ja(t.style,t.palettes),h=[],p=u({},e),g=function(){const e={};return lo.mixin(e),e}();let v=[],b=null,x=null,S=null,w=[],M=()=>{},k=()=>{};const C={};let q=!1;const E=function(e){let t=e.createComponent;const n={};let r=[],i=[];const o=e=>{const n=t(e);return n&&(r.push(n),e.components&&(n.children=e.components.map(e=>o(e)).filter(e=>!!e))),n},a=e=>{const t=r.indexOf(e);-1!==t&&r.splice(t,1)},s=(e,t)=>{for(let n=e.length-1;n>=0;n--){const r=e[n],i=t.find(e=>r.hasKey&&r.key===e.key);i?r.children&&i.components&&s(r.children,i.components):(e.splice(n,1),a(r),r.children&&s(r.children,[]),r.instance.destroy())}},l=e=>{let t=e.compList,n=e.data,r=e.excludeFromUpdate,i=e.formatters,a=e.scales;return e.settingsList.map(e=>{const s=fs(t,e.key);return r.indexOf(e.key)>-1?(delete s.updateWith,s):s?(e.rendererSettings&&"function"==typeof s.instance.renderer().settings&&s.instance.renderer().settings(e.rendererSettings),e.rendererSettings&&"function"==typeof e.rendererSettings.transform&&e.rendererSettings.transform()?(s.applyTransform=!0,s):(s.updateWith={formatters:i,scales:a,data:n,settings:e},e.components&&(s.children=l({compList:s.children||[],data:n,excludeFromUpdate:r,formatters:i,scales:a,settingsList:e.components})),s)):o(e)}).filter(e=>!!e)},c=e=>{let t=e.components,n=e.hidden,r=e.layoutFn,i=e.ordered,o=e.rect,a=e.visible;const s=r(o,t),l=s.visible,u=s.hidden,d=s.ordered;a.push(...l),n.push(...u),i.push(...d),l.forEach(e=>{if(e.children){var t,r;const o=gs(null!==(t=null===(r=e.settings)||void 0===r?void 0:r.strategy)&&void 0!==t?t:{});c({components:e.children,hidden:n,layoutFn:o,ordered:i,rect:e.instance.getRect(),visible:a})}}),u.forEach(e=>{e.children&&c({components:e.children,hidden:n,layoutFn:ps,ordered:i,rect:null,visible:a})})};return n.destroy=()=>{r.forEach(e=>e.instance.destroy()),r=[],i=[]},n.findComponentByKey=e=>fs(r,e),n.forEach=e=>{r.forEach(e)},n.layout=e=>{let t=e.layoutSettings,n=e.rect;const r=[],o=[],a=[],s=gs(t);return c({components:i,hidden:o,layoutFn:s,ordered:a,rect:n,visible:r}),{visible:r,hidden:o,ordered:a}},n.set=e=>{let t=e.components;i=t.map(e=>o(e)).filter(e=>!!e)},n.update=e=>{let t=e.components,n=e.data,r=e.excludeFromUpdate,o=e.formatters,a=e.scales;s(i,t),i=l({compList:i,data:n,excludeFromUpdate:r,formatters:o,scales:a,settingsList:t})},n}({createComponent:e=>{if(!c.component.has(e.type))return d.warn("Unknown component: ".concat(e.type)),!1;return{instance:ga(c.component(e.type),{settings:e,chart:p,mediator:g,registries:c,theme:f,container:n}),settings:u(!0,{},e),key:e.key,hasKey:void 0!==e.key}}});function D(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};return function(){const r="function"==typeof e[t];let i;for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return i=r?e[t].call(p,...a):n.call(p,...a),i}}const T=()=>{let e;a.dockLayout?(d.warn('Deprecation Warning: "dockLayout" property should be renamed to "strategy"'),e=a.dockLayout):e=a.strategy;const t=function(e){if("function"==typeof e.getBoundingClientRect){const t=e.getBoundingClientRect();return{x:0,y:0,width:t.width,height:t.height}}return{x:0,y:0,width:0,height:0}}(n);return E.layout({layoutSettings:e,rect:t})},O=D("created"),N=D("beforeMount"),A=D("mounted"),_=D("beforeUpdate"),I=D("updated"),L=D("beforeRender"),P=D("beforeDestroy"),R=D("destroyed"),z=function(e,t){let n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).partialData;const r=t.formatters,i=void 0===r?{}:r,o=t.scales,a=void 0===o?{}:o,s=t.scroll,l=void 0===s?{}:s;M=function(e,t){let n=t.types,r=t.logger;const i={},o=[];return Array.isArray(e)?o.push(...e):(r.warn('Deprecated: "data-source" configuration"'),o.push(e)),o.forEach((e,t)=>{let o=n(e.type);if(o){let n=e.key;void 0===e.key&&(r.warn("Missing key for dataset. Using index '".concat(t,"' as key.")),n=t);let a=o({key:n,data:e.data,config:e.config});i[n]=a}}),e=>e?i[e]:i[Object.keys(i)[0]]}(e,{logger:d,types:c.data}),n||Object.keys(C).forEach(e=>C[e].clear()),t.palettes&&f.setPalettes(t.palettes),t.style&&f.setStyle(t.style),k=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:vr;const i={};return(e||[]).forEach(e=>{if(!e.key)throw new Error('Data collection is missing "key" property');if("object"==typeof e.data&&"collection"in e.data)throw new Error("Data config for collections may not reference other collections");i[e.key]=()=>r(e.data,t,n)}),e=>{let t,n;if("string"==typeof e?t=e:"object"==typeof e&&(t=e.key,n=e),!(t in i))throw new Error("Unknown data collection: ".concat(t));"function"==typeof i[t]&&(i[t]=i[t]());let r=i[t];if(n&&n.fields&&n.fields.filter){let e=r.fields.filter(n.fields.filter);r.fields.length!==e.length&&(r=u(r,{fields:e}))}return r}}(t.collections,{dataset:M},{logger:d});const h={theme:f,logger:d};b=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:io;const i={};return{get(o){let a;return"string"==typeof o&&e[o]?a=o:"object"==typeof o&&"scale"in o&&e[o.scale]&&(a=o.scale),a?(i[a]=i[a]||r(e[a],t,n),i[a]):r(o,t,n)},all(){return Object.keys(e).forEach(this.get),i}}}(a,{dataset:M,collection:k},m(m({},h),{},{scale:c.scale})),x=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:br;const i={};return{get(o){let a;return"string"==typeof o&&e[o]?a=o:"object"==typeof o&&"formatter"in o&&e[o.formatter]?a=o.formatter:"object"==typeof o&&"type"in o&&e[o.type]&&(a=o.type),a?(i[a]=i[a]||r(e[a],t,n),i[a]):r(o||{},t,n)},all(){return Object.keys(e).forEach(this.get),i}}}(i,{dataset:M,collection:k},m(m({},h),{},{formatter:c.formatter})),S=function(e,t){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=uo(e[r],t?t[r]:null));return n}(l,S)};function F(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={},r=e.filter(e=>!!e.key).map(e=>e.key);w.forEach(e=>{e.key&&-1!==r.indexOf(e.key)?t[e.key]=e:e.destroy()}),w=e.map(e=>{const r=e.key&&t[e.key]?t[e.key]:c.interaction(e.type)(p,g,n);return r.set(e),r})}const j=e=>{const t=n.getBoundingClientRect(),r="clientX"in e?e.clientX:e.x,i="clientY"in e?e.clientY:e.y,o={x:r-t.left,y:i-t.top},a=[];return v.forEach(e=>{const t=e.instance.getRect();Pa(t.computedPhysical?t.computedPhysical:{x:t.margin.left+t.x*t.scaleRatio.x,y:t.margin.top+t.y*t.scaleRatio.y,width:t.width*t.scaleRatio.x,height:t.height*t.scaleRatio.y},o)&&a.push(e)}),a},B=()=>{if(h.length||!n)return;Object.keys(l).forEach(e=>{const t=l[e].bind(p);n.addEventListener(e,t),h.push({key:e,listener:t})});const e={},t=t=>{t.touches?(e.x=t.touches[0].clientX,e.y=t.touches[0].clientY,e.multiTouch=t.touches.length>1):(e.x=t.clientX,e.y=t.clientY,e.multiTouch=!1),e.time=Date.now(),e.comps=j(e)},r=t=>{const n=e.comps||j(t);if(!n.every(e=>e.instance.def.disableTriggers)&&("touchend"===t.type&&t.preventDefault(),function(e,t){const n=y(e),r=n?e.changedTouches[0]:e,i=Date.now()-t.time,o=isNaN(t.x)?0:Math.abs(r.clientX-t.x),a=isNaN(t.y)?0:Math.abs(r.clientY-t.y);return(0===e.button||n)&&!t.multiTouch&&o<=12&&a<=12&&i<=300}(t,e)))for(let e=n.length-1;e>=0;e--){if(n[e].instance.onBrushTap(t),q){q=!1;break}}},i=[];i.push({key:"mousedown",listener:t}),i.push({key:"mouseup",listener:r}),function(e){return"ontouchstart"in e&&"ontouchend"in e||navigator.maxTouchPoints>1}(n)&&(i.push({key:"touchstart",listener:t}),i.push({key:"touchend",listener:r})),i.push({key:"mousemove",listener:e=>{const t=j(e);for(let n=t.length-1;n>=0;n--){if(t[n].instance.onBrushOver(e),q){q=!1;break}}}}),i.forEach(e=>{n.addEventListener(e.key,e.listener),h.push(e)})},V=()=>{h.forEach(e=>{let t=e.key,r=e.listener;return n.removeEventListener(t,r)}),h.length=0},H=()=>{n.innerHTML="",(()=>{const e=a.components,t=void 0===e?[]:e;L(),z(i,a),E.set({components:t});const r=T(),o=r.visible,s=r.hidden,l=r.ordered;v=o,s.forEach(e=>{e.instance.hide(),e.visible=!1}),o.forEach(e=>e.instance.beforeMount()),o.forEach(e=>e.instance.mount()),o.forEach(e=>e.instance.beforeRender()),o.forEach(e=>e.instance.render()),o.forEach(e=>e.instance.mounted()),o.forEach(e=>{e.visible=!0}),vs(n,l)})(),B(),F(a.interactions)};return p.layoutComponents=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.excludeFromUpdate,n=void 0===t?[]:t;e.data&&(i=e.data),e.settings&&(a=e.settings,F(e.settings.interactions)),_(),z(i,a);const r=a,o=r.formatters,s=r.scales,l=r.components,c=void 0===l?[]:l;E.update({components:c,data:i,excludeFromUpdate:n,formatters:o,scales:s}),E.forEach(e=>{e.updateWith&&e.instance.set(e.updateWith)}),E.forEach(e=>{e.updateWith&&e.instance.beforeUpdate()}),T()},p.update=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.partialData,r=e.excludeFromUpdate,o=void 0===r?[]:r;let s;e.data&&(i=e.data),e.settings&&(a=e.settings,F(e.settings.interactions)),_(),z(i,a,{partialData:t});const l=a,c=l.formatters,u=l.scales,d=l.components,f=void 0===d?[]:d;E.update({components:f,data:i,excludeFromUpdate:o,formatters:c,scales:u}),E.forEach(e=>{e.updateWith&&e.instance.set(e.updateWith)}),E.forEach(e=>{e.updateWith&&e.instance.beforeUpdate()});const h=[],p=[];let m;if(t)E.forEach(e=>{(e.updateWith||e.applyTransform)&&e.visible&&h.push(e)}),m=h;else{const e=T(),t=e.visible,n=e.hidden,r=e.ordered;v=t,m=t,s=r,t.forEach(e=>{e.updateWith&&e.visible?h.push(e):p.push(e)}),n.forEach(e=>{e.instance.hide(),e.visible=!1,delete e.updateWith,e.applyTransform=!1})}p.forEach(e=>e.instance.beforeMount()),p.forEach(e=>e.instance.mount()),m.forEach(e=>e.instance.beforeRender()),m.forEach(e=>{(e.updateWith||e.applyTransform)&&e.visible?e.instance.update():e.instance.render()}),t||vs(n,s),p.forEach(e=>e.instance.mounted()),h.forEach(e=>e.instance.updated()),v.forEach(e=>{delete e.updateWith,e.visible=!0,e.applyTransform=!1}),I()},p.destroy=()=>{P(),E.destroy(),V(),F(),delete p.update,delete p.destroy,R()},p.getAffectedShapes=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"and",n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=[];return v.filter(e=>null==r||e.key===r).forEach(r=>{const o=r.instance.getBrushedShapes(e,t,n);i=[...i,...o]}),i},p.findShapes=e=>{let t=[];return v.forEach(n=>{const r=n.instance.findShapes(e);t=[...t,...r]}),t},p.componentsFromPoint=e=>j(e).map(e=>e.instance.ctx),p.shapesAt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=[];const i=n.getBoundingClientRect();let o=v;if(Array.isArray(t.components)&&t.components.length>0){const e=t.components.map(e=>e.key);o=v.filter(t=>-1!==e.indexOf(t.key)).map(n=>({instance:n.instance,opts:t.components[e.indexOf(n.key)]}))}for(let n=o.length-1;n>=0;n--){const a=o[n],s=ys(e,i,a.instance.renderer().element().getBoundingClientRect()),l=a.instance.shapesAt(s,a.opts),c=l.length>0&&"stop"===t.propagation;if(r=[...r,...l],r.length>0&&c)return r}return r},p.brushFromShapes=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{components:[]};for(let n=0;n<t.components.length;n++){const r=t.components[n].key;v.filter(e=>r===e.key).forEach(r=>{let i=e.filter(e=>e.key===r.key);r.instance.brushFromShapes(i,t.components[n])})}},p.scroll=function(){return function(e,t){return t[e]||(t[e]=co()),t[e]}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",S)},p.dataset=e=>M(e),p.dataCollection=e=>k(e),p.scales=function(){return b.all()},p.formatters=function(){return x.all()},p.brush=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return C[e]||(C[e]=Eo()),C[e]},p.scale=function(e){return b.get(e)},p.formatter=function(e){return x.get(e)},p.toggleBrushing=function(e){q=void 0!==e?e:!q},p.component=e=>{const t=E.findComponentByKey(e);return null==t?void 0:t.instance.ctx},p.logger=()=>d,p.theme=()=>f,p.storage=ya({animations:{updatingStageMeta:{isInit:!1,shouldBeRemoved:!1}}}),Object.defineProperty(p,"interactions",{get:()=>({instances:w,on(){B(),w.forEach(e=>e.on())},off(){V(),w.forEach(e=>e.off())}})}),O(),n&&(N(),H(),A(n),p.element=n),p}const xs=e=>{let t=Ne(e);return t.prio=e=>e?t.default(e[0]):[t.default()],t.types=()=>t.getKeys(),t};var Ss=Ne();function ws(e,t,n){let r=n.key;const i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}const Ms=e=>e.filter(e=>"number"==typeof e&&!isNaN(e));const ks=e=>{let t=e.key,n=e.data,r=e.cache,i=e.config;if(!n)return;let o=n;"string"==typeof o&&(o=(e=>{let t=e.data,n=e.config;const r=t.split("\n"),i=r[0],o=r[1];let a=",";if(n&&n.parse&&n.parse.delimiter)a=n.parse.delimiter;else if(i){const e=[/,/,/\t/,/;/];for(let t=0;t<e.length;t++){const n=e[t];if(i&&o){if(n.test(i)&&n.test(o)&&i.split(n).length===o.split(n).length){a=n;break}}else n.test(i)&&(a=n)}}return r.map(e=>e.split(a))})({data:n,config:i})),Array.isArray(o)&&function(e){let t,n=e.source,r=e.data,i=e.cache,o=e.config,a=r;const s=o&&o.parse;Array.isArray(r[0])?s&&!1===s.headers?t=r[0].map((e,t)=>t):(t=r[0],a=r.slice(1)):t=Object.keys(r[0]);const l=!!s&&"function"==typeof s.row&&s.row;let c,d=t;d=s&&"function"==typeof s.fields?s.fields(d.slice()):t.map(e=>({key:e,title:e})),Array.isArray(r[0])?c=d.map(()=>[]):(c={},d.forEach(e=>{c[e.key]=[]}));for(let e=0;e<a.length;e++){const t=l?l(a[e],e,d):a[e];if(t)if(Array.isArray(t))for(let e=0;e<d.length;e++)c[e].push(t[e]);else for(let e=0;e<d.length;e++)c[d[e].key].push(t[d[e].key])}const f=Array.isArray(c)?e=>c[e]:e=>c[d[e].key];for(let e=0;e<d.length;e++){const t=f(e),r=Ms(t),o=r.length>0,a=o?"measure":"dimension",s=o?Math.min(...r):NaN,l=o?Math.max(...r):NaN;i.fields.push(ir(u({source:n,key:e,title:d[e].title,values:t,min:s,max:l,type:a},d[e]),{value:d[e].value,label:d[e].label}))}}({data:o,cache:r,source:t,config:i})};function Cs(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.key,n=e.data,r=e.config;const i={fields:[]},o={key:()=>t,raw:()=>n,field:e=>function(e,t){let n=t.cache;if("number"==typeof e)return n.fields[e];for(let t=0;t<n.fields.length;t++)if(n.fields[t].key()===e)return n.fields[t];for(let t=0;t<n.fields.length;t++)if(n.fields[t].title()===e)return n.fields[t];return null}(e,{cache:i}),fields:()=>i.fields.slice(),extract:e=>function(e,t){const n=Array.isArray(e)?e:[e];let r=[];return n.forEach(e=>{if(void 0!==e.field){const n=t.field(e.field),i=t.key();if(!n)throw Error("Field '".concat(e.field,"' not found"));const o=cr(e,t),a=o.props,s=o.main,l=Object.keys(a),c=!!e.trackBy,u=typeof e.trackBy,d={},f=[],h=n.items(),p=[];for(let t=0;t<h.length;t++){const n=h[t];if(s.filter&&!s.filter(n))continue;const r=ws(s,n,{key:i});l.forEach(e=>{const o=a[e];let s=o.field?o.field.items()[t]:n;r[e]=ws(o,s,{key:i})}),c&&fr({cfg:e,itemData:n,obj:r,target:f,tracker:d,trackType:u}),p.push(r)}r=c?[...r,...dr(f,{main:s,propsArr:l,props:a})]:[...r,...p]}}),r}(e,o),hierarchy:()=>null};return ks({key:t,data:n,config:r,cache:i}),o}Cs.util={normalizeConfig:cr,collect:dr,track:fr};const qs=Ne();qs.default("matrix"),qs("matrix",Cs),qs("default",Cs);const Es=Ne();function Ds(e,t,n){return Math.max(e,Math.min(t,n))}function Ts(e){let t=e.item,n=e.value,r=e.boxCenter,i=e.rendWidth,o=e.rendHeight,a="x",s="y",l=i,c=o,d=n<.5?90:-90;return e.flipXY&&(a="y",s="x",l=o,c=i,d=n<.5?180:0),(0,e.symbol)(u({},t.oob,{[a]:r*l,[s]:Math.max(t.oob.size/2,Math.min(n*c,c-t.oob.size/2)),startAngle:d}))}function Os(e){let t=e.item,n=e.boxWidth,r=e.boxPadding,i=e.rendWidth,o=e.rendHeight,a="x",s="y",l="width",c="height",d=i,f=o;e.flipXY&&(a="y",s="x",l="height",c="width",d=o,f=i);const h=function(e){let t=e.start,n=e.end,r=e.minPx,i=void 0===r?.1:r,o=e.maxPx,a=void 0===o?1:o;const s=Math.max(t,n),l=Math.min(t,n),c=Ds(-.1,1.2,s),u=Ds(-.1,1.2,l),d=c*a-u*a,f=Math.max(i,d),h=(f-d)/2;return{actualDiff:f,startModifier:h,actualLow:u*a-h}}({start:t.start,end:t.end,minPx:t.box.minHeightPx,maxPx:f}),p=h.actualDiff,m=h.actualLow;return u({},t.box,{type:"rect",[a]:(r+t.major)*d,[s]:m,[c]:p,[l]:n*d,data:t.data||{},collider:{type:null}})}function Ns(e){let t=e.item,n=e.from,r=e.to,i=e.boxCenter,o=e.rendWidth,a=e.rendHeight,s="x1",l="y1",c="x2",d="y2",f=o,h=a;return e.flipXY&&(s="y1",l="x1",c="y2",d="x2",f=a,h=o),u({},t.line,{type:"line",[d]:Math.floor(n*h),[s]:i*f,[l]:Math.floor(r*h),[c]:i*f,data:t.data||{},collider:{type:null}})}function As(e){let t=e.item,n=e.key,r=e.position,i=e.width,o=e.boxCenter,a=e.rendWidth,s=e.rendHeight,l="x1",c="y1",d="x2",f="y2",h=a,p=s;e.flipXY&&(l="y1",c="x1",d="y2",f="x2",h=s,p=a);const m=i/2;return u({type:"line"},t[n],{[c]:Math.floor(r*p),[l]:(o-m)*h,[f]:Math.floor(r*p),[d]:(o+m)*h,r:m*h,cx:o*h,cy:r*p,width:i*h,data:t.data||{},collider:{type:null}})}function _s(e,t,n){const r=t.box,i=r.width,o=r.maxWidthPx,a=r.minWidthPx,s=e>=0?1:-1;let l=Math.min(s*e*i,isNaN(o)?n:o/n);return l=isNaN(a)?l:Math.max(a/n,l),l*s}Es("native",function(e,t,n){let r,i,o={chart:e,mediator:t,element:n},a=[],s=!0;function l(){"function"==typeof r.enable&&(r.enable=r.enable.bind(o)()),r.enable&&Object.keys(r.events).forEach(e=>{const t=r.events[e].bind(o);n.addEventListener(e,t),a.push({key:e,listener:t})})}function c(){a.forEach(e=>{let t=e.key,r=e.listener;n.removeEventListener(t,r)}),a=[]}return{get key(){return i},set(e){!function(e){i=e.key,r=e,r.events=r.events||[],void 0===r.enable&&(r.enable=!0)}(e),c(),s&&l()},off(){s=!1,c()},on(){s=!0,0===a.length&&l()},destroy(){c(),o=null,r=null}}});const Is={oob:{show:!0,type:"n-polygon",fill:"#999",stroke:"#000",strokeWidth:0,size:10,sides:3,startAngle:-90},box:{show:!0,fill:"#fff",stroke:"#000",strokeWidth:1,strokeLinejoin:"miter",width:1,maxWidthPx:void 0,minWidthPx:1,minHeightPx:1},line:{show:!0,stroke:"#000",strokeWidth:1},median:{show:!0,stroke:"#000",strokeWidth:1},whisker:{show:!0,stroke:"#000",strokeWidth:1,fill:"",type:"line",width:1}},Ls=Object.keys(Is),Ps={require:["chart","resolver","symbol"],defaultSettings:{settings:{},data:{},style:{box:"$shape",line:"$shape-guide",whisker:"$shape-guide",median:"$shape-guide--inverted"}},created(){this.state={}},render(e){let t=e.data;const n=this.rect,r=n.width,i=n.height,o="horizontal"===this.settings.settings.orientation,a=this.style,s=this.resolver,l=this.symbol,c=Ls.filter(e=>!this.settings.settings[e]||!1!==this.settings.settings[e].show),d={};c.forEach(e=>d[e]=Is[e]);const f=function(e){let t=e.keys,n=e.data,r=e.defaultSettings,i=e.style,o=e.settings,a=e.width,s=e.height,l=e.resolver;const c=u(!0,{},r||{},i||{}),d={major:"horizontal"===o.orientation?s:a,minor:"horizontal"===o.orientation?a:s},f=o.major;let h;h="object"==typeof f&&"object"==typeof f.ref&&void 0!==f.ref.start&&void 0!==f.ref.end?l.resolve({data:n,defaults:{start:0,end:1},scaled:d,settings:u(!0,{},{binStart:{scale:o.major.scale,ref:o.major.ref.start},binEnd:{scale:o.major.scale,ref:o.major.ref.end}})}):"object"==typeof f&&void 0!==f.binStart&&void 0!==f.binEnd?l.resolve({data:n,defaults:{start:0,end:1},scaled:d,settings:u(!0,{},{binStart:{scale:o.major.scale,ref:"binStart"},binEnd:{scale:o.major.scale,ref:"binEnd"}},o.major)}):l.resolve({data:n,scaled:d,defaults:{major:.5},settings:{major:o.major}});const p=o.minor||{},m={};["start","end","min","max","med"].forEach(e=>{(p[e]||n.items&&n.items.length&&n.items[0][e])&&(m[e]={scale:p.scale,ref:e})});let g,y={major:h,minor:l.resolve({data:n,defaults:{start:0,end:1},scaled:d,settings:u(!0,{},m,p)})};for(let e=0,r=t.length;e<r;e++)o[g]&&!1===o[g].show||(g=t[e],y[g]=l.resolve({data:n,defaults:c[g],settings:o[g],scaled:d}));return y}({keys:c,data:t,defaultSettings:d,style:a,settings:this.settings.settings,width:r,height:i,resolver:s});f.settings,f.items;const h=function(e){let t=e.width,n=e.height,r=e.flipXY,i=e.resolved,o=e.keys,a=e.symbol;const s=[],l=i.major.items;if(!l.length)return s;const c=t,d=n,f=r?n:t,h=i.major.settings,p=["start","end","min","max","med"].filter(e=>void 0!==i.minor.settings[e]),m=p.length,g=o.filter(e=>"oob"!==e);let y,b,x,S,w,M,k,C,q;const E=o?o.length:0,D=g?g.length:0;function T(){k?y.push(Ts({item:x,value:0,boxCenter:M,rendWidth:c,rendHeight:d,flipXY:r,symbol:a})):C&&y.push(Ts({item:x,value:1,boxCenter:M,rendWidth:c,rendHeight:d,flipXY:r,symbol:a}))}const O={box:function(){x.box&&v(x.start)&&v(x.end)&&y.push(Os({item:x,boxWidth:S,boxPadding:w,rendWidth:c,rendHeight:d,flipXY:r}))},line:function(){v(x.min)&&v(x.start)&&y.push(Ns({item:x,from:x.min,to:x.start,boxCenter:M,rendWidth:c,rendHeight:d,flipXY:r})),v(x.max)&&v(x.end)&&y.push(Ns({item:x,from:x.max,to:x.end,boxCenter:M,rendWidth:c,rendHeight:d,flipXY:r}))},median:function(){x.median&&v(x.med)&&y.push(As({item:x,key:"median",position:x.med,width:S,boxCenter:M,rendWidth:c,rendHeight:d,flipXY:r}))},whisker:function(){if(x.whisker){const e=S*x.whisker.width;v(x.min)&&y.push(As({item:x,key:"whisker",position:x.min,width:e,boxCenter:M,rendWidth:c,rendHeight:d,flipXY:r})),v(x.max)&&y.push(As({item:x,key:"whisker",position:x.max,width:e,boxCenter:M,rendWidth:c,rendHeight:d,flipXY:r}))}}};function N(){let e,t=-Number.MAX_VALUE,n=Number.MAX_VALUE;for(let r=0;r<m;r++)e=x[p[r]],v(e)&&(t<e&&(t=e),n>e&&(n=e));k=t<0&&t!==-Number.MAX_VALUE,C=n>1&&n!==Number.MAX_VALUE,q=k||C}for(let e=0,t=l.length;e<t;e++){y=[],b=null;const t=l[e],n=t.data;let r=null,a=null;void 0!==h.binStart?(r=t.binStart,a=t.binEnd,b=h.binStart.scale):(b=h.major.scale,r=b?t.major:0);let c=0;b?b.bandwidth?(c=b.bandwidth(),r-=c/2):c=a-r:c=1,x=u({},{major:r,majorEnd:a},i.minor.items[e]);for(let t=0;t<E;t++)x[o[t]]=i[o[t]].items[e];if(S=_s(c,x,f),w=(c-S)/2,M=w+x.major+S/2,N(),q)x.oob&&T();else for(let e=0;e<D;e++)x[g[e]]&&!1===x[g[e]].show||O[g[e]]();const d={type:"container",data:n,collider:{type:"bounds"},children:y};s.push(d)}return s}({width:r,height:i,flipXY:o,resolved:f,keys:c,symbol:l});return h}};const Rs={shape:"saltire",width:2,size:.5,fill:"#333",stroke:"#333",strokeWidth:0},zs=/px$/,Fs={shape:"circle",label:"",fill:"#333",stroke:"#ccc",strokeDasharray:"",strokeWidth:0,strokeLinejoin:"miter",opacity:1,x:.5,y:.5,size:1,show:!0},js={imageSrc:void 0,imageScalingFactor:void 0,position:"center-center",symbol:"rectangle",width:void 0,height:void 0},Bs={maxPx:1e4,minPx:1,maxRelExtent:.1,minRelExtent:.01,maxRelDiscrete:1,minRelDiscrete:.1};function Vs(e,t){return e&&"function"==typeof e.bandwidth?{isBandwidth:!0,value:Math.max(1,e.bandwidth()*t)}:{isBandwidth:!1,value:Math.max(1,t)}}function Hs(e,t,n,r){let i=t.width,o=t.height;return e.filter(e=>!1!==e.show&&!isNaN(e.x+e.y)).map(e=>{let t=e,a=zs.test(e.size)?parseInt(e.size,10):n.min+t.size*(n.max-n.min);b(a)&&(t=Rs,a=n.min+t.size*(n.max-n.min));const s=function(e){let t=Fs.shape,n={};return"object"==typeof e.shape&&"string"==typeof e.shape.type?(t=e.shape.type,n=e.shape):"string"==typeof e.shape&&(t=e.shape),[t,n]}(t),l=g(s,2),c=l[0],u=m(m({},l[1]),{},{type:c,label:e.label,x:e.x*i,y:e.y*o,fill:t.fill,size:Math.min(n.maxGlobal,Math.max(n.minGlobal,a)),stroke:t.stroke,strokeWidth:t.strokeWidth,strokeDasharray:t.strokeDasharray,opacity:t.opacity,imageSettings:t.imageSettings});t===e.errorShape&&(u.width=t.width);const d=r(u);return d.data=e.data,d})}const $s={require:["chart","resolver","symbol"],defaultSettings:{settings:{},data:{},animations:{enabled:!1,trackBy:e=>e.data.value},style:{item:"$shape"}},render(e){let t=e.data;const n=this.resolver.resolve({data:t,defaults:u({},Fs,this.style.item),settings:this.settings.settings,scaled:{x:this.rect.width,y:this.rect.height}}),r=this.rect,i=r.width,o=r.height,a=u({},Bs,this.settings.settings.sizeLimits),s=n.items;s.length>0&&"image"===s[0].shape&&t.items.forEach((e,t)=>{s[t].imageSettings=u({},js,this.settings.settings.imageSettings)});const l=function(e,t,n,r,i){const o=Vs(e?e.scale:void 0,n),a=Vs(t?t.scale:void 0,r);let s=Math.min(o.value*i[o.isBandwidth?"maxRelDiscrete":"maxRelExtent"],a.value*i[a.isBandwidth?"maxRelDiscrete":"maxRelExtent"]),l=Math.min(o.value*i[o.isBandwidth?"minRelDiscrete":"minRelExtent"],a.value*i[a.isBandwidth?"minRelDiscrete":"minRelExtent"]);return{min:Math.max(1,Math.floor(l)),max:Math.max(1,Math.floor(s)),maxGlobal:i.maxPx,minGlobal:i.minPx}}(n.settings.x,n.settings.y,i,o,a);return Hs(s,this.rect,l,this.settings.shapeFn||this.symbol)}};const Ws={label:"",arc:1,show:!0,fill:"#333",stroke:"#ccc",strokeWidth:1,strokeLinejoin:"round",opacity:1,innerRadius:0,outerRadius:.8,cornerRadius:0,offset:0};function Us(e,t,n,r){let i=t.x,o=t.y,a=t.width,s=t.height;const l=Q(),c={x:i+a/2,y:o+s/2},u=Math.min(a,s)/2,d=Math.min(a,s)/2,f=d/100;return e.map((e,t)=>{const i=n[t];i.type="path";const o=d*i.outerRadius,a=u*i.innerRadius,s=f*i.cornerRadius;l.innerRadius(a),l.outerRadius(o),l.cornerRadius(s),i.arcDatum=e;const h=l.centroid(e),p=i.offset?function(e,t,n,r){let i=g(e,2),o=i[0],a=i[1];const s=Math.sqrt(o*o+a*a);o/=s,a/=s;const l=n-r;return{x:o*t*l,y:a*t*l}}(h,i.offset,o,a):{x:0,y:0};return i.transform="translate(".concat(p.x,", ").concat(p.y,") translate(").concat(c.x,", ").concat(c.y,")"),i.desc={share:e.value/r,slice:{start:e.startAngle,end:e.endAngle,innerRadius:a,outerRadius:o,cornerRadius:s,offset:{x:c.x+p.x,y:c.y+p.y}}},i})}function Ys(e,t){return e.slice&&"arc"in e.slice?t.arc:t.data.value}const Ks={require:["chart","resolver"],defaultSettings:{settings:{startAngle:0,endAngle:2*Math.PI,padAngle:0,slice:{}},style:{slice:"$shape"},data:{}},render(e){let t=e.data;const n=[],r=[],i=this.settings.settings,o=this.resolver.resolve({data:t,defaults:u({},Ws,this.style.slice),settings:i.slice}).items;let a=0;for(let e=0,t=o.length;e<t;e++){const t=Ys(i,o[e]);t>0&&o[e].outerRadius>=o[e].innerRadius&&(n.push(t),r.push(o[e]),a+=t)}const s=function(){var e=se,t=ae,n=null,r=E(0),i=E(z),o=E(0);function a(a){var s,l,c,u,d,f=(a=ee(a)).length,h=0,p=new Array(f),m=new Array(f),g=+r.apply(this,arguments),y=Math.min(z,Math.max(-z,i.apply(this,arguments)-g)),v=Math.min(Math.abs(y)/f,o.apply(this,arguments)),b=v*(y<0?-1:1);for(s=0;s<f;++s)(d=m[p[s]=s]=+e(a[s],s,a))>0&&(h+=d);for(null!=t?p.sort(function(e,n){return t(m[e],m[n])}):null!=n&&p.sort(function(e,t){return n(a[e],a[t])}),s=0,c=h?(y-f*b)/h:0;s<f;++s,g=u)l=p[s],u=g+((d=m[l])>0?d*c:0)+b,m[l]={data:a[l],index:s,value:d,startAngle:g,endAngle:u,padAngle:v};return m}return a.value=function(t){return arguments.length?(e="function"==typeof t?t:E(+t),a):e},a.sortValues=function(e){return arguments.length?(t=e,n=null,a):t},a.sort=function(e){return arguments.length?(n=e,t=null,a):n},a.startAngle=function(e){return arguments.length?(r="function"==typeof e?e:E(+e),a):r},a.endAngle=function(e){return arguments.length?(i="function"==typeof e?e:E(+e),a):i},a.padAngle=function(e){return arguments.length?(o="function"==typeof e?e:E(+e),a):o},a}().sortValues(null);s.startAngle(i.startAngle),s.endAngle(i.endAngle),s.padAngle(i.padAngle);return Us(s(n),u({},this.rect,{x:0,y:0}),r,a)}};const Gs=function(e){function t(t){if(e[t.type]&&e[t.type].condition(t)){const n=e[t.type],r=void 0===n.conditionAppend||n.conditionAppend(t);n.items.forEach(e=>{const n=Math.round(t[e.key]),i=t[e.key]-n;t[e.key]=n,r&&"append"===e.type&&(i>0?t[e.key]+=.5:t[e.key]-=.5)})}}return void 0===e&&((e={}).line={append:["x1","x2","y1","y2"],round:[],condition:e=>e.x1===e.x2||e.y1===e.y2,conditionAppend:e=>e.strokeWidth%2!=0},e.rect={append:["x","y"],round:["width","height"],condition:()=>!0,conditionAppend:e=>e.strokeWidth%2!=0}),Object.keys(e).forEach(t=>{const n=e[t];n.items=[],n.append.forEach(e=>{n.items.push({key:e,type:"append"})}),n.round.forEach(e=>{n.items.push({key:e,type:"round"})})}),t.multiple=e=>e.forEach(e=>t(e)),t}();class Xs{constructor(){this.reset(),this.push(...arguments)}static evaluateKey(e,t){if(t){const t=e.substring(0,1),n=e.substring(1);if("x"===t)return"y".concat(n);if("y"===t)return"x".concat(n);if("cx"===e)return"cy";if("cy"===e)return"cx";if("width"===e)return"height";if("height"===e)return"width"}return e}transposeCoordinate(e,t,n){if("number"==typeof t&&isFinite(t)){const r=e.substring(0,1);if("x"===r||"cx"===e)return t*this.width;if("width"===e)return t*this.width;if("r"===e)return t*(n?this.height:this.width);if("y"===r||"cy"===e)return t*this.height;if("height"===e)return t*this.height}return t}push(){return this.storage.push(...arguments),this}processItem(e){let t={};const n=void 0!==e.flipXY?e.flipXY:this.flipXY,r=void 0!==e.crisp?e.crisp:this.crisp;if(e.fn&&"function"==typeof e.fn){let r=n?this.height:this.width,i=n?this.width:this.height;e=e.fn({width:r,height:i,flipXY:n});const o=Object.keys(e);for(let r=0,i=o.length;r<i;r++){let i=o[r];t[Xs.evaluateKey(i,n)]=e[i]}}else{const r=Object.keys(e);for(let i=0,o=r.length;i<o;i++){let o=r[i];const a=Xs.evaluateKey(o,n),s=this.transposeCoordinate(a,e[o],n);t[a]=s}}return r&&Gs(t),t}output(){let e=[];for(let t=0,n=this.storage.length;t<n;t++){let n=this.processItem(this.storage[t]);e.push(n)}return e}reset(){this.storage=[],this.flipXY=!1,this.crisp=!1,this.width=0,this.height=0}}function Js(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Xs(...t)}function Zs(e,t){return e&&t?e.cachedTicks&&e.cachedTicks()||e.ticks({distance:t}):[]}const Qs={created(){},require:["chart","renderer","resolver"],defaultSettings:{layout:{displayOrder:0},style:{ticks:"$guide-line",minorTicks:"$guide-line--minor"}},beforeRender(){this.blueprint=Js(),this.blueprint.width=this.rect.width,this.blueprint.height=this.rect.height,this.blueprint.x=this.rect.x,this.blueprint.y=this.rect.y,this.blueprint.crisp=!0},render(){if(this.x=this.settings.x?this.chart.scale(this.settings.x):null,this.y=this.settings.y?this.chart.scale(this.settings.y):null,Fo(this,"x",this.rect.width),Fo(this,"y",this.rect.height),!this.x&&!this.y)return[];this.settings.ticks=u({show:!0},this.style.ticks,this.settings.ticks||{}),this.settings.minorTicks=u({show:!1},this.style.minorTicks,this.settings.minorTicks||{}),this.lines={x:[],y:[]},this.lines.x=Zs(this.x,this.rect.width),this.lines.y=Zs(this.y,this.rect.height),this.lines.y=this.lines.y.map(e=>u(e,{flipXY:!0}));let e=e=>{let t=e.dir,n=e.isMinor,r=this.lines[t].filter(e=>!!e.isMinor===n),i=n?this.settings.minorTicks:this.settings.ticks;this.resolver.resolve({settings:i,data:{items:r,dir:t}}).items.forEach(e=>{let n=e.data;var r,i;e.show&&this.blueprint.push({type:"line",x1:n.position,y1:0,x2:n.position,y2:1,stroke:e.stroke||"black",strokeWidth:void 0!==e.strokeWidth?e.strokeWidth:1,strokeDasharray:void 0!==e.strokeDasharray?e.strokeDasharray:void 0,flipXY:n.flipXY||!1,value:null!==(r=n.value)&&void 0!==r?r:null===(i=n.data)||void 0===i?void 0:i.value,dir:t})})};return e({dir:"x",isMinor:!1}),e({dir:"x",isMinor:!0}),e({dir:"y",isMinor:!1}),e({dir:"y",isMinor:!0}),this.blueprint.output()}};function el(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"bottom";if(n*=.8,"left"===r||"right"===r){let i="right"===r;return"\n      M ".concat(e," ").concat(t-n,"\n      A ").concat(1.25*n," ").concat(1.25*n,", 0, 1, ").concat(i?0:1,", ").concat(e," ").concat(t+n,"\n      L ").concat(i?e+n:e-n," ").concat(t," Z\n    ")}let i="bottom"===r;return"\n    M ".concat(e-n," ").concat(t,"\n    A ").concat(1.25*n," ").concat(1.25*n,", 0, 1, ").concat(i?1:0,", ").concat(e+n," ").concat(t,"\n    L ").concat(e," ").concat(i?t+n:t-n," Z\n  ")}function tl(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"bottom";if(n*=.75,"left"===r||"right"===r){let i="right"===r;return"\n      M ".concat(e+=i?1.5*n:-1.5*n," ").concat(t-n,"\n      L ").concat(e," ").concat(t+n,"\n      L ").concat(i?e+n:e-n," ").concat(t," Z\n    ")}let i="bottom"===r;return t+=i?1.5*n:-1.5*n,"\n    M ".concat(e-n," ").concat(t,"\n    L ").concat(e+n," ").concat(t,"\n    L ").concat(e," ").concat(i?t+n:t-n," Z\n  ")}function nl(e,t,n){return e<t||e>n}function rl(e,t){if("string"==typeof e.formatter)return t.formatter(e.formatter);if("object"==typeof e.formatter)return t.formatter(e.formatter);if(void 0!==e.scale&&e.scale.data){const t=e.scale.data()&&e.scale.data().fields;return t&&t[0]?t[0].formatter():null}return null}function il(e){if(void 0===e)return 0;if("number"==typeof e&&isFinite(e))return e;if("string"==typeof e)switch(e){case"center":case"middle":return.5;case"bottom":case"right":return 1;default:return 0}return 0}function ol(e){var t,n;let r=e.chart,i=e.blueprint,o=e.renderer,a=e.p,s=e.settings,l=e.items,c=e.slopeLine,d=!0,f=!1,h=!1,p=!1,m=!1,g=u(!0,{},s.style.line,a.line||{}),y=u(!0,{fill:"#000",fontFamily:"Arial",fontSize:"12px",opacity:1,maxWidth:1,maxWidthPx:9999,padding:5,background:{fill:"#fff",stroke:"transparent",strokeWidth:0,opacity:.5}},s.style.label||{},{fill:g.stroke});if(f=c?i.processItem({type:"line",x1:c.x1,y1:c.y1,x2:c.x2,y2:c.y2,stroke:g.stroke||"black",strokeWidth:g.strokeWidth||1,strokeDasharray:g.strokeDasharray,flipXY:!1,value:a.valueInfo?a.valueInfo.id:a.value}):i.processItem({type:"line",x1:a.position,y1:0,x2:a.position,y2:1,stroke:g.stroke||"black",strokeWidth:g.strokeWidth||1,strokeDasharray:g.strokeDasharray,flipXY:a.flipXY||!1,value:a.valueInfo?a.valueInfo.id:a.value}),a.label&&!1!==a.label.show&&(null==c||!c.slope||0===c.slope)){const e=u(!0,{fill:"#000",fontFamily:"Arial",fontSize:"12px",opacity:1,maxWidth:1,maxWidthPx:9999,padding:5,background:{fill:"#fff",stroke:"transparent",strokeWidth:0,opacity:.5}},s.style.label||{},{fill:g.stroke},a.label);let t,n={width:0,height:0},c="";t=rl(a,r),!1!==a.label.showValue&&(t?c=" (".concat(t(a.value),")"):a.scale&&(c=" (".concat(a.value,")"))),c&&(n=o.measureText({text:c,fontFamily:e.fontFamily,fontSize:e.fontSize}));let f=o.measureText({text:e.text||"",fontFamily:e.fontFamily,fontSize:e.fontSize}),y={width:f.width+n.width,height:Math.max(f.height,n.height)},v=e.padding,b=il(a.flipXY?e.vAlign:e.align),x=il(a.flipXY?e.align:e.vAlign),S=Math.min(1+y.width+2*v,e.maxWidth*i.width,e.maxWidthPx),w=y.height+2*v,M=a.flipXY?w:S,k=a.flipXY?S:w;if(h=i.processItem({fn:t=>{let n=t.width,r=t.height,o=a.position*n-(a.flipXY?w:S)*(1-b);o=a.flipXY?o:Math.max(o,0);return{type:"rect",x:o,y:Math.max(Math.abs(x*r-k*x),0),width:a.flipXY?M:Math.min(M,i.width-o),height:k,stroke:e.background.stroke,strokeWidth:e.background.strokeWidth,fill:e.background.fill,opacity:e.background.opacity}},flipXY:a.flipXY||!1}),h.x<-1||h.x+h.width>i.width+1||h.y<-1||h.y+h.height>i.height+1)h=void 0;else{p={type:"text",text:e.text||"",fill:e.fill,opacity:e.opacity,fontFamily:e.fontFamily,fontSize:e.fontSize,x:h.x+v,y:h.y+h.height/2+y.height/3,maxWidth:h.width-2*v-n.width,anchor:"start"},c&&(m={type:"text",text:c||"",fill:e.fill,opacity:e.opacity,fontFamily:e.fontFamily,fontSize:e.fontSize,x:p.x+3+(h.width-(n.width+2*v)),y:p.y});for(let e=0,t=l.length;e<t;e++){let t=l[e];"rect"===t.type?Ia(h,t)&&(d=!1):"line"===t.type&&a.flipXY===t.flipXY&&Ra(h,t)&&(d=!1)}}}if(f&&l.push(f),c&&0!==c.slope&&(!1!==(null===(t=c.label)||void 0===t?void 0:t.show)||!1!==(null===(n=c.label)||void 0===n?void 0:n.showValue))){var v,b,x;let e,t;const n=120;let s=!1!==(null===(v=c.label)||void 0===v?void 0:v.show)?null===(b=c.label)||void 0===b?void 0:b.text:"";if(!1!==(null===(x=c.label)||void 0===x?void 0:x.showValue)){var S;const t=rl(a,r),n=t?t(c.value):c.value;e="(".concat(c.slope,"x + ").concat(n,")"),s+=null!==(S=c.label)&&void 0!==S&&S.text?" ".concat(e):e}if(s.length>1){var w,M,k;const e=o.measureText({text:s,fontFamily:y.fontFamily,fontSize:y.fontSize});e.width=e.width>n?n:e.width;const a=function(e,t,n){const r=e.scale({scale:"x"}),i=e.scale({scale:"y"});if(t>0){if(r.max()*t+n>=i.max())return!0}else if(t<0&&r.min()*t+n>=i.max())return!0;return!1}(r,c.slope,c.value)?function(e,t,n){const r=e.scale({scale:"x"}),i=e.scale({scale:"y"});return r((i.max()-n)/t)}(r,c.slope,c.value):void 0,u=void 0===a||c.isRtl?y.padding:3*y.padding,d=void 0!==a||c.slope>0?3*y.padding:y.padding,h=function(e,t,n,r,i,o){let a=0;if(void 0!==n){if(n<.8)return a=e.slope<0||e.isRtl?3*o.padding:2*o.padding,e.isRtl,n*i.width+a;if(1===n)return e.isRtl?n*i.width-(r.width+3*o.padding):n*i.width-(r.width+6*o.padding);if(n>.8)return e.isRtl?n*i.width-(r.width+3*o.padding):n*i.width-(r.width+6*o.padding)}else if(e.slope>0)return t.x2-(r.width+2*o.padding);return e.isRtl?t.x1-(r.width+2*o.padding):t.x1}(c,f,a,e,i,y),p=Math.min(f.y1,f.y2);null!==(w=c.label)&&void 0!==w&&w.stroke&&(t={type:"rect",x:c.isRtl?Math.max(h,u)-2:Math.max(h,u)+2,y:Math.abs(Math.max(p,d)-e.height),rx:3,ry:3,width:e.width+y.padding,height:e.height-2,stroke:g.stroke,fill:g.stroke});const m={type:"text",text:s,fill:null!==(M=null===(k=c.label)||void 0===k?void 0:k.stroke)&&void 0!==M?M:g.stroke,opacity:y.opacity,fontFamily:y.fontFamily,fontSize:y.fontSize,x:t?t.x+2:Math.max(h,u)+2,y:t?t.y+e.height-y.padding:Math.abs(Math.max(p,d)-y.padding/2),anchor:"start",title:s,maxWidth:n,width:e.width};(function(e,t,n,r,i){for(let o=0,a=e.length;o<a;o++){const a=e[o];if("text"===(null==a?void 0:a.type)&&Math.abs(a.x-t.x)<Math.max(a.width+r,t.width+r)&&Math.abs(a.y-t.y)<n.height+i)return!0}return!1})(l,m,e,u,d)||(t&&l.push(t),l.push(m))}}d&&h&&p&&(l.push(h,p),m&&l.push(m))}function al(e){const t={value:e.value};return e.label&&(t.label=e.label.text),t}function sl(e){return void 0!==("function"==typeof e.value?e.value():e.value)}function ll(e,t){const n=e.min();if(n===e.max()){const r=function(e){const t=e.range();return 2===(null==t?void 0:t.length)&&t[0]>t[1]}(e);if(t<n)return r?2:-1;if(t>n)return r?-1:2}return e(t)}function cl(e,t){return e&&t&&Math.abs(e.x-t.x)<1e-15&&Math.abs(e.y-t.y)<1e-15}const ul={require:["chart","renderer"],defaultSettings:{layout:{displayOrder:0},style:{oob:{show:!0,width:10,fill:"#1A1A1A",stroke:"transparent",strokeWidth:0,opacity:1,text:{fontFamily:"Arial",stroke:"transparent",fill:"#fff",strokeWidth:0,opacity:1},triangle:{fill:"#4D4D4D",stroke:"transparent",strokeWidth:0,opacity:1},padding:{x:28,y:5}},line:{stroke:"#000"},label:{strokeWidth:0}}},preferredSize:()=>30,beforeRender(){this.blueprint=Js(),this.blueprint.width=this.rect.width,this.blueprint.height=this.rect.height,this.blueprint.x=this.rect.x,this.blueprint.y=this.rect.y,this.blueprint.crisp=!0},render(){let e=this.settings;if(this.lines={x:[],y:[]},this.lines.x=e.lines&&e.lines.x||[],this.lines.y=e.lines&&e.lines.y||[],0===this.lines.x.length&&0===this.lines.y.length)return[];const t={x0:[],x1:[],y0:[],y1:[]};this.lines.x=this.lines.x.filter(sl).map(e=>{if("function"==typeof e.value&&(e.value=e.value()),e.scale){let t=this.chart.scale(e.scale);const n=ll(t,e.value);return u(e,{scale:t,position:n})}return u(e,{position:e.value})}),this.lines.y=this.lines.y.filter(sl).map(e=>{if("function"==typeof e.value&&(e.value=e.value()),e.scale){let t=this.chart.scale(e.scale);const n=ll(t,e.value);return u(e,{scale:t,position:n,flipXY:!0})}return u(e,{position:e.value,flipXY:!0})}),this.lines.x=this.lines.x.filter(e=>!(e.position<0||e.position>1)||(t["x".concat(e.position>1?1:0)].push(al(e)),!1)),this.lines.y=this.lines.y.filter(e=>!(!e.slope||0===e.slope)||(!(e.position<0||e.position>1)||(t["y".concat(e.position>1?1:0)].push(al(e)),!1)));let n=[];return[...this.lines.x,...this.lines.y].forEach(r=>{if(!0===r.show||void 0===r.show){let i;if(r.slope&&0!==r.slope){const e=this.chart.scale({scale:"x"}),n=this.chart.scale({scale:"y"}),o=e.min(),a=e.max(),s=n.min(),l=n.max();i=m(m({},r),{},{x1:void 0,y1:void 0,x2:void 0,y2:void 0});const c=o*r.slope+r.value,u=a*r.slope+r.value,d=(s-r.value)/r.slope,f=(l-r.value)/r.slope;let h=[];nl(c,s,l)||(h[0]={x:ll(e,o),y:ll(n,c)}),nl(d,o,a)||(h[1]={x:ll(e,d),y:1}),nl(u,s,l)||(h[2]={x:ll(e,a),y:ll(n,u)}),nl(f,o,a)||(h[3]={x:ll(e,f),y:0});const p=h.filter(e=>!!e).length;if(p>2&&function(e){cl(e[0],e[1])&&(e[1]=void 0),cl(e[1],e[2])&&(e[2]=void 0),cl(e[2],e[3])&&(e[3]=void 0),cl(e[3],e[0])&&(e[3]=void 0)}(h),h=h.filter(e=>!!e),h.length<2)return void t["y".concat(c>l?0:1)].push(al(r));i.x1=h[0].x,i.y1=h[0].y,i.x2=h[1].x,i.y2=h[1].y}else i=void 0;ol({chart:this.chart,blueprint:this.blueprint,renderer:this.renderer,p:r,settings:e,items:n,slopeLine:i})}}),e.style.oob.show&&function(e){let t=e.blueprint,n=e.oob,r=e.settings,i=e.items;const o=Object.keys(n);let a=r.style.oob||{};for(let e=0,r=o.length;e<r;e++){const r=o[e],s=n[r];if(s.length>0){let e=r.charAt(1),n="y"===r.charAt(0),o=a.padding.x+a.width,l=a.padding.y+a.width,c="bottom";c=n?"1"===e?"bottom":"top":"1"===e?"right":"left";let u=t.processItem({fn:t=>{let r=t.width,i=t.height,u=e*r+("1"===e?-o:o),d=n?l:i-l;return"arc"===a.type?{type:"path",d:el(n?d:u,n?u:d,a.width,c),x:u,y:d,stroke:a.stroke,fill:a.fill,strokeWidth:a.strokeWidth||0}:{type:"circle",cx:u,cy:d,r:a.width,stroke:a.stroke,fill:a.fill,strokeWidth:a.strokeWidth||0,opacity:a.opacity,data:s}},flipXY:n}),d=u.cx||u.x,f=u.cy||u.y;const h=s.map(e=>e.label?"".concat(e.label," (").concat(e.value,")"):"(".concat(e.value,")")),p=h.reduce((e,t,n)=>0===n?t:"".concat(e,"\n\n").concat(t),"");let m={type:"text",text:s.length||"",title:p,x:d-.4*a.width,y:f+.4*a.width,fontFamily:a.text.fontFamily,fontSize:"".concat(1.3*a.width,"px"),stroke:a.text.stroke,fill:a.text.fill,strokeWidth:a.text.strokeWidth||0,opacity:a.text.opacity},g={type:"path",d:tl(d,f,a.width,c),x:d,y:f,stroke:a.triangle.stroke,fill:a.triangle.fill,strokeWidth:a.triangle.strokeWidth||0,opacity:a.triangle.opacity};i.push(u,m,g)}}}({blueprint:this.blueprint,oob:t,settings:e,items:n}),n}};function dl(e){const t={type:"line",x1:0,x2:0,y1:0,y2:0,collider:{type:null}};return"top"===e.align||"bottom"===e.align?(t.x1=e.innerRect.x-e.outerRect.x,t.x2=t.x1+e.innerRect.width,t.y1=t.y2="top"===e.align?e.innerRect.height-e.padding:e.padding):(t.x1=t.x2="left"===e.align?e.innerRect.width-e.padding:e.padding,t.y1=e.innerRect.y-e.outerRect.y,t.y2=t.y1+e.innerRect.height),function(e,t){u(e,t.style)}(t,e),t}function fl(e){return"string"==typeof e||"number"==typeof e?e:"-"}function hl(e,t,n){n.layered||!n.stepSize?function(e,t){t.collider={type:"polygon",vertices:[{x:t.boundingRect.x,y:t.boundingRect.y},{x:t.boundingRect.x+t.boundingRect.width,y:t.boundingRect.y},{x:t.boundingRect.x+t.boundingRect.width,y:t.boundingRect.y+t.boundingRect.height},{x:t.boundingRect.x,y:t.boundingRect.y+t.boundingRect.height}]}}(0,t):n.tilted?function(e,t,n){const r=n.angle*(Math.PI/180),i=Math.max(n.stepSize/2,t.boundingRect.height/2),o="start"===t.anchor,a="end"===t.anchor&&r<0,s="start"===t.anchor&&r>=0,l=t.boundingRect.y+(s||a?t.boundingRect.height:0),c=[{x:t.x-i,y:l},{x:t.x+i,y:l}].map(e=>sa(e,r,{x:t.x,y:t.y})),u={x:o?t.boundingRect.x+t.boundingRect.width+10:t.boundingRect.x-10,y:t.boundingRect.y+t.boundingRect.height},d={x:o?t.boundingRect.x+t.boundingRect.width+10:t.boundingRect.x-10,y:t.boundingRect.y},f=r>=0?[u,d]:[d,u];c.push(...f),t.collider={type:"polygon",vertices:c}}(0,t,n):function(e,t,n){if("bottom"===n.align||"top"===n.align){const r=e.position*n.innerRect.width+(n.innerRect.x-n.outerRect.x-n.stepSize/2);t.collider={type:"rect",x:r,y:0,width:r<0?n.stepSize+r:n.stepSize,height:n.innerRect.height}}else{const r=e.position*n.innerRect.height+(n.innerRect.y-n.outerRect.y-n.stepSize/2);t.collider={type:"rect",x:0,y:r,width:n.innerRect.width,height:r<0?n.stepSize+r:n.stepSize}}const r=t.collider;r.x=Math.max(r.x,0),r.y=Math.max(r.y,0);const i=r.x+r.width-(n.outerRect.x+n.outerRect.width);r.width=i>0?r.width-i:r.width;const o=r.y+r.height-(n.outerRect.y+n.outerRect.height);r.height=o>0?r.height-o:r.height}(e,t,n)}function pl(e,t){const n=isNaN(e.style.align)?.5:Math.min(Math.max(e.style.align,0),1);let r=0;if(e.tilted)r=e.stepSize*n;else{const i=t?e.textRect.height:e.textRect.width;r=Math.max(0,e.stepSize-i)*n}return r}function ml(e,t){var n,r;const i={type:"text",text:fl(e.label),x:0,y:0,maxWidth:t.maxWidth,maxHeight:t.maxHeight,tickValue:null!==(n=e.value)&&void 0!==n?n:null===(r=e.data)||void 0===r?void 0:r.value};return"top"===t.align||"bottom"===t.align?(i.x=e.start*t.innerRect.width+(t.innerRect.x-t.outerRect.x)+pl(t,!1),i.y="top"===t.align?t.innerRect.height:0,i.anchor=t.stepSize?"start":"middle",i.x+=isNaN(t.style.offset)?0:+t.style.offset):(i.y=e.start*t.innerRect.height+(t.innerRect.y-t.outerRect.y)+pl(t,!0),i.x="left"===t.align?t.innerRect.width:0,i.anchor="left"===t.align?"end":"start",i.baseline=t.stepSize?"text-before-edge":"central",i.y+=isNaN(t.style.offset)?0:+t.style.offset),function(e,t){["fill","fontSize","fontFamily"].forEach(n=>{e[n]=t.style[n]})}(i,t),function(e,t){if(!t.tilted&&!t.stepSize)if("top"===t.align||"bottom"===t.align){const n=0,r=t.outerRect.width,i=Math.min(t.maxWidth/2,t.textRect.width/2),o=e.x-i,a=e.x+i;o<n?(e.anchor="start",e.x=t.innerRect.x-t.outerRect.x):a>r&&(e.anchor="end",e.x=t.innerRect.width+t.innerRect.x)}else{const n=0,r=t.outerRect.height,i=t.maxHeight/2,o=e.y-i,a=e.y+i;o<n?(e.y=t.innerRect.y-t.outerRect.y,e.baseline="text-before-edge"):a>r&&(e.y=t.innerRect.height+(t.innerRect.y-t.outerRect.y),e.baseline="text-after-edge")}}(i,t),function(e,t){"top"===t.align?e.y-=t.padding:"bottom"===t.align?e.y+=t.padding+t.maxHeight:"left"===t.align?e.x-=t.padding:"right"===t.align&&(e.x+=t.padding)}(i,t),function(e,t){if(t.tilted){const n=-t.angle,r=n*(Math.PI/180);"bottom"===t.align?(e.x-=t.maxHeight*Math.sin(r)/2,e.y-=t.maxHeight,e.y+=t.maxHeight*Math.cos(r)/2):e.x-=t.maxHeight*Math.sin(r)/3,e.transform="rotate(".concat(n,", ").concat(e.x,", ").concat(e.y,")"),e.anchor="bottom"===t.align==t.angle<0?"start":"end";const i=Math.cos(r)*t.maxWidth;if("bottom"===t.align==t.angle<0){const n=t.outerRect.width-t.paddingEnd;e.x+i>n&&(e.maxWidth=(n-e.x-10)/Math.cos(r))}else{const n=t.paddingEnd;e.x-i<n&&(e.maxWidth=(e.x-n-10)/Math.cos(r))}}}(i,t),function(e,t){e.boundingRect=t.textBounds(e)}(i,t),hl(e,i,t),i}function gl(e,t){const n={type:"line",x1:0,x2:0,y1:0,y2:0,collider:{type:null},tickValue:e.value};return"top"===t.align||"bottom"===t.align?(n.x1=n.x2=e.position*t.innerRect.width+(t.innerRect.x-t.outerRect.x),n.y1="top"===t.align?t.innerRect.height:0,n.y2="top"===t.align?n.y1-t.tickSize:n.y1+t.tickSize):(n.y1=n.y2=e.position*t.innerRect.height+(t.innerRect.y-t.outerRect.y),n.x1="left"===t.align?t.innerRect.width:0,n.x2="left"===t.align?n.x1-t.tickSize:n.x1+t.tickSize),function(e,t){u(e,t.style)}(n,t),function(e,t){"top"===t.align?(e.y1-=t.padding,e.y2-=t.padding):"bottom"===t.align?(e.y1+=t.padding,e.y2+=t.padding):"left"===t.align?(e.x1-=t.padding,e.x2-=t.padding):"right"===t.align&&(e.x1+=t.padding,e.x2+=t.padding)}(n,t),function(e,t){const n=e.strokeWidth/2;e.x1===t.innerRect.width?(e.x1-=n,e.x2-=n):0===e.x1?(e.x1+=n,e.x2+=n):e.y1===t.innerRect.height?(e.y1-=n,e.y2-=n):0===e.y1&&(e.y1+=n,e.y2+=n)}(n,t),n}function yl(e){return!e.isMinor&&e.position>=0&&e.position<=1}function vl(e){let t=e.rect,n=e.state,r=e.majorTicks,i=e.measure;return e.horizontal?function(e){let t=e.majorTicks,n=e.measureText,r=e.rect;const i="layered"===e.state.labels.activeMode?2:1,o=r.width,a=t.map(e=>e.label).map(e=>"".concat(e.slice(0,1)).concat(e.length>1?"…":"")).map(n).map(e=>e.width);for(let e=0;e<t.length;++e){const n=t[e];if(i*o*Math.abs(n.start-n.end)<a[e])return!0}return!1}({majorTicks:r,measureText:i,rect:t,state:n}):function(e){let t=e.majorTicks,n=e.measureText;const r=e.rect.height,i=n("M").height;return!(t.length<2)&&r*Math.abs(t[0].position-t[1].position)<i}({majorTicks:r,measureText:i,rect:t})}function bl(e){let t=e.value,n=e.maxValue,r=e.minValue,i=e.range,o=e.modifier;return isNaN(i)||isNaN(o)||(t=i*o),t>n&&(t=n),t<r&&(t=r),t}function xl(e){let t=e.isDiscrete,n=e.rect,r=e.formatter,i=e.measureText,o=e.scale,a=e.settings,s=e.state,l=0;const c={left:0,top:0,right:0,bottom:0},u=a.labels,d=u.maxLengthPx,f=u.minLengthPx;if(a.labels.show){const e=a.align,u="top"===e||"bottom"===e,h=u?n.inner.width:n.inner.height,p=o.ticks({settings:a,distance:h,formatter:r}).filter(yl),m=e=>{const t=i({text:e,fontSize:a.labels.fontSize,fontFamily:a.labels.fontFamily});return t.width=bl({value:t.width,maxValue:d,minValue:f}),t};if(t&&u&&"auto"===a.labels.mode&&(!function(e){let t=e.majorTicks,n=e.measure,r=e.rect,i=e.state,o=e.settings;const a=o.labels.maxGlyphCount,s="layered"===i.labels.activeMode?2:1,l=o.labels.tiltThreshold?o.labels.tiltThreshold:.7,c=n("…").width,u=r.width;let d=0,f=0;if(isNaN(a))for(let e=0;e<t.length;e++){const r=t[e],i=r.label,o=n(i).width*(i.length>1?l:1);if(f=s*u*Math.abs(r.start-r.end),o+c>f)return!0}else{const e=t.reduce((e,t)=>Math.min(Math.abs(t.start-t.end),e),1/0);if(f=s*u*e,d=n("M").width*l*a,d+c>f)return!0}return!1}({majorTicks:p,measure:m,rect:n.inner,state:s,settings:a})?s.labels.activeMode="horizontal":s.labels.activeMode="tilted"),!a.labels.filterOverlapping&&"tilted"!==s.labels.activeMode&&vl({rect:n.inner,state:s,majorTicks:p,measure:m,horizontal:u})){return{size:Math.max(n.outer.width,n.outer.height),isToLarge:!0}}let g,y;if("tilted"===s.labels.activeMode){const e=Math.abs(a.labels.tiltAngle)*(Math.PI/180);g=t=>bl({value:t.width,maxValue:d,minValue:f})*Math.sin(e)+t.height*Math.cos(e)}else g=u?e=>e.height:e=>bl({value:e.width,maxValue:d,minValue:f});if(u&&"tilted"!==s.labels.activeMode)y=["M"];else if(isNaN(a.labels.maxGlyphCount))y=p.map(e=>e.label);else{let e="";for(let t=0;t<a.labels.maxGlyphCount;t++)e+="M";y=[e]}const v=y.map(m),b=v.map(g),x=Math.max(...b,0);if(l+=x,l+=a.labels.margin,"layered"===s.labels.activeMode&&(l*=2),"tilted"===s.labels.activeMode){const e="bottom"===a.align==a.labels.tiltAngle>=0,t=Math.abs(a.labels.tiltAngle)*(Math.PI/180),r=(x-m("M").height*Math.cos(t))/Math.sin(t),i=e=>Math.min(r,e.width)*Math.cos(t)+e.height,o=(t,r)=>{const i=p[r]?p[r].position:0;return e?t-i*n.inner.width:t-(1-i)*n.inner.width},s=Math.min(a.labels.maxEdgeBleed,Math.max(...v.map(i).map(o),0))+a.paddingEnd;if(c[e?"left":"right"]=s,!a.labels.filterOverlapping&&function(e){let t=e.majorTicks,n=e.measureText,r=e.rect,i=e.bleedSize,o=e.angle;if(t.length<2)return!1;if(0===o)return!0;const a=Math.abs(o),s=1/(Math.min(r.outer.width-i,r.inner.width)*Math.abs(t[0].position-t[1].position));return n("M").height>Math.sin(a*(Math.PI/180))/s}({majorTicks:p,measureText:m,rect:n,bleedSize:s,angle:a.labels.tiltAngle})){return{size:Math.max(n.outer.width,n.outer.height),isToLarge:!0}}}}return{size:l,edgeBleed:c}}const Sl=(e,t,n)=>e.width*Math.abs(t.position-n.position);function wl(e){let t=e.layered,n=e.major,r=e.innerRect,i=e.outerRect,o=e.tick,a=e.index;const s=t?2:1,l=n[a-s],c=n[a+s],u=l?Sl(r,o,l)/2-2:1/0,d=c?Sl(r,o,c)/2-2:1/0;return n.length<2?r.width:l?c?2*Math.min(u,d):(e=>{let t=e.innerRect,n=e.outerRect,r=e.tick,i=e.prevWidth;const o=t.x-n.x,a=n.width-t.width-o,s=t.width-t.width*r.position+a,l=2*Math.min(i,s),c=1===r.position?t.width/2-2:0;return Math.max(i,l,c)})({innerRect:r,outerRect:i,tick:o,prevWidth:u}):(e=>{let t=e.innerRect,n=e.outerRect,r=e.tick,i=e.nextWidth;const o=t.x-n.x,a=t.width*r.position+o,s=2*Math.min(i,a),l=0===r.position?t.width/2-2:0;return Math.max(i,s,l)})({innerRect:r,outerRect:i,tick:o,nextWidth:d})}function Ml(e){const t=e.innerRect,n={cx:t.width/2,cy:t.height/2},r=Math.min(t.height,t.width)/2*e.radius,i=r+e.style.strokeWidth,o={visible:!0,type:"path",arcDatum:{startAngle:e.startAngle,endAngle:e.endAngle},transform:"translate(0, 0) translate(".concat(n.cx,", ").concat(n.cy,")"),desc:{share:1,slice:{cornerRadius:0,innerRadius:r,outerRadius:i}},ticks:[]};return function(e,t){u(e,t.style)}(o,e),o}function kl(e,t,n,r){return{x:e+n*Math.cos(r),y:t+n*Math.sin(r)}}function Cl(e,t){const n=t.innerRect,r={cx:n.width/2,cy:n.height/2},i=Math.min(n.height,n.width)/2*t.radius+t.padding,o=t.startAngle,a=t.endAngle,s=t.tickSize,l=a-o;let c=a-e.position*l;c-=Math.PI/2;const d=kl(r.cx,r.cy,i+s,c),f=kl(r.cx,r.cy,i,c),h={type:"line",x1:d.x,y1:d.y,x2:f.x,y2:f.y,value:e.value};return function(e,t){const n=m({},t.style);u(e,n)}(h,t),h}function ql(e){return"string"==typeof e||"number"==typeof e?e:"-"}function El(e,t,n){let r;return r="left"===t?n.x:"right"===t?e.outerRect.width-n.x:Math.max(n.x,e.outerRect.width-n.x),r}function Dl(e,t){const n=t.innerRect,r={cx:n.width/2,cy:n.height/2},i=Math.min(n.height,n.width)/2*t.radius+t.padding,o=t.startAngle,a=t.endAngle,s=t.tickSize,l=a-o,c=.2;let u,d;u="top"===t.align||"bottom"===t.align?a-e.position*l:o+e.position*l,d=u<-.2&&u>-Math.PI+c?"left":u>.2&&u<Math.PI-c?"right":"center",u-=Math.PI/2;const f=function(e,t,n,r){return{x:e+n*Math.cos(r),y:t+n*Math.sin(r)}}(r.cx,r.cy,i+s+6,u);let h;h="left"===d?"end":"right"===d?"start":"middle";const p={type:"text",text:ql(e.label),align:d,x:f.x,y:f.y,maxHeight:t.maxHeight,maxWidth:El(t,d,f),anchor:h,baseline:"middle"};return function(e,t){["fill","fontSize","fontFamily"].forEach(n=>{e[n]=t.style[n]})}(p,t),function(e,t){e.boundingRect=t.textBounds(e)}(p,t),function(e,t,n){let r,i;const o=parseFloat(n.fontSize)||0;r=t.y-o/2,i=e.innerRect.height-(t.y+o/2),(r<0||i<0)&&(n.text="")}(t,f,p),p}function Tl(e){let t=0;return t+=e.paddingStart,t+=e.line.show?e.line.strokeWidth/2:0,t+=e.ticks.show?e.ticks.margin:0,t}function Ol(e){let t=0;return t+=e.line.show?e.line.strokeWidth/2:0,t+=e.ticks.show?e.ticks.margin:0,t}function Nl(e){let t=0;return t+=e.ticks.show?e.ticks.tickSize:0,t+=Tl(e)+e.labels.margin,t}function Al(e,t){return e.map(e=>gl(e,t))}function _l(e,t){return t?Math.abs(t.end-t.start):e.bandwidth()}function Il(e){let t=e.textMetrics,n=e.settings,r=e.innerRect,i=e.scale,o=e.tilted,a=e.layered,s=e.tick;const l=t.height,c=_l(i,s),u={width:0,height:l};if("left"===n.align||"right"===n.align)u.width=r.width-Nl(n)-n.paddingEnd;else if(a)u.width=c*r.width*2;else if(o){const e=Math.abs(n.labels.tiltAngle)*(Math.PI/180);u.width=(r.height-Nl(n)-n.paddingEnd-l*Math.cos(e))/Math.sin(e)}else u.width=c*r.width;return u.width=bl({value:u.width,maxValue:n.labels.maxLengthPx,minValue:n.labels.minLengthPx}),u}function Ll(e){let t=e.textMetrics,n=e.settings,r=e.innerRect,i=e.outerRect,o=e.tilted,a=e.layered,s=e.tick,l=e.index,c=e.major;const u=t.height,d={width:0,height:u};if("left"===n.align||"right"===n.align)d.width=r.width-Nl(n)-n.paddingEnd;else if(o){const e=Math.abs(n.labels.tiltAngle)*(Math.PI/180);d.width=(r.height-Nl(n)-n.paddingEnd-u*Math.cos(e))/Math.sin(e)}else d.width=wl({layered:a,major:c,innerRect:r,outerRect:i,tick:s,index:l});return d.width=bl({value:d.width,maxValue:n.labels.maxLengthPx,minValue:n.labels.minLengthPx}),d}function Pl(e){let t;function n(){return t=Ll,n}function r(){return t=Il,r}function i(e){let n=e.settings,r=e.scale,i=e.innerRect,o=e.outerRect,a=e.measureText,s=e.ticks,l=e.state,c=e.textBounds;const u=[],d=function(e){return e.filter(e=>!e.isMinor)}(s),f=function(e){return e.filter(e=>e.isMinor)}(s),h={innerRect:i,align:n.align,outerRect:o},p="tilted"===l.labels.activeMode,m="layered"===l.labels.activeMode;let g;if(n.arc&&(h.startAngle=n.arc.startAngle,h.endAngle=n.arc.endAngle,h.radius=n.arc.radius),n.line.show&&(h.style=n.line,h.padding=n.paddingStart,n.arc?u.push(Ml(h)):u.push(dl(h))),n.ticks.show&&(h.style=n.ticks,h.tickSize=n.ticks.tickSize,h.padding=Tl(n),n.arc?(h.padding=Ol(n),g=function(e,t){return e.map(e=>Cl(e,t))}(d,h)):g=Al(d,h)),n.labels.show){const e=Nl(n);h.style=n.labels,h.padding=e,h.tilted=p,h.layered=m,h.angle=n.labels.tiltAngle,h.paddingEnd=n.paddingEnd,h.textBounds=c;const s=(e,s)=>{h.textRect=function(e){let t=e.style;return(0,e.measureText)({text:e.tick.label,fontSize:t.fontSize,fontFamily:t.fontFamily})}({tick:e,measureText:a,style:h.style});const l=t({textMetrics:h.textRect,settings:n,innerRect:i,outerRect:o,scale:r,tilted:p,layered:m,tick:e,major:d,index:s});h.maxWidth=l.width,h.maxHeight=l.height,h.stepSize=function(e){let t=e.innerRect,n=e.scale,r=e.settings,i=e.tick;return("top"===r.align||"bottom"===r.align?t.width:t.height)*_l(n,i)}({innerRect:i,scale:r,settings:n,tick:e})};let l=[];n.arc?(h.padding=function(e){let t=0;return t+=e.ticks.show?e.ticks.tickSize:0,t+=Ol(e)+e.labels.margin,t}(n),l=function(e,t,n){return e.map((e,r)=>{n(e,r);const i=Dl(e,t);return i.data=e.data,i})}(d,h,s)):l=!m||"top"!==n.align&&"bottom"!==n.align?function(e,t,n){return e.map((e,r)=>{n(e,r);const i=ml(e,t);return i.data=e.data,i})}(d,h,s):function(e,t,n,r){const i=t.padding,o=Nl(n);return e.map((e,a)=>{r(e,a);const s=o+t.maxHeight+n.labels.margin;t.layer=a%2,t.padding=a%2==0?i:s;const l=ml(e,t);return l.data=e.data,l})}(d,h,n,s),n.labels.filterOverlapping&&function(e,t,n){let r=(t,n)=>Ia(q(1,e[t].boundingRect),q(1,e[n].boundingRect));if(n&&n.tilted){const t=Math.abs(n.angle);r=(n,r)=>{const i=1/Math.abs(e[n].x-e[r].x),o=Math.sin(t*(Math.PI/180))/i;return e[n].boundingRect.height>o}}for(let n=0;n<=e.length-1;n++)for(let i=n+1;i<=Math.min(n+5,n+(e.length-1));i++)e[n]&&e[i]&&r(n,i)&&(i===e.length-1?(e.splice(n,1),t&&t.splice(n,1)):(e.splice(i,1),t&&t.splice(i,1)),i--,n--)}(l,g,h),u.push(...l)}return n.minorTicks&&n.minorTicks.show&&f.length>0&&(h.style=n.minorTicks,h.tickSize=n.minorTicks.tickSize,h.padding=function(e){return e.line.strokeWidth+e.minorTicks.margin}(n),u.push(...Al(f,h))),g&&u.push(...g),u}return n.build=i,r.build=i,e?r():n()}const Rl={labels:{show:!0,tiltAngle:40,tiltThreshold:.7,maxEdgeBleed:1/0,margin:4,maxLengthPx:150,minLengthPx:0,mode:"auto",maxGlyphCount:NaN,align:.5,offset:0,filterOverlapping:!1},ticks:{show:!1,margin:0,tickSize:4},line:{show:!1},paddingStart:0,paddingEnd:10,align:"auto"},zl={labels:{show:!0,margin:4,maxLengthPx:150,minLengthPx:0,align:.5,offset:0,filterOverlapping:!0,centerEndLabels:!1},ticks:{show:!0,margin:0,tickSize:8},minorTicks:{show:!1,tickSize:3,margin:0},line:{show:!0},paddingStart:0,paddingEnd:10,align:"auto"};const Fl={require:["chart","renderer","dockConfig"],defaultSettings:{layout:{displayOrder:0,prioOrder:0},settings:{},style:{labels:"$label",ticks:"$guide-line",minorTicks:"$guide-line--minor",line:"$guide-line"}},created(){this.state={isDiscrete:!!this.scale.bandwidth,isHorizontal:!1,labels:{activeMode:"horizontal"},ticks:[],innerRect:{width:0,height:0,x:0,y:0},outerRect:{width:0,height:0,x:0,y:0},defaultDock:void 0,concreteNodeBuilder:void 0,settings:void 0},this.state.isDiscrete?this.state.defaultDock="bottom":this.state.defaultDock="left",this.setState(this.settings)},setState(){this.state.isDiscrete=!!this.scale.bandwidth,this.state.settings=function(e){let t=e.state,n=e.style,r=e.settings;const i=u(!0,{},t.isDiscrete?Rl:zl,n),o=u(!0,{},i,r.settings),a=r.layout.dock||t.defaultDock;o.dock=a,o.align=function(e,t){const n=["top","bottom"],r=["left","right"];return-1!==n.indexOf(e)&&-1===r.indexOf(t)||-1!==r.indexOf(e)&&-1===n.indexOf(t)?e:t}(r.settings.align,a),o.labels.tiltAngle=Math.max(-90,Math.min(o.labels.tiltAngle,90));const s=o.paddingStart,l=o.paddingEnd;return o.paddingStart="function"==typeof s?s.call(null):s,o.paddingEnd="function"==typeof l?l.call(null):l,o}(this),this.state.concreteNodeBuilder=Pl(this.state.isDiscrete),this.dockConfig.dock(this.state.settings.dock),this.state.isHorizontal="top"===this.state.settings.align||"bottom"===this.state.settings.align,this.state.labels.activeMode=function(e,t,n){const r=t.labels.mode;return n&&e.isHorizontal?"auto"===r?e.labels.activeMode:-1!==["layered","tilted"].indexOf(t.labels.mode)&&-1!==["top","bottom"].indexOf(t.dock)?r:"horizontal":"horizontal"}(this.state,this.state.settings,this.state.isDiscrete)},preferredSize(e){const t=this.formatter,n=this.state,r=this.scale,i=this.state.isHorizontal?e.inner.width:e.inner.height;this.state.pxScale=jo(r,i);const o=function(e){let t=e.isDiscrete,n=e.rect,r=e.formatter,i=e.measureText,o=e.scale,a=e.settings,s=0;const l=xl({isDiscrete:t,rect:n,formatter:r,measureText:i,scale:o,settings:a,state:e.state}),c=l.size,u=l.edgeBleed;if(s+=c,l.isToLarge)return{size:s};if(a.ticks.show&&(s+=a.ticks.margin,s+=a.ticks.tickSize),a.minorTicks&&a.minorTicks.show){const e=a.minorTicks.margin+a.minorTicks.tickSize;e>s&&(s=e)}if(a.line.show){const e=a.line.strokeWidth/2;s+=e,u[function(e){switch(e){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left";default:return e}}(a.align)]=Math.ceil(e)}return s+=a.paddingStart,s+=a.paddingEnd,{size:s,edgeBleed:u}}({isDiscrete:this.state.isDiscrete,rect:{inner:e.inner,outer:e.outer},formatter:t,measureText:this.renderer.measureText,scale:this.state.pxScale,settings:this.state.settings,state:n});return o},beforeUpdate(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).settings;this.setState(e)},resize(e){const t=e.inner,n=e.outer,r=u({},t,function(e){let t=e.align,n=e.inner;return"left"===t?{x:n.width+n.x}:"right"===t||"bottom"===t?n:{y:n.y+n.height}}({align:this.state.settings.align,inner:t})),i=n||r;return u(this.state.innerRect,r),u(this.state.outerRect,i),n},beforeRender(){const e=this.scale,t=this.formatter,n=this.state.isHorizontal?this.state.innerRect.width:this.state.innerRect.height;this.state.pxScale=jo(e,n),this.state.ticks=this.state.pxScale.ticks({distance:n,formatter:t}).filter(e=>e.position>=0&&e.position<=1)},render(){const e=this.state,t=[];return t.push(...this.state.concreteNodeBuilder.build({settings:this.state.settings,scale:this.state.pxScale,innerRect:this.state.innerRect,outerRect:this.state.outerRect,measureText:this.renderer.measureText,textBounds:this.renderer.textBounds,ticks:this.state.ticks,state:e})),Gs.multiple(t),t}};const jl={render:()=>[]};function Bl(e,t,n){let r="";if("function"==typeof e)r=e();else if("string"==typeof e)r=e;else if(n){const e=(n.data().fields||[]).map(e=>e.title());r=e.join(t)}return r}function Vl(e,t){let n="middle";return"left"===e?"top"===t?n="end":"bottom"===t&&(n="start"):"right"===e?"top"===t?n="start":"bottom"===t&&(n="end"):"left"===t?n="start":"right"===t&&(n="end"),n}const Hl={require:["renderer","chart"],defaultSettings:{layout:{dock:"bottom",displayOrder:0,prioOrder:0},settings:{paddingStart:5,paddingEnd:5,paddingLeft:0,paddingRight:0,anchor:"center",join:", ",maxLengthPx:NaN},style:{text:"$title"}},created(){this.definitionSettings=this.settings.settings;const e=this.settings.text,t=this.definitionSettings.join;this.title=Bl(e,t,this.scale)},preferredSize(){return this.renderer.measureText({text:this.title,fontSize:this.style.text.fontSize,fontFamily:this.style.text.fontFamily}).height+this.definitionSettings.paddingStart+this.definitionSettings.paddingEnd},render(){const e=this.title,t=this.definitionSettings,n=this.rect,r=[];return r.push(function(e){let t=e.title,n=e.definitionSettings,r=e.dock,i=e.rect,o=e.measureText,a=e.style;const s={type:"text",text:t,x:0,y:0,dx:0,dy:0,anchor:Vl(r,n.anchor),baseline:"alphabetical",stroke:"transparent",strokeWidth:0,fontWeight:"normal"};u(s,a.text);const l=o(s);if("top"===r||"bottom"===r){let e=i.width/2;"left"===n.anchor?e=n.paddingLeft||0:"right"===n.anchor&&(e=i.width-(n.paddingRight||0)),s.x=e,s.y="top"===r?i.height-n.paddingStart:n.paddingStart+l.height,s.dy="top"===r?-l.height/6:-l.height/3,s.maxWidth=.8*i.width}else{let e=i.height/2;"top"===n.anchor?e=n.paddingStart:"bottom"===n.anchor&&(e=i.height-n.paddingStart),s.y=e,s.x="left"===r?i.width-n.paddingStart:n.paddingStart,s.dx="left"===r?-l.height/3:l.height/3;const t="left"===r?270:90;s.transform="rotate(".concat(t,", ").concat(s.x+s.dx,", ").concat(s.y+s.dy,")"),s.maxWidth=.8*i.height}return isNaN(n.maxLengthPx)||(s.maxWidth=Math.min(s.maxWidth,n.maxLengthPx)),s}({title:e,dock:this.settings.layout.dock,definitionSettings:t,rect:n,measureText:this.renderer.measureText,style:this.style})),r},beforeUpdate(e){e.settings&&(u(this.settings,e.settings),this.definitionSettings=e.settings.settings);const t=this.settings.text,n=this.definitionSettings.join;this.title=Bl(t,n,this.scale)}};function $l(e,t){const n=e.settings.layout.dock,r=e.settings.settings.invert,i="top"===n||"bottom"===n,o=i?"width":"height",a=e.rect[o],s=e.chart.scroll(e.settings.scroll);let l;{let e=t[i?"x":"y"];r&&(e=a-e);const n=s.getState();l={startOffset:e,startScroll:n.start,swipe:!1};const o=e/a*(n.max-n.min)+n.min;o<n.start?l.startScroll=o:o>n.start+n.viewSize&&(l.startScroll=o-n.viewSize)}return{update:e=>{let t=e[i?"x":"y"];if(r&&(t=a-t),!l.swipe){if(Math.abs(l.startOffset-t)<=1)return;l.swipe=!0}const n=s.getState(),o=(t-l.startOffset)/a*(n.max-n.min),c=l.startScroll+o;s.moveTo(c)},end:e=>{let t=e[i?"x":"y"];r&&(t=a-t);const n=s.getState();if(l.swipe){const e=(t-l.startOffset)/a*(n.max-n.min),r=l.startScroll+e;s.moveTo(r)}else{const e=t/a*(n.max-n.min)+n.min-n.viewSize/2;s.moveTo(e)}}}}function Wl(e,t){const n=t.element().getBoundingClientRect();return{x:e.center.x-n.left,y:e.center.y-n.top}}const Ul={require:["chart","renderer"],on:{panStart(e){const t=Wl(e,this.renderer),n={x:t.x-e.deltaX,y:t.y-e.deltaY};this.currentMove=$l(this,n),this.currentMove.update(t)},panMove(e){if(!this.currentMove)return;const t=Wl(e,this.renderer);this.currentMove.update(t)},panEnd(e){if(!this.currentMove)return;const t=Wl(e,this.renderer);this.currentMove.end(t),this.currentMove=null},panCancel(){this.currentMove=null},tap(e){const t=Wl(e,this.renderer);$l(this,t).end(t)}},defaultSettings:{settings:{backgroundColor:"#eee",thumbColor:"#ccc",width:16}},preferredSize:function(e){const t=this.chart.scroll(this.settings.scroll).getState();if(t.viewSize>=t.max-t.min){return Math.max(e.width,e.height)}return this.settings.settings.width},render:function(e){const t=this.settings.layout.dock,n=this.settings.settings.invert,r="top"===t||"bottom"===t,i=r?"width":"height",o=this.rect[i],a=this.chart.scroll(this.settings.scroll).getState();let s=o*(a.start-a.min)/(a.max-a.min);const l=o*a.viewSize/(a.max-a.min);return n&&(s=o-s-l),e("div",{style:{position:"relative",width:"100%",height:"100%",background:this.settings.settings.backgroundColor,pointerEvents:"auto"}},[].concat(e("div",{class:"scroller",style:{position:"absolute",[r?"left":"top"]:"".concat(s,"px"),[r?"top":"left"]:"25%",[r?"height":"width"]:"50%",[i]:"".concat(Math.max(1,l),"px"),background:this.settings.settings.thumbColor}})))},renderer:"dom"};function Yl(e){let t=e.h,n=e.isVertical,r=e.value,i=e.pos,o=e.align,a=e.borderHit,s=e.state,l=e.idx;const c="end"!==o,d=c?{left:"0",top:"0"}:{right:"0",bottom:"0"};let f=0,h="100%",p="100%";return s.targetRect&&"start"===s.settings.bubbles.align?(h="".concat(s.targetRect.x+s.targetRect.width,"px"),p="".concat(s.targetRect.y+s.targetRect.height,"px")):s.targetRect&&"end"===s.settings.bubbles.align&&(f=n?s.targetRect.x:s.targetRect.y,h="".concat(s.rect.width-f,"px"),p="".concat(s.rect.height-f,"px")),c||(i-=a),t("div",{onmouseover(e){e.srcElement.children[0].style.backgroundColor="#000",e.srcElement.children[0].style[n?"height":"width"]="2px"},onmouseout(e){e.srcElement.children[0].style.backgroundColor=s.style.line.stroke,e.srcElement.children[0].style[n?"height":"width"]="1px"},"data-value":r,"data-key":[s.key,"edge",l].join("-"),style:{cursor:n?"ns-resize":"ew-resize",position:"absolute",left:"".concat(n?f:i,"px"),top:"".concat(n?i:f,"px"),height:n?"".concat(a,"px"):p,width:n?h:"".concat(a,"px"),pointerEvents:"auto"}},[t("div",{style:u({backgroundColor:s.style.line.stroke,position:"absolute",height:n?"".concat(1,"px"):"100%",width:n?"100%":"".concat(1,"px"),pointerEvents:"none"},d)})])}function Kl(e){let t=e.h,n=e.isVertical,r=e.label,i=e.otherValue,o=e.rangeIdx,a=e.idx,s=e.pos,l=e.align,c=e.state,u=e.value;const d="end"!==l,f="outside"===c.settings.bubbles.placement;let h,p="none";n?(h=d?"left":"right",f&&(p=d?"translate(-100%,  0px)":"translate(100%,  0px)")):(h=d?"top":"bottom",f&&(p=d?"translate(0px, -100%)":"translate(0px,  100%)"));let g=c.edit&&c.edit.rangeIdx===o&&c.edit.bubbleIdx===a;const y={position:"relative",borderRadius:"".concat(c.style.bubble.borderRadius,"px"),border:"".concat(c.style.bubble.strokeWidth,"px solid ").concat(c.style.bubble.stroke),backgroundColor:c.style.bubble.fill,color:c.style.bubble.color,fontFamily:c.style.bubble.fontFamily,fontSize:c.style.bubble.fontSize,padding:"4px 8px",textAlign:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"150px",minWidth:"50px",minHeight:"1em",pointerEvents:"auto",transform:n?"translate(0,-50%)":"translate(-50%,0)",cursor:n?"ns-resize":"ew-resize"};let v=c.style.bubble.stroke;const b=g?t("input",{type:"text",value:u,style:m(m({},y),{},{textAlign:"start",textOverflow:"",fontSize:"13px"}),onkeyup(e){if("Enter"===e.key){e.preventDefault(),e.stopPropagation();const t=parseFloat(e.target.value);isNaN(t)?(v="rgba(230, 78, 78, 0.6)",e.target.style.border="".concat(c.style.bubble.strokeWidth,"px solid ").concat(v)):c.onEditConfirmed(o,t,i)}else"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),c.onEditCanceled())}}):t("div",{"data-key":[c.key,"bubble",o,a].join("-"),"data-other-value":i,"data-idx":o,"data-bidx":a,style:y},[r]);return t("div",{style:{position:"absolute",[h]:"0",[n?"top":"left"]:"".concat(s,"px"),transform:p}},[b])}function Gl(e){let t=e.h,n=e.isVertical,r=e.top,i=e.height,o=e.color,a=e.on,s=e.opacity;return t("div",u({style:{backgroundColor:o,opacity:s,position:"absolute",left:n?0:"".concat(r,"px"),top:n?"".concat(r,"px"):0,height:n?"".concat(i,"px"):"100%",width:n?"100%":"".concat(i,"px"),pointerEvents:"auto"}},a),[])}function Xl(e){let t=e.borderHit,n=e.els,r=e.isVertical,i=e.state,o=e.vStart,a=e.vEnd,s=e.idx,l=0;i.targetRect&&(l=r?i.targetRect.y:i.targetRect.x);const c=!!i.scale,u=c?i.scale.norm(o)*i.size:o,d=c?i.scale.norm(a)*i.size:a,f=Math.abs(u-d),h=Math.min(u,d)+l,p=h+f;if(i.targetRect){const e=i.targetFillRect||i.targetRect,t=r?e.height:e.width,s=c?i.scale.norm(o)*t:o,l=c?i.scale.norm(a)*t:a,u=Math.abs(s-l),d=Math.min(s,l),f={h:i.h,isVertical:r,top:d,height:u,color:i.style.target.fill,opacity:i.style.target.opacity};i.style.target.opacity<.8&&(f.on={onmouseover(e){e.srcElement.style.opacity=i.style.target.opacity+.1},onmouseout(e){e.srcElement.style.opacity=i.style.target.opacity}}),n.push(i.h("div",{style:{position:"absolute",left:"".concat(e.x,"px"),top:"".concat(e.y,"px"),height:"".concat(e.height,"px"),width:"".concat(e.width,"px")}},[Gl(f)]))}const m=u<d?o:a,y=u<d?a:o,v=g(c?i.scale.domain():[Math.min(o,a),Math.max(o,a)],2),b=v[0],x=v[1],S=m+1e-5>=b&&m-1e-5<=x,w=y-1e-5<=x&&y+1e-5>=b;S&&n.push(Yl({h:i.h,isVertical:r,borderHit:t,value:m,pos:h,align:"start",state:i,idx:s})),w&&n.push(Yl({h:i.h,isVertical:r,borderHit:t,value:y,pos:p,align:"end",state:i,idx:s}));const M=i.settings.bubbles;if(M&&M.show){M.fontSize,M.fontFamily,M.fill;const e=[o,a];S&&n.push(Kl({h:i.h,isVertical:r,align:M.align,rangeIdx:s,idx:0,otherValue:y,value:m,label:"".concat(i.format(m,e)),pos:h,state:i})),w&&n.push(Kl({h:i.h,isVertical:r,align:M.align,rangeIdx:s,idx:1,otherValue:m,value:y,label:"".concat(i.format(y,e)),pos:p,state:i}))}}function Jl(e){const t=e.active.limitHigh-e.active.end,n=e.active.limitLow-e.active.start;let r=e.current-e.start;return r=r<0?Math.max(r,n):Math.min(r,t),r}function Zl(e){let t=[];const n=0===e.direction;if(Array.isArray(e.ranges)&&e.ranges.forEach((r,i)=>{e.active&&i===e.active.idx||Xl({borderHit:5,els:t,isVertical:n,state:e,vStart:Math.min(r.min,r.max),vEnd:Math.max(r.min,r.max),idx:i})}),e.active){let r=e.start,i=e.current;if(-1!==e.active.idx)if("foo"===e.active.mode)r=Math.min(e.active.start,e.active.end),i=Math.max(e.active.start,e.active.end);else if("modify"===e.active.mode)r=Math.min(e.start,e.current),i=Math.max(e.start,e.current);else{const t=Jl(e);r=e.active.start+t,i=e.active.end+t}Xl({borderHit:5,els:t,isVertical:n,state:e,vStart:r,vEnd:i,idx:e.active.idx})}return t}function Ql(e){return{min:e.scale.min(),max:e.scale.max()}}function ec(e){return{min:0,max:e.direction?e.rect.width:e.rect.height}}function tc(e,t,n){let r,i,o=e.ranges,a=-1;for(r=0;r<o.length;r++){if(o[r].min<=t&&t<=o[r].max){a=r,n.min=r?o[r-1].max:n.min,n.max=r+1<o.length?o[r+1].min:n.max;break}if(t<o[r].min){n.max=o[r].min,n.min=r?o[r-1].max:n.min;break}}-1===a&&o.length&&r>=o.length&&(n.min=o[o.length-1].max),-1!==a&&(i={idx:a,start:o[a].min,end:o[a].max,limitLow:n.min,limitHigh:n.max,mode:"foo"}),e.active=i}function nc(e){e.renderer.render(Zl(e))}function rc(e,t){if(!t||!t.isActive())return[];const n=e.scale.data(),r=(n&&n.fields||[]).map(e=>e.id()),i=t.brushes().filter(e=>"range"===e.type&&-1!==r.indexOf(e.id))[0];return i?i.brush.ranges():[]}function ic(e,t){let n,r=1/0;const i=t.domain(),o=t.bandwidth()/2;for(let a=0;a<i.length;++a){const s=Math.abs(e-o-t(i[a]));s<r&&(r=s,n=i[a])}return n}function oc(e,t){return Math.min(...e)<=Math.max(...t)&&Math.max(...e)>=Math.min(...t)}function ac(e){const t=e.reduce((e,t)=>(e.push(...w(t.bounds)),e),[]);return M(t)}const sc={require:["chart","settings","renderer"],defaultSettings:{settings:{bubbles:{show:!0,align:"start"}},style:{bubble:"$label-overlay",line:"$shape-guide--inverted",target:"$selection-area-target"}},renderer:"dom",on:{rangeStart(e){this.start(e)},rangeMove(e){this.move(e)},rangeEnd(e){this.end(e)},rangeClear(e){this.clear(e)},bubbleStart(e){this.bubbleStart(e)}},created(){this.state={key:this.settings.key||"brush-range"}},beforeRender(e){this.state.rect=e.size.computedInner},renderRanges(){this.state.started||(this.state.ranges=rc(this.state,this.state.brushInstance),this.state.active=null,nc(this.state))},render(e){const t=this.settings.settings;this.state.direction="vertical"===t.direction?0:1;const n=this.renderer.element().getBoundingClientRect(),r=this.state.rect[0===this.state.direction?"height":"width"];let i=jo(this.chart.scale(t.scale),r);const o=function(e){const t={targetRect:null,targetFillRect:null,scale:null,size:null},n=e.settings.settings,r=n.target&&(n.target.components||(n.target.component?[n.target.component]:[])).map(t=>e.chart.component(t)).filter(e=>!!e&&!!e.rect),i=n.target&&n.target.selector?e.chart.findShapes(n.target.selector):[],o=n.target&&n.target.fillSelector?e.chart.findShapes(n.target.fillSelector):[];if(i.length>0){const r=ac(i);if(t.size=r[0===e.state.direction?"height":"width"],t.scale=jo(e.chart.scale(n.scale),t.size),t.targetRect=r,o.length>0){const e=ac(o);t.targetFillRect=e}}else if(r&&r.length>0){const n=r.slice(1).reduce((e,t)=>({x0:Math.min(e.x0,t.rect.computedInner.x),y0:Math.min(e.y0,t.rect.computedInner.y),x1:Math.max(e.x1,t.rect.computedInner.x+t.rect.computedInner.width),y1:Math.max(e.y1,t.rect.computedInner.y+t.rect.computedInner.height)}),{x0:r[0].rect.computedInner.x,y0:r[0].rect.computedInner.y,x1:r[0].rect.computedInner.x+r[0].rect.computedInner.width,y1:r[0].rect.computedInner.y+r[0].rect.computedInner.height});t.targetRect={x:n.x0-e.state.rect.x,y:n.y0-e.state.rect.y,width:n.x1-n.x0,height:n.y1-n.y0}}return t}(this);if(i=o.scale?o.scale:i,this.state.targetRect=o.targetRect,this.state.targetFillRect=o.targetFillRect,this.state.size=null===o.size?r:o.size,this.state.settings=t,this.state.style=this.style,this.state.offset=n,this.state.brush="object"==typeof t.brush?t.brush.context:t.brush,this.state.brushInstance=this.chart.brush(this.state.brush),this.state.renderer=this.renderer,this.state.multi=!!t.multiple,this.state.h=e,this.state.onEditConfirmed=(e,t,n)=>{this.state.edit=null,function(e,t,n,r){let i=e.ranges.map(e=>({min:e.min,max:e.max}));const o=e.scale.min(),a=e.scale.max();i[t]={min:Math.max(o,Math.min(n,r)),max:Math.min(a,Math.max(n,r))},e.ranges[t]=m({},i[t]);const s=e.scale.data();s&&s.fields&&s.fields.forEach(t=>{e.fauxBrushInstance||e.brushInstance.setRange(t.id(),i)})}(this.state,e,t,n),this.emit("bubbleEnd"),nc(this.state)},this.state.onEditCanceled=()=>{this.state.edit=null,nc(this.state)},this.state.cssCoord={offset:0===this.state.direction?"top":"left",coord:0===this.state.direction?"y":"x",pos:0===this.state.direction?"deltaY":"deltaX"},this.state.format="function"==typeof t.bubbles.label&&((e,n)=>t.bubbles.label.call(void 0,{datum:e,data:n,scale:i,resources:{scale:this.chart.scale,formatter:this.chart.formatter}})),{}.hasOwnProperty.call(i,"norm")){this.state.editable=!0,this.state.observeBrush="object"==typeof t.brush&&t.brush.observe,this.state.fauxBrushInstance=null,this.state.findValues=null,this.state.scale=i;const e=this.state.scale.data();!this.state.format&&e&&e.fields&&e.fields[0]&&(this.state.format=e.fields[0].formatter())}else this.state.editable=!1,this.state.scale=Vi(),this.state.scale.data=i.data,this.state.format||(this.state.format=(e,t)=>oc(i.range(),t)?function(e,t){const n=t.ticks(),r=t.domain().indexOf(ic(e,t));return-1!==r?n[r].label:"-"}(e,i):"-"),this.state.fauxBrushInstance=Eo(),this.state.findValues=e=>function(e,t){const n=t.domain(),r=t.range(),i=[];return e.forEach(e=>{if(!oc(r,[e.min,e.max]))return;const o=n.indexOf(ic(e.min,t)),a=n.indexOf(ic(e.max,t));i.push.apply(i,n.slice(Math.min(o,a),Math.max(o,a)+1))}),i}(e,i);return this.state.ranges=rc(this.state,this.state.brushInstance),this.state.observeBrush||this.state.sourcedFromThisComponent?[Zl(this.state)]:[]},mounted(){this.state.observeBrush&&this.state.brushInstance&&this.state.brushInstance.on("update",this.renderRanges)},beforeDestroy(){this.state.observeBrush&&this.state.brushInstance&&this.state.brushInstance.removeListener("update",this.renderRanges)},start(e){!function(e){let t=e.state,n=e.e,r=e.renderer,i=e.ranges,o=e.targetSize;if(t.started)return;t.edit=null;const a=n.center.x-n.deltaX,s=n.center.y-n.deltaY;let l=document.elementFromPoint(a,s);r.element().contains(l)||(l=null);const c={started:!0};t.offset=u({},r.element().getBoundingClientRect());const d=a-t.offset.left,f=s-t.offset.top;t.offset.left+=t.targetRect?t.targetRect.x:0,t.offset.top+=t.targetRect?t.targetRect.y:0,t.ranges=i(t,t.fauxBrushInstance||t.brushInstance);const h=n.center[t.cssCoord.coord]-n[t.cssCoord.pos]-t.offset[t.cssCoord.offset],p=n.center[t.cssCoord.coord]-t.offset[t.cssCoord.offset];c.current=t.scale.normInvert(p/t.size),c.start=t.scale.normInvert(h/t.size);let m=t.ranges;const g=Ql(t);let y,v,b=-1;if(l&&l.hasAttribute("data-idx"))b=parseInt(l.getAttribute("data-idx"),10),g.min=b>0?m[b-1].max:g.min,g.max=b+1<m.length?m[b+1].min:g.max;else{for(y=0;y<m.length;y++){if(m[y].min<=c.start&&c.start<=m[y].max){b=y,g.min=y?m[y-1].max:g.min,g.max=y+1<m.length?m[y+1].min:g.max;break}if(c.start<m[y].min){g.max=m[y].min,g.min=y?m[y-1].max:g.min;break}}-1===b&&m.length&&y>=m.length&&(g.min=m[m.length-1].max)}if(-1!==b||t.multi||(c.ranges=[],g.min=t.scale.min(),g.max=t.scale.max()),-1!==b)if(v={idx:b,start:m[b].min,end:m[b].max,limitLow:g.min,limitHigh:g.max,mode:"move"},l&&l.hasAttribute("data-other-value"))c.start=parseFloat(l.getAttribute("data-other-value")),v.mode="modify";else{let e=t.scale.norm(v.start)*t.size,n=t.scale.norm(v.end)*t.size;Math.abs(h-e)<=o?(c.start=v.end,v.mode="modify"):Math.abs(h-n)<=o&&(c.start=v.start,v.mode="modify")}else v={idx:-1,start:c.start,end:c.current,limitLow:g.min,limitHigh:g.max,mode:"current"};c.active=v,"modify"!==v.mode&&t.targetRect&&!Pa(t.targetRect,{x:d,y:f})||Object.keys(c).forEach(e=>t[e]=c[e])}({e:e,state:this.state,renderer:this.renderer,ranges:rc,targetSize:5})},end(){this.state.started&&(!function(e,t){e.started=!1,e.ranges=t(e,e.fauxBrushInstance||e.brushInstance);const n=Ql(e);tc(e,e.current,n)}(this.state,rc),nc(this.state),this.state.sourcedFromThisComponent=!0,this.state.active=null)},move(e){this.state.started&&(!function(e,t){const n=(t.center[e.cssCoord.coord]-e.offset[e.cssCoord.offset])/e.size,r=e.scale.normInvert(n);e.current=Math.max(Math.min(r,e.active.limitHigh),e.active.limitLow)}(this.state,e),function(e){let t=e.ranges.map(e=>({min:e.min,max:e.max}));if(-1!==e.active.idx)if("modify"===e.active.mode)t[e.active.idx].min=Math.min(e.start,e.current),t[e.active.idx].max=Math.max(e.start,e.current);else{const n=Jl(e);t[e.active.idx].min+=n,t[e.active.idx].max+=n}else t.push({min:Math.min(e.start,e.current),max:Math.max(e.start,e.current)});const n=e.scale.data();n&&n.fields&&n.fields.forEach(n=>{if(e.fauxBrushInstance){let r=rc(e,e.fauxBrushInstance),i=e.findValues(r),o=e.findValues(t),a=o.filter(e=>-1===i.indexOf(e)),s=i.filter(e=>-1===o.indexOf(e)),l=a.map(e=>({key:n.id(),value:e})),c=s.map(e=>({key:n.id(),value:e}));e.brushInstance.addAndRemoveValues(l,c),e.fauxBrushInstance.setRange(n.id(),t)}else e.brushInstance.setRange(n.id(),t)})}(this.state),nc(this.state))},clear(){this.state.fauxBrushInstance&&this.state.fauxBrushInstance.clear(),this.state.renderer.render([]),this.state.started=!1,this.state.active=null,this.state.sourcedFromThisComponent=!1},bubbleStart(e){if(!this.state.editable)return;const t=e.srcEvent||e,n=t.target,r={rangeIdx:parseInt(n.getAttribute("data-idx"),10),bubbleIdx:parseInt(n.getAttribute("data-bidx"),10)};if(isNaN(r.rangeIdx)||JSON.stringify(r)===JSON.stringify(this.state.edit))return;this.state.edit=r,t.stopPropagation(),t.stopImmediatePropagation(),t.preventDefault();const i=n.parentNode;nc(this.state);const o=i.querySelector("input");o.focus(),o.select()}};function lc(e){e.renderer.render(Zl(e))}function cc(e){return e.rc.ranges()}function uc(e,t){const n={x:e.direction?t.min+e.rect.x:e.rect.x,y:e.direction?e.rect.y:t.min+e.rect.y,width:e.direction?t.max-t.min:e.rect.width+e.rect.x,height:e.direction?e.rect.height+e.rect.y:t.max-t.min};return e.chart.shapesAt(n,e.settings.brush)}const dc={require:["chart","settings","renderer"],defaultSettings:{settings:{bubbles:{show:!0,align:"start"}},style:{bubble:"$label-overlay",line:"$shape-guide--inverted",target:"$selection-area-target"}},renderer:"dom",on:{areaStart(e){this.start(e)},areaMove(e){this.move(e)},areaEnd(e){this.end(e)},areaClear(e){this.clear(e)}},created(){this.state={key:this.settings.key||"brush-area-dir"}},render(e){this.state.rect=this.rect;const t=this.settings.settings,n="vertical"===t.direction?0:1,r=this.state.rect[0===n?"height":"width"],i=this.renderer.element().getBoundingClientRect(),o=(t.target?t.target.components||[t.target.component]:[]).map(e=>this.chart.component(e)).filter(e=>!!e&&!!e.rect),a=o[0]?o.slice(1).reduce((e,t)=>({x0:Math.min(e.x0,t.rect.x),y0:Math.min(e.y0,t.rect.y),x1:Math.max(e.x1,t.rect.x+t.rect.width),y1:Math.max(e.y1,t.rect.y+t.rect.height)}),{x0:o[0].rect.x,y0:o[0].rect.y,x1:o[0].rect.x+o[0].rect.width,y1:o[0].rect.y+o[0].rect.height}):null;return this.state.targetRect=a?{x:a.x0-this.rect.x,y:a.y0-this.rect.y,width:a.x1-a.x0,height:a.y1-a.y0}:null,this.state.style=this.style,this.state.chart=this.chart,this.state.direction=n,this.state.settings=t,this.state.offset=i,this.state.rc=mo(),this.state.renderer=this.renderer,this.state.multi=!!t.multiple,this.state.h=e,this.state.size=r,this.state.cssCoord={offset:0===this.state.direction?"top":"left",coord:0===this.state.direction?"y":"x",pos:0===this.state.direction?"deltaY":"deltaX",area:0===this.state.direction?"height":"width"},this.state.format=function(e,t){return function(e,t,n){const r=Math.min(...n),i=Math.max(...n),o={x:e.direction?r+e.rect.x:e.rect.x,y:e.direction?e.rect.y:r+e.rect.y,width:e.direction?i-r:e.rect.width+e.rect.x,height:e.direction?e.rect.height+e.rect.y:i-r},a=e.chart.shapesAt(o,e.settings.brush);if(0===a.length)return"-";const s=a.reduce((n,i)=>{const o=n.bounds,a=i.bounds;return t===r?o[e.cssCoord.coord]<=a[e.cssCoord.coord]?n:i:o[e.cssCoord.coord]+o[e.cssCoord.area]>=a[e.cssCoord.coord]+a[e.cssCoord.area]?n:i}),l=e.settings.brush.components.reduce((e,t)=>e.key===s.key?e:t);return"function"==typeof e.settings.bubbles.label?e.settings.bubbles.label(s.data):Array.isArray(l.data)&&l.data.length?s.data[l.data[0]].label:s.data&&s.data.label?s.data.label:"-"}(this,e,t)},[]},start(e){!function(e){let t=e.state,n=e.e,r=e.renderer,i=e.ranges,o=e.targetSize;if(t.started)return;const a=n.center.x-n.deltaX,s=n.center.y-n.deltaY;let l=document.elementFromPoint(a,s);r.element().contains(l)||(l=null);const c={started:!0};t.offset=r.element().getBoundingClientRect(),t.ranges=i(t);const u=a-t.offset.left,d=s-t.offset.top,f=n.center[t.cssCoord.coord]-n[t.cssCoord.pos]-t.offset[t.cssCoord.offset],h=n.center[t.cssCoord.coord]-t.offset[t.cssCoord.offset];let p=h,m=f;c.start=f,c.current=h;let g=t.ranges;const y=ec(t);let v,b,x=-1;if(l&&l.hasAttribute("data-idx"))x=parseInt(l.getAttribute("data-idx"),10),y.min=x>0?g[x-1].max:y.min,y.max=x+1<g.length?g[x+1].min:y.max;else{for(v=0;v<g.length;v++){if(g[v].min<=m&&m<=g[v].max){x=v,y.min=v?g[v-1].max:y.min,y.max=v+1<g.length?g[v+1].min:y.max;break}if(m<g[v].min){y.max=g[v].min,y.min=v?g[v-1].max:y.min;break}}-1===x&&g.length&&v>=g.length&&(y.min=g[g.length-1].max)}if(-1!==x||t.multi||(c.ranges=[],y.min=0,y.max=t.direction?t.rect.width:t.rect.height),-1!==x)if(b={idx:x,start:g[x].min,end:g[x].max,limitLow:y.min,limitHigh:y.max,mode:"move"},l&&l.hasAttribute("data-other-value"))c.start=parseFloat(l.getAttribute("data-other-value")),b.mode="modify";else{let e=b.start,t=b.end;Math.abs(f-e)<=o?(c.start=b.end,b.mode="modify"):Math.abs(f-t)<=o&&(c.start=b.start,b.mode="modify")}else b={idx:-1,start:m,end:p,limitLow:y.min,limitHigh:y.max,mode:"current"};c.active=b,"modify"!==b.mode&&t.targetRect&&!Pa(t.targetRect,{x:u,y:d})||Object.keys(c).forEach(e=>t[e]=c[e])}({e:e,state:this.state,renderer:this.renderer,ranges:cc,targetSize:5})},end(){this.state.started&&(!function(e,t){e.started=!1,e.ranges=t(e);const n=ec(e);tc(e,e.current,n)}(this.state,cc),lc(this.state))},move(e){this.state.started&&(!function(e,t){const n=t.center[e.cssCoord.coord]-e.offset[e.cssCoord.offset];e.current=Math.max(Math.min(n,e.active.limitHigh),e.active.limitLow)}(this.state,e),function(e){const t=e.ranges.map(e=>({min:e.min,max:e.max}));if(-1!==e.active.idx)if("modify"===e.active.mode)t[e.active.idx].min=Math.min(e.start,e.current),t[e.active.idx].max=Math.max(e.start,e.current);else{const n=Jl(e);t[e.active.idx].min=e.active.start+n,t[e.active.idx].max=e.active.end+n}else t.push({min:Math.min(e.start,e.current),max:Math.max(e.start,e.current)});e.rc.set(t);let n=[];t.forEach(t=>{n=[...n,...uc(e,t)]}),function(e,t){e.chart.brushFromShapes(t,e.settings.brush)}(e,n)}(this.state),lc(this.state))},clear(){this.state.rc&&this.state.rc.clear(),this.state.renderer.render([])}};function fc(e){const t="vertical"===e.direction,n=e.rect[t?"height":"width"],r=e.rect[t?"width":"height"];return function(e){const t=e.brush;if(!t||!t.isActive())return[];const n=e.scale.data(),r=(n&&n.fields||[]).map(e=>e.id()),i=t.brushes().filter(e=>"range"===e.type&&-1!==r.indexOf(e.id))[0];return i?i.brush.ranges():[]}(e).map(i=>{const o=e.scale(i.min)*n,a=e.scale(i.max)*n,s=Math.min(o,a),l=Math.abs(o-a);return{type:"rect",fill:e.fill,opacity:e.opacity,x:t?0:s,width:t?r:l,y:t?s:0,height:t?l:r}})}function hc(e,t,n,r){function i(){!function(e){e.renderer.render(fc(e))}(e)}function o(){!function(e){e.renderer.render(fc(e))}(e)}function a(){!function(e){e.renderer.render(fc(e))}(e)}e.brush=t,t&&(t.on("start",i),t.on("update",o),t.on("end",a),e.start=i,e.update=o,e.end=a,e.brush=t,e.scale=n,e.renderer=r)}function pc(e){e.brush&&(e.brush.removeListener("start",e.start),e.brush.removeListener("update",e.update),e.brush.removeListener("end",e.end)),e.start=void 0,e.update=void 0,e.end=void 0,e.brush=void 0,e.scale=void 0,e.renderer=void 0}const mc={require:["chart","settings","renderer"],defaultSettings:{settings:{}},preferredSize:()=>50,created(){this.state={}},render(){const e=this.settings.settings,t=this.chart.brush(e.brush),n=e.direction||"horizontal",r="horizontal"===n?this.rect.width:this.rect.height,i=jo(this.chart.scale(e.scale),r);return pc(this.state),hc(this.state,t,i,this.renderer),this.state.rect=this.rect,this.state.fill=e.fill||"#ccc",this.state.opacity=void 0!==e.opacity?e.opacity:1,this.state.direction=n,fc(this.state)},beforeDestroy(){pc(this.state)}};function gc(e,t){const n=t.center.x,r=t.center.y;return{x:n-e.left,y:r-e.top}}function yc(e,t,n){return ia(e,t.points[0])<n.settings.snapIndicator.threshold**2}function vc(e,t){null==e.path.d?e.path.d="M".concat(t.x," ").concat(t.y," "):e.path.d+="L".concat(t.x," ").concat(t.y," "),e.points.push(t)}function bc(e){let t=e.state,n=e.start,r=void 0===n?null:n,i=e.end,o=void 0===i?null:i;null!==r&&(t.snapIndicator.x1=r.x,t.snapIndicator.y1=r.y),null!==o&&(t.snapIndicator.x2=o.x,t.snapIndicator.y2=o.y)}function xc(e,t){e.snapIndicator.visible=t}const Sc={require:["chart","renderer","settings"],defaultSettings:{layout:{displayOrder:0},settings:{brush:{components:[]},snapIndicator:{threshold:75,strokeDasharray:"5, 5",stroke:"black",strokeWidth:2,opacity:.5},lasso:{fill:"transparent",stroke:"black",strokeWidth:2,opacity:.7,strokeDasharray:"20, 10"},startPoint:{r:10,fill:"green",stroke:"black",strokeWidth:1,opacity:1}}},on:{lassoStart(e){this.start(e)},lassoEnd(e){this.end(e)},lassoMove(e){this.move(e)},lassoCancel(){this.cancel()}},created(){this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}}},start(e){var t;this.state.active=!0,this.state.path={visible:!0,type:"path",d:null,fill:(t=this.settings.settings.lasso).fill,stroke:t.stroke,strokeWidth:t.strokeWidth,opacity:t.opacity,strokeDasharray:t.strokeDasharray,collider:{type:null}},this.state.snapIndicator=function(e){return{visible:!1,type:"line",x1:0,y1:0,x2:0,y2:0,strokeDasharray:e.strokeDasharray,stroke:e.stroke,strokeWidth:e.strokeWidth,opacity:e.opacity,collider:{type:null}}}(this.settings.settings.snapIndicator),this.state.startPoint=function(e){return{visible:!0,type:"circle",cx:0,cy:0,r:e.r,fill:e.fill,opacity:e.opacity,stroke:e.stroke,strokeWidth:e.strokeWidth,collider:{type:null}}}(this.settings.settings.startPoint),this.state.rendererBounds=this.renderer.element().getBoundingClientRect(),this.state.componentDelta=function(e,t){const n=e.element.getBoundingClientRect();return{x:t.left-n.left,y:t.top-n.top}}(this.chart,this.state.rendererBounds),this.state.brushConfig=this.settings.settings.brush.components.map(e=>({key:e.key,contexts:e.contexts||["lassoBrush"],data:e.data||[""],action:e.action||"add"}));const n=gc(this.state.rendererBounds,e);vc(this.state,n),bc({state:this.state,start:n}),function(e,t){e.startPoint.cx=t.x,e.startPoint.cy=t.y}(this.state,n)},move(e){if(!this.state.active)return;const t=gc(this.state.rendererBounds,e);yc(t,this.state,this.settings)?xc(this.state,!0):xc(this.state,!1),vc(this.state,t),bc({state:this.state,end:t}),function(e,t){const n=[e.startPoint,e.path,e.snapIndicator].filter(e=>e.visible);t.render(n)}(this.state,this.renderer),function(e,t){if(e.active){const n=e.points[e.points.length-2],r=e.points[e.points.length-1];e.lineBrushShape.x1=n.x+e.componentDelta.x,e.lineBrushShape.y1=n.y+e.componentDelta.y,e.lineBrushShape.x2=r.x+e.componentDelta.x,e.lineBrushShape.y2=r.y+e.componentDelta.y;const i=t.shapesAt(e.lineBrushShape,{components:e.brushConfig});t.brushFromShapes(i,{components:e.brushConfig})}}(this.state,this.chart)},end(e){if(!this.state.active)return;xc(this.state,!1);yc(gc(this.state.rendererBounds,e),this.state,this.settings)&&function(e,t){if(e.active){const n=e.componentDelta.x,r=e.componentDelta.y,i=e.points.map(e=>({x:e.x+n,y:e.y+r})),o=t.shapesAt({vertices:i},{components:e.brushConfig});t.brushFromShapes(o,{components:e.brushConfig})}}(this.state,this.chart),this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}},this.renderer.render([])},cancel(){this.state.active&&(!function(e,t){e.brushConfig.forEach(e=>{e.contexts.forEach(e=>{t.brush(e).end()})})}(this.state,this.chart),this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}},this.renderer.render([]))},render(){}};function wc(e,t,n,r,i){let o,a=0,s=t.length-1;for(;a<s;){let l=Math.floor((a+s)/2);o=i(t[l]),o[n]+o[r]<e[n]?a=l+1:s=l}return a}function Mc(e){let t=e.orientation,n=e.targetNodes,r=e.labels,i=e.container,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:wc;const a=[],s="v"===t?"x":"y",l="v"===t?"width":"height",c=e=>e.textBounds,u=e=>e.node.localBounds;return(e,t)=>{const d=r[t],f=d.textBounds,h=d.node;if(f[s]<i[s]||f[s]+f[l]>i[s]+i[l])return!1;for(let e=o(f,a,s,l,c);e<a.length;e++)if(Ia(f,a[e].textBounds))return!1;const p=o(f,n,s,l,u),m=f[s]+f[l];for(let e=p;e<n.length;e++){const t=n[e].node;if(m<t.localBounds[s])break;if(Ia(f,t.localBounds)&&h!==t)return!1}return a.push(r[t]),!0}}function kc(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function Cc(e){const t=typeof e;return("string"===t||"number"===t)&&""!==e}function qc(e){return m(m({type:"rect",rx:2,ry:2,fill:e.backgroundColor},e.backgroundBounds),{},{data:"".concat(e.data," ").concat(e.text),rotation:e.transform&&e.transform.match(/rotate/gi)?"rotated":"horizontal"})}function Ec(e,t,n){return n?e.width>=t.height:e.width>=t.width}function Dc(e,t,n){return n?e.height>=t.width:e.height>=t.height}function Tc(e,t,n,r,i){let o,a;return"v"===e?(o=r||i||Ec(t,n,!0),a=Dc(t,n,!r)):(o=Ec(t,n),a=i||Dc(t,n,!1)),o&&a}function Oc(e,t,n,r){return e+.5*t+(r-.5)*(t-n)-.5*n}function Nc(e,t,n){const r={type:"text",text:t,maxWidth:n.rotate?e.height:e.width,x:0,y:e.y,dx:0,dy:0,fill:n.fill,anchor:n.rotate?"end":"start",baseline:"central",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily},i=n.textMetrics;if(!n.overflow&&!function(e,t,n){return Ec(e,t,n.rotate)&&Dc(e,t,n.rotate)}(e,i,n))return!1;const o=.5*i.height;return n.rotate?(r.x=Oc(e.x,e.width,i.height,n.align)+o,r.y=Oc(e.y,e.height,i.width,n.justify),"right"===n.dock?r.transform="rotate(90, ".concat(r.x+r.dx,", ").concat(r.y+r.dy,") translate(").concat(i.width,", 0)"):r.transform="rotate(-90, ".concat(r.x+r.dx,", ").concat(r.y+r.dy,")")):(r.x=Oc(e.x,e.width,i.width,n.align),r.y=Oc(e.y,e.height,i.height,n.justify)+o),r}function Ac(e){let t=e.bar,n=e.view,r=e.direction,i=e.position,o=e.padding,a=void 0===o?4:o,s=e.measured;const l={};if(u(l,t),i&&"inside"!==i)if("up"===r||"down"===r){const e=Math.max(0,Math.min(t.y,n.height)),o=Math.max(0,Math.min(t.y+t.height,n.height));"outside"===i&&"up"===r||"opposite"===i&&"down"===r?(l.y=0,l.height=e):("outside"===i&&"down"===r||"opposite"===i&&"up"===r)&&(l.y=o,l.height=n.height-o)}else{const e=Math.max(0,Math.min(t.x,n.width)),o=Math.max(0,Math.min(t.x+t.width,n.width));"outside"===i&&"left"===r||"opposite"===i&&"right"===r?(l.x=0,l.width=e):("outside"===i&&"right"===r||"opposite"===i&&"left"===r)&&(l.x=o,l.width=n.width-o)}else;return function(e,t){const n=Math.max(0,Math.min(e.y,t.height)),r=Math.max(0,Math.min(e.y+e.height,t.height)),i=Math.max(0,Math.min(e.x,t.width)),o=Math.max(0,Math.min(e.x+e.width,t.width));e.x=i,e.width=o-i,e.y=n,e.height=r-n}(l,n),function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=n.top,i=void 0===r?4:r,o=n.bottom,a=void 0===o?4:o,s=n.left,l=void 0===s?4:s,c=n.right,u=void 0===c?4:c,d="function"==typeof l?l(t):l,f="function"==typeof u?u(t):u,h="function"==typeof i?i(t):i,p="function"==typeof a?a(t):a;e.x+=d,e.width-=d+f,e.y+=h,e.height-=h+p}(l,s,a),l}function _c(e){let t,n,r,i,o,a=e.direction,s=e.fitsHorizontally,l=e.measured,c=e.node,u=e.orientation,d=e.placementSettings,f=e.rect,h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ac;const p=[],m="h"===u?"width":"height";for(o=0;o<d.length;o++)if(r=d[o],i=h({bar:c.localBounds,view:f,direction:a,position:r.position,padding:r.padding,measured:l}),p.push(i),t=!o||i[m]>t[m]?i:t,Tc(u,i,l,s,r.overflow)){n=i;break}return n||(n=t,o=p.indexOf(n)),r=d[o],{bounds:n,placement:r}}function Ic(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};const o=i.top,a=void 0===o?4:o,s=i.bottom,l=void 0===s?4:s,c=i.left,u=void 0===c?4:c,d=i.right,f=void 0===d?4:d,h="function"==typeof u?u(t):u,p="function"==typeof f?f(t):f,m="function"==typeof a?a(t):a,g="function"==typeof l?l(t):l,y=e.x+e.dx,v=e.y+e.dy,b=n?Math.min(t.width,r.height):Math.min(t.height,r.width),x=n?Math.min(t.height,r.height):Math.min(t.width,r.width),S=.5*t.height,w=1e-9;return{x:(n?y-S:y)-h-w,y:(n?v:v-S)-m-w,width:x+(h+p)-w,height:b+(m+g)-w}}function Lc(e){let t=e.chart,n=e.targetNodes,r=e.rect,i=e.fitsHorizontally,o=e.collectiveOrientation,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_c,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Nc,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Mc;const c=[],u={container:r,targetNodes:n,labels:[],orientation:o};let d,f,h,p,g,y,v,b,x,S,w,M,k,C;for(let e=0,l=n.length;e<l;e++){y=null,f=n[e],h=f.node,k=kc(h,t),x=f.direction,C="left"===x||"right"===x?"h":"v";for(let t=0;t<f.texts.length;t++){if(p=f.texts[t],!Cc(p))continue;S=f.labelSettings[t],b=f.measurements[t],M=S.placements;const n=a({direction:x,fitsHorizontally:i,lblStngs:S,measured:b,node:h,orientation:C,placements:M,placementSettings:f.placementSettings[t],rect:r});if(y=n.bounds,w=n.placement,y&&w){var q;g=w.justify;const t="function"==typeof S.linkData?S.linkData(k,e):void 0,n="function"==typeof w.overflow?w.overflow(k,e):w.overflow;"up"===x&&(g=1-g),"opposite"===w.position&&(g=1-g),"left"===x&&(g=1-g);const r=!("h"===o||i);if(d=s(y,p,{justify:"h"===C?w.align:g,align:"h"===C?g:w.align,fontSize:S.fontSize,fontFamily:S.fontFamily,textMetrics:b,rotate:r,overflow:!!n,dock:null!==(q=S.dock)&&void 0!==q?q:"left"}),d){const n=Ic(d,b,r,y,w.padding);v="function"==typeof w.fill?w.fill(m(m({},k),{},{textBounds:n}),e):w.fill,d.fill=v,void 0!==t&&(d.data=t),"object"==typeof w.background&&(d.backgroundColor="function"==typeof w.background.fill?w.background.fill(m(m({},k),{},{textBounds:n}),e):w.background.fill,void 0!==d.backgroundColor&&(d.backgroundBounds=Ic(d,b,r,y,w.background.padding))),c.push(d),u.labels.push({node:h,textBounds:n})}}}}const E=c.filter(l(u));return[...E.filter(e=>void 0!==e.backgroundBounds).map(qc),...E]}function Pc(e){const t=2*Math.PI;return(e%t+t)%t}function Rc(e,t){e.x+=t,e.width-=2*t,e.y+=t,e.height-=2*t}function zc(e){return{x:e.x,y:e.y-e.height/2,width:e.width,height:e.height}}function Fc(e,t,n){let r=t.x,i=t.y;if(r*r+i*i>e*e)return null;let o=Math.sin(n),a=Math.cos(n),s=r*a-i*o,l=e*e-s*s;if(l<0)return null;let c=Math.sqrt(l);return{x:s*a+o*c,y:-s*o+a*c}}function jc(e){let t,n,r=e.radius,i=e.size,o=e.angle,a=i.width,s=i.height,l={x:a/2,y:s/2};switch(Math.floor(o/(Math.PI/2))){case 0:if(t=Fc(r,l,o),!t)return null;t.y*=-1,n={x:-a,y:0};break;case 1:if(t=Fc(r,l,Math.PI-o),!t)return null;n={x:-a,y:-s};break;case 2:if(t=Fc(r,l,o-Math.PI),!t)return null;t.x*=-1,n={x:0,y:-s};break;case 3:if(t=Fc(r,l,2*Math.PI-o),!t)return null;t.x*=-1,t.y*=-1,n={x:0,y:0};break;default:throw new Error("invalid angle")}return{x:t.x+n.x,y:t.y+n.y,width:a,height:s}}function Bc(e){let t=e.slice,n=e.measured,r=e.padding,i=t.start,o=t.end,a=t.innerRadius,s=t.outerRadius,l=s-a-2*r,c=o-i;if(c<Math.PI){let e=(n.height/2+r)/Math.tan(c/2);e>a&&(l=s-e-2*r)}if(l<0||l<n.minReqWidth)return null;const u=Pc((i+o)/2);let d=s-r,f={x:Math.sin(u)*d,y:-Math.cos(u)*d,width:l,height:n.height};return u<Math.PI?(f.angle=u-Math.PI/2,f.anchor="end"):(f.angle=u+Math.PI/2,f.anchor="start"),f}function Vc(e){let t=e.context,n=e.node,r=e.bounds;let i=n.desc.slice;const o=Pc((i.start+i.end)/2);switch(Math.floor(o/(Math.PI/2))){case 0:t.q1maxY=r.y-2,void 0===t.q2minY&&(t.q2minY=r.y+r.height+2);break;case 1:t.q2minY=r.y+r.height+2;break;case 2:t.q3minY=r.y+r.height+2;break;case 3:t.q4maxY=r.y-2,void 0===t.q3minY&&(t.q3minY=r.y+r.height+2)}}function Hc(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function $c(e,t,n){const r={type:"text",text:t,maxWidth:e.width,x:e.x,y:e.y+("top"===e.baseline?e.height/2:0),fill:n.fill,anchor:e.anchor||"start",baseline:"middle",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily};if(!isNaN(e.angle)){let t=e.angle*(360/(2*Math.PI));r.transform="rotate(".concat(t,", ").concat(r.x,", ").concat(r.y,")")}return r}function Wc(e){let t,n,r=e.slice,i=e.direction,o=e.position,a=e.padding,s=e.measured,l=e.view,c=e.context,u=e.store,d=r.start,f=r.end,h=r.innerRadius,p=r.offset;switch(o){case"into":t="rotate"===i?Bc({slice:r,measured:s,padding:a}):function(e){let t=e.slice,n=e.padding,r=e.measured,i=t.start,o=t.end,a=t.innerRadius,s=t.outerRadius;const l=Pc((i+o)/2);let c=jc({radius:s,size:{width:r.width+2*n+1,height:r.height+2*n},angle:l});return c?(c.baseline="top",Ra(c,{x1:0,y1:0,x2:Math.sin(i)*s,y2:-Math.cos(i)*s})||Ra(c,{x1:0,y1:0,x2:Math.sin(o)*s,y2:-Math.cos(o)*s})||Da({cx:0,cy:0,r:a},c)?null:(Rc(c,n),c)):null}({slice:r,measured:s,padding:a});break;case"inside":n={start:d,end:f,innerRadius:0,outerRadius:h},t="rotate"===i?Bc({slice:n,measured:s,padding:a}):function(e){let t=e.slice,n=e.padding,r=e.measured,i=e.store;const o=t.start,a=t.end,s=t.outerRadius,l=Pc((o+a)/2);let c=jc({radius:s,size:{width:r.width+2*n+1,height:r.height+2*n},angle:l});return c?(c.baseline="top",Rc(c,n),i.insideLabelBounds.some(e=>Ia(e,c))?null:(i.insideLabelBounds.push({x:c.x-4,y:c.y,width:c.width+8,height:c.height}),c)):null}({slice:n,measured:s,padding:a,store:u});break;case"outside":t="rotate"===i?function(e){let t=e.slice,n=e.measured,r=e.padding,i=e.view,o=t.start,a=t.end,s=t.outerRadius,l=t.offset,c=s+r,u=a-o;if(u<Math.PI&&(n.height/2+r)/Math.tan(u/2)>c)return null;const d=Pc((o+a)/2);let f=Math.sin(d)*c,h=-Math.cos(d)*c,p=n.width+1,m=d%Math.PI;if(m>Math.PI/2&&(m=Math.PI-m),Math.cos(m)>.001){let e=h<0?i.y:i.y+i.height,t=Math.abs(e-l.y)/Math.cos(m)-Math.tan(m)*(n.height/2)-2*r-s;t<p&&(p=t)}if(Math.sin(m)>.001){let e=f<0?i.x:i.x+i.width,t=Math.abs(e-l.x)/Math.sin(m)-n.height/2/Math.tan(m)-2*r-s;t<p&&(p=t)}if(p<=0||p<n.minReqWidth)return null;let g={x:f,y:h,width:p,height:n.height};return d<Math.PI?(g.angle=d-Math.PI/2,g.anchor="start"):(g.angle=d+Math.PI/2,g.anchor="end"),g}({slice:r,measured:s,padding:a,view:l}):function(e){let t=e.slice,n=e.measured,r=e.padding,i=e.view,o=e.context,a=t.start,s=t.end,l=t.outerRadius,c=t.offset;const u=Pc((a+s)/2);if(function(e,t,n){switch(t){case 0:return e.q1maxY<0;case 1:return e.q2minY>n.height;case 2:return e.q3minY>n.height;case 3:return e.q4maxY<0;default:return!0}}(o,Math.floor(u/(Math.PI/2)),i))return null;let d=l+r+n.height/2,f=Math.sin(u)*d,h=-Math.cos(u)*d,p=n.width+1;if(u<Math.PI){let e=Math.abs(i.x+i.width-(f+c.x));e<p&&(p=e)}else{let e=Math.abs(i.x-(f+c.x));e<p&&(p=e)}if(p<n.minReqWidth)return null;let m={x:f,y:h,width:p,height:n.height};return u<Math.PI?m.anchor="start":m.anchor="end",m}({slice:r,measured:s,padding:a,view:l,context:c});break;default:throw new Error("not implemented")}return t&&(t.x+=p.x,t.y+=p.y,"outside"===o&&"rotate"!==i&&function(e,t,n){const r=n.start,i=n.end,o=n.offset,a=n.outerRadius,s=Pc((r+i)/2);switch(Math.floor(s/(Math.PI/2))){case 0:if(void 0!==t.q1maxY){let n=Math.min(e.y,t.q1maxY-e.height),r=e.y-n;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x-2,y1:e.y+2,x2:o.x+Math.sin(s)*t,y2:o.y-Math.cos(s)*t,strokeWidth:1}}}break;case 1:if(void 0!==t.q2minY){let n=Math.max(e.y,t.q2minY),r=n-e.y;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x-2,y1:e.y-2,x2:o.x+Math.sin(s)*t,y2:o.y-Math.cos(s)*t,strokeWidth:1}}}break;case 2:if(void 0!==t.q3minY){let n=Math.max(e.y,t.q3minY),r=n-e.y;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x+2,y1:e.y-2,x2:o.x+Math.sin(s)*t,y2:o.y-Math.cos(s)*t,strokeWidth:1}}}break;case 3:if(void 0!==t.q4maxY){let n=Math.min(e.y,t.q4maxY-e.height),r=e.y-n;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x+2,y1:e.y+2,x2:o.x+Math.sin(s)*t,y2:o.y-Math.cos(s)*t,strokeWidth:1}}}}}(t,c,r)),t}function Uc(e){let t=e.context,n=e.direction,r=e.measured,i=e.node,o=e.placementSettings,a=e.rect,s=e.store,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Wc;for(let e=0;e<o.length;e++){let c=o[e],u=l({context:t,slice:i.desc.slice,view:a,direction:n,position:c.position,measured:r,padding:c.padding,store:s});if(u)return{bounds:u,placement:c}}return{bounds:null,placement:null}}function Yc(e,t,n){const r=t.fontFamily,i="".concat(t.fontSize,"px"),o=n.measureText({text:e,fontFamily:r,fontSize:i});return o.minReqWidth=Math.min(o.width,n.measureText({text:"".concat(e[0],"…"),fontFamily:r,fontSize:i}).width),o}const Kc=/\n+|\r+|\r\n/,Gc=/\s/,Xc=/[a-zA-Z\u00C0-\u00F6\u00F8-\u00FF\u00AD]/;function Jc(e){return"string"==typeof e?-1!==e.search(Kc):-1!==String(e).search(Kc)}function Zc(e){return-1!==e.search(Gc)}function Qc(e){return-1!==e.search(Xc)}function eu(e,t,n){return Math.max(t,Math.min(n,e))}function tu(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.string,n=e.separator,r=void 0===n?"":n,i=e.reverse,o=void 0!==i&&i,a=e.measureText,s=void 0===a?e=>({width:e.length,height:1}):a,l=e.mandatoryBreakIdentifiers,c=void 0===l?[Jc]:l,u=e.noBreakAllowedIdentifiers,d=void 0===u?[]:u,f=e.suppressIdentifier,h=void 0===f?[Zc,Jc,e=>""===e]:f,p=e.hyphenationIdentifiers,m=void 0===p?[Qc]:p;const g=String(t).split(r);!function(e){""===e[0]&&e.shift(),""===e[e.length-1]&&e.pop()}(g);const y=g.length,v=o?e=>e>=0:e=>e<y;let b=o?y:-1;function x(e){const t=eu(e,0,y-1),n=g[t],r=s(n),i=function(e,t,n,r,i){return r.some(r=>r(e,t,n))?1:i.some(r=>r(e,t,n))?0:2}(n,t,g,c,d);return{index:t,value:n,breakOpportunity:i,suppress:h.some(e=>e(n,t,g)),hyphenation:m.some(e=>e(n,t,g)),width:r.width,height:r.height,done:!1}}return{next:function(e){return isNaN(e)?o?b--:b++:b=eu(e,0,y-1),v(b)?x(b):{done:!0}},peek:x,length:y}}const nu="…",ru=/^\s*\d+(\.\d+)?px\s*$/i;function iu(e){return"string"===typeof e&&ru.test(e)}function ou(e){const t=e["font-size"]||e.fontSize;return iu(t)?parseFloat(t)*Math.max(isNaN(e.lineHeight)?1.2:e.lineHeight,0):19.2}function au(e){const t=e.maxHeight,n=Math.max(e.maxLines,1)||1/0;if(isNaN(t))return n;const r=ou(e);return Math.max(1,Math.min(Math.floor(t/r),n))}function su(e,t){return{lines:[],line:"",width:0,maxLines:au(e),maxWidth:e.maxWidth,hyphens:{enabled:"auto"===e.hyphens,char:"‐",metrics:t("‐")}}}function lu(e){e.lines.push(e.line),e.line="",e.width=0}function cu(e,t){e.line+=t.value,e.width+=t.width}function uu(e,t,n){if(t.width>e.maxWidth)return t;const r=t.index;for(let i=1;i<5;i++){const o=n.peek(t.index-1);if(!t.hyphenation||!o.hyphenation||0===t.index)return t;if(e.width+e.hyphens.metrics.width<=e.maxWidth)return e.line+=e.hyphens.char,t;if(1===e.line.length)return t;t=n.next(r-i),e.line=e.line.slice(0,-1),e.width-=t.width}return t}function du(e,t,n){const r=tu({string:t.value,measureText:n});for(;e.lines.length<e.maxLines;){let t=r.next();if(t.done)break;e.width+t.width>e.maxWidth&&2===t.breakOpportunity&&e.line.length>0?(t=e.hyphens.enabled?uu(e,t,r):t,lu(e),cu(e,t)):cu(e,t)}}function fu(e,t){const n=tu({string:e.text,separator:"",measureText:t,noBreakAllowedIdentifiers:[(e,t)=>0===t]}),r=su(e,t);let i=!0;for(;r.lines.length<r.maxLines;){let e=n.next();if(e.done){lu(r),i=!1;break}1===e.breakOpportunity?lu(r):r.width+e.width>r.maxWidth&&2===e.breakOpportunity?e.suppress?r.width+=e.width:(e=r.hyphens.enabled?uu(r,e,n):e,lu(r),cu(r,e)):cu(r,e)}return{lines:r.lines,reduced:i}}function hu(e,t){const n=tu({string:e.text,separator:/(\s|-|\u2010)/,measureText:t}),r=su(e,t);let i=!0;for(;r.lines.length<r.maxLines;){let e=n.next();if(e.done){lu(r),i=!1;break}1===e.breakOpportunity?lu(r):r.width+e.width>r.maxWidth&&2===e.breakOpportunity?e.suppress?lu(r):e.width>r.maxWidth?du(r,e,t):(lu(r),cu(r,e)):cu(r,e)}return{lines:r.lines,reduced:i}}function pu(e){return{"break-all":fu,"break-word":hu}[e.wordBreak]}function mu(e){return t=>{const n=t.node;if(function(e){return"text"===e.type&&!e._lineBreak}(n)){const r=pu(n);if(!r)return;const i=e(n);if(i.width>n.maxWidth||Jc(n.text)){const o=(ou(n)-i.height)/2,a=r(n,function(e,t){return n=>t({text:n,fontSize:e.fontSize,fontFamily:e.fontFamily})}(n,e));t.node=function(e,t,n,r){const i={type:"container",children:[]};void 0!==t.id&&(i.id=t.id);let o=0;return e.lines.forEach((a,s)=>{const l=u({},t);l.text=a,l._lineBreak=!0,o+=n,e.reduced&&s===e.lines.length-1?l.text+=nu:delete l.maxWidth,l.dy=isNaN(l.dy)?o:l.dy+o,o+=r,o+=n,i.children.push(l)}),i}(a,n,o,i.height)}}}}function gu(e,t){const n=e["font-family"]||e.fontFamily,r=e["font-size"]||e.fontSize,i="string"==typeof e.text?e.text:"".concat(e.text),o=e.maxWidth;if(void 0===o)return i;let a=t({text:i,fontSize:r,fontFamily:n}).width;if(a<=o)return i;let s=0,l=i.length-1;for(;s<=l;){let e=Math.floor((s+l)/2);a=t({text:i.substr(0,e)+nu,fontSize:r,fontFamily:n}).width,a<=o?s=e+1:l=e-1}return i.substr(0,l)+nu}function yu(e){const t=e.baseline||e["dominant-baseline"];let n=0;const r=parseInt(e.fontSize||e["font-size"],10)||0;switch(t){case"hanging":n=.75*r;break;case"text-before-edge":n=.85*r;break;case"middle":n=.25*r;break;case"central":n=.35*r;break;case"mathemetical":n=r/2;break;case"text-after-edge":case"ideographic":n=.2*-r;break;default:n=0}return n}const vu={},bu={},xu={fontSize:void 0,fontFamily:void 0};let Su;function wu(e,t){return!e&&!t||e===t}function Mu(e){let t=e.text,n=e.fontWeight,r=e.fontSize,i=e.fontFamily;const o="".concat(t," ").concat(n," ").concat(r," ").concat(i);return"number"!=typeof bu[o]&&(Su=Su||document.createElement("canvas").getContext("2d"),function(e){let t=e.fontWeight,n=e.fontSize,r=e.fontFamily;wu(xu.fontWeight,t)&&wu(xu.fontSize,n)&&wu(xu.fontFamily,r)||(Su.font=[t,n,r].filter(e=>!!e).join(" "),xu.fontWeight=t,xu.fontSize=n,xu.fontFamily=r)}({fontWeight:n,fontSize:r,fontFamily:i}),bu[o]=Su.measureText(t).width),bu[o]}function ku(e){return"number"!=typeof vu[e]&&(vu[e]=function(e){if(iu(e)){const t=parseFloat(e);return t+4*Math.ceil((t+1e-12)/24)}return 16}(e)),vu[e]}function Cu(e){let t=e.text,n=e.fontWeight,r=e.fontSize;return{width:Mu({text:t,fontWeight:n,fontSize:r,fontFamily:e.fontFamily}),height:ku(r)}}function qu(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Cu;const n=e["font-size"]||e.fontSize,r=e["font-family"]||e.fontFamily,i=t({text:e.text,fontFamily:r,fontSize:n}),o=Math.min(e.maxWidth||i.width,i.width),a=e.x||0,s=e.y||0,l=e.dx||0,c={x:0,y:s+((e.dy||0)+yu(e))-.75*i.height,width:o,height:i.height},u=e["text-anchor"]||e.anchor;return c.x="middle"===u?a+l-o/2:"end"===u?a+l-o:a+l,c}function Eu(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Cu;const n=pu(e),r=e["font-size"]||e.fontSize,i=e["font-family"]||e.fontFamily,o=t({text:e.text,fontFamily:i,fontSize:r});if(n&&(o.width>e.maxWidth||Jc(e.text))){const o=n(e,e=>t({text:e,fontFamily:i,fontSize:r})),a=u({},e);let s=0,l="";for(let e=0,n=o.lines.length;e<n;e++){let a=o.lines[e];a+=e===n-1&&o.reduced?nu:"";const c=t({text:a,fontSize:r,fontFamily:i}).width;c>=s&&(s=c,l=a)}a.text=l;const c=qu(a,t);return c.height=ou(e)*o.lines.length,c}return qu(e,t)}function Du(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function Tu(e,t,n){const r={type:"text",text:t,maxWidth:e.width,x:0,y:e.y,dx:0,dy:0,fill:n.fill,anchor:"start",baseline:"alphabetical",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily},i=n.textMetrics;if(e.width<n.fontSize)return!1;const o=Math.max(0,e.width-i.width);return r.x=e.x+n.align*o,r.y=e.y+i.height/1.2,r}function Ou(e){return{type:"circle",bounds:{cx:e.cx,cy:e.cy,r:e.r}}}function Nu(e){return e.desc&&e.desc.slice?function(e){let t=e.start,n=e.end,r=e.innerRadius,i=e.outerRadius,o=e.offset;if(Math.abs(t+2*Math.PI-n)>1e-12)return{type:null,bounds:null};let a=0!==r?r:i;return Ou({cx:o.x,cy:o.y,r:a})}(e.desc.slice):"circle"===e.type?Ou(e.attrs):"rect"===e.type?{type:"rect",bounds:e.bounds}:{type:null,bounds:null}}var Au={bar:function(e){let t=e.settings,n=e.chart,r=e.nodes,i=e.rect,o=e.renderer,a=e.style,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Lc;const l=u({fontSize:12,fontFamily:"Arial",align:.5,justify:0,fill:"#333"},a.label);l.fontSize=parseInt(l.fontSize,10);const c=t.labels.map(e=>u({},l,t,e)),d=t.labels.map(e=>e.placements.map(n=>u({},l,t,e,n))),f=function(e){let t=e.nodes,n=e.rect,r=e.chart,i=e.labelSettings,o=e.placementSettings,a=e.settings,s=e.renderer;const l={},c=[];let u,d,f,h,p,m,g,y=!0,v=!1;for(let e=0;e<t.length;e++){if(d=t[e],h=d.localBounds,!Ia(h,n))continue;let b=kc(d,r);u={node:d,texts:[],measurements:[],labelSettings:[],placementSettings:[]};for(let t=0;t<i.length;t++)m=i[t],f="function"==typeof m.label?m.label(b,e):void 0,Cc(f)&&(g="function"==typeof a.direction?a.direction(b,e):a.direction||"up",v=v||"left"===g||"right"===g,l.fontFamily=m.fontFamily,l.fontSize="".concat(m.fontSize,"px"),l.text=f,p=s.measureText(l),u.measurements.push(p),u.texts.push(f),u.labelSettings.push(m),u.placementSettings.push(o[t]),u.direction=g,y=y&&p.width<=h.width-8);c.push(u)}return{targetNodes:c,fitsHorizontally:y,hasHorizontalDirection:v}}({nodes:r,chart:n,renderer:o,settings:t,rect:i,labelSettings:c,placementSettings:d}),h=f.fitsHorizontally,p=f.hasHorizontalDirection,m=f.targetNodes,g=function(e){let t=e.orientation,n=void 0===t?"auto":t,r=e.defaultOrientation,i=void 0===r?"h":r;switch(n.toLocaleLowerCase()){case"vertical":return"v";case"horizontal":return"h";default:return i}}({orientation:t.orientation,defaultOrientation:p?"h":"v"}),y="h"===g?"y":"x",v="h"===g?"height":"width";return m.sort((e,t)=>e.node.localBounds[y]+e.node.localBounds[v]-(t.node.localBounds[y]+t.node.localBounds[v])),s({chart:n,targetNodes:m,stngs:t,rect:i,fitsHorizontally:h,collectiveOrientation:g})},slice:function(e){let t=e.settings,n=e.chart,r=e.nodes,i=e.rect,o=e.renderer,a=e.style,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Uc,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:$c;const c=u({fontSize:12,fontFamily:"Arial",fill:"#333",padding:4,position:"into"},a.label);c.fontSize=parseInt(c.fontSize,10);const d=t.labels.map(e=>u({},c,t,e)),f=t.labels.map(e=>e.placements.map(n=>u({},c,t,e,n))),h=[],p={insideLabelBounds:[]};r=function(e){const t=[],n=[],r=[],i=[];for(let o=0;o<e.length;++o){const a=e[o].desc.slice,s=Pc((a.start+a.end)/2);switch(Math.floor(s/(Math.PI/2))){case 0:t.push(e[o]);break;case 1:n.push(e[o]);break;case 2:r.push(e[o]);break;case 3:i.push(e[o])}}const o=(e,t)=>Pc((e.desc.slice.start+e.desc.slice.end)/2)-Pc((t.desc.slice.start+t.desc.slice.end)/2),a=(e,t)=>o(t,e);return t.sort(a),n.sort(o),r.sort(a),i.sort(o),t.concat(n,i,r)}(r);const m={};for(let e=0,t=r.length;e<t;e++){const t=r[e],a=Hc(t,n);for(let n=0;n<d.length;n++){const r=d[n],c="function"==typeof r.label?r.label(a,e):"";if(!c)continue;const u="function"==typeof r.direction?r.direction(a,e):r.direction||"horizontal",g="function"==typeof r.linkData?r.linkData(a,e):void 0,y=Yc(c,r,o),v=s({context:m,direction:u,lblStngs:r,measured:y,node:t,placementSettings:f[n],rect:i,store:p}),b=v.bounds,x=v.placement;if(b&&x){if("outside"===x.position&&"rotate"!==u){Vc({context:m,node:t,bounds:b});if(!xa(zc(b),i))continue}const n="function"==typeof x.fill?x.fill(a,e):x.fill,o=l(b,c,{fill:n,fontSize:r.fontSize,fontFamily:r.fontFamily,textMetrics:y});o&&(void 0!==g&&(o.data=g),h.push(o),b.line&&(b.line.stroke=n,h.push(b.line)))}}}return h},rows:function(e){let t=e.settings,n=e.chart,r=e.nodes,i=e.renderer,o=e.style,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Tu;const s=u({fontSize:12,fontFamily:"Arial",fill:"#333",padding:4,align:.5,justify:.5},o.label);s.fontSize=parseInt(s.fontSize,10);const l=u({},s,t),c=t.labels.map(e=>u({},l,e)),d={},f=[];for(let e=0,t=r.length;e<t;e++){let t=r[e],o=Du(t,n),s=Nu(t),u=s.type,h=s.bounds;if(!h)continue;let p,m=0,g=[],y=[],v="circle"===u?2*h.r*.9:h.height;for(m+=l.padding,p=0;p<c.length;p++){let t=c[p],n="function"==typeof t.label?t.label(o,e):"";d.fontFamily=t.fontFamily,d.fontSize="".concat(t.fontSize,"px"),d.text=n;let r=i.measureText(d);if(m+=r.height+t.padding,m>v)break;y.push(n),g.push(r)}const b=p,x=Math.max(0,v-m);let S;for(S="circle"===u?h.cy-.9*h.r:h.y,S+=l.justify*x+l.padding,p=0;p<b;p++){let t,n=c[p];if("circle"===u){let e=Math.max(Math.abs(S-h.cy),Math.abs(S+g[p].height-h.cy)),n=Math.sqrt(h.r*h.r-e*e);t={x:h.cx-n+l.padding,y:S,width:2*n-2*l.padding,height:g[p].height}}else t={x:h.x+l.padding,y:S,width:h.width-2*l.padding,height:g[p].height};S+=g[p].height+l.padding;let r="function"==typeof n.fill?n.fill(o,e):n.fill;const s="function"==typeof n.linkData?n.linkData(o,e):void 0;let d=a(t,y[p],{fill:r,align:n.align,fontSize:n.fontSize,fontFamily:n.fontFamily,textMetrics:g[p]});if(d){if(d.text&&d.text!==nu){const e=gu(d,i.measureText);if(nu===e)continue;d.ellipsed=e}void 0!==s&&(d.data=s),f.push(d)}}}return f}};const _u={require:["chart","renderer","settings"],defaultSettings:{settings:{},style:{label:"$label"}},render(){const e=this.settings.settings,t=[];return(e.sources||[]).forEach(e=>{e.strategy&&Au[e.strategy.type]&&e.component&&t.push(...function(e,t){let n=e.chart,r=e.source,i=e.rect,o=e.renderer,a=e.style;if(!n.component(r.component))return[];const s=n.findShapes(r.selector).filter(e=>e.key===r.component);return t({chart:n,settings:r.strategy.settings,nodes:s,rect:{x:0,y:0,width:i.width,height:i.height},renderer:o,style:a})}({chart:this.chart,rect:this.rect,renderer:this.renderer,source:e,style:this.style},Au[e.strategy.type]))}),t}};const Iu={layout:{size:1,direction:"ltr",scrollOffset:0},item:{show:!0,label:{fontSize:"12px",fontFamily:"Arial",fill:"#595959",wordBreak:"none",maxLines:2,maxWidth:136,lineHeight:1.2},shape:{type:"square",size:12}},title:{show:!0,text:void 0,anchor:"start",fontSize:"16px",fontFamily:"Arial",fill:"#595959",wordBreak:"none",maxLines:2,maxWidth:156,lineHeight:1.25}};function Lu(e){let t=e.x,n=void 0===t?0:t,r=e.y,i=e.item,o=e.globalMetrics,a=e.createSymbol,s=e.direction,l=void 0===s?"ltr":s,c=i.label.displayObject,d=i.label.bounds,f=i.symbol.meta;const h="rtl"===l;let p={x:h?n+o.maxLabelBounds.width:n+o.maxSymbolSize+o.spacing,y:r,width:o.maxLabelBounds.width,height:Math.max(o.maxSymbolSize,o.maxLabelBounds.height)},m=function(e,t,n){const r=Math.max(0,e.width-t),i=Math.max(0,e.height-t);return{x:e.x+t/2+n.align*r,y:e.y+t/2+n.justify*i}}({x:h?n+o.maxLabelBounds.width+o.spacing:n,y:r,width:o.maxSymbolSize,height:p.height},f.size,{align:void 0===f.align?.5:f.align,justify:void 0===f.justify?.5:f.justify});const g=a(u({},f,m));return delete g.collider,c.anchor=h?"end":"start",function(e,t,n){const r=n.textMetrics;if(e.height<r.height)return!1;const i=Math.max(0,e.width-r.width);t.baseline="text-before-edge";const o=Math.max(0,e.height-r.height);t.x=e.x+n.align*i,t.y=e.y+n.justify*o+.175*parseInt(t.fontSize,10)}(p,c,{textMetrics:d,fontSize:parseInt(c.fontSize,10),align:0,justify:.5}),{item:{type:"container",data:i.label.displayObject.data,children:[g,c],collider:{type:"rect",x:n,y:r,width:o.maxItemBounds.width,height:o.maxItemBounds.height}},metrics:p}}function Pu(e,t){const n=e.items.length,r=Math.ceil(n/t),i="horizontal"===e.layout.orientation?"width":"height",o="width"===i?"horizontal":"vertical";return e.globalMetrics.maxItemBounds[i]*r+(r-1)*e.layout.margin[o]}function Ru(e,t){let n,r,i,o,a=t.onScroll,s=void 0===a?()=>{}:a,l=null,c=0;const d={itemize:t=>{n=function(e,t){let n,r,i=e.resolved,o=e.dock,a=[],s=i.items.items,l=i.symbols.items,c=i.labels.items,d=0,f=0,h=0;for(let e=0;e<s.length;e++){if(!1===s[e].show)continue;const i=void 0!==c[e].text?c[e].text:c[e].data.label||"";n=u({},c[e],{type:"text",fontSize:"".concat(parseInt(c[e].fontSize,10),"px"),text:i,title:i}),r={symbol:{meta:l[e]},label:{displayObject:n,bounds:t.textBounds(n)}},a.push(r),d=Math.max(l[e].size,d),f=Math.max(r.label.bounds.width,f),h=Math.max(r.label.bounds.height,h)}return{items:a,globalMetrics:{spacing:8,maxSymbolSize:d,maxItemBounds:{height:Math.max(d,h),width:d+8+f},maxLabelBounds:{width:f,height:h}},layout:{margin:{vertical:void 0!==i.layout.item.vertical?i.layout.item.vertical:4,horizontal:void 0!==i.layout.item.horizontal?i.layout.item.horizontal:4},mode:i.layout.item.mode,size:i.layout.item.size,orientation:"top"===o||"bottom"===o?"horizontal":"vertical",direction:i.layout.item.direction,scrollOffset:i.layout.item.scrollOffset}}}(t,e.renderer),l=isNaN(n.layout.scrollOffset)?l:n.layout.scrollOffset},getItemsToRender:t=>{i=t.viewRect,c=d.getContentOverflow(i);const a=d.extent();l=Math.max(0,Math.min(l,c)),o=u({},i);const s="horizontal"===d.orientation()?"x":"y";return o[s]-=l,o["x"===s?"width":"height"]=a,function(e,t,n){let r=e.viewRect,i=n.itemized,o=n.create,a=void 0===o?Lu:o,s=n.parallels,l=n.createSymbol;const c=i.layout.direction,u=i.globalMetrics,d=i.items,f="horizontal"===i.layout.orientation;let h=0;const p=[],m=u.maxItemBounds.height,g=u.maxItemBounds.width,y=i.layout.margin.vertical+m,v=i.layout.margin.horizontal+g;let b=t.x,x=t.y,S=r.x-t.x;for(let e=0;e<d.length;e++){let n=a({y:x,x:"rtl"===c?r.x+S+r.width-g-(b-t.x):b,item:d[e],globalMetrics:u,direction:c,createSymbol:l});if((f&&b>=r.x-g||!f&&x>=r.y-m)&&p.push(n.item),h++,h>=s?(h=0,f?(b+=v,x=t.y):(x+=y,b=t.x)):f?x+=y:b+=v,!f&&x>r.y+r.height)break;if(f&&b>r.x+r.width)break}return p}(t,o,{itemized:n,parallels:r,createSymbol:e.symbol})},parallelize:(e,t)=>(r=function(e,t,n){const r=n.items.length,i="horizontal"===n.layout.orientation?"width":"height",o="width"===i?"horizontal":"vertical",a=n.globalMetrics.maxItemBounds[i]*r+(r-1)*n.layout.margin[o];let s=Math.ceil(a/e);if(null!=t){const e="horizontal"===n.layout.orientation?"height":"width",r="width"===e?"horizontal":"vertical",i=n.layout.margin[r]||4,o=Math.floor((t+i)/(i+n.globalMetrics.maxItemBounds[e]));s=Math.min(s,o)}const l=isNaN(n.layout.size)?1:n.layout.size;return Math.max(1,Math.min(s,l))}(e,t,n),r),hasContentOverflow:()=>{const e="horizontal"===n.layout.orientation?"width":"height";return Pu(n,r)>i[e]},getContentOverflow:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i;const t="horizontal"===n.layout.orientation?"width":"height";return Math.max(0,Pu(n,r)-e[t])},getNextSize:()=>{const e="horizontal"===n.layout.orientation?"width":"height",t="width"===e?"horizontal":"vertical";return n.globalMetrics.maxItemBounds[e]+n.layout.margin[t]},getPrevSize:()=>{const e="horizontal"===n.layout.orientation?"width":"height",t="width"===e?"horizontal":"vertical";return n.globalMetrics.maxItemBounds[e]+n.layout.margin[t]},hasNext:()=>"horizontal"===d.orientation()?i.x+i.width<o.x+o.width:i.y+i.height<o.y+o.height,hasPrev:()=>"horizontal"===d.orientation()?o.x<i.x:o.y<i.y,next:()=>{d.scroll(-d.getNextSize())},prev:()=>{d.scroll(d.getPrevSize())},scroll:e=>{const t=Math.max(0,Math.min(c,l-e));t!==l&&(l=t,s())},offset:()=>l,orientation:()=>n.layout.orientation,direction:()=>n.layout.direction,extent:()=>Pu(n,r),spread:()=>function(e,t){const n=t,r="horizontal"===e.layout.orientation?"height":"width",i="width"===r?"horizontal":"vertical";return e.globalMetrics.maxItemBounds[r]*n+(n-1)*e.layout.margin[i]}(n,r)};return d}function zu(e){return Object.keys(e).filter(t=>e[t]).join(" ")}const Fu={up:"▲",right:"▶",down:"▼",left:"◀"};function ju(e,t){let n=t.size,r=t.isActive,i=t.direction,o=t.nav,a={},s="";const l=t.attrs;o&&o.button&&("function"==typeof o.button.class?a=o.button.class({direction:i}):o.button.class&&(a=o.button.class),"function"==typeof o.button.content&&(s=o.button.content(e,{direction:i})),void 0!==o.button.tabIndex&&(l.tabindex=o.button.tabIndex));const c={width:"".concat(n,"px"),minWidth:"".concat(n,"px"),height:"".concat(n,"px")};return Object.keys(a).length||(c.border="0",c.background="none"),(!r||o&&o.disabled)&&(l.disabled="disabled"),e("button",u({class:zu(a),style:c},l),[s||e("span",{style:{pointerEvents:"none"}},[Fu[i]])])}function Bu(e){let t;const n={itemize:e=>{t=function(e){let t=e.dock;return{layout:{orientation:"top"===t||"bottom"===t?"vertical":"horizontal"},navigation:e.navigation}}(e)},render:r=>function(e,t,n,r){let i=t.rect,o=t.itemRenderer;if(!e||!e.renderArgs)return;e.size(i);const a=e.renderArgs[0],s="vertical"===n.layout.orientation,l="rtl"===o.direction(),c=o.hasNext(),u=o.hasPrev();if(!u&&!c)return void e.render([]);const d=s?["right","left"]:["down","up"];l&&s&&d.reverse();const f=[a("div",{style:{position:"relative",display:"flex","flex-direction":s?"column":"row","justify-content":"center",height:"100%",pointerEvents:"auto"},dir:l&&!s?"rtl":"ltr"},[ju(a,{size:32,isActive:c,direction:d[0],attrs:{"data-action":"next","data-component-key":r.settings.key},nav:n.navigation}),ju(a,{size:32,isActive:u,direction:d[1],attrs:{"data-action":"prev","data-component-key":r.settings.key},nav:n.navigation})])];e.render(f)}(n.renderer,r,t,e),extent:()=>32,spread:()=>64};return n}function Vu(e){let t;const n={itemize:n=>{t=function(e,t){let n=e.resolved;if(!1===n.title.item.show)return null;const r=u({},n.title.item,{type:"text"});if("rtl"===n.layout.item.direction&&(r.anchor&&"start"!==r.anchor?"end"===r.anchor&&(r.anchor="start"):r.anchor="end"),void 0===n.title.settings.text){const e=t.scale.data().fields;r.text=e&&e[0]?e[0].title():""}return{displayObject:r,bounds:t.renderer.textBounds(r)}}(n,e)},render:e=>{!function(e,t,n){let r=e.rect;if(!t)return;const i=[];if(t.size(r),n){const e={start:0,end:r.width,middle:r.width/2};i.push(u({},n.displayObject,{x:e[n.displayObject.anchor]||0,y:0,baseline:"text-before-edge",title:n.displayObject.text}))}t.render(i)}(e,n.renderer,t)},spread:()=>t?t.bounds.height:0,extent:()=>t?t.bounds.width:0};return n}function Hu(e,t,n,r){let i,o,a,s=r.itemRenderer,l=r.navigationRenderer,c=r.titleRenderer,d=r.isPreliminary,f=void 0!==d&&d,h=0;const p={x:t.spacing,y:t.spacing,width:e.width-2*t.spacing,height:e.height-2*t.spacing};if(i={x:p.x,y:p.y,width:p.width,height:c.spread()},"horizontal"===n){i={x:p.x,y:p.y,width:c.extent(),height:c.spread()};const e=p.width-i.width-(i.width?t.spacing:0),n=p.height;s.parallelize(e,f?void 0:n);const r=s.extent()>e?l.extent():0,u=s.spread(),d=r?l.spread():0;o={x:i.x+i.width+(i.width?t.spacing:0),y:p.y+Math.max(0,(d-u)/2),width:p.width-r-i.width-(r?t.spacing:0)-(i.width?t.spacing:0),height:n},a={x:o.x+o.width+(r?t.spacing:0),y:p.y,width:r,height:p.height},i.y=o.y;"rtl"===s.direction()&&(a.x=p.x,o.x=a.x+a.width+(a.width?t.spacing:0),i.x=o.x+o.width+(i.width?t.spacing:0)),h=Math.max(i.height,d,s.spread())}else{const e=p.height-i.height-(i.height?t.spacing:0),n=p.width;s.parallelize(e,f?void 0:n);const r=s.extent()>e?l.extent():0;a={x:p.x,y:p.y+p.height-r,width:p.width,height:r},o={x:p.x,y:i.y+i.height+(i.height?t.spacing:0),width:p.width,height:p.height-i.height-(i.height?t.spacing:0)-a.height-(a.height?t.spacing:0)},h=Math.max(c.extent(),r?l.spread():0,s.spread())}return o=u({},e,{x:e.x+o.x,y:e.y+o.y,width:o.width,height:o.height}),a.x+=e.x,a.y+=e.y,i.x+=e.x,i.y+=e.y,{title:u({},e,i),content:u({},e,o),navigation:u({},e,a),orientation:n,preferredSize:h}}function $u(e){e.state.resolved=function(e){const t=e.scale.domain();let n={items:[]};const r=e.settings.layout.dock;if("threshold-color"===e.scale.type){const i=e.scale.data().fields[0];let o=e=>String(e);e.settings.formatter?o=e.chart.formatter(e.settings.formatter):i&&(o=i.formatter());for(let e=0;e<t.length-1;e++){const r={value:t[e],label:"".concat(o(t[e])," - < ").concat(o(t[e+1]))};i&&(r.source={field:i.id()}),n.items.push(r)}"vertical"==("top"===r||"bottom"===r?"horizontal":"vertical")&&n.items.reverse()}else{const r=e.scale.labels?e.scale.labels():null;n.items=t.map((t,n)=>{const i=e.scale.datum?u({},e.scale.datum(t)):{value:t};return i.value=t,e.scale.label?i.label=e.scale.label(t):r&&(i.label=r[n]),i})}const i=e.resolver.resolve({data:{fields:e.scale.data().fields},defaults:u(!0,{},Iu.title,e.style.title),settings:e.settings.settings.title}),o=e.resolver.resolve({data:{fields:e.scale.data().fields},defaults:Iu.layout,settings:e.settings.settings.layout}),a=e.resolver.resolve({data:n,defaults:u(!0,{},Iu.item.label,e.style.item.label),settings:(e.settings.settings.item||{}).label}),s=u(!0,{},(e.settings.settings.item||{}).shape);void 0===s.fill&&e.settings.scale&&(s.fill={scale:e.settings.scale});const l=e.resolver.resolve({data:n,defaults:u(!0,{},Iu.item.shape,e.style.item.shape),settings:s}),c=e.resolver.resolve({data:n,defaults:u(!0,{},{show:Iu.item.show}),settings:{show:(e.settings.settings.item||{}).show}});function d(e,n){let r=e.data.value,i=t[n+1];e.data.value=[r,i]}"threshold-color"===e.scale.type&&("vertical"==("top"===r||"bottom"===r?"horizontal":"vertical")?(c.items.reverse().forEach(d),c.items.reverse()):c.items.forEach(d));return{title:i,labels:a,symbols:l,items:c,layout:o}}(e),e.titleRenderer.itemize({resolved:e.state.resolved,dock:e.settings.layout.dock||"center"}),e.itemRenderer.itemize({resolved:e.state.resolved,dock:e.settings.layout.dock||"center"}),e.navigationRenderer.itemize({resolved:e.state.resolved,dock:e.settings.layout.dock||"center",navigation:e.settings.settings.navigation}),e.state.display={spacing:8}}function Wu(e){const t=e.rect,n=e.settings,r=e.state,i=e.itemRenderer,o=e.navigationRenderer,a=e.titleRenderer,s=n.layout.dock,l="top"===s||"bottom"===s?"horizontal":"vertical",c=Hu(t,r.display,l,{itemRenderer:i,navigationRenderer:o,titleRenderer:a});e.renderer.size(c.content);let d=i.getItemsToRender({viewRect:u({},c.content,{x:0,y:0})});return o.render({rect:c.navigation,itemRenderer:i}),a.render({rect:c.title}),e.state.views={layout:c},d}const Uu={require:["chart","settings","renderer","update","resolver","registries","symbol"],defaultSettings:{settings:{},style:{item:{label:"$label",shape:"$shape"},title:"$title"}},mounted(e){e&&e.parentNode&&(this.navigationRenderer.renderer.appendTo(e.parentNode),this.titleRenderer.renderer.appendTo(e.parentNode),e.parentNode.insertBefore(this.navigationRenderer.renderer.element(),e),e.parentNode.insertBefore(this.titleRenderer.renderer.element(),e)),this.navigationRenderer.render({rect:this.state.views.layout.navigation,itemRenderer:this.itemRenderer}),this.titleRenderer.render({rect:this.state.views.layout.title})},beforeUnmount(){this.navigationRenderer.renderer.clear(),this.titleRenderer.renderer.clear()},on:{panstart(){if(this.state.interaction.started)return;this.itemRenderer.getContentOverflow()&&(this.state.interaction.started=!0,this.state.interaction.delta=0)},panmove(e){if(!this.state.interaction.started)return;const t="horizontal"===this.itemRenderer.orientation()?("rtl"===this.itemRenderer.direction()?-1:1)*e.deltaX:e.deltaY;this.itemRenderer.scroll(t-this.state.interaction.delta),this.state.interaction.delta=t},panend(){this.state.interaction.started=!1},scroll(e){this.itemRenderer.scroll(-e)},next(){this.itemRenderer.next()},prev(){this.itemRenderer.prev()}},created(){this.state={interaction:{}},this.onScroll=()=>{const e=Wu(this);this.update(e)},this.itemRenderer=Ru(this,{onScroll:this.onScroll}),this.navigationRenderer=Bu(this),this.titleRenderer=Vu(this),this.navigationRenderer.renderer=this.registries.renderer("dom")(),this.titleRenderer.renderer=this.registries.renderer(this.settings.renderer)(),$u(this)},preferredSize(e){return function(e,t){let n=0;const r=e.settings.layout.dock||"center",i="top"===r||"bottom"===r?"horizontal":"vertical",o=e.state.display,a=Hu(t.inner,o,i,{itemRenderer:e.itemRenderer,navigationRenderer:e.navigationRenderer,titleRenderer:e.titleRenderer,isPreliminary:!0});return n+=o.spacing,n+=a.preferredSize,n+=o.spacing,n}(this,e)},beforeUpdate(){$u(this)},render(){return Wu(this)},beforeDestroy(){this.navigationRenderer.renderer.destroy(),this.titleRenderer.renderer.destroy()},additionalElements(){return[this.titleRenderer.renderer.element(),this.navigationRenderer.renderer.element()]},_DO_NOT_USE_getInfo(){return{offset:this.itemRenderer.offset()}}};function Yu(e,t){let n=0;const r=e.state.isVertical?"justify":"align",i=e.state.isVertical?"y":"x",o=e.state.isVertical?"height":"width",a=e.state.isVertical?"requiredHeight":"requiredWidth";n=e.state.rect[o]-e.state.legend.length()-e.state.title[a](),n*=Math.min(1,Math.max(e.stgns[r],0)),t[i]+=n}function Ku(e,t,n){const r=n[e];return"object"==typeof r?-1!==r.valid.indexOf(t)?t:r.default:n.default}function Gu(e){return Ku(e.layout.dock,e.settings.title.anchor,{left:{valid:["top"],default:"top"},right:{valid:["top"],default:"top"},top:{valid:["left","right"],default:"left"},bottom:{valid:["left","right"],default:"left"},default:"top"})}function Xu(e,t){const n={x:0,y:0,width:0,height:0},r=e.stgns.padding;return n.x=r.left,n.y=r.top,n.width=t.width-r.left-r.right,n.height=t.height-r.top-r.bottom,n}function Ju(e){const t="top"!==e.settings.layout.dock&&"bottom"!==e.settings.layout.dock,n=e.stgns.title,r=e.chart.scale(e.stgns.fill),i=e.chart.scale(e.stgns.major),o=function(e,t){const n=t.domain();let r=n,i=e.stgns.tick.label;!i&&e.formatter?i=e.formatter:!i&&t.data().fields&&(i=t.data().fields[0].formatter()),"function"==typeof i&&(r=n.map(i).map(String));const o=n.map((n,i)=>{const o=r[i];return{value:n,label:o,pos:t.norm(parseFloat(n,10)),textMetrics:e.renderer.measureText({text:o,fontSize:e.stgns.tick.fontSize,fontFamily:e.stgns.tick.fontFamily})}});return o}(e,i),a=Ku((s=e.settings).layout.dock,s.settings.tick.anchor,{left:{valid:["left","right"],default:"left"},right:{valid:["left","right"],default:"right"},top:{valid:["top","bottom"],default:"top"},bottom:{valid:["top","bottom"],default:"bottom"},default:"right"});var s;if(void 0===n.text){const e=i.data().fields;n.text=e&&e[0]?e[0].title():""}const l=e.renderer.measureText({text:n.text,fontSize:n.fontSize,fontFamily:n.fontFamily}),c=e.renderer.textBounds({text:n.text,fontSize:n.fontSize,fontFamily:n.fontFamily,maxLines:n.maxLines,maxWidth:n.maxLengthPx,wordBreak:n.wordBreak,hyphens:n.hyphens,lineHeight:n.lineHeight}),u={isVertical:t,nodes:[],title:{anchor:Gu(e.settings),textMetrics:l,textBounds:c,requiredWidth:()=>{if(!n.show)return 0;let e=c.width,r=n.maxLengthPx;return t||(e+=n.padding,r+=n.padding),Math.min(e,r,u.rect.width)},requiredHeight:()=>{if(!n.show)return 0;let e=c.height;return t&&(e+=n.padding),Math.min(e,u.rect.height)}},ticks:{values:o,anchor:a,length:Math.min(Math.max(...o.map(e=>e.textMetrics.width)),e.stgns.tick.maxLengthPx),requiredHeight:()=>"top"===a?Math.max(...u.ticks.values.map(e=>e.textMetrics.height))+e.stgns.tick.padding:0,height:Math.max(...o.map(e=>e.textMetrics.height))},legend:{fillScale:r,majorScale:i,length:()=>{const n=t?"height":"width",r=t?"requiredHeight":"requiredWidth",i=Math.min(u.rect[n],u.rect[n]*e.stgns.length)-u.title[r]();return Math.max(0,Math.min(i,e.stgns.maxLengthPx))}}};return u}const Zu={require:["chart","settings","renderer"],defaultSettings:{layout:{displayOrder:0,dock:"right"},settings:{size:15,length:.5,maxLengthPx:250,align:.5,justify:0,padding:{left:5,right:5,top:5,bottom:5},tick:{label:null,fill:"#595959",fontSize:"12px",fontFamily:"Arial",maxLengthPx:100,anchor:null,padding:5},title:{show:!0,text:void 0,fill:"#595959",fontSize:"12px",fontFamily:"Arial",maxLengthPx:100,padding:5,maxLines:2,wordBreak:"none",lineHeight:1.2,hyphens:"auto",anchor:null}}},preferredSize(e){const t=this.state;t.rect=Xu(this,e.inner);let n=this.stgns.size;const r=t.isVertical?this.stgns.padding.left+this.stgns.padding.right:this.stgns.padding.top+this.stgns.padding.bottom;n+=r;const i=Math.max(e.inner.width,e.inner.height);if("left"===t.ticks.anchor||"right"===t.ticks.anchor){const e=t.ticks.values.reduce((e,t)=>e+t.textMetrics.height,0);if(e>this.state.legend.length())return i;n+=t.ticks.length}else{if(t.ticks.length>this.state.legend.length())return i;n+=Math.max(...t.ticks.values.map(e=>e.textMetrics.height))}return n+=this.stgns.tick.padding,this.stgns.title.show&&(n="left"===t.title.anchor||"right"===t.title.anchor?Math.max(t.title.textBounds.height+r,n):Math.max(n,t.title.requiredWidth()+r)),this.state.preferredSize=n,n},created(){this.stgns=this.settings.settings,this.state=Ju(this)},beforeUpdate(e){this.stgns=e.settings.settings,this.state=Ju(this)},beforeRender(e){if(this.state.nodes=[],this.state.rect=Xu(this,e.size),this.stgns.title.show){const e=function(e){const t=e.state,n=e.stgns,r="left"===t.ticks.anchor,i="top"===t.ticks.anchor;let o=t.rect.x,a=t.rect.y,s="start";"left"===t.title.anchor?(o+=t.title.requiredWidth()-n.title.padding,a+=t.title.textMetrics.height,a+=i?t.rect.height-t.title.textBounds.height:0,s="end"):"right"===t.title.anchor?(o+=t.legend.length(),o+=n.title.padding,a+=t.title.textMetrics.height,a+=i?t.rect.height-t.title.textBounds.height:0):"top"===t.title.anchor&&(o+=r?t.rect.width:0,a+=t.title.textMetrics.height,s=r?"end":"start");const l={tag:"legend-title",type:"text",x:o,y:Math.min(a,t.rect.y+t.rect.height),text:n.title.text,fill:n.title.fill,fontSize:n.title.fontSize,fontFamily:n.title.fontFamily,maxWidth:n.title.maxLengthPx,maxLines:n.title.maxLines,wordBreak:n.title.wordBreak,hyphens:n.title.hyphens,lineHeight:n.title.lineHeight,anchor:s,title:n.title.text};return Yu(e,l),l}(this);this.state.nodes.push(e)}const t=function(e){const t=e.state.legend.fillScale,n=e.state.legend.majorScale,r=t.domain().map(e=>({type:"stop",color:t(e),offset:Math.min(1,Math.max(0,n.norm(e)))}));return r.sort((e,t)=>e.offset-t.offset)}(this),n=function(e,t){const n=e.state,r=e.stgns,i=n.rect;let o=i.x,a=i.y,s=n.isVertical?r.size:n.legend.length(),l=n.isVertical?n.legend.length():r.size;"left"===n.ticks.anchor?o+=n.rect.width-r.size:"top"===n.ticks.anchor&&(a+=n.rect.height-r.size),"top"===n.title.anchor?a+=n.title.requiredHeight():"left"===n.title.anchor&&(o+=n.title.requiredWidth());const c={type:"rect",x:o,y:a,width:s,height:l,fill:{type:"gradient",stops:t,degree:n.isVertical?90:180}};return Yu(e,c),c}(this,t),r=function(e,t){const n=e.state,r=e.stgns;let i="start";const o={type:"rect",x:t.x,y:t.y,width:n.isVertical?0:t.width,height:n.isVertical?t.height:0,fill:"transparent"},a=n.ticks.values.map(a=>{let s=0,l=0,c=0,u="alphabetical";return n.isVertical?(l=t.y+t.height*a.pos,u=0===a.pos?"text-before-edge":"text-after-edge"):s=t.x+t.width*a.pos,"right"===n.ticks.anchor?(s=t.x+r.size+r.tick.padding,o.x=t.x+t.width):"left"===n.ticks.anchor?(s=t.x-r.tick.padding,i="end"):"top"===n.ticks.anchor?(l=t.y-r.tick.padding,c-=.25*a.textMetrics.height,i=0===a.pos?"start":"end"):"bottom"===n.ticks.anchor&&(l=t.y+t.height+r.tick.padding,c=.8*a.textMetrics.height,i=0===a.pos?"start":"end",o.y=t.y+t.height),{type:"text",x:s,y:l,dx:0,dy:c,text:a.label,fontSize:r.tick.fontSize,fontFamily:r.tick.fontFamily,fill:r.tick.fill,maxWidth:n.isVertical?r.tick.maxLengthPx:Math.min(r.tick.maxLengthPx,n.legend.length()/2),anchor:i,textBoundsFn:e.renderer.textBounds,title:a.label,baseline:u}});return{type:"container",id:"legend-seq-ticks",children:[...a,o]}}(this,n),i={id:"legend-seq-target",type:"container",children:[n,r]};this.state.nodes.push(i)},render(){return this.state.nodes}};const Qu={coordinates:{minor:.5,major:.5,layerId:0,defined:!0},layers:{curve:"linear",show:!0,line:{stroke:"#ccc",strokeWidth:1,strokeLinejoin:"miter",strokeDasharray:void 0,opacity:1,show:!0,showMinor0:!0},area:{fill:"#ccc",opacity:.8,show:!0}}};function ed(e,t){let n=t.generatorType,r=t.item,i=t.data,o=t.major,a=t.minor,s=t.layerObj,l=t.stngs,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const u={type:"path",points:e,generatorType:n,major:o,minor:a,layerObj:s,stngs:l,opacity:r.opacity,stroke:r.stroke,strokeWidth:r.strokeWidth,strokeLinejoin:r.strokeLinejoin,fill:c||r.fill,data:i};return r.strokeDasharray&&(u.strokeDasharray=r.strokeDasharray),u}function td(e){const t=function(e){let t=e.data,n=e.stngs,r=e.rect,i=e.resolver,o=e.style,a=e.domain;const s=r.width,l=r.height,c=i.resolve({data:t,defaults:Qu.coordinates,settings:n.coordinates||{},scaled:{major:"vertical"===n.orientation?l:s,minor:"vertical"===n.orientation?s:l}}),d=!n.connect&&a.length>2&&("function"==typeof n.coordinates.layerId||"object"==typeof n.coordinates.layerId),f={};let h=0;for(let e=0;e<c.items.length;e++){let t=c.items[e],n=t.layerId;if(d){const e=f[n]?f[n].items[f[n].items.length-1]:null,r=e?a.indexOf(e.data.major?e.data.major.value:e.data.value):null;e&&a.indexOf(t.data.major?t.data.major.value:t.data.value)-1!==r&&f[n].items.push({dummy:!0})}f[n]=f[n]||{order:h++,id:n,items:[],dataItems:[],consumableData:{}},f[n].dataItems.push(t.data),f[n].items.push(t)}const p=Object.keys(f).map(e=>(f[e].consumableData=m({points:f[e].dataItems},f[e].dataItems[0]),f[e])),g={items:p.map(e=>e.consumableData)},y=n.layers||{};return{coordinates:c,metaLayers:p,layers:i.resolve({data:g,defaults:{curve:Qu.layers.curve,show:Qu.layers.show},settings:{curve:y.curve,show:y.show}}),lines:i.resolve({data:g,defaults:u({},Qu.layers.line,o.line),settings:y.line}),areas:i.resolve({data:g,defaults:u({},Qu.layers.area,o.area),settings:y.area})}}(e),n=t.metaLayers,r=t.coordinates,i=t.layers,o=t.lines,a=t.areas,s=[];return n.forEach((t,n)=>{const l=i.items[n];if(!1===l.show)return;l.datum=l.data,l.data=[],l.id=t.id;const c=[],u=[];let d,f;for(let n=0;n<t.items.length;n++){if(d=t.items[n],f=d.data,!d.dummy){if(isNaN(d.major))continue;e.missingMinor0&&(d.minor0=r.settings.minor.scale?r.settings.minor.scale(f.minor0?f.minor0.value:0):0),isNaN(d.minor)||c.push(d.minor),l.data.push(d.data)}u.push(d)}const h=c.sort((e,t)=>e-t)[Math.floor((c.length-1)/2)];s.push({layerObj:l,lineObj:o.items[n],areaObj:a.items[n],median:h,points:u,consumableData:t.consumableData})}),s}const nd={require:["chart","resolver"],defaultSettings:{style:{area:"$shape",line:"$shape-outline"}},created(){},render(e){let t=e.data;const n=this.rect,r=n.width,i=n.height;this.stngs=this.settings.settings||{};const o=!this.stngs.coordinates||void 0===this.stngs.coordinates.minor0,a=td({data:t,stngs:this.stngs,rect:this.rect,resolver:this.resolver,style:this.style,missingMinor0:o,domain:this.stngs.coordinates&&this.stngs.coordinates.major&&this.stngs.coordinates.major.scale?this.chart.scale(this.stngs.coordinates.major.scale).domain():[]});if(this.stngs.layers&&this.stngs.layers.sort){const e=a.map(e=>({id:e.layerObj.id,data:e.layerObj.data})).sort(this.stngs.layers.sort).map(e=>e.id);a.sort((t,n)=>e.indexOf(t.layerObj.id)-e.indexOf(n.layerObj.id))}else a.sort((e,t)=>e.median-t.median);return function(e,t){let n=t.width,r=t.height,i=t.missingMinor0,o=t.stngs;const a=[],s=o.layers||{};return e.forEach(e=>{const t=e.lineObj,l=e.layerObj,c=e.areaObj,d=e.points;let f={size:r,p:"y"},h={size:n,p:"x"};if("vertical"===o.orientation){const e=u(!0,{},h);h=u(!0,{},f),f=u(!0,{},e)}s.area&&!1!==c.show&&a.push(ed(d,{data:e.consumableData,item:c,generatorType:"area",major:h,minor:f,layerObj:l,stngs:o})),t&&!1!==t.show&&(a.push(ed(d,{data:e.consumableData,item:t,generatorType:"line".concat(f.p.toUpperCase(),"1"),major:h,minor:f,layerObj:l,stngs:o},"none")),!i&&s.area&&!1!==c.show&&!1!==t.showMinor0&&a.push(ed(d,{data:e.consumableData,item:t,generatorType:"line".concat(f.p.toUpperCase(),"0"),major:h,minor:f,layerObj:l,stngs:o},"none")))}),a}(a,{width:r,height:i,missingMinor0:o,stngs:this.stngs})}};function rd(e,t){let n,r,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];"object"==typeof t.center?(n=t.center.x,r=t.center.y):(n=t.clientX,r=t.clientY);const o=n-e.state.boundingRect.left,a=r-e.state.boundingRect.top;return{x:i?Math.max(0,Math.min(o,e.rect.width)):o,y:i?Math.max(0,Math.min(a,e.rect.height)):a}}function id(e,t){return{x:t.x+e.rect.x,y:t.y+e.rect.y}}function od(e,t){const n=Math.min(e.x,t.x),r=Math.min(e.y,t.y);return{x:n,y:r,width:Math.max(e.x,t.x)-n,height:Math.max(e.y,t.y)-r}}const ad={require:["chart","renderer"],defaultSettings:{layout:{displayOrder:99},settings:{brush:{components:[]}},style:{area:"$selection-area-target"}},on:{areaStart(e){this.start(e)},areaMove(e){this.move(e)},areaEnd(e){this.end(e)},areaCancel(){this.cancel()}},created(){this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1}},preferredSize:()=>0,render(){},start(e){this.state.boundingRect=this.renderer.element().getBoundingClientRect();const t=rd(this,e,!1);Pa({x:0,y:0,width:this.rect.width,height:this.rect.height},t)&&(this.state.brushConfig=this.settings.settings.brush.components.map(e=>({key:e.key,contexts:e.contexts,data:e.data,action:e.action||"set"})),this.state.start=rd(this,e),this.state.active=!0)},move(e){var t;this.state.active&&(this.state.end=rd(this,e),function(e){if(e.state.active){const t=id(e,e.state.start),n=id(e,e.state.end),r=e.chart.shapesAt(od(t,n),{components:e.state.brushConfig});e.chart.brushFromShapes(r,{components:e.state.brushConfig})}}(this),(t=this).renderer.render([u({type:"rect"},od(t.state.start,t.state.end),t.style.area)]))},end(){this.state.active&&(this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1},this.renderer.render([]))},cancel(){this.state.active&&(!function(e,t){e.brushConfig.forEach(e=>{Array.isArray(e.contexts)&&e.contexts.forEach(e=>{t.brush(e).end()})})}(this.state,this.chart),this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1},this.renderer.render([]))}};function sd(e,t,n){let r=n.renderer,i=n.style,o=n.props,a=n.h;const s=function(e,t){return{tooltip:"function"==typeof e.tooltipClass?e.tooltipClass({dock:t.dock}):e.tooltipClass,content:"function"==typeof e.contentClass?e.contentClass({dock:t.dock}):e.contentClass,arrow:"function"==typeof e.arrowClass?e.arrowClass({dock:t.dock}):e.arrowClass}}(o,t),l=function(e,t,n,r){return r.content({h:e,style:n,data:t})}(a,e,i,o),c=a("div",{dir:o.direction,class:zu(u({"pic-tooltip":!0},s.tooltip)),style:u({position:"relative",display:"inline-block"},t.computedTooltipStyle)},a("div",{style:i.content,class:zu(u({"pic-tooltip-content":!0},s.content))},l),a("div",{class:zu(u({"pic-tooltip-arrow":!0},s.arrow)),style:u({},i.arrow,i["arrow-".concat(t.dock)],t.computedArrowStyle)}));return r.render(c),r.element().children[0]}function ld(e){let t=e.defaultDuration,n=e.defaultDelay,r=null,i=null,o=!1;const a=function(){const e=function(){},t={pending:[],debounced:[],active:[],cancelled:[],rejected:[],fulfilled:[]};let n;return e.set=e=>{n=e,t[n].forEach(t=>t(e))},e.on=(e,n)=>{Array.isArray(e)?e.forEach(e=>t[e].push(n)):t[e].push(n)},e.destroy=()=>{Object.keys(t).forEach(e=>{t[e].length=0})},e}(),s=function(){},l=()=>{r=null,i=null,o=!1,a.set("fulfilled")};return s.invoke=function(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n;r&&(clearTimeout(r),a.set("debounced")),a.set("pending"),r=setTimeout(()=>{e(),o=!0,r=null,a.set("active")},c),s>0&&(i&&clearTimeout(i),i=setTimeout(l,s+Math.max(c,0)))},s.clear=()=>{o?a.set("cancelled"):r&&(clearTimeout(r),a.set("rejected")),i&&clearTimeout(i),r=null,i=null,o=!1},s.on=(e,t)=>{a.on(e,t)},s.destroy=()=>{s.clear(),a.destroy()},s}function cd(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return{left:"translate(-100%,-50%) translateX(".concat(-e,"px)"),right:"translate(".concat(e,"px, -50%)"),top:"translate(-50%, -100%) translateY(".concat(-e,"px)"),bottom:"translate(-50%, ".concat(e,"px)"),inside:"translate(-50%, -50%)"}}function ud(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return{left:{x:-e-n,y:-t/2},right:{x:n,y:-t/2},top:{x:-e/2,y:-t-n},bottom:{x:-e/2,y:n},inside:{x:-e/2,y:-t/2}}}function dd(e,t){const n=e>0?"-":"+";return e=Math.abs(e),void 0===t&&(t=e),{left:{left:"100%",top:"calc(50% ".concat(n," ").concat(e,"px)"),borderWidth:"".concat(t,"px")},right:{left:"".concat(2*-e,"px"),top:"calc(50% ".concat(n," ").concat(e,"px)"),borderWidth:"".concat(t,"px")},top:{left:"calc(50% ".concat(n," ").concat(e,"px)"),top:"100%",borderWidth:"".concat(t,"px")},bottom:{left:"calc(50% ".concat(n," ").concat(e,"px)"),top:"".concat(2*-e,"px"),borderWidth:"".concat(t,"px")},inside:{left:"0px",top:"0px",borderWidth:"0px"}}}function fd(e,t,n,r,i,o){const a=t+o.x,s=n+o.y,l=i;return!(a<0||s<0)&&!(a+r>e.width||s+l>e.height)}function hd(e){let t=e.area,n=e.vx,r=e.vy,i=e.width,o=e.height,a=e.offset;const s=n+a.x,l=r+a.y,c=i,u=o;let d=s<0?-s:0,f=l<0?-l:0;return d+=s+c>t.width?-(s+c-t.width):0,f+=l+u>t.height?-(l+u-t.height):0,{x:d,y:f}}function pd(e){let t=e.options,n=e.pointer,r=e.width,i=e.height,o=e.dockOrder,a=e.x,s=e.y;const l=n.targetBounds,c=cd(t.offset),u=c[t.dock];if(u)return{computedTooltipStyle:{left:"".concat(a,"px"),top:"".concat(s,"px"),transform:u},computedArrowStyle:dd(t.offset)[t.dock],dock:t.dock};const d={width:"target"===t.area?l.width:window.innerWidth,height:"target"===t.area?l.height:window.innerHeight},f=ud(r,i,t.offset),h=[],p="target"===t.area?a:l.left+a,m="target"===t.area?s:l.top+s;for(let e=0;e<o.length;e+=1){const n=o[e],l=hd({area:d,vx:p,vy:m,width:r,height:i,offset:f[n]}),u={left:"".concat(a,"px"),top:"".concat(s,"px"),transform:c[n]},g=dd(t.offset)[n];0!==l.x&&(u.width="".concat(r-20-Math.abs(l.x),"px"),"top"!==n&&"bottom"!==n||(u.left="".concat(a+l.x,"px"),g.left="calc(50% ".concat(l.x>0?"-":"+"," ").concat(Math.abs(l.x),"px)")));const y={computedTooltipStyle:u,computedArrowStyle:g,dock:n,rect:{width:r,height:i}};if(0===l.x&&0===l.y)return y;y.offset=l,h.push(y)}return h.sort((e,t)=>Math.abs(e.offset.x)-Math.abs(t.offset.x)),h[0]}function md(e,t,n){const r=e.key?n.component(e.key):n.componentsFromPoint({x:t.clientX,y:t.clientY})[0];if(!r)return{x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1}};const i=r.rect;return u({scaleRatio:i.scaleRatio},i.computedInner)}const gd={bounds:function(e){let t=e.resources,n=e.nodes,r=e.pointer,i=e.width,o=e.height,a=e.options;const s=r.targetBounds,l=t.getNodeBoundsRelativeToTarget(n[0]),c=l.x,u=l.y,d=l.width,f=l.height,h={left:{x:c,y:u+f/2},right:{x:c+d,y:u+f/2},top:{x:c+d/2,y:u},bottom:{x:c+d/2,y:u+f},inside:{x:c+d/2,y:u+f/2}},p=cd(a.offset),m=p[a.dock];if(m)return{computedTooltipStyle:{left:"".concat(h[a.dock].x,"px"),top:"".concat(h[a.dock].y,"px"),transform:m},computedArrowStyle:dd(a.offset)[a.dock],dock:a.dock};const g={width:"target"===a.area?s.width:window.innerWidth,height:"target"===a.area?s.height:window.innerHeight},y=ud(i,o,a.offset),v=["top","left","right","bottom","inside"];for(let e=0;e<v.length;e+=1){const t=v[e];if(fd(g,"target"===a.area?h[t].x:s.left+h[t].x,"target"===a.area?h[t].y:s.top+h[t].y,i,o,y[t]))return{computedTooltipStyle:{left:"".concat(h[t].x,"px"),top:"".concat(h[t].y,"px"),transform:p[t]},computedArrowStyle:dd(a.offset)[t],dock:t}}const b=function(e){let t=e.options,n=e.docks,r=e.dockOffsets,i=e.targetBounds,o=e.area,a=e.width;const s="top",l="target"===t.area?n[s].x:i.left+n[s].x,c=("target"===t.area?n[s].y:(i.top,n[s].y),r[s]),u=l+c.x,d=(c.y,a);let f=n.top.x;return u<0&&u+d>o.width||(u<0?f-=u:u+d>o.width&&(f-=u+d-o.width)),f}({options:a,docks:h,dockOffsets:y,targetBounds:s,area:g,width:i});return{computedTooltipStyle:{left:"".concat(b,"px"),top:"".concat(h.top.y,"px"),transform:p.top},computedArrowStyle:dd(a.offset+b-h.top.x,a.offset).top,dock:"top"}},pointer:function(e){let t=e.options,n=e.pointer,r=e.width,i=e.height;return pd({x:n.x,y:n.y,pointer:n,width:r,height:i,options:t,dockOrder:["top","left","right","bottom"]})},slice:function(e){let t=e.options,n=e.pointer,r=e.width,i=e.height,o=e.nodes,a=e.resources;const s=o[0],l=n.dx,c=n.dy,u=a.getComponentBoundsFromNode(s),d=l+u.x+u.width/2,f=c+u.y+u.height/2,h=s.desc.slice,p=h.start,m=h.end,g=h.outerRadius,y=(p+m)/2-Math.PI/2,v=2*Math.PI,b=(y%v+v)%v;let x=["top","left","right","bottom"];return"auto"===t.dock&&(x=b<=Math.PI/4||b>=7*Math.PI/4?["right","top","bottom","left"]:b<=3*Math.PI/4?["bottom","left","right","top"]:b<=5*Math.PI/4?["left","top","bottom","right"]:["top","left","right","bottom"]),pd({x:d+g*u.scaleRatio.x*Math.cos(b),y:f+g*u.scaleRatio.y*Math.sin(b),pointer:n,width:r,height:i,options:t,dockOrder:x})}};function yd(e,t){let n=e.width,r=e.height,i=t.chart,o=t.state,a=t.props;const s={resources:{formatter:i.formatter,scale:i.scale,component:i.component,getComponentBoundsFromNode:e=>md(e,o.pointer,i),getNodeBoundsRelativeToTarget:e=>function(e,t,n){const r=md(e,t,n),i=e.bounds;return{x:r.x+t.dx+i.x,y:r.y+t.dy+i.y,width:i.width,height:i.height}}(e,o.pointer,i)},nodes:o.activeNodes,pointer:o.pointer,width:n,height:r},l=typeof a.placement;if("object"===l&&"function"==typeof a.placement.fn)return a.placement.fn(s);let c={type:"pointer",offset:8,dock:"auto",area:"viewport"};"function"===l&&(c=u(c,a.placement(s))),"object"===l&&gd[a.placement.type]?c=u(c,a.placement):"string"===l&&gd[a.placement]&&(c=u(c,{type:a.placement})),s.options=c;const d=gd[c.type](s);let f=s.resources.getComponentBoundsFromNode(s.nodes[0]),h=f.x,p=f.y,m=f.width,g=f.height;return h+=s.pointer.dx,m+=h,p+=s.pointer.dy,g+=p,d.computedTooltipStyle.left="".concat(Math.min(Math.max(0,h,parseFloat(d.computedTooltipStyle.left)),m),"px"),d.computedTooltipStyle.top="".concat(Math.min(Math.max(0,p,parseFloat(d.computedTooltipStyle.top)),g),"px"),d}let vd;function bd(){vd=null}const xd={duration:8e3,delay:500,filter:e=>e.filter(e=>e.data&&void 0!==e.data.value),extract:e=>e.node.data.value,content:e=>{let t=e.h;return e.data.map(e=>t("div",{},e))},isEqual:(e,t)=>e.length&&e.length===t.length&&e.every((e,n)=>t[n]&&JSON.stringify(e.data)===JSON.stringify(t[n].data)),placement:{type:"pointer",dock:"auto",offset:8,area:"viewport"},tooltipClass:{},contentClass:{},arrowClass:{},direction:"ltr",appendTo:void 0,beforeShow:void 0,afterShow:void 0,beforeHide:void 0,onHide:void 0,afterHide:void 0};const Sd={require:["chart","renderer"],defaultSettings:{settings:xd,style:{tooltip:{},content:{backgroundColor:"$gray-25",color:"$font-color--inverted",fontFamily:"$font-family",fontSize:"$font-size",lineHeight:"$line-height",borderRadius:"4px",padding:"8px",opacity:.9},arrow:{position:"absolute",width:"0px",height:"0px",borderStyle:"solid",color:"$gray-25",opacity:.9},"arrow-bottom":{borderTopColor:"transparent",borderLeftColor:"transparent",borderRightColor:"transparent"},"arrow-top":{borderBottomColor:"transparent",borderLeftColor:"transparent",borderRightColor:"transparent"},"arrow-right":{borderTopColor:"transparent",borderLeftColor:"transparent",borderBottomColor:"transparent"},"arrow-left":{borderTopColor:"transparent",borderBottomColor:"transparent",borderRightColor:"transparent"}}},renderer:"dom",on:{hide(){this.hide()},show(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.show(e,t)},prevent(e){this.prevent(e)}},hide(){this.dispatcher.clear(),this.state.activeNodes=[],this.state.pointer={}},show(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.nodes,i=n.duration,o=n.delay;!this.state.prevent&&this.state.targetElement&&(this.state.pointer=function(e,t){let n=t.chart,r=t.state,i=0,o=0;e.center?(i+=e.center.x,o+=e.center.y):(i+=e.clientX,o+=e.clientY);const a=n.element.getBoundingClientRect(),s=r.targetElement.getBoundingClientRect(),l=i,c=o,u=a.left-s.left,d=a.top-s.top,f=i-a.left,h=o-a.top;return i-=s.left,o-=s.top,{x:i,y:o,dx:u,dy:d,cx:f,cy:h,clientX:l,clientY:c,targetBounds:s,chartBounds:a}}(e,this),t=Array.isArray(r)?this.props.filter(r):this.props.filter(this.chart.shapesAt({x:this.state.pointer.cx,y:this.state.pointer.cy})),this.props.isEqual(this.state.activeNodes,t)||(this.dispatcher.clear(),this.state.activeNodes=t,this.state.activeNodes.length&&this.dispatcher.invoke(()=>this.invokeRenderer(this.state.activeNodes),i,o)))},prevent(e){this.state.prevent=!!e},init(e){this.state={activeNodes:[],pointer:{},targetElement:null,prevent:!1},this.props=e.settings,this.dispatcher=ld({defaultDuration:this.props.duration,defaultDelay:this.props.delay});const t=this.dispatcher.clear;this.dispatcher.on("pending",()=>{!function(e){vd&&vd!==e&&vd()}(t),vd=t,"function"==typeof this.props.beforeShow&&this.props.beforeShow.call(void 0,{resources:{formatter:this.chart.formatter,scale:this.chart.scale}})}),this.dispatcher.on(["cancelled","fulfilled"],()=>{const e={resources:{formatter:this.chart.formatter,scale:this.chart.scale}};"function"==typeof this.props.beforeHide&&this.props.beforeHide.call(void 0,u({element:this.state.tooltipElm},e)),"function"==typeof this.props.onHide?this.props.onHide.call(void 0,u({element:this.state.tooltipElm},e)):this.renderer.clear([]),"function"==typeof this.props.afterHide&&this.props.afterHide.call(void 0,e),vd===t&&(vd=null),this.state.tooltipElm=void 0}),this.dispatcher.on("active",()=>{"function"==typeof this.props.afterShow&&this.props.afterShow.call(void 0,{element:this.state.tooltipElm,resources:{formatter:this.chart.formatter,scale:this.chart.scale}})})},created(){this.init(this.settings)},beforeUpdate(e){let t=e.settings;this.dispatcher&&(this.dispatcher.destroy(),bd()),this.init(t)},render(e){return this.h=e,[]},beforeDestroy(){this.dispatcher.destroy(),bd()},appendTo(){if(this.props.appendTo){this.state.targetElement="function"==typeof this.props.appendTo?this.props.appendTo({resources:{formatter:this.chart.formatter,scale:this.chart.scale}}):this.props.appendTo;const e=this.state.targetElement.getBoundingClientRect(),t=e.width,n=e.height;this.renderer.destroy(),this.renderer.size({width:t,height:n}),this.renderer.appendTo(this.state.targetElement)}else this.state.targetElement=this.renderer.element()},mounted(){this.appendTo()},updated(){this.appendTo()},invokeRenderer(e){const t=function(e,t){let n=t.chart,r=t.scale,i=t.props,o=t.h;const a={resources:{dataset:n.dataset,scale:n.scale,formatter:n.formatter},scale:r,h:o},s=[];return e.forEach(e=>{if("function"==typeof i.extract){const t=u({node:e},a);s.push(i.extract(t))}}),s}(e,this),n=yd(sd(t,{},this).getBoundingClientRect(),this);this.state.tooltipElm=sd(t,n,this)}};const wd={require:["renderer","chart"],defaultSettings:{settings:{target:"",selector:"*",fill:"rgba(0, 255, 0, 0.1)",stroke:"lime",opacity:1,useOuterRect:!1}},on:{update(){this.draw()}},draw(){const e=this.chart.findShapes(this.props.selector).filter(e=>e.key===this.props.target),t=e.filter(e=>e.collider).map(e=>e.collider);t.forEach(e=>{e.fill=this.props.fill,e.stroke=this.props.stroke,e.opacity=this.props.opacity,e.collider={type:null}}),this.renderer.render(t)},created(){this.props=this.settings.settings},resize(e){let t=e.outer,n=e.inner;return this.props.useOuterRect?t:n},render(){},mounted(){this.draw()},updated(){this.props=this.settings.settings,this.draw()}};var Md={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},kd=/([astvzqmhlc])([^astvzqmhlc]*)/gi,Cd=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function qd(e){const t=[],n=String(e).trim();return"M"!==n[0]&&"m"!==n[0]||n.replace(kd,(e,n,r)=>{const i=function(e){const t=e.match(Cd);return t?t.map(Number):[]}(r);let o=n.toLowerCase(),a=n;if("m"===o&&i.length>2&&(t.push([a,...i.splice(0,2)]),o="l",a="m"===a?"l":"L"),i.length<Md[o])return"";for(t.push([a,...i.splice(0,Md[o])]);i.length>=Md[o]&&i.length&&Md[o];)t.push([a,...i.splice(0,Md[o])]);return""}),t}const Ed=2*Math.PI;function Dd(e,t){return{x:.5*(e.x+t.x),y:.5*(e.y+t.y)}}function Td(e,t,n,r,i){const o=1-e;return o**3*t+3*o**2*e*n+3*o*e**2*r+e**3*i}function Od(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:8;if(o<1||function(e,t,n,r){return Math.abs(e.x+n.x-(t.x+t.x))+Math.abs(e.y+n.y-(t.y+t.y))+Math.abs(t.x+r.x-(n.x+n.x))+Math.abs(t.y+r.y-(n.y+n.y))}(e,t,n,r)<=10)return i[i.length-1]!==e&&i.push(e),i.push(r),i;const a=Dd(e,t),s=Dd(t,n),l=Dd(n,r),c={x:Td(.5,e.x,t.x,n.x,r.x),y:Td(.5,e.y,t.y,n.y,r.y)},u=Dd(a,s),d=Dd(s,l);return Od(e,a,u,c,i,o-1),Od(c,d,l,r,i,o-1),i}function Nd(e,t,n){const r=function(e,t,n){return{cp1:{x:e.x+2/3*(t.x-e.x),y:e.y+2/3*(t.y-e.y)},cp2:{x:n.x+2/3*(t.x-n.x),y:n.y+2/3*(t.y-n.y)}}}(e,t,n);return Od(e,r.cp1,r.cp2,n)}function Ad(e,t,n){const r=[],i=!!e[4],o=!!e[5],a=e[3];let s,l,c,u,d=e[6],f=e[7],h=e[1],p=e[2];if("a"===e[0]&&(d+=t,f+=n),t===f&&n===f)return r;if(!h||!p)return r.push({x:d,y:f}),r;var m=function(e,t,n,r,i,o,a,s,l){let c,u,d,f,h,p;const m=Jo(n%360),g=Math.cos(m),y=Math.sin(m),v=(s-o)/2,b=(l-a)/2,x=g*v+y*b,S=g*b-y*v;p=x**2/(e=Math.abs(e))**2+S**2/(t=Math.abs(t))**2,p>1&&(p=Math.sqrt(p),e*=p,t*=p);const w=e*S,M=t*x,k=w**2+M**2,C=(e*t)**2-k;let q=Math.sqrt(Math.max(C/k,0));r===i&&(q=-q);const E=q*(w/t),D=q*(-M/e);f=g*E-y*D+(s+o)/2,h=y*E+g*D+(l+a)/2;const T=(x-E)/e,O=(S-D)/t,N=(-x-E)/e,A=(-S-D)/t;return c=Math.atan2(O,T),c+=c<0?Ed:0,u=Math.atan2(A,N),u+=u<0?Ed:0,d=u-c,!i&&c<u?d-=Ed:i&&u<c&&(d+=Ed),d%=Ed,{startAngle:c,sweepAngle:d,cx:f,cy:h,rx:e,ry:t}}(h,p,a,i,o,d,f,t,n);s=m.cx,l=m.cy,h=m.rx,p=m.ry,c=m.sweepAngle,u=m.startAngle;const g=Math.abs(c*Math.sqrt((h**2+p**2)/2)),y=Math.ceil(g/10),v=c/y;for(let e=1;e<=y;e++){const t=(u+v*e)%Ed,n=Math.cos(t),i=Math.sin(t);r.push({x:s+n*h+-i*n,y:l+i*p+n*i})}return r}function _d(e){const t=qd(e),n=[],r=[];let i=0,o=0,a=null,s=null,l=null,c=null;for(let e=0;e<t.length;++e){const u=t[e],d=u[0];switch("S"!==d&&"s"!==d&&"C"!==d&&"c"!==d&&(a=null,s=null),"T"!==d&&"t"!==d&&"Q"!==d&&"q"!==d&&(l=null,c=null),d){case"m":r.length&&n.push(r.splice(0));case"l":i+=u[1],o+=u[2],r.push({x:i,y:o});break;case"M":r.length&&n.push(r.splice(0));case"L":i=u[1],o=u[2],r.push({x:i,y:o});break;case"H":i=u[1],r.push({x:i,y:o});break;case"h":i+=u[1],r.push({x:i,y:o});break;case"V":o=u[1],r.push({x:i,y:o});break;case"v":o+=u[1],r.push({x:i,y:o});break;case"a":r.push(...Ad(u,i,o)),i+=u[6],o+=u[7];break;case"A":r.push(...Ad(u,i,o)),i=u[6],o=u[7];break;case"c":r.push(...Od({x:i,y:o},{x:u[1]+i,y:u[2]+o},{x:u[3]+i,y:u[4]+o},{x:u[5]+i,y:u[6]+o})),a=u[3]+i,s=u[4]+o,i+=u[5],o+=u[6];break;case"C":r.push(...Od({x:i,y:o},{x:u[1],y:u[2]},{x:u[3],y:u[4]},{x:u[5],y:u[6]})),a=u[3],s=u[4],i=u[5],o=u[6];break;case"s":null!==a&&null!==a||(a=i,s=o),r.push(...Od({x:i,y:o},{x:2*i-a,y:2*o-s},{x:u[1]+i,y:u[2]+o},{x:u[3]+i,y:u[4]+o})),a=u[1]+i,s=u[2]+o,i+=u[3],o+=u[4];break;case"S":null!==a&&null!==a||(a=i,s=o),r.push(...Od({x:i,y:o},{x:2*i-a,y:2*o-s},{x:u[1],y:u[2]},{x:u[3],y:u[4]})),a=u[1],s=u[2],i=u[3],o=u[4];break;case"Q":r.push(...Nd({x:i,y:o},{x:u[1],y:u[2]},{x:u[3],y:u[4]})),l=u[1],c=u[2],i=u[3],o=u[4];break;case"q":r.push(...Nd({x:i,y:o},{x:u[1]+i,y:u[2]+o},{x:u[3]+i,y:u[4]+o})),l=u[1]+i,c=u[2]+o,i+=u[3],o+=u[4];break;case"T":null!==l&&null!==l||(l=i,c=o),l=2*i-l,c=2*o-c,r.push(...Nd({x:i,y:o},{x:l,y:c},{x:u[1],y:u[2]})),i=u[1],o=u[2];break;case"t":null!==l&&null!==l||(l=i,c=o),l=2*i-l,c=2*o-c,r.push(...Nd({x:i,y:o},{x:l,y:c},{x:u[1]+i,y:u[2]+o})),i+=u[1],o+=u[2];break;case"z":case"Z":r.length&&r.push({x:r[0].x,y:r[0].y})}}return function(e){for(let t=0;t<e.length-1;t++){const n=e[t],r=e[t+1];Math.abs(n.x-r.x)<1e-12&&Math.abs(n.y-r.y)<1e-12&&(e.splice(t,1),t--)}}(r),n.push(r.splice(0)),n}const Id={require:["renderer","chart"],defaultSettings:{settings:{target:"",fill:"transparent",stroke:"lime",opacity:1,radius:2,useOuterRect:!1}},on:{update(){this.draw()}},draw(){const e=this.chart.findShapes("path").filter(e=>e.key===this.props.target),t=[];e.forEach(e=>{_d(e.attrs.d).forEach(e=>{e.forEach(e=>{t.push({type:"circle",cx:e.x,cy:e.y,r:this.props.radius,fill:this.props.fill,stroke:this.props.stroke,opacity:this.props.opacity,collider:{type:null}})})})}),this.renderer.render(t)},created(){this.props=this.settings.settings},resize(e){let t=e.outer,n=e.inner;return this.props.useOuterRect?t:n},render(){},mounted(){this.draw()},updated(){this.props=this.settings.settings,this.draw()}};var Ld=[function(e){e.component("box",Ps),e.component("box-marker",Ps)},function(e){e.component("point",$s),e.component("point-marker",$s)},function(e){e.component("pie",Ks)},function(e){e.component("grid-line",Qs)},function(e){e.component("ref-line",ul)},function(e){e.component("axis",Fl)},function(e){e.component("container",jl)},function(e){e.component("text",Hl)},function(e){e.component("scrollbar",Ul)},function(e){e.component("brush-range",sc),e.component("brush-area-dir",dc)},function(e){e.component("range",mc)},function(e){e.component("brush-lasso",Sc)},function(e){e.component("labels",_u)},function(e){e.component("legend-cat",Uu)},function(e){e.component("legend-seq",Zu)},function(e){e.component("line",nd)},function(e){e.component("brush-area",ad)},function(e){e.component("tooltip",Sd)},function(e){e.component("debug-collider",wd)},function(e){e.component("debug-path-to-points",Id)}];let Pd=class{constructor(e){this._parent=null,this._children=[],this._ancestors=null,this.type=e,this.data=null}detach(){return this._parent&&this._parent.removeChild(this),this}get parent(){return this._parent}get isBranch(){return this._children&&this._children.length}get children(){return this._children}get ancestors(){return this._ancestors||(this._ancestors=[],this.parent&&this._ancestors.push(this.parent,...this.parent.ancestors)),this._ancestors}get descendants(){let e=[];const t=this.children.length;let n,r;for(n=0;n<t;n++)r=this.children[n],e.push(r),r.children.length&&(e=[...e,...r.descendants]);return e}equals(e){const t=this.children,n=e.children;if(t.length!==n.length)return!1;for(let e=0;e<t.length;e++)if(!t[e].equals(n[e]))return!1;return!0}toJSON(){return{type:this.type,children:this.children.map(e=>e.toJSON())}}};class Rd{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.x,n=void 0===t?0:t,r=e.y,i=void 0===r?0:r,o=e.width,a=void 0===o?0:o,s=e.height,l=void 0===s?0:s,c=e.minWidth,u=void 0===c?0:c,d=e.minHeight,f=void 0===d?0:d;this.set({x:n,y:i,width:a,height:l,minWidth:u,minHeight:f})}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.x,n=void 0===t?0:t,r=e.y,i=void 0===r?0:r,o=e.width,a=void 0===o?0:o,s=e.height,l=void 0===s?0:s,c=e.minWidth,u=void 0===c?0:c,d=e.minHeight,f=void 0===d?0:d;this.type="rect",a>=0?(this.x=n,this.width=Math.max(a,u)):(this.x=n+Math.min(a,-u),this.width=-Math.min(a,-u)),l>=0?(this.y=i,this.height=Math.max(l,f)):(this.y=i+Math.min(l,-f),this.height=-Math.min(l,-f))}containsPoint(e){return Pa(this,e)}intersectsLine(e){return Ra(this,k(e))}intersectsRect(e){return Ia(this,M(e))}intersectsCircle(e){return Da(e,this)}intersectsPolygon(e){return _a(e,this)}intersectsGeoPolygon(e){return Wa(e,this)}points(){return[{x:this.x,y:this.y},{x:this.x+this.width,y:this.y},{x:this.x+this.width,y:this.y+this.height},{x:this.x,y:this.y+this.height}]}}class zd{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.cx,n=void 0===t?0:t,r=e.cy,i=void 0===r?0:r,o=e.r,a=void 0===o?0:o,s=e.minRadius,l=void 0===s?0:s;this.set({cx:n,cy:i,r:a,minRadius:l})}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.cx,n=void 0===t?0:t,r=e.cy,i=void 0===r?0:r,o=e.r,a=void 0===o?0:o,s=e.minRadius,l=void 0===s?0:s;this.type="circle",this.cx=n,this.cy=i,this.r=Math.max(a,l),this.vector={x:this.cx,y:this.cy}}containsPoint(e){return Ea(this,e)}intersectsLine(e){return Ta(this,k(e))}intersectsRect(e){return Da(this,M(e))}intersectsCircle(e){return n=e,!Ma(t=this)&&!Ma(n)&&(t.cx-n.cx)**2+(t.cy-n.cy)**2<=(t.r+n.r)**2;var t,n}intersectsPolygon(e){return Oa(this,e)}intersectsGeoPolygon(e){return Va(this,e)}points(){return[{x:this.cx,y:this.cy}]}}class Fd{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.x1,n=void 0===t?0:t,r=e.y1,i=void 0===r?0:r,o=e.x2,a=void 0===o?0:o,s=e.y2,l=void 0===s?0:s,c=e.tolerance,u=void 0===c?0:c;this.set({x1:n,y1:i,x2:a,y2:l,tolerance:u})}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.x1,n=void 0===t?0:t,r=e.y1,i=void 0===r?0:r,o=e.x2,a=void 0===o?0:o,s=e.y2,l=void 0===s?0:s,c=e.tolerance,u=void 0===c?0:c;this.type="line",this.x1=n,this.y1=i,this.x2=a,this.y2=l,this.tolerance=Math.max(0,Math.round(u)),this.vectors=this.points(),this.zeroSize=n===a&&i===l}containsPoint(e){if(this.tolerance>0){return Ta({cx:e.x,cy:e.y,r:this.tolerance},this)}return Fa(this,e)}intersectsLine(e){return za(this,k(e))}intersectsRect(e){return Ra(M(e),this)}intersectsCircle(e){return Ta(e,this)}intersectsPolygon(e){return Aa(e,this)}intersectsGeoPolygon(e){return $a(e,this)}points(){return[{x:this.x1,y:this.y1},{x:this.x2,y:this.y2}]}}class jd{constructor(){let e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).vertices,t=void 0===e?[]:e;this.set({vertices:t})}set(){let e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).vertices,t=void 0===e?[]:e;if(this.type="polygon",this.vertices=t.slice(),this.edges=[],function(e){for(let t=0;t<e.length-1;t++){const n=e[t],r=e[t+1];n.x===r.x&&n.y===r.y&&(e.splice(t,1),t--)}}(this.vertices),!(this.vertices.length<=2)){!function(e){const t=e[0],n=e[e.length-1];t.x===n.x&&t.y===n.y||e.push(t)}(this.vertices),this.xMin=NaN,this.yMin=NaN,this.xMax=NaN,this.yMax=NaN;for(let e=0;e<this.vertices.length;e++)e<this.vertices.length-1&&this.edges.push([this.vertices[e],this.vertices[e+1]]),this.xMin=isNaN(this.xMin)?this.vertices[e].x:Math.min(this.xMin,this.vertices[e].x),this.xMax=isNaN(this.xMax)?this.vertices[e].x:Math.max(this.xMax,this.vertices[e].x),this.yMin=isNaN(this.yMin)?this.vertices[e].y:Math.min(this.yMin,this.vertices[e].y),this.yMax=isNaN(this.yMax)?this.vertices[e].y:Math.max(this.yMax,this.vertices[e].y);this._bounds=null,this._boundingRect=null}}containsPoint(e){return Na(this,e)}intersectsCircle(e){return Oa(e,this)}intersectsLine(e){return Aa(this,k(e))}intersectsRect(e){return _a(this,M(e))}intersectsPolygon(e){return ja(this,e)}intersectsGeoPolygon(e){return Ba(e,this)}points(){return this.vertices}bounds(){return this._bounds||(this._bounds=[{x:this.xMin,y:this.yMin},{x:this.xMax,y:this.yMin},{x:this.xMax,y:this.yMax},{x:this.xMin,y:this.yMax}]),this._bounds}boundingRect(){return this._boundingRect||(this._boundingRect={x:this.xMin,y:this.yMin,width:this.xMax-this.xMin,height:this.yMax-this.yMin}),this._boundingRect}}function Bd(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new jd(...t)}function Vd(e){const t=e[0],n=e[e.length-1];t.x===n.x&&t.y===n.y||e.push(t)}function Hd(e){for(let t=0;t<e.length-1;t++){const n=e[t],r=e[t+1];n.x===r.x&&n.y===r.y&&(e.splice(t,1),t--)}}class $d{constructor(){let e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).vertices,t=void 0===e?[[]]:e;this.set({vertices:t})}set(){let e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).vertices,t=void 0===e?[]:e;this.type="geopolygon",this.vertices=t.slice(),this.numPolygons=this.vertices.length,this.polygons=[],this.xMin=NaN,this.yMin=NaN,this.xMax=NaN,this.yMax=NaN;for(let e=0;e<this.numPolygons;e++)Hd(this.vertices[e]),this.vertices[e].length>2&&Vd(this.vertices[e]),this.polygons[e]=Bd({vertices:this.vertices[e]}),this.xMin=isNaN(this.xMin)?this.polygons[e].xMin:Math.min(this.xMin,this.polygons[e].xMin),this.xMax=isNaN(this.xMax)?this.polygons[e].xMax:Math.max(this.xMax,this.polygons[e].xMax),this.yMin=isNaN(this.yMin)?this.polygons[e].yMin:Math.min(this.yMin,this.polygons[e].yMin),this.yMax=isNaN(this.yMax)?this.polygons[e].yMax:Math.max(this.yMax,this.polygons[e].yMax);this._bounds=null,this._boundingRect=null}containsPoint(e){return Ha(this,e)}intersectsCircle(e){return Va(e,this)}intersectsLine(e){return $a(this,k(e))}intersectsRect(e){return Wa(this,M(e))}intersectsPolygon(e){return Ba(this,e)}intersectsGeoPolygon(e){return function(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!Ia(n,r)&&(La(r,n)?qa(t,e):qa(e,t))}(this,e)}points(){return this.vertices}bounds(){return this._bounds||(this._bounds=[{x:this.xMin,y:this.yMin},{x:this.xMax,y:this.yMin},{x:this.xMax,y:this.yMax},{x:this.xMin,y:this.yMax}]),this._bounds}boundingRect(){return this._boundingRect||(this._boundingRect={x:this.xMin,y:this.yMin,width:this.xMax-this.xMin,height:this.yMax-this.yMin}),this._boundingRect}}function Wd(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new $d(...t)}function Ud(e,t){return e.x!==t.x||e.y!==t.y}class Yd{constructor(){let e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).points,t=void 0===e?[]:e;this.set({points:t})}set(){let e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).points,t=void 0===e?[]:e;if(this.type="polyline",this.segments=[],this._points=t.slice(),this._points.length>1)for(let e=0,t=this._points.length-1;e<t;e++)Ud(this._points[e],this._points[e+1])&&this.segments.push({x1:this._points[e].x,y1:this._points[e].y,x2:this._points[e+1].x,y2:this._points[e+1].y})}containsPoint(e){return this.segments.some(t=>Fa(t,e))}intersectsCircle(e){return this.segments.some(t=>Ta(e,t))}intersectsLine(e){const t=k(e);return this.segments.some(e=>za(e,t))}intersectsRect(e){const t=M(e);return this.segments.some(e=>Ra(t,e))}intersectsPolygon(e){return this.segments.some(t=>Aa(e,t))}intersectsGeoPolygon(e){return this.segments.some(t=>$a(e,t))}points(){return this._points}}const Kd=Ne();function Gd(e,t){return Kd.get(e)(t)}Kd.add("rect",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Rd(...t)}),Kd.add("circle",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new zd(...t)}),Kd.add("line",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Fd(...t)}),Kd.add("polygon",Bd),Kd.add("geopolygon",Wd),Kd.add("polyline",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Yd(...t)});class Xd{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.set(e)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.geometries=[],e.forEach(e=>{const t=Gd(e.type,e);t&&this.geometries.push(t)})}containsPoint(e){return this.geometries.some(t=>t.containsPoint(e))}intersectsLine(e){return this.geometries.some(t=>t.intersectsLine(e))}intersectsRect(e){return this.geometries.some(t=>t.intersectsRect(e))}intersectsCircle(e){return this.geometries.some(t=>t.intersectsCircle(e))}intersectsPolygon(e){return this.geometries.some(t=>t.intersectsPolygon(e))}intersectsGeoPolygon(e){return this.geometries.some(t=>t.intersectsGeoPolygon(e))}}class Jd{constructor(){this._elements=[[1,0,0],[0,1,0],[0,0,1]],this._stack=[]}clone(){return(new Jd).multiply(this)}set(e){return this._elements=e,this}save(){return this._stack.push(this.elements),this}restore(){return this._stack.length&&(this._elements=this._stack.pop()),this}add(e){let t,n;for(t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)this._elements[t][n]+=e;return this}translate(e,t){return this.multiply([[1,0,e],[0,1,t],[0,0,1]]),this}rotate(e){let t=Math.cos(-e),n=Math.sin(-e);return this.multiply([[t,n,0],[-n,t,0],[0,0,1]]),this}multiply(e){let t,n,r,i;if(e instanceof Jd&&(e=e._elements),Array.isArray(e)){for(r=[[0,0,0],[0,0,0],[0,0,0]],t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)for(i=0;i<3;i++)r[t][n]+=this._elements[t][i]*e[i][n];this._elements=r}else for(t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)this._elements[t][n]*=e;return this}scale(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return this.multiply([[e,0,0],[0,t,0],[0,0,1]]),this}transform(e,t,n,r,i,o){return this.multiply([[e,n,i],[t,r,o],[0,0,1]]),this}determinant(){let e=this._elements[0][0],t=this._elements[0][1],n=this._elements[0][2],r=this._elements[1][0],i=this._elements[1][1],o=this._elements[1][2],a=this._elements[2][0],s=this._elements[2][1],l=this._elements[2][2],c=0;return c=e*i*l+t*o*a+n*r*s-n*i*a-t*r*l-e*o*s,c}invert(){let e=this.determinant(),t=this._elements[0][0],n=this._elements[0][1],r=this._elements[0][2],i=this._elements[1][0],o=this._elements[1][1],a=this._elements[1][2],s=this._elements[2][0],l=this._elements[2][1],c=this._elements[2][2];return this._elements=[[o*c-a*l,r*l-n*c,n*a-r*o],[a*s-i*c,t*c-r*s,r*i-t*a],[i*l-o*s,s*n-t*l,t*o-n*i]],this.multiply(1/e),this}transpose(){const e=Object.create(this._elements);return this._elements=[[e[0][0],e[1][0],e[2][0]],[e[0][1],e[1][1],e[2][1]],[e[0][2],e[1][2],e[2][2]]],this}identity(){return this._elements=[[1,0,0],[0,1,0],[0,0,1]],this}toString(){return"".concat(this._elements.map(e=>e.join("\t")).join("\n"))}isIdentity(){const e=this._elements;return 1===e[0][0]&&0===e[0][1]&&0===e[0][2]&&0===e[1][0]&&1===e[1][1]&&0===e[1][2]&&0===e[2][0]&&0===e[2][1]&&1===e[2][2]}transformPoint(e){let t,n,r=[e.x,e.y,1],i=this._elements,o=[0,0,0];for(t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)o[t]+=r[n]*i[t][n];return{x:o[0],y:o[1]}}transformPoints(e){let t,n,r,i,o,a=this._elements,s=[];for(i=0;i<e.length;i++){for(t=[e[i].x,e[i].y,1],o=[0,0,0],n=0;n<this._elements.length;n++)for(r=0;r<this._elements[n].length;r++)o[n]+=t[r]*a[n][r];s.push({x:o[0],y:o[1]})}return s}get elements(){const e=this._elements;return[[e[0][0],e[0][1],e[0][2]],[e[1][0],e[1][1],e[1][2]],[e[2][0],e[2][1],e[2][2]]]}}const Zd=/(translate|scale|rotate|matrix)\(([0-9,.eE+-\s]+)(?:,|\s?)+\)/g;function Qd(e,t){const n=t.args[0]*(Math.PI/180);if(t.args.length>2){const r=t.args[1],i=t.args[2];e.translate(r,i),e.rotate(n),e.translate(-r,-i)}else 1===t.args.length&&e.rotate(n)}function ef(e,t){const n=t.args[0],r=isNaN(t.args[1])?t.args[0]:t.args[1];e.scale(n,r)}function tf(e,t){const n=t.args[0],r=isNaN(t.args[1])?0:t.args[1];e.translate(n,r)}function nf(e,t){t.args.length>=6&&e.transform(...t.args)}function rf(e,t){const n=function(e){let t,n=[];for(;null!==(t=Zd.exec(e));){const e=t[2].trim(),r=-1===e.indexOf(",")?e.split(" "):e.split(",");n.push({cmd:t[1],args:r.filter(e=>e.trim().length>0).map(e=>Number(e))})}return n}(e);let r;for(let e=0,i=n.length;e<i;e++)r=n[e],"rotate"===r.cmd?Qd(t,r):"scale"===r.cmd?ef(t,r):"matrix"===r.cmd?nf(t,r):"translate"===r.cmd&&tf(t,r)}const of={type:/^\w[\w-]+/,attr:/^\[\w(?:[\w\._-]+)?(?:[!]?=['\"][\w\s*#_-]*['\"])?\]/,universal:/^(\*)/,tag:/^\.(\w+)/},af={type:(e,t)=>t.filter(t=>{const n=t.type;return!!n&&n.toLowerCase()===e.toLowerCase()}),attr:(e,t,n,r)=>r.filter(r=>{const i=r.attrs[e];if(!t)return void 0!==i;if(void 0===i)return!1;switch(t){case"=":return n===String(i);case"!=":return n!==String(i);default:return!1}}),universal:e=>e,tag:(e,t)=>t.filter(t=>{const n=t.tag;return!!n&&-1!==n.trim().split(/\s+/).indexOf(e.replace(".",""))})};function sf(e,t){if(!t||!t.length||!e||"function"!=typeof af[e.type])return[];switch(e.type){case"type":case"tag":return af[e.type](e.value,t);case"attr":return af[e.type](e.attribute,e.operator,e.attributeValue,t);case"universal":return af[e.type](t);default:return[]}}var lf={find:function(e,t){const n=[],r=[];let i,o;if(t.isBranch){let a;i=function(e){const t=[];let n,r,i,o;return e.split(/\s*,\s*/).forEach(e=>{e=e.trim(),n=[];const a=t=>{i=e.match(of[t]),i&&(o=!0,e=e.slice(i[0].length),r={type:t,value:i[0]},"attr"===t&&(i=i[0].match(/\[(\w[\w\._-]+)?(?:([!]?=)['\"]([\w\s#_-]*)['\"])?\]/),r.attribute=i[1],r.operator=i[2],r.attributeValue=i[3]),n.push(r))};for(;e&&(o=!1,i=e.match(/^\s*([>+~]|\s)\s*/),i&&(o=!0,n.push({type:" ",value:i[0]}),e=e.slice(i[0].length)),Object.keys(of).forEach(a),n&&n.length&&t.indexOf(n)<0&&t.push(n),o););}),t}(e),o=t.descendants;for(let e=0,t=i.length;e<t;e++){a=i[e];const t=[];let n=o.slice(),s=!1;a.reverse().forEach(e=>{if(" "===e.type)return t.push(n),n=o.slice(),void(s=!1);n=sf(e,n),s=!0}),s&&t.push(n);const l=t[0].filter(e=>{let n,r=e.parent;for(let e=1;e<t.length;e++){for(n=t[e].indexOf(r);r&&n<0;)r=r.parent,n=t[e].indexOf(r);if(n<0)return!1}return!0});r.push(l)}for(let e=0,t=r.length;e<t;e++)for(let t=0,i=r[e].length;t<i;t++)n.indexOf(r[e][t])<0&&n.push(r[e][t])}return n||[]}};function cf(e,t,n){const r=e.type;let i=e.points();n&&(i=i.every(e=>Array.isArray(e))?i.map(e=>n.transformPoints(e)):n.transformPoints(i)),function(e,t){for(let n=0,r=e.length;n<r;n++)e[n].x/=t,e[n].y/=t}(i,t);let o=null;if("rect"===r||"bounds"===r)o=M(i),o.type=r;else if("circle"===r)o=function(e,t){return{cx:e[0].x,cy:e[0].y,r:t}}(i,e.r),o.type=r;else if("line"===r)o=k(i),o.type=r;else if("polygon"===r||"polyline"===r){o={type:"path",d:Go(i,"polygon"===r)}}else if("geopolygon"===r){let e="";for(let t=0;t<i.length;t++)e+=Go(i[t],!0);o={type:"path",d:e}}return o}class uf{constructor(e){this._bounds=function(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const n=e.boundingRect?e.boundingRect(t):{x:0,y:0,width:0,height:0};return{x:n.x,y:n.y,width:n.width,height:n.height}},this._attrs=e.attrs,this._type=e.type,this._data=e.data,this._dpi=e.stage?e.stage.dpi:1,this._collider=()=>function(e,t){if(e.collider){const n=e.modelViewMatrix;return"collection"===e.colliderType?{type:"container",children:e.collider.geometries.map(e=>cf(e,t,n))}:cf(e.collider,t,n)}return null}(e,this._dpi),this._desc=e.desc,this._tag=e.tag,this._children=()=>e.children.map(e=>new uf(e)),this._parent=()=>e.parent?new uf(e.parent):null,this._cache={elementBoundingRect:null},this._getElementBoundingRect=()=>(!this._cache.elementBoundingRect&&this.element&&(this._cache.elementBoundingRect=this.element.getBoundingClientRect()),this._cache.elementBoundingRect||{left:0,top:0})}get children(){return this._children()}get parent(){return this._parent()}get type(){return this._type}get data(){return this._data}get attrs(){return this._attrs}set element(e){this._cache.elementBoundingRect=null,this._element=e}get element(){return this._element}set key(e){this._key=e}get key(){return this._key}get bounds(){const e=this._bounds();return e.x/=this._dpi,e.y/=this._dpi,e.width/=this._dpi,e.height/=this._dpi,e}get localBounds(){return this._bounds(!1)}boundsRelativeTo(e){const t=typeof e,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?this.bounds:this.localBounds,r=this._getElementBoundingRect();let i=r.left,o=r.top;if("object"===t&&null!==e&&"function"==typeof e.getBoundingClientRect){const t=e.getBoundingClientRect(),n=t.left,r=void 0===n?0:n,a=t.top;i-=r,o-=void 0===a?0:a}return n.x+=i,n.y+=o,n}get collider(){return this._collider()}get desc(){return this._desc}get tag(){return this._tag}}function df(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new uf(...t)}class ff{constructor(e){this._node=df(e),this._parent=null,this._input=null}get node(){return this._node}set parent(e){this._parent=e}get parent(){return this._parent}set input(e){this._input=e}get input(){return this._input}}function hf(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new ff(...t)}function pf(e,t){const n=e.parent;if(n&&"stage"!==n.type){t.parent=hf(n);const e=n.parent;e&&"stage"!==e.type&&pf(e,t.parent)}}function mf(e,t,n){if(null===e.colliderType)return null;const r=function(e,t){let n={};if(e.modelViewMatrix)if(Array.isArray(t))n=e.inverseModelViewMatrix.transformPoints(t);else if(isNaN(t.r))Array.isArray(t.vertices)?n.vertices=e.inverseModelViewMatrix.transformPoints(t.vertices):n=e.inverseModelViewMatrix.transformPoint(t);else{const i={x:t.cx,y:t.cy};var r=e.inverseModelViewMatrix.transformPoint(i);n.cx=r.x,n.cy=r.y,n.r=t.r}else n=t;return Array.isArray(n.vertices)&&(n=n.vertices.every(e=>Array.isArray(e))?Wd(n):Bd(n)),n}(e,n);return"frontChild"===e.colliderType?function(e,t,n){for(let r=e.descendants.length-1;r>=0;r--){const i=e.descendants[r];if(null!==i.collider&&i.collider[t](n)){const e=hf(i);return pf(i,e),e}}return null}(e,t,r):function(e,t,n){if(e.collider[t](n)){const t=hf(e);return pf(e,t),t}return null}(e,t,r)}function gf(e,t,n,r){const i=e.length;for(let o=0;o<i;o++){const i=e[o],a=mf(i,t,r);a&&n.push(a),!i.children||a||i.collider||gf(i.children,t,n,r)}}function yf(e,t,n){const r=e.length;for(let i=0;i<r;i++){const r=e[i];if(null!==mf(r,t,n))return!0;if(r.children&&!r.collider)return yf(r.children,t,n)}return!1}function vf(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;let n={};switch(C(e)){case"circle":return n.cx=e.cx*t,n.cy=e.cy*t,n.r=e.r,["intersectsCircle",n];case"rect":return n=w(e).map(e=>ta(e,t)),["intersectsRect",n];case"line":return n=S(e).map(e=>ta(e,t)),["intersectsLine",n];case"point":return n=ta(e,t),["containsPoint",n];case"polygon":return n.vertices=e.vertices.map(e=>ta(e,t)),["intersectsPolygon",n];case"geopolygon":return n.vertices=e.vertices.map(e=>e.map(e=>ta(e,t))),["intersectsGeoPolygon",n];default:return[]}}function bf(e,t){const n=g(vf(t,e.dpi),2),r=n[0],i=n[1],o=[];return r&&(gf([e],r,o,i),function(e,t){for(let n=0,r=t.length;n<r;n++)t[n].input=e}(t,o)),o}function xf(e,t){const n=g(vf(t,e.dpi),2);return yf([e],n[0],n[1])}class Sf extends Pd{constructor(e){super(e),this._stage=null,this._collider={type:null,definition:null,fn:null},this._attrs={},this._node=null}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.node=e;const t=e.data,n=e.desc,r=e.tag,i=e.strokeReference,o=e.fillReference;var a,s;a=this.attrs,s=e,Object.keys(Ko).forEach(e=>{const t=s[e];void 0!==t&&(a[Ko[e]]=t)}),void 0!==t&&(this.data=t),"object"==typeof n&&(this.desc=u(!0,{},n)),"string"==typeof r&&(this.tag=r),"string"==typeof i&&(this.strokeReference=i),"string"==typeof o&&(this.fillReference=o)}findShapes(e){return lf.find(e,this).map(e=>df(e))}getItemsFrom(e){return bf(this,e)}containsPoint(e){return xf(this,e)}intersectsLine(e){return xf(this,e)}intersectsRect(e){return xf(this,e)}intersectsCircle(e){return xf(this,e)}intersectsPolygon(e){return xf(this,e)}intersectsGeoPolygon(e){return xf(this,e)}resolveLocalTransform(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Jd;void 0!==this.attrs.transform&&rf(this.attrs.transform,e),this.modelViewMatrix=e.clone()}resolveGlobalTransform(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Jd;const t=this.ancestors;if(t.length>0)for(let n=t.length-1;n>=0;n--)t[n].resolveLocalTransform(e),e=t[n].modelViewMatrix;this.resolveLocalTransform(e)}attr(e){return this.attrs[e]}equals(e){const t=this.attrs,n=Object.keys(t),r=e.attrs,i=Object.keys(r);if(n.length!==i.length)return!1;for(let e=0;e<n.length;e++){const i=n[e];if(!Object.hasOwnProperty.call(r,i))return!1;if(t[i]!==r[i])return!1}return super.equals(e)}toJSON(){const e=super.toJSON();return e.attrs=this.attrs,e}get attrs(){return this._attrs}get stage(){return this._parent&&!this._stage?this._stage=this._parent.stage:this._parent||this._stage===this||(this._stage=null),this._stage}set modelViewMatrix(e){this._mvm=e,this._imvm=null}get modelViewMatrix(){return this._mvm}get inverseModelViewMatrix(){return this._imvm=this._imvm?this._imvm:this._mvm.clone().invert(),this._imvm}set node(e){this._node=e}get node(){return this._node}set collider(e){const t=Array.isArray(e)?"collection":e&&e.type;return"string"!=typeof t?(this._collider.type=null,this._collider.definition=null,void(this._collider.fn=null)):null!==this._collider&&this._collider.type===t&&null!==this._collider.fn?(this._collider.fn.set(e),void(this._collider.definition=e)):(this._collider.type=t,void(this._collider.definition=e))}get collider(){if(null!==this._collider.fn)return this._collider.fn;switch(this._collider.type){case"collection":this._collider.fn=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Xd(...t)}(this._collider.definition);break;case"frontChild":return!0;case"bounds":this._collider.fn=Gd("rect",this.boundingRect());break;case"line":case"rect":case"circle":case"polygon":case"geopolygon":case"polyline":this._collider.fn=Gd(this._collider.type,this._collider.definition);break;default:return null}return this._collider.fn}get colliderType(){return this._collider.type}}class wf extends Pd{addChild(e){if(!(e&&e instanceof Pd))throw new TypeError("Expecting a Node as argument, but got ".concat(e));if(e===this)throw new Error("Can not add itself as child!");if(e._children&&e._children.length&&this.ancestors.indexOf(e)>=0)throw new Error("Can not add an ancestor as child!");return e._parent&&e._parent!==this&&e._parent.removeChild(e),this._children.push(e),e._parent=this,e._ancestors=null,this}addChildren(e){let t,n=e?e.length:0;for(t=0;t<n;t++)this.addChild(e[t]);return this}removeChild(e){const t=this._children.indexOf(e);return t>=0&&(this._children.splice(t,1),e._parent=null,e._ancestors=null),this}removeChildren(e){let t,n;if(!this._children)return this;if(e)for(n=e.length,t=0;t<n;t++)this.removeChild(e[t]);else for(;this._children.length;)this.removeChild(this._children[0]);return this}}const Mf=wf.prototype;class kf extends Sf{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.type;super(void 0===t?"container":t),this.set(e)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super.set(e);const t=e.collider,n=u({type:null},t);this.collider=n,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}appendChildRect(e,t){if(void 0!==e.bounds){const n=this.__boundingRect[t]||{},r=g(e.bounds(t),3),i=r[0],o=r[2],a=i.x,s=i.y,l=o.x,c=o.y,u=isNaN(n.width)?l:Math.max(l,n.width+n.x),d=isNaN(n.height)?c:Math.max(c,n.height+n.y);n.x=isNaN(n.x)?a:Math.min(a,n.x),n.y=isNaN(n.y)?s:Math.min(s,n.y),n.width=u-n.x,n.height=d-n.y,this.__boundingRect[t]=n}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];const t=this.children.length;for(let n=0;n<t;n++)this.appendChildRect(this.children[n],e);return this.__boundingRect[e]=u({x:0,y:0,width:0,height:0},this.__boundingRect[e]),this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}addChild(e){const t=Mf.addChild.call(this,e);if(this._collider&&"bounds"===this._collider.type){this.appendChildRect(e,!0);const t=u({type:"bounds",x:0,y:0,width:0,height:0},this.__boundingRect.true);this.collider=t}return t}addChildren(e){const t=Mf.addChildren.call(this,e),n=e.length;if(this._collider&&"bounds"===this._collider.type&&n>0){for(let t=0;t<n;t++)this.appendChildRect(e[t],!0);const t=u({type:"bounds",x:0,y:0,width:0,height:0},this.__boundingRect.true);this.collider=t}return t}removeChild(e){e._stage=null;let t,n=e.descendants,r=n?n.length:0;for(t=0;t<r;t++)n[t]._stage=null;if(Mf.removeChild.call(this,e),this._collider&&"bounds"===this._collider.type){this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null};const e=u(this.boundingRect(!0),{type:"bounds"});this.collider=e}return this}removeChildren(e){if(Mf.removeChildren.call(this,e),this._collider&&"bounds"===this._collider.type){this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null};const e=u(this.boundingRect(!0),{type:"bounds"});this.collider=e}return this}}function Cf(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new kf(...t)}class qf extends kf{constructor(e){super("stage"),this._stage=this,this._dpiRatio=e||1}get dpi(){return this._dpiRatio}}const Ef=wf.prototype,Df=["x1","x2","y1","y2","id","offset","style"];class Tf extends Sf{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.type;super(void 0===t?"container":t),this.set(e),this._boundingRect={}}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super.set(e);const t=this.attrs;let n="";for(let r=0,i=Df.length;r!==i;r++)n=Df[r],void 0!==e[n]&&(t[n]=e[n])}addChild(e){return Ef.addChild.call(this,e)}addChildren(e){return Ef.addChildren.call(this,e)}removeChild(e){e._stage=null;let t,n=e.descendants,r=n?n.length:0;for(t=0;t<r;t++)n[t]._stage=null;return Ef.removeChild.call(this,e),this}removeChildren(e){return Ef.removeChildren.call(this,e),this}}function Of(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Tf(...t)}const Nf=wf.prototype,Af=["patternUnits","x","y","width","height","id"];class _f extends Sf{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.type;super(void 0===t?"container":t),this.set(e),this._boundingRect={}}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super.set(e);const t=this.attrs;let n="";for(let r=0,i=Af.length;r!==i;r++)n=Af[r],void 0!==e[n]&&(t[n]=e[n])}addChild(e){return Nf.addChild.call(this,e)}addChildren(e){return Nf.addChildren.call(this,e)}removeChild(e){e._stage=null;let t,n=e.descendants,r=n?n.length:0;for(t=0;t<r;t++)n[t]._stage=null;return Nf.removeChild.call(this,e),this}removeChildren(e){return Nf.removeChildren.call(this,e),this}}class If extends Sf{constructor(){super("rect"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.x,n=void 0===t?0:t,r=e.y,i=void 0===r?0:r,o=e.width,a=void 0===o?0:o,s=e.height,l=void 0===s?0:s,c=e.rx,d=void 0===c?0:c,f=e.ry,h=void 0===f?0:f,p=e.collider,m=u({type:"rect",x:n,y:i,width:a,height:l},p);super.set(e),a>=0?(this.attrs.x=n,this.attrs.width=a):(this.attrs.x=n+a,this.attrs.width=-a),l>=0?(this.attrs.y=i,this.attrs.height=l):(this.attrs.y=i+l,this.attrs.height=-l),d>0&&(this.attrs.rx=d),h>0&&(this.attrs.ry=h),this.collider=m,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];const t=w(this.attrs),n=g(x(e&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(t):t),4),r=n[0],i=n[1],o=n[2],a=n[3];return this.__boundingRect[e]={x:r,y:i,width:o-r,height:a-i},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}class Lf extends Sf{constructor(){super("circle"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.cx,n=void 0===t?0:t,r=e.cy,i=void 0===r?0:r,o=e.r,a=void 0===o?0:o,s=e.collider,l=u({type:"circle",cx:n,cy:i,r:a},s);super.set(e),this.attrs.cx=n,this.attrs.cy=i,this.attrs.r=a,this.collider=l,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];const t=this.bounds(e);return this.__boundingRect[e]={x:t[0].x,y:t[0].y,width:t[2].x-t[0].x,height:t[2].y-t[0].y},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.attrs,n=t.cx,r=t.cy,i=t.r,o=t.r,a=n-i,s=r-o;let l=2*i,c=2*o,u=[{x:a,y:s},{x:a+l,y:s},{x:a+l,y:s+c},{x:a,y:s+c}];if(e&&this.modelViewMatrix){u=this.modelViewMatrix.transformPoints(u);const t=g(x(u),4),n=t[0],r=t[1];l=t[2]-n,c=t[3]-r,this.__bounds[e]=[{x:n,y:r},{x:n+l,y:r},{x:n+l,y:r+c},{x:n,y:r+c}]}else this.__bounds[e]=u;return this.__bounds[e]}}class Pf extends Sf{constructor(){super("line"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.x1,n=void 0===t?0:t,r=e.y1,i=void 0===r?0:r,o=e.x2,a=void 0===o?0:o,s=e.y2,l=void 0===s?0:s,c=e.collider;super.set(e),this.attrs.x1=n,this.attrs.y1=i,this.attrs.x2=a,this.attrs.y2=l;const d={type:"line",x1:n,y1:i,x2:a,y2:l};this.collider=u(d,c),this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];let t=S(this.attrs);e&&this.modelViewMatrix&&(t=this.modelViewMatrix.transformPoints(t));const n=g(x(t),4),r=n[0],i=n[1],o=n[2],a=n[3],s=r!==o||i!==a;return this.__boundingRect[e]={x:r,y:i,width:s?Math.max(1,o-r):0,height:s?Math.max(1,a-i):0},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}const Rf=Math.PI/2;function zf(e,t){const n=Math.atan2(t.y-e.y,t.x-e.x);return n<0?n+2*Math.PI:n}function Ff(e,t,n){return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}}const jf={step:function(e){return new ke(e,.5)},stepAfter:function(e){return new ke(e,1)},stepBefore:function(e){return new ke(e,0)},linear:ne,basis:function(e){return new ce(e)},cardinal:fe.tension(0),catmullRom:pe,monotonex:function(e){return new be(e)},monotoney:function(e){return new xe(e)},natural:function(e){return new we(e)}};function Bf(e){if(e.length<2)return!1;const t=e[0],n=e[e.length-1];return Math.abs(t.x-n.x)<1e-12&&Math.abs(t.y-n.y)<1e-12}class Vf extends Sf{constructor(){super("path"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(super.set(e),this.segments=[],this.points=[],e.arcDatum){const t=Q();t.innerRadius(e.desc.slice.innerRadius),t.outerRadius(e.desc.slice.outerRadius),t.cornerRadius(e.desc.slice.cornerRadius);const n=t(e.arcDatum);this.attrs.d=n}else if(e.points){const t=e.major,n=e.minor,r=e.layerObj,i=e.points,o=e.stngs,a=e.generatorType,s=oe(),l=o.coordinates?o.coordinates.defined:null;s[t.p](e=>e.major*t.size)["".concat(n.p,"1")](e=>e.minor*n.size)["".concat(n.p,"0")](e=>e.minor0*n.size).curve(jf["monotone"===r.curve?"monotone".concat(t.p):r.curve]),l?s.defined(e=>!e.dummy&&"number"==typeof e.minor&&!isNaN(e.minor)&&e.defined):s.defined(e=>!e.dummy&&"number"==typeof e.minor&&!isNaN(e.minor));const c=o.connect?i.filter(s.defined()):i,u=("area"===a?s:s[a]())(c);this.attrs.d=u}else e.d&&(this.attrs.d=e.d);if(this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null},Array.isArray(e.collider)||"object"==typeof e.collider&&void 0!==e.collider.type)this.collider=e.collider;else if(this.attrs.d){if(this.segments=_d(this.attrs.d),this.segments.length>1&&this.segments.every(e=>Bf(e)))return void(this.collider=u({type:"geopolygon",vertices:this.segments},e.collider));this.segments.forEach(t=>{if(t.length<=1);else if(Bf(t))this.collider=u({type:"polygon",vertices:t},e.collider);else if("object"==typeof e.collider&&e.collider.visual){const n=this.attrs["stroke-width"]/2;this.collider=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=[],i=[];if("h"===n.forceOrientation){const t=e[0].x<e[1].x?-1:1,n=e[e.length-1].x>e[e.length-2].x?1:-1;e.unshift({x:e[0].x+t,y:e[0].y}),e.push({x:e[e.length-1].x+n,y:e[e.length-1].y})}else if("v"===n.forceOrientation){const t=e[0].y<e[1].y?-1:1,n=e[e.length-1].y>e[e.length-2].y?1:-1;e.unshift({x:e[0].x,y:e[0].y+t}),e.push({x:e[e.length-1].x,y:e[e.length-1].y+n})}const o=e.length-1;for(let n=1;n<o;n++){const a=e[n-1],s=e[n],l=e[n+1],c=zf(s,a),u=zf(s,l),d=(c+u)/2,f=d+Math.PI,h=Math.max(d,f),p=Math.min(d,f),m=c>u;if(1===n){const e=zf(a,s);r.push(Ff(a,e-Rf,t)),i.unshift(Ff(a,e+Rf,t))}const g=m?h:p,y=m?p:h;if(r.push(Ff(s,g,t)),i.unshift(Ff(s,y,t)),n===o-1){const e=zf(l,s);r.push(Ff(l,e+Rf,t)),i.unshift(Ff(l,e-Rf,t))}}return{type:"polygon",vertices:[...r,...i]}}(t,n,e.collider)}else this.collider=u({type:"polyline",points:t},e.collider)})}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];this.points.length||(this.segments=this.segments.length?this.segments:_d(this.attrs.d),this.points=function(e){const t=[];let n,r=e.length;for(let i=0;i<r;i++){n=e[i];for(let e=0;e<n.length;e++)t.push(n[e])}return t}(this.segments));const t=g(x(e&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(this.points):this.points),4),n=t[0],r=t[1],i=t[2],o=t[3];return this.__boundingRect[e]={x:n||0,y:r||0,width:i-n||0,height:o-r||0},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}function Hf(e){let t=e.data,n=e._boundingRect,r=e._textBoundsFn;return null!=t&&(n||r)}class $f extends Sf{constructor(){super("text"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.x,n=void 0===t?0:t,r=e.y,i=void 0===r?0:r,o=e.dx,a=void 0===o?0:o,s=e.dy,l=void 0===s?0:s,c=e.textBoundsFn,d=e.text,f=e.title,h=e.collider,p=e.boundingRect,m=e.ellipsed;super.set(e),this.attrs.x=n,this.attrs.y=i,this.attrs.dx=a,this.attrs.dy=l,this.attrs.text=d,void 0!==f&&(this.attrs.title=String(f)),"object"==typeof p?this._textBoundsFn=()=>p:"function"==typeof c&&(this._textBoundsFn=c),"string"==typeof m&&(this.ellipsed=m),this.collider=u({type:Hf(this)?"bounds":null},h),this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[t])return this.__boundingRect[t];if("function"!=typeof this._textBoundsFn)return{x:0,y:0,width:0,height:0};e=this._textBoundsFn(this.attrs);const n=w(e),r=g(x(t&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(n):n),4),i=r[0],o=r[1],a=r[2],s=r[3];return this.__boundingRect[t]={x:i,y:o,width:a-i,height:s-o},this.__boundingRect[t]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}class Wf extends Sf{constructor(){super("image"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.x,n=void 0===t?0:t,r=e.y,i=void 0===r?0:r,o=e.width,a=void 0===o?0:o,s=e.height,l=void 0===s?0:s,c=e.rx,d=void 0===c?0:c,f=e.ry,h=void 0===f?0:f,p=e.src,m=e.collider,g=e.cx,y=void 0===g?0:g,v=e.cy,b=void 0===v?0:v,x=e.r,S=void 0===x?0:x,w=e.opacity,M=e.imageScalingFactor,k=e.imagePosition,C=e.symbol;let q;q="circle"===e.symbol?u({type:"circle",cx:y,cy:b,r:S},m):u({type:"bounds",x:n,y:i,width:a,height:l},m),super.set(e),a>=0?(this.attrs.x=n,this.attrs.width=a):(this.attrs.x=n+a,this.attrs.width=-a),l>=0?(this.attrs.y=i,this.attrs.height=l):(this.attrs.y=i+l,this.attrs.height=-l),d>0&&(this.attrs.rx=d),h>0&&(this.attrs.ry=h),p&&(this.attrs.src=p),this.attrs.r=S,this.attrs.cx=y,this.attrs.cy=b,this.attrs.opacity=void 0!==w?w:1,this.attrs.imageScalingFactor=void 0!==M?M:1,this.attrs.imagePosition=k||"center-center",this.attrs.symbol=C||"rectangle",this.collider=q,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null},e.collider||(this.attrs.updateCollider=this.updateCollider.bind(this))}updateCollider(e){let t;t="circle"===e.symbol?u(this.collider,{type:"circle",cx:e.cx,cy:e.cy,r:e.r}):u(this.collider,{type:"bounds",x:e.x,y:e.y,width:e.width,height:e.height}),this.collider=t}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];const t=w(this.attrs),n=g(x(e&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(t):t),4),r=n[0],i=n[1],o=n[2],a=n[3];return this.__boundingRect[e]={x:r,y:i,width:o-r,height:a-i},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];if("circle"===this._node.symbol){const t=this.boundingRect(e),n=Math.min(t.width,t.height)/2,r=t.x-n,i=t.y-n;let o=2*n,a=2*n,s=[{x:r,y:i},{x:r+o,y:i},{x:r+o,y:i+a},{x:r,y:i+a}];if(e&&this.modelViewMatrix){s=this.modelViewMatrix.transformPoints(s);const t=g(x(s),4),n=t[0],r=t[1];o=t[2]-n,a=t[3]-r,this.__bounds[e]=[{x:n,y:r},{x:n+o,y:r},{x:n+o,y:r+a},{x:n,y:r+a}]}else this.__bounds[e]=s;return this.__bounds[e]}const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}const Uf=Ne();function Yf(e,t){return Uf.get(e)(t)}Uf.add("rect",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new If(...t)}),Uf.add("circle",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Lf(...t)}),Uf.add("text",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new $f(...t)}),Uf.add("line",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Pf(...t)}),Uf.add("path",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Vf(...t)}),Uf.add("stage",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new qf(...t)}),Uf.add("container",Cf),Uf.add("defs",Cf),Uf.add("linearGradient",Of),Uf.add("radialGradient",Of),Uf.add("conicGradient",Of),Uf.add("stop",Of),Uf.add("pattern",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new _f(...t)}),Uf.add("image",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Wf(...t)});const Kf=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=[{}];function n(){return t[t.length-1]}return n.save=function(){let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const i=n(),o={};let a="";for(let t=0;t<e.length;t++)a=e[t],void 0!==i[a]&&(o[a]=i[a]);return u(o,r),t.push(o),n()},n.restore=function(){t.splice(t.length-1,1)},n}(["stroke","fill","strokeWidth","opacity","fontFamily","fontSize","baseline"]);function Gf(e,t){if(Array.isArray(t))for(let n=0,r=t.length;n<r;n++)t[n](e)}function Xf(e,t,n){e.node=n[t],e.index=t}function Jf(e,t,n,r){let i=!1;const o={siblings:e,node:null,index:0};for(let a=0,s=e.length;a<s;a++){if(Xf(o,a,e),Gf(o,r.create),i="function"==typeof o.node.disabled?o.node.disabled():o.node.disabled,i)continue;o.node=Kf.save(o.node);const s=Yf(o.node.type,o.node);s&&(o.node.transform&&(n.save(),rf(o.node.transform,n)),n.isIdentity()||(s.modelViewMatrix=n.clone()),t.addChild(s),o.node.children&&Jf(o.node.children,s,n,r),o.node.transform&&n.restore()),Kf.restore()}}function Zf(e){let t=e.items,n=e.stage,r=e.dpi,i=e.on,o=void 0===i?{}:i;return n||(n=Yf("stage",r)),Jf(t,n,new Jd,o),n}function Qf(e,t,n){const r=n.orientation,i=n.degree,o=n.stops,a=void 0===o?[]:o;let s=null;if("radial"===r){const n=t.boundingRect();s=e.createRadialGradient(n.x+n.width/2,n.y+n.height/2,1e-5,n.x+n.width/2,n.y+n.height/2,Math.max(n.width,n.height)/2)}else if("conic"===r){const t=n.startAngle||0,r=n.x||0,i=n.y||0;s=e.createConicGradient(t,r,i)}else{const r=Zo(i);["x1","x2","y1","y2"].forEach(e=>{e in n&&(r[e]=n[e])});const o=t.boundingRect();s=e.createLinearGradient(o.x+r.x1*o.width,o.y+r.y1*o.height,o.x+r.x2*o.width,o.y+r.y2*o.height)}for(let e=0,t=a.length;e<t;e++){let t=a[e];s.addColorStop(t.offset,t.color)}return s}function eh(e,t,n){return t.width=e.width,t.height=e.height,n.save(),n.fillStyle=e.fill,e.shapes.forEach(e=>{if("rect"===e.type)n.rect(e.x,e.y,e.width,e.height)}),n.fill(),n.restore(),n.createPattern(t,"repeat")}function th(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.x,n=e.y,r=e.width,i=e.height,o=e.scaleRatio,a=e.margin,s=e.edgeBleed;const l={x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1},margin:{left:0,top:0},edgeBleed:{left:0,right:0,top:0,bottom:0,bool:!1}};return l.x=isNaN(t)?l.x:t,l.y=isNaN(n)?l.y:n,l.width=isNaN(r)?l.width:r,l.height=isNaN(i)?l.height:i,void 0!==o&&(l.scaleRatio.x=isNaN(o.x)?l.scaleRatio.x:o.x,l.scaleRatio.y=isNaN(o.y)?l.scaleRatio.y:o.y),void 0!==a&&(l.margin.left=isNaN(a.left)?0:a.left,l.margin.top=isNaN(a.top)?0:a.top),"object"==typeof s&&["left","right","top","bottom"].forEach(e=>{!isNaN(s[e])&&s[e]>0&&(l.edgeBleed[e]=s[e],l.edgeBleed.bool=!0)}),l.computedPhysical={x:Math.round(l.margin.left+(l.x-l.edgeBleed.left)*l.scaleRatio.x),y:Math.round(l.margin.top+(l.y-l.edgeBleed.top)*l.scaleRatio.y),width:Math.round((l.width+l.edgeBleed.left+l.edgeBleed.right)*l.scaleRatio.x),height:Math.round((l.height+l.edgeBleed.top+l.edgeBleed.bottom)*l.scaleRatio.y)},l}function nh(){const e={element:()=>{},root:()=>{},settings:()=>{},appendTo:()=>{},getScene:()=>[],render:()=>!1,itemsAt:()=>[],findShapes:()=>[],clear:()=>{},destory:()=>{},size:()=>{},measureText:Cu,textBounds:Eu,setKey:t=>{e.element().setAttribute("data-key",t)}};return e}function rh(e){return t=>{let n=t.node;"text"===n.type&&function(e){return null!=e}(n.data)&&!n.textBoundsFn&&(n.textBoundsFn=e.textBounds)}}const ih=200,oh=200;class ah{constructor(e){this.targetCanvas=e,this.bufferCanvas=e.cloneNode()}updateSize(e){let t,n=e.rect,r=e.dpiRatio,i=e.canvasBufferSize;t=i?"function"==typeof i?i(n):i:{width:n.computedPhysical.width+2*ih,height:n.computedPhysical.height+2*oh},this.bufferCanvas.style.width="".concat(t.width,"px"),this.bufferCanvas.style.height="".concat(t.height,"px"),this.bufferCanvas.width=Math.round(t.width*r),this.bufferCanvas.height=Math.round(t.height*r)}apply(){this.targetCanvas.getContext("2d").drawImage(this.bufferCanvas,0,0)}clear(){this.bufferCanvas.width=this.bufferCanvas.width}getContext(){return this.bufferCanvas.getContext("2d")}}const sh=Ne();function lh(e){return Array.isArray(e)?e:"string"==typeof e?-1!==e.indexOf(",")?e.split(","):e.split(" "):[]}function ch(e){return("undefined"==typeof window?1:window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)}function uh(e,t){t.setTransform(e[0][0],e[1][0],e[0][1],e[1][1],e[0][2],e[1][2])}function dh(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=Object.keys(r);for(let i=0,o=n.length;i<o;i++){let o=n[i];const a=o[0],s=o[1],l=o[2];if(a in t.attrs&&!(s in r)&&e[s]!==t.attrs[a]){const n=l?l(t.attrs[a]):t.attrs[a];"function"==typeof e[s]?e[s](n):e[s]=n}}for(let t=0,n=i.length;t<n;t++){const n=i[t];e[n]=r[n]}}function fh(e,t,n,r){for(let i=0,o=e.length;i<o;i++){let o=e[i],a={};t.save(),o.attrs&&(o.attrs.fill||o.attrs.stroke)&&(o.attrs.fill&&"object"==typeof o.attrs.fill&&"gradient"===o.attrs.fill.type?a.fillStyle=Qf(t,o,o.attrs.fill):o.attrs.fill&&"object"==typeof o.attrs.fill&&"pattern"===o.attrs.fill.type&&(a.fillStyle=r.patterns.create(o.attrs.fill)),o.attrs.stroke&&"object"==typeof o.attrs.stroke&&"gradient"===o.attrs.stroke.type?a.strokeStyle=Qf(t,o,o.attrs.stroke):o.attrs.stroke&&"object"==typeof o.attrs.stroke&&"pattern"===o.attrs.stroke.type&&(a.strokeStyle=r.patterns.create(o.attrs.stroke))),dh(t,o,n,a),o.modelViewMatrix&&uh(o.modelViewMatrix.elements,t),sh.has(o.type)&&sh.get(o.type)(o.attrs,{g:t,doFill:"fill"in o.attrs&&"none"!==o.attrs.fill,doStroke:"stroke"in o.attrs&&0!==o.attrs["stroke-width"],ellipsed:o.ellipsed}),o.children&&fh(o.children,t,n,r),t.restore()}}function hh(){let e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Zf;const r={transform:void 0,canvasBufferSize:void 0,progressive:void 0};let i,o=!1,a=th();const s=[["fill","fillStyle"],["stroke","strokeStyle"],["opacity","globalAlpha"],["globalAlpha","globalAlpha"],["stroke-width","lineWidth"],["stroke-linejoin","lineJoin"],["stroke-dasharray","setLineDash",lh]];let l;const c=nh();return c.element=()=>e,c.root=()=>e,c.settings=e=>(e&&Object.keys(r).forEach(t=>{void 0!==e[t]&&(r[t]=e[t])}),r),c.appendTo=n=>(e||(e=n.ownerDocument.createElement("canvas"),e.style.position="absolute",e.style["-webkit-font-smoothing"]="antialiased",e.style["-moz-osx-font-smoothing"]="antialiased",e.style.pointerEvents="none"),"function"!=typeof r.transform||t||(t=new ah(e)),n.appendChild(e),e),c.getScene=r=>{const i=ch(t&&t.getContext()||e.getContext("2d")),o=a.scaleRatio.x,s=a.scaleRatio.y,l={type:"container",children:r,transform:a.edgeBleed.bool?"translate(".concat(a.edgeBleed.left*i*o,", ").concat(a.edgeBleed.top*i*s,")"):""};return 1===i&&1===o&&1===s||(l.transform+="scale(".concat(i*o,", ").concat(i*s,")")),n({items:[l],dpi:i,on:{create:[mu(c.measureText),rh(c)]}})},c.render=n=>{if(!e)return!1;l||(l=function(e){const t=e.createElement("canvas"),n=t.getContext("2d");let r={};return{create(e){const i=e.key;return i?(r[i]=r[i]||eh(e,t,n),r[i]):eh(e,t,n)},clear(){r={}}}}(e.ownerDocument));const u=t&&t.getContext()||e.getContext("2d"),d=ch(u),f=t&&r.transform();if(f)return e.width=e.width,function(e){let t=e.el,n=e.dpiRatio,r=e.transform;if("object"==typeof r){const e=[r.horizontalScaling,r.horizontalSkewing,r.verticalSkewing,r.verticalScaling,r.horizontalMoving*n,r.verticalMoving*n];t.getContext("2d").setTransform(...e)}}({el:e,dpiRatio:d,transform:f}),t.apply(),!0;o&&(e.style.left="".concat(a.computedPhysical.x,"px"),e.style.top="".concat(a.computedPhysical.y,"px"),e.style.width="".concat(a.computedPhysical.width,"px"),e.style.height="".concat(a.computedPhysical.height,"px"),e.width=Math.round(a.computedPhysical.width*d),e.height=Math.round(a.computedPhysical.height*d),t&&t.updateSize({rect:a,dpiRatio:d,canvasBufferSize:r.canvasBufferSize}));const h=c.getScene(n),p=!i||!h.equals(i);l.clear();const m=o||p,g="function"==typeof r.progressive&&r.progressive();return m&&(g&&!g.isFirst||c.clear(),fh(h.children,u,s,{patterns:l})),t&&(e.width=e.width,t.apply()),o=!1,g&&!g.isFirst&&h.children.unshift(...i.children),i=h,m},c.itemsAt=e=>i?i.getItemsFrom(e):[],c.findShapes=e=>i?i.findShapes(e):[],c.clear=()=>(e&&(e.width=e.width),t&&t.clear(),i=null,c),c.size=e=>{if(e){const t=th(e);JSON.stringify(a)!==JSON.stringify(t)&&(o=!0,a=t)}return a},c.destroy=()=>{e&&(e.parentElement&&e.parentElement.removeChild(e),e=null),t&&(t=null),i=null},c}function ph(e,t){sh.add(e,t)}function mh(e,t){return Math.max(0,Math.min(e,t))}const gh=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗＡ-Ｚａ-ｚｦ-ￜ]"),yh=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),vh=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]");function bh(e){return gh.test(e)}function xh(e){return yh.test(e)||vh.test(e)}function Sh(e){let t,n,r=e?e.length:0;for(t=0;t<r;t++){if(n=e[t],bh(n))return"ltr";if(xh(n))return"rtl"}return"ltr"}const wh={start:"end",end:"start",center:"center",middle:"middle"};function Mh(e,t){return"rtl"===t?wh[e]:e}function kh(e,t){if(kh.cache[e])return void t(kh.cache[e]);const n=new Image;n.src=e,n.onload=()=>{kh.cache[e]=n,t(n)},n.onerror=e=>{console.error("Image load error",e)}}function Ch(e,t){const n=[];let r;const i=[],o=[],a=[];let s,l;const c=e=>e.id,u=(e,t)=>{let n;return n="object"==typeof e?"id"in e?e.id:t:e,{content:e,id:"".concat(n,"__").concat(e.type||"")}};e.isTree||(e=e.map(u)),t=t.map(u),s=e.map(c),l=t.map(c);for(let e=0,r=t.length;e<r;e++){-1===s.indexOf(t[e].id)?n.push(t[e]):o.push(t[e])}for(let t=0,n=e.length;t<n;t++){-1===l.indexOf(e[t].id)?i.push(e[t]):a.push(e[t])}for(let e=0,t=n.length;e<t;e++)n[e].content.children&&(n[e].diff=Ch([],n[e].content.children),n[e].children=n[e].diff.updatedNew.concat(n[e].diff.added),n[e].children.isTree=!0);for(let e=0,t=o.length;e<t;e++)o[e].diff=Ch(a[e].children||[],o[e].content.children||[]),o[e].object=a[e].object,o[e].children=o[e].diff.items;return r=o.concat(n),n.isTree=!0,i.isTree=!0,o.isTree=!0,a.isTree=!0,r.isTree=!0,{added:n,updatedNew:o,updatedOld:a,removed:i,items:r}}function qh(e,t,n){for(let r=0,i=e.length;r<i;r++)e[r].object=n(e[r].content.type,t)}function Eh(e,t){for(let n=0,r=e.length;n<r;n++)null!==e[n].object&&void 0!==e[n].object&&(t(e[n].object),e[n].object=null)}function Dh(e,t,n,r){let i;for(let o=0,a=e.length;o<a;o++)i=e[o],null!==i.object&&void 0!==i.object&&(n(i.object,i.content),i.diff&&(qh(i.diff.added,i.object,t),Eh(i.diff.removed,r),Dh(i.diff.items,t,n,r)))}function Th(e,t,n,r,i,o){const a=Ch(e,t);return qh(a.added,n,r),Eh(a.removed,o),Dh(a.items,r,i,o),a.items}kh.cache={},ph("rect",function(e,t){let n=t.g,r=t.doFill,i=t.doStroke;n.beginPath(),e.rx>0||e.ry>0?function(e,t,n,r,i,o,a){o=mh(r/2,o>0?o:a),a=mh(i/2,a>0?a:o),e.moveTo(t,n+a),e.lineTo(t,n+i-a),e.quadraticCurveTo(t,n+i,t+o,n+i),e.lineTo(t+r-o,n+i),e.quadraticCurveTo(t+r,n+i,t+r,n+i-a),e.lineTo(t+r,n+a),e.quadraticCurveTo(t+r,n,t+r-o,n),e.lineTo(t+o,n),e.quadraticCurveTo(t,n,t,n+a)}(n,e.x,e.y,e.width,e.height,e.rx,e.ry):n.rect(e.x,e.y,e.width,e.height),r&&n.fill(),i&&n.stroke()}),ph("circle",function(e,t){let n=t.g,r=t.doFill,i=t.doStroke;n.beginPath(),n.moveTo(e.cx+e.r,e.cy),n.arc(e.cx,e.cy,e.r,0,2*Math.PI,!1),r&&n.fill(),i&&n.stroke()}),ph("line",function(e,t){let n=t.g,r=t.doStroke;n.beginPath(),n.moveTo(e.x1,e.y1),n.lineTo(e.x2,e.y2),r&&n.stroke()}),ph("path",function(e,t){let n=t.g,r=t.doStroke,i=t.doFill;const o=new Path2D(e.d);i&&n.fill(o),r&&n.stroke(o)}),ph("text",function(e,t){let n=t.g,r=t.ellipsed,i=t.doStroke;const o=r||gu(e,Cu);n.font=[e["font-style"],e["font-weight"],e["font-size"],e["font-family"]].filter(e=>!!e).join(" ");const a=Sh(e.text);n.canvas.dir!==a&&(n.canvas.dir=a);const s=Mh("middle"===e["text-anchor"]?"center":e["text-anchor"],n.canvas.dir);s&&n.textAlign!==s&&(n.textAlign=s);const l=yu(e);n.fillText(o,e.x+e.dx,e.y+e.dy+l),i&&n.strokeText(o,e.x+e.dx,e.y+e.dy+l)}),ph("image",function(e,t){let n=t.g;const r=n.canvas,i=n.getTransform(),o=window.devicePixelRatio||1,a=r.clientWidth*o,s=r.clientHeight*o;r.width===a&&r.height===s||(r.width=a,r.height=s),kh(e.src,t=>{if(n.setTransform(1,0,0,1,0,0),n.clearRect(0,0,r.width,r.height),n.setTransform(i),n.globalAlpha=e.opacity,e.width||e.height||(e.width=t.naturalWidth*e.imageScalingFactor,e.height=t.naturalHeight*e.imageScalingFactor),function(e){const t=e.imagePosition||"center-center";let n=e.width,r=e.height;if("circle"===e.symbol){const t=Math.min(e.width,e.height)/2;n=2*t,r=2*t}switch(t){case"top-center":e.y-=r/2;break;case"center-left":e.x-=n/2;break;case"center-right":e.x+=n/2;break;case"top-left":e.x-=n/2,e.y-=r/2;break;case"top-right":e.x+=n/2,e.y-=r/2;break;case"bottom-left":e.x-=n/2,e.y+=r/2;break;case"bottom-right":e.x+=n/2,e.y+=r/2;break;case"bottom-center":e.y+=r/2}}(e),"circle"===e.symbol){const r=e.x,i=e.y;e.r=Math.min(e.width,e.height)/2;const o=r-e.width/2,a=i-e.height/2;n.save(),n.beginPath(),n.arc(r,i,e.r,0,2*Math.PI),n.clip(),n.drawImage(t,o,a,e.width,e.height),n.restore()}else e.x-=e.width/2,e.y-=e.height/2,n.drawImage(t,e.x,e.y,e.width,e.height);n.globalAlpha=1,e.updateCollider&&e.updateCollider(e)})});const Oh="http://www.w3.org/2000/svg",Nh=(e,t)=>{if(!e||"string"!=typeof e)throw new Error("Invalid type: ".concat(e));const n=t.ownerDocument.createElementNS(Oh,"container"===e?"g":e);return t.appendChild(n),n},Ah=e=>{e.parentNode&&e.parentNode.removeChild(e)};function _h(e){let t=e.element,n=e.attrs;return function(){const e=n.width,r=n.height,i=n.imagePosition,o=n.imageScalingFactor,a=n.symbol;let s=n.x,l=void 0===s?0:s,c=n.y,u=void 0===c?0:c,d=e>0?e:this.naturalWidth,f=r>0?r:this.naturalHeight;switch(o&&(d*=o,f*=o),i){case"top-center":u-=f/2;break;case"center-left":l-=d/2;break;case"center-right":l+=d/2;break;case"top-left":l-=d/2,u-=f/2;break;case"top-right":l+=d/2,u-=f/2;break;case"bottom-left":l-=d/2,u+=f/2;break;case"bottom-right":l+=d/2,u+=f/2;break;case"bottom-center":u+=f/2}if(t.setAttribute("width",d),t.setAttribute("height",f),t.setAttribute("x",l-d/2),t.setAttribute("y",u-f/2),t.setAttribute("preserveAspectRatio","none"),"circle"===a){const e=t.ownerSVGElement;if(!e)return;const n="clip-".concat(Math.random().toString(36).substr(2,9));if(!e.querySelector("#".concat(n))){const t=e.querySelector("defs")||e.insertBefore(document.createElementNS(Oh,"defs"),e.firstChild),r=document.createElementNS(Oh,"clipPath");r.setAttribute("id",n);const i=document.createElementNS(Oh,"circle");i.setAttribute("cx",l),i.setAttribute("cy",u),i.setAttribute("r",Math.min(d,f)/2),r.appendChild(i),t.appendChild(r)}t.setAttribute("clip-path","url(#".concat(n,")"))}}}const Ih=(e,t)=>{if((e=>{switch(e.type){case"circle":return!isNaN(e.attrs.cx)&&!isNaN(e.attrs.cy)&&!isNaN(e.attrs.r);case"line":return!(isNaN(e.attrs.x1)||isNaN(e.attrs.y1)||isNaN(e.attrs.x2)||isNaN(e.attrs.y2));case"rect":return!(isNaN(e.attrs.x)||isNaN(e.attrs.y)||isNaN(e.attrs.width)||isNaN(e.attrs.height));case"text":case"image":return!isNaN(e.attrs.x)&&!isNaN(e.attrs.y);default:return!0}})(t)){for(const n in t.attrs)if("stroke"===n&&t.strokeReference)e.setAttribute("stroke",t.strokeReference);else if("fill"===n&&t.fillReference)e.setAttribute("fill",t.fillReference);else if("text"===n){e.setAttribute("style","white-space: pre"),e.textContent=t.ellipsed||gu(t.attrs,Cu);const n=Sh(t.attrs.text);"rtl"===n&&(e.setAttribute("direction","rtl"),e.setAttribute("dir","rtl"),e.setAttribute("text-anchor",Mh(e.getAttribute("text-anchor"),n)))}else if("text"!==t.type||"dy"!==n&&"dominant-baseline"!==n)if("text"===t.type&&"title"===n&&t.attrs.title){const n=e.ownerDocument.createElementNS(Oh,"title");n.textContent=t.attrs.title,e.appendChild(n)}else if("image"===t.type&&"src"===n){e.setAttributeNS("http://www.w3.org/1999/xlink","href",t.attrs.src);let n=new Image;n.src=t.attrs.src,n.onload=_h({element:e,attrs:t.attrs})}else e.setAttribute(n,t.attrs[n]);else{const r=+e.getAttribute(n)||0;let i=0;i="dominant-baseline"===n?yu(t.attrs):t.attrs[n],e.setAttribute("dy",i+r)}if("string"==typeof t.data||"number"==typeof t.data||"boolean"==typeof t.data)e.setAttribute("data",t.data);else if("object"==typeof t.data&&null!==t.data)for(const n in t.data)"string"!=typeof t.data[n]&&"number"!=typeof t.data[n]&&"boolean"!=typeof t.data[n]||e.setAttribute("data-".concat(n),t.data[n])}};class Lh{constructor(e,t,n,r){this.create=e,this.nodeCreator=t,this.nodeMaintainer=n,this.nodeDestroyer=r}render(e,t){return this.create([],e,t,this.nodeCreator,this.nodeMaintainer,this.nodeDestroyer)}}function Ph(){return new Lh(Th,Nh,Ih,Ah)}function Rh(e){let t,n,r,i=0;if(0===(e=JSON.stringify(e)).length)return i;for(t=0,r=e.length;t<r;t++)n=e.charCodeAt(t),i=(i<<5)-i+n,i&=i;return i}function zh(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Oh,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Zf;const n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ph)();let r,i,o,a=!1,s=th();const l={transform:void 0,disableScreenReader:!1},c=nh(),u={type:"defs",children:[]},d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Rh,n={},r=Date.now();const i={onCreate(i){let o={};i.node&&"object"==typeof i.node.fill&&"pattern"===i.node.fill.type&&i.node.fill.shapes&&(o.fill=i.node.fill),i.node&&"object"==typeof i.node.stroke&&"pattern"===i.node.stroke.type&&i.node.stroke.shapes&&(o.stroke=i.node.stroke),Object.keys(o).forEach(a=>{let s="";const l=o[a],c=t(l),u="picasso-pattern-".concat(r,"-").concat(c);if("undefined"!=typeof window&&(s=window.location.href.split("#")[0]),!n[c]){const t={patternUnits:"userSpaceOnUse",x:0,y:0,width:l.width,height:l.height,type:"pattern",id:u,children:[],fill:l.fill};l.shapes.forEach(e=>{t.children.push(e)}),e.push(t),n[c]=!0}i.node["".concat(a,"Reference")]="url('".concat(s,"#").concat(u,"')")})},clear(){n={}}};return i}(u.children),f=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Rh,n={},r=Date.now();const i={getOrCreateGradient(){let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"fill",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",s=t(i[o]),l="picasso-gradient-".concat(r,"-").concat(s);if(!n[s]){let t=i[o],r=t.orientation,a=t.degree,c=t.stops,u=void 0===c?[]:c,d={};void 0===a&&(a=90),"radial"===r?d.type="radialGradient":(d=Zo(a),["x1","x2","y1","y2"].forEach(e=>{e in i[o]&&(d[e]=i[o][e])}),d.type="linearGradient"),d.id=l,d.children=u.map(e=>{let t=e.offset,n=e.color,r=e.opacity;return{type:"stop",offset:"".concat(100*t,"%"),style:"stop-color:".concat(n,";stop-opacity:").concat(void 0!==r?r:1)}}),e.push(d),n[s]=l}return"url('".concat(a,"#").concat(l,"')")},onCreate(e){let t="";"undefined"!=typeof window&&(t=window.location.href.split("#")[0]);const n=e.node;n.fill&&"object"==typeof n.fill&&"gradient"===n.fill.type&&(n.fillReference=i.getOrCreateGradient(n,"fill",t)),n.stroke&&"object"==typeof n.stroke&&"gradient"===n.stroke.type&&(n.strokeReference=i.getOrCreateGradient(n,"stroke",t))},clear(){n={}}};return i}(u.children);return c.element=()=>r,c.root=()=>i,c.settings=e=>(e&&Object.keys(l).forEach(t=>{void 0!==e[t]&&(l[t]=e[t])}),l),c.appendTo=t=>(r||(r=t.ownerDocument.createElementNS(e,"svg"),r.style.position="absolute",r.style["-webkit-font-smoothing"]="antialiased",r.style["-moz-osx-font-smoothing"]="antialiased",r.style.pointerEvents="none",r.setAttribute("xmlns",e),i=t.ownerDocument.createElementNS(e,"g"),i.style.pointerEvents="auto",r.appendChild(i)),t.appendChild(r),r),c.getScene=e=>{const n=s.scaleRatio.x,r=s.scaleRatio.y,i={type:"container",children:Array.isArray(e)?[...e,u]:e,transform:s.edgeBleed.bool?"translate(".concat(s.edgeBleed.left*n,", ").concat(s.edgeBleed.top*r,")"):""};return 1===n&&1===r||(i.transform+="scale(".concat(n,", ").concat(r,")")),t({items:[i],on:{create:[e=>{e.node.fillReference=void 0,e.node.strokeReference=void 0},f.onCreate,d.onCreate,mu(c.measureText),rh(c)]}})},c.render=e=>{if(!r)return!1;const t="function"==typeof l.transform&&l.transform();if(t){const e=t.horizontalScaling,n=t.horizontalSkewing,r=t.verticalSkewing,o=t.verticalScaling,a=t.horizontalMoving,s=t.verticalMoving;return i.style.transform="matrix(".concat(e,", ").concat(n,", ").concat(r,", ").concat(o,", ").concat(a,", ").concat(s,")"),!0}i.style.transform="";l.disableScreenReader&&r.setAttribute("aria-hidden",!0),a&&(r.style.left="".concat(s.computedPhysical.x,"px"),r.style.top="".concat(s.computedPhysical.y,"px"),r.setAttribute("width",s.computedPhysical.width),r.setAttribute("height",s.computedPhysical.height)),f.clear(),d.clear(),u.children.length=0;const h=c.getScene(e),p=!o||!h.equals(o),m=a||p;return m&&(c.clear(),n.render(h.children,i)),a=!1,o=h,m},c.itemsAt=e=>o?o.getItemsFrom(e):[],c.findShapes=e=>o?o.findShapes(e):[],c.clear=()=>{if(!i)return c;o=null;const e=i.cloneNode(!1);return r.replaceChild(e,i),i=e,c},c.destroy=()=>{r&&r.parentNode&&r.parentNode.removeChild(r),r=null,i=null},c.size=e=>{if(e){const t=th(e);JSON.stringify(s)!==JSON.stringify(t)&&(a=!0,s=t)}return s},c}var Fh,jh,Bh,Vh,Hh,$h,Wh,Uh={},Yh=[],Kh=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Gh(e,t){for(var n in t)e[n]=t[n];return e}function Xh(e){var t=e.parentNode;t&&t.removeChild(e)}function Jh(e,t,n){var r,i,o,a={};for(o in t)"key"==o?r=t[o]:"ref"==o?i=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?Fh.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===a[o]&&(a[o]=e.defaultProps[o]);return Zh(e,a,r,i,null)}function Zh(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++Bh:i};return null==i&&null!=jh.vnode&&jh.vnode(o),o}function Qh(e){return e.children}function ep(e,t){this.props=e,this.context=t}function tp(e,t){if(null==t)return e.__?tp(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?tp(e):null}function np(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return np(e)}}function rp(e){(!e.__d&&(e.__d=!0)&&Vh.push(e)&&!ip.__r++||Hh!==jh.debounceRendering)&&((Hh=jh.debounceRendering)||$h)(ip)}function ip(){var e,t,n,r,i,o,a,s;for(Vh.sort(Wh);e=Vh.shift();)e.__d&&(t=Vh.length,r=void 0,i=void 0,a=(o=(n=e).__v).__e,(s=n.__P)&&(r=[],(i=Gh({},o)).__v=o.__v+1,hp(s,o,i,n.__n,void 0!==s.ownerSVGElement,null!=o.__h?[a]:null,r,null==a?tp(o):a,o.__h),pp(r,o),o.__e!=a&&np(o)),Vh.length>t&&Vh.sort(Wh));ip.__r=0}function op(e,t,n,r,i,o,a,s,l,c){var u,d,f,h,p,m,g,y=r&&r.__k||Yh,v=y.length;for(n.__k=[],u=0;u<t.length;u++)if(null!=(h=n.__k[u]=null==(h=t[u])||"boolean"==typeof h||"function"==typeof h?null:"string"==typeof h||"number"==typeof h||"bigint"==typeof h?Zh(null,h,null,null,h):Array.isArray(h)?Zh(Qh,{children:h},null,null,null):h.__b>0?Zh(h.type,h.props,h.key,h.ref?h.ref:null,h.__v):h)){if(h.__=n,h.__b=n.__b+1,null===(f=y[u])||f&&h.key==f.key&&h.type===f.type)y[u]=void 0;else for(d=0;d<v;d++){if((f=y[d])&&h.key==f.key&&h.type===f.type){y[d]=void 0;break}f=null}hp(e,h,f=f||Uh,i,o,a,s,l,c),p=h.__e,(d=h.ref)&&f.ref!=d&&(g||(g=[]),f.ref&&g.push(f.ref,null,h),g.push(d,h.__c||p,h)),null!=p?(null==m&&(m=p),"function"==typeof h.type&&h.__k===f.__k?h.__d=l=ap(h,l,e):l=sp(e,h,f,y,p,l),"function"==typeof n.type&&(n.__d=l)):l&&f.__e==l&&l.parentNode!=e&&(l=tp(f))}for(n.__e=m,u=v;u--;)null!=y[u]&&("function"==typeof n.type&&null!=y[u].__e&&y[u].__e==n.__d&&(n.__d=lp(r).nextSibling),gp(y[u],y[u]));if(g)for(u=0;u<g.length;u++)mp(g[u],g[++u],g[++u])}function ap(e,t,n){for(var r,i=e.__k,o=0;i&&o<i.length;o++)(r=i[o])&&(r.__=e,t="function"==typeof r.type?ap(r,t,n):sp(n,r,r,i,r.__e,t));return t}function sp(e,t,n,r,i,o){var a,s,l;if(void 0!==t.__d)a=t.__d,t.__d=void 0;else if(null==n||i!=o||null==i.parentNode)e:if(null==o||o.parentNode!==e)e.appendChild(i),a=null;else{for(s=o,l=0;(s=s.nextSibling)&&l<r.length;l+=1)if(s==i)break e;e.insertBefore(i,o),a=o}return void 0!==a?a:i.nextSibling}function lp(e){var t,n,r;if(null==e.type||"string"==typeof e.type)return e.__e;if(e.__k)for(t=e.__k.length-1;t>=0;t--)if((n=e.__k[t])&&(r=lp(n)))return r;return null}function cp(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||Kh.test(t)?n:n+"px"}function up(e,t,n,r,i){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||cp(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||cp(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r||e.addEventListener(t,o?fp:dp,o):e.removeEventListener(t,o?fp:dp,o);else if("dangerouslySetInnerHTML"!==t){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,n))}}function dp(e){return this.l[e.type+!1](jh.event?jh.event(e):e)}function fp(e){return this.l[e.type+!0](jh.event?jh.event(e):e)}function hp(e,t,n,r,i,o,a,s,l){var c,u,d,f,h,p,m,g,y,v,b,x,S,w,M,k=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(l=n.__h,s=t.__e=n.__e,t.__h=null,o=[s]),(c=jh.__b)&&c(t);try{e:if("function"==typeof k){if(g=t.props,y=(c=k.contextType)&&r[c.__c],v=c?y?y.props.value:c.__:r,n.__c?m=(u=t.__c=n.__c).__=u.__E:("prototype"in k&&k.prototype.render?t.__c=u=new k(g,v):(t.__c=u=new ep(g,v),u.constructor=k,u.render=yp),y&&y.sub(u),u.props=g,u.state||(u.state={}),u.context=v,u.__n=r,d=u.__d=!0,u.__h=[],u._sb=[]),null==u.__s&&(u.__s=u.state),null!=k.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=Gh({},u.__s)),Gh(u.__s,k.getDerivedStateFromProps(g,u.__s))),f=u.props,h=u.state,u.__v=t,d)null==k.getDerivedStateFromProps&&null!=u.componentWillMount&&u.componentWillMount(),null!=u.componentDidMount&&u.__h.push(u.componentDidMount);else{if(null==k.getDerivedStateFromProps&&g!==f&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(g,v),!u.__e&&null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(g,u.__s,v)||t.__v===n.__v){for(t.__v!==n.__v&&(u.props=g,u.state=u.__s,u.__d=!1),u.__e=!1,t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(e){e&&(e.__=t)}),b=0;b<u._sb.length;b++)u.__h.push(u._sb[b]);u._sb=[],u.__h.length&&a.push(u);break e}null!=u.componentWillUpdate&&u.componentWillUpdate(g,u.__s,v),null!=u.componentDidUpdate&&u.__h.push(function(){u.componentDidUpdate(f,h,p)})}if(u.context=v,u.props=g,u.__P=e,x=jh.__r,S=0,"prototype"in k&&k.prototype.render){for(u.state=u.__s,u.__d=!1,x&&x(t),c=u.render(u.props,u.state,u.context),w=0;w<u._sb.length;w++)u.__h.push(u._sb[w]);u._sb=[]}else do{u.__d=!1,x&&x(t),c=u.render(u.props,u.state,u.context),u.state=u.__s}while(u.__d&&++S<25);u.state=u.__s,null!=u.getChildContext&&(r=Gh(Gh({},r),u.getChildContext())),d||null==u.getSnapshotBeforeUpdate||(p=u.getSnapshotBeforeUpdate(f,h)),M=null!=c&&c.type===Qh&&null==c.key?c.props.children:c,op(e,Array.isArray(M)?M:[M],t,n,r,i,o,a,s,l),u.base=t.__e,t.__h=null,u.__h.length&&a.push(u),m&&(u.__E=u.__=null),u.__e=!1}else null==o&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=function(e,t,n,r,i,o,a,s){var l,c,u,d=n.props,f=t.props,h=t.type,p=0;if("svg"===h&&(i=!0),null!=o)for(;p<o.length;p++)if((l=o[p])&&"setAttribute"in l==!!h&&(h?l.localName===h:3===l.nodeType)){e=l,o[p]=null;break}if(null==e){if(null===h)return document.createTextNode(f);e=i?document.createElementNS("http://www.w3.org/2000/svg",h):document.createElement(h,f.is&&f),o=null,s=!1}if(null===h)d===f||s&&e.data===f||(e.data=f);else{if(o=o&&Fh.call(e.childNodes),c=(d=n.props||Uh).dangerouslySetInnerHTML,u=f.dangerouslySetInnerHTML,!s){if(null!=o)for(d={},p=0;p<e.attributes.length;p++)d[e.attributes[p].name]=e.attributes[p].value;(u||c)&&(u&&(c&&u.__html==c.__html||u.__html===e.innerHTML)||(e.innerHTML=u&&u.__html||""))}if(function(e,t,n,r,i){var o;for(o in n)"children"===o||"key"===o||o in t||up(e,o,null,n[o],r);for(o in t)i&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===t[o]||up(e,o,t[o],n[o],r)}(e,f,d,i,s),u)t.__k=[];else if(p=t.props.children,op(e,Array.isArray(p)?p:[p],t,n,r,i&&"foreignObject"!==h,o,a,o?o[0]:n.__k&&tp(n,0),s),null!=o)for(p=o.length;p--;)null!=o[p]&&Xh(o[p]);s||("value"in f&&void 0!==(p=f.value)&&(p!==e.value||"progress"===h&&!p||"option"===h&&p!==d.value)&&up(e,"value",p,d.value,!1),"checked"in f&&void 0!==(p=f.checked)&&p!==e.checked&&up(e,"checked",p,d.checked,!1))}return e}(n.__e,t,n,r,i,o,a,l);(c=jh.diffed)&&c(t)}catch(e){t.__v=null,(l||null!=o)&&(t.__e=s,t.__h=!!l,o[o.indexOf(s)]=null),jh.__e(e,t,n)}}function pp(e,t){jh.__c&&jh.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){jh.__e(e,t.__v)}})}function mp(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){jh.__e(e,n)}}function gp(e,t,n){var r,i;if(jh.unmount&&jh.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||mp(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){jh.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&gp(r[i],t,n||"function"!=typeof e.type);n||null==e.__e||Xh(e.__e),e.__=e.__e=e.__d=void 0}function yp(e,t,n){return this.constructor(e,n)}function vp(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).createElement,t=void 0===e?document.createElement.bind(document):e;let n,r,i=th();const o={transform:void 0,disableScreenReader:!1},a=nh();return a.element=()=>n,a.root=()=>n,a.settings=e=>(e&&Object.keys(o).forEach(t=>{void 0!==e[t]&&(o[t]=e[t])}),o),a.appendTo=e=>(n||(n=t("div"),n.style.position="absolute",n.style["-webkit-font-smoothing"]="antialiased",n.style["-moz-osx-font-smoothing"]="antialiased",n.style.pointerEvents="none"),e.appendChild(n),n),a.render=e=>{if(!n)return!1;const t="function"==typeof o.transform&&o.transform();if(t){const e=t.horizontalScaling,r=t.horizontalSkewing,i=t.verticalSkewing,o=t.verticalScaling,a=t.horizontalMoving,s=t.verticalMoving;return n.style.transform="matrix(".concat(e,", ").concat(r,", ").concat(i,", ").concat(o,", ").concat(a,", ").concat(s,")"),!0}n.style.transform="";let a;return o.disableScreenReader&&n.setAttribute("aria-hidden",!0),n.style.left="".concat(i.computedPhysical.x,"px"),n.style.top="".concat(i.computedPhysical.y,"px"),n.style.width="".concat(i.computedPhysical.width,"px"),n.style.height="".concat(i.computedPhysical.height,"px"),a=Array.isArray(e)?Jh("div",null,e):e,r=function(e,t,n){var r,i,o;jh.__&&jh.__(e,t),i=(r="function"==typeof n)?null:n&&n.__k||t.__k,o=[],hp(t,e=(!r&&n||t).__k=Jh(Qh,null,[e]),i||Uh,Uh,void 0!==t.ownerSVGElement,!r&&n?[n]:i?null:t.firstChild?Fh.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r),pp(o,e)}(a,n,r),!0},a.renderArgs=[Jh],a.clear=()=>{if(n){let e=n.firstChild;for(;e;)n.removeChild(e),e=n.firstChild;r=null}return a},a.destroy=()=>{n&&n.parentElement&&n.parentElement.removeChild(n),n=null,r=null},a.size=e=>(e&&(i=th(e)),i),a}Fh=Yh.slice,jh={__e:function(e,t,n,r){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),a=i.__d),a)return i.__E=i}catch(t){e=t}throw e}},Bh=0,ep.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=Gh({},this.state),"function"==typeof e&&(e=e(Gh({},n),this.props)),e&&Gh(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),rp(this))},ep.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),rp(this))},ep.prototype.render=Qh,Vh=[],$h="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Wh=function(e,t){return e.__v.__b-t.__v.__b},ip.__r=0;var bp=[function(e){e.renderer("svg",zh)},function(e){e.renderer("canvas",hh)},function(e){e.renderer("dom",vp)}];const xp={OFF:0,ERROR:1,WARN:2,INFO:3,DEBUG:4};const Sp=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.level,n=void 0===t?xp.OFF:t,r=e.pipe,i=void 0===r?console:r,o=n;const a={[xp.OFF]:()=>{},[xp.ERROR]:function(){return i.error(...arguments)},[xp.WARN]:function(){return i.warn(...arguments)},[xp.INFO]:function(){return i.info(...arguments)},[xp.DEBUG]:function(){return i.log(...arguments)}},s=function(e){if(e&&!(o<e)){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];(a[e]||a[xp.DEBUG])(...n)}};return{log:s,error:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(xp.ERROR,...t)},warn:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(xp.WARN,...t)},info:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(xp.INFO,...t)},debug:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(xp.DEBUG,...t)},level:e=>("number"==typeof e&&(o=e),o),LOG_LEVEL:xp}}(t.logger),i={component:Ne(n.component,"component",r),data:Ne(n.data,"data",r),formatter:Ne(n.formatter,"formatter",r),interaction:Ne(n.interaction,"interaction",r),renderer:xs(n.renderer),scale:Ne(n.scale,"scale",r),symbol:Ne(n.symbol,"symbol",r),logger:r};function o(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e({palettes:t.palettes.concat(n.palettes||[]),style:u({},t.style,n.style),logger:n.logger||t.logger,renderer:n.renderer||t.renderer},i)}return t.renderer&&t.renderer.prio&&i.renderer.default(t.renderer.prio[0]),o.use=function(e){return function(e){e(arguments.length>2?arguments[2]:void 0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i)},o.chart=e=>bs(e,{registries:i,logger:r,style:t.style,palettes:t.palettes}),o.config=()=>t,Object.keys(i).forEach(e=>{o[e]=i[e]}),o.version=d,o}({renderer:{prio:["svg","canvas"]},logger:{level:0},style:{"$font-family":"'Source Sans Pro', Arial, sans-serif","$font-size":"12px","$line-height":"16px","$font-size--l":"16px","$font-weight":"normal","$gray-100":"#ffffff","$gray-98":"#f9f9f9","$gray-95":"#f2f2f2","$gray-90":"#e6e6e6","$gray-35":"#595959","$gray-30":"#4d4d4d","$gray-25":"#404040","$gray-20":"#333333","$border-95":"rgba(255, 255, 255, 0.05)","$border-90":"rgba(255, 255, 255, 0.1)","$border-80":"rgba(255, 255, 255, 0.2)","$border-20":"rgba(0, 0, 0, 0.2)","$border-10":"rgba(0, 0, 0, 0.1)","$border-5":"rgba(0, 0, 0, 0.05)","$primary-blue":"#3F8AB3","$primary-green":"#6CB33F","$primary-red":"#DC423F","$primary-orange":"#EF960F","$spacing--s":4,$spacing:8,"$spacing--l":12,"$font-color":"$gray-35","$font-color--inverted":"$gray-90","$guide-color":"$gray-90","$guide-color--inverted":"$gray-35",$border:"$border-80","$border--inverted":"$border-10",$shape:{fill:"$primary-blue",strokeWidth:1,stroke:"$border"},"$shape-outline":{stroke:"$primary-blue",strokeWidth:2},"$shape-guide":{stroke:"$guide-color",strokeWidth:1},"$shape-guide--inverted":{"@extend":"$shape-guide",stroke:"$guide-color--inverted"},$label:{fontSize:"$font-size",fontFamily:"$font-family",fill:"$font-color"},"$label--inverted":{$extend:"$label",fill:"$font-color--inverted"},"$label-overlay":{fontSize:"$font-size--l",fontFamily:"$font-family",fill:"$gray-100",color:"$font-color",stroke:"$guide-color--inverted",strokeWidth:1,borderRadius:4},$title:{"@extend":"$label",fontSize:"$font-size--l",fontWeight:"$font-weight",stroke:"$guide-color--inverted",strokeWidth:0},"$guide-line":{strokeWidth:1,stroke:"$guide-color"},"$guide-line--minor":{strokeWidth:1,stroke:"$gray-95"},"$padding--s":{left:"$spacing--s",right:"$spacing--s",top:"$spacing--s",bottom:"$spacing--s"},$padding:{left:"$spacing",right:"$spacing",top:"$spacing",bottom:"$spacing"},"$selection-area-target":{fill:"$primary-green",strokeWidth:0,opacity:.2}},palettes:[{key:"categorical",colors:[["#a54343","#d76c6c","#ec983d","#ecc43d","#f9ec86","#cbe989","#70ba6e","#578b60","#79d69f","#26a0a7","#138185","#65d3da"]]},{key:"diverging",colors:[["#3d52a1","#3a89c9","#77b7e5","#b4ddf7","#e6f5fe","#ffe3aa","#f9bd7e","#ed875e","#d24d3e","#ae1c3e"]]},{key:"sequential",colors:[["rgb(180,221,212)","rgb(34, 83, 90)"]]}]},{component:Ss,data:qs,formatter:nr,interaction:Es,renderer:xs(),scale:ro,symbol:ua});function wp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Mp(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Cp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kp(Object(n),!0).forEach(function(t){Mp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kp(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function qp(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return wp(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wp(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}Ld.forEach(Sp.use),bp.forEach(Sp.use),[].forEach(Sp.use);var Ep=Object.prototype.hasOwnProperty,Dp=Object.prototype.toString,Tp=Object.defineProperty,Op=Object.getOwnPropertyDescriptor,Np=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Dp.call(e)},Ap=function(e){if(!e||"[object Object]"!==Dp.call(e))return!1;var t,n=Ep.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Ep.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||Ep.call(e,t)},_p=function(e,t){Tp&&"__proto__"===t.name?Tp(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Ip=function(e,t){if("__proto__"===t){if(!Ep.call(e,t))return;if(Op)return Op(e,t).value}return e[t]},Lp=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)r=Ip(s,n),s!==(i=Ip(t,n))&&(u&&i&&(Ap(i)||(o=Np(i)))?(o?(o=!1,a=r&&Np(r)?r:[]):a=r&&Ap(r)?r:{},_p(s,{name:n,newValue:e(u,a,i)})):void 0!==i&&_p(s,{name:n,newValue:i}));return s};function Pp(e,t,n,r){if(!e)return-1;const i=n.cache,o=e.origin?e.origin():null;o&&(e=o);let a=i.fields.indexOf(e),s=-1,l=-1;if(-1===a)for(let t=0;t<i.wrappedFields.length;t++)if(l=i.wrappedFields[t].attrDims.map(e=>e.instance).indexOf(e),s=i.wrappedFields[t].attrExps.map(e=>e.instance).indexOf(e),-1!==l||-1!==s){a=t;break}if(Array.isArray(r)&&r.some((e,t)=>e!==t)){const e=r.indexOf(a);-1!==e&&(a=e)}return a-=t.qArea.qLeft,a<0||a>=t.qArea.qWidth?-1:l>=0?e=>e[a].qAttrDims.qValues[l]:s>=0?e=>e[a].qAttrExps.qValues[s]:e=>e[a]}function Rp(e,t,n){let r=n.key;const i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function zp(e){let t=e.cache,n=e.f,r=e.mainCell,i=e.p,o=e.page,a=e.rowIdx,s=e.row,l=e.sourceKey,c=e.target,u=e.targetProp,d=e.columnOrder,f=r;if(i.field&&i.field!==n){const e=Pp(i.field,o,{cache:t},d);if(-1===e)return;f=Lp({qRow:a},e(s))}c[u]=Rp(i,f,{key:l})}function Fp(e,t,n,r){const i=Array.isArray(e)?e:[e];let o=[];for(let e=0;e<i.length;e++)if(void 0!==i[e].field){const a=t.raw(),s=t.key(),l="object"==typeof i[e].field?i[e].field:t.field(i[e].field),c=r.normalizeConfig(i[e],t),u=c.props,d=c.main,f=Object.keys(u),h=!!i[e].trackBy,p=typeof i[e].trackBy,m={},g=[],y=[];for(let t=0;t<a.qDataPages.length;t++){const o=Pp(l,a.qDataPages[t],{cache:n},a.qColumnOrder);if(-1!==o)for(let c=0;c<a.qDataPages[t].qMatrix.length;c++){const v=a.qDataPages[t].qArea.qTop+c,b=Lp({qRow:v},o(a.qDataPages[t].qMatrix[c])),x=Rp(d,b,{key:s});if(!(d.filter&&!d.filter(b))){for(let e=0;e<f.length;e++){const r=u[f[e]];let i=r.fields||[r];r.fields&&(x[f[e]]=[]);for(let o=0;o<i.length;o++)zp({cache:n,f:l,mainCell:b,p:i[o],prop:f[e],page:a.qDataPages[t],rowIdx:v,row:a.qDataPages[t].qMatrix[c],sourceKey:s,target:r.fields?x[f[e]]:x,targetProp:r.fields?o:f[e],columnOrder:a.qColumnOrder});if(r.fields){const t=x[f[e]].map(e=>e.value),n=x[f[e]].map(e=>e.label);x[f[e]]={value:"function"==typeof r.value?r.value(t):void 0!==r.value?r.value:t,label:"function"==typeof r.label?r.label(n):void 0!==r.label?String(r.label):String(x[f[e]].value)}}}h&&r.track({cfg:i[e],itemData:b,obj:x,target:g,tracker:m,trackType:p}),y.push(x)}}}const v=h?r.collect(g,{main:d,propsArr:f,props:u}):y;o=[...o,...v]}return o}function jp(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function Bp(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=Hp)):void 0===t&&(t=Vp);for(var n,r,i,o,a,s=new Up(e),l=[s];n=l.pop();)if((i=t(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;o>=0;--o)l.push(r=i[o]=new Up(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Wp)}function Vp(e){return e.children}function Hp(e){return Array.isArray(e)?e[1]:null}function $p(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function Wp(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function Up(e){this.data=e,this.depth=this.height=0,this.parent=null}function Yp(e){return null==e?null:function(e){if("function"!=typeof e)throw new Error;return e}(e)}Up.prototype=Bp.prototype={constructor:Up,count:function(){return this.eachAfter(jp)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,i,o=this,a=[o],s=[],l=-1;o=a.pop();)if(s.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=s.pop();)e.call(t,o,++l,this);return this},eachBefore:function(e,t){for(var n,r,i=this,o=[i],a=-1;i=o.pop();)if(e.call(t,i,++a,this),n=i.children)for(r=n.length-1;r>=0;--r)o.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;e=n.pop(),t=r.pop();for(;e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t},copy:function(){return Bp(this).eachBefore($p)},[Symbol.iterator]:function*(){var e,t,n,r,i=this,o=[i];do{for(e=o.reverse(),o=[];i=e.pop();)if(yield i,t=i.children)for(n=0,r=t.length;n<r;++n)o.push(t[n])}while(o.length)}};var Kp={depth:-1},Gp={},Xp={};function Jp(e){return e.id}function Zp(e){return e.parentId}function Qp(){var e,t=Jp,n=Zp;function r(r){var i,o,a,s,l,c,u,d,f=Array.from(r),h=t,p=n,m=new Map;if(null!=e){const t=f.map((t,n)=>function(e){e=`${e}`;let t=e.length;tm(e,t-1)&&!tm(e,t-2)&&(e=e.slice(0,-1));return"/"===e[0]?e:`/${e}`}(e(t,n,r))),n=t.map(em),i=new Set(t).add("");for(const e of n)i.has(e)||(i.add(e),t.push(e),n.push(em(e)),f.push(Xp));h=(e,n)=>t[n],p=(e,t)=>n[t]}for(a=0,i=f.length;a<i;++a)o=f[a],c=f[a]=new Up(o),null!=(u=h(o,a,r))&&(u+="")&&(d=c.id=u,m.set(d,m.has(d)?Gp:c)),null!=(u=p(o,a,r))&&(u+="")&&(c.parent=u);for(a=0;a<i;++a)if(u=(c=f[a]).parent){if(!(l=m.get(u)))throw new Error("missing: "+u);if(l===Gp)throw new Error("ambiguous: "+u);l.children?l.children.push(c):l.children=[c],c.parent=l}else{if(s)throw new Error("multiple roots");s=c}if(!s)throw new Error("no root");if(null!=e){for(;s.data===Xp&&1===s.children.length;)s=s.children[0],--i;for(let e=f.length-1;e>=0&&(c=f[e]).data===Xp;--e)c.data=null}if(s.parent=Kp,s.eachBefore(function(e){e.depth=e.parent.depth+1,--i}).eachBefore(Wp),s.parent=null,i>0)throw new Error("cycle");return s}return r.id=function(e){return arguments.length?(t=Yp(e),r):t},r.parentId=function(e){return arguments.length?(n=Yp(e),r):n},r.path=function(t){return arguments.length?(e=Yp(t),r):e},r}function em(e){let t=e.length;if(t<2)return"";for(;--t>1&&!tm(e,t););return e.slice(0,t)}function tm(e,t){if("/"===e[t]){let n=0;for(;t>0&&"\\"===e[--t];)++n;if(!(1&n))return!0}return!1}function nm(e,t){"/"===e.charAt(0)&&(e=e.substring(1));const n=e.split("/");let r,i=t;for(let e=0;e<n.length;e++){if("*"===n[e]&&Array.isArray(i)){const t=[];r=n.slice(e+1).join("/");for(let e=0;e<i.length;e++){let n=nm(r,i[e]);Array.isArray(n)?t.push(...n):t.push(n)}return t}if(!n[e]&&Array.isArray(i)){const t=new Array(i.length);r=n.slice(e+1).join("/");for(let e=0;e<i.length;e++)t[e]=nm(r,i[e]);return t}n[e]in i&&(i=i[n[e]])}return i}function rm(e,t,n){let r=[];if(!e||!e.length)return r;if(t<=0){const t=n>=0?[e[n]]:e;r=[...r,...t]}else for(let i=0;i<e.length;i++)e[i].children&&e[i].children.length&&(r=[...r,...rm(e[i].children,t-1,n)]);return r}function im(e,t,n){if(e===t)return e=>e;if(e>t){const n=Math.max(0,Math.min(100,e-t));return e=>{let t=e;for(let e=0;e<n;++e)t=t.parent;return t}}if(t>e){const r=Math.max(0,Math.min(100,t-e));return e=>rm(e.children,r-1,n)}return!1}const om=/^qDimensionInfo(?:\/(\d+))?/,am=/^\/?qMeasureInfo\/(\d+)/,sm=/\/qAttrExprInfo\/(\d+)/,lm=/\/qAttrDimInfo\/(\d+)/;function cm(e){const t=e.qColumnOrder&&e.qColumnOrder.length?e.qColumnOrder:e.qDimensionInfo.map((e,t)=>t);return t.filter(t=>t<e.qDimensionInfo.length)}function um(e,t){let n=t.cube;if(!e)return-1;let r=e.origin&&e.origin()?e.origin().key():e.key(),i=!1,o=-1,a=-1,s=-1,l=-1,c=-1,u=-1,d=r;const f=n.qEffectiveInterColumnSortOrder,h=cm(n);return om.test(d)&&(i=!0,o=+om.exec(d)[1],d=r.replace(om,"")),am.test(d)&&("K"===n.qMode?c=+am.exec(d)[1]:f&&-1!==f.indexOf(-1)?(c=+am.exec(d)[1],u=0):u=+am.exec(d)[1],d=d.replace(am,"")),d&&(lm.exec(d)?s=+lm.exec(d)[1]:sm.exec(d)&&(a=+sm.exec(d)[1])),l=i?"S"===n.qMode?h[o]:f?f.indexOf(o):o:f&&-1!==f.indexOf(-1)?f.indexOf(-1):n.qDimensionInfo.length-("K"===n.qMode?0:1),{fieldDepth:l+1,pseudoMeasureIndex:c,measureIdx:u,attrDimIdx:s,attrIdx:a}}function dm(e,t){let n,r,i=im(e.fieldDepth,t.fieldDepth,t.pseudoMeasureIndex);return n=t.measureIdx>=0?e=>e.data.qValues[t.measureIdx]:e=>e.data,t.attrDimIdx>=0?r=e=>{var n;return null==e||null===(n=e.qAttrDims)||void 0===n?void 0:n.qValues[t.attrDimIdx]}:t.attrIdx>=0&&(r=e=>{var n;return null==e||null===(n=e.qAttrExps)||void 0===n?void 0:n.qValues[t.attrIdx]}),{nodeFn:i,attrFn:r,valueFn:n}}function fm(e,t,n){let r=n.key;const i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function hm(e){let t=e.propsArr,n=e.props,r=e.item,i=e.itemData,o=e.ret,a=e.sourceKey;for(let e=0;e<t.length;e++){const s=n[t[e]],l=s.fields||[s];let c,u;s.fields&&(c=[],u=[]);for(let n=0;n<l.length;n++){const d=l[n];let f,h,p,m,g,y;if("primitive"===d.type?(p=d.value,y=String(d.value)):("function"==typeof d.value&&(f=e=>d.value(e,r)),"function"==typeof d.label&&(h=e=>d.label(e,r)),d.accessor?(m=d.accessor(r),Array.isArray(m)?(g=m.map(d.valueAccessor),d.attrAccessor&&(g=g.map(d.attrAccessor)),f&&(p=g.map(f),f=null),h&&(y=g.map(h),h=null),p=d.reduce?d.reduce(p):p,y=d.reduceLabel?d.reduceLabel(y,p):String(p)):(p=d.attrAccessor?d.attrAccessor(d.valueAccessor(m)):d.valueAccessor(m),y=p)):(p=i,y=i)),s.fields){const e=f?f(p):p;c.push(e),u.push(h&&null!=y?h(y):null!=y?y:String(e))}else{const n=f?f(p):p;o[t[e]]={value:n,label:h?h(y):null!=y?y:String(n)},d.field&&(o[t[e]].source={field:d.field.key(),key:a})}}c&&(o[t[e]]={value:"function"==typeof s.value?s.value(c,r):c,label:"function"==typeof s.label?s.label(u,r):u})}}const pm=(e,t,n)=>{const r="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",i="K"===e.qMode?"qSubNodes":"qNodes",o=nm(r,e);return o&&o[0]?(t.tree=Bp(o[0],n.children||(e=>e[i])),t.tree):null};const mm=e=>{let t=e.propsArr,n=e.props,r=e.cube;e.cache;let i=e.itemDepthObject,o=e.f;for(let e=0;e<t.length;e++){const a=n[t[e]],s=a.fields?a.fields:[a];for(let e=0;e<s.length;e++){const t=s[e];if(t.field!==o){const e=dm(i,um(t.field,{cube:r}));t.accessor=e.nodeFn,t.valueAccessor=e.valueFn,t.attrAccessor=e.attrFn}}}};function gm(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;const i=t.raw(),o=t.key(),a="S"===i.qMode?function(e){const t=e.raw().qDataPages.length?e.raw().qDataPages[0].qMatrix:[],n=function(e){const t=e.raw().qColumnOrder,n=e.fields();return t&&t.length===n.length?t:n.map((e,t)=>t)}(e),r=e.fields(),i=e.fields().filter(e=>"dimension"===e.type()).map(e=>n.indexOf(r.indexOf(e))),o=e.fields().filter(e=>"measure"===e.type()).map(e=>n.indexOf(r.indexOf(e))),a={__root:{__id:"__root",qValues:[]}};for(let e=0;e<t.length;e++){const n=t[e];let r="__root",l=!1;for(let e=0;e<i.length;e++){var s;const t=n[i[e]],o="".concat(r,"__").concat(null!==(s=t.qElemNumber)&&void 0!==s?s:t.qElemNo);a[o]||(a[o]=Cp({__id:o,__parent:r,qValues:[]},t),l=!0),r=o}if(l)for(let e=0;e<o.length;e++){const t=n[o[e]];a[r].qValues.push(t)}}const l=Object.keys(a).map(e=>a[e]),c=Qp().id(e=>e.__id).parentId(e=>e.__parent)(l);return c}(t):pm(i,n,e);if(!a)return null;const s=a.height,l=[];for(let o=0;o<=s;o++){let a=null;if(o>0)if("S"===i.qMode){let e=cm(i)[o-1];a=n.fields[e]}else{let e=i.qEffectiveInterColumnSortOrder[o-1];o>i.qEffectiveInterColumnSortOrder.length&&(e=i.qDimensionInfo.length),a=n.fields[e]}const s=r.normalizeConfig(Cp(Cp({},e),{},{field:a?a.key():void 0}),t),c=s.props,u=s.main,d=Object.keys(c);l[o]={propsArr:d,props:c,main:u};const f=a?um(a,{cube:i}):{fieldDepth:0};mm({propsArr:d,props:c,cube:i,cache:n,itemDepthObject:f,f:a})}const c=a.copy().descendants(),u=a.descendants();for(let e=0;e<u.length;e++){const t=l[u[e].depth].propsArr,n=l[u[e].depth].props,r=l[u[e].depth].main,i=c[e],a=i.data,s=fm(r,a,{key:o});hm({propsArr:t,props:n,item:i,itemData:a,ret:s,sourceKey:o}),u[e].data=s}return a}function ym(e,t,n,r){const i=Array.isArray(e)?e:[e];let o=[];for(let a=0;a<i.length;a++)if(void 0!==i[a].field){const s=t.raw(),l=t.key();if(!pm(s,n,e))continue;const c="object"==typeof i[a].field?i[a].field:t.field(i[a].field),u=r.normalizeConfig(i[a],t),d=u.props,f=u.main,h=Object.keys(d),p=um(c,{cube:s}),m=dm({fieldDepth:0},p),g=m.nodeFn,y=m.attrFn,v=m.valueFn;mm({propsArr:h,props:d,cube:s,cache:n,itemDepthObject:p,f:c});const b=!!i[a].trackBy,x=typeof i[a].trackBy,S={},w=[],M=g(n.tree),k=[];for(let e=0;e<M.length;e++){const t=M[e],n=y?y(v(t)):v(t);if(f.filter&&!f.filter(n))continue;const o=fm(f,n,{key:l});hm({propsArr:h,props:d,item:t,itemData:n,ret:o,sourceKey:l}),b&&r.track({cfg:i[a],itemData:n,obj:o,target:w,tracker:S,trackType:x}),k.push(o)}const C=b?r.collect(w,{main:f,propsArr:h,props:d}):k;o=[...o,...C]}return o}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var vm=function(e,t){return e(t={exports:{}},t.exports),t.exports}(function(e){
/*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,i,o,a,s,l,c,u,d,f=e.length,h=e.search(/[0-9\-\+#]/),p=h>0?e.substring(0,h):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),y=f-g,v=e.substring(y,y+1),b=y+("."===v||","===v?1:0),x=g>0?e.substring(b,f):"";if(n=(t="-"===(e=e.substring(h,b)).charAt(0)?-t:+t)<0?t=-t:0,i=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",o=r&&r[1]&&r[0]||",",e=e.split(i),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(c=t.split("."))[1]||c[1]&&c[1].length<=s)&&(t=(+t).toFixed(s+1)),u=e[0].split(o),e[0]=u.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;c[0].length<e[0].length-a;)c[0]="0"+c[0];else 0===+c[0]&&(c[0]="");if((t=t.split("."))[0]=c[0],l=u[1]&&u[u.length-1].length){for(m="",y=(d=t[0]).length%l,f=d.length,b=0;b<f;b++)m+=d.charAt(b),!((b-y+1)%l)&&b<f-l&&(m+=o);t[0]=m}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),p+(n?"-":"")+r+x}});function bm(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}const xm={3:"k",6:"M",9:"G",12:"T",15:"P",18:"E",21:"Z",24:"Y","-3":"m","-6":"μ","-9":"n","-12":"p","-15":"f","-18":"a","-21":"z","-24":"y"},Sm=/%\)?$/,wm=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,Mm=/^\(oct\)/i,km=/^\(dec\)/i,Cm=/^\(hex\)/i,qm=/^\(bin\)/i,Em=/^\(rom\)/i,Dm=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,Tm=/#|0/g;function Om(e,t,n,r){return e=e.toString(t),n[1]===n[1].toUpperCase()&&(e=e.toUpperCase()),e.length-e.indexOf(".")>10&&(e=e.slice(0,e.indexOf(".")+11)),e.replace(".",r||".")}function Nm(e,t,n){let r;return wm.test(t)?e=Om(e,Number(/\d{2}/.exec(t)[0]),t,n):Mm.test(t)?e=Om(e,8,t,n):km.test(t)?e=Om(e,10,t,n):Cm.test(t)?e=Om(e,16,t,n):qm.test(t)?e=Om(e,2,t,n):Em.test(t)&&(r="",e<0&&(r="-",e=-e),0===(e=Math.floor(e))?e="0":e<=5e5?(e=function(e,t){let n,r="",i=Number(String(e).slice(-3)),o=(e-i)/1e3,a=[0,1,4,5,9,10,40,50,90,100,400,500,900].reverse(),s=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();for(;i>0;)for(n=0;n<a.length;n++)if(a[n]<=i){r+=s[n],i-=a[n];break}for(n=0;n<o;n++)r="M".concat(r);return t[1]!==t[1].toUpperCase()&&(r=r.toLowerCase()),r}(e,t),e=r+e):e=t+r+e.toExponential(0)),e}function Am(e,t,n){const r=bm(e);return n?r:new RegExp(r||"",t)}function _m(e,t,n,r){let i,o,a,s,l,c,u,d,f,h=e.pattern;var p,m;r&&(e.abbreviate=!0),p=t,(m=n)&&(m=bm(m)),p&&(p=bm(p)),f=new RegExp("(?:[#0]+".concat(p,")?[#0]+(?:").concat(m,"[#0]+)?")),a=h.match(f),a=a?a[0]:"",s=a?h.substr(0,h.indexOf(a)):h,l=a?h.substring(h.indexOf(a)+a.length):"",a||(a=h?"#":"##########"),t&&t===n&&(i=a.split(n),o=i.pop(),a=i.join("")+n+o,t=""),c=t,t=/,/.test(n)?"¤":",",c&&(a=a.replace(Am(c,"g"),t)),u=n,n=".",u&&(a=a.replace(Am(u,"g"),n)),d=a.match(/#/g),d=d?d.length:0;const g=h.split(u);let y;g[1]&&(y=g[1].match(Tm)),e.prefix=s||"",e.postfix=l||"",e.pattern=h,e.maxPrecision=y?y.length:2,e.percentage=Sm.test(h),e.numericPattern=a||"",e.numericRegex=new RegExp("".concat(Am(t,null,!0),"|").concat(Am(n,null,!0)),"g"),e.groupTemp=c,e.decTemp=u,e.t=t,e.d=n,e.temp=d}class Im{constructor(e,t,n,r,i){this.localeInfo=e,this.pattern=t,this.thousandDelimiter=n||",",this.decimalDelimiter=r||".",this.type=i||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return xm;const n={};return e.qNumericalAbbreviation.split(t).forEach(e=>{let t=e.split(":");2===t.length&&(n[t[0]]=t[1])}),n}(e,this.patternSeparator),this.prepare()}clone(){const e=new Im(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return e.subtype=this.subtype,e}format(e,t,n,r){return this.prepare(t,n,r),this.formatValue(e)}prepare(e,t,n){let r;if(void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===n&&(n=this.decimalDelimiter),!e)return void(this._prepared={pattern:!1});this._prepared={positive:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},zero:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}},r=this._prepared,e=e.split(this.patternSeparator),r.positive.pattern=e[0],r.negative.pattern=e[1],r.zero.pattern=e[2],Dm.test(e[0])&&(r.positive.isFunctional=!0),e[1]?Dm.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?Dm.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1;const i="U"===this.type;r.positive.isFunctional||_m(r.positive,t,n,i),r.negative&&!r.negative.isFunctional&&_m(r.negative,t,n,i),r.zero&&!r.zero.isFunctional&&_m(r.zero,t,n,i)}formatValue(e){let t,n,r,i,o,a,s,l,c,u=this._prepared,d="",f="",h=e;if(isNaN(e))return"".concat(h);if(e=+e,!1===u.pattern)return e.toString();if(0===e&&u.zero)return u=u.zero,u.pattern;if(e<0&&u.negative?(u=u.negative,e=-e):u=u.positive,o=u.d,a=u.t,u.isFunctional)e=Nm(e,u.pattern,o);else{if(u.percentage&&(e*=100),u.abbreviate){const t=Object.keys(this.abbreviations).map(e=>parseInt(e,10)).sort((e,t)=>e-t);let r,i,o=t[0];for(s=0,n=Number(Number(e).toExponential().split("e")[1]);o<=n&&s<t.length;)s++,o=t[s];s>0&&(r=t[s-1]),r&&n>0&&r>0?i=r:(n<0&&r<0||!r)&&(o<0&&o-n<=u.maxPrecision?i=o:r<=n&&!(o>0&&-n<=u.maxPrecision)&&(i=r)),i&&(d=this.abbreviations[i],e/=10**i)}if(r=Math.abs(e),t=u.temp,l=u.numericPattern,c=l.split(o)[1],"I"===this.type&&(e=Math.round(e)),i=e,c||"#"!==l.slice(-1)[0])if(r>=1e15||r>0&&r<=1e-14)e=r?r.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{const t=Number((e+1e-15*(e<0?-1:1)).toFixed(Math.min(20,c?c.length:0)).split(".")[0]);let n=l.split(o)[0];if(n+=o,e=vm(n,t)||"0",c){const t=Math.max(0,Math.min(14,c.length)),n=c.replace(/#+$/,"").length;let i=("I"===this.type?0:r%1+1e-15).toFixed(t).slice(2).replace(/0+$/,"");for(s=i.length;s<n;s++)i+="0";i&&(e+=o+i)}else 0===t&&(i=0)}else if(r>=10**t||r<1||r<1e-4)0===e?e="0":r<1e-4||r>=1e20?(e=(e=i.toExponential(Math.max(1,Math.min(14,t))-1)).replace(/\.?0+(?=e)/,""),f=""):(e=e.toPrecision(Math.max(1,Math.min(14,t)))).indexOf(".")>=0&&(e=(e=e.replace(e.indexOf("e")<0?/0+$/:/\.?0+(?=e)/,"")).replace(".",o));else{for(l+=o,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(r)/Math.log(10)))),s=0;s<t;s++)l+="#";e=vm(l,e)}e=e.replace(u.numericRegex,e=>e===a?u.groupTemp:e===o?u.decTemp:""),i<0&&!/^-/.test(e)&&(e="-".concat(e))}return u.prefix+e+f+d+u.postfix}static getStaticFormatter(){return{prepare(){},formatValue:e=>"".concat(e)}}}function Lm(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=t.size,r=void 0===n?5e3:n,i=t.multipleArguments,o=void 0!==i&&i,a=t.toKey,s=void 0===a?e=>e:a;let l,c,u=Object.create(null),d=Object.create(null),f=0,h=0;return l=o?function(){return c=s(...arguments),l.has(c)?l.get(c):l.set(c,e(...arguments))}:t=>(c=s(t),l.has(c)?l.get(c):l.set(c,e(t))),l.set=(e,t)=>(f>=r&&(delete u[d[h]],delete d[h],f--,h++),u[e]=t,d[f]=e,f++,t),l.get=e=>u[e],l.has=e=>e in u,l.clear=()=>{u=Object.create(null),d=Object.create(null),f=0,h=0},l.size=()=>f,l}function Pm(e,t,n,r,i){const o=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Im(...t)}(i,e,t,n,r),a=Lm(o.formatValue.bind(o),{toKey:e=>isNaN(e)?e:+e});function s(e){return a(e)}return s.format=function(e,t,n,r){return a.clear(),o.format(t,e,n,r)},s.pattern=function(e){return e&&(a.clear(),o.pattern=e,o.prepare()),o.pattern},s}const Rm="D",zm="T",Fm="TS",jm="IV",Bm=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Vm=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Hm=["January","February","March","April","May","June","July","August","September","October","November","December"],$m=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Wm(e,t){for(let n=e.length;n<t;n++)e="0".concat(e);return e}function Um(e){let t=e.toString().split(".");return t[1]?(t=Number("0.".concat(t[1])),t):0}function Ym(e,t){let n,r=function(e){const t=e,n=24*Um(t),r=60*Um(n),i=60*Um(r),o=1e3*Um(i);return{d:Math.floor(t),h:Math.floor(n),m:Math.floor(r),s:Math.floor(i),f:Math.round(o)}}(e),i=r.d,o=r.h,a=r.m,s=r.s,l=r.f,c=0;/w+|t+/gi.test(t)&&(n=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,Math.round(86400*(e-Math.floor(e))))),isNaN(n.getTime())&&(n=null)),/D+/gi.test(t)||(o+=24*i),/h+/gi.test(t)||(a+=60*o),/m+/gi.test(t)||(s+=60*a),/w+/gi.test(t)&&(c=n?n.getDay()-1:0,c<0&&(c=6));let u="";return n&&(u=n.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:c,date:i,h:o,m:a,s:s,f:l,t:u}}class Km{constructor(e,t,n){const r=e||{};if(r.qCalendarStrings||(r.qCalendarStrings={qLongDayNames:Bm,qDayNames:Vm,qLongMonthNames:Hm,qMonthNames:$m}),this.localeInfo=r,this.locale_days=r.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=r.qCalendarStrings.qDayNames.slice(),this.locale_months=r.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=r.qCalendarStrings.qMonthNames.slice(),!t){t={[zm]:r.qTimeFmt||"hh:mm:ss",[Rm]:r.qDateFmt||"YYYY-MM-DD",[Fm]:r.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"}[n]}this.pattern=t}clone(){const e=new Km(this.localeInfo,this.pattern);return e.subtype=this.subtype,e}format(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");const n=/t+/gi.test(t);let r;e instanceof Date?r=function(e,t){let n=e.getUTCHours(),r=e.getUTCDay()-1;return t&&(n%=12,n||(n=12)),r<0&&(r=6),{year:e.getUTCFullYear(),month:e.getUTCMonth(),day:r,date:e.getUTCDate(),h:n,m:e.getUTCMinutes(),s:e.getUTCSeconds(),f:e.getUTCMilliseconds(),t:e.getUTCHours()>=12?"pm":"am"}}(e,n):(e<0&&(e=-e,t="-".concat(t)),r=Ym(e,t));const i=function(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:Wm("".concat(t.year).slice(-2),2),YYY:Wm("".concat(t.year).slice(-3),3),def:e=>Wm("".concat(t.year),e.length)},"M+":{M:t.month+1,MM:Wm("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:Wm("".concat(t.day),2),WWW:e.locale_days_abbr[t.day],def:e.locale_days[t.day]},"D+|d+":{D:t.date,def:e=>Wm("".concat(t.date),e.length)},"h+|H+":{h:t.h,def:e=>Wm("".concat(t.h),e.length)},"m+":{m:t.m,def:e=>Wm("".concat(t.m),e.length)},"s+|S+":{s:t.s,def:e=>Wm("".concat(t.s),e.length)},"f+|F+":{def(e){let n="".concat(t.f),r=e.length-n.length;if(r>0)for(let e=0;e<r;e++)n+="0";else r<0&&(n=n.slice(0,e.length));return n}},"t{1,2}|T{1,2}":{def(e){let n=t.t;return e[0].toUpperCase()===e[0]&&(n=n.toUpperCase()),n=n.slice(0,e.length),n}}}}(this,r),o=[];for(const e in i)Object.prototype.hasOwnProperty.call(i,e)&&o.push(e);const a=new RegExp(o.join("|"),"g"),s=t.replace(a,e=>{let t,n,r;for(n in i)if(Object.prototype.hasOwnProperty.call(i,n)&&(t=new RegExp(n),t.test(e)))break;if(!t)return"";for(const t in i[n])if(t===e||t.toLowerCase()===e){r=i[n][t],void 0===r&&(r=i[n][t.toLowerCase()]);break}return void 0===r&&(r=i[n].def),"function"==typeof r&&(r=r(e)),r});return s}}function Gm(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Km(...t)}function Xm(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=Gm(arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,e,t),r=Lm(n.format.bind(n),{toKey:e=>"object"==typeof e&&"function"==typeof e.getTime?e.getTime():e});function i(e){return t!==jm?function(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}(e):e}function o(e){return e=i(e),r(e)}return o.format=function(e,t){return r.clear(),t=i(t),n.format(t,e)},o.locale=function(i){return n=Gm(i,e,t),r=Lm(n.format.bind(n),{toKey:e=>"object"==typeof e?e.getTime():e}),this},o.qtype=function(e){return void 0!==e&&(t=e,r.clear()),t},o}function Jm(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return Xm(e.qNumFormat.qFmt,e.qNumFormat.qType,t);let n="#",r=t&&void 0!==t.qThousandSep?t.qThousandSep:",",i=t&&void 0!==t.qDecimalSep?t.qDecimalSep:".",o="U",a=e&&!!e.qIsAutoFormat;return e&&e.qNumFormat?(n=e.qNumFormat.qFmt||n,r=e.qNumFormat.qThou||r,i=e.qNumFormat.qDec||i,o=e.qNumFormat.qType||o,a=a&&-1===["M"].indexOf(e.qNumFormat.qType)):a=!0,(a||"U"===o)&&(n="#".concat(i,"##"),o="U"),Pm(n,r,i,o,t)}function Zm(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.meta,r=t.id,i=t.key,o=t.localeInfo,a=t.fieldExtractor,s=t.value,l=t.type,c=t.sourceField;const u=s||("dimension"===l?e=>null==e?void 0:e.qElemNo:e=>null==e?void 0:e.qValue),d="dimension"===l?"first":"avg",f=Jm(n,o),h="dimension"===l?"first":(e,t)=>f(t),p={id:()=>r,key:()=>i,raw:()=>n,title:()=>n.qFallbackTitle||n.label,type:()=>l,origin:()=>c,items:()=>(e||(e=a(p)),e),min:()=>n.qMin,max:()=>n.qMax,value:u,label:e=>(null==e?void 0:e.qText)||"",reduce:d,reduceLabel:h,formatter:()=>f,tags:()=>n.qTags};return p}function Qm(e,t,n,r,i){return(t[e]||[]).map((t,o)=>{const a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(o),s={instance:Zm(Lp({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},i))};return s.attrDims=Qm("qAttrDimInfo",t,n,a,Lp({},i,{value:e=>null==e?void 0:e.qElemNo,type:"dimension"})),s.attrExps=Qm("qAttrExprInfo",t,n,a,Lp({},i,{value:e=>null==e?void 0:e.qNum,type:"measure"})),s.measures=Qm("qMeasureInfo",t,n,a,Lp({},i,{value:e=>null==e?void 0:e.qValue,type:"measure"})),s})}function eg(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.key,n=e.data,r=e.config,i=void 0===r?{}:r;const o={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},a=n;if(!a)throw new Error('Missing "data" input');if(!a.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');const s=eg.util,l={cache:o,cube:a,localeInfo:i.localeInfo,fieldExtractor:null,pages:null,hierarchy:()=>null,virtualFields:i.virtualFields},c={key:()=>t,raw:()=>a,field:e=>function(e,t){let n=t.cache;if("number"==typeof e)return n.fields[e];const r=n.allFields;if("function"==typeof e){for(let t=0;t<r.length;t++)if(e(r[t]))return r[t];return!1}if("string"==typeof e){for(let t=0;t<r.length;t++)if(r[t].key()===e||r[t].title()===e)return r[t]}else if(e&&-1!==r.indexOf(e))return e;throw Error("Field not found: ".concat(e))}(e,l),fields:()=>o.fields.slice(),extract:e=>l.extractor(e,c,o,s),hierarchy:e=>l.hierarchy(e,c,o,s),_cache:()=>o};"K"===a.qMode||"T"===a.qMode||!a.qMode&&a.qNodesOnDim?(l.extractor=ym,l.hierarchy=gm,l.pages="K"===a.qMode?a.qStackedDataPages:a.qTreeDataPages):"S"===a.qMode?(l.extractor=Fp,l.pages=a.qDataPages,l.hierarchy=gm):l.extractor=()=>[],l.fieldExtractor=e=>l.extractor({field:e},c,o,s);const u="S"===a.qMode?e=>e.qElemNumber:void 0,d="S"===a.qMode?e=>e.qNum:void 0;o.wrappedFields.push(...Qm("qDimensionInfo",a,t,"",Lp({},l,{value:u,type:"dimension"}))),o.wrappedFields.push(...Qm("qMeasureInfo",a,t,"",Lp({},l,{value:d,type:"measure"}))),o.fields=o.wrappedFields.map(e=>e.instance);const f=e=>{e.forEach(e=>{o.allFields.push(e.instance),f(e.measures),f(e.attrDims),f(e.attrExps)})};return f(o.wrappedFields),(i.virtualFields||[]).forEach(e=>{const n=c.field(e.from),r=Zm(Cp({meta:n.raw(),id:"".concat(t,"/").concat(e.key),sourceField:n,fieldExtractor:e=>l.extractor({field:e},c,o,s),key:e.key,type:n.type(),localeInfo:l.localeInfo,value:n.value},e.override||{}));o.virtualFields.push(r)}),o.allFields.push(...o.virtualFields),c}const tg=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],ng=/\/qDimensionInfo(?:\/(\d+))?/,rg=/\/qMeasureInfo\/(\d+)/,ig=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,og=/\/qAttrExprInfo\/(\d+)/,ag=/\/?qHyperCube/,sg=/\/?qTreeData/,lg=e=>"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14)),cg=e=>"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13));function ug(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r=t.byCells,i=t.primarySource,o=[],a={},s=e.isActive();let l=!1;if(e.brushes().forEach(e=>{const t=function(e,t){let n=e,r=-1,i=-1,o="",a=e=>e;ag.test(e)?(o="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=lg):sg.test(e)&&(o="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=cg);let s=!0;if(ng.test(e)&&(r=+ng.exec(e)[1]),rg.test(e)&&(i=+rg.exec(e)[1]),ig.test(e)){i=-1,r=0;const e=+ig.exec(n)[2];isNaN(e)||(r=e,n=n.replace(/\/\d+$/,"")),s=!1}if(og.test(e)){const e=i;if(t){i=0;const a=nm(o,t);i+=(a.qMeasureInfo||[]).length,r>-1?(i=a.qDimensionInfo.slice(0,r).reduce((e,t)=>e+t.qAttrExprInfo.length,i),r=-1):(i=a.qDimensionInfo.reduce((e,t)=>e+t.qAttrExprInfo.length,i),i=a.qMeasureInfo.slice(0,e).reduce((e,t)=>e+t.qAttrExprInfo.length,i)),i+=+og.exec(n)[1]}else r>-1?(r=-1,i=+og.exec(n)[1]):i+=+og.exec(n)[1]+1}return tg.forEach(e=>{let t=qp(e,2),r=t[0],i=t[1];n=n.replace(r,i)}),s&&(n=a(n)),n&&"/"!==n[0]&&(n="/".concat(n)),{measureIdx:i,dimensionIdx:r,path:n}}(e.id,n);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.multiRangeSelectTreeDataValues||(a.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),n.forEach(e=>a.multiRangeSelectTreeDataValues.ranges.push({qMeasureIx:t.measureIdx,qDimensionIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})))}else{if("range"===e.type&&t.measureIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.rangeSelectHyperCubeValues||(a.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),n.forEach(e=>a.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:t.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})))}if("range"===e.type&&t.dimensionIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.selectHyperCubeContinuousRange||(a.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),n.forEach(e=>a.selectHyperCubeContinuousRange.ranges.push({qDimIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!1}})))}if("value"===e.type&&t.dimensionIdx>-1)if(r)if(n&&n.qHyperCube&&("P"===n.qHyperCube.qMode||"T"===n.qHyperCube.qMode||"K"===n.qHyperCube.qMode)){const r=n.qHyperCube,o=r.qNoOfLeftDims,s=r.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(a.selectPivotCells||(a.selectPivotCells={path:t.path,cells:[]}),e.id===i||!i){const n=e.brush.values().map(e=>+e).filter(e=>!isNaN(e));(0===o||s>=o)&&o>-1?n.forEach(e=>{a.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:s-o})}):n.forEach(e=>{a.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})}),l=!!a.selectPivotCells.cells.length}}else a.selectHyperCubeCells||(a.selectHyperCubeCells={path:t.path,cols:[]}),a.selectHyperCubeCells.cols.push(t.dimensionIdx),e.id!==i&&(i||a.selectHyperCubeCells.values)||(a.selectHyperCubeCells.values=e.brush.values().map(e=>+e).filter(e=>!isNaN(e)),l=!!a.selectHyperCubeCells.values.length);else{const n=e.brush.values().map(e=>+e).filter(e=>!isNaN(e));l=!!n.length,o.push({params:[t.path,t.dimensionIdx,n,!1],method:"selectHyperCubeValues"})}}}),!l&&s)return[{method:"resetMadeSelections",params:[]}];var c;a.rangeSelectHyperCubeValues&&o.push({method:"rangeSelectHyperCubeValues",params:[a.rangeSelectHyperCubeValues.path,a.rangeSelectHyperCubeValues.ranges,[],null===(c=t.orMode)||void 0===c||c]});return a.selectHyperCubeContinuousRange&&o.push({method:"selectHyperCubeContinuousRange",params:[a.selectHyperCubeContinuousRange.path,a.selectHyperCubeContinuousRange.ranges]}),a.selectHyperCubeCells&&o.push({method:"selectHyperCubeCells",params:[a.selectHyperCubeCells.path,a.selectHyperCubeCells.values,a.selectHyperCubeCells.cols]}),a.selectPivotCells&&o.push({method:"selectPivotCells",params:[a.selectPivotCells.path,a.selectPivotCells.cells]}),a.multiRangeSelectTreeDataValues&&o.push({method:"multiRangeSelectTreeDataValues",params:[a.multiRangeSelectTreeDataValues.path,a.multiRangeSelectTreeDataValues.ranges]}),o}function dg(e){eg.util=e.data("matrix").util,e.data("q",eg),e.formatter("q-number",Pm),e.formatter("q-time",Xm)}dg.qBrushHelper=ug,dg.selections=ug;const fg={click:"Tap",Click:"Tap",tap:"Tap",pan:"Pan",swipe:"Swipe",rotate:"Rotate",press:"Press",pinch:"Pinch"};function hg(e){return fg[e]||e}function pg(e){return function(t,n,r){let i,o,a,s,l=[],c=!0;function u(){"function"==typeof i.enable&&(i.enable=i.enable.bind(o)()),i.enable&&(i.gestures.forEach(t=>{t.options=t.options||{},void 0===t.options.enable&&(t.options.enable=!0),"function"==typeof t.options.enable&&(t.options.enable=t.options.enable.bind(o));const n=hg(t.type);e&&e[n]&&(t.options.event=t.options.event||t.type.toLowerCase(),a=a||new e.Manager(r),a.add(new e[n](t.options)),Object.keys(t.events).forEach(e=>{t.events[e]=t.events[e].bind(o),a.on(e,t.events[e])}),l.push(t))}),i.gestures.forEach(t=>{const n=hg(t.type);e&&e[n]&&(t.recognizeWith&&a.get(t.options.event).recognizeWith(t.recognizeWith.split(" ").filter(e=>""!==e)),t.requireFailure&&a.get(t.options.event).requireFailure(t.requireFailure.split(" ").filter(e=>""!==e)))}))}function d(){l.forEach(e=>{Object.keys(e.events).forEach(t=>{a.off(t,e.events[t])}),a.remove(e.options.event)}),l=[]}return{get key(){return s},set(e){!function(e){s=e.key,i=e,o={chart:t,mediator:n,settings:i},i.gestures=i.gestures||[],void 0===i.enable&&(i.enable=!0)}(e),d(),c&&u()},off(){c=!1,d()},on(){c=!0,0===l.length&&u()},destroy(){d(),a&&a.destroy(),a=null,o=null,i=null}}}}function mg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function gg(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var n=function e(){var n=!1;try{n=this instanceof e}catch{}return n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var yg,vg={exports:{}};
/*! Hammer.JS - v2.0.7 - 2016-04-22
   * http://hammerjs.github.io/
   *
   * Copyright (c) 2016 Jorik Tangelder;
   * Licensed under the MIT license */var bg,xg,Sg=(yg||(yg=1,function(e){!function(t,n,r,i){var o,a=["","webkit","Moz","MS","ms","o"],s=n.createElement("div"),l=Math.round,c=Math.abs,u=Date.now;function d(e,t,n){return setTimeout(v(e,n),t)}function f(e,t,n){return!!Array.isArray(e)&&(h(e,n[t],n),!0)}function h(e,t,n){var r;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==i)for(r=0;r<e.length;)t.call(n,e[r],r,e),r++;else for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e)}function p(e,n,r){var i="DEPRECATED METHOD: "+n+"\n"+r+" AT \n";return function(){var n=new Error("get-stack-trace"),r=n&&n.stack?n.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=t.console&&(t.console.warn||t.console.log);return o&&o.call(t.console,i,r),e.apply(this,arguments)}}o="function"!=typeof Object.assign?function(e){if(e===i||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(r!==i&&null!==r)for(var o in r)r.hasOwnProperty(o)&&(t[o]=r[o])}return t}:Object.assign;var m=p(function(e,t,n){for(var r=Object.keys(t),o=0;o<r.length;)(!n||n&&e[r[o]]===i)&&(e[r[o]]=t[r[o]]),o++;return e},"extend","Use `assign`."),g=p(function(e,t){return m(e,t,!0)},"merge","Use `assign`.");function y(e,t,n){var r,i=t.prototype;(r=e.prototype=Object.create(i)).constructor=e,r._super=i,n&&o(r,n)}function v(e,t){return function(){return e.apply(t,arguments)}}function b(e,t){return"function"==typeof e?e.apply(t&&t[0]||i,t):e}function x(e,t){return e===i?t:e}function S(e,t,n){h(C(t),function(t){e.addEventListener(t,n,!1)})}function w(e,t,n){h(C(t),function(t){e.removeEventListener(t,n,!1)})}function M(e,t){for(;e;){if(e==t)return!0;e=e.parentNode}return!1}function k(e,t){return e.indexOf(t)>-1}function C(e){return e.trim().split(/\s+/g)}function q(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var r=0;r<e.length;){if(n&&e[r][n]==t||!n&&e[r]===t)return r;r++}return-1}function E(e){return Array.prototype.slice.call(e,0)}function D(e,t,n){for(var r=[],i=[],o=0;o<e.length;){var a=e[o][t];q(i,a)<0&&r.push(e[o]),i[o]=a,o++}return r=r.sort(function(e,n){return e[t]>n[t]}),r}function T(e,t){for(var n,r,o=t[0].toUpperCase()+t.slice(1),s=0;s<a.length;){if((r=(n=a[s])?n+o:t)in e)return r;s++}return i}var O=1;function N(e){var n=e.ownerDocument||e;return n.defaultView||n.parentWindow||t}var A="ontouchstart"in t,_=T(t,"PointerEvent")!==i,I=A&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),L="touch",P="mouse",R=24,z=["x","y"],F=["clientX","clientY"];function j(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){b(e.options.enable,[e])&&n.handler(t)},this.init()}function B(e,t,n){var r=n.pointers.length,o=n.changedPointers.length,a=1&t&&r-o===0,s=12&t&&r-o===0;n.isFirst=!!a,n.isFinal=!!s,a&&(e.session={}),n.eventType=t,function(e,t){var n=e.session,r=t.pointers,o=r.length;n.firstInput||(n.firstInput=V(t)),o>1&&!n.firstMultiple?n.firstMultiple=V(t):1===o&&(n.firstMultiple=!1);var a=n.firstInput,s=n.firstMultiple,l=s?s.center:a.center,d=t.center=H(r);t.timeStamp=u(),t.deltaTime=t.timeStamp-a.timeStamp,t.angle=Y(l,d),t.distance=U(l,d),function(e,t){var n=t.center,r=e.offsetDelta||{},i=e.prevDelta||{},o=e.prevInput||{};1!==t.eventType&&4!==o.eventType||(i=e.prevDelta={x:o.deltaX||0,y:o.deltaY||0},r=e.offsetDelta={x:n.x,y:n.y}),t.deltaX=i.x+(n.x-r.x),t.deltaY=i.y+(n.y-r.y)}(n,t),t.offsetDirection=W(t.deltaX,t.deltaY);var f=$(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=f.x,t.overallVelocityY=f.y,t.overallVelocity=c(f.x)>c(f.y)?f.x:f.y,t.scale=s?function(e,t){return U(t[0],t[1],F)/U(e[0],e[1],F)}(s.pointers,r):1,t.rotation=s?function(e,t){return Y(t[1],t[0],F)+Y(e[1],e[0],F)}(s.pointers,r):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,function(e,t){var n,r,o,a,s=e.lastInterval||t,l=t.timeStamp-s.timeStamp;if(8!=t.eventType&&(l>25||s.velocity===i)){var u=t.deltaX-s.deltaX,d=t.deltaY-s.deltaY,f=$(l,u,d);r=f.x,o=f.y,n=c(f.x)>c(f.y)?f.x:f.y,a=W(u,d),e.lastInterval=t}else n=s.velocity,r=s.velocityX,o=s.velocityY,a=s.direction;t.velocity=n,t.velocityX=r,t.velocityY=o,t.direction=a}(n,t);var h=e.element;M(t.srcEvent.target,h)&&(h=t.srcEvent.target),t.target=h}(e,n),e.emit("hammer.input",n),e.recognize(n),e.session.prevInput=n}function V(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:l(e.pointers[n].clientX),clientY:l(e.pointers[n].clientY)},n++;return{timeStamp:u(),pointers:t,center:H(t),deltaX:e.deltaX,deltaY:e.deltaY}}function H(e){var t=e.length;if(1===t)return{x:l(e[0].clientX),y:l(e[0].clientY)};for(var n=0,r=0,i=0;i<t;)n+=e[i].clientX,r+=e[i].clientY,i++;return{x:l(n/t),y:l(r/t)}}function $(e,t,n){return{x:t/e||0,y:n/e||0}}function W(e,t){return e===t?1:c(e)>=c(t)?e<0?2:4:t<0?8:16}function U(e,t,n){n||(n=z);var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.sqrt(r*r+i*i)}function Y(e,t,n){n||(n=z);var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return 180*Math.atan2(i,r)/Math.PI}j.prototype={handler:function(){},init:function(){this.evEl&&S(this.element,this.evEl,this.domHandler),this.evTarget&&S(this.target,this.evTarget,this.domHandler),this.evWin&&S(N(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&w(this.element,this.evEl,this.domHandler),this.evTarget&&w(this.target,this.evTarget,this.domHandler),this.evWin&&w(N(this.element),this.evWin,this.domHandler)}};var K={mousedown:1,mousemove:2,mouseup:4},G="mousedown",X="mousemove mouseup";function J(){this.evEl=G,this.evWin=X,this.pressed=!1,j.apply(this,arguments)}y(J,j,{handler:function(e){var t=K[e.type];1&t&&0===e.button&&(this.pressed=!0),2&t&&1!==e.which&&(t=4),this.pressed&&(4&t&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:P,srcEvent:e}))}});var Z={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},Q={2:L,3:"pen",4:P,5:"kinect"},ee="pointerdown",te="pointermove pointerup pointercancel";function ne(){this.evEl=ee,this.evWin=te,j.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}t.MSPointerEvent&&!t.PointerEvent&&(ee="MSPointerDown",te="MSPointerMove MSPointerUp MSPointerCancel"),y(ne,j,{handler:function(e){var t=this.store,n=!1,r=e.type.toLowerCase().replace("ms",""),i=Z[r],o=Q[e.pointerType]||e.pointerType,a=o==L,s=q(t,e.pointerId,"pointerId");1&i&&(0===e.button||a)?s<0&&(t.push(e),s=t.length-1):12&i&&(n=!0),s<0||(t[s]=e,this.callback(this.manager,i,{pointers:t,changedPointers:[e],pointerType:o,srcEvent:e}),n&&t.splice(s,1))}});var re={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function ie(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,j.apply(this,arguments)}function oe(e,t){var n=E(e.touches),r=E(e.changedTouches);return 12&t&&(n=D(n.concat(r),"identifier")),[n,r]}y(ie,j,{handler:function(e){var t=re[e.type];if(1===t&&(this.started=!0),this.started){var n=oe.call(this,e,t);12&t&&n[0].length-n[1].length===0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:L,srcEvent:e})}}});var ae={touchstart:1,touchmove:2,touchend:4,touchcancel:8},se="touchstart touchmove touchend touchcancel";function le(){this.evTarget=se,this.targetIds={},j.apply(this,arguments)}function ce(e,t){var n=E(e.touches),r=this.targetIds;if(3&t&&1===n.length)return r[n[0].identifier]=!0,[n,n];var i,o,a=E(e.changedTouches),s=[],l=this.target;if(o=n.filter(function(e){return M(e.target,l)}),1===t)for(i=0;i<o.length;)r[o[i].identifier]=!0,i++;for(i=0;i<a.length;)r[a[i].identifier]&&s.push(a[i]),12&t&&delete r[a[i].identifier],i++;return s.length?[D(o.concat(s),"identifier"),s]:void 0}function ue(){j.apply(this,arguments);var e=v(this.handler,this);this.touch=new le(this.manager,e),this.mouse=new J(this.manager,e),this.primaryTouch=null,this.lastTouches=[]}function de(e,t){1&e?(this.primaryTouch=t.changedPointers[0].identifier,fe.call(this,t)):12&e&&fe.call(this,t)}function fe(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY};this.lastTouches.push(n);var r=this.lastTouches;setTimeout(function(){var e=r.indexOf(n);e>-1&&r.splice(e,1)},2500)}}function he(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],o=Math.abs(t-i.x),a=Math.abs(n-i.y);if(o<=25&&a<=25)return!0}return!1}y(le,j,{handler:function(e){var t=ae[e.type],n=ce.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:L,srcEvent:e})}}),y(ue,j,{handler:function(e,t,n){var r=n.pointerType==L,i=n.pointerType==P;if(!(i&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(r)de.call(this,t,n);else if(i&&he.call(this,n))return;this.callback(e,t,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var pe=T(s.style,"touchAction"),me=pe!==i,ge="compute",ye="auto",ve="manipulation",be="none",xe="pan-x",Se="pan-y",we=function(){if(!me)return!1;var e={},n=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(r){e[r]=!n||t.CSS.supports("touch-action",r)}),e}();function Me(e,t){this.manager=e,this.set(t)}Me.prototype={set:function(e){e==ge&&(e=this.compute()),me&&this.manager.element.style&&we[e]&&(this.manager.element.style[pe]=e),this.actions=e.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var e=[];return h(this.manager.recognizers,function(t){b(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))}),function(e){if(k(e,be))return be;var t=k(e,xe),n=k(e,Se);return t&&n?be:t||n?t?xe:Se:k(e,ve)?ve:ye}(e.join(" "))},preventDefaults:function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented)t.preventDefault();else{var r=this.actions,i=k(r,be)&&!we[be],o=k(r,Se)&&!we[Se],a=k(r,xe)&&!we[xe];if(i){var s=1===e.pointers.length,l=e.distance<2,c=e.deltaTime<250;if(s&&l&&c)return}if(!a||!o)return i||o&&6&n||a&&n&R?this.preventSrc(t):void 0}},preventSrc:function(e){this.manager.session.prevented=!0,e.preventDefault()}};var ke=32;function Ce(e){this.options=o({},this.defaults,e||{}),this.id=O++,this.manager=null,this.options.enable=x(this.options.enable,!0),this.state=1,this.simultaneous={},this.requireFail=[]}function qe(e){return 16&e?"cancel":8&e?"end":4&e?"move":2&e?"start":""}function Ee(e){return 16==e?"down":8==e?"up":2==e?"left":4==e?"right":""}function De(e,t){var n=t.manager;return n?n.get(e):e}function Te(){Ce.apply(this,arguments)}function Oe(){Te.apply(this,arguments),this.pX=null,this.pY=null}function Ne(){Te.apply(this,arguments)}function Ae(){Ce.apply(this,arguments),this._timer=null,this._input=null}function _e(){Te.apply(this,arguments)}function Ie(){Te.apply(this,arguments)}function Le(){Ce.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function Pe(e,t){return(t=t||{}).recognizers=x(t.recognizers,Pe.defaults.preset),new Re(e,t)}function Re(e,t){var n;this.options=o({},Pe.defaults,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=new((n=this).options.inputClass||(_?ne:I?le:A?ue:J))(n,B),this.touchAction=new Me(this,this.options.touchAction),ze(this,!0),h(this.options.recognizers,function(e){var t=this.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])},this)}function ze(e,t){var n,r=e.element;r.style&&(h(e.options.cssProps,function(i,o){n=T(r.style,o),t?(e.oldCssProps[n]=r.style[n],r.style[n]=i):r.style[n]=e.oldCssProps[n]||""}),t||(e.oldCssProps={}))}Ce.prototype={defaults:{},set:function(e){return o(this.options,e),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(e){if(f(e,"recognizeWith",this))return this;var t=this.simultaneous;return t[(e=De(e,this)).id]||(t[e.id]=e,e.recognizeWith(this)),this},dropRecognizeWith:function(e){return f(e,"dropRecognizeWith",this)||(e=De(e,this),delete this.simultaneous[e.id]),this},requireFailure:function(e){if(f(e,"requireFailure",this))return this;var t=this.requireFail;return-1===q(t,e=De(e,this))&&(t.push(e),e.requireFailure(this)),this},dropRequireFailure:function(e){if(f(e,"dropRequireFailure",this))return this;e=De(e,this);var t=q(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(e){return!!this.simultaneous[e.id]},emit:function(e){var t=this,n=this.state;function r(n){t.manager.emit(n,e)}n<8&&r(t.options.event+qe(n)),r(t.options.event),e.additionalEvent&&r(e.additionalEvent),n>=8&&r(t.options.event+qe(n))},tryEmit:function(e){if(this.canEmit())return this.emit(e);this.state=ke},canEmit:function(){for(var e=0;e<this.requireFail.length;){if(!(33&this.requireFail[e].state))return!1;e++}return!0},recognize:function(e){var t=o({},e);if(!b(this.options.enable,[this,t]))return this.reset(),void(this.state=ke);56&this.state&&(this.state=1),this.state=this.process(t),30&this.state&&this.tryEmit(t)},process:function(e){},getTouchAction:function(){},reset:function(){}},y(Te,Ce,{defaults:{pointers:1},attrTest:function(e){var t=this.options.pointers;return 0===t||e.pointers.length===t},process:function(e){var t=this.state,n=e.eventType,r=6&t,i=this.attrTest(e);return r&&(8&n||!i)?16|t:r||i?4&n?8|t:2&t?4|t:2:ke}}),y(Oe,Te,{defaults:{event:"pan",threshold:10,pointers:1,direction:30},getTouchAction:function(){var e=this.options.direction,t=[];return 6&e&&t.push(Se),e&R&&t.push(xe),t},directionTest:function(e){var t=this.options,n=!0,r=e.distance,i=e.direction,o=e.deltaX,a=e.deltaY;return i&t.direction||(6&t.direction?(i=0===o?1:o<0?2:4,n=o!=this.pX,r=Math.abs(e.deltaX)):(i=0===a?1:a<0?8:16,n=a!=this.pY,r=Math.abs(e.deltaY))),e.direction=i,n&&r>t.threshold&&i&t.direction},attrTest:function(e){return Te.prototype.attrTest.call(this,e)&&(2&this.state||!(2&this.state)&&this.directionTest(e))},emit:function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=Ee(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),y(Ne,Te,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[be]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||2&this.state)},emit:function(e){if(1!==e.scale){var t=e.scale<1?"in":"out";e.additionalEvent=this.options.event+t}this._super.emit.call(this,e)}}),y(Ae,Ce,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[ye]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,r=e.distance<t.threshold,i=e.deltaTime>t.time;if(this._input=e,!r||!n||12&e.eventType&&!i)this.reset();else if(1&e.eventType)this.reset(),this._timer=d(function(){this.state=8,this.tryEmit()},t.time,this);else if(4&e.eventType)return 8;return ke},reset:function(){clearTimeout(this._timer)},emit:function(e){8===this.state&&(e&&4&e.eventType?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=u(),this.manager.emit(this.options.event,this._input)))}}),y(_e,Te,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[be]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)}}),y(Ie,Te,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return Oe.prototype.getTouchAction.call(this)},attrTest:function(e){var t,n=this.options.direction;return 30&n?t=e.overallVelocity:6&n?t=e.overallVelocityX:n&R&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&c(t)>this.options.velocity&&4&e.eventType},emit:function(e){var t=Ee(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),y(Le,Ce,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[ve]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,r=e.distance<t.threshold,i=e.deltaTime<t.time;if(this.reset(),1&e.eventType&&0===this.count)return this.failTimeout();if(r&&i&&n){if(4!=e.eventType)return this.failTimeout();var o=!this.pTime||e.timeStamp-this.pTime<t.interval,a=!this.pCenter||U(this.pCenter,e.center)<t.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,a&&o?this.count+=1:this.count=1,this._input=e,0===this.count%t.taps)return this.hasRequireFailures()?(this._timer=d(function(){this.state=8,this.tryEmit()},t.interval,this),2):8}return ke},failTimeout:function(){return this._timer=d(function(){this.state=ke},this.options.interval,this),ke},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),Pe.VERSION="2.0.7",Pe.defaults={domEvents:!1,touchAction:ge,enable:!0,inputTarget:null,inputClass:null,preset:[[_e,{enable:!1}],[Ne,{enable:!1},["rotate"]],[Ie,{direction:6}],[Oe,{direction:6},["swipe"]],[Le],[Le,{event:"doubletap",taps:2},["tap"]],[Ae]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Re.prototype={set:function(e){return o(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},stop:function(e){this.session.stopped=e?2:1},recognize:function(e){var t=this.session;if(!t.stopped){var n;this.touchAction.preventDefaults(e);var r=this.recognizers,i=t.curRecognizer;(!i||i&&8&i.state)&&(i=t.curRecognizer=null);for(var o=0;o<r.length;)n=r[o],2===t.stopped||i&&n!=i&&!n.canRecognizeWith(i)?n.reset():n.recognize(e),!i&&14&n.state&&(i=t.curRecognizer=n),o++}},get:function(e){if(e instanceof Ce)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event==e)return t[n];return null},add:function(e){if(f(e,"add",this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},remove:function(e){if(f(e,"remove",this))return this;if(e=this.get(e)){var t=this.recognizers,n=q(t,e);-1!==n&&(t.splice(n,1),this.touchAction.update())}return this},on:function(e,t){if(e!==i&&t!==i){var n=this.handlers;return h(C(e),function(e){n[e]=n[e]||[],n[e].push(t)}),this}},off:function(e,t){if(e!==i){var n=this.handlers;return h(C(e),function(e){t?n[e]&&n[e].splice(q(n[e],t),1):delete n[e]}),this}},emit:function(e,t){this.options.domEvents&&function(e,t){var r=n.createEvent("Event");r.initEvent(e,!0,!0),r.gesture=t,t.target.dispatchEvent(r)}(e,t);var r=this.handlers[e]&&this.handlers[e].slice();if(r&&r.length){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var i=0;i<r.length;)r[i](t),i++}},destroy:function(){this.element&&ze(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},o(Pe,{INPUT_START:1,INPUT_MOVE:2,INPUT_END:4,INPUT_CANCEL:8,STATE_POSSIBLE:1,STATE_BEGAN:2,STATE_CHANGED:4,STATE_ENDED:8,STATE_RECOGNIZED:8,STATE_CANCELLED:16,STATE_FAILED:ke,DIRECTION_NONE:1,DIRECTION_LEFT:2,DIRECTION_RIGHT:4,DIRECTION_UP:8,DIRECTION_DOWN:16,DIRECTION_HORIZONTAL:6,DIRECTION_VERTICAL:R,DIRECTION_ALL:30,Manager:Re,Input:j,TouchAction:Me,TouchInput:le,MouseInput:J,PointerEventInput:ne,TouchMouseInput:ue,SingleTouchInput:ie,Recognizer:Ce,AttrRecognizer:Te,Tap:Le,Pan:Oe,Swipe:Ie,Pinch:Ne,Rotate:_e,Press:Ae,on:S,off:w,each:h,merge:g,extend:m,assign:o,inherit:y,bindFn:v,prefixed:T}),(void 0!==t?t:"undefined"!=typeof self?self:{}).Hammer=Pe,e.exports?e.exports=Pe:t.Hammer=Pe}(window,document)}(vg)),vg.exports),wg=mg(Sg);var Mg=function(){if(xg)return bg;xg=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},o=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,i=e.call(n,"constructor"),o=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!i&&!o)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return bg=function e(){var t,n,r,l,c,u,d=arguments[0],f=1,h=arguments.length,p=!1;for("boolean"==typeof d&&(p=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<h;++f)if(null!=(t=arguments[f]))for(n in t)r=s(d,n),d!==(l=s(t,n))&&(p&&l&&(o(l)||(c=i(l)))?(c?(c=!1,u=r&&i(r)?r:[]):u=r&&o(r)?r:{},a(d,{name:n,newValue:e(p,u,l)})):void 0!==l&&a(d,{name:n,newValue:l}));return d},bg}(),kg=mg(Mg),Cg={MAX_NUM_POINTS:5e4,DEFAULT_NUM_POINTS:2e3,DEFAULT_NUM_LINES:12};const{DEFAULT_NUM_POINTS:qg}=Cg;function Eg({layoutService:e,largeDataService:t}){const{maxNumPoints:n=qg}=t?.meta||{},{qHyperCube:r}=e.getLayout();return r.qSize.qcy*r.qMeasureInfo.length>n}const{DEFAULT_NUM_LINES:Dg}=Cg,Tg=({layoutService:e,largeDataService:t})=>{const{maxNumLines:n=Dg}=t?.meta||{},{qHyperCube:r}=e.getLayout();return r.qDimensionInfo.length>1&&!Eg({layoutService:e,largeDataService:t})?e.meta.size.dimensions[1]+1:n},{DEFAULT_NUM_POINTS:Og}=Cg,{MAX_NUM_POINTS:Ng,DEFAULT_NUM_POINTS:Ag,DEFAULT_NUM_LINES:_g}=Cg,{DEFAULT_NUM_POINTS:Ig}=Cg,Lg=({layoutService:e,largeDataService:t})=>{if(!Eg({layoutService:e,largeDataService:t})){const{maxNumPoints:e=Ig}=t?.meta||{};return e}const{dimensionCount:n}=e.meta;return n>1?(({layoutService:e,largeDataService:t})=>{const{dimensions:n=[]}=e?.meta?.size||{},{maxNumLines:r=_g,maxNumPoints:i=Ag,hasInjectedData:o=!1}=t?.meta||{};if(Tg({layoutService:e,largeDataService:t})*n[0]<=i)return n[0];const a=Math.max(1,Math.min(r,n[1])),s=i/a,l=Math.floor(n[0]<=s?s:s/4),c=2*a*(a+1);return o&&(a>_g||i>Ag)?Math.min(l,Math.ceil(Ng/c)):l})({layoutService:e,largeDataService:t}):(({layoutService:e,largeDataService:t})=>{const{maxNumPoints:n=Og}=t?.meta||{},{measureCount:r=1}=e?.meta||{},i=4+2*(r-1);return Math.floor(n/(r*i))})({layoutService:e,largeDataService:t})};function Pg({model:e,layoutService:t,largeDataService:n,definitionPath:r="/qHyperCubeDef"}){return{shouldFetchReduced:()=>Eg({layoutService:t,largeDataService:n}),computeNbrOfBins:()=>Lg({layoutService:t,largeDataService:n}),computeMaxNumberLines:()=>Tg({layoutService:t,largeDataService:n}),fetch:(i,o)=>(({start:e,end:t,model:n,layoutService:r,largeDataService:i,definitionPath:o})=>{const a={qStart:e,qEnd:t,qNbrPoints:Lg({layoutService:r,largeDataService:i}),qMaxNbrTicks:300,qMaxNumberLines:Tg({layoutService:r,largeDataService:i})};return n.getHyperCubeContinuousData(o,a,!1)})({start:i,end:o,model:e,layoutService:t,largeDataService:n,definitionPath:r})}}function Rg(e={}){const{cache:t={}}=e;return{fetch:()=>Promise.resolve(t.merged)}}function zg({layoutService:e,viewCache:t}){return{fetch:()=>{const{qAxisData:t,qDataPages:n}=e.getHyperCube();return Promise.resolve({qAxisData:t,qDataPages:n})},getSnapshotData(){const n=e.getLayoutValue("snapshotData.content.chartData",{});return"zoom"in n&&"min"in n.zoom&&"max"in n.zoom?function({zoom:e}){return{zoom:e}}(n):function({scrollOffset:e=0,viewRange:t=0},n){let r=n+e,i=r+t;return 1===t&&0===e&&(r=n-.5,i=n+.5),{zoom:{min:r,max:i}}}(n,t.get("continuousMin"))}}}function Fg(){const e=()=>{},t=[],n={};return e.set=(e,r)=>{const i=t.indexOf(e);i>-1&&t.splice(i,1),t.push(e),n[e]=r},e.forEach=e=>{t.forEach((t,r)=>e(n[t],r))},e.has=e=>e in n,e}function jg(e,t,n){return n[0]&&n[0][1]&&n[0][1].qElemNumber>-1?function({start:e,end:t,matrix:n}){const r=[],i=Fg(),o=Fg();for(let a=0;a<n.length;a++){const s=n[a],l=s[1].qElemNumber.toString();s[0].qNum<e?i.set(l,s):s[0].qNum>t&&(o.has(l)||o.set(l,s)),s[0].qNum>=e&&s[0].qNum<=t&&r.push(s)}return i.forEach((e,t)=>r.splice(t,0,e)),o.forEach(e=>r.push(e)),r}({start:e,end:t,matrix:n}):function({start:e,end:t,matrix:n}){const r=[];let i,o;for(let a=0;a<n.length;a++){const s=n[a];s[0].qNum<e?i=s:s[0].qNum>t&&(o||(o=s)),s[0].qNum>=e&&s[0].qNum<=t&&r.push(s)}return i&&r.unshift(i),o&&r.push(o),r}({start:e,end:t,matrix:n})}function Bg(e,t){return{...e,qWidth:t[0]?t[0].length:0,qHeight:t.length}}function Vg(e,t,n){const r={qDataPages:(n.qDataPages||[]).map(n=>{const r=jg(e,t,n.qMatrix),i=Bg(n.qArea,r);return{...n,qArea:i,qMatrix:r}})};return n.qAxisData&&n.qAxisData.qAxis&&(r.qAxisData=function(e,t,n){return{qAxis:n.qAxis.map(n=>({qName:n.qName,qTags:n.qTags,qTicks:n.qTicks.reduce((n,r)=>((r.qStart>=e&&r.qStart<=t||r.qEnd>=e&&r.qEnd<=t||r.qStart<e&&r.qEnd>t)&&n.push(r),n),[])}))}}(e,t,n.qAxisData)),r}const Hg=2**.5,$g=1/Hg,Wg=$g**44;function Ug(e){return e.qIsOtherCell}function Yg({qDataPages:e=[]}={},t={}){const n=e.length?e[0].qMatrix:[];return t.isStackedByDimension?function(e){const t={};return e.forEach(e=>{if(!e.some(Ug)){const n=e[0].qElemNumber;t[n]=void 0}}),Object.keys(t).length}(n):function(e){let t=0;return e.forEach(e=>{e.some(Ug)||t++}),t}(n)}const Kg={query:{getShouldProcess:()=>!1},command:{processDataPage:()=>{}}};function Gg(e){return null!==e&&"object"==typeof e&&"r"in e&&"number"==typeof e.r&&"g"in e&&"number"==typeof e.g&&"b"in e&&"number"==typeof e.b&&("number"==typeof e.a||void 0===e.a)}function Xg(e){if("object"==typeof e&&Gg(e))return(e.r<<16)+(e.g<<8)+e.b;let t=0,n=0,r=0;if("string"==typeof e){let i;(i=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e))?(t=parseInt(i[1],10),n=parseInt(i[2],10),r=parseInt(i[3],10)):(i=/^#([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})$/i.exec(e))?(t=parseInt(i[1],16),n=parseInt(i[2],16),r=parseInt(i[3],16)):(i=/^#([A-Fa-f0-9])([A-Fa-f0-9])([A-Fa-f0-9])$/i.exec(e))&&(t=parseInt(i[1]+i[1],16),n=parseInt(i[2]+i[2],16),r=parseInt(i[3]+i[3],16))}return(t<<16)+(n<<8)+r}const Jg={aliceblue:{r:240,g:248,b:255},antiquewhite:{r:250,g:235,b:215},aqua:{r:0,g:255,b:255},aquamarine:{r:127,g:255,b:212},azure:{r:240,g:255,b:255},beige:{r:245,g:245,b:220},bisque:{r:255,g:228,b:196},black:{r:0,g:0,b:0},blanchedalmond:{r:255,g:235,b:205},blue:{r:0,g:0,b:255},blueviolet:{r:138,g:43,b:226},brown:{r:165,g:42,b:42},burlywood:{r:222,g:184,b:135},cadetblue:{r:95,g:158,b:160},chartreuse:{r:127,g:255,b:0},chocolate:{r:210,g:105,b:30},coral:{r:255,g:127,b:80},cornflowerblue:{r:100,g:149,b:237},cornsilk:{r:255,g:248,b:220},crimson:{r:220,g:20,b:60},cyan:{r:0,g:255,b:255},darkblue:{r:0,g:0,b:139},darkcyan:{r:0,g:139,b:139},darkgoldenrod:{r:184,g:134,b:11},darkgray:{r:169,g:169,b:169},darkgreen:{r:0,g:100,b:0},darkgrey:{r:169,g:169,b:169},darkkhaki:{r:189,g:183,b:107},darkmagenta:{r:139,g:0,b:139},darkolivegreen:{r:85,g:107,b:47},darkorange:{r:255,g:140,b:0},darkorchid:{r:153,g:50,b:204},darkred:{r:139,g:0,b:0},darksalmon:{r:233,g:150,b:122},darkseagreen:{r:143,g:188,b:143},darkslateblue:{r:72,g:61,b:139},darkslategray:{r:47,g:79,b:79},darkslategrey:{r:47,g:79,b:79},darkturquoise:{r:0,g:206,b:209},darkviolet:{r:148,g:0,b:211},deeppink:{r:255,g:20,b:147},deepskyblue:{r:0,g:191,b:255},dimgray:{r:105,g:105,b:105},dimgrey:{r:105,g:105,b:105},dodgerblue:{r:30,g:144,b:255},firebrick:{r:178,g:34,b:34},floralwhite:{r:255,g:250,b:240},forestgreen:{r:34,g:139,b:34},fuchsia:{r:255,g:0,b:255},gainsboro:{r:220,g:220,b:220},ghostwhite:{r:248,g:248,b:255},gold:{r:255,g:215,b:0},goldenrod:{r:218,g:165,b:32},gray:{r:128,g:128,b:128},green:{r:0,g:128,b:0},greenyellow:{r:173,g:255,b:47},grey:{r:128,g:128,b:128},honeydew:{r:240,g:255,b:240},hotpink:{r:255,g:105,b:180},indianred:{r:205,g:92,b:92},indigo:{r:75,g:0,b:130},ivory:{r:255,g:255,b:240},khaki:{r:240,g:230,b:140},lavender:{r:230,g:230,b:250},lavenderblush:{r:255,g:240,b:245},lawngreen:{r:124,g:252,b:0},lemonchiffon:{r:255,g:250,b:205},lightblue:{r:173,g:216,b:230},lightcoral:{r:240,g:128,b:128},lightcyan:{r:224,g:255,b:255},lightgoldenrodyellow:{r:250,g:250,b:210},lightgray:{r:211,g:211,b:211},lightgreen:{r:144,g:238,b:144},lightgrey:{r:211,g:211,b:211},lightpink:{r:255,g:182,b:193},lightsalmon:{r:255,g:160,b:122},lightseagreen:{r:32,g:178,b:170},lightskyblue:{r:135,g:206,b:250},lightslategray:{r:119,g:136,b:153},lightslategrey:{r:119,g:136,b:153},lightsteelblue:{r:176,g:196,b:222},lightyellow:{r:255,g:255,b:224},lime:{r:0,g:255,b:0},limegreen:{r:50,g:205,b:50},linen:{r:250,g:240,b:230},magenta:{r:255,g:0,b:255},maroon:{r:128,g:0,b:0},mediumaquamarine:{r:102,g:205,b:170},mediumblue:{r:0,g:0,b:205},mediumorchid:{r:186,g:85,b:211},mediumpurple:{r:147,g:112,b:219},mediumseagreen:{r:60,g:179,b:113},mediumslateblue:{r:123,g:104,b:238},mediumspringgreen:{r:0,g:250,b:154},mediumturquoise:{r:72,g:209,b:204},mediumvioletred:{r:199,g:21,b:133},midnightblue:{r:25,g:25,b:112},mintcream:{r:245,g:255,b:250},mistyrose:{r:255,g:228,b:225},moccasin:{r:255,g:228,b:181},navajowhite:{r:255,g:222,b:173},navy:{r:0,g:0,b:128},oldlace:{r:253,g:245,b:230},olive:{r:128,g:128,b:0},olivedrab:{r:107,g:142,b:35},orange:{r:255,g:165,b:0},orangered:{r:255,g:69,b:0},orchid:{r:218,g:112,b:214},palegoldenrod:{r:238,g:232,b:170},palegreen:{r:152,g:251,b:152},paleturquoise:{r:175,g:238,b:238},palevioletred:{r:219,g:112,b:147},papayawhip:{r:255,g:239,b:213},peachpuff:{r:255,g:218,b:185},peru:{r:205,g:133,b:63},pink:{r:255,g:192,b:203},plum:{r:221,g:160,b:221},powderblue:{r:176,g:224,b:230},purple:{r:128,g:0,b:128},red:{r:255,g:0,b:0},rosybrown:{r:188,g:143,b:143},royalblue:{r:65,g:105,b:225},saddlebrown:{r:139,g:69,b:19},salmon:{r:250,g:128,b:114},sandybrown:{r:244,g:164,b:96},seagreen:{r:46,g:139,b:87},seashell:{r:255,g:245,b:238},sienna:{r:160,g:82,b:45},silver:{r:192,g:192,b:192},skyblue:{r:135,g:206,b:235},slateblue:{r:106,g:90,b:205},slategray:{r:112,g:128,b:144},slategrey:{r:112,g:128,b:144},snow:{r:255,g:250,b:250},springgreen:{r:0,g:255,b:127},steelblue:{r:70,g:130,b:180},tan:{r:210,g:180,b:140},teal:{r:0,g:128,b:128},thistle:{r:216,g:191,b:216},tomato:{r:255,g:99,b:71},transparent:{r:0,g:0,b:0,a:0},turquoise:{r:64,g:224,b:208},violet:{r:238,g:130,b:238},wheat:{r:245,g:222,b:179},white:{r:255,g:255,b:255},whitesmoke:{r:245,g:245,b:245},yellow:{r:255,g:255,b:0},yellowgreen:{r:154,g:205,b:50}},Zg="qcm-color";function Qg(...e){const t={type:Zg,r:0,g:0,b:0,a:1,invalid:!1,spaces:{}};let n=0,r=0,i=0,o=1;if(null!==(a=e[0])&&"object"==typeof a&&"type"in a&&a.type===Zg)({r:n,g:r,b:i,a:o}=e[0]),t.invalid=e[0].invalid,t.spaces={...e[0].spaces};else if(Gg(e[0]))({r:n,g:r,b:i}=e[0]),"a"in e[0]&&({a:o}=e[0]);else if(e.length<3)if("string"==typeof e[0]){const a=e[0];let s;if(s=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(a))n=parseInt(s[1],10),r=parseInt(s[2],10),i=parseInt(s[3],10);else if(s=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(a))n=parseInt(s[1],10),r=parseInt(s[2],10),i=parseInt(s[3],10),o=parseFloat(s[4]);else if(s=/^ARGB\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(a))o=parseInt(s[1],10)/255,n=parseInt(s[2],10),r=parseInt(s[3],10),i=parseInt(s[4],10);else if(s=/^#([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})$/i.exec(a))n=parseInt(s[1],16),r=parseInt(s[2],16),i=parseInt(s[3],16),o=1;else if(s=/^#([A-Fa-f0-9])([A-Fa-f0-9])([A-Fa-f0-9])$/i.exec(a))n=parseInt(s[1]+s[1],16),r=parseInt(s[2]+s[2],16),i=parseInt(s[3]+s[3],16),o=1;else if(s=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(a)){let e=parseFloat(s[1]),t=parseFloat(s[3]),a=parseFloat(s[5]);e%=360,t/=100,a/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,a=a<0?0:a>1?1:a;const l=a<=.5?2*a*t:(2-2*a)*t;let c=e/60;const u=l*(1-Math.abs(c%2-1));let d=[];switch(c=Math.floor(c),c){case 0:d=[l,u,0];break;case 1:d=[u,l,0];break;case 2:d=[0,l,u];break;case 3:d=[0,u,l];break;case 4:d=[u,0,l];break;case 5:d=[l,0,u];break;default:d=[0,0,0]}const f=a-.5*l;n=d[0]+f,r=d[1]+f,i=d[2]+f,n=Math.round(255*n),r=Math.round(255*r),i=Math.round(255*i),o=1}else if(s=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(a)){let e=parseFloat(s[1]),t=parseFloat(s[3]),a=parseFloat(s[5]);o=parseFloat(s[7]),e%=360,t/=100,a/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,a=a<0?0:a>1?1:a;const l=a<=.5?2*a*t:(2-2*a)*t;let c=e/60;const u=l*(1-Math.abs(c%2-1));let d=[];switch(c=Math.floor(c),c){case 0:d=[l,u,0];break;case 1:d=[u,l,0];break;case 2:d=[0,l,u];break;case 3:d=[0,u,l];break;case 4:d=[u,0,l];break;case 5:d=[l,0,u];break;default:d=[0,0,0]}const f=a-.5*l;n=d[0]+f,r=d[1]+f,i=d[2]+f,n=Math.round(255*n),r=Math.round(255*r),i=Math.round(255*i)}else if(s=/^hsv\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(a)){let e=parseFloat(s[1]),t=parseFloat(s[3]),a=parseFloat(s[5]);e%=360,t/=100,a/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,a=a<0?0:a>1?1:a;const l=a*t;let c=e/60;const u=l*(1-Math.abs(c%2-1));let d=[];switch(c=Math.floor(c),c){case 0:d=[l,u,0];break;case 1:d=[u,l,0];break;case 2:d=[0,l,u];break;case 3:d=[0,u,l];break;case 4:d=[u,0,l];break;case 5:d=[l,0,u];break;default:d=[0,0,0]}const f=a-l;n=d[0]+f,r=d[1]+f,i=d[2]+f,n=Math.round(255*n),r=Math.round(255*r),i=Math.round(255*i),o=1}else{const e=a.toLowerCase();if(function(e){return e in Jg}(e)){const t=Jg[e];({r:n,g:r,b:i}=t),o="a"in t?t.a:1}else t.invalid=!0}}else"number"==typeof e[0]&&e[0]>=0&&"argb"===e[1]?(o=(4278190080&e[0])>>>24,o/=255,n=(16711680&e[0])>>16,r=(65280&e[0])>>8,i=255&e[0]):"number"==typeof e[0]&&e[0]>=0?(n=(16711680&e[0])>>16,r=(65280&e[0])>>8,i=255&e[0]):t.invalid=!0;else 3===e.length||4===e.length?(n=e[0],r=e[1],i=e[2],o=4===e.length?e[3]:1):t.invalid=!0;var a;return Number.isNaN(+n+r+i+o)&&(t.invalid=!0),t.r=Math.floor(n),t.g=Math.floor(r),t.b=Math.floor(i),t.a=o,t}function ey(e){let t,n,r;if(Gg(e))return t=e.r.toString(16),n=e.g.toString(16),r=e.b.toString(16),1===t.length&&(t=`0${t}`),1===n.length&&(n=`0${n}`),1===r.length&&(r=`0${r}`),`#${[t,n,r].join("")}`;const i="string"==typeof e?Xg(e):e;return t=((16711680&i)>>16).toString(16),n=((65280&i)>>8).toString(16),r=(255&i).toString(16),1===t.length&&(t=`0${t}`),1===n.length&&(n=`0${n}`),1===r.length&&(r=`0${r}`),`#${t}${n}${r}`}function ty(e){let t,n,r=0;const i="string"==typeof e?Qg(e):e,o=i.r/255,a=i.g/255,s=i.b/255,{a:l}=i,c=Math.max(o,a,s),u=Math.min(o,a,s),d=(c+u)/2;if(c===u)t=0,r=0;else{switch(n=c-u,t=d>.5?n/(2-c-u):n/(c+u),c){case o:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-o)/n+2;break;case s:r=(o-a)/n+4}r/=6}return{h:360*r,s:100*t,l:100*d,a:l}}function ny(e){let t,n,r=0;const i="string"==typeof e?Qg(e):e,o=i.r/255,a=i.g/255,s=i.b/255,l=Math.max(o,a,s),c=Math.min(o,a,s),u=l;if(l===c)t=0,r=0;else{switch(n=l-c,t=0===n?0:n/u,l){case o:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-o)/n+2;break;case s:r=(o-a)/n+4}r/=6}return{h:360*r%360,s:100*t,v:100*u}}function ry(e){if(Gg(e))return`rgb(${e.r}, ${e.g}, ${e.b})`;const t="string"==typeof e?Xg(e):e;return`rgb(${(16711680&t)>>16}, ${(65280&t)>>8}, ${255&t})`}function iy(e,t){return Gg(e)?`rgba(${e.r}, ${e.g}, ${e.b}, ${e.a})`:iy(Qg(e))}function oy(e){return Gg(e)?1===e.a?ry(e):iy(e):oy(Qg(e))}const ay=e=>{const t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};function sy(...e){const t=Qg(...e);return t.invalid||function(e){return.2126*ay(e.r)+.7152*ay(e.g)+.0722*ay(e.b)}(t)<.4}function ly(...e){const t=Qg(...e),n={type:t.type,r:t.r,g:t.g,b:t.b,a:t.a,invalid:t.invalid,spaces:t.spaces},r=()=>(n.spaces.hslaObject||(n.spaces.hslaObject=ty(n)),n.spaces.hslaObject),i=e=>{const t=r(),{h:n,s:i,l:o,a:a}=t;return`hsla(${n}, ${i}, ${Math.max(0,Math.min(o+e,100))}, ${a})`};return{get type(){return n.type},isInvalid:()=>n.invalid,get r(){return n.r},get g(){return n.g},get b(){return n.b},get a(){return n.a},getR:()=>n.r,getG:()=>n.g,getB:()=>n.b,getAlpha:()=>n.a,setAlpha:e=>{n.a=e,n.spaces={}},isEqualTo:e=>{let t;if("string"==typeof e)t=Qg(e);else{if(e.type!==n.type)return!1;t=e}return t.r===n.r&&t.g===n.g&&t.b===n.b&&t.a===n.a},isDark:()=>sy(n),getRGB:()=>(n.spaces.rgb||(n.spaces.rgb=ry(n)),n.spaces.rgb),getRGBA:()=>(n.spaces.rgba||(n.spaces.rgba=iy(n)),n.spaces.rgba),getString:()=>(n.spaces.string||(n.spaces.string=oy(n)),n.spaces.string),getHex:()=>(n.spaces.hex||(n.spaces.hex=ey(n)),n.spaces.hex),getHSL:()=>(n.spaces.hsl||(n.spaces.hsl=function(e){let t,n,r=0;const i="string"==typeof e?Qg(e):e,o=i.r/255,a=i.g/255,s=i.b/255,l=Math.max(o,a,s),c=Math.min(o,a,s),u=(l+c)/2;if(l===c)t=0,r=0;else{switch(n=l-c,t=u>.5?n/(2-l-c):n/(l+c),l){case o:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-o)/n+2;break;case s:r=(o-a)/n+4}r/=6}return`hsl(${360*r}, ${100*t}, ${100*u})`}(n)),n.spaces.hsl),getHSLA:()=>(n.spaces.hsla||(n.spaces.hsla=function(e){const{h:t,s:n,l:r,a:i}=ty(e);return`hsla(${t}, ${n}, ${r}, ${i})`}(n)),n.spaces.hsla),getHSLAObject:r,getShiftedHSLA:i,getHSV:()=>(n.spaces.hsv||(n.spaces.hsv=function(e){const{h:t,s:n,v:r}=ny(e);return`hsv(${t}, ${n}, ${r})`}(n)),n.spaces.hsv),getHSVObject:()=>(n.spaces.hsvObject||(n.spaces.hsvObject=ny(n)),n.spaces.hsvObject),blend:(e,t)=>`rgba(${Math.floor(n.r+(e.r-n.r)*t)}, ${Math.floor(n.g+(e.g-n.g)*t)}, ${Math.floor(n.b+(e.b-n.b)*t)}, ${Math.floor(n.a+(e.getAlpha()-n.a)*t)})`,getBrightenedColor:(e=1)=>ly(i(18*e)),getDarkenedColor:(e=1)=>ly(i(18*-e))}}function cy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function uy(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function dy(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function a(e){uy(o,r,i,a,s,"next",e)}function s(e){uy(o,r,i,a,s,"throw",e)}a(void 0)})}}function fy(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function py(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hy(Object(n),!0).forEach(function(t){fy(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hy(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function my(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function gy(){
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof s?r:s,c=Object.create(l.prototype);return yy(c,"_invoke",function(n,r,i){var o,s,l,c=0,u=i||[],d=!1,f={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return o=t,s=0,l=e,f.n=n,a}};function h(n,r){for(s=n,l=r,t=0;!d&&c&&!i&&t<u.length;t++){var i,o=u[t],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=h&&((i=n<2&&h<o[1])?(s=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,u,p){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&h(u,p),s=u,l=p;(t=s<2?e:l)||!d;){o||(s?s<3?(s>1&&(f.n=-1),h(s,l)):f.n=l:f.v=l);try{if(c=2,o){if(s||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=e}else if((t=(d=f.n<0)?l:n.call(r,f))!==a)break}catch(t){o=e,s=1,l=t}finally{c=1}}return{value:t,done:d}}}(n,i,o),!0),c}var a={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][r]?t(t([][r]())):(yy(t={},r,function(){return this}),t),d=c.prototype=s.prototype=Object.create(u);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,yy(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=c,yy(d,"constructor",c),yy(c,"constructor",l),l.displayName="GeneratorFunction",yy(c,i,"GeneratorFunction"),yy(d),yy(d,i,"Generator"),yy(d,r,function(){return this}),yy(d,"toString",function(){return"[object Generator]"}),(gy=function(){return{w:o,m:f}})()}function yy(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}yy=function(e,t,n,r){function o(t,n){yy(e,t,function(e){return this._invoke(t,n,e)})}t?i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(o("next",0),o("throw",1),o("return",2))},yy(e,t,n,r)}function vy(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||Sy(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function by(e){return function(e){if(Array.isArray(e))return cy(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Sy(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xy(e){return xy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xy(e)}function Sy(e,t){if(e){if("string"==typeof e)return cy(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?cy(e,t):void 0}}var wy="point-label-cross-placement",My="unclassified",ky="equal-equal",Cy="equal-higher",qy="equal-lower",Ey="equal-void",Dy="higher-equal",Ty="higher-higher-acute",Oy="higher-higher-obtuse",Ny="higher-lower-negative",Ay="higher-lower-positive",_y="higher-void",Iy="lower-equal",Ly="lower-higher-negative",Py="lower-higher-positive",Ry="lower-lower-acute",zy="lower-lower-obtuse",Fy="lower-void",jy="void-equal",By="void-higher",Vy="void-lower",Hy="void-void";function $y(e,t){return Math.atan2(t.y-e.y,t.x-e.x)*(180/Math.PI)}function Wy(e,t,n){var r=Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)),i=Math.sqrt(Math.pow(t.x-n.x,2)+Math.pow(t.y-n.y,2)),o=Math.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2));return Math.acos((i*i+r*r-o*o)/(2*i*r))*(180/Math.PI)}function Uy(e){var t=e.previous,n=e.current,r=e.next,i=t&&t.value,o=n&&n.value,a=r&&r.value;return t||r?t?r?i===o?o===a?ky:o<a?Cy:qy:o===a?i>o?Dy:Iy:i>o?o<a?Wy(t,n,r)>90?Oy:Ty:$y(t,n)>$y(t,r)?Ay:Ny:o>a?Wy(t,n,r)>90?zy:Ry:$y(t,n)>$y(t,r)?Py:Ly:i===o?Ey:i>o?_y:Fy:o===a?jy:o<a?By:Vy:Hy}var Yy,Ky={TOP:"top",TOP_RIGHT:"top-right",RIGHT:"right",BOTTOM_RIGHT:"bottom-right",BOTTOM:"bottom",BOTTOM_LEFT:"bottom-left",LEFT:"left",TOP_LEFT:"top-left"};function Gy(e){var t=e.bounds,n=e.size,r=t.x,i=t.y,o=t.width,a=t.height;return"center"===n.insideStrategy?Math.floor(r+o/2)>=0&&Math.ceil(r+o/2)<=n.width&&Math.floor(i+a/2)>=0&&Math.ceil(i+a/2)<=n.height:Math.floor(r+o)>0&&Math.ceil(r)<n.width&&Math.floor(i+a/2)>=0&&Math.ceil(i+a/2)<=n.height}function Xy(){Yy=Yy||document.createElement("canvas").getContext("2d")}var Jy,Zy={measureTextWidth:function(e){return Xy(),Yy.measureText(e).width},lineWrap:function(e,t,n,r){var i,o;Xy();var a,s,l=e?e.split(/\n+|\r+|\r\n/):[],c=[],u=e?e.split(/\s+/):[],d=l[0];if("number"!=typeof t||t<=0)return[e];if("number"==typeof r&&l.length>=r)return l.slice(0,r);for(n&&(Yy.font=n),o=0;o<l.length;o++){for(d=vy(u=(l[o]||"").split(/\s+/),1)[0],s="",i=1;i<u.length;i++)if(a="".concat(d," ").concat(u[i]),Zy.measureTextWidth(a)>t&&("number"!=typeof r||r>c.length)?(c.push(d),d=u[i]):d=a,"number"==typeof r&&c.length>=r){s=u.slice(i+1).join(" ");break}"number"!=typeof r||c.length<r?c.push(d):c[Math.max(0,c.length-1)]="".concat(c[Math.max(0,c.length-1)]||""," ").concat(d," ").concat(s)}return c},wordWrap:function(e,t,n,r,i){if(Xy(),!e||!e.length)return[];n&&(Yy.font=n);var o,a,s,l,c=[],u=e.slice();if(u.filter(function(e){return!!e}),"number"!=typeof t||t<0)return e.slice();for(l=0;l<u.length;l++)a=null,(s=u[l])&&(s.length<=1||Zy.measureTextWidth(s)<=t?c.push(s):(o=Zy.splitWord(s,t,void 0,r-c.length)).length<=1?c.push(o[0]):(a=o.pop(),c=c.concat(o),u[l+1]?Zy.measureTextWidth("".concat(a," ").concat(u[l+1]))>t&&c.length+u.length-l<=r?u.splice(l+1,0,a):u[l+1]="".concat(a," ").concat(u[l+1]):u.push(a)));return c.forEach(function(e,t,n){n[t]=e?e.trim():e}),c.length>r?(c=c.splice(0,r))[c.length-1]=Zy.truncate(c[c.length-1],t,n,i).text:(s=c[c.length-1])&&s.length>1&&Zy.measureTextWidth(s)>t&&(c[c.length-1]=Zy.truncate(s,t,n,i).text),c},truncate:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…";Xy();var i,o,a,s=e,l=Zy.measureTextWidth("i"),c=Math.ceil(t/l);if(n&&(Yy.font=n),e&&t){if(Zy.measureTextWidth(s)>t){for(i=Math.min(c,s.length);i>0;i--)if(o=s.substring(0,i-1).trim()+r,Zy.measureTextWidth(o)<=t){a=s.substring(i-1),s=o;break}i||(a=s,s="…")}}else a=void 0;return{text:s,rest:a}},isNumber:function(e){return"number"==typeof e&&Number.isFinite(e)},explodeWord:function(e,t,n,r){var i;Xy();var o=e,a="",s=[];if(Zy.isNumber(n)&&n<=1)return[e];var l=Math.ceil(t/r);for(i=Math.min(e.length,l);i>0&&(o=e.substring(0,i)," "===e.substring(i-1,i)?o=e.substring(0,i-1):o+="-",a=e.substring(i),!(Zy.measureTextWidth(o)<=t));i--);return(!i&&!o||Zy.measureTextWidth(o)>t)&&(o=e.substring(0,1),a=e.substring(1)),s.push(o),a?(Zy.measureTextWidth(a)>t?(a=Zy.explodeWord(a,t,n-1,r),s=s.concat(a)):s.push(a),s.filter(function(e){return""!==e.trim()})):s},splitWord:function(e,t,n,r){return Xy(),e&&t?(n&&(Yy.font=n),Zy.explodeWord(e,t,r,Math.max(1,Zy.measureTextWidth("i")))):[]},wrapText:function(e,t,n,r,i){var o;return Number.isNaN(t)?[e]:(o=r>1?Zy.lineWrap(e,t,n,r):[e],o=Zy.wordWrap(o,t,n,r,i))},getFontHeight:function(e){return Xy(),e&&(Yy.font=e),1.5*Zy.measureTextWidth("m")},tokenize:function(e,t,n,r,i,o){var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1;Xy(),t&&(Yy.font=t);var s=Zy.getFontHeight(),l=a*s,c=[],u=0,d=[];if(o<s)return[];var f=o?Math.max(1,Math.floor(o/l)):r||1;return Array.isArray(r)?(r.forEach(function(e){u+=Number.isNaN(e)||e<=0?0:e}),r.forEach(function(e){c.push(Number.isNaN(e)||e<=0?f-u:e)})):c=[Number.isNaN(r)||r<=0?f:Math.min(f,r)],Array.isArray(e)?e.forEach(function(e,n){d.length<f&&(d=d.concat(Zy.wrapText(e,i,t,c[n])))}):d=Zy.wrapText(e,i,t,c[0],n),d}};function Qy(e){var t,n,r=e.config,i=e.crossPlacements,o=e.node,a=e.line,s=e.groupIndex,l=e.extract,c=e.style,u=e.measureText,d=e.size,f=e.horizontal,h=e.rtl,p=e.meta,m=e.showLabel,g=l.label(o.data);if("string"!=typeof g&&"number"!=typeof g||""===g)return!1;var y=function(){var e,t,n=u({fontFamily:c.fontFamily,fontSize:c.fontSize,text:g});if(null===(e=o.data)||void 0===e||null===(e=e.value)||void 0===e||!e.maxLabelWidth||n.width<=(null===(t=o.data)||void 0===t||null===(t=t.value)||void 0===t?void 0:t.maxLabelWidth))return n;var r="".concat(c.fontSize," ").concat(c.fontFamily),i=Zy.tokenize(g,r,"…",3,o.data.value.maxLabelWidth);return n.lines=i.map(function(e){return{text:e,size:u({fontFamily:c.fontFamily,fontSize:c.fontSize,text:e})}}),n.width=Math.max.apply(Math,by(n.lines.map(function(e){return e.size.width}))),n.height*=i.length,n}(),v=o.localBounds,b=o.attrs["stroke-width"],x=l.pointValue(o.data),S=!(null===(t=o.data)||void 0===t||null===(t=t.value)||void 0===t||!t.hasBackground),w=S?{X:3,Y:2}:{X:1,Y:0},M=S?{X:2,Y:2}:{X:0,Y:0},k={x:v.x+v.width/2,y:v.y+v.height/2,width:y.width+2*w.X+2*M.X,height:y.height+2*w.Y+2*M.Y},C="".concat(k.x,"-").concat(k.y),q=!f&&!h,E=f?d.height:d.width,D=(f?k.y:k.x)/E,T=(q?1-D:D)<=(E<=200?.25:.1),O=null===(n=o.data)||void 0===n||null===(n=n.value)||void 0===n||null===(n=n.label)||void 0===n?void 0:n.placement,N=Object.keys(Ky).map(function(e){return Ky[e]}),A={key:C,config:r,node:o,line:a,group:s,value:x,labelMeasurements:y,bounds:k,inside:Gy({bounds:v,size:d}),border:b?b/2:0,classification:My,setClassification:function(e){A.classification=e},preferences:[],setPreferences:function(e){var t;(t=A.preferences).push.apply(t,by(e))},fixedPlacement:N.includes(O)?O:void 0,placement:void 0,setPlacement:function(e){A.placement=e,i.setPlacement(e)},duplicate:!1,setDuplicate:function(){A.duplicate=!0},extreme:p.getExtreme(C),elite:T,show:r.labels&&m(o)};return A}var ev=(fy(fy(fy(fy(fy(fy(fy(fy(fy(fy(Jy={},ky,[Ky.TOP,Ky.BOTTOM]),Cy,[Ky.BOTTOM,Ky.BOTTOM_RIGHT]),qy,[Ky.TOP,Ky.TOP_RIGHT]),Ey,[Ky.TOP,Ky.BOTTOM]),Dy,[Ky.LEFT,Ky.BOTTOM_LEFT,Ky.TOP,Ky.TOP_RIGHT]),Ty,[Ky.BOTTOM,Ky.BOTTOM_LEFT,Ky.LEFT,Ky.TOP_RIGHT]),Oy,[Ky.BOTTOM,Ky.TOP]),Ny,[Ky.TOP,Ky.TOP_RIGHT,Ky.RIGHT]),Ay,[Ky.BOTTOM,Ky.BOTTOM_LEFT,Ky.LEFT]),_y,[Ky.TOP]),fy(fy(fy(fy(fy(fy(fy(fy(fy(fy(Jy,Iy,[Ky.TOP]),Ly,[Ky.TOP,Ky.TOP_LEFT]),Py,[Ky.BOTTOM_RIGHT]),Ry,[Ky.TOP,Ky.TOP_LEFT,Ky.LEFT,Ky.TOP_RIGHT,Ky.RIGHT]),zy,[Ky.TOP,Ky.BOTTOM]),Fy,[Ky.TOP]),jy,[Ky.TOP]),By,[Ky.TOP,Ky.BOTTOM]),Vy,[Ky.TOP,Ky.BOTTOM,Ky.LEFT]),Hy,[Ky.TOP]),fy(Jy,My,[Ky.TOP,Ky.BOTTOM,Ky.RIGHT,Ky.LEFT,Ky.TOP_RIGHT,Ky.BOTTOM_RIGHT,Ky.BOTTOM_LEFT,Ky.TOP_LEFT]));function tv(e){var t=function(e){var t=e.configs,n=e.crossPlacements,r=e.nodes,i=e.extract,o=e.style,a=e.measureText,s=e.size,l=e.horizontal,c=e.rtl,u=e.showLabel,d=function(e){var t={top:[],right:[],bottom:[],left:[]},n=e.nodes.map(function(e){var t=e.localBounds,n={x:t.x+t.width/2,y:t.y+t.height/2};return{key:"".concat(n.x,"-").concat(n.y),center:n}}),r=n.reduce(function(e,t){return(!e.top||t.center.y<e.top.center.y)&&(e.top=t),(!e.right||t.center.x>e.right.center.x)&&(e.right=t),(!e.bottom||t.center.y>e.bottom.center.y)&&(e.bottom=t),(!e.left||t.center.x<e.left.center.x)&&(e.left=t),e},{});return t.top=n.filter(function(e){return e.center.y===r.top.center.y}).map(function(e){return e.key}),t.right=n.filter(function(e){return e.center.x===r.right.center.x}).map(function(e){return e.key}),t.bottom=n.filter(function(e){return e.center.y===r.bottom.center.y}).map(function(e){return e.key}),t.left=n.filter(function(e){return e.center.x===r.left.center.x}).map(function(e){return e.key}),{getExtrema:function(e){return{top:-1!==t.top.indexOf(e),right:-1!==t.right.indexOf(e),bottom:-1!==t.bottom.indexOf(e),left:-1!==t.left.indexOf(e)}},getExtreme:function(e){return[t.top,t.right,t.bottom,t.left].some(function(t){return-1!==t.indexOf(e)})}}}({nodes:r}),f=function(e){var t=e.by,n=e.lineId,r=e.nodes.reduce(function(e,r,i){var o=t(r.data);return e[o]||(e[o]={items:[],index:i}),e[o].items.push({node:r,line:n(r)}),e},{});return Object.keys(r).map(function(e){return r[e]}).sort(function(e,t){return e.index-t.index}).map(function(e){return e.items})}({nodes:r,by:i.majorValue,lineId:i.lineId}).map(function(e,r){return e.map(function(e){return{line:e.line,item:Qy({config:t.get(e.node.key),crossPlacements:n,node:e.node,line:e.line,groupIndex:r,extract:i,style:o,measureText:a,size:s,horizontal:l,rtl:c,meta:d,showLabel:u})}}).filter(function(e){return e.item}).reduce(function(e,t){return e[t.line]=t.item,e},{})});return f.filter(function(e){return Object.keys(e).length})}({configs:e.configs,crossPlacements:e.crossPlacements,nodes:e.nodes,extract:e.extract,style:e.style,measureText:e.measureText,size:e.size,horizontal:e.horizontal,rtl:e.rtl,showLabel:e.showLabel}),n=by(t.reduce(function(e,t){return e.push.apply(e,by(Object.keys(t).map(function(e){return t[e]}))),e},[])),r=vy(n,1)[0],i=function(e){for(var t=e.threshold,n=e.groups.map(function(e){return Object.keys(e).map(function(t){return e[t]})}),r={},i=0;i<=n.length;i++){var o=n[i];if(o)for(var a=0;a<o.length;a++){var s=o[a];if(s.config.lines){var l=s.line;r[l]||(r[l]=[]),r[l].push(s.bounds)}}}for(var c=Object.keys(r).map(function(e){return r[e]}),u=[],d=0;d<c.length;d++)for(var f=0;f<c[d].length-1;f++){var h=c[d][f],p=c[d][f+1],m={x1:h.x,y1:h.y,x2:p.x,y2:p.y},g=m.x1-m.x2,y=m.y1-m.y2;Math.sqrt(g*g+y*y)>t&&u.push(m)}return u}({groups:t,threshold:null==r?void 0:r.node.localBounds.height}),o={getItems:function(){return n},getLines:function(){return i}};return function(e){for(var t=e.groups,n=function(e){for(var n=Object.keys(t[e]).map(function(n){return t[e][n]}),r=0;r<n.length;r++){var i=n[r];if(!i.config.fixed){var o=Uy({previous:t[e-1]&&t[e-1][i.line],current:i,next:t[e+1]&&t[e+1][i.line]});i.setClassification(o)}}},r=0;r<t.length;r++)n(r)}({groups:t}),o.getItems().forEach(function(e){e.setPreferences(ev[e.classification])}),o}function nv(e){var t=e.item,n=e.placement,r=e.size;return n.x>=0-r.edgeBleed.left&&n.x<=r.width-t.bounds.width+r.edgeBleed.right&&n.y>=0-r.edgeBleed.top&&n.y<=r.height-t.bounds.height}function rv(e){var t=e.line1,n=e.line2,r=(n.y2-n.y1)*(t.x2-t.x1)-(n.x2-n.x1)*(t.y2-t.y1);if(0===r)return!1;var i=((n.x2-n.x1)*(t.y1-n.y1)-(n.y2-n.y1)*(t.x1-n.x1))/r,o=((t.x2-t.x1)*(t.y1-n.y1)-(t.y2-t.y1)*(t.x1-n.x1))/r;return i>=0&&i<=1&&o>=0&&o<=1}var iv={x:0,width:0,y:0,height:0},ov=function(e){var t=e.item;return{x:t.bounds.x-t.bounds.width/2,y:t.bounds.y-t.bounds.height-t.node.localBounds.height/2-t.border}},av=function(e){var t=e.item;return{x:t.bounds.x,y:t.bounds.y-t.bounds.height-t.node.localBounds.height/2-t.border}},sv=function(e){var t=e.item;return{x:t.bounds.x+t.node.localBounds.width/2+t.border,y:t.bounds.y-t.bounds.height/2}},lv=function(e){var t=e.item;return{x:t.bounds.x,y:t.bounds.y+t.node.localBounds.height/2+t.border}},cv=function(e){var t=e.item;return{x:t.bounds.x-t.bounds.width/2,y:t.bounds.y+t.node.localBounds.height/2+t.border}},uv=function(e){var t=e.item;return{x:t.bounds.x-t.bounds.width,y:t.bounds.y+t.node.localBounds.height/2+t.border}},dv=function(e){var t=e.item;return{x:t.bounds.x-t.bounds.width-t.node.localBounds.width/2-t.border,y:t.bounds.y-t.bounds.height/2}},fv=function(e){var t=e.item;return{x:t.bounds.x-t.bounds.width,y:t.bounds.y-t.bounds.height-t.node.localBounds.height/2-t.border}},hv=[Ky.TOP,Ky.TOP_LEFT,Ky.TOP_RIGHT],pv=[Ky.BOTTOM,Ky.BOTTOM_LEFT,Ky.BOTTOM_RIGHT];function mv(e){var t=e.position,n={x:2.5,width:-5,y:0,height:0},r=hv.indexOf(t)>-1,i=pv.indexOf(t)>-1;return r&&(n.y=4,n.height=-4),i&&(n.height=-4),n}function gv(e){var t=e.cx,n=e.cy,r=e.r,i=e.degrees*(Math.PI/180);return{x:Math.round(t+r*Math.sin(i)),y:Math.round(n+r*-Math.cos(i))}}function yv(e){var t=e.coordinates,n=e.degrees,r=e.item,i={x:t.x,y:t.y};return n<=90?i.y-=r.bounds.height:n>180&&n<=270?i.x-=r.bounds.width:n>270&&(i.y-=r.bounds.height,i.x-=r.bounds.width),i}var vv=void 0;function bv(e){var t=e.item,n=e.validator,r=e.force,i=void 0!==r&&r,o=fy(fy(fy(fy(fy(fy(fy(fy({},Ky.TOP,ov),Ky.TOP_RIGHT,av),Ky.RIGHT,sv),Ky.BOTTOM_RIGHT,lv),Ky.BOTTOM,cv),Ky.BOTTOM_LEFT,uv),Ky.LEFT,dv),Ky.TOP_LEFT,fv);if(t.fixedPlacement)return o[t.fixedPlacement]({item:t});for(var a=[].concat(by(t.preferences),by(Object.keys(Ky).map(function(e){return Ky[e]}).filter(function(e){return-1===t.preferences.indexOf(e)}))),s=[],l=0;l<a.length;l++){var c=a[l],u=o[c]({item:t}),d=mv({position:c}),f=n({item:t,placement:u,adjustment:d,ignoreLines:i});if(i&&f.inside&&s.push(u),f.valid)return u}var h=function(){return function(e){for(var t=e.item,n=e.validator,r=e.force,i=void 0!==r&&r,o=function(e){return[e.item.node.localBounds.height/2*Math.sqrt(2)]}({item:t}),a=t.bounds.x,s=t.bounds.y,l=0;l<o.length;l++){for(var c=o[l],u=40;u<=180;u+=15){var d=yv({coordinates:gv({cx:a,cy:s,r:c,degrees:u}),degrees:u,item:t});if(n({item:t,placement:d,ignoreLines:i}).valid)return d}for(var f=320;f>180;f-=15){var h=yv({coordinates:gv({cx:a,cy:s,r:c,degrees:f}),degrees:f,item:t});if(n({item:t,placement:h,ignoreLines:i}).valid)return h}}return!1}({item:t,validator:n,force:i})};return i?h()||s[0]||vv:(t.extreme||t.elite)&&h()||vv}function xv(e){var t=e.configs,n=e.crossPlacements,r=e.model,i=e.size,o=e.all,a={},s=r.getItems(),l=[].concat(by(s.map(function(e){return{x:e.node.localBounds.x-e.border+1,y:e.node.localBounds.y-e.border+1,height:e.node.localBounds.height+2*e.border-2,width:e.node.localBounds.width+2*e.border-2}})),by(n.getPlacements({configs:t}))),c=[],u=r.getLines();s.forEach(function(e){var t=e.node.data;if(!(!e.show||!e.inside||t.null&&t.null.value||t.interpolated&&t.interpolated.value)){var n=e.key;if(!a[n]||e.config.duplicates){a[n]=!0;var r=function(e){var t=e.size,n=e.lines,r=e.placements;return function(e){var i=e.item,o=e.placement,a=e.adjustment,s=void 0===a?iv:a,l=e.ignoreLines,c=void 0!==l&&l,u={inside:nv({item:i,placement:o,size:t}),collides:!0,valid:!1};return u.inside?(u.collides=function(e){var t=e.candidate,n=e.lines;return!!e.rects.some(function(e){return function(e){var t=e.rect1,n=e.rect2;return!(n.x>t.x+t.width||n.x+n.width<t.x||n.y>t.y+t.height||n.y+n.height<t.y)}({rect1:e,rect2:t})})||n.some(function(e){return function(e){var t=e.line,n=e.rect,r={x:n.x,y:n.y},i={x:n.x+n.width,y:n.y},o={x:n.x+n.width,y:n.y+n.height},a={x:n.x,y:n.y+n.height},s={x1:i.x,y1:i.y,x2:o.x,y2:o.y},l={x1:o.x,y1:o.y,x2:a.x,y2:a.y},c={x1:a.x,y1:a.y,x2:r.x,y2:r.y};return rv({line1:t,line2:{x1:r.x,y1:r.y,x2:i.x,y2:i.y}})||rv({line1:t,line2:s})||rv({line1:t,line2:l})||rv({line1:t,line2:c})}({line:e,rect:t})})}({candidate:{x:o.x+s.x,y:o.y+s.y,width:i.bounds.width+s.width,height:i.bounds.height+s.height},lines:c?[]:n,rects:r}),u.valid=!u.collides,u):u}}({size:i,lines:u,placements:l}),s=bv({item:e,validator:r});s?(s.height=e.bounds.height,s.width=e.bounds.width,l.push(s),e.setPlacement(s)):o&&c.push({item:e,validator:r})}else e.setDuplicate()}}),c.forEach(function(e){var t=e.item,n=bv({item:t,validator:e.validator,force:!0});n&&(n.height=t.bounds.height,n.width=t.bounds.width,l.push(n),t.setPlacement(n))})}var Sv={require:["chart","renderer"],defaultSettings:{settings:{orientation:"horizontal",rtl:!1,all:!1,label:function(){},showLabel:function(){return!0},pointValue:function(){},majorValue:function(){},lineId:function(){},enabled:function(){return!0},configs:[],insideStrategy:"edge",labelSpace:{use:function(){return!1},size:10},cache:void 0},style:{fontFamily:'"Source Sans Pro", "Arial", "sans-serif"',fontSize:"12px",fill:"#333"}},created:function(){var e,t,n,r,i,o;this.crossPlacements=(e={cache:this.settings.settings.cache,key:this.settings.key},i=e.key,o={isPrimary:!1},null!=(r=e.cache)&&null!==(t=r.has)&&void 0!==t&&t.call(r,wy)||(o.isPrimary=!0,null==r||null===(n=r.set)||void 0===n||n.call(r,wy,{})),{reset:function(){var e,t=null==r||null===(e=r.get)||void 0===e?void 0:e.call(r,wy);t&&(o.isPrimary&&Object.keys(t).forEach(function(e){return delete t[e]}),t[i]=[])},setPlacement:function(e){var t,n=null==r||null===(t=r.get)||void 0===t?void 0:t.call(r,wy);n&&n[i].push(e)},getPlacements:function(e){var t,n=e.configs,o=null==r||null===(t=r.get)||void 0===t?void 0:t.call(r,wy);if(!o)return[];var a=[],s=n.getCollection().filter(function(e){return!e.labels&&!!e.labelKeys.length}).reduce(function(e,t){return e.push.apply(e,by(t.labelKeys)),e},[]);return Object.keys(o).forEach(function(e){e!==i&&s.some(function(t){return t===e})&&a.push.apply(a,by(o[e]))}),a}})},preferredSize:function(){var e={edgeBleed:{top:0,right:0,left:0}},t=this.settings.settings,n=t.orientation,r=t.rtl,i=t.labelSpace,o=i.use,a=i.size;if(o()){var s="horizontal"===n;e.edgeBleed.top=s?a:0,e.edgeBleed[r?"left":"right"]=s?0:a}return e},render:function(){this.crossPlacements.reset();var e=this.settings.settings;if(!(0,e.enabled)())return[];var t=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).configs,t=void 0===e?[]:e,n={},r=[];return t.forEach(function(e){var t=e.key;n[t]={labels:void 0===e.labels||e.labels,labelKeys:Array.isArray(e.labelKeys)?e.labelKeys:[],lines:void 0===e.lines||e.lines,fixed:void 0!==e.fixed&&e.fixed,duplicates:void 0!==e.duplicates&&e.duplicates},r.push(n[t])}),{meta:{allKeys:t.map(function(e){return e.key})},getCollection:function(){return r},get:function(e){return n[e]},getFirstLabelKey:function(){var e;return null===(e=t.find(function(e){return e.labels}))||void 0===e?void 0:e.key}}}({configs:e.configs}),n=t.getFirstLabelKey();if(!n)return[];if(!this.chart.component(n))return[];var r=this.chart.findShapes("circle, path, rect").filter(function(e){return t.meta.allKeys.includes(e.key)});if(!r.length)return[];var i="horizontal"===e.orientation,o=i?"x":"y";r.sort(function(e,t){return e.localBounds[o]-t.localBounds[o]});var a={label:e.label,pointValue:e.pointValue,majorValue:e.majorValue,lineId:e.lineId},s=this.rect,l={height:s.height,width:s.width,edgeBleed:s.edgeBleed,insideStrategy:e.insideStrategy},c=this.crossPlacements,u=this.style,d=tv({configs:t,crossPlacements:c,nodes:r,extract:a,style:u,measureText:this.renderer.measureText,size:l,horizontal:i,rtl:e.rtl,showLabel:e.showLabel});({model:d}).model.getItems().sort(function(e,t){return e.extreme===t.extreme?0:e.extreme&&!t.extreme?-1:1}),xv({configs:t,crossPlacements:c,model:d,size:l,all:e.all});var f=d.getItems(),h=[];f.filter(function(e){return e.placement}).forEach(function(e){var t,n,r,i,o,s=null!==(t=e.node.data.value)&&void 0!==t&&t.hasBackground?2:0,l=null!==(n=e.node.data.value)&&void 0!==n&&n.hasBackground?2:0,c=(null===(r=e.node.data.value)||void 0===r||null===(r=r.style)||void 0===r||null===(r=r.label)||void 0===r?void 0:r.fontSize)||u.fontSize,d=(null===(i=e.node.data.value)||void 0===i||null===(i=i.style)||void 0===i||null===(i=i.label)||void 0===i?void 0:i.fontFamily)||u.fontFamily,f=(null===(o=e.node.data.value)||void 0===o?void 0:o.labelColor)||u.fill;e.labelMeasurements.lines?e.labelMeasurements.lines.forEach(function(t,n){h.push({type:"text",x:e.placement.x+e.placement.width/2,y:e.placement.y+(n+.5)*t.size.height+s+l,fontSize:c,fontFamily:d,fill:f,text:t.text,data:e.node.data.value,baseline:"central",anchor:"middle"})}):h.push({type:"text",x:e.placement.x+e.placement.width/2,y:e.placement.y+e.labelMeasurements.height/2+s+l,fontSize:c,fontFamily:d,fill:f,text:a.label(e.node.data),data:e.node.data.value,baseline:"central",anchor:"middle"})});var p=f.filter(function(e){var t;return e.placement&&(null===(t=e.node.data.value)||void 0===t?void 0:t.hasBackground)}).map(function(e){var t;return{type:"rect",x:e.placement.x+2,y:e.placement.y+2,rx:3,ry:3,fill:null===(t=e.node.data.value)||void 0===t?void 0:t.labelBackgroundColor,width:e.placement.width-4,height:e.placement.height-4,data:e.node.data.value}});return[].concat(by(p),h)}},wv={ACTIONS:{select:{enabled:function(){return!1}}},COMPONENT_KEY:"area-range-component",COMPONENTS:[],DOCK:"bottom",ENABLE:function(){return!0},EVENT_KEY:"area-range",EVENTS:function(){},FILL_TARGETS:[],TARGETS:[]},Mv={area:"area",continuous:"range"};function kv(e){var t=e.config,n=e.type,r=void 0===n?"continuous":n,i=t.actions,o=t.componentKey,a=t.enable,s=t.eventKey,l=t.events,c=t.fillTargets;return{key:"event:".concat(o),type:"Pan",requireFailure:void 0,recognizeWith:void 0,options:{event:s,enable:function(e,t){if(!a())return!1;if(this.started===s||!t)return!0;if(!i.select.enabled())return!1;var n=this.chart.componentsFromPoint({x:t.center.x,y:t.center.y}).filter(function(e){return-1!==c.indexOf(e.key)}),r=0===n.length&&function(e,t){var n=e.srcEvent.target;return!(!n||0!==(n.getAttribute("data-key")||"").indexOf("".concat(t,"-")))}(t,o);return r?(this.started=s,!0):n.length>0}},events:fy(fy(fy({},"".concat(s,"start"),function(e){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,i.select.brushSelectionIncludeMax=!0),e.preventDefault(),i.select.emit("start",s),this.chart.component(o).emit("".concat(Mv[r],"Start"),e),this.started=s,l.onRangeStart({chart:this.chart})}),"".concat(s,"move"),function(e){e.preventDefault(),this.chart.component(o).emit("".concat(Mv[r],"Move"),e),l.onRangeMove({chart:this.chart})}),"".concat(s,"end"),function(e){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,i.select.brushSelectionIncludeMax=!0),e.preventDefault(),this.chart.component(o).emit("".concat(Mv[r],"End"),e),i.select.emit("end",s),this.started=!1,l.onRangeEnd({chart:this.chart})})}}function Cv(e){return kv({config:e,type:"continuous"})}var qv={ACTIONS:{select:{enabled:function(){return!1}}},BUBBLES_PLACEMENT:"inside",COMPONENT_KEY:"continuous-range-component",DOCK:"bottom",ENABLE:function(){return!0},EVENT_KEY:"continuous-range",EVENTS:function(){},FILL_TARGETS:[],MULTIPLE:!1,OBSERVE_BRUSH:!1,SCALE:"scale",TARGETS:[]};function Ev(e){var t=e.actions,n=e.componentKey,r=e.eventKey;if(!e.onEdited)return!1;var i="".concat(n,"-").concat(r,"-tap");return{prio:1,key:"event:".concat(n,"-tap"),type:"Tap",requireFailure:void 0,recognizeWith:void 0,options:{event:i,interval:10,pointers:1,enable:function(e,r){var i,o;return!(!r||!t.select.enabled()||"INPUT"!==(null===(i=r.target)||void 0===i?void 0:i.nodeName)&&(null===(o=r.target)||void 0===o||!o.hasAttribute("data-other-value")||(r.target.getAttribute("data-key")||"").split("-bubble")[0]!==n))}},events:fy({},i,function(e){(e.target.getAttribute("data-key")||"").split("-bubble")[0]&&(e.preventDefault(),this.chart.component(n).emit("bubbleStart",e))})}}function Dv(e){var t=function(){var e,t,n,r,i,o,a,s,l,c,u,d,f,h,p,m,g,y=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{actions:null!==(e=y.actions)&&void 0!==e?e:qv.ACTIONS,bubblesPlacement:null!==(t=y.bubblesPlacement)&&void 0!==t?t:qv.BUBBLES_PLACEMENT,componentKey:null!==(n=y.componentKey)&&void 0!==n?n:qv.COMPONENT_KEY,dock:null!==(r=y.dock)&&void 0!==r?r:qv.DOCK,enable:null!==(i=y.enable)&&void 0!==i?i:qv.ENABLE,eventKey:null!==(o=y.eventKey)&&void 0!==o?o:qv.EVENT_KEY,events:{onRangeStart:null!==(a=null===(s=y.events)||void 0===s?void 0:s.onRangeStart)&&void 0!==a?a:qv.EVENTS,onRangeMove:null!==(l=null===(c=y.events)||void 0===c?void 0:c.onRangeMove)&&void 0!==l?l:qv.EVENTS,onRangeEnd:null!==(u=null===(d=y.events)||void 0===d?void 0:d.onRangeEnd)&&void 0!==u?u:qv.EVENTS},fillTargets:null!==(f=y.fillTargets)&&void 0!==f?f:qv.FILL_TARGETS,multiple:null!==(h=y.multiple)&&void 0!==h?h:qv.MULTIPLE,observeBrush:null!==(p=y.observeBrush)&&void 0!==p?p:qv.OBSERVE_BRUSH,onEdited:y.onEdited,scale:null!==(m=y.scale)&&void 0!==m?m:qv.SCALE,targetFillSelector:y.targetFillSelector,targetSelector:y.targetSelector,targets:null!==(g=y.targets)&&void 0!==g?g:qv.TARGETS,toLabel:y.toLabel}}(e),n=[Cv(t),Ev(t)].filter(Boolean),r=function(e){var t=e.bubblesPlacement,n=e.componentKey,r=e.dock,i=e.fillTargets,o=e.multiple,a=e.observeBrush,s=e.onEdited,l=e.scale,c=e.targetFillSelector,u=e.targets,d=e.targetSelector,f=e.toLabel;return{key:n,type:"brush-range",layout:{dock:u.map(function(e){return"@".concat(e)}).join(",")},on:s?{bubbleEnd:function(){s()}}:{},settings:{brush:a?{context:"selection",observe:!0}:"selection",scale:l,multiple:o,direction:"left"===r||"right"===r?"vertical":"horizontal",bubbles:{align:"left"===r||"top"===r?"end":"start",placement:t,label:f},target:{components:i,selector:d,fillSelector:c,fill:"rgba(82,204,82,0.2)"}}}}(t);return{interactions:n,components:[r]}}var Tv={ACTIONS:{lasso:{enabled:function(){return!1},active:function(){return!1}},select:{enabled:function(){return!1}}},COMPONENT_KEY:"lasso",COMPONENTS:[],EVENTS:function(){},TARGET_KEYS:[]},Ov="lasso";var Nv={ACTIONS:{select:{enabled:function(){return!1}}},COMPONENTS:[],EVENTS:function(){},HIT_RADIUS:0,IS_LOCKED:function(){return!1},TARGETS:[]},Av="tap";function _v(e){var t=e.actions,n=e.components,r=e.events,i=e.hitRadius,o=e.isLocked,a=e.shapesAt,s=e.targets,l={targetComponents:[]};return{key:"event:tap",type:"Tap",requireFailure:void 0,recognizeWith:void 0,options:{event:Av,interval:10,pointers:1,enable:function(e,n){return!n||!!t.select.enabled()&&(l.targetComponents=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter(function(e){return-1!==s.indexOf(e.key)}),l.targetComponents.length>0)}},events:fy({},Av,function(e){if(e.preventDefault(),!o(l.targetComponents)&&t.select.enabled()){var c,u,d,f,h=(c=e,f=this.chart.element.getBoundingClientRect(),c.center?(u=c.center.x,d=c.center.y):(u=void 0===c.clientX?Math.floor(c.srcEvent.clientX):c.clientX,d=void 0===c.clientY?Math.floor(c.srcEvent.clientY):c.clientY),{x:u-f.left,y:d-f.top}),p="function"==typeof i?i(l.targetComponents):i,m=p>0?{cx:h.x,cy:h.y,r:p}:h,g=a?a(m):this.chart.shapesAt(m,{components:s.map(function(e){return{key:e}})}),y=this.chart.componentsFromPoint({x:e.center.x,y:e.center.y}),v=y.some(function(e){return"legend-cat"===e.type});if(!g.length&&v||(this.chart.brushSelectionIncludeMax=!1,t.select.brushSelectionIncludeMax=!1,t.select.emit("start",Av,y),r.onSelectStart()),g.length&&n){this.chart.brushSelectionIncludeMax=!1,t.select.brushSelectionIncludeMax=!1;var b="function"==typeof n?n(e,g):n;this.chart.brushFromShapes(g,{components:b}),t.select.emit("end",Av),r.onSelectEnd({chart:this.chart})}}})}}var Iv="object",Lv=["American Typewriter, serif","Andalé Mono, monospace","Arial Black, sans-serif","Arial, sans-serif","Bradley Hand, cursive","Brush Script MT, cursive","Comic Sans MS, cursive","Courier, monospace","Didot, serif","Georgia, serif","Impact, sans-serif","Lucida Console, monospace","Luminari, fantasy","Monaco, monospace","QlikView Sans, sans-serif","Source Sans Pro, sans-serif","Tahoma, sans-serif","Times New Roman, serif","Trebuchet MS, sans-serif","Verdana, sans-serif"],Pv=["Abril Fatface, serif","Bangers, fantasy","Bebas Neue, sans serif","EB Garamond, serif","Fredoka One, fantasy","Graduate, fantasy","Gravitas One, serif","Indie Flower, fantasy","Inter, sans-serif","Lobster, fantasy","Montserrat, sans-serif","Nixie One, sans-serif","Noto Sans, sans-serif","Open Sans, sans-serif","PT Serif, serif","Pacifico, cursive","Permanent Marker, fantasy","QlikView Sans, sans-serif","Raleway, sans-serif","Rammetto One, fantasy","Roboto, sans-serif","Source Sans Pro, sans-serif","Titan One, fantasy","Yanone Kaffeesatz, sans-serif"];var Rv=function(e){return{value:e,label:e.charAt(0).toUpperCase()+e.slice(1),groupHeader:!1,disabled:!1,styles:{fontFamily:e}}};function zv(e){var t=e.theme,n=e.translator,r=e.defaultValue,i=e.flags,o=[],a=t.getStyle("","","fontFamilies");return Array.isArray(a)&&a.length?o.push.apply(o,by(new Set([r].concat(by(a.map(function(e){return e.split(",").map(function(e){return e.trim()}).map(function(e){return e.replace(/\s+/g," ").trim()}).filter(Boolean).join(", ")})))))):o.push(r),[{value:"ThemeHeader",label:n.get("properties.themeFonts"),metaText:n.get("properties.theme"),groupHeader:!0}].concat(by(o.map(function(e){return Rv(e)})),[{value:"DefaultHeader",label:n.get("properties.allFonts"),metaText:n.get("properties.default"),groupHeader:!0}],by(function(e){return null!=e&&e.isEnabled("PS_20852_WYSIWYG_FONT_SUPPORT")?Pv:Lv}(i).map(function(e){return Rv(e)})))}function Fv(e){var t=e.theme,n=e.translator,r=e.id,i=e.path,o=e.flags,a=function(){return t.getStyle(r,i,"fontFamily")};return{getDefaultValue:function(){return a()},getOptions:function(){return zv({theme:t,translator:n,defaultValue:a(),flags:o})}}}var jv=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],Bv=function(e){return{value:e,label:e,groupHeader:!1,disabled:!1}};function Vv(e){var t=e.theme,n=e.translator,r=e.id,i=e.path,o=function(){return t.getStyle(r,i,"fontSize")};return{getDefaultValue:function(){return o()},getOptions:function(){return function(e){var t=e.translator,n=e.defaultValue,r=[],i=e.theme.getStyle("","","fontSizes");return Array.isArray(i)&&i.length?r.push.apply(r,by(new Set([n].concat(by(i))))):r.push(n),[{value:"ThemeHeader",label:t.get("properties.themeFontSizes"),metaText:t.get("properties.theme"),groupHeader:!0}].concat(by(r.map(function(e){return Bv(e)})),[{value:"DefaultHeader",label:t.get("properties.allFontSizes"),metaText:t.get("properties.default"),groupHeader:!0}],by(jv.map(function(e){return Bv(e)})))}({theme:t,translator:n,defaultValue:o()})}}}function Hv(e){var t=e.theme,n=e.translator,r=e.id,i=e.path;return{fontFamily:Fv({theme:t,translator:n,id:r,path:i,flags:e.flags}),fontSize:Vv({theme:t,translator:n,id:r,path:i})}}var $v,Wv,Uv=["__proto__","constructor"],Yv=function(e){if(Uv.some(function(t){return e.includes(t)}))throw new Error("font-resolver: Forbidden property.")};function Kv(e){return Gv.apply(this,arguments)}function Gv(){return(Gv=dy(gy().m(function e(t){var n,r,i,o;return gy().w(function(e){for(;;)switch(e.n){case 0:if(n=t.app,r=t.items,n.evaluateEx){e.n=1;break}return e.a(2,r);case 1:return e.n=2,Promise.all(r.filter(function(e){var t;return!(null===(t=e.qCalcCondition)||void 0===t||null===(t=t.qCond)||void 0===t||!t.qv)}).map(function(e){var t=e.qCalcCondition.qCond.qv;return n.evaluateEx(t).then(function(t){return 0===t.qNumber?e.qDef.cId:void 0}).catch(function(){return e.qDef.cId})}));case 2:return i=e.v,o=i.filter(Boolean),e.a(2,r.filter(function(e){return!o.includes(e.qDef.cId)}))}},e)}))).apply(this,arguments)}function Xv(e){var t=e.app,n=e.translator,r=e.dimension,i={id:r.qDef.cId,text:n.get("Object.ErrorMessage.MissingDimension"),meta:{}},o=r.qLibraryId;if(o)return t.getDimension?t.getDimension(o).then(function(e){return e.getLayout()}).catch(function(){}).then(function(e){if(!e)return i;var t=e.qDim,n=t.qGrouping,o=t.qLabelExpression,a="C"===n,s="H"===n,l="N"===n;return{id:r.qDef.cId,text:o&&l?o:e.qDim.title,meta:{isCyclic:a,isDrillDown:s,isNormal:l}}}):i;var a=r.qDef,s=a.cId,l=a.qLabelExpression,c=a.qFieldLabels,u=a.qFieldDefs,d={isCyclic:!1,isDrillDown:!1,isNormal:!0};return l?t.evaluate?t.evaluate(l).then(function(e){return{id:s,text:e,meta:d}}):i:{id:s,text:c[0]||u[0],meta:d}}function Jv(e){return Zv.apply(this,arguments)}function Zv(){return(Zv=dy(gy().m(function e(t){var n,r,i,o,a,s,l,c;return gy().w(function(e){for(;;)switch(e.n){case 0:if(r=t.app,i=t.translator,o=t.properties,a=(null==o||null===(n=o.qHyperCubeDef)||void 0===n||null===(n=n.qLayoutExclude)||void 0===n?void 0:n.qHyperCubeDef)||{},s=a.qDimensions,(l=void 0===s?[]:s).length){e.n=1;break}return e.a(2,Promise.resolve([]));case 1:return e.n=2,Kv({app:r,items:l});case 2:return c=e.v,e.a(2,Promise.all(c.map(function(e){return Xv({app:r,translator:i,dimension:e})})))}},e)}))).apply(this,arguments)}function Qv(e){var t=e.app,n=e.translator,r=e.measure,i={id:r.qDef.cId,text:n.get("Object.ErrorMessage.MissingMeasure")},o=r.qLibraryId;if(o)return t.getMeasure?t.getMeasure(o).then(function(e){return e.getLayout()}).catch(function(){}).then(function(e){if(!e)return i;var t=e.qMeasure.qLabelExpression;return{id:r.qDef.cId,text:t||e.qMeasure.qLabel||e.qMeasure.qDef}}):i;var a=r.qDef,s=a.cId,l=a.qLabelExpression,c=a.qLabel,u=a.qDef;return l?t.evaluate?t.evaluate(l).then(function(e){return{id:s,text:e}}):i:{id:s,text:c||u}}function eb(e){return tb.apply(this,arguments)}function tb(){return(tb=dy(gy().m(function e(t){var n,r,i,o,a,s,l,c;return gy().w(function(e){for(;;)switch(e.n){case 0:if(r=t.app,i=t.translator,o=t.properties,a=(null==o||null===(n=o.qHyperCubeDef)||void 0===n||null===(n=n.qLayoutExclude)||void 0===n?void 0:n.qHyperCubeDef)||{},s=a.qMeasures,(l=void 0===s?[]:s).length){e.n=1;break}return e.a(2,Promise.resolve([]));case 1:return e.n=2,Kv({app:r,items:l});case 2:return c=e.v,e.a(2,Promise.all(c.map(function(e){return Qv({app:r,translator:i,measure:e})})))}},e)}))).apply(this,arguments)}var nb=function(){if(Wv)return $v;Wv=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},o=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,i=e.call(n,"constructor"),o=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!i&&!o)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return $v=function e(){var t,n,r,l,c,u,d=arguments[0],f=1,h=arguments.length,p=!1;for("boolean"==typeof d&&(p=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<h;++f)if(null!=(t=arguments[f]))for(n in t)r=s(d,n),d!==(l=s(t,n))&&(p&&l&&(o(l)||(c=i(l)))?(c?(c=!1,u=r&&i(r)?r:[]):u=r&&o(r)?r:{},a(d,{name:n,newValue:e(p,u,l)})):void 0!==l&&a(d,{name:n,newValue:l}));return d},$v}(),rb=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(nb);function ib(e,t){return{range:function(e){var n=e.resources,r=e.data,i=n.theme.palette("categorical",0===t?r.items.length:t);return r.items.map(function(e){return i[e.value%i.length]})},valueAccessor:e.value}}function ob(e,t){return{range:function(e){var n=e.resources,r=e.data,i=n.theme.palette("categorical",0===t?r.items.length:t);return r.items.map(function(e){return i[e.row.value%i.length]})},valueAccessor:e.value}}function ab(e,t,n,r,i){var o,a,s=i.byRow,l=i.byElemNo;if(r&&(t.input.persistent||e.hc.qDimensionInfo.length>1||void 0===n.activeDimensionIndex&&e.hc.qSize.qcy>((null===(a=(o=e.hc).qDataPages[0]||o.qStackedDataPages[0])||void 0===a?void 0:a.qArea.qHeight)||0)))return l(r,r.raw().qCardinal);if(r){var c=t.pic.extract({field:r.key(),trackBy:r.value}).length;return s(r,c)}return{}}function sb(e,t){var n=e.hc.qDimensionInfo,r=t.input.byDimDef||{activeDimensionIndex:n.length-1};if(r.activeDimensionIndex>=0){var i=n[r.activeDimensionIndex];r=i.coloring&&i.coloring.colorMapRef?{type:"libraryItem",key:i.coloring.colorMapRef,activeDimensionIndex:r.activeDimensionIndex}:{activeDimensionIndex:r.activeDimensionIndex}}return r}function lb(e,t){var n;return t.activeDimensionIndex>=0?n=e.pic.fields().filter(function(e){return"dimension"===e.type()})[t.activeDimensionIndex]:"libraryItem"===t.type?!1===(n=t.key?e.pic.field(function(e){return e.raw().colorMapRef===t.key}):void 0)&&(n=e.pic.field(function(e){return"colorByAlternative"===e.raw().id})):"expression"===t.type&&(n=e.pic.field(function(e){return"colorByAlternative"===e.raw().id})),n}function cb(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function ub(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function db(){}var fb=.7,hb=1/fb,pb="\\s*([+-]?\\d+)\\s*",mb="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",gb="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",yb=/^#([0-9a-f]{3,8})$/,vb=new RegExp(`^rgb\\(${pb},${pb},${pb}\\)$`),bb=new RegExp(`^rgb\\(${gb},${gb},${gb}\\)$`),xb=new RegExp(`^rgba\\(${pb},${pb},${pb},${mb}\\)$`),Sb=new RegExp(`^rgba\\(${gb},${gb},${gb},${mb}\\)$`),wb=new RegExp(`^hsl\\(${mb},${gb},${gb}\\)$`),Mb=new RegExp(`^hsla\\(${mb},${gb},${gb},${mb}\\)$`),kb={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Cb(){return this.rgb().formatHex()}function qb(){return this.rgb().formatRgb()}function Eb(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=yb.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Db(t):3===n?new Ab(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Tb(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Tb(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=vb.exec(e))?new Ab(t[1],t[2],t[3],1):(t=bb.exec(e))?new Ab(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=xb.exec(e))?Tb(t[1],t[2],t[3],t[4]):(t=Sb.exec(e))?Tb(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=wb.exec(e))?zb(t[1],t[2]/100,t[3]/100,1):(t=Mb.exec(e))?zb(t[1],t[2]/100,t[3]/100,t[4]):kb.hasOwnProperty(e)?Db(kb[e]):"transparent"===e?new Ab(NaN,NaN,NaN,0):null}function Db(e){return new Ab(e>>16&255,e>>8&255,255&e,1)}function Tb(e,t,n,r){return r<=0&&(e=t=n=NaN),new Ab(e,t,n,r)}function Ob(e){return e instanceof db||(e=Eb(e)),e?new Ab((e=e.rgb()).r,e.g,e.b,e.opacity):new Ab}function Nb(e,t,n,r){return 1===arguments.length?Ob(e):new Ab(e,t,n,null==r?1:r)}function Ab(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function _b(){return`#${Rb(this.r)}${Rb(this.g)}${Rb(this.b)}`}function Ib(){const e=Lb(this.opacity);return`${1===e?"rgb(":"rgba("}${Pb(this.r)}, ${Pb(this.g)}, ${Pb(this.b)}${1===e?")":`, ${e})`}`}function Lb(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Pb(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Rb(e){return((e=Pb(e))<16?"0":"")+e.toString(16)}function zb(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new jb(e,t,n,r)}function Fb(e){if(e instanceof jb)return new jb(e.h,e.s,e.l,e.opacity);if(e instanceof db||(e=Eb(e)),!e)return new jb;if(e instanceof jb)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new jb(a,s,l,e.opacity)}function jb(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Bb(e){return(e=(e||0)%360)<0?e+360:e}function Vb(e){return Math.max(0,Math.min(1,e||0))}function Hb(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}cb(db,Eb,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Cb,formatHex:Cb,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Fb(this).formatHsl()},formatRgb:qb,toString:qb}),cb(Ab,Nb,ub(db,{brighter(e){return e=null==e?hb:Math.pow(hb,e),new Ab(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?fb:Math.pow(fb,e),new Ab(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ab(Pb(this.r),Pb(this.g),Pb(this.b),Lb(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:_b,formatHex:_b,formatHex8:function(){return`#${Rb(this.r)}${Rb(this.g)}${Rb(this.b)}${Rb(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Ib,toString:Ib})),cb(jb,function(e,t,n,r){return 1===arguments.length?Fb(e):new jb(e,t,n,null==r?1:r)},ub(db,{brighter(e){return e=null==e?hb:Math.pow(hb,e),new jb(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?fb:Math.pow(fb,e),new jb(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Ab(Hb(e>=240?e-240:e+120,i,r),Hb(e,i,r),Hb(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new jb(Bb(this.h),Vb(this.s),Vb(this.l),Lb(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 e=Lb(this.opacity);return`${1===e?"hsl(":"hsla("}${Bb(this.h)}, ${100*Vb(this.s)}%, ${100*Vb(this.l)}%${1===e?")":`, ${e})`}`}}));const $b=Math.PI/180,Wb=180/Math.PI,Ub=.96422,Yb=.82521,Kb=4/29,Gb=6/29,Xb=3*Gb*Gb,Jb=Gb*Gb*Gb;function Zb(e){if(e instanceof Qb)return new Qb(e.l,e.a,e.b,e.opacity);if(e instanceof ix)return ox(e);e instanceof Ab||(e=Ob(e));var t,n,r=rx(e.r),i=rx(e.g),o=rx(e.b),a=ex((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?t=n=a:(t=ex((.4360747*r+.3850649*i+.1430804*o)/Ub),n=ex((.0139322*r+.0971045*i+.7141733*o)/Yb)),new Qb(116*a-16,500*(t-a),200*(a-n),e.opacity)}function Qb(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function ex(e){return e>Jb?Math.pow(e,1/3):e/Xb+Kb}function tx(e){return e>Gb?e*e*e:Xb*(e-Kb)}function nx(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function rx(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function ix(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function ox(e){if(isNaN(e.h))return new Qb(e.l,0,0,e.opacity);var t=e.h*$b;return new Qb(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}cb(Qb,function(e,t,n,r){return 1===arguments.length?Zb(e):new Qb(e,t,n,null==r?1:r)},ub(db,{brighter(e){return new Qb(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new Qb(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new Ab(nx(3.1338561*(t=Ub*tx(t))-1.6168667*(e=1*tx(e))-.4906146*(n=Yb*tx(n))),nx(-.9787684*t+1.9161415*e+.033454*n),nx(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),cb(ix,function(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof ix)return new ix(e.h,e.c,e.l,e.opacity);if(e instanceof Qb||(e=Zb(e)),0===e.a&&0===e.b)return new ix(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Wb;return new ix(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new ix(e,t,n,null==r?1:r)},ub(db,{brighter(e){return new ix(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new ix(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return ox(this).rgb()}}));var ax=e=>()=>e;function sx(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):ax(isNaN(e)?t:e)}var lx=function e(t){var n=function(e){return 1===(e=+e)?sx:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):ax(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=Nb(e)).r,(t=Nb(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=sx(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1),cx=/^class(-pyramid)?/,ux=function(e,t,n,r){var i=void 0!==n.min?n.min:r.min(),o=void 0!==n.max?n.max:r.max(),a=i,s=o,l=t.limits,c={},u="percent"===t.limitType?l.map(function(e){return i+(o-i)*e}):l,d=t.colors.map(function(t){return e.resolveUIColor(t)});if(i=Math.min.apply(Math,[i].concat(by(u))),o=Math.max.apply(Math,[o].concat(by(u))),c.min=i,c.max=o,t.breakTypes&&-1===t.breakTypes.indexOf(!0))c.type="categorical",Object.assign(c,function(e){var t=e.min,n=e.max,r=e.limits,i=e.range,o=[],a=[];if(r.length)if(r[r.length-1]<t)a.push(t,n),o.push(i[i.length-1],i[i.length-1],i[i.length-1]);else if(r[0]>n)a.push(t,n),o.push(i[0],i[0],i[0]);else{if(r[0]>t)a.push(t),o.push(i[0]);else{a.push(t);for(var s=0;s<r.length;s++)if(t<r[s]){o.push(i[s]);break}}for(var l=0;l<r.length;l++)t<r[l]&&r[l]<n&&(a.push(r[l]),o.push(i[l]));if(r[r.length-1]<n)a.push(n),o.push(i[r.length]),o.push(i[r.length]);else{a.push(n);for(var c=0;c<r.length;c++)if(r[c]>n){o.push(i[c]),o.push(i[c]);break}}}else o.push(i[0]);return{min:t,max:n,range:o,domain:a}}({min:"percent"===t.limitType?i:a,max:"percent"===t.limitType?o:s,range:d,limits:"percent"===t.limitType?u:l}));else if(t.breakTypes){var f=t.breakTypes;c.type="continuous",c.domain=[i],c.range=[d[0]];for(var h=0;h<u.length;h+=1)if(f[h]){var p=d[h],m=d[h+1],g=lx(p,m)(.5);c.range.push(g),c.domain.push(u[h]),h<u.length-1&&f[h+1]&&(c.range.push(d[h+1]),c.domain.push((u[h]+u[h+1])/2))}else c.range.push(d[h]),c.range.push(d[h+1]),c.domain.push(u[h]),c.domain.push(u[h]+Math.min(1e-6,(o-i)/1e6));c.range.push(d[d.length-1]),c.domain.push(o)}else c.domain=u,c.range=d;return c};function dx(e,t,n,r,i){var o,a,s,l=0,c=[],u=(e-t)/(r+1);if(0===u)return 1;for(o=0;o<n.length;o+=1)a=.99*(n[o]-t),s=n[o]>e?Math.floor(e/u):n[o]<t?0:Math.floor(a/u),Number.isNaN(s)||(c[s]?c[s]+=1:c[s]=1);for(o=0;o<c.length;o+=1)c[o]&&(l+=1);return l<=r||l>=i?Math.max(l,r):dx(e,t,n,r+1,i)}var fx=function(e,t,n,r){var i,o,a=t.theme,s=t.hc,l=r.f,c={mode:"field",fieldType:"measure",field:l?l.key():void 0,reverse:n.input.reverseScheme||!1,type:"continuous",range:function(e){return e.resources.theme.palette("quant")}},u=[],d=!0;if(l){if(Number.isNaN(+l.min())||Number.isNaN(+l.max()))return{invalid:!0};(d=!("S"===(i=n.pic.raw()).qMode&&(i.qDataPages[0]&&i.qSize.qcy>i.qDataPages[0].qArea.qHeight||!i.qDataPages.length&&i.qSize.qcy>0)||"K"===i.qMode&&i.qStackedDataPages[0]&&i.qSize.qcy>i.qStackedDataPages[0].qArea.qHeight||"T"===i.qMode&&i.qSize.qcy>i.qTreeDataPages[0].qGroupSize))&&(u=n.pic.extract({field:0,props:{num:{field:l.key()},exclude:{fields:s.qDimensionInfo.map(function(e,t){return{field:"qDimensionInfo/".concat(t)}}),value:function(e){return Math.min.apply(Math,by(e))<0}}}}).filter(function(e){return e.value>=0&&!e.exclude.value}).map(function(e){return e.num.value}).filter(function(e){return"number"==typeof e}))}if(!1===n.input.autoMinMax){if(c.min=n.input.measureMin,c.max=n.input.measureMax,c.max<c.min)return{invalid:!0}}else if(l&&!d)c.min=l.min(),c.max=l.max();else if(l){if(!u.length)return{invalid:!0};c.min=Math.min.apply(Math,by(u)),c.max=Math.max.apply(Math,by(u))}if(n.input.measureScheme&&(c.palettes={quant:n.input.measureScheme}),a){var f=a.getDataColorScales().filter(function(e){return e.key===n.input.measureScheme})[0];c.type=f&&cx.test(f.type)?"categorical":"continuous","categorical"===c.type&&(o=f.colors.some(function(e){return Array.isArray(e)})?Math.max.apply(Math,by(f.colors.map(function(e){return e?e.length:0}))):f.colors.length)}if("categorical"===c.type){for(var h=d?dx(c.max,c.min,u,1,o):o,p=(c.max-c.min)/h,m=[],g=0;g<h+1;g+=1)m.push(c.min+p*g);c.domain=m,c.range=function(e){for(var t=e.resources.theme.palette("quant",h),n=Math.max(1,Math.floor(t.length/h)),r=[],i=0;i<h;i+=1)r.push(t[i*n]);return[r[0]].concat(r,[r[r.length-1]])}}return c};function hx(e,t){var n;return t.activeMeasureIndex>=0?n=e.pic.fields().filter(function(e){return"measure"===e.type()})[t.activeMeasureIndex]:"libraryItem"===t.type?n=e.pic.field(function(e){return e.raw().colorMapRef===t.key&&void 0!==t.key}):"expression"===t.type&&(n=e.pic.field(function(e){return"colorByAlternative"===e.raw().id})),n||(n=e.pic.field(function(e){return void 0!==e.raw().matchMeasure}))&&(n=e.pic.fields().filter(function(e){return"measure"===e.type()})[n.raw().matchMeasure]),n}function px(e){e.measureOverrides.every(function(e){return!e})&&(e.measureOverrides=null)}function mx(e,t){for(var n=(null==t?void 0:t.domain)||[],r=(null==t?void 0:t.range)||[],i=[],o=0;o<e.length;++o){var a=e[o];if("constant"===(null==a?void 0:a.mode)){var s=n.indexOf(o);-1===s?(n.push(o),r.push(a.primary)):r[s]=a.primary,e[o]=null}else if(a){i.push(o);var l=n.indexOf(o);-1!==l&&(n.splice(l,1),r.splice(l,1))}}return{domain:n,range:r,exclude:i}}function gx(e,t,n,r){var i,o=function(e,t,n,r){if(t.input&&!t.input.auto){if("byMeasure"===t.input.mode)return function(e,t,n){var r=t.theme,i=t.hc,o=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).getCField,a=void 0===o?hx:o,s=n.input.byMeasureDef||{activeMeasureIndex:0},l=a(n,s),c=fx(0,{theme:r,hc:i},n,{f:l});if(c.invalid)return c;"expression"===s.type&&(s.activeMeasureIndex<0||void 0===s.activeMeasureIndex)&&(c.label=s.label,l&&"color.altLabel"===l.raw().labelExpRef&&(c.label=n.input.altLabel)),!c.label&&l&&(c.label=l.title());var u=s.activeMeasureIndex>=0?l:null;if(!u&&l&&void 0!==l.raw().matchMeasure&&l.raw().matchMeasure>-1&&(u=n.pic.fields().filter(function(e){return"measure"===e.type()})[l.raw().matchMeasure]),n.input.useMeasureGradient&&"libraryItem"===s.type)if(u){var d=u.raw().coloring;d&&d.gradient&&rb(c,ux(e,d.gradient,c,u))}else c.auxiliary=s;return c}(e,n,t);if("byDimension"===t.input.mode)return function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.getCDef,o=void 0===i?sb:i,a=r.getCByField,s=void 0===a?lb:a,l=r.getPersistence,c=void 0===l?ab:l,u=o(t,n),d=s(n,u),f=d?d.raw():{},h=n&&n.pic?n.pic.raw():{};if(f.qError||f.qSize&&0===f.qSize.qcy&&!h.qHasOtherValues)return{invalid:!0};var p={mode:"field",fieldType:"dimension",type:"categorical",field:d?d.key():void 0,isFieldLocked:f.qLocked};return("expression"===u.type||u.activeDimensionIndex<0)&&(p.label=u.label,"color.altLabel"===f.labelExpRef&&(p.label=n.input.altLabel)),!p.label&&d&&(p.label=d.title()),n.input.dimensionScheme&&(p.palettes={categorical:n.input.dimensionScheme}),n.input.useDimColVal&&"libraryItem"===u.type&&(p.auxiliary=u),rb(p,c(t,n,u,d,{byRow:ob,byElemNo:ib})),p}(e,n,t);if("byExpression"===t.input.mode)return function(e,t,n,r){var i=t.hc,o=t.theme,a=t.translator,s=n.pic.field(function(e){return"colorByExpression"===e.raw().id});if(!s||!s.raw().qFallbackTitle&&!n.input.colorExpression||!(Number.isFinite(s.raw().qMin)&&Number.isFinite(s.raw().qMax)||n.input.expressionIsColor))return{mode:"constant",type:"constant",primary:r.nil};if(n.input.expressionIsColor)return{mode:"field",fieldType:"expression",field:s?s.key():void 0,type:"color"};var l=fx(0,{hc:i,theme:o},n,{f:s});return l.invalid||(l.label=n.input.expressionLabel||a.get("Object.ChartTooltip.ColorExpression")),l}(0,n,t,r);if("byMultiple"===t.input.mode||"primary"===t.input.mode)return function(e,t,n,r){var i=t.hc,o=t.theme,a=t.translator,s=n.input.useBaseColors;if(("byMultiple"===n.input.mode||"primary"===n.input.mode&&"measure"===n.input.useBaseColors)&&i.qMeasureInfo.length>1&&(s="measure"),"measure"===s){var l=[],c=[];"measure"===n.input.useBaseColors&&i.qMeasureInfo.forEach(function(t,n){if(t.baseColor||t.coloring&&t.coloring.baseColor){l.push(n);var i=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===i?c.push(r.primary):c.push(i)}});var u=n.input.dimensionScheme?{categorical:n.input.dimensionScheme}:void 0,d=o?o.getDataColorPalettes()[0]:void 0;return"measure"===n.input.useBaseColors&&d&&(u={categorical:d.key}),{mode:"measure",type:"categorical",palettes:u,label:a?a.get("Common.Measures"):void 0,explicit:l.length?{domain:l,range:c}:void 0}}if("dimension"===s){var f=[],h=[];return i.qDimensionInfo.forEach(function(t,n){if(t.baseColor||t.coloring&&t.coloring.baseColor){f.push(n);var i=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===i?h.push(r.primary):h.push(i)}}),{mode:"dimension",type:"categorical",field:f.length?f[0]:void 0,explicit:f.length?{domain:f,range:h}:void 0}}var p=r.primary;if(void 0!==n.input.paletteColor)n.input.paletteColor&&(p=e.resolveUIColor(n.input.paletteColor));else{var m=n.input.singleColor;"number"!=typeof m||Number.isNaN(m)||(p=["#b0afae","#7b7a78","#545352","#4477aa","#7db8da","#b6d7ea","#46c646","#f93f17","#ffcf02","#276e27","#ffffff","#000000"][m])}return{mode:"constant",type:"constant",primary:p}}(e,n,t,r)}return{}}(e,t,n,r);return null!==(i=t.input)&&void 0!==i&&i.measureOverrides?(o.measureOverrides=t.input.measureOverrides.map(function(n,i){return function(e){var t,n=e.cm,r=e.defaults,i=e.index,o=e.input,a=e.pic;if(!o||!o.on)return null;var s=null!==(t=o.mode)&&void 0!==t?t:"primary";return"primary"===s?function(e,t,n){var r=n.primary;return void 0!==t.paletteColor&&t.paletteColor&&(r=e.resolveUIColor(t.paletteColor)),py(py({},n),{},{mode:"constant",type:"constant",primary:r})}(n,o,r):"byExpression"===s?function(e,t,n){var r="qMeasureInfo/".concat(e,"/"),i=t.field(function(e){return e.id().startsWith(r)&&"colorByMeasureExpression"===e.raw().id}),o=i;return py(py({},n),{},o?{mode:"field",fieldType:"expression",field:i?i.key():void 0,type:"color"}:{mode:"constant",type:"constant",primary:n.nil})}(i,a,r):null}({cm:e,input:n,defaults:r,index:i,pic:t.pic})}),function(e,t){var n,r,i,o=t.translator;if(px(e),1===(null===(n=e.measureOverrides)||void 0===n?void 0:n.length))return e.measureOverrides[0];if("measure"===e.mode&&e.measureOverrides&&(e.explicit=mx(e.measureOverrides,e.explicit),px(e)),null!==(r=e.measureOverrides)&&void 0!==r&&r.every(function(e){return"constant"===(null==e?void 0:e.mode)})){var a={mode:"measure",type:"categorical",label:null==o?void 0:o.get("Common.Measures")};return a.explicit=mx(e.measureOverrides),a}return null!==(i=e.measureOverrides)&&void 0!==i&&i.every(function(e){return e})?{invalid:!0,measureOverrides:e.measureOverrides}:e}(o,n)):o}var yx=function(e,t){var n=e.fieldType,r={};if(t)if("measure"===n){var i=t.coloring;i&&(r.measureGradient=i.gradient)}else if("dimension"===n){var o=t[0],a=t[1];o&&(r.legendDataPage=o),a&&(r.dimValsData=a.colorMap)}return r},vx=function(e){throw e.isHandled=!0,e};function bx(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.auto,n=function(e){var t=py({hc:null,colorProps:null,layout:null,theme:null},e),n={},r={auto:function(){return{mode:"primary"}},getDimensionColorMap:function(){return Promise.reject()},getMeasure:function(){return Promise.reject()},getAttributeDimension:function(){return Promise.reject()}},i={auto:function(e){return e?(r.auto=e,i):r.auto},getDimensionColorMap:function(e){return e?(r.getDimensionColorMap=e,i):r.getDimensionColorMap},getAttributeDimension:function(e){return e?(r.getAttributeDimension=e,i):r.getAttributeDimension},getMeasure:function(e){return e?(r.getMeasure=e,i):r.getMeasure},set:function(e){var i;if(!e.colorProps)throw new Error('Missing "colorProps"');if(rb(t,e),(n={pic:t.picasso.data("q")({data:t.hc,config:{localeInfo:t.localeInfo}}),input:t.colorProps}).input.auto){var o=r.auto(e.layout);n.input=rb(!0,{},n.input,o,{auto:!1});var a=t.theme?t.theme.getDataColorPalettes():[];a[0]&&(n.input.dimensionScheme=a[0].key);var s=0;n.input.byDimDef&&+n.input.byDimDef.activeDimensionIndex>=0&&(s=+n.input.byDimDef.activeDimensionIndex),t.hc&&t.hc.qDimensionInfo[s]&&t.hc.qDimensionInfo[s].coloring&&t.hc.qDimensionInfo[s].coloring.colorMapRef&&n.input.byDimDef&&(n.input.byDimDef.type="libraryItem",n.input.byDimDef.key=t.hc.qDimensionInfo[s].coloring.colorMapRef)}null!==(i=n.input.measureOverrides)&&void 0!==i&&i.every(function(e){return!e||!e.on})&&(n.input=rb(!1,{},n.input,{measureOverrides:null}))},palettes:function(){if(!n.palettes){var e=t.theme,r=[];(e&&e.getDataColorPickerPalettes()||[]).forEach(function(e){r.push({key:"ui",colors:e.colors})}),n.palettes=r}return n.palettes},getAuxiliaryData:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/qHyperCubeDef";if(!e.auxiliary&&!/qAttrDimInfo/.test(e.field))return Promise.resolve();var i=(e.auxiliary||{}).key;if("measure"===e.fieldType)return r.getMeasure(i,t).catch(function(){});if("dimension"===e.fieldType){var o="".concat(n,"/").concat(e.field).replace("qDimensionInfo","qDimensions").replace("qAttrDimInfo","qAttributeDimensions");return Promise.all([/qAttrDimInfo/.test(e.field)?r.getAttributeDimension(o,t).catch(function(){}):Promise.resolve(),i?r.getDimensionColorMap(i,t).catch(function(){}):Promise.resolve()])}return Promise.resolve()},getAuxiliarySettings:function(e,r){var i=this;return e.auxiliary||/qAttrDimInfo/.test(e.field)?(this.palettes(),this.getAuxiliaryData(e,r).then(function(r){if(!r)return{};if("measure"===e.fieldType){if(r.coloring&&r.coloring.gradient){var o=n.pic.field(e.field);return ux(i,r.coloring.gradient,e,o)}return{}}if("dimension"===e.fieldType){var a={nil:e.nil,others:e.others},s=r[0],l=r[1]?r[1].colorMap:null;if(s){var c=t.picasso.data("q")({data:{qDimensionInfo:[n.pic.field(e.field).raw(),n.pic.field(e.field).raw()],qMeasureInfo:[],qDataPages:s,qInterColumnSortOrder:[0,1],qMode:"S"}});a.legendDataset=c}return l?function(e,t,n,r){var i=r.external,o=r.field,a=py({},e);rb(a,ib(o,o.raw().qCardinal));var s=i.theme?i.theme.getDataColorPalettes()[0]:null;return t.nul&&(a.nil=n.resolveUIColor(t.nul)),t.oth&&(a.others=n.resolveUIColor(t.oth)),t.usePal?(a.palettes={categorical:t.pal},s&&!t.pal&&(a.palettes.categorical=s.key,rb(a,ib(o)))):!1===t.autoFill&&t.single?a.range=[n.resolveUIColor(t.single)]:t.autoFill&&(s&&(a.palettes={categorical:s.key}),rb(a,ib(o))),t.colors&&t.colors.length&&(a.explicit=function(e,t,n){for(var r={},i=0;i<e.length;i+=1)r[e[i].value]=e[i].baseColor;var o=[];return{domain:function(e){var i=e.data,a=[];o=[];for(var s=0;s<i.items.length;s++){var l=i.items[s],c=(l.text||l).label;r[c]&&-1===a.indexOf(l.value)&&(a.push(l.value),o.push(t.resolveUIColor(r[c])))}return a.push(-3,-2),o.push(n.others),o.push(n.nil),a},range:function(){return o}}}(t.colors,n,a)),a}(a,l,i,{external:t,field:n.pic.field(e.field)}):a}return{}})):Promise.resolve()},resolveUIColor:function(e){if(e.index<0||void 0===e.index)return e.color;if(void 0===n.uiPalette&&(n.uiPalette=this.palettes().filter(function(e){return"ui"===e.key})[0]||!1),!n.uiPalette)return e.color;var t="none"===n.uiPalette.colors[0]?e.index:e.index-1;return void 0===n.uiPalette.colors[t]?e.color:n.uiPalette.colors[t]},settings:function(){if(this.palettes(),!n.settings){var e={primary:"steelblue",others:"#aaa",nil:"#ddd"},r=t.theme;r&&(e=py(py({},e),r.getDataColorSpecials())),n.settings=rb(e,gx(this,n,t,e))}return n.settings}};return i}(e.resources).auto(t||function(){return{mode:"byDimension",persistent:!1,useDimColVal:!0,byDimDef:{activeDimensionIndex:0,type:"expression",label:""}}}).getDimensionColorMap(function(e,t){return function(e,t){var n=t.layout,r=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.dimValsData?Promise.resolve({colorMap:n.snapshotData.content.chartData.dimValsData}):Promise.reject():r&&r.getObject?r.getObject("ColorMapModel_".concat(e)).then(function(e){return e.getLayout()}):Promise.reject()}(e,{layout:t.layout,app:t.app})}).getMeasure(function(e,t){return function(e,t){var n=t.layout,r=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.measureGradient?Promise.resolve({coloring:{gradient:n.snapshotData.content.chartData.measureGradient}}):Promise.reject():r&&r.getMeasure?r.getMeasure(e).then(function(e){return e.getMeasure()}):Promise.reject()}(e,{layout:t.layout,app:t.app})}).getAttributeDimension(function(e,t){return function(e,t){var n=t.layout,r=t.model,i=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.legendDataPage?Promise.resolve(n.snapshotData.content.chartData.legendDataPage):Promise.reject():r&&r.session&&i?r.getHyperCubeData(e,[{qHeight:100,qLeft:0,qTop:0,qWidth:2}]).catch(vx):Promise.reject()}(e,{layout:t.layout,model:t.model,app:t.app})});return n.getSnapshotData=yx,n}function xx(e){return function(t){return"object"===xy(t.datum[e])?t.datum[e].value:void 0}}function Sx(e){return"object"===xy(e.datum.isNull)?e.datum.isNull.value:-2===e.datum.value}function wx(e){return-3===e.datum.value}var Mx={COLOR:void 0,FONT_SIZE:"16px",FONT_FAMILY:"'Source Sans Pro', 'Arial', 'sans-serif'"},kx={COLOR:void 0,FONT_SIZE:void 0,FONT_FAMILY:"'Source Sans Pro', 'Arial', 'sans-serif'"},Cx="legend.title",qx="legend.label";function Ex(e){var t=e.theme,n=e.key,r=e.styleOverrides,i={title:{color:Mx.COLOR,fontSize:Mx.FONT_SIZE,fontFamily:Mx.FONT_FAMILY},label:{color:kx.COLOR,fontSize:kx.FONT_SIZE,fontFamily:kx.FONT_FAMILY}};if(!t&&!r)return i;var o=r||{},a=o.title,s=o.label,l=function(e){var t=e.theme,n=e.key;return function(e,r,i,o){return void 0!==e?e:t?t.getStyle(n,r,i):o}}({theme:t,key:n});return i.title.color=l(null==a?void 0:a.color,Cx,"color",Mx.COLOR),i.title.fontSize=l(null==a?void 0:a.fontSize,Cx,"fontSize",Mx.FONT_SIZE),i.title.fontFamily=l(null==a?void 0:a.fontFamily,Cx,"fontFamily",Mx.FONT_FAMILY),i.label.color=l(null==s?void 0:s.color,qx,"color",kx.COLOR),i.label.fontSize=l(null==s?void 0:s.fontSize,qx,"fontSize",kx.FONT_SIZE),i.label.fontFamily=l(null==s?void 0:s.fontFamily,qx,"fontFamily",kx.FONT_FAMILY),i}var Dx=function(e,t,n){var r=e&&e.dock||void 0;if("auto"!==r)return r||"right";if(t){var i=t.element.getBoundingClientRect();if(i.height>i.width)return"bottom"}return n?"left":"right"},Tx=function(e,t,n){return!(n.invalid||"color"===n.type||"measure"===n.mode&&t.qMeasureInfo.length<=1||"dimension"===n.mode)&&("function"==typeof e.show?e.show():!1!==e.show)};function Ox(e,t){var n=e.styleReference,r=e.styleOverrides,i=e.chart,o=e.rtl,a=t.legendProps,s=t.coloring,l=t.theme,c=t.hc,u=Ex({theme:l,key:n,styleOverrides:r});return{layout:{minimumLayoutMode:"MEDIUM",dock:Dx(a,i,o)},show:"function"==typeof a.show?function(){return Tx(a,c,s)}:Tx(a,c,s),renderer:"svg",mounted:function(e){e.childNodes[0].style.pointerEvents="none",e.style.overflow="hidden"},settings:{title:{show:!1!==a.showTitle,wordBreak:"break-word",maxLines:2,lineHeight:1.2,text:s.label||"",fill:u.title.color,fontSize:u.title.fontSize,fontFamily:u.title.fontFamily}}}}function Nx(e,t,n){var r=[],i=[],o=function(e,t,n){return"categorical"===t.coloring.type?function(e,t,n){var r=Ox(e,t);if(!r.show)return!1;var i,o=e.key,a=e.styleReference,s=e.styleOverrides,l=e.viewState,c=e.rtl,u=e.settings,d=e.style,f=t.scaleKey,h=t.theme,p=t.scales,m=Ex({theme:h,key:a,styleOverrides:s}),g=r.layout.dock,y="left"===g||"right"===g?{maxLines:2,wordBreak:"break-word"}:{},v={up:"M13.6,11 L2.4,11 C2.28954305,11 2.2,10.9104569 2.2,10.8 C2.2,10.756726 2.21403557,10.7146192 2.24,10.68 L7.84,3.21333333 C7.90627417,3.12496777 8.03163444,3.10705916 8.12,3.17333333 C8.13516113,3.18470418 8.14862915,3.1981722 8.16,3.21333333 L13.76,10.68 C13.8262742,10.7683656 13.8083656,10.8937258 13.72,10.96 C13.6853808,10.9859644 13.643274,11 13.6,11 Z",down:"M2.4,4 L13.6,4 C13.7104569,4 13.8,4.08954305 13.8,4.2 C13.8,4.24327404 13.7859644,4.28538077 13.76,4.32 L8.16,11.7866667 C8.09372583,11.8750322 7.96836556,11.8929408 7.88,11.8266667 C7.86483887,11.8152958 7.85137085,11.8018278 7.84,11.7866667 L2.24,4.32 C2.17372583,4.23163444 2.19163444,4.10627417 2.28,4.04 C2.31461923,4.01403557 2.35672596,4 2.4,4 Z",left:"M11,2.4 L11,13.6 C11,13.7104569 10.9104569,13.8 10.8,13.8 C10.756726,13.8 10.7146192,13.7859644 10.68,13.76 L3.21333333,8.16 C3.12496777,8.09372583 3.10705916,7.96836556 3.17333333,7.88 C3.18470418,7.86483887 3.1981722,7.85137085 3.21333333,7.84 L10.68,2.24 C10.7683656,2.17372583 10.8937258,2.19163444 10.96,2.28 C10.9859644,2.31461923 11,2.35672596 11,2.4 Z",right:"M4,13.6 L4,2.4 C4,2.28954305 4.08954305,2.2 4.2,2.2 C4.24327404,2.2 4.28538077,2.21403557 4.32,2.24 L11.7866667,7.84 C11.8750322,7.90627417 11.8929408,8.03163444 11.8266667,8.12 C11.8152958,8.13516113 11.8018278,8.14862915 11.7866667,8.16 L4.32,13.76 C4.23163444,13.8262742 4.10627417,13.8083656 4.04,13.72 C4.01403557,13.6853808 4,13.643274 4,13.6 Z"};"dimension"===t.coloring.fieldType&&(i=function(e){return e.datum.value>=0||-3===e.datum.value});var b="".concat(f,"Legend");return rb(!0,r,{type:"legend-cat",key:"".concat(o,"-cat"),scale:b in p?b:f,settings:{layout:{scrollOffset:function(){return l?l.get("legendScrollOffset"):void 0},size:-1!==["top","bottom"].indexOf(r.layout.dock)?2:1,direction:c?"rtl":"ltr",horizontal:20},item:{show:i,label:py({fill:m.label.color,fontSize:m.label.fontSize,fontFamily:m.label.fontFamily},y)},navigation:{disabled:n,button:{content:function(e,t){var n=t.direction;return e("i",{style:{"pointer-events":"none",fontSize:"12px",display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizelegibility",margin:"0px"}},[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor"},[e("path",{d:v[n]})])])}}}},brush:{consume:[{context:"selection",data:["",o],style:{inactive:{opacity:.3}}}]}},{settings:u,style:d})}(e,t,n):"continuous"===t.coloring.type&&function(e,t){var n,r=e.key,i=e.styleReference,o=e.styleOverrides,a=e.rtl,s=e.settings,l=e.style,c=t.scaleKey,u=t.theme,d="".concat(c,"Range"),f=Ox(e,t);if(!f.show)return!1;var h=Ex({theme:u,key:i,styleOverrides:o}),p=f.layout.dock,m="right"===p||"left"===p,g=null===(n=t.scales)||void 0===n?void 0:n[d];return m&&g&&(g.invert=!0),rb(!0,f,{type:"legend-seq",key:"".concat(r,"-seq"),settings:{fill:c,major:d,length:1,tick:{fill:h.label.color,fontSize:h.label.fontSize,fontFamily:h.label.fontFamily},title:{anchor:!a||"top"!==f.layout.dock&&"bottom"!==f.layout.dock?void 0:"right",padding:parseFloat(f.settings.title.fontSize)||16}}},{settings:s,style:l})}(e,t)}(e,t,n&&n.navigationDisabled);return r.push(o),o&&"legend-cat"===o.type&&(i.push(function(e){var t=e.key,n=e.requireFailure,r=e.recognizeWith,i=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:tap-".concat(t),type:"Tap",requireFailure:n,recognizeWith:r,options:{event:"legendtap",interval:10,pointers:1,enable:function(e,n){var r;if(!n)return!0;if(null!=i&&null!==(r=i.interact)&&void 0!==r&&r.enabled&&!i.interact.enabled())return!1;if(!this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some(function(e){return e.key==="".concat(t,"-cat")}))return!1;var o=n.srcEvent.target;return!!(o&&o.hasAttribute("data-action")&&o.hasAttribute("data-component-key"))||!(!o||!o.childNodes[0]||"BUTTON"!==o.childNodes[0].nodeName)}},events:{legendtap:function(e){e.preventDefault();var t=e.srcEvent.target;t&&t.hasAttribute("data-action")&&t.hasAttribute("data-component-key")&&this.chart.component(t.getAttribute("data-component-key")).emit(t.getAttribute("data-action"))}}}}(e,n)),i.push(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.eventName,n=e.key,r=e.requireFailure,i=e.recognizeWith,o=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:pan-".concat(n),type:"Pan",requireFailure:r,recognizeWith:i,options:{event:t,pointers:1,threshold:10,enable:function(e,r){var i;return this.started===t||!r||!(null!=o&&null!==(i=o.interact)&&void 0!==i&&i.enabled&&!o.interact.enabled())&&this.chart.componentsFromPoint({x:r.center.x,y:r.center.y}).some(function(e){return e.key==="".concat(n,"-cat")})}},events:fy(fy(fy({},"".concat(t,"start"),function(e){e.preventDefault(),this.started!==t&&(this.started=t,this.chart.component("".concat(n,"-cat")).emit("panstart",e))}),"".concat(t,"move"),function(e){e.preventDefault(),this.chart.component("".concat(n,"-cat")).emit("panmove",e)}),"".concat(t,"end"),function(e){e.preventDefault(),this.chart.component("".concat(n,"-cat")).emit("panend",e),this.started=!1})}}(e,n))),{interactions:i,components:r}}var Ax=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function _x(e){var t=e.qHyperCube,n=t.qDimensionInfo,r=t.qMeasureInfo,i=n.some(Ax),o=r.some(Ax),a=e.color.useBaseColors;return"measure"===a&&!o||"dimension"===a&&!i?"off":a}var Ix=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function Lx(e){var t,n=e.qHyperCube.qDimensionInfo.some(Ix),r=e.qHyperCube.qMeasureInfo.some(Ix),i=n?"dimension":void 0;return{mode:"primary",useBaseColors:null!==(t=null!=i?i:r?"measure":void 0)&&void 0!==t?t:"off",paletteColor:null}}var Px=function(){};function Rx(e){var t,n,r,i,o=e.picasso,a=e.model,s=e.app,l=e.translator,c=e.layoutService,u=void 0===c?void 0:c,d=e.createConfig,f=void 0===d?Px:d,h=e.config,p=void 0===h?{}:h,m=e.custom,g=void 0===m?{}:m,y=p.localeInfo,v=p.key,b=p.theme,x=void 0===b?void 0:b,S=p.auto,w=void 0===S?void 0:S,M=p.definitionPath,k=null==u||null===(t=u.getLayout)||void 0===t?void 0:t.call(u),C={theme:x,key:v,localeInfo:y,layout:k,hc:null==u||null===(n=u.getHyperCube)||void 0===n?void 0:n.call(u),legendProps:null==u||null===(r=u.getLayoutValue)||void 0===r?void 0:r.call(u,"legend"),colorProps:py(py({},null==u||null===(i=u.getLayoutValue)||void 0===i?void 0:i.call(u,"color")),{},{useBaseColors:k?_x(k):void 0})},q=function(e){var t=bx({resources:e}),n={},r={},i=function(e){return r.settings||(e||console.warn("settings() called before auxiliarySettings()"),r.settings=t.settings()),r.settings},o={config:function(i){if(n=py({},i),r={},!n.key)throw new Error("Missing key");t.set(py(py({},e),n))},auto:function(e){return e?(t.auto(e),o):t.auto()},getAuxiliarySettings:function(e){return r.auxiliarySettings?Promise.resolve(r.auxiliarySettings):t.getAuxiliarySettings(i(!0),e).then(function(e){return r.auxiliarySettings=e||{},r.settings=py(py({},r.settings),r.auxiliarySettings),r.scales=void 0,r.color=void 0,r.auxiliarySettings})},getAuxiliaryData:function(){return t.getAuxiliaryData(i())},getSnapshotData:function(e){var n=i();return t.getAuxiliaryData(n,e).then(function(e){return t.getSnapshotData(n,e)})},resolveUIColor:function(e){return t.resolveUIColor(e)},settings:function(){var e=i();return{mode:e.mode,type:e.type,label:e.label,field:e.field,fieldType:e.fieldType,nil:e.nil,others:e.others,primary:e.primary}},settingsForMeasure:function(e){var t;return(null===(t=i().measureOverrides)||void 0===t?void 0:t[e])||this.settings()},isSelectionLocked:function(e){var t=e.isMeasureSelectionLocked;return function(e,t){var n=t.isMeasureSelectionLocked;return"field"!==e.mode||("dimension"===e.fieldType?e.isFieldLocked:"measure"!==e.fieldType||n)}(i(),{isMeasureSelectionLocked:t})},palettes:function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.colorProps,n=e.coloring,r=e.theme,i=[];if(n&&n.palettes&&r){var o=n.palettes.categorical||t.dimensionScheme,a=r.getDataColorPalettes().filter(function(e){return e.key===o})[0]||r.getDataColorPalettes()[0];o&&a&&i.push({key:"categorical",colors:a.colors});var s=n.palettes.metric||t.measureScheme,l=r.getDataColorScales().filter(function(e){return e.key===s})[0]||r.getDataColorScales()[0];if(l){var c=l.colors[0]?l.colors:[[]].concat(by(l.colors.slice(1)));c=Array.isArray(c[0])?c.map(function(e){return e.slice().reverse()}):c.slice().reverse(),i.push({key:"quant",colors:c})}}return i}({coloring:i(),colorProps:n.colorProps,theme:n.theme})},scales:function(){return r.scales=r.scales||function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.hc,n=e.coloring,r=e.rtl,i=e.key,o=e.source,a=e.picasso,s={},l=i;if(n){var c={override:!0,domain:n.explicit&&"function"==typeof n.explicit.domain?n.explicit.domain:[].concat(by((n.explicit||{}).domain||[]),[-3,-2]),range:n.explicit&&"function"==typeof n.explicit.range?n.explicit.range:[].concat(by((n.explicit||{}).range||[]),[n.others,n.nil])};if("field"===n.mode){if("dimension"===n.fieldType){var u,d=function(e){var t=e.hc,n=e.coloring,r={data:{extract:[{source:"dummy",field:0,filter:function(){return r.expando=t.qDataPages[0]?t.qDataPages[0].qArea.qTop:0,!1}},{source:e.source,field:n.field,trackBy:n.valueAccessor,reduce:"first",props:{row:{reduce:function(){return r.expando++}},text:{value:function(e){return e.qText},reduce:"first"}}}]},expando:0};return r}({hc:t,source:o,coloring:n}),f=d.data;if(n.legendDataset){var h=0,p={};a.data("q")({data:t}).extract({field:n.field,trackBy:n.valueAccessor,reduce:function(e){var t=e[0];return p[t]=h++,e[0]}}),u={source:"attrDim",extract:{field:"qDimensionInfo/0",filter:function(e){return e.qElemNumber>=0},props:{row:{value:function(e){return p[e.qElemNumber]}}}}}}var m={data:f,range:n.range,domain:n.domain,explicit:c,type:"categorical-color",label:function(e){return e.datum.text&&e.datum.text.value?e.datum.text.value:e.datum.label}};s[l]=m,u&&(s["".concat(l,"Legend")]=py(py({},m),{},{data:u})),t&&t.qHasOtherValues&&u&&((u||m.data).amend=[{label:t.qDimensionInfo[0].othersLabel,source:{key:"qHyperCube",field:"qDimensionInfo/0"},row:{value:-3},value:-3}])}else if("measure"===n.fieldType){var g={data:{field:n.field},min:n.min,max:n.max};s[l]=rb({},g,{type:"categorical"===n.type?"threshold-color":"sequential-color",range:n.range,domain:n.domain,invert:n.reverse}),"sequential-color"===s[l].type&&(s["".concat(l,"Range")]=rb({},g,{invert:!!r}))}else if("color"!==n.type)throw new Error("UNUSED FIELD")}else if("dimension"===n.mode){var y={data:t.qDimensionInfo.map(function(e,t){return t}),label:function(e){return t.qDimensionInfo[e.datum.value].qFallbackTitle},explicit:c,type:"categorical-color"};s[l]=y}else if("measure"===n.mode){var v={data:t.qMeasureInfo.map(function(e,t){return t}).filter(function(e){var t;return!(null!==(t=n.explicit)&&void 0!==t&&null!==(t=t.exclude)&&void 0!==t&&t.includes(e))}),label:function(e){return t.qMeasureInfo[e.datum.value].qFallbackTitle},explicit:c,type:"categorical-color"};s[l]=v}}return s}({hc:n.hc,coloring:i(),key:n.key,source:n.source,picasso:e.picasso}),r.scales},color:function(){return r.color=r.color||function(e){var t=e.coloring,n=e.scales,r=e.key,i=xx(r),o=xx("".concat(r,"IsAnOther")),a=function(e,t){var r=e.fieldType,a=e.invalid,s=e.mode,l=e.nil,c=e.others,u=e.primary,d=e.type;return a?function(e){return wx(e)||o(e)?c:l}:n[t]?function(e){return wx(e)?c:Sx(e)||-2===i(e)&&"dimension"===r||"NaN"===i(e)?l:o(e)?c:e.resources.scale(t)(i(e))||c}:"constant"===s?function(e){return wx(e)||o(e)?c:Sx(e)?l:u}:"color"===d?function(e){return wx(e)||o(e)?c:Sx(e)?l:i(e)||c}:null},s=a(t,r);if(t.measureOverrides){var l=xx("".concat(r,"MeasureIdx")),c=t.measureOverrides.map(function(e){return e&&a(e)});return function(e){var t=l(e);return c[t]?c[t](e):s(e)}}return s}({coloring:i(),scales:this.scales(),key:n.key}),r.color},datumProps:function(e){return function(e){var t,n,r=e.hc,i=e.coloring,o=e.scales,a=e.key,s=e.addMeasureIx,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,c=a,u=i.nil;"field"===i.mode&&i.field?t=i.field:o[a]&&"field"===i.mode&&(t=o[a].data.field||i.field),t?(n={field:t,reduce:"first"},"color"===i.type&&(n.value=function(e){return"NaN"!==e.qNum?(t=e.qNum,"rgba(".concat([(16711680&t)>>16,(65280&t)>>8,255&t,((4278190080&t)>>>24)/255].join(","),")")):e.qText&&Eb(e.qText)?e.qText:u;var t})):"dimension"===i.mode?n=void 0!==i.field?i.field:r.qDimensionInfo.length-1:"measure"===i.mode&&(n=l);var d=fy({},c,n);return r.qDimensionInfo.length>1&&(d["".concat(c,"IsAnOther")]={fields:r.qDimensionInfo.map(function(e,t){return{field:"qDimensionInfo/".concat(t)}}),value:function(e){return-1!==e.indexOf(-3)}}),s&&(d["".concat(c,"MeasureIdx")]=l),d}({coloring:this.settingsForMeasure(e),scales:this.scales(),key:n.key,hc:n.hc,addMeasureIx:i().measureOverrides},e)},data:function(){var e=i(),t={key:"dummy",data:[["field"],["a"]]};return e.legendDataset?[t,{type:"q",key:"attrDim",data:e.legendDataset.raw(),config:{localeInfo:n.localeInfo}}]:[t]},legend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.eventName,r=e.key,o=e.viewState,a=e.chart,s=e.rtl,l=e.styleReference,c=void 0===l?"object.legend":l,u=e.styleOverrides,d=e.settings,f=void 0===d?{}:d,h=e.style,p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Nx({eventName:t,key:r,rtl:s,viewState:o,chart:a,styleReference:c,styleOverrides:u,settings:f,style:void 0===h?{}:h},{legendProps:n.legendProps,scaleKey:n.key,coloring:i(),theme:n.theme,hc:n.hc,scales:this.scales()},p)}};return o}({picasso:o,model:a,app:s,translator:l,auto:w});!1!==w&&q.auto(function(e){return w?w({layout:e,defaultAuto:Lx}):Lx(e)});var E=!1,D={getColor:function(){return q.color()},getPaletteColor:function(e){var t=e.index,n=e.color;return q.resolveUIColor({index:t,color:n})},getData:function(){return q.data()},getDatumProps:function(e){return q.datumProps(e)},getSnapshotData:function(){return q.getSnapshotData(M)},getSettingsForMeasure:function(e){return q.settingsForMeasure(e)},getSettings:function(){return q.settings()},getLegend:function(e,t){return q.legend(e,t)},getScales:function(){return q.scales()},getPalettes:function(){return q.palettes()},isSelectionLocked:function(e){var t=e.isMeasureSelectionLocked;return q.isSelectionLocked({isMeasureSelectionLocked:t})},isInitialized:function(){return E},custom:py({},g),initialize:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).createConfig,t=(void 0===e?f:e)({getUseBaseColors:_x}),n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return py(py(py({},e),t),{},{colorProps:py(py({},e.colorProps),t.colorProps||{})})}(C,t);return q.config(n),q.getAuxiliarySettings(M).then(function(){E=!0})}};return D}var zx="center",Fx="bottom",jx=[{key:"NoDataExist",alignment:zx,condition:function(e){var t=e.layoutService;if(!t)return!1;var n=t.meta.size;return n.x*n.y===0}},{key:"OnlyNanDataMeasure",translationKey:"OnlyNanData",alignment:zx,condition:function(e){var t=e.layoutService;return!!t&&t.getHyperCubeValue("qMeasureInfo").every(function(e){return"NaN"===e.qMin&&"NaN"===e.qMax})}},{key:"OnlyNanDataDimensionContinuous",translationKey:"OnlyNanData",alignment:zx,condition:function(e){var t=e.layoutService;if(!t)return!1;if(!t.meta.isContinuous)return!1;var n=t.getHyperCubeValue("qDimensionInfo.0");return n&&(n.qMax<n.qMin||"NaN"===n.qMax)}},{key:"OnlyNegativeOrZeroValues",alignment:zx},{key:"DataRangeIncludingZero",alignment:Fx},{key:"LimitedData",alignment:Fx},{key:"NegativeOrZeroValues",alignment:Fx}].reduce(function(e,t){return e[t.key]=t,e},{}),Bx=function(){return!1};function Vx(e){var t=e.chart,n=e.logicalSize;if(n)return n;var r=t?t.element.getBoundingClientRect():{};return{width:r.width,height:r.height}}var Hx=[{key:"FULL",size:{width:550,height:450}},{key:"MEDIUM",size:{width:400,height:220}},{key:"SMALL",size:{width:300,height:150}},{key:"XSMALL",size:{width:150,height:75}}];function $x(e){var t=e.width,n=e.height,r=Hx.filter(function(e){return t>=e.size.width&&n>=e.size.height}).shift();return r?r.key:"SPARK"}var Wx={left:"right",right:"left",top:"bottom",bottom:"top",near:"far",far:"near"};function Ux(e){var t=e.orientation,n=e.dock,r=e.btt,i=e.rtl,o="horizontal"===t?function(e){return"bottom"===e||"near"===e?"bottom":"top"}(n):function(e,t){var n="left"===e||"near"===e?"left":"right";return t?Wx[n]:n}(n,i),a=function(e,t,n){return"vertical"===e?t?"bottom":"top":n?"right":"left"}(t,r,i);return{current:o,opposite:Wx[o],start:a,end:Wx[a]}}function Yx(e){var t=e.chart,n=e.layoutService,r=e.config,i=void 0===r?{}:r,o=i.logicalSize,a=void 0!==o&&o,s=i.rtl,l=void 0!==s&&s,c={chart:{size:void 0,mode:void 0},x:{dock:void 0,opposite:void 0,size:void 0},y:{dock:void 0,opposite:void 0,size:void 0}},u={type:"x-y",config:py({},i),meta:c,update:function(e){c.chart.size={width:e.width,height:e.height},c.chart.mode=$x(e);var t=Ux({orientation:"horizontal",dock:n.getLayoutValue("xAxis.dock"),btt:!1,rtl:l}),r=t.current,i=t.opposite;c.x.dock=r,c.x.opposite=i,c.x.size=e.width;var o=Ux({orientation:"vertical",dock:n.getLayoutValue("yAxis.dock"),btt:!0,rtl:l}),a=o.current,s=o.opposite;c.y.dock=a,c.y.opposite=s,c.y.size=e.height}};return u.update(Vx({chart:t,logicalSize:a})),u}var Kx="vertical",Gx="horizontal";function Xx(e){var t=e.chart,n=e.layoutService,r=e.config,i=void 0===r?{}:r,o=e.typeConfig,a=void 0===o?{}:o,s=i.logicalSize,l=void 0!==s&&s,c=i.rtl,u=void 0!==c&&c,d=a.fallback===Kx?Kx:Gx,f=!!a.invert,h=a.measureAxes||[{ref:"measureAxis",name:"minor"}],p={chart:{orientation:void 0,size:void 0,mode:void 0},major:{orientation:void 0,dock:void 0,opposite:void 0,size:void 0}},m={type:"major-minor",config:py({},i),meta:p,update:function(e){p.chart.orientation=n.getLayoutValue("orientation",d),p.chart.size={width:e.width,height:e.height},p.chart.mode=$x(e),p.major.orientation=function(e){var t=e.chartOrientation,n=e.invert;return e.layoutService.meta.isContinuous?Gx:n?t===Kx?Gx:Kx:t}({layoutService:n,chartOrientation:p.chart.orientation,invert:f});var t=Ux({orientation:p.major.orientation,dock:n.getLayoutValue("dimensionAxis.dock"),btt:!1,rtl:u}),r=t.current,i=t.opposite;p.major.dock=r,p.major.opposite=i,p.major.size=p.major.orientation===Kx?e.height:e.width,h.forEach(function(t){var r={};r.orientation=p.major.orientation===Kx?Gx:Kx;var i=Ux({orientation:r.orientation,dock:n.getLayoutValue("".concat(t.ref,".dock")),btt:!0,rtl:u}),o=i.current,a=i.opposite,s=i.start,l=i.end;r.dock=o,r.opposite=a,r.start=s,r.end=l,r.size=r.orientation===Kx?e.height:e.width,p[t.name]=r})}};return m.update(Vx({chart:t,logicalSize:l})),m}function Jx(e){var t=e.chart,n=e.layoutService,r=e.config,i=void 0===r?{}:r,o=e.typeConfig,a=void 0===o?{}:o;return("x-y"===a.type?Yx:Xx)({chart:t,layoutService:n,config:i,typeConfig:a})}function Zx(e,t,n){if(void 0===e||void 0===t)return n;for(var r=t.split("."),i=e,o=0;o<r.length;++o){var a=r[o];if(void 0===i[a])return n;i=i[a]}return i}var Qx=["__proto__","constructor"];function eS(e,t,n){if(void 0!==e&&void 0!==t){var r=t.split("."),i=r[r.length-1];if(!Qx.some(function(e){return r.includes(e)})){for(var o=e,a=0;a<r.length-1;++a){var s=r[a];void 0===o[s]&&(o[s]=Number.isNaN(+r[a+1])?{}:[]),o=o[s]}void 0!==n?o[i]=n:delete o[i]}}}function tS(){var e={};return{get:function(t){return e[t]},set:function(t,n){return e[t]=n,n},has:function(t){return t in e},remove:function(t){delete e[t]},empty:function(){e={}}}}function nS(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return e},n=tS();return function(r){var i=t(r);return n.has(i)?n.get(i):n.set(i,e(r))}}function rS(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return function(){for(var r=this,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];clearTimeout(t),t=setTimeout(function(){return e.apply(r,o)},n)}}function iS(e){var t,n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50,o=0;return function(){t=this;for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];n=s;var c=Date.now()-o,u=function(){o=Date.now(),r=0,e.apply(t,n)};r||(c>=i?u():r=setTimeout(u,i-c))}}var oS={ERROR_CODES:[7005],DIMENSION:"qDimensionInfo",MEASURE:"qMeasureInfo"},aS=function(e,t){return e[t].reduce(function(e,t,n){var r;return r=t,oS.ERROR_CODES.some(function(e){var t;return e===(null===(t=r.qError)||void 0===t?void 0:t.qErrorCode)})?e.filtered.push(n):e.reduced.push(t),e},{reduced:[],filtered:[]})};function sS(e){var t;return((null==e||null===(t=e.qHyperCube)||void 0===t?void 0:t.qDimensionInfo)||[]).map(function(e){var t,n=null===(t=e.qCardinalities)||void 0===t?void 0:t.qHypercubeCardinal;if(n)return n;var r=e.qStateCounts||{},i=r.qLocked,o=void 0===i?0:i,a=r.qOption,s=void 0===a?0:a,l=r.qSelected;return o+s+(void 0===l?0:l)})}function lS(e){switch(e.qHyperCube.qMode){case"S":return function(e){var t=e.qHyperCube.qSize;return{refs:{dataPages:"qHyperCube.qDataPages"},size:{x:t.qcx,y:t.qcy,dimensions:sS(e)}}}(e);case"K":return function(e){var t=sS(e);return{refs:{dataPages:"qHyperCube.qStackedDataPages"},size:{x:e.qHyperCube.qSize.qcx,y:t[0],dimensions:t}}}(e);case"T":return function(e){var t=sS(e);return{refs:{dataPages:"qHyperCube.qTreeDataPages"},size:{x:e.qHyperCube.qSize.qcx,y:t[0],dimensions:t}}}(e);default:throw new Error("Mode not supported")}}function cS(e){var t=e.source,n=e.metaAdditionsFn,r=e.experimental,i=void 0===r?{filter:!1}:r,o=rb(!0,{},t),a=i.filter?function(e){var t=e.qHyperCube,n=aS(t,oS.DIMENSION),r=n.reduced,i=n.filtered;t[oS.DIMENSION]=r;var o=aS(t,oS.MEASURE),a=o.reduced,s=o.filtered;return t[oS.MEASURE]=a,{dimensions:i,measures:s}}(o):{dimensions:[],measures:[]},s=lS(o),l=function(){var e=function(e){var t=e.layout,n=e.additionsFn,r=void 0===n?function(){return{}}:n,i=e.additionsProps,o=void 0===i?{}:i,a=t.qHyperCube,s=a.qDimensionInfo,l=a.qMeasureInfo,c=a.qMode,u=s.length,d=l.length,f=py({mode:{S:"S"===c,P:"P"===c,K:"K"===c,T:"T"===c},dimensionCount:u,measureCount:d,hasMultipleDimensions:u>1,hasMultipleMeasures:d>1,isOneDimensional:1===u,isTwoDimensional:2===u},o);return py(py({},f),r({layout:t,meta:f}))}({layout:o,additionsFn:n,additionsProps:{size:s.size}});return e.filteredFields=a,e},c={refs:py({},s.refs),meta:l(),getLayout:function(){return o},getLayoutValue:function(e,t){return Zx(o,e,t)},setLayoutValue:function(e,t){eS(o,e,t),s=lS(o),c.meta=l()},getHyperCube:function(){return o.qHyperCube},getHyperCubeValue:function(e,t){return Zx(o.qHyperCube,e,t)},setHyperCubeValue:function(e,t){eS(o.qHyperCube,e,t),s=lS(o),c.meta=l()},getDataPages:function(){return Zx(o,s.refs.dataPages)},setDataPages:function(e){eS(o,s.refs.dataPages,e),c.meta=l()}};return c}function uS(e){var t=e.originalArray,n=e.newArray,r=e.matchKey;return Array.isArray(t)&&t.length?(n.forEach(function(e){var n=-1;t.some(function(t,i){return t[r]&&t[r]===e[r]&&(n=i),n}),n>-1?t[n]=e:t.push(e)}),t):n}function dS(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function hS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fS(Object(n),!0).forEach(function(t){dS(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fS(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var pS=Object.prototype.hasOwnProperty,mS=Object.prototype.toString,gS=Object.defineProperty,yS=Object.getOwnPropertyDescriptor,vS=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===mS.call(e)},bS=function(e){if(!e||"[object Object]"!==mS.call(e))return!1;var t,n=pS.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&pS.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||pS.call(e,t)},xS=function(e,t){gS&&"__proto__"===t.name?gS(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},SS=function(e,t){if("__proto__"===t){if(!pS.call(e,t))return;if(yS)return yS(e,t).value}return e[t]},wS=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)r=SS(s,n),s!==(i=SS(t,n))&&(u&&i&&(bS(i)||(o=vS(i)))?(o?(o=!1,a=r&&vS(r)?r:[]):a=r&&bS(r)?r:{},xS(s,{name:n,newValue:e(u,a,i)})):void 0!==i&&xS(s,{name:n,newValue:i}));return s};function MS(e,t,n,r){if(!e)return-1;const i=n.cache,o=e.origin?e.origin():null;o&&(e=o);let a=i.fields.indexOf(e),s=-1,l=-1;if(-1===a)for(let t=0;t<i.wrappedFields.length;t++)if(l=i.wrappedFields[t].attrDims.map(e=>e.instance).indexOf(e),s=i.wrappedFields[t].attrExps.map(e=>e.instance).indexOf(e),-1!==l||-1!==s){a=t;break}if(Array.isArray(r)&&r.some((e,t)=>e!==t)){const e=r.indexOf(a);-1!==e&&(a=e)}return a-=t.qArea.qLeft,a<0||a>=t.qArea.qWidth?-1:l>=0?e=>e[a].qAttrDims.qValues[l]:s>=0?e=>e[a].qAttrExps.qValues[s]:e=>e[a]}function kS(e,t,n){let{key:r}=n;const i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function CS(e){let{cache:t,f:n,mainCell:r,p:i,page:o,rowIdx:a,row:s,sourceKey:l,target:c,targetProp:u,columnOrder:d}=e,f=r;if(i.field&&i.field!==n){const e=MS(i.field,o,{cache:t},d);if(-1===e)return;f=wS({qRow:a},e(s))}c[u]=kS(i,f,{key:l})}function qS(e,t,n,r){const i=Array.isArray(e)?e:[e];let o=[];for(let e=0;e<i.length;e++)if(void 0!==i[e].field){const a=t.raw(),s=t.key(),l="object"==typeof i[e].field?i[e].field:t.field(i[e].field),{props:c,main:u}=r.normalizeConfig(i[e],t),d=Object.keys(c),f=!!i[e].trackBy,h=typeof i[e].trackBy,p={},m=[],g=[];for(let t=0;t<a.qDataPages.length;t++){const o=MS(l,a.qDataPages[t],{cache:n},a.qColumnOrder);if(-1!==o)for(let y=0;y<a.qDataPages[t].qMatrix.length;y++){const v=a.qDataPages[t].qArea.qTop+y,b=wS({qRow:v},o(a.qDataPages[t].qMatrix[y])),x=kS(u,b,{key:s});if(!u.filter||u.filter(b)){for(let e=0;e<d.length;e++){const r=c[d[e]];let i=r.fields||[r];r.fields&&(x[d[e]]=[]);for(let o=0;o<i.length;o++)CS({cache:n,f:l,mainCell:b,p:i[o],prop:d[e],page:a.qDataPages[t],rowIdx:v,row:a.qDataPages[t].qMatrix[y],sourceKey:s,target:r.fields?x[d[e]]:x,targetProp:r.fields?o:d[e],columnOrder:a.qColumnOrder});if(r.fields){const t=x[d[e]].map(e=>e.value),n=x[d[e]].map(e=>e.label);x[d[e]]={value:"function"==typeof r.value?r.value(t):void 0!==r.value?r.value:t,label:"function"==typeof r.label?r.label(n):void 0!==r.label?String(r.label):String(x[d[e]].value)}}}f&&r.track({cfg:i[e],itemData:b,obj:x,target:m,tracker:p,trackType:h}),g.push(x)}}}const y=f?r.collect(m,{main:u,propsArr:d,props:c}):g;o=[...o,...y]}return o}function ES(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function DS(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=OS)):void 0===t&&(t=TS);for(var n,r,i,o,a,s=new _S(e),l=[s];n=l.pop();)if((i=t(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;o>=0;--o)l.push(r=i[o]=new _S(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(AS)}function TS(e){return e.children}function OS(e){return Array.isArray(e)?e[1]:null}function NS(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function AS(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function _S(e){this.data=e,this.depth=this.height=0,this.parent=null}function IS(e){return null==e?null:function(e){if("function"!=typeof e)throw new Error;return e}(e)}_S.prototype=DS.prototype={constructor:_S,count:function(){return this.eachAfter(ES)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,i,o=this,a=[o],s=[],l=-1;o=a.pop();)if(s.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=s.pop();)e.call(t,o,++l,this);return this},eachBefore:function(e,t){for(var n,r,i=this,o=[i],a=-1;i=o.pop();)if(e.call(t,i,++a,this),n=i.children)for(r=n.length-1;r>=0;--r)o.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t},copy:function(){return DS(this).eachBefore(NS)},[Symbol.iterator]:function*(){var e,t,n,r,i=this,o=[i];do{for(e=o.reverse(),o=[];i=e.pop();)if(yield i,t=i.children)for(n=0,r=t.length;n<r;++n)o.push(t[n])}while(o.length)}};var LS={depth:-1},PS={},RS={};function zS(e){return e.id}function FS(e){return e.parentId}function jS(e){let t=e.length;if(t<2)return"";for(;--t>1&&!BS(e,t););return e.slice(0,t)}function BS(e,t){if("/"===e[t]){let n=0;for(;t>0&&"\\"===e[--t];)++n;if(!(1&n))return!0}return!1}function VS(e,t){"/"===e.charAt(0)&&(e=e.substring(1));const n=e.split("/");let r,i=t;for(let e=0;e<n.length;e++){if("*"===n[e]&&Array.isArray(i)){const t=[];r=n.slice(e+1).join("/");for(let e=0;e<i.length;e++){let n=VS(r,i[e]);Array.isArray(n)?t.push(...n):t.push(n)}return t}if(!n[e]&&Array.isArray(i)){const t=new Array(i.length);r=n.slice(e+1).join("/");for(let e=0;e<i.length;e++)t[e]=VS(r,i[e]);return t}n[e]in i&&(i=i[n[e]])}return i}function HS(e,t,n){let r=[];if(!e||!e.length)return r;if(t<=0){const t=n>=0?[e[n]]:e;r=[...r,...t]}else for(let i=0;i<e.length;i++)e[i].children&&e[i].children.length&&(r=[...r,...HS(e[i].children,t-1,n)]);return r}function $S(e,t,n){if(e===t)return e=>e;if(e>t){const n=Math.max(0,Math.min(100,e-t));return e=>{let t=e;for(let e=0;e<n;++e)t=t.parent;return t}}if(t>e){const r=Math.max(0,Math.min(100,t-e));return e=>HS(e.children,r-1,n)}return!1}const WS=/^qDimensionInfo(?:\/(\d+))?/,US=/^\/?qMeasureInfo\/(\d+)/,YS=/\/qAttrExprInfo\/(\d+)/,KS=/\/qAttrDimInfo\/(\d+)/;function GS(e){return(e.qColumnOrder&&e.qColumnOrder.length?e.qColumnOrder:e.qDimensionInfo.map((e,t)=>t)).filter(t=>t<e.qDimensionInfo.length)}function XS(e,t){let{cube:n}=t;if(!e)return-1;let r=e.origin&&e.origin()?e.origin().key():e.key(),i=!1,o=-1,a=-1,s=-1,l=-1,c=-1,u=-1,d=r;const f=n.qEffectiveInterColumnSortOrder,h=GS(n);return WS.test(d)&&(i=!0,o=+WS.exec(d)[1],d=r.replace(WS,"")),US.test(d)&&("K"===n.qMode?c=+US.exec(d)[1]:f&&-1!==f.indexOf(-1)?(c=+US.exec(d)[1],u=0):u=+US.exec(d)[1],d=d.replace(US,"")),d&&(KS.exec(d)?s=+KS.exec(d)[1]:YS.exec(d)&&(a=+YS.exec(d)[1])),l=i?"S"===n.qMode?h[o]:f?f.indexOf(o):o:f&&-1!==f.indexOf(-1)?f.indexOf(-1):n.qDimensionInfo.length-("K"===n.qMode?0:1),{fieldDepth:l+1,pseudoMeasureIndex:c,measureIdx:u,attrDimIdx:s,attrIdx:a}}function JS(e,t){let n,r,i=$S(e.fieldDepth,t.fieldDepth,t.pseudoMeasureIndex);return n=t.measureIdx>=0?e=>e.data.qValues[t.measureIdx]:e=>e.data,t.attrDimIdx>=0?r=e=>{var n;return null==e||null===(n=e.qAttrDims)||void 0===n?void 0:n.qValues[t.attrDimIdx]}:t.attrIdx>=0&&(r=e=>{var n;return null==e||null===(n=e.qAttrExps)||void 0===n?void 0:n.qValues[t.attrIdx]}),{nodeFn:i,attrFn:r,valueFn:n}}function ZS(e,t,n){let{key:r}=n;const i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function QS(e){let{propsArr:t,props:n,item:r,itemData:i,ret:o,sourceKey:a}=e;for(let e=0;e<t.length;e++){const s=n[t[e]],l=s.fields||[s];let c,u;s.fields&&(c=[],u=[]);for(let n=0;n<l.length;n++){const d=l[n];let f,h,p,m,g,y;if("primitive"===d.type?(p=d.value,y=String(d.value)):("function"==typeof d.value&&(f=e=>d.value(e,r)),"function"==typeof d.label&&(h=e=>d.label(e,r)),d.accessor?(m=d.accessor(r),Array.isArray(m)?(g=m.map(d.valueAccessor),d.attrAccessor&&(g=g.map(d.attrAccessor)),f&&(p=g.map(f),f=null),h&&(y=g.map(h),h=null),p=d.reduce?d.reduce(p):p,y=d.reduceLabel?d.reduceLabel(y,p):String(p)):(p=d.attrAccessor?d.attrAccessor(d.valueAccessor(m)):d.valueAccessor(m),y=p)):(p=i,y=i)),s.fields){const e=f?f(p):p;c.push(e),u.push(h&&null!=y?h(y):null!=y?y:String(e))}else{const n=f?f(p):p;o[t[e]]={value:n,label:h?h(y):null!=y?y:String(n)},d.field&&(o[t[e]].source={field:d.field.key(),key:a})}}c&&(o[t[e]]={value:"function"==typeof s.value?s.value(c,r):c,label:"function"==typeof s.label?s.label(u,r):u})}}const ew=(e,t,n)=>{const r="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",i="K"===e.qMode?"qSubNodes":"qNodes",o=VS(r,e);return o&&o[0]?(t.tree=DS(o[0],n.children||(e=>e[i])),t.tree):null},tw=e=>{let{propsArr:t,props:n,cube:r,cache:i,itemDepthObject:o,f:a}=e;for(let e=0;e<t.length;e++){const i=n[t[e]],s=i.fields?i.fields:[i];for(let e=0;e<s.length;e++){const t=s[e];if(t.field!==a){const e=JS(o,XS(t.field,{cube:r}));t.accessor=e.nodeFn,t.valueAccessor=e.valueFn,t.attrAccessor=e.attrFn}}}};function nw(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;const i=t.raw(),o=t.key(),a="S"===i.qMode?function(e){const t=e.raw().qDataPages.length?e.raw().qDataPages[0].qMatrix:[],n=function(e){const t=e.raw().qColumnOrder,n=e.fields();return t&&t.length===n.length?t:n.map((e,t)=>t)}(e),r=e.fields(),i=e.fields().filter(e=>"dimension"===e.type()).map(e=>n.indexOf(r.indexOf(e))),o=e.fields().filter(e=>"measure"===e.type()).map(e=>n.indexOf(r.indexOf(e))),a={__root:{__id:"__root",qValues:[]}};for(let e=0;e<t.length;e++){const n=t[e];let r="__root",l=!1;for(let e=0;e<i.length;e++){var s;const t=n[i[e]],o="".concat(r,"__").concat(null!==(s=t.qElemNumber)&&void 0!==s?s:t.qElemNo);a[o]||(a[o]=hS({__id:o,__parent:r,qValues:[]},t),l=!0),r=o}if(l)for(let e=0;e<o.length;e++){const t=n[o[e]];a[r].qValues.push(t)}}const l=Object.keys(a).map(e=>a[e]);return function(){var e,t=zS,n=FS;function r(r){var i,o,a,s,l,c,u,d,f=Array.from(r),h=t,p=n,m=new Map;if(null!=e){const t=f.map((t,n)=>function(e){let t=(e=`${e}`).length;return BS(e,t-1)&&!BS(e,t-2)&&(e=e.slice(0,-1)),"/"===e[0]?e:`/${e}`}(e(t,n,r))),n=t.map(jS),i=new Set(t).add("");for(const e of n)i.has(e)||(i.add(e),t.push(e),n.push(jS(e)),f.push(RS));h=(e,n)=>t[n],p=(e,t)=>n[t]}for(a=0,i=f.length;a<i;++a)o=f[a],c=f[a]=new _S(o),null!=(u=h(o,a,r))&&(u+="")&&(d=c.id=u,m.set(d,m.has(d)?PS:c)),null!=(u=p(o,a,r))&&(u+="")&&(c.parent=u);for(a=0;a<i;++a)if(u=(c=f[a]).parent){if(!(l=m.get(u)))throw new Error("missing: "+u);if(l===PS)throw new Error("ambiguous: "+u);l.children?l.children.push(c):l.children=[c],c.parent=l}else{if(s)throw new Error("multiple roots");s=c}if(!s)throw new Error("no root");if(null!=e){for(;s.data===RS&&1===s.children.length;)s=s.children[0],--i;for(let e=f.length-1;e>=0&&(c=f[e]).data===RS;--e)c.data=null}if(s.parent=LS,s.eachBefore(function(e){e.depth=e.parent.depth+1,--i}).eachBefore(AS),s.parent=null,i>0)throw new Error("cycle");return s}return r.id=function(e){return arguments.length?(t=IS(e),r):t},r.parentId=function(e){return arguments.length?(n=IS(e),r):n},r.path=function(t){return arguments.length?(e=IS(t),r):e},r}().id(e=>e.__id).parentId(e=>e.__parent)(l)}(t):ew(i,n,e);if(!a)return null;const s=a.height,l=[];for(let o=0;o<=s;o++){let a=null;if(o>0)if("S"===i.qMode){let e=GS(i)[o-1];a=n.fields[e]}else{let e=i.qEffectiveInterColumnSortOrder[o-1];o>i.qEffectiveInterColumnSortOrder.length&&(e=i.qDimensionInfo.length),a=n.fields[e]}const{props:s,main:c}=r.normalizeConfig(hS(hS({},e),{},{field:a?a.key():void 0}),t),u=Object.keys(s);l[o]={propsArr:u,props:s,main:c};const d=a?XS(a,{cube:i}):{fieldDepth:0};tw({propsArr:u,props:s,cube:i,cache:n,itemDepthObject:d,f:a})}const c=a.copy().descendants(),u=a.descendants();for(let e=0;e<u.length;e++){const t=l[u[e].depth].propsArr,n=l[u[e].depth].props,r=l[u[e].depth].main,i=c[e],a=i.data,s=ZS(r,a,{key:o});QS({propsArr:t,props:n,item:i,itemData:a,ret:s,sourceKey:o}),u[e].data=s}return a}function rw(e,t,n,r){const i=Array.isArray(e)?e:[e];let o=[];for(let a=0;a<i.length;a++)if(void 0!==i[a].field){const s=t.raw(),l=t.key();if(!ew(s,n,e))continue;const c="object"==typeof i[a].field?i[a].field:t.field(i[a].field),{props:u,main:d}=r.normalizeConfig(i[a],t),f=Object.keys(u),h=XS(c,{cube:s}),{nodeFn:p,attrFn:m,valueFn:g}=JS({fieldDepth:0},h);tw({propsArr:f,props:u,cube:s,cache:n,itemDepthObject:h,f:c});const y=!!i[a].trackBy,v=typeof i[a].trackBy,b={},x=[],S=p(n.tree),w=[];for(let e=0;e<S.length;e++){const t=S[e],n=m?m(g(t)):g(t);if(d.filter&&!d.filter(n))continue;const o=ZS(d,n,{key:l});QS({propsArr:f,props:u,item:t,itemData:n,ret:o,sourceKey:l}),y&&r.track({cfg:i[a],itemData:n,obj:o,target:x,tracker:b,trackType:v}),w.push(o)}const M=y?r.collect(x,{main:d,propsArr:f,props:u}):w;o=[...o,...M]}return o}var iw,ow,aw=(iw=function(e){
/*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,i,o,a,s,l,c,u,d,f=e.length,h=e.search(/[0-9\-\+#]/),p=h>0?e.substring(0,h):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),y=f-g,v=e.substring(y,y+1),b=y+("."===v||","===v?1:0),x=g>0?e.substring(b,f):"";if(n=(t="-"===(e=e.substring(h,b)).charAt(0)?-t:+t)<0?t=-t:0,i=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",o=r&&r[1]&&r[0]||",",e=e.split(i),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(c=t.split("."))[1]||c[1]&&c[1].length<=s)&&(t=(+t).toFixed(s+1)),u=e[0].split(o),e[0]=u.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;c[0].length<e[0].length-a;)c[0]="0"+c[0];else 0===+c[0]&&(c[0]="");if((t=t.split("."))[0]=c[0],l=u[1]&&u[u.length-1].length){for(m="",y=(d=t[0]).length%l,f=d.length,b=0;b<f;b++)m+=d.charAt(b),!((b-y+1)%l)&&b<f-l&&(m+=o);t[0]=m}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),p+(n?"-":"")+r+x}},iw(ow={exports:{}}),ow.exports);function sw(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}const lw={3:"k",6:"M",9:"G",12:"T",15:"P",18:"E",21:"Z",24:"Y","-3":"m","-6":"μ","-9":"n","-12":"p","-15":"f","-18":"a","-21":"z","-24":"y"},cw=/%\)?$/,uw=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,dw=/^\(oct\)/i,fw=/^\(dec\)/i,hw=/^\(hex\)/i,pw=/^\(bin\)/i,mw=/^\(rom\)/i,gw=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,yw=/#|0/g;function vw(e,t,n,r){return e=e.toString(t),n[1]===n[1].toUpperCase()&&(e=e.toUpperCase()),e.length-e.indexOf(".")>10&&(e=e.slice(0,e.indexOf(".")+11)),e.replace(".",r||".")}function bw(e,t,n){const r=sw(e);return n?r:new RegExp(r||"",t)}function xw(e,t,n,r){let i,o,a,s,l,c,u,d,f,h=e.pattern;var p,m;r&&(e.abbreviate=!0),p=t,(m=n)&&(m=sw(m)),p&&(p=sw(p)),f=new RegExp("(?:[#0]+".concat(p,")?[#0]+(?:").concat(m,"[#0]+)?")),a=h.match(f),a=a?a[0]:"",s=a?h.substr(0,h.indexOf(a)):h,l=a?h.substring(h.indexOf(a)+a.length):"",a||(a=h?"#":"##########"),t&&t===n&&(i=a.split(n),o=i.pop(),a=i.join("")+n+o,t=""),c=t,t=/,/.test(n)?"¤":",",c&&(a=a.replace(bw(c,"g"),t)),u=n,n=".",u&&(a=a.replace(bw(u,"g"),n)),d=a.match(/#/g),d=d?d.length:0;const g=h.split(u);let y;g[1]&&(y=g[1].match(yw)),e.prefix=s||"",e.postfix=l||"",e.pattern=h,e.maxPrecision=y?y.length:2,e.percentage=cw.test(h),e.numericPattern=a||"",e.numericRegex=new RegExp("".concat(bw(t,null,!0),"|").concat(bw(n,null,!0)),"g"),e.groupTemp=c,e.decTemp=u,e.t=t,e.d=n,e.temp=d}class Sw{constructor(e,t,n,r,i){this.localeInfo=e,this.pattern=t,this.thousandDelimiter=n||",",this.decimalDelimiter=r||".",this.type=i||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return lw;const n={};return e.qNumericalAbbreviation.split(t).forEach(e=>{let t=e.split(":");2===t.length&&(n[t[0]]=t[1])}),n}(e,this.patternSeparator),this.prepare()}clone(){const e=new Sw(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return e.subtype=this.subtype,e}format(e,t,n,r){return this.prepare(t,n,r),this.formatValue(e)}prepare(e,t,n){let r;if(void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===n&&(n=this.decimalDelimiter),!e)return void(this._prepared={pattern:!1});this._prepared={positive:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},zero:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}},r=this._prepared,e=e.split(this.patternSeparator),r.positive.pattern=e[0],r.negative.pattern=e[1],r.zero.pattern=e[2],gw.test(e[0])&&(r.positive.isFunctional=!0),e[1]?gw.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?gw.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1;const i="U"===this.type;r.positive.isFunctional||xw(r.positive,t,n,i),r.negative&&!r.negative.isFunctional&&xw(r.negative,t,n,i),r.zero&&!r.zero.isFunctional&&xw(r.zero,t,n,i)}formatValue(e){let t,n,r,i,o,a,s,l,c,u=this._prepared,d="",f="",h=e;if(isNaN(e))return"".concat(h);if(e=+e,!1===u.pattern)return e.toString();if(0===e&&u.zero)return u=u.zero,u.pattern;if(e<0&&u.negative?(u=u.negative,e=-e):u=u.positive,o=u.d,a=u.t,u.isFunctional)e=function(e,t,n){let r;return uw.test(t)?e=vw(e,Number(/\d{2}/.exec(t)[0]),t,n):dw.test(t)?e=vw(e,8,t,n):fw.test(t)?e=vw(e,10,t,n):hw.test(t)?e=vw(e,16,t,n):pw.test(t)?e=vw(e,2,t,n):mw.test(t)&&(r="",e<0&&(r="-",e=-e),0===(e=Math.floor(e))?e="0":e<=5e5?(e=function(e,t){let n,r="",i=Number(String(e).slice(-3)),o=(e-i)/1e3,a=[0,1,4,5,9,10,40,50,90,100,400,500,900].reverse(),s=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();for(;i>0;)for(n=0;n<a.length;n++)if(a[n]<=i){r+=s[n],i-=a[n];break}for(n=0;n<o;n++)r="M".concat(r);return t[1]!==t[1].toUpperCase()&&(r=r.toLowerCase()),r}(e,t),e=r+e):e=t+r+e.toExponential(0)),e}(e,u.pattern,o);else{if(u.percentage&&(e*=100),u.abbreviate){const t=Object.keys(this.abbreviations).map(e=>parseInt(e,10)).sort((e,t)=>e-t);let r,i,o=t[0];for(s=0,n=Number(Number(e).toExponential().split("e")[1]);o<=n&&s<t.length;)s++,o=t[s];s>0&&(r=t[s-1]),r&&n>0&&r>0?i=r:(n<0&&r<0||!r)&&(o<0&&o-n<=u.maxPrecision?i=o:r<=n&&!(o>0&&-n<=u.maxPrecision)&&(i=r)),i&&(d=this.abbreviations[i],e/=10**i)}if(r=Math.abs(e),t=u.temp,l=u.numericPattern,c=l.split(o)[1],"I"===this.type&&(e=Math.round(e)),i=e,c||"#"!==l.slice(-1)[0])if(r>=1e15||r>0&&r<=1e-14)e=r?r.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{const t=Number((e+1e-15*(e<0?-1:1)).toFixed(Math.min(20,c?c.length:0)).split(".")[0]);let n=l.split(o)[0];if(n+=o,e=aw(n,t)||"0",c){const t=Math.max(0,Math.min(14,c.length)),n=c.replace(/#+$/,"").length;let i=("I"===this.type?0:r%1+1e-15).toFixed(t).slice(2).replace(/0+$/,"");for(s=i.length;s<n;s++)i+="0";i&&(e+=o+i)}else 0===t&&(i=0)}else if(r>=10**t||r<1||r<1e-4)0===e?e="0":r<1e-4||r>=1e20?(e=(e=i.toExponential(Math.max(1,Math.min(14,t))-1)).replace(/\.?0+(?=e)/,""),f=""):(e=e.toPrecision(Math.max(1,Math.min(14,t)))).indexOf(".")>=0&&(e=(e=e.replace(e.indexOf("e")<0?/0+$/:/\.?0+(?=e)/,"")).replace(".",o));else{for(l+=o,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(r)/Math.log(10)))),s=0;s<t;s++)l+="#";e=aw(l,e)}e=e.replace(u.numericRegex,e=>e===a?u.groupTemp:e===o?u.decTemp:""),i<0&&!/^-/.test(e)&&(e="-".concat(e))}return u.prefix+e+f+d+u.postfix}static getStaticFormatter(){return{prepare(){},formatValue:e=>"".concat(e)}}}function ww(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{size:n=5e3,multipleArguments:r=!1,toKey:i=e=>e}=t;let o,a,s=Object.create(null),l=Object.create(null),c=0,u=0;return o=r?function(){return a=i(...arguments),o.has(a)?o.get(a):o.set(a,e(...arguments))}:t=>(a=i(t),o.has(a)?o.get(a):o.set(a,e(t))),o.set=(e,t)=>(c>=n&&(delete s[l[u]],delete l[u],c--,u++),s[e]=t,l[c]=e,c++,t),o.get=e=>s[e],o.has=e=>e in s,o.clear=()=>{s=Object.create(null),l=Object.create(null),c=0,u=0},o.size=()=>c,o}function Mw(e,t,n,r,i){const o=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Sw(...t)}(i,e,t,n,r),a=ww(o.formatValue.bind(o),{toKey:e=>isNaN(e)?e:+e});function s(e){return a(e)}return s.format=function(e,t,n,r){return a.clear(),o.format(t,e,n,r)},s.pattern=function(e){return e&&(a.clear(),o.pattern=e,o.prepare()),o.pattern},s}const kw="D",Cw="T",qw="TS",Ew=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Dw=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Tw=["January","February","March","April","May","June","July","August","September","October","November","December"],Ow=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Nw(e,t){for(let n=e.length;n<t;n++)e="0".concat(e);return e}function Aw(e){let t=e.toString().split(".");return t[1]?(t=Number("0.".concat(t[1])),t):0}class _w{constructor(e,t,n){const r=e||{};r.qCalendarStrings||(r.qCalendarStrings={qLongDayNames:Ew,qDayNames:Dw,qLongMonthNames:Tw,qMonthNames:Ow}),this.localeInfo=r,this.locale_days=r.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=r.qCalendarStrings.qDayNames.slice(),this.locale_months=r.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=r.qCalendarStrings.qMonthNames.slice(),t||(t={[Cw]:r.qTimeFmt||"hh:mm:ss",[kw]:r.qDateFmt||"YYYY-MM-DD",[qw]:r.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"}[n]),this.pattern=t}clone(){const e=new _w(this.localeInfo,this.pattern);return e.subtype=this.subtype,e}format(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");const n=/t+/gi.test(t);let r;e instanceof Date?r=function(e,t){let n=e.getUTCHours(),r=e.getUTCDay()-1;return t&&(n%=12,n||(n=12)),r<0&&(r=6),{year:e.getUTCFullYear(),month:e.getUTCMonth(),day:r,date:e.getUTCDate(),h:n,m:e.getUTCMinutes(),s:e.getUTCSeconds(),f:e.getUTCMilliseconds(),t:e.getUTCHours()>=12?"pm":"am"}}(e,n):(e<0&&(e=-e,t="-".concat(t)),r=function(e,t){let n,r=function(e){const t=e,n=24*Aw(t),r=60*Aw(n),i=60*Aw(r),o=1e3*Aw(i);return{d:Math.floor(t),h:Math.floor(n),m:Math.floor(r),s:Math.floor(i),f:Math.round(o)}}(e),i=r.d,o=r.h,a=r.m,s=r.s,l=r.f,c=0;/w+|t+/gi.test(t)&&(n=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,Math.round(86400*(e-Math.floor(e))))),isNaN(n.getTime())&&(n=null)),/D+/gi.test(t)||(o+=24*i),/h+/gi.test(t)||(a+=60*o),/m+/gi.test(t)||(s+=60*a),/w+/gi.test(t)&&(c=n?n.getDay()-1:0,c<0&&(c=6));let u="";return n&&(u=n.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:c,date:i,h:o,m:a,s:s,f:l,t:u}}(e,t));const i=(o=this,a=r,{"Y+|y+":{Y:"".concat(Number("".concat(a.year).slice(-2))),YY:Nw("".concat(a.year).slice(-2),2),YYY:Nw("".concat(a.year).slice(-3),3),def:e=>Nw("".concat(a.year),e.length)},"M+":{M:a.month+1,MM:Nw("".concat(a.month+1),2),MMM:o.locale_months_abbr[a.month],def:o.locale_months[a.month]},"W+|w+":{W:a.day,WW:Nw("".concat(a.day),2),WWW:o.locale_days_abbr[a.day],def:o.locale_days[a.day]},"D+|d+":{D:a.date,def:e=>Nw("".concat(a.date),e.length)},"h+|H+":{h:a.h,def:e=>Nw("".concat(a.h),e.length)},"m+":{m:a.m,def:e=>Nw("".concat(a.m),e.length)},"s+|S+":{s:a.s,def:e=>Nw("".concat(a.s),e.length)},"f+|F+":{def(e){let t="".concat(a.f),n=e.length-t.length;if(n>0)for(let e=0;e<n;e++)t+="0";else n<0&&(t=t.slice(0,e.length));return t}},"t{1,2}|T{1,2}":{def(e){let t=a.t;return e[0].toUpperCase()===e[0]&&(t=t.toUpperCase()),t=t.slice(0,e.length),t}}});var o,a;const s=[];for(const e in i)Object.prototype.hasOwnProperty.call(i,e)&&s.push(e);const l=new RegExp(s.join("|"),"g");return t.replace(l,e=>{let t,n,r;for(n in i)if(Object.prototype.hasOwnProperty.call(i,n)&&(t=new RegExp(n),t.test(e)))break;if(!t)return"";for(const t in i[n])if(t===e||t.toLowerCase()===e){r=i[n][t],void 0===r&&(r=i[n][t.toLowerCase()]);break}return void 0===r&&(r=i[n].def),"function"==typeof r&&(r=r(e)),r})}}function Iw(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new _w(...t)}function Lw(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=Iw(arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,e,t),r=ww(n.format.bind(n),{toKey:e=>"object"==typeof e&&"function"==typeof e.getTime?e.getTime():e});function i(e){return"IV"!==t?function(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}(e):e}function o(e){return e=i(e),r(e)}return o.format=function(e,t){return r.clear(),t=i(t),n.format(t,e)},o.locale=function(i){return n=Iw(i,e,t),r=ww(n.format.bind(n),{toKey:e=>"object"==typeof e?e.getTime():e}),this},o.qtype=function(e){return void 0!==e&&(t=e,r.clear()),t},o}function Pw(){let e,{meta:t,id:n,key:r,localeInfo:i,fieldExtractor:o,value:a,type:s,sourceField:l}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const c=a||("dimension"===s?e=>null==e?void 0:e.qElemNo:e=>null==e?void 0:e.qValue),u="dimension"===s?"first":"avg",d=function(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return Lw(e.qNumFormat.qFmt,e.qNumFormat.qType,t);let n="#",r=t&&void 0!==t.qThousandSep?t.qThousandSep:",",i=t&&void 0!==t.qDecimalSep?t.qDecimalSep:".",o="U",a=e&&!!e.qIsAutoFormat;return e&&e.qNumFormat?(n=e.qNumFormat.qFmt||n,r=e.qNumFormat.qThou||r,i=e.qNumFormat.qDec||i,o=e.qNumFormat.qType||o,a=a&&-1===["M"].indexOf(e.qNumFormat.qType)):a=!0,(a||"U"===o)&&(n="#".concat(i,"##"),o="U"),Mw(n,r,i,o,t)}(t,i),f={id:()=>n,key:()=>r,raw:()=>t,title:()=>t.qFallbackTitle||t.label,type:()=>s,origin:()=>l,items:()=>(e||(e=o(f)),e),min:()=>t.qMin,max:()=>t.qMax,value:c,label:e=>(null==e?void 0:e.qText)||"",reduce:u,reduceLabel:"dimension"===s?"first":(e,t)=>d(t),formatter:()=>d,tags:()=>t.qTags};return f}function Rw(e,t,n,r,i){return(t[e]||[]).map((t,o)=>{const a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(o),s={instance:Pw(wS({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},i))};return s.attrDims=Rw("qAttrDimInfo",t,n,a,wS({},i,{value:e=>null==e?void 0:e.qElemNo,type:"dimension"})),s.attrExps=Rw("qAttrExprInfo",t,n,a,wS({},i,{value:e=>null==e?void 0:e.qNum,type:"measure"})),s.measures=Rw("qMeasureInfo",t,n,a,wS({},i,{value:e=>null==e?void 0:e.qValue,type:"measure"})),s})}function zw(){let{key:e,data:t,config:n={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},i=t;if(!i)throw new Error('Missing "data" input');if(!i.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');const o=zw.util,a={cache:r,cube:i,localeInfo:n.localeInfo,fieldExtractor:null,pages:null,hierarchy:()=>null,virtualFields:n.virtualFields},s={key:()=>e,raw:()=>i,field:e=>function(e,t){let{cache:n}=t;if("number"==typeof e)return n.fields[e];const r=n.allFields;if("function"==typeof e){for(let t=0;t<r.length;t++)if(e(r[t]))return r[t];return!1}if("string"==typeof e){for(let t=0;t<r.length;t++)if(r[t].key()===e||r[t].title()===e)return r[t]}else if(e&&-1!==r.indexOf(e))return e;throw Error("Field not found: ".concat(e))}(e,a),fields:()=>r.fields.slice(),extract:e=>a.extractor(e,s,r,o),hierarchy:e=>a.hierarchy(e,s,r,o),_cache:()=>r};"K"===i.qMode||"T"===i.qMode||!i.qMode&&i.qNodesOnDim?(a.extractor=rw,a.hierarchy=nw,a.pages="K"===i.qMode?i.qStackedDataPages:i.qTreeDataPages):"S"===i.qMode?(a.extractor=qS,a.pages=i.qDataPages,a.hierarchy=nw):a.extractor=()=>[],a.fieldExtractor=e=>a.extractor({field:e},s,r,o);const l="S"===i.qMode?e=>e.qElemNumber:void 0,c="S"===i.qMode?e=>e.qNum:void 0;r.wrappedFields.push(...Rw("qDimensionInfo",i,e,"",wS({},a,{value:l,type:"dimension"}))),r.wrappedFields.push(...Rw("qMeasureInfo",i,e,"",wS({},a,{value:c,type:"measure"}))),r.fields=r.wrappedFields.map(e=>e.instance);const u=e=>{e.forEach(e=>{r.allFields.push(e.instance),u(e.measures),u(e.attrDims),u(e.attrExps)})};return u(r.wrappedFields),(n.virtualFields||[]).forEach(t=>{const n=s.field(t.from),i=Pw(hS({meta:n.raw(),id:"".concat(e,"/").concat(t.key),sourceField:n,fieldExtractor:e=>a.extractor({field:e},s,r,o),key:t.key,type:n.type(),localeInfo:a.localeInfo,value:n.value},t.override||{}));r.virtualFields.push(i)}),r.allFields.push(...r.virtualFields),s}const Fw=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],jw=/\/qDimensionInfo(?:\/(\d+))?/,Bw=/\/qMeasureInfo\/(\d+)/,Vw=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,Hw=/\/qAttrExprInfo\/(\d+)/,$w=/\/?qHyperCube/,Ww=/\/?qTreeData/,Uw=e=>"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14)),Yw=e=>"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13));function Kw(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r=t.byCells,i=t.primarySource,o=[],a={},s=e.isActive();let l=!1;return e.brushes().forEach(e=>{const t=function(e,t){let n=e,r=-1,i=-1,o="",a=e=>e;$w.test(e)?(o="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=Uw):Ww.test(e)&&(o="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=Yw);let s=!0;if(jw.test(e)&&(r=+jw.exec(e)[1]),Bw.test(e)&&(i=+Bw.exec(e)[1]),Vw.test(e)){i=-1,r=0;const e=+Vw.exec(n)[2];isNaN(e)||(r=e,n=n.replace(/\/\d+$/,"")),s=!1}if(Hw.test(e)){const e=i;if(t){i=0;const a=VS(o,t);i+=(a.qMeasureInfo||[]).length,r>-1?(i=a.qDimensionInfo.slice(0,r).reduce((e,t)=>e+t.qAttrExprInfo.length,i),r=-1):(i=a.qDimensionInfo.reduce((e,t)=>e+t.qAttrExprInfo.length,i),i=a.qMeasureInfo.slice(0,e).reduce((e,t)=>e+t.qAttrExprInfo.length,i)),i+=+Hw.exec(n)[1]}else r>-1?(r=-1,i=+Hw.exec(n)[1]):i+=+Hw.exec(n)[1]+1}return Fw.forEach(e=>{let[t,r]=e;n=n.replace(t,r)}),s&&(n=a(n)),n&&"/"!==n[0]&&(n="/".concat(n)),{measureIdx:i,dimensionIdx:r,path:n}}(e.id,n);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.multiRangeSelectTreeDataValues||(a.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),n.forEach(e=>a.multiRangeSelectTreeDataValues.ranges.push({qMeasureIx:t.measureIdx,qDimensionIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})))}else{if("range"===e.type&&t.measureIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.rangeSelectHyperCubeValues||(a.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),n.forEach(e=>a.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:t.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})))}if("range"===e.type&&t.dimensionIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.selectHyperCubeContinuousRange||(a.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),n.forEach(e=>a.selectHyperCubeContinuousRange.ranges.push({qDimIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!1}})))}if("value"===e.type&&t.dimensionIdx>-1)if(r)if(n&&n.qHyperCube&&("P"===n.qHyperCube.qMode||"T"===n.qHyperCube.qMode||"K"===n.qHyperCube.qMode)){const r=n.qHyperCube,o=r.qNoOfLeftDims,s=r.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(a.selectPivotCells||(a.selectPivotCells={path:t.path,cells:[]}),e.id===i||!i){const n=e.brush.values().map(e=>+e).filter(e=>!isNaN(e));(0===o||s>=o)&&o>-1?n.forEach(e=>{a.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:s-o})}):n.forEach(e=>{a.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})}),l=!!a.selectPivotCells.cells.length}}else a.selectHyperCubeCells||(a.selectHyperCubeCells={path:t.path,cols:[]}),a.selectHyperCubeCells.cols.push(t.dimensionIdx),e.id!==i&&(i||a.selectHyperCubeCells.values)||(a.selectHyperCubeCells.values=e.brush.values().map(e=>+e).filter(e=>!isNaN(e)),l=!!a.selectHyperCubeCells.values.length);else{const n=e.brush.values().map(e=>+e).filter(e=>!isNaN(e));l=!!n.length,o.push({params:[t.path,t.dimensionIdx,n,!1],method:"selectHyperCubeValues"})}}}),!l&&s?[{method:"resetMadeSelections",params:[]}]:(a.rangeSelectHyperCubeValues&&o.push({method:"rangeSelectHyperCubeValues",params:[a.rangeSelectHyperCubeValues.path,a.rangeSelectHyperCubeValues.ranges,[],null===(c=t.orMode)||void 0===c||c]}),a.selectHyperCubeContinuousRange&&o.push({method:"selectHyperCubeContinuousRange",params:[a.selectHyperCubeContinuousRange.path,a.selectHyperCubeContinuousRange.ranges]}),a.selectHyperCubeCells&&o.push({method:"selectHyperCubeCells",params:[a.selectHyperCubeCells.path,a.selectHyperCubeCells.values,a.selectHyperCubeCells.cols]}),a.selectPivotCells&&o.push({method:"selectPivotCells",params:[a.selectPivotCells.path,a.selectPivotCells.cells]}),a.multiRangeSelectTreeDataValues&&o.push({method:"multiRangeSelectTreeDataValues",params:[a.multiRangeSelectTreeDataValues.path,a.multiRangeSelectTreeDataValues.ranges]}),o);var c}function Gw(e){zw.util=e.data("matrix").util,e.data("q",zw),e.formatter("q-number",Mw),e.formatter("q-time",Lw)}function Xw(e){var t=Zx(e.layout||{},e.path.split("/").join("."));if(!t)return!1;var n=t.qIsOneAndOnlyOne;return void 0!==n&&n}function Jw(e){var t=e.brush,n=e.colorField,r=e.legendAlias,i=e.useLegendCube,o=void 0!==i&&i;!n||/qAttrDimInfo/.test(n)?(t.removeKeyAlias("attrDim/qDimensionInfo/0"),r&&t.removeKeyAlias(r),t.addKeyAlias("attrDim/qDimensionInfo/0","qHyperCube/".concat(n))):o&&t.addKeyAlias(r,"qHyperCube/".concat(n))}Gw.qBrushHelper=Kw,Gw.selections=Kw;var Zw="Shift";var Qw=function(e,t){return t[e]?Qw(e+1,t):e},eM=function(e,t){var n=t.reduce(function(e,t){return e[t]=!0,e},{});return e.reduce(function(e,t,r){var i=Qw(r,n);return n[i]=!0,e[r]=i,e},{})};function tM(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.layout,n=e.filtered,r=void 0===n?{}:n,i=(null==t?void 0:t.qHyperCube)||{},o=i.qDimensionInfo,a=void 0===o?[]:o,s=i.qMeasureInfo,l=void 0===s?[]:s;return{dimensions:eM(a,r.dimensions||[]),measures:eM(l,r.measures||[])}}function nM(e){var t=e.selection,n=e.fieldMap,r=t.method,i=t.params;if("selectHyperCubeValues"===r){var o=n.dimensions[i[1]];void 0!==o&&(i[1]=o)}return"selectHyperCubeContinuousRange"===r&&i[1].forEach(function(e){var t=n.dimensions[e.qDimIx];void 0!==t&&(e.qDimIx=t)}),t}var rM=[],iM=0,oM=function(e){var t=rM.filter(function(e){var t;return null===(t=e.selections)||void 0===t?void 0:t.isActive()});t.length&&("Enter"===e.key?t.forEach(function(e){return e.selections.confirm()}):"Escape"!==e.key&&"Esc"!==e.key||t.forEach(function(e){return e.selections.cancel()}))};function aM(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.selections,r=t.brush,i=t.majorScale,o=t.actions,a=t.selectionsFn,s=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).path,l=void 0===s?"/qHyperCubeDef":s;if(!n)return{layout:function(){},filteredFields:function(){},allowSimultaneous:function(){},release:function(){}};var c=++iM,u=null,d={dimensions:[],measures:[]},f=[],h={};n.on=n.on.bind(n),n.isActive=n.isActive.bind(n),n.addListener=n.addListener.bind(n),n.removeListener=n.removeListener.bind(n);var p=function(e){var t=e.brush,n=e.getConfig;return{interceptor:function(e){var r=t.brushes(),i=n(),o=i.allowSimultaneous,a=i.layout,s=void 0===a?{}:a;r.forEach(function(n){var r,i,a;("range"===n.type||null!==(r=e[0])&&void 0!==r&&r.key&&(null===(i=e[0])||void 0===i?void 0:i.key)!==n.id&&0!==o.indexOf(null===(a=e[0])||void 0===a?void 0:a.key))&&t.clear([])});var l=e.filter(function(e){return-2!==e.value});if(l.length>1){var c=function(e){var t=e.layout,n=void 0===t?{}:t,r=e.values,i=void 0===r?[]:r;if(null==i||!i.length)return[];var o=Array.from(new Set(i.map(function(e){return e.key}))),a=[];return o.forEach(function(e){var t=Xw({layout:n,path:e}),r=i.filter(function(t){return t.key===e}),o=t?[r.pop()]:r;a.push.apply(a,by(o))}),a.filter(Boolean)}({layout:s,values:l});return c}return l},rangeInterceptor:function(e){var r=t.brushes(),i=n().allowSimultaneous;return r.filter(function(e){return"value"===e.type}).length?(t.clear([]),e):(r.forEach(function(n){var r=n.id===e[0].key||i.includes(n.id)&&i.includes(e[0].key);"range"!==n.type||r||t.clear([])}),e)}}}({brush:r,getConfig:function(){return{layout:u,allowSimultaneous:f}}}),m=p.rangeInterceptor,g=p.interceptor;r.intercept("set-ranges",m),r.intercept("toggle-ranges",m),r.intercept("toggle-values",g),r.intercept("set-values",g),r.intercept("add-values",g),r.on("start",function(){return n.begin(l)});var y,v,b={activate:function(){},deactivated:function(){return r.end()},cleared:function(){return r.clear()},canceled:function(){return r.end()}};y=n,v=b,Object.keys(v).forEach(function(e){y.on(e,v[e])});var x=null==i||null===(e=i.max)||void 0===e?void 0:e.call(i);return null!=o&&o.select?(o.select.on("start",function(){var e;r.start(),"function"==typeof o.select.getBrushOptions&&(h=(e=o.select).getBrushOptions.apply(e,arguments))}),o.select.on("end",function(){var e=a(r,h,u),t=tM({layout:u,filtered:d});e.forEach(function(e){var r=nM({selection:e,fieldMap:t});!function(e,t,n){if(t&&void 0!==n&&"selectHyperCubeContinuousRange"===e.method){var r=e.params;if(r&&r[1]&&r[1][0]){var i=r[1][0],o=i.qDimIx,a=i.qRange;"undefined"!==o&&a&&!1===a.qMaxInclEq&&a.qMax>=n&&(a.qMaxInclEq=!0)}}}(r,o.select.brushSelectionIncludeMax,x),n.select(r)})})):r.on("update",function(){var e=a(r,h,u),t=tM({layout:u,filtered:d});e.forEach(function(e){n.select(nM({selection:e,fieldMap:t}))})}),0===rM.length&&document.addEventListener("keyup",oM),rM.push({key:c,selections:n}),{layout:function(e){u=e},filteredFields:function(e){d=e},allowSimultaneous:function(e){f=e},release:function(){u=null;var e=rM.indexOf(rM.filter(function(e){return e.key===c})[0]);-1!==e&&rM.splice(e,1),rM.length||document.removeEventListener("keyup",oM),function(e,t){Object.keys(t).forEach(function(n){e.removeListener(n,t[n])})}(n,b)}}}function sM(e){var t=e.chart,n=e.document,r=e.selectionInfo,i=e.eventName,o=e.componentName,a=e.brushName,s=void 0===a?"selection":a,l=e.emit,c=void 0===l?"rangeClear":l,u=r.event===i,d=n.querySelector("[data-key='".concat(o,"-edge-0']"));if(u||!d)return!1;var f=t.component(o);return!!f&&(f.emit(c),"string"==typeof s&&t.brush(s).clear(),f)}var lM=["chart","document","selections","selectionInfo"],cM=function(e){e.chart,e.document,e.selections,e.selectionInfo;var t=my(e,lM);t.clearDiscrete(),t.clearContinuous(),t.clearMinor(),t.clearRange(),t.clearTap(),t.clearLegend()};function uM(e){var t,n=e.lasso;null!=n&&null!==(t=n.active)&&void 0!==t&&t.call(n)&&(null==n||n.action(!1))}function dM(e){var t,n=e.chart,r=e.selectionInfo,i=e.selectionActions,o=e.actions,a=void 0===o?{}:o,s=e.selections,l=e.selectionEvents;if(!1===i||!1===l)return function(){};var c=i.reset,u=void 0===c?uM:c,d=i.clear,f=!1!==d&&function(e){var t=e.clear,n=void 0===t?cM:t,r=e.selections,i=e.selectionInfo,o=e.chart;return function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).cleared,t={selections:r,selectionInfo:i,chart:o,document:document,cleared:e};return n(py({clearDiscrete:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.eventName,o=void 0===i?"discreteRange":i,a=e.componentName,s=void 0===a?"discrete-range-brush":a,l=e.cleared;return sM({selectionInfo:t,chart:n,document:r,eventName:void 0!==l&&l?void 0:o,componentName:s,emit:"areaClear",brushName:e.brushName})}(py(py({},t),e))},clearContinuous:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.eventName,o=void 0===i?"continuousRange":i,a=e.componentName,s=void 0===a?"continuous-range-brush":a,l=e.cleared;return sM({selectionInfo:t,chart:n,document:r,eventName:void 0!==l&&l?void 0:o,componentName:s,brushName:e.brushName})}(py(py({},t),e))},clearMinor:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.componentName,o=void 0===i?"minor-range-brush":i,a=e.eventName,s=void 0===a?"minorRange":a,l=e.cleared,c=void 0!==l&&l,u=e.brushName,d=sM({selectionInfo:t,chart:n,document:r,eventName:c?void 0:s,componentName:o,brushName:void 0!==u&&u});if(d){var f=d.settings.settings,h=f.scale,p=f.brush,m=n.scale(h).data().fields.map(function(e){return e.id()}),g=n.brush(p),y=g.brushes().filter(function(e){return"range"===e.type&&m.some(function(t){return t===e.id})});g&&y.length&&y.forEach(function(e){g.removeRanges(e.brush.ranges().map(function(t){return{key:e.id,range:t}}))})}}(py(py({},t),e))},clearRange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.selections,o=e.eventName,a=void 0===o?"xAxis":o,s=e.cleared;sM({selectionInfo:t,chart:n,document:r,eventName:void 0!==s&&s?void 0:a,componentName:"".concat(a,"-range-brush"),emit:"areaClear",brushName:!1})&&i.clear()}(py(py({},t),e))},clearTap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.chart,n=e.selectionInfo,r=e.selections,i=e.events,o=void 0===i?["tap"]:i,a=e.brushNames,s=void 0===a?[]:a;if(n&&o.includes(n.event)){var l=n.currentComponent;n.previousComponent!==l&&(r.clear(),s.forEach(function(e){return t.brush(e).end()}))}}(py(py({},t),e))},clearLegend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.selections,o=e.eventName,a=void 0===o?"legendRange":o,s=e.componentName,l=void 0===s?"legend-range-brush":s,c=e.cleared,u=void 0!==c&&c,d=e.brushName;sM({selectionInfo:t,chart:n,document:r,eventName:u?void 0:a,componentName:l,brushName:void 0!==d&&d})&&i.clear()}(py(py({},t),e))}},t))}}({clear:d,selections:s,selectionInfo:r,chart:n}),h=function(e){var t=e.chart,n=e.actions,r=e.reset,i=e.clear,o=!1,a={deactivated:function(e){var t=(n||{}).lasso;r({e:e,lasso:void 0!==t&&t})},canceled:function(e){var o=(n||{}).lasso;r({e:e,lasso:void 0!==o&&o}),i({e:e,chart:t,document:document})},cleared:function(e){o||(o=!0,i({e:e,chart:t,document:document,cleared:!0}),o=!1)}};return!1===r&&delete a.deactivated,!1===i&&delete a.cleared,!1===r&&!1===i&&delete a.canceled,a}({chart:n,clear:f,reset:u,actions:a}),p={};Object.entries(h).forEach(function(e){var t=vy(e,2),n=t[0],r=t[1];p[n]=function(e,t){return t?function(n){return t({event:n,defaultFunc:e})}:e}(r,l[n])});var m=function(e){var t=e.selectionEvents,n=e.selections,r=e.selectionInfo,i=e.clear,o=e.chart,a=e.document,s=t.start,l={selections:n,selectionInfo:r,chart:o,document:a},c=function(e){return Object.assign(r,e||{})},u=function(e){var t=e.event,n=e.components;return function(){return function(e){var t=e.selectionInfo,n=e.clear,r=e.event,i=e.components,o=void 0===i?[]:i;(0,e.setSelectionInfo)(py(py({},void 0===t?{}:t),{},{event:r,components:o.map(function(e){return e.key}).filter(Boolean)})),n()}({event:t,components:n,clear:i,selectionInfo:r,setSelectionInfo:c})}};return"function"==typeof s?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];s(py(py({defaultFunc:u({event:e,components:t}),setSelectionInfo:c,clear:i},l),{},{event:e,components:t}))}:function(e){u({event:e,components:arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]})()}}({selectionEvents:l,selections:s,selectionInfo:r,clear:f,chart:n,document:document});return null==a||null===(t=a.select)||void 0===t||t.on("start",m),Object.entries(p).forEach(function(e){var t=vy(e,2),n=t[0],r=t[1];null==s||s.on(n,r)}),function(){var e;null==a||null===(e=a.select)||void 0===e||e.removeListener("start",m),Object.entries(p).forEach(function(e){var t=vy(e,2),n=t[0],r=t[1];null==s||s.removeListener(n,r)})}}var fM=[{key:"qHyperCube/qDimensionInfo/0:numeric",includeMax:!1}];function hM(e){var t=e.chart,n=e.actions,r=e.selections,i=e.picassoQ,o=e.config,a=o.allowSimultaneous,s=void 0!==a&&a,l=o.majorScale,c=void 0===l?void 0:l,u=o.selectionActions,d=void 0===u?{}:u,f=d.clear,h=d.reset,p=o.selectionEvents,m=void 0===p?{deactivated:void 0,canceled:void 0,cleared:void 0,start:void 0}:p,g=o.brushEvents,y=void 0===g?{}:g,v=o.brushName,b=void 0===v?"selection":v,x=o.brushMaxListeners,S=void 0===x?20:x,w=o.brushRanges,M=void 0!==w&&w,k=o.interceptors,C=void 0===k?{}:k,q=o.selectionsFn,E=void 0===q?i.selections:q,D=t.brush(b);if("number"==typeof S&&D.setMaxListeners(S),M){var T=!0===M?fM:M;D.configure({ranges:T})}var O={canSelect:!0,getIsSelectionLocked:!1,isInnerDimensionLocked:!1,lockedDimensions:[],singleSelectIndex:0,selectionInfo:{colorField:void 0,components:[],event:void 0,currentComponent:void 0,previousComponent:void 0}},N=aM({brush:D,majorScale:c,actions:n,selections:r,picassoQ:i,selectionsFn:E});!function(e){var t=e.brush,n=e.interceptors,r=void 0===n?{}:n;Object.entries(r).forEach(function(e){var n=vy(e,2),r=n[0],i=n[1];(Array.isArray(i)?i:[i]).forEach(function(e){t.intercept(r,e)})})}({brush:D,interceptors:C});var A=function(e){var t=e.chart,n=e.selectionActions,r=e.brush,i=e.actions,o=e.selectionInfo,a=e.selections,s=e.selectionEvents,l=function(e){var t=e.brush,n=e.chart,r=e.selectionInfo,i=e.brushEvents,o=void 0===i?{}:i,a=Object.entries(o).map(function(e){var i=vy(e,2),o=i[0],a=i[1],s=function(){return a({chart:n,selectionInfo:r})};return t.on(o,s),[o,s]});return function(){a.forEach(function(e){var n=vy(e,2),r=n[0],i=n[1];t.removeListener(r,i)})}}({brush:r,chart:t,selectionInfo:o,brushEvents:e.brushEvents}),c=dM({chart:t,selectionInfo:o,selectionActions:n,actions:i,selections:a,selectionEvents:s}),u=function(e){var t=e.actions;if(null==t||!t.lasso)return function(){};var n=!1,r=function(e){n||e.key!==Zw||(t.lasso.action(!0),n=!0)},i=function(e){e.key===Zw&&(t.lasso.action(!1),n=!1)};return document.addEventListener("keydown",r),document.addEventListener("keyup",i),function(){document.removeEventListener("keydown",r),document.removeEventListener("keyup",i)}}({actions:i});return function(){l(),c(),u()}}({chart:t,brush:D,actions:n,selections:r,selectionInfo:O.selectionInfo,selectionActions:{clear:f,reset:h},selectionEvents:m,brushEvents:y});if(s){var _=!0===s?by(Array(15)).map(function(e,t){return"qHyperCube/qMeasureInfo/".concat(t)}):s;N.allowSimultaneous(_)}return{unbindEvents:A,state:O,picassoSelections:N,brush:D}}var pM=["colorField","useLegendCube"];function mM(e){var t=e.chart,n=e.selections,r=e.actions,i=void 0!==r&&r,o=e.config,a=void 0===o?{}:o,s=hM({chart:t,actions:i,selections:n,picassoQ:Gw,config:a}),l=s.unbindEvents,c=s.state,u=s.picassoSelections,d=s.brush,f=a.custom,h=void 0===f?{}:f,p=a.legendAlias,m=void 0===p?void 0:p,g=a.setBrushAliases,y=void 0===g?Jw:g;return{getIsDimensionLocked:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return c.lockedDimensions[e]},getIsSelectionLocked:function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return null!==(e=null==n||null===(t=n.isLocked)||void 0===t?void 0:t.call(n))&&void 0!==e?e:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return!(null==e||!e.length)&&e.filter(function(e){return"object"===xy(e.data)&&Array.isArray(e.data.fields)}).every(function(e){return e.data.fields.every(function(e){var t=e.raw();return!(!t.qLocked&&t.qCardinal)})})}(r)},getIsSingleSelect:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c.singleSelectIndex;return c.singleSelectDimensions[e]},getCanSelect:function(){return c.canSelect},getSelectionsObject:function(){return n},getSelectionInfo:function(){return c.selectionInfo},setLayout:function(e){var t=function(e){var t,n,r,i=e.selections,o=e.picassoSelections,a=e.layout,s={lockedDimensions:[],singleSelectDimensions:[]};null!=i&&null!==(t=i.isModal)&&void 0!==t&&t.call(i)&&i.confirm(),o.layout(a);var l=(null!==(n=null==a?void 0:a.qHyperCube)&&void 0!==n?n:{}).qDimensionInfo,c=void 0===l?[]:l;return s.lockedDimensions=c.map(function(e){return!!e.qLocked}),s.singleSelectDimensions=c.map(function(e,t){return Xw({layout:a,path:"qHyperCube/qDimensionInfo/".concat(t)})}),s.singleSelectIndex=function(e){var t,n=((null==e?void 0:e.qHyperCube)||{}).qDimensionInfo,r=void 0===n?[]:n,i=r.map(function(e,t){var n;return!(e.qLocked||(null===(n=e.qCardinalities)||void 0===n?void 0:n.qHypercubeCardinal)<=1)&&t}).filter(function(e){return"number"==typeof e});return null!==(t=i[0])&&void 0!==t?t:Math.max(r.length-1,0)}(a),s.canSelect=0===c.length||c.some(function(e){return!e.qLocked}),s.dimensionLocked=!(null===(r=c[0])||void 0===r||!r.qLocked),s}({selections:n,picassoSelections:u,layout:e});Object.assign(c,t)},setFilteredFields:function(e){u.filteredFields(e)},setBrushAliases:function(e){var t=e.colorField,n=e.useLegendCube,r=void 0!==n&&n,i=my(e,pM),o=py({useLegendCube:r,colorField:t,brush:d,legendAlias:m},i);y(py(py({},o),{},{defaultFunc:function(){return Jw(o)}}))},destroy:function(){l(),u.release()},custom:py({},h)}}var gM="'Source Sans Pro', 'Arial', 'sans-serif'",yM="#333333",vM="#595959",bM="#737373",xM="#cccccc",SM="#e6e6e6";function wM(e){var t={};return[].concat(by(e),by([["","","color"],["object","","fontFamily"],["object","axis.label.name","color",vM],["object","axis.label.name","fontFamily",gM],["object","axis.label.name","fontSize","12px"],["object","axis.line.major","color",xM],["object","axis.line.minor","color",SM],["object","axis.title","color"],["object","axis.title","fontFamily",gM],["object","axis.title","fontSize","13px"],["object","grid.line.highContrast","color",SM],["object","grid.line.major","color",xM],["object","grid.line.minor","color",SM],["object","label.value","color",vM],["object","label.value","fontFamily",gM],["object","label.value","fontSize","12px"],[!1,"label.value","darkColor",vM],[!1,"label.value","lightColor",SM],["object","outOfRange","color","#999"],["object","legend.title","color",yM],["object","legend.title","fontFamily",gM],["object","legend.title","fontSize","15px"],["object","legend.label","color",vM],["object","legend.label","fontFamily",gM],["object","legend.label","fontSize","13px"],["object","referenceLine.label.name","color",yM],["object","referenceLine.label.name","fontFamily",gM],["object","referenceLine.label.name","fontSize","12px"],["object","referenceLine.outOfBounds","color",SM],["object","referenceLine.outOfBounds","fontFamily",gM],["object","referenceLine.outOfBounds","fontSize","12px"],["object","referenceLine.outOfBounds","backgroundColor",bM,function(e){return"transparent"===e?bM:e}]])).reduce(function(e,n){var r="".concat(n[0],"-").concat(n[1],"-").concat(n[2],"}");return t[r]||(t[r]=!0,e.push(n)),e},[]).sort(function(e,t){return(e[0].split?e[0].split(".").length:0)-(t[0].split?t[0].split(".").length:0)})}var MM="object",kM=function(e){return e};function CM(e){var t=e.theme,n=e.id,r=e.transform,i=e.extend,o=e.matrix,a={},s=r.reduce(function(e,t){var n=vy(t,2),r=n[0],i=n[1];return e[r]=i,e},{});return o.forEach(function(e){var r=vy(e,5),i=r[0],o=r[1],l=r[2],c=r[3],u=r[4],d=void 0===u?function(e){return e}:u,f=function(e){var t=e.theme,n=e.base,r=e.path,i=e.attribute,o=e.defaultValue,a=void 0===o?void 0:o;if(!t||!1===n)return a;var s=t.getStyle(n,r,i);return void 0===s?a:s}({theme:t,base:i===MM&&n?"".concat(MM,".").concat(n):i,path:o,attribute:l,defaultValue:c}),h=(s["".concat(o,".").concat(l)]||kM)(d(f));eS(a,[o,l].filter(Boolean).join("."),h)}),i.forEach(function(e){var t=vy(e,2),n=t[0],r=t[1];eS(a,n,r)}),a}var qM={NOOP:function(){},FALSE:function(){return!1},ARRAY:function(){return[]},OBJECT:function(){return{}}},EM="chart-modules-tooltip",DM="#".concat(EM);function TM(){if(!document.querySelector(DM)){var e=document.createElement("div");e.id=EM,e.setAttribute("data-qs-css",""),e.style.overflow="hidden",e.style.position="fixed",e.style.pointerEvents="none",e.style.left="0px",e.style.top="0px",e.style.width="100%",e.style.height="100%",e.style.zIndex=1020,document.body.appendChild(e)}}function OM(e){return{show:!0,key:e.key,type:"tooltip",layout:{displayOrder:3},beforeMount:function(){TM()},beforeUpdate:function(){TM()},destroyed:function(){var e;null!=(e=document.querySelector(DM))&&e.parentElement&&e.childElementCount<1&&e.parentElement.removeChild(e)},settings:{appendTo:function(){return document.querySelector(DM)},direction:e.rtl?"rtl":"ltr",duration:e.duration},style:{arrow:{color:"#404040"},content:{display:"table","border-spacing":"4px",background:"rgba(64, 64, 64, 0.9)",opacity:"1",fontSize:"13px",fontFamily:"'Source Sans Pro', 'Arial', 'sans-serif'","empty-cells":"show"},cell:{"max-width":"180px","word-break":"break-word","word-wrap":"break-word","overflow-wrap":"break-word",hyphens:"auto"}}}}var NM="position",AM={bar:"rect",diamond:"path",point:"circle",square:"rect",triangle:"path","n-polygon":"path",slice:"path"},_M=function(e){return e.data.value},IM=function(e){var t,n=e.data;return null==n||null===(t=n.major)||void 0===t?void 0:t.value};function LM(e){var t=e.chart,n=e.expando,r=e.nodes,i=e.collectConfig,o=e.collectibles,a=e.meta,s=i.from,l={chart:t,expando:n,nodes:r,collectConfig:i,collectibles:o,meta:a};switch("function"==typeof s?"custom":s){case"single":return function(e){var t=vy(e.nodes,1)[0];if("container"===t.type&&t.children[0]){var n=vy(t.children,1)[0];return n.key=t.key,[n]}return[t]}(l);case"position":return function(e){var t=e.collectibles,n=e.meta;return e.chart.shapesAt(n.position.absolute,{components:t.map(function(e){return{key:e.key}})})}(l);case"dimension":return function(e){var t=e.chart,n=e.nodes,r=e.collectConfig,i=e.collectibles,o=e.meta,a=vy(n,1)[0],s=r.filter,l=r.after,c="function"==typeof s?s:function(){return!0},u="function"==typeof l?l:function(){},d=i.reduce(function(e,n){var i=AM[n.type]||n.type;return e.push.apply(e,by(t.findShapes(i).filter(function(e){return e.key===n.key&&e.data&&function(e){var t=e.meta,n=e.collectible,r=e.nodes,i=e.collectConfig.by,o=void 0===i?_M:i,a=n.major,s=void 0===a?IM:a,l=o({data:r.triggerer.data}),c=s({data:r.candidate.data,meta:t}),u=Array.isArray(l),d=Array.isArray(c);return u&&d?l.length===c.length&&l.every(function(e,t){return e===c[t]}):!u&&!d&&l===c}({collectConfig:r,meta:o,collectible:n,nodes:{triggerer:a,candidate:e}})}))),e},[]).filter(c);return u({collected:d,triggerer:a}),d}(l);case"radius":return function(e){var t=e.chart,n=e.collectConfig,r=e.collectibles,i=e.meta,o=vy(e.nodes,1)[0].localBounds,a=n.distance,s=n.filter,l="function"==typeof s?s:function(){return!0},c=r.map(function(e){return e.key});return t.shapesAt({cx:i.position.absolute.x,cy:i.position.absolute.y,r:a||Math.max(o.width,o.height)},{components:c.map(function(e){return{key:e}})}).filter(l)}(l);case"custom":return function(e){var t=e.chart,n=e.expando,r=e.nodes,i=e.meta;return e.collectConfig.from({chart:t,expando:n,nodes:r,meta:i})}(l);default:return[]}}var PM=Number.MAX_VALUE;function RM(e){var t=e.nodes.filter(function(e){return e.bounds.height+e.bounds.width!==0}).reduce(function(e,t){var n=t.bounds;return e.xMin=Math.min(e.xMin,n.x,n.x+n.width),e.yMin=Math.min(e.yMin,n.y,n.y+n.height),e.xMax=Math.max(e.xMax,n.x,n.x+n.width),e.yMax=Math.max(e.yMax,n.y,n.y+n.height),e},{xMin:PM,xMax:-PM,yMin:PM,yMax:-PM}),n=t.xMin,r=t.xMax,i=t.yMin;return{x:n,y:i,width:r-n,height:t.yMax-i}}function zM(e){var t=e.chart,n=e.config,r=e.expando,i=e.internal,o=e.nodes;if(!o.length)return[];var a=vy(o,1)[0].key,s=n.main.collectibles.filter(function(e){return!e.if||e.if()});if(!s.length)return[];var l=n.main.triggers.find(function(e){return-1!==e.keys.indexOf(a)})||{},c=l.collect,u=l.placement;if(!c||!c.from||!u)return[];var d={triggerer:a,position:i.get(NM)},f=(LM({chart:t,expando:r,nodes:o,collectConfig:c,collectibles:s,meta:d})||[]).map(function(e){return e.children.length?e.children[0]:e});return f.length?function(e){var t=e.chart,n=e.config,r=e.expando,i=e.placementConfig,o=e.hovered,a=e.collected,s=e.meta,l=function(e){for(var t=e.chart,n=e.config,r=e.expando,i=e.placementConfig,o=e.hovered,a=e.collected,s=e.meta,l=vy(o,1)[0],c=Array.isArray(i)?i:[i],u={bounds:l.bounds,key:l.key},d=RM({nodes:a}),f=0;f<c.length;f++){var h=c[f];if("function"==typeof h){var p=h({chart:t,expando:r,hovered:o,collected:by(a),meta:s,collectedBounds:d,combineBounds:RM});if(p)return p}if("trigger"===h)return u;if("collectible"===h){var m=n.main.placements.collectible;return{bounds:"function"==typeof m?m({collected:by(a)}):d,key:a[0].key}}}return u}({chart:t,config:n,expando:r,placementConfig:i,hovered:o,collected:a,meta:s}),c=l.bounds,u=l.key,d=vy(a,1)[0].desc;return[{bounds:c,nodes:a,data:a.map(function(e){return e.data}),key:u,meta:s,desc:d}]}({chart:t,config:n,expando:r,placementConfig:u,hovered:o,collected:f,meta:d}):[]}var FM=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗＡ-Ｚａ-ｚｦ-ￜ]"),jM=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),BM=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),VM=function(e){return FM.test(e)},HM=function(e){return jM.test(e)||BM.test(e)};function $M(e){for(var t=e?e.length:0,n=0;n<t;n++){var r=e[n];if(VM(r))return"ltr";if(HM(r))return"rtl"}return"ltr"}function WM(e){var t=e.config,n=e.h,r=e.context,i={section:function(e){return function(e){return{type:"section",content:e.content}}({content:e.content})},text:function(e){var n=e.value,r=e.style,i=e.survive,o=e.visibility;return function(e){var t=e.config,n=e.value,r=e.style,i=void 0===r?{}:r,o=i.bold,a=void 0!==o&&o,s=i.italic,l=e.survive,c=e.visibility;return{type:"text",content:[{content:n,style:{"font-weight":a?"bold":"normal","font-style":void 0!==s&&s?"italic":"normal","text-align":t.rtl?"right":"left",direction:$M(n),"white-space":"pre-wrap"},colspan:2}],survive:py(py({},{visibility:!1}),l),visibility:py(py({},{count:!0,force:!1}),c)}}({config:t,value:n,style:r,survive:i,visibility:o})},measure:function(e){var r=e.label,i=e.value,o=e.color,a=e.style,s=e.survive,l=e.visibility;return function(e){var t,n,r,i,o=e.h,a=e.label,s=e.value,l=e.color,c=e.style,u=e.survive,d=e.visibility,f=e.config.rtl,h=o("div",{style:{display:"inline-block",width:10,height:10,"background-color":l,margin:"0 8px"}});return{type:"measure",label:a,value:s,content:[{content:f?[":",a]:[a,":"],style:{"text-align":f?"right":"left","font-weight":null!=c&&null!==(t=c.label)&&void 0!==t&&t.bold?"bold":"normal","font-style":null!=c&&null!==(n=c.label)&&void 0!==n&&n.italic?"italic":"normal",direction:$M(a)}},{content:l?f?[s,h]:[h,s]:s,style:{"text-align":f?"left":"right","vertical-align":"middle","font-weight":null!=c&&null!==(r=c.value)&&void 0!==r&&r.bold?"bold":"normal","font-style":null!=c&&null!==(i=c.value)&&void 0!==i&&i.italic?"italic":"normal",direction:$M(s)}}],survive:py(py({},{color:!1,duplicate:!1,visibility:!1}),u),visibility:py(py({},{count:!0,force:!1}),d)}}({config:t,h:n,label:r,value:i,color:o,style:a,survive:s,visibility:l})},divider:function(){return function(e){var t=e.visibility;return{type:"divider",content:[{content:"",style:{"background-image":"linear-gradient(transparent 8px, rgba(255, 255, 255, 0.4) 8px, rgba(255, 255, 255, 0.4) 9.2px, transparent 9.2px)",height:"17px"},colspan:2}],survive:{visibility:!1},visibility:py(py({},{count:!1,force:!1}),t)}}({visibility:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).visibility})},row:function(e){return function(e){var t=e.survive,n=e.visibility;return{type:"row",content:[{content:e.content,style:e.style,colspan:e.colspan}],survive:py(py({},{visibility:!1}),t),visibility:py(py({},{count:!0}),n)}}({content:e.content,style:e.style,colspan:e.colspan,survive:e.survive,visibility:e.visibility})},raw:function(e){return function(e){var t=e.survive,n=e.visibility;return{type:"raw",content:e.value,survive:py(py({},{visibility:!1}),t),visibility:py(py({},{count:!0}),n)}}({value:e.value,survive:e.survive,visibility:e.visibility})},color:function(e){var i=e.nodes,o=e.property,a=e.filter,s=void 0===a||a,l=e.visibility,c=e.fillColor;return function(e){var t=e.config,n=e.h,r=e.context,i=e.nodes,o=e.property,a=e.filter,s=e.visibility,l=e.fillColor,c=t.rtl,u={type:"color",label:void 0,value:void 0,content:[],filter:a,survive:{visibility:!1},visibility:py(py({},{count:!0}),s)},d=t.getColorSettings();if("color"===d.type||!d.fieldType)return u;var f=vy(i,1)[0];if(u.value=function(e){var t=e.config,n=e.context,r=e.property,i=e.node,o=i.data[r];if(o){if(-3===i.data.value)return i.data.label;var a=n.resources.dataset(o.source.key).field(o.source.field).formatter(),s=o.value,l=o.label,c=t.getColorSettings();if(a&&"measure"===c.fieldType)return Number.isNaN(+s)?"-":a(o.value);var u=l||s;return void 0===u||Number.isNaN(u)||"NaN"===u?"-":u}}({config:t,context:r,property:o,node:f}),void 0===u.value)return u;u.label=function(e){var t=e.context,n=e.property,r=e.node,i=e.config.getColorSettings();if(i.label)return i.label;var o=r.data[n];if(o&&"color"!==i.type){var a=t.resources.dataset,s=o.source,l=s.key,c=s.field;return a(l).field(c).title()}}({config:t,context:r,property:o,node:f});var h=null!=l?l:function(e){var t=e.node.attrs;return(null==t?void 0:t.fill)||"#ddd"}({node:f}),p=n("div",{style:{display:"inline-block",width:10,height:10,"background-color":h,margin:"0 8px"}});return u.content.push({content:c?[":",u.label]:[u.label,":"],style:{"text-align":c?"right":"left",direction:$M(u.label)}},{content:c?[u.value,p]:[p,u.value],style:{"text-align":c?"left":"right","vertical-align":"middle",direction:$M(u.value)}}),u}({config:t,h:n,context:r,nodes:i,property:o,filter:s,visibility:l,fillColor:c})}};return i}function UM(e){var t=e.chart,n=e.translator,r=e.config,i=e.expando,o=e.h,a=e.data,s=e.style,l=vy(a,1)[0],c=function(e){var t=e.config,n=e.nodes.reduce(function(e,n){var r=t.main.getGroupByValue({data:n.data});return e[r]||(e[r]={sorting:Object.keys(e).length,items:[]}),e[r].items.push(n),e},{});return Object.keys(n).map(function(e){return n[e]}).sort(function(e,t){return e.sorting-t.sorting}).map(function(e){return e.items})}({config:r,nodes:l.node.nodes}),u=function(e){var t=e.chart,n=e.config,r=e.expando,i=e.h,o=e.context,a=e.groups,s=o.node.meta,l=o.resources,c=l.dataset,u=l.formatter,d=WM({config:n,h:i,context:o}),f=function(e){var t=e.dataset;return{dataset:{title:function(e,n){return t(e).field(n).title()}}}}({dataset:c}),h=a.map(function(e){var t=d.section({content:by((n.main.section({expando:r,h:i,nodes:e,dataset:c,formatter:u,meta:s,create:d,util:f})||[]).filter(function(e){var t;return null===(t=e.content)||void 0===t?void 0:t.length})).filter(Boolean)});return t.content=function(e){var t=e.config,n=e.content,r=n.find(function(e){return"color"===e.type&&e.filter}),i=r?n.filter(function(e){return"measure"!==e.type||e.survive.color||e.label!==r.label||e.value!==r.value}):n;return t.main.showDuplicateMeasures?i:i.reduce(function(e,t){var n=t.type,r=t.survive;if("measure"!==n||r.duplicate)return e.filtered.push(t),e;var i="".concat(t.label,"-").concat(t.value);return e.memory[i]||(e.memory[i]=!0,e.filtered.push(t)),e},{memory:{},filtered:[]}).filtered}({config:n,content:t.content}),t});return n.main.sections({chart:t,expando:r,h:i,nodes:o.node.nodes,dataset:c,formatter:u,meta:s,create:d,util:f,sections:h}),h.filter(Boolean)}({chart:t,config:r,expando:i,h:o,context:l,groups:c}),d=function(e){var t=e.translator,n=e.config,r=e.context,i=e.templates,o=n.main.layout,a=o.rows,s=o.grouping,l=o.single,c=function(e){var t=e.limit,n=e.grouping,r=e.single,i={count:0,overflow:0,index:{started:void 0,group:void 0},single:{found:!1,index:0}};return{process:function(e){var o=e.survive,a=e.visibility,s=e.index;if(a.force)return!0;if(i.single.found||(i.single.found=!0,i.single.index=s),r&&s!==i.single.index)return n?(i.index.started!==s&&i.index.group!==s&&(i.overflow++,i.index.group=s),!1):(i.overflow++,!1);if(i.count>=t&&(null==o||!o.visibility)){if(!n)return i.overflow++,!1;if(i.index.started!==s)return i.index.group!==s&&(i.overflow++,i.index.group=s),!1}return a.count&&i.count++,n&&(i.index.started=s),!0},overflow:function(){return i.overflow}}}({limit:a,grouping:s,single:"function"==typeof l?l({meta:r.node.meta,sections:i}):l}),u=i.reduce(function(e,t,n){var r=t.type,o=t.content;"section"===r&&(void 0===o?[]:o).forEach(function(t){c.process({survive:t.survive,visibility:t.visibility,index:n})&&e.push(t.content)});var a=n===i.length-1;return"divider"!==r||a||c.process({survive:t.survive,visibility:t.visibility,index:n})&&e.push(t.content),e},[]).filter(function(e){return e.length}),d=c.overflow();return d&&u.push(function(e){var t=e.translator,n=e.config,r=e.count,i=t?t.get("Object.ChartTooltip.NMore",r):"+".concat(r," more"),o=$M(i);return[{content:i,style:{"font-weight":"bold","text-align":n.rtl?"right":"left",direction:o},colspan:2}]}({translator:t,config:n,count:d})),u}({translator:n,config:r,context:l,templates:u});return d.length?function(e){var t=e.h,n=e.style;return e.rows.map(function(e){return t("tr",{},e.map(function(e){var r={style:py(py({},n.cell||{}),e.style||{}),class:e.class};return e.colspan&&(r.colspan=e.colspan),t("td",r,e.content)}))})}({h:o,style:s,rows:d}):function(e){var t=e.h;return t("tr",{},t("td",{style:{fontStyle:"italic",opacity:.75}},"Empty"))}({h:o})}var YM="collected";function KM(e){var t=e.chart,n=e.translator,r=e.config,i=e.expando,o=e.internal;if(!r.main.key)return!1;var a=tS(),s=OM({key:r.main.key,rtl:r.rtl,duration:r.duration}),l=r.main.events.tooltip,c=l.afterShow,u=l.afterHide,d=function(){var e=a.get(YM);return{expando:i,nodes:e.nodes,meta:e.meta}};return rb(!0,s,{settings:{filter:function(e){return zM({chart:t,config:r,expando:i,internal:o,nodes:e})},extract:function(e){return a.set(YM,e.node),e},content:function(e){var o=e.h,a=e.data,s=e.style;return UM({chart:t,translator:n,config:r,expando:i,h:o,data:a,style:s})},placement:function(e){var t=e.nodes;return r.main.placement({meta:t[0].meta})},afterShow:function(){return c(d())},afterHide:function(){return u(d())}},style:{arrow:{color:r.style.background},content:r.style}})}function GM(e){var t=e.config,n=t.legend.keys;if(!n.tooltip||!n.component)return!1;if("categorical"!==t.getColorSettings().type)return!1;var r=OM({key:n.tooltip,rtl:t.rtl,duration:t.duration});return rb(!0,r,{settings:{filter:function(e){return e.filter(function(e){return e.data&&e.key===n.component})},extract:function(e){return e},content:function(e){var t=e.h,n=e.data;return[t("tr",{},[t("td",{style:py(py({},e.style.cell||{}),{"font-weight":"bold","text-align":"left"}),colspan:2},n[0].node.data.label)])]},placement:"pointer"},style:{arrow:{color:t.style.background},content:t.style}})}function XM(e){var t=e.config.main.triggers.reduce(function(e,t){return t.keys.forEach(function(n){var r=t.distance||0;e.distance[n]=r,e.distances.includes(r)||e.distances.push(r),e.key[n]=!0,e.keys[r]||(e.keys[r]=[]),e.keys[r].push(n)}),e},{distance:{},distances:[],key:{},keys:{}});return function(e){return e.components.filter(function(e){return t.key[e.key]}).reduce(function(e,n){e.any=!0,e.components.push(n.key);var r=t.distance[n.key];return 0===r?e.position.push(n.key):(e.distances.includes(r)||(e.distances.push(r),e.distanceKeys[r]=[]),e.distanceKeys[r].push(n.key)),e},{any:!1,components:[],position:[],distances:[],distanceKeys:{}})}}var JM=function(){return!0};function ZM(e){var t=e.config.main.triggers.reduce(function(e,t){var n=t.filter;return t.keys.forEach(function(t){e[t]="function"==typeof n?n:JM}),e},{});return function(e){var n=t[e.key];return!n||n(e)}}function QM(e){var t=e.chart,n=e.event,r=e.component,i={absolute:{x:0,y:0},relative:{x:0,y:0}},o=t.element.getBoundingClientRect(),a=o.left,s=o.top;i.absolute.x=(void 0===n.clientX?Math.floor(n.srcEvent.clientX):n.clientX)-a,i.absolute.y=(void 0===n.clientY?Math.floor(n.srcEvent.clientY):n.clientY)-s;var l=t.component(r);if(l){var c=l.rect.computedInner;i.relative.x=i.absolute.x-c.x,i.relative.y=i.absolute.y-c.y}return i}function ek(e){var t=e.chart,n=e.filter,r=e.hits,i=e.position,o=[];if(r.position.length&&o.push.apply(o,by(t.shapesAt(i.absolute,{components:r.position.map(function(e){return{key:e}})}).filter(n))),!o.length&&r.distances.length){var a=[];r.distances.forEach(function(e){a.push.apply(a,by(t.shapesAt({cx:i.absolute.x,cy:i.absolute.y,r:e},{components:r.distanceKeys[e].map(function(e){return{key:e}})}).filter(n)))}),a.length&&o.push(function(e){var t=e.nodes,n=e.origin,r=t.find(function(e){return"path"===e.type});if(r)return r;var i=function(e){var t=Math.abs(n.x-(e.localBounds.x+e.localBounds.width/2)),r=Math.abs(n.y-(e.localBounds.y+e.localBounds.height/2));return Math.sqrt(t*t+r*r)};return t.slice(1).reduce(function(e,t){var n=i(t);return n<e.distance&&(e.distance=n,e.node=t),e},{node:t[0],distance:i(t[0])}).node}({nodes:a,origin:i.relative}))}return o}var tk="tooltipTap";function nk(e){var t=e.chart,n=e.config,r=e.expando,i=e.internal,o=e.facade,a=n.delay.tap,s=XM({config:n}),l=ZM({config:n}),c=n.main.triggers.reduce(function(e,t){return e.push.apply(e,by(t.keys)),e},[]);return{key:"event:".concat(tk),type:"Tap",options:{event:tk,enable:function(e,r){return!r||!!n.enable({event:r})&&t.componentsFromPoint({x:r.center.x,y:r.center.y}).filter(function(e){return-1!==c.indexOf(e.key)}).length>0}},recognizeWith:"tap",events:fy({},tk,function(e){if(e.preventDefault(),"mouse"!==e.pointerType&&!n.main.suppress({event:e})){var c=t.component(n.main.key);if(c&&c.show){var u=t.componentsFromPoint({x:e.center.x,y:e.center.y}),d=s({components:u});if(d.any){var f=vy(d.components,1)[0],h=QM({chart:t,event:e,component:f});i.set(NM,h);var p=ek({chart:t,filter:l,hits:d,position:h});if(p.length){var m=p[0].key;n.main.events.tooltip.beforeShow({expando:r,event:e,collectNodes:function(){return o.collectNodes({nodes:p})},meta:{triggerer:m,position:h}}).then(function(){c.emit("show",e,{nodes:p,delay:a})}).catch(function(){})}else c.emit("hide")}else c.emit("hide")}}})}}function rk(e){var t=e.chart,n=e.config,r=e.expando,i=e.internal,o=e.facade,a=XM({config:n}),s=ZM({config:n}),l=function(e){var t=e.config,n=e.expando,r=e.internal,i=e.facade,o=t.main.events.tooltip.beforeShow,a=t.delay.hover,s={ongoing:{},latest:void 0};return function(e){var t=e.event,l=e.tooltip,c=e.nodes,u=function(e){var t=e.nodes;return JSON.stringify(t.map(function(e){var t;return{key:e.key,bounds:e.bounds,value:null===(t=e.data)||void 0===t?void 0:t.value}}))}({nodes:c});if(!s.ongoing[u]){s.ongoing[u]=!0,s.latest=u;var d=c[0].key;o({expando:n,event:t,collectNodes:function(){return i.collectNodes({nodes:c})},meta:{triggerer:d,position:r.get(NM)}}).then(function(){u===s.latest&&l.emit("show",t,{nodes:c,delay:a})}).catch(function(){l.emit("show")}).finally(function(){delete s.ongoing[u],u===s.latest&&(s.latest=void 0)})}}}({config:n,expando:r,internal:i,facade:o}),c=[n.main.key,n.legend.keys.tooltip].filter(Boolean),u=function(){c.forEach(function(e){var n=t.component(e);null!=n&&n.show&&n.emit("hide")})};return{type:"native",events:{mousemove:function(e){if(n.enable({event:e})&&!n.main.suppress({event:e})){var r=t.componentsFromPoint({x:e.clientX,y:e.clientY}),o=t.component(n.main.key);if(o&&o.show){var c=a({components:r});if(c.any){var u=vy(c.components,1)[0],d=QM({chart:t,event:e,component:u});i.set(NM,d);var f=ek({chart:t,filter:s,hits:c,position:d});if(!f.length)return void o.emit("hide");l({event:e,tooltip:o,nodes:f})}else o.emit("hide")}var h=n.legend;if(h.keys.tooltip&&h.keys.component){var p=t.component(h.keys.tooltip);p&&p.show&&(r.some(function(e){return e.key===h.keys.component})?p.emit("show",e):p.emit("hide"))}}},mouseup:function(e){2===e.button&&u()},mouseleave:function(){n.main.events.interaction.mouseleave({expando:r}),u()},wheel:function(){u()}}}}function ik(e){var t=e.chart,n=e.translator,r=function(e){var t=e.config;return rb(!0,{},{rtl:!1,enable:qM.FALSE,getColorSettings:qM.OBJECT,style:{fontSize:void 0,fontFamily:void 0,color:void 0,background:void 0},delay:{hover:500,tap:0},duration:8e3,main:{key:void 0,suppress:qM.FALSE,getGroupByValue:qM.NOOP,collectibles:[],triggers:[],placement:function(){return{type:"bounds"}},placements:{collectible:"combine"},showDuplicateMeasures:!1,layout:{rows:7,grouping:!1,single:!1},section:qM.ARRAY,sections:qM.NOOP,events:{tooltip:{beforeShow:function(){return Promise.resolve()},afterShow:qM.NOOP,afterHide:qM.NOOP},interaction:{mouseleave:qM.NOOP}}},legend:{keys:{tooltip:void 0,component:void 0}}},void 0===t?{}:t)}({config:e.config}),i=tS(),o=tS(),a={components:void 0,interactions:void 0};return{getComponents:function(){return a.components||(a.components=function(e){var t=e.config;return[KM({chart:e.chart,translator:e.translator,config:t,expando:e.expando,internal:e.internal}),GM({config:t})].filter(Boolean)}({chart:t,translator:n,config:r,expando:i,internal:o})),a.components},getInteractions:function(){return a.interactions||(a.interactions=function(e){var t=e.chart,n=e.config,r=e.expando,i=e.internal,o=function(e){var t=e.chart,n=e.config,r=e.expando,i=e.internal;return{collectNodes:function(e){var o=e.nodes,a=vy(zM({chart:t,config:n,expando:r,internal:i,nodes:o}),1)[0];return(void 0===a?{nodes:[]}:a).nodes}}}({chart:t,config:n,expando:r,internal:i});return{gestures:[nk({chart:t,config:n,expando:r,internal:i,facade:o})],native:rk({chart:t,config:n,expando:r,internal:i,facade:o})}}({chart:t,config:r,expando:i,internal:o})),a.interactions},expando:i}}var ok={created(){this.state={}},beforeUpdate(){this.state={}},beforeRender({size:e}){this.state.ticks=this.scale.ticks({distance:e.width}).filter(e=>!e.isMinor),"linear"===this.scale.type&&function(e,t){const[,n]=e.domain();for(let e=0;e<t.length;e++){const r=t[e],i=t[e+1];r.data={},i||1===r.end?i?(r.data.start=r.value,r.data.end=i.value,r.end=i.position):(r.data.start=r.value,r.data.end=r.value):(r.data.start=r.value,r.data.end=n,r.end=1)}}(this.scale,this.state.ticks)},render(){const e=this.scale.data().fields.length?this.scale.data().fields[0].id():"",{ticks:t}=this.state,n=t.map(t=>({type:"rect",fill:"none",data:{source:{field:e},value:[t.data.start,t.data.end]},x:t.start*this.rect.width,y:0,width:(t.end-t.start)*this.rect.width,height:this.rect.height}));if(t.length&&t[0].start>0){const r=t[0];n.unshift({type:"rect",fill:"none",data:{source:{field:e},value:[this.scale.domain()[0],r.data.start]},x:0,y:0,width:r.start*this.rect.width,height:this.rect.height})}return n}};function ak(e,t=1){if(t%2==0)return e;let n=Math.round(e);return e-n>0?n+=.5:n-=.5,n}function sk(e,t){return e.x<t.x?e.x+e.width>=t.x:t.x+t.width>=e.x}function lk(e,t){const{localProps:{size:n},props:{anchor:r}}=t,i=function({props:e,localProps:{size:t},style:n,renderer:r}){const i=e.label.padding,o=Math.max(0,Math.min(e.label.justify,1)),a=Math.max(0,Math.min(e.label.align,1)),s=e=>r.measureText({text:e,fontSize:n.label.fontSize,fontFamily:n.label.fontFamily});return{resolve:(e,r)=>{const l="string"==typeof e.label?e.label:"",c=s(l);let{x:u,width:d}=r;e.start===e.end&&(d=c.width+2*i,1===e.end&&(u-=d));const f={x:u+i,y:i,width:d-2*i,height:t.height-2*i},h=s(`${l[0]}…`).width,p=Math.max(0,f.width-c.width),m=Math.max(0,f.height-c.height),g=o*p,y=a*m;return{show:f.width>=Math.min(h,c.width),text:l,dx:g,dy:y,rect:f,style:n.label,segment:{x:u+g,width:c.width+2*i},tickValue:e.value}}}}(t),o=function({localProps:{size:e},style:t,scale:n,props:r}){const[i,o]=n.domain(),a=Math.max(0,Math.min(1,r.guideLine.major.justify));return{resolve:(n,r)=>{const s=a*r.width,l=ak(r.x+s,t.majorGuideLine.strokeWidth);return{show:n.value>=i&&n.value<=o,x1:l,y1:0,x2:l,y2:ak(e.height,t.majorGuideLine.strokeWidth),style:t.majorGuideLine,tickValue:n.value}}}}(t),a=e.map(e=>{const t=function(e,t,n){const r=Math.abs(Math.max(e.start,0)-Math.min(e.end,1))*t.width;return{x:Math.max(e[n],0)*t.width,y:0,width:r,height:t.height}}(e,n,r);return{rect:t,label:i.resolve(e,t),guideLine:o.resolve(e,t)}});return function(e,t){const n=e.length;if(n<2)return;const r=e[n-1],i=t[n-1].label;if(r&&r.start===r.end)for(let e=n-2;e>-1;e--){const n=t[e].label;n.show=n.show&&!sk(n.segment,i.segment)}}(e,a),a}function ck(e,t){const n=function({localProps:{size:e},props:t,style:n}){return{resolve:r=>{const i=Math.max(e.height-t.guideLine.minor.size,0)*Math.max(0,Math.min(t.guideLine.minor.align,1)),o=ak(r.position*e.width,n.minorGuideLine.strokeWidth);return{guideLine:{show:!0,x1:o,y1:ak(i,n.minorGuideLine.strokeWidth),x2:o,y2:ak(t.guideLine.minor.size+i,n.minorGuideLine.strokeWidth),style:n.minorGuideLine}}}}}(t);return t.props.guideLine.minor.show?e.map(n.resolve):[]}function uk(e){return e.filter(e=>e.show).map(e=>kg({strokeWidth:1},e.style,{type:"line",x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,tickValue:e.tickValue}))}var dk={require:["renderer"],defaultSettings:{layout:{displayOrder:0,prioOrder:0},settings:{anchor:"start",label:{show:!0,padding:4,align:0,justify:0},line:{show:!0},guideLine:{major:{justify:0},minor:{show:!0,size:4,align:0}}},style:{label:"$label",line:"$guide-line",majorGuideLine:"$guide-line",minorGuideLine:"$guide-line"}},preferredSize:()=>({size:30,edgeBleed:{left:1,right:1}}),init(){this.props=this.settings.settings,this.localProps={},this.state={major:[],minor:[]}},created(){this.init()},beforeUpdate(){this.init()},beforeRender({size:e}){this.localProps.size=e;const t=this.scale.ticks({distance:e.width}),n=t.filter(e=>!e.isMinor),r=t.filter(e=>e.isMinor);this.state.line=function({localProps:{size:e},style:t,props:n}){const r=ak(1,t.line.strokeWidth);return{show:n.line.show,x1:ak(0,t.line.strokeWidth),y1:r,x2:ak(e.width,t.line.strokeWidth),y2:r,style:t.line}}(this),this.state.major=lk(n,this),this.state.minor=ck(r,this)},render(){return[...uk([this.state.line]),...(e=this.state.major.map(e=>e.label),e.filter(e=>e.show).map(e=>kg({},e.style,{type:"text",x:e.rect.x,y:e.rect.y,dx:e.dx,dy:e.dy,maxWidth:e.rect.width,text:e.text,title:e.text,baseline:"text-before-edge",tickValue:e.tickValue}))),...uk(this.state.major.map(e=>e.guideLine)),...uk(this.state.minor.map(e=>e.guideLine))];var e}};function fk(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function hk(e){return 1===e.length&&(e=function(e){return function(t,n){return fk(e(t),n)}}(e)),{left:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)<0?r=o+1:i=o}return r},right:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)>0?i=o:r=o+1}return r}}}var pk=hk(fk).right,mk=Math.sqrt(50),gk=Math.sqrt(10),yk=Math.sqrt(2);function vk(e,t,n){var r=(t-e)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=mk?10:o>=gk?5:o>=yk?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=mk?10:o>=gk?5:o>=yk?2:1)}function bk(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=mk?i*=10:o>=gk?i*=5:o>=yk&&(i*=2),t<e?-i:i}function xk(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var Sk="$";function wk(){}function Mk(e,t){var n=new wk;if(e instanceof wk)e.each(function(e,t){n.set(t,e)});else if(Array.isArray(e)){var r,i=-1,o=e.length;if(null==t)for(;++i<o;)n.set(i,e[i]);else for(;++i<o;)n.set(t(r=e[i],i,e),r)}else if(e)for(var a in e)n.set(a,e[a]);return n}function kk(){}wk.prototype=Mk.prototype={constructor:wk,has:function(e){return Sk+e in this},get:function(e){return this[Sk+e]},set:function(e,t){return this[Sk+e]=t,this},remove:function(e){var t=Sk+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===Sk&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===Sk&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===Sk&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===Sk&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===Sk&&++e;return e},empty:function(){for(var e in this)if(e[0]===Sk)return!1;return!0},each:function(e){for(var t in this)t[0]===Sk&&e(this[t],t.slice(1),this)}};var Ck=Mk.prototype;kk.prototype={constructor:kk,has:Ck.has,add:function(e){return this[Sk+(e+="")]=e,this},remove:Ck.remove,clear:Ck.clear,values:Ck.keys,size:Ck.size,empty:Ck.empty,each:Ck.each};var qk=Array.prototype,Ek=qk.map,Dk=qk.slice;function Tk(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Ok(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Nk(){}var Ak=.7,_k=1/Ak,Ik="\\s*([+-]?\\d+)\\s*",Lk="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Pk="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Rk=/^#([0-9a-f]{3,8})$/,zk=new RegExp("^rgb\\("+[Ik,Ik,Ik]+"\\)$"),Fk=new RegExp("^rgb\\("+[Pk,Pk,Pk]+"\\)$"),jk=new RegExp("^rgba\\("+[Ik,Ik,Ik,Lk]+"\\)$"),Bk=new RegExp("^rgba\\("+[Pk,Pk,Pk,Lk]+"\\)$"),Vk=new RegExp("^hsl\\("+[Lk,Pk,Pk]+"\\)$"),Hk=new RegExp("^hsla\\("+[Lk,Pk,Pk,Lk]+"\\)$"),$k={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Wk(){return this.rgb().formatHex()}function Uk(){return this.rgb().formatRgb()}function Yk(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Rk.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Kk(t):3===n?new Jk(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Gk(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Gk(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=zk.exec(e))?new Jk(t[1],t[2],t[3],1):(t=Fk.exec(e))?new Jk(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=jk.exec(e))?Gk(t[1],t[2],t[3],t[4]):(t=Bk.exec(e))?Gk(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Vk.exec(e))?tC(t[1],t[2]/100,t[3]/100,1):(t=Hk.exec(e))?tC(t[1],t[2]/100,t[3]/100,t[4]):$k.hasOwnProperty(e)?Kk($k[e]):"transparent"===e?new Jk(NaN,NaN,NaN,0):null}function Kk(e){return new Jk(e>>16&255,e>>8&255,255&e,1)}function Gk(e,t,n,r){return r<=0&&(e=t=n=NaN),new Jk(e,t,n,r)}function Xk(e,t,n,r){return 1===arguments.length?function(e){return e instanceof Nk||(e=Yk(e)),e?new Jk((e=e.rgb()).r,e.g,e.b,e.opacity):new Jk}(e):new Jk(e,t,n,null==r?1:r)}function Jk(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Zk(){return"#"+eC(this.r)+eC(this.g)+eC(this.b)}function Qk(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function eC(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function tC(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new rC(e,t,n,r)}function nC(e){if(e instanceof rC)return new rC(e.h,e.s,e.l,e.opacity);if(e instanceof Nk||(e=Yk(e)),!e)return new rC;if(e instanceof rC)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new rC(a,s,l,e.opacity)}function rC(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function iC(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function oC(e){return function(){return e}}function aC(e){return 1===(e=+e)?sC:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):oC(isNaN(t)?n:t)}}function sC(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):oC(isNaN(e)?t:e)}Tk(Nk,Yk,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:Wk,formatHex:Wk,formatHsl:function(){return nC(this).formatHsl()},formatRgb:Uk,toString:Uk}),Tk(Jk,Xk,Ok(Nk,{brighter:function(e){return e=null==e?_k:Math.pow(_k,e),new Jk(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?Ak:Math.pow(Ak,e),new Jk(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){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:Zk,formatHex:Zk,formatRgb:Qk,toString:Qk})),Tk(rC,function(e,t,n,r){return 1===arguments.length?nC(e):new rC(e,t,n,null==r?1:r)},Ok(Nk,{brighter:function(e){return e=null==e?_k:Math.pow(_k,e),new rC(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?Ak:Math.pow(Ak,e),new rC(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Jk(iC(e>=240?e-240:e+120,i,r),iC(e,i,r),iC(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var lC=function e(t){var n=aC(t);function r(e,t){var r=n((e=Xk(e)).r,(t=Xk(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=sC(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function cC(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,i=t.slice();return function(o){for(n=0;n<r;++n)i[n]=e[n]*(1-o)+t[n]*o;return i}}function uC(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=yC(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<i;++n)a[n]=o[n](e);return a}}function dC(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function fC(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function hC(e,t){var n,r={},i={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=yC(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}var pC=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,mC=new RegExp(pC.source,"g");function gC(e,t){var n,r,i,o=pC.lastIndex=mC.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=pC.exec(e))&&(r=mC.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:fC(n,r)})),o=mC.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function yC(e,t){var n,r=typeof t;return null==t||"boolean"===r?oC(t):("number"===r?fC:"string"===r?(n=Yk(t))?(t=n,lC):gC:t instanceof Yk?lC:t instanceof Date?dC:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?cC:Array.isArray(t)?uC:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?hC:fC)(e,t)}function vC(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function bC(e){return+e}var xC=[0,1];function SC(e){return e}function wC(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function MC(e){var t,n=e[0],r=e[e.length-1];return n>r&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function kC(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=wC(i,r),o=n(a,o)):(r=wC(r,i),o=n(o,a)),function(e){return o(r(e))}}function CC(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=wC(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(t){var n=pk(e,t,1,r)-1;return o[n](i[n](t))}}function qC(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function EC(e,t){return function(){var e,t,n,r,i,o,a=xC,s=xC,l=yC,c=SC;function u(){return r=Math.min(a.length,s.length)>2?CC:kC,i=o=null,d}function d(t){return isNaN(t=+t)?n:(i||(i=r(a.map(e),s,l)))(e(c(t)))}return d.invert=function(n){return c(t((o||(o=r(s,a.map(e),fC)))(n)))},d.domain=function(e){return arguments.length?(a=Ek.call(e,bC),c===SC||(c=MC(a)),u()):a.slice()},d.range=function(e){return arguments.length?(s=Dk.call(e),u()):s.slice()},d.rangeRound=function(e){return s=Dk.call(e),l=vC,u()},d.clamp=function(e){return arguments.length?(c=e?MC(a):SC,d):c!==SC},d.interpolate=function(e){return arguments.length?(l=e,u()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,u()}}()(e,t)}function DC(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function TC(e){return(e=DC(Math.abs(e)))?e[1]:NaN}var OC,NC=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function AC(e){if(!(t=NC.exec(e)))throw new Error("invalid format: "+e);var t;return new _C({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function _C(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function IC(e,t){var n=DC(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}AC.prototype=_C.prototype,_C.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var LC={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return IC(100*e,t)},r:IC,s:function(e,t){var n=DC(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(OC=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+DC(e,Math.max(0,t+o-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function PC(e){return e}var RC,zC,FC,jC=Array.prototype.map,BC=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function VC(e){var t=void 0===e.grouping||void 0===e.thousands?PC:function(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}(jC.call(e.grouping,Number),e.thousands+""),n=void 0===e.currency?"":e.currency[0]+"",r=void 0===e.currency?"":e.currency[1]+"",i=e.decimal+"",o=void 0===e.numerals?PC:function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}(jC.call(e.numerals,String)),a=void 0===e.percent?"%":e.percent+"",s=e.minus+"",l=void 0===e.nan?"NaN":e.nan+"";function c(e){var c=(e=AC(e)).fill,u=e.align,d=e.sign,f=e.symbol,h=e.zero,p=e.width,m=e.comma,g=e.precision,y=e.trim,v=e.type;"n"===v?(m=!0,v="g"):LC[v]||(void 0===g&&(g=12),y=!0,v="g"),(h||"0"===c&&"="===u)&&(h=!0,c="0",u="=");var b="$"===f?n:"#"===f&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",x="$"===f?r:/[%p]/.test(v)?a:"",S=LC[v],w=/[defgprs%]/.test(v);function M(e){var n,r,a,f=b,M=x;if("c"===v)M=S(e)+M,e="";else{var k=(e=+e)<0||1/e<0;if(e=isNaN(e)?l:S(Math.abs(e),g),y&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r<n;++r)switch(e[r]){case".":i=t=r;break;case"0":0===i&&(i=r),t=r;break;default:if(!+e[r])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),k&&0===+e&&"+"!==d&&(k=!1),f=(k?"("===d?d:s:"-"===d||"("===d?"":d)+f,M=("s"===v?BC[8+OC/3]:"")+M+(k&&"("===d?")":""),w)for(n=-1,r=e.length;++n<r;)if(48>(a=e.charCodeAt(n))||a>57){M=(46===a?i+e.slice(n+1):e.slice(n))+M,e=e.slice(0,n);break}}m&&!h&&(e=t(e,1/0));var C=f.length+e.length+M.length,q=C<p?new Array(p-C+1).join(c):"";switch(m&&h&&(e=t(q+e,q.length?p-M.length:1/0),q=""),u){case"<":e=f+e+M+q;break;case"=":e=f+q+e+M;break;case"^":e=q.slice(0,C=q.length>>1)+f+e+M+q.slice(C);break;default:e=q+f+e+M}return o(e)}return g=void 0===g?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),M.toString=function(){return e+""},M}return{format:c,formatPrefix:function(e,t){var n=c(((e=AC(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(TC(t)/3))),i=Math.pow(10,-r),o=BC[8+r/3];return function(e){return n(i*e)+o}}}}function HC(e,t,n,r){var i,o=bk(e,t,n);switch((r=AC(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(TC(t)/3)))-TC(Math.abs(e)))}(o,a))||(r.precision=i),FC(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,TC(t)-TC(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(e){return Math.max(0,-TC(Math.abs(e)))}(o))||(r.precision=i-2*("%"===r.type))}return zC(r)}function $C(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){var r,i,o,a,s=-1;if(n=+n,(e=+e)===(t=+t)&&n>0)return[e];if((r=t<e)&&(i=e,e=t,t=i),0===(a=vk(e,t,n))||!isFinite(a))return[];if(a>0)for(e=Math.ceil(e/a),t=Math.floor(t/a),o=new Array(i=Math.ceil(t-e+1));++s<i;)o[s]=(e+s)*a;else for(e=Math.floor(e*a),t=Math.ceil(t*a),o=new Array(i=Math.ceil(e-t+1));++s<i;)o[s]=(e-s)/a;return r&&o.reverse(),o}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return HC(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,i=t(),o=0,a=i.length-1,s=i[o],l=i[a];return l<s&&(r=s,s=l,l=r,r=o,o=a,a=r),(r=vk(s,l,n))>0?r=vk(s=Math.floor(s/r)*r,l=Math.ceil(l/r)*r,n):r<0&&(r=vk(s=Math.ceil(s*r)/r,l=Math.floor(l*r)/r,n)),r>0?(i[o]=Math.floor(s/r)*r,i[a]=Math.ceil(l/r)*r,t(i)):r<0&&(i[o]=Math.ceil(s*r)/r,i[a]=Math.floor(l*r)/r,t(i)),e},e}function WC(){var e=EC(SC,SC);return e.copy=function(){return qC(e,WC())},xk.apply(e,arguments),$C(e)}!function(e){RC=VC(e),zC=RC.format,FC=RC.formatPrefix}({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});var UC=new Date,YC=new Date;function KC(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=function(t){return e(t=new Date(+t)),t},i.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},i.round=function(e){var t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},i.range=function(n,r,o){var a,s=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return s;do{s.push(a=new Date(+n)),t(n,o),e(n)}while(a<n&&n<r);return s},i.filter=function(n){return KC(function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););})},n&&(i.count=function(t,r){return UC.setTime(+t),YC.setTime(+r),e(UC),e(YC),Math.floor(n(UC,YC))},i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?function(t){return r(t)%e===0}:function(t){return i.count(0,t)%e===0}):i:null}),i}var GC=KC(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});GC.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?KC(function(t){t.setTime(Math.floor(t/e)*e)},function(t,n){t.setTime(+t+n*e)},function(t,n){return(n-t)/e}):GC:null},GC.range;var XC=6e4,JC=36e5,ZC=864e5,QC=6048e5,eq=KC(function(e){e.setTime(e-e.getMilliseconds())},function(e,t){e.setTime(+e+1e3*t)},function(e,t){return(t-e)/1e3},function(e){return e.getUTCSeconds()});eq.range;var tq=KC(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*XC)/ZC},function(e){return e.getDate()-1});function nq(e){return KC(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+7*t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*XC)/QC})}tq.range;var rq=nq(0),iq=nq(1),oq=nq(2),aq=nq(3),sq=nq(4),lq=nq(5),cq=nq(6);rq.range,iq.range,oq.range,aq.range,sq.range,lq.range,cq.range;var uq=KC(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});uq.every=function(e){return isFinite(e=Math.floor(e))&&e>0?KC(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n*e)}):null},uq.range;var dq=KC(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+t*XC)},function(e,t){return(t-e)/XC},function(e){return e.getUTCMinutes()});dq.range;var fq=KC(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+t*JC)},function(e,t){return(t-e)/JC},function(e){return e.getUTCHours()});fq.range;var hq=KC(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/ZC},function(e){return e.getUTCDate()-1});function pq(e){return KC(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+7*t)},function(e,t){return(t-e)/QC})}hq.range;var mq=pq(0),gq=pq(1),yq=pq(2),vq=pq(3),bq=pq(4),xq=pq(5),Sq=pq(6);mq.range,gq.range,yq.range,vq.range,bq.range,xq.range,Sq.range;var wq=KC(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCMonth(e.getUTCMonth()+t)},function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())},function(e){return e.getUTCMonth()});wq.range;var Mq=KC(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});function kq(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Cq(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function qq(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}Mq.every=function(e){return isFinite(e=Math.floor(e))&&e>0?KC(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null},Mq.range;var Eq,Dq,Tq={"-":"",_:" ",0:"0"},Oq=/^\s*\d+/,Nq=/^%/,Aq=/[\\^$*+?|[\]().{}]/g;function _q(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function Iq(e){return e.replace(Aq,"\\$&")}function Lq(e){return new RegExp("^(?:"+e.map(Iq).join("|")+")","i")}function Pq(e){for(var t={},n=-1,r=e.length;++n<r;)t[e[n].toLowerCase()]=n;return t}function Rq(e,t,n){var r=Oq.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function zq(e,t,n){var r=Oq.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Fq(e,t,n){var r=Oq.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function jq(e,t,n){var r=Oq.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Bq(e,t,n){var r=Oq.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Vq(e,t,n){var r=Oq.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Hq(e,t,n){var r=Oq.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function $q(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Wq(e,t,n){var r=Oq.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function Uq(e,t,n){var r=Oq.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Yq(e,t,n){var r=Oq.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Kq(e,t,n){var r=Oq.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Gq(e,t,n){var r=Oq.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Xq(e,t,n){var r=Oq.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Jq(e,t,n){var r=Oq.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Zq(e,t,n){var r=Oq.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Qq(e,t,n){var r=Oq.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function eE(e,t,n){var r=Nq.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function tE(e,t,n){var r=Oq.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function nE(e,t,n){var r=Oq.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function rE(e,t){return _q(e.getDate(),t,2)}function iE(e,t){return _q(e.getHours(),t,2)}function oE(e,t){return _q(e.getHours()%12||12,t,2)}function aE(e,t){return _q(1+tq.count(uq(e),e),t,3)}function sE(e,t){return _q(e.getMilliseconds(),t,3)}function lE(e,t){return sE(e,t)+"000"}function cE(e,t){return _q(e.getMonth()+1,t,2)}function uE(e,t){return _q(e.getMinutes(),t,2)}function dE(e,t){return _q(e.getSeconds(),t,2)}function fE(e){var t=e.getDay();return 0===t?7:t}function hE(e,t){return _q(rq.count(uq(e)-1,e),t,2)}function pE(e){var t=e.getDay();return t>=4||0===t?sq(e):sq.ceil(e)}function mE(e,t){return e=pE(e),_q(sq.count(uq(e),e)+(4===uq(e).getDay()),t,2)}function gE(e){return e.getDay()}function yE(e,t){return _q(iq.count(uq(e)-1,e),t,2)}function vE(e,t){return _q(e.getFullYear()%100,t,2)}function bE(e,t){return _q((e=pE(e)).getFullYear()%100,t,2)}function xE(e,t){return _q(e.getFullYear()%1e4,t,4)}function SE(e,t){var n=e.getDay();return _q((e=n>=4||0===n?sq(e):sq.ceil(e)).getFullYear()%1e4,t,4)}function wE(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+_q(t/60|0,"0",2)+_q(t%60,"0",2)}function ME(e,t){return _q(e.getUTCDate(),t,2)}function kE(e,t){return _q(e.getUTCHours(),t,2)}function CE(e,t){return _q(e.getUTCHours()%12||12,t,2)}function qE(e,t){return _q(1+hq.count(Mq(e),e),t,3)}function EE(e,t){return _q(e.getUTCMilliseconds(),t,3)}function DE(e,t){return EE(e,t)+"000"}function TE(e,t){return _q(e.getUTCMonth()+1,t,2)}function OE(e,t){return _q(e.getUTCMinutes(),t,2)}function NE(e,t){return _q(e.getUTCSeconds(),t,2)}function AE(e){var t=e.getUTCDay();return 0===t?7:t}function _E(e,t){return _q(mq.count(Mq(e)-1,e),t,2)}function IE(e){var t=e.getUTCDay();return t>=4||0===t?bq(e):bq.ceil(e)}function LE(e,t){return e=IE(e),_q(bq.count(Mq(e),e)+(4===Mq(e).getUTCDay()),t,2)}function PE(e){return e.getUTCDay()}function RE(e,t){return _q(gq.count(Mq(e)-1,e),t,2)}function zE(e,t){return _q(e.getUTCFullYear()%100,t,2)}function FE(e,t){return _q((e=IE(e)).getUTCFullYear()%100,t,2)}function jE(e,t){return _q(e.getUTCFullYear()%1e4,t,4)}function BE(e,t){var n=e.getUTCDay();return _q((e=n>=4||0===n?bq(e):bq.ceil(e)).getUTCFullYear()%1e4,t,4)}function VE(){return"+0000"}function HE(){return"%"}function $E(e){return+e}function WE(e){return Math.floor(+e/1e3)}!function(e){Eq=function(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=Lq(i),u=Pq(i),d=Lq(o),f=Pq(o),h=Lq(a),p=Pq(a),m=Lq(s),g=Pq(s),y=Lq(l),v=Pq(l),b={a:function(e){return a[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:rE,e:rE,f:lE,g:bE,G:SE,H:iE,I:oE,j:aE,L:sE,m:cE,M:uE,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:$E,s:WE,S:dE,u:fE,U:hE,V:mE,w:gE,W:yE,x:null,X:null,y:vE,Y:xE,Z:wE,"%":HE},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:ME,e:ME,f:DE,g:FE,G:BE,H:kE,I:CE,j:qE,L:EE,m:TE,M:OE,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:$E,s:WE,S:NE,u:AE,U:_E,V:LE,w:PE,W:RE,x:null,X:null,y:zE,Y:jE,Z:VE,"%":HE},S={a:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.w=p[r[0].toLowerCase()],n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f[r[0].toLowerCase()],n+r[0].length):-1},b:function(e,t,n){var r=y.exec(t.slice(n));return r?(e.m=v[r[0].toLowerCase()],n+r[0].length):-1},B:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.m=g[r[0].toLowerCase()],n+r[0].length):-1},c:function(e,n,r){return k(e,t,n,r)},d:Yq,e:Yq,f:Qq,g:Hq,G:Vq,H:Gq,I:Gq,j:Kq,L:Zq,m:Uq,M:Xq,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u[r[0].toLowerCase()],n+r[0].length):-1},q:Wq,Q:tE,s:nE,S:Jq,u:zq,U:Fq,V:jq,w:Rq,W:Bq,x:function(e,t,r){return k(e,n,t,r)},X:function(e,t,n){return k(e,r,t,n)},y:Hq,Y:Vq,Z:$q,"%":eE};function w(e,t){return function(n){var r,i,o,a=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(i=Tq[r=e.charAt(++s)])?r=e.charAt(++s):i="e"===r?" ":"0",(o=t[r])&&(r=o(n,i)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function M(e,t){return function(n){var r,i,o=qq(1900,void 0,1);if(k(o,e,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(t&&!("Z"in o)&&(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=Cq(qq(o.y,0,1))).getUTCDay(),r=i>4||0===i?gq.ceil(r):gq(r),r=hq.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=kq(qq(o.y,0,1))).getDay(),r=i>4||0===i?iq.ceil(r):iq(r),r=tq.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?Cq(qq(o.y,0,1)).getUTCDay():kq(qq(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Cq(o)):kq(o)}}function k(e,t,n,r){for(var i,o,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=S[i in Tq?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=w(n,b),b.X=w(r,b),b.c=w(t,b),x.x=w(n,x),x.X=w(r,x),x.c=w(t,x),{format:function(e){var t=w(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=M(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=w(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=M(e+="",!0);return t.toString=function(){return e},t}}}(e),Eq.format,Eq.parse,Dq=Eq.utcFormat,Eq.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var UE=1e3,YE=6e4,KE=36e5,GE=864e5,XE=2592e6,JE=31536e6;function ZE(e){return new Date(e)}function QE(e){return e instanceof Date?+e:+new Date(+e)}function eD(e,t,n,r,i,o,a,s,l){var c=EC(SC,SC),u=c.invert,d=c.domain,f=l(".%L"),h=l(":%S"),p=l("%I:%M"),m=l("%I %p"),g=l("%a %d"),y=l("%b %d"),v=l("%B"),b=l("%Y"),x=[[a,1,UE],[a,5,5e3],[a,15,15e3],[a,30,3e4],[o,1,YE],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,KE],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,GE],[r,2,1728e5],[n,1,6048e5],[t,1,XE],[t,3,7776e6],[e,1,JE]];function S(s){return(a(s)<s?f:o(s)<s?h:i(s)<s?p:r(s)<s?m:t(s)<s?n(s)<s?g:y:e(s)<s?v:b)(s)}function w(t,n,r,i){if(null==t&&(t=10),"number"==typeof t){var o=Math.abs(r-n)/t,a=hk(function(e){return e[2]}).right(x,o);a===x.length?(i=bk(n/JE,r/JE,t),t=e):a?(i=(a=x[o/x[a-1][2]<x[a][2]/o?a-1:a])[1],t=a[0]):(i=Math.max(bk(n,r,t),1),t=s)}return null==i?t:t.every(i)}return c.invert=function(e){return new Date(u(e))},c.domain=function(e){return arguments.length?d(Ek.call(e,QE)):d().map(ZE)},c.ticks=function(e,t){var n,r=d(),i=r[0],o=r[r.length-1],a=o<i;return a&&(n=i,i=o,o=n),n=(n=w(e,i,o,t))?n.range(i,o+1):[],a?n.reverse():n},c.tickFormat=function(e,t){return null==t?S:l(t)},c.nice=function(e,t){var n=d();return(e=w(e,n[0],n[n.length-1],t))?d(function(e,t){var n,r=0,i=(e=e.slice()).length-1,o=e[r],a=e[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),e[r]=t.floor(o),e[i]=t.ceil(a),e}(n,e)):c},c.copy=function(){return qC(c,eD(e,t,n,r,i,o,a,s,l))},c}function tD(){return xk.apply(eD(Mq,wq,mq,hq,fq,dq,eq,GC,Dq).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function nD(e,t){return e&&t&&e.qTicks.length===t.qTicks.length&&e.qTicks.every((e,n)=>e.qStart===t.qTicks[n].qStart&&e.qEnd===t.qTicks[n].qEnd)}function rD(e){return e.qTags.indexOf("$qualified")>-1}function iD({qAxis:e}){const t=[],n=[];for(let r=0;r<e.length;r++){const i=r+1,o=e[r],a=e[i];nD(o,a)?(rD(a)?(t.push(i),n.push(r)):(t.push(r),n.push(i)),r++):(t.push(r),n.push(r))}return{qualified:t,nonQualified:n}}function oD({qualifiedMeta:e,nonQualifiedMeta:t}){return{resolve(n){let r,i=NaN,o=NaN,a=NaN,s=!1;for(let l=e.length-1;l>=0;l--){const c=e[l];if(c.queries.outer(n)){const e=t[l+1];if(i=c.index,r=l,c.attrs.isDayOrShorter()&&c.queries.canFitHalfDayTicks(n)){o="auto",s=!0;break}if(e&&e.queries.inner(n)){o=e.index;const r=t[l+2];r&&r.queries.minor(n)&&(a=r.index);break}}}if(!Number.isNaN(i)&&Number.isNaN(o)&&"auto"!==o){o=i,i=NaN;const e=t[r+1];e&&e.queries.minor(n)&&(a=e.index)}else Number.isNaN(i)&&(i="auto",o="auto");return{outer:i,inner:o,minor:a,isDayOrShorter:s}}}}function aD({qTicks:e,measureText:t=()=>({width:0}),cache:n={},scale:r}){const i=n;return{isDayOrShorter:()=>(i.isDayOrShorter=e.length>0&&Math.abs(e[0].qStart-e[0].qEnd)<=1,i.isDayOrShorter),count:()=>e.length,maxRange:()=>(i.maxRange=e.length?Math.max(...e.map(e=>Math.abs(r(e.qStart)-r(e.qEnd)))):0,i.maxRange),rangeAndWidth(){const n=r.clamp();return r.clamp(!1),i.rangeAndWidth=e.map(e=>({range:Math.abs(r(e.qStart)-r(e.qEnd)),width:t(`${e.qText}`).width+16})),r.clamp(n),i.rangeAndWidth}}}function sD({attrs:e,reqAutoFitWidth:t}){return{outer:t=>!e.rangeAndWidth().some(({width:e,range:n})=>e>n*t),inner:t=>!e.rangeAndWidth().some(({width:e,range:n})=>e>n*t),minor:t=>e.maxRange()*t>=6,canFitHalfDayTicks:n=>n>=t*e.count()}}function lD({qualified:e,nonQualified:t,qAxis:n,measureText:r,reqAutoFitWidth:i,scale:o},{attributesFactory:a=aD,queryFactory:s=sD}={attributesFactory:aD,queryFactory:sD}){const l=n.map((e,t)=>function(e,t){const{qTicks:n}=e,l=a({qTicks:n,measureText:r,scale:o});return{data:e,index:t,attrs:l,queries:s({attrs:l,reqAutoFitWidth:i})}}(e,t)),c=e.map(e=>l[e]),u=t.map(e=>l[e]);return{qAxisMeta:l,qualifiedMeta:c,nonQualifiedMeta:u}}function cD({qAxis:e=[],measureText:t=()=>({width:0}),cache:n={},reqAutoFitWidth:r=0,scale:i},{metaFactory:o=lD,mapper:a=iD,resolver:s=oD}={metaFactory:lD,mapper:iD,resolver:oD}){const{qualified:l,nonQualified:c}=a({qAxis:e}),{qualifiedMeta:u,nonQualifiedMeta:d}=o({qAxis:e,qualified:l,nonQualified:c,measureText:t,reqAutoFitWidth:r,scale:i}),f=s({qualifiedMeta:u,nonQualifiedMeta:d});return{resolve:t=>{const r=n.key({distance:t});if(n.get(r))return n.get(r);if(function(e){return!Array.isArray(e)||0===e.length||e.every(e=>0===e.qTicks.length)}(e))return{outer:"auto",inner:"auto",minor:NaN,isDayOrShorter:!1};const i=f.resolve(t);return n.set(r,i),i}}}function uD(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}const dD=uD(0).getTime();function fD(e){return(e.getTime()-dD)/86400/1e3}const hD=new Date,pD=new Date;function mD(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{const t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),i.range=(n,r,o)=>{const a=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return a;let s;do{a.push(s=new Date(+n)),t(n,o),e(n)}while(s<n&&n<r);return a},i.filter=n=>mD(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(i.count=(t,r)=>(hD.setTime(+t),pD.setTime(+r),e(hD),e(pD),Math.floor(n(hD,pD))),i.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i:null)),i}const gD=1e3,yD=6e4,vD=36e5,bD=864e5,xD=6048e5,SD=mD(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*gD)},(e,t)=>(t-e)/gD,e=>e.getUTCSeconds());SD.range;const wD=mD(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*gD)},(e,t)=>{e.setTime(+e+t*yD)},(e,t)=>(t-e)/yD,e=>e.getMinutes());wD.range;const MD=mD(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*yD)},(e,t)=>(t-e)/yD,e=>e.getUTCMinutes());MD.range;const kD=mD(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*gD-e.getMinutes()*yD)},(e,t)=>{e.setTime(+e+t*vD)},(e,t)=>(t-e)/vD,e=>e.getHours());kD.range;const CD=mD(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*vD)},(e,t)=>(t-e)/vD,e=>e.getUTCHours());CD.range;const qD=mD(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*yD)/bD,e=>e.getDate()-1);qD.range;const ED=mD(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/bD,e=>e.getUTCDate()-1);ED.range;const DD=mD(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/bD,e=>Math.floor(e/bD));function TD(e){return mD(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+7*t)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*yD)/xD)}DD.range;const OD=TD(0),ND=TD(1),AD=TD(2),_D=TD(3),ID=TD(4),LD=TD(5),PD=TD(6);function RD(e){return mD(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)},(e,t)=>(t-e)/xD)}OD.range,ND.range,AD.range,_D.range,ID.range,LD.range,PD.range;const zD=RD(0),FD=RD(1),jD=RD(2),BD=RD(3),VD=RD(4),HD=RD(5),$D=RD(6);zD.range,FD.range,jD.range,BD.range,VD.range,HD.range,$D.range;const WD=mD(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear()),e=>e.getMonth());WD.range;const UD=mD(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear()),e=>e.getUTCMonth());UD.range;const YD=mD(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());YD.every=e=>isFinite(e=Math.floor(e))&&e>0?mD(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}):null,YD.range;const KD=mD(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());KD.every=e=>isFinite(e=Math.floor(e))&&e>0?mD(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null,KD.range;const GD=1,XD=2,JD=3,ZD=4,QD=5,eT=6;function tT({timeScale:e,labels:t,distance:n,isDayOrShorter:r,cache:i,timeOnly:o,initialMin:a}){const[s,l]=e.domain(),c=i.key({distance:n});let u;i.get(c,1)?u=i.get(c,1):(u=function(e,t,n,r,i,o){function a(e){return KD.filter(t=>(t.getUTCFullYear()-o.getUTCFullYear())%e===0)}const s=SD.count(e,t),l=MD.count(e,t),c=CD.count(e,t),u=ED.count(e,t),d=zD.count(e,t),f=UD.count(e,t),h=KD.count(e,t),p=n/r.second.width-1,m=n/r.minute.width-1,g=n/r.date.width-1,y=n/r.year.width-1,v={type:"year",desc:"year",count:h,interval:KD.every(1),formatter:r.year.formatter,offset:e=>KD.offset(e,-1),floor:KD.floor};if(s<=p)v.type=GD,v.desc="second",v.count=s,v.interval=SD.every(1),v.formatter=r.second.formatter,v.offset=e=>SD.offset(e,-1),v.floor=SD.floor;else if(s/2<=p)v.type=GD,v.desc="every other second",v.count=s/2,v.interval=SD.every(2),v.formatter=r.second.formatter,v.offset=e=>SD.offset(e,-2),v.floor=SD.floor;else if(s/5<=p)v.type=GD,v.desc="every 5 second",v.count=s/5,v.interval=SD.every(5),v.formatter=r.second.formatter,v.offset=e=>SD.offset(e,-5),v.floor=SD.floor;else if(s/15<=p)v.type=GD,v.desc="every 15 second",v.count=s/15,v.interval=SD.every(15),v.formatter=r.second.formatter,v.offset=e=>SD.offset(e,-15),v.floor=SD.floor;else if(s/30<=p)v.type=GD,v.desc="every 30 second",v.count=s/30,v.interval=SD.every(30),v.formatter=r.second.formatter,v.offset=e=>SD.offset(e,-30),v.floor=SD.floor;else if(l<=m)v.type=XD,v.desc="minute",v.count=l,v.interval=MD.every(1),v.formatter=r.minute.formatter,v.offset=e=>MD.offset(e,-1),v.floor=MD.floor;else if(l/2<=m)v.type=XD,v.desc="every 2 minute",v.count=l/2,v.interval=MD.every(2),v.formatter=r.minute.formatter,v.offset=e=>MD.offset(e,-2),v.floor=MD.floor;else if(l/5<=m)v.type=XD,v.desc="every 5 minute",v.count=l/5,v.interval=MD.every(5),v.formatter=r.minute.formatter,v.offset=e=>MD.offset(e,-5),v.floor=MD.floor;else if(l/10<=m)v.type=XD,v.desc="every 10 minute",v.count=l/10,v.interval=MD.every(10),v.formatter=r.minute.formatter,v.offset=e=>MD.offset(e,-10),v.floor=MD.floor;else if(l/15<=m)v.type=XD,v.desc="every 15 minute",v.count=l/15,v.interval=MD.every(15),v.formatter=r.minute.formatter,v.offset=e=>MD.offset(e,-15),v.floor=MD.floor;else if(l/30<=m)v.type=XD,v.desc="every 30 minute",v.count=l/30,v.interval=MD.every(30),v.formatter=r.minute.formatter,v.offset=e=>MD.offset(e,-30),v.floor=MD.floor;else if(c<=m)v.type=JD,v.desc="hour",v.count=c,v.interval=CD.every(1),v.formatter=r.minute.formatter,v.offset=e=>CD.offset(e,-1),v.floor=CD.floor;else if(c/2<=m)v.type=JD,v.desc="every 2 hour",v.count=c/2,v.interval=CD.every(2),v.formatter=r.minute.formatter,v.offset=e=>CD.offset(e,-2),v.floor=CD.floor;else if(c/3<=m)v.type=JD,v.desc="every 3 hour",v.count=c/3,v.interval=CD.every(3),v.formatter=r.minute.formatter,v.offset=e=>CD.offset(e,-3),v.floor=CD.floor;else if(c/6<=m)v.type=JD,v.desc="every 6 hour",v.count=c/6,v.interval=CD.every(6),v.formatter=r.minute.formatter,v.offset=e=>CD.offset(e,-6),v.floor=CD.floor;else if(c/12<=m||i)v.type=JD,v.desc="every 12 hour",v.count=c/12,v.interval=CD.every(12),v.formatter=r.minute.formatter,v.offset=e=>CD.offset(e,-12),v.floor=CD.floor;else if(u<=g)v.type=ZD,v.desc="day",v.count=u,v.interval=ED.every(1),v.formatter=r.date.formatter,v.offset=e=>ED.offset(e,-1),v.floor=ED.floor;else if(u/2<=g)v.type=ZD,v.desc="every 2 day",v.count=u/2,v.interval=ED.every(2),v.formatter=r.date.formatter,v.offset=e=>ED.offset(e,-2),v.floor=ED.floor;else if(u/3<=g)v.type=ZD,v.desc="every 3 day",v.count=u/3,v.interval=ED.every(3),v.formatter=r.date.formatter,v.offset=e=>ED.offset(e,-3),v.floor=ED.floor;else if(d<=g)v.type=ZD,v.desc="week",v.count=d,v.interval=zD.every(1),v.formatter=r.date.formatter,v.offset=e=>zD.offset(e,-1),v.floor=ED.floor;else if(d/2<=g)v.type=ZD,v.desc="every 2 week",v.count=d/2,v.interval=zD.every(2),v.formatter=r.date.formatter,v.offset=e=>zD.offset(e,-2),v.floor=ED.floor;else if(f<=g)v.type=QD,v.desc="month",v.count=f,v.interval=UD.every(1),v.formatter=r.date.formatter,v.offset=e=>UD.offset(e,-1),v.floor=ED.floor;else if(f/3<=g)v.type=QD,v.desc="quarter",v.count=f/3,v.interval=UD.every(3),v.formatter=r.date.formatter,v.offset=e=>UD.offset(e,-3),v.floor=ED.floor;else if(f/6<=g)v.type=QD,v.desc="half year",v.count=f/6,v.interval=UD.every(6),v.formatter=r.date.formatter,v.offset=e=>UD.offset(e,-6),v.floor=ED.floor;else if(h<=y)v.type=eT,v.desc="year",v.count=h,v.interval=KD.every(1),v.formatter=r.year.formatter,v.offset=e=>KD.offset(e,-1),v.floor=KD.floor;else if(h/2<=y)v.type=eT,v.desc="every 2 year",v.count=h/2,v.interval=a(2),v.formatter=r.year.formatter,v.offset=e=>KD.offset(e,-2),v.floor=KD.floor;else if(h/5<=y)v.type=eT,v.desc="every 5 year",v.count=h/5,v.interval=a(5),v.formatter=r.year.formatter,v.offset=e=>KD.offset(e,-5),v.floor=KD.floor;else if(h/10<=y)v.type=eT,v.desc="every 10 year",v.count=h/10,v.interval=a(10),v.formatter=r.year.formatter,v.offset=e=>KD.offset(e,-10),v.floor=KD.floor;else{const e=Math.max(1,Math.floor(h/y));v.type=eT,v.desc="every nth year",v.count=e,v.interval=a(e),v.formatter=r.year.formatter,v.offset=t=>KD.offset(t,-e),v.floor=KD.floor}return v}(s,l,n,t.all(),r,a),i.set(c,u,1));const d=e.ticks(u.interval);d.length?s.getTime()!==d[0].getTime()&&d.unshift(u.offset(d[0])):d.push(u.floor(s));const f=d.map((e,t,n)=>{const r=n[t+1]?n[t+1]-e:l-e;return{start:e,end:new Date(e.getTime()+r),formatter:u.formatter}});let h=[];if(!o&&u.type<=JD){const n=t.getFormat("date"),r=e.ticks(ED.every(1));r.length&&s.getUTCDate()!==r[0].getUTCDate()&&r.unshift(ED.offset(r[0],-1)),h=(r.length?r:[ED.floor(s)]).map((e,t,r)=>{const i=r[t+1]?r[t+1]-e:l-e;return{start:e,end:new Date(e.getTime()+i),formatter:n.formatter}})}return{inner:f,outer:h}}const nT=86400,rT=1440,iT={};function oT(e,t,n,r){return{type:e,start:new Date(Date.UTC(...t)),end:new Date(Date.UTC(...n)),formatter:r}}function aT(e,t,n){const{generator:r,anchor:i,clamp:o,level:a}=t.ticks,{qNumFormat:s}=t.formatter;e.clamp(o);const[l,c]=e.domain(),u=tD().domain([uD(l),uD(c)]);u.clamp(o),u.range(t.invert?[1,0]:[0,1]);const d="object"==typeof r?r:{type:r};let f;f="d3"===d.type?(e,i)=>tT({timeScale:u,labels:n,distance:e,isDayOrShorter:i,cache:t.cache,timeOnly:"T"===s.qType,initialMin:void 0===d.initialMin?u.domain()[0]:uD(r.initialMin)}):e=>function(e,t,n,r,i,o=!1){if(iT[[t,n,r,r,o]])return iT[[t,n,r,r,o]];const a={year:e.getFormat("year"),date:e.getFormat("date"),minute:e.getFormat("minute"),second:e.getFormat("second")},s=uD(n),l=s.getFullYear(),c=s.getMonth(),u=s.getDate(),d=r-n,f=t/(i-r),h=f/1440,p=f/nT,m=366*f,g=3*f*30,y=a.second.width/p,v=a.minute.width/h,b=a.date.width/g,x=a.year.width/m;let S,w,M,k=0,C=0,q=null,E=null,D=null,T=null,O=null,N=null;const A={outer:[],inner:[]};for(y<1?(q=1,C=1/nT):y<2?(q=2,C=1/nT*2):y<5?(q=5,C=1/nT*5):y<10?(q=10,C=1/nT*10):y<30?(q=30,C=1/nT*30):v<1?(E=1,C=1/rT):v<2?(E=2,C=1/rT*2):v<5?(E=5,C=1/rT*5):v<10?(E=10,C=.006944444444444445):v<30?(E=30,C=.020833333333333336):v<60?(D=1,C=1/24):v<120?(D=2,C=2/24):v<360?(D=6,C=.25):v<720?(D=12,C=.5):b<1/90?(C=1,T=1):b<2/90?(C=2,T=2):b<7/90?(C=7,T=7):b<31/90?(O=1,C=31):b<1?(O=3,C=90):x<1?(N=1,C=366):x<2?(N=2,C=732):x<5?(N=5,C=1826.25):(N=10,C=3652.5),w=Math.floor((d+n%1)/C);k<i;){M=w+1,S=N?oT("year",[l+w*N,0,1],[l+M*N,0,1],a.year.formatter):O?oT("month",[l,c+w*O,1],[l,c+M*O,1],a.date.formatter):T?oT("day",[l,c,u+w*T],[l,c,u+M*T],a.date.formatter):D?oT("hour",[l,c,u,0+w*D],[l,c,u,0+M*D],a.minute.formatter):E?oT("minute",[l,c,u,0,0+w*E],[l,c,u,0,0+M*E],a.minute.formatter):oT("second",[l,c,u,0,0,0+w*q],[l,c,u,0,0,0+M*q],a.second.formatter),k=fD(S.start),A.inner.push(S);const e=Math.floor(k);if(!(o||N||O||T)){const t={type:"day",start:uD(e),end:uD(e+1),formatter:a.date.formatter,qStart:e};A.outer[A.outer.length-1]&&A.outer[A.outer.length-1].qStart===t.qStart||A.outer.push(t)}w++}return A.min=r,A.max=i,iT[[t,n,r,r,o]]=A,A}(n,e,d.min,l,c,"T"===s.qType);const h={transform:(t=[],{isMinor:n=!1}={})=>t.map(t=>{let r;r="start"===i?t.qStart:"end"===i?t.qEnd:(t.qStart+t.qEnd)/2;const o=e.clamp();n&&e.clamp(!1);const a=e(r),s=e(t.qStart),l=e(t.qEnd);return e.clamp(o),{value:r,position:a,start:s,end:l,label:t.qText,isMinor:n,data:n?void 0:{start:t.qStart,end:t.qEnd,scaleStart:e.domain()[0]}}}).filter(e=>e.position>=0&&e.position<=1),generate:(t=100,n)=>f(t,n)[a].map(t=>{let n;return n="start"===i?fD(t.start):"end"===i?fD(t.end):(fD(t.start)+fD(t.end))/2,{position:u(t.start),start:u(t.start),end:u(t.end),value:n,label:t.formatter(n),isMinor:!1,data:{start:fD(t.start),end:fD(t.end),scaleStart:e.domain()[0]}}}).filter(e=>e.position>=0&&e.position<=1)};return h}const sT=/t+/i;const lT={min:NaN,max:NaN,invert:!1,qAxis:[],field:void 0,formatter:{fn:()=>e=>e,measureText:()=>({width:0,height:0}),localeInfo:{},qNumFormat:{}},ticks:{generator:"d3",level:"outer",anchor:void 0,clamp:!1},cache:{get:()=>!1,set:()=>{},key:()=>""}};function cT(e,t){e.instance||(e.instance=t.copy(),e.instance.domain(t.domain()),e.instance.clamp(!0),e.instance.range(e.invert?[1,0]:[0,1]))}const uT="continuousPan";var dT={model:function({model:e,layoutService:t,largeDataService:n,dataProcessorModel:r=Kg,viewCache:i,viewState:o,definitionPath:a},s={}){const{engineFetcherFactory:l=Pg,snapshotFetcherFactory:c=zg,cacheFetcherFactory:u=Rg,cache:d={initial:{},merged:{}}}=s,f=l({model:e,layoutService:t,largeDataService:n,definitionPath:a}),h=c({layoutService:t,viewCache:i}),p=u({cache:d}),m=e=>{throw e.isHandled=!0,e};let g,y,v;return{update(e){({initialMin:y,initialMax:v}=function(e={}){let{qMin:t,qMax:n}=e;return t=Number.isNaN(+t)?0:t,n=Number.isNaN(+n)?0:n,{initialMin:t,initialMax:n}}(e.qHyperCube.qDimensionInfo[0])),i.set("continuousMin",y),i.set("continuousMax",v),i.set("minimiumZoomSpan",function(e,t){return Math.max(1e-6,(t-e)*Wg)}(y,v)),g=t.meta.isSnapshot?h:f,t.meta.isSnapshot&&({zoom:{min:y,max:v}}=h.getSnapshotData()),o.preventSet("zoom",{min:y,max:v})},updateLayout(e){const{qDataPages:n,qAxisData:r}=e;return t.setHyperCubeValue("qDataPages",n),t.setHyperCubeValue("qAxisData",r),t.setHyperCubeValue("qMode","S"),t.setHyperCubeValue("qColumnOrder",[]),e},initialFetch(){return g.fetch(y,v).then(e=>{const t=function(e){return{qDataPages:e.qDataPages.map(e=>{const t=Bg(e.qArea,e.qMatrix);return{...e,qArea:t}}),qAxisData:e.qAxisData}}(e);return r.command.processDataPage({dataPage:t.qDataPages.length?t.qDataPages[0]:[]}),d.initial=t,d.merged=t,e}).then(e=>Vg(y,v,e)).then(e=>this.updateLayout(e)).catch(m)},fetch:(e,t)=>g.fetch(e,t).then(e=>function(e,t){const n={};return n.qDataPages=(e.qDataPages||[]).map((e,n)=>{const r=function(e,t){if(!t||!t.length||!t[0].length)return e;const n=t[0][0].qNum,r=t[t.length-1][0].qNum,i=[],o=[];for(let t=0,a=e.length;t<a;t++){const a=e[t][0];a.qNum<n?i.push(e[t]):a.qNum>r&&o.push(e[t])}return[...i,...t,...o]}(e.qMatrix,t.qDataPages[n].qMatrix),i=Bg(e.qArea,r);return{...e,qArea:i,qMatrix:r}}),e.qAxisData&&e.qAxisData.qAxis&&(n.qAxisData=function(e,t){if(!t||!t.qAxis.length||t.qAxis.every(e=>!e.qTicks.length))return e;const n=t.qAxis.map(e=>e.qName),r=t.qAxis.map(e=>({start:e.qTicks[0].qStart,end:e.qTicks[e.qTicks.length-1].qStart})),i=t.qAxis.map(e=>({qName:e.qName,qTags:[...e.qTags],qTicks:[...e.qTicks]}));for(let t=0,o=e.qAxis.length;t<o;t++){const o=e.qAxis[t],a=n.indexOf(o.qName),s=[],l=[];if(a>-1){const{start:e,end:t}=r[a];for(let n=0,r=o.qTicks.length;n<r;n++){const r=o.qTicks[n];r.qStart<e?s.push(r):r.qStart>t&&l.push(r)}i[a].qTicks=[...s,...i[a].qTicks,...l]}}return{qAxis:i}}(e.qAxisData,t.qAxisData)),n}(d.initial,e)).then(e=>(r.command.processDataPage({dataPage:e.qDataPages.length?e.qDataPages[0]:[]}),d.merged=e,e)).then(n=>Vg(e,t,n)).catch(m),fetchFromCache:(e,t)=>p.fetch(e,t).then(n=>Vg(e,t,n)),fetchMinMaxData:()=>Promise.resolve(d.initial.qDataPages||[]),getInitialCube(){const e=t.getHyperCube();return kg({},e,{...d.initial})},getInitialLayout(){const e=this.getInitialCube();return kg({},t.getLayout(),{qHyperCube:e})},getDimensionCardinality:()=>Yg(d.initial,t.meta),setSnapshotData(e){const{qHyperCube:t}=e,n=r.query.getShouldProcess()?[r.query.getFilteredDataPage({dataPage:d.merged.qDataPages[0]})]:d.merged.qDataPages;t.qDataPages=n,t.qAxisData=d.merged.qAxisData}}},event:{onZoomChange:function(e,t){const{layoutService:n,continuousDataModel:r}=e;function i(e,n,i){return r[e](n,i).then(e=>(r.updateLayout(e),t(),e))}const o=rS((e,t)=>i("fetch",e,t),50);return({min:e,max:t},{min:r,max:a})=>!n.meta.isContinuous||e===r&&t===a?Promise.resolve(null):i("fetchFromCache",e,t).then(n=>(o(e,t),n))},onZoomIntercept:function({viewCache:e}){let t=NaN,n=NaN,r=NaN;return(i,o)=>(t=e.get("continuousMin"),n=e.get("continuousMax"),r=e.get("minimiumZoomSpan"),Math.abs(i.max-i.min)<r?o:{min:Math.min(i.max,Math.max(t,i.min)),max:Math.max(i.min,Math.min(n,i.max))})},onZoom:function({viewCache:e,viewState:t,chart:n},{threshold:r=50,rtl:i=!1,targetKey:o}){const a=e.get("continuousMin"),s=e.get("continuousMax");return iS((e,r)=>{const l=(e=>n.componentsFromPoint(e).filter(e=>e.key===o)[0])(e);if(l){const o=function(e,t,n){let{x:r}=e;return r-=t.element.getBoundingClientRect().left,r-=n.rect.x,Math.max(0,Math.min(1,r/n.rect.width))}(e,n,l),c=i?1-o:o,{min:u,max:d}=t.get("zoom"),f=Math.abs(d-u),h=f-(r>0?$g:Hg)*f,p=u+h*c,m=d-h*(1-c),g=p<a?a-p:0,y=m>s?m-s:0;t.set("zoom",{min:Math.max(p-y,a),max:Math.min(m+g,s)})}},r)}},interactions:{areaPan:function({targetKey:e,chart:t,actions:n,viewState:r,viewCache:i}){return{type:"Pan",key:"continuous:pan",options:{event:uT,pointers:1,threshold:10,enable(r,i){return this.started===uT||!i||!!n.scroll.enabled()&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some(t=>t.key===e)}},events:{[`${uT}start`](n){n.preventDefault(),this.started=uT;const{min:i,max:o}=r.get("zoom");this[uT]={min:i,max:o,size:t.component(e).rect.computedInner.width,span:o-i}},[`${uT}move`](e){e.preventDefault();const{span:t,min:n,max:o,size:a}=this[uT],s=-e.deltaX/a;r.set("zoom",{min:Math.min(n+s*t,i.get("continuousMax")-t),max:Math.max(o+s*t,i.get("continuousMin")+t)})},[`${uT}end`](e){e.preventDefault(),this.started=!1},[`${uT}cancel`](e){e.preventDefault(),this.started=!1}}}}},picassoComponents:{axisOverlay:ok,timeAxis:dk},picassoScales:{time:function e(t,n={}){const r=function(e,t,n){const r={};return Object.keys(t).forEach(i=>{const o=e[i],a=typeof o;"function"===a?r[i]=o(n):"object"!==a||Array.isArray(o)?r[i]="undefined"===a?t[i]:o:r[i]=kg(!0,{},t[i],o)}),r}(t,lT,n),{qAxis:i}=r,o=WC(),a={instance:null,invert:!1},{min:s,max:l}=function(e,t){let n=+e.min,r=+e.max;return Number.isNaN(n)&&Number.isNaN(r)&&Array.isArray(t)&&t.length&&(n=Math.min(...t[t.length-1].qTicks.map(e=>e.qStart)),r=Math.max(...t[t.length-1].qTicks.map(e=>e.qEnd))),n===r&&(n-=.5,r+=.5),{min:Number.isNaN(+n)?0:n,max:Number.isNaN(+r)?1:r}}(r,i);let c,u,d=[];const f=function(e){return Number.isNaN(+e)?NaN:o(e)};f.ticks=({distance:e,resolve:t=c.resolve}={})=>{const n=t(e),o=n[r.ticks.level];if(Number.isNaN(+o)||(d=u.transform(i[o].qTicks,{isMinor:!1})),!Number.isNaN(+n.minor)){const e=u.transform(i[n.minor].qTicks,{isMinor:!0});d=d.concat(e)}return"auto"===o&&(d=u.generate(e,n.isDayOrShorter)),d},f.invert=e=>o.invert(e),f.domain=e=>Array.isArray(e)?o.domain(e):o.domain(),f.range=e=>Array.isArray(e)?o.range(e):o.range(),f.norm=e=>(cT(a,f),a.instance(e)),f.normInvert=e=>(cT(a,f),a.instance.invert(e)),f.copy=()=>e(t,n),f.clamp=(e=!0)=>(o.clamp(e),o.clamp()),f.min=()=>Math.min(s,l),f.max=()=>Math.max(s,l),o.range(r.invert?[1,0]:[0,1]),o.domain([s,l]),a.invert=r.invert;const h=function(e){const t={},{measureText:n,fn:r,localeInfo:i}=e.formatter,o={second:{type:"second",pattern:"hh:mm:ss",width:60,formatter:void 0},minute:{type:"minute",pattern:"hh:mm",width:60,formatter:void 0},date:{type:"date",pattern:"YYYY-MM-DD",width:60,formatter:void 0},year:{type:"year",pattern:"YYYY",width:60,formatter:void 0}};return i&&sT.test(i.qTimestampFmt)&&(o.minute.pattern+=" tt",o.second.pattern+=" tt"),o.date.pattern=i&&i.qDateFmt?i.qDateFmt:o.date.pattern,Object.keys(o).forEach(e=>{o[e].formatter=r(o[e].pattern),o[e].width=Math.max(o[e].width,n(o[e].formatter(41000.2343433)).width+16)}),t.getFormat=e=>o[e],t.all=()=>o,t.getFormatFromTicks=e=>{const t=e.filter(e=>!e.isMinor),{length:n}=t;if(!n)return o.date;const r=uD(t[0].data.start),i=uD(t[n-1].data.start);return ED.count(r,i)/n>=1?o.date:CD.count(r,i)/n>0?o.minute:MD.count(r,i)/n>0?o.second:o.date},t}(r);return u=aT(o.copy(),r,h),c=cD({qAxis:i,measureText:r.formatter.measureText,reqAutoFitWidth:2*h.getFormat("minute").width,cache:r.cache,scale:f}),f.data=()=>({fields:[{formatter:f.formatter,id:()=>`qHyperCube/${r.field}`,key:()=>r.field,raw:Zx(n,"fields.0.raw",()=>({}))}]}),f.formatter=()=>h.getFormatFromTicks(d).formatter,f}}};const fT=[["FULL",{width:550,height:450}],["MEDIUM",{width:400,height:220}],["SMALL",{width:300,height:150}],["XSMALL",{width:150,height:75}],["SPARK",{width:0,height:0}]],hT={};fT.forEach(([e,{width:t,height:n}])=>{hT[e]={width:t,height:n}});const pT={getLayoutModes:()=>hT,getLayoutMode(e,t){let n;for(n=0;n<fT.length;++n)if(e>=fT[n][1].width&&t>=fT[n][1].height)return fT[n][0];return"SPARK"}};function mT(e,t){return{layoutModes:pT.getLayoutModes(),center:void 0!==t.minCenterRatio?{minWidthRatio:t.minCenterRatio,minHeightRatio:t.minCenterRatio}:void 0,logicalSize:t.logicalSize?{align:.5,preserveAspectRatio:!0,...t.logicalSize}:void 0}}const gT=["$date","$timestamp","$time"],yT=["D","TS","T"],vT={hasTimeTag:e=>!!(e&&e.qTags&&e.qTags.some(e=>gT.some(t=>t===e))),hasUnknownFormat:e=>!(!e||!e.qNumFormat||"U"!==e.qNumFormat.qType),hasTimeFormat:e=>!!(e&&e.qNumFormat&&yT.some(t=>t===e.qNumFormat.qType)),isTimeDimension:(e,t)=>!!(e&&t&&(vT.hasTimeTag(t)&&vT.hasUnknownFormat(t)||vT.hasTimeFormat(t))),isTime:(e,t)=>!!(t&&t.qHyperCube.qDimensionInfo&&t.qHyperCube.qDimensionInfo.length)&&(e&&vT.isTimeDimension(e,t.qHyperCube.qDimensionInfo.filter(e=>7005!==e.qError?.qErrorCode)[0])),canBeContinuousDimension(e){if(!e)return!1;const t=e.qTags||[];return!(!e.qContinuousAxes||!t.some(e=>"$numeric"===e))},canBeContinuous(e){const t=e?.qHyperCube?.qDimensionInfo?.filter(e=>7005!==e.qError?.qErrorCode);return!((t?.length??0)<1)&&vT.canBeContinuousDimension(t[0])},maxNumberOfLines:12},bT=/^[A-Z][A-z0-9_]*$/i,xT={getChar(e){let t=e,n=-1;return t>9?(n=65+t-10,n>90&&(n+=6)):t=`${t}`.charCodeAt(0),[48,111,79,105,73,108].indexOf(n)>-1?this.getChar(t+1):String.fromCharCode(n)},base62(e){const t=this.getChar(e%62),n=Math.floor(e/62);return n>0?this.base62(n)+t:t},id(){return this.base62(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}},ST={setValue:(e,t,n)=>{if(!t)return!1;const r=t.split("."),i=r[r.length-1];let o,a=e;for(o=0;o<r.length-1;++o)void 0===a[r[o]]&&(a[r[o]]=Number.isNaN(+r[o+1])?{}:[]),a=a[r[o]];if(void 0!==n){const e=a[i];return a[i]=n,{updated:n,previous:e}}return delete a[i],!1},getValue:(e,t,n)=>{const r=t.split(".");let i,o=e;if(void 0===o)return n;for(i=0;i<r.length;++i){if(void 0===o[r[i]])return n;o=o[r[i]]}return o},moveArrayElement:(e,t,n)=>{if(n>=e.length){let t=n-e.length;for(;1+t--;)e.push(void 0)}e.splice(n,0,e.splice(t,1)[0])},escapeField:e=>{let t;return t=!e||"]"===e||bT.test(e)?e:`[${e.replace(/\]/g,"]]")}]`,t},deleteUndefinedProperties:e=>{Object.keys(e).forEach(t=>{void 0===e[t]&&delete e[t]})},generateId:()=>xT.id(),shouldUseFormat:e=>!e.isCustomFormatted&&(e.qIsAutoFormat||"U"===e.qNumFormat.qType)},wT=e=>ST.getValue(e,"qHyperCube.qDimensionInfo",[]),MT=e=>ST.getValue(e,"qHyperCube.qMeasureInfo",[]),kT=e=>ST.getValue(e,"barGrouping.grouping"),CT={continuous({layout:e,properties:t,auto:n}){if(!vT.canBeContinuous(e))return!1;const r=t||e;return ST.getValue(r,"dimensionAxis.continuousAuto")?"function"==typeof n?n():!!n:!!r?.preferContinuousAxis},dimensionless:e=>!wT(e).length,grouped(e){return!this.dimensionless(e)&&"grouped"===kT(e)&&(wT(e).length>1||MT(e).length>1)&&!this.continuous({layout:e})},groupedByDimension(e){return this.grouped(e)&&wT(e).length>1&&1===MT(e).length},groupedByMeasure(e){return this.grouped(e)&&1===wT(e).length&&MT(e).length>1},stacked(e){return(!this.dimensionless(e)&&"grouped"!==kT(e)&&"butterfly"!==kT(e)||this.continuous({layout:e}))&&(wT(e).length>1||MT(e).length>1)},stackedByDimension(e){return this.stacked(e)&&wT(e).length>1&&1===MT(e).length},stackedByMeasure(e){return this.stacked(e)&&1===wT(e).length&&MT(e).length>1},simple:e=>0===wT(e).length||1===wT(e).length&&1===MT(e).length,snapshot:e=>!!ST.getValue(e,"snapshotData")};function qT(e,t){const n=e.component(t);return n&&n._DO_NOT_USE_getInfo&&n._DO_NOT_USE_getInfo().offset}const ET=e=>{throw e.isHandled=!0,e};const DT={getDockValue:e=>"near"===e||"left"===e||"top"===e?0:1,getOppositeDock(e){switch(e){case"left":return"right";case"right":return"left";case"top":return"bottom";case"bottom":return"top";case"near":default:return"far";case"far":return"near"}},getHorizontalDock:e=>"near"===e||"left"===e?"left":"right",getVerticalDock:e=>"near"===e||"bottom"===e?"bottom":"top",getDock:(e,t,n)=>"vertical"===e||"y"===e?DT.getVerticalDock(t):n?DT.getOppositeDock(DT.getHorizontalDock(t)):DT.getHorizontalDock(t),getInvertedOrientation:e=>"vertical"===e?"horizontal":"vertical",getMinorScaleAxis:e=>"vertical"===e?"y":"x",getMajorScaleAxis:e=>"vertical"===e?"x":"y",getAlignment:(e,t)=>"vertical"===e?"near"===t||"bottom"===t?1:0:"near"===t||"left"===t?0:1,getMeasureScaleInvert:(e,t)=>"vertical"===e||t,getDimensionScaleInvert:(e,t)=>"horizontal"===e&&t,getSize:(e,{width:t,height:n})=>"vertical"===e?t:n};var TT=(e,t)=>{if("function"==typeof t.defaultValue)return t.defaultValue();if(void 0!==t.defaultValue)return t.defaultValue;if(Array.isArray(t.options))return t.options[0].value;switch(e){case"array":return[];case"string":return"";case"integer":case"number":return 0;case"boolean":return!1;default:return null}};const OT=166/26,NT=12/11,AT={stringWidthOverMWidth:e=>(12*Math.min(e,3)+Math.max(e-3,0)*OT)/11,getCharacterRatios(e){if(!e)return{latin:0,cjk:0};let t=e.match(/[\u4E00-\u9FFF]/g),n=e.match(/[\u3040-\u309F]/g),r=e.match(/[\u30A0-\u30FF]/g);t=t?t.length:0,n=n?n.length:0,r=r?r.length:0;const i=t+n+r;return{latin:e.length-i,cjk:i}},getTotalCharacterRatios(e,t,n="qText"){if(!e)return{latinRatio:1,cjkRatio:0};const r={latin:0,cjk:0};let i;void 0===t?e.forEach(e=>{i=AT.getCharacterRatios(e[n]),r.latin+=i.latin,r.cjk+=i.cjk}):e.forEach(e=>{i=AT.getCharacterRatios(e[t][n]),r.latin+=i.latin,r.cjk+=i.cjk});const o=Math.max(1,r.latin+r.cjk);return r.latinRatio=r.latin/o,r.cjkRatio=r.cjk/o,r},getAdjustedMaxGlyphCount(e,t,n,r="qText"){const i=AT.getTotalCharacterRatios(t,n,r),o=i.latinRatio*e,a=i.cjkRatio*e;return Math.ceil(AT.stringWidthOverMWidth(o)+a*NT)}},_T="#la-vie-tooltip";function IT(){if(!document.querySelector(_T)){const e=document.createElement("div");e.id="la-vie-tooltip",e.setAttribute("data-qs-css",""),e.style.overflow="hidden",e.style.position="fixed",e.style.pointerEvents="none",e.style.left="0px",e.style.top="0px",e.style.width="100%",e.style.height="100%",e.style.zIndex=1020,document.body.appendChild(e)}}function LT({key:e="tooltip",rtl:t}){return{show:!0,key:e,type:"tooltip",layout:{displayOrder:3},beforeMount(){IT()},beforeUpdate(){IT()},destroyed(){!function(){const e=document.querySelector(_T);e&&e.parentElement&&e.childElementCount<1&&e.parentElement.removeChild(e)}()},settings:{appendTo:()=>document.querySelector(_T),content:({h:e,data:t,style:n})=>t[0].map(t=>e("tr",{},function(e,{h:t,style:n}){return e.map(e=>{const r={style:{...n.cell||{},...e.style||{}},class:e.class};return e.colspan&&(r.colspan=e.colspan),t("td",r,e.content)})}(t,{h:e,style:n}))),direction:t?"rtl":"ltr"},style:{arrow:{color:"#404040"},content:{display:"table","border-spacing":"4px",background:"rgba(64, 64, 64, 0.9)",opacity:"1",fontSize:"13px",fontFamily:'"Source Sans Pro", "Arial", "sans-serif"',"empty-cells":"show"},cell:{"max-width":"180px","word-break":"break-word","word-wrap":"break-word","overflow-wrap":"break-word",hyphens:"auto"}}}}const PT=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗＡ-Ｚａ-ｚｦ-ￜ]"),RT=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),zT=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),FT={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),isLtrChar:e=>PT.test(e),isRtlChar:e=>RT.test(e)||zT.test(e),detectTextDirection(e){const t=e?e.length:0;let n,r;for(n=0;n<t;n++){if(r=e[n],FT.isLtrChar(r))return"ltr";if(FT.isRtlChar(r))return"rtl"}return"ltr"}},jT={getColorSymbol:(e,t)=>e.h("div",{style:{display:"inline-block",width:"10px",height:"10px","background-color":t.color.fill,margin:"0 8px"}}),getNodeFillColor:e=>e.attrs&&void 0!==e.attrs.fill?e.attrs.fill:e.children&&e.children[0]&&e.children[0].attrs&&void 0!==e.children[0].attrs.fill?e.children[0].attrs.fill:void 0,getColor(e,t,n){const r=t.data,i=e.resources.formatter,o=e.resources.dataset,a={};if(n.coloring.label&&(a.label=`${n.coloring.label}`),"color"!==n.coloring.type&&r.fillTooltip){const e=i("fill"),t="measure"===n.coloring.fieldType;if(a.value=t&&e?e(r.fillTooltip.value):r.fillTooltip.label?r.fillTooltip.label:r.fillTooltip.value,!n.coloring.label){const e=o(r.fillTooltip.source.key).field(r.fillTooltip.source.field).title();a.label=`${e}`}}return a.fill=void 0===r._fillColor?jT.getNodeFillColor(t):r._fillColor,a},getMeasure:(e,t)=>({label:`${e(t.source.key).field(t.source.field).title()}`,value:""===t.label||"NaN"===t.label?"-":t.label,field:t.source.field}),hideColorRow:(e,t)=>void 0===e.color.value||e.measures.some(e=>e.field===t.coloring.field),getTitleRow(e,t){const n=FT.detectTextDirection(e.title);return[{content:e.title,style:{"font-weight":"bold","text-align":t?"right":"left",direction:n,"white-space":"pre-wrap"},colspan:2},{}]},getDescriptionRow(e,t){const n=FT.detectTextDirection(e.value);return[{content:e.value,style:{"text-align":t?"right":"left",direction:n,"white-space":"pre-wrap"},colspan:2},{}]},getNMoreRow(e,t,n){const r=t?t.get("Object.ChartTooltip.NMore",e):`+${e} more`;return[{content:r,style:{"font-weight":"bold","text-align":n?"right":"left",direction:FT.detectTextDirection(r)},colspan:2},{}]},getSeparatorRow:()=>[{content:"",style:{"background-image":"linear-gradient(transparent 8px, rgba(255, 255, 255, 0.4) 8px, rgba(255, 255, 255, 0.4) 9.2px, transparent 9.2px)",height:"17px"},colspan:2},{}],getColorRow(e,t,n){const r=FT.detectTextDirection(t.color.label),i=n?[":",t.color.label]:[t.color.label,":"],o=FT.detectTextDirection(t.color.value);return[{content:i,style:{"text-align":n?"right":"left",direction:r}},{content:n?[t.color.value,jT.getColorSymbol(e,t)]:[jT.getColorSymbol(e,t),t.color.value],style:{"text-align":n?"left":"right",direction:o,"vertical-align":"middle"}}]},getMeasureRow(e,t,n,r,i=!1){const o=FT.detectTextDirection(e.label),a=r?[":",e.label]:[e.label,":"],s=FT.detectTextDirection(e.value);let l;return l=i?r?[e.value,jT.getColorSymbol(t,n)]:[jT.getColorSymbol(t,n),e.value]:[e.value],[{content:a,style:{"text-align":r?"right":"left",direction:o}},{content:l,style:{"text-align":r?"left":"right",direction:s,"vertical-align":"middle"}}]}};function BT(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function VT(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function HT(){}var $T=.7,WT=1/$T,UT="\\s*([+-]?\\d+)\\s*",YT="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",KT="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",GT=/^#([0-9a-f]{3,8})$/,XT=new RegExp(`^rgb\\(${UT},${UT},${UT}\\)$`),JT=new RegExp(`^rgb\\(${KT},${KT},${KT}\\)$`),ZT=new RegExp(`^rgba\\(${UT},${UT},${UT},${YT}\\)$`),QT=new RegExp(`^rgba\\(${KT},${KT},${KT},${YT}\\)$`),eO=new RegExp(`^hsl\\(${YT},${KT},${KT}\\)$`),tO=new RegExp(`^hsla\\(${YT},${KT},${KT},${YT}\\)$`),nO={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function rO(){return this.rgb().formatHex()}function iO(){return this.rgb().formatRgb()}function oO(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=GT.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?aO(t):3===n?new cO(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?sO(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?sO(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=XT.exec(e))?new cO(t[1],t[2],t[3],1):(t=JT.exec(e))?new cO(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=ZT.exec(e))?sO(t[1],t[2],t[3],t[4]):(t=QT.exec(e))?sO(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=eO.exec(e))?mO(t[1],t[2]/100,t[3]/100,1):(t=tO.exec(e))?mO(t[1],t[2]/100,t[3]/100,t[4]):nO.hasOwnProperty(e)?aO(nO[e]):"transparent"===e?new cO(NaN,NaN,NaN,0):null}function aO(e){return new cO(e>>16&255,e>>8&255,255&e,1)}function sO(e,t,n,r){return r<=0&&(e=t=n=NaN),new cO(e,t,n,r)}function lO(e){return e instanceof HT||(e=oO(e)),e?new cO((e=e.rgb()).r,e.g,e.b,e.opacity):new cO}function cO(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function uO(){return`#${pO(this.r)}${pO(this.g)}${pO(this.b)}`}function dO(){const e=fO(this.opacity);return`${1===e?"rgb(":"rgba("}${hO(this.r)}, ${hO(this.g)}, ${hO(this.b)}${1===e?")":`, ${e})`}`}function fO(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function hO(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function pO(e){return((e=hO(e))<16?"0":"")+e.toString(16)}function mO(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new yO(e,t,n,r)}function gO(e){if(e instanceof yO)return new yO(e.h,e.s,e.l,e.opacity);if(e instanceof HT||(e=oO(e)),!e)return new yO;if(e instanceof yO)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new yO(a,s,l,e.opacity)}function yO(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function vO(e){return(e=(e||0)%360)<0?e+360:e}function bO(e){return Math.max(0,Math.min(1,e||0))}function xO(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}BT(HT,oO,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:rO,formatHex:rO,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return gO(this).formatHsl()},formatRgb:iO,toString:iO}),BT(cO,function(e,t,n,r){return 1===arguments.length?lO(e):new cO(e,t,n,null==r?1:r)},VT(HT,{brighter(e){return e=null==e?WT:Math.pow(WT,e),new cO(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?$T:Math.pow($T,e),new cO(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new cO(hO(this.r),hO(this.g),hO(this.b),fO(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:uO,formatHex:uO,formatHex8:function(){return`#${pO(this.r)}${pO(this.g)}${pO(this.b)}${pO(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:dO,toString:dO})),BT(yO,function(e,t,n,r){return 1===arguments.length?gO(e):new yO(e,t,n,null==r?1:r)},VT(HT,{brighter(e){return e=null==e?WT:Math.pow(WT,e),new yO(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?$T:Math.pow($T,e),new yO(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new cO(xO(e>=240?e-240:e+120,i,r),xO(e,i,r),xO(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new yO(vO(this.h),bO(this.s),bO(this.l),fO(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 e=fO(this.opacity);return`${1===e?"hsl(":"hsla("}${vO(this.h)}, ${100*bO(this.s)}%, ${100*bO(this.l)}%${1===e?")":`, ${e})`}`}}));const SO=Math.PI/180,wO=180/Math.PI,MO=.96422,kO=.82521,CO=4/29,qO=6/29,EO=3*qO*qO,DO=qO*qO*qO;function TO(e){if(e instanceof OO)return new OO(e.l,e.a,e.b,e.opacity);if(e instanceof PO)return RO(e);e instanceof cO||(e=lO(e));var t,n,r=IO(e.r),i=IO(e.g),o=IO(e.b),a=NO((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?t=n=a:(t=NO((.4360747*r+.3850649*i+.1430804*o)/MO),n=NO((.0139322*r+.0971045*i+.7141733*o)/kO)),new OO(116*a-16,500*(t-a),200*(a-n),e.opacity)}function OO(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function NO(e){return e>DO?Math.pow(e,1/3):e/EO+CO}function AO(e){return e>qO?e*e*e:EO*(e-CO)}function _O(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function IO(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function LO(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof PO)return new PO(e.h,e.c,e.l,e.opacity);if(e instanceof OO||(e=TO(e)),0===e.a&&0===e.b)return new PO(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*wO;return new PO(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new PO(e,t,n,null==r?1:r)}function PO(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function RO(e){if(isNaN(e.h))return new OO(e.l,0,0,e.opacity);var t=e.h*SO;return new OO(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}BT(OO,function(e,t,n,r){return 1===arguments.length?TO(e):new OO(e,t,n,null==r?1:r)},VT(HT,{brighter(e){return new OO(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new OO(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new cO(_O(3.1338561*(t=MO*AO(t))-1.6168667*(e=1*AO(e))-.4906146*(n=kO*AO(n))),_O(-.9787684*t+1.9161415*e+.033454*n),_O(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),BT(PO,LO,VT(HT,{brighter(e){return new PO(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new PO(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return RO(this).rgb()}}));var zO={isDark:function(e){return LO(e).l<70}};function FO(e){const t=e.qDef;!0===t.autoSort&&t.qSortCriterias.forEach(e=>{e.qSortByNumeric=1,e.qSortByAscii=1})}const jO={horizontal:{major:"width",minor:"height",start:"left",end:"right",shadow:{startOffset:"12px 0",endOffset:"-12px 0"}},vertical:{major:"height",minor:"width",start:"top",end:"bottom",shadow:{startOffset:"0 12px",endOffset:"0 -12px"}}},BO=e=>`${e} 12px -12px inset rgba(0, 0, 0, 0.0625)`;var VO={defaultSettings:{settings:{orientation:"horizontal",rtl:!1,range:()=>[0,1]}},renderer:"dom",render(e){const{range:t,orientation:n,rtl:r}=this.settings.settings,[i,o]=t(),a=Math.abs(i)<1e-15,s=Math.abs(o-1)<1e-15,l=(e=>{const t=jO[e];return{base:{position:"absolute",[t.major]:12,[t.minor]:"100%"},towardsStart:{[t.start]:0,[t.end]:"auto",boxShadow:BO(t.shadow.startOffset)},towardsEnd:{[t.start]:"auto",[t.end]:0,boxShadow:BO(t.shadow.endOffset)}}})(n),c="horizontal"===n&&r,u=[];return a||u.push(e("div",{style:{...l.base,...c?l.towardsEnd:l.towardsStart},class:"scroll-hint--towards-start"})),s||u.push(e("div",{style:{...l.base,...c?l.towardsStart:l.towardsEnd},class:"scroll-hint--towards-end"})),u}};function HO({viewState:e,viewCache:t,layoutService:n,dockService:r,rtl:i}){return!n.meta.isSnapshot&&{key:"scroll-hint",type:"scroll-hint",settings:{orientation:r.meta.major.orientation,rtl:i,range:()=>function({layoutService:e,viewState:t,viewCache:n}){return e.meta.isContinuous?function(e,t){const n=e.get("zoom"),r=t.get("continuousMin"),i=t.get("continuousMax");return[(n.min-r)/(i-r),(n.max-r)/(i-r)]}(t,n):function(e){return e.get("viewRange")}(t)}({layoutService:n,viewState:e,viewCache:t})}}}let $O;function WO(){$O=$O||document.createElement("canvas").getContext("2d")}const UO={measureTextWidth(e){WO();const{width:t}=$O.measureText(e);return t},lineWrap(e,t,n,r){let i,o;WO();const a=e?e.split(/\n+|\r+|\r\n/):[],s=[];let l,c,u,d,f=e?e.split(/\s+/):[],h=a[0];if("number"!=typeof t||t<=0)return[e];if("number"==typeof r&&a.length>=r)return a.slice(0,r);for(n&&($O.font=n),o=0;o<a.length;o++){for(d=a[o]||"",f=d.split(/\s+/),[h]=f,u="",i=1;i<f.length;i++)if(l=`${h} ${f[i]}`,c=UO.measureTextWidth(l),c>t&&("number"!=typeof r||r>s.length)?(s.push(h),h=f[i]):h=l,"number"==typeof r&&s.length>=r){u=f.slice(i+1).join(" ");break}"number"!=typeof r||s.length<r?s.push(h):s[Math.max(0,s.length-1)]=`${s[Math.max(0,s.length-1)]||""} ${h} ${u}`}return s},wordWrap(e,t,n,r,i){if(WO(),!e||!e.length)return[];n&&($O.font=n);let o=[];const a=e.slice();let s,l,c,u;if(a.filter(e=>!!e),"number"!=typeof t||t<0)return e.slice();for(u=0;u<a.length;u++)c=a[u],l=null,c&&(c.length<=1||UO.measureTextWidth(c)<=t?o.push(c):(s=UO.splitWord(c,t,void 0,r-o.length),s.length<=1?o.push(s[0]):(l=s.pop(),o=o.concat(s),a[u+1]?UO.measureTextWidth(`${l} ${a[u+1]}`)>t&&o.length+a.length-u<=r?a.splice(u+1,0,l):a[u+1]=`${l} ${a[u+1]}`:a.push(l))));return o.forEach((e,t,n)=>{n[t]=e?e.trim():e}),o.length>r?(o=o.splice(0,r),o[o.length-1]=UO.truncate(o[o.length-1],t,n,i).text):(c=o[o.length-1],c&&c.length>1&&UO.measureTextWidth(c)>t&&(o[o.length-1]=UO.truncate(c,t,n,i).text)),o},truncate(e,t,n,r="…"){WO();let i,o,a,s,l=e;const c=UO.measureTextWidth("i"),u=Math.ceil(t/c);if(n&&($O.font=n),e&&t){if(UO.measureTextWidth(l)>t){for(i=Math.min(u,l.length);i>0;i--)if(o=l.substring(0,i-1),a=o.trim()+r,UO.measureTextWidth(a)<=t){s=l.substring(i-1),l=a;break}i||(s=l,l="…")}}else s=void 0;return{text:l,rest:s}},isNumber:e=>"number"==typeof e&&Number.isFinite(e),explodeWord(e,t,n,r){let i;WO();let o,a=e,s="",l=[];if(UO.isNumber(n)&&n<=1)return[e];const c=Math.ceil(t/r);for(i=Math.min(e.length,c);i>0&&(a=e.substring(0,i),o=e.substring(i-1,i)," "===o?a=e.substring(0,i-1):a+="-",s=e.substring(i),!(UO.measureTextWidth(a)<=t));i--);return(!i&&!a||UO.measureTextWidth(a)>t)&&(a=e.substring(0,1),s=e.substring(1)),l.push(a),s?(UO.measureTextWidth(s)>t?(s=UO.explodeWord(s,t,n-1,r),l=l.concat(s)):l.push(s),l.filter(e=>""!==e.trim())):l},splitWord:(e,t,n,r)=>(WO(),e&&t?(n&&($O.font=n),UO.explodeWord(e,t,r,Math.max(1,UO.measureTextWidth("i")))):[]),wrapText(e,t,n,r,i){let o;return Number.isNaN(t)?[e]:(o=r>1?UO.lineWrap(e,t,n,r):[e],o=UO.wordWrap(o,t,n,r,i),o)},getFontHeight:e=>(WO(),e&&($O.font=e),1.5*UO.measureTextWidth("m")),tokenize(e,t,n,r,i,o,a=1){WO(),t&&($O.font=t);const s=UO.getFontHeight(),l=a*s;let c=[],u=0,d=[];if(o<s)return[];const f=o?Math.max(1,Math.floor(o/l)):r||1;return Array.isArray(r)?(r.forEach(e=>{u+=Number.isNaN(e)||e<=0?0:e}),r.forEach(e=>{c.push(Number.isNaN(e)||e<=0?f-u:e)})):c=[Number.isNaN(r)||r<=0?f:Math.min(f,r)],Array.isArray(e)?e.forEach((e,n)=>{d.length<f&&(d=d.concat(UO.wrapText(e,i,t,c[n])))}):d=UO.wrapText(e,i,t,c[0],n),d}},YO={getDefaultSettings:({size:e=10,fill:t="#999",alignment:n}={})=>({show:!0,type:"n-polygon",fill:t,stroke:"#000",strokeWidth:0,size:e,sides:3,startAngle:-90,alignment:n}),createOob({oob:e,dockValue:t,boxCenter:n,rendWidth:r,rendHeight:i,flipXY:o,symbol:a}){let s="x",l="y",c=r,u=i,d=t<.5?90:-90;return o&&(s="y",l="x",c=i,u=r,d=t<.5?180:0),a(kg({},e,{[s]:n*c,[l]:Math.max(e.size/2,Math.min(t*u,u-e.size/2)),startAngle:d}))}},KO=kg.bind(null,!0),GO={},{isArray:XO}=Array;function JO(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function ZO(e){return void 0===e}function QO(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function eN(e,t){const n=t.substring(1).split("/").slice(0,-1);let r;return n.forEach((t,i)=>{if(i===n.length)return;r=+t;const o=isNaN(r)?{}:[];e[r||t]=ZO(e[r||t])?o:e[t],e=e[r||t]}),e}function tN(e,t){return t?Object.keys(e).filter(t=>void 0!==e[t]).length:Object.keys(e).length}function nN(e,t,n){let r=!0;if(JO(e)&&JO(t))return tN(e,n)===tN(t,n)&&(Object.keys(e).forEach(i=>{nN(e[i],t[i],n)||(r=!1)}),r);if(XO(e)&&XO(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r+=1)if(!nN(e[r],t[r],n))return!1;return!0}return e===t}GO.compare=nN,GO.generate=function(e,t,n){n=n||"";let r=[];return Object.keys(t).forEach(i=>{const o=function(e){return e?KO({},{val:e}).val:e}(t[i]),a=e[i],s=`${n}/${i}`;nN(o,a)||QO(t,i)||(ZO(a)?r.push({op:"add",path:s,value:o}):JO(o)&&JO(a)?r=r.concat(GO.generate(a,o,s)):XO(o)&&XO(a)?r=r.concat(function(e,t,n){let r=[];const i=e.slice();let o=-1;function a(e,t,n){if(e[n]&&ZO(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(let n=0,r=e.length;n<r;n+=1)if(e[n]&&e[n].qInfo.qId===t)return n;return-1}if(nN(t,i))return r;if(!ZO(t[0])&&ZO(t[0].qInfo)||0===t.length)return r.push({op:"replace",path:n,value:t}),r;for(let e=i.length-1;e>=0;e-=1)o=a(t,i[e].qInfo&&i[e].qInfo.qId,e),-1===o?(r.push({op:"remove",path:`${n}/${e}`}),i.splice(e,1)):r=r.concat(GO.generate(i[e],t[o],`${n}/${e}`));for(let e=0,s=t.length;e<s;e+=1)o=a(i,t[e].qInfo&&t[e].qInfo.qId),-1===o?(r.push({op:"add",path:`${n}/${e}`,value:t[e]}),i.splice(e,0,t[e])):o!==e&&(r.push({op:"move",path:`${n}/${e}`,from:`${n}/${o}`}),i.splice(e,0,i.splice(o,1)[0]));return r}(a,o,s)):r.push({op:"replace",path:`${n}/${i}`,value:o}))}),Object.keys(e).forEach(i=>{ZO(t[i])&&!QO(e,i)&&r.push({op:"remove",path:`${n}/${i}`})}),r},GO.apply=function(e,t){t.forEach(t=>{let n=eN(e,t.path),r=t.path.split("/").splice(-1)[0],i=r&&isNaN(+r)?n[r]:n[+r]||n;const o=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(n=null,i=e),"add"===t.op||"replace"===t.op)if(XO(n))"-"===r&&(r=n.length),n.splice(+r,"add"===t.op?0:1,t.value);else if(XO(i)&&XO(t.value)){const e=t.value.slice();i.length=0,i.push(...e)}else if(JO(i)&&JO(t.value))a=i,Object.keys(a).forEach(e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!QO(a,e)&&delete a[e]}),KO(i,t.value);else{if(!n)throw new Error("Patchee is not an object we can patch");n[r]=t.value}else if("move"===t.op){const i=eN(e,t.from);XO(n)?n.splice(+r,0,i.splice(+o,1)[0]):(n[r]=i[o],delete i[o])}else"remove"===t.op&&(XO(n)?n.splice(+r,1):delete n[r]);var a})},GO.clone=function(e){return KO({},e)},GO.createPatch=function(e,t,n){const r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},GO.updateObject=function(e,t){Object.keys(e).length?GO.apply(e,GO.generate(e,t)):KO(e,t)};const rN=Math.log(10);function iN(e){return 10**e}const oN={pow10:iN,log:(e,t)=>e<=0||t<=0?NaN:Math.log(e)/Math.log(t),log10:e=>e<=0?NaN:Math.log(e)/rN,eliminateFloatingError(e){const t=Math.round(e);return Math.abs(e-t)<1e-12?t:e},getNiceNumber(e){let t;if(0===e)return 0;const n=Math.floor(Math.log(Math.abs(e))/rN),r=e/iN(n);return t=r<=1?1:r<=2?2:r<=5?5:10,t*iN(n)*(e<0?-1:1)},getSmallNiceNumber(e){let t,n;if(0===e)return 0;t=Math.floor(Math.log(Math.abs(e))/rN);const r=e/iN(t);return r<1?(n=5,t--):n=r<2?1:r<5?2:5,n*iN(t)*(e<0?-1:1)},getMagnitude(e){if(0===e)return 0;return iN(Math.floor(Math.log(Math.abs(e))/rN))},getFraction(e){if(0===e)return 0;return e/iN(Math.floor(Math.log(Math.abs(e))/rN))},getGoodNumber(e){let t;if(0===e)return 0;const n=Math.floor(Math.log(Math.abs(e))/rN),r=e/iN(n);return t=Math.ceil(r),7!==t&&9!==t||t++,r>1&&r<=1.5?t=1.5:r>2&&r<=2.5&&(t=2.5),t*iN(n)*(e<0?-1:1)},getValueWithOffset:(e,t=0)=>e+Math.abs(e)*t,isNumber:e=>"number"==typeof e&&!Number.isNaN(e)};const aN={findMinPositiveDistance:function(e){if(e.length<2)return 0;e.sort((e,t)=>e-t);let t=1/0;for(let n=1;n<e.length;n++){const r=e[n]-e[n-1];r>0&&r<t&&(t=r)}return t===1/0?0:t}},sN=[[2,4,6],[2,4],[3]],lN=[,[,,[[1,2]],[[1,2,3],[1,3]],[[1,2,4],[1,4]],[[1,2,4],[1,5]],[[1,2,4,6],[2,4,6],[1,3,6],[1,6]],[[1,2,4,6],[2,4,6],[1,3,6],[1,7]],[[1,2,4,8],[2,4,8],[1,8]],[[1,2,4,8],[2,4,8],[1,3,9],[1,9]],[[1,2,4,6,10],[1,2,4,10],[1,3,10],[3,10],[1,10]]],[,,,[[2,3]],[[2,3,4],[2,4]],[[2,3,4],[2,4],[2,5]],[[2,4,6],[2,6]],[[2,4,6],[2,6],[2,7]],[[2,4,8],[2,8]],[[2,4,8],[2,8],[2,9]],[[2,4,6,10],[2,4,10],[5,10],[3,10]]],[,,,,[[3,4]],[[3,4,5],[3,5]],[[3,4,5,6],[3,6]],[[3,4,5,6],[3,5,7],[3,7]],[[3,4,5,6,8],[3,5,7],[4,8],[3,8]],[[3,4,5,6,8],[3,4,6,9],[3,4,6,8],[3,6,9],[4,8],[3,9]],[[4,6,10],[5,10],[3,10]]],[,,,,,[[4,5]],[[4,5,6],[4,6]],[[4,5,6,7],[4,5,6],[4,6]],[[4,5,6,7,8],[4,5,6,7],[4,6,8],[4,8]],[[4,5,6,7,8],[4,6,9],[4,6,8],[4,8]],[[4,6,10],[5,7,9],[5,10],[4,10]]],[,,,,,,[[5,6]],[[5,6,7],[5,7]],[[5,6,7,8],[5,6,7],[6,8]],[[5,6,7,8,9],[5,6,7,8],[5,7,9],[5,9]],[[6,8,10],[5,10]]],[,,,,,,,[[6,7]],[[6,7,8],[6,8]],[[6,7,8,9],[6,7,8],[6,9]],[[6,7,8,9,10],[6,8,10],[6,10]]],[,,,,,,,,[[7,8]],[[7,8,9],[7,9]],[[7,8,9,10],[8,10],[7,10],[7,9]]],[,,,,,,,,,[[8,9]],[[8,9,10],[8,10]]],[,,,,,,,,,,[[9,10]]]];function cN(e,t,n){const r=e?e.length:0;let i,o=void 0===t?Number.MAX_VALUE:e[0]/t;for(i=1;i<r;i++)o=Math.min(o,e[i]/e[i-1]);void 0!==n&&(o=Math.min(o,n/e[r-1])),e.splice(0,0,o)}function uN(e,t,n){let r;const i=e?e.length:0;for(r=0;r<i;r++)cN(e[r],t,n)}!function(){let e,t;for(uN(sN,1,10),e=0;e<lN.length;e++)if(lN[e])for(t=0;t<lN[e].length;t++)Array.isArray(lN[e][t])&&uN(lN[e][t])}();const dN={isInside(e,t,n,r){if(!r)return!0;const i=e.position-e.radius,o=e.position+e.radius;return i>=t&&o<=n},getCenterDistance:(e,t)=>Math.abs(e.center-t.center),getGap(e,t){const n=e.position<t.position?e:t,r=e.position<t.position?t:e;return r.position-r.radius-(n.position+n.radius)},findSegmentPositionMeetMax(e,t){const n=Math.max(0,e.max-t);return e.center-n},findSegmentPositionMeetMin(e,t){const n=Math.max(0,t-e.min);return e.center+n},findSegmentPositionMeetMinThenMax(e,t,n){const r=dN.findSegmentPositionMeetMin(e,t);return dN.findSegmentPositionMeetMax({center:r,max:r+e.radius},n)},findSegmentPositionMeetMaxThenMin(e,t,n){const r=dN.findSegmentPositionMeetMax(e,n);return dN.findSegmentPositionMeetMin({center:r,min:r-e.radius},t)},layoutPositionFromMin(e,t,n,r=0){const i=e.length-1;let o,a,s=t;for(let t=0;t<i;t++)o=e[t],a=e[t+1],o.position=dN.findSegmentPositionMeetMaxThenMin(o,s,(o.center+a.center-r)/2),s=o.position+o.radius+r/2;a.position=dN.findSegmentPositionMeetMaxThenMin(a,s,n)},adjustPositionFromMax(e,t,n,r=0){const i=e.length-1;let o,a,s;const l=Math.max(0,e[i].position+e[i].radius-n);if(0===l)return;let c,u=0;for(o=i;o>0&&(a=e[o],s=e[o-1],c=Math.max(0,dN.getGap(s,a)-r),c-=Math.max(0,u+c-l),u+=c,a.move=c,!(u>=l));o--);for(u<l&&(c=Math.max(0,s.position-s.radius-t),c-=Math.max(0,u+c-l),u+=c,s.move=c),u=0,o=0;o<=i;o++)a=e[o],u+=a.move||0,a.move=u,a.position-=u},layout(e,t,n,r=0){const i=e.length-1;if(!(i<0)){if(0===i){const r=e[0];return void(r.position=dN.findSegmentPositionMeetMaxThenMin(r,t,n))}dN.layoutPositionFromMin(e,t,n,r),dN.adjustPositionFromMax(e,t,n,r)}}},fN=(e,t,n,r=1)=>{const i=e.bandwidth();return n?"start"===t?i:"end"===t?i*(1-r):i*(2-r)/2:"start"===t?0:"end"===t?i*r:i*r/2},hN=e=>!1!==e.show&&0!==e.show&&"0"!==e.show,pN=e=>e.filter(hN),mN=(e,t)=>pN(ST.getValue(e,t,[])),gN=e=>hN(e)&&(!1!==e.showValue||!1!==e.showLabel),yN=e=>e.filter(gN),vN=(e,t)=>yN(ST.getValue(e,t,[])),bN=({refLineLayout:e,layoutService:t})=>t.meta.canBeContinuous?e.refLineExpr.value:e.refLineExpr.stringValue,xN=(e,t,n)=>{const{dimensionRefLineInfo:r}=t;if(r[e])return r[e][n]},SN=({label:e,dataPages:t})=>{const{qArea:n={}}=t||{},{qTop:r,qHeight:i}=n;return void 0!==r&&void 0!==i&&void 0!==e.valueInfo&&e.valueInfo.maxOrder<r},wN=({label:e,dataPages:t})=>{const{qArea:n={}}=t||{},{qTop:r,qHeight:i}=n;return void 0!==r&&void 0!==i&&void 0!==e.valueInfo&&e.valueInfo.minOrder>=r+i},MN=({value:e,qMin:t})=>"NaN"!==t&&e<t,kN=({value:e,qMax:t})=>"NaN"!==t&&e>t,CN={isRefLineVisible:hN,getVisibleRefLines:pN,getRefLines:mN,getMeasureRefLines:e=>mN(e,"refLine.refLines"),getDimensionRefLines:(e,t)=>t?[]:mN(e,"refLine.dimRefLines"),isRefLineLabelVisible:gN,getVisibleRefLineLabels:yN,getRefLineLabels:vN,getMeasureRefLineLabels:e=>vN(e,"refLine.refLines"),getDimensionRefLineLabels:(e,t)=>t?[]:vN(e,"refLine.dimRefLines"),getScaledPosition:({scale:e,size:t,value:n,valueInfo:r,align:i,invert:o=!1,layoutService:a,isContinuous:s})=>{if(!s){const s=e.pxScale(t);let l;if(a.meta.isGroupedByMeasure)return l=fN(s,i,o,a.meta.groupSize??a.meta.measureCount),s([n,0])+l;if(a.meta.isGroupedByDimension){if(!r)return NaN;const{innerValues:e,numInnerValues:t,minOrder:a}=r;let c;return l=fN(s,i,o,t),e&&e.length&&(c=(({pxScale:e,value:t,innerValues:n,invert:r,minOrder:i})=>{const o=(({pxScale:e,invert:t})=>e.bandwidth()*(t?-1:1))({pxScale:e,invert:r});for(let r=0;r<n.length;r++){const{id:a,order:s}=n[r],l=e([t,a]);if(void 0!==l)return l-o*(s-i)}})({pxScale:s,value:n,innerValues:e,invert:o,minOrder:a})),(void 0===c?s(n):c)+l}return l=fN(s,i,o),s(n)+l}return e(n)},getDimensionValuesInfo:({layout:e,canBeContinuous:t,discreteModel:n,layoutService:r})=>{const{isGroupedByDimension:i}=r.meta,o={},a=ST.getValue(e,"qHyperCube"),s="K"===a.qMode,l=n?n.query.getCurrentDataPage():ST.getValue(a,"S"===a.qMode?"qDataPages.0":"qStackedDataPages.0",[]);if(void 0===l?.qArea?.qTop)return o;const c=s?"qData.0.qSubNodes":"qMatrix",u=ST.getValue(l,c,[]),d=((e,t)=>e?t?"qValue":"qNum":"qText")(t,s),f=(e=>e.qArea.qTop)(l);return s?(()=>{for(let e=0;e<u.length;e++){const t=u[e],n=e+f,r=t[d];o[r]||(o[r]={id:t.qElemNo,qText:t.qText,minOrder:n,maxOrder:n,dataNode:u[e]})}})():i?(()=>{let e;for(let t=0;t<u.length;t++){const n=u[t][0],r=u[t][1],i=t+f,a=n[d];o[a]?(o[a].minOrder=Math.min(o[a].minOrder,i),o[a].maxOrder=Math.max(o[a].maxOrder,i),o[a].innerValues[o[a].innerValues.length]={id:r.qElemNumber,order:i}):o[a]={id:n.qElemNumber,qText:n.qText,minOrder:i,maxOrder:i,innerValues:[{id:r.qElemNumber,order:i}],dataNode:u[t]},0===t?0===i&&(o[a].isMinOrderOk=!0):a!==e&&(o[a].isMinOrderOk=!0,o[e].isMaxOrderOk=!0),e=a}})():(()=>{for(let e=0;e<u.length;e++){const t=u[e][0],n=e+f,r=t[d];o[r]||(o[r]={id:t.qElemNumber,qText:t.qText,minOrder:n,maxOrder:n,dataNode:u[e]})}})(),o},getInputValue:bN,extractInfoFromInputValue:xN,resolveValue:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const r=bN({refLineLayout:e,layoutService:n});return xN(r,t,"id")},isDiscreteMinOutOfBounds:SN,isDiscreteMaxOutOfBounds:wN,isContinuousMinOutOfBounds:MN,isContinuousMaxOutOfBounds:kN,isOutOfRange:({value:e,qMin:t,qMax:n})=>MN({value:e,qMin:t})||kN({value:e,qMax:n}),isOutOfDataPages:({label:e,dataPages:t})=>e.valueInfo.isMinOrderOk&&wN({label:e,dataPages:t})||e.valueInfo.isMaxOrderOk&&SN({label:e,dataPages:t}),getInvert:({orientation:e,rtl:t,isContinuous:n})=>"horizontal"===e?t:n},qN=({label:e,labelStyle:t})=>[e?.fontStyle||t?.fontStyle,e?.fontWeight||t?.fontWeight,e?.fontSize||t?.fontSize,e?.fontFamily||t?.fontFamily].filter(e=>!!e).join(" ");function EN(e){return e.showValue?`… ${e.valueString}`:"…"}function DN(e,t,n=70){for(let r=0;r<e.length;r++){const i=e[r],o=qN({label:i,labelStyle:t});i.lines=UO.tokenize(i.title,o,EN(i),3,n),i.maxNumLines=i.lines.length}}function TN({title:e,font:t,ellipsis:n,maxNumLines:r=5,maxWidth:i=200}){const o=UO.tokenize(e,t,n,r,i),a=o.length;let s="";if(a){[s]=o;for(let e=1;e<a;e++)s=`${s}\n${o[e]}`}return s}function ON({oobs:e,font:t,ellipsis:n,maxNumLines:r=5,maxWidth:i=200}){const o=e.map(e=>TN({title:e.title,font:t,ellipsis:`${n} ${e.valueString}`,maxNumLines:r,maxWidth:i})),a=o.length;let s="";if(a){[s]=o;for(let e=1;e<a;e++)s=`${s}\n\n${o[e]}`}return s}function NN(e,t="value"){e.sort((e,n)=>e[t]-n[t])}const AN=3,_N=2;function IN({inputValue:e,inputValueLabel:t,localeInfo:n}){if(void 0===e||void 0===t||e.toString()===t)return!1;if(!n)return!0;const r=`+-${n.qDecimalSep||""}${n.qThousandSep||""}`.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&");return t.replace(new RegExp(`[0-9e${r}]`,"g"),"").length>0||function(e){if(e.indexOf("e")>-1)return!1;const t=e.indexOf("-");return-1!==t&&(e.lastIndexOf("-")!==t||0!==t)}(t)}const LN=({label:e,dataPages:t,qMin:n,qMax:r})=>{if(void 0!==n&&void 0!==r){const{inputValue:t}=e;if(CN.isContinuousMaxOutOfBounds({value:t,qMax:r}))return 1;if(CN.isContinuousMinOutOfBounds({value:t,qMin:n}))return-1}return CN.isDiscreteMaxOutOfBounds({label:e,dataPages:t})?1:CN.isDiscreteMinOutOfBounds({label:e,dataPages:t})?-1:0},PN={hasEngineFormat:IN,calculateLabelPositions({labels:e,scale:t,size:n,layoutService:r,orientation:i,rtl:o,isContinuous:a,isDimension:s}){const l=CN.getInvert({orientation:i,rtl:o,isContinuous:a}),c="S"===r.getHyperCubeValue("qMode")?"qDataPages.0":"qStackedDataPages.0",u=r.getHyperCubeValue(c),{canBeContinuous:d}=r.meta;let f,h;if(s&&d){const e=r.getLayoutValue("qHyperCube.qDimensionInfo.0");f=e.qMin,h=e.qMax}for(let i=0;i<e.length;i++){const o=e[i],{value:s,align:c,valueInfo:d}=o,p=LN({label:o,dataPages:u,qMin:f,qMax:h});o.scaledValue=1===p?l?-.1:1.1:-1===p?l?1.1:-.1:CN.getScaledPosition({scale:t,size:n,value:s,valueInfo:d,align:c,invert:l,layoutService:r,isContinuous:a}),o.center=o.scaledValue*n}},getTitle:e=>!1!==e.showValue?!1!==e.showLabel?`${e.text} ${e.valueString}`:e.valueString:!1!==e.showLabel?e.text:"",addLabelTitles({labels:e,formatter:t,isContinuous:n,canBeContinuous:r,localeInfo:i}){let o;if(n)for(let n=0;n<e.length;n++){const r=e[n],{value:a,inputValue:s,inputValueLabel:l}=r;o=IN({inputValue:s,inputValueLabel:l,localeInfo:i})?l:t?t(a):a,r.valueString=`${FT.lrm}(${o})${FT.lrm}`,r.title=PN.getTitle(r)}else if(r)for(let t=0;t<e.length;t++){const n=e[t],{valueText:r,inputValue:a,inputValueLabel:s}=n;o=IN({inputValue:a,inputValueLabel:s,localeInfo:i})?s:r,n.valueString=`${FT.lrm}(${o})${FT.lrm}`,n.title=PN.getTitle(n)}else for(let t=0;t<e.length;t++){const n=e[t];o=n.valueText,n.valueString=`${FT.lrm}(${o})${FT.lrm}`,n.title=PN.getTitle(n)}},measureLabelsWidth(e,t){for(let n=0;n<e.length;n++){const r=e[n];r.totalWidth=t(r.title,r).width}},measureLabelMaxLineWidth(e,t){const n=Math.max(...e.lines.map(n=>t(n,e).width));return n},getMaxTextWidth(e){const t=e.map(e=>e.totalWidth);return Math.max(...t)},addLabelsNeighborInfo(e,t,n,r=0){const i=e.length-1;if(i<0)return;let o,a;if([o]=e,o.cMin=t,0!==i){for(let t=0;t<i;t++)o=e[t],a=e[t+1],o.cMax=(o.center+a.center-r)/2,a.cMin=o.cMax+r;a.cMax=n}else o.cMax=n},getTotalNumLines(e){let t=0;return e.forEach(e=>{t+=e.maxNumLines}),t},reduceLabelsHavingMaxNumLines(e,t,n){const r=t-1,i=e.filter(e=>e.maxNumLines===t),o=Math.min(n,i.length);for(let e=i.length-1;e>=i.length-o;e--)i[e].maxNumLines=r},reduceTotalMaxNumLines(e,t,n){const r=Math.floor(n/t);let i=3;do{const t=PN.getTotalNumLines(e)-r;if(t<=0)return;PN.reduceLabelsHavingMaxNumLines(e,i,t),i--}while(i>1)},reduceMaxNumLines(e,t,n=0){for(let r=0;r<e.length;r++){const i=e[r];i.maxNumLines=Math.max(1,Math.min(i.maxNumLines,Math.floor((Math.max(0,i.cMax-i.cMin)+n)/t)))}},addLabelsSize(e,t,n=15,r){for(let i=0;i<e.length;i++){const o=e[i];o.width=Math.min(t,PN.measureLabelMaxLineWidth(o,r)),o.height=o.lines.length*n}},addLabelSegments(e,t){for(let n=0;n<e.length;n++){const r=e[n],{center:i}=r,o=r[t],a=o/2;r.segment={center:i,range:o,min:i-a,max:i+a,radius:a}}},addLabelsInfo({labels:e,scale:t,majorSize:n,lowerLimit:r,upperLimit:i,gap:o,labelStyle:a,maxLabelWidth:s,lineHeight:l,majorDimension:c,orientation:u,measureText:d,rtl:f,layoutService:h,isContinuous:p,isDimension:m}){const g=e.map(e=>e),y=n;PN.calculateLabelPositions({labels:e,scale:t,size:y,layoutService:h,orientation:u,rtl:f,isContinuous:p,isDimension:m}),NN(e,"center"),PN.addLabelsNeighborInfo(e,r,i,o),DN(e,a,s),PN.reduceTotalMaxNumLines(g,l,i-(g.length-1)*o),"vertical"===u&&(PN.reduceMaxNumLines(e,l,.05*o),function(e,t,n=70){for(let r=0;r<e.length;r++){const i=e[r],o=qN({label:i,labelStyle:t});i.lines.length>i.maxNumLines&&(i.lines=UO.tokenize(i.title,o,EN(i),i.maxNumLines,n))}}(e,a,s)),PN.addLabelsSize(e,s,l,d),PN.addLabelSegments(e,c)},createLabels({labels:e,style:t,maxLabelWidth:n,areaProps:r,area:i,lineHeight:o=15,font:a}){const{majorAxis:s,minorAxis:l,dock:c}=r,{minorCenter:u}=i,{fontSize:d,fontFamily:f,fontStyle:h,fontWeight:p,textDecoration:m,background:g}=t;let y=[];return e.forEach(e=>{const{lines:t}=e,r=t.length,i=t.map((t,i)=>{const g={type:"text",text:t,title:TN({title:e.title,font:a,ellipsis:EN(e)}),dx:0,dy:0,maxWidth:n,width:n,fontSize:e.fontSize||d,fontFamily:e.fontFamily||f,fontStyle:e.fontStyle||h,fontWeight:e.fontWeight||p,textDecoration:e.textDecoration||m,fill:e.fill,baseline:"central",anchor:"middle",value:e.value,dock:c};return g[l]=u,g[s]=e.segment.position,g.y+=(i-(r-1)/2)*o,g});e.background&&y.push(function({minorCenter:e,majorAxis:t,minorAxis:n,dock:r,label:i,lineHeight:o,background:a}){const{lines:s}=i,{borderRadius:l=AN,padding:c={}}=a,{top:u=_N,bottom:d=_N,left:f=_N,right:h=_N}=c,p=s.length,m={type:"rect",rx:l,ry:l,fill:i.background.fill,width:i.width+(f+h),height:i.height+(u+d),value:i.value,dock:r};return m[n]=e,m[t]=i.segment.position,m.x-=i.width/2+f,m.y-=p*o/2+u,m}({minorCenter:u,majorAxis:s,minorAxis:l,dock:c,label:e,lineHeight:o,background:g})),y=y.concat(i)}),y}};function RN(e,t,n){let r;const i=typeof t;if("string"===i||"object"===i)r=e.formatter(t);else if(void 0!==n&&n.data){const e=n.data()&&n.data().fields;r=e&&e[0]?e[0].formatter():null}return r}function zN(e,t,n){return"top"===e||"bottom"===e?function(e,t){const{lineHeight:n,top:r,bottom:i,maxLabelWidth:o}=t;let a=1;return PN.getMaxTextWidth(e)>o&&(DN(e,t,o),a=Math.max(...e.map(e=>e.lines.length))),a*n+r+i}(t,n):function(e,t){const{left:n,right:r,maxLabelWidth:i}=t;return Math.min(i,PN.getMaxTextWidth(e))+n+r}(t,n)}function FN(e,t){return t?e.domain():[0,1]}function jN(e,t,n,r="value"){let i=e.filter(e=>e[r]>=t);i=i.filter(e=>e[r]<=n);const o=e.filter(e=>e[r]<t),a=e.filter(e=>e[r]>n);return{filteredLabels:i,minOobs:o,maxOobs:a,numMinOobs:o.length,numMaxOobs:a.length}}function BN(e){let t,n=0;for(let r=1;r<10;r++)t=e(r),n=Math.max(n,Math.sqrt(t.width*t.width+t.height*t.height));return t=e("9+"),[n,Math.max(n,Math.sqrt(t.width*t.width+t.height*t.height))]}function VN(e,t){return e>9?t[1]:t[0]}function HN({alignment:e,dockValue:t,oobs:n,style:r,rect:i,symbol:o,position:a,areaProps:s,radius:l,font:c}){const u=n?n.length:0;if(u<1)return[];const{flipXY:d,majorAxis:f,minorAxis:h,minorDimension:p,dock:m}=s,g=i[p],y=YO.createOob({oob:YO.getDefaultSettings({size:r.size,fill:r.fill,alignment:e}),dockValue:t,boxCenter:.5,rendWidth:i.width,rendHeight:i.height,flipXY:d,symbol:o});y.dock=m;const v=`c${f}`,b=`c${h}`,x={type:"circle",r:l,stroke:"transparent",fill:r.text.background.fill,strokeWidth:0,dock:m};x[b]=g/2,x[v]=a;const S={type:"text",text:u>9?"9+":u,title:ON({oobs:n,font:c,ellipsis:"…"}),dx:0,dy:0,maxWidth:g,width:g,fontSize:r.text.fontSize,fontFamily:r.text.fontFamily,fill:r.text.fill,baseline:"central",anchor:"middle",dock:m};return S[h]=g/2,S[f]=a,[y,x,S]}const $N=e=>{const t=qN({labelStyle:e}),n=UO.getFontHeight(t)*(e.lineHeightMultiplicator||1),r=e.gap||12,i=e.maxWidth||75,o=e.padding.top||0,a=e.padding.bottom||0,s=e.padding.left||0,l=e.padding.right||0;return{...e,font:t,lineHeight:n,gap:r,maxLabelWidth:i,top:o,bottom:a,left:s,right:l}},WN=e=>e.map(e=>({...e,value:"function"==typeof e.value?e.value():e.value,valueText:"function"==typeof e.valueText?e.valueText():e.valueText,valueInfo:"function"==typeof e.valueInfo?e.valueInfo():e.valueInfo}));var UN={require:["renderer","chart","symbol"],defaultSettings:{layout:{displayOrder:0,prioOrder:0}},preferredSize(){const{scale:e}=this,{style:t,layoutService:n,isContinuous:r,localeInfo:i}=this.settings,o=!!r||n.meta.canBeContinuous,a=WN(this.settings.labels),s=RN(this.chart,this.settings.formatter,e);PN.addLabelTitles({labels:a,formatter:s,isContinuous:r,canBeContinuous:o,localeInfo:i});const{numMaxOobs:l,numMinOobs:c,filteredLabels:u}=(({labels:e,scale:t,isContinuous:n,canBeContinuous:r,layoutService:i})=>{if(n){const[r,i]=FN(t,n);return jN(e,r,i)}if(r){const t=i.getLayoutValue("qHyperCube.qDimensionInfo.0"),{qMin:n,qMax:r}=t;if("NaN"!==n&&"NaN"!==r)return jN(e,n,r,"inputValue")}return{filteredLabels:e}})({labels:a,scale:e,isContinuous:r,canBeContinuous:o,layoutService:n});let d;if(this.measureText=(e,n)=>{const{fontSize:r,fontFamily:i,fontWeight:o}=n||{};return this.renderer.measureText({text:e,fontWeight:o||t.label.fontWeight,fontSize:r||t.label.fontSize,fontFamily:i||t.label.fontFamily})},u&&u.length){const e=$N(t.label),{dock:n}=this.settings.layout;return PN.measureLabelsWidth(u,this.measureText),d=zN(n,u,e),d}const f=BN(this.measureText),h=l?VN(l,f):0,p=c?VN(c,f):0;return d=Math.max(h,p),d},render(){const{scale:e}=this;if(!e.domain().length)return;const{symbol:t}=this,{style:n,layoutService:r,theme:i,isContinuous:o,isDimension:a,localeInfo:s}=this.settings,l=!!o||r.meta.canBeContinuous,c=WN(this.settings.labels),{dock:u,rtl:d}=this.settings.layout,{padding:f}=n.label,h=function(e){return"left"===e||"right"===e?(e=>({dock:e,orientation:"vertical",majorAxis:"y",minorAxis:"x",majorDimension:"height",minorDimension:"width",flipXY:!1}))(e):(e=>({dock:e,orientation:"horizontal",majorAxis:"x",minorAxis:"y",majorDimension:"width",minorDimension:"height",flipXY:!0}))(e)}(u),p=function(e,t,n){const r=e[t.minorDimension];return{minorSize:r,majorSize:e[t.majorDimension],minorCenter:"vertical"===t.orientation?(r-n.right-n.left)/2+n.left:(r-n.top-n.bottom)/2+n.top}}(this.rect,h,f),{orientation:m,majorDimension:g}=h,{majorSize:y}=p,v=$N(n.label),{font:b,lineHeight:x,gap:S,maxLabelWidth:w}=v,M=RN(this.chart,this.settings.formatter,e),k=y;PN.addLabelTitles({labels:c,formatter:M,isContinuous:o,canBeContinuous:l,localeInfo:s}),PN.calculateLabelPositions({labels:c,scale:e,size:k,layoutService:r,orientation:m,rtl:d,isContinuous:o,isDimension:a});const[C,q]=FN(e,o),{filteredLabels:E,lowerOobs:D,upperOobs:T,lowerCircleSize:O,upperCircleSize:N,lowerOobSpace:A,upperOobSpace:_}=function({labels:e,minValue:t,maxValue:n,orientation:r,rtl:i,isContinuous:o,style:a,padding:s,measureText:l,prop:c="value"}){const{maxOobs:u,minOobs:d,filteredLabels:f}=jN(e,t,n,c),h="scaledValue"!==c&&CN.getInvert({orientation:r,rtl:i,isContinuous:o}),p=function(e,t,n){return n?t:e}(d,u,h),m=function(e,t,n){return n?e:t}(d,u,h),g=p.length,y=m.length,v=BN(l),b=VN(g,v),x=VN(y,v),S=function(e,t,n,r,i){return("vertical"===r?i.top:i.left)+(e>0?t+n:0)}(g,a.oob.size,b,r,s),w=function(e,t,n,r,i){return("vertical"===r?i.bottom:i.right)+(e>0?t+n:0)}(y,a.oob.size,x,r,s);return{filteredLabels:f,lowerOobs:p,upperOobs:m,lowerCircleSize:b,upperCircleSize:x,lowerOobSpace:S,upperOobSpace:w}}({labels:c,minValue:C,maxValue:q,orientation:m,rtl:d,isContinuous:o,style:n,padding:f,measureText:this.measureText,prop:o?"value":"scaledValue"}),I=A,L=y-_;NN(D),NN(T);const P=HN({alignment:0,dockValue:0,oobs:D,style:n.oob,rect:this.rect,symbol:t,position:n.oob.size+O/2,areaProps:h,radius:O/2,font:b}),R=HN({alignment:1,dockValue:1,oobs:T,style:n.oob,rect:this.rect,symbol:t,position:y-(n.oob.size+N/2),areaProps:h,radius:N/2,font:b});PN.addLabelsInfo({labels:E,scale:e,majorSize:y,lowerLimit:I,upperLimit:L,labelStyle:v,lineHeight:x,gap:S,maxLabelWidth:w,majorDimension:g,orientation:m,measureText:this.measureText,rtl:d,layoutService:r,isContinuous:o,isDimension:a}),dN.layout(E.map(e=>e.segment),I,L,n.label.gap);const z=E.filter(e=>dN.isInside(e.segment,I,L,o));return PN.createLabels({labels:z,style:n.label,maxLabelWidth:w,areaProps:h,area:p,lineHeight:x,font:b,theme:i}).concat([...P,...R])}};var YN={dataRelatedPropertiesPaths:["qHyperCube.qGrandTotalRow","qHyperCube.qHasOtherValues","qHyperCube.qSize","qHyperCube.qDimensionInfo[].qAttrDimInfo","qHyperCube.qDimensionInfo[].qAttrExprInfo","qHyperCube.qDimensionInfo[].qCardinalities","qHyperCube.qDimensionInfo[].qMax","qHyperCube.qDimensionInfo[].qMin","qHyperCube.qDimensionInfo[].qStateCounts","qHyperCube.qMeasureInfo[].qApprMaxGlyphCount","qHyperCube.qMeasureInfo[].qAttrExprInfo","qHyperCube.qMeasureInfo[].qMax","qHyperCube.qMeasureInfo[].qMin","qHyperCube.qMeasureInfo[].qTrendLines","qHyperCube.qTreeNodesOnDim","qSelectionInfo","plugins[].validMeasureValue","plugins[].labelBackgroundColor","plugins[].labelColor","plugins[].hasBackground","plugins[].maxLabelWidth","plugins[].points[].validMeasureValue","plugins[].points[].labelBackgroundColor","plugins[].points[].labelColor","plugins[].points[].hasBackground","plugins[].points[].maxLabelWidth"]};function KN(e){const{qHyperCube:t,...n}=e,{qAxisData:r,qDataPages:i,qStackedDataPages:o,qTreeDataPages:a,...s}=t,l=kg(!0,{},{...n,qHyperCube:{...s}}),{dataRelatedPropertiesPaths:c}=YN;function u(e,t){const n=t.indexOf("[]");if(-1===n)return void(void 0!==Zx(e,t)&&eS(e,t,void 0));const r=t.substring(0,n),i=t.substring(n+2),o=i.startsWith(".")?i.substring(1):i;Zx(e,r,[]).forEach(e=>{o&&u(e,o)})}return c.forEach(e=>{u(l,e)}),l}var GN={axes:{trackBy:function({isTime:e,isContinuous:t,isMeasure:n,isMajor:r}){return i=>{if(e||t||n){if("line"===i.type)return i.tickValue??"axis";if("text"===i.type)return`${i.tickValue} ${i.text}`;if("container"===i.type){const e=i.children.filter(e=>"text"===e.type).map(e=>e.text);return`${i.data.value} ${e.join("")}`}return Math.random()}if(r){if("line"===i.type&&void 0===i.tickValue)return"axis";const e=i.transform&&i.transform.match(/rotate/gi)?"rotated":"horizontal";return`${i.data.group?`${i.data.group.value} `:""}${i.data.value} ${i.text} ${e}`}return Math.random()}},compensateForLayoutChanges:function({isMeasure:e,isTime:t,isContinuous:n,isHorizontal:r,dock:i}){return({currentNodes:o,currentRect:a,previousRect:s})=>{const l=a.x-s.x,c=a.y-s.y,u=a.width-s.width,d=a.height-s.height;e?("left"===i&&o.forEach(e=>{"line"===e.type?(e.x1+=u,e.x2+=u):"text"===e.type&&(e.x+=u)}),"left"!==i&&"right"!==i||o.forEach(e=>{"line"===e.type&&(e.x1===e.x2?(e.y1=a.y,e.y2=e.y1+a.height):(Math.round(e.y1)<a.y||e.y1>a.y+a.height)&&(e.strokeWidth=0)),"text"===e.type&&(e.y<a.y||e.y>a.y+a.height)&&(e.fontSize="1px","#"===e.fill?.[0]&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`))}),"top"!==i&&"bottom"!==i||o.forEach(e=>{"line"===e.type&&(e.y1===e.y2?(e.x1=a.x,e.x2=e.x1+a.width):(Math.round(e.x1)<a.x||e.x1>a.x+a.width)&&(e.strokeWidth=0)),"text"===e.type&&(e.x<a.x||e.x>a.x+a.width)&&(e.fontSize="1px","#"===e.fill?.[0]&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`))})):t?o.forEach(e=>{"line"===e.type?e.y1===e.y2?e.x2+=u:e.x1===e.x2&&(e.x1-=l,e.x2-=l):"text"===e.type&&(e.x-=l)}):n||r?o.forEach(e=>{"line"===e.type&&e.y1===e.y2&&(e.x1+=l,e.x2+=l+u)}):o.forEach(e=>{"line"===e.type&&e.x1===e.x2&&(e.y1+=c,e.y2+=c+d)})}}},bars:{trackBy:function(e){return e.data.typeIndex?`${e.data.value} ${e.data.typeIndex.value}`:e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:`${e.data.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach(e=>{e.children&&e.children.length>0&&e.children.forEach(e=>{void 0!==e.x&&void 0!==e.y?(e.x-=r,e.y-=i):e.transform=`translate(${-r}, ${-i})`})})}},barOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x;0===t.y-n.y&&0===r||e.forEach(e=>{e.children&&e.children.length>0&&e.children.forEach(e=>{e.opacity=0})})}},labels:{trackBy:function(e){if("rect"===e.type)return"-3"===e.data?Math.random():`${e.type} ${e.data} ${e.rotation}`;const t=e.transform&&e.transform.match(/rotate/gi)?"rotated":"horizontal";return`${e.type} ${e.data} ${e.text} ${t}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach(e=>{e.transform&&e.transform.match(/rotate\(-90/gi)?(e.x+=i,e.y-=r):(e.x-=r,e.y-=i)})},linkData:function(e){return e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:`${e.data.value}`}},lines:{trackBy:function(e){return"line"===e.type?e.value??Math.random():"path"===e.type?`${e.generatorType} ${e.layerObj.id} ${e.data.source.key}`:Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;e.forEach(e=>{if(void 0!==e.x1&&void 0!==e.y1)e.y1===e.y2?(e.x2=e.x1+t.width,e.y1-=i,e.y2-=i):e.x1===e.x2&&(e.y2=e.y1+t.height,e.x1-=r,e.x2-=r);else{const t="x"===e.major.p?r/e.major.size:i/e.major.size,n="y"===e.minor.p?i/e.minor.size:r/e.minor.size;e.points.forEach(e=>{e.modified||(e.major-=t,e.minor-=n,e.minor0-=n,e.modified=!0)})}})}},lineOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x;0===t.y-n.y&&0===r||e.forEach(e=>{e.opacity=0})}},markers:{trackBy:function(e){return e.data.line?`${e.data.line.value} ${e.data.major.value}`:`${e.data.major.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach(e=>{switch(e.type){case"circle":e.cx-=r,e.cy-=i;break;case"rect":e.x-=r,e.y-=i;break;case"path":e.transform=`translate(${-r}, ${-i})`}})}},points:{trackBy:function(e){return e.data.line?`${e.data.line.value} ${e.data.major.value}`:`${e.data.major.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach(e=>{"image"===e.type?(e.x-=r,e.y-=i):(e.cx-=r,e.cy-=i)})}},refLineLabels:{trackBy:function(e){if(void 0!==e.value){if("rect"===e.type)return`${e.value}`;if("text"===e.type)return`${e.value} ${e.text}`}return Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y,o=t.width-n.width,a=t.height-n.height;let s=-r,l=-i;e.forEach(e=>{switch(e.dock){case"right":r>0&&(s=t.width);break;case"left":o<0&&(s=-n.width);break;case"top":a<0&&(l=-n.height);break;case"bottom":i>0&&(l=t.height)}switch(e.type){case"text":case"rect":e.x+=s,e.y+=l;break;case"circle":e.cx+=s,e.cy+=l;break;case"path":e.transform=`translate(${s}, ${l})`}})}},shadowBars:{trackBy:function(){return Math.random()}},cacheProperties:function({viewCache:e,layout:t}){const n=KN(t);e.set("dataIndependentProperties",JSON.stringify(n))},propertiesHaveChanged:function({viewCache:e,layout:t}){const n=KN(t);return e.get("dataIndependentProperties")!==JSON.stringify(n)},nonUpdatingNode:{trackBy:function(){return Math.random()}}};const{getInputValue:XN,extractInfoFromInputValue:JN,resolveValue:ZN}=CN;var QN={resolveValue:ZN,resolveInnerValues:({refLineLayout:e,refLineModel:t,layoutService:n})=>{if(n.meta.isGroupedByDimension){const r=XN({refLineLayout:e,layoutService:n});return JN(r,t,"innerValues")}},resolveNumInnerValues:({refLineLayout:e,refLineModel:t,layoutService:n})=>{if(n.meta.mode.K)return 0;const r=XN({refLineLayout:e,layoutService:n});return JN(r,t,"numInnerValues")||0},resolveValueText:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const{dimensionValuesInfo:r}=t,{canBeContinuous:i}=n.meta,o=XN({refLineLayout:e,layoutService:n});return r[o]&&i?r[o].qText:o},resolveValueInfo:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const r=XN({refLineLayout:e,layoutService:n}),{dimensionRefLineInfo:i}=t;return i[r]}};function eA({isDimension:e,refLineModel:t={},layoutService:n,colorModel:r,dockService:i,animationsEnabled:o,chart:a,scale:s,axis:l,rtl:c,key:u,mainComponentKey:d,path:f,minimumLayoutMode:h}){const p=e?t.dimensionRefLines:f?t.query.getRefLines(f):t.measureRefLines;if(!p.length)return!1;const m={key:u,type:"ref-line",layout:{minimumLayoutMode:h},lines:{y:[],x:[]},style:{oob:{show:!1}},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}),animations:{enabled:o,trackBy:GN.lines.trackBy,compensateForLayoutChanges:GN.lines.compensateForLayoutChanges}},g=!(!e||"horizontal"!==i.meta.major.orientation||!c),y=!e||n.meta.isContinuous;return p.forEach(o=>{m.lines[l].push((({isDimension:e,refLineLayout:t,refLineModel:n,layoutService:r,colorModel:i,dockService:o,chart:a,scale:s,axis:l,invert:c,component:u,isContinuous:d})=>{const f={dir:l,line:{strokeWidth:t?.style?.lineThickness||2,strokeDasharray:t?.style?.lineType,stroke:i.resolveUIColor(t.paletteColor||{index:t.color})}};return!e||r.meta.isContinuous?(f.scale=s,f.value=t.refLineExpr.value):(f.valueInfo=QN.resolveValueInfo({refLineLayout:t,refLineModel:n,layoutService:r}),f.value=()=>{const e=CN.getScaledPosition({scale:a.scale(s),value:QN.resolveValue({refLineLayout:t,refLineModel:n,layoutService:r}),valueInfo:f.valueInfo,size:a.component(u)?.rect["horizontal"===o.meta.major.orientation?"width":"height"],align:t.align,invert:c,layoutService:r,isContinuous:d});return Number.isNaN(e)?void 0:e}),f})({isDimension:e,refLineLayout:o,refLineModel:t,layoutService:n,colorModel:r,dockService:i,chart:a,scale:s,axis:l,invert:g,component:d,isContinuous:y}))}),m}function tA({isDimension:e,refLineModel:t={},layoutService:n,colorModel:r,animationsEnabled:i,dock:o,scale:a,style:s,formatter:l,theme:c,localeInfo:u,rtl:d,key:f,path:h}){const p=e?t.dimensionRefLineLabels:h?t.query.getRefLineLabels(h):t.measureRefLineLabels;if(!p.length)return[];const m=[],g=!e||n.meta.isContinuous,y=p.map(e=>(({refLineLayout:e,refLineModel:t,layoutService:n,colorModel:r,scale:i,theme:o,isContinuous:a})=>{const s=r.resolveUIColor(e.paletteColor||{index:e.color}),{align:l,style:c}=e,{fontSize:u,fontFamily:d,fontStyle:f,fontWeight:h,textDecoration:p}=c||{},m={align:l,text:e.label,fill:e.coloredBackground?o.getContrastingColorTo(s):s,fontSize:u,fontFamily:d,fontStyle:f,fontWeight:h,textDecoration:p,showValue:!1!==e.showValue,showLabel:!1!==e.showLabel,inputValue:e.refLineExpr.value,inputValueLabel:e.refLineExpr.label};return e.coloredBackground&&(m.background={fill:s}),a?(m.scale=i,m.value=e.refLineExpr.value):(m.value=()=>QN.resolveValue({refLineLayout:e,refLineModel:t,layoutService:n}),m.valueText=()=>QN.resolveValueText({refLineLayout:e,refLineModel:t,layoutService:n}),m.valueInfo=()=>QN.resolveValueInfo({refLineLayout:e,refLineModel:t,layoutService:n})),m})({refLineLayout:e,refLineModel:t,layoutService:n,colorModel:r,scale:a,theme:c,isContinuous:g}));return m.push((({isDimension:e,layoutService:t,animationsEnabled:n,style:r,labels:i,scale:o,formatter:a,dock:s,key:l,rtl:c,theme:u,isContinuous:d,localeInfo:f})=>({key:l,type:"reference-line-labels",renderer:"svg",labels:i,formatter:a,scale:o,layoutService:t,layout:{dock:s,rtl:c},theme:u,isContinuous:d,isDimension:e,localeInfo:f,style:{label:{fontFamily:r.referenceLine.label.name.fontFamily,fontSize:r.referenceLine.label.name.fontSize,fontStyle:r.referenceLine.label.name.fontStyle,fontWeight:r.referenceLine.label.name.fontWeight,textDecoration:r.referenceLine.label.name.textDecoration,padding:{top:2,bottom:2,left:c?2:4,right:c?4:2},background:{padding:{top:1,bottom:1,left:2,right:2}},maxWidth:100,gap:"left"===s||"right"===s?10:16},oob:{size:8,fill:r.referenceLine.outOfBounds.backgroundColor,text:{fontFamily:r.referenceLine.outOfBounds.fontFamily,fontSize:r.referenceLine.outOfBounds.fontSize,fill:r.referenceLine.outOfBounds.color,background:{fill:r.referenceLine.outOfBounds.backgroundColor}}}},animations:{enabled:n,trackBy:GN.refLineLabels.trackBy,compensateForLayoutChanges:GN.refLineLabels.compensateForLayoutChanges}}))({isDimension:e,rtl:d,style:s,dock:o,key:f,labels:y,scale:a,formatter:l,layoutService:n,animationsEnabled:i,theme:c,isContinuous:g,localeInfo:u})),m}function nA({layoutService:e,discreteModel:t}){const{isContinuous:n,canBeContinuous:r,isGroupedByDimension:i}=e.meta,o=e.getLayout(),a="K"===o.qHyperCube.qMode,s=CT.dimensionless(o),l=CN.getMeasureRefLines(o),c=CN.getDimensionRefLines(o,s),u=CN.getMeasureRefLineLabels(o),d=CN.getDimensionRefLineLabels(o,s);let f={},h={};const p=()=>!(!c||!c.length)&&!c.every(t=>{const o=CN.getInputValue({refLineLayout:t,layoutService:e});return(t=>{if(r){const n=e.getLayoutValue("qHyperCube.qDimensionInfo.0"),{qMin:r,qMax:i}=n;return CN.isOutOfRange({value:t,qMin:r,qMax:i})}return!1})(o)||(t=>{if(!h[t])return!1;if(!n&&i){const n={valueInfo:h[t]},r="S"===e.getHyperCubeValue("qMode")?"qDataPages.0":"qStackedDataPages.0",i=e.getHyperCubeValue(r);return CN.isOutOfDataPages({label:n,dataPages:i})}return!0})(o)}),m={isKMode:a,canBeContinuous:r,measureRefLines:l,dimensionRefLines:c,measureRefLineLabels:u,dimensionRefLineLabels:d,dimensionRefLineInfo:h,dimensionValuesInfo:f,query:{getRefLines:e=>CN.getRefLines(o,e),getRefLineLabels:e=>CN.getRefLineLabels(o,e)},update:()=>{h=m.dimensionRefLineInfo,p()&&(f=CN.getDimensionValuesInfo({layout:o,canBeContinuous:r,discreteModel:t,layoutService:e}),m.dimensionValuesInfo=f,c.forEach(t=>{const n=CN.getInputValue({refLineLayout:t,layoutService:e});f[n]&&(h[n]?(h[n].innerValues=f[n].innerValues,h[n].minOrder=Math.min(h[n].minOrder,f[n].minOrder),h[n].maxOrder=Math.max(h[n].maxOrder,f[n].maxOrder),h[n].isMinOrderOk=h[n].isMinOrderOk||f[n].isMinOrderOk,h[n].isMaxOrderOk=h[n].isMaxOrderOk||f[n].isMaxOrderOk):h[n]={id:f[n].id,qText:f[n].qText,innerValues:f[n].innerValues,minOrder:f[n].minOrder,maxOrder:f[n].maxOrder,isMinOrderOk:f[n].isMinOrderOk,isMaxOrderOk:f[n].isMaxOrderOk},h[n].numInnerValues=(h[n].maxOrder||0)-(h[n].minOrder||0)+1)}))}};return m.update(),m}function rA(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?void 0:"svg"}const iA={ref:null,refFn:e=>{const t=e.qHyperCubeDef.qMeasures?.findIndex(e=>"colorByExpression"===e.qAttributeExpressions?.[0]?.id);return`qHyperCubeDef.qMeasures.${-1===t?0:t}.qAttributeExpressions.0.qExpression`},change(e){const t=e.qHyperCubeDef?.qMeasures?.findIndex(e=>"colorByExpression"===e.qAttributeExpressions?.[0]?.id),n=ST.getValue(e,`qHyperCubeDef.qMeasures.${-1===t?0:t}.qAttributeExpressions.0`),r=ST.getValue(e,"color");n&&(n.id="colorByExpression",r&&(r.colorExpression=n.qExpression))}};function oA({color:e,colorModel:t}){if(!e)return;const n=t.resolveUIColor(e);if("none"===n)return"transparent";const r=ly(n);return r.setAlpha(e?.alpha>=0?e.alpha:1),r.isInvalid()?void 0:r.getRGBA()}function aA({point:e,dimensionValueInfo:t,layoutService:n}){const{dimensionValue:r}=e,i=""===e.measureValue?void 0:+e.measureValue;if(oN.isNumber(i))return i;const{dimensionCount:o,measureCount:a}=n.meta;if(2===o)return 0;const s=e.measureIndex?+e.measureIndex:0;return oN.isNumber(s)&&!(s>=a||0===o)&&1===o?t[r]?.dataNode[s+1]?.qNum:void 0}const sA={index:-1,color:"#595959"};function lA({chart:e,chartModel:t,discreteModel:n,colorService:r,themeService:i,layoutService:o,dockService:a,rtl:s,majorScale:l,minorScale:c,mainComponentKey:u,data:d,key:f}){if(!Array.isArray(d)||0===d.length)return!1;const h={resolveUIColor:r.getMain().getPaletteColor},p=i.getTheme(),m="horizontal"===a.meta.major.orientation,g=!(!m||!s),{canBeContinuous:y,isContinuous:v,isButterfly:b}=o.meta,x=o.getLayout(),S=function({layout:e,colorModel:t}){const n=e?.components?.find(e=>"general"===e.key);if(n?.bgColor?.useColorExpression){const e=ly(n?.bgColor?.colorExpression);return e.isInvalid()?void 0:e.getRGBA()}const r=n?.bgColor?.color;return oA({color:r,colorModel:t})}({layout:x,colorModel:h})??p.getStyle("object","","backgroundColor"),w=CN.getDimensionValuesInfo({layout:x,canBeContinuous:y,discreteModel:n,layoutService:o}),M=v?d:d.filter(e=>!!w[e.dimensionValue]),k={},C=M.map(e=>e.dimensionValue);C.forEach(e=>{w[e]&&(k[e]?(k[e].innerValues=w[e].innerValues,k[e].minOrder=Math.min(k[e].minOrder,w[e].minOrder),k[e].maxOrder=Math.max(k[e].maxOrder,w[e].maxOrder),k[e].isMinOrderOk=k[e].isMinOrderOk||w[e].isMinOrderOk,k[e].isMaxOrderOk=k[e].isMaxOrderOk||w[e].isMaxOrderOk):k[e]={id:w[e].id,dataNode:w[e].dataNode,qText:w[e].qText,innerValues:w[e].innerValues,minOrder:w[e].minOrder,maxOrder:w[e].maxOrder,isMinOrderOk:w[e].isMinOrderOk,isMaxOrderOk:w[e].isMaxOrderOk},k[e].numInnerValues=(k[e].maxOrder||0)-(k[e].minOrder||0)+1)}),M.forEach(e=>{const t=aA({point:e,dimensionValueInfo:k,layoutService:o});if(e.validMeasureValue=b&&1===e.measureIndex?-t:t,o?.meta?.isStacked){const t=k[e.dimensionValue]?.dataNode;if(Array.isArray(t)&&void 0!==e.measureIndex){const n=t.slice(0,e.measureIndex+2),r=t[e.measureIndex+1]?.qNum;if("number"==typeof r&&0!==r){const t=Math.sign(r);e.validMeasureValue=n.reduce((e,n)=>{const r=n.qNum;return"number"==typeof r&&Math.sign(r)===t?e+r:e},0)}}}const n=oA({colorModel:h,color:e.style?.label?.color||sA}),r=!!e.style?.label?.coloredBackground;e.labelBackgroundColor=r?n:void 0,e.labelColor=r?i.getTheme().getContrastingColorTo(n):n,e.hasBackground=r,e.maxLabelWidth=100});const q={scale:l,fn:({datum:t})=>{const n=e.scale(l),r=t.value.dimensionValue;if(v)return n("string"==typeof r?""===r?void 0:+r:r);if(void 0===k[r])return;return CN.getScaledPosition({scale:n,value:k[r].id,valueInfo:k[r],size:e.component(u)?.rect[m?"width":"height"],align:"center",invert:g,layoutService:o,isContinuous:v})}},E={scale:c,fn:({datum:e,scale:t})=>t(e.value.validMeasureValue)},D={key:f,type:"point",data:M,settings:{x:m?q:E,y:m?E:q,strokeWidth:({datum:e})=>e.value.style?.outlineWidth??e.value.style?.lineThickness??2,stroke:({datum:e})=>oA({colorModel:h,color:e.value.style?.lineColor?.color?e.value.style?.lineColor:{index:-1,color:"#000"}}),fill:({datum:e})=>e.value.style?.fill?.color?oA({colorModel:h,color:e.value.style?.fill}):S,size:({datum:e})=>`${e.value.style?.dataPointSize??12}px`,shape:({datum:e})=>e.value.style?.symbol||"circle"},animations:{enabled:t.query.animationsEnabled,trackBy:e=>e.data.value.cId,compensateForLayoutChanges:GN.points.compensateForLayoutChanges}};return D}const cA=e=>e?.qHyperCube?.qDimensionInfo?.filter(e=>7005!==e.qError?.qErrorCode).length||0,uA=!0,dA=!1,fA={index:0,color:"none"},hA={index:-1,color:"#595959"},pA={index:-1,color:"#595959"},mA=e=>{!e.dimensionValue?.qValueExpression&&e.dimensionValue?.qStringExpression&&(e.dimensionValue.qValueExpression=e.dimensionValue.qStringExpression,delete e.dimensionValue.qStringExpression)},gA=e=>{e.dimensionValue?.qValueExpression&&!e.dimensionValue?.qStringExpression&&(e.dimensionValue.qStringExpression=e.dimensionValue.qValueExpression,delete e.dimensionValue.qValueExpression)},yA=e=>{switch(e.type){case"image":break;case"point":delete e.points,delete e.style?.lineType,delete e.showPoints,delete e.style?.lineCurve;break;case"line":delete e.dimensionValue,delete e.measureValue,delete e.measureIndex,delete e.style?.dataPointSize,delete e.style?.fill,delete e.style?.symbol,delete e.style?.label;break;default:delete e.points,delete e.dimensionValue,delete e.measureValue,delete e.measureIndex,delete e.style?.lineType,delete e.style?.lineThickness,delete e.style?.lineColor,delete e.style?.dataPointSize,delete e.style?.fill}},vA=({translator:e})=>({label:{ref:"label.value",translation:"Common.Label",component:"string",expression:"optional",defaultValue:""},dimensionNumberValue:{ref:"dimensionValue",translation:"properties.dimensionReferenceLines.dimensionValue",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:0,show:(e,t,n)=>vT.canBeContinuous(n.layout)},dimensionStringValue:{ref:"dimensionValue",translation:"properties.dimensionReferenceLines.dimensionValue",component:"string",expression:"optional",defaultValue:"",show:(e,t,n)=>!vT.canBeContinuous(n.layout)},measureInputType:{type:"number",component:"dropdown",translation:"properties.plugins.measureInputType",show:(e,t,n)=>1===cA(n.layout),convertFunctions:{get:(e,t,n,r)=>void 0===r.measureValue?1:0,set(e,t,n,r,i){0===e?(i.measureValue=0,delete i.measureIndex):(i.measureIndex=0,delete i.measureValue)}},options:[{value:0,translation:e.get("properties.plugins.measureInputType.measureValue")},{value:1,translation:e.get("properties.plugins.measureInputType.measureIndex")}]},measureValue:{ref:"measureValue",translation:"properties.plugins.measureInputType.measureValue",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:0,schemaIgnore:!0,show:(e,t,n)=>void 0!==e.measureValue||2===cA(n.layout)},measureIndex:{ref:"measureIndex",translation:"properties.plugins.measureInputType.measureIndex",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:0,show:(e,t,n)=>void 0===e.measureValue&&1===cA(n.layout),invalid:(e,t,n)=>e.measureIndex<0||e.measureIndex>=(e=>e?.qHyperCube?.qMeasureInfo?.filter(e=>7005!==e.qError?.qErrorCode).length||0)(n.layout)}}),bA=e=>({symbol:{type:"string",component:"dropdown",ref:"style.symbol",translation:"Object.GridChart.Symbol",options:[{value:"circle",translation:"Object.GridChart.Symbol.Circle"},{value:"cross",translation:"Object.GridChart.Symbol.Cross"},{value:"diamond",translation:"Object.GridChart.Symbol.Diamond"},{value:"saltire",translation:"Object.GridChart.Symbol.Saltire"},{value:"square",translation:"Object.GridChart.Symbol.Square"},{value:"star",translation:"Object.GridChart.Symbol.Star"},{value:"triangle",translation:"Object.GridChart.Symbol.Triangle"}]},labelPlacement:{type:"string",component:"dropdown",ref:"label.placement",translation:"geo.properties.labelPosition",options:[{value:"auto",translation:"properties.axis.displaymode.auto"},{value:"top",translation:"geo.properties.labelPosition.above"},{value:"bottom",translation:"geo.properties.labelPosition.below"}]},fillColor:{ref:"style.fill",translation:"properties.distributionPlot.pointColor",type:"object",component:"color-picker",disableNone:dA,showAlpha:uA,defaultValue:fA},lineColor:{ref:"style.lineColor",translation:"LayerStyleEditor.style.strokeColor",type:"object",component:"color-picker",disableNone:dA,showAlpha:uA,defaultValue:hA},labelColor:{ref:"style.label.color",translation:"properties.plugins.label.color",type:"object",component:"color-picker",disableNone:dA,showAlpha:uA,defaultValue:pA},colorBackground:{ref:"style.label.coloredBackground",translation:"properties.referenceLines.coloredBackground",type:"boolean",defaultValue:!1,show:!0},outlineWidth:{component:"slider",type:"number",expression:"optional",ref:"style.outlineWidth",translation:"LayerStyleEditor.style.strokeWidth",show:!0,defaultValue:2,min:1,max:6,step:1},dataPointSize:{component:"slider",type:"number",expression:"optional",ref:"style.dataPointSize",translation:"LayerStyleEditor.style.dataPointSize",show:!0,defaultValue:e?12:10,min:3,max:30,step:1}}),xA=({translator:e,pluginOptions:t,supportNewStyles:n=!1})=>{const r={type:"array",ref:"plugins",filter:e=>e.filter(e=>["point","line"].includes(e.type)),translation:"properties.shapes",show:e=>(e?.qHyperCubeDef?.qDimensions||[]).length>0,itemTitleRef:e=>t.filter(t=>t.value===e.type)[0].translation+(e.label?.value?`: ${e.label.value}`:""),allowAdd:!0,allowRemove:!0,allowMove:!0,allowDuplicate:!0,dialog:{ref:"type",options:t},add(e,t){void 0===t.plugins&&(t.plugins=[]),yA(e)},addTranslation:"properties.shapes.addShape",globalChange:(e,t,n)=>{e.plugins&&(e.plugins.forEach(yA),vT.canBeContinuous(n.layout)?e.plugins.forEach(e=>{switch(e.type){case"point":mA(e);break;case"line":(e=>{e.points?.forEach(mA)})(e)}}):e.plugins.forEach(e=>{switch(e.type){case"point":gA(e);break;case"line":(e=>{e.points?.forEach(gA)})(e)}}))},items:{point:{component:"items",show:e=>"point"===e.type,items:{dataSection:{component:"items",items:vA({translator:e})},styleSection:{component:"items",items:bA(n)}}},line:{type:"items",show:e=>"line"===e.type,items:{dataSection:{component:"items",items:{label:{ref:"label.value",translation:"Common.Label",component:"string",expression:"optional",defaultValue:""},points:{type:"array",ref:"points",titleTranslation:"properties.plugins.Points",itemTitleRef:(t,n)=>e.get("properties.plugins.Points.Point",n+1)+(t.label?.value?`: ${t.label.value}`:""),allowAdd:!0,allowRemove:!0,allowMove:!0,allowDuplicate:!0,addTranslation:"properties.plugins.Points.addPoint",items:{dataSection:{component:"items",items:vA({translator:e})},styleSection:{component:"items",items:bA(n),show:(e,t,n)=>{const r=((e,t)=>{if(!t)return null;for(let n=0;n<t.length;n+=1)if("line"===t[n].type&&t[n].points.includes(e))return t[n];return null})(e,n.properties.plugins);return r?.showPoints}}}}}},styleSection:{component:"items",items:{lineColor:{ref:"style.lineColor",translation:"Object.Table.Representation.MiniChart.Colors.Line",type:"object",component:"color-picker",disableNone:dA,showAlpha:uA,defaultValue:hA},lineThickness:{component:"slider",type:"number",expression:"optional",ref:"style.lineThickness",translation:"LayerStyleEditor.style.lineThickness",show:!0,defaultValue:n?3:2,min:1,max:6,step:1},lineType:{component:"dropdown",type:"string",expression:"optional",ref:"style.lineType",translation:"LayerStyleEditor.style.lineType",show:!0,defaultValue:"",options:[{value:"",translation:"LayerStyleEditor.style.solid"},{value:"8 4",translation:"LayerStyleEditor.style.dashed"}],convertFunctions:{get(e,t){const n=e(t.type);return void 0===n||""===n?"":"8 4"}}},lineCurve:{translation:"LayerStyleEditor.style.lineCurve",type:"string",ref:"style.lineCurve",component:"dropdown",defaultValue:n?"monotone":"linear",expression:"optional",options:[{value:"linear",translation:"LayerStyleEditor.style.linear"},{value:"monotone",translation:"LayerStyleEditor.style.monotone"}]}}},showPoints:{ref:"showPoints",translation:"properties.dataPoints.showDataPoints",type:"boolean",defaultValue:!1}}}}};return r};var SA=class e{constructor(e,t){this._key=e,this._value=t}getKey(){return this._key}getValue(){return this._value}equals(t){return t instanceof e&&(this._key===t._key&&this._value===t._value)}static newInstanceIfNeeded(){let t,n,r=arguments[0];return"string"==typeof arguments[1]?(t=arguments[1],n=r.length):(n=arguments[1],t=arguments[2]),t&&r?(r.length>n&&(r=r.substr(0,n)),new e(r,t)):null}},wA=class e{setValue(e){this._nextMap=null,this._value=e}getNextNode(e){return this._nextMap?this._nextMap[e]:null}put(t,n,r){let i,o;if(t.length===n)return o=this._value,this.setValue(r),o;const a=t.charAt(n);return this._nextMap?(i=this._nextMap[a],i||(i=new e,this._nextMap[a]=i)):(this._nextMap={},i=new e,this._nextMap[a]=i),i.put(t,n+1,r)}get(e,t){if(e.length<=t)return this._value;const n=this.getNextNode(e.charAt(t));return n?n.get(e,t+1):null}getLongestMatch(e,t){if(e.length<=t)return SA.newInstanceIfNeeded(e,this._value);const n=this.getNextNode(e.charAt(t));if(!n)return SA.newInstanceIfNeeded(e,t,this._value);const r=n.getLongestMatch(e,t+1);return r||SA.newInstanceIfNeeded(e,t,this._value)}},MA=class{constructor(){this.clear()}getLongestMatch(e){return this.root&&e?this.root.getLongestMatch(e,0):null}getMaxKeyLength(){return this.maxKeyLen}clear(){this.root=null,this.maxKeyLen=0,this.size=0}put(e,t){this.root||(this.root=new wA);const n=this.root.put(e,0,t);return n||(e.length>this.maxKeyLen&&(this.maxKeyLen=e.length),this.size++,null)}};(()=>{const e=[],t=[],n=new MA;let r,i,o;for(r in e["&quot"]="34",e["&amp"]="38",e["&lt"]="60",e["&gt"]="62",e["&nbsp"]="160",e["&iexcl"]="161",e["&cent"]="162",e["&pound"]="163",e["&curren"]="164",e["&yen"]="165",e["&brvbar"]="166",e["&sect"]="167",e["&uml"]="168",e["&copy"]="169",e["&ordf"]="170",e["&laquo"]="171",e["&not"]="172",e["&shy"]="173",e["&reg"]="174",e["&macr"]="175",e["&deg"]="176",e["&plusmn"]="177",e["&sup2"]="178",e["&sup3"]="179",e["&acute"]="180",e["&micro"]="181",e["&para"]="182",e["&middot"]="183",e["&cedil"]="184",e["&sup1"]="185",e["&ordm"]="186",e["&raquo"]="187",e["&frac14"]="188",e["&frac12"]="189",e["&frac34"]="190",e["&iquest"]="191",e["&Agrave"]="192",e["&Aacute"]="193",e["&Acirc"]="194",e["&Atilde"]="195",e["&Auml"]="196",e["&Aring"]="197",e["&AElig"]="198",e["&Ccedil"]="199",e["&Egrave"]="200",e["&Eacute"]="201",e["&Ecirc"]="202",e["&Euml"]="203",e["&Igrave"]="204",e["&Iacute"]="205",e["&Icirc"]="206",e["&Iuml"]="207",e["&ETH"]="208",e["&Ntilde"]="209",e["&Ograve"]="210",e["&Oacute"]="211",e["&Ocirc"]="212",e["&Otilde"]="213",e["&Ouml"]="214",e["&times"]="215",e["&Oslash"]="216",e["&Ugrave"]="217",e["&Uacute"]="218",e["&Ucirc"]="219",e["&Uuml"]="220",e["&Yacute"]="221",e["&THORN"]="222",e["&szlig"]="223",e["&agrave"]="224",e["&aacute"]="225",e["&acirc"]="226",e["&atilde"]="227",e["&auml"]="228",e["&aring"]="229",e["&aelig"]="230",e["&ccedil"]="231",e["&egrave"]="232",e["&eacute"]="233",e["&ecirc"]="234",e["&euml"]="235",e["&igrave"]="236",e["&iacute"]="237",e["&icirc"]="238",e["&iuml"]="239",e["&eth"]="240",e["&ntilde"]="241",e["&ograve"]="242",e["&oacute"]="243",e["&ocirc"]="244",e["&otilde"]="245",e["&ouml"]="246",e["&divide"]="247",e["&oslash"]="248",e["&ugrave"]="249",e["&uacute"]="250",e["&ucirc"]="251",e["&uuml"]="252",e["&yacute"]="253",e["&thorn"]="254",e["&yuml"]="255",e["&OElig"]="338",e["&oelig"]="339",e["&Scaron"]="352",e["&scaron"]="353",e["&Yuml"]="376",e["&fnof"]="402",e["&circ"]="710",e["&tilde"]="732",e["&Alpha"]="913",e["&Beta"]="914",e["&Gamma"]="915",e["&Delta"]="916",e["&Epsilon"]="917",e["&Zeta"]="918",e["&Eta"]="919",e["&Theta"]="920",e["&Iota"]="921",e["&Kappa"]="922",e["&Lambda"]="923",e["&Mu"]="924",e["&Nu"]="925",e["&Xi"]="926",e["&Omicron"]="927",e["&Pi"]="928",e["&Rho"]="929",e["&Sigma"]="931",e["&Tau"]="932",e["&Upsilon"]="933",e["&Phi"]="934",e["&Chi"]="935",e["&Psi"]="936",e["&Omega"]="937",e["&alpha"]="945",e["&beta"]="946",e["&gamma"]="947",e["&delta"]="948",e["&epsilon"]="949",e["&zeta"]="950",e["&eta"]="951",e["&theta"]="952",e["&iota"]="953",e["&kappa"]="954",e["&lambda"]="955",e["&mu"]="956",e["&nu"]="957",e["&xi"]="958",e["&omicron"]="959",e["&pi"]="960",e["&rho"]="961",e["&sigmaf"]="962",e["&sigma"]="963",e["&tau"]="964",e["&upsilon"]="965",e["&phi"]="966",e["&chi"]="967",e["&psi"]="968",e["&omega"]="969",e["&thetasym"]="977",e["&upsih"]="978",e["&piv"]="982",e["&ensp"]="8194",e["&emsp"]="8195",e["&thinsp"]="8201",e["&zwnj"]="8204",e["&zwj"]="8205",e["&lrm"]="8206",e["&rlm"]="8207",e["&ndash"]="8211",e["&mdash"]="8212",e["&lsquo"]="8216",e["&rsquo"]="8217",e["&sbquo"]="8218",e["&ldquo"]="8220",e["&rdquo"]="8221",e["&bdquo"]="8222",e["&dagger"]="8224",e["&Dagger"]="8225",e["&bull"]="8226",e["&hellip"]="8230",e["&permil"]="8240",e["&prime"]="8242",e["&Prime"]="8243",e["&lsaquo"]="8249",e["&rsaquo"]="8250",e["&oline"]="8254",e["&frasl"]="8260",e["&euro"]="8364",e["&image"]="8365",e["&weierp"]="8472",e["&real"]="8476",e["&trade"]="8482",e["&alefsym"]="8501",e["&larr"]="8592",e["&uarr"]="8593",e["&rarr"]="8594",e["&darr"]="8595",e["&harr"]="8596",e["&crarr"]="8629",e["&lArr"]="8656",e["&uArr"]="8657",e["&rArr"]="8658",e["&dArr"]="8659",e["&hArr"]="8660",e["&forall"]="8704",e["&part"]="8706",e["&exist"]="8707",e["&empty"]="8709",e["&nabla"]="8711",e["&isin"]="8712",e["&notin"]="8713",e["&ni"]="8715",e["&prod"]="8719",e["&sum"]="8721",e["&minus"]="8722",e["&lowast"]="8727",e["&radic"]="8730",e["&prop"]="8733",e["&infin"]="8734",e["&ang"]="8736",e["&and"]="8743",e["&or"]="8744",e["&cap"]="8745",e["&cup"]="8746",e["&int"]="8747",e["&there4"]="8756",e["&sim"]="8764",e["&cong"]="8773",e["&asymp"]="8776",e["&ne"]="8800",e["&equiv"]="8801",e["&le"]="8804",e["&ge"]="8805",e["&sub"]="8834",e["&sup"]="8835",e["&nsub"]="8836",e["&sube"]="8838",e["&supe"]="8839",e["&oplus"]="8853",e["&otimes"]="8855",e["&perp"]="8869",e["&sdot"]="8901",e["&lceil"]="8968",e["&rceil"]="8969",e["&lfloor"]="8970",e["&rfloor"]="8971",e["&lang"]="9001",e["&rang"]="9002",e["&loz"]="9674",e["&spades"]="9824",e["&clubs"]="9827",e["&hearts"]="9829",e["&diams"]="9830",e)"function"!=typeof e[r]&&e.hasOwnProperty(r)&&(t[e[r]]=r);for(i in t)"function"!=typeof t[i]&&t.hasOwnProperty(i)&&(o=t[i].toLowerCase().substr(1),n.put(o,String.fromCharCode(i)))})(),"undefined"!=typeof document&&document.createElement("div");for(let e=0;e<255;e++)e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e.toString(16);var kA={ATTRIBUTE:{FIRST_DIMENSION_DIFF:"firstDimensionDiff"},UNIT_MULTIPLIER:1,UNIT:{AUTO:"auto",SECONDS:"seconds",MINUTES:"minutes",HOURS:"hours",DAYS:"days",WEEKS:"weeks",MONTHS:"months",YEARS:"years",NUMBER:"number",NONE:"none"}};const CA="cao.fieldPicker.tab.period",qA={TITLE:"properties.forecast.stepSize.label",AUTO:"properties.axis.displaymode.auto",SECONDS:"properties.forecast.stepUnit.seconds",MINUTES:"properties.forecast.stepUnit.minutes",HOURS:"properties.forecast.stepUnit.hours",DAYS:"properties.forecast.stepUnit.days",WEEKS:"properties.forecast.stepUnit.weeks",MONTHS:"properties.forecast.stepUnit.months",YEARS:"properties.forecast.stepUnit.years",NUMBER:"properties.forecast.stepUnit.number",NONE:"properties.scrollbar.none"},EA=(e,t,n)=>CT.continuous({layout:n.layout,properties:n.properties}),DA=(e,t,n)=>{const r=e?.qHyperCubeDef?.qDimensions?.[0]?.qDef?.continuous?.period;return EA(0,0,n)&&r&&"none"!==r},{FIRST_DIMENSION_DIFF:TA}=kA.ATTRIBUTE,OA=(e,t,n)=>{const r=e?.qHyperCubeDef?.qDimensions?.[0];if(r)if(CT.continuous({layout:n.layout,properties:n.properties})&&"auto"===r.qDef?.continuous?.period){const e=r.qAttributeExpressions||[],t=e.find(e=>e.id===TA),n="Min(Aggr(If(RowNo() > 1, [$(=GetObjectField(0))] - Above([$(=GetObjectField(0))]), Null()),([$(=GetObjectField(0))], (Numeric, Ascending))))";t?(t.qExpression="",t.qLabelExpression=n,r.qAttribute=!0):(e.push({id:TA,qExpression:"",qLabelExpression:n,qAttribute:!0}),r.qAttributeExpressions=e)}else{const e=r.qAttributeExpressions||[],t=e.findIndex(e=>e.id===TA);-1!==t&&(e.splice(t,1),r.qAttributeExpressions=e)}},{UNIT:NA,UNIT_MULTIPLIER:AA}=kA;const _A={MINI_CHART:{value:"miniChart",translation:"properties.scrollbar.miniChart"},BAR:{value:"bar",translation:"properties.scrollbar.bar"},NONE:{value:"none",translation:"properties.scrollbar.none"}};var IA={OPTIONS:_A,DEFAULT:_A.MINI_CHART};function LA({layoutService:e,discrete:t}){return({h:n,rect:r,orientation:i,minThumbSize:o})=>{const a=t.query.getCurrentDataPage(),s=e.meta.size.y,l="horizontal"===i,c=r[l?"width":"height"];let u=a.qArea.qTop/s*c,d=a.qArea.qHeight/s*c;if(d<o){const e=(o-d)/2;u=u-e+(Math.max(0,0-(u-e))-Math.max(0,u+d+e-c)),d=o}return n("div",{style:{position:"absolute",right:0,bottom:0,background:"red",opacity:.2,...l?{top:0,left:u,width:d}:{top:u,left:0,height:d}}})}}function PA({layoutService:e,viewState:t,viewCache:n}){return e.meta.isContinuous?function(e,t){const n=e.get("zoom"),r=t.get("continuousMin"),i=t.get("continuousMax");return[(n.min-r)/(i-r),(n.max-r)/(i-r)]}(t,n):function(e){return e.get("viewRange")}(t)}const RA=e=>({miniChart:e===IA.OPTIONS.MINI_CHART.value,bar:e===IA.OPTIONS.BAR.value,none:e===IA.OPTIONS.NONE.value});function zA({layoutService:e,override:t}){const n=(({layoutService:e})=>{const t=e.getLayoutValue("scrollbar");if(t)return RA(t);const n=e.getLayoutValue("showMiniChartForContinuousAxis");if(void 0===n)return RA(IA.DEFAULT.value);const r=e.getLayoutValue("dimensionAxis.continuousAuto"),i=e.getLayoutValue("preferContinuousAxis");return RA(!n&&(r||!r&&i)?IA.OPTIONS.NONE.value:IA.OPTIONS.MINI_CHART.value)})({layoutService:e});return t&&t.predicate({layoutService:e,scrollbar:n})&&(n.miniChart=t.value===IA.OPTIONS.MINI_CHART.value,n.bar=t.value===IA.OPTIONS.BAR.value,n.none=t.value===IA.OPTIONS.NONE.value),n}function FA({layoutService:e,dockService:t,discrete:n,continuousDataModel:r,viewState:i,viewCache:o,themeService:a,rtl:s,scrollbarOverride:l,visualizeCache:c=!1,deviceType:u}){const d=zA({layoutService:e,override:l});if(d.none)return!1;const{orientation:f}=t.meta.major,h={key:"scrollbar",type:"scrollbar",layout:{dock:"horizontal"===f?t.meta.minor.start:t.meta.minor.end,minimumLayoutMode:"XSMALL"},show:()=>e.meta.isContinuous?r.getDimensionCardinality()>1:n.query.getCanScroll(),settings:{orientation:f,rtl:s,isContinuous:e.meta.isContinuous,range:()=>PA({layoutService:e,viewState:i,viewCache:o})}};d.bar&&(h.settings.style="slim",h.settings.size={area:"touch"===u?{max:16,min:16}:{max:8,min:8}},e.meta.isContinuous||(h.settings.size.thumb={min:4}));const p=a.getStyles();return p.color&&(h.style={standard:{thumb:{"border-color":p.color,opacity:.4},before:{background:p.color,opacity:.1},after:{background:p.color,opacity:.1}}}),e.meta.isDiscrete&&c&&(h.settings.injections=()=>[LA({layoutService:e,discrete:n})]),h}function jA({componentKey:e,chart:t,viewState:n,viewCache:r,layoutService:i,dockService:o,rtl:a}){return s=>{const{x:l,y:c}=s.center,u=t.element.getBoundingClientRect(),d=t.component(e),f="horizontal"===o.meta.major.orientation,h=f?l-u.left-d.rect.computedInner.x:c-u.top-d.rect.computedInner.y,p=f?d.rect.computedInner.width:d.rect.computedInner.height,m=f&&a?p-h:h,g=Math.max(0,Math.min(m/p,1)),[y,v]=PA({layoutService:i,viewState:n,viewCache:r}),b=g<y,x=g>v,S=!b&&!x;return{pixel:m,relative:g,thumb:S?m-y*p:0,beforeThumb:b,afterThumb:x,onThumb:S}}}function BA({componentKey:e,chart:t,viewState:n,viewCache:r,layoutService:i,dockService:o}){return()=>{const a=t.component(e),{orientation:s}=o.meta.major,{width:l,height:c}=a.rect.computedInner,u="horizontal"===s?l:c,[d,f]=PA({layoutService:i,viewState:n,viewCache:r});return{size:u,thumbSize:(f-d)*u}}}function VA({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){const c=jA({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:l}),u=BA({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a});return{type:"Tap",options:{event:"scrollbarTap",enable:(r,i)=>!i||!!n.scroll.enabled()&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some(t=>t.key===e)},events:{scrollbarTap(n){n.preventDefault();const a=c(n);if(o.meta.isContinuous){const e=r.get("zoom"),t=e.max-e.min,n=i.get("continuousMin"),o=i.get("continuousMax"),s=n+(o-n)*a.relative;r.set("zoom",{min:Math.min(s-t/2,o-t),max:Math.max(s+t/2,n+t)})}else{const e=u(),t=a.pixel-e.thumbSize/2,n=Math.max(0,t/e.size);s.command.scrollTo(n)}t.component(e).emit("render")}}}}const HA="data-scrollbar-handle";function $A({e:e}){return(e.srcEvent||e).srcElement.getAttribute(HA)||""}const WA="scrollbarResize";function UA({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:s}){const l=jA({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:s});return{type:"Pan",key:`event:${WA}`,options:{event:WA,threshold:0,enable(e,t){return!(!o.meta.isContinuous||!n.scroll.enabled())&&(!t||(this[WA]=this[WA]||{},(e=>{const[t]=e.changedPointers;return t&&("pointerdown"===t.type||"mousedown"===t.type)})(t)&&$A({e:t})&&(this[WA].panningEvent=t.srcEvent),!!this[WA].panningEvent))}},events:{[`${WA}start`](n){n.preventDefault(),this[WA]=this[WA]||{},this[WA].panningEvent&&t.component(e).emit("dragStart",this[WA].panningEvent)},[`${WA}move`](n){if(n.preventDefault(),this[WA]=this[WA]||{},!this[WA].panningEvent)return;const o=r.get("zoom"),a=i.get("continuousMin"),s=i.get("continuousMax"),c=i.get("minimiumZoomSpan"),u=(s-a)*l(n).relative+a,d=$A({e:this[WA].panningEvent});let f="start"===d?Math.min(u,o.max):o.min,h="end"===d?Math.max(u,o.min):o.max;f===h&&(f-="start"===d?c:0,h+="end"===d?c:0),r.set("zoom",{min:f,max:h}),t.component(e).emit("render")},[`${WA}end`](n){n.preventDefault(),this[WA]=this[WA]||{},delete this[WA].panningEvent,t.component(e).emit("dragEnd")},[`${WA}cancel`](n){n.preventDefault(),this[WA]=this[WA]||{},delete this[WA].panningEvent,t.component(e).emit("dragEnd")}}}}const YA="scrollbarPan";function KA({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){const c=jA({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:l}),u=BA({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a});return{type:"Pan",key:`event:${YA}`,options:{event:YA,threshold:0,enable(r,i){return this[YA]=this[YA]||{},!(i&&!this[YA].isPanning)||!!n.scroll.enabled()&&((!i||i.target===t.element)&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some(t=>t.key===e))}},events:{[`${YA}start`](n){n.preventDefault();const a=c(n);if(this[YA]=this[YA]||{},this[YA].isPanning=!0,t.component(e).emit("lockState"),o.meta.isContinuous){const e=r.get("zoom"),t=e.max-e.min,n=i.get("continuousMin"),o=i.get("continuousMax"),s=n+(o-n)*a.relative;s<e.min?r.set("zoom",{min:Math.min(s,o-t),max:Math.max(s+t,n+t)}):s>e.max&&r.set("zoom",{min:Math.min(s-t,o-t),max:Math.max(s,n+t)}),this[YA].relative=a.relative,this[YA].zoom=r.get("zoom"),this[YA].zoom.span=this[YA].zoom.max-this[YA].zoom.min,this[YA].zoom.fullSpan=o-n}else if(a.onThumb)this[YA].offset=a.thumb;else{const e=u();this[YA].offset=a.beforeThumb?0:e.thumbSize}},[`${YA}move`](n){n.preventDefault();const a=c(n);if(this[YA]=this[YA]||{},o.meta.isContinuous){const e=a.relative-this[YA].relative,{fullSpan:t,span:n,min:o,max:s}=this[YA].zoom,l=i.get("continuousMin"),c=i.get("continuousMax");r.set("zoom",{min:Math.min(o+e*t,c-n),max:Math.max(s+e*t,l+n)})}else{const e=a.pixel-(this[YA].offset||0),t=u(),n=Math.max(0,e/t.size);s.command.scrollTo(n)}t.component(e).emit("render")},[`${YA}end`](n){n.preventDefault(),this[YA]=this[YA]||{},this[YA].isPanning=!1,t.component(e).emit("unlockState")},[`${YA}cancel`](n){n.preventDefault(),this[YA]=this[YA]||{},this[YA].isPanning=!1,t.component(e).emit("unlockState")}}}}function GA({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){return[VA({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}),UA({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:l}),KA({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l})]}function XA({componentKey:e,chart:t,actions:n,layoutService:r}){const i=(i,o)=>{if(!r.meta.isContinuous)return;const a=t.component(e);a&&a.emit&&n.scroll.enabled()&&a.emit(i,o)};return{type:"native",events:{mousemove:e=>i("hover",e),mouseleave:()=>i("leave")}}}function JA({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){return{gestures:[...GA({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l})],native:XA({componentKey:e,chart:t,actions:n,layoutService:o})}}const ZA={background:"rgba(0, 0, 0, 0.1)"},QA={top:-1,bottom:-1,width:6},e_={width:2,background:"#595959"};var t_={before:ZA,after:ZA,thumb:{background:"transparent",border:"1px solid rgba(68, 68, 68, 0.4)"},startHandle:QA,endHandle:QA,startHandleBorder:e_,endHandleBorder:e_};const n_={background:"rgba(0, 0, 0, 0.1)"},r_={top:-1,bottom:-1,width:6},i_={width:2,background:"#595959"};var o_={before:n_,after:n_,thumb:{background:"#B0AFAE",border:"transparent"},startHandle:r_,endHandle:r_,startHandleBorder:i_,endHandleBorder:i_};const a_={position:"absolute",top:0,right:0,bottom:0,left:0,boxSizing:"border-box"},s_={pointerEvents:"initial"},l_={pointerEvents:"none"};const c_="ew-resize",u_="default";function d_(){const{rect:e}=this,{settings:t}=this.settings,n="horizontal"===t.orientation,r=n?e.computedInner.width:e.computedInner.height,i=t.range(),o=n&&t.rtl;return{size:r,start:(o?1-i[1]:i[0])*r,end:(o?1-i[0]:i[1])*r}}function f_(){const e=this.state.hover.start||this.state.hover.end||this.state.drag.start||this.state.drag.end;this.renderer.element().ownerDocument.body.style.cursor=e?c_:u_}function h_(e,t,n){const{min:r}=this.settings.settings.size.thumb;if(n-t<r){const i=(r-(n-t))/2,o=Math.max(0,0-(t-i))-Math.max(0,n+i-e);return{size:e,start:t-i+o,end:n+i+o}}return{size:e,start:t,end:n}}function p_(e){const t=(e.srcEvent||e).srcElement;return this.renderer.element().contains(t)}function m_(){const{size:e,start:t,end:n}=d_.call(this);this.renderer.render(this.elements(this.h,h_.call(this,e,t,n)))}function g_(){const{state:e,settings:t,style:n}=this,r=t.settings.style;return e.style[r]||(e.style[r]=function({id:e,style:t}){const n="slim"===e?o_:t_;return{container:{...a_},before:{...a_,...n.before,...t.before},after:{...a_,...n.after,...t.after},thumb:{...a_,...n.thumb,...t.thumb},startHandle:{...a_,...s_,...n.startHandle},endHandle:{...a_,...s_,...n.endHandle},startHandleBorder:{...a_,...l_,...n.startHandleBorder},endHandleBorder:{...a_,...l_,...n.endHandleBorder}}}({id:t.settings.style,style:n[r]})),e.style[r]}var y_,v_,b_={require:["renderer"],defaultSettings:{settings:{style:"standard",size:{area:{min:30,max:40,ratio:1/8},thumb:{min:4}},orientation:"horizontal",rtl:!1,isContinuous:!1,range:()=>[0,1],injections:()=>[]},style:{standard:{before:{},thumb:{},after:{}},slim:{before:{},thumb:{},after:{}}}},renderer:"dom",on:{render(){m_.call(this)},lockState(){this.state.locked=!0},unlockState(){this.state.locked=!1},hover(e){if(this.state.locked||this.state.drag.start||this.state.drag.end||!p_.call(this,e)&&this.state.hover.isPristine())return;this.state.hover.reset();const t=$A({e:e});t&&(this.state.hover[t]=!0),f_.call(this),m_.call(this)},leave(){this.state.locked||(this.state.hover.reset(),f_.call(this),m_.call(this))},dragStart(e){if(this.state.locked)return;this.state.drag.reset();const t=$A({e:e});t&&(this.state.drag[t]=!0),f_.call(this)},dragEnd(){this.state.locked||(this.state.drag.reset(),f_.call(this),m_.call(this))}},preferredSize({outer:e}){const{min:t,max:n,ratio:r}=this.settings.settings.size.area,i="horizontal"===this.settings.settings.orientation?"height":"width";return Math.max(t,Math.min(n,e[i]*r))},created(){this.state={style:{},locked:!1,hover:{start:!1,end:!1,reset(){this.start=!1,this.end=!1},isPristine(){return!this.start&&!this.end}},drag:{start:!1,end:!1,reset(){this.start=!1,this.end=!1}}}},render(e){this.h=e;const{size:t,start:n,end:r}=d_.call(this);return this.elements(e,h_.call(this,t,n,r))},properties(){return"horizontal"===this.settings.settings.orientation?{start:"left",end:"right"}:{start:"top",end:"bottom"}},elements(e,{size:t,start:n,end:r}){const{settings:i}=this.settings,o=i.injections().map(t=>t({h:e,rect:this.rect,orientation:i.orientation,minThumbSize:i.size.thumb.min}));return function({h:e,size:t,start:n,end:r,properties:i,startHandleActive:o,endHandleActive:a,style:s,continuous:l,invert:c,injections:u}){const d={[i.end]:t-n},f={[i.start]:r},h={left:-3},p={left:1},m={right:-3,left:"auto"},g={left:3},y=e("div",{style:{...s.before,...c?f:d},class:"scrollbar--before"}),v=e("div",{style:{...s.after,...c?d:f},class:"scrollbar--after"}),b=[];if(l){const t=e("div",{style:{...s.startHandle,...c?m:h},class:"scrollbar--start-handle",[HA]:"start"},o?e("div",{style:{...s.startHandleBorder,...c?g:p}}):void 0);b.push(t);const n=e("div",{style:{...s.endHandle,...c?h:m},class:"scrollbar--end-handle",[HA]:"end"},a?e("div",{style:{...s.endHandleBorder,...c?p:g}}):void 0);b.push(n)}const x=e("div",{style:{...s.thumb,[i.start]:n,[i.end]:t-r},class:"scrollbar--thumb"},b);return e("div",{style:{...s.container}},[y,x,v,...u])}({h:e,size:t,start:n,end:r,properties:this.properties(),startHandleActive:this.state.hover.start||this.state.drag.start,endHandleActive:this.state.hover.end||this.state.drag.end,style:g_.call(this),continuous:i.isContinuous,invert:"horizontal"===i.orientation&&i.rtl,injections:o})}},x_={exports:{}},S_={};function w_(){if(y_)return S_;y_=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),a=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),d=Symbol.iterator;var f={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h=Object.assign,p={};function m(e,t,n){this.props=e,this.context=t,this.refs=p,this.updater=n||f}function g(){}function y(e,t,n){this.props=e,this.context=t,this.refs=p,this.updater=n||f}m.prototype.isReactComponent={},m.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},m.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},g.prototype=m.prototype;var v=y.prototype=new g;v.constructor=y,h(v,m.prototype),v.isPureReactComponent=!0;var b=Array.isArray,x=Object.prototype.hasOwnProperty,S={current:null},w={key:!0,ref:!0,__self:!0,__source:!0};function M(t,n,r){var i,o={},a=null,s=null;if(null!=n)for(i in void 0!==n.ref&&(s=n.ref),void 0!==n.key&&(a=""+n.key),n)x.call(n,i)&&!w.hasOwnProperty(i)&&(o[i]=n[i]);var l=arguments.length-2;if(1===l)o.children=r;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];o.children=c}if(t&&t.defaultProps)for(i in l=t.defaultProps)void 0===o[i]&&(o[i]=l[i]);return{$$typeof:e,type:t,key:a,ref:s,props:o,_owner:S.current}}function k(t){return"object"==typeof t&&null!==t&&t.$$typeof===e}var C=/\/+/g;function q(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function E(n,r,i,o,a){var s=typeof n;"undefined"!==s&&"boolean"!==s||(n=null);var l=!1;if(null===n)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(n.$$typeof){case e:case t:l=!0}}if(l)return a=a(l=n),n=""===o?"."+q(l,0):o,b(a)?(i="",null!=n&&(i=n.replace(C,"$&/")+"/"),E(a,r,i,"",function(e){return e})):null!=a&&(k(a)&&(a=function(t,n){return{$$typeof:e,type:t.type,key:n,ref:t.ref,props:t.props,_owner:t._owner}}(a,i+(!a.key||l&&l.key===a.key?"":(""+a.key).replace(C,"$&/")+"/")+n)),r.push(a)),1;if(l=0,o=""===o?".":o+":",b(n))for(var c=0;c<n.length;c++){var u=o+q(s=n[c],c);l+=E(s,r,i,u,a)}else if(u=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=d&&e[d]||e["@@iterator"])?e:null}(n),"function"==typeof u)for(n=u.call(n),c=0;!(s=n.next()).done;)l+=E(s=s.value,r,i,u=o+q(s,c++),a);else if("object"===s)throw r=String(n),Error("Objects are not valid as a React child (found: "+("[object Object]"===r?"object with keys {"+Object.keys(n).join(", ")+"}":r)+"). If you meant to render a collection of children, use an array instead.");return l}function D(e,t,n){if(null==e)return e;var r=[],i=0;return E(e,r,"","",function(e){return t.call(n,e,i++)}),r}function T(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var O={current:null},N={transition:null},A={ReactCurrentDispatcher:O,ReactCurrentBatchConfig:N,ReactCurrentOwner:S};function _(){throw Error("act(...) is not supported in production builds of React.")}return S_.Children={map:D,forEach:function(e,t,n){D(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return D(e,function(){t++}),t},toArray:function(e){return D(e,function(e){return e})||[]},only:function(e){if(!k(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},S_.Component=m,S_.Fragment=n,S_.Profiler=i,S_.PureComponent=y,S_.StrictMode=r,S_.Suspense=l,S_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=A,S_.act=_,S_.cloneElement=function(t,n,r){if(null==t)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var i=h({},t.props),o=t.key,a=t.ref,s=t._owner;if(null!=n){if(void 0!==n.ref&&(a=n.ref,s=S.current),void 0!==n.key&&(o=""+n.key),t.type&&t.type.defaultProps)var l=t.type.defaultProps;for(c in n)x.call(n,c)&&!w.hasOwnProperty(c)&&(i[c]=void 0===n[c]&&void 0!==l?l[c]:n[c])}var c=arguments.length-2;if(1===c)i.children=r;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];i.children=l}return{$$typeof:e,type:t.type,key:o,ref:a,props:i,_owner:s}},S_.createContext=function(e){return(e={$$typeof:a,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:o,_context:e},e.Consumer=e},S_.createElement=M,S_.createFactory=function(e){var t=M.bind(null,e);return t.type=e,t},S_.createRef=function(){return{current:null}},S_.forwardRef=function(e){return{$$typeof:s,render:e}},S_.isValidElement=k,S_.lazy=function(e){return{$$typeof:u,_payload:{_status:-1,_result:e},_init:T}},S_.memo=function(e,t){return{$$typeof:c,type:e,compare:void 0===t?null:t}},S_.startTransition=function(e){var t=N.transition;N.transition={};try{e()}finally{N.transition=t}},S_.unstable_act=_,S_.useCallback=function(e,t){return O.current.useCallback(e,t)},S_.useContext=function(e){return O.current.useContext(e)},S_.useDebugValue=function(){},S_.useDeferredValue=function(e){return O.current.useDeferredValue(e)},S_.useEffect=function(e,t){return O.current.useEffect(e,t)},S_.useId=function(){return O.current.useId()},S_.useImperativeHandle=function(e,t,n){return O.current.useImperativeHandle(e,t,n)},S_.useInsertionEffect=function(e,t){return O.current.useInsertionEffect(e,t)},S_.useLayoutEffect=function(e,t){return O.current.useLayoutEffect(e,t)},S_.useMemo=function(e,t){return O.current.useMemo(e,t)},S_.useReducer=function(e,t,n){return O.current.useReducer(e,t,n)},S_.useRef=function(e){return O.current.useRef(e)},S_.useState=function(e){return O.current.useState(e)},S_.useSyncExternalStore=function(e,t,n){return O.current.useSyncExternalStore(e,t,n)},S_.useTransition=function(){return O.current.useTransition()},S_.version="18.3.1",S_}function M_(){return v_||(v_=1,x_.exports=w_()),x_.exports}var k_=M_(),C_=mg(k_),q_=t({__proto__:null,default:C_},[k_]);const E_={black:"#000",white:"#fff"},D_="#e57373",T_="#ef5350",O_="#f44336",N_="#d32f2f",A_="#c62828",__="#f3e5f5",I_="#ce93d8",L_="#ba68c8",P_="#ab47bc",R_="#9c27b0",z_="#7b1fa2",F_="#e3f2fd",j_="#90caf9",B_="#42a5f5",V_="#1976d2",H_="#1565c0",$_="#4fc3f7",W_="#29b6f6",U_="#03a9f4",Y_="#0288d1",K_="#01579b",G_="#81c784",X_="#66bb6a",J_="#4caf50",Z_="#388e3c",Q_="#2e7d32",eI="#1b5e20",tI="#ffb74d",nI="#ffa726",rI="#ff9800",iI="#f57c00",oI="#e65100",aI={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};function sI(e){let t="https://mui.com/production-error/?code="+e;for(let e=1;e<arguments.length;e+=1)t+="&args[]="+encodeURIComponent(arguments[e]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}var lI=Object.freeze({__proto__:null,default:sI}),cI="$$material";function uI(){return uI=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uI.apply(null,arguments)}function dI(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}var fI=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),this.tags=[],this.ctr=0},e}(),hI="-ms-",pI="-moz-",mI="-webkit-",gI="comm",yI="rule",vI="decl",bI="@keyframes",xI=Math.abs,SI=String.fromCharCode,wI=Object.assign;function MI(e){return e.trim()}function kI(e,t,n){return e.replace(t,n)}function CI(e,t){return e.indexOf(t)}function qI(e,t){return 0|e.charCodeAt(t)}function EI(e,t,n){return e.slice(t,n)}function DI(e){return e.length}function TI(e){return e.length}function OI(e,t){return t.push(e),e}var NI=1,AI=1,_I=0,II=0,LI=0,PI="";function RI(e,t,n,r,i,o,a){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:NI,column:AI,length:a,return:""}}function zI(e,t){return wI(RI("",null,null,"",null,null,0),e,{length:-e.length},t)}function FI(){return LI=II>0?qI(PI,--II):0,AI--,10===LI&&(AI=1,NI--),LI}function jI(){return LI=II<_I?qI(PI,II++):0,AI++,10===LI&&(AI=1,NI++),LI}function BI(){return qI(PI,II)}function VI(){return II}function HI(e,t){return EI(PI,e,t)}function $I(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function WI(e){return NI=AI=1,_I=DI(PI=e),II=0,[]}function UI(e){return PI="",e}function YI(e){return MI(HI(II-1,XI(91===e?e+2:40===e?e+1:e)))}function KI(e){for(;(LI=BI())&&LI<33;)jI();return $I(e)>2||$I(LI)>3?"":" "}function GI(e,t){for(;--t&&jI()&&!(LI<48||LI>102||LI>57&&LI<65||LI>70&&LI<97););return HI(e,VI()+(t<6&&32==BI()&&32==jI()))}function XI(e){for(;jI();)switch(LI){case e:return II;case 34:case 39:34!==e&&39!==e&&XI(LI);break;case 40:41===e&&XI(e);break;case 92:jI()}return II}function JI(e,t){for(;jI()&&e+LI!==57&&(e+LI!==84||47!==BI()););return"/*"+HI(t,II-1)+"*"+SI(47===e?e:jI())}function ZI(e){for(;!$I(BI());)jI();return HI(e,II)}function QI(e){return UI(eL("",null,null,null,[""],e=WI(e),0,[0],e))}function eL(e,t,n,r,i,o,a,s,l){for(var c=0,u=0,d=a,f=0,h=0,p=0,m=1,g=1,y=1,v=0,b="",x=i,S=o,w=r,M=b;g;)switch(p=v,v=jI()){case 40:if(108!=p&&58==qI(M,d-1)){-1!=CI(M+=kI(YI(v),"&","&\f"),"&\f")&&(y=-1);break}case 34:case 39:case 91:M+=YI(v);break;case 9:case 10:case 13:case 32:M+=KI(p);break;case 92:M+=GI(VI()-1,7);continue;case 47:switch(BI()){case 42:case 47:OI(nL(JI(jI(),VI()),t,n),l);break;default:M+="/"}break;case 123*m:s[c++]=DI(M)*y;case 125*m:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:-1==y&&(M=kI(M,/\f/g,"")),h>0&&DI(M)-d&&OI(h>32?rL(M+";",r,n,d-1):rL(kI(M," ","")+";",r,n,d-2),l);break;case 59:M+=";";default:if(OI(w=tL(M,t,n,c,u,i,s,b,x=[],S=[],d),o),123===v)if(0===u)eL(M,t,w,w,x,o,d,s,S);else switch(99===f&&110===qI(M,3)?100:f){case 100:case 108:case 109:case 115:eL(e,w,w,r&&OI(tL(e,w,w,0,0,i,s,b,i,x=[],d),S),i,S,d,s,r?x:S);break;default:eL(M,w,w,w,[""],S,0,s,S)}}c=u=h=0,m=y=1,b=M="",d=a;break;case 58:d=1+DI(M),h=p;default:if(m<1)if(123==v)--m;else if(125==v&&0==m++&&125==FI())continue;switch(M+=SI(v),v*m){case 38:y=u>0?1:(M+="\f",-1);break;case 44:s[c++]=(DI(M)-1)*y,y=1;break;case 64:45===BI()&&(M+=YI(jI())),f=BI(),u=d=DI(b=M+=ZI(VI())),v++;break;case 45:45===p&&2==DI(M)&&(m=0)}}return o}function tL(e,t,n,r,i,o,a,s,l,c,u){for(var d=i-1,f=0===i?o:[""],h=TI(f),p=0,m=0,g=0;p<r;++p)for(var y=0,v=EI(e,d+1,d=xI(m=a[p])),b=e;y<h;++y)(b=MI(m>0?f[y]+" "+v:kI(v,/&\f/g,f[y])))&&(l[g++]=b);return RI(e,t,n,0===i?yI:s,l,c,u)}function nL(e,t,n){return RI(e,t,n,gI,SI(LI),EI(e,2,-2),0)}function rL(e,t,n,r){return RI(e,t,n,vI,EI(e,0,r),EI(e,r+1,-1),r)}function iL(e,t){for(var n="",r=TI(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function oL(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case vI:return e.return=e.return||e.value;case gI:return"";case bI:return e.return=e.value+"{"+iL(e.children,r)+"}";case yI:e.value=e.props.join(",")}return DI(n=iL(e.children,r))?e.return=e.value+"{"+n+"}":""}function aL(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var sL=function(e,t,n){for(var r=0,i=0;r=i,i=BI(),38===r&&12===i&&(t[n]=1),!$I(i);)jI();return HI(e,II)},lL=function(e,t){return UI(function(e,t){var n=-1,r=44;do{switch($I(r)){case 0:38===r&&12===BI()&&(t[n]=1),e[n]+=sL(II-1,t,n);break;case 2:e[n]+=YI(r);break;case 4:if(44===r){e[++n]=58===BI()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=SI(r)}}while(r=jI());return e}(WI(e),t))},cL=new WeakMap,uL=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||cL.get(n))&&!r){cL.set(e,!0);for(var i=[],o=lL(t,i),a=n.props,s=0,l=0;s<o.length;s++)for(var c=0;c<a.length;c++,l++)e.props[l]=i[s]?o[s].replace(/&\f/g,a[c]):a[c]+" "+o[s]}}},dL=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function fL(e,t){switch(function(e,t){return 45^qI(e,0)?(((t<<2^qI(e,0))<<2^qI(e,1))<<2^qI(e,2))<<2^qI(e,3):0}(e,t)){case 5103:return mI+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return mI+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return mI+e+pI+e+hI+e+e;case 6828:case 4268:return mI+e+hI+e+e;case 6165:return mI+e+hI+"flex-"+e+e;case 5187:return mI+e+kI(e,/(\w+).+(:[^]+)/,mI+"box-$1$2"+hI+"flex-$1$2")+e;case 5443:return mI+e+hI+"flex-item-"+kI(e,/flex-|-self/,"")+e;case 4675:return mI+e+hI+"flex-line-pack"+kI(e,/align-content|flex-|-self/,"")+e;case 5548:return mI+e+hI+kI(e,"shrink","negative")+e;case 5292:return mI+e+hI+kI(e,"basis","preferred-size")+e;case 6060:return mI+"box-"+kI(e,"-grow","")+mI+e+hI+kI(e,"grow","positive")+e;case 4554:return mI+kI(e,/([^-])(transform)/g,"$1"+mI+"$2")+e;case 6187:return kI(kI(kI(e,/(zoom-|grab)/,mI+"$1"),/(image-set)/,mI+"$1"),e,"")+e;case 5495:case 3959:return kI(e,/(image-set\([^]*)/,mI+"$1$`$1");case 4968:return kI(kI(e,/(.+:)(flex-)?(.*)/,mI+"box-pack:$3"+hI+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+mI+e+e;case 4095:case 3583:case 4068:case 2532:return kI(e,/(.+)-inline(.+)/,mI+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(DI(e)-1-t>6)switch(qI(e,t+1)){case 109:if(45!==qI(e,t+4))break;case 102:return kI(e,/(.+:)(.+)-([^]+)/,"$1"+mI+"$2-$3$1"+pI+(108==qI(e,t+3)?"$3":"$2-$3"))+e;case 115:return~CI(e,"stretch")?fL(kI(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==qI(e,t+1))break;case 6444:switch(qI(e,DI(e)-3-(~CI(e,"!important")&&10))){case 107:return kI(e,":",":"+mI)+e;case 101:return kI(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+mI+(45===qI(e,14)?"inline-":"")+"box$3$1"+mI+"$2$3$1"+hI+"$2box$3")+e}break;case 5936:switch(qI(e,t+11)){case 114:return mI+e+hI+kI(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return mI+e+hI+kI(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return mI+e+hI+kI(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return mI+e+hI+e+e}return e}var hL,pL,mL,gL,yL=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case vI:e.return=fL(e.value,e.length);break;case bI:return iL([zI(e,{value:kI(e.value,"@","@"+mI)})],r);case yI:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return iL([zI(e,{props:[kI(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return iL([zI(e,{props:[kI(t,/:(plac\w+)/,":"+mI+"input-$1")]}),zI(e,{props:[kI(t,/:(plac\w+)/,":-moz-$1")]}),zI(e,{props:[kI(t,/:(plac\w+)/,hI+"input-$1")]})],r)}return""})}}],vL=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var r,i,o=e.stylisPlugins||yL,a={},s=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)a[t[n]]=!0;s.push(e)});var l,c,u=[oL,(c=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&c(e)})],d=function(e){var t=TI(e);return function(n,r,i,o){for(var a="",s=0;s<t;s++)a+=e[s](n,r,i,o)||"";return a}}([uL,dL].concat(o,u));i=function(e,t,n,r){l=n,function(e){iL(QI(e),d)}(e?e+"{"+t.styles+"}":t.styles),r&&(f.inserted[t.name]=!0)};var f={key:t,sheet:new fI({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:i};return f.sheet.hydrate(s),f},bL={exports:{}},xL={};function SL(){return pL||(pL=1,bL.exports=function(){if(hL)return xL;hL=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var f=e.$$typeof;switch(f){case t:switch(e=e.type){case l:case c:case r:case o:case i:case d:return e;default:switch(e=e&&e.$$typeof){case s:case u:case p:case h:case a:return e;default:return f}}case n:return f}}}function x(e){return b(e)===c}return xL.AsyncMode=l,xL.ConcurrentMode=c,xL.ContextConsumer=s,xL.ContextProvider=a,xL.Element=t,xL.ForwardRef=u,xL.Fragment=r,xL.Lazy=p,xL.Memo=h,xL.Portal=n,xL.Profiler=o,xL.StrictMode=i,xL.Suspense=d,xL.isAsyncMode=function(e){return x(e)||b(e)===l},xL.isConcurrentMode=x,xL.isContextConsumer=function(e){return b(e)===s},xL.isContextProvider=function(e){return b(e)===a},xL.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},xL.isForwardRef=function(e){return b(e)===u},xL.isFragment=function(e){return b(e)===r},xL.isLazy=function(e){return b(e)===p},xL.isMemo=function(e){return b(e)===h},xL.isPortal=function(e){return b(e)===n},xL.isProfiler=function(e){return b(e)===o},xL.isStrictMode=function(e){return b(e)===i},xL.isSuspense=function(e){return b(e)===d},xL.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===o||e===i||e===d||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===h||e.$$typeof===a||e.$$typeof===s||e.$$typeof===u||e.$$typeof===g||e.$$typeof===y||e.$$typeof===v||e.$$typeof===m)},xL.typeOf=b,xL}()),bL.exports}!function(){if(gL)return mL;gL=1;var e=SL(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},i={};function o(n){return e.isMemo(n)?r:i[n.$$typeof]||t}i[e.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i[e.Memo]=r;var a=Object.defineProperty,s=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,c=Object.getOwnPropertyDescriptor,u=Object.getPrototypeOf,d=Object.prototype;mL=function e(t,r,i){if("string"!=typeof r){if(d){var f=u(r);f&&f!==d&&e(t,f,i)}var h=s(r);l&&(h=h.concat(l(r)));for(var p=o(t),m=o(r),g=0;g<h.length;++g){var y=h[g];if(!(n[y]||i&&i[y]||m&&m[y]||p&&p[y])){var v=c(r,y);try{a(t,y,v)}catch(e){}}}}return t}}();function wL(e,t,n){var r="";return n.split(" ").forEach(function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")}),r}var ML=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},kL=function(e,t,n){ML(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i=t;do{e.insert(t===i?"."+r:"",i,e.sheet,!0),i=i.next}while(void 0!==i)}};var CL={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},qL=/[A-Z]|^ms/g,EL=/_EMO_([^_]+?)_([^]*?)_EMO_/g,DL=function(e){return 45===e.charCodeAt(1)},TL=function(e){return null!=e&&"boolean"!=typeof e},OL=aL(function(e){return DL(e)?e:e.replace(qL,"-$&").toLowerCase()}),NL=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(EL,function(e,t,n){return _L={name:t,styles:n,next:_L},t})}return 1===CL[e]||DL(e)||"number"!=typeof t||0===t?t:t+"px"};function AL(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var i=n;if(1===i.anim)return _L={name:i.name,styles:i.styles,next:_L},i.name;var o=n;if(void 0!==o.styles){var a=o.next;if(void 0!==a)for(;void 0!==a;)_L={name:a.name,styles:a.styles,next:_L},a=a.next;return o.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=AL(e,t,n[i])+";";else for(var o in n){var a=n[o];if("object"!=typeof a){var s=a;null!=t&&void 0!==t[s]?r+=o+"{"+t[s]+"}":TL(s)&&(r+=OL(o)+":"+NL(o,s)+";")}else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var l=AL(e,t,a);switch(o){case"animation":case"animationName":r+=OL(o)+":"+l+";";break;default:r+=o+"{"+l+"}"}}else for(var c=0;c<a.length;c++)TL(a[c])&&(r+=OL(o)+":"+NL(o,a[c])+";")}return r}(e,t,n);case"function":if(void 0!==e){var s=_L,l=n(e);return _L=s,AL(e,t,l)}}var c=n;if(null==t)return c;var u=t[c];return void 0!==u?u:c}var _L,IL=/label:\s*([^\s;{]+)\s*(;|$)/g;function LL(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,i="";_L=void 0;var o=e[0];null==o||void 0===o.raw?(r=!1,i+=AL(n,t,o)):i+=o[0];for(var a=1;a<e.length;a++){if(i+=AL(n,t,e[a]),r)i+=o[a]}IL.lastIndex=0;for(var s,l="";null!==(s=IL.exec(i));)l+="-"+s[1];var c=function(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(i)+l;return{name:c,styles:i,next:_L}}var PL,RL,zL=!!q_.useInsertionEffect&&q_.useInsertionEffect,FL=zL||function(e){return e()},jL=zL||k_.useLayoutEffect,BL=k_.createContext("undefined"!=typeof HTMLElement?vL({key:"css"}):null),VL=BL.Provider,HL=function(e){return k_.forwardRef(function(t,n){var r=k_.useContext(BL);return e(t,r,n)})},$L=k_.createContext({}),WL={}.hasOwnProperty,UL="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",YL=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return ML(t,n,r),FL(function(){return kL(t,n,r)}),null},KL=HL(function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var i=e[UL],o=[r],a="";"string"==typeof e.className?a=wL(t.registered,o,e.className):null!=e.className&&(a=e.className+" ");var s=LL(o,void 0,k_.useContext($L));a+=t.key+"-"+s.name;var l={};for(var c in e)WL.call(e,c)&&"css"!==c&&c!==UL&&(l[c]=e[c]);return l.className=a,n&&(l.ref=n),k_.createElement(k_.Fragment,null,k_.createElement(YL,{cache:t,serialized:s,isStringTag:"string"==typeof i}),k_.createElement(i,l))}),GL=function(e,t){var n=arguments;if(null==t||!WL.call(t,"css"))return k_.createElement.apply(void 0,n);var r=n.length,i=new Array(r);i[0]=KL,i[1]=function(e,t){var n={};for(var r in t)WL.call(t,r)&&(n[r]=t[r]);return n[UL]=e,n}(e,t);for(var o=2;o<r;o++)i[o]=n[o];return k_.createElement.apply(null,i)};PL=GL||(GL={}),RL||(RL=PL.JSX||(PL.JSX={}));var XL=HL(function(e,t){var n=LL([e.styles],void 0,k_.useContext($L)),r=k_.useRef();return jL(function(){var e=t.key+"-global",i=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),o=!1,a=document.querySelector('style[data-emotion="'+e+" "+n.name+'"]');return t.sheet.tags.length&&(i.before=t.sheet.tags[0]),null!==a&&(o=!0,a.setAttribute("data-emotion",e),i.hydrate([a])),r.current=[i,o],function(){i.flush()}},[t]),jL(function(){var e=r.current,i=e[0];if(e[1])e[1]=!1;else{if(void 0!==n.next&&kL(t,n.next,!0),i.tags.length){var o=i.tags[i.tags.length-1].nextElementSibling;i.before=o,i.flush()}t.insert("",n,i,!1)}},[t,n.name]),null});function JL(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return LL(t)}function ZL(){var e=JL.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}var QL=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,eP=aL(function(e){return QL.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}),tP=function(e){return"theme"!==e},nP=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?eP:tP},rP=function(e,t,n){var r;if(t){var i=t.shouldForwardProp;r=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},iP=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return ML(t,n,r),FL(function(){return kL(t,n,r)}),null},oP=function e(t,n){var r,i,o=t.__emotion_real===t,a=o&&t.__emotion_base||t;void 0!==n&&(r=n.label,i=n.target);var s=rP(t,n,o),l=s||nP(a),c=!l("as");return function(){var u=arguments,d=o&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&d.push("label:"+r+";"),null==u[0]||void 0===u[0].raw)d.push.apply(d,u);else{var f=u[0];d.push(f[0]);for(var h=u.length,p=1;p<h;p++)d.push(u[p],f[p])}var m=HL(function(e,t,n){var r=c&&e.as||a,o="",u=[],f=e;if(null==e.theme){for(var h in f={},e)f[h]=e[h];f.theme=k_.useContext($L)}"string"==typeof e.className?o=wL(t.registered,u,e.className):null!=e.className&&(o=e.className+" ");var p=LL(d.concat(u),t.registered,f);o+=t.key+"-"+p.name,void 0!==i&&(o+=" "+i);var m=c&&void 0===s?nP(r):l,g={};for(var y in e)c&&"as"===y||m(y)&&(g[y]=e[y]);return g.className=o,n&&(g.ref=n),k_.createElement(k_.Fragment,null,k_.createElement(iP,{cache:t,serialized:p,isStringTag:"string"==typeof r}),k_.createElement(r,g))});return m.displayName=void 0!==r?r:"Styled("+("string"==typeof a?a:a.displayName||a.name||"Component")+")",m.defaultProps=t.defaultProps,m.__emotion_real=m,m.__emotion_base=a,m.__emotion_styles=d,m.__emotion_forwardProp=s,Object.defineProperty(m,"toString",{value:function(){return"."+i}}),m.withComponent=function(t,r){return e(t,uI({},n,r,{shouldForwardProp:rP(m,r,!0)})).apply(void 0,d)},m}}.bind(null);["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach(function(e){oP[e]=oP(e)});var aP,sP,lP={exports:{}},cP={};var uP=(sP||(sP=1,lP.exports=function(){if(aP)return cP;aP=1;var e=M_(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function a(e,n,a){var s,l={},c=null,u=null;for(s in void 0!==a&&(c=""+a),void 0!==n.key&&(c=""+n.key),void 0!==n.ref&&(u=n.ref),n)r.call(n,s)&&!o.hasOwnProperty(s)&&(l[s]=n[s]);if(e&&e.defaultProps)for(s in n=e.defaultProps)void 0===l[s]&&(l[s]=n[s]);return{$$typeof:t,type:e,key:c,ref:u,props:l,_owner:i.current}}return cP.Fragment=n,cP.jsx=a,cP.jsxs=a,cP}()),lP.exports);const dP=new Map;function fP(e){const{styles:t,defaultTheme:n={}}=e,r="function"==typeof t?e=>{return t(null==(r=e)||0===Object.keys(r).length?n:e);var r}:t;return uP.jsx(XL,{styles:r})}
/**
   * @mui/styled-engine v5.18.0
   *
   * @license MIT
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   */const hP=[];function pP(e){return hP[0]=e,LL(hP)}var mP=Object.freeze({__proto__:null,GlobalStyles:fP,StyledEngineProvider:function(e){const{injectFirst:t,enableCssLayer:n,children:r}=e,i=k_.useMemo(()=>{const e=`${t}-${n}`;if("object"==typeof document&&dP.has(e))return dP.get(e);const r=function(e,t){const n=vL({key:"css",prepend:e});if(t){const e=n.insert;n.insert=(...t)=>(t[1].styles.match(/^@layer\s+[^{]*$/)||(t[1].styles=`@layer mui {${t[1].styles}}`),e(...t))}return n}(t,n);return dP.set(e,r),r},[t,n]);return t||n?uP.jsx(VL,{value:i,children:r}):r},ThemeContext:$L,css:JL,default:function(e,t){return oP(e,t)},internal_processStyles:(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},internal_serializeStyles:pP,keyframes:ZL});function gP(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function yP(e){if(k_.isValidElement(e)||!gP(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=yP(e[n])}),t}function vP(e,t,n={clone:!0}){const r=n.clone?uI({},e):e;return gP(e)&&gP(t)&&Object.keys(t).forEach(i=>{k_.isValidElement(t[i])?r[i]=t[i]:gP(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&gP(e[i])?r[i]=vP(e[i],t[i],n):n.clone?r[i]=gP(t[i])?yP(t[i]):t[i]:r[i]=t[i]}),r}var bP=Object.freeze({__proto__:null,default:vP,isPlainObject:gP});const xP=["values","unit","step"];function SP(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,i=dI(e,xP),o=(e=>{const t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>uI({},e,{[t.key]:t.val}),{})})(t),a=Object.keys(o);function s(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n})`}function l(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-r/100}${n})`}function c(e,i){const o=a.indexOf(i);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==o&&"number"==typeof t[a[o]]?t[a[o]]:i)-r/100}${n})`}return uI({keys:a,values:o,up:s,down:l,between:c,only:function(e){return a.indexOf(e)+1<a.length?c(e,a[a.indexOf(e)+1]):s(e)},not:function(e){const t=a.indexOf(e);return 0===t?s(a[1]):t===a.length-1?l(a[t]):c(e,a[a.indexOf(e)+1]).replace("@media","@media not all and")},unit:n},i)}const wP={borderRadius:4};function MP(e,t){return t?vP(e,t,{clone:!1}):e}const kP={xs:0,sm:600,md:900,lg:1200,xl:1536},CP={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${kP[e]}px)`};function qP(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||CP;return t.reduce((r,i,o)=>(r[e.up(e.keys[o])]=n(t[o]),r),{})}if("object"==typeof t){const e=r.breakpoints||CP;return Object.keys(t).reduce((r,i)=>{if(-1!==Object.keys(e.values||kP).indexOf(i)){r[e.up(i)]=n(t[i],i)}else{const e=i;r[e]=t[e]}return r},{})}return n(t)}function EP(e,t){return e.reduce((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e},t)}function DP(e){if("string"!=typeof e)throw new Error(sI(7));return e.charAt(0).toUpperCase()+e.slice(1)}var TP=Object.freeze({__proto__:null,default:DP});function OP(e,t,n=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&n){const n=`vars.${t}`.split(".").reduce((e,t)=>e&&e[t]?e[t]:null,e);if(null!=n)return n}return t.split(".").reduce((e,t)=>e&&null!=e[t]?e[t]:null,e)}function NP(e,t,n,r=n){let i;return i="function"==typeof e?e(n):Array.isArray(e)?e[n]||r:OP(e,n)||r,t&&(i=t(i,r,e)),i}function AP(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,o=e=>{if(null==e[t])return null;const o=e[t],a=OP(e.theme,r)||{};return qP(e,o,e=>{let r=NP(a,i,e);return e===r&&"string"==typeof e&&(r=NP(a,i,`${t}${"default"===e?"":DP(e)}`,e)),!1===n?r:{[n]:r}})};return o.propTypes={},o.filterProps=[t],o}const _P={m:"margin",p:"padding"},IP={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},LP={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},PP=function(e){const t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}(e=>{if(e.length>2){if(!LP[e])return[e];e=LP[e]}const[t,n]=e.split(""),r=_P[t],i=IP[n]||"";return Array.isArray(i)?i.map(e=>r+e):[r+i]}),RP=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],zP=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];function FP(e,t,n,r){var i;const o=null!=(i=OP(e,t,!1))?i:n;return"number"==typeof o?e=>"string"==typeof e?e:o*e:Array.isArray(o)?e=>"string"==typeof e?e:o[e]:"function"==typeof o?o:()=>{}}function jP(e){return FP(e,"spacing",8)}function BP(e,t){if("string"==typeof t||null==t)return t;const n=e(Math.abs(t));return t>=0?n:"number"==typeof n?-n:`-${n}`}function VP(e,t,n,r){if(-1===t.indexOf(n))return null;const i=function(e,t){return n=>e.reduce((e,r)=>(e[r]=BP(t,n),e),{})}(PP(n),r);return qP(e,e[n],i)}function HP(e,t){const n=jP(e.theme);return Object.keys(e).map(r=>VP(e,t,r,n)).reduce(MP,{})}function $P(e){return HP(e,RP)}function WP(e){return HP(e,zP)}function UP(...e){const t=e.reduce((e,t)=>(t.filterProps.forEach(n=>{e[n]=t}),e),{}),n=e=>Object.keys(e).reduce((n,r)=>t[r]?MP(n,t[r](e)):n,{});return n.propTypes={},n.filterProps=e.reduce((e,t)=>e.concat(t.filterProps),[]),n}function YP(e){return"number"!=typeof e?e:`${e}px solid`}function KP(e,t){return AP({prop:e,themeKey:"borders",transform:t})}$P.propTypes={},$P.filterProps=RP,WP.propTypes={},WP.filterProps=zP;const GP=KP("border",YP),XP=KP("borderTop",YP),JP=KP("borderRight",YP),ZP=KP("borderBottom",YP),QP=KP("borderLeft",YP),eR=KP("borderColor"),tR=KP("borderTopColor"),nR=KP("borderRightColor"),rR=KP("borderBottomColor"),iR=KP("borderLeftColor"),oR=KP("outline",YP),aR=KP("outlineColor"),sR=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=FP(e.theme,"shape.borderRadius",4),n=e=>({borderRadius:BP(t,e)});return qP(e,e.borderRadius,n)}return null};sR.propTypes={},sR.filterProps=["borderRadius"],UP(GP,XP,JP,ZP,QP,eR,tR,nR,rR,iR,sR,oR,aR);const lR=e=>{if(void 0!==e.gap&&null!==e.gap){const t=FP(e.theme,"spacing",8),n=e=>({gap:BP(t,e)});return qP(e,e.gap,n)}return null};lR.propTypes={},lR.filterProps=["gap"];const cR=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=FP(e.theme,"spacing",8),n=e=>({columnGap:BP(t,e)});return qP(e,e.columnGap,n)}return null};cR.propTypes={},cR.filterProps=["columnGap"];const uR=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=FP(e.theme,"spacing",8),n=e=>({rowGap:BP(t,e)});return qP(e,e.rowGap,n)}return null};uR.propTypes={},uR.filterProps=["rowGap"];function dR(e,t){return"grey"===t?t:e}UP(lR,cR,uR,AP({prop:"gridColumn"}),AP({prop:"gridRow"}),AP({prop:"gridAutoFlow"}),AP({prop:"gridAutoColumns"}),AP({prop:"gridAutoRows"}),AP({prop:"gridTemplateColumns"}),AP({prop:"gridTemplateRows"}),AP({prop:"gridTemplateAreas"}),AP({prop:"gridArea"}));function fR(e){return e<=1&&0!==e?100*e+"%":e}UP(AP({prop:"color",themeKey:"palette",transform:dR}),AP({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:dR}),AP({prop:"backgroundColor",themeKey:"palette",transform:dR}));const hR=AP({prop:"width",transform:fR}),pR=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{var n,r;const i=(null==(n=e.theme)||null==(n=n.breakpoints)||null==(n=n.values)?void 0:n[t])||kP[t];return i?"px"!==(null==(r=e.theme)||null==(r=r.breakpoints)?void 0:r.unit)?{maxWidth:`${i}${e.theme.breakpoints.unit}`}:{maxWidth:i}:{maxWidth:fR(t)}};return qP(e,e.maxWidth,t)}return null};pR.filterProps=["maxWidth"];const mR=AP({prop:"minWidth",transform:fR}),gR=AP({prop:"height",transform:fR}),yR=AP({prop:"maxHeight",transform:fR}),vR=AP({prop:"minHeight",transform:fR});AP({prop:"size",cssProperty:"width",transform:fR}),AP({prop:"size",cssProperty:"height",transform:fR});UP(hR,pR,mR,gR,yR,vR,AP({prop:"boxSizing"}));const bR={border:{themeKey:"borders",transform:YP},borderTop:{themeKey:"borders",transform:YP},borderRight:{themeKey:"borders",transform:YP},borderBottom:{themeKey:"borders",transform:YP},borderLeft:{themeKey:"borders",transform:YP},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:YP},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:sR},color:{themeKey:"palette",transform:dR},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:dR},backgroundColor:{themeKey:"palette",transform:dR},p:{style:WP},pt:{style:WP},pr:{style:WP},pb:{style:WP},pl:{style:WP},px:{style:WP},py:{style:WP},padding:{style:WP},paddingTop:{style:WP},paddingRight:{style:WP},paddingBottom:{style:WP},paddingLeft:{style:WP},paddingX:{style:WP},paddingY:{style:WP},paddingInline:{style:WP},paddingInlineStart:{style:WP},paddingInlineEnd:{style:WP},paddingBlock:{style:WP},paddingBlockStart:{style:WP},paddingBlockEnd:{style:WP},m:{style:$P},mt:{style:$P},mr:{style:$P},mb:{style:$P},ml:{style:$P},mx:{style:$P},my:{style:$P},margin:{style:$P},marginTop:{style:$P},marginRight:{style:$P},marginBottom:{style:$P},marginLeft:{style:$P},marginX:{style:$P},marginY:{style:$P},marginInline:{style:$P},marginInlineStart:{style:$P},marginInlineEnd:{style:$P},marginBlock:{style:$P},marginBlockStart:{style:$P},marginBlockEnd:{style:$P},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:lR},rowGap:{style:uR},columnGap:{style:cR},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:fR},maxWidth:{style:pR},minWidth:{transform:fR},height:{transform:fR},maxHeight:{transform:fR},minHeight:{transform:fR},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function xR(){function e(e,t,n,r){const i={[e]:t,theme:n},o=r[e];if(!o)return{[e]:t};const{cssProperty:a=e,themeKey:s,transform:l,style:c}=o;if(null==t)return null;if("typography"===s&&"inherit"===t)return{[e]:t};const u=OP(n,s)||{};if(c)return c(i);return qP(i,t,t=>{let n=NP(u,l,t);return t===n&&"string"==typeof t&&(n=NP(u,l,`${e}${"default"===t?"":DP(t)}`,t)),!1===a?n:{[a]:n}})}return function t(n){var r;const{sx:i,theme:o={},nested:a}=n||{};if(!i)return null;const s=null!=(r=o.unstable_sxConfig)?r:bR;function l(n){let r=n;if("function"==typeof n)r=n(o);else if("object"!=typeof n)return n;if(!r)return null;const i=function(e={}){var t;return(null==(t=e.keys)?void 0:t.reduce((t,n)=>(t[e.up(n)]={},t),{}))||{}}(o.breakpoints),l=Object.keys(i);let c=i;return Object.keys(r).forEach(n=>{const i=(a=r[n],l=o,"function"==typeof a?a(l):a);var a,l;if(null!=i)if("object"==typeof i)if(s[n])c=MP(c,e(n,i,o,s));else{const e=qP({theme:o},i,e=>({[n]:e}));!function(...e){const t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]),n=new Set(t);return e.every(e=>n.size===Object.keys(e).length)}(e,i)?c=MP(c,e):c[n]=t({sx:i,theme:o,nested:!0})}else c=MP(c,e(n,i,o,s))}),!a&&o.modularCssLayers?{"@layer sx":EP(l,c)}:EP(l,c)}return Array.isArray(i)?i.map(l):l(i)}}const SR=xR();function wR(e,t){const n=this;if(n.vars&&"function"==typeof n.getColorSchemeSelector){const r=n.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)");return{[r]:t}}return n.palette.mode===e?t:{}}SR.filterProps=["sx"];const MR=["breakpoints","palette","spacing","shape"];function kR(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=e,a=dI(e,MR),s=SP(n),l=function(e=8){if(e.mui)return e;const t=jP({spacing:e}),n=(...e)=>(0===e.length?[1]:e).map(e=>{const n=t(e);return"number"==typeof n?`${n}px`:n}).join(" ");return n.mui=!0,n}(i);let c=vP({breakpoints:s,direction:"ltr",components:{},palette:uI({mode:"light"},r),spacing:l,shape:uI({},wP,o)},a);return c.applyStyles=wR,c=t.reduce((e,t)=>vP(e,t),c),c.unstable_sxConfig=uI({},bR,null==a?void 0:a.unstable_sxConfig),c.unstable_sx=function(e){return SR({sx:e,theme:this})},c}var CR=Object.freeze({__proto__:null,default:kR,private_createBreakpoints:SP,unstable_applyStyles:wR});function qR(e=null){const t=k_.useContext($L);return t&&(n=t,0!==Object.keys(n).length)?t:e;var n}const ER=kR();function DR(e=ER){return qR(e)}function TR(e){const t=pP(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles=`@layer global{${t.styles}}`),t):e}function OR({styles:e,themeId:t,defaultTheme:n={}}){const r=DR(n),i=t&&r[t]||r;let o="function"==typeof e?e(i):e;return i.modularCssLayers&&(o=Array.isArray(o)?o.map(e=>TR("function"==typeof e?e(i):e)):TR(o)),uP.jsx(fP,{styles:o})}const NR=["sx"];function AR(e){const{sx:t}=e,n=dI(e,NR),{systemProps:r,otherProps:i}=(e=>{var t,n;const r={systemProps:{},otherProps:{}},i=null!=(t=null==e||null==(n=e.theme)?void 0:n.unstable_sxConfig)?t:bR;return Object.keys(e).forEach(t=>{i[t]?r.systemProps[t]=e[t]:r.otherProps[t]=e[t]}),r})(n);let o;return o=Array.isArray(t)?[r,...t]:"function"==typeof t?(...e)=>{const n=t(...e);return gP(n)?uI({},r,n):r}:uI({},r,t),uI({},i,{sx:o})}var _R=Object.freeze({__proto__:null,default:SR,extendSxProp:AR,unstable_createStyleFunctionSx:xR,unstable_defaultSxConfig:bR});const IR=e=>e,LR=(()=>{let e=IR;return{configure(t){e=t},generate:t=>e(t),reset(){e=IR}}})();function PR(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=PR(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function RR(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=PR(e))&&(r&&(r+=" "),r+=t);return r}const zR={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function FR(e,t,n="Mui"){const r=zR[t];return r?`${n}-${r}`:`${LR.generate(e)}-${t}`}function jR(e,t,n="Mui"){const r={};return t.forEach(t=>{r[t]=FR(e,t,n)}),r}var BR,VR,HR={exports:{}},$R={};function WR(){if(BR)return $R;BR=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),a=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.for("react.view_transition"),h=Symbol.for("react.client.reference");function p(h){if("object"==typeof h&&null!==h){var p=h.$$typeof;switch(p){case e:switch(h=h.type){case n:case i:case r:case l:case c:case f:return h;default:switch(h=h&&h.$$typeof){case a:case s:case d:case u:case o:return h;default:return p}}case t:return p}}}return $R.ContextConsumer=o,$R.ContextProvider=a,$R.Element=e,$R.ForwardRef=s,$R.Fragment=n,$R.Lazy=d,$R.Memo=u,$R.Portal=t,$R.Profiler=i,$R.StrictMode=r,$R.Suspense=l,$R.SuspenseList=c,$R.isContextConsumer=function(e){return p(e)===o},$R.isContextProvider=function(e){return p(e)===a},$R.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===e},$R.isForwardRef=function(e){return p(e)===s},$R.isFragment=function(e){return p(e)===n},$R.isLazy=function(e){return p(e)===d},$R.isMemo=function(e){return p(e)===u},$R.isPortal=function(e){return p(e)===t},$R.isProfiler=function(e){return p(e)===i},$R.isStrictMode=function(e){return p(e)===r},$R.isSuspense=function(e){return p(e)===l},$R.isSuspenseList=function(e){return p(e)===c},$R.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===n||e===i||e===r||e===l||e===c||"object"==typeof e&&null!==e&&(e.$$typeof===d||e.$$typeof===u||e.$$typeof===a||e.$$typeof===o||e.$$typeof===s||e.$$typeof===h||void 0!==e.getModuleId)},$R.typeOf=p,$R}function UR(){return VR||(VR=1,HR.exports=WR()),HR.exports}var YR=UR();const KR=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function GR(e){const t=`${e}`.match(KR);return t&&t[1]||""}function XR(e,t=""){return e.displayName||e.name||GR(e)||t}function JR(e,t,n){const r=XR(t);return e.displayName||(""!==r?`${n}(${r})`:n)}var ZR=Object.freeze({__proto__:null,default:function(e){if(null!=e){if("string"==typeof e)return e;if("function"==typeof e)return XR(e,"Component");if("object"==typeof e)switch(e.$$typeof){case YR.ForwardRef:return JR(e,e.render,"ForwardRef");case YR.Memo:return JR(e,e.type,"memo");default:return}}},getFunctionName:GR});function QR(e,t){const n=uI({},t);return Object.keys(e).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=uI({},e[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const i=e[r]||{},o=t[r];n[r]={},o&&Object.keys(o)?i&&Object.keys(i)?(n[r]=uI({},o),Object.keys(i).forEach(e=>{n[r][e]=QR(i[e],o[e])})):n[r]=o:n[r]=i}else void 0===n[r]&&(n[r]=e[r])}),n}const ez="undefined"!=typeof window?k_.useLayoutEffect:k_.useEffect;var tz=Object.freeze({__proto__:null,default:function(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}});function nz(...e){return e.reduce((e,t)=>null==t?e:function(...n){e.apply(this,n),t.apply(this,n)},()=>{})}function rz(e){return e&&e.ownerDocument||document}function iz(e){return rz(e).defaultView||window}function oz(e,t){"function"==typeof e?e(t):e&&(e.current=t)}let az=0;const sz=q_["useId".toString()];function lz(e){if(void 0!==sz){return sz()}return function(e){const[t,n]=k_.useState(e),r=e||t;return k_.useEffect(()=>{null==t&&(az+=1,n(`mui-${az}`))},[t]),r}(e)}function cz(e){const t=k_.useRef(e);return ez(()=>{t.current=e}),k_.useRef((...e)=>(0,t.current)(...e)).current}function uz(...e){return k_.useMemo(()=>e.every(e=>null==e)?null:t=>{e.forEach(e=>{oz(e,t)})},e)}const dz={};const fz=[];class hz{constructor(){this.currentId=null,this.clear=()=>{null!==this.currentId&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new hz}start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,t()},e)}}function pz(){const e=function(e,t){const n=k_.useRef(dz);return n.current===dz&&(n.current=e(t)),n}(hz.create).current;return function(e){k_.useEffect(e,fz)}(e.disposeEffect),e}let mz=!0,gz=!1;const yz=new hz,vz={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function bz(e){e.metaKey||e.altKey||e.ctrlKey||(mz=!0)}function xz(){mz=!1}function Sz(){"hidden"===this.visibilityState&&gz&&(mz=!0)}function wz(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(e){}return mz||function(e){const{type:t,tagName:n}=e;return!("INPUT"!==n||!vz[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}function Mz(){const e=k_.useCallback(e=>{var t;null!=e&&((t=e.ownerDocument).addEventListener("keydown",bz,!0),t.addEventListener("mousedown",xz,!0),t.addEventListener("pointerdown",xz,!0),t.addEventListener("touchstart",xz,!0),t.addEventListener("visibilitychange",Sz,!0))},[]),t=k_.useRef(!1);return{isFocusVisibleRef:t,onFocus:function(e){return!!wz(e)&&(t.current=!0,!0)},onBlur:function(){return!!t.current&&(gz=!0,yz.start(100,()=>{gz=!1}),t.current=!1,!0)},ref:e}}function kz(e,t,n=void 0){const r={};return Object.keys(e).forEach(i=>{r[i]=e[i].reduce((e,r)=>{if(r){const i=t(r);""!==i&&e.push(i),n&&n[r]&&e.push(n[r])}return e},[]).join(" ")}),r}function Cz(e){return"string"==typeof e}function qz(e,t=[]){if(void 0===e)return{};const n={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&"function"==typeof e[n]&&!t.includes(n)).forEach(t=>{n[t]=e[t]}),n}function Ez(e){if(void 0===e)return{};const t={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t])).forEach(n=>{t[n]=e[n]}),t}const Dz=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function Tz(e){var t;const{elementType:n,externalSlotProps:r,ownerState:i,skipResolvingSlotProps:o=!1}=e,a=dI(e,Dz),s=o?{}:function(e,t,n){return"function"==typeof e?e(t,n):e}(r,i),{props:l,internalRef:c}=function(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const e=RR(null==n?void 0:n.className,o,null==i?void 0:i.className,null==r?void 0:r.className),t=uI({},null==n?void 0:n.style,null==i?void 0:i.style,null==r?void 0:r.style),a=uI({},n,i,r);return e.length>0&&(a.className=e),Object.keys(t).length>0&&(a.style=t),{props:a,internalRef:void 0}}const a=qz(uI({},i,r)),s=Ez(r),l=Ez(i),c=t(a),u=RR(null==c?void 0:c.className,null==n?void 0:n.className,o,null==i?void 0:i.className,null==r?void 0:r.className),d=uI({},null==c?void 0:c.style,null==n?void 0:n.style,null==i?void 0:i.style,null==r?void 0:r.style),f=uI({},c,n,l,s);return u.length>0&&(f.className=u),Object.keys(d).length>0&&(f.style=d),{props:f,internalRef:c.ref}}(uI({},a,{externalSlotProps:s})),u=function(e,t,n){return void 0===e||Cz(e)?t:uI({},t,{ownerState:uI({},t.ownerState,n)})}(n,uI({},l,{ref:uz(c,null==s?void 0:s.ref,null==(t=e.additionalProps)?void 0:t.ref)}),i);return u}function Oz(e){var t;return parseInt(k_.version,10)>=19?(null==e||null==(t=e.props)?void 0:t.ref)||null:(null==e?void 0:e.ref)||null}const Nz=k_.createContext(null);function Az(){return k_.useContext(Nz)}var _z="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";function Iz(e){const{children:t,theme:n}=e,r=Az(),i=k_.useMemo(()=>{const e=null===r?n:function(e,t){if("function"==typeof t)return t(e);return uI({},e,t)}(r,n);return null!=e&&(e[_z]=null!==r),e},[n,r]);return uP.jsx(Nz.Provider,{value:i,children:t})}const Lz=["value"],Pz=k_.createContext();function Rz(e){let{value:t}=e,n=dI(e,Lz);return uP.jsx(Pz.Provider,uI({value:null==t||t},n))}const zz=k_.createContext(void 0);function Fz({value:e,children:t}){return uP.jsx(zz.Provider,{value:e,children:t})}function jz({props:e,name:t}){return function(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const i=t.components[n];return i.defaultProps?QR(i.defaultProps,r):i.styleOverrides||i.variants?r:QR(i,r)}({props:e,name:t,theme:{components:k_.useContext(zz)}})}const Bz={};function Vz(e,t,n,r=!1){return k_.useMemo(()=>{const i=e&&t[e]||t;if("function"==typeof n){const o=n(i),a=e?uI({},t,{[e]:o}):o;return r?()=>a:a}return uI({},t,e?{[e]:n}:n)},[e,t,n,r])}function Hz(e){const{children:t,theme:n,themeId:r}=e,i=qR(Bz),o=Az()||Bz,a=Vz(r,i,n),s=Vz(r,o,n,!0),l="rtl"===a.direction,c=function(e){const t=qR(),n=lz()||"",{modularCssLayers:r}=e;let i="mui.global, mui.components, mui.theme, mui.custom, mui.sx";return i=r&&null===t?"string"==typeof r?r.replace(/mui(?!\.)/g,i):`@layer ${i};`:"",ez(()=>{const e=document.querySelector("head");if(!e)return;const t=e.firstChild;if(i){var r;if(t&&null!=(r=t.hasAttribute)&&r.call(t,"data-mui-layer-order")&&t.getAttribute("data-mui-layer-order")===n)return;const o=document.createElement("style");o.setAttribute("data-mui-layer-order",n),o.textContent=i,e.prepend(o)}else{var o;null==(o=e.querySelector(`style[data-mui-layer-order="${n}"]`))||o.remove()}},[i,n]),i?uP.jsx(OR,{styles:i}):null}(a);return uP.jsx(Iz,{theme:s,children:uP.jsx($L.Provider,{value:a,children:uP.jsx(Rz,{value:l,children:uP.jsxs(Fz,{value:null==a?void 0:a.components,children:[c,t]})})})})}var $z,Wz={},Uz={exports:{}};function Yz(){return $z||($z=1,function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports}(Uz)),Uz.exports}var Kz,Gz=gg(lI),Xz=gg(tz);function Jz(){if(Kz)return Wz;Kz=1;var e=Yz();Object.defineProperty(Wz,"__esModule",{value:!0}),Wz.alpha=u,Wz.blend=function(e,t,n,r=1){const i=(e,t)=>Math.round((e**(1/r)*(1-n)+t**(1/r)*n)**r),a=o(e),l=o(t),c=[i(a.values[0],l.values[0]),i(a.values[1],l.values[1]),i(a.values[2],l.values[2])];return s({type:"rgb",values:c})},Wz.colorChannel=void 0,Wz.darken=d,Wz.decomposeColor=o,Wz.emphasize=h,Wz.getContrastRatio=function(e,t){const n=c(e),r=c(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)},Wz.getLuminance=c,Wz.hexToRgb=i,Wz.hslToRgb=l,Wz.lighten=f,Wz.private_safeAlpha=function(e,t,n){try{return u(e,t)}catch(t){return e}},Wz.private_safeColorChannel=void 0,Wz.private_safeDarken=function(e,t,n){try{return d(e,t)}catch(t){return e}},Wz.private_safeEmphasize=function(e,t,n){try{return h(e,t)}catch(t){return e}},Wz.private_safeLighten=function(e,t,n){try{return f(e,t)}catch(t){return e}},Wz.recomposeColor=s,Wz.rgbToHex=function(e){if(0===e.indexOf("#"))return e;const{values:t}=o(e);return`#${t.map((e,t)=>function(e){const t=e.toString(16);return 1===t.length?`0${t}`:t}(3===t?Math.round(255*e):e)).join("")}`};var t=e(Gz),n=e(Xz);function r(e,t=0,r=1){return(0,n.default)(e,t,r)}function i(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map(e=>e+e)),n?`rgb${4===n.length?"a":""}(${n.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(", ")})`:""}function o(e){if(e.type)return e;if("#"===e.charAt(0))return o(i(e));const n=e.indexOf("("),r=e.substring(0,n);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(r))throw new Error((0,t.default)(9,e));let a,s=e.substring(n+1,e.length-1);if("color"===r){if(s=s.split(" "),a=s.shift(),4===s.length&&"/"===s[3].charAt(0)&&(s[3]=s[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(a))throw new Error((0,t.default)(10,a))}else s=s.split(",");return s=s.map(e=>parseFloat(e)),{type:r,values:s,colorSpace:a}}const a=e=>{const t=o(e);return t.values.slice(0,3).map((e,n)=>-1!==t.type.indexOf("hsl")&&0!==n?`${e}%`:e).join(" ")};Wz.colorChannel=a;function s(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return-1!==t.indexOf("rgb")?r=r.map((e,t)=>t<3?parseInt(e,10):e):-1!==t.indexOf("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=-1!==t.indexOf("color")?`${n} ${r.join(" ")}`:`${r.join(", ")}`,`${t}(${r})`}function l(e){e=o(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,a=r*Math.min(i,1-i),l=(e,t=(e+n/30)%12)=>i-a*Math.max(Math.min(t-3,9-t,1),-1);let c="rgb";const u=[Math.round(255*l(0)),Math.round(255*l(8)),Math.round(255*l(4))];return"hsla"===e.type&&(c+="a",u.push(t[3])),s({type:c,values:u})}function c(e){let t="hsl"===(e=o(e)).type||"hsla"===e.type?o(l(e)).values:e.values;return t=t.map(t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function u(e,t){return e=o(e),t=r(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,s(e)}function d(e,t){if(e=o(e),t=r(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return s(e)}function f(e,t){if(e=o(e),t=r(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return s(e)}function h(e,t=.15){return c(e)>.5?d(e,t):f(e,t)}return Wz.private_safeColorChannel=(e,t)=>{try{return a(e)}catch(t){return e}},Wz}var Zz=Jz();const Qz=["mode","contrastThreshold","tonalOffset"],eF={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:E_.white,default:E_.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},tF={text:{primary:E_.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:E_.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function nF(e,t,n,r){const i=r.light||r,o=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=Zz.lighten(e.main,i):"dark"===t&&(e.dark=Zz.darken(e.main,o)))}function rF(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=e,i=dI(e,Qz),o=e.primary||function(e="light"){return"dark"===e?{main:j_,light:F_,dark:B_}:{main:V_,light:B_,dark:H_}}(t),a=e.secondary||function(e="light"){return"dark"===e?{main:I_,light:__,dark:P_}:{main:R_,light:L_,dark:z_}}(t),s=e.error||function(e="light"){return"dark"===e?{main:O_,light:D_,dark:N_}:{main:N_,light:T_,dark:A_}}(t),l=e.info||function(e="light"){return"dark"===e?{main:W_,light:$_,dark:Y_}:{main:Y_,light:U_,dark:K_}}(t),c=e.success||function(e="light"){return"dark"===e?{main:X_,light:G_,dark:Z_}:{main:Q_,light:J_,dark:eI}}(t),u=e.warning||function(e="light"){return"dark"===e?{main:nI,light:tI,dark:iI}:{main:"#ed6c02",light:rI,dark:oI}}(t);function d(e){return Zz.getContrastRatio(e,tF.text.primary)>=n?tF.text.primary:eF.text.primary}const f=({color:e,name:t,mainShade:n=500,lightShade:i=300,darkShade:o=700})=>{if(!(e=uI({},e)).main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty("main"))throw new Error(sI(11,t?` (${t})`:"",n));if("string"!=typeof e.main)throw new Error(sI(12,t?` (${t})`:"",JSON.stringify(e.main)));return nF(e,"light",i,r),nF(e,"dark",o,r),e.contrastText||(e.contrastText=d(e.main)),e},h={dark:tF,light:eF};return vP(uI({common:uI({},E_),mode:t,primary:f({color:o,name:"primary"}),secondary:f({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:f({color:s,name:"error"}),warning:f({color:u,name:"warning"}),info:f({color:l,name:"info"}),success:f({color:c,name:"success"}),grey:aI,contrastThreshold:n,getContrastText:d,augmentColor:f,tonalOffset:r},h[t]),i)}const iF=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function oF(e){return Math.round(1e5*e)/1e5}const aF={textTransform:"uppercase"},sF='"Roboto", "Helvetica", "Arial", sans-serif';function lF(e,t){const n="function"==typeof t?t(e):t,{fontFamily:r=sF,fontSize:i=14,fontWeightLight:o=300,fontWeightRegular:a=400,fontWeightMedium:s=500,fontWeightBold:l=700,htmlFontSize:c=16,allVariants:u,pxToRem:d}=n,f=dI(n,iF),h=i/14,p=d||(e=>e/c*h+"rem"),m=(e,t,n,i,o)=>uI({fontFamily:r,fontWeight:e,fontSize:p(t),lineHeight:n},r===sF?{letterSpacing:`${oF(i/t)}em`}:{},o,u),g={h1:m(o,96,1.167,-1.5),h2:m(o,60,1.2,-.5),h3:m(a,48,1.167,0),h4:m(a,34,1.235,.25),h5:m(a,24,1.334,0),h6:m(s,20,1.6,.15),subtitle1:m(a,16,1.75,.15),subtitle2:m(s,14,1.57,.1),body1:m(a,16,1.5,.15),body2:m(a,14,1.43,.15),button:m(s,14,1.75,.4,aF),caption:m(a,12,1.66,.4),overline:m(a,12,2.66,1,aF),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return vP(uI({htmlFontSize:c,pxToRem:p,fontFamily:r,fontSize:i,fontWeightLight:o,fontWeightRegular:a,fontWeightMedium:s,fontWeightBold:l},g),f,{clone:!1})}function cF(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,0.2)`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,0.14)`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,0.12)`].join(",")}const uF=["none",cF(0,2,1,-1,0,1,1,0,0,1,3,0),cF(0,3,1,-2,0,2,2,0,0,1,5,0),cF(0,3,3,-2,0,3,4,0,0,1,8,0),cF(0,2,4,-1,0,4,5,0,0,1,10,0),cF(0,3,5,-1,0,5,8,0,0,1,14,0),cF(0,3,5,-1,0,6,10,0,0,1,18,0),cF(0,4,5,-2,0,7,10,1,0,2,16,1),cF(0,5,5,-3,0,8,10,1,0,3,14,2),cF(0,5,6,-3,0,9,12,1,0,3,16,2),cF(0,6,6,-3,0,10,14,1,0,4,18,3),cF(0,6,7,-4,0,11,15,1,0,4,20,3),cF(0,7,8,-4,0,12,17,2,0,5,22,4),cF(0,7,8,-4,0,13,19,2,0,5,24,4),cF(0,7,9,-4,0,14,21,2,0,5,26,4),cF(0,8,9,-5,0,15,22,2,0,6,28,5),cF(0,8,10,-5,0,16,24,2,0,6,30,5),cF(0,8,11,-5,0,17,26,2,0,6,32,5),cF(0,9,11,-5,0,18,28,2,0,7,34,6),cF(0,9,12,-6,0,19,29,2,0,7,36,6),cF(0,10,13,-6,0,20,31,3,0,8,38,7),cF(0,10,13,-6,0,21,33,3,0,8,40,7),cF(0,10,14,-6,0,22,35,3,0,8,42,7),cF(0,11,14,-7,0,23,36,3,0,9,44,8),cF(0,11,15,-7,0,24,38,3,0,9,46,8)],dF=["duration","easing","delay"],fF={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},hF={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function pF(e){return`${Math.round(e)}ms`}function mF(e){if(!e)return 0;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}function gF(e){const t=uI({},fF,e.easing),n=uI({},hF,e.duration);return uI({getAutoHeightDuration:mF,create:(e=["all"],r={})=>{const{duration:i=n.standard,easing:o=t.easeInOut,delay:a=0}=r;return dI(r,dF),(Array.isArray(e)?e:[e]).map(e=>`${e} ${"string"==typeof i?i:pF(i)} ${o} ${"string"==typeof a?a:pF(a)}`).join(",")}},e,{easing:t,duration:n})}const yF={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},vF=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function bF(e={},...t){const{mixins:n={},palette:r={},transitions:i={},typography:o={}}=e,a=dI(e,vF);if(e.vars&&void 0===e.generateCssVars)throw new Error(sI(18));const s=rF(r),l=kR(e);let c=vP(l,{mixins:(u=l.breakpoints,d=n,uI({toolbar:{minHeight:56,[u.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[u.up("sm")]:{minHeight:64}}},d)),palette:s,shadows:uF.slice(),typography:lF(s,o),transitions:gF(i),zIndex:uI({},yF)});var u,d;return c=vP(c,a),c=t.reduce((e,t)=>vP(e,t),c),c.unstable_sxConfig=uI({},bR,null==a?void 0:a.unstable_sxConfig),c.unstable_sx=function(e){return SR({sx:e,theme:this})},c}const xF=bF();function SF(){const e=DR(xF);return e[cI]||e}var wF,MF={},kF={exports:{}};var CF,qF={exports:{}};var EF,DF=gg(mP),TF=gg(bP),OF=gg(TP),NF=gg(ZR),AF=gg(CR),_F=gg(_R);function IF(){if(EF)return MF;EF=1;var e=Yz();Object.defineProperty(MF,"__esModule",{value:!0}),MF.default=function(e={}){const{themeId:o,defaultTheme:s=h,rootShouldForwardProp:l=d,slotShouldForwardProp:u=d}=e,f=e=>(0,a.default)((0,t.default)({},e,{theme:m((0,t.default)({},e,{defaultTheme:s,themeId:o}))}));return f.__mui_systemSx=!0,(e,a={})=>{(0,r.internal_processStyles)(e,e=>e.filter(e=>!(null!=e&&e.__mui_systemSx)));const{name:h,slot:v,skipVariantsResolver:b,skipSx:x,overridesResolver:S=g(p(v))}=a,w=(0,n.default)(a,c),M=h&&h.startsWith("Mui")||v?"components":"custom",k=void 0!==b?b:v&&"Root"!==v&&"root"!==v||!1,C=x||!1;let q=d;"Root"===v||"root"===v?q=l:v?q=u:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(q=void 0);const E=(0,r.default)(e,(0,t.default)({shouldForwardProp:q,label:void 0},w)),D=e=>"function"==typeof e&&e.__emotion_real!==e||(0,i.isPlainObject)(e)?n=>{const r=m({theme:n.theme,defaultTheme:s,themeId:o});return y(e,(0,t.default)({},n,{theme:r}),r.modularCssLayers?M:void 0)}:e,T=(n,...r)=>{let i=D(n);const a=r?r.map(D):[];h&&S&&a.push(e=>{const n=m((0,t.default)({},e,{defaultTheme:s,themeId:o}));if(!n.components||!n.components[h]||!n.components[h].styleOverrides)return null;const r=n.components[h].styleOverrides,i={};return Object.entries(r).forEach(([r,o])=>{i[r]=y(o,(0,t.default)({},e,{theme:n}),n.modularCssLayers?"theme":void 0)}),S(e,i)}),h&&!k&&a.push(e=>{var n;const r=m((0,t.default)({},e,{defaultTheme:s,themeId:o}));return y({variants:null==r||null==(n=r.components)||null==(n=n[h])?void 0:n.variants},(0,t.default)({},e,{theme:r}),r.modularCssLayers?"theme":void 0)}),C||a.push(f);const l=a.length-r.length;if(Array.isArray(n)&&l>0){const e=new Array(l).fill("");i=[...n,...e],i.raw=[...n.raw,...e]}const c=E(i,...a);return e.muiName&&(c.muiName=e.muiName),c};return E.withConfig&&(T.withConfig=E.withConfig),T}},MF.shouldForwardProp=d,MF.systemDefaultTheme=void 0;var t=e((wF||(wF=1,function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(kF)),kF.exports)),n=e((CF||(CF=1,function(e){e.exports=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n},e.exports.__esModule=!0,e.exports.default=e.exports}(qF)),qF.exports)),r=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}(DF),i=TF;e(OF),e(NF);var o=e(AF),a=e(_F);const s=["ownerState"],l=["variants"],c=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}function d(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function f(e,t){return t&&e&&"object"==typeof e&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}const h=MF.systemDefaultTheme=(0,o.default)(),p=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function m({defaultTheme:e,theme:t,themeId:n}){return r=t,0===Object.keys(r).length?e:t[n]||t;var r}function g(e){return e?(t,n)=>n[e]:null}function y(e,i,o){let{ownerState:a}=i,c=(0,n.default)(i,s);const u="function"==typeof e?e((0,t.default)({ownerState:a},c)):e;if(Array.isArray(u))return u.flatMap(e=>y(e,(0,t.default)({ownerState:a},c),o));if(u&&"object"==typeof u&&Array.isArray(u.variants)){const{variants:e=[]}=u;let i=(0,n.default)(u,l);return e.forEach(e=>{let n=!0;if("function"==typeof e.props?n=e.props((0,t.default)({ownerState:a},c,a)):Object.keys(e.props).forEach(t=>{(null==a?void 0:a[t])!==e.props[t]&&c[t]!==e.props[t]&&(n=!1)}),n){Array.isArray(i)||(i=[i]);const n="function"==typeof e.style?e.style((0,t.default)({ownerState:a},c,a)):e.style;i.push(o?f((0,r.internal_serializeStyles)(n),o):n)}}),i}return o?f((0,r.internal_serializeStyles)(u),o):u}return MF}const LF=e=>function(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}(e)&&"classes"!==e,PF=mg(IF())({themeId:cI,defaultTheme:xF,rootShouldForwardProp:LF}),RF=["theme"];function zF(e){let{theme:t}=e,n=dI(e,RF);const r=t[cI];let i=r||t;return"function"!=typeof t&&(r&&!r.vars?i=uI({},r,{vars:null}):t&&!t.vars&&(i=uI({},t,{vars:null}))),uP.jsx(Hz,uI({},n,{themeId:r?cI:void 0,theme:i}))}const FF=e=>{let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,(t/100).toFixed(2)};function jF(e){return jz(e)}function BF(e){return FR("MuiSvgIcon",e)}jR("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const VF=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],HF=PF("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${DP(n.color)}`],t[`fontSize${DP(n.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var n,r,i,o,a,s,l,c,u,d,f,h,p;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:null==(n=e.transitions)||null==(r=n.create)?void 0:r.call(n,"fill",{duration:null==(i=e.transitions)||null==(i=i.duration)?void 0:i.shorter}),fontSize:{inherit:"inherit",small:(null==(o=e.typography)||null==(a=o.pxToRem)?void 0:a.call(o,20))||"1.25rem",medium:(null==(s=e.typography)||null==(l=s.pxToRem)?void 0:l.call(s,24))||"1.5rem",large:(null==(c=e.typography)||null==(u=c.pxToRem)?void 0:u.call(c,35))||"2.1875rem"}[t.fontSize],color:null!=(d=null==(f=(e.vars||e).palette)||null==(f=f[t.color])?void 0:f.main)?d:{action:null==(h=(e.vars||e).palette)||null==(h=h.action)?void 0:h.active,disabled:null==(p=(e.vars||e).palette)||null==(p=p.action)?void 0:p.disabled,inherit:void 0}[t.color]}}),$F=k_.forwardRef(function(e,t){const n=jF({props:e,name:"MuiSvgIcon"}),{children:r,className:i,color:o="inherit",component:a="svg",fontSize:s="medium",htmlColor:l,inheritViewBox:c=!1,titleAccess:u,viewBox:d="0 0 24 24"}=n,f=dI(n,VF),h=k_.isValidElement(r)&&"svg"===r.type,p=uI({},n,{color:o,component:a,fontSize:s,instanceFontSize:e.fontSize,inheritViewBox:c,viewBox:d,hasSvgAsChild:h}),m={};c||(m.viewBox=d);const g=(e=>{const{color:t,fontSize:n,classes:r}=e;return kz({root:["root","inherit"!==t&&`color${DP(t)}`,`fontSize${DP(n)}`]},BF,r)})(p);return uP.jsxs(HF,uI({as:a,className:RR(g.root,i),focusable:"false",color:l,"aria-hidden":!u||void 0,role:u?"img":void 0,ref:t},m,f,h&&r.props,{ownerState:p,children:[h?r.props.children:r,u?uP.jsx("title",{children:u}):null]}))});function WF(e,t){return WF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},WF(e,t)}function UF(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,WF(e,t)}$F.muiName="SvgIcon";var YF,KF,GF,XF,JF={exports:{}},ZF={},QF={exports:{}},ej={};function tj(){return KF||(KF=1,QF.exports=(YF||(YF=1,function(e){function t(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(!(0<i(o,t)))break e;e[r]=t,e[n]=o,n=r}}function n(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,a=o>>>1;r<a;){var s=2*(r+1)-1,l=e[s],c=s+1,u=e[c];if(0>i(l,n))c<o&&0>i(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[s]=n,r=s);else{if(!(c<o&&0>i(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],c=[],u=1,d=null,f=3,h=!1,p=!1,m=!1,g="function"==typeof setTimeout?setTimeout:null,y="function"==typeof clearTimeout?clearTimeout:null,v="undefined"!=typeof setImmediate?setImmediate:null;function b(e){for(var i=n(c);null!==i;){if(null===i.callback)r(c);else{if(!(i.startTime<=e))break;r(c),i.sortIndex=i.expirationTime,t(l,i)}i=n(c)}}function x(e){if(m=!1,b(e),!p)if(null!==n(l))p=!0,A(S);else{var t=n(c);null!==t&&_(x,t.startTime-e)}}function S(t,i){p=!1,m&&(m=!1,y(C),C=-1),h=!0;var o=f;try{for(b(i),d=n(l);null!==d&&(!(d.expirationTime>i)||t&&!D());){var a=d.callback;if("function"==typeof a){d.callback=null,f=d.priorityLevel;var s=a(d.expirationTime<=i);i=e.unstable_now(),"function"==typeof s?d.callback=s:d===n(l)&&r(l),b(i)}else r(l);d=n(l)}if(null!==d)var u=!0;else{var g=n(c);null!==g&&_(x,g.startTime-i),u=!1}return u}finally{d=null,f=o,h=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var w,M=!1,k=null,C=-1,q=5,E=-1;function D(){return!(e.unstable_now()-E<q)}function T(){if(null!==k){var t=e.unstable_now();E=t;var n=!0;try{n=k(!0,t)}finally{n?w():(M=!1,k=null)}}else M=!1}if("function"==typeof v)w=function(){v(T)};else if("undefined"!=typeof MessageChannel){var O=new MessageChannel,N=O.port2;O.port1.onmessage=T,w=function(){N.postMessage(null)}}else w=function(){g(T,0)};function A(e){k=e,M||(M=!0,w())}function _(t,n){C=g(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){p||h||(p=!0,A(S))},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):q=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,o){var a=e.unstable_now();switch(o="object"==typeof o&&null!==o&&"number"==typeof(o=o.delay)&&0<o?a+o:a,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return r={id:u++,callback:i,priorityLevel:r,startTime:o,expirationTime:s=o+s,sortIndex:-1},o>a?(r.sortIndex=o,t(c,r),null===n(l)&&r===n(c)&&(m?(y(C),C=-1):m=!0,_(x,o-a))):(r.sortIndex=s,t(l,r),p||h||(p=!0,A(S))),r},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}}(ej)),ej)),QF.exports}
/**
   * @license React
   * react-dom.production.min.js
   *
   * Copyright (c) Facebook, Inc. and its affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   */function nj(){if(GF)return ZF;GF=1;var e=M_(),t=tj();function n(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,i={};function o(e,t){a(e,t),a(e+"Capture",t)}function a(e,t){for(i[e]=t,e=0;e<t.length;e++)r.add(t[e])}var s=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),l=Object.prototype.hasOwnProperty,c=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,u={},d={};function f(e,t,n,r,i,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var h={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){h[e]=new f(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];h[t]=new f(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){h[e]=new f(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){h[e]=new f(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){h[e]=new f(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){h[e]=new f(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){h[e]=new f(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){h[e]=new f(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){h[e]=new f(e,5,!1,e.toLowerCase(),null,!1,!1)});var p=/[\-:]([a-z])/g;function m(e){return e[1].toUpperCase()}function g(e,t,n,r){var i=h.hasOwnProperty(t)?h[t]:null;(null!==i?0!==i.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!l.call(d,e)||!l.call(u,e)&&(c.test(e)?d[e]=!0:(u[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(p,m);h[t]=new f(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(p,m);h[t]=new f(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(p,m);h[t]=new f(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){h[e]=new f(e,1,!1,e.toLowerCase(),null,!1,!1)}),h.xlinkHref=new f("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){h[e]=new f(e,1,!1,e.toLowerCase(),null,!0,!0)});var y=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,v=Symbol.for("react.element"),b=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),M=Symbol.for("react.provider"),k=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),q=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),O=Symbol.for("react.offscreen"),N=Symbol.iterator;function A(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=N&&e[N]||e["@@iterator"])?e:null}var _,I=Object.assign;function L(e){if(void 0===_)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);_=t&&t[1]||""}return"\n"+_+e}var P=!1;function R(e,t){if(!e||P)return"";P=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var i=t.stack.split("\n"),o=r.stack.split("\n"),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(1!==a||1!==s)do{if(a--,0>--s||i[a]!==o[s]){var l="\n"+i[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=a&&0<=s);break}}}finally{P=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?L(e):""}function z(e){switch(e.tag){case 5:return L(e.type);case 16:return L("Lazy");case 13:return L("Suspense");case 19:return L("SuspenseList");case 0:case 2:case 15:return e=R(e.type,!1);case 11:return e=R(e.type.render,!1);case 1:return e=R(e.type,!0);default:return""}}function F(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case x:return"Fragment";case b:return"Portal";case w:return"Profiler";case S:return"StrictMode";case q:return"Suspense";case E:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case k:return(e.displayName||"Context")+".Consumer";case M:return(e._context.displayName||"Context")+".Provider";case C:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case D:return null!==(t=e.displayName||null)?t:F(e.type)||"Memo";case T:t=e._payload,e=e._init;try{return F(e(t))}catch(e){}}return null}function j(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return F(t);case 8:return t===S?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function B(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function V(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function H(e){e._valueTracker||(e._valueTracker=function(e){var t=V(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function $(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=V(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function W(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function U(e,t){var n=t.checked;return I({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Y(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=B(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function K(e,t){null!=(t=t.checked)&&g(e,"checked",t,!1)}function G(e,t){K(e,t);var n=B(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?J(e,t.type,n):t.hasOwnProperty("defaultValue")&&J(e,t.type,B(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function X(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function J(e,t,n){"number"===t&&W(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Z=Array.isArray;function Q(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+B(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function ee(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(n(91));return I({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function te(e,t){var r=t.value;if(null==r){if(r=t.children,t=t.defaultValue,null!=r){if(null!=t)throw Error(n(92));if(Z(r)){if(1<r.length)throw Error(n(93));r=r[0]}t=r}null==t&&(t=""),r=t}e._wrapperState={initialValue:B(r)}}function ne(e,t){var n=B(t.value),r=B(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function re(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function ie(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function oe(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?ie(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ae,se=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n)})}:e}(function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ae=ae||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ae.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function le(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var ce={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ue=["Webkit","ms","Moz","O"];function de(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||ce.hasOwnProperty(e)&&ce[e]?(""+t).trim():t+"px"}function fe(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=de(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(ce).forEach(function(e){ue.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ce[t]=ce[e]})});var he=I({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function pe(e,t){if(t){if(he[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(n(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(n(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(n(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(n(62))}}function me(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ge=null;function ye(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var ve=null,be=null,xe=null;function Se(e){if(e=mi(e)){if("function"!=typeof ve)throw Error(n(280));var t=e.stateNode;t&&(t=yi(t),ve(e.stateNode,e.type,t))}}function we(e){be?xe?xe.push(e):xe=[e]:be=e}function Me(){if(be){var e=be,t=xe;if(xe=be=null,Se(e),t)for(e=0;e<t.length;e++)Se(t[e])}}function ke(e,t){return e(t)}function Ce(){}var qe=!1;function Ee(e,t,n){if(qe)return e(t,n);qe=!0;try{return ke(e,t,n)}finally{qe=!1,(null!==be||null!==xe)&&(Ce(),Me())}}function De(e,t){var r=e.stateNode;if(null===r)return null;var i=yi(r);if(null===i)return null;r=i[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(i=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!i;break e;default:e=!1}if(e)return null;if(r&&"function"!=typeof r)throw Error(n(231,t,typeof r));return r}var Te=!1;if(s)try{var Oe={};Object.defineProperty(Oe,"passive",{get:function(){Te=!0}}),window.addEventListener("test",Oe,Oe),window.removeEventListener("test",Oe,Oe)}catch(e){Te=!1}function Ne(e,t,n,r,i,o,a,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this.onError(e)}}var Ae=!1,_e=null,Ie=!1,Le=null,Pe={onError:function(e){Ae=!0,_e=e}};function Re(e,t,n,r,i,o,a,s,l){Ae=!1,_e=null,Ne.apply(Pe,arguments)}function ze(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Fe(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function je(e){if(ze(e)!==e)throw Error(n(188))}function Be(e){return e=function(e){var t=e.alternate;if(!t){if(null===(t=ze(e)))throw Error(n(188));return t!==e?null:e}for(var r=e,i=t;;){var o=r.return;if(null===o)break;var a=o.alternate;if(null===a){if(null!==(i=o.return)){r=i;continue}break}if(o.child===a.child){for(a=o.child;a;){if(a===r)return je(o),e;if(a===i)return je(o),t;a=a.sibling}throw Error(n(188))}if(r.return!==i.return)r=o,i=a;else{for(var s=!1,l=o.child;l;){if(l===r){s=!0,r=o,i=a;break}if(l===i){s=!0,i=o,r=a;break}l=l.sibling}if(!s){for(l=a.child;l;){if(l===r){s=!0,r=a,i=o;break}if(l===i){s=!0,i=a,r=o;break}l=l.sibling}if(!s)throw Error(n(189))}}if(r.alternate!==i)throw Error(n(190))}if(3!==r.tag)throw Error(n(188));return r.stateNode.current===r?e:t}(e),null!==e?Ve(e):null}function Ve(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Ve(e);if(null!==t)return t;e=e.sibling}return null}var He=t.unstable_scheduleCallback,$e=t.unstable_cancelCallback,We=t.unstable_shouldYield,Ue=t.unstable_requestPaint,Ye=t.unstable_now,Ke=t.unstable_getCurrentPriorityLevel,Ge=t.unstable_ImmediatePriority,Xe=t.unstable_UserBlockingPriority,Je=t.unstable_NormalPriority,Ze=t.unstable_LowPriority,Qe=t.unstable_IdlePriority,et=null,tt=null;var nt=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(rt(e)/it|0)|0},rt=Math.log,it=Math.LN2;var ot=64,at=4194304;function st(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function lt(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=268435455&n;if(0!==a){var s=a&~i;0!==s?r=st(s):0!==(o&=a)&&(r=st(o))}else 0!==(a=n&~i)?r=st(a):0!==o&&(r=st(o));if(0===r)return 0;if(0!==t&&t!==r&&0===(t&i)&&((i=r&-r)>=(o=t&-t)||16===i&&4194240&o))return t;if(4&r&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-nt(t)),r|=e[n],t&=~i;return r}function ct(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function ut(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function dt(){var e=ot;return!(4194240&(ot<<=1))&&(ot=64),e}function ft(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ht(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-nt(t)]=n}function pt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-nt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var mt=0;function gt(e){return 1<(e&=-e)?4<e?268435455&e?16:536870912:4:1}var yt,vt,bt,xt,St,wt=!1,Mt=[],kt=null,Ct=null,qt=null,Et=new Map,Dt=new Map,Tt=[],Ot="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Nt(e,t){switch(e){case"focusin":case"focusout":kt=null;break;case"dragenter":case"dragleave":Ct=null;break;case"mouseover":case"mouseout":qt=null;break;case"pointerover":case"pointerout":Et.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Dt.delete(t.pointerId)}}function At(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},null!==t&&(null!==(t=mi(t))&&vt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function _t(e){var t=pi(e.target);if(null!==t){var n=ze(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Fe(n)))return e.blockedOn=t,void St(e.priority,function(){bt(n)})}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function It(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Wt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=mi(n))&&vt(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);ge=r,n.target.dispatchEvent(r),ge=null,t.shift()}return!0}function Lt(e,t,n){It(e)&&n.delete(t)}function Pt(){wt=!1,null!==kt&&It(kt)&&(kt=null),null!==Ct&&It(Ct)&&(Ct=null),null!==qt&&It(qt)&&(qt=null),Et.forEach(Lt),Dt.forEach(Lt)}function Rt(e,n){e.blockedOn===n&&(e.blockedOn=null,wt||(wt=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Pt)))}function zt(e){function t(t){return Rt(t,e)}if(0<Mt.length){Rt(Mt[0],e);for(var n=1;n<Mt.length;n++){var r=Mt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==kt&&Rt(kt,e),null!==Ct&&Rt(Ct,e),null!==qt&&Rt(qt,e),Et.forEach(t),Dt.forEach(t),n=0;n<Tt.length;n++)(r=Tt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Tt.length&&null===(n=Tt[0]).blockedOn;)_t(n),null===n.blockedOn&&Tt.shift()}var Ft=y.ReactCurrentBatchConfig,jt=!0;function Bt(e,t,n,r){var i=mt,o=Ft.transition;Ft.transition=null;try{mt=1,Ht(e,t,n,r)}finally{mt=i,Ft.transition=o}}function Vt(e,t,n,r){var i=mt,o=Ft.transition;Ft.transition=null;try{mt=4,Ht(e,t,n,r)}finally{mt=i,Ft.transition=o}}function Ht(e,t,n,r){if(jt){var i=Wt(e,t,n,r);if(null===i)jr(e,t,r,$t,n),Nt(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return kt=At(kt,e,t,n,r,i),!0;case"dragenter":return Ct=At(Ct,e,t,n,r,i),!0;case"mouseover":return qt=At(qt,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Et.set(o,At(Et.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Dt.set(o,At(Dt.get(o)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(Nt(e,r),4&t&&-1<Ot.indexOf(e)){for(;null!==i;){var o=mi(i);if(null!==o&&yt(o),null===(o=Wt(e,t,n,r))&&jr(e,t,r,$t,n),o===i)break;i=o}null!==i&&r.stopPropagation()}else jr(e,t,r,null,n)}}var $t=null;function Wt(e,t,n,r){if($t=null,null!==(e=pi(e=ye(r))))if(null===(t=ze(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=Fe(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return $t=e,null}function Ut(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Ke()){case Ge:return 1;case Xe:return 4;case Je:case Ze:return 16;case Qe:return 536870912;default:return 16}default:return 16}}var Yt=null,Kt=null,Gt=null;function Xt(){if(Gt)return Gt;var e,t,n=Kt,r=n.length,i="value"in Yt?Yt.value:Yt.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return Gt=i.slice(e,1<t?1-t:void 0)}function Jt(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function Zt(){return!0}function Qt(){return!1}function en(e){function t(t,n,r,i,o){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(i):i[a]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?Zt:Qt,this.isPropagationStopped=Qt,this}return I(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Zt)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Zt)},persist:function(){},isPersistent:Zt}),t}var tn,nn,rn,on={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},an=en(on),sn=I({},on,{view:0,detail:0}),ln=en(sn),cn=I({},sn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Sn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==rn&&(rn&&"mousemove"===e.type?(tn=e.screenX-rn.screenX,nn=e.screenY-rn.screenY):nn=tn=0,rn=e),tn)},movementY:function(e){return"movementY"in e?e.movementY:nn}}),un=en(cn),dn=en(I({},cn,{dataTransfer:0})),fn=en(I({},sn,{relatedTarget:0})),hn=en(I({},on,{animationName:0,elapsedTime:0,pseudoElement:0})),pn=I({},on,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),mn=en(pn),gn=en(I({},on,{data:0})),yn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},vn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},bn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=bn[e])&&!!t[e]}function Sn(){return xn}var wn=I({},sn,{key:function(e){if(e.key){var t=yn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Jt(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?vn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Sn,charCode:function(e){return"keypress"===e.type?Jt(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Jt(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Mn=en(wn),kn=en(I({},cn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Cn=en(I({},sn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Sn})),qn=en(I({},on,{propertyName:0,elapsedTime:0,pseudoElement:0})),En=I({},cn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Dn=en(En),Tn=[9,13,27,32],On=s&&"CompositionEvent"in window,Nn=null;s&&"documentMode"in document&&(Nn=document.documentMode);var An=s&&"TextEvent"in window&&!Nn,_n=s&&(!On||Nn&&8<Nn&&11>=Nn),In=String.fromCharCode(32),Ln=!1;function Pn(e,t){switch(e){case"keyup":return-1!==Tn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Rn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var zn=!1;var Fn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function jn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Fn[e.type]:"textarea"===t}function Bn(e,t,n,r){we(r),0<(t=Vr(t,"onChange")).length&&(n=new an("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Vn=null,Hn=null;function $n(e){Ir(e,0)}function Wn(e){if($(gi(e)))return e}function Un(e,t){if("change"===e)return t}var Yn=!1;if(s){var Kn;if(s){var Gn="oninput"in document;if(!Gn){var Xn=document.createElement("div");Xn.setAttribute("oninput","return;"),Gn="function"==typeof Xn.oninput}Kn=Gn}else Kn=!1;Yn=Kn&&(!document.documentMode||9<document.documentMode)}function Jn(){Vn&&(Vn.detachEvent("onpropertychange",Zn),Hn=Vn=null)}function Zn(e){if("value"===e.propertyName&&Wn(Hn)){var t=[];Bn(t,Hn,e,ye(e)),Ee($n,t)}}function Qn(e,t,n){"focusin"===e?(Jn(),Hn=n,(Vn=t).attachEvent("onpropertychange",Zn)):"focusout"===e&&Jn()}function er(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Wn(Hn)}function tr(e,t){if("click"===e)return Wn(t)}function nr(e,t){if("input"===e||"change"===e)return Wn(t)}var rr="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function ir(e,t){if(rr(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!l.call(t,i)||!rr(e[i],t[i]))return!1}return!0}function or(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ar(e,t){var n,r=or(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=or(r)}}function sr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?sr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function lr(){for(var e=window,t=W();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=W((e=t.contentWindow).document)}return t}function cr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function ur(e){var t=lr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&sr(n.ownerDocument.documentElement,n)){if(null!==r&&cr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=void 0===r.end?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=ar(n,o);var a=ar(n,r);i&&a&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var dr=s&&"documentMode"in document&&11>=document.documentMode,fr=null,hr=null,pr=null,mr=!1;function gr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;mr||null==fr||fr!==W(r)||("selectionStart"in(r=fr)&&cr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},pr&&ir(pr,r)||(pr=r,0<(r=Vr(hr,"onSelect")).length&&(t=new an("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=fr)))}function yr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var vr={animationend:yr("Animation","AnimationEnd"),animationiteration:yr("Animation","AnimationIteration"),animationstart:yr("Animation","AnimationStart"),transitionend:yr("Transition","TransitionEnd")},br={},xr={};function Sr(e){if(br[e])return br[e];if(!vr[e])return e;var t,n=vr[e];for(t in n)if(n.hasOwnProperty(t)&&t in xr)return br[e]=n[t];return e}s&&(xr=document.createElement("div").style,"AnimationEvent"in window||(delete vr.animationend.animation,delete vr.animationiteration.animation,delete vr.animationstart.animation),"TransitionEvent"in window||delete vr.transitionend.transition);var wr=Sr("animationend"),Mr=Sr("animationiteration"),kr=Sr("animationstart"),Cr=Sr("transitionend"),qr=new Map,Er="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Dr(e,t){qr.set(e,t),o(t,[e])}for(var Tr=0;Tr<Er.length;Tr++){var Or=Er[Tr];Dr(Or.toLowerCase(),"on"+(Or[0].toUpperCase()+Or.slice(1)))}Dr(wr,"onAnimationEnd"),Dr(Mr,"onAnimationIteration"),Dr(kr,"onAnimationStart"),Dr("dblclick","onDoubleClick"),Dr("focusin","onFocus"),Dr("focusout","onBlur"),Dr(Cr,"onTransitionEnd"),a("onMouseEnter",["mouseout","mouseover"]),a("onMouseLeave",["mouseout","mouseover"]),a("onPointerEnter",["pointerout","pointerover"]),a("onPointerLeave",["pointerout","pointerover"]),o("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),o("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),o("onBeforeInput",["compositionend","keypress","textInput","paste"]),o("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Nr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ar=new Set("cancel close invalid load scroll toggle".split(" ").concat(Nr));function _r(e,t,r){var i=e.type||"unknown-event";e.currentTarget=r,function(e,t,r,i,o,a,s,l,c){if(Re.apply(this,arguments),Ae){if(!Ae)throw Error(n(198));var u=_e;Ae=!1,_e=null,Ie||(Ie=!0,Le=u)}}(i,t,void 0,e),e.currentTarget=null}function Ir(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==o&&i.isPropagationStopped())break e;_r(i,s,c),o=l}else for(a=0;a<r.length;a++){if(l=(s=r[a]).instance,c=s.currentTarget,s=s.listener,l!==o&&i.isPropagationStopped())break e;_r(i,s,c),o=l}}}if(Ie)throw e=Le,Ie=!1,Le=null,e}function Lr(e,t){var n=t[di];void 0===n&&(n=t[di]=new Set);var r=e+"__bubble";n.has(r)||(Fr(t,e,2,!1),n.add(r))}function Pr(e,t,n){var r=0;t&&(r|=4),Fr(n,e,r,t)}var Rr="_reactListening"+Math.random().toString(36).slice(2);function zr(e){if(!e[Rr]){e[Rr]=!0,r.forEach(function(t){"selectionchange"!==t&&(Ar.has(t)||Pr(t,!1,e),Pr(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Rr]||(t[Rr]=!0,Pr("selectionchange",!1,t))}}function Fr(e,t,n,r){switch(Ut(t)){case 1:var i=Bt;break;case 4:i=Vt;break;default:i=Ht}n=i.bind(null,t,n,e),i=void 0,!Te||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function jr(e,t,n,r,i){var o=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===a)for(a=r.return;null!==a;){var l=a.tag;if((3===l||4===l)&&((l=a.stateNode.containerInfo)===i||8===l.nodeType&&l.parentNode===i))return;a=a.return}for(;null!==s;){if(null===(a=pi(s)))return;if(5===(l=a.tag)||6===l){r=o=a;continue e}s=s.parentNode}}r=r.return}Ee(function(){var r=o,i=ye(n),a=[];e:{var s=qr.get(e);if(void 0!==s){var l=an,c=e;switch(e){case"keypress":if(0===Jt(n))break e;case"keydown":case"keyup":l=Mn;break;case"focusin":c="focus",l=fn;break;case"focusout":c="blur",l=fn;break;case"beforeblur":case"afterblur":l=fn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=un;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=dn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Cn;break;case wr:case Mr:case kr:l=hn;break;case Cr:l=qn;break;case"scroll":l=ln;break;case"wheel":l=Dn;break;case"copy":case"cut":case"paste":l=mn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=kn}var u=!!(4&t),d=!u&&"scroll"===e,f=u?null!==s?s+"Capture":null:s;u=[];for(var h,p=r;null!==p;){var m=(h=p).stateNode;if(5===h.tag&&null!==m&&(h=m,null!==f&&(null!=(m=De(p,f))&&u.push(Br(p,m,h)))),d)break;p=p.return}0<u.length&&(s=new l(s,c,null,n,i),a.push({event:s,listeners:u}))}}if(!(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===ge||!(c=n.relatedTarget||n.fromElement)||!pi(c)&&!c[ui])&&(l||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?pi(c):null)&&(c!==(d=ze(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(u=un,m="onMouseLeave",f="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(u=kn,m="onPointerLeave",f="onPointerEnter",p="pointer"),d=null==l?s:gi(l),h=null==c?s:gi(c),(s=new u(m,p+"leave",l,n,i)).target=d,s.relatedTarget=h,m=null,pi(i)===r&&((u=new u(f,p+"enter",c,n,i)).target=h,u.relatedTarget=d,m=u),d=m,l&&c)e:{for(f=c,p=0,h=u=l;h;h=Hr(h))p++;for(h=0,m=f;m;m=Hr(m))h++;for(;0<p-h;)u=Hr(u),p--;for(;0<h-p;)f=Hr(f),h--;for(;p--;){if(u===f||null!==f&&u===f.alternate)break e;u=Hr(u),f=Hr(f)}u=null}else u=null;null!==l&&$r(a,s,l,u,!1),null!==c&&null!==d&&$r(a,d,c,u,!0)}if("select"===(l=(s=r?gi(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var g=Un;else if(jn(s))if(Yn)g=nr;else{g=er;var y=Qn}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(g=tr);switch(g&&(g=g(e,r))?Bn(a,g,n,i):(y&&y(e,s,r),"focusout"===e&&(y=s._wrapperState)&&y.controlled&&"number"===s.type&&J(s,"number",s.value)),y=r?gi(r):window,e){case"focusin":(jn(y)||"true"===y.contentEditable)&&(fr=y,hr=r,pr=null);break;case"focusout":pr=hr=fr=null;break;case"mousedown":mr=!0;break;case"contextmenu":case"mouseup":case"dragend":mr=!1,gr(a,n,i);break;case"selectionchange":if(dr)break;case"keydown":case"keyup":gr(a,n,i)}var v;if(On)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else zn?Pn(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(_n&&"ko"!==n.locale&&(zn||"onCompositionStart"!==b?"onCompositionEnd"===b&&zn&&(v=Xt()):(Kt="value"in(Yt=i)?Yt.value:Yt.textContent,zn=!0)),0<(y=Vr(r,b)).length&&(b=new gn(b,e,null,n,i),a.push({event:b,listeners:y}),v?b.data=v:null!==(v=Rn(n))&&(b.data=v))),(v=An?function(e,t){switch(e){case"compositionend":return Rn(t);case"keypress":return 32!==t.which?null:(Ln=!0,In);case"textInput":return(e=t.data)===In&&Ln?null:e;default:return null}}(e,n):function(e,t){if(zn)return"compositionend"===e||!On&&Pn(e,t)?(e=Xt(),Gt=Kt=Yt=null,zn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return _n&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Vr(r,"onBeforeInput")).length&&(i=new gn("onBeforeInput","beforeinput",null,n,i),a.push({event:i,listeners:r}),i.data=v))}Ir(a,t)})}function Br(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Vr(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=De(e,n))&&r.unshift(Br(e,o,i)),null!=(o=De(e,t))&&r.push(Br(e,o,i))),e=e.return}return r}function Hr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function $r(e,t,n,r,i){for(var o=t._reactName,a=[];null!==n&&n!==r;){var s=n,l=s.alternate,c=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==c&&(s=c,i?null!=(l=De(n,o))&&a.unshift(Br(n,l,s)):i||null!=(l=De(n,o))&&a.push(Br(n,l,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var Wr=/\r\n?/g,Ur=/\u0000|\uFFFD/g;function Yr(e){return("string"==typeof e?e:""+e).replace(Wr,"\n").replace(Ur,"")}function Kr(e,t,r){if(t=Yr(t),Yr(e)!==t&&r)throw Error(n(425))}function Gr(){}var Xr=null,Jr=null;function Zr(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var Qr="function"==typeof setTimeout?setTimeout:void 0,ei="function"==typeof clearTimeout?clearTimeout:void 0,ti="function"==typeof Promise?Promise:void 0,ni="function"==typeof queueMicrotask?queueMicrotask:void 0!==ti?function(e){return ti.resolve(null).then(e).catch(ri)}:Qr;function ri(e){setTimeout(function(){throw e})}function ii(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void zt(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);zt(t)}function oi(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function ai(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var si=Math.random().toString(36).slice(2),li="__reactFiber$"+si,ci="__reactProps$"+si,ui="__reactContainer$"+si,di="__reactEvents$"+si,fi="__reactListeners$"+si,hi="__reactHandles$"+si;function pi(e){var t=e[li];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ui]||n[li]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=ai(e);null!==e;){if(n=e[li])return n;e=ai(e)}return t}n=(e=n).parentNode}return null}function mi(e){return!(e=e[li]||e[ui])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function gi(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(n(33))}function yi(e){return e[ci]||null}var vi=[],bi=-1;function xi(e){return{current:e}}function Si(e){0>bi||(e.current=vi[bi],vi[bi]=null,bi--)}function wi(e,t){bi++,vi[bi]=e.current,e.current=t}var Mi={},ki=xi(Mi),Ci=xi(!1),qi=Mi;function Ei(e,t){var n=e.type.contextTypes;if(!n)return Mi;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Di(e){return null!=(e=e.childContextTypes)}function Ti(){Si(Ci),Si(ki)}function Oi(e,t,r){if(ki.current!==Mi)throw Error(n(168));wi(ki,t),wi(Ci,r)}function Ni(e,t,r){var i=e.stateNode;if(t=t.childContextTypes,"function"!=typeof i.getChildContext)return r;for(var o in i=i.getChildContext())if(!(o in t))throw Error(n(108,j(e)||"Unknown",o));return I({},r,i)}function Ai(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Mi,qi=ki.current,wi(ki,e),wi(Ci,Ci.current),!0}function _i(e,t,r){var i=e.stateNode;if(!i)throw Error(n(169));r?(e=Ni(e,t,qi),i.__reactInternalMemoizedMergedChildContext=e,Si(Ci),Si(ki),wi(ki,e)):Si(Ci),wi(Ci,r)}var Ii=null,Li=!1,Pi=!1;function Ri(e){null===Ii?Ii=[e]:Ii.push(e)}function zi(){if(!Pi&&null!==Ii){Pi=!0;var e=0,t=mt;try{var n=Ii;for(mt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Ii=null,Li=!1}catch(t){throw null!==Ii&&(Ii=Ii.slice(e+1)),He(Ge,zi),t}finally{mt=t,Pi=!1}}return null}var Fi=[],ji=0,Bi=null,Vi=0,Hi=[],$i=0,Wi=null,Ui=1,Yi="";function Ki(e,t){Fi[ji++]=Vi,Fi[ji++]=Bi,Bi=e,Vi=t}function Gi(e,t,n){Hi[$i++]=Ui,Hi[$i++]=Yi,Hi[$i++]=Wi,Wi=e;var r=Ui;e=Yi;var i=32-nt(r)-1;r&=~(1<<i),n+=1;var o=32-nt(t)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,Ui=1<<32-nt(t)+i|n<<i|r,Yi=o+e}else Ui=1<<o|n<<i|r,Yi=e}function Xi(e){null!==e.return&&(Ki(e,1),Gi(e,1,0))}function Ji(e){for(;e===Bi;)Bi=Fi[--ji],Fi[ji]=null,Vi=Fi[--ji],Fi[ji]=null;for(;e===Wi;)Wi=Hi[--$i],Hi[$i]=null,Yi=Hi[--$i],Hi[$i]=null,Ui=Hi[--$i],Hi[$i]=null}var Zi=null,Qi=null,eo=!1,to=null;function no(e,t){var n=Ec(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function ro(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,Zi=e,Qi=oi(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,Zi=e,Qi=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Wi?{id:Ui,overflow:Yi}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Ec(18,null,null,0)).stateNode=t,n.return=e,e.child=n,Zi=e,Qi=null,!0);default:return!1}}function io(e){return!(!(1&e.mode)||128&e.flags)}function oo(e){if(eo){var t=Qi;if(t){var r=t;if(!ro(e,t)){if(io(e))throw Error(n(418));t=oi(r.nextSibling);var i=Zi;t&&ro(e,t)?no(i,r):(e.flags=-4097&e.flags|2,eo=!1,Zi=e)}}else{if(io(e))throw Error(n(418));e.flags=-4097&e.flags|2,eo=!1,Zi=e}}}function ao(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Zi=e}function so(e){if(e!==Zi)return!1;if(!eo)return ao(e),eo=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!Zr(e.type,e.memoizedProps)),t&&(t=Qi)){if(io(e))throw lo(),Error(n(418));for(;t;)no(e,t),t=oi(t.nextSibling)}if(ao(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(n(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var r=e.data;if("/$"===r){if(0===t){Qi=oi(e.nextSibling);break e}t--}else"$"!==r&&"$!"!==r&&"$?"!==r||t++}e=e.nextSibling}Qi=null}}else Qi=Zi?oi(e.stateNode.nextSibling):null;return!0}function lo(){for(var e=Qi;e;)e=oi(e.nextSibling)}function co(){Qi=Zi=null,eo=!1}function uo(e){null===to?to=[e]:to.push(e)}var fo=y.ReactCurrentBatchConfig;function ho(e,t,r){if(null!==(e=r.ref)&&"function"!=typeof e&&"object"!=typeof e){if(r._owner){if(r=r._owner){if(1!==r.tag)throw Error(n(309));var i=r.stateNode}if(!i)throw Error(n(147,e));var o=i,a=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===a?t.ref:(t=function(e){var t=o.refs;null===e?delete t[a]:t[a]=e},t._stringRef=a,t)}if("string"!=typeof e)throw Error(n(284));if(!r._owner)throw Error(n(290,e))}return e}function po(e,t){throw e=Object.prototype.toString.call(t),Error(n(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function mo(e){return(0,e._init)(e._payload)}function go(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function r(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function i(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=Tc(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=_c(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function c(e,t,n,r){var i=n.type;return i===x?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===i||"object"==typeof i&&null!==i&&i.$$typeof===T&&mo(i)===t.type)?((r=o(t,n.props)).ref=ho(e,t,n),r.return=e,r):((r=Oc(n.type,n.key,n.props,null,e.mode,r)).ref=ho(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Ic(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function d(e,t,n,r,i){return null===t||7!==t.tag?((t=Nc(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function f(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=_c(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case v:return(n=Oc(t.type,t.key,t.props,null,e.mode,n)).ref=ho(e,null,t),n.return=e,n;case b:return(t=Ic(t,e.mode,n)).return=e,t;case T:return f(e,(0,t._init)(t._payload),n)}if(Z(t)||A(t))return(t=Nc(t,e.mode,n,null)).return=e,t;po(e,t)}return null}function h(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==i?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case v:return n.key===i?c(e,t,n,r):null;case b:return n.key===i?u(e,t,n,r):null;case T:return h(e,t,(i=n._init)(n._payload),r)}if(Z(n)||A(n))return null!==i?null:d(e,t,n,r,null);po(e,n)}return null}function p(e,t,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r)return l(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case v:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case b:return u(t,e=e.get(null===r.key?n:r.key)||null,r,i);case T:return p(e,t,n,(0,r._init)(r._payload),i)}if(Z(r)||A(r))return d(t,e=e.get(n)||null,r,i,null);po(t,r)}return null}function m(n,o,s,l){for(var c=null,u=null,d=o,m=o=0,g=null;null!==d&&m<s.length;m++){d.index>m?(g=d,d=null):g=d.sibling;var y=h(n,d,s[m],l);if(null===y){null===d&&(d=g);break}e&&d&&null===y.alternate&&t(n,d),o=a(y,o,m),null===u?c=y:u.sibling=y,u=y,d=g}if(m===s.length)return r(n,d),eo&&Ki(n,m),c;if(null===d){for(;m<s.length;m++)null!==(d=f(n,s[m],l))&&(o=a(d,o,m),null===u?c=d:u.sibling=d,u=d);return eo&&Ki(n,m),c}for(d=i(n,d);m<s.length;m++)null!==(g=p(d,n,m,s[m],l))&&(e&&null!==g.alternate&&d.delete(null===g.key?m:g.key),o=a(g,o,m),null===u?c=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(n,e)}),eo&&Ki(n,m),c}function g(o,s,l,c){var u=A(l);if("function"!=typeof u)throw Error(n(150));if(null==(l=u.call(l)))throw Error(n(151));for(var d=u=null,m=s,g=s=0,y=null,v=l.next();null!==m&&!v.done;g++,v=l.next()){m.index>g?(y=m,m=null):y=m.sibling;var b=h(o,m,v.value,c);if(null===b){null===m&&(m=y);break}e&&m&&null===b.alternate&&t(o,m),s=a(b,s,g),null===d?u=b:d.sibling=b,d=b,m=y}if(v.done)return r(o,m),eo&&Ki(o,g),u;if(null===m){for(;!v.done;g++,v=l.next())null!==(v=f(o,v.value,c))&&(s=a(v,s,g),null===d?u=v:d.sibling=v,d=v);return eo&&Ki(o,g),u}for(m=i(o,m);!v.done;g++,v=l.next())null!==(v=p(m,o,g,v.value,c))&&(e&&null!==v.alternate&&m.delete(null===v.key?g:v.key),s=a(v,s,g),null===d?u=v:d.sibling=v,d=v);return e&&m.forEach(function(e){return t(o,e)}),eo&&Ki(o,g),u}return function e(n,i,a,l){if("object"==typeof a&&null!==a&&a.type===x&&null===a.key&&(a=a.props.children),"object"==typeof a&&null!==a){switch(a.$$typeof){case v:e:{for(var c=a.key,u=i;null!==u;){if(u.key===c){if((c=a.type)===x){if(7===u.tag){r(n,u.sibling),(i=o(u,a.props.children)).return=n,n=i;break e}}else if(u.elementType===c||"object"==typeof c&&null!==c&&c.$$typeof===T&&mo(c)===u.type){r(n,u.sibling),(i=o(u,a.props)).ref=ho(n,u,a),i.return=n,n=i;break e}r(n,u);break}t(n,u),u=u.sibling}a.type===x?((i=Nc(a.props.children,n.mode,l,a.key)).return=n,n=i):((l=Oc(a.type,a.key,a.props,null,n.mode,l)).ref=ho(n,i,a),l.return=n,n=l)}return s(n);case b:e:{for(u=a.key;null!==i;){if(i.key===u){if(4===i.tag&&i.stateNode.containerInfo===a.containerInfo&&i.stateNode.implementation===a.implementation){r(n,i.sibling),(i=o(i,a.children||[])).return=n,n=i;break e}r(n,i);break}t(n,i),i=i.sibling}(i=Ic(a,n.mode,l)).return=n,n=i}return s(n);case T:return e(n,i,(u=a._init)(a._payload),l)}if(Z(a))return m(n,i,a,l);if(A(a))return g(n,i,a,l);po(n,a)}return"string"==typeof a&&""!==a||"number"==typeof a?(a=""+a,null!==i&&6===i.tag?(r(n,i.sibling),(i=o(i,a)).return=n,n=i):(r(n,i),(i=_c(a,n.mode,l)).return=n,n=i),s(n)):r(n,i)}}var yo=go(!0),vo=go(!1),bo=xi(null),xo=null,So=null,wo=null;function Mo(){wo=So=xo=null}function ko(e){var t=bo.current;Si(bo),e._currentValue=t}function Co(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function qo(e,t){xo=e,wo=So=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(ms=!0),e.firstContext=null)}function Eo(e){var t=e._currentValue;if(wo!==e)if(e={context:e,memoizedValue:t,next:null},null===So){if(null===xo)throw Error(n(308));So=e,xo.dependencies={lanes:0,firstContext:e}}else So=So.next=e;return t}var Do=null;function To(e){null===Do?Do=[e]:Do.push(e)}function Oo(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,To(t)):(n.next=i.next,i.next=n),t.interleaved=n,No(e,r)}function No(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Ao=!1;function _o(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Io(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Lo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Po(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&kl){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,No(e,n)}return null===(i=r.interleaved)?(t.next=t,To(r)):(t.next=i.next,i.next=t),r.interleaved=t,No(e,n)}function Ro(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,pt(e,n)}}function zo(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Fo(e,t,n,r){var i=e.updateQueue;Ao=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var l=s,c=l.next;l.next=null,null===a?o=c:a.next=c,a=l;var u=e.alternate;null!==u&&((s=(u=u.updateQueue).lastBaseUpdate)!==a&&(null===s?u.firstBaseUpdate=c:s.next=c,u.lastBaseUpdate=l))}if(null!==o){var d=i.baseState;for(a=0,u=c=l=null,s=o;;){var f=s.lane,h=s.eventTime;if((r&f)===f){null!==u&&(u=u.next={eventTime:h,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var p=e,m=s;switch(f=t,h=n,m.tag){case 1:if("function"==typeof(p=m.payload)){d=p.call(h,d,f);break e}d=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null==(f="function"==typeof(p=m.payload)?p.call(h,d,f):p))break e;d=I({},d,f);break e;case 2:Ao=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(f=i.effects)?i.effects=[s]:f.push(s))}else h={eventTime:h,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===u?(c=u=h,l=d):u=u.next=h,a|=f;if(null===(s=s.next)){if(null===(s=i.shared.pending))break;s=(f=s).next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}if(null===u&&(l=d),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,null!==(t=i.shared.interleaved)){i=t;do{a|=i.lane,i=i.next}while(i!==t)}else null===o&&(i.shared.lanes=0);Al|=a,e.lanes=a,e.memoizedState=d}}function jo(e,t,r){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var i=e[t],o=i.callback;if(null!==o){if(i.callback=null,i=r,"function"!=typeof o)throw Error(n(191,o));o.call(i)}}}var Bo={},Vo=xi(Bo),Ho=xi(Bo),$o=xi(Bo);function Wo(e){if(e===Bo)throw Error(n(174));return e}function Uo(e,t){switch(wi($o,t),wi(Ho,e),wi(Vo,Bo),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:oe(null,"");break;default:t=oe(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Si(Vo),wi(Vo,t)}function Yo(){Si(Vo),Si(Ho),Si($o)}function Ko(e){Wo($o.current);var t=Wo(Vo.current),n=oe(t,e.type);t!==n&&(wi(Ho,e),wi(Vo,n))}function Go(e){Ho.current===e&&(Si(Vo),Si(Ho))}var Xo=xi(0);function Jo(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(128&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Zo=[];function Qo(){for(var e=0;e<Zo.length;e++)Zo[e]._workInProgressVersionPrimary=null;Zo.length=0}var ea=y.ReactCurrentDispatcher,ta=y.ReactCurrentBatchConfig,na=0,ra=null,ia=null,oa=null,aa=!1,sa=!1,la=0,ca=0;function ua(){throw Error(n(321))}function da(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!rr(e[n],t[n]))return!1;return!0}function fa(e,t,r,i,o,a){if(na=a,ra=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ea.current=null===e||null===e.memoizedState?Ga:Xa,e=r(i,o),sa){a=0;do{if(sa=!1,la=0,25<=a)throw Error(n(301));a+=1,oa=ia=null,t.updateQueue=null,ea.current=Ja,e=r(i,o)}while(sa)}if(ea.current=Ka,t=null!==ia&&null!==ia.next,na=0,oa=ia=ra=null,aa=!1,t)throw Error(n(300));return e}function ha(){var e=0!==la;return la=0,e}function pa(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===oa?ra.memoizedState=oa=e:oa=oa.next=e,oa}function ma(){if(null===ia){var e=ra.alternate;e=null!==e?e.memoizedState:null}else e=ia.next;var t=null===oa?ra.memoizedState:oa.next;if(null!==t)oa=t,ia=e;else{if(null===e)throw Error(n(310));e={memoizedState:(ia=e).memoizedState,baseState:ia.baseState,baseQueue:ia.baseQueue,queue:ia.queue,next:null},null===oa?ra.memoizedState=oa=e:oa=oa.next=e}return oa}function ga(e,t){return"function"==typeof t?t(e):t}function ya(e){var t=ma(),r=t.queue;if(null===r)throw Error(n(311));r.lastRenderedReducer=e;var i=ia,o=i.baseQueue,a=r.pending;if(null!==a){if(null!==o){var s=o.next;o.next=a.next,a.next=s}i.baseQueue=o=a,r.pending=null}if(null!==o){a=o.next,i=i.baseState;var l=s=null,c=null,u=a;do{var d=u.lane;if((na&d)===d)null!==c&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),i=u.hasEagerState?u.eagerState:e(i,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===c?(l=c=f,s=i):c=c.next=f,ra.lanes|=d,Al|=d}u=u.next}while(null!==u&&u!==a);null===c?s=i:c.next=l,rr(i,t.memoizedState)||(ms=!0),t.memoizedState=i,t.baseState=s,t.baseQueue=c,r.lastRenderedState=i}if(null!==(e=r.interleaved)){o=e;do{a=o.lane,ra.lanes|=a,Al|=a,o=o.next}while(o!==e)}else null===o&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function va(e){var t=ma(),r=t.queue;if(null===r)throw Error(n(311));r.lastRenderedReducer=e;var i=r.dispatch,o=r.pending,a=t.memoizedState;if(null!==o){r.pending=null;var s=o=o.next;do{a=e(a,s.action),s=s.next}while(s!==o);rr(a,t.memoizedState)||(ms=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),r.lastRenderedState=a}return[a,i]}function ba(){}function xa(e,t){var r=ra,i=ma(),o=t(),a=!rr(i.memoizedState,o);if(a&&(i.memoizedState=o,ms=!0),i=i.queue,Aa(Ma.bind(null,r,i,e),[e]),i.getSnapshot!==t||a||null!==oa&&1&oa.memoizedState.tag){if(r.flags|=2048,Ea(9,wa.bind(null,r,i,o,t),void 0,null),null===Cl)throw Error(n(349));30&na||Sa(r,t,o)}return o}function Sa(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=ra.updateQueue)?(t={lastEffect:null,stores:null},ra.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function wa(e,t,n,r){t.value=n,t.getSnapshot=r,ka(t)&&Ca(e)}function Ma(e,t,n){return n(function(){ka(t)&&Ca(e)})}function ka(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!rr(e,n)}catch(e){return!0}}function Ca(e){var t=No(e,1);null!==t&&Zl(t,e,1,-1)}function qa(e){var t=pa();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ga,lastRenderedState:e},t.queue=e,e=e.dispatch=$a.bind(null,ra,e),[t.memoizedState,e]}function Ea(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=ra.updateQueue)?(t={lastEffect:null,stores:null},ra.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Da(){return ma().memoizedState}function Ta(e,t,n,r){var i=pa();ra.flags|=e,i.memoizedState=Ea(1|t,n,void 0,void 0===r?null:r)}function Oa(e,t,n,r){var i=ma();r=void 0===r?null:r;var o=void 0;if(null!==ia){var a=ia.memoizedState;if(o=a.destroy,null!==r&&da(r,a.deps))return void(i.memoizedState=Ea(t,n,o,r))}ra.flags|=e,i.memoizedState=Ea(1|t,n,o,r)}function Na(e,t){return Ta(8390656,8,e,t)}function Aa(e,t){return Oa(2048,8,e,t)}function _a(e,t){return Oa(4,2,e,t)}function Ia(e,t){return Oa(4,4,e,t)}function La(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Pa(e,t,n){return n=null!=n?n.concat([e]):null,Oa(4,4,La.bind(null,t,e),n)}function Ra(){}function za(e,t){var n=ma();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&da(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Fa(e,t){var n=ma();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&da(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function ja(e,t,n){return 21&na?(rr(n,t)||(n=dt(),ra.lanes|=n,Al|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,ms=!0),e.memoizedState=n)}function Ba(e,t){var n=mt;mt=0!==n&&4>n?n:4,e(!0);var r=ta.transition;ta.transition={};try{e(!1),t()}finally{mt=n,ta.transition=r}}function Va(){return ma().memoizedState}function Ha(e,t,n){var r=Jl(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Wa(e))Ua(t,n);else if(null!==(n=Oo(e,t,n,r))){Zl(n,e,r,Xl()),Ya(n,t,r)}}function $a(e,t,n){var r=Jl(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Wa(e))Ua(t,i);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,rr(s,a)){var l=t.interleaved;return null===l?(i.next=i,To(t)):(i.next=l.next,l.next=i),void(t.interleaved=i)}}catch(e){}null!==(n=Oo(e,t,i,r))&&(Zl(n,e,r,i=Xl()),Ya(n,t,r))}}function Wa(e){var t=e.alternate;return e===ra||null!==t&&t===ra}function Ua(e,t){sa=aa=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ya(e,t,n){if(4194240&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,pt(e,n)}}var Ka={readContext:Eo,useCallback:ua,useContext:ua,useEffect:ua,useImperativeHandle:ua,useInsertionEffect:ua,useLayoutEffect:ua,useMemo:ua,useReducer:ua,useRef:ua,useState:ua,useDebugValue:ua,useDeferredValue:ua,useTransition:ua,useMutableSource:ua,useSyncExternalStore:ua,useId:ua,unstable_isNewReconciler:!1},Ga={readContext:Eo,useCallback:function(e,t){return pa().memoizedState=[e,void 0===t?null:t],e},useContext:Eo,useEffect:Na,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Ta(4194308,4,La.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ta(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ta(4,2,e,t)},useMemo:function(e,t){var n=pa();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=pa();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Ha.bind(null,ra,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},pa().memoizedState=e},useState:qa,useDebugValue:Ra,useDeferredValue:function(e){return pa().memoizedState=e},useTransition:function(){var e=qa(!1),t=e[0];return e=Ba.bind(null,e[1]),pa().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var i=ra,o=pa();if(eo){if(void 0===r)throw Error(n(407));r=r()}else{if(r=t(),null===Cl)throw Error(n(349));30&na||Sa(i,t,r)}o.memoizedState=r;var a={value:r,getSnapshot:t};return o.queue=a,Na(Ma.bind(null,i,a,e),[e]),i.flags|=2048,Ea(9,wa.bind(null,i,a,r,t),void 0,null),r},useId:function(){var e=pa(),t=Cl.identifierPrefix;if(eo){var n=Yi;t=":"+t+"R"+(n=(Ui&~(1<<32-nt(Ui)-1)).toString(32)+n),0<(n=la++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=ca++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Xa={readContext:Eo,useCallback:za,useContext:Eo,useEffect:Aa,useImperativeHandle:Pa,useInsertionEffect:_a,useLayoutEffect:Ia,useMemo:Fa,useReducer:ya,useRef:Da,useState:function(){return ya(ga)},useDebugValue:Ra,useDeferredValue:function(e){return ja(ma(),ia.memoizedState,e)},useTransition:function(){return[ya(ga)[0],ma().memoizedState]},useMutableSource:ba,useSyncExternalStore:xa,useId:Va,unstable_isNewReconciler:!1},Ja={readContext:Eo,useCallback:za,useContext:Eo,useEffect:Aa,useImperativeHandle:Pa,useInsertionEffect:_a,useLayoutEffect:Ia,useMemo:Fa,useReducer:va,useRef:Da,useState:function(){return va(ga)},useDebugValue:Ra,useDeferredValue:function(e){var t=ma();return null===ia?t.memoizedState=e:ja(t,ia.memoizedState,e)},useTransition:function(){return[va(ga)[0],ma().memoizedState]},useMutableSource:ba,useSyncExternalStore:xa,useId:Va,unstable_isNewReconciler:!1};function Za(e,t){if(e&&e.defaultProps){for(var n in t=I({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function Qa(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:I({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var es={isMounted:function(e){return!!(e=e._reactInternals)&&ze(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Xl(),i=Jl(e),o=Lo(r,i);o.payload=t,null!=n&&(o.callback=n),null!==(t=Po(e,o,i))&&(Zl(t,e,i,r),Ro(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Xl(),i=Jl(e),o=Lo(r,i);o.tag=1,o.payload=t,null!=n&&(o.callback=n),null!==(t=Po(e,o,i))&&(Zl(t,e,i,r),Ro(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Xl(),r=Jl(e),i=Lo(n,r);i.tag=2,null!=t&&(i.callback=t),null!==(t=Po(e,i,r))&&(Zl(t,e,r,n),Ro(t,e,r))}};function ts(e,t,n,r,i,o,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!ir(n,r)||!ir(i,o))}function ns(e,t,n){var r=!1,i=Mi,o=t.contextType;return"object"==typeof o&&null!==o?o=Eo(o):(i=Di(t)?qi:ki.current,o=(r=null!=(r=t.contextTypes))?Ei(e,i):Mi),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=es,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function rs(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&es.enqueueReplaceState(t,t.state,null)}function is(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},_o(e);var o=t.contextType;"object"==typeof o&&null!==o?i.context=Eo(o):(o=Di(t)?qi:ki.current,i.context=Ei(e,o)),i.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(Qa(e,t,o,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&es.enqueueReplaceState(i,i.state,null),Fo(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4194308)}function os(e,t){try{var n="",r=t;do{n+=z(r),r=r.return}while(r);var i=n}catch(e){i="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:i,digest:null}}function as(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function ss(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}var ls="function"==typeof WeakMap?WeakMap:Map;function cs(e,t,n){(n=Lo(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){jl||(jl=!0,Bl=r),ss(0,t)},n}function us(e,t,n){(n=Lo(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){ss(0,t)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){ss(0,t),"function"!=typeof r&&(null===Vl?Vl=new Set([this]):Vl.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function ds(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new ls;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Sc.bind(null,e,t,n),t.then(e,e))}function fs(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function hs(e,t,n,r,i){return 1&e.mode?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Lo(-1,1)).tag=2,Po(n,t,1))),n.lanes|=1),e)}var ps=y.ReactCurrentOwner,ms=!1;function gs(e,t,n,r){t.child=null===e?vo(t,null,n,r):yo(t,e.child,n,r)}function ys(e,t,n,r,i){n=n.render;var o=t.ref;return qo(t,i),r=fa(e,t,n,r,o,i),n=ha(),null===e||ms?(eo&&n&&Xi(t),t.flags|=1,gs(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,js(e,t,i))}function vs(e,t,n,r,i){if(null===e){var o=n.type;return"function"!=typeof o||Dc(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Oc(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,bs(e,t,o,r,i))}if(o=e.child,0===(e.lanes&i)){var a=o.memoizedProps;if((n=null!==(n=n.compare)?n:ir)(a,r)&&e.ref===t.ref)return js(e,t,i)}return t.flags|=1,(e=Tc(o,r)).ref=t.ref,e.return=t,t.child=e}function bs(e,t,n,r,i){if(null!==e){var o=e.memoizedProps;if(ir(o,r)&&e.ref===t.ref){if(ms=!1,t.pendingProps=r=o,0===(e.lanes&i))return t.lanes=e.lanes,js(e,t,i);131072&e.flags&&(ms=!0)}}return ws(e,t,n,r,i)}function xs(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(1&t.mode){if(!(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,wi(Tl,Dl),Dl|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,wi(Tl,Dl),Dl|=r}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},wi(Tl,Dl),Dl|=n;else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,wi(Tl,Dl),Dl|=r;return gs(e,t,i,n),t.child}function Ss(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ws(e,t,n,r,i){var o=Di(n)?qi:ki.current;return o=Ei(t,o),qo(t,i),n=fa(e,t,n,r,o,i),r=ha(),null===e||ms?(eo&&r&&Xi(t),t.flags|=1,gs(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,js(e,t,i))}function Ms(e,t,n,r,i){if(Di(n)){var o=!0;Ai(t)}else o=!1;if(qo(t,i),null===t.stateNode)Fs(e,t),ns(t,n,r),is(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,c=n.contextType;"object"==typeof c&&null!==c?c=Eo(c):c=Ei(t,c=Di(n)?qi:ki.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof a.getSnapshotBeforeUpdate;d||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||l!==c)&&rs(t,a,r,c),Ao=!1;var f=t.memoizedState;a.state=f,Fo(t,r,a,i),l=t.memoizedState,s!==r||f!==l||Ci.current||Ao?("function"==typeof u&&(Qa(t,n,u,r),l=t.memoizedState),(s=Ao||ts(t,n,s,r,f,l,c))?(d||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4194308)):("function"==typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=c,r=s):("function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Io(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:Za(t.type,s),a.props=c,d=t.pendingProps,f=a.context,"object"==typeof(l=n.contextType)&&null!==l?l=Eo(l):l=Ei(t,l=Di(n)?qi:ki.current);var h=n.getDerivedStateFromProps;(u="function"==typeof h||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==d||f!==l)&&rs(t,a,r,l),Ao=!1,f=t.memoizedState,a.state=f,Fo(t,r,a,i);var p=t.memoizedState;s!==d||f!==p||Ci.current||Ao?("function"==typeof h&&(Qa(t,n,h,r),p=t.memoizedState),(c=Ao||ts(t,n,c,r,f,p,l)||!1)?(u||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,l),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,l)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=l,r=c):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return ks(e,t,n,r,o,i)}function ks(e,t,n,r,i,o){Ss(e,t);var a=!!(128&t.flags);if(!r&&!a)return i&&_i(t,n,!1),js(e,t,o);r=t.stateNode,ps.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=yo(t,e.child,null,o),t.child=yo(t,null,s,o)):gs(e,t,s,o),t.memoizedState=r.state,i&&_i(t,n,!0),t.child}function Cs(e){var t=e.stateNode;t.pendingContext?Oi(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Oi(0,t.context,!1),Uo(e,t.containerInfo)}function qs(e,t,n,r,i){return co(),uo(i),t.flags|=256,gs(e,t,n,r),t.child}var Es,Ds,Ts,Os,Ns={dehydrated:null,treeContext:null,retryLane:0};function As(e){return{baseLanes:e,cachePool:null,transitions:null}}function _s(e,t,r){var i,o=t.pendingProps,a=Xo.current,s=!1,l=!!(128&t.flags);if((i=l)||(i=(null===e||null!==e.memoizedState)&&!!(2&a)),i?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),wi(Xo,1&a),null===e)return oo(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(1&t.mode?"$!"===e.data?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(l=o.children,e=o.fallback,s?(o=t.mode,s=t.child,l={mode:"hidden",children:l},1&o||null===s?s=Ac(l,o,0,null):(s.childLanes=0,s.pendingProps=l),e=Nc(e,o,r,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=As(r),t.memoizedState=Ns,e):Is(t,l));if(null!==(a=e.memoizedState)&&null!==(i=a.dehydrated))return function(e,t,r,i,o,a,s){if(r)return 256&t.flags?(t.flags&=-257,Ls(e,t,s,i=as(Error(n(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=i.fallback,o=t.mode,i=Ac({mode:"visible",children:i.children},o,0,null),(a=Nc(a,o,s,null)).flags|=2,i.return=t,a.return=t,i.sibling=a,t.child=i,1&t.mode&&yo(t,e.child,null,s),t.child.memoizedState=As(s),t.memoizedState=Ns,a);if(!(1&t.mode))return Ls(e,t,s,null);if("$!"===o.data){if(i=o.nextSibling&&o.nextSibling.dataset)var l=i.dgst;return i=l,Ls(e,t,s,i=as(a=Error(n(419)),i,void 0))}if(l=0!==(s&e.childLanes),ms||l){if(null!==(i=Cl)){switch(s&-s){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}0!==(o=0!==(o&(i.suspendedLanes|s))?0:o)&&o!==a.retryLane&&(a.retryLane=o,No(e,o),Zl(i,e,o,-1))}return dc(),Ls(e,t,s,i=as(Error(n(421))))}return"$?"===o.data?(t.flags|=128,t.child=e.child,t=Mc.bind(null,e),o._reactRetry=t,null):(e=a.treeContext,Qi=oi(o.nextSibling),Zi=t,eo=!0,to=null,null!==e&&(Hi[$i++]=Ui,Hi[$i++]=Yi,Hi[$i++]=Wi,Ui=e.id,Yi=e.overflow,Wi=t),t=Is(t,i.children),t.flags|=4096,t)}(e,t,l,o,i,a,r);if(s){s=o.fallback,l=t.mode,i=(a=e.child).sibling;var c={mode:"hidden",children:o.children};return 1&l||t.child===a?(o=Tc(a,c)).subtreeFlags=14680064&a.subtreeFlags:((o=t.child).childLanes=0,o.pendingProps=c,t.deletions=null),null!==i?s=Tc(i,s):(s=Nc(s,l,r,null)).flags|=2,s.return=t,o.return=t,o.sibling=s,t.child=o,o=s,s=t.child,l=null===(l=e.child.memoizedState)?As(r):{baseLanes:l.baseLanes|r,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=e.childLanes&~r,t.memoizedState=Ns,o}return e=(s=e.child).sibling,o=Tc(s,{mode:"visible",children:o.children}),!(1&t.mode)&&(o.lanes=r),o.return=t,o.sibling=null,null!==e&&(null===(r=t.deletions)?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=o,t.memoizedState=null,o}function Is(e,t){return(t=Ac({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Ls(e,t,n,r){return null!==r&&uo(r),yo(t,e.child,null,n),(e=Is(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Ps(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Co(e.return,t,n)}function Rs(e,t,n,r,i){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function zs(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(gs(e,t,r.children,n),2&(r=Xo.current))r=1&r|2,t.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Ps(e,n,t);else if(19===e.tag)Ps(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(wi(Xo,r),1&t.mode)switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===Jo(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Rs(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===Jo(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Rs(t,!0,n,null,o);break;case"together":Rs(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function Fs(e,t){!(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function js(e,t,r){if(null!==e&&(t.dependencies=e.dependencies),Al|=t.lanes,0===(r&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(n(153));if(null!==t.child){for(r=Tc(e=t.child,e.pendingProps),t.child=r,r.return=t;null!==e.sibling;)e=e.sibling,(r=r.sibling=Tc(e,e.pendingProps)).return=t;r.sibling=null}return t.child}function Bs(e,t){if(!eo)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Vs(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Hs(e,t,r){var o=t.pendingProps;switch(Ji(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Vs(t),null;case 1:case 17:return Di(t.type)&&Ti(),Vs(t),null;case 3:return o=t.stateNode,Yo(),Si(Ci),Si(ki),Qo(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),null!==e&&null!==e.child||(so(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==to&&(nc(to),to=null))),Ds(e,t),Vs(t),null;case 5:Go(t);var a=Wo($o.current);if(r=t.type,null!==e&&null!=t.stateNode)Ts(e,t,r,o,a),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!o){if(null===t.stateNode)throw Error(n(166));return Vs(t),null}if(e=Wo(Vo.current),so(t)){o=t.stateNode,r=t.type;var s=t.memoizedProps;switch(o[li]=t,o[ci]=s,e=!!(1&t.mode),r){case"dialog":Lr("cancel",o),Lr("close",o);break;case"iframe":case"object":case"embed":Lr("load",o);break;case"video":case"audio":for(a=0;a<Nr.length;a++)Lr(Nr[a],o);break;case"source":Lr("error",o);break;case"img":case"image":case"link":Lr("error",o),Lr("load",o);break;case"details":Lr("toggle",o);break;case"input":Y(o,s),Lr("invalid",o);break;case"select":o._wrapperState={wasMultiple:!!s.multiple},Lr("invalid",o);break;case"textarea":te(o,s),Lr("invalid",o)}for(var l in pe(r,s),a=null,s)if(s.hasOwnProperty(l)){var c=s[l];"children"===l?"string"==typeof c?o.textContent!==c&&(!0!==s.suppressHydrationWarning&&Kr(o.textContent,c,e),a=["children",c]):"number"==typeof c&&o.textContent!==""+c&&(!0!==s.suppressHydrationWarning&&Kr(o.textContent,c,e),a=["children",""+c]):i.hasOwnProperty(l)&&null!=c&&"onScroll"===l&&Lr("scroll",o)}switch(r){case"input":H(o),X(o,s,!0);break;case"textarea":H(o),re(o);break;case"select":case"option":break;default:"function"==typeof s.onClick&&(o.onclick=Gr)}o=a,t.updateQueue=o,null!==o&&(t.flags|=4)}else{l=9===a.nodeType?a:a.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=ie(r)),"http://www.w3.org/1999/xhtml"===e?"script"===r?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof o.is?e=l.createElement(r,{is:o.is}):(e=l.createElement(r),"select"===r&&(l=e,o.multiple?l.multiple=!0:o.size&&(l.size=o.size))):e=l.createElementNS(e,r),e[li]=t,e[ci]=o,Es(e,t,!1,!1),t.stateNode=e;e:{switch(l=me(r,o),r){case"dialog":Lr("cancel",e),Lr("close",e),a=o;break;case"iframe":case"object":case"embed":Lr("load",e),a=o;break;case"video":case"audio":for(a=0;a<Nr.length;a++)Lr(Nr[a],e);a=o;break;case"source":Lr("error",e),a=o;break;case"img":case"image":case"link":Lr("error",e),Lr("load",e),a=o;break;case"details":Lr("toggle",e),a=o;break;case"input":Y(e,o),a=U(e,o),Lr("invalid",e);break;case"option":default:a=o;break;case"select":e._wrapperState={wasMultiple:!!o.multiple},a=I({},o,{value:void 0}),Lr("invalid",e);break;case"textarea":te(e,o),a=ee(e,o),Lr("invalid",e)}for(s in pe(r,a),c=a)if(c.hasOwnProperty(s)){var u=c[s];"style"===s?fe(e,u):"dangerouslySetInnerHTML"===s?null!=(u=u?u.__html:void 0)&&se(e,u):"children"===s?"string"==typeof u?("textarea"!==r||""!==u)&&le(e,u):"number"==typeof u&&le(e,""+u):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(i.hasOwnProperty(s)?null!=u&&"onScroll"===s&&Lr("scroll",e):null!=u&&g(e,s,u,l))}switch(r){case"input":H(e),X(e,o,!1);break;case"textarea":H(e),re(e);break;case"option":null!=o.value&&e.setAttribute("value",""+B(o.value));break;case"select":e.multiple=!!o.multiple,null!=(s=o.value)?Q(e,!!o.multiple,s,!1):null!=o.defaultValue&&Q(e,!!o.multiple,o.defaultValue,!0);break;default:"function"==typeof a.onClick&&(e.onclick=Gr)}switch(r){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}}o&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Vs(t),null;case 6:if(e&&null!=t.stateNode)Os(e,t,e.memoizedProps,o);else{if("string"!=typeof o&&null===t.stateNode)throw Error(n(166));if(r=Wo($o.current),Wo(Vo.current),so(t)){if(o=t.stateNode,r=t.memoizedProps,o[li]=t,(s=o.nodeValue!==r)&&null!==(e=Zi))switch(e.tag){case 3:Kr(o.nodeValue,r,!!(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Kr(o.nodeValue,r,!!(1&e.mode))}s&&(t.flags|=4)}else(o=(9===r.nodeType?r:r.ownerDocument).createTextNode(o))[li]=t,t.stateNode=o}return Vs(t),null;case 13:if(Si(Xo),o=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(eo&&null!==Qi&&1&t.mode&&!(128&t.flags))lo(),co(),t.flags|=98560,s=!1;else if(s=so(t),null!==o&&null!==o.dehydrated){if(null===e){if(!s)throw Error(n(318));if(!(s=null!==(s=t.memoizedState)?s.dehydrated:null))throw Error(n(317));s[li]=t}else co(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Vs(t),s=!1}else null!==to&&(nc(to),to=null),s=!0;if(!s)return 65536&t.flags?t:null}return 128&t.flags?(t.lanes=r,t):((o=null!==o)!==(null!==e&&null!==e.memoizedState)&&o&&(t.child.flags|=8192,1&t.mode&&(null===e||1&Xo.current?0===Ol&&(Ol=3):dc())),null!==t.updateQueue&&(t.flags|=4),Vs(t),null);case 4:return Yo(),Ds(e,t),null===e&&zr(t.stateNode.containerInfo),Vs(t),null;case 10:return ko(t.type._context),Vs(t),null;case 19:if(Si(Xo),null===(s=t.memoizedState))return Vs(t),null;if(o=!!(128&t.flags),null===(l=s.rendering))if(o)Bs(s,!1);else{if(0!==Ol||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(l=Jo(e))){for(t.flags|=128,Bs(s,!1),null!==(o=l.updateQueue)&&(t.updateQueue=o,t.flags|=4),t.subtreeFlags=0,o=r,r=t.child;null!==r;)e=o,(s=r).flags&=14680066,null===(l=s.alternate)?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=l.childLanes,s.lanes=l.lanes,s.child=l.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=l.memoizedProps,s.memoizedState=l.memoizedState,s.updateQueue=l.updateQueue,s.type=l.type,e=l.dependencies,s.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return wi(Xo,1&Xo.current|2),t.child}e=e.sibling}null!==s.tail&&Ye()>zl&&(t.flags|=128,o=!0,Bs(s,!1),t.lanes=4194304)}else{if(!o)if(null!==(e=Jo(l))){if(t.flags|=128,o=!0,null!==(r=e.updateQueue)&&(t.updateQueue=r,t.flags|=4),Bs(s,!0),null===s.tail&&"hidden"===s.tailMode&&!l.alternate&&!eo)return Vs(t),null}else 2*Ye()-s.renderingStartTime>zl&&1073741824!==r&&(t.flags|=128,o=!0,Bs(s,!1),t.lanes=4194304);s.isBackwards?(l.sibling=t.child,t.child=l):(null!==(r=s.last)?r.sibling=l:t.child=l,s.last=l)}return null!==s.tail?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Ye(),t.sibling=null,r=Xo.current,wi(Xo,o?1&r|2:1&r),t):(Vs(t),null);case 22:case 23:return sc(),o=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==o&&(t.flags|=8192),o&&1&t.mode?!!(1073741824&Dl)&&(Vs(t),6&t.subtreeFlags&&(t.flags|=8192)):Vs(t),null;case 24:case 25:return null}throw Error(n(156,t.tag))}function $s(e,t){switch(Ji(t),t.tag){case 1:return Di(t.type)&&Ti(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Yo(),Si(Ci),Si(ki),Qo(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Go(t),null;case 13:if(Si(Xo),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(n(340));co()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Si(Xo),null;case 4:return Yo(),null;case 10:return ko(t.type._context),null;case 22:case 23:return sc(),null;default:return null}}Es=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ds=function(){},Ts=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Wo(Vo.current);var a,s=null;switch(n){case"input":o=U(e,o),r=U(e,r),s=[];break;case"select":o=I({},o,{value:void 0}),r=I({},r,{value:void 0}),s=[];break;case"textarea":o=ee(e,o),r=ee(e,r),s=[];break;default:"function"!=typeof o.onClick&&"function"==typeof r.onClick&&(e.onclick=Gr)}for(u in pe(n,r),n=null,o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&null!=o[u])if("style"===u){var l=o[u];for(a in l)l.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(i.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var c=r[u];if(l=null!=o?o[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(null!=c||null!=l))if("style"===u)if(l){for(a in l)!l.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in c)c.hasOwnProperty(a)&&l[a]!==c[a]&&(n||(n={}),n[a]=c[a])}else n||(s||(s=[]),s.push(u,n)),n=c;else"dangerouslySetInnerHTML"===u?(c=c?c.__html:void 0,l=l?l.__html:void 0,null!=c&&l!==c&&(s=s||[]).push(u,c)):"children"===u?"string"!=typeof c&&"number"!=typeof c||(s=s||[]).push(u,""+c):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(i.hasOwnProperty(u)?(null!=c&&"onScroll"===u&&Lr("scroll",e),s||l===c||(s=[])):(s=s||[]).push(u,c))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}},Os=function(e,t,n,r){n!==r&&(t.flags|=4)};var Ws=!1,Us=!1,Ys="function"==typeof WeakSet?WeakSet:Set,Ks=null;function Gs(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){xc(e,t,n)}else n.current=null}function Xs(e,t,n){try{n()}catch(n){xc(e,t,n)}}var Js=!1;function Zs(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,void 0!==o&&Xs(t,n,o)}i=i.next}while(i!==r)}}function Qs(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function el(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function tl(e){var t=e.alternate;null!==t&&(e.alternate=null,tl(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[li],delete t[ci],delete t[di],delete t[fi],delete t[hi])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function nl(e){return 5===e.tag||3===e.tag||4===e.tag}function rl(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||nl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function il(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Gr));else if(4!==r&&null!==(e=e.child))for(il(e,t,n),e=e.sibling;null!==e;)il(e,t,n),e=e.sibling}function ol(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(ol(e,t,n),e=e.sibling;null!==e;)ol(e,t,n),e=e.sibling}var al=null,sl=!1;function ll(e,t,n){for(n=n.child;null!==n;)cl(e,t,n),n=n.sibling}function cl(e,t,n){if(tt&&"function"==typeof tt.onCommitFiberUnmount)try{tt.onCommitFiberUnmount(et,n)}catch(e){}switch(n.tag){case 5:Us||Gs(n,t);case 6:var r=al,i=sl;al=null,ll(e,t,n),sl=i,null!==(al=r)&&(sl?(e=al,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):al.removeChild(n.stateNode));break;case 18:null!==al&&(sl?(e=al,n=n.stateNode,8===e.nodeType?ii(e.parentNode,n):1===e.nodeType&&ii(e,n),zt(e)):ii(al,n.stateNode));break;case 4:r=al,i=sl,al=n.stateNode.containerInfo,sl=!0,ll(e,t,n),al=r,sl=i;break;case 0:case 11:case 14:case 15:if(!Us&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,void 0!==a&&(2&o||4&o)&&Xs(n,t,a),i=i.next}while(i!==r)}ll(e,t,n);break;case 1:if(!Us&&(Gs(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){xc(n,t,e)}ll(e,t,n);break;case 21:ll(e,t,n);break;case 22:1&n.mode?(Us=(r=Us)||null!==n.memoizedState,ll(e,t,n),Us=r):ll(e,t,n);break;default:ll(e,t,n)}}function ul(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Ys),t.forEach(function(t){var r=kc.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function dl(e,t){var r=t.deletions;if(null!==r)for(var i=0;i<r.length;i++){var o=r[i];try{var a=e,s=t,l=s;e:for(;null!==l;){switch(l.tag){case 5:al=l.stateNode,sl=!1;break e;case 3:case 4:al=l.stateNode.containerInfo,sl=!0;break e}l=l.return}if(null===al)throw Error(n(160));cl(a,s,o),al=null,sl=!1;var c=o.alternate;null!==c&&(c.return=null),o.return=null}catch(e){xc(o,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)fl(t,e),t=t.sibling}function fl(e,t){var r=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(dl(t,e),hl(e),4&i){try{Zs(3,e,e.return),Qs(3,e)}catch(t){xc(e,e.return,t)}try{Zs(5,e,e.return)}catch(t){xc(e,e.return,t)}}break;case 1:dl(t,e),hl(e),512&i&&null!==r&&Gs(r,r.return);break;case 5:if(dl(t,e),hl(e),512&i&&null!==r&&Gs(r,r.return),32&e.flags){var o=e.stateNode;try{le(o,"")}catch(t){xc(e,e.return,t)}}if(4&i&&null!=(o=e.stateNode)){var a=e.memoizedProps,s=null!==r?r.memoizedProps:a,l=e.type,c=e.updateQueue;if(e.updateQueue=null,null!==c)try{"input"===l&&"radio"===a.type&&null!=a.name&&K(o,a),me(l,s);var u=me(l,a);for(s=0;s<c.length;s+=2){var d=c[s],f=c[s+1];"style"===d?fe(o,f):"dangerouslySetInnerHTML"===d?se(o,f):"children"===d?le(o,f):g(o,d,f,u)}switch(l){case"input":G(o,a);break;case"textarea":ne(o,a);break;case"select":var h=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!a.multiple;var p=a.value;null!=p?Q(o,!!a.multiple,p,!1):h!==!!a.multiple&&(null!=a.defaultValue?Q(o,!!a.multiple,a.defaultValue,!0):Q(o,!!a.multiple,a.multiple?[]:"",!1))}o[ci]=a}catch(t){xc(e,e.return,t)}}break;case 6:if(dl(t,e),hl(e),4&i){if(null===e.stateNode)throw Error(n(162));o=e.stateNode,a=e.memoizedProps;try{o.nodeValue=a}catch(t){xc(e,e.return,t)}}break;case 3:if(dl(t,e),hl(e),4&i&&null!==r&&r.memoizedState.isDehydrated)try{zt(t.containerInfo)}catch(t){xc(e,e.return,t)}break;case 4:default:dl(t,e),hl(e);break;case 13:dl(t,e),hl(e),8192&(o=e.child).flags&&(a=null!==o.memoizedState,o.stateNode.isHidden=a,!a||null!==o.alternate&&null!==o.alternate.memoizedState||(Rl=Ye())),4&i&&ul(e);break;case 22:if(d=null!==r&&null!==r.memoizedState,1&e.mode?(Us=(u=Us)||d,dl(t,e),Us=u):dl(t,e),hl(e),8192&i){if(u=null!==e.memoizedState,(e.stateNode.isHidden=u)&&!d&&1&e.mode)for(Ks=e,d=e.child;null!==d;){for(f=Ks=d;null!==Ks;){switch(p=(h=Ks).child,h.tag){case 0:case 11:case 14:case 15:Zs(4,h,h.return);break;case 1:Gs(h,h.return);var m=h.stateNode;if("function"==typeof m.componentWillUnmount){i=h,r=h.return;try{t=i,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(e){xc(i,r,e)}}break;case 5:Gs(h,h.return);break;case 22:if(null!==h.memoizedState){yl(f);continue}}null!==p?(p.return=h,Ks=p):yl(f)}d=d.sibling}e:for(d=null,f=e;;){if(5===f.tag){if(null===d){d=f;try{o=f.stateNode,u?"function"==typeof(a=o.style).setProperty?a.setProperty("display","none","important"):a.display="none":(l=f.stateNode,s=null!=(c=f.memoizedProps.style)&&c.hasOwnProperty("display")?c.display:null,l.style.display=de("display",s))}catch(t){xc(e,e.return,t)}}}else if(6===f.tag){if(null===d)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(t){xc(e,e.return,t)}}else if((22!==f.tag&&23!==f.tag||null===f.memoizedState||f===e)&&null!==f.child){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;null===f.sibling;){if(null===f.return||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:dl(t,e),hl(e),4&i&&ul(e);case 21:}}function hl(e){var t=e.flags;if(2&t){try{e:{for(var r=e.return;null!==r;){if(nl(r)){var i=r;break e}r=r.return}throw Error(n(160))}switch(i.tag){case 5:var o=i.stateNode;32&i.flags&&(le(o,""),i.flags&=-33),ol(e,rl(e),o);break;case 3:case 4:var a=i.stateNode.containerInfo;il(e,rl(e),a);break;default:throw Error(n(161))}}catch(t){xc(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function pl(e,t,n){Ks=e,ml(e)}function ml(e,t,n){for(var r=!!(1&e.mode);null!==Ks;){var i=Ks,o=i.child;if(22===i.tag&&r){var a=null!==i.memoizedState||Ws;if(!a){var s=i.alternate,l=null!==s&&null!==s.memoizedState||Us;s=Ws;var c=Us;if(Ws=a,(Us=l)&&!c)for(Ks=i;null!==Ks;)l=(a=Ks).child,22===a.tag&&null!==a.memoizedState?vl(i):null!==l?(l.return=a,Ks=l):vl(i);for(;null!==o;)Ks=o,ml(o),o=o.sibling;Ks=i,Ws=s,Us=c}gl(e)}else 8772&i.subtreeFlags&&null!==o?(o.return=i,Ks=o):gl(e)}}function gl(e){for(;null!==Ks;){var t=Ks;if(8772&t.flags){var r=t.alternate;try{if(8772&t.flags)switch(t.tag){case 0:case 11:case 15:Us||Qs(5,t);break;case 1:var i=t.stateNode;if(4&t.flags&&!Us)if(null===r)i.componentDidMount();else{var o=t.elementType===t.type?r.memoizedProps:Za(t.type,r.memoizedProps);i.componentDidUpdate(o,r.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&jo(t,a,i);break;case 3:var s=t.updateQueue;if(null!==s){if(r=null,null!==t.child)switch(t.child.tag){case 5:case 1:r=t.child.stateNode}jo(t,s,r)}break;case 5:var l=t.stateNode;if(null===r&&4&t.flags){r=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&r.focus();break;case"img":c.src&&(r.src=c.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var u=t.alternate;if(null!==u){var d=u.memoizedState;if(null!==d){var f=d.dehydrated;null!==f&&zt(f)}}}break;default:throw Error(n(163))}Us||512&t.flags&&el(t)}catch(e){xc(t,t.return,e)}}if(t===e){Ks=null;break}if(null!==(r=t.sibling)){r.return=t.return,Ks=r;break}Ks=t.return}}function yl(e){for(;null!==Ks;){var t=Ks;if(t===e){Ks=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Ks=n;break}Ks=t.return}}function vl(e){for(;null!==Ks;){var t=Ks;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Qs(4,t)}catch(e){xc(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(e){xc(t,i,e)}}var o=t.return;try{el(t)}catch(e){xc(t,o,e)}break;case 5:var a=t.return;try{el(t)}catch(e){xc(t,a,e)}}}catch(e){xc(t,t.return,e)}if(t===e){Ks=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Ks=s;break}Ks=t.return}}var bl,xl=Math.ceil,Sl=y.ReactCurrentDispatcher,wl=y.ReactCurrentOwner,Ml=y.ReactCurrentBatchConfig,kl=0,Cl=null,ql=null,El=0,Dl=0,Tl=xi(0),Ol=0,Nl=null,Al=0,_l=0,Il=0,Ll=null,Pl=null,Rl=0,zl=1/0,Fl=null,jl=!1,Bl=null,Vl=null,Hl=!1,$l=null,Wl=0,Ul=0,Yl=null,Kl=-1,Gl=0;function Xl(){return 6&kl?Ye():-1!==Kl?Kl:Kl=Ye()}function Jl(e){return 1&e.mode?2&kl&&0!==El?El&-El:null!==fo.transition?(0===Gl&&(Gl=dt()),Gl):0!==(e=mt)?e:e=void 0===(e=window.event)?16:Ut(e.type):1}function Zl(e,t,r,i){if(50<Ul)throw Ul=0,Yl=null,Error(n(185));ht(e,r,i),2&kl&&e===Cl||(e===Cl&&(!(2&kl)&&(_l|=r),4===Ol&&rc(e,El)),Ql(e,i),1===r&&0===kl&&!(1&t.mode)&&(zl=Ye()+500,Li&&zi()))}function Ql(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-nt(o),s=1<<a,l=i[a];-1===l?0!==(s&n)&&0===(s&r)||(i[a]=ct(s,t)):l<=t&&(e.expiredLanes|=s),o&=~s}}(e,t);var r=lt(e,e===Cl?El:0);if(0===r)null!==n&&$e(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&$e(n),1===t)0===e.tag?function(e){Li=!0,Ri(e)}(ic.bind(null,e)):Ri(ic.bind(null,e)),ni(function(){!(6&kl)&&zi()}),n=null;else{switch(gt(r)){case 1:n=Ge;break;case 4:n=Xe;break;case 16:default:n=Je;break;case 536870912:n=Qe}n=Cc(n,ec.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ec(e,t){if(Kl=-1,Gl=0,6&kl)throw Error(n(327));var r=e.callbackNode;if(vc()&&e.callbackNode!==r)return null;var i=lt(e,e===Cl?El:0);if(0===i)return null;if(30&i||0!==(i&e.expiredLanes)||t)t=fc(e,i);else{t=i;var o=kl;kl|=2;var a=uc();for(Cl===e&&El===t||(Fl=null,zl=Ye()+500,lc(e,t));;)try{pc();break}catch(t){cc(e,t)}Mo(),Sl.current=a,kl=o,null!==ql?t=0:(Cl=null,El=0,t=Ol)}if(0!==t){if(2===t&&(0!==(o=ut(e))&&(i=o,t=tc(e,o))),1===t)throw r=Nl,lc(e,0),rc(e,i),Ql(e,Ye()),r;if(6===t)rc(e,i);else{if(o=e.current.alternate,!(30&i||function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!rr(o(),i))return!1}catch(e){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(o)||(t=fc(e,i),2===t&&(a=ut(e),0!==a&&(i=a,t=tc(e,a))),1!==t)))throw r=Nl,lc(e,0),rc(e,i),Ql(e,Ye()),r;switch(e.finishedWork=o,e.finishedLanes=i,t){case 0:case 1:throw Error(n(345));case 2:case 5:yc(e,Pl,Fl);break;case 3:if(rc(e,i),(130023424&i)===i&&10<(t=Rl+500-Ye())){if(0!==lt(e,0))break;if(((o=e.suspendedLanes)&i)!==i){Xl(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=Qr(yc.bind(null,e,Pl,Fl),t);break}yc(e,Pl,Fl);break;case 4:if(rc(e,i),(4194240&i)===i)break;for(t=e.eventTimes,o=-1;0<i;){var s=31-nt(i);a=1<<s,(s=t[s])>o&&(o=s),i&=~a}if(i=o,10<(i=(120>(i=Ye()-i)?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*xl(i/1960))-i)){e.timeoutHandle=Qr(yc.bind(null,e,Pl,Fl),i);break}yc(e,Pl,Fl);break;default:throw Error(n(329))}}}return Ql(e,Ye()),e.callbackNode===r?ec.bind(null,e):null}function tc(e,t){var n=Ll;return e.current.memoizedState.isDehydrated&&(lc(e,t).flags|=256),2!==(e=fc(e,t))&&(t=Pl,Pl=n,null!==t&&nc(t)),e}function nc(e){null===Pl?Pl=e:Pl.push.apply(Pl,e)}function rc(e,t){for(t&=~Il,t&=~_l,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-nt(t),r=1<<n;e[n]=-1,t&=~r}}function ic(e){if(6&kl)throw Error(n(327));vc();var t=lt(e,0);if(!(1&t))return Ql(e,Ye()),null;var r=fc(e,t);if(0!==e.tag&&2===r){var i=ut(e);0!==i&&(t=i,r=tc(e,i))}if(1===r)throw r=Nl,lc(e,0),rc(e,t),Ql(e,Ye()),r;if(6===r)throw Error(n(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,yc(e,Pl,Fl),Ql(e,Ye()),null}function oc(e,t){var n=kl;kl|=1;try{return e(t)}finally{0===(kl=n)&&(zl=Ye()+500,Li&&zi())}}function ac(e){null!==$l&&0===$l.tag&&!(6&kl)&&vc();var t=kl;kl|=1;var n=Ml.transition,r=mt;try{if(Ml.transition=null,mt=1,e)return e()}finally{mt=r,Ml.transition=n,!(6&(kl=t))&&zi()}}function sc(){Dl=Tl.current,Si(Tl)}function lc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ei(n)),null!==ql)for(n=ql.return;null!==n;){var r=n;switch(Ji(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Ti();break;case 3:Yo(),Si(Ci),Si(ki),Qo();break;case 5:Go(r);break;case 4:Yo();break;case 13:case 19:Si(Xo);break;case 10:ko(r.type._context);break;case 22:case 23:sc()}n=n.return}if(Cl=e,ql=e=Tc(e.current,null),El=Dl=t,Ol=0,Nl=null,Il=_l=Al=0,Pl=Ll=null,null!==Do){for(t=0;t<Do.length;t++)if(null!==(r=(n=Do[t]).interleaved)){n.interleaved=null;var i=r.next,o=n.pending;if(null!==o){var a=o.next;o.next=i,r.next=a}n.pending=r}Do=null}return e}function cc(e,t){for(;;){var r=ql;try{if(Mo(),ea.current=Ka,aa){for(var i=ra.memoizedState;null!==i;){var o=i.queue;null!==o&&(o.pending=null),i=i.next}aa=!1}if(na=0,oa=ia=ra=null,sa=!1,la=0,wl.current=null,null===r||null===r.return){Ol=1,Nl=t,ql=null;break}e:{var a=e,s=r.return,l=r,c=t;if(t=El,l.flags|=32768,null!==c&&"object"==typeof c&&"function"==typeof c.then){var u=c,d=l,f=d.tag;if(!(1&d.mode||0!==f&&11!==f&&15!==f)){var h=d.alternate;h?(d.updateQueue=h.updateQueue,d.memoizedState=h.memoizedState,d.lanes=h.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=fs(s);if(null!==p){p.flags&=-257,hs(p,s,l,0,t),1&p.mode&&ds(a,u,t),c=u;var m=(t=p).updateQueue;if(null===m){var g=new Set;g.add(c),t.updateQueue=g}else m.add(c);break e}if(!(1&t)){ds(a,u,t),dc();break e}c=Error(n(426))}else if(eo&&1&l.mode){var y=fs(s);if(null!==y){!(65536&y.flags)&&(y.flags|=256),hs(y,s,l,0,t),uo(os(c,l));break e}}a=c=os(c,l),4!==Ol&&(Ol=2),null===Ll?Ll=[a]:Ll.push(a),a=s;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t,zo(a,cs(0,c,t));break e;case 1:l=c;var v=a.type,b=a.stateNode;if(!(128&a.flags||"function"!=typeof v.getDerivedStateFromError&&(null===b||"function"!=typeof b.componentDidCatch||null!==Vl&&Vl.has(b)))){a.flags|=65536,t&=-t,a.lanes|=t,zo(a,us(a,l,t));break e}}a=a.return}while(null!==a)}gc(r)}catch(e){t=e,ql===r&&null!==r&&(ql=r=r.return);continue}break}}function uc(){var e=Sl.current;return Sl.current=Ka,null===e?Ka:e}function dc(){0!==Ol&&3!==Ol&&2!==Ol||(Ol=4),null===Cl||!(268435455&Al)&&!(268435455&_l)||rc(Cl,El)}function fc(e,t){var r=kl;kl|=2;var i=uc();for(Cl===e&&El===t||(Fl=null,lc(e,t));;)try{hc();break}catch(t){cc(e,t)}if(Mo(),kl=r,Sl.current=i,null!==ql)throw Error(n(261));return Cl=null,El=0,Ol}function hc(){for(;null!==ql;)mc(ql)}function pc(){for(;null!==ql&&!We();)mc(ql)}function mc(e){var t=bl(e.alternate,e,Dl);e.memoizedProps=e.pendingProps,null===t?gc(e):ql=t,wl.current=null}function gc(e){var t=e;do{var n=t.alternate;if(e=t.return,32768&t.flags){if(null!==(n=$s(n,t)))return n.flags&=32767,void(ql=n);if(null===e)return Ol=6,void(ql=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}else if(null!==(n=Hs(n,t,Dl)))return void(ql=n);if(null!==(t=t.sibling))return void(ql=t);ql=t=e}while(null!==t);0===Ol&&(Ol=5)}function yc(e,t,r){var i=mt,o=Ml.transition;try{Ml.transition=null,mt=1,function(e,t,r,i){do{vc()}while(null!==$l);if(6&kl)throw Error(n(327));r=e.finishedWork;var o=e.finishedLanes;if(null===r)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(n(177));e.callbackNode=null,e.callbackPriority=0;var a=r.lanes|r.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-nt(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}(e,a),e===Cl&&(ql=Cl=null,El=0),!(2064&r.subtreeFlags)&&!(2064&r.flags)||Hl||(Hl=!0,Cc(Je,function(){return vc(),null})),a=!!(15990&r.flags),!!(15990&r.subtreeFlags)||a){a=Ml.transition,Ml.transition=null;var s=mt;mt=1;var l=kl;kl|=4,wl.current=null,function(e,t){if(Xr=jt,cr(e=lr())){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{var i=(r=(r=e.ownerDocument)&&r.defaultView||window).getSelection&&r.getSelection();if(i&&0!==i.rangeCount){r=i.anchorNode;var o=i.anchorOffset,a=i.focusNode;i=i.focusOffset;try{r.nodeType,a.nodeType}catch(e){r=null;break e}var s=0,l=-1,c=-1,u=0,d=0,f=e,h=null;t:for(;;){for(var p;f!==r||0!==o&&3!==f.nodeType||(l=s+o),f!==a||0!==i&&3!==f.nodeType||(c=s+i),3===f.nodeType&&(s+=f.nodeValue.length),null!==(p=f.firstChild);)h=f,f=p;for(;;){if(f===e)break t;if(h===r&&++u===o&&(l=s),h===a&&++d===i&&(c=s),null!==(p=f.nextSibling))break;h=(f=h).parentNode}f=p}r=-1===l||-1===c?null:{start:l,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(Jr={focusedElem:e,selectionRange:r},jt=!1,Ks=t;null!==Ks;)if(e=(t=Ks).child,1028&t.subtreeFlags&&null!==e)e.return=t,Ks=e;else for(;null!==Ks;){t=Ks;try{var m=t.alternate;if(1024&t.flags)switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==m){var g=m.memoizedProps,y=m.memoizedState,v=t.stateNode,b=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:Za(t.type,g),y);v.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var x=t.stateNode.containerInfo;1===x.nodeType?x.textContent="":9===x.nodeType&&x.documentElement&&x.removeChild(x.documentElement);break;default:throw Error(n(163))}}catch(e){xc(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,Ks=e;break}Ks=t.return}m=Js,Js=!1}(e,r),fl(r,e),ur(Jr),jt=!!Xr,Jr=Xr=null,e.current=r,pl(r),Ue(),kl=l,mt=s,Ml.transition=a}else e.current=r;if(Hl&&(Hl=!1,$l=e,Wl=o),a=e.pendingLanes,0===a&&(Vl=null),function(e){if(tt&&"function"==typeof tt.onCommitFiberRoot)try{tt.onCommitFiberRoot(et,e,void 0,!(128&~e.current.flags))}catch(e){}}(r.stateNode),Ql(e,Ye()),null!==t)for(i=e.onRecoverableError,r=0;r<t.length;r++)o=t[r],i(o.value,{componentStack:o.stack,digest:o.digest});if(jl)throw jl=!1,e=Bl,Bl=null,e;!!(1&Wl)&&0!==e.tag&&vc(),a=e.pendingLanes,1&a?e===Yl?Ul++:(Ul=0,Yl=e):Ul=0,zi()}(e,t,r,i)}finally{Ml.transition=o,mt=i}return null}function vc(){if(null!==$l){var e=gt(Wl),t=Ml.transition,r=mt;try{if(Ml.transition=null,mt=16>e?16:e,null===$l)var i=!1;else{if(e=$l,$l=null,Wl=0,6&kl)throw Error(n(331));var o=kl;for(kl|=4,Ks=e.current;null!==Ks;){var a=Ks,s=a.child;if(16&Ks.flags){var l=a.deletions;if(null!==l){for(var c=0;c<l.length;c++){var u=l[c];for(Ks=u;null!==Ks;){var d=Ks;switch(d.tag){case 0:case 11:case 15:Zs(8,d,a)}var f=d.child;if(null!==f)f.return=d,Ks=f;else for(;null!==Ks;){var h=(d=Ks).sibling,p=d.return;if(tl(d),d===u){Ks=null;break}if(null!==h){h.return=p,Ks=h;break}Ks=p}}}var m=a.alternate;if(null!==m){var g=m.child;if(null!==g){m.child=null;do{var y=g.sibling;g.sibling=null,g=y}while(null!==g)}}Ks=a}}if(2064&a.subtreeFlags&&null!==s)s.return=a,Ks=s;else e:for(;null!==Ks;){if(2048&(a=Ks).flags)switch(a.tag){case 0:case 11:case 15:Zs(9,a,a.return)}var v=a.sibling;if(null!==v){v.return=a.return,Ks=v;break e}Ks=a.return}}var b=e.current;for(Ks=b;null!==Ks;){var x=(s=Ks).child;if(2064&s.subtreeFlags&&null!==x)x.return=s,Ks=x;else e:for(s=b;null!==Ks;){if(2048&(l=Ks).flags)try{switch(l.tag){case 0:case 11:case 15:Qs(9,l)}}catch(e){xc(l,l.return,e)}if(l===s){Ks=null;break e}var S=l.sibling;if(null!==S){S.return=l.return,Ks=S;break e}Ks=l.return}}if(kl=o,zi(),tt&&"function"==typeof tt.onPostCommitFiberRoot)try{tt.onPostCommitFiberRoot(et,e)}catch(e){}i=!0}return i}finally{mt=r,Ml.transition=t}}return!1}function bc(e,t,n){e=Po(e,t=cs(0,t=os(n,t),1),1),t=Xl(),null!==e&&(ht(e,1,t),Ql(e,t))}function xc(e,t,n){if(3===e.tag)bc(e,e,n);else for(;null!==t;){if(3===t.tag){bc(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Vl||!Vl.has(r))){t=Po(t,e=us(t,e=os(n,e),1),1),e=Xl(),null!==t&&(ht(t,1,e),Ql(t,e));break}}t=t.return}}function Sc(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=Xl(),e.pingedLanes|=e.suspendedLanes&n,Cl===e&&(El&n)===n&&(4===Ol||3===Ol&&(130023424&El)===El&&500>Ye()-Rl?lc(e,0):Il|=n),Ql(e,t)}function wc(e,t){0===t&&(1&e.mode?(t=at,!(130023424&(at<<=1))&&(at=4194304)):t=1);var n=Xl();null!==(e=No(e,t))&&(ht(e,t,n),Ql(e,n))}function Mc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),wc(e,n)}function kc(e,t){var r=0;switch(e.tag){case 13:var i=e.stateNode,o=e.memoizedState;null!==o&&(r=o.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(n(314))}null!==i&&i.delete(t),wc(e,r)}function Cc(e,t){return He(e,t)}function qc(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ec(e,t,n,r){return new qc(e,t,n,r)}function Dc(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Tc(e,t){var n=e.alternate;return null===n?((n=Ec(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Oc(e,t,r,i,o,a){var s=2;if(i=e,"function"==typeof e)Dc(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case x:return Nc(r.children,o,a,t);case S:s=8,o|=8;break;case w:return(e=Ec(12,r,t,2|o)).elementType=w,e.lanes=a,e;case q:return(e=Ec(13,r,t,o)).elementType=q,e.lanes=a,e;case E:return(e=Ec(19,r,t,o)).elementType=E,e.lanes=a,e;case O:return Ac(r,o,a,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case M:s=10;break e;case k:s=9;break e;case C:s=11;break e;case D:s=14;break e;case T:s=16,i=null;break e}throw Error(n(130,null==e?e:typeof e,""))}return(t=Ec(s,r,t,o)).elementType=e,t.type=i,t.lanes=a,t}function Nc(e,t,n,r){return(e=Ec(7,e,r,t)).lanes=n,e}function Ac(e,t,n,r){return(e=Ec(22,e,r,t)).elementType=O,e.lanes=n,e.stateNode={isHidden:!1},e}function _c(e,t,n){return(e=Ec(6,e,null,t)).lanes=n,e}function Ic(e,t,n){return(t=Ec(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Lc(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ft(0),this.expirationTimes=ft(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ft(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Pc(e,t,n,r,i,o,a,s,l){return e=new Lc(e,t,n,s,l),1===t?(t=1,!0===o&&(t|=8)):t=0,o=Ec(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},_o(o),e}function Rc(e){if(!e)return Mi;e:{if(ze(e=e._reactInternals)!==e||1!==e.tag)throw Error(n(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Di(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(n(171))}if(1===e.tag){var r=e.type;if(Di(r))return Ni(e,r,t)}return t}function zc(e,t,n,r,i,o,a,s,l){return(e=Pc(n,r,!0,e,0,o,0,s,l)).context=Rc(null),n=e.current,(o=Lo(r=Xl(),i=Jl(n))).callback=null!=t?t:null,Po(n,o,i),e.current.lanes=i,ht(e,i,r),Ql(e,r),e}function Fc(e,t,n,r){var i=t.current,o=Xl(),a=Jl(i);return n=Rc(n),null===t.context?t.context=n:t.pendingContext=n,(t=Lo(o,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Po(i,t,a))&&(Zl(e,i,a,o),Ro(e,i,a)),a}function jc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Bc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Vc(e,t){Bc(e,t),(e=e.alternate)&&Bc(e,t)}bl=function(e,t,r){if(null!==e)if(e.memoizedProps!==t.pendingProps||Ci.current)ms=!0;else{if(0===(e.lanes&r)&&!(128&t.flags))return ms=!1,function(e,t,n){switch(t.tag){case 3:Cs(t),co();break;case 5:Ko(t);break;case 1:Di(t.type)&&Ai(t);break;case 4:Uo(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;wi(bo,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(wi(Xo,1&Xo.current),t.flags|=128,null):0!==(n&t.child.childLanes)?_s(e,t,n):(wi(Xo,1&Xo.current),null!==(e=js(e,t,n))?e.sibling:null);wi(Xo,1&Xo.current);break;case 19:if(r=0!==(n&t.childLanes),128&e.flags){if(r)return zs(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),wi(Xo,Xo.current),r)break;return null;case 22:case 23:return t.lanes=0,xs(e,t,n)}return js(e,t,n)}(e,t,r);ms=!!(131072&e.flags)}else ms=!1,eo&&1048576&t.flags&&Gi(t,Vi,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;Fs(e,t),e=t.pendingProps;var o=Ei(t,ki.current);qo(t,r),o=fa(null,t,i,e,o,r);var a=ha();return t.flags|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Di(i)?(a=!0,Ai(t)):a=!1,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,_o(t),o.updater=es,t.stateNode=o,o._reactInternals=t,is(t,i,e,r),t=ks(null,t,i,!0,a,r)):(t.tag=0,eo&&a&&Xi(t),gs(null,t,o,r),t=t.child),t;case 16:i=t.elementType;e:{switch(Fs(e,t),e=t.pendingProps,i=(o=i._init)(i._payload),t.type=i,o=t.tag=function(e){if("function"==typeof e)return Dc(e)?1:0;if(null!=e){if((e=e.$$typeof)===C)return 11;if(e===D)return 14}return 2}(i),e=Za(i,e),o){case 0:t=ws(null,t,i,e,r);break e;case 1:t=Ms(null,t,i,e,r);break e;case 11:t=ys(null,t,i,e,r);break e;case 14:t=vs(null,t,i,Za(i.type,e),r);break e}throw Error(n(306,i,""))}return t;case 0:return i=t.type,o=t.pendingProps,ws(e,t,i,o=t.elementType===i?o:Za(i,o),r);case 1:return i=t.type,o=t.pendingProps,Ms(e,t,i,o=t.elementType===i?o:Za(i,o),r);case 3:e:{if(Cs(t),null===e)throw Error(n(387));i=t.pendingProps,o=(a=t.memoizedState).element,Io(e,t),Fo(t,i,null,r);var s=t.memoizedState;if(i=s.element,a.isDehydrated){if(a={element:i,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=qs(e,t,i,r,o=os(Error(n(423)),t));break e}if(i!==o){t=qs(e,t,i,r,o=os(Error(n(424)),t));break e}for(Qi=oi(t.stateNode.containerInfo.firstChild),Zi=t,eo=!0,to=null,r=vo(t,null,i,r),t.child=r;r;)r.flags=-3&r.flags|4096,r=r.sibling}else{if(co(),i===o){t=js(e,t,r);break e}gs(e,t,i,r)}t=t.child}return t;case 5:return Ko(t),null===e&&oo(t),i=t.type,o=t.pendingProps,a=null!==e?e.memoizedProps:null,s=o.children,Zr(i,o)?s=null:null!==a&&Zr(i,a)&&(t.flags|=32),Ss(e,t),gs(e,t,s,r),t.child;case 6:return null===e&&oo(t),null;case 13:return _s(e,t,r);case 4:return Uo(t,t.stateNode.containerInfo),i=t.pendingProps,null===e?t.child=yo(t,null,i,r):gs(e,t,i,r),t.child;case 11:return i=t.type,o=t.pendingProps,ys(e,t,i,o=t.elementType===i?o:Za(i,o),r);case 7:return gs(e,t,t.pendingProps,r),t.child;case 8:case 12:return gs(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(i=t.type._context,o=t.pendingProps,a=t.memoizedProps,s=o.value,wi(bo,i._currentValue),i._currentValue=s,null!==a)if(rr(a.value,s)){if(a.children===o.children&&!Ci.current){t=js(e,t,r);break e}}else for(null!==(a=t.child)&&(a.return=t);null!==a;){var l=a.dependencies;if(null!==l){s=a.child;for(var c=l.firstContext;null!==c;){if(c.context===i){if(1===a.tag){(c=Lo(-1,r&-r)).tag=2;var u=a.updateQueue;if(null!==u){var d=(u=u.shared).pending;null===d?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}a.lanes|=r,null!==(c=a.alternate)&&(c.lanes|=r),Co(a.return,r,t),l.lanes|=r;break}c=c.next}}else if(10===a.tag)s=a.type===t.type?null:a.child;else if(18===a.tag){if(null===(s=a.return))throw Error(n(341));s.lanes|=r,null!==(l=s.alternate)&&(l.lanes|=r),Co(s,r,t),s=a.sibling}else s=a.child;if(null!==s)s.return=a;else for(s=a;null!==s;){if(s===t){s=null;break}if(null!==(a=s.sibling)){a.return=s.return,s=a;break}s=s.return}a=s}gs(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,i=t.pendingProps.children,qo(t,r),i=i(o=Eo(o)),t.flags|=1,gs(e,t,i,r),t.child;case 14:return o=Za(i=t.type,t.pendingProps),vs(e,t,i,o=Za(i.type,o),r);case 15:return bs(e,t,t.type,t.pendingProps,r);case 17:return i=t.type,o=t.pendingProps,o=t.elementType===i?o:Za(i,o),Fs(e,t),t.tag=1,Di(i)?(e=!0,Ai(t)):e=!1,qo(t,r),ns(t,i,o),is(t,i,o,r),ks(null,t,i,!0,e,r);case 19:return zs(e,t,r);case 22:return xs(e,t,r)}throw Error(n(156,t.tag))};var Hc="function"==typeof reportError?reportError:function(e){console.error(e)};function $c(e){this._internalRoot=e}function Wc(e){this._internalRoot=e}function Uc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Yc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Kc(){}function Gc(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o;if("function"==typeof i){var s=i;i=function(){var e=jc(a);s.call(e)}}Fc(t,a,e,i)}else a=function(e,t,n,r,i){if(i){if("function"==typeof r){var o=r;r=function(){var e=jc(a);o.call(e)}}var a=zc(t,r,e,0,null,!1,0,"",Kc);return e._reactRootContainer=a,e[ui]=a.current,zr(8===e.nodeType?e.parentNode:e),ac(),a}for(;i=e.lastChild;)e.removeChild(i);if("function"==typeof r){var s=r;r=function(){var e=jc(l);s.call(e)}}var l=Pc(e,0,!1,null,0,!1,0,"",Kc);return e._reactRootContainer=l,e[ui]=l.current,zr(8===e.nodeType?e.parentNode:e),ac(function(){Fc(t,l,n,r)}),l}(n,t,e,i,r);return jc(a)}Wc.prototype.render=$c.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(n(409));Fc(e,t,null,null)},Wc.prototype.unmount=$c.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;ac(function(){Fc(null,e,null,null)}),t[ui]=null}},Wc.prototype.unstable_scheduleHydration=function(e){if(e){var t=xt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Tt.length&&0!==t&&t<Tt[n].priority;n++);Tt.splice(n,0,e),0===n&&_t(e)}},yt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=st(t.pendingLanes);0!==n&&(pt(t,1|n),Ql(t,Ye()),!(6&kl)&&(zl=Ye()+500,zi()))}break;case 13:ac(function(){var t=No(e,1);if(null!==t){var n=Xl();Zl(t,e,1,n)}}),Vc(e,1)}},vt=function(e){if(13===e.tag){var t=No(e,134217728);if(null!==t)Zl(t,e,134217728,Xl());Vc(e,134217728)}},bt=function(e){if(13===e.tag){var t=Jl(e),n=No(e,t);if(null!==n)Zl(n,e,t,Xl());Vc(e,t)}},xt=function(){return mt},St=function(e,t){var n=mt;try{return mt=e,t()}finally{mt=n}},ve=function(e,t,r){switch(t){case"input":if(G(e,r),t=r.name,"radio"===r.type&&null!=t){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var i=r[t];if(i!==e&&i.form===e.form){var o=yi(i);if(!o)throw Error(n(90));$(i),G(i,o)}}}break;case"textarea":ne(e,r);break;case"select":null!=(t=r.value)&&Q(e,!!r.multiple,t,!1)}},ke=oc,Ce=ac;var Xc={usingClientEntryPoint:!1,Events:[mi,gi,yi,we,Me,oc]},Jc={findFiberByHostInstance:pi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Zc={bundleType:Jc.bundleType,version:Jc.version,rendererPackageName:Jc.rendererPackageName,rendererConfig:Jc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:y.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Be(e))?null:e.stateNode},findFiberByHostInstance:Jc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var Qc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Qc.isDisabled&&Qc.supportsFiber)try{et=Qc.inject(Zc),tt=Qc}catch(e){}}return ZF.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Xc,ZF.createPortal=function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Uc(t))throw Error(n(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:b,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,r)},ZF.createRoot=function(e,t){if(!Uc(e))throw Error(n(299));var r=!1,i="",o=Hc;return null!=t&&(!0===t.unstable_strictMode&&(r=!0),void 0!==t.identifierPrefix&&(i=t.identifierPrefix),void 0!==t.onRecoverableError&&(o=t.onRecoverableError)),t=Pc(e,1,!1,null,0,r,0,i,o),e[ui]=t.current,zr(8===e.nodeType?e.parentNode:e),new $c(t)},ZF.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(n(188));throw e=Object.keys(e).join(","),Error(n(268,e))}return e=null===(e=Be(t))?null:e.stateNode},ZF.flushSync=function(e){return ac(e)},ZF.hydrate=function(e,t,r){if(!Yc(t))throw Error(n(200));return Gc(null,e,t,!0,r)},ZF.hydrateRoot=function(e,t,r){if(!Uc(e))throw Error(n(405));var i=null!=r&&r.hydratedSources||null,o=!1,a="",s=Hc;if(null!=r&&(!0===r.unstable_strictMode&&(o=!0),void 0!==r.identifierPrefix&&(a=r.identifierPrefix),void 0!==r.onRecoverableError&&(s=r.onRecoverableError)),t=zc(t,null,e,1,null!=r?r:null,o,0,a,s),e[ui]=t.current,zr(e),i)for(e=0;e<i.length;e++)o=(o=(r=i[e])._getVersion)(r._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[r,o]:t.mutableSourceEagerHydrationData.push(r,o);return new Wc(t)},ZF.render=function(e,t,r){if(!Yc(t))throw Error(n(200));return Gc(null,e,t,!1,r)},ZF.unmountComponentAtNode=function(e){if(!Yc(e))throw Error(n(40));return!!e._reactRootContainer&&(ac(function(){Gc(null,null,e,!1,function(){e._reactRootContainer=null,e[ui]=null})}),!0)},ZF.unstable_batchedUpdates=oc,ZF.unstable_renderSubtreeIntoContainer=function(e,t,r,i){if(!Yc(r))throw Error(n(200));if(null==e||void 0===e._reactInternals)throw Error(n(38));return Gc(e,t,r,!1,i)},ZF.version="18.3.1-next-f1338f8080-20240426",ZF}var rj=(XF||(XF=1,function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),JF.exports=nj()),JF.exports),ij=mg(rj),oj=!1,aj=C_.createContext(null),sj="unmounted",lj="exited",cj="entering",uj="entered",dj="exiting",fj=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i=lj,r.appearStatus=cj):i=uj:i=t.unmountOnExit||t.mountOnEnter?sj:lj,r.state={status:i},r.nextCallback=null,r}UF(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===sj?{status:lj}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==cj&&n!==uj&&(t=cj):n!==cj&&n!==uj||(t=dj)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===cj){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:ij.findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===lj&&this.setState({status:sj})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[ij.findDOMNode(this),r],o=i[0],a=i[1],s=this.getTimeouts(),l=r?s.appear:s.enter;!e&&!n||oj?this.safeSetState({status:uj},function(){t.props.onEntered(o)}):(this.props.onEnter(o,a),this.safeSetState({status:cj},function(){t.props.onEntering(o,a),t.onTransitionEnd(l,function(){t.safeSetState({status:uj},function(){t.props.onEntered(o,a)})})}))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:ij.findDOMNode(this);t&&!oj?(this.props.onExit(r),this.safeSetState({status:dj},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:lj},function(){e.props.onExited(r)})})})):this.safeSetState({status:lj},function(){e.props.onExited(r)})},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:ij.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=i[0],a=i[1];this.props.addEndListener(o,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===sj)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=dI(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return C_.createElement(aj.Provider,{value:null},"function"==typeof n?n(e,r):C_.cloneElement(C_.Children.only(n),r))},t}(C_.Component);function hj(){}function pj(e,t){var n=Object.create(null);return e&&k_.Children.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&k_.isValidElement(e)?t(e):e}(e)}),n}function mj(e,t,n){return null!=n[t]?n[t]:e.props[t]}function gj(e,t,n){var r=pj(e.children),i=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),o=[];for(var a in e)a in t?o.length&&(i[a]=o,o=[]):o.push(a);var s={};for(var l in t){if(i[l])for(r=0;r<i[l].length;r++){var c=i[l][r];s[i[l][r]]=n(c)}s[l]=n(l)}for(r=0;r<o.length;r++)s[o[r]]=n(o[r]);return s}(t,r);return Object.keys(i).forEach(function(o){var a=i[o];if(k_.isValidElement(a)){var s=o in t,l=o in r,c=t[o],u=k_.isValidElement(c)&&!c.props.in;!l||s&&!u?l||!s||u?l&&s&&k_.isValidElement(c)&&(i[o]=k_.cloneElement(a,{onExited:n.bind(null,a),in:c.props.in,exit:mj(a,"exit",e),enter:mj(a,"enter",e)})):i[o]=k_.cloneElement(a,{in:!1}):i[o]=k_.cloneElement(a,{onExited:n.bind(null,a),in:!0,exit:mj(a,"exit",e),enter:mj(a,"enter",e)})}}),i}fj.contextType=aj,fj.propTypes={},fj.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:hj,onEntering:hj,onEntered:hj,onExit:hj,onExiting:hj,onExited:hj},fj.UNMOUNTED=sj,fj.EXITED=lj,fj.ENTERING=cj,fj.ENTERED=uj,fj.EXITING=dj;var yj=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},vj=function(e){function t(t,n){var r,i=(r=e.call(this,t,n)||this).handleExited.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(r));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}UF(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,r,i=t.children,o=t.handleExited;return{children:t.firstRender?(n=e,r=o,pj(n.children,function(e){return k_.cloneElement(e,{onExited:r.bind(null,e),in:!0,appear:mj(e,"appear",n),enter:mj(e,"enter",n),exit:mj(e,"exit",n)})})):gj(e,i,o),firstRender:!1}},n.handleExited=function(e,t){var n=pj(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=uI({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=dI(e,["component","childFactory"]),i=this.state.contextValue,o=yj(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?C_.createElement(aj.Provider,{value:i},o):C_.createElement(aj.Provider,{value:i},C_.createElement(t,r,o))},t}(C_.Component);vj.propTypes={},vj.defaultProps={component:"div",childFactory:function(e){return e}};const bj=e=>e.scrollTop;function xj(e,t){var n,r;const{timeout:i,easing:o,style:a={}}=e;return{duration:null!=(n=a.transitionDuration)?n:"number"==typeof i?i:i[t.mode]||0,easing:null!=(r=a.transitionTimingFunction)?r:"object"==typeof o?o[t.mode]:o,delay:a.transitionDelay}}function Sj(e){return FR("MuiPaper",e)}jR("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const wj=["className","component","elevation","square","variant"],Mj=PF("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,"elevation"===n.variant&&t[`elevation${n.elevation}`]]}})(({theme:e,ownerState:t})=>{var n;return uI({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},"outlined"===t.variant&&{border:`1px solid ${(e.vars||e).palette.divider}`},"elevation"===t.variant&&uI({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&"dark"===e.palette.mode&&{backgroundImage:`linear-gradient(${Zz.alpha("#fff",FF(t.elevation))}, ${Zz.alpha("#fff",FF(t.elevation))})`},e.vars&&{backgroundImage:null==(n=e.vars.overlays)?void 0:n[t.elevation]}))}),kj=k_.forwardRef(function(e,t){const n=jF({props:e,name:"MuiPaper"}),{className:r,component:i="div",elevation:o=1,square:a=!1,variant:s="elevation"}=n,l=dI(n,wj),c=uI({},n,{component:i,elevation:o,square:a,variant:s}),u=(e=>{const{square:t,elevation:n,variant:r,classes:i}=e;return kz({root:["root",r,!t&&"rounded","elevation"===r&&`elevation${n}`]},Sj,i)})(c);return uP.jsx(Mj,uI({as:i,ownerState:c,className:RR(u.root,r),ref:t},l))});const Cj=jR("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),qj=["center","classes","className"];let Ej,Dj,Tj,Oj,Nj=e=>e;const Aj=ZL(Ej||(Ej=Nj`
  0% {
    transform: scale(0);
    opacity: 0.1;
  }

  100% {
    transform: scale(1);
    opacity: 0.3;
  }
`)),_j=ZL(Dj||(Dj=Nj`
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
`)),Ij=ZL(Tj||(Tj=Nj`
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(0.92);
  }

  100% {
    transform: scale(1);
  }
`)),Lj=PF("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),Pj=PF(function(e){const{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:o,rippleSize:a,in:s,onExited:l,timeout:c}=e,[u,d]=k_.useState(!1),f=RR(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),h={width:a,height:a,top:-a/2+o,left:-a/2+i},p=RR(n.child,u&&n.childLeaving,r&&n.childPulsate);return s||u||d(!0),k_.useEffect(()=>{if(!s&&null!=l){const e=setTimeout(l,c);return()=>{clearTimeout(e)}}},[l,s,c]),uP.jsx("span",{className:f,style:h,children:uP.jsx("span",{className:p})})},{name:"MuiTouchRipple",slot:"Ripple"})(Oj||(Oj=Nj`
  opacity: 0;
  position: absolute;

  &.${0} {
    opacity: 0.3;
    transform: scale(1);
    animation-name: ${0};
    animation-duration: ${0}ms;
    animation-timing-function: ${0};
  }

  &.${0} {
    animation-duration: ${0}ms;
  }

  & .${0} {
    opacity: 1;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: currentColor;
  }

  & .${0} {
    opacity: 0;
    animation-name: ${0};
    animation-duration: ${0}ms;
    animation-timing-function: ${0};
  }

  & .${0} {
    position: absolute;
    /* @noflip */
    left: 0px;
    top: 0;
    animation-name: ${0};
    animation-duration: 2500ms;
    animation-timing-function: ${0};
    animation-iteration-count: infinite;
    animation-delay: 200ms;
  }
`),Cj.rippleVisible,Aj,550,({theme:e})=>e.transitions.easing.easeInOut,Cj.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,Cj.child,Cj.childLeaving,_j,550,({theme:e})=>e.transitions.easing.easeInOut,Cj.childPulsate,Ij,({theme:e})=>e.transitions.easing.easeInOut),Rj=k_.forwardRef(function(e,t){const n=jF({props:e,name:"MuiTouchRipple"}),{center:r=!1,classes:i={},className:o}=n,a=dI(n,qj),[s,l]=k_.useState([]),c=k_.useRef(0),u=k_.useRef(null);k_.useEffect(()=>{u.current&&(u.current(),u.current=null)},[s]);const d=k_.useRef(!1),f=pz(),h=k_.useRef(null),p=k_.useRef(null),m=k_.useCallback(e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:o,cb:a}=e;l(e=>[...e,uP.jsx(Pj,{classes:{ripple:RR(i.ripple,Cj.ripple),rippleVisible:RR(i.rippleVisible,Cj.rippleVisible),ripplePulsate:RR(i.ripplePulsate,Cj.ripplePulsate),child:RR(i.child,Cj.child),childLeaving:RR(i.childLeaving,Cj.childLeaving),childPulsate:RR(i.childPulsate,Cj.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o},c.current)]),c.current+=1,u.current=a},[i]),g=k_.useCallback((e={},t={},n=()=>{})=>{const{pulsate:i=!1,center:o=r||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&d.current)return void(d.current=!1);"touchstart"===(null==e?void 0:e.type)&&(d.current=!0);const s=a?null:p.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,g;if(o||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(l.width/2),u=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-l.left),u=Math.round(n-l.top)}if(o)g=Math.sqrt((2*l.width**2+l.height**2)/3),g%2==0&&(g+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-u),u)+2;g=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===h.current&&(h.current=()=>{m({pulsate:i,rippleX:c,rippleY:u,rippleSize:g,cb:n})},f.start(80,()=>{h.current&&(h.current(),h.current=null)})):m({pulsate:i,rippleX:c,rippleY:u,rippleSize:g,cb:n})},[r,m,f]),y=k_.useCallback(()=>{g({},{pulsate:!0})},[g]),v=k_.useCallback((e,t)=>{if(f.clear(),"touchend"===(null==e?void 0:e.type)&&h.current)return h.current(),h.current=null,void f.start(0,()=>{v(e,t)});h.current=null,l(e=>e.length>0?e.slice(1):e),u.current=t},[f]);return k_.useImperativeHandle(t,()=>({pulsate:y,start:g,stop:v}),[y,g,v]),uP.jsx(Lj,uI({className:RR(Cj.root,i.root,o),ref:p},a,{children:uP.jsx(vj,{component:null,exit:!0,children:s})}))});function zj(e){return FR("MuiButtonBase",e)}const Fj=jR("MuiButtonBase",["root","disabled","focusVisible"]),jj=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],Bj=PF("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Fj.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Vj=k_.forwardRef(function(e,t){const n=jF({props:e,name:"MuiButtonBase"}),{action:r,centerRipple:i=!1,children:o,className:a,component:s="button",disabled:l=!1,disableRipple:c=!1,disableTouchRipple:u=!1,focusRipple:d=!1,LinkComponent:f="a",onBlur:h,onClick:p,onContextMenu:m,onDragLeave:g,onFocus:y,onFocusVisible:v,onKeyDown:b,onKeyUp:x,onMouseDown:S,onMouseLeave:w,onMouseUp:M,onTouchEnd:k,onTouchMove:C,onTouchStart:q,tabIndex:E=0,TouchRippleProps:D,touchRippleRef:T,type:O}=n,N=dI(n,jj),A=k_.useRef(null),_=k_.useRef(null),I=uz(_,T),{isFocusVisibleRef:L,onFocus:P,onBlur:R,ref:z}=Mz(),[F,j]=k_.useState(!1);l&&F&&j(!1),k_.useImperativeHandle(r,()=>({focusVisible:()=>{j(!0),A.current.focus()}}),[]);const[B,V]=k_.useState(!1);k_.useEffect(()=>{V(!0)},[]);const H=B&&!c&&!l;function $(e,t,n=u){return cz(r=>{t&&t(r);return!n&&_.current&&_.current[e](r),!0})}k_.useEffect(()=>{F&&d&&!c&&B&&_.current.pulsate()},[c,d,F,B]);const W=$("start",S),U=$("stop",m),Y=$("stop",g),K=$("stop",M),G=$("stop",e=>{F&&e.preventDefault(),w&&w(e)}),X=$("start",q),J=$("stop",k),Z=$("stop",C),Q=$("stop",e=>{R(e),!1===L.current&&j(!1),h&&h(e)},!1),ee=cz(e=>{A.current||(A.current=e.currentTarget),P(e),!0===L.current&&(j(!0),v&&v(e)),y&&y(e)}),te=()=>{const e=A.current;return s&&"button"!==s&&!("A"===e.tagName&&e.href)},ne=k_.useRef(!1),re=cz(e=>{d&&!ne.current&&F&&_.current&&" "===e.key&&(ne.current=!0,_.current.stop(e,()=>{_.current.start(e)})),e.target===e.currentTarget&&te()&&" "===e.key&&e.preventDefault(),b&&b(e),e.target===e.currentTarget&&te()&&"Enter"===e.key&&!l&&(e.preventDefault(),p&&p(e))}),ie=cz(e=>{d&&" "===e.key&&_.current&&F&&!e.defaultPrevented&&(ne.current=!1,_.current.stop(e,()=>{_.current.pulsate(e)})),x&&x(e),p&&e.target===e.currentTarget&&te()&&" "===e.key&&!e.defaultPrevented&&p(e)});let oe=s;"button"===oe&&(N.href||N.to)&&(oe=f);const ae={};"button"===oe?(ae.type=void 0===O?"button":O,ae.disabled=l):(N.href||N.to||(ae.role="button"),l&&(ae["aria-disabled"]=l));const se=uz(t,z,A),le=uI({},n,{centerRipple:i,component:s,disabled:l,disableRipple:c,disableTouchRipple:u,focusRipple:d,tabIndex:E,focusVisible:F}),ce=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,o=kz({root:["root",t&&"disabled",n&&"focusVisible"]},zj,i);return n&&r&&(o.root+=` ${r}`),o})(le);return uP.jsxs(Bj,uI({as:oe,className:RR(ce.root,a),ownerState:le,onBlur:Q,onClick:p,onContextMenu:U,onFocus:ee,onKeyDown:re,onKeyUp:ie,onMouseDown:W,onMouseLeave:G,onMouseUp:K,onDragLeave:Y,onTouchEnd:J,onTouchMove:Z,onTouchStart:X,ref:se,tabIndex:l?-1:E,type:O},ae,N,{children:[o,H?uP.jsx(Rj,uI({ref:I,center:i},D)):null]}))});function Hj(e){return FR("MuiTypography",e)}jR("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const $j=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],Wj=PF("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t[`align${DP(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(({theme:e,ownerState:t})=>uI({margin:0},"inherit"===t.variant&&{font:"inherit"},"inherit"!==t.variant&&e.typography[t.variant],"inherit"!==t.align&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),Uj={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Yj={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},Kj=k_.forwardRef(function(e,t){const n=jF({props:e,name:"MuiTypography"}),r=(e=>Yj[e]||e)(n.color),i=AR(uI({},n,{color:r})),{align:o="inherit",className:a,component:s,gutterBottom:l=!1,noWrap:c=!1,paragraph:u=!1,variant:d="body1",variantMapping:f=Uj}=i,h=dI(i,$j),p=uI({},i,{align:o,color:r,className:a,component:s,gutterBottom:l,noWrap:c,paragraph:u,variant:d,variantMapping:f}),m=s||(u?"p":f[d]||Uj[d])||"span",g=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:o,classes:a}=e;return kz({root:["root",o,"inherit"!==e.align&&`align${DP(t)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]},Hj,a)})(p);return uP.jsx(Wj,uI({as:m,ref:t,ownerState:p,className:RR(g.root,a)},h))});const Gj=k_.forwardRef(function(e,t){const{children:n,container:r,disablePortal:i=!1}=e,[o,a]=k_.useState(null),s=uz(k_.isValidElement(n)?Oz(n):null,t);if(ez(()=>{i||a(function(e){return"function"==typeof e?e():e}(r)||document.body)},[r,i]),ez(()=>{if(o&&!i)return oz(t,o),()=>{oz(t,null)}},[t,o,i]),i){if(k_.isValidElement(n)){const e={ref:s};return k_.cloneElement(n,e)}return uP.jsx(k_.Fragment,{children:n})}return uP.jsx(k_.Fragment,{children:o?rj.createPortal(n,o):o})}),Xj=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],Jj={entering:{opacity:1},entered:{opacity:1}},Zj=k_.forwardRef(function(e,t){const n=SF(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:i,appear:o=!0,children:a,easing:s,in:l,onEnter:c,onEntered:u,onEntering:d,onExit:f,onExited:h,onExiting:p,style:m,timeout:g=r,TransitionComponent:y=fj}=e,v=dI(e,Xj),b=k_.useRef(null),x=uz(b,Oz(a),t),S=e=>t=>{if(e){const n=b.current;void 0===t?e(n):e(n,t)}},w=S(d),M=S((e,t)=>{bj(e);const r=xj({style:m,timeout:g,easing:s},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),c&&c(e,t)}),k=S(u),C=S(p),q=S(e=>{const t=xj({style:m,timeout:g,easing:s},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),f&&f(e)}),E=S(h);return uP.jsx(y,uI({appear:o,in:l,nodeRef:b,onEnter:M,onEntered:k,onEntering:w,onExit:q,onExited:E,onExiting:C,addEndListener:e=>{i&&i(b.current,e)},timeout:g},v,{children:(e,t)=>k_.cloneElement(a,uI({style:uI({opacity:0,visibility:"exited"!==e||l?void 0:"hidden"},Jj[e],m,a.props.style),ref:x},t))}))});function Qj(e){return FR("MuiBackdrop",e)}jR("MuiBackdrop",["root","invisible"]);const eB=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],tB=PF("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(({ownerState:e})=>uI({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})),nB=k_.forwardRef(function(e,t){var n,r,i;const o=jF({props:e,name:"MuiBackdrop"}),{children:a,className:s,component:l="div",components:c={},componentsProps:u={},invisible:d=!1,open:f,slotProps:h={},slots:p={},TransitionComponent:m=Zj,transitionDuration:g}=o,y=dI(o,eB),v=uI({},o,{component:l,invisible:d}),b=(e=>{const{classes:t,invisible:n}=e;return kz({root:["root",n&&"invisible"]},Qj,t)})(v),x=null!=(n=h.root)?n:u.root;return uP.jsx(m,uI({in:f,timeout:g},y,{children:uP.jsx(tB,uI({"aria-hidden":!0},x,{as:null!=(r=null!=(i=p.root)?i:c.Root)?r:l,className:RR(b.root,s,null==x?void 0:x.className),ownerState:uI({},v,null==x?void 0:x.ownerState),classes:b,ref:t,children:a}))}))});function rB(e){return FR("MuiButton",e)}const iB=jR("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),oB=k_.createContext({}),aB=k_.createContext(void 0),sB=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],lB=e=>uI({},"small"===e.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===e.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===e.size&&{"& > *:nth-of-type(1)":{fontSize:22}}),cB=PF(Vj,{shouldForwardProp:e=>LF(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${DP(n.color)}`],t[`size${DP(n.size)}`],t[`${n.variant}Size${DP(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(({theme:e,ownerState:t})=>{var n,r;const i="light"===e.palette.mode?e.palette.grey[300]:e.palette.grey[800],o="light"===e.palette.mode?e.palette.grey.A100:e.palette.grey[700];return uI({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":uI({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Zz.alpha(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===t.variant&&"inherit"!==t.color&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Zz.alpha(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===t.variant&&"inherit"!==t.color&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Zz.alpha(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===t.variant&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:o,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},"contained"===t.variant&&"inherit"!==t.color&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":uI({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${iB.focusVisible}`]:uI({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${iB.disabled}`]:uI({color:(e.vars||e).palette.action.disabled},"outlined"===t.variant&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"contained"===t.variant&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},"text"===t.variant&&{padding:"6px 8px"},"text"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main},"outlined"===t.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${Zz.alpha(e.palette[t.color].main,.5)}`},"contained"===t.variant&&{color:e.vars?e.vars.palette.text.primary:null==(n=(r=e.palette).getContrastText)?void 0:n.call(r,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:i,boxShadow:(e.vars||e).shadows[2]},"contained"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},"inherit"===t.color&&{color:"inherit",borderColor:"currentColor"},"small"===t.size&&"text"===t.variant&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"text"===t.variant&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"outlined"===t.variant&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"outlined"===t.variant&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"contained"===t.variant&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"contained"===t.variant&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})},({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${iB.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${iB.disabled}`]:{boxShadow:"none"}}),uB=PF("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${DP(n.size)}`]]}})(({ownerState:e})=>uI({display:"inherit",marginRight:8,marginLeft:-4},"small"===e.size&&{marginLeft:-2},lB(e))),dB=PF("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${DP(n.size)}`]]}})(({ownerState:e})=>uI({display:"inherit",marginRight:-4,marginLeft:8},"small"===e.size&&{marginRight:-2},lB(e))),fB=k_.forwardRef(function(e,t){const n=k_.useContext(oB),r=k_.useContext(aB),i=jF({props:QR(n,e),name:"MuiButton"}),{children:o,color:a="primary",component:s="button",className:l,disabled:c=!1,disableElevation:u=!1,disableFocusRipple:d=!1,endIcon:f,focusVisibleClassName:h,fullWidth:p=!1,size:m="medium",startIcon:g,type:y,variant:v="text"}=i,b=dI(i,sB),x=uI({},i,{color:a,component:s,disabled:c,disableElevation:u,disableFocusRipple:d,fullWidth:p,size:m,type:y,variant:v}),S=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:i,variant:o,classes:a}=e;return uI({},a,kz({root:["root",o,`${o}${DP(t)}`,`size${DP(i)}`,`${o}Size${DP(i)}`,`color${DP(t)}`,n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${DP(i)}`],endIcon:["icon","endIcon",`iconSize${DP(i)}`]},rB,a))})(x),w=g&&uP.jsx(uB,{className:S.startIcon,ownerState:x,children:g}),M=f&&uP.jsx(dB,{className:S.endIcon,ownerState:x,children:f}),k=r||"";return uP.jsxs(cB,uI({ownerState:x,className:RR(n.className,S.root,l,k),component:s,disabled:c,focusRipple:!d,focusVisibleClassName:RR(S.focusVisible,h),ref:t,type:y},b,{classes:S,children:[w,o,M]}))});function hB(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function pB(e){return parseInt(iz(e).getComputedStyle(e).paddingRight,10)||0}function mB(e,t,n,r,i){const o=[t,n,...r];[].forEach.call(e.children,e=>{const t=-1===o.indexOf(e),n=!function(e){const t=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&hB(e,i)})}function gB(e,t){let n=-1;return e.some((e,r)=>!!t(e)&&(n=r,!0)),n}function yB(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=rz(e);return t.body===e?iz(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=function(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}(rz(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${pB(r)+e}px`;const t=rz(r).querySelectorAll(".mui-fixed");[].forEach.call(t,t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${pB(t)+e}px`})}let e;if(r.parentNode instanceof DocumentFragment)e=rz(r).body;else{const t=r.parentElement,n=iz(r);e="HTML"===(null==t?void 0:t.nodeName)&&"scroll"===n.getComputedStyle(t).overflowY?t:r}n.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{n.forEach(({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)})}}const vB=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function bB(e){const t=[],n=[];return Array.from(e.querySelectorAll(vB)).forEach((e,r)=>{const i=function(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==i&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}(e))}(e)&&(0===i?t.push(e):n.push({documentOrder:r,tabIndex:i,node:e}))}),n.sort((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex).map(e=>e.node).concat(t)}function xB(){return!0}function SB(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:o=bB,isEnabled:a=xB,open:s}=e,l=k_.useRef(!1),c=k_.useRef(null),u=k_.useRef(null),d=k_.useRef(null),f=k_.useRef(null),h=k_.useRef(!1),p=k_.useRef(null),m=uz(Oz(t),p),g=k_.useRef(null);k_.useEffect(()=>{s&&p.current&&(h.current=!n)},[n,s]),k_.useEffect(()=>{if(!s||!p.current)return;const e=rz(p.current);return p.current.contains(e.activeElement)||(p.current.hasAttribute("tabIndex")||p.current.setAttribute("tabIndex","-1"),h.current&&p.current.focus()),()=>{i||(d.current&&d.current.focus&&(l.current=!0,d.current.focus()),d.current=null)}},[s]),k_.useEffect(()=>{if(!s||!p.current)return;const e=rz(p.current),t=t=>{g.current=t,!r&&a()&&"Tab"===t.key&&e.activeElement===p.current&&t.shiftKey&&(l.current=!0,u.current&&u.current.focus())},n=()=>{const t=p.current;if(null===t)return;if(!e.hasFocus()||!a()||l.current)return void(l.current=!1);if(t.contains(e.activeElement))return;if(r&&e.activeElement!==c.current&&e.activeElement!==u.current)return;if(e.activeElement!==f.current)f.current=null;else if(null!==f.current)return;if(!h.current)return;let n=[];if(e.activeElement!==c.current&&e.activeElement!==u.current||(n=o(p.current)),n.length>0){var i,s;const e=Boolean((null==(i=g.current)?void 0:i.shiftKey)&&"Tab"===(null==(s=g.current)?void 0:s.key)),t=n[0],r=n[n.length-1];"string"!=typeof t&&"string"!=typeof r&&(e?r.focus():t.focus())}else t.focus()};e.addEventListener("focusin",n),e.addEventListener("keydown",t,!0);const i=setInterval(()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&n()},50);return()=>{clearInterval(i),e.removeEventListener("focusin",n),e.removeEventListener("keydown",t,!0)}},[n,r,i,a,s,o]);const y=e=>{null===d.current&&(d.current=e.relatedTarget),h.current=!0};return uP.jsxs(k_.Fragment,{children:[uP.jsx("div",{tabIndex:s?0:-1,onFocus:y,ref:c,"data-testid":"sentinelStart"}),k_.cloneElement(t,{ref:m,onFocus:e=>{null===d.current&&(d.current=e.relatedTarget),h.current=!0,f.current=e.target;const n=t.props.onFocus;n&&n(e)}}),uP.jsx("div",{tabIndex:s?0:-1,onFocus:y,ref:u,"data-testid":"sentinelEnd"})]})}const wB=new class{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&hB(e.modalRef,!1);const r=function(e){const t=[];return[].forEach.call(e.children,e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)}),t}(t);mB(t,e.mount,e.modalRef,r,!0);const i=gB(this.containers,e=>e.container===t);return-1!==i?(this.containers[i].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}mount(e,t){const n=gB(this.containers,t=>-1!==t.modals.indexOf(e)),r=this.containers[n];r.restore||(r.restore=yB(r,t))}remove(e,t=!0){const n=this.modals.indexOf(e);if(-1===n)return n;const r=gB(this.containers,t=>-1!==t.modals.indexOf(e)),i=this.containers[r];if(i.modals.splice(i.modals.indexOf(e),1),this.modals.splice(n,1),0===i.modals.length)i.restore&&i.restore(),e.modalRef&&hB(e.modalRef,t),mB(i.container,e.mount,e.modalRef,i.hiddenSiblings,!1),this.containers.splice(r,1);else{const e=i.modals[i.modals.length-1];e.modalRef&&hB(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function MB(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=wB,closeAfterTransition:o=!1,onTransitionEnter:a,onTransitionExited:s,children:l,onClose:c,open:u,rootRef:d}=e,f=k_.useRef({}),h=k_.useRef(null),p=k_.useRef(null),m=uz(p,d),[g,y]=k_.useState(!u),v=function(e){return!!e&&e.props.hasOwnProperty("in")}(l);let b=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(b=!1);const x=()=>(f.current.modalRef=p.current,f.current.mount=h.current,f.current),S=()=>{i.mount(x(),{disableScrollLock:r}),p.current&&(p.current.scrollTop=0)},w=cz(()=>{const e=function(e){return"function"==typeof e?e():e}(t)||rz(h.current).body;i.add(x(),e),p.current&&S()}),M=k_.useCallback(()=>i.isTopModal(x()),[i]),k=cz(e=>{h.current=e,e&&(u&&M()?S():p.current&&hB(p.current,b))}),C=k_.useCallback(()=>{i.remove(x(),b)},[b,i]);k_.useEffect(()=>()=>{C()},[C]),k_.useEffect(()=>{u?w():v&&o||C()},[u,C,v,o,w]);const q=e=>t=>{var r;null==(r=e.onKeyDown)||r.call(e,t),"Escape"===t.key&&229!==t.which&&M()&&(n||(t.stopPropagation(),c&&c(t,"escapeKeyDown")))},E=e=>t=>{var n;null==(n=e.onClick)||n.call(e,t),t.target===t.currentTarget&&c&&c(t,"backdropClick")};return{getRootProps:(t={})=>{const n=qz(e);delete n.onTransitionEnter,delete n.onTransitionExited;const r=uI({},n,t);return uI({role:"presentation"},r,{onKeyDown:q(r),ref:m})},getBackdropProps:(e={})=>uI({"aria-hidden":!0},e,{onClick:E(e),open:u}),getTransitionProps:()=>({onEnter:nz(()=>{y(!1),a&&a()},null==l?void 0:l.props.onEnter),onExited:nz(()=>{y(!0),s&&s(),o&&C()},null==l?void 0:l.props.onExited)}),rootRef:m,portalRef:k,isTopModal:M,exited:g,hasTransition:v}}function kB(e){return FR("MuiModal",e)}jR("MuiModal",["root","hidden","backdrop"]);const CB=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],qB=PF("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(({theme:e,ownerState:t})=>uI({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),EB=PF(nB,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),DB=k_.forwardRef(function(e,t){var n,r,i,o,a,s;const l=jF({name:"MuiModal",props:e}),{BackdropComponent:c=EB,BackdropProps:u,className:d,closeAfterTransition:f=!1,children:h,container:p,component:m,components:g={},componentsProps:y={},disableAutoFocus:v=!1,disableEnforceFocus:b=!1,disableEscapeKeyDown:x=!1,disablePortal:S=!1,disableRestoreFocus:w=!1,disableScrollLock:M=!1,hideBackdrop:k=!1,keepMounted:C=!1,onBackdropClick:q,open:E,slotProps:D,slots:T}=l,O=dI(l,CB),N=uI({},l,{closeAfterTransition:f,disableAutoFocus:v,disableEnforceFocus:b,disableEscapeKeyDown:x,disablePortal:S,disableRestoreFocus:w,disableScrollLock:M,hideBackdrop:k,keepMounted:C}),{getRootProps:A,getBackdropProps:_,getTransitionProps:I,portalRef:L,isTopModal:P,exited:R,hasTransition:z}=MB(uI({},N,{rootRef:t})),F=uI({},N,{exited:R}),j=(e=>{const{open:t,exited:n,classes:r}=e;return kz({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},kB,r)})(F),B={};if(void 0===h.props.tabIndex&&(B.tabIndex="-1"),z){const{onEnter:e,onExited:t}=I();B.onEnter=e,B.onExited=t}const V=null!=(n=null!=(r=null==T?void 0:T.root)?r:g.Root)?n:qB,H=null!=(i=null!=(o=null==T?void 0:T.backdrop)?o:g.Backdrop)?i:c,$=null!=(a=null==D?void 0:D.root)?a:y.root,W=null!=(s=null==D?void 0:D.backdrop)?s:y.backdrop,U=Tz({elementType:V,externalSlotProps:$,externalForwardedProps:O,getSlotProps:A,additionalProps:{ref:t,as:m},ownerState:F,className:RR(d,null==$?void 0:$.className,null==j?void 0:j.root,!F.open&&F.exited&&(null==j?void 0:j.hidden))}),Y=Tz({elementType:H,externalSlotProps:W,additionalProps:u,getSlotProps:e=>_(uI({},e,{onClick:t=>{q&&q(t),null!=e&&e.onClick&&e.onClick(t)}})),className:RR(null==W?void 0:W.className,null==u?void 0:u.className,null==j?void 0:j.backdrop),ownerState:F});return C||E||z&&!R?uP.jsx(Gj,{ref:L,container:p,disablePortal:S,children:uP.jsxs(V,uI({},U,{children:[!k&&c?uP.jsx(H,uI({},Y)):null,uP.jsx(SB,{disableEnforceFocus:b,disableAutoFocus:v,disableRestoreFocus:w,isEnabled:P,open:E,children:k_.cloneElement(h,B)})]}))}):null});function TB(e){return FR("MuiDivider",e)}jR("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);const OB=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],NB=PF("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,"vertical"===n.orientation&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&"vertical"===n.orientation&&t.withChildrenVertical,"right"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignRight,"left"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignLeft]}})(({theme:e,ownerState:t})=>uI({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin"},t.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},t.light&&{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:Zz.alpha(e.palette.divider,.08)},"inset"===t.variant&&{marginLeft:72},"middle"===t.variant&&"horizontal"===t.orientation&&{marginLeft:e.spacing(2),marginRight:e.spacing(2)},"middle"===t.variant&&"vertical"===t.orientation&&{marginTop:e.spacing(1),marginBottom:e.spacing(1)},"vertical"===t.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},t.flexItem&&{alignSelf:"stretch",height:"auto"}),({ownerState:e})=>uI({},e.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}),({theme:e,ownerState:t})=>uI({},t.children&&"vertical"!==t.orientation&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}}),({theme:e,ownerState:t})=>uI({},t.children&&"vertical"===t.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}}),({ownerState:e})=>uI({},"right"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),AB=PF("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,"vertical"===n.orientation&&t.wrapperVertical]}})(({theme:e,ownerState:t})=>uI({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`},"vertical"===t.orientation&&{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`})),_B=k_.forwardRef(function(e,t){const n=jF({props:e,name:"MuiDivider"}),{absolute:r=!1,children:i,className:o,component:a=(i?"div":"hr"),flexItem:s=!1,light:l=!1,orientation:c="horizontal",role:u=("hr"!==a?"separator":void 0),textAlign:d="center",variant:f="fullWidth"}=n,h=dI(n,OB),p=uI({},n,{absolute:r,component:a,flexItem:s,light:l,orientation:c,role:u,textAlign:d,variant:f}),m=(e=>{const{absolute:t,children:n,classes:r,flexItem:i,light:o,orientation:a,textAlign:s,variant:l}=e;return kz({root:["root",t&&"absolute",l,o&&"light","vertical"===a&&"vertical",i&&"flexItem",n&&"withChildren",n&&"vertical"===a&&"withChildrenVertical","right"===s&&"vertical"!==a&&"textAlignRight","left"===s&&"vertical"!==a&&"textAlignLeft"],wrapper:["wrapper","vertical"===a&&"wrapperVertical"]},TB,r)})(p);return uP.jsx(NB,uI({as:a,className:RR(m.root,o),role:u,ref:t,ownerState:p},h,{children:i?uP.jsx(AB,{className:m.wrapper,ownerState:p,children:i}):null}))});_B.muiSkipListHighlight=!0;const IB=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function LB(e){return`scale(${e}, ${e**2})`}const PB={entering:{opacity:1,transform:LB(1)},entered:{opacity:1,transform:"none"}},RB="undefined"!=typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),zB=k_.forwardRef(function(e,t){const{addEndListener:n,appear:r=!0,children:i,easing:o,in:a,onEnter:s,onEntered:l,onEntering:c,onExit:u,onExited:d,onExiting:f,style:h,timeout:p="auto",TransitionComponent:m=fj}=e,g=dI(e,IB),y=pz(),v=k_.useRef(),b=SF(),x=k_.useRef(null),S=uz(x,Oz(i),t),w=e=>t=>{if(e){const n=x.current;void 0===t?e(n):e(n,t)}},M=w(c),k=w((e,t)=>{bj(e);const{duration:n,delay:r,easing:i}=xj({style:h,timeout:p,easing:o},{mode:"enter"});let a;"auto"===p?(a=b.transitions.getAutoHeightDuration(e.clientHeight),v.current=a):a=n,e.style.transition=[b.transitions.create("opacity",{duration:a,delay:r}),b.transitions.create("transform",{duration:RB?a:.666*a,delay:r,easing:i})].join(","),s&&s(e,t)}),C=w(l),q=w(f),E=w(e=>{const{duration:t,delay:n,easing:r}=xj({style:h,timeout:p,easing:o},{mode:"exit"});let i;"auto"===p?(i=b.transitions.getAutoHeightDuration(e.clientHeight),v.current=i):i=t,e.style.transition=[b.transitions.create("opacity",{duration:i,delay:n}),b.transitions.create("transform",{duration:RB?i:.666*i,delay:RB?n:n||.333*i,easing:r})].join(","),e.style.opacity=0,e.style.transform=LB(.75),u&&u(e)}),D=w(d);return uP.jsx(m,uI({appear:r,in:a,nodeRef:x,onEnter:k,onEntered:C,onEntering:M,onExit:E,onExited:D,onExiting:q,addEndListener:e=>{"auto"===p&&y.start(v.current||0,e),n&&n(x.current,e)},timeout:"auto"===p?null:p},g,{children:(e,t)=>k_.cloneElement(i,uI({style:uI({opacity:0,transform:LB(.75),visibility:"exited"!==e||a?void 0:"hidden"},PB[e],h,i.props.style),ref:S},t))}))});zB.muiSupportAuto=!0;const FB=k_.createContext({});function jB(e){return FR("MuiList",e)}jR("MuiList",["root","padding","dense","subheader"]);const BB=["children","className","component","dense","disablePadding","subheader"],VB=PF("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})(({ownerState:e})=>uI({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})),HB=k_.forwardRef(function(e,t){const n=jF({props:e,name:"MuiList"}),{children:r,className:i,component:o="ul",dense:a=!1,disablePadding:s=!1,subheader:l}=n,c=dI(n,BB),u=k_.useMemo(()=>({dense:a}),[a]),d=uI({},n,{component:o,dense:a,disablePadding:s}),f=(e=>{const{classes:t,disablePadding:n,dense:r,subheader:i}=e;return kz({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},jB,t)})(d);return uP.jsx(FB.Provider,{value:u,children:uP.jsxs(VB,uI({as:o,className:RR(f.root,i),ref:t,ownerState:d},c,{children:[l,r]}))})});function $B(e){return FR("MuiListItemButton",e)}const WB=jR("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),UB=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],YB=PF(Vj,{shouldForwardProp:e=>LF(e)||"classes"===e,name:"MuiListItemButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})(({theme:e,ownerState:t})=>uI({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${WB.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Zz.alpha(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${WB.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Zz.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${WB.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Zz.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Zz.alpha(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${WB.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${WB.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},"flex-start"===t.alignItems&&{alignItems:"flex-start"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.dense&&{paddingTop:4,paddingBottom:4})),KB=k_.forwardRef(function(e,t){const n=jF({props:e,name:"MuiListItemButton"}),{alignItems:r="center",autoFocus:i=!1,component:o="div",children:a,dense:s=!1,disableGutters:l=!1,divider:c=!1,focusVisibleClassName:u,selected:d=!1,className:f}=n,h=dI(n,UB),p=k_.useContext(FB),m=k_.useMemo(()=>({dense:s||p.dense||!1,alignItems:r,disableGutters:l}),[r,p.dense,s,l]),g=k_.useRef(null);ez(()=>{i&&g.current&&g.current.focus()},[i]);const y=uI({},n,{alignItems:r,dense:m.dense,disableGutters:l,divider:c,selected:d}),v=(e=>{const{alignItems:t,classes:n,dense:r,disabled:i,disableGutters:o,divider:a,selected:s}=e;return uI({},n,kz({root:["root",r&&"dense",!o&&"gutters",a&&"divider",i&&"disabled","flex-start"===t&&"alignItemsFlexStart",s&&"selected"]},$B,n))})(y),b=uz(g,t);return uP.jsx(FB.Provider,{value:m,children:uP.jsx(YB,uI({ref:b,href:h.href||h.to,component:(h.href||h.to)&&"div"===o?"button":o,focusVisibleClassName:RR(v.focusVisible,u),ownerState:y,className:RR(v.root,f)},h,{classes:v,children:a}))})});function GB(e){return FR("MuiListItemIcon",e)}jR("MuiListItemIcon",["root","alignItemsFlexStart"]);const XB=["className"],JB=PF("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"flex-start"===n.alignItems&&t.alignItemsFlexStart]}})(({theme:e,ownerState:t})=>uI({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},"flex-start"===t.alignItems&&{marginTop:8})),ZB=k_.forwardRef(function(e,t){const n=jF({props:e,name:"MuiListItemIcon"}),{className:r}=n,i=dI(n,XB),o=uI({},n,{alignItems:k_.useContext(FB).alignItems}),a=(e=>{const{alignItems:t,classes:n}=e;return kz({root:["root","flex-start"===t&&"alignItemsFlexStart"]},GB,n)})(o);return uP.jsx(JB,uI({className:RR(a.root,r),ownerState:o,ref:t},i))});function QB(e){return FR("MuiListItemText",e)}const eV=jR("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),tV=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],nV=PF("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${eV.primary}`]:t.primary},{[`& .${eV.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})(({ownerState:e})=>uI({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},e.primary&&e.secondary&&{marginTop:6,marginBottom:6},e.inset&&{paddingLeft:56})),rV=k_.forwardRef(function(e,t){const n=jF({props:e,name:"MuiListItemText"}),{children:r,className:i,disableTypography:o=!1,inset:a=!1,primary:s,primaryTypographyProps:l,secondary:c,secondaryTypographyProps:u}=n,d=dI(n,tV),{dense:f}=k_.useContext(FB);let h=null!=s?s:r,p=c;const m=uI({},n,{disableTypography:o,inset:a,primary:!!h,secondary:!!p,dense:f}),g=(e=>{const{classes:t,inset:n,primary:r,secondary:i,dense:o}=e;return kz({root:["root",n&&"inset",o&&"dense",r&&i&&"multiline"],primary:["primary"],secondary:["secondary"]},QB,t)})(m);return null==h||h.type===Kj||o||(h=uP.jsx(Kj,uI({variant:f?"body2":"body1",className:g.primary,component:null!=l&&l.variant?void 0:"span",display:"block"},l,{children:h}))),null==p||p.type===Kj||o||(p=uP.jsx(Kj,uI({variant:"body2",className:g.secondary,color:"text.secondary",display:"block"},u,{children:p}))),uP.jsxs(nV,uI({className:RR(g.root,i),ownerState:m,ref:t},d,{children:[h,p]}))});function iV(e){return FR("MuiPopover",e)}jR("MuiPopover",["root","paper"]);const oV=["onEntering"],aV=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],sV=["slotProps"];function lV(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function cV(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function uV(e){return[e.horizontal,e.vertical].map(e=>"number"==typeof e?`${e}px`:e).join(" ")}function dV(e){return"function"==typeof e?e():e}const fV=PF(DB,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),hV=PF(kj,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),pV=k_.forwardRef(function(e,t){var n,r,i;const o=jF({props:e,name:"MuiPopover"}),{action:a,anchorEl:s,anchorOrigin:l={vertical:"top",horizontal:"left"},anchorPosition:c,anchorReference:u="anchorEl",children:d,className:f,container:h,elevation:p=8,marginThreshold:m=16,open:g,PaperProps:y={},slots:v,slotProps:b,transformOrigin:x={vertical:"top",horizontal:"left"},TransitionComponent:S=zB,transitionDuration:w="auto",TransitionProps:{onEntering:M}={},disableScrollLock:k=!1}=o,C=dI(o.TransitionProps,oV),q=dI(o,aV),E=null!=(n=null==b?void 0:b.paper)?n:y,D=k_.useRef(),T=uz(D,E.ref),O=uI({},o,{anchorOrigin:l,anchorReference:u,elevation:p,marginThreshold:m,externalPaperSlotProps:E,transformOrigin:x,TransitionComponent:S,transitionDuration:w,TransitionProps:C}),N=(e=>{const{classes:t}=e;return kz({root:["root"],paper:["paper"]},iV,t)})(O),A=k_.useCallback(()=>{if("anchorPosition"===u)return c;const e=dV(s),t=(e&&1===e.nodeType?e:rz(D.current).body).getBoundingClientRect();return{top:t.top+lV(t,l.vertical),left:t.left+cV(t,l.horizontal)}},[s,l.horizontal,l.vertical,c,u]),_=k_.useCallback(e=>({vertical:lV(e,x.vertical),horizontal:cV(e,x.horizontal)}),[x.horizontal,x.vertical]),I=k_.useCallback(e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=_(t);if("none"===u)return{top:null,left:null,transformOrigin:uV(n)};const r=A();let i=r.top-n.vertical,o=r.left-n.horizontal;const a=i+t.height,l=o+t.width,c=iz(dV(s)),d=c.innerHeight-m,f=c.innerWidth-m;if(null!==m&&i<m){const e=i-m;i-=e,n.vertical+=e}else if(null!==m&&a>d){const e=a-d;i-=e,n.vertical+=e}if(null!==m&&o<m){const e=o-m;o-=e,n.horizontal+=e}else if(l>f){const e=l-f;o-=e,n.horizontal+=e}return{top:`${Math.round(i)}px`,left:`${Math.round(o)}px`,transformOrigin:uV(n)}},[s,u,A,_,m]),[L,P]=k_.useState(g),R=k_.useCallback(()=>{const e=D.current;if(!e)return;const t=I(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,P(!0)},[I]);k_.useEffect(()=>(k&&window.addEventListener("scroll",R),()=>window.removeEventListener("scroll",R)),[s,k,R]);k_.useEffect(()=>{g&&R()}),k_.useImperativeHandle(a,()=>g?{updatePosition:()=>{R()}}:null,[g,R]),k_.useEffect(()=>{if(!g)return;const e=function(e,t=166){let n;function r(...r){clearTimeout(n),n=setTimeout(()=>{e.apply(this,r)},t)}return r.clear=()=>{clearTimeout(n)},r}(()=>{R()}),t=iz(s);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}},[s,g,R]);let z=w;"auto"!==w||S.muiSupportAuto||(z=void 0);const F=h||(s?rz(dV(s)).body:void 0),j=null!=(r=null==v?void 0:v.root)?r:fV,B=null!=(i=null==v?void 0:v.paper)?i:hV,V=Tz({elementType:B,externalSlotProps:uI({},E,{style:L?E.style:uI({},E.style,{opacity:0})}),additionalProps:{elevation:p,ref:T},ownerState:O,className:RR(N.paper,null==E?void 0:E.className)}),H=Tz({elementType:j,externalSlotProps:(null==b?void 0:b.root)||{},externalForwardedProps:q,additionalProps:{ref:t,slotProps:{backdrop:{invisible:!0}},container:F,open:g},ownerState:O,className:RR(N.root,f)}),{slotProps:$}=H,W=dI(H,sV);return uP.jsx(j,uI({},W,!Cz(j)&&{slotProps:$,disableScrollLock:k},{children:uP.jsx(S,uI({appear:!0,in:g,onEntering:(e,t)=>{M&&M(e,t),R()},onExited:()=>{P(!1)},timeout:z},C,{children:uP.jsx(B,uI({},V,{children:d}))}))}))});function mV(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function gV(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function yV(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function bV(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vV(Object(n),!0).forEach(function(t){yV(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vV(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function xV(){
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof s?r:s,c=Object.create(l.prototype);return SV(c,"_invoke",function(n,r,i){var o,s,l,c=0,u=i||[],d=!1,f={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return o=t,s=0,l=e,f.n=n,a}};function h(n,r){for(s=n,l=r,t=0;!d&&c&&!i&&t<u.length;t++){var i,o=u[t],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=h&&((i=n<2&&h<o[1])?(s=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,u,p){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&h(u,p),s=u,l=p;(t=s<2?e:l)||!d;){o||(s?s<3?(s>1&&(f.n=-1),h(s,l)):f.n=l:f.v=l);try{if(c=2,o){if(s||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=e}else if((t=(d=f.n<0)?l:n.call(r,f))!==a)break}catch(t){o=e,s=1,l=t}finally{c=1}}return{value:t,done:d}}}(n,i,o),!0),c}var a={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][r]?t(t([][r]())):(SV(t={},r,function(){return this}),t),d=c.prototype=s.prototype=Object.create(u);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,SV(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=c,SV(d,"constructor",c),SV(c,"constructor",l),l.displayName="GeneratorFunction",SV(c,i,"GeneratorFunction"),SV(d),SV(d,i,"Generator"),SV(d,r,function(){return this}),SV(d,"toString",function(){return"[object Generator]"}),(xV=function(){return{w:o,m:f}})()}function SV(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}SV=function(e,t,n,r){function o(t,n){SV(e,t,function(e){return this._invoke(t,n,e)})}t?i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(o("next",0),o("throw",1),o("return",2))},SV(e,t,n,r)}function wV(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||CV(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function MV(e){return function(e){if(Array.isArray(e))return mV(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||CV(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kV(e){return kV="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kV(e)}function CV(e,t){if(e){if("string"==typeof e)return mV(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?mV(e,t):void 0}}function qV(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var EV,DV,TV={exports:{}},OV={},NV=(DV||(DV=1,TV.exports=function(){if(EV)return OV;EV=1;var e=C_,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function a(e,n,a){var s,l={},c=null,u=null;for(s in void 0!==a&&(c=""+a),void 0!==n.key&&(c=""+n.key),void 0!==n.ref&&(u=n.ref),n)r.call(n,s)&&!o.hasOwnProperty(s)&&(l[s]=n[s]);if(e&&e.defaultProps)for(s in n=e.defaultProps)void 0===l[s]&&(l[s]=n[s]);return{$$typeof:t,type:e,key:c,ref:u,props:l,_owner:i.current}}return OV.Fragment=n,OV.jsx=a,OV.jsxs=a,OV}()),TV.exports),AV=function(e){var t=e.className,n=e.title,r=e.path,i=e.fillRule;return NV.jsxs($F,{className:t,viewBox:"0 0 16 16",fontSize:"small",role:"img",style:{height:12,width:12},children:[NV.jsx("path",{d:r}),n?NV.jsx("title",{children:n}):void 0,i?NV.jsx("use",{fillRule:i}):void 0]})},_V={STYLE:{ELLIPSIS:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},FOCUS:{boxShadow:"inset 0 0 0 2px #177FE6"},ICONS:{COLOR:{PRIMARY:"rgba(89, 89, 89)",SECONDARY:"rgba(89, 89, 89, 0.8)",DISABLED:"rgba(89, 89, 89, 0.4)"}}}},IV={L:new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗＡ-Ｚａ-ｚｦ-ￜ]"),R:new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),AL:new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]")},LV=function(e){return IV.L.test(e)},PV=function(e){return IV.R.test(e)||IV.AL.test(e)};function RV(e){for(var t,n=e?e.length:0,r=0;r<n;r++){if(t=e[r],LV(t))return"ltr";if(PV(t))return"rtl"}return"ltr"}var zV,FV,jV,BV,VV=PF(fB,{shouldForwardProp:function(e){return"direction"!==e&&"padding"!==e&&"styling"!==e}})(function(e){var t=e.direction,n=e.padding,r=e.styling,i=r.fontSize,o=r.fontFamily,a=r.color;return{fontWeight:"normal",lineHeight:"normal",fontSize:"".concat(i," !important"),fontFamily:"".concat(o," !important"),color:"".concat(a," !important"),height:"100%",minWidth:"0px",maxWidth:"640px",padding:n,"&:disabled":{color:a,opacity:1},"& .MuiButton-startIcon":{margin:"ltr"===t?"0 2px":void 0},"& .MuiButton-endIcon":{margin:"rtl"===t?"0 2px":void 0}}}),HV=PF(function(e){var t=e.className;return NV.jsx(AV,{className:t,path:"M13,7 L8,7 L13,7 L13,4.98151367 C13,2.23029964 10.7614237,0 8,0 C5.23857625,0 3,2.23029964 3,4.98151367 L3,7 L3.75,7 L3,7 L4.5,7 L4.5,5.33193359 C4.5,3.21561511 5.54860291,1.5 8,1.5 C10.4513971,1.5 11.5,3.21561511 11.5,5.33193359 L11.5,7 L12.25,7 L3,7 C2.44771525,7 2,7.44771525 2,8 L2,15 C2,15.5522847 2.44771525,16 3,16 L13,16 C13.5522847,16 14,15.5522847 14,15 L14,8 C14,7.44771525 13.5522847,7 13,7 L3,7 L13,7 Z",fillRule:"evenodd"})})(function(){return{color:_V.STYLE.ICONS.COLOR.SECONDARY,marginTop:"1px"}}),$V=PF(function(e){var t=e.className;return NV.jsx(AV,{className:t,path:"m8 9 4.5-4.5L14 6l-4.5 4.5L8 12 2 6l1.5-1.5L8 9Z"})})(function(){return{color:_V.STYLE.ICONS.COLOR.SECONDARY,marginTop:"1px","&.disabled":{color:_V.STYLE.ICONS.COLOR.DISABLED,opacity:.6}}}),WV=function(e){var t=e.isOpen,n=e.onClick,r=e.popoverId,i=e.source,o=i.styling,a=i.info.text,s=i.layout.direction,l=i.meta,c=l.allowed,u=l.hasAlternatives,d=l.hasCyclic,f=l.hasMultiple,h=l.index,p=l.isCyclic,m=l.isLocked,g=i.resources.translator,y=i.services.focus,v=i.settings.isDisabled,b=i.state.inSelections,x=!(!c.change||!u),S=!(!c.reload||!p),w=(x||S)&&!b&&!v(),M={pointerEvents:w?"auto":"none"},k=function(e){var t=e.allowed,n=e.canChange,r=e.canReload,i=e.direction,o=e.hasCyclic,a=e.isLocked,s={top:"8px",right:"6px",bottom:"8px",left:"6px"};if(!e.hasMultiple)return"".concat(s.top," ").concat(s.right," ").concat(s.bottom," ").concat(s.left);var l=o&&t.reload;return"ltr"===i&&(a?s.left="0px":r||!n&&l?s.left="4px":n||(s.left="2px"),n||r||(s.right="0px")),"rtl"===i&&(a?s.right="0px":r||!n&&l?s.right="4px":n||(s.right="2px"),n||r||(s.left="0px")),"".concat(s.top," ").concat(s.right," ").concat(s.bottom," ").concat(s.left)}({allowed:c,canChange:x,canReload:S,direction:s,hasCyclic:d,hasMultiple:f,isLocked:m}),C=yV(yV({},"rtl"===s?"endIcon":"startIcon",m&&NV.jsx(HV,{height:12})),"rtl"===s?"startIcon":"endIcon",(x||S)&&NV.jsx($V,{className:"".concat(b||v()?"disabled":"")})),q=k_.useRef(),E=k_.useRef();k_.useEffect(function(){t||y.shouldFor(h)&&(q.current.focus(),E.current.focusVisible())});var D=RV(a),T="Accessibility.".concat(w?"Alternative":"Normal",".Instructions");return NV.jsx(VV,bV(bV({action:E,"aria-describedby":r,"aria-label":g.get(T),color:"inherit",direction:s,disabled:!w||v()||b,onClick:function(e){w&&n(e)},padding:k,ref:q,style:M,styling:o.title,title:a},C),{},{children:NV.jsx("span",{dir:D,style:_V.STYLE.ELLIPSIS,children:a})}))},UV=function(e){var t=e.className,n=e.title;return NV.jsx(AV,{className:t,title:n,path:"M 6 2 h 10 V 1 H 6 Z m 5 5 h 5 V 6 h -5 Z m 5 5 h -5 v -1 h 5 Z M 5 10 h 1 v 2.663 a 3.5 3.5 0 1 0 -2.922 0.036 l -0.406 0.914 A 4.501 4.501 0 1 1 7.329 13 H 9 v 1 H 5 Z"})},YV=PF(fB,{shouldForwardProp:function(e){return"direction"!==e&&"isFirst"!==e&&"isLast"!==e&&"styling"!==e}})(function(e){var t=e.direction,n=e.isFirst,r=e.isLast,i=e.styling.color;return{fontWeight:"normal",lineHeight:"normal",color:i,height:"24px",width:"24px",padding:0,marginLeft:"ltr"!==t||n?void 0:"4px",marginRight:"rtl"!==t||r?void 0:"4px","&:disabled":{color:i,opacity:1}}}),KV=PF(UV,{shouldForwardProp:function(e){return"direction"!==e&&"isFirst"!==e&&"isLast"!==e}})(function(e){var t=e.direction,n=e.isFirst,r=e.isLast;return{color:_V.STYLE.ICONS.COLOR.PRIMARY,marginTop:"1px",marginLeft:"ltr"!==t||n?void 0:"4px",marginRight:"rtl"!==t||r?void 0:"4px"}}),GV=PF(function(e){var t=e.className,n=e.title;return NV.jsx(AV,{className:t,title:n,path:"M1 8a7 7 0 1 1 10 6.326V11h-1v5h5v-1h-3.124A8 8 0 1 0 8 16v-1a7 7 0 0 1-7-7Z"})},{})(function(){return{color:_V.STYLE.ICONS.COLOR.SECONDARY,"&.disabled":{color:_V.STYLE.ICONS.COLOR.DISABLED}}}),XV=function(e){var t=e.source;if(!t.meta.isCyclic)return null;var n=wV(k_.useState(!1),2),r=n[0],i=n[1],o=t.styling,a=t.action.stepCycle,s=t.info,l=s.position,c=s.tooltip,u=t.layout.direction,d=t.meta,f=d.allowed,h=d.isFirst,p=d.isLast,m=t.settings.isDisabled,g=t.state.inSelections;return k_.useEffect(function(){r&&i(!1)},[l]),f.reload?NV.jsx(YV,{direction:u,disabled:r||g||m(),isFirst:h,isLast:p,onClick:function(){return i(!0),void a()},styling:o.title,title:c,variant:"outlined",children:NV.jsx(GV,{className:"".concat(r||g||m()?"disabled":"")})}):NV.jsx(KV,{direction:u,isFirst:h,isLast:p,style:{flexShrink:0},title:c})},JV=function(e){var t=e.className,n=e.title;return NV.jsx(AV,{className:t,title:n,path:"M7 4h9v1H7V4ZM9 8h7v1H9V8ZM11 12h5v1h-5v-1ZM1 4v3.526a3.5 3.5 0 0 0 3.5 3.5h2.31L5.22 9.402l.715-.7L8.7 11.527 5.935 14.35l-.714-.7 1.59-1.624H4.5a4.5 4.5 0 0 1-4.5-4.5V4h1Z"})},ZV=PF(fB,{shouldForwardProp:function(e){return"styling"!==e}})(function(e){var t=e.styling,n=t.fontSize,r=t.fontFamily,i=t.color;return{fontWeight:"normal",lineHeight:"normal",fontSize:"".concat(n," !important"),fontFamily:"".concat(r," !important"),color:"".concat(i," !important"),padding:"0px 5px",height:"100%",minWidth:"45px","&:disabled":{color:i}}}),QV={color:_V.STYLE.ICONS.COLOR.SECONDARY,marginTop:"1px","&.disabled":{color:_V.STYLE.ICONS.COLOR.DISABLED}},eH=PF(function(e){var t=e.className;return NV.jsx(AV,{className:t,path:"M8.5 8 4 3.5 5.5 2l6 6-6 6L4 12.5 8.5 8z"})})(function(){return QV}),tH=PF(function(e){var t=e.className;return NV.jsx(AV,{className:t,path:"m7 8 4.5 4.5L10 14 4 8l6-6 1.5 1.5z"})})(function(){return QV}),nH=PF(JV,{shouldForwardProp:function(e){return"direction"!==e&&"isFirst"!==e&&"isLast"!==e}})(function(e){var t=e.direction,n=e.isFirst,r=e.isLast;return{color:_V.STYLE.ICONS.COLOR.PRIMARY,marginTop:"1px",marginLeft:"ltr"!==t||n?void 0:"4px",marginRight:"rtl"!==t||r?void 0:"4px"}}),rH=function(e){var t=e.source;if(!t.meta.isDrillDown)return null;var n=t.styling,r=t.action.drillUp,i=t.info,o=i.breadcrumbs,a=i.tooltip,s=t.layout.direction,l=t.meta,c=l.isFirst,u=l.isLast,d=t.settings.isDisabled,f=t.state.inSelections,h=d()||f?"disabled":null,p=yV({},"rtl"===s?"startIcon":"endIcon","rtl"===s?NV.jsx(tH,{className:h}):NV.jsx(eH,{className:h})),m=o.map(function(e,t){var i=RV(e);return NV.jsx(ZV,bV(bV({disabled:d()||f,onClick:function(){return function(e){r({steps:o.length-e})}(t)},styling:n.title,title:e},p),{},{children:NV.jsx("span",{dir:i,style:_V.STYLE.ELLIPSIS,children:e})}),"breadcrumb-".concat(e))});return NV.jsxs(NV.Fragment,{children:["rtl"===s?m.reverse():void 0,NV.jsx(nH,{direction:s,isFirst:c,isLast:u,style:{flexShrink:0},title:a}),"rtl"===s?void 0:m]})},iH=PF(KB,{shouldForwardProp:function(e){return"nested"!==e&&"rtl"!==e}})(function(e){var t=e.nested,n=e.rtl;return{padding:"4px ".concat(t&&n?"32px":"16px"," 4px ").concat(t&&!n?"32px":"16px"),"&:focus":bV({},_V.STYLE.FOCUS)}}),oH=PF(ZB)(function(){return{marginRight:0,justifyContent:"center"}}),aH=PF(function(e){var t=e.className;return NV.jsx(AV,{className:t,path:"m6 10 7-7 2 2-7 7-2 2-5-5 2-2 3 3Z"})})(function(){return{color:_V.STYLE.ICONS.COLOR.SECONDARY}}),sH=PF(UV)(function(){return{color:_V.STYLE.ICONS.COLOR.SECONDARY}}),lH=PF(JV)(function(){return{color:_V.STYLE.ICONS.COLOR.SECONDARY,fontWeight:600}}),cH=function(e){var t=e.meta;return e.selected?NV.jsx(aH,{height:12}):null!=t&&t.isCyclic?NV.jsx(sH,{height:12}):null!=t&&t.isDrillDown?NV.jsx(lH,{height:12}):void 0},uH=function(e){var t=e.id,n=e.meta,r=e.nested,i=e.onClick,o=e.selected,a=e.source,s=e.text,l=a.styling,c=a.settings.isRTL,u=bV({fontWeight:!n||n.isNormal?"normal":600,lineHeight:"normal",fontSize:l.popover.fontSize,fontFamily:l.popover.fontFamily,color:l.popover.color,textAlign:c?"end":"start"},_V.STYLE.ELLIPSIS),d=RV(s),f=NV.jsx(oH,{sx:c?{paddingRight:"12px"}:{paddingLeft:"12px"},children:cH({meta:n,selected:o})});return NV.jsx(C_.Fragment,{children:NV.jsxs(iH,{autoFocus:o,nested:r,onClick:function(e){return null==i?void 0:i(e)},rtl:c,title:s,children:[c&&f,NV.jsx(rV,{dir:d,primaryTypographyProps:{style:u},children:s}),!c&&f]})},t)},dH=PF(_B)(function(){return{marginTop:"-1px"}}),fH=function(e){var t=e.anchor,n=e.id,r=e.onClose,i=e.open,o=e.source,a=o.action,s=a.changeTo,l=a.drillUp,c=a.setActiveField,u=o.info,d=u.breadcrumbs,f=u.group,h=u.id,p=u.text,m=o.data.alternatives,g=o.meta,y=g.index,v=g.isCyclic,b=g.isDrillDown,x=o.resources.translator,S=o.services.focus,w={isChanging:!1},M=k_.useRef(),k=function(){var e,t=document.activeElement;null!=M&&null!==(e=M.current)&&void 0!==e&&e.contains(t)&&t.blur(),r()},C=v||b,q=NV.jsx(uH,{id:h,meta:o.meta,onClick:k,selected:!C,source:o,text:C?f.name:p},h),E=C&&f.items.map(function(e){return NV.jsx(uH,{id:e.id,nested:!0,onClick:function(t){return function(e,t){w.isChanging||(w.isChanging=!0,"keydown"!==e.type&&"keyup"!==e.type||S.queueFor(y),v&&c({fieldIndex:t.index}),b&&l({steps:d.length-t.index}))}(t,e)},selected:e.current,source:o,text:e.text})}),D=m.map(function(e,t){return NV.jsxs(C_.Fragment,{children:[NV.jsx(uH,{id:e.id,meta:e.meta,onClick:function(t){return n=t,r=e.id,void(w.isChanging||(w.isChanging=!0,"keydown"!==n.type&&"keyup"!==n.type||S.queueFor(y),s({id:r})));var n,r},source:o,text:e.text},e.id),t<m.length-1&&NV.jsx(dH,{},"divider-".concat(e.id))]},e.id)});return NV.jsx(pV,{anchorEl:t,anchorOrigin:{vertical:"top",horizontal:"center"},disableRestoreFocus:!0,id:n,onClose:k,open:i,ref:M,slotProps:{paper:{style:{minWidth:"250px",maxWidth:"640px",maxHeight:"300px"}}},transformOrigin:{vertical:"bottom",horizontal:"center"},children:NV.jsxs(HB,{"aria-label":x.get("Accessibility.Popover.Instructions"),dense:!0,children:[q,E,NV.jsx(dH,{},"divider-".concat(h)),D]})})},hH=function(e){var t=e.source,n=wV(k_.useState(null),2),r=n[0],i=n[1],o={id:r?"alternatives-popover":void 0,isOpen:Boolean(r)},a=t.layout.direction,s=t.meta.index,l=t.services.focus,c=function(){i(null)};k_.useEffect(function(){o.isOpen&&c()},[t.info.key]);var u=NV.jsx(XV,{source:t}),d=NV.jsx(rH,{source:t});return NV.jsxs(NV.Fragment,{children:["rtl"===a?void 0:d,"rtl"===a?void 0:u,NV.jsx(WV,{onClick:function(e){var t=e.currentTarget;t.classList.contains("qcm-focus-visible")&&l.queueFor(s),i(t)},isOpen:o.isOpen,popoverId:o.id,source:t}),NV.jsx(fH,{anchor:r,id:o.id,onClose:c,open:o.isOpen,source:t}),"rtl"===a?d:void 0,"rtl"===a?u:void 0]})},pH=function(){if(FV)return zV;FV=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},o=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,i=e.call(n,"constructor"),o=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!i&&!o)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return zV=function e(){var t,n,r,l,c,u,d=arguments[0],f=1,h=arguments.length,p=!1;for("boolean"==typeof d&&(p=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<h;++f)if(null!=(t=arguments[f]))for(n in t)r=s(d,n),d!==(l=s(t,n))&&(p&&l&&(o(l)||(c=i(l)))?(c?(c=!1,u=r&&i(r)?r:[]):u=r&&o(r)?r:{},a(d,{name:n,newValue:e(p,u,l)})):void 0!==l&&a(d,{name:n,newValue:l}));return d},zV}(),mH=qV(pH),gH={},yH=qV((jV||(jV=1,BV=gH,(()=>{var e={370:e=>{var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},a=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,i=t.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(r in e);return void 0===r||t.call(e,r)},s=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(i)return i(e,n).value}return e[n]};e.exports=function e(){var t,n,r,i,c,u,d=arguments[0],f=1,h=arguments.length,p=!1;for("boolean"==typeof d&&(p=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<h;++f)if(null!=(t=arguments[f]))for(n in t)r=l(d,n),d!==(i=l(t,n))&&(p&&i&&(a(i)||(c=o(i)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&a(r)?r:{},s(d,{name:n,newValue:e(p,u,i)})):void 0!==i&&s(d,{name:n,newValue:i}));return d}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};n.r(r),n.d(r,{default:()=>De});var i=n(370),o=n.n(i);const a=function(e,t,n){if(!t)return!1;var r,i=t.split("."),o=i[i.length-1],a=e;for(r=0;r<i.length-1;++r)void 0===a[i[r]]&&(a[i[r]]=Number.isNaN(+i[r+1])?{}:[]),a=a[i[r]];if(void 0!==n){var s=a[o];return a[o]=n,{updated:n,previous:s}}return delete a[o],!1},s=function(e,t,n){var r,i=t.split("."),o=e;if(void 0===o)return n;for(r=0;r<i.length;++r){if(void 0===o[i[r]])return n;o=o[i[r]]}return o},l={EXPRESSIONS:{observed:"",trend:"STL_Trend",seasonal:"STL_Seasonal",residual:"STL_Residual"},OPTIONS:[{value:"observed",translation:"cao.trendDecomposition.parameters.decomposition.observed"},{value:"trend",translation:"cao.trendDecomposition.parameters.decomposition.trend"},{value:"seasonal",translation:"cao.trendDecomposition.parameters.decomposition.seasonal"},{value:"residual",translation:"cao.trendDecomposition.parameters.decomposition.residual"}]};var c="".concat(" ","(").concat("　"),u="".concat("　",")").concat(" ");function d(e){return c+e+u}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var n=function(e,t){if(!t)return null;var n,r;for(n=0;n<t.length;n++)if((r=t[n]).qInfo.qId===e)return r;return null}(e.qLibraryId,t.dimensionList);return n&&n.qData.info[0].qTags.indexOf("$numeric")>-1}var r=function(e,t){if(!t)return null;var n,r,i=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var n=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(n)&&(t=(t=t.substring(1,n)).trim()),t}(e);for(n=0;n<t.length;n++){if((r=t[n]).qName===i)return r;if(r.qDerivedFieldData)for(var o=0;o<r.qDerivedFieldData.qDerivedFieldLists.length;++o)for(var a=r.qDerivedFieldData.qDerivedFieldLists[o],s=0;s<a.qFieldDefs.length;++s){var l=a.qFieldDefs[s];if(l.qName===i)return l}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return r&&r.qTags.indexOf("$numeric")>-1}function h(e){return!(!e.fullAccumulation&&!e.fullRange)}function p(e,t){var n=e.crossAllDimensions;return 2===t&&n?"RowNo(Total)":"RowNo()"}function m(e){var t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e),n=t.trim();return"="===n.substring(0,1)?n.substring(1).trim():n}function g(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function y(e,t){var n=e.crossAllDimensions;return 2===t&&n?"Above(Total ":"Above("}function v(e){return void 0===e?")":", 0, ".concat(e,")")}function b(e){return"Replace(Replace(".concat(e,",'''',''''''),'$','$''&''')")}function x(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=").concat(b("MinString(".concat(t,")")),")' and Only({1}").concat(t,")<='$(=").concat(b("MaxString(".concat(t,")")),")'\"}")}function S(e){var t=e.modifier,n=void 0===t?{}:t,r=e.dimensions,i=e.dimensionAndFieldList,o=e.funcComp,a=void 0===o?"Sum":o,s=e.valueComp,l=void 0===s?"0":s;if(!n.showExcludedValues)return"";if(r&&1===r.length){var c=x(f(r[0],i),g(0));return"".concat(a,"({1<").concat(c,">}").concat(l,")")}if(r&&2===r.length){var u=f(r[0],i),d=f(r[1],i),h=g(0),p=g(1),m=x(u,h),y=x(d,p);return"".concat(a,"({1<").concat(m,",").concat(y,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function w(e){return"".concat(e,"(")}function M(e){var t=e.properties,n=e.layout;return s(t,"qHyperCubeDef.qDimensions",s(n,"qHyperCube.qDimensionInfo",[])).length}const k={isFullRange:h,getNumDimensions:M,getExpressionWithExcludedComp:function(e){var t=e.expression,n=e.modifier,r=e.dimensions,i=e.dimensionAndFieldList,o=e.treatMissingAsNull,a=d(m(t));if(!n.showExcludedValues)return a;var s=S({modifier:n,dimensions:r,dimensionAndFieldList:i}),l=o?"":", 0";if(r&&1===r.length){var c=g(0);return"If(Count(".concat(c,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(r&&2===r.length){var u=g(0),f=g(1);return"If(Count(".concat(u,") * Count(").concat(f,") > 0, ").concat(a," + ").concat(s).concat(l,")")}return a},getRowNoComp:p,getNumStepComp:function(e,t){if(!h(e)){var n=e.steps;return"number"!=typeof n||Number.isNaN(n)?6:n}return p(e,t)},getAboveCompPrefix:y,getAboveCompSuffix:v,getAboveComp:function(e,t,n,r){return y(e,t)+n+v(r)},getFunctionPrefix:w,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return w(e)+t+")"},getAggrComp:function(e,t,n){return"Aggr(".concat(e,", ").concat(t,", ").concat(n,")")},getExcludedComp:S,needDimension:function(e){var t=e.modifier,n=e.properties,r=e.layout;return 0===function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t)&&2===M({properties:n,layout:r})},getDimComp:function(e,t){var n=function(e){return e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:0].qDef.qSortCriterias[0]}(e,t),r=g(t);if(!n.qSortByExpression&&!n.qSortByNumeric&&!n.qSortByAscii)return r;var i=["Descending","Ascending"],o=n.qSortByNumeric?"(Numeric, ".concat(i[(n.qSortByNumeric+1)/2],")"):"",a=n.qSortByAscii?"(Text, ".concat(i[(n.qSortByAscii+1)/2],")"):"";return n.qSortByNumeric&&n.qSortByAscii?"(".concat(r,", ").concat(o,", ").concat(a,")"):n.qSortByNumeric?"(".concat(r,", ").concat(o,")"):n.qSortByAscii?"(".concat(r,", ").concat(a,")"):r},simplifyExpression:m,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var n=t.indexOf(c);if(-1!==n){var r=t.indexOf(u);if(-1!==r)return t.substring(n+c.length,r)}}},initModifier:function(e,t){Object.keys(t).forEach(function(n){void 0===e[n]&&(e[n]=t[n])})},isNumeric:f,isApplicable:function(e){var t=e.properties,n=e.layout,r=e.minDimensions,i=void 0===r?1:r,o=e.maxDimensions,a=void 0===o?2:o;if(!t&&!n)return!0;var s=M({properties:t,layout:n});return s>=i&&s<=a},getExpressionWithMarkers:d,canExtract:function(e){var t=e.indexOf(c),n=e.indexOf(u);return t>-1&&n>-1&&t<n},getDimDefWithWrapper:g,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")},generateTSDExpression:function(e,t,n){var r=t||e.outputExpression;if(e.base&&e.base.qDef&&(r=t!==e.base.qDef?t:e.base.qDef),"observed"!==e.decomposition){var i=n.qHyperCubeDef.qMeasures.find(function(t){return t.qDef.base&&t.qDef.base.qLibraryId&&e.base&&e.base.qLibraryId?t.qDef.base.qLibraryId===e.base.qLibraryId:null});i&&t!==i.qDef.qLabel&&(r=i.qLibraryId||i.qDef.base.qLibraryId?"[".concat(i.qDef.qLabel,"]"):i.qDef.base.qDef);var o=function(e){var t=l.OPTIONS.find(function(t){return t.value===e.decomposition});return t?l.EXPRESSIONS[t.value]:""}(e);r=r.startsWith("=")?r.substr(1):r,r="".concat(o,"(").concat(r,", ").concat(e.steps,")")}return r},getDecomposition:function(e){var t="observed";return Object.values(l.EXPRESSIONS).find(function(n){var r=e.qDef.base.qDef.toLowerCase()||e.qDef.qDef.toLowerCase();return l.EXPRESSIONS[n]&&r.includes(l.EXPRESSIONS[n].toLowerCase())&&(t=n),n}),t}};function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function q(e){return q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},q(e)}var E=o().bind(null,!0),D={},T=Array.isArray;function O(e){return null!=e&&!Array.isArray(e)&&"object"===q(e)}function N(e){return void 0===e}function A(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function _(e,t){var n,r=t.substring(1).split("/").slice(0,-1);return r.forEach(function(t,i){if(i!==r.length){n=+t;var o=Number.isNaN(n)?{}:[];e[n||t]=N(e[n||t])?o:e[t],e=e[n||t]}}),e}function I(e,t){var n=!0;if(O(e)&&O(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach(function(r){I(e[r],t[r])||(n=!1)}),n);if(T(e)&&T(t)){if(e.length!==t.length)return!1;for(var r=0,i=e.length;r<i;r+=1)if(!I(e[r],t[r]))return!1;return!0}return e===t}D.generate=function(e,t,n){n=n||"";var r=[];return Object.keys(t).forEach(function(i){var o=function(e){return e?E({},{val:e}).val:e}(t[i]),a=e[i],s="".concat(n,"/").concat(i);I(o,a)||A(t,i)||(N(a)?r.push({op:"add",path:s,value:o}):O(o)&&O(a)?r=r.concat(D.generate(a,o,s)):T(o)&&T(a)?r=r.concat(function(e,t,n){var r=[],i=e.slice(),o=-1;function a(e,t,n){if(e[n]&&N(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(var r=0,i=e.length;r<i;r+=1)if(e[r]&&e[r].qInfo.qId===t)return r;return-1}if(I(t,i))return r;if(!N(t[0])&&N(t[0].qInfo))return r.push({op:"replace",path:n,value:t}),r;for(var s=i.length-1;s>=0;s-=1)-1===(o=a(t,i[s].qInfo&&i[s].qInfo.qId,s))?(r.push({op:"remove",path:"".concat(n,"/").concat(s)}),i.splice(s,1)):r=r.concat(D.generate(i[s],t[o],"".concat(n,"/").concat(s)));for(var l=0,c=t.length;l<c;l+=1)-1===(o=a(i,t[l].qInfo&&t[l].qInfo.qId))?(r.push({op:"add",path:"".concat(n,"/").concat(l),value:t[l]}),i.splice(l,0,t[l])):o!==l&&(r.push({op:"move",path:"".concat(n,"/").concat(l),from:"".concat(n,"/").concat(o)}),i.splice(l,0,i.splice(o,1)[0]));return r}(a,o,s)):r.push({op:"replace",path:"".concat(n,"/").concat(i),value:o}))}),Object.keys(e).forEach(function(i){N(t[i])&&!A(e,i)&&r.push({op:"remove",path:"".concat(n,"/").concat(i)})}),r},D.apply=function(e,t){t.forEach(function(t){var n,r,i=_(e,t.path),o=t.path.split("/").splice(-1)[0],a=o&&Number.isNaN(+o)?i[o]:i[+o]||i,s=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(i=null,a=e),"add"===t.op||"replace"===t.op)if(T(i))"-"===o&&(o=i.length),i.splice(+o,"add"===t.op?0:1,t.value);else if(T(a)&&T(t.value)){var l,c=t.value.slice();a.length=0,(l=a).push.apply(l,function(e){if(Array.isArray(e))return C(e)}(r=c)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return C(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?C(e,t):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}else if(O(a)&&O(t.value))n=a,Object.keys(n).forEach(function(e){Object.getOwnPropertyDescriptor(n,e).configurable&&!A(n,e)&&delete n[e]}),E(a,t.value);else{if(!i)throw new Error("Patchee is not an object we can patch");i[o]=t.value}else if("move"===t.op){var u=_(e,t.from);T(i)?i.splice(+o,0,u.splice(+s,1)[0]):(i[o]=u[s],delete u[s])}else"remove"===t.op&&(T(i)?i.splice(+o,1):delete i[o])})},D.clone=function(e){return E({},e)},D.createPatch=function(e,t,n){var r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},D.updateObject=function(e,t){Object.keys(e).length?D.apply(e,D.generate(e,t)):E(e,t)};const L=D;var P="accumulation";function R(e,t){var n=s(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===P)return n[r]}function z(e,t){var n=function(e,t){var n=s(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===P)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var F={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""};const j={translationKey:"properties.modifier.accumulation",needDimension:k.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return k.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,o=e.numDimensions,a=e.dimensionAndFieldList;if(!n)return t;var l=o;void 0===l&&(l=k.getNumDimensions({properties:r,layout:i}));var c=s(r,"qHyperCubeDef.qDimensions",[]),u=k.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:a}),d=k.getNumStepComp(n,l),f=k.getAboveComp(n,l,u,d),h=k.getRangeComp("RangeSum",f);if(k.needDimension({modifier:n,properties:r,layout:i})){var p=k.getDimComp(c,1),m=k.getDimComp(c,0),g=k.getAggrComp(h,p,m);h=n.showExcludedValues?k.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:a,valueComp:g}):g}return h},extractInputExpression:k.extractInputExpression,initModifier:function(e){k.initModifier(e,F)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:function(e,t){return!k.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(z(t,e),".accumulationDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.accumulation.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(z(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.accumulation.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(z(t,e),".fullAccumulation")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(z(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=R(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=R(t,e);return n&&!n.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(z(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return k.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(P))return!1;var o=R(t,e);return o&&!o.disabled}}}};var B="movingAverage";function V(e,t){var n=s(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===B)return n[r]}function H(e,t){var n=function(e,t){var n=s(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===B)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var $={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1};const W={translationKey:"properties.modifier.movingAverage",needDimension:k.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return k.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,n=e.expression,r=e.modifier,i=e.properties,o=e.layout,a=e.numDimensions,l=e.dimensionAndFieldList;if(!r)return n;var c=a;void 0===c&&(c=k.getNumDimensions({properties:i,layout:o}));var u=s(i,"qHyperCubeDef.qDimensions",[]),d=r.showExcludedValues&&r.nullSuppression,f=k.getExpressionWithExcludedComp({expression:n,modifier:r,dimensions:u,dimensionAndFieldList:l,treatMissingAsNull:d}),h=k.getNumStepComp(r,c),p=k.getAboveComp(r,c,f,h);if(r.nullSuppression)t=k.getRangeComp("RangeAvg",p);else{var m=k.getRangeComp("RangeSum",p),g=function(e,t){var n=k.getRowNoComp(e,t);if(!k.isFullRange(e)){var r=e.steps,i="number"!=typeof r||Number.isNaN(r)?6:r;return"RangeMin(".concat(i,", ").concat(n,")")}return n}(r,c);t="".concat(m," / ").concat(g)}var y=t;if(k.needDimension({modifier:r,properties:i,layout:o})){var v=k.getDimComp(u,1),b=k.getDimComp(u,0),x=k.getAggrComp(y,v,b);y=r.showExcludedValues?k.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return y},extractInputExpression:k.extractInputExpression,initModifier:function(e){k.initModifier(e,$)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.movingAverage.disclaimer",show:function(e,t){return!k.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(H(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.movingAverage.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(H(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.movingAverage.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(H(t,e),".fullRange")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(H(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=V(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=V(t,e);return n&&!n.fullRange}},showExcludedValues:{refFn:function(t){return"".concat(H(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat(H(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return k.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(B))return!1;var o=V(t,e);return o&&!o.disabled}}}};var U="timeSeriesDecomposition";function Y(e,t){var n=s(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===U)return n[r]}function K(e,t){var n=function(e,t){var n=s(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===U)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var G={type:"timeSeriesDecomposition",disabled:!1,decomposition:"",steps:2,outputExpression:""};const X={translationKey:"properties.modifier.timeSeriesDecomposition",needDimension:k.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return k.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties;return n?k.generateTSDExpression(n,t,r):t},extractInputExpression:k.extractInputExpression,initModifier:function(e,t){k.initModifier(e,G),""===e.decomposition&&t&&(e.decomposition=k.getDecomposition(t))},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.timeSeriesDecomposition||"properties.modifier.timeSeriesDecomposition",show:function(e,t){return!k.isApplicable({properties:t.properties})}},settings:{type:"items",items:{decomposition:{refFn:function(t){return"".concat(K(t,e),".decomposition")},type:"string",translation:t.modifierTrendDecompositionDecomposition||"properties.modifier.trendDecomposition.decomposition",component:"dropdown",schemaIgnore:!0,defaultValue:t.trendDecompositionParametersDecompositionObserved||"cao.trendDecomposition.parameters.decomposition.observed",options:l.OPTIONS},steps:{refFn:function(t){return"".concat(K(t,e),".steps")},type:"integer",translation:t.modifierTimeSeriesDecompositionPeriods||"properties.modifier.timeSeriesDecomposition.periods",schemaIgnore:!0,defaultValue:2,change:function(t,n){var r=Y(t,e);if(r){var i=r.steps;r.steps="number"!=typeof i||Number.isNaN(i)?2:Math.abs(i),n.properties.qHyperCubeDef.qMeasures=n.properties.qHyperCubeDef.qMeasures.map(function(e){return e.qDef.modifiers.map(function(e){return"timeSeriesDecomposition"===e.type?e.steps=i:e.steps=e.steps,e}),e})}},show:function(t){var n=Y(t,e);return n&&!n.fullRange}}},show:function(e,t){return k.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(U))return!1;var o=Y(t,e);return o&&!o.disabled}}}};var J="difference";function Z(e,t){var n=function(e,t){var n=s(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===J)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var Q={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""};const ee={translationKey:"properties.modifier.difference",needDimension:k.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return k.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:k.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,o=e.numDimensions,a=e.dimensionAndFieldList;if(!n)return t;var l=o;void 0===l&&(l=k.getNumDimensions({properties:r,layout:i}));var c=s(r,"qHyperCubeDef.qDimensions",[]),u=k.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:a}),d=k.getAboveComp(n,l,u),f="".concat(u," - ").concat(d);if(k.needDimension({modifier:n,properties:r,layout:i})){var h=k.getDimComp(c,1),p=k.getDimComp(c,0),m=k.getAggrComp(f,h,p);f=n.showExcludedValues?k.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:a,funcComp:"Only",valueComp:m}):m}return f},initModifier:function(e){Object.keys(Q).forEach(function(t){void 0===e[t]&&(e[t]=Q[t])})},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:function(e,t){return!k.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(Z(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.difference.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(Z(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.difference.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},showExcludedValues:{refFn:function(t){return"".concat(Z(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return k.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(J))return!1;var o=function(e,t){var n=s(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===J)return n[r]}(t,e);return o&&!o.disabled}}}};var te="normalization";function ne(e,t){var n=s(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===te)return n[r]}function re(e,t){var n=function(e,t){var n=s(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===te)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}function ie(e,t){for(var n=0;n<e.length;n++)if(e[n].value===t)return n;return-1}var oe={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:2,selectionScope:2};function ae(e){return 2===e?"{1}":""}function se(e,t,n){return 1===e?"{$<".concat(k.getFieldWithWrapper(t),"={'").concat(n,"'}>}"):""}function le(e,t){return 0===e&&t>1||2===e?"Total":""}function ce(e,t,n){return 0===e&&t>1?"<".concat(k.getDimDefWithWrapper(n),">"):""}const ue={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,n=e.layout;return k.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:k.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,o=e.numDimensions,a=e.dimensionAndFieldList;if(!n)return t;var l=o;void 0===l&&(l=k.getNumDimensions({properties:r,layout:i}));var c=s(r,"qHyperCubeDef.qDimensions",[]),u=k.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:a}),d=n.selectionScope,f=n.dimensionalScope;return function(e,t,n,r,i,o,a,s){var l=ae(t),c=se(t,n,r),u=""===l&&""===c?"":l||c,d=le(i,o),f=ce(i,o,a),h=function(e){for(var t=[],n=0;n<e;n++)t[n]=k.getDimDefWithWrapper(n);return t.join(", ")}(o);return s?"(If(".concat(e," < 0, null(), ").concat(e,"))/ Sum(").concat(u," ").concat(d).concat(f," Aggr(").concat(u," RangeMax( 0, ").concat(e,"), ").concat(h,"))"):"".concat(e,"/ Sum(").concat(u," ").concat(d).concat(f," Aggr(").concat(u," ").concat(e,", ").concat(h,"))")}(u,d,n.field,n.value,f,l,n.primaryDimension,n.ignoreNegative)},initModifier:function(e){Object.keys(oe).forEach(function(t){void 0===e[t]&&(e[t]=oe[t])})},updateModifier:function(e,t){1===(t.qDimensions?t.qDimensions.length:0)&&0===e.dimensionalScope&&(e.dimensionalScope=2)},enableTotalsFunction:function(){return!0},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:function(e,t){return!k.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(re(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,options:function(n){return function(e,t,n){var r=[{value:0,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:1,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:2,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return r=function(e,t){if(1===e){var n=ie(t,0);t.splice(n,1)}return t}(ne(e,n).dimensionalScope,r),r}(n,t,e)}},field:{refFn:function(t){return"".concat(re(t,e),".field")},type:"string",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:function(e,t,n){return n.app.getFieldList().then(function(e){return e.map(function(e){return{label:e.qName,value:e.qName}})})},show:function(t){return 1===ne(t,e).selectionScope}},value:{refFn:function(t){return"".concat(re(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return 1===ne(t,e).selectionScope}},dimensionalScope:{refFn:function(t){return"".concat(re(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,supportTooltip:!0,options:function(n,r){return function(e,t,n,r){var i=t.layout.qHyperCube.qDimensionInfo.length,o=[{value:0,translation:n.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:n.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:1,translation:n.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension"),tooltipTranslation:n.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension",".tooltip")},{value:2,translation:n.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:n.dimensionalScopeDisregardAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension",".tooltip")}];return o=function(e,t){if(e<2){var n=ie(t,0);t.splice(n,1)}return t}(i,o),o=function(e,t){if(0===e){var n=ie(t,1);t.splice(n,1)}return t}(ne(e,r).selectionScope,o),o}(n,r,t,e)}},primaryDimension:{refFn:function(t){return"".concat(re(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.normalization.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(t,n){return 0===(ne(t,e).dimensionalScope||0)&&n.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return k.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(te))return!1;var o=ne(t,e);return o&&!o.disabled}}},getDisregardSelectionComp:ae,getFieldSelectionComp:se,getTotalComp:le,getSelectedDimComp:ce};var de="library id deleted",fe="qDef.qDef",he="qDef.base.qDef",pe="qLibraryId",me="qDef.base.qLibraryId",ge="qDef.qLabel",ye="qDef.qLabelExpression",ve="qDef.base.qLabel",be="qDef.base.qLabelExpression",xe="qDef.qAggrFunc",Se="qDef.base.qAggrFunc",we="qDef.base";const Me={getExpression:function(e){var t=s(e,he);return void 0!==t?t:s(e,fe)},getExpressionRef:function(e){return void 0!==s(e,he)?he:fe},getLibraryIdRef:function(e){return s(e,me)?me:pe},getLibraryId:function(e){return s(e,me)||s(e,pe)},getLabelRef:function(e){return s(e,we)?ve:ge},getLabelExpressionRef:function(e){return s(e,we)?be:ye}};var ke={initBase:function(e,t){(t||ke.isValid(e))&&(a(e,he,s(e,fe)),a(e,me,s(e,pe)),a(e,ve,s(e,ge)),a(e,be,s(e,ye)))},restoreBase:function(e){ke.isValid(e)&&(a(e,fe,s(e,he)),a(e,pe,s(e,me)),a(e,ge,s(e,ve)),a(e,ye,s(e,be)),s(e,xe)&&s(e,Se)&&a(e,xe,s(e,Se)),delete e.qDef.base)},isValid:function(e){var t=s(e,he),n=s(e,me);return void 0!==t||void 0!==n}};const Ce=ke;function qe(e){return qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qe(e)}var Ee={accumulation:j,movingAverage:W,difference:ee,normalization:ue,timeSeriesDecomposition:X};const De={modifiers:Ee,apply:Oe,applyModifiers:Ne,cleanUpMeasure:Ae,destroy:function(e){e&&Te[e.id]&&Te[e.id].masterItemSubscriber&&(Te[e.id].masterItemSubscriber&&Te[e.id].masterItemSubscriber.unsubscribe(),delete Te[e.id])},hasActiveModifiers:_e,getActiveModifier:Ie,initBase:Ce.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some(function(e){return Ee[e]})},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some(function(e){return Ee[e]&&Ee[e].isApplicable({properties:n,layout:r})})},measureBase:Me,limitedSorting:function(e){var t=e.measures,n=e.properties,r=e.layout,i=!1,o=!1;return t.forEach(function(e){var t=Re(e);$e({modifiers:t,properties:n,layout:r})&&(i=!0,o=o||Ge({modifiers:t,properties:n,layout:r}))}),i&&!o},ifEnableTotalsFunction:Le};var Te={};function Oe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.model,n=e.properties,r=e.isSnapshot,i=void 0!==r&&r,a=e.masterItem,l=!1;Te[t.id]=Te[t.id]||{isFirstTime:!0};var c=Te[t.id].isFirstTime;if(Te[t.id].isFirstTime=!1,n&&"object"===qe(n))return Ne({model:t,properties:n});var u=t?t.layout:void 0,d=s(u,"qSelectionInfo.qInSelections");if(i||d)return Promise.resolve(l);var f=s(u,"qHyperCube.qMeasureInfo"),h=Te[t.id].lastReloadTime;if(Te[t.id].lastReloadTime=s(t,"app.layout.qLastReloadTime"),_e({measures:f,layout:u})){var p=function(e){var t=e.measures,n=e.layout,r=e.lastReloadTime;return s(e.model,"app.layout.qLastReloadTime")!==r&&function(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some(function(e){return He({measure:e,properties:n,layout:r})})}({measures:t,layout:n})}({measures:f,layout:u,model:t,lastReloadTime:h});return p||function(e){var t=e.measures,n=e.layout,r=e.masterItem,i=e.isFirstTime;return!!Array.isArray(t)&&(i||r||t.some(function(e){return function(e){var t=e.measure,n=e.layout;return $e({modifiers:Re(t),layout:n})?!t.base:!!t.base}({measure:e,layout:n})}))}({measures:f,layout:u,masterItem:a,isFirstTime:c})?t.getEffectiveProperties().then(function(e){var n=o()(!0,{},e);Fe(n);var r=Xe(n);return We({model:t}).then(function(i){return Ue({libraryIds:r,model:t}).then(function(r){return p&&function(e){var t=e.properties;Pe(t).forEach(function(e){return function(e){var t=e.measure;if(He({measure:t,properties:e.properties})){var n=0,r=t.qDef.modifiers;Array.isArray(r)&&r.forEach(function(e){if("object"===qe(e)&&!e.disabled){if(n++,"object"!==qe(Ee[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(n>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");var r=Ee[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==r&&Be(t)&&k.simplifyExpression(t.qDef.base.qDef)!==k.simplifyExpression(r)&&(t.qDef.base.qDef=r)}})}}({measure:e,properties:t})})}({properties:n}),Ne({model:t,oldProperties:e,properties:n,runUpdateIfChange:!0,masterItem:a,libraryItemsProps:r,dimensionAndFieldList:i})})}).catch(function(){return Promise.resolve(l)})}):Promise.resolve(l)}return function(e){return!!Array.isArray(e)&&e.some(function(e){return"object"===qe(e.base)})}(f)?t.getEffectiveProperties().then(function(e){return function(e){var t=e.model,n=e.properties,r=Xe(n);return Je({model:t,libraryIds:r}).then(function(){var e=o()(!0,{},n);return Pe(n).forEach(function(e){return Ae(e)}),Ke({oldProperties:e,newProperties:n,model:t})})}({model:t,properties:e})}):Promise.resolve(l)}function Ne(e){var t=e.model,n=e.oldProperties,r=e.properties,i=e.measures,a=e.runUpdateIfChange,l=void 0!==a&&a,c=e.masterItem,u=e.libraryItemsProps,d=e.dimensionAndFieldList;void 0===n&&(n=l?o()(!0,{},r):r),Fe(r);var f=Xe(r);return Je({model:t,libraryIds:f,masterItem:c}).then(function(){return function(e){var t=e.measures,n=e.properties,r=e.model,i=e.libraryItemsProps,a=e.dimensionAndFieldList;if(t||(t=Pe(n)),!t.length)return Promise.resolve();if(!i&&!_e({measures:t,properties:n}))return t.forEach(function(e){return Ae(e)}),Promise.resolve();var l=i?void 0:Xe(n);return We({model:r,dimensionAndFieldList:a}).then(function(e){return Ue({libraryIds:l,model:r,libraryItemsProps:i}).then(function(r){t.forEach(function(t){var i=t.qDef.modifiers;r&&$e({modifiers:i,properties:n})?(function(e){var t=e.measure,n=e.properties,r=e.libraryItemsProps,i=e.dimensionAndFieldList,a=0;Ce.isValid(t)||Ce.initBase(t,!0);var l=t.qDef,c=l.modifiers,u=l.base;Array.isArray(c)&&c.forEach(function(e){if("object"===qe(e)&&!e.disabled){if(a++,"object"!==qe(Ee[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(a>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");Ee[e.type].initModifier(e,t);var l=t.qLibraryId||u&&u.qLibraryId;l?function(e){var t=e.measure,n=e.modifier,r=e.properties,i=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,l=""===s?s:Ee[n.type].generateExpression({expression:s,modifier:n,properties:r,dimensionAndFieldList:i});n.outputExpression=l,t.qDef.qDef=n.outputExpression,(t.qDef.qLabel||a.qMeasure.qLabel)&&(t.qDef.qLabel=t.qDef.base.qLabel||a.qMeasure.qLabel),(t.qDef.qLabelExpression||a.qMeasure.qLabelExpression)&&(t.qDef.qLabelExpression=a.qMeasure.qLabelExpression),t.qDef.quarantine&&t.qDef.quarantine.qNumFormat&&a.qMeasure.qNumFormat&&(t.qDef.qNumFormat=t.qDef.base.qNumFormat||a.qMeasure.qNumFormat,t.qDef.isCustomFormatted=a.qMeasure.isCustomFormatted),delete t.qLibraryId,t.qDef.coloring=a.qMeasure.coloring,n.base=o()(!0,{},t.qDef.base)}({measure:t,modifier:e,libraryId:l,properties:n,libraryItemsProps:r,dimensionAndFieldList:i}):function(e){var t=e.measure,n=e.modifier,r=e.properties,i=e.dimensionAndFieldList;"function"==typeof Ee[n.type].updateModifier&&Ee[n.type].updateModifier(n,r.qHyperCubeDef);var a=Me.getExpression(t),s=""===a?a:Ee[n.type].generateExpression({expression:a,modifier:n,properties:r,dimensionAndFieldList:i});n.outputExpression=s,t.qDef.qDef=n.outputExpression,t.qDef.base.qLabelExpression?t.qDef.qLabelExpression=t.qDef.base.qLabelExpression:t.qDef.qLabel=t.qDef.base.qLabel||a,n.base=o()(!0,{},t.qDef.base)}({measure:t,modifier:e,properties:n,dimensionAndFieldList:i}),function(e){var t=s(e,"qDef.qAggrFunc");"Expr"!==t||Le(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&Le(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(t)}})}({measure:t,properties:n,libraryItemsProps:r,dimensionAndFieldList:e}),je(t)):Ae(t)})})})}({measures:i,properties:r,model:t,libraryItemsProps:u,dimensionAndFieldList:d}).then(function(){return l?Ke({oldProperties:n,newProperties:r,model:t}):Promise.resolve(!1)})}).catch(function(){return Promise.resolve(!1)})}function Ae(e){!function(e){var t=Re(e);return Array.isArray(t)&&t.some(function(e){return"object"===qe(e)&&!e.disabled&&!Ee[e.type]})}(e)?Ce.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,je(e)}function _e(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some(function(e){return $e({modifiers:Re(e),properties:n,layout:r})})}function Ie(e){var t=Re(e);if(Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];if(Ee[r.type]&&!r.disabled)return r}}function Le(e){var t=Ie(e);return!t||Ee[t.type].enableTotalsFunction(e)}function Pe(e){return s(e,"qHyperCubeDef.qMeasures",[]).concat(s(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function Re(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function ze(e){return s(e,"outputExpression.qValueExpression.qExpr")||s(e,"outputExpression")}function Fe(e){Pe(e).forEach(function(e){return function(e){var t=Ie(e);t&&(void 0!==t.outputExpression&&ze(t)!==e.qDef.qDef?delete e.qDef.base:!Ce.isValid(e)&&t.base&&(e.qDef.base=o()(!0,{},t.base)))}(e)})}function je(e){var t=Re(e);Array.isArray(t)&&t.forEach(function(t){"object"===qe(t)&&(t.disabled||!Ee[t.type]&&ze(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)})}function Be(e){return e.base||e.qDef&&e.qDef.base}function Ve(e){var t=Be(e);return e.qLibraryId||t&&t.qLibraryId}function He(e){var t=e.measure,n=e.properties,r=e.layout;return!Ve(t)&&$e({modifiers:Re(t),properties:n,layout:r})}function $e(e){var t=e.modifiers,n=e.properties,r=e.layout,i={};return Array.isArray(t)&&t.some(function(e){return!("object"!==qe(e)||e.disabled||!Ee[e.type])&&(void 0===i[e.type]&&(i[e.type]=Ee[e.type].isApplicable({properties:n,layout:r})),i[e.type])})}function We(e){var t=e.model,n=e.dimensionAndFieldList;if(n)return Promise.resolve(n);var r=[],i={},o=t.app.getDimensionList().then(function(e){i.dimensionList=e});r.push(o);var a=t.app.getFieldList().then(function(e){i.fieldList=e});return r.push(a),Promise.all(r).then(function(){return i})}function Ue(e){var t=e.libraryIds,n=e.model,r=e.libraryItemsProps;if(r)return Promise.resolve(r);var i=t.measureLibraryIds,o=t.dimensionLibraryIds,a={},s=[];return i.forEach(function(e){var t=n.app.getMeasure(e).then(function(t){return t.getProperties().then(function(t){a[e]=t})});s.push(t)}),o.forEach(function(e){var t=n.app.getDimension(e).then(function(t){return t.getProperties().then(function(t){a[e]=t})});s.push(t)}),Promise.all(s).then(function(){return a}).catch(function(){return null})}function Ye(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Ke(e){var t=e.oldProperties,n=e.newProperties,r=e.model,i=JSON.stringify(s(t,"qHyperCubeDef.qMeasures"),Ye)!==JSON.stringify(s(n,"qHyperCubeDef.qMeasures"),Ye)||JSON.stringify(s(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ye)!==JSON.stringify(s(n,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ye);return i?function(e){var t=e.model,n=e.oldProperties,r=e.newProperties,i=t.layout;return i&&!i.qHasSoftPatches&&!i.qExtendsId&&s(i,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(r):function(e,t,n){if(!e)return Promise.resolve();var r=L.generate(t,n);return o()(!0,t,n),r&&r.length?(r=r.map(function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}}),e.applyPatches(r,!0)):Promise.resolve()}(t,n,r)}({model:r,oldProperties:t,newProperties:n}).then(function(){return i}):Promise.resolve(i)}function Ge(e){var t=e.modifiers,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some(function(e){return"object"===qe(e)&&!e.disabled&&Ee[e.type]&&Ee[e.type].needDimension({modifier:e,properties:n,layout:r})})}function Xe(e){var t=Pe(e),n=[],r=[],i=!1;return t.forEach(function(t){var r=Re(t);if($e({modifiers:r,properties:e})){var o=Ve(t);o&&n.push(o),i=i||Ge({modifiers:r,properties:e})}}),s(e,"qHyperCubeDef.qDimensions",[]).forEach(function(e){var t=e.qLibraryId;t&&r.push(t)}),{measureLibraryIds:n,dimensionLibraryIds:r}}function Je(e){var t=e.model,n=e.libraryIds,r=e.masterItem;return!r&&r!==de&&n&&(n.measureLibraryIds.length||n.dimensionLibraryIds.length)?(Te[t.id].masterItemSubscriber=Te[t.id].masterItemSubscriber||function(e){var t=e.model,n=e.callback,r={},i={},o={},a={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},n=s(e,"qInfo.qType");return n&&a[n]&&a[n].forEach(function(n){t[n]=s(e,n)}),JSON.stringify(t)}function c(e){var t=e.qInfo.qId;if(r[t]){var i=l(e);r[t].properties!==i&&(r[t].properties=i,"function"==typeof n&&r[t].enabled&&n(e)),r[t].enabled=!0}}function u(){Object.keys(r).forEach(function(e){i[e]||o[e]||(r[e].listener.dispose(),r[e].unbindCloseListnener(),delete r[e])})}var d=function(e,t){return e.once("closed",t),function(){return e.removeListener("closed",t)}};function f(e,i){return t.app[i](e).then(function(t){r[e]={listener:t.layoutSubscribe(c),unbindCloseListnener:d(t,function(){return e=t.id,n(de),delete r[e],void u();var e}),enabled:!1,properties:l(t.layout)}}).catch(function(){})}return{subscribe:function(e){var n=e.measureLibraryIds,a=e.dimensionLibraryIds,s=[];return function(e){var t=e.dimensionLibraryIds;i={},e.measureLibraryIds.forEach(function(e){i[e]=!0}),o={},t.forEach(function(e){o[e]=!0})}({measureLibraryIds:n,dimensionLibraryIds:a}),u(),t.app&&(Object.keys(i).forEach(function(e){i[e]&&!r[e]&&s.push(f(e,"getMeasure"))}),Object.keys(o).forEach(function(e){o[e]&&!r[e]&&s.push(f(e,"getDimension"))})),Promise.all(s)},unsubscribe:function(){Object.keys(r).forEach(function(e){r[e].listener.dispose(),r[e].unbindCloseListnener()}),r={}}}}({model:t,callback:function(e){return Oe({model:t,masterItem:e}).then(function(){return t.app.clearUndoBuffer()})}}),Te[t.id].masterItemSubscriber.subscribe(n)):Promise.resolve()}for(var Ze in BV.default=r.default,r)-1===["default"].indexOf(Ze)&&(BV[Ze]=r[Ze]);Object.defineProperty(BV,"__esModule",{value:!0})})()),gH));function vH(e){var t=e.model,n=e.properties;return e.noModelDependencies?yH.apply({model:t,properties:n}):t.modifiers?t.modifiers.apply({model:t,properties:n}):Promise.resolve()}function bH(e){return Array.isArray(e)}function xH(e){return null!=e&&!Array.isArray(e)&&"object"===kV(e)}function SH(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function wH(e){return void 0===e}function MH(e,t){if(xH(e)&&xH(t)){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n=Object.keys(e),r=0,i=n.length;r<i;r+=1)if(!MH(e[n[r]],t[n[r]]))return!1;return!0}if(bH(e)&&bH(t)){if(e.length!==t.length)return!1;for(var o=0,a=e.length;o<a;o+=1)if(!MH(e[o],t[o]))return!1;return!0}return e===t}function kH(e){var t=e.oldData,n=void 0===t?{}:t,r=e.newData,i=void 0===r?{}:r,o=e.basePath,a=void 0===o?"":o,s=[];return Object.keys(i).forEach(function(e){var t=function(e){return e?mH(!0,{},{value:e}).value:e}(i[e]),r=n[e],o="".concat(a,"/").concat(e);MH(t,r)||SH(i,e)||(wH(r)?s.push({op:"add",path:o,value:t}):xH(t)&&xH(r)?s.push.apply(s,MV(kH({oldData:r,newData:t,basePath:o}))):bH(t)&&bH(r)?s.push.apply(s,MV(function(e){var t=e.newArray,n=e.basePath,r=[];return MH(t,e.oldArray.slice())||(!wH(t[0])&&wH(t[0].qInfo)||0===t.length)&&r.push({op:"replace",path:n,value:t}),r}({oldArray:r,newArray:t,basePath:o}))):s.push({op:"replace",path:o,value:t}))}),Object.keys(n).forEach(function(e){wH(i[e])&&!SH(n,e)&&s.push({op:"remove",path:"".concat(a,"/").concat(e)})}),s}function CH(e){var t=e.model,n=kH({oldData:e.oldProperties,newData:e.newProperties});null!=t&&t.applyPatches&&null!=n&&n.length&&t.applyPatches(n.map(function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}}),!0)}function qH(e){var t=e.properties,n=e.container,r=e.filtered,i=t.color;if(i){var o=i.auto,a=i.mode;if(!o){var s,l=r.map(function(e){var r;return null===(r=t.qHyperCubeDef[n][e])||void 0===r?void 0:r.qDef.cId}).filter(function(e){return void 0!==e}),c=t.qHyperCubeDef[n].filter(function(e){return!l.includes(e.qDef.cId)});if("byDimension"===a&&"qDimensions"===n){var u=i.byDimDef;if(!u)return;var d=void 0===u.activeDimensionIndex?-1:u.activeDimensionIndex;if(d<0)return;var f=c[d];if(!f)return;if(f.qLibraryId)i.byDimDef={type:"libraryItem",key:f.qLibraryId,label:f.qLibraryId,activeDimensionIndex:d};else{var h=f.qDef,p=h.qLabelExpression||h.qFieldLabels&&h.qFieldLabels[0]||h.qFieldDefs[0],m=(s=f.qDef.qFieldDefs[0]).split(" ").length>1&&"="!==s[0]&&"["!==s[0]?"[".concat(s,"]"):s;i.byDimDef={type:"expression",key:m,label:p||m,activeDimensionIndex:d}}}if("byMeasure"===a&&"qMeasures"===n){var g=i.byMeasureDef;if(!g)return;var y=void 0===g.activeMeasureIndex?-1:g.activeMeasureIndex;if(y<0)return;var v=c[y];if(!v)return;var b=yH.measureBase.getLibraryId(v);if(b){i.byMeasureDef={type:"libraryItem",key:b,label:b,activeMeasureIndex:y};var x=yH.hasActiveModifiers({measures:[v]})?v.qDef.qDef:void 0;x&&(i.byMeasureDef.expression=x)}else{var S=v.qDef;i.byMeasureDef={type:"expression",key:S.qDef,label:S.qLabelExpression||S.qLabel||S.qDef,activeMeasureIndex:y}}}}}}function EH(e){return DH.apply(this,arguments)}function DH(){var e;return e=xV().m(function e(t){var n,r,i,o,a,s,l,c,u,d,f,h,p,m;return xV().w(function(e){for(;;)switch(e.n){case 0:if(n=t.from,r=t.to,i=t.model,o=t.container,a=t.filtered,s=t.noModelDependencies,l=t.skipAttributeExpressions,c=t.onChange,i){e.n=1;break}return e.a(2);case 1:return e.n=2,i.getEffectiveProperties();case 2:return u=e.v,d=u.qHyperCubeDef[o].findIndex(function(e){return e.qDef.cId===n}),f=u.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[o].findIndex(function(e){return e.qDef.cId===r}),h=mH(!0,{},u),p=h.qHyperCubeDef[o][d],(m=h.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[o][f]).qAttributeDimensions=p.qAttributeDimensions,p.qAttributeDimensions=[],l||(m.qAttributeExpressions=p.qAttributeExpressions,p.qAttributeExpressions=[]),h.qHyperCubeDef[o][d]=m,h.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[o][f]=p,c({fromItem:p,toItem:m,oldProperties:u,newProperties:h,model:i}),e.n=3,vH({model:i,properties:h,noModelDependencies:s});case 3:s?qH({properties:h,container:o,filtered:a}):i.colorSupport&&i.colorSupport.colorByUpdater(h,"qHyperCubeDef."),CH({model:i,oldProperties:u,newProperties:h});case 4:return e.a(2)}},e)}),DH=function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function a(e){gV(o,r,i,a,s,"next",e)}function s(e){gV(o,r,i,a,s,"throw",e)}a(void 0)})},DH.apply(this,arguments)}function TH(e){var t=e.callbacks,n=e.data,r=e.resources,i=e.settings,o=t.onChange,a=n.infos,s=n.filtered,l=r.app,c=r.model,u=r.translator,d=i.noModelDependencies,f=i.skipAttributeExpressions;return a.map(function(e,t){var n=e.cId,r=e.qGrouping,i=e.qGroupFallbackTitles,a=e.qGroupPos,h=e.qFallbackTitle,p=e.qLocked,m=e.title,g="C"===r,y="H"===r,v="N"===r,b="number"==typeof e.explicitColumn?e.explicitColumn:t,x=function(t,n){g&&l&&l.getDimension&&l.getDimension(e.qLibraryId).then(function(e){null==e||e[t](n)}).catch(function(){})};return{meta:{isCyclic:g,isDrillDown:y,isLocked:!!p,isNormal:v},info:{id:n,key:"".concat(n,"-").concat(a),text:v?h:i[a],position:a,breadcrumbs:i.slice(0,e.qGroupPos),group:{name:m,items:i.slice(0,y?e.qGroupPos+1:i.length).map(function(e,t){return{id:"".concat(n,"-item-").concat(t),text:e,current:a===t,index:t}})},tooltip:v?void 0:u.get(g?"Tooltip.dimensions.cyclic":"Tooltip.dimensions.drilldown")},action:{changeTo:function(e){var t=e.id;return EH({from:n,to:t,container:"qDimensions",model:c,filtered:s,noModelDependencies:d,skipAttributeExpressions:f,onChange:o})},drillUp:function(e){var t=e.steps;y&&c&&(null==c||c.drillUp("/qHyperCubeDef",b,t))},stepCycle:function(){return x("stepCycle",1)},setActiveField:function(e){var t=e.fieldIndex;return x("setActiveField",t)}}}})}function OH(e){var t=e.callbacks,n=e.data,r=e.resources,i=e.settings,o=t.onChange,a=n.infos,s=n.filtered,l=r.model,c=i.noModelDependencies,u=i.skipAttributeExpressions;return a.map(function(e){var t=e.cId,n=e.qFallbackTitle;return{meta:{isNormal:!0},info:{id:t,key:t,text:n},action:{changeTo:function(e){var n=e.id;return EH({from:t,to:n,container:"qMeasures",model:l,filtered:s,noModelDependencies:c,skipAttributeExpressions:u,onChange:o})}}}})}function NH(e){var t=e.callbacks,n=e.data,r=e.dock,i=e.key,o=e.rect,a=e.resources,s=e.settings,l=e.state,c=e.styling,u=function(e){var t=e.dock,n=e.rect,r={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",height:"100%"};return"left"!==t&&"right"!==t||(r.width="".concat(n.height,"px"),r.height="".concat(n.width,"px"),r.transformOrigin="top left"),"left"===t&&(r.transform="rotate(-90deg) translate(-".concat(n.height,"px, 0)")),"right"===t&&(r.transform="rotate(90deg) translate(0, -".concat(n.width,"px)")),r}({dock:r,rect:o}),d=function(e){var t=e.callbacks,n=e.data,r=e.dock,i=e.key,o=e.resources,a=e.settings,s=e.state,l=e.styling,c=n.alternatives,u=n.infos,d=o.app,f=o.cache,h=o.model,p=a.isRTL,m=a.isSnapshot,g=a.noModelDependencies,y=a.type,v=function(e){var t=e.dock;return"top"!==t&&"bottom"!==t||!e.isRTL?"ltr":"rtl"}({dock:r,isRTL:p}),b=function(e){var t=e.cache,n="axis-title-auto-focus_"+e.key;return{queueFor:function(e){var r;return null==t||null===(r=t.set)||void 0===r?void 0:r.call(t,n,{focus:!0,index:e})},shouldFor:function(e){var r,i,o=null==t||null===(r=t.get)||void 0===r?void 0:r.call(t,n),a=!(null==o||!o.focus||(null==o?void 0:o.index)!==e);return a&&(null==t||null===(i=t.set)||void 0===i||i.call(t,n,{focus:!1})),a}}}({cache:f,key:i}),x=("dimension"===y?TH:OH)({callbacks:t,data:n,resources:o,settings:a});"rtl"===v&&x.reverse();var S={allowed:{change:g?!m:!(null==h||!h.modifiers||null==h||!h.colorSupport||m),reload:!!d&&!m},hasAlternatives:!!c.length,hasCyclic:x.some(function(e){return e.meta.isCyclic}),hasMultiple:u.length>1};return x.map(function(e,t){return bV(bV({data:n,layout:{direction:v},resources:{translator:o.translator},services:{focus:b},settings:a,state:s,styling:l},e),{},{meta:bV(bV(bV({},S),e.meta),{},{index:t,isFirst:0===t,isLast:t===x.length-1})})})}({callbacks:t,data:n,dock:r,key:i,resources:a,settings:s,state:l,styling:c});return NV.jsx("div",{style:u,children:d.map(function(e){return NV.jsxs(C_.Fragment,{children:[NV.jsx(hH,{source:e}),!e.meta.isLast&&NV.jsx("span",{dir:e.layout.direction,style:bV(bV({},c.title),{},{lineHeight:"normal"}),children:", "})]},e.info.id)})})}var AH,_H='"Source Sans Pro", "Arial", "sans-serif"',IH="12px",LH=function(e){var t=e.rect,n=e.state,r=e.settings,i=r.callbacks,o=r.data,a=r.key,s=r.layout,l=r.resources,c=r.settings,u=r.style;return NH({callbacks:i,data:o,dock:s.dock,key:a,rect:t,resources:l,settings:c,state:n,styling:u})},PH={renderer:"react",require:["renderer"],disableTriggers:!0,key:"axis-title",defaultSettings:{callbacks:{onChange:function(){}},data:{alternatives:[],infos:[],filtered:[]},resources:{app:void 0,cache:void 0,model:void 0,selections:void 0,translator:void 0},settings:{isDisabled:function(){return!1},isRTL:!1,isSnapshot:!1,noModelDependencies:!1,skipAttributeExpressions:!1,type:"dimension"},style:{title:{color:"#333",fontFamily:_H,fontSize:IH},popover:{color:"#595959CC",fontFamily:_H,fontSize:IH}}},preferredSize:function(){var e=this.settings,t=e.data,n=e.settings,r=e.style,i=t.alternatives,o=n.type,a=r.title,s=a.fontSize,l=a.fontFamily,c=i.length||"measure"!==o?28:20,u=this.registries.renderer("svg")().measureText({text:"M",fontSize:s,fontFamily:l}).height;return Math.max(c,u)},created:function(){var e=this;this.state={inSelections:!1},this.listeners={onSelectionsActivated:function(){e.state.inSelections=!0,e.renderer.render(LH(e))},onSelectionsDeactivated:function(){e.state.inSelections=!1}}},beforeMount:function(){var e=this.settings.resources.selections;e&&(e.addListener("activated",this.listeners.onSelectionsActivated),e.addListener("deactivated",this.listeners.onSelectionsDeactivated),e.addListener("canceled",this.listeners.onSelectionsDeactivated))},render:function(){return LH(this)},beforeUnmount:function(){var e=this.settings.resources.selections;e&&(e.removeListener("activated",this.listeners.onSelectionsActivated),e.removeListener("deactivated",this.listeners.onSelectionsDeactivated),e.removeListener("canceled",this.listeners.onSelectionsDeactivated))}},RH=function(e){var t=e.dock,n=e.settings.label,r="center"===t,i=r?{}:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"};return NV.jsx("span",{style:i,title:n,children:r?n:"* ".concat(n)})},zH={renderer:"react",disableTriggers:!0,key:"disclaimer",defaultSettings:{settings:{isRTL:!1,label:void 0},style:{fontFamily:'"Source Sans Pro", "Arial", "sans-serif"'}},preferredSize:function(){return 22},render:function(){var e=this.rect,t=this.settings,n=t.layout,r=t.settings,i=t.style;return function(e){var t=e.dock,n=e.rect,r=e.settings,i=e.styling,o=function(e){var t=e.dock;return"top"!==t&&"bottom"!==t||!e.isRTL?"ltr":"rtl"}({dock:t,isRTL:r.isRTL}),a=function(e){var t=e.dock,n=e.rect,r={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",color:"#404040",fontStyle:"italic",fontSize:"13px",fontFamily:e.styling.fontFamily};return"left"===t&&(r.width="".concat(n.height,"px"),r.transform="rotate(-90deg) translate(-".concat(n.height,"px, 0)"),r.transformOrigin="top left"),"right"===t&&(r.width="".concat(n.height,"px"),r.transform="rotate(90deg) translate(0, -".concat(n.width,"px)"),r.transformOrigin="top left"),"center"===t&&(r.width="".concat(n.width,"px"),r.height="".concat(n.height,"px"),r.color="#404040",r.fontStyle="normal",r.fontSize="1.2em",r.textAlign="center"),"bottom"!==t&&"top"!==t||(r.justifyContent="flex-start",r.alignItems="flex-start"),r}({dock:t,rect:n,styling:i});return NV.jsx("div",{dir:o,style:a,children:NV.jsx(RH,{dock:t,settings:r})})}({dock:n.dock,rect:e,settings:r,styling:i})}},FH={},jH=function(){if(AH)return FH;AH=1;var e=ij;return FH.createRoot=e.createRoot,FH.hydrateRoot=e.hydrateRoot,FH}(),BH=bF({spacing:8,shadows:["none","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)"],transitions:{easing:{easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},duration:{standard:300,short:250,enteringScreen:225,shorter:200,leavingScreen:195,shortest:150,complex:375}},typography:{fontSize:14,fontWeightLight:300,fontWeightRegular:400,fontWeightMedium:600,fontWeightBold:700,htmlFontSize:14,fontFamily:"'Source Sans Pro', 'HelveticaNeue', 'Helvetica Neue', Helvetica, Arial, sans-serif",button:{fontWeight:600,fontSize:14,textTransform:"none"}},shape:{borderRadius:3},components:{MuiButtonBase:{defaultProps:{disableRipple:!0,disableTouchRipple:!0,focusVisibleClassName:"qcm-focus-visible"}},MuiButton:{defaultProps:{color:"inherit",disableRipple:!0,focusVisibleClassName:"qcm-focus-visible"},styleOverrides:{root:{height:"32px",lineHeight:"16px",minWidth:"24px",fontSize:141,borderRadius:3,"& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},text:{padding:"8px 16px","&:active":{backgroundColor:"rgba(0, 0, 0, 0.1)"},"&.Mui-focusVisible":{boxShadow:"inset 0 0 0 2px ".concat("#177FE6")}},outlined:{border:"1px solid rgba(0, 0, 0, 0.15)"},sizeSmall:{fontSize:12,height:"24px","& > svg:only-child, & > i:only-child":{marginLeft:"-7px",marginRight:"-7px"}},sizeLarge:{fontSize:16,height:"40px",lineHeight:"20px","& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},textSizeSmall:{padding:"4px 11px"},textSizeLarge:{padding:"10px 19px"}},variants:[]},MuiList:{styleOverrides:{padding:{paddingTop:"0px",paddingBottom:"0px"}}},MuiListItemButton:{styleOverrides:{root:{fontSize:14,height:"32px"}}},MuiListItemIcon:{styleOverrides:{root:{color:"#404040",minWidth:"16px",marginRight:"16px"}}},MuiListItemText:{styleOverrides:{root:{fontSize:"12px"},primary:{fontSize:14,color:"#404040",lineHeight:"16px",fontWeight:600},secondary:{fontSize:12,color:"#737373",fontWeight:400,lineHeight:"16px"}}}}});function VH(e){var t={x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1},margin:{left:0,top:0}},n=e||{},r=n.x,i=n.y,o=n.width,a=n.height,s=n.scaleRatio,l=n.margin;return t.x=Number.isNaN(r)||void 0===r?t.x:r,t.y=Number.isNaN(i)||void 0===i?t.y:i,t.width=Number.isNaN(o)||void 0===o?t.width:o,t.height=Number.isNaN(a)||void 0===a?t.height:a,void 0!==s&&(t.scaleRatio.x=Number.isNaN(s.x)?t.scaleRatio.x:s.x,t.scaleRatio.y=Number.isNaN(s.y)?t.scaleRatio.y:s.y),void 0!==l&&(t.margin.left=Number.isNaN(l.left)?0:l.left,t.margin.top=Number.isNaN(l.top)?0:l.top),t}function HH(){var e={rendererBox:VH(),container:void 0,root:void 0},t=function(){var t,n;null===(t=e.root)||void 0===t||t.unmount(),null===(n=e.container)||void 0===n||null===(n=n.parentElement)||void 0===n||n.removeChild(e.container),e.container=void 0};return{size:function(t){return t&&(e.rendererBox=VH(t)),e.rendererBox},element:function(){return e.container},appendTo:function(t){return e.container||(e.container=document.createElement("div"),e.container.style.position="absolute",e.container.style["-webkit-font-smoothing"]="antialiased",e.container.style["-moz-osx-font-smoothing"]="antialiased",e.container.style.pointerEvents="none",e.root=jH.createRoot(e.container)),t.appendChild(e.container),e.container},setKey:function(t){e.container&&e.container.setAttribute("data-key",t)},render:function(t){if(!e.container)return!1;var n=e.rendererBox,r=n.scaleRatio.x,i=n.scaleRatio.y;return e.container.style.left="".concat(Math.round(n.margin.left+n.x*r),"px"),e.container.style.top="".concat(Math.round(n.margin.top+n.y*i),"px"),e.container.style.width="".concat(Math.round(n.width),"px"),e.container.style.height="".concat(Math.round(n.height),"px"),e.container.style.transform="scale(".concat(r,", ").concat(i,")"),e.container.style.transformOrigin="top left",e.root.render(function(e){var t=e.nodes;return NV.jsx(C_.StrictMode,{children:NV.jsx(zF,{theme:BH,children:t})})}({nodes:t})),!0},findShapes:function(){return[]},itemsAt:function(){return[]},clear:function(){t()},destroy:function(){t()}}}const $H={getDefaultSettings:({size:e=10,fill:t="#999",alignment:n}={})=>({show:!0,type:"n-polygon",fill:t,stroke:"#000",strokeWidth:0,size:e,sides:3,startAngle:-90,alignment:n}),createOob({oob:e,dockValue:t,boxCenter:n,rendWidth:r,rendHeight:i,flipXY:o,symbol:a}){let s="x",l="y",c=r,u=i,d=t<.5?90:-90;return o&&(s="y",l="x",c=i,u=r,d=t<.5?180:0),a(kg({},e,{[s]:n*c,[l]:u-Math.max(e.size/2,Math.min(t*u,u-e.size/2)),startAngle:d}))}};function WH({i:e,width:t,height:n,resolved:r,keys:i,flipXY:o,calcKey:a="box"}){let s,l=null,c=null;void 0!==r.major.settings.binStart?(l=r.major.items[e].binStart,c=r.major.items[e].binEnd,s=r.major.settings.binStart.scale):(s=r.major.settings.major.scale,l=s?r.major.items[e].major:0);let u=0;s?s.bandwidth?(u=s.bandwidth(),l-=u/2):u=c-l:u=1;const d=kg({},{major:l,majorEnd:c},r.minor.items[e]);i.forEach(t=>{d[t]=r[t].items[e]});const f=o?n:t,h=function({bandwidth:e,width:t,minWidthPx:n,maxWidthPx:r,maxMajorWidth:i}){const o=e>=0?1:-1;let a=Math.min(o*e*t,Number.isNaN(Number(r))?i:r/i);return a=Number.isNaN(Number(n))?a:Math.max(n/i,a),a*o}({bandwidth:u,width:d[a].width,minWidthPx:d[a].minWidthPx,maxWidthPx:d[a].maxWidthPx,maxMajorWidth:f}),p=(u-h)/2,m=p+d.major+h/2;return{item:d,boxCenter:m,boxWidth:h,boxPadding:p,rendWidth:t,rendHeight:n}}function UH({keys:e,data:t,defaultSettings:n,style:r,settings:i,width:o,height:a,resolver:s}){const l=kg(!0,{},n||{},r||{}),c={major:"horizontal"===i.orientation?a:o,minor:"horizontal"===i.orientation?o:a},u=i.major;let d;d="object"==typeof u&&"object"==typeof u.ref&&void 0!==u.ref.start&&void 0!==u.ref.end?s.resolve({data:t,defaults:{start:0,end:1},scaled:c,settings:kg(!0,{},{binStart:{scale:i.major.scale,ref:i.major.ref.start},binEnd:{scale:i.major.scale,ref:i.major.ref.end}})}):"object"==typeof u&&void 0!==u.binStart&&void 0!==u.binEnd?s.resolve({data:t,defaults:{start:0,end:1},scaled:c,settings:kg(!0,{},{binStart:{scale:i.major.scale,ref:"binStart"},binEnd:{scale:i.major.scale,ref:"binEnd"}},i.major)}):s.resolve({data:t,scaled:c,defaults:{major:.5},settings:{major:i.major}});const f=i.minor||{};let h;const p={major:d,minor:s.resolve({data:t,defaults:{start:0,end:1},scaled:c,settings:kg(!0,{},{start:{scale:f.scale,ref:"start"},end:{scale:f.scale,ref:"end"},min:{scale:f.scale,ref:"min"},max:{scale:f.scale,ref:"max"},med:{scale:f.scale,ref:"med"}},f)})};for(let n=0,r=e.length;n<r;n++)h=e[n],p[h]=s.resolve({data:t,defaults:l[h],settings:i[h],scaled:c});return p}const YH=["oob"];const KH={require:["chart","resolver","symbol"],defaultSettings:{settings:{size:10},data:{},style:{}},created(){this.state={}},preferredSize(){return this.settings.settings.size},render(){const{width:e,height:t}=this.rect,{dockValue:n}=this.settings.settings,r="horizontal"===this.settings.settings.orientation,{data:i,style:o,resolver:a,symbol:s}=this,l=UH({keys:YH,data:i,defaultSettings:{oob:$H.getDefaultSettings()},style:o,settings:this.settings.settings,width:e,height:t,resolver:a}),{settings:c,items:u}=l,d=function({width:e,height:t,flipXY:n,resolved:r,keys:i,symbol:o,dockValue:a,_calcItemRenderingOpts:s=WH}){const l=[],{items:c}=r.major;for(let u=0,d=c.length;u<d;u++){const{item:d,boxCenter:f,rendWidth:h,rendHeight:p}=s({i:u,width:e,height:t,resolved:r,keys:i,flipXY:n,calcKey:"oob"}),m=c[u].data,g=[];if(d.oob.show){g.push($H.createOob({oob:d.oob,dockValue:a,boxCenter:f,rendWidth:h,rendHeight:p,flipXY:n,symbol:o}));const e={type:"container",data:m,collider:{type:"bounds"},children:g};l.push(e)}}return l}({width:e,height:t,flipXY:r,resolved:l,keys:YH,symbol:s,dockValue:n});return d}},GH={size:25,hat:{show:!0,fill:"#999",stroke:"#000",strokeWidth:0,strokeLinejoin:"miter",width:1,maxWidthPx:void 0,minWidthPx:1,minHeightPx:1,alignment:0}},XH=["hat"];function JH(e,t=!0){let n="";for(let t=0;t<e.length;t++){const r=e[t];n+=0===t?`M${r.x} ${r.y}`:`L${r.x} ${r.y}`,n+=" "}return t&&(n+="Z"),n}function ZH({item:e,boxWidth:t,boxPadding:n,rendWidth:r,rendHeight:i,flipXY:o}){let a="x",s="y",l=r,c=i,u=e.hat.alignment||0;o&&(a="y",s="x",l=i,c=r,u=1-u);const d=(n+e.major)*l;let f=[{[a]:d,[s]:0+c},{[a]:d+t*u*l,[s]:8},{[a]:d+t*l,[s]:0+c},{[a]:d+t*l,[s]:0+c+10},{[a]:d,[s]:0+c+10}];const h=kg({},e.hat,{type:"path",d:JH(f)});f=[{[a]:d,[s]:0},{[a]:d+t*(1-u)*l,[s]:0+c-8},{[a]:d+t*l,[s]:0},{[a]:d+t*l,[s]:-10},{[a]:d,[s]:-10}];return[h,kg({},e.hat,{type:"path",d:JH(f)})]}const QH={require:["chart","resolver","symbol"],defaultSettings:{settings:{size:25},data:{},style:{hat:"$shape"}},created(){this.state={}},preferredSize(){return this.settings.settings.size},render(){const{width:e,height:t}=this.rect,n="horizontal"===this.settings.settings.orientation,{data:r,style:i,resolver:o}=this,a=UH({keys:XH,data:r,defaultSettings:GH,style:i,settings:this.settings.settings,width:e,height:t,resolver:o}),{settings:s,items:l}=a,c=function({width:e,height:t,flipXY:n,resolved:r,keys:i,_calcItemRenderingOpts:o=WH}){const a=[],{items:s}=r.major;for(let l=0,c=s.length;l<c;l++){const{item:c,boxWidth:u,boxPadding:d,rendWidth:f,rendHeight:h}=o({i:l,width:e,height:t,resolved:r,keys:i,flipXY:n,calcKey:"hat"}),p=s[l].data,m=[];c.hat.show&&m.push(...ZH({item:c,boxWidth:u,boxPadding:d,rendWidth:f,rendHeight:h,flipXY:n}));const g={type:"container",data:p,collider:{type:"bounds"},children:m};a.push(g)}return a}({width:e,height:t,flipXY:n,resolved:a,keys:XH});return c}};var e$={defaultSettings:{settings:{size:10}},preferredSize(){return this.settings.settings.size},render:()=>[]};function t$(e,t,n,r){const i=function(t){const n=String(t);return e(n)};return i.ticks=()=>t.map(t=>{const o=i([t.data.value,r?n-1:0]),a=i([t.data.value,r?0:n-1])+e.bandwidth();return{position:(o+a)/2,label:t.label,data:t.data,start:o,end:a}}),i.bandwidth=()=>e.bandwidth(),i.data=()=>e.data(),i.domain=()=>e.domain(),i.pxScale=function(r){const i=e.pxScale(r);return i===e?this:t$(i,t,n)},i}function n$(e){const t=e.scale("band");e.scale("group-by-measure",function(e={},n={},r={}){const i=t(e,n,r),o=i.domain(),a=i.ticks(),s=[],l=e.measureCount;return o.forEach((e,t)=>{for(let t=0;t<l;++t)s.push(String([e,t]));s.push(`SPACER_${t}_SPACER`)}),s.splice(-1),i.domain(s),t$(i,a,l,e.invert)})}function r$(){const e=Sp();return e.use(dg),e.use(function(e){if("function"!=typeof e.interaction)return t=>{t.interaction("hammer",pg(e))};e.interaction("hammer",pg(Hammer))}(wg)),e.use(n$),e.renderer("react-qcm",HH),e.component("box-sliced-hat",QH),e.component("box-out-of-bounds",KH),e.component("disclaimer",zH),e.component("scrollbar",b_),e.component("scroll-hint",VO),e.component("reference-line-labels",UN),e.component("axis-overlay",dT.picassoComponents.axisOverlay),e.component("time-axis",dT.picassoComponents.timeAxis),e.component("space",e$),e.component("axis-title",PH),e.component("point-label",Sv),e.scale("q-time-axis",dT.picassoScales.time),e}const i$={CUSTOM:{EXPRESSION:"customTooltipExpression",TITLE:"customTooltipTitle",DESCRIPTION:"customTooltipDescription",QUARANTINE:"customTooltip",IMAGES:"customTooltipImages"},CHART:{CONTAINER_ID:"tooltipContainerId",STATE:"customTooltipSessionState",CHART_OBJECT_ID:"customTooltipSessionObjectId",CHART_PARENT_TYPE:"TooltipChartParent",CHART_CHILD_TYPE:"TooltipChart",STYLE:{small:"140px",medium:"200px",large:"340px"}}};function o$(e){const t=e.split("/");return"qmem:"===t[0]&&""===t[1]}const a$={getImageSize(e,t){let n;function r(){n&&(clearTimeout(n),n=null)}function i(e){const t=e;t.onload=null,t.onerror=null,r()}const o={small:50,medium:200,large:340,original:340};return new Promise(a=>{const s=new Image;s.referrerPolicy="no-referrer",s.onload=()=>{let e;const{height:n,width:l}=s,c=o[t]*(n>l?1:n/l),u=o[t]*(l>n?1:l/n);!n||!l||0===n&&0===l?(e={height:20,width:20,imageError:!0},i(s)):"original"===t?(e={height:Math.min(c,n),width:Math.min(u,l)},r()):(e={height:c,width:u},r()),a(e)},s.onerror=()=>{i(s),a({height:20,width:20,imageError:!0})},s.src=e,n=setTimeout(()=>{i(s),a({height:20,width:20,imageError:!0})},3e3)})}};async function s$(e,t,n){let r=e.ref.qStaticContentUrl.qUrl;const i=function(e){let t,n,r,i,o,a;if(e&&(e.session?.options||e.enigmaModel?.session?.sessionConfig||e.session?.config?.url)){if(t=e.session.options||e.enigmaModel?.session.sessionConfig,!t){t=e.session?.config;const n=new URL(t.url);t.host=n.hostname,t.port=n.port,t.isSecure="wss:"===n.protocol}return a=void 0!==t.secure?t.secure:t.isSecure,n=a?"https://":"http://",r=t.host||"localhost",i=t.port?`:${t.port}`:"",o=t.prefix?t.prefix:"/","/"!==o[o.length-1]&&(o=`${o}/`),n+r+i+o}return""}(n);i&&(!function(e,t){const n=e.replace(t,"").replace(/^\.\.\//i,"/");n[0]}(r,i),r=r.replace(/"/g,'\\"'),r=r.replace(/'/g,"\\'"),r=function(e,t){return t+("/"===e[0]?e.substr(1):e)}(r,i));const{height:o,width:a,imageError:s}=await a$.getImageSize(r,t);return{src:r,size:t,height:o,width:a,imageError:s}}async function l$(e,t,n,r){const{app:i,flags:o}=t,a=e.layout?.tooltip?.imageComponents;if(!a)return[];const[s]=a,l=s.size||"small",c=s.type||"media";let u=-1;for(let e=0;e<n.length;e++)if(n[e].cId===s.cId){u=e;break}const d=r.data?.customTooltipAttrExps?.value||[];let f;if(-1!==u&&d[u]&&(f=d[u]),"media"===c&&s.ref?.qStaticContentUrl?.qUrl)return s$(s,l,i);if("url"===c)return async function(e,t,n,r,i){let o,a=n.ref;if(i&&i.label&&(a=i.label),t.isEnabled("IMAGE_BUNDLE_LOAD")&&e?.getImage&&o$(a))try{const t=`data:image/png;base64, ${await e.getImage(a)}`,{height:n,width:i,imageError:s}=await a$.getImageSize(t,r);o={src:t,size:r,height:n,width:i,imageError:s}}catch{}else{const{height:e,width:t,imageError:n}=await a$.getImageSize(a,r);o={src:a,size:r,height:e,width:t,imageError:n}}return o}(i,o,s,l,f);if(o.isEnabled("IMAGE_BUNDLE_LOAD")&&"field"===c&&f&&f.label){return async function(e,t,n,r){let i;const o=r.label,a=`qmem://${t.qFallbackTitle}/${o}`;if(o$(a))try{const t=await e.getImage(a);if(t){const e=`data:image/png;base64, ${t}`,{height:r,width:o,imageError:a}=await a$.getImageSize(e,n);i={src:e,size:n,height:r,width:o,imageError:a}}}catch{}return i}(i,n[u],l,f)}return[]}const c$={async addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){const i=t,o=[];for(let t=0;t<i.length;t++)o.push(l$(e,r,n,i[t]));const a=await Promise.all(o);for(let e=0;e<i.length;e++)i[e].data.customTooltipImages=[a[e]];return i},checkIfPromisesExist({customTooltipModel:e}){const t=e.layout?.tooltip?.imageComponents;return!!t&&t.length>0}},u$={async handlePromises({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){let i=t;return i=await c$.addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}),i},checkIfPromisesExist:({customTooltipModel:e})=>c$.checkIfPromisesExist({customTooltipModel:e})};const d$=(e,t)=>{const n=e?.qHyperCubeDef?.qDimensions,r=e?.qHyperCubeDef?.qMeasures,i=e?.qHyperCubeDef?.qInterColumnSortOrder,o=t;return{qInfo:{qType:i$.CHART.CHART_PARENT_TYPE,qId:i$.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:n,qMeasures:r,qInterColumnSortOrder:i,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:o}},f$=e=>{const t=e.tooltip?.chart?.object?.refId;return{qInfo:{qType:i$.CHART.CHART_CHILD_TYPE},qExtendsId:t}};const h$={createContainer:({ctx:e,layout:t})=>{if(!(t.qHyperCube?.qDimensionInfo?.length<=0))return function(e,t){const n=t.tooltip?.chart?.style?.size??"medium",r=i$.CHART.STYLE[n];return[{content:[e.h("div",{style:{display:"flex",width:r,height:r,backgroundColor:"#FFFFFF",borderRadius:"5px",padding:"2px",color:"#595959"},colspan:2,id:i$.CHART.CONTAINER_ID})],colspan:2,style:{"text-align":e.rtl?"right":"left","max-width":r}},{}]}(e,t)},show:async({app:e,properties:t,selectedNodes:n,dimIndex:r,customTooltipModel:i,rtl:o})=>{const a=i,s=t?.tooltip?.chart?.object?.refId;if(a?.embed&&e.removeSessionAlternateState&&e.addSessionAlternateState&&s&&!(t.qHyperCubeDef.qDimensions.length<=0)){await h$.hide({app:e,customTooltipModel:i});try{await async function({app:e,properties:t,customTooltipModel:n}){const r=n,i=i$.CHART.STATE,o=t.qStateName;r.miniChartToken.alternateState||(r.miniChartToken.alternateState=i,await e.addSessionAlternateState(i,o),r.miniChartToken.alternateState=i)}({app:e,properties:t,customTooltipModel:i});const s=await async function({app:e,properties:t,customTooltipModel:n}){const r=n;r.miniChartToken.sessionObj?.id&&await e.destroySessionObject(r.miniChartToken.sessionObj.id);const i=i$.CHART.STATE,o=d$(t,i),a=await e.createSessionObject(o),s=f$(t);if(a.id!==i$.CHART.CHART_OBJECT_ID)return void e.destroySessionObject(a.id);r.miniChartToken.sessionObj=a;const l=await a.createChild(s);if(r.miniChartToken.sessionObj&&r.miniChartToken.sessionObj.id===a.id)return r.miniChartToken.model=l,l;e.destroySessionObject(a.id)}({app:e,properties:t,customTooltipModel:i});if(a.miniChartToken.alternateState&&a.miniChartToken.sessionObj&&s){const e=n.length>0&&void 0!==n[0].data?.value?[n[0].data?.value]:[],s=void 0!==r?r:t.qHyperCubeDef.qDimensions.length-1;if(2===t.qHyperCubeDef.qDimensions.length&&void 0===r&&n.length>0){const e=n[0].data.selectionOuterDimension??n[0].data.selectionDimension;if(e?.source?.field){const t=e?.source?.field.split("/"),n=t[t.length-1],r=void 0!==e.value?[e.value]:[];r.length>0&&void 0!==n&&a.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",Number(n),r,!1)}}e.length>0&&a.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",s,e,!1);const l=document.getElementById(i$.CHART.CONTAINER_ID),c={direction:o?"rtl":"ltr",isReadonly:!0,isPopover:!0,navigation:!1,selections:!1};a.miniChartToken.vis=await i.embed.render({element:l,model:a.miniChartToken.model,options:c,id:a.miniChartToken.model?.id,type:a.miniChartToken.model?.genericType})}}catch{await h$.hide({app:e,customTooltipModel:i})}}},hide:async({app:e,customTooltipModel:t})=>{const n=t;n?.embed&&(h$.destroyVisualization({customTooltipModel:t}),await e.destroySessionObject(i$.CHART.CHART_OBJECT_ID),n.miniChartToken.sessionObj=void 0,await async function({app:e,customTooltipModel:t}){const n=t,r=i$.CHART.STATE;n.miniChartToken.alternateState=void 0,await e.removeSessionAlternateState(r)}({app:e,customTooltipModel:t}))},destroyVisualization:({customTooltipModel:e})=>{const t=e;"function"==typeof t.miniChartToken?.vis?.destroy&&(t.miniChartToken.vis.destroy(),t.miniChartToken.vis=void 0)}};function p$(e){const t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function m$(){const{EXPRESSION:e,TITLE:t,DESCRIPTION:n,IMAGES:r}=i$.CUSTOM,i={};return i[e]=!0,i[t]=!0,i[n]=!0,i[r]=!0,i}function g$(e){const t=m$();return e.filter(e=>t[e.id])}const y$={getNodes(e,t){const n=function(e,t){let n=0,r=0;e.center?(n+=e.center.x,r+=e.center.y):(n+=e.clientX,r+=e.clientY);const i=t.element.getBoundingClientRect();return{cx:n-i.left,cy:r-i.top}}(e,t);return t.shapesAt({x:n.cx,y:n.cy})},getDataNodes(e,t){let n,r=[];const i={container:{bar:!0,"bullet-axis":!0},circle:{"point-component":!0}};return t.forEach(t=>{const o=t.data?.selectionDimension??t.data;if(!o||t.data?.customTooltipAttrExps||i[t.type]){if(t.data?.customTooltipAttrExps&&!t.data.customTooltipImages){const e=t;e.data.customTooltipImages=[],r.push(e)}}else{n||(n=[],Object.keys(i).forEach(t=>{n=n.concat(e.findShapes(t).filter(e=>e.data&&e.data.customTooltipAttrExps&&!e.data.customTooltipImages&&i[t][e.key]))}));const t=n.filter(e=>{const t=e.data.stack??e.data.selectionOuterDimension??e.data.selectionDimension;return t&&t.value===o.value&&t.label===o.label});t.length>0&&(r=r.concat(t[0]))}}),r},displayTooltip(e,t,{nodes:n,opts:r={},customTooltipModel:i,extractedNodes:o=[],hide:a}){if(i&&!a){const{layout:a,chart:s}=i,{attrExps:l}=y$.getAttrExprData(a);o.length||n.length?u$.handlePromises({customTooltipModel:i,nodes:y$.getDataNodes(s,o.length>0?o:n),attrExps:l,opts:r}).then(()=>{t.emit("show",e,n.length?{nodes:n}:void 0)}):t.emit("show",e,n.length?{nodes:n}:void 0)}else i?.miniChartToken?.alternateState&&h$.hide({app:r.app,customTooltipModel:i}),t.emit("hide")},checkIfPromisesExist:({customTooltipModel:e})=>u$.checkIfPromisesExist({customTooltipModel:e}),getAttrExps(e,t){const n=t,r=e.qHyperCubeDef?.qDimensions?"qAttributeExpressions":"qAttrExprInfo";return n[r]||(n[r]=[]),n[r]},getAttrExprData(e){let t=[],n="";const r=e.qHyperCube?.qDimensionInfo||[];if(r.length>0){const i=r.length-1;t=e.qHyperCube?.qDimensionInfo?.[i]?.qAttrExprInfo||[],n=`qDimensionInfo/${i}/qAttrExprInfo`}return{attrExps:t,fieldPath:n}},quarantineCustomTooltipAttrs(e,t={}){const n=e.qLayoutExclude?.quarantine?.[i$.CUSTOM.QUARANTINE];if(!n){!function(e,t){const n=t;let r=n.qLayoutExclude;r||(n.qLayoutExclude={quarantine:{}},r=n.qLayoutExclude),r.quarantine||(r.quarantine={}),r.quarantine[i$.CUSTOM.QUARANTINE]=[],e.forEach(e=>{r.quarantine[i$.CUSTOM.QUARANTINE].push(e)}),n.qLayoutExclude=r}(g$(t.qAttributeExpressions||[]),e)}},unquarantineCustomTooltipAttrs(e){const t=e,n=e.qLayoutExclude?.quarantine?.[i$.CUSTOM.QUARANTINE];n&&delete t.qLayoutExclude.quarantine[i$.CUSTOM.QUARANTINE]},setAttrsFromQuarantine(e,t){const n=p$(e);if(!n)return;const r=void 0!==t?t:n.length-1;if(!n[r])return;const i=this.getAttrExps(e,n[r]);if(0===g$(i).length){const t=e.qLayoutExclude?.quarantine?.customTooltip||[],n=[...i,...t],o=e;o.qHyperCubeDef?o.qHyperCubeDef.qDimensions[r].qAttributeExpressions=n:o.qHyperCube.qDimensionInfo[r].qAttrExprInfo=n}},moveCustomTooltipAttrs(e,t={},n=void 0){let r=[];const i=p$(e)||[];[...i,t].forEach(e=>{const t=g$(e.qAttributeExpressions||[]);t.length>0&&(r=t)});const o=m$(),a=i.map(e=>{const t=e,n=e.qAttributeExpressions||[];return t.qAttributeExpressions=n.filter(e=>!o[e.id]),t}),s=void 0!==n?n:a.length-1;a.length>0&&(a[s].qAttributeExpressions=a[s].qAttributeExpressions.concat(r));const l=e;e.qHyperCubeDef?l.qHyperCubeDef.qDimensions=a:l.qHyperCube.qDimensionInfo=a},addCallbackCustomTooltip(e){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e):(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},moveCallbackCustomTooltip(e,t){1===e.qHyperCubeDef.qDimensions.length&&(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e)),e.qHyperCubeDef.qDimensions.length>1&&this.moveCustomTooltipAttrs(e,t)},removeCallbackCustomTooltip(e,t){e.qHyperCubeDef.qDimensions.length>0?this.moveCustomTooltipAttrs(e,t):this.quarantineCustomTooltipAttrs(e,t)},replaceCallbackCustomTooltip(e,t){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e,t):(this.quarantineCustomTooltipAttrs(e,t),this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},shouldIgnoreDefaultRows:e=>e.tooltip?.hideBasic||0,DEBOUNCE_THRESHOLD:50,getFooterRow:(e,t)=>[{content:e,style:{"font-style":"italic","font-size":"12px","line-height":"16px",color:"rgba(255, 255, 255, 0.6)","text-align":t?"right":"left",direction:FT.detectTextDirection(e)},colspan:2},{}],getImageRow(e,t){const n=FT.detectTextDirection(e.src),r=[],i={style:{display:"block","margin-left":"auto","margin-right":"auto",overflow:"hidden",width:e.width,height:e.height}};if("original"===e.size||e.imageError){r.push(t.h("span",{style:{display:"inline-block",height:"100%","vertical-align":"middle"}}));const n=e.imageError?`${e.src}?${Math.random()}`:e.src;r.push(t.h("img",{style:{"max-width":e.width,"max-height":e.height,"vertical-align":"middle"},src:n,referrerpolicy:"no-referrer"})),i.style["text-align"]="center",i.style["white-space"]="nowrap"}else i.style["background-size"]="contain",i.style["background-repeat"]="no-repeat",i.style["background-position"]="center",i.style["background-image"]=`url('${e.src}')`;return[{content:[t.h("div",i,r),""],style:{"text-align":t.rtl?"right":"left",direction:n,"max-width":e.width},colspan:2},{}]}};function v$({layout:e,app:t,picasso:n,model:r,chart:i,translator:o,localeInfo:a,embed:s}){return{layout:e,app:t,picasso:n,model:r,chart:i,translator:o,localeInfo:a,useCustomTooltip:e.tooltip&&!e.tooltip.auto,utils:y$,miniChartToken:{},embed:s}}function b$(e,t,n,r){const i=t.qHyperCube?.[n]?.[r]?.qAttrExprInfo||[],o=[],a=e.qSubNodes&&e.qSubNodes[r]?e.qSubNodes[r].qAttrExps:e.qAttrExps;return a?(i.forEach((e,t)=>{const i=a.qValues&&a.qValues[t]?a.qValues[t]:void 0,s=void 0===i?"NaN":function(e,t){let n;switch(e.id){case i$.CUSTOM.EXPRESSION:n="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case i$.CUSTOM.TITLE:case i$.CUSTOM.DESCRIPTION:case i$.CUSTOM.IMAGES:n=void 0===t.qText?e.qFallbackTitle:t.qText;break;default:n="NaN"}return n}(e,i);o.push({source:{key:"qHyperCube",field:`${n}/${r}/qAttrExprInfo/${t}`},label:s,value:"value"})}),o):o}const x$={getNode(e,{dimensionCount:t}){if(!t||t<1)return;const n=t-1,r="qDimensionInfo";return{field:`${r}/${n}`,value:t=>b$(t,e,r,n)}}};const S$={getCustomAttrExps(e,t,n){const r={customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]},i=t.data?.customTooltipAttrExps?.value||[];if(Number.isNaN(i))return r;return function(e,t,n,r){const i={[i$.CUSTOM.TITLE]:!0,[i$.CUSTOM.DESCRIPTION]:!0},{attrExps:o,fieldPath:a}=y$.getAttrExprData(e);return 0===t.length||0===o.length||""===a||o.forEach((e,o)=>{const s=t[o];if(e.id===i$.CUSTOM.EXPRESSION&&s){const t=e.qFallbackTitle,i="NaN"===s.value||e.isCustomFormatted?s.value:n("qHyperCube").field(`${a}/${o}`).formatter()(s.value);r.customTooltipAttrExpsArr.push({label:t,value:i})}else if(i[e.id]&&s){const t="-"!==s.value&&"NaN"!==s.value?s.value:s.label;t&&"undefined"!==t&&r.customTooltipInfoAttrExpsArr.push({...e.id===i$.CUSTOM.TITLE&&{title:t},value:t,id:e.id})}}),r}(n,i.map(t=>jT.getMeasure(e,t)),e,r)}};function w$({nodes:e,layout:t,dataset:n}){const r=function(e,t,n){const r=[];return e.forEach(e=>{r.push(S$.getCustomAttrExps(n,e,t))}),r}(e,t,n);return r.reduce((e,t)=>({customTooltipAttrExpsArr:e.customTooltipAttrExpsArr.concat(t.customTooltipAttrExpsArr),customTooltipInfoAttrExpsArr:e.customTooltipInfoAttrExpsArr.concat(t.customTooltipInfoAttrExpsArr)}),{customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]})}function M$(e){const t=i$.CUSTOM.EXPRESSION,{qNumFormat:n,qLabel:r,qLabelExpression:i,cId:o}=e.qDef;return e.qLibraryId?{qLibraryId:e.qLibraryId,id:t,qNumFormat:n,qLabel:r,qLabelExpression:i,cId:o}:{qExpression:e.qDef.qDef,id:t,qNumFormat:n,qLabel:r,qLabelExpression:i,cId:o}}function k$(e){const t=e.qHyperCubeDef?.qDimensions;return t[t.length-1].qAttributeExpressions||[]}const C$={migrateProperties(e){const t=kg(!0,{},e),n=t.tooltip?.data?.qHyperCubeDef?.qMeasures||[];let r=k$(t);return r=function(e,t){return t.concat(e.map(e=>M$(e)))}(n,r),function(e,t){const n=t.qHyperCubeDef?.qDimensions;n[n.length-1].qAttributeExpressions=e}(r,t),delete t.tooltip?.data,t},getPatches(e){const t=e.tooltip?.data?.qHyperCubeDef?.qMeasures||[],n=e.qHyperCubeDef?.qDimensions.length-1,r=function(e,t,n){let r=e.length;const i=[];return t.forEach(e=>{const t=M$(e),o=JSON.stringify(t);i.push({qPath:`/qHyperCubeDef/qDimensions/${n}/qAttributeExpressions/${r}`,qOp:"add",qValue:o}),r++}),i.push({qPath:"/tooltip/data",qOp:"remove"}),i}(k$(e),t,n);return r},checkForBackwardCompatibility:(e,t)=>(e.qMeasureInfo||[]).length>0&&t.length>0,updateProperties(e,t){const n=new Promise(n=>{const r=t.qHyperCube?.qDimensionInfo||[],i=t.tooltip?.data?.qHyperCube||{},o=t.qMeta?.privileges?.includes("update");e&&e.getEffectiveProperties&&this.checkForBackwardCompatibility(i,r)&&e.getEffectiveProperties().then(t=>{if(o){const r=this.migrateProperties(t);e.setProperties(r).then(()=>{e.app.clearUndoBuffer(),n(!0)})}else{const r=this.getPatches(t);e.applyPatches(r,!0).then(()=>{e.app.clearUndoBuffer(),n(!0)})}}),n(!1)});return n}};var q$={attrExpr:C$};const{CUSTOM:E$}=i$;function D$({flags:e,layout:t,app:n,model:r,picasso:i,chart:o,translator:a,localeInfo:s,embed:l,options:c}){const u={properties:void 0},d=v$({layout:t,app:n,model:r,picasso:i,chart:o,translator:a,localeInfo:s,embed:l}),f="rtl"===c.direction,h=()=>{const e=!!u.properties?.qHyperCubeDef?.qDimensions.some(e=>e.qCalcCondition?.qCond?.qv);return!(!t.tooltip||t.tooltip.auto||e)};return{setProperties:e=>{u.properties=e},isEnabled:()=>h(),hideBasic:()=>h()&&Zx(t,"tooltip.hideBasic",!1),getAttributes:({dataset:e,nodes:n})=>{const r=w$({dataset:e,nodes:n,layout:t});return{title:r.customTooltipInfoAttrExpsArr.find(e=>e.id===E$.TITLE)?.title,description:r.customTooltipInfoAttrExpsArr.find(e=>e.id===E$.DESCRIPTION)?.value,measures:r.customTooltipAttrExpsArr}},hasImages:()=>y$.checkIfPromisesExist({customTooltipModel:d}),createImageRow:({value:e,h:t})=>y$.getImageRow(e,{h:t,rtl:f}),addImages:({nodes:r})=>{const i=y$.getDataNodes(o,r),{attrExps:a}=y$.getAttrExprData(t);return u$.handlePromises({customTooltipModel:d,nodes:i,attrExps:a,opts:{flags:e,app:n}})},chart:{isEnabled:()=>!!(h()&&t.tooltip?.chart?.object?.refId&&l&&"function"==typeof r?.getEffectiveProperties),hasLimitation:()=>!!n?.isInModalSelection?.(),createContainer:({h:e})=>h$.createContainer({layout:t,ctx:{h:e,rtl:f}}),createLimitationRow:()=>y$.getFooterRow(a.get("properties.tooltip.notselectedmessage"),f),show:({nodes:e,properties:t})=>h$.show({app:n,properties:t,selectedNodes:e,customTooltipModel:d,rtl:f}),hasAlternateState:()=>!!d.miniChartToken?.alternateState,hide:()=>h$.hide({app:n,customTooltipModel:d}),destroy:()=>h$.destroyVisualization({customTooltipModel:d})}}}var T$=7005;const O$=e=>e.qError?.qErrorCode!==T$,N$=e=>{if(e.qHyperCubeDef.qDimensions.length>1&&1===e.qHyperCubeDef.qMeasures.length){const t=e.qHyperCubeDef.qInterColumnSortOrder.indexOf(0);0!==t&&ST.moveArrayElement(e.qHyperCubeDef.qInterColumnSortOrder,t,0)}},A$=(e,t)=>{t>10?1!==e.qHyperCubeDef.qInterColumnSortOrder[0]&&ST.moveArrayElement(e.qHyperCubeDef.qInterColumnSortOrder,1,0):0!==e.qHyperCubeDef.qInterColumnSortOrder[0]&&ST.moveArrayElement(e.qHyperCubeDef.qInterColumnSortOrder,1,0)},_$=e=>{if(!e.qHyperCubeDef)return;const t=e.qHyperCubeDef.qDimensions,n=e.qHyperCubeDef.qMeasures;1===t.length&&1===n.length&&(n[0].qSortBy.qSortByNumeric=-1,e.qHyperCubeDef.qInterColumnSortOrder.splice(0,e.qHyperCubeDef.qInterColumnSortOrder.length,1,0))},I$=(e,t)=>{const n=e.qHyperCubeDef.qDimensions,r=e.qHyperCubeDef.qMeasures;if(1===n.length&&1===r.length){const r=n[0];return r.qLibraryId?t.getDimension(r.qLibraryId).then(e=>e.getLayout()).then(t=>{if(t&&t.qDimInfos&&t.qDimInfos[0]){const n=t.qDimInfos[0].qCardinal;A$(e,n)}return r}):t.getField(r.qDef.qFieldDefs[0]).then(t=>t.getCardinal().then(t=>(A$(e,t),r)),()=>r)}return N$(e),Promise.resolve()};function L$(e){const t=e.qHyperCubeDef.qDimensions,n=e.qHyperCubeDef.qMeasures,{color:{mode:r}}=e;t.length>1&&e.color?eS(e,"color.persistent",!0):"byDimension"===r&&n.length>1?eS(e,"color.mode","byMultiple"):"byExpression"===r&&0===n.length?eS(e,"color.mode","primary"):0===t.length&&n.length>0&&(eS(e,"color.byMeasureDef",void 0),eS(e,"color.byDimDef",void 0),1===n.length&&"byExpression"!==r&&eS(e,"color.mode","primary"))}const P$=(e,t)=>{L$(t),FO(e),y$.addCallbackCustomTooltip(t)},R$=e=>{L$(e)};function z$({translator:e}){return{dimensions:{min:0,max:e=>e>1?1:2,description(t,n,r,i){let o;const a=i?.layout?i.layout.qHyperCube.qDimensionInfo.filter(e=>O$(e)).length:t.qHyperCubeDef.qDimensions.length;return r.isAutoChart&&n>a-1?o="Visualizations.Descriptions.Color":a>1&&0===n?"stacked"===t.barGrouping.grouping?o="Visualizations.Descriptions.Stack":(o="Visualizations.Descriptions.Group",t.qHyperCubeDef.qColumnOrder=[0,1,2]):o="Visualizations.Descriptions.Bars",e.get(o)},add:(e,t,n)=>(t.qHyperCubeDef.qDimensions.length>1&&"stacked"===t.barGrouping.grouping&&(t.qHyperCubeDef.qMode="K",t.qHyperCubeDef.qAlwaysFullyExpanded=!0),n?.app?I$(t,n.app).then(()=>(P$(e,t),e)):(_$(t),P$(e,t),e)),move(e,t,n){const r=n.layout.qHyperCube.qDimensionInfo.filter(e=>O$(e)).length;r>1&&"stacked"===t.barGrouping.grouping&&(t.qHyperCubeDef.qMode="K",t.qHyperCubeDef.qAlwaysFullyExpanded=!0),N$(t),L$(t),y$.moveCallbackCustomTooltip(t,e)},remove(e,t){const n=t.qHyperCubeDef.qDimensions;L$(t),1===n.length&&(t.qHyperCubeDef.qMode="S"),y$.removeCallbackCustomTooltip(t,e)},replace(e,t,n,r){y$.replaceCallbackCustomTooltip(r,t)}},measures:{min:1,max:e=>e>1?1:15,description:()=>e.get("Visualizations.Descriptions.LengthBars"),add:(e,t,n)=>n?.app?I$(t,n.app).then(()=>(e.qSortBy.qSortByNumeric=-1,R$(t),e)):(_$(t),R$(t),e),move(e,t){N$(t),L$(t)},remove(e,t){const n=t.qHyperCubeDef.qDimensions;L$(t),n.length>1&&"stacked"===t.barGrouping.grouping?(t.qHyperCubeDef.qMode="K",t.qHyperCubeDef.qAlwaysFullyExpanded=!0):1===n.length&&(t.qHyperCubeDef.qMode="S")}}}}function F$(e){return{properties:{version:"2.5.0",barGrouping:{grouping:"grouped"},color:{auto:!0,autoMinMax:!0,byDimDef:void 0,byMeasureDef:void 0,colorExpression:void 0,dimensionScheme:"12",expressionIsColor:!0,expressionLabel:"",formatting:{numFormatFromTemplate:!0,isCustomFormatted:void 0},measureMin:void 0,measureMax:void 0,measureScheme:"sg",mode:"primary",paletteColor:{index:6},persistent:!1,reverseScheme:!1,singleColor:void 0,useBaseColors:"off",useDimColVal:!0,useMeasureGradient:!0},components:[],dataPoint:{showLabels:!1,showSegmentLabels:!1,showTotalLabels:!0},dimensionAxis:{axisDisplayMode:"auto",continuousAuto:!0,dock:"near",label:"auto",maxVisibleItems:10,show:"all"},footnote:"",gridLine:{auto:!0,spacing:2},legend:{dock:"auto",show:!0,showTitle:!0},measureAxis:{autoMinMax:!0,dock:"near",max:10,min:0,minMax:"min",show:"all",spacing:1},orientation:"vertical",preferContinuousAxis:!0,qHyperCubeDef:{qDimensions:[],qMeasures:[],qInitialDataFetch:[{qWidth:17,qHeight:500}],qSuppressMissing:!0,qSuppressZero:!1},refLine:{refLines:[],dimRefLines:[]},scrollbar:"miniChart",scrollStartPos:0,showDetails:!0,showDisclaimer:!0,showMiniChartForContinuousAxis:!0,showTitles:!0,subtitle:"",title:"",tooltip:{auto:!0,hideBasic:!1,data:{qHyperCubeDef:void 0},chart:void 0,imageComponents:void 0}},data:{targets:[{path:"/qHyperCubeDef",...z$(e)}]}}}var j$={Common_Measures:{id:"Common.Measures",locale:{"de-DE":"Kennzahlen","en-US":"Measures","es-ES":"Medidas","fr-FR":"Mesures","it-IT":"Misure","ja-JP":"メジャー","ko-KR":"측정값","nl-NL":"Metingen","pl-PL":"Miary","pt-BR":"Medidas","ru-RU":"Меры","sv-SE":"Mått","tr-TR":"Hesaplamalar","zh-CN":"度量","zh-TW":"量值"}},Object_ChartTooltip_ColorExpression:{id:"Object.ChartTooltip.ColorExpression",locale:{"de-DE":"Farbformel","en-US":"Color expression","es-ES":"Expresión de color","fr-FR":"Expression de couleur","it-IT":"Espressione colore","ja-JP":"カラー表現","ko-KR":"색상 표현식","nl-NL":"Kleuruitdrukking","pl-PL":"Wyrażenie koloru","pt-BR":"Expressão de cor","ru-RU":"Выражение для цвета","sv-SE":"Färguttryck","tr-TR":"Renk ifadesi","zh-CN":"颜色表达式","zh-TW":"色彩運算式"}},Object_ChartTooltip_NMore:{id:"Object.ChartTooltip.NMore",locale:{"de-DE":"+{0} mehr","en-US":"+{0} more","es-ES":"+{0} más","fr-FR":"+{0} plus","it-IT":"+{0} altre","ja-JP":"さらに +{0}","ko-KR":"{0} 이상","nl-NL":"+{0} meer","pl-PL":"Jeszcze {0}","pt-BR":"+{0} mais","ru-RU":"Еще +{0}","sv-SE":"Fler än {0} ytterligare","tr-TR":"+{0} daha","zh-CN":"+{0} 以上","zh-TW":"其他 +{0} 個"}},Object_ChartTooltip_sumOfNegatives:{id:"Object.ChartTooltip.sumOfNegatives",locale:{"de-DE":"Summe negativer Werte","en-US":"Sum of negatives","es-ES":"Suma de negativos","fr-FR":"Somme des valeurs négatives","it-IT":"Somma valori negativi","ja-JP":"負の合計","ko-KR":"음수 합계","nl-NL":"Som negatieven","pl-PL":"Suma ujemnych","pt-BR":"Soma de negativos","ru-RU":"Сумма отрицательных значений","sv-SE":"Summan av negativa","tr-TR":"Negatif değerlerin toplamı","zh-CN":"负值总和","zh-TW":"負數總和"}},Object_ChartTooltip_sumOfPositives:{id:"Object.ChartTooltip.sumOfPositives",locale:{"de-DE":"Summe positiver Werte","en-US":"Sum of positives","es-ES":"Suma de positivos","fr-FR":"Sommes des valeurs positives","it-IT":"Somma valori positivi","ja-JP":"正の合計","ko-KR":"양수 합계","nl-NL":"Som positieven","pl-PL":"Suma dodatnich","pt-BR":"Soma de positivos","ru-RU":"Сумма положительных значений","sv-SE":"Summan av positiva","tr-TR":"Pozitif değerlerin toplamı","zh-CN":"正值总和","zh-TW":"正數總和"}},Object_Disclaimer_DataRangeIncludingZero:{id:"Object.Disclaimer.DataRangeIncludingZero",locale:{"de-DE":"Die logarithmische Skala wurde durch die lineare Skala ersetzt, weil der Datenbereich NULL enthält.","en-US":"The logarithmic scale has been replaced by a linear scale because the data range includes zero.","es-ES":"La escala logarítmica ha sido reemplazada por una escala lineal porque el rango de datos incluye cero.","fr-FR":"L'échelle logarithmique a été remplacée par une échelle linéaire, car la plage de données comprend la valeur zéro.","it-IT":"La scala logaritmica è stata sostituita da una scala lineare perché l'intervallo di dati include zero.","ja-JP":"データ範囲にゼロが含まれるため、Log スケールは Linear スケールで置換されています。","ko-KR":"데이터 범위에 0이 포함되어 있으므로 로그 눈금이 선형 눈금으로 바뀌었습니다.","nl-NL":"De logaritmische schaal is vervangen door een lineaire schaal omdat het gegevensbereik nullen bevat.","pl-PL":"Skala logarytmiczna została zastąpiona liniową, ponieważ zakres danych zawiera zero.","pt-BR":"A escala logarítmica foi substituída por uma escala linear, pois o intervalo de dados inclui zero.","ru-RU":"Логарифмический масштаб заменен линейным масштабом, поскольку диапазон данных включает ноль.","sv-SE":"Den logaritmiska skalan har ersatts av en linjär skala eftersom dataintervallet innehåller värdet noll.","tr-TR":"Veri aralığı sıfır değerini içerdiğinden, logaritmik ölçek yerine doğrusal ölçek kullanıldı.","zh-CN":"对数刻度已替换为线性刻度，因为该数据范围包括零。","zh-TW":"對數刻度已遭線性刻度取代，因為資料範圍包含零。"}},Object_Disclaimer_LimitedData:{id:"Object.Disclaimer.LimitedData",locale:{"de-DE":"Zurzeit wird nur ein beschränkter Datensatz angezeigt.","en-US":"Currently showing a limited data set.","es-ES":"Mostrando actualmente un conjunto limitado de datos.","fr-FR":"Affichage d'un ensemble de données limité pour l'instant.","it-IT":"Attualmente viene visualizzata una serie di dati limitata.","ja-JP":"現在、限定的なデータ セットを表示しています。","ko-KR":"현재 제한된 데이터 집합을 표시하고 있습니다.","nl-NL":"Momenteel wordt een beperkte gegevensverzameling getoond.","pl-PL":"Aktualnie przedstawiany jest ograniczony zestaw danych.","pt-BR":"Mostrando um conjunto de dados limitado.","ru-RU":"В настоящее время отображается ограниченный набор данных.","sv-SE":"Just nu visas en begränsad datauppsättning.","tr-TR":"Şu anda sınırlı bir veri kümesi gösteriliyor.","zh-CN":"当前正显示有限的数据集。","zh-TW":"目前顯示的是有限的資料集。"}},Object_Disclaimer_NegativeOrZeroValues:{id:"Object.Disclaimer.NegativeOrZeroValues",locale:{"de-DE":"Die in den Datensätzen enthaltenen negativen oder 0-Werte können nicht in diesem Diagramm dargestellt werden.","en-US":"The data set contains negative or zero values that cannot be shown in this chart.","es-ES":"El conjunto de datos contiene valores cero o negativos que no se pueden mostrar en este gráfico.","fr-FR":"L'ensemble de données contient des valeurs négatives ou égales à zéro impossibles à afficher dans ce graphique.","it-IT":"La serie di dati contiene valori negativi o uguali a zero che non possono essere visualizzati in questo grafico.","ja-JP":"データ セットには、本チャートに表示できない負の値またはゼロ値が含まれています。","ko-KR":"데이터 집합에 해당 차트에 표시할 수 없는 음수 값 또는 zero 값이 포함되어 있습니다.","nl-NL":"De gegevensverzameling bevat negatieve waarden of nulwaarden die niet kunnen worden weergegeven in deze diagram.","pl-PL":"Zestaw danych zawiera wartości ujemne lub zerowe, których nie można przedstawić w tym wykresie.","pt-BR":"O conjunto de dados contém valores negativos ou iguais a zero que não podem ser mostrados neste gráfico.","ru-RU":"Набор данных содержит отрицательные или нулевые значения, которые невозможно показать в этой диаграмме.","sv-SE":"Datauppsättningen innehåller negativa värden eller nollvärden som inte kan visas i detta diagram.","tr-TR":"Veri kümesi, bu grafikte gösterilemeyen negatif veya sıfır değerlerini içeriyor.","zh-CN":"数据集中包含无法在此图表中显示的负值或零值。","zh-TW":"資料集包含無法在此圖表中顯示的負值或零值。"}},Object_Disclaimer_NegativeValues:{id:"Object.Disclaimer.NegativeValues",locale:{"de-DE":"Die in den Datensätzen enthaltenen negativen Werte können nicht in diesem Diagramm dargestellt werden.","en-US":"The data set contains negative values that cannot be shown in this chart.","es-ES":"El conjunto de datos contiene valores negativos que no se pueden mostrar en este gráfico.","fr-FR":"Le jeu de données contient des valeurs négatives impossibles à afficher dans ce graphique.","it-IT":"Il set di dati contiene valori negativi che non possono essere visualizzati in questo grafico.","ja-JP":"このチャートには表示できない負の値がデータ セットに含まれています。","ko-KR":"데이터 집합에 해당 차트에 표시할 수 없는 음수 값이 포함되어 있습니다.","nl-NL":"De gegevensverzameling bevat negatieve waarden die niet kunnen worden weergegeven in dit diagram.","pl-PL":"Zestaw danych zawiera wartości ujemne, których nie można przedstawić na tym wykresie.","pt-BR":"O conjunto de dados contém valores negativos que não podem ser mostrados neste gráfico.","ru-RU":"Набор данных содержит отрицательные значения, которые нельзя отобразить на этой диаграмме.","sv-SE":"Datauppsättningen innehåller negativa värden som inte kan visas i det här diagrammet.","tr-TR":"Veri kümesi, bu grafikte gösterilemeyen negatif değerleri içeriyor.","zh-CN":"数据集包含无法在此图表中显示的负值。","zh-TW":"資料集包含無法在此圖表中顯示的負值。"}},Object_Disclaimer_NoDataExist:{id:"Object.Disclaimer.NoDataExist",locale:{"de-DE":"Die Auswahlen haben für dieses Diagramm keine Daten generiert.","en-US":"The selections generated no data for this chart.","es-ES":"Las selecciones no han generado datos para este gráfico.","fr-FR":"Les sélections n'ont pas généré de données pour ce graphique.","it-IT":"Le selezioni non hanno generato dati per questo grafico.","ja-JP":"このチャートには選択からデータが生成されませんでした。","ko-KR":"선택 내용으로 이 차트에 대한 데이터가 생성되지 않았습니다.","nl-NL":"De selecties hebben geen gegevens voor de diagram gegenereerd.","pl-PL":"Wymiary nie spowodowały wygenerowania danych dla tego wykresu.","pt-BR":"As seleções não geraram dados para este gráfico.","ru-RU":"В результате выборок данные для этой диаграммы не созданы.","sv-SE":"Urvalen genererade inga data för detta diagram.","tr-TR":"Seçimler bu grafik için hiç veri oluşturmadı.","zh-CN":"选择未生成此图表的数据。","zh-TW":"此選項無法產生任何適用於此圖表的資料。"}},Object_Disclaimer_OnlyNanColor:{id:"Object.Disclaimer.OnlyNanColor",locale:{"de-DE":"Die verwendeten Daten für die Farbgebung dieser Visualisierung enthalten undefinierte Werte.","en-US":"The data used to color this visualization only contains undefined values.","es-ES":"Los datos utilizados para colorear esta visualización solo contienen valores indefinidos.","fr-FR":"Les données utilisées pour colorer cette visualisation ne comportent que des valeurs non définies.","it-IT":"I dati utilizzati per colorare questa visualizzazione contengono solo valori non definiti.","ja-JP":"このビジュアライゼーションの色の割り当てに使用したデータには、未定義の値が含まれています。","ko-KR":"이 시각화에 색을 지정하는 데 사용된 데이터에는 정의되지 않은 값만 포함되어 있습니다.","nl-NL":"De gegevens die worden gebruikt om deze visualisatie kleur te geven bevatten uitsluitend ongedefinieerde waarden.","pl-PL":"Dane używane do kolorowania tej wizualizacji zawierają wyłącznie niezdefiniowane wartości.","pt-BR":"Os dados usados para colorir esse visualização contém somente valores indefinidos.","ru-RU":"Данные, используемые для выбора цвета визуализации, содержат только неопределенные значения.","sv-SE":"Data som används för att färgsätta denna visualisering innehåller enbart odefinierade värden.","tr-TR":"Bu görselleştirmeyi renklendirmek için kullanılan veriler yalnızca tanımlanmamış değerler içeriyor.","zh-CN":"用于将该可视化着色的数据仅包含未定义的值。","zh-TW":"用以定義此視覺化的色彩的資料只包含未定義的值。"}},Object_Disclaimer_OnlyNanData:{id:"Object.Disclaimer.OnlyNanData",locale:{"de-DE":"Das Diagramm wird nicht angezeigt, da es nur nicht definierte Werte enthält.","en-US":"The chart is not displayed because it contains only undefined values.","es-ES":"El gráfico no se muestra porque solo contiene valores indefinidos.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs non définies.","it-IT":"Il grafico non è visualizzato poiché contiene solo valori non definiti.","ja-JP":"未定義の値しか含まれていないため、チャートは表示されていません。","ko-KR":"정의되지 않은 값만 포함되어 있으므로 차트가 표시되지 않습니다.","nl-NL":"De diagram wordt niet weergegeven omdat deze alleen ongedefinieerde waarden bevat.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wyłącznie wartości niezdefiniowane.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores não definidos.","ru-RU":"Диаграмма не отображается, поскольку она содержит только неопределенные значения.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller odefinierade värden.","tr-TR":"Yalnızca tanımsız değerleri içermesi nedeniyle grafik görüntülenmiyor.","zh-CN":"未显示图表，因为它仅包含未定义的值。","zh-TW":"系統不會顯示圖表，因為該圖表僅包含未定義的值。"}},Object_Disclaimer_OnlyNegativeOrZeroValues:{id:"Object.Disclaimer.OnlyNegativeOrZeroValues",locale:{"de-DE":"Das Diagramm wird nicht angezeigt, da es nur negative oder 0-Werte enthält.","en-US":"The chart is not displayed because it contains only negative or zero values.","es-ES":"El gráfico no se muestra porque solo contiene valores negativos o valores cero.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs négatives ou égales à zéro.","it-IT":"Il grafico non viene visualizzato poiché contiene solo valori negativi o uguali a zero.","ja-JP":"チャートは負の値またはゼロ値しか含まれていないため、表示されていません。","ko-KR":"음수 또는 zero 값만 포함되어 있으므로 차트가 표시되지 않습니다.","nl-NL":"De diagram wordt niet weergegeven omdat deze alleen negatieve waarden of nulwaarden bevat.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wyłącznie wartości ujemne lub zerowe.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores negativos ou zero.","ru-RU":"Диаграмма не отображается, поскольку она содержит только отрицательные или нулевые значения.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller negativa värden eller nollvärden","tr-TR":"Yalnızca negatif veya sıfır değerlerini içermesi nedeniyle grafik görüntülenmiyor.","zh-CN":"未显示图表，因为它仅包含负值或零值。","zh-TW":"系統不會顯示圖表，因為該圖表僅包含負值或零值。"}},Object_Disclaimer_OnlyNegativeValues:{id:"Object.Disclaimer.OnlyNegativeValues",locale:{"de-DE":"Das Diagramm wird nicht angezeigt, da es nur negative oder Werte enthält.","en-US":"The chart is not displayed because it contains only negative values.","es-ES":"El gráfico no se muestra porque solo contiene valores negativos.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs négatives.","it-IT":"Il grafico non viene visualizzato poiché contiene solo valori negativi.","ja-JP":"負の値しか含まれていないため、チャートは表示されていません。","ko-KR":"음수 값만 포함되어 있으므로 차트가 표시되지 않습니다.","nl-NL":"Het diagram wordt niet weergegeven omdat deze alleen negatieve waarden bevat.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wyłącznie wartości ujemne.","pt-BR":"O gráfico não é exibido porque contém apenas valores negativos.","ru-RU":"Диаграмма не отображается, поскольку она содержит только отрицательные значения.","sv-SE":"Diagrammet visas inte eftersom det endast innehåller negativa värden.","tr-TR":"Yalnızca negatif değerleri içermesi nedeniyle grafik görüntülenmiyor.","zh-CN":"未显示图表，因为它仅包含负值。","zh-TW":"系統不會顯示圖表，因為該圖表僅包含負值。"}},Object_ErrorMessage_MissingDimension:{id:"Object.ErrorMessage.MissingDimension",locale:{"de-DE":"Dimension nicht gefunden","en-US":"Dimension not found","es-ES":"No se ha encontrado la dimensión","fr-FR":"Dimension introuvable","it-IT":"Dimensione non trovata","ja-JP":"軸が見つかりません","ko-KR":"차원을 찾지 못했습니다.","nl-NL":"Dimensie niet gevonden","pl-PL":"Wymiar nie został znaleziony","pt-BR":"Dimensão não encontrada","ru-RU":"Измерение не найдено","sv-SE":"Dimensionen hittades inte","tr-TR":"Boyut bulunamadı","zh-CN":"未找到维度","zh-TW":"找不到維度"}},Object_ErrorMessage_MissingMeasure:{id:"Object.ErrorMessage.MissingMeasure",locale:{"de-DE":"Kennzahl nicht gefunden","en-US":"Measure not found","es-ES":"No se ha encontrado la medida","fr-FR":"Mesure introuvable","it-IT":"Misura non trovata","ja-JP":"メジャーが見つかりません","ko-KR":"측정값을 찾지 못했습니다.","nl-NL":"Meting niet gevonden","pl-PL":"Miara nie została znaleziona","pt-BR":"Medida não encontrada","ru-RU":"Мера не найдена","sv-SE":"Måttet hittades inte","tr-TR":"Hesaplama bulunamadı","zh-CN":"未找到度量","zh-TW":"找不到量值"}},Tooltip_ToggleOffLassoSelection:{id:"Tooltip.ToggleOffLassoSelection",locale:{"de-DE":"Lasso-Auswahl deaktivieren","en-US":"Turn off lasso selection","es-ES":"Desactivar la selección de contorno","fr-FR":"Désactiver la sélection au lasso","it-IT":"Disattiva selezione lazo","ja-JP":"囲み選択をオフにする","ko-KR":"올가미 선택 끄기","nl-NL":"Lassoselectie uitschakelen","pl-PL":"Wyłącz zaznaczenie lasso","pt-BR":"Desativar seleção de laço","ru-RU":"Выключить выбор лассо","sv-SE":"Stäng av lassourval","tr-TR":"Serbest seçimi kapat","zh-CN":"关闭套索选择方法","zh-TW":"關閉套索選取"}},Tooltip_ToggleOnLassoSelection:{id:"Tooltip.ToggleOnLassoSelection",locale:{"de-DE":"Lasso-Auswahl aktivieren","en-US":"Turn on lasso selection","es-ES":"Activar la selección de contorno","fr-FR":"Activer la sélection au lasso","it-IT":"Attiva selezione lazo","ja-JP":"囲み選択をオンにする","ko-KR":"올가미 선택 켜기","nl-NL":"Lassoselectie inschakelen","pl-PL":"Włącz zaznaczenie lasso","pt-BR":"Ativar seleção de laço","ru-RU":"Включить выбор лассо","sv-SE":"Slå på lassourval","tr-TR":"Serbest seçimi aç","zh-CN":"开启套索选择方法","zh-TW":"開啟套索選取"}},Tooltip_dimensions_cyclic:{id:"Tooltip.dimensions.cyclic",locale:{"de-DE":"Zyklische Dimension","en-US":"Cyclic dimension","es-ES":"Dimensión cíclica","fr-FR":"Dimension cyclique","it-IT":"Dimensione ciclica","ja-JP":"サイクリック軸","ko-KR":"순환 차원","nl-NL":"Cyclische dimensie","pl-PL":"Wymiar cykliczny","pt-BR":"Dimensão cíclica","ru-RU":"Циклическое измерение","sv-SE":"Cyklisk dimension","tr-TR":"Döngüsel boyut","zh-CN":"循环维度","zh-TW":"循環維度"}},Tooltip_dimensions_drilldown:{id:"Tooltip.dimensions.drilldown",locale:{"de-DE":"Drilldown-Dimension","en-US":"Drill-down dimension","es-ES":"Dimensión jerárquica","fr-FR":"Descendre dans la hiérarchie de la dimension","it-IT":"Dimensione di drill-down","ja-JP":"軸のドリルダウン","ko-KR":"드릴다운 차원","nl-NL":"Drill-downdimensie","pl-PL":"Wymiar hierarchiczny","pt-BR":"Dimensão da hierarquia","ru-RU":"Детализированное измерение","sv-SE":"Hierarkisk dimension","tr-TR":"Detaya inme boyutu","zh-CN":"下钻维度","zh-TW":"向下探查維度"}},Tooltip_selections_locked:{id:"Tooltip.selections.locked",locale:{"de-DE":"Auswahlen sind für diese Dimension gesperrt","en-US":"Selections on this dimension are locked","es-ES":"Las selecciones de esta dimensión están bloqueadas.","fr-FR":"Sélections verrouillées pour cette dimension","it-IT":"Le selezioni in questa dimensione sono bloccate","ja-JP":"この軸での選択はロックされています","ko-KR":"이 차원의 선택은 잠겨 있습니다.","nl-NL":"Selecties voor deze dimensie zijn vergrendeld","pl-PL":"Wybory dotyczące tego wymiaru są zablokowane","pt-BR":"Seleções estão bloqueadas nesta dimensão","ru-RU":"Выборки для данного измерения заблокированы","sv-SE":"Urval i den här dimensionen är låsta","tr-TR":"Bu boyuttaki seçimler kilitli","zh-CN":"相关维度的选择已锁定","zh-TW":"已鎖定此維度上的選項"}},Visualizations_Descriptions_Bars:{id:"Visualizations.Descriptions.Bars",locale:{"de-DE":"Balken","en-US":"Bars","es-ES":"Barras","fr-FR":"Barres","it-IT":"Barre","ja-JP":"棒","ko-KR":"막대","nl-NL":"Staven","pl-PL":"Słupki","pt-BR":"Barras","ru-RU":"Полосы","sv-SE":"Staplar","tr-TR":"Çubuklar","zh-CN":"条形","zh-TW":"長條"}},Visualizations_Descriptions_Group:{id:"Visualizations.Descriptions.Group",locale:{"de-DE":"Gruppe","en-US":"Group","es-ES":"Grupo","fr-FR":"Groupe","it-IT":"Gruppo","ja-JP":"グループ","ko-KR":"그룹","nl-NL":"Groep","pl-PL":"Grupa","pt-BR":"Grupo","ru-RU":"Группа","sv-SE":"Grupp","tr-TR":"Grup","zh-CN":"组","zh-TW":"群組"}},Visualizations_Descriptions_HeightLine:{id:"Visualizations.Descriptions.HeightLine",locale:{"de-DE":"Linienhöhe","en-US":"Height of line","es-ES":"Altura de línea","fr-FR":"Hauteur de ligne","it-IT":"Altezza della linea","ja-JP":"線の高さ","ko-KR":"선 높이","nl-NL":"Hoogte van lijn","pl-PL":"Wysokość linii","pt-BR":"Altura da linha","ru-RU":"Высота линии","sv-SE":"Linjens höjd","tr-TR":"Çizgi yüksekliği","zh-CN":"线高度","zh-TW":"折線高度"}},Visualizations_Descriptions_LengthBars:{id:"Visualizations.Descriptions.LengthBars",locale:{"de-DE":"Balkenlänge","en-US":"Length of bars","es-ES":"Longitud de barras","fr-FR":"Longueur des barres","it-IT":"Lunghezza delle barre","ja-JP":"棒の長さ","ko-KR":"막대 길이","nl-NL":"Lengte van staven","pl-PL":"Długość słupków","pt-BR":"Comprimento das barras","ru-RU":"Длина полос","sv-SE":"Staplarnas längd","tr-TR":"Çubuk uzunluğu","zh-CN":"条形长度","zh-TW":"長條長度"}},properties_dataPoints_labelmode_share:{id:"properties.dataPoints.labelmode.share",locale:{"de-DE":"Freigeben","en-US":"Share","es-ES":"Compartir","fr-FR":"Partage","it-IT":"Condividi","ja-JP":"共有","ko-KR":"공유","nl-NL":"Delen","pl-PL":"Udostępnij","pt-BR":"Compartilhar","ru-RU":"Совместное использование","sv-SE":"Dela","tr-TR":"Paylaş","zh-CN":"共享","zh-TW":"共用"}},properties_trendlines_types_average:{id:"properties.trendlines.types.average",locale:{"de-DE":"Durchschnitt","en-US":"Average","es-ES":"Media","fr-FR":"Moyenne","it-IT":"Media","ja-JP":"平均値","ko-KR":"평균","nl-NL":"Gemiddelde","pl-PL":"Średnia","pt-BR":"Média","ru-RU":"Среднее","sv-SE":"Medel","tr-TR":"Ortalama","zh-CN":"平均值","zh-TW":"平均值"}},properties_trendlines_types_exponential:{id:"properties.trendlines.types.exponential",locale:{"de-DE":"Exponentiell","en-US":"Exponential","es-ES":"Exponencial","fr-FR":"Exponentiel","it-IT":"Esponenziale","ja-JP":"指数","ko-KR":"지수","nl-NL":"Exponentieel","pl-PL":"Wykładnicze","pt-BR":"Exponencial","ru-RU":"Экспоненциальный","sv-SE":"Exponentiell","tr-TR":"Üstel","zh-CN":"指数","zh-TW":"指數"}},properties_trendlines_types_linear:{id:"properties.trendlines.types.linear",locale:{"de-DE":"Linear","en-US":"Linear","es-ES":"Lineal","fr-FR":"Linéaire","it-IT":"Lineare","ja-JP":"線形","ko-KR":"선형","nl-NL":"Lineair","pl-PL":"Liniowe","pt-BR":"Linear","ru-RU":"Линейный","sv-SE":"Linjär","tr-TR":"Doğrusal","zh-CN":"线性","zh-TW":"線性"}},properties_trendlines_types_logarithmic:{id:"properties.trendlines.types.logarithmic",locale:{"de-DE":"Logarithmisch","en-US":"Logarithmic","es-ES":"Logarítmica","fr-FR":"Logarithmique","it-IT":"Logaritmica","ja-JP":"対数","ko-KR":"로그","nl-NL":"Logaritmisch","pl-PL":"Logarytmiczne","pt-BR":"Logarítmico","ru-RU":"Логарифмический","sv-SE":"Logaritmisk","tr-TR":"Logaritmik","zh-CN":"对数","zh-TW":"對數"}},properties_trendlines_types_polynomial2:{id:"properties.trendlines.types.polynomial2",locale:{"de-DE":"Polynom zweiten Grades","en-US":"Second degree polynomial","es-ES":"Polinómica de segundo grado","fr-FR":"Polynomial du 2ème degré","it-IT":"Polinomio di secondo grado","ja-JP":"2 番目の角度の多項式近似","ko-KR":"2차 다항식","nl-NL":"Tweedegraadspolynoom","pl-PL":"Wielomianowe drugiego stopnia","pt-BR":"Polinômio de segundo grau","ru-RU":"Полиномиальный второй степени","sv-SE":"Polynomial, andra graden","tr-TR":"İkinci derece polinom","zh-CN":"二次多项式","zh-TW":"第二度多項式"}},properties_trendlines_types_polynomial3:{id:"properties.trendlines.types.polynomial3",locale:{"de-DE":"Polynom dritten Grades","en-US":"Third degree polynomial","es-ES":"Polinómica de tercer grado","fr-FR":"Polynomial du 3ème degré","it-IT":"Polinomio di terzo grado","ja-JP":"3 番目の角度の多項式近似","ko-KR":"3차 다항식","nl-NL":"Derdegraadspolynoom","pl-PL":"Wielomianowe trzeciego stopnia","pt-BR":"Polinômio de terceiro grau","ru-RU":"Полиномиальный третьей степени","sv-SE":"Polynomial, tredje graden","tr-TR":"Üçüncü derece polinom","zh-CN":"三次多项式","zh-TW":"第三度多項式"}},properties_trendlines_types_polynomial4:{id:"properties.trendlines.types.polynomial4",locale:{"de-DE":"Polynom vierten Grades","en-US":"Fourth degree polynomial","es-ES":"Polinómica de cuarto grado","fr-FR":"Polynomial du 4ème degré","it-IT":"Polinomio di quarto grado","ja-JP":"4 番目の角度の多項式近似","ko-KR":"4차 다항식","nl-NL":"Vierdegraadspolynoom","pl-PL":"Wielomianowe czwartego stopnia","pt-BR":"Polinômio de quarto grau","ru-RU":"Полиномиальный четвертой степени","sv-SE":"Polynomial, fjärde graden","tr-TR":"Dördüncü derece polinom","zh-CN":"四次多项式","zh-TW":"第四度多項式"}},properties_trendlines_types_power:{id:"properties.trendlines.types.power",locale:{"de-DE":"Potenz","en-US":"Power","es-ES":"Potencia","fr-FR":"Puissance","it-IT":"Potenza","ja-JP":"累乗","ko-KR":"거듭제곱","nl-NL":"Macht","pl-PL":"Potęgowe","pt-BR":"Potência","ru-RU":"Степенной","sv-SE":"Potens","tr-TR":"Üs","zh-CN":"幂","zh-TW":"乘冪"}}};function B$({env:t}){const{flags:n}=t,r=t.anything?.sense?.isUnsupportedFeature,i=e.useTranslator();!function(e){if(e&&e.get&&e.add){const t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(j$).forEach(t=>{e.add(j$[t])})}}(t.translator);const o=e.useEmbed(),a=e.useTheme(),[s,l]=e.useState(),c=e.useDeviceType(),u=e.useAppLayout(),{qLocaleInfo:d}=u;return e.useEffect(()=>{l({translator:i,theme:a,embed:o,deviceType:c,localeInfo:d,isUnsupportedFeature:r,flags:n})},[d,r,i.language(),a.name(),c]),s}function V$(){const[t]=e.useState(()=>tS()),[n]=e.useState(()=>function(e){var t=py({},e),n={},r={},i=!1,o={get:function(e){return t[e]},set:function(e,o){var a=t[e];!i&&n[e]?t[e]=n[e](o,a):t[e]=o,!i&&r[e]&&r[e](t[e],a)},preventSet:function(e,t){i=!0,o.set(e,t),i=!1},intercept:function(e,t){n[e]=t},onChanged:function(e,t){r[e]=t}};return o}({viewRange:[0,1],scrollOffset:void 0}));return{viewCache:t,viewState:n}}const H$="REJECTED",$$=()=>{},W$=2,U$=20,Y$=200,K$=10;var G$={contains:function(e,t){if(!e)return!1;const{qArea:n}=e;return!!n&&(n.qLeft<=t.qLeft&&n.qLeft+n.qWidth>=t.qLeft+t.qWidth&&n.qTop<=t.qTop&&n.qTop+n.qHeight>=t.qTop+t.qHeight)},patcher:function({layoutService:e}){const t=t=>{t.qArea.qHeight=t.qMatrix.length,t.qArea.qWidth=e.meta.size.x};return t.should=e=>0===e.qArea.qHeight&&0===e.qArea.qWidth&&!!e.qMatrix.length,t},slicer:function(e,t){const n=Math.max(0,t.qHeight)-Math.abs(Math.min(0,t.qTop-e.qArea.qTop)),r=Math.max(0,t.qWidth)-Math.abs(Math.min(0,t.qLeft-e.qArea.qLeft)),i=Math.max(t.qTop,e.qArea.qTop),o=Math.max(t.qLeft,e.qArea.qLeft),a=Math.max(0,i-e.qArea.qTop),s=Math.min(i+n-e.qArea.qTop,e.qArea.qHeight),l=Math.max(0,o-e.qArea.qLeft),c=Math.min(o+r-e.qArea.qLeft,e.qArea.qWidth),u={qArea:{qHeight:s-a,qWidth:c-l,qTop:i,qLeft:o},qMatrix:[]};for(let t=a;t<s;t++)u.qMatrix.push(e.qMatrix[t].slice(l,c));return u},cacheWarden:function({bounds:e={width:0,height:0}}){return{release(t,n){const r=n.qTop-K$<=t.qTop,i=n.qLeft+n.qWidth+K$>=t.qLeft+t.qWidth,o=n.qTop+n.qHeight+K$>=t.qTop+t.qHeight,a=n.qLeft-K$<=t.qLeft;return r&&t.qTop>0||i&&t.qLeft+t.qWidth<e.width||o&&t.qTop+t.qHeight<e.height||a&&t.qLeft>0}}},request:function({definitionPath:e}){return t=>({method:"getHyperCubeData",args:[e,[t]]})}};var X$={contains:function(e,t){if(!e)return!1;const{qArea:n}=e;return!!n&&(n.qTop<=t.qTop&&n.qTop+n.qHeight>=t.qTop+t.qHeight)},patcher:function({layoutService:e}){const t=t=>{t.qArea.qHeight=t.qData[0].qSubNodes.length,t.qArea.qWidth=e.meta.size.x};return t.should=e=>0===e.qArea.qHeight&&0===e.qArea.qWidth&&!!e.qData.length,t},slicer:function(e,t){const n=Math.max(0,t.qHeight)-Math.abs(Math.min(0,t.qTop-e.qArea.qTop)),r=Math.max(t.qTop,e.qArea.qTop),i=Math.max(t.qLeft,e.qArea.qLeft),o=Math.max(0,r-e.qArea.qTop),a=Math.min(r+n-e.qArea.qTop,e.qArea.qHeight),s=e.qData[0].qUp+e.qArea.qHeight+e.qData[0].qDown-r-(a-o),l={qArea:{qHeight:a-o,qWidth:e.qArea.qWidth,qTop:r,qLeft:i},qData:[{...e.qData[0],qUp:r,qDown:s,qSubNodes:[]}]};for(let t=o;t<a;t++)l.qData[0].qSubNodes.push(e.qData[0].qSubNodes[t]);return l},cacheWarden:function({bounds:e={height:0}}){return{release(t,n){const r=n.qTop-K$<=t.qTop,i=n.qTop+n.qHeight+K$>=t.qTop+t.qHeight;return r&&t.qTop>0||i&&t.qTop+t.qHeight<e.height}}},request:function({definitionPath:e}){return t=>({method:"getHyperCubeStackData",args:[e,[t]]})}};var J$={contains:function(){return!1},patcher:function(){const e=e=>e;return e.should=()=>!1,e},slicer:function(e){return e},cacheWarden:function(){return{release:()=>!0}},request:function({definitionPath:e}){return t=>({method:"getHyperCubeTreeData",args:[e,[t]]})}};const Z$="pages";const Q$="discretePan";function eW({chart:e,actions:t,componentKey:n,dockService:r,rtl:i,scroller:o}){return{type:"Pan",key:"discrete:pan",options:{event:Q$,pointers:1,threshold:10,enable(r,i){return this.started===Q$||!i||!(!t.scroll.enabled()||!o.enabled())&&e.componentsFromPoint({x:i.center.x,y:i.center.y}).some(e=>e.key===n)}},events:{[`${Q$}start`](e){e.preventDefault(),this.started=Q$;const t="horizontal"===r.meta.major.orientation?e.deltaX:e.deltaY;this.previousTotalDelta=t<0?-10:10},[`${Q$}move`](e){e.preventDefault();const t="horizontal"===r.meta.major.orientation,n=t?e.deltaX:e.deltaY,a=t&&i?-1:1,s=(n-this.previousTotalDelta)*a;this.previousTotalDelta=n,o.scroll(s)},[`${Q$}end`](e){e.preventDefault(),this.started=!1},[`${Q$}cancel`](e){e.preventDefault(),this.started=!1}}}}function tW({chart:e,componentKey:t,actions:n,scroller:r}){return function(i){if(!n.scroll.enabled()||!r.enabled())return;const[o]=e.componentsFromPoint({x:i.clientX,y:i.clientY}).filter(e=>e.key===t);if(!o)return;i.preventDefault();const a=Math.abs(i.deltaY)>Math.abs(i.deltaX)?i.deltaY:i.deltaX,s=100*Math.sign(-a);r.scroll(s)}}function nW({layoutService:e}){const t=function({layoutService:e}){const t=Math.floor(1e4/(e.meta.dimensionCount+e.meta.measureCount));return function({width:e,height:n}){const r=Math.min(t,Math.max(Y$,n));return{width:e,height:Math.max(U$,Math.min(n*W$,r))}}}({layoutService:e}),n={width:e.meta.size.x,height:e.meta.size.y};return function(e){const{width:r,height:i}=t({width:e.qWidth,height:e.qHeight}),o=i?Math.ceil((i-e.qHeight)/2):0,a=r?Math.ceil((r-e.qWidth)/2):0;return{qHeight:i?Math.min(i,n.height):e.qHeight,qWidth:r?Math.min(r,n.width):e.qWidth,qTop:i?Math.max(0,Math.min(e.qTop-o,n.height-i)):e.qTop,qLeft:r?Math.max(0,Math.min(e.qLeft-a,n.width-r)):e.qLeft}}}function rW(e){let t,n;const r=i=>{t=i;const{method:o,args:a}=t.request;e[o](...a).then(e=>{if(t.canceled||n)return t.reject(H$),t=null,void(n&&(r(n),n=null));t.resolve(e[0]),t=null})},i=e=>new Promise((i,o)=>{const a={request:e,resolve:i,reject:o,canceled:!1,cancel:()=>{a.canceled=!0}};t?(e=>{n&&n.reject(H$),n=e})(a):r(a)});return i.isProcessing=()=>!!t,i.hasQueued=()=>!!n,i.cancel=()=>{i.isProcessing()&&t.cancel(),i.hasQueued()&&(n.reject(H$),n=null)},i}const iW={command:{update:()=>{}}};function oW({dataStore:e,composition:t,enigmaModel:n,layoutService:r,trendLineModel:i=iW,definitionPath:o,processDataPage:a}){const{slicer:s,cacheWarden:l,request:c}=t,u=function({dataStore:e,slice:t,warden:n,expand:r,request:i,process:o,connectionless:a,processDataPage:s}){return(l,{onProcessing:c}={})=>{if(e.contains(l)){const r=e.getCurrent();if(a)return Promise.resolve(t(r,l));const i=n.release(r.qArea,l),s=o.isProcessing();if(!i&&s&&o.cancel(),!i||s)return Promise.resolve(t(r,l))}if(a)return Promise.resolve(e.getCurrent());o.isProcessing()&&c&&c();const u=r(l);return o(i(u)).then(n=>(s(n),e.add(n),t(n,l)))}}({dataStore:e,slice:s,warden:l({bounds:{width:r.meta.size.x,height:r.meta.size.y}}),expand:nW({layoutService:r}),request:c({definitionPath:o}),process:rW(n),connectionless:r.meta.isSnapshot,processDataPage:a}),d=iS((e,{onProcessing:t,onData:n})=>{u(e,{onProcessing:t}).then(e=>n(e)).catch(e=>{if(e!==H$)throw e})},50);return function(e,{onProcessing:t=$$,onDataPage:n=$$}={}){d(e,{onProcessing:t,onData:e=>{r.setDataPages(e?[e]:[]),i.command.update(),n(e)}})}}var aW={inTotal:function({layoutService:e}){return e.meta.size.x},area:function({layoutService:e}){return{qTop:0,qHeight:1,qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const{pixel:i}=t,o=e.getDataPages()[0],a=i/r;return[a,n.inView>=n.inTotal?a+1:a+o.qArea.qWidth/n.inView]}};var sW={inTotal:function({layoutService:e,getReducedCube:t}){if(e.meta.isSnapshot&&!e.getLayoutValue("reducedHyperCube")){const n=t();if(n){const[t]=Zx({qHyperCube:n},e.refs.dataPages);if(t)return t.qArea.qHeight}const[r]=e.getDataPages();if(r)return r.qArea.qHeight}return e.meta.size.y},area:function({layoutService:e,itemOffset:t,inView:n,areaBuffer:r}){const i=void 0===r?4:r,o=Math.max(0,Math.floor(t)-i/2);return{qTop:o,qHeight:Math.min(e.meta.size.y-o,Math.max(0,Math.ceil(n+i))),qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const{pixel:i}=t,o=e.getDataPages()[0],a=r/n.inView,s=(i+o.qArea.qTop*a)/r;return[s,n.inView>=n.inTotal?s+1:s+o.qArea.qHeight/n.inView]}};function lW(e){const{groupSize:t,measureCount:n}=e.meta;return t??n}function cW(e,t){const n=[];for(let r=0;r<e.length;r++){const i=t(e[r]);-1===n.indexOf(i)&&n.push(i)}return n.length}function uW(e){return cW(e.qMatrix,e=>e[0].qElemNumber)-1}var dW={inTotal:function({layoutService:e}){const t=lW(e);return e.meta.size.y*t*(1+1/t)-1},area:function({layoutService:e,itemOffset:t,inView:n,areaBuffer:r}){const i=lW(e),o=void 0===r?i:r,a=t/(i+1),s=Math.max(0,Math.floor((t-a-o/2)/i));return{qTop:s,qHeight:Math.min(e.meta.size.y-s,Math.max(0,Math.ceil((n+o)/i+1))),qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const i=lW(e),o=e.getDataPages()[0],a=r/n.inView,{pixel:s}=t,l=uW(o),c=o.qArea.qHeight*i+l,u=(s+(o.qArea.qTop*i+o.qArea.qTop)*a)/r;return[u,n.inView>=n.inTotal?u+1:u+c/n.inView]}};const fW=(e,t)=>t/(e.meta.size.y/e.meta.size.dimensions[0]+1);function hW(e){return{itemOffset(t,n){if(0!==t.qArea.qTop)return fW(e,n);const r=((e,t)=>{const n={successful:!0,count:0};let r=Math.abs(Math.floor(t));const i=[];for(let t=0;t<=r;t++){if(!e[t])return n.successful=!1,n;const o=e[t][0].qElemNumber;-1===i.indexOf(o)&&(i.push(o),r--)}return n.count=i.length-1,n})(t.qMatrix,n);return r.successful?r.count:fW(e,n)},area(t,n,r){if(0!==t.qArea.qTop)return fW(e,n);return cW(t.qMatrix.slice(0,r.qTop+1),e=>e[0].qElemNumber)-1}}}var pW={inTotal:function({layoutService:e}){return e.meta.size.y+e.meta.size.dimensions[0]-1},area:function({getDataPages:e,layoutService:t,itemOffset:n,inView:r}){const i=hW(t).itemOffset(e(),n),o=Math.max(0,Math.floor(n-i));return{qTop:o,qHeight:Math.min(t.meta.size.y-o,Math.max(0,Math.ceil(r+1))),qLeft:0,qWidth:t.meta.size.x}},scaleRange:function({getDataPages:e,layoutService:t,offsets:n,items:r,viewSize:i,upperBound:o}){const a=t.getDataPages()[0],s=i/r.inView,{item:l,pixel:c}=n,u=hW(t).area(e(),l,a.qArea),d=uW(a),f=a.qArea.qHeight+d,h=c===o?(r.inView-f)*s/i:(c+(a.qArea.qTop+u)*s)/i;return[h,r.inView>=r.inTotal?h+1:h+f/r.inView]}};function mW({chart:e,rect:t,dockService:n,itemWidths:r,axisKey:i,renderer:o,isGrouped:a,dimensionAxis:s,inTotal:l,isMajorLabelless:c,maxDataRows:u}){const{DEFAULT:d,SQUEEZE:f,LABELLESS:h}=r[n.meta.chart.mode],p="horizontal"===n.meta.major.orientation,{axisDisplayMode:m="auto",maxVisibleItems:g=10,label:y}=s,v=p?t.width:t.height,b=v/l>=f;switch(m){case"max":return Math.min(l,u);case"custom":return Math.min(g,u);default:return c?v/h:b?function({chart:e,isHorizontal:t,axisKey:n,renderer:r={},isGrouped:i,itemSize:o,label:a}){if(i||"auto"!==a&&"tilted"!==a)return!1;const s=e.component(n),{measureText:l}=r;if(!s||!l)return!0;const{fontFamily:c,fontSize:u,tiltAngle:d}=s.settings.settings.labels,{height:f}=l({fontFamily:c,fontSize:u,text:"M"});if(!t)return f>o;const h=(90-d)*(Math.PI/180);return f>Math.cos(h)*o}({chart:e,isHorizontal:p,axisKey:i,renderer:o,isGrouped:a,itemSize:f,label:y})?v/d:l:v/d}}function gW({chart:e,getRect:t,getDataPages:n,layoutService:r,dockService:i,getItemWidths:o,axisKey:a,renderer:s,areaBuffer:l,rtl:c,getReducedCube:u}){const{inTotal:d,area:f,scaleRange:h}=function({layoutService:e}){const{isDimensionless:t,isGrouped:n,isGroupedByMeasure:r}=e.meta;return t?aW:n?r?dW:pW:sW}({layoutService:r}),p=()=>"horizontal"===i.meta.major.orientation?t().width:t().height,m=e=>e?p()/e:0,g=(e,t)=>-(e-t)*m(t);return{getItems(){const n=r.getLayoutValue("dimensionAxis"),l=d({layoutService:r,getReducedCube:u});return{inTotal:l,inView:mW({chart:e,rect:t(),dockService:i,itemWidths:o(),axisKey:a,renderer:s,isGrouped:r.meta.isGrouped,dimensionAxis:n,inTotal:l,isMajorLabelless:"none"===n.show||"title"===n.show,maxDataRows:Math.floor(1e4/(r.meta.dimensionCount+r.meta.measureCount))})}},getItemSize({items:e}){const{inView:t}=e;return m(t)},getOffsets({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t,i=Math.min(0,Math.max(e,g(n,r))),o=r?Math.abs(r*i/p()):0;return{start:{pixel:i,item:o},end:{item:Math.min(o+(r||0),n)}}},getUpperBound({items:e}){const{inTotal:t,inView:n}=e;return g(t,n)},getViewRange({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t;return function({viewSize:e,inTotal:t,inView:n,pixelOffset:r}){const i=e/n*t,o=Math.abs(r)/i;return[o,Math.min(1,o+e/i)]}({viewSize:p(),inTotal:n,inView:r,pixelOffset:e})},getArea:({itemOffset:e,items:t})=>f({getDataPages:n,layoutService:r,itemOffset:e,inView:t.inView,areaBuffer:l}),getScaleRange({offsets:e,items:t}){const o=h({getDataPages:n,layoutService:r,offsets:e,items:t,viewSize:p(),upperBound:g(t.inTotal,t.inView)});return"horizontal"===i.meta.major.orientation&&c?function(e){return[1-e[1],1-e[0]]}(o):o},validate:{offset({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t;return e<=0&&e>=g(n,r)}},convert:{itemToPixelOffset({itemOffset:e,items:t}){const{inView:n}=t,r=e*m(n);return Number.isFinite(r)?-r:0},relativeToPixelOffset({relativeOffset:e,items:t}){const{inTotal:n,inView:r}=t;return-e*(m(r)*n)}}}}function yW({chart:e,componentKey:t,state:n,dataStore:r,pageData:i,layoutService:o,dockService:a,itemWidths:s,getRect:l,axisKey:c,renderer:u,areaBuffer:d,viewState:f,rtl:h,getReducedCube:p}){n.set("rect",{width:0,height:0}),n.set("itemWidths",{}),n.set("itemSize",0),n.set("items",{}),n.set("offsets",{}),n.set("finished",0),n.set("scaleRange",[0,1]);const m=gW({chart:e,getRect:()=>n.get("rect"),getDataPages:r.getCurrent,layoutService:o,dockService:a,getItemWidths:()=>n.get("itemWidths"),axisKey:c,renderer:u,areaBuffer:d,rtl:h,getReducedCube:p}),g=()=>{const e=m.getItems();return n.set("items",e),e},y=({pixelOffset:e,items:t})=>{const r=m.getOffsets({pixelOffset:e,items:t});return n.set("offsets",r),r},v=e=>{const t=Date.now(),r=g(),a=y({pixelOffset:e,items:r}),s=m.getArea({itemOffset:a.start.item,items:r});if((e=>{const[{qArea:t}]=o.getDataPages();return!!t&&Object.keys(e).every(n=>e[n]===t[n])})(s))return void((m.validate.offset({pixelOffset:e,items:r})||f.get("scrollOffset").start!==a.start.item)&&(n.set("finished",t),n.set("scaleRange",m.getScaleRange({offsets:a.start,items:r})),f.preventSet("viewRange",m.getViewRange({pixelOffset:a.start.pixel,items:r})),f.set("scrollOffset",{start:a.start.item,end:a.end.item})));f.preventSet("viewRange",m.getViewRange({pixelOffset:a.start.pixel,items:r}));const l=()=>{n.get("finished")>t||(n.set("finished",t),n.set("scaleRange",m.getScaleRange({offsets:a.start,items:r})),f.set("scrollOffset",{start:a.start.item,end:a.end.item}))};i(s,{onProcessing:l,onDataPage:l})};return{enabled(){const{inTotal:e,inView:t}=n.get("items");return e>t},itemSize:()=>n.get("itemSize"),scaleRange:()=>n.get("scaleRange"),initialize(){const r=e.component(t);if(!r)return Promise.resolve();n.set("rect","function"==typeof l?l():r.rect),n.set("itemWidths","function"==typeof s?s():s);const a=g();n.set("itemSize",m.getItemSize({items:a}));const c=(({items:e})=>{const t=o.getLayoutValue("scrollStartPos"),n=f.get("scrollOffset");if(void 0===n)return 1===t?m.getUpperBound({items:e}):0;if("number"==typeof n)return m.convert.itemToPixelOffset({itemOffset:n,items:e});const{start:r,end:i}=n,a=1===t&&i?i-e.inView:r;return m.convert.itemToPixelOffset({itemOffset:a,items:e})})({items:a}),u=y({pixelOffset:c,items:a});f.preventSet("viewRange",m.getViewRange({pixelOffset:u.start.pixel,items:a}));const d=m.getArea({itemOffset:u.start.item,items:a});return new Promise(e=>{i(d,{onDataPage:()=>{n.set("scaleRange",m.getScaleRange({offsets:u.start,items:a})),f.preventSet("scrollOffset",{start:u.start.item,end:u.end.item}),e()}})})},scroll(e){const t=n.get("offsets").start.pixel+e;v(t)},scrollToRelative(e){const t=n.get("items"),r=m.convert.relativeToPixelOffset({relativeOffset:e,items:t});v(r)}}}function vW({chart:e,actions:t,componentKey:n,enigmaModel:r,layoutService:i,dockService:o,trendLineModel:a,itemWidths:s,viewState:l,rtl:c,options:{definitionPath:u="/qHyperCubeDef",getRect:d,axisKey:f,renderer:h,areaBuffer:p,processDataPage:m=()=>{},getReducedCube:g=()=>{}}={}}){const y=tS(),v=function({qMode:e}){switch(e){case"K":return X$;case"T":return J$;default:return G$}}({qMode:i.getHyperCubeValue("qMode")}),b=function({state:e,contains:t}){return e.set(Z$,[]),{add:t=>{const n=e.get(Z$);n.length=0,n.push(t)},getCurrent:()=>e.get(Z$)[0],getAll:()=>e.get(Z$),contains:n=>t(e.get(Z$)[0],n)}}({state:y,contains:v.contains});!function({layoutService:e,dataStore:t,composition:n}){const r=e.getDataPages()[0];if(!r)return;const i=n.patcher({layoutService:e});i.should(r)&&i(r),t.add(r)}({layoutService:i,dataStore:b,composition:v});const x=function({buffer:e}){return void 0===e?void 0:2*Math.round(e/2)}({buffer:p}),S=oW({dataStore:b,composition:v,enigmaModel:r,layoutService:i,trendLineModel:a,definitionPath:u,processDataPage:m}),w=yW({chart:e,componentKey:n,state:y,dataStore:b,pageData:S,layoutService:i,dockService:o,itemWidths:s,getRect:d,axisKey:f,renderer:h,areaBuffer:x,viewState:l,rtl:c,getReducedCube:g}),M=function({layoutService:e,dataStore:t}){return function(n){const r=Zx(n,`${e.refs.dataPages}`);r.length=0,r.push(t.getCurrent())}}({layoutService:i,dataStore:b}),k=function({chart:e,actions:t,componentKey:n,dockService:r,rtl:i,scroller:o}){return{gestures:[eW({chart:e,actions:t,componentKey:n,dockService:r,rtl:i,scroller:o})],native:{type:"native",events:{wheel:tW({chart:e,actions:t,componentKey:n,scroller:o})}}}}({chart:e,actions:t,componentKey:n,dockService:o,rtl:c,scroller:w});return{interactions:k,query:{getCanScroll:()=>w.enabled(),getItemSize:()=>w.itemSize(),getScaleRange:()=>w.scaleRange(),getCurrentDataPage:()=>b.getCurrent()},command:{initialize:()=>w.initialize(),scrollTo:e=>w.scrollToRelative(e),setSnapshotData:e=>M(e)}}}var bW="AVERAGE",xW="LINEAR",SW="POLYNOMIAL2",wW="POLYNOMIAL3",MW="POLYNOMIAL4",kW="EXPONENTIAL",CW="LOG",qW="POWER";function EW({dimValue:e,value:t,qTrendLine:n}){const{qType:r,qCoeff:i}=n,o={x:e,y:i[2]*t**2+i[1]*t+i[0]};switch(r){case wW:return o.y+=i[3]*t**3,o;case MW:return o.y+=i[4]*t**4+i[3]*t**3,o;default:return o}}var DW={average:function({dimValue:e,qTrendLine:t}){return{x:e,y:t.qCoeff[0]}},linear:function({dimValue:e,value:t,qTrendLine:n}){return{x:e,y:n.qCoeff[1]*t+n.qCoeff[0]}},polynomial2:EW,polynomial3:EW,polynomial4:EW,exponential:function({dimValue:e,value:t,qTrendLine:n}){return{x:e,y:Math.exp(n.qCoeff[0]+t*n.qCoeff[1])}},log:function({dimValue:e,value:t,qTrendLine:n}){return{x:e,y:n.qCoeff[1]+n.qCoeff[0]*Math.log(t)}},power:function({dimValue:e,value:t,qTrendLine:n}){return{x:e,y:10**(n.qCoeff[0]+n.qCoeff[1]*Math.log(t)*Math.LOG10E)}}};function TW(e,t){const n=DW[t.qType.toLowerCase()],r=Math.max(1,e/500);let i=1/0,o=-1/0;for(let a=0;a<e;a+=r){const{y:e}=n({dimValue:null,value:a+1,qTrendLine:t});i=Math.min(e,i),o=Math.max(e,o)}return{min:i,max:o}}function OW(e){return DW[e.qType.toLowerCase()]}function NW(e,t){return e.meta.isContinuous?function(e,t){return{generate:(n,r,i)=>{const o=[],a=OW(n),s=t.get("zoom"),l=n.start??s.min,c=n.end??s.max,u=(c-l)/100,d=e.meta.isButterfly&&i>0;if(u>0){const e=e=>{const t=a({dimValue:e,value:e,qTrendLine:n});d&&(t.y=-t.y),t.layerId=r,t.measureIndex=i,t.dimValue=e,o.push(t)};let t=l;for(let n=l;n<=c;n+=u)e(n),t=n;t!==c&&e(c)}return o},calculate:(e,t)=>OW(e)({dimValue:t,value:t,qTrendLine:e}),findMinMax(e,t){const n=this.generate(t).map(({y:e})=>e);return{min:Math.min(...n),max:Math.max(...n)}}}}(e,t):e.meta.mode.K?function(e){return{generate:(t,n,r)=>{const i=[],o=e.getDataPages()[0],a=o.qData[0].qSubNodes,s=o.qArea.qTop,l=DW[t.qType.toLowerCase()];for(let e=0;e<a.length;e++){const o=a[e],c=l({dimValue:o.qElemNo,value:e+s+1,qTrendLine:t});c.layerId=n,c.measureIndex=r,c.dimValue=o.qText,i.push(c)}return i},findMinMax:TW}}(e):function(e){return{generate:(t,n,r)=>{const i=[],o=e.getDataPages()[0],a=o.qMatrix,s=o.qArea.qTop,l=DW[t.qType.toLowerCase()],c=e.meta.isButterfly&&r>0;for(let e=0;e<a.length;e++){const o=a[e][0],u=e+s+1,d=l({dimValue:o.qElemNumber,value:u,qTrendLine:t});c&&(d.y=-d.y),d.layerId=n,d.measureIndex=r,d.dimValue=o.qText,i.push(d)}return i},calculate:(e,t,n)=>(0,DW[e.qType.toLowerCase()])({dimValue:n,value:t,qTrendLine:e}),findMinMax:TW}}(e)}var AW={TYPES:{AVERAGE:"properties.trendlines.types.average",LINEAR:"properties.trendlines.types.linear",POLYNOMIAL2:"properties.trendlines.types.polynomial2",POLYNOMIAL3:"properties.trendlines.types.polynomial3",POLYNOMIAL4:"properties.trendlines.types.polynomial4",EXPONENTIAL:"properties.trendlines.types.exponential",LOG:"properties.trendlines.types.logarithmic",POWER:"properties.trendlines.types.power"},STYLE:{DASHED:"properties.trendlines.style.dashed"},TYPE:"properties.trendlines.type",HEADER:"properties.trendlines",ADD_BUTTON:"properties.trendlines.button.add"},_W={color:"#f93f17",index:9};const{isDark:IW}=zO,LW={x:NaN,y:NaN,layerId:NaN,measureIndex:NaN},PW=({layoutService:e,viewState:t,colorModel:n,chart:r,env:i,keys:{colorScale:o},isEnabled:a=()=>!1})=>{const{translator:s}=i,l=[LW],c=[],u=[],d=NW(e,t);e.getLayoutValue("qHyperCube.qMeasureInfo",[]).forEach((e,t)=>{Array.isArray(e.qTrendLines)&&(c.push(...e.qTrendLines),u.push(...e.qTrendLines.map(()=>t)))});const f=nS(e=>{const{style:t}=c[e]||{},i=n.settings();if(t.autoColor){if("measure"===i.mode){const t=u[e],n=r.scale(o)(t);return IW(n)?function(e){const t=LO(e);return t.l<30?t.l+=15:t.l<50?t.l+=10:t.l+=5,t.toString()}(n):function(e){const t=LO(e);return t.l-=5,t.toString()}(n)}return n.resolveUIColor(_W)}return t.paletteColor?n.resolveUIColor(t.paletteColor):"none"});return{query:{hasTrendLines:()=>!!c.length&&a(),getData:()=>l,getStroke:f,getLineDash:e=>{const{style:t}=c[e]||{};return t?.lineDash},getLineThickness:e=>{const{style:t}=c[e]||{};return t?.lineThickness??2},getLabel:e=>(c[e]||{}).label,getType:e=>{const{qType:t}=c[e]||{};return s.get(AW.TYPES[t])},getMinMax:()=>{let t=1/0,n=-1/0;return c.forEach(r=>{const i=d.findMinMax(e.meta.size.y,r);t=Math.min(i.min,t),n=Math.max(i.max,n)}),{min:t,max:n}},getCalculatedValue:(e,t,n)=>{const r=c[e];return d.calculate(r,t,n)}},command:{update:()=>{l.length=0,c.forEach((e,t)=>{const n=d.generate(e,t,u[t]);l.push(...n)})}}}};var RW={source:"trend",extract:{field:"x",props:{minor:{field:"y"},layer:{field:"layerId"},measureIndex:{field:"measureIndex"},dimValue:{field:"dimValue"}}}};const zW=({meta:e})=>e.isContinuous?({scale:e,datum:t})=>e(t.value):e.isGroupedByMeasure?({scale:e,datum:t})=>e([t.value,t.measureIndex.value])+e.bandwidth()/2:({scale:e,datum:t})=>e(t.value)+e.bandwidth()/2,FW=(e,{layoutService:t,trendLineModel:n,dockService:r,animationsEnabled:i})=>{if(!n.query.hasTrendLines())return[];const o=(({majorScale:e,minorScale:t},{trendLineModel:n,layoutService:r,dockService:i,animationsEnabled:o})=>{const a=zW(r);return{key:"trend-lines",type:"line",layout:{dock:"center"},data:RW,settings:{connect:!0,orientation:i.meta.major.orientation,coordinates:{major:{scale:e,fn:a},minor:{scale:t},layerId:{ref:"layer"}},layers:{curve:"monotone",line:{strokeWidth:({datum:e})=>n.query.getLineThickness(e.layer.value),stroke:({datum:e})=>n.query.getStroke(e.layer.value),strokeDasharray:({datum:e})=>n.query.getLineDash(e.layer.value)}}},animations:{enabled:o,trackBy:GN.nonUpdatingNode.trackBy,compensateForLayoutChanges:GN.lines.compensateForLayoutChanges}}})(e,{trendLineModel:n,layoutService:t,dockService:r,animationsEnabled:i}),a=(({majorScale:e,minorScale:t,tooltipOverlay:n="trend-lines-tooltip-overlay"},{layoutService:r,dockService:i})=>{const o=zW(r),a="horizontal"===i.meta.major.orientation,s={scale:e,fn:o},l={scale:t,ref:"minor"};return{key:n,type:"point",layout:{dock:"center"},data:RW,settings:{x:a?s:l,y:a?l:s,opacity:0,size:1,sizeLimits:{maxPx:8,minPx:8}}}})(e,{layoutService:t,dockService:r});return[o,a]};function jW(e,t){const{getLabel:n,getType:r,getLineDash:i,getStroke:o}=t.query;return({node:t,resources:a})=>{const s={type:"icon",style:{stroke:o(t.data.layer.value),"min-width":"16px","vertical-align":"middle","stroke-dasharray":i(t.data.layer.value)}},l={content:[{content:n(t.data.layer.value),style:{"font-weight":"bold"}},{content:r(t.data.layer.value)}],style:{"min-width":"136px"}};return{title:t.data.dimValue.label,row:[s,l,{content:a.formatter(e.formatter)(t.data.minor.value)}]}}}function BW(e,{h:t,style:n}){return e.map(e=>{const r={style:{direction:"string"==typeof e.content?FT.detectTextDirection(e.content):void 0,...n.cell||{},...e.style||{}},class:e.class};e.colspan&&(r.colspan=e.colspan);const i=function(e,t){return Array.isArray(t.content)?e("div",{style:{display:"flex","flex-direction":"column"}},t.content.map(t=>e("span",{style:t.style,direction:FT.detectTextDirection(t.content)},t.content))):"icon"===t.type?function(e){const t=e("line",{x1:"0px",y1:"16px",x2:"16px",y2:"0px","stroke-width":"3px"});return e("svg",{xlms:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16"},t)}(e):t.content}(t,e);return t("td",r,i)})}function VW(e,t){return({h:n,data:r,style:i})=>{const o=r[0].title,a=r.filter(e=>e.title===o),s=function(e,t){const n=e("td",{colspan:3,style:{"font-weight":"bold"},direction:FT.detectTextDirection(t)},t);return e("tr",{},n)}(n,o),l=[s];if(a.slice(0,2).forEach(e=>{l.push(n("tr",{},BW(e.row,{h:n,style:i})))}),r.length>2){const i=r.length-2;l.push(...function(e,t,n,r){const i=t?t.get("Object.ChartTooltip.NMore",r):`+${r} more`,o=FT.detectTextDirection(i);return[e("tr",{},e("td",{style:{"background-image":"linear-gradient(transparent 8px, rgba(255, 255, 255, 0.4) 8px, rgba(255, 255, 255, 0.4) 9.2px, transparent 9.2px)",height:"17px"},colspan:3},"")),e("tr",{},e("td",{style:{"font-weight":"bold","text-align":n?"right":"left",direction:o},colspan:3},i))]}(n,e,t,i))}return l}}function HW(e,{trendLineModel:t,translator:n},r={}){if(!t.query.hasTrendLines())return!1;const{rtl:i}=r,o=LT({key:e.tooltip,rtl:i});return kg(!0,o,{settings:{extract:jW(e,t),content:VW(n,i),placement:"pointer",direction:r.rtl?"rtl":"ltr"}})}function $W(e,t){const n=t.element.getBoundingClientRect();return{x:(e.center?e.center.x:e.clientX)-n.left,y:(e.center?e.center.y:e.clientY)-n.top}}function WW(e,{chart:t,viewState:n,trendLineModel:r,layoutService:i,rtl:o}){const{isContinuous:a}=i.meta;let s={components:[{key:e.tooltipOverlay}],propagation:"stop"},l=e=>{const n=$W(e,t);return t.shapesAt(n,s)};if(a){const{getCalculatedValue:i}=r.query;s={components:[{key:"trend-lines"}],propagation:"stop"},l=(r,a)=>{const l=$W(r,t),c=t.shapesAt(function(e){return{cx:e.x,cy:e.y,r:3}}(l),s);if(c.length){const r=function(e,t,n,r){let i=(e.x-t.rect.computed.x)/t.rect.computed.width;i=r?1-i:i;const{min:o,max:a}=n.get("zoom");return o+(a-o)*i}(l,a,n,o),s=t.scale(e.majorInnerScale),u=(s?.formatter?s.formatter():t.formatter({data:{fields:["qDimensionInfo/0"]}}))(r);c.forEach(e=>{e.data.dimValue.value=r,e.data.dimValue.label=u,e.data.minor.value=i(e.data.layer.value,r).y})}return c}}return n=>{const r=t.component(e.tooltip);if(r&&(n=>t.componentsFromPoint({x:n.center?n.center.x:n.clientX,y:n.center?n.center.y:n.clientY}).some(t=>t.key===e.tooltipOverlay))(n)){const e=l(n,r);return e.length?(r.emit("show",n,{nodes:e}),!0):(r.emit("hide"),!1)}return!1}}const UW=e=>{e.style.dashed?e.style.lineDash="8, 4":e.style.lineDash=""},YW=e=>{UW(e),e.qMultiDimMode="Sum",e.qXColIx=0};function KW(e={}){const{translator:t,events:n={onGlobalChange:()=>{}},allowStackedByDimension:r=!1}=e;return{show:(e,t,{layout:n})=>!CT.dimensionless(n)&&!CT.groupedByDimension(n)&&(r||!CT.stackedByDimension(n)),type:"array",ref:"qTrendLines",titleTranslation:AW.HEADER,itemTitleRef:e=>{const n=typeof e.label;return"string"===n&&e.label?e.label:"object"===n?e.label.qStringExpression?e.label.qStringExpression.qExpr:e.label.qValueExpression.qExpr:t.get(AW.TYPES[e.qType])},max:8,allowAdd:!0,allowRemove:!0,allowMove:!1,addTranslation:AW.ADD_BUTTON,add:YW,globalChange:e=>{const t=Zx(e,"qHyperCubeDef.qMeasures",[]).reduce((e,t)=>(Array.isArray(t.qTrendLines)&&e.push(...t.qTrendLines),e),[]),r=(e=>!Zx(e,"dimensionAxis.continuousAuto",!1)&&e.preferContinuousAxis)(e)?"Possible":"Never";t.forEach(e=>{e.qContinuousXAxis=r}),n.onGlobalChange(e,t)},items:{label:{ref:"label",type:"string",expression:"optional",translation:"Common.Label",defaultValue:""},type:{ref:"qType",type:"string",component:"dropdown",translation:AW.TYPE,options:[{value:bW,translation:AW.TYPES.AVERAGE},{value:xW,translation:AW.TYPES.LINEAR},{value:SW,translation:AW.TYPES.POLYNOMIAL2},{value:wW,translation:AW.TYPES.POLYNOMIAL3},{value:MW,translation:AW.TYPES.POLYNOMIAL4},{value:kW,translation:AW.TYPES.EXPONENTIAL},{value:CW,translation:AW.TYPES.LOG},{value:qW,translation:AW.TYPES.POWER}],defaultValue:bW},autoColor:{ref:"style.autoColor",type:"boolean",translation:"properties.colors",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},paletteColor:{ref:"style.paletteColor",translation:"properties.color",type:"object",component:"color-picker",dualOutput:!0,defaultValue:_W,show:e=>!e.style.autoColor},dashed:{ref:"style.dashed",translation:AW.STYLE.DASHED,type:"boolean",defaultValue:!0,change:UW}}}}var GW,XW;var JW=function(){if(XW)return GW;XW=1;var e={};function t(){t.init.call(this)}return e.isObject=function(e){return"object"==typeof e&&null!==e},e.isNumber=function(e){return"number"==typeof e},e.isUndefined=function(e){return void 0===e},e.isFunction=function(e){return"function"==typeof e},GW=t,t.EventEmitter=t,t.prototype._events=void 0,t.prototype._maxListeners=void 0,t.defaultMaxListeners=10,t.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},t.prototype.setMaxListeners=function(t){if(!e.isNumber(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},t.prototype.emit=function(t){var n,r,i,o,a,s;if(this._events||(this._events={}),"error"===t&&!this._events.error)throw(n=arguments[1])instanceof Error?n:Error('Uncaught, unspecified "error" event.');if(r=this._events[t],e.isUndefined(r))return!1;if(e.isFunction(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:for(i=arguments.length,o=new Array(i-1),a=1;a<i;a++)o[a-1]=arguments[a];r.apply(this,o)}else if(e.isObject(r)){for(i=arguments.length,o=new Array(i-1),a=1;a<i;a++)o[a-1]=arguments[a];for(i=(s=r.slice()).length,a=0;a<i;a++)s[a].apply(this,o)}return!0},t.prototype.addListener=function(n,r){var i;if(!e.isFunction(r))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",n,e.isFunction(r.listener)?r.listener:r),this._events[n]?e.isObject(this._events[n])?this._events[n].push(r):this._events[n]=[this._events[n],r]:this._events[n]=r,e.isObject(this._events[n])&&!this._events[n].warned)&&((i=e.isUndefined(this._maxListeners)?t.defaultMaxListeners:this._maxListeners)&&i>0&&this._events[n].length>i&&(this._events[n].warned=!0,e.isFunction(console.error)&&console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[n].length),e.isFunction(console.trace)&&console.trace()));return this},t.prototype.on=t.prototype.addListener,t.prototype.once=function(t,n){if(!e.isFunction(n))throw TypeError("listener must be a function");var r=!1;function i(){this.removeListener(t,i),r||(r=!0,n.apply(this,arguments))}return i.listener=n,this.on(t,i),this},t.prototype.removeListener=function(t,n){var r,i,o,a;if(!e.isFunction(n))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(o=(r=this._events[t]).length,i=-1,r===n||e.isFunction(r.listener)&&r.listener===n)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,n);else if(e.isObject(r)){for(a=o;a-- >0;)if(r[a]===n||r[a].listener&&r[a].listener===n){i=a;break}if(i<0)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(i,1),this._events.removeListener&&this.emit("removeListener",t,n)}return this},t.prototype.removeAllListeners=function(t){var n,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(n in this._events)"removeListener"!==n&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[t],e.isFunction(r))this.removeListener(t,r);else if(Array.isArray(r))for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},t.prototype.listeners=function(t){return this._events&&this._events[t]?e.isFunction(this._events[t])?[this._events[t]]:this._events[t].slice():[]},t.listenerCount=function(t,n){return t._events&&t._events[n]?e.isFunction(t._events[n])?1:t._events[n].length:0},GW}(),ZW=mg(JW);const QW={shapes:[{type:"path",attrs:{d:"M15.9488039,5.20769129 C16.0487326,6.70662306 15.3492311,8.30548361 14.050157,9.30477145 C12.651154,10.5039169 10.8524359,10.8037032 8.85386017,10.4039881 L7.3549284,10.0042729 L5.75606786,9.70448659 C5.75606786,9.90434416 5.65613907,10.0042729 5.4562815,10.2041305 C5.05656637,10.6038456 4.55692244,10.8037032 4.05727852,10.8037032 C3.75749217,10.8037032 3.45770582,10.7037744 3.15791946,10.6038456 C3.05799068,10.903632 3.15791946,11.2034184 3.45770582,11.7030623 C5.05656637,14.0014243 3.85742095,15.9000712 3.75749217,16 L2.2585604,15.3004985 C2.2585604,15.2005697 2.95806189,14.0014243 1.95877405,12.6024213 C1.6589877,12.0028486 1.15934378,11.0035608 1.55905891,10.0042729 C1.6589877,9.80441537 1.75891648,9.6045578 1.95877405,9.40470024 C1.6589877,8.90505631 1.55905891,8.30548361 1.85884527,7.7059109 C1.55905891,7.40612455 1.25927256,7.1063382 1.15934378,6.70662306 C0.859557424,5.90719279 0.959486209,4.5081898 1.6589877,3.30904439 C1.95877405,2.6095429 2.55834676,2.0099702 3.15791946,1.51032628 C3.95734974,0.91075357 4.95663758,0.610967217 6.15578299,0.311180864 C9.05371774,-0.388320626 11.9516525,0.111323295 13.9502282,1.61025506 C15.1493736,2.50961412 15.8488751,3.80868831 15.9488039,5.20769129 Z M13.0508691,8.10562604 C13.8502994,7.40612455 14.3499433,6.40683671 14.3499433,5.30762008 C14.2500145,4.20840345 13.550513,3.40897318 12.9509403,2.90932926 C12.1515101,2.40968533 11.252151,2.0099702 10.1529344,1.81011263 C8.95378895,1.61025506 7.75464354,1.71018384 6.45556935,1.91004141 C4.75678001,2.30975655 3.65756338,3.00925804 3.05799068,4.10847467 C2.55834676,5.00783373 2.65827554,5.90719279 2.75820433,6.20697914 C2.75820433,6.30690792 2.85813311,6.40683671 3.05799068,6.40683671 C3.15791946,6.40683671 3.25784825,6.40683671 3.35777703,6.40683671 C3.45770582,6.40683671 3.45770582,6.40683671 3.45770582,6.40683671 L3.5576346,6.40683671 L3.65756338,6.40683671 C4.65685123,6.40683671 5.4562815,6.90648063 5.85599664,7.80583969 L5.85599664,8.00569726 C6.35564056,8.10562604 7.05514205,8.30548361 7.75464354,8.50534118 L9.25357531,8.90505631 C10.0530056,9.0049851 10.7525071,9.0049851 11.4520086,8.80512753 C12.0515813,8.70519875 12.5512252,8.40541239 13.0508691,8.10562604 Z"}}]};function eU(){const[t]=e.useState({}),[n]=e.useState({}),r=function(){const t=e.useLayout(),n=e.useTranslator(),r=!!t?.qSelectionInfo?.qInSelections,i=!!t?.qHyperCube?.qDimensionInfo?.[0]?.qIsOneAndOnlyOne,[o,a]=e.useState(!1),[s,l]=e.useState(!1),[c,u]=e.useState({key:"lasso",enabled:()=>!1,active:()=>!1,action:()=>!1}),d=e=>{l("boolean"==typeof e?e:!s)};return e.useAction(()=>(u({key:"lasso",action:d,enabled:()=>o,active:()=>s}),{key:"lasso",label:n.get(s?"Tooltip.ToggleOffLassoSelection":"Tooltip.ToggleOnLassoSelection"),icon:QW,hidden:!o||!r||i,active:s,action:d}),[r,i,s,o,n.language()]),{get:()=>c,setAllows:e=>{a(!!e)}}}(),[i,o]=e.useState();return e.useEffect(()=>{const e={};e.scroll={key:"scroll",isActive:!0,isEnabled:!0,action(){this.isActive=!this.isActive},active(){return this.isActive},enabled(){const{layoutService:e,discrete:r}=t;return n.allowScroll&&(e?.meta.isContinuous||r?.query.getCanScroll())}},e.interact={key:"interact",isEnabled:!0,enabled:()=>n.allowInteract},e.tooltip={key:"tooltip",isActive:!0,isEnabled:!0,action(e){this.isActive=!!e},active(){return this.isActive},enabled:()=>n.allowTooltip},e.select={key:"select",isActive:!1,isEnabled:!0,action(){this.isActive=!this.isActive},active(){return this.isActive},enabled:()=>n.allowSelect},e.lasso=r.get(),Object.keys(e).forEach(t=>{return n=e[t],Object.keys(ZW.prototype).forEach(e=>{n[e]=ZW.prototype[e]}),ZW.init(n),n;var n}),o(e)},[]),e.useEffect(()=>{i&&r&&(i.lasso={...i.lasso,...r.get()})},[r]),{get:()=>i,setAllows:e=>{Object.assign(n,e),r.setAllows(e?.allowSelect)},setContext:e=>{Object.assign(t,e)},destroy:()=>{Object.keys(i).forEach(e=>i[e].removeAllListeners())}}}var tU={SPARK:{DEFAULT:7,SQUEEZE:7,LABELLESS:7},XSMALL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},SMALL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},MEDIUM:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},FULL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20}},nU={SCALE:{MAIN:{MINOR:"minor",MAJOR:"major",MAJOR_INNER:"majorInner",COLOR:"fill"},REDUCED:{MINOR:"miniMinor",MAJOR:"miniMajor",COLOR:"reducedFill"}},COMPONENT:{BAR:"bar",MINI_BAR:"mini-marker",GHOST_BAR_OOB:"ghost-bar",BAR_AXIS:"bar-axis",GROUP_AXIS:"group-axis",BAR_OOB_MAX:"bar-oob-max",BAR_OOB_MIN:"bar-oob-min",STACK_TOTAL_BAR:"stack-total-bar",BASE_TOOLTIP:"tooltip-qcm",SPACE:"space",LEGEND_CAT_TOOLTIP:"legend-cat-tooltip",LEGEND_COLOR_CAT:"legend-color-cat",MEASURE_REF_LINE:"mes-ref-line",DIMENSION_REF_LINE:"dim-ref-line",MEASURE_REF_LINE_LABEL:"mes-ref-line-label",DIMENSION_REF_LINE_LABEL:"dim-ref-line-label",TREND_LINES_TOOLTIP:"trend-lines-tooltip",TREND_LINES_TOOLTIP_OVERLAY:"trend-lines-tooltip-overlay"},COLLECTION:{MAIN:"main-collection",MINI:"mini-collection",MINI_STACK:"mini-stack-collection",MINI_CONTINUOUS:"mini-continuous-collection",STACK_TOTAL:"stack-total-collection"},FORMATTER:{MINOR:"bar",COLOR:"fill"}};const rU=({layout:e})=>{const t=e?.qHyperCube?.qDimensionInfo?.filter(e=>e.qError?.qErrorCode!==T$),n=e?.qHyperCube?.qMeasureInfo?.filter(e=>e.qError?.qErrorCode!==T$);return 1===(t?.length??0)&&2===(n?.length??0)};function iU(e,t,n="/qHyperCubeDef"){return{fetch(){return function(e,t,n){return e.getHyperCubeReducedData(n.path,[n.rect],n.zoomLevel,n.filter).catch(ET).then(e=>{const n=t.getHyperCubeValue("qMode"),r=t.getHyperCubeValue("qDimensionInfo"),i="K"===n&&r.length>1&&e[0]?.qIsReduced,o=e.slice(),a=t.getHyperCubeValue("qMeasureInfo"),s=i?[]:t.getHyperCubeValue("qColumnOrder");return{reducedCube:{qDataPages:o,qDimensionInfo:r.slice(),qEffectiveInterColumnSortOrder:[1,0],qMeasureInfo:i?[a[0],a[0]]:a.slice(),qStackedDataPages:[],qMode:"S",qHasOtherValues:t.getHyperCubeValue("qHasOtherValues"),qSize:t.getHyperCubeValue("qSize"),qColumnOrder:s}}})}(e,t,this.settings())},settings(){const e=t.getHyperCubeValue("qDimensionInfo"),r=t.meta.isStacked&&e.length>1?1:0,i=t.getHyperCubeValue("qMeasureInfo");return{path:n,rect:{qTop:0,qLeft:r,qWidth:e.length+i.length+r,qHeight:Math.min(2e3,1e4/(i.length+1))},zoomLevel:-1,filter:"D1"}}}}function oU({enigma:e,layoutService:t,viewModel:n,definitionPath:r,reducedHyperCubePath:i},o={}){const a=iU(e,t,r),s=function(e,t="reducedHyperCube"){return{fetch:()=>Promise.resolve({reducedCube:e.getLayoutValue(t)||e.getHyperCube()})}}(t,i),l=function(e){return{fetch:()=>{const t=e.getHyperCube(),n={...t,qDataPages:t.qDataPages.slice()};return Promise.resolve({reducedCube:n})}}}(t),c=function({layoutService:e}){const{isSnapshot:t,isStackedByDimension:n}=e.meta,r=e=>{e.qDimensionInfo.unshift({key:"dummy-patch-dimension"})};return r.should=e=>t&&n&&1===e.qDimensionInfo.length,r}({layoutService:t}),u={mode:{isReduced:!1}};return{fetch(){if(t.meta.isSnapshot)return s.fetch();if(t.meta.isContinuous)return l.fetch();if(!t.meta.isStacked){if(t.getHyperCubeValue("qSize.qcy",NaN)===t.getHyperCubeValue("qDataPages.0.qArea.qHeight",NaN))return l.fetch()}return a.fetch()},model:()=>u,update(e){var r;c.should(e)&&c(e),u.mode=kg(u.mode,t.meta),u.mode.isReduced=e.qDataPages[0]&&e.qDataPages[0].qIsReduced,u.mode.isStackedByDimension=u.mode.isStacked&&(2===(r=e).qDimensionInfo.length&&2===r.qMeasureInfo.length),u.mode.isStackedByMeasure=u.mode.isStacked&&function(e){return e.qMeasureInfo.length>1&&1===e.qDimensionInfo.length}(e),u.fields={major:u.mode.isStackedByDimension?"qDimensionInfo/"+(e.qDimensionInfo.length-1):n.fields.major,majorGroup:n.fields.majorGroup,minor:u.mode.isStackedByDimension?e.qMeasureInfo.map((e,t)=>`qMeasureInfo/${t}`):n.fields.minor},u.scales={major:nU.SCALE.REDUCED.MAJOR,minor:nU.SCALE.REDUCED.MINOR},u.cube=e,o.qDataPages=e.qDataPages},fetchMinMaxData(){if(o.qDataPages)return Promise.resolve(o.qDataPages);let n=a.settings();const r="K"===t.getHyperCubeValue("qMode")?1:n.rect.qHeight;return n=kg(!0,{},n,{rect:{qHeight:r}}),e.getHyperCubeReducedData(n.path,[n.rect],n.zoomLevel,n.filter).then(e=>e)},setSnapshotData(e){e.reducedHyperCube=u.cube}}}function aU({clearMinor:e,clearLegend:t,clearDiscrete:n,clearContinuous:r,selectionInfo:i}){t({componentName:"legendRangeBrush"}),e({eventName:"measureRange",componentName:"measureRangeBrush"}),n({eventName:"discreteRange",componentName:"discreteRangeBrush",brushName:!1}),"tap"!==i.event&&r({componentName:"continuousRangeBrush",brushName:!1})}function sU({layout:e,defaultAuto:t}){return e.qHyperCube.qDimensionInfo.length>1?{mode:"byDimension",useDimColVal:!0,useBaseColors:"dimension",byDimDef:{activeDimensionIndex:1}}:e.qHyperCube.qMeasureInfo.length>1?{mode:"primary",useBaseColors:"measure",paletteColor:null}:t(e)}function lU({layoutService:e,node:t}){const{isGroupedByDimension:n,isStackedByDimension:r,isDimensionless:i}=e.meta;return n?`${t.data.label}, ${t.data.group.label}`:r?`${t.data.label}, ${t.data.stack.label}`:i?void 0:t.data.label}function cU({chart:e,actions:t,translator:n,rtl:r,viewState:i,viewModel:o,layoutService:a,dockService:s,colorService:l,themeService:c,trendLineModel:u,custom:d}){const{isTwoDimensional:f,isStacked:h,isGroupedByDimension:p,isGroupedByMeasure:m,isStackedByDimension:g,isStackedByMeasure:y}=a.meta,{fontFamily:v}=c.getStyles(),b=function({layoutService:e,dockService:t}){const{BAR_AXIS:n,BAR_OOB_MIN:r,BAR_OOB_MAX:i,GROUP_AXIS:o}=nU.COMPONENT,{isGrouped:a,isGroupedByDimension:s}=e.meta,{orientation:l}=t.meta.chart,c="vertical"===l;return[({chart:e,hovered:t,meta:l,collected:u,collectedBounds:d})=>{const[f]=t,{triggerer:h}=l;if(h===r||h===i)return{key:f.key,bounds:f.bounds};if(c&&(h===n||h===o)){const t=e.findShapes("path").find(e=>s&&h===n?(e.key===r||e.key===i)&&e.data.value===f.data.value&&e.data.group.value===f.data.group.value:(e.key===r||e.key===i)&&e.data.value===f.data.value),o=e.findShapes("path").find(e=>s&&h===n?e.key===i&&e.data.value===f.data.value&&e.data.group.value===f.data.group.value:e.key===i&&e.data.value===f.data.value);if(t)return a?{key:o?o.key:nU.COMPONENT.BAR,bounds:d}:{key:t.key,bounds:t.bounds}}if(!c){const t=!u.some(e=>e.bounds.height+e.bounds.width!==0);if(t){const t=e.findShapes("path").find(e=>s&&h===n?(e.key===r||e.key===i)&&e.data.value===f.data.value&&e.data.group.value===f.data.group.value:(e.key===r||e.key===i)&&e.data.value===f.data.value);if(t)return{key:t.key,bounds:t.bounds}}}return!1},"collectible"]}({layoutService:a,dockService:s}),x=WW({majorInnerScale:nU.SCALE.MAIN.MAJOR_INNER,tooltip:nU.COMPONENT.TREND_LINES_TOOLTIP,tooltipOverlay:nU.COMPONENT.TREND_LINES_TOOLTIP_OVERLAY},{chart:e,viewState:i,trendLineModel:u,layoutService:a,rtl:r}),S=({collected:t,triggerer:n})=>{if(h){t.splice(0,t.length);const r=e.findShapes("container").filter(e=>e.key===nU.COMPONENT.BAR&&e.data?.stack.value===n.data.value).filter(e=>y?e.data?.value===n.data.value:e.data?.stack.value===n.data.value);r.forEach(e=>{if(e.children.length){const[n]=e.children;n.key=e.key,t.push(n)}else t.push(e)})}};return ik({chart:e,translator:n,config:{rtl:r,enable:()=>t.tooltip.enabled(),getColorSettings:()=>l.getMain().getSettings(),style:{fontFamily:v},main:{key:nU.COMPONENT.BASE_TOOLTIP,suppress:({event:e})=>x(e),getGroupByValue:({data:e})=>e.value,collectibles:[{key:nU.COMPONENT.BAR,type:"bar",major:({data:e,meta:t})=>m?t.triggerer===nU.COMPONENT.BAR_OOB_MIN||t.triggerer===nU.COMPONENT.BAR_OOB_MAX?[e.value,e.measureIndex.value]:e.value:p?t.triggerer===nU.COMPONENT.BAR_AXIS||t.triggerer===nU.COMPONENT.BAR_OOB_MIN||t.triggerer===nU.COMPONENT.BAR_OOB_MAX?[e.value,e.group.value]:e.group.value:g?e.stack.value:e.value},{key:`${nU.COMPONENT.GHOST_BAR_OOB}-min`,type:"bar",if:()=>!y&&!g,major:({data:e,meta:t})=>m?t.triggerer===nU.COMPONENT.BAR_OOB_MIN||t.triggerer===nU.COMPONENT.BAR_OOB_MAX?[e.value,e.measureIndex.value]:e.value:p?t.triggerer===nU.COMPONENT.BAR_OOB_MIN||t.triggerer===nU.COMPONENT.BAR_OOB_MAX||t.triggerer===nU.COMPONENT.BAR_AXIS?[e.value,e.group.value]:e.group.value:e.value},{key:`${nU.COMPONENT.GHOST_BAR_OOB}-max`,type:"bar",if:()=>!y&&!g,major:({data:e,meta:t})=>m?t.triggerer===nU.COMPONENT.BAR_OOB_MIN||t.triggerer===nU.COMPONENT.BAR_OOB_MAX?[e.value,e.measureIndex.value]:e.value:p?t.triggerer===nU.COMPONENT.BAR_OOB_MIN||t.triggerer===nU.COMPONENT.BAR_OOB_MAX||t.triggerer===nU.COMPONENT.BAR_AXIS?[e.value,e.group.value]:e.group.value:e.value}],triggers:[{keys:[nU.COMPONENT.BAR],collect:{from:"single"},placement:b},{keys:[nU.COMPONENT.BAR_AXIS],collect:{from:"dimension",by:({data:e})=>p?[e.value,e.group.value]:e.value,after:S},placement:b},{keys:[nU.COMPONENT.BAR_OOB_MIN,nU.COMPONENT.BAR_OOB_MAX],collect:{from:"dimension",by:({data:e})=>m?[e.value,e.measureIndex.value]:p?[e.value,e.group.value]:e.value,after:S},placement:b},{keys:[nU.COMPONENT.GROUP_AXIS],collect:{from:"dimension",by:({data:e})=>e.group.value},placement:b}],layout:{grouping:f,single:()=>!(!d.isEnabled()||!d.hasImages())||d.chart.isEnabled()},section:({h:t,nodes:n,dataset:r,formatter:i,create:s,util:l})=>{const[c]=n,{title:u,description:f,measures:h}=d.isEnabled()?d.getAttributes({dataset:r,nodes:[c]}):{},p=[];u&&p.push(s.text({value:u,style:{bold:!0},survive:{visibility:!0},visibility:{count:!1}})),f&&p.push(s.text({value:f,survive:{visibility:!0},visibility:{count:!1}}));const m=d.hideBasic();if(m&&!h.length&&(u||f)||p.push(s.text({value:lU({layoutService:a,node:c}),style:{bold:!0}})),!m){const t=void 0!==c.data.fill?.value?e.scale(nU.SCALE.MAIN.COLOR)(c.data.fill.value):void 0;p.push(s.color({nodes:n,property:nU.SCALE.MAIN.COLOR,fillColor:t})),p.push(...n.map(e=>function({viewModel:e,layoutService:t,formatter:n,create:r,util:i,node:o}){const{isStacked:a,isStackedByDimension:s}=t.meta;if(a){const t=n(nU.FORMATTER.MINOR),{segment:a}=o.data,l=s&&t?t(a.value):a.label;return r.measure({label:i.dataset.title(o.data.source.key,e.fields.minor[s?0:o.data.measureIndex.value]),value:!0===o.data.null?.value||"NaN"===l?"-":l})}const{data:l}=o,{end:c}=l,{key:u,field:d}=c.source;return r.measure({label:i.dataset.title(u,d),value:c.label})}({viewModel:o,layoutService:a,formatter:i,create:s,util:l,node:e})))}h&&p.push(...h.map(e=>s.measure({label:e.label,value:e.value,survive:{color:!0,duplicate:!0,visibility:!0},visibility:{count:!1}}))),d.chart.isEnabled()&&(d.chart.hasLimitation()?(d.chart.destroy(),p.push(s.raw({value:d.chart.createLimitationRow(),survive:{visibility:!0},visibility:{count:!1}}))):p.push(s.raw({value:d.chart.createContainer({h:t}),survive:{visibility:!0},visibility:{count:!1}})));const{customTooltipImages:g}=c.data;return d.isEnabled()&&g&&p.push(...g.map(e=>s.raw({value:d.createImageRow({value:e,h:t}),survive:{visibility:!0},visibility:{count:!1}}))),p.filter(Boolean)},sections:({nodes:t,formatter:r,meta:i,create:o,sections:a})=>{if(!h||i.triggerer!==nU.COMPONENT.BAR_AXIS)return;const[s]=t,[l]=e.findShapes("container").filter(e=>e.key===nU.COMPONENT.STACK_TOTAL_BAR&&e.data&&e.data.value===s.data.stack.value);if(!l)return;const c=r(nU.FORMATTER.MINOR),u=[];if(l.data.sumOfPositives.value>0){const{value:e}=l.data.sumOfPositives;u.push(o.measure({label:n?n.get("Object.ChartTooltip.sumOfPositives"):"Sum of positives",value:c?c(e):e,visibility:{force:!0}}))}if(l.data.sumOfNegatives.value<0){const{value:e}=l.data.sumOfNegatives;u.push(o.measure({label:n?n.get("Object.ChartTooltip.sumOfNegatives"):"Sum of negatives",value:c?c(e):e,visibility:{force:!0}}))}a.unshift(o.section({content:[o.text({value:l.data.label,style:{bold:!0},visibility:{force:!0}}),...u]}),o.divider({visibility:{force:!0}}))},events:{tooltip:{beforeShow:({collectNodes:e})=>d.isEnabled()&&d.hasImages()?d.addImages({nodes:e()}):Promise.resolve(),afterShow:({expando:e,nodes:t})=>{d.chart.isEnabled()&&!d.chart.hasLimitation()&&d.chart.show({nodes:t,properties:e.get("properties")})}},interaction:{mouseleave:()=>{d.chart.isEnabled()&&d.chart.hasAlternateState()&&d.chart.hide()}}}},legend:{keys:{tooltip:nU.COMPONENT.LEGEND_CAT_TOOLTIP,component:nU.COMPONENT.LEGEND_COLOR_CAT}}}})}const uU={getMaxGlyphCount(e,t){const{qDimensionInfo:n}=e,{qApprMaxGlyphCount:r}=n[t];return r},getDimensionSize(e){const t=e?.qCardinalities?.qHypercubeCardinal,{qLocked:n=0,qOption:r=0,qSelected:i=0}=e?.qStateCounts||{};return[void 0,0].includes(t)?n+r+i:t}};function dU({layoutService:e}){return function(e){var t,n=e.layout,r=e.config,i=void 0===r?{}:r,o={disclaimer:void 0,isSuppressing:!1,showDisclaimer:null!==(t=i.args)&&void 0!==t&&t.layoutService?i.args.layoutService.getLayoutValue("showDisclaimer"):null==n?void 0:n.showDisclaimer};return{initialize:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).args;o.disclaimer=function(e){var t=e.args,n=e.disclaimers,r=[];return Object.keys(n).forEach(function(e){var i=jx[e],o=n[e];o&&(o.condition||(null==i?void 0:i.condition)||Bx)(t)&&r.push({key:(null==i?void 0:i.translationKey)||(null==i?void 0:i.key)||e,alignment:o.alignment||(null==i?void 0:i.alignment)||Fx})}),r.find(function(e){return e.alignment===zx})||r[0]}({args:py(py({layout:n},i.args),e),disclaimers:i.disclaimers||{}}),o.isSuppressing=!(!o.disclaimer||o.disclaimer.alignment!==zx)},getDisclaimer:function(){return o.isSuppressing?o.disclaimer:!1===o.showDisclaimer?void 0:o.disclaimer},getHasSuppressingDisclaimer:function(){return o.isSuppressing}}}({config:{args:{layoutService:e},disclaimers:{NoDataExist:!0,OnlyNanDataMeasure:!0,OnlyNanDataDimensionContinuous:!0,LimitedData:{condition:()=>{const{isContinuous:t,isTwoDimensional:n}=e.meta;if(!t||!n)return!1;const r=e.getLayout().qHyperCube.qDimensionInfo[1];return uU.getDimensionSize(r)>vT.maxNumberOfLines}},OnlyNegativeValues:{condition:()=>{if(e.meta.isButterfly){const{qMeasureInfo:t}=e.getHyperCube();return t.every(e=>{const{qMin:t,qMax:n}=e;return t<0&&n<0})}return!1},alignment:"center"},NegativeValues:{condition:()=>{if(e.meta.isButterfly){const{qMeasureInfo:t}=e.getHyperCube();return t.some(e=>{const{qMin:t}=e;return t<0})}return!1}}}}})}function fU({picasso:t,chart:n,environment:r,viewState:i,viewCache:o}){const a=e.useStaleLayout(),s=e.useModel(),l=e.useApp(),c=e.usePlugins(),u=e.useSelections(),d=e.useOptions(),[f,h]=e.useState(),[p,m]=e.useState(),[g,y]=e.useState(),v=e.useConstraints(),b=eU();return e.useEffect(()=>{if(!n)return()=>{};const e=b.get(),t=function({chart:e,actions:t,selections:n}){const r=e.scale(nU.SCALE.MAIN.MAJOR),i=mM({chart:e,actions:t,selections:n,config:{allowSimultaneous:!0,brushRanges:!0,majorScale:r,selectionActions:{reset(){e.brushSelectionIncludeMax=void 0,t.lasso.active()&&t.lasso.action(!1)},clear:aU},custom:{getActions:()=>t},setBrushAliases({defaultFunc:e,brush:t}){e(),t.addKeyAlias("miniCube/qDimensionInfo/0","qHyperCube/qDimensionInfo/0"),t.addKeyAlias("miniCube/qDimensionInfo/1","qHyperCube/qDimensionInfo/1")}}});return i}({chart:n,actions:e,selections:u});return m(e),y(t),()=>{t.destroy(),b.destroy()}},[n]),e.useEffect(()=>{if(!v)return;const e={allowScroll:!v.active,allowInteract:!v.active,allowTooltip:!v.passive,allowSelect:!v.select&&!v.active};b.setAllows(e)},[v]),e.useEffect(()=>{if(!g||!r)return;const{theme:e,translator:u,localeInfo:f,flags:m,embed:y}=r,{direction:v="ltr"}=d,x="rtl"===v,S=cS({source:a,metaAdditionsFn:({layout:e})=>{const t=vT.canBeContinuous(e),n=CT.continuous({layout:e}),r=CT.dimensionless(e),i=rU({layout:e})&&"butterfly"===e?.barGrouping?.grouping;return{canBeContinuous:t,isDiscrete:!n,isContinuous:n,isTime:vT.isTime(n,e),isDimensionless:r,isSimple:CT.simple(e),isGrouped:!i&&CT.grouped(e),isGroupedByMeasure:!i&&CT.groupedByMeasure(e),isGroupedByDimension:!i&&CT.groupedByDimension(e),isStacked:!i&&CT.stacked(e),isStackedByDimension:!i&&CT.stackedByDimension(e),isStackedByMeasure:!i&&CT.stackedByMeasure(e),isSnapshot:CT.snapshot(e),isButterfly:i}},experimental:{filter:!0}});g.setFilteredFields(S.meta.filteredFields);const w=function(e){return e.color.auto?e.qHyperCube.qDimensionInfo.length>1:"byDimension"===e.color.mode&&e.color.byDimDef&&e.color.byDimDef.activeDimensionIndex>-1}(S.getLayout())?cS({source:S.getLayout()}):void 0,M=function({layout:e,options:t={}}){return!(!e?.snapshotData||t.freeResize)&&{width:e.snapshotData.content.size.w,height:e.snapshotData.content.size.h}}({layout:a,options:d}),k=function({layoutService:e,viewCache:t,options:n}){const r={};return r.fields=function(e){const{meta:t}=e,n={majorGroup:t.isGroupedByDimension?"qDimensionInfo/0":void 0,majorStack:t.isStacked?"qDimensionInfo/0":void 0,major:t.isDimensionless?void 0:"qDimensionInfo/"+(t.dimensionCount-1),majors:e.getHyperCubeValue("qDimensionInfo").map((e,t)=>`qDimensionInfo/${t}`),minor:e.getHyperCubeValue("qMeasureInfo").map((e,t)=>`qMeasureInfo/${t}`)};return n.majorNumeric=`${t.isStackedByDimension?n.majorStack:n.major}:numeric`,n}(e),r.selectionDimensionIdx=(e=>{const t=e.qDimensionInfo.length;for(let n=0;n<t;n++){const r=e.qDimensionInfo[n];if(!(r.qLocked||r.qCardinalities.qHypercubeCardinal<=1&&n<t-1))return n}})(e.getHyperCube()),r.isDimensionLocked=t=>e.getHyperCube().qDimensionInfo[t].qLocked,r.selectionDimensionProp=e=>void 0===r.selectionDimensionIdx||void 0!==e&&r.selectionDimensionIdx!==e?{}:{selectionDimension:{field:r.selectionDimensionIdx}},r.animations={enabled:()=>!(!1===n.chartAnimations||r.animations.isPartialUpdating||r.animations.isSizeChanging||r.animations.hasSlicedHats||GN.propertiesHaveChanged({viewCache:t,layout:e.getLayout()})),isPartialUpdating:!1,isSizeChanging:!1,hasSlicedHats:!1},r}({layoutService:S,viewCache:o,options:d}),C=Jx({chart:n,layoutService:S,config:{logicalSize:M,rtl:x},typeConfig:{type:"major-minor",fallback:"vertical",invert:!0}}),q=dU({layoutService:S}),E=function(e){var t=e.theme,n=e.config,r=void 0===n?{}:n,i=r.id,o=r.resolve,a=void 0===o?[]:o,s=r.transform,l=void 0===s?[]:s,c=r.extend,u=void 0===c?[]:c,d={theme:t,matrix:wM(a),styles:void 0};return d.styles=CM({theme:t,id:i,transform:l,extend:u,matrix:d.matrix}),{getStyles:function(){return d.styles},getTheme:function(){return d.theme},setTheme:function(e){d.theme=e,d.styles=CM({theme:e,id:i,transform:l,extend:u,matrix:d.matrix})}}}({theme:e,config:{id:"barChart",transform:[["label.value.fontSize",e=>parseInt(e,10)]],resolve:[["object","plugins.label","fontFamily",'"Source Sans Pro", "Arial", "sans-serif"'],["object","plugins.label","fontSize","12px"]]}}),D=dT.model({model:s,layoutService:S,viewCache:o,viewState:i}),T=oU({enigma:s,layoutService:S,viewModel:k});!function({layoutService:e,viewState:t,viewStateOptions:n={}}){const r=e.meta.isSnapshot?e.getLayoutValue("snapshotData.content.chartData",{}):n;t.preventSet("scrollOffset",r.scrollOffset),t.preventSet("legendScrollOffset",r.legendScrollOffset||0),r.zoom&&t.preventSet("zoom",r.zoom)}({layoutService:S,viewState:i,viewStateOptions:d?.viewState});const O=function({app:e,model:t,translator:n,picasso:r,localeInfo:i,theme:o,continuousDataModel:a,layoutService:s,legendLayoutService:l,reducedDataModel:c}){const{isContinuous:u,isStacked:d}=s.meta,f={main:void 0,mini:{getScales:()=>({}),getColor:()=>e=>e,getDatumProps:()=>({}),getAuxiliarySettings:()=>{}}};return{initialize:()=>{const h=[],{isReduced:p}=c.model().mode,m=u||p||d,g=!u&&(p||d)&&l?l.getHyperCube():void 0,y=g?"legendCube":void 0;return f.main=Rx({app:e,model:t,translator:n,picasso:r,layoutService:s,config:{localeInfo:i,auto:sU,key:nU.SCALE.MAIN.COLOR},createConfig:()=>({hc:m?g||s.getHyperCube():c.model().cube,source:m?y:"miniCube",theme:o})}),h.push(f.main.initialize()),u&&(f.mini=Rx({app:e,model:t,translator:n,picasso:r,layoutService:s,config:{localeInfo:i,auto:sU,key:nU.SCALE.REDUCED.COLOR},createConfig:()=>({layout:a.getInitialLayout(),hc:a.getInitialCube(),source:"miniCube",theme:o})}),h.push(f.mini.initialize())),Promise.all(h)},getMain:()=>f.main,getMini:()=>f.mini}}({picasso:t,model:s,app:l,translator:u,localeInfo:f,theme:e,continuousDataModel:D,layoutService:S,legendLayoutService:w,reducedDataModel:T}),N=function(e){var t,n=e.app,r=e.translator,i={initialized:!1,dimensions:[],measures:[]};return{initialize:(t=dy(gy().m(function e(t){var o,a,s,l,c,u,d;return gy().w(function(e){for(;;)switch(e.n){case 0:if(o=t.properties,!i.initialized){e.n=1;break}return e.a(2);case 1:return s=[Jv(a={app:n,translator:r,properties:o}),eb(a)],e.n=2,Promise.all(s);case 2:l=e.v,c=vy(l,2),u=c[0],d=c[1],i.dimensions=u,i.measures=d,i.initialized=!0;case 3:return e.a(2)}},e)})),function(e){return t.apply(this,arguments)}),getAlternatives:function(){return{dimensions:by(i.dimensions),measures:by(i.measures)}}}}({app:l,translator:u}),A=function({layoutService:e,themeService:t,colorService:n}){const r=t.getStyles(),i=t=>(e.getLayoutValue("components",[])||[]).find(e=>e.key===t),o=(e,t)=>{const r=n.getMain().getPaletteColor;if(e?.color&&r){const n=r(e);return"none"===n&&e.index>0?e?.color??t:n??t}return t};return{axis:{title:{getStyle:()=>{const e=i("axis")?.axis?.title;return{fontFamily:e?.fontFamily??r.axis.title.fontFamily,fontSize:e?.fontSize??r.axis.title.fontSize,color:o(e?.color,r.axis.title.color)}}},label:{getStyle:()=>{const e=i("axis")?.axis?.label?.name;return{fill:o(e?.color,r.axis.label.name.color),fontSize:e?.fontSize??r.axis.label.name.fontSize,fontFamily:e?.fontFamily??r.axis.label.name.fontFamily}}}},legend:{title:{getStyle:()=>{const e=i("legend")?.legend?.title;return{fontFamily:e?.fontFamily??r.legend.title.fontFamily,fontSize:e?.fontSize??r.legend.title.fontSize,color:o(e?.color,r.legend.title.color)}}},label:{getStyle:()=>{const e=i("legend")?.legend?.label;return{fontFamily:e?.fontFamily??r.legend.label.fontFamily,fontSize:e?.fontSize??r.legend.label.fontSize,color:o(e?.color,r.legend.label.color)}}}},label:{getStyle:()=>{const e=i("label")?.label?.value;return{fill:o(e?.color,r.label.value.color),useContrastColor:e?.useContrastColor??!0,fontSize:e?.fontSize??r.label.value.fontSize,fontFamily:e?.fontFamily??r.label.value.fontFamily}}}}}({layoutService:S,themeService:E,colorService:O}),_=PW({layoutService:S,viewState:i,colorModel:{settings:()=>O.getMain().getSettings(),resolveUIColor:e=>O.getMain().getPaletteColor(e)},chart:n,env:r,keys:{colorScale:nU.SCALE.MAIN.COLOR},isEnabled:()=>!S.meta.isGroupedByDimension&&!S.meta.isDimensionless});q$.attrExpr.updateProperties(s,a);const I=v$({layout:a,app:l,model:s,picasso:t,chart:n,translator:u,localeInfo:f,embed:y}),L=D$({app:l,chart:n,embed:y,flags:m,layout:S.getLayout(),localeInfo:f,model:s,options:{direction:d.direction},picasso:t,translator:u}),P=cU({chart:n,actions:p,translator:u,rtl:x,viewState:i,viewModel:k,layoutService:S,dockService:C,colorService:O,themeService:E,trendLineModel:_,custom:L});let R;S.meta.isDiscrete&&(R=vW({chart:n,actions:p,componentKey:nU.COMPONENT.BAR,enigmaModel:s,layoutService:S,dockService:C,trendLineModel:_,itemWidths:tU,viewState:i,rtl:x,options:{axisKey:nU.COMPONENT.BAR_AXIS,renderer:t.renderer("svg")()}}));const z=nA({layoutService:S,discreteModel:R}),F=function(e){return{layout:e.getLayout(),keys:{SCALE:{MAIN:{MINOR:nU.SCALE.MAIN.MINOR,MAJOR:nU.SCALE.MAIN.MAJOR}},COMPONENT:{BAR:nU.COMPONENT.BAR,BAR_AXIS:nU.COMPONENT.BAR_AXIS,Y_AXIS:"y-axis",MEASURE_TITLE:"measure-title",DIMENSION_TITLE:"dimension-title"},COLLECTION:{MAIN:nU.COLLECTION.MAIN}}}}(S),j=function(e){var t=e.picassoInstance,n=e.plugins,r=e.pluginArgs,i=void 0===r?{}:r,o={initialized:!1,definitions:[]};return{initialize:function(){return dy(gy().m(function e(){var r,a,s,l;return gy().w(function(e){for(;;)switch(e.n){case 0:if(!o.initialized){e.n=1;break}return e.a(2);case 1:return a=Promise.all(n.filter(function(e){return"custom-component"===e.info.type}).map(function(){var e=dy(gy().m(function e(n){var r;return gy().w(function(e){for(;;)switch(e.n){case 0:if(n.info.componentName){e.n=1;break}throw new Error("plugin-service: Custom component is missing componentName");case 1:return e.n=2,n.fn(py({},i));case 2:if("object"===xy(r=e.v)){e.n=3;break}throw new Error("plugin-service: Custom component needs to be an object");case 3:t.component(n.info.componentName,r);case 4:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}())),s=Promise.all(n.filter(function(e){return"component-definition"===e.info.type}).map(function(e){return e.fn(py({},i))})),e.n=2,Promise.all([a,s]);case 2:l=e.v,o.initialized=!0,(r=o.definitions).push.apply(r,by(l[1]));case 3:return e.a(2)}},e)}))()},extendComponents:function(e){return o.initialized?(o.definitions.filter(Boolean).forEach(function(t){var n=vy(e.filter(function(e){return e.key&&e.key===t.key}),1)[0];if(n){var r=rb(!0,{},n.brush);rb(!0,n,t),t.brush&&(n.brush=function(e,t){return"object"===xy(e)&&Object.keys(e).length?(Array.isArray(t.consume)&&(e.consume=uS({originalArray:e.consume,newArray:t.consume,matchKey:"context"})),Array.isArray(t.trigger)&&(e.trigger=uS({originalArray:e.trigger,newArray:t.trigger,matchKey:"on"})),e):t}(r,t.brush))}else e.push(t)}),e):e}}}({picassoInstance:t,plugins:c||[],pluginArgs:F});b.setContext({discrete:R,layoutService:S}),h({alternativeService:N,discrete:R,continuous:dT,legendLayoutService:w,layoutService:S,viewModel:k,dockService:C,themeService:E,styleService:A,continuousDataModel:D,reducedDataModel:T,colorService:O,trendLineModel:_,refLineModel:z,pluginService:j,customTooltipModel:I,tooltipService:P,selectionService:g,logicalSize:M,disclaimerService:q,customTooltipService:L})},[g,d,r,a]),f}function hU(e){return e.qIsOtherCell||-3===e.qElemNumber||-3===e.qElemNo}function pU(e){return e.some(hU)}function mU(e,t){let n=NaN,r=NaN;return e.forEach(e=>{pU(e)||e.slice(-t).forEach(e=>{"NaN"!==e.qNum&&(n=Number.isNaN(n)?e.qNum:Math.min(e.qNum,n),r=Number.isNaN(r)?e.qNum:Math.max(e.qNum,r))})}),{min:n,max:r}}function gU(e){let t=NaN,n=NaN;if(!e.getLayoutValue("measureAxis.autoMinMax",!1)){const r=e.getLayoutValue("measureAxis.minMax");e.meta.isButterfly||"min"!==r&&"minMax"!==r||(t=+e.getLayoutValue("measureAxis.min")),"max"!==r&&"minMax"!==r||(n=+e.getLayoutValue("measureAxis.max"),e.meta.isButterfly&&(t=-n))}return{min:t,max:n,isExplicitMin:!Number.isNaN(t),isExplicitMax:!Number.isNaN(n)}}function yU(e,t){let n=NaN,r=NaN;return e.forEach(e=>{if(!pU(e)){let i=0,o=0;e.slice(-t).forEach(e=>{"NaN"!==e.qNum&&(e.qNum>=0?o+=e.qNum:i+=e.qNum)}),n=Number.isNaN(n)?i:Math.min(i,n),r=Number.isNaN(r)?o:Math.max(o,r)}}),{min:n,max:r}}function vU(e,t){const n={};e.forEach(e=>{if(!pU(e)){const r=e[0].qElemNumber;n[r]=n[r]?n[r]:{min:0,max:0,cId:r},e.slice(t).forEach(e=>{"NaN"!==e.qNum&&(e.qNum>=0?n[r].max+=e.qNum:n[r].min+=e.qNum)})}});let r=NaN,i=NaN;return Object.keys(n).forEach(e=>{r=Number.isNaN(r)?n[e].min:Math.min(n[e].min,r),i=Number.isNaN(i)?n[e].max:Math.max(n[e].max,i)}),{min:r,max:i}}function bU(e){return"number"==typeof e&&!Number.isNaN(e)}function xU(e){const{meta:t}=e,n=e.getHyperCubeValue("qMeasureInfo");return t.isButterfly?{min:Math.min(0,bU(n[1].qMax)?-n[1].qMax:0),max:Math.max(0,bU(n[0].qMax)?n[0].qMax:0)}:{min:Math.min(...n.filter(e=>bU(e.qMin)).map(e=>e.qMin)),max:Math.max(...n.filter(e=>bU(e.qMax)).map(e=>e.qMax))}}const{isNumber:SU}=oN;function wU(e,t,n){for(let n=e.length-1;n>-1;n--)if(t(e[n]))return e[n];return n}function MU(e){return!Number.isNaN(+e.qNum)}function kU(e){return e.qNum}function CU(e){return!Number.isNaN(+e.qNum)}function qU(e){return e.qNum}function EU(e,t){return e.push(...t),e}const{getValueWithOffset:DU,isNumber:TU}=oN;function OU(e,t){return Math.abs(e/t)<5||0===t}function NU({layoutService:e,trendLineModel:t},n={}){const{stackedByMeasureExtractor:r=yU,stackedByDimensionExtractor:i=vU,straightExtractor:o=mU,measureInfoExtractor:a=xU,explicitExtractor:s=gU}=n,{meta:l}=e;return{extract({qDataPages:e,qStackedDataPages:n,others:r,count:i}){let o,a;if(Array.isArray(n)?({min:o,max:a}=this.extractFromStacked(n)):({min:o,max:a}=this.extractFromStraight(e,i)),t.query.hasTrendLines()){const{min:e,max:n}=t.query.getMinMax();o=Number.isFinite(e)?Math.min(o,e):o,a=Number.isFinite(n)?Math.max(a,n):a}const{min:s,max:l}=this.extractOthers(r),c=this.extractExplicit(),u=[0,o,a].filter(e=>TU(e));let d=Math.min(...u),f=Math.max(...u);d=OU(s,d)?Math.min(d,s):d,f=OU(l,f)?Math.max(f,l):f;const h=[c.explicitMin,c.explicitMax,d,f].filter(e=>TU(e));return o=Number.isNaN(c.explicitMin)?Math.min(...h):c.explicitMin,a=Number.isNaN(c.explicitMax)?Math.max(...h):c.explicitMax,o===a&&(Number.isNaN(c.explicitMin)?o=DU(o,-.2):Number.isNaN(c.explicitMax)&&(a=DU(a,.2))),{min:o,max:a,implicitMin:d,implicitMax:f,otherMin:s,otherMax:l,hasOtherMin:s<o,hasOtherMax:l>a,...c}},extractExplicit(){const{min:t,max:n,isExplicitMin:r,isExplicitMax:i}=s(e);return{hasExplicitMinMax:r||i,hasExplicitMin:r,hasExplicitMax:i,explicitMin:t,explicitMax:n}},extractFromStacked:e=>function(e){return e.length?{min:Math.min(...e[0].qSubNodes.filter(e=>SU(e.qMinNeg)).map(e=>e.qMinNeg)),max:Math.max(...e[0].qSubNodes.filter(e=>SU(e.qMaxPos)).map(e=>e.qMaxPos))}:{min:0,max:0}}(e.length?e[0].qData:[]),extractFromStraight(t,n){const s=t.length?t[0].qMatrix:[];return l.isStackedByMeasure?r(s,n):l.isStackedByDimension?i(s,n):e.getHyperCubeValue("qHasOtherValues")?o(s,n):a(e)},extractOthers:e=>l.isStackedByDimension?function(e){const t=wU(Zx(e,"0.qData.0.qSubNodes",[]),hU,{qMaxPos:0,qMinNeg:0});return{min:t.qMinNeg,max:t.qMaxPos}}(e):l.isGroupedByDimension?function(e){const t=Zx(e,"0.qMatrix",[]).filter(pU).reduce(EU,[]).filter(CU).map(qU);return{min:Math.min(0,...t),max:Math.max(0,...t)}}(e):function(e){const t=wU(Zx(e,"0.qMatrix",[]),pU,[]).filter(MU).map(kU);return{min:Math.min(0,...t),max:Math.max(0,...t)}}(e)}}function AU(e){const t=function({reducedDataModel:e,layoutService:t,continuousDataModel:n}){const{meta:r,getHyperCubeValue:i}=t,o=e=>!e.length&&r.mode.K,a=e=>{const t=i("qStackedDataPages",[]);return{qStackedDataPages:t,others:e?t:[]}};return{resolve(){const t=i("qMeasureInfo").length,s=i("qDimensionInfo").length,l=i("qHasOtherValues");if(!r.isStacked&&!l)return Promise.resolve({qDataPages:[{}],count:t});if(r.isContinuous){const e=r.isStackedByDimension?s:t;return n.fetchMinMaxData().then(t=>({qDataPages:t,count:e}))}const c=r.isStackedByDimension?1:t;return e.fetchMinMaxData().then(e=>{if(o(e))return a(l);let t=[];return l&&(t=r.mode.K?i("qStackedDataPages",[]):i("qDataPages",[])),{qDataPages:e,count:c,others:t}})}}}(e),n=NU(e);return t.resolve().then(e=>n.extract(e))}const _U="lasso",IU=({key:e,componentTargetKey:t,requireFailure:n,recognizeWith:r},i)=>({key:`event:${e}`,type:"Pan",requireFailure:n,recognizeWith:r,options:{event:_U,enable(e,n){if(this.started===_U||!n)return!0;if(!i.actions.select.enabled()||!i.actions.lasso.enabled()||!i.actions.lasso.active())return!1;return this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter(e=>e.key===t).length>0}},events:{lassostart(t){t.preventDefault(),this.started!==_U&&(i.actions.select.emit("start",_U),this.chart.component(e).emit("lassoStart",t),this.started=_U)},lassomove(t){t.preventDefault(),this.chart.component(e).emit("lassoMove",t),"function"==typeof i.updateOnMove&&i.updateOnMove(this.chart)},lassoend(t){t.preventDefault(),this.started=!1,this.chart.component(e).emit("lassoEnd",t),i.actions.select.emit("end",_U),"function"==typeof i.updateOnEnd&&i.updateOnEnd()}}});const LU=({targets:e,requireFailure:t,recognizeWith:n,components:r,eventName:i="tap"},o)=>{let a;const s=o.customTooltipModel?o.customTooltipModel.utils:void 0,l=s?o.debouncer(s.displayTooltip,s.DEBOUNCE_THRESHOLD):void 0;return{key:"event:tap",type:"Tap",requireFailure:t,recognizeWith:n,options:{event:i,interval:10,pointers:1,enable(t,n){return!n||!(!o.actions.select.enabled()&&!o.actions.tooltip.enabled())&&(a=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter(t=>-1!==e.indexOf(t.key)),a.length>0)}},events:{[i](t){t.preventDefault();const n=function(e,t){const n=t.element.getBoundingClientRect();let r,i;return e.center?(({x:r}=e.center),({y:i}=e.center)):(r=e.clientX,i=e.clientY),{x:r-n.left,y:i-n.top}}(t,this.chart),c=o.hitRadius?o.hitRadius(a):0,u=c>0?{cx:n.x,cy:n.y,r:c}:n,d=o.shapesAt?o.shapesAt(u):this.chart.shapesAt(u,{components:e.map(e=>({key:e,propagation:"stop"})),propagation:"stop"}),f=this.chart.component("tooltip"),h="mouse"!==t.pointerType&&f&&f.show;if(!o.isLocked(a)&&!o.tooltipOnly&&o.actions.select.enabled()){const e=this.chart.componentsFromPoint({x:t.center.x,y:t.center.y}),n=e.some(e=>"legend-cat"===e.type);if(!d.length&&n||(this.chart.brushSelectionIncludeMax=!1,o.actions.select.brushSelectionIncludeMax=!1,o.actions.select.emit("start",i,e)),d.length&&r){this.chart.brushSelectionIncludeMax=!1,o.actions.select.brushSelectionIncludeMax=!1;const e="function"==typeof r?r(t,d):r;this.chart.brushFromShapes(d,{components:e}),o.actions.select.emit("end",i),(({largeDataService:e,chart:t})=>{(e?.meta||{}).isLargeNumPoints&&t.brush("lazySelection")._state(t.brush("selection")._state())})({largeDataService:o.largeDataService,chart:this.chart})}}if(f&&o.actions.tooltip.enabled())if(d.length){const{customTooltipModel:e}=o;if(e?.useCustomTooltip&&s.checkIfPromisesExist({customTooltipModel:e})){const n=s.getNodes(t,this.chart);l(t,f,{nodes:n,opts:o,customTooltipModel:e})}else f.emit("show",t,{nodes:d})}else h&&f.emit("hide")}}}};const PU=({key:e,requireFailure:t,recognizeWith:n,eventName:r="tap"},i)=>({prio:1,key:`event:${e}-tap`,type:"Tap",requireFailure:t,recognizeWith:n,options:{event:`${r}-${e}-tap`,interval:10,pointers:1,enable:(t,n)=>!!n&&(!!i.actions.select.enabled()&&(!(!n.target||"INPUT"!==n.target.nodeName)||!(!n.target||!n.target.hasAttribute("data-other-value"))&&(n.target.getAttribute("data-key")||"").split("-bubble")[0]===e))},events:{[`${r}-${e}-tap`](t){(t.target.getAttribute("data-key")||"").split("-bubble")[0]&&(t.preventDefault(),this.chart.component(e).emit("bubbleStart",t))}}});const RU=({eventName:e,key:t,fillTargets:n=[],requireFailure:r,recognizeWith:i},o,a)=>({key:`event:${t}`,type:"Pan",requireFailure:r,recognizeWith:i,options:{event:e,enable(r,i){if(this.started===e||!i)return!0;if(!o.actions.select.enabled())return!1;const a=this.chart.componentsFromPoint({x:i.center.x,y:i.center.y}).filter(e=>-1!==n.indexOf(e.key)),s=0===a.length&&function(e,t){const{target:n}=e.srcEvent;return!(!n||0!==(n.getAttribute("data-key")||"").indexOf(`${t}-`))}(i,t);return s?(this.started=e,!0):a.length>0}},events:{[`${e}start`](n){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,o.actions.select.brushSelectionIncludeMax=!0),n.preventDefault(),o.actions.select.emit("start",e),this.chart.component(t).emit(`${a}Start`,n),this.started=e},[`${e}move`](e){e.preventDefault(),this.chart.component(t).emit(`${a}Move`,e),"function"==typeof o.updateOnMove&&o.updateOnMove(this.chart)},[`${e}end`](n){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,o.actions.select.brushSelectionIncludeMax=!0),n.preventDefault(),this.chart.component(t).emit(`${a}End`,n),o.actions.select.emit("end",e),this.started=!1,"function"==typeof o.updateOnEnd&&o.updateOnEnd()}}});function zU(e,t){const n=function(e){const{key:t,targets:n,fillTargets:r,targetSelector:i,targetFillSelector:o,dock:a,scale:s,bubblesPlacement:l="inside",observeBrush:c=!1,multiple:u=!1,toLabel:d,onEdited:f}=e;return{key:t,type:"brush-range",layout:{dock:n.map(e=>`@${e}`).join(",")},on:f?{bubbleEnd(){f()}}:{},settings:{brush:c?{context:"selection",observe:!0}:"selection",scale:s,multiple:u,direction:"left"===a||"right"===a?"vertical":"horizontal",bubbles:{align:"left"===a||"top"===a?"end":"start",placement:l,label:d},target:{components:r,selector:i,fillSelector:o,fill:"rgba(82,204,82,0.2)"}}}}(e),r=RU(e,t,"range");return{interactions:[e.onEdited?PU(e,t):null,r].filter(Boolean),components:[n]}}const FU={refLines:{minimumLayoutMode:"SPARK"},measureAxisTitle:{minimumLayoutMode:"XSMALL"},dimensionAxisTitle:{minimumLayoutMode:"XSMALL"},measureAxis:{minimumLayoutMode:"XSMALL"},dimensionAxis:{minimumLayoutMode:"XSMALL"},gridLines:{minimumLayoutMode:"XSMALL"},refLinesLabels:{minimumLayoutMode:"SMALL"},horizontalDimensionAxis:{minimumLayoutMode:{width:"XSMALL",height:"SMALL"}},verticalDimensionAxis:{minimumLayoutMode:{width:"SMALL",height:"XSMALL"}},horizontalDimensionAxisTitle:{minimumLayoutMode:{width:"XSMALL",height:"MEDIUM"}},verticalDimensionAxisTitle:{minimumLayoutMode:{width:"MEDIUM",height:"XSMALL"}}},jU="inner-time-axis",BU="outer-time-axis";const VU={getMajorAxisMaxGlyphCount(e,t){let n=0;if(e.qDimensionInfo.length){const r=t?0:e.qDimensionInfo.length-1;n=uU.getMaxGlyphCount(e,r)}else e.qMeasureInfo.forEach(e=>{n=Math.max(n,e.qFallbackTitle.length)});return n},getAxisData(e,t){let n;return n=e.qDimensionInfo.length?Zx(e,t?"qStackedDataPages.0.qData.0.qSubNodes":"qDataPages.0.qMatrix"):e.qMeasureInfo,n},getBarAxisMaxGlyphCount(e,t){if(!e)return;const n=VU.getAxisData(e,t),r=!e.qDimensionInfo.length,i=r||t?void 0:e.qDimensionInfo.length-1,o=VU.getMajorAxisMaxGlyphCount(e,t),a=r?"qFallbackTitle":"qText";return AT.getAdjustedMaxGlyphCount(o,n,i,a)},getGroupAxisMaxGlyphCount(e){if(!e)return;const t=VU.getAxisData(e),n=uU.getMaxGlyphCount(e,0);return AT.getAdjustedMaxGlyphCount(n,t,0)}};var HU=3,$U=13;function WU(e,t,n,r){const{meta:i}=t.layoutService,o=[],a=!("none"===e.measureAxis.show),s=!("title"===e.measureAxis.show);i.isContinuous?o.push(...function(e,t,n,r){const{meta:i}=t.layoutService,{axis:o,grid:a}=t.themeService.getStyles(),s=t.styleService.axis.label.getStyle(),{auto:l,spacing:c}=t.layoutService.getLayoutValue("gridLine",{}),u=[],d="none"!==e.dimensionAxis.show&&"title"!==e.dimensionAxis.show,f=FU[`${t.dockService.meta.major.orientation}DimensionAxis`].minimumLayoutMode,h={type:"grid-line",x:{},layout:{minimumLayoutMode:FU.gridLines.minimumLayoutMode},ticks:{stroke:a.line.major.color},minorTicks:{show:!1,stroke:a.line.minor.color},animations:{enabled:t.viewModel.animations.enabled,trackBy:GN.lines.trackBy,compensateForLayoutChanges:GN.lines.compensateForLayoutChanges}},p=!!e.showMiniChartForContinuousAxis&&{type:"range",key:"range-brush-highlighter",layout:{dock:"@scrollbar"},settings:{scale:t.reducedDataModel.scales.major,brush:"selection",fill:"#6CB33F",opacity:.2}};if(i.isTime){if(d){const e=n?"end":"start",r=n?1:0,i="bottom"===t.dockService.meta.major.dock?0:1,a={label:{fill:s.fill,fontSize:s.fontSize,fontFamily:s.fontFamily},majorGuideLine:{stroke:o.line.major.color},minorGuideLine:{stroke:o.line.minor.color}},d={type:"time-axis",renderer:"svg",layout:{dock:t.dockService.meta.major.dock,minimumLayoutMode:f},preferredSize:()=>({size:2*parseFloat(s.fontSize),edgeBleed:{left:1,right:1}}),settings:{anchor:e,label:{align:i,justify:r},guideLine:{major:{justify:r},minor:{align:i}}},style:a,animations:{enabled:t.viewModel.animations.enabled,trackBy:GN.axes.trackBy({isTime:!0}),compensateForLayoutChanges:GN.axes.compensateForLayoutChanges({isTime:!0})}};u.push(kg(!0,{},d,{key:jU,scale:nU.SCALE.MAIN.MAJOR_INNER,settings:{guideLine:{minor:{show:!0}},line:{show:!l&&0===c}},style:kg(!0,{},a,{line:{stroke:o.line.major.color},majorGuideLine:{stroke:o.line.minor.color},minorGuideLine:{stroke:o.line.major.color}})})),u.push(kg(!0,{},d,{key:BU,scale:nU.SCALE.MAIN.MAJOR,settings:{guideLine:{minor:{show:!1}},line:{show:!1}}})),u.push({type:"axis-overlay",key:"outer-axis-overlay",scale:nU.SCALE.MAIN.MAJOR,layout:{dock:`@${BU}`,minimumLayoutMode:f}}),u.push({type:"axis-overlay",key:"inner-axis-overlay",scale:nU.SCALE.MAIN.MAJOR_INNER,layout:{dock:`@${jU}`,minimumLayoutMode:f}}),u.push(p)}return u.push(kg(!0,{},h,{key:"inner-time-grid",x:{scale:nU.SCALE.MAIN.MAJOR_INNER},ticks:{stroke:a.line.minor.color}})),u.push(kg(!0,{},h,{key:"outer-time-grid",x:{scale:nU.SCALE.MAIN.MAJOR}})),u}if(i.isContinuous){const e="continuous-axis";d&&(u.push({type:"axis",key:e,renderer:rA(),scale:nU.SCALE.MAIN.MAJOR,layout:{dock:t.dockService.meta.major.dock,minimumLayoutMode:f},settings:{labels:{align:0,offset:4,fill:s.fill,fontSize:s.fontSize,fontFamily:s.fontFamily},ticks:{show:!0,stroke:o.line.major.color},line:{show:!r},minorTicks:{show:!1}},animations:{enabled:t.viewModel.animations.enabled,trackBy:GN.axes.trackBy({isContinuous:!0}),compensateForLayoutChanges:GN.axes.compensateForLayoutChanges({isContinuous:!0})}}),u.push({type:"axis-overlay",key:"inner-axis-overlay",scale:nU.SCALE.MAIN.MAJOR,layout:{dock:`@${e}`,minimumLayoutMode:f}}),u.push(p)),u.push(kg(!0,{},h,{key:"continuous-grid",x:{scale:nU.SCALE.MAIN.MAJOR},minorTicks:{show:!0}}))}return u}(e,t,n,r)):o.push(...function(e,t,n,r){if("none"===e.dimensionAxis.show)return[];const{meta:i}=t.layoutService,o=t.themeService.getStyles(),a=[],s=function(e,t){return!t.layoutService.meta.isGroupedByDimension||!e.legend.show||t.colorService.getMain().getSettings().field!==t.viewModel.fields.major}(e,t),l=function(e,t){return!(!t.layoutService.meta.isGroupedByDimension||e.legend.show&&t.colorService.getMain().getSettings().field===t.viewModel.fields.majorGroup)}(e,t),c="horizontal"===t.dockService.meta.major.orientation,u=c?e.dimensionAxis.label:"auto",d="horizontal"===u?void 0:t.dockService.meta.minor.size/4,f=t.styleService.axis.label.getStyle(),h={type:"axis",renderer:rA(),layout:{dock:t.dockService.meta.major.dock,minimumLayoutMode:FU[`${t.dockService.meta.major.orientation}DimensionAxis`].minimumLayoutMode},settings:{labels:{show:!("title"===e.dimensionAxis.show),mode:u,tiltAngle:n?-40:40,maxEdgeBleed:50,maxLengthPx:d,...f},line:{show:!r,stroke:o.axis.line.major.color}},brush:{consume:[{context:"selection",data:["selectionDimension","axisSelectionDimension"],style:{inactive:{opacity:.3}}}]},animations:{enabled:t.viewModel.animations.enabled,trackBy:GN.axes.trackBy({isMajor:!0}),compensateForLayoutChanges:GN.axes.compensateForLayoutChanges({isHorizontal:c})}};l&&a.push(kg(!0,{},h,{key:"group-axis",scale:nU.SCALE.MAIN.MAJOR_INNER,settings:{paddingEnd:s?10:4,labels:{mode:s?"horizontal":h.settings.labels.mode,maxGlyphCount:VU.getGroupAxisMaxGlyphCount(e.qHyperCube),maxLengthPx:d},line:{show:(c||!s)&&h.settings.line.show}}}));const p=VU.getBarAxisMaxGlyphCount(e.qHyperCube,i.isStackedByDimension);return s&&a.push(kg(!0,{},h,{key:nU.COMPONENT.BAR_AXIS,scale:nU.SCALE.MAIN.MAJOR,settings:{paddingEnd:4,labels:{maxGlyphCount:p,maxLengthPx:d,tiltThreshold:p>HU&&p<$U?1:void 0},line:{show:!(c&&l)&&h.settings.line.show}}})),c||2!==a.length?a:[a[1],a[0]]}(e,t,n,r));const l=t.themeService.getStyles(),c=t.styleService.axis.label.getStyle();return a&&o.push({type:"axis",key:"y-axis",renderer:rA(),formatter:nU.FORMATTER.MINOR,layout:{dock:t.dockService.meta.minor.dock,minimumLayoutMode:FU.measureAxis.minimumLayoutMode},scale:nU.SCALE.MAIN.MINOR,settings:{labels:{show:s,...c},line:{stroke:l.axis.line.major.color},ticks:{stroke:l.axis.line.major.color},minorTicks:{stroke:l.axis.line.minor.color}},animations:{enabled:t.viewModel.animations.enabled,trackBy:GN.axes.trackBy({isMeasure:!0}),compensateForLayoutChanges:GN.axes.compensateForLayoutChanges({isMeasure:!0,dock:t.dockService.meta.minor.dock})}}),o}var UU={BAR:{STROKE:{COLOR:"#205891",WIDTH:{NONE:0,SMALL:1,MEDIUM:2,LARGE:4}}}};function YU({layoutService:e,discrete:t}){const{isContinuous:n,isGrouped:r}=e.meta,i=(e.getLayoutValue("components",[])||[]).filter(e=>"bar"===e.key)[0];if(i?.style?.width){const{style:e}=i;return e.strokeWidth&&"none"!==e.strokeWidth&&!n?function(){const n=UU.BAR.STROKE.WIDTH[e.strokeWidth.toUpperCase()]/t.query.getItemSize(),r=e.width+n;return r>1?e.width-(r-1):e.width}:e.width}return r?.9:.7}const{isNumber:KU}=oN,GU=["$year","$yearquarter","$quarter","$yearmonth","$month","$weeknumber","$yearweek","$week","$weekday","$day","$date"],XU={seconds:1/86400,minutes:1/1440,hours:1/24,days:1,weeks:7,months:365/12,quarters:91.25,years:365,number:1},JU={$date:1,$day:1,$weekday:1,$week:1,$yearweek:7,$weeknumber:1,$month:1,$yearmonth:365/12,$quarter:1,$yearquarter:91.25,$year:365},ZU=({data:e,layout:t})=>{const n=t.qHyperCube?.qDimensionInfo?.[0]?.continuous?.period;if("auto"!==n)return XU[n||"none"]||1;const r=t.qHyperCube?.qDimensionInfo?.[0]?.qTags||[];for(let e=0;e<GU.length;e+=1)if(-1!==r.indexOf(GU[e]))return JU[GU[e]]||1;return(({data:e,layout:t})=>{const n=(t.qHyperCube?.qDimensionInfo?.[0]?.qAttrExprInfo||[]).find(e=>"firstDimensionDiff"===e.id);let r=Number(n?.qFallbackTitle);if(KU(r))return r;const i=e.items.map(e=>e.timeStart.value);return r=aN.findMinPositiveDistance(i),r})({data:e,layout:t})};function QU({opts:e,MIN_BAR_WIDTH:t,isMiniChart:n=!1}){return({data:r,mainRect:i,maxBarWidth:o})=>{const{viewState:a,viewCache:s}=e,{min:l,max:c}=n?{min:s.get("continuousMin"),max:s.get("continuousMax")}:a.get("zoom"),u=Math.max(0,(({data:e,width:t,min:n,max:r,opts:i})=>{if(r===n)return t;const o=i.layoutService.getLayout(),a=(o.qHyperCube?.qDimensionInfo?.[0]?.continuous.stepSize||1)*ZU({data:e,layout:o});return a<=0?t:a/(r-n)*t})({data:r,width:i.width,min:l,max:c,opts:e}));return Math.max(t,Math.min(u,o))}}const eY={FULL:16,MEDIUM:14,SMALL:12,XSMALL:8,SPARK:4};function tY(e,t,n={}){const r=QU({opts:e,MIN_BAR_WIDTH:2});return({data:i})=>{const{chart:o,viewState:a,viewCache:s,layoutService:l,discrete:c}=e,u=o.component(t).rect;if(!i.items.length||!u)return 2;const{min:d,max:f}=a.get("zoom");if(n[[d,f]])return n[[d,f]];const h=l.getLayout();let p;n={};let m=eY[pT.getLayoutMode(u.width,Number.MAX_VALUE)];const g=h.qHyperCube.qDimensionInfo?.[0]?.continuous?.period;if(g&&"none"!==g){m=u.width;p=YU({layoutService:l,discrete:c})*r({data:i,mainRect:u,maxBarWidth:m})}else{const e=Math.abs(f-d),t=Math.abs(s.get("continuousMax")-s.get("continuousMin"));if(0===t)return m;const n=function(e,t,n){return e*(1-n)+t*n}(2,m,1-Math.min(e/t/.2,1));p=Math.max(2,Math.min(m,n))}return n[[d,f]]=p,n[[d,f]]}}function nY(e,t){const{hasExplicitMax:n,explicitMax:r}=t;return!!n&&e>r&&r<=0}function rY(e,t){const{hasExplicitMin:n,explicitMin:r}=t;return!!n&&e<r&&r>=0}function iY(e,t){const{hasExplicitMax:n,explicitMax:r}=t;return!!n&&e>r&&r>0}function oY(e,t){const{hasExplicitMin:n,explicitMin:r}=t;return!!n&&e<r&&r<0}const aY="max",sY="min",lY={min:"Min",max:"Max"};function cY(e,t,n){return void 0===n?nY(e,t)||rY(e,t):n===aY?nY(e,t):rY(e,t)}function uY({minorMinMax:e,type:t}){return!(function({minorMinMax:e,type:t}){return!e[`hasExplicit${lY[t]}`]}({minorMinMax:e,type:t})||function({minorMinMax:e,type:t}){const n=t===aY?e.implicitMax:e.implicitMin;return!cY(Number(n.toFixed(13)),e,t)}({minorMinMax:e,type:t}))}function dY(e,{barComponent:t,type:n,isStacked:r}){const{viewCache:i,dockService:o,themeService:a}=e,s=i.get("minorMinMax");if(!s.hasExplicitMinMax)return!1;const l=n===aY?s.implicitMax:s.implicitMin;if(!cY(Number(l.toFixed(13)),s,n))return!1;const{orientation:c}=t.settings,u=n===aY?o.meta.minor.end:o.meta.minor.start;let d="end";r&&(d=n===aY?"sumOfPositives":"sumOfNegatives");const f=a.getStyles();return{type:"box-out-of-bounds",key:`bar-oob-${n}`,layout:{dock:u},data:t.data,brush:t.brush,settings:{orientation:c,major:t.settings.major,minor:t.settings.minor,dockValue:DT.getDockValue(u),oob:kg({},t.settings.box,{fill:f.outOfRange.color,alignment:1,opacity:1,show:function(e){return!0!==e.datum.null?.value&&((!r||0!==e.datum[d].value)&&cY(e.datum[d].value,s,n))}})},animations:{enabled:e.viewModel.animations.enabled,compensateForLayoutChanges:GN.barOobs.compensateForLayoutChanges}}}function fY(e){return Math.min(Math.max(0,e),1)}const hY=(e,{chart:t,type:n,componentKey:r,collectionKey:i})=>{const{layoutService:o,dockService:a,viewCache:s}=e,{isStacked:l}=o.meta,c=s.get("minorMinMax"),{meta:u}=e.layoutService;if(!uY({minorMinMax:c,type:n}))return!1;let d;u.isGroupedByDimension?d=({scale:e,datum:t})=>e([t.group.value,t.value])+e.bandwidth([t.group.value,t.value])/2:u.isGroupedByMeasure&&(d=({scale:e,datum:t})=>e([t.value,t.measureIndex.value])+e.bandwidth()/2);const f={type:"box",key:`${nU.COMPONENT.GHOST_BAR_OOB}-${n}`,data:{collection:i},settings:{orientation:a.meta.minor.orientation,major:{scale:nU.SCALE.MAIN.MAJOR,fn:d},minor:{scale:nU.SCALE.MAIN.MINOR,start:e=>fY(t.scale(nU.SCALE.MAIN.MINOR)(e?.datum?.start?.value||0)),end(e){const r=t.scale(nU.SCALE.MAIN.MINOR);let i="end";l&&(i="max"===n?"sumOfPositives":"sumOfNegatives");const o=e.datum[i]?e.datum[i].value:r[n]();return fY(r(o))}},box:{width:YU({layoutService:e.layoutService,discrete:e.discrete}),minWidthPx:2,fill:"none",stroke:"transparent",show:e=>{const r=t.scale(nU.SCALE.MAIN.MINOR);let i="end";l&&(i="max"===n?"sumOfPositives":"sumOfNegatives");const o=e.datum[i]?e.datum[i].value:r.max();return"max"===n?o>r.max():o<r.min()}},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}};return f};function pY(e,t){const{style:n,styleService:r,dockService:i}=t,o=r.label.getStyle(),a=o.useContrastColor&&!e.onBackground?function(e){return function(t){return zO.isDark(t.node.attrs.fill)?e.lightColor:e.darkColor}}(n):o.fill,s="horizontal"===i.meta.major.orientation,l=e.padding||{left:s?0:4,right:s?0:4,top:s?4:0,bottom:s?4:0};return{position:e.position,justify:e.justify,fill:a,overflow:e.overflow,background:e.background,padding:l}}function mY(e){return{placements:e.simplifiedPlacements.map(t=>pY(t,e)),label:e.label}}function gY(e,t){if(t){if(function(e,t){return nY(e,t)}(e,t))return-1;if(function(e,t){return rY(e,t)}(e,t))return 1}return function(e,t){if(t&&0===e){const{min:e,max:n}=t;return 0===n&&0===e?1:n<=0?-1:e>=0||n>=-e?1:-1}return e>=0?1:-1}(e,t)}function yY(e,t,n,r){const i=gY(e,r);let o="up";return"vertical"===t&&i<0?o="down":"horizontal"===t&&(o=i>=0&&!n||i<0&&n?"right":"left"),o}function vY(e,t){const{dataPoint:n}=e;if(!n.showLabels)return!1;const{isStacked:r,isContinuous:i}=t.layoutService.meta;return!r||!i&&!!n.showSegmentLabels}function bY(e,t){const{dataPoint:n}=e;if(!n.showLabels)return!1;const{isStacked:r,isContinuous:i}=t.layoutService.meta;return!!r&&(!!i||!1!==n.showTotalLabels)}function xY(e,t,n,r){const i=[];return void 0!==e&&(i[e]={position:"outside",onBackground:!0,justify:0,overflow:r}),void 0!==t&&(i[t]={position:"inside",onBackground:!1,justify:n}),i}function SY({layout:e,component:t,minorScale:n},r,i){if(!vY(e,r))return!1;const{viewModel:o,ds:a,viewCache:s,layoutService:l,dockService:c,themeService:u}=r,{meta:d}=l,f=s.get("minorMinMax"),h=u.getStyles(),p=r.styleService.label.getStyle();let m;!d.isStacked&&(m=d.isStacked?1:0);const g=0===m?1:0,y=d.isStacked?.5:1,v=o.fields.minor[0],b=void 0===v?void 0:a.field(v).formatter();let x,S=-1;x=d.isStacked?d.isStackedByMeasure||!b?function(e){return e.data.segment.label}:function(e){return Math.abs(e.data.segment.value)>S?b(e.data.segment.value):""}:function(e){return e.data.end.label};const w={label:x,simplifiedPlacements:xY(m,g,y,d.isContinuous),style:h.label.value},M=[mY(kg(r,w))],k={component:t,selector:"rect",strategy:{type:"bar",settings:{direction:e=>yY(e.data.end.value,c.meta.minor.orientation,i,f),labels:M,fontSize:parseInt(p.fontSize,10),fontFamily:p.fontFamily,linkData:GN.labels.linkData}}},C=[k],q={key:"bar-labels",type:"labels",renderer:rA(),layout:{minimumLayoutMode:"XSMALL"},settings:{sources:C},animations:{enabled:r.viewModel.animations.enabled,trackBy:GN.labels.trackBy,compensateForLayoutChanges:GN.labels.compensateForLayoutChanges}};return d.isStackedByDimension&&b&&(q.beforeRender=()=>{S=function(e,t,n){const r="vertical"===t.dockService.meta.minor.orientation?"height":"width",i=t.chart.component(e),o=i&&i.rect?i.rect[r]:1,a=n?n.min():0;return 9.999*((n?n.max():0)-a)/o}(t,r,n)}),q}function wY(e,{fill:t}){return{[nU.FORMATTER.MINOR]:{data:{fields:e.viewModel.fields.minor}},[nU.FORMATTER.COLOR]:t&&t.data&&t.data.field?{data:{field:t.data.field}}:{}}}const MY=1,kY=3;function CY(e){return e.getLayoutValue("gridLine.auto")}function qY(e){return!CY(e)&&e.getLayoutValue("gridLine.spacing")===MY}function EY(e){return!CY(e)&&e.getLayoutValue("gridLine.spacing")===kY}const DY=e=>({enabled:e.animations.enabled,trackBy:GN.lines.trackBy,compensateForLayoutChanges:GN.lines.compensateForLayoutChanges}),TY=(e,{themeService:t,layoutService:n,dockService:r,viewModel:i})=>{if(!CY(n)&&function(e){return!e.getLayoutValue("gridLine.spacing")}(n))return!1;const{grid:o}=t.getStyles(),a={key:"grid-line",type:"grid-line",layout:{minimumLayoutMode:FU.measureAxis.minimumLayoutMode},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}),ticks:{show:!qY(n)||((e,t)=>t%2==0),stroke:o.line.major.color},minorTicks:{show:EY(n),stroke:o.line.minor.color},animations:DY(i)};return a["horizontal"===r.meta.major.orientation?"y":"x"]=nU.SCALE.MAIN.MINOR,a};function OY(e,t){const n=[TY(0,t)];return n[0]&&n.push((({dockService:e,themeService:t,viewCache:n,viewModel:r})=>{const i=n.get("minorMinMax");if(i.min>0||i.max<0)return!1;const o=t.getStyles(),a={};return a["horizontal"===e.meta.minor.orientation?"x":"y"]=[{value:0,scale:nU.SCALE.MAIN.MINOR,line:{stroke:o.grid.line.highContrast.color}}],{key:"high-contrast-grid-line",type:"ref-line",scale:nU.SCALE.MAIN.MINOR,lines:a,animations:DY(r)}})(t)),n}const NY="areaPan",AY=e=>({type:"Pan",key:"panorama",options:{event:NY,pointers:1,threshold:10,enable(t,n){return this.started===NY||!n||!!e.actions.scroll.enabled()&&e.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some(e=>e.key===nU.COMPONENT.BAR)}},events:{areaPanstart(t){t.preventDefault(),this.started=NY;const n=e.viewState.get("zoom");this[NY]={min:n.min,max:n.max,size:e.chart.component(nU.COMPONENT.BAR).rect.computedInner.width,span:n.max-n.min}},areaPanmove(t){t.preventDefault();const{span:n,min:r,max:i,size:o}=this[NY],a=-t.deltaX/o;e.viewState.set("zoom",{min:Math.min(r+a*n,e.viewCache.get("continuousMax")-n),max:Math.max(i+a*n,e.viewCache.get("continuousMin")+n)})},areaPanend(e){e.preventDefault(),this.started=!1},areaPancancel(e){e.preventDefault(),this.started=!1}}});function _Y(e,t){if(e.layoutService.meta.isDiscrete)return{};const{viewCache:n,viewState:r,chart:i}=e,{rtl:o}=t,a=dT.event.onZoom({viewCache:n,viewState:r,chart:i},{threshold:100,rtl:o,targetKey:nU.COMPONENT.BAR}),s={last:0};return{type:"Pinch",key:"continuous-pinch-zoom",options:{event:"zoom",pointers:2,threshold:0,enable:(t,n)=>!n||!!e.actions.scroll.enabled()&&e.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some(e=>e.key===nU.COMPONENT.BAR)},events:{zoomstart(e){s.last=e.scale,e.preventDefault()},zoommove(e){const t=e.scale-s.last;(function(e){return Math.abs(e)>.01})(t)&&a(e.center,t>0?1:-1),e.preventDefault(),s.last=e.scale}}}}function IY(e,t){const{viewCache:n,viewState:r,chart:i}=e,{rtl:o}=t,a=e.layoutService.meta.isContinuous?dT.event.onZoom({viewCache:n,viewState:r,chart:i},{rtl:o,threshold:50,targetKey:nU.COMPONENT.BAR}):void 0;return{type:"native",events:{wheel(t){let n,r=!1;if(e.actions.scroll.enabled()){const i={x:t.clientX,y:t.clientY};[n]=e.chart.componentsFromPoint(i).filter(e=>e.key===nU.COMPONENT.BAR),n&&(e.layoutService.meta.isContinuous&&a(i,Math.sign(-t.deltaY)),r=!0)}!r&&e.actions.interact.enabled()&&([n]=e.chart.componentsFromPoint(t).filter(e=>e.key===nU.COMPONENT.LEGEND_COLOR_CAT),n&&(r=!0,function(e,t){const n=(Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY)>=0?"next":"prev";t.emit(n)}(t,n))),r&&t.preventDefault()}}}}const LY=(e,t,n)=>({type:"hammer",enable:!0,gestures:[...(t.hammer||{}).gestures||[],...JA({...e,componentKey:"scrollbar",rtl:t.rtl}).gestures,...n.gestures,...e.layoutService.meta.isDiscrete?e.discrete.interactions.gestures:[AY(e),_Y(e,t)]]});function PY(e,t){const n=e.tooltipService.getInteractions(),r=[LY(e,t,n),IY(e,t),JA({...e,componentKey:"scrollbar",rtl:t.rtl}).native,n.native];return e.layoutService.meta.isDiscrete&&r.push(e.discrete.interactions.native),r}const RY=e=>({enabled:e.animations.enabled,compensateForLayoutChanges:GN.bars.compensateForLayoutChanges});function zY(e,t,{collectionKey:n}){const{continuousDataModel:r,reducedDataModel:i,colorService:o,layoutService:a,viewModel:s}=t,{meta:l}=a,c=a.getLayout(),u=c.qHyperCube.qDimensionInfo?.[0]?.continuous?.period,d=u&&"none"!==u,f=l.isContinuous&&d?function(e,t,n={}){const r=QU({opts:e,MIN_BAR_WIDTH:2,isMiniChart:!0});return({data:i})=>{const{chart:o,viewCache:a,layoutService:s,discrete:l}=e,c=o.component(t).rect;if(!i.items.length||!c)return 2;const u=a.get("continuousMin"),d=a.get("continuousMax");if(n[[u,d]])return n[[u,d]];const f=s.getLayout();let h;n={};let p=eY[pT.getLayoutMode(c.width,Number.MAX_VALUE)];const m=f.qHyperCube.qDimensionInfo?.[0]?.continuous?.period;return m&&"none"!==m?(p=c.width,h=YU({layoutService:s,discrete:l})*r({data:i,mainRect:c,maxBarWidth:p}),n[[u,d]]=h,n[[u,d]]):2}}(t,nU.COMPONENT.MINI_BAR):2;return{type:"box",key:nU.COMPONENT.MINI_BAR,layout:{dock:"@scrollbar"},show:()=>r.getDimensionCardinality()>1,data:{collection:n},settings:{box:kg(!0,{},e.settings.box,{minWidthPx:f,fill:o.getMini().getColor(),strokeWidth:0}),major:kg(!0,{},e.settings.major,{scale:i.scales.major}),minor:e.settings.minor,orientation:e.settings.orientation,oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},animations:RY(s)}}const FY=(e,t,{collectionKey:n})=>{if(!zA({layoutService:t.layoutService}).miniChart)return!1;if(t.reducedDataModel.mode.isContinuous)return zY(e,t,{collectionKey:n});const{mode:r,scales:i}=t.reducedDataModel;let o;return r.isGroupedByDimension&&!r.isReduced?o=({scale:e,datum:t})=>e([t.group.value,t.value])+e.bandwidth([t.group.value,t.value])/2:r.isGroupedByMeasure&&(o=({scale:e,datum:t})=>e([t.value,t.measureIndex.value])+e.bandwidth()/2),{type:"box",key:nU.COMPONENT.MINI_BAR,layout:{dock:"@scrollbar"},show:()=>t.discrete.query.getCanScroll(),data:{collection:n},settings:{box:{...e.settings.box,fill:r.isReduced||r.isStackedByDimension?t.colorService.getMain().getSettings().others:t.colorService.getMain().getColor(),strokeWidth:0},major:{scale:i.major,fn:o},minor:{scale:i.minor},orientation:e.settings.orientation,oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},animations:RY(t.viewModel)}},{measureText:jY}=Sp.renderer("svg")();function BY(e,t,n){const r=function(e){const t=kg(!0,{},e);return delete t.data,t}(t.minor),i=function(e,t,{majorScaleInvert:n,maxPxStep:r,align:i,getProp:o}){let a={invert:n,data:{extract:e.mode.isDimensionless?e.fields.minor.map((e,t)=>({field:e,value:t})):{source:"miniCube",field:"qDimensionInfo/0"}},type:e.mode.isDimensionless?"band":void 0,maxPxStep:r,align:i};return e.mode.isStackedByDimension?a.data.extract.field="qDimensionInfo/1":e.mode.isGroupedByDimension?e.mode.isReduced||(a.data={source:"miniCube",hierarchy:{value:e=>e.qElemNumber}}):e.mode.isGroupedByMeasure?(a=kg(!0,{},t),a.data.extract.source="miniCube"):e.mode.isContinuous&&(a=kg(!0,{},t,{min:()=>o("continuousMin"),max:()=>o("continuousMax")})),a}(e,t.major,n);return{reducedMinor:r,reducedMajor:i}}const VY=50,HY=100,$Y=200;function WY(e,t){const n=function(e){const t=e.getLayoutValue("measureAxis.spacing",1);switch(t){case.5:return VY;case 1:return HY;case 2:return $Y;default:return 125*t}}(t);return Math.max(1,Math.round(e/n))}function UY(e,t,n){return 0===t||t===Math.floor((n.length-1)/2)||t===n.length-1}function YY(e,t,n){return 0===t||0===e||t===n.length-1}function KY(e){for(let t=1;t<e.length;t++)if(e[t]===e[t-1])return!0;return!1}function GY(e,t,n,r,i){e.domain([t,n]),e.nice(10);const[o,a]=e.domain();let s=e.ticks(10);const l=function(e){return e.length%2==0}(s),c=function(e){const t=Math.round(.3*e.length),n=t,r=e.length-t;return e.slice(n,r).some(e=>0===e)}(s),u=c?YY:UY;s=s.filter(u),l&&!c&&!r&&s.length>1&&(s=[s[0],(s[0]+s[s.length-1])/2,s[s.length-1]]);const d=i?i.formatter(nU.FORMATTER.MINOR):void 0;return KY(d?s.map(d):s)&&(s=[s[0],s[s.length-1]]),{roundedMin:o,roundedMax:a,ticks:s}}function XY(e,t,n,r,i,o,a,s){const l=o.formatter(nU.FORMATTER.MINOR),c=s.getStyles(),u="horizontal"===a.meta.major.orientation?"height":"width",d=e=>jY({text:e,fontSize:c.axis.label.name.fontSize,fontFamily:c.axis.label.name.fontFamily})[u];let[f,h]=e.domain(),p=e.ticks(r);function m(){const e=p.map(l);return!KY(e)&&function(e){const t=i/p.length;return Math.max(...e.map(d))<=t}(e)}for(let i=r-1;i>0&&!m();i--)e.domain([t,n]),e.nice(i),[f,h]=e.domain(),p=e.ticks(i);return{roundedMin:f,roundedMax:h,ticks:p}}const JY=(e,t)=>e.value-t.value,ZY=e=>({value:e,isMinor:!1}),QY=e=>({value:e,isMinor:!0});function eK(e,t,n){const r=Number.isNaN(t)&&Number.isNaN(n)?3:2;return e.filter(e=>(e=>Number.isNaN(t)||e>=t)(e)&&(e=>Number.isNaN(n)||e<=n)(e)).length<=r}function tK({chart:e,viewCache:t,dockService:n,layoutService:r,themeService:i,viewModel:o,ds:a}){const{isButterfly:s}=r.meta,{explicitMin:l,explicitMax:c,hasExplicitMin:u,hasExplicitMax:d}=t.get("minorMinMax"),{min:f,max:h}=function(e){let{min:t,max:n}=e.get("minorMinMax");return t===n&&0===t&&(t-=1,n+=1),{min:t,max:n}}(t),p=s?Math.max(Math.abs(f),Math.abs(h)):h,m=s?-p:f,g=nS(()=>{const s=function(e,t,n){let r;return e?r=n.meta.chart.size:({rect:r}=t.component(nU.COMPONENT.BAR)),"horizontal"===n.meta.major.orientation?r.height:r.width}(t.get("isPreRender"),e,n),f=WY(s,r),h=function(e,t,n){const r=WC().domain([e,t]);return r.nice(n),r}(m,p,f);let g,y,v=[];"SPARK"===n.meta.chart.mode?({roundedMin:g,roundedMax:y}=function(e,t){return{roundedMin:e,roundedMax:t}}(m,p)):(({roundedMin:g,roundedMax:y,ticks:v}=XY(h,m,p,f,s,e,n,i)),eK(v,l,c)&&({roundedMin:g,roundedMax:y,ticks:v}=GY(h,m,p,u||d,e)));const b=function(e,t){const n=[];for(let r=0;r<e.length-1;r++){const i=e[r],o=(e[r+1]-i)/(t+1);for(let e=1;e<=t;e++)n.push(i+o*e)}return n}(v,1);v=function(e,t,n){return e&&n.length&&!n.some(e=>e===t)?(n.unshift(t),n.filter(e=>e>=t)):n}(u,l,v),v=function(e,t,n){return e&&n.length&&!n.some(e=>e===t)?(n.push(t),n.filter(e=>e<=t)):n}(d,c,v);let x=function(e,t){return[...e.map(ZY),...t.map(QY)].sort(JY)}(v,b);if(r.meta.isButterfly){const e=o.fields.minor[0],t=void 0===e?void 0:a.field(e).formatter();"function"==typeof t&&(x=x.map(e=>({...e,label:t(Math.abs(e.value))})))}return{roundedMin:g,roundedMax:y,ticks:x}},()=>t.get("isPreRender"));return{values:()=>g().ticks,min:()=>u?l:g().roundedMin,max:()=>d?c:g().roundedMax}}function nK(e,{picasso:t,discrete:n,layoutService:r,dockService:i,viewModel:o,viewCache:a,reducedDataModel:s,colorService:l,themeService:c,viewState:u,chart:d,ds:f},{localeInfo:h,rtl:p}){const{meta:m}=r,{fields:g}=o,y=()=>{if("custom"!==r.getLayoutValue("dimensionAxis.axisDisplayMode"))return Math.min(200,i.meta.chart.size["horizontal"===i.meta.major.orientation?"height":"width"]/4)},v=!("none"===r.getLayoutValue("measureAxis.show"))?(b=i.meta.minor.orientation,x=i.meta.minor.dock,"vertical"===b?"near"===x||"left"===x?0:1:"near"===x||"bottom"===x?1:0):.5;var b,x;const S={},w="vertical"===i.meta.minor.orientation&&p,M=l.getMain().getScales(),k=l.getMini().getScales();if(Object.assign(S,M,{reducedFill:k.reducedFill}),S[nU.SCALE.MAIN.MINOR]=function({chart:e,viewModel:{fields:t},dockService:n,viewCache:r,viewModel:i,layoutService:o,themeService:a,ds:s},{rtl:l}){const c=tK({chart:e,dockService:n,viewCache:r,layoutService:o,themeService:a,viewModel:i,ds:s}),u={invert:"vertical"===n.meta.minor.orientation||l,ticks:{values:c.values},minorTicks:{count:1},min:c.min,max:c.max};return o.meta.isStacked||(u.data={source:"qHyperCube",fields:t.minor}),u}({chart:d,viewModel:o,dockService:i,viewCache:a,layoutService:r,themeService:c,ds:f},{rtl:p}),m.isGroupedByDimension)[nU.SCALE.MAIN.MAJOR_INNER,nU.SCALE.MAIN.MAJOR].forEach((e,t)=>{S[e]={invert:w,data:{source:"qHyperCube",hierarchy:{label:e=>e.qText?e.qText:"",value:e=>e.qElemNumber,props:{...o.selectionDimensionProp(t),group:m.isGroupedByDimension?{field:g.majorGroup}:void 0}}},label:({datum:e})=>e.label,ticks:{depth:t+1},maxPxStep:y,align:v}}),o.isDimensionLocked(0)||(S[nU.SCALE.MAIN.MAJOR_INNER].data.hierarchy.props.axisSelectionDimension={field:0});else if(m.isGroupedByMeasure)S[nU.SCALE.MAIN.MAJOR]={type:"group-by-measure",invert:w,data:{extract:{source:"qHyperCube",field:"qDimensionInfo/0",props:{axisSelectionDimension:{field:0}}}},measureCount:e.qHyperCube.qMeasureInfo.length,maxPxStep:y,align:v};else if(m.isTime){const{innerTime:e,outerTime:n}=function(e,t){const{layoutService:n,viewModel:r,viewCache:i,picasso:o,viewState:a,localeInfo:s,themeService:l}=e,c=()=>n.getHyperCubeValue("qAxisData.qAxis",[]),u=o.formatter("q-time"),d=l.getStyles(),f=e=>jY({text:e,fontSize:d.axis.label.name.fontSize,fontFamily:d.axis.label.name.fontFamily});i.set("qTimeAxisCache",[]);const h={get:(e,t=0)=>{const n=i.get("qTimeAxisCache");return n[t]&&n[t][0]===e?n[t][1]:void 0},set:(e,t,n=0)=>{i.get("qTimeAxisCache")[n]=[e,t]},key:({distance:e})=>{const{min:t,max:n}=a.get("zoom"),r=(n-t)/(i.get("continuousMax")-i.get("continuousMin")),o=c().map(e=>e.qName);return[e,Number.parseFloat(r).toFixed(12),...o].toString()}};return{innerTime:{data:{field:r.fields.majorNumeric},type:"q-time-axis",qAxis:c,field:r.fields.majorNumeric,min:()=>a.get("zoom").min,max:()=>a.get("zoom").max,invert:!!t,formatter:{fn:u,localeInfo:s,qNumFormat:n.getHyperCubeValue("qDimensionInfo.0",{}).qNumFormat,measureText:f},ticks:{generator:{type:"d3",initialMin:a.get("zoom").min},level:"inner",anchor:"start",clamp:!0},cache:h},outerTime:{data:{field:r.fields.majorNumeric},type:"q-time-axis",qAxis:c,field:r.fields.majorNumeric,min:()=>a.get("zoom").min,max:()=>a.get("zoom").max,invert:!!t,formatter:{fn:u,localeInfo:s,qNumFormat:n.getHyperCubeValue("qDimensionInfo.0",{}).qNumFormat,measureText:f},ticks:{generator:{type:"d3"},level:"outer",anchor:"start",clamp:!0},cache:h}}}({picasso:t,localeInfo:h,viewState:u,viewModel:o,viewCache:a,themeService:c,layoutService:r},p);S[nU.SCALE.MAIN.MAJOR_INNER]=e,S[nU.SCALE.MAIN.MAJOR]=n}else m.isContinuous?S[nU.SCALE.MAIN.MAJOR]={type:"linear",invert:w,data:{extract:{key:"qHyperCube",field:g.majorNumeric}},ticks:{forceBounds:!0,count:u.get("zoom").min===u.get("zoom").max?1:void 0},minorTicks:{count:1},min:()=>u.get("zoom").min,max:()=>u.get("zoom").max}:S[nU.SCALE.MAIN.MAJOR]={invert:w,data:{extract:m.isDimensionless?g.minor.map((t,n)=>({field:t,label:()=>e.qHyperCube.qMeasureInfo[n].qFallbackTitle,value:n})):{source:"qHyperCube",field:"qDimensionInfo/0",props:{axisSelectionDimension:{field:0}}}},type:m.isDimensionless?"band":void 0,maxPxStep:y,align:v};const{reducedMinor:C,reducedMajor:q}=BY(s,{major:S[nU.SCALE.MAIN.MAJOR],minor:S[nU.SCALE.MAIN.MINOR]},{majorScaleInvert:w,maxPxStep:y,align:v,getProp:a.get});return m.isDiscrete&&(S[nU.SCALE.MAIN.MAJOR].range=n.query.getScaleRange,m.isGroupedByDimension&&(S[nU.SCALE.MAIN.MAJOR_INNER].range=n.query.getScaleRange)),S[s.scales.major]=q,S[s.scales.minor]=C,S}function rK(e,t,n){const{actions:r,flags:i,layoutService:o,colorService:a}=e,s=(e,t)=>{const r={action:e.srcEvent.ctrlKey||n?"set":"toggle",contexts:["selection"],key:t[0].key};return nU.COMPONENT.BAR===t[0].key?[{...r,data:["selectionDimension"]}]:[nU.COMPONENT.BAR_AXIS,nU.COMPONENT.GROUP_AXIS].includes(t[0].key)?[{...r,data:["selectionDimension","axisSelectionDimension"]}]:[r]},l=n=>n.some(e=>e.key===nU.COMPONENT.LEGEND_COLOR_CAT)?a.getMain().isSelectionLocked({isMeasureSelectionLocked:t}):e.isLocked(n),c=[o.meta.isStackedByDimension&&o.getHyperCubeValue("qStackedDataPages.0.qArea.qHeight",NaN)>1?nU.COMPONENT.STACK_TOTAL_BAR:nU.COMPONENT.BAR,nU.COMPONENT.BAR_AXIS,nU.COMPONENT.GROUP_AXIS,"outer-axis-overlay","inner-axis-overlay",nU.COMPONENT.LEGEND_COLOR_CAT];return i.isEnabled("VIZ_398_CHART_INTERACTION_REFACTOR")?function(e){var t=function(){var e,t,n,r,i,o,a,s,l,c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{actions:null!==(e=c.actions)&&void 0!==e?e:Nv.ACTIONS,components:null!==(t=c.components)&&void 0!==t?t:Nv.COMPONENTS,events:{onSelectStart:null!==(n=null===(r=c.events)||void 0===r?void 0:r.onSelectStart)&&void 0!==n?n:Nv.EVENTS,onSelectEnd:null!==(i=null===(o=c.events)||void 0===o?void 0:o.onSelectEnd)&&void 0!==i?i:Nv.EVENTS},hitRadius:null!==(a=c.hitRadius)&&void 0!==a?a:Nv.HIT_RADIUS,isLocked:null!==(s=c.isLocked)&&void 0!==s?s:Nv.IS_LOCKED,shapesAt:c.shapesAt,targets:null!==(l=c.targets)&&void 0!==l?l:Nv.TARGETS}}(e);return{interactions:[_v(t)],components:[]}}({actions:r,components:s,isLocked:l,targets:c}):function(e,t){if(!e.targets)throw new Error("Missing 'targets' property");return{interactions:[LU(e,t)],components:[]}}({targets:c,components:s},{...e,isLocked:l})}function iK(e){const t=[e.layoutService.meta.isStackedByDimension&&e.layoutService.getHyperCubeValue("qStackedDataPages.0.qArea.qHeight",NaN)>1?{key:nU.COMPONENT.STACK_TOTAL_BAR,contexts:["selection"],action:"add"}:{key:nU.COMPONENT.BAR,contexts:["selection"],action:"add",data:["selectionDimension"]}];return e.flags.isEnabled("VIZ_398_CHART_INTERACTION_REFACTOR")?function(e){var t=function(){var e,t,n,r,i,o,a,s,l,c,u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{actions:null!==(e=u.actions)&&void 0!==e?e:Tv.ACTIONS,componentKey:null!==(t=u.componentKey)&&void 0!==t?t:Tv.COMPONENT_KEY,components:null!==(n=u.components)&&void 0!==n?n:Tv.COMPONENTS,events:{onLassoStart:null!==(r=null===(i=u.events)||void 0===i?void 0:i.onLassoStart)&&void 0!==r?r:Tv.EVENTS,onLassoMove:null!==(o=null===(a=u.events)||void 0===a?void 0:a.onLassoMove)&&void 0!==o?o:Tv.EVENTS,onLassoEnd:null!==(s=null===(l=u.events)||void 0===l?void 0:l.onLassoEnd)&&void 0!==s?s:Tv.EVENTS},targetKeys:null!==(c=u.targetKeys)&&void 0!==c?c:Tv.TARGET_KEYS}}(e),n=function(e){var t=e.actions,n=e.componentKey,r=e.events,i=e.targetKeys;return{key:"event:lasso",type:"Pan",requireFailure:void 0,recognizeWith:void 0,options:{event:Ov,enable:function(e,n){return this.started===Ov||!n||!!(t.select.enabled()&&t.lasso.enabled()&&t.lasso.active())&&this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some(function(e){return-1!==i.indexOf(e.key)})}},events:fy(fy(fy({},"".concat(Ov,"start"),function(e){e.preventDefault(),this.started!==Ov&&(t.select.emit("start",Ov),this.chart.component(n).emit("lassoStart",e),this.started=Ov,r.onLassoStart({chart:this.chart}))}),"".concat(Ov,"move"),function(e){e.preventDefault(),this.chart.component(n).emit("lassoMove",e),r.onLassoMove({chart:this.chart})}),"".concat(Ov,"end"),function(e){e.preventDefault(),this.started=!1,this.chart.component(n).emit("lassoEnd",e),t.select.emit("end",Ov),r.onLassoEnd({chart:this.chart})})}}(t),r=function(e){return{key:"lasso",type:"brush-lasso",layout:{displayOrder:99},settings:{brush:{components:e.components},lasso:{fill:"rgba(0, 0, 0, 0)",stroke:"black",strokeWidth:2,opacity:.7,strokeDasharray:[]},snapIndicator:{threshold:75,strokeDasharray:"5, 5",stroke:"black",strokeWidth:2,opacity:.7},startPoint:{r:10,stroke:"rgba(77, 192, 78, 1)",strokeWidth:0,opacity:1}}}}(t);return{interactions:[n],components:[r]}}({actions:e.actions,componentKey:"lasso",components:t,targetKeys:[nU.COMPONENT.BAR]}):function(e,t){if(!e.componentTargetKey)throw new Error("Missing 'componentTargetKey' property");const n={key:"lasso",...e},r=(({key:e,components:t})=>({key:e,type:"brush-lasso",layout:{displayOrder:99},settings:{brush:{components:t},lasso:{fill:"rgba(0, 0, 0, 0)",stroke:"black",strokeWidth:2,opacity:.7,strokeDasharray:[]},snapIndicator:{threshold:75,strokeDasharray:"5, 5",stroke:"black",strokeWidth:2,opacity:.7},startPoint:{r:10,stroke:"rgba(77, 192, 78, 1)",strokeWidth:0,opacity:1}}}))(n);return{interactions:[IU(n,t)],components:[r]}}({key:"lasso",componentTargetKey:nU.COMPONENT.BAR,components:t},e)}function oK(e){const t=[{key:nU.COMPONENT.BAR,contexts:["selection"],action:"set",data:["selectionDimension"]}];return e.flags.isEnabled("VIZ_398_CHART_INTERACTION_REFACTOR")?function(e){var t=function(){var e,t,n,r,i,o,a,s,l,c,u,d,f,h,p=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{actions:null!==(e=p.actions)&&void 0!==e?e:wv.ACTIONS,componentKey:null!==(t=p.componentKey)&&void 0!==t?t:wv.COMPONENT_KEY,components:null!==(n=p.components)&&void 0!==n?n:wv.COMPONENTS,dock:null!==(r=p.dock)&&void 0!==r?r:wv.DOCK,enable:null!==(i=p.enable)&&void 0!==i?i:wv.ENABLE,eventKey:null!==(o=p.eventKey)&&void 0!==o?o:wv.EVENT_KEY,events:{onRangeStart:null!==(a=null===(s=p.events)||void 0===s?void 0:s.onRangeStart)&&void 0!==a?a:wv.EVENTS,onRangeMove:null!==(l=null===(c=p.events)||void 0===c?void 0:c.onRangeMove)&&void 0!==l?l:wv.EVENTS,onRangeEnd:null!==(u=null===(d=p.events)||void 0===d?void 0:d.onRangeEnd)&&void 0!==u?u:wv.EVENTS},fillTargets:null!==(f=p.fillTargets)&&void 0!==f?f:wv.FILL_TARGETS,targets:null!==(h=p.targets)&&void 0!==h?h:wv.TARGETS}}(e),n=function(e){return kv({config:e,type:"area"})}(t),r=function(e){var t=e.componentKey,n=e.components,r=e.dock,i=e.fillTargets;return{key:t,type:"brush-area-dir",layout:{dock:e.targets.map(function(e){return"@".concat(e)}).join(",")},settings:{multiple:!0,brush:{components:n},direction:"left"===r||"right"===r?"vertical":"horizontal",bubbles:{align:"left"===r||"top"===r?"end":"start",placement:"inside"},target:{components:i,fill:"rgba(82,204,82,0.2)"}}}}(t);return{interactions:[n],components:[r]}}({actions:e.actions,componentKey:"discreteRangeBrush",components:t,dock:e.dockService.meta.major.dock,eventKey:"discreteRange",fillTargets:["group-axis",nU.COMPONENT.BAR_AXIS],targets:["group-axis",nU.COMPONENT.BAR_AXIS,nU.COMPONENT.BAR]}):function(e,t){const n=function(e){const{key:t,targets:n,components:r,fillTargets:i,dock:o}=e;return{key:t,type:"brush-area-dir",layout:{dock:n.map(e=>`@${e}`).join(",")},settings:{multiple:!0,brush:{components:r},direction:"left"===o||"right"===o?"vertical":"horizontal",bubbles:{align:"left"===o||"top"===o?"end":"start",placement:"inside"},target:{components:i,fill:"rgba(82,204,82,0.2)"}}}}(e);return{interactions:[RU(e,t,"area")],components:[n]}}({eventName:"discreteRange",components:t,key:"discreteRangeBrush",targets:["group-axis",nU.COMPONENT.BAR_AXIS,nU.COMPONENT.BAR],fillTargets:["group-axis",nU.COMPONENT.BAR_AXIS],dock:e.dockService.meta.major.dock},e)}function aK(e,t,n){const{selectionService:r}=e,{isUnsupportedFeature:i}=t,o=void 0===n,a=r.getIsSingleSelect(n),s=rK(e,o,a);if(o||a)return{components:[...s.components],gestures:[...s.interactions]};const l=iK(e),c=function(e,t){return e.layoutService.meta.isStacked||e.layoutService.meta.isButterfly||t?.("rangeSelections")?{components:[],interactions:[]}:e.flags.isEnabled("VIZ_398_CHART_INTERACTION_REFACTOR")?Dv({actions:e.actions,componentKey:"measureRangeBrush",dock:e.dockService.meta.minor.dock,eventKey:"measureRange",fillTargets:["y-axis"],onEdited:()=>{e.actions.select.emit("end","measureRange")},scale:nU.SCALE.MAIN.MINOR,targets:["y-axis",nU.COMPONENT.BAR]}):zU({eventName:"measureRange",key:"measureRangeBrush",targets:["y-axis",nU.COMPONENT.BAR],fillTargets:["y-axis"],dock:e.dockService.meta.minor.dock,scale:nU.SCALE.MAIN.MINOR,onEdited(){e.actions.select.emit("end","measureRange")}},e)}(e,i),u=function(e){if(!e.layoutService.meta.isContinuous)return{components:[],interactions:[]};const t=({datum:t,data:n,scale:r})=>{const i=e.layoutService.meta.isTime?r.formatter():r.data().fields[0].formatter(),o=e.chart&&e.chart.brushSelectionIncludeMax;return`${t!==Math.max(...n)||o?"":"<"}${i(t)}`};return e.flags.isEnabled("VIZ_398_CHART_INTERACTION_REFACTOR")?Dv({actions:e.actions,componentKey:"continuousRangeBrush",dock:e.dockService.meta.major.dock,eventKey:"continuousRange",fillTargets:e.layoutService.meta.isTime?["outer-time-axis","inner-time-axis"]:["continuous-axis"],multiple:!0,observeBrush:!0,scale:e.layoutService.meta.isTime?nU.SCALE.MAIN.MAJOR_INNER:nU.SCALE.MAIN.MAJOR,targets:e.layoutService.meta.isTime?["outer-time-axis","inner-time-axis",nU.COMPONENT.BAR]:["continuous-axis",nU.COMPONENT.BAR],toLabel:t}):zU({eventName:"continuousRange",key:"continuousRangeBrush",targets:e.layoutService.meta.isTime?["outer-time-axis","inner-time-axis",nU.COMPONENT.BAR]:["continuous-axis",nU.COMPONENT.BAR],fillTargets:e.layoutService.meta.isTime?["outer-time-axis","inner-time-axis"]:["continuous-axis"],observeBrush:!0,multiple:!0,dock:e.dockService.meta.major.dock,scale:e.layoutService.meta.isTime?nU.SCALE.MAIN.MAJOR_INNER:nU.SCALE.MAIN.MAJOR,toLabel:t},e)}(e),d=oK(e);return{components:[...s.components,...l.components,...c.components,...d.components,...u.components],gestures:[...l.interactions,...s.interactions,...c.interactions,...d.interactions,...u.interactions]}}const{isNumber:sK}=oN;function lK({layoutService:e,viewModel:t,dockService:n}){const{meta:r}=e;if(!r.isStackedByDimension||r.isContinuous)return!1;const{fields:i}=t,o=e.getLayoutValue("components",null),a=o?o.filter(e=>"bar"===e.key)[0]:null;return{key:"shadow-bar",type:"box",data:{extract:[{field:i.majorStack,filter:e=>0!==e.qDown||0!==e.qUp,props:{start:{value:e=>(e=>Number(e.filter(e=>sK(e.qMaxPos)).map(e=>e.qMaxPos).reduce((e,t)=>e+t,0).toFixed(13)))(e.qSubNodes)},end:{value:e=>sK(e.qMaxPos)?Number(e.qMaxPos.toFixed(13)):0}}},{field:i.majorStack,filter:e=>0!==e.qDown||0!==e.qUp,props:{start:{value:e=>(e=>Number(e.filter(e=>sK(e.qMinNeg)).map(e=>e.qMinNeg).reduce((e,t)=>e+t,0).toFixed(13)))(e.qSubNodes)},end:{value:e=>sK(e.qMinNeg)?Number(e.qMinNeg.toFixed(13)):0}}}]},settings:{major:{scale:nU.SCALE.MAIN.MAJOR},minor:{scale:nU.SCALE.MAIN.MINOR},orientation:n.meta.minor.orientation,box:{width:a?.style?.width&&a.style.width>0?a.style.width:.7,fill:()=>({type:"pattern",fill:"rgba(165, 165, 165, 0.8)",width:4,height:4,shapes:[{type:"rect",x:0,y:3,width:1,height:1},{type:"rect",x:1,y:2,width:1,height:1},{type:"rect",x:2,y:1,width:1,height:1},{type:"rect",x:3,y:0,width:1,height:1}]})},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},animations:{enabled:t.animations.enabled,trackBy:GN.shadowBars.trackBy,compensateForLayoutChanges:GN.bars.compensateForLayoutChanges}}}const cK={min:"Min",max:"Max"};function uK(e,t,n){const r=n?e.implicitMax:e.implicitMin;return!function(e,t,n){return void 0===n?iY(e,t)||oY(e,t):n===aY?iY(e,t):oY(e,t)}(Number(r.toFixed(13)),e,t)}function dK(e,{barComponent:t,type:n,isStacked:r}){const{viewCache:i,layoutService:o,dockService:a}=e,s=i.get("minorMinMax"),l=n===aY;if(function(e,t){return!e[`hasOther${cK[t]}`]}(s,n)){if(function(e,t){return!e[`hasExplicit${cK[t]}`]}(s,n))return!1;if(uK(s,n,l))return!1}if(function(e,t,n){const r=n?e=>e<0:e=>e>0;return e[`hasExplicit${cK[t]}`]&&r(e[`explicit${cK[t]}`])}(s,n,l))return!1;let c="end";r&&(c=l?"sumOfPositives":"sumOfNegatives");const u=function(e){let t;return()=>(void 0===t&&(t=e()),t)}(()=>e.chart.scale(nU.SCALE.MAIN.MINOR)[n]()),d=l?e=>e.datum[c].value>u():e=>e.datum[c].value<u(),f=nU.COMPONENT.BAR,h=e.layoutService.getLayoutValue("components",[]),p=h?h.filter(e=>e.key===f)[0]:null;return{type:"box-sliced-hat",key:`sliced-hat-${n}`,layout:{dock:l?a.meta.minor.end:a.meta.minor.start},data:t.data,brush:t.brush,settings:{orientation:t.settings.orientation,major:t.settings.major,minor:t.settings.minor,hat:kg({},t.settings.box,{fill:o.meta.isStacked?"#999":t.settings.box.fill,alignment:1,opacity:1,show:d,width:YU({layoutService:e.layoutService,discrete:e.discrete}),strokeWidth:p?.style?.strokeWidth?UU.BAR.STROKE.WIDTH[p.style.strokeWidth.toUpperCase()]:UU.BAR.STROKE.WIDTH.NONE,stroke:p?.style?.strokeColor?.color??UU.BAR.STROKE.COLOR})}}}function fK(e,{collectionKey:t},n){const{meta:r}=e.layoutService,{fields:i}=e.viewModel,o=r.isStackedByDimension&&!r.isContinuous?"qValue":"qNum";function a(t,n){const i=e.ds.field(t).raw(),a=e.ds.field(t).formatter(),s=ST.shouldUseFormat(i),l=r.isButterfly&&n>0;return{field:t,reduceLabel:"none",value:e=>"NaN"===e[o]?0:(e=>l&&0!==e?-e:e)(e[o]),label:e=>s?(e=>"NaN"===e[o]?"-":a(e[o]))(e):e.qText}}function s(e){if(!r.isButterfly)return;return{field:e,reduceLabel:"none",value:e=>e[o]<0}}const l=r.isStackedByDimension?e=>"NaN"===e.qValue:e=>!!e.qIsNull;function c(e){return{field:e,reduceLabel:"none",reduce:"first",value:l}}const u={key:t,data:{extract:i.minor.map((t,o)=>{const l=e.colorService.getMain().getDatumProps(o),u=e.colorService.getMini().getDatumProps(o),d=l[Object.keys(l)[0]],f=d?.field,h=f?{field:f,reduceLabel:"none",value:e=>void 0!==e.qNum&&"NaN"!==e.qNum?e.qNum:e.qText||"-"}:void 0,p={field:r.isDimensionless?t:i.major,props:{...e.viewModel.selectionDimensionProp(),axisSelectionDimension:{field:0},start:0,end:a(t,o),negative:s(t),null:c(t),segment:r.isStacked?a(t):void 0,group:r.isGroupedByDimension?{field:i.majorGroup}:void 0,stack:r.isStacked?{field:i.majorStack}:void 0,measureIndex:r.isGroupedByDimension||r.isStackedByDimension?void 0:o,timeStart:r.isContinuous?{field:i.majorNumeric}:void 0,timeEnd:r.isContinuous?{field:i.majorNumeric}:void 0,fillTooltip:h,...l,...u,id:{value:e=>`r${e.qRow}e${e.qElemNumber}m${o}`},customTooltipAttrExps:0!==r.dimensionCount?x$.getNode(e.layoutService.getLayout(),r):void 0}};return r.isDimensionless&&(p.value=o),void 0!==n&&(p.source=n),ST.deleteUndefinedProperties(p.props),p}),filter:r.isButterfly?e=>!e.negative.value:void 0}};return r.isStacked&&(u.data.stack={stackKey:e=>e.stack.value,value:e=>e.end.value,offset:"diverging"}),u}const{isNumber:hK}=oN;function pK({layoutService:e,viewModel:t},{collectionKey:n}){const{meta:r}=e,{fields:i}=t;if(!r.isStacked)return!1;let o;return o=r.isStackedByMeasure?function(e,t){const n={field:0,props:{sumOfPositives:{fields:t.minor.map(e=>({field:e})),value:e=>e.reduce((e,t)=>t>0?e+t:e,0),reduceLabel:"none"},sumOfNegatives:{fields:t.minor.map(e=>({field:e})),value:e=>e.reduce((e,t)=>t<0?e+t:e,0),reduceLabel:"none"},null:{fields:t.minor.map(e=>({field:e})),value:e=>Array.isArray(e)&&e.every(e=>"NaN"===e),reduceLabel:"none"}}};if(e.isContinuous){const e={field:t.major,value:e=>e.qNum,reduceLabel:"none"};n.props.timeStart=e,n.props.timeEnd=e,n.value=e=>e.qNum}return n}(r,i):function(e,t){if(!e.isContinuous)return{field:t.majorStack,reduceLabel:"none",props:{sumOfPositives:{value:e=>hK(e.qMaxPos)?Number(e.qMaxPos.toFixed(13)):0},sumOfNegatives:{value:e=>hK(e.qMinNeg)?Number(e.qMinNeg.toFixed(13)):0},null:{value:e=>{const{qSubNodes:t=[]}=e;return t.every(e=>"NaN"===((e.qSubNodes||[])[0]||{}).qValue)}}}};const n={field:t.majors[0],value:e=>e.qNum,reduceLabel:"none"};return{field:t.majorStack,trackBy:e=>e.qNum,reduce:e=>e[0],props:{sumOfPositives:{field:t.minor[0],reduceLabel:"none",reduce:e=>e.reduce((e,t)=>t>0?e+t:e,0)},sumOfNegatives:{field:t.minor[0],reduceLabel:"none",reduce:e=>e.reduce((e,t)=>t<0?e+t:e,0)},timeStart:n,timeEnd:n}}}(r,i),{key:n,data:{extract:o}}}const mK="main-collection",gK="stack-total-collection";function yK(e,{collectionKey:t}){const{layoutService:n,colorService:r,reducedDataModel:{fields:i,mode:o}}=e,{meta:a}=n,s=a.isStackedByDimension&&!a.isContinuous?"qValue":"qNum";function l(e,t){if(!a.isButterfly)return{field:e};const n=t>0;return{field:e,value:e=>"NaN"===e[s]?0:(e=>n&&0!==e?-e:e)(e[s])}}function c(e){if(!a.isButterfly)return;return{field:e,reduceLabel:"none",value:e=>e[s]<0}}return{key:t,data:{extract:i.minor.map((e,t)=>{const n=o.isReduced?{}:r.getMain().getDatumProps(t),a={start:0,end:l(e,t),negative:c(e),group:{field:i.majorGroup},measureIndex:t,...n},s={source:"miniCube",field:o.isDimensionless?e:i.major,props:a};return o.isDimensionless&&(s.value=t),s}),filter:a.isButterfly?e=>!e.negative.value:void 0}}}const vK="mini-collection",bK="mini-stack-collection",xK="mini-continuous-collection",SK="miniCube",wK=(e,t)=>{const n=(e=>{const t=[fK(e,{collectionKey:mK})];return e.layoutService.meta.isStacked&&t.push(pK(e,{collectionKey:gK})),t})(t),r=((e,t)=>{const n=[];return zA({layoutService:t.layoutService}).miniChart&&(t.reducedDataModel.mode.isContinuous?n.push(fK(t,{collectionKey:xK},SK)):t.layoutService.meta.isStacked?n.push(function(e,{collectionKey:t}){const{colorService:n,reducedDataModel:{fields:r,mode:i}}=e;return{key:t,data:{extract:r.minor.map((e,t)=>{const o={end:{field:e,reduceLabel:"none"},...i.isStackedByMeasure&&!i.isReduced?n.getMain().getDatumProps(t):{}};return i.isContinuous&&(o.timeStart={field:r.major,value:e=>e.qNum},o.timeEnd=o.timeStart),{source:"miniCube",field:r.major,props:o}}),stack:{stackKey:e=>e.value,value:e=>e.end.value,offset:"diverging"}}}}(t,{collectionKey:bK})):n.push(yK(t,{collectionKey:vK}))),n})(0,t);return n.concat(r)};function MK(e,t,n,r){const i=[{position:e,onBackground:!0,justify:0,overflow:r}];if(t){const t={fill:"#e6e6e6",padding:{left:2,right:2,top:2,bottom:2}};i.push({position:"inside",onBackground:!1,justify:"outside"===e?1:0,background:n?t:void 0})}return i}function kK({layout:e,component:t},n,r){if(!bY(e,n))return!1;const{layoutService:i,chart:o,dockService:a,viewModel:s,themeService:l,styleService:c}=n,{meta:u}=i,d=!vY(e,n),f=l.getStyles(),h=c.label.getStyle(),p=h.useContrastColor;function m(e){const t=o.formatter(nU.FORMATTER.MINOR);return t?t(e):e}const g={label:function(e){return 0===e.data.sumOfPositives.value&&0!==e.data.sumOfNegatives.value?"":m(e.data.sumOfPositives.value)},simplifiedPlacements:MK("outside",d,p,u.isContinuous),style:f.label.value},y={label:function(e){return 0===e.data.sumOfNegatives.value&&0!==e.data.sumOfPositives.value?"":m(e.data.sumOfNegatives.value)},simplifiedPlacements:MK("opposite",d,p,u.isContinuous),style:f.label.value},v=[mY(kg(n,g)),mY(kg(n,y))];return{key:"stack-total-labels",type:"labels",renderer:rA(),layout:{displayOrder:2,minimumLayoutMode:"XSMALL"},settings:{sources:[{component:t,selector:"rect",strategy:{type:"bar",settings:{direction:e=>yY(e.data.sumOfPositives.value,a.meta.minor.orientation,r),labels:v,fontSize:parseInt(h.fontSize,10),fontFamily:h.fontFamily,linkData:GN.labels.linkData}}}]},animations:{enabled:s.animations.enabled,trackBy:GN.labels.trackBy,compensateForLayoutChanges:GN.labels.compensateForLayoutChanges}}}function CK(e,t,n){const r=[{position:e,justify:0,overflow:n,background:{padding:{left:1,right:1,top:1,bottom:1}}}];return r.push({position:"inside",onBackground:!1,justify:1,background:{padding:{left:2,right:2,top:2,bottom:2}}}),r}function qK({layout:e,type:t},n){const{layoutService:r,viewCache:i,themeService:o,styleService:a}=n,{meta:s}=r,{isStacked:l}=s;if(!l&&!vY(e,n)||l&&!bY(e,n))return!1;const c=i.get("minorMinMax");if(!c.hasExplicitMinMax||t===aY&&0===c.max||t===sY&&0===c.min)return!1;if(!cY(t===aY?c.implicitMax:c.implicitMin,c,t))return!1;const u=o.getStyles(),d=a.label.getStyle();let f=e=>e.data.end.label;s.isStacked&&(f=t===aY?function(e){if(cY(e.data.sumOfNegatives.value,c,t)){const t=0===e.data.sumOfNegatives.value?e.data.sumOfPositives.value:e.data.sumOfNegatives.value,r=n.chart.formatter(nU.FORMATTER.MINOR);return r?r(t):t}return""}:function(e){if(cY(e.data.sumOfPositives.value,c,t)){const t=0===e.data.sumOfPositives.value?e.data.sumOfNegatives.value:e.data.sumOfPositives.value,r=n.chart.formatter(nU.FORMATTER.MINOR);return r?r(t):t}return""});const h={label:f,simplifiedPlacements:CK("outside",0,s.isContinuous),styles:u},p={label:f,simplifiedPlacements:CK("opposite",0,s.isContinuous),styles:u},m=[mY(kg(n,h)),mY(kg(n,p))],g="vertical"===n.dockService.meta.minor.orientation?"down":"right",y=[{component:`${nU.COMPONENT.GHOST_BAR_OOB}-${t}`,selector:"rect",strategy:{type:"bar",settings:{direction:g,labels:m,fontSize:parseInt(d.fontSize,10),fontFamily:d.fontFamily,linkData:GN.labels.linkData}}}];return{key:`bar-oob-labels-${t}`,type:"labels",renderer:rA(),layout:{minimumLayoutMode:"XSMALL"},settings:{sources:y},animations:{enabled:n.viewModel.animations.enabled,trackBy:GN.labels.trackBy,compensateForLayoutChanges:GN.labels.compensateForLayoutChanges}}}function EK(e){return"all"===e||"title"===e}function DK(e,t,n){if(!EK(e.dimensionAxis.show)||t.layoutService.meta.isDimensionless)return!1;const r=t.alternativeService.getAlternatives(),{actions:i}=t,o=t.styleService.axis.title.getStyle();return{type:"axis-title",key:"dimension-title",renderer:"react-qcm",layout:{minimumLayoutMode:FU[`${t.dockService.meta.major.orientation}DimensionAxisTitle`].minimumLayoutMode,dock:t.dockService.meta.major.dock},data:{infos:t.layoutService.getHyperCubeValue("qDimensionInfo"),alternatives:r.dimensions,filtered:t.layoutService.meta.filteredFields.dimensions},resources:{app:t.app,cache:t.viewCache,model:t.model,selections:t.selections,translator:t.translator},callbacks:{onChange:()=>{}},settings:{isDisabled:()=>!i?.interact?.enabled(),isRTL:n,isSnapshot:t.layoutService.meta.isSnapshot,noModelDependencies:!0,skipAttributeExpressions:!1,type:"dimension"},style:{title:{color:o.color,fontFamily:o.fontFamily,fontSize:o.fontSize}}}}function TK(e,t,n){if(!EK(e.measureAxis.show))return!1;const r=t.alternativeService.getAlternatives(),{actions:i}=t,o=t.styleService.axis.title.getStyle();return{type:"axis-title",key:"measure-title",renderer:"react-qcm",layout:{minimumLayoutMode:"SMALL",dock:t.dockService.meta.minor.dock},data:{infos:t.layoutService.getHyperCubeValue("qMeasureInfo"),alternatives:r.measures,filtered:t.layoutService.meta.filteredFields.measures},resources:{app:t.app,cache:t.viewCache,model:t.model,selections:t.selections,translator:t.translator},callbacks:{onChange:()=>{}},settings:{isDisabled:()=>!i?.interact?.enabled(),isRTL:n,isSnapshot:t.layoutService.meta.isSnapshot,noModelDependencies:!0,skipAttributeExpressions:!1,type:"measure"},style:{title:{color:o.color,fontFamily:o.fontFamily,fontSize:o.fontSize}}}}function OK({environment:e,rtl:t,refLineModel:n,layoutService:r,colorService:i,dockService:o,themeService:a,viewModel:s,chart:l}){const{theme:c,localeInfo:u}=e,d={resolveUIColor:i.getMain().getPaletteColor},f=a.getStyles(),h=s.animations.enabled;return[eA({refLineModel:n,layoutService:r,colorModel:d,dockService:o,animationsEnabled:h,chart:l,scale:nU.SCALE.MAIN.MINOR,axis:"horizontal"===o.meta.major.orientation?"y":"x",key:nU.COMPONENT.MEASURE_REF_LINE,minimumLayoutMode:FU.refLines.minimumLayoutMode}),eA({isDimension:!0,refLineModel:n,layoutService:r,colorModel:d,dockService:o,animationsEnabled:h,chart:l,scale:nU.SCALE.MAIN.MAJOR,axis:"horizontal"===o.meta.major.orientation?"x":"y",rtl:t,key:nU.COMPONENT.DIMENSION_REF_LINE,mainComponentKey:nU.COMPONENT.BAR,minimumLayoutMode:FU.refLines.minimumLayoutMode}),...tA({refLineModel:n,layoutService:r,colorModel:d,animationsEnabled:h,dock:o.meta.minor.opposite,scale:nU.SCALE.MAIN.MINOR,style:f,formatter:nU.FORMATTER.MINOR,theme:c,localeInfo:u,rtl:t,key:nU.COMPONENT.MEASURE_REF_LINE_LABEL}),...tA({isDimension:!0,refLineModel:n,layoutService:r,colorModel:d,animationsEnabled:h,dock:o.meta.major.opposite,scale:nU.SCALE.MAIN.MAJOR,style:f,theme:c,localeInfo:u,rtl:t,key:nU.COMPONENT.DIMENSION_REF_LINE_LABEL})]}function NK({dockService:e,layoutService:t,discrete:n,continuousDataModel:r,viewModel:i}){if(!!zA({layoutService:t}).none)return!1;const{rtl:o}=e.config,a="horizontal"===e.meta.chart.orientation,s=!a,{dock:l}=e.meta.major,{show:c}=t.getLayoutValue("dimensionAxis",{}),u="none"!==c;if(s&&u&&"bottom"===l)return!1;if(a&&u){if(!o&&"right"===l)return!1;if(o&&"left"===l)return!1}const d=o?"left":"right";return{type:"space",key:nU.COMPONENT.SPACE,layout:{dock:s?"bottom":d,minimumLayoutMode:"XSMALL"},show:()=>t.meta.isContinuous?r.getDimensionCardinality()>1:n.query.getCanScroll(),settings:{size:Math.max(6,Math.min(16,Math.floor(.025*e.meta.minor.size)))},animations:{enabled:i.animations.enabled,trackBy:()=>Math.random()}}}function AK({chart:e,chartModel:t,discreteModel:n,colorService:r,themeService:i,layoutService:o,dockService:a,context:s,resources:l,viewCache:c}){const u=[],d=o.getLayoutValue("plugins");if(!Array.isArray(d)||0===d.length)return u;!function(e){e.forEach(e=>{e&&!e.cId&&(e.cId=ST.generateId)})}(d);const f=[],h=function(e){const t=[];return e.forEach(e=>{e?.type!==t[t.length-1]?.[0]?.type||"point"!==e?.type&&("line"!==e?.type||e?.showPoints||t[t.length-1]?.[0]?.showPoints)?t.push([e]):t[t.length-1].push(e)}),t}(d);return h.forEach((c,d)=>{const h=`points-addon-${d}`,p=`lines-addon-${d}`;switch(c[0]?.type){case"point":u.push(lA({chart:e,chartModel:t,discreteModel:n,colorService:r,themeService:i,layoutService:o,dockService:a,flags:l.flags,rtl:s.rtl,majorScale:nU.SCALE.MAIN.MAJOR,minorScale:nU.SCALE.MAIN.MINOR,mainComponentKey:nU.COMPONENT.BAR,data:c,key:h})),f.push({key:h,lines:!1,labels:!0,fixed:!0,duplicates:!0});break;case"line":u.push(function({chart:e,chartModel:t,discreteModel:n,colorService:r,layoutService:i,dockService:o,rtl:a,majorScale:s,minorScale:l,mainComponentKey:c,data:u,key:d,scales:f={}}){if(!Array.isArray(u)||0===u.length)return!1;const h={resolveUIColor:r.getMain().getPaletteColor},p="horizontal"===o.meta.major.orientation,m=!(!p||!a),{canBeContinuous:g,isContinuous:y}=i.meta,v=i.getLayout(),b=CN.getDimensionValuesInfo({layout:v,canBeContinuous:g,discreteModel:n,layoutService:i}),x=[];u.forEach((e,t)=>{const n=(e?.points??[]).map((n,r)=>({...n,lineId:t,style:0===r?e.style:void 0}));x.push(...n)});const S={},w=[];u.forEach(e=>w.push(...(e?.points??[]).map(e=>e.dimensionValue))),w.forEach(e=>{b[e]&&(S[e]?(S[e].innerValues=b[e].innerValues,S[e].minOrder=Math.min(S[e].minOrder,b[e].minOrder),S[e].maxOrder=Math.max(S[e].maxOrder,b[e].maxOrder),S[e].isMinOrderOk=S[e].isMinOrderOk||b[e].isMinOrderOk,S[e].isMaxOrderOk=S[e].isMaxOrderOk||b[e].isMaxOrderOk):S[e]={id:b[e].id,dataNode:b[e].dataNode,qText:b[e].qText,innerValues:b[e].innerValues,minOrder:b[e].minOrder,maxOrder:b[e].maxOrder,isMinOrderOk:b[e].isMinOrderOk,isMaxOrderOk:b[e].isMaxOrderOk},S[e].numInnerValues=(S[e].maxOrder||0)-(S[e].minOrder||0)+1)});const M=x[0];x.forEach(t=>{const n=aA({point:t,dimensionValueInfo:S,layoutService:i}),r=t?.scale,o=M?.scale,a=i?.meta?.isButterfly,s=i?.meta?.isStacked,l=S[t.dimensionValue]?.dataNode;let c=n;const u=o&&r&&o!==r,d=a&&1===t.measureIndex,h=s&&Array.isArray(l);if(u)c=function(e,t,n){const r=t.min(),i=t.max(),o=n.min(),a=n.max();return i===r?o:o+(e-r)/(i-r)*(a-o)}(n,f[r]||e.scale(r),f[o]||e.scale(o));else if(d)c=-n;else if(h&&void 0!==t.measureIndex&&Array.isArray(l)){const e=l.slice(0,t.measureIndex+2),n=l[t.measureIndex+1]?.qNum;if("number"==typeof n&&0!==n){const t=Math.sign(n);c=e.reduce((e,n)=>{const r=n.qNum;return"number"==typeof r&&Math.sign(r)===t?e+r:e},0)}}t.validMeasureValue=c});const k={scale:s,fn:({datum:t})=>{const n=e.scale(s),r=t.value.dimensionValue;return y?n("string"==typeof r?""===r?void 0:+r:r):void 0!==S[r]?CN.getScaledPosition({scale:n,value:S[r].id,valueInfo:S[r],size:e.component(c)?.rect[p?"width":"height"],align:"center",invert:m,layoutService:i,isContinuous:y}):void 0}},C={scale:l,fn:({datum:e,scale:t})=>t(e.value.validMeasureValue)};return{key:d,type:"line",data:x,settings:{connect:!0,coordinates:{major:p?k:C,minor:p?C:k,layerId:({datum:e})=>e.value.lineId},layers:{curve:({datum:e})=>e.value.style?.lineCurve??"monotone",line:{strokeWidth:({datum:e})=>e.value.style?.lineThickness??3,stroke:({datum:e})=>oA({colorModel:h,color:e.value.style?.lineColor?.color?e.value.style?.lineColor:{index:-1,color:"#000"}}),strokeDasharray:({datum:e})=>e.value.style?.lineType}}},animations:{enabled:t.query.animationsEnabled,trackBy:GN.nonUpdatingNode.trackBy,compensateForLayoutChanges:GN.lines.compensateForLayoutChanges}}}({chart:e,chartModel:t,discreteModel:n,colorService:r,layoutService:o,dockService:a,rtl:s.rtl,majorScale:nU.SCALE.MAIN.MAJOR,minorScale:nU.SCALE.MAIN.MINOR,mainComponentKey:nU.COMPONENT.BAR,data:c,key:p})),c.forEach((c,d)=>{if(c?.showPoints&&c?.points){const h=`points-${d}-for-${p}`;u.push(lA({chart:e,chartModel:t,discreteModel:n,colorService:r,themeService:i,layoutService:o,dockService:a,flags:l.flags,rtl:s.rtl,majorScale:nU.SCALE.MAIN.MAJOR,minorScale:nU.SCALE.MAIN.MINOR,mainComponentKey:nU.COMPONENT.BAR,data:c.points,key:h})),f.push({key:h,lines:!0,labels:!0,duplicates:!0})}else c?.points&&f.push({key:p,lines:!0,labels:!1,duplicates:!0,points:c.points})})}}),u.push(function({layoutService:e,dockService:t,chartModel:n,themeService:r,configs:i,cache:o}){const a=e.getLayoutValue("plugins"),{rtl:s}=t.config,{orientation:l}=t.meta.major,{isOneDimensional:c,isStacked:u}=e.meta,d=r.getStyles();return{type:"point-label",key:"plugins-point-labels",renderer:rA(),settings:{all:!0,cache:o,configs:i,label:e=>e.value?.label?.value?e.value?.label?.value:u?e.point?.label:e.end?.label,lineId:({data:e})=>{for(let t=0;t<a.length;t++){const n=a[t];switch(n.type){case"point":if(n.cId===e.value?.cId)return n.cId;break;case"line":if(n.points.some(t=>t.cId===e.value?.cId))return n.cId}}return e.value?.cId||e.line?.value},majorValue:e=>e.value?.dimensionValue?e.value.dimensionValue:c?e.value:e.major?.value,orientation:l,pointValue:e=>e.value?.validMeasureValue,rtl:s},style:d.plugins.label,animations:{enabled:n.query.animationsEnabled,trackBy:GN.nonUpdatingNode.trackBy,compensateForLayoutChanges:GN.labels.compensateForLayoutChanges}}}({layoutService:o,dockService:a,chartModel:t,themeService:i,configs:f,flags:l.flags,cache:c})),u}const _K=(e,t,n)=>{const{layoutService:r,dockService:i,colorService:o,chart:a,actions:s,discrete:l,continuousDataModel:c,reducedDataModel:u,viewModel:d,viewState:f,viewCache:h,themeService:p,refLineModel:m,pluginService:g,tooltipService:y,rtl:v,logicalSize:b,trendLineModel:x,disclaimerService:S}=t,{localeInfo:w}=n,M=function(e,t){const{disclaimerService:n,themeService:r,translator:i}=e,o=n.getDisclaimer();if(!o)return!1;const{fontFamily:a}=r.getStyles();return{key:"disclaimer",type:"disclaimer",renderer:"react-qcm",layout:{dock:o.alignment},settings:{isRTL:t,label:i.get(`Object.Disclaimer.${o.key}`)},style:{fontFamily:a}}}(t,v);if(S.getHasSuppressingDisclaimer())return{components:[M]};const k=nK(e,t,{localeInfo:w,rtl:v}),C=!s?.interact?.enabled(),q=o.getMain().getLegend({eventName:"legend-c",key:"legend-color",viewState:f,chart:a,styleReference:"object.barChart",styleOverrides:{title:t.styleService.legend.title.getStyle(),label:t.styleService.legend.label.getStyle()},rtl:v,settings:{item:{shape:{size:10}}}},{actions:s,navigationDisabled:C}),E=q.components[0];if(E){const{dock:e}=E.layout;if(k.fillRange&&(["right","left"].includes(e)||v)&&(k.fillRange.invert=!0),"legend-seq"===E.type&&void 0!==d.selectionDimensionIdx&&k.fillRange&&k.fillRange.min<k.fillRange.max){const e=t.flags.isEnabled("VIZ_398_CHART_INTERACTION_REFACTOR")?Dv({actions:s,bubblesPlacement:"outside",componentKey:"legendRangeBrush",dock:E.layout.dock,eventKey:"legendRange",fillTargets:[E.key],onEdited:()=>{s.select.emit("end","legendRange")},scale:"fillRange",targetFillSelector:'[id="legend-seq-ticks"]',targets:[E.key],targetSelector:'[id="legend-seq-target"]'}):zU({eventName:"legendRange",key:"legendRangeBrush",targets:[E.key],fillTargets:[E.key],targetSelector:'[id="legend-seq-target"]',targetFillSelector:'[id="legend-seq-ticks"]',dock:E.layout.dock,scale:"fillRange",bubblesPlacement:"outside",onEdited:()=>{s.select.emit("end","legendRange")}},t);q.components.push(...e.components),q.interactions.unshift(...e.interactions)}}else k.fillRange&&v&&(k.fillRange.invert=!0);const D=((e,{componentKey:t,collectionKey:n})=>{const{layoutService:r,colorService:i,dockService:o,discrete:a,viewModel:s}=e,{meta:l}=r,c=i.getMain().getPaletteColor;let u,d;l.isGroupedByDimension?u=({scale:e,datum:t})=>e([t.group.value,t.value])+e.bandwidth([t.group.value,t.value])/2:l.isGroupedByMeasure&&(u=({scale:e,datum:t})=>e([t.value,t.measureIndex.value])+e.bandwidth()/2);let f=2;l.isContinuous?(d={start:"timeStart",end:"timeEnd"},f=tY(e,t)):l.isStacked&&(d="stack");const h=l.isStackedByDimension&&r.getHyperCubeValue("qStackedDataPages.0.qArea.qHeight",NaN)>1,p=e=>!0===e.datum.null?.value,m=r.getLayoutValue("components",null),g=m?m.filter(e=>e.key===t)[0]:null,y=e=>{const t=e?.minWidthPx;return oN.isNumber(t)?t<=5?0:Math.min(2,t/10):0};return{key:t,type:"box",data:{collection:n},preferredSize:l.isContinuous?()=>({size:0,edgeBleed:{left:1,right:1}}):void 0,brush:{consume:[{context:"selection",data:["selectionDimension","axisSelectionDimension","end","fill","timeEnd"],style:{active:{strokeWidth:(()=>{if(h)return 0;if(!l.isContinuous)return 2;const e=r.getLayout(),t=e.qHyperCube?.qDimensionInfo?.[0]?.continuous?.period;return t&&"none"!==t?y:0})(),stroke:"#000"},inactive:{opacity:.3}}}]},settings:{major:{scale:nU.SCALE.MAIN.MAJOR,fn:u,ref:d},minor:{scale:nU.SCALE.MAIN.MINOR},orientation:o.meta.minor.orientation,box:{width:YU({layoutService:r,discrete:a}),minWidthPx:f,fill:i.getMain().getColor(),opacity:e=>p(e)?0:void 0,minHeightPx:function(e){return l.isStacked?.1:p(e)?.01:.3},strokeWidth:g?.style?.strokeWidth?UU.BAR.STROKE.WIDTH[g.style.strokeWidth.toUpperCase()]:UU.BAR.STROKE.WIDTH.NONE,stroke:g?.style?.strokeColor?.color?c(g?.style?.strokeColor):UU.BAR.STROKE.COLOR},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},animations:{enabled:s.animations.enabled,isMainComponent:!0,trackBy:GN.bars.trackBy,compensateForLayoutChanges:GN.bars.compensateForLayoutChanges}}})(t,{componentKey:nU.COMPONENT.BAR,collectionKey:nU.COLLECTION.MAIN}),T=((e,{componentKey:t,collectionKey:n})=>{const{meta:r}=e.layoutService;if(!r.isStacked)return!1;let i=2;r.isContinuous&&(i=tY(e,t));const o={key:t,type:"box",data:{collection:n},settings:{major:{scale:nU.SCALE.MAIN.MAJOR},minor:{scale:nU.SCALE.MAIN.MINOR,start:{ref:"sumOfNegatives"},end:{ref:"sumOfPositives"}},orientation:e.dockService.meta.minor.orientation,box:{width:YU({layoutService:e.layoutService,discrete:e.discrete}),minWidthPx:i,opacity:0,fill:"none"},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},brush:{consume:[{context:"selection",data:[""],style:{active:{strokeWidth:2,stroke:"#000",opacity:e=>!0===e.data?.null?.value?0:1},inactive:{opacity:e=>!0===e.data?.null?.value?0:.3}}}]}};return r.isContinuous&&(o.settings.major.ref={start:"timeStart",end:"timeEnd"}),o})(t,{componentKey:nU.COMPONENT.STACK_TOTAL_BAR,collectionKey:nU.COLLECTION.STACK_TOTAL}),O=aK(t,n,d.selectionDimensionIdx),{isStacked:N}=r.meta;let A;A=u.mode.isContinuous?nU.COLLECTION.MINI_CONTINUOUS:N?nU.COLLECTION.MINI_STACK:nU.COLLECTION.MINI;const _=N?T:D,I=OY(0,t),L=[...I,dK(t,{barComponent:_,type:"max",isStacked:N}),dK(t,{barComponent:_,type:"min",isStacked:N}),dY(t,{barComponent:_,type:"max",isStacked:N}),dY(t,{barComponent:_,type:"min",isStacked:N}),hY(t,{chart:a,type:"max",collectionKey:N?nU.COLLECTION.STACK_TOTAL:nU.COLLECTION.MAIN}),hY(t,{chart:a,type:"min",collectionKey:N?nU.COLLECTION.STACK_TOTAL:nU.COLLECTION.MAIN}),...WU(e,t,v,!!I[0]),D,T,lK({layoutService:r,viewModel:d,dockService:i}),DK(e,t,v),TK(e,t,v),...OK({environment:n,rtl:v,refLineModel:m,layoutService:r,colorService:o,dockService:i,themeService:p,viewModel:d,chart:a}),HO({viewState:f,viewCache:h,layoutService:r,dockService:i,rtl:v}),NK({dockService:i,layoutService:r,discrete:l,continuousDataModel:c,viewModel:d}),FY(D,t,{collectionKey:A}),FA({layoutService:r,dockService:i,discrete:l,continuousDataModel:c,viewState:f,viewCache:h,themeService:p,rtl:v,deviceType:n.deviceType}),...FW({majorScale:nU.SCALE.MAIN.MAJOR,minorScale:nU.SCALE.MAIN.MINOR,tooltipOverlay:nU.COMPONENT.TREND_LINES_TOOLTIP_OVERLAY},{layoutService:r,trendLineModel:x,dockService:i,animationsEnabled:d.animations.enabled}),...q.components,SY({layout:e,component:nU.COMPONENT.BAR,minorScale:k.minor},t,v),kK({layout:e,component:nU.COMPONENT.STACK_TOTAL_BAR},t,v),qK({layout:e,type:"max"},t),qK({layout:e,type:"min"},t),...O.components,...y.getComponents(),!1!==e.showDisclaimer&&M,HW({tooltip:nU.COMPONENT.TREND_LINES_TOOLTIP,formatter:nU.FORMATTER.MINOR},t,{rtl:v}),...AK({chart:a,chartModel:{query:{animationsEnabled:d.animations.enabled}},discreteModel:l,colorService:o,themeService:p,layoutService:r,dockService:i,context:{},resources:t,viewCache:h})].filter(Boolean);!function(e){if(e&&0!==e.length)for(let t=0;t<e.length;t++)e[t].layout=e[t].layout||{},e[t].layout.displayOrder=t}(L);const P=[...q.interactions,...O.gestures].sort((e,t)=>(t.prio||0)-(e.prio||0));return{interactions:PY(t,{rtl:v,hammer:{gestures:P}}),scales:k,palettes:o.getMain().getPalettes(),components:g.extendComponents(L),strategy:mT(0,{logicalSize:b,minCenterRatio:0}),formatters:wY(t,k),collections:wK(0,t)}};function IK({picasso:t,chart:n,services:r,environment:i,viewState:o,viewCache:a,bootstrapped:s}){const{width:l,height:c}=e.useRect(),u=e.useModel(),d=e.useSelections(),f=e.useOptions(),[h,p]=e.useState(),[m,g]=e.useState(),[y,v]=e.useState(),[b,x]=e.useState(),S=e.useApp();function w(){if(!n.layoutComponents)return Promise.resolve();const{discrete:e,layoutService:s,viewModel:l}=r;a.set("isPreRender",!0);const c=function(e={}){const{alternativeService:s,selectionService:l,refLineModel:c,discrete:p,reducedDataModel:m,continuousDataModel:g,trendLineModel:y,pluginService:v,colorService:b,viewModel:x,dockService:w,themeService:M,customTooltipModel:k,layoutService:C,logicalSize:q,styleService:E,disclaimerService:D,tooltipService:T}=r,O=l.custom.getActions(),N=t.data("q")(h.prepPicassoDataSet()),A={picasso:t,ds:N,rtl:"rtl"===f?.direction,model:u,app:S,chart:n,actions:O,localeInfo:i.localeInfo,logicalSize:q,flags:i.flags,translator:i.translator,selections:d,isLocked:l.getIsSelectionLocked,viewCache:a,viewState:o,alternativeService:s,layoutService:C,dockService:w,viewModel:x,colorService:b,selectionService:l,themeService:M,trendLineModel:y,discrete:p,continuousDataModel:g,reducedDataModel:m.model(),customTooltipModel:k,debouncer:rS,refLineModel:c,pluginService:v,styleService:E,disclaimerService:D,tooltipService:T,...e};return _K(C.getLayout(),A,i)}(m);h.extractDataPages(),n.layoutComponents({settings:c,data:y}),a.set("isPreRender",!1),h.insertDataPages(),l.animations.hasSlicedHats=c.components.filter(e=>"box-sliced-hat"===e.type).length>0;const p=[];return 1!==c.components.length&&s.meta.isDiscrete&&p.push(e.command.initialize()),Promise.all(p)}const[[M,k]=[]]=e.usePromise(()=>{if(!(t&&n&&r&&i&&o&&a&&s))return Promise.resolve();const{alternativeService:e,layoutService:l,selectionService:c,refLineModel:u,discrete:d,continuous:f,reducedDataModel:h,continuousDataModel:p,trendLineModel:m,legendLayoutService:g,colorService:y,pluginService:v,viewModel:b,customTooltipModel:S,disclaimerService:w,customTooltipService:M,tooltipService:k}=r;if(!c?.custom?.getActions())return Promise.resolve();const{properties:C}=s,q=C?.qHyperCubeDef.qDimensions.some(e=>e.qCalcCondition?.qCond?.qv);q&&(S.useCustomTooltip=!1);const E=()=>{x(Date.now()),b.animations.isPartialUpdating=!0};o.onChanged("scrollOffset",()=>{g&&g.setDataPages([d.query.getCurrentDataPage()]),u&&u.update(),E()}),o.onChanged("legendScrollOffset",E),o.intercept("zoom",f.event.onZoomIntercept({viewCache:a})),o.onChanged("zoom",f.event.onZoomChange({layoutService:l,continuousDataModel:p},E)),c.setLayout(l.getLayout());const D=[];l.meta.isContinuous&&(p.update(l.getLayout()),D.push(p.initialFetch())),m.command.update(),D.push(h.fetch().then(({reducedCube:e})=>{h.update(e)})),M.setProperties(C),k.expando.set("properties",C),w.initialize(),D.push(Promise.resolve({properties:s.properties}));return Promise.all(D).then(t=>Promise.all([v.initialize(),y.initialize(),e.initialize({properties:C}),AU({reducedDataModel:h,layoutService:l,continuousDataModel:p,trendLineModel:m})]).then(e=>[t,e.pop()]))},[s]);e.useEffect(()=>{if(!r?.colorService?.getMain()||!k)return;const{layoutService:e,selectionService:t,reducedDataModel:n,continuousDataModel:o,trendLineModel:s,legendLayoutService:l,colorService:c,viewModel:u}=r;a.set("minorMinMax",k);const d=e.getHyperCube(),f=e.meta.isContinuous?o.getInitialCube():n.model().cube,{field:h}=c.getMain().getSettings(),m=!e.meta.isContinuous&&(n.model().mode.isReduced||e.meta.isStacked)&&l,y=m?l.getHyperCube():void 0;t.setBrushAliases({colorField:h,useLegendCube:m,legendAlias:`legendCube/${h}`});const v=function({mainCube:e,miniCube:t,legendCube:n,localeInfo:r,layoutService:i,viewModel:o,trendLineModel:a}){const s=i.refs.dataPages.split(".").pop();let l=[],c=[];const u=i.meta.isContinuous?[{key:o.fields.majorNumeric,from:i.meta.isStackedByDimension?o.fields.majorStack:o.fields.major,override:{value:e=>e.qNum}}]:void 0;return{prepPicassoDataSet:()=>({key:"qHyperCube",data:e,config:{localeInfo:r,virtualFields:u}}),prepPicassoData(i){const o=[{type:"q",key:"qHyperCube",data:e,config:{localeInfo:r,virtualFields:u}},{type:"q",key:"miniCube",data:t,config:{localeInfo:r,virtualFields:u}},...i];return n&&o.push({type:"q",key:"legendCube",data:n,config:{localeInfo:r,virtualFields:u}}),a.query.hasTrendLines()&&o.push({key:"trend",data:a.query.getData()}),o},extractDataPages(){l=e[s],c=t.qDataPages,e[s]=[],t.qDataPages=[]},insertDataPages(){e[s]=l,t.qDataPages=c}}}({mainCube:d,miniCube:f,legendCube:y,localeInfo:i.localeInfo,layoutService:e,viewModel:u,trendLineModel:s}),b=M[M.length-1];g({localeInfo:i.localeInfo,...b}),p(v)},[k]),e.useEffect(()=>{if(!r||!m||!h)return;const e=r.colorService.getMain();if(!e)return;h.prepPicassoDataSet();const t=h.prepPicassoData(e.getData());v(t)},[m]),e.useEffect(()=>{r?.colorService?.getMain()&&n.update&&h&&y&&w().then(()=>{const{layoutService:e,discrete:t,legendLayoutService:i}=r;if(i){1===e.getLayoutValue("scrollStartPos")&&i.setDataPages([t.query.getCurrentDataPage()])}n.update(),GN.cacheProperties({viewCache:a,layout:e.getLayout()})})},[y]),e.useEffect(()=>{if(!(l&&c&&h&&n?.update&&r?.colorService.getMain()))return;const{viewModel:e}=r;e.animations.isSizeChanging=!0;const{dockService:t,themeService:o}=r;t.update({width:l,height:c}),o.setTheme(i.theme),w().then(()=>{n.update&&n.update()})},[l,c]),e.useEffect(()=>{if(!n?.update)return;const{viewModel:e}=r;n.update({partialData:!0,excludeFromUpdate:["mini-marker","dim-title","measure-title","ref-line","grid-line"]}),e.animations.isPartialUpdating=!1},[b])}const LK=e=>"[object Object]"===Object.prototype.toString.call(e),PK=e=>Array.isArray(e);function RK(e,t){if(e===t)return!0;if(PK(e)){if(!PK(t))return!1;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!RK(e[n],t[n]))return!1;return!0}if(LK(e)){if(!LK(t))return!1;const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r=0;r<n.length;r++){if(!Object.hasOwn(t,n[r]))return!1;if(!RK(e[n[r]],t[n[r]]))return!1}return!0}return e===t}function zK({enable:t=!0}={}){const n=e.useModel(),r=()=>Date.now().toString()+Math.random(),[i,o]=e.useState(r()),a={properties:void 0};return e.useEffect(()=>{if(!n||!n.getEffectiveProperties||!t)return()=>{};const e=()=>{n.getEffectiveProperties().then(e=>{const t=kg(!0,{},e);if(!a.properties)return void(a.properties=t);const n=function(e,t){const n={properties:!1,exclude:!1};if(e===t)return n;const r=kg(!0,{},e),i=kg(!0,{},t);return n.exclude=!RK(r.qHyperCubeDef?.qLayoutExclude,i.qHyperCubeDef?.qLayoutExclude),delete r.qHyperCubeDef?.qLayoutExclude,delete i.qHyperCubeDef?.qLayoutExclude,n.properties=!RK(r,i),n}(a.properties,t);a.properties=t,n.exclude&&!n.properties&&o(r())})};return n.on("changed",e),e(),()=>{n.removeListener("changed",e)}},[t]),i}function FK({env:t,services:n}){const r=e.useApp(),i=e.useModel(),o=e.useRenderState(),a=zK({enable:!1===n?.layoutService?.meta?.isSnapshot}),[s,l]=e.usePromise(async()=>{if(!t||!n)return Promise.resolve();const{layoutService:e}=n,{isSnapshot:a,isStacked:s,isContinuous:l}=e.meta,c=[];return a||c.push(i.getEffectiveProperties()),Promise.all(c).then(async t=>{const n=t[0]||void 0;if(n?.qHyperCubeDef){const t=e.getLayout(),a=kg(!0,{},n),c=(({properties:e,layout:t,isStacked:n,isContinuous:r,model:i,layoutService:o})=>{const a=t.qHyperCube.qDimensionInfo.filter(e=>7005!==e.qError?.qErrorCode),s=t.qHyperCube.qMeasureInfo.filter(e=>7005!==e.qError?.qErrorCode),l=kg(!0,{},e);return((e,t,n)=>{const{color:{mode:r}}=n;e.length>1&&n.color?n.color.persistent=!0:"byDimension"===r&&t.length>1?n.color.mode="byMultiple":"byExpression"===r&&0===t.length?n.color.mode="primary":0===e.length&&t.length>0&&(n.color.byMeasureDef=void 0,n.color.byDimDef=void 0,1===t.length&&"byExpression"!==r&&(n.color.mode="primary"))})(a,s,e),a.length>1&&n&&!r&&"S"===e.qHyperCubeDef.qMode&&(e.qHyperCubeDef.qMode="K"),a.length<2&&"K"===e.qHyperCubeDef.qMode&&(e.qHyperCubeDef.qMode="S"),i.colorSupport?.colorByUpdater?.(e,"qHyperCubeDef.",t),function({properties:e,layoutService:t}){const{filteredFields:n}=t.meta;if(!(n.measures.length>0))return;const{mode:r}=e.color||{};if("byExpression"===r){const r=t.getLayout();if("colorByExpression"===r.qHyperCube.qMeasureInfo?.[0]?.qAttrExprInfo?.[0]?.id)return;const{current:i,target:o}=function({properties:e,filtered:t}){const{qMeasures:n}=e.qHyperCubeDef||[],{current:r,target:i}=n.reduce((e,n,r)=>("colorByExpression"===n.qAttributeExpressions[0]?.id&&(e.current=r),void 0!==e.target||t.includes(r)||(e.target=r),e),{current:void 0,target:void 0});return{current:r,target:i}}({properties:e,filtered:n.measures});if(void 0===i)return;const a=e.qHyperCubeDef.qMeasures[i].qAttributeExpressions[0];e.qHyperCubeDef.qMeasures[i].qAttributeExpressions.splice(0,1),e.qHyperCubeDef.qMeasures[o].qAttributeExpressions.splice(0,0,a)}}({properties:e,layoutService:o}),!GO.compare(l,e,!0)&&JSON.stringify(l)!==JSON.stringify(e)&&(e.hash=Math.random(),!0)})({properties:n,layout:t,isStacked:s,isContinuous:l,model:i,layoutService:e});if(c)return o.pending(),(e=>!(!e||e.qHasSoftPatches||e.qExtendsId||!((e.qMeta?.privileges||[]).indexOf("update")>-1)))(t)?i.setProperties(n).then(()=>{r.clearUndoBuffer()}):void await((e,t,n)=>{if(!e)return Promise.resolve();let r=GO.generate(t,n);return kg(!0,t,n),r&&r.length?(r=r.map(e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path})),e.applyPatches(r,!0)):Promise.resolve()})(i,a,n);o.restore()}return{properties:n}})},[t,n,a]);if(l&&!l.isHandled)throw l;return s}var jK,BK={exports:{}};var VK=(jK||(jK=1,function(e){self,e.exports=(()=>{var e={909:e=>{var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},a=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,i=t.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(r in e);return void 0===r||t.call(e,r)},s=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(i)return i(e,n).value}return e[n]};e.exports=function e(){var t,n,r,i,c,u,d=arguments[0],f=1,h=arguments.length,p=!1;for("boolean"==typeof d&&(p=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<h;++f)if(null!=(t=arguments[f]))for(n in t)r=l(d,n),d!==(i=l(t,n))&&(p&&i&&(a(i)||(c=o(i)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&a(r)?r:{},s(d,{name:n,newValue:e(p,u,i)})):void 0!==i&&s(d,{name:n,newValue:i}));return d}},8:(e,t)=>{(()=>{var e={229:e=>{var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},a=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,i=t.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(r in e);return void 0===r||t.call(e,r)},s=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(i)return i(e,n).value}return e[n]};e.exports=function e(){var t,n,r,i,c,u,d=arguments[0],f=1,h=arguments.length,p=!1;for("boolean"==typeof d&&(p=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<h;++f)if(null!=(t=arguments[f]))for(n in t)r=l(d,n),d!==(i=l(t,n))&&(p&&i&&(a(i)||(c=o(i)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&a(r)?r:{},s(d,{name:n,newValue:e(p,u,i)})):void 0!==i&&s(d,{name:n,newValue:i}));return d}}},n={};function r(t){var i=n[t];if(void 0!==i)return i.exports;var o=n[t]={exports:{}};return e[t](o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};(()=>{r.r(i),r.d(i,{default:()=>Ne});var e=r(229),t=r.n(e);const n=function(e,t,n){if(!t)return!1;var r,i=t.split("."),o=i[i.length-1],a=e;for(r=0;r<i.length-1;++r)void 0===a[i[r]]&&(a[i[r]]=Number.isNaN(+i[r+1])?{}:[]),a=a[i[r]];if(void 0!==n){var s=a[o];return a[o]=n,{updated:n,previous:s}}return delete a[o],!1},o=function(e,t,n){var r,i=t.split("."),o=e;if(void 0===o)return n;for(r=0;r<i.length;++r){if(void 0===o[i[r]])return n;o=o[i[r]]}return o},a={EXPRESSIONS:{observed:"",trend:"STL_Trend",seasonal:"STL_Seasonal",residual:"STL_Residual"},OPTIONS:[{value:"observed",translation:"cao.trendDecomposition.parameters.decomposition.observed"},{value:"trend",translation:"cao.trendDecomposition.parameters.decomposition.trend"},{value:"seasonal",translation:"cao.trendDecomposition.parameters.decomposition.seasonal"},{value:"residual",translation:"cao.trendDecomposition.parameters.decomposition.residual"}]};var s="".concat(" ","(").concat("　"),l="".concat("　",")").concat(" ");function c(e){return s+e+l}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var n=function(e,t){if(!t)return null;var n,r;for(n=0;n<t.length;n++)if((r=t[n]).qInfo.qId===e)return r;return null}(e.qLibraryId,t.dimensionList);return n&&n.qData.info[0].qTags.indexOf("$numeric")>-1}var r=function(e,t){if(!t)return null;var n,r,i=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var n=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(n)&&(t=(t=t.substring(1,n)).trim()),t}(e);for(n=0;n<t.length;n++){if((r=t[n]).qName===i)return r;if(r.qDerivedFieldData)for(var o=0;o<r.qDerivedFieldData.qDerivedFieldLists.length;++o)for(var a=r.qDerivedFieldData.qDerivedFieldLists[o],s=0;s<a.qFieldDefs.length;++s){var l=a.qFieldDefs[s];if(l.qName===i)return l}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return r&&r.qTags.indexOf("$numeric")>-1}function d(e){return!(!e.fullAccumulation&&!e.fullRange)}function f(e,t){var n=e.crossAllDimensions;return 2===t&&n?"RowNo(Total)":"RowNo()"}function h(e){var t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e),n=t.trim();return"="===n.substring(0,1)?n.substring(1).trim():n}function p(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function m(e,t){var n=e.crossAllDimensions;return 2===t&&n?"Above(Total ":"Above("}function g(e){return void 0===e?")":", 0, ".concat(e,")")}function y(e){return"Replace(Replace(".concat(e,",'''',''''''),'$','$''&''')")}function v(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=").concat(y("MinString(".concat(t,")")),")' and Only({1}").concat(t,")<='$(=").concat(y("MaxString(".concat(t,")")),")'\"}")}function b(e){var t=e.modifier,n=void 0===t?{}:t,r=e.dimensions,i=e.dimensionAndFieldList,o=e.funcComp,a=void 0===o?"Sum":o,s=e.valueComp,l=void 0===s?"0":s;if(!n.showExcludedValues)return"";if(r&&1===r.length){var c=v(u(r[0],i),p(0));return"".concat(a,"({1<").concat(c,">}").concat(l,")")}if(r&&2===r.length){var d=u(r[0],i),f=u(r[1],i),h=p(0),m=p(1),g=v(d,h),y=v(f,m);return"".concat(a,"({1<").concat(g,",").concat(y,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function x(e){return"".concat(e,"(")}function S(e){var t=e.properties,n=e.layout;return o(t,"qHyperCubeDef.qDimensions",o(n,"qHyperCube.qDimensionInfo",[])).length}const w={isFullRange:d,getNumDimensions:S,getExpressionWithExcludedComp:function(e){var t=e.expression,n=e.modifier,r=e.dimensions,i=e.dimensionAndFieldList,o=e.treatMissingAsNull,a=c(h(t));if(!n.showExcludedValues)return a;var s=b({modifier:n,dimensions:r,dimensionAndFieldList:i}),l=o?"":", 0";if(r&&1===r.length){var u=p(0);return"If(Count(".concat(u,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(r&&2===r.length){var d=p(0),f=p(1);return"If(Count(".concat(d,") * Count(").concat(f,") > 0, ").concat(a," + ").concat(s).concat(l,")")}return a},getRowNoComp:f,getNumStepComp:function(e,t){if(!d(e)){var n=e.steps;return"number"!=typeof n||Number.isNaN(n)?6:n}return f(e,t)},getAboveCompPrefix:m,getAboveCompSuffix:g,getAboveComp:function(e,t,n,r){return m(e,t)+n+g(r)},getFunctionPrefix:x,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return x(e)+t+")"},getAggrComp:function(e,t,n){return"Aggr(".concat(e,", ").concat(t,", ").concat(n,")")},getExcludedComp:b,needDimension:function(e){var t=e.modifier,n=e.properties,r=e.layout,i=function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t);return 0===i&&2===S({properties:n,layout:r})},getDimComp:function(e,t){var n=function(e){return e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:0].qDef.qSortCriterias[0]}(e,t),r=p(t);if(!n.qSortByExpression&&!n.qSortByNumeric&&!n.qSortByAscii)return r;var i=["Descending","Ascending"],o=n.qSortByNumeric?"(Numeric, ".concat(i[(n.qSortByNumeric+1)/2],")"):"",a=n.qSortByAscii?"(Text, ".concat(i[(n.qSortByAscii+1)/2],")"):"";return n.qSortByNumeric&&n.qSortByAscii?"(".concat(r,", ").concat(o,", ").concat(a,")"):n.qSortByNumeric?"(".concat(r,", ").concat(o,")"):n.qSortByAscii?"(".concat(r,", ").concat(a,")"):r},simplifyExpression:h,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var n=t.indexOf(s);if(-1!==n){var r=t.indexOf(l);if(-1!==r)return t.substring(n+s.length,r)}}},initModifier:function(e,t){Object.keys(t).forEach(function(n){void 0===e[n]&&(e[n]=t[n])})},isNumeric:u,isApplicable:function(e){var t=e.properties,n=e.layout,r=e.minDimensions,i=void 0===r?1:r,o=e.maxDimensions,a=void 0===o?2:o;if(!t&&!n)return!0;var s=S({properties:t,layout:n});return s>=i&&s<=a},getExpressionWithMarkers:c,canExtract:function(e){var t=e.indexOf(s),n=e.indexOf(l);return t>-1&&n>-1&&t<n},getDimDefWithWrapper:p,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")},generateTSDExpression:function(e,t,n){var r=t||e.outputExpression;if(e.base&&e.base.qDef&&(r=t!==e.base.qDef?t:e.base.qDef),"observed"!==e.decomposition){var i=n.qHyperCubeDef.qMeasures.find(function(t){return t.qDef.base&&t.qDef.base.qLibraryId&&e.base&&e.base.qLibraryId?t.qDef.base.qLibraryId===e.base.qLibraryId:null});i&&t!==i.qDef.qLabel&&(r=i.qLibraryId||i.qDef.base.qLibraryId?"[".concat(i.qDef.qLabel,"]"):i.qDef.base.qDef);var o=function(e){var t=a.OPTIONS.find(function(t){return t.value===e.decomposition});return t?a.EXPRESSIONS[t.value]:""}(e);r=r.startsWith("=")?r.substr(1):r,r="".concat(o,"(").concat(r,", ").concat(e.steps,")")}return r},getDecomposition:function(e){var t="observed";return Object.values(a.EXPRESSIONS).find(function(n){var r=e.qDef.base.qDef.toLowerCase()||e.qDef.qDef.toLowerCase();return a.EXPRESSIONS[n]&&r.includes(a.EXPRESSIONS[n].toLowerCase())&&(t=n),n}),t}};function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function k(e){return k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},k(e)}var C=t().bind(null,!0),q={},E=Array.isArray;function D(e){return null!=e&&!Array.isArray(e)&&"object"===k(e)}function T(e){return void 0===e}function O(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function N(e,t){var n,r=t.substring(1).split("/").slice(0,-1);return r.forEach(function(t,i){if(i!==r.length){n=+t;var o=Number.isNaN(n)?{}:[];e[n||t]=T(e[n||t])?o:e[t],e=e[n||t]}}),e}function A(e,t){var n=!0;if(D(e)&&D(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach(function(r){A(e[r],t[r])||(n=!1)}),n);if(E(e)&&E(t)){if(e.length!==t.length)return!1;for(var r=0,i=e.length;r<i;r+=1)if(!A(e[r],t[r]))return!1;return!0}return e===t}q.generate=function(e,t,n){n=n||"";var r=[];return Object.keys(t).forEach(function(i){var o=function(e){return e?C({},{val:e}).val:e}(t[i]),a=e[i],s="".concat(n,"/").concat(i);A(o,a)||O(t,i)||(T(a)?r.push({op:"add",path:s,value:o}):D(o)&&D(a)?r=r.concat(q.generate(a,o,s)):E(o)&&E(a)?r=r.concat(function(e,t,n){var r=[],i=e.slice(),o=-1;function a(e,t,n){if(e[n]&&T(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(var r=0,i=e.length;r<i;r+=1)if(e[r]&&e[r].qInfo.qId===t)return r;return-1}if(A(t,i))return r;if(!T(t[0])&&T(t[0].qInfo))return r.push({op:"replace",path:n,value:t}),r;for(var s=i.length-1;s>=0;s-=1)-1===(o=a(t,i[s].qInfo&&i[s].qInfo.qId,s))?(r.push({op:"remove",path:"".concat(n,"/").concat(s)}),i.splice(s,1)):r=r.concat(q.generate(i[s],t[o],"".concat(n,"/").concat(s)));for(var l=0,c=t.length;l<c;l+=1)-1===(o=a(i,t[l].qInfo&&t[l].qInfo.qId))?(r.push({op:"add",path:"".concat(n,"/").concat(l),value:t[l]}),i.splice(l,0,t[l])):o!==l&&(r.push({op:"move",path:"".concat(n,"/").concat(l),from:"".concat(n,"/").concat(o)}),i.splice(l,0,i.splice(o,1)[0]));return r}(a,o,s)):r.push({op:"replace",path:"".concat(n,"/").concat(i),value:o}))}),Object.keys(e).forEach(function(i){T(t[i])&&!O(e,i)&&r.push({op:"remove",path:"".concat(n,"/").concat(i)})}),r},q.apply=function(e,t){t.forEach(function(t){var n,r,i=N(e,t.path),o=t.path.split("/").splice(-1)[0],a=o&&Number.isNaN(+o)?i[o]:i[+o]||i,s=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(i=null,a=e),"add"===t.op||"replace"===t.op)if(E(i))"-"===o&&(o=i.length),i.splice(+o,"add"===t.op?0:1,t.value);else if(E(a)&&E(t.value)){var l,c=t.value.slice();a.length=0,(l=a).push.apply(l,function(e){if(Array.isArray(e))return M(e)}(r=c)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return M(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?M(e,t):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}else if(D(a)&&D(t.value))n=a,Object.keys(n).forEach(function(e){Object.getOwnPropertyDescriptor(n,e).configurable&&!O(n,e)&&delete n[e]}),C(a,t.value);else{if(!i)throw new Error("Patchee is not an object we can patch");i[o]=t.value}else if("move"===t.op){var u=N(e,t.from);E(i)?i.splice(+o,0,u.splice(+s,1)[0]):(i[o]=u[s],delete u[s])}else"remove"===t.op&&(E(i)?i.splice(+o,1):delete i[o])})},q.clone=function(e){return C({},e)},q.createPatch=function(e,t,n){var r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},q.updateObject=function(e,t){Object.keys(e).length?q.apply(e,q.generate(e,t)):C(e,t)};const _=q,I=function(e,n,r){if(!e)return Promise.resolve();var i=_.generate(n,r);return t()(!0,n,r),i&&i.length?(i=i.map(function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}}),e.applyPatches(i,!0)):Promise.resolve()};var L="accumulation";function P(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===L)return n[r]}function R(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===L)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var z={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""};const F={translationKey:"properties.modifier.accumulation",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=a;void 0===l&&(l=w.getNumDimensions({properties:r,layout:i}));var c=o(r,"qHyperCubeDef.qDimensions",[]),u=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:s}),d=w.getNumStepComp(n,l),f=w.getAboveComp(n,l,u,d),h=w.getRangeComp("RangeSum",f);if(w.needDimension({modifier:n,properties:r,layout:i})){var p=w.getDimComp(c,1),m=w.getDimComp(c,0),g=w.getAggrComp(h,p,m);h=n.showExcludedValues?w.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:s,valueComp:g}):g}return h},extractInputExpression:w.extractInputExpression,initModifier:function(e){w.initModifier(e,z)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(R(t,e),".accumulationDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.accumulation.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(R(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.accumulation.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(R(t,e),".fullAccumulation")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(R(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=P(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=P(t,e);return n&&!n.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(R(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(L))return!1;var o=P(t,e);return o&&!o.disabled}};return n}};var j="movingAverage";function B(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===j)return n[r]}function V(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===j)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var H={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1};const $={translationKey:"properties.modifier.movingAverage",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,n=e.expression,r=e.modifier,i=e.properties,a=e.layout,s=e.numDimensions,l=e.dimensionAndFieldList;if(!r)return n;var c=s;void 0===c&&(c=w.getNumDimensions({properties:i,layout:a}));var u=o(i,"qHyperCubeDef.qDimensions",[]),d=r.showExcludedValues&&r.nullSuppression,f=w.getExpressionWithExcludedComp({expression:n,modifier:r,dimensions:u,dimensionAndFieldList:l,treatMissingAsNull:d}),h=w.getNumStepComp(r,c),p=w.getAboveComp(r,c,f,h);if(r.nullSuppression)t=w.getRangeComp("RangeAvg",p);else{var m=w.getRangeComp("RangeSum",p),g=function(e,t){var n=w.getRowNoComp(e,t);if(!w.isFullRange(e)){var r=e.steps,i="number"!=typeof r||Number.isNaN(r)?6:r;return"RangeMin(".concat(i,", ").concat(n,")")}return n}(r,c);t="".concat(m," / ").concat(g)}var y=t;if(w.needDimension({modifier:r,properties:i,layout:a})){var v=w.getDimComp(u,1),b=w.getDimComp(u,0),x=w.getAggrComp(y,v,b);y=r.showExcludedValues?w.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return y},extractInputExpression:w.extractInputExpression,initModifier:function(e){w.initModifier(e,H)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.movingAverage.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(V(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.movingAverage.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(V(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.movingAverage.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(V(t,e),".fullRange")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(V(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=B(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=B(t,e);return n&&!n.fullRange}},showExcludedValues:{refFn:function(t){return"".concat(V(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat(V(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(j))return!1;var o=B(t,e);return o&&!o.disabled}};return n}};var W="timeSeriesDecomposition";function U(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===W)return n[r]}function Y(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===W)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var K={type:"timeSeriesDecomposition",disabled:!1,decomposition:"",steps:2,outputExpression:""};const G={translationKey:"properties.modifier.timeSeriesDecomposition",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties;return n?w.generateTSDExpression(n,t,r):t},extractInputExpression:w.extractInputExpression,initModifier:function(e,t){w.initModifier(e,K),""===e.decomposition&&t&&(e.decomposition=w.getDecomposition(t))},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.timeSeriesDecomposition||"properties.modifier.timeSeriesDecomposition",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{decomposition:{refFn:function(t){return"".concat(Y(t,e),".decomposition")},type:"string",translation:t.modifierTrendDecompositionDecomposition||"properties.modifier.trendDecomposition.decomposition",component:"dropdown",schemaIgnore:!0,defaultValue:t.trendDecompositionParametersDecompositionObserved||"cao.trendDecomposition.parameters.decomposition.observed",options:a.OPTIONS},steps:{refFn:function(t){return"".concat(Y(t,e),".steps")},type:"integer",translation:t.modifierTimeSeriesDecompositionPeriods||"properties.modifier.timeSeriesDecomposition.periods",schemaIgnore:!0,defaultValue:2,change:function(t,n){var r=U(t,e);if(r){var i=r.steps;r.steps="number"!=typeof i||Number.isNaN(i)?2:Math.abs(i),n.properties.qHyperCubeDef.qMeasures=n.properties.qHyperCubeDef.qMeasures.map(function(e){return e.qDef.modifiers.map(function(e){return"timeSeriesDecomposition"===e.type?e.steps=i:e.steps=e.steps,e}),e})}},show:function(t){var n=U(t,e);return n&&!n.fullRange}}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(W))return!1;var o=U(t,e);return o&&!o.disabled}};return n}};var X="difference";function J(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===X)return n[r]}function Z(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===X)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var Q={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""};const ee={translationKey:"properties.modifier.difference",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:w.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=a;void 0===l&&(l=w.getNumDimensions({properties:r,layout:i}));var c=o(r,"qHyperCubeDef.qDimensions",[]),u=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:s}),d=w.getAboveComp(n,l,u),f="".concat(u," - ").concat(d);if(w.needDimension({modifier:n,properties:r,layout:i})){var h=w.getDimComp(c,1),p=w.getDimComp(c,0),m=w.getAggrComp(f,h,p);f=n.showExcludedValues?w.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:s,funcComp:"Only",valueComp:m}):m}return f},initModifier:function(e){Object.keys(Q).forEach(function(t){void 0===e[t]&&(e[t]=Q[t])})},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(Z(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.difference.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(Z(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.difference.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},showExcludedValues:{refFn:function(t){return"".concat(Z(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(X))return!1;var o=J(t,e);return o&&!o.disabled}};return n}};var te="normalization";function ne(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===te)return n[r]}function re(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===te)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}function ie(e,t){for(var n=0;n<e.length;n++)if(e[n].value===t)return n;return-1}var oe={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:2,selectionScope:2};function ae(e){return 2===e?"{1}":""}function se(e,t,n){return 1===e?"{$<".concat(w.getFieldWithWrapper(t),"={'").concat(n,"'}>}"):""}function le(e,t){return 0===e&&t>1||2===e?"Total":""}function ce(e,t,n){return 0===e&&t>1?"<".concat(w.getDimDefWithWrapper(n),">"):""}const ue={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:w.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=a;void 0===l&&(l=w.getNumDimensions({properties:r,layout:i}));var c=o(r,"qHyperCubeDef.qDimensions",[]),u=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:s}),d=n.selectionScope,f=n.dimensionalScope;return function(e,t,n,r,i,o,a){var s=ae(t),l=se(t,n,r),c=""===s&&""===l?"":s||l,u=le(i,o),d=ce(i,o,a),f=function(e){for(var t=[],n=0;n<e;n++)t[n]=w.getDimDefWithWrapper(n);return t.join(", ")}(o);return"".concat(e,"/ Sum(").concat(c," ").concat(u).concat(d," Aggr(").concat(c," ").concat(e,", ").concat(f,"))")}(u,d,n.field,n.value,f,l,n.primaryDimension)},initModifier:function(e){Object.keys(oe).forEach(function(t){void 0===e[t]&&(e[t]=oe[t])})},updateModifier:function(e,t){1===(t.qDimensions?t.qDimensions.length:0)&&0===e.dimensionalScope&&(e.dimensionalScope=2)},enableTotalsFunction:function(){return!0},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(re(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,options:function(n){return function(e,t,n){var r=[{value:0,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:1,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:2,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return r=function(e,t){if(1===e){var n=ie(t,0);t.splice(n,1)}return t}(ne(e,n).dimensionalScope,r),r}(n,t,e)}},field:{refFn:function(t){return"".concat(re(t,e),".field")},type:"string",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:function(e,t,n){return n.app.getFieldList().then(function(e){return e.map(function(e){return{label:e.qName,value:e.qName}})})},show:function(t){return 1===ne(t,e).selectionScope}},value:{refFn:function(t){return"".concat(re(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return 1===ne(t,e).selectionScope}},dimensionalScope:{refFn:function(t){return"".concat(re(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,supportTooltip:!0,options:function(n,r){return function(e,t,n,r){var i=t.layout.qHyperCube.qDimensionInfo.length,o=[{value:0,translation:n.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:n.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:1,translation:n.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension"),tooltipTranslation:n.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension",".tooltip")},{value:2,translation:n.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:n.dimensionalScopeDisregardAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension",".tooltip")}];return o=function(e,t){if(e<2){var n=ie(t,0);t.splice(n,1)}return t}(i,o),o=function(e,t){if(0===e){var n=ie(t,1);t.splice(n,1)}return t}(ne(e,r).selectionScope,o),o}(n,r,t,e)}},primaryDimension:{refFn:function(t){return"".concat(re(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.normalization.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(t,n){return 0===(ne(t,e).dimensionalScope||0)&&n.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(te))return!1;var o=ne(t,e);return o&&!o.disabled}};return n},getDisregardSelectionComp:ae,getFieldSelectionComp:se,getTotalComp:le,getSelectedDimComp:ce};var de="qDef.base",fe="qDef.qDef",he="qDef.base.qDef",pe="qLibraryId",me="qDef.base.qLibraryId";const ge={getExpression:function(e){var t=o(e,he);return void 0!==t?t:o(e,fe)},getExpressionRef:function(e){return void 0!==o(e,he)?he:fe},getLibraryIdRef:function(e){return o(e,me)?me:pe},getLibraryId:function(e){return o(e,me)||o(e,pe)},getLabelRef:function(e){return o(e,de)?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return o(e,de)?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}};var ye="qDef.qDef",ve="qDef.base.qDef",be="qLibraryId",xe="qDef.base.qLibraryId",Se="qDef.qLabel",we="qDef.qLabelExpression",Me="qDef.base.qLabel",ke="qDef.base.qLabelExpression",Ce="qDef.qAggrFunc",qe="qDef.base.qAggrFunc",Ee={initBase:function(e,t){(t||Ee.isValid(e))&&(n(e,ve,o(e,ye)),n(e,xe,o(e,be)),n(e,Me,o(e,Se)),n(e,ke,o(e,we)))},restoreBase:function(e){Ee.isValid(e)&&(n(e,ye,o(e,ve)),n(e,be,o(e,xe)),n(e,Se,o(e,Me)),n(e,we,o(e,ke)),o(e,Ce)&&o(e,qe)&&n(e,Ce,o(e,qe)),delete e.qDef.base)},isValid:function(e){var t=o(e,ve),n=o(e,xe);return void 0!==t||void 0!==n}};const De=Ee;function Te(e){return Te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Te(e)}var Oe={accumulation:F,movingAverage:$,difference:ee,normalization:ue,timeSeriesDecomposition:G};const Ne={modifiers:Oe,apply:_e,applyModifiers:Ie,cleanUpMeasure:Le,destroy:function(e){e&&Ae[e.id]&&Ae[e.id].masterItemSubscriber&&(Ae[e.id].masterItemSubscriber&&Ae[e.id].masterItemSubscriber.unsubscribe(),delete Ae[e.id])},hasActiveModifiers:Pe,getActiveModifier:Re,initBase:De.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some(function(e){return Oe[e]})},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some(function(e){return Oe[e]&&Oe[e].isApplicable({properties:n,layout:r})})},measureBase:ge,limitedSorting:function(e){var t=e.measures,n=e.properties,r=e.layout,i=!1,o=!1;return t.forEach(function(e){var t=je(e);Ye({modifiers:t,properties:n,layout:r})&&(i=!0,o=o||Ze({modifiers:t,properties:n,layout:r}))}),i&&!o},ifEnableTotalsFunction:ze};var Ae={};function _e(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.model,r=e.properties,i=e.isSnapshot,a=void 0!==i&&i,s=e.masterItem,l=!1;Ae[n.id]=Ae[n.id]||{isFirstTime:!0};var c=Ae[n.id].isFirstTime;if(Ae[n.id].isFirstTime=!1,r&&"object"===Te(r))return Ie({model:n,properties:r});var u=n?n.layout:void 0,d=o(u,"qSelectionInfo.qInSelections");if(a||d)return Promise.resolve(l);var f=o(u,"qHyperCube.qMeasureInfo"),h=Ae[n.id].lastReloadTime;if(Ae[n.id].lastReloadTime=o(n,"app.layout.qLastReloadTime"),Pe({measures:f,layout:u})){var p=function(e){var t=e.measures,n=e.layout,r=e.lastReloadTime;return o(e.model,"app.layout.qLastReloadTime")!==r&&function(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some(function(e){return Ue({measure:e,properties:n,layout:r})})}({measures:t,layout:n})}({measures:f,layout:u,model:n,lastReloadTime:h});return p||function(e){var t=e.measures,n=e.layout,r=e.masterItem,i=e.isFirstTime;return!!Array.isArray(t)&&(i||r||t.some(function(e){return function(e){var t=e.measure,n=e.layout;return Ye({modifiers:je(t),layout:n})?!t.base:!!t.base}({measure:e,layout:n})}))}({measures:f,layout:u,masterItem:s,isFirstTime:c})?n.getEffectiveProperties().then(function(e){var r=t()(!0,{},e);Ve(r);var i=Qe(r);return Ke({model:n}).then(function(t){return Ge({libraryIds:i,model:n}).then(function(i){return p&&function(e){var t=e.properties;Fe(t).forEach(function(e){return function(e){var t=e.measure;if(Ue({measure:t,properties:e.properties})){var n=0,r=t.qDef.modifiers;Array.isArray(r)&&r.forEach(function(e){if("object"===Te(e)&&!e.disabled){if(n++,"object"!==Te(Oe[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(n>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");var r=Oe[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==r&&$e(t)&&w.simplifyExpression(t.qDef.base.qDef)!==w.simplifyExpression(r)&&(t.qDef.base.qDef=r)}})}}({measure:e,properties:t})})}({properties:r}),Ie({model:n,oldProperties:e,properties:r,runUpdateIfChange:!0,masterItem:s,libraryItemsProps:i,dimensionAndFieldList:t})})})}):Promise.resolve(l)}return function(e){return!!Array.isArray(e)&&e.some(function(e){return"object"===Te(e.base)})}(f)?n.getEffectiveProperties().then(function(e){return function(e){var n=e.model,r=e.properties,i=Qe(r);return et({model:n,libraryIds:i}).then(function(){var e=t()(!0,{},r);return Fe(r).forEach(function(e){return Le(e)}),Je({oldProperties:e,newProperties:r,model:n})})}({model:n,properties:e})}):Promise.resolve(l)}function Ie(e){var n=e.model,r=e.oldProperties,i=e.properties,a=e.measures,s=e.runUpdateIfChange,l=void 0!==s&&s,c=e.masterItem,u=e.libraryItemsProps,d=e.dimensionAndFieldList;void 0===r&&(r=l?t()(!0,{},i):i),Ve(i);var f=Qe(i);return et({model:n,libraryIds:f,masterItem:c}).then(function(){return function(e){var n=e.measures,r=e.properties,i=e.model,a=e.libraryItemsProps,s=e.dimensionAndFieldList;if(n||(n=Fe(r)),!n.length)return Promise.resolve();if(!Pe({measures:n,properties:r}))return n.forEach(function(e){return Le(e)}),Promise.resolve();var l=a?void 0:Qe(r);return Ke({model:i,dimensionAndFieldList:s}).then(function(e){return Ge({libraryIds:l,model:i,libraryItemsProps:a}).then(function(i){n.forEach(function(n){Ye({modifiers:n.qDef.modifiers,properties:r})?(function(e){var n=e.measure,r=e.properties,i=e.libraryItemsProps,a=e.dimensionAndFieldList,s=0;De.isValid(n)||De.initBase(n,!0);var l=n.qDef,c=l.modifiers,u=l.base;Array.isArray(c)&&c.forEach(function(e){if("object"===Te(e)&&!e.disabled){if(s++,"object"!==Te(Oe[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(s>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");Oe[e.type].initModifier(e,n);var l=n.qLibraryId||u&&u.qLibraryId;l?function(e){var n=e.measure,r=e.modifier,i=e.properties,o=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,l=""===s?s:Oe[r.type].generateExpression({expression:s,modifier:r,properties:i,dimensionAndFieldList:o});r.outputExpression=l,n.qDef.qDef=r.outputExpression,(n.qDef.qLabel||a.qMeasure.qLabel)&&(n.qDef.qLabel=a.qMeasure.qLabel),(n.qDef.qLabelExpression||a.qMeasure.qLabelExpression)&&(n.qDef.qLabelExpression=a.qMeasure.qLabelExpression),n.qDef.quarantine&&n.qDef.quarantine.qNumFormat&&a.qMeasure.qNumFormat&&(n.qDef.qNumFormat=a.qMeasure.qNumFormat,n.qDef.isCustomFormatted=a.qMeasure.isCustomFormatted),delete n.qLibraryId,n.qDef.coloring=a.qMeasure.coloring,r.base=t()(!0,{},n.qDef.base)}({measure:n,modifier:e,libraryId:l,properties:r,libraryItemsProps:i,dimensionAndFieldList:a}):function(e){var n=e.measure,r=e.modifier,i=e.properties,o=e.dimensionAndFieldList;"function"==typeof Oe[r.type].updateModifier&&Oe[r.type].updateModifier(r,i.qHyperCubeDef);var a=ge.getExpression(n),s=""===a?a:Oe[r.type].generateExpression({expression:a,modifier:r,properties:i,dimensionAndFieldList:o});r.outputExpression=s,n.qDef.qDef=r.outputExpression,n.qDef.base.qLabelExpression?n.qDef.qLabelExpression=n.qDef.base.qLabelExpression:n.qDef.qLabel=n.qDef.base.qLabel||a,r.base=t()(!0,{},n.qDef.base)}({measure:n,modifier:e,properties:r,dimensionAndFieldList:a}),function(e){var t=o(e,"qDef.qAggrFunc");"Expr"!==t||ze(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&ze(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(n)}})}({measure:n,properties:r,libraryItemsProps:i,dimensionAndFieldList:e}),He(n)):Le(n)})})})}({measures:a,properties:i,model:n,libraryItemsProps:u,dimensionAndFieldList:d}).then(function(){return l?Je({oldProperties:r,newProperties:i,model:n}):Promise.resolve(!1)})})}function Le(e){!function(e){var t=je(e);return Array.isArray(t)&&t.some(function(e){return"object"===Te(e)&&!e.disabled&&!Oe[e.type]})}(e)?De.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,He(e)}function Pe(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some(function(e){return Ye({modifiers:je(e),properties:n,layout:r})})}function Re(e){var t=je(e);if(Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];if(Oe[r.type]&&!r.disabled)return r}}function ze(e){var t=Re(e);return!t||Oe[t.type].enableTotalsFunction(e)}function Fe(e){return o(e,"qHyperCubeDef.qMeasures",[]).concat(o(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function je(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function Be(e){return o(e,"outputExpression.qValueExpression.qExpr")||o(e,"outputExpression")}function Ve(e){Fe(e).forEach(function(e){return function(e){var n=Re(e);n&&(void 0!==n.outputExpression&&Be(n)!==e.qDef.qDef?delete e.qDef.base:!De.isValid(e)&&n.base&&(e.qDef.base=t()(!0,{},n.base)))}(e)})}function He(e){var t=je(e);Array.isArray(t)&&t.forEach(function(t){"object"===Te(t)&&(t.disabled||!Oe[t.type]&&Be(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)})}function $e(e){return e.base||e.qDef&&e.qDef.base}function We(e){var t=$e(e);return e.qLibraryId||t&&t.qLibraryId}function Ue(e){var t=e.measure,n=e.properties,r=e.layout;return!We(t)&&Ye({modifiers:je(t),properties:n,layout:r})}function Ye(e){var t=e.modifiers,n=e.properties,r=e.layout,i={};return Array.isArray(t)&&t.some(function(e){return!("object"!==Te(e)||e.disabled||!Oe[e.type])&&(void 0===i[e.type]&&(i[e.type]=Oe[e.type].isApplicable({properties:n,layout:r})),i[e.type])})}function Ke(e){var t=e.model,n=e.dimensionAndFieldList;if(n)return Promise.resolve(n);var r=[],i={},o=t.app.getDimensionList().then(function(e){i.dimensionList=e});r.push(o);var a=t.app.getFieldList().then(function(e){i.fieldList=e});return r.push(a),Promise.all(r).then(function(){return i})}function Ge(e){var t=e.libraryIds,n=e.model,r=e.libraryItemsProps;if(r)return Promise.resolve(r);var i=t.measureLibraryIds,o=t.dimensionLibraryIds,a={},s=[];return i.forEach(function(e){var t=n.app.getMeasure(e).then(function(t){return t.getProperties().then(function(t){a[e]=t})});s.push(t)}),o.forEach(function(e){var t=n.app.getDimension(e).then(function(t){return t.getProperties().then(function(t){a[e]=t})});s.push(t)}),Promise.all(s).then(function(){return a})}function Xe(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Je(e){var t=e.oldProperties,n=e.newProperties,r=e.model,i=JSON.stringify(o(t,"qHyperCubeDef.qMeasures"),Xe)!==JSON.stringify(o(n,"qHyperCubeDef.qMeasures"),Xe)||JSON.stringify(o(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Xe)!==JSON.stringify(o(n,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Xe);return i?function(e){var t=e.model,n=e.oldProperties,r=e.newProperties,i=t.layout;return i&&!i.qHasSoftPatches&&!i.qExtendsId&&o(i,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(r):I(t,n,r)}({model:r,oldProperties:t,newProperties:n}).then(function(){return i}):Promise.resolve(i)}function Ze(e){var t=e.modifiers,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some(function(e){return"object"===Te(e)&&!e.disabled&&Oe[e.type]&&Oe[e.type].needDimension({modifier:e,properties:n,layout:r})})}function Qe(e){var t=Fe(e),n=[],r=[],i=!1;return t.forEach(function(t){var r=je(t);if(Ye({modifiers:r,properties:e})){var o=We(t);o&&n.push(o),i=i||Ze({modifiers:r,properties:e})}}),o(e,"qHyperCubeDef.qDimensions",[]).forEach(function(e){var t=e.qLibraryId;t&&r.push(t)}),{measureLibraryIds:n,dimensionLibraryIds:r}}function et(e){var t=e.model,n=e.libraryIds;return!e.masterItem&&n&&(n.measureLibraryIds.length||n.dimensionLibraryIds.length)?(Ae[t.id].masterItemSubscriber=Ae[t.id].masterItemSubscriber||function(e){var t=e.model,n=e.callback,r={},i={},a={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},n=o(e,"qInfo.qType");return n&&s[n]&&s[n].forEach(function(n){t[n]=o(e,n)}),JSON.stringify(t)}function c(e){var t=e.qInfo.qId;if(r[t]){var i=l(e);r[t].properties!==i&&(r[t].properties=i,"function"==typeof n&&r[t].enabled&&n(e)),r[t].enabled=!0}}function u(e,n){return t.app[n](e).then(function(t){r[e]={listener:t.layoutSubscribe(c),enabled:!1,properties:l(t.layout)}})}return{subscribe:function(e){var n=e.measureLibraryIds,o=e.dimensionLibraryIds,s=[];return function(e){var t=e.dimensionLibraryIds;i={},e.measureLibraryIds.forEach(function(e){i[e]=!0}),a={},t.forEach(function(e){a[e]=!0})}({measureLibraryIds:n,dimensionLibraryIds:o}),Object.keys(r).forEach(function(e){i[e]||a[e]||(r[e].listener.dispose(),delete r[e])}),t.app&&(Object.keys(i).forEach(function(e){i[e]&&!r[e]&&s.push(u(e,"getMeasure"))}),Object.keys(a).forEach(function(e){a[e]&&!r[e]&&s.push(u(e,"getDimension"))})),Promise.all(s)},unsubscribe:function(){Object.keys(r).forEach(function(e){r[e].listener.dispose()}),r={}}}}({model:t,callback:function(e){return _e({model:t,masterItem:e}).then(function(){return t.app.clearUndoBuffer()})}}),Ae[t.id].masterItemSubscriber.subscribe(n)):Promise.resolve()}})(),t.default=i.default,Object.defineProperty(t,"__esModule",{value:!0})})()}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var r={};return(()=>{function e(t){var n,r=t;return r>9?(n=65+r-10)>90&&(n+=6):r="".concat(r).charCodeAt(0),[48,111,79,105,73,108].indexOf(n)>-1?e(r+1):String.fromCharCode(n)}function t(n){var r=e(n%62),i=Math.floor(n/62);return i>0?t(i)+r:r}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}n.d(r,{default:()=>Ve});const o={getValue:function(e,t,n){if(null==e||null==t)return n;for(var r=t.split("."),i=e,o=0;o<r.length;++o){var a=r[o];if(""!==a){if(void 0===i[a]||null===i[a])return n;i=i[a]}}return i},setValue:function(e,t,n){if(null!=e&&null!=t){for(var r=t.split("."),i=r[r.length-1],o=e,a=0;a<r.length-1;++a){var s=r[a];void 0!==o[s]&&null!==o[s]||(o[s]=Number.isNaN(+r[a+1])?{}:[]),o=o[s]}void 0!==n?o[i]=n:delete o[i]}},isEmpty:function(e){return 0===Object.keys(e).length&&e.constructor===Object},isAtomicValue:function(e){return/boolean|number|string/.test(i(e))},generateId:function(){return t(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};function a(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return r;return-1}return-1}const d={isOrderedSubset:function(e,t){if(!(e&&t&&e.length&&t.length))return!1;var n=e.indexOf(t[0]);if(-1!==n){for(var r=0;r<t.length;r++){var i=e.indexOf(t[r]);if(n>i)return!1;n=i}return!0}return!1},indexAdded:function(e,t){var n;for(n=0;n<e.length;++n)e[n]>=0&&e[n]>=t&&++e[n];e.push(t)},indexRemoved:function(e,t){var n,r=0;for(n=0;n<e.length;++n)e[n]>t?--e[n]:e[n]===t&&(r=n);return e.splice(r,1),r},findItemByPropertyValue:function(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return e[r];return null}return null},findIndexByPropertyValue:u};var f=n(8),h=n.n(f);const p=function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,i=n.data[0];(t=i.dimensions).push.apply(t,a(r.qDimensions));var s,l=o.getValue(r,"qLayoutExclude.qHyperCubeDef.qDimensions");l&&(s=i.excludedDimensions).push.apply(s,a(l))},m=function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,i=n.data[0];(t=i.measures).push.apply(t,l(r.qMeasures));var a,s=o.getValue(r,"qLayoutExclude.qHyperCubeDef.qMeasures");s&&(a=i.excludedMeasures).push.apply(a,l(s))},g=function(e){var t=e.exportFormat,n=e.qHyperCubeDef,r=t.data[0];n.qInterColumnSortOrder||(n.qInterColumnSortOrder=[]),r.interColumnSortOrder=n.qInterColumnSortOrder.concat();var i=o.getValue(n,"qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder");i&&d.isOrderedSubset(i,r.interColumnSortOrder)&&(r.interColumnSortOrder=i.concat())},y=function(e){var t=e.exportFormat,n=e.properties;Object.keys(n).forEach(function(e){t.properties[e]=n[e]})},v=function(e){var t=e.exportFormat,n=e.properties;n.qLayoutExclude||(n.qLayoutExclude={}),n.qLayoutExclude.disabled&&(Object.keys(n.qLayoutExclude.disabled).forEach(function(e){t.properties.hasOwnProperty(e)||(t.properties[e]=n.qLayoutExclude.disabled[e])}),delete n.qLayoutExclude.disabled),n.qLayoutExclude.changed&&(function(e){Object.keys(e.qLayoutExclude.changed).forEach(function(t){e.qLayoutExclude.changed[t].to===o.getValue(e,t)&&o.setValue(e,t,e.qLayoutExclude.changed[t].from)})}(n),delete n.qLayoutExclude.changed),n.qLayoutExclude.quarantine&&!o.isEmpty(n.qLayoutExclude.quarantine)||delete n.qLayoutExclude},b=function(e){e.forEach(function(e){h().cleanUpMeasure(e),e.qDef.modifiers&&(e.store={modifiers:e.qDef.modifiers},delete e.qDef.modifiers)})};function x(e,t,n){var r,i,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=o.getValue(e,t);if(!o.isAtomicValue(s))try{if((i=(i=(r=JSON.stringify(s)).match(/:\{/g))?i.length:0)>2&&!a)return;s=JSON.parse(r)}catch(e){return}o.getValue(e,"qLayoutExclude.quarantine")||o.setValue(e,"qLayoutExclude.quarantine",{});var l=o.getValue(e,"qLayoutExclude.quarantine");l[n]||(l[n]={}),l[n][t]=s}var S=n(909),w=n.n(S);function M(e,t){var n=w()(!0,{},t,e);return o.getValue(n,"qOtherTotalSpec.qOtherCounted")||o.setValue(n,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),o.getValue(n,"qOtherTotalSpec.qOtherLimit")||o.setValue(n,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),n.hasOwnProperty("othersLabel")||(n.othersLabel="Others"),n}function k(e,t){return w()(!0,{},t,e)}function C(e,t,n){return"function"==typeof e?e(t):Number.isNaN(+e)?n:e}var q=Math.pow(2,53)-1;function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const T=function(e,t,n){var r="masterobject"===o.getValue(t,"properties.qInfo.qType")?"masterobject":o.getValue(n,"qInfo.qType");o.setValue(e,"qInfo.qType",r),e.visualization=n.visualization},O=function(e,t,n){t.hasOwnProperty(e)&&(n[e]=t[e])},N=function(e,t,n,r){t.hasOwnProperty(e)?n[e]=t[e]:n[e]=r},A=function(){return{qDef:{autoSort:!0,cId:"",othersLabel:"Others"},qLibraryId:"",qNullSuppression:!1,qOtherLabel:"Others",qOtherTotalSpec:{qOtherLimitMode:"OTHER_GE_LIMIT",qOtherMode:"OTHER_OFF",qOtherSortMode:"OTHER_SORT_DESCENDING",qSuppressOther:!1}}},_=function(){return{qDef:{autoSort:!0,cId:"",numFormatFromTemplate:!0},qLibraryId:"",qTrendLines:[]}},I=function(e){var t,n=e.exportFormat,r=e.maxDimensions,i=e.minDimensions,o=e.newHyperCubeDef,a=e.defaultDimension,s=n.data[0];for(t=0;t<s.dimensions.length;++t){var l=M(s.dimensions[t],a);o.qDimensions.length<r?o.qDimensions.push(l):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(l)}for(t=0;t<s.excludedDimensions.length;++t){var c=M(s.excludedDimensions[t],a);o.qDimensions.length<i?o.qDimensions.push(c):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(c)}},L=function(e){var t,n=e.exportFormat,r=e.maxMeasures,i=e.minMeasures,o=e.newHyperCubeDef,a=e.defaultMeasure,s=n.data[0];for(t=0;t<s.measures.length;++t){var l=k(s.measures[t],a);o.qMeasures.length<r?o.qMeasures.push(l):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(l)}for(t=0;t<s.excludedMeasures.length;++t){var c=k(s.excludedMeasures[t],a);o.qMeasures.length<i?o.qMeasures.push(c):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(c)}},P=function(e){var t=e.exportFormat,n=e.dataDefinition,r=void 0===n?{}:n,i=t.data[0],o=r.dimensions||{max:0},a=r.measures||{max:0},s=C(a.max,i.dimensions.length,q),l=C(a.min,i.dimensions.length,0);return{maxDimensions:C(o.max,s,q),minDimensions:C(o.min,l,0),maxMeasures:s,minMeasures:l}},R=function(e){var t=e.exportFormat,n=e.newHyperCubeDef,r=t.data[0],i=n.qDimensions.length+n.qMeasures.length;n.qInterColumnSortOrder=r.interColumnSortOrder.concat();var o=n.qInterColumnSortOrder.length;if(o!==i)for(n.qLayoutExclude&&(n.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=r.interColumnSortOrder.concat());o!==i;)o<i?(d.indexAdded(n.qInterColumnSortOrder,o),++o):(--o,d.indexRemoved(n.qInterColumnSortOrder,o))},z=function(e){var t=e.exportFormat,n=e.initialProperties,r=e.hypercubePath,i={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(t.properties).forEach(function(e){"qLayoutExclude"===e?t.properties[e].quarantine&&(i.qLayoutExclude.quarantine=w()(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&r?o.setValue(i,"".concat(r,".qHyperCubeDef"),t.properties.qHyperCubeDef):n.hasOwnProperty(e)||-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)||function(e,t){return"components"===t&&Array.isArray(e[t])&&e[t].some(function(e){return"general"===e.key})}(t.properties,e)?i[e]=t.properties[e]:i.qLayoutExclude.disabled[e]=t.properties[e]}),null===(i=w()(!0,{},n,i)).components&&(i.components=[]),i},F=function(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,i=e.maxMeasures,o=e.minMeasures,a=t.data[0];return a.dimensions.length>n&&n>0||a.measures.length>i&&i>0||a.excludedDimensions.length>0&&a.dimensions.length+a.excludedDimensions.length>r||a.excludedMeasures.length>0&&a.measures.length+a.excludedMeasures.length>o||!i&&a.measures.length>0||!n&&a.dimensions.length>0},j=function(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,i=e.maxMeasures,o=e.minMeasures,a=e.newHyperCubeDef,s=t.data[0];a.qLayoutExclude||(a.qLayoutExclude={}),a.qLayoutExclude.qHyperCubeDef||(a.qLayoutExclude.qHyperCubeDef={}),(s.dimensions.length>n&&n>0||s.excludedDimensions&&s.excludedDimensions.length&&s.dimensions.length+s.excludedDimensions.length>r)&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[])),(s.measures.length>i&&i>0||s.excludedMeasures&&s.excludedMeasures.length&&s.measures.length+s.excludedMeasures.length>o)&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!i&&s.measures.length&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!n&&s.dimensions.length&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[]))},B=function(e){var t,n=e.newProperties,r=e.dataDefinition,i=e.hypercubePath;if(r.dimensions&&"function"==typeof r.dimensions.added){var a=o.getValue(n,i||"").qHyperCubeDef,s=function(e){if(Array.isArray(e))return E(e)}(t=a.qDimensions)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return E(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?E(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();a.qDimensions=[],s.forEach(function(e){a.qDimensions.push(e),r.dimensions.added(e,n)})}},V=function(e){var t,n=e.newProperties,r=e.dataDefinition,i=e.hypercubePath;if(r.measures&&"function"==typeof r.measures.added){var a=o.getValue(n,i||"").qHyperCubeDef,s=function(e){if(Array.isArray(e))return D(e)}(t=a.qMeasures)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return D(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?D(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();a.qMeasures=[],s.forEach(function(e){a.qMeasures.push(e),r.measures.added(e,n)})}},H=function(e){var t=e.measures,n=e.modifierTypes;t&&n&&h().isSupportedModifiers(n)&&t.forEach(function(e){e.store&&e.store.modifiers&&(e.qDef.modifiers=e.store.modifiers),delete e.store})};function $(e,t){var n=o.getValue(e,"qLayoutExclude.quarantine",{})[t];return!!n&&(Object.keys(n).forEach(function(t){o.setValue(e,t,n[t])}),delete e.qLayoutExclude.quarantine[t],!0)}const W={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t={data:[],properties:{}},n=0;n<e;++n)t.data.push({dimensions:[],measures:[],excludedDimensions:[],excludedMeasures:[],interColumnSortOrder:[]});return t}(),a=t.qProperty,s=o.getValue(a,n||""),l=s.qHyperCubeDef;return l.qInterColumnSortOrder||(l.qInterColumnSortOrder=[]),p({exportFormat:i,qHyperCubeDef:l}),m({exportFormat:i,qHyperCubeDef:l}),g({exportFormat:i,qHyperCubeDef:l}),delete l.qLayoutExclude,y({exportFormat:i,properties:a}),n&&(i.properties.qHyperCubeDef=l,delete s.qHyperCubeDef),v({exportFormat:i,properties:a}),r||b(i.properties.qHyperCubeDef.qMeasures),Array.isArray(i.properties.filters)&&(x(i.properties,"filters","storedFilters",!0),delete i.properties.filters),i.properties.qHyperCubeDef.qContextSetExpression&&(x(i.properties,"qHyperCubeDef.qContextSetExpression","storedFilters"),i.properties.qHyperCubeDef.qContextSetExpression=""),i.properties.qHyperCubeDef.qDynamicScript&&i.properties.qHyperCubeDef.qDynamicScript.length&&(x(i.properties,"qHyperCubeDef.qDynamicScript","dynamicScript"),i.properties.qHyperCubeDef.qDynamicScript=[]),i},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=void 0===n?{}:n,i=e.dataDefinition,a=void 0===i?{}:i,s=e.defaultPropertyValues,l=void 0===s?{}:s,c=e.hypercubePath,u=e.extension,d=e.supportedFilters,f=void 0===d||d,h=e.isHCModifierSupported,p=void 0===h||h,m={qChildren:[]},g=z({exportFormat:t,initialProperties:r,hypercubePath:c}),y=o.getValue(r,c||"").qHyperCubeDef,v=o.getValue(g,c||"").qHyperCubeDef,b=P({exportFormat:t,dataDefinition:a}),x=b.maxDimensions,S=b.minDimensions,w=b.maxMeasures,M=b.minMeasures,k=l.defaultDimension,C=void 0===k?A():k,q=l.defaultMeasure,E=void 0===q?_():q;v.qDimensions.length=0,v.qMeasures.length=0,F({exportFormat:t,maxDimensions:x,minDimensions:S,maxMeasures:w,minMeasures:M})&&j({exportFormat:t,maxDimensions:x,minDimensions:S,maxMeasures:w,minMeasures:M,newHyperCubeDef:v}),I({exportFormat:t,maxDimensions:x,minDimensions:S,newHyperCubeDef:v,defaultDimension:C}),L({exportFormat:t,maxMeasures:w,minMeasures:M,newHyperCubeDef:v,defaultMeasure:E}),B({newProperties:g,dataDefinition:a,hypercubePath:c}),V({newProperties:g,dataDefinition:a,hypercubePath:c}),R({exportFormat:t,newHyperCubeDef:v}),O("qMaxStackedCells",y,v),O("qNoOfLeftDims",y,v),N("qInitialDataFetch",y,v,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),N("qMode",y,v,"S"),N("qReductionMode",y,v,"N"),N("qSortbyYValue",y,v),N("qIndentMode",y,v),N("qShowTotalsAbove",y,v),T(g,t,r),m.qProperty=g;var D=o.getValue(u||{},"support.modifiers");return H({measures:v.qMeasures,modifierTypes:D}),f&&$(m.qProperty,"storedFilters"),"S"===v.qMode&&p&&$(m.qProperty,"dynamicScript"),m}};var U={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function Y(e,t,n,r){t=t||[];var i=u(e,r,n),o=u(t,r,n);if(-1!==i&&-1===o){var a=e.splice(i,1);t.push(a[0])}return t}function K(e,t){return e.length!==t}const G={create:function(e,t){if(!e||!U[e])throw new Error("Attribute Expressions Util: ID required");var n={};return t&&Object.keys(t).forEach(function(e){n[e]=t[e]}),n.id=e,n.qAttribute=!0,n},moveByIdFromGroup:function(e,t,n,r,i){n=n||"qAttributeExpressions",i=i||"id";for(var o=0;o<e.length;o++){var a=e[o][n],s=t.length;if(Y(a,t,r,i),K(t,s))return t}return t},IDMAP:{CELL_BACKGROUND_COLOR:"cellBackgroundColor",CELL_FOREGROUND_COLOR:"cellForegroundColor",COLOR_BY_ALTERNATIVE:"colorByAlternative",COLOR_BY_EXPRESSION:"colorByExpression",TOOLTIP:"tooltip",CELL_LINK_LABEL:"urlLabel",CELL_LINK_URL:"url"}},X={getNumDimensions:function(e){return o.getValue(e,"qHyperCubeDef.qDimensions.length",0)},getNumMeasures:function(e){return o.getValue(e,"qHyperCubeDef.qMeasures.length",0)},wrapFieldName:function(e){return e.split(" ").length>1&&"="!==e[0]&&"["!==e[0]?"[".concat(e,"]"):e},getItemLabel:function(e){return e.label||e.name}},J={colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>0&&X.getNumMeasures(e)<=1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)>0},expression:function(e){return X.getNumMeasures(e)>=1}}},Z={colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumMeasures(e)>=1}}};var Q={scatterplot:Z,"sn-scatter-plot":Z,piechart:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumMeasures(e)>=1}}},linechart:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)<=1},expression:function(e){return X.getNumMeasures(e)>=1}}},map:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>=1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)>=1},expression:function(e){return X.getNumDimensions(e)>=1}}},distributionplot:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumDimensions(e)>=1}}}};function ee(e,t,n){if(Array.isArray(e[t])){var r=d.findIndexByPropertyValue(e[t],"id",n);r>=0&&e[t].splice(r,1)}else e[t]=[]}function te(e,t){var n=G.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach(function(e){ee(e,"qAttributeDimensions",n),ee(e,"qAttributeExpressions",n)}),t.forEach(function(e){ee(e,"qAttributeDimensions",n),ee(e,"qAttributeExpressions",n)})}function ne(e,t){if(t){var n="="===t.charAt(0);e.color.altLabel=n?{qStringExpression:{qExpr:t.substr(1)}}:t}}function re(e){var t=e.properties,n=e.isDimension,r=e.dimensions,i=e.excludedDimensions,a=e.measures,s=e.label;te(r,i);var l=r[r.length-1];if(l){var c=n?o.getValue(t,"color.byDimDef"):o.getValue(t,"color.byMeasureDef"),u=o.getValue(t,"color.formatting.qNumFormat"),f=o.getValue(t,"color.formatting.isCustomFormatted");if(c){var h=G.create(G.IDMAP.COLOR_BY_ALTERNATIVE);switch(c.type){case"expression":!function(e){var t=e.attributeExpression,n=e.label,r=e.item,i=e.isDimension,o=e.qNumFormat,a=e.isCustomFormatted;t.label=n||r.label,i?t.qDef=r.key:(t.qExpression=r.key,o&&(t.qNumFormat=o,t.isCustomFormatted=a)),t.matchMeasure=r.activeMeasureIndex,t.label&&"="===t.label.charAt(0)&&(t.labelExpRef="color.altLabel")}({attributeExpression:h,label:s,item:c,isDimension:n,qNumFormat:u,isCustomFormatted:f});break;case"libraryItem":!function(e){var t=e.attributeExpression,n=e.measures,r=e.item,i=e.qNumFormat,o=e.isCustomFormatted;e.isDimension||(t.matchMeasure=d.findIndexByPropertyValue(n,"qLibraryId",r.key),i&&(t.qNumFormat=i,t.isCustomFormatted=o)),void 0!==r.expression?t.qExpression=r.expression:t.qLibraryId=r.key,t.colorMapRef=r.key}({attributeExpression:h,measures:a,item:c,isDimension:n,qNumFormat:u,isCustomFormatted:f})}n?(h.qSortBy={qSortByAscii:1},l.qAttributeDimensions.push(h)):l.qAttributeExpressions.push(h)}}}function ie(e,t,n,r){var i,o,a,s={};switch(e){case"dimension":n.qLibraryId?(s.type="dimension",s.name=n.qLibraryId,s.id=n.qLibraryId):(s.type="field",t?(s.name=n.label||n.qDef,s.id=n.qDef):(s.name=n.qDef.qFieldDefs[0],s.label=(a=n.qDef).qLabelExpression?a.qLabelExpression:a.qFieldLabels&&a.qFieldLabels[0]?a.qFieldLabels[0]:a.qFieldDefs[0]));break;case"measure":i=function(e,t){return t?e.qLibraryId:h().measureBase.getLibraryId(e)}(n,t),i?(s.type="measure",s.name=i,s.id=i,o=function(e,t){return h().hasActiveModifiers({measures:[e]})&&t?e.qDef.qDef:void 0}(n,r),o&&(s.expression=o)):(s.type="expression",t?(s.name=n.label||n.qExpression,s.id=n.qExpression):(s.name=n.qDef.qDef,s.label=function(e){var t=e.qDef;return t.qLabelExpression?t.qLabelExpression:t.qLabel?t.qLabel:t.qDef}(n)));break;default:throw new Error('columnType should be "dimension" or "measure"')}return s}const oe={useMasterNumberFormat:function(e){e.quarantine={qNumFormat:e.qNumFormat||{},isCustomFormatted:e.isCustomFormatted||!1},e.qNumFormat=null,e.isCustomFormatted=void 0}};function ae(e,t,n,r){var i=t.type,o=e.color,a=o.mode,s=X.getItemLabel(t);switch(ne(e,s||""),i){case"field":a="byDimension",o.byDimDef={label:t.label||X.wrapFieldName(t.name),key:X.wrapFieldName(t.name),type:"expression",activeDimensionIndex:t.activeDimensionIndex};break;case"expression":a="byMeasure",o.byMeasureDef={label:s,key:t.name,type:"expression",activeMeasureIndex:t.activeMeasureIndex};break;case"dimension":a="byDimension",o.byDimDef={label:t.name,key:t.id,type:"libraryItem",activeDimensionIndex:t.activeDimensionIndex};break;case"measure":a="byMeasure",o.byMeasureDef={label:t.name,key:t.id,expression:t.expression,type:"libraryItem",activeMeasureIndex:t.activeMeasureIndex},o.formatting&&oe.useMasterNumberFormat(o.formatting)}o.auto=!1,o.mode=a}function se(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"".concat(t,"qMeasures"),[]),i=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=o.getValue(e,"color.byDimDef");if(a&&ne(e,a.label),function(e){return!!(e&&e.activeDimensionIndex>-1)}(a))!function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"color.byDimDef");r.activeDimensionIndex=Math.min(r.activeDimensionIndex,n.length-1);var i=ie("dimension",!1,n[r.activeDimensionIndex]);i.activeDimensionIndex=r.activeDimensionIndex,ae(e,i)}(e,t);else if(function(e){return!e||!e.key}(a)&&function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=n[function(e,t,n){var r=o.getValue(t,"visualization"),i=n.split("."),a=Number(i[1]),s=o.getValue(t,"layers.".concat(a,".type"));return 2===e.length&&"map"===r&&"point"===s}(n,e,t)?0:n.length-1],i=G.IDMAP.COLOR_BY_ALTERNATIVE,a=d.findItemByPropertyValue(r.qAttributeDimensions,"id",i);return ae(e,ie("dimension",!!a,a||r)),!!a}(e,t))return;re({properties:e,isDimension:!0,dimensions:n,excludedDimensions:i,measures:r,label:o.getValue(e,"color.byDimDef.label")})}const le=function(e,t,n){o.setValue(e,t,n),o.isAtomicValue(n)&&function(e,t,n){var r=e.qLayoutExclude;r&&(r.changed||(r.changed={}),r.changed[t]={from:o.getValue(e,t),to:n})}(e,t,n)},ce=function(e,t){var n={primary:!0};if(e){var r=(Q[t]||J).colorModeOptions||J.colorModeOptions;n.byDimension=r.dimension(e),n.byMeasure=r.measure(e),n.byMultiple=r.multiColor(e),n.byExpression=r.expression(e)}return n},ue=function(e){var t=e.canColorBy,n=e.autoColor,r=e.colorMode,i=e.dimensions;return!(t[r]&&!n&&("byDimension"!==r&&"byMeasure"!==r||!i.length))},de=function(e,t){var n,r=o.getValue(e,"color.mode"),i=o.getValue(e,"color.auto"),a=o.getValue(e,"".concat(t,"qDimensions"),[]),s=o.getValue(e,"".concat(t,"qMeasures"),[]),l=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);i?te(a,l):!(n={auto:i,colorMode:r,dimensions:a}).auto&&"byDimension"===n.colorMode&&n.dimensions.length>0?se(e,t):function(e){var t=e.auto,n=e.colorMode,r=e.dimensions,i=e.measures,a=e.properties,s=o.getValue(a,"visualization");return!(t||"byMeasure"!==n||!r.length||"map"!==s&&!i.length)}({auto:i,colorMode:r,dimensions:a,measures:s,properties:e})?function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"".concat(t,"qMeasures"),[]),i=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=o.getValue(e,"color.byMeasureDef");if(a&&ne(e,a.label),function(e){return!!(e&&e.activeMeasureIndex>-1)}(a))!function(e,t){var n=o.getValue(e,"".concat(t,"qMeasures"),[]),r=o.getValue(e,"color.byMeasureDef");if(r.activeMeasureIndex=Math.min(r.activeMeasureIndex,n.length-1),r.activeMeasureIndex>-1){var i=ie("measure",!1,n[r.activeMeasureIndex],!0);i.activeMeasureIndex=r.activeMeasureIndex,ae(e,i)}}(e,t);else if(function(e,t){return(!e||!e.key)&&t.length>0}(a,r)&&function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"".concat(t,"qMeasures"),[]),i=n[n.length-1],a=G.IDMAP.COLOR_BY_ALTERNATIVE,s=d.findItemByPropertyValue(i.qAttributeExpressions,"id",a);return ae(e,ie("measure",!!s,s||r[0])),!!s}(e,t))return;re({properties:e,isDimension:!1,dimensions:n,excludedDimensions:i,measures:r,label:o.getValue(e,"color.byMeasureDef.label")})}(e,t):function(e,t){var n=o.getValue(e,"color.mode"),r=o.getValue(e,"".concat(t,"qDimensions"),[]),i=o.getValue(e,"".concat(t,"qMeasures"),[]),a=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);"byMultiple"===n&&i.length<2&&o.setValue(e,"color.mode","primary"),te(r,a)}(e,t)},fe=function(e){e.forEach(function(e){e.qOtherTotalSpec&&"qTotalMode"in e.qOtherTotalSpec&&delete e.qOtherTotalSpec.qTotalMode})},he=function(e){var t=e.shouldUpdateColorBy,n=e.properties,r=o.getValue(n,"qHyperCubeDef.qMeasures",[]),i=o.getValue(n,"color.mode","");return!t&&"byExpression"===i&&r.length>0},pe=function(e){var t=o.getValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",[]),n=o.getValue(e,"color.colorExpression","");t.splice(0,0,{qExpression:n,id:"colorByExpression"}),o.setValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",t)},me=function(e){o.setValue(e,"color.mode","primary"),o.setValue(e,"color.auto",!0)},ge=function(e){var t=o.getValue(e,"qHyperCubeDef.qDimensions",[]),n=o.getValue(e,"color.persistent",!1);return t.length>1&&!n},ye={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=W.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),o=i.data[0],a=o.dimensions.concat(o.excludedDimensions),s=o.measures.concat(o.excludedMeasures),l=G.IDMAP,c=l.COLOR_BY_ALTERNATIVE,u=l.COLOR_BY_EXPRESSION;return G.moveByIdFromGroup(a,[],"qAttributeDimensions",c),G.moveByIdFromGroup(a,[],"qAttributeExpressions",c),G.moveByIdFromGroup(s,[],"qAttributeExpressions",u),i},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,i=e.defaultPropertyValues,a=e.hypercubePath,s=e.extension,l=e.supportedFilters,c=e.isHCModifierSupported,u=W.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:i,hypercubePath:a,extension:s,supportedFilters:l,isHCModifierSupported:c}),d=u.qProperty,f=o.getValue(d,"visualization"),h=o.getValue(d,"qHyperCubeDef.qDimensions",[]),p=o.getValue(d,"color.mode",""),m=o.getValue(d,"color.auto",""),g=ce(d,f),y=ue({canColorBy:g,autoColor:m,colorMode:p,dimensions:h});return g[p]?he({shouldUpdateColorBy:y,properties:d})&&pe(d):me(d),y&&de(d,"qHyperCubeDef."),ge(d)&&le(d,"color.persistent",!0),fe(h),u}};var ve=["bar","marker","line"];const be=function(e){var t=e.initialProperties,n=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?$(n,"unsupportedAutoMinMax")||w()(n.measureAxis,t.measureAxis):$(n,"supportedAutoMinMax")||w()(n.measureAxis,t.measureAxis)},xe=function(e){var t,n=e.exportFormat,r=e.initialProperties,i=e.properties,o=e.measureType,a=i.qHyperCubeDef,s=i.measureAxis;if(function(e){var t=e.initialProperties;return!(!e.exportFormat.properties.measureAxes||t.measureAxes||!t.measureAxis||void 0===t.measureAxis.autoMinMax)}({exportFormat:n,initialProperties:r})){var l=function(e){var t=[];return e.qMeasures.length>0&&e.qMeasures.forEach(function(e){if(e.qDef.series){var n=e.qDef.series,r=n.type,i=n.axis;t[i]||(t[i]={axis:i,type:{line:0,marker:0,bar:0,total:0}}),ve.includes(r)&&t[i].type[r]++,t[i].type.total++}}),t}(a);l.length?(o&&(t=l.filter(function(e){return e.type[o]>0}).sort(function(e,t){return t.type[o]-e.type[o]})),t&&t.length||(t=l.sort(function(e,t){return t.type.total-e.type.total})),t&&t[0]&&w()(s,n.properties.measureAxes[t[0].axis])):w()(s,n.properties.measureAxes[0])}},Se=function(e){if(e.qDimensions.length>1){var t=e.qInterColumnSortOrder.indexOf(0);if(0!==t){var n=e.qInterColumnSortOrder[0];e.qInterColumnSortOrder[0]=0,e.qInterColumnSortOrder[t]=n}}},we={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=e.supportedAutoMinMax,o=void 0===i||i,a=ye.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),s=a.properties;return o?(x(s,"measureAxis.min","supportedAutoMinMax"),x(s,"measureAxis.max","supportedAutoMinMax")):(x(s,"measureAxis.min","unsupportedAutoMinMax"),x(s,"measureAxis.max","unsupportedAutoMinMax")),a},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,i=e.defaultPropertyValues,o=e.hypercubePath,a=e.measureType,s=e.extension,l=e.supportedFilters,c=e.isHCModifierSupported,u=ye.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:i,hypercubePath:o,extension:s,supportedFilters:l,isHCModifierSupported:c}),d=u.qProperty;return be({initialProperties:n,properties:d}),xe({exportFormat:t,initialProperties:n,properties:d,measureType:a}),Se(d.qHyperCubeDef),d.qHyperCubeDef.qColumnOrder=[],d.qHyperCubeDef.columnOrder=[],u}};function Me(e,t,n){return"qLayoutExclude.quarantine.".concat(e,".").concat(t,".").concat(n)}function ke(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,i=e.arrayName,a=e.itemPath;o.getValue(t,n,[]).forEach(function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,i=e.item,a=e.itemPath,s=o.getValue(i,a);if(void 0!==s){var l=o.getValue(i,"qDef.cId");l||(l=o.generateId(),o.setValue(i,"qDef.cId",l));var c=Me(n,r,l);o.setValue(t,c,s),o.setValue(i,a,void 0)}}({properties:t,quarantineName:r,arrayName:i,item:e,itemPath:a})})}function Ce(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,i=e.arrayName,a=e.itemPath;o.getValue(t,n,[]).forEach(function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,i=e.item,a=e.itemPath,s=o.getValue(i,"qDef.cId");if(s){var l=Me(n,r,s),c=o.getValue(t,l);void 0!==c&&(o.setValue(i,a,c),o.setValue(t,l,void 0))}}({properties:t,quarantineName:r,arrayName:i,item:e,itemPath:a})})}var qe="qHyperCubeDef.qMeasures",Ee="conditionalColoring",De="measures",Te="qDef.conditionalColoring";const Oe={quarantine:function(e){ke({properties:e,arrayPath:qe,quarantineName:Ee,arrayName:De,itemPath:Te})},unquarantine:function(e){Ce({properties:e,arrayPath:qe,itemPath:Te,arrayName:De,quarantineName:Ee})}};var Ne="qHyperCubeDef.qMeasures",Ae="measures",_e="qHyperCubeDef.qDimensions",Ie="dimensions",Le="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",Pe="alternativeMeasures",Re="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",ze="alternativeDimensions",Fe="qCalcCondition",je="conditionalShowHide";const Be={quarantine:function(e){ke({properties:e,arrayPath:Ne,quarantineName:je,arrayName:Ae,itemPath:Fe}),ke({properties:e,arrayPath:_e,quarantineName:je,arrayName:Ie,itemPath:Fe})},unquarantine:function(e){Ce({properties:e,arrayPath:Ne,quarantineName:je,arrayName:Ae,itemPath:Fe}),Ce({properties:e,arrayPath:_e,quarantineName:je,arrayName:Ie,itemPath:Fe})},quarantineAlternative:function(e){ke({properties:e,arrayPath:Le,quarantineName:je,arrayName:Pe,itemPath:Fe}),ke({properties:e,arrayPath:Re,quarantineName:je,arrayName:ze,itemPath:Fe})},unquarantineAlternative:function(e){Ce({properties:e,arrayPath:Le,quarantineName:je,arrayName:Pe,itemPath:Fe}),Ce({properties:e,arrayPath:Re,quarantineName:je,arrayName:ze,itemPath:Fe})}},Ve={hypercube:W,colorChart:ye,axisChart:we,quarantineProperty:x,unquarantineProperty:$,quarantineArrayProp:ke,unquarantineArrayProp:Ce,conditionalColoring:Oe,conditionalShow:Be}})(),r.default})()}(BK)),BK.exports),HK=mg(VK);function $K(e,t){if("custom"===e.dimensionAxis.axisDisplayMode){const n=t.layout.qHyperCube.qMeasureInfo.filter(e=>e.qError?.qErrorCode!==T$).length,r=t.layout.qHyperCube.qDimensionInfo.filter(e=>e.qError?.qErrorCode!==T$).length,i=e.dimensionAxis.maxVisibleItems;i<1?e.dimensionAxis.maxVisibleItems=10:i>1e4/(r+n)&&(e.dimensionAxis.maxVisibleItems=Math.min(i,Math.floor(1e4/(r+n))))}}const WK=[{translation:"Common.None",value:"none"},{translation:"Common.Small",value:"small"},{translation:"Common.Medium",value:"medium"},{translation:"Common.Large",value:"large"}],UK=(e,t,n)=>{const r=`${e}.fontFamily`,i=`${e}.fontSize`;return{fontFamilyItem:{component:"dropdown",ref:r,options:()=>t.getOptions(r),defaultValue:()=>t.getDefaultValue(r)},fontWrapperItem:{component:"inline-wrapper",items:{fontSizeItem:{component:"dropdown",ref:i,options:()=>t.getOptions(i),defaultValue:()=>t.getDefaultValue(i)},fontColorItem:{component:"color-picker",width:!1,ref:`${e}.color`,defaultValue:()=>({color:n.getStyle("object.barChart",e,"color")})}}}}};function YK(e,t,n){const r=function(e){var t=e.theme,n=e.translator,r=e.config,i=void 0===r?{}:r,o=e.flags,a=function(e){var t=e.config,n=void 0===t?{}:t,r=n.id,i=n.paths;return{id:void 0===r?Iv:"".concat(Iv,".").concat(r),paths:Array.isArray(i)?i:[]}}({config:i}),s=a.id,l=a.paths,c={};l.forEach(function(e){var r=e.split(".");Yv(r);for(var i=c,a=0;a<r.length;a++){var l=r[a];a===r.length-1?i[l]=Hv({theme:t,translator:n,id:s,path:e,flags:o}):void 0===i[l]&&(i[l]={}),i=i[l]}});var u=function(e){var t=e.split(".");Yv(t);for(var n=c,r=0;r<t.length;r++){var i=t[r];if(void 0===n[i])throw new Error("font-resolver: Path '".concat(e,"' could not be resolved."));n=n[i]}return n};return c.getDefaultValue=function(e){return u(e).getDefaultValue()},c.getOptions=function(e){return u(e).getOptions()},c}({theme:e,translator:n,config:{id:"barChart",paths:["axis.title","axis.label.name","label.value","legend.title","legend.label"]},flags:t});return{component:"styling-panel",show:!0,chartType:"barchart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.BarChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,useBackground:t?.isEnabled("SENSECLIENT_IM_2428_BARCHART_BG"),items:{outlineSection:{translation:"properties.Outline",component:"panel-section",items:{wrapperItem:{component:"items",ref:"components",key:"bar",items:{barStroke:{component:"inline-wrapper",items:{strokeWidth:{ref:"style.strokeWidth",width:!0,component:"dropdown",options:Object.keys(WK).map(e=>WK[e]),defaultValue:"none",schemaIgnore:!0},strokeColor:{ref:"style.strokeColor",defaultValue:{color:"#205891"},schemaIgnore:!0,width:"auto",component:"color-picker"}}}}}}},widthSection:{translation:"LayerStyleEditor.style.barWidth",component:"panel-section",items:{barWidth:{component:"items",ref:"components",key:"bar",items:{width:{ref:"style.width",component:"slider",min:.01,max:1,step:.01,defaultValue(e,t,n){const{properties:r}=n,{barGrouping:i,qHyperCubeDef:o}=r,a=o.qMeasures.length,s=o.qDimensions.length,l="grouped"===i.grouping&&s>0&&a+s>2;return CT.continuous({properties:r})?1:l?.9:.7},schemaIgnore:!0}}}}},axisTitleSection:{translation:"properties.axis.title",component:"panel-section",items:{axisTitleItems:{component:"items",ref:"components",key:"axis",items:UK("axis.title",r,e)}}},axisLabelSection:{translation:"properties.axis.label",component:"panel-section",items:{axisLabelItems:{component:"items",ref:"components",key:"axis",items:UK("axis.label.name",r,e)}}},labelSection:t?.isEnabled("CLIENT_IM_3050")?{translation:"properties.dataPoints.labelmode",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"label",items:{...UK("label.value",r,e),contrastColor:{component:"checkbox",type:"boolean",ref:"label.value.useContrastColor",translation:"properties.dataPoints.valuelabel.contrast",defaultValue:!0}}}}}:void 0,legendTitleSection:t?.isEnabled("CLIENT_IM_3051")?{translation:"properties.legend.title",component:"panel-section",items:{legendTitleSection:{component:"items",ref:"components",key:"legend",items:UK("legend.title",r,e)}}}:void 0,legendLabelSection:t?.isEnabled("CLIENT_IM_3051")?{translation:"properties.legend.label",component:"panel-section",items:{legendLabelSection:{component:"items",ref:"components",key:"legend",items:UK("legend.label",r,e)}}}:void 0}}}function KK(e){return{classification:{section:"styling",tags:["simple"],exclusive:!0},component:"items",show:!0,chartType:"barchart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.BarChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,useBackground:e?.isEnabled("SENSECLIENT_IM_2428_BARCHART_BG"),items:{outlineSection:{translation:"LayerStyleEditor.style.strokeWidth",component:"items",items:{wrapperItem:{component:"items",ref:"components",key:"bar",items:{barStroke:{component:"inline-wrapper",items:{strokeWidth:{ref:"style.strokeWidth",width:!0,component:"dropdown",translation:"LayerStyleEditor.style.strokeWidth",options:Object.keys(WK).map(e=>WK[e]),schemaIgnore:!0,defaultValue:WK[0].value},strokeColor:{ref:"style.strokeColor",schemaIgnore:!0,defaultValue:{color:"#205891",index:-1},width:"auto",component:"color-picker"}}}}}}},widthSection:{translation:"LayerStyleEditor.style.barWidth",component:"items",show:(e,t)=>!CT.continuous({layout:t.layout}),items:{barWidth:{component:"items",ref:"components",key:"bar",items:{width:{ref:"style.width",translation:"LayerStyleEditor.style.barWidth",component:"slider",min:.01,max:1,step:.01,schemaIgnore:!0,defaultValue:(e,t,n)=>((e,t)=>{const n=t.qHyperCube?.qMeasureInfo?.filter(e=>e.qError?.qErrorCode!==T$).length,r=t.qHyperCube?.qDimensionInfo?.filter(e=>e.qError?.qErrorCode!==T$).length,i="grouped"===e.barGrouping?.grouping&&r>0&&n+r>2;return CT.continuous({layout:t})?1:i?.9:.7})(n.properties,n.layout)}}}}},optionsSection:{translation:"LayerStyleEditor.label.Options",component:"items",items:{wrapperItem:{component:"items",items:{optionsHeader:{component:"header",translation:"LayerStyleEditor.label.Options"},scrollbar:{ref:"scrollbar",translation:"properties.scrollbar",component:"dropdown",type:"string",options:Object.keys(IA.OPTIONS).map(e=>IA.OPTIONS[e]),schemaIgnore:!0,defaultValue:IA.DEFAULT.value},scrollAlignment:{ref:"scrollStartPos",translation:"properties.ScrollAlignment",component:"dropdown",schemaIgnore:!0,defaultValue:0,options:[{value:0,translation:"properties.ScrollAlignStart"},{value:1,translation:"properties.ScrollAlignEnd"}]},gridLines:{type:"items",items:{showGridLines:{ref:"gridLine.auto",type:"boolean",translation:"properties.gridLine.spacing",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},gridSpacing:{ref:"gridLine.spacing",type:"number",component:"dropdown",defaultValue:2,options:[{value:0,translation:"properties.gridLine.noLines"},{value:1,translation:"properties.gridLine.wide"},{value:2,translation:"properties.gridLine.medium"},{value:3,translation:"properties.gridLine.narrow"}],show:e=>e.gridLine&&!e.gridLine.auto}}}}}}}}}}function GK(e,t,n,r=!1){return r?KK(t):YK(e,t,n)}const XK=e=>e.qError?.qErrorCode!==T$,JK=(e,t)=>e?.qHyperCube[t].filter(e=>XK(e)),ZK=e=>{if(!e)return!1;const t=kg(!0,{},e);return t.qHyperCube.qMeasureInfo=JK(e,"qMeasureInfo"),t.qHyperCube.qDimensionInfo=JK(e,"qDimensionInfo"),t&&!CT.continuous({layout:t})&&CT.stacked(t)},QK=({translator:e,flags:t,anything:n})=>{const r={type:"items",show:EA,items:{period:{translation:CA,type:"string",component:"dropdown",ref:"qHyperCubeDef.qDimensions.0.qDef.continuous.period",show:EA,globalChange:OA,options:[{value:NA.AUTO,translation:qA.AUTO},{value:NA.SECONDS,translation:qA.SECONDS},{value:NA.MINUTES,translation:qA.MINUTES},{value:NA.HOURS,translation:qA.HOURS},{value:NA.DAYS,translation:qA.DAYS},{value:NA.WEEKS,translation:qA.WEEKS},{value:NA.MONTHS,translation:qA.MONTHS},{value:NA.YEARS,translation:qA.YEARS},{value:NA.NUMBER,translation:qA.NUMBER},{value:NA.NONE,translation:qA.NONE}],undefinedValue:NA.NONE,defaultValue:NA.AUTO,schemaIgnore:!0},stepSize:{translation:qA.TITLE,type:"number",defaultValue:AA,schemaIgnore:!0,show:DA,ref:"qHyperCubeDef.qDimensions.0.qDef.continuous.stepSize",min:Number.EPSILON,rollbackInvalid:!0}}},i=n?.sense?.isUnsupportedFeature?.("continuousData"),o={items:{labels:{items:{header:{show:(e,t,n)=>JK(n.layout,"qMeasureInfo").length},pointLabels:{component:"checkbox",ref:"dataPoint.showLabels",type:"boolean",translation:"Simple.Label.Value",show:(e,t,n)=>!ZK(t.layout)&&JK(n.layout,"qMeasureInfo").length},segmentLabels:{component:"checkbox",ref:"dataPoint.showSegmentLabels",type:"boolean",translation:"properties.dataPoints.segmentLabelMode",defaultValue:!1,show:(e,t)=>ZK(t.layout),convertFunctions:{get:(e,t,n,r)=>r.dataPoint.showLabels&&r.dataPoint.showSegmentLabels,set(e,t,n,r,i){i.dataPoint.showSegmentLabels=e,i.dataPoint.showLabels=i.dataPoint.showSegmentLabels||i.dataPoint.showTotalLabels}}},totalLabels:{component:"checkbox",ref:"dataPoint.showTotalLabels",type:"boolean",translation:"properties.dataPoints.totalLabelMode",defaultValue:!0,show:(e,t)=>ZK(t.layout),convertFunctions:{get:(e,t,n,r)=>r.dataPoint.showLabels&&r.dataPoint.showTotalLabels,set(e,t,n,r,i){i.dataPoint.showTotalLabels=e,i.dataPoint.showLabels=i.dataPoint.showSegmentLabels||i.dataPoint.showTotalLabels}}},dimensionTitle:{component:"checkbox",ref:"dimensionAxis.show",type:"string",translation:"Simple.Label.Dimension.Hide",defaultValue:"all",show:(e,t,n)=>JK(n.layout,"qDimensionInfo").length&&JK(n.layout,"qMeasureInfo").length,convertFunctions:{get:(e,t,n,r)=>"labels"===r.dimensionAxis.show||"none"===r.dimensionAxis.show,set(e,t,n,r,i){i.dimensionAxis.show=e?"labels":"all"}}},measureTitle:{component:"checkbox",ref:"measureAxis.show",type:"string",translation:"Simple.Label.Measure.Hide",defaultValue:"all",show:(e,t,n)=>JK(n.layout,"qMeasureInfo").length,convertFunctions:{get:(e,t,n,r)=>"labels"===r.measureAxis.show||"none"===r.measureAxis.show,set(e,t,n,r,i){i.measureAxis.show=e?"labels":"all"}}}}}}},a=n?.sense?.theme,s={uses:"settings",items:{simpleStyling:GK(a,t,e,!0),simpleLabels:o,general:{items:{showDisclaimer:{translation:"properties.showDisclaimer",type:"boolean",ref:"showDisclaimer",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Show"},{value:!1,translation:"properties.hide"}]}}},presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:{stylingPanel:GK(a,t,e,!1),grouping:{ref:"barGrouping.grouping",type:"string",component:"item-selection-list",defaultValue:"grouped",horizontal:!0,items:(e,t)=>{const n=[{icon:"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.grouped",value:"grouped"},{icon:"stacked",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.stacked",value:"stacked"}];return rU({layout:t.layout})&&n.push({icon:"bars_butterfly",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.butterfly",value:"butterfly"}),n},show(e,t){const n=JK(t.layout,"qMeasureInfo").length,r=JK(t.layout,"qDimensionInfo").length;return r>0&&n+r>2},globalChange(e,t,n){"butterfly"!==e.barGrouping.grouping||rU({layout:n.layout})||(e.barGrouping.grouping="stacked"),"butterfly"===e.barGrouping.grouping&&e.measureAxis&&"max"!==e.measureAxis.minMax&&!e.measureAxis.autoMinMax&&(e.measureAxis.minMax="max")},change(e,t,n){"butterfly"!==e.barGrouping.grouping||rU({layout:n.layout})||(e.barGrouping.grouping="stacked"),JK(t.layout,"qDimensionInfo").length>1&&"stacked"===e.barGrouping.grouping?(e.qHyperCubeDef.qMode="K",e.qHyperCubeDef.qAlwaysFullyExpanded=!0):e.qHyperCubeDef.qMode="S"},readOnly:(e,t,n)=>CT.continuous({layout:n.layout}),convertFunctions:{get(e,t,n){const r="stacked";return"butterfly"===e(t.type)?rU({layout:n.layout})?e(t.type):r:CT.continuous({layout:n.layout})?r:e(t.type)},set(e,t,n){const r=TT(n.type,n);t(n.type,e,r)}}},orientation:{ref:"orientation",type:"string",component:"item-selection-list",defaultValue:"vertical",horizontal:!0,items:[{component:"icon-item",icon:"bars_vertical",labelPlacement:"bottom",translation:"properties.orientation.vertical",value:"vertical"},{icon:"bars_horizontal",component:"icon-item",labelPlacement:"bottom",translation:"Common.Horizontal",value:"horizontal"}],readOnly:(e,t,n)=>CT.continuous({layout:n.layout}),convertFunctions:(l="vertical",{get:(e,t,n)=>CT.continuous({layout:n.layout})?l:e(t.type),set(e,t,n){const r=TT(n.type,n);t(n.type,e,r)}})},scroll:{type:"items",items:{scrollbar:{type:"string",component:"dropdown",ref:"scrollbar",translation:"properties.scrollbar",options:Object.keys(IA.OPTIONS).map(e=>IA.OPTIONS[e]),defaultValue:IA.DEFAULT.value},scrollStartPos:{ref:"scrollStartPos",type:"number",translation:"properties.ScrollAlignment",component:"dropdown",defaultValue:0,options:[{value:0,translation:"properties.ScrollAlignStart"},{value:1,translation:"properties.ScrollAlignEnd"}],show:(e,t,n)=>!CT.continuous({layout:n.layout})}}},gridLines:{type:"items",snapshot:{tid:"property-gridLines"},items:{showGridLines:{ref:"gridLine.auto",type:"boolean",translation:"properties.gridLine.spacing",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},gridSpacing:{ref:"gridLine.spacing",type:"number",component:"dropdown",defaultValue:2,options:[{value:0,translation:"properties.gridLine.noLines"},{value:1,translation:"properties.gridLine.wide"},{value:2,translation:"properties.gridLine.medium"},{value:3,translation:"properties.gridLine.narrow"}],show:e=>e.gridLine&&!e.gridLine.auto}}},valueLabels:{type:"items",snapshot:{tid:"property-valueLabels"},items:{showLabels:{ref:"dataPoint.showLabels",type:"boolean",translation:"properties.dataPoints.labelmode",component:"switch",defaultValue:!1,options:[{value:!0,label:(t,n)=>((e,t,n)=>n&&n.get(ZK(t.layout)?"properties.on":"Common.Auto"))(0,n,e)},{value:!1,translation:"properties.off"}]},showSegmentLabels:{ref:"dataPoint.showSegmentLabels",type:"boolean",translation:"properties.dataPoints.segmentLabelMode",component:"switch",defaultValue:!1,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],show:(e,t,n)=>e.dataPoint.showLabels&&ZK(n.layout)},showTotalLabels:{ref:"dataPoint.showTotalLabels",type:"boolean",translation:"properties.dataPoints.totalLabelMode",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],show:(e,t,n)=>e.dataPoint.showLabels&&ZK(n.layout)}}}}},colorsAndLegend:{uses:"colorsAndLegend",items:{colors:{items:{attributeExpression:iA}},legend:{items:{show:{snapshot:{tid:"property-legend"}}}}}},dimensionAxis:{uses:"axis.dimensionAxis",items:{axisDisplaySettings:{components:"items",type:"items",show:(e,t,n)=>!CT.continuous({layout:n.layout}),items:{axisDisplayMode:{ref:"dimensionAxis.axisDisplayMode",type:"string",translation:"properties.axis.displaymode",component:"dropdown",defaultValue:"auto",options:[{value:"auto",translation:"properties.axis.displaymode.auto"},{value:"max",translation:"properties.axis.displaymode.max"},{value:"custom",translation:"properties.axis.displaymode.custom"}]},maxVisibleItems:{ref:"dimensionAxis.maxVisibleItems",translation:"properties.axis.maxvisiblevalues",expression:"optional",type:"integer",invalid(e,t,n){const r=JK(n.layout,"qMeasureInfo").length,i=JK(n.layout,"qDimensionInfo").length,o=e.dimensionAxis.maxVisibleItems;return o<0||o>1e4/(i+r)},globalChange:$K,defaultValue:10,show:e=>"custom"===e.dimensionAxis.axisDisplayMode},hint:{component:"text",translation:"properties.axis.maxvisiblevalues.hint",style:"hint",show:e=>["custom","max"].indexOf(e.dimensionAxis.axisDisplayMode)>-1}}},continuousGroup:{items:{miniChart:null,continuousDimension:r},show:!i},othersGroup:{items:{label:{options:[{value:"auto",translation:"Common.Auto"},{value:"horizontal",translation:"Common.Horizontal"},{value:"tilted",translation:"properties.labels.tilted"},{value:"layered",translation:"properties.labels.layered"}]}}}}},measureAxis:{uses:"axis.flippableMeasureAxis"},tooltip:{uses:"tooltip"}}};var l;return s.items.measureAxis={uses:"axis.flippableMeasureAxis",items:{minMax:{items:{minMax:{show:e=>"butterfly"!==e.barGrouping.grouping&&e.measureAxis&&!e.measureAxis.autoMinMax},min:{show:e=>"butterfly"!==e.barGrouping.grouping&&e.measureAxis&&["min","minMax"].includes(e.measureAxis.minMax)&&!e.measureAxis.autoMinMax},max:{invalid:e=>e.measureAxis&&"minMax"===e.measureAxis.minMax?e.measureAxis.min>=e.measureAxis.max:!(!e.measureAxis||"max"!==e.measureAxis.minMax||"butterfly"!==e.barGrouping.grouping)&&e.measureAxis.max<=0}}}}},s},eG={uses:"sortingWithDisclaimer",items:{defaultSorting:{items:{dimensions:{locked:(e,t,n)=>1===n.getMeasures().length&&2===n.getDimensions().length&&0===e,items:{autoSort:{change(e){FO(e)}}}},interColumnSorting:{reset:(e,t)=>{const{qDimensions:n,qMeasures:r,qInterColumnSortOrder:i}=e.qHyperCubeDef,{qCardinal:o}=t.layout.qHyperCube.qDimensionInfo[0],a=i.length,s=[...Array(a).keys()];1===n.length&&r.length>=1&&o>10&&([s[0],s[1]]=[s[1],s[0]]),e.qHyperCubeDef.qInterColumnSortOrder=s}}}}}},tG=({translator:e,flags:t})=>({type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}},refLines:{uses:"reflines"},dimRefLines:{uses:"dimReflines"},plugins:xA({translator:e,pluginOptions:[{value:"point",translation:e.get("Visualizations.Descriptions.Point")},{value:"line",translation:e.get("Visualizations.Descriptions.Line")}],supportNewStyles:t?.isEnabled("TLV_1804_DEFAULT_CHART_SETTINGS")})}}),nG=({translator:e,anything:t})=>({uses:"data",items:{dimensions:{items:{nullSuppression:{show(e,n,r){if(t?.sense?.isUnsupportedFeature?.("includeZeroValues"))return!1;const i=((e,t)=>{const n=t.layout?.qHyperCube?.qDimensionInfo?.findIndex(e=>XK(e));return t.properties?.qHyperCubeDef?.qDimensions?.[n]===e})(e,n),o=CT.continuous({layout:r.layout});return!(i&&o)}},visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Chart.Dimensions.VisibilityCondition",defaultValue:{qv:""},tid:"visibilityCondition",isExpression:e=>"string"==typeof e&&e.trim().length>0},period:{type:"string",defaultValue:"auto",ref:"qDef.continuous.period",show:!1}}},measures:{items:{visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Chart.Measures.VisibilityCondition",defaultValue:{qv:""},tid:"visibilityCondition",isExpression:e=>"string"==typeof e&&e.trim().length>0},trendLines:t?.sense?.isUnsupportedFeature?.("trendlines")?void 0:KW({translator:e,allowStackedByDimension:!0})}}}});function rG({translator:e,flags:t,anything:n}){return{type:"items",component:"accordion",items:{data:nG({translator:e,anything:n}),sorting:eG,addons:tG({translator:e,flags:t}),settings:QK({translator:e,flags:t,anything:n})}}}const iG=e=>e.qError?.qErrorCode!==T$;function oG({flags:e}){return{type:"items",component:"accordion",items:{data:{uses:"data"},sort:{uses:"sortWithDisclaimer",items:{sort:{items:{dimensions:{locked(e,t,n){const r=n.qHyperCube.qMeasureInfo.length,i=n.qHyperCube.qDimensionInfo.filter(e=>iG(e)).length;return 1===r&&2===i&&0===e}}}}}},presentation:{uses:"presentation",items:{showLabels:{ref:"dataPoint.showLabels",type:"boolean",translation:"properties.dataPoints.labelmode",component:"switch",options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]},grouping:{ref:"barGrouping.grouping",type:"string",component:"item-selection-list",horizontal:!0,items:(e,t)=>{const n=[{icon:"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.grouped",value:"grouped"},{icon:"stacked",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.stacked",value:"stacked"}];return rU({layout:t?.layout})&&n.push({icon:"bars_butterfly",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.butterfly",value:"butterfly"}),n},show(e,t){const n=t.qHyperCube.qMeasureInfo.filter(e=>iG(e)).length,r=t.qHyperCube.qDimensionInfo.filter(e=>iG(e)).length;return n+r>2&&!CT.continuous({layout:t})&&(i=t,!(i?.qHyperCube?.qDimensionInfo?.filter(e=>iG(e)).length>1&&i?.qHyperCube?.isHCEnabled));var i},change(e){e.qHyperCubeDef.qDimensions.length>1&&"stacked"===e.barGrouping.grouping?(e.qHyperCubeDef.qMode="K",e.qHyperCubeDef.qAlwaysFullyExpanded=!0):e.qHyperCubeDef.qMode="S"}},orientation:{ref:"orientation",type:"string",component:"item-selection-list",horizontal:!0,items:[{component:"icon-item",icon:"bars_vertical",labelPlacement:"bottom",translation:"properties.orientation.vertical",value:"vertical"},{icon:"bars_horizontal",component:"icon-item",labelPlacement:"bottom",translation:"Common.Horizontal",value:"horizontal"}],show:(e,t)=>!CT.continuous({layout:t})}}},color:{uses:"color"}}}}function aG(e){const t={},n=Zx(e,"components"),r=Zx(e,"dimensionAxis.axisDisplayMode"),i=Zx(e,"dimensionAxis.maxVisibleItems"),o=n?n.filter(e=>"bar"===e.key)[0]:void 0,a=Zx(e,"tooltip");if(o&&o.style&&Object.keys(o.style).forEach(e=>{t[`chart_style_${e}`]=o.style[e]}),i&&(t.chart_dimaxis_maxVisibleItems=i),r&&(t.chart_dimaxis_axisDisplayMode=r),a){t.chart_tooltip_custom=!a.auto;const e=Zx(a,"chart.object.refId");!a.auto&&e&&(t.chart_tooltip_custom_mini_chart=e)}return t}const sG=e=>!!(e&&e.qHyperCube.qSize.qcy>0),lG={ACCUMULATIONS:"accumulation",MOVING_AVERAGE:"movingAverage",DIFFERENCE:"difference",NORMALIZATION:"normalization"};function cG(){const e=[];return Object.keys(lG).forEach(t=>{e.push(lG[t])}),e}function uG(e){return{definition:rG(e),softDefinition:oG(e),support:{snapshot:sG,export:sG,exportData:!0,sharing:sG,viewData:!0,effects:!0,modifiers:cG()},importProperties:(t,n,r,i)=>{const o={layout:{templateId:n.templateId}};r.mapProperties(o);const a={defaultDimension:r.getDefaultDimensionProperties(),defaultMeasure:r.getDefaultMeasureProperties()},s=HK.axisChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:z$(e),defaultPropertyValues:a,hypercubePath:i,extension:r}),l=s.qProperty;return l.qHyperCubeDef.qDimensions.length>1&&"stacked"===l.barGrouping.grouping&&(l.qHyperCubeDef.qMode="K",l.qHyperCubeDef.qAlwaysFullyExpanded=!0),HK.conditionalShow.unquarantine(l),HK.conditionalShow.unquarantineAlternative(l),s},exportProperties:(e,t,n)=>{HK.conditionalShow.quarantine(e.qProperty),HK.conditionalShow.quarantineAlternative(e.qProperty);return HK.axisChart.exportProperties({propertyTree:e,hyperCubePath:t,viewDataMode:n})},migrate:{properties:e=>(e.qExtendsId||(function(e){e.qHyperCubeDef.qDimensions.forEach(FO),e.qHyperCubeDef.qLayoutExclude?.qHyperCubeDef?.qDimensions&&e.qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.forEach(FO)}(e),function({properties:e}){const{scrollbar:t,dimensionAxis:n,preferContinuousAxis:r,showMiniChartForContinuousAxis:i}=e;if(t||!1!==i)return;const{continuousAuto:o}=n;(o||!o&&r)&&(e.scrollbar=IA.OPTIONS.NONE.value)}({properties:e})),e)},extendMetrics:aG}}return function(t){const n=r$();return{qae:F$(t),ext:uG(t),component(){const r=B$({env:t}),{viewState:i,viewCache:o}=V$(),a=function({picasso:t}){const n=e.useElement(),r=e.useOptions(),[i,o]=e.useState();return e.useEffect(()=>{if(!t)return()=>{};n.style.overflow="hidden";const e=t({renderer:{prio:[r?.renderer||"canvas"]}}).chart({element:n,data:[],settings:{}});o(e);const{destroy:i}=e;return()=>{i()}},[r.renderer]),i}({picasso:n}),s=fU({picasso:n,chart:a,environment:r,viewState:i,viewCache:o}),l=FK({env:t,services:s});IK({picasso:n,chart:a,services:s,environment:r,viewState:i,viewCache:o,bootstrapped:l}),(({environment:t,services:n,chart:r,viewState:i,bootstrapped:o})=>{e.onTakeSnapshot(e=>{if(!t||!n||!o)return;const{layoutService:a,dockService:s,colorService:l,discrete:c,continuousDataModel:u,reducedDataModel:d}=n,{width:f,height:h}=s.meta.chart.size;if(e.snapshotData=e.snapshotData||{},e.snapshotData.content={size:{w:f,h:h}},a.meta.isSnapshot)return Promise.resolve();e.snapshotData.content.chartData={scrollOffset:i.get("scrollOffset"),zoom:i.get("zoom"),legendScrollOffset:qT(r,nU.COMPONENT.LEGEND_COLOR_CAT)};const{properties:p}=o,m=p?.qHyperCubeDef.qDimensions.some(e=>e.qCalcCondition?.qCond?.qv);return m&&(e.tooltip.auto=!0),a.meta.isDiscrete?(c.command.setSnapshotData(e),d.setSnapshotData(e)):u.setSnapshotData(e),l.getMain().getSnapshotData().then(t=>{e.snapshotData.content.chartData={...e.snapshotData.content.chartData,...t}}).catch(()=>{})}),e.useImperativeHandle(()=>({getViewState(){if(i&&r)return{scrollOffset:i.get("scrollOffset"),zoom:i.get("zoom"),legendScrollOffset:qT(r,nU.COMPONENT.LEGEND_COLOR_CAT)}}}),[i,r])})({environment:r,services:s,chart:a,viewState:i,bootstrapped:l})}}}});
