(globalThis.webpackChunksuperset=globalThis.webpackChunksuperset||[]).push([[435],{88274:(t,e,r)=>{"use strict";r.d(e,{Z:()=>F});var o=r(5872),n=r.n(o),i=r(67294),s=r(47859),a=r(86170),l=r(22222),c=r(80644),u=r(54085),d=r(74464),h=r(9330),p=r(89453),m=r(11965);function f(t){return t}const g=()=>null,y={id:"",className:"",preTransformProps:f,overrideTransformProps:void 0,postTransformProps:f,onRenderSuccess(){},onRenderFailure(){}},v=new h.Z;class Z extends i.PureComponent{constructor(...t){super(...t),this.container=void 0,this.processChartProps=(0,l.P1)((t=>t.chartProps),(t=>t.preTransformProps),(t=>t.transformProps),(t=>t.postTransformProps),((t,e=f,r=f,o=f)=>o(r(e(t))))),this.createLoadableRenderer=(0,l.P1)((t=>t.chartType),(t=>t.overrideTransformProps),((t,e)=>{if(t){const r=(0,p.Z)({loader:{Chart:()=>(0,u.Z)().getAsPromise(t),transformProps:e?()=>Promise.resolve(e):()=>(0,d.Z)().getAsPromise(t)},loading:e=>this.renderLoading(e,t),render:this.renderChart});return r.preload(),r}return g})),this.renderChart=(t,e)=>{const{Chart:r,transformProps:o}=t,{chartProps:n,preTransformProps:i,postTransformProps:s}=e;return(0,m.tZ)(r,this.processChartProps({chartProps:n,preTransformProps:i,transformProps:o,postTransformProps:s}))},this.renderLoading=(t,e)=>{const{error:r}=t;return r?(0,m.tZ)("div",{className:"alert alert-warning",role:"alert"},(0,m.tZ)("strong",null,"ERROR")," ",(0,m.tZ)("code",null,'chartType="',e,'"')," —",r.toString()):null},this.setRef=t=>{this.container=t}}render(){const{id:t,className:e,preTransformProps:r,postTransformProps:o,chartProps:i=v,onRenderSuccess:s,onRenderFailure:a}=this.props,l=this.createLoadableRenderer(this.props);if(null===i)return null;const c={};return t&&(c.id=t),e&&(c.className=e),(0,m.tZ)("div",n()({},c,{ref:this.setRef}),(0,m.tZ)(l,{preTransformProps:r,postTransformProps:o,chartProps:i,onRenderSuccess:s,onRenderFailure:a}))}}Z.defaultProps=y;const D={backgroundColor:"#000",color:"#fff",overflow:"auto",padding:32};var P=r(51995),C=r(61988);const _={maxWidth:800},R=P.iK.div`
  ${({theme:t,width:e,height:r})=>m.iv`
    align-items: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    height: ${r}px;
    width: ${e}px;
    padding: ${4*t.gridUnit}px;

    & .no-results-title {
      font-size: ${t.typography.sizes.l}px;
      font-weight: ${t.typography.weights.bold};
      padding-bottom: ${2*t.gridUnit};
    }

    & .no-results-body {
      font-size: ${t.typography.sizes.m}px;
    }
  `}
`,T=({className:t,height:e,id:r,width:o})=>{const n="string"==typeof o||o>250,i=(0,C.t)("No results were returned for this query. If you expected results to be returned, ensure any filters are configured properly and the datasource contains data for the selected time range.");return(0,m.tZ)(R,{height:e,width:o,className:t,id:r,title:n?void 0:i},(0,m.tZ)("div",{style:_},(0,m.tZ)("div",{className:"no-results-title"},(0,C.t)("No Results")),n&&(0,m.tZ)("div",{className:"no-results-body"},i)))},S={FallbackComponent:function({componentStack:t,error:e,height:r,width:o}){return(0,m.tZ)("div",{style:{...D,height:r,width:o}},(0,m.tZ)("div",null,(0,m.tZ)("div",null,(0,m.tZ)("b",null,"Oops! An error occured!")),(0,m.tZ)("code",null,e?e.toString():"Unknown Error")),t&&(0,m.tZ)("div",null,(0,m.tZ)("b",null,"Stack Trace:"),(0,m.tZ)("code",null,t.split("\n").map((t=>(0,m.tZ)("div",{key:t},t))))))},height:400,width:"100%",enableNoResults:!0};class F extends i.PureComponent{constructor(...t){super(...t),this.core=void 0,this.createChartProps=h.Z.createSelector(),this.parseDimension=(0,l.P1)((({width:t})=>t),(({height:t})=>t),((t,e)=>{const r=(0,c.Z)(t),o=(0,c.Z)(e),n={height:o.isDynamic?100*o.multiplier+"%":o.value,width:r.isDynamic?100*r.multiplier+"%":r.value};return{BoundingBox:r.isDynamic&&o.isDynamic&&1===r.multiplier&&1===o.multiplier?i.Fragment:({children:t})=>(0,m.tZ)("div",{style:n},t),heightInfo:o,widthInfo:r}})),this.setRef=t=>{this.core=t}}renderChart(t,e){const{id:r,className:o,chartType:i,preTransformProps:a,overrideTransformProps:l,postTransformProps:c,onRenderSuccess:u,onRenderFailure:d,disableErrorBoundary:h,FallbackComponent:p,onErrorBoundary:f,Wrapper:g,queriesData:y,enableNoResults:v,noResults:D,...P}=this.props,C=this.createChartProps({...P,queriesData:y,height:e,width:t});let _;if(!v||y&&!y.every((({data:t})=>!t||Array.isArray(t)&&0===t.length))){const n=(0,m.tZ)(Z,{ref:this.setRef,id:r,className:o,chartType:i,chartProps:C,preTransformProps:a,overrideTransformProps:l,postTransformProps:c,onRenderSuccess:u,onRenderFailure:d});_=g?(0,m.tZ)(g,{width:t,height:e},n):n}else _=D||(0,m.tZ)(T,{id:r,className:o,height:e,width:t});return!0===h?_:(0,m.tZ)(s.ZP,{FallbackComponent:r=>(0,m.tZ)(p,n()({width:t,height:e},r)),onError:f},_)}render(){const{heightInfo:t,widthInfo:e,BoundingBox:r}=this.parseDimension(this.props);if(e.isDynamic||t.isDynamic){const{debounceTime:o}=this.props;return(0,m.tZ)(r,null,(0,m.tZ)(a.Z,{debounceTime:o},(({width:r,height:o})=>this.renderChart(e.isDynamic?Math.floor(r):e.value,t.isDynamic?Math.floor(o):t.value))))}return this.renderChart(e.value,t.value)}}F.defaultProps=S},89453:(t,e,r)=>{"use strict";r.d(e,{Z:()=>s});var o=r(68356),n=r.n(o);const i={onRenderFailure(){},onRenderSuccess(){}};function s(t){const e=n().Map(t);class r extends e{componentDidMount(){this.afterRender()}componentDidUpdate(){this.afterRender()}afterRender(){const{loaded:t,loading:e,error:r}=this.state,{onRenderFailure:o,onRenderSuccess:n}=this.props;e||(r?o(r):t&&Object.keys(t).length>0&&n())}}return r.defaultProps=void 0,r.defaultProps=i,r.preload=e.preload,r}},43323:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var o=r(67294),n=r(11965);function i(t,e){class r extends o.Component{constructor(t){super(t),this.container=void 0,this.setContainerRef=this.setContainerRef.bind(this)}componentDidMount(){this.execute()}componentDidUpdate(){this.execute()}componentWillUnmount(){this.container=void 0,null!=e&&e.componentWillUnmount&&e.componentWillUnmount.bind(this)()}setContainerRef(t){this.container=t}execute(){this.container&&t(this.container,this.props)}render(){const{id:t,className:e}=this.props;return(0,n.tZ)("div",{ref:this.setContainerRef,id:t,className:e})}}const i=r;return t.displayName&&(i.displayName=t.displayName),t.propTypes&&(i.propTypes={...i.propTypes,...t.propTypes}),t.defaultProps&&(i.defaultProps=t.defaultProps),r}},9330:(t,e,r)=>{"use strict";r.d(e,{Z:()=>a});var o=r(22222),n=r(78036);const i=800,s=600;class a{constructor(t={}){this.annotationData=void 0,this.datasource=void 0,this.rawDatasource=void 0,this.initialValues=void 0,this.formData=void 0,this.rawFormData=void 0,this.height=void 0,this.hooks=void 0,this.ownState=void 0,this.filterState=void 0,this.queriesData=void 0,this.width=void 0,this.behaviors=void 0,this.appSection=void 0,this.isRefreshing=void 0,this.inputRef=void 0;const{annotationData:e={},datasource:r={},formData:o={},hooks:a={},ownState:l={},filterState:c={},initialValues:u={},queriesData:d=[],behaviors:h=[],width:p=i,height:m=s,appSection:f,isRefreshing:g,inputRef:y}=t;this.width=p,this.height=m,this.annotationData=e,this.datasource=(0,n.Z)(r),this.rawDatasource=r,this.formData=(0,n.Z)(o),this.rawFormData=o,this.hooks=a,this.initialValues=u,this.queriesData=d,this.ownState=l,this.filterState=c,this.behaviors=h,this.appSection=f,this.isRefreshing=g,this.inputRef=y}}a.createSelector=void 0,a.createSelector=function(){return(0,o.P1)((t=>t.annotationData),(t=>t.datasource),(t=>t.formData),(t=>t.height),(t=>t.hooks),(t=>t.initialValues),(t=>t.queriesData),(t=>t.width),(t=>t.ownState),(t=>t.filterState),(t=>t.behaviors),(t=>t.appSection),(t=>t.isRefreshing),(t=>t.inputRef),((t,e,r,o,n,i,s,l,c,u,d,h,p,m)=>new a({annotationData:t,datasource:e,formData:r,height:o,hooks:n,initialValues:i,queriesData:s,ownState:c,filterState:u,width:l,behaviors:d,appSection:h,isRefreshing:p,inputRef:m})))}},67869:(t,e,r)=>{"use strict";r.d(e,{E8:()=>C,CW:()=>d.Z,kI:()=>o,A5:()=>n.Z,Gz:()=>h.Z,Ys:()=>p.Z,$5:()=>m.Z,Dg:()=>f.Z,XF:()=>g.Z,gE:()=>i.Z,yE:()=>y.Z,eL:()=>a.Z,zR:()=>u.Z,UM:()=>v.Z,Bs:()=>Z.Z,T8:()=>c.Z,Xs:()=>P.X,B_:()=>s.Z,Qg:()=>D.Q,j3:()=>l.Z,l:()=>P.Z});var o=r(28062),n=r(97466),i=r(15226),s=r(81545),a=r(58586),l=r(45511),c=r(2995),u=r(98195),d=r(27965),h=r(86698),p=r(69224),m=r(77781),f=r(64236),g=r(65445),y=r(36361),v=r(132),Z=r(31225),D=r(25130),P=r(78161);const C="#00A699"},25130:(t,e,r)=>{"use strict";r.d(e,{Q:()=>n});const o=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/;function n(t,e=186){let r=0,n=0,i=0;if(t.length>7){const e=o.exec(t);if(!e)throw new Error(`Invalid color: ${t}`);r=parseInt(e[1],10),n=parseInt(e[2],10),i=parseInt(e[3],10)}else{let e=t;if(e.startsWith("#")&&(e=e.substring(1)),3===e.length&&(e=[e[0],e[0],e[1],e[1],e[2],e[2]].join("")),6!==e.length)throw new Error(`Invalid color: ${t}`);r=parseInt(e.slice(0,2),16),n=parseInt(e.slice(2,4),16),i=parseInt(e.slice(4,6),16)}return.299*r+.587*n+.114*i>e?"#000":"#FFF"}},811:(t,e,r)=>{"use strict";var o,n;function i(t){return t.type===o.NATIVE_FILTER}function s(t){return t.type===o.DIVIDER}r.d(e,{BE:()=>o,gT:()=>n,kI:()=>i,nY:()=>s}),function(t){t.NATIVE_FILTER="NATIVE_FILTER",t.DIVIDER="DIVIDER"}(o||(o={})),function(t){t.NativeFilters="nativeFilters",t.CrossFilters="crossFilters"}(n||(n={}))},8608:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var o=r(62761);function n(t,e,r){let o=t,n=e(o);for(;!r(n);)o-=1,n=e(o);return o}function i(t){const{idealFontSize:e,maxWidth:r,maxHeight:i,style:s,...a}=t;let l;if(null!=e)l=e;else{if(null==i)throw new Error("You must specify at least one of maxHeight or idealFontSize");l=Math.floor(i)}function c(t){return(0,o.Z)({...a,style:{...s,fontSize:`${t}px`}})}return null!=r&&(l=n(l,c,(t=>t.width<=r))),null!=i&&(l=n(l,c,(t=>t.height<=i))),l}},62761:(t,e,r)=>{"use strict";r.d(e,{Z:()=>s});var o=r(10660),n=r(61888),i=r(91572);function s(t,e){const{text:r,className:s,style:a,container:l}=t;if(0===r.length)return{height:0,width:0};const c=i.Y.createInContainer(l),u=i.S.createInContainer(c);(0,o.Z)(u,{className:s,style:a,text:r});const d=(0,n.Z)(u,e);return setTimeout((()=>{i.S.removeFromContainer(c),i.Y.removeFromContainer(l)}),500),d}},80644:(t,e,r)=>{"use strict";r.d(e,{Z:()=>n});const o={isDynamic:!0,multiplier:1};function n(t){return"auto"===t||"100%"===t?o:"string"==typeof t&&t.length>0&&"%"===t[t.length-1]?{isDynamic:!0,multiplier:parseFloat(t)/100}:{isDynamic:!1,value:"number"==typeof t?t:parseFloat(t)}}},4470:(t,e,r)=>{"use strict";r.d(e,{Z:()=>o});class o{constructor(t){this.activeNodes=new Map,this.factoryFn=void 0,this.factoryFn=t}createInContainer(t=document.body){if(this.activeNodes.has(t)){const e=this.activeNodes.get(t);return e.counter+=1,e.node}const e=this.factoryFn();return t.append(e),this.activeNodes.set(t,{counter:1,node:e}),e}removeFromContainer(t=document.body){if(this.activeNodes.has(t)){const e=this.activeNodes.get(t);e.counter-=1,0===e.counter&&(t.removeChild(e.node),this.activeNodes.delete(t))}}}},48691:(t,e,r)=>{"use strict";r.d(e,{h:()=>o});const o="http://www.w3.org/2000/svg"},24313:(t,e,r)=>{"use strict";r.d(e,{Z:()=>n});var o=r(48691);function n(){const t=document.createElementNS(o.h,"svg");return t.style.position="absolute",t.style.top="-100%",t.style.left="-100%",t.style.width="0",t.style.height="0",t.style.opacity="0",t.style.pointerEvents="none",t}},48e3:(t,e,r)=>{"use strict";r.d(e,{Z:()=>n});var o=r(48691);function n(){return document.createElementNS(o.h,"text")}},91572:(t,e,r)=>{"use strict";r.d(e,{Y:()=>s,S:()=>a});var o=r(4470),n=r(24313),i=r(48e3);const s=new o.Z(n.Z),a=new o.Z(i.Z)},61888:(t,e,r)=>{"use strict";r.d(e,{Z:()=>n});const o={height:20,width:100};function n(t,e=o){const{width:r,height:n}=t.getBBox?t.getBBox():e;return{height:Math.ceil(n),width:Math.ceil(r)}}},10660:(t,e,r)=>{"use strict";r.d(e,{Z:()=>n});const o=["font","fontWeight","fontStyle","fontSize","fontFamily","letterSpacing"];function n(t,{className:e,style:r={},text:n}={}){const i=t;return i.textContent!==n&&(i.textContent=void 0===n?null:n),i.getAttribute("class")!==e&&i.setAttribute("class",null!=e?e:""),i.style.removeProperty("font"),i.style.removeProperty("font-weight"),i.style.removeProperty("font-style"),i.style.removeProperty("font-size"),i.style.removeProperty("font-family"),i.style.removeProperty("letter-spacing"),o.filter((t=>void 0!==r[t]&&null!==r[t])).forEach((t=>{i.style[t]=`${r[t]}`})),i}},67546:(t,e,r)=>{"use strict";r.r(e),r.d(e,{AnnotationOpacity:()=>ft.TJ,AnnotationSourceType:()=>ft.u$,AnnotationStyle:()=>ft.QW,AnnotationType:()=>ft.JJ,ApiLegacy:()=>o,ApiV1:()=>n,AppSection:()=>pe.Tr,BRAND_COLOR:()=>Wt.E8,Behavior:()=>pe.cg,CategoricalAirbnb:()=>Wt.CW,CategoricalColorNamespace:()=>Wt.kI,CategoricalColorScale:()=>Wt.A5,CategoricalD3:()=>Wt.Gz,CategoricalEcharts:()=>Wt.Ys,CategoricalGoogle:()=>Wt.$5,CategoricalLyft:()=>Wt.Dg,CategoricalPreset:()=>Wt.XF,CategoricalScheme:()=>Wt.gE,CategoricalSuperset:()=>Wt.yE,ChartClient:()=>te,ChartDataProvider:()=>he,ChartFrame:()=>ve,ChartLabel:()=>pe.Df,ChartMetadata:()=>ee.Z,ChartPlugin:()=>re.Z,ChartProps:()=>oe.Z,ColorScheme:()=>Wt.eL,ColorSchemeRegistry:()=>Wt.zR,ComparisionType:()=>A.pF,DTTM_ALIAS:()=>st.W3,DataMaskType:()=>X.gT,DatasourceKey:()=>pt.Z,DatasourceType:()=>_.i,EXTRA_FORM_DATA_APPEND_KEYS:()=>st.Ci,EXTRA_FORM_DATA_OVERRIDE_EXTRA_KEYS:()=>st.fn,EXTRA_FORM_DATA_OVERRIDE_KEYS:()=>st.Ay,EXTRA_FORM_DATA_OVERRIDE_REGULAR_KEYS:()=>st.NU,EXTRA_FORM_DATA_OVERRIDE_REGULAR_MAPPINGS:()=>st.gn,EmotionCacheProvider:()=>zt.zo,ExtensibleFunction:()=>i.Z,FAST_DEBOUNCE:()=>xe.o,FeatureFlag:()=>P.T,GenericDataType:()=>x.Z,LOCAL_PREFIX:()=>St.D,NativeFilterType:()=>X.BE,NumberFormats:()=>yt.Z,NumberFormatter:()=>vt.Z,NumberFormatterRegistry:()=>Dt.Z,OverwritePolicy:()=>l.r,PREVIEW_TIME:()=>Ft.F,PREVIEW_VALUE:()=>vt.G,PandasAxis:()=>v,Plugin:()=>s.Z,Preset:()=>a.Z,QueryMode:()=>w.nJ,Registry:()=>l.Z,RegistryWithDefaultKey:()=>c.Z,RollingType:()=>A.su,SLOW_DEBOUNCE:()=>xe.M,SafeMarkdown:()=>Ae.Z,SequentialCommon:()=>Wt.UM,SequentialD3:()=>Wt.Bs,SequentialScheme:()=>Wt.T8,SharedLabelColor:()=>Wt.Xs,SuperChart:()=>se.Z,SupersetApiError:()=>gt.P,SupersetApiErrorType:()=>gt.M,SupersetClient:()=>Y.Z,SupersetClientClass:()=>K.Z,ThemeProvider:()=>zt.f6,TimeFormats:()=>St.Z,TimeFormatter:()=>Ft.Z,TimeGranularity:()=>It.A,TooltipFrame:()=>Se,TooltipTable:()=>we,WithLegend:()=>_e,__hack_reexport_AdvancedAnalytics:()=>A.ZP,__hack_reexport_Column:()=>R.ZP,__hack_reexport_Datasource:()=>_.Z,__hack_reexport_Metric:()=>S.Z,__hack_reexport_Query:()=>j,__hack_reexport_QueryFormData:()=>w.ZP,__hack_reexport_QueryResponse:()=>x.C,__hack_reexport_Time:()=>V,__hack_reexport_chart_Base:()=>pe.ZP,__hack_reexport_chart_QueryResponse:()=>fe,__hack_reexport_chart_TransformFunction:()=>me,__hack_reexport_connection:()=>G,__hack_reexport_dimension:()=>Ut,__hack_reexport_jed:()=>W,__hack_reexport_trasnslation:()=>z,addLocaleData:()=>U.oK,addTranslation:()=>U.Zt,addTranslations:()=>U.hk,buildQueryContext:()=>at.Z,buildQueryObject:()=>lt.Z,callApi:()=>Q.Z,chartLabelExplanations:()=>pe.t$,chartLabelWeight:()=>pe.eH,computeMaxFontSize:()=>Bt.Z,configure:()=>U.jQ,convertFilter:()=>ct.Z,convertKeysToCamelCase:()=>u.Z,createD3NumberFormatter:()=>Pt.Z,createD3TimeFormatter:()=>xt.Z,createDurationFormatter:()=>Ct.Z,createEmotionCache:()=>zt.S9,createLoadableRenderer:()=>ne.Z,createMultiFormatter:()=>At.Z,createSiAtMostNDigitFormatter:()=>Rt,createSmartNumberFormatter:()=>Tt.Z,css:()=>zt.iv,defineSharedModule:()=>J.vO,defineSharedModules:()=>J.YW,emotionCache:()=>zt.Yi,ensureIsArray:()=>d.Z,ensureIsInt:()=>h.Z,evalExpression:()=>be.f,extractTimegrain:()=>ut.Z,formatNumber:()=>Zt.uf,formatTime:()=>wt.mr,formatTimeRange:()=>wt.ns,getCategoricalSchemeRegistry:()=>Wt.B_,getChartBuildQueryRegistry:()=>Jt.Z,getChartComponentRegistry:()=>ae.Z,getChartControlPanelRegistry:()=>le.Z,getChartMetadataRegistry:()=>Ht.Z,getChartTransformPropsRegistry:()=>ce.Z,getColumnLabel:()=>dt.Z,getContrastingColor:()=>Wt.Qg,getMetricLabel:()=>ht.Z,getMultipleTextDimensions:()=>$t,getNumberFormatter:()=>Zt.JB,getNumberFormatterRegistry:()=>Zt.ZP,getSequentialSchemeRegistry:()=>Wt.j3,getSharedLabelColor:()=>Wt.l,getTextDimension:()=>kt.Z,getTimeFormatter:()=>wt.bt,getTimeFormatterForGranularity:()=>wt.uh,getTimeFormatterRegistry:()=>wt.ZP,getTimeRangeFormatter:()=>wt.Rg,isAdhocColumn:()=>R.GA,isAdhocMetricSimple:()=>S.n,isBinaryAdhocFilter:()=>T.kC,isBinaryOperator:()=>F.VU,isDefined:()=>p.Z,isDruidFormData:()=>w.zU,isEqualArray:()=>f.Z,isEventAnnotationLayer:()=>ft.pD,isFeatureEnabled:()=>P.c,isFilterDivider:()=>X.nY,isFormulaAnnotationLayer:()=>ft.x5,isIntervalAnnotationLayer:()=>ft.Ry,isNativeFilter:()=>X.kI,isPhysicalColumn:()=>R.s9,isPostProcessingAggregation:()=>b,isPostProcessingBoxplot:()=>E,isPostProcessingCompare:()=>$,isPostProcessingContribution:()=>N,isPostProcessingCum:()=>O,isPostProcessingDiff:()=>M,isPostProcessingPivot:()=>I,isPostProcessingProphet:()=>k,isPostProcessingResample:()=>q,isPostProcessingRolling:()=>L,isPostProcessingSort:()=>B,isRecordAnnotationResult:()=>ft.$c,isRequired:()=>m.Z,isSavedMetric:()=>w.AG,isSetAdhocFilter:()=>T.VK,isSetOperator:()=>F.XA,isSimpleAdhocFilter:()=>T.Ki,isTableAnnotationLayer:()=>ft.mn,isTimeseriesAnnotationLayer:()=>ft.nl,isTimeseriesAnnotationResult:()=>ft.b4,isUnaryAdhocFilter:()=>T._l,isUnaryOperator:()=>F.CW,isValidExpression:()=>be.$,jsx:()=>zt.tZ,legacyValidateInteger:()=>Qt.Z,legacyValidateNumber:()=>Yt.Z,logging:()=>Z.Z,makeApi:()=>ot.Z,makeSingleton:()=>g.Z,mergeMargin:()=>jt,normalizeOrderBy:()=>mt.Z,parseLength:()=>Vt.Z,promiseTimeout:()=>y,reactify:()=>ie.Z,removeDuplicates:()=>D.Z,reset:()=>J.mc,resetTranslation:()=>U.sq,seed:()=>C.D,seedRandom:()=>C.b,smartDateDetailedFormatter:()=>Et.Z,smartDateFormatter:()=>bt.Z,smartDateVerboseFormatter:()=>Nt.Z,styled:()=>zt.iK,supersetTheme:()=>zt.K6,t:()=>U.t,tn:()=>U.tn,useTheme:()=>zt.Fg,validateInteger:()=>Kt.Z,validateNonEmpty:()=>Xt.Z,validateNumber:()=>Gt.Z,withTheme:()=>zt.Zz});var o={};r.r(o),r.d(o,{__hack_reexport_query_api_legacy:()=>rt,fetchExploreJson:()=>H,getDatasourceMetadata:()=>et,getFormData:()=>tt});var n={};r.r(n),r.d(n,{default:()=>it,getChartData:()=>nt});var i=r(54732),s=r(91189),a=r(46449),l=r(90537),c=r(29243),u=r(78036),d=r(55786),h=r(77675),p=r(37731),m=r(49714),f=r(1111),g=r(1875);function y(t,e){return new Promise((r=>{setTimeout((()=>{r(t())}),e)}))}var v,Z=r(68492),D=r(74765),P=r(93185),C=r(70406),_=r(46078),R=r(72813),T=r(46306),S=r(62446),F=r(31612),w=r(20620),x=r(88889),A=r(62363);function b(t){return"aggregation"===(null==t?void 0:t.operation)}function E(t){return"boxplot"===(null==t?void 0:t.operation)}function N(t){return"contribution"===(null==t?void 0:t.operation)}function I(t){return"pivot"===(null==t?void 0:t.operation)}function k(t){return"prophet"===(null==t?void 0:t.operation)}function M(t){return"diff"===(null==t?void 0:t.operation)}function L(t){return"rolling"===(null==t?void 0:t.operation)}function O(t){return"cum"===(null==t?void 0:t.operation)}function $(t){return"compare"===(null==t?void 0:t.operation)}function B(t){return"sort"===(null==t?void 0:t.operation)}function q(t){return"resample"===(null==t?void 0:t.operation)}!function(t){t[t.Row=0]="Row",t[t.Column=1]="Column"}(v||(v={}));const j={},V={};var U=r(61988);const W={},z={};var Q=r(97065),Y=r(31069),K=r(99619);const G={};var X=r(811),J=r(81847);async function H({client:t=Y.Z,method:e="POST",requestConfig:r,endpoint:o="/superset/explore_json/",formData:n}){const{json:i}=await t.request({...r,method:e,endpoint:o,searchParams:"GET"===e?new URLSearchParams({form_data:JSON.stringify(n)}):void 0,postPayload:"POST"===e?{form_data:n}:void 0});return i}function tt({client:t=Y.Z,sliceId:e,overrideFormData:r,requestConfig:o}){const n=t.get({endpoint:`/api/v1/form_data/?slice_id=${e}`,...o}).then((({json:t})=>t));return r?n.then((t=>({...t,...r}))):n}function et({client:t=Y.Z,datasourceKey:e,requestConfig:r}){return t.get({endpoint:`/superset/fetch_datasource_metadata?datasourceKey=${e}`,...r}).then((t=>t.json))}const rt={};var ot=r(22102);const nt=(0,ot.Z)({method:"POST",endpoint:"/api/v1/chart/data"}),it={getChartData:nt};var st=r(5364),at=r(61654),lt=r(12727),ct=r(78483),ut=r(5031),dt=r(10581),ht=r(56652),pt=r(67706),mt=r(82028),ft=r(34804),gt=r(18014),yt=r(45636),vt=r(77809),Zt=r(67190),Dt=r(18212),Pt=r(43851),Ct=r(75430),_t=r(16722);function Rt(t={}){const{description:e,n:r=3,id:o,label:n}=t,i=(0,_t.WU)(`.${r}s`);return new vt.Z({description:e,formatFunc:t=>{const e=i(t);return e.slice(-1)<"A"?parseFloat(e).toString():e},id:null!=o?o:`si_at_most_${r}_digit`,label:null!=n?n:`SI with at most ${r} significant digits`})}var Tt=r(84986),St=r(42846),Ft=r(69244),wt=r(51115),xt=r(69),At=r(11538),bt=r(78900),Et=r(62720),Nt=r(40962),It=r(18010),kt=r(62761),Mt=r(61888),Lt=r(91572),Ot=r(10660);function $t(t,e){const{texts:r,className:o,style:n,container:i}=t,s=new Map;let a,l;s.set("",{height:0,width:0});const c=r.map((t=>{if(s.has(t))return s.get(t);a||(l=Lt.Y.createInContainer(i),a=Lt.S.createInContainer(l)),(0,Ot.Z)(a,{className:o,style:n,text:t});const r=(0,Mt.Z)(a,e);return s.set(t,r),r}));return l&&a&&setTimeout((()=>{Lt.S.removeFromContainer(l),Lt.Y.removeFromContainer(i)}),500),c}var Bt=r(8608);function qt(t,e=0,r=0){return Number.isNaN(e)||null===e?r:Number.isNaN(r)||null===r?e:t(e,r)}function jt(t={},e={},r="expand"){const{top:o,left:n,bottom:i,right:s}=t,a="expand"===r?Math.max:Math.min;return{bottom:qt(a,i,e.bottom),left:qt(a,n,e.left),right:qt(a,s,e.right),top:qt(a,o,e.top)}}var Vt=r(80644);const Ut={};var Wt=r(67869),zt=r(51995),Qt=r(75294),Yt=r(99298),Kt=r(33444),Gt=r(872),Xt=r(95826),Jt=r(19427),Ht=r(11064);class te{constructor(t={}){this.client=void 0;const{client:e=Y.Z}=t;this.client=e}loadFormData(t,e){return"sliceId"in t?this.client.get({endpoint:`/api/v1/form_data/?slice_id=${t.sliceId}`,...e}).then((t=>t.json)).then((e=>({...e,...t.formData}))):t.formData?Promise.resolve(t.formData):Promise.reject(new Error("At least one of sliceId or formData must be specified"))}async loadQueryData(t,e){const{viz_type:r}=t,o=(0,Ht.Z)(),n=(0,Jt.Z)();if(o.has(r)){var i;const{useLegacyApi:s}=o.get(r),a=null!=(i=await n.get(r))?i:()=>t,l=s?{endpoint:"/superset/explore_json/",postPayload:{form_data:a(t)},...e}:{endpoint:"/api/v1/chart/data",jsonPayload:{query_context:a(t)},...e};return this.client.post(l).then((t=>Array.isArray(t.json)?t.json:[t.json]))}return Promise.reject(new Error(`Unknown chart type: ${r}`))}loadDatasource(t,e){return this.client.get({endpoint:`/superset/fetch_datasource_metadata?datasourceKey=${t}`,...e}).then((t=>t.json))}loadAnnotation(t){return(0,p.Z)(t.sourceType)?Promise.reject(new Error("This feature is not implemented yet.")):Promise.resolve({})}loadAnnotations(t){return Array.isArray(t)&&t.length>0?Promise.all(t.map((t=>this.loadAnnotation(t)))).then((e=>t.reduce(((t,r,o)=>{const n=t;return n[r.name]=e[o],n}),{}))):Promise.resolve({})}loadChartData(t){return this.loadFormData(t).then((t=>Promise.all([this.loadAnnotations(t.annotation_layers),this.loadDatasource(t.datasource),this.loadQueryData(t)]).then((([e,r,o])=>({annotationData:e,datasource:r,formData:t,queriesData:o})))))}}var ee=r(48805),re=r(84912),oe=r(9330),ne=r(89453),ie=r(43323),se=r(88274),ae=r(54085),le=r(37687),ce=r(74464),ue=r(67294);class de extends ue.PureComponent{constructor(t){super(t),this.chartClient=void 0,this.handleFetchData=()=>{const{loadDatasource:t,formDataRequestOptions:e,datasourceRequestOptions:r,queryRequestOptions:o}=this.props;this.setState({status:"loading"},(()=>{try{this.chartClient.loadFormData(this.extractSliceIdAndFormData(),e).then((e=>Promise.all([t?this.chartClient.loadDatasource(e.datasource,r):Promise.resolve(void 0),this.chartClient.loadQueryData(e,o)]).then((([t,r])=>({datasource:t,formData:e,queriesData:r}))))).then(this.handleReceiveData).catch(this.handleError)}catch(t){this.handleError(t)}}))},this.handleReceiveData=t=>{const{onLoaded:e}=this.props;e&&e(t),this.setState({payload:t,status:"loaded"})},this.handleError=t=>{const{onError:e}=this.props;e&&e(t),this.setState({error:t,status:"error"})},this.state={status:"uninitialized"},this.chartClient=new te({client:t.client})}componentDidMount(){this.handleFetchData()}componentDidUpdate(t){const{formData:e,sliceId:r}=this.props;e===t.formData&&r===t.sliceId||this.handleFetchData()}extractSliceIdAndFormData(){const{formData:t,sliceId:e}=this.props;return t?{formData:t}:{sliceId:e}}render(){const{children:t}=this.props,{status:e,payload:r,error:o}=this.state;switch(e){case"loading":return t({loading:!0});case"loaded":return t({payload:r});case"error":return t({error:o});default:return null}}}const he=de;var pe=r(16355);const me={},fe={};var ge=r(11965);function ye(t){return(0,p.Z)(t)&&"number"==typeof t}class ve extends ue.PureComponent{render(){const{contentWidth:t,contentHeight:e,width:r,height:o,renderContent:n}=this.props,i=ye(t)&&t>r,s=ye(e)&&e>o;return i||s?(0,ge.tZ)("div",{style:{height:o,overflowX:i?"auto":"hidden",overflowY:s?"auto":"hidden",width:r}},n({height:Math.max(null!=e?e:0,o),width:Math.max(null!=t?t:0,r)})):n({height:o,width:r})}}ve.defaultProps={renderContent(){}};var Ze=r(86170);const De={display:"flex",flexGrow:0,flexShrink:0,order:-1},Pe={flexBasis:"auto",flexGrow:1,flexShrink:1,position:"relative"};class Ce extends ue.PureComponent{getContainerDirection(){const{position:t}=this.props;return"left"===t?"row":"right"===t?"row-reverse":"bottom"===t?"column-reverse":"column"}getLegendJustifyContent(){const{legendJustifyContent:t,position:e}=this.props;return t||("left"===e||"right"===e?"flex-start":"flex-end")}render(){const{className:t,debounceTime:e,width:r,height:o,position:n,renderChart:i,renderLegend:s}=this.props,a="left"===n||"right"===n,l={display:"flex",flexDirection:this.getContainerDirection(),height:o,width:r},c={...Pe};a?c.width=0:c.height=0;const u=a?"column":"row",d={...De,flexDirection:u,justifyContent:this.getLegendJustifyContent()};return(0,ge.tZ)("div",{className:`with-legend ${t}`,style:l},s&&(0,ge.tZ)("div",{className:"legend-container",style:d},s({direction:u})),(0,ge.tZ)("div",{className:"main-container",style:c},(0,ge.tZ)(Ze.Z,{debounceTime:e},(t=>t.width>0&&t.height>0?i(t):null))))}}Ce.defaultProps={className:"",height:"auto",position:"top",width:"auto"};const _e=Ce,Re={padding:8};class Te extends ue.PureComponent{render(){const{className:t,children:e}=this.props;return(0,ge.tZ)("div",{className:t,style:Re},e)}}Te.defaultProps={className:""};const Se=Te,Fe={paddingLeft:8,textAlign:"right"};class we extends ue.PureComponent{render(){const{className:t,data:e}=this.props;return(0,ge.tZ)("table",{className:t},(0,ge.tZ)("tbody",null,e.map((({key:t,keyColumn:e,keyStyle:r,valueColumn:o,valueStyle:n})=>(0,ge.tZ)("tr",{key:t},(0,ge.tZ)("td",{style:r},null!=e?e:t),(0,ge.tZ)("td",{style:n?{...Fe,...n}:Fe},o))))))}}we.defaultProps={className:"",data:[]};var xe=r(68122),Ae=r(78186),be=r(60524)},78036:(t,e,r)=>{"use strict";r.d(e,{Z:()=>c});var o=r(68929),n=r.n(o),i=r(68630),s=r.n(i),a=r(67523),l=r.n(a);function c(t){if(null==t)return t;if(s()(t))return l()(t,((t,e)=>n()(e)));throw new Error(`Cannot convert input that is not a plain object: ${t}`)}},77675:(t,e,r)=>{"use strict";function o(t,e){const r=parseInt(String(t),10),o=void 0===e?NaN:e;return Number.isNaN(r)?o:r}r.d(e,{Z:()=>o})},37731:(t,e,r)=>{"use strict";function o(t){return null!=t}r.d(e,{Z:()=>o})},70406:(t,e,r)=>{"use strict";r.d(e,{D:()=>i,b:()=>s});var o=r(36377),n=r.n(o);function i(t){return n()(t)}function s(){return n()("superset-ui")()}},75042:()=>{}}]);