@sisense/sdk-ui 2.1.0 → 2.1.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.
Files changed (35) hide show
  1. package/dist/ai.cjs +1 -1
  2. package/dist/ai.js +4 -4
  3. package/dist/analytics-composer.cjs +1 -1
  4. package/dist/analytics-composer.js +70 -70
  5. package/dist/{derive-chart-family-BNMFblR9.js → derive-chart-family-C8duLtwv.js} +11255 -11244
  6. package/dist/{derive-chart-family-DjbiaKLQ.cjs → derive-chart-family-CQ1Myy0A.cjs} +129 -129
  7. package/dist/{dimensions-DcsEnPSY.cjs → dimensions-BBfnA6e8.cjs} +1 -1
  8. package/dist/{dimensions-DeTiL-EZ.js → dimensions-DOWF8q44.js} +1 -1
  9. package/dist/index.cjs +25 -21
  10. package/dist/index.js +13027 -10033
  11. package/dist/packages/sdk-ui/src/dashboard/components/content-panel.d.ts +1 -1
  12. package/dist/packages/sdk-ui/src/dashboard/components/editable-layout/components/cell-drop-overlay.d.ts +34 -0
  13. package/dist/packages/sdk-ui/src/dashboard/components/editable-layout/components/draggable-line.d.ts +24 -0
  14. package/dist/packages/sdk-ui/src/dashboard/components/editable-layout/components/draggable-widget-wrapper.d.ts +28 -0
  15. package/dist/packages/sdk-ui/src/dashboard/components/editable-layout/components/droppable-zone.d.ts +23 -0
  16. package/dist/packages/sdk-ui/src/dashboard/components/editable-layout/components/resizable-columns.d.ts +31 -0
  17. package/dist/packages/sdk-ui/src/dashboard/components/editable-layout/components/resizable-row.d.ts +39 -0
  18. package/dist/packages/sdk-ui/src/dashboard/components/editable-layout/components/row-drop-overlay.d.ts +30 -0
  19. package/dist/packages/sdk-ui/src/dashboard/components/editable-layout/const.d.ts +11 -0
  20. package/dist/packages/sdk-ui/src/dashboard/components/editable-layout/editable-layout.d.ts +28 -0
  21. package/dist/packages/sdk-ui/src/dashboard/components/editable-layout/helpers.d.ts +42 -0
  22. package/dist/packages/sdk-ui/src/dashboard/components/editable-layout/types.d.ts +78 -0
  23. package/dist/packages/sdk-ui/src/dashboard/components/editable-layout/utils.d.ts +5 -0
  24. package/dist/packages/sdk-ui/src/dashboard/constants.d.ts +0 -2
  25. package/dist/packages/sdk-ui/src/dashboard/types.d.ts +7 -1
  26. package/dist/packages/sdk-ui/src/dashboard/use-dashboard-theme.d.ts +4 -0
  27. package/dist/packages/sdk-ui/src/index.d.ts +1 -1
  28. package/dist/packages/sdk-ui/src/models/dashboard/types.d.ts +29 -17
  29. package/dist/packages/sdk-ui/src/theme-provider/default-theme-settings.d.ts +3 -0
  30. package/dist/packages/sdk-ui/src/types.d.ts +14 -0
  31. package/dist/{use-common-filters-CJNwlbbh.js → use-common-filters--6cyMg9O.js} +2850 -2846
  32. package/dist/{use-common-filters-DcFu4qRs.cjs → use-common-filters-NTIrYvRs.cjs} +5 -5
  33. package/dist/{widget-composer-BEVCXjFv.js → widget-composer-BZwsi1mW.js} +1 -1
  34. package/dist/{widget-composer-fYnr8SDo.cjs → widget-composer-Bv_aqjLX.cjs} +1 -1
  35. package/package.json +10 -7
@@ -1,4 +1,4 @@
1
- "use strict";var mm=Object.defineProperty,gm=Object.defineProperties;var vm=Object.getOwnPropertyDescriptors;var To=Object.getOwnPropertySymbols;var Ll=Object.prototype.hasOwnProperty,Fl=Object.prototype.propertyIsEnumerable;var Qe=Math.pow,$l=(e,t,r)=>t in e?mm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,q=(e,t)=>{for(var r in t||(t={}))Ll.call(t,r)&&$l(e,r,t[r]);if(To)for(var r of To(t))Fl.call(t,r)&&$l(e,r,t[r]);return e},J=(e,t)=>gm(e,vm(t));var _r=(e,t)=>{var r={};for(var n in e)Ll.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&To)for(var n of To(e))t.indexOf(n)<0&&Fl.call(e,n)&&(r[n]=e[n]);return r};var rt=(e,t,r)=>new Promise((n,o)=>{var i=c=>{try{s(r.next(c))}catch(u){o(u)}},a=c=>{try{s(r.throw(c))}catch(u){o(u)}},s=c=>c.done?n(c.value):Promise.resolve(c.value).then(i,a);s((r=r.apply(e,t)).next())});const l=require("./derive-chart-family-DjbiaKLQ.cjs"),F=require("react"),te=require("react/jsx-runtime"),Ir=require("react-dom");function wd(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 W=wd(F),ym=wd(Ir);function bm(e){let{i18n:t,defaultNS:r,children:n}=e;const o=F.useMemo(()=>({i18n:t,defaultNS:r}),[t,r]);return F.createElement(l.I18nContext.Provider,{value:o},n)}function Vt(e){return e===void 0||typeof e=="string"||"title"in e&&"type"in e}const We={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 fs(e){return[l.customFormula(We.BOX_MIN_VALUE_NAME,"QUARTILE([Attr], 1)",{Attr:e}),l.customFormula(We.BOX_MEDIAN_VALUE_NAME,"MEDIAN([Attr])",{Attr:e}),l.customFormula(We.BOX_MAX_VALUE_NAME,"QUARTILE([Attr], 3)",{Attr:e})]}function _m(e){return[...fs(e),l.customFormula(We.WHISKER_MIN_VALUE_NAME,"LOWERWHISKERMAX_IQR([Attr])",{Attr:e}),l.customFormula(We.WHISKER_MAX_VALUE_NAME,"UPPERWHISKERMIN_IQR([Attr])",{Attr:e}),l.customFormula(We.OUTLIER_COUNT_VALUE_NAME,"OUTLIERSCOUNT_IQR([Attr])",{Attr:e})]}function xm(e){return[...fs(e),l.customFormula(We.WHISKER_MIN_VALUE_NAME,"MIN([Attr])",{Attr:e}),l.customFormula(We.WHISKER_MAX_VALUE_NAME,"MAX([Attr])",{Attr:e})]}function wm(e){return[...fs(e),l.customFormula(We.WHISKER_MIN_VALUE_NAME,"LOWERWHISKERMAX_STDEVP([Attr])",{Attr:e}),l.customFormula(We.WHISKER_MAX_VALUE_NAME,"UPPERWHISKERMIN_STDEVP([Attr])",{Attr:e}),l.customFormula(We.OUTLIER_COUNT_VALUE_NAME,"OUTLIERSCOUNT_STDEVP([Attr])",{Attr:e})]}const Cm=l.withComposeCodeForAnalytics(e=>{const t=l.cloneDeep(e),r=l.customFormula(We.OUTLIER_MAX_VALUE_NAME,"(UPPERWHISKERMIN_IQR([Attr]), all([Attr]))",{Attr:e}),n=l.customFormula(We.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"),Tm=l.withComposeCodeForAnalytics(e=>{const t=l.cloneDeep(e),r=l.customFormula(We.OUTLIER_MAX_VALUE_NAME,"(UPPERWHISKERMIN_STDEVP([Attr]), all([Attr]))",{Attr:e}),n=l.customFormula(We.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 In(e){return!!e&&"operator"in e&&(e.operator==="AND"||e.operator==="OR")&&!!e.right&&!!e.left}function Cd(e=[],t=[]){if(!In(e)&&!In(t))return lt(e,t);const{filters:r,relations:n}=An(e),o=ps(t),i=lt(r,o),a=On(r,n,i);return Rn(i,a)}function An(e){if(!e)return{filters:[],relations:null};if(l.isArray(e))return{filters:e,relations:null};const t=new Set;function r(o){if(Td(o))return t.add(o),{instanceid:o.config.guid};if(In(o)){const i=r(o.left),a=r(o.right);return{left:i,right:a,operator:o.operator}}throw new si}const n=r(e);return{filters:Array.from(t),relations:n}}function ps(e){return e?An(e).filters:[]}function Rn(e,t){if(!t||hs(t))return e;const r=n(t);return Td(r)?[r]:r;function n(o){if(ii(o))return e.find(i=>i.config.guid===o.instanceid);if(ai(o))return(o.operator==="AND"?l.logic.and:l.logic.or)(n(o.left),n(o.right));throw new si}}function hs(e){return!!e&&"instanceid"in e}function On(e,t,r){if(t===null)return null;const n=Sm(e,r);return n.length===0?t:n.reduce((o,i)=>{switch(i.type){case"add":return Rm(i.payload,o);case"remove":return Ta(i.payload,o)}},t)}function Hl(e,t){return e.config.guid===t.config.guid}function Em(e,t,r){if(!e)return null;return o(e);function o(i){if(ii(i))return i.instanceid===t.config.guid?{instanceid:r.config.guid}:i;if(ai(i))return{left:o(i.left),right:o(i.right),operator:i.operator};throw new si}}function Sm(e,t){const r=[],n=[...e],o=[...t];return n.forEach(i=>{o.some(s=>Hl(i,s))||r.push({type:"remove",payload:i})}),o.forEach(i=>{n.some(s=>Hl(i,s))||r.push({type:"add",payload:i})}),r}function Rm(e,t){return t?{left:t,right:{instanceid:e.config.guid},operator:"AND"}:{instanceid:e.config.guid}}function Ta(e,t){if(!t)return null;if(hs(t))return t.instanceid===e.config.guid?null:t;const r=Ta(e,t.left),n=Ta(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 Om(e,t){if(!e)return null;function r(n){if(Mm(n))return{instanceid:n.instanceId};if(Pm(n))return r(n.value);if(Dm(n))return{operator:n.operator,left:r(n.left),right:r(n.right)};if(km(n)){const o=t.find(i=>{if(!l.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 Mm(e){return"instanceId"in e}function Pm(e){return"value"in e}function Dm(e){return"operator"in e}function km(e){return"levels"in e&&l.isArray(e.levels)}function ii(e){return"instanceid"in e}function ai(e){return"operator"in e}function Td(e){return"config"in e&&"guid"in e.config}function Im(e,t){if(!e)return;function r(n){if(ii(n)){const o=t.find(i=>i.config.guid===n.instanceid);return o&&l.isCascadingFilter(o)?{type:"CascadingIdentifier",levels:o.filters.map(a=>({type:"Identifier",instanceId:a.config.guid}))}:{type:"Identifier",instanceId:n.instanceid}}else{if(ai(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 Am(e,t){return e.find(r=>r.config.guid===t)}class si extends Error{constructor(){super("Broken filter relations. Unknown node type.")}}function Nm(e){return e.nodeType==="openBracket"}function $m(e){return e.nodeType==="closeBracket"}function Lm(e){return e.nodeType==="attribute"}function Fm(e){return e.nodeType==="operator"}function Nn(e){if(l.isCascadingFilter(e))return e.filters.map(Nn).join("-");const{attribute:t}=e,r=e.jaql().jaql,n=t.expression||r.dim,o=t.granularity||((r==null?void 0:r.datatype)==="datetime"?l.DimensionalLevelAttribute.translateJaqlToGranularity(r):"");return`${n}${o}`}function lt(e=[],t=[]){const r=[...e];return t.forEach(n=>{const o=r.findIndex(a=>Nn(n)===Nn(a));o!==-1?r[o]=n:r.push(n)}),r}function Hm(e){if(!e)return e;const t=l.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 Bm(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ea(e,t){return Ea=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},Ea(e,t)}function jm(e,t){if(l._typeof(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(l._typeof(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Wm(e){var t=jm(e,"string");return l._typeof(t)=="symbol"?t:t+""}function zm(e,t,r){return t=Wm(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const wn={none:"None",small:"Small",medium:"Medium",large:"Large",left:"Left",center:"Center",right:"Right",light:"Light",dark:"Dark"};function Ed(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:Vm(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:l.getDefaultThemeSettings().general.popover,buttons:{cancel:{backgroundColor:{default:e.general.secondaryButtonBaseColor,hover:e.general.secondaryButtonHoverColor,focus:e.general.secondaryButtonHoverColor},textColor:e.general.secondaryButtonTextColor}}},widget:{spaceAround:wn[e.dashboards.widgetSpacing],cornerRadius:wn[e.dashboards.widgetCornerRadius],shadow:wn[e.dashboards.widgetShadow],border:e.dashboards.widgetBorderEnabled,borderColor:e.dashboards.widgetBorderColor,header:{titleTextColor:e.dashboards.widgetTitleColor,titleAlignment:wn[e.dashboards.widgetTitleAlignment],titleFontSize:l.DEFAULT_TITLE_FONT_SIZE,dividerLine:e.dashboards.widgetTitleDividerEnabled,dividerLineColor:e.dashboards.widgetTitleDividerColor,backgroundColor:e.dashboards.widgetTitleBackgroundColor}},dashboard:{backgroundColor:e.dashboards.layoutBackgroundColor,dividerLineWidth:l.DEFAULT_DIVIDER_WIDTH,dividerLineColor:l.DEFAULT_DIVIDER_COLOR},filter:{panel:{titleColor:e.dashboards.panelTitleTextColor,backgroundColor:e.dashboards.panelBackgroundColor}}};return l.merge.withOptions({mergeArrays:!1},l.getDefaultThemeSettings(),n)}function Sd(e){return e.dashboards.colorPaletteName}function Vm(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 Rd(e,t){return rt(this,null,function*(){const r=yield Um(e,t);if(!r)throw new l.TranslatableError("errors.themeNotFound",{themeOid:e});const n=Sd(r),o=yield Od(n,t);return Ed(r,o,t.url)})}function Um(e,t){return rt(this,null,function*(){return t.get(`api/v1/themes/${e}`).catch(()=>{throw new l.TranslatableError("errors.themeNotFound",{themeOid:e})})})}function Od(e,t){return rt(this,null,function*(){const r=yield t.get(`api/palettes/${e}`);if(r&&"status"in r&&r.status==="error")throw new l.TranslatableError("errors.paletteNotFound",{paletteName:e});return r})}const qm={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}},Bl="composesdk",Md=(e,t,r,n=!1)=>{const o=Object.assign({action:e,cat:Bl,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=${Bl}`,i)})},jl=(e,t,r,n,o)=>{const i=qm[`${e}`];return i.internal&&Md(e,t,r,o),i.external&&n&&n(q({action:e},t)),Promise.resolve()},ms=()=>{var i,a;const{tracking:e,app:t}=l.useSisenseContext(),r=(a=(i=t==null?void 0:t.httpClient)==null?void 0:i.auth)==null?void 0:a.type,n=F.useCallback((s,c={},u=!1)=>t?jl(s,J(q({},c),{authType:r}),t.httpClient,e.onTrackingEvent,u):Promise.resolve(),[e,t,r]),o=F.useCallback((s,c=!1)=>{if(!t)return Promise.resolve();const{packageName:u,packageVersion:p,component:h,error:d}=s;let m="";return typeof d=="string"?m=d:d instanceof Error&&(m=d.message||d.toString()),jl("sdkError",J(q({},{packageName:u,packageVersion:p,component:h,error:m}),{authType:r}),t.httpClient,e.onTrackingEvent,c)},[e,t,r]);return{trackEvent:n,trackError:o}},Gm="sdkComponentInit",Pd=F.createContext(!1),Ym=({skipNested:e=!0,children:t})=>l.jsx(Pd.Provider,{value:e,children:t}),Km=(e,t)=>{const{tracking:r,app:n}=l.useSisenseContext(),{trackEvent:o}=ms(),i=F.useContext(Pd),a=F.useRef(!1);F.useEffect(()=>{if(!r||!n)return;if(!a.current&&!i){const c={packageName:r.packageName,packageVersion:"2.1.0",componentName:e,attributesUsed:Object.entries(t).filter(([,u])=>!!u).map(([u])=>u).join(", ")};o(Gm,c,!r.enabled).finally(()=>a.current=!0)}},[e,t,r,i,o,n])};var Xm="[object Boolean]";function Dd(e){return e===!0||e===!1||l.isObjectLike(e)&&l.baseGetTag(e)==Xm}const Nl=class Nl extends F.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.1.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}};Nl.contextType=l.SisenseContext;let Sa=Nl;const Qm=({componentName:e,config:t})=>{const{skip:r,transparent:n}=t||{};return o=>function(a){const{trackError:s}=ms();return Dd(r)&&r||l.isFunction(r)&&r(a)?l.jsx(o,q({},a)):(Km(e,a),l.jsx(Ym,{skipNested:!n,children:l.jsx(Sa,{componentName:e,handler:s,children:l.jsx(o,q({},a))})}))}},Zm="_container_1wquj_1",Jm="_card_1wquj_11",eg="_text_1wquj_19",Qi={container:Zm,card:Jm,text:eg};function kd({color:e="#FFCB05"}){return l.jsx("svg",{width:"53px",height:"53px",viewBox:"0 0 53 53",children:l.jsx("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:l.jsxs("g",{children:[l.jsx("polygon",{points:"26.4996 -0.000100000005 -0.000400000001 26.5009 26.4996 52.9999 53.0006 26.5009",fill:e}),l.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 Id=({error:e=new l.TranslatableError("errors.componentRenderError")})=>{var d,m,g,v,y,w;const{themeSettings:t}=l.useThemeContext(),{app:r}=l.useSisenseContext(),{t:n}=l.useTranslation(),[o,i]=F.useState(!1),a=()=>{i(!0)},s=()=>{i(!1)},c=l.jsx("div",{className:"csdk-flex csdk-justify-center csdk-mb-[10px]",children:l.jsx(kd,{color:(d=t==null?void 0:t.general)==null?void 0:d.brandColor})}),u=e instanceof l.AbstractTranslatableError?n(e.key,q({},e.interpolationOptions)):n(e instanceof Error?e.message:e),p=n("errorBoxText",{errorMessage:u,interpolation:{escapeValue:!1}}),h=(g=(m=r==null?void 0:r.settings)==null?void 0:m.errorBoundaryConfig)==null?void 0:g.alwaysShowErrorText;return l.jsx("div",{onMouseEnter:h?void 0:a,onMouseLeave:h?void 0:s,className:Qi.container,"aria-label":"error-box",children:l.jsxs("div",{className:Qi.card,style:{backgroundColor:((v=t==null?void 0:t.general)==null?void 0:v.backgroundColor)||"rgba(255,255,255,0.5)"},children:[c,(h||o)&&l.jsx("div",{className:Qi.text,style:{color:((y=t==null?void 0:t.typography)==null?void 0:y.primaryTextColor)||l.DEFAULT_TEXT_COLOR,fontFamily:((w=t==null?void 0:t.typography)==null?void 0:w.fontFamily)||"inherit"},children:p})]})})};let Ad=class extends F.Component{constructor(t){var r;super(t),this.showErrorBox=!0,this.showErrorBox=(r=t.showErrorBox)!=null?r:!0,this.onError=t.onError,this.isContainerComponent=t.isContainerComponent||!1,this.state={error:null}}static getDerivedStateFromError(t){return{error:t}}componentDidCatch(t){var r;this.setState({error:t}),(r=this.onError)==null||r.call(this,t instanceof Error?t:new Error(t))}componentDidUpdate(t,r){r.error!==null&&tg(t.resetKeys,this.props.resetKeys)&&this.setState({error:null})}render(){const t=this.state.error||this.props.error;return!t||this.isContainerComponent&&!this.showErrorBox?this.props.children:this.showErrorBox?l.jsx(Id,{error:t}):null}};function tg(e=[],t=[]){return e.length!==t.length||e.some((r,n)=>!l.isEqual(r,t[n]))}const Nd=({componentName:e})=>t=>function(n){const o=l.useSisenseContext(),i=a=>{var s,c;return(c=(s=o.errorBoundary).onError)==null?void 0:c.call(s,a,{componentName:e,componentProps:n})};return l.jsx(Ad,{resetKeys:Object.values(n),showErrorBox:o.errorBoundary.showErrorBox,onError:i,isContainerComponent:!!(n!=null&&n.children),children:l.jsx(t,q({},n))})};function $d(){var e,t;return(t=(e=document.head.querySelector('meta[property="csp-nonce"]'))==null?void 0:e.getAttribute("content"))!=null?t:void 0}const Wl=$d(),gs=({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=J(q({},t),{WebkitAnimationDelay:"-0.32s",animationDelay:"-0.32s"}),n=J(q({},t),{WebkitAnimationDelay:"-0.16s",animationDelay:"-0.16s"}),o=J(q({},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 l.jsxs("div",{children:[l.jsx("style",J(q({},Wl&&{nonce:Wl}),{children:`
1
+ "use strict";var mm=Object.defineProperty,gm=Object.defineProperties;var vm=Object.getOwnPropertyDescriptors;var To=Object.getOwnPropertySymbols;var Ll=Object.prototype.hasOwnProperty,Fl=Object.prototype.propertyIsEnumerable;var Qe=Math.pow,$l=(e,t,r)=>t in e?mm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,q=(e,t)=>{for(var r in t||(t={}))Ll.call(t,r)&&$l(e,r,t[r]);if(To)for(var r of To(t))Fl.call(t,r)&&$l(e,r,t[r]);return e},J=(e,t)=>gm(e,vm(t));var _r=(e,t)=>{var r={};for(var n in e)Ll.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&To)for(var n of To(e))t.indexOf(n)<0&&Fl.call(e,n)&&(r[n]=e[n]);return r};var rt=(e,t,r)=>new Promise((n,o)=>{var i=c=>{try{s(r.next(c))}catch(u){o(u)}},a=c=>{try{s(r.throw(c))}catch(u){o(u)}},s=c=>c.done?n(c.value):Promise.resolve(c.value).then(i,a);s((r=r.apply(e,t)).next())});const l=require("./derive-chart-family-CQ1Myy0A.cjs"),F=require("react"),te=require("react/jsx-runtime"),Ir=require("react-dom");function wd(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 W=wd(F),ym=wd(Ir);function bm(e){let{i18n:t,defaultNS:r,children:n}=e;const o=F.useMemo(()=>({i18n:t,defaultNS:r}),[t,r]);return F.createElement(l.I18nContext.Provider,{value:o},n)}function Vt(e){return e===void 0||typeof e=="string"||"title"in e&&"type"in e}const We={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 fs(e){return[l.customFormula(We.BOX_MIN_VALUE_NAME,"QUARTILE([Attr], 1)",{Attr:e}),l.customFormula(We.BOX_MEDIAN_VALUE_NAME,"MEDIAN([Attr])",{Attr:e}),l.customFormula(We.BOX_MAX_VALUE_NAME,"QUARTILE([Attr], 3)",{Attr:e})]}function _m(e){return[...fs(e),l.customFormula(We.WHISKER_MIN_VALUE_NAME,"LOWERWHISKERMAX_IQR([Attr])",{Attr:e}),l.customFormula(We.WHISKER_MAX_VALUE_NAME,"UPPERWHISKERMIN_IQR([Attr])",{Attr:e}),l.customFormula(We.OUTLIER_COUNT_VALUE_NAME,"OUTLIERSCOUNT_IQR([Attr])",{Attr:e})]}function xm(e){return[...fs(e),l.customFormula(We.WHISKER_MIN_VALUE_NAME,"MIN([Attr])",{Attr:e}),l.customFormula(We.WHISKER_MAX_VALUE_NAME,"MAX([Attr])",{Attr:e})]}function wm(e){return[...fs(e),l.customFormula(We.WHISKER_MIN_VALUE_NAME,"LOWERWHISKERMAX_STDEVP([Attr])",{Attr:e}),l.customFormula(We.WHISKER_MAX_VALUE_NAME,"UPPERWHISKERMIN_STDEVP([Attr])",{Attr:e}),l.customFormula(We.OUTLIER_COUNT_VALUE_NAME,"OUTLIERSCOUNT_STDEVP([Attr])",{Attr:e})]}const Cm=l.withComposeCodeForAnalytics(e=>{const t=l.cloneDeep(e),r=l.customFormula(We.OUTLIER_MAX_VALUE_NAME,"(UPPERWHISKERMIN_IQR([Attr]), all([Attr]))",{Attr:e}),n=l.customFormula(We.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"),Tm=l.withComposeCodeForAnalytics(e=>{const t=l.cloneDeep(e),r=l.customFormula(We.OUTLIER_MAX_VALUE_NAME,"(UPPERWHISKERMIN_STDEVP([Attr]), all([Attr]))",{Attr:e}),n=l.customFormula(We.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 In(e){return!!e&&"operator"in e&&(e.operator==="AND"||e.operator==="OR")&&!!e.right&&!!e.left}function Cd(e=[],t=[]){if(!In(e)&&!In(t))return lt(e,t);const{filters:r,relations:n}=An(e),o=ps(t),i=lt(r,o),a=On(r,n,i);return Rn(i,a)}function An(e){if(!e)return{filters:[],relations:null};if(l.isArray(e))return{filters:e,relations:null};const t=new Set;function r(o){if(Td(o))return t.add(o),{instanceid:o.config.guid};if(In(o)){const i=r(o.left),a=r(o.right);return{left:i,right:a,operator:o.operator}}throw new si}const n=r(e);return{filters:Array.from(t),relations:n}}function ps(e){return e?An(e).filters:[]}function Rn(e,t){if(!t||hs(t))return e;const r=n(t);return Td(r)?[r]:r;function n(o){if(ii(o))return e.find(i=>i.config.guid===o.instanceid);if(ai(o))return(o.operator==="AND"?l.logic.and:l.logic.or)(n(o.left),n(o.right));throw new si}}function hs(e){return!!e&&"instanceid"in e}function On(e,t,r){if(t===null)return null;const n=Sm(e,r);return n.length===0?t:n.reduce((o,i)=>{switch(i.type){case"add":return Rm(i.payload,o);case"remove":return Ta(i.payload,o)}},t)}function Hl(e,t){return e.config.guid===t.config.guid}function Em(e,t,r){if(!e)return null;return o(e);function o(i){if(ii(i))return i.instanceid===t.config.guid?{instanceid:r.config.guid}:i;if(ai(i))return{left:o(i.left),right:o(i.right),operator:i.operator};throw new si}}function Sm(e,t){const r=[],n=[...e],o=[...t];return n.forEach(i=>{o.some(s=>Hl(i,s))||r.push({type:"remove",payload:i})}),o.forEach(i=>{n.some(s=>Hl(i,s))||r.push({type:"add",payload:i})}),r}function Rm(e,t){return t?{left:t,right:{instanceid:e.config.guid},operator:"AND"}:{instanceid:e.config.guid}}function Ta(e,t){if(!t)return null;if(hs(t))return t.instanceid===e.config.guid?null:t;const r=Ta(e,t.left),n=Ta(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 Om(e,t){if(!e)return null;function r(n){if(Mm(n))return{instanceid:n.instanceId};if(Pm(n))return r(n.value);if(Dm(n))return{operator:n.operator,left:r(n.left),right:r(n.right)};if(km(n)){const o=t.find(i=>{if(!l.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 Mm(e){return"instanceId"in e}function Pm(e){return"value"in e}function Dm(e){return"operator"in e}function km(e){return"levels"in e&&l.isArray(e.levels)}function ii(e){return"instanceid"in e}function ai(e){return"operator"in e}function Td(e){return"config"in e&&"guid"in e.config}function Im(e,t){if(!e)return;function r(n){if(ii(n)){const o=t.find(i=>i.config.guid===n.instanceid);return o&&l.isCascadingFilter(o)?{type:"CascadingIdentifier",levels:o.filters.map(a=>({type:"Identifier",instanceId:a.config.guid}))}:{type:"Identifier",instanceId:n.instanceid}}else{if(ai(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 Am(e,t){return e.find(r=>r.config.guid===t)}class si extends Error{constructor(){super("Broken filter relations. Unknown node type.")}}function Nm(e){return e.nodeType==="openBracket"}function $m(e){return e.nodeType==="closeBracket"}function Lm(e){return e.nodeType==="attribute"}function Fm(e){return e.nodeType==="operator"}function Nn(e){if(l.isCascadingFilter(e))return e.filters.map(Nn).join("-");const{attribute:t}=e,r=e.jaql().jaql,n=t.expression||r.dim,o=t.granularity||((r==null?void 0:r.datatype)==="datetime"?l.DimensionalLevelAttribute.translateJaqlToGranularity(r):"");return`${n}${o}`}function lt(e=[],t=[]){const r=[...e];return t.forEach(n=>{const o=r.findIndex(a=>Nn(n)===Nn(a));o!==-1?r[o]=n:r.push(n)}),r}function Hm(e){if(!e)return e;const t=l.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 Bm(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ea(e,t){return Ea=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},Ea(e,t)}function jm(e,t){if(l._typeof(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(l._typeof(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Wm(e){var t=jm(e,"string");return l._typeof(t)=="symbol"?t:t+""}function zm(e,t,r){return t=Wm(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const wn={none:"None",small:"Small",medium:"Medium",large:"Large",left:"Left",center:"Center",right:"Right",light:"Light",dark:"Dark"};function Ed(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:Vm(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:l.getDefaultThemeSettings().general.popover,buttons:{cancel:{backgroundColor:{default:e.general.secondaryButtonBaseColor,hover:e.general.secondaryButtonHoverColor,focus:e.general.secondaryButtonHoverColor},textColor:e.general.secondaryButtonTextColor}}},widget:{spaceAround:wn[e.dashboards.widgetSpacing],cornerRadius:wn[e.dashboards.widgetCornerRadius],shadow:wn[e.dashboards.widgetShadow],border:e.dashboards.widgetBorderEnabled,borderColor:e.dashboards.widgetBorderColor,header:{titleTextColor:e.dashboards.widgetTitleColor,titleAlignment:wn[e.dashboards.widgetTitleAlignment],titleFontSize:l.DEFAULT_TITLE_FONT_SIZE,dividerLine:e.dashboards.widgetTitleDividerEnabled,dividerLineColor:e.dashboards.widgetTitleDividerColor,backgroundColor:e.dashboards.widgetTitleBackgroundColor}},dashboard:{backgroundColor:e.dashboards.layoutBackgroundColor,dividerLineWidth:l.DEFAULT_DIVIDER_WIDTH,dividerLineColor:l.DEFAULT_DIVIDER_COLOR,borderWidth:l.DEFAULT_DASHBOARD_BORDER_WIDTH,borderColor:l.DEFAULT_DASHBOARD_BORDER_COLOR},filter:{panel:{titleColor:e.dashboards.panelTitleTextColor,backgroundColor:e.dashboards.panelBackgroundColor,borderWidth:l.DEFAULT_DASHBOARD_BORDER_WIDTH,borderColor:l.DEFAULT_FILTER_PANEL_BORDER_COLOR}}};return l.merge.withOptions({mergeArrays:!1},l.getDefaultThemeSettings(),n)}function Sd(e){return e.dashboards.colorPaletteName}function Vm(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 Rd(e,t){return rt(this,null,function*(){const r=yield Um(e,t);if(!r)throw new l.TranslatableError("errors.themeNotFound",{themeOid:e});const n=Sd(r),o=yield Od(n,t);return Ed(r,o,t.url)})}function Um(e,t){return rt(this,null,function*(){return t.get(`api/v1/themes/${e}`).catch(()=>{throw new l.TranslatableError("errors.themeNotFound",{themeOid:e})})})}function Od(e,t){return rt(this,null,function*(){const r=yield t.get(`api/palettes/${e}`);if(r&&"status"in r&&r.status==="error")throw new l.TranslatableError("errors.paletteNotFound",{paletteName:e});return r})}const qm={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}},Bl="composesdk",Md=(e,t,r,n=!1)=>{const o=Object.assign({action:e,cat:Bl,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=${Bl}`,i)})},jl=(e,t,r,n,o)=>{const i=qm[`${e}`];return i.internal&&Md(e,t,r,o),i.external&&n&&n(q({action:e},t)),Promise.resolve()},ms=()=>{var i,a;const{tracking:e,app:t}=l.useSisenseContext(),r=(a=(i=t==null?void 0:t.httpClient)==null?void 0:i.auth)==null?void 0:a.type,n=F.useCallback((s,c={},u=!1)=>t?jl(s,J(q({},c),{authType:r}),t.httpClient,e.onTrackingEvent,u):Promise.resolve(),[e,t,r]),o=F.useCallback((s,c=!1)=>{if(!t)return Promise.resolve();const{packageName:u,packageVersion:p,component:h,error:d}=s;let m="";return typeof d=="string"?m=d:d instanceof Error&&(m=d.message||d.toString()),jl("sdkError",J(q({},{packageName:u,packageVersion:p,component:h,error:m}),{authType:r}),t.httpClient,e.onTrackingEvent,c)},[e,t,r]);return{trackEvent:n,trackError:o}},Gm="sdkComponentInit",Pd=F.createContext(!1),Ym=({skipNested:e=!0,children:t})=>l.jsx(Pd.Provider,{value:e,children:t}),Km=(e,t)=>{const{tracking:r,app:n}=l.useSisenseContext(),{trackEvent:o}=ms(),i=F.useContext(Pd),a=F.useRef(!1);F.useEffect(()=>{if(!r||!n)return;if(!a.current&&!i){const c={packageName:r.packageName,packageVersion:"2.1.1",componentName:e,attributesUsed:Object.entries(t).filter(([,u])=>!!u).map(([u])=>u).join(", ")};o(Gm,c,!r.enabled).finally(()=>a.current=!0)}},[e,t,r,i,o,n])};var Xm="[object Boolean]";function Dd(e){return e===!0||e===!1||l.isObjectLike(e)&&l.baseGetTag(e)==Xm}const Nl=class Nl extends F.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.1.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}};Nl.contextType=l.SisenseContext;let Sa=Nl;const Qm=({componentName:e,config:t})=>{const{skip:r,transparent:n}=t||{};return o=>function(a){const{trackError:s}=ms();return Dd(r)&&r||l.isFunction(r)&&r(a)?l.jsx(o,q({},a)):(Km(e,a),l.jsx(Ym,{skipNested:!n,children:l.jsx(Sa,{componentName:e,handler:s,children:l.jsx(o,q({},a))})}))}},Zm="_container_1wquj_1",Jm="_card_1wquj_11",eg="_text_1wquj_19",Qi={container:Zm,card:Jm,text:eg};function kd({color:e="#FFCB05"}){return l.jsx("svg",{width:"53px",height:"53px",viewBox:"0 0 53 53",children:l.jsx("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:l.jsxs("g",{children:[l.jsx("polygon",{points:"26.4996 -0.000100000005 -0.000400000001 26.5009 26.4996 52.9999 53.0006 26.5009",fill:e}),l.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 Id=({error:e=new l.TranslatableError("errors.componentRenderError")})=>{var d,m,g,v,y,w;const{themeSettings:t}=l.useThemeContext(),{app:r}=l.useSisenseContext(),{t:n}=l.useTranslation(),[o,i]=F.useState(!1),a=()=>{i(!0)},s=()=>{i(!1)},c=l.jsx("div",{className:"csdk-flex csdk-justify-center csdk-mb-[10px]",children:l.jsx(kd,{color:(d=t==null?void 0:t.general)==null?void 0:d.brandColor})}),u=e instanceof l.AbstractTranslatableError?n(e.key,q({},e.interpolationOptions)):n(e instanceof Error?e.message:e),p=n("errorBoxText",{errorMessage:u,interpolation:{escapeValue:!1}}),h=(g=(m=r==null?void 0:r.settings)==null?void 0:m.errorBoundaryConfig)==null?void 0:g.alwaysShowErrorText;return l.jsx("div",{onMouseEnter:h?void 0:a,onMouseLeave:h?void 0:s,className:Qi.container,"aria-label":"error-box",children:l.jsxs("div",{className:Qi.card,style:{backgroundColor:((v=t==null?void 0:t.general)==null?void 0:v.backgroundColor)||"rgba(255,255,255,0.5)"},children:[c,(h||o)&&l.jsx("div",{className:Qi.text,style:{color:((y=t==null?void 0:t.typography)==null?void 0:y.primaryTextColor)||l.DEFAULT_TEXT_COLOR,fontFamily:((w=t==null?void 0:t.typography)==null?void 0:w.fontFamily)||"inherit"},children:p})]})})};let Ad=class extends F.Component{constructor(t){var r;super(t),this.showErrorBox=!0,this.showErrorBox=(r=t.showErrorBox)!=null?r:!0,this.onError=t.onError,this.isContainerComponent=t.isContainerComponent||!1,this.state={error:null}}static getDerivedStateFromError(t){return{error:t}}componentDidCatch(t){var r;this.setState({error:t}),(r=this.onError)==null||r.call(this,t instanceof Error?t:new Error(t))}componentDidUpdate(t,r){r.error!==null&&tg(t.resetKeys,this.props.resetKeys)&&this.setState({error:null})}render(){const t=this.state.error||this.props.error;return!t||this.isContainerComponent&&!this.showErrorBox?this.props.children:this.showErrorBox?l.jsx(Id,{error:t}):null}};function tg(e=[],t=[]){return e.length!==t.length||e.some((r,n)=>!l.isEqual(r,t[n]))}const Nd=({componentName:e})=>t=>function(n){const o=l.useSisenseContext(),i=a=>{var s,c;return(c=(s=o.errorBoundary).onError)==null?void 0:c.call(s,a,{componentName:e,componentProps:n})};return l.jsx(Ad,{resetKeys:Object.values(n),showErrorBox:o.errorBoundary.showErrorBox,onError:i,isContainerComponent:!!(n!=null&&n.children),children:l.jsx(t,q({},n))})};function $d(){var e,t;return(t=(e=document.head.querySelector('meta[property="csp-nonce"]'))==null?void 0:e.getAttribute("content"))!=null?t:void 0}const Wl=$d(),gs=({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=J(q({},t),{WebkitAnimationDelay:"-0.32s",animationDelay:"-0.32s"}),n=J(q({},t),{WebkitAnimationDelay:"-0.16s",animationDelay:"-0.16s"}),o=J(q({},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 l.jsxs("div",{children:[l.jsx("style",J(q({},Wl&&{nonce:Wl}),{children:`
2
2
  @keyframes loading-dots-animation {
3
3
  ${Object.entries(i).map(([a,s])=>`${a} { ${Object.entries(s).map(([c,u])=>`${c}: ${u};`).join("")} }`).join("")}
4
4
  }
@@ -250,9 +250,9 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStat
250
250
  `))},[re,ue,ce])}const Zt=Rf(k),vt=W.useRef(),Jt=Rt(()=>{vt.current!==void 0&&(document.body.style.WebkitUserSelect=vt.current,vt.current=void 0),Ke.clear()});W.useEffect(()=>Jt,[Jt]);const go=ce=>{Ju.clear(),Ao=!0,ie(!0),z&&!Be&&z(ce)},At=Rt(ce=>{Ju.start(800+$,()=>{Ao=!1}),ie(!1),j&&Be&&j(ce),be.start(de.transitions.duration.shortest,()=>{Le.current=!1})}),er=ce=>{Le.current&&ce.type!=="touchstart"||(ue&&ue.removeAttribute("title"),Ue.clear(),He.clear(),N||Ao&&H?Ue.start(Ao?H:N,()=>{go(ce)}):go(ce))},tr=ce=>{Ue.clear(),He.start($,()=>{At(ce)})},{isFocusVisibleRef:an,onBlur:rr,onFocus:sn,ref:vo}=Of(),[,Nt]=W.useState(!1),ln=ce=>{rr(ce),an.current===!1&&(Nt(!1),tr(ce))},cn=ce=>{ue||Ne(ce.currentTarget),sn(ce),an.current===!0&&(Nt(!0),er(ce))},yr=ce=>{Le.current=!0;const Xe=oe.props;Xe.onTouchStart&&Xe.onTouchStart(ce)},yo=ce=>{yr(ce),He.clear(),be.clear(),Jt(),vt.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",Ke.start(B,()=>{document.body.style.WebkitUserSelect=vt.current,er(ce)})},bo=ce=>{oe.props.onTouchEnd&&oe.props.onTouchEnd(ce),Jt(),He.start(V,()=>{At(ce)})};W.useEffect(()=>{if(!Be)return;function ce(Xe){(Xe.key==="Escape"||Xe.key==="Esc")&&At(Xe)}return document.addEventListener("keydown",ce),()=>{document.removeEventListener("keydown",ce)}},[At,Be]);const Ki=Ve(oe.ref,vo,Ne,r);!re&&re!==0&&(Be=!1);const $t=W.useRef(),_o=ce=>{const Xe=oe.props;Xe.onMouseMove&&Xe.onMouseMove(ce),xn={x:ce.clientX,y:ce.clientY},$t.current&&$t.current.update()},nr={},br=typeof re=="string";R?(nr.title=!Be&&br&&!I?re:null,nr["aria-describedby"]=Be?Zt:null):(nr["aria-label"]=br?re:null,nr["aria-labelledby"]=Be&&!br?Zt:null);const je=l._extends({},nr,Z,oe.props,{className:se(Z.className,oe.props.className),onTouchStart:yr,ref:Ki},L?{onMouseMove:_o}:{});process.env.NODE_ENV!=="production"&&(je["data-mui-internal-clone-element"]=!0,W.useEffect(()=>{ue&&!ue.getAttribute("data-mui-internal-clone-element")&&console.error(["MUI: The `children` component of the Tooltip is not forwarding its props correctly.","Please make sure that props are spread on the same element that the ref is applied to."].join(`
251
251
  `))},[ue]));const Lt={};P||(je.onTouchStart=yo,je.onTouchEnd=bo),I||(je.onMouseOver=No(er,je.onMouseOver),je.onMouseLeave=No(tr,je.onMouseLeave),ye||(Lt.onMouseOver=er,Lt.onMouseLeave=tr)),E||(je.onFocus=No(cn,je.onFocus),je.onBlur=No(ln,je.onBlur),ye||(Lt.onFocus=cn,Lt.onBlur=ln)),process.env.NODE_ENV!=="production"&&oe.props.title&&console.error(["MUI: You have provided a `title` prop to the child of <Tooltip />.",`Remove this title prop \`${oe.props.title}\` or the Tooltip component.`].join(`
252
252
  `));const Xi=W.useMemo(()=>{var ce;let Xe=[{name:"arrow",enabled:!!Te,options:{element:Te,padding:4}}];return(ce=K.popperOptions)!=null&&ce.modifiers&&(Xe=Xe.concat(K.popperOptions.modifiers)),l._extends({},K.popperOptions,{modifiers:Xe})},[Te,K]),Ft=l._extends({},C,{isRtl:pe,arrow:S,disableInteractive:ye,placement:Y,PopperComponentProp:X,touch:Le.current}),un=E8(Ft),xo=(n=(o=ee.popper)!=null?o:M.Popper)!=null?n:S8,dn=(i=(a=(s=ee.transition)!=null?s:M.Transition)!=null?a:G)!=null?i:jn,wo=(c=(u=ee.tooltip)!=null?u:M.Tooltip)!=null?c:R8,fn=(p=(h=ee.arrow)!=null?h:M.Arrow)!=null?p:O8,Co=Cn(xo,l._extends({},K,(d=Q.popper)!=null?d:D.popper,{className:se(un.popper,K==null?void 0:K.className,(m=(g=Q.popper)!=null?g:D.popper)==null?void 0:m.className)}),Ft),pn=Cn(dn,l._extends({},ne,(v=Q.transition)!=null?v:D.transition),Ft),pm=Cn(wo,l._extends({},(y=Q.tooltip)!=null?y:D.tooltip,{className:se(un.tooltip,(w=(T=Q.tooltip)!=null?T:D.tooltip)==null?void 0:w.className)}),Ft),hm=Cn(fn,l._extends({},(_=Q.arrow)!=null?_:D.arrow,{className:se(un.arrow,(x=(b=Q.arrow)!=null?b:D.arrow)==null?void 0:x.className)}),Ft);return te.jsxs(W.Fragment,{children:[W.cloneElement(oe,je),te.jsx(xo,l._extends({as:X!=null?X:po,placement:Y,anchorEl:L?{getBoundingClientRect:()=>({top:xn.y,left:xn.x,right:xn.x,bottom:xn.y,width:0,height:0})}:ue,popperRef:$t,open:ue?Be:!1,id:Zt,transition:!0},Lt,Co,{popperOptions:Xi,children:({TransitionProps:ce})=>te.jsx(dn,l._extends({timeout:de.transitions.duration.shorter},ce,pn,{children:te.jsxs(wo,l._extends({},pm,{children:[re,S?te.jsx(fn,l._extends({},hm,{ref:$e})):null]}))}))}))]})});process.env.NODE_ENV!=="production"&&(Ui.propTypes={arrow:f.bool,children:hr.isRequired,classes:f.object,className:f.string,components:f.shape({Arrow:f.elementType,Popper:f.elementType,Tooltip:f.elementType,Transition:f.elementType}),componentsProps:f.shape({arrow:f.object,popper:f.object,tooltip:f.object,transition:f.object}),describeChild:f.bool,disableFocusListener:f.bool,disableHoverListener:f.bool,disableInteractive:f.bool,disableTouchListener:f.bool,enterDelay:f.number,enterNextDelay:f.number,enterTouchDelay:f.number,followCursor:f.bool,id:f.string,leaveDelay:f.number,leaveTouchDelay:f.number,onClose:f.func,onOpen:f.func,open:f.bool,placement:f.oneOf(["bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),PopperComponent:f.elementType,PopperProps:f.object,slotProps:f.shape({arrow:f.object,popper:f.object,tooltip:f.object,transition:f.object}),slots:f.shape({arrow:f.elementType,popper:f.elementType,tooltip:f.elementType,transition:f.elementType}),sx:f.oneOfType([f.arrayOf(f.oneOfType([f.func,f.object,f.bool])),f.func,f.object]),title:f.node,TransitionComponent:f.elementType,TransitionProps:f.object});const M8=()=>typeof window=="undefined"||typeof document=="undefined"||!document.body||typeof window.innerWidth!="number"||typeof document.body.clientWidth!="number"?0:Math.max(0,window.innerWidth-document.body.clientWidth),P8=e=>l.isNumber$1(e)?"right":"left",ed=({displayValue:e,width:t,padding:r,ellipsizedLength:n,isHtml:o})=>{const i=e.length>n;return l.jsx("div",{className:En.tableCellContent,style:{maxWidth:`${t-r}px`},children:o?l.jsx("div",{dangerouslySetInnerHTML:{__html:e}}):i?l.jsx(Ui,{title:e,children:l.jsx("div",{children:e})}):l.jsx("div",{children:e})})},D8=({dataTable:e,dataOptions:t,height:r,width:n,customStyles:o,themeSettings:i,onSortUpdate:a})=>{var T,_,x;const s=o&&o.showFieldTypeIcon!==void 0?o.showFieldTypeIcon:!0,c=A0+(s?N0:0),u=(o==null?void 0:o.paddingVertical)||ju,p=(o==null?void 0:o.paddingHorizontal)||ju,h=((T=o==null?void 0:o.columns)==null?void 0:T.width)==="auto"?(n-p*2-M8())/t.columns.length:void 0,d=F.useMemo(()=>t.columns.map(b=>({isHtml:"isHtml"in b&&!!b.isHtml,width:h})),[t.columns,h]),[m,g]=F.useState(((_=document.fonts)==null?void 0:_.status)==="loaded"),v=(x=i.typography)==null?void 0:x.fontFamily,y=F.useMemo(()=>Jk(e,s,d,v),[e,s,d,v,m]);F.useEffect(()=>{var b;(b=document.fonts)==null||b.ready.then(()=>{g(!0)}).catch(C=>{console.warn("Failed to observe font loading",C)})},[]);const w=F.useMemo(()=>e.columns.map((b,C)=>{const S=y[C],O=t.columns[C],M=zu({isHeaderCell:!0,themeSettings:i,customStyles:o});return S?l.jsx(ko.Column,{maxWidth:es,minWidth:es,allowCellsRecycling:!0,width:S,header:l.jsx(ko.Cell,{className:zn(En.tableHeader),style:M,children:l.jsx(Gk,{column:b,onClick:a,isSelected:!!Math.abs(b.direction),showFieldTypeIcon:s,sortIcon:(o==null?void 0:o.sortIcon)||"standard",children:ed({displayValue:l.getDataOptionTitle(O),width:S,padding:c,ellipsizedLength:Qk})})}),cell:E=>{var I=E,{rowIndex:D}=I,R=_r(I,["rowIndex"]);return l.jsx(ko.Cell,J(q({className:zn(En.tableCell),style:zu({colIndex:C,rowIndex:D,themeSettings:i,customStyles:o})},R),{children:ed({displayValue:e.rows[D][C].displayValue,width:S,padding:$0,ellipsizedLength:Zk,isHtml:"isHtml"in O&&O.isHtml})}))},align:P8(b.type)},`col${C}`):null}),[e,y,i,o,a,s,t,c]);return F.useMemo(()=>l.jsx("div",{className:En.tableWrapper,style:{padding:`${u}px ${p}px`},children:l.jsx(ko.Table,{className:En.table,rowHeight:(o==null?void 0:o.rowHeight)||Kk,rowsCount:e.rows.length,width:n-p*2,height:r-u*2,headerHeight:(o==null?void 0:o.headerHeight)||Yk,children:w})}),[w,o,e,r,p,u,n])},k8="_component_1rw9b_1",I8={component:k8},A8=(e,t)=>{if(!e.columns.some(a=>l.isNumber$1(a.type)))return e;const r=e.columns,o=e.rows.map(a=>a.map((s,c)=>{const u=r[c].type,p=l.getCompleteNumberFormatConfig(t.columns[c].numberFormatConfig);if(l.isNumber$1(u)){const h=l.createCompareValue(s.displayValue,u);return{displayValue:l.applyFormatPlainText(p,h.value),compareValue:h}}else return s}));return{columns:r,rows:o}},N8=({dataTable:e,dataOptions:t,designOptions:r={},onSortUpdate:n,themeSettings:o,width:i=400,height:a=500})=>{const s=F.useRef(null),c=F.useRef(e),u=F.useMemo(()=>A8(e,t),[e,t]);F.useLayoutEffect(()=>{c.current=e},[e]);const p=F.useMemo(()=>q({sortIcon:"caret",showFieldTypeIcon:!1},r),[r]);return l.jsx("div",{className:I8.component,ref:s,children:l.jsx(D8,{dataTable:u,dataOptions:t,onSortUpdate:n,height:a,width:i,customStyles:p,themeSettings:o})})},$8=e=>({"& .MuiPaginationItem-circular.Mui-selected":{color:e.chart.textColor},"& .MuiPaginationItem-circular":{color:e.chart.secondaryTextColor,fontFamily:e.typography.fontFamily}}),L8=e=>({paddingVertical:e.paddingVertical,paddingHorizontal:e.paddingHorizontal,header:e.header,rows:e.rows,columns:e.columns}),X0=25,Q0=10,Z0=({dataSet:e,dataOptions:t,styleOptions:r={},filters:n,onDataReady:o})=>{const{rowsPerPage:i=X0,width:a,height:s}=r,{themeSettings:c}=l.useThemeContext(),[u,p]=F.useState(0),{filters:h,relations:d}=l.getFilterListAndRelationsJaql(n),[m,g]=F.useState(1),v=F.useRef(null),y=F.useMemo(()=>op(t),[t]),w=F.useMemo(()=>Ws(y.columns.filter(l.isMeasureColumn).map(l.translateColumnToMeasure)),[y]),T=F.useMemo(()=>L8(r),[r]),[_,x]=F.useState(y),[b,C]=F.useState(e),[S,O]=q3({dataSet:b,dataOptions:_,filters:h,filterRelations:d,count:i*Q0,offset:u}),M=F.useMemo(()=>{if(S&&o){const P=o(S);if(!lp(P))throw new l.TranslatableError("errors.incorrectOnDataReadyHandler");return P}return S},[S]),D=G3({data:M,innerDataOptions:O,dataColumnNamesMapping:w,needToAggregate:!Vt(b)});F.useEffect(()=>{x(y),C(e),g(1),p(0)},[e,y]);const R=F.useCallback(P=>{if(!S)return;Math.floor(S.rows.length/i)===P&&p(S.rows.length),g(P)},[S,i]),E=F.useCallback(P=>{g(1),p(0),_&&x(Ux(_,P))},[_]),I=F.useMemo(()=>{if(!D||Vt(b))return D;const P=D.columns.find(N=>N.direction!==0);return P?l.orderBy(D,[P]):D},[D,b]),A=F.useMemo(()=>I?{columns:I.columns,rows:I.rows.slice((m-1)*i,m*i)}:void 0,[I,m,i]);return O?l.jsx(Ei,{defaultSize:js("table"),size:{width:a,height:s},children:P=>{if(!D||!A)return l.jsx(li,{themeSettings:c});if(l.isDataTableEmpty(D))return l.jsx(Bs,{iconType:"table"});const N=Math.ceil(D.rows.length/i);return l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",backgroundColor:c.chart.backgroundColor},"aria-label":"table-root",children:[l.jsx(N8,{dataTable:A,dataOptions:O,designOptions:T,themeSettings:c,width:P.width,height:P.height-32,onSortUpdate:E}),l.jsx(dp,{ref:v,page:m,count:N,onChange:(B,L)=>R(L),sx:$8(c)})]})}}):null},J0=e=>{const{dataSet:t}=e;return!!t&&typeof t!="string"&&"rows"in t&&"columns"in t},F8=F.createContext(null),ba={didCatch:!1,error:null};class eh extends F.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=ba}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var r,n,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];(r=(n=this.props).onReset)===null||r===void 0||r.call(n,{args:i,reason:"imperative-api"}),this.setState(ba)}}componentDidCatch(t,r){var n,o;(n=(o=this.props).onError)===null||n===void 0||n.call(o,t,r)}componentDidUpdate(t,r){const{didCatch:n}=this.state,{resetKeys:o}=this.props;if(n&&r.error!==null&&H8(t.resetKeys,o)){var i,a;(i=(a=this.props).onReset)===null||i===void 0||i.call(a,{next:o,prev:t.resetKeys,reason:"keys"}),this.setState(ba)}}render(){const{children:t,fallbackRender:r,FallbackComponent:n,fallback:o}=this.props,{didCatch:i,error:a}=this.state;let s=t;if(i){const c={error:a,resetErrorBoundary:this.resetErrorBoundary};if(typeof r=="function")s=r(c);else if(n)s=F.createElement(n,c);else if(o===null||F.isValidElement(o))s=o;else throw a}return F.createElement(F8.Provider,{value:{didCatch:i,error:a,resetErrorBoundary:this.resetErrorBoundary}},s)}}function H8(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((r,n)=>!Object.is(r,t[n]))}const th=F.createContext(void 0),B8=({children:e})=>{const[t,r]=F.useState([]),[n,o]=F.useState([]),i=()=>r([]),a=()=>o([]);return l.jsx(th.Provider,{value:{errors:t,warnings:n,clearError:i,clearWarning:a,setErrors:r,setWarnings:o},children:e})},rh=()=>{const e=F.useContext(th);return e||{errors:[],warnings:[],setErrors:()=>{console.warn("setErrors called, but context is not available.")},setWarnings:()=>{console.warn("setWarnings called, but context is not available.")},clearError:()=>{console.warn("clearError called, but context is not available.")},clearWarning:()=>{console.warn("clearWarning called, but context is not available.")}}};function Rl(e,t,r){const n=l.usePrevious(e);return typeof e!="object"&&e===n?!1:n==null||(t?t.some(i=>!l.isEqual(n[i],e[i])):!l.isEqual(n,e))?!0:r?r(e,n):!1}const j8=e=>{const[t,r]=F.useState(0),{setErrors:n,errors:o}=rh(),i=Rl(e,["dataOptions","filters"]);if(F.useEffect(()=>{i&&o.length>0&&(r(t+1),n([]))},[e.dataOptions,e.filters]),!Vt(e.dataSet))throw new l.TranslatableError("errors.undefinedDataSource");const a=l.cloneDeep(e.dataOptions),s=l.extractTrendMeasures(a);a.value.push(...s);const c=l.extractForecastMeasures(a);a.value.push(...c);const u=F.useCallback(({error:p})=>(console.debug("Unexpected error occurred when rendering advanced chart:",p),l.jsx(Ua,q({},e))),[e,o]);return o.length===2?null:l.jsx(eh,{fallbackRender:u,onError:p=>{n(h=>[...h,p.message])},children:l.jsx(Ua,J(q({},e),{dataOptions:a}))},`errorboundary_${t}`)},nh=no({componentName:"Chart",shouldSkipSisenseContextWaiting:J0,customContextErrorMessageKey:"errors.chartNoSisenseContext"})(e=>{if(W8(e))return l.jsx(Z0,q({},e));if(z8(e))return l.jsx(j8,q({},e));if(oh(e))return l.jsx(Ua,q({},e));throw new l.TranslatableError("errors.chartInvalidProps")});function W8(e){return e.chartType==="table"&&"columns"in e.dataOptions}function oh(e){return e.chartType!=="table"}function z8(e){return!oh(e)||!l.isCartesian(e.chartType)?!1:e.dataOptions.value.some(r=>(r==null?void 0:r.forecast)!==void 0||(r==null?void 0:r.trend)!==void 0)}var V8=function(e){return e.None="",e.Large="30px",e.Medium="20px",e.Small="10px",e}({}),ns=function(e){return e.None="",e.Light="0.15",e.Medium="0.3",e.Dark="0.7",e}(ns||{}),os=function(e){return e.None="",e.Large="3px 12px",e.Medium="2px 8px",e.Small="1px 4px",e}(os||{}),ih=function(e){return e.None="",e.Large="15px",e.Medium="10px",e.Small="5px",e}({});const U8=(e,t)=>{const r=l.get(e,"shadow",t.widget.shadow),n=l.get(e,"spaceAround",t.widget.spaceAround);if(r==="None"||n==="None")return"none";if(r in ns&&n in os){const o=ns[`${r}`];return`0px ${os[`${n}`]} rgba(9, 9, 10, ${o})`}return"none"};function q8(e){return we("MuiCard",e)}Ce("MuiCard",["root"]);const G8=["className","raised"],Y8=e=>{const{classes:t}=e;return De({root:["root"]},q8,t)},K8=le(xi,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({overflow:"hidden"})),ah=W.forwardRef(function(t,r){const n=Re({props:t,name:"MuiCard"}),{className:o,raised:i=!1}=n,a=ae(n,G8),s=l._extends({},n,{raised:i}),c=Y8(s);return te.jsx(K8,l._extends({className:se(c.root,o),elevation:i?8:void 0,ref:r,ownerState:s},a))});process.env.NODE_ENV!=="production"&&(ah.propTypes={children:f.node,classes:f.object,className:f.string,raised:Dt(f.bool,e=>e.raised&&e.variant==="outlined"?new Error('MUI: Combining `raised={true}` with `variant="outlined"` has no effect.'):null),sx:f.oneOfType([f.arrayOf(f.oneOfType([f.func,f.object,f.bool])),f.func,f.object])});function X8(e){return we("MuiCardContent",e)}Ce("MuiCardContent",["root"]);const Q8=["className","component"],Z8=e=>{const{classes:t}=e;return De({root:["root"]},X8,t)},J8=le("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({padding:16,"&:last-child":{paddingBottom:24}})),sh=W.forwardRef(function(t,r){const n=Re({props:t,name:"MuiCardContent"}),{className:o,component:i="div"}=n,a=ae(n,Q8),s=l._extends({},n,{component:i}),c=Z8(s);return te.jsx(J8,l._extends({as:i,className:se(c.root,o),ownerState:s,ref:r},a))});process.env.NODE_ENV!=="production"&&(sh.propTypes={children:f.node,classes:f.object,className:f.string,component:f.elementType,sx:f.oneOfType([f.arrayOf(f.oneOfType([f.func,f.object,f.bool])),f.func,f.object])});function eI(e){return we("MuiIconButton",e)}const tI=Ce("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),rI=["edge","children","className","color","disabled","disableFocusRipple","size"],nI=e=>{const{classes:t,disabled:r,color:n,edge:o,size:i}=e,a={root:["root",r&&"disabled",n!=="default"&&`color${fe(n)}`,o&&`edge${fe(o)}`,`size${fe(i)}`]};return De(a,eI,t)},oI=le(mr,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="default"&&t[`color${fe(r.color)}`],r.edge&&t[`edge${fe(r.edge)}`],t[`size${fe(r.size)}`]]}})(({theme:e,ownerState:t})=>l._extends({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Pe(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.edge==="start"&&{marginLeft:t.size==="small"?-3:-12},t.edge==="end"&&{marginRight:t.size==="small"?-3:-12}),({theme:e,ownerState:t})=>{var r;const n=(r=(e.vars||e).palette)==null?void 0:r[t.color];return l._extends({},t.color==="inherit"&&{color:"inherit"},t.color!=="inherit"&&t.color!=="default"&&l._extends({color:n==null?void 0:n.main},!t.disableRipple&&{"&:hover":l._extends({},n&&{backgroundColor:e.vars?`rgba(${n.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Pe(n.main,e.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),t.size==="small"&&{padding:5,fontSize:e.typography.pxToRem(18)},t.size==="large"&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${tI.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})}),Wr=W.forwardRef(function(t,r){const n=Re({props:t,name:"MuiIconButton"}),{edge:o=!1,children:i,className:a,color:s="default",disabled:c=!1,disableFocusRipple:u=!1,size:p="medium"}=n,h=ae(n,rI),d=l._extends({},n,{edge:o,color:s,disabled:c,disableFocusRipple:u,size:p}),m=nI(d);return te.jsx(oI,l._extends({className:se(m.root,a),centerRipple:!0,focusRipple:!u,disabled:c,ref:r},h,{ownerState:d,children:i}))});process.env.NODE_ENV!=="production"&&(Wr.propTypes={children:Dt(f.node,e=>W.Children.toArray(e.children).some(r=>W.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(`
253
- `)):null),classes:f.object,className:f.string,color:f.oneOfType([f.oneOf(["inherit","default","primary","secondary","error","info","success","warning"]),f.string]),disabled:f.bool,disableFocusRipple:f.bool,disableRipple:f.bool,edge:f.oneOf(["end","start",!1]),size:f.oneOfType([f.oneOf(["small","medium","large"]),f.string]),sx:f.oneOfType([f.arrayOf(f.oneOfType([f.func,f.object,f.bool])),f.func,f.object])});function iI({fill:e="rgba(38, 46, 61, 0.67)"}){return l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:l.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"})})}const aI=l.newStyled(Fs,{target:"ev9zcut0",label:"StyledMuiPopover"})(".MuiPaper-root.MuiPopover-paper:not([style*='top']),.MuiPaper-root.MuiPopover-paper:not([style*='left']){opacity:0 !important;}"),lh=e=>{const s=e,{children:t,open:r,id:n,position:o,onClose:i}=s,a=_r(s,["children","open","id","position","onClose"]);return l.jsx(aI,J(q({id:n,className:"csdk-accessible",anchorEl:o==null?void 0:o.anchorEl,anchorOrigin:o==null?void 0:o.anchorOrigin,transformOrigin:o==null?void 0:o.contentOrigin,transitionDuration:0,open:r,slotProps:{paper:{sx:{display:"flex",boxShadow:"-1px -1px 10px rgba(0, 0, 0, 0.2)"}}},onClose:i},a),{children:t}))};function sI({title:e,description:t,errorMessages:r=[],styleOptions:n,onRefresh:o}){var w,T,_;const[i,a]=F.useState(null),{themeSettings:s}=l.useThemeContext(),{typography:{primaryTextColor:c,secondaryTextColor:u,fontFamily:p}}=s,{t:h}=l.useTranslation(),d=x=>{a(x.currentTarget)},m=()=>{a(null)},g=F.useMemo(()=>e?l.jsx(Ze,{variant:"body2",style:{color:c,fontFamily:p,fontSize:13},children:e}):null,[e,c,p]),v=F.useMemo(()=>r.length===0?null:r.map(x=>l.jsxs(l.Fragment,{children:[l.jsx(Lr,{sx:{my:1,borderColor:u,opacity:.3,marginY:"8px"}}),l.jsxs("div",{className:"csdk-flex",children:[l.jsx("div",{className:"csdk-shrink-0 csdk-grow-0",children:l.jsx(iI,{fill:"#fa5656"})}),l.jsx(Ze,{variant:"body2",className:"csdk-grow-1",style:{color:u,fontFamily:p,fontSize:13,marginLeft:5,lineHeight:"24px",letterSpacing:"normal",overflowWrap:"anywhere"},children:x})]})]})),[r,u,p]),y=F.useMemo(()=>t?l.jsxs(l.Fragment,{children:[l.jsx(Lr,{sx:{my:"8px",borderColor:u,opacity:.3}}),l.jsx(Ze,{variant:"body2",style:{color:u,fontFamily:p,fontSize:13},children:t})]}):null,[t,u,p]);return l.jsxs(l.Fragment,{children:[l.jsx(Ui,{title:h("widgetHeader.info.tooltip"),style:{color:(w=s.chart)==null?void 0:w.textColor,fontFamily:(T=s.typography)==null?void 0:T.fontFamily},children:l.jsx(Wr,{onClick:d,sx:{p:0},children:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",children:l.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"})})})}),l.jsx(lh,{open:!!i,position:i?{anchorEl:i,anchorOrigin:{vertical:"bottom",horizontal:"center"},contentOrigin:{vertical:"top",horizontal:"center"}}:void 0,onClose:m,children:l.jsxs(ah,{raised:!0,className:"csdk-max-w-xs csdk-w-[300px]",children:[l.jsxs("div",{className:"csdk-flex csdk-flex-row csdk-justify-between csdk-items-center csdk-py-[5px] csdk-px-[12px]",style:{backgroundColor:l.getSlightlyDifferentColor(s.general.backgroundColor)},children:[l.jsx(Ze,{variant:"subtitle2",sx:{fontWeight:"bold"},style:{color:s.typography.primaryTextColor,fontFamily:s.typography.fontFamily},children:h("widgetHeader.info.details")}),l.jsx(Wr,{onClick:o,sx:{p:0},children:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",children:l.jsx("path",{fill:(_=s.chart)==null?void 0:_.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"})})})]}),l.jsx(Lr,{sx:{borderColor:s.typography.secondaryTextColor,opacity:.3}}),l.jsxs(sh,{style:{backgroundColor:s.general.backgroundColor,padding:12},children:[g,v,y]})]})})]})}const lI=({title:e,description:t,errorMessages:r=[],warningMessages:n=[],dataSetName:o,styleOptions:i,onRefresh:a})=>{var u;const{themeSettings:s}=l.useThemeContext(),c=()=>{var h;const p=l.jsx(l.Fragment,{children:l.jsx(sI,{title:o,description:t,styleOptions:i,errorMessages:r,warningMessages:n,onRefresh:a})});return i!=null&&i.renderToolbar?(h=i==null?void 0:i.renderToolbar)==null?void 0:h.call(i,a,p):p};return l.jsxs(l.Fragment,{children:[l.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:[l.jsx("div",{className:"csdk-w-full csdk-whitespace-nowrap csdk-overflow-hidden",style:{textAlign:cI((i==null?void 0:i.titleAlignment)||s.widget.header.titleAlignment),color:(i==null?void 0:i.titleTextColor)||s.widget.header.titleTextColor,fontFamily:(u=s.typography)==null?void 0:u.fontFamily,fontSize:s.widget.header.titleFontSize},children:e||""}),l.jsx("div",{className:"csdk-ml-auto csdk-flex csdk-items-center",children:c()})]}),l.get(i,"dividerLine",s.widget.header.dividerLine)&&l.jsx(Lr,{style:{backgroundColor:(i==null?void 0:i.dividerLineColor)||s.widget.header.dividerLineColor||"#e6e6e6"}})]})};function cI(e){return e.toLowerCase()}const ch=e=>l.jsx(B8,{children:l.jsx(uI,q({},e))}),uI=({dataSetName:e,styleOptions:t,title:r,description:n,topSlot:o,bottomSlot:i,children:a,onRefresh:s=()=>{}})=>{var h,d,m;const{errors:c,warnings:u}=rh(),{themeSettings:p}=l.useThemeContext();return l.jsx("div",{className:"csdk-w-full csdk-h-full csdk-overflow-hidden csdk-accessible",children:l.jsx("div",{className:"csdk-h-full",style:{padding:ih[l.get(t,"spaceAround",p.widget.spaceAround)]||"0px"},children:l.jsxs("div",{className:"csdk-h-full csdk-overflow-hidden",style:{backgroundColor:(t==null?void 0:t.backgroundColor)||"unset",borderWidth:l.get(t,"border",p.widget.border)?"1px":0,borderColor:(t==null?void 0:t.borderColor)||p.widget.borderColor,borderRadius:V8[(t==null?void 0:t.cornerRadius)||p.widget.cornerRadius]||0,boxShadow:U8(t,p),display:"flex",flexDirection:"column"},children:[!((h=t==null?void 0:t.header)!=null&&h.hidden)&&l.jsx(lI,{title:r,description:n,dataSetName:e,errorMessages:c,warningMessages:u,styleOptions:t==null?void 0:t.header,onRefresh:s}),o,l.jsx(Ff,{theme:{chart:{backgroundColor:(t==null?void 0:t.backgroundColor)||((d=p.chart)==null?void 0:d.backgroundColor)}},children:l.jsx("div",{style:{flexGrow:1,minWidth:0,minHeight:0,backgroundColor:(t==null?void 0:t.backgroundColor)||((m=p.chart)==null?void 0:m.backgroundColor)},children:a})}),i]})})})};var dI="[object String]";function uh(e){return typeof e=="string"||!l.isArray(e)&&l.isObjectLike(e)&&l.baseGetTag(e)==dI}const fI=e=>{const t=pI(e);return t.config.disabled=!e.config.disabled,t},pI=e=>{const t=l.cloneDeep(e);return Object.setPrototypeOf(t,e),t};function hI(e,t,r){const n={guid:t,excludeMembers:!1,backgroundFilter:r};return l.members(e,[],n)}function qi(e){if(!l.isMembersFilter(e))throw new l.TranslatableError("errors.notAMembersFilter");const{attribute:t,config:{guid:r,backgroundFilter:n}}=e;return hI(t,r,n)}function Ol(e){return"members"in e&&e.members.length===0}function ut(e,t){return e.expression===(t==null?void 0:t.expression)&&e.granularity===t.granularity}function dh(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)=>!l.isEqualWith(r,t[n],fh))}function Ml(e,t){return ut(e.attribute,t.attribute)}function fh(e,t){const r=l.flow(mI,gI);return l.isEqual(r(e),r(t))}function mI(e){return J(q({},e),{name:""})}function gI(e){return J(q({},e),{config:J(q({},e.config),{guid:""})})}function vI(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,c=i,u=a,p=a;return i===void 0&&a===void 0?!0:[i,a].some(h=>h===void 0)||s.operator!==u.operator?!1:c.instanceid&&p.instanceid?!dh(e==null?void 0:e.filter(h=>h.config.guid===c.instanceid),t==null?void 0:t.filter(h=>h.config.guid===p.instanceid)):o(s.left,u.left)&&o(s.right,u.right)||o(s.left,u.right)&&o(s.right,u.left)}return!o(r,n)}const ph="sdkHookInit",yI=(e,t,r,n)=>{if(!r)return;Md(ph,{packageName:t,packageVersion:"2.1.0",hookName:e},r.httpClient).finally(n)};function bI(e){const{tracking:t,app:r}=l.useSisenseContext(),{trackEvent:n}=ms(),o=F.useRef(!1);F.useEffect(()=>{if(!(!t||!r)&&!o.current){const i={packageName:t.packageName||"sdk-ui",packageVersion:"2.1.0",hookName:e};n(ph,i,!t.enabled).finally(()=>o.current=!0)}},[t,e,n,r])}const hh=e=>t=>(...r)=>(bI(e),t(...r));function is(e,t){switch(t.type){case"loading":return _I(e);case"success":return xI(t.data);case"error":return wI(t.error)}}function _I(e){return e.status==="loading"?e:J(q({},e),{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0})}function xI(e){return{isLoading:!1,isError:!1,isSuccess:!0,data:e,status:"success",error:void 0}}function wI(e){return{isLoading:!1,isError:!0,isSuccess:!1,data:void 0,status:"error",error:e}}function mh({enabled:e},t){const r=F.useRef(!1);return F.useCallback((n,o=!1)=>{const i=e===!1||!n,a=r.current;return r.current=i,!i&&(a||t||o)},[e,t])}var _a=function(){return l.root.Date.now()},CI="Expected a function",TI=Math.max,EI=Math.min;function SI(e,t,r){var n,o,i,a,s,c,u=0,p=!1,h=!1,d=!0;if(typeof e!="function")throw new TypeError(CI);t=l.toNumber(t)||0,l.isObject(r)&&(p=!!r.leading,h="maxWait"in r,i=h?TI(l.toNumber(r.maxWait)||0,t):i,d="trailing"in r?!!r.trailing:d);function m(C){var S=n,O=o;return n=o=void 0,u=C,a=e.apply(O,S),a}function g(C){return u=C,s=setTimeout(w,t),p?m(C):a}function v(C){var S=C-c,O=C-u,M=t-S;return h?EI(M,i-O):M}function y(C){var S=C-c,O=C-u;return c===void 0||S>=t||S<0||h&&O>=i}function w(){var C=_a();if(y(C))return T(C);s=setTimeout(w,v(C))}function T(C){return s=void 0,d&&n?m(C):(n=o=void 0,a)}function _(){s!==void 0&&clearTimeout(s),u=0,n=c=o=s=void 0}function x(){return s===void 0?a:T(_a())}function b(){var C=_a(),S=y(C);if(n=arguments,o=this,c=C,S){if(s===void 0)return g(c);if(h)return clearTimeout(s),s=setTimeout(w,t),m(c)}return s===void 0&&(s=setTimeout(w,t)),a}return b.cancel=_,b.flush=x,b}function Pl(e,{onLocalStateChange:t,syncCompareFn:r=l.isEqual}={}){const[n,o]=F.useState(e),i=F.useRef(e);F.useEffect(()=>{r(i.current,e)||o(e),i.current=e},[e,r]);const a=F.useCallback(s=>{o(c=>{const u=l.isFunction(s)?s(c):s;return t==null||t(u),u})},[t]);return[n,a]}function RI({chartType:e,dataOptions:t,enabled:r}){const[n,o]=F.useState([]),i=F.useMemo(()=>{var d;const h=l.isCartesian(e)&&((d=t.category)==null?void 0:d.length)===1||l.isScatter(e);return r&&h},[r,e,t]),a=F.useMemo(()=>{if(n.length===0)return h=>J(q({},h),{series:h.series.map(d=>J(q({},d),{data:d.data.map(m=>J(q({},m),{selected:!1}))}))});if(l.isScatter(e))return h=>J(q({},h),{series:h.series.map(d=>J(q({},d),{data:d.data.map(m=>J(q({},m),{selected:!n.some(g=>{var v,y;return g.x===m.x&&g.y===m.y&&g.size===m.z&&g.breakByPoint===((v=m.custom)==null?void 0:v.maskedBreakByPoint)&&g.breakByColor===((y=m.custom)==null?void 0:y.maskedBreakByColor)})}))}))});{const h=n.reduce((d,{categoryValue:m})=>(m&&(d[`${m}`]=!0),d),{});return d=>J(q({},d),{series:d.series.map(m=>J(q({},m),{data:m.data.map(g=>{var v,y;return h[(y=(v=g.custom)==null?void 0:v.xValue)==null?void 0:y[0]]?g:J(q({},g),{selected:!0})})}))})}},[n,e]),s=F.useMemo(()=>h=>{var d;return J(q({},h),{chart:J(q({},h.chart),{events:J(q({},(d=h.chart)==null?void 0:d.events),{click:()=>{o([])}})})})},[]),c=F.useCallback(h=>(i&&(h=a(h),h=s(h)),h),[a,s,i]),u=F.useCallback(h=>{i&&o(h)},[i]),p=F.useCallback(h=>{i&&o([h])},[i]);return{onBeforeRender:c,onDataPointsSelected:u,onDataPointClick:p}}const gh=()=>{const e=ci();if(!e)throw new l.TranslatableError("errors.missingMenuRoot");const{openMenu:t,closeMenu:r}=e;return{openMenu:t,closeMenu:r}};function as(e){return e&&e.length?Vs(e):[]}function OI(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 MI(e,t){return function(r,n){if(r==null)return r;if(!l.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 PI=MI(l.baseForOwn);function DI(e,t,r,n){return PI(e,function(o,i,a){t(n,o,r(o),a)}),n}function vh(e,t){return function(r,n){var o=l.isArray(r)?OI:DI,i=t?t():{};return o(r,e,l.baseIteratee(n),i)}}var ho=vh(function(e,t,r){e[r?0:1].push(t)},function(){return[[],[]]});const kI=qr(te.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"),II=["slots","slotProps"],AI=le(mr)(({theme:e})=>l._extends({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":l._extends({},e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}),"&:active":l._extends({boxShadow:e.shadows[0]},e.palette.mode==="light"?{backgroundColor:uc(e.palette.grey[200],.12)}:{backgroundColor:uc(e.palette.grey[600],.12)})})),NI=le(kI)({width:24,height:16});function yh(e){const{slots:t={},slotProps:r={}}=e,n=ae(e,II),o=e;return te.jsx("li",{children:te.jsx(AI,l._extends({focusRipple:!0},n,{ownerState:o,children:te.jsx(NI,l._extends({as:t.CollapsedIcon,ownerState:o},r.collapsedIcon))}))})}process.env.NODE_ENV!=="production"&&(yh.propTypes={slotProps:f.shape({collapsedIcon:f.oneOfType([f.func,f.object])}),slots:f.shape({CollapsedIcon:f.elementType}),sx:f.object});function $I(e){return we("MuiBreadcrumbs",e)}const LI=Ce("MuiBreadcrumbs",["root","ol","li","separator"]),FI=["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],HI=e=>{const{classes:t}=e;return De({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},$I,t)},BI=le(Ze,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${LI.li}`]:t.li},t.root]})({}),jI=le("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),WI=le("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function zI(e,t,r,n){return e.reduce((o,i,a)=>(a<e.length-1?o=o.concat(i,te.jsx(WI,{"aria-hidden":!0,className:t,ownerState:n,children:r},`separator-${a}`)):o.push(i),o),[])}const bh=W.forwardRef(function(t,r){const n=Re({props:t,name:"MuiBreadcrumbs"}),{children:o,className:i,component:a="nav",slots:s={},slotProps:c={},expandText:u="Show path",itemsAfterCollapse:p=1,itemsBeforeCollapse:h=1,maxItems:d=8,separator:m="/"}=n,g=ae(n,FI),[v,y]=W.useState(!1),w=l._extends({},n,{component:a,expanded:v,expandText:u,itemsAfterCollapse:p,itemsBeforeCollapse:h,maxItems:d,separator:m}),T=HI(w),_=Ut({elementType:s.CollapsedIcon,externalSlotProps:c.collapsedIcon,ownerState:w}),x=W.useRef(null),b=S=>{const O=()=>{y(!0);const M=x.current.querySelector("a[href],button,[tabindex]");M&&M.focus()};return h+p>=S.length?(process.env.NODE_ENV!=="production"&&console.error(["MUI: You have provided an invalid combination of props to the Breadcrumbs.",`itemsAfterCollapse={${p}} + itemsBeforeCollapse={${h}} >= maxItems={${d}}`].join(`
253
+ `)):null),classes:f.object,className:f.string,color:f.oneOfType([f.oneOf(["inherit","default","primary","secondary","error","info","success","warning"]),f.string]),disabled:f.bool,disableFocusRipple:f.bool,disableRipple:f.bool,edge:f.oneOf(["end","start",!1]),size:f.oneOfType([f.oneOf(["small","medium","large"]),f.string]),sx:f.oneOfType([f.arrayOf(f.oneOfType([f.func,f.object,f.bool])),f.func,f.object])});function iI({fill:e="rgba(38, 46, 61, 0.67)"}){return l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:l.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"})})}const aI=l.newStyled(Fs,{target:"ev9zcut0",label:"StyledMuiPopover"})(".MuiPaper-root.MuiPopover-paper:not([style*='top']),.MuiPaper-root.MuiPopover-paper:not([style*='left']){opacity:0 !important;}"),lh=e=>{const s=e,{children:t,open:r,id:n,position:o,onClose:i}=s,a=_r(s,["children","open","id","position","onClose"]);return l.jsx(aI,J(q({id:n,className:"csdk-accessible",anchorEl:o==null?void 0:o.anchorEl,anchorOrigin:o==null?void 0:o.anchorOrigin,transformOrigin:o==null?void 0:o.contentOrigin,transitionDuration:0,open:r,slotProps:{paper:{sx:{display:"flex",boxShadow:"-1px -1px 10px rgba(0, 0, 0, 0.2)"}}},onClose:i},a),{children:t}))};function sI({title:e,description:t,errorMessages:r=[],styleOptions:n,onRefresh:o}){var w,T,_;const[i,a]=F.useState(null),{themeSettings:s}=l.useThemeContext(),{typography:{primaryTextColor:c,secondaryTextColor:u,fontFamily:p}}=s,{t:h}=l.useTranslation(),d=x=>{a(x.currentTarget)},m=()=>{a(null)},g=F.useMemo(()=>e?l.jsx(Ze,{variant:"body2",style:{color:c,fontFamily:p,fontSize:13},children:e}):null,[e,c,p]),v=F.useMemo(()=>r.length===0?null:r.map(x=>l.jsxs(l.Fragment,{children:[l.jsx(Lr,{sx:{my:1,borderColor:u,opacity:.3,marginY:"8px"}}),l.jsxs("div",{className:"csdk-flex",children:[l.jsx("div",{className:"csdk-shrink-0 csdk-grow-0",children:l.jsx(iI,{fill:"#fa5656"})}),l.jsx(Ze,{variant:"body2",className:"csdk-grow-1",style:{color:u,fontFamily:p,fontSize:13,marginLeft:5,lineHeight:"24px",letterSpacing:"normal",overflowWrap:"anywhere"},children:x})]})]})),[r,u,p]),y=F.useMemo(()=>t?l.jsxs(l.Fragment,{children:[l.jsx(Lr,{sx:{my:"8px",borderColor:u,opacity:.3}}),l.jsx(Ze,{variant:"body2",style:{color:u,fontFamily:p,fontSize:13},children:t})]}):null,[t,u,p]);return l.jsxs(l.Fragment,{children:[l.jsx(Ui,{title:h("widgetHeader.info.tooltip"),style:{color:(w=s.chart)==null?void 0:w.textColor,fontFamily:(T=s.typography)==null?void 0:T.fontFamily},children:l.jsx(Wr,{onClick:d,sx:{p:0},children:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",children:l.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"})})})}),l.jsx(lh,{open:!!i,position:i?{anchorEl:i,anchorOrigin:{vertical:"bottom",horizontal:"center"},contentOrigin:{vertical:"top",horizontal:"center"}}:void 0,onClose:m,children:l.jsxs(ah,{raised:!0,className:"csdk-max-w-xs csdk-w-[300px]",children:[l.jsxs("div",{className:"csdk-flex csdk-flex-row csdk-justify-between csdk-items-center csdk-py-[5px] csdk-px-[12px]",style:{backgroundColor:l.getSlightlyDifferentColor(s.general.backgroundColor)},children:[l.jsx(Ze,{variant:"subtitle2",sx:{fontWeight:"bold"},style:{color:s.typography.primaryTextColor,fontFamily:s.typography.fontFamily},children:h("widgetHeader.info.details")}),l.jsx(Wr,{onClick:o,sx:{p:0},children:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",children:l.jsx("path",{fill:(_=s.chart)==null?void 0:_.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"})})})]}),l.jsx(Lr,{sx:{borderColor:s.typography.secondaryTextColor,opacity:.3}}),l.jsxs(sh,{style:{backgroundColor:s.general.backgroundColor,padding:12},children:[g,v,y]})]})})]})}const lI=({title:e,description:t,errorMessages:r=[],warningMessages:n=[],dataSetName:o,styleOptions:i,onRefresh:a})=>{var u;const{themeSettings:s}=l.useThemeContext(),c=()=>{var h;const p=l.jsx(l.Fragment,{children:l.jsx(sI,{title:o,description:t,styleOptions:i,errorMessages:r,warningMessages:n,onRefresh:a})});return i!=null&&i.renderToolbar?(h=i==null?void 0:i.renderToolbar)==null?void 0:h.call(i,a,p):p};return l.jsxs(l.Fragment,{children:[l.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:[l.jsx("div",{className:"csdk-w-full csdk-whitespace-nowrap csdk-overflow-hidden",style:{textAlign:cI((i==null?void 0:i.titleAlignment)||s.widget.header.titleAlignment),color:(i==null?void 0:i.titleTextColor)||s.widget.header.titleTextColor,fontFamily:(u=s.typography)==null?void 0:u.fontFamily,fontSize:s.widget.header.titleFontSize},children:e||""}),l.jsx("div",{className:"csdk-ml-auto csdk-flex csdk-items-center",children:c()})]}),l.get(i,"dividerLine",s.widget.header.dividerLine)&&l.jsx(Lr,{style:{backgroundColor:(i==null?void 0:i.dividerLineColor)||s.widget.header.dividerLineColor||"#e6e6e6"}})]})};function cI(e){return e.toLowerCase()}const ch=e=>l.jsx(B8,{children:l.jsx(uI,q({},e))}),uI=({dataSetName:e,styleOptions:t,title:r,description:n,topSlot:o,bottomSlot:i,children:a,onRefresh:s=()=>{}})=>{var h,d,m;const{errors:c,warnings:u}=rh(),{themeSettings:p}=l.useThemeContext();return l.jsx("div",{className:"csdk-w-full csdk-h-full csdk-overflow-hidden csdk-accessible",children:l.jsx("div",{className:"csdk-h-full",style:{padding:ih[l.get(t,"spaceAround",p.widget.spaceAround)]||"0px"},children:l.jsxs("div",{className:"csdk-h-full csdk-overflow-hidden",style:{backgroundColor:(t==null?void 0:t.backgroundColor)||"unset",borderWidth:l.get(t,"border",p.widget.border)?"1px":0,borderColor:(t==null?void 0:t.borderColor)||p.widget.borderColor,borderRadius:V8[(t==null?void 0:t.cornerRadius)||p.widget.cornerRadius]||0,boxShadow:U8(t,p),display:"flex",flexDirection:"column"},children:[!((h=t==null?void 0:t.header)!=null&&h.hidden)&&l.jsx(lI,{title:r,description:n,dataSetName:e,errorMessages:c,warningMessages:u,styleOptions:t==null?void 0:t.header,onRefresh:s}),o,l.jsx(Ff,{theme:{chart:{backgroundColor:(t==null?void 0:t.backgroundColor)||((d=p.chart)==null?void 0:d.backgroundColor)}},children:l.jsx("div",{style:{flexGrow:1,minWidth:0,minHeight:0,backgroundColor:(t==null?void 0:t.backgroundColor)||((m=p.chart)==null?void 0:m.backgroundColor)},children:a})}),i]})})})};var dI="[object String]";function uh(e){return typeof e=="string"||!l.isArray(e)&&l.isObjectLike(e)&&l.baseGetTag(e)==dI}const fI=e=>{const t=pI(e);return t.config.disabled=!e.config.disabled,t},pI=e=>{const t=l.cloneDeep(e);return Object.setPrototypeOf(t,e),t};function hI(e,t,r){const n={guid:t,excludeMembers:!1,backgroundFilter:r};return l.members(e,[],n)}function qi(e){if(!l.isMembersFilter(e))throw new l.TranslatableError("errors.notAMembersFilter");const{attribute:t,config:{guid:r,backgroundFilter:n}}=e;return hI(t,r,n)}function Ol(e){return"members"in e&&e.members.length===0}function ut(e,t){return e.expression===(t==null?void 0:t.expression)&&e.granularity===t.granularity}function dh(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)=>!l.isEqualWith(r,t[n],fh))}function Ml(e,t){return ut(e.attribute,t.attribute)}function fh(e,t){const r=l.flow(mI,gI);return l.isEqual(r(e),r(t))}function mI(e){return J(q({},e),{name:""})}function gI(e){return J(q({},e),{config:J(q({},e.config),{guid:""})})}function vI(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,c=i,u=a,p=a;return i===void 0&&a===void 0?!0:[i,a].some(h=>h===void 0)||s.operator!==u.operator?!1:c.instanceid&&p.instanceid?!dh(e==null?void 0:e.filter(h=>h.config.guid===c.instanceid),t==null?void 0:t.filter(h=>h.config.guid===p.instanceid)):o(s.left,u.left)&&o(s.right,u.right)||o(s.left,u.right)&&o(s.right,u.left)}return!o(r,n)}const ph="sdkHookInit",yI=(e,t,r,n)=>{if(!r)return;Md(ph,{packageName:t,packageVersion:"2.1.1",hookName:e},r.httpClient).finally(n)};function bI(e){const{tracking:t,app:r}=l.useSisenseContext(),{trackEvent:n}=ms(),o=F.useRef(!1);F.useEffect(()=>{if(!(!t||!r)&&!o.current){const i={packageName:t.packageName||"sdk-ui",packageVersion:"2.1.1",hookName:e};n(ph,i,!t.enabled).finally(()=>o.current=!0)}},[t,e,n,r])}const hh=e=>t=>(...r)=>(bI(e),t(...r));function is(e,t){switch(t.type){case"loading":return _I(e);case"success":return xI(t.data);case"error":return wI(t.error)}}function _I(e){return e.status==="loading"?e:J(q({},e),{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0})}function xI(e){return{isLoading:!1,isError:!1,isSuccess:!0,data:e,status:"success",error:void 0}}function wI(e){return{isLoading:!1,isError:!0,isSuccess:!1,data:void 0,status:"error",error:e}}function mh({enabled:e},t){const r=F.useRef(!1);return F.useCallback((n,o=!1)=>{const i=e===!1||!n,a=r.current;return r.current=i,!i&&(a||t||o)},[e,t])}var _a=function(){return l.root.Date.now()},CI="Expected a function",TI=Math.max,EI=Math.min;function SI(e,t,r){var n,o,i,a,s,c,u=0,p=!1,h=!1,d=!0;if(typeof e!="function")throw new TypeError(CI);t=l.toNumber(t)||0,l.isObject(r)&&(p=!!r.leading,h="maxWait"in r,i=h?TI(l.toNumber(r.maxWait)||0,t):i,d="trailing"in r?!!r.trailing:d);function m(C){var S=n,O=o;return n=o=void 0,u=C,a=e.apply(O,S),a}function g(C){return u=C,s=setTimeout(w,t),p?m(C):a}function v(C){var S=C-c,O=C-u,M=t-S;return h?EI(M,i-O):M}function y(C){var S=C-c,O=C-u;return c===void 0||S>=t||S<0||h&&O>=i}function w(){var C=_a();if(y(C))return T(C);s=setTimeout(w,v(C))}function T(C){return s=void 0,d&&n?m(C):(n=o=void 0,a)}function _(){s!==void 0&&clearTimeout(s),u=0,n=c=o=s=void 0}function x(){return s===void 0?a:T(_a())}function b(){var C=_a(),S=y(C);if(n=arguments,o=this,c=C,S){if(s===void 0)return g(c);if(h)return clearTimeout(s),s=setTimeout(w,t),m(c)}return s===void 0&&(s=setTimeout(w,t)),a}return b.cancel=_,b.flush=x,b}function Pl(e,{onLocalStateChange:t,syncCompareFn:r=l.isEqual}={}){const[n,o]=F.useState(e),i=F.useRef(e);F.useEffect(()=>{r(i.current,e)||o(e),i.current=e},[e,r]);const a=F.useCallback(s=>{o(c=>{const u=l.isFunction(s)?s(c):s;return t==null||t(u),u})},[t]);return[n,a]}function RI({chartType:e,dataOptions:t,enabled:r}){const[n,o]=F.useState([]),i=F.useMemo(()=>{var d;const h=l.isCartesian(e)&&((d=t.category)==null?void 0:d.length)===1||l.isScatter(e);return r&&h},[r,e,t]),a=F.useMemo(()=>{if(n.length===0)return h=>J(q({},h),{series:h.series.map(d=>J(q({},d),{data:d.data.map(m=>J(q({},m),{selected:!1}))}))});if(l.isScatter(e))return h=>J(q({},h),{series:h.series.map(d=>J(q({},d),{data:d.data.map(m=>J(q({},m),{selected:!n.some(g=>{var v,y;return g.x===m.x&&g.y===m.y&&g.size===m.z&&g.breakByPoint===((v=m.custom)==null?void 0:v.maskedBreakByPoint)&&g.breakByColor===((y=m.custom)==null?void 0:y.maskedBreakByColor)})}))}))});{const h=n.reduce((d,{categoryValue:m})=>(m&&(d[`${m}`]=!0),d),{});return d=>J(q({},d),{series:d.series.map(m=>J(q({},m),{data:m.data.map(g=>{var v,y;return h[(y=(v=g.custom)==null?void 0:v.xValue)==null?void 0:y[0]]?g:J(q({},g),{selected:!0})})}))})}},[n,e]),s=F.useMemo(()=>h=>{var d;return J(q({},h),{chart:J(q({},h.chart),{events:J(q({},(d=h.chart)==null?void 0:d.events),{click:()=>{o([])}})})})},[]),c=F.useCallback(h=>(i&&(h=a(h),h=s(h)),h),[a,s,i]),u=F.useCallback(h=>{i&&o(h)},[i]),p=F.useCallback(h=>{i&&o([h])},[i]);return{onBeforeRender:c,onDataPointsSelected:u,onDataPointClick:p}}const gh=()=>{const e=ci();if(!e)throw new l.TranslatableError("errors.missingMenuRoot");const{openMenu:t,closeMenu:r}=e;return{openMenu:t,closeMenu:r}};function as(e){return e&&e.length?Vs(e):[]}function OI(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 MI(e,t){return function(r,n){if(r==null)return r;if(!l.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 PI=MI(l.baseForOwn);function DI(e,t,r,n){return PI(e,function(o,i,a){t(n,o,r(o),a)}),n}function vh(e,t){return function(r,n){var o=l.isArray(r)?OI:DI,i=t?t():{};return o(r,e,l.baseIteratee(n),i)}}var ho=vh(function(e,t,r){e[r?0:1].push(t)},function(){return[[],[]]});const kI=qr(te.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"),II=["slots","slotProps"],AI=le(mr)(({theme:e})=>l._extends({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":l._extends({},e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}),"&:active":l._extends({boxShadow:e.shadows[0]},e.palette.mode==="light"?{backgroundColor:uc(e.palette.grey[200],.12)}:{backgroundColor:uc(e.palette.grey[600],.12)})})),NI=le(kI)({width:24,height:16});function yh(e){const{slots:t={},slotProps:r={}}=e,n=ae(e,II),o=e;return te.jsx("li",{children:te.jsx(AI,l._extends({focusRipple:!0},n,{ownerState:o,children:te.jsx(NI,l._extends({as:t.CollapsedIcon,ownerState:o},r.collapsedIcon))}))})}process.env.NODE_ENV!=="production"&&(yh.propTypes={slotProps:f.shape({collapsedIcon:f.oneOfType([f.func,f.object])}),slots:f.shape({CollapsedIcon:f.elementType}),sx:f.object});function $I(e){return we("MuiBreadcrumbs",e)}const LI=Ce("MuiBreadcrumbs",["root","ol","li","separator"]),FI=["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],HI=e=>{const{classes:t}=e;return De({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},$I,t)},BI=le(Ze,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${LI.li}`]:t.li},t.root]})({}),jI=le("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),WI=le("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function zI(e,t,r,n){return e.reduce((o,i,a)=>(a<e.length-1?o=o.concat(i,te.jsx(WI,{"aria-hidden":!0,className:t,ownerState:n,children:r},`separator-${a}`)):o.push(i),o),[])}const bh=W.forwardRef(function(t,r){const n=Re({props:t,name:"MuiBreadcrumbs"}),{children:o,className:i,component:a="nav",slots:s={},slotProps:c={},expandText:u="Show path",itemsAfterCollapse:p=1,itemsBeforeCollapse:h=1,maxItems:d=8,separator:m="/"}=n,g=ae(n,FI),[v,y]=W.useState(!1),w=l._extends({},n,{component:a,expanded:v,expandText:u,itemsAfterCollapse:p,itemsBeforeCollapse:h,maxItems:d,separator:m}),T=HI(w),_=Ut({elementType:s.CollapsedIcon,externalSlotProps:c.collapsedIcon,ownerState:w}),x=W.useRef(null),b=S=>{const O=()=>{y(!0);const M=x.current.querySelector("a[href],button,[tabindex]");M&&M.focus()};return h+p>=S.length?(process.env.NODE_ENV!=="production"&&console.error(["MUI: You have provided an invalid combination of props to the Breadcrumbs.",`itemsAfterCollapse={${p}} + itemsBeforeCollapse={${h}} >= maxItems={${d}}`].join(`
254
254
  `)),S):[...S.slice(0,h),te.jsx(yh,{"aria-label":u,slots:{CollapsedIcon:s.CollapsedIcon},slotProps:{collapsedIcon:_},onClick:O},"ellipsis"),...S.slice(S.length-p,S.length)]},C=W.Children.toArray(o).filter(S=>(process.env.NODE_ENV!=="production"&&$n.isFragment(S)&&console.error(["MUI: The Breadcrumbs component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
255
- `)),W.isValidElement(S))).map((S,O)=>te.jsx("li",{className:T.li,children:S},`child-${O}`));return te.jsx(BI,l._extends({ref:r,component:a,color:"text.secondary",className:se(T.root,i),ownerState:w},g,{children:te.jsx(jI,{className:T.ol,ref:x,ownerState:w,children:zI(v||d&&C.length<=d?C:b(C),T.separator,m,w)})}))});process.env.NODE_ENV!=="production"&&(bh.propTypes={children:f.node,classes:f.object,className:f.string,component:f.elementType,expandText:f.string,itemsAfterCollapse:bt,itemsBeforeCollapse:bt,maxItems:bt,separator:f.node,slotProps:f.shape({collapsedIcon:f.oneOfType([f.func,f.object])}),slots:f.shape({CollapsedIcon:f.elementType}),sx:f.oneOfType([f.arrayOf(f.oneOfType([f.func,f.object,f.bool])),f.func,f.object])});function VI(e){return we("MuiButton",e)}const $o=Ce("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"]),_h=W.createContext({});process.env.NODE_ENV!=="production"&&(_h.displayName="ButtonGroupContext");const xh=W.createContext(void 0);process.env.NODE_ENV!=="production"&&(xh.displayName="ButtonGroupButtonContext");const UI=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],qI=e=>{const{color:t,disableElevation:r,fullWidth:n,size:o,variant:i,classes:a}=e,s={root:["root",i,`${i}${fe(t)}`,`size${fe(o)}`,`${i}Size${fe(o)}`,`color${fe(t)}`,r&&"disableElevation",n&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${fe(o)}`],endIcon:["icon","endIcon",`iconSize${fe(o)}`]},c=De(s,VI,a);return l._extends({},a,c)},wh=e=>l._extends({},e.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},e.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},e.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),GI=le(mr,{shouldForwardProp:e=>Jn(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]}})(({theme:e,ownerState:t})=>{var r,n;const o=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],i=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return l._extends({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":l._extends({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Pe(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="text"&&t.color!=="inherit"&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Pe(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="outlined"&&t.color!=="inherit"&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Pe(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="contained"&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:i,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},t.variant==="contained"&&t.color!=="inherit"&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":l._extends({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${$o.focusVisible}`]:l._extends({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${$o.disabled}`]:l._extends({color:(e.vars||e).palette.action.disabled},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},t.variant==="contained"&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},t.variant==="text"&&{padding:"6px 8px"},t.variant==="text"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main},t.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},t.variant==="outlined"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${Pe(e.palette[t.color].main,.5)}`},t.variant==="contained"&&{color:e.vars?e.vars.palette.text.primary:(r=(n=e.palette).getContrastText)==null?void 0:r.call(n,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:o,boxShadow:(e.vars||e).shadows[2]},t.variant==="contained"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},t.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},t.size==="small"&&t.variant==="text"&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="text"&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="outlined"&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="outlined"&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="contained"&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="contained"&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})},({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${$o.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${$o.disabled}`]:{boxShadow:"none"}}),YI=le("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.startIcon,t[`iconSize${fe(r.size)}`]]}})(({ownerState:e})=>l._extends({display:"inherit",marginRight:8,marginLeft:-4},e.size==="small"&&{marginLeft:-2},wh(e))),KI=le("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.endIcon,t[`iconSize${fe(r.size)}`]]}})(({ownerState:e})=>l._extends({display:"inherit",marginRight:-4,marginLeft:8},e.size==="small"&&{marginRight:-2},wh(e))),qn=W.forwardRef(function(t,r){const n=W.useContext(_h),o=W.useContext(xh),i=Mf(n,t),a=Re({props:i,name:"MuiButton"}),{children:s,color:c="primary",component:u="button",className:p,disabled:h=!1,disableElevation:d=!1,disableFocusRipple:m=!1,endIcon:g,focusVisibleClassName:v,fullWidth:y=!1,size:w="medium",startIcon:T,type:_,variant:x="text"}=a,b=ae(a,UI),C=l._extends({},a,{color:c,component:u,disabled:h,disableElevation:d,disableFocusRipple:m,fullWidth:y,size:w,type:_,variant:x}),S=qI(C),O=T&&te.jsx(YI,{className:S.startIcon,ownerState:C,children:T}),M=g&&te.jsx(KI,{className:S.endIcon,ownerState:C,children:g}),D=o||"";return te.jsxs(GI,l._extends({ownerState:C,className:se(n.className,S.root,p,D),component:u,disabled:h,focusRipple:!m,focusVisibleClassName:se(S.focusVisible,v),ref:r,type:_},b,{classes:S,children:[O,s,M]}))});process.env.NODE_ENV!=="production"&&(qn.propTypes={children:f.node,classes:f.object,className:f.string,color:f.oneOfType([f.oneOf(["inherit","primary","secondary","success","error","info","warning"]),f.string]),component:f.elementType,disabled:f.bool,disableElevation:f.bool,disableFocusRipple:f.bool,disableRipple:f.bool,endIcon:f.node,focusVisibleClassName:f.string,fullWidth:f.bool,href:f.string,size:f.oneOfType([f.oneOf(["small","medium","large"]),f.string]),startIcon:f.node,sx:f.oneOfType([f.arrayOf(f.oneOfType([f.func,f.object,f.bool])),f.func,f.object]),type:f.oneOfType([f.oneOf(["button","reset","submit"]),f.string]),variant:f.oneOfType([f.oneOf(["contained","outlined","text"]),f.string])});const XI=({clearDrilldownSelections:e,currentDimension:t,setIsHovered:r,themeProps:n})=>{const{t:o}=l.useTranslation(),i=t.name,a=l.newStyled(qn,{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=l.newStyled("svg",{target:"e1olvz1k1",label:"Icon"})("width:22px;height:22px;fill:#9ea2ab;"),c=()=>l.jsx(a,{theme:n,onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),onClick:e,children:l.jsx(s,{width:22,height:22,viewBox:"0 0 24 24",children:l.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"})})}),u=l.newStyled(qn,{target:"e1olvz1k2",label:"StyledCurrentDrillButton"})("&&{position:relative;font-family:",h=>h.theme.fontFamily,";border-radius:0;border:1px solid ",wt,";background-color:",h=>h.theme.chartBackgroundColor,";border-right:none;border-left:none;color:",h=>h.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:",h=>h.theme.chartBackgroundColor,";border:1px solid ",wt,";border-right:none;border-left:none;}}");return{CancelButton:c,CurrentDrillButton:()=>l.jsxs(u,{theme:n,children:[i," (",o("drilldown.breadcrumbsAllSuffix"),")",l.jsx("span",{className:"flex items-center justify-between",children:l.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 ${wt}`,borderRight:`1px solid ${wt}`}})})]})}},QI={modifiers:[{name:"offset",options:{offset:[0,12]}}]},ZI=({themeProps:e,filterDisplayValues:t,currentTable:r,currentColumn:n})=>{const{t:o}=l.useTranslation();return l.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:[l.jsxs("div",{className:"csdk-border-b csdk-border-[#e4e4e4] csdk-p-3 csdk-pl-1",children:[l.jsx(Ze,{variant:"body2",fontFamily:e.fontFamily,fontSize:11,children:o("drilldown.popover.members")}),l.jsx(Ze,{variant:"body2",fontFamily:e.fontFamily,fontSize:13,children:t.join(", ")})]}),l.jsxs("div",{className:"csdk-border-b csdk-border-[#e4e4e4] csdk-p-3 csdk-pl-1",children:[l.jsx(Ze,{variant:"body2",fontFamily:e.fontFamily,fontSize:11,children:o("drilldown.popover.table")}),l.jsx(Ze,{variant:"body2",fontFamily:e.fontFamily,fontSize:13,children:r})]}),l.jsxs("div",{className:"csdk-p-3 csdk-pl-1",children:[l.jsx(Ze,{variant:"body2",fontFamily:e.fontFamily,fontSize:11,children:o("drilldown.popover.column")}),l.jsx(Ze,{variant:"body2",fontFamily:e.fontFamily,fontSize:13,children:n})]})]})},JI=({popperParams:e,currentDimension:t,themeProps:r})=>{const n=t.expression.match(/\[(.*?)]/),[o,i]=n?n[1].split("."):["",""],a=!!e;return l.jsx(po,{open:a,anchorEl:e==null?void 0:e.anchorEl,placement:"bottom",popperOptions:QI,children:e&&l.jsx(ZI,{themeProps:r,filterDisplayValues:e.filterDisplayValues,currentTable:o,currentColumn:i})})},e7=()=>{const{themeSettings:{typography:{primaryTextColor:e,secondaryTextColor:t,fontFamily:r},general:{backgroundColor:n,brandColor:o,primaryButtonTextColor:i},chart:{backgroundColor:a}}}=l.useThemeContext(),s=l.scaleBrightness(a,-.02),c=l.scaleBrightness(s,-.05);return{primaryTextColor:e,secondaryTextColor:t,fontFamily:r,backgroundColor:n,brandColor:o,primaryButtonTextColor:i,chartBackgroundColor:a,activeDrillBackgroundColor:s,activeDrillHoverBackgroundColor:c}},t7=l.newStyled(Wr,{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;}}}"),r7=l.newStyled(Wr,{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;}}}"),n7=({currentDimension:e,children:t})=>{const{t:r}=l.useTranslation(),n=F.useRef(null),[o,i]=F.useState(0),[a,s]=F.useState(0),[c,u]=F.useState(0),p=()=>{var g;return(g=n.current)==null?void 0:g.querySelector("ol")};F.useEffect(()=>{const g=p();if(g){const v=g.clientWidth,y=g.scrollWidth,w=g.scrollLeft;i(v),s(y),u(w)}},[e]),F.useEffect(()=>{const g=p();function v(){if(g){const T=g.clientWidth;i(T)}}function y(){if(g){const T=g.scrollLeft;u(T)}}const w=new ResizeObserver(v);return g?(w.observe(g),g.addEventListener("scroll",y),()=>{w.disconnect(),g.removeEventListener("scroll",y)}):()=>{}},[]);const h=g=>{const y="smooth",w=p();w&&w.scrollBy({left:g==="right"?200:-200,behavior:y})},d=c!=0,m=Math.floor(a-c)>o;return l.jsxs("div",{style:{position:"relative"},children:[d&&l.jsx(t7,{onClick:()=>h("left"),children:l.jsx("span",{"aria-label":"prev-item",children:r("drilldown.breadcrumbsPrev")})}),m&&l.jsx(r7,{onClick:()=>h("right"),children:l.jsx("span",{"aria-label":"next-item",children:r("drilldown.breadcrumbsNext")})}),l.jsx("div",{ref:n,children:t})]})},wt="#F2F2F2",o7=l.newStyled(qn,{target:"ex0ybhj0",label:"StyledDrillButton"})("&&{font-family:",({theme:e})=>e.fontFamily,";position:relative;border-radius:0;border:1px solid ",wt,";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 ",wt,";border-right:none;}.MuiTouchRipple-root{display:none;}}"),i7=l.newStyled(bh,{target:"ex0ybhj1",label:"StyledBreadcrumbs"})(".MuiBreadcrumbs-ol{flex-wrap:nowrap;overflow:hidden;}.MuiBreadcrumbs-separator{display:none;}"),a7=({isActive:e,filterDisplayValue:t,handleMouseEnter:r,handleMouseLeave:n,handleClick:o,themeProps:i,popperParams:a,index:s})=>l.jsx(o7,{theme:i,active:e.toString(),index:s,onMouseEnter:r,onMouseLeave:n,onClick:o,children:l.jsxs("span",{className:"flex items-center justify-between",children:[l.jsxs("span",{className:"mr-2",children:[t.slice(0,2).join(", "),t.length>2&&", ..."]}),e?l.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 ${wt}`,borderRight:`1px solid ${wt}`,transition:"background-color 0.2s, border-color 0.2s, color 0.2s",zIndex:8}}):void 0,l.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 ${wt}`,borderRight:`1px solid ${wt}`,zIndex:7,transition:"background-color 0.2s, border-color 0.2s, color 0.2s"}})]})}),Ch=no({componentName:"DrilldownBreadcrumbs",shouldSkipSisenseContextWaiting:!0})(({filtersDisplayValues:e,currentDimension:t,clearDrilldownSelections:r,sliceDrilldownSelections:n})=>{const[o,i]=F.useState(null),[a,s]=F.useState(!1),c=e7(),{CancelButton:u,CurrentDrillButton:p}=XI({clearDrilldownSelections:r,currentDimension:t,isHovered:a,setIsHovered:s,themeProps:c}),h=v=>y=>{s(!0),i({filterDisplayValues:v,anchorEl:y.currentTarget})},d=()=>{s(!1),i(null)},m=v=>v<e.length-1,g=v=>v===e.length-2;return e.length?l.jsx("div",{"aria-label":"drilldown-breadcrumbs",children:l.jsx(n7,{currentDimension:t,children:l.jsxs(i7,{separator:null,sx:{backgroundColor:c.chartBackgroundColor,padding:"4px"},children:[l.jsx(u,{}),e.map((v,y)=>{const w=m(y),T=g(y);return l.jsx("div",{children:l.jsx(a7,{isActive:w,isLastActive:T,filterDisplayValue:v,handleMouseEnter:h(v),handleMouseLeave:d,handleClick:()=>n(y+1),themeProps:c,popperParams:o,index:y})},y)}),l.jsx(p,{}),l.jsx(JI,{popperParams:o,currentDimension:t,themeProps:c})]})})}):null}),Th=e=>{const{initialDimension:t,onDrilldownSelectionsChange:r}=e,n=F.useMemo(()=>e.drilldownPaths||[],[e.drilldownPaths]),o=F.useMemo(()=>e.drilldownSelections||[],[e.drilldownSelections]),{t:i}=l.useTranslation();if(!t)throw new l.TranslatableError("errors.drilldownNoInitialDimension");const[a,s]=Pl(o,{onLocalStateChange:r}),c=F.useMemo(()=>[l.translateColumnToAttribute(t),...a.map(({nextDimension:y})=>y)],[t,a]),u=F.useMemo(()=>n.filter(y=>{if(l.MetadataTypes.isAttribute(y)){const _=y;return c.every(x=>!ut(x,_))}const T=y;return c.every((_,x)=>ut(_,T.levels[x]))}),[n,c]),p=F.useCallback((y,w,T)=>{s(_=>Eh(_,y,w,T))},[s]),h=F.useCallback(y=>{s(w=>w.slice(0,y))},[s]),d=F.useCallback(()=>{s([])},[s]),{drilldownFilters:m,drilldownFiltersDisplayValues:g,drilldownDimension:v}=F.useMemo(()=>Sh(a,t,i),[a,t,i]);return{drilldownSelections:a,availableDrilldownPaths:u,drilldownFilters:m,drilldownFiltersDisplayValues:g,drilldownDimension:v,selectDrilldown:p,sliceDrilldownSelections:h,clearDrilldownSelections:d}},Eh=(e,t,r,n)=>{var d,m;if(!(n!=null&&n.levels))return[...e,{points:t,nextDimension:r}];if(ut(n.levels[0],r))return[];const i=(d=e==null?void 0:e.findIndex(g=>ut(g.nextDimension,r)))!=null?d:-1;if(i!==-1)return e.slice(0,i+1);const s=(m=l.last(e))==null?void 0:m.nextDimension,c=e.length?n.levels.findIndex(g=>s&&ut(g,s)):0,u=n.levels.indexOf(r),h=n.levels.slice(c+1,u+1).map((g,v)=>({points:v===0?t:[],nextDimension:g}));return[...e,...h]},Sh=(e,t,r)=>{let n=t&&l.translateColumnToAttribute(t);const o=[],i=[];return e.forEach(({points:a,nextDimension:s})=>{o.push(l.members(n,a.map(s7)));const c=a.length?a.map(Rh):[`${n.name} (${r("drilldown.breadcrumbsAllSuffix")})`];i.push(c),n=s}),{drilldownFilters:o,drilldownFiltersDisplayValues:i,drilldownDimension:n}};function Rh(e){return"categoryDisplayValue"in e?`${e.categoryDisplayValue}`:"categoryValue"in e?`${e.categoryValue}`:""}function s7(e){return"categoryValue"in e?`${e.categoryValue}`:""}var l7=Object.prototype,c7=l7.hasOwnProperty,u7=vh(function(e,t,r){c7.call(e,r)?e[r].push(t):l.baseAssignValue(e,r,[t])});function d7(e,t){return t.all?[]:e.filter(r=>{var n;return!((n=t.ids)!=null&&n.includes(r.config.guid))})}function Oh(e,t){return e.find(r=>ut(r.attribute,t))}function Mh(e,t,r){const n=Oh(r,e);return l.members(e,t.map(o=>`${o}`),{guid:n==null?void 0:n.config.guid,backgroundFilter:n==null?void 0:n.config.backgroundFilter})}function Ph(e,t){return Ml(e,t)&&"members"in e&&"members"in t&&l.isEqual(e.members,t.members)}var Gn=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 Dh=2;function nn(e,t){const r=e.flatMap(({entries:o={}})=>t.flatMap(i=>{const a=o[i];return a?(Array.isArray(a)?a:[a]).filter(({attribute:c})=>!!c):[]})),n=u7(r,({id:o})=>o);return Object.values(n).map(o=>({attribute:o[0].attribute,values:as(o.map(({value:i})=>i)),displayValues:as(o.map(({displayValue:i})=>i))}))}function f7(e){return nn(e,["category"])}function p7(e){return nn(e,["category"])}function h7(e,t){const r=nn(e,["category"]),n=r.length-1;return t.category.map((o,i)=>n===i?r[i]:{attribute:l.translateColumnToAttribute(o),values:[],displayValues:[]})}function m7(e){return nn(e,["x","y","breakByPoint","breakByColor"])}function g7(e){return nn(e,["geo"])}function v7(e){return nn(e,["geo"])}function zo(e,t,r){return e==="plugin"?[]:e==="text"?[]:e==="pivot"?[]:e==="treemap"||e==="sunburst"?h7(r,t):l.isCartesian(e)||e==="pie"||e==="funnel"?f7(r):l.isBoxplot(e)?p7(r):l.isScatter(e)?m7(r):l.isScattermap(e)?g7(r):l.isAreamap(e)?v7(r):[]}function Dl(e,t){let r=[];return e==="plugin"?r=[]:e==="text"?r=[]:e==="pivot"?r=[...t.rows||[],...t.columns||[]]:l.isCartesian(e)||l.isCategorical(e)||l.isBoxplot(e)||l.isRange(e)?r=[...t.category]:l.isScatter(e)?r=[t.x,t.y,t.breakByPoint,t.breakByColor].filter(n=>!!(n&&!l.isMeasureColumn(n))):(l.isScattermap(e)||l.isAreamap(e))&&(r=[...t.geo]),r.map(l.translateColumnToAttribute)}function y7(e,t,r){const n=Oh(t,e.attribute);if(!n||Ol(n))return null;if(Ph(e,n))return qi(e);if(l.isMembersFilter(n)&&r){const[o,i]=ho(n.members,s=>e.members.includes(s));if(o.length===e.members.length&&i.length)return Mh(e.attribute,i,[n])}return null}function b7(e,t,r){const n=t.filter(a=>!a.config.disabled),o=e.map(a=>y7(a,n,r)).filter(a=>!!a),i=e.length!==o.length;return{filters:i?e:o,isSelection:i}}function xa(e,t,r=!1){const n=e.map(({attribute:i,values:a})=>Mh(i,a,t)),o=_7(t,n);return b7(o,t,r)}function _7(e,t){const r=e.filter(n=>n.config.locked);return r.length?t.filter(n=>!r.some(o=>Ml(o,n))):t}function x7(e,t,r){const n=zo(e,t,r).filter(({displayValues:s})=>s.length);if(n.length===0)return"";const[o]=n,i=r.length===1,a=o.displayValues.length>Dh;return n.length>1?i?n.map(s=>s.displayValues[0]).join(", "):a?"":o.displayValues.join(", "):a?o.attribute.name:o.displayValues.join(", ")}function td(e,t,r){const n=x7(e,t,r);return n?{id:Gn.CROSSFILTERING_CHART_POINTS_SELECTION,sectionTitle:n}:null}function rd(e,t){return{items:[{caption:e,onClick:t}]}}const w7=({initialDimension:e,drilldownPaths:t,drilldownSelections:r,openMenu:n,onDrilldownSelectionsChange:o})=>{const{t:i}=l.useTranslation(),{availableDrilldownPaths:a,drilldownFilters:s,drilldownFiltersDisplayValues:c,drilldownDimension:u,selectDrilldown:p,sliceDrilldownSelections:h,clearDrilldownSelections:d}=Th({initialDimension:e,drilldownPaths:t,drilldownSelections:r,onDrilldownSelectionsChange:o}),m=F.useCallback((v,y)=>{const w=[kh(y,u),Ih(a,u,(T,_)=>{p(y,T,_)},i)];n({position:v,itemSections:w})},[u,a,i,p,n]),g=F.useMemo(()=>u&&l.jsx(Ch,{filtersDisplayValues:c,currentDimension:u,clearDrilldownSelections:d,sliceDrilldownSelections:h}),[d,u,c,h]);return{drilldownDimension:u,drilldownFilters:s,breadcrumbs:g,openDrilldownMenu:m}};function kh(e,t){const r=as(e.map(Rh).filter(n=>!!n));return r.length>Dh?{id:Gn.DRILLDOWN_CHART_POINTS_SELECTION,sectionTitle:t.name}:{id:Gn.DRILLDOWN_CHART_POINTS_SELECTION,sectionTitle:r.join(", ")}}function C7(e){return 30+12*e}function Ih(e,t,r,n){const[o,i]=ho(e,l.MetadataTypes.isAttribute.bind(l.MetadataTypes)),a=o.map(c=>({caption:c.name,onClick:()=>r(c)})),s=i.map(c=>({caption:c.title,subItems:[{items:c.levels.map((u,p)=>({caption:u.name,class:p===0?"":"csdk-drilldown-hierarchy-nested-menu-item",style:{paddingLeft:`${C7(p)}px`},disabled:ut(u,t),onClick:()=>r(u,c)}))}]}));return{id:Gn.DRILLDOWN_DRILL_DIRECTIONS,sectionTitle:n("drilldown.drillMenuItem"),items:[...s,...a]}}var Gi=function(e){return e.HIGHLIGHT="highlight",e.FILTER="filter",e}({});function Ah(e){return function(t){t=l.toString(t);var r=Wf(t)?Wa(t):void 0,n=r?r[0]:t.charAt(0),o=r?jf(r,1).join(""):t.slice(1);return n[e]()+o}}var Nh=Ah("toUpperCase");function T7(e){return Nh(l.toString(e).toLowerCase())}function E7(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 S7(e){return function(t){return e==null?void 0:e[t]}}var R7={À:"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"},O7=S7(R7),M7=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,P7="\\u0300-\\u036f",D7="\\ufe20-\\ufe2f",k7="\\u20d0-\\u20ff",I7=P7+D7+k7,A7="["+I7+"]",N7=RegExp(A7,"g");function $7(e){return e=l.toString(e),e&&e.replace(M7,O7).replace(N7,"")}var L7=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function F7(e){return e.match(L7)||[]}var H7=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function B7(e){return H7.test(e)}var $h="\\ud800-\\udfff",j7="\\u0300-\\u036f",W7="\\ufe20-\\ufe2f",z7="\\u20d0-\\u20ff",V7=j7+W7+z7,Lh="\\u2700-\\u27bf",Fh="a-z\\xdf-\\xf6\\xf8-\\xff",U7="\\xac\\xb1\\xd7\\xf7",q7="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",G7="\\u2000-\\u206f",Y7=" \\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",Hh="A-Z\\xc0-\\xd6\\xd8-\\xde",K7="\\ufe0e\\ufe0f",Bh=U7+q7+G7+Y7,jh="['’]",nd="["+Bh+"]",X7="["+V7+"]",Wh="\\d+",Q7="["+Lh+"]",zh="["+Fh+"]",Vh="[^"+$h+Bh+Wh+Lh+Fh+Hh+"]",Z7="\\ud83c[\\udffb-\\udfff]",J7="(?:"+X7+"|"+Z7+")",eA="[^"+$h+"]",Uh="(?:\\ud83c[\\udde6-\\uddff]){2}",qh="[\\ud800-\\udbff][\\udc00-\\udfff]",kr="["+Hh+"]",tA="\\u200d",od="(?:"+zh+"|"+Vh+")",rA="(?:"+kr+"|"+Vh+")",id="(?:"+jh+"(?:d|ll|m|re|s|t|ve))?",ad="(?:"+jh+"(?:D|LL|M|RE|S|T|VE))?",Gh=J7+"?",Yh="["+K7+"]?",nA="(?:"+tA+"(?:"+[eA,Uh,qh].join("|")+")"+Yh+Gh+")*",oA="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",iA="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",aA=Yh+Gh+nA,sA="(?:"+[Q7,Uh,qh].join("|")+")"+aA,lA=RegExp([kr+"?"+zh+"+"+id+"(?="+[nd,kr,"$"].join("|")+")",rA+"+"+ad+"(?="+[nd,kr+od,"$"].join("|")+")",kr+"?"+od+"+"+id,kr+"+"+ad,iA,oA,Wh,sA].join("|"),"g");function cA(e){return e.match(lA)||[]}function uA(e,t,r){return e=l.toString(e),t=t,t===void 0?B7(e)?cA(e):F7(e):e.match(t)||[]}var dA="['’]",fA=RegExp(dA,"g");function pA(e){return function(t){return E7(uA($7(t).replace(fA,"")),e,"")}}var Kh=pA(function(e,t,r){return t=t.toLowerCase(),e+(r?T7(t):t)});function hA(e){const{_id:t,title:r,levels:n}=e;return{id:t,title:r,levels:n.map(o=>l.createDimensionalElementFromJaql(o))}}function Xh(e,t,r){return rt(this,null,function*(){const o=yield new l.RestApi(e,r).getHierarchies(t);return o==null?void 0:o.map(i=>hA(i))})}const mA=hh("useGetHierarchyModels")(Qh);function Qh(e){const t=Rl(e,["dataSource","dimension","ids","alwaysIncluded"]),r=mh(e,t),[n,o]=F.useReducer(is,{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0}),{isInitialized:i,app:a}=l.useSisenseContext();return F.useEffect(()=>{i||o({type:"error",error:new l.TranslatableError("errors.sisenseContextNotFound")}),r(a)&&(o({type:"loading"}),Xh(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?sd(is(n,{type:"loading"})):sd(n)}function sd(e){const n=e,{data:t}=n,r=_r(n,["data"]);return J(q({},r),{hierarchies:t})}function gA({attribute:e,dataSource:t,drilldownPaths:r=[],enabled:n}){const[o,i]=F.useMemo(()=>ho(r,uh),[r]),{hierarchies:a=[]}=Qh({enabled:n,dataSource:t,dimension:e,ids:o,alwaysIncluded:!0});return F.useMemo(()=>a.length?[...a,...i]:i,[a,i])}function vA(e,t){return Dl(e,t)[0]}function yA(e){return[...l.CARTESIAN_CHART_TYPES,...l.CATEGORICAL_CHART_TYPES,...l.SCATTER_CHART_TYPES,...l.BOXPLOT_CHART_TYPES,...l.RANGE_CHART_TYPES].includes(e)}function bA(e,t){return Dl(e,t).length===1}function _A(e,t){return bA(e,t)&&yA(e)}function Zh(e,t,r){const n=o=>!!o&&!ut(r,l.translateColumnToAttribute(o));if(l.isCartesian(e)||l.isCategorical(e)||l.isBoxplot(e)||l.isRange(e)){const o=t.category[0];if(n(o))return J(q({},t),{category:[r]})}else if(l.isScatter(e)){const o=t,i=["x","y","breakByPoint","breakByColor"];for(const a of i){const s=o[a];if(s&&!l.isMeasureColumn(s)&&n(s))return J(q({},o),{[a]:r})}}return t}function ld(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]&&!l.isMeasureColumn(r[s]));if(i){const s=t,c=s.type==="mouseup";c&&console.warn("No drilldown support for multi-selection in scatter chart");const u=c?n[a]:s.point.options.custom[Kh(`{masked ${a}`)];return{categoryValue:u,categoryDisplayValue:u}}return n})}const xA=({propsToExtend:e,onDrilldownSelectionsChange:t})=>{const{chartType:r,dataOptions:n,dataSource:o,drilldownOptions:i}=e,{drilldownSelections:a}=i||{},{openMenu:s}=gh(),c=F.useMemo(()=>_A(r,n),[r,n]),u=F.useMemo(()=>(i==null?void 0:i.drilldownPaths)||[],[i==null?void 0:i.drilldownPaths]),p=F.useMemo(()=>{const O=l.createAttribute({name:"dummy drilldown initial attribute"});return vA(r,n)||O},[r,n]),h=gA({attribute:p,dataSource:o,drilldownPaths:u,enabled:c}),d=F.useMemo(()=>{var M;return(((M=i==null?void 0:i.drilldownSelections)==null?void 0:M.length)||(h==null?void 0:h.length))&&c},[i,c,h]),{drilldownDimension:m,drilldownFilters:g,breadcrumbs:v,openDrilldownMenu:y}=w7({initialDimension:p,drilldownSelections:a,drilldownPaths:h,openMenu:s,onDrilldownSelectionsChange:t}),w=F.useCallback((O,M)=>{const D=ld(O,M,n);y({left:M.clientX,top:M.clientY},D)},[n,y]),T=F.useCallback((O,M)=>{const D=ld([O],M,n);y({left:M.clientX,top:M.clientY},D)},[n,y]),_=F.useMemo(()=>Zh(r,n,m),[r,n,m]),x=F.useMemo(()=>g.length?Cd(e.filters||[],g):e.filters,[e.filters,g]),b=F.useMemo(()=>l.combineHandlers([w,e.onDataPointsSelected]),[w,e.onDataPointsSelected]),C=F.useMemo(()=>l.combineHandlers([T,e.onDataPointContextMenu]),[T,e.onDataPointContextMenu]);return{propsWithDrilldown:q(q({},e),d&&{dataOptions:_,filters:x,onDataPointsSelected:b,onDataPointContextMenu:C}),isDrilldownEnabled:d,breadcrumbs:v}},wA=no({componentName:"ChartWidget"})(e=>{var O,M;const{app:t}=l.useSisenseContext(),{chartType:r,dataSource:n=t==null?void 0:t.defaultDataSource,dataOptions:o,styleOptions:i,highlightSelectionDisabled:a=!1,highlights:s,description:c,onChange:u}=e,{width:p,height:h}=i||{},d=ep(r,{hasHeader:!((O=i==null?void 0:i.header)!=null&&O.hidden)}),[m,g]=F.useState(0),v=F.useMemo(()=>l.omit(i,["width","height"]),[i]),y=F.useCallback(D=>{u==null||u({drilldownOptions:{drilldownSelections:D}})},[u]),{propsWithDrilldown:w,isDrilldownEnabled:T,breadcrumbs:_}=xA({propsToExtend:e,onDrilldownSelectionsChange:y}),x=RI({chartType:r,dataOptions:o,enabled:!a&&!T&&!(s!=null&&s.length)}),b=(M=t==null?void 0:t.settings.accessibilityConfig)==null?void 0:M.enabled,C=F.useCallback(D=>{var R;return b?J(q({},D),{accessibility:J(q({},D.accessibility),{description:c!=null?c:(R=D.accessibility)==null?void 0:R.description})}):D},[c,b]);if(!r||!o)return null;const S=J(q({},w),{dataSet:n,styleOptions:v,refreshCounter:m,onDataPointClick:F.useMemo(()=>l.combineHandlers([x.onDataPointClick,e.onDataPointClick]),[x.onDataPointClick,e.onDataPointClick]),onDataPointContextMenu:w.onDataPointContextMenu,onDataPointsSelected:F.useMemo(()=>l.combineHandlers([x.onDataPointsSelected,w.onDataPointsSelected]),[x.onDataPointsSelected,w.onDataPointsSelected]),onBeforeRender:F.useMemo(()=>l.combineHandlers([C,x.onBeforeRender,e.onBeforeRender],!0),[C,x.onBeforeRender,e.onBeforeRender])});return l.jsx(Ei,{defaultSize:d,size:{width:p,height:h},children:l.jsx(ch,J(q({},e),{topSlot:l.jsxs(l.Fragment,{children:[e.topSlot,_]}),dataSetName:n&&l.getDataSourceName(n),onRefresh:()=>g(m+1),children:l.jsx(nh,q({},S))}))})});class on{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 Yn=typeof window=="undefined"||"Deno"in window;function it(){}function CA(e,t){return typeof e=="function"?e(t):e}function ss(e){return typeof e=="number"&&e>=0&&e!==1/0}function Jh(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Sn(e,t,r){return mo(e)?typeof t=="function"?J(q({},r),{queryKey:e,queryFn:t}):J(q({},t),{queryKey:e}):e}function TA(e,t,r){return mo(e)?J(q({},t),{mutationKey:e}):typeof e=="function"?J(q({},t),{mutationFn:e}):q({},e)}function jt(e,t,r){return mo(e)?[J(q({},t),{queryKey:e}),r]:[e||{},t]}function cd(e,t){const{type:r="all",exact:n,fetchStatus:o,predicate:i,queryKey:a,stale:s}=e;if(mo(a)){if(n){if(t.queryHash!==kl(a,t.options))return!1}else if(!Ar(t.queryKey,a))return!1}if(r!=="all"){const c=t.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||typeof o!="undefined"&&o!==t.state.fetchStatus||i&&!i(t))}function ud(e,t){const{exact:r,fetching:n,predicate:o,mutationKey:i}=e;if(mo(i)){if(!t.options.mutationKey)return!1;if(r){if(ur(t.options.mutationKey)!==ur(i))return!1}else if(!Ar(t.options.mutationKey,i))return!1}return!(typeof n=="boolean"&&t.state.status==="loading"!==n||o&&!o(t))}function kl(e,t){return((t==null?void 0:t.queryKeyHashFn)||ur)(e)}function ur(e){return JSON.stringify(e,(t,r)=>ls(r)?Object.keys(r).sort().reduce((n,o)=>(n[o]=r[o],n),{}):r)}function Ar(e,t){return em(e,t)}function em(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(r=>!em(e[r],t[r])):!1}function tm(e,t){if(e===t)return e;const r=dd(e)&&dd(t);if(r||ls(e)&&ls(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 c=0;c<i;c++){const u=r?c:o[c];a[u]=tm(e[u],t[u]),a[u]===e[u]&&s++}return n===i&&s===n?e:a}return t}function ri(e,t){if(e&&!t||t&&!e)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function dd(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ls(e){if(!fd(e))return!1;const t=e.constructor;if(typeof t=="undefined")return!0;const r=t.prototype;return!(!fd(r)||!r.hasOwnProperty("isPrototypeOf"))}function fd(e){return Object.prototype.toString.call(e)==="[object Object]"}function mo(e){return Array.isArray(e)}function rm(e){return new Promise(t=>{setTimeout(t,e)})}function pd(e){rm(0).then(e)}function EA(){if(typeof AbortController=="function")return new AbortController}function cs(e,t,r){return r.isDataEqual!=null&&r.isDataEqual(e,t)?e:typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?tm(e,t):t}class SA extends on{constructor(){super(),this.setup=t=>{if(!Yn&&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 ni=new SA,hd=["online","offline"];class RA extends on{constructor(){super(),this.setup=t=>{if(!Yn&&window.addEventListener){const r=()=>t();return hd.forEach(n=>{window.addEventListener(n,r,!1)}),()=>{hd.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 oi=new RA;function OA(e){return Math.min(1e3*Qe(2,e),3e4)}function Yi(e){return(e!=null?e:"online")==="online"?oi.isOnline():!0}class nm{constructor(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}}function Vo(e){return e instanceof nm}function om(e){let t=!1,r=0,n=!1,o,i,a;const s=new Promise((y,w)=>{i=y,a=w}),c=y=>{n||(m(new nm(y)),e.abort==null||e.abort())},u=()=>{t=!0},p=()=>{t=!1},h=()=>!ni.isFocused()||e.networkMode!=="always"&&!oi.isOnline(),d=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))},g=()=>new Promise(y=>{o=w=>{const T=n||!h();return T&&y(w),T},e.onPause==null||e.onPause()}).then(()=>{o=void 0,n||e.onContinue==null||e.onContinue()}),v=()=>{if(n)return;let y;try{y=e.fn()}catch(w){y=Promise.reject(w)}Promise.resolve(y).then(d).catch(w=>{var T,_;if(n)return;const x=(T=e.retry)!=null?T:3,b=(_=e.retryDelay)!=null?_:OA,C=typeof b=="function"?b(r,w):b,S=x===!0||typeof x=="number"&&r<x||typeof x=="function"&&x(r,w);if(t||!S){m(w);return}r++,e.onFail==null||e.onFail(r,w),rm(C).then(()=>{if(h())return g()}).then(()=>{t?m(w):v()})})};return Yi(e.networkMode)?v():g().then(v),{promise:s,cancel:c,continue:()=>(o==null?void 0:o())?s:Promise.resolve(),cancelRetry:u,continueRetry:p}}const Il=console;function MA(){let e=[],t=0,r=p=>{p()},n=p=>{p()};const o=p=>{let h;t++;try{h=p()}finally{t--,t||s()}return h},i=p=>{t?e.push(p):pd(()=>{r(p)})},a=p=>(...h)=>{i(()=>{p(...h)})},s=()=>{const p=e;e=[],p.length&&pd(()=>{n(()=>{p.forEach(h=>{r(h)})})})};return{batch:o,batchCalls:a,schedule:i,setNotifyFunction:p=>{r=p},setBatchNotifyFunction:p=>{n=p}}}const ke=MA();class im{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ss(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(t){this.cacheTime=Math.max(this.cacheTime||0,t!=null?t:Yn?1/0:5*60*1e3)}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class PA extends im{constructor(t){super(),this.abortSignalConsumed=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.logger=t.logger||Il,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||DA(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(t){this.options=q(q({},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=cs(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(it).catch(it):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||!Jh(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(g=>g.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=EA(),s={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},c=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>{if(a)return this.abortSignalConsumed=!0,a.signal}})};c(s);const u=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(s)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'"),p={fetchOptions:r,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:u};if(c(p),(n=this.options.behavior)==null||n.onFetch(p),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((o=p.fetchOptions)==null?void 0:o.meta)){var h;this.dispatch({type:"fetch",meta:(h=p.fetchOptions)==null?void 0:h.meta})}const d=m=>{if(Vo(m)&&m.silent||this.dispatch({type:"error",error:m}),!Vo(m)){var g,v,y,w;(g=(v=this.cache.config).onError)==null||g.call(v,m,this),(y=(w=this.cache.config).onSettled)==null||y.call(w,this.state.data,m,this),process.env.NODE_ENV!=="production"&&this.logger.error(m)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=om({fn:p.fetchFn,abort:a==null?void 0:a.abort.bind(a),onSuccess:m=>{var g,v,y,w;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),d(new Error(this.queryHash+" data is undefined"));return}this.setData(m),(g=(v=this.cache.config).onSuccess)==null||g.call(v,m,this),(y=(w=this.cache.config).onSettled)==null||y.call(w,m,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:d,onFail:(m,g)=>{this.dispatch({type:"failed",failureCount:m,error:g})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:p.options.retry,retryDelay:p.options.retryDelay,networkMode:p.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(t){const r=n=>{var o,i;switch(t.type){case"failed":return J(q({},n),{fetchFailureCount:t.failureCount,fetchFailureReason:t.error});case"pause":return J(q({},n),{fetchStatus:"paused"});case"continue":return J(q({},n),{fetchStatus:"fetching"});case"fetch":return q(J(q({},n),{fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(o=t.meta)!=null?o:null,fetchStatus:Yi(this.options.networkMode)?"fetching":"paused"}),!n.dataUpdatedAt&&{error:null,status:"loading"});case"success":return q(J(q({},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 Vo(a)&&a.revert&&this.revertState?J(q({},this.revertState),{fetchStatus:"idle"}):J(q({},n),{error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"});case"invalidate":return J(q({},n),{isInvalidated:!0});case"setState":return q(q({},n),t.state)}};this.state=r(this.state),ke.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate(t)}),this.cache.notify({query:this,type:"updated",action:t})})}}function DA(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 kA extends on{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:kl(i,r);let s=this.get(a);return s||(s=new PA({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(){ke.batch(()=>{this.queries.forEach(t=>{this.remove(t)})})}get(t){return this.queriesMap[t]}getAll(){return this.queries}find(t,r){const[n]=jt(t,r);return typeof n.exact=="undefined"&&(n.exact=!0),this.queries.find(o=>cd(n,o))}findAll(t,r){const[n]=jt(t,r);return Object.keys(n).length>0?this.queries.filter(o=>cd(n,o)):this.queries}notify(t){ke.batch(()=>{this.listeners.forEach(({listener:r})=>{r(t)})})}onFocus(){ke.batch(()=>{this.queries.forEach(t=>{t.onFocus()})})}onOnline(){ke.batch(()=>{this.queries.forEach(t=>{t.onOnline()})})}}class IA extends im{constructor(t){super(),this.defaultOptions=t.defaultOptions,this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||Il,this.observers=[],this.state=t.state||am(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=q(q({},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 rt(this,null,function*(){const t=()=>{var S;return this.retryer=om({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(O,M)=>{this.dispatch({type:"failed",failureCount:O,error:M})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(S=this.options.retry)!=null?S:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},r=this.state.status==="loading";try{var n,o,i,a,s,c,u,p;if(!r){var h,d,m,g;this.dispatch({type:"loading",variables:this.options.variables}),yield(h=(d=this.mutationCache.config).onMutate)==null?void 0:h.call(d,this.state.variables,this);const O=yield(m=(g=this.options).onMutate)==null?void 0:m.call(g,this.state.variables);O!==this.state.context&&this.dispatch({type:"loading",context:O,variables:this.state.variables})}const S=yield t();return yield(n=(o=this.mutationCache.config).onSuccess)==null?void 0:n.call(o,S,this.state.variables,this.state.context,this),yield(i=(a=this.options).onSuccess)==null?void 0:i.call(a,S,this.state.variables,this.state.context),yield(s=(c=this.mutationCache.config).onSettled)==null?void 0:s.call(c,S,null,this.state.variables,this.state.context,this),yield(u=(p=this.options).onSettled)==null?void 0:u.call(p,S,null,this.state.variables,this.state.context),this.dispatch({type:"success",data:S}),S}catch(S){try{var v,y,w,T,_,x,b,C;throw yield(v=(y=this.mutationCache.config).onError)==null?void 0:v.call(y,S,this.state.variables,this.state.context,this),process.env.NODE_ENV!=="production"&&this.logger.error(S),yield(w=(T=this.options).onError)==null?void 0:w.call(T,S,this.state.variables,this.state.context),yield(_=(x=this.mutationCache.config).onSettled)==null?void 0:_.call(x,void 0,S,this.state.variables,this.state.context,this),yield(b=(C=this.options).onSettled)==null?void 0:b.call(C,void 0,S,this.state.variables,this.state.context),S}finally{this.dispatch({type:"error",error:S})}}})}dispatch(t){const r=n=>{switch(t.type){case"failed":return J(q({},n),{failureCount:t.failureCount,failureReason:t.error});case"pause":return J(q({},n),{isPaused:!0});case"continue":return J(q({},n),{isPaused:!1});case"loading":return J(q({},n),{context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!Yi(this.options.networkMode),status:"loading",variables:t.variables});case"success":return J(q({},n),{data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1});case"error":return J(q({},n),{data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"});case"setState":return q(q({},n),t.state)}};this.state=r(this.state),ke.batch(()=>{this.observers.forEach(n=>{n.onMutationUpdate(t)}),this.mutationCache.notify({mutation:this,type:"updated",action:t})})}}function am(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class AA extends on{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,r,n){const o=new IA({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(){ke.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=>ud(t,r))}findAll(t){return this.mutations.filter(r=>ud(t,r))}notify(t){ke.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 ke.batch(()=>r.reduce((n,o)=>n.then(()=>o.continue().catch(it)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function NA(){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,c=(n=e.fetchOptions)==null||(o=n.meta)==null?void 0:o.fetchMore,u=c==null?void 0:c.pageParam,p=(c==null?void 0:c.direction)==="forward",h=(c==null?void 0:c.direction)==="backward",d=((i=e.state.data)==null?void 0:i.pages)||[],m=((a=e.state.data)==null?void 0:a.pageParams)||[];let g=m,v=!1;const y=C=>{Object.defineProperty(C,"signal",{enumerable:!0,get:()=>{var S;if((S=e.signal)!=null&&S.aborted)v=!0;else{var O;(O=e.signal)==null||O.addEventListener("abort",()=>{v=!0})}return e.signal}})},w=e.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+e.options.queryHash+"'")),T=(C,S,O,M)=>(g=M?[S,...g]:[...g,S],M?[O,...C]:[...C,O]),_=(C,S,O,M)=>{if(v)return Promise.reject("Cancelled");if(typeof O=="undefined"&&!S&&C.length)return Promise.resolve(C);const D={queryKey:e.queryKey,pageParam:O,meta:e.options.meta};y(D);const R=w(D);return Promise.resolve(R).then(I=>T(C,O,I,M))};let x;if(!d.length)x=_([]);else if(p){const C=typeof u!="undefined",S=C?u:md(e.options,d);x=_(d,C,S)}else if(h){const C=typeof u!="undefined",S=C?u:$A(e.options,d);x=_(d,C,S,!0)}else{g=[];const C=typeof e.options.getNextPageParam=="undefined";x=(s&&d[0]?s(d[0],0,d):!0)?_([],C,m[0]):Promise.resolve(T([],m[0],d[0]));for(let O=1;O<d.length;O++)x=x.then(M=>{if(s&&d[O]?s(d[O],O,d):!0){const R=C?m[O]:md(e.options,M);return _(M,C,R)}return Promise.resolve(T(M,m[O],d[O]))})}return x.then(C=>({pages:C,pageParams:g}))}}}}function md(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function $A(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}class LA{constructor(t={}){this.queryCache=t.queryCache||new kA,this.mutationCache=t.mutationCache||new AA,this.logger=t.logger||Il,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=ni.subscribe(()=>{ni.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=oi.subscribe(()=>{oi.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]=jt(t,r);return n.fetchStatus="fetching",this.queryCache.findAll(n).length}isMutating(t){return this.mutationCache.findAll(J(q({},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=Sn(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=CA(r,i);if(typeof a=="undefined")return;const s=Sn(t),c=this.defaultQueryOptions(s);return this.queryCache.build(this,c).setData(a,J(q({},n),{manual:!0}))}setQueriesData(t,r,n){return ke.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]=jt(t,r),o=this.queryCache;ke.batch(()=>{o.findAll(n).forEach(i=>{o.remove(i)})})}resetQueries(t,r,n){const[o,i]=jt(t,r,n),a=this.queryCache,s=q({type:"active"},o);return ke.batch(()=>(a.findAll(o).forEach(c=>{c.reset()}),this.refetchQueries(s,i)))}cancelQueries(t,r,n){const[o,i={}]=jt(t,r,n);typeof i.revert=="undefined"&&(i.revert=!0);const a=ke.batch(()=>this.queryCache.findAll(o).map(s=>s.cancel(i)));return Promise.all(a).then(it).catch(it)}invalidateQueries(t,r,n){const[o,i]=jt(t,r,n);return ke.batch(()=>{var a,s;if(this.queryCache.findAll(o).forEach(u=>{u.invalidate()}),o.refetchType==="none")return Promise.resolve();const c=J(q({},o),{type:(a=(s=o.refetchType)!=null?s:o.type)!=null?a:"active"});return this.refetchQueries(c,i)})}refetchQueries(t,r,n){const[o,i]=jt(t,r,n),a=ke.batch(()=>this.queryCache.findAll(o).filter(c=>!c.isDisabled()).map(c=>{var u;return c.fetch(void 0,J(q({},i),{cancelRefetch:(u=i==null?void 0:i.cancelRefetch)!=null?u:!0,meta:{refetchPage:o.refetchPage}}))}));let s=Promise.all(a).then(it);return i!=null&&i.throwOnError||(s=s.catch(it)),s}fetchQuery(t,r,n){const o=Sn(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(it).catch(it)}fetchInfiniteQuery(t,r,n){const o=Sn(t,r,n);return o.behavior=NA(),this.fetchQuery(o)}prefetchInfiniteQuery(t,r,n){return this.fetchInfiniteQuery(t,r,n).then(it).catch(it)}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=>ur(t)===ur(o.queryKey));n?n.defaultOptions=r:this.queryDefaults.push({queryKey:t,defaultOptions:r})}getQueryDefaults(t){if(!t)return;const r=this.queryDefaults.find(n=>Ar(t,n.queryKey));return process.env.NODE_ENV!=="production"&&this.queryDefaults.filter(o=>Ar(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=>ur(t)===ur(o.mutationKey));n?n.defaultOptions=r:this.mutationDefaults.push({mutationKey:t,defaultOptions:r})}getMutationDefaults(t){if(!t)return;const r=this.mutationDefaults.find(n=>Ar(t,n.mutationKey));return process.env.NODE_ENV!=="production"&&this.mutationDefaults.filter(o=>Ar(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=J(q(q(q({},this.defaultOptions.queries),this.getQueryDefaults(t==null?void 0:t.queryKey)),t),{_defaulted:!0});return!r.queryHash&&r.queryKey&&(r.queryHash=kl(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:J(q(q(q({},this.defaultOptions.mutations),this.getMutationDefaults(t==null?void 0:t.mutationKey)),t),{_defaulted:!0})}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class FA extends on{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),gd(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return us(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return us(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"),ri(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&&vd(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 BA(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=_r(o,["refetchPage"]);return this.fetch(J(q({},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(J(q({},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(it)),r}updateStaleTimeout(){if(this.clearStaleTimeout(),Yn||this.currentResult.isStale||!ss(this.options.staleTime))return;const r=Jh(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,!(Yn||this.options.enabled===!1||!ss(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||ni.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,c=t!==n,u=c?t.state:this.currentQueryInitialState,p=c?this.currentResult:this.previousQueryResult,{state:h}=t;let{dataUpdatedAt:d,error:m,errorUpdatedAt:g,fetchStatus:v,status:y}=h,w=!1,T=!1,_;if(r._optimisticResults){const O=this.hasListeners(),M=!O&&gd(t,r),D=O&&vd(t,n,r,o);(M||D)&&(v=Yi(t.options.networkMode)?"fetching":"paused",d||(y="loading")),r._optimisticResults==="isRestoring"&&(v="idle")}if(r.keepPreviousData&&!h.dataUpdatedAt&&p!=null&&p.isSuccess&&y!=="error")_=p.data,d=p.dataUpdatedAt,y=p.status,w=!0;else if(r.select&&typeof h.data!="undefined")if(i&&h.data===(a==null?void 0:a.data)&&r.select===this.selectFn)_=this.selectResult;else try{this.selectFn=r.select,_=r.select(h.data),_=cs(i==null?void 0:i.data,_,r),this.selectResult=_,this.selectError=null}catch(O){process.env.NODE_ENV!=="production"&&this.client.getLogger().error(O),this.selectError=O}else _=h.data;if(typeof r.placeholderData!="undefined"&&typeof _=="undefined"&&y==="loading"){let O;if(i!=null&&i.isPlaceholderData&&r.placeholderData===(s==null?void 0:s.placeholderData))O=i.data;else if(O=typeof r.placeholderData=="function"?r.placeholderData():r.placeholderData,r.select&&typeof O!="undefined")try{O=r.select(O),this.selectError=null}catch(M){process.env.NODE_ENV!=="production"&&this.client.getLogger().error(M),this.selectError=M}typeof O!="undefined"&&(y="success",_=cs(i==null?void 0:i.data,O,r),T=!0)}this.selectError&&(m=this.selectError,_=this.selectResult,g=Date.now(),y="error");const x=v==="fetching",b=y==="loading",C=y==="error";return{status:y,fetchStatus:v,isLoading:b,isSuccess:y==="success",isError:C,isInitialLoading:b&&x,data:_,dataUpdatedAt:d,error:m,errorUpdatedAt:g,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>u.dataUpdateCount||h.errorUpdateCount>u.errorUpdateCount,isFetching:x,isRefetching:x&&!b,isLoadingError:C&&h.dataUpdatedAt===0,isPaused:v==="paused",isPlaceholderData:T,isPreviousData:w,isRefetchError:C&&h.dataUpdatedAt!==0,isStale:Al(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,ri(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 c=new Set(s!=null?s:this.trackedProps);return this.options.useErrorBoundary&&c.add("error"),Object.keys(this.currentResult).some(u=>{const p=u;return this.currentResult[p]!==r[p]&&c.has(p)})};(t==null?void 0:t.listeners)!==!1&&i()&&(o.listeners=!0),this.notify(q(q({},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"&&!Vo(t.error)&&(r.onError=!0),this.updateResult(r),this.hasListeners()&&this.updateTimers()}notify(t){ke.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,c,u;(a=(s=this.options).onError)==null||a.call(s,this.currentResult.error),(c=(u=this.options).onSettled)==null||c.call(u,void 0,this.currentResult.error)}t.listeners&&this.listeners.forEach(({listener:p})=>{p(this.currentResult)}),t.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function HA(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function gd(e,t){return HA(e,t)||e.state.dataUpdatedAt>0&&us(e,t,t.refetchOnMount)}function us(e,t,r){if(t.enabled!==!1){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&Al(e,t)}return!1}function vd(e,t,r,n){return r.enabled!==!1&&(e!==t||n.enabled===!1)&&(!r.suspense||e.state.status!=="error")&&Al(e,r)}function Al(e,t){return e.isStaleByTime(t.staleTime)}function BA(e,t,r){return r.keepPreviousData?!1:r.placeholderData!==void 0?t.isPlaceholderData:!ri(e.getCurrentResult(),t)}var ds={exports:{}},wa={};/**
255
+ `)),W.isValidElement(S))).map((S,O)=>te.jsx("li",{className:T.li,children:S},`child-${O}`));return te.jsx(BI,l._extends({ref:r,component:a,color:"text.secondary",className:se(T.root,i),ownerState:w},g,{children:te.jsx(jI,{className:T.ol,ref:x,ownerState:w,children:zI(v||d&&C.length<=d?C:b(C),T.separator,m,w)})}))});process.env.NODE_ENV!=="production"&&(bh.propTypes={children:f.node,classes:f.object,className:f.string,component:f.elementType,expandText:f.string,itemsAfterCollapse:bt,itemsBeforeCollapse:bt,maxItems:bt,separator:f.node,slotProps:f.shape({collapsedIcon:f.oneOfType([f.func,f.object])}),slots:f.shape({CollapsedIcon:f.elementType}),sx:f.oneOfType([f.arrayOf(f.oneOfType([f.func,f.object,f.bool])),f.func,f.object])});function VI(e){return we("MuiButton",e)}const $o=Ce("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"]),_h=W.createContext({});process.env.NODE_ENV!=="production"&&(_h.displayName="ButtonGroupContext");const xh=W.createContext(void 0);process.env.NODE_ENV!=="production"&&(xh.displayName="ButtonGroupButtonContext");const UI=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],qI=e=>{const{color:t,disableElevation:r,fullWidth:n,size:o,variant:i,classes:a}=e,s={root:["root",i,`${i}${fe(t)}`,`size${fe(o)}`,`${i}Size${fe(o)}`,`color${fe(t)}`,r&&"disableElevation",n&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${fe(o)}`],endIcon:["icon","endIcon",`iconSize${fe(o)}`]},c=De(s,VI,a);return l._extends({},a,c)},wh=e=>l._extends({},e.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},e.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},e.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),GI=le(mr,{shouldForwardProp:e=>Jn(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]}})(({theme:e,ownerState:t})=>{var r,n;const o=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],i=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return l._extends({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":l._extends({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Pe(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="text"&&t.color!=="inherit"&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Pe(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="outlined"&&t.color!=="inherit"&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Pe(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="contained"&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:i,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},t.variant==="contained"&&t.color!=="inherit"&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":l._extends({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${$o.focusVisible}`]:l._extends({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${$o.disabled}`]:l._extends({color:(e.vars||e).palette.action.disabled},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},t.variant==="contained"&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},t.variant==="text"&&{padding:"6px 8px"},t.variant==="text"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main},t.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},t.variant==="outlined"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${Pe(e.palette[t.color].main,.5)}`},t.variant==="contained"&&{color:e.vars?e.vars.palette.text.primary:(r=(n=e.palette).getContrastText)==null?void 0:r.call(n,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:o,boxShadow:(e.vars||e).shadows[2]},t.variant==="contained"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},t.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},t.size==="small"&&t.variant==="text"&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="text"&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="outlined"&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="outlined"&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="contained"&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="contained"&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})},({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${$o.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${$o.disabled}`]:{boxShadow:"none"}}),YI=le("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.startIcon,t[`iconSize${fe(r.size)}`]]}})(({ownerState:e})=>l._extends({display:"inherit",marginRight:8,marginLeft:-4},e.size==="small"&&{marginLeft:-2},wh(e))),KI=le("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.endIcon,t[`iconSize${fe(r.size)}`]]}})(({ownerState:e})=>l._extends({display:"inherit",marginRight:-4,marginLeft:8},e.size==="small"&&{marginRight:-2},wh(e))),qn=W.forwardRef(function(t,r){const n=W.useContext(_h),o=W.useContext(xh),i=Mf(n,t),a=Re({props:i,name:"MuiButton"}),{children:s,color:c="primary",component:u="button",className:p,disabled:h=!1,disableElevation:d=!1,disableFocusRipple:m=!1,endIcon:g,focusVisibleClassName:v,fullWidth:y=!1,size:w="medium",startIcon:T,type:_,variant:x="text"}=a,b=ae(a,UI),C=l._extends({},a,{color:c,component:u,disabled:h,disableElevation:d,disableFocusRipple:m,fullWidth:y,size:w,type:_,variant:x}),S=qI(C),O=T&&te.jsx(YI,{className:S.startIcon,ownerState:C,children:T}),M=g&&te.jsx(KI,{className:S.endIcon,ownerState:C,children:g}),D=o||"";return te.jsxs(GI,l._extends({ownerState:C,className:se(n.className,S.root,p,D),component:u,disabled:h,focusRipple:!m,focusVisibleClassName:se(S.focusVisible,v),ref:r,type:_},b,{classes:S,children:[O,s,M]}))});process.env.NODE_ENV!=="production"&&(qn.propTypes={children:f.node,classes:f.object,className:f.string,color:f.oneOfType([f.oneOf(["inherit","primary","secondary","success","error","info","warning"]),f.string]),component:f.elementType,disabled:f.bool,disableElevation:f.bool,disableFocusRipple:f.bool,disableRipple:f.bool,endIcon:f.node,focusVisibleClassName:f.string,fullWidth:f.bool,href:f.string,size:f.oneOfType([f.oneOf(["small","medium","large"]),f.string]),startIcon:f.node,sx:f.oneOfType([f.arrayOf(f.oneOfType([f.func,f.object,f.bool])),f.func,f.object]),type:f.oneOfType([f.oneOf(["button","reset","submit"]),f.string]),variant:f.oneOfType([f.oneOf(["contained","outlined","text"]),f.string])});const XI=({clearDrilldownSelections:e,currentDimension:t,setIsHovered:r,themeProps:n})=>{const{t:o}=l.useTranslation(),i=t.name,a=l.newStyled(qn,{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=l.newStyled("svg",{target:"e1olvz1k1",label:"Icon"})("width:22px;height:22px;fill:#9ea2ab;"),c=()=>l.jsx(a,{theme:n,onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),onClick:e,children:l.jsx(s,{width:22,height:22,viewBox:"0 0 24 24",children:l.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"})})}),u=l.newStyled(qn,{target:"e1olvz1k2",label:"StyledCurrentDrillButton"})("&&{position:relative;font-family:",h=>h.theme.fontFamily,";border-radius:0;border:1px solid ",wt,";background-color:",h=>h.theme.chartBackgroundColor,";border-right:none;border-left:none;color:",h=>h.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:",h=>h.theme.chartBackgroundColor,";border:1px solid ",wt,";border-right:none;border-left:none;}}");return{CancelButton:c,CurrentDrillButton:()=>l.jsxs(u,{theme:n,children:[i," (",o("drilldown.breadcrumbsAllSuffix"),")",l.jsx("span",{className:"flex items-center justify-between",children:l.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 ${wt}`,borderRight:`1px solid ${wt}`}})})]})}},QI={modifiers:[{name:"offset",options:{offset:[0,12]}}]},ZI=({themeProps:e,filterDisplayValues:t,currentTable:r,currentColumn:n})=>{const{t:o}=l.useTranslation();return l.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:[l.jsxs("div",{className:"csdk-border-b csdk-border-[#e4e4e4] csdk-p-3 csdk-pl-1",children:[l.jsx(Ze,{variant:"body2",fontFamily:e.fontFamily,fontSize:11,children:o("drilldown.popover.members")}),l.jsx(Ze,{variant:"body2",fontFamily:e.fontFamily,fontSize:13,children:t.join(", ")})]}),l.jsxs("div",{className:"csdk-border-b csdk-border-[#e4e4e4] csdk-p-3 csdk-pl-1",children:[l.jsx(Ze,{variant:"body2",fontFamily:e.fontFamily,fontSize:11,children:o("drilldown.popover.table")}),l.jsx(Ze,{variant:"body2",fontFamily:e.fontFamily,fontSize:13,children:r})]}),l.jsxs("div",{className:"csdk-p-3 csdk-pl-1",children:[l.jsx(Ze,{variant:"body2",fontFamily:e.fontFamily,fontSize:11,children:o("drilldown.popover.column")}),l.jsx(Ze,{variant:"body2",fontFamily:e.fontFamily,fontSize:13,children:n})]})]})},JI=({popperParams:e,currentDimension:t,themeProps:r})=>{const n=t.expression.match(/\[(.*?)]/),[o,i]=n?n[1].split("."):["",""],a=!!e;return l.jsx(po,{open:a,anchorEl:e==null?void 0:e.anchorEl,placement:"bottom",popperOptions:QI,children:e&&l.jsx(ZI,{themeProps:r,filterDisplayValues:e.filterDisplayValues,currentTable:o,currentColumn:i})})},eA=()=>{const{themeSettings:{typography:{primaryTextColor:e,secondaryTextColor:t,fontFamily:r},general:{backgroundColor:n,brandColor:o,primaryButtonTextColor:i},chart:{backgroundColor:a}}}=l.useThemeContext(),s=l.scaleBrightness(a,-.02),c=l.scaleBrightness(s,-.05);return{primaryTextColor:e,secondaryTextColor:t,fontFamily:r,backgroundColor:n,brandColor:o,primaryButtonTextColor:i,chartBackgroundColor:a,activeDrillBackgroundColor:s,activeDrillHoverBackgroundColor:c}},tA=l.newStyled(Wr,{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;}}}"),rA=l.newStyled(Wr,{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;}}}"),nA=({currentDimension:e,children:t})=>{const{t:r}=l.useTranslation(),n=F.useRef(null),[o,i]=F.useState(0),[a,s]=F.useState(0),[c,u]=F.useState(0),p=()=>{var g;return(g=n.current)==null?void 0:g.querySelector("ol")};F.useEffect(()=>{const g=p();if(g){const v=g.clientWidth,y=g.scrollWidth,w=g.scrollLeft;i(v),s(y),u(w)}},[e]),F.useEffect(()=>{const g=p();function v(){if(g){const T=g.clientWidth;i(T)}}function y(){if(g){const T=g.scrollLeft;u(T)}}const w=new ResizeObserver(v);return g?(w.observe(g),g.addEventListener("scroll",y),()=>{w.disconnect(),g.removeEventListener("scroll",y)}):()=>{}},[]);const h=g=>{const y="smooth",w=p();w&&w.scrollBy({left:g==="right"?200:-200,behavior:y})},d=c!=0,m=Math.floor(a-c)>o;return l.jsxs("div",{style:{position:"relative"},children:[d&&l.jsx(tA,{onClick:()=>h("left"),children:l.jsx("span",{"aria-label":"prev-item",children:r("drilldown.breadcrumbsPrev")})}),m&&l.jsx(rA,{onClick:()=>h("right"),children:l.jsx("span",{"aria-label":"next-item",children:r("drilldown.breadcrumbsNext")})}),l.jsx("div",{ref:n,children:t})]})},wt="#F2F2F2",oA=l.newStyled(qn,{target:"ex0ybhj0",label:"StyledDrillButton"})("&&{font-family:",({theme:e})=>e.fontFamily,";position:relative;border-radius:0;border:1px solid ",wt,";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 ",wt,";border-right:none;}.MuiTouchRipple-root{display:none;}}"),iA=l.newStyled(bh,{target:"ex0ybhj1",label:"StyledBreadcrumbs"})(".MuiBreadcrumbs-ol{flex-wrap:nowrap;overflow:hidden;}.MuiBreadcrumbs-separator{display:none;}"),aA=({isActive:e,filterDisplayValue:t,handleMouseEnter:r,handleMouseLeave:n,handleClick:o,themeProps:i,popperParams:a,index:s})=>l.jsx(oA,{theme:i,active:e.toString(),index:s,onMouseEnter:r,onMouseLeave:n,onClick:o,children:l.jsxs("span",{className:"flex items-center justify-between",children:[l.jsxs("span",{className:"mr-2",children:[t.slice(0,2).join(", "),t.length>2&&", ..."]}),e?l.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 ${wt}`,borderRight:`1px solid ${wt}`,transition:"background-color 0.2s, border-color 0.2s, color 0.2s",zIndex:8}}):void 0,l.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 ${wt}`,borderRight:`1px solid ${wt}`,zIndex:7,transition:"background-color 0.2s, border-color 0.2s, color 0.2s"}})]})}),Ch=no({componentName:"DrilldownBreadcrumbs",shouldSkipSisenseContextWaiting:!0})(({filtersDisplayValues:e,currentDimension:t,clearDrilldownSelections:r,sliceDrilldownSelections:n})=>{const[o,i]=F.useState(null),[a,s]=F.useState(!1),c=eA(),{CancelButton:u,CurrentDrillButton:p}=XI({clearDrilldownSelections:r,currentDimension:t,isHovered:a,setIsHovered:s,themeProps:c}),h=v=>y=>{s(!0),i({filterDisplayValues:v,anchorEl:y.currentTarget})},d=()=>{s(!1),i(null)},m=v=>v<e.length-1,g=v=>v===e.length-2;return e.length?l.jsx("div",{"aria-label":"drilldown-breadcrumbs",children:l.jsx(nA,{currentDimension:t,children:l.jsxs(iA,{separator:null,sx:{backgroundColor:c.chartBackgroundColor,padding:"4px"},children:[l.jsx(u,{}),e.map((v,y)=>{const w=m(y),T=g(y);return l.jsx("div",{children:l.jsx(aA,{isActive:w,isLastActive:T,filterDisplayValue:v,handleMouseEnter:h(v),handleMouseLeave:d,handleClick:()=>n(y+1),themeProps:c,popperParams:o,index:y})},y)}),l.jsx(p,{}),l.jsx(JI,{popperParams:o,currentDimension:t,themeProps:c})]})})}):null}),Th=e=>{const{initialDimension:t,onDrilldownSelectionsChange:r}=e,n=F.useMemo(()=>e.drilldownPaths||[],[e.drilldownPaths]),o=F.useMemo(()=>e.drilldownSelections||[],[e.drilldownSelections]),{t:i}=l.useTranslation();if(!t)throw new l.TranslatableError("errors.drilldownNoInitialDimension");const[a,s]=Pl(o,{onLocalStateChange:r}),c=F.useMemo(()=>[l.translateColumnToAttribute(t),...a.map(({nextDimension:y})=>y)],[t,a]),u=F.useMemo(()=>n.filter(y=>{if(l.MetadataTypes.isAttribute(y)){const _=y;return c.every(x=>!ut(x,_))}const T=y;return c.every((_,x)=>ut(_,T.levels[x]))}),[n,c]),p=F.useCallback((y,w,T)=>{s(_=>Eh(_,y,w,T))},[s]),h=F.useCallback(y=>{s(w=>w.slice(0,y))},[s]),d=F.useCallback(()=>{s([])},[s]),{drilldownFilters:m,drilldownFiltersDisplayValues:g,drilldownDimension:v}=F.useMemo(()=>Sh(a,t,i),[a,t,i]);return{drilldownSelections:a,availableDrilldownPaths:u,drilldownFilters:m,drilldownFiltersDisplayValues:g,drilldownDimension:v,selectDrilldown:p,sliceDrilldownSelections:h,clearDrilldownSelections:d}},Eh=(e,t,r,n)=>{var d,m;if(!(n!=null&&n.levels))return[...e,{points:t,nextDimension:r}];if(ut(n.levels[0],r))return[];const i=(d=e==null?void 0:e.findIndex(g=>ut(g.nextDimension,r)))!=null?d:-1;if(i!==-1)return e.slice(0,i+1);const s=(m=l.last(e))==null?void 0:m.nextDimension,c=e.length?n.levels.findIndex(g=>s&&ut(g,s)):0,u=n.levels.indexOf(r),h=n.levels.slice(c+1,u+1).map((g,v)=>({points:v===0?t:[],nextDimension:g}));return[...e,...h]},Sh=(e,t,r)=>{let n=t&&l.translateColumnToAttribute(t);const o=[],i=[];return e.forEach(({points:a,nextDimension:s})=>{o.push(l.members(n,a.map(sA)));const c=a.length?a.map(Rh):[`${n.name} (${r("drilldown.breadcrumbsAllSuffix")})`];i.push(c),n=s}),{drilldownFilters:o,drilldownFiltersDisplayValues:i,drilldownDimension:n}};function Rh(e){return"categoryDisplayValue"in e?`${e.categoryDisplayValue}`:"categoryValue"in e?`${e.categoryValue}`:""}function sA(e){return"categoryValue"in e?`${e.categoryValue}`:""}var lA=Object.prototype,cA=lA.hasOwnProperty,uA=vh(function(e,t,r){cA.call(e,r)?e[r].push(t):l.baseAssignValue(e,r,[t])});function dA(e,t){return t.all?[]:e.filter(r=>{var n;return!((n=t.ids)!=null&&n.includes(r.config.guid))})}function Oh(e,t){return e.find(r=>ut(r.attribute,t))}function Mh(e,t,r){const n=Oh(r,e);return l.members(e,t.map(o=>`${o}`),{guid:n==null?void 0:n.config.guid,backgroundFilter:n==null?void 0:n.config.backgroundFilter})}function Ph(e,t){return Ml(e,t)&&"members"in e&&"members"in t&&l.isEqual(e.members,t.members)}var Gn=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 Dh=2;function nn(e,t){const r=e.flatMap(({entries:o={}})=>t.flatMap(i=>{const a=o[i];return a?(Array.isArray(a)?a:[a]).filter(({attribute:c})=>!!c):[]})),n=uA(r,({id:o})=>o);return Object.values(n).map(o=>({attribute:o[0].attribute,values:as(o.map(({value:i})=>i)),displayValues:as(o.map(({displayValue:i})=>i))}))}function fA(e){return nn(e,["category"])}function pA(e){return nn(e,["category"])}function hA(e,t){const r=nn(e,["category"]),n=r.length-1;return t.category.map((o,i)=>n===i?r[i]:{attribute:l.translateColumnToAttribute(o),values:[],displayValues:[]})}function mA(e){return nn(e,["x","y","breakByPoint","breakByColor"])}function gA(e){return nn(e,["geo"])}function vA(e){return nn(e,["geo"])}function zo(e,t,r){return e==="plugin"?[]:e==="text"?[]:e==="pivot"?[]:e==="treemap"||e==="sunburst"?hA(r,t):l.isCartesian(e)||e==="pie"||e==="funnel"?fA(r):l.isBoxplot(e)?pA(r):l.isScatter(e)?mA(r):l.isScattermap(e)?gA(r):l.isAreamap(e)?vA(r):[]}function Dl(e,t){let r=[];return e==="plugin"?r=[]:e==="text"?r=[]:e==="pivot"?r=[...t.rows||[],...t.columns||[]]:l.isCartesian(e)||l.isCategorical(e)||l.isBoxplot(e)||l.isRange(e)?r=[...t.category]:l.isScatter(e)?r=[t.x,t.y,t.breakByPoint,t.breakByColor].filter(n=>!!(n&&!l.isMeasureColumn(n))):(l.isScattermap(e)||l.isAreamap(e))&&(r=[...t.geo]),r.map(l.translateColumnToAttribute)}function yA(e,t,r){const n=Oh(t,e.attribute);if(!n||Ol(n))return null;if(Ph(e,n))return qi(e);if(l.isMembersFilter(n)&&r){const[o,i]=ho(n.members,s=>e.members.includes(s));if(o.length===e.members.length&&i.length)return Mh(e.attribute,i,[n])}return null}function bA(e,t,r){const n=t.filter(a=>!a.config.disabled),o=e.map(a=>yA(a,n,r)).filter(a=>!!a),i=e.length!==o.length;return{filters:i?e:o,isSelection:i}}function xa(e,t,r=!1){const n=e.map(({attribute:i,values:a})=>Mh(i,a,t)),o=_A(t,n);return bA(o,t,r)}function _A(e,t){const r=e.filter(n=>n.config.locked);return r.length?t.filter(n=>!r.some(o=>Ml(o,n))):t}function xA(e,t,r){const n=zo(e,t,r).filter(({displayValues:s})=>s.length);if(n.length===0)return"";const[o]=n,i=r.length===1,a=o.displayValues.length>Dh;return n.length>1?i?n.map(s=>s.displayValues[0]).join(", "):a?"":o.displayValues.join(", "):a?o.attribute.name:o.displayValues.join(", ")}function td(e,t,r){const n=xA(e,t,r);return n?{id:Gn.CROSSFILTERING_CHART_POINTS_SELECTION,sectionTitle:n}:null}function rd(e,t){return{items:[{caption:e,onClick:t}]}}const wA=({initialDimension:e,drilldownPaths:t,drilldownSelections:r,openMenu:n,onDrilldownSelectionsChange:o})=>{const{t:i}=l.useTranslation(),{availableDrilldownPaths:a,drilldownFilters:s,drilldownFiltersDisplayValues:c,drilldownDimension:u,selectDrilldown:p,sliceDrilldownSelections:h,clearDrilldownSelections:d}=Th({initialDimension:e,drilldownPaths:t,drilldownSelections:r,onDrilldownSelectionsChange:o}),m=F.useCallback((v,y)=>{const w=[kh(y,u),Ih(a,u,(T,_)=>{p(y,T,_)},i)];n({position:v,itemSections:w})},[u,a,i,p,n]),g=F.useMemo(()=>u&&l.jsx(Ch,{filtersDisplayValues:c,currentDimension:u,clearDrilldownSelections:d,sliceDrilldownSelections:h}),[d,u,c,h]);return{drilldownDimension:u,drilldownFilters:s,breadcrumbs:g,openDrilldownMenu:m}};function kh(e,t){const r=as(e.map(Rh).filter(n=>!!n));return r.length>Dh?{id:Gn.DRILLDOWN_CHART_POINTS_SELECTION,sectionTitle:t.name}:{id:Gn.DRILLDOWN_CHART_POINTS_SELECTION,sectionTitle:r.join(", ")}}function CA(e){return 30+12*e}function Ih(e,t,r,n){const[o,i]=ho(e,l.MetadataTypes.isAttribute.bind(l.MetadataTypes)),a=o.map(c=>({caption:c.name,onClick:()=>r(c)})),s=i.map(c=>({caption:c.title,subItems:[{items:c.levels.map((u,p)=>({caption:u.name,class:p===0?"":"csdk-drilldown-hierarchy-nested-menu-item",style:{paddingLeft:`${CA(p)}px`},disabled:ut(u,t),onClick:()=>r(u,c)}))}]}));return{id:Gn.DRILLDOWN_DRILL_DIRECTIONS,sectionTitle:n("drilldown.drillMenuItem"),items:[...s,...a]}}var Gi=function(e){return e.HIGHLIGHT="highlight",e.FILTER="filter",e}({});function Ah(e){return function(t){t=l.toString(t);var r=Wf(t)?Wa(t):void 0,n=r?r[0]:t.charAt(0),o=r?jf(r,1).join(""):t.slice(1);return n[e]()+o}}var Nh=Ah("toUpperCase");function TA(e){return Nh(l.toString(e).toLowerCase())}function EA(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 SA(e){return function(t){return e==null?void 0:e[t]}}var RA={À:"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"},OA=SA(RA),MA=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,PA="\\u0300-\\u036f",DA="\\ufe20-\\ufe2f",kA="\\u20d0-\\u20ff",IA=PA+DA+kA,AA="["+IA+"]",NA=RegExp(AA,"g");function $A(e){return e=l.toString(e),e&&e.replace(MA,OA).replace(NA,"")}var LA=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function FA(e){return e.match(LA)||[]}var HA=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function BA(e){return HA.test(e)}var $h="\\ud800-\\udfff",jA="\\u0300-\\u036f",WA="\\ufe20-\\ufe2f",zA="\\u20d0-\\u20ff",VA=jA+WA+zA,Lh="\\u2700-\\u27bf",Fh="a-z\\xdf-\\xf6\\xf8-\\xff",UA="\\xac\\xb1\\xd7\\xf7",qA="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",GA="\\u2000-\\u206f",YA=" \\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",Hh="A-Z\\xc0-\\xd6\\xd8-\\xde",KA="\\ufe0e\\ufe0f",Bh=UA+qA+GA+YA,jh="['’]",nd="["+Bh+"]",XA="["+VA+"]",Wh="\\d+",QA="["+Lh+"]",zh="["+Fh+"]",Vh="[^"+$h+Bh+Wh+Lh+Fh+Hh+"]",ZA="\\ud83c[\\udffb-\\udfff]",JA="(?:"+XA+"|"+ZA+")",e7="[^"+$h+"]",Uh="(?:\\ud83c[\\udde6-\\uddff]){2}",qh="[\\ud800-\\udbff][\\udc00-\\udfff]",kr="["+Hh+"]",t7="\\u200d",od="(?:"+zh+"|"+Vh+")",r7="(?:"+kr+"|"+Vh+")",id="(?:"+jh+"(?:d|ll|m|re|s|t|ve))?",ad="(?:"+jh+"(?:D|LL|M|RE|S|T|VE))?",Gh=JA+"?",Yh="["+KA+"]?",n7="(?:"+t7+"(?:"+[e7,Uh,qh].join("|")+")"+Yh+Gh+")*",o7="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",i7="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",a7=Yh+Gh+n7,s7="(?:"+[QA,Uh,qh].join("|")+")"+a7,l7=RegExp([kr+"?"+zh+"+"+id+"(?="+[nd,kr,"$"].join("|")+")",r7+"+"+ad+"(?="+[nd,kr+od,"$"].join("|")+")",kr+"?"+od+"+"+id,kr+"+"+ad,i7,o7,Wh,s7].join("|"),"g");function c7(e){return e.match(l7)||[]}function u7(e,t,r){return e=l.toString(e),t=t,t===void 0?BA(e)?c7(e):FA(e):e.match(t)||[]}var d7="['’]",f7=RegExp(d7,"g");function p7(e){return function(t){return EA(u7($A(t).replace(f7,"")),e,"")}}var Kh=p7(function(e,t,r){return t=t.toLowerCase(),e+(r?TA(t):t)});function h7(e){const{_id:t,title:r,levels:n}=e;return{id:t,title:r,levels:n.map(o=>l.createDimensionalElementFromJaql(o))}}function Xh(e,t,r){return rt(this,null,function*(){const o=yield new l.RestApi(e,r).getHierarchies(t);return o==null?void 0:o.map(i=>h7(i))})}const m7=hh("useGetHierarchyModels")(Qh);function Qh(e){const t=Rl(e,["dataSource","dimension","ids","alwaysIncluded"]),r=mh(e,t),[n,o]=F.useReducer(is,{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0}),{isInitialized:i,app:a}=l.useSisenseContext();return F.useEffect(()=>{i||o({type:"error",error:new l.TranslatableError("errors.sisenseContextNotFound")}),r(a)&&(o({type:"loading"}),Xh(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?sd(is(n,{type:"loading"})):sd(n)}function sd(e){const n=e,{data:t}=n,r=_r(n,["data"]);return J(q({},r),{hierarchies:t})}function g7({attribute:e,dataSource:t,drilldownPaths:r=[],enabled:n}){const[o,i]=F.useMemo(()=>ho(r,uh),[r]),{hierarchies:a=[]}=Qh({enabled:n,dataSource:t,dimension:e,ids:o,alwaysIncluded:!0});return F.useMemo(()=>a.length?[...a,...i]:i,[a,i])}function v7(e,t){return Dl(e,t)[0]}function y7(e){return[...l.CARTESIAN_CHART_TYPES,...l.CATEGORICAL_CHART_TYPES,...l.SCATTER_CHART_TYPES,...l.BOXPLOT_CHART_TYPES,...l.RANGE_CHART_TYPES].includes(e)}function b7(e,t){return Dl(e,t).length===1}function _7(e,t){return b7(e,t)&&y7(e)}function Zh(e,t,r){const n=o=>!!o&&!ut(r,l.translateColumnToAttribute(o));if(l.isCartesian(e)||l.isCategorical(e)||l.isBoxplot(e)||l.isRange(e)){const o=t.category[0];if(n(o))return J(q({},t),{category:[r]})}else if(l.isScatter(e)){const o=t,i=["x","y","breakByPoint","breakByColor"];for(const a of i){const s=o[a];if(s&&!l.isMeasureColumn(s)&&n(s))return J(q({},o),{[a]:r})}}return t}function ld(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]&&!l.isMeasureColumn(r[s]));if(i){const s=t,c=s.type==="mouseup";c&&console.warn("No drilldown support for multi-selection in scatter chart");const u=c?n[a]:s.point.options.custom[Kh(`{masked ${a}`)];return{categoryValue:u,categoryDisplayValue:u}}return n})}const x7=({propsToExtend:e,onDrilldownSelectionsChange:t})=>{const{chartType:r,dataOptions:n,dataSource:o,drilldownOptions:i}=e,{drilldownSelections:a}=i||{},{openMenu:s}=gh(),c=F.useMemo(()=>_7(r,n),[r,n]),u=F.useMemo(()=>(i==null?void 0:i.drilldownPaths)||[],[i==null?void 0:i.drilldownPaths]),p=F.useMemo(()=>{const O=l.createAttribute({name:"dummy drilldown initial attribute"});return v7(r,n)||O},[r,n]),h=g7({attribute:p,dataSource:o,drilldownPaths:u,enabled:c}),d=F.useMemo(()=>{var M;return(((M=i==null?void 0:i.drilldownSelections)==null?void 0:M.length)||(h==null?void 0:h.length))&&c},[i,c,h]),{drilldownDimension:m,drilldownFilters:g,breadcrumbs:v,openDrilldownMenu:y}=wA({initialDimension:p,drilldownSelections:a,drilldownPaths:h,openMenu:s,onDrilldownSelectionsChange:t}),w=F.useCallback((O,M)=>{const D=ld(O,M,n);y({left:M.clientX,top:M.clientY},D)},[n,y]),T=F.useCallback((O,M)=>{const D=ld([O],M,n);y({left:M.clientX,top:M.clientY},D)},[n,y]),_=F.useMemo(()=>Zh(r,n,m),[r,n,m]),x=F.useMemo(()=>g.length?Cd(e.filters||[],g):e.filters,[e.filters,g]),b=F.useMemo(()=>l.combineHandlers([w,e.onDataPointsSelected]),[w,e.onDataPointsSelected]),C=F.useMemo(()=>l.combineHandlers([T,e.onDataPointContextMenu]),[T,e.onDataPointContextMenu]);return{propsWithDrilldown:q(q({},e),d&&{dataOptions:_,filters:x,onDataPointsSelected:b,onDataPointContextMenu:C}),isDrilldownEnabled:d,breadcrumbs:v}},w7=no({componentName:"ChartWidget"})(e=>{var O,M;const{app:t}=l.useSisenseContext(),{chartType:r,dataSource:n=t==null?void 0:t.defaultDataSource,dataOptions:o,styleOptions:i,highlightSelectionDisabled:a=!1,highlights:s,description:c,onChange:u}=e,{width:p,height:h}=i||{},d=ep(r,{hasHeader:!((O=i==null?void 0:i.header)!=null&&O.hidden)}),[m,g]=F.useState(0),v=F.useMemo(()=>l.omit(i,["width","height"]),[i]),y=F.useCallback(D=>{u==null||u({drilldownOptions:{drilldownSelections:D}})},[u]),{propsWithDrilldown:w,isDrilldownEnabled:T,breadcrumbs:_}=x7({propsToExtend:e,onDrilldownSelectionsChange:y}),x=RI({chartType:r,dataOptions:o,enabled:!a&&!T&&!(s!=null&&s.length)}),b=(M=t==null?void 0:t.settings.accessibilityConfig)==null?void 0:M.enabled,C=F.useCallback(D=>{var R;return b?J(q({},D),{accessibility:J(q({},D.accessibility),{description:c!=null?c:(R=D.accessibility)==null?void 0:R.description})}):D},[c,b]);if(!r||!o)return null;const S=J(q({},w),{dataSet:n,styleOptions:v,refreshCounter:m,onDataPointClick:F.useMemo(()=>l.combineHandlers([x.onDataPointClick,e.onDataPointClick]),[x.onDataPointClick,e.onDataPointClick]),onDataPointContextMenu:w.onDataPointContextMenu,onDataPointsSelected:F.useMemo(()=>l.combineHandlers([x.onDataPointsSelected,w.onDataPointsSelected]),[x.onDataPointsSelected,w.onDataPointsSelected]),onBeforeRender:F.useMemo(()=>l.combineHandlers([C,x.onBeforeRender,e.onBeforeRender],!0),[C,x.onBeforeRender,e.onBeforeRender])});return l.jsx(Ei,{defaultSize:d,size:{width:p,height:h},children:l.jsx(ch,J(q({},e),{topSlot:l.jsxs(l.Fragment,{children:[e.topSlot,_]}),dataSetName:n&&l.getDataSourceName(n),onRefresh:()=>g(m+1),children:l.jsx(nh,q({},S))}))})});class on{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 Yn=typeof window=="undefined"||"Deno"in window;function it(){}function C7(e,t){return typeof e=="function"?e(t):e}function ss(e){return typeof e=="number"&&e>=0&&e!==1/0}function Jh(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Sn(e,t,r){return mo(e)?typeof t=="function"?J(q({},r),{queryKey:e,queryFn:t}):J(q({},t),{queryKey:e}):e}function T7(e,t,r){return mo(e)?J(q({},t),{mutationKey:e}):typeof e=="function"?J(q({},t),{mutationFn:e}):q({},e)}function jt(e,t,r){return mo(e)?[J(q({},t),{queryKey:e}),r]:[e||{},t]}function cd(e,t){const{type:r="all",exact:n,fetchStatus:o,predicate:i,queryKey:a,stale:s}=e;if(mo(a)){if(n){if(t.queryHash!==kl(a,t.options))return!1}else if(!Ar(t.queryKey,a))return!1}if(r!=="all"){const c=t.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||typeof o!="undefined"&&o!==t.state.fetchStatus||i&&!i(t))}function ud(e,t){const{exact:r,fetching:n,predicate:o,mutationKey:i}=e;if(mo(i)){if(!t.options.mutationKey)return!1;if(r){if(ur(t.options.mutationKey)!==ur(i))return!1}else if(!Ar(t.options.mutationKey,i))return!1}return!(typeof n=="boolean"&&t.state.status==="loading"!==n||o&&!o(t))}function kl(e,t){return((t==null?void 0:t.queryKeyHashFn)||ur)(e)}function ur(e){return JSON.stringify(e,(t,r)=>ls(r)?Object.keys(r).sort().reduce((n,o)=>(n[o]=r[o],n),{}):r)}function Ar(e,t){return em(e,t)}function em(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(r=>!em(e[r],t[r])):!1}function tm(e,t){if(e===t)return e;const r=dd(e)&&dd(t);if(r||ls(e)&&ls(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 c=0;c<i;c++){const u=r?c:o[c];a[u]=tm(e[u],t[u]),a[u]===e[u]&&s++}return n===i&&s===n?e:a}return t}function ri(e,t){if(e&&!t||t&&!e)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function dd(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ls(e){if(!fd(e))return!1;const t=e.constructor;if(typeof t=="undefined")return!0;const r=t.prototype;return!(!fd(r)||!r.hasOwnProperty("isPrototypeOf"))}function fd(e){return Object.prototype.toString.call(e)==="[object Object]"}function mo(e){return Array.isArray(e)}function rm(e){return new Promise(t=>{setTimeout(t,e)})}function pd(e){rm(0).then(e)}function E7(){if(typeof AbortController=="function")return new AbortController}function cs(e,t,r){return r.isDataEqual!=null&&r.isDataEqual(e,t)?e:typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?tm(e,t):t}class S7 extends on{constructor(){super(),this.setup=t=>{if(!Yn&&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 ni=new S7,hd=["online","offline"];class R7 extends on{constructor(){super(),this.setup=t=>{if(!Yn&&window.addEventListener){const r=()=>t();return hd.forEach(n=>{window.addEventListener(n,r,!1)}),()=>{hd.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 oi=new R7;function O7(e){return Math.min(1e3*Qe(2,e),3e4)}function Yi(e){return(e!=null?e:"online")==="online"?oi.isOnline():!0}class nm{constructor(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}}function Vo(e){return e instanceof nm}function om(e){let t=!1,r=0,n=!1,o,i,a;const s=new Promise((y,w)=>{i=y,a=w}),c=y=>{n||(m(new nm(y)),e.abort==null||e.abort())},u=()=>{t=!0},p=()=>{t=!1},h=()=>!ni.isFocused()||e.networkMode!=="always"&&!oi.isOnline(),d=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))},g=()=>new Promise(y=>{o=w=>{const T=n||!h();return T&&y(w),T},e.onPause==null||e.onPause()}).then(()=>{o=void 0,n||e.onContinue==null||e.onContinue()}),v=()=>{if(n)return;let y;try{y=e.fn()}catch(w){y=Promise.reject(w)}Promise.resolve(y).then(d).catch(w=>{var T,_;if(n)return;const x=(T=e.retry)!=null?T:3,b=(_=e.retryDelay)!=null?_:O7,C=typeof b=="function"?b(r,w):b,S=x===!0||typeof x=="number"&&r<x||typeof x=="function"&&x(r,w);if(t||!S){m(w);return}r++,e.onFail==null||e.onFail(r,w),rm(C).then(()=>{if(h())return g()}).then(()=>{t?m(w):v()})})};return Yi(e.networkMode)?v():g().then(v),{promise:s,cancel:c,continue:()=>(o==null?void 0:o())?s:Promise.resolve(),cancelRetry:u,continueRetry:p}}const Il=console;function M7(){let e=[],t=0,r=p=>{p()},n=p=>{p()};const o=p=>{let h;t++;try{h=p()}finally{t--,t||s()}return h},i=p=>{t?e.push(p):pd(()=>{r(p)})},a=p=>(...h)=>{i(()=>{p(...h)})},s=()=>{const p=e;e=[],p.length&&pd(()=>{n(()=>{p.forEach(h=>{r(h)})})})};return{batch:o,batchCalls:a,schedule:i,setNotifyFunction:p=>{r=p},setBatchNotifyFunction:p=>{n=p}}}const ke=M7();class im{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ss(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(t){this.cacheTime=Math.max(this.cacheTime||0,t!=null?t:Yn?1/0:5*60*1e3)}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class P7 extends im{constructor(t){super(),this.abortSignalConsumed=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.logger=t.logger||Il,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||D7(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(t){this.options=q(q({},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=cs(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(it).catch(it):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||!Jh(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(g=>g.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=E7(),s={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},c=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>{if(a)return this.abortSignalConsumed=!0,a.signal}})};c(s);const u=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(s)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'"),p={fetchOptions:r,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:u};if(c(p),(n=this.options.behavior)==null||n.onFetch(p),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((o=p.fetchOptions)==null?void 0:o.meta)){var h;this.dispatch({type:"fetch",meta:(h=p.fetchOptions)==null?void 0:h.meta})}const d=m=>{if(Vo(m)&&m.silent||this.dispatch({type:"error",error:m}),!Vo(m)){var g,v,y,w;(g=(v=this.cache.config).onError)==null||g.call(v,m,this),(y=(w=this.cache.config).onSettled)==null||y.call(w,this.state.data,m,this),process.env.NODE_ENV!=="production"&&this.logger.error(m)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=om({fn:p.fetchFn,abort:a==null?void 0:a.abort.bind(a),onSuccess:m=>{var g,v,y,w;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),d(new Error(this.queryHash+" data is undefined"));return}this.setData(m),(g=(v=this.cache.config).onSuccess)==null||g.call(v,m,this),(y=(w=this.cache.config).onSettled)==null||y.call(w,m,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:d,onFail:(m,g)=>{this.dispatch({type:"failed",failureCount:m,error:g})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:p.options.retry,retryDelay:p.options.retryDelay,networkMode:p.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(t){const r=n=>{var o,i;switch(t.type){case"failed":return J(q({},n),{fetchFailureCount:t.failureCount,fetchFailureReason:t.error});case"pause":return J(q({},n),{fetchStatus:"paused"});case"continue":return J(q({},n),{fetchStatus:"fetching"});case"fetch":return q(J(q({},n),{fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(o=t.meta)!=null?o:null,fetchStatus:Yi(this.options.networkMode)?"fetching":"paused"}),!n.dataUpdatedAt&&{error:null,status:"loading"});case"success":return q(J(q({},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 Vo(a)&&a.revert&&this.revertState?J(q({},this.revertState),{fetchStatus:"idle"}):J(q({},n),{error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"});case"invalidate":return J(q({},n),{isInvalidated:!0});case"setState":return q(q({},n),t.state)}};this.state=r(this.state),ke.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate(t)}),this.cache.notify({query:this,type:"updated",action:t})})}}function D7(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 k7 extends on{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:kl(i,r);let s=this.get(a);return s||(s=new P7({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(){ke.batch(()=>{this.queries.forEach(t=>{this.remove(t)})})}get(t){return this.queriesMap[t]}getAll(){return this.queries}find(t,r){const[n]=jt(t,r);return typeof n.exact=="undefined"&&(n.exact=!0),this.queries.find(o=>cd(n,o))}findAll(t,r){const[n]=jt(t,r);return Object.keys(n).length>0?this.queries.filter(o=>cd(n,o)):this.queries}notify(t){ke.batch(()=>{this.listeners.forEach(({listener:r})=>{r(t)})})}onFocus(){ke.batch(()=>{this.queries.forEach(t=>{t.onFocus()})})}onOnline(){ke.batch(()=>{this.queries.forEach(t=>{t.onOnline()})})}}class I7 extends im{constructor(t){super(),this.defaultOptions=t.defaultOptions,this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||Il,this.observers=[],this.state=t.state||am(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=q(q({},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 rt(this,null,function*(){const t=()=>{var S;return this.retryer=om({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(O,M)=>{this.dispatch({type:"failed",failureCount:O,error:M})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(S=this.options.retry)!=null?S:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},r=this.state.status==="loading";try{var n,o,i,a,s,c,u,p;if(!r){var h,d,m,g;this.dispatch({type:"loading",variables:this.options.variables}),yield(h=(d=this.mutationCache.config).onMutate)==null?void 0:h.call(d,this.state.variables,this);const O=yield(m=(g=this.options).onMutate)==null?void 0:m.call(g,this.state.variables);O!==this.state.context&&this.dispatch({type:"loading",context:O,variables:this.state.variables})}const S=yield t();return yield(n=(o=this.mutationCache.config).onSuccess)==null?void 0:n.call(o,S,this.state.variables,this.state.context,this),yield(i=(a=this.options).onSuccess)==null?void 0:i.call(a,S,this.state.variables,this.state.context),yield(s=(c=this.mutationCache.config).onSettled)==null?void 0:s.call(c,S,null,this.state.variables,this.state.context,this),yield(u=(p=this.options).onSettled)==null?void 0:u.call(p,S,null,this.state.variables,this.state.context),this.dispatch({type:"success",data:S}),S}catch(S){try{var v,y,w,T,_,x,b,C;throw yield(v=(y=this.mutationCache.config).onError)==null?void 0:v.call(y,S,this.state.variables,this.state.context,this),process.env.NODE_ENV!=="production"&&this.logger.error(S),yield(w=(T=this.options).onError)==null?void 0:w.call(T,S,this.state.variables,this.state.context),yield(_=(x=this.mutationCache.config).onSettled)==null?void 0:_.call(x,void 0,S,this.state.variables,this.state.context,this),yield(b=(C=this.options).onSettled)==null?void 0:b.call(C,void 0,S,this.state.variables,this.state.context),S}finally{this.dispatch({type:"error",error:S})}}})}dispatch(t){const r=n=>{switch(t.type){case"failed":return J(q({},n),{failureCount:t.failureCount,failureReason:t.error});case"pause":return J(q({},n),{isPaused:!0});case"continue":return J(q({},n),{isPaused:!1});case"loading":return J(q({},n),{context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!Yi(this.options.networkMode),status:"loading",variables:t.variables});case"success":return J(q({},n),{data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1});case"error":return J(q({},n),{data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"});case"setState":return q(q({},n),t.state)}};this.state=r(this.state),ke.batch(()=>{this.observers.forEach(n=>{n.onMutationUpdate(t)}),this.mutationCache.notify({mutation:this,type:"updated",action:t})})}}function am(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class A7 extends on{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,r,n){const o=new I7({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(){ke.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=>ud(t,r))}findAll(t){return this.mutations.filter(r=>ud(t,r))}notify(t){ke.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 ke.batch(()=>r.reduce((n,o)=>n.then(()=>o.continue().catch(it)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function N7(){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,c=(n=e.fetchOptions)==null||(o=n.meta)==null?void 0:o.fetchMore,u=c==null?void 0:c.pageParam,p=(c==null?void 0:c.direction)==="forward",h=(c==null?void 0:c.direction)==="backward",d=((i=e.state.data)==null?void 0:i.pages)||[],m=((a=e.state.data)==null?void 0:a.pageParams)||[];let g=m,v=!1;const y=C=>{Object.defineProperty(C,"signal",{enumerable:!0,get:()=>{var S;if((S=e.signal)!=null&&S.aborted)v=!0;else{var O;(O=e.signal)==null||O.addEventListener("abort",()=>{v=!0})}return e.signal}})},w=e.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+e.options.queryHash+"'")),T=(C,S,O,M)=>(g=M?[S,...g]:[...g,S],M?[O,...C]:[...C,O]),_=(C,S,O,M)=>{if(v)return Promise.reject("Cancelled");if(typeof O=="undefined"&&!S&&C.length)return Promise.resolve(C);const D={queryKey:e.queryKey,pageParam:O,meta:e.options.meta};y(D);const R=w(D);return Promise.resolve(R).then(I=>T(C,O,I,M))};let x;if(!d.length)x=_([]);else if(p){const C=typeof u!="undefined",S=C?u:md(e.options,d);x=_(d,C,S)}else if(h){const C=typeof u!="undefined",S=C?u:$7(e.options,d);x=_(d,C,S,!0)}else{g=[];const C=typeof e.options.getNextPageParam=="undefined";x=(s&&d[0]?s(d[0],0,d):!0)?_([],C,m[0]):Promise.resolve(T([],m[0],d[0]));for(let O=1;O<d.length;O++)x=x.then(M=>{if(s&&d[O]?s(d[O],O,d):!0){const R=C?m[O]:md(e.options,M);return _(M,C,R)}return Promise.resolve(T(M,m[O],d[O]))})}return x.then(C=>({pages:C,pageParams:g}))}}}}function md(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function $7(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}class L7{constructor(t={}){this.queryCache=t.queryCache||new k7,this.mutationCache=t.mutationCache||new A7,this.logger=t.logger||Il,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=ni.subscribe(()=>{ni.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=oi.subscribe(()=>{oi.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]=jt(t,r);return n.fetchStatus="fetching",this.queryCache.findAll(n).length}isMutating(t){return this.mutationCache.findAll(J(q({},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=Sn(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=C7(r,i);if(typeof a=="undefined")return;const s=Sn(t),c=this.defaultQueryOptions(s);return this.queryCache.build(this,c).setData(a,J(q({},n),{manual:!0}))}setQueriesData(t,r,n){return ke.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]=jt(t,r),o=this.queryCache;ke.batch(()=>{o.findAll(n).forEach(i=>{o.remove(i)})})}resetQueries(t,r,n){const[o,i]=jt(t,r,n),a=this.queryCache,s=q({type:"active"},o);return ke.batch(()=>(a.findAll(o).forEach(c=>{c.reset()}),this.refetchQueries(s,i)))}cancelQueries(t,r,n){const[o,i={}]=jt(t,r,n);typeof i.revert=="undefined"&&(i.revert=!0);const a=ke.batch(()=>this.queryCache.findAll(o).map(s=>s.cancel(i)));return Promise.all(a).then(it).catch(it)}invalidateQueries(t,r,n){const[o,i]=jt(t,r,n);return ke.batch(()=>{var a,s;if(this.queryCache.findAll(o).forEach(u=>{u.invalidate()}),o.refetchType==="none")return Promise.resolve();const c=J(q({},o),{type:(a=(s=o.refetchType)!=null?s:o.type)!=null?a:"active"});return this.refetchQueries(c,i)})}refetchQueries(t,r,n){const[o,i]=jt(t,r,n),a=ke.batch(()=>this.queryCache.findAll(o).filter(c=>!c.isDisabled()).map(c=>{var u;return c.fetch(void 0,J(q({},i),{cancelRefetch:(u=i==null?void 0:i.cancelRefetch)!=null?u:!0,meta:{refetchPage:o.refetchPage}}))}));let s=Promise.all(a).then(it);return i!=null&&i.throwOnError||(s=s.catch(it)),s}fetchQuery(t,r,n){const o=Sn(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(it).catch(it)}fetchInfiniteQuery(t,r,n){const o=Sn(t,r,n);return o.behavior=N7(),this.fetchQuery(o)}prefetchInfiniteQuery(t,r,n){return this.fetchInfiniteQuery(t,r,n).then(it).catch(it)}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=>ur(t)===ur(o.queryKey));n?n.defaultOptions=r:this.queryDefaults.push({queryKey:t,defaultOptions:r})}getQueryDefaults(t){if(!t)return;const r=this.queryDefaults.find(n=>Ar(t,n.queryKey));return process.env.NODE_ENV!=="production"&&this.queryDefaults.filter(o=>Ar(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=>ur(t)===ur(o.mutationKey));n?n.defaultOptions=r:this.mutationDefaults.push({mutationKey:t,defaultOptions:r})}getMutationDefaults(t){if(!t)return;const r=this.mutationDefaults.find(n=>Ar(t,n.mutationKey));return process.env.NODE_ENV!=="production"&&this.mutationDefaults.filter(o=>Ar(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=J(q(q(q({},this.defaultOptions.queries),this.getQueryDefaults(t==null?void 0:t.queryKey)),t),{_defaulted:!0});return!r.queryHash&&r.queryKey&&(r.queryHash=kl(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:J(q(q(q({},this.defaultOptions.mutations),this.getMutationDefaults(t==null?void 0:t.mutationKey)),t),{_defaulted:!0})}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class F7 extends on{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),gd(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return us(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return us(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"),ri(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&&vd(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 B7(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=_r(o,["refetchPage"]);return this.fetch(J(q({},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(J(q({},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(it)),r}updateStaleTimeout(){if(this.clearStaleTimeout(),Yn||this.currentResult.isStale||!ss(this.options.staleTime))return;const r=Jh(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,!(Yn||this.options.enabled===!1||!ss(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||ni.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,c=t!==n,u=c?t.state:this.currentQueryInitialState,p=c?this.currentResult:this.previousQueryResult,{state:h}=t;let{dataUpdatedAt:d,error:m,errorUpdatedAt:g,fetchStatus:v,status:y}=h,w=!1,T=!1,_;if(r._optimisticResults){const O=this.hasListeners(),M=!O&&gd(t,r),D=O&&vd(t,n,r,o);(M||D)&&(v=Yi(t.options.networkMode)?"fetching":"paused",d||(y="loading")),r._optimisticResults==="isRestoring"&&(v="idle")}if(r.keepPreviousData&&!h.dataUpdatedAt&&p!=null&&p.isSuccess&&y!=="error")_=p.data,d=p.dataUpdatedAt,y=p.status,w=!0;else if(r.select&&typeof h.data!="undefined")if(i&&h.data===(a==null?void 0:a.data)&&r.select===this.selectFn)_=this.selectResult;else try{this.selectFn=r.select,_=r.select(h.data),_=cs(i==null?void 0:i.data,_,r),this.selectResult=_,this.selectError=null}catch(O){process.env.NODE_ENV!=="production"&&this.client.getLogger().error(O),this.selectError=O}else _=h.data;if(typeof r.placeholderData!="undefined"&&typeof _=="undefined"&&y==="loading"){let O;if(i!=null&&i.isPlaceholderData&&r.placeholderData===(s==null?void 0:s.placeholderData))O=i.data;else if(O=typeof r.placeholderData=="function"?r.placeholderData():r.placeholderData,r.select&&typeof O!="undefined")try{O=r.select(O),this.selectError=null}catch(M){process.env.NODE_ENV!=="production"&&this.client.getLogger().error(M),this.selectError=M}typeof O!="undefined"&&(y="success",_=cs(i==null?void 0:i.data,O,r),T=!0)}this.selectError&&(m=this.selectError,_=this.selectResult,g=Date.now(),y="error");const x=v==="fetching",b=y==="loading",C=y==="error";return{status:y,fetchStatus:v,isLoading:b,isSuccess:y==="success",isError:C,isInitialLoading:b&&x,data:_,dataUpdatedAt:d,error:m,errorUpdatedAt:g,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>u.dataUpdateCount||h.errorUpdateCount>u.errorUpdateCount,isFetching:x,isRefetching:x&&!b,isLoadingError:C&&h.dataUpdatedAt===0,isPaused:v==="paused",isPlaceholderData:T,isPreviousData:w,isRefetchError:C&&h.dataUpdatedAt!==0,isStale:Al(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,ri(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 c=new Set(s!=null?s:this.trackedProps);return this.options.useErrorBoundary&&c.add("error"),Object.keys(this.currentResult).some(u=>{const p=u;return this.currentResult[p]!==r[p]&&c.has(p)})};(t==null?void 0:t.listeners)!==!1&&i()&&(o.listeners=!0),this.notify(q(q({},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"&&!Vo(t.error)&&(r.onError=!0),this.updateResult(r),this.hasListeners()&&this.updateTimers()}notify(t){ke.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,c,u;(a=(s=this.options).onError)==null||a.call(s,this.currentResult.error),(c=(u=this.options).onSettled)==null||c.call(u,void 0,this.currentResult.error)}t.listeners&&this.listeners.forEach(({listener:p})=>{p(this.currentResult)}),t.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function H7(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function gd(e,t){return H7(e,t)||e.state.dataUpdatedAt>0&&us(e,t,t.refetchOnMount)}function us(e,t,r){if(t.enabled!==!1){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&Al(e,t)}return!1}function vd(e,t,r,n){return r.enabled!==!1&&(e!==t||n.enabled===!1)&&(!r.suspense||e.state.status!=="error")&&Al(e,r)}function Al(e,t){return e.isStaleByTime(t.staleTime)}function B7(e,t,r){return r.keepPreviousData?!1:r.placeholderData!==void 0?t.isPlaceholderData:!ri(e.getCurrentResult(),t)}var ds={exports:{}},wa={};/**
256
256
  * @license React
257
257
  * use-sync-external-store-shim.production.min.js
258
258
  *
@@ -260,7 +260,7 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStat
260
260
  *
261
261
  * This source code is licensed under the MIT license found in the
262
262
  * LICENSE file in the root directory of this source tree.
263
- */var yd;function jA(){if(yd)return wa;yd=1;var e=F;function t(h,d){return h===d&&(h!==0||1/h===1/d)||h!==h&&d!==d}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,o=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function s(h,d){var m=d(),g=n({inst:{value:m,getSnapshot:d}}),v=g[0].inst,y=g[1];return i(function(){v.value=m,v.getSnapshot=d,c(v)&&y({inst:v})},[h,m,d]),o(function(){return c(v)&&y({inst:v}),h(function(){c(v)&&y({inst:v})})},[h]),a(m),m}function c(h){var d=h.getSnapshot;h=h.value;try{var m=d();return!r(h,m)}catch(g){return!0}}function u(h,d){return d()}var p=typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"?u:s;return wa.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,wa}var Ca={};/**
263
+ */var yd;function j7(){if(yd)return wa;yd=1;var e=F;function t(h,d){return h===d&&(h!==0||1/h===1/d)||h!==h&&d!==d}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,o=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function s(h,d){var m=d(),g=n({inst:{value:m,getSnapshot:d}}),v=g[0].inst,y=g[1];return i(function(){v.value=m,v.getSnapshot=d,c(v)&&y({inst:v})},[h,m,d]),o(function(){return c(v)&&y({inst:v}),h(function(){c(v)&&y({inst:v})})},[h]),a(m),m}function c(h){var d=h.getSnapshot;h=h.value;try{var m=d();return!r(h,m)}catch(g){return!0}}function u(h,d){return d()}var p=typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"?u:s;return wa.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,wa}var Ca={};/**
264
264
  * @license React
265
265
  * use-sync-external-store-shim.development.js
266
266
  *
@@ -268,4 +268,4 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStat
268
268
  *
269
269
  * This source code is licensed under the MIT license found in the
270
270
  * LICENSE file in the root directory of this source tree.
271
- */var bd;function WA(){return bd||(bd=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=F,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function r(_){{for(var x=arguments.length,b=new Array(x>1?x-1:0),C=1;C<x;C++)b[C-1]=arguments[C];n("error",_,b)}}function n(_,x,b){{var C=t.ReactDebugCurrentFrame,S=C.getStackAddendum();S!==""&&(x+="%s",b=b.concat([S]));var O=b.map(function(M){return String(M)});O.unshift("Warning: "+x),Function.prototype.apply.call(console[_],console,O)}}function o(_,x){return _===x&&(_!==0||1/_===1/x)||_!==_&&x!==x}var i=typeof Object.is=="function"?Object.is:o,a=e.useState,s=e.useEffect,c=e.useLayoutEffect,u=e.useDebugValue,p=!1,h=!1;function d(_,x,b){p||e.startTransition!==void 0&&(p=!0,r("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var C=x();if(!h){var S=x();i(C,S)||(r("The result of getSnapshot should be cached to avoid an infinite loop"),h=!0)}var O=a({inst:{value:C,getSnapshot:x}}),M=O[0].inst,D=O[1];return c(function(){M.value=C,M.getSnapshot=x,m(M)&&D({inst:M})},[_,C,x]),s(function(){m(M)&&D({inst:M});var R=function(){m(M)&&D({inst:M})};return _(R)},[_]),u(C),C}function m(_){var x=_.getSnapshot,b=_.value;try{var C=x();return!i(b,C)}catch(S){return!0}}function g(_,x,b){return x()}var v=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined",y=!v,w=y?g:d,T=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:w;Ca.useSyncExternalStore=T,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Ca}process.env.NODE_ENV==="production"?ds.exports=jA():ds.exports=WA();var zA=ds.exports;const sm=zA.useSyncExternalStore,_d=W.createContext(void 0),lm=W.createContext(!1);function cm(e,t){return e||(t&&typeof window!="undefined"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=_d),window.ReactQueryClientContext):_d)}const um=({context:e}={})=>{const t=W.useContext(cm(e,W.useContext(lm)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},VA=({client:e,children:t,context:r,contextSharing:n=!1})=>{W.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),process.env.NODE_ENV!=="production"&&n&&e.getLogger().error("The contextSharing option has been deprecated and will be removed in the next major version");const o=cm(r,n);return W.createElement(lm.Provider,{value:!r&&n},W.createElement(o.Provider,{value:e},t))},UA=W.createContext(!1),qA=()=>W.useContext(UA);function GA(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const YA=W.createContext(GA()),KA=()=>W.useContext(YA);function dm(e,t){return typeof e=="function"?e(...t):!!e}const XA=(e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))},QA=e=>{W.useEffect(()=>{e.clearReset()},[e])},ZA=({result:e,errorResetBoundary:t,useErrorBoundary:r,query:n})=>e.isError&&!t.isReset()&&!e.isFetching&&dm(r,[e.error,n]),JA=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},eN=(e,t)=>e.isLoading&&e.isFetching&&!t,tN=(e,t,r)=>(e==null?void 0:e.suspense)&&eN(t,r),rN=(e,t,r)=>t.fetchOptimistic(e).then(({data:n})=>{e.onSuccess==null||e.onSuccess(n),e.onSettled==null||e.onSettled(n,null)}).catch(n=>{r.clearReset(),e.onError==null||e.onError(n),e.onSettled==null||e.onSettled(void 0,n)});function nN(e,t){const r=um({context:e.context}),n=qA(),o=KA(),i=r.defaultQueryOptions(e);i._optimisticResults=n?"isRestoring":"optimistic",i.onError&&(i.onError=ke.batchCalls(i.onError)),i.onSuccess&&(i.onSuccess=ke.batchCalls(i.onSuccess)),i.onSettled&&(i.onSettled=ke.batchCalls(i.onSettled)),JA(i),XA(i,o),QA(o);const[a]=W.useState(()=>new t(r,i)),s=a.getOptimisticResult(i);if(sm(W.useCallback(c=>{const u=n?()=>{}:a.subscribe(ke.batchCalls(c));return a.updateResult(),u},[a,n]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),W.useEffect(()=>{a.setOptions(i,{listeners:!1})},[i,a]),tN(i,s,n))throw rN(i,a,o);if(ZA({result:s,errorResetBoundary:o,useErrorBoundary:i.useErrorBoundary,query:a.getCurrentQuery()}))throw s.error;return i.notifyOnChangeProps?s:a.trackResult(s)}function oN(e,t,r){const n=Sn(e,t,r);return nN(n,FA)}const iN=l.newStyled("button",{target:"e14rhw2k0",label:"ClearSelectionButton"})("color:",({theme:e})=>{var t;return(t=e.chart)==null?void 0:t.textColor},";background:none;font-size:13px;border:none;height:26px;padding:0 6px 0 2px;margin:0 4px 0 4px;border-radius:4px;cursor:pointer;display:flex;align-items:center;justify-content:center;&:hover{background-color:rgba(247,247,247,1);}"),aN=l.newStyled("span",{target:"e14rhw2k1",label:"ClearSelectionText"})("color:",({theme:e})=>{var t;return(t=e.chart)==null?void 0:t.textColor},";display:inline-block;padding-top:3px;white-space:nowrap;"),sN=({onClick:e})=>{var n;const{themeSettings:t}=l.useThemeContext(),{t:r}=l.useTranslation();return l.jsxs(iN,{onClick:e,theme:t,children:[l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",children:l.jsx("path",{fill:(n=t.chart)==null?void 0:n.textColor,d:"M7.187 7l9.774 10.279A1 1 0 0 0 17 17V8a1 1 0 0 0-1-1H7.187zm9.018 10.979L6.206 7.463l.487-.415A1 1 0 0 0 6 8v9a1 1 0 0 0 1 1h9c.07 0 .139-.007.205-.021zM7 6h9a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z"})}),l.jsx(aN,{theme:t,children:r("commonFilter.clearSelectionButton")})]})};function lN(e){const t={};return{flatFilters:e.reduce((n,o)=>(l.isCascadingFilter(o)?(t[o.config.guid]||(t[o.config.guid]=[]),o.filters.forEach(i=>{t[o.config.guid].push(i),n.push(i)})):n.push(o),n),[]),cascadingToPureFiltersMap:t}}function fm(e,t,r){const n=t.filter(l.isCascadingFilter);return uN(e,n).map(i=>{if(cN(i)){const a=n.find(c=>c.config.guid===i.groupId);if(!a)throw new l.TranslatableError("errors.cascadingFilterOriginalNotFound");const s=r==null?void 0:r.shouldResetFiltersDeeperThanModified;return dN(i,a,{shouldResetFiltersDeeperThanModified:s})}return i})}function cN(e){return"groupId"in e}function uN(e,t){const r=[];return e.forEach(n=>{const o=t.find(i=>i.filters.some(a=>Nn(a)===Nn(n)));if(o){const i=o.config.guid,a=r.find(s=>"groupId"in s&&s.groupId===i);a?a.filters.push(n):r.push({groupId:i,filters:[n],previousFilters:o.filters})}else r.push(n)}),r}function dN(e,t,r){const n=r!=null&&r.shouldResetFiltersDeeperThanModified?hN(e.filters,e.previousFilters):e.filters,o=fN(n,t.config.disabled);return l.cascading(n,{guid:t.config.guid,disabled:o})}function fN(e,t){return e.some(n=>n.config.disabled!==t)?!t:t}function pN(e,t,r){const{flatFilters:n,cascadingToPureFiltersMap:o}=lN(e);return{pureFilters:n,updateFilters:a=>{const s=fm(a,e,{shouldResetFiltersDeeperThanModified:!0});t(s)},pureFiltersIgnoringRules:mN(r,o)}}function hN(e,t){const r=e.reduce((n,o,i)=>{const a=t.find(s=>Ml(s,o));return a&&!Ph(o,a)?i:n},-1);return r===-1?e:e.map((n,o)=>o>r?qi(n):n)}function mN(e,t){var r;return{all:e.all,ids:((r=e.ids)==null?void 0:r.reduce((n,o)=>{const i=t[o];return i?n.concat(i.map(a=>a.config.guid)):n.concat(o)},[]))||[]}}const xd={applyMode:Gi.HIGHLIGHT,shouldAffectFilters:!0,ignoreFilters:{all:!1,ids:[]},forceApplyBackgroundFilters:!0};function gN(e,t){return e==="table"?{applyMode:Gi.FILTER,shouldAffectFilters:!1,ignoreFilters:l.merge(xd.ignoreFilters,t.ignoreFilters||{})}:l.merge(xd,t)}function vN(e,t,r,n,o,i,a){const s={},c=gN(r,o),{pureFilters:u,updateFilters:p,pureFiltersIgnoringRules:h}=pN(e,t,c.ignoreFilters||{}),d=u.filter(_=>!_.config.disabled),m=d7(d,h),g=Dl(r,n),v=c.shouldAffectFilters&&g.length,[y,w]=bN(m,g,c.applyMode),T=c.forceApplyBackgroundFilters?lt(yN(u),y):y;if(s.filters=T,s.highlights=w,s.onDataPointsSelected=(_,x)=>{const b=[],C=td(r,n,_);if(C&&b.push(C),v){const S=zo(r,n,_),{filters:O,isSelection:M}=xa(S,u,!0),D=i(M?"commonFilter.selectMenuItem":"commonFilter.unselectMenuItem"),R=rd(D,()=>{p(lt(u,O))});b.push(R)}b.length&&(a==null||a({position:{left:x.clientX,top:x.clientY},itemSections:b}))},s.onDataPointContextMenu=(_,x)=>{const b=[],C=td(r,n,[_]);if(C&&b.push(C),v){const S=zo(r,n,[_]),{filters:O,isSelection:M}=xa(S,u,!0),D=i(M?"commonFilter.selectMenuItem":"commonFilter.unselectMenuItem"),R=rd(D,()=>{p(lt(u,O))});b.push(R)}b.length&&(a==null||a({position:{left:x.clientX,top:x.clientY},itemSections:b}))},v){s.onDataPointClick=C=>{const S=zo(r,n,[C]),{filters:O}=xa(S,u);p(lt(u,O))};const _=d.filter(C=>g==null?void 0:g.some(S=>l.isMembersFilter(C)&&ut(C.attribute,S)&&!Ol(C)&&!C.config.locked)),x=!!_.length,b=()=>{const C=_.map(qi);p(lt(u,C))};x&&(s.renderToolbar=(C,S)=>{const O=g.map(({expression:M})=>M).join(";");return l.jsxs("div",{style:{display:"flex"},children:[l.jsx(sN,{onClick:b}),S]},O)})}return s}function yN(e){return e.map(t=>{var r;return(r=t.config)==null?void 0:r.backgroundFilter}).filter(t=>!!t)}function bN(e,t,r){if(r===Gi.HIGHLIGHT){const[n,o]=ho(e,a=>t.every(s=>!ut(s,a.attribute))),i=o.filter(a=>!Ol(a));return[n,i]}return[e,[]]}function _N(e,t){const[r,n]=Pl(F.useMemo(()=>An(e),[e]),{onLocalStateChange:F.useCallback(d=>{const{filters:m,relations:g}=d;t&&t(Rn(m,g))},[t])}),{filters:o,relations:i}=r,a=F.useMemo(()=>Rn(o,i),[o,i]),s=F.useCallback(d=>{if(In(d)){const{filters:m,relations:g}=An(d);n({filters:m||[],relations:g||null})}else n({filters:d,relations:null})},[n]),c=F.useCallback(d=>{const m=lt(o,[d]);n({filters:m,relations:On(o,i,m)})},[o,i,n]),u=F.useCallback(d=>{n({filters:d,relations:On(o,i,d)})},[o,i,n]),p=F.useMemo(()=>o.some(d=>l.isCascadingFilter(d)),[o]),h=F.useCallback(d=>{if(!i)return d;const m=p?fm(d,o):d,g=On(o,i,m);return Rn(m,g)},[p,o,i]);return{regularFilters:o,addFilter:c,filtersOrFilterRelations:a,setFiltersOrFilterRelations:s,setFilters:u,applyRelationsToOtherFilters:h}}const xN=({initialFilters:e=[],openMenu:t,onBeforeMenuOpen:r,onFiltersChange:n}={})=>{const{t:o}=l.useTranslation(),{filtersOrFilterRelations:i,regularFilters:a,addFilter:s,setFiltersOrFilterRelations:c,setFilters:u,applyRelationsToOtherFilters:p}=_N(e,n),h=F.useCallback((d,m={})=>{var x,b;if(l.isTextWidgetProps(d))return d;const g=l.getInternalWidgetType(d),v=d,y=l.cloneDeep(d),T="drilldownOptions"in d&&((b=(x=d.drilldownOptions)==null?void 0:x.drilldownSelections)==null?void 0:b.length)?Zh(d.chartType,d.dataOptions,l.last(d.drilldownOptions.drilldownSelections).nextDimension):d.dataOptions,_=vN(a,u,g,T,m,o,t);return y.highlights=lt(_.highlights,v.highlights),y.onBeforeMenuOpen=r,_.onDataPointClick&&l.registerDataPointClickHandler(y,_.onDataPointClick),y.filters=p(lt(_.filters,ps(v.filters))),_.onDataPointClick&&l.registerDataPointClickHandler(y,_.onDataPointClick),_.onDataPointsSelected&&l.registerDataPointsSelectedHandler(y,_.onDataPointsSelected),_.onDataPointContextMenu&&l.registerDataPointContextMenuHandler(y,_.onDataPointContextMenu),_.renderToolbar&&l.registerRenderToolbarHandler(y,_.renderToolbar),y},[a,u,o,t,r,p]);return{filters:i,setFilters:c,addFilter:s,connectToWidgetProps:h}};exports.Backdrop=$s;exports.Button=qn;exports.ButtonBase=mr;exports.Chart=nh;exports.ChartWidget=wA;exports.CommonFiltersApplyMode=Gi;exports.ContextMenu=If;exports.DEFAULT_PIVOT_TABLE_SIZE=Jf;exports.DEFAULT_TABLE_ROWS_PER_PAGE=X0;exports.DrilldownBreadcrumbs=Ch;exports.DynamicSizeContainer=Ei;exports.ElementStates=V2;exports.ErrorBoundary=Ad;exports.ErrorBoundary$1=eh;exports.ErrorBoundaryBox=Id;exports.ExclamationMarkIcon=kd;exports.Fade=Ns;exports.I18nProvider=Ld;exports.IconButton=Wr;exports.LEGACY_DESIGN_TYPES=wn;exports.List=Os;exports.ListContext=Fn;exports.LoadingDots=gs;exports.LoadingIndicator=li;exports.LoadingOverlay=jo;exports.Menu=wi;exports.MenuIds=Gn;exports.MenuItem=Ti;exports.MenuList=Ms;exports.MenuProvider=Af;exports.Modal=Ls;exports.NoResultsOverlay=Bs;exports.PAGES_BATCH_SIZE=Q0;exports.Paper=xi;exports.Popover=lh;exports.Popper=po;exports.PropTypes=f;exports.QueryClient=LA;exports.QueryClientProvider=VA;exports.Subscribable=on;exports.TableComponent=Z0;exports.ThemeProvider=Ff;exports.Tooltip=Ui;exports.Transition=gt;exports.Typography=Ze;exports.UnknownRelationsNodeError=si;exports.WidgetContainer=ch;exports.WidgetSpaceAround=ih;exports._objectWithoutPropertiesLoose=ae;exports.alpha_1=Pe;exports.areFiltersEqual=fh;exports.asSisenseComponent=no;exports.baseUniq=Vs;exports.boxWhiskerProcessResult=s3;exports.calculateNewRelations=On;exports.camelCase=Kh;exports.capitalize=ui;exports.capitalize$1=fe;exports.chainPropTypes=Dt;exports.classNames=zn;exports.clearMembersFilter=qi;exports.cloneFilterAndToggleDisabled=fI;exports.clsx=se;exports.combineFiltersAndRelations=Rn;exports.composeClasses=De;exports.convertFilterRelationsModelToJaql=Hm;exports.convertFilterRelationsModelToRelationRules=Om;exports.convertToThemeSettings=Ed;exports.createCaseFirst=Ah;exports.createChainedFunction=Na;exports.createSvgIcon=qr;exports.createTheme=bi;exports.createUnarySpacing=ws;exports.darken_1=uf;exports.dataLoadStateReducer=is;exports.debounce=SI;exports.deepmerge=fr;exports.duration=vf;exports.elementAcceptingRef=hr;exports.elementTypeAcceptingRef=Ps;exports.exactProp=Is;exports.extendSxProp=Ts;exports.filterRelationRulesToFilterRelationsModel=Im;exports.findFilterByGuid=Am;exports.generateUtilityClass=we;exports.generateUtilityClasses=Ce;exports.getDefaultState=am;exports.getDisplayName=Jd;exports.getDrilldownMenuItems=Ih;exports.getFiltersArray=ps;exports.getHierarchyModels=Xh;exports.getLegacyPalette=Od;exports.getListItemTextUtilityClass=Xb;exports.getNonceFromMetaTag=$d;exports.getPaletteName=Sd;exports.getRelationsWithReplacedFilter=Em;exports.getSelectionTitleMenuItem=kh;exports.getTableAttributesAndMeasures=fp;exports.getThemeSettingsByOid=Rd;exports.getTransitionProps=Bn;exports.getTranslatedDataOptions=ip;exports.getValue=zr;exports.getWidgetDefaultSize=ep;exports.handleBreakpoints=Tt;exports.internal_processStyles=Gd;exports.isAttributeDescriptionNode=Lm;exports.isCloseBracketDescriptionNode=$m;exports.isFilterRelations=In;exports.isFiltersChanged=dh;exports.isHostComponent=_s;exports.isOpenBracketDescriptionNode=Nm;exports.isOperatorDescriptionNode=Fm;exports.isPlainObject=St;exports.isRelationsChanged=vI;exports.isRelationsRule=ai;exports.isRelationsRuleIdNode=ii;exports.isSameAttribute=ut;exports.isString=uh;exports.isThemeOid=Bo;exports.isTrivialSingleNodeRelations=hs;exports.lighten_1=df;exports.listItemTextClasses=Fa;exports.mergeBreakpointsInOrder=Qg;exports.mergeFilters=lt;exports.mergeFiltersOrFilterRelations=Cd;exports.notifyManager=ke;exports.ownerDocument=ze;exports.parseMutationArgs=TA;exports.partition=ho;exports.processDrilldownSelections=Sh;exports.refType=eo;exports.resolveBreakpointValues=Jg;exports.resolveProps=Yo;exports.rootShouldForwardProp=Jn;exports.shallowEqualObjects=ri;exports.shouldSkipSisenseContextWaiting=J0;exports.shouldThrowError=dm;exports.splitFiltersAndRelations=An;exports.styleFunctionSx=Zn;exports.styled=qd;exports.styled$1=le;exports.trackHook=yI;exports.translatePivotTableDataOptions=Jx;exports.translateTableDataOptions=op;exports.updateDrilldownSelections=Eh;exports.upperFirst=Nh;exports.useCommonFilters=xN;exports.useControlled=As;exports.useDefaultProps=Re;exports.useDrilldownCore=Th;exports.useEnhancedEffect=qt;exports.useEventCallback=Rt;exports.useForkRef=Ve;exports.useGetHierarchyModels=mA;exports.useHasChanged=Rl;exports.useId=Rf;exports.useMenu=gh;exports.useQuery=oN;exports.useQueryClient=um;exports.useSetError=zs;exports.useShouldLoad=mh;exports.useSyncExternalStore=sm;exports.useSyncedState=Pl;exports.useTheme=Sf;exports.useTheme$1=ro;exports.useTimeout=lr;exports.withErrorBoundary=Nd;exports.withTracking=hh;
271
+ */var bd;function W7(){return bd||(bd=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=F,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function r(_){{for(var x=arguments.length,b=new Array(x>1?x-1:0),C=1;C<x;C++)b[C-1]=arguments[C];n("error",_,b)}}function n(_,x,b){{var C=t.ReactDebugCurrentFrame,S=C.getStackAddendum();S!==""&&(x+="%s",b=b.concat([S]));var O=b.map(function(M){return String(M)});O.unshift("Warning: "+x),Function.prototype.apply.call(console[_],console,O)}}function o(_,x){return _===x&&(_!==0||1/_===1/x)||_!==_&&x!==x}var i=typeof Object.is=="function"?Object.is:o,a=e.useState,s=e.useEffect,c=e.useLayoutEffect,u=e.useDebugValue,p=!1,h=!1;function d(_,x,b){p||e.startTransition!==void 0&&(p=!0,r("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var C=x();if(!h){var S=x();i(C,S)||(r("The result of getSnapshot should be cached to avoid an infinite loop"),h=!0)}var O=a({inst:{value:C,getSnapshot:x}}),M=O[0].inst,D=O[1];return c(function(){M.value=C,M.getSnapshot=x,m(M)&&D({inst:M})},[_,C,x]),s(function(){m(M)&&D({inst:M});var R=function(){m(M)&&D({inst:M})};return _(R)},[_]),u(C),C}function m(_){var x=_.getSnapshot,b=_.value;try{var C=x();return!i(b,C)}catch(S){return!0}}function g(_,x,b){return x()}var v=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined",y=!v,w=y?g:d,T=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:w;Ca.useSyncExternalStore=T,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Ca}process.env.NODE_ENV==="production"?ds.exports=j7():ds.exports=W7();var z7=ds.exports;const sm=z7.useSyncExternalStore,_d=W.createContext(void 0),lm=W.createContext(!1);function cm(e,t){return e||(t&&typeof window!="undefined"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=_d),window.ReactQueryClientContext):_d)}const um=({context:e}={})=>{const t=W.useContext(cm(e,W.useContext(lm)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},V7=({client:e,children:t,context:r,contextSharing:n=!1})=>{W.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),process.env.NODE_ENV!=="production"&&n&&e.getLogger().error("The contextSharing option has been deprecated and will be removed in the next major version");const o=cm(r,n);return W.createElement(lm.Provider,{value:!r&&n},W.createElement(o.Provider,{value:e},t))},U7=W.createContext(!1),q7=()=>W.useContext(U7);function G7(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const Y7=W.createContext(G7()),K7=()=>W.useContext(Y7);function dm(e,t){return typeof e=="function"?e(...t):!!e}const X7=(e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))},Q7=e=>{W.useEffect(()=>{e.clearReset()},[e])},Z7=({result:e,errorResetBoundary:t,useErrorBoundary:r,query:n})=>e.isError&&!t.isReset()&&!e.isFetching&&dm(r,[e.error,n]),J7=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},eN=(e,t)=>e.isLoading&&e.isFetching&&!t,tN=(e,t,r)=>(e==null?void 0:e.suspense)&&eN(t,r),rN=(e,t,r)=>t.fetchOptimistic(e).then(({data:n})=>{e.onSuccess==null||e.onSuccess(n),e.onSettled==null||e.onSettled(n,null)}).catch(n=>{r.clearReset(),e.onError==null||e.onError(n),e.onSettled==null||e.onSettled(void 0,n)});function nN(e,t){const r=um({context:e.context}),n=q7(),o=K7(),i=r.defaultQueryOptions(e);i._optimisticResults=n?"isRestoring":"optimistic",i.onError&&(i.onError=ke.batchCalls(i.onError)),i.onSuccess&&(i.onSuccess=ke.batchCalls(i.onSuccess)),i.onSettled&&(i.onSettled=ke.batchCalls(i.onSettled)),J7(i),X7(i,o),Q7(o);const[a]=W.useState(()=>new t(r,i)),s=a.getOptimisticResult(i);if(sm(W.useCallback(c=>{const u=n?()=>{}:a.subscribe(ke.batchCalls(c));return a.updateResult(),u},[a,n]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),W.useEffect(()=>{a.setOptions(i,{listeners:!1})},[i,a]),tN(i,s,n))throw rN(i,a,o);if(Z7({result:s,errorResetBoundary:o,useErrorBoundary:i.useErrorBoundary,query:a.getCurrentQuery()}))throw s.error;return i.notifyOnChangeProps?s:a.trackResult(s)}function oN(e,t,r){const n=Sn(e,t,r);return nN(n,F7)}const iN=l.newStyled("button",{target:"e14rhw2k0",label:"ClearSelectionButton"})("color:",({theme:e})=>{var t;return(t=e.chart)==null?void 0:t.textColor},";background:none;font-size:13px;border:none;height:26px;padding:0 6px 0 2px;margin:0 4px 0 4px;border-radius:4px;cursor:pointer;display:flex;align-items:center;justify-content:center;&:hover{background-color:rgba(247,247,247,1);}"),aN=l.newStyled("span",{target:"e14rhw2k1",label:"ClearSelectionText"})("color:",({theme:e})=>{var t;return(t=e.chart)==null?void 0:t.textColor},";display:inline-block;padding-top:3px;white-space:nowrap;"),sN=({onClick:e})=>{var n;const{themeSettings:t}=l.useThemeContext(),{t:r}=l.useTranslation();return l.jsxs(iN,{onClick:e,theme:t,children:[l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",children:l.jsx("path",{fill:(n=t.chart)==null?void 0:n.textColor,d:"M7.187 7l9.774 10.279A1 1 0 0 0 17 17V8a1 1 0 0 0-1-1H7.187zm9.018 10.979L6.206 7.463l.487-.415A1 1 0 0 0 6 8v9a1 1 0 0 0 1 1h9c.07 0 .139-.007.205-.021zM7 6h9a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z"})}),l.jsx(aN,{theme:t,children:r("commonFilter.clearSelectionButton")})]})};function lN(e){const t={};return{flatFilters:e.reduce((n,o)=>(l.isCascadingFilter(o)?(t[o.config.guid]||(t[o.config.guid]=[]),o.filters.forEach(i=>{t[o.config.guid].push(i),n.push(i)})):n.push(o),n),[]),cascadingToPureFiltersMap:t}}function fm(e,t,r){const n=t.filter(l.isCascadingFilter);return uN(e,n).map(i=>{if(cN(i)){const a=n.find(c=>c.config.guid===i.groupId);if(!a)throw new l.TranslatableError("errors.cascadingFilterOriginalNotFound");const s=r==null?void 0:r.shouldResetFiltersDeeperThanModified;return dN(i,a,{shouldResetFiltersDeeperThanModified:s})}return i})}function cN(e){return"groupId"in e}function uN(e,t){const r=[];return e.forEach(n=>{const o=t.find(i=>i.filters.some(a=>Nn(a)===Nn(n)));if(o){const i=o.config.guid,a=r.find(s=>"groupId"in s&&s.groupId===i);a?a.filters.push(n):r.push({groupId:i,filters:[n],previousFilters:o.filters})}else r.push(n)}),r}function dN(e,t,r){const n=r!=null&&r.shouldResetFiltersDeeperThanModified?hN(e.filters,e.previousFilters):e.filters,o=fN(n,t.config.disabled);return l.cascading(n,{guid:t.config.guid,disabled:o})}function fN(e,t){return e.some(n=>n.config.disabled!==t)?!t:t}function pN(e,t,r){const{flatFilters:n,cascadingToPureFiltersMap:o}=lN(e);return{pureFilters:n,updateFilters:a=>{const s=fm(a,e,{shouldResetFiltersDeeperThanModified:!0});t(s)},pureFiltersIgnoringRules:mN(r,o)}}function hN(e,t){const r=e.reduce((n,o,i)=>{const a=t.find(s=>Ml(s,o));return a&&!Ph(o,a)?i:n},-1);return r===-1?e:e.map((n,o)=>o>r?qi(n):n)}function mN(e,t){var r;return{all:e.all,ids:((r=e.ids)==null?void 0:r.reduce((n,o)=>{const i=t[o];return i?n.concat(i.map(a=>a.config.guid)):n.concat(o)},[]))||[]}}const xd={applyMode:Gi.HIGHLIGHT,shouldAffectFilters:!0,ignoreFilters:{all:!1,ids:[]},forceApplyBackgroundFilters:!0};function gN(e,t){return e==="table"?{applyMode:Gi.FILTER,shouldAffectFilters:!1,ignoreFilters:l.merge(xd.ignoreFilters,t.ignoreFilters||{})}:l.merge(xd,t)}function vN(e,t,r,n,o,i,a){const s={},c=gN(r,o),{pureFilters:u,updateFilters:p,pureFiltersIgnoringRules:h}=pN(e,t,c.ignoreFilters||{}),d=u.filter(_=>!_.config.disabled),m=dA(d,h),g=Dl(r,n),v=c.shouldAffectFilters&&g.length,[y,w]=bN(m,g,c.applyMode),T=c.forceApplyBackgroundFilters?lt(yN(u),y):y;if(s.filters=T,s.highlights=w,s.onDataPointsSelected=(_,x)=>{const b=[],C=td(r,n,_);if(C&&b.push(C),v){const S=zo(r,n,_),{filters:O,isSelection:M}=xa(S,u,!0),D=i(M?"commonFilter.selectMenuItem":"commonFilter.unselectMenuItem"),R=rd(D,()=>{p(lt(u,O))});b.push(R)}b.length&&(a==null||a({position:{left:x.clientX,top:x.clientY},itemSections:b}))},s.onDataPointContextMenu=(_,x)=>{const b=[],C=td(r,n,[_]);if(C&&b.push(C),v){const S=zo(r,n,[_]),{filters:O,isSelection:M}=xa(S,u,!0),D=i(M?"commonFilter.selectMenuItem":"commonFilter.unselectMenuItem"),R=rd(D,()=>{p(lt(u,O))});b.push(R)}b.length&&(a==null||a({position:{left:x.clientX,top:x.clientY},itemSections:b}))},v){s.onDataPointClick=C=>{const S=zo(r,n,[C]),{filters:O}=xa(S,u);p(lt(u,O))};const _=d.filter(C=>g==null?void 0:g.some(S=>l.isMembersFilter(C)&&ut(C.attribute,S)&&!Ol(C)&&!C.config.locked)),x=!!_.length,b=()=>{const C=_.map(qi);p(lt(u,C))};x&&(s.renderToolbar=(C,S)=>{const O=g.map(({expression:M})=>M).join(";");return l.jsxs("div",{style:{display:"flex"},children:[l.jsx(sN,{onClick:b}),S]},O)})}return s}function yN(e){return e.map(t=>{var r;return(r=t.config)==null?void 0:r.backgroundFilter}).filter(t=>!!t)}function bN(e,t,r){if(r===Gi.HIGHLIGHT){const[n,o]=ho(e,a=>t.every(s=>!ut(s,a.attribute))),i=o.filter(a=>!Ol(a));return[n,i]}return[e,[]]}function _N(e,t){const[r,n]=Pl(F.useMemo(()=>An(e),[e]),{onLocalStateChange:F.useCallback(d=>{const{filters:m,relations:g}=d;t&&t(Rn(m,g))},[t])}),{filters:o,relations:i}=r,a=F.useMemo(()=>Rn(o,i),[o,i]),s=F.useCallback(d=>{if(In(d)){const{filters:m,relations:g}=An(d);n({filters:m||[],relations:g||null})}else n({filters:d,relations:null})},[n]),c=F.useCallback(d=>{const m=lt(o,[d]);n({filters:m,relations:On(o,i,m)})},[o,i,n]),u=F.useCallback(d=>{n({filters:d,relations:On(o,i,d)})},[o,i,n]),p=F.useMemo(()=>o.some(d=>l.isCascadingFilter(d)),[o]),h=F.useCallback(d=>{if(!i)return d;const m=p?fm(d,o):d,g=On(o,i,m);return Rn(m,g)},[p,o,i]);return{regularFilters:o,addFilter:c,filtersOrFilterRelations:a,setFiltersOrFilterRelations:s,setFilters:u,applyRelationsToOtherFilters:h}}const xN=({initialFilters:e=[],openMenu:t,onBeforeMenuOpen:r,onFiltersChange:n}={})=>{const{t:o}=l.useTranslation(),{filtersOrFilterRelations:i,regularFilters:a,addFilter:s,setFiltersOrFilterRelations:c,setFilters:u,applyRelationsToOtherFilters:p}=_N(e,n),h=F.useCallback((d,m={})=>{var x,b;if(l.isTextWidgetProps(d))return d;const g=l.getInternalWidgetType(d),v=d,y=l.cloneDeep(d),T="drilldownOptions"in d&&((b=(x=d.drilldownOptions)==null?void 0:x.drilldownSelections)==null?void 0:b.length)?Zh(d.chartType,d.dataOptions,l.last(d.drilldownOptions.drilldownSelections).nextDimension):d.dataOptions,_=vN(a,u,g,T,m,o,t);return y.highlights=lt(_.highlights,v.highlights),y.onBeforeMenuOpen=r,_.onDataPointClick&&l.registerDataPointClickHandler(y,_.onDataPointClick),y.filters=p(lt(_.filters,ps(v.filters))),_.onDataPointClick&&l.registerDataPointClickHandler(y,_.onDataPointClick),_.onDataPointsSelected&&l.registerDataPointsSelectedHandler(y,_.onDataPointsSelected),_.onDataPointContextMenu&&l.registerDataPointContextMenuHandler(y,_.onDataPointContextMenu),_.renderToolbar&&l.registerRenderToolbarHandler(y,_.renderToolbar),y},[a,u,o,t,r,p]);return{filters:i,setFilters:c,addFilter:s,connectToWidgetProps:h}};exports.Backdrop=$s;exports.Button=qn;exports.ButtonBase=mr;exports.Chart=nh;exports.ChartWidget=w7;exports.CommonFiltersApplyMode=Gi;exports.ContextMenu=If;exports.DEFAULT_PIVOT_TABLE_SIZE=Jf;exports.DEFAULT_TABLE_ROWS_PER_PAGE=X0;exports.DrilldownBreadcrumbs=Ch;exports.DynamicSizeContainer=Ei;exports.ElementStates=V2;exports.ErrorBoundary=Ad;exports.ErrorBoundary$1=eh;exports.ErrorBoundaryBox=Id;exports.ExclamationMarkIcon=kd;exports.Fade=Ns;exports.I18nProvider=Ld;exports.IconButton=Wr;exports.LEGACY_DESIGN_TYPES=wn;exports.List=Os;exports.ListContext=Fn;exports.LoadingDots=gs;exports.LoadingIndicator=li;exports.LoadingOverlay=jo;exports.Menu=wi;exports.MenuIds=Gn;exports.MenuItem=Ti;exports.MenuList=Ms;exports.MenuProvider=Af;exports.Modal=Ls;exports.NoResultsOverlay=Bs;exports.PAGES_BATCH_SIZE=Q0;exports.Paper=xi;exports.Popover=lh;exports.Popper=po;exports.PropTypes=f;exports.QueryClient=L7;exports.QueryClientProvider=V7;exports.Subscribable=on;exports.TableComponent=Z0;exports.ThemeProvider=Ff;exports.Tooltip=Ui;exports.Transition=gt;exports.Typography=Ze;exports.UnknownRelationsNodeError=si;exports.WidgetContainer=ch;exports.WidgetSpaceAround=ih;exports._objectWithoutPropertiesLoose=ae;exports.alpha_1=Pe;exports.areFiltersEqual=fh;exports.asSisenseComponent=no;exports.baseUniq=Vs;exports.boxWhiskerProcessResult=s3;exports.calculateNewRelations=On;exports.camelCase=Kh;exports.capitalize=ui;exports.capitalize$1=fe;exports.chainPropTypes=Dt;exports.classNames=zn;exports.clearMembersFilter=qi;exports.cloneFilterAndToggleDisabled=fI;exports.clsx=se;exports.combineFiltersAndRelations=Rn;exports.composeClasses=De;exports.convertFilterRelationsModelToJaql=Hm;exports.convertFilterRelationsModelToRelationRules=Om;exports.convertToThemeSettings=Ed;exports.createCaseFirst=Ah;exports.createChainedFunction=Na;exports.createSvgIcon=qr;exports.createTheme=bi;exports.createUnarySpacing=ws;exports.darken_1=uf;exports.dataLoadStateReducer=is;exports.debounce=SI;exports.deepmerge=fr;exports.duration=vf;exports.elementAcceptingRef=hr;exports.elementTypeAcceptingRef=Ps;exports.exactProp=Is;exports.extendSxProp=Ts;exports.filterRelationRulesToFilterRelationsModel=Im;exports.findFilterByGuid=Am;exports.generateUtilityClass=we;exports.generateUtilityClasses=Ce;exports.getDefaultState=am;exports.getDisplayName=Jd;exports.getDrilldownMenuItems=Ih;exports.getFiltersArray=ps;exports.getHierarchyModels=Xh;exports.getLegacyPalette=Od;exports.getListItemTextUtilityClass=Xb;exports.getNonceFromMetaTag=$d;exports.getPaletteName=Sd;exports.getRelationsWithReplacedFilter=Em;exports.getSelectionTitleMenuItem=kh;exports.getTableAttributesAndMeasures=fp;exports.getThemeSettingsByOid=Rd;exports.getTransitionProps=Bn;exports.getTranslatedDataOptions=ip;exports.getValue=zr;exports.getWidgetDefaultSize=ep;exports.handleBreakpoints=Tt;exports.internal_processStyles=Gd;exports.isAttributeDescriptionNode=Lm;exports.isCloseBracketDescriptionNode=$m;exports.isFilterRelations=In;exports.isFiltersChanged=dh;exports.isHostComponent=_s;exports.isOpenBracketDescriptionNode=Nm;exports.isOperatorDescriptionNode=Fm;exports.isPlainObject=St;exports.isRelationsChanged=vI;exports.isRelationsRule=ai;exports.isRelationsRuleIdNode=ii;exports.isSameAttribute=ut;exports.isString=uh;exports.isThemeOid=Bo;exports.isTrivialSingleNodeRelations=hs;exports.lighten_1=df;exports.listItemTextClasses=Fa;exports.mergeBreakpointsInOrder=Qg;exports.mergeFilters=lt;exports.mergeFiltersOrFilterRelations=Cd;exports.notifyManager=ke;exports.ownerDocument=ze;exports.parseMutationArgs=T7;exports.partition=ho;exports.processDrilldownSelections=Sh;exports.refType=eo;exports.resolveBreakpointValues=Jg;exports.resolveProps=Yo;exports.rootShouldForwardProp=Jn;exports.shallowEqualObjects=ri;exports.shouldSkipSisenseContextWaiting=J0;exports.shouldThrowError=dm;exports.splitFiltersAndRelations=An;exports.styleFunctionSx=Zn;exports.styled=qd;exports.styled$1=le;exports.trackHook=yI;exports.translatePivotTableDataOptions=Jx;exports.translateTableDataOptions=op;exports.updateDrilldownSelections=Eh;exports.upperFirst=Nh;exports.useCommonFilters=xN;exports.useControlled=As;exports.useDefaultProps=Re;exports.useDrilldownCore=Th;exports.useEnhancedEffect=qt;exports.useEventCallback=Rt;exports.useForkRef=Ve;exports.useGetHierarchyModels=m7;exports.useHasChanged=Rl;exports.useId=Rf;exports.useMenu=gh;exports.useQuery=oN;exports.useQueryClient=um;exports.useSetError=zs;exports.useShouldLoad=mh;exports.useSyncExternalStore=sm;exports.useSyncedState=Pl;exports.useTheme=Sf;exports.useTheme$1=ro;exports.useTimeout=lr;exports.withErrorBoundary=Nd;exports.withTracking=hh;