"use strict";(globalThis.webpackChunksuperset=globalThis.webpackChunksuperset||[]).push([[8149],{40730:(e,t,n)=>{n.d(t,{Z:()=>Ae});var a,r=n(28216),l=n(14890),o=n(52256),i=n(97381),s=n(73126),d=n(45697),u=n.n(d),c=n(67294),h=n(61988),p=n(51995),m=n(93185),g=n(68492),b=n(55786),v=n(9531),Z=n(38703),f=n(94301),y=n(57902),C=n(3741),S=n(27600),x=n(23525),_=n(71894);!function(e){e.Explore="explore",e.Dashboard="dashboard"}(a||(a={}));var M,T=n(42190),w=n(50361),I=n.n(w),k=n(18446),D=n.n(k),F=n(11865),E=n.n(F),R=n(16355),$=n(11064),N=n(88274),O=n(11965),A=n(90731),L=n(12617),U=n(83862),z=n(4715),q=n(74599),j=n(41814),V=n(69175),B=n(15856),P=n(70707),H=n(9875),Q=n(14114),Y=n(6412),K=n(37731),G=n(73727),W=n(74069),X=n(35932),J=n(57001),ee=n(40219),te=n(99232),ne=n(53579),ae=n(29487);function re(e){let{formData:t,result:n,dataset:a,onContextMenu:r,inContextMenu:l}=e;const o=(0,c.useMemo)((()=>({onContextMenu:r})),[r]);return(0,O.tZ)("div",{css:O.iv`
        width: 100%;
        height: 100%;
        min-height: 0;
      `},(0,O.tZ)(N.Z,{disableErrorBoundary:!0,chartType:t.viz_type,enableNoResults:!0,datasource:a,formData:t,queriesData:n,hooks:o,inContextMenu:l,height:"100%",width:"100%"}))}!function(e){e[e.Chart=0]="Chart",e[e.Table=1]="Table"}(M||(M={}));var le=n(87183),oe=n(54076);const ie=(0,p.iK)(z.O5.Item)`
  ${e=>{let{theme:t,isClickable:n}=e;return O.iv`
    cursor: ${n?"pointer":"auto"};
    color: ${t.colors.grayscale.light1};
    transition: color ease-in ${t.transitionTiming}s;
    .ant-breadcrumb > span:last-child > & {
      color: ${t.colors.grayscale.dark1};
    }
    &:hover {
      color: ${n?t.colors.grayscale.dark1:"inherit"};
    }
  `}}
`;var se=n(5462),de=n(71262);const ue=p.iK.div`
  ${e=>{let{theme:t}=e;return O.iv`
    & .pagination-container {
      bottom: ${4*-t.gridUnit}px;
    }
  `}}
`,ce="adhoc_filters",he=e=>{let{formData:t,closeModal:n}=e;const a=(0,r.I0)(),{addDangerToast:l}=(0,Q.e1)(),[o,s]=(0,c.useState)(""),d=(0,c.useContext)(J.DashboardPageIdContext),u=(0,c.useCallback)((()=>{a((0,i.logEvent)(C.qL,{slice_id:t.slice_id}))}),[a,t.slice_id]),[p,m]=t.datasource.split("__");return(0,c.useEffect)((()=>{(0,ee.nv)(Number(p),m,t,0).then((e=>{s(`/explore/?form_data_key=${e}&dashboard_page_id=${d}`)})).catch((()=>{l((0,h.t)("Failed to generate chart edit URL"))}))}),[l,d,p,m,t]),(0,O.tZ)(c.Fragment,null,(0,O.tZ)(X.Z,{buttonStyle:"secondary",buttonSize:"small",onClick:u,disabled:!o},(0,O.tZ)(G.rU,{css:O.iv`
            &:hover {
              text-decoration: none;
            }
          `,to:o},(0,h.t)("Edit chart"))),(0,O.tZ)(X.Z,{buttonStyle:"primary",buttonSize:"small",onClick:n},(0,h.t)("Close")))};function pe(e){let{column:t,dataset:n,drillByConfig:a,formData:l,onHideModal:s}=e;const d=(0,r.I0)(),u=(0,p.Fg)(),{addDangerToast:m}=(0,Q.e1)(),[g,v]=(0,c.useState)(!0),[f,y]=(0,c.useState)([{...a,column:t}]);(0,c.useEffect)((()=>{d((0,i.logEvent)(C.zf,{slice_id:l.slice_id}))}),[d,l.slice_id]);const{column:S,groupbyFieldName:x=a.groupbyFieldName}=f[f.length-1]||{},_=(0,c.useMemo)((()=>(0,b.Z)(l[x]).map((e=>{var t;return null==(t=n.columns)?void 0:t.find((t=>t.column_name===e))})).filter(K.Z)),[n.columns,l,x]),{displayModeToggle:T,drillByDisplayMode:w}=(()=>{const[e,t]=(0,c.useState)(M.Chart);return{displayModeToggle:(0,c.useMemo)((()=>(0,O.tZ)("div",{css:e=>O.iv`
          margin-bottom: ${6*e.gridUnit}px;
          .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):focus-within {
            box-shadow: none;
          }
        `},(0,O.tZ)(le.Y.Group,{onChange:e=>{let{target:{value:n}}=e;t(n)},defaultValue:M.Chart},(0,O.tZ)(le.Y.Button,{value:M.Chart},(0,h.t)("Chart")),(0,O.tZ)(le.Y.Button,{value:M.Table},(0,h.t)("Table"))))),[]),drillByDisplayMode:e}})(),[I,k]=(0,c.useState)(),D=((e,t)=>(0,K.Z)(e)?1===e.length?(0,O.tZ)(ue,null,(0,O.tZ)(se.T,{colnames:e[0].colnames,coltypes:e[0].coltypes,data:e[0].data,dataSize:15,datasourceId:t,isVisible:!0})):(0,O.tZ)(de.ZP,{fullWidth:!1},e.map(((e,n)=>(0,O.tZ)(de.ZP.TabPane,{tab:(0,h.t)("Results %s",n+1),key:n},(0,O.tZ)(ue,null,(0,O.tZ)(se.T,{colnames:e.colnames,coltypes:e.coltypes,data:e.data,dataSize:15,datasourceId:t,isVisible:!0})))))):(0,O.tZ)("div",null))(I,l.datasource),[F,E]=(0,c.useState)(l),[R,$]=(0,c.useState)([..._,t].filter(K.Z)),[N,A]=(0,c.useState)([{groupby:_,filters:a.filters},{groupby:t||[]}]),L=(0,c.useCallback)((function(e,t){return void 0===t&&(t=x),Array.isArray(l[t])?[e.column_name]:e.column_name}),[l,x]),U=(0,c.useCallback)((e=>e.reduce(((e,t)=>{null!=t&&t.groupbyFieldName&&t.column&&(e.formData[t.groupbyFieldName]=L(t.column,t.groupbyFieldName),e.overridenGroupbyFields.add(t.groupbyFieldName));const n=(null==t?void 0:t.adhocFilterFieldName)||ce;return e.formData[n]=[...(0,b.Z)(e[n]),...(0,b.Z)(t.filters).map((e=>(0,te.f)(e)))],e.overridenAdhocFilterFields.add(n),e}),{formData:{},overridenGroupbyFields:new Set,overridenAdhocFilterFields:new Set})),[L]),q=(0,c.useCallback)((()=>f.reduce(((e,t)=>{const n=t.adhocFilterFieldName||ce;return e[n]=[...e[n]||[],...t.filters.map((e=>(0,te.f)(e)))],e}),{})),[f]),j=function(e,t){return void 0===t&&(t=oe.EI),(0,c.useMemo)((()=>{const n=t=>t<e.length-1;return(0,O.tZ)(z.O5,{css:e=>O.iv`
          margin: ${2*e.gridUnit}px 0 ${4*e.gridUnit}px;
        `},e.map(((e,a)=>(0,O.tZ)(ie,{key:a,isClickable:n(a),onClick:n(a)?()=>t(e,a):oe.EI},(e=>`${(0,b.Z)(e.groupby).map((e=>e.verbose_name||e.column_name)).join(", ")} ${e.filters?`(${e.filters.map((e=>e.formattedVal||e.val)).join(", ")})`:""}`)(e)))))}),[e,t])}(N,(0,c.useCallback)(((e,t)=>{d((0,i.logEvent)(C.TG,{slice_id:l.slice_id})),y((e=>e.slice(0,t))),A((e=>{const n=e.slice(0,t+1);return delete n[n.length-1].filters,n})),$((e=>e.slice(0,t))),E((()=>{if(0===t)return l;const{formData:e,overridenAdhocFilterFields:n}=U(f.slice(0,t)),a={...l,...e};return n.forEach((t=>({...a,[t]:[...l[t],...e[t]]}))),a}))}),[d,f,l,U])),V=(0,c.useMemo)((()=>{let e={...F};S&&x&&(e[x]=L(S));const t=q();return Object.keys(t).forEach((n=>{e={...e,[n]:[...(0,b.Z)(l[n]),...t[n]]}})),e.slice_id=0,delete e.slice_name,delete e.dashboards,e}),[F,S,x,q,L,l]);(0,c.useEffect)((()=>{$((e=>!S||e.some((e=>e.column_name===S.column_name))?e:[...e,S]))}),[S]);const B=(0,c.useCallback)(((e,t)=>{d((0,i.logEvent)(C.g3,{drill_depth:f.length+1,slice_id:l.slice_id})),E(V),y((n=>[...n,{...t,column:e}])),A((n=>{const a=[...n,{groupby:e}];return a[a.length-2].filters=t.filters,a}))}),[d,f.length,V,l.slice_id]),P=(0,c.useMemo)((()=>({drillBy:{excludedColumns:R,openNewModal:!1}})),[R]),{contextMenu:H,inContextMenu:Y,onContextMenu:G}=((e,t,n,a,r)=>{const l=(0,c.useRef)(null),[o,i]=(0,c.useState)(!1),s=(0,c.useCallback)((function(){i(!1);for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];null==n||n(...t)}),[n]),d=(0,c.useCallback)((()=>{i(!1)}),[]);return{contextMenu:(0,c.useMemo)((()=>(0,O.tZ)(Ze,{ref:l,id:0,formData:t,onSelection:s,onClose:d,displayedItems:a,additionalConfig:r})),[r,0,a,t,d,s]),inContextMenu:o,onContextMenu:(e,t,n)=>{var a;null==(a=l.current)||a.open(e,t,n),i(!0)}}})(0,F,B,be.DrillBy,P),X=(0,r.v9)((e=>{const t=Object.values(e.dashboardLayout.present).find((e=>{var t;return(null==(t=e.meta)?void 0:t.chartId)===l.slice_id}));return(null==t?void 0:t.meta.sliceNameOverride)||(null==t?void 0:t.meta.sliceName)}));(0,c.useEffect)((()=>{V&&(v(!0),k(void 0),(0,o.getChartDataRequest)({formData:V}).then((e=>{let{json:t}=e;k(t.result)})).catch((()=>{m((0,h.t)("Failed to load chart data."))})).finally((()=>{v(!1)})))}),[m,V]);const{metadataBar:J}=(0,ne.S)({dataset:n});return(0,O.tZ)(W.default,{css:O.iv`
        .ant-modal-footer {
          border-top: none;
        }
      `,show:!0,onHide:null!=s?s:()=>null,title:(0,h.t)("Drill by: %s",X),footer:(0,O.tZ)(he,{formData:V}),responsive:!0,resizable:!0,resizableConfig:{minHeight:128*u.gridUnit,minWidth:128*u.gridUnit,defaultSize:{width:"auto",height:"80vh"}},draggable:!0,destroyOnClose:!0,maskClosable:!1},(0,O.tZ)("div",{css:O.iv`
          display: flex;
          flex-direction: column;
          height: 100%;
        `},J,j,T,g&&(0,O.tZ)(Z.Z,null),!g&&!I&&(0,O.tZ)(ae.Z,{type:"error",message:(0,h.t)("There was an error loading the chart data")}),w===M.Chart&&I&&(0,O.tZ)(re,{dataset:n,formData:V,result:I,onContextMenu:G,inContextMenu:Y}),w===M.Table&&I&&D,H))}var me=n(46219);const ge=e=>{let{drillByConfig:t,formData:n,contextMenuY:a=0,submenuIndex:r=0,onSelection:l=(()=>{}),onClick:o=(()=>{}),excludedColumns:i,openNewModal:d=!0,...u}=e;const m=(0,p.Fg)(),{addDangerToast:g}=(0,Q.e1)(),[v,f]=(0,c.useState)(!0),[y,C]=(0,c.useState)(""),[S,x]=(0,c.useState)(),[_,M]=(0,c.useState)([]),[T,w]=(0,c.useState)(!1),[I,k]=(0,c.useState)(),D=(0,c.useCallback)(((e,n)=>{o(e),l(n,t),k(n),d&&w(!0)}),[t,o,l,d]),F=(0,c.useCallback)((()=>{w(!1)}),[]);(0,c.useEffect)((()=>{C("")}),[_.length]);const E=(0,b.Z)(null==t?void 0:t.filters).length&&(null==t?void 0:t.groupbyFieldName),N=(0,c.useMemo)((()=>{var e;return null==(e=(0,$.Z)().get(n.viz_type))?void 0:e.behaviors.find((e=>e===R.cg.DRILL_BY))}),[n.viz_type]),A=(e=>{const t={};return(0,b.Z)(null==e?void 0:e.columns).forEach((e=>{t[e.column_name]=e.verbose_name||e.column_name})),(0,b.Z)(null==e?void 0:e.metrics).forEach((e=>{t[e.metric_name]=e.verbose_name||e.metric_name})),t})(S);(0,c.useEffect)((()=>{if(N&&E){const e=n.datasource.split("__")[0];(0,Y.e)({endpoint:`/api/v1/dataset/${e}`}).then((e=>{let{json:{result:a}}=e;x(a),M((0,b.Z)(a.columns).filter((e=>e.groupby)).filter((e=>{var a,r;return!(0,b.Z)(n[null!=(a=t.groupbyFieldName)?a:""]).includes(e.column_name)&&e.column_name!==n.x_axis&&(null==(r=(0,b.Z)(i))?void 0:r.every((t=>t.column_name!==e.column_name)))})))})).catch((()=>{Y.f.delete(`/api/v1/dataset/${e}`),g((0,h.t)("Failed to load dimensions for drill by"))})).finally((()=>{f(!1)}))}}),[g,i,n,null==t?void 0:t.groupbyFieldName,N,E]);const L=(0,c.useCallback)((e=>{var t;e.stopPropagation();const n=null==e||null==(t=e.target)?void 0:t.value;C(n)}),[]),z=(0,c.useMemo)((()=>_.filter((e=>(e.verbose_name||e.column_name).toLowerCase().includes(y.toLowerCase())))),[_,y]),q=(0,c.useMemo)((()=>(0,V.th)(a,z.length||1,r,200,_.length>10?48:0)),[a,z.length,r,_.length]);let j;return N?E||(j=(0,h.t)("Drill by is not available for this data point")):j=(0,h.t)("Drill by is not yet supported for this chart type"),N&&E?(0,O.tZ)(c.Fragment,null,(0,O.tZ)(U.Menu.SubMenu,(0,s.Z)({title:(0,h.t)("Drill by"),key:"drill-by-submenu",popupClassName:"chart-context-submenu",popupOffset:[0,q]},u),(0,O.tZ)("div",null,_.length>10&&(0,O.tZ)(H.II,{prefix:(0,O.tZ)(P.Z.Search,{iconSize:"l",iconColor:m.colors.grayscale.light1}),onChange:L,placeholder:(0,h.t)("Search columns"),value:y,onClick:e=>{e.nativeEvent.stopImmediatePropagation()},allowClear:!0,css:O.iv`
                width: auto;
                max-width: 100%;
                margin: ${2*m.gridUnit}px ${3*m.gridUnit}px;
                box-shadow: none;
              `}),v?(0,O.tZ)("div",{css:O.iv`
                padding: ${3*m.gridUnit}px 0;
              `},(0,O.tZ)(Z.Z,{position:"inline-centered"})):z.length?(0,O.tZ)("div",{css:O.iv`
                max-height: ${200}px;
                overflow: auto;
              `},z.map((e=>(0,O.tZ)(me.i,(0,s.Z)({key:`drill-by-item-${e.column_name}`,tooltipText:e.verbose_name||e.column_name},u,{onClick:t=>D(t,e)}),e.verbose_name||e.column_name)))):(0,O.tZ)(U.Menu.Item,(0,s.Z)({disabled:!0,key:"no-drill-by-columns-found"},u),(0,h.t)("No columns found")))),T&&(0,O.tZ)(pe,{column:I,drillByConfig:t,formData:n,onHideModal:F,dataset:{...S,verbose_map:A}})):(0,O.tZ)(U.Menu.Item,(0,s.Z)({key:"drill-by-disabled",disabled:!0},u),(0,O.tZ)("div",null,(0,h.t)("Drill by"),(0,O.tZ)(B.j,{title:j})))};var be;!function(e){e[e.CrossFilter=0]="CrossFilter",e[e.DrillToDetail=1]="DrillToDetail",e[e.DrillBy=2]="DrillBy",e[e.All=3]="All"}(be||(be={}));const ve=(e,t)=>{var n,a;let{id:l,formData:o,onSelection:i,onClose:d,displayedItems:u=be.All,additionalConfig:g}=e;const v=(0,p.Fg)(),Z=(0,r.I0)(),f=(0,r.v9)((e=>{var t;return(0,L.R)("can_explore","Superset",null==(t=e.user)?void 0:t.roles)})),y=(0,r.v9)((e=>{let{dashboardInfo:t}=e;return t.crossFiltersEnabled})),C=e=>u===be.All||(0,b.Z)(u).includes(e),[{filters:S,clientX:x,clientY:_},M]=(0,c.useState)({clientX:0,clientY:0}),T=[],w=(0,m.cr)(m.TT.DRILL_TO_DETAIL)&&f&&C(be.DrillToDetail),I=(0,m.cr)(m.TT.DRILL_BY)&&f&&C(be.DrillBy),k=(0,m.cr)(m.TT.DASHBOARD_CROSS_FILTERS)&&C(be.CrossFilter),D=null==(n=(0,$.Z)().get(o.viz_type))||null==(a=n.behaviors)?void 0:a.includes(R.cg.INTERACTIVE_CHART);let F=0;if(k&&(F+=1),w&&(F+=2),I&&(F+=1),0===F&&(F=1),k){var E;const e=!D||!y||!(null!=S&&S.crossFilter);let t=null;e?y?D?null!=S&&S.crossFilter||(t=(0,O.tZ)(c.Fragment,null,(0,O.tZ)("div",null,(0,h.t)("You can't apply cross-filter on this data point.")))):t=(0,O.tZ)(c.Fragment,null,(0,O.tZ)("div",null,(0,h.t)("This visualization type does not support cross-filtering."))):t=(0,O.tZ)(c.Fragment,null,(0,O.tZ)("div",null,(0,h.t)("Cross-filtering is not enabled for this dashboard."))):t=(0,O.tZ)(c.Fragment,null,(0,O.tZ)("div",null,(0,h.t)("Cross-filter will be applied to all of the charts that use this dataset.")),(0,O.tZ)("div",null,(0,h.t)("You can also just click on the chart to apply cross-filter."))),T.push((0,O.tZ)(c.Fragment,null,(0,O.tZ)(U.Menu.Item,{key:"cross-filtering-menu-item",disabled:e,onClick:()=>{null!=S&&S.crossFilter&&Z((0,q.eG)(l,S.crossFilter.dataMask))}},null!=S&&null!=(E=S.crossFilter)&&E.isCurrentValueSelected?(0,h.t)("Remove cross-filter"):(0,O.tZ)("div",null,(0,h.t)("Add cross-filter"),(0,O.tZ)(B.j,{title:t,color:e?void 0:v.colors.grayscale.base}))),F>1&&(0,O.tZ)(U.Menu.Divider,null)))}if(w&&T.push((0,O.tZ)(j.p,(0,s.Z)({chartId:l,formData:o,filters:null==S?void 0:S.drillToDetail,isContextMenu:!0,contextMenuY:_,onSelection:i,submenuIndex:k?2:1},(null==g?void 0:g.drillToDetail)||{}))),I){let e=0;k&&(e+=1),w&&(e+=2),T.push((0,O.tZ)(ge,(0,s.Z)({drillByConfig:null==S?void 0:S.drillBy,onSelection:i,formData:o,contextMenuY:_,submenuIndex:e},(null==g?void 0:g.drillBy)||{})))}const N=(0,c.useCallback)(((e,t,n)=>{var a;const r=(0,V.$t)(t,F);M({clientX:e,clientY:r,filters:n}),null==(a=document.getElementById(`hidden-span-${l}`))||a.click()}),[l,F]);return(0,c.useImperativeHandle)(t,(()=>({open:N})),[N]),A.createPortal((0,O.tZ)(z.Gj,{overlay:(0,O.tZ)(U.Menu,{className:"chart-context-menu"},T.length?T:(0,O.tZ)(U.Menu.Item,{disabled:!0},"No actions")),trigger:["click"],onVisibleChange:e=>!e&&d()},(0,O.tZ)("span",{id:`hidden-span-${l}`,css:(0,O.iv)({visibility:"hidden",position:"fixed",top:_,left:x,width:1,height:1},"","")})),document.body)},Ze=(0,c.forwardRef)(ve),fe={annotationData:u().object,actions:u().object,chartId:u().number.isRequired,datasource:u().object,initialValues:u().object,formData:u().object.isRequired,latestQueryFormData:u().object,labelColors:u().object,sharedLabelColors:u().object,height:u().number,width:u().number,setControlValue:u().func,vizType:u().string.isRequired,triggerRender:u().bool,chartAlert:u().string,chartStatus:u().string,queriesResponse:u().arrayOf(u().object),triggerQuery:u().bool,chartIsStale:u().bool,addFilter:u().func,setDataMask:u().func,onFilterMenuOpen:u().func,onFilterMenuClose:u().func,ownState:u().object,postTransformProps:u().func,source:u().oneOf([a.Dashboard,a.Explore]),emitCrossFilters:u().bool},ye={},Ce=[R.cg.INTERACTIVE_CHART],Se={addFilter:()=>ye,onFilterMenuOpen:()=>ye,onFilterMenuClose:()=>ye,initialValues:ye,setControlValue(){},triggerRender:!1};class xe extends c.Component{constructor(e){super(e),this.state={showContextMenu:e.source===a.Dashboard&&((0,m.cr)(m.TT.DRILL_TO_DETAIL)||(0,m.cr)(m.TT.DASHBOARD_CROSS_FILTERS)),inContextMenu:!1,legendState:void 0},this.hasQueryResponseChange=!1,this.contextMenuRef=c.createRef(),this.handleAddFilter=this.handleAddFilter.bind(this),this.handleRenderSuccess=this.handleRenderSuccess.bind(this),this.handleRenderFailure=this.handleRenderFailure.bind(this),this.handleSetControlValue=this.handleSetControlValue.bind(this),this.handleOnContextMenu=this.handleOnContextMenu.bind(this),this.handleContextMenuSelected=this.handleContextMenuSelected.bind(this),this.handleContextMenuClosed=this.handleContextMenuClosed.bind(this),this.handleLegendStateChanged=this.handleLegendStateChanged.bind(this),this.onContextMenuFallback=this.onContextMenuFallback.bind(this),this.hooks={onAddFilter:this.handleAddFilter,onContextMenu:this.state.showContextMenu?this.handleOnContextMenu:void 0,onError:this.handleRenderFailure,setControlValue:this.handleSetControlValue,onFilterMenuOpen:this.props.onFilterMenuOpen,onFilterMenuClose:this.props.onFilterMenuClose,onLegendStateChanged:this.handleLegendStateChanged,setDataMask:e=>{var t;null==(t=this.props.actions)||t.updateDataMask(this.props.chartId,e)}},this.mutableQueriesResponse=I()(this.props.queriesResponse)}shouldComponentUpdate(e,t){var n,a;return!(!(e.queriesResponse&&["success","rendered"].indexOf(e.chartStatus)>-1)||null!=(n=e.queriesResponse)&&null!=(a=n[0])&&a.error)&&(!D()(this.state,t)||(this.hasQueryResponseChange=e.queriesResponse!==this.props.queriesResponse,this.hasQueryResponseChange&&(this.mutableQueriesResponse=I()(e.queriesResponse)),this.hasQueryResponseChange||!D()(e.datasource,this.props.datasource)||e.annotationData!==this.props.annotationData||e.ownState!==this.props.ownState||e.filterState!==this.props.filterState||e.height!==this.props.height||e.width!==this.props.width||e.triggerRender||e.labelColors!==this.props.labelColors||e.sharedLabelColors!==this.props.sharedLabelColors||e.formData.color_scheme!==this.props.formData.color_scheme||e.formData.stack!==this.props.formData.stack||e.cacheBusterProp!==this.props.cacheBusterProp||e.emitCrossFilters!==this.props.emitCrossFilters))}handleAddFilter(e,t,n,a){void 0===n&&(n=!0),void 0===a&&(a=!0),this.props.addFilter(e,t,n,a)}handleRenderSuccess(){const{actions:e,chartStatus:t,chartId:n,vizType:a}=this.props;["loading","rendered"].indexOf(t)<0&&e.chartRenderingSucceeded(n),this.hasQueryResponseChange&&e.logEvent(C.aD,{slice_id:n,viz_type:a,start_offset:this.renderStartTime,ts:(new Date).getTime(),duration:C.Yd.getTimestamp()-this.renderStartTime})}handleRenderFailure(e,t){const{actions:n,chartId:a}=this.props;g.Z.warn(e),n.chartRenderingFailed(e.toString(),a,t?t.componentStack:null),this.hasQueryResponseChange&&n.logEvent(C.aD,{slice_id:a,has_err:!0,error_details:e.toString(),start_offset:this.renderStartTime,ts:(new Date).getTime(),duration:C.Yd.getTimestamp()-this.renderStartTime})}handleSetControlValue(){const{setControlValue:e}=this.props;e&&e(...arguments)}handleOnContextMenu(e,t,n){this.contextMenuRef.current.open(e,t,n),this.setState({inContextMenu:!0})}handleContextMenuSelected(){this.setState({inContextMenu:!1})}handleContextMenuClosed(){this.setState({inContextMenu:!1})}handleLegendStateChanged(e){this.setState({legendState:e})}onContextMenuFallback(e){this.state.inContextMenu||(e.preventDefault(),this.handleOnContextMenu(e.clientX,e.clientY))}render(){var e;const{chartAlert:t,chartStatus:n,chartId:r,emitCrossFilters:l}=this.props;if("loading"===n||t||null===n)return null;this.renderStartTime=C.Yd.getTimestamp();const{width:o,height:i,datasource:d,annotationData:u,initialValues:p,ownState:m,filterState:g,chartIsStale:b,formData:v,latestQueryFormData:Z,postTransformProps:y}=this.props,S=b&&Z?Z:v,x=S.viz_type||this.props.vizType,_=E()(x),M="table"===x?`superset-chart-${_}`:_;let T;const w=(0,h.t)("No results were returned for this query"),I=this.props.source===a.Explore?(0,h.t)("Make sure that the controls are configured properly and the datasource contains data for the selected time range"):void 0,k="chart.svg";T=o>300&&i>220?(0,O.tZ)(f.XJ,{title:w,description:I,image:k}):(0,O.tZ)(f.Tc,{title:w,image:k});const D=null!=(e=(0,$.Z)().get(v.viz_type))&&e.behaviors.find((e=>e===R.cg.DRILL_TO_DETAIL))?{inContextMenu:this.state.inContextMenu}:{};return(0,O.tZ)(c.Fragment,null,this.state.showContextMenu&&(0,O.tZ)(Ze,{ref:this.contextMenuRef,id:r,formData:S,onSelection:this.handleContextMenuSelected,onClose:this.handleContextMenuClosed}),(0,O.tZ)("div",{onContextMenu:this.state.showContextMenu?this.onContextMenuFallback:void 0},(0,O.tZ)(N.Z,(0,s.Z)({disableErrorBoundary:!0,key:`${r}`,id:`chart-id-${r}`,className:M,chartType:x,width:o,height:i,annotationData:u,datasource:d,initialValues:p,formData:S,ownState:m,filterState:g,hooks:this.hooks,behaviors:Ce,queriesData:this.mutableQueriesResponse,onRenderSuccess:this.handleRenderSuccess,onRenderFailure:this.handleRenderFailure,noResults:T,postTransformProps:y,emitCrossFilters:l,legendState:this.state.legendState},D))))}}xe.propTypes=fe,xe.defaultProps=Se;const _e=xe;var Me=n(67417),Te=n(72875);const we=e=>{let{chartId:t,error:n,...a}=e;const{result:r}=(0,Me.hb)(t),l=n&&{...n,extra:{...n.extra,owners:r}};return(0,O.tZ)(Te.Z,(0,s.Z)({},a,{error:l}))};var Ie=n(75701);const ke={annotationData:u().object,actions:u().object,chartId:u().number.isRequired,datasource:u().object,dashboardId:u().number,initialValues:u().object,formData:u().object.isRequired,labelColors:u().object,sharedLabelColors:u().object,width:u().number,height:u().number,setControlValue:u().func,timeout:u().number,vizType:u().string.isRequired,triggerRender:u().bool,force:u().bool,isFiltersInitialized:u().bool,chartAlert:u().string,chartStatus:u().string,chartStackTrace:u().string,queriesResponse:u().arrayOf(u().object),triggerQuery:u().bool,chartIsStale:u().bool,errorMessage:u().node,addFilter:u().func,onQuery:u().func,onFilterMenuOpen:u().func,onFilterMenuClose:u().func,ownState:u().object,postTransformProps:u().func,datasetsStatus:u().oneOf(["loading","error","complete"]),isInView:u().bool,emitCrossFilters:u().bool},De={},Fe=(0,h.t)("The dataset associated with this chart no longer exists"),Ee={addFilter:()=>De,onFilterMenuOpen:()=>De,onFilterMenuClose:()=>De,initialValues:De,setControlValue(){},triggerRender:!1,dashboardId:null,chartStackTrace:null,force:!1,isInView:!0},Re=p.iK.div`
  min-height: ${e=>e.height}px;
  position: relative;

  .chart-tooltip {
    opacity: 0.75;
    font-size: ${e=>{let{theme:t}=e;return t.typography.sizes.s}}px;
  }

  .slice_container {
    display: flex;
    flex-direction: column;
    justify-content: center;

    height: ${e=>e.height}px;

    .pivot_table tbody tr {
      font-feature-settings: 'tnum' 1;
    }

    .alert {
      margin: ${e=>{let{theme:t}=e;return 2*t.gridUnit}}px;
    }
  }
`,$e=p.iK.div`
  font-family: ${e=>{let{theme:t}=e;return t.typography.families.monospace}};
  word-break: break-word;
  overflow-x: auto;
  white-space: pre-wrap;
`;class Ne extends c.PureComponent{constructor(e){super(e),this.handleRenderContainerFailure=this.handleRenderContainerFailure.bind(this)}componentDidMount(){this.props.triggerQuery&&this.runQuery()}componentDidUpdate(){this.props.triggerQuery&&this.runQuery()}runQuery(){this.props.chartId>0&&(0,m.cr)(m.TT.CLIENT_CACHE)?this.props.actions.getSavedChart(this.props.formData,this.props.force||(0,x.eY)(S.KD.force),this.props.timeout,this.props.chartId,this.props.dashboardId,this.props.ownState):this.props.actions.postChartFormData(this.props.formData,Boolean(this.props.force||(0,x.eY)(S.KD.force)),this.props.timeout,this.props.chartId,this.props.dashboardId,this.props.ownState)}handleRenderContainerFailure(e,t){const{actions:n,chartId:a}=this.props;g.Z.warn(e),n.chartRenderingFailed(e.toString(),a,t?t.componentStack:null),n.logEvent(C.aD,{slice_id:a,has_err:!0,error_details:e.toString(),start_offset:this.renderStartTime,ts:(new Date).getTime(),duration:C.Yd.getTimestamp()-this.renderStartTime})}renderErrorMessage(e){var t;const{chartId:n,chartAlert:r,chartStackTrace:l,datasource:o,dashboardId:i,height:s,datasetsStatus:d}=this.props,u=null==e||null==(t=e.errors)?void 0:t[0],c=r||(null==e?void 0:e.message);return void 0!==r&&r!==Fe&&o===v.tw&&d!==T.ni.ERROR?(0,O.tZ)(Re,{key:n,"data-ui-anchor":"chart",className:"chart-container",height:s},(0,O.tZ)(Z.Z,null)):(0,O.tZ)(we,{key:n,chartId:n,error:u,subtitle:(0,O.tZ)($e,null,c),copyText:c,link:e?e.link:null,source:i?a.Dashboard:a.Explore,stackTrace:l})}render(){const{height:e,chartAlert:t,chartStatus:n,errorMessage:a,chartIsStale:r,queriesResponse:l=[],width:o}=this.props,i="loading"===n;return this.renderContainerStartTime=C.Yd.getTimestamp(),"failed"===n?l.map((e=>this.renderErrorMessage(e))):a&&0===(0,b.Z)(l).length?(0,O.tZ)(f.XJ,{title:(0,h.t)("Add required control values to preview chart"),description:(0,Ie.J)(!0),image:"chart.svg"}):i||t||a||!r||0!==(0,b.Z)(l).length?(0,O.tZ)(y.Z,{onError:this.handleRenderContainerFailure,showMessage:!1},(0,O.tZ)(Re,{"data-ui-anchor":"chart",className:"chart-container",height:e,width:o},(0,O.tZ)("div",{className:"slice_container"},this.props.isInView||!(0,m.cr)(m.TT.DASHBOARD_VIRTUALIZATION)||(0,_.b)()?(0,O.tZ)(_e,(0,s.Z)({},this.props,{source:this.props.dashboardId?"dashboard":"explore"})):(0,O.tZ)(Z.Z,null)),i&&(0,O.tZ)(Z.Z,null))):(0,O.tZ)(f.XJ,{title:(0,h.t)("Your chart is ready to go!"),description:(0,O.tZ)("span",null,(0,h.t)('Click on "Create chart" button in the control panel on the left to preview a visualization or')," ",(0,O.tZ)("span",{role:"button",tabIndex:0,onClick:this.props.onQuery},(0,h.t)("click here")),"."),image:"chart.svg"})}}Ne.propTypes=ke,Ne.defaultProps=Ee;const Oe=Ne,Ae=(0,r.$j)(null,(function(e){return{actions:(0,l.DE)({...o,updateDataMask:q.eG,logEvent:i.logEvent},e)}}))(Oe)},96022:(e,t,n)=>{n.d(t,{ZN:()=>V,gT:()=>P});var a=n(73126),r=n(67294),l=n(28216),o=n(51995),i=n(11965),s=n(61988),d=n(93185),u=n(70707),c=n(83862),h=n(1304),p=n(35932),m=n(14114),g=n(12515),b=n(56727),v=n(23525),Z=n(10222),f=n(3003),y=n(97381),C=n(3741),S=n(15423),x=n(9875),_=n(13433),M=n(27600),T=n(50909);const w=(0,o.iK)(T.qi)`
  && {
    margin: 0 0 ${e=>{let{theme:t}=e;return t.gridUnit}}px;
  }
`,I=e=>{let{formData:t,addDangerToast:n}=e;const[a,l]=(0,r.useState)("400"),[o,d]=(0,r.useState)("600"),[u,c]=(0,r.useState)(""),[h,p]=(0,r.useState)(""),m=(0,r.useCallback)((e=>{const{value:t,name:n}=e.currentTarget;"width"===n&&d(t),"height"===n&&l(t)}),[]),g=(0,r.useCallback)((()=>{c(""),(0,v.YE)(t).then((e=>{c(e),p("")})).catch((()=>{p((0,s.t)("Error")),n((0,s.t)("Sorry, something went wrong. Try again later."))}))}),[n,t]);(0,r.useEffect)((()=>{g()}),[]);const b=(0,r.useMemo)((()=>{if(!u)return"";const e=`${u}?${M.KD.standalone.name}=1&height=${a}`;return`<iframe\n  width="${o}"\n  height="${a}"\n  seamless\n  frameBorder="0"\n  scrolling="no"\n  src="${e}"\n>\n</iframe>`}),[a,u,o]),Z=h||b||(0,s.t)("Generating link, please wait..");return(0,i.tZ)("div",{id:"embed-code-popover"},(0,i.tZ)("div",{css:i.iv`
          display: flex;
          flex-direction: column;
        `},(0,i.tZ)(_.Z,{shouldShowText:!1,text:b,copyNode:(0,i.tZ)(w,{buttonSize:"xsmall"},(0,i.tZ)("i",{className:"fa fa-clipboard"}))}),(0,i.tZ)(x.Kx,{name:"embedCode",disabled:!b,value:Z,rows:"4",readOnly:!0,css:e=>i.iv`
            resize: vertical;
            padding: ${2*e.gridUnit}px;
            font-size: ${e.typography.sizes.s}px;
            border-radius: 4px;
            background-color: ${e.colors.secondary.light5};
          `})),(0,i.tZ)("div",{css:e=>i.iv`
          display: flex;
          margin-top: ${4*e.gridUnit}px;
          & > div {
            margin-right: ${2*e.gridUnit}px;
          }
          & > div:last-of-type {
            margin-right: 0;
            margin-left: ${2*e.gridUnit}px;
          }
        `},(0,i.tZ)("div",null,(0,i.tZ)("label",{htmlFor:"embed-height"},(0,s.t)("Chart height")),(0,i.tZ)(x.II,{type:"text",defaultValue:a,name:"height",onChange:m})),(0,i.tZ)("div",null,(0,i.tZ)("label",{htmlFor:"embed-width"},(0,s.t)("Chart width")),(0,i.tZ)(x.II,{type:"text",defaultValue:o,name:"width",onChange:m,id:"embed-width"}))))};var k=n(73727);const D=e=>{let{chartId:t,dashboards:n=[],...l}=e;const d=(0,o.Fg)(),[h,p]=(0,r.useState)(),[m,g]=(0,r.useState)(),b=n.length>10,v=n.filter((e=>!h||e.dashboard_title.toLowerCase().includes(h.toLowerCase()))),Z=0===n.length,f=h&&0===v.length,y=t?`?focused_chart=${t}`:"";return(0,i.tZ)(r.Fragment,null,b&&(0,i.tZ)(x.II,{allowClear:!0,placeholder:(0,s.t)("Search"),prefix:(0,i.tZ)(u.Z.Search,{iconSize:"l"}),css:i.iv`
            width: ${220}px;
            margin: ${2*d.gridUnit}px ${3*d.gridUnit}px;
          `,value:h,onChange:e=>p(e.currentTarget.value)}),(0,i.tZ)("div",{css:i.iv`
          max-height: ${300}px;
          overflow: auto;
        `},v.map((e=>(0,i.tZ)(c.Menu.Item,(0,a.Z)({key:String(e.id),onMouseEnter:()=>g(e.id),onMouseLeave:()=>{m===e.id&&g(null)}},l),(0,i.tZ)(k.rU,{target:"_blank",rel:"noreferer noopener",to:`/superset/dashboard/${e.id}${y}`},(0,i.tZ)("div",{css:i.iv`
                  display: flex;
                  flex-direction: row;
                  align-items: center;
                  max-width: ${220}px;
                `},(0,i.tZ)("div",{css:i.iv`
                    white-space: normal;
                  `},e.dashboard_title),(0,i.tZ)(u.Z.Full,{iconSize:"l",iconColor:d.colors.grayscale.base,css:i.iv`
                    margin-left: ${2*d.gridUnit}px;
                    visibility: ${m===e.id?"visible":"hidden"};
                  `})))))),f&&(0,i.tZ)("div",{css:i.iv`
              margin-left: ${3*d.gridUnit}px;
              margin-bottom: ${d.gridUnit}px;
            `},(0,s.t)("No results found")),Z&&(0,i.tZ)(c.Menu.Item,(0,a.Z)({disabled:!0,css:i.iv`
              min-width: ${220}px;
            `},l),(0,s.t)("None"))))},F="edit_properties",E="export_to_csv",R="export_to_csv_pivoted",$="export_to_json",N="export_to_xlsx",O="download_as_image",A="copy_permalink",L="embed_code",U="share_by_email",z="view_query",q="run_in_sql_lab",j=["pivot_table_v2"],V=o.iK.div`
  ${e=>{let{theme:t}=e;return i.iv`
    display: flex;
    align-items: center;

    & svg {
      width: ${3*t.gridUnit}px;
      height: ${3*t.gridUnit}px;
    }

    & span[role='checkbox'] {
      display: inline-flex;
      margin-right: ${t.gridUnit}px;
    }
  `}}
`,B=((0,o.iK)(p.Z)`
  ${e=>{let{theme:t}=e;return i.iv`
    width: ${8*t.gridUnit}px;
    height: ${8*t.gridUnit}px;
    padding: 0;
    border: 1px solid ${t.colors.primary.dark2};

    &.ant-btn > span.anticon {
      line-height: 0;
      transition: inherit;
    }

    &:hover:not(:focus) > span.anticon {
      color: ${t.colors.primary.light1};
    }
  `}}
`,i.iv`
  .ant-dropdown-menu-item > & > .anticon:first-child {
    margin-right: 0;
    vertical-align: 0;
  }
`),P=function(e,t,n,p,x,_,M){for(var T=arguments.length,w=new Array(T>7?T-7:0),k=7;k<T;k++)w[k-7]=arguments[k];const V=(0,o.Fg)(),{addDangerToast:P,addSuccessToast:H}=(0,m.e1)(),Q=(0,l.I0)(),[Y,K]=(0,r.useState)(null),[G,W]=(0,r.useState)(!1),X=(0,l.v9)((e=>{var t;return null==(t=e.charts)?void 0:t[(0,g.Jp)(e.explore)]})),{datasource:J}=e,ee=(0,r.useCallback)((async()=>{try{const t=(0,s.t)("Superset Chart"),n=await(0,v.YE)(e),a=encodeURIComponent((0,s.t)("%s%s","Check out this chart: ",n));window.location.href=`mailto:?Subject=${t}%20&Body=${a}`}catch(e){P((0,s.t)("Sorry, something went wrong. Try again later."))}}),[P,e]),te=(0,r.useCallback)((()=>t?(0,g.pe)({formData:e,ownState:_,resultType:"full",resultFormat:"csv"}):null),[t,e]),ne=(0,r.useCallback)((()=>t?(0,g.pe)({formData:e,resultType:"post_processed",resultFormat:"csv"}):null),[t,e]),ae=(0,r.useCallback)((()=>(0,g.pe)({formData:e,resultType:"results",resultFormat:"json"})),[e]),re=(0,r.useCallback)((()=>(0,g.pe)({formData:e,resultType:"results",resultFormat:"xlsx"})),[e]),le=(0,r.useCallback)((async()=>{try{if(!e)throw new Error;await(0,Z.Z)((()=>(0,v.YE)(e))),H((0,s.t)("Copied to clipboard!"))}catch(e){P((0,s.t)("Sorry, something went wrong. Try again later."))}}),[P,H,e]),oe=(0,r.useCallback)((t=>{var a;let{key:r,domEvent:l}=t;switch(r){case F:x(),W(!1);break;case E:te(),W(!1),Q((0,y.logEvent)(C.F8,{chartId:null==n?void 0:n.slice_id,chartName:null==n?void 0:n.slice_name}));break;case R:ne(),W(!1),Q((0,y.logEvent)(C.t4,{chartId:null==n?void 0:n.slice_id,chartName:null==n?void 0:n.slice_name}));break;case $:ae(),W(!1),Q((0,y.logEvent)(C.Tl,{chartId:null==n?void 0:n.slice_id,chartName:null==n?void 0:n.slice_name}));break;case N:re(),W(!1),Q((0,y.logEvent)(C.BL,{chartId:null==n?void 0:n.slice_id,chartName:null==n?void 0:n.slice_name}));break;case O:(0,b.Z)(".panel-body .chart-container",null!=(a=null==n?void 0:n.slice_name)?a:(0,s.t)("New chart"),!0)(l),W(!1),Q((0,y.logEvent)(C.xE,{chartId:null==n?void 0:n.slice_id,chartName:null==n?void 0:n.slice_name}));break;case A:le(),W(!1);break;case L:W(!1);break;case U:ee(),W(!1);break;case z:W(!1);break;case q:p(e,l.metaKey),W(!1)}}),[le,te,ne,ae,e,p,x,ee,null==n?void 0:n.slice_name]);return[(0,r.useMemo)((()=>(0,i.tZ)(c.Menu,(0,a.Z)({onClick:oe,selectable:!1},w),(0,i.tZ)(r.Fragment,null,n&&(0,i.tZ)(c.Menu.Item,{key:F},(0,s.t)("Edit chart properties")),(0,i.tZ)(c.Menu.SubMenu,{title:(0,s.t)("Dashboards added to"),key:"dashboards_added_to"},(0,i.tZ)(D,{chartId:null==n?void 0:n.slice_id,dashboards:M})),(0,i.tZ)(c.Menu.Divider,null)),(0,i.tZ)(c.Menu.SubMenu,{title:(0,s.t)("Download"),key:"download_submenu"},j.includes(e.viz_type)?(0,i.tZ)(r.Fragment,null,(0,i.tZ)(c.Menu.Item,{key:E,icon:(0,i.tZ)(u.Z.FileOutlined,{css:B}),disabled:!t},(0,s.t)("Export to original .CSV")),(0,i.tZ)(c.Menu.Item,{key:R,icon:(0,i.tZ)(u.Z.FileOutlined,{css:B}),disabled:!t},(0,s.t)("Export to pivoted .CSV"))):(0,i.tZ)(c.Menu.Item,{key:E,icon:(0,i.tZ)(u.Z.FileOutlined,{css:B}),disabled:!t},(0,s.t)("Export to .CSV")),(0,i.tZ)(c.Menu.Item,{key:$,icon:(0,i.tZ)(u.Z.FileOutlined,{css:B})},(0,s.t)("Export to .JSON")),(0,i.tZ)(c.Menu.Item,{key:O,icon:(0,i.tZ)(u.Z.FileImageOutlined,{css:B})},(0,s.t)("Download as image")),(0,i.tZ)(c.Menu.Item,{key:N,icon:(0,i.tZ)(u.Z.FileOutlined,{css:B})},(0,s.t)("Export to Excel"))),(0,i.tZ)(c.Menu.SubMenu,{title:(0,s.t)("Share"),key:"share_submenu"},(0,i.tZ)(c.Menu.Item,{key:A},(0,s.t)("Copy permalink to clipboard")),(0,i.tZ)(c.Menu.Item,{key:U},(0,s.t)("Share chart by email")),(0,d.cr)(d.TT.EMBEDDABLE_CHARTS)?(0,i.tZ)(c.Menu.Item,{key:L},(0,i.tZ)(h.Z,{triggerNode:(0,i.tZ)("span",null,(0,s.t)("Embed code")),modalTitle:(0,s.t)("Embed code"),modalBody:(0,i.tZ)(I,{formData:e,addDangerToast:P}),maxWidth:100*V.gridUnit+"px",destroyOnClose:!0,responsive:!0})):null),(0,i.tZ)(c.Menu.Divider,null),Y?(0,i.tZ)(r.Fragment,null,(0,i.tZ)(c.Menu.SubMenu,{title:(0,s.t)("Manage email report")},(0,i.tZ)(f.Z,{chart:X,setShowReportSubMenu:K,showReportSubMenu:Y,setIsDropdownVisible:W,isDropdownVisible:G,useTextMenu:!0})),(0,i.tZ)(c.Menu.Divider,null)):(0,i.tZ)(c.Menu,null,(0,i.tZ)(f.Z,{chart:X,setShowReportSubMenu:K,setIsDropdownVisible:W,isDropdownVisible:G,useTextMenu:!0})),(0,i.tZ)(c.Menu.Item,{key:z},(0,i.tZ)(h.Z,{triggerNode:(0,i.tZ)("span",null,(0,s.t)("View query")),modalTitle:(0,s.t)("View query"),modalBody:(0,i.tZ)(S.Z,{latestQueryFormData:e}),draggable:!0,resizable:!0,responsive:!0})),J&&(0,i.tZ)(c.Menu.Item,{key:q},(0,s.t)("Run in SQL Lab")))),[P,t,X,M,oe,G,e,Y,n,V.gridUnit]),G,W]}},15856:(e,t,n)=>{n.d(t,{j:()=>o}),n(67294);var a=n(11965),r=n(70707),l=n(58593);const o=e=>{let{title:t,color:n}=e;return(0,a.tZ)(l.u,{title:t,placement:"top"},(0,a.tZ)(r.Z.InfoCircleOutlined,{css:e=>a.iv`
        color: ${n||e.colors.text.label};
        margin-left: ${2*e.gridUnit}px;
        &.anticon {
          font-size: unset;
          .anticon {
            line-height: unset;
            vertical-align: unset;
          }
        }
      `}))}},41814:(e,t,n)=>{n.d(t,{p:()=>oe});var a=n(73126),r=n(41609),l=n.n(r),o=n(67294),i=n(61988),s=n(11965),d=n(32103),u=n(51995),c=n(11064),h=n(16355),p=n(69363),m=n(83862),g=n(16550),b=n(74069),v=n(35932),Z=n(28216),f=n(57001),y=n(88889),C=n(55786),S=n(99612),x=n(38703),_=n(27600);const M=function(e){let{value:t}=e;return(0,s.tZ)("span",null,t?_.Ly:_.gz)},T=function(){return(0,s.tZ)("span",{css:e=>s.iv`
        color: ${e.colors.grayscale.light1};
      `},_.Wq)};var w=n(42846),I=n(51115);const k=function(e){let{format:t=w.default.DATABASE_DATETIME,value:n}=e;return n?(0,s.tZ)("span",null,(0,I.bt)(t).format(n)):(0,s.tZ)(T,null)};var D=n(94301),F=n(52256),E=n(93197),R=n(87183),$=n(4715),N=n(70707),O=n(99299);const A=function(e){const{headerTitle:t,groupTitle:n,groupOptions:a,value:r,onChange:l}=e,i=(0,u.Fg)(),[d,c]=(0,o.useState)(!1);return(0,s.tZ)("div",{css:s.iv`
        display: flex;
        align-items: center;
      `},(0,s.tZ)(O.Z,{trigger:"click",visible:d,content:(0,s.tZ)("div",null,(0,s.tZ)("div",{css:s.iv`
                font-weight: ${i.typography.weights.bold};
                margin-bottom: ${i.gridUnit}px;
              `},n),(0,s.tZ)(R.Y.Group,{value:r,onChange:e=>{l(e.target.value),c(!1)}},(0,s.tZ)($.T,{direction:"vertical"},a.map((e=>(0,s.tZ)(R.Y,{key:e.value,value:e.value},e.label)))))),placement:"bottomLeft",arrowPointAtCenter:!0},(0,s.tZ)(N.Z.SettingOutlined,{iconSize:"m",iconColor:i.colors.grayscale.light1,css:s.iv`
            margin-top: 3px; // we need exactly 3px to align the icon
            margin-right: ${i.gridUnit}px;
          `,onClick:()=>c(!0)})),t)};var L=n(42190),U=n(53579),z=n(60331),q=n(72813),j=n(89555);function V(e){let{filters:t,setFilters:n,totalCount:a,loading:r,onReload:l}=e;const d=(0,u.Fg)(),c=(0,o.useMemo)((()=>Object.assign({},...t.map((e=>({[(0,q.GA)(e.col)?e.col.label:e.col]:e}))))),[t]),h=(0,o.useCallback)((e=>{const t={...c};delete t[e],n([...Object.values(t)])}),[c,n]),p=(0,o.useMemo)((()=>Object.entries(c).map((e=>{let[t,{val:n,formattedVal:a}]=e;return{colName:t,val:null!=a?a:n}})).sort(((e,t)=>e.colName.localeCompare(t.colName)))),[c]);return(0,s.tZ)("div",{css:s.iv`
        display: flex;
        justify-content: space-between;
        padding: ${d.gridUnit/2}px 0;
        margin-bottom: ${2*d.gridUnit}px;
      `},(0,s.tZ)("div",{css:s.iv`
          display: flex;
          flex-wrap: wrap;
          margin-bottom: -${4*d.gridUnit}px;
        `},p.map((e=>{let{colName:t,val:n}=e;return(0,s.tZ)(z.Z,{closable:!0,onClose:h.bind(null,t),key:t,css:s.iv`
              height: ${6*d.gridUnit}px;
              display: flex;
              align-items: center;
              padding: ${d.gridUnit/2}px ${2*d.gridUnit}px;
              margin-right: ${4*d.gridUnit}px;
              margin-bottom: ${4*d.gridUnit}px;
              line-height: 1.2;
            `},(0,s.tZ)("span",{css:s.iv`
                margin-right: ${d.gridUnit}px;
              `},t),(0,s.tZ)("strong",null,n))}))),(0,s.tZ)("div",{css:s.iv`
          display: flex;
          align-items: center;
          height: min-content;
        `},(0,s.tZ)(j.Z,{loading:r&&!a,rowcount:a}),(0,s.tZ)(N.Z.ReloadOutlined,{iconColor:d.colors.grayscale.light1,iconSize:"l","aria-label":(0,i.t)("Reload"),role:"button",onClick:l})))}var B=n(57557),P=n.n(B),H=n(65946);const Q=50;var Y,K={name:"82a6rk",styles:"flex:1"};function G(e){let{children:t}=e;const{ref:n,height:a}=(0,S.NB)();return(0,s.tZ)("div",{ref:n,css:K},o.cloneElement(t,{height:a}))}function W(e){let{formData:t,initialFilters:n}=e;const a=(0,u.Fg)(),[r,l]=(0,o.useState)(0),d=(0,o.useRef)(r),[c,h]=(0,o.useState)(n),[p,m]=(0,o.useState)(!1),[g,b]=(0,o.useState)(""),[v,f]=(0,o.useState)(new Map),[S,_]=(0,o.useState)({}),w=(0,Z.v9)((e=>e.common.conf.SAMPLES_ROW_LIMIT)),[I,R]=(0,o.useMemo)((()=>t.datasource.split("__")),[t.datasource]),{metadataBar:$,status:N}=(0,U.S)({datasetId:I}),O=(0,o.useMemo)((()=>{const e=v.get(r);return e?(d.current=r,e):v.get(d.current)}),[r,v]),z=(0,o.useMemo)((()=>(null==O?void 0:O.colNames.map(((e,t)=>({key:e,dataIndex:e,title:(null==O?void 0:O.colTypes[t])===y.Z.TEMPORAL?(0,s.tZ)(A,{headerTitle:e,groupTitle:(0,i.t)("Formatting"),groupOptions:[{label:(0,i.t)("Original value"),value:Y.Original},{label:(0,i.t)("Formatted value"),value:Y.Formatted}],value:S[e]===Y.Original?Y.Original:Y.Formatted,onChange:t=>_((n=>({...n,[e]:t})))}):e,render:n=>!0===n||!1===n?(0,s.tZ)(M,{value:n}):null===n?(0,s.tZ)(T,null):(null==O?void 0:O.colTypes[t])===y.Z.TEMPORAL&&S[e]!==Y.Original&&("number"==typeof n||n instanceof Date)?(0,s.tZ)(k,{value:n}):String(n),width:150}))))||[]),[null==O?void 0:O.colNames,null==O?void 0:O.colTypes,S]),q=(0,o.useMemo)((()=>(null==O?void 0:O.data.map(((e,t)=>null==O?void 0:O.colNames.reduce(((t,n)=>({...t,[n]:e[n]})),{key:t}))))||[]),[null==O?void 0:O.colNames,null==O?void 0:O.data]),j=(0,o.useCallback)((()=>{b(""),f(new Map),l(0)}),[]);(0,o.useEffect)((()=>{b(""),f(new Map),l(0)}),[c]),(0,o.useEffect)((()=>{if(v.has(r)&&[...v.keys()].at(-1)!==r){const e=new Map(v);e.delete(r),f(e.set(r,v.get(r)))}}),[r,v]),(0,o.useEffect)((()=>{if(!g&&!p&&!v.has(r)){var e;m(!0);const n=null!=(e=function(e,t){if(!e)return;const n=(0,H.Z)(e),a=P()(n.extras,"having"),r=[...(0,C.Z)(n.filters),...(0,C.Z)(t).map((e=>P()(e,"formattedVal")))];return{granularity:n.granularity,time_range:n.time_range,filters:r,extras:a}}(t,c))?e:{},a=Math.ceil(w/Q);(0,F.getDatasourceSamples)(R,I,!1,n,Q,r+1).then((e=>{f(new Map([...[...v.entries()].slice(1-a),[r,{total:e.total_count,data:e.data,colNames:(0,C.Z)(e.colnames),colTypes:(0,C.Z)(e.coltypes)}]])),b("")})).catch((e=>{b(`${e.name}: ${e.message}`)})).finally((()=>{m(!1)}))}}),[w,I,R,c,t,p,r,g,v]);const B=!g&&!v.size||N===L.ni.LOADING;let K=null;if(g)K=(0,s.tZ)("pre",{css:s.iv`
          margin-top: ${4*a.gridUnit}px;
        `},g);else if(B)K=(0,s.tZ)(x.Z,null);else if(0===(null==O?void 0:O.total)){const e=(0,i.t)("No rows were returned for this dataset");K=(0,s.tZ)(D.x3,{image:"document.svg",title:e})}else K=(0,s.tZ)(G,null,(0,s.tZ)(E.ZP,{data:q,columns:z,size:E.ex.SMALL,defaultPageSize:Q,recordCount:null==O?void 0:O.total,usePagination:!0,loading:p,onChange:e=>l(e.current?e.current-1:0),resizable:!0,virtualize:!0,allowHTML:!0}));return(0,s.tZ)(o.Fragment,null,!B&&$,!B&&(0,s.tZ)(V,{filters:c,setFilters:h,totalCount:null==O?void 0:O.total,loading:p,onReload:j}),K)}!function(e){e[e.Original=0]="Original",e[e.Formatted=1]="Formatted"}(Y||(Y={}));const X=e=>{let{exploreChart:t,closeModal:n}=e;return(0,s.tZ)(o.Fragment,null,(0,s.tZ)(v.Z,{buttonStyle:"secondary",buttonSize:"small",onClick:t},(0,i.t)("Edit chart")),(0,s.tZ)(v.Z,{buttonStyle:"primary",buttonSize:"small",onClick:n},(0,i.t)("Close")))};function J(e){let{chartId:t,formData:n,initialFilters:a,showModal:r,onHideModal:l}=e;const d=(0,u.Fg)(),c=(0,g.k6)(),h=(0,o.useContext)(f.DashboardPageIdContext),{slice_name:p}=(0,Z.v9)((e=>e.sliceEntities.slices[t])),m=(0,o.useMemo)((()=>`/explore/?dashboard_page_id=${h}&slice_id=${t}`),[t,h]),v=(0,o.useCallback)((()=>{c.push(m)}),[m,c]);return(0,s.tZ)(b.default,{show:r,onHide:null!=l?l:()=>null,css:s.iv`
        .ant-modal-body {
          display: flex;
          flex-direction: column;
        }
      `,title:(0,i.t)("Drill to detail: %s",p),footer:(0,s.tZ)(X,{exploreChart:v}),responsive:!0,resizable:!0,resizableConfig:{minHeight:128*d.gridUnit,minWidth:128*d.gridUnit,defaultSize:{width:"auto",height:"75vh"}},draggable:!0,destroyOnClose:!0,maskClosable:!1},(0,s.tZ)(W,{formData:n,initialFilters:a}))}var ee=n(69175),te=n(15856),ne=n(46219);const ae=(0,i.t)("Drill to detail by"),re=e=>{let{children:t,...n}=e;return(0,s.tZ)(m.Menu.Item,(0,a.Z)({disabled:!0},n),(0,s.tZ)("div",{css:s.iv`
        white-space: normal;
        max-width: 160px;
      `},t))},le=(0,u.iK)((e=>{let{children:t,stripHTML:n=!1}=e;const a=n&&"string"==typeof t?(0,d.ZU)(t):t;return(0,s.tZ)("span",null,a)}))`
  ${e=>{let{theme:t}=e;return`\n     font-weight: ${t.typography.weights.bold};\n     color: ${t.colors.primary.base};\n   `}}
`,oe=e=>{let{chartId:t,formData:n,filters:r=[],isContextMenu:d=!1,contextMenuY:u=0,onSelection:g=(()=>null),onClick:b=(()=>null),submenuIndex:v=0,...Z}=e;const[f,y]=(0,o.useState)([]),[C,S]=(0,o.useState)(!1),x=(0,o.useCallback)(((e,t)=>{b(t),g(),y(e),S(!0)}),[b,g]),_=(0,o.useCallback)((()=>{S(!1)}),[]),M=(0,o.useMemo)((()=>{var e;return null==(e=(0,c.Z)().get(n.viz_type))?void 0:e.behaviors.find((e=>e===h.cg.DRILL_TO_DETAIL))}),[n.viz_type]),T=(0,o.useMemo)((()=>{const{metrics:e}=(0,p.Z)(n);return l()(e)}),[n]);let w,I;w=M&&T?(0,s.tZ)(re,(0,a.Z)({},Z,{key:"drill-detail-no-aggregations"}),(0,i.t)("Drill to detail"),(0,s.tZ)(te.j,{title:(0,i.t)("Drill to detail is disabled because this chart does not group data by dimension value.")})):(0,s.tZ)(m.Menu.Item,(0,a.Z)({},Z,{key:"drill-detail-no-filters",onClick:x.bind(null,[])}),(0,i.t)("Drill to detail")),M||(I=(0,s.tZ)(re,(0,a.Z)({},Z,{key:"drill-detail-by-chart-not-supported"}),ae,(0,s.tZ)(te.j,{title:(0,i.t)("Drill to detail by value is not yet supported for this chart type.")}))),M&&T&&(I=(0,s.tZ)(re,(0,a.Z)({},Z,{key:"drill-detail-by-no-aggregations"}),ae));const k=(0,o.useMemo)((()=>(0,ee.th)(u,r.length>1?r.length+1:r.length,v)),[u,r.length,v]);return M&&!T&&null!=r&&r.length&&(I=(0,s.tZ)(m.Menu.SubMenu,(0,a.Z)({},Z,{popupOffset:[0,k],popupClassName:"chart-context-submenu",title:ae}),(0,s.tZ)("div",null,r.map(((e,t)=>(0,s.tZ)(ne.i,(0,a.Z)({},Z,{tooltipText:`${ae} ${e.formattedVal}`,key:`drill-detail-filter-${t}`,onClick:x.bind(null,[e])}),`${ae} `,(0,s.tZ)(le,{stripHTML:!0},e.formattedVal)))),r.length>1&&(0,s.tZ)(m.Menu.Item,(0,a.Z)({},Z,{key:"drill-detail-filter-all",onClick:x.bind(null,r)}),(0,s.tZ)("div",null,`${ae} `,(0,s.tZ)(le,{stripHTML:!1},(0,i.t)("all"))))))),!M||T||null!=r&&r.length||(I=(0,s.tZ)(re,(0,a.Z)({},Z,{key:"drill-detail-by-select-aggregation"}),ae,(0,s.tZ)(te.j,{title:(0,i.t)("Right-click on a dimension value to drill to detail by that value.")}))),(0,s.tZ)(o.Fragment,null,w,d&&I,(0,s.tZ)(J,{chartId:t,formData:n,initialFilters:f,showModal:C,onHideModal:_}))}},46219:(e,t,n)=>{n.d(t,{i:()=>s});var a=n(73126),r=(n(67294),n(3297)),l=n(11965),o=n(83862),i=n(58593);const s=e=>{let{tooltipText:t,children:n,...s}=e;const[d,u]=(0,r.Z)();return(0,l.tZ)(o.Menu.Item,(0,a.Z)({css:l.iv`
        display: flex;
      `},s),(0,l.tZ)(i.u,{title:u?t:null},(0,l.tZ)("div",{ref:d,css:l.iv`
            max-width: 100%;
            ${r.B};
          `},n)))}},69175:(e,t,n)=>{n.d(t,{$t:()=>a,th:()=>r});const a=function(e,t,n,a){void 0===n&&(n=Number.MAX_SAFE_INTEGER),void 0===a&&(a=0);const r=Math.max(document.documentElement.clientHeight||0,window.innerHeight||0),l=Math.min(32*t,n)+32+a;return r-e<l?r-l:e},r=function(e,t,n,r,l){void 0===n&&(n=0),void 0===r&&(r=Number.MAX_SAFE_INTEGER),void 0===l&&(l=0);const o=e+4+32*n+4;return a(o,t,r,l)-o}},88694:(e,t,n)=>{n.d(t,{$i:()=>h,Lt:()=>c});var a=n(73126),r=(n(67294),n(4715)),l=n(51995),o=n(70707),i=n(11965);const s=l.iK.div`
  width: ${e=>{let{theme:t}=e;return.75*t.gridUnit}}px;
  height: ${e=>{let{theme:t}=e;return.75*t.gridUnit}}px;
  border-radius: 50%;
  background-color: ${e=>{let{theme:t}=e;return t.colors.grayscale.light1}};

  font-weight: ${e=>{let{theme:t}=e;return t.typography.weights.normal}};
  display: inline-flex;
  position: relative;

  &:hover {
    background-color: ${e=>{let{theme:t}=e;return t.colors.primary.base}};

    &::before,
    &::after {
      background-color: ${e=>{let{theme:t}=e;return t.colors.primary.base}};
    }
  }

  &::before,
  &::after {
    position: absolute;
    content: ' ';
    width: ${e=>{let{theme:t}=e;return.75*t.gridUnit}}px;
    height: ${e=>{let{theme:t}=e;return.75*t.gridUnit}}px;
    border-radius: 50%;
    background-color: ${e=>{let{theme:t}=e;return t.colors.grayscale.light1}};
  }

  &::before {
    top: ${e=>{let{theme:t}=e;return t.gridUnit}}px;
  }

  &::after {
    bottom: ${e=>{let{theme:t}=e;return t.gridUnit}}px;
  }
`,d=l.iK.div`
  display: flex;
  align-items: center;
  padding: ${e=>{let{theme:t}=e;return 2*t.gridUnit}}px;
  padding-left: ${e=>{let{theme:t}=e;return t.gridUnit}}px;
`;var u;!function(e){e.VERTICAL="vertical",e.HORIZONTAL="horizontal"}(u||(u={}));const c=e=>{let{overlay:t,iconOrientation:n=u.VERTICAL,...l}=e;return(0,i.tZ)(r.Gj,(0,a.Z)({overlay:t},l),(0,i.tZ)(d,null,function(e){return void 0===e&&(e=u.VERTICAL),e===u.HORIZONTAL?(0,i.tZ)(o.Z.MoreHoriz,{iconSize:"xl"}):(0,i.tZ)(s,null)}(n)))},h=e=>(0,i.tZ)(r.Gj,(0,a.Z)({overlayStyle:{zIndex:99,animationDuration:"0s"}},e))},91914:(e,t,n)=>{n.d(t,{Z:()=>d});var a=n(1510),r=n(99543);function l(e){return Object.entries(e).map((e=>{let[t,n]=e;return{col:t,op:Array.isArray(n)?"IN":"==",val:n}})).filter((e=>null!==e.val))}var o=n(87915);const i={},s={};function d(e){let{chart:t,filters:n,nativeFilters:d,chartConfiguration:u,colorScheme:c,colorNamespace:h,sliceId:p,dataMask:m,extraControls:g,labelColors:b,sharedLabelColors:v,allSliceIds:Z}=e;const f=s[p];if(i[p]===n&&(0,r.JB)(null==f?void 0:f.color_scheme,c,{ignoreUndefined:!0})&&(0,r.JB)(null==f?void 0:f.color_namespace,h,{ignoreUndefined:!0})&&(0,r.JB)(null==f?void 0:f.label_colors,b,{ignoreUndefined:!0})&&(0,r.JB)(null==f?void 0:f.shared_label_colors,v,{ignoreUndefined:!0})&&f&&(0,r.JB)(null==f?void 0:f.dataMask,m,{ignoreUndefined:!0})&&(0,r.JB)(null==f?void 0:f.extraControls,g,{ignoreUndefined:!0}))return f;let y={};const C=(0,o.g)({chartConfiguration:u,dataMask:m,nativeFilters:d,allSliceIds:Z}),S=Object.entries(C).filter((e=>{let[,{scope:n}]=e;return n.includes(t.id)})).map((e=>{let[t]=e;return t}));S.length&&(y={extra_form_data:(0,a.vk)(m,S)});const x={...t.form_data,label_colors:b,shared_label_colors:v,...c&&{color_scheme:c},extra_filters:l(n),...y,...g};return i[p]=n,s[p]={...x,dataMask:m,extraControls:g},x}},66124:(e,t,n)=>{n.d(t,{X:()=>h,c:()=>p});var a=n(4788),r=n.n(a),l=n(67294),o=n(51995),i=n(88889),s=n(11965),d=n(50909),u=n(54076),c=n(61587);const h=o.iK.div`
  ${e=>{let{theme:t}=e;return`\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    margin-bottom: ${2*t.gridUnit}px;\n\n    span {\n      flex-shrink: 0;\n    }\n  `}}
`,p=e=>{let{data:t,datasourceId:n,onInputChange:a,columnNames:o,columnTypes:p,isLoading:m}=e;const g=(0,c.W)(n),b=r()(o,p).filter((e=>{let[t,n]=e;return n===i.Z.TEMPORAL&&t&&!g.includes(t)})).map((e=>{let[t]=e;return t})),v=(0,l.useMemo)((()=>(0,u.cD)(t,b)),[t,b]);return(0,s.tZ)(h,null,(0,s.tZ)(d.HS,{onChangeHandler:a}),(0,s.tZ)("div",{css:s.iv`
          display: flex;
          align-items: center;
        `},(0,s.tZ)(d.uy,{data:t,loading:m}),(0,s.tZ)(d.m,{data:v,columns:o})))}},5462:(e,t,n)=>{n.d(t,{T:()=>d});var a=n(67294),r=n(61988),l=n(76962),o=n(50909),i=n(66124),s=n(11965);const d=e=>{let{data:t,colnames:n,coltypes:d,datasourceId:u,dataSize:c=50,isVisible:h}=e;const[p,m]=(0,a.useState)(""),g=(0,o._q)(n,d,t,u,h,{},!0),b=(0,o.C4)(p,t);return(0,s.tZ)(a.Fragment,null,(0,s.tZ)(i.c,{data:b,columnNames:n,columnTypes:d,datasourceId:u,onInputChange:e=>m(e),isLoading:!1}),(0,s.tZ)(l.Z,{columns:g,data:b,pageSize:c,noDataText:(0,r.t)("No results"),emptyWrapperType:l.u.Small,className:"table-condensed",isPaginationSticky:!0,showRowCount:!1,small:!0}))}},21496:(e,t,n)=>{n.d(t,{c9:()=>F,Tg:()=>_});var a,r=n(67294),l=n(51995),o=n(93185),i=n(61988),s=n(70707),d=n(71262),u=n(61337);!function(e){e.Results="results",e.Samples="samples"}(a||(a={}));var c=n(11064),h=n(55786),p=n(38703),m=n(94301),g=n(52256),b=n(98286),v=n(5462),Z=n(66124),f=n(11965);const y=l.iK.pre`
  margin-top: ${e=>{let{theme:t}=e;return 4*t.gridUnit+"px"}};
`,C=new WeakMap,S=e=>{var t;let{isRequest:n,queryFormData:a,queryForce:l,ownState:o,errorMessage:s,actions:d,isVisible:u,dataSize:S=50}=e;const x=(0,c.Z)().get((null==a?void 0:a.viz_type)||(null==a?void 0:a.vizType)),[_,M]=(0,r.useState)([]),[T,w]=(0,r.useState)(!0),[I,k]=(0,r.useState)(""),D=null!=(t=null==x?void 0:x.queryObjectCount)?t:1;if((0,r.useEffect)((()=>{s||(n&&C.has(a)&&(M((0,h.Z)(C.get(a))),k(""),l&&d&&d.setForceQuery(!1),w(!1)),n&&!C.has(a)&&(w(!0),(0,g.getChartDataRequest)({formData:a,force:l,resultFormat:"json",resultType:"results",ownState:o}).then((e=>{let{json:t}=e;M((0,h.Z)(t.result)),k(""),C.set(a,t.result),l&&d&&d.setForceQuery(!1)})).catch((e=>{(0,b.O$)(e).then((e=>{let{error:t,message:n}=e;k(t||n||(0,i.t)("Sorry, an error occurred"))}))})).finally((()=>{w(!1)}))))}),[a,n]),(0,r.useEffect)((()=>{s&&w(!1)}),[s]),T)return Array(D).fill((0,f.tZ)(p.Z,null));if(s){const e=(0,i.t)("Run a query to display results");return Array(D).fill((0,f.tZ)(m.x3,{image:"document.svg",title:e}))}if(I){const e=(0,f.tZ)(r.Fragment,null,(0,f.tZ)(Z.c,{data:[],columnNames:[],columnTypes:[],datasourceId:a.datasource,onInputChange:()=>{},isLoading:!1}),(0,f.tZ)(y,null,I));return Array(D).fill(e)}if(0===_.length){const e=(0,i.t)("No results were returned for this query");return Array(D).fill((0,f.tZ)(m.x3,{image:"document.svg",title:e}))}return _.slice(0,D).map(((e,t)=>(0,f.tZ)(v.T,{data:e.data,colnames:e.colnames,coltypes:e.coltypes,dataSize:S,datasourceId:a.datasource,key:t,isVisible:u})))},x=l.iK.div`
  display: flex;
  flex-direction: column;
  height: 100%;

  .ant-tabs {
    height: 100%;
  }

  .ant-tabs-content {
    height: 100%;
  }

  .ant-tabs-tabpane {
    display: flex;
    flex-direction: column;
  }

  .table-condensed {
    overflow: auto;
  }
`,_=e=>{let{isRequest:t,queryFormData:n,queryForce:r,ownState:l,errorMessage:o,actions:s,isVisible:u,dataSize:c=50}=e;const h=S({errorMessage:o,queryFormData:n,queryForce:r,ownState:l,isRequest:t,actions:s,dataSize:c,isVisible:u});if(1===h.length)return(0,f.tZ)(x,null,h[0]);const p=h.map(((e,t)=>0===t?(0,f.tZ)(d.ZP.TabPane,{tab:(0,i.t)("Results"),key:a.Results},e):(0,f.tZ)(d.ZP.TabPane,{tab:(0,i.t)("Results %s",t+1),key:`${a.Results} ${t+1}`},e)));return(0,f.tZ)(x,null,(0,f.tZ)(d.ZP,{fullWidth:!1},p))};var M=n(76962),T=n(50909);const w=l.iK.pre`
  margin-top: ${e=>{let{theme:t}=e;return 4*t.gridUnit+"px"}};
`,I=new WeakSet,k=e=>{let{isRequest:t,datasource:n,queryForce:a,actions:l,dataSize:o=50,isVisible:s}=e;const[d,u]=(0,r.useState)(""),[c,b]=(0,r.useState)([]),[v,y]=(0,r.useState)([]),[C,S]=(0,r.useState)([]),[x,_]=(0,r.useState)(!1),[k,D]=(0,r.useState)(""),F=(0,r.useMemo)((()=>`${n.id}__${n.type}`),[n]);(0,r.useEffect)((()=>{t&&a&&I.delete(n),t&&!I.has(n)&&(_(!0),(0,g.getDatasourceSamples)(n.type,n.id,a,{}).then((e=>{b((0,h.Z)(e.data)),y((0,h.Z)(e.colnames)),S((0,h.Z)(e.coltypes)),D(""),I.add(n),a&&l&&l.setForceQuery(!1)})).catch((e=>{b([]),y([]),S([]),D(`${e.name}: ${e.message}`)})).finally((()=>{_(!1)})))}),[n,t,a]);const E=(0,T._q)(v,C,c,F,s,{},!0),R=(0,T.C4)(d,c);if(x)return(0,f.tZ)(p.Z,null);if(k)return(0,f.tZ)(r.Fragment,null,(0,f.tZ)(Z.c,{data:R,columnNames:v,columnTypes:C,datasourceId:F,onInputChange:e=>u(e),isLoading:x}),(0,f.tZ)(w,null,k));if(0===c.length){const e=(0,i.t)("No samples were returned for this dataset");return(0,f.tZ)(m.x3,{image:"document.svg",title:e})}return(0,f.tZ)(r.Fragment,null,(0,f.tZ)(Z.c,{data:R,columnNames:v,columnTypes:C,datasourceId:F,onInputChange:e=>u(e),isLoading:x}),(0,f.tZ)(M.Z,{columns:E,data:R,pageSize:o,noDataText:(0,i.t)("No results"),emptyWrapperType:M.u.Small,className:"table-condensed",isPaginationSticky:!0,showRowCount:!1,small:!0}))},D=l.iK.div`
  ${e=>{let{theme:t}=e;return`\n    position: relative;\n    background-color: ${t.colors.grayscale.light5};\n    z-index: 5;\n    overflow: hidden;\n\n    .ant-tabs {\n      height: 100%;\n    }\n\n    .ant-tabs-content-holder {\n      height: 100%;\n    }\n\n    .ant-tabs-content {\n      height: 100%;\n    }\n\n    .ant-tabs-tabpane {\n      display: flex;\n      flex-direction: column;\n      height: 100%;\n\n      .table-condensed {\n        height: 100%;\n        overflow: auto;\n        margin-bottom: ${4*t.gridUnit}px;\n\n        .table {\n          margin-bottom: ${2*t.gridUnit}px;\n        }\n      }\n\n      .pagination-container > ul[role='navigation'] {\n        margin-top: 0;\n      }\n    }\n  `}}
`,F=e=>{let{queryFormData:t,datasource:n,queryForce:c,onCollapseChange:h,chartStatus:p,ownState:m,errorMessage:g,actions:b}=e;const v=(0,l.Fg)(),[y,C]=(0,r.useState)(a.Results),[x,_]=(0,r.useState)({results:!1,samples:!1}),[M,T]=(0,r.useState)(!(0,o.cr)(o.TT.DATAPANEL_CLOSED_BY_DEFAULT)&&(0,u.rV)(u.dR.is_datapanel_open,!1));(0,r.useEffect)((()=>{(0,o.cr)(o.TT.DATAPANEL_CLOSED_BY_DEFAULT)||(0,u.LS)(u.dR.is_datapanel_open,M)}),[M]),(0,r.useEffect)((()=>{M||_({results:!1,samples:!1}),M&&y.startsWith(a.Results)&&"rendered"===p&&_({results:!0,samples:!1}),M&&y===a.Samples&&_({results:!1,samples:!0})}),[M,y,p]);const w=(0,r.useCallback)((e=>{h(e),T(e)}),[h]),I=(0,r.useCallback)(((e,t)=>{M?e===y&&(t.preventDefault(),w(!1)):w(!0),C(e)}),[y,w,M]),F=(0,r.useMemo)((()=>{const e=M?(0,f.tZ)(s.Z.CaretUp,{iconColor:v.colors.grayscale.base,"aria-label":(0,i.t)("Collapse data panel")}):(0,f.tZ)(s.Z.CaretDown,{iconColor:v.colors.grayscale.base,"aria-label":(0,i.t)("Expand data panel")});return(0,f.tZ)(Z.X,null,M?(0,f.tZ)("span",{role:"button",tabIndex:0,onClick:()=>w(!1)},e):(0,f.tZ)("span",{role:"button",tabIndex:0,onClick:()=>w(!0)},e))}),[w,M,v.colors.grayscale.base]),E=S({errorMessage:g,queryFormData:t,queryForce:c,ownState:m,isRequest:x.results,actions:b,isVisible:a.Results===y}).map(((e,t)=>0===t?(0,f.tZ)(d.ZP.TabPane,{tab:(0,i.t)("Results"),key:a.Results},e):t>0?(0,f.tZ)(d.ZP.TabPane,{tab:(0,i.t)("Results %s",t+1),key:`${a.Results} ${t+1}`},e):null));return(0,f.tZ)(D,null,(0,f.tZ)(d.ZP,{fullWidth:!1,tabBarExtraContent:F,activeKey:M?y:"",onTabClick:I},E,(0,f.tZ)(d.ZP.TabPane,{tab:(0,i.t)("Samples"),key:a.Samples},(0,f.tZ)(k,{datasource:n,queryForce:c,isRequest:x.samples,actions:b,isVisible:a.Samples===y}))))}},15423:(e,t,n)=>{n.d(t,{Z:()=>p});var a=n(67294),r=n(51995),l=n(55786),o=n(61988),i=n(38703),s=n(98286),d=n(52256),u=n(85626),c=n(11965);const h=r.iK.div`
  height: 100%;
  display: flex;
  flex-direction: column;
`,p=e=>{const[t,n]=(0,a.useState)([]),[r,p]=(0,a.useState)(!1),[m,g]=(0,a.useState)(null);return(0,a.useEffect)((()=>{p(!0),(0,d.getChartDataRequest)({formData:e.latestQueryFormData,resultFormat:"json",resultType:"query"}).then((e=>{let{json:t}=e;n((0,l.Z)(t.result)),p(!1),g(null)})).catch((e=>{(0,s.O$)(e).then((t=>{let{error:n,message:a}=t;g(n||a||e.statusText||(0,o.t)("Sorry, An error occurred")),p(!1)}))}))}),[JSON.stringify(e.latestQueryFormData)]),r?(0,c.tZ)(i.Z,null):m?(0,c.tZ)("pre",null,m):(0,c.tZ)(h,null,t.map((e=>e.query?(0,c.tZ)(u.Z,{sql:e.query,language:e.language||void 0}):null)))}},53579:(e,t,n)=>{n.d(t,{S:()=>h});var a=n(67294),r=n(51995),l=n(61988),o=n(11965),i=n(29487),s=n(67697),d=n(32871),u=n(42190),c=n(6412);const h=e=>{let{dataset:t,datasetId:n}=e;const h=(0,r.Fg)(),[p,m]=(0,a.useState)(),[g,b]=(0,a.useState)(t?u.ni.COMPLETE:u.ni.LOADING);return(0,a.useEffect)((()=>{!t&&n&&(0,c.e)({endpoint:`/api/v1/dataset/${n}`}).then((e=>{let{json:{result:t}}=e;m(t),b(u.ni.COMPLETE)})).catch((()=>{b(u.ni.ERROR)}))}),[n,t]),{metadataBar:(0,a.useMemo)((()=>{const e=[],n=t||p;if(n){var a,r;const{changed_on_humanized:t,created_on_humanized:o,description:i,table_name:s,changed_by:u,created_by:c,owners:h}=n,p=(0,l.t)("Not available"),m=`${null!=(a=null==c?void 0:c.first_name)?a:""} ${null!=(r=null==c?void 0:c.last_name)?r:""}`.trim()||p,g=u?`${u.first_name} ${u.last_name}`:p,b=(null==h?void 0:h.length)>0?h.map((e=>`${e.first_name} ${e.last_name}`)):[p];e.push({type:d.p.TABLE,title:s}),e.push({type:d.p.LAST_MODIFIED,value:t,modifiedBy:g}),e.push({type:d.p.OWNER,createdBy:m,owners:b,createdOn:o}),i&&e.push({type:d.p.DESCRIPTION,value:i})}return(0,o.tZ)("div",{css:o.iv`
          display: flex;
          margin-bottom: ${4*h.gridUnit}px;
        `},g===u.ni.COMPLETE&&(0,o.tZ)(s.ZP,{items:e,tooltipPlacement:"bottom"}),g===u.ni.ERROR&&(0,o.tZ)(i.Z,{type:"error",message:(0,l.t)("There was an error loading the dataset metadata")}))}),[t,p,g,h.gridUnit]),status:g}}},3003:(e,t,n)=>{n.d(t,{x:()=>B,Z:()=>Y});var a,r,l=n(11965),o=n(73126),i=n(41609),s=n.n(i),d=n(67294),u=n(28216),c=n(75049),h=n(51995),p=n(93185),m=n(85716),g=n(61988),b=n(70707),v=n(12441),Z=n(83862),f=n(87253),y=n(54076),C=n(88694),S=n(17198),x=n(98286),_=n(39666),M=n(29487),T=n(98978),w=n(12353),I=n(9875),k=n(14114);!function(e){e.DASHBOARDS="dashboards",e.CHARTS="charts"}(a||(a={})),function(e){e.TEXT="TEXT",e.PNG="PNG",e.CSV="CSV"}(r||(r={}));var D=n(34858),F=n(20095),E=n(62948);const R=["pivot_table_v2","table","paired_ttest"],$={crontab:"0 12 * * 1"},N={},O=(0,k.ZP)((function(e){var t;let{onHide:n,show:a=!1,dashboardId:o,chart:i,userId:s,userEmail:c,creationMethod:h,dashboardName:p,chartName:m}=e;const v=null==i||null==(t=i.sliceFormData)?void 0:t.viz_type,Z=!!i,f=Z&&v&&R.includes(v),y=f?r.TEXT:r.PNG,C=p||m,S=(0,d.useMemo)((()=>({...$,name:C?(0,g.t)("Weekly Report for %s",C):(0,g.t)("Weekly Report")})),[C]),k=(0,d.useCallback)(((e,t)=>"reset"===t?S:{...e,...t}),[S]),[O,A]=(0,d.useReducer)(k,S),[L,U]=(0,d.useState)(),z=(0,u.I0)(),q=(0,u.v9)((e=>{const t=o?B.DASHBOARDS:B.CHARTS;return(0,D._l)(e,t,o||(null==i?void 0:i.id))||N})),j=q&&Object.keys(q).length;(0,d.useEffect)((()=>{A(j?q:"reset")}),[j,q]);const V=(0,l.tZ)(E.Mv,null,(0,l.tZ)(b.Z.Calendar,null),(0,l.tZ)("span",{className:"text"},j?(0,g.t)("Edit email report"):(0,g.t)("Schedule a new email report"))),P=(0,l.tZ)(d.Fragment,null,(0,l.tZ)(E.OD,{key:"back",onClick:n},(0,g.t)("Cancel")),(0,l.tZ)(E.OD,{key:"submit",buttonStyle:"primary",onClick:async()=>{const e={type:"Report",active:!0,force_screenshot:!1,custom_width:O.custom_width,creation_method:h,dashboard:o,chart:null==i?void 0:i.id,owners:[s],recipients:[{recipient_config_json:{target:c},type:"Email"}],name:O.name,description:O.description,crontab:O.crontab,report_format:O.report_format||y,timezone:O.timezone};A({isSubmitting:!0,error:void 0});try{j?await z((0,_.Me)(O.id,e)):await z((0,_.cq)(e)),n()}catch(e){const{error:t}=await(0,x.O$)(e);A({error:t})}A({isSubmitting:!1})},disabled:!O.name,loading:O.isSubmitting},j?(0,g.t)("Save"):(0,g.t)("Add"))),H=(0,l.tZ)(d.Fragment,null,(0,l.tZ)(E.aQ,null,(0,l.tZ)("h4",null,(0,g.t)("Message content"))),(0,l.tZ)("div",{className:"inline-container"},(0,l.tZ)(E.E5,{onChange:e=>{A({report_format:e.target.value})},value:O.report_format||y},f&&(0,l.tZ)(E.Ks,{value:r.TEXT},(0,g.t)("Text embedded in email")),(0,l.tZ)(E.Ks,{value:r.PNG},(0,g.t)("Image (PNG) embedded in email")),(0,l.tZ)(E.Ks,{value:r.CSV},(0,g.t)("Formatted CSV attached in email"))))),Q=(0,l.tZ)(F.j5,null,(0,l.tZ)("div",{className:"control-label",css:E.yk},F.KL.CUSTOM_SCREENSHOT_WIDTH_TEXT),(0,l.tZ)("div",{className:"input-container"},(0,l.tZ)(I.II,{type:"number",name:"custom_width",value:(null==O?void 0:O.custom_width)||"",placeholder:F.KL.CUSTOM_SCREENSHOT_WIDTH_PLACEHOLDER_TEXT,onChange:e=>{A({custom_width:parseInt(e.target.value,10)||null})}})));return(0,l.tZ)(E.oA,{show:a,onHide:n,title:V,footer:P,width:"432",centered:!0},(0,l.tZ)(E.zV,null,(0,l.tZ)(w.Z,{id:"name",name:"name",value:O.name||"",placeholder:S.name,required:!0,validationMethods:{onChange:e=>{let{target:t}=e;return A({name:t.value})}},label:(0,g.t)("Report Name")}),(0,l.tZ)(w.Z,{id:"description",name:"description",value:(null==O?void 0:O.description)||"",validationMethods:{onChange:e=>{let{target:t}=e;A({description:t.value})}},label:(0,g.t)("Description"),placeholder:(0,g.t)("Include a description that will be sent with your report"),css:E.gt})),(0,l.tZ)(E.nn,null,(0,l.tZ)(E.oo,null,(0,l.tZ)("h4",{css:e=>(0,E.kq)(e)},(0,g.t)("Schedule")),(0,l.tZ)("p",null,(0,g.t)("A screenshot of the dashboard will be sent to your email at"))),(0,l.tZ)(E.xZ,{clearButton:!1,value:O.crontab||"0 12 * * 1",setValue:e=>{A({crontab:e})},onError:U}),(0,l.tZ)(E.G,null,L),(0,l.tZ)("div",{className:"control-label",css:e=>(0,E.Su)(e)},(0,g.t)("Timezone")),(0,l.tZ)(T.Z,{timezone:O.timezone,onTimezoneChange:e=>{A({timezone:e})}}),Z&&H,(!Z||!f)&&Q),O.error&&(0,l.tZ)(M.Z,{type:"error",css:e=>(0,E.gH)(e),message:j?(0,g.t)("Failed to update report"):(0,g.t)("Failed to create report"),description:O.error}))}));var A=n(96022);const L=(0,c.I)(),U=e=>l.iv`
  color: ${e.colors.error.base};
`,z=e=>l.iv`
  & .ant-menu-item {
    padding: 5px 12px;
    margin-top: 0px;
    margin-bottom: 4px;
    :hover {
      color: ${e.colors.grayscale.dark1};
    }
  }
  :hover {
    background-color: ${e.colors.secondary.light5};
  }
`,q=e=>l.iv`
  &:hover {
    color: ${e.colors.grayscale.dark1};
    background-color: ${e.colors.secondary.light5};
  }
`,j=h.iK.div`
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  > *:first-child {
    margin-right: ${e=>{let{theme:t}=e;return t.gridUnit}}px;
  }
`,V=L.get("report-modal.dropdown.item.icon");var B;!function(e){e.CHARTS="charts",e.DASHBOARDS="dashboards"}(B||(B={}));const P={};var H={name:"1e1ncky",styles:"border:none"},Q={name:"833hqy",styles:"width:200px"};function Y(e){let{dashboardId:t,chart:n,useTextMenu:a=!1,setShowReportSubMenu:r,setIsDropdownVisible:i,isDropdownVisible:c,...x}=e;const M=(0,u.I0)(),T=(0,u.v9)((e=>{const a=t?B.DASHBOARDS:B.CHARTS;return(0,D._l)(e,a,t||(null==n?void 0:n.id))||P})),w=(null==T?void 0:T.active)||!1,I=(0,u.v9)((e=>e.user)),k=()=>!!(0,p.cr)(p.TT.ALERT_REPORTS)&&(!(null==I||!I.userId)&&(!!(t||null!=n&&n.id)&&Object.keys(I.roles||[]).map((e=>I.roles[e].filter((e=>"menu_access"===e[0]&&"Manage"===e[1])))).some((e=>e.length>0)))),[F,E]=(0,d.useState)(null),R=(0,h.Fg)(),$=(0,m.D)(t),[N,L]=(0,d.useState)(!1),Y=async(e,t)=>{null!=e&&e.id&&M((0,_.M)(e,t))},K=k()&&!!(t&&$!==t||null!=n&&n.id);(0,d.useEffect)((()=>{K&&M((0,_.Aw)({userId:I.userId,filterField:t?"dashboard_id":"chart_id",creationMethod:t?"dashboards":"charts",resourceId:t||(null==n?void 0:n.id)}))}),[]);const G=T&&r&&k();(0,d.useEffect)((()=>{G?r(!0):!T&&r&&r(!1)}),[T]);const W=()=>{i&&(i(!1),L(!0))};return(0,l.tZ)(d.Fragment,null,k()&&(0,l.tZ)(d.Fragment,null,(0,l.tZ)(O,{userId:I.userId,show:N,onHide:()=>L(!1),userEmail:I.email,dashboardId:t,chart:n,creationMethod:t?B.DASHBOARDS:B.CHARTS}),a?s()(T)?(0,l.tZ)(Z.Menu,(0,o.Z)({selectable:!1},x,{css:z}),(0,l.tZ)(Z.Menu.Item,{onClick:W},V?(0,l.tZ)(j,null,(0,l.tZ)("div",null,(0,g.t)("Set up an email report")),(0,l.tZ)(V,null)):(0,g.t)("Set up an email report")),(0,l.tZ)(Z.Menu.Divider,null)):c&&(0,l.tZ)(Z.Menu,{selectable:!1,css:H},(0,l.tZ)(Z.Menu.Item,{css:q,onClick:()=>Y(T,!w)},(0,l.tZ)(A.ZN,null,(0,l.tZ)(f.ZP,{checked:w,onChange:y.EI}),(0,g.t)("Email reports active"))),(0,l.tZ)(Z.Menu.Item,{css:q,onClick:W},(0,g.t)("Edit email report")),(0,l.tZ)(Z.Menu.Item,{css:q,onClick:()=>{i&&(i(!1),E(T))}},(0,g.t)("Delete email report"))):s()(T)?(0,l.tZ)("span",{role:"button",title:(0,g.t)("Schedule email report"),tabIndex:0,className:"action-button action-schedule-report",onClick:()=>L(!0)},(0,l.tZ)(b.Z.Calendar,null)):(0,l.tZ)(d.Fragment,null,(0,l.tZ)(C.$i,{overlay:(0,l.tZ)(Z.Menu,{selectable:!1,css:Q},(0,l.tZ)(Z.Menu.Item,null,(0,g.t)("Email reports active"),(0,l.tZ)(v.r,{checked:w,onClick:e=>Y(T,e),size:"small",css:(0,l.iv)({marginLeft:2*R.gridUnit},"","")})),(0,l.tZ)(Z.Menu.Item,{onClick:()=>L(!0)},(0,g.t)("Edit email report")),(0,l.tZ)(Z.Menu.Item,{onClick:()=>E(T),css:U},(0,g.t)("Delete email report"))),trigger:["click"],getPopupContainer:e=>e.closest(".action-button")},(0,l.tZ)("span",{role:"button",className:"action-button action-schedule-report",tabIndex:0},(0,l.tZ)(b.Z.Calendar,null)))),F&&(0,l.tZ)(S.Z,{description:(0,g.t)("This action will permanently delete %s.",null==F?void 0:F.name),onConfirm:()=>{F&&(async e=>{await M((0,_.MZ)(e)),E(null)})(F)},onHide:()=>E(null),open:!0,title:(0,g.t)("Delete Report?")})))}},6954:(e,t,n)=>{n.d(t,{z:()=>i});var a=n(67294),r=n(14670),l=n.n(r);const o=new(n(11133).g0)("tab_id_channel");function i(){const[e,t]=(0,a.useState)();return(0,a.useEffect)((()=>{if(!function(){try{return window.localStorage&&window.sessionStorage}catch(e){return!1}}())return void(e||t(l().generate()));const n=()=>{let e;try{e=window.localStorage.getItem("last_tab_id")}catch(e){}const n=String(e?Number.parseInt(e,10)+1:1);try{window.sessionStorage.setItem("tab_id",n),window.localStorage.setItem("last_tab_id",n)}catch(e){}t(n)};let a;try{a=window.sessionStorage.getItem("tab_id")}catch(e){}a?(o.postMessage({type:"REQUESTING_TAB_ID",tabId:a}),t(a)):n(),o.onmessage=t=>{if(t.tabId===e)if("REQUESTING_TAB_ID"===t.type){const e={type:"TAB_ID_DENIED",tabId:t.tabId};o.postMessage(e)}else"TAB_ID_DENIED"===t.type&&n()}}),[e]),e}},6412:(e,t,n)=>{n.d(t,{e:()=>o,f:()=>l});var a=n(31069),r=n(65108);const l=new Map,o=(0,r.g)(a.Z.get,l,(e=>{let{endpoint:t}=e;return t||""}))},56727:(e,t,n)=>{n.d(t,{Z:()=>c});var a=n(46926),r=n.n(a),l=n(21804),o=n.n(l),i=n(61988),s=n(51995),d=n(72570);const u=function(e,t){return void 0===t&&(t=new Date),`${o()(e)}-${t.toISOString().replace(/[: ]/g,"-")}`};function c(e,t,n){return void 0===n&&(n=!1),a=>{const l=n?document.querySelector(e):a.currentTarget.closest(e);return l?r().toJpeg(l,{quality:1,bgcolor:s.K6.colors.grayscale.light4,filter:e=>"string"!=typeof e.className||"mapboxgl-control-container"!==e.className&&!e.className.includes("ant-dropdown")}).then((e=>{const n=document.createElement("a");n.download=`${u(t)}.jpg`,n.href=e,n.click()})).catch((e=>{console.error("Creating image failed",e)})):(0,d.Dz)((0,i.t)("Image download failed, please refresh and try again."))}}},75701:(e,t,n)=>{n.d(t,{J:()=>o});var a=n(61988);const r=(0,a.t)("Create chart"),l=(0,a.t)("Update chart"),o=e=>(0,a.t)("Select values in highlighted field(s) in the control panel. Then run the query by clicking on the %s button.",`"${e?r:l}"`)},99232:(e,t,n)=>{n.d(t,{f:()=>i});var a=n(72813),r=n(61641),l=n(69856),o=n(56565);const i=function(e,t){let n;var i;return void 0===t&&(t=r.P.WHERE),n=(0,a.GA)(e.col)?{expressionType:"SQL",clause:t,sqlExpression:(0,o.c)({expressionType:r.v.SIMPLE,subject:`(${e.col.sqlExpression})`,operator:e.op,comparator:"val"in e?e.val:void 0})}:{expressionType:"SIMPLE",clause:t,operator:e.op,operatorId:null==(i=Object.entries(l.LT).find((t=>t[1].operation===e.op)))?void 0:i[0],subject:e.col,comparator:"val"in e?e.val:void 0},e.isExtra&&Object.assign(n,{isExtra:!0,filterOptionName:`filter_${Math.random().toString(36).substring(2,15)}_${Math.random().toString(36).substring(2,15)}`}),n}}}]);
//# sourceMappingURL=b49912b9abcf13692335.chunk.js.map