@sisense/sdk-ui 2.3.0 → 2.3.1

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.
@@ -1,4 +1,4 @@
1
- "use strict";var O1=Object.defineProperty,k1=Object.defineProperties;var A1=Object.getOwnPropertyDescriptors;var ui=Object.getOwnPropertySymbols;var ed=Object.prototype.hasOwnProperty,td=Object.prototype.propertyIsEnumerable;var Bt=Math.pow,xs=(e,t,r)=>t in e?O1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,w=(e,t)=>{for(var r in t||(t={}))ed.call(t,r)&&xs(e,r,t[r]);if(ui)for(var r of ui(t))td.call(t,r)&&xs(e,r,t[r]);return e},L=(e,t)=>k1(e,A1(t));var di=e=>typeof e=="symbol"?e:e+"",te=(e,t)=>{var r={};for(var n in e)ed.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ui)for(var n of ui(e))t.indexOf(n)<0&&td.call(e,n)&&(r[n]=e[n]);return r};var Vn=(e,t,r)=>(xs(e,typeof t!="symbol"?t+"":t,r),r);var _t=(e,t,r)=>new Promise((n,o)=>{var i=l=>{try{s(r.next(l))}catch(c){o(c)}},a=l=>{try{s(r.throw(l))}catch(c){o(c)}},s=l=>l.done?n(l.value):Promise.resolve(l.value).then(i,a);s((r=r.apply(e,t)).next())});const f=require("./derive-chart-family-DeTlU_Wm.cjs"),S=require("react"),Z=require("react/jsx-runtime"),bt=require("react-dom");function Mh(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const N=Mh(S),I1=Mh(bt);function P1(e){let{i18n:t,defaultNS:r,children:n}=e;const o=S.useMemo(()=>({i18n:t,defaultNS:r}),[t,r]);return S.createElement(f.I18nContext.Provider,{value:o},n)}function yr(e){return e===void 0||typeof e=="string"||"title"in e&&"type"in e}const ut={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 Tc(e){return[f.customFormula(ut.BOX_MIN_VALUE_NAME,"QUARTILE([Attr], 1)",{Attr:e}),f.customFormula(ut.BOX_MEDIAN_VALUE_NAME,"MEDIAN([Attr])",{Attr:e}),f.customFormula(ut.BOX_MAX_VALUE_NAME,"QUARTILE([Attr], 3)",{Attr:e})]}function D1(e){return[...Tc(e),f.customFormula(ut.WHISKER_MIN_VALUE_NAME,"LOWERWHISKERMAX_IQR([Attr])",{Attr:e}),f.customFormula(ut.WHISKER_MAX_VALUE_NAME,"UPPERWHISKERMIN_IQR([Attr])",{Attr:e}),f.customFormula(ut.OUTLIER_COUNT_VALUE_NAME,"OUTLIERSCOUNT_IQR([Attr])",{Attr:e})]}function $1(e){return[...Tc(e),f.customFormula(ut.WHISKER_MIN_VALUE_NAME,"MIN([Attr])",{Attr:e}),f.customFormula(ut.WHISKER_MAX_VALUE_NAME,"MAX([Attr])",{Attr:e})]}function N1(e){return[...Tc(e),f.customFormula(ut.WHISKER_MIN_VALUE_NAME,"LOWERWHISKERMAX_STDEVP([Attr])",{Attr:e}),f.customFormula(ut.WHISKER_MAX_VALUE_NAME,"UPPERWHISKERMIN_STDEVP([Attr])",{Attr:e}),f.customFormula(ut.OUTLIER_COUNT_VALUE_NAME,"OUTLIERSCOUNT_STDEVP([Attr])",{Attr:e})]}const L1=f.withComposeCodeForAnalytics(e=>{const t=f.cloneDeep(e),r=f.customFormula(ut.OUTLIER_MAX_VALUE_NAME,"(UPPERWHISKERMIN_IQR([Attr]), all([Attr]))",{Attr:e}),n=f.customFormula(ut.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:r.jaql(!0)},{toNotEqual:n.jaql(!0)}]}});return o?i:{jaql:i}},t},"boxWhiskerIqrOutliers"),F1=f.withComposeCodeForAnalytics(e=>{const t=f.cloneDeep(e),r=f.customFormula(ut.OUTLIER_MAX_VALUE_NAME,"(UPPERWHISKERMIN_STDEVP([Attr]), all([Attr]))",{Attr:e}),n=f.customFormula(ut.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:r.jaql(!0)},{toNotEqual:n.jaql(!0)}]}});return o?i:{jaql:i}},t},"boxWhiskerStdDevOutliers");function xo(e){return!!e&&"operator"in e&&(e.operator==="AND"||e.operator==="OR")&&!!e.right&&!!e.left}function Oh(e=[],t=[]){if(!xo(e)&&!xo(t))return At(e,t);const{filters:r,relations:n}=Co(e),o=Sc(t),i=At(r,o),a=po(r,n,i);return fo(i,a)}function Co(e){if(!e)return{filters:[],relations:null};if(f.isArray(e))return{filters:e,relations:null};const t=new Set;function r(o){if(kh(o))return t.add(o),{instanceid:o.config.guid};if(xo(o)){const i=r(o.left),a=r(o.right);return{left:i,right:a,operator:o.operator}}throw new ha}const n=r(e);return{filters:Array.from(t),relations:n}}function Sc(e){return e?Co(e).filters:[]}function fo(e,t){if(!t||Rc(t))return e;const r=n(t);return kh(r)?[r]:r;function n(o){if(fa(o))return e.find(i=>i.config.guid===o.instanceid);if(pa(o))return(o.operator==="AND"?f.logic.and:f.logic.or)(n(o.left),n(o.right));throw new ha}}function Rc(e){return!!e&&"instanceid"in e}function po(e,t,r){if(t===null)return null;const n=B1(e,r);return n.length===0?t:n.reduce((o,i)=>{switch(i.type){case"add":return H1(i.payload,o);case"remove":return al(i.payload,o)}},t)}function rd(e,t){return e.config.guid===t.config.guid}function j1(e,t,r){if(!e)return null;return o(e);function o(i){if(fa(i))return i.instanceid===t.config.guid?{instanceid:r.config.guid}:i;if(pa(i))return{left:o(i.left),right:o(i.right),operator:i.operator};throw new ha}}function B1(e,t){const r=[],n=[...e],o=[...t];return n.forEach(i=>{o.some(s=>rd(i,s))||r.push({type:"remove",payload:i})}),o.forEach(i=>{n.some(s=>rd(i,s))||r.push({type:"add",payload:i})}),r}function H1(e,t){return t?{left:t,right:{instanceid:e.config.guid},operator:"AND"}:{instanceid:e.config.guid}}function al(e,t){if(!t)return null;if(Rc(t))return t.instanceid===e.config.guid?null:t;const r=al(e,t.left),n=al(e,t.right);return r===null&&n?n:n===null&&r?r:r===null&&n===null?null:{left:r,right:n,operator:t.operator}}function z1(e,t){if(!e)return null;function r(n){if(W1(n))return{instanceid:n.instanceId};if(V1(n))return r(n.value);if(U1(n))return{operator:n.operator,left:r(n.left),right:r(n.right)};if(G1(n)){const o=t.find(i=>{if(!f.isCascadingFilter(i))return!1;const a=i.filters.map(s=>s.config.guid);return n.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 r(e)}function W1(e){return"instanceId"in e}function V1(e){return"value"in e}function U1(e){return"operator"in e}function G1(e){return"levels"in e&&f.isArray(e.levels)}function fa(e){return"instanceid"in e}function pa(e){return"operator"in e}function kh(e){return"config"in e&&"guid"in e.config}function Y1(e,t){if(!e)return;function r(n){if(fa(n)){const o=t.find(i=>i.config.guid===n.instanceid);return o&&f.isCascadingFilter(o)?{type:"CascadingIdentifier",levels:o.filters.map(a=>({type:"Identifier",instanceId:a.config.guid}))}:{type:"Identifier",instanceId:n.instanceid}}else{if(pa(n))return{type:"LogicalExpression",operator:n.operator,left:r(n.left),right:r(n.right)};throw new Error("Unknown node type in filter relations rules.")}}return r(e)}function q1(e,t){return e.find(r=>r.config.guid===t)}class ha extends Error{constructor(){super("Broken filter relations. Unknown node type.")}}function X1(e){return e.nodeType==="openBracket"}function K1(e){return e.nodeType==="closeBracket"}function Q1(e){return e.nodeType==="attribute"}function Z1(e){return e.nodeType==="operator"}function Eo(e){if(f.isCascadingFilter(e))return e.filters.map(Eo).join("-");const{attribute:t}=e,r=e.jaql().jaql,n=t.expression||r.dim,o=t.granularity||((r==null?void 0:r.datatype)==="datetime"?f.DimensionalLevelAttribute.translateJaqlToGranularity(r):"");return`${n}${o}`}function At(e=[],t=[]){const r=[...e];return t.forEach(n=>{const o=r.findIndex(a=>Eo(n)===Eo(a));o!==-1?r[o]=n:r.push(n)}),r}function J1(e){if(!e)return e;const t=f.cloneDeep(e);function r(n){if("instanceId"in n)return{instanceid:n.instanceId};if("value"in n)return r(n.value);if("operator"in n){const o={operator:n.operator};return"left"in n&&(o.left=r(n.left)),"right"in n&&(o.right=r(n.right)),o}return n}return r(t)}function ey(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sl(e,t){return sl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},sl(e,t)}const to={none:"None",small:"Small",medium:"Medium",large:"Large",left:"Left",center:"Center",right:"Right",light:"Light",dark:"Dark"};function Ah(e,t,r){const n={chart:{textColor:e.dashboards.widgetTextColor,backgroundColor:e.dashboards.widgetBackgroundColor,secondaryTextColor:e.dashboards.widgetSecondaryTextColor,animation:{init:{duration:"auto"},redraw:{duration:"auto"}}},typography:{fontFamily:e.typography.fontFamily,primaryTextColor:e.typography.primaryTextColor,secondaryTextColor:e.typography.secondaryTextColor,fontsLoader:{fonts:ty(e.typography.fontFamily,r,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:f.getDefaultThemeSettings().general.popover,buttons:{cancel:{backgroundColor:{default:e.general.secondaryButtonBaseColor,hover:e.general.secondaryButtonHoverColor,focus:e.general.secondaryButtonHoverColor},textColor:e.general.secondaryButtonTextColor}}},widget:{spaceAround:to[e.dashboards.widgetSpacing],cornerRadius:to[e.dashboards.widgetCornerRadius],shadow:to[e.dashboards.widgetShadow],border:e.dashboards.widgetBorderEnabled,borderColor:e.dashboards.widgetBorderColor,header:{titleTextColor:e.dashboards.widgetTitleColor,titleAlignment:to[e.dashboards.widgetTitleAlignment],titleFontSize:f.DEFAULT_TITLE_FONT_SIZE,dividerLine:e.dashboards.widgetTitleDividerEnabled,dividerLineColor:e.dashboards.widgetTitleDividerColor,backgroundColor:e.dashboards.widgetTitleBackgroundColor}},dashboard:{backgroundColor:e.dashboards.layoutBackgroundColor,dividerLineWidth:f.DEFAULT_DIVIDER_WIDTH,dividerLineColor:f.DEFAULT_DIVIDER_COLOR,borderWidth:f.DEFAULT_DASHBOARD_BORDER_WIDTH,borderColor:f.DEFAULT_DASHBOARD_BORDER_COLOR},filter:{panel:{titleColor:e.dashboards.panelTitleTextColor,backgroundColor:e.dashboards.panelBackgroundColor,borderWidth:f.DEFAULT_DASHBOARD_BORDER_WIDTH,borderColor:f.DEFAULT_FILTER_PANEL_BORDER_COLOR}}};return f.merge.withOptions({mergeArrays:!1},f.getDefaultThemeSettings(),n)}function Ih(e){return e.dashboards.colorPaletteName}function ty(e,t,r){const i=r?"fonts/":"resources/base/fonts/";return[{fontFamily:e,fontWeight:"normal",fontStyle:"normal",src:[{url:`${t}${i}${e}-Regular.eot`},{local:`${e}-Regular`},{url:`${t}${i}${e}-Regular.eot?#iefix`,format:"embedded-opentype"},{url:`${t}${i}${e}-Regular.ttf`,format:"truetype"}]},{fontFamily:e,fontWeight:600,fontStyle:"normal",src:[{url:`${t}${i}${e}-SemiBold.eot`},{local:`${e}-SemiBold`},{url:`${t}${i}${e}-SemiBold.eot?#iefix`,format:"embedded-opentype"},{url:`${t}${i}${e}-SemiBold.ttf`,format:"truetype"}]},{fontFamily:e,fontWeight:"bold",fontStyle:"normal",src:[{url:`${t}${i}${e}-Bold.eot`},{local:`${e}-Bold`},{url:`${t}${i}${e}-Bold.eot?#iefix`,format:"embedded-opentype"},{url:`${t}${i}${e}-Bold.ttf`,format:"truetype"}]}]}function Ph(e,t){return _t(this,null,function*(){const r=yield ry(e,t);if(!r)throw new f.TranslatableError("errors.themeNotFound",{themeOid:e});const n=Ih(r),o=yield Dh(n,t);return Ah(r,o,t.url)})}function ry(e,t){return _t(this,null,function*(){return t.get(`api/v1/themes/${e}`).catch(()=>{throw new f.TranslatableError("errors.themeNotFound",{themeOid:e})})})}function Dh(e,t){return _t(this,null,function*(){const r=yield t.get(`api/palettes/${e}`);if(r&&"status"in r&&r.status==="error")throw new f.TranslatableError("errors.paletteNotFound",{paletteName:e});return r})}const ny={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}},nd="composesdk",$h=(e,t,r,n=!1)=>{const o=Object.assign({action:e,cat:nd,eventType:"product",direct:!0},t);return n&&(process.env.NODE_ENV==="development"||process.env.NODE_ENV==="test")?(console.debug("DEBUG: event payload to send",o),Promise.resolve()):r.post("api/activities/",[o],{cache:"no-store",redirect:"error",referrerPolicy:"same-origin",priority:"low"}).catch(i=>{console.error(`unable to log action=${e}, category=${nd}`,i)})},od=(e,t,r,n,o)=>{const i=ny[`${e}`];return i.internal&&$h(e,t,r,o),i.external&&n&&n(w({action:e},t)),Promise.resolve()},_c=()=>{var i,a;const{tracking:e,app:t}=f.useSisenseContext(),r=(a=(i=t==null?void 0:t.httpClient)==null?void 0:i.auth)==null?void 0:a.type,n=S.useCallback((s,l={},c=!1)=>t?od(s,L(w({},l),{authType:r}),t.httpClient,e.onTrackingEvent,c):Promise.resolve(),[e,t,r]),o=S.useCallback((s,l=!1)=>{if(!t)return Promise.resolve();const{packageName:c,packageVersion:d,component:p,error:h}=s;let m="";return typeof h=="string"?m=h:h instanceof Error&&(m=h.message||h.toString()),od("sdkError",L(w({},{packageName:c,packageVersion:d,component:p,error:m}),{authType:r}),t.httpClient,e.onTrackingEvent,l)},[e,t,r]);return{trackEvent:n,trackError:o}},oy="sdkComponentInit",Nh=S.createContext(!1),iy=({skipNested:e=!0,children:t})=>f.jsx(Nh.Provider,{value:e,children:t}),ay=(e,t)=>{const{tracking:r,app:n}=f.useSisenseContext(),{trackEvent:o}=_c(),i=S.useContext(Nh),a=S.useRef(!1);S.useEffect(()=>{if(!r||!n)return;if(!a.current&&!i){const l={packageName:r.packageName,packageVersion:"2.3.0",componentName:e,attributesUsed:Object.entries(t).filter(([,c])=>!!c).map(([c])=>c).join(", ")};o(oy,l,!r.enabled).finally(()=>a.current=!0)}},[e,t,r,i,o,n])};var sy="[object Boolean]";function Lh(e){return e===!0||e===!1||f.isObjectLike(e)&&f.baseGetTag(e)==sy}const qu=class qu extends S.Component{constructor(t){super(t),this.postponedErrors=[],this.handler=t.handler,this.componentName=t.componentName}componentDidMount(){var t;this.context.isInitialized&&(this.httpClient=(t=this.context.app)==null?void 0:t.httpClient)}componentDidCatch(t){throw this.context.tracking.enabled&&(this.httpClient?this.sendErrorTracking(t):this.postponedErrors.push(t)),t}sendErrorTracking(t){try{this.handler({packageName:"sdk-ui",packageVersion:"2.3.0",component:this.componentName,error:t})}catch(r){console.log("Failed to send tracking error event: ",r)}}render(){return this.httpClient&&this.postponedErrors.length>0&&this.postponedErrors.forEach(t=>this.sendErrorTracking(t)),this.postponedErrors=[],this.props.children}};qu.contextType=f.SisenseContext;let ll=qu;const ly=({componentName:e,config:t})=>{const{skip:r,transparent:n}=t||{};return o=>function(a){const{trackError:s}=_c();return Lh(r)&&r||f.isFunction(r)&&r(a)?f.jsx(o,w({},a)):(ay(e,a),f.jsx(iy,{skipNested:!n,children:f.jsx(ll,{componentName:e,handler:s,children:f.jsx(o,w({},a))})}))}},cy="_container_1wquj_1",uy="_card_1wquj_11",dy="_text_1wquj_19",Cs={container:cy,card:uy,text:dy};function Fh({color:e="#FFCB05"}){return f.jsx("svg",{width:"53px",height:"53px",viewBox:"0 0 53 53",children:f.jsx("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:f.jsxs("g",{children:[f.jsx("polygon",{points:"26.4996 -0.000100000005 -0.000400000001 26.5009 26.4996 52.9999 53.0006 26.5009",fill:e}),f.jsx("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 jh=({error:e=new f.TranslatableError("errors.componentRenderError")})=>{var h,m,v,g,y,b;const{themeSettings:t}=f.useThemeContext(),{app:r}=f.useSisenseContext(),{t:n}=f.useTranslation(),[o,i]=S.useState(!1),a=()=>{i(!0)},s=()=>{i(!1)},l=f.jsx("div",{className:"csdk-flex csdk-justify-center csdk-mb-[10px]",children:f.jsx(Fh,{color:(h=t==null?void 0:t.general)==null?void 0:h.brandColor})}),c=e instanceof f.AbstractTranslatableError?n(e.key,w({},e.interpolationOptions)):n(e instanceof Error?e.message:e),d=n("errorBoxText",{errorMessage:c,interpolation:{escapeValue:!1}}),p=(v=(m=r==null?void 0:r.settings)==null?void 0:m.errorBoundaryConfig)==null?void 0:v.alwaysShowErrorText;return f.jsx("div",{onMouseEnter:p?void 0:a,onMouseLeave:p?void 0:s,className:Cs.container,"aria-label":"error-box",children:f.jsxs("div",{className:Cs.card,style:{backgroundColor:((g=t==null?void 0:t.general)==null?void 0:g.backgroundColor)||"rgba(255,255,255,0.5)"},children:[l,(p||o)&&f.jsx("div",{className:Cs.text,style:{color:((y=t==null?void 0:t.typography)==null?void 0:y.primaryTextColor)||f.DEFAULT_TEXT_COLOR,fontFamily:((b=t==null?void 0:t.typography)==null?void 0:b.fontFamily)||"inherit"},children:d})]})})};let Bh=class extends S.Component{constructor(t){super(t),this.showErrorBox=!0,this.onError=t.onError,this.isContainerComponent=t.isContainerComponent||!1,this.state={error:null,customErrorUI:null}}static getDerivedStateFromError(t){return{error:t,customErrorUI:null}}componentDidCatch(t){const r=t instanceof Error?t:new Error(t);if(this.onError){const n=this.onError(r);if(n!==void 0&&S.isValidElement(n)){this.setState({error:t,customErrorUI:n});return}}this.setState({error:t})}componentDidUpdate(t,r){if(r.error!==null&&fy(t.resetKeys,this.props.resetKeys)&&this.setState({error:null,customErrorUI:null}),this.props.error&&!t.error&&!r.error&&!this.state.error&&this.onError){const n=this.props.error instanceof Error?this.props.error:new Error(String(this.props.error)),o=this.onError(n);o!==void 0&&S.isValidElement(o)&&this.setState({customErrorUI:o})}}render(){const{error:t,customErrorUI:r}=this.state,{shouldRenderChildrenWithProvidedError:n,showErrorBox:o,error:i,children:a}=this.props,s=t||i;return!s||i&&!t&&n?a:o?r||f.jsx(jh,{error:s}):null}};function fy(e=[],t=[]){return e.length!==t.length||e.some((r,n)=>!f.isEqual(r,t[n]))}const Hh=({componentName:e})=>t=>function(n){const o=f.useSisenseContext(),i=a=>{var s,l;return(l=(s=o.errorBoundary).onError)==null?void 0:l.call(s,a,{componentName:e,componentProps:n})};return f.jsx(Bh,{resetKeys:Object.values(n),showErrorBox:o.errorBoundary.showErrorBox,onError:i,isContainerComponent:!!(n!=null&&n.children),children:f.jsx(t,w({},n))})};function zh(){var e,t;return(t=(e=document.head.querySelector('meta[property="csp-nonce"]'))==null?void 0:e.getAttribute("content"))!=null?t:void 0}const id=zh(),Mc=({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},r=L(w({},t),{WebkitAnimationDelay:"-0.32s",animationDelay:"-0.32s"}),n=L(w({},t),{WebkitAnimationDelay:"-0.16s",animationDelay:"-0.16s"}),o=L(w({},t),{marginRight:"unset"}),i={"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)"}};return f.jsxs("div",{children:[f.jsx("style",L(w({},id&&{nonce:id}),{children:`
1
+ "use strict";var O1=Object.defineProperty,k1=Object.defineProperties;var A1=Object.getOwnPropertyDescriptors;var ui=Object.getOwnPropertySymbols;var ed=Object.prototype.hasOwnProperty,td=Object.prototype.propertyIsEnumerable;var Bt=Math.pow,xs=(e,t,r)=>t in e?O1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,w=(e,t)=>{for(var r in t||(t={}))ed.call(t,r)&&xs(e,r,t[r]);if(ui)for(var r of ui(t))td.call(t,r)&&xs(e,r,t[r]);return e},L=(e,t)=>k1(e,A1(t));var di=e=>typeof e=="symbol"?e:e+"",te=(e,t)=>{var r={};for(var n in e)ed.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ui)for(var n of ui(e))t.indexOf(n)<0&&td.call(e,n)&&(r[n]=e[n]);return r};var Vn=(e,t,r)=>(xs(e,typeof t!="symbol"?t+"":t,r),r);var _t=(e,t,r)=>new Promise((n,o)=>{var i=l=>{try{s(r.next(l))}catch(c){o(c)}},a=l=>{try{s(r.throw(l))}catch(c){o(c)}},s=l=>l.done?n(l.value):Promise.resolve(l.value).then(i,a);s((r=r.apply(e,t)).next())});const f=require("./derive-chart-family-5O0nGmIH.cjs"),S=require("react"),Z=require("react/jsx-runtime"),bt=require("react-dom");function Mh(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const N=Mh(S),I1=Mh(bt);function P1(e){let{i18n:t,defaultNS:r,children:n}=e;const o=S.useMemo(()=>({i18n:t,defaultNS:r}),[t,r]);return S.createElement(f.I18nContext.Provider,{value:o},n)}function yr(e){return e===void 0||typeof e=="string"||"title"in e&&"type"in e}const ut={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 Tc(e){return[f.customFormula(ut.BOX_MIN_VALUE_NAME,"QUARTILE([Attr], 1)",{Attr:e}),f.customFormula(ut.BOX_MEDIAN_VALUE_NAME,"MEDIAN([Attr])",{Attr:e}),f.customFormula(ut.BOX_MAX_VALUE_NAME,"QUARTILE([Attr], 3)",{Attr:e})]}function D1(e){return[...Tc(e),f.customFormula(ut.WHISKER_MIN_VALUE_NAME,"LOWERWHISKERMAX_IQR([Attr])",{Attr:e}),f.customFormula(ut.WHISKER_MAX_VALUE_NAME,"UPPERWHISKERMIN_IQR([Attr])",{Attr:e}),f.customFormula(ut.OUTLIER_COUNT_VALUE_NAME,"OUTLIERSCOUNT_IQR([Attr])",{Attr:e})]}function $1(e){return[...Tc(e),f.customFormula(ut.WHISKER_MIN_VALUE_NAME,"MIN([Attr])",{Attr:e}),f.customFormula(ut.WHISKER_MAX_VALUE_NAME,"MAX([Attr])",{Attr:e})]}function N1(e){return[...Tc(e),f.customFormula(ut.WHISKER_MIN_VALUE_NAME,"LOWERWHISKERMAX_STDEVP([Attr])",{Attr:e}),f.customFormula(ut.WHISKER_MAX_VALUE_NAME,"UPPERWHISKERMIN_STDEVP([Attr])",{Attr:e}),f.customFormula(ut.OUTLIER_COUNT_VALUE_NAME,"OUTLIERSCOUNT_STDEVP([Attr])",{Attr:e})]}const L1=f.withComposeCodeForAnalytics(e=>{const t=f.cloneDeep(e),r=f.customFormula(ut.OUTLIER_MAX_VALUE_NAME,"(UPPERWHISKERMIN_IQR([Attr]), all([Attr]))",{Attr:e}),n=f.customFormula(ut.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:r.jaql(!0)},{toNotEqual:n.jaql(!0)}]}});return o?i:{jaql:i}},t},"boxWhiskerIqrOutliers"),F1=f.withComposeCodeForAnalytics(e=>{const t=f.cloneDeep(e),r=f.customFormula(ut.OUTLIER_MAX_VALUE_NAME,"(UPPERWHISKERMIN_STDEVP([Attr]), all([Attr]))",{Attr:e}),n=f.customFormula(ut.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:r.jaql(!0)},{toNotEqual:n.jaql(!0)}]}});return o?i:{jaql:i}},t},"boxWhiskerStdDevOutliers");function xo(e){return!!e&&"operator"in e&&(e.operator==="AND"||e.operator==="OR")&&!!e.right&&!!e.left}function Oh(e=[],t=[]){if(!xo(e)&&!xo(t))return At(e,t);const{filters:r,relations:n}=Co(e),o=Sc(t),i=At(r,o),a=po(r,n,i);return fo(i,a)}function Co(e){if(!e)return{filters:[],relations:null};if(f.isArray(e))return{filters:e,relations:null};const t=new Set;function r(o){if(kh(o))return t.add(o),{instanceid:o.config.guid};if(xo(o)){const i=r(o.left),a=r(o.right);return{left:i,right:a,operator:o.operator}}throw new ha}const n=r(e);return{filters:Array.from(t),relations:n}}function Sc(e){return e?Co(e).filters:[]}function fo(e,t){if(!t||Rc(t))return e;const r=n(t);return kh(r)?[r]:r;function n(o){if(fa(o))return e.find(i=>i.config.guid===o.instanceid);if(pa(o))return(o.operator==="AND"?f.logic.and:f.logic.or)(n(o.left),n(o.right));throw new ha}}function Rc(e){return!!e&&"instanceid"in e}function po(e,t,r){if(t===null)return null;const n=B1(e,r);return n.length===0?t:n.reduce((o,i)=>{switch(i.type){case"add":return H1(i.payload,o);case"remove":return al(i.payload,o)}},t)}function rd(e,t){return e.config.guid===t.config.guid}function j1(e,t,r){if(!e)return null;return o(e);function o(i){if(fa(i))return i.instanceid===t.config.guid?{instanceid:r.config.guid}:i;if(pa(i))return{left:o(i.left),right:o(i.right),operator:i.operator};throw new ha}}function B1(e,t){const r=[],n=[...e],o=[...t];return n.forEach(i=>{o.some(s=>rd(i,s))||r.push({type:"remove",payload:i})}),o.forEach(i=>{n.some(s=>rd(i,s))||r.push({type:"add",payload:i})}),r}function H1(e,t){return t?{left:t,right:{instanceid:e.config.guid},operator:"AND"}:{instanceid:e.config.guid}}function al(e,t){if(!t)return null;if(Rc(t))return t.instanceid===e.config.guid?null:t;const r=al(e,t.left),n=al(e,t.right);return r===null&&n?n:n===null&&r?r:r===null&&n===null?null:{left:r,right:n,operator:t.operator}}function z1(e,t){if(!e)return null;function r(n){if(W1(n))return{instanceid:n.instanceId};if(V1(n))return r(n.value);if(U1(n))return{operator:n.operator,left:r(n.left),right:r(n.right)};if(G1(n)){const o=t.find(i=>{if(!f.isCascadingFilter(i))return!1;const a=i.filters.map(s=>s.config.guid);return n.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 r(e)}function W1(e){return"instanceId"in e}function V1(e){return"value"in e}function U1(e){return"operator"in e}function G1(e){return"levels"in e&&f.isArray(e.levels)}function fa(e){return"instanceid"in e}function pa(e){return"operator"in e}function kh(e){return"config"in e&&"guid"in e.config}function Y1(e,t){if(!e)return;function r(n){if(fa(n)){const o=t.find(i=>i.config.guid===n.instanceid);return o&&f.isCascadingFilter(o)?{type:"CascadingIdentifier",levels:o.filters.map(a=>({type:"Identifier",instanceId:a.config.guid}))}:{type:"Identifier",instanceId:n.instanceid}}else{if(pa(n))return{type:"LogicalExpression",operator:n.operator,left:r(n.left),right:r(n.right)};throw new Error("Unknown node type in filter relations rules.")}}return r(e)}function q1(e,t){return e.find(r=>r.config.guid===t)}class ha extends Error{constructor(){super("Broken filter relations. Unknown node type.")}}function X1(e){return e.nodeType==="openBracket"}function K1(e){return e.nodeType==="closeBracket"}function Q1(e){return e.nodeType==="attribute"}function Z1(e){return e.nodeType==="operator"}function Eo(e){if(f.isCascadingFilter(e))return e.filters.map(Eo).join("-");const{attribute:t}=e,r=e.jaql().jaql,n=t.expression||r.dim,o=t.granularity||((r==null?void 0:r.datatype)==="datetime"?f.DimensionalLevelAttribute.translateJaqlToGranularity(r):"");return`${n}${o}`}function At(e=[],t=[]){const r=[...e];return t.forEach(n=>{const o=r.findIndex(a=>Eo(n)===Eo(a));o!==-1?r[o]=n:r.push(n)}),r}function J1(e){if(!e)return e;const t=f.cloneDeep(e);function r(n){if("instanceId"in n)return{instanceid:n.instanceId};if("value"in n)return r(n.value);if("operator"in n){const o={operator:n.operator};return"left"in n&&(o.left=r(n.left)),"right"in n&&(o.right=r(n.right)),o}return n}return r(t)}function ey(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sl(e,t){return sl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},sl(e,t)}const to={none:"None",small:"Small",medium:"Medium",large:"Large",left:"Left",center:"Center",right:"Right",light:"Light",dark:"Dark"};function Ah(e,t,r){const n={chart:{textColor:e.dashboards.widgetTextColor,backgroundColor:e.dashboards.widgetBackgroundColor,secondaryTextColor:e.dashboards.widgetSecondaryTextColor,animation:{init:{duration:"auto"},redraw:{duration:"auto"}}},typography:{fontFamily:e.typography.fontFamily,primaryTextColor:e.typography.primaryTextColor,secondaryTextColor:e.typography.secondaryTextColor,fontsLoader:{fonts:ty(e.typography.fontFamily,r,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:f.getDefaultThemeSettings().general.popover,buttons:{cancel:{backgroundColor:{default:e.general.secondaryButtonBaseColor,hover:e.general.secondaryButtonHoverColor,focus:e.general.secondaryButtonHoverColor},textColor:e.general.secondaryButtonTextColor}}},widget:{spaceAround:to[e.dashboards.widgetSpacing],cornerRadius:to[e.dashboards.widgetCornerRadius],shadow:to[e.dashboards.widgetShadow],border:e.dashboards.widgetBorderEnabled,borderColor:e.dashboards.widgetBorderColor,header:{titleTextColor:e.dashboards.widgetTitleColor,titleAlignment:to[e.dashboards.widgetTitleAlignment],titleFontSize:f.DEFAULT_TITLE_FONT_SIZE,dividerLine:e.dashboards.widgetTitleDividerEnabled,dividerLineColor:e.dashboards.widgetTitleDividerColor,backgroundColor:e.dashboards.widgetTitleBackgroundColor}},dashboard:{backgroundColor:e.dashboards.layoutBackgroundColor,dividerLineWidth:f.DEFAULT_DIVIDER_WIDTH,dividerLineColor:f.DEFAULT_DIVIDER_COLOR,borderWidth:f.DEFAULT_DASHBOARD_BORDER_WIDTH,borderColor:f.DEFAULT_DASHBOARD_BORDER_COLOR},filter:{panel:{titleColor:e.dashboards.panelTitleTextColor,backgroundColor:e.dashboards.panelBackgroundColor,borderWidth:f.DEFAULT_DASHBOARD_BORDER_WIDTH,borderColor:f.DEFAULT_FILTER_PANEL_BORDER_COLOR}}};return f.merge.withOptions({mergeArrays:!1},f.getDefaultThemeSettings(),n)}function Ih(e){return e.dashboards.colorPaletteName}function ty(e,t,r){const i=r?"fonts/":"resources/base/fonts/";return[{fontFamily:e,fontWeight:"normal",fontStyle:"normal",src:[{url:`${t}${i}${e}-Regular.eot`},{local:`${e}-Regular`},{url:`${t}${i}${e}-Regular.eot?#iefix`,format:"embedded-opentype"},{url:`${t}${i}${e}-Regular.ttf`,format:"truetype"}]},{fontFamily:e,fontWeight:600,fontStyle:"normal",src:[{url:`${t}${i}${e}-SemiBold.eot`},{local:`${e}-SemiBold`},{url:`${t}${i}${e}-SemiBold.eot?#iefix`,format:"embedded-opentype"},{url:`${t}${i}${e}-SemiBold.ttf`,format:"truetype"}]},{fontFamily:e,fontWeight:"bold",fontStyle:"normal",src:[{url:`${t}${i}${e}-Bold.eot`},{local:`${e}-Bold`},{url:`${t}${i}${e}-Bold.eot?#iefix`,format:"embedded-opentype"},{url:`${t}${i}${e}-Bold.ttf`,format:"truetype"}]}]}function Ph(e,t){return _t(this,null,function*(){const r=yield ry(e,t);if(!r)throw new f.TranslatableError("errors.themeNotFound",{themeOid:e});const n=Ih(r),o=yield Dh(n,t);return Ah(r,o,t.url)})}function ry(e,t){return _t(this,null,function*(){return t.get(`api/v1/themes/${e}`).catch(()=>{throw new f.TranslatableError("errors.themeNotFound",{themeOid:e})})})}function Dh(e,t){return _t(this,null,function*(){const r=yield t.get(`api/palettes/${e}`);if(r&&"status"in r&&r.status==="error")throw new f.TranslatableError("errors.paletteNotFound",{paletteName:e});return r})}const ny={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}},nd="composesdk",$h=(e,t,r,n=!1)=>{const o=Object.assign({action:e,cat:nd,eventType:"product",direct:!0},t);return n&&(process.env.NODE_ENV==="development"||process.env.NODE_ENV==="test")?(console.debug("DEBUG: event payload to send",o),Promise.resolve()):r.post("api/activities/",[o],{cache:"no-store",redirect:"error",referrerPolicy:"same-origin",priority:"low"}).catch(i=>{console.error(`unable to log action=${e}, category=${nd}`,i)})},od=(e,t,r,n,o)=>{const i=ny[`${e}`];return i.internal&&$h(e,t,r,o),i.external&&n&&n(w({action:e},t)),Promise.resolve()},_c=()=>{var i,a;const{tracking:e,app:t}=f.useSisenseContext(),r=(a=(i=t==null?void 0:t.httpClient)==null?void 0:i.auth)==null?void 0:a.type,n=S.useCallback((s,l={},c=!1)=>t?od(s,L(w({},l),{authType:r}),t.httpClient,e.onTrackingEvent,c):Promise.resolve(),[e,t,r]),o=S.useCallback((s,l=!1)=>{if(!t)return Promise.resolve();const{packageName:c,packageVersion:d,component:p,error:h}=s;let m="";return typeof h=="string"?m=h:h instanceof Error&&(m=h.message||h.toString()),od("sdkError",L(w({},{packageName:c,packageVersion:d,component:p,error:m}),{authType:r}),t.httpClient,e.onTrackingEvent,l)},[e,t,r]);return{trackEvent:n,trackError:o}},oy="sdkComponentInit",Nh=S.createContext(!1),iy=({skipNested:e=!0,children:t})=>f.jsx(Nh.Provider,{value:e,children:t}),ay=(e,t)=>{const{tracking:r,app:n}=f.useSisenseContext(),{trackEvent:o}=_c(),i=S.useContext(Nh),a=S.useRef(!1);S.useEffect(()=>{if(!r||!n)return;if(!a.current&&!i){const l={packageName:r.packageName,packageVersion:"2.3.1",componentName:e,attributesUsed:Object.entries(t).filter(([,c])=>!!c).map(([c])=>c).join(", ")};o(oy,l,!r.enabled).finally(()=>a.current=!0)}},[e,t,r,i,o,n])};var sy="[object Boolean]";function Lh(e){return e===!0||e===!1||f.isObjectLike(e)&&f.baseGetTag(e)==sy}const qu=class qu extends S.Component{constructor(t){super(t),this.postponedErrors=[],this.handler=t.handler,this.componentName=t.componentName}componentDidMount(){var t;this.context.isInitialized&&(this.httpClient=(t=this.context.app)==null?void 0:t.httpClient)}componentDidCatch(t){throw this.context.tracking.enabled&&(this.httpClient?this.sendErrorTracking(t):this.postponedErrors.push(t)),t}sendErrorTracking(t){try{this.handler({packageName:"sdk-ui",packageVersion:"2.3.1",component:this.componentName,error:t})}catch(r){console.log("Failed to send tracking error event: ",r)}}render(){return this.httpClient&&this.postponedErrors.length>0&&this.postponedErrors.forEach(t=>this.sendErrorTracking(t)),this.postponedErrors=[],this.props.children}};qu.contextType=f.SisenseContext;let ll=qu;const ly=({componentName:e,config:t})=>{const{skip:r,transparent:n}=t||{};return o=>function(a){const{trackError:s}=_c();return Lh(r)&&r||f.isFunction(r)&&r(a)?f.jsx(o,w({},a)):(ay(e,a),f.jsx(iy,{skipNested:!n,children:f.jsx(ll,{componentName:e,handler:s,children:f.jsx(o,w({},a))})}))}},cy="_container_1wquj_1",uy="_card_1wquj_11",dy="_text_1wquj_19",Cs={container:cy,card:uy,text:dy};function Fh({color:e="#FFCB05"}){return f.jsx("svg",{width:"53px",height:"53px",viewBox:"0 0 53 53",children:f.jsx("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:f.jsxs("g",{children:[f.jsx("polygon",{points:"26.4996 -0.000100000005 -0.000400000001 26.5009 26.4996 52.9999 53.0006 26.5009",fill:e}),f.jsx("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 jh=({error:e=new f.TranslatableError("errors.componentRenderError")})=>{var h,m,v,g,y,b;const{themeSettings:t}=f.useThemeContext(),{app:r}=f.useSisenseContext(),{t:n}=f.useTranslation(),[o,i]=S.useState(!1),a=()=>{i(!0)},s=()=>{i(!1)},l=f.jsx("div",{className:"csdk-flex csdk-justify-center csdk-mb-[10px]",children:f.jsx(Fh,{color:(h=t==null?void 0:t.general)==null?void 0:h.brandColor})}),c=e instanceof f.AbstractTranslatableError?n(e.key,w({},e.interpolationOptions)):n(e instanceof Error?e.message:e),d=n("errorBoxText",{errorMessage:c,interpolation:{escapeValue:!1}}),p=(v=(m=r==null?void 0:r.settings)==null?void 0:m.errorBoundaryConfig)==null?void 0:v.alwaysShowErrorText;return f.jsx("div",{onMouseEnter:p?void 0:a,onMouseLeave:p?void 0:s,className:Cs.container,"aria-label":"error-box",children:f.jsxs("div",{className:Cs.card,style:{backgroundColor:((g=t==null?void 0:t.general)==null?void 0:g.backgroundColor)||"rgba(255,255,255,0.5)"},children:[l,(p||o)&&f.jsx("div",{className:Cs.text,style:{color:((y=t==null?void 0:t.typography)==null?void 0:y.primaryTextColor)||f.DEFAULT_TEXT_COLOR,fontFamily:((b=t==null?void 0:t.typography)==null?void 0:b.fontFamily)||"inherit"},children:d})]})})};let Bh=class extends S.Component{constructor(t){super(t),this.showErrorBox=!0,this.onError=t.onError,this.isContainerComponent=t.isContainerComponent||!1,this.state={error:null,customErrorUI:null}}static getDerivedStateFromError(t){return{error:t,customErrorUI:null}}componentDidCatch(t){const r=t instanceof Error?t:new Error(t);if(this.onError){const n=this.onError(r);if(n!==void 0&&S.isValidElement(n)){this.setState({error:t,customErrorUI:n});return}}this.setState({error:t})}componentDidUpdate(t,r){if(r.error!==null&&fy(t.resetKeys,this.props.resetKeys)&&this.setState({error:null,customErrorUI:null}),this.props.error&&!t.error&&!r.error&&!this.state.error&&this.onError){const n=this.props.error instanceof Error?this.props.error:new Error(String(this.props.error)),o=this.onError(n);o!==void 0&&S.isValidElement(o)&&this.setState({customErrorUI:o})}}render(){const{error:t,customErrorUI:r}=this.state,{shouldRenderChildrenWithProvidedError:n,showErrorBox:o,error:i,children:a}=this.props,s=t||i;return!s||i&&!t&&n?a:o?r||f.jsx(jh,{error:s}):null}};function fy(e=[],t=[]){return e.length!==t.length||e.some((r,n)=>!f.isEqual(r,t[n]))}const Hh=({componentName:e})=>t=>function(n){const o=f.useSisenseContext(),i=a=>{var s,l;return(l=(s=o.errorBoundary).onError)==null?void 0:l.call(s,a,{componentName:e,componentProps:n})};return f.jsx(Bh,{resetKeys:Object.values(n),showErrorBox:o.errorBoundary.showErrorBox,onError:i,isContainerComponent:!!(n!=null&&n.children),children:f.jsx(t,w({},n))})};function zh(){var e,t;return(t=(e=document.head.querySelector('meta[property="csp-nonce"]'))==null?void 0:e.getAttribute("content"))!=null?t:void 0}const id=zh(),Mc=({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},r=L(w({},t),{WebkitAnimationDelay:"-0.32s",animationDelay:"-0.32s"}),n=L(w({},t),{WebkitAnimationDelay:"-0.16s",animationDelay:"-0.16s"}),o=L(w({},t),{marginRight:"unset"}),i={"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)"}};return f.jsxs("div",{children:[f.jsx("style",L(w({},id&&{nonce:id}),{children:`
2
2
  @keyframes loading-dots-animation {
3
3
  ${Object.entries(i).map(([a,s])=>`${a} { ${Object.entries(s).map(([l,c])=>`${l}: ${c};`).join("")} }`).join("")}
4
4
  }
@@ -329,7 +329,7 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStat
329
329
  `:null,FL=typeof mc!="string"?f.css`
330
330
  animation: ${mc} 1.4s ease-in-out infinite;
331
331
  `:null,jL=e=>{const{classes:t,variant:r,color:n,disableShrink:o}=e,i={root:["root",r,`color${fe(n)}`],svg:["svg"],circle:["circle",`circle${fe(r)}`,o&&"circleDisableShrink"]};return Be(i,NL,t)},BL=de("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`color${fe(r.color)}`]]}})(Ye(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:LL||{animation:`${gc} 1.4s linear infinite`}},...Object.entries(e.palette).filter(Cr()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),HL=de("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),zL=de("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.circle,t[`circle${fe(r.variant)}`],r.disableShrink&&t.circleDisableShrink]}})(Ye(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:t})=>t.variant==="indeterminate"&&!t.disableShrink,style:FL||{animation:`${mc} 1.4s ease-in-out infinite`}}]}))),Bu=N.forwardRef(function(t,r){const n=Fe({props:t,name:"MuiCircularProgress"}),T=n,{className:o,color:i="primary",disableShrink:a=!1,size:s=40,style:l,thickness:c=3.6,value:d=0,variant:p="indeterminate"}=T,h=te(T,["className","color","disableShrink","size","style","thickness","value","variant"]),m=L(w({},n),{color:i,disableShrink:a,size:s,thickness:c,value:d,variant:p}),v=jL(m),g={},y={},b={};if(p==="determinate"){const E=2*Math.PI*((dr-c)/2);g.strokeDasharray=E.toFixed(3),b["aria-valuenow"]=Math.round(d),g.strokeDashoffset=`${((100-d)/100*E).toFixed(3)}px`,y.transform="rotate(-90deg)"}return Z.jsx(BL,L(w(w({className:he(v.root,o),style:w(w({width:s,height:s},y),l),ownerState:m,ref:r,role:"progressbar"},b),h),{children:Z.jsx(HL,{className:v.svg,ownerState:m,viewBox:`${dr/2} ${dr/2} ${dr} ${dr}`,children:Z.jsx(zL,{className:v.circle,style:g,ownerState:m,cx:dr,cy:dr,r:(dr-c)/2,fill:"none",strokeWidth:c})})}))});process.env.NODE_ENV!=="production"&&(Bu.propTypes={classes:u.object,className:u.string,color:u.oneOfType([u.oneOf(["inherit","primary","secondary","error","info","success","warning"]),u.string]),disableShrink:lr(u.bool,e=>e.disableShrink&&e.variant&&e.variant!=="indeterminate"?new Error("MUI: You have provided the `disableShrink` prop with a variant other than `indeterminate`. This will have no effect."):null),size:u.oneOfType([u.number,u.string]),style:u.object,sx:u.oneOfType([u.arrayOf(u.oneOfType([u.func,u.object,u.bool])),u.func,u.object]),thickness:u.number,value:u.number,variant:u.oneOf(["determinate","indeterminate"])});function WL(e){return Oe("MuiIconButton",e)}const ih=ke("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),VL=e=>{const{classes:t,disabled:r,color:n,edge:o,size:i,loading:a}=e,s={root:["root",a&&"loading",r&&"disabled",n!=="default"&&`color${fe(n)}`,o&&`edge${fe(o)}`,`size${fe(i)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return Be(s,WL,t)},UL=de(qr,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.loading&&t.loading,r.color!=="default"&&t[`color${fe(r.color)}`],r.edge&&t[`edge${fe(r.edge)}`],t[`size${fe(r.size)}`]]}})(Ye(({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:t=>!t.disableRipple,style:{"--IconButton-hoverBg":e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Ne(e.palette.action.active,e.palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),Ye(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(Cr()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(Cr()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.vars?`rgba(${(e.vars||e).palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Ne((e.vars||e).palette[t].main,e.palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${ih.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${ih.loading}`]:{color:"transparent"}}))),GL=de("span",{name:"MuiIconButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>t.loadingIndicator})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),Gr=N.forwardRef(function(t,r){const n=Fe({props:t,name:"MuiIconButton"}),E=n,{edge:o=!1,children:i,className:a,color:s="default",disabled:l=!1,disableFocusRipple:c=!1,size:d="medium",id:p,loading:h=null,loadingIndicator:m}=E,v=te(E,["edge","children","className","color","disabled","disableFocusRipple","size","id","loading","loadingIndicator"]),g=Ia(p),y=m!=null?m:Z.jsx(Bu,{"aria-labelledby":g,color:"inherit",size:16}),b=L(w({},n),{edge:o,color:s,disabled:l,disableFocusRipple:c,loading:h,loadingIndicator:y,size:d}),T=VL(b);return Z.jsxs(UL,L(w({id:h?g:p,className:he(T.root,a),centerRipple:!0,focusRipple:!c,disabled:l||h,ref:r},v),{ownerState:b,children:[typeof h=="boolean"&&Z.jsx("span",{className:T.loadingWrapper,style:{display:"contents"},children:Z.jsx(GL,{className:T.loadingIndicator,ownerState:b,children:h&&y})}),i]}))});process.env.NODE_ENV!=="production"&&(Gr.propTypes={children:lr(u.node,e=>N.Children.toArray(e.children).some(r=>N.isValidElement(r)&&r.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(`
332
- `)):null),classes:u.object,className:u.string,color:u.oneOfType([u.oneOf(["inherit","default","primary","secondary","error","info","success","warning"]),u.string]),disabled:u.bool,disableFocusRipple:u.bool,disableRipple:u.bool,edge:u.oneOf(["end","start",!1]),id:u.string,loading:u.bool,loadingIndicator:u.node,size:u.oneOfType([u.oneOf(["small","medium","large"]),u.string]),sx:u.oneOfType([u.arrayOf(u.oneOfType([u.func,u.object,u.bool])),u.func,u.object])});function YL({fill:e="rgba(38, 46, 61, 0.67)"}){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:f.jsx("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"})})}function qL({title:e,description:t,errorMessages:r=[],styleOptions:n,onRefresh:o}){var b,T,E;const[i,a]=S.useState(null),{themeSettings:s}=f.useThemeContext(),{typography:{primaryTextColor:l,secondaryTextColor:c,fontFamily:d}}=s,{t:p}=f.useTranslation(),h=x=>{a(x.currentTarget)},m=()=>{a(null)},v=S.useMemo(()=>e?f.jsx(vt,{variant:"body2",style:{color:l,fontFamily:d,fontSize:13},children:e}):null,[e,l,d]),g=S.useMemo(()=>r.length===0?null:r.map(x=>f.jsxs(f.Fragment,{children:[f.jsx(Fr,{sx:{my:1,borderColor:c,opacity:.3,marginY:"8px"}}),f.jsxs("div",{className:"csdk-flex",children:[f.jsx("div",{className:"csdk-shrink-0 csdk-grow-0",children:f.jsx(YL,{fill:"#fa5656"})}),f.jsx(vt,{variant:"body2",className:"csdk-grow-1",style:{color:c,fontFamily:d,fontSize:13,marginLeft:5,lineHeight:"24px",letterSpacing:"normal",overflowWrap:"anywhere"},children:x})]})]})),[r,c,d]),y=S.useMemo(()=>t?f.jsxs(f.Fragment,{children:[f.jsx(Fr,{sx:{my:"8px",borderColor:c,opacity:.3}}),f.jsx(vt,{variant:"body2",style:{color:c,fontFamily:d,fontSize:13},children:t})]}):null,[t,c,d]);return f.jsxs(f.Fragment,{children:[f.jsx(hs,{title:p("widgetHeader.info.tooltip"),style:{color:(b=s.chart)==null?void 0:b.textColor,fontFamily:(T=s.typography)==null?void 0:T.fontFamily},children:f.jsx(Gr,{onClick:h,sx:{p:0},children:f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",children:f.jsx("path",{fill:(n==null?void 0:n.titleTextColor)||s.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"})})})}),f.jsx(qc,{open:!!i,position:i?{anchorEl:i,anchorOrigin:{vertical:"bottom",horizontal:"center"},contentOrigin:{vertical:"top",horizontal:"center"}}:void 0,onClose:m,children:f.jsxs(hv,{raised:!0,className:"csdk-max-w-xs csdk-w-[300px]",children:[f.jsxs("div",{className:"csdk-flex csdk-flex-row csdk-justify-between csdk-items-center csdk-py-[5px] csdk-px-[12px]",style:{backgroundColor:f.getSlightlyDifferentColor(s.general.backgroundColor)},children:[f.jsx(vt,{variant:"subtitle2",sx:{fontWeight:"bold"},style:{color:s.typography.primaryTextColor,fontFamily:s.typography.fontFamily},children:p("widgetHeader.info.details")}),f.jsx(Gr,{onClick:o,sx:{p:0},children:f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",children:f.jsx("path",{fill:(E=s.chart)==null?void 0:E.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"})})})]}),f.jsx(Fr,{sx:{borderColor:s.typography.secondaryTextColor,opacity:.3}}),f.jsxs(gv,{style:{backgroundColor:s.general.backgroundColor,padding:12},children:[v,g,y]})]})})]})}const XL=({title:e,description:t,errorMessages:r=[],warningMessages:n=[],dataSetName:o,styleOptions:i,onRefresh:a})=>{var c;const{themeSettings:s}=f.useThemeContext(),l=()=>{var p;const d=f.jsx(f.Fragment,{children:f.jsx(qL,{title:o,description:t,styleOptions:i,errorMessages:r,warningMessages:n,onRefresh:a})});return i!=null&&i.renderToolbar?(p=i==null?void 0:i.renderToolbar)==null?void 0:p.call(i,a,d):d};return f.jsxs(f.Fragment,{children:[f.jsxs("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)||s.widget.header.backgroundColor},children:[f.jsx("div",{className:"csdk-w-full csdk-whitespace-nowrap csdk-overflow-hidden",style:{textAlign:KL((i==null?void 0:i.titleAlignment)||s.widget.header.titleAlignment),color:(i==null?void 0:i.titleTextColor)||s.widget.header.titleTextColor,fontFamily:(c=s.typography)==null?void 0:c.fontFamily,fontSize:s.widget.header.titleFontSize},children:e||""}),f.jsx("div",{className:"csdk-ml-auto csdk-flex csdk-items-center",children:l()})]}),f.get(i,"dividerLine",s.widget.header.dividerLine)&&f.jsx(Fr,{style:{backgroundColor:(i==null?void 0:i.dividerLineColor)||s.widget.header.dividerLineColor||"#e6e6e6"}})]})};function KL(e){return e.toLowerCase()}const mv=e=>f.jsx(TL,{children:f.jsx(QL,w({},e))}),QL=({dataSetName:e,styleOptions:t,title:r,description:n,topSlot:o,bottomSlot:i,children:a,onRefresh:s=()=>{}})=>{var p,h,m;const{errors:l,warnings:c}=uv(),{themeSettings:d}=f.useThemeContext();return f.jsx("div",{className:"csdk-w-full csdk-h-full csdk-overflow-hidden csdk-accessible",children:f.jsx("div",{className:"csdk-h-full",style:{padding:pv[f.get(t,"spaceAround",d.widget.spaceAround)]||"0px"},children:f.jsxs("div",{className:"csdk-h-full csdk-overflow-hidden",style:{backgroundColor:(t==null?void 0:t.backgroundColor)||"unset",borderWidth:f.get(t,"border",d.widget.border)?"1px":0,borderColor:(t==null?void 0:t.borderColor)||d.widget.borderColor,borderRadius:ML[(t==null?void 0:t.cornerRadius)||d.widget.cornerRadius]||0,boxShadow:OL(t,d),display:"flex",flexDirection:"column"},children:[!((p=t==null?void 0:t.header)!=null&&p.hidden)&&f.jsx(XL,{title:r,description:n,dataSetName:e,errorMessages:l,warningMessages:c,styleOptions:t==null?void 0:t.header,onRefresh:s}),o,f.jsx(D0,{theme:{chart:{backgroundColor:(t==null?void 0:t.backgroundColor)||((h=d.chart)==null?void 0:h.backgroundColor)}},children:f.jsx("div",{style:{flexGrow:1,minWidth:0,minHeight:0,backgroundColor:(t==null?void 0:t.backgroundColor)||((m=d.chart)==null?void 0:m.backgroundColor)},children:a})}),i]})})})},ZL=e=>{const t=JL(e);return t.config.disabled=!e.config.disabled,t},JL=e=>{const t=f.cloneDeep(e);return Object.setPrototypeOf(t,e),t};function eF(e,t,r){const n={guid:t,excludeMembers:!1,backgroundFilter:r};return f.members(e,[],n)}function gs(e){if(!f.isMembersFilter(e))throw new f.TranslatableError("errors.notAMembersFilter");const{attribute:t,config:{guid:r,backgroundFilter:n}}=e;return eF(t,r,n)}function Hu(e){return"members"in e&&e.members.length===0}function Pt(e,t){return e.expression===(t==null?void 0:t.expression)&&e.granularity===t.granularity}function vv(e,t){return e===void 0&&t===void 0?!1:[e,t].some(r=>r===void 0)||e.length!==t.length?!0:e.length===0&&t.length===0?!1:e.some((r,n)=>!f.isEqualWith(r,t[n],yv))}function zu(e,t){return Pt(e.attribute,t.attribute)}function yv(e,t){const r=f.flow(tF,rF);return f.isEqual(r(e),r(t))}function tF(e){return L(w({},e),{name:""})}function rF(e){return L(w({},e),{config:L(w({},e.config),{guid:""})})}function nF(e,t,r,n){if(r===void 0&&n===void 0)return!1;if([r,n].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?!vv(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(r,n)}const bv="sdkHookInit",oF=(e,t,r,n)=>{if(!r)return;$h(bv,{packageName:t,packageVersion:"2.3.0",hookName:e},r.httpClient).finally(n)};function iF(e){const{tracking:t,app:r}=f.useSisenseContext(),{trackEvent:n}=_c(),o=S.useRef(!1);S.useEffect(()=>{if(!(!t||!r)&&!o.current){const i={packageName:t.packageName||"sdk-ui",packageVersion:"2.3.0",hookName:e};n(bv,i,!t.enabled).finally(()=>o.current=!0)}},[t,e,n,r])}const wv=e=>t=>(...r)=>(iF(e),t(...r));function vc(e,t){switch(t.type){case"loading":return aF(e);case"success":return sF(t.data);case"error":return lF(t.error)}}function aF(e){return e.status==="loading"?e:L(w({},e),{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0})}function sF(e){return{isLoading:!1,isError:!1,isSuccess:!0,data:e,status:"success",error:void 0}}function lF(e){return{isLoading:!1,isError:!0,isSuccess:!1,data:void 0,status:"error",error:e}}function xv({enabled:e},t){const r=S.useRef(!1);return S.useCallback((n,o=!1)=>{const i=e===!1||!n,a=r.current;return r.current=i,!i&&(a||t||o)},[e,t])}var rl=function(){return f.root.Date.now()},cF="Expected a function",uF=Math.max,dF=Math.min;function fF(e,t,r){var n,o,i,a,s,l,c=0,d=!1,p=!1,h=!0;if(typeof e!="function")throw new TypeError(cF);t=f.toNumber(t)||0,f.isObject(r)&&(d=!!r.leading,p="maxWait"in r,i=p?uF(f.toNumber(r.maxWait)||0,t):i,h="trailing"in r?!!r.trailing:h);function m(_){var O=n,k=o;return n=o=void 0,c=_,a=e.apply(k,O),a}function v(_){return c=_,s=setTimeout(b,t),d?m(_):a}function g(_){var O=_-l,k=_-c,D=t-O;return p?dF(D,i-k):D}function y(_){var O=_-l,k=_-c;return l===void 0||O>=t||O<0||p&&k>=i}function b(){var _=rl();if(y(_))return T(_);s=setTimeout(b,g(_))}function T(_){return s=void 0,h&&n?m(_):(n=o=void 0,a)}function E(){s!==void 0&&clearTimeout(s),c=0,n=l=o=s=void 0}function x(){return s===void 0?a:T(rl())}function C(){var _=rl(),O=y(_);if(n=arguments,o=this,l=_,O){if(s===void 0)return v(l);if(p)return clearTimeout(s),s=setTimeout(b,t),m(l)}return s===void 0&&(s=setTimeout(b,t)),a}return C.cancel=E,C.flush=x,C}function Wu(e,{onLocalStateChange:t,syncCompareFn:r=f.isEqual}={}){const[n,o]=S.useState(e),i=S.useRef(e);S.useEffect(()=>{r(i.current,e)||o(e),i.current=e},[e,r]);const a=S.useCallback(s=>{o(l=>{const c=f.isFunction(s)?s(l):s;return t==null||t(c),c})},[t]);return[n,a]}function pF({chartType:e,dataOptions:t,enabled:r}){const[n,o]=S.useState([]),i=S.useMemo(()=>{var h;const p=f.isCartesian(e)&&((h=t.category)==null?void 0:h.length)===1||f.isScatter(e);return r&&p},[r,e,t]),a=S.useMemo(()=>{if(n.length===0)return p=>L(w({},p),{series:p.series.map(h=>L(w({},h),{data:h.data.map(m=>L(w({},m),{selected:!1}))}))});if(f.isScatter(e))return p=>L(w({},p),{series:p.series.map(h=>L(w({},h),{data:h.data.map(m=>L(w({},m),{selected:!n.some(v=>{var g,y;return v.x===m.x&&v.y===m.y&&v.size===m.z&&v.breakByPoint===((g=m.custom)==null?void 0:g.maskedBreakByPoint)&&v.breakByColor===((y=m.custom)==null?void 0:y.maskedBreakByColor)})}))}))});{const p=n.reduce((h,{categoryValue:m})=>(m&&(h[`${m}`]=!0),h),{});return h=>L(w({},h),{series:h.series.map(m=>L(w({},m),{data:m.data.map(v=>{var g,y;return p[(y=(g=v.custom)==null?void 0:g.xValue)==null?void 0:y[0]]?v:L(w({},v),{selected:!0})})}))})}},[n,e]),s=S.useMemo(()=>p=>{var h;return L(w({},p),{chart:L(w({},p.chart),{events:L(w({},(h=p.chart)==null?void 0:h.events),{click:()=>{o([])}})})})},[]),l=S.useCallback(p=>(i&&(p=a(p),p=s(p)),p),[a,s,i]),c=S.useCallback(p=>{i&&o(p)},[i]),d=S.useCallback(p=>{i&&o([p])},[i]);return{onBeforeRender:l,onDataPointsSelected:c,onDataPointClick:d}}const Cv=()=>{const e=ma();if(!e)throw new f.TranslatableError("errors.missingMenuRoot");const{openMenu:t,closeMenu:r}=e;return{openMenu:t,closeMenu:r}};function yc(e){return e&&e.length?Jc(e):[]}function hF(e,t,r,n){for(var o=-1,i=e==null?0:e.length;++o<i;){var a=e[o];t(n,a,r(a),e)}return n}function gF(e,t){return function(r,n){if(r==null)return r;if(!f.isArrayLike(r))return e(r,n);for(var o=r.length,i=-1,a=Object(r);++i<o&&n(a[i],i,a)!==!1;);return r}}var mF=gF(f.baseForOwn);function vF(e,t,r,n){return mF(e,function(o,i,a){t(n,o,r(o),a)}),n}function Ev(e,t){return function(r,n){var o=f.isArray(r)?hF:vF,i=t?t():{};return o(r,e,f.baseIteratee(n),i)}}var oi=Ev(function(e,t,r){e[r?0:1].push(t)},function(){return[[],[]]});const yF=In(Z.jsx("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"),bF=de(qr)(Ye(({theme:e})=>L(w({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":w({},e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}),"&:active":w({boxShadow:e.shadows[0]},e.palette.mode==="light"?{backgroundColor:pl(e.palette.grey[200],.12)}:{backgroundColor:pl(e.palette.grey[600],.12)})}))),wF=de(yF)({width:24,height:16});function Tv(e){const i=e,{slots:t={},slotProps:r={}}=i,n=te(i,["slots","slotProps"]),o=e;return Z.jsx("li",{children:Z.jsx(bF,L(w({focusRipple:!0},n),{ownerState:o,children:Z.jsx(wF,w({as:t.CollapsedIcon,ownerState:o},r.collapsedIcon))}))})}process.env.NODE_ENV!=="production"&&(Tv.propTypes={slotProps:u.shape({collapsedIcon:u.oneOfType([u.func,u.object])}),slots:u.shape({CollapsedIcon:u.elementType}),sx:u.object});function xF(e){return Oe("MuiBreadcrumbs",e)}const CF=ke("MuiBreadcrumbs",["root","ol","li","separator"]),EF=e=>{const{classes:t}=e;return Be({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},xF,t)},TF=de(vt,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${CF.li}`]:t.li},t.root]})({}),SF=de("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),RF=de("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function _F(e,t,r,n){return e.reduce((o,i,a)=>(a<e.length-1?o=o.concat(i,Z.jsx(RF,{"aria-hidden":!0,className:t,ownerState:n,children:r},`separator-${a}`)):o.push(i),o),[])}const Sv=N.forwardRef(function(t,r){const n=Fe({props:t,name:"MuiBreadcrumbs"}),O=n,{children:o,className:i,component:a="nav",slots:s={},slotProps:l={},expandText:c="Show path",itemsAfterCollapse:d=1,itemsBeforeCollapse:p=1,maxItems:h=8,separator:m="/"}=O,v=te(O,["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"]),[g,y]=N.useState(!1),b=L(w({},n),{component:a,expanded:g,expandText:c,itemsAfterCollapse:d,itemsBeforeCollapse:p,maxItems:h,separator:m}),T=EF(b),E=Ic({elementType:s.CollapsedIcon,externalSlotProps:l.collapsedIcon,ownerState:b}),x=N.useRef(null),C=k=>{const D=()=>{y(!0);const F=x.current.querySelector("a[href],button,[tabindex]");F&&F.focus()};return p+d>=k.length?(process.env.NODE_ENV!=="production"&&console.error(["MUI: You have provided an invalid combination of props to the Breadcrumbs.",`itemsAfterCollapse={${d}} + itemsBeforeCollapse={${p}} >= maxItems={${h}}`].join(`
332
+ `)):null),classes:u.object,className:u.string,color:u.oneOfType([u.oneOf(["inherit","default","primary","secondary","error","info","success","warning"]),u.string]),disabled:u.bool,disableFocusRipple:u.bool,disableRipple:u.bool,edge:u.oneOf(["end","start",!1]),id:u.string,loading:u.bool,loadingIndicator:u.node,size:u.oneOfType([u.oneOf(["small","medium","large"]),u.string]),sx:u.oneOfType([u.arrayOf(u.oneOfType([u.func,u.object,u.bool])),u.func,u.object])});function YL({fill:e="rgba(38, 46, 61, 0.67)"}){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:f.jsx("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"})})}function qL({title:e,description:t,errorMessages:r=[],styleOptions:n,onRefresh:o}){var b,T,E;const[i,a]=S.useState(null),{themeSettings:s}=f.useThemeContext(),{typography:{primaryTextColor:l,secondaryTextColor:c,fontFamily:d}}=s,{t:p}=f.useTranslation(),h=x=>{a(x.currentTarget)},m=()=>{a(null)},v=S.useMemo(()=>e?f.jsx(vt,{variant:"body2",style:{color:l,fontFamily:d,fontSize:13},children:e}):null,[e,l,d]),g=S.useMemo(()=>r.length===0?null:r.map(x=>f.jsxs(f.Fragment,{children:[f.jsx(Fr,{sx:{my:1,borderColor:c,opacity:.3,marginY:"8px"}}),f.jsxs("div",{className:"csdk-flex",children:[f.jsx("div",{className:"csdk-shrink-0 csdk-grow-0",children:f.jsx(YL,{fill:"#fa5656"})}),f.jsx(vt,{variant:"body2",className:"csdk-grow-1",style:{color:c,fontFamily:d,fontSize:13,marginLeft:5,lineHeight:"24px",letterSpacing:"normal",overflowWrap:"anywhere"},children:x})]})]})),[r,c,d]),y=S.useMemo(()=>t?f.jsxs(f.Fragment,{children:[f.jsx(Fr,{sx:{my:"8px",borderColor:c,opacity:.3}}),f.jsx(vt,{variant:"body2",style:{color:c,fontFamily:d,fontSize:13},children:t})]}):null,[t,c,d]);return f.jsxs(f.Fragment,{children:[f.jsx(hs,{title:p("widgetHeader.info.tooltip"),style:{color:(b=s.chart)==null?void 0:b.textColor,fontFamily:(T=s.typography)==null?void 0:T.fontFamily},children:f.jsx(Gr,{onClick:h,sx:{p:0},children:f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",children:f.jsx("path",{fill:(n==null?void 0:n.titleTextColor)||s.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"})})})}),f.jsx(qc,{open:!!i,position:i?{anchorEl:i,anchorOrigin:{vertical:"bottom",horizontal:"center"},contentOrigin:{vertical:"top",horizontal:"center"}}:void 0,onClose:m,children:f.jsxs(hv,{raised:!0,className:"csdk-max-w-xs csdk-w-[300px]",children:[f.jsxs("div",{className:"csdk-flex csdk-flex-row csdk-justify-between csdk-items-center csdk-py-[5px] csdk-px-[12px]",style:{backgroundColor:f.getSlightlyDifferentColor(s.general.backgroundColor)},children:[f.jsx(vt,{variant:"subtitle2",sx:{fontWeight:"bold"},style:{color:s.typography.primaryTextColor,fontFamily:s.typography.fontFamily},children:p("widgetHeader.info.details")}),f.jsx(Gr,{onClick:o,sx:{p:0},children:f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",children:f.jsx("path",{fill:(E=s.chart)==null?void 0:E.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"})})})]}),f.jsx(Fr,{sx:{borderColor:s.typography.secondaryTextColor,opacity:.3}}),f.jsxs(gv,{style:{backgroundColor:s.general.backgroundColor,padding:12},children:[v,g,y]})]})})]})}const XL=({title:e,description:t,errorMessages:r=[],warningMessages:n=[],dataSetName:o,styleOptions:i,onRefresh:a})=>{var c;const{themeSettings:s}=f.useThemeContext(),l=()=>{var p;const d=f.jsx(f.Fragment,{children:f.jsx(qL,{title:o,description:t,styleOptions:i,errorMessages:r,warningMessages:n,onRefresh:a})});return i!=null&&i.renderToolbar?(p=i==null?void 0:i.renderToolbar)==null?void 0:p.call(i,a,d):d};return f.jsxs(f.Fragment,{children:[f.jsxs("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)||s.widget.header.backgroundColor},children:[f.jsx("div",{className:"csdk-w-full csdk-whitespace-nowrap csdk-overflow-hidden",style:{textAlign:KL((i==null?void 0:i.titleAlignment)||s.widget.header.titleAlignment),color:(i==null?void 0:i.titleTextColor)||s.widget.header.titleTextColor,fontFamily:(c=s.typography)==null?void 0:c.fontFamily,fontSize:s.widget.header.titleFontSize},children:e||""}),f.jsx("div",{className:"csdk-ml-auto csdk-flex csdk-items-center",children:l()})]}),f.get(i,"dividerLine",s.widget.header.dividerLine)&&f.jsx(Fr,{style:{backgroundColor:(i==null?void 0:i.dividerLineColor)||s.widget.header.dividerLineColor||"#e6e6e6"}})]})};function KL(e){return e.toLowerCase()}const mv=e=>f.jsx(TL,{children:f.jsx(QL,w({},e))}),QL=({dataSetName:e,styleOptions:t,title:r,description:n,topSlot:o,bottomSlot:i,children:a,onRefresh:s=()=>{}})=>{var p,h,m;const{errors:l,warnings:c}=uv(),{themeSettings:d}=f.useThemeContext();return f.jsx("div",{className:"csdk-w-full csdk-h-full csdk-overflow-hidden csdk-accessible",children:f.jsx("div",{className:"csdk-h-full",style:{padding:pv[f.get(t,"spaceAround",d.widget.spaceAround)]||"0px"},children:f.jsxs("div",{className:"csdk-h-full csdk-overflow-hidden",style:{backgroundColor:(t==null?void 0:t.backgroundColor)||"unset",borderWidth:f.get(t,"border",d.widget.border)?"1px":0,borderColor:(t==null?void 0:t.borderColor)||d.widget.borderColor,borderRadius:ML[(t==null?void 0:t.cornerRadius)||d.widget.cornerRadius]||0,boxShadow:OL(t,d),display:"flex",flexDirection:"column"},children:[!((p=t==null?void 0:t.header)!=null&&p.hidden)&&f.jsx(XL,{title:r,description:n,dataSetName:e,errorMessages:l,warningMessages:c,styleOptions:t==null?void 0:t.header,onRefresh:s}),o,f.jsx(D0,{theme:{chart:{backgroundColor:(t==null?void 0:t.backgroundColor)||((h=d.chart)==null?void 0:h.backgroundColor)}},children:f.jsx("div",{style:{flexGrow:1,minWidth:0,minHeight:0,backgroundColor:(t==null?void 0:t.backgroundColor)||((m=d.chart)==null?void 0:m.backgroundColor)},children:a})}),i]})})})},ZL=e=>{const t=JL(e);return t.config.disabled=!e.config.disabled,t},JL=e=>{const t=f.cloneDeep(e);return Object.setPrototypeOf(t,e),t};function eF(e,t,r){const n={guid:t,excludeMembers:!1,backgroundFilter:r};return f.members(e,[],n)}function gs(e){if(!f.isMembersFilter(e))throw new f.TranslatableError("errors.notAMembersFilter");const{attribute:t,config:{guid:r,backgroundFilter:n}}=e;return eF(t,r,n)}function Hu(e){return"members"in e&&e.members.length===0}function Pt(e,t){return e.expression===(t==null?void 0:t.expression)&&e.granularity===t.granularity}function vv(e,t){return e===void 0&&t===void 0?!1:[e,t].some(r=>r===void 0)||e.length!==t.length?!0:e.length===0&&t.length===0?!1:e.some((r,n)=>!f.isEqualWith(r,t[n],yv))}function zu(e,t){return Pt(e.attribute,t.attribute)}function yv(e,t){const r=f.flow(tF,rF);return f.isEqual(r(e),r(t))}function tF(e){return L(w({},e),{name:""})}function rF(e){return L(w({},e),{config:L(w({},e.config),{guid:""})})}function nF(e,t,r,n){if(r===void 0&&n===void 0)return!1;if([r,n].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?!vv(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(r,n)}const bv="sdkHookInit",oF=(e,t,r,n)=>{if(!r)return;$h(bv,{packageName:t,packageVersion:"2.3.1",hookName:e},r.httpClient).finally(n)};function iF(e){const{tracking:t,app:r}=f.useSisenseContext(),{trackEvent:n}=_c(),o=S.useRef(!1);S.useEffect(()=>{if(!(!t||!r)&&!o.current){const i={packageName:t.packageName||"sdk-ui",packageVersion:"2.3.1",hookName:e};n(bv,i,!t.enabled).finally(()=>o.current=!0)}},[t,e,n,r])}const wv=e=>t=>(...r)=>(iF(e),t(...r));function vc(e,t){switch(t.type){case"loading":return aF(e);case"success":return sF(t.data);case"error":return lF(t.error)}}function aF(e){return e.status==="loading"?e:L(w({},e),{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0})}function sF(e){return{isLoading:!1,isError:!1,isSuccess:!0,data:e,status:"success",error:void 0}}function lF(e){return{isLoading:!1,isError:!0,isSuccess:!1,data:void 0,status:"error",error:e}}function xv({enabled:e},t){const r=S.useRef(!1);return S.useCallback((n,o=!1)=>{const i=e===!1||!n,a=r.current;return r.current=i,!i&&(a||t||o)},[e,t])}var rl=function(){return f.root.Date.now()},cF="Expected a function",uF=Math.max,dF=Math.min;function fF(e,t,r){var n,o,i,a,s,l,c=0,d=!1,p=!1,h=!0;if(typeof e!="function")throw new TypeError(cF);t=f.toNumber(t)||0,f.isObject(r)&&(d=!!r.leading,p="maxWait"in r,i=p?uF(f.toNumber(r.maxWait)||0,t):i,h="trailing"in r?!!r.trailing:h);function m(_){var O=n,k=o;return n=o=void 0,c=_,a=e.apply(k,O),a}function v(_){return c=_,s=setTimeout(b,t),d?m(_):a}function g(_){var O=_-l,k=_-c,D=t-O;return p?dF(D,i-k):D}function y(_){var O=_-l,k=_-c;return l===void 0||O>=t||O<0||p&&k>=i}function b(){var _=rl();if(y(_))return T(_);s=setTimeout(b,g(_))}function T(_){return s=void 0,h&&n?m(_):(n=o=void 0,a)}function E(){s!==void 0&&clearTimeout(s),c=0,n=l=o=s=void 0}function x(){return s===void 0?a:T(rl())}function C(){var _=rl(),O=y(_);if(n=arguments,o=this,l=_,O){if(s===void 0)return v(l);if(p)return clearTimeout(s),s=setTimeout(b,t),m(l)}return s===void 0&&(s=setTimeout(b,t)),a}return C.cancel=E,C.flush=x,C}function Wu(e,{onLocalStateChange:t,syncCompareFn:r=f.isEqual}={}){const[n,o]=S.useState(e),i=S.useRef(e);S.useEffect(()=>{r(i.current,e)||o(e),i.current=e},[e,r]);const a=S.useCallback(s=>{o(l=>{const c=f.isFunction(s)?s(l):s;return t==null||t(c),c})},[t]);return[n,a]}function pF({chartType:e,dataOptions:t,enabled:r}){const[n,o]=S.useState([]),i=S.useMemo(()=>{var h;const p=f.isCartesian(e)&&((h=t.category)==null?void 0:h.length)===1||f.isScatter(e);return r&&p},[r,e,t]),a=S.useMemo(()=>{if(n.length===0)return p=>L(w({},p),{series:p.series.map(h=>L(w({},h),{data:h.data.map(m=>L(w({},m),{selected:!1}))}))});if(f.isScatter(e))return p=>L(w({},p),{series:p.series.map(h=>L(w({},h),{data:h.data.map(m=>L(w({},m),{selected:!n.some(v=>{var g,y;return v.x===m.x&&v.y===m.y&&v.size===m.z&&v.breakByPoint===((g=m.custom)==null?void 0:g.maskedBreakByPoint)&&v.breakByColor===((y=m.custom)==null?void 0:y.maskedBreakByColor)})}))}))});{const p=n.reduce((h,{categoryValue:m})=>(m&&(h[`${m}`]=!0),h),{});return h=>L(w({},h),{series:h.series.map(m=>L(w({},m),{data:m.data.map(v=>{var g,y;return p[(y=(g=v.custom)==null?void 0:g.xValue)==null?void 0:y[0]]?v:L(w({},v),{selected:!0})})}))})}},[n,e]),s=S.useMemo(()=>p=>{var h;return L(w({},p),{chart:L(w({},p.chart),{events:L(w({},(h=p.chart)==null?void 0:h.events),{click:()=>{o([])}})})})},[]),l=S.useCallback(p=>(i&&(p=a(p),p=s(p)),p),[a,s,i]),c=S.useCallback(p=>{i&&o(p)},[i]),d=S.useCallback(p=>{i&&o([p])},[i]);return{onBeforeRender:l,onDataPointsSelected:c,onDataPointClick:d}}const Cv=()=>{const e=ma();if(!e)throw new f.TranslatableError("errors.missingMenuRoot");const{openMenu:t,closeMenu:r}=e;return{openMenu:t,closeMenu:r}};function yc(e){return e&&e.length?Jc(e):[]}function hF(e,t,r,n){for(var o=-1,i=e==null?0:e.length;++o<i;){var a=e[o];t(n,a,r(a),e)}return n}function gF(e,t){return function(r,n){if(r==null)return r;if(!f.isArrayLike(r))return e(r,n);for(var o=r.length,i=-1,a=Object(r);++i<o&&n(a[i],i,a)!==!1;);return r}}var mF=gF(f.baseForOwn);function vF(e,t,r,n){return mF(e,function(o,i,a){t(n,o,r(o),a)}),n}function Ev(e,t){return function(r,n){var o=f.isArray(r)?hF:vF,i=t?t():{};return o(r,e,f.baseIteratee(n),i)}}var oi=Ev(function(e,t,r){e[r?0:1].push(t)},function(){return[[],[]]});const yF=In(Z.jsx("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"),bF=de(qr)(Ye(({theme:e})=>L(w({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":w({},e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}),"&:active":w({boxShadow:e.shadows[0]},e.palette.mode==="light"?{backgroundColor:pl(e.palette.grey[200],.12)}:{backgroundColor:pl(e.palette.grey[600],.12)})}))),wF=de(yF)({width:24,height:16});function Tv(e){const i=e,{slots:t={},slotProps:r={}}=i,n=te(i,["slots","slotProps"]),o=e;return Z.jsx("li",{children:Z.jsx(bF,L(w({focusRipple:!0},n),{ownerState:o,children:Z.jsx(wF,w({as:t.CollapsedIcon,ownerState:o},r.collapsedIcon))}))})}process.env.NODE_ENV!=="production"&&(Tv.propTypes={slotProps:u.shape({collapsedIcon:u.oneOfType([u.func,u.object])}),slots:u.shape({CollapsedIcon:u.elementType}),sx:u.object});function xF(e){return Oe("MuiBreadcrumbs",e)}const CF=ke("MuiBreadcrumbs",["root","ol","li","separator"]),EF=e=>{const{classes:t}=e;return Be({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},xF,t)},TF=de(vt,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${CF.li}`]:t.li},t.root]})({}),SF=de("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),RF=de("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function _F(e,t,r,n){return e.reduce((o,i,a)=>(a<e.length-1?o=o.concat(i,Z.jsx(RF,{"aria-hidden":!0,className:t,ownerState:n,children:r},`separator-${a}`)):o.push(i),o),[])}const Sv=N.forwardRef(function(t,r){const n=Fe({props:t,name:"MuiBreadcrumbs"}),O=n,{children:o,className:i,component:a="nav",slots:s={},slotProps:l={},expandText:c="Show path",itemsAfterCollapse:d=1,itemsBeforeCollapse:p=1,maxItems:h=8,separator:m="/"}=O,v=te(O,["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"]),[g,y]=N.useState(!1),b=L(w({},n),{component:a,expanded:g,expandText:c,itemsAfterCollapse:d,itemsBeforeCollapse:p,maxItems:h,separator:m}),T=EF(b),E=Ic({elementType:s.CollapsedIcon,externalSlotProps:l.collapsedIcon,ownerState:b}),x=N.useRef(null),C=k=>{const D=()=>{y(!0);const F=x.current.querySelector("a[href],button,[tabindex]");F&&F.focus()};return p+d>=k.length?(process.env.NODE_ENV!=="production"&&console.error(["MUI: You have provided an invalid combination of props to the Breadcrumbs.",`itemsAfterCollapse={${d}} + itemsBeforeCollapse={${p}} >= maxItems={${h}}`].join(`
333
333
  `)),k):[...k.slice(0,p),Z.jsx(Tv,{"aria-label":c,slots:{CollapsedIcon:s.CollapsedIcon},slotProps:{collapsedIcon:E},onClick:D},"ellipsis"),...k.slice(k.length-d,k.length)]},_=N.Children.toArray(o).filter(k=>(process.env.NODE_ENV!=="production"&&kc.isFragment(k)&&console.error(["MUI: The Breadcrumbs component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
334
334
  `)),N.isValidElement(k))).map((k,D)=>Z.jsx("li",{className:T.li,children:k},`child-${D}`));return Z.jsx(TF,L(w({ref:r,component:a,color:"textSecondary",className:he(T.root,i),ownerState:b},v),{children:Z.jsx(SF,{className:T.ol,ref:x,ownerState:b,children:_F(g||h&&_.length<=h?_:C(_),T.separator,m,b)})}))});process.env.NODE_ENV!=="production"&&(Sv.propTypes={children:u.node,classes:u.object,className:u.string,component:u.elementType,expandText:u.string,itemsAfterCollapse:Ut,itemsBeforeCollapse:Ut,maxItems:Ut,separator:u.node,slotProps:u.shape({collapsedIcon:u.oneOfType([u.func,u.object])}),slots:u.shape({CollapsedIcon:u.elementType}),sx:u.oneOfType([u.arrayOf(u.oneOfType([u.func,u.object,u.bool])),u.func,u.object])});function MF(e){return Oe("MuiButton",e)}const Or=ke("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","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),Rv=N.createContext({});process.env.NODE_ENV!=="production"&&(Rv.displayName="ButtonGroupContext");const _v=N.createContext(void 0);process.env.NODE_ENV!=="production"&&(_v.displayName="ButtonGroupButtonContext");const OF=e=>{const{color:t,disableElevation:r,fullWidth:n,size:o,variant:i,loading:a,loadingPosition:s,classes:l}=e,c={root:["root",a&&"loading",i,`${i}${fe(t)}`,`size${fe(o)}`,`${i}Size${fe(o)}`,`color${fe(t)}`,r&&"disableElevation",n&&"fullWidth",a&&`loadingPosition${fe(s)}`],startIcon:["icon","startIcon",`iconSize${fe(o)}`],endIcon:["icon","endIcon",`iconSize${fe(o)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},d=Be(c,MF,l);return w(w({},l),d)},Mv=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],kF=de(qr,{shouldForwardProp:e=>qo(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`${r.variant}${fe(r.color)}`],t[`size${fe(r.size)}`],t[`${r.variant}Size${fe(r.size)}`],r.color==="inherit"&&t.colorInherit,r.disableElevation&&t.disableElevation,r.fullWidth&&t.fullWidth,r.loading&&t.loading]}})(Ye(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],r=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return L(w({},e.typography.button),{minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${Or.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${Or.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${Or.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${Or.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter(Cr()).map(([n])=>({props:{color:n},style:{"--variant-textColor":(e.vars||e).palette[n].main,"--variant-outlinedColor":(e.vars||e).palette[n].main,"--variant-outlinedBorder":e.vars?`rgba(${e.vars.palette[n].mainChannel} / 0.5)`:Ne(e.palette[n].main,.5),"--variant-containedColor":(e.vars||e).palette[n].contrastText,"--variant-containedBg":(e.vars||e).palette[n].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[n].dark,"--variant-textBg":e.vars?`rgba(${e.vars.palette[n].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Ne(e.palette[n].main,e.palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[n].main,"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette[n].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Ne(e.palette[n].main,e.palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:r,"--variant-textBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Ne(e.palette.text.primary,e.palette.action.hoverOpacity),"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Ne(e.palette.text.primary,e.palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${Or.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${Or.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),[`&.${Or.loading}`]:{color:"transparent"}}}]})})),AF=de("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.startIcon,r.loading&&t.startIconLoadingStart,t[`iconSize${fe(r.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...Mv]})),IF=de("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.endIcon,r.loading&&t.endIconLoadingEnd,t[`iconSize${fe(r.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...Mv]})),PF=de("span",{name:"MuiButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>t.loadingIndicator})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]})),ah=de("span",{name:"MuiButton",slot:"LoadingIconPlaceholder",overridesResolver:(e,t)=>t.loadingIconPlaceholder})({display:"inline-block",width:"1em",height:"1em"}),Ho=N.forwardRef(function(t,r){const n=N.useContext(Rv),o=N.useContext(_v),i=To(n,t),a=Fe({props:i,name:"MuiButton"}),H=a,{children:s,color:l="primary",component:c="button",className:d,disabled:p=!1,disableElevation:h=!1,disableFocusRipple:m=!1,endIcon:v,focusVisibleClassName:g,fullWidth:y=!1,id:b,loading:T=null,loadingIndicator:E,loadingPosition:x="center",size:C="medium",startIcon:_,type:O,variant:k="text"}=H,D=te(H,["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","id","loading","loadingIndicator","loadingPosition","size","startIcon","type","variant"]),F=Ia(b),W=E!=null?E:Z.jsx(Bu,{"aria-labelledby":F,color:"inherit",size:16}),R=L(w({},a),{color:l,component:c,disabled:p,disableElevation:h,disableFocusRipple:m,fullWidth:y,loading:T,loadingIndicator:W,loadingPosition:x,size:C,type:O,variant:k}),A=OF(R),B=(_||T&&x==="start")&&Z.jsx(AF,{className:A.startIcon,ownerState:R,children:_||Z.jsx(ah,{className:A.loadingIconPlaceholder,ownerState:R})}),j=(v||T&&x==="end")&&Z.jsx(IF,{className:A.endIcon,ownerState:R,children:v||Z.jsx(ah,{className:A.loadingIconPlaceholder,ownerState:R})}),$=o||"",I=typeof T=="boolean"?Z.jsx("span",{className:A.loadingWrapper,style:{display:"contents"},children:T&&Z.jsx(PF,{className:A.loadingIndicator,ownerState:R,children:W})}):null;return Z.jsxs(kF,L(w({ownerState:R,className:he(n.className,A.root,d,$),component:c,disabled:p||T,focusRipple:!m,focusVisibleClassName:he(A.focusVisible,g),ref:r,type:O,id:T?F:b},D),{classes:A,children:[B,x!=="end"&&I,s,x==="end"&&I,j]}))});process.env.NODE_ENV!=="production"&&(Ho.propTypes={children:u.node,classes:u.object,className:u.string,color:u.oneOfType([u.oneOf(["inherit","primary","secondary","success","error","info","warning"]),u.string]),component:u.elementType,disabled:u.bool,disableElevation:u.bool,disableFocusRipple:u.bool,disableRipple:u.bool,endIcon:u.node,focusVisibleClassName:u.string,fullWidth:u.bool,href:u.string,id:u.string,loading:u.bool,loadingIndicator:u.node,loadingPosition:u.oneOf(["center","end","start"]),size:u.oneOfType([u.oneOf(["small","medium","large"]),u.string]),startIcon:u.node,sx:u.oneOfType([u.arrayOf(u.oneOfType([u.func,u.object,u.bool])),u.func,u.object]),type:u.oneOfType([u.oneOf(["button","reset","submit"]),u.string]),variant:u.oneOfType([u.oneOf(["contained","outlined","text"]),u.string])});const DF=({clearDrilldownSelections:e,currentDimension:t,setIsHovered:r,themeProps:n})=>{const{t:o}=f.useTranslation(),i=t.name,a=f.newStyled(Ho,{target:"e1olvz1k0",label:"StyledCancelButton"})("&&{background-color:",n.activeDrillBackgroundColor,";color:",n.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:",n.activeDrillHoverBackgroundColor,";color:",n.primaryTextColor,";}}"),s=f.newStyled("svg",{target:"e1olvz1k1",label:"Icon"})("width:22px;height:22px;fill:#9ea2ab;"),l=()=>f.jsx(a,{theme:n,onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),onClick:e,children:f.jsx(s,{width:22,height:22,viewBox:"0 0 24 24",children:f.jsx("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=f.newStyled(Ho,{target:"e1olvz1k2",label:"StyledCurrentDrillButton"})("&&{position:relative;font-family:",p=>p.theme.fontFamily,";border-radius:0;border:1px solid ",Yt,";background-color:",p=>p.theme.chartBackgroundColor,";border-right:none;border-left:none;color:",p=>p.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:",p=>p.theme.chartBackgroundColor,";border:1px solid ",Yt,";border-right:none;border-left:none;}}");return{CancelButton:l,CurrentDrillButton:()=>f.jsxs(c,{theme:n,children:[i," (",o("drilldown.breadcrumbsAllSuffix"),")",f.jsx("span",{className:"flex items-center justify-between",children:f.jsx("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 ${Yt}`,borderRight:`1px solid ${Yt}`}})})]})}},$F={modifiers:[{name:"offset",options:{offset:[0,12]}}]},NF=({themeProps:e,filterDisplayValues:t,currentTable:r,currentColumn:n})=>{const{t:o}=f.useTranslation();return f.jsxs("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:[f.jsxs("div",{className:"csdk-border-b csdk-border-[#e4e4e4] csdk-p-3 csdk-pl-1",children:[f.jsx(vt,{variant:"body2",fontFamily:e.fontFamily,fontSize:11,children:o("drilldown.popover.members")}),f.jsx(vt,{variant:"body2",fontFamily:e.fontFamily,fontSize:13,children:t.join(", ")})]}),f.jsxs("div",{className:"csdk-border-b csdk-border-[#e4e4e4] csdk-p-3 csdk-pl-1",children:[f.jsx(vt,{variant:"body2",fontFamily:e.fontFamily,fontSize:11,children:o("drilldown.popover.table")}),f.jsx(vt,{variant:"body2",fontFamily:e.fontFamily,fontSize:13,children:r})]}),f.jsxs("div",{className:"csdk-p-3 csdk-pl-1",children:[f.jsx(vt,{variant:"body2",fontFamily:e.fontFamily,fontSize:11,children:o("drilldown.popover.column")}),f.jsx(vt,{variant:"body2",fontFamily:e.fontFamily,fontSize:13,children:n})]})]})},LF=({popperParams:e,currentDimension:t,themeProps:r})=>{const n=t.expression.match(/\[(.*?)]/),[o,i]=n?n[1].split("."):["",""],a=!!e;return f.jsx(ni,{open:a,anchorEl:e==null?void 0:e.anchorEl,placement:"bottom",popperOptions:$F,children:e&&f.jsx(NF,{themeProps:r,filterDisplayValues:e.filterDisplayValues,currentTable:o,currentColumn:i})})},FF=()=>{const{themeSettings:{typography:{primaryTextColor:e,secondaryTextColor:t,fontFamily:r},general:{backgroundColor:n,brandColor:o,primaryButtonTextColor:i},chart:{backgroundColor:a}}}=f.useThemeContext(),s=f.scaleBrightness(a,-.02),l=f.scaleBrightness(s,-.05);return{primaryTextColor:e,secondaryTextColor:t,fontFamily:r,backgroundColor:n,brandColor:o,primaryButtonTextColor:i,chartBackgroundColor:a,activeDrillBackgroundColor:s,activeDrillHoverBackgroundColor:l}},jF=f.newStyled(Gr,{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;}}}"),BF=f.newStyled(Gr,{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;}}}"),HF=({currentDimension:e,children:t})=>{const{t:r}=f.useTranslation(),n=S.useRef(null),[o,i]=S.useState(0),[a,s]=S.useState(0),[l,c]=S.useState(0),d=()=>{var v;return(v=n.current)==null?void 0:v.querySelector("ol")};S.useEffect(()=>{const v=d();if(v){const g=v.clientWidth,y=v.scrollWidth,b=v.scrollLeft;i(g),s(y),c(b)}},[e]),S.useEffect(()=>{const v=d();function g(){if(v){const T=v.clientWidth;i(T)}}function y(){if(v){const T=v.scrollLeft;c(T)}}const b=new ResizeObserver(g);return v?(b.observe(v),v.addEventListener("scroll",y),()=>{b.disconnect(),v.removeEventListener("scroll",y)}):()=>{}},[]);const p=v=>{const y="smooth",b=d();b&&b.scrollBy({left:v==="right"?200:-200,behavior:y})},h=l!=0,m=Math.floor(a-l)>o;return f.jsxs("div",{style:{position:"relative"},children:[h&&f.jsx(jF,{onClick:()=>p("left"),children:f.jsx("span",{"aria-label":"prev-item",children:r("drilldown.breadcrumbsPrev")})}),m&&f.jsx(BF,{onClick:()=>p("right"),children:f.jsx("span",{"aria-label":"next-item",children:r("drilldown.breadcrumbsNext")})}),f.jsx("div",{ref:n,children:t})]})},Yt="#F2F2F2",zF=f.newStyled(Ho,{target:"ex0ybhj0",label:"StyledDrillButton"})("&&{font-family:",({theme:e})=>e.fontFamily,";position:relative;border-radius:0;border:1px solid ",Yt,";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 ",Yt,";border-right:none;}.MuiTouchRipple-root{display:none;}}"),WF=f.newStyled(Sv,{target:"ex0ybhj1",label:"StyledBreadcrumbs"})(".MuiBreadcrumbs-ol{flex-wrap:nowrap;overflow:hidden;}.MuiBreadcrumbs-separator{display:none;}"),VF=({isActive:e,filterDisplayValue:t,handleMouseEnter:r,handleMouseLeave:n,handleClick:o,themeProps:i,popperParams:a,index:s})=>f.jsx(zF,{theme:i,active:e.toString(),index:s,onMouseEnter:r,onMouseLeave:n,onClick:o,children:f.jsxs("span",{className:"flex items-center justify-between",children:[f.jsxs("span",{className:"mr-2",children:[t.slice(0,2).join(", "),t.length>2&&", ..."]}),e?f.jsx("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 ${Yt}`,borderRight:`1px solid ${Yt}`,transition:"background-color 0.2s, border-color 0.2s, color 0.2s",zIndex:8}}):void 0,f.jsx("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 ${Yt}`,borderRight:`1px solid ${Yt}`,zIndex:7,transition:"background-color 0.2s, border-color 0.2s, color 0.2s"}})]})}),Ov=Xo({componentName:"DrilldownBreadcrumbs",shouldSkipSisenseContextWaiting:!0})(({filtersDisplayValues:e,currentDimension:t,clearDrilldownSelections:r,sliceDrilldownSelections:n})=>{const[o,i]=S.useState(null),[a,s]=S.useState(!1),l=FF(),{CancelButton:c,CurrentDrillButton:d}=DF({clearDrilldownSelections:r,currentDimension:t,isHovered:a,setIsHovered:s,themeProps:l}),p=g=>y=>{s(!0),i({filterDisplayValues:g,anchorEl:y.currentTarget})},h=()=>{s(!1),i(null)},m=g=>g<e.length-1,v=g=>g===e.length-2;return e.length?f.jsx("div",{"aria-label":"drilldown-breadcrumbs",children:f.jsx(HF,{currentDimension:t,children:f.jsxs(WF,{separator:null,sx:{backgroundColor:l.chartBackgroundColor,padding:"4px"},children:[f.jsx(c,{}),e.map((g,y)=>{const b=m(y),T=v(y);return f.jsx("div",{children:f.jsx(VF,{isActive:b,isLastActive:T,filterDisplayValue:g,handleMouseEnter:p(g),handleMouseLeave:h,handleClick:()=>n(y+1),themeProps:l,popperParams:o,index:y})},y)}),f.jsx(d,{}),f.jsx(LF,{popperParams:o,currentDimension:t,themeProps:l})]})})}):null}),kv=e=>{const{initialDimension:t,onDrilldownSelectionsChange:r}=e,n=S.useMemo(()=>e.drilldownPaths||[],[e.drilldownPaths]),o=S.useMemo(()=>e.drilldownSelections||[],[e.drilldownSelections]),{t:i}=f.useTranslation();if(!t)throw new f.TranslatableError("errors.drilldownNoInitialDimension");const[a,s]=Wu(o,{onLocalStateChange:r}),l=S.useMemo(()=>[f.translateColumnToAttribute(t),...a.map(({nextDimension:y})=>y)],[t,a]),c=S.useMemo(()=>n.filter(y=>{if(f.MetadataTypes.isAttribute(y)){const E=y;return l.every(x=>!Pt(x,E))}const T=y;return l.every((E,x)=>Pt(E,T.levels[x]))}),[n,l]),d=S.useCallback((y,b,T)=>{s(E=>Av(E,y,b,T))},[s]),p=S.useCallback(y=>{s(b=>b.slice(0,y))},[s]),h=S.useCallback(()=>{s([])},[s]),{drilldownFilters:m,drilldownFiltersDisplayValues:v,drilldownDimension:g}=S.useMemo(()=>Iv(a,t,i),[a,t,i]);return{drilldownSelections:a,availableDrilldownPaths:c,drilldownFilters:m,drilldownFiltersDisplayValues:v,drilldownDimension:g,selectDrilldown:d,sliceDrilldownSelections:p,clearDrilldownSelections:h}},Av=(e,t,r,n)=>{var h,m;if(!(n!=null&&n.levels))return[...e,{points:t,nextDimension:r}];if(Pt(n.levels[0],r))return[];const i=(h=e==null?void 0:e.findIndex(v=>Pt(v.nextDimension,r)))!=null?h:-1;if(i!==-1)return e.slice(0,i+1);const s=(m=f.last(e))==null?void 0:m.nextDimension,l=e.length?n.levels.findIndex(v=>s&&Pt(v,s)):0,c=n.levels.indexOf(r),p=n.levels.slice(l+1,c+1).map((v,g)=>({points:g===0?t:[],nextDimension:v}));return[...e,...p]},Iv=(e,t,r)=>{let n=t&&f.translateColumnToAttribute(t);const o=[],i=[];return e.forEach(({points:a,nextDimension:s})=>{o.push(f.members(n,a.map(UF)));const l=a.length?a.map(Pv):[`${n.name} (${r("drilldown.breadcrumbsAllSuffix")})`];i.push(l),n=s}),{drilldownFilters:o,drilldownFiltersDisplayValues:i,drilldownDimension:n}};function Pv(e){return"categoryDisplayValue"in e?`${e.categoryDisplayValue}`:"categoryValue"in e?`${e.categoryValue}`:""}function UF(e){return"categoryValue"in e?`${e.categoryValue}`:""}var GF=Object.prototype,YF=GF.hasOwnProperty,qF=Ev(function(e,t,r){YF.call(e,r)?e[r].push(t):f.baseAssignValue(e,r,[t])});function XF(e,t){return t.all?[]:e.filter(r=>{var n;return!((n=t.ids)!=null&&n.includes(r.config.guid))})}function Dv(e,t){return e.find(r=>Pt(r.attribute,t))}function $v(e,t,r){const n=Dv(r,e);return f.members(e,t.map(o=>`${o}`),{guid:n==null?void 0:n.config.guid,backgroundFilter:n==null?void 0:n.config.backgroundFilter})}function Nv(e,t){return zu(e,t)&&"members"in e&&"members"in t&&f.isEqual(e.members,t.members)}var la=function(e){return e.WIDGET_POINTS_DRILLDOWN="widget-points-drilldown",e.WIDGET_POINTS_CROSSFILTERING="widget-points-crossfiltering",e}({}),zo=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 Lv=2;function Bn(e,t){const r=e.flatMap(({entries:o={}})=>t.flatMap(i=>{const a=o[i];return a?(Array.isArray(a)?a:[a]).filter(({attribute:l})=>!!l):[]})),n=qF(r,({id:o})=>o);return Object.values(n).map(o=>({attribute:o[0].attribute,values:yc(o.map(({value:i})=>i)),displayValues:yc(o.map(({displayValue:i})=>i))}))}function KF(e){return Bn(e,["category"])}function QF(e){return Bn(e,["category"])}function ZF(e,t){const r=Bn(e,["category"]),n=r.length-1;return t.category.map((o,i)=>n===i?r[i]:{attribute:f.translateColumnToAttribute(o),values:[],displayValues:[]})}function JF(e){return Bn(e,["x","y","breakByPoint","breakByColor"])}function ej(e){return Bn(e,["geo"])}function tj(e){return Bn(e,["geo"])}function Hi(e,t,r){return e==="plugin"?[]:e==="text"?[]:e==="pivot"?[]:e==="treemap"||e==="sunburst"?ZF(r,t):f.isCartesian(e)||e==="pie"||e==="funnel"?KF(r):f.isBoxplot(e)?QF(r):f.isScatter(e)?JF(r):f.isScattermap(e)?ej(r):f.isAreamap(e)?tj(r):[]}function Vu(e,t){let r=[];return e==="plugin"?r=[]:e==="text"?r=[]:e==="pivot"?r=[...t.rows||[],...t.columns||[]]:f.isCartesian(e)||f.isCategorical(e)||f.isBoxplot(e)||f.isRange(e)?r=[...t.category]:f.isScatter(e)?r=[t.x,t.y,t.breakByPoint,t.breakByColor].filter(n=>!!(n&&!f.isMeasureColumn(n))):(f.isScattermap(e)||f.isAreamap(e))&&(r=[...t.geo]),r.map(f.translateColumnToAttribute)}function rj(e,t,r){const n=Dv(t,e.attribute);if(!n||Hu(n))return null;if(Nv(e,n))return gs(e);if(f.isMembersFilter(n)&&r){const[o,i]=oi(n.members,s=>e.members.includes(s));if(o.length===e.members.length&&i.length)return $v(e.attribute,i,[n])}return null}function nj(e,t,r){const n=t.filter(a=>!a.config.disabled),o=e.map(a=>rj(a,n,r)).filter(a=>!!a),i=e.length!==o.length;return{filters:i?e:o,isSelection:i}}function nl(e,t,r=!1){const n=e.map(({attribute:i,values:a})=>$v(i,a,t)),o=oj(t,n);return nj(o,t,r)}function oj(e,t){const r=e.filter(n=>n.config.locked);return r.length?t.filter(n=>!r.some(o=>zu(o,n))):t}function ij(e,t,r){const n=Hi(e,t,r).filter(({displayValues:s})=>s.length);if(n.length===0)return"";const[o]=n,i=r.length===1,a=o.displayValues.length>Lv;return n.length>1?i?n.map(s=>s.displayValues[0]).join(", "):a?"":o.displayValues.join(", "):a?o.attribute.name:o.displayValues.join(", ")}function sh(e,t,r){const n=ij(e,t,r);return n?{id:zo.CROSSFILTERING_CHART_POINTS_SELECTION,sectionTitle:n}:null}function lh(e,t){return{items:[{caption:e,onClick:t}]}}const aj=({initialDimension:e,drilldownPaths:t,drilldownSelections:r,openMenu:n,onDrilldownSelectionsChange:o})=>{const{t:i}=f.useTranslation(),{availableDrilldownPaths:a,drilldownFilters:s,drilldownFiltersDisplayValues:l,drilldownDimension:c,selectDrilldown:d,sliceDrilldownSelections:p,clearDrilldownSelections:h}=kv({initialDimension:e,drilldownPaths:t,drilldownSelections:r,onDrilldownSelectionsChange:o}),m=S.useCallback((g,y)=>{const b=[Fv(y,c),jv(a,c,(T,E)=>{d(y,T,E)},i)];n({id:la.WIDGET_POINTS_DRILLDOWN,position:g,itemSections:b})},[c,a,i,d,n]),v=S.useMemo(()=>c&&f.jsx(Ov,{filtersDisplayValues:l,currentDimension:c,clearDrilldownSelections:h,sliceDrilldownSelections:p}),[h,c,l,p]);return{drilldownDimension:c,drilldownFilters:s,breadcrumbs:v,openDrilldownMenu:m}};function Fv(e,t){const r=yc(e.map(Pv).filter(n=>!!n));return r.length>Lv?{id:zo.DRILLDOWN_CHART_POINTS_SELECTION,sectionTitle:t.name}:{id:zo.DRILLDOWN_CHART_POINTS_SELECTION,sectionTitle:r.join(", ")}}function sj(e){return 30+12*e}function jv(e,t,r,n){const[o,i]=oi(e,f.MetadataTypes.isAttribute.bind(f.MetadataTypes)),a=o.map(l=>({caption:l.name,onClick:()=>r(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:`${sj(d)}px`},disabled:Pt(c,t),onClick:()=>r(c,l)}))}]}));return{id:zo.DRILLDOWN_DRILL_DIRECTIONS,sectionTitle:n("drilldown.drillMenuItem"),items:[...s,...a]}}var ms=function(e){return e.HIGHLIGHT="highlight",e.FILTER="filter",e}({});function Bv(e){return function(t){t=f.toString(t);var r=F0(t)?Sl(t):void 0,n=r?r[0]:t.charAt(0),o=r?L0(r,1).join(""):t.slice(1);return n[e]()+o}}var Hv=Bv("toUpperCase");function lj(e){return Hv(f.toString(e).toLowerCase())}function cj(e,t,r,n){for(var o=-1,i=e==null?0:e.length;++o<i;)r=t(r,e[o],o,e);return r}function uj(e){return function(t){return e==null?void 0:e[t]}}var dj={À:"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"},fj=uj(dj),pj=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,hj="\\u0300-\\u036f",gj="\\ufe20-\\ufe2f",mj="\\u20d0-\\u20ff",vj=hj+gj+mj,yj="["+vj+"]",bj=RegExp(yj,"g");function wj(e){return e=f.toString(e),e&&e.replace(pj,fj).replace(bj,"")}var xj=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function Cj(e){return e.match(xj)||[]}var Ej=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function Tj(e){return Ej.test(e)}var zv="\\ud800-\\udfff",Sj="\\u0300-\\u036f",Rj="\\ufe20-\\ufe2f",_j="\\u20d0-\\u20ff",Mj=Sj+Rj+_j,Wv="\\u2700-\\u27bf",Vv="a-z\\xdf-\\xf6\\xf8-\\xff",Oj="\\xac\\xb1\\xd7\\xf7",kj="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Aj="\\u2000-\\u206f",Ij=" \\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",Uv="A-Z\\xc0-\\xd6\\xd8-\\xde",Pj="\\ufe0e\\ufe0f",Gv=Oj+kj+Aj+Ij,Yv="['’]",ch="["+Gv+"]",Dj="["+Mj+"]",qv="\\d+",$j="["+Wv+"]",Xv="["+Vv+"]",Kv="[^"+zv+Gv+qv+Wv+Vv+Uv+"]",Nj="\\ud83c[\\udffb-\\udfff]",Lj="(?:"+Dj+"|"+Nj+")",Fj="[^"+zv+"]",Qv="(?:\\ud83c[\\udde6-\\uddff]){2}",Zv="[\\ud800-\\udbff][\\udc00-\\udfff]",hn="["+Uv+"]",jj="\\u200d",uh="(?:"+Xv+"|"+Kv+")",Bj="(?:"+hn+"|"+Kv+")",dh="(?:"+Yv+"(?:d|ll|m|re|s|t|ve))?",fh="(?:"+Yv+"(?:D|LL|M|RE|S|T|VE))?",Jv=Lj+"?",e1="["+Pj+"]?",Hj="(?:"+jj+"(?:"+[Fj,Qv,Zv].join("|")+")"+e1+Jv+")*",zj="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Wj="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Vj=e1+Jv+Hj,Uj="(?:"+[$j,Qv,Zv].join("|")+")"+Vj,Gj=RegExp([hn+"?"+Xv+"+"+dh+"(?="+[ch,hn,"$"].join("|")+")",Bj+"+"+fh+"(?="+[ch,hn+uh,"$"].join("|")+")",hn+"?"+uh+"+"+dh,hn+"+"+fh,Wj,zj,qv,Uj].join("|"),"g");function Yj(e){return e.match(Gj)||[]}function qj(e,t,r){return e=f.toString(e),t=t,t===void 0?Tj(e)?Yj(e):Cj(e):e.match(t)||[]}var Xj="['’]",Kj=RegExp(Xj,"g");function Qj(e){return function(t){return cj(qj(wj(t).replace(Kj,"")),e,"")}}var t1=Qj(function(e,t,r){return t=t.toLowerCase(),e+(r?lj(t):t)});function Zj(e){const{_id:t,title:r,levels:n}=e;return{id:t,title:r,levels:n.map(o=>f.createDimensionalElementFromJaql(o))}}function r1(e,t,r){return _t(this,null,function*(){const o=yield new f.RestApi(e,r).getHierarchies(t);return o==null?void 0:o.map(i=>Zj(i))})}const Jj=wv("useGetHierarchyModels")(n1);function n1(e){const t=ju(e,["dataSource","dimension","ids","alwaysIncluded"]),r=xv(e,t),[n,o]=S.useReducer(vc,{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0}),{isInitialized:i,app:a}=f.useSisenseContext();return S.useEffect(()=>{i||o({type:"error",error:new f.TranslatableError("errors.sisenseContextNotFound")}),r(a)&&(o({type:"loading"}),r1(a.httpClient,e,a.defaultDataSource).then(s=>{o({type:"success",data:s})}).catch(s=>{o({type:"error",error:s})}))},[a,i,e,r]),n.data&&t?ph(vc(n,{type:"loading"})):ph(n)}function ph(e){const n=e,{data:t}=n,r=te(n,["data"]);return L(w({},r),{hierarchies:t})}function eB({attribute:e,dataSource:t,drilldownPaths:r=[],enabled:n}){const[o,i]=S.useMemo(()=>oi(r,f.isString),[r]),{hierarchies:a=[]}=n1({enabled:n,dataSource:t,dimension:e,ids:o,alwaysIncluded:!0});return S.useMemo(()=>a.length?[...a,...i]:i,[a,i])}function tB(e,t){return Vu(e,t)[0]}function rB(e){return[...f.CARTESIAN_CHART_TYPES,...f.CATEGORICAL_CHART_TYPES,...f.SCATTER_CHART_TYPES,...f.BOXPLOT_CHART_TYPES,...f.RANGE_CHART_TYPES].includes(e)}function nB(e,t){return Vu(e,t).length===1}function oB(e,t){return nB(e,t)&&rB(e)}function o1(e,t,r){const n=o=>!!o&&!Pt(r,f.translateColumnToAttribute(o));if(f.isCartesian(e)||f.isCategorical(e)||f.isBoxplot(e)||f.isRange(e)){const o=t.category[0];if(n(o))return L(w({},t),{category:[r]})}else if(f.isScatter(e)){const o=t,i=["x","y","breakByPoint","breakByColor"];for(const a of i){const s=o[a];if(s&&!f.isMeasureColumn(s)&&n(s))return L(w({},o),{[a]:r})}}return t}function hh(e,t,r){return e.map(n=>{const o=["x","y","breakByPoint","breakByColor"],i=[...o,"size"].some(s=>s in n),a=o.find(s=>r[s]&&!f.isMeasureColumn(r[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?n[a]:s.point.options.custom[t1(`{masked ${a}`)];return{categoryValue:c,categoryDisplayValue:c}}return n})}const iB=({propsToExtend:e,onDrilldownSelectionsChange:t})=>{const{chartType:r,dataOptions:n,dataSource:o,drilldownOptions:i}=e,{drilldownSelections:a}=i||{},{openMenu:s}=Cv(),l=S.useMemo(()=>oB(r,n),[r,n]),c=S.useMemo(()=>(i==null?void 0:i.drilldownPaths)||[],[i==null?void 0:i.drilldownPaths]),d=S.useMemo(()=>{const k=f.createAttribute({name:"dummy drilldown initial attribute"});return tB(r,n)||k},[r,n]),p=eB({attribute:d,dataSource:o,drilldownPaths:c,enabled:l}),h=S.useMemo(()=>{var D;return(((D=i==null?void 0:i.drilldownSelections)==null?void 0:D.length)||(p==null?void 0:p.length))&&l},[i,l,p]),{drilldownDimension:m,drilldownFilters:v,breadcrumbs:g,openDrilldownMenu:y}=aj({initialDimension:d,drilldownSelections:a,drilldownPaths:p,openMenu:s,onDrilldownSelectionsChange:t}),b=S.useCallback((k,D)=>{const F=hh(k,D,n);y({left:D.clientX,top:D.clientY},F)},[n,y]),T=S.useCallback((k,D)=>{const F=hh([k],D,n);y({left:D.clientX,top:D.clientY},F)},[n,y]),E=S.useMemo(()=>o1(r,n,m),[r,n,m]),x=S.useMemo(()=>v.length?Oh(e.filters||[],v):e.filters,[e.filters,v]),C=S.useMemo(()=>f.combineHandlers([b,e.onDataPointsSelected]),[b,e.onDataPointsSelected]),_=S.useMemo(()=>f.combineHandlers([T,e.onDataPointContextMenu]),[T,e.onDataPointContextMenu]);return{propsWithDrilldown:w(w({},e),h&&{dataOptions:E,filters:x,onDataPointsSelected:C,onDataPointContextMenu:_}),isDrilldownEnabled:h,breadcrumbs:g}},aB=Xo({componentName:"ChartWidget"})(e=>{var k,D;const{app:t}=f.useSisenseContext(),{chartType:r,dataSource:n=t==null?void 0:t.defaultDataSource,dataOptions:o,styleOptions:i,highlightSelectionDisabled:a=!1,highlights:s,description:l,onChange:c}=e,{width:d,height:p}=i||{},h=K0(r,{hasHeader:!((k=i==null?void 0:i.header)!=null&&k.hidden)}),[m,v]=S.useState(0),g=S.useMemo(()=>f.omit(i,["width","height"]),[i]),y=S.useCallback(F=>{c==null||c({drilldownOptions:{drilldownSelections:F}})},[c]),{propsWithDrilldown:b,isDrilldownEnabled:T,breadcrumbs:E}=iB({propsToExtend:e,onDrilldownSelectionsChange:y}),x=pF({chartType:r,dataOptions:o,enabled:!a&&!T&&!(s!=null&&s.length)}),C=(D=t==null?void 0:t.settings.accessibilityConfig)==null?void 0:D.enabled,_=S.useCallback(F=>{var W;return C?L(w({},F),{accessibility:L(w({},F.accessibility),{description:l!=null?l:(W=F.accessibility)==null?void 0:W.description})}):F},[l,C]);if(!r||!o)return null;const O=L(w({},b),{dataSet:n,styleOptions:g,refreshCounter:m,onDataPointClick:S.useMemo(()=>f.combineHandlers([x.onDataPointClick,e.onDataPointClick]),[x.onDataPointClick,e.onDataPointClick]),onDataPointContextMenu:b.onDataPointContextMenu,onDataPointsSelected:S.useMemo(()=>f.combineHandlers([x.onDataPointsSelected,b.onDataPointsSelected]),[x.onDataPointsSelected,b.onDataPointsSelected]),onBeforeRender:S.useMemo(()=>f.combineHandlers([_,x.onBeforeRender,e.onBeforeRender],!0),[_,x.onBeforeRender,e.onBeforeRender])});return f.jsx(Fa,{defaultSize:h,size:{width:d,height:p},children:f.jsx(mv,L(w({},e),{topSlot:f.jsxs(f.Fragment,{children:[e.topSlot,E]}),dataSetName:n&&f.getDataSourceName(n),onRefresh:()=>v(m+1),children:f.jsx(dv,w({},O))}))})});class Hn{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){const r={listener:t};return this.listeners.add(r),this.onSubscribe(),()=>{this.listeners.delete(r),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}const Wo=typeof window=="undefined"||"Deno"in window;function Mt(){}function sB(e,t){return typeof e=="function"?e(t):e}function bc(e){return typeof e=="number"&&e>=0&&e!==1/0}function i1(e,t){return Math.max(e+(t||0)-Date.now(),0)}function uo(e,t,r){return ii(e)?typeof t=="function"?L(w({},r),{queryKey:e,queryFn:t}):L(w({},t),{queryKey:e}):e}function lB(e,t,r){return ii(e)?L(w({},t),{mutationKey:e}):typeof e=="function"?L(w({},t),{mutationFn:e}):w({},e)}function hr(e,t,r){return ii(e)?[L(w({},t),{queryKey:e}),r]:[e||{},t]}function gh(e,t){const{type:r="all",exact:n,fetchStatus:o,predicate:i,queryKey:a,stale:s}=e;if(ii(a)){if(n){if(t.queryHash!==Uu(a,t.options))return!1}else if(!vn(t.queryKey,a))return!1}if(r!=="all"){const l=t.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||typeof o!="undefined"&&o!==t.state.fetchStatus||i&&!i(t))}function mh(e,t){const{exact:r,fetching:n,predicate:o,mutationKey:i}=e;if(ii(i)){if(!t.options.mutationKey)return!1;if(r){if(Lr(t.options.mutationKey)!==Lr(i))return!1}else if(!vn(t.options.mutationKey,i))return!1}return!(typeof n=="boolean"&&t.state.status==="loading"!==n||o&&!o(t))}function Uu(e,t){return((t==null?void 0:t.queryKeyHashFn)||Lr)(e)}function Lr(e){return JSON.stringify(e,(t,r)=>wc(r)?Object.keys(r).sort().reduce((n,o)=>(n[o]=r[o],n),{}):r)}function vn(e,t){return a1(e,t)}function a1(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(r=>!a1(e[r],t[r])):!1}function s1(e,t){if(e===t)return e;const r=vh(e)&&vh(t);if(r||wc(e)&&wc(t)){const n=r?e.length:Object.keys(e).length,o=r?t:Object.keys(t),i=o.length,a=r?[]:{};let s=0;for(let l=0;l<i;l++){const c=r?l:o[l];a[c]=s1(e[c],t[c]),a[c]===e[c]&&s++}return n===i&&s===n?e:a}return t}function ca(e,t){if(e&&!t||t&&!e)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function vh(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function wc(e){if(!yh(e))return!1;const t=e.constructor;if(typeof t=="undefined")return!0;const r=t.prototype;return!(!yh(r)||!r.hasOwnProperty("isPrototypeOf"))}function yh(e){return Object.prototype.toString.call(e)==="[object Object]"}function ii(e){return Array.isArray(e)}function l1(e){return new Promise(t=>{setTimeout(t,e)})}function bh(e){l1(0).then(e)}function cB(){if(typeof AbortController=="function")return new AbortController}function xc(e,t,r){return r.isDataEqual!=null&&r.isDataEqual(e,t)?e:typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?s1(e,t):t}class uB extends Hn{constructor(){super(),this.setup=t=>{if(!Wo&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),window.addEventListener("focus",r,!1),()=>{window.removeEventListener("visibilitychange",r),window.removeEventListener("focus",r)}}}}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 r;this.setup=t,(r=this.cleanup)==null||r.call(this),this.cleanup=t(n=>{typeof n=="boolean"?this.setFocused(n):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=="undefined"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const ua=new uB,wh=["online","offline"];class dB extends Hn{constructor(){super(),this.setup=t=>{if(!Wo&&window.addEventListener){const r=()=>t();return wh.forEach(n=>{window.addEventListener(n,r,!1)}),()=>{wh.forEach(n=>{window.removeEventListener(n,r)})}}}}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 r;this.setup=t,(r=this.cleanup)==null||r.call(this),this.cleanup=t(n=>{typeof n=="boolean"?this.setOnline(n):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=="undefined"||typeof navigator.onLine=="undefined"?!0:navigator.onLine}}const da=new dB;function fB(e){return Math.min(1e3*Bt(2,e),3e4)}function vs(e){return(e!=null?e:"online")==="online"?da.isOnline():!0}class c1{constructor(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}}function zi(e){return e instanceof c1}function u1(e){let t=!1,r=0,n=!1,o,i,a;const s=new Promise((y,b)=>{i=y,a=b}),l=y=>{n||(m(new c1(y)),e.abort==null||e.abort())},c=()=>{t=!0},d=()=>{t=!1},p=()=>!ua.isFocused()||e.networkMode!=="always"&&!da.isOnline(),h=y=>{n||(n=!0,e.onSuccess==null||e.onSuccess(y),o==null||o(),i(y))},m=y=>{n||(n=!0,e.onError==null||e.onError(y),o==null||o(),a(y))},v=()=>new Promise(y=>{o=b=>{const T=n||!p();return T&&y(b),T},e.onPause==null||e.onPause()}).then(()=>{o=void 0,n||e.onContinue==null||e.onContinue()}),g=()=>{if(n)return;let y;try{y=e.fn()}catch(b){y=Promise.reject(b)}Promise.resolve(y).then(h).catch(b=>{var T,E;if(n)return;const x=(T=e.retry)!=null?T:3,C=(E=e.retryDelay)!=null?E:fB,_=typeof C=="function"?C(r,b):C,O=x===!0||typeof x=="number"&&r<x||typeof x=="function"&&x(r,b);if(t||!O){m(b);return}r++,e.onFail==null||e.onFail(r,b),l1(_).then(()=>{if(p())return v()}).then(()=>{t?m(b):g()})})};return vs(e.networkMode)?g():v().then(g),{promise:s,cancel:l,continue:()=>(o==null?void 0:o())?s:Promise.resolve(),cancelRetry:c,continueRetry:d}}const Gu=console;function pB(){let e=[],t=0,r=d=>{d()},n=d=>{d()};const o=d=>{let p;t++;try{p=d()}finally{t--,t||s()}return p},i=d=>{t?e.push(d):bh(()=>{r(d)})},a=d=>(...p)=>{i(()=>{d(...p)})},s=()=>{const d=e;e=[],d.length&&bh(()=>{n(()=>{d.forEach(p=>{r(p)})})})};return{batch:o,batchCalls:a,schedule:i,setNotifyFunction:d=>{r=d},setBatchNotifyFunction:d=>{n=d}}}const Ge=pB();class d1{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),bc(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(t){this.cacheTime=Math.max(this.cacheTime||0,t!=null?t:Wo?1/0:5*60*1e3)}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class hB extends d1{constructor(t){super(),this.abortSignalConsumed=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.logger=t.logger||Gu,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||gB(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(t){this.options=w(w({},this.defaultOptions),t),this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(t,r){const n=xc(this.state.data,t,this.options);return this.dispatch({data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){this.dispatch({type:"setState",state:t,setStateOptions:r})}cancel(t){var r;const n=this.promise;return(r=this.retryer)==null||r.cancel(t),n?n.then(Mt).catch(Mt):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||!i1(this.state.dataUpdatedAt,t)}onFocus(){var t;const r=this.observers.find(n=>n.shouldFetchOnWindowFocus());r&&r.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}onOnline(){var t;const r=this.observers.find(n=>n.shouldFetchOnReconnect());r&&r.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(r=>r!==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,r){var n,o;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&r!=null&&r.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 m=this.observers.find(v=>v.options.queryFn);m&&this.setOptions(m.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=cB(),s={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},l=m=>{Object.defineProperty(m,"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:r,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:c};if(l(d),(n=this.options.behavior)==null||n.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 h=m=>{if(zi(m)&&m.silent||this.dispatch({type:"error",error:m}),!zi(m)){var v,g,y,b;(v=(g=this.cache.config).onError)==null||v.call(g,m,this),(y=(b=this.cache.config).onSettled)==null||y.call(b,this.state.data,m,this),process.env.NODE_ENV!=="production"&&this.logger.error(m)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=u1({fn:d.fetchFn,abort:a==null?void 0:a.abort.bind(a),onSuccess:m=>{var v,g,y,b;if(typeof m=="undefined"){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),h(new Error(this.queryHash+" data is undefined"));return}this.setData(m),(v=(g=this.cache.config).onSuccess)==null||v.call(g,m,this),(y=(b=this.cache.config).onSettled)==null||y.call(b,m,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:h,onFail:(m,v)=>{this.dispatch({type:"failed",failureCount:m,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 r=n=>{var o,i;switch(t.type){case"failed":return L(w({},n),{fetchFailureCount:t.failureCount,fetchFailureReason:t.error});case"pause":return L(w({},n),{fetchStatus:"paused"});case"continue":return L(w({},n),{fetchStatus:"fetching"});case"fetch":return w(L(w({},n),{fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(o=t.meta)!=null?o:null,fetchStatus:vs(this.options.networkMode)?"fetching":"paused"}),!n.dataUpdatedAt&&{error:null,status:"loading"});case"success":return w(L(w({},n),{data:t.data,dataUpdateCount:n.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 zi(a)&&a.revert&&this.revertState?L(w({},this.revertState),{fetchStatus:"idle"}):L(w({},n),{error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"});case"invalidate":return L(w({},n),{isInvalidated:!0});case"setState":return w(w({},n),t.state)}};this.state=r(this.state),Ge.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate(t)}),this.cache.notify({query:this,type:"updated",action:t})})}}function gB(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=typeof t!="undefined",n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n!=null?n:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"loading",fetchStatus:"idle"}}class mB extends Hn{constructor(t){super(),this.config=t||{},this.queries=[],this.queriesMap={}}build(t,r,n){var o;const i=r.queryKey,a=(o=r.queryHash)!=null?o:Uu(i,r);let s=this.get(a);return s||(s=new hB({cache:this,logger:t.getLogger(),queryKey:i,queryHash:a,options:t.defaultQueryOptions(r),state:n,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 r=this.queriesMap[t.queryHash];r&&(t.destroy(),this.queries=this.queries.filter(n=>n!==t),r===t&&delete this.queriesMap[t.queryHash],this.notify({type:"removed",query:t}))}clear(){Ge.batch(()=>{this.queries.forEach(t=>{this.remove(t)})})}get(t){return this.queriesMap[t]}getAll(){return this.queries}find(t,r){const[n]=hr(t,r);return typeof n.exact=="undefined"&&(n.exact=!0),this.queries.find(o=>gh(n,o))}findAll(t,r){const[n]=hr(t,r);return Object.keys(n).length>0?this.queries.filter(o=>gh(n,o)):this.queries}notify(t){Ge.batch(()=>{this.listeners.forEach(({listener:r})=>{r(t)})})}onFocus(){Ge.batch(()=>{this.queries.forEach(t=>{t.onFocus()})})}onOnline(){Ge.batch(()=>{this.queries.forEach(t=>{t.onOnline()})})}}class vB extends d1{constructor(t){super(),this.defaultOptions=t.defaultOptions,this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||Gu,this.observers=[],this.state=t.state||f1(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=w(w({},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(r=>r!==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,r;return(t=(r=this.retryer)==null?void 0:r.continue())!=null?t:this.execute()}execute(){return _t(this,null,function*(){const t=()=>{var O;return this.retryer=u1({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(k,D)=>{this.dispatch({type:"failed",failureCount:k,error:D})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(O=this.options.retry)!=null?O:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},r=this.state.status==="loading";try{var n,o,i,a,s,l,c,d;if(!r){var p,h,m,v;this.dispatch({type:"loading",variables:this.options.variables}),yield(p=(h=this.mutationCache.config).onMutate)==null?void 0:p.call(h,this.state.variables,this);const k=yield(m=(v=this.options).onMutate)==null?void 0:m.call(v,this.state.variables);k!==this.state.context&&this.dispatch({type:"loading",context:k,variables:this.state.variables})}const O=yield t();return yield(n=(o=this.mutationCache.config).onSuccess)==null?void 0:n.call(o,O,this.state.variables,this.state.context,this),yield(i=(a=this.options).onSuccess)==null?void 0:i.call(a,O,this.state.variables,this.state.context),yield(s=(l=this.mutationCache.config).onSettled)==null?void 0:s.call(l,O,null,this.state.variables,this.state.context,this),yield(c=(d=this.options).onSettled)==null?void 0:c.call(d,O,null,this.state.variables,this.state.context),this.dispatch({type:"success",data:O}),O}catch(O){try{var g,y,b,T,E,x,C,_;throw yield(g=(y=this.mutationCache.config).onError)==null?void 0:g.call(y,O,this.state.variables,this.state.context,this),process.env.NODE_ENV!=="production"&&this.logger.error(O),yield(b=(T=this.options).onError)==null?void 0:b.call(T,O,this.state.variables,this.state.context),yield(E=(x=this.mutationCache.config).onSettled)==null?void 0:E.call(x,void 0,O,this.state.variables,this.state.context,this),yield(C=(_=this.options).onSettled)==null?void 0:C.call(_,void 0,O,this.state.variables,this.state.context),O}finally{this.dispatch({type:"error",error:O})}}})}dispatch(t){const r=n=>{switch(t.type){case"failed":return L(w({},n),{failureCount:t.failureCount,failureReason:t.error});case"pause":return L(w({},n),{isPaused:!0});case"continue":return L(w({},n),{isPaused:!1});case"loading":return L(w({},n),{context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!vs(this.options.networkMode),status:"loading",variables:t.variables});case"success":return L(w({},n),{data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1});case"error":return L(w({},n),{data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"});case"setState":return w(w({},n),t.state)}};this.state=r(this.state),Ge.batch(()=>{this.observers.forEach(n=>{n.onMutationUpdate(t)}),this.mutationCache.notify({mutation:this,type:"updated",action:t})})}}function f1(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class yB extends Hn{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,r,n){const o=new vB({mutationCache:this,logger:t.getLogger(),mutationId:++this.mutationId,options:t.defaultMutationOptions(r),state:n,defaultOptions:r.mutationKey?t.getMutationDefaults(r.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(r=>r!==t),this.notify({type:"removed",mutation:t})}clear(){Ge.batch(()=>{this.mutations.forEach(t=>{this.remove(t)})})}getAll(){return this.mutations}find(t){return typeof t.exact=="undefined"&&(t.exact=!0),this.mutations.find(r=>mh(t,r))}findAll(t){return this.mutations.filter(r=>mh(t,r))}notify(t){Ge.batch(()=>{this.listeners.forEach(({listener:r})=>{r(t)})})}resumePausedMutations(){var t;return this.resuming=((t=this.resuming)!=null?t:Promise.resolve()).then(()=>{const r=this.mutations.filter(n=>n.state.isPaused);return Ge.batch(()=>r.reduce((n,o)=>n.then(()=>o.continue().catch(Mt)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function bB(){return{onFetch:e=>{e.fetchFn=()=>{var t,r,n,o,i,a;const s=(t=e.fetchOptions)==null||(r=t.meta)==null?void 0:r.refetchPage,l=(n=e.fetchOptions)==null||(o=n.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",h=((i=e.state.data)==null?void 0:i.pages)||[],m=((a=e.state.data)==null?void 0:a.pageParams)||[];let v=m,g=!1;const y=_=>{Object.defineProperty(_,"signal",{enumerable:!0,get:()=>{var O;if((O=e.signal)!=null&&O.aborted)g=!0;else{var k;(k=e.signal)==null||k.addEventListener("abort",()=>{g=!0})}return e.signal}})},b=e.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+e.options.queryHash+"'")),T=(_,O,k,D)=>(v=D?[O,...v]:[...v,O],D?[k,..._]:[..._,k]),E=(_,O,k,D)=>{if(g)return Promise.reject("Cancelled");if(typeof k=="undefined"&&!O&&_.length)return Promise.resolve(_);const F={queryKey:e.queryKey,pageParam:k,meta:e.options.meta};y(F);const W=b(F);return Promise.resolve(W).then(A=>T(_,k,A,D))};let x;if(!h.length)x=E([]);else if(d){const _=typeof c!="undefined",O=_?c:xh(e.options,h);x=E(h,_,O)}else if(p){const _=typeof c!="undefined",O=_?c:wB(e.options,h);x=E(h,_,O,!0)}else{v=[];const _=typeof e.options.getNextPageParam=="undefined";x=(s&&h[0]?s(h[0],0,h):!0)?E([],_,m[0]):Promise.resolve(T([],m[0],h[0]));for(let k=1;k<h.length;k++)x=x.then(D=>{if(s&&h[k]?s(h[k],k,h):!0){const W=_?m[k]:xh(e.options,D);return E(D,_,W)}return Promise.resolve(T(D,m[k],h[k]))})}return x.then(_=>({pages:_,pageParams:v}))}}}}function xh(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function wB(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}class xB{constructor(t={}){this.queryCache=t.queryCache||new mB,this.mutationCache=t.mutationCache||new yB,this.logger=t.logger||Gu,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=ua.subscribe(()=>{ua.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=da.subscribe(()=>{da.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var t,r;this.mountCount--,this.mountCount===0&&((t=this.unsubscribeFocus)==null||t.call(this),this.unsubscribeFocus=void 0,(r=this.unsubscribeOnline)==null||r.call(this),this.unsubscribeOnline=void 0)}isFetching(t,r){const[n]=hr(t,r);return n.fetchStatus="fetching",this.queryCache.findAll(n).length}isMutating(t){return this.mutationCache.findAll(L(w({},t),{fetching:!0})).length}getQueryData(t,r){var n;return(n=this.queryCache.find(t,r))==null?void 0:n.state.data}ensureQueryData(t,r,n){const o=uo(t,r,n),i=this.getQueryData(o.queryKey);return i?Promise.resolve(i):this.fetchQuery(o)}getQueriesData(t){return this.getQueryCache().findAll(t).map(({queryKey:r,state:n})=>{const o=n.data;return[r,o]})}setQueryData(t,r,n){const o=this.queryCache.find(t),i=o==null?void 0:o.state.data,a=sB(r,i);if(typeof a=="undefined")return;const s=uo(t),l=this.defaultQueryOptions(s);return this.queryCache.build(this,l).setData(a,L(w({},n),{manual:!0}))}setQueriesData(t,r,n){return Ge.batch(()=>this.getQueryCache().findAll(t).map(({queryKey:o})=>[o,this.setQueryData(o,r,n)]))}getQueryState(t,r){var n;return(n=this.queryCache.find(t,r))==null?void 0:n.state}removeQueries(t,r){const[n]=hr(t,r),o=this.queryCache;Ge.batch(()=>{o.findAll(n).forEach(i=>{o.remove(i)})})}resetQueries(t,r,n){const[o,i]=hr(t,r,n),a=this.queryCache,s=w({type:"active"},o);return Ge.batch(()=>(a.findAll(o).forEach(l=>{l.reset()}),this.refetchQueries(s,i)))}cancelQueries(t,r,n){const[o,i={}]=hr(t,r,n);typeof i.revert=="undefined"&&(i.revert=!0);const a=Ge.batch(()=>this.queryCache.findAll(o).map(s=>s.cancel(i)));return Promise.all(a).then(Mt).catch(Mt)}invalidateQueries(t,r,n){const[o,i]=hr(t,r,n);return Ge.batch(()=>{var a,s;if(this.queryCache.findAll(o).forEach(c=>{c.invalidate()}),o.refetchType==="none")return Promise.resolve();const l=L(w({},o),{type:(a=(s=o.refetchType)!=null?s:o.type)!=null?a:"active"});return this.refetchQueries(l,i)})}refetchQueries(t,r,n){const[o,i]=hr(t,r,n),a=Ge.batch(()=>this.queryCache.findAll(o).filter(l=>!l.isDisabled()).map(l=>{var c;return l.fetch(void 0,L(w({},i),{cancelRefetch:(c=i==null?void 0:i.cancelRefetch)!=null?c:!0,meta:{refetchPage:o.refetchPage}}))}));let s=Promise.all(a).then(Mt);return i!=null&&i.throwOnError||(s=s.catch(Mt)),s}fetchQuery(t,r,n){const o=uo(t,r,n),i=this.defaultQueryOptions(o);typeof i.retry=="undefined"&&(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,r,n){return this.fetchQuery(t,r,n).then(Mt).catch(Mt)}fetchInfiniteQuery(t,r,n){const o=uo(t,r,n);return o.behavior=bB(),this.fetchQuery(o)}prefetchInfiniteQuery(t,r,n){return this.fetchInfiniteQuery(t,r,n).then(Mt).catch(Mt)}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,r){const n=this.queryDefaults.find(o=>Lr(t)===Lr(o.queryKey));n?n.defaultOptions=r:this.queryDefaults.push({queryKey:t,defaultOptions:r})}getQueryDefaults(t){if(!t)return;const r=this.queryDefaults.find(n=>vn(t,n.queryKey));return process.env.NODE_ENV!=="production"&&this.queryDefaults.filter(o=>vn(t,o.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."),r==null?void 0:r.defaultOptions}setMutationDefaults(t,r){const n=this.mutationDefaults.find(o=>Lr(t)===Lr(o.mutationKey));n?n.defaultOptions=r:this.mutationDefaults.push({mutationKey:t,defaultOptions:r})}getMutationDefaults(t){if(!t)return;const r=this.mutationDefaults.find(n=>vn(t,n.mutationKey));return process.env.NODE_ENV!=="production"&&this.mutationDefaults.filter(o=>vn(t,o.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."),r==null?void 0:r.defaultOptions}defaultQueryOptions(t){if(t!=null&&t._defaulted)return t;const r=L(w(w(w({},this.defaultOptions.queries),this.getQueryDefaults(t==null?void 0:t.queryKey)),t),{_defaulted:!0});return!r.queryHash&&r.queryKey&&(r.queryHash=Uu(r.queryKey,r)),typeof r.refetchOnReconnect=="undefined"&&(r.refetchOnReconnect=r.networkMode!=="always"),typeof r.useErrorBoundary=="undefined"&&(r.useErrorBoundary=!!r.suspense),r}defaultMutationOptions(t){return t!=null&&t._defaulted?t:L(w(w(w({},this.defaultOptions.mutations),this.getMutationDefaults(t==null?void 0:t.mutationKey)),t),{_defaulted:!0})}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class CB extends Hn{constructor(t,r){super(),this.client=t,this.options=r,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(r)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),Ch(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Cc(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Cc(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(t,r){const n=this.options,o=this.currentQuery;if(this.options=this.client.defaultQueryOptions(t),process.env.NODE_ENV!=="production"&&typeof(t==null?void 0:t.isDataEqual)!="undefined"&&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"),ca(n,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled!="undefined"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=n.queryKey),this.updateQuery();const i=this.hasListeners();i&&Eh(this.currentQuery,o,this.options,n)&&this.executeFetch(),this.updateResult(r),i&&(this.currentQuery!==o||this.options.enabled!==n.enabled||this.options.staleTime!==n.staleTime)&&this.updateStaleTimeout();const a=this.computeRefetchInterval();i&&(this.currentQuery!==o||this.options.enabled!==n.enabled||a!==this.currentRefetchInterval)&&this.updateRefetchInterval(a)}getOptimisticResult(t){const r=this.client.getQueryCache().build(this.client,t),n=this.createResult(r,t);return TB(this,n,t)&&(this.currentResult=n,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),n}getCurrentResult(){return this.currentResult}trackResult(t){const r={};return Object.keys(t).forEach(n=>{Object.defineProperty(r,n,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(n),t[n])})}),r}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch(n={}){var o=n,{refetchPage:t}=o,r=te(o,["refetchPage"]);return this.fetch(L(w({},r),{meta:{refetchPage:t}}))}fetchOptimistic(t){const r=this.client.defaultQueryOptions(t),n=this.client.getQueryCache().build(this.client,r);return n.isFetchingOptimistic=!0,n.fetch().then(()=>this.createResult(n,r))}fetch(t){var r;return this.executeFetch(L(w({},t),{cancelRefetch:(r=t.cancelRefetch)!=null?r:!0})).then(()=>(this.updateResult(),this.currentResult))}executeFetch(t){this.updateQuery();let r=this.currentQuery.fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Mt)),r}updateStaleTimeout(){if(this.clearStaleTimeout(),Wo||this.currentResult.isStale||!bc(this.options.staleTime))return;const r=i1(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},r)}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,!(Wo||this.options.enabled===!1||!bc(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||ua.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,r){const n=this.currentQuery,o=this.options,i=this.currentResult,a=this.currentResultState,s=this.currentResultOptions,l=t!==n,c=l?t.state:this.currentQueryInitialState,d=l?this.currentResult:this.previousQueryResult,{state:p}=t;let{dataUpdatedAt:h,error:m,errorUpdatedAt:v,fetchStatus:g,status:y}=p,b=!1,T=!1,E;if(r._optimisticResults){const k=this.hasListeners(),D=!k&&Ch(t,r),F=k&&Eh(t,n,r,o);(D||F)&&(g=vs(t.options.networkMode)?"fetching":"paused",h||(y="loading")),r._optimisticResults==="isRestoring"&&(g="idle")}if(r.keepPreviousData&&!p.dataUpdatedAt&&d!=null&&d.isSuccess&&y!=="error")E=d.data,h=d.dataUpdatedAt,y=d.status,b=!0;else if(r.select&&typeof p.data!="undefined")if(i&&p.data===(a==null?void 0:a.data)&&r.select===this.selectFn)E=this.selectResult;else try{this.selectFn=r.select,E=r.select(p.data),E=xc(i==null?void 0:i.data,E,r),this.selectResult=E,this.selectError=null}catch(k){process.env.NODE_ENV!=="production"&&this.client.getLogger().error(k),this.selectError=k}else E=p.data;if(typeof r.placeholderData!="undefined"&&typeof E=="undefined"&&y==="loading"){let k;if(i!=null&&i.isPlaceholderData&&r.placeholderData===(s==null?void 0:s.placeholderData))k=i.data;else if(k=typeof r.placeholderData=="function"?r.placeholderData():r.placeholderData,r.select&&typeof k!="undefined")try{k=r.select(k),this.selectError=null}catch(D){process.env.NODE_ENV!=="production"&&this.client.getLogger().error(D),this.selectError=D}typeof k!="undefined"&&(y="success",E=xc(i==null?void 0:i.data,k,r),T=!0)}this.selectError&&(m=this.selectError,E=this.selectResult,v=Date.now(),y="error");const x=g==="fetching",C=y==="loading",_=y==="error";return{status:y,fetchStatus:g,isLoading:C,isSuccess:y==="success",isError:_,isInitialLoading:C&&x,data:E,dataUpdatedAt:h,error:m,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:x,isRefetching:x&&!C,isLoadingError:_&&p.dataUpdatedAt===0,isPaused:g==="paused",isPlaceholderData:T,isPreviousData:b,isRefetchError:_&&p.dataUpdatedAt!==0,isStale:Yu(t,r),refetch:this.refetch,remove:this.remove}}updateResult(t){const r=this.currentResult,n=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,ca(n,r))return;this.currentResult=n;const o={cache:!0},i=()=>{if(!r)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!=null?s:this.trackedProps);return this.options.useErrorBoundary&&l.add("error"),Object.keys(this.currentResult).some(c=>{const d=c;return this.currentResult[d]!==r[d]&&l.has(d)})};(t==null?void 0:t.listeners)!==!1&&i()&&(o.listeners=!0),this.notify(w(w({},o),t))}updateQuery(){const t=this.client.getQueryCache().build(this.client,this.options);if(t===this.currentQuery)return;const r=this.currentQuery;this.currentQuery=t,this.currentQueryInitialState=t.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))}onQueryUpdate(t){const r={};t.type==="success"?r.onSuccess=!t.manual:t.type==="error"&&!zi(t.error)&&(r.onError=!0),this.updateResult(r),this.hasListeners()&&this.updateTimers()}notify(t){Ge.batch(()=>{if(t.onSuccess){var r,n,o,i;(r=(n=this.options).onSuccess)==null||r.call(n,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 EB(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Ch(e,t){return EB(e,t)||e.state.dataUpdatedAt>0&&Cc(e,t,t.refetchOnMount)}function Cc(e,t,r){if(t.enabled!==!1){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&Yu(e,t)}return!1}function Eh(e,t,r,n){return r.enabled!==!1&&(e!==t||n.enabled===!1)&&(!r.suspense||e.state.status!=="error")&&Yu(e,r)}function Yu(e,t){return e.isStaleByTime(t.staleTime)}function TB(e,t,r){return r.keepPreviousData?!1:r.placeholderData!==void 0?t.isPlaceholderData:!ca(e.getCurrentResult(),t)}var Ec={exports:{}},ol={};/**
335
335
  * @license React
@@ -36,7 +36,7 @@ var Ft = (e, t, r) => new Promise((n, o) => {
36
36
  }, s = (l) => l.done ? n(l.value) : Promise.resolve(l.value).then(i, a);
37
37
  s((r = r.apply(e, t)).next());
38
38
  });
39
- import { c6 as Ry, c7 as Ct, c8 as P0, bG as jr, c9 as Ko, ca as Zd, aK as ro, ap as _y, p as Jd, cb as Oy, cc as My, cd as ky, ce as ef, cf as Iy, cg as Ay, n as Qo, T as We, P as mt, t as P, ch as Py, ci as Dy, b_ as $y, cj as du, a7 as ve, U as at, R as Xt, A as Ny, a$ as hi, x as un, ck as Ly, j as D0, cl as Fy, aT as jt, cm as Hy, cn as By, co as gi, b0 as $0, F as br, bT as fu, K as N0, aZ as Ca, G as Zo, c1 as pu, b$ as Wy, cp as zy, aU as Gn, cq as Vy, cr as L0, cs as mi, ct as jy, cu as Uy, cv as Fi, cw as Gy, cx as Ho, cy as F0, cz as Vl, cA as tl, c0 as gt, cB as Bo, b8 as Qa, a0 as Cr, b4 as Za, _ as hu, cC as Yy, cD as qy, aD as Xy, aE as Ja, ao as jl, cE as Ky, cF as H0, W as B0, an as Qy, o as Zy, q as Jy, cG as eb, aB as cr, aC as ct, cH as tb, aG as Wo, cI as Ul, al as tf, cJ as W0, cK as gu, cL as rb, cM as Mt, cN as nb, aA as Or, cO as ob, aF as no, aH as xr, cP as yn, cQ as oo, cR as io, cS as es, cT as ts, cU as ib, cV as ab, cW as sa, cX as sb, cY as kt, cZ as z0, c_ as rl, b3 as mu, c$ as V0, b5 as dn, d0 as lb, d1 as cb, d2 as ub, d3 as db, d4 as nl, d5 as j0, d6 as fb, d7 as pb, d8 as hb, d9 as gb, da as mb, db as vb, dc as yb, dd as U0, de as G0, df as bb, dg as wb, dh as Cb, di as xb, dj as Eb, dk as Sb, dl as Y0, dm as q0, dn as X0, dp as K0, dq as Q0, dr as Tb, ds as Rb, a1 as vu, bK as _b, dt as Ob, s as Mb, a4 as Z0, du as kb, aR as Ib, dv as Ab, dw as Pb, b1 as J0, aL as yu, dx as Db, dy as $b, bJ as Nb, dz as Lb, ac as Fb, ab as Hb, L as rf, m as Gl, dA as eg, dB as Bb, dC as tg, ah as Wb, aa as zb, y as Vb, c as jb, bU as zo, dD as Ub, h as Gb, bQ as Yb, aX as qb, dE as nf, dF as Xb, bV as Kb, dG as Qb, dH as Zb } from "./derive-chart-family-BtTi3OxL.js";
39
+ import { c6 as Ry, c7 as Ct, c8 as P0, bG as jr, c9 as Ko, ca as Zd, aK as ro, ap as _y, p as Jd, cb as Oy, cc as My, cd as ky, ce as ef, cf as Iy, cg as Ay, n as Qo, T as We, P as mt, t as P, ch as Py, ci as Dy, b_ as $y, cj as du, a7 as ve, U as at, R as Xt, A as Ny, a$ as hi, x as un, ck as Ly, j as D0, cl as Fy, aT as jt, cm as Hy, cn as By, co as gi, b0 as $0, F as br, bT as fu, K as N0, aZ as Ca, G as Zo, c1 as pu, b$ as Wy, cp as zy, aU as Gn, cq as Vy, cr as L0, cs as mi, ct as jy, cu as Uy, cv as Fi, cw as Gy, cx as Ho, cy as F0, cz as Vl, cA as tl, c0 as gt, cB as Bo, b8 as Qa, a0 as Cr, b4 as Za, _ as hu, cC as Yy, cD as qy, aD as Xy, aE as Ja, ao as jl, cE as Ky, cF as H0, W as B0, an as Qy, o as Zy, q as Jy, cG as eb, aB as cr, aC as ct, cH as tb, aG as Wo, cI as Ul, al as tf, cJ as W0, cK as gu, cL as rb, cM as Mt, cN as nb, aA as Or, cO as ob, aF as no, aH as xr, cP as yn, cQ as oo, cR as io, cS as es, cT as ts, cU as ib, cV as ab, cW as sa, cX as sb, cY as kt, cZ as z0, c_ as rl, b3 as mu, c$ as V0, b5 as dn, d0 as lb, d1 as cb, d2 as ub, d3 as db, d4 as nl, d5 as j0, d6 as fb, d7 as pb, d8 as hb, d9 as gb, da as mb, db as vb, dc as yb, dd as U0, de as G0, df as bb, dg as wb, dh as Cb, di as xb, dj as Eb, dk as Sb, dl as Y0, dm as q0, dn as X0, dp as K0, dq as Q0, dr as Tb, ds as Rb, a1 as vu, bK as _b, dt as Ob, s as Mb, a4 as Z0, du as kb, aR as Ib, dv as Ab, dw as Pb, b1 as J0, aL as yu, dx as Db, dy as $b, bJ as Nb, dz as Lb, ac as Fb, ab as Hb, L as rf, m as Gl, dA as eg, dB as Bb, dC as tg, ah as Wb, aa as zb, y as Vb, c as jb, bU as zo, dD as Ub, h as Gb, bQ as Yb, aX as qb, dE as nf, dF as Xb, bV as Kb, dG as Qb, dH as Zb } from "./derive-chart-family-H5uuw6lv.js";
40
40
  import * as $ from "react";
41
41
  import Y, { useMemo as ne, createElement as Yl, useCallback as ae, useContext as vi, useRef as je, useEffect as Ae, createContext as ao, Component as bu, useState as ye, isValidElement as on, Children as Jb, cloneElement as la, useLayoutEffect as rg, useReducer as e2 } from "react";
42
42
  import { jsx as J, jsxs as fr } from "react/jsx-runtime";
@@ -661,7 +661,7 @@ const x2 = {
661
661
  if (!a.current && !i) {
662
662
  const l = {
663
663
  packageName: r.packageName,
664
- packageVersion: "2.3.0",
664
+ packageVersion: "2.3.1",
665
665
  componentName: e,
666
666
  attributesUsed: Object.entries(t).filter(([, c]) => !!c).map(([c]) => c).join(", ")
667
667
  };
@@ -695,7 +695,7 @@ const jd = class jd extends bu {
695
695
  try {
696
696
  this.handler({
697
697
  packageName: "sdk-ui",
698
- packageVersion: "2.3.0",
698
+ packageVersion: "2.3.1",
699
699
  component: this.componentName,
700
700
  error: t
701
701
  });
@@ -27346,7 +27346,7 @@ const k1 = "sdkHookInit", Sj = (e, t, r, n) => {
27346
27346
  return;
27347
27347
  ag(k1, {
27348
27348
  packageName: t,
27349
- packageVersion: "2.3.0",
27349
+ packageVersion: "2.3.1",
27350
27350
  hookName: e
27351
27351
  }, r.httpClient).finally(n);
27352
27352
  };
@@ -27356,7 +27356,7 @@ function WB(e) {
27356
27356
  if (!(!t || !r) && !o.current) {
27357
27357
  const i = {
27358
27358
  packageName: t.packageName || "sdk-ui",
27359
- packageVersion: "2.3.0",
27359
+ packageVersion: "2.3.1",
27360
27360
  hookName: e
27361
27361
  };
27362
27362
  n(k1, i, !t.enabled).finally(() => o.current = !0);
@@ -1,4 +1,4 @@
1
- "use strict";var tt=Object.defineProperty,et=Object.defineProperties;var rt=Object.getOwnPropertyDescriptors;var j=Object.getOwnPropertySymbols;var it=Object.prototype.hasOwnProperty,at=Object.prototype.propertyIsEnumerable;var $=(t,e,r)=>e in t?tt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,l=(t,e)=>{for(var r in e||(e={}))it.call(e,r)&&$(t,r,e[r]);if(j)for(var r of j(e))at.call(e,r)&&$(t,r,e[r]);return t},m=(t,e)=>et(t,rt(e));const n=require("./derive-chart-family-DeTlU_Wm.cjs");class P extends n.DimensionalElement{constructor(e,r){var i;super((i=e.jaql.title)!==null&&i!==void 0?i:"",r),this.expression=e.jaql.dim||e.jaql.formula,this.metadataItem=e,e.jaql.agg?this.aggregation=e.jaql.agg:delete this.aggregation,e.jaql.formula?this.formula=e.jaql.formula:delete this.formula,e.jaql.sort?this.sortType=n.getSortType(e.jaql.sort):delete this.sortType,this.skipValidation=!0}get id(){return this.expression}jaql(e){return e===!0?this.metadataItem.jaql:this.metadataItem}serialize(){const e=super.serialize();return e.__serializable="JaqlElement",e.metadataItem=this.metadataItem,e.type=this.type,e}}const st={text:n.MetadataTypes.TextAttribute,numeric:n.MetadataTypes.NumericAttribute,datetime:n.MetadataTypes.DateLevel};function nt(t){var e;return new P(t,(e=st[t.jaql.datatype])!==null&&e!==void 0?e:"numeric")}function B(t){const{jaql:e}=t;if(e.formula)return n.createCalculatedMeasureHelper(e);const r=n.DimensionalLevelAttribute.translateJaqlToGranularity(e);return"agg"in e&&e.dim&&e.datatype?n.createMeasureHelper({expression:e.dim,dataType:e.datatype,agg:e.agg||"",granularity:r,format:void 0,sort:e.sort,title:e.title,dataSource:e.datasource}):e.dim&&e.datatype?n.createAttributeHelper({expression:e.dim,dataType:e.datatype,granularity:r,sort:e.sort,title:e.title,panel:t.panel,dataSource:e.datasource}):nt(t)}const ot={jaql:{datasource:{title:"",type:"elasticube"},metadata:[]},queryTitle:"",chartRecommendations:{}},lt={model:"",metadata:[],chart:{},queryTitle:""},dt=t=>"widgetProps"in t,R=t=>"dashboardOid"in t&&"widgetOid"in t,ct=t=>"dashboardProps"in t,ut=t=>"dashboardOid"in t;function pt(t){return t.replace(/\s+/g,"-").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function mt(t){return t.charAt(0).toUpperCase()+t.slice(1)}function gt(t){const e=/\[(.+?)\s\(Calendar\)\]/;return t.replace(e,"[$1]").trim()}function yt(t){if(t)if(t.metadata){if(!t.model)throw new n.TranslatableError("errors.missingModelTitle")}else throw new n.TranslatableError("errors.missingMetadata");else throw new n.TranslatableError("errors.emptyModel");return t}function ft(t){return!t||!t.jaql.datasource.title||!t.jaql.metadata.length}function k(t){if(![...n.ALL_CHART_TYPES,"pivot","pivot2"].includes(t))throw new n.TranslatableError("errors.chartTypeNotSupported",{chartType:t})}function ht(t){return"widgetType"in t&&t.widgetType==="pivot"}function S(t){var e;return"column"in t&&((e=t.column)==null?void 0:e.expression)&&/\(.*\)/.test(t.column.expression)}function w(t){const e="measures"in t&&u(t.measures)||"values"in t&&u(t.values);return ht(t)?"values"in t.dataOptions&&u(t.dataOptions.values):"chartType"in t?t.chartType==="indicator"?"value"in t.dataOptions&&u(t.dataOptions.value)||"secondary"in t.dataOptions&&u(t.dataOptions.secondary):t.chartType==="table"?!("columns"in t.dataOptions)||!u(t.dataOptions.columns)?!1:t.dataOptions.columns.some(i=>S(i)):t.chartType==="boxplot"?!1:t.chartType==="scatter"?"x"in t.dataOptions&&t.dataOptions.x!==void 0&&S(t.dataOptions.x)||"y"in t.dataOptions&&t.dataOptions.y!==void 0&&S(t.dataOptions.y)||"size"in t.dataOptions&&t.dataOptions.size!==void 0:t.chartType==="scattermap"?"colorBy"in t.dataOptions&&t.dataOptions.colorBy!==void 0&&S(t.dataOptions.colorBy)||"details"in t.dataOptions&&t.dataOptions.details!==void 0&&S(t.dataOptions.details)||"size"in t.dataOptions&&t.dataOptions.size!==void 0&&S(t.dataOptions.size):t.chartType==="areamap"?"geo"in t.dataOptions&&u(t.dataOptions.geo)&&"color"in t.dataOptions&&u(t.dataOptions.color):"value"in t.dataOptions&&u(t.dataOptions.value):e}function u(t){return Array.isArray(t)&&t.length>0}function St(t){const e=t.split(`
1
+ "use strict";var tt=Object.defineProperty,et=Object.defineProperties;var rt=Object.getOwnPropertyDescriptors;var j=Object.getOwnPropertySymbols;var it=Object.prototype.hasOwnProperty,at=Object.prototype.propertyIsEnumerable;var $=(t,e,r)=>e in t?tt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,l=(t,e)=>{for(var r in e||(e={}))it.call(e,r)&&$(t,r,e[r]);if(j)for(var r of j(e))at.call(e,r)&&$(t,r,e[r]);return t},m=(t,e)=>et(t,rt(e));const n=require("./derive-chart-family-5O0nGmIH.cjs");class P extends n.DimensionalElement{constructor(e,r){var i;super((i=e.jaql.title)!==null&&i!==void 0?i:"",r),this.expression=e.jaql.dim||e.jaql.formula,this.metadataItem=e,e.jaql.agg?this.aggregation=e.jaql.agg:delete this.aggregation,e.jaql.formula?this.formula=e.jaql.formula:delete this.formula,e.jaql.sort?this.sortType=n.getSortType(e.jaql.sort):delete this.sortType,this.skipValidation=!0}get id(){return this.expression}jaql(e){return e===!0?this.metadataItem.jaql:this.metadataItem}serialize(){const e=super.serialize();return e.__serializable="JaqlElement",e.metadataItem=this.metadataItem,e.type=this.type,e}}const st={text:n.MetadataTypes.TextAttribute,numeric:n.MetadataTypes.NumericAttribute,datetime:n.MetadataTypes.DateLevel};function nt(t){var e;return new P(t,(e=st[t.jaql.datatype])!==null&&e!==void 0?e:"numeric")}function B(t){const{jaql:e}=t;if(e.formula)return n.createCalculatedMeasureHelper(e);const r=n.DimensionalLevelAttribute.translateJaqlToGranularity(e);return"agg"in e&&e.dim&&e.datatype?n.createMeasureHelper({expression:e.dim,dataType:e.datatype,agg:e.agg||"",granularity:r,format:void 0,sort:e.sort,title:e.title,dataSource:e.datasource}):e.dim&&e.datatype?n.createAttributeHelper({expression:e.dim,dataType:e.datatype,granularity:r,sort:e.sort,title:e.title,panel:t.panel,dataSource:e.datasource}):nt(t)}const ot={jaql:{datasource:{title:"",type:"elasticube"},metadata:[]},queryTitle:"",chartRecommendations:{}},lt={model:"",metadata:[],chart:{},queryTitle:""},dt=t=>"widgetProps"in t,R=t=>"dashboardOid"in t&&"widgetOid"in t,ct=t=>"dashboardProps"in t,ut=t=>"dashboardOid"in t;function pt(t){return t.replace(/\s+/g,"-").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function mt(t){return t.charAt(0).toUpperCase()+t.slice(1)}function gt(t){const e=/\[(.+?)\s\(Calendar\)\]/;return t.replace(e,"[$1]").trim()}function yt(t){if(t)if(t.metadata){if(!t.model)throw new n.TranslatableError("errors.missingModelTitle")}else throw new n.TranslatableError("errors.missingMetadata");else throw new n.TranslatableError("errors.emptyModel");return t}function ft(t){return!t||!t.jaql.datasource.title||!t.jaql.metadata.length}function k(t){if(![...n.ALL_CHART_TYPES,"pivot","pivot2"].includes(t))throw new n.TranslatableError("errors.chartTypeNotSupported",{chartType:t})}function ht(t){return"widgetType"in t&&t.widgetType==="pivot"}function S(t){var e;return"column"in t&&((e=t.column)==null?void 0:e.expression)&&/\(.*\)/.test(t.column.expression)}function w(t){const e="measures"in t&&u(t.measures)||"values"in t&&u(t.values);return ht(t)?"values"in t.dataOptions&&u(t.dataOptions.values):"chartType"in t?t.chartType==="indicator"?"value"in t.dataOptions&&u(t.dataOptions.value)||"secondary"in t.dataOptions&&u(t.dataOptions.secondary):t.chartType==="table"?!("columns"in t.dataOptions)||!u(t.dataOptions.columns)?!1:t.dataOptions.columns.some(i=>S(i)):t.chartType==="boxplot"?!1:t.chartType==="scatter"?"x"in t.dataOptions&&t.dataOptions.x!==void 0&&S(t.dataOptions.x)||"y"in t.dataOptions&&t.dataOptions.y!==void 0&&S(t.dataOptions.y)||"size"in t.dataOptions&&t.dataOptions.size!==void 0:t.chartType==="scattermap"?"colorBy"in t.dataOptions&&t.dataOptions.colorBy!==void 0&&S(t.dataOptions.colorBy)||"details"in t.dataOptions&&t.dataOptions.details!==void 0&&S(t.dataOptions.details)||"size"in t.dataOptions&&t.dataOptions.size!==void 0&&S(t.dataOptions.size):t.chartType==="areamap"?"geo"in t.dataOptions&&u(t.dataOptions.geo)&&"color"in t.dataOptions&&u(t.dataOptions.color):"value"in t.dataOptions&&u(t.dataOptions.value):e}function u(t){return Array.isArray(t)&&t.length>0}function St(t){const e=t.split(`
2
2
  `);for(let r=0;r<e.length-1;r++)if(e[r].trim()===""){const i=e[r+1].trim();if(i.startsWith("import *")||i.startsWith("import {")){e.splice(r,1);break}}return e.join(`
3
3
  `)}const Ot={react:{baseChartTmpl:`import { {{componentString}} } from '@sisense/sdk-ui';
4
4
  {{extraImportsString}}
@@ -10,7 +10,7 @@ var $ = (t, e, r) => e in t ? tt(t, e, { enumerable: !0, configurable: !0, writa
10
10
  at.call(e, r) && $(t, r, e[r]);
11
11
  return t;
12
12
  }, u = (t, e) => et(t, rt(e));
13
- import { dW as N, w as st, e0 as nt, ap as ot, e1 as lt, e2 as dt, m as C, T as S, e3 as ct, aP as _, dI as ut, e4 as O, dY as z, ay as pt, aW as mt, aV as gt, aG as M, ao as yt, n as I, e5 as ft, a8 as ht, bG as P, e6 as St } from "./derive-chart-family-BtTi3OxL.js";
13
+ import { dW as N, w as st, e0 as nt, ap as ot, e1 as lt, e2 as dt, m as C, T as S, e3 as ct, aP as _, dI as ut, e4 as O, dY as z, ay as pt, aW as mt, aV as gt, aG as M, ao as yt, n as I, e5 as ft, a8 as ht, bG as P, e6 as St } from "./derive-chart-family-H5uuw6lv.js";
14
14
  class J extends N {
15
15
  constructor(e, r) {
16
16
  var i;
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "Sisense",
12
12
  "Compose SDK"
13
13
  ],
14
- "version": "2.3.0",
14
+ "version": "2.3.1",
15
15
  "type": "module",
16
16
  "exports": {
17
17
  ".": {
@@ -57,12 +57,12 @@
57
57
  "@emotion/styled": "^11.14.0",
58
58
  "@mui/material": "^6.4.11",
59
59
  "@mui/system": "^6.4.11",
60
- "@sisense/sdk-common": "2.3.0",
61
- "@sisense/sdk-data": "2.3.0",
62
- "@sisense/sdk-pivot-client": "2.3.0",
63
- "@sisense/sdk-query-client": "2.3.0",
64
- "@sisense/sdk-rest-client": "2.3.0",
65
- "@sisense/sdk-tracking": "2.3.0",
60
+ "@sisense/sdk-common": "2.3.1",
61
+ "@sisense/sdk-data": "2.3.1",
62
+ "@sisense/sdk-pivot-client": "2.3.1",
63
+ "@sisense/sdk-query-client": "2.3.1",
64
+ "@sisense/sdk-rest-client": "2.3.1",
65
+ "@sisense/sdk-tracking": "2.3.1",
66
66
  "@sisense/sisense-charts": "5.1.1",
67
67
  "@tanstack/react-query": "4.36.1",
68
68
  "classnames": "^2.3.2",