@sisense/sdk-ui-vue 1.34.0 → 1.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -755,7 +755,7 @@ Error generating stack: `+Ee.message+`
|
|
755
755
|
`)}}),oY=(e,t,n,r,o,i,a)=>{var s,l;const c=[],d=[];r.seriesValues.forEach(z=>{d.push(z),c.push(z)}),r.rangeValues.forEach(([z,N])=>{d.push(N),c.push(z)});const p=Nt(ot({},r),{y:d,seriesToColorMap:r.seriesToColorMap}),u=H5(Nt(ot({},e),{type:"cartesian"}),t,n,p,o,i,a),k={};u.options.series.forEach(z=>{k[z.name]=z});const v=Nt(ot({},r),{y:c,seriesToColorMap:r.seriesToColorMap}),h=H5(Nt(ot({},e.seriesOther),{type:"cartesian"}),t,n,v,o,i,a),C={};h.options.series.forEach(z=>{C[z.name]=z});let R=1/0,H=-1/0,U=-1,W=0;if(u.options.series.forEach((z,N)=>{if(r.breakBy.length===0&&N<r.seriesValues.length)hv(z.name)&&(U=gqe(z,C,k)),z.zIndex=1,z.data.forEach(B=>{B.y&&B.y<R&&(R=B.y),B.y&&B.y>H&&(H=B.y)});else{const B=C[z.name].data;z.yAxis=0;let E=0;r.breakBy.length===0&&(E=N-r.seriesValues.length);const x=r.rangeValues[E],g=x[0].column.name.indexOf("_")+1,M=x[1].column.name.substring(g),_=x[0].column.name.substring(g);z.type="arearange",hv(z.name)&&vqe(z,C),W=Math.max(z.data.length,W),z.data=z.data.map((T,Y)=>{const V=Nt(ot({},T),{low:B[Y].y,high:T.y,y:void 0,upperPointName:M,lowerPointName:_});return V.low&&V.low<R&&(R=V.low),V.high&&V.high>H&&(H=V.high),V}),hv(z.name)&&yqe(z,C)}}),u.options.xAxis||(u.options.xAxis=[]),U>0&&bqe(u.options.xAxis,U,W),t==="arearange"&&n.lineType==="smooth"){const z="areasplinerange";u.options.chart.type=z,(s=u.options.navigator)!=null&&s.series&&(u.options.navigator.series.type=z)}t==="arearange"&&(u.options.tooltip=_Ze(!1,r,o));const[A]=(l=u.options.yAxis)!=null?l:[],D=Nt(ot({},A),{min:R,max:H});return u.options.yAxis=[D],u},Foe=e=>e instanceof Object&&"data"in e,SZe=e=>e.rows.length===0,fv="$rownum",Hoe=e=>{let t=0;const n=e.rows.map(o=>{const i=e.columns.map((a,s)=>{var l;const c=o[s];if(Foe(c)){let u=c.data.toString();if(Ra(a.type)){const k="1111-11-11T";u.startsWith(k)&&(u=u.replace(k,"1970-01-01T"))}return ot(ot({rawValue:c.data,displayValue:(l=c.text)!=null?l:u,compareValue:qv(u,a.type)},c.blur!==void 0?{blur:c.blur}:{}),c.color?{color:c.color}:{})}let d,p;return Ra(a.type)&&(d=qv(`${c}`,a.type),p=new Date(d.value).toISOString()),{rawValue:p??c,displayValue:`${c??""}`,compareValue:d}});return t++,i.push({displayValue:`${t}`,rawValue:t}),i}),r=e.columns.map((o,i)=>({name:o.name,type:o.type,index:i,direction:0}));return r.push({name:fv,type:"number",index:r.length,direction:0}),{columns:r,rows:n}},ew=(e,t)=>{var n;if(t.rows.length===0)return{type:"cartesian",series:[],xValues:[],xAxisCount:0};const r=e.x.length;let o=Gm(t,e.x.map(({column:{name:p}})=>p));o=o.map((p,u)=>Nt(ot({},p),{direction:Woe(e.x[u].sortType)}));const i=Gm(t,e.breakBy.map(({column:{name:p}})=>p)),a=e.y.filter(({sortType:p})=>p&&p!=="sortNone"),s=o.length>1?1:0,l=$oe(t,a,o,((n=o[s])==null?void 0:n.direction)===0?fv:void 0),c=e.y.map(({column:{name:p}})=>p),d=e.breakBy.length>0?TZe(t,l,o,c[0],i,e.breakBy):kZe(t,l,o,c,e.y);return Nt(ot({},d),{xAxisCount:r,type:"cartesian"})},Woe=e=>{switch(e){case"sortNone":return 0;case"sortDesc":return-1;case"sortAsc":default:return 1}},$oe=(e,t,n,r)=>{if(n.length===0)return[{key:"",xValues:[""],rawValues:[]}];const o=t.map(({column:{name:p}})=>({column:p,agg:"sum",title:p}));if(r){const p={column:r,title:r,agg:"min"};o.push(p)}const i=loe(e,n,o),a=[];let s=0;if(n.length===2){s=1;const p=Ei(i,n[0].name);p&&a.push(p)}if(t.map(p=>{const u=Ei(i,p.column.name);return u&&a.push(Nt(ot({},u),{direction:p.sortType==="sortAsc"?1:-1})),p}),r){const p=Ei(i,r);p&&a.push(p)}if(n.length>0){const p=Ei(i,n[s].name);p&&a.push(p)}const l=iz(i,a),c=Gm(l,n.map(p=>p.name)),d=coe(l,c);return d.rows.map(p=>{const u=d_(p,d.columns),k=u.map(C=>C.displayValue),v=u.map(C=>{var R;return(R=C.rawValue)!=null?R:C.displayValue}),h=u.map(C=>{var R;return(R=C==null?void 0:C.compareValue)==null?void 0:R.value});return{key:v.join(","),xValues:k,rawValues:v,compareValues:h}})},Uoe=(e,t,n)=>{var r,o;const i=n?ts(e,n):1e-5,{color:a,rawValue:s}=(o=e[(r=n==null?void 0:n.index)!=null?r:0])!=null?o:{};return ot({rawValue:s,xValue:t.rawValues,xDisplayValue:t.xValues,xCompareValue:t.compareValues,value:i===void 0?NaN:i,blur:n?az(e,n):void 0},a&&{color:a})},kZe=(e,t,n,r,o)=>{const i=r.length>0?Gm(e,r):[void 0],a=o.reduce((c,d)=>(c[d.column.name]=d,c),{}),s=sz(e.rows,n),l=i.map(c=>{var d,p;let u=t.map(C=>{const R=s[C.key],H=R?R[0]:[];return Uoe(H,C,c)});const k=(d=c==null?void 0:c.name)!=null?d:"",v=k?ji(a[k]):"",h=(p=a[k])==null?void 0:p.color;return h&&(u=lqe(u,h)),{name:k,title:v,data:u}});return{xValues:t,series:l}},CZe=(e,t,n)=>d_(e,t).map((r,o)=>{const i=Uo(n[o].numberFormatConfig);return oi(t[o].type)?hi(i,parseFloat(r.displayValue)):r.displayValue}).join(","),MZe=(e,t)=>d_(e,t).map(({rawValue:n})=>n),TZe=(e,t,n,r,o,i)=>{const a=Ei(e,r),s=oz(e.rows,o).map(l=>{const c=l[0];return{seriesName:CZe(c,o,i),seriesValues:MZe(c,o),rowsByXColumns:sz(l,n)}}).map(l=>{const c=t.map(d=>{const p=l.rowsByXColumns[d.key],u=p?p[0]:[];return Uoe(u,d,a)});return{name:l.seriesName,data:c,custom:{rawValue:l.seriesValues}}});return{xValues:t,series:s}},Yoe=(e,t)=>{const n=()=>Nt(ot({},e),{y:[]}),r=n(),o=n(),i=1,a=0;e.seriesValues.forEach(c=>{r.y.push(c),o.y.push(c)}),e.rangeValues.forEach(c=>{const d=c[i],p=c[a];r.y.push(d),o.y.push(p)});const s=ew(r,t),l=ew(o,t);return Nt(ot({},s),{type:"range",seriesOther:l})},Goe=e=>e.rangeValues?!1:e.y.some(t=>hv(ji(t))),Voe=e=>{const t=e.y.filter(o=>hv(ji(o))).map(o=>{const i=Nt(ot({},o),{column:Gv(o.column,{title:o.column.title&&iM(o.column.title),name:`${o.column.name}_upper`})});return[Nt(ot({},o),{column:Gv(o.column,{title:o.column.title&&iM(o.column.title),name:`${o.column.name}_lower`})}),i]}),n=t.concat(e.y).flat(),r=e.y;return Nt(ot({},e),{rangeValues:t,seriesValues:r,y:n})},EZe=(e,t)=>{const n=Voe(e);return Nt(ot({},Yoe(n,t)),{type:"cartesian"})},AZe=(e,t,n,r,o,i,a)=>{switch(e.type){case"range":return oY(e,t,n,r,o,i,a);case"cartesian":{const s=r,l=Goe(s)?oY(Nt(ot({},e),{type:"range"}),t,n,Voe(s),o,i,a):H5(e,t,n,s,o,i,a);return wqe(l.options.series),l}case"categorical":return YXe(e,t,n,r,o,i);case"scatter":return fZe(e,t,n,r,i);case"boxplot":return wZe(e,n,r,o,i);default:throw new Qt("errors.unexpectedChartType",{chartType:e.type})}},OZe={legend:{enabled:!0,position:"bottom"},navigator:{enabled:!0},markers:{enabled:!1,fill:"filled",size:"small"},seriesLabels:{enabled:!1,rotation:0},xAxis:{enabled:!0,gridLines:!1,isIntervalEnabled:!1,labels:{enabled:!0},logarithmic:!1,title:{enabled:!1,text:"X Axis title"}},yAxis:{enabled:!0,gridLines:!0,isIntervalEnabled:!1,labels:{enabled:!0},logarithmic:!1,title:{enabled:!1,text:"Y Axis title"}},y2Axis:{enabled:!0,gridLines:!0,isIntervalEnabled:!1,labels:{enabled:!0},logarithmic:!1,title:{enabled:!1,text:"Y2 Axis title"}},convolution:{enabled:!1,selectedConvolutionType:"byPercentage",minimalIndependentSlicePercentage:3,independentSlicesCount:7},labels:{categories:!0,enabled:!0,percent:!0,decimals:!1,value:!1}},Py=()=>Ha(OZe),PZe=(e,t)=>{var n;if(!t)return e;const r={backgroundColor:t.chart.backgroundColor},o={style:{fontFamily:t.typography.fontFamily}},i={itemStyle:{color:t.chart.textColor,fontFamily:t.typography.fontFamily}},a={series:{dataLabels:{style:{color:t.chart.textColor,fontFamily:t.typography.fontFamily}}}},s={activeDataLabelStyle:{color:t.chart.textColor},breadcrumbs:{buttonTheme:{fill:t.general.brandColor,stroke:t.general.brandColor,style:{color:t.general.primaryButtonTextColor},states:{hover:{fill:t.general.primaryButtonHoverColor,stroke:t.general.primaryButtonHoverColor}}}}},l={chart:r,tooltip:o,legend:i,plotOptions:a,drilldown:s},c={labels:{style:{color:t.chart.textColor,fontFamily:t.typography.fontFamily}},title:{style:{color:t.chart.textColor,fontFamily:t.typography.fontFamily}}},d={color:t==null?void 0:t.chart.backgroundColor,label:{style:{color:t.chart.textColor,fontFamily:t.typography.fontFamily}}},p=ti(e,l);return p.xAxis=(n=p.xAxis)==null?void 0:n.map(u=>{var k;return u.plotBands=(k=u.plotBands)==null?void 0:k.map(v=>ti(v,Nt(ot({},d),{color:v.color||(t==null?void 0:t.chart.backgroundColor)}))),ti(u,c)}),p.yAxis&&(p.yAxis=p.yAxis.map(u=>{var k;return u.plotBands=(k=u.plotBands)==null?void 0:k.map(v=>ti(v,Nt(ot({},d),{color:v.color||(t==null?void 0:t.chart.backgroundColor)}))),ti(u,c)})),p},DZe=600,NZe=300,LZe=(e,t,n)=>{const r={duration:t.chart.animation.init.duration==="auto"?DZe:t.chart.animation.init.duration},o={duration:t.chart.animation.redraw.duration==="auto"?NZe:t.chart.animation.redraw.duration};return ti(e,{accessibility:{enabled:n},chart:{animation:o},plotOptions:{series:{animation:r}},boost:{useGPUTranslations:!0,usePreAllocated:!0}})},RZe="_alert_box_10ttx_1",IZe="_content_10ttx_8",jZe="_alert_10ttx_1",UD={alert_box:RZe,content:IZe,alert:jZe},zZe=({alerts:e=[]})=>ke("div",{className:UD.alert_box,children:ke("div",{className:UD.content,children:[...new Set(e)].map((t,n)=>ke("div",{className:UD.alert,children:t},`alert-${n}`))})});function qoe(e,t,n){n=typeof n=="function"?n:void 0;var r=n?n(e,t):void 0;return r===void 0?Iw(e,t,void 0,n):!!r}var Xoe={exports:{}};(function(e,t){(function(n,r){e.exports=r(gt)})(typeof self<"u"?self:eo,function(n){return function(r){function o(a){if(i[a])return i[a].exports;var s=i[a]={i:a,l:!1,exports:{}};return r[a].call(s.exports,s,s.exports,o),s.l=!0,s.exports}var i={};return o.m=r,o.c=i,o.d=function(a,s,l){o.o(a,s)||Object.defineProperty(a,s,{configurable:!1,enumerable:!0,get:l})},o.n=function(a){var s=a&&a.__esModule?function(){return a.default}:function(){return a};return o.d(s,"a",s),s},o.o=function(a,s){return Object.prototype.hasOwnProperty.call(a,s)},o.p="",o(o.s=0)}([function(r,o,i){function a(){return a=Object.assign?Object.assign.bind():function(H){for(var U=1;U<arguments.length;U++){var W=arguments[U];for(var A in W)Object.prototype.hasOwnProperty.call(W,A)&&(H[A]=W[A])}return H},a.apply(this,arguments)}function s(H){return p(H)||d(H)||c(H)||l()}function l(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
756
756
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function c(H,U){if(H){if(typeof H=="string")return u(H,U);var W=Object.prototype.toString.call(H).slice(8,-1);return W==="Object"&&H.constructor&&(W=H.constructor.name),W==="Map"||W==="Set"?Array.from(H):W==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(W)?u(H,U):void 0}}function d(H){if(typeof Symbol<"u"&&H[Symbol.iterator]!=null||H["@@iterator"]!=null)return Array.from(H)}function p(H){if(Array.isArray(H))return u(H)}function u(H,U){(U==null||U>H.length)&&(U=H.length);for(var W=0,A=new Array(U);W<U;W++)A[W]=H[W];return A}function k(H){"@babel/helpers - typeof";return(k=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(U){return typeof U}:function(U){return U&&typeof Symbol=="function"&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U})(H)}Object.defineProperty(o,"__esModule",{value:!0}),i.d(o,"HighchartsReact",function(){return R});var v=i(1),h=i.n(v),C=typeof window<"u"?v.useLayoutEffect:v.useEffect,R=Object(v.memo)(Object(v.forwardRef)(function(H,U){var W=Object(v.useRef)(),A=Object(v.useRef)(),D=Object(v.useRef)(H.constructorType),z=Object(v.useRef)(H.highcharts);return C(function(){function N(){var E=H.highcharts||(typeof window>"u"?"undefined":k(window))==="object"&&window.Highcharts,x=H.constructorType||"chart";E?E[x]?H.options?A.current=E[x](W.current,H.options,H.callback):console.warn('The "options" property was not passed.'):console.warn('The "constructorType" property is incorrect or some required module is not imported.'):console.warn('The "highcharts" property was not passed.')}if(A.current){if(H.allowChartUpdate!==!1)if(H.constructorType!==D.current||H.highcharts!==z.current)D.current=H.constructorType,z.current=H.highcharts,N();else if(!H.immutable&&A.current){var B;(B=A.current).update.apply(B,[H.options].concat(s(H.updateArgs||[!0,!0])))}else N()}else N()},[H.options,H.allowChartUpdate,H.updateArgs,H.containerProps,H.highcharts,H.constructorType]),C(function(){return function(){A.current&&(A.current.destroy(),A.current=null)}},[]),Object(v.useImperativeHandle)(U,function(){return{get chart(){return A.current},container:W}},[]),h.a.createElement("div",a({},H.containerProps,{ref:W}))}));o.default=R},function(r,o){r.exports=n}])})})(Xoe);var BZe=Xoe.exports;const FZe=Ts(BZe);function du(e){const t=pt(void 0);return xt(()=>{t.current=e},[e]),t.current}var Zoe={exports:{}};(function(e){(function(t){e.exports?e.exports=t:t(Highcharts)})(function(t){var n=t.relativeLength;t.wrap(t.seriesTypes.column.prototype,"translate",function(r){var o=this.options,i=o.topMargin||0,a=o.bottomMargin||0;r.call(this),this.points.forEach(function(s){var l=s.shapeArgs,c=l.width,d=l.height,p=l.x,u=l.y,k=n(o.borderRadiusTopLeft||0,c),v=n(o.borderRadiusTopRight||0,c),h=n(o.borderRadiusBottomRight||0,c),C=n(o.borderRadiusBottomLeft||0,c);if(k||v||h||C){var R=Math.min(c,d)/2;k>R&&(k=R),v>R&&(v=R),h>R&&(h=R),C>R&&(C=R),s.dlBox=s.shapeArgs,s.shapeType="path",s.shapeArgs={d:[["M",p+k,u+i],["L",p+c-v,u+i],["C",p+c-v/2,u,p+c,u+v/2,p+c,u+v],["L",p+c,u+d-h],["C",p+c,u+d-h/2,p+c-h/2,u+d,p+c-h,u+d+a],["L",p+C,u+d+a],["C",p+C/2,u+d,p,u+d-C/2,p,u+d-C],["L",p,u+k],["C",p,u+k/2,p+k/2,u,p+k,u],["Z"]]}}})})})})(Zoe);var HZe=Zoe.exports;const WZe=Ts(HZe),$Ze=()=>{(function(e){e.seriesTypes.line.prototype.drawLegendSymbol=e.seriesTypes.area.prototype.drawLegendSymbol,cp.wrap(cp.Series.types.treemap.prototype,"pointAttribs",function(t,...n){var r;const o=t.call(this,...n),i=n[0];return(r=i.options.custom)!=null&&r.blur&&(o.fill=cp.color(i.color).setOpacity(.2).get("rgba"),o.stroke=cp.color(o.stroke).setOpacity(.2).get("rgba")),o})})(cp),function(e){e.Point.prototype.importEvents=function(){const t=this;this.importedEvents&&this.importedEvents.forEach(function(o){o()}),this.importedEvents=[];const n=e.merge(t.series.options.point,t.options),r=n.events;t.events=r,e.objectEach(r,function(o,i){e.isFunction(o)&&t.importedEvents.push(e.addEvent(t,i,o))})}}(cp),WZe(cp)};$Ze();const UZe=sg(function({options:e}){var t,n,r,o,i,a;const s=du(e),l=ct(h=>{var C,R,H,U,W,A,D,z;const N=e;!((U=(H=(R=(C=N==null?void 0:N.plotOptions)==null?void 0:C.series)==null?void 0:R.point)==null?void 0:H.events)!=null&&U.click)&&!((z=(D=(A=(W=N==null?void 0:N.plotOptions)==null?void 0:W.series)==null?void 0:A.point)==null?void 0:D.events)!=null&&z.contextmenu)&&(h.container.onclick=null)},[e]),c=h=>h==null?void 0:h.some(({data:C})=>C.some(R=>!!R.marker)),d=(s==null?void 0:s.xAxis)&&(e==null?void 0:e.xAxis)&&((t=s==null?void 0:s.xAxis[0])==null?void 0:t.type)!==((n=e==null?void 0:e.xAxis[0])==null?void 0:n.type),p=!!s&&((r=s==null?void 0:s.navigator)==null?void 0:r.enabled)!==((o=e==null?void 0:e.navigator)==null?void 0:o.enabled),u=c(s==null?void 0:s.series)&&!c(e==null?void 0:e.series),k=!!s&&((i=s==null?void 0:s.chart)==null?void 0:i.type)!==((a=e==null?void 0:e.chart)==null?void 0:a.type),v=d||p||k||u;return ke(FZe,{highcharts:cp,options:Ha(e),containerProps:{style:{height:"100%",width:"100%"}},immutable:v,callback:l})},(e,t)=>qoe(e,t,(n,r)=>Tp(n)&&Tp(r)?n.toString()===r.toString():void 0)),YZe=e=>e,vz=({chartType:e,chartData:t,dataOptions:n,designOptions:r,onDataPointClick:o,onDataPointContextMenu:i,onDataPointsSelected:a,onBeforeRender:s=YZe})=>{const{app:l}=Er(),{t:c}=Fn(),d=[],p=ct((v,h)=>_g(v,h,l==null?void 0:l.settings.locale,l==null?void 0:l.settings.dateConfig),[]),{themeSettings:u}=mn(),k=bt(()=>{var v;const{options:h,alerts:C}=AZe(t,e,r,n,c,u,p);d.push(...C);const R=((v=l==null?void 0:l.settings.accessibilityConfig)==null?void 0:v.enabled)||!1,H=LZe(h,u,R),U=rqe(H,n,{onDataPointClick:o,onDataPointContextMenu:i,onDataPointsSelected:a}),W=PZe(U,u);return s(W)},[e,t,n,r,u,o,i,s,c]);return k&&Pt("div",{"aria-label":"chart-root",style:{display:"flex",justifyContent:"center",height:"100%",width:"100%"},children:[!!d.length&&ke(zZe,{alerts:d}),ke(UZe,{options:k})]})},GZe=[...SE,...kE,...CE,...ME,...TE],Koe=e=>GZe.includes(e),yz=e=>!!e.chartType&&Koe(e.chartType)&&!!e.chartData,bz=e=>{var t;return{x:e.category.map(ga),y:e.value.map(pi),breakBy:((t=e.breakBy)==null?void 0:t.map(ga))||[],seriesToColorMap:e.seriesToColorMap}};function Qoe(e){return[...e.x.map(V5),...e.breakBy.map(V5)].filter(VZe)}function Joe(e){return e.y.map(V5).filter(Mo)}function eie(e){return"category"in e&&Co(e.category)&&"value"in e&&Co(e.value)&&"breakBy"in e&&Co(e.breakBy)}function tie(e){return"x"in e&&Co(e.x)&&e.x.every(tx)&&"y"in e&&Co(e.y)&&e.y.every(tx)&&"breakBy"in e&&Co(e.breakBy)&&e.breakBy.every(tx)}function V5(e){return e.column}function VZe(e){return!Mo(e)}function qZe(e){return e.y.some(t=>t.showOnRightAxis)}function nie(e,t){return ew(e,t)}function rie(e,t,n){var r,o,i,a;const s=Mg(t,qZe(n)),l=Dy(t??{},Py()),c=HE(n,e,l);return Nt(ot({},s),{designPerSeries:c,stackType:t.subtype?oie[t.subtype]:joe,showTotal:(o=(r=t.totalLabels)==null?void 0:r.enabled)!=null?o:!1,totalLabelRotation:(a=(i=t.totalLabels)==null?void 0:i.rotation)!=null?a:0})}const oie={"bar/classic":"classic","bar/stacked":"stacked","bar/stacked100":"stack100","column/classic":"classic","column/stackedcolumn":"stacked","column/stackedcolumn100":"stack100"};function iie(e){return"subtype"in e&&e.subtype?Object.keys(oie).includes(e.subtype):!0}var aie=q2?function(e,t){return q2.set(e,t),e}:iT;function tw(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=nT(e.prototype),r=e.apply(n,t);return Ia(r)?r:n}}var XZe=1;function ZZe(e,t,n){var r=t&XZe,o=tw(e);function i(){var a=this&&this!==is&&this instanceof i?o:e;return a.apply(r?n:this,arguments)}return i}var KZe=Math.max;function sie(e,t,n,r){for(var o=-1,i=e.length,a=n.length,s=-1,l=t.length,c=KZe(i-a,0),d=Array(l+c),p=!r;++s<l;)d[s]=t[s];for(;++o<a;)(p||o<i)&&(d[n[o]]=e[o]);for(;c--;)d[s++]=e[o++];return d}var QZe=Math.max;function lie(e,t,n,r){for(var o=-1,i=e.length,a=-1,s=n.length,l=-1,c=t.length,d=QZe(i-s,0),p=Array(d+c),u=!r;++o<d;)p[o]=e[o];for(var k=o;++l<c;)p[k+l]=t[l];for(;++a<s;)(u||o<i)&&(p[k+n[a]]=e[o++]);return p}function JZe(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var cie=fK(aie),eKe=/\{\n\/\* \[wrapped with (.+)\] \*/,tKe=/,? & /;function nKe(e){var t=e.match(eKe);return t?t[1].split(tKe):[]}var rKe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function oKe(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(rKe,`{
|
757
757
|
/* [wrapped with `+t+`] */
|
758
|
-
`)}function uie(e,t){var n=e==null?0:e.length;return!!n&&K4(e,t,0)>-1}var iKe=1,aKe=2,sKe=8,lKe=16,cKe=32,uKe=64,dKe=128,pKe=256,hKe=512,fKe=[["ary",dKe],["bind",iKe],["bindKey",aKe],["curry",sKe],["curryRight",lKe],["flip",hKe],["partial",cKe],["partialRight",uKe],["rearg",pKe]];function mKe(e,t){return zZ(fKe,function(n){var r="_."+n[0];t&n[1]&&!uie(e,r)&&e.push(r)}),e.sort()}function die(e,t,n){var r=t+"";return GI(e,oKe(r,mKe(nKe(r),n)))}var gKe=1,vKe=2,yKe=4,bKe=8,iY=32,aY=64;function pie(e,t,n,r,o,i,a,s,l,c){var d=t&bKe,p=d?a:void 0,u=d?void 0:a,k=d?i:void 0,v=d?void 0:i;t|=d?iY:aY,t&=~(d?aY:iY),t&yKe||(t&=~(gKe|vKe));var h=[e,t,o,k,p,v,u,s,l,c],C=n.apply(void 0,h);return _5(e)&&cie(C,h),C.placeholder=r,die(C,e,t)}function hie(e){var t=e;return t.placeholder}var xKe=Math.min;function wKe(e,t){for(var n=e.length,r=xKe(t.length,n),o=tT(e);r--;){var i=t[r];e[r]=Pw(i,n)?o[i]:void 0}return e}var sY="__lodash_placeholder__";function lM(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n];(a===t||a===sY)&&(e[n]=sY,i[o++]=n)}return i}var _Ke=1,SKe=2,kKe=8,CKe=16,MKe=128,TKe=512;function xz(e,t,n,r,o,i,a,s,l,c){var d=t&MKe,p=t&_Ke,u=t&SKe,k=t&(kKe|CKe),v=t&TKe,h=u?void 0:tw(e);function C(){for(var R=arguments.length,H=Array(R),U=R;U--;)H[U]=arguments[U];if(k)var W=hie(C),A=JZe(H,W);if(r&&(H=sie(H,r,o,k)),i&&(H=lie(H,i,a,k)),R-=A,k&&R<c){var D=lM(H,W);return pie(e,t,xz,C.placeholder,n,H,D,s,l,c-R)}var z=p?n:this,N=u?z[e]:e;return R=H.length,s?H=wKe(H,s):v&&R>1&&H.reverse(),d&&l<R&&(H.length=l),this&&this!==is&&this instanceof C&&(N=h||tw(N)),N.apply(z,H)}return C}function EKe(e,t,n){var r=tw(e);function o(){for(var i=arguments.length,a=Array(i),s=i,l=hie(o);s--;)a[s]=arguments[s];var c=i<3&&a[0]!==l&&a[i-1]!==l?[]:lM(a,l);if(i-=c.length,i<n)return pie(e,t,xz,o.placeholder,void 0,a,c,void 0,void 0,n-i);var d=this&&this!==is&&this instanceof o?r:e;return aT(d,this,a)}return o}var AKe=1;function OKe(e,t,n,r){var o=t&AKe,i=tw(e);function a(){for(var s=-1,l=arguments.length,c=-1,d=r.length,p=Array(d+l),u=this&&this!==is&&this instanceof a?i:e;++c<d;)p[c]=r[c];for(;l--;)p[c++]=arguments[++s];return aT(u,o?n:this,p)}return a}var lY="__lodash_placeholder__",YD=1,PKe=2,DKe=4,cY=8,i1=128,uY=256,NKe=Math.min;function LKe(e,t){var n=e[1],r=t[1],o=n|r,i=o<(YD|PKe|i1),a=r==i1&&n==cY||r==i1&&n==uY&&e[7].length<=t[8]||r==(i1|uY)&&t[7].length<=t[8]&&n==cY;if(!(i||a))return e;r&YD&&(e[2]=t[2],o|=n&YD?0:DKe);var s=t[3];if(s){var l=e[3];e[3]=l?sie(l,s,t[4]):s,e[4]=l?lM(e[3],lY):t[4]}return s=t[5],s&&(l=e[5],e[5]=l?lie(l,s,t[6]):s,e[6]=l?lM(e[5],lY):t[6]),s=t[7],s&&(e[7]=s),r&i1&&(e[8]=e[8]==null?t[8]:NKe(e[8],t[8])),e[9]==null&&(e[9]=t[9]),e[0]=t[0],e[1]=o,e}var RKe="Expected a function",dY=1,IKe=2,GD=8,VD=16,qD=32,pY=64,hY=Math.max;function jKe(e,t,n,r,o,i,a,s){var l=t&IKe;if(!l&&typeof e!="function")throw new TypeError(RKe);var c=r?r.length:0;if(c||(t&=~(qD|pY),r=o=void 0),a=a===void 0?a:hY(S5(a),0),s=s===void 0?s:S5(s),c-=o?o.length:0,t&pY){var d=r,p=o;r=o=void 0}var u=l?void 0:$4(e),k=[e,t,n,r,o,d,p,i,a,s];if(u&&LKe(k,u),e=k[0],t=k[1],n=k[2],r=k[3],o=k[4],s=k[9]=k[9]===void 0?l?0:e.length:hY(k[9]-c,0),!s&&t&(GD|VD)&&(t&=~(GD|VD)),!t||t==dY)var v=ZZe(e,t,n);else t==GD||t==VD?v=EKe(e,t,s):(t==qD||t==(dY|qD))&&!o.length?v=OKe(e,t,n,r):v=xz.apply(void 0,k);var h=u?aie:cie;return die(h(v,k),e,t)}var zKe=8;function FE(e,t,n){t=n?void 0:t;var r=jKe(e,zKe,void 0,void 0,void 0,void 0,void 0,t);return r.placeholder=FE.placeholder,r}FE.placeholder={};const BKe={dataOptions:{translateDataOptionsToInternal:bz,getAttributes:Qoe,getMeasures:Joe,isCorrectDataOptions:eie,isCorrectDataOptionsInternal:tie},data:{loadData:rz,getChartData:nie},designOptions:{translateStyleOptionsToDesignOptions:FE(rie)("bar"),isCorrectStyleOptions:iie},renderer:{ChartRendererComponent:vz,isCorrectRendererProps:yz}},FKe={dataOptions:{translateDataOptionsToInternal:bz,getAttributes:Qoe,getMeasures:Joe,isCorrectDataOptions:eie,isCorrectDataOptionsInternal:tie},data:{loadData:rz,getChartData:nie},designOptions:{translateStyleOptionsToDesignOptions:FE(rie)("column"),isCorrectStyleOptions:iie},renderer:{ChartRendererComponent:vz,isCorrectRendererProps:yz}},HKe={areamap:nqe,column:FKe,bar:BKe};function h_(e){const t=HKe[e];if(t)return t;throw new Error(`Unsupported chart type: ${e}`)}function f_(e){return["areamap","column","bar"].includes(e)}function fie(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],s=oT(e,a);n(s,a)&&zre(i,my(a,e),s)}return i}function WKe(e,t){return fie(e,t,function(n,r){return aK(e,r)})}var $Ke=lT(function(e,t){return e==null?{}:WKe(e,t)});const UKe=Object.freeze({"area/basic":{lineType:"straight",stackType:"classic"},"area/stacked":{lineType:"straight",stackType:"stacked"},"area/stacked100":{lineType:"straight",stackType:"stack100"},"area/spline":{lineType:"smooth",stackType:"classic"},"area/stackedspline":{lineType:"smooth",stackType:"stacked"},"area/stackedspline100":{lineType:"smooth",stackType:"stack100"},"arearange/basic":{lineType:"straight",stackType:"classic"},"arearange/spline":{lineType:"smooth",stackType:"classic"},"bar/classic":{stackType:"classic"},"bar/stacked":{stackType:"stacked"},"bar/stacked100":{stackType:"stack100"},"column/classic":{stackType:"classic"},"column/stackedcolumn":{stackType:"stacked"},"column/stackedcolumn100":{stackType:"stack100"},"line/basic":{lineType:"straight"},"line/spline":{lineType:"smooth"},"pie/classic":{pieType:"classic"},"pie/donut":{pieType:"donut"},"pie/ring":{pieType:"ring"},"polar/column":{polarType:"column"},"polar/area":{polarType:"area"},"polar/line":{polarType:"line"},"indicator/numeric":{indicatorType:"numeric"},"indicator/gauge":{indicatorType:"gauge"},treemap:{},sunburst:{},"boxplot/full":{boxplotType:"full"},"boxplot/hollow":{boxplotType:"hollow"},scattermap:{},"areamap/world":{mapType:"world"},"areamap/usa":{mapType:"usa"}});function YKe(e){let t;switch(e.subtype){case"indicator/numeric":t=ot({indicatorType:"numeric",numericSubtype:e.numericSubtype},e.numericSubtype==="numericSimple"?{skin:e.skin}:null);break;case"indicator/gauge":t=ot({indicatorType:"gauge",skin:e.skin},e.tickerBarHeight?{tickerBarHeight:e.tickerBarHeight}:null);break}return Nt(ot(ot({},ru),t),{indicatorComponents:e.indicatorComponents||ru.indicatorComponents,forceTickerView:!!e.forceTickerView})}const GKe=(e,t,n)=>{const r="y"in n&&Array.isArray(n.y)?n.y.some(s=>s.showOnRightAxis):!1;let o;switch(e){case"area":o=TXe(t,n,r);break;case"arearange":case"line":o=MXe(t,n,r);break;case"pie":o=PXe(t);break;case"funnel":o=DXe(t);break;case"treemap":o=NXe(t);break;case"sunburst":o=LXe(t);break;case"polar":o=IXe(t,n);break;case"indicator":o=YKe(t);break;case"scatter":o=zXe(t);break;case"boxplot":o=BXe(t);break;case"scattermap":o=HXe(t);break;default:throw new Qt("errors.chartTypeNotSupported",{chartType:e})}const i="subtype"in t&&t.subtype?t.subtype:"line/basic",a=UKe[i];return ot(ot({},o),a)};function VKe(e,t,n){const r=Dy(n??{},Py());if(f_(e)){const o=h_(e);if(!o.designOptions.isCorrectStyleOptions(r))throw new Qt("errors.optionsTranslation.invalidStyleOptions",{chartType:e});if(!o.dataOptions.isCorrectDataOptionsInternal(t))throw new Qt("errors.optionsTranslation.invalidInternalDataOptions",{chartType:e});return o.designOptions.translateStyleOptionsToDesignOptions(r,t)}else return GKe(e,r,t)}function Dy(e,t){return ti.withOptions({mergeArrays:!1},t,e)}function HE(e,t,n){return qKe(e).map(r=>{const o=r.seriesId,i=r.seriesStyleOptions,a=CXe(t,Dy(i,n));return{seriesId:o,designOptions:$Ke(a,["lineWidth","marker"])}}).reduce((r,{seriesId:o,designOptions:i})=>Nt(ot({},r),{[o]:i}),{})}function qKe(e){return e.y.filter(XKe).map(({column:{name:t},seriesStyleOptions:n})=>({seriesId:t,seriesStyleOptions:n}))}function XKe(e){return e.seriesStyleOptions!==void 0}const ZKe=e=>yu(e)?"cartesian":wf(e)?"categorical":uu(e)?"scatter":Sg(e)?"scattermap":Ay(e)?"indicator":J4(e)?"areamap":_f(e)?"boxplot":"table";var KKe=Object.defineProperty,QKe=Object.defineProperties,JKe=Object.getOwnPropertyDescriptors,cM=Object.getOwnPropertySymbols,mie=Object.prototype.hasOwnProperty,gie=Object.prototype.propertyIsEnumerable,rc=Math.pow,fY=(e,t,n)=>t in e?KKe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Lt=(e,t)=>{for(var n in t||(t={}))mie.call(t,n)&&fY(e,n,t[n]);if(cM)for(var n of cM(t))gie.call(t,n)&&fY(e,n,t[n]);return e},an=(e,t)=>QKe(e,JKe(t)),m_=(e,t)=>{var n={};for(var r in e)mie.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&cM)for(var r of cM(e))t.indexOf(r)<0&&gie.call(e,r)&&(n[r]=e[r]);return n},bu=(e,t,n)=>new Promise((r,o)=>{var i=l=>{try{s(n.next(l))}catch(c){o(c)}},a=l=>{try{s(n.throw(l))}catch(c){o(c)}},s=l=>l.done?r(l.value):Promise.resolve(l.value).then(i,a);s((n=n.apply(e,t)).next())});function eQe(e){let{i18n:t,defaultNS:n,children:r}=e;const o=bt(()=>({i18n:t,defaultNS:n}),[t,n]);return hn(EZ.Provider,{value:o},r)}function of(e){return e===void 0||typeof e=="string"||"title"in e&&"type"in e}const ks={BOX_MIN_VALUE_NAME:"Box Min",BOX_MEDIAN_VALUE_NAME:"Box Median",BOX_MAX_VALUE_NAME:"Box Max",WHISKER_MIN_VALUE_NAME:"Whisker Min",WHISKER_MAX_VALUE_NAME:"Whisker Max",OUTLIER_COUNT_VALUE_NAME:"Outlier Count",OUTLIER_MIN_VALUE_NAME:"Outlier Min",OUTLIER_MAX_VALUE_NAME:"Outlier Max"};function wz(e){return[_s(ks.BOX_MIN_VALUE_NAME,"QUARTILE([Attr], 1)",{Attr:e}),_s(ks.BOX_MEDIAN_VALUE_NAME,"MEDIAN([Attr])",{Attr:e}),_s(ks.BOX_MAX_VALUE_NAME,"QUARTILE([Attr], 3)",{Attr:e})]}function tQe(e){return[...wz(e),_s(ks.WHISKER_MIN_VALUE_NAME,"LOWERWHISKERMAX_IQR([Attr])",{Attr:e}),_s(ks.WHISKER_MAX_VALUE_NAME,"UPPERWHISKERMIN_IQR([Attr])",{Attr:e}),_s(ks.OUTLIER_COUNT_VALUE_NAME,"OUTLIERSCOUNT_IQR([Attr])",{Attr:e})]}function nQe(e){return[...wz(e),_s(ks.WHISKER_MIN_VALUE_NAME,"MIN([Attr])",{Attr:e}),_s(ks.WHISKER_MAX_VALUE_NAME,"MAX([Attr])",{Attr:e})]}function rQe(e){return[...wz(e),_s(ks.WHISKER_MIN_VALUE_NAME,"LOWERWHISKERMAX_STDEVP([Attr])",{Attr:e}),_s(ks.WHISKER_MAX_VALUE_NAME,"UPPERWHISKERMIN_STDEVP([Attr])",{Attr:e}),_s(ks.OUTLIER_COUNT_VALUE_NAME,"OUTLIERSCOUNT_STDEVP([Attr])",{Attr:e})]}const oQe=e=>{const t=Ha(e),n=_s(ks.OUTLIER_MAX_VALUE_NAME,"(UPPERWHISKERMIN_IQR([Attr]), all([Attr]))",{Attr:e}),r=_s(ks.OUTLIER_MIN_VALUE_NAME,"(LOWERWHISKERMAX_IQR([Attr]), all([Attr]))",{Attr:e});return t.name=`${t.name} (Outliers)`,t.jaql=o=>{const i=Object.assign(Object.assign({},e.jaql(!0)),{filter:{or:[{fromNotEqual:n.jaql(!0)},{toNotEqual:r.jaql(!0)}]}});return o?i:{jaql:i}},t},iQe=e=>{const t=Ha(e),n=_s(ks.OUTLIER_MAX_VALUE_NAME,"(UPPERWHISKERMIN_STDEVP([Attr]), all([Attr]))",{Attr:e}),r=_s(ks.OUTLIER_MIN_VALUE_NAME,"(LOWERWHISKERMAX_STDEVP([Attr]), all([Attr]))",{Attr:e});return t.jaql=o=>{const i=Object.assign(Object.assign({},e.jaql(!0)),{filter:{or:[{fromNotEqual:n.jaql(!0)},{toNotEqual:r.jaql(!0)}]}});return o?i:{jaql:i}},t};function Rp(e){return!!e&&"operator"in e&&(e.operator==="AND"||e.operator==="OR")&&!!e.right&&!!e.left}function kC(e=[],t=[]){if(!Rp(e)&&!Rp(t))return Hs(e,t);const{filters:n,relations:r}=pu(e),o=vie(t),i=Hs(n,o),a=iu(n,r,i);return ml(i,a)}function pu(e){if(!e)return{filters:[],relations:null};if(Co(e))return{filters:e,relations:null};const t=new Set;function n(o){if(yie(o))return t.add(o),{instanceid:o.config.guid};if(Rp(o)){const i=n(o.left),a=n(o.right);return{left:i,right:a,operator:o.operator}}throw new UE}const r=n(e);return{filters:Array.from(t),relations:r}}function vie(e){return e?pu(e).filters:[]}function ml(e,t){if(!t||_z(t))return e;const n=r(t);return yie(n)?[n]:n;function r(o){if(WE(o))return e.find(i=>i.config.guid===o.instanceid);if($E(o))return{left:r(o.left),right:r(o.right),operator:o.operator};throw new UE}}function _z(e){return!!e&&"instanceid"in e}function iu(e,t,n){if(t===null)return null;const r=sQe(e,n);return r.length===0?t:r.reduce((o,i)=>{switch(i.type){case"add":return lQe(i.payload,o);case"remove":return q5(i.payload,o)}},t)}function mY(e,t){return e.config.guid===t.config.guid}function aQe(e,t,n){if(!e)return null;return r(e);function r(o){if(WE(o))return o.instanceid===t.config.guid?{instanceid:n.config.guid}:o;if($E(o))return{left:r(o.left),right:r(o.right),operator:o.operator};throw new UE}}function sQe(e,t){const n=[],r=[...e],o=[...t];return r.forEach(i=>{o.some(a=>mY(i,a))||n.push({type:"remove",payload:i})}),o.forEach(i=>{r.some(a=>mY(i,a))||n.push({type:"add",payload:i})}),n}function lQe(e,t){return t?{left:t,right:{instanceid:e.config.guid},operator:"AND"}:{instanceid:e.config.guid}}function q5(e,t){if(!t)return null;if(_z(t))return t.instanceid===e.config.guid?null:t;const n=q5(e,t.left),r=q5(e,t.right);return n===null&&r?r:r===null&&n?n:n===null&&r===null?null:{left:n,right:r,operator:t.operator}}function cQe(e,t){if(!e)return null;function n(r){if(uQe(r))return{instanceid:r.instanceId};if(dQe(r))return n(r.value);if(pQe(r))return{operator:r.operator,left:n(r.left),right:n(r.right)};if(hQe(r)){const o=t.find(i=>{if(!Na(i))return!1;const a=i.filters.map(s=>s.config.guid);return r.levels.every(s=>a.includes(s.instanceId))});if(o)return{instanceid:o.config.guid};throw new Error("Broken filter relations model. Cascading filter not found.")}throw new Error("Broken filter relations model. Unknown node type.")}return n(e)}function uQe(e){return"instanceId"in e}function dQe(e){return"value"in e}function pQe(e){return"operator"in e}function hQe(e){return"levels"in e&&Co(e.levels)}function WE(e){return"instanceid"in e}function $E(e){return"operator"in e}function yie(e){return"config"in e&&"guid"in e.config}function fQe(e,t){if(!e)return;function n(r){if(WE(r)){const o=t.find(i=>i.config.guid===r.instanceid);return o&&Na(o)?{type:"CascadingIdentifier",levels:o.filters.map(i=>({type:"Identifier",instanceId:i.config.guid}))}:{type:"Identifier",instanceId:r.instanceid}}else{if($E(r))return{type:"LogicalExpression",operator:r.operator,left:n(r.left),right:n(r.right)};throw new Error("Unknown node type in filter relations rules.")}}return n(e)}function mQe(e,t){return e.find(n=>n.config.guid===t)}class UE extends Error{constructor(){super("Broken filter relations. Unknown node type.")}}function X5(e){return e.nodeType==="openBracket"}function Z5(e){return e.nodeType==="closeBracket"}function gQe(e){return e.nodeType==="attribute"}function vQe(e){return e.nodeType==="operator"}function nw(e){if(Na(e))return e.filters.map(nw).join("-");const{attribute:t}=e,n=e.jaql().jaql,r=t.expression||n.dim,o=t.granularity||((n==null?void 0:n.datatype)==="datetime"?di.translateJaqlToGranularity(n):"");return`${r}${o}`}function Hs(e=[],t=[]){const n=[...e];return t.forEach(r=>{const o=n.findIndex(i=>nw(r)===nw(i));o!==-1?n[o]=r:n.push(r)}),n}function yQe(e){if(!e)return e;const t=Ha(e);function n(r){if("instanceId"in r)return{instanceid:r.instanceId};if("value"in r)return n(r.value);if("operator"in r){const o={operator:r.operator};return"left"in r&&(o.left=n(r.left)),"right"in r&&(o.right=n(r.right)),o}return r}return n(t)}function bQe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function K5(e,t){return K5=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},K5(e,t)}function xQe(e,t){if($v(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if($v(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function wQe(e){var t=xQe(e,"string");return $v(t)=="symbol"?t:t+""}function _Qe(e,t,n){return t=wQe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ah={none:"None",small:"Small",medium:"Medium",large:"Large",left:"Left",center:"Center",right:"Right",light:"Light",dark:"Dark"};function bie(e,t,n){const r={chart:{textColor:e.dashboards.widgetTextColor,backgroundColor:e.dashboards.widgetBackgroundColor,secondaryTextColor:e.dashboards.widgetSecondaryTextColor,panelBackgroundColor:e.dashboards.widgetBackgroundColor,animation:{init:{duration:"auto"},redraw:{duration:"auto"}}},typography:{fontFamily:e.typography.fontFamily,primaryTextColor:e.typography.primaryTextColor,secondaryTextColor:e.typography.secondaryTextColor,fontsLoader:{fonts:SQe(e.typography.fontFamily,n,e.typography.customFontSelected)}},palette:{variantColors:t.colors},general:{brandColor:e.general.brandColor,backgroundColor:e.general.backgroundColor,primaryButtonTextColor:e.general.primaryButtonTextColor,primaryButtonHoverColor:e.general.primaryButtonHoverColor,popover:Gx().general.popover,buttons:{cancel:{backgroundColor:{default:e.general.secondaryButtonBaseColor,hover:e.general.secondaryButtonHoverColor,focus:e.general.secondaryButtonHoverColor},textColor:e.general.secondaryButtonTextColor}}},widget:{spaceAround:Ah[e.dashboards.widgetSpacing],cornerRadius:Ah[e.dashboards.widgetCornerRadius],shadow:Ah[e.dashboards.widgetShadow],border:e.dashboards.widgetBorderEnabled,borderColor:e.dashboards.widgetBorderColor,header:{titleTextColor:e.dashboards.widgetTitleColor,titleAlignment:Ah[e.dashboards.widgetTitleAlignment],dividerLine:e.dashboards.widgetTitleDividerEnabled,dividerLineColor:e.dashboards.widgetTitleDividerColor,backgroundColor:e.dashboards.widgetTitleBackgroundColor}},dashboard:{backgroundColor:e.dashboards.layoutBackgroundColor,dividerLineWidth:F4,dividerLineColor:B4},filter:{panel:{titleColor:e.dashboards.panelTitleTextColor,backgroundColor:e.dashboards.panelBackgroundColor}}};return ti.withOptions({mergeArrays:!1},Gx(),r)}function xie(e){return e.dashboards.colorPaletteName}function SQe(e,t,n){const r=n?"fonts/":"resources/base/fonts/";return[{fontFamily:e,fontWeight:"normal",fontStyle:"normal",src:[{url:`${t}${r}${e}-Regular.eot`},{local:`${e}-Regular`},{url:`${t}${r}${e}-Regular.eot?#iefix`,format:"embedded-opentype"},{url:`${t}${r}${e}-Regular.ttf`,format:"truetype"}]},{fontFamily:e,fontWeight:600,fontStyle:"normal",src:[{url:`${t}${r}${e}-SemiBold.eot`},{local:`${e}-SemiBold`},{url:`${t}${r}${e}-SemiBold.eot?#iefix`,format:"embedded-opentype"},{url:`${t}${r}${e}-SemiBold.ttf`,format:"truetype"}]},{fontFamily:e,fontWeight:"bold",fontStyle:"normal",src:[{url:`${t}${r}${e}-Bold.eot`},{local:`${e}-Bold`},{url:`${t}${r}${e}-Bold.eot?#iefix`,format:"embedded-opentype"},{url:`${t}${r}${e}-Bold.ttf`,format:"truetype"}]}]}function wie(e,t){return bu(this,null,function*(){const n=yield kQe(e,t);if(!n)throw new Qt("errors.themeNotFound",{themeOid:e});const r=xie(n),o=yield _ie(r,t);return bie(n,o,t.url)})}function kQe(e,t){return bu(this,null,function*(){return t.get(`api/v1/themes/${e}`).catch(()=>{throw new Qt("errors.themeNotFound",{themeOid:e})})})}function _ie(e,t){return bu(this,null,function*(){const n=yield t.get(`api/palettes/${e}`);if(n&&"status"in n&&n.status==="error")throw new Qt("errors.paletteNotFound",{paletteName:e});return n})}const CQe={sdkComponentInit:{internal:!0,external:!0},sdkHookInit:{internal:!0,external:!0},sdkError:{internal:!0,external:!1},sdkCliExec:{internal:!0,external:!1},sdkAngularServiceMethodExecuted:{internal:!0,external:!0}},gY="composesdk",Sie=(e,t,n,r=!1)=>{const o=Object.assign({action:e,cat:gY,eventType:"product",direct:!0},t);return r&&(process.env.NODE_ENV==="development"||process.env.NODE_ENV==="test")?(console.debug("DEBUG: event payload to send",o),Promise.resolve()):n.post("api/activities/",[o],{cache:"no-store",redirect:"error",referrerPolicy:"same-origin",priority:"low"}).catch(i=>{console.error(`unable to log action=${e}, category=${gY}`,i)})},vY=(e,t,n,r,o)=>{const i=CQe[`${e}`];return i.internal&&Sie(e,t,n,o),i.external&&r&&r(Lt({action:e},t)),Promise.resolve()},Sz=()=>{const{tracking:e,app:t}=Er(),n=ct((o,i={},a=!1)=>t?vY(o,i,t.httpClient,e.onTrackingEvent,a):Promise.resolve(),[e,t]),r=ct((o,i=!1)=>{if(!t)return Promise.resolve();const{packageName:a,packageVersion:s,component:l,error:c}=o;let d="";return typeof c=="string"?d=c:c instanceof Error&&(d=c.message||c.toString()),vY("sdkError",{packageName:a,packageVersion:s,component:l,error:d},t.httpClient,e.onTrackingEvent,i)},[e,t]);return{trackEvent:n,trackError:r}},MQe="sdkComponentInit",kie=rr(!1),TQe=({skipNested:e=!0,children:t})=>ke(kie.Provider,{value:e,children:t}),EQe=(e,t)=>{const{tracking:n,app:r}=Er(),{trackEvent:o}=Sz(),i=Nn(kie),a=pt(!1);xt(()=>{if(!(!n||!r)&&!a.current&&!i){const s={packageName:n.packageName,packageVersion:"1.34.0",componentName:e,attributesUsed:Object.entries(t).filter(([,l])=>!!l).map(([l])=>l).join(", ")};o(MQe,s,!n.enabled).finally(()=>a.current=!0)}},[e,t,n,i,o,r])};var AQe="[object Boolean]";function Cie(e){return e===!0||e===!1||Cs(e)&&vu(e)==AQe}const Mie=class extends sr{constructor(e){super(e),this.postponedErrors=[],this.handler=e.handler,this.componentName=e.componentName}componentDidMount(){var e;this.context.isInitialized&&(this.httpClient=(e=this.context.app)==null?void 0:e.httpClient)}componentDidCatch(e){throw this.context.tracking.enabled&&(this.httpClient?this.sendErrorTracking(e):this.postponedErrors.push(e)),e}sendErrorTracking(e){try{this.handler({packageName:"sdk-ui",packageVersion:"1.34.0",component:this.componentName,error:e})}catch(t){console.log("Failed to send tracking error event: ",t)}}render(){return this.httpClient&&this.postponedErrors.length>0&&this.postponedErrors.forEach(e=>this.sendErrorTracking(e)),this.postponedErrors=[],this.props.children}};Mie.contextType=U4;let OQe=Mie;const PQe=({componentName:e,config:t})=>{const{skip:n,transparent:r}=t||{};return o=>function(i){const{trackError:a}=Sz();return Cie(n)&&n||Tp(n)&&n(i)?ke(o,Lt({},i)):(EQe(e,i),ke(TQe,{skipNested:!r,children:ke(OQe,{componentName:e,handler:a,children:ke(o,Lt({},i))})}))}},DQe="_container_1wquj_1",NQe="_card_1wquj_11",LQe="_text_1wquj_19",XD={container:DQe,card:NQe,text:LQe};function Tie({color:e="#FFCB05"}){return ke("svg",{width:"53px",height:"53px",viewBox:"0 0 53 53",children:ke("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:Pt("g",{children:[ke("polygon",{points:"26.4996 -0.000100000005 -0.000400000001 26.5009 26.4996 52.9999 53.0006 26.5009",fill:e}),ke("path",{d:"M24.5,39.054 L24.5,35.054 L28.5,35.054 L28.5,39.054 L24.5,39.054 Z M28.5,31.0536 L24.5,31.0536 L23.5,13.0536 L29.5,13.0536 L28.5,31.0536 Z",fill:"#FFFFFF"})]})})})}const Eie=({error:e=new Qt("errors.componentRenderError")})=>{var t,n,r,o,i,a;const{themeSettings:s}=mn(),{app:l}=Er(),{t:c}=Fn(),[d,p]=ut(!1),u=()=>{p(!0)},k=()=>{p(!1)},v=ke("div",{className:"csdk-flex csdk-justify-center csdk-mb-[10px]",children:ke(Tie,{color:(t=s==null?void 0:s.general)==null?void 0:t.brandColor})}),h=e instanceof Mw?c(e.key,Lt({},e.interpolationOptions)):c(e instanceof Error?e.message:e),C=c("errorBoxText",{errorMessage:h,interpolation:{escapeValue:!1}}),R=(r=(n=l==null?void 0:l.settings)==null?void 0:n.errorBoundaryConfig)==null?void 0:r.alwaysShowErrorText;return ke("div",{onMouseEnter:R?void 0:u,onMouseLeave:R?void 0:k,className:XD.container,"aria-label":"error-box",children:Pt("div",{className:XD.card,style:{backgroundColor:((o=s==null?void 0:s.general)==null?void 0:o.backgroundColor)||"rgba(255,255,255,0.5)"},children:[v,(R||d)&&ke("div",{className:XD.text,style:{color:((i=s==null?void 0:s.typography)==null?void 0:i.primaryTextColor)||ma,fontFamily:((a=s==null?void 0:s.typography)==null?void 0:a.fontFamily)||"inherit"},children:C})]})})};let Q5=class extends sr{constructor(e){var t;super(e),this.showErrorBox=!0,this.showErrorBox=(t=e.showErrorBox)!=null?t:!0,this.onError=e.onError,this.isContainerComponent=e.isContainerComponent||!1,this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e){var t;this.setState({error:e}),(t=this.onError)==null||t.call(this,e instanceof Error?e:new Error(e))}componentDidUpdate(e,t){t.error!==null&&RQe(e.resetKeys,this.props.resetKeys)&&this.setState({error:null})}render(){const e=this.state.error||this.props.error;return!e||this.isContainerComponent&&!this.showErrorBox?this.props.children:this.showErrorBox?ke(Eie,{error:e}):null}};function RQe(e=[],t=[]){return e.length!==t.length||e.some((n,r)=>!Zs(n,t[r]))}const Aie=({componentName:e})=>t=>function(n){const r=Er(),o=i=>{var a,s;return(s=(a=r.errorBoundary).onError)==null?void 0:s.call(a,i,{componentName:e,componentProps:n})};return ke(Q5,{resetKeys:Object.values(n),showErrorBox:r.errorBoundary.showErrorBox,onError:o,isContainerComponent:!!(n!=null&&n.children),children:ke(t,Lt({},n))})},YE=({color:e})=>{const t={backgroundColor:e||"#333333",float:"left",width:"10px",height:"10px",marginRight:"7px",WebkitAnimation:"loading-dots-animation 1.8s infinite ease-in-out",animation:"loading-dots-animation 1.8s infinite ease-in-out",borderRadius:"50%",opacity:.75},n=an(Lt({},t),{WebkitAnimationDelay:"-0.32s",animationDelay:"-0.32s"}),r=an(Lt({},t),{WebkitAnimationDelay:"-0.16s",animationDelay:"-0.16s"}),o=an(Lt({},t),{marginRight:"unset"});return Pt("div",{children:[ke("style",{children:`
|
758
|
+
`)}function uie(e,t){var n=e==null?0:e.length;return!!n&&K4(e,t,0)>-1}var iKe=1,aKe=2,sKe=8,lKe=16,cKe=32,uKe=64,dKe=128,pKe=256,hKe=512,fKe=[["ary",dKe],["bind",iKe],["bindKey",aKe],["curry",sKe],["curryRight",lKe],["flip",hKe],["partial",cKe],["partialRight",uKe],["rearg",pKe]];function mKe(e,t){return zZ(fKe,function(n){var r="_."+n[0];t&n[1]&&!uie(e,r)&&e.push(r)}),e.sort()}function die(e,t,n){var r=t+"";return GI(e,oKe(r,mKe(nKe(r),n)))}var gKe=1,vKe=2,yKe=4,bKe=8,iY=32,aY=64;function pie(e,t,n,r,o,i,a,s,l,c){var d=t&bKe,p=d?a:void 0,u=d?void 0:a,k=d?i:void 0,v=d?void 0:i;t|=d?iY:aY,t&=~(d?aY:iY),t&yKe||(t&=~(gKe|vKe));var h=[e,t,o,k,p,v,u,s,l,c],C=n.apply(void 0,h);return _5(e)&&cie(C,h),C.placeholder=r,die(C,e,t)}function hie(e){var t=e;return t.placeholder}var xKe=Math.min;function wKe(e,t){for(var n=e.length,r=xKe(t.length,n),o=tT(e);r--;){var i=t[r];e[r]=Pw(i,n)?o[i]:void 0}return e}var sY="__lodash_placeholder__";function lM(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n];(a===t||a===sY)&&(e[n]=sY,i[o++]=n)}return i}var _Ke=1,SKe=2,kKe=8,CKe=16,MKe=128,TKe=512;function xz(e,t,n,r,o,i,a,s,l,c){var d=t&MKe,p=t&_Ke,u=t&SKe,k=t&(kKe|CKe),v=t&TKe,h=u?void 0:tw(e);function C(){for(var R=arguments.length,H=Array(R),U=R;U--;)H[U]=arguments[U];if(k)var W=hie(C),A=JZe(H,W);if(r&&(H=sie(H,r,o,k)),i&&(H=lie(H,i,a,k)),R-=A,k&&R<c){var D=lM(H,W);return pie(e,t,xz,C.placeholder,n,H,D,s,l,c-R)}var z=p?n:this,N=u?z[e]:e;return R=H.length,s?H=wKe(H,s):v&&R>1&&H.reverse(),d&&l<R&&(H.length=l),this&&this!==is&&this instanceof C&&(N=h||tw(N)),N.apply(z,H)}return C}function EKe(e,t,n){var r=tw(e);function o(){for(var i=arguments.length,a=Array(i),s=i,l=hie(o);s--;)a[s]=arguments[s];var c=i<3&&a[0]!==l&&a[i-1]!==l?[]:lM(a,l);if(i-=c.length,i<n)return pie(e,t,xz,o.placeholder,void 0,a,c,void 0,void 0,n-i);var d=this&&this!==is&&this instanceof o?r:e;return aT(d,this,a)}return o}var AKe=1;function OKe(e,t,n,r){var o=t&AKe,i=tw(e);function a(){for(var s=-1,l=arguments.length,c=-1,d=r.length,p=Array(d+l),u=this&&this!==is&&this instanceof a?i:e;++c<d;)p[c]=r[c];for(;l--;)p[c++]=arguments[++s];return aT(u,o?n:this,p)}return a}var lY="__lodash_placeholder__",YD=1,PKe=2,DKe=4,cY=8,i1=128,uY=256,NKe=Math.min;function LKe(e,t){var n=e[1],r=t[1],o=n|r,i=o<(YD|PKe|i1),a=r==i1&&n==cY||r==i1&&n==uY&&e[7].length<=t[8]||r==(i1|uY)&&t[7].length<=t[8]&&n==cY;if(!(i||a))return e;r&YD&&(e[2]=t[2],o|=n&YD?0:DKe);var s=t[3];if(s){var l=e[3];e[3]=l?sie(l,s,t[4]):s,e[4]=l?lM(e[3],lY):t[4]}return s=t[5],s&&(l=e[5],e[5]=l?lie(l,s,t[6]):s,e[6]=l?lM(e[5],lY):t[6]),s=t[7],s&&(e[7]=s),r&i1&&(e[8]=e[8]==null?t[8]:NKe(e[8],t[8])),e[9]==null&&(e[9]=t[9]),e[0]=t[0],e[1]=o,e}var RKe="Expected a function",dY=1,IKe=2,GD=8,VD=16,qD=32,pY=64,hY=Math.max;function jKe(e,t,n,r,o,i,a,s){var l=t&IKe;if(!l&&typeof e!="function")throw new TypeError(RKe);var c=r?r.length:0;if(c||(t&=~(qD|pY),r=o=void 0),a=a===void 0?a:hY(S5(a),0),s=s===void 0?s:S5(s),c-=o?o.length:0,t&pY){var d=r,p=o;r=o=void 0}var u=l?void 0:$4(e),k=[e,t,n,r,o,d,p,i,a,s];if(u&&LKe(k,u),e=k[0],t=k[1],n=k[2],r=k[3],o=k[4],s=k[9]=k[9]===void 0?l?0:e.length:hY(k[9]-c,0),!s&&t&(GD|VD)&&(t&=~(GD|VD)),!t||t==dY)var v=ZZe(e,t,n);else t==GD||t==VD?v=EKe(e,t,s):(t==qD||t==(dY|qD))&&!o.length?v=OKe(e,t,n,r):v=xz.apply(void 0,k);var h=u?aie:cie;return die(h(v,k),e,t)}var zKe=8;function FE(e,t,n){t=n?void 0:t;var r=jKe(e,zKe,void 0,void 0,void 0,void 0,void 0,t);return r.placeholder=FE.placeholder,r}FE.placeholder={};const BKe={dataOptions:{translateDataOptionsToInternal:bz,getAttributes:Qoe,getMeasures:Joe,isCorrectDataOptions:eie,isCorrectDataOptionsInternal:tie},data:{loadData:rz,getChartData:nie},designOptions:{translateStyleOptionsToDesignOptions:FE(rie)("bar"),isCorrectStyleOptions:iie},renderer:{ChartRendererComponent:vz,isCorrectRendererProps:yz}},FKe={dataOptions:{translateDataOptionsToInternal:bz,getAttributes:Qoe,getMeasures:Joe,isCorrectDataOptions:eie,isCorrectDataOptionsInternal:tie},data:{loadData:rz,getChartData:nie},designOptions:{translateStyleOptionsToDesignOptions:FE(rie)("column"),isCorrectStyleOptions:iie},renderer:{ChartRendererComponent:vz,isCorrectRendererProps:yz}},HKe={areamap:nqe,column:FKe,bar:BKe};function h_(e){const t=HKe[e];if(t)return t;throw new Error(`Unsupported chart type: ${e}`)}function f_(e){return["areamap","column","bar"].includes(e)}function fie(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],s=oT(e,a);n(s,a)&&zre(i,my(a,e),s)}return i}function WKe(e,t){return fie(e,t,function(n,r){return aK(e,r)})}var $Ke=lT(function(e,t){return e==null?{}:WKe(e,t)});const UKe=Object.freeze({"area/basic":{lineType:"straight",stackType:"classic"},"area/stacked":{lineType:"straight",stackType:"stacked"},"area/stacked100":{lineType:"straight",stackType:"stack100"},"area/spline":{lineType:"smooth",stackType:"classic"},"area/stackedspline":{lineType:"smooth",stackType:"stacked"},"area/stackedspline100":{lineType:"smooth",stackType:"stack100"},"arearange/basic":{lineType:"straight",stackType:"classic"},"arearange/spline":{lineType:"smooth",stackType:"classic"},"bar/classic":{stackType:"classic"},"bar/stacked":{stackType:"stacked"},"bar/stacked100":{stackType:"stack100"},"column/classic":{stackType:"classic"},"column/stackedcolumn":{stackType:"stacked"},"column/stackedcolumn100":{stackType:"stack100"},"line/basic":{lineType:"straight"},"line/spline":{lineType:"smooth"},"pie/classic":{pieType:"classic"},"pie/donut":{pieType:"donut"},"pie/ring":{pieType:"ring"},"polar/column":{polarType:"column"},"polar/area":{polarType:"area"},"polar/line":{polarType:"line"},"indicator/numeric":{indicatorType:"numeric"},"indicator/gauge":{indicatorType:"gauge"},treemap:{},sunburst:{},"boxplot/full":{boxplotType:"full"},"boxplot/hollow":{boxplotType:"hollow"},scattermap:{},"areamap/world":{mapType:"world"},"areamap/usa":{mapType:"usa"}});function YKe(e){let t;switch(e.subtype){case"indicator/numeric":t=ot({indicatorType:"numeric",numericSubtype:e.numericSubtype},e.numericSubtype==="numericSimple"?{skin:e.skin}:null);break;case"indicator/gauge":t=ot({indicatorType:"gauge",skin:e.skin},e.tickerBarHeight?{tickerBarHeight:e.tickerBarHeight}:null);break}return Nt(ot(ot({},ru),t),{indicatorComponents:e.indicatorComponents||ru.indicatorComponents,forceTickerView:!!e.forceTickerView})}const GKe=(e,t,n)=>{const r="y"in n&&Array.isArray(n.y)?n.y.some(s=>s.showOnRightAxis):!1;let o;switch(e){case"area":o=TXe(t,n,r);break;case"arearange":case"line":o=MXe(t,n,r);break;case"pie":o=PXe(t);break;case"funnel":o=DXe(t);break;case"treemap":o=NXe(t);break;case"sunburst":o=LXe(t);break;case"polar":o=IXe(t,n);break;case"indicator":o=YKe(t);break;case"scatter":o=zXe(t);break;case"boxplot":o=BXe(t);break;case"scattermap":o=HXe(t);break;default:throw new Qt("errors.chartTypeNotSupported",{chartType:e})}const i="subtype"in t&&t.subtype?t.subtype:"line/basic",a=UKe[i];return ot(ot({},o),a)};function VKe(e,t,n){const r=Dy(n??{},Py());if(f_(e)){const o=h_(e);if(!o.designOptions.isCorrectStyleOptions(r))throw new Qt("errors.optionsTranslation.invalidStyleOptions",{chartType:e});if(!o.dataOptions.isCorrectDataOptionsInternal(t))throw new Qt("errors.optionsTranslation.invalidInternalDataOptions",{chartType:e});return o.designOptions.translateStyleOptionsToDesignOptions(r,t)}else return GKe(e,r,t)}function Dy(e,t){return ti.withOptions({mergeArrays:!1},t,e)}function HE(e,t,n){return qKe(e).map(r=>{const o=r.seriesId,i=r.seriesStyleOptions,a=CXe(t,Dy(i,n));return{seriesId:o,designOptions:$Ke(a,["lineWidth","marker"])}}).reduce((r,{seriesId:o,designOptions:i})=>Nt(ot({},r),{[o]:i}),{})}function qKe(e){return e.y.filter(XKe).map(({column:{name:t},seriesStyleOptions:n})=>({seriesId:t,seriesStyleOptions:n}))}function XKe(e){return e.seriesStyleOptions!==void 0}const ZKe=e=>yu(e)?"cartesian":wf(e)?"categorical":uu(e)?"scatter":Sg(e)?"scattermap":Ay(e)?"indicator":J4(e)?"areamap":_f(e)?"boxplot":"table";var KKe=Object.defineProperty,QKe=Object.defineProperties,JKe=Object.getOwnPropertyDescriptors,cM=Object.getOwnPropertySymbols,mie=Object.prototype.hasOwnProperty,gie=Object.prototype.propertyIsEnumerable,rc=Math.pow,fY=(e,t,n)=>t in e?KKe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Lt=(e,t)=>{for(var n in t||(t={}))mie.call(t,n)&&fY(e,n,t[n]);if(cM)for(var n of cM(t))gie.call(t,n)&&fY(e,n,t[n]);return e},an=(e,t)=>QKe(e,JKe(t)),m_=(e,t)=>{var n={};for(var r in e)mie.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&cM)for(var r of cM(e))t.indexOf(r)<0&&gie.call(e,r)&&(n[r]=e[r]);return n},bu=(e,t,n)=>new Promise((r,o)=>{var i=l=>{try{s(n.next(l))}catch(c){o(c)}},a=l=>{try{s(n.throw(l))}catch(c){o(c)}},s=l=>l.done?r(l.value):Promise.resolve(l.value).then(i,a);s((n=n.apply(e,t)).next())});function eQe(e){let{i18n:t,defaultNS:n,children:r}=e;const o=bt(()=>({i18n:t,defaultNS:n}),[t,n]);return hn(EZ.Provider,{value:o},r)}function of(e){return e===void 0||typeof e=="string"||"title"in e&&"type"in e}const ks={BOX_MIN_VALUE_NAME:"Box Min",BOX_MEDIAN_VALUE_NAME:"Box Median",BOX_MAX_VALUE_NAME:"Box Max",WHISKER_MIN_VALUE_NAME:"Whisker Min",WHISKER_MAX_VALUE_NAME:"Whisker Max",OUTLIER_COUNT_VALUE_NAME:"Outlier Count",OUTLIER_MIN_VALUE_NAME:"Outlier Min",OUTLIER_MAX_VALUE_NAME:"Outlier Max"};function wz(e){return[_s(ks.BOX_MIN_VALUE_NAME,"QUARTILE([Attr], 1)",{Attr:e}),_s(ks.BOX_MEDIAN_VALUE_NAME,"MEDIAN([Attr])",{Attr:e}),_s(ks.BOX_MAX_VALUE_NAME,"QUARTILE([Attr], 3)",{Attr:e})]}function tQe(e){return[...wz(e),_s(ks.WHISKER_MIN_VALUE_NAME,"LOWERWHISKERMAX_IQR([Attr])",{Attr:e}),_s(ks.WHISKER_MAX_VALUE_NAME,"UPPERWHISKERMIN_IQR([Attr])",{Attr:e}),_s(ks.OUTLIER_COUNT_VALUE_NAME,"OUTLIERSCOUNT_IQR([Attr])",{Attr:e})]}function nQe(e){return[...wz(e),_s(ks.WHISKER_MIN_VALUE_NAME,"MIN([Attr])",{Attr:e}),_s(ks.WHISKER_MAX_VALUE_NAME,"MAX([Attr])",{Attr:e})]}function rQe(e){return[...wz(e),_s(ks.WHISKER_MIN_VALUE_NAME,"LOWERWHISKERMAX_STDEVP([Attr])",{Attr:e}),_s(ks.WHISKER_MAX_VALUE_NAME,"UPPERWHISKERMIN_STDEVP([Attr])",{Attr:e}),_s(ks.OUTLIER_COUNT_VALUE_NAME,"OUTLIERSCOUNT_STDEVP([Attr])",{Attr:e})]}const oQe=e=>{const t=Ha(e),n=_s(ks.OUTLIER_MAX_VALUE_NAME,"(UPPERWHISKERMIN_IQR([Attr]), all([Attr]))",{Attr:e}),r=_s(ks.OUTLIER_MIN_VALUE_NAME,"(LOWERWHISKERMAX_IQR([Attr]), all([Attr]))",{Attr:e});return t.name=`${t.name} (Outliers)`,t.jaql=o=>{const i=Object.assign(Object.assign({},e.jaql(!0)),{filter:{or:[{fromNotEqual:n.jaql(!0)},{toNotEqual:r.jaql(!0)}]}});return o?i:{jaql:i}},t},iQe=e=>{const t=Ha(e),n=_s(ks.OUTLIER_MAX_VALUE_NAME,"(UPPERWHISKERMIN_STDEVP([Attr]), all([Attr]))",{Attr:e}),r=_s(ks.OUTLIER_MIN_VALUE_NAME,"(LOWERWHISKERMAX_STDEVP([Attr]), all([Attr]))",{Attr:e});return t.jaql=o=>{const i=Object.assign(Object.assign({},e.jaql(!0)),{filter:{or:[{fromNotEqual:n.jaql(!0)},{toNotEqual:r.jaql(!0)}]}});return o?i:{jaql:i}},t};function Rp(e){return!!e&&"operator"in e&&(e.operator==="AND"||e.operator==="OR")&&!!e.right&&!!e.left}function kC(e=[],t=[]){if(!Rp(e)&&!Rp(t))return Hs(e,t);const{filters:n,relations:r}=pu(e),o=vie(t),i=Hs(n,o),a=iu(n,r,i);return ml(i,a)}function pu(e){if(!e)return{filters:[],relations:null};if(Co(e))return{filters:e,relations:null};const t=new Set;function n(o){if(yie(o))return t.add(o),{instanceid:o.config.guid};if(Rp(o)){const i=n(o.left),a=n(o.right);return{left:i,right:a,operator:o.operator}}throw new UE}const r=n(e);return{filters:Array.from(t),relations:r}}function vie(e){return e?pu(e).filters:[]}function ml(e,t){if(!t||_z(t))return e;const n=r(t);return yie(n)?[n]:n;function r(o){if(WE(o))return e.find(i=>i.config.guid===o.instanceid);if($E(o))return{left:r(o.left),right:r(o.right),operator:o.operator};throw new UE}}function _z(e){return!!e&&"instanceid"in e}function iu(e,t,n){if(t===null)return null;const r=sQe(e,n);return r.length===0?t:r.reduce((o,i)=>{switch(i.type){case"add":return lQe(i.payload,o);case"remove":return q5(i.payload,o)}},t)}function mY(e,t){return e.config.guid===t.config.guid}function aQe(e,t,n){if(!e)return null;return r(e);function r(o){if(WE(o))return o.instanceid===t.config.guid?{instanceid:n.config.guid}:o;if($E(o))return{left:r(o.left),right:r(o.right),operator:o.operator};throw new UE}}function sQe(e,t){const n=[],r=[...e],o=[...t];return r.forEach(i=>{o.some(a=>mY(i,a))||n.push({type:"remove",payload:i})}),o.forEach(i=>{r.some(a=>mY(i,a))||n.push({type:"add",payload:i})}),n}function lQe(e,t){return t?{left:t,right:{instanceid:e.config.guid},operator:"AND"}:{instanceid:e.config.guid}}function q5(e,t){if(!t)return null;if(_z(t))return t.instanceid===e.config.guid?null:t;const n=q5(e,t.left),r=q5(e,t.right);return n===null&&r?r:r===null&&n?n:n===null&&r===null?null:{left:n,right:r,operator:t.operator}}function cQe(e,t){if(!e)return null;function n(r){if(uQe(r))return{instanceid:r.instanceId};if(dQe(r))return n(r.value);if(pQe(r))return{operator:r.operator,left:n(r.left),right:n(r.right)};if(hQe(r)){const o=t.find(i=>{if(!Na(i))return!1;const a=i.filters.map(s=>s.config.guid);return r.levels.every(s=>a.includes(s.instanceId))});if(o)return{instanceid:o.config.guid};throw new Error("Broken filter relations model. Cascading filter not found.")}throw new Error("Broken filter relations model. Unknown node type.")}return n(e)}function uQe(e){return"instanceId"in e}function dQe(e){return"value"in e}function pQe(e){return"operator"in e}function hQe(e){return"levels"in e&&Co(e.levels)}function WE(e){return"instanceid"in e}function $E(e){return"operator"in e}function yie(e){return"config"in e&&"guid"in e.config}function fQe(e,t){if(!e)return;function n(r){if(WE(r)){const o=t.find(i=>i.config.guid===r.instanceid);return o&&Na(o)?{type:"CascadingIdentifier",levels:o.filters.map(i=>({type:"Identifier",instanceId:i.config.guid}))}:{type:"Identifier",instanceId:r.instanceid}}else{if($E(r))return{type:"LogicalExpression",operator:r.operator,left:n(r.left),right:n(r.right)};throw new Error("Unknown node type in filter relations rules.")}}return n(e)}function mQe(e,t){return e.find(n=>n.config.guid===t)}class UE extends Error{constructor(){super("Broken filter relations. Unknown node type.")}}function X5(e){return e.nodeType==="openBracket"}function Z5(e){return e.nodeType==="closeBracket"}function gQe(e){return e.nodeType==="attribute"}function vQe(e){return e.nodeType==="operator"}function nw(e){if(Na(e))return e.filters.map(nw).join("-");const{attribute:t}=e,n=e.jaql().jaql,r=t.expression||n.dim,o=t.granularity||((n==null?void 0:n.datatype)==="datetime"?di.translateJaqlToGranularity(n):"");return`${r}${o}`}function Hs(e=[],t=[]){const n=[...e];return t.forEach(r=>{const o=n.findIndex(i=>nw(r)===nw(i));o!==-1?n[o]=r:n.push(r)}),n}function yQe(e){if(!e)return e;const t=Ha(e);function n(r){if("instanceId"in r)return{instanceid:r.instanceId};if("value"in r)return n(r.value);if("operator"in r){const o={operator:r.operator};return"left"in r&&(o.left=n(r.left)),"right"in r&&(o.right=n(r.right)),o}return r}return n(t)}function bQe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function K5(e,t){return K5=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},K5(e,t)}function xQe(e,t){if($v(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if($v(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function wQe(e){var t=xQe(e,"string");return $v(t)=="symbol"?t:t+""}function _Qe(e,t,n){return t=wQe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ah={none:"None",small:"Small",medium:"Medium",large:"Large",left:"Left",center:"Center",right:"Right",light:"Light",dark:"Dark"};function bie(e,t,n){const r={chart:{textColor:e.dashboards.widgetTextColor,backgroundColor:e.dashboards.widgetBackgroundColor,secondaryTextColor:e.dashboards.widgetSecondaryTextColor,panelBackgroundColor:e.dashboards.widgetBackgroundColor,animation:{init:{duration:"auto"},redraw:{duration:"auto"}}},typography:{fontFamily:e.typography.fontFamily,primaryTextColor:e.typography.primaryTextColor,secondaryTextColor:e.typography.secondaryTextColor,fontsLoader:{fonts:SQe(e.typography.fontFamily,n,e.typography.customFontSelected)}},palette:{variantColors:t.colors},general:{brandColor:e.general.brandColor,backgroundColor:e.general.backgroundColor,primaryButtonTextColor:e.general.primaryButtonTextColor,primaryButtonHoverColor:e.general.primaryButtonHoverColor,popover:Gx().general.popover,buttons:{cancel:{backgroundColor:{default:e.general.secondaryButtonBaseColor,hover:e.general.secondaryButtonHoverColor,focus:e.general.secondaryButtonHoverColor},textColor:e.general.secondaryButtonTextColor}}},widget:{spaceAround:Ah[e.dashboards.widgetSpacing],cornerRadius:Ah[e.dashboards.widgetCornerRadius],shadow:Ah[e.dashboards.widgetShadow],border:e.dashboards.widgetBorderEnabled,borderColor:e.dashboards.widgetBorderColor,header:{titleTextColor:e.dashboards.widgetTitleColor,titleAlignment:Ah[e.dashboards.widgetTitleAlignment],dividerLine:e.dashboards.widgetTitleDividerEnabled,dividerLineColor:e.dashboards.widgetTitleDividerColor,backgroundColor:e.dashboards.widgetTitleBackgroundColor}},dashboard:{backgroundColor:e.dashboards.layoutBackgroundColor,dividerLineWidth:F4,dividerLineColor:B4},filter:{panel:{titleColor:e.dashboards.panelTitleTextColor,backgroundColor:e.dashboards.panelBackgroundColor}}};return ti.withOptions({mergeArrays:!1},Gx(),r)}function xie(e){return e.dashboards.colorPaletteName}function SQe(e,t,n){const r=n?"fonts/":"resources/base/fonts/";return[{fontFamily:e,fontWeight:"normal",fontStyle:"normal",src:[{url:`${t}${r}${e}-Regular.eot`},{local:`${e}-Regular`},{url:`${t}${r}${e}-Regular.eot?#iefix`,format:"embedded-opentype"},{url:`${t}${r}${e}-Regular.ttf`,format:"truetype"}]},{fontFamily:e,fontWeight:600,fontStyle:"normal",src:[{url:`${t}${r}${e}-SemiBold.eot`},{local:`${e}-SemiBold`},{url:`${t}${r}${e}-SemiBold.eot?#iefix`,format:"embedded-opentype"},{url:`${t}${r}${e}-SemiBold.ttf`,format:"truetype"}]},{fontFamily:e,fontWeight:"bold",fontStyle:"normal",src:[{url:`${t}${r}${e}-Bold.eot`},{local:`${e}-Bold`},{url:`${t}${r}${e}-Bold.eot?#iefix`,format:"embedded-opentype"},{url:`${t}${r}${e}-Bold.ttf`,format:"truetype"}]}]}function wie(e,t){return bu(this,null,function*(){const n=yield kQe(e,t);if(!n)throw new Qt("errors.themeNotFound",{themeOid:e});const r=xie(n),o=yield _ie(r,t);return bie(n,o,t.url)})}function kQe(e,t){return bu(this,null,function*(){return t.get(`api/v1/themes/${e}`).catch(()=>{throw new Qt("errors.themeNotFound",{themeOid:e})})})}function _ie(e,t){return bu(this,null,function*(){const n=yield t.get(`api/palettes/${e}`);if(n&&"status"in n&&n.status==="error")throw new Qt("errors.paletteNotFound",{paletteName:e});return n})}const CQe={sdkComponentInit:{internal:!0,external:!0},sdkHookInit:{internal:!0,external:!0},sdkError:{internal:!0,external:!1},sdkCliExec:{internal:!0,external:!1},sdkAngularServiceMethodExecuted:{internal:!0,external:!0}},gY="composesdk",Sie=(e,t,n,r=!1)=>{const o=Object.assign({action:e,cat:gY,eventType:"product",direct:!0},t);return r&&(process.env.NODE_ENV==="development"||process.env.NODE_ENV==="test")?(console.debug("DEBUG: event payload to send",o),Promise.resolve()):n.post("api/activities/",[o],{cache:"no-store",redirect:"error",referrerPolicy:"same-origin",priority:"low"}).catch(i=>{console.error(`unable to log action=${e}, category=${gY}`,i)})},vY=(e,t,n,r,o)=>{const i=CQe[`${e}`];return i.internal&&Sie(e,t,n,o),i.external&&r&&r(Lt({action:e},t)),Promise.resolve()},Sz=()=>{const{tracking:e,app:t}=Er(),n=ct((o,i={},a=!1)=>t?vY(o,i,t.httpClient,e.onTrackingEvent,a):Promise.resolve(),[e,t]),r=ct((o,i=!1)=>{if(!t)return Promise.resolve();const{packageName:a,packageVersion:s,component:l,error:c}=o;let d="";return typeof c=="string"?d=c:c instanceof Error&&(d=c.message||c.toString()),vY("sdkError",{packageName:a,packageVersion:s,component:l,error:d},t.httpClient,e.onTrackingEvent,i)},[e,t]);return{trackEvent:n,trackError:r}},MQe="sdkComponentInit",kie=rr(!1),TQe=({skipNested:e=!0,children:t})=>ke(kie.Provider,{value:e,children:t}),EQe=(e,t)=>{const{tracking:n,app:r}=Er(),{trackEvent:o}=Sz(),i=Nn(kie),a=pt(!1);xt(()=>{if(!(!n||!r)&&!a.current&&!i){const s={packageName:n.packageName,packageVersion:"1.35.0",componentName:e,attributesUsed:Object.entries(t).filter(([,l])=>!!l).map(([l])=>l).join(", ")};o(MQe,s,!n.enabled).finally(()=>a.current=!0)}},[e,t,n,i,o,r])};var AQe="[object Boolean]";function Cie(e){return e===!0||e===!1||Cs(e)&&vu(e)==AQe}const Mie=class extends sr{constructor(e){super(e),this.postponedErrors=[],this.handler=e.handler,this.componentName=e.componentName}componentDidMount(){var e;this.context.isInitialized&&(this.httpClient=(e=this.context.app)==null?void 0:e.httpClient)}componentDidCatch(e){throw this.context.tracking.enabled&&(this.httpClient?this.sendErrorTracking(e):this.postponedErrors.push(e)),e}sendErrorTracking(e){try{this.handler({packageName:"sdk-ui",packageVersion:"1.35.0",component:this.componentName,error:e})}catch(t){console.log("Failed to send tracking error event: ",t)}}render(){return this.httpClient&&this.postponedErrors.length>0&&this.postponedErrors.forEach(e=>this.sendErrorTracking(e)),this.postponedErrors=[],this.props.children}};Mie.contextType=U4;let OQe=Mie;const PQe=({componentName:e,config:t})=>{const{skip:n,transparent:r}=t||{};return o=>function(i){const{trackError:a}=Sz();return Cie(n)&&n||Tp(n)&&n(i)?ke(o,Lt({},i)):(EQe(e,i),ke(TQe,{skipNested:!r,children:ke(OQe,{componentName:e,handler:a,children:ke(o,Lt({},i))})}))}},DQe="_container_1wquj_1",NQe="_card_1wquj_11",LQe="_text_1wquj_19",XD={container:DQe,card:NQe,text:LQe};function Tie({color:e="#FFCB05"}){return ke("svg",{width:"53px",height:"53px",viewBox:"0 0 53 53",children:ke("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:Pt("g",{children:[ke("polygon",{points:"26.4996 -0.000100000005 -0.000400000001 26.5009 26.4996 52.9999 53.0006 26.5009",fill:e}),ke("path",{d:"M24.5,39.054 L24.5,35.054 L28.5,35.054 L28.5,39.054 L24.5,39.054 Z M28.5,31.0536 L24.5,31.0536 L23.5,13.0536 L29.5,13.0536 L28.5,31.0536 Z",fill:"#FFFFFF"})]})})})}const Eie=({error:e=new Qt("errors.componentRenderError")})=>{var t,n,r,o,i,a;const{themeSettings:s}=mn(),{app:l}=Er(),{t:c}=Fn(),[d,p]=ut(!1),u=()=>{p(!0)},k=()=>{p(!1)},v=ke("div",{className:"csdk-flex csdk-justify-center csdk-mb-[10px]",children:ke(Tie,{color:(t=s==null?void 0:s.general)==null?void 0:t.brandColor})}),h=e instanceof Mw?c(e.key,Lt({},e.interpolationOptions)):c(e instanceof Error?e.message:e),C=c("errorBoxText",{errorMessage:h,interpolation:{escapeValue:!1}}),R=(r=(n=l==null?void 0:l.settings)==null?void 0:n.errorBoundaryConfig)==null?void 0:r.alwaysShowErrorText;return ke("div",{onMouseEnter:R?void 0:u,onMouseLeave:R?void 0:k,className:XD.container,"aria-label":"error-box",children:Pt("div",{className:XD.card,style:{backgroundColor:((o=s==null?void 0:s.general)==null?void 0:o.backgroundColor)||"rgba(255,255,255,0.5)"},children:[v,(R||d)&&ke("div",{className:XD.text,style:{color:((i=s==null?void 0:s.typography)==null?void 0:i.primaryTextColor)||ma,fontFamily:((a=s==null?void 0:s.typography)==null?void 0:a.fontFamily)||"inherit"},children:C})]})})};let Q5=class extends sr{constructor(e){var t;super(e),this.showErrorBox=!0,this.showErrorBox=(t=e.showErrorBox)!=null?t:!0,this.onError=e.onError,this.isContainerComponent=e.isContainerComponent||!1,this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e){var t;this.setState({error:e}),(t=this.onError)==null||t.call(this,e instanceof Error?e:new Error(e))}componentDidUpdate(e,t){t.error!==null&&RQe(e.resetKeys,this.props.resetKeys)&&this.setState({error:null})}render(){const e=this.state.error||this.props.error;return!e||this.isContainerComponent&&!this.showErrorBox?this.props.children:this.showErrorBox?ke(Eie,{error:e}):null}};function RQe(e=[],t=[]){return e.length!==t.length||e.some((n,r)=>!Zs(n,t[r]))}const Aie=({componentName:e})=>t=>function(n){const r=Er(),o=i=>{var a,s;return(s=(a=r.errorBoundary).onError)==null?void 0:s.call(a,i,{componentName:e,componentProps:n})};return ke(Q5,{resetKeys:Object.values(n),showErrorBox:r.errorBoundary.showErrorBox,onError:o,isContainerComponent:!!(n!=null&&n.children),children:ke(t,Lt({},n))})},YE=({color:e})=>{const t={backgroundColor:e||"#333333",float:"left",width:"10px",height:"10px",marginRight:"7px",WebkitAnimation:"loading-dots-animation 1.8s infinite ease-in-out",animation:"loading-dots-animation 1.8s infinite ease-in-out",borderRadius:"50%",opacity:.75},n=an(Lt({},t),{WebkitAnimationDelay:"-0.32s",animationDelay:"-0.32s"}),r=an(Lt({},t),{WebkitAnimationDelay:"-0.16s",animationDelay:"-0.16s"}),o=an(Lt({},t),{marginRight:"unset"});return Pt("div",{children:[ke("style",{children:`
|
759
759
|
@keyframes loading-dots-animation {
|
760
760
|
${Object.entries({"0%, 80%, 100%":{WebkitTransform:"scale(0) rotate(0deg)",transform:"scale(0) rotate(0deg)"},"40%":{WebkitTransform:"scale(1) rotate(0.02deg)",transform:"scale(1) rotate(0.02deg)"}}).map(([i,a])=>`${i} { ${Object.entries(a).map(([s,l])=>`${s}: ${l};`).join("")} }`).join("")}
|
761
761
|
}
|
@@ -1007,7 +1007,7 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStat
|
|
1007
1007
|
`))},[X,oe,Qe])}const De=gae(O),Be=pt(),Ne=mp(()=>{Be.current!==void 0&&(document.body.style.WebkitUserSelect=Be.current,Be.current=void 0),me.clear()});xt(()=>Ne,[Ne]);const Ae=Qe=>{EV.clear(),Ak=!0,Se(!0),f&&!Pe&&f(Qe)},ye=mp(Qe=>{EV.start(800+P,()=>{Ak=!1}),Se(!1),w&&Pe&&w(Qe),ae.start(K.transitions.duration.shortest,()=>{le.current=!1})}),Ce=Qe=>{le.current&&Qe.type!=="touchstart"||(oe&&oe.removeAttribute("title"),de.clear(),ge.clear(),T||Ak&&Y?de.start(Ak?Y:T,()=>{Ae(Qe)}):Ae(Qe))},Me=Qe=>{de.clear(),ge.start(P,()=>{ye(Qe)})},{isFocusVisibleRef:Le,onBlur:Ue,onFocus:Fe,ref:Ke}=vae(),[,nt]=ut(!1),Je=Qe=>{Ue(Qe),Le.current===!1&&(nt(!1),Me(Qe))},st=Qe=>{oe||ee(Qe.currentTarget),Fe(Qe),Le.current===!0&&(nt(!0),Ce(Qe))},mt=Qe=>{le.current=!0;const jt=Z.props;jt.onTouchStart&&jt.onTouchStart(Qe)},lt=Qe=>{mt(Qe),ge.clear(),ae.clear(),Ne(),Be.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",me.start(V,()=>{document.body.style.WebkitUserSelect=Be.current,Ce(Qe)})},_t=Qe=>{Z.props.onTouchEnd&&Z.props.onTouchEnd(Qe),Ne(),ge.start(S,()=>{ye(Qe)})};xt(()=>{if(!Pe)return;function Qe(jt){(jt.key==="Escape"||jt.key==="Esc")&&ye(jt)}return document.addEventListener("keydown",Qe),()=>{document.removeEventListener("keydown",Qe)}},[ye,Pe]);const Rt=ya(Z.ref,Ke,ee,t);!X&&X!==0&&(Pe=!1);const Tt=pt(),zt=Qe=>{const jt=Z.props;jt.onMouseMove&&jt.onMouseMove(Qe),h1={x:Qe.clientX,y:Qe.clientY},Tt.current&&Tt.current.update()},Ct={},rn=typeof X=="string";E?(Ct.title=!Pe&&rn&&!g?X:null,Ct["aria-describedby"]=Pe?De:null):(Ct["aria-label"]=rn?X:null,Ct["aria-labelledby"]=Pe&&!rn?De:null);const Ft=it({},Ct,G,Z.props,{className:bn(G.className,Z.props.className),onTouchStart:mt,ref:Rt},F?{onMouseMove:zt}:{});process.env.NODE_ENV!=="production"&&(Ft["data-mui-internal-clone-element"]=!0,xt(()=>{oe&&!oe.getAttribute("data-mui-internal-clone-element")&&console.error(["MUI: The `children` component of the Tooltip is not forwarding its props correctly.","Please make sure that props are spread on the same element that the ref is applied to."].join(`
|
1008
1008
|
`))},[oe]));const $t={};_||(Ft.onTouchStart=lt,Ft.onTouchEnd=_t),g||(Ft.onMouseOver=Ok(Ce,Ft.onMouseOver),Ft.onMouseLeave=Ok(Me,Ft.onMouseLeave),se||($t.onMouseOver=Ce,$t.onMouseLeave=Me)),x||(Ft.onFocus=Ok(st,Ft.onFocus),Ft.onBlur=Ok(Je,Ft.onBlur),se||($t.onFocus=st,$t.onBlur=Je)),process.env.NODE_ENV!=="production"&&Z.props.title&&console.error(["MUI: You have provided a `title` prop to the child of <Tooltip />.",`Remove this title prop \`${Z.props.title}\` or the Tooltip component.`].join(`
|
1009
1009
|
`));const wn=bt(()=>{var Qe;let jt=[{name:"arrow",enabled:!!te,options:{element:te,padding:4}}];return(Qe=I.popperOptions)!=null&&Qe.modifiers&&(jt=jt.concat(I.popperOptions.modifiers)),it({},I.popperOptions,{modifiers:jt})},[te,I]),qt=it({},A,{isRtl:re,arrow:D,disableInteractive:se,placement:y,PopperComponentProp:m,touch:le.current}),cn=F1t(qt),Cn=(n=(r=$.popper)!=null?r:N.Popper)!=null?n:H1t,Un=(o=(i=(a=$.transition)!=null?a:N.Transition)!=null?i:Q)!=null?o:aw,Mt=(s=(l=$.tooltip)!=null?l:N.Tooltip)!=null?s:W1t,Wt=(c=(d=$.arrow)!=null?d:N.Arrow)!=null?c:$1t,on=I1(Cn,it({},I,(p=j.popper)!=null?p:B.popper,{className:bn(cn.popper,I==null?void 0:I.className,(u=(k=j.popper)!=null?k:B.popper)==null?void 0:u.className)}),qt),sn=I1(Un,it({},J,(v=j.transition)!=null?v:B.transition),qt),or=I1(Mt,it({},(h=j.tooltip)!=null?h:B.tooltip,{className:bn(cn.tooltip,(C=(R=j.tooltip)!=null?R:B.tooltip)==null?void 0:C.className)}),qt),zn=I1(Wt,it({},(H=j.arrow)!=null?H:B.arrow,{className:bn(cn.arrow,(U=(W=j.arrow)!=null?W:B.arrow)==null?void 0:U.className)}),qt);return je(Tr,{children:[fr(Z,Ft),je(Cn,it({as:m??Ng,placement:y,anchorEl:F?{getBoundingClientRect:()=>({top:h1.y,left:h1.x,right:h1.x,bottom:h1.y,width:0,height:0})}:oe,popperRef:Tt,open:oe?Pe:!1,id:De,transition:!0},$t,on,{popperOptions:wn,children:({TransitionProps:Qe})=>je(Un,it({timeout:K.transitions.duration.shorter},Qe,sn,{children:je(Mt,it({},or,{children:[X,D?je(Wt,it({},zn,{ref:ne})):null]}))}))}))]})});process.env.NODE_ENV!=="production"&&(lf.propTypes={arrow:fe.bool,children:Eg.isRequired,classes:fe.object,className:fe.string,components:fe.shape({Arrow:fe.elementType,Popper:fe.elementType,Tooltip:fe.elementType,Transition:fe.elementType}),componentsProps:fe.shape({arrow:fe.object,popper:fe.object,tooltip:fe.object,transition:fe.object}),describeChild:fe.bool,disableFocusListener:fe.bool,disableHoverListener:fe.bool,disableInteractive:fe.bool,disableTouchListener:fe.bool,enterDelay:fe.number,enterNextDelay:fe.number,enterTouchDelay:fe.number,followCursor:fe.bool,id:fe.string,leaveDelay:fe.number,leaveTouchDelay:fe.number,onClose:fe.func,onOpen:fe.func,open:fe.bool,placement:fe.oneOf(["bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),PopperComponent:fe.elementType,PopperProps:fe.object,slotProps:fe.shape({arrow:fe.object,popper:fe.object,tooltip:fe.object,transition:fe.object}),slots:fe.shape({arrow:fe.elementType,popper:fe.elementType,tooltip:fe.elementType,transition:fe.elementType}),sx:fe.oneOfType([fe.arrayOf(fe.oneOfType([fe.func,fe.object,fe.bool])),fe.func,fe.object]),title:fe.node,TransitionComponent:fe.elementType,TransitionProps:fe.object});const U1t=e=>oi(e)?"right":"left",AV=({displayValue:e,width:t,padding:n,ellipsizedLength:r,isHtml:o})=>{const i=e.length>r;return ke("div",{className:z1.tableCellContent,style:{maxWidth:`${t-n}px`},children:o?ke("div",{dangerouslySetInnerHTML:{__html:e}}):i?ke(lf,{title:e,children:ke("div",{children:e})}):ke("div",{children:e})})},Y1t=({dataTable:e,dataOptions:t,height:n,width:r,customStyles:o,themeSettings:i,onSortUpdate:a})=>{var s,l,c;const d=o&&o.showFieldTypeIcon!==void 0?o.showFieldTypeIcon:!0,p=xle+(d?wle:0),u=(o==null?void 0:o.paddingVertical)||gV,k=(o==null?void 0:o.paddingHorizontal)||gV,v=((s=o==null?void 0:o.columns)==null?void 0:s.width)==="auto"?(r-k*2-1)/t.columns.length:void 0,h=bt(()=>t.columns.map(A=>({isHtml:"isHtml"in A&&!!A.isHtml,width:v})),[t.columns,v]),[C,R]=ut(((l=document.fonts)==null?void 0:l.status)==="loaded"),H=(c=i.typography)==null?void 0:c.fontFamily,U=bt(()=>fbt(e,d,h,H),[e,d,h,H,C]);xt(()=>{var A;(A=document.fonts)==null||A.ready.then(()=>{R(!0)}).catch(D=>{console.warn("Failed to observe font loading",D)})},[]);const W=bt(()=>e.columns.map((A,D)=>{const z=U[D],N=t.columns[D],B=yV({isHeaderCell:!0,themeSettings:i,customStyles:o});return z?ke(Tk.Column,{maxWidth:MR,minWidth:MR,allowCellsRecycling:!0,width:z,header:ke(Tk.Cell,{className:sf(z1.tableHeader),style:B,children:ke(lbt,{column:A,onClick:a,isSelected:!!Math.abs(A.direction),showFieldTypeIcon:d,sortIcon:(o==null?void 0:o.sortIcon)||"standard",children:AV({displayValue:ji(N),width:z,padding:p,ellipsizedLength:pbt})})}),cell:E=>{var x=E,{rowIndex:g}=x,M=m_(x,["rowIndex"]);return ke(Tk.Cell,an(Lt({className:sf(z1.tableCell),style:yV({colIndex:D,rowIndex:g,themeSettings:i,customStyles:o})},M),{children:AV({displayValue:e.rows[g][D].displayValue,width:z,padding:_le,ellipsizedLength:hbt,isHtml:"isHtml"in N&&N.isHtml})}))},align:U1t(A.type)},`col${D}`):null}),[e,U,i,o,a,d,t,p]);return bt(()=>ke("div",{className:z1.tableWrapper,style:{padding:`${u}px ${k}px`},children:ke(Tk.Table,{className:z1.table,rowHeight:(o==null?void 0:o.rowHeight)||ubt,rowsCount:e.rows.length,width:r-k*2,height:n-u*2,headerHeight:(o==null?void 0:o.headerHeight)||cbt,children:W})}),[W,o,e,n,k,u,r])},G1t="_component_1rw9b_1",V1t={component:G1t},q1t=(e,t)=>{if(!e.columns.some(o=>oi(o.type)))return e;const n=e.columns,r=e.rows.map(o=>o.map((i,a)=>{const s=n[a].type,l=Uo(t.columns[a].numberFormatConfig);if(oi(s)){const c=qv(i.displayValue,s);return{displayValue:hi(l,c.value),compareValue:c}}else return i}));return{columns:n,rows:r}},X1t=({dataTable:e,dataOptions:t,designOptions:n={},onSortUpdate:r,themeSettings:o,width:i=400,height:a=500})=>{const s=pt(null),l=pt(e),c=bt(()=>q1t(e,t),[e,t]);Fi(()=>{l.current=e},[e]);const d=bt(()=>Lt({sortIcon:"caret",showFieldTypeIcon:!1},n),[n]);return ke("div",{className:V1t.component,ref:s,children:ke(Y1t,{dataTable:c,dataOptions:t,onSortUpdate:r,height:a,width:i,customStyles:d,themeSettings:o})})},Z1t=e=>({"& .MuiPaginationItem-circular.Mui-selected":{color:e.chart.textColor},"& .MuiPaginationItem-circular":{color:e.chart.secondaryTextColor,fontFamily:e.typography.fontFamily}});var K1t=Object.prototype,Q1t=K1t.hasOwnProperty;function J1t(e,t){return e!=null&&Q1t.call(e,t)}function ext(e,t){return e!=null&&iK(e,t,J1t)}function txt(e,t){for(const n of t)ext(e,n)&&console.warn(`Prop '${n}' has been deprecated. Please refer to the documentation at https://sisense.dev/guides/sdk/ for the updated prop and use that instead.`)}const nxt=e=>(txt(e,["headersColor","alternatingRowsColor","alternatingColumnsColor"]),{paddingVertical:e.paddingVertical,paddingHorizontal:e.paddingHorizontal,header:Lt(Lt({},e.headersColor?{color:{enabled:e.headersColor}}:null),e.header),rows:Lt(Lt({},e.alternatingRowsColor?{alternatingColor:{enabled:e.alternatingRowsColor}}:null),e.rows),columns:Lt(Lt({},e.alternatingColumnsColor?{alternatingColor:{enabled:e.alternatingColumnsColor}}:null),e.columns)}),Ile=25,jle=10,zle=({dataSet:e,dataOptions:t,styleOptions:n={},filters:r,onDataReady:o})=>{const{rowsPerPage:i=Ile,width:a,height:s}=n,{themeSettings:l}=mn(),[c,d]=ut(0),{filters:p,relations:u}=bl(r),[k,v]=ut(1),h=pt(null),C=bt(()=>Uae(t),[t]),R=bt(()=>Vz(C.columns.filter(Mo).map(_E)),[C]),H=bt(()=>nxt(n),[n]),[U,W]=ut(C),[A,D]=ut(e),[z,N]=sst({dataSet:A,dataOptions:U,filters:p,filterRelations:u,count:i*jle,offset:c}),B=bt(()=>{if(z&&o){const T=o(z);if(!Xae(T))throw new Qt("errors.incorrectOnDataReadyHandler");return T}return z},[z]),E=lst({data:B,innerDataOptions:N,dataColumnNamesMapping:R,needToAggregate:!of(A)});xt(()=>{W(C),D(e),v(1),d(0)},[e,C]);const x=ct(T=>{z&&(Math.floor(z.rows.length/i)===T&&d(z.rows.length),v(T))},[z,i]),g=ct(T=>{v(1),d(0),U&&W(sat(U,T))},[U]),M=bt(()=>{if(!E||of(A))return E;const T=E.columns.find(Y=>Y.direction!==0);return T?iz(E,[T]):E},[E,A]),_=bt(()=>M?{columns:M.columns,rows:M.rows.slice((k-1)*i,k*i)}:void 0,[M,k,i]);return N?ke(Ag,{defaultSize:Gz("table"),size:{width:a,height:s},children:T=>{if(!E||!_)return ke(kz,{themeSettings:l});if(SZe(E))return ke(Yz,{iconType:"table"});const Y=Math.ceil(E.rows.length/i);return Pt("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",backgroundColor:l.chart.backgroundColor},"aria-label":"table-root",children:[ke(X1t,{dataTable:_,dataOptions:N,designOptions:H,themeSettings:l,width:T.width,height:T.height-32,onSortUpdate:g}),ke(Qae,{ref:h,page:k,count:Y,onChange:(V,F)=>x(F),sx:Z1t(l)})]})}}):null},as=e=>{const{dataSet:t}=e;return!!t&&typeof t!="string"&&"rows"in t&&"columns"in t},rxt=rr(null),yN={didCatch:!1,error:null};class Ble extends sr{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=yN}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var n,r,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];(n=(r=this.props).onReset)===null||n===void 0||n.call(r,{args:i,reason:"imperative-api"}),this.setState(yN)}}componentDidCatch(t,n){var r,o;(r=(o=this.props).onError)===null||r===void 0||r.call(o,t,n)}componentDidUpdate(t,n){const{didCatch:r}=this.state,{resetKeys:o}=this.props;if(r&&n.error!==null&&oxt(t.resetKeys,o)){var i,a;(i=(a=this.props).onReset)===null||i===void 0||i.call(a,{next:o,prev:t.resetKeys,reason:"keys"}),this.setState(yN)}}render(){const{children:t,fallbackRender:n,FallbackComponent:r,fallback:o}=this.props,{didCatch:i,error:a}=this.state;let s=t;if(i){const l={error:a,resetErrorBoundary:this.resetErrorBoundary};if(typeof n=="function")s=n(l);else if(r)s=hn(r,l);else if(o===null||Mr(o))s=o;else throw a}return hn(rxt.Provider,{value:{didCatch:i,error:a,resetErrorBoundary:this.resetErrorBoundary}},s)}}function oxt(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((n,r)=>!Object.is(n,t[r]))}const Fle=rr(void 0),ixt=({children:e})=>{const[t,n]=ut([]),[r,o]=ut([]),i=()=>n([]),a=()=>o([]);return ke(Fle.Provider,{value:{errors:t,warnings:r,clearError:i,clearWarning:a,setErrors:n,setWarnings:o},children:e})},Hle=()=>Nn(Fle)||{errors:[],warnings:[],setErrors:()=>{console.warn("setErrors called, but context is not available.")},setWarnings:()=>{console.warn("setWarnings called, but context is not available.")},clearError:()=>{console.warn("clearError called, but context is not available.")},clearWarning:()=>{console.warn("clearWarning called, but context is not available.")}};function bc(e,t,n){const r=du(e);return typeof e!="object"&&e===r?!1:r==null||(t?t.some(o=>!Zs(r[o],e[o])):!Zs(r,e))?!0:n?n(e,r):!1}const axt=e=>{const[t,n]=ut(0),{setErrors:r,errors:o}=Hle(),i=bc(e,["dataOptions","filters"]);if(xt(()=>{i&&o.length>0&&(n(t+1),r([]))},[e.dataOptions,e.filters]),!of(e.dataSet))throw new Qt("errors.undefinedDataSource");const a=Ha(e.dataOptions),s=_qe(a);a.value.push(...s);const l=Sqe(a);a.value.push(...l);const c=ct(({error:d})=>(console.debug("Unexpected error occurred when rendering advanced chart:",d),ke(vR,Lt({},e))),[e,o]);return o.length===2?null:ke(Ble,{fallbackRender:c,onError:d=>{r(p=>[...p,d.message])},children:ke(vR,an(Lt({},e),{dataOptions:a}))},`errorboundary_${t}`)},Wa=mr({componentName:"Chart",shouldSkipSisenseContextWaiting:as,customContextErrorMessageKey:"errors.chartNoSisenseContext"})(e=>{if(sxt(e))return ke(zle,Lt({},e));if(lxt(e))return ke(axt,Lt({},e));if(Wle(e))return ke(vR,Lt({},e));throw new Qt("errors.chartInvalidProps")});function sxt(e){return e.chartType==="table"&&"columns"in e.dataOptions}function Wle(e){return e.chartType!=="table"}function lxt(e){return!Wle(e)||!yu(e.chartType)?!1:e.dataOptions.value.some(t=>(t==null?void 0:t.forecast)!==void 0||(t==null?void 0:t.trend)!==void 0)}var cxt=function(e){return e.None="",e.Large="30px",e.Medium="20px",e.Small="10px",e}({}),AR=function(e){return e.None="",e.Light="0.15",e.Medium="0.3",e.Dark="0.7",e}(AR||{}),OR=function(e){return e.None="",e.Large="3px 12px",e.Medium="2px 8px",e.Small="1px 4px",e}(OR||{}),N6=function(e){return e.None="",e.Large="15px",e.Medium="10px",e.Small="5px",e}({});const uxt=(e,t)=>{const n=Vh(e,"shadow",t.widget.shadow),r=Vh(e,"spaceAround",t.widget.spaceAround);if(n==="None"||r==="None")return"none";if(n in AR&&r in OR){const o=AR[`${n}`];return`0px ${OR[`${r}`]} rgba(9, 9, 10, ${o})`}return"none"};function dxt(e){return Br("MuiCard",e)}Fr("MuiCard",["root"]);const pxt=["className","raised"],hxt=e=>{const{classes:t}=e;return oo({root:["root"]},dxt,t)},fxt=Dn(oA,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({overflow:"hidden"})),$le=Kt(function(e,t){const n=Vr({props:e,name:"MuiCard"}),{className:r,raised:o=!1}=n,i=Ln(n,pxt),a=it({},n,{raised:o}),s=hxt(a);return je(fxt,it({className:bn(s.root,r),elevation:o?8:void 0,ref:t,ownerState:a},i))});process.env.NODE_ENV!=="production"&&($le.propTypes={children:fe.node,classes:fe.object,className:fe.string,raised:Yp(fe.bool,e=>e.raised&&e.variant==="outlined"?new Error('MUI: Combining `raised={true}` with `variant="outlined"` has no effect.'):null),sx:fe.oneOfType([fe.arrayOf(fe.oneOfType([fe.func,fe.object,fe.bool])),fe.func,fe.object])});function mxt(e){return Br("MuiCardContent",e)}Fr("MuiCardContent",["root"]);const gxt=["className","component"],vxt=e=>{const{classes:t}=e;return oo({root:["root"]},mxt,t)},yxt=Dn("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({padding:16,"&:last-child":{paddingBottom:24}})),Ule=Kt(function(e,t){const n=Vr({props:e,name:"MuiCardContent"}),{className:r,component:o="div"}=n,i=Ln(n,gxt),a=it({},n,{component:o}),s=vxt(a);return je(yxt,it({as:o,className:bn(s.root,r),ownerState:a,ref:t},i))});process.env.NODE_ENV!=="production"&&(Ule.propTypes={children:fe.node,classes:fe.object,className:fe.string,component:fe.elementType,sx:fe.oneOfType([fe.arrayOf(fe.oneOfType([fe.func,fe.object,fe.bool])),fe.func,fe.object])});function bxt(e){return Br("MuiIconButton",e)}const xxt=Fr("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),wxt=["edge","children","className","color","disabled","disableFocusRipple","size"],_xt=e=>{const{classes:t,disabled:n,color:r,edge:o,size:i}=e,a={root:["root",n&&"disabled",r!=="default"&&`color${Zn(r)}`,o&&`edge${Zn(o)}`,`size${Zn(i)}`]};return oo(a,bxt,t)},Sxt=Dn(Gp,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${Zn(n.color)}`],n.edge&&t[`edge${Zn(n.edge)}`],t[`size${Zn(n.size)}`]]}})(({theme:e,ownerState:t})=>it({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:zr(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.edge==="start"&&{marginLeft:t.size==="small"?-3:-12},t.edge==="end"&&{marginRight:t.size==="small"?-3:-12}),({theme:e,ownerState:t})=>{var n;const r=(n=(e.vars||e).palette)==null?void 0:n[t.color];return it({},t.color==="inherit"&&{color:"inherit"},t.color!=="inherit"&&t.color!=="default"&&it({color:r==null?void 0:r.main},!t.disableRipple&&{"&:hover":it({},r&&{backgroundColor:e.vars?`rgba(${r.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:zr(r.main,e.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),t.size==="small"&&{padding:5,fontSize:e.typography.pxToRem(18)},t.size==="large"&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${xxt.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})}),su=Kt(function(e,t){const n=Vr({props:e,name:"MuiIconButton"}),{edge:r=!1,children:o,className:i,color:a="default",disabled:s=!1,disableFocusRipple:l=!1,size:c="medium"}=n,d=Ln(n,wxt),p=it({},n,{edge:r,color:a,disabled:s,disableFocusRipple:l,size:c}),u=_xt(p);return je(Sxt,it({className:bn(u.root,i),centerRipple:!0,focusRipple:!l,disabled:s,ref:t},d,{ownerState:p,children:o}))});process.env.NODE_ENV!=="production"&&(su.propTypes={children:Yp(fe.node,e=>va.toArray(e.children).some(t=>Mr(t)&&t.props.onClick)?new Error(["MUI: You are providing an onClick event listener to a child of a button element.","Prefer applying it to the IconButton directly.","This guarantees that the whole <button> will be responsive to click events."].join(`
|
1010
|
-
`)):null),classes:fe.object,className:fe.string,color:fe.oneOfType([fe.oneOf(["inherit","default","primary","secondary","error","info","success","warning"]),fe.string]),disabled:fe.bool,disableFocusRipple:fe.bool,disableRipple:fe.bool,edge:fe.oneOf(["end","start",!1]),size:fe.oneOfType([fe.oneOf(["small","medium","large"]),fe.string]),sx:fe.oneOfType([fe.arrayOf(fe.oneOfType([fe.func,fe.object,fe.bool])),fe.func,fe.object])});function kxt({fill:e="rgba(38, 46, 61, 0.67)"}){return ke("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:ke("path",{fill:e,d:"M11.5 21a8.5 8.5 0 1 1 0-17 8.5 8.5 0 0 1 0 17zM13 8.878c0-1.27-.499-1.896-1.496-1.878C10.501 7.03 10 7.68 10 8.95c0 .737.17 1.647.51 2.731l.318.98c.081.245.14.413.175.503.197.533.376.811.537.835.15.018.314-.248.493-.8.083-.257.161-.512.233-.763.071-.252.146-.503.224-.755.34-1.12.51-2.054.51-2.803zM11.5 18a1 1 0 1 0 0-2 1 1 0 0 0 0 2z"})})}const Cxt=It(iA,{target:"e1g12j10",label:"StyledMuiPopover"})(".MuiPaper-root.MuiPopover-paper:not([style*='top']),.MuiPaper-root.MuiPopover-paper:not([style*='left']){opacity:0 !important;}"),D_=e=>{const t=e,{children:n,open:r,id:o,position:i,onClose:a}=t,s=m_(t,["children","open","id","position","onClose"]);return ke(Cxt,an(Lt({id:o,className:"csdk-accessible",anchorEl:i==null?void 0:i.anchorEl,anchorOrigin:i==null?void 0:i.anchorOrigin,transformOrigin:i==null?void 0:i.contentOrigin,transitionDuration:0,open:r,slotProps:{paper:{sx:{display:"flex",boxShadow:"-1px -1px 10px rgba(0, 0, 0, 0.2)"}}},onClose:a},s),{children:n}))};function Mxt({title:e,description:t,errorMessages:n=[],styleOptions:r,onRefresh:o}){var i,a,s;const[l,c]=ut(null),{themeSettings:d}=mn(),{typography:{primaryTextColor:p,secondaryTextColor:u,fontFamily:k}}=d,{t:v}=Fn(),h=W=>{c(W.currentTarget)},C=()=>{c(null)},R=bt(()=>e?ke(rs,{variant:"body2",style:{color:p,fontFamily:k,fontSize:13},children:e}):null,[e,p,k]),H=bt(()=>n.length===0?null:n.map(W=>Pt(yr,{children:[ke(vv,{sx:{my:1,borderColor:u,opacity:.3,marginY:"8px"}}),Pt("div",{className:"csdk-flex",children:[ke("div",{className:"csdk-shrink-0 csdk-grow-0",children:ke(kxt,{fill:"#fa5656"})}),ke(rs,{variant:"body2",className:"csdk-grow-1",style:{color:u,fontFamily:k,fontSize:13,marginLeft:5,lineHeight:"24px",letterSpacing:"normal",overflowWrap:"anywhere"},children:W})]})]})),[n,u,k]),U=bt(()=>t?Pt(yr,{children:[ke(vv,{sx:{my:"8px",borderColor:u,opacity:.3}}),ke(rs,{variant:"body2",style:{color:u,fontFamily:k,fontSize:13},children:t})]}):null,[t,u,k]);return Pt(yr,{children:[ke(lf,{title:v("widgetHeader.info.tooltip"),style:{color:(i=d.chart)==null?void 0:i.textColor,fontFamily:(a=d.typography)==null?void 0:a.fontFamily},children:ke(su,{onClick:h,sx:{p:0},children:ke("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",children:ke("path",{fill:(r==null?void 0:r.titleTextColor)||d.widget.header.titleTextColor,d:"M11.5 20a7.5 7.5 0 1 1 0-15 7.5 7.5 0 0 1 0 15zm0-1a6.5 6.5 0 1 0 0-13 6.5 6.5 0 0 0 0 13zm-.5-8h1v5h-1v-5zm0-1v-.998h1V10h-1z"})})})}),ke(D_,{open:!!l,position:l?{anchorEl:l,anchorOrigin:{vertical:"bottom",horizontal:"center"},contentOrigin:{vertical:"top",horizontal:"center"}}:void 0,onClose:C,children:Pt($le,{raised:!0,className:"csdk-max-w-xs csdk-w-[300px]",children:[Pt("div",{className:"csdk-flex csdk-flex-row csdk-justify-between csdk-items-center csdk-py-[5px] csdk-px-[12px]",style:{backgroundColor:za(d.general.backgroundColor)},children:[ke(rs,{variant:"subtitle2",sx:{fontWeight:"bold"},style:{color:d.typography.primaryTextColor,fontFamily:d.typography.fontFamily},children:v("widgetHeader.info.details")}),ke(su,{onClick:o,sx:{p:0},children:ke("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",children:ke("path",{fill:(s=d.chart)==null?void 0:s.textColor,d:"M20 12a8 8 0 0 1-15.259 3.368l1.004-.222a7 7 0 0 0 13.252-2.925L20 12zm0 0a8 8 0 0 1-15.259 3.368l1.004-.222a7 7 0 0 0 13.252-2.925L20 12zm-8-7a7 7 0 0 1 6.267 3.877l1.003-.22A8.001 8.001 0 0 0 4 12l1.003-.22A7 7 0 0 1 12 5zm6.998 3.12A8 8 0 0 0 4 12l1.003-.22a7 7 0 0 1 13.264-2.903l.73-.16v.28l-2.98.016-.017.971h3.985V6h-.987v2.12zm-14.01 9.864H4V14h3.985l-.016.971-2.981.017v2.996z"})})})]}),ke(vv,{sx:{borderColor:d.typography.secondaryTextColor,opacity:.3}}),Pt(Ule,{style:{backgroundColor:d.general.backgroundColor,padding:12},children:[R,H,U]})]})})]})}const Txt=({title:e,description:t,errorMessages:n=[],warningMessages:r=[],dataSetName:o,styleOptions:i,onRefresh:a})=>{var s;const{themeSettings:l}=mn(),c=()=>{var d;const p=ke(yr,{children:ke(Mxt,{title:o,description:t,styleOptions:i,errorMessages:n,warningMessages:r,onRefresh:a})});return i!=null&&i.renderToolbar?(d=i==null?void 0:i.renderToolbar)==null?void 0:d.call(i,a,p):p};return Pt(yr,{children:[Pt("div",{className:"csdk-flex csdk-flex-row csdk-items-center csdk-px-2 csdk-min-h-[32px]",style:{backgroundColor:(i==null?void 0:i.backgroundColor)||l.widget.header.backgroundColor},children:[ke("div",{className:"csdk-w-full csdk-whitespace-nowrap csdk-overflow-hidden",style:{textAlign:Ext((i==null?void 0:i.titleAlignment)||l.widget.header.titleAlignment),color:(i==null?void 0:i.titleTextColor)||l.widget.header.titleTextColor,fontFamily:(s=l.typography)==null?void 0:s.fontFamily,fontSize:15},children:e||""}),ke("div",{className:"csdk-ml-auto csdk-flex csdk-items-center",children:c()})]}),Vh(i,"dividerLine",l.widget.header.dividerLine)&&ke(vv,{style:{backgroundColor:(i==null?void 0:i.dividerLineColor)||l.widget.header.dividerLineColor||"#e6e6e6"}})]})};function Ext(e){return e.toLowerCase()}const EA=e=>ke(ixt,{children:ke(Axt,Lt({},e))}),Axt=({dataSetName:e,styleOptions:t,title:n,description:r,topSlot:o,bottomSlot:i,children:a,onRefresh:s=()=>{}})=>{var l,c,d;const{errors:p,warnings:u}=Hle(),{themeSettings:k}=mn();return ke("div",{className:"csdk-w-full csdk-h-full csdk-overflow-hidden csdk-accessible",children:ke("div",{className:"csdk-h-full",style:{padding:N6[Vh(t,"spaceAround",k.widget.spaceAround)]||"0px"},children:Pt("div",{className:"csdk-h-full csdk-overflow-hidden",style:{backgroundColor:(t==null?void 0:t.backgroundColor)||"unset",borderWidth:Vh(t,"border",k.widget.border)?"1px":0,borderColor:(t==null?void 0:t.borderColor)||k.widget.borderColor,borderRadius:cxt[(t==null?void 0:t.cornerRadius)||k.widget.cornerRadius]||0,boxShadow:uxt(t,k),display:"flex",flexDirection:"column"},children:[!((l=t==null?void 0:t.header)!=null&&l.hidden)&&ke(Txt,{title:n,description:r,dataSetName:e,errorMessages:p,warningMessages:u,styleOptions:t==null?void 0:t.header,onRefresh:s}),o,ke(yM,{theme:{chart:{backgroundColor:(t==null?void 0:t.backgroundColor)||((c=k.chart)==null?void 0:c.backgroundColor)}},children:ke("div",{style:{flexGrow:1,minWidth:0,minHeight:0,backgroundColor:(t==null?void 0:t.backgroundColor)||((d=k.chart)==null?void 0:d.backgroundColor)},children:a})}),i]})})})};var Oxt="[object String]";function Yle(e){return typeof e=="string"||!Co(e)&&Cs(e)&&vu(e)==Oxt}const AA=e=>{const t=Pxt(e);return t.config.disabled=!e.config.disabled,t},Pxt=e=>{const t=Ha(e);return Object.setPrototypeOf(t,e),t};function Dxt(e,t,n){return Es(e,[],{guid:t,excludeMembers:!1,backgroundFilter:n})}function OA(e){if(!ja(e))throw new Qt("errors.notAMembersFilter");const{attribute:t,config:{guid:n,backgroundFilter:r}}=e;return Dxt(t,n,r)}function L6(e){return"members"in e&&e.members.length===0}function Xs(e,t){return e.expression===(t==null?void 0:t.expression)&&e.granularity===t.granularity}function Km(e,t){return e===void 0&&t===void 0?!1:[e,t].some(n=>n===void 0)||e.length!==t.length?!0:e.length===0&&t.length===0?!1:e.some((n,r)=>!qoe(n,t[r],Gle))}function R6(e,t){return Xs(e.attribute,t.attribute)}function Gle(e,t){const n=Ty(Nxt,Lxt);return Zs(n(e),n(t))}function Nxt(e){return an(Lt({},e),{name:""})}function Lxt(e){return an(Lt({},e),{config:an(Lt({},e.config),{guid:""})})}function Rxt(e,t,n,r){if(n===void 0&&r===void 0)return!1;if([n,r].some(i=>i===void 0))return!0;function o(i,a){const s=i,l=i,c=a,d=a;return i===void 0&&a===void 0?!0:[i,a].some(p=>p===void 0)||s.operator!==c.operator?!1:l.instanceid&&d.instanceid?!Km(e==null?void 0:e.filter(p=>p.config.guid===l.instanceid),t==null?void 0:t.filter(p=>p.config.guid===d.instanceid)):o(s.left,c.left)&&o(s.right,c.right)||o(s.left,c.right)&&o(s.right,c.left)}return!o(n,r)}const Vle="sdkHookInit",Ixt=(e,t,n,r)=>{n&&Sie(Vle,{packageName:t,packageVersion:"1.34.0",hookName:e},n.httpClient).finally(r)};function jxt(e){const{tracking:t,app:n}=Er(),{trackEvent:r}=Sz(),o=pt(!1);xt(()=>{if(!(!t||!n)&&!o.current){const i={packageName:t.packageName||"sdk-ui",packageVersion:"1.34.0",hookName:e};r(Vle,i,!t.enabled).finally(()=>o.current=!0)}},[t,e,r,n])}const I6=e=>t=>(...n)=>(jxt(e),t(...n));function wd(e,t){switch(t.type){case"loading":return zxt(e);case"success":return Bxt(t.data);case"error":return Fxt(t.error)}}function zxt(e){return e.status==="loading"?e:an(Lt({},e),{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0})}function Bxt(e){return{isLoading:!1,isError:!1,isSuccess:!0,data:e,status:"success",error:void 0}}function Fxt(e){return{isLoading:!1,isError:!0,isSuccess:!1,data:void 0,status:"error",error:e}}function Lg({enabled:e},t){const n=pt(!1);return ct((r,o=!1)=>{const i=e===!1||!r,a=n.current;return n.current=i,!i&&(a||t||o)},[e,t])}var bN=function(){return is.Date.now()},Hxt="Expected a function",Wxt=Math.max,$xt=Math.min;function N_(e,t,n){var r,o,i,a,s,l,c=0,d=!1,p=!1,u=!0;if(typeof e!="function")throw new TypeError(Hxt);t=Ux(t)||0,Ia(n)&&(d=!!n.leading,p="maxWait"in n,i=p?Wxt(Ux(n.maxWait)||0,t):i,u="trailing"in n?!!n.trailing:u);function k(D){var z=r,N=o;return r=o=void 0,c=D,a=e.apply(N,z),a}function v(D){return c=D,s=setTimeout(R,t),d?k(D):a}function h(D){var z=D-l,N=D-c,B=t-z;return p?$xt(B,i-N):B}function C(D){var z=D-l,N=D-c;return l===void 0||z>=t||z<0||p&&N>=i}function R(){var D=bN();if(C(D))return H(D);s=setTimeout(R,h(D))}function H(D){return s=void 0,u&&r?k(D):(r=o=void 0,a)}function U(){s!==void 0&&clearTimeout(s),c=0,r=l=o=s=void 0}function W(){return s===void 0?a:H(bN())}function A(){var D=bN(),z=C(D);if(r=arguments,o=this,l=D,z){if(s===void 0)return v(l);if(p)return clearTimeout(s),s=setTimeout(R,t),k(l)}return s===void 0&&(s=setTimeout(R,t)),a}return A.cancel=U,A.flush=W,A}function ny(e,{onLocalStateChange:t,syncCompareFn:n=Zs}={}){const[r,o]=ut(e),i=pt(e);xt(()=>{n(i.current,e)||o(e),i.current=e},[e,n]);const a=ct(s=>{o(l=>{const c=Tp(s)?s(l):s;return t==null||t(c),c})},[t]);return[r,a]}function Uxt({chartType:e,dataOptions:t,enabled:n}){const[r,o]=ut([]),i=bt(()=>{var p;const u=yu(e)&&((p=t.category)==null?void 0:p.length)===1||uu(e);return n&&u},[n,e,t]),a=bt(()=>{if(r.length===0)return p=>an(Lt({},p),{series:p.series.map(u=>an(Lt({},u),{data:u.data.map(k=>an(Lt({},k),{selected:!1}))}))});if(uu(e))return p=>an(Lt({},p),{series:p.series.map(u=>an(Lt({},u),{data:u.data.map(k=>an(Lt({},k),{selected:!r.some(v=>{var h,C;return v.x===k.x&&v.y===k.y&&v.size===k.z&&v.breakByPoint===((h=k.custom)==null?void 0:h.maskedBreakByPoint)&&v.breakByColor===((C=k.custom)==null?void 0:C.maskedBreakByColor)})}))}))});{const p=r.reduce((u,{categoryValue:k})=>(k&&(u[`${k}`]=!0),u),{});return u=>an(Lt({},u),{series:u.series.map(k=>an(Lt({},k),{data:k.data.map(v=>{var h,C;return p[(C=(h=v.custom)==null?void 0:h.xValue)==null?void 0:C[0]]?v:an(Lt({},v),{selected:!0})})}))})}},[r,e]),s=bt(()=>p=>{var u;return an(Lt({},p),{chart:an(Lt({},p.chart),{events:an(Lt({},(u=p.chart)==null?void 0:u.events),{click:()=>{o([])}})})})},[]),l=ct(p=>(i&&(p=a(p),p=s(p)),p),[a,s,i]),c=ct(p=>{i&&o(p)},[i]),d=ct(p=>{i&&o([p])},[i]);return{onBeforeRender:l,onDataPointsSelected:c,onDataPointClick:d}}const j6=()=>{const e=GE();if(!e)throw new Qt("errors.missingMenuRoot");const{openMenu:t,closeMenu:n}=e;return{openMenu:t,closeMenu:n}};function PR(e){return e&&e.length?Xz(e):[]}function Yxt(e,t,n,r){for(var o=-1,i=e==null?0:e.length;++o<i;){var a=e[o];t(r,a,n(a),e)}return r}function Gxt(e,t){return function(n,r){if(n==null)return n;if(!Nw(n))return e(n,r);for(var o=n.length,i=-1,a=Object(n);++i<o&&r(a[i],i,a)!==!1;);return n}}var Vxt=Gxt(BI);function qxt(e,t,n,r){return Vxt(e,function(o,i,a){t(r,o,n(o),a)}),r}function qle(e,t){return function(n,r){var o=Co(n)?Yxt:qxt,i=t?t():{};return o(n,e,ug(r),i)}}var L_=qle(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]});const Xxt=Og(je("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz"),Zxt=["slots","slotProps"],Kxt=Dn(Gp)(({theme:e})=>it({display:"flex",marginLeft:`calc(${e.spacing(1)} * 0.5)`,marginRight:`calc(${e.spacing(1)} * 0.5)`},e.palette.mode==="light"?{backgroundColor:e.palette.grey[100],color:e.palette.grey[700]}:{backgroundColor:e.palette.grey[700],color:e.palette.grey[100]},{borderRadius:2,"&:hover, &:focus":it({},e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}),"&:active":it({boxShadow:e.shadows[0]},e.palette.mode==="light"?{backgroundColor:BY(e.palette.grey[200],.12)}:{backgroundColor:BY(e.palette.grey[600],.12)})})),Qxt=Dn(Xxt)({width:24,height:16});function Xle(e){const{slots:t={},slotProps:n={}}=e,r=Ln(e,Zxt),o=e;return je("li",{children:je(Kxt,it({focusRipple:!0},r,{ownerState:o,children:je(Qxt,it({as:t.CollapsedIcon,ownerState:o},n.collapsedIcon))}))})}process.env.NODE_ENV!=="production"&&(Xle.propTypes={slotProps:fe.shape({collapsedIcon:fe.oneOfType([fe.func,fe.object])}),slots:fe.shape({CollapsedIcon:fe.elementType}),sx:fe.object});function Jxt(e){return Br("MuiBreadcrumbs",e)}const ewt=Fr("MuiBreadcrumbs",["root","ol","li","separator"]),twt=["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],nwt=e=>{const{classes:t}=e;return oo({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},Jxt,t)},rwt=Dn(rs,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${ewt.li}`]:t.li},t.root]})({}),owt=Dn("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),iwt=Dn("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function awt(e,t,n,r){return e.reduce((o,i,a)=>(a<e.length-1?o=o.concat(i,je(iwt,{"aria-hidden":!0,className:t,ownerState:r,children:n},`separator-${a}`)):o.push(i),o),[])}const Zle=Kt(function(e,t){const n=Vr({props:e,name:"MuiBreadcrumbs"}),{children:r,className:o,component:i="nav",slots:a={},slotProps:s={},expandText:l="Show path",itemsAfterCollapse:c=1,itemsBeforeCollapse:d=1,maxItems:p=8,separator:u="/"}=n,k=Ln(n,twt),[v,h]=ut(!1),C=it({},n,{component:i,expanded:v,expandText:l,itemsAfterCollapse:c,itemsBeforeCollapse:d,maxItems:p,separator:u}),R=nwt(C),H=af({elementType:a.CollapsedIcon,externalSlotProps:s.collapsedIcon,ownerState:C}),U=pt(null),W=D=>{const z=()=>{h(!0);const N=U.current.querySelector("a[href],button,[tabindex]");N&&N.focus()};return d+c>=D.length?(process.env.NODE_ENV!=="production"&&console.error(["MUI: You have provided an invalid combination of props to the Breadcrumbs.",`itemsAfterCollapse={${c}} + itemsBeforeCollapse={${d}} >= maxItems={${p}}`].join(`
|
1010
|
+
`)):null),classes:fe.object,className:fe.string,color:fe.oneOfType([fe.oneOf(["inherit","default","primary","secondary","error","info","success","warning"]),fe.string]),disabled:fe.bool,disableFocusRipple:fe.bool,disableRipple:fe.bool,edge:fe.oneOf(["end","start",!1]),size:fe.oneOfType([fe.oneOf(["small","medium","large"]),fe.string]),sx:fe.oneOfType([fe.arrayOf(fe.oneOfType([fe.func,fe.object,fe.bool])),fe.func,fe.object])});function kxt({fill:e="rgba(38, 46, 61, 0.67)"}){return ke("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:ke("path",{fill:e,d:"M11.5 21a8.5 8.5 0 1 1 0-17 8.5 8.5 0 0 1 0 17zM13 8.878c0-1.27-.499-1.896-1.496-1.878C10.501 7.03 10 7.68 10 8.95c0 .737.17 1.647.51 2.731l.318.98c.081.245.14.413.175.503.197.533.376.811.537.835.15.018.314-.248.493-.8.083-.257.161-.512.233-.763.071-.252.146-.503.224-.755.34-1.12.51-2.054.51-2.803zM11.5 18a1 1 0 1 0 0-2 1 1 0 0 0 0 2z"})})}const Cxt=It(iA,{target:"e1g12j10",label:"StyledMuiPopover"})(".MuiPaper-root.MuiPopover-paper:not([style*='top']),.MuiPaper-root.MuiPopover-paper:not([style*='left']){opacity:0 !important;}"),D_=e=>{const t=e,{children:n,open:r,id:o,position:i,onClose:a}=t,s=m_(t,["children","open","id","position","onClose"]);return ke(Cxt,an(Lt({id:o,className:"csdk-accessible",anchorEl:i==null?void 0:i.anchorEl,anchorOrigin:i==null?void 0:i.anchorOrigin,transformOrigin:i==null?void 0:i.contentOrigin,transitionDuration:0,open:r,slotProps:{paper:{sx:{display:"flex",boxShadow:"-1px -1px 10px rgba(0, 0, 0, 0.2)"}}},onClose:a},s),{children:n}))};function Mxt({title:e,description:t,errorMessages:n=[],styleOptions:r,onRefresh:o}){var i,a,s;const[l,c]=ut(null),{themeSettings:d}=mn(),{typography:{primaryTextColor:p,secondaryTextColor:u,fontFamily:k}}=d,{t:v}=Fn(),h=W=>{c(W.currentTarget)},C=()=>{c(null)},R=bt(()=>e?ke(rs,{variant:"body2",style:{color:p,fontFamily:k,fontSize:13},children:e}):null,[e,p,k]),H=bt(()=>n.length===0?null:n.map(W=>Pt(yr,{children:[ke(vv,{sx:{my:1,borderColor:u,opacity:.3,marginY:"8px"}}),Pt("div",{className:"csdk-flex",children:[ke("div",{className:"csdk-shrink-0 csdk-grow-0",children:ke(kxt,{fill:"#fa5656"})}),ke(rs,{variant:"body2",className:"csdk-grow-1",style:{color:u,fontFamily:k,fontSize:13,marginLeft:5,lineHeight:"24px",letterSpacing:"normal",overflowWrap:"anywhere"},children:W})]})]})),[n,u,k]),U=bt(()=>t?Pt(yr,{children:[ke(vv,{sx:{my:"8px",borderColor:u,opacity:.3}}),ke(rs,{variant:"body2",style:{color:u,fontFamily:k,fontSize:13},children:t})]}):null,[t,u,k]);return Pt(yr,{children:[ke(lf,{title:v("widgetHeader.info.tooltip"),style:{color:(i=d.chart)==null?void 0:i.textColor,fontFamily:(a=d.typography)==null?void 0:a.fontFamily},children:ke(su,{onClick:h,sx:{p:0},children:ke("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",children:ke("path",{fill:(r==null?void 0:r.titleTextColor)||d.widget.header.titleTextColor,d:"M11.5 20a7.5 7.5 0 1 1 0-15 7.5 7.5 0 0 1 0 15zm0-1a6.5 6.5 0 1 0 0-13 6.5 6.5 0 0 0 0 13zm-.5-8h1v5h-1v-5zm0-1v-.998h1V10h-1z"})})})}),ke(D_,{open:!!l,position:l?{anchorEl:l,anchorOrigin:{vertical:"bottom",horizontal:"center"},contentOrigin:{vertical:"top",horizontal:"center"}}:void 0,onClose:C,children:Pt($le,{raised:!0,className:"csdk-max-w-xs csdk-w-[300px]",children:[Pt("div",{className:"csdk-flex csdk-flex-row csdk-justify-between csdk-items-center csdk-py-[5px] csdk-px-[12px]",style:{backgroundColor:za(d.general.backgroundColor)},children:[ke(rs,{variant:"subtitle2",sx:{fontWeight:"bold"},style:{color:d.typography.primaryTextColor,fontFamily:d.typography.fontFamily},children:v("widgetHeader.info.details")}),ke(su,{onClick:o,sx:{p:0},children:ke("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",children:ke("path",{fill:(s=d.chart)==null?void 0:s.textColor,d:"M20 12a8 8 0 0 1-15.259 3.368l1.004-.222a7 7 0 0 0 13.252-2.925L20 12zm0 0a8 8 0 0 1-15.259 3.368l1.004-.222a7 7 0 0 0 13.252-2.925L20 12zm-8-7a7 7 0 0 1 6.267 3.877l1.003-.22A8.001 8.001 0 0 0 4 12l1.003-.22A7 7 0 0 1 12 5zm6.998 3.12A8 8 0 0 0 4 12l1.003-.22a7 7 0 0 1 13.264-2.903l.73-.16v.28l-2.98.016-.017.971h3.985V6h-.987v2.12zm-14.01 9.864H4V14h3.985l-.016.971-2.981.017v2.996z"})})})]}),ke(vv,{sx:{borderColor:d.typography.secondaryTextColor,opacity:.3}}),Pt(Ule,{style:{backgroundColor:d.general.backgroundColor,padding:12},children:[R,H,U]})]})})]})}const Txt=({title:e,description:t,errorMessages:n=[],warningMessages:r=[],dataSetName:o,styleOptions:i,onRefresh:a})=>{var s;const{themeSettings:l}=mn(),c=()=>{var d;const p=ke(yr,{children:ke(Mxt,{title:o,description:t,styleOptions:i,errorMessages:n,warningMessages:r,onRefresh:a})});return i!=null&&i.renderToolbar?(d=i==null?void 0:i.renderToolbar)==null?void 0:d.call(i,a,p):p};return Pt(yr,{children:[Pt("div",{className:"csdk-flex csdk-flex-row csdk-items-center csdk-px-2 csdk-min-h-[32px]",style:{backgroundColor:(i==null?void 0:i.backgroundColor)||l.widget.header.backgroundColor},children:[ke("div",{className:"csdk-w-full csdk-whitespace-nowrap csdk-overflow-hidden",style:{textAlign:Ext((i==null?void 0:i.titleAlignment)||l.widget.header.titleAlignment),color:(i==null?void 0:i.titleTextColor)||l.widget.header.titleTextColor,fontFamily:(s=l.typography)==null?void 0:s.fontFamily,fontSize:15},children:e||""}),ke("div",{className:"csdk-ml-auto csdk-flex csdk-items-center",children:c()})]}),Vh(i,"dividerLine",l.widget.header.dividerLine)&&ke(vv,{style:{backgroundColor:(i==null?void 0:i.dividerLineColor)||l.widget.header.dividerLineColor||"#e6e6e6"}})]})};function Ext(e){return e.toLowerCase()}const EA=e=>ke(ixt,{children:ke(Axt,Lt({},e))}),Axt=({dataSetName:e,styleOptions:t,title:n,description:r,topSlot:o,bottomSlot:i,children:a,onRefresh:s=()=>{}})=>{var l,c,d;const{errors:p,warnings:u}=Hle(),{themeSettings:k}=mn();return ke("div",{className:"csdk-w-full csdk-h-full csdk-overflow-hidden csdk-accessible",children:ke("div",{className:"csdk-h-full",style:{padding:N6[Vh(t,"spaceAround",k.widget.spaceAround)]||"0px"},children:Pt("div",{className:"csdk-h-full csdk-overflow-hidden",style:{backgroundColor:(t==null?void 0:t.backgroundColor)||"unset",borderWidth:Vh(t,"border",k.widget.border)?"1px":0,borderColor:(t==null?void 0:t.borderColor)||k.widget.borderColor,borderRadius:cxt[(t==null?void 0:t.cornerRadius)||k.widget.cornerRadius]||0,boxShadow:uxt(t,k),display:"flex",flexDirection:"column"},children:[!((l=t==null?void 0:t.header)!=null&&l.hidden)&&ke(Txt,{title:n,description:r,dataSetName:e,errorMessages:p,warningMessages:u,styleOptions:t==null?void 0:t.header,onRefresh:s}),o,ke(yM,{theme:{chart:{backgroundColor:(t==null?void 0:t.backgroundColor)||((c=k.chart)==null?void 0:c.backgroundColor)}},children:ke("div",{style:{flexGrow:1,minWidth:0,minHeight:0,backgroundColor:(t==null?void 0:t.backgroundColor)||((d=k.chart)==null?void 0:d.backgroundColor)},children:a})}),i]})})})};var Oxt="[object String]";function Yle(e){return typeof e=="string"||!Co(e)&&Cs(e)&&vu(e)==Oxt}const AA=e=>{const t=Pxt(e);return t.config.disabled=!e.config.disabled,t},Pxt=e=>{const t=Ha(e);return Object.setPrototypeOf(t,e),t};function Dxt(e,t,n){return Es(e,[],{guid:t,excludeMembers:!1,backgroundFilter:n})}function OA(e){if(!ja(e))throw new Qt("errors.notAMembersFilter");const{attribute:t,config:{guid:n,backgroundFilter:r}}=e;return Dxt(t,n,r)}function L6(e){return"members"in e&&e.members.length===0}function Xs(e,t){return e.expression===(t==null?void 0:t.expression)&&e.granularity===t.granularity}function Km(e,t){return e===void 0&&t===void 0?!1:[e,t].some(n=>n===void 0)||e.length!==t.length?!0:e.length===0&&t.length===0?!1:e.some((n,r)=>!qoe(n,t[r],Gle))}function R6(e,t){return Xs(e.attribute,t.attribute)}function Gle(e,t){const n=Ty(Nxt,Lxt);return Zs(n(e),n(t))}function Nxt(e){return an(Lt({},e),{name:""})}function Lxt(e){return an(Lt({},e),{config:an(Lt({},e.config),{guid:""})})}function Rxt(e,t,n,r){if(n===void 0&&r===void 0)return!1;if([n,r].some(i=>i===void 0))return!0;function o(i,a){const s=i,l=i,c=a,d=a;return i===void 0&&a===void 0?!0:[i,a].some(p=>p===void 0)||s.operator!==c.operator?!1:l.instanceid&&d.instanceid?!Km(e==null?void 0:e.filter(p=>p.config.guid===l.instanceid),t==null?void 0:t.filter(p=>p.config.guid===d.instanceid)):o(s.left,c.left)&&o(s.right,c.right)||o(s.left,c.right)&&o(s.right,c.left)}return!o(n,r)}const Vle="sdkHookInit",Ixt=(e,t,n,r)=>{n&&Sie(Vle,{packageName:t,packageVersion:"1.35.0",hookName:e},n.httpClient).finally(r)};function jxt(e){const{tracking:t,app:n}=Er(),{trackEvent:r}=Sz(),o=pt(!1);xt(()=>{if(!(!t||!n)&&!o.current){const i={packageName:t.packageName||"sdk-ui",packageVersion:"1.35.0",hookName:e};r(Vle,i,!t.enabled).finally(()=>o.current=!0)}},[t,e,r,n])}const I6=e=>t=>(...n)=>(jxt(e),t(...n));function wd(e,t){switch(t.type){case"loading":return zxt(e);case"success":return Bxt(t.data);case"error":return Fxt(t.error)}}function zxt(e){return e.status==="loading"?e:an(Lt({},e),{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0})}function Bxt(e){return{isLoading:!1,isError:!1,isSuccess:!0,data:e,status:"success",error:void 0}}function Fxt(e){return{isLoading:!1,isError:!0,isSuccess:!1,data:void 0,status:"error",error:e}}function Lg({enabled:e},t){const n=pt(!1);return ct((r,o=!1)=>{const i=e===!1||!r,a=n.current;return n.current=i,!i&&(a||t||o)},[e,t])}var bN=function(){return is.Date.now()},Hxt="Expected a function",Wxt=Math.max,$xt=Math.min;function N_(e,t,n){var r,o,i,a,s,l,c=0,d=!1,p=!1,u=!0;if(typeof e!="function")throw new TypeError(Hxt);t=Ux(t)||0,Ia(n)&&(d=!!n.leading,p="maxWait"in n,i=p?Wxt(Ux(n.maxWait)||0,t):i,u="trailing"in n?!!n.trailing:u);function k(D){var z=r,N=o;return r=o=void 0,c=D,a=e.apply(N,z),a}function v(D){return c=D,s=setTimeout(R,t),d?k(D):a}function h(D){var z=D-l,N=D-c,B=t-z;return p?$xt(B,i-N):B}function C(D){var z=D-l,N=D-c;return l===void 0||z>=t||z<0||p&&N>=i}function R(){var D=bN();if(C(D))return H(D);s=setTimeout(R,h(D))}function H(D){return s=void 0,u&&r?k(D):(r=o=void 0,a)}function U(){s!==void 0&&clearTimeout(s),c=0,r=l=o=s=void 0}function W(){return s===void 0?a:H(bN())}function A(){var D=bN(),z=C(D);if(r=arguments,o=this,l=D,z){if(s===void 0)return v(l);if(p)return clearTimeout(s),s=setTimeout(R,t),k(l)}return s===void 0&&(s=setTimeout(R,t)),a}return A.cancel=U,A.flush=W,A}function ny(e,{onLocalStateChange:t,syncCompareFn:n=Zs}={}){const[r,o]=ut(e),i=pt(e);xt(()=>{n(i.current,e)||o(e),i.current=e},[e,n]);const a=ct(s=>{o(l=>{const c=Tp(s)?s(l):s;return t==null||t(c),c})},[t]);return[r,a]}function Uxt({chartType:e,dataOptions:t,enabled:n}){const[r,o]=ut([]),i=bt(()=>{var p;const u=yu(e)&&((p=t.category)==null?void 0:p.length)===1||uu(e);return n&&u},[n,e,t]),a=bt(()=>{if(r.length===0)return p=>an(Lt({},p),{series:p.series.map(u=>an(Lt({},u),{data:u.data.map(k=>an(Lt({},k),{selected:!1}))}))});if(uu(e))return p=>an(Lt({},p),{series:p.series.map(u=>an(Lt({},u),{data:u.data.map(k=>an(Lt({},k),{selected:!r.some(v=>{var h,C;return v.x===k.x&&v.y===k.y&&v.size===k.z&&v.breakByPoint===((h=k.custom)==null?void 0:h.maskedBreakByPoint)&&v.breakByColor===((C=k.custom)==null?void 0:C.maskedBreakByColor)})}))}))});{const p=r.reduce((u,{categoryValue:k})=>(k&&(u[`${k}`]=!0),u),{});return u=>an(Lt({},u),{series:u.series.map(k=>an(Lt({},k),{data:k.data.map(v=>{var h,C;return p[(C=(h=v.custom)==null?void 0:h.xValue)==null?void 0:C[0]]?v:an(Lt({},v),{selected:!0})})}))})}},[r,e]),s=bt(()=>p=>{var u;return an(Lt({},p),{chart:an(Lt({},p.chart),{events:an(Lt({},(u=p.chart)==null?void 0:u.events),{click:()=>{o([])}})})})},[]),l=ct(p=>(i&&(p=a(p),p=s(p)),p),[a,s,i]),c=ct(p=>{i&&o(p)},[i]),d=ct(p=>{i&&o([p])},[i]);return{onBeforeRender:l,onDataPointsSelected:c,onDataPointClick:d}}const j6=()=>{const e=GE();if(!e)throw new Qt("errors.missingMenuRoot");const{openMenu:t,closeMenu:n}=e;return{openMenu:t,closeMenu:n}};function PR(e){return e&&e.length?Xz(e):[]}function Yxt(e,t,n,r){for(var o=-1,i=e==null?0:e.length;++o<i;){var a=e[o];t(r,a,n(a),e)}return r}function Gxt(e,t){return function(n,r){if(n==null)return n;if(!Nw(n))return e(n,r);for(var o=n.length,i=-1,a=Object(n);++i<o&&r(a[i],i,a)!==!1;);return n}}var Vxt=Gxt(BI);function qxt(e,t,n,r){return Vxt(e,function(o,i,a){t(r,o,n(o),a)}),r}function qle(e,t){return function(n,r){var o=Co(n)?Yxt:qxt,i=t?t():{};return o(n,e,ug(r),i)}}var L_=qle(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]});const Xxt=Og(je("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz"),Zxt=["slots","slotProps"],Kxt=Dn(Gp)(({theme:e})=>it({display:"flex",marginLeft:`calc(${e.spacing(1)} * 0.5)`,marginRight:`calc(${e.spacing(1)} * 0.5)`},e.palette.mode==="light"?{backgroundColor:e.palette.grey[100],color:e.palette.grey[700]}:{backgroundColor:e.palette.grey[700],color:e.palette.grey[100]},{borderRadius:2,"&:hover, &:focus":it({},e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}),"&:active":it({boxShadow:e.shadows[0]},e.palette.mode==="light"?{backgroundColor:BY(e.palette.grey[200],.12)}:{backgroundColor:BY(e.palette.grey[600],.12)})})),Qxt=Dn(Xxt)({width:24,height:16});function Xle(e){const{slots:t={},slotProps:n={}}=e,r=Ln(e,Zxt),o=e;return je("li",{children:je(Kxt,it({focusRipple:!0},r,{ownerState:o,children:je(Qxt,it({as:t.CollapsedIcon,ownerState:o},n.collapsedIcon))}))})}process.env.NODE_ENV!=="production"&&(Xle.propTypes={slotProps:fe.shape({collapsedIcon:fe.oneOfType([fe.func,fe.object])}),slots:fe.shape({CollapsedIcon:fe.elementType}),sx:fe.object});function Jxt(e){return Br("MuiBreadcrumbs",e)}const ewt=Fr("MuiBreadcrumbs",["root","ol","li","separator"]),twt=["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],nwt=e=>{const{classes:t}=e;return oo({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},Jxt,t)},rwt=Dn(rs,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${ewt.li}`]:t.li},t.root]})({}),owt=Dn("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),iwt=Dn("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function awt(e,t,n,r){return e.reduce((o,i,a)=>(a<e.length-1?o=o.concat(i,je(iwt,{"aria-hidden":!0,className:t,ownerState:r,children:n},`separator-${a}`)):o.push(i),o),[])}const Zle=Kt(function(e,t){const n=Vr({props:e,name:"MuiBreadcrumbs"}),{children:r,className:o,component:i="nav",slots:a={},slotProps:s={},expandText:l="Show path",itemsAfterCollapse:c=1,itemsBeforeCollapse:d=1,maxItems:p=8,separator:u="/"}=n,k=Ln(n,twt),[v,h]=ut(!1),C=it({},n,{component:i,expanded:v,expandText:l,itemsAfterCollapse:c,itemsBeforeCollapse:d,maxItems:p,separator:u}),R=nwt(C),H=af({elementType:a.CollapsedIcon,externalSlotProps:s.collapsedIcon,ownerState:C}),U=pt(null),W=D=>{const z=()=>{h(!0);const N=U.current.querySelector("a[href],button,[tabindex]");N&&N.focus()};return d+c>=D.length?(process.env.NODE_ENV!=="production"&&console.error(["MUI: You have provided an invalid combination of props to the Breadcrumbs.",`itemsAfterCollapse={${c}} + itemsBeforeCollapse={${d}} >= maxItems={${p}}`].join(`
|
1011
1011
|
`)),D):[...D.slice(0,d),je(Xle,{"aria-label":l,slots:{CollapsedIcon:a.CollapsedIcon},slotProps:{collapsedIcon:H},onClick:z},"ellipsis"),...D.slice(D.length-c,D.length)]},A=va.toArray(r).filter(D=>(process.env.NODE_ENV!=="production"&&rw.isFragment(D)&&console.error(["MUI: The Breadcrumbs component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
|
1012
1012
|
`)),Mr(D))).map((D,z)=>je("li",{className:R.li,children:D},`child-${z}`));return je(rwt,it({ref:t,component:i,color:"text.secondary",className:bn(R.root,o),ownerState:C},k,{children:je(owt,{className:R.ol,ref:U,ownerState:C,children:awt(v||p&&A.length<=p?A:W(A),R.separator,u,C)})}))});process.env.NODE_ENV!=="production"&&(Zle.propTypes={children:fe.node,classes:fe.object,className:fe.string,component:fe.elementType,expandText:fe.string,itemsAfterCollapse:Zu,itemsBeforeCollapse:Zu,maxItems:Zu,separator:fe.node,slotProps:fe.shape({collapsedIcon:fe.oneOfType([fe.func,fe.object])}),slots:fe.shape({CollapsedIcon:fe.elementType}),sx:fe.oneOfType([fe.arrayOf(fe.oneOfType([fe.func,fe.object,fe.bool])),fe.func,fe.object])});function swt(e){return Br("MuiButton",e)}const Pk=Fr("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"]),Kle=rr({});process.env.NODE_ENV!=="production"&&(Kle.displayName="ButtonGroupContext");const Qle=rr(void 0);process.env.NODE_ENV!=="production"&&(Qle.displayName="ButtonGroupButtonContext");const lwt=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],cwt=e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,classes:a}=e,s={root:["root",i,`${i}${Zn(t)}`,`size${Zn(o)}`,`${i}Size${Zn(o)}`,`color${Zn(t)}`,n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${Zn(o)}`],endIcon:["icon","endIcon",`iconSize${Zn(o)}`]},l=oo(s,swt,a);return it({},a,l)},Jle=e=>it({},e.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},e.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},e.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),uwt=Dn(Gp,{shouldForwardProp:e=>Cf(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Zn(n.color)}`],t[`size${Zn(n.size)}`],t[`${n.variant}Size${Zn(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(({theme:e,ownerState:t})=>{var n,r;const o=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],i=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return it({},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":it({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:zr(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="text"&&t.color!=="inherit"&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:zr(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="outlined"&&t.color!=="inherit"&&{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})`:zr(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="contained"&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:i,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},t.variant==="contained"&&t.color!=="inherit"&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":it({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${Pk.focusVisible}`]:it({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${Pk.disabled}`]:it({color:(e.vars||e).palette.action.disabled},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},t.variant==="contained"&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},t.variant==="text"&&{padding:"6px 8px"},t.variant==="text"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main},t.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},t.variant==="outlined"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${zr(e.palette[t.color].main,.5)}`},t.variant==="contained"&&{color:e.vars?e.vars.palette.text.primary:(n=(r=e.palette).getContrastText)==null?void 0:n.call(r,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:o,boxShadow:(e.vars||e).shadows[2]},t.variant==="contained"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},t.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},t.size==="small"&&t.variant==="text"&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="text"&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="outlined"&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="outlined"&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="contained"&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="contained"&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})},({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${Pk.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${Pk.disabled}`]:{boxShadow:"none"}}),dwt=Dn("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${Zn(n.size)}`]]}})(({ownerState:e})=>it({display:"inherit",marginRight:8,marginLeft:-4},e.size==="small"&&{marginLeft:-2},Jle(e))),pwt=Dn("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${Zn(n.size)}`]]}})(({ownerState:e})=>it({display:"inherit",marginRight:-4,marginLeft:8},e.size==="small"&&{marginRight:-2},Jle(e))),cf=Kt(function(e,t){const n=Nn(Kle),r=Nn(Qle),o=yae(n,e),i=Vr({props:o,name:"MuiButton"}),{children:a,color:s="primary",component:l="button",className:c,disabled:d=!1,disableElevation:p=!1,disableFocusRipple:u=!1,endIcon:k,focusVisibleClassName:v,fullWidth:h=!1,size:C="medium",startIcon:R,type:H,variant:U="text"}=i,W=Ln(i,lwt),A=it({},i,{color:s,component:l,disabled:d,disableElevation:p,disableFocusRipple:u,fullWidth:h,size:C,type:H,variant:U}),D=cwt(A),z=R&&je(dwt,{className:D.startIcon,ownerState:A,children:R}),N=k&&je(pwt,{className:D.endIcon,ownerState:A,children:k}),B=r||"";return je(uwt,it({ownerState:A,className:bn(n.className,D.root,c,B),component:l,disabled:d,focusRipple:!u,focusVisibleClassName:bn(D.focusVisible,v),ref:t,type:H},W,{classes:D,children:[z,a,N]}))});process.env.NODE_ENV!=="production"&&(cf.propTypes={children:fe.node,classes:fe.object,className:fe.string,color:fe.oneOfType([fe.oneOf(["inherit","primary","secondary","success","error","info","warning"]),fe.string]),component:fe.elementType,disabled:fe.bool,disableElevation:fe.bool,disableFocusRipple:fe.bool,disableRipple:fe.bool,endIcon:fe.node,focusVisibleClassName:fe.string,fullWidth:fe.bool,href:fe.string,size:fe.oneOfType([fe.oneOf(["small","medium","large"]),fe.string]),startIcon:fe.node,sx:fe.oneOfType([fe.arrayOf(fe.oneOfType([fe.func,fe.object,fe.bool])),fe.func,fe.object]),type:fe.oneOfType([fe.oneOf(["button","reset","submit"]),fe.string]),variant:fe.oneOfType([fe.oneOf(["contained","outlined","text"]),fe.string])});const hwt=({clearDrilldownSelections:e,currentDimension:t,setIsHovered:n,themeProps:r})=>{const{t:o}=Fn(),i=t.name,a=It(cf,{target:"e1olvz1k0",label:"StyledCancelButton"})("&&{background-color:",r.activeDrillBackgroundColor,";color:",r.primaryButtonTextColor,";border-radius:100%;border:2px solid white;min-width:39px;width:39px;height:39px;z-index:10;padding:7px;cursor:pointer;text-transform:none;margin-right:-5px;&:hover{background-color:",r.activeDrillHoverBackgroundColor,";color:",r.primaryTextColor,";}}"),s=It("svg",{target:"e1olvz1k1",label:"Icon"})("width:22px;height:22px;fill:#9ea2ab;"),l=()=>ke(a,{theme:r,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),onClick:e,children:ke(s,{width:22,height:22,viewBox:"0 0 24 24",children:ke("path",{fill:"#9EA2AB",d:"M12 12.293L6.854 7.146a.5.5 0 1 0-.708.708L11.293 13l-5.147 5.146a.5.5 0 0 0 .708.708L12 13.707l5.146 5.147a.5.5 0 0 0 .708-.708L12.707 13l5.147-5.146a.5.5 0 0 0-.708-.708L12 12.293z"})})}),c=It(cf,{target:"e1olvz1k2",label:"StyledCurrentDrillButton"})("&&{position:relative;font-family:",d=>d.theme.fontFamily,";border-radius:0;border:1px solid ",od,";background-color:",d=>d.theme.chartBackgroundColor,";border-right:none;border-left:none;color:",d=>d.theme.secondaryTextColor,";padding-right:1.25rem;padding-left:1.875rem;height:1.64rem;font-size:13px;transition:background-color 0.2s,border-color 0.2s,color 0.2s;text-transform:none;cursor:auto;pointer-events:none;white-space:nowrap;&:hover{background-color:",d=>d.theme.chartBackgroundColor,";border:1px solid ",od,";border-right:none;border-left:none;}}");return{CancelButton:l,CurrentDrillButton:()=>Pt(c,{theme:r,children:[i," (",o("drilldown.breadcrumbsAllSuffix"),")",ke("span",{className:"flex items-center justify-between",children:ke("span",{className:"csdk-absolute csdk-right-[0px] csdk-top-[3px] csdk-h-[18px] csdk-w-[18px] csdk-transform csdk-translate-x-1/2 csdk-rotate-45",style:{backgroundColor:"transparent",borderTop:`1px solid ${od}`,borderRight:`1px solid ${od}`}})})]})}},fwt={modifiers:[{name:"offset",options:{offset:[0,12]}}]},mwt=({themeProps:e,filterDisplayValues:t,currentTable:n,currentColumn:r})=>{const{t:o}=Fn();return Pt("div",{className:"csdk-w-50 csdk-px-[12px] csdk-shadow-md csdk-shadow-gray-500 csdk-rounded-md csdk-bg-white",style:{backgroundColor:e.chartBackgroundColor,color:e.primaryTextColor},children:[Pt("div",{className:"csdk-border-b csdk-border-[#e4e4e4] csdk-p-3 csdk-pl-1",children:[ke(rs,{variant:"body2",fontFamily:e.fontFamily,fontSize:11,children:o("drilldown.popover.members")}),ke(rs,{variant:"body2",fontFamily:e.fontFamily,fontSize:13,children:t.join(", ")})]}),Pt("div",{className:"csdk-border-b csdk-border-[#e4e4e4] csdk-p-3 csdk-pl-1",children:[ke(rs,{variant:"body2",fontFamily:e.fontFamily,fontSize:11,children:o("drilldown.popover.table")}),ke(rs,{variant:"body2",fontFamily:e.fontFamily,fontSize:13,children:n})]}),Pt("div",{className:"csdk-p-3 csdk-pl-1",children:[ke(rs,{variant:"body2",fontFamily:e.fontFamily,fontSize:11,children:o("drilldown.popover.column")}),ke(rs,{variant:"body2",fontFamily:e.fontFamily,fontSize:13,children:r})]})]})},gwt=({popperParams:e,currentDimension:t,themeProps:n})=>{const r=t.expression.match(/\[(.*?)]/),[o,i]=r?r[1].split("."):["",""];return ke(Ng,{open:!!e,anchorEl:e==null?void 0:e.anchorEl,placement:"bottom",popperOptions:fwt,children:e&&ke(mwt,{themeProps:n,filterDisplayValues:e.filterDisplayValues,currentTable:o,currentColumn:i})})},vwt=()=>{const{themeSettings:{typography:{primaryTextColor:e,secondaryTextColor:t,fontFamily:n},general:{backgroundColor:r,brandColor:o,primaryButtonTextColor:i},chart:{backgroundColor:a}}}=mn(),s=mc(a,-.02),l=mc(s,-.05);return{primaryTextColor:e,secondaryTextColor:t,fontFamily:n,backgroundColor:r,brandColor:o,primaryButtonTextColor:i,chartBackgroundColor:a,activeDrillBackgroundColor:s,activeDrillHoverBackgroundColor:l}},ywt=It(su,{target:"egcu0nk0",label:"StyledPrevButton"})("&&{position:absolute;left:0;right:auto;margin:auto;bottom:0;top:0;z-index:10;background:linear-gradient(to right,white 30%,rgba(255,255,255,0) 100%);display:inline-flex;span[aria-label='prev-item']{width:0;height:0;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:5px solid #000;color:transparent;opacity:0.3;&:hover{opacity:0.8;}}}"),bwt=It(su,{target:"egcu0nk1",label:"StyledNextButton"})("&&{position:absolute;left:auto;right:0;margin:auto;bottom:0;top:0;z-index:10;background:linear-gradient(to right,rgba(255,255,255,0) 0,white 70%);display:inline-flex;span[aria-label='next-item']{width:0;height:0;border-top:6px solid transparent;border-bottom:6px solid transparent;border-left:5px solid #000;color:transparent;opacity:0.3;&:hover{opacity:0.8;}}}"),xwt=({currentDimension:e,children:t})=>{const{t:n}=Fn(),r=pt(null),[o,i]=ut(0),[a,s]=ut(0),[l,c]=ut(0),d=()=>{var v;return(v=r.current)==null?void 0:v.querySelector("ol")};xt(()=>{const v=d();if(v){const h=v.clientWidth,C=v.scrollWidth,R=v.scrollLeft;i(h),s(C),c(R)}},[e]),xt(()=>{const v=d();function h(){if(v){const H=v.clientWidth;i(H)}}function C(){if(v){const H=v.scrollLeft;c(H)}}const R=new ResizeObserver(h);return v?(R.observe(v),v.addEventListener("scroll",C),()=>{R.disconnect(),v.removeEventListener("scroll",C)}):()=>{}},[]);const p=v=>{const h="smooth",C=d();C&&C.scrollBy({left:v==="right"?200:-200,behavior:h})},u=l!=0,k=Math.floor(a-l)>o;return Pt("div",{style:{position:"relative"},children:[u&&ke(ywt,{onClick:()=>p("left"),children:ke("span",{"aria-label":"prev-item",children:n("drilldown.breadcrumbsPrev")})}),k&&ke(bwt,{onClick:()=>p("right"),children:ke("span",{"aria-label":"next-item",children:n("drilldown.breadcrumbsNext")})}),ke("div",{ref:r,children:t})]})},od="#F2F2F2",wwt=It(cf,{target:"ex0ybhj0",label:"StyledDrillButton"})("&&{font-family:",({theme:e})=>e.fontFamily,";position:relative;border-radius:0;border:1px solid ",od,";border-right:none;color:",({active:e,theme:t})=>e==="true"?t.primaryTextColor:t.secondaryTextColor,";background-color:",({active:e,theme:t})=>e==="true"?t.activeDrillBackgroundColor:t.chartBackgroundColor,";padding-right:1.25rem;padding-left:1.875rem;height:1.64rem;font-size:13px;text-transform:none;transition:background-color 0.2s,border-color 0.2s,color 0.2s;white-space:nowrap;cursor:",({active:e})=>e==="true"?"pointer":"auto",";margin-right:",({active:e})=>e==="true"?"5px":"0px",";&:hover{background-color:",({active:e,theme:t})=>e==="true"?t.activeDrillHoverBackgroundColor:t.chartBackgroundColor,";border:1px solid ",od,";border-right:none;}.MuiTouchRipple-root{display:none;}}"),_wt=It(Zle,{target:"ex0ybhj1",label:"StyledBreadcrumbs"})(".MuiBreadcrumbs-ol{flex-wrap:nowrap;overflow:hidden;}.MuiBreadcrumbs-separator{display:none;}"),Swt=({isActive:e,filterDisplayValue:t,handleMouseEnter:n,handleMouseLeave:r,handleClick:o,themeProps:i,popperParams:a,index:s})=>ke(wwt,{theme:i,active:e.toString(),index:s,onMouseEnter:n,onMouseLeave:r,onClick:o,children:Pt("span",{className:"flex items-center justify-between",children:[Pt("span",{className:"mr-2",children:[t.slice(0,2).join(", "),t.length>2&&", ..."]}),e?ke("span",{className:"csdk-absolute csdk-right-0 csdk-h-[18px] csdk-w-[18px] csdk-top-[3px] csdk-translate-x-1/2 csdk-rotate-45",style:{backgroundColor:t===(a==null?void 0:a.filterDisplayValues)?i.activeDrillHoverBackgroundColor:i.activeDrillBackgroundColor,borderTop:`1px solid ${od}`,borderRight:`1px solid ${od}`,transition:"background-color 0.2s, border-color 0.2s, color 0.2s",zIndex:8}}):void 0,ke("span",{className:`csdk-absolute ${e?"csdk-h-[18px] csdk-w-[18px] csdk-top-[3px] csdk-right-[-15px]":"csdk-h-[10px] csdk-w-[10px] csdk-top-[7px] csdk-right-[-5px]"} csdk-transform translate-x-1/2 csdk-rotate-45`,style:{backgroundColor:i.chartBackgroundColor,borderTop:`1px solid ${od}`,borderRight:`1px solid ${od}`,zIndex:7,transition:"background-color 0.2s, border-color 0.2s, color 0.2s"}})]})}),z6=mr({componentName:"DrilldownBreadcrumbs",shouldSkipSisenseContextWaiting:!0})(({filtersDisplayValues:e,currentDimension:t,clearDrilldownSelections:n,sliceDrilldownSelections:r})=>{const[o,i]=ut(null),[a,s]=ut(!1),l=vwt(),{CancelButton:c,CurrentDrillButton:d}=hwt({clearDrilldownSelections:n,currentDimension:t,isHovered:a,setIsHovered:s,themeProps:l}),p=h=>C=>{s(!0),i({filterDisplayValues:h,anchorEl:C.currentTarget})},u=()=>{s(!1),i(null)},k=h=>h<e.length-1,v=h=>h===e.length-2;return e.length?ke("div",{"aria-label":"drilldown-breadcrumbs",children:ke(xwt,{currentDimension:t,children:Pt(_wt,{separator:null,sx:{backgroundColor:l.chartBackgroundColor,padding:"4px"},children:[ke(c,{}),e.map((h,C)=>{const R=k(C),H=v(C);return ke("div",{children:ke(Swt,{isActive:R,isLastActive:H,filterDisplayValue:h,handleMouseEnter:p(h),handleMouseLeave:u,handleClick:()=>r(C+1),themeProps:l,popperParams:o,index:C})},C)}),ke(d,{}),ke(gwt,{popperParams:o,currentDimension:t,themeProps:l})]})})}):null}),ece=e=>{const{initialDimension:t,onDrilldownSelectionsChange:n}=e,r=bt(()=>e.drilldownPaths||[],[e.drilldownPaths]),o=bt(()=>e.drilldownSelections||[],[e.drilldownSelections]),{t:i}=Fn();if(!t)throw new Qt("errors.drilldownNoInitialDimension");const[a,s]=ny(o,{onLocalStateChange:n}),l=bt(()=>[cu(t),...a.map(({nextDimension:C})=>C)],[t,a]),c=bt(()=>r.filter(C=>{if(xn.isAttribute(C)){const H=C;return l.every(U=>!Xs(U,H))}const R=C;return l.every((H,U)=>Xs(H,R.levels[U]))}),[r,l]),d=ct((C,R,H)=>{s(U=>tce(U,C,R,H))},[s]),p=ct(C=>{s(R=>R.slice(0,C))},[s]),u=ct(()=>{s([])},[s]),{drilldownFilters:k,drilldownFiltersDisplayValues:v,drilldownDimension:h}=bt(()=>nce(a,t,i),[a,t,i]);return{drilldownSelections:a,availableDrilldownPaths:c,drilldownFilters:k,drilldownFiltersDisplayValues:v,drilldownDimension:h,selectDrilldown:d,sliceDrilldownSelections:p,clearDrilldownSelections:u}},tce=(e,t,n,r)=>{var o,i;if(!(r!=null&&r.levels))return[...e,{points:t,nextDimension:n}];if(Xs(r.levels[0],n))return[];const a=(o=e==null?void 0:e.findIndex(p=>Xs(p.nextDimension,n)))!=null?o:-1;if(a!==-1)return e.slice(0,a+1);const s=(i=qI(e))==null?void 0:i.nextDimension,l=e.length?r.levels.findIndex(p=>s&&Xs(p,s)):0,c=r.levels.indexOf(n),d=r.levels.slice(l+1,c+1).map((p,u)=>({points:u===0?t:[],nextDimension:p}));return[...e,...d]},nce=(e,t,n)=>{let r=t&&cu(t);const o=[],i=[];return e.forEach(({points:a,nextDimension:s})=>{o.push(Es(r,a.map(kwt)));const l=a.length?a.map(rce):[`${r.name} (${n("drilldown.breadcrumbsAllSuffix")})`];i.push(l),r=s}),{drilldownFilters:o,drilldownFiltersDisplayValues:i,drilldownDimension:r}};function rce(e){return"categoryDisplayValue"in e?`${e.categoryDisplayValue}`:"categoryValue"in e?`${e.categoryValue}`:""}function kwt(e){return"categoryValue"in e?`${e.categoryValue}`:""}var Cwt=Object.prototype,Mwt=Cwt.hasOwnProperty,Twt=qle(function(e,t,n){Mwt.call(e,n)?e[n].push(t):Ow(e,n,[t])});function Ewt(e,t){return t.all?[]:e.filter(n=>{var r;return!((r=t.ids)!=null&&r.includes(n.config.guid))})}function oce(e,t){return e.find(n=>Xs(n.attribute,t))}function ice(e,t,n){const r=oce(n,e);return Es(e,t.map(o=>`${o}`),{guid:r==null?void 0:r.config.guid,backgroundFilter:r==null?void 0:r.config.backgroundFilter})}function ace(e,t){return R6(e,t)&&"members"in e&&"members"in t&&Zs(e.members,t.members)}var ry=function(e){return e.DRILLDOWN_CHART_POINTS_SELECTION="drilldown-chart-points-selection",e.DRILLDOWN_DRILL_DIRECTIONS="drilldown-drill-directions",e.CROSSFILTERING_CHART_POINTS_SELECTION="crossfiltering-chart-points-selection",e}({});const sce=2;function Gy(e,t){const n=e.flatMap(({entries:o={}})=>t.flatMap(i=>{const a=o[i];return a?(Array.isArray(a)?a:[a]).filter(({attribute:s})=>!!s):[]})),r=Twt(n,({id:o})=>o);return Object.values(r).map(o=>({attribute:o[0].attribute,values:PR(o.map(({value:i})=>i)),displayValues:PR(o.map(({displayValue:i})=>i))}))}function Awt(e){return Gy(e,["category"])}function Owt(e){return Gy(e,["category"])}function Pwt(e,t){const n=Gy(e,["category"]),r=n.length-1;return t.category.map((o,i)=>r===i?n[i]:{attribute:cu(o),values:[],displayValues:[]})}function Dwt(e){return Gy(e,["x","y","breakByPoint","breakByColor"])}function Nwt(e){return Gy(e,["geo"])}function Lwt(e){return Gy(e,["geo"])}function AC(e,t,n){return e==="plugin"?[]:e==="text"?[]:e==="pivot"?[]:e==="treemap"||e==="sunburst"?Pwt(n,t):yu(e)||e==="pie"||e==="funnel"?Awt(n):_f(e)?Owt(n):uu(e)?Dwt(n):Sg(e)?Nwt(n):J4(e)?Lwt(n):[]}function B6(e,t){let n=[];return e==="plugin"?n=[]:e==="text"?n=[]:e==="pivot"?n=[...t.rows||[],...t.columns||[]]:yu(e)||wf(e)||_f(e)||Oy(e)?n=[...t.category]:uu(e)?n=[t.x,t.y,t.breakByPoint,t.breakByColor].filter(r=>!!(r&&!Mo(r))):(Sg(e)||J4(e))&&(n=[...t.geo]),n.map(cu)}function Rwt(e,t,n){const r=oce(t,e.attribute);if(!r||L6(r))return null;if(ace(e,r))return OA(e);if(ja(r)&&n){const[o,i]=L_(r.members,a=>e.members.includes(a));if(o.length===e.members.length&&i.length)return ice(e.attribute,i,[r])}return null}function Iwt(e,t,n){const r=t.filter(a=>!a.config.disabled),o=e.map(a=>Rwt(a,r,n)).filter(a=>!!a),i=e.length!==o.length;return{filters:i?e:o,isSelection:i}}function xN(e,t,n=!1){const r=e.map(({attribute:i,values:a})=>ice(i,a,t)),o=jwt(t,r);return Iwt(o,t,n)}function jwt(e,t){const n=e.filter(r=>r.config.locked);return n.length?t.filter(r=>!n.some(o=>R6(o,r))):t}function zwt(e,t,n){const r=AC(e,t,n).filter(({displayValues:s})=>s.length);if(r.length===0)return"";const[o]=r,i=n.length===1,a=o.displayValues.length>sce;return r.length>1?i?r.map(s=>s.displayValues[0]).join(", "):a?"":o.displayValues.join(", "):a?o.attribute.name:o.displayValues.join(", ")}function OV(e,t,n){const r=zwt(e,t,n);return r?{id:ry.CROSSFILTERING_CHART_POINTS_SELECTION,sectionTitle:r}:null}function PV(e,t){return{items:[{caption:e,onClick:t}]}}const Bwt=({initialDimension:e,drilldownPaths:t,drilldownSelections:n,openMenu:r,onDrilldownSelectionsChange:o})=>{const{t:i}=Fn(),{availableDrilldownPaths:a,drilldownFilters:s,drilldownFiltersDisplayValues:l,drilldownDimension:c,selectDrilldown:d,sliceDrilldownSelections:p,clearDrilldownSelections:u}=ece({initialDimension:e,drilldownPaths:t,drilldownSelections:n,onDrilldownSelectionsChange:o}),k=ct((h,C)=>{const R=[F6(C,c),H6(a,c,(H,U)=>{d(C,H,U)},i)];r({position:h,itemSections:R})},[c,a,i,d,r]),v=bt(()=>c&&ke(z6,{filtersDisplayValues:l,currentDimension:c,clearDrilldownSelections:u,sliceDrilldownSelections:p}),[u,c,l,p]);return{drilldownDimension:c,drilldownFilters:s,breadcrumbs:v,openDrilldownMenu:k}};function F6(e,t){const n=PR(e.map(rce).filter(r=>!!r));return n.length>sce?{id:ry.DRILLDOWN_CHART_POINTS_SELECTION,sectionTitle:t.name}:{id:ry.DRILLDOWN_CHART_POINTS_SELECTION,sectionTitle:n.join(", ")}}function Fwt(e){return 30+12*e}function H6(e,t,n,r){const[o,i]=L_(e,xn.isAttribute.bind(xn)),a=o.map(l=>({caption:l.name,onClick:()=>n(l)})),s=i.map(l=>({caption:l.title,subItems:[{items:l.levels.map((c,d)=>({caption:c.name,class:d===0?"":"csdk-drilldown-hierarchy-nested-menu-item",style:{paddingLeft:`${Fwt(d)}px`},disabled:Xs(c,t),onClick:()=>n(c,l)}))}]}));return{id:ry.DRILLDOWN_DRILL_DIRECTIONS,sectionTitle:r("drilldown.drillMenuItem"),items:[...s,...a]}}var uw=function(e){return e.HIGHLIGHT="highlight",e.FILTER="filter",e}({});function lce(e){return function(t){t=Gh(t);var n=Aae(t)?fR(t):void 0,r=n?n[0]:t.charAt(0),o=n?Eae(n,1).join(""):t.slice(1);return r[e]()+o}}var Hwt=lce("toUpperCase");function Wwt(e){return Hwt(Gh(e).toLowerCase())}function $wt(e,t,n,r){for(var o=-1,i=e==null?0:e.length;++o<i;)n=t(n,e[o],o,e);return n}function Uwt(e){return function(t){return e==null?void 0:e[t]}}var Ywt={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Gwt=Uwt(Ywt),Vwt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,qwt="\\u0300-\\u036f",Xwt="\\ufe20-\\ufe2f",Zwt="\\u20d0-\\u20ff",Kwt=qwt+Xwt+Zwt,Qwt="["+Kwt+"]",Jwt=RegExp(Qwt,"g");function e_t(e){return e=Gh(e),e&&e.replace(Vwt,Gwt).replace(Jwt,"")}var t_t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function n_t(e){return e.match(t_t)||[]}var r_t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function o_t(e){return r_t.test(e)}var cce="\\ud800-\\udfff",i_t="\\u0300-\\u036f",a_t="\\ufe20-\\ufe2f",s_t="\\u20d0-\\u20ff",l_t=i_t+a_t+s_t,uce="\\u2700-\\u27bf",dce="a-z\\xdf-\\xf6\\xf8-\\xff",c_t="\\xac\\xb1\\xd7\\xf7",u_t="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",d_t="\\u2000-\\u206f",p_t=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",pce="A-Z\\xc0-\\xd6\\xd8-\\xde",h_t="\\ufe0e\\ufe0f",hce=c_t+u_t+d_t+p_t,fce="['’]",DV="["+hce+"]",f_t="["+l_t+"]",mce="\\d+",m_t="["+uce+"]",gce="["+dce+"]",vce="[^"+cce+hce+mce+uce+dce+pce+"]",g_t="\\ud83c[\\udffb-\\udfff]",v_t="(?:"+f_t+"|"+g_t+")",y_t="[^"+cce+"]",yce="(?:\\ud83c[\\udde6-\\uddff]){2}",bce="[\\ud800-\\udbff][\\udc00-\\udfff]",Y0="["+pce+"]",b_t="\\u200d",NV="(?:"+gce+"|"+vce+")",x_t="(?:"+Y0+"|"+vce+")",LV="(?:"+fce+"(?:d|ll|m|re|s|t|ve))?",RV="(?:"+fce+"(?:D|LL|M|RE|S|T|VE))?",xce=v_t+"?",wce="["+h_t+"]?",w_t="(?:"+b_t+"(?:"+[y_t,yce,bce].join("|")+")"+wce+xce+")*",__t="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",S_t="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",k_t=wce+xce+w_t,C_t="(?:"+[m_t,yce,bce].join("|")+")"+k_t,M_t=RegExp([Y0+"?"+gce+"+"+LV+"(?="+[DV,Y0,"$"].join("|")+")",x_t+"+"+RV+"(?="+[DV,Y0+NV,"$"].join("|")+")",Y0+"?"+NV+"+"+LV,Y0+"+"+RV,S_t,__t,mce,C_t].join("|"),"g");function T_t(e){return e.match(M_t)||[]}function E_t(e,t,n){return e=Gh(e),t=t,t===void 0?o_t(e)?T_t(e):n_t(e):e.match(t)||[]}var A_t="['’]",O_t=RegExp(A_t,"g");function P_t(e){return function(t){return $wt(E_t(e_t(t).replace(O_t,"")),e,"")}}var _ce=P_t(function(e,t,n){return t=t.toLowerCase(),e+(n?Wwt(t):t)});function D_t(e){const{_id:t,title:n,levels:r}=e;return{id:t,title:n,levels:r.map(o=>Fw(o))}}function Sce(e,t,n){return bu(this,null,function*(){const r=yield new Cg(e,n).getHierarchies(t);return r==null?void 0:r.map(o=>D_t(o))})}function N_t(e){const t=bc(e,["dataSource","dimension","ids","alwaysIncluded"]),n=Lg(e,t),[r,o]=wc(wd,{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0}),{isInitialized:i,app:a}=Er();return xt(()=>{i||o({type:"error",error:new Qt("errors.sisenseContextNotFound")}),n(a)&&(o({type:"loading"}),Sce(a.httpClient,e,a.defaultDataSource).then(s=>{o({type:"success",data:s})}).catch(s=>{o({type:"error",error:s})}))},[a,i,e,n]),r.data&&t?IV(wd(r,{type:"loading"})):IV(r)}function IV(e){const t=e,{data:n}=t,r=m_(t,["data"]);return an(Lt({},r),{hierarchies:n})}function L_t({attribute:e,dataSource:t,drilldownPaths:n=[],enabled:r}){const[o,i]=bt(()=>L_(n,Yle),[n]),{hierarchies:a=[]}=N_t({enabled:r,dataSource:t,dimension:e,ids:o,alwaysIncluded:!0});return bt(()=>a.length?[...a,...i]:i,[a,i])}function R_t(e,t){return B6(e,t)[0]}function I_t(e){return[...SE,...kE,...CE,...ME,...TE].includes(e)}function j_t(e,t){return B6(e,t).length===1}function z_t(e,t){return j_t(e,t)&&I_t(e)}function kce(e,t,n){const r=o=>!!o&&!Xs(n,cu(o));if(yu(e)||wf(e)||_f(e)||Oy(e)){const o=t.category[0];if(r(o))return an(Lt({},t),{category:[n]})}else if(uu(e)){const o=t,i=["x","y","breakByPoint","breakByColor"];for(const a of i){const s=o[a];if(s&&!Mo(s)&&r(s))return an(Lt({},o),{[a]:n})}}return t}function jV(e,t,n){return e.map(r=>{const o=["x","y","breakByPoint","breakByColor"],i=[...o,"size"].some(s=>s in r),a=o.find(s=>n[s]&&!Mo(n[s]));if(i){const s=t,l=s.type==="mouseup";l&&console.warn("No drilldown support for multi-selection in scatter chart");const c=l?r[a]:s.point.options.custom[_ce(`{masked ${a}`)];return{categoryValue:c,categoryDisplayValue:c}}return r})}const B_t=({propsToExtend:e,onDrilldownSelectionsChange:t})=>{const{chartType:n,dataOptions:r,dataSource:o,drilldownOptions:i}=e,{drilldownSelections:a}=i||{},{openMenu:s}=j6(),l=bt(()=>z_t(n,r),[n,r]),c=bt(()=>[...(i==null?void 0:i.drilldownPaths)||[],...(i==null?void 0:i.drilldownDimensions)||[]],[i==null?void 0:i.drilldownPaths,i==null?void 0:i.drilldownDimensions]),d=bt(()=>{const z=RZ({name:"dummy drilldown initial attribute"});return R_t(n,r)||z},[n,r]),p=L_t({attribute:d,dataSource:o,drilldownPaths:c,enabled:l}),u=bt(()=>{var z,N;return(((z=i==null?void 0:i.drilldownSelections)==null?void 0:z.length)||((N=i==null?void 0:i.drilldownDimensions)==null?void 0:N.length)||(p==null?void 0:p.length))&&l},[i,l,p]),{drilldownDimension:k,drilldownFilters:v,breadcrumbs:h,openDrilldownMenu:C}=Bwt({initialDimension:d,drilldownSelections:a,drilldownPaths:p,openMenu:s,onDrilldownSelectionsChange:t}),R=ct((z,N)=>{const B=jV(z,N,r);C({left:N.clientX,top:N.clientY},B)},[r,C]),H=ct((z,N)=>{const B=jV([z],N,r);C({left:N.clientX,top:N.clientY},B)},[r,C]),U=bt(()=>kce(n,r,k),[n,r,k]),W=bt(()=>v.length?kC(e.filters||[],v):e.filters,[e.filters,v]),A=bt(()=>xp([R,e.onDataPointsSelected]),[R,e.onDataPointsSelected]),D=bt(()=>xp([H,e.onDataPointContextMenu]),[H,e.onDataPointContextMenu]);return{propsWithDrilldown:Lt(Lt({},e),u&&{dataOptions:U,filters:W,onDataPointsSelected:A,onDataPointContextMenu:D}),isDrilldownEnabled:u,breadcrumbs:h}},W6=mr({componentName:"ChartWidget"})(e=>{var t,n;const{app:r}=Er(),{chartType:o,dataSource:i=r==null?void 0:r.defaultDataSource,dataOptions:a,styleOptions:s,highlightSelectionDisabled:l=!1,highlights:c,description:d,onChange:p}=e,{width:u,height:k}=s||{},v=lA(o,{hasHeader:!((t=s==null?void 0:s.header)!=null&&t.hidden)}),[h,C]=ut(0),R=bt(()=>bK(s,["width","height"]),[s]),H=ct(E=>{p==null||p({drilldownOptions:{drilldownSelections:E}})},[p]),{propsWithDrilldown:U,isDrilldownEnabled:W,breadcrumbs:A}=B_t({propsToExtend:e,onDrilldownSelectionsChange:H}),D=Uxt({chartType:o,dataOptions:a,enabled:!l&&!W&&!(c!=null&&c.length)}),z=(n=r==null?void 0:r.settings.accessibilityConfig)==null?void 0:n.enabled,N=ct(E=>{var x;return z?an(Lt({},E),{accessibility:an(Lt({},E.accessibility),{description:d??((x=E.accessibility)==null?void 0:x.description)})}):E},[d,z]);if(!o||!a)return null;const B=an(Lt({},U),{dataSet:i,styleOptions:R,refreshCounter:h,onDataPointClick:bt(()=>xp([D.onDataPointClick,e.onDataPointClick]),[D.onDataPointClick,e.onDataPointClick]),onDataPointContextMenu:U.onDataPointContextMenu,onDataPointsSelected:bt(()=>xp([D.onDataPointsSelected,U.onDataPointsSelected]),[D.onDataPointsSelected,U.onDataPointsSelected]),onBeforeRender:bt(()=>xp([N,D.onBeforeRender,e.onBeforeRender],!0),[N,D.onBeforeRender,e.onBeforeRender])});return ke(Ag,{defaultSize:v,size:{width:u,height:k},children:ke(EA,an(Lt({},e),{topSlot:Pt(yr,{children:[e.topSlot,A]}),dataSetName:i&&kd(i),onRefresh:()=>C(h+1),children:ke(Wa,Lt({},B))}))})});class Vy{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){const n={listener:t};return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}const dw=typeof window>"u"||"Deno"in window;function ql(){}function F_t(e,t){return typeof e=="function"?e(t):e}function DR(e){return typeof e=="number"&&e>=0&&e!==1/0}function Cce(e,t){return Math.max(e+(t||0)-Date.now(),0)}function B1(e,t,n){return R_(e)?typeof t=="function"?an(Lt({},n),{queryKey:e,queryFn:t}):an(Lt({},t),{queryKey:e}):e}function H_t(e,t,n){return R_(e)?an(Lt({},t),{mutationKey:e}):typeof e=="function"?an(Lt({},t),{mutationFn:e}):Lt({},e)}function wh(e,t,n){return R_(e)?[an(Lt({},t),{queryKey:e}),n]:[e||{},t]}function zV(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:a,stale:s}=e;if(R_(a)){if(r){if(t.queryHash!==$6(a,t.options))return!1}else if(!nv(t.queryKey,a))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||typeof o<"u"&&o!==t.state.fetchStatus||i&&!i(t))}function BV(e,t){const{exact:n,fetching:r,predicate:o,mutationKey:i}=e;if(R_(i)){if(!t.options.mutationKey)return!1;if(n){if(Cm(t.options.mutationKey)!==Cm(i))return!1}else if(!nv(t.options.mutationKey,i))return!1}return!(typeof r=="boolean"&&t.state.status==="loading"!==r||o&&!o(t))}function $6(e,t){return((t==null?void 0:t.queryKeyHashFn)||Cm)(e)}function Cm(e){return JSON.stringify(e,(t,n)=>NR(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function nv(e,t){return Mce(e,t)}function Mce(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Mce(e[n],t[n])):!1}function Tce(e,t){if(e===t)return e;const n=FV(e)&&FV(t);if(n||NR(e)&&NR(t)){const r=n?e.length:Object.keys(e).length,o=n?t:Object.keys(t),i=o.length,a=n?[]:{};let s=0;for(let l=0;l<i;l++){const c=n?l:o[l];a[c]=Tce(e[c],t[c]),a[c]===e[c]&&s++}return r===i&&s===r?e:a}return t}function kM(e,t){if(e&&!t||t&&!e)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function FV(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function NR(e){if(!HV(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!HV(n)||!n.hasOwnProperty("isPrototypeOf"))}function HV(e){return Object.prototype.toString.call(e)==="[object Object]"}function R_(e){return Array.isArray(e)}function Ece(e){return new Promise(t=>{setTimeout(t,e)})}function WV(e){Ece(0).then(e)}function W_t(){if(typeof AbortController=="function")return new AbortController}function LR(e,t,n){return n.isDataEqual!=null&&n.isDataEqual(e,t)?e:typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Tce(e,t):t}class $_t extends Vy{constructor(){super(),this.setup=t=>{if(!dw&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",n,!1),()=>{window.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()})}setFocused(t){this.focused!==t&&(this.focused=t,this.onFocus())}onFocus(){this.listeners.forEach(({listener:t})=>{t()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const CM=new $_t,$V=["online","offline"];class U_t extends Vy{constructor(){super(),this.setup=t=>{if(!dw&&window.addEventListener){const n=()=>t();return $V.forEach(r=>{window.addEventListener(r,n,!1)}),()=>{$V.forEach(r=>{window.removeEventListener(r,n)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setOnline(r):this.onOnline()})}setOnline(t){this.online!==t&&(this.online=t,this.onOnline())}onOnline(){this.listeners.forEach(({listener:t})=>{t()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const MM=new U_t;function Y_t(e){return Math.min(1e3*rc(2,e),3e4)}function PA(e){return(e??"online")==="online"?MM.isOnline():!0}class Ace{constructor(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}}function OC(e){return e instanceof Ace}function Oce(e){let t=!1,n=0,r=!1,o,i,a;const s=new Promise((C,R)=>{i=C,a=R}),l=C=>{r||(k(new Ace(C)),e.abort==null||e.abort())},c=()=>{t=!0},d=()=>{t=!1},p=()=>!CM.isFocused()||e.networkMode!=="always"&&!MM.isOnline(),u=C=>{r||(r=!0,e.onSuccess==null||e.onSuccess(C),o==null||o(),i(C))},k=C=>{r||(r=!0,e.onError==null||e.onError(C),o==null||o(),a(C))},v=()=>new Promise(C=>{o=R=>{const H=r||!p();return H&&C(R),H},e.onPause==null||e.onPause()}).then(()=>{o=void 0,r||e.onContinue==null||e.onContinue()}),h=()=>{if(r)return;let C;try{C=e.fn()}catch(R){C=Promise.reject(R)}Promise.resolve(C).then(u).catch(R=>{var H,U;if(r)return;const W=(H=e.retry)!=null?H:3,A=(U=e.retryDelay)!=null?U:Y_t,D=typeof A=="function"?A(n,R):A,z=W===!0||typeof W=="number"&&n<W||typeof W=="function"&&W(n,R);if(t||!z){k(R);return}n++,e.onFail==null||e.onFail(n,R),Ece(D).then(()=>{if(p())return v()}).then(()=>{t?k(R):h()})})};return PA(e.networkMode)?h():v().then(h),{promise:s,cancel:l,continue:()=>o!=null&&o()?s:Promise.resolve(),cancelRetry:c,continueRetry:d}}const U6=console;function G_t(){let e=[],t=0,n=l=>{l()},r=l=>{l()};const o=l=>{let c;t++;try{c=l()}finally{t--,t||s()}return c},i=l=>{t?e.push(l):WV(()=>{n(l)})},a=l=>(...c)=>{i(()=>{l(...c)})},s=()=>{const l=e;e=[],l.length&&WV(()=>{r(()=>{l.forEach(c=>{n(c)})})})};return{batch:o,batchCalls:a,schedule:i,setNotifyFunction:l=>{n=l},setBatchNotifyFunction:l=>{r=l}}}const Ii=G_t();class Pce{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),DR(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(t){this.cacheTime=Math.max(this.cacheTime||0,t??(dw?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class V_t extends Pce{constructor(t){super(),this.abortSignalConsumed=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.logger=t.logger||U6,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||q_t(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(t){this.options=Lt(Lt({},this.defaultOptions),t),this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(t,n){const r=LR(this.state.data,t,this.options);return this.dispatch({data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){this.dispatch({type:"setState",state:t,setStateOptions:n})}cancel(t){var n;const r=this.promise;return(n=this.retryer)==null||n.cancel(t),r?r.then(ql).catch(ql):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(t=>t.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(t=>t.getCurrentResult().isStale)}isStaleByTime(t=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!Cce(this.state.dataUpdatedAt,t)}onFocus(){var t;const n=this.observers.find(r=>r.shouldFetchOnWindowFocus());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}onOnline(){var t;const n=this.observers.find(r=>r.shouldFetchOnReconnect());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(t,n){var r,o;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&n!=null&&n.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var i;return(i=this.retryer)==null||i.continueRetry(),this.promise}}if(t&&this.setOptions(t),!this.options.queryFn){const k=this.observers.find(v=>v.options.queryFn);k&&this.setOptions(k.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||this.logger.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const a=W_t(),s={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},l=k=>{Object.defineProperty(k,"signal",{enumerable:!0,get:()=>{if(a)return this.abortSignalConsumed=!0,a.signal}})};l(s);const c=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(s)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'"),d={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:c};if(l(d),(r=this.options.behavior)==null||r.onFetch(d),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((o=d.fetchOptions)==null?void 0:o.meta)){var p;this.dispatch({type:"fetch",meta:(p=d.fetchOptions)==null?void 0:p.meta})}const u=k=>{if(OC(k)&&k.silent||this.dispatch({type:"error",error:k}),!OC(k)){var v,h,C,R;(v=(h=this.cache.config).onError)==null||v.call(h,k,this),(C=(R=this.cache.config).onSettled)==null||C.call(R,this.state.data,k,this),process.env.NODE_ENV!=="production"&&this.logger.error(k)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=Oce({fn:d.fetchFn,abort:a==null?void 0:a.abort.bind(a),onSuccess:k=>{var v,h,C,R;if(typeof k>"u"){process.env.NODE_ENV!=="production"&&this.logger.error("Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: "+this.queryHash),u(new Error(this.queryHash+" data is undefined"));return}this.setData(k),(v=(h=this.cache.config).onSuccess)==null||v.call(h,k,this),(C=(R=this.cache.config).onSettled)==null||C.call(R,k,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:u,onFail:(k,v)=>{this.dispatch({type:"failed",failureCount:k,error:v})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(t){const n=r=>{var o,i;switch(t.type){case"failed":return an(Lt({},r),{fetchFailureCount:t.failureCount,fetchFailureReason:t.error});case"pause":return an(Lt({},r),{fetchStatus:"paused"});case"continue":return an(Lt({},r),{fetchStatus:"fetching"});case"fetch":return Lt(an(Lt({},r),{fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(o=t.meta)!=null?o:null,fetchStatus:PA(this.options.networkMode)?"fetching":"paused"}),!r.dataUpdatedAt&&{error:null,status:"loading"});case"success":return Lt(an(Lt({},r),{data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:(i=t.dataUpdatedAt)!=null?i:Date.now(),error:null,isInvalidated:!1,status:"success"}),!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null});case"error":const a=t.error;return OC(a)&&a.revert&&this.revertState?an(Lt({},this.revertState),{fetchStatus:"idle"}):an(Lt({},r),{error:a,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"});case"invalidate":return an(Lt({},r),{isInvalidated:!0});case"setState":return Lt(Lt({},r),t.state)}};this.state=n(this.state),Ii.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate(t)}),this.cache.notify({query:this,type:"updated",action:t})})}}function q_t(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=typeof t<"u",r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"loading",fetchStatus:"idle"}}class X_t extends Vy{constructor(t){super(),this.config=t||{},this.queries=[],this.queriesMap={}}build(t,n,r){var o;const i=n.queryKey,a=(o=n.queryHash)!=null?o:$6(i,n);let s=this.get(a);return s||(s=new V_t({cache:this,logger:t.getLogger(),queryKey:i,queryHash:a,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(s)),s}add(t){this.queriesMap[t.queryHash]||(this.queriesMap[t.queryHash]=t,this.queries.push(t),this.notify({type:"added",query:t}))}remove(t){const n=this.queriesMap[t.queryHash];n&&(t.destroy(),this.queries=this.queries.filter(r=>r!==t),n===t&&delete this.queriesMap[t.queryHash],this.notify({type:"removed",query:t}))}clear(){Ii.batch(()=>{this.queries.forEach(t=>{this.remove(t)})})}get(t){return this.queriesMap[t]}getAll(){return this.queries}find(t,n){const[r]=wh(t,n);return typeof r.exact>"u"&&(r.exact=!0),this.queries.find(o=>zV(r,o))}findAll(t,n){const[r]=wh(t,n);return Object.keys(r).length>0?this.queries.filter(o=>zV(r,o)):this.queries}notify(t){Ii.batch(()=>{this.listeners.forEach(({listener:n})=>{n(t)})})}onFocus(){Ii.batch(()=>{this.queries.forEach(t=>{t.onFocus()})})}onOnline(){Ii.batch(()=>{this.queries.forEach(t=>{t.onOnline()})})}}class Z_t extends Pce{constructor(t){super(),this.defaultOptions=t.defaultOptions,this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||U6,this.observers=[],this.state=t.state||Dce(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=Lt(Lt({},this.defaultOptions),t),this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(t){this.dispatch({type:"setState",state:t})}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.observers=this.observers.filter(n=>n!==t),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){var t,n;return(t=(n=this.retryer)==null?void 0:n.continue())!=null?t:this.execute()}execute(){return bu(this,null,function*(){const t=()=>{var z;return this.retryer=Oce({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(N,B)=>{this.dispatch({type:"failed",failureCount:N,error:B})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(z=this.options.retry)!=null?z:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},n=this.state.status==="loading";try{var r,o,i,a,s,l,c,d;if(!n){var p,u,k,v;this.dispatch({type:"loading",variables:this.options.variables}),yield(p=(u=this.mutationCache.config).onMutate)==null?void 0:p.call(u,this.state.variables,this);const N=yield(k=(v=this.options).onMutate)==null?void 0:k.call(v,this.state.variables);N!==this.state.context&&this.dispatch({type:"loading",context:N,variables:this.state.variables})}const z=yield t();return yield(r=(o=this.mutationCache.config).onSuccess)==null?void 0:r.call(o,z,this.state.variables,this.state.context,this),yield(i=(a=this.options).onSuccess)==null?void 0:i.call(a,z,this.state.variables,this.state.context),yield(s=(l=this.mutationCache.config).onSettled)==null?void 0:s.call(l,z,null,this.state.variables,this.state.context,this),yield(c=(d=this.options).onSettled)==null?void 0:c.call(d,z,null,this.state.variables,this.state.context),this.dispatch({type:"success",data:z}),z}catch(z){try{var h,C,R,H,U,W,A,D;throw yield(h=(C=this.mutationCache.config).onError)==null?void 0:h.call(C,z,this.state.variables,this.state.context,this),process.env.NODE_ENV!=="production"&&this.logger.error(z),yield(R=(H=this.options).onError)==null?void 0:R.call(H,z,this.state.variables,this.state.context),yield(U=(W=this.mutationCache.config).onSettled)==null?void 0:U.call(W,void 0,z,this.state.variables,this.state.context,this),yield(A=(D=this.options).onSettled)==null?void 0:A.call(D,void 0,z,this.state.variables,this.state.context),z}finally{this.dispatch({type:"error",error:z})}}})}dispatch(t){const n=r=>{switch(t.type){case"failed":return an(Lt({},r),{failureCount:t.failureCount,failureReason:t.error});case"pause":return an(Lt({},r),{isPaused:!0});case"continue":return an(Lt({},r),{isPaused:!1});case"loading":return an(Lt({},r),{context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!PA(this.options.networkMode),status:"loading",variables:t.variables});case"success":return an(Lt({},r),{data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1});case"error":return an(Lt({},r),{data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"});case"setState":return Lt(Lt({},r),t.state)}};this.state=n(this.state),Ii.batch(()=>{this.observers.forEach(r=>{r.onMutationUpdate(t)}),this.mutationCache.notify({mutation:this,type:"updated",action:t})})}}function Dce(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class K_t extends Vy{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,n,r){const o=new Z_t({mutationCache:this,logger:t.getLogger(),mutationId:++this.mutationId,options:t.defaultMutationOptions(n),state:r,defaultOptions:n.mutationKey?t.getMutationDefaults(n.mutationKey):void 0});return this.add(o),o}add(t){this.mutations.push(t),this.notify({type:"added",mutation:t})}remove(t){this.mutations=this.mutations.filter(n=>n!==t),this.notify({type:"removed",mutation:t})}clear(){Ii.batch(()=>{this.mutations.forEach(t=>{this.remove(t)})})}getAll(){return this.mutations}find(t){return typeof t.exact>"u"&&(t.exact=!0),this.mutations.find(n=>BV(t,n))}findAll(t){return this.mutations.filter(n=>BV(t,n))}notify(t){Ii.batch(()=>{this.listeners.forEach(({listener:n})=>{n(t)})})}resumePausedMutations(){var t;return this.resuming=((t=this.resuming)!=null?t:Promise.resolve()).then(()=>{const n=this.mutations.filter(r=>r.state.isPaused);return Ii.batch(()=>n.reduce((r,o)=>r.then(()=>o.continue().catch(ql)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function Q_t(){return{onFetch:e=>{e.fetchFn=()=>{var t,n,r,o,i,a;const s=(t=e.fetchOptions)==null||(n=t.meta)==null?void 0:n.refetchPage,l=(r=e.fetchOptions)==null||(o=r.meta)==null?void 0:o.fetchMore,c=l==null?void 0:l.pageParam,d=(l==null?void 0:l.direction)==="forward",p=(l==null?void 0:l.direction)==="backward",u=((i=e.state.data)==null?void 0:i.pages)||[],k=((a=e.state.data)==null?void 0:a.pageParams)||[];let v=k,h=!1;const C=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>{var D;if((D=e.signal)!=null&&D.aborted)h=!0;else{var z;(z=e.signal)==null||z.addEventListener("abort",()=>{h=!0})}return e.signal}})},R=e.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+e.options.queryHash+"'")),H=(A,D,z,N)=>(v=N?[D,...v]:[...v,D],N?[z,...A]:[...A,z]),U=(A,D,z,N)=>{if(h)return Promise.reject("Cancelled");if(typeof z>"u"&&!D&&A.length)return Promise.resolve(A);const B={queryKey:e.queryKey,pageParam:z,meta:e.options.meta};C(B);const E=R(B);return Promise.resolve(E).then(x=>H(A,z,x,N))};let W;if(!u.length)W=U([]);else if(d){const A=typeof c<"u",D=A?c:UV(e.options,u);W=U(u,A,D)}else if(p){const A=typeof c<"u",D=A?c:J_t(e.options,u);W=U(u,A,D,!0)}else{v=[];const A=typeof e.options.getNextPageParam>"u";W=!(s&&u[0])||s(u[0],0,u)?U([],A,k[0]):Promise.resolve(H([],k[0],u[0]));for(let D=1;D<u.length;D++)W=W.then(z=>{if(!(s&&u[D])||s(u[D],D,u)){const N=A?k[D]:UV(e.options,z);return U(z,A,N)}return Promise.resolve(H(z,k[D],u[D]))})}return W.then(A=>({pages:A,pageParams:v}))}}}}function UV(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function J_t(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}class Nce{constructor(t={}){this.queryCache=t.queryCache||new X_t,this.mutationCache=t.mutationCache||new K_t,this.logger=t.logger||U6,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0,process.env.NODE_ENV!=="production"&&t.logger&&this.logger.error("Passing a custom logger has been deprecated and will be removed in the next major version.")}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=CM.subscribe(()=>{CM.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=MM.subscribe(()=>{MM.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var t,n;this.mountCount--,this.mountCount===0&&((t=this.unsubscribeFocus)==null||t.call(this),this.unsubscribeFocus=void 0,(n=this.unsubscribeOnline)==null||n.call(this),this.unsubscribeOnline=void 0)}isFetching(t,n){const[r]=wh(t,n);return r.fetchStatus="fetching",this.queryCache.findAll(r).length}isMutating(t){return this.mutationCache.findAll(an(Lt({},t),{fetching:!0})).length}getQueryData(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state.data}ensureQueryData(t,n,r){const o=B1(t,n,r),i=this.getQueryData(o.queryKey);return i?Promise.resolve(i):this.fetchQuery(o)}getQueriesData(t){return this.getQueryCache().findAll(t).map(({queryKey:n,state:r})=>{const o=r.data;return[n,o]})}setQueryData(t,n,r){const o=this.queryCache.find(t),i=o==null?void 0:o.state.data,a=F_t(n,i);if(typeof a>"u")return;const s=B1(t),l=this.defaultQueryOptions(s);return this.queryCache.build(this,l).setData(a,an(Lt({},r),{manual:!0}))}setQueriesData(t,n,r){return Ii.batch(()=>this.getQueryCache().findAll(t).map(({queryKey:o})=>[o,this.setQueryData(o,n,r)]))}getQueryState(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state}removeQueries(t,n){const[r]=wh(t,n),o=this.queryCache;Ii.batch(()=>{o.findAll(r).forEach(i=>{o.remove(i)})})}resetQueries(t,n,r){const[o,i]=wh(t,n,r),a=this.queryCache,s=Lt({type:"active"},o);return Ii.batch(()=>(a.findAll(o).forEach(l=>{l.reset()}),this.refetchQueries(s,i)))}cancelQueries(t,n,r){const[o,i={}]=wh(t,n,r);typeof i.revert>"u"&&(i.revert=!0);const a=Ii.batch(()=>this.queryCache.findAll(o).map(s=>s.cancel(i)));return Promise.all(a).then(ql).catch(ql)}invalidateQueries(t,n,r){const[o,i]=wh(t,n,r);return Ii.batch(()=>{var a,s;if(this.queryCache.findAll(o).forEach(c=>{c.invalidate()}),o.refetchType==="none")return Promise.resolve();const l=an(Lt({},o),{type:(a=(s=o.refetchType)!=null?s:o.type)!=null?a:"active"});return this.refetchQueries(l,i)})}refetchQueries(t,n,r){const[o,i]=wh(t,n,r),a=Ii.batch(()=>this.queryCache.findAll(o).filter(l=>!l.isDisabled()).map(l=>{var c;return l.fetch(void 0,an(Lt({},i),{cancelRefetch:(c=i==null?void 0:i.cancelRefetch)!=null?c:!0,meta:{refetchPage:o.refetchPage}}))}));let s=Promise.all(a).then(ql);return i!=null&&i.throwOnError||(s=s.catch(ql)),s}fetchQuery(t,n,r){const o=B1(t,n,r),i=this.defaultQueryOptions(o);typeof i.retry>"u"&&(i.retry=!1);const a=this.queryCache.build(this,i);return a.isStaleByTime(i.staleTime)?a.fetch(i):Promise.resolve(a.state.data)}prefetchQuery(t,n,r){return this.fetchQuery(t,n,r).then(ql).catch(ql)}fetchInfiniteQuery(t,n,r){const o=B1(t,n,r);return o.behavior=Q_t(),this.fetchQuery(o)}prefetchInfiniteQuery(t,n,r){return this.fetchInfiniteQuery(t,n,r).then(ql).catch(ql)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(t){this.defaultOptions=t}setQueryDefaults(t,n){const r=this.queryDefaults.find(o=>Cm(t)===Cm(o.queryKey));r?r.defaultOptions=n:this.queryDefaults.push({queryKey:t,defaultOptions:n})}getQueryDefaults(t){if(!t)return;const n=this.queryDefaults.find(r=>nv(t,r.queryKey));return process.env.NODE_ENV!=="production"&&this.queryDefaults.filter(r=>nv(t,r.queryKey)).length>1&&this.logger.error("[QueryClient] Several query defaults match with key '"+JSON.stringify(t)+"'. The first matching query defaults are used. Please check how query defaults are registered. Order does matter here. cf. https://react-query.tanstack.com/reference/QueryClient#queryclientsetquerydefaults."),n==null?void 0:n.defaultOptions}setMutationDefaults(t,n){const r=this.mutationDefaults.find(o=>Cm(t)===Cm(o.mutationKey));r?r.defaultOptions=n:this.mutationDefaults.push({mutationKey:t,defaultOptions:n})}getMutationDefaults(t){if(!t)return;const n=this.mutationDefaults.find(r=>nv(t,r.mutationKey));return process.env.NODE_ENV!=="production"&&this.mutationDefaults.filter(r=>nv(t,r.mutationKey)).length>1&&this.logger.error("[QueryClient] Several mutation defaults match with key '"+JSON.stringify(t)+"'. The first matching mutation defaults are used. Please check how mutation defaults are registered. Order does matter here. cf. https://react-query.tanstack.com/reference/QueryClient#queryclientsetmutationdefaults."),n==null?void 0:n.defaultOptions}defaultQueryOptions(t){if(t!=null&&t._defaulted)return t;const n=an(Lt(Lt(Lt({},this.defaultOptions.queries),this.getQueryDefaults(t==null?void 0:t.queryKey)),t),{_defaulted:!0});return!n.queryHash&&n.queryKey&&(n.queryHash=$6(n.queryKey,n)),typeof n.refetchOnReconnect>"u"&&(n.refetchOnReconnect=n.networkMode!=="always"),typeof n.useErrorBoundary>"u"&&(n.useErrorBoundary=!!n.suspense),n}defaultMutationOptions(t){return t!=null&&t._defaulted?t:an(Lt(Lt(Lt({},this.defaultOptions.mutations),this.getMutationDefaults(t==null?void 0:t.mutationKey)),t),{_defaulted:!0})}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class eSt extends Vy{constructor(t,n){super(),this.client=t,this.options=n,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(n)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),YV(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return RR(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return RR(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(t,n){const r=this.options,o=this.currentQuery;if(this.options=this.client.defaultQueryOptions(t),process.env.NODE_ENV!=="production"&&typeof(t==null?void 0:t.isDataEqual)<"u"&&this.client.getLogger().error("The isDataEqual option has been deprecated and will be removed in the next major version. You can achieve the same functionality by passing a function as the structuralSharing option"),kM(r,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=r.queryKey),this.updateQuery();const i=this.hasListeners();i&&GV(this.currentQuery,o,this.options,r)&&this.executeFetch(),this.updateResult(n),i&&(this.currentQuery!==o||this.options.enabled!==r.enabled||this.options.staleTime!==r.staleTime)&&this.updateStaleTimeout();const a=this.computeRefetchInterval();i&&(this.currentQuery!==o||this.options.enabled!==r.enabled||a!==this.currentRefetchInterval)&&this.updateRefetchInterval(a)}getOptimisticResult(t){const n=this.client.getQueryCache().build(this.client,t),r=this.createResult(n,t);return nSt(this,r,t)&&(this.currentResult=r,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),r}getCurrentResult(){return this.currentResult}trackResult(t){const n={};return Object.keys(t).forEach(r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(r),t[r])})}),n}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch(t={}){var n=t,{refetchPage:r}=n,o=m_(n,["refetchPage"]);return this.fetch(an(Lt({},o),{meta:{refetchPage:r}}))}fetchOptimistic(t){const n=this.client.defaultQueryOptions(t),r=this.client.getQueryCache().build(this.client,n);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,n))}fetch(t){var n;return this.executeFetch(an(Lt({},t),{cancelRefetch:(n=t.cancelRefetch)!=null?n:!0})).then(()=>(this.updateResult(),this.currentResult))}executeFetch(t){this.updateQuery();let n=this.currentQuery.fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(ql)),n}updateStaleTimeout(){if(this.clearStaleTimeout(),dw||this.currentResult.isStale||!DR(this.options.staleTime))return;const t=Cce(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},t)}computeRefetchInterval(){var t;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(t=this.options.refetchInterval)!=null?t:!1}updateRefetchInterval(t){this.clearRefetchInterval(),this.currentRefetchInterval=t,!(dw||this.options.enabled===!1||!DR(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||CM.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(t,n){const r=this.currentQuery,o=this.options,i=this.currentResult,a=this.currentResultState,s=this.currentResultOptions,l=t!==r,c=l?t.state:this.currentQueryInitialState,d=l?this.currentResult:this.previousQueryResult,{state:p}=t;let{dataUpdatedAt:u,error:k,errorUpdatedAt:v,fetchStatus:h,status:C}=p,R=!1,H=!1,U;if(n._optimisticResults){const z=this.hasListeners(),N=!z&&YV(t,n),B=z&&GV(t,r,n,o);(N||B)&&(h=PA(t.options.networkMode)?"fetching":"paused",u||(C="loading")),n._optimisticResults==="isRestoring"&&(h="idle")}if(n.keepPreviousData&&!p.dataUpdatedAt&&d!=null&&d.isSuccess&&C!=="error")U=d.data,u=d.dataUpdatedAt,C=d.status,R=!0;else if(n.select&&typeof p.data<"u")if(i&&p.data===(a==null?void 0:a.data)&&n.select===this.selectFn)U=this.selectResult;else try{this.selectFn=n.select,U=n.select(p.data),U=LR(i==null?void 0:i.data,U,n),this.selectResult=U,this.selectError=null}catch(z){process.env.NODE_ENV!=="production"&&this.client.getLogger().error(z),this.selectError=z}else U=p.data;if(typeof n.placeholderData<"u"&&typeof U>"u"&&C==="loading"){let z;if(i!=null&&i.isPlaceholderData&&n.placeholderData===(s==null?void 0:s.placeholderData))z=i.data;else if(z=typeof n.placeholderData=="function"?n.placeholderData():n.placeholderData,n.select&&typeof z<"u")try{z=n.select(z),this.selectError=null}catch(N){process.env.NODE_ENV!=="production"&&this.client.getLogger().error(N),this.selectError=N}typeof z<"u"&&(C="success",U=LR(i==null?void 0:i.data,z,n),H=!0)}this.selectError&&(k=this.selectError,U=this.selectResult,v=Date.now(),C="error");const W=h==="fetching",A=C==="loading",D=C==="error";return{status:C,fetchStatus:h,isLoading:A,isSuccess:C==="success",isError:D,isInitialLoading:A&&W,data:U,dataUpdatedAt:u,error:k,errorUpdatedAt:v,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>c.dataUpdateCount||p.errorUpdateCount>c.errorUpdateCount,isFetching:W,isRefetching:W&&!A,isLoadingError:D&&p.dataUpdatedAt===0,isPaused:h==="paused",isPlaceholderData:H,isPreviousData:R,isRefetchError:D&&p.dataUpdatedAt!==0,isStale:Y6(t,n),refetch:this.refetch,remove:this.remove}}updateResult(t){const n=this.currentResult,r=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,kM(r,n))return;this.currentResult=r;const o={cache:!0},i=()=>{if(!n)return!0;const{notifyOnChangeProps:a}=this.options,s=typeof a=="function"?a():a;if(s==="all"||!s&&!this.trackedProps.size)return!0;const l=new Set(s??this.trackedProps);return this.options.useErrorBoundary&&l.add("error"),Object.keys(this.currentResult).some(c=>{const d=c;return this.currentResult[d]!==n[d]&&l.has(d)})};(t==null?void 0:t.listeners)!==!1&&i()&&(o.listeners=!0),this.notify(Lt(Lt({},o),t))}updateQuery(){const t=this.client.getQueryCache().build(this.client,this.options);if(t===this.currentQuery)return;const n=this.currentQuery;this.currentQuery=t,this.currentQueryInitialState=t.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))}onQueryUpdate(t){const n={};t.type==="success"?n.onSuccess=!t.manual:t.type==="error"&&!OC(t.error)&&(n.onError=!0),this.updateResult(n),this.hasListeners()&&this.updateTimers()}notify(t){Ii.batch(()=>{if(t.onSuccess){var n,r,o,i;(n=(r=this.options).onSuccess)==null||n.call(r,this.currentResult.data),(o=(i=this.options).onSettled)==null||o.call(i,this.currentResult.data,null)}else if(t.onError){var a,s,l,c;(a=(s=this.options).onError)==null||a.call(s,this.currentResult.error),(l=(c=this.options).onSettled)==null||l.call(c,void 0,this.currentResult.error)}t.listeners&&this.listeners.forEach(({listener:d})=>{d(this.currentResult)}),t.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function tSt(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function YV(e,t){return tSt(e,t)||e.state.dataUpdatedAt>0&&RR(e,t,t.refetchOnMount)}function RR(e,t,n){if(t.enabled!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Y6(e,t)}return!1}function GV(e,t,n,r){return n.enabled!==!1&&(e!==t||r.enabled===!1)&&(!n.suspense||e.state.status!=="error")&&Y6(e,n)}function Y6(e,t){return e.isStaleByTime(t.staleTime)}function nSt(e,t,n){return n.keepPreviousData?!1:n.placeholderData!==void 0?t.isPlaceholderData:!kM(e.getCurrentResult(),t)}var IR={exports:{}},wN={};/**
|
1013
1013
|
* @license React
|
@@ -1031,7 +1031,7 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStat
|
|
1031
1031
|
* author : Adam Draper
|
1032
1032
|
* license : MIT
|
1033
1033
|
* http://adamwdraper.github.com/Numeral-js/
|
1034
|
-
*/(function(e){(function(t,n){e.exports?e.exports=n():t.numeral=n()})(eo,function(){var t,n,r="2.0.6",o={},i={},a={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},s={currentLocale:a.currentLocale,zeroFormat:a.zeroFormat,nullFormat:a.nullFormat,defaultFormat:a.defaultFormat,scalePercentBy100:a.scalePercentBy100};function l(c,d){this._input=c,this._value=d}return t=function(c){var d,p,u,k;if(t.isNumeral(c))d=c.value();else if(c===0||typeof c>"u")d=0;else if(c===null||n.isNaN(c))d=null;else if(typeof c=="string")if(s.zeroFormat&&c===s.zeroFormat)d=0;else if(s.nullFormat&&c===s.nullFormat||!c.replace(/[^0-9]+/g,"").length)d=null;else{for(p in o)if(k=typeof o[p].regexps.unformat=="function"?o[p].regexps.unformat():o[p].regexps.unformat,k&&c.match(k)){u=o[p].unformat;break}u=u||t._.stringToNumber,d=u(c)}else d=Number(c)||null;return new l(c,d)},t.version=r,t.isNumeral=function(c){return c instanceof l},t._=n={numberToFormat:function(c,d,p){var u=i[t.options.currentLocale],k=!1,v=!1,h=0,C="",R=1e12,H=1e9,U=1e6,W=1e3,A="",D=!1,z,N,B,E,x,g,M;if(c=c||0,N=Math.abs(c),t._.includes(d,"(")?(k=!0,d=d.replace(/[\(|\)]/g,"")):(t._.includes(d,"+")||t._.includes(d,"-"))&&(x=t._.includes(d,"+")?d.indexOf("+"):c<0?d.indexOf("-"):-1,d=d.replace(/[\+|\-]/g,"")),t._.includes(d,"a")&&(z=d.match(/a(k|m|b|t)?/),z=z?z[1]:!1,t._.includes(d," a")&&(C=" "),d=d.replace(new RegExp(C+"a[kmbt]?"),""),N>=R&&!z||z==="t"?(C+=u.abbreviations.trillion,c=c/R):N<R&&N>=H&&!z||z==="b"?(C+=u.abbreviations.billion,c=c/H):N<H&&N>=U&&!z||z==="m"?(C+=u.abbreviations.million,c=c/U):(N<U&&N>=W&&!z||z==="k")&&(C+=u.abbreviations.thousand,c=c/W)),t._.includes(d,"[.]")&&(v=!0,d=d.replace("[.]",".")),B=c.toString().split(".")[0],E=d.split(".")[1],g=d.indexOf(","),h=(d.split(".")[0].split(",")[0].match(/0/g)||[]).length,E?(t._.includes(E,"[")?(E=E.replace("]",""),E=E.split("["),A=t._.toFixed(c,E[0].length+E[1].length,p,E[1].length)):A=t._.toFixed(c,E.length,p),B=A.split(".")[0],t._.includes(A,".")?A=u.delimiters.decimal+A.split(".")[1]:A="",v&&Number(A.slice(1))===0&&(A="")):B=t._.toFixed(c,0,p),C&&!z&&Number(B)>=1e3&&C!==u.abbreviations.trillion)switch(B=String(Number(B)/1e3),C){case u.abbreviations.thousand:C=u.abbreviations.million;break;case u.abbreviations.million:C=u.abbreviations.billion;break;case u.abbreviations.billion:C=u.abbreviations.trillion;break}if(t._.includes(B,"-")&&(B=B.slice(1),D=!0),B.length<h)for(var _=h-B.length;_>0;_--)B="0"+B;return g>-1&&(B=B.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+u.delimiters.thousands)),d.indexOf(".")===0&&(B=""),M=B+A+(C||""),k?M=(k&&D?"(":"")+M+(k&&D?")":""):x>=0?M=x===0?(D?"-":"+")+M:M+(D?"-":"+"):D&&(M="-"+M),M},stringToNumber:function(c){var d=i[s.currentLocale],p=c,u={thousand:3,million:6,billion:9,trillion:12},k,v,h;if(s.zeroFormat&&c===s.zeroFormat)v=0;else if(s.nullFormat&&c===s.nullFormat||!c.replace(/[^0-9]+/g,"").length)v=null;else{v=1,d.delimiters.decimal!=="."&&(c=c.replace(/\./g,"").replace(d.delimiters.decimal,"."));for(k in u)if(h=new RegExp("[^a-zA-Z]"+d.abbreviations[k]+"(?:\\)|(\\"+d.currency.symbol+")?(?:\\))?)?$"),p.match(h)){v*=Math.pow(10,u[k]);break}v*=(c.split("-").length+Math.min(c.split("(").length-1,c.split(")").length-1))%2?1:-1,c=c.replace(/[^0-9\.]+/g,""),v*=Number(c)}return v},isNaN:function(c){return typeof c=="number"&&isNaN(c)},includes:function(c,d){return c.indexOf(d)!==-1},insert:function(c,d,p){return c.slice(0,p)+d+c.slice(p)},reduce:function(c,d){if(this===null)throw new TypeError("Array.prototype.reduce called on null or undefined");if(typeof d!="function")throw new TypeError(d+" is not a function");var p=Object(c),u=p.length>>>0,k=0,v;if(arguments.length===3)v=arguments[2];else{for(;k<u&&!(k in p);)k++;if(k>=u)throw new TypeError("Reduce of empty array with no initial value");v=p[k++]}for(;k<u;k++)k in p&&(v=d(v,p[k],k,p));return v},multiplier:function(c){var d=c.toString().split(".");return d.length<2?1:Math.pow(10,d[1].length)},correctionFactor:function(){var c=Array.prototype.slice.call(arguments);return c.reduce(function(d,p){var u=n.multiplier(p);return d>u?d:u},1)},toFixed:function(c,d,p,u){var k=c.toString().split("."),v=d-(u||0),h,C,R,H;return k.length===2?h=Math.min(Math.max(k[1].length,v),d):h=v,R=Math.pow(10,h),H=(p(c+"e+"+h)/R).toFixed(h),u>d-h&&(C=new RegExp("\\.?0{1,"+(u-(d-h))+"}$"),H=H.replace(C,"")),H}},t.options=s,t.formats=o,t.locales=i,t.locale=function(c){return c&&(s.currentLocale=c.toLowerCase()),s.currentLocale},t.localeData=function(c){if(!c)return i[s.currentLocale];if(c=c.toLowerCase(),!i[c])throw new Error("Unknown locale : "+c);return i[c]},t.reset=function(){for(var c in a)s[c]=a[c]},t.zeroFormat=function(c){s.zeroFormat=typeof c=="string"?c:null},t.nullFormat=function(c){s.nullFormat=typeof c=="string"?c:null},t.defaultFormat=function(c){s.defaultFormat=typeof c=="string"?c:"0.0"},t.register=function(c,d,p){if(d=d.toLowerCase(),this[c+"s"][d])throw new TypeError(d+" "+c+" already registered.");return this[c+"s"][d]=p,p},t.validate=function(c,d){var p,u,k,v,h,C,R,H;if(typeof c!="string"&&(c+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",c)),c=c.trim(),c.match(/^\d+$/))return!0;if(c==="")return!1;try{R=t.localeData(d)}catch{R=t.localeData(t.locale())}return k=R.currency.symbol,h=R.abbreviations,p=R.delimiters.decimal,R.delimiters.thousands==="."?u="\\.":u=R.delimiters.thousands,H=c.match(/^[^\d]+/),H!==null&&(c=c.substr(1),H[0]!==k)||(H=c.match(/[^\d]+$/),H!==null&&(c=c.slice(0,-1),H[0]!==h.thousand&&H[0]!==h.million&&H[0]!==h.billion&&H[0]!==h.trillion))?!1:(C=new RegExp(u+"{2}"),c.match(/[^\d.,]/g)?!1:(v=c.split(p),v.length>2?!1:v.length<2?!!v[0].match(/^\d+.*\d$/)&&!v[0].match(C):v[0].length===1?!!v[0].match(/^\d+$/)&&!v[0].match(C)&&!!v[1].match(/^\d+$/):!!v[0].match(/^\d+.*\d$/)&&!v[0].match(C)&&!!v[1].match(/^\d+$/)))},t.fn=l.prototype={clone:function(){return t(this)},format:function(c,d){var p=this._value,u=c||s.defaultFormat,k,v,h;if(d=d||Math.round,p===0&&s.zeroFormat!==null)v=s.zeroFormat;else if(p===null&&s.nullFormat!==null)v=s.nullFormat;else{for(k in o)if(u.match(o[k].regexps.format)){h=o[k].format;break}h=h||t._.numberToFormat,v=h(p,u,d)}return v},value:function(){return this._value},input:function(){return this._input},set:function(c){return this._value=Number(c),this},add:function(c){var d=n.correctionFactor.call(null,this._value,c);function p(u,k,v,h){return u+Math.round(d*k)}return this._value=n.reduce([this._value,c],p,0)/d,this},subtract:function(c){var d=n.correctionFactor.call(null,this._value,c);function p(u,k,v,h){return u-Math.round(d*k)}return this._value=n.reduce([c],p,Math.round(this._value*d))/d,this},multiply:function(c){function d(p,u,k,v){var h=n.correctionFactor(p,u);return Math.round(p*h)*Math.round(u*h)/Math.round(h*h)}return this._value=n.reduce([this._value,c],d,1),this},divide:function(c){function d(p,u,k,v){var h=n.correctionFactor(p,u);return Math.round(p*h)/Math.round(u*h)}return this._value=n.reduce([this._value,c],d),this},difference:function(c){return Math.abs(t(this._value).subtract(c).value())}},t.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(c){var d=c%10;return~~(c%100/10)===1?"th":d===1?"st":d===2?"nd":d===3?"rd":"th"},currency:{symbol:"$"}}),function(){t.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(c,d,p){var u=t._.includes(d," BPS")?" ":"",k;return c=c*1e4,d=d.replace(/\s?BPS/,""),k=t._.numberToFormat(c,d,p),t._.includes(k,")")?(k=k.split(""),k.splice(-1,0,u+"BPS"),k=k.join("")):k=k+u+"BPS",k},unformat:function(c){return+(t._.stringToNumber(c)*1e-4).toFixed(15)}})}(),function(){var c={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]},d={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},p=c.suffixes.concat(d.suffixes.filter(function(k){return c.suffixes.indexOf(k)<0})),u=p.join("|");u="("+u.replace("B","B(?!PS)")+")",t.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(u)},format:function(k,v,h){var C,R=t._.includes(v,"ib")?d:c,H=t._.includes(v," b")||t._.includes(v," ib")?" ":"",U,W,A;for(v=v.replace(/\s?i?b/,""),U=0;U<=R.suffixes.length;U++)if(W=Math.pow(R.base,U),A=Math.pow(R.base,U+1),k===null||k===0||k>=W&&k<A){H+=R.suffixes[U],W>0&&(k=k/W);break}return C=t._.numberToFormat(k,v,h),C+H},unformat:function(k){var v=t._.stringToNumber(k),h,C;if(v){for(h=c.suffixes.length-1;h>=0;h--){if(t._.includes(k,c.suffixes[h])){C=Math.pow(c.base,h);break}if(t._.includes(k,d.suffixes[h])){C=Math.pow(d.base,h);break}}v*=C||1}return v}})}(),function(){t.register("format","currency",{regexps:{format:/(\$)/},format:function(c,d,p){var u=t.locales[t.options.currentLocale],k={before:d.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:d.match(/([\+|\-|\)|\s|\$]*)$/)[0]},v,h,C;for(d=d.replace(/\s?\$\s?/,""),v=t._.numberToFormat(c,d,p),c>=0?(k.before=k.before.replace(/[\-\(]/,""),k.after=k.after.replace(/[\-\)]/,"")):c<0&&!t._.includes(k.before,"-")&&!t._.includes(k.before,"(")&&(k.before="-"+k.before),C=0;C<k.before.length;C++)switch(h=k.before[C],h){case"$":v=t._.insert(v,u.currency.symbol,C);break;case" ":v=t._.insert(v," ",C+u.currency.symbol.length-1);break}for(C=k.after.length-1;C>=0;C--)switch(h=k.after[C],h){case"$":v=C===k.after.length-1?v+u.currency.symbol:t._.insert(v,u.currency.symbol,-(k.after.length-(1+C)));break;case" ":v=C===k.after.length-1?v+" ":t._.insert(v," ",-(k.after.length-(1+C)+u.currency.symbol.length-1));break}return v}})}(),function(){t.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(c,d,p){var u,k=typeof c=="number"&&!t._.isNaN(c)?c.toExponential():"0e+0",v=k.split("e");return d=d.replace(/e[\+|\-]{1}0/,""),u=t._.numberToFormat(Number(v[0]),d,p),u+"e"+v[1]},unformat:function(c){var d=t._.includes(c,"e+")?c.split("e+"):c.split("e-"),p=Number(d[0]),u=Number(d[1]);u=t._.includes(c,"e-")?u*=-1:u;function k(v,h,C,R){var H=t._.correctionFactor(v,h),U=v*H*(h*H)/(H*H);return U}return t._.reduce([p,Math.pow(10,u)],k,1)}})}(),function(){t.register("format","ordinal",{regexps:{format:/(o)/},format:function(c,d,p){var u=t.locales[t.options.currentLocale],k,v=t._.includes(d," o")?" ":"";return d=d.replace(/\s?o/,""),v+=u.ordinal(c),k=t._.numberToFormat(c,d,p),k+v}})}(),function(){t.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(c,d,p){var u=t._.includes(d," %")?" ":"",k;return t.options.scalePercentBy100&&(c=c*100),d=d.replace(/\s?\%/,""),k=t._.numberToFormat(c,d,p),t._.includes(k,")")?(k=k.split(""),k.splice(-1,0,u+"%"),k=k.join("")):k=k+u+"%",k},unformat:function(c){var d=t._.stringToNumber(c);return t.options.scalePercentBy100?d*.01:d}})}(),function(){t.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(c,d,p){var u=Math.floor(c/60/60),k=Math.floor((c-u*60*60)/60),v=Math.round(c-u*60*60-k*60);return u+":"+(k<10?"0"+k:k)+":"+(v<10?"0"+v:v)},unformat:function(c){var d=c.split(":"),p=0;return d.length===3?(p=p+Number(d[0])*60*60,p=p+Number(d[1])*60,p=p+Number(d[2])):d.length===2&&(p=p+Number(d[0])*60,p=p+Number(d[1])),Number(p)}})}(),t})})(lue);var hCt=lue.exports;const fCt=Ts(hCt),mCt=(e,t)=>{const n=yCt(e);return gCt(n,t)};function gCt(e,t){return{columns:t==null?void 0:t.map(n=>({name:n.name,type:EI(n.type)})),rows:vCt(e)}}function vCt(e){var t;let n=!1;const r=(t=e[0])===null||t===void 0?void 0:t.map((o,i)=>{const a=e.some(s=>"selected"in s[i]);return a&&(n=!0),a});return e.map(o=>{const i=n?r.some((a,s)=>a&&!o[s].selected):void 0;return o.map(a=>i!==void 0?{data:a.data,text:a.text,blur:i}:{data:a.data,text:a.text})})}function yCt({values:e=[],metadata:t=[]}){var n,r,o,i;e[0]&&!Array.isArray(e[0])&&(e=[e]);for(let a=0;a<e.length;a++){const s=e[a];for(let l=0;l<s.length;l++)t[l].format&&!((r=(n=t[l])===null||n===void 0?void 0:n.format)===null||r===void 0)&&r.number&&(s[l].text=fCt(s[l].data).format((i=(o=t[l])===null||o===void 0?void 0:o.format)===null||i===void 0?void 0:i.number))}return e}var am=function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(d){try{c(r.next(d))}catch(p){a(p)}}function l(d){try{c(r.throw(d))}catch(p){a(p)}}function c(d){d.done?i(d.value):o(d.value).then(s,l)}c((r=r.apply(e,t||[])).next())})};class bCt extends sl.AbstractTaskManager{constructor(t,n){super(),this.sentRequestsAbortersMap=new Map,this.executeQuerySending=super.createFlow([new sl.Step("PREPARE_JAQL_PAYLOAD",this.prepareJaqlPayload.bind(this),()=>am(this,void 0,void 0,function*(){})),new sl.Step("SEND_JAQL_QUERY",this.sendJaqlQuery.bind(this),this.cancelDataRetrievalQuery.bind(this))]),this.executeDownloadCsvSending=super.createFlow([new sl.Step("PREPARE_JAQL_PAYLOAD",this.prepareJaqlPayload.bind(this),()=>am(this,void 0,void 0,function*(){})),new sl.Step("SEND_DOWNLOAD_CSV_QUERY",this.sendCsvQuery.bind(this),this.cancelDataRetrievalQuery.bind(this))]),this.executePivotQuerySending=super.createFlow([new sl.Step("PREPARE_JAQL_PAYLOAD",this.preparePivotJaqlPayload.bind(this),()=>am(this,void 0,void 0,function*(){})),new sl.Step("SEND_JAQL_QUERY",this.sendPivotJaqlQuery.bind(this),this.cancelPivotJaqlQuery.bind(this))]),this.queryApi=t,this.pivotClient=n}prepareJaqlPayload(t){return am(this,void 0,void 0,function*(){const{queryDescription:n,executionConfig:r}=t.passport,o=pj(n,r.shouldSkipHighlightsWithoutAttributes),i=t.passport.executionConfig.onBeforeQuery;return i?i(o):o})}sendJaqlQuery(t,n){return am(this,void 0,void 0,function*(){const{queryDescription:r,taskId:o}=t.passport,{responsePromise:i,abortHttpRequest:a}=this.queryApi.sendJaqlRequest(t.passport.queryDescription.dataSource,n);this.sentRequestsAbortersMap.set(o,a);const s=yield i.finally(()=>{this.sentRequestsAbortersMap.delete(o)});xCt(s);const l=[...r.attributes,...r.measures],c=(s.headers||[]).slice(l.length).map(d=>({name:d,type:"number"}));return mCt(s,[...l,...c])})}sendCsvQuery(t,n){return am(this,void 0,void 0,function*(){const{taskId:r}=t.passport,{responsePromise:o,abortHttpRequest:i}=this.queryApi.sendDownloadCsvRequest(t.passport.queryDescription.dataSource,n);return this.sentRequestsAbortersMap.set(r,i),o.finally(()=>{this.sentRequestsAbortersMap.delete(r)})})}cancelDataRetrievalQuery(t){const n=t.passport.taskId,r=this.sentRequestsAbortersMap.get(n);return r&&(r(),this.sentRequestsAbortersMap.delete(n)),this.queryApi.sendCancelJaqlQueryRequest(n,t.passport.queryDescription.dataSource)}preparePivotJaqlPayload(t){return am(this,void 0,void 0,function*(){const{pivotQueryDescription:n,executionConfig:r}=t.passport,o=m1e(n,r.shouldSkipHighlightsWithoutAttributes),i=t.passport.executionConfig.onBeforeQuery;return i?i(o):o})}sendPivotJaqlQuery(t,n){var r;const{pivotQueryDescription:o}=t.passport;return this.pivotClient.queryData(n,!0,(r=o.count)!==null&&r!==void 0?r:_Ct,!1)}cancelPivotJaqlQuery(t){const n=t.passport.taskId,r=this.sentRequestsAbortersMap.get(n);return r&&(r(),this.sentRequestsAbortersMap.delete(n)),this.queryApi.sendCancelJaqlQueryRequest(n,t.passport.pivotQueryDescription.dataSource)}}function xCt(e){var t;if(!e)throw new ns("errors.noJaqlResponse");if(e.error)throw new Error(`${e.details} ${(t=e.database)!==null&&t!==void 0?t:""} ${e.extraDetails?JSON.stringify(e.extraDetails):""}`)}class tq extends sl.TaskPassport{constructor(t,n,r){super(),this.queryDescription=n,this.type=t,this.executionConfig=r}}class wCt extends sl.TaskPassport{constructor(t,n,r){super(),this.pivotQueryDescription=n,this.type=t,this.executionConfig=r}}var nq=function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(d){try{c(r.next(d))}catch(p){a(p)}}function l(d){try{c(r.throw(d))}catch(p){a(p)}}function c(d){d.done?i(d.value):o(d.value).then(s,l)}c((r=r.apply(e,t||[])).next())})};const _Ct=2e4,AN="Unspecified reason";class SCt{constructor(t,n=new Tne(t.url,t.auth),r){CCt(t),this.queryApi=new cCt(t),this.taskManager=new bCt(this.queryApi,n),this.shouldSkipHighlightsWithoutAttributes=r??!1}executeQuery(t,n){const r=new tq("SEND_JAQL_QUERY",t,Object.assign(Object.assign({},n||{}),{shouldSkipHighlightsWithoutAttributes:this.shouldSkipHighlightsWithoutAttributes||!1}));return{resultPromise:new Promise((o,i)=>{rq(t),this.taskManager.executeQuerySending(r).then(a=>{a.status===sl.ExecutionResultStatus.SUCCESS?o(a.result):i(a.error)})}),cancel:o=>this.taskManager.cancel(r.taskId,o||AN)}}executeCsvQuery(t,n){const r=new tq("SEND_DOWNLOAD_CSV_QUERY",t,Object.assign(Object.assign({},n||{}),{shouldSkipHighlightsWithoutAttributes:this.shouldSkipHighlightsWithoutAttributes||!1}));return{resultPromise:new Promise((o,i)=>{rq(t),this.taskManager.executeDownloadCsvSending(r).then(a=>{a.status===sl.ExecutionResultStatus.SUCCESS?o(a.result):i(a.error)})}),cancel:o=>this.taskManager.cancel(r.taskId,o||AN)}}executePivotQuery(t,n){const r=new wCt("SEND_JAQL_QUERY",t,Object.assign(Object.assign({},n||{}),{shouldSkipHighlightsWithoutAttributes:this.shouldSkipHighlightsWithoutAttributes||!1}));return{resultPromise:new Promise((o,i)=>{kCt(t),this.taskManager.executePivotQuerySending(r).then(a=>{a.status===sl.ExecutionResultStatus.SUCCESS?o(a.result):i(a.error)})}),cancel:o=>this.taskManager.cancel(r.taskId,o||AN)}}getDataSourceFields(t,n=9999,r=0){return nq(this,void 0,void 0,function*(){return(yield this.queryApi.getDataSourceFields(t,n,r))||[]})}getDataSourceSchema(t){return this.queryApi.getDataSourceSchema(t)}getDataSourceList(){return nq(this,void 0,void 0,function*(){return(yield this.queryApi.getDataSourceList())||[]})}}function rq(e){const{attributes:t,measures:n,filters:r,highlights:o,count:i,offset:a}=e;if(i&&i<0)throw new ns("errors.invalidCountNegative",{count:i.toString()});if(a&&a<0)throw new ns("errors.invalidOffset",{offset:a.toString()});if(t.length+n.length===0)throw new ns("errors.noDimensionsOrMeasures");t.forEach(s=>{if(!s.skipValidation&&!xn.isAttribute(s)){const{name:l}=s;throw new ns("errors.invalidAttribute",{attributeName:l})}}),n.forEach(s=>{if(!s.skipValidation&&!xn.isMeasure(s))throw new ns("errors.invalidMeasure",{measureName:s.name})}),r.forEach(s=>{if(!s.skipValidation&&!xn.isFilter(s))throw new ns("errors.invalidFilter",{filterName:s.name})}),o.forEach(s=>{if(!s.skipValidation&&!xn.isFilter(s))throw new ns("errors.invalidHighlight",{highlightName:s.name})})}function kCt(e){const{rowsAttributes:t,columnsAttributes:n,measures:r,filters:o,highlights:i,count:a,offset:s}=e;if(a&&a<0)throw new ns("errors.invalidCountNegative",{count:a.toString()});if(s&&s<0)throw new ns("errors.invalidOffset",{offset:s.toString()});if(t.length+n.length+r.length===0)throw new ns("errors.noDimensionsOrMeasures");o.forEach(l=>{if(!l.skipValidation&&!xn.isFilter(l))throw new ns("errors.invalidFilter",{filterName:l.name})}),i.forEach(l=>{if(!l.skipValidation&&!xn.isFilter(l))throw new ns("errors.invalidHighlight",{highlightName:l.name})})}function CCt(e){if(!e)throw new ns("errors.missingHttpClient");if(!e.post)throw new ns("errors.missingPostMethod")}const MCt={enabled:!0,delay:500},TCt={locale:gE(),dateConfig:z4,loadingIndicatorConfig:MCt,translationConfig:{language:"en",customTranslations:[]},language:"en",queryCacheConfig:{enabled:!1},queryLimit:y$e,tabberConfig:{enabled:!1},accessibilityConfig:{enabled:!1},errorBoundaryConfig:{alwaysShowErrorText:!1},trackingConfig:{enabled:!0}};function ECt(e,t,n){return na(this,null,function*(){var r;const o=yield OCt(t,n);return ti.withOptions({mergeArrays:!1},TCt,{locale:gE((r=e==null?void 0:e.translationConfig)==null?void 0:r.language)},o,e)})}function ACt(e){const t={};return e.forEach(n=>{t[n.key]=n}),t}function OCt(e,t=!1){return na(this,null,function*(){var n,r;const o=yield e.get("api/globals");if(!o)throw new Qt("errors.serverSettingsNotLoaded");const i=t?{colors:Gx().palette.variantColors}:yield _ie(xie(o.designSettings),e);return{serverThemeSettings:bie(o.designSettings,i,e.url),serverLanguage:o.language,serverVersion:o.version,serverFeatures:ACt(o.features),user:{tenant:{name:((r=(n=o.user)==null?void 0:n.tenant)==null?void 0:r.name)||ere}}}})}function PCt(e,t){return t===ere?e:e.replace(`/${t}`,"")}function DCt(){window.addEventListener("unhandledrejection",e=>{e.reason instanceof Error?console.error(e.reason.message):console.error(e.reason)})}const NCt=e=>na(void 0,[e],function*({defaultDataSource:t,url:n,token:r,wat:o,ssoEnabled:i,appConfig:a,enableSilentPreAuth:s,useFusionAuth:l}){if(n===void 0)throw new Qt("errors.sisenseContextNoAuthentication");const c=qy(n),d=ckt({url:c,token:r,wat:o,ssoEnabled:i,enableSilentPreAuth:s,useFusionAuth:l});if(!d)throw new Qt("errors.sisenseContextNoAuthentication");DCt();const p=new dkt(c,d,"sdk-ui-1.34.0"),u=yield p.login(),k=qce(d)||!u,v=yield ECt(a||{},p,k),h=new Tne(PCt(c,v.user.tenant.name),d),C=new SCt(p,h);return{httpClient:p,pivotClient:h,queryClient:C,settings:v,defaultDataSource:t,queryCache:{clear:ore}}}),oq=e=>e,LCt=()=>{let e=oq;return{configure(t){e=t},generate(t){return e(t)},reset(){e=oq}}},RCt=LCt(),ICt={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 jCt(e,t,n="Mui"){const r=ICt[t];return r?`${n}-${r}`:`${RCt.generate(e)}-${t}`}const zCt=["ownerState"],BCt=["variants"],FCt=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function HCt(e){return Object.keys(e).length===0}function WCt(e){return typeof e=="string"&&e.charCodeAt(0)>96}function ON(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const $Ct=x_(),iq=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function Nk({defaultTheme:e,theme:t,themeId:n}){return HCt(t)?e:t[n]||t}function UCt(e){return e?(t,n)=>n[e]:null}function PC(e,t){let{ownerState:n}=t,r=Ln(t,zCt);const o=typeof e=="function"?e(it({ownerState:n},r)):e;if(Array.isArray(o))return o.flatMap(i=>PC(i,it({ownerState:n},r)));if(o&&typeof o=="object"&&Array.isArray(o.variants)){const{variants:i=[]}=o;let a=Ln(o,BCt);return i.forEach(s=>{let l=!0;typeof s.props=="function"?l=s.props(it({ownerState:n},r,n)):Object.keys(s.props).forEach(c=>{(n==null?void 0:n[c])!==s.props[c]&&r[c]!==s.props[c]&&(l=!1)}),l&&(Array.isArray(a)||(a=[a]),a.push(typeof s.style=="function"?s.style(it({ownerState:n},r,n)):s.style))}),a}return o}function YCt(e={}){const{themeId:t,defaultTheme:n=$Ct,rootShouldForwardProp:r=ON,slotShouldForwardProp:o=ON}=e,i=a=>b_(it({},a,{theme:Nk(it({},a,{defaultTheme:n,themeId:t}))}));return i.__mui_systemSx=!0,(a,s={})=>{jie(a,A=>A.filter(D=>!(D!=null&&D.__mui_systemSx)));const{name:l,slot:c,skipVariantsResolver:d,skipSx:p,overridesResolver:u=UCt(iq(c))}=s,k=Ln(s,FCt),v=d!==void 0?d:c&&c!=="Root"&&c!=="root"||!1,h=p||!1;let C;process.env.NODE_ENV!=="production"&&l&&(C=`${l}-${iq(c||"Root")}`);let R=ON;c==="Root"||c==="root"?R=r:c?R=o:WCt(a)&&(R=void 0);const H=Iie(a,it({shouldForwardProp:R,label:C},k)),U=A=>typeof A=="function"&&A.__emotion_real!==A||pp(A)?D=>PC(A,it({},D,{theme:Nk({theme:D.theme,defaultTheme:n,themeId:t})})):A,W=(A,...D)=>{let z=U(A);const N=D?D.map(U):[];l&&u&&N.push(x=>{const g=Nk(it({},x,{defaultTheme:n,themeId:t}));if(!g.components||!g.components[l]||!g.components[l].styleOverrides)return null;const M=g.components[l].styleOverrides,_={};return Object.entries(M).forEach(([T,Y])=>{_[T]=PC(Y,it({},x,{theme:g}))}),u(x,_)}),l&&!v&&N.push(x=>{var g;const M=Nk(it({},x,{defaultTheme:n,themeId:t})),_=M==null||(g=M.components)==null||(g=g[l])==null?void 0:g.variants;return PC({variants:_},it({},x,{theme:M}))}),h||N.push(i);const B=N.length-D.length;if(Array.isArray(A)&&B>0){const x=new Array(B).fill("");z=[...A,...x],z.raw=[...A.raw,...x]}const E=H(z,...N);if(process.env.NODE_ENV!=="production"){let x;l&&(x=`${l}${VE(c||"")}`),x===void 0&&(x=`Styled(${$ie(a)})`),E.displayName=x}return a.muiName&&(E.muiName=a.muiName),E};return H.withConfig&&(W.withConfig=H.withConfig),W}}const GCt=YCt();function VCt(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:fM(t.components[n].defaultProps,r)}function qCt({props:e,name:t,defaultTheme:n,themeId:r}){let o=mae(n);return r&&(o=o[r]||o),VCt({theme:o,name:t,props:e})}function XCt(e,t,n=void 0){const r={};return Object.keys(e).forEach(o=>{r[o]=e[o].reduce((i,a)=>{if(a){const s=t(a);s!==""&&i.push(s),n&&n[a]&&i.push(n[a])}return i},[]).join(" ")}),r}const ZCt=["component","direction","spacing","divider","children","className","useFlexGap"],KCt=x_(),QCt=GCt("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function JCt(e){return qCt({props:e,name:"MuiStack",defaultTheme:KCt})}function e2t(e,t){const n=va.toArray(e).filter(Boolean);return n.reduce((r,o,i)=>(r.push(o),i<n.length-1&&r.push(fr(t,{key:`separator-${i}`})),r),[])}const t2t=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],n2t=({ownerState:e,theme:t})=>{let n=it({display:"flex",flexDirection:"column"},hu({theme:t},nN({values:e.direction,breakpoints:t.breakpoints.values}),r=>({flexDirection:r})));if(e.spacing){const r=Az(t),o=Object.keys(t.breakpoints.values).reduce((s,l)=>((typeof e.spacing=="object"&&e.spacing[l]!=null||typeof e.direction=="object"&&e.direction[l]!=null)&&(s[l]=!0),s),{}),i=nN({values:e.direction,base:o}),a=nN({values:e.spacing,base:o});typeof i=="object"&&Object.keys(i).forEach((s,l,c)=>{if(!i[s]){const d=l>0?i[c[l-1]]:"column";i[s]=d}}),n=qm(n,hu({theme:t},a,(s,l)=>e.useFlexGap?{gap:Xm(r,s)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${t2t(l?i[l]:e.direction)}`]:Xm(r,s)}}))}return n=mJe(t.breakpoints,n),n};function r2t(e={}){const{createStyledComponent:t=QCt,useThemeProps:n=JCt,componentName:r="MuiStack"}=e,o=()=>XCt({root:["root"]},s=>jCt(r,s),{}),i=t(n2t),a=Kt(function(s,l){const c=n(s),d=Pz(c),{component:p="div",direction:u="column",spacing:k=0,divider:v,children:h,className:C,useFlexGap:R=!1}=d,H=Ln(d,ZCt),U={direction:u,spacing:k,useFlexGap:R},W=o();return je(i,it({as:p,ownerState:U,ref:l,className:bn(W.root,C)},H,{children:v?e2t(h,v):h}))});return process.env.NODE_ENV!=="production"&&(a.propTypes={children:fe.node,direction:fe.oneOfType([fe.oneOf(["column-reverse","column","row-reverse","row"]),fe.arrayOf(fe.oneOf(["column-reverse","column","row-reverse","row"])),fe.object]),divider:fe.node,spacing:fe.oneOfType([fe.arrayOf(fe.oneOfType([fe.number,fe.string])),fe.number,fe.object,fe.string]),sx:fe.oneOfType([fe.arrayOf(fe.oneOfType([fe.func,fe.object,fe.bool])),fe.func,fe.object])}),a}function cue(e,t){var n,r;return Mr(e)&&t.indexOf((n=e.type.muiName)!=null?n:(r=e.type)==null||(r=r._payload)==null||(r=r.value)==null?void 0:r.muiName)!==-1}const o2t=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],i2t=e=>{const{classes:t,inset:n,primary:r,secondary:o,dense:i}=e;return oo({root:["root",n&&"inset",i&&"dense",r&&o&&"multiline"],primary:["primary"],secondary:["secondary"]},mrt,t)},a2t=Dn("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${vM.primary}`]:t.primary},{[`& .${vM.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})(({ownerState:e})=>it({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},e.primary&&e.secondary&&{marginTop:6,marginBottom:6},e.inset&&{paddingLeft:56})),uue=Kt(function(e,t){const n=Vr({props:e,name:"MuiListItemText"}),{children:r,className:o,disableTypography:i=!1,inset:a=!1,primary:s,primaryTypographyProps:l,secondary:c,secondaryTypographyProps:d}=n,p=Ln(n,o2t),{dense:u}=Nn(au);let k=s??r,v=c;const h=it({},n,{disableTypography:i,inset:a,primary:!!k,secondary:!!v,dense:u}),C=i2t(h);return k!=null&&k.type!==rs&&!i&&(k=je(rs,it({variant:u?"body2":"body1",className:C.primary,component:l!=null&&l.variant?void 0:"span",display:"block"},l,{children:k}))),v!=null&&v.type!==rs&&!i&&(v=je(rs,it({variant:"body2",className:C.secondary,color:"text.secondary",display:"block"},d,{children:v}))),je(a2t,it({className:bn(C.root,o),ownerState:h,ref:t},p,{children:[k,v]}))});process.env.NODE_ENV!=="production"&&(uue.propTypes={children:fe.node,classes:fe.object,className:fe.string,disableTypography:fe.bool,inset:fe.bool,primary:fe.node,primaryTypographyProps:fe.object,secondary:fe.node,secondaryTypographyProps:fe.object,sx:fe.oneOfType([fe.arrayOf(fe.oneOfType([fe.func,fe.object,fe.bool])),fe.func,fe.object])});const Om=(e,t)=>`${t}px solid ${e}`,due=e=>({columns:[{widthPercentage:100,rows:e.map(t=>({cells:[{widthPercentage:100,widgetId:t.id}]}))}]});function pue(e){return Yle(e)?{direction:e}:e}function aq(e,t){return{valuesIndex:e.field-(t.rows||[]).length-(t.columns||[]).length,columnsMembersPath:Object.values(e.measurePath||{})}}function s2t({type:e,settings:t,sortDetails:n},r){return e==="simple"?n.field>=(r.rows||[]).length?[{rowIndex:0,sort:{direction:sv(t[0].direction),by:aq(n,r)}}]:[{rowIndex:n.field,sort:{direction:sv(t[0].direction)}}]:t.reduce((o,i,a)=>{var s;const l=(s=r.rows)==null?void 0:s[a],c=(l==null?void 0:l.sortType)&&pue(l==null?void 0:l.sortType),d={direction:sv(i.direction),by:aq(n,r)};return!i.selected&&Zs(c==null?void 0:c.by,d.by)&&o.push({rowIndex:a,sort:null}),i.selected&&o.push({rowIndex:a,sort:d}),o},[])}function l2t(e){const{jaql:t,pivotBuilder:n,isForceReload:r}=e,[o,i]=ut({isLoading:!1,isNoResults:!1}),a=bc(t);xt(()=>{t&&(a||r)&&n.updateJaql(t)},[r,a,t,n]);const s=ct(()=>{i({isLoading:!0,isNoResults:!1})},[]),l=ct(c=>{i({isLoading:!1,isNoResults:!c.cellsMetadata})},[]);return xt(()=>{const c=[{event:j3,handler:s},{event:z3,handler:l}];return c.forEach(({event:d,handler:p})=>{n.on(d,p)}),()=>{c.forEach(({event:d,handler:p})=>{n.off(d,p)})}},[n,s,l]),o}function c2t(e){const{pivotClient:t,pivotBuilder:n,shouldBeRecreated:r}=e,[o,i]=ut(()=>t.prepareDataService());return xt(()=>{if(r){const a=t.prepareDataService();i(a),n.updateDataService(a)}},[t,n,r]),xt(()=>()=>{o.destroy()},[o]),o}const u2t=({dataOptions:e})=>{const[t,n]=ut(Yae(e));return{dataOptionsInternal:t,updateSort(r){var o;n(ft(Ze({},t),{rows:(o=t.rows)==null?void 0:o.map((i,a)=>{const s=r.rows.find(({rowIndex:l})=>l===a);return s?s.sort===null?PU(i,{sortType:void 0}):PU(i,{sortType:s.sort}):i})}))}}},d2t=e=>(t,n,r,o)=>{var i;const a=ez(e,(i=o==null?void 0:o.field)==null?void 0:i.index),s=Zre(a),l=t.value===null||typeof t.value>"u";t.content=l?"":hi(s,t.value)},p2t=()=>(e,t,n)=>{var r,o;const i=e.userType===Cr.CORNER,a=e.userType===Cr.SUB_TOTAL;if(!t||i||a)return;const s=n.metadata.find(({panel:c,jaql:d})=>{var p;const u=["rows","columns"].includes(c),k=d.dim===t.jaql.dim,v=t.jaql.datatype===d.datatype&&t.jaql.level===d.level,h=(p=d.in)==null?void 0:p.selected;return u&&k&&v&&h}),l=(o=(r=s==null?void 0:s.jaql)==null?void 0:r.in)==null?void 0:o.selected;l&&Ckt(l.jaql)(e.value)&&(e.state={isSelected:!0})};function h2t(e,t){return n=>{var r,o,i,a;if(n.userType===Cr.SUB_TOTAL&&(n.content=t("pivotTable.subTotal",{value:(r=n.content)!=null?r:""})),n.userType===Cr.GRAND_TOTAL){if(n.metadataType===Gn.ROWS&&(n.content=t("pivotTable.grandTotal"),((o=e.values)==null?void 0:o.length)===1&&!((i=e.columns)!=null&&i.length))){const[s]=e.values,l="column"in s?s.column:s;n.content=(a=l.name)!=null?a:n.content}n.metadataType===Gn.COLUMNS&&n.parent&&(n.content=t("pivotTable.grandTotal"))}}}const f2t="#000000",m2t="#ffffff";function g2t(e,t){return(n,r,o,i)=>{var a;const s={};if(r.userType===Cr.SUB_TOTAL||r.userType===Cr.GRAND_TOTAL||o.userType===Cr.SUB_TOTAL||o.userType===Cr.GRAND_TOTAL||o.parent&&o.parent.userType===Cr.SUB_TOTAL||o.parent&&o.parent.userType===Cr.GRAND_TOTAL)return;const l=ez(e,(a=i==null?void 0:i.field)==null?void 0:a.index),c=l==null?void 0:l.color,d=l==null?void 0:l.dataBarsColor;if(c){const p=Qx(c);if(p.type==="Static"||p.type==="Absolute"){const u=p.getColor(n.value);u&&(s.backgroundColor=u)}else if(p.type==="Relative"){const u=c,[k]=t.palette.variantColors,v=k?mc(k,.2):f2t,h=k?mc(k,-.2):m2t,C={steps:u.steps,min:u.minColor,max:u.maxColor,minDef:v,maxDef:h,minGray:rM(v),maxGray:rM(h)};n.store=n.store||{},n.store.compileRange=({min:R,max:H,minvalue:U,midvalue:W,maxvalue:A})=>jre(R??"#000000",H??"#ffffff",U??0,W??0,A??0),n.store.compileRangeContext={},n.store.compileRangeArgs=C}}if(d){const p=Qx(d);if(p.type==="Static"||p.type==="Absolute"){const u=p.getColor(n.value);u&&(s.databarColor=u)}}Object.keys(s).length>0&&(n.style=n.style||{},Object.assign(n.style,s))}}const v2t=({dataService:e,dataOptions:t})=>{const{app:n}=Er(),{t:r}=Fn(),{themeSettings:o}=mn(),i=ct(j5([d2t(t),g2t(t,o)]),[t]),a=ct((l,c)=>_g(l,c,n==null?void 0:n.settings.locale,n==null?void 0:n.settings.dateConfig),[n]),s=ct(j5([CGe(t,a),h2t(t,r),p2t()]),[t,r]);xt(()=>(e.on($L,i),e.on(p2,s),()=>{e.off($L,i),e.off(p2,s)}),[e,i])};function sq(e,t){return wd(e,t)}function y2t(e){const t=x2t(e),n=Lg(e,t),[r,o]=wc(sq,{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0}),{isInitialized:i,app:a}=Er();return xt(()=>{if(i||o({type:"error",error:new Qt("errors.executeQueryNoSisenseContext")}),n(a)){o({type:"loading"});const{dataSource:s,rows:l,columns:c,values:d,grandTotals:p,filters:u,highlights:k,count:v,offset:h,onBeforeQuery:C}=e,{filters:R,relations:H}=bl(u);nre({dataSource:s,rows:l,columns:c,values:d,grandTotals:p,filters:R,filterRelations:H,highlights:k,count:v,offset:h},a,{onBeforeQuery:C}).then(U=>{o({type:"success",data:U})}).catch(U=>{o({type:"error",error:U})})}},[a,i,e,n]),r.data&&t?sq(r,{type:"loading"}):r}const b2t=["dataSource","rows","columns","values","grandTotals","count","offset","onBeforeQuery"];function x2t(e){return bc(e,b2t,(t,n)=>{const{filters:r}=bl(n.filters),{filters:o}=bl(t.filters);return Km(r,o)||Km(n.highlights,t.highlights)})}function hue(e,t){const[n,r]=ut(e),o=bt(()=>N_(i=>{r(i)},t),[t]);return xt(()=>{o(e)},[e,o]),n}const w2t=200,lq=e=>Ze({attribute:cu(e),includeSubTotals:e.includeSubTotals||!1},e.sortType&&{sort:pue(e.sortType)}),_2t=e=>{var t;return{measure:_E(e),totalsCalculation:e.totalsCalculation,dataBars:e.dataBars||!1,shouldRequestMinMax:((t=e.color)==null?void 0:t.type)==="range"}},fue=e=>{const{rows:t=[],columns:n=[],values:r=[],grandTotals:o}=e,i=t.flatMap(lq),a=n.flatMap(lq),s=r.flatMap(_2t);return{rows:i,columns:a,values:s,grandTotals:o}},S2t=({dataSet:e,dataOptionsInternal:t,filters:n,highlights:r})=>{const[o,i]=ut(),{rows:a,columns:s,values:l,grandTotals:c}=fue(t),d=ct(k=>{i(v=>Zs(v,k)?v:k)},[i]),p=hue({dataSource:e,rows:a,columns:s,values:l,grandTotals:c,filters:n,highlights:r,onBeforeQuery:d},w2t),{error:u}=y2t(p);return{jaql:o,error:u}},k2t="#cbced7",C2t="#ffff9c";function M2t(e,t){var n,r,o,i,a,s,l,c,d,p,u;let k,v;if((n=t==null?void 0:t.chart)!=null&&n.backgroundColor){const h=Ey(fc((r=t==null?void 0:t.chart)==null?void 0:r.backgroundColor))<.5?.07:-.07;k=za((o=t==null?void 0:t.chart)==null?void 0:o.backgroundColor,h),v=za((i=t==null?void 0:t.chart)==null?void 0:i.backgroundColor,h*1.5)}return{fontFamily:(a=t==null?void 0:t.typography)==null?void 0:a.fontFamily,textColor:(s=t==null?void 0:t.chart)==null?void 0:s.textColor,backgroundColor:(l=t==null?void 0:t.chart)==null?void 0:l.backgroundColor,borderColor:k2t,fillColor:k,additionalFillColor:v,fillOptions:{alternatingRows:e==null?void 0:e.alternatingRowsColor,alternatingColumns:e==null?void 0:e.alternatingColumnsColor,columnsHeaders:e==null?void 0:e.headersColor,rowMembers:e==null?void 0:e.membersColor,totals:e==null?void 0:e.totalsColor},rowHeight:e==null?void 0:e.rowHeight,isAutoHeight:(c=e==null?void 0:e.isAutoHeight)!=null?c:!1,navigationPrimaryColor:(d=t==null?void 0:t.typography)==null?void 0:d.primaryTextColor,navigationSecondaryColor:(p=t==null?void 0:t.typography)==null?void 0:p.secondaryTextColor,selectionColor:(u=e==null?void 0:e.highlightColor)!=null?u:C2t}}const T2t=25;function E2t({nodeRef:e,pivotBuilder:t,dataOptions:n,styleOptions:r,themeSettings:o,size:i,onTotalHeightChange:a}){const[s,l]=ny((r==null?void 0:r.rowsPerPage)||T2t),c=ct((k,v)=>{const h=[...n.rows?n.rows:[],...n.columns?n.columns:[],...n.values?n.values:[]].map(R=>R==null?void 0:R.width);if(v){const[R,H]=v,U=k[R];U&&typeof U.jaqlIndex<"u"&&(h[U.jaqlIndex]=H)}const C=[];return k.forEach((R,H)=>{typeof R.jaqlIndex<"u"&&typeof h[R.jaqlIndex]<"u"&&C.push([H,h[R.jaqlIndex]])}),C},[n]),d=ct(k=>{l(k)},[l]),p=bt(()=>M2t(r,o),[r,o]),u=bt(()=>i?Ze({width:i.width,height:i.height,isPaginated:!0,itemsPerPage:s,isSelectedMode:!0,onUpdatePredefinedColumnWidth:c,onItemsPerPageChange:d,onTotalHeightChange:a},p):null,[i,s,c,p,a,d]);xt(()=>{e.current&&u&&(e.current.children.length?t.updateProps(u):t.render(e.current,u))},[e,t,u])}function A2t(e){const{pivotClient:t}=e,n=bt(()=>t.preparePivotBuilder(),[t]);return xt(()=>()=>{n.destroy()},[n]),n}const mue=mr({componentName:"PivotTable"})(e=>{const{dataSet:t,dataOptions:n,filters:r,highlights:o,refreshCounter:i=0}=e,a=bt(()=>{var x;return(x=e.styleOptions)!=null?x:{}},[e.styleOptions]),s=pt(null),[l,c]=ut(null),[d,p]=ut(null),{app:u}=Er(),{themeSettings:k}=mn(),v=u==null?void 0:u.pivotClient;if(!v)throw new Qt("errors.noPivotClient");const{dataOptionsInternal:h,updateSort:C}=u2t({dataOptions:n}),{error:R,jaql:H}=S2t({dataSet:t,dataOptionsInternal:h,filters:r,highlights:o});if(R)throw R;const U=A2t({pivotClient:v}),W=bc(H),A=i>0&&bc(i),D=c2t({pivotClient:v,pivotBuilder:U,shouldBeRecreated:W||A});v2t({dataService:D,dataOptions:n}),E2t({nodeRef:s,pivotBuilder:U,dataOptions:n,styleOptions:a,themeSettings:k,size:l,onTotalHeightChange:p});const{isLoading:z,isNoResults:N}=l2t({jaql:H,pivotBuilder:U,isForceReload:A}),B=ct(x=>{const g=s2t(x,h);C({rows:g})},[h,C]);xt(()=>(U.on(G2,B),()=>{U.off(G2,B)}),[U,B]);const E=ct(x=>{(x.width!==(l==null?void 0:l.width)||x.height!==(l==null?void 0:l.height))&&c(x)},[l,c]);return ke(Ag,{defaultSize:Fae,size:{width:a==null?void 0:a.width,height:a!=null&&a.isAutoHeight&&!N&&d!=null?d:a==null?void 0:a.height},onSizeChange:E,children:ke(ox,{themeSettings:k,isVisible:z,children:Pt(yr,{children:[N&&ke(Yz,{iconType:"table"}),ke("div",{ref:s,"aria-label":"pivot-table-root"})]})})})}),gue=mr({componentName:"PivotTableWidget"})(e=>{var t;const[n,r]=ut(0),{app:o}=Er(),{styleOptions:i,dataSource:a=o==null?void 0:o.defaultDataSource,dataOptions:s}=e,l=lA("pivot",{hasHeader:!((t=i==null?void 0:i.header)!=null&&t.hidden)}),c=e.styleOptions||{},{width:d,height:p}=c,u=no(c,["width","height"]);return s?ke(Ag,{defaultSize:l,size:{width:d,height:i!=null&&i.isAutoHeight?void 0:p},children:ke(EA,ft(Ze({},e),{dataSetName:a&&kd(a),onRefresh:()=>r(n+1),children:ke(mue,{dataSet:e.dataSource,dataOptions:e.dataOptions,styleOptions:u,filters:e.filters,highlights:e.highlights,refreshCounter:n})}))}):null}),O2t=e=>{const t=[],n=r=>{Array.isArray(r)?r.forEach(n):typeof r=="object"&&r!==null&&(r.widgetid&&t.push(r.widgetid),Object.values(r).forEach(n))};return n(e.layout),t},P2t=e=>"levels"in e&&e.isCascading===!0;function D2t(e,t){if(!e)return[];return n(e);function n(r){var o,i;if(WE(r))return[{nodeType:"attribute",attribute:((i=(o=mQe(t,r.instanceid))==null?void 0:o.attribute)==null?void 0:i.name)||r.instanceid}];if($E(r))return[{nodeType:"openBracket"},...n(r.left),{nodeType:"operator",operator:r.operator},...n(r.right),{nodeType:"closeBracket"}];throw new UE}}function EM(e=[],t=[],n){switch(n){case"widgetFirst":return kC(t,e);case"codeFirst":return kC(e,t);case"codeOnly":return t;default:return kC(e,t)}}var N2t=function(e){return e.FILTER="filter",e.SELECT="select",e}({});function cq(e){return!!e&&e.min!==null&&e.max!==null}var L2t=function(e){return e.PRE="pre",e.POST="post",e}({});function vue(e){return"formula"in e}function yue(e){return"formulaRef"in e}const R2t=e=>({columns:(e.columns||[]).map(t=>({widthPercentage:t.width,rows:(t.cells||[]).map(n=>{const r=n.subcells.reduce((o,i)=>o+i.width,0);return{cells:n.subcells.map(o=>({widthPercentage:r<100?o.width/(r/100):o.width,height:o.elements[0].height,widgetId:o.elements[0].widgetid}))}})}))}),I2t=e=>Im(e.jaql,e.instanceid,e.disabled,e.locked),j2t=e=>{const{levels:t,instanceid:n,disabled:r,locked:o}=e,i=t.map(a=>Im(a,a.instanceid));return new KI(i,{guid:n,disabled:r,locked:o})};function z2t(e,t){const n=e.map(o=>P2t(o)?j2t(o):I2t(o));if(!t)return n;const r=cQe(t,n);return!r||_z(r)?n:ml(n,r)}const B2t=e=>e.subtype==="WidgetsTabber";function F2t(e=[]){const t={};return e.forEach(n=>{var r,o,i,a;t[n.oid]={filtersOptions:{applyMode:((r=n.options)==null?void 0:r.dashboardFiltersMode)==="filter"?uw.FILTER:uw.HIGHLIGHT,shouldAffectFilters:(o=n.options)==null?void 0:o.selector,ignoreFilters:{all:(i=n.metadata.ignore)==null?void 0:i.all,ids:(a=n.metadata.ignore)==null?void 0:a.ids},forceApplyBackgroundFilters:!0}}}),t}function H2t(e=[]){const t={};return e.forEach(n=>{B2t(n)&&(t[n.oid]={tabs:n.style.tabs,activeTab:parseInt(n.style.activeTab||"1",10)})}),t}function W2t(e,t){return na(this,null,function*(){var n;const r=$2t(e.widgets||[]);if(r.length===0)return e;const o=yield t.getSharedFormulas(r);return ft(Ze({},e),{widgets:(n=e.widgets)==null?void 0:n.map(i=>U2t(i,o))})})}function $2t(e){const t=e.flatMap(n=>n.metadata.panels.flatMap(r=>r.items.flatMap(o=>!vue(o.jaql)||!o.jaql.context?[]:Object.values(o.jaql.context).filter(yue).map(i=>i.formulaRef))));return Array.from(new Set(t))}function U2t(e,t){const n=e.metadata.panels.map(r=>{const o=r.items.map(i=>{const{jaql:a}=i;if(!vue(a)||!a.context)return i;const s=Object.fromEntries(Object.entries(a.context).map(([l,c])=>yue(c)?[l,t[c.formulaRef]]:[l,c]));return ft(Ze({},i),{jaql:ft(Ze({},a),{context:s})})});return ft(Ze({},r),{items:o})});return ft(Ze({},e),{metadata:ft(Ze({},e.metadata),{panels:n})})}function bue(e,t){return na(this,arguments,function*(n,r,o={},i,a){var s,l;const{includeWidgets:c,includeFilters:d}=o,p=new Cg(n),u=["oid","title","datasource","style"],k=((s=n.auth)==null?void 0:s.type)==="wat";c&&u.push("layout"),d&&(u.push("filters"),u.push("filterRelations"));const v=yield p.getDashboard(r,{fields:u});if(!v)throw new Qt("errors.dashboardWithOidNotFound",{dashboardOid:r});if(c){let C;if(k){const R=O2t(v);C=(yield Promise.all(R.map(H=>p.getWidget(H,v.oid)))).filter(H=>H!==void 0)}else C=(yield p.getDashboardWidgets(r))||[];v.widgets=C}if((l=v.style)!=null&&l.paletteId&&!v.style.palette){const C=yield p.getPalettes(),R=C==null?void 0:C.find(({_id:H})=>{var U;return H===((U=v.style)==null?void 0:U.paletteId)});R&&(v.style.palette={name:R.name,colors:R.colors})}const h=yield W2t(v,p);return iB(h,i,a)})}const Y2t=(e,t)=>{const n={};for(const r of e){const o=t(r);o in n||(n[o]=r)}return Object.values(n)};function G2t(e){return na(this,arguments,function*(t,n={}){const{includeWidgets:r,searchByTitle:o}=n,i=new Cg(t),a=[];let s=["oid","title","datasource"];r&&(s=[],a.push("widgets"));const l=yield i.getDashboards({fields:s,expand:a,searchByTitle:o});if(!l)return[];const c=Y2t(l,d=>d.oid);return c.length!==l.length&&console.warn("Removing detected duplicate dashboard(s)"),c.map(d=>iB(d))})}const V2t=I6("useGetDashboardModel")(xue);function xue(e){const t=bc(e,["dashboardOid"]),n=Lg(e,t),[r,o]=wc(wd,{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0}),{isInitialized:i,app:a}=Er(),{themeSettings:s}=mn();return xt(()=>{if(i||o({type:"error",error:new Qt("errors.sisenseContextNotFound")}),n(a)){o({type:"loading"});const{dashboardOid:l,includeWidgets:c,includeFilters:d}=e;bue(a.httpClient,l,{includeWidgets:c,includeFilters:d},s,a.settings).then(p=>{o({type:"success",data:p})}).catch(p=>{o({type:"error",error:p})})}},[a,i,e,n,s]),r.data&&t?zR(wd(r,{type:"loading"})):zR(r)}function zR(e){const t=e,{data:n}=t,r=no(t,["data"]);return ft(Ze({},r),{dashboard:n})}function q2t(e){const t=e,{data:n}=t,r=no(t,["data"]);return ft(Ze({},r),{dashboards:n})}const wue=e=>na(void 0,[e],function*({widgetOid:t,dashboardOid:n,includeDashboard:r,api:o}){const[i,a]=yield Promise.all([o.getWidget(t,n),r?o.getDashboard(n):void 0]);return{widget:i,dashboard:a}});function _ue(e,t,n,r,o){return na(this,null,function*(){const i=new Cg(e),{widget:a}=yield wue({widgetOid:n,dashboardOid:t,api:i});if(!a)throw new Qt("errors.widgetWithOidNotFound",{widgetOid:n});return z_(a,r,o)})}function X2t(e){const t=bc(e,["dashboardOid","widgetOid"]),n=Lg(e,t),{themeSettings:r}=mn(),[o,i]=wc(wd,{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0}),{isInitialized:a,app:s}=Er();return xt(()=>{if(a||i({type:"error",error:new Qt("errors.sisenseContextNotFound")}),n(s)){i({type:"loading"});const{dashboardOid:l,widgetOid:c}=e;_ue(s.httpClient,l,c,r,s.settings).then(d=>{i({type:"success",data:d})}).catch(d=>{i({type:"error",error:d})})}},[s,a,e,n,r]),o.data&&t?uq(wd(o,{type:"loading"})):uq(o)}function uq(e){const t=e,{data:n}=t,r=no(t,["data"]);return ft(Ze({},r),{widget:n})}function Z2t(e,t,n){var r;return n(e,function(o,i,a){if(t(o,i,a))return r=i,!1}),r}function K2t(e,t){return Z2t(e,ug(t),BI)}function Q2t(e){return e.percent||e.type==="percent"?"Percent":e.currency?"Currency":"Numbers"}function J2t(e){return e.decimals!==void 0&&e.decimals!=="auto"?typeof e.decimals=="string"?Number.parseFloat(e.decimals):e.decimals:"auto"}function eMt(e){var t,n,r,o,i,a,s,l,c;const d=e.jaql.datatype==="numeric"||e.jaql.agg==="count"||"context"in e.jaql,p=(t=e.format)==null?void 0:t.mask;return d&&p?{decimalScale:J2t(p),kilo:(n=p.abbreviations)==null?void 0:n.k,million:(r=p.abbreviations)==null?void 0:r.m,billion:(o=p.abbreviations)==null?void 0:o.b,trillion:(i=p.abbreviations)==null?void 0:i.t,thousandSeparator:(s=(a=p.number)==null?void 0:a.separated)!=null?s:p.separated,prefix:((l=p.currency)==null?void 0:l.position)===L2t.PRE,symbol:(c=p.currency)==null?void 0:c.symbol,name:Q2t(p)}:null}const tMt=!0;function nMt(e,t){if(!t||!tMt)return e;const{forecast:n,trend:r}=t;let o=Ze({},e);return n&&!n.isViewerDisabled&&n.isEnabled&&(o=ft(Ze({},o),{forecast:{confidenceInterval:n.confidence/100,forecastHorizon:n.forecastPeriod,modelType:"auto"}})),r&&!r.isViewerDisabled&&r.isEnabled&&(o=ft(Ze({},o),{trend:{modelType:r.trendType}})),o}const rMt=e=>{var t,n,r,o,i,a,s;return e.jaql&&"level"in e.jaql?(i=(n=(t=e.format)==null?void 0:t.mask)==null?void 0:n[e.jaql.level])!=null?i:(o=(r=e.format)==null?void 0:r.mask)==null?void 0:o.dateAndTime:(s=(a=e.format)==null?void 0:a.mask)==null?void 0:s.dateAndTime};function Qm(e,t){var n,r,o,i,a,s,l,c;const d=Fw(e.jaql,rMt(e),e.panel),p=sv((n=e.jaql.sort)!=null?n:e.categoriesSorting),u=eMt(e),k=(r=e.format)==null?void 0:r.subtotal,v=(o=e.format)==null?void 0:o.width;let h=wC((i=e.format)==null?void 0:i.color,t);const C=wC((a=e.format)==null?void 0:a.colorSecond,t),R=e.panel==="columns"&&e.panel;if(!h&&!((s=e.format)!=null&&s.color)&&e.format&&"colorIndex"in e.format&&(h=wC({type:"color",colorIndex:e.format.colorIndex},t)),xn.isMeasure(d)){const H=e.y2,U=e.singleSeriesType,W="subtotalAgg"in e.jaql&&e.jaql.subtotalAgg,A=(l=e.format)==null?void 0:l.databars,D=Ze(Ze(Ze(Ze(Ze(Ze(Ze(Ze(Ze(Ze({column:d},h&&{color:h}),C&&{dataBarsColor:C}),H&&{showOnRightAxis:H}),p&&{sortType:p}),U&&{chartType:U}),u&&{numberFormatConfig:u}),W&&{totalsCalculation:W}),A&&{dataBars:A}),v&&{width:v}),R&&{panel:R});return nMt(D,e.statisticalModels)}return Ze(Ze(Ze(Ze(Ze(Ze({column:d,isColored:(c=e.isColored)!=null?c:!1},p&&{sortType:p}),u&&{numberFormatConfig:u}),k&&{includeSubTotals:k}),v&&{width:v}),h&&{color:h}),R&&{panel:R})}function sp(e){const t=e.column;let n;if(xn.isAttribute(t))n=t.jaql(!0);else if(xn.isMeasure(t))n=t.jaql(!0);else throw new Qt("errors.unsupportedDimensionalElement");return n.jaql?n:{jaql:n}}const oMt=(e,t)=>{const n={};return e.forEach(r=>{r.name!=="filters"&&(n[_ce(r.name)]=ni(e,r.name,t))}),n};function BR(e,t,n){return la(e,t).map(DE).map(n)}function ni(e,t,n){return BR(e,t,r=>Qm(r,n))}function iMt(e,t,n){var r,o;const i=["chart/line","chart/area"].includes(t)?"x-axis":"categories",a=ni(e,i,n),s=ni(e,"values",n),l=ni(e,"break by",n),c=(o=(r=la(e,"break by")[0])==null?void 0:r.format)==null?void 0:o.members,d=c&&LE(c);return Ze({category:a,value:s,breakBy:l},d&&{seriesToColorMap:d})}function aMt(e,t,n){var r,o,i,a;const s=ni(t,"categories",n),l=ni(t,"values",n),c=ni(t,"size",n);let d,p;return e==="sunburst"?p=CVe(la(t,"categories")):(d=(o=(r=la(t,"categories")[0])==null?void 0:r.format)==null?void 0:o.members,la(t,"color").length&&(d=(a=(i=la(t,"color")[0])==null?void 0:i.format)==null?void 0:a.members),p=d&&LE(d)),Ze({category:s,value:[...l,...c]},p&&{seriesToColorMap:p})}function sMt(e,t){var n,r;const[o]=ni(e,"x-axis",t),[i]=ni(e,"y-axis",t),[a]=ni(e,"point",t),[s]=ni(e,"Break By / Color",t),[l]=ni(e,"size",t),c=(r=(n=la(e,"Break By / Color")[0])==null?void 0:n.format)==null?void 0:r.members,d=c&&LE(c);return Ze({x:o,y:i,breakByPoint:a,breakByColor:s,size:l},d&&{seriesToColorMap:d})}function lMt(e,t){const n=ni(e,"value",t),r=ni(e,"secondary",t),o=ni(e,"min",t),i=ni(e,"max",t);return{value:n,secondary:r,min:o,max:i}}function cMt(e,t){return{columns:ni(e,"columns",t)}}function uMt(e,t,n){let r;const o={},i=ni(e,"columns",n),a=BR(e,"values",(s,l)=>{var c,d,p,u,k;const{field:v,jaql:h}=s,{sortDetails:C}=h;C&&(r=C),v&&(o[v.index]=l),((d=(c=s.format)==null?void 0:c.color)==null?void 0:d.type)==="color"&&!((u=(p=s.format)==null?void 0:p.color)!=null&&u.color)&&delete s.format.color;const R=Qm(s,n);return typeof R.color!="string"&&((k=R.color)==null?void 0:k.type)==="conditional"&&delete R.color.defaultColor,R});return{rows:BR(e,"rows",(s,l,c)=>{var d;const p=l===c.length-1;let{sortDetails:u}=s==null?void 0:s.jaql;const k=Qm(s,n);k.column&&xn.isAttribute(k.column)&&(k.column=k.column.sort(Gr.None)),p&&r&&(u=r);const v=(u==null?void 0:u.field)!==((d=s.field)==null?void 0:d.index);return u&&(k.sortType=Ze({direction:sv(u.dir)},v&&{by:{valuesIndex:o[u.field],columnsMembersPath:Object.values(u.measurePath||{})}})),k}),columns:i,values:a,grandTotals:{rows:t.rowsGrandTotal,columns:t.columnsGrandTotal}}}function dMt(e){const t={"whisker/iqr":"iqr","whisker/extremums":"extremums","whisker/deviation":"standardDeviation"},n=K2t(e.whisker,r=>r);return t[n]}function pMt(e,t,n){const r=ni(e,"category",n),o=ni(e,"value",n),i=dMt(t),a=t.outliers.enabled;return{category:r,value:o,boxType:i,outliersEnabled:a}}function hMt(e,t){return la(e,"geo").map(DE).map(n=>{const r=Qm(n,t);return"geoLevel"in n?ft(Ze({},r),{level:n.geoLevel}):r})}function fMt(e,t){const n=hMt(e,t),r=ni(e,"size",t)[0],o=ni(e,"color",t)[0],i=ni(e,"details",t)[0];return{geo:n,size:r,colorBy:o,details:i}}function mMt(e,t){const n=[ni(e,"geo",t)[0]],r=ni(e,"color",t)[0];return Ze({geo:n},r&&{color:[r]})}function FR(e,t){const n="dim"in e.jaql?ft(Ze({},e),{jaql:ft(Ze({},e.jaql),{datasource:t})}):e,r=e.parent?FR(e.parent,t):void 0,o=e.through?FR(e.through,t):void 0;return ft(Ze({},n),{parent:r,through:o})}function gMt(e,t){return e.map(n=>ft(Ze({},n),{items:n.items.map(r=>FR(r,t))}))}function vMt(e,t,n,r){if(yMt(e))return iMt(t,e,r);if(bMt(e))return aMt(e,t,r);if(e==="chart/scatter")return sMt(t,r);if(e==="indicator")return lMt(t,r);if(c_(e))return cMt(t,r);if(Pd(e))return uMt(t,n,r);if(e==="chart/boxplot")return pMt(t,n,r);if(e==="map/scatter")return fMt(t,r);if(e==="map/area")return mMt(t,r);if(e==="richtexteditor")return{};throw new Qt("errors.unsupportedWidgetType",{widgetType:e})}function yMt(e){return["chart/line","chart/area","chart/bar","chart/column","chart/polar"].includes(e)}function bMt(e){return["chart/pie","chart/funnel","treemap","sunburst"].includes(e)}function Rg(e,t){const n=Jre(e);return Ze(Ze({},t),n&&{subtype:n})}function wp(e){const{min:t,max:n}=e||{};return ft(Ze({},e),{min:typeof t=="number"?t:null,max:typeof n=="number"?n:null})}function xMt(e,t,n){var r,o,i,a,s,l,c,d,p,u;const k={xAxis:wp(t.xAxis),yAxis:wp(t.yAxis),y2Axis:wp(t.y2Axis)},v=["chart/line","chart/area"].includes(e)?"x-axis":"categories",h=la(n,v),C=la(n,"values"),R=h.length===2;R&&(k.xAxis=ft(Ze({},k.xAxis),{title:(r=k.xAxis)==null?void 0:r.x2Title,x2Title:(o=k.xAxis)==null?void 0:o.title}));const H=!!((i=k.xAxis)!=null&&i.title&&"text"in k.xAxis.title),U=h[h.length-1];!H&&U&&(k.xAxis=ft(Ze({},k.xAxis),{title:ft(Ze({},(a=k.xAxis)==null?void 0:a.title),{text:U.jaql.title})}));const W=!!((s=k.xAxis)!=null&&s.x2Title&&"text"in k.xAxis.x2Title),A=h[0];!W&&R&&(k.xAxis=ft(Ze({},k.xAxis),{x2Title:ft(Ze({},(l=k.xAxis)==null?void 0:l.x2Title),{text:A.jaql.title})}));const D=!!((c=k.yAxis)!=null&&c.title&&"text"in k.yAxis.title),z=C.filter(E=>!E.y2);!D&&z.length===1&&(k.yAxis=ft(Ze({},k.yAxis),{title:ft(Ze({},(d=k.yAxis)==null?void 0:d.title),{text:z[0].jaql.title})}));const N=!!((p=k.y2Axis)!=null&&p.title&&"text"in k.y2Axis.title),B=C.filter(E=>E.y2);return!N&&B.length===1&&(k.y2Axis=ft(Ze({},k.y2Axis),{title:ft(Ze({},(u=k.y2Axis)==null?void 0:u.title),{text:B[0].jaql.title})})),k}function wMt(e,t){var n,r;const o={xAxis:wp(e.categories),yAxis:wp(e.axis)},i=la(t,"categories")[0];return!((n=o.xAxis)!=null&&n.title&&"text"in o.xAxis.title)&&i&&(o.xAxis=ft(Ze({},o.xAxis),{title:ft(Ze({},(r=o.xAxis)==null?void 0:r.title),{text:i.jaql.title})})),o.yAxis=ft(Ze({},o.yAxis),{title:{enabled:!1}}),o}function _Mt(e,t){var n,r,o,i;const a={xAxis:wp(e.xAxis),yAxis:wp(e.yAxis)},s=la(t,"x-axis")[0],l=la(t,"y-axis")[0];return!((n=a.xAxis)!=null&&n.title&&"text"in a.xAxis.title)&&s&&(a.xAxis=ft(Ze({},a.xAxis),{title:ft(Ze({},(r=a.xAxis)==null?void 0:r.title),{text:s.jaql.title})})),!((o=a.yAxis)!=null&&o.title&&"text"in a.yAxis.title)&&l&&(a.yAxis=ft(Ze({},a.yAxis),{title:ft(Ze({},(i=a.yAxis)==null?void 0:i.title),{text:l.jaql.title})})),a}function SMt(e,t){var n,r,o,i;const a={xAxis:wp(e.xAxis),yAxis:wp(e.yAxis)},s=la(t,"category")[0],l=la(t,"value")[0];return!((n=a.xAxis)!=null&&n.title&&"text"in a.xAxis.title)&&s&&(a.xAxis=ft(Ze({},a.xAxis),{title:ft(Ze({},(r=a.xAxis)==null?void 0:r.title),{text:s.jaql.title})})),!((o=a.yAxis)!=null&&o.title&&"text"in a.yAxis.title)&&l&&(a.yAxis=ft(Ze({},a.yAxis),{title:ft(Ze({},(i=a.yAxis)==null?void 0:i.title),{text:l.jaql.title})})),a}function kMt(e,t){var n,r,o,i,a,s,l,c,d,p,u,k,v,h,C,R,H,U,W,A,D;const z=((n=t.seriesLabels)==null?void 0:n.enabled)&&((i=(o=(r=t.seriesLabels)==null?void 0:r.labels)==null?void 0:o.types)==null?void 0:i.totals),N=e==="area/stacked"||e==="area/stackedspline"||e==="column/stackedcolumn"||e==="bar/stacked",B=e==="area/stacked100"||e==="area/stackedspline100"||e==="column/stackedcolumn100"||e==="bar/stacked100";let E=(s=(a=t.seriesLabels)==null?void 0:a.enabled)!=null?s:!1;return(N||B)&&(E=!!(N&&(d=(c=(l=t.seriesLabels)==null?void 0:l.labels)==null?void 0:c.types)!=null&&d.relative||B&&(k=(u=(p=t.seriesLabels)==null?void 0:p.labels)==null?void 0:u.types)!=null&&k.count)),ft(Ze({},z&&{totalLabels:{enabled:z,rotation:(h=(v=t.seriesLabels)==null?void 0:v.rotation)!=null?h:0}}),{seriesLabels:{enabled:(R=(C=t.seriesLabels)==null?void 0:C.enabled)!=null?R:!1,rotation:(U=(H=t.seriesLabels)==null?void 0:H.rotation)!=null?U:0,showValue:E,showPercentage:!!(B&&(D=(A=(W=t.seriesLabels)==null?void 0:W.labels)==null?void 0:A.types)!=null&&D.percentage)}})}function CMt(e,t,n,r){return ft(Ze(Ze(Ze({},Rg(t,n)),xMt(e,n,r)),kMt(t,n)),{lineWidth:n.lineWidth,markers:n.markers})}function MMt(e,t,n){return Ze(Ze({},Rg(e,t)),wMt(t,n))}function TMt(e,t,n){var r,o,i;return ft(Ze(Ze({},Rg(e,t)),_Mt(t,n)),{markerSize:{scatterDefaultSize:(r=t.markerSize)==null?void 0:r.defaultSize,scatterBubbleMinSize:(o=t.markerSize)==null?void 0:o.min,scatterBubbleMaxSize:(i=t.markerSize)==null?void 0:i.max}})}function EMt(e){return{header:{color:{enabled:e["colors/headers"]}},rows:{alternatingColor:{enabled:e["colors/rows"]}},columns:{alternatingColor:{enabled:e["colors/columns"]}}}}function AMt(e,t){return ft(Ze({},Rg(e,t)),{funnelSize:t.size,funnelType:t.type,funnelDirection:t.direction,labels:t.labels,legend:t.legend})}const OMt=(e,t)=>{const n=Jre(e);return n==="indicator/gauge"?{subtype:n,skin:+t.skin}:t.subtype==="bar"?{subtype:n,numericSubtype:"numericBar"}:{subtype:n,numericSubtype:"numericSimple",skin:t.skin}};function PMt(e,t,n){var r,o,i,a,s,l,c,d;const p=OMt(e,t),u=(r=la(n,"value")[0])==null?void 0:r.jaql.title,k=(o=la(n,"secondary")[0])==null?void 0:o.jaql.title;return ft(Ze({},p),{indicatorComponents:{title:{shouldBeShown:((a=(i=t.components)==null?void 0:i.title)==null?void 0:a.enabled)||!1,text:u},secondaryTitle:{text:k||""},ticks:{shouldBeShown:((l=(s=t.components)==null?void 0:s.ticks)==null?void 0:l.enabled)||!1},labels:{shouldBeShown:((d=(c=t.components)==null?void 0:c.labels)==null?void 0:d.enabled)||!1}}})}function DMt(e){var t,n,r,o;return{labels:{category:[{enabled:(t=e["title/1"])!=null?t:!0},{enabled:(n=e["title/2"])!=null?n:!0},{enabled:(r=e["title/3"])!=null?r:!0}]},tooltip:{mode:(o=e["tooltip/value"])==null||o?"value":"contribution"}}}function NMt(e){var t;return{legend:{enabled:e["legend/enabled"],position:e["legend/position"]},tooltip:{mode:(t=e["tooltip/value"])==null||t?"value":"contribution"}}}function LMt(e,t,n){return Ze(Ze({},Rg(e,t)),SMt(t,n))}function RMt(e,t){return ft(Ze({},Rg(e,t)),{markers:{fill:t.markers.fill,size:{defaultSize:t.markers.size.defaultSize,minSize:t.markers.size.min,maxSize:t.markers.size.max}}})}function IMt(e){let t;switch(e){case"areamap/world":t="world";break;case"areamap/usa":t="usa";break;default:throw new Qt("errors.unsupportedWidgetType",{widgetSubtype:e})}return{mapType:t}}function jMt(e){var t,n,r,o,i;return{rowsPerPage:parseInt(`${e.pageSize}`),isAutoHeight:e.automaticHeight,rowHeight:e.rowHeight,alternatingRowsColor:(t=e.colors)==null?void 0:t.rows,alternatingColumnsColor:(n=e.colors)==null?void 0:n.columns,headersColor:(r=e.colors)==null?void 0:r.headers,membersColor:(o=e.colors)==null?void 0:o.members,totalsColor:(i=e.colors)==null?void 0:i.totals}}function zMt(e,t){var n,r,o;const{subtype:i,style:a,metadata:{panels:s}}=t;switch(e){case"chart/line":case"chart/area":case"chart/bar":case"chart/column":{const l=CMt(e,i,a,s);if(l.navigator){const c=(n=t.options)==null?void 0:n.previousScrollerLocation;l.navigator.scrollerLocation=cq(c)?c:void 0}return l}case"chart/polar":return MMt(i,a,s);case"chart/scatter":return TMt(i,a,s);case"chart/funnel":return AMt(i,a);case"treemap":return DMt(a);case"sunburst":return NMt(a);case"chart/pie":return Rg(i,a);case"tablewidget":case"tablewidgetagg":return EMt(a);case"pivot":case"pivot2":return jMt(a);case"indicator":return PMt(i,a,s);case"chart/boxplot":{const l=LMt(i,a,s);return l.navigator&&(l.navigator.scrollerLocation=cq((r=t.options)==null?void 0:r.previousScrollerLocation)?(o=t.options)==null?void 0:o.previousScrollerLocation:void 0),l}case"map/scatter":return RMt(i,a);case"map/area":return IMt(i);case"richtexteditor":return a.content;default:throw new Qt("errors.unsupportedWidgetType",{widgetType:e})}}const Sue=e=>({backgroundColor:e.widgetBackgroundColor,spaceAround:Ah[e.widgetSpacing],cornerRadius:Ah[e.widgetCornerRadius],shadow:Ah[e.widgetShadow],border:e.widgetBorderEnabled,borderColor:e.widgetBorderColor,header:{titleTextColor:e.widgetTitleColor,titleAlignment:Ah[e.widgetTitleAlignment],dividerLine:e.widgetTitleDividerEnabled,dividerLineColor:e.widgetTitleDividerColor,backgroundColor:e.widgetTitleBackgroundColor}});function BMt(e,t,n){if(!t||!n)return e;const r=Sue(t);return Ze(Ze({},e),r)}function FMt(e,t){return e&&e.length?Xz(e,ug(t)):[]}function HMt(e,t){var n;const r=(n=e==null?void 0:e.findIndex(o=>o===t))!=null?n:-1;return r===-1?[]:e.slice(r)}const kue=e=>e!=null&&e.parent?[...kue(e.parent),Qm(e).column]:[],Cue=e=>{var t,n,r;if(e!=null&&e.parent&&e.through&&"filter"in e.through.jaql){const o=Qm(e).column,{jaql:i,format:{mask:a}={}}=e.parent,s="level"in i&&i.level&&a&&a[i.level],l=(r=(n=(t=e.through.jaql.filter)==null?void 0:t.members)==null?void 0:n.map(s?c=>({categoryValue:c,categoryDisplayValue:_g(n_(c),s)}):c=>({categoryValue:c})))!=null?r:[];return[...Cue(e.parent),{nextDimension:o,points:l}]}return[]};function WMt(e){switch(e){case"chart/line":case"chart/area":return["x-axis"];case"chart/boxplot":return["category"];case"chart/scatter":return["x-axis","y-axis","point","Break By / Color"];default:return["categories"]}}const $Mt=(e,t)=>{const n=WMt(e).map(r=>la(t,r)).flat().filter(r=>{const o="agg"in r.jaql&&r.jaql.agg,i="formula"in r.jaql&&r.jaql.formula;return!o&&!i});return n.length===1?n[0]:void 0},Mue="calendar",Tue="calendar - weeks",UMt=[yt.Years,yt.Quarters,yt.Months,yt.Days],YMt=[yt.Years,yt.Weeks,yt.Days],GMt=[yt.Years,yt.Quarters,yt.Months,yt.Weeks,yt.Days],VMt=e=>e.length===2?GMt:e[0]===Mue?UMt:e[0]===Tue?YMt:[],qMt=(e,t)=>{const[n=[],r]=L_(e,i=>[Mue,Tue].includes(i)),o=HMt(VMt(n),t.granularity);return o.length?[{title:"Calendar Hierarchy",levels:o.map(i=>new di(`${i} in ${t.name}`,t.expression,i,di.getDefaultFormatForGranularity(i)))},...r]:r},XMt=e=>{const t=e&&Qm(e),n=(e==null?void 0:e.hierarchies)||[];return t&&Ra(t.column.type)?(t.column.name=(e==null?void 0:e.jaql).column,qMt(n,t.column)):n},ZMt=(e,t,n=[],r)=>{const o=$Mt(e,t),i=o&&DE(o),a=Cue(o),s=XMt(i);return{drilldownPaths:[...FMt([...o?kue(o):[]],({expression:l})=>l),...s],drilldownSelections:a}};function X6(e){const t=e.filter,{filter:n}=t,r=no(t,["filter"]),o=n&&"turnedOff"in n&&n.turnedOff;let i,a;return o?a=n:i=n,r.members&&r.members.length===0&&(r.all=!0),{filter:r,backgroundFilter:i,turnOffMembersFilter:a}}function KMt(e){const{filter:t,backgroundFilter:n,turnOffMembersFilter:r}=X6(e.jaql),o=[ft(Ze({},e),{jaql:ft(Ze({},e.jaql),{filter:Ze(Ze({},t),r&&{filter:r})})})];return n&&o.push(ft(Ze({},e),{jaql:ft(Ze({},e.jaql),{filter:n}),disabled:!1})),o}function QMt(e){const t=e.find(r=>r.name==="filters"),n=[];return t==null||t.items.forEach(r=>{n.push(...KMt(r).filter(({disabled:o})=>!o))}),n}function JMt(e){return QMt(e).map(t=>Im(t.jaql,t.instanceid))}function Z6(e){if(Pd(e.widgetType))throw new rB("toExecuteQueryParams");let t,n,r,o;if(c_(e.widgetType)){const{attributes:i,measures:a}=Zz(Uae(e.dataOptions));t=i,n=a,r=Ile*jle+1,o=!0}else{const{attributes:i,measures:a}=Gae(e.dataOptions,e.chartType);t=i,n=a}return{dataSource:e.dataSource,dimensions:t,measures:n,filters:e.filters,highlights:e.highlights,count:r,ungroup:o}}function K6(e){if(!Pd(e.widgetType))throw new Qt("errors.widgetModel.onlyPivotWidgetSupported",{methodName:"toExecutePivotQueryParams"});const{rows:t,columns:n,values:r,grandTotals:o}=fue(Yae(e.dataOptions));return{dataSource:e.dataSource,rows:t,columns:n,values:r,grandTotals:o,filters:e.filters,highlights:e.highlights}}function Eue(e){if(Pd(e.widgetType))throw new rB("toChartProps");if(u_(e.widgetType))throw new jue("toChartProps");return c_(e.widgetType)?Ze({chartType:e.chartType},Q6(e)):{chartType:e.chartType,dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSet:e.dataSource,filters:e.filters,highlights:e.highlights}}function Q6(e){if(!c_(e.widgetType))throw new Qt("errors.widgetModel.onlyTableWidgetSupported",{methodName:"toTableProps"});return{dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSet:e.dataSource,filters:e.filters}}function Aue(e){if(!Pd(e.widgetType))throw new Qt("errors.widgetModel.onlyPivotWidgetSupported",{methodName:"toPivotTableProps"});return{dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSet:e.dataSource,filters:e.filters,highlights:e.highlights}}function J6(e){if(Pd(e.widgetType))throw new rB("toChartWidgetProps");if(u_(e.widgetType))throw new jue("toChartWidgetProps");return{chartType:e.chartType,dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSource:e.dataSource,filters:e.filters,highlights:e.highlights,title:e.title,description:e.description||"",drilldownOptions:e.drilldownOptions}}function Oue(e){if(!c_(e.widgetType))throw new Qt("errors.widgetModel.onlyTableWidgetSupported",{methodName:"toTableWidgetProps"});return{dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSource:e.dataSource,filters:e.filters,title:e.title,description:e.description||""}}function eB(e){if(!Pd(e.widgetType))throw new Qt("errors.widgetModel.onlyPivotWidgetSupported",{methodName:"toPivotTableWidgetProps"});return{dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSource:e.dataSource,filters:e.filters,highlights:e.highlights,title:e.title,description:e.description||""}}function tB(e){if(!u_(e.widgetType))throw new Qt("errors.widgetModel.onlyTextWidgetSupported",{methodName:"toTextWidgetProps"});return{styleOptions:e.styleOptions}}function Pue(e){if(!eoe(e.widgetType))throw new Qt("errors.widgetModel.onlyPluginWidgetSupported",{methodName:"toPluginWidgetProps"});return{pluginType:e.pluginType,dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSource:e.dataSource,filters:e.filters,highlights:e.highlights,title:e.title,description:e.description||""}}function Due(e){const{widgetType:t}=e;return Pd(t)?Ze({widgetType:"pivot"},eB(e)):u_(t)?Ze({widgetType:"text"},tB(e)):eoe(t)?Ze({widgetType:"plugin"},Pue(e)):Ze({widgetType:"chart"},J6(e))}function nB(e){const{oid:t}=e;return ft(Ze({},Due(e)),{id:t})}const lp=()=>{throw new Qt("errors.methodNotImplemented")},Nue={oid:"",title:"",dataSource:"",description:"",widgetType:"plugin",pluginType:"",dataOptions:{},styleOptions:{},drilldownOptions:{},filters:[],highlights:[],chartType:void 0,getExecuteQueryParams:lp,getExecutePivotQueryParams:lp,getChartProps:lp,getTableProps:lp,getPivotTableProps:lp,getPivotTableWidgetProps:lp,getChartWidgetProps:lp,getTableWidgetProps:lp,getTextWidgetProps:lp};function Lue(e){return ft(Ze({},e),{getExecuteQueryParams:()=>Z6(e),getExecutePivotQueryParams:()=>K6(e),getChartProps:()=>Eue(e),getTableProps:()=>Q6(e),getPivotTableProps:()=>Aue(e),getChartWidgetProps:()=>J6(e),getTableWidgetProps:()=>Oue(e),getPivotTableWidgetProps:()=>eB(e),getTextWidgetProps:()=>tB(e)})}function z_(e,t,n){var r,o,i,a;let s,l,c,d;const p=gMt(e.metadata.panels,e.datasource);if(s=e.type,BGe(s)){c=vMt(s,p,e.style,t==null?void 0:t.palette.variantColors),d=zMt(s,e);const C=(a=(i=(o=n==null?void 0:n.serverFeatures)==null?void 0:o.widgetDesignStyle)==null?void 0:i.active)!=null?a:!0;d=BMt(d,e.style.widgetDesign,C)}else{l=s,s="plugin",c=oMt(p,(r=t==null?void 0:t.palette.variantColors)!=null?r:[]);const C=e.style,{widgetDesign:R}=C,H=no(C,["widgetDesign"]);d=Ze(Ze({},H),R?Sue(R):{})}const u=ZMt(s,p),k=JMt(p),v=FGe(s)?jGe(s):void 0,h=ft(Ze({},Nue),{oid:e.oid,title:e.title,dataSource:pT(e.datasource),description:e.desc||"",widgetType:s,chartType:v,pluginType:l||"",dataOptions:c||{},styleOptions:d||{},drilldownOptions:u,filters:k});return Lue(h)}function Rue(e){const t=zGe(e.chartType),n=ft(Ze(Ze({},Nue),e),{filters:e.filters||[],widgetType:t});return Lue(n)}function eTt(e){if(kg(e))return Rue(e);throw new Qt("errors.otherWidgetTypesNotSupported")}function Iue(e,t){const n=t||e.dataSource;if(typeof n=="string")throw new dq("dataSource");if(!n.id||!n.live&&!n.address)throw new dq("dataSource");const r=e.chartType;let o=e.widgetType,i={},a=e.styleOptions.subtype||"";if(!r)throw new Error("Chart type is required");const s=[];if(yu(r)){const c=["chart/line","chart/area"].includes(e.widgetType)?"x-axis":"categories",d=e.dataOptions.category.map(v=>sp(ga(v))),p={name:c,items:d};s.push(p);const u=e.dataOptions.value.map(v=>sp(pi(v)));s.push({name:"values",items:u});const k=e.dataOptions.breakBy.map(v=>sp(ga(v)));s.push({name:"break by",items:k}),r==="polar"?a="column/polar":r==="bar"?a=a||"bar/classic":r==="column"?a=a||"column/classic":r==="area"?a=a||"area/basic":r==="line"&&(a=a||"line/basic")}else if(Q4(r)){const{attributes:c,measures:d}=Zz(e.dataOptions),p=[...c.map(u=>sp(ga(u))),...d.map(u=>sp(pi(u)))];s.push({name:"columns",items:p}),o="tablewidget"}else if(Ay(r))["value","min","max","secondary"].forEach(c=>{const d=(e.dataOptions[c]||[]).map(p=>sp(pi(p)));s.push({name:c,items:d})}),a=a||"indicator/numeric",i=ft(Ze({},a==="indicator/gauge"?{subtype:"round",skin:"1"}:{subtype:"simple",skin:"vertical"}),{components:{ticks:{inactive:!1,enabled:!0},labels:{inactive:!1,enabled:!0},title:{inactive:!1,enabled:!0},secondaryTitle:{inactive:!0,enabled:!0}}});else if(wf(r)){const c=e.dataOptions.category.map(u=>sp(bp(u)));s.push({name:"categories",items:c});const d=e.dataOptions.value.map(u=>sp(bp(u))),p=r==="treemap";s.push({name:p?"size":"values",items:d}),p&&["color","values"].forEach(u=>{s.push({name:u,items:[]})}),r==="pie"?(a=a||"pie/basic",i={convolution:{enabled:!0,selectedConvolutionType:"bySlicesCount",minimalIndependentSlicePercentage:3,independentSlicesCount:7}}):r==="treemap"||r==="sunburst"?a=a||r:r==="funnel"&&(a=a||"chart/funnel")}else if(uu(r))["x","y","size","breakByColor","breakByPoint"].forEach(c=>{if(e.dataOptions[c]){const d={breakByColor:"Break By / Color",breakByPoint:"point",x:"x-axis",y:"y-axis"},p=[sp(bp(e.dataOptions[c]))];s.push({name:d[c]||c,items:p})}}),a=a||"bubble/scatter";else throw new tTt(r);const l=(e.filters||[]).map(c=>c.jaql());return s.push({name:"filters",items:l}),{oid:e.oid||"",title:e.title,desc:e.description,datasource:n,type:o,metadata:{panels:s},style:i,subtype:a}}class dq extends Qt{constructor(t){super("errors.widgetModel.incomleteWidget",{prop:t})}}class tTt extends Qt{constructor(t){super("errors.widgetModel.unsupportedWidgetTypeDto",{chartType:t})}}class rB extends Qt{constructor(t){super("errors.widgetModel.pivotWidgetNotSupported",{methodName:t})}}class jue extends Qt{constructor(t){super("errors.widgetModel.textWidgetNotSupported",{methodName:t})}}const nTt=Object.freeze(Object.defineProperty({__proto__:null,fromChartWidgetProps:Rue,fromWidgetDto:z_,fromWidgetProps:eTt,toChartProps:Eue,toChartWidgetProps:J6,toCommonWidgetProps:Due,toExecutePivotQueryParams:K6,toExecuteQueryParams:Z6,toPivotTableProps:Aue,toPivotTableWidgetProps:eB,toPluginWidgetProps:Pue,toTableProps:Q6,toTableWidgetProps:Oue,toTextWidgetProps:tB,toWidgetDto:Iue,toWidgetProps:nB},Symbol.toStringTag,{value:"Module"}));function oB(e){const{title:t,dataSource:n,widgets:r,layoutOptions:o,filters:i,widgetsOptions:a,tabbersOptions:s,styleOptions:l}=e;return{title:t,defaultDataSource:n,widgets:r.map(nB),layoutOptions:o,config:{},filters:i,widgetsOptions:a,styleOptions:l,tabbersOptions:s}}function iB(e,t,n){var r;const{oid:o,title:i,datasource:a,widgets:s,layout:l,filters:c,filterRelations:d,style:p}=e,u={title:a.title,type:a.live?"live":"elasticube"},k=Ze({},p!=null&&p.palette?{palette:{variantColors:p==null?void 0:p.palette.colors}}:null),v=t&&Ze(Ze({},t),k.palette?{palette:k.palette}:null),h=(s==null?void 0:s.map(A=>z_(A,v,n)))||[],C=l?R2t(l):{columns:[]},R=(r=d==null?void 0:d[0])==null?void 0:r.filterRelations,H=z2t(c||[],R),U=F2t(s),W=H2t(s);return{oid:o,title:i,dataSource:u,styleOptions:k,widgets:h,layoutOptions:{widgetsPanel:C},filters:H,widgetsOptions:U,tabbersOptions:W}}const rTt=Object.freeze(Object.defineProperty({__proto__:null,fromDashboardDto:iB,toDashboardProps:oB},Symbol.toStringTag,{value:"Module"}));function oTt(e){return Na(e)?iTt(e):aB(e)}function aB(e){return ja(e)?aTt(e):zw(e)?sTt(e):sB(e)}function iTt(e){return{isCascading:!0,instanceid:e.config.guid,disabled:e.config.disabled,levels:e.filters.map(t=>{const n=aB(t);return ft(Ze({},n.jaql),{instanceid:n.instanceid})})}}function sB(e){const{config:{disabled:t}}=e,n=Object.assign(Object.create(e),{config:ft(Ze({},e.config),{disabled:!1})}).jaql(!0);return{jaql:ft(Ze({},n),{table:lj(e.attribute),column:hT(e.attribute)}),disabled:t,instanceid:e.config.guid,isCascading:!1}}function aTt(e){const t=sB(e);return t.jaql.filter.multiSelection=e.config.enableMultiSelection,e.config.deactivatedMembers.length>0&&(e.config.excludeMembers?t.jaql.filter.exclude.members=[...e.members,...e.config.deactivatedMembers]:t.jaql.filter.members=[...e.members,...e.config.deactivatedMembers]),e.config.backgroundFilter&&HR(t.jaql,aB(e.config.backgroundFilter).jaql.filter),e.config.deactivatedMembers.length>0&&HR(t.jaql,{exclude:{members:e.config.deactivatedMembers},turnedOff:!0}),t}function sTt(e){const t=sB(e);if(e.measure instanceof Sv){const n=t.jaql.filter;n.by.table=lj(e.measure.attribute),n.by.column=hT(e.measure.attribute),n.rankingMessage=e.measure.name}return t}function HR(e,t){if(e.filter)return HR(e.filter,t);e.filter=t}var lTt=function(e){return e.DASHBOARD_INIT="DASHBOARD.INIT",e.DASHBOARD_UPDATE_LAYOUT="DASHBOARD.UPDATE_LAYOUT",e}({}),cTt=function(e){return e.FILTERS_UPDATE="FILTERS.UPDATE",e.ADD_WIDGET="WIDGETS.ADD",e}({});function uTt(e,t){var n,r;switch(t.type){case"DASHBOARD.INIT":return Ze(Ze({},e),t.payload);case"FILTERS.UPDATE":return ft(Ze({},e),{filters:t.payload});case"WIDGETS.ADD":{const o=[...e.widgets,t.payload],i=[...((r=(n=e==null?void 0:e.layoutOptions)==null?void 0:n.widgetsPanel)==null?void 0:r.columns)||[]];return i[0]&&(i[0].rows.length||i[0].rows.push({cells:[]}),i[0].rows[0].cells.push({widgetId:t.payload.oid,widthPercentage:100})),ft(Ze(Ze({},e),e!=null&&e.layoutOptions.widgetsPanel?{layoutOptions:ft(Ze({},e==null?void 0:e.layoutOptions),{widgetsPanel:ft(Ze({},e==null?void 0:e.layoutOptions.widgetsPanel),{columns:i})})}:null),{widgets:o})}default:return e}}function dTt(e,t,n){return na(this,null,function*(){if(!e)throw new Error("Dashboard model is not initialized");if(t.type==="FILTERS.UPDATE"){const{filters:r,relations:o}=pu(t.payload),i=r.map(oTt),a=fQe(o,r),s=pTt(r);yield n.patchDashboard(e,{filters:i,filterRelations:a?[{datasource:s,filterRelations:a}]:void 0})}else if(t.type==="WIDGETS.ADD"){const r=yield n.addWidgetToDashboard(e,Iue(t.payload));if(!r)throw new Error("Failed to add widget to dashboard");return{type:"WIDGETS.ADD",payload:z_(r)}}return t})}function pTt(e){const t=new Set(e.map(n=>{var r;return(r=n.dataSource)==null?void 0:r.title}));if(t.size>1)throw new Error("Persisting filters from multiple datasources is not supported now");return t.values().next().value}function hTt(e){return e.type===Ope.FILTERS_UPDATE?{type:cTt.FILTERS_UPDATE,payload:e.payload}:null}function fTt(e,t){return e==="wat"?(t&&console.warn('WAT authentication does not support persistence. The changes will not be saved. Set "persist" flag to false to avoid this warning.'),!1):!0}const mTt=I6("useDashboardModel")(gTt);function gTt({dashboardOid:e,includeWidgets:t,includeFilters:n,persist:r=!0}){const{restApi:o,isReady:i}=roe(),{app:a}=Er(),s=bt(()=>!!(a!=null&&a.httpClient.auth)&&fTt(a.httpClient.auth.type,r),[a==null?void 0:a.httpClient.auth,r]),l=r&&s,[c,d]=wc(uTt,null),p=ct(C=>na(this,null,function*(){if(!i||!o)throw new uVe;return l&&(C=yield dTt(c==null?void 0:c.oid,C,o)),d(C)}),[l,c==null?void 0:c.oid,o,i,d]),{dashboard:u,isLoading:k,isError:v,error:h}=V2t({dashboardOid:e,includeWidgets:t,includeFilters:n});return xt(()=>{u&&d({type:lTt.DASHBOARD_INIT,payload:u})},[u,d]),{dashboard:c,isLoading:k,isError:v,error:h,dispatchChanges:p}}/*! @license DOMPurify 3.1.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.6/LICENSE */const{entries:zue,setPrototypeOf:pq,isFrozen:vTt,getPrototypeOf:yTt,getOwnPropertyDescriptor:bTt}=Object;let{freeze:Ms,seal:xc,create:Bue}=Object,{apply:WR,construct:$R}=typeof Reflect<"u"&&Reflect;Ms||(Ms=function(e){return e});xc||(xc=function(e){return e});WR||(WR=function(e,t,n){return e.apply(t,n)});$R||($R=function(e,t){return new e(...t)});const Lk=Cl(Array.prototype.forEach),hq=Cl(Array.prototype.pop),f1=Cl(Array.prototype.push),DC=Cl(String.prototype.toLowerCase),PN=Cl(String.prototype.toString),fq=Cl(String.prototype.match),m1=Cl(String.prototype.replace),xTt=Cl(String.prototype.indexOf),wTt=Cl(String.prototype.trim),Kc=Cl(Object.prototype.hasOwnProperty),ms=Cl(RegExp.prototype.test),g1=_Tt(TypeError);function Cl(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return WR(e,t,r)}}function _Tt(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return $R(e,n)}}function Sr(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:DC;pq&&pq(e,null);let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){const i=n(o);i!==o&&(vTt(t)||(t[r]=i),o=i)}e[o]=!0}return e}function STt(e){for(let t=0;t<e.length;t++)Kc(e,t)||(e[t]=null);return e}function fm(e){const t=Bue(null);for(const[n,r]of zue(e))Kc(e,n)&&(Array.isArray(r)?t[n]=STt(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=fm(r):t[n]=r);return t}function v1(e,t){for(;e!==null;){const r=bTt(e,t);if(r){if(r.get)return Cl(r.get);if(typeof r.value=="function")return Cl(r.value)}e=yTt(e)}function n(){return null}return n}const mq=Ms(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),DN=Ms(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),NN=Ms(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),kTt=Ms(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),LN=Ms(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),CTt=Ms(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),gq=Ms(["#text"]),vq=Ms(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),RN=Ms(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),yq=Ms(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Rk=Ms(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),MTt=xc(/\{\{[\w\W]*|[\w\W]*\}\}/gm),TTt=xc(/<%[\w\W]*|[\w\W]*%>/gm),ETt=xc(/\${[\w\W]*}/gm),ATt=xc(/^data-[\-\w.\u00B7-\uFFFF]/),OTt=xc(/^aria-[\-\w]+$/),Fue=xc(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),PTt=xc(/^(?:\w+script|data):/i),DTt=xc(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Hue=xc(/^html$/i),NTt=xc(/^[a-z][.\w]*(-[.\w]+)+$/i);var bq=Object.freeze({__proto__:null,MUSTACHE_EXPR:MTt,ERB_EXPR:TTt,TMPLIT_EXPR:ETt,DATA_ATTR:ATt,ARIA_ATTR:OTt,IS_ALLOWED_URI:Fue,IS_SCRIPT_OR_DATA:PTt,ATTR_WHITESPACE:DTt,DOCTYPE_NAME:Hue,CUSTOM_ELEMENT:NTt});const y1={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},LTt=function(){return typeof window>"u"?null:window},RTt=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}};function Wue(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:LTt();const t=Qe=>Wue(Qe);if(t.version="3.1.6",t.removed=[],!e||!e.document||e.document.nodeType!==y1.document)return t.isSupported=!1,t;let{document:n}=e;const r=n,o=r.currentScript,{DocumentFragment:i,HTMLTemplateElement:a,Node:s,Element:l,NodeFilter:c,NamedNodeMap:d=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:p,DOMParser:u,trustedTypes:k}=e,v=l.prototype,h=v1(v,"cloneNode"),C=v1(v,"remove"),R=v1(v,"nextSibling"),H=v1(v,"childNodes"),U=v1(v,"parentNode");if(typeof a=="function"){const Qe=n.createElement("template");Qe.content&&Qe.content.ownerDocument&&(n=Qe.content.ownerDocument)}let W,A="";const{implementation:D,createNodeIterator:z,createDocumentFragment:N,getElementsByTagName:B}=n,{importNode:E}=r;let x={};t.isSupported=typeof zue=="function"&&typeof U=="function"&&D&&D.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:g,ERB_EXPR:M,TMPLIT_EXPR:_,DATA_ATTR:T,ARIA_ATTR:Y,IS_SCRIPT_OR_DATA:V,ATTR_WHITESPACE:F,CUSTOM_ELEMENT:O}=bq;let{IS_ALLOWED_URI:P}=bq,S=null;const w=Sr({},[...mq,...DN,...NN,...LN,...gq]);let f=null;const b=Sr({},[...vq,...RN,...yq,...Rk]);let y=Object.seal(Bue(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),m=null,I=null,j=!0,$=!0,X=!1,Q=!0,J=!1,G=!0,Z=!1,K=!1,re=!1,oe=!1,ee=!1,te=!1,ne=!0,le=!1;const se="user-content-";let ae=!0,de=!1,ge={},me=null;const xe=Sr({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Se=null;const Pe=Sr({},["audio","video","img","source","image","track"]);let De=null;const Be=Sr({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ne="http://www.w3.org/1998/Math/MathML",Ae="http://www.w3.org/2000/svg",ye="http://www.w3.org/1999/xhtml";let Ce=ye,Me=!1,Le=null;const Ue=Sr({},[Ne,Ae,ye],PN);let Fe=null;const Ke=["application/xhtml+xml","text/html"],nt="text/html";let Je=null,st=null;const mt=n.createElement("form"),lt=function(Qe){return Qe instanceof RegExp||Qe instanceof Function},_t=function(){let Qe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(st&&st===Qe)){if((!Qe||typeof Qe!="object")&&(Qe={}),Qe=fm(Qe),Fe=Ke.indexOf(Qe.PARSER_MEDIA_TYPE)===-1?nt:Qe.PARSER_MEDIA_TYPE,Je=Fe==="application/xhtml+xml"?PN:DC,S=Kc(Qe,"ALLOWED_TAGS")?Sr({},Qe.ALLOWED_TAGS,Je):w,f=Kc(Qe,"ALLOWED_ATTR")?Sr({},Qe.ALLOWED_ATTR,Je):b,Le=Kc(Qe,"ALLOWED_NAMESPACES")?Sr({},Qe.ALLOWED_NAMESPACES,PN):Ue,De=Kc(Qe,"ADD_URI_SAFE_ATTR")?Sr(fm(Be),Qe.ADD_URI_SAFE_ATTR,Je):Be,Se=Kc(Qe,"ADD_DATA_URI_TAGS")?Sr(fm(Pe),Qe.ADD_DATA_URI_TAGS,Je):Pe,me=Kc(Qe,"FORBID_CONTENTS")?Sr({},Qe.FORBID_CONTENTS,Je):xe,m=Kc(Qe,"FORBID_TAGS")?Sr({},Qe.FORBID_TAGS,Je):{},I=Kc(Qe,"FORBID_ATTR")?Sr({},Qe.FORBID_ATTR,Je):{},ge=Kc(Qe,"USE_PROFILES")?Qe.USE_PROFILES:!1,j=Qe.ALLOW_ARIA_ATTR!==!1,$=Qe.ALLOW_DATA_ATTR!==!1,X=Qe.ALLOW_UNKNOWN_PROTOCOLS||!1,Q=Qe.ALLOW_SELF_CLOSE_IN_ATTR!==!1,J=Qe.SAFE_FOR_TEMPLATES||!1,G=Qe.SAFE_FOR_XML!==!1,Z=Qe.WHOLE_DOCUMENT||!1,oe=Qe.RETURN_DOM||!1,ee=Qe.RETURN_DOM_FRAGMENT||!1,te=Qe.RETURN_TRUSTED_TYPE||!1,re=Qe.FORCE_BODY||!1,ne=Qe.SANITIZE_DOM!==!1,le=Qe.SANITIZE_NAMED_PROPS||!1,ae=Qe.KEEP_CONTENT!==!1,de=Qe.IN_PLACE||!1,P=Qe.ALLOWED_URI_REGEXP||Fue,Ce=Qe.NAMESPACE||ye,y=Qe.CUSTOM_ELEMENT_HANDLING||{},Qe.CUSTOM_ELEMENT_HANDLING&<(Qe.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(y.tagNameCheck=Qe.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Qe.CUSTOM_ELEMENT_HANDLING&<(Qe.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(y.attributeNameCheck=Qe.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Qe.CUSTOM_ELEMENT_HANDLING&&typeof Qe.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(y.allowCustomizedBuiltInElements=Qe.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),J&&($=!1),ee&&(oe=!0),ge&&(S=Sr({},gq),f=[],ge.html===!0&&(Sr(S,mq),Sr(f,vq)),ge.svg===!0&&(Sr(S,DN),Sr(f,RN),Sr(f,Rk)),ge.svgFilters===!0&&(Sr(S,NN),Sr(f,RN),Sr(f,Rk)),ge.mathMl===!0&&(Sr(S,LN),Sr(f,yq),Sr(f,Rk))),Qe.ADD_TAGS&&(S===w&&(S=fm(S)),Sr(S,Qe.ADD_TAGS,Je)),Qe.ADD_ATTR&&(f===b&&(f=fm(f)),Sr(f,Qe.ADD_ATTR,Je)),Qe.ADD_URI_SAFE_ATTR&&Sr(De,Qe.ADD_URI_SAFE_ATTR,Je),Qe.FORBID_CONTENTS&&(me===xe&&(me=fm(me)),Sr(me,Qe.FORBID_CONTENTS,Je)),ae&&(S["#text"]=!0),Z&&Sr(S,["html","head","body"]),S.table&&(Sr(S,["tbody"]),delete m.tbody),Qe.TRUSTED_TYPES_POLICY){if(typeof Qe.TRUSTED_TYPES_POLICY.createHTML!="function")throw g1('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Qe.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw g1('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');W=Qe.TRUSTED_TYPES_POLICY,A=W.createHTML("")}else W===void 0&&(W=RTt(k,o)),W!==null&&typeof A=="string"&&(A=W.createHTML(""));Ms&&Ms(Qe),st=Qe}},Rt=Sr({},["mi","mo","mn","ms","mtext"]),Tt=Sr({},["foreignobject","annotation-xml"]),zt=Sr({},["title","style","font","a","script"]),Ct=Sr({},[...DN,...NN,...kTt]),rn=Sr({},[...LN,...CTt]),Ft=function(Qe){let jt=U(Qe);(!jt||!jt.tagName)&&(jt={namespaceURI:Ce,tagName:"template"});const Gt=DC(Qe.tagName),ln=DC(jt.tagName);return Le[Qe.namespaceURI]?Qe.namespaceURI===Ae?jt.namespaceURI===ye?Gt==="svg":jt.namespaceURI===Ne?Gt==="svg"&&(ln==="annotation-xml"||Rt[ln]):!!Ct[Gt]:Qe.namespaceURI===Ne?jt.namespaceURI===ye?Gt==="math":jt.namespaceURI===Ae?Gt==="math"&&Tt[ln]:!!rn[Gt]:Qe.namespaceURI===ye?jt.namespaceURI===Ae&&!Tt[ln]||jt.namespaceURI===Ne&&!Rt[ln]?!1:!rn[Gt]&&(zt[Gt]||!Ct[Gt]):!!(Fe==="application/xhtml+xml"&&Le[Qe.namespaceURI]):!1},$t=function(Qe){f1(t.removed,{element:Qe});try{U(Qe).removeChild(Qe)}catch{C(Qe)}},wn=function(Qe,jt){try{f1(t.removed,{attribute:jt.getAttributeNode(Qe),from:jt})}catch{f1(t.removed,{attribute:null,from:jt})}if(jt.removeAttribute(Qe),Qe==="is"&&!f[Qe])if(oe||ee)try{$t(jt)}catch{}else try{jt.setAttribute(Qe,"")}catch{}},qt=function(Qe){let jt=null,Gt=null;if(re)Qe="<remove></remove>"+Qe;else{const qn=fq(Qe,/^[\r\n\t ]+/);Gt=qn&&qn[0]}Fe==="application/xhtml+xml"&&Ce===ye&&(Qe='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Qe+"</body></html>");const ln=W?W.createHTML(Qe):Qe;if(Ce===ye)try{jt=new u().parseFromString(ln,Fe)}catch{}if(!jt||!jt.documentElement){jt=D.createDocument(Ce,"template",null);try{jt.documentElement.innerHTML=Me?A:ln}catch{}}const lr=jt.body||jt.documentElement;return Qe&&Gt&&lr.insertBefore(n.createTextNode(Gt),lr.childNodes[0]||null),Ce===ye?B.call(jt,Z?"html":"body")[0]:Z?jt.documentElement:lr},cn=function(Qe){return z.call(Qe.ownerDocument||Qe,Qe,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Cn=function(Qe){return Qe instanceof p&&(typeof Qe.nodeName!="string"||typeof Qe.textContent!="string"||typeof Qe.removeChild!="function"||!(Qe.attributes instanceof d)||typeof Qe.removeAttribute!="function"||typeof Qe.setAttribute!="function"||typeof Qe.namespaceURI!="string"||typeof Qe.insertBefore!="function"||typeof Qe.hasChildNodes!="function")},Un=function(Qe){return typeof s=="function"&&Qe instanceof s},Mt=function(Qe,jt,Gt){x[Qe]&&Lk(x[Qe],ln=>{ln.call(t,jt,Gt,st)})},Wt=function(Qe){let jt=null;if(Mt("beforeSanitizeElements",Qe,null),Cn(Qe))return $t(Qe),!0;const Gt=Je(Qe.nodeName);if(Mt("uponSanitizeElement",Qe,{tagName:Gt,allowedTags:S}),Qe.hasChildNodes()&&!Un(Qe.firstElementChild)&&ms(/<[/\w]/g,Qe.innerHTML)&&ms(/<[/\w]/g,Qe.textContent)||Qe.nodeType===y1.progressingInstruction||G&&Qe.nodeType===y1.comment&&ms(/<[/\w]/g,Qe.data))return $t(Qe),!0;if(!S[Gt]||m[Gt]){if(!m[Gt]&&sn(Gt)&&(y.tagNameCheck instanceof RegExp&&ms(y.tagNameCheck,Gt)||y.tagNameCheck instanceof Function&&y.tagNameCheck(Gt)))return!1;if(ae&&!me[Gt]){const ln=U(Qe)||Qe.parentNode,lr=H(Qe)||Qe.childNodes;if(lr&&ln){const qn=lr.length;for(let br=qn-1;br>=0;--br){const un=h(lr[br],!0);un.__removalCount=(Qe.__removalCount||0)+1,ln.insertBefore(un,R(Qe))}}}return $t(Qe),!0}return Qe instanceof l&&!Ft(Qe)||(Gt==="noscript"||Gt==="noembed"||Gt==="noframes")&&ms(/<\/no(script|embed|frames)/i,Qe.innerHTML)?($t(Qe),!0):(J&&Qe.nodeType===y1.text&&(jt=Qe.textContent,Lk([g,M,_],ln=>{jt=m1(jt,ln," ")}),Qe.textContent!==jt&&(f1(t.removed,{element:Qe.cloneNode()}),Qe.textContent=jt)),Mt("afterSanitizeElements",Qe,null),!1)},on=function(Qe,jt,Gt){if(ne&&(jt==="id"||jt==="name")&&(Gt in n||Gt in mt))return!1;if(!($&&!I[jt]&&ms(T,jt))&&!(j&&ms(Y,jt))){if(!f[jt]||I[jt]){if(!(sn(Qe)&&(y.tagNameCheck instanceof RegExp&&ms(y.tagNameCheck,Qe)||y.tagNameCheck instanceof Function&&y.tagNameCheck(Qe))&&(y.attributeNameCheck instanceof RegExp&&ms(y.attributeNameCheck,jt)||y.attributeNameCheck instanceof Function&&y.attributeNameCheck(jt))||jt==="is"&&y.allowCustomizedBuiltInElements&&(y.tagNameCheck instanceof RegExp&&ms(y.tagNameCheck,Gt)||y.tagNameCheck instanceof Function&&y.tagNameCheck(Gt))))return!1}else if(!De[jt]&&!ms(P,m1(Gt,F,""))&&!((jt==="src"||jt==="xlink:href"||jt==="href")&&Qe!=="script"&&xTt(Gt,"data:")===0&&Se[Qe])&&!(X&&!ms(V,m1(Gt,F,"")))&&Gt)return!1}return!0},sn=function(Qe){return Qe!=="annotation-xml"&&fq(Qe,O)},or=function(Qe){Mt("beforeSanitizeAttributes",Qe,null);const{attributes:jt}=Qe;if(!jt)return;const Gt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:f};let ln=jt.length;for(;ln--;){const lr=jt[ln],{name:qn,namespaceURI:br,value:un}=lr,Kn=Je(qn);let er=qn==="value"?un:wTt(un);if(Gt.attrName=Kn,Gt.attrValue=er,Gt.keepAttr=!0,Gt.forceKeepAttr=void 0,Mt("uponSanitizeAttribute",Qe,Gt),er=Gt.attrValue,G&&ms(/((--!?|])>)|<\/(style|title)/i,er)){wn(qn,Qe);continue}if(Gt.forceKeepAttr||(wn(qn,Qe),!Gt.keepAttr))continue;if(!Q&&ms(/\/>/i,er)){wn(qn,Qe);continue}J&&Lk([g,M,_],wi=>{er=m1(er,wi," ")});const Eo=Je(Qe.nodeName);if(on(Eo,Kn,er)){if(le&&(Kn==="id"||Kn==="name")&&(wn(qn,Qe),er=se+er),W&&typeof k=="object"&&typeof k.getAttributeType=="function"&&!br)switch(k.getAttributeType(Eo,Kn)){case"TrustedHTML":{er=W.createHTML(er);break}case"TrustedScriptURL":{er=W.createScriptURL(er);break}}try{br?Qe.setAttributeNS(br,qn,er):Qe.setAttribute(qn,er),Cn(Qe)?$t(Qe):hq(t.removed)}catch{}}}Mt("afterSanitizeAttributes",Qe,null)},zn=function Qe(jt){let Gt=null;const ln=cn(jt);for(Mt("beforeSanitizeShadowDOM",jt,null);Gt=ln.nextNode();)Mt("uponSanitizeShadowNode",Gt,null),!Wt(Gt)&&(Gt.content instanceof i&&Qe(Gt.content),or(Gt));Mt("afterSanitizeShadowDOM",jt,null)};return t.sanitize=function(Qe){let jt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Gt=null,ln=null,lr=null,qn=null;if(Me=!Qe,Me&&(Qe="<!-->"),typeof Qe!="string"&&!Un(Qe))if(typeof Qe.toString=="function"){if(Qe=Qe.toString(),typeof Qe!="string")throw g1("dirty is not a string, aborting")}else throw g1("toString is not a function");if(!t.isSupported)return Qe;if(K||_t(jt),t.removed=[],typeof Qe=="string"&&(de=!1),de){if(Qe.nodeName){const Kn=Je(Qe.nodeName);if(!S[Kn]||m[Kn])throw g1("root node is forbidden and cannot be sanitized in-place")}}else if(Qe instanceof s)Gt=qt("<!---->"),ln=Gt.ownerDocument.importNode(Qe,!0),ln.nodeType===y1.element&&ln.nodeName==="BODY"||ln.nodeName==="HTML"?Gt=ln:Gt.appendChild(ln);else{if(!oe&&!J&&!Z&&Qe.indexOf("<")===-1)return W&&te?W.createHTML(Qe):Qe;if(Gt=qt(Qe),!Gt)return oe?null:te?A:""}Gt&&re&&$t(Gt.firstChild);const br=cn(de?Qe:Gt);for(;lr=br.nextNode();)Wt(lr)||(lr.content instanceof i&&zn(lr.content),or(lr));if(de)return Qe;if(oe){if(ee)for(qn=N.call(Gt.ownerDocument);Gt.firstChild;)qn.appendChild(Gt.firstChild);else qn=Gt;return(f.shadowroot||f.shadowrootmode)&&(qn=E.call(r,qn,!0)),qn}let un=Z?Gt.outerHTML:Gt.innerHTML;return Z&&S["!doctype"]&&Gt.ownerDocument&&Gt.ownerDocument.doctype&&Gt.ownerDocument.doctype.name&&ms(Hue,Gt.ownerDocument.doctype.name)&&(un="<!DOCTYPE "+Gt.ownerDocument.doctype.name+`>
|
1034
|
+
*/(function(e){(function(t,n){e.exports?e.exports=n():t.numeral=n()})(eo,function(){var t,n,r="2.0.6",o={},i={},a={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},s={currentLocale:a.currentLocale,zeroFormat:a.zeroFormat,nullFormat:a.nullFormat,defaultFormat:a.defaultFormat,scalePercentBy100:a.scalePercentBy100};function l(c,d){this._input=c,this._value=d}return t=function(c){var d,p,u,k;if(t.isNumeral(c))d=c.value();else if(c===0||typeof c>"u")d=0;else if(c===null||n.isNaN(c))d=null;else if(typeof c=="string")if(s.zeroFormat&&c===s.zeroFormat)d=0;else if(s.nullFormat&&c===s.nullFormat||!c.replace(/[^0-9]+/g,"").length)d=null;else{for(p in o)if(k=typeof o[p].regexps.unformat=="function"?o[p].regexps.unformat():o[p].regexps.unformat,k&&c.match(k)){u=o[p].unformat;break}u=u||t._.stringToNumber,d=u(c)}else d=Number(c)||null;return new l(c,d)},t.version=r,t.isNumeral=function(c){return c instanceof l},t._=n={numberToFormat:function(c,d,p){var u=i[t.options.currentLocale],k=!1,v=!1,h=0,C="",R=1e12,H=1e9,U=1e6,W=1e3,A="",D=!1,z,N,B,E,x,g,M;if(c=c||0,N=Math.abs(c),t._.includes(d,"(")?(k=!0,d=d.replace(/[\(|\)]/g,"")):(t._.includes(d,"+")||t._.includes(d,"-"))&&(x=t._.includes(d,"+")?d.indexOf("+"):c<0?d.indexOf("-"):-1,d=d.replace(/[\+|\-]/g,"")),t._.includes(d,"a")&&(z=d.match(/a(k|m|b|t)?/),z=z?z[1]:!1,t._.includes(d," a")&&(C=" "),d=d.replace(new RegExp(C+"a[kmbt]?"),""),N>=R&&!z||z==="t"?(C+=u.abbreviations.trillion,c=c/R):N<R&&N>=H&&!z||z==="b"?(C+=u.abbreviations.billion,c=c/H):N<H&&N>=U&&!z||z==="m"?(C+=u.abbreviations.million,c=c/U):(N<U&&N>=W&&!z||z==="k")&&(C+=u.abbreviations.thousand,c=c/W)),t._.includes(d,"[.]")&&(v=!0,d=d.replace("[.]",".")),B=c.toString().split(".")[0],E=d.split(".")[1],g=d.indexOf(","),h=(d.split(".")[0].split(",")[0].match(/0/g)||[]).length,E?(t._.includes(E,"[")?(E=E.replace("]",""),E=E.split("["),A=t._.toFixed(c,E[0].length+E[1].length,p,E[1].length)):A=t._.toFixed(c,E.length,p),B=A.split(".")[0],t._.includes(A,".")?A=u.delimiters.decimal+A.split(".")[1]:A="",v&&Number(A.slice(1))===0&&(A="")):B=t._.toFixed(c,0,p),C&&!z&&Number(B)>=1e3&&C!==u.abbreviations.trillion)switch(B=String(Number(B)/1e3),C){case u.abbreviations.thousand:C=u.abbreviations.million;break;case u.abbreviations.million:C=u.abbreviations.billion;break;case u.abbreviations.billion:C=u.abbreviations.trillion;break}if(t._.includes(B,"-")&&(B=B.slice(1),D=!0),B.length<h)for(var _=h-B.length;_>0;_--)B="0"+B;return g>-1&&(B=B.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+u.delimiters.thousands)),d.indexOf(".")===0&&(B=""),M=B+A+(C||""),k?M=(k&&D?"(":"")+M+(k&&D?")":""):x>=0?M=x===0?(D?"-":"+")+M:M+(D?"-":"+"):D&&(M="-"+M),M},stringToNumber:function(c){var d=i[s.currentLocale],p=c,u={thousand:3,million:6,billion:9,trillion:12},k,v,h;if(s.zeroFormat&&c===s.zeroFormat)v=0;else if(s.nullFormat&&c===s.nullFormat||!c.replace(/[^0-9]+/g,"").length)v=null;else{v=1,d.delimiters.decimal!=="."&&(c=c.replace(/\./g,"").replace(d.delimiters.decimal,"."));for(k in u)if(h=new RegExp("[^a-zA-Z]"+d.abbreviations[k]+"(?:\\)|(\\"+d.currency.symbol+")?(?:\\))?)?$"),p.match(h)){v*=Math.pow(10,u[k]);break}v*=(c.split("-").length+Math.min(c.split("(").length-1,c.split(")").length-1))%2?1:-1,c=c.replace(/[^0-9\.]+/g,""),v*=Number(c)}return v},isNaN:function(c){return typeof c=="number"&&isNaN(c)},includes:function(c,d){return c.indexOf(d)!==-1},insert:function(c,d,p){return c.slice(0,p)+d+c.slice(p)},reduce:function(c,d){if(this===null)throw new TypeError("Array.prototype.reduce called on null or undefined");if(typeof d!="function")throw new TypeError(d+" is not a function");var p=Object(c),u=p.length>>>0,k=0,v;if(arguments.length===3)v=arguments[2];else{for(;k<u&&!(k in p);)k++;if(k>=u)throw new TypeError("Reduce of empty array with no initial value");v=p[k++]}for(;k<u;k++)k in p&&(v=d(v,p[k],k,p));return v},multiplier:function(c){var d=c.toString().split(".");return d.length<2?1:Math.pow(10,d[1].length)},correctionFactor:function(){var c=Array.prototype.slice.call(arguments);return c.reduce(function(d,p){var u=n.multiplier(p);return d>u?d:u},1)},toFixed:function(c,d,p,u){var k=c.toString().split("."),v=d-(u||0),h,C,R,H;return k.length===2?h=Math.min(Math.max(k[1].length,v),d):h=v,R=Math.pow(10,h),H=(p(c+"e+"+h)/R).toFixed(h),u>d-h&&(C=new RegExp("\\.?0{1,"+(u-(d-h))+"}$"),H=H.replace(C,"")),H}},t.options=s,t.formats=o,t.locales=i,t.locale=function(c){return c&&(s.currentLocale=c.toLowerCase()),s.currentLocale},t.localeData=function(c){if(!c)return i[s.currentLocale];if(c=c.toLowerCase(),!i[c])throw new Error("Unknown locale : "+c);return i[c]},t.reset=function(){for(var c in a)s[c]=a[c]},t.zeroFormat=function(c){s.zeroFormat=typeof c=="string"?c:null},t.nullFormat=function(c){s.nullFormat=typeof c=="string"?c:null},t.defaultFormat=function(c){s.defaultFormat=typeof c=="string"?c:"0.0"},t.register=function(c,d,p){if(d=d.toLowerCase(),this[c+"s"][d])throw new TypeError(d+" "+c+" already registered.");return this[c+"s"][d]=p,p},t.validate=function(c,d){var p,u,k,v,h,C,R,H;if(typeof c!="string"&&(c+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",c)),c=c.trim(),c.match(/^\d+$/))return!0;if(c==="")return!1;try{R=t.localeData(d)}catch{R=t.localeData(t.locale())}return k=R.currency.symbol,h=R.abbreviations,p=R.delimiters.decimal,R.delimiters.thousands==="."?u="\\.":u=R.delimiters.thousands,H=c.match(/^[^\d]+/),H!==null&&(c=c.substr(1),H[0]!==k)||(H=c.match(/[^\d]+$/),H!==null&&(c=c.slice(0,-1),H[0]!==h.thousand&&H[0]!==h.million&&H[0]!==h.billion&&H[0]!==h.trillion))?!1:(C=new RegExp(u+"{2}"),c.match(/[^\d.,]/g)?!1:(v=c.split(p),v.length>2?!1:v.length<2?!!v[0].match(/^\d+.*\d$/)&&!v[0].match(C):v[0].length===1?!!v[0].match(/^\d+$/)&&!v[0].match(C)&&!!v[1].match(/^\d+$/):!!v[0].match(/^\d+.*\d$/)&&!v[0].match(C)&&!!v[1].match(/^\d+$/)))},t.fn=l.prototype={clone:function(){return t(this)},format:function(c,d){var p=this._value,u=c||s.defaultFormat,k,v,h;if(d=d||Math.round,p===0&&s.zeroFormat!==null)v=s.zeroFormat;else if(p===null&&s.nullFormat!==null)v=s.nullFormat;else{for(k in o)if(u.match(o[k].regexps.format)){h=o[k].format;break}h=h||t._.numberToFormat,v=h(p,u,d)}return v},value:function(){return this._value},input:function(){return this._input},set:function(c){return this._value=Number(c),this},add:function(c){var d=n.correctionFactor.call(null,this._value,c);function p(u,k,v,h){return u+Math.round(d*k)}return this._value=n.reduce([this._value,c],p,0)/d,this},subtract:function(c){var d=n.correctionFactor.call(null,this._value,c);function p(u,k,v,h){return u-Math.round(d*k)}return this._value=n.reduce([c],p,Math.round(this._value*d))/d,this},multiply:function(c){function d(p,u,k,v){var h=n.correctionFactor(p,u);return Math.round(p*h)*Math.round(u*h)/Math.round(h*h)}return this._value=n.reduce([this._value,c],d,1),this},divide:function(c){function d(p,u,k,v){var h=n.correctionFactor(p,u);return Math.round(p*h)/Math.round(u*h)}return this._value=n.reduce([this._value,c],d),this},difference:function(c){return Math.abs(t(this._value).subtract(c).value())}},t.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(c){var d=c%10;return~~(c%100/10)===1?"th":d===1?"st":d===2?"nd":d===3?"rd":"th"},currency:{symbol:"$"}}),function(){t.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(c,d,p){var u=t._.includes(d," BPS")?" ":"",k;return c=c*1e4,d=d.replace(/\s?BPS/,""),k=t._.numberToFormat(c,d,p),t._.includes(k,")")?(k=k.split(""),k.splice(-1,0,u+"BPS"),k=k.join("")):k=k+u+"BPS",k},unformat:function(c){return+(t._.stringToNumber(c)*1e-4).toFixed(15)}})}(),function(){var c={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]},d={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},p=c.suffixes.concat(d.suffixes.filter(function(k){return c.suffixes.indexOf(k)<0})),u=p.join("|");u="("+u.replace("B","B(?!PS)")+")",t.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(u)},format:function(k,v,h){var C,R=t._.includes(v,"ib")?d:c,H=t._.includes(v," b")||t._.includes(v," ib")?" ":"",U,W,A;for(v=v.replace(/\s?i?b/,""),U=0;U<=R.suffixes.length;U++)if(W=Math.pow(R.base,U),A=Math.pow(R.base,U+1),k===null||k===0||k>=W&&k<A){H+=R.suffixes[U],W>0&&(k=k/W);break}return C=t._.numberToFormat(k,v,h),C+H},unformat:function(k){var v=t._.stringToNumber(k),h,C;if(v){for(h=c.suffixes.length-1;h>=0;h--){if(t._.includes(k,c.suffixes[h])){C=Math.pow(c.base,h);break}if(t._.includes(k,d.suffixes[h])){C=Math.pow(d.base,h);break}}v*=C||1}return v}})}(),function(){t.register("format","currency",{regexps:{format:/(\$)/},format:function(c,d,p){var u=t.locales[t.options.currentLocale],k={before:d.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:d.match(/([\+|\-|\)|\s|\$]*)$/)[0]},v,h,C;for(d=d.replace(/\s?\$\s?/,""),v=t._.numberToFormat(c,d,p),c>=0?(k.before=k.before.replace(/[\-\(]/,""),k.after=k.after.replace(/[\-\)]/,"")):c<0&&!t._.includes(k.before,"-")&&!t._.includes(k.before,"(")&&(k.before="-"+k.before),C=0;C<k.before.length;C++)switch(h=k.before[C],h){case"$":v=t._.insert(v,u.currency.symbol,C);break;case" ":v=t._.insert(v," ",C+u.currency.symbol.length-1);break}for(C=k.after.length-1;C>=0;C--)switch(h=k.after[C],h){case"$":v=C===k.after.length-1?v+u.currency.symbol:t._.insert(v,u.currency.symbol,-(k.after.length-(1+C)));break;case" ":v=C===k.after.length-1?v+" ":t._.insert(v," ",-(k.after.length-(1+C)+u.currency.symbol.length-1));break}return v}})}(),function(){t.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(c,d,p){var u,k=typeof c=="number"&&!t._.isNaN(c)?c.toExponential():"0e+0",v=k.split("e");return d=d.replace(/e[\+|\-]{1}0/,""),u=t._.numberToFormat(Number(v[0]),d,p),u+"e"+v[1]},unformat:function(c){var d=t._.includes(c,"e+")?c.split("e+"):c.split("e-"),p=Number(d[0]),u=Number(d[1]);u=t._.includes(c,"e-")?u*=-1:u;function k(v,h,C,R){var H=t._.correctionFactor(v,h),U=v*H*(h*H)/(H*H);return U}return t._.reduce([p,Math.pow(10,u)],k,1)}})}(),function(){t.register("format","ordinal",{regexps:{format:/(o)/},format:function(c,d,p){var u=t.locales[t.options.currentLocale],k,v=t._.includes(d," o")?" ":"";return d=d.replace(/\s?o/,""),v+=u.ordinal(c),k=t._.numberToFormat(c,d,p),k+v}})}(),function(){t.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(c,d,p){var u=t._.includes(d," %")?" ":"",k;return t.options.scalePercentBy100&&(c=c*100),d=d.replace(/\s?\%/,""),k=t._.numberToFormat(c,d,p),t._.includes(k,")")?(k=k.split(""),k.splice(-1,0,u+"%"),k=k.join("")):k=k+u+"%",k},unformat:function(c){var d=t._.stringToNumber(c);return t.options.scalePercentBy100?d*.01:d}})}(),function(){t.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(c,d,p){var u=Math.floor(c/60/60),k=Math.floor((c-u*60*60)/60),v=Math.round(c-u*60*60-k*60);return u+":"+(k<10?"0"+k:k)+":"+(v<10?"0"+v:v)},unformat:function(c){var d=c.split(":"),p=0;return d.length===3?(p=p+Number(d[0])*60*60,p=p+Number(d[1])*60,p=p+Number(d[2])):d.length===2&&(p=p+Number(d[0])*60,p=p+Number(d[1])),Number(p)}})}(),t})})(lue);var hCt=lue.exports;const fCt=Ts(hCt),mCt=(e,t)=>{const n=yCt(e);return gCt(n,t)};function gCt(e,t){return{columns:t==null?void 0:t.map(n=>({name:n.name,type:EI(n.type)})),rows:vCt(e)}}function vCt(e){var t;let n=!1;const r=(t=e[0])===null||t===void 0?void 0:t.map((o,i)=>{const a=e.some(s=>"selected"in s[i]);return a&&(n=!0),a});return e.map(o=>{const i=n?r.some((a,s)=>a&&!o[s].selected):void 0;return o.map(a=>i!==void 0?{data:a.data,text:a.text,blur:i}:{data:a.data,text:a.text})})}function yCt({values:e=[],metadata:t=[]}){var n,r,o,i;e[0]&&!Array.isArray(e[0])&&(e=[e]);for(let a=0;a<e.length;a++){const s=e[a];for(let l=0;l<s.length;l++)t[l].format&&!((r=(n=t[l])===null||n===void 0?void 0:n.format)===null||r===void 0)&&r.number&&(s[l].text=fCt(s[l].data).format((i=(o=t[l])===null||o===void 0?void 0:o.format)===null||i===void 0?void 0:i.number))}return e}var am=function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(d){try{c(r.next(d))}catch(p){a(p)}}function l(d){try{c(r.throw(d))}catch(p){a(p)}}function c(d){d.done?i(d.value):o(d.value).then(s,l)}c((r=r.apply(e,t||[])).next())})};class bCt extends sl.AbstractTaskManager{constructor(t,n){super(),this.sentRequestsAbortersMap=new Map,this.executeQuerySending=super.createFlow([new sl.Step("PREPARE_JAQL_PAYLOAD",this.prepareJaqlPayload.bind(this),()=>am(this,void 0,void 0,function*(){})),new sl.Step("SEND_JAQL_QUERY",this.sendJaqlQuery.bind(this),this.cancelDataRetrievalQuery.bind(this))]),this.executeDownloadCsvSending=super.createFlow([new sl.Step("PREPARE_JAQL_PAYLOAD",this.prepareJaqlPayload.bind(this),()=>am(this,void 0,void 0,function*(){})),new sl.Step("SEND_DOWNLOAD_CSV_QUERY",this.sendCsvQuery.bind(this),this.cancelDataRetrievalQuery.bind(this))]),this.executePivotQuerySending=super.createFlow([new sl.Step("PREPARE_JAQL_PAYLOAD",this.preparePivotJaqlPayload.bind(this),()=>am(this,void 0,void 0,function*(){})),new sl.Step("SEND_JAQL_QUERY",this.sendPivotJaqlQuery.bind(this),this.cancelPivotJaqlQuery.bind(this))]),this.queryApi=t,this.pivotClient=n}prepareJaqlPayload(t){return am(this,void 0,void 0,function*(){const{queryDescription:n,executionConfig:r}=t.passport,o=pj(n,r.shouldSkipHighlightsWithoutAttributes),i=t.passport.executionConfig.onBeforeQuery;return i?i(o):o})}sendJaqlQuery(t,n){return am(this,void 0,void 0,function*(){const{queryDescription:r,taskId:o}=t.passport,{responsePromise:i,abortHttpRequest:a}=this.queryApi.sendJaqlRequest(t.passport.queryDescription.dataSource,n);this.sentRequestsAbortersMap.set(o,a);const s=yield i.finally(()=>{this.sentRequestsAbortersMap.delete(o)});xCt(s);const l=[...r.attributes,...r.measures],c=(s.headers||[]).slice(l.length).map(d=>({name:d,type:"number"}));return mCt(s,[...l,...c])})}sendCsvQuery(t,n){return am(this,void 0,void 0,function*(){const{taskId:r}=t.passport,{responsePromise:o,abortHttpRequest:i}=this.queryApi.sendDownloadCsvRequest(t.passport.queryDescription.dataSource,n);return this.sentRequestsAbortersMap.set(r,i),o.finally(()=>{this.sentRequestsAbortersMap.delete(r)})})}cancelDataRetrievalQuery(t){const n=t.passport.taskId,r=this.sentRequestsAbortersMap.get(n);return r&&(r(),this.sentRequestsAbortersMap.delete(n)),this.queryApi.sendCancelJaqlQueryRequest(n,t.passport.queryDescription.dataSource)}preparePivotJaqlPayload(t){return am(this,void 0,void 0,function*(){const{pivotQueryDescription:n,executionConfig:r}=t.passport,o=m1e(n,r.shouldSkipHighlightsWithoutAttributes),i=t.passport.executionConfig.onBeforeQuery;return i?i(o):o})}sendPivotJaqlQuery(t,n){var r;const{pivotQueryDescription:o}=t.passport;return this.pivotClient.queryData(n,!0,(r=o.count)!==null&&r!==void 0?r:_Ct,!1)}cancelPivotJaqlQuery(t){const n=t.passport.taskId,r=this.sentRequestsAbortersMap.get(n);return r&&(r(),this.sentRequestsAbortersMap.delete(n)),this.queryApi.sendCancelJaqlQueryRequest(n,t.passport.pivotQueryDescription.dataSource)}}function xCt(e){var t;if(!e)throw new ns("errors.noJaqlResponse");if(e.error)throw new Error(`${e.details} ${(t=e.database)!==null&&t!==void 0?t:""} ${e.extraDetails?JSON.stringify(e.extraDetails):""}`)}class tq extends sl.TaskPassport{constructor(t,n,r){super(),this.queryDescription=n,this.type=t,this.executionConfig=r}}class wCt extends sl.TaskPassport{constructor(t,n,r){super(),this.pivotQueryDescription=n,this.type=t,this.executionConfig=r}}var nq=function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(d){try{c(r.next(d))}catch(p){a(p)}}function l(d){try{c(r.throw(d))}catch(p){a(p)}}function c(d){d.done?i(d.value):o(d.value).then(s,l)}c((r=r.apply(e,t||[])).next())})};const _Ct=2e4,AN="Unspecified reason";class SCt{constructor(t,n=new Tne(t.url,t.auth),r){CCt(t),this.queryApi=new cCt(t),this.taskManager=new bCt(this.queryApi,n),this.shouldSkipHighlightsWithoutAttributes=r??!1}executeQuery(t,n){const r=new tq("SEND_JAQL_QUERY",t,Object.assign(Object.assign({},n||{}),{shouldSkipHighlightsWithoutAttributes:this.shouldSkipHighlightsWithoutAttributes||!1}));return{resultPromise:new Promise((o,i)=>{rq(t),this.taskManager.executeQuerySending(r).then(a=>{a.status===sl.ExecutionResultStatus.SUCCESS?o(a.result):i(a.error)})}),cancel:o=>this.taskManager.cancel(r.taskId,o||AN)}}executeCsvQuery(t,n){const r=new tq("SEND_DOWNLOAD_CSV_QUERY",t,Object.assign(Object.assign({},n||{}),{shouldSkipHighlightsWithoutAttributes:this.shouldSkipHighlightsWithoutAttributes||!1}));return{resultPromise:new Promise((o,i)=>{rq(t),this.taskManager.executeDownloadCsvSending(r).then(a=>{a.status===sl.ExecutionResultStatus.SUCCESS?o(a.result):i(a.error)})}),cancel:o=>this.taskManager.cancel(r.taskId,o||AN)}}executePivotQuery(t,n){const r=new wCt("SEND_JAQL_QUERY",t,Object.assign(Object.assign({},n||{}),{shouldSkipHighlightsWithoutAttributes:this.shouldSkipHighlightsWithoutAttributes||!1}));return{resultPromise:new Promise((o,i)=>{kCt(t),this.taskManager.executePivotQuerySending(r).then(a=>{a.status===sl.ExecutionResultStatus.SUCCESS?o(a.result):i(a.error)})}),cancel:o=>this.taskManager.cancel(r.taskId,o||AN)}}getDataSourceFields(t,n=9999,r=0){return nq(this,void 0,void 0,function*(){return(yield this.queryApi.getDataSourceFields(t,n,r))||[]})}getDataSourceSchema(t){return this.queryApi.getDataSourceSchema(t)}getDataSourceList(){return nq(this,void 0,void 0,function*(){return(yield this.queryApi.getDataSourceList())||[]})}}function rq(e){const{attributes:t,measures:n,filters:r,highlights:o,count:i,offset:a}=e;if(i&&i<0)throw new ns("errors.invalidCountNegative",{count:i.toString()});if(a&&a<0)throw new ns("errors.invalidOffset",{offset:a.toString()});if(t.length+n.length===0)throw new ns("errors.noDimensionsOrMeasures");t.forEach(s=>{if(!s.skipValidation&&!xn.isAttribute(s)){const{name:l}=s;throw new ns("errors.invalidAttribute",{attributeName:l})}}),n.forEach(s=>{if(!s.skipValidation&&!xn.isMeasure(s))throw new ns("errors.invalidMeasure",{measureName:s.name})}),r.forEach(s=>{if(!s.skipValidation&&!xn.isFilter(s))throw new ns("errors.invalidFilter",{filterName:s.name})}),o.forEach(s=>{if(!s.skipValidation&&!xn.isFilter(s))throw new ns("errors.invalidHighlight",{highlightName:s.name})})}function kCt(e){const{rowsAttributes:t,columnsAttributes:n,measures:r,filters:o,highlights:i,count:a,offset:s}=e;if(a&&a<0)throw new ns("errors.invalidCountNegative",{count:a.toString()});if(s&&s<0)throw new ns("errors.invalidOffset",{offset:s.toString()});if(t.length+n.length+r.length===0)throw new ns("errors.noDimensionsOrMeasures");o.forEach(l=>{if(!l.skipValidation&&!xn.isFilter(l))throw new ns("errors.invalidFilter",{filterName:l.name})}),i.forEach(l=>{if(!l.skipValidation&&!xn.isFilter(l))throw new ns("errors.invalidHighlight",{highlightName:l.name})})}function CCt(e){if(!e)throw new ns("errors.missingHttpClient");if(!e.post)throw new ns("errors.missingPostMethod")}const MCt={enabled:!0,delay:500},TCt={locale:gE(),dateConfig:z4,loadingIndicatorConfig:MCt,translationConfig:{language:"en",customTranslations:[]},language:"en",queryCacheConfig:{enabled:!1},queryLimit:y$e,tabberConfig:{enabled:!1},accessibilityConfig:{enabled:!1},errorBoundaryConfig:{alwaysShowErrorText:!1},trackingConfig:{enabled:!0}};function ECt(e,t,n){return na(this,null,function*(){var r;const o=yield OCt(t,n);return ti.withOptions({mergeArrays:!1},TCt,{locale:gE((r=e==null?void 0:e.translationConfig)==null?void 0:r.language)},o,e)})}function ACt(e){const t={};return e.forEach(n=>{t[n.key]=n}),t}function OCt(e,t=!1){return na(this,null,function*(){var n,r;const o=yield e.get("api/globals");if(!o)throw new Qt("errors.serverSettingsNotLoaded");const i=t?{colors:Gx().palette.variantColors}:yield _ie(xie(o.designSettings),e);return{serverThemeSettings:bie(o.designSettings,i,e.url),serverLanguage:o.language,serverVersion:o.version,serverFeatures:ACt(o.features),user:{tenant:{name:((r=(n=o.user)==null?void 0:n.tenant)==null?void 0:r.name)||ere}}}})}function PCt(e,t){return t===ere?e:e.replace(`/${t}`,"")}function DCt(){window.addEventListener("unhandledrejection",e=>{e.reason instanceof Error?console.error(e.reason.message):console.error(e.reason)})}const NCt=e=>na(void 0,[e],function*({defaultDataSource:t,url:n,token:r,wat:o,ssoEnabled:i,appConfig:a,enableSilentPreAuth:s,useFusionAuth:l}){if(n===void 0)throw new Qt("errors.sisenseContextNoAuthentication");const c=qy(n),d=ckt({url:c,token:r,wat:o,ssoEnabled:i,enableSilentPreAuth:s,useFusionAuth:l});if(!d)throw new Qt("errors.sisenseContextNoAuthentication");DCt();const p=new dkt(c,d,"sdk-ui-1.35.0"),u=yield p.login(),k=qce(d)||!u,v=yield ECt(a||{},p,k),h=new Tne(PCt(c,v.user.tenant.name),d),C=new SCt(p,h);return{httpClient:p,pivotClient:h,queryClient:C,settings:v,defaultDataSource:t,queryCache:{clear:ore}}}),oq=e=>e,LCt=()=>{let e=oq;return{configure(t){e=t},generate(t){return e(t)},reset(){e=oq}}},RCt=LCt(),ICt={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 jCt(e,t,n="Mui"){const r=ICt[t];return r?`${n}-${r}`:`${RCt.generate(e)}-${t}`}const zCt=["ownerState"],BCt=["variants"],FCt=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function HCt(e){return Object.keys(e).length===0}function WCt(e){return typeof e=="string"&&e.charCodeAt(0)>96}function ON(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const $Ct=x_(),iq=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function Nk({defaultTheme:e,theme:t,themeId:n}){return HCt(t)?e:t[n]||t}function UCt(e){return e?(t,n)=>n[e]:null}function PC(e,t){let{ownerState:n}=t,r=Ln(t,zCt);const o=typeof e=="function"?e(it({ownerState:n},r)):e;if(Array.isArray(o))return o.flatMap(i=>PC(i,it({ownerState:n},r)));if(o&&typeof o=="object"&&Array.isArray(o.variants)){const{variants:i=[]}=o;let a=Ln(o,BCt);return i.forEach(s=>{let l=!0;typeof s.props=="function"?l=s.props(it({ownerState:n},r,n)):Object.keys(s.props).forEach(c=>{(n==null?void 0:n[c])!==s.props[c]&&r[c]!==s.props[c]&&(l=!1)}),l&&(Array.isArray(a)||(a=[a]),a.push(typeof s.style=="function"?s.style(it({ownerState:n},r,n)):s.style))}),a}return o}function YCt(e={}){const{themeId:t,defaultTheme:n=$Ct,rootShouldForwardProp:r=ON,slotShouldForwardProp:o=ON}=e,i=a=>b_(it({},a,{theme:Nk(it({},a,{defaultTheme:n,themeId:t}))}));return i.__mui_systemSx=!0,(a,s={})=>{jie(a,A=>A.filter(D=>!(D!=null&&D.__mui_systemSx)));const{name:l,slot:c,skipVariantsResolver:d,skipSx:p,overridesResolver:u=UCt(iq(c))}=s,k=Ln(s,FCt),v=d!==void 0?d:c&&c!=="Root"&&c!=="root"||!1,h=p||!1;let C;process.env.NODE_ENV!=="production"&&l&&(C=`${l}-${iq(c||"Root")}`);let R=ON;c==="Root"||c==="root"?R=r:c?R=o:WCt(a)&&(R=void 0);const H=Iie(a,it({shouldForwardProp:R,label:C},k)),U=A=>typeof A=="function"&&A.__emotion_real!==A||pp(A)?D=>PC(A,it({},D,{theme:Nk({theme:D.theme,defaultTheme:n,themeId:t})})):A,W=(A,...D)=>{let z=U(A);const N=D?D.map(U):[];l&&u&&N.push(x=>{const g=Nk(it({},x,{defaultTheme:n,themeId:t}));if(!g.components||!g.components[l]||!g.components[l].styleOverrides)return null;const M=g.components[l].styleOverrides,_={};return Object.entries(M).forEach(([T,Y])=>{_[T]=PC(Y,it({},x,{theme:g}))}),u(x,_)}),l&&!v&&N.push(x=>{var g;const M=Nk(it({},x,{defaultTheme:n,themeId:t})),_=M==null||(g=M.components)==null||(g=g[l])==null?void 0:g.variants;return PC({variants:_},it({},x,{theme:M}))}),h||N.push(i);const B=N.length-D.length;if(Array.isArray(A)&&B>0){const x=new Array(B).fill("");z=[...A,...x],z.raw=[...A.raw,...x]}const E=H(z,...N);if(process.env.NODE_ENV!=="production"){let x;l&&(x=`${l}${VE(c||"")}`),x===void 0&&(x=`Styled(${$ie(a)})`),E.displayName=x}return a.muiName&&(E.muiName=a.muiName),E};return H.withConfig&&(W.withConfig=H.withConfig),W}}const GCt=YCt();function VCt(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:fM(t.components[n].defaultProps,r)}function qCt({props:e,name:t,defaultTheme:n,themeId:r}){let o=mae(n);return r&&(o=o[r]||o),VCt({theme:o,name:t,props:e})}function XCt(e,t,n=void 0){const r={};return Object.keys(e).forEach(o=>{r[o]=e[o].reduce((i,a)=>{if(a){const s=t(a);s!==""&&i.push(s),n&&n[a]&&i.push(n[a])}return i},[]).join(" ")}),r}const ZCt=["component","direction","spacing","divider","children","className","useFlexGap"],KCt=x_(),QCt=GCt("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function JCt(e){return qCt({props:e,name:"MuiStack",defaultTheme:KCt})}function e2t(e,t){const n=va.toArray(e).filter(Boolean);return n.reduce((r,o,i)=>(r.push(o),i<n.length-1&&r.push(fr(t,{key:`separator-${i}`})),r),[])}const t2t=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],n2t=({ownerState:e,theme:t})=>{let n=it({display:"flex",flexDirection:"column"},hu({theme:t},nN({values:e.direction,breakpoints:t.breakpoints.values}),r=>({flexDirection:r})));if(e.spacing){const r=Az(t),o=Object.keys(t.breakpoints.values).reduce((s,l)=>((typeof e.spacing=="object"&&e.spacing[l]!=null||typeof e.direction=="object"&&e.direction[l]!=null)&&(s[l]=!0),s),{}),i=nN({values:e.direction,base:o}),a=nN({values:e.spacing,base:o});typeof i=="object"&&Object.keys(i).forEach((s,l,c)=>{if(!i[s]){const d=l>0?i[c[l-1]]:"column";i[s]=d}}),n=qm(n,hu({theme:t},a,(s,l)=>e.useFlexGap?{gap:Xm(r,s)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${t2t(l?i[l]:e.direction)}`]:Xm(r,s)}}))}return n=mJe(t.breakpoints,n),n};function r2t(e={}){const{createStyledComponent:t=QCt,useThemeProps:n=JCt,componentName:r="MuiStack"}=e,o=()=>XCt({root:["root"]},s=>jCt(r,s),{}),i=t(n2t),a=Kt(function(s,l){const c=n(s),d=Pz(c),{component:p="div",direction:u="column",spacing:k=0,divider:v,children:h,className:C,useFlexGap:R=!1}=d,H=Ln(d,ZCt),U={direction:u,spacing:k,useFlexGap:R},W=o();return je(i,it({as:p,ownerState:U,ref:l,className:bn(W.root,C)},H,{children:v?e2t(h,v):h}))});return process.env.NODE_ENV!=="production"&&(a.propTypes={children:fe.node,direction:fe.oneOfType([fe.oneOf(["column-reverse","column","row-reverse","row"]),fe.arrayOf(fe.oneOf(["column-reverse","column","row-reverse","row"])),fe.object]),divider:fe.node,spacing:fe.oneOfType([fe.arrayOf(fe.oneOfType([fe.number,fe.string])),fe.number,fe.object,fe.string]),sx:fe.oneOfType([fe.arrayOf(fe.oneOfType([fe.func,fe.object,fe.bool])),fe.func,fe.object])}),a}function cue(e,t){var n,r;return Mr(e)&&t.indexOf((n=e.type.muiName)!=null?n:(r=e.type)==null||(r=r._payload)==null||(r=r.value)==null?void 0:r.muiName)!==-1}const o2t=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],i2t=e=>{const{classes:t,inset:n,primary:r,secondary:o,dense:i}=e;return oo({root:["root",n&&"inset",i&&"dense",r&&o&&"multiline"],primary:["primary"],secondary:["secondary"]},mrt,t)},a2t=Dn("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${vM.primary}`]:t.primary},{[`& .${vM.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})(({ownerState:e})=>it({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},e.primary&&e.secondary&&{marginTop:6,marginBottom:6},e.inset&&{paddingLeft:56})),uue=Kt(function(e,t){const n=Vr({props:e,name:"MuiListItemText"}),{children:r,className:o,disableTypography:i=!1,inset:a=!1,primary:s,primaryTypographyProps:l,secondary:c,secondaryTypographyProps:d}=n,p=Ln(n,o2t),{dense:u}=Nn(au);let k=s??r,v=c;const h=it({},n,{disableTypography:i,inset:a,primary:!!k,secondary:!!v,dense:u}),C=i2t(h);return k!=null&&k.type!==rs&&!i&&(k=je(rs,it({variant:u?"body2":"body1",className:C.primary,component:l!=null&&l.variant?void 0:"span",display:"block"},l,{children:k}))),v!=null&&v.type!==rs&&!i&&(v=je(rs,it({variant:"body2",className:C.secondary,color:"text.secondary",display:"block"},d,{children:v}))),je(a2t,it({className:bn(C.root,o),ownerState:h,ref:t},p,{children:[k,v]}))});process.env.NODE_ENV!=="production"&&(uue.propTypes={children:fe.node,classes:fe.object,className:fe.string,disableTypography:fe.bool,inset:fe.bool,primary:fe.node,primaryTypographyProps:fe.object,secondary:fe.node,secondaryTypographyProps:fe.object,sx:fe.oneOfType([fe.arrayOf(fe.oneOfType([fe.func,fe.object,fe.bool])),fe.func,fe.object])});const Om=(e,t)=>`${t}px solid ${e}`,due=e=>({columns:[{widthPercentage:100,rows:e.map(t=>({cells:[{widthPercentage:100,widgetId:t.id}]}))}]});function pue(e){return Yle(e)?{direction:e}:e}function aq(e,t){return{valuesIndex:e.field-(t.rows||[]).length-(t.columns||[]).length,columnsMembersPath:Object.values(e.measurePath||{})}}function s2t({type:e,settings:t,sortDetails:n},r){return e==="simple"?n.field>=(r.rows||[]).length?[{rowIndex:0,sort:{direction:sv(t[0].direction),by:aq(n,r)}}]:[{rowIndex:n.field,sort:{direction:sv(t[0].direction)}}]:t.reduce((o,i,a)=>{var s;const l=(s=r.rows)==null?void 0:s[a],c=(l==null?void 0:l.sortType)&&pue(l==null?void 0:l.sortType),d={direction:sv(i.direction),by:aq(n,r)};return!i.selected&&Zs(c==null?void 0:c.by,d.by)&&o.push({rowIndex:a,sort:null}),i.selected&&o.push({rowIndex:a,sort:d}),o},[])}function l2t(e){const{jaql:t,pivotBuilder:n,isForceReload:r}=e,[o,i]=ut({isLoading:!1,isNoResults:!1}),a=bc(t);xt(()=>{t&&(a||r)&&n.updateJaql(t)},[r,a,t,n]);const s=ct(()=>{i({isLoading:!0,isNoResults:!1})},[]),l=ct(c=>{i({isLoading:!1,isNoResults:!c.cellsMetadata})},[]);return xt(()=>{const c=[{event:j3,handler:s},{event:z3,handler:l}];return c.forEach(({event:d,handler:p})=>{n.on(d,p)}),()=>{c.forEach(({event:d,handler:p})=>{n.off(d,p)})}},[n,s,l]),o}function c2t(e){const{pivotClient:t,pivotBuilder:n,shouldBeRecreated:r}=e,[o,i]=ut(()=>t.prepareDataService());return xt(()=>{if(r){const a=t.prepareDataService();i(a),n.updateDataService(a)}},[t,n,r]),xt(()=>()=>{o.destroy()},[o]),o}const u2t=({dataOptions:e})=>{const[t,n]=ut(Yae(e));return{dataOptionsInternal:t,updateSort(r){var o;n(ft(Ze({},t),{rows:(o=t.rows)==null?void 0:o.map((i,a)=>{const s=r.rows.find(({rowIndex:l})=>l===a);return s?s.sort===null?PU(i,{sortType:void 0}):PU(i,{sortType:s.sort}):i})}))}}},d2t=e=>(t,n,r,o)=>{var i;const a=ez(e,(i=o==null?void 0:o.field)==null?void 0:i.index),s=Zre(a),l=t.value===null||typeof t.value>"u";t.content=l?"":hi(s,t.value)},p2t=()=>(e,t,n)=>{var r,o;const i=e.userType===Cr.CORNER,a=e.userType===Cr.SUB_TOTAL;if(!t||i||a)return;const s=n.metadata.find(({panel:c,jaql:d})=>{var p;const u=["rows","columns"].includes(c),k=d.dim===t.jaql.dim,v=t.jaql.datatype===d.datatype&&t.jaql.level===d.level,h=(p=d.in)==null?void 0:p.selected;return u&&k&&v&&h}),l=(o=(r=s==null?void 0:s.jaql)==null?void 0:r.in)==null?void 0:o.selected;l&&Ckt(l.jaql)(e.value)&&(e.state={isSelected:!0})};function h2t(e,t){return n=>{var r,o,i,a;if(n.userType===Cr.SUB_TOTAL&&(n.content=t("pivotTable.subTotal",{value:(r=n.content)!=null?r:""})),n.userType===Cr.GRAND_TOTAL){if(n.metadataType===Gn.ROWS&&(n.content=t("pivotTable.grandTotal"),((o=e.values)==null?void 0:o.length)===1&&!((i=e.columns)!=null&&i.length))){const[s]=e.values,l="column"in s?s.column:s;n.content=(a=l.name)!=null?a:n.content}n.metadataType===Gn.COLUMNS&&n.parent&&(n.content=t("pivotTable.grandTotal"))}}}const f2t="#000000",m2t="#ffffff";function g2t(e,t){return(n,r,o,i)=>{var a;const s={};if(r.userType===Cr.SUB_TOTAL||r.userType===Cr.GRAND_TOTAL||o.userType===Cr.SUB_TOTAL||o.userType===Cr.GRAND_TOTAL||o.parent&&o.parent.userType===Cr.SUB_TOTAL||o.parent&&o.parent.userType===Cr.GRAND_TOTAL)return;const l=ez(e,(a=i==null?void 0:i.field)==null?void 0:a.index),c=l==null?void 0:l.color,d=l==null?void 0:l.dataBarsColor;if(c){const p=Qx(c);if(p.type==="Static"||p.type==="Absolute"){const u=p.getColor(n.value);u&&(s.backgroundColor=u)}else if(p.type==="Relative"){const u=c,[k]=t.palette.variantColors,v=k?mc(k,.2):f2t,h=k?mc(k,-.2):m2t,C={steps:u.steps,min:u.minColor,max:u.maxColor,minDef:v,maxDef:h,minGray:rM(v),maxGray:rM(h)};n.store=n.store||{},n.store.compileRange=({min:R,max:H,minvalue:U,midvalue:W,maxvalue:A})=>jre(R??"#000000",H??"#ffffff",U??0,W??0,A??0),n.store.compileRangeContext={},n.store.compileRangeArgs=C}}if(d){const p=Qx(d);if(p.type==="Static"||p.type==="Absolute"){const u=p.getColor(n.value);u&&(s.databarColor=u)}}Object.keys(s).length>0&&(n.style=n.style||{},Object.assign(n.style,s))}}const v2t=({dataService:e,dataOptions:t})=>{const{app:n}=Er(),{t:r}=Fn(),{themeSettings:o}=mn(),i=ct(j5([d2t(t),g2t(t,o)]),[t]),a=ct((l,c)=>_g(l,c,n==null?void 0:n.settings.locale,n==null?void 0:n.settings.dateConfig),[n]),s=ct(j5([CGe(t,a),h2t(t,r),p2t()]),[t,r]);xt(()=>(e.on($L,i),e.on(p2,s),()=>{e.off($L,i),e.off(p2,s)}),[e,i])};function sq(e,t){return wd(e,t)}function y2t(e){const t=x2t(e),n=Lg(e,t),[r,o]=wc(sq,{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0}),{isInitialized:i,app:a}=Er();return xt(()=>{if(i||o({type:"error",error:new Qt("errors.executeQueryNoSisenseContext")}),n(a)){o({type:"loading"});const{dataSource:s,rows:l,columns:c,values:d,grandTotals:p,filters:u,highlights:k,count:v,offset:h,onBeforeQuery:C}=e,{filters:R,relations:H}=bl(u);nre({dataSource:s,rows:l,columns:c,values:d,grandTotals:p,filters:R,filterRelations:H,highlights:k,count:v,offset:h},a,{onBeforeQuery:C}).then(U=>{o({type:"success",data:U})}).catch(U=>{o({type:"error",error:U})})}},[a,i,e,n]),r.data&&t?sq(r,{type:"loading"}):r}const b2t=["dataSource","rows","columns","values","grandTotals","count","offset","onBeforeQuery"];function x2t(e){return bc(e,b2t,(t,n)=>{const{filters:r}=bl(n.filters),{filters:o}=bl(t.filters);return Km(r,o)||Km(n.highlights,t.highlights)})}function hue(e,t){const[n,r]=ut(e),o=bt(()=>N_(i=>{r(i)},t),[t]);return xt(()=>{o(e)},[e,o]),n}const w2t=200,lq=e=>Ze({attribute:cu(e),includeSubTotals:e.includeSubTotals||!1},e.sortType&&{sort:pue(e.sortType)}),_2t=e=>{var t;return{measure:_E(e),totalsCalculation:e.totalsCalculation,dataBars:e.dataBars||!1,shouldRequestMinMax:((t=e.color)==null?void 0:t.type)==="range"}},fue=e=>{const{rows:t=[],columns:n=[],values:r=[],grandTotals:o}=e,i=t.flatMap(lq),a=n.flatMap(lq),s=r.flatMap(_2t);return{rows:i,columns:a,values:s,grandTotals:o}},S2t=({dataSet:e,dataOptionsInternal:t,filters:n,highlights:r})=>{const[o,i]=ut(),{rows:a,columns:s,values:l,grandTotals:c}=fue(t),d=ct(k=>{i(v=>Zs(v,k)?v:k)},[i]),p=hue({dataSource:e,rows:a,columns:s,values:l,grandTotals:c,filters:n,highlights:r,onBeforeQuery:d},w2t),{error:u}=y2t(p);return{jaql:o,error:u}},k2t="#cbced7",C2t="#ffff9c";function M2t(e,t){var n,r,o,i,a,s,l,c,d,p,u;let k,v;if((n=t==null?void 0:t.chart)!=null&&n.backgroundColor){const h=Ey(fc((r=t==null?void 0:t.chart)==null?void 0:r.backgroundColor))<.5?.07:-.07;k=za((o=t==null?void 0:t.chart)==null?void 0:o.backgroundColor,h),v=za((i=t==null?void 0:t.chart)==null?void 0:i.backgroundColor,h*1.5)}return{fontFamily:(a=t==null?void 0:t.typography)==null?void 0:a.fontFamily,textColor:(s=t==null?void 0:t.chart)==null?void 0:s.textColor,backgroundColor:(l=t==null?void 0:t.chart)==null?void 0:l.backgroundColor,borderColor:k2t,fillColor:k,additionalFillColor:v,fillOptions:{alternatingRows:e==null?void 0:e.alternatingRowsColor,alternatingColumns:e==null?void 0:e.alternatingColumnsColor,columnsHeaders:e==null?void 0:e.headersColor,rowMembers:e==null?void 0:e.membersColor,totals:e==null?void 0:e.totalsColor},rowHeight:e==null?void 0:e.rowHeight,isAutoHeight:(c=e==null?void 0:e.isAutoHeight)!=null?c:!1,navigationPrimaryColor:(d=t==null?void 0:t.typography)==null?void 0:d.primaryTextColor,navigationSecondaryColor:(p=t==null?void 0:t.typography)==null?void 0:p.secondaryTextColor,selectionColor:(u=e==null?void 0:e.highlightColor)!=null?u:C2t}}const T2t=25;function E2t({nodeRef:e,pivotBuilder:t,dataOptions:n,styleOptions:r,themeSettings:o,size:i,onTotalHeightChange:a}){const[s,l]=ny((r==null?void 0:r.rowsPerPage)||T2t),c=ct((k,v)=>{const h=[...n.rows?n.rows:[],...n.columns?n.columns:[],...n.values?n.values:[]].map(R=>R==null?void 0:R.width);if(v){const[R,H]=v,U=k[R];U&&typeof U.jaqlIndex<"u"&&(h[U.jaqlIndex]=H)}const C=[];return k.forEach((R,H)=>{typeof R.jaqlIndex<"u"&&typeof h[R.jaqlIndex]<"u"&&C.push([H,h[R.jaqlIndex]])}),C},[n]),d=ct(k=>{l(k)},[l]),p=bt(()=>M2t(r,o),[r,o]),u=bt(()=>i?Ze({width:i.width,height:i.height,isPaginated:!0,itemsPerPage:s,isSelectedMode:!0,onUpdatePredefinedColumnWidth:c,onItemsPerPageChange:d,onTotalHeightChange:a},p):null,[i,s,c,p,a,d]);xt(()=>{e.current&&u&&(e.current.children.length?t.updateProps(u):t.render(e.current,u))},[e,t,u])}function A2t(e){const{pivotClient:t}=e,n=bt(()=>t.preparePivotBuilder(),[t]);return xt(()=>()=>{n.destroy()},[n]),n}const mue=mr({componentName:"PivotTable"})(e=>{const{dataSet:t,dataOptions:n,filters:r,highlights:o,refreshCounter:i=0}=e,a=bt(()=>{var x;return(x=e.styleOptions)!=null?x:{}},[e.styleOptions]),s=pt(null),[l,c]=ut(null),[d,p]=ut(null),{app:u}=Er(),{themeSettings:k}=mn(),v=u==null?void 0:u.pivotClient;if(!v)throw new Qt("errors.noPivotClient");const{dataOptionsInternal:h,updateSort:C}=u2t({dataOptions:n}),{error:R,jaql:H}=S2t({dataSet:t,dataOptionsInternal:h,filters:r,highlights:o});if(R)throw R;const U=A2t({pivotClient:v}),W=bc(H),A=i>0&&bc(i),D=c2t({pivotClient:v,pivotBuilder:U,shouldBeRecreated:W||A});v2t({dataService:D,dataOptions:n}),E2t({nodeRef:s,pivotBuilder:U,dataOptions:n,styleOptions:a,themeSettings:k,size:l,onTotalHeightChange:p});const{isLoading:z,isNoResults:N}=l2t({jaql:H,pivotBuilder:U,isForceReload:A}),B=ct(x=>{const g=s2t(x,h);C({rows:g})},[h,C]);xt(()=>(U.on(G2,B),()=>{U.off(G2,B)}),[U,B]);const E=ct(x=>{(x.width!==(l==null?void 0:l.width)||x.height!==(l==null?void 0:l.height))&&c(x)},[l,c]);return ke(Ag,{defaultSize:Fae,size:{width:a==null?void 0:a.width,height:a!=null&&a.isAutoHeight&&!N&&d!=null?d:a==null?void 0:a.height},onSizeChange:E,children:ke(ox,{themeSettings:k,isVisible:z,children:Pt(yr,{children:[N&&ke(Yz,{iconType:"table"}),ke("div",{ref:s,"aria-label":"pivot-table-root"})]})})})}),gue=mr({componentName:"PivotTableWidget"})(e=>{var t;const[n,r]=ut(0),{app:o}=Er(),{styleOptions:i,dataSource:a=o==null?void 0:o.defaultDataSource,dataOptions:s}=e,l=lA("pivot",{hasHeader:!((t=i==null?void 0:i.header)!=null&&t.hidden)}),c=e.styleOptions||{},{width:d,height:p}=c,u=no(c,["width","height"]);return s?ke(Ag,{defaultSize:l,size:{width:d,height:i!=null&&i.isAutoHeight?void 0:p},children:ke(EA,ft(Ze({},e),{dataSetName:a&&kd(a),onRefresh:()=>r(n+1),children:ke(mue,{dataSet:e.dataSource,dataOptions:e.dataOptions,styleOptions:u,filters:e.filters,highlights:e.highlights,refreshCounter:n})}))}):null}),O2t=e=>{const t=[],n=r=>{Array.isArray(r)?r.forEach(n):typeof r=="object"&&r!==null&&(r.widgetid&&t.push(r.widgetid),Object.values(r).forEach(n))};return n(e.layout),t},P2t=e=>"levels"in e&&e.isCascading===!0;function D2t(e,t){if(!e)return[];return n(e);function n(r){var o,i;if(WE(r))return[{nodeType:"attribute",attribute:((i=(o=mQe(t,r.instanceid))==null?void 0:o.attribute)==null?void 0:i.name)||r.instanceid}];if($E(r))return[{nodeType:"openBracket"},...n(r.left),{nodeType:"operator",operator:r.operator},...n(r.right),{nodeType:"closeBracket"}];throw new UE}}function EM(e=[],t=[],n){switch(n){case"widgetFirst":return kC(t,e);case"codeFirst":return kC(e,t);case"codeOnly":return t;default:return kC(e,t)}}var N2t=function(e){return e.FILTER="filter",e.SELECT="select",e}({});function cq(e){return!!e&&e.min!==null&&e.max!==null}var L2t=function(e){return e.PRE="pre",e.POST="post",e}({});function vue(e){return"formula"in e}function yue(e){return"formulaRef"in e}const R2t=e=>({columns:(e.columns||[]).map(t=>({widthPercentage:t.width,rows:(t.cells||[]).map(n=>{const r=n.subcells.reduce((o,i)=>o+i.width,0);return{cells:n.subcells.map(o=>({widthPercentage:r<100?o.width/(r/100):o.width,height:o.elements[0].height,widgetId:o.elements[0].widgetid}))}})}))}),I2t=e=>Im(e.jaql,e.instanceid,e.disabled,e.locked),j2t=e=>{const{levels:t,instanceid:n,disabled:r,locked:o}=e,i=t.map(a=>Im(a,a.instanceid));return new KI(i,{guid:n,disabled:r,locked:o})};function z2t(e,t){const n=e.map(o=>P2t(o)?j2t(o):I2t(o));if(!t)return n;const r=cQe(t,n);return!r||_z(r)?n:ml(n,r)}const B2t=e=>e.subtype==="WidgetsTabber";function F2t(e=[]){const t={};return e.forEach(n=>{var r,o,i,a;t[n.oid]={filtersOptions:{applyMode:((r=n.options)==null?void 0:r.dashboardFiltersMode)==="filter"?uw.FILTER:uw.HIGHLIGHT,shouldAffectFilters:(o=n.options)==null?void 0:o.selector,ignoreFilters:{all:(i=n.metadata.ignore)==null?void 0:i.all,ids:(a=n.metadata.ignore)==null?void 0:a.ids},forceApplyBackgroundFilters:!0}}}),t}function H2t(e=[]){const t={};return e.forEach(n=>{B2t(n)&&(t[n.oid]={tabs:n.style.tabs,activeTab:parseInt(n.style.activeTab||"1",10)})}),t}function W2t(e,t){return na(this,null,function*(){var n;const r=$2t(e.widgets||[]);if(r.length===0)return e;const o=yield t.getSharedFormulas(r);return ft(Ze({},e),{widgets:(n=e.widgets)==null?void 0:n.map(i=>U2t(i,o))})})}function $2t(e){const t=e.flatMap(n=>n.metadata.panels.flatMap(r=>r.items.flatMap(o=>!vue(o.jaql)||!o.jaql.context?[]:Object.values(o.jaql.context).filter(yue).map(i=>i.formulaRef))));return Array.from(new Set(t))}function U2t(e,t){const n=e.metadata.panels.map(r=>{const o=r.items.map(i=>{const{jaql:a}=i;if(!vue(a)||!a.context)return i;const s=Object.fromEntries(Object.entries(a.context).map(([l,c])=>yue(c)?[l,t[c.formulaRef]]:[l,c]));return ft(Ze({},i),{jaql:ft(Ze({},a),{context:s})})});return ft(Ze({},r),{items:o})});return ft(Ze({},e),{metadata:ft(Ze({},e.metadata),{panels:n})})}function bue(e,t){return na(this,arguments,function*(n,r,o={},i,a){var s,l;const{includeWidgets:c,includeFilters:d}=o,p=new Cg(n),u=["oid","title","datasource","style"],k=((s=n.auth)==null?void 0:s.type)==="wat";c&&u.push("layout"),d&&(u.push("filters"),u.push("filterRelations"));const v=yield p.getDashboard(r,{fields:u});if(!v)throw new Qt("errors.dashboardWithOidNotFound",{dashboardOid:r});if(c){let C;if(k){const R=O2t(v);C=(yield Promise.all(R.map(H=>p.getWidget(H,v.oid)))).filter(H=>H!==void 0)}else C=(yield p.getDashboardWidgets(r))||[];v.widgets=C}if((l=v.style)!=null&&l.paletteId&&!v.style.palette){const C=yield p.getPalettes(),R=C==null?void 0:C.find(({_id:H})=>{var U;return H===((U=v.style)==null?void 0:U.paletteId)});R&&(v.style.palette={name:R.name,colors:R.colors})}const h=yield W2t(v,p);return iB(h,i,a)})}const Y2t=(e,t)=>{const n={};for(const r of e){const o=t(r);o in n||(n[o]=r)}return Object.values(n)};function G2t(e){return na(this,arguments,function*(t,n={}){const{includeWidgets:r,searchByTitle:o}=n,i=new Cg(t),a=[];let s=["oid","title","datasource"];r&&(s=[],a.push("widgets"));const l=yield i.getDashboards({fields:s,expand:a,searchByTitle:o});if(!l)return[];const c=Y2t(l,d=>d.oid);return c.length!==l.length&&console.warn("Removing detected duplicate dashboard(s)"),c.map(d=>iB(d))})}const V2t=I6("useGetDashboardModel")(xue);function xue(e){const t=bc(e,["dashboardOid"]),n=Lg(e,t),[r,o]=wc(wd,{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0}),{isInitialized:i,app:a}=Er(),{themeSettings:s}=mn();return xt(()=>{if(i||o({type:"error",error:new Qt("errors.sisenseContextNotFound")}),n(a)){o({type:"loading"});const{dashboardOid:l,includeWidgets:c,includeFilters:d}=e;bue(a.httpClient,l,{includeWidgets:c,includeFilters:d},s,a.settings).then(p=>{o({type:"success",data:p})}).catch(p=>{o({type:"error",error:p})})}},[a,i,e,n,s]),r.data&&t?zR(wd(r,{type:"loading"})):zR(r)}function zR(e){const t=e,{data:n}=t,r=no(t,["data"]);return ft(Ze({},r),{dashboard:n})}function q2t(e){const t=e,{data:n}=t,r=no(t,["data"]);return ft(Ze({},r),{dashboards:n})}const wue=e=>na(void 0,[e],function*({widgetOid:t,dashboardOid:n,includeDashboard:r,api:o}){const[i,a]=yield Promise.all([o.getWidget(t,n),r?o.getDashboard(n):void 0]);return{widget:i,dashboard:a}});function _ue(e,t,n,r,o){return na(this,null,function*(){const i=new Cg(e),{widget:a}=yield wue({widgetOid:n,dashboardOid:t,api:i});if(!a)throw new Qt("errors.widgetWithOidNotFound",{widgetOid:n});return z_(a,r,o)})}function X2t(e){const t=bc(e,["dashboardOid","widgetOid"]),n=Lg(e,t),{themeSettings:r}=mn(),[o,i]=wc(wd,{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0}),{isInitialized:a,app:s}=Er();return xt(()=>{if(a||i({type:"error",error:new Qt("errors.sisenseContextNotFound")}),n(s)){i({type:"loading"});const{dashboardOid:l,widgetOid:c}=e;_ue(s.httpClient,l,c,r,s.settings).then(d=>{i({type:"success",data:d})}).catch(d=>{i({type:"error",error:d})})}},[s,a,e,n,r]),o.data&&t?uq(wd(o,{type:"loading"})):uq(o)}function uq(e){const t=e,{data:n}=t,r=no(t,["data"]);return ft(Ze({},r),{widget:n})}function Z2t(e,t,n){var r;return n(e,function(o,i,a){if(t(o,i,a))return r=i,!1}),r}function K2t(e,t){return Z2t(e,ug(t),BI)}function Q2t(e){return e.percent||e.type==="percent"?"Percent":e.currency?"Currency":"Numbers"}function J2t(e){return e.decimals!==void 0&&e.decimals!=="auto"?typeof e.decimals=="string"?Number.parseFloat(e.decimals):e.decimals:"auto"}function eMt(e){var t,n,r,o,i,a,s,l,c;const d=e.jaql.datatype==="numeric"||e.jaql.agg==="count"||"context"in e.jaql,p=(t=e.format)==null?void 0:t.mask;return d&&p?{decimalScale:J2t(p),kilo:(n=p.abbreviations)==null?void 0:n.k,million:(r=p.abbreviations)==null?void 0:r.m,billion:(o=p.abbreviations)==null?void 0:o.b,trillion:(i=p.abbreviations)==null?void 0:i.t,thousandSeparator:(s=(a=p.number)==null?void 0:a.separated)!=null?s:p.separated,prefix:((l=p.currency)==null?void 0:l.position)===L2t.PRE,symbol:(c=p.currency)==null?void 0:c.symbol,name:Q2t(p)}:null}const tMt=!0;function nMt(e,t){if(!t||!tMt)return e;const{forecast:n,trend:r}=t;let o=Ze({},e);return n&&!n.isViewerDisabled&&n.isEnabled&&(o=ft(Ze({},o),{forecast:{confidenceInterval:n.confidence/100,forecastHorizon:n.forecastPeriod,modelType:"auto"}})),r&&!r.isViewerDisabled&&r.isEnabled&&(o=ft(Ze({},o),{trend:{modelType:r.trendType}})),o}const rMt=e=>{var t,n,r,o,i,a,s;return e.jaql&&"level"in e.jaql?(i=(n=(t=e.format)==null?void 0:t.mask)==null?void 0:n[e.jaql.level])!=null?i:(o=(r=e.format)==null?void 0:r.mask)==null?void 0:o.dateAndTime:(s=(a=e.format)==null?void 0:a.mask)==null?void 0:s.dateAndTime};function Qm(e,t){var n,r,o,i,a,s,l,c;const d=Fw(e.jaql,rMt(e),e.panel),p=sv((n=e.jaql.sort)!=null?n:e.categoriesSorting),u=eMt(e),k=(r=e.format)==null?void 0:r.subtotal,v=(o=e.format)==null?void 0:o.width;let h=wC((i=e.format)==null?void 0:i.color,t);const C=wC((a=e.format)==null?void 0:a.colorSecond,t),R=e.panel==="columns"&&e.panel;if(!h&&!((s=e.format)!=null&&s.color)&&e.format&&"colorIndex"in e.format&&(h=wC({type:"color",colorIndex:e.format.colorIndex},t)),xn.isMeasure(d)){const H=e.y2,U=e.singleSeriesType,W="subtotalAgg"in e.jaql&&e.jaql.subtotalAgg,A=(l=e.format)==null?void 0:l.databars,D=Ze(Ze(Ze(Ze(Ze(Ze(Ze(Ze(Ze(Ze({column:d},h&&{color:h}),C&&{dataBarsColor:C}),H&&{showOnRightAxis:H}),p&&{sortType:p}),U&&{chartType:U}),u&&{numberFormatConfig:u}),W&&{totalsCalculation:W}),A&&{dataBars:A}),v&&{width:v}),R&&{panel:R});return nMt(D,e.statisticalModels)}return Ze(Ze(Ze(Ze(Ze(Ze({column:d,isColored:(c=e.isColored)!=null?c:!1},p&&{sortType:p}),u&&{numberFormatConfig:u}),k&&{includeSubTotals:k}),v&&{width:v}),h&&{color:h}),R&&{panel:R})}function sp(e){const t=e.column;let n;if(xn.isAttribute(t))n=t.jaql(!0);else if(xn.isMeasure(t))n=t.jaql(!0);else throw new Qt("errors.unsupportedDimensionalElement");return n.jaql?n:{jaql:n}}const oMt=(e,t)=>{const n={};return e.forEach(r=>{r.name!=="filters"&&(n[_ce(r.name)]=ni(e,r.name,t))}),n};function BR(e,t,n){return la(e,t).map(DE).map(n)}function ni(e,t,n){return BR(e,t,r=>Qm(r,n))}function iMt(e,t,n){var r,o;const i=["chart/line","chart/area"].includes(t)?"x-axis":"categories",a=ni(e,i,n),s=ni(e,"values",n),l=ni(e,"break by",n),c=(o=(r=la(e,"break by")[0])==null?void 0:r.format)==null?void 0:o.members,d=c&&LE(c);return Ze({category:a,value:s,breakBy:l},d&&{seriesToColorMap:d})}function aMt(e,t,n){var r,o,i,a;const s=ni(t,"categories",n),l=ni(t,"values",n),c=ni(t,"size",n);let d,p;return e==="sunburst"?p=CVe(la(t,"categories")):(d=(o=(r=la(t,"categories")[0])==null?void 0:r.format)==null?void 0:o.members,la(t,"color").length&&(d=(a=(i=la(t,"color")[0])==null?void 0:i.format)==null?void 0:a.members),p=d&&LE(d)),Ze({category:s,value:[...l,...c]},p&&{seriesToColorMap:p})}function sMt(e,t){var n,r;const[o]=ni(e,"x-axis",t),[i]=ni(e,"y-axis",t),[a]=ni(e,"point",t),[s]=ni(e,"Break By / Color",t),[l]=ni(e,"size",t),c=(r=(n=la(e,"Break By / Color")[0])==null?void 0:n.format)==null?void 0:r.members,d=c&&LE(c);return Ze({x:o,y:i,breakByPoint:a,breakByColor:s,size:l},d&&{seriesToColorMap:d})}function lMt(e,t){const n=ni(e,"value",t),r=ni(e,"secondary",t),o=ni(e,"min",t),i=ni(e,"max",t);return{value:n,secondary:r,min:o,max:i}}function cMt(e,t){return{columns:ni(e,"columns",t)}}function uMt(e,t,n){let r;const o={},i=ni(e,"columns",n),a=BR(e,"values",(s,l)=>{var c,d,p,u,k;const{field:v,jaql:h}=s,{sortDetails:C}=h;C&&(r=C),v&&(o[v.index]=l),((d=(c=s.format)==null?void 0:c.color)==null?void 0:d.type)==="color"&&!((u=(p=s.format)==null?void 0:p.color)!=null&&u.color)&&delete s.format.color;const R=Qm(s,n);return typeof R.color!="string"&&((k=R.color)==null?void 0:k.type)==="conditional"&&delete R.color.defaultColor,R});return{rows:BR(e,"rows",(s,l,c)=>{var d;const p=l===c.length-1;let{sortDetails:u}=s==null?void 0:s.jaql;const k=Qm(s,n);k.column&&xn.isAttribute(k.column)&&(k.column=k.column.sort(Gr.None)),p&&r&&(u=r);const v=(u==null?void 0:u.field)!==((d=s.field)==null?void 0:d.index);return u&&(k.sortType=Ze({direction:sv(u.dir)},v&&{by:{valuesIndex:o[u.field],columnsMembersPath:Object.values(u.measurePath||{})}})),k}),columns:i,values:a,grandTotals:{rows:t.rowsGrandTotal,columns:t.columnsGrandTotal}}}function dMt(e){const t={"whisker/iqr":"iqr","whisker/extremums":"extremums","whisker/deviation":"standardDeviation"},n=K2t(e.whisker,r=>r);return t[n]}function pMt(e,t,n){const r=ni(e,"category",n),o=ni(e,"value",n),i=dMt(t),a=t.outliers.enabled;return{category:r,value:o,boxType:i,outliersEnabled:a}}function hMt(e,t){return la(e,"geo").map(DE).map(n=>{const r=Qm(n,t);return"geoLevel"in n?ft(Ze({},r),{level:n.geoLevel}):r})}function fMt(e,t){const n=hMt(e,t),r=ni(e,"size",t)[0],o=ni(e,"color",t)[0],i=ni(e,"details",t)[0];return{geo:n,size:r,colorBy:o,details:i}}function mMt(e,t){const n=[ni(e,"geo",t)[0]],r=ni(e,"color",t)[0];return Ze({geo:n},r&&{color:[r]})}function FR(e,t){const n="dim"in e.jaql?ft(Ze({},e),{jaql:ft(Ze({},e.jaql),{datasource:t})}):e,r=e.parent?FR(e.parent,t):void 0,o=e.through?FR(e.through,t):void 0;return ft(Ze({},n),{parent:r,through:o})}function gMt(e,t){return e.map(n=>ft(Ze({},n),{items:n.items.map(r=>FR(r,t))}))}function vMt(e,t,n,r){if(yMt(e))return iMt(t,e,r);if(bMt(e))return aMt(e,t,r);if(e==="chart/scatter")return sMt(t,r);if(e==="indicator")return lMt(t,r);if(c_(e))return cMt(t,r);if(Pd(e))return uMt(t,n,r);if(e==="chart/boxplot")return pMt(t,n,r);if(e==="map/scatter")return fMt(t,r);if(e==="map/area")return mMt(t,r);if(e==="richtexteditor")return{};throw new Qt("errors.unsupportedWidgetType",{widgetType:e})}function yMt(e){return["chart/line","chart/area","chart/bar","chart/column","chart/polar"].includes(e)}function bMt(e){return["chart/pie","chart/funnel","treemap","sunburst"].includes(e)}function Rg(e,t){const n=Jre(e);return Ze(Ze({},t),n&&{subtype:n})}function wp(e){const{min:t,max:n}=e||{};return ft(Ze({},e),{min:typeof t=="number"?t:null,max:typeof n=="number"?n:null})}function xMt(e,t,n){var r,o,i,a,s,l,c,d,p,u;const k={xAxis:wp(t.xAxis),yAxis:wp(t.yAxis),y2Axis:wp(t.y2Axis)},v=["chart/line","chart/area"].includes(e)?"x-axis":"categories",h=la(n,v),C=la(n,"values"),R=h.length===2;R&&(k.xAxis=ft(Ze({},k.xAxis),{title:(r=k.xAxis)==null?void 0:r.x2Title,x2Title:(o=k.xAxis)==null?void 0:o.title}));const H=!!((i=k.xAxis)!=null&&i.title&&"text"in k.xAxis.title),U=h[h.length-1];!H&&U&&(k.xAxis=ft(Ze({},k.xAxis),{title:ft(Ze({},(a=k.xAxis)==null?void 0:a.title),{text:U.jaql.title})}));const W=!!((s=k.xAxis)!=null&&s.x2Title&&"text"in k.xAxis.x2Title),A=h[0];!W&&R&&(k.xAxis=ft(Ze({},k.xAxis),{x2Title:ft(Ze({},(l=k.xAxis)==null?void 0:l.x2Title),{text:A.jaql.title})}));const D=!!((c=k.yAxis)!=null&&c.title&&"text"in k.yAxis.title),z=C.filter(E=>!E.y2);!D&&z.length===1&&(k.yAxis=ft(Ze({},k.yAxis),{title:ft(Ze({},(d=k.yAxis)==null?void 0:d.title),{text:z[0].jaql.title})}));const N=!!((p=k.y2Axis)!=null&&p.title&&"text"in k.y2Axis.title),B=C.filter(E=>E.y2);return!N&&B.length===1&&(k.y2Axis=ft(Ze({},k.y2Axis),{title:ft(Ze({},(u=k.y2Axis)==null?void 0:u.title),{text:B[0].jaql.title})})),k}function wMt(e,t){var n,r;const o={xAxis:wp(e.categories),yAxis:wp(e.axis)},i=la(t,"categories")[0];return!((n=o.xAxis)!=null&&n.title&&"text"in o.xAxis.title)&&i&&(o.xAxis=ft(Ze({},o.xAxis),{title:ft(Ze({},(r=o.xAxis)==null?void 0:r.title),{text:i.jaql.title})})),o.yAxis=ft(Ze({},o.yAxis),{title:{enabled:!1}}),o}function _Mt(e,t){var n,r,o,i;const a={xAxis:wp(e.xAxis),yAxis:wp(e.yAxis)},s=la(t,"x-axis")[0],l=la(t,"y-axis")[0];return!((n=a.xAxis)!=null&&n.title&&"text"in a.xAxis.title)&&s&&(a.xAxis=ft(Ze({},a.xAxis),{title:ft(Ze({},(r=a.xAxis)==null?void 0:r.title),{text:s.jaql.title})})),!((o=a.yAxis)!=null&&o.title&&"text"in a.yAxis.title)&&l&&(a.yAxis=ft(Ze({},a.yAxis),{title:ft(Ze({},(i=a.yAxis)==null?void 0:i.title),{text:l.jaql.title})})),a}function SMt(e,t){var n,r,o,i;const a={xAxis:wp(e.xAxis),yAxis:wp(e.yAxis)},s=la(t,"category")[0],l=la(t,"value")[0];return!((n=a.xAxis)!=null&&n.title&&"text"in a.xAxis.title)&&s&&(a.xAxis=ft(Ze({},a.xAxis),{title:ft(Ze({},(r=a.xAxis)==null?void 0:r.title),{text:s.jaql.title})})),!((o=a.yAxis)!=null&&o.title&&"text"in a.yAxis.title)&&l&&(a.yAxis=ft(Ze({},a.yAxis),{title:ft(Ze({},(i=a.yAxis)==null?void 0:i.title),{text:l.jaql.title})})),a}function kMt(e,t){var n,r,o,i,a,s,l,c,d,p,u,k,v,h,C,R,H,U,W,A,D;const z=((n=t.seriesLabels)==null?void 0:n.enabled)&&((i=(o=(r=t.seriesLabels)==null?void 0:r.labels)==null?void 0:o.types)==null?void 0:i.totals),N=e==="area/stacked"||e==="area/stackedspline"||e==="column/stackedcolumn"||e==="bar/stacked",B=e==="area/stacked100"||e==="area/stackedspline100"||e==="column/stackedcolumn100"||e==="bar/stacked100";let E=(s=(a=t.seriesLabels)==null?void 0:a.enabled)!=null?s:!1;return(N||B)&&(E=!!(N&&(d=(c=(l=t.seriesLabels)==null?void 0:l.labels)==null?void 0:c.types)!=null&&d.relative||B&&(k=(u=(p=t.seriesLabels)==null?void 0:p.labels)==null?void 0:u.types)!=null&&k.count)),ft(Ze({},z&&{totalLabels:{enabled:z,rotation:(h=(v=t.seriesLabels)==null?void 0:v.rotation)!=null?h:0}}),{seriesLabels:{enabled:(R=(C=t.seriesLabels)==null?void 0:C.enabled)!=null?R:!1,rotation:(U=(H=t.seriesLabels)==null?void 0:H.rotation)!=null?U:0,showValue:E,showPercentage:!!(B&&(D=(A=(W=t.seriesLabels)==null?void 0:W.labels)==null?void 0:A.types)!=null&&D.percentage)}})}function CMt(e,t,n,r){return ft(Ze(Ze(Ze({},Rg(t,n)),xMt(e,n,r)),kMt(t,n)),{lineWidth:n.lineWidth,markers:n.markers})}function MMt(e,t,n){return Ze(Ze({},Rg(e,t)),wMt(t,n))}function TMt(e,t,n){var r,o,i;return ft(Ze(Ze({},Rg(e,t)),_Mt(t,n)),{markerSize:{scatterDefaultSize:(r=t.markerSize)==null?void 0:r.defaultSize,scatterBubbleMinSize:(o=t.markerSize)==null?void 0:o.min,scatterBubbleMaxSize:(i=t.markerSize)==null?void 0:i.max}})}function EMt(e){return{header:{color:{enabled:e["colors/headers"]}},rows:{alternatingColor:{enabled:e["colors/rows"]}},columns:{alternatingColor:{enabled:e["colors/columns"]}}}}function AMt(e,t){return ft(Ze({},Rg(e,t)),{funnelSize:t.size,funnelType:t.type,funnelDirection:t.direction,labels:t.labels,legend:t.legend})}const OMt=(e,t)=>{const n=Jre(e);return n==="indicator/gauge"?{subtype:n,skin:+t.skin}:t.subtype==="bar"?{subtype:n,numericSubtype:"numericBar"}:{subtype:n,numericSubtype:"numericSimple",skin:t.skin}};function PMt(e,t,n){var r,o,i,a,s,l,c,d;const p=OMt(e,t),u=(r=la(n,"value")[0])==null?void 0:r.jaql.title,k=(o=la(n,"secondary")[0])==null?void 0:o.jaql.title;return ft(Ze({},p),{indicatorComponents:{title:{shouldBeShown:((a=(i=t.components)==null?void 0:i.title)==null?void 0:a.enabled)||!1,text:u},secondaryTitle:{text:k||""},ticks:{shouldBeShown:((l=(s=t.components)==null?void 0:s.ticks)==null?void 0:l.enabled)||!1},labels:{shouldBeShown:((d=(c=t.components)==null?void 0:c.labels)==null?void 0:d.enabled)||!1}}})}function DMt(e){var t,n,r,o;return{labels:{category:[{enabled:(t=e["title/1"])!=null?t:!0},{enabled:(n=e["title/2"])!=null?n:!0},{enabled:(r=e["title/3"])!=null?r:!0}]},tooltip:{mode:(o=e["tooltip/value"])==null||o?"value":"contribution"}}}function NMt(e){var t;return{legend:{enabled:e["legend/enabled"],position:e["legend/position"]},tooltip:{mode:(t=e["tooltip/value"])==null||t?"value":"contribution"}}}function LMt(e,t,n){return Ze(Ze({},Rg(e,t)),SMt(t,n))}function RMt(e,t){return ft(Ze({},Rg(e,t)),{markers:{fill:t.markers.fill,size:{defaultSize:t.markers.size.defaultSize,minSize:t.markers.size.min,maxSize:t.markers.size.max}}})}function IMt(e){let t;switch(e){case"areamap/world":t="world";break;case"areamap/usa":t="usa";break;default:throw new Qt("errors.unsupportedWidgetType",{widgetSubtype:e})}return{mapType:t}}function jMt(e){var t,n,r,o,i;return{rowsPerPage:parseInt(`${e.pageSize}`),isAutoHeight:e.automaticHeight,rowHeight:e.rowHeight,alternatingRowsColor:(t=e.colors)==null?void 0:t.rows,alternatingColumnsColor:(n=e.colors)==null?void 0:n.columns,headersColor:(r=e.colors)==null?void 0:r.headers,membersColor:(o=e.colors)==null?void 0:o.members,totalsColor:(i=e.colors)==null?void 0:i.totals}}function zMt(e,t){var n,r,o;const{subtype:i,style:a,metadata:{panels:s}}=t;switch(e){case"chart/line":case"chart/area":case"chart/bar":case"chart/column":{const l=CMt(e,i,a,s);if(l.navigator){const c=(n=t.options)==null?void 0:n.previousScrollerLocation;l.navigator.scrollerLocation=cq(c)?c:void 0}return l}case"chart/polar":return MMt(i,a,s);case"chart/scatter":return TMt(i,a,s);case"chart/funnel":return AMt(i,a);case"treemap":return DMt(a);case"sunburst":return NMt(a);case"chart/pie":return Rg(i,a);case"tablewidget":case"tablewidgetagg":return EMt(a);case"pivot":case"pivot2":return jMt(a);case"indicator":return PMt(i,a,s);case"chart/boxplot":{const l=LMt(i,a,s);return l.navigator&&(l.navigator.scrollerLocation=cq((r=t.options)==null?void 0:r.previousScrollerLocation)?(o=t.options)==null?void 0:o.previousScrollerLocation:void 0),l}case"map/scatter":return RMt(i,a);case"map/area":return IMt(i);case"richtexteditor":return a.content;default:throw new Qt("errors.unsupportedWidgetType",{widgetType:e})}}const Sue=e=>({backgroundColor:e.widgetBackgroundColor,spaceAround:Ah[e.widgetSpacing],cornerRadius:Ah[e.widgetCornerRadius],shadow:Ah[e.widgetShadow],border:e.widgetBorderEnabled,borderColor:e.widgetBorderColor,header:{titleTextColor:e.widgetTitleColor,titleAlignment:Ah[e.widgetTitleAlignment],dividerLine:e.widgetTitleDividerEnabled,dividerLineColor:e.widgetTitleDividerColor,backgroundColor:e.widgetTitleBackgroundColor}});function BMt(e,t,n){if(!t||!n)return e;const r=Sue(t);return Ze(Ze({},e),r)}function FMt(e,t){return e&&e.length?Xz(e,ug(t)):[]}function HMt(e,t){var n;const r=(n=e==null?void 0:e.findIndex(o=>o===t))!=null?n:-1;return r===-1?[]:e.slice(r)}const kue=e=>e!=null&&e.parent?[...kue(e.parent),Qm(e).column]:[],Cue=e=>{var t,n,r;if(e!=null&&e.parent&&e.through&&"filter"in e.through.jaql){const o=Qm(e).column,{jaql:i,format:{mask:a}={}}=e.parent,s="level"in i&&i.level&&a&&a[i.level],l=(r=(n=(t=e.through.jaql.filter)==null?void 0:t.members)==null?void 0:n.map(s?c=>({categoryValue:c,categoryDisplayValue:_g(n_(c),s)}):c=>({categoryValue:c})))!=null?r:[];return[...Cue(e.parent),{nextDimension:o,points:l}]}return[]};function WMt(e){switch(e){case"chart/line":case"chart/area":return["x-axis"];case"chart/boxplot":return["category"];case"chart/scatter":return["x-axis","y-axis","point","Break By / Color"];default:return["categories"]}}const $Mt=(e,t)=>{const n=WMt(e).map(r=>la(t,r)).flat().filter(r=>{const o="agg"in r.jaql&&r.jaql.agg,i="formula"in r.jaql&&r.jaql.formula;return!o&&!i});return n.length===1?n[0]:void 0},Mue="calendar",Tue="calendar - weeks",UMt=[yt.Years,yt.Quarters,yt.Months,yt.Days],YMt=[yt.Years,yt.Weeks,yt.Days],GMt=[yt.Years,yt.Quarters,yt.Months,yt.Weeks,yt.Days],VMt=e=>e.length===2?GMt:e[0]===Mue?UMt:e[0]===Tue?YMt:[],qMt=(e,t)=>{const[n=[],r]=L_(e,i=>[Mue,Tue].includes(i)),o=HMt(VMt(n),t.granularity);return o.length?[{title:"Calendar Hierarchy",levels:o.map(i=>new di(`${i} in ${t.name}`,t.expression,i,di.getDefaultFormatForGranularity(i)))},...r]:r},XMt=e=>{const t=e&&Qm(e),n=(e==null?void 0:e.hierarchies)||[];return t&&Ra(t.column.type)?(t.column.name=(e==null?void 0:e.jaql).column,qMt(n,t.column)):n},ZMt=(e,t,n=[],r)=>{const o=$Mt(e,t),i=o&&DE(o),a=Cue(o),s=XMt(i);return{drilldownPaths:[...FMt([...o?kue(o):[]],({expression:l})=>l),...s],drilldownSelections:a}};function X6(e){const t=e.filter,{filter:n}=t,r=no(t,["filter"]),o=n&&"turnedOff"in n&&n.turnedOff;let i,a;return o?a=n:i=n,r.members&&r.members.length===0&&(r.all=!0),{filter:r,backgroundFilter:i,turnOffMembersFilter:a}}function KMt(e){const{filter:t,backgroundFilter:n,turnOffMembersFilter:r}=X6(e.jaql),o=[ft(Ze({},e),{jaql:ft(Ze({},e.jaql),{filter:Ze(Ze({},t),r&&{filter:r})})})];return n&&o.push(ft(Ze({},e),{jaql:ft(Ze({},e.jaql),{filter:n}),disabled:!1})),o}function QMt(e){const t=e.find(r=>r.name==="filters"),n=[];return t==null||t.items.forEach(r=>{n.push(...KMt(r).filter(({disabled:o})=>!o))}),n}function JMt(e){return QMt(e).map(t=>Im(t.jaql,t.instanceid))}function Z6(e){if(Pd(e.widgetType))throw new rB("toExecuteQueryParams");let t,n,r,o;if(c_(e.widgetType)){const{attributes:i,measures:a}=Zz(Uae(e.dataOptions));t=i,n=a,r=Ile*jle+1,o=!0}else{const{attributes:i,measures:a}=Gae(e.dataOptions,e.chartType);t=i,n=a}return{dataSource:e.dataSource,dimensions:t,measures:n,filters:e.filters,highlights:e.highlights,count:r,ungroup:o}}function K6(e){if(!Pd(e.widgetType))throw new Qt("errors.widgetModel.onlyPivotWidgetSupported",{methodName:"toExecutePivotQueryParams"});const{rows:t,columns:n,values:r,grandTotals:o}=fue(Yae(e.dataOptions));return{dataSource:e.dataSource,rows:t,columns:n,values:r,grandTotals:o,filters:e.filters,highlights:e.highlights}}function Eue(e){if(Pd(e.widgetType))throw new rB("toChartProps");if(u_(e.widgetType))throw new jue("toChartProps");return c_(e.widgetType)?Ze({chartType:e.chartType},Q6(e)):{chartType:e.chartType,dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSet:e.dataSource,filters:e.filters,highlights:e.highlights}}function Q6(e){if(!c_(e.widgetType))throw new Qt("errors.widgetModel.onlyTableWidgetSupported",{methodName:"toTableProps"});return{dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSet:e.dataSource,filters:e.filters}}function Aue(e){if(!Pd(e.widgetType))throw new Qt("errors.widgetModel.onlyPivotWidgetSupported",{methodName:"toPivotTableProps"});return{dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSet:e.dataSource,filters:e.filters,highlights:e.highlights}}function J6(e){if(Pd(e.widgetType))throw new rB("toChartWidgetProps");if(u_(e.widgetType))throw new jue("toChartWidgetProps");return{chartType:e.chartType,dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSource:e.dataSource,filters:e.filters,highlights:e.highlights,title:e.title,description:e.description||"",drilldownOptions:e.drilldownOptions}}function Oue(e){if(!c_(e.widgetType))throw new Qt("errors.widgetModel.onlyTableWidgetSupported",{methodName:"toTableWidgetProps"});return{dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSource:e.dataSource,filters:e.filters,title:e.title,description:e.description||""}}function eB(e){if(!Pd(e.widgetType))throw new Qt("errors.widgetModel.onlyPivotWidgetSupported",{methodName:"toPivotTableWidgetProps"});return{dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSource:e.dataSource,filters:e.filters,highlights:e.highlights,title:e.title,description:e.description||""}}function tB(e){if(!u_(e.widgetType))throw new Qt("errors.widgetModel.onlyTextWidgetSupported",{methodName:"toTextWidgetProps"});return{styleOptions:e.styleOptions}}function Pue(e){if(!eoe(e.widgetType))throw new Qt("errors.widgetModel.onlyPluginWidgetSupported",{methodName:"toPluginWidgetProps"});return{pluginType:e.pluginType,dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSource:e.dataSource,filters:e.filters,highlights:e.highlights,title:e.title,description:e.description||""}}function Due(e){const{widgetType:t}=e;return Pd(t)?Ze({widgetType:"pivot"},eB(e)):u_(t)?Ze({widgetType:"text"},tB(e)):eoe(t)?Ze({widgetType:"plugin"},Pue(e)):Ze({widgetType:"chart"},J6(e))}function nB(e){const{oid:t}=e;return ft(Ze({},Due(e)),{id:t})}const lp=()=>{throw new Qt("errors.methodNotImplemented")},Nue={oid:"",title:"",dataSource:"",description:"",widgetType:"plugin",pluginType:"",dataOptions:{},styleOptions:{},drilldownOptions:{},filters:[],highlights:[],chartType:void 0,getExecuteQueryParams:lp,getExecutePivotQueryParams:lp,getChartProps:lp,getTableProps:lp,getPivotTableProps:lp,getPivotTableWidgetProps:lp,getChartWidgetProps:lp,getTableWidgetProps:lp,getTextWidgetProps:lp};function Lue(e){return ft(Ze({},e),{getExecuteQueryParams:()=>Z6(e),getExecutePivotQueryParams:()=>K6(e),getChartProps:()=>Eue(e),getTableProps:()=>Q6(e),getPivotTableProps:()=>Aue(e),getChartWidgetProps:()=>J6(e),getTableWidgetProps:()=>Oue(e),getPivotTableWidgetProps:()=>eB(e),getTextWidgetProps:()=>tB(e)})}function z_(e,t,n){var r,o,i,a;let s,l,c,d;const p=gMt(e.metadata.panels,e.datasource);if(s=e.type,BGe(s)){c=vMt(s,p,e.style,t==null?void 0:t.palette.variantColors),d=zMt(s,e);const C=(a=(i=(o=n==null?void 0:n.serverFeatures)==null?void 0:o.widgetDesignStyle)==null?void 0:i.active)!=null?a:!0;d=BMt(d,e.style.widgetDesign,C)}else{l=s,s="plugin",c=oMt(p,(r=t==null?void 0:t.palette.variantColors)!=null?r:[]);const C=e.style,{widgetDesign:R}=C,H=no(C,["widgetDesign"]);d=Ze(Ze({},H),R?Sue(R):{})}const u=ZMt(s,p),k=JMt(p),v=FGe(s)?jGe(s):void 0,h=ft(Ze({},Nue),{oid:e.oid,title:e.title,dataSource:pT(e.datasource),description:e.desc||"",widgetType:s,chartType:v,pluginType:l||"",dataOptions:c||{},styleOptions:d||{},drilldownOptions:u,filters:k});return Lue(h)}function Rue(e){const t=zGe(e.chartType),n=ft(Ze(Ze({},Nue),e),{filters:e.filters||[],widgetType:t});return Lue(n)}function eTt(e){if(kg(e))return Rue(e);throw new Qt("errors.otherWidgetTypesNotSupported")}function Iue(e,t){const n=t||e.dataSource;if(typeof n=="string")throw new dq("dataSource");if(!n.id||!n.live&&!n.address)throw new dq("dataSource");const r=e.chartType;let o=e.widgetType,i={},a=e.styleOptions.subtype||"";if(!r)throw new Error("Chart type is required");const s=[];if(yu(r)){const c=["chart/line","chart/area"].includes(e.widgetType)?"x-axis":"categories",d=e.dataOptions.category.map(v=>sp(ga(v))),p={name:c,items:d};s.push(p);const u=e.dataOptions.value.map(v=>sp(pi(v)));s.push({name:"values",items:u});const k=e.dataOptions.breakBy.map(v=>sp(ga(v)));s.push({name:"break by",items:k}),r==="polar"?a="column/polar":r==="bar"?a=a||"bar/classic":r==="column"?a=a||"column/classic":r==="area"?a=a||"area/basic":r==="line"&&(a=a||"line/basic")}else if(Q4(r)){const{attributes:c,measures:d}=Zz(e.dataOptions),p=[...c.map(u=>sp(ga(u))),...d.map(u=>sp(pi(u)))];s.push({name:"columns",items:p}),o="tablewidget"}else if(Ay(r))["value","min","max","secondary"].forEach(c=>{const d=(e.dataOptions[c]||[]).map(p=>sp(pi(p)));s.push({name:c,items:d})}),a=a||"indicator/numeric",i=ft(Ze({},a==="indicator/gauge"?{subtype:"round",skin:"1"}:{subtype:"simple",skin:"vertical"}),{components:{ticks:{inactive:!1,enabled:!0},labels:{inactive:!1,enabled:!0},title:{inactive:!1,enabled:!0},secondaryTitle:{inactive:!0,enabled:!0}}});else if(wf(r)){const c=e.dataOptions.category.map(u=>sp(bp(u)));s.push({name:"categories",items:c});const d=e.dataOptions.value.map(u=>sp(bp(u))),p=r==="treemap";s.push({name:p?"size":"values",items:d}),p&&["color","values"].forEach(u=>{s.push({name:u,items:[]})}),r==="pie"?(a=a||"pie/basic",i={convolution:{enabled:!0,selectedConvolutionType:"bySlicesCount",minimalIndependentSlicePercentage:3,independentSlicesCount:7}}):r==="treemap"||r==="sunburst"?a=a||r:r==="funnel"&&(a=a||"chart/funnel")}else if(uu(r))["x","y","size","breakByColor","breakByPoint"].forEach(c=>{if(e.dataOptions[c]){const d={breakByColor:"Break By / Color",breakByPoint:"point",x:"x-axis",y:"y-axis"},p=[sp(bp(e.dataOptions[c]))];s.push({name:d[c]||c,items:p})}}),a=a||"bubble/scatter";else throw new tTt(r);const l=(e.filters||[]).map(c=>c.jaql());return s.push({name:"filters",items:l}),{oid:e.oid||"",title:e.title,desc:e.description,datasource:n,type:o,metadata:{panels:s},style:i,subtype:a}}class dq extends Qt{constructor(t){super("errors.widgetModel.incomleteWidget",{prop:t})}}class tTt extends Qt{constructor(t){super("errors.widgetModel.unsupportedWidgetTypeDto",{chartType:t})}}class rB extends Qt{constructor(t){super("errors.widgetModel.pivotWidgetNotSupported",{methodName:t})}}class jue extends Qt{constructor(t){super("errors.widgetModel.textWidgetNotSupported",{methodName:t})}}const nTt=Object.freeze(Object.defineProperty({__proto__:null,fromChartWidgetProps:Rue,fromWidgetDto:z_,fromWidgetProps:eTt,toChartProps:Eue,toChartWidgetProps:J6,toCommonWidgetProps:Due,toExecutePivotQueryParams:K6,toExecuteQueryParams:Z6,toPivotTableProps:Aue,toPivotTableWidgetProps:eB,toPluginWidgetProps:Pue,toTableProps:Q6,toTableWidgetProps:Oue,toTextWidgetProps:tB,toWidgetDto:Iue,toWidgetProps:nB},Symbol.toStringTag,{value:"Module"}));function oB(e){const{title:t,dataSource:n,widgets:r,layoutOptions:o,filters:i,widgetsOptions:a,tabbersOptions:s,styleOptions:l}=e;return{title:t,defaultDataSource:n,widgets:r.map(nB),layoutOptions:o,config:{},filters:i,widgetsOptions:a,styleOptions:l,tabbersOptions:s}}function iB(e,t,n){var r;const{oid:o,title:i,datasource:a,widgets:s,layout:l,filters:c,filterRelations:d,style:p}=e,u={title:a.title,type:a.live?"live":"elasticube"},k=Ze({},p!=null&&p.palette?{palette:{variantColors:p==null?void 0:p.palette.colors}}:null),v=t&&Ze(Ze({},t),k.palette?{palette:k.palette}:null),h=(s==null?void 0:s.map(A=>z_(A,v,n)))||[],C=l?R2t(l):{columns:[]},R=(r=d==null?void 0:d[0])==null?void 0:r.filterRelations,H=z2t(c||[],R),U=F2t(s),W=H2t(s);return{oid:o,title:i,dataSource:u,styleOptions:k,widgets:h,layoutOptions:{widgetsPanel:C},filters:H,widgetsOptions:U,tabbersOptions:W}}const rTt=Object.freeze(Object.defineProperty({__proto__:null,fromDashboardDto:iB,toDashboardProps:oB},Symbol.toStringTag,{value:"Module"}));function oTt(e){return Na(e)?iTt(e):aB(e)}function aB(e){return ja(e)?aTt(e):zw(e)?sTt(e):sB(e)}function iTt(e){return{isCascading:!0,instanceid:e.config.guid,disabled:e.config.disabled,levels:e.filters.map(t=>{const n=aB(t);return ft(Ze({},n.jaql),{instanceid:n.instanceid})})}}function sB(e){const{config:{disabled:t}}=e,n=Object.assign(Object.create(e),{config:ft(Ze({},e.config),{disabled:!1})}).jaql(!0);return{jaql:ft(Ze({},n),{table:lj(e.attribute),column:hT(e.attribute)}),disabled:t,instanceid:e.config.guid,isCascading:!1}}function aTt(e){const t=sB(e);return t.jaql.filter.multiSelection=e.config.enableMultiSelection,e.config.deactivatedMembers.length>0&&(e.config.excludeMembers?t.jaql.filter.exclude.members=[...e.members,...e.config.deactivatedMembers]:t.jaql.filter.members=[...e.members,...e.config.deactivatedMembers]),e.config.backgroundFilter&&HR(t.jaql,aB(e.config.backgroundFilter).jaql.filter),e.config.deactivatedMembers.length>0&&HR(t.jaql,{exclude:{members:e.config.deactivatedMembers},turnedOff:!0}),t}function sTt(e){const t=sB(e);if(e.measure instanceof Sv){const n=t.jaql.filter;n.by.table=lj(e.measure.attribute),n.by.column=hT(e.measure.attribute),n.rankingMessage=e.measure.name}return t}function HR(e,t){if(e.filter)return HR(e.filter,t);e.filter=t}var lTt=function(e){return e.DASHBOARD_INIT="DASHBOARD.INIT",e.DASHBOARD_UPDATE_LAYOUT="DASHBOARD.UPDATE_LAYOUT",e}({}),cTt=function(e){return e.FILTERS_UPDATE="FILTERS.UPDATE",e.ADD_WIDGET="WIDGETS.ADD",e}({});function uTt(e,t){var n,r;switch(t.type){case"DASHBOARD.INIT":return Ze(Ze({},e),t.payload);case"FILTERS.UPDATE":return ft(Ze({},e),{filters:t.payload});case"WIDGETS.ADD":{const o=[...e.widgets,t.payload],i=[...((r=(n=e==null?void 0:e.layoutOptions)==null?void 0:n.widgetsPanel)==null?void 0:r.columns)||[]];return i[0]&&(i[0].rows.length||i[0].rows.push({cells:[]}),i[0].rows[0].cells.push({widgetId:t.payload.oid,widthPercentage:100})),ft(Ze(Ze({},e),e!=null&&e.layoutOptions.widgetsPanel?{layoutOptions:ft(Ze({},e==null?void 0:e.layoutOptions),{widgetsPanel:ft(Ze({},e==null?void 0:e.layoutOptions.widgetsPanel),{columns:i})})}:null),{widgets:o})}default:return e}}function dTt(e,t,n){return na(this,null,function*(){if(!e)throw new Error("Dashboard model is not initialized");if(t.type==="FILTERS.UPDATE"){const{filters:r,relations:o}=pu(t.payload),i=r.map(oTt),a=fQe(o,r),s=pTt(r);yield n.patchDashboard(e,{filters:i,filterRelations:a?[{datasource:s,filterRelations:a}]:void 0})}else if(t.type==="WIDGETS.ADD"){const r=yield n.addWidgetToDashboard(e,Iue(t.payload));if(!r)throw new Error("Failed to add widget to dashboard");return{type:"WIDGETS.ADD",payload:z_(r)}}return t})}function pTt(e){const t=new Set(e.map(n=>{var r;return(r=n.dataSource)==null?void 0:r.title}));if(t.size>1)throw new Error("Persisting filters from multiple datasources is not supported now");return t.values().next().value}function hTt(e){return e.type===Ope.FILTERS_UPDATE?{type:cTt.FILTERS_UPDATE,payload:e.payload}:null}function fTt(e,t){return e==="wat"?(t&&console.warn('WAT authentication does not support persistence. The changes will not be saved. Set "persist" flag to false to avoid this warning.'),!1):!0}const mTt=I6("useDashboardModel")(gTt);function gTt({dashboardOid:e,includeWidgets:t,includeFilters:n,persist:r=!0}){const{restApi:o,isReady:i}=roe(),{app:a}=Er(),s=bt(()=>!!(a!=null&&a.httpClient.auth)&&fTt(a.httpClient.auth.type,r),[a==null?void 0:a.httpClient.auth,r]),l=r&&s,[c,d]=wc(uTt,null),p=ct(C=>na(this,null,function*(){if(!i||!o)throw new uVe;return l&&(C=yield dTt(c==null?void 0:c.oid,C,o)),d(C)}),[l,c==null?void 0:c.oid,o,i,d]),{dashboard:u,isLoading:k,isError:v,error:h}=V2t({dashboardOid:e,includeWidgets:t,includeFilters:n});return xt(()=>{u&&d({type:lTt.DASHBOARD_INIT,payload:u})},[u,d]),{dashboard:c,isLoading:k,isError:v,error:h,dispatchChanges:p}}/*! @license DOMPurify 3.1.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.6/LICENSE */const{entries:zue,setPrototypeOf:pq,isFrozen:vTt,getPrototypeOf:yTt,getOwnPropertyDescriptor:bTt}=Object;let{freeze:Ms,seal:xc,create:Bue}=Object,{apply:WR,construct:$R}=typeof Reflect<"u"&&Reflect;Ms||(Ms=function(e){return e});xc||(xc=function(e){return e});WR||(WR=function(e,t,n){return e.apply(t,n)});$R||($R=function(e,t){return new e(...t)});const Lk=Cl(Array.prototype.forEach),hq=Cl(Array.prototype.pop),f1=Cl(Array.prototype.push),DC=Cl(String.prototype.toLowerCase),PN=Cl(String.prototype.toString),fq=Cl(String.prototype.match),m1=Cl(String.prototype.replace),xTt=Cl(String.prototype.indexOf),wTt=Cl(String.prototype.trim),Kc=Cl(Object.prototype.hasOwnProperty),ms=Cl(RegExp.prototype.test),g1=_Tt(TypeError);function Cl(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return WR(e,t,r)}}function _Tt(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return $R(e,n)}}function Sr(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:DC;pq&&pq(e,null);let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){const i=n(o);i!==o&&(vTt(t)||(t[r]=i),o=i)}e[o]=!0}return e}function STt(e){for(let t=0;t<e.length;t++)Kc(e,t)||(e[t]=null);return e}function fm(e){const t=Bue(null);for(const[n,r]of zue(e))Kc(e,n)&&(Array.isArray(r)?t[n]=STt(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=fm(r):t[n]=r);return t}function v1(e,t){for(;e!==null;){const r=bTt(e,t);if(r){if(r.get)return Cl(r.get);if(typeof r.value=="function")return Cl(r.value)}e=yTt(e)}function n(){return null}return n}const mq=Ms(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),DN=Ms(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),NN=Ms(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),kTt=Ms(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),LN=Ms(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),CTt=Ms(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),gq=Ms(["#text"]),vq=Ms(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),RN=Ms(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),yq=Ms(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Rk=Ms(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),MTt=xc(/\{\{[\w\W]*|[\w\W]*\}\}/gm),TTt=xc(/<%[\w\W]*|[\w\W]*%>/gm),ETt=xc(/\${[\w\W]*}/gm),ATt=xc(/^data-[\-\w.\u00B7-\uFFFF]/),OTt=xc(/^aria-[\-\w]+$/),Fue=xc(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),PTt=xc(/^(?:\w+script|data):/i),DTt=xc(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Hue=xc(/^html$/i),NTt=xc(/^[a-z][.\w]*(-[.\w]+)+$/i);var bq=Object.freeze({__proto__:null,MUSTACHE_EXPR:MTt,ERB_EXPR:TTt,TMPLIT_EXPR:ETt,DATA_ATTR:ATt,ARIA_ATTR:OTt,IS_ALLOWED_URI:Fue,IS_SCRIPT_OR_DATA:PTt,ATTR_WHITESPACE:DTt,DOCTYPE_NAME:Hue,CUSTOM_ELEMENT:NTt});const y1={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},LTt=function(){return typeof window>"u"?null:window},RTt=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}};function Wue(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:LTt();const t=Qe=>Wue(Qe);if(t.version="3.1.6",t.removed=[],!e||!e.document||e.document.nodeType!==y1.document)return t.isSupported=!1,t;let{document:n}=e;const r=n,o=r.currentScript,{DocumentFragment:i,HTMLTemplateElement:a,Node:s,Element:l,NodeFilter:c,NamedNodeMap:d=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:p,DOMParser:u,trustedTypes:k}=e,v=l.prototype,h=v1(v,"cloneNode"),C=v1(v,"remove"),R=v1(v,"nextSibling"),H=v1(v,"childNodes"),U=v1(v,"parentNode");if(typeof a=="function"){const Qe=n.createElement("template");Qe.content&&Qe.content.ownerDocument&&(n=Qe.content.ownerDocument)}let W,A="";const{implementation:D,createNodeIterator:z,createDocumentFragment:N,getElementsByTagName:B}=n,{importNode:E}=r;let x={};t.isSupported=typeof zue=="function"&&typeof U=="function"&&D&&D.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:g,ERB_EXPR:M,TMPLIT_EXPR:_,DATA_ATTR:T,ARIA_ATTR:Y,IS_SCRIPT_OR_DATA:V,ATTR_WHITESPACE:F,CUSTOM_ELEMENT:O}=bq;let{IS_ALLOWED_URI:P}=bq,S=null;const w=Sr({},[...mq,...DN,...NN,...LN,...gq]);let f=null;const b=Sr({},[...vq,...RN,...yq,...Rk]);let y=Object.seal(Bue(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),m=null,I=null,j=!0,$=!0,X=!1,Q=!0,J=!1,G=!0,Z=!1,K=!1,re=!1,oe=!1,ee=!1,te=!1,ne=!0,le=!1;const se="user-content-";let ae=!0,de=!1,ge={},me=null;const xe=Sr({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Se=null;const Pe=Sr({},["audio","video","img","source","image","track"]);let De=null;const Be=Sr({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ne="http://www.w3.org/1998/Math/MathML",Ae="http://www.w3.org/2000/svg",ye="http://www.w3.org/1999/xhtml";let Ce=ye,Me=!1,Le=null;const Ue=Sr({},[Ne,Ae,ye],PN);let Fe=null;const Ke=["application/xhtml+xml","text/html"],nt="text/html";let Je=null,st=null;const mt=n.createElement("form"),lt=function(Qe){return Qe instanceof RegExp||Qe instanceof Function},_t=function(){let Qe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(st&&st===Qe)){if((!Qe||typeof Qe!="object")&&(Qe={}),Qe=fm(Qe),Fe=Ke.indexOf(Qe.PARSER_MEDIA_TYPE)===-1?nt:Qe.PARSER_MEDIA_TYPE,Je=Fe==="application/xhtml+xml"?PN:DC,S=Kc(Qe,"ALLOWED_TAGS")?Sr({},Qe.ALLOWED_TAGS,Je):w,f=Kc(Qe,"ALLOWED_ATTR")?Sr({},Qe.ALLOWED_ATTR,Je):b,Le=Kc(Qe,"ALLOWED_NAMESPACES")?Sr({},Qe.ALLOWED_NAMESPACES,PN):Ue,De=Kc(Qe,"ADD_URI_SAFE_ATTR")?Sr(fm(Be),Qe.ADD_URI_SAFE_ATTR,Je):Be,Se=Kc(Qe,"ADD_DATA_URI_TAGS")?Sr(fm(Pe),Qe.ADD_DATA_URI_TAGS,Je):Pe,me=Kc(Qe,"FORBID_CONTENTS")?Sr({},Qe.FORBID_CONTENTS,Je):xe,m=Kc(Qe,"FORBID_TAGS")?Sr({},Qe.FORBID_TAGS,Je):{},I=Kc(Qe,"FORBID_ATTR")?Sr({},Qe.FORBID_ATTR,Je):{},ge=Kc(Qe,"USE_PROFILES")?Qe.USE_PROFILES:!1,j=Qe.ALLOW_ARIA_ATTR!==!1,$=Qe.ALLOW_DATA_ATTR!==!1,X=Qe.ALLOW_UNKNOWN_PROTOCOLS||!1,Q=Qe.ALLOW_SELF_CLOSE_IN_ATTR!==!1,J=Qe.SAFE_FOR_TEMPLATES||!1,G=Qe.SAFE_FOR_XML!==!1,Z=Qe.WHOLE_DOCUMENT||!1,oe=Qe.RETURN_DOM||!1,ee=Qe.RETURN_DOM_FRAGMENT||!1,te=Qe.RETURN_TRUSTED_TYPE||!1,re=Qe.FORCE_BODY||!1,ne=Qe.SANITIZE_DOM!==!1,le=Qe.SANITIZE_NAMED_PROPS||!1,ae=Qe.KEEP_CONTENT!==!1,de=Qe.IN_PLACE||!1,P=Qe.ALLOWED_URI_REGEXP||Fue,Ce=Qe.NAMESPACE||ye,y=Qe.CUSTOM_ELEMENT_HANDLING||{},Qe.CUSTOM_ELEMENT_HANDLING&<(Qe.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(y.tagNameCheck=Qe.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Qe.CUSTOM_ELEMENT_HANDLING&<(Qe.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(y.attributeNameCheck=Qe.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Qe.CUSTOM_ELEMENT_HANDLING&&typeof Qe.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(y.allowCustomizedBuiltInElements=Qe.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),J&&($=!1),ee&&(oe=!0),ge&&(S=Sr({},gq),f=[],ge.html===!0&&(Sr(S,mq),Sr(f,vq)),ge.svg===!0&&(Sr(S,DN),Sr(f,RN),Sr(f,Rk)),ge.svgFilters===!0&&(Sr(S,NN),Sr(f,RN),Sr(f,Rk)),ge.mathMl===!0&&(Sr(S,LN),Sr(f,yq),Sr(f,Rk))),Qe.ADD_TAGS&&(S===w&&(S=fm(S)),Sr(S,Qe.ADD_TAGS,Je)),Qe.ADD_ATTR&&(f===b&&(f=fm(f)),Sr(f,Qe.ADD_ATTR,Je)),Qe.ADD_URI_SAFE_ATTR&&Sr(De,Qe.ADD_URI_SAFE_ATTR,Je),Qe.FORBID_CONTENTS&&(me===xe&&(me=fm(me)),Sr(me,Qe.FORBID_CONTENTS,Je)),ae&&(S["#text"]=!0),Z&&Sr(S,["html","head","body"]),S.table&&(Sr(S,["tbody"]),delete m.tbody),Qe.TRUSTED_TYPES_POLICY){if(typeof Qe.TRUSTED_TYPES_POLICY.createHTML!="function")throw g1('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Qe.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw g1('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');W=Qe.TRUSTED_TYPES_POLICY,A=W.createHTML("")}else W===void 0&&(W=RTt(k,o)),W!==null&&typeof A=="string"&&(A=W.createHTML(""));Ms&&Ms(Qe),st=Qe}},Rt=Sr({},["mi","mo","mn","ms","mtext"]),Tt=Sr({},["foreignobject","annotation-xml"]),zt=Sr({},["title","style","font","a","script"]),Ct=Sr({},[...DN,...NN,...kTt]),rn=Sr({},[...LN,...CTt]),Ft=function(Qe){let jt=U(Qe);(!jt||!jt.tagName)&&(jt={namespaceURI:Ce,tagName:"template"});const Gt=DC(Qe.tagName),ln=DC(jt.tagName);return Le[Qe.namespaceURI]?Qe.namespaceURI===Ae?jt.namespaceURI===ye?Gt==="svg":jt.namespaceURI===Ne?Gt==="svg"&&(ln==="annotation-xml"||Rt[ln]):!!Ct[Gt]:Qe.namespaceURI===Ne?jt.namespaceURI===ye?Gt==="math":jt.namespaceURI===Ae?Gt==="math"&&Tt[ln]:!!rn[Gt]:Qe.namespaceURI===ye?jt.namespaceURI===Ae&&!Tt[ln]||jt.namespaceURI===Ne&&!Rt[ln]?!1:!rn[Gt]&&(zt[Gt]||!Ct[Gt]):!!(Fe==="application/xhtml+xml"&&Le[Qe.namespaceURI]):!1},$t=function(Qe){f1(t.removed,{element:Qe});try{U(Qe).removeChild(Qe)}catch{C(Qe)}},wn=function(Qe,jt){try{f1(t.removed,{attribute:jt.getAttributeNode(Qe),from:jt})}catch{f1(t.removed,{attribute:null,from:jt})}if(jt.removeAttribute(Qe),Qe==="is"&&!f[Qe])if(oe||ee)try{$t(jt)}catch{}else try{jt.setAttribute(Qe,"")}catch{}},qt=function(Qe){let jt=null,Gt=null;if(re)Qe="<remove></remove>"+Qe;else{const qn=fq(Qe,/^[\r\n\t ]+/);Gt=qn&&qn[0]}Fe==="application/xhtml+xml"&&Ce===ye&&(Qe='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Qe+"</body></html>");const ln=W?W.createHTML(Qe):Qe;if(Ce===ye)try{jt=new u().parseFromString(ln,Fe)}catch{}if(!jt||!jt.documentElement){jt=D.createDocument(Ce,"template",null);try{jt.documentElement.innerHTML=Me?A:ln}catch{}}const lr=jt.body||jt.documentElement;return Qe&&Gt&&lr.insertBefore(n.createTextNode(Gt),lr.childNodes[0]||null),Ce===ye?B.call(jt,Z?"html":"body")[0]:Z?jt.documentElement:lr},cn=function(Qe){return z.call(Qe.ownerDocument||Qe,Qe,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Cn=function(Qe){return Qe instanceof p&&(typeof Qe.nodeName!="string"||typeof Qe.textContent!="string"||typeof Qe.removeChild!="function"||!(Qe.attributes instanceof d)||typeof Qe.removeAttribute!="function"||typeof Qe.setAttribute!="function"||typeof Qe.namespaceURI!="string"||typeof Qe.insertBefore!="function"||typeof Qe.hasChildNodes!="function")},Un=function(Qe){return typeof s=="function"&&Qe instanceof s},Mt=function(Qe,jt,Gt){x[Qe]&&Lk(x[Qe],ln=>{ln.call(t,jt,Gt,st)})},Wt=function(Qe){let jt=null;if(Mt("beforeSanitizeElements",Qe,null),Cn(Qe))return $t(Qe),!0;const Gt=Je(Qe.nodeName);if(Mt("uponSanitizeElement",Qe,{tagName:Gt,allowedTags:S}),Qe.hasChildNodes()&&!Un(Qe.firstElementChild)&&ms(/<[/\w]/g,Qe.innerHTML)&&ms(/<[/\w]/g,Qe.textContent)||Qe.nodeType===y1.progressingInstruction||G&&Qe.nodeType===y1.comment&&ms(/<[/\w]/g,Qe.data))return $t(Qe),!0;if(!S[Gt]||m[Gt]){if(!m[Gt]&&sn(Gt)&&(y.tagNameCheck instanceof RegExp&&ms(y.tagNameCheck,Gt)||y.tagNameCheck instanceof Function&&y.tagNameCheck(Gt)))return!1;if(ae&&!me[Gt]){const ln=U(Qe)||Qe.parentNode,lr=H(Qe)||Qe.childNodes;if(lr&&ln){const qn=lr.length;for(let br=qn-1;br>=0;--br){const un=h(lr[br],!0);un.__removalCount=(Qe.__removalCount||0)+1,ln.insertBefore(un,R(Qe))}}}return $t(Qe),!0}return Qe instanceof l&&!Ft(Qe)||(Gt==="noscript"||Gt==="noembed"||Gt==="noframes")&&ms(/<\/no(script|embed|frames)/i,Qe.innerHTML)?($t(Qe),!0):(J&&Qe.nodeType===y1.text&&(jt=Qe.textContent,Lk([g,M,_],ln=>{jt=m1(jt,ln," ")}),Qe.textContent!==jt&&(f1(t.removed,{element:Qe.cloneNode()}),Qe.textContent=jt)),Mt("afterSanitizeElements",Qe,null),!1)},on=function(Qe,jt,Gt){if(ne&&(jt==="id"||jt==="name")&&(Gt in n||Gt in mt))return!1;if(!($&&!I[jt]&&ms(T,jt))&&!(j&&ms(Y,jt))){if(!f[jt]||I[jt]){if(!(sn(Qe)&&(y.tagNameCheck instanceof RegExp&&ms(y.tagNameCheck,Qe)||y.tagNameCheck instanceof Function&&y.tagNameCheck(Qe))&&(y.attributeNameCheck instanceof RegExp&&ms(y.attributeNameCheck,jt)||y.attributeNameCheck instanceof Function&&y.attributeNameCheck(jt))||jt==="is"&&y.allowCustomizedBuiltInElements&&(y.tagNameCheck instanceof RegExp&&ms(y.tagNameCheck,Gt)||y.tagNameCheck instanceof Function&&y.tagNameCheck(Gt))))return!1}else if(!De[jt]&&!ms(P,m1(Gt,F,""))&&!((jt==="src"||jt==="xlink:href"||jt==="href")&&Qe!=="script"&&xTt(Gt,"data:")===0&&Se[Qe])&&!(X&&!ms(V,m1(Gt,F,"")))&&Gt)return!1}return!0},sn=function(Qe){return Qe!=="annotation-xml"&&fq(Qe,O)},or=function(Qe){Mt("beforeSanitizeAttributes",Qe,null);const{attributes:jt}=Qe;if(!jt)return;const Gt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:f};let ln=jt.length;for(;ln--;){const lr=jt[ln],{name:qn,namespaceURI:br,value:un}=lr,Kn=Je(qn);let er=qn==="value"?un:wTt(un);if(Gt.attrName=Kn,Gt.attrValue=er,Gt.keepAttr=!0,Gt.forceKeepAttr=void 0,Mt("uponSanitizeAttribute",Qe,Gt),er=Gt.attrValue,G&&ms(/((--!?|])>)|<\/(style|title)/i,er)){wn(qn,Qe);continue}if(Gt.forceKeepAttr||(wn(qn,Qe),!Gt.keepAttr))continue;if(!Q&&ms(/\/>/i,er)){wn(qn,Qe);continue}J&&Lk([g,M,_],wi=>{er=m1(er,wi," ")});const Eo=Je(Qe.nodeName);if(on(Eo,Kn,er)){if(le&&(Kn==="id"||Kn==="name")&&(wn(qn,Qe),er=se+er),W&&typeof k=="object"&&typeof k.getAttributeType=="function"&&!br)switch(k.getAttributeType(Eo,Kn)){case"TrustedHTML":{er=W.createHTML(er);break}case"TrustedScriptURL":{er=W.createScriptURL(er);break}}try{br?Qe.setAttributeNS(br,qn,er):Qe.setAttribute(qn,er),Cn(Qe)?$t(Qe):hq(t.removed)}catch{}}}Mt("afterSanitizeAttributes",Qe,null)},zn=function Qe(jt){let Gt=null;const ln=cn(jt);for(Mt("beforeSanitizeShadowDOM",jt,null);Gt=ln.nextNode();)Mt("uponSanitizeShadowNode",Gt,null),!Wt(Gt)&&(Gt.content instanceof i&&Qe(Gt.content),or(Gt));Mt("afterSanitizeShadowDOM",jt,null)};return t.sanitize=function(Qe){let jt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Gt=null,ln=null,lr=null,qn=null;if(Me=!Qe,Me&&(Qe="<!-->"),typeof Qe!="string"&&!Un(Qe))if(typeof Qe.toString=="function"){if(Qe=Qe.toString(),typeof Qe!="string")throw g1("dirty is not a string, aborting")}else throw g1("toString is not a function");if(!t.isSupported)return Qe;if(K||_t(jt),t.removed=[],typeof Qe=="string"&&(de=!1),de){if(Qe.nodeName){const Kn=Je(Qe.nodeName);if(!S[Kn]||m[Kn])throw g1("root node is forbidden and cannot be sanitized in-place")}}else if(Qe instanceof s)Gt=qt("<!---->"),ln=Gt.ownerDocument.importNode(Qe,!0),ln.nodeType===y1.element&&ln.nodeName==="BODY"||ln.nodeName==="HTML"?Gt=ln:Gt.appendChild(ln);else{if(!oe&&!J&&!Z&&Qe.indexOf("<")===-1)return W&&te?W.createHTML(Qe):Qe;if(Gt=qt(Qe),!Gt)return oe?null:te?A:""}Gt&&re&&$t(Gt.firstChild);const br=cn(de?Qe:Gt);for(;lr=br.nextNode();)Wt(lr)||(lr.content instanceof i&&zn(lr.content),or(lr));if(de)return Qe;if(oe){if(ee)for(qn=N.call(Gt.ownerDocument);Gt.firstChild;)qn.appendChild(Gt.firstChild);else qn=Gt;return(f.shadowroot||f.shadowrootmode)&&(qn=E.call(r,qn,!0)),qn}let un=Z?Gt.outerHTML:Gt.innerHTML;return Z&&S["!doctype"]&&Gt.ownerDocument&&Gt.ownerDocument.doctype&&Gt.ownerDocument.doctype.name&&ms(Hue,Gt.ownerDocument.doctype.name)&&(un="<!DOCTYPE "+Gt.ownerDocument.doctype.name+`>
|
1035
1035
|
`+un),J&&Lk([g,M,_],Kn=>{un=m1(un,Kn," ")}),W&&te?W.createHTML(un):un},t.setConfig=function(){let Qe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};_t(Qe),K=!0},t.clearConfig=function(){st=null,K=!1},t.isValidAttribute=function(Qe,jt,Gt){st||_t({});const ln=Je(Qe),lr=Je(jt);return on(ln,lr,Gt)},t.addHook=function(Qe,jt){typeof jt=="function"&&(x[Qe]=x[Qe]||[],f1(x[Qe],jt))},t.removeHook=function(Qe){if(x[Qe])return hq(x[Qe])},t.removeHooks=function(Qe){x[Qe]&&(x[Qe]=[])},t.removeAllHooks=function(){x={}},t}var ITt=Wue();function jTt(e){return e!==null&&typeof e=="object"&&typeof e.styleOptions=="object"&&typeof e.styleOptions.html=="string"&&typeof e.styleOptions.bgColor=="string"&&typeof e.styleOptions.vAlign=="string"}const zTt={"valign-top":"flex-start","valign-middle":"center","valign-bottom":"flex-end"},BTt=It("div",{target:"eryn7kb0",label:"TextWidgetSpaceAroundWrapper"})("padding:",e=>N6[Vh(e.styleOptions,"spaceAround",e.themeSettings.widget.spaceAround)]||"0px",";"),FTt=It("div",{target:"eryn7kb1",label:"TextWidgetContainer"})("background-color:",e=>e.styleOptions.bgColor,";display:flex;align-items:",e=>zTt[e.styleOptions.vAlign],";text-align:center;height:100%;width:100%;padding:10px;box-sizing:border-box;"),HTt=It("div",{target:"eryn7kb2",label:"InnerHtml"})("width:100%;"),$ue=mr({componentName:"TextWidget"})(e=>{const t=ITt.sanitize(e.styleOptions.html),{themeSettings:n}=mn();return ke(BTt,{themeSettings:n,styleOptions:e.styleOptions,children:ke(FTt,{styleOptions:e.styleOptions,children:ke(HTt,{dangerouslySetInnerHTML:{__html:t}})})})}),WTt=new Map,Uue=rr({plugins:WTt,registerPlugin:()=>{},getPlugin:()=>{}}),Yue=()=>Nn(Uue),$Tt=e=>{var t;const{t:n}=Fn(),{plugins:r}=Yue(),{app:o}=Er(),i=r.get(e.pluginType);if(!i)return ke(Eie,{error:n("plugins.registerPrompt",{pluginType:e.pluginType})});const a=(t=e.dataSource)!=null?t:o==null?void 0:o.defaultDataSource,s=ft(Ze({},e),{dataSource:a,dataOptions:e.dataOptions,styleOptions:e.styleOptions,filters:e.filters,highlights:e.highlights,description:e.description});return ke(Ag,{defaultSize:lA("line",{hasHeader:!0}),children:ke(EA,{title:e.title,description:e.description,styleOptions:e.styleOptions,dataSetName:a&&kd(a),children:i(s)})})},UTt=e=>Pt(Uz,{onBeforeMenuOpen:e.onBeforeMenuOpen,children:[toe(e)&&ke($Tt,Ze({},e)),PE(e)&&ke(gue,Ze({},e)),nz(e)&&ke($ue,Ze({},e)),kg(e)&&ke(W6,ft(Ze({},e),{highlightSelectionDisabled:!0}))]}),YTt=e=>ke(UTt,Ze({},e),e.id),uf="600px",WA="900px",GTt=It("div",{target:"ey54pln0",label:"GridContainer"})("display:grid;padding:",({padding:e})=>e,";grid-template-columns:",({widths:e})=>e.map(t=>`${t}%`).join(" "),";@container content-panel-container (max-width:",uf,"){grid-template-columns:repeat(1,1fr);}@container content-panel-container ((min-width:",uf,") and (max-width:",WA,")){grid-template-columns:",({widths:e})=>e.length>1?"repeat(2, 1fr)":"repeat(1, 1fr)",";}"),VTt=It("div",{target:"ey54pln1",label:"Column"})("container-name:content-panel-column;container-type:",({responsive:e})=>e?"inline-size":"unset",";&:not(:first-of-type){border-left:",({dividerWidth:e,dividerColor:t})=>Om(t,e),";}@container content-panel-container ((min-width:",uf,") and (max-width:",WA,")){&:last-of-type{grid-column-end:",({colWidths:e})=>e.length%2===0?"span 1":"span 2",";}}@container content-panel-container (max-width:",uf,"){&:not(:first-of-type){border-left:none;}}"),qTt=It("div",{target:"ey54pln2",label:"Row"})("display:grid;grid-template-columns:",({widths:e})=>e.map(t=>`${t}%`).join(" "),";@container content-panel-column (max-width:",uf,"){grid-template-columns:repeat(1,1fr);}@container content-panel-column ((min-width:",uf,") and (max-width:",WA,")){grid-template-columns:",({widths:e})=>e.length===1?"repeat(1, 1fr)":"repeat(2, 1fr)",";}"),XTt=It("div",{target:"ey54pln3",label:"Subcell"})("border-bottom:",({dividerWidth:e,dividerColor:t})=>Om(t,e),";&:not(:first-of-type){border-left:",({dividerWidth:e,dividerColor:t})=>Om(t,e),";}height:",({height:e})=>NE(e)?"auto":Number.isInteger(e)?`calc(${e}px + 32px)`:`calc(${e} + 32px)`,";@container ((min-width:",uf,") and (max-width:",WA,")){&:last-of-type{grid-column-end:",({rowWidths:e})=>e.length%2===0?"span 1":"span 2",";}}@container (max-width:",uf,"){&:not(:first-of-type){border-left:none;}}"),ZTt=({layout:e,responsive:t,widgets:n})=>{const{themeSettings:r}=mn(),o=bt(()=>e??due(n),[e,n]),i=N6[r.widget.spaceAround]||"0px";xt(()=>{window.dispatchEvent(new Event("resize"))},[t]);const a=o.columns.map(s=>s.widthPercentage);return ke(GTt,{padding:i,widths:a,children:o.columns.map((s,l)=>{var c;return ke(VTt,{colWidths:a,responsive:t,dividerWidth:r.dashboard.dividerLineWidth,dividerColor:r.dashboard.dividerLineColor,children:(c=s.rows)==null?void 0:c.map((d,p)=>{const u=d.cells.map(k=>k.widthPercentage);return ke(qTt,{widths:u,children:d.cells.map(k=>{var v;const h=n.find(C=>C.id===k.widgetId);return(h==null?void 0:h.widgetType)==="pivot"&&k.height&&(v=h==null?void 0:h.styleOptions)!=null&&v.isAutoHeight&&(h.styleOptions.isAutoHeight=!1),ke(XTt,{responsive:t,rowWidths:u,height:k.height,dividerWidth:r.dashboard.dividerLineWidth,dividerColor:r.dashboard.dividerLineColor,children:h&&ke(YTt,Ze({},h))},`${k.widgetId},${k.widthPercentage}`)})},`${l},${p}`)})},l)})})},NC="#d5d5d5",LC=1,Gue={filtersPanel:{visible:!0,collapsedInitially:!1,persistCollapsedStateToLocalStorage:!1,actions:{addFilter:{enabled:!1,multiSelect:{visible:!0}},editFilter:{enabled:!1,multiSelect:{visible:!0}},deleteFilter:{enabled:!1}}},toolbar:{visible:!0},widgetsPanel:{responsive:!1}},xq=ft(Ze({},Gue),{persist:!1}),Vue=48,KTt=It("div",{target:"e14fvu5w0",label:"DashboardHeaderContainer"})("height:",Vue,"px;font-family:",({font:e})=>e,";background-color:",({background:e})=>e,";color:",({color:e})=>e,";border-bottom:",Om(NC,LC),";padding:10px 20px;display:flex;align-items:center;box-sizing:border-box;"),QTt=It("div",{target:"e14fvu5w1",label:"DashboardHeaderTitle"})("font-size:13px;font-weight:700;"),JTt=({title:e})=>{const{themeSettings:t}=mn();return ke(KTt,{font:t.typography.fontFamily,color:t.typography.primaryTextColor,background:t.general.backgroundColor,children:ke(QTt,{children:e})})},que=Kt((e,t)=>ke("button",ft(Ze({},e),{ref:t,className:"csdk-rounded disabled:csdk-cursor-not-allowed csdk-leading-[18px] csdk-text-[13px] csdk-py-[5px] csdk-px-[8px] csdk-text-text-content disabled:csdk-opacity-30 "+(e.className||""),children:e.children}))),eEt=e=>{const t=e,{tooltipTitle:n,disableTooltip:r,children:o,disabled:i}=t,a=no(t,["tooltipTitle","disableTooltip","children","disabled"]);return ke(lf,{title:n,disableHoverListener:r,children:ke("span",{children:ke(que,ft(Ze({disabled:i,style:i?ft(Ze({},a.style||{}),{pointerEvents:"none"}):a.style},a),{children:o}))})})},$A=e=>{const t=e,{wrapperClassName:n,label:r,isLabelInactive:o,indeterminate:i,className:a,labelProps:s}=t,l=no(t,["wrapperClassName","label","isLabelInactive","indeterminate","className","labelProps"]),c=["csdk-border-l","csdk-pl-3"],d=pt(null);return xt(()=>{d.current&&(d.current.indeterminate=i??!1)},[d,i]),o&&c.push("csdk-opacity-50"),Pt("label",ft(Ze({},s),{className:sf("csdk-my-[2px] csdk-flex csdk-items-center csdk-leading-4 csdk-text-[13px]",n,{"csdk-cursor-pointer":!e.disabled},a,s==null?void 0:s.className),children:[ke("input",ft(Ze({},l),{ref:d,type:"checkbox",className:sf("csdk-accent-UI-default csdk-h-checkbox csdk-w-checkbox csdk-m-checkbox",{"csdk-cursor-pointer":!e.disabled})})),r&&ke("span",{className:c.join(" "),children:r})]}))},tEt=It("input",{target:"e1y9klst0",label:"StyledBasicInput"})("box-sizing:border-box;height:100%;border-width:1px;border-style:solid;background-color:transparent;font-size:13px;color:inherit;padding:0 8px;border-radius:0;transition:border-color 250ms;border-color:#e6e6e6;width:100%;height:24px;box-sizing:border-box;&:disabled{cursor:not-allowed;}&:invalid{border-color:#fb7570;}&::placeholder{color:inherit;opacity:0.75;}&:focus{outline:none;border-color:inherit;}&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}"),nEt=It("div",{target:"e1y9klst1",label:"ArrowsContainer"})("border:1px solid #e6e6e6;border-left:none;display:flex;flex-direction:column;width:14px;height:24px;box-sizing:border-box;"),wq=It("button",{target:"e1y9klst2",label:"ButtonWithIcon"})("height:12px;width:14px;position:relative;overflow:hidden;padding:0;margin:0;border:none;background-color:transparent;cursor:pointer;svg{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);margin-left:-0.5px;}"),fw=e=>{var t;const n=e,{callback:r,className:o,type:i="text",value:a,disabled:s,containerStyle:l,labelStyle:c,inputStyle:d}=n,p=no(n,["callback","className","type","value","disabled","containerStyle","labelStyle","inputStyle"]),[u,k]=ut((t=a==null?void 0:a.toString())!=null?t:""),v=lc(),{themeSettings:h}=mn(),C=ct((R,H)=>{const U=H==="increment"?parseFloat(R)+1:parseFloat(R)-1;Lp(U)&&(r(U.toString()),k(U.toString()))},[r,k]);return Pt("div",{className:"csdk-flex csdk-items-center csdk-gap-x-2",style:l,children:[e.label&&ke("label",{style:c,className:"csdk-min-w-fit",htmlFor:e.id,children:e.label}),Pt("div",{className:"csdk-h-full csdk-w-[100%] csdk-flex csdk-justify-end",children:[ke(tEt,ft(Ze({},p),{type:i,style:d,ref:v,className:["csdk-border-UI-default",o].join(" "),value:u,onChange:R=>{r(R.target.value),k(R.target.value)},disabled:s})),i==="number"&&Pt(nEt,{children:[ke(wq,{onClick:()=>C(u,"increment"),children:ke("svg",{className:"csdk-mt-[2px]",width:24,height:24,viewBox:"0 0 24 24",children:ke("path",{fill:h.typography.primaryTextColor,d:"M12 10.16l-3.174 2.719a.5.5 0 0 1-.65-.76l3.5-2.998a.5.5 0 0 1 .65 0l3.5 2.998a.5.5 0 1 1-.65.76L12 10.159z"})})}),ke(wq,{onClick:()=>C(u,"decrement"),children:ke("svg",{className:"csdk-mt-[-2px]",width:24,height:24,viewBox:"0 0 24 24",children:ke("path",{fill:h.typography.primaryTextColor,d:"M12 13.84l3.174-2.719a.5.5 0 0 1 .65.76l-3.5 2.998a.5.5 0 0 1-.65 0l-3.5-2.998a.5.5 0 1 1 .65-.76L12 13.841z"})})})]})]})]})},Xue=e=>ke("svg",ft(Ze({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{children:ke("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 15C7.23858 15 5 12.7614 5 10C5 7.23858 7.23858 5 10 5C12.7614 5 15 7.23858 15 10C15 11.2006 14.5768 12.3024 13.8715 13.1644L18.8536 18.1464C19.0488 18.3417 19.0488 18.6583 18.8536 18.8536C18.6583 19.0488 18.3417 19.0488 18.1464 18.8536L13.1644 13.8715C12.3024 14.5768 11.2006 15 10 15ZM10 14C12.2091 14 14 12.2091 14 10C14 7.79086 12.2091 6 10 6C7.79086 6 6 7.79086 6 10C6 12.2091 7.79086 14 10 14Z",fill:"#262E3D",fillOpacity:"0.67"})})),rEt=e=>Pt("label",{children:[ke("input",ft(Ze({},e),{className:"csdk-accent-UI-default csdk-text-UI-default csdk-w-radio csdk-h-radio csdk-m-radio "+e.className,type:"radio"})),e.label]}),oEt=It("div",{target:"e15tkvqq0",label:"StyledDiv"})({"::-webkit-scrollbar":{width:"8px",height:"8px"},"::-webkit-scrollbar-track":{backgroundColor:"transparent"},"::-webkit-scrollbar-thumb":{backgroundColor:"#c2c2c2",borderRadius:"4px",border:"1px solid transparent",backgroundClip:"content-box",minHeight:"20px",minWidth:"20px"},"::-webkit-scrollbar-thumb:hover":{backgroundColor:"#7d7d7d",border:"none"}}),iEt=e=>{var t=e,{items:n,currentSelection:r,title:o,className:i}=t,a=no(t,["items","currentSelection","title","className"]);return Pt(oEt,{className:i,children:[ke("div",{className:"csdk-ml-1.5",children:o}),n.map((s,l)=>ke(rEt,Ze({value:s,label:s,checked:s===r},a),l))]})},Zue=rr(void 0);process.env.NODE_ENV!=="production"&&(Zue.displayName="FormControlContext");function aEt(){return Nn(Zue)}function sEt(e){return Br("PrivateSwitchBase",e)}Fr("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const lEt=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],cEt=e=>{const{classes:t,checked:n,disabled:r,edge:o}=e,i={root:["root",n&&"checked",r&&"disabled",o&&`edge${Zn(o)}`],input:["input"]};return oo(i,sEt,t)},uEt=Dn(Gp)(({ownerState:e})=>it({padding:9,borderRadius:"50%"},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12})),dEt=Dn("input",{shouldForwardProp:Cf})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),lB=Kt(function(e,t){const{autoFocus:n,checked:r,checkedIcon:o,className:i,defaultChecked:a,disabled:s,disableFocusRipple:l=!1,edge:c=!1,icon:d,id:p,inputProps:u,inputRef:k,name:v,onBlur:h,onChange:C,onFocus:R,readOnly:H,required:U=!1,tabIndex:W,type:A,value:D}=e,z=Ln(e,lEt),[N,B]=Bz({controlled:r,default:!!a,name:"SwitchBase",state:"checked"}),E=aEt(),x=F=>{R&&R(F),E&&E.onFocus&&E.onFocus(F)},g=F=>{h&&h(F),E&&E.onBlur&&E.onBlur(F)},M=F=>{if(F.nativeEvent.defaultPrevented)return;const O=F.target.checked;B(O),C&&C(F,O)};let _=s;E&&typeof _>"u"&&(_=E.disabled);const T=A==="checkbox"||A==="radio",Y=it({},e,{checked:N,disabled:_,disableFocusRipple:l,edge:c}),V=cEt(Y);return je(uEt,it({component:"span",className:bn(V.root,i),centerRipple:!0,focusRipple:!l,disabled:_,tabIndex:null,role:void 0,onFocus:x,onBlur:g,ownerState:Y,ref:t},z,{children:[je(dEt,it({autoFocus:n,checked:r,defaultChecked:a,className:V.input,disabled:_,id:T?p:void 0,name:v,onChange:M,readOnly:H,ref:k,required:U,ownerState:Y,tabIndex:W,type:A},A==="checkbox"&&D===void 0?{}:{value:D},u)),N?o:d]}))});process.env.NODE_ENV!=="production"&&(lB.propTypes={autoFocus:fe.bool,checked:fe.bool,checkedIcon:fe.node.isRequired,classes:fe.object,className:fe.string,defaultChecked:fe.bool,disabled:fe.bool,disableFocusRipple:fe.bool,edge:fe.oneOf(["end","start",!1]),icon:fe.node.isRequired,id:fe.string,inputProps:fe.object,inputRef:Tg,name:fe.string,onBlur:fe.func,onChange:fe.func,onFocus:fe.func,readOnly:fe.bool,required:fe.bool,sx:fe.object,tabIndex:fe.oneOfType([fe.number,fe.string]),type:fe.string.isRequired,value:fe.any});function pEt(e){return Br("MuiSwitch",e)}const vs=Fr("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),hEt=["className","color","edge","size","sx"],fEt=e=>{const{classes:t,edge:n,size:r,color:o,checked:i,disabled:a}=e,s={root:["root",n&&`edge${Zn(n)}`,`size${Zn(r)}`],switchBase:["switchBase",`color${Zn(o)}`,i&&"checked",a&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},l=oo(s,pEt,t);return it({},t,l)},mEt=Dn("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t[`edge${Zn(n.edge)}`],t[`size${Zn(n.size)}`]]}})({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${vs.thumb}`]:{width:16,height:16},[`& .${vs.switchBase}`]:{padding:4,[`&.${vs.checked}`]:{transform:"translateX(16px)"}}}}]}),gEt=Dn(lB,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${vs.input}`]:t.input},n.color!=="default"&&t[`color${Zn(n.color)}`]]}})(({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${e.palette.mode==="light"?e.palette.common.white:e.palette.grey[300]}`,transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${vs.checked}`]:{transform:"translateX(20px)"},[`&.${vs.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${vs.checked} + .${vs.track}`]:{opacity:.5},[`&.${vs.disabled} + .${vs.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode==="light"?.12:.2}`},[`& .${vs.input}`]:{left:"-100%",width:"300%"}}),({theme:e})=>({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:zr(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(e.palette).filter(([,t])=>t.main&&t.light).map(([t])=>({props:{color:t},style:{[`&.${vs.checked}`]:{color:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:zr(e.palette[t].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${vs.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t}DisabledColor`]:`${e.palette.mode==="light"?eae(e.palette[t].main,.62):Jie(e.palette[t].main,.55)}`}},[`&.${vs.checked} + .${vs.track}`]:{backgroundColor:(e.vars||e).palette[t].main}}}))]})),vEt=Dn("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.vars?e.vars.palette.common.onBackground:`${e.palette.mode==="light"?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:`${e.palette.mode==="light"?.38:.3}`})),yEt=Dn("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),Kue=Kt(function(e,t){const n=Vr({props:e,name:"MuiSwitch"}),{className:r,color:o="primary",edge:i=!1,size:a="medium",sx:s}=n,l=Ln(n,hEt),c=it({},n,{color:o,edge:i,size:a}),d=fEt(c),p=je(yEt,{className:d.thumb,ownerState:c});return je(mEt,{className:bn(d.root,r),sx:s,ownerState:c,children:[je(gEt,it({type:"checkbox",icon:p,checkedIcon:p,ref:t,ownerState:c},l,{classes:it({},d,{root:d.switchBase})})),je(vEt,{className:d.track,ownerState:c})]})});process.env.NODE_ENV!=="production"&&(Kue.propTypes={checked:fe.bool,checkedIcon:fe.node,classes:fe.object,className:fe.string,color:fe.oneOfType([fe.oneOf(["default","primary","secondary","error","info","success","warning"]),fe.string]),defaultChecked:fe.bool,disabled:fe.bool,disableRipple:fe.bool,edge:fe.oneOf(["end","start",!1]),icon:fe.node,id:fe.string,inputProps:fe.object,inputRef:Tg,onChange:fe.func,required:fe.bool,size:fe.oneOfType([fe.oneOf(["medium","small"]),fe.string]),sx:fe.oneOfType([fe.arrayOf(fe.oneOfType([fe.func,fe.object,fe.bool])),fe.func,fe.object]),value:fe.any});const Que=It(Kue,{target:"e151xo3r0",label:"SisenseSwitchButton"})(({theme:e})=>{var t;return{height:"23px",width:"33px","& .MuiSwitch-switchBase":{transform:"translateX(1px)",top:"2px",transition:"all .3s ease","&.Mui-checked":{color:"#fff",transform:"translateX(13px)","& + .MuiSwitch-track":{opacity:1,backgroundColor:(t=e.general.brandColor)!=null?t:"#FFC805"},"&:hover":{background:"transparent"}},"&:hover":{background:"transparent"}},"&:hover":{"& .MuiSwitch-thumb":{transform:"scale(1.2)"}},"& .MuiSwitch-thumb":{backgroundColor:"#fff",width:11,height:11,border:"1px solid #c4c8cd",boxShadow:"none",transition:"all .3s ease",boxSizing:"border-box"},"& .MuiSwitch-track":{opacity:1,height:"9px",width:"19px",backgroundColor:"#6e737d",borderRadius:9},"&:focus-visible, & .Mui-focusVisible":{outline:"-webkit-focus-ring-color auto 1px"}}}),Jue=()=>{const{themeSettings:e}=mn(),{backgroundColor:t}=e.general,n=za(t,Lre);return ke("div",{className:"csdk-flex csdk-justify-center","data-testid":"triangle-indicator",children:ke("div",{style:{borderTopColor:n},className:"csdk-border-l-[70px] csdk-border-l-[transparent] csdk-border-r-[70px] csdk-border-r-[transparent] csdk-border-t-[13px]"})})},bEt=e=>{const t=e,{color:n=ma}=t,r=no(t,["color"]);return ke("svg",ft(Ze({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),{children:ke("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 18.808L20 8.80798L15.0995 4L5 13.808V18.7949L10 18.808ZM6 14.2308L12.8609 7.56797L16.3433 11.0504L9.58687 17.8069L6 17.7975V14.2308ZM15.0959 5.39742L13.5783 6.87121L17.0504 10.3433L18.579 8.81475L15.0959 5.39742ZM13.499 10.4355L9.64164 14.2398L8.93945 13.5278L12.7968 9.72353L13.499 10.4355Z",fill:n})}))},xEt=e=>Pt("svg",ft(Ze({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{children:[ke("path",{d:"M10 10.5V15.5C10 15.7761 10.2239 16 10.5 16C10.7761 16 11 15.7761 11 15.5V10.5C11 10.2239 10.7761 10 10.5 10C10.2239 10 10 10.2239 10 10.5Z",fill:e.fill||ma}),ke("path",{d:"M13 15.5V10.5C13 10.2239 13.2239 10 13.5 10C13.7761 10 14 10.2239 14 10.5V15.5C14 15.7761 13.7761 16 13.5 16C13.2239 16 13 15.7761 13 15.5Z",fill:e.fill||ma}),ke("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13 5H11C9.89543 5 9 5.89543 9 7H6.5C6.22386 7 6 7.22386 6 7.5C6 7.77614 6.22386 8 6.5 8H7V16.5C7 17.8807 8.11929 19 9.5 19H14.5C15.8807 19 17 17.8807 17 16.5V8H17.5C17.7761 8 18 7.77614 18 7.5C18 7.22386 17.7761 7 17.5 7H15C15 5.89543 14.1046 5 13 5ZM8 8V16.5C8 17.3284 8.67157 18 9.5 18H14.5C15.3284 18 16 17.3284 16 16.5V8H8ZM14 7H10C10 6.44772 10.4477 6 11 6H13C13.5523 6 14 6.44772 14 7Z",fill:e.fill||ma})]})),wEt=e=>ke("svg",ft(Ze({width:"22",height:"22",viewBox:"0 0 22 22",fill:"#b4b4b4",xmlns:"http://www.w3.org/2000/svg"},e),{children:Pt("g",{transform:"translate(5.000000,5.000000) scale(.70, 0.6)",children:[ke("path",{d:"m3,9v11h14V9M4,9V6c0-3.3 2.7-6 6-6c3.3,0 6,2.7 6,6v3H14V6c0-2.2-1.8-4-4-4-2.2,0-4,1.8-4,4v3"}),ke("rect",{y:"10",x:"4",width:"12",height:"9",fill:"#dcdcdc"})]})})),ede=e=>{const t=e.width||"24",n=e.height||"24";return ke("svg",{viewBox:`0 0 ${t} ${n}`,fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e.className,style:e.style,width:t,height:n,children:ke("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 5V3.5C9 3.22386 9.22386 3 9.5 3C9.77614 3 10 3.22386 10 3.5V5H13V3.5C13 3.22386 13.2239 3 13.5 3C13.7761 3 14 3.22386 14 3.5V5H17C18.1046 5 19 5.89543 19 7V8V9V17C19 18.1046 18.1046 19 17 19H6C4.89543 19 4 18.1046 4 17V9V8V7C4 5.89543 4.89543 5 6 5H9ZM10 6H13V6.5C13 6.77614 13.2239 7 13.5 7C13.7761 7 14 6.77614 14 6.5V6H17C17.5523 6 18 6.44772 18 7V8H5V7C5 6.44772 5.44772 6 6 6H9V6.5C9 6.77614 9.22386 7 9.5 7C9.77614 7 10 6.77614 10 6.5V6ZM5 17V9H18V17C18 17.5523 17.5523 18 17 18H6C5.44772 18 5 17.5523 5 17ZM14.5 12H8.5C8.22386 12 8 11.7761 8 11.5C8 11.2239 8.22386 11 8.5 11H14.5C14.7761 11 15 11.2239 15 11.5C15 11.7761 14.7761 12 14.5 12ZM8.5 14H14.5C14.7761 14 15 13.7761 15 13.5C15 13.2239 14.7761 13 14.5 13H8.5C8.22386 13 8 13.2239 8 13.5C8 13.7761 8.22386 14 8.5 14ZM14.5 16H8.5C8.22386 16 8 15.7761 8 15.5C8 15.2239 8.22386 15 8.5 15H14.5C14.7761 15 15 15.2239 15 15.5C15 15.7761 14.7761 16 14.5 16Z",fill:e.iconColor||ma})})},UA=e=>{var t;return ke("svg",ft(Ze({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},e),{children:ke("path",{fill:(t=e.fill)!=null?t:"#000",fillRule:"nonzero",d:"M7.589 10L7 10.777 11.99 15 17 10.777 16.413 10l-4.422 3.727z"})}))},_Et=e=>ke("svg",ft(Ze({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{children:ke("path",{fill:"currentColor",d:"M18.5 8.228L13 10.343v6.894l5.5-2.39v-6.62zm-.893-.728l-5.113-1.967-5.297 1.892 5.303 2.04L17.607 7.5zM6 8.036v6.8l6 2.423v-6.916L6 8.036zm-1-.888l7.506-2.681 6.994 2.69v8.345l-6.993 3.04L5 15.512V7.147z"})})),SEt=e=>ke("svg",ft(Ze({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{children:ke("path",{fill:e.color,d:"M8.354 11.646l-.708.708 3.418 3.417 5.343-7.48-.814-.582-4.657 6.52z"})})),kEt=e=>{var t;return ke("svg",ft(Ze({width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),{children:ke("path",{fill:(t=e.color)!=null?t:"#5B6372",d:"M9 11h7v1H9v-1zm0 2h7v1H9v-1z"})}))},CEt=e=>{var t;return ke("svg",ft(Ze({width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),{children:ke("path",{fill:(t=e.color)!=null?t:"#5B6372",d:"M11.715 12l.488-1H9v-1h3.69l.989-2.025.898.438L13.804 10H16v1h-2.684l-.488 1H16v1h-3.66l-1.035 2.124-.9-.439.823-1.685H9v-1h2.715z"})}))},MEt=e=>{var t;return ke("svg",ft(Ze({width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),{children:ke("path",{fill:(t=e.color)!=null?t:"#5B6372",d:"M16.242 15.066l-.456.89L9 12.476 15.85 9l.452.892L11.2 12.48z"})}))},TEt=e=>{var t;return ke("svg",ft(Ze({width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),{children:ke("path",{fill:(t=e.color)!=null?t:"#5B6372",d:"M9 17h7v1H9v-1zm6.942-2.934l-.437.89L9 11.476 15.566 8l.434.892-4.89 2.589 4.832 2.585z"})}))},EEt=e=>{var t;return ke("svg",ft(Ze({width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),{children:ke("path",{fill:(t=e.color)!=null?t:"#5B6372",d:"M8.06 9.89L8.517 9l6.785 3.48-6.85 3.476L8 15.065l5.102-2.59z"})}))},AEt=e=>{var t;return ke("svg",ft(Ze({width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),{children:ke("path",{fill:(t=e.color)!=null?t:"#5B6372",d:"M9.06 8.89L9.517 8l6.785 3.48-6.85 3.476L9 14.065l5.102-2.59L9.06 8.89zM9 17h7v1H9v-1z"})}))},RC=e=>e==="white",_q="rgb(240, 240, 240)",OEt="rgba(0, 0, 0, 0.26)",PEt=It("button",{target:"e1pmmnp20",label:"CalendarButton"})("cursor:pointer;background-color:",({theme:e,variant:t,disabled:n})=>n?_q:RC(t)?e.general.backgroundColor:Vx,";border:",({variant:e})=>RC(e)?"1px solid rgb(110 115 125 / var(--tw-border-opacity))":"none",";color:",({theme:e,isActive:t,disabled:n})=>n?OEt:t?e.general.primaryButtonTextColor:e.typography.primaryTextColor,";border-radius:0.375rem;&:hover{background-color:",({theme:e,variant:t,disabled:n})=>n?_q:za(RC(t)?e.general.backgroundColor:Vx),";transition:0.2s;}transition:color 250ms;"),DEt=It("label",{target:"e1pmmnp21",label:"CalendarLabel"})("color:",({theme:e,variant:t})=>RC(t)?e.typography.primaryTextColor:e.general.primaryButtonTextColor,";"),UR=e=>{const{variant:t="grey",label:n,isActive:r,theme:o}=e,i=`csdk-text-left csdk-w-[152px] csdk-bg-[${Vx}] csdk-text-[13px] csdk-outline-0 csdk-border csdk-border-transparent csdk-p-input csdk-h-6 csdk-rounded-[4px] `;return Pt("div",{className:"csdk-relative csdk-flex csdk-mr-[5px] csdk-cursor-pointer","aria-label":"DateRangeField",children:[n&&ke(DEt,{htmlFor:e.id,className:"csdk-my-[5px] csdk-mr-[7px] csdk-text-[13px] csdk-leading-[18px]",theme:o,variant:t,children:n}),ke("div",{className:"csdk-relative csdk-h-6",children:Pt(PEt,ft(Ze({},e),{variant:t,"aria-label":"DateRangeFieldButton",className:i+"disabled:csdk-placeholder:csdk-opacity-30 disabled:csdk-cursor-not-allowed focus:csdk-border-solid focus:csdk-border-input focus:csdk-border-UI-default hover:csdk-border-guiding csdk-text-text-active csdk-pl-2.5 csdk-pr-10 csdk-overflow-hidden "+(e.className||""),children:[e.value,ke("div",{"aria-label":"DateRangeFieldIcon",className:"csdk-absolute csdk-right-[4px] csdk-top-1/2 csdk-transform -csdk-translate-y-1/2",children:ke(ede,{className:"csdk-flex csdk-text-text-active","aria-hidden":"true",iconColor:r?o.general.primaryButtonTextColor:o.typography.primaryTextColor})})]}))})]})};function Sq(e){return e.substring(2).toLowerCase()}function NEt(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}function df(e){const{children:t,disableReactTree:n=!1,mouseEvent:r="onClick",onClickAway:o,touchEvent:i="onTouchEnd"}=e,a=pt(!1),s=pt(null),l=pt(!1),c=pt(!1);xt(()=>(setTimeout(()=>{l.current=!0},0),()=>{l.current=!1}),[]);const d=ya(t.ref,s),p=mp(v=>{const h=c.current;c.current=!1;const C=La(s.current);if(!l.current||!s.current||"clientX"in v&&NEt(v,C))return;if(a.current){a.current=!1;return}let R;v.composedPath?R=v.composedPath().indexOf(s.current)>-1:R=!C.documentElement.contains(v.target)||s.current.contains(v.target),!R&&(n||!h)&&o(v)}),u=v=>h=>{c.current=!0;const C=t.props[v];C&&C(h)},k={ref:d};return i!==!1&&(k[i]=u(i)),xt(()=>{if(i!==!1){const v=Sq(i),h=La(s.current),C=()=>{a.current=!0};return h.addEventListener(v,p),h.addEventListener("touchmove",C),()=>{h.removeEventListener(v,p),h.removeEventListener("touchmove",C)}}},[p,i]),r!==!1&&(k[r]=u(r)),xt(()=>{if(r!==!1){const v=Sq(r),h=La(s.current);return h.addEventListener(v,p),()=>{h.removeEventListener(v,p)}}},[p,r]),je(Tr,{children:fr(t,k)})}process.env.NODE_ENV!=="production"&&(df.propTypes={children:Eg.isRequired,disableReactTree:fe.bool,mouseEvent:fe.oneOf(["onClick","onMouseDown","onMouseUp","onPointerDown","onPointerUp",!1]),onClickAway:fe.func.isRequired,touchEvent:fe.oneOf(["onTouchEnd","onTouchStart",!1])});process.env.NODE_ENV!=="production"&&(df.propTypes=zz(df.propTypes));const YR=e=>{var t,n;const[r,o]=ut(!1),{themeSettings:i}=mn(),a=()=>{o(!r)},s=pt(null),l=(t=e.selectedIdx)!=null?t:null,c={fontFamily:i.typography.fontFamily,fontWeight:400,textTransform:"none",fontSize:"13px",color:i.typography.primaryTextColor},d=e.elements.map((p,u)=>ke(S_,{onClick:()=>{o(!1)},sx:ft(Ze({},c),{minHeight:"unset","&:hover":{backgroundColor:za(i.general.backgroundColor)}}),disabled:e.disabled,children:p},u));return Pt(yr,{children:[ke(cf,{ref:s,onClick:a,className:"csdk-h-full csdk-border-solid csdk-border-input csdk-box-border",sx:ft(Ze({},c),{border:"1px solid rgb(110 115 125 / var(--tw-border-opacity))",marginLeft:"5px",marginRight:"5px",borderRadius:"0.375rem",verticalAlign:"unset","&:hover":{backgroundColor:za(i.general.backgroundColor)}}),disabled:e.disabled,children:((n=e.icon)!=null?n:l!==null)?e.elements[l??0]:ke("div",{children:"Select..."})}),ke(Ng,{open:r,anchorEl:s.current,placement:"bottom-start",sx:{backgroundColor:i.general.backgroundColor,border:"1px solid #c4c8cd",borderRadius:"4px",boxShadow:"0px 2px 2px rgba(0, 0, 0, 0.25)"},children:ke(df,{onClickAway:()=>o(!1),children:ke(Rz,{autoFocusItem:r,children:d})})})]})},Xy=It("div",{target:"e1f1pk9t0",label:"FilterContentDisplay"})("padding:12px;font-size:13px;"),_p=e=>e==="vertical",LEt=It("div",{target:"e1jswn0s0",label:"BackgroundFilterIcon"})(`background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDE0IDc5LjE1Njc5NywgMjAxNC8wOC8yMC0wOTo1MzowMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDpkZmY0YWNkMy1lYWYxLTQwNzItYTdlMy1hMjk3YzZjZTFlODUiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QTBFNDE0ODgwMjBFMTFFNThCQzJGRjdDRkI3RTQ1RUMiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODRDMjI3QTIwMUU4MTFFNThCQzJGRjdDRkI3RTQ1RUMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpkZmY0YWNkMy1lYWYxLTQwNzItYTdlMy1hMjk3YzZjZTFlODUiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6ZGZmNGFjZDMtZWFmMS00MDcyLWE3ZTMtYTI5N2M2Y2UxZTg1Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+caeyqgAAAIdJREFUeNpi/P
|
1036
1036
|
center center no-repeat;float:left;margin:4px 0 0 0;width:16px;height:16px;display:inline-block;`),cB="1px solid #dadada",kq=215,REt=It("div",{target:"e1grm6eo0",label:"BaseContainer"})("width:min-content;max-width:100%;align-self:flex-start;box-sizing:border-box;",({shouldShowBorder:e})=>e&&Ql`
|
1037
1037
|
border: ${cB};
|