@databrainhq/plugin 0.9.43 → 0.9.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -55168,8 +55168,8 @@ function P1e(r) {
55168
55168
  ...r
55169
55169
  };
55170
55170
  }
55171
- const $1e = "_tableData_1inud_7", j1e = "_tableScroll_1inud_13", z1e = "_tableHeadCol_1inud_19", F1e = "_resizer_1inud_25", B1e = "_resizing_1inud_37", V1e = "_tableRow_1inud_43", H1e = "_tableRowCol_1inud_49", W1e = "_truncateText_1inud_57", U1e = "_row_1inud_65", G1e = "_container_1inud_71", Y1e = "_table_1inud_1", Q1e = "_previewTable_1inud_83", Z1e = "_preview_1inud_83", q1e = "_searchButton_1inud_95", X1e = "_previewText_1inud_101", K1e = "_noData_1inud_107", J1e = "_error_1inud_113", e_e = "_errorMsg_1inud_119", t_e = "_tableIcon_1inud_125", r_e = "_stripedRow_1inud_131", n_e = "_rowHover_1inud_137", i_e = "_rightBorder_1inud_143", a_e = "_searchContainer_1inud_149", o_e = "_sortButton_1inud_155", s_e = "_searchTab_1inud_161", l_e = "_searchTabInput_1inud_167", u_e = "_searchTabIcon_1inud_173", c_e = "_noDataHead_1inud_179", h_e = "_noDataBody_1inud_185", f_e = "_showSort_1inud_191", d_e = "_noSort_1inud_197", p_e = "_pagination_1inud_203", v_e = "_rowStyle_1inud_209", g_e = "_rowText_1inud_215", m_e = "_rowsDropdown_1inud_221", y_e = "_pageStyle_1inud_227", b_e = "_buttonContainer_1inud_233", w_e = "_button_1inud_233", __e = "_paginationWrapper_1inud_251", x_e = "_current_1inud_257", M_e = "_textTruncate_1inud_263", $t = {
55172
- "table-loader-container": "_table-loader-container_1inud_1",
55171
+ const $1e = "_tableData_tdj5v_7", j1e = "_tableScroll_tdj5v_13", z1e = "_tableHeadCol_tdj5v_19", F1e = "_resizer_tdj5v_25", B1e = "_resizing_tdj5v_37", V1e = "_tableRow_tdj5v_43", H1e = "_tableRowCol_tdj5v_49", W1e = "_truncateText_tdj5v_57", U1e = "_row_tdj5v_65", G1e = "_container_tdj5v_71", Y1e = "_table_tdj5v_1", Q1e = "_previewTable_tdj5v_83", Z1e = "_preview_tdj5v_83", q1e = "_searchButton_tdj5v_95", X1e = "_previewText_tdj5v_101", K1e = "_noData_tdj5v_107", J1e = "_error_tdj5v_113", e_e = "_errorMsg_tdj5v_119", t_e = "_tableIcon_tdj5v_125", r_e = "_stripedRow_tdj5v_131", n_e = "_rowHover_tdj5v_137", i_e = "_rightBorder_tdj5v_143", a_e = "_searchContainer_tdj5v_149", o_e = "_sortButton_tdj5v_155", s_e = "_searchTab_tdj5v_161", l_e = "_searchTabInput_tdj5v_167", u_e = "_searchTabIcon_tdj5v_173", c_e = "_noDataHead_tdj5v_179", h_e = "_noDataBody_tdj5v_185", f_e = "_showSort_tdj5v_191", d_e = "_noSort_tdj5v_197", p_e = "_pagination_tdj5v_203", v_e = "_rowStyle_tdj5v_209", g_e = "_rowText_tdj5v_215", m_e = "_rowsDropdown_tdj5v_221", y_e = "_pageStyle_tdj5v_227", b_e = "_buttonContainer_tdj5v_233", w_e = "_button_tdj5v_233", __e = "_paginationWrapper_tdj5v_251", x_e = "_current_tdj5v_257", M_e = "_textTruncate_tdj5v_263", $t = {
55172
+ "table-loader-container": "_table-loader-container_tdj5v_1",
55173
55173
  tableData: $1e,
55174
55174
  tableScroll: j1e,
55175
55175
  tableHeadCol: z1e,
package/dist/index.umd.js CHANGED
@@ -659,7 +659,7 @@ echarts.use([`+M+"]);":"Unknown series "+S))}return}if(h==="tooltip"){if(b){proc
659
659
  * @license MIT license.
660
660
  * @copyright (c) 2099 Kent C. Dodds
661
661
  * @author Kent C. Dodds <me@kentcdodds.com> (https://kentcdodds.com)
662
- */const ci={CASE_SENSITIVE_EQUAL:7,EQUAL:6,STARTS_WITH:5,WORD_STARTS_WITH:4,CONTAINS:3,ACRONYM:2,MATCHES:1,NO_MATCH:0};function t0e(r,t,e){var n;if(e=e||{},e.threshold=(n=e.threshold)!=null?n:ci.MATCHES,!e.accessors){const o=N5(r,t,e);return{rankedValue:r,rank:o,accessorIndex:-1,accessorThreshold:e.threshold,passed:o>=e.threshold}}const i=a0e(r,e.accessors),a={rankedValue:r,rank:ci.NO_MATCH,accessorIndex:-1,accessorThreshold:e.threshold,passed:!1};for(let o=0;o<i.length;o++){const s=i[o];let l=N5(s.itemValue,t,e);const{minRanking:c,maxRanking:u,threshold:h=e.threshold}=s.attributes;l<c&&l>=ci.MATCHES?l=c:l>u&&(l=u),l=Math.min(l,u),l>=h&&l>a.rank&&(a.rank=l,a.passed=!0,a.accessorIndex=o,a.accessorThreshold=h,a.rankedValue=s.itemValue)}return a}function N5(r,t,e){return r=E5(r,e),t=E5(t,e),t.length>r.length?ci.NO_MATCH:r===t?ci.CASE_SENSITIVE_EQUAL:(r=r.toLowerCase(),t=t.toLowerCase(),r===t?ci.EQUAL:r.startsWith(t)?ci.STARTS_WITH:r.includes(` ${t}`)?ci.WORD_STARTS_WITH:r.includes(t)?ci.CONTAINS:t.length===1?ci.NO_MATCH:r0e(r).includes(t)?ci.ACRONYM:n0e(r,t))}function r0e(r){let t="";return r.split(" ").forEach(n=>{n.split("-").forEach(a=>{t+=a.substr(0,1)})}),t}function n0e(r,t){let e=0,n=0;function i(l,c,u){for(let h=u,f=c.length;h<f;h++)if(c[h]===l)return e+=1,h+1;return-1}function a(l){const c=1/l,u=e/t.length;return ci.MATCHES+u*c}const o=i(t[0],r,0);if(o<0)return ci.NO_MATCH;n=o;for(let l=1,c=t.length;l<c;l++){const u=t[l];if(n=i(u,r,n),!(n>-1))return ci.NO_MATCH}const s=n-o;return a(s)}function E5(r,t){let{keepDiacritics:e}=t;return r=`${r}`,e||(r=e0e(r)),r}function i0e(r,t){let e=t;typeof t=="object"&&(e=t.accessor);const n=e(r);return n==null?[]:Array.isArray(n)?n:[String(n)]}function a0e(r,t){const e=[];for(let n=0,i=t.length;n<i;n++){const a=t[n],o=o0e(a),s=i0e(r,a);for(let l=0,c=s.length;l<c;l++)e.push({itemValue:s[l],attributes:o})}return e}const k5={maxRanking:1/0,minRanking:-1/0};function o0e(r){return typeof r=="function"?k5:{...k5,...r}}const Et={"table-loader-container":"_table-loader-container_1inud_1",tableData:"_tableData_1inud_7",tableScroll:"_tableScroll_1inud_13",tableHeadCol:"_tableHeadCol_1inud_19",resizer:"_resizer_1inud_25",resizing:"_resizing_1inud_37",tableRow:"_tableRow_1inud_43",tableRowCol:"_tableRowCol_1inud_49",truncateText:"_truncateText_1inud_57",row:"_row_1inud_65",container:"_container_1inud_71",table:"_table_1inud_1",previewTable:"_previewTable_1inud_83",preview:"_preview_1inud_83",searchButton:"_searchButton_1inud_95",previewText:"_previewText_1inud_101",noData:"_noData_1inud_107",error:"_error_1inud_113",errorMsg:"_errorMsg_1inud_119",tableIcon:"_tableIcon_1inud_125",stripedRow:"_stripedRow_1inud_131",rowHover:"_rowHover_1inud_137",rightBorder:"_rightBorder_1inud_143",searchContainer:"_searchContainer_1inud_149",sortButton:"_sortButton_1inud_155",searchTab:"_searchTab_1inud_161",searchTabInput:"_searchTabInput_1inud_167",searchTabIcon:"_searchTabIcon_1inud_173",noDataHead:"_noDataHead_1inud_179",noDataBody:"_noDataBody_1inud_185",showSort:"_showSort_1inud_191",noSort:"_noSort_1inud_197",pagination:"_pagination_1inud_203",rowStyle:"_rowStyle_1inud_209",rowText:"_rowText_1inud_215",rowsDropdown:"_rowsDropdown_1inud_221",pageStyle:"_pageStyle_1inud_227",buttonContainer:"_buttonContainer_1inud_233",button:"_button_1inud_233",paginationWrapper:"_paginationWrapper_1inud_251",current:"_current_1inud_257",textTruncate:"_textTruncate_1inud_263"},s0e=({value:r,onChange:t,debounce:e=500,...n})=>{const[i,a]=$.useState(r);return $.useEffect(()=>{a(r)},[r]),$.useEffect(()=>{const o=setTimeout(()=>{t(i)},e);return()=>clearTimeout(o)},[e,t,i]),I.jsxs("div",{className:`${Et.searchTab} ${n.className||""}`,children:[I.jsx("input",{...n,value:i,onChange:o=>a(o.target.value),className:Et.searchTabInput}),i.toString().length?"":I.jsx(SL,{className:Et.searchTabIcon,color:"#C7C7C7",width:"30px",height:"30px"})]})},l0e="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MDAgNTAwIj48ZGVmcz48c3R5bGU+LmNscy0xe3N0cm9rZTojMTgyYzYwO30uY2xzLTEsLmNscy0ye2ZpbGw6bm9uZTtzdHJva2UtbGluZWNhcDpyb3VuZDtzdHJva2UtbGluZWpvaW46cm91bmQ7fS5jbHMtM3tmaWxsOiM1ODY1ZjY7b3BhY2l0eTouMTt9LmNscy00e2ZpbGw6I2YyZjNmNDt9LmNscy01e2ZpbGw6I2MxYzdjOTt9LmNscy02e2ZpbGw6IzE4MmM2MDt9LmNscy0ye3N0cm9rZTojNTg2NWY2O3N0cm9rZS13aWR0aDo0cHg7fTwvc3R5bGU+PC9kZWZzPjxwYXRoIGNsYXNzPSJjbHMtMyIgZD0ibTI3MS4xMSwxNzkuNzJsLS4wOSwyMC4zM3MuMTksNC4wNS4zOCw0LjUyLjc1LDEuODgsMS40MSwyLjM1LDEuMjcuOTksMi4yMSwxLjMyLDEuMTguNjEsMi42NC42MSwyMi42OC4wNSwyMi42OC4wNWwtMjkuMjItMjkuMThaIi8+PGxpbmUgY2xhc3M9ImNscy0xIiB4MT0iMjAzLjcxIiB5MT0iMjA4LjAxIiB4Mj0iMjM0LjkyIiB5Mj0iMjA4LjAxIi8+PGxpbmUgY2xhc3M9ImNscy0yIiB4MT0iMjAzLjcxIiB5MT0iMTk3LjM0IiB4Mj0iMjQ4LjA0IiB5Mj0iMTk3LjM0Ii8+PHJlY3QgY2xhc3M9ImNscy0xIiB4PSIyMDIuMyIgeT0iMjMwLjM2IiB3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ZWN0IGNsYXNzPSJjbHMtNCIgeD0iMjQyLjY5IiB5PSIyNzcuOTYiIHdpZHRoPSI4LjQ3IiBoZWlnaHQ9IjQiLz48cmVjdCBjbGFzcz0iY2xzLTQiIHg9IjI2MC42MiIgeT0iMjc3Ljk2IiB3aWR0aD0iOC40NyIgaGVpZ2h0PSI0Ii8+PHJlY3QgY2xhc3M9ImNscy00IiB4PSIyNzguODMiIHk9IjI3Ny45NiIgd2lkdGg9IjguNDciIGhlaWdodD0iNCIvPjwvZz48Zz48cmVjdCBjbGFzcz0iY2xzLTQiIHg9IjIwNi4xNyIgeT0iMjg2LjQzIiB3aWR0aD0iOC40NyIgaGVpZ2h0PSI0Ii8+PHJlY3QgY2xhc3M9ImNscy00IiB4PSIyMjQuMjMiIHk9IjI4Ni40MyIgd2lkdGg9IjguNDciIGhlaWdodD0iNCIvPjxyZWN0IGNsYXNzPSJjbHMtNCIgeD0iMjQyLjY5IiB5PSIyODYuNDMiIHdpZHRoPSI4LjQ3IiBoZWlnaHQ9IjQiLz48cmVjdCBjbGFzcz0iY2xzLTQiIHg9IjI2MC42MiIgeT0iMjg2LjQzIiB3aWR0aD0iOC40NyIgaGVpZ2h0PSI0Ii8+PHJlY3QgY2xhc3M9ImNscy00IiB4PSIyNzguODMiIHk9IjI4Ni40MyIgd2lkdGg9IjguNDciIGhlaWdodD0iNCIvPjwvZz48L3N2Zz4=",dl=r=>I.jsxs("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:[I.jsx("path",{fill:"currentColor",d:"M12 2A10 10 0 1 0 22 12A10 10 0 0 0 12 2Zm0 18a8 8 0 1 1 8-8A8 8 0 0 1 12 20Z",opacity:.5}),I.jsx("path",{fill:"currentColor",d:"M20 12h2A10 10 0 0 0 12 2V4A8 8 0 0 1 20 12Z",children:I.jsx("animateTransform",{attributeName:"transform",dur:"1s",from:"0 12 12",repeatCount:"indefinite",to:"360 12 12",type:"rotate"})})]}),u0e=r=>I.jsx("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...r,children:I.jsx("path",{fill:"currentColor",d:"m16 28l-7-7l1.41-1.41L16 25.17l5.59-5.58L23 21l-7 7zm0-24l7 7l-1.41 1.41L16 6.83l-5.59 5.58L9 11l7-7z"})}),c0e=r=>I.jsx("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...r,children:I.jsx("path",{fill:"currentColor",d:"m16 4l7 7l-1.4 1.4L16 6.8l-5.6 5.6L9 11z"})}),h0e=r=>I.jsx("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...r,children:I.jsx("path",{fill:"currentColor",d:"m16 28l-7-7l1.4-1.4l5.6 5.6l5.6-5.6L23 21z"})}),f0e=Bye(),ls=({data:r,isLoading:t,error:e,tableSettings:n,tableName:i,className:a="",onColumnSizingChange:o})=>{var C,S;const{divStyle:s,headerStyle:l}=$.useMemo(()=>{const M={width:"100%",height:(n==null?void 0:n.lineGap)==="small"?"1.5rem":"2.5rem",fontSize:(n==null?void 0:n.lineGap)==="small"?"0.7rem":"1rem",display:"flex",alignItems:"center",justifyContent:n!=null&&n.contentAlignment?`${n.contentAlignment}`:""},L={width:"100%",color:"#182c60",fontSize:(n==null?void 0:n.lineGap)==="small"?"0.7rem":"1rem",height:(n==null?void 0:n.lineGap)==="small"?"1.5rem":"2.5rem",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:"500"};return{divStyle:M,headerStyle:L}},[n==null?void 0:n.lineGap,n==null?void 0:n.contentAlignment]),[c,u]=$.useState([]),[h,f]=$.useState({}),[d,p]=$.useState({label:((C=ni.tableSettings)==null?void 0:C.defaultRowSize)||"10",value:((S=ni.tableSettings)==null?void 0:S.defaultRowSize)||"10"}),[v,g]=$.useState(n==null?void 0:n.columnSizing),[m,y]=$.useState(""),b=(M,L,N,E)=>{const k=t0e(M.getValue(L),N);return E({itemRank:k}),k.passed},[x,w]=$.useState({pageIndex:0,pageSize:10});$.useEffect(()=>{o==null||o(v)},[v]),$.useEffect(()=>{var N,E;if(!(n!=null&&n.defaultRowSize))return;const M=cg.find(k=>k.value===n.defaultRowSize),L={label:((N=ni.tableSettings)==null?void 0:N.defaultRowSize)||"10",value:((E=ni.tableSettings)==null?void 0:E.defaultRowSize)||"10"};p(M||L)},[n==null?void 0:n.defaultRowSize]);const _=$.useMemo(()=>{if(!r||!Array.isArray(r))return[];const{pageIndex:M,pageSize:L}=x;return r.slice(M*L,(M+1)*L)},[x,r,m]),T=$.useMemo(()=>Object.keys((r==null?void 0:r[0])||{}).map(M=>f0e.accessor(M,{header:()=>M,cell:L=>{const N=L.row.original[M];return typeof N=="object"?JSON.stringify(N):typeof N=="boolean"?N?"true":"false":N}})),[r==null?void 0:r[0]]),A=Xye({data:m?Array.isArray(r)?r:[]:_,columns:T,filterFns:{fuzzy:b},state:{sorting:c,globalFilter:m,pagination:x,...v?{columnSizing:v}:{}},enableGlobalFilter:!0,onRowSelectionChange:f,onSortingChange:u,globalFilterFn:b,getCoreRowModel:Vye(),getFilteredRowModel:Gye(),getSortedRowModel:Yye(),onGlobalFilterChange:y,onPaginationChange:w,manualPagination:!0,debugTable:!1,enableColumnResizing:!0,columnResizeMode:"onChange",onColumnSizingChange:g});$.useEffect(()=>{A.setPageSize(Number(d.value))},[d,A]);const D=$.useMemo(()=>{const{pageIndex:M,pageSize:L}=A.getState().pagination,N=m?A.getRowModel().rows.length:(r==null?void 0:r.length)||0,E=N===0?0:L*M+1,k=N<=L*(M+1)?N:L*(M+1);return{from:E,to:k,total:N}},[m,r,A.getState().pagination,A.getRowModel().rows.length]);return I.jsx("div",{className:`${Et.container} ${a}`,children:I.jsxs("div",{className:Et.previewTable,children:[n!=null&&n.enableTableSearch||n!=null&&n.showTableTitle?I.jsxs("div",{className:n.showTableTitle?Et.preview:Et.searchButton,children:[n.showTableTitle&&I.jsx(pe,{styleClass:"font-14c",variant:"h1",className:Et.previewText,children:i}),n.enableTableSearch&&I.jsx(s0e,{value:m,onChange:M=>y(String(M)),placeholder:"Search"})]}):null,I.jsxs("div",{className:Et.tableData,children:[t&&!(r!=null&&r.length)&&I.jsx("div",{className:Et["table-loader-container"],children:I.jsx(dl,{style:{width:"50px",height:"50px",color:"blue"}})}),!!(r!=null&&r.length)&&!t&&I.jsx("div",{className:Et.tableScroll,children:I.jsxs("table",{className:Et.table,children:[I.jsx("thead",{children:A.getHeaderGroups().map(M=>I.jsx("tr",{className:Et.row,children:M.headers.map(L=>I.jsxs("th",{className:Et.tableHeadCol,colSpan:L.colSpan,style:{width:L.getSize()},children:[I.jsx("button",{onMouseDown:L.getResizeHandler(),onTouchStart:L.getResizeHandler(),onDoubleClick:L.column.resetSize,className:`${Et.resizer} ${L.column.getIsResizing()?Et.resizing:""}`,type:"button",title:"Resize Column"}),n!=null&&n.enableSorting?I.jsxs("div",{className:L.column.getCanSort()?Et.sortButton:"",onClick:L.column.getToggleSortingHandler(),children:[L.isPlaceholder?null:I.jsx("div",{style:l,children:z0(L.column.columnDef.header,L.getContext())}),{asc:I.jsx(c0e,{color:"#182c60"}),desc:I.jsx(h0e,{color:"#182c60"})}[L.column.getIsSorted()]??I.jsx(u0e,{color:"#182c60"})]}):I.jsx(I.Fragment,{children:L.isPlaceholder?null:I.jsx("div",{style:l,children:I.jsx(pe,{variant:"p",styleClass:"custom",className:Et.truncateText,children:z0(L.column.columnDef.header,L.getContext())})})})]},L.id))},M.id))}),I.jsx("tbody",{children:(m?A.getRowModel().rows.slice(x.pageSize*x.pageIndex,x.pageSize*(1+x.pageIndex)):A.getRowModel().rows).map((M,L)=>I.jsx("tr",{className:`${Et.tableRow} ${n!=null&&n.showRowHover?Et.rowHover:""} ${n!=null&&n.enableStripedRows&&Number(L)%2!==0?Et.stripedRow:""}`,children:M.getVisibleCells().map(N=>I.jsxs("td",{className:`${Et.tableRowCol} ${n!=null&&n.hideVerticalDivider?"":Et.rightBorder}`,title:typeof N.getValue()=="object"?JSON.stringify(N.getValue()):N.getValue(),children:[!!n&&I.jsx("div",{style:s,children:I.jsx(pe,{variant:"p",styleClass:"custom",className:Et.truncateText,children:z0(N.column.columnDef.cell,N.getContext())})}),!n&&I.jsx("div",{style:{textAlign:"center",width:"100%"},children:z0(N.column.columnDef.cell,N.getContext())})]},N.id))},M.id))})]})}),!(r!=null&&r.length)&&!t&&!e.length&&I.jsxs("div",{className:Et.noData,children:[I.jsx("img",{src:l0e,alt:"no-data",width:"400px",height:"400px"}),I.jsx(pe,{styleClass:"font-14c",variant:"h1",className:Et.noDataHead,children:"No data tables queried"}),I.jsx(pe,{styleClass:"font-14",variant:"p",className:Et.noDataBody,children:"Type your query and input fields beside to generate results and explore data"})]}),e&&I.jsx("div",{className:Et.error,children:I.jsx(pe,{styleClass:"primary",className:Et.errorMsg,variant:"p",children:e})})]}),r&&!(n!=null&&n.disablePagination)&&I.jsxs("div",{className:Et.pagination,children:[I.jsx("div",{className:Et.rowStyle,children:I.jsx($r,{onChange:p,selectedOption:d,options:cg,labelVariant:"static",dropdownAbove:!0,buttonClass:Et.rowsDropdown})}),I.jsxs("span",{className:Et.pageStyle,children:[D.from,"-",D.to," of ",D.total]}),I.jsxs("div",{className:Et.buttonContainer,children:[I.jsx(xe,{variant:"custom",type:"button",className:Et.button,onClick:()=>A.previousPage(),isDisabled:D.from<=1,children:"Prev"}),I.jsx(xe,{variant:"custom",type:"button",className:Et.button,onClick:()=>A.nextPage(),isDisabled:D.to>=D.total,children:"Next"})]})]})]})})},O5=["rgb(56, 72, 211)","rgb(251, 208, 98)","rgb(234 88 12)","rgb(245 158 11)","rgb(234 179 8)","rgb(34 197 94)","rgb(4 120 87)","rgb(15 118 110)","rgb(8 145 178)","rgb(219 234 254)","rgb(30 58 138)","rgb(139 92 246)"],R5=({data:r,measure:t,sankeyValues:e,singleValue:n,step:i,xAxis:a,yAxisList:o})=>{const s=Array.isArray(r)?r.map(f=>a&&f[a]):[],l=o==null?void 0:o.map((f,d)=>({label:f,data:Array.isArray(r)?r.map(p=>p[o[d]]):[],borderColor:O5[d]})),c=Array.isArray(r)&&i&&t?r.map(f=>({value:f[t],name:f[i]})):[],u=e==null?void 0:e.map((f,d)=>Array.isArray(r)?r.map(p=>p[e[d]]):[]),h=Array.isArray(r)&&n?r.map(f=>f[n]):[];return{labels:s,datasets:l,funnelData:c,sankeyData:u,singleValueData:h}},d0e=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],P5=({dataArray:r,timeStampKey:t,type:e,valuekeys:n,groupBy:i,labelSettings:a,customSettings:o,backGroundColor:s})=>n.map(u=>r.sort((f,d)=>new Date(f[t]).getTime()-new Date(d[t]).getTime()).reduce((f,d)=>{const v={yearly:m=>m.getFullYear(),monthly:m=>{const y=m.getMonth(),b=m.getFullYear();return`${d0e[y]} - ${b}`},weekly:m=>{const y=new Date(m.getTime());return y.setDate(m.getDate()-m.getDay()),y.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})},daily:m=>`${m.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}`,quarterly:m=>{const y=m.getMonth(),b=Math.floor(y/3)+1,x=m.getFullYear();return`Q${b} ${x}`}}[i],g=v(new Date(d[t]));return f[g]||(f[g]=0),f[g]+=d[u],f},{})).map((u,h)=>({data:Object.entries(u),type:e==="area"?"line":e,name:n[h],label:{show:a.show,position:a.position},emphasis:{focus:"series"},...e==="area"?{areaStyle:{}}:{areaStyle:{opacity:0}},...e==="bar"?{barWidth:`${(o==null?void 0:o.barWidth)||0}%`,showBackground:s==null?void 0:s.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"},itemStyle:{borderRadius:o==null?void 0:o.barRadius}}:{}})),tT=({data:r,timeStampKey:t,valuekeys:e})=>!Array.isArray(r)||r.length<2?!1:r.every(n=>{const i=new Date(n[t]);return!Number.isNaN(i.getTime())&&e.every(a=>typeof n[a]=="number")}),or=(r,t)=>r.length>t?`${r.slice(0,t)}...`:r,$5=(r,t)=>{let e="";if(t)switch(parseInt(r,10).toString().length){case 1:case 2:case 3:e=r;break;case 4:e=`${r.toString().slice(0,1)}.${r.toString().slice(1,3)}k`;break;case 5:e=`${r.toString().slice(0,2)}.${r.toString().slice(2,4)}k`;break;case 6:e=`${r.toString().slice(0,3)}.${r.toString().slice(3,5)}k`;break;case 7:e=`${r.toString().slice(0,1)}.${r.toString().slice(1,3)}M`;break;case 8:e=`${r.toString().slice(0,2)}.${r.toString().slice(2,4)}M`;break;case 9:e=`${r.toString().slice(0,3)}.${r.toString().slice(3,5)}M`;break;case 10:e=`${r.toString().slice(0,1)}.${r.toString().slice(1,3)}B`;break}else switch(parseInt(r,10).toString().length){case 1:case 2:case 3:e=r;break;case 4:e=`${r.toString().slice(0,1)}k`;break;case 5:e=`${r.toString().slice(0,2)}k`;break;case 6:e=`${r.toString().slice(0,3)}k`;break;case 7:e=`${r.toString().slice(0,1)}M`;break;case 8:e=`${r.toString().slice(0,2)}M`;break;case 9:e=`${r.toString().slice(0,3)}M`;break;case 10:e=`${r.toString().slice(0,1)}B`;break}return e},p0e=(r,t)=>{const e=new Intl.NumberFormat;switch(t){case"original":return r;case"3s":case"adaptive":return $5(r,!0);case"percent":return`${r}%`;case"d":return parseInt(r,10).toLocaleString();case"1s":{let n=r.toString().slice(0,1);const i=Math.floor(Number(r));for(let o=1;o<i.toString().length;o+=1)n+=0;return $5(n,!1)}case"1f":{const n=Number(r).toFixed(1),i=e.format(n);return r.toString().includes(".")?i:`${i}.${Array(2).join("0")}`}case"2f":{const n=Number(r).toFixed(2),i=e.format(n);return r.toString().includes(".")?r.toString().split(".")[1].length>1?i:`${i}${Array(2).join("0")}`:`${i}.${Array(3).join("0")}`}case"3f":{const n=Number(r).toFixed(3),i=e.format(n);if(r.toString().includes(".")){const a=r.toString().split(".");return a[1].length>2?i:a[1].length===2?`${i}${Array(2).join("0")}`:`${i}${Array(3).join("0")}`}return`${i}.${Array(4).join("0")}`}case"+":return`+${e.format(r)}`;case"$":{const n=Number(r).toFixed(2),i=e.format(n);return r.toString().includes(".")?r.toString().split(".")[1].length>1?`$${i}`:`$${i}${Array(2).join("0")}`:`$${i}.${Array(3).join("0")}`}case"1%":{const n=Number(r)*100,i=Number(n).toFixed(1),a=e.format(i);return n.toString().includes(".")?`${a}%`:`${a}.${Array(2).join("0")}%`}case"2%":{const n=Number(r)*100,i=Number(n).toFixed(2),a=e.format(i);return n.toString().includes(".")?r.toString().split(".")[1].length>1?`${a}%`:`${a}.${Array(2).join("0")}`:`${a}.${Array(3).join("0")}%`}case"3%":{const n=r*100,i=Number(n).toFixed(3),a=e.format(i);return n.toString().includes(".")?r.toString().split(".")[1].length>1?`${a}%`:`${a}.${Array(3).join("0")}`:`${a}.${Array(4).join("0")}%`}case"ms1":{const n=Math.floor(Number(r)/1e3),i=Number(r)%1e3;return`${n}.${i.toString().slice(0,1)}s`}case"ms2":{const n=Math.floor(Number(r)/1e3),i=Math.floor(Number(r)%1e3),a=Number(r)-Math.floor(Number(r)),o=Math.floor(a*1e3),s=a*1e3-o,l=Math.floor(s*1e3);let c="";return n&&(c+=`${n}s `),i&&(c+=`${i}ms `),o&&(c+=`${o}µs`),l&&(c+=`${l}ns`),c}case"4r":return Math.floor(Math.round(Number(r)));default:return r}},v0e=({chartOptions:r,data:t=[],colors:e})=>{var m,y,b,x,w,_,T,A,D,C,S,M,L,N,E,k;const{labels:n,datasets:i,funnelData:a,sankeyData:o,singleValueData:s}=R5({data:t,measure:r.measure,step:r.step,xAxis:r.xAxis,yAxisList:r.yAxisList,singleValue:r.singleValue,sankeyValues:r.sankeyValues}),l={...ni.margins,...r.margins},c={...ni.labelSettings,...r.labelSettings},u={...ni.legendSettings,...r.legendSettings},h={...ni.customSettings,...r.customSettings},f={...ni.tableSettings,...r.tableSettings},d={...ni.axisSettings,...r.axisSettings},p={...ni.backGroundColor,...r.backGroundColor},v={...ni.timeSeriesSettings,seriesType:((m=r.yAxisList)==null?void 0:m.map(O=>({column:O,type:"bar"})))||[],...r.timeSeriesSettings},g={...e!=null&&e.length?{color:e}:{}};switch(r.chartType){case ye.line:{Object.assign(g,{...g,tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"line",lineStyle:{color:"rgba(0,0,0,0.2)",width:1,type:"solid"}}},grid:{left:`${l.marginLeft}%`,bottom:`${l.marginBottom}%`,top:`${l.marginTop}%`,right:`${l.marginRight}%`,containLabel:!0},toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},xAxis:{type:"category",boundaryGap:!1,data:n,splitLine:{show:h.hideSplitLines==="horizontal"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="y"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="y"||h.axisLabels==="none",formatter(O){return or(O,c.truncateLabelValue||14)}}},yAxis:{type:"value",position:d.axis,splitLine:{show:h.hideSplitLines==="vertical"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="x"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="x"||h.axisLabels==="none"}},legend:{show:u.show,top:u.top,left:u.left,right:u.right,bottom:u.bottom,orient:u.position,formatter(O){return`{a|${or(O,u.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(O){return O.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}},data:i==null?void 0:i.map(O=>O.label)},series:i==null?void 0:i.map(O=>({data:O.data,type:"line",name:O.label,label:{show:c.show,position:c.position},emphasis:{focus:"series"}}))});break}case ye.bar:{Object.assign(g,{...g,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"}},grid:{left:`${l.marginLeft}%`,bottom:`${l.marginBottom}%`,top:`${l.marginTop}%`,right:`${l.marginRight}%`,containLabel:!0},xAxis:{type:"category",data:n,axisTick:{alignWithLabel:!0},axisLabel:{show:h.axisLabels==="y"||h.axisLabels==="none",interval:0,rotate:h.xRotation,hideOverlap:!0,formatter(O){return or(O,c.truncateLabelValue||14)}},splitLine:{show:h.hideSplitLines==="horizontal"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="y"||h.hideAxisLines==="none"}},yAxis:{type:"value",position:d.axis,splitLine:{show:h.hideSplitLines==="vertical"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="x"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="x"||h.axisLabels==="none"}},legend:{data:i==null?void 0:i.map(O=>O.label),show:u.show,top:u.top,left:u.left,right:u.right,bottom:u.bottom,orient:u.position,formatter(O){return`{a|${or(O,u.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(O){return O.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},series:i==null?void 0:i.map(O=>({data:O.data,type:"bar",name:O.label,barWidth:`${h.barWidth||0}%`,label:{show:c.show,position:c.position},showBackground:p.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"},itemStyle:{borderRadius:h.barRadius}}))});break}case ye.stack:{const O=(()=>{if(!i||!h.showFullStacked)return;const R={};return i.forEach(P=>{const j=P.data.map((B,F)=>{const V=i.reduce((H,G)=>H+G.data[F],0);return(B/V*100).toFixed(2)});R[P.label]=j}),R})();Object.assign(g,{...g,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},grid:{left:`${l.marginLeft}%`,bottom:`${l.marginBottom}%`,top:`${l.marginTop}%`,right:`${l.marginRight}%`,containLabel:!0},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"},formatter:R=>`${R.map(P=>`${P.seriesName}: ${P.value}<br />`).join("")}`},xAxis:{type:"category",data:n,splitLine:{show:h.hideSplitLines==="horizontal"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="y"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="y"||h.axisLabels==="none",formatter(R){return or(R,c.truncateLabelValue||14)}}},yAxis:{type:"value",max:h.showFullStacked?100:void 0,position:d.axis,splitLine:{show:h.hideSplitLines==="vertical"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="x"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="x"||h.axisLabels==="none",formatter:"{value} %"}},legend:{show:u.show,top:u.top,left:u.left,right:u.right,bottom:u.bottom,orient:u.position,data:i==null?void 0:i.map(R=>R.label),formatter(R){return`{a|${or(R,u.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(R){return R.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},series:i==null?void 0:i.map(R=>({data:h.showFullStacked?O[R.label]:R.data,type:"bar",name:R.label,stack:"x",barWidth:`${h.barWidth}%`,emphasis:{focus:"series"},label:{show:c.show,position:c.position},showBackground:p.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"},itemStyle:{borderRadius:h.barRadius}}))});break}case ye.area:{i==null||i.map(O=>Object.assign(O,{fill:!0})),Object.assign(g,{...g,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"cross",label:{backgroundColor:"#6a7985"}}},legend:{show:u.show,top:u.top,left:u.left,right:u.right,bottom:u.bottom,orient:u.position,data:i==null?void 0:i.map(O=>O.label),formatter(O){return`{a|${or(O,u.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(O){return O.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},grid:{left:`${l.marginLeft}%`,bottom:`${l.marginBottom}%`,top:`${l.marginTop}%`,right:`${l.marginRight}%`,containLabel:!0},xAxis:[{type:"category",boundaryGap:!1,data:n,splitLine:{show:h.hideSplitLines==="horizontal"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="y"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="y"||h.axisLabels==="none",formatter(O){return or(O,c.truncateLabelValue||14)}}}],yAxis:[{type:"value",position:d.axis,splitLine:{show:h.hideSplitLines==="vertical"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="x"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="x"||h.axisLabels==="none"}}],series:i==null?void 0:i.map(O=>({data:O.data,type:"line",name:O.label,stack:"Total",areaStyle:{},emphasis:{focus:"series"},label:{show:c.show,position:c.position},showBackground:p.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"}}))});break}case ye.boxplot:{const O=[],R=[];i==null||i.map(P=>{O.push(P.data),R.push(P.label)}),Object.assign(g,{...g,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},title:[{text:"Box Plot",left:"center"}],legend:{show:u.show,top:u.top,left:u.left,right:u.right,bottom:u.bottom,orient:u.position,data:i==null?void 0:i.map(P=>P.label),formatter(P){return`{a|${or(P,u.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(P){return P.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},dataset:[{source:O},{transform:{type:"boxplot",config:{itemNameFormatter:"expr {value}"}}},{fromDatasetIndex:1,fromTransformResult:1}],tooltip:{trigger:"item",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"}},grid:{left:`${l.marginLeft}%`,bottom:`${l.marginBottom}%`,top:`${l.marginTop}%`,right:`${l.marginRight}%`,containLabel:!0},xAxis:{type:"category",boundaryGap:!0,nameGap:30,splitArea:{show:!1},splitLine:{show:h.hideSplitLines==="horizontal"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="y"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="y"||h.axisLabels==="none"}},yAxis:{type:"value",position:d.axis,splitArea:{show:!0},splitLine:{show:h.hideSplitLines==="vertical"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="x"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="x"||h.axisLabels==="none"}},series:[{name:"boxplot",type:"boxplot",datasetIndex:1},{name:"outlier",type:"scatter",datasetIndex:2}]});break}case ye.bubble:{const O=[],R=()=>{const j="0123456789ABCDEF";let B="#";for(let F=0;F<6;F+=1)B+=j[Math.floor(Math.random()*16)];return B};let P=8;i==null||i.map(j=>{const B=[];let F=0;const V=j.label;j.data.map(H=>{B.push([n[F],H,V]),F+=1}),O.push(B)}),Object.assign(g,{...g,tooltip:{backgroundColor:"black",textStyle:{color:"white"}},toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},legend:{show:u.show,top:u.top,left:u.left,right:u.right,bottom:u.bottom,orient:u.position,data:O.map(j=>j[0][2]),formatter(j){return`{a|${or(j,u.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(j){return j.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},grid:{left:`${l.marginLeft}%`,bottom:`${l.marginBottom}%`,top:`${l.marginTop}%`,right:`${l.marginRight}%`,containLabel:!0},xAxis:{splitLine:{show:h.hideSplitLines==="horizontal"||h.hideSplitLines==="none",lineStyle:{type:"dashed"}},axisLine:{show:h.hideAxisLines==="y"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="y"||h.axisLabels==="none",formatter(j){return or(j,c.truncateLabelValue||14)}}},yAxis:{position:d.axis,scale:!0,splitLine:{show:h.hideSplitLines==="vertical"||h.hideSplitLines==="none",lineStyle:{type:"dashed"}},axisLine:{show:h.hideAxisLines==="x"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="x"||h.axisLabels==="none"}},series:O.map(j=>{P+=3;const B=R();return{name:j[0][2],data:j.map(F=>({name:F[0],value:F[1]})),type:"scatter",symbolSize:P,emphasis:{focus:"series"},itemStyle:{color:B},label:{show:c.show,position:c.position}}})});break}case ye.combo:{const O=(y=r.yAxisList)==null?void 0:y.map((R,P)=>({type:P===0?"line":"bar",data:t.map(j=>j[R]),name:R,label:{show:c.show,position:c.position},showBackground:p.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"}}));Object.assign(g,{...g,grid:{left:`${l.marginLeft}%`,bottom:`${l.marginBottom}%`,top:`${l.marginTop}%`,right:`${l.marginRight}%`,containLabel:!0},toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"cross",crossStyle:{color:"#999"}}},legend:{show:u.show,top:u.top,left:u.left,right:u.right,bottom:u.bottom,orient:u.position,data:i==null?void 0:i.map(R=>R.label),formatter(R){return`{a|${or(R,u.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(R){return R.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},xAxis:[{type:"category",data:n,axisPointer:{type:"shadow"},splitLine:{show:h.hideSplitLines==="horizontal"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="y"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="y"||h.axisLabels==="none",formatter(R){return or(R,c.truncateLabelValue||14)}}}],yAxis:[{type:"value",interval:0,splitLine:{show:h.hideSplitLines==="vertical"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="x"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="x"||h.axisLabels==="none"}},{type:"value",interval:0,splitLine:{show:h.hideSplitLines==="vertical"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="x"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="x"||h.axisLabels==="none",formatter(R){return or(R,c.truncateLabelValue||14)}}}],series:O});break}case ye.pie:{const O=()=>({type:"pie",radius:"80%",data:(i==null?void 0:i.map((B,F)=>({value:B.data,name:n[F]||"undefined"})))||[],label:{show:!1},labelLine:{show:!1}}),R=()=>{let j=100;const B=[];return i==null||i.map(F=>{const V=[];let H=0;F.data.map(G=>{const Y={value:G,name:n[H]};V.push(Y),H+=1}),B.push([F.label,V])}),B.map(F=>(j-=20,{name:F[0],type:"pie",radius:`${j}%`,data:F[1],emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},label:{show:c.show,position:c.position},labelLine:{show:!1}}))},P=i!=null&&i.length&&((x=(b=i[0])==null?void 0:b.data)==null?void 0:x.length)>1?R():O();Object.assign(g,{...g,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},tooltip:{trigger:"item",backgroundColor:"black",textStyle:{color:"white"}},legend:{data:i!=null&&i.length&&((_=(w=i[0])==null?void 0:w.data)==null?void 0:_.length)>1||i==null?void 0:i[0],show:u.show,top:u.position==="horizontal"?"420px":u.top,left:u.left,right:u.right,bottom:u.bottom,orient:u.position,type:"scroll",formatter(j){return`{a|${or(j,u.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(j){return j.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},grid:{left:`${l.marginLeft}%`,bottom:`${l.marginBottom}%`,top:`${l.marginTop}%`,right:`${l.marginRight}%`,containLabel:!0},series:P});break}case ye.doughnut:{const O=()=>{const j=i==null?void 0:i.map((B,F)=>({value:B.data,name:n[F]||"undefined"}));return{type:"pie",radius:["30%","70%"],avoidLabelOverlap:!1,label:{show:c.show,position:c.position},data:j||[],labelLine:{show:!1}}},R=()=>{const j=[];let B=70,F=100;return i==null||i.map(V=>{const H=[];let G=0;V.data.map(Y=>{const J={value:Y,name:n[G]};H.push(J),G+=1}),j.push([V.label,H])}),j.map(V=>(B-=20,F-=20,{name:V[0],type:"pie",radius:[`${B}%`,`${F}%`],avoidLabelOverlap:!1,label:{show:c.show,position:c.position},data:V[1],labelLine:{show:!1}}))},P=n.length>1?R():O();Object.assign(g,{toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},tooltip:{trigger:"item",backgroundColor:"black",textStyle:{color:"white"}},legend:{data:n.length>1||i==null?void 0:i[0],show:u.show,top:u.position==="horizontal"?"420px":u.top,left:u.left,right:u.right,bottom:u.bottom,orient:u.position,type:"scroll",formatter(j){return`{a|${or(j,u.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(j){return j.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},grid:{left:`${l.marginLeft}%`,bottom:`${l.marginBottom}%`,top:`${l.marginTop}%`,right:`${l.marginRight}%`,containLabel:!0},series:P});break}case ye.row:{Object.assign(g,{...g,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"cross",label:{backgroundColor:"#6a7985"}}},legend:{show:u.show,top:u.top,left:u.left,right:u.right,bottom:u.bottom,orient:u.position,data:i==null?void 0:i.map(O=>O.label),formatter(O){return`{a|${or(O,u.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(O){return O.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},grid:{left:`${l.marginLeft}%`,bottom:`${l.marginBottom}%`,top:`${l.marginTop}%`,right:`${l.marginRight}%`,containLabel:!0},xAxis:{type:"value",boundaryGap:[0,.01],splitLine:{show:h.hideSplitLines==="horizontal"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="y"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="y"||h.axisLabels==="none"}},yAxis:{type:"category",data:n,splitLine:{show:h.hideSplitLines==="vertical"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="x"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="x"||h.axisLabels==="none",formatter(O){return or(O,c.truncateLabelValue||14)}}},series:i==null?void 0:i.map(O=>({data:O.data,type:"bar",name:O.label,barWidth:`${h.barWidth}%`,emphasis:{focus:"series"},label:{show:c.show,position:c.position},showBackground:p.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"},itemStyle:{borderRadius:h.barRadius}}))});break}case ye.histogram:{Object.assign(g,{...g,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"}},grid:{left:`${l.marginLeft}%`,bottom:`${l.marginBottom}%`,top:`${l.marginTop}%`,right:`${l.marginRight}%`,containLabel:!0},legend:{show:u.show,top:u.top,left:u.left,right:u.right,bottom:u.bottom,orient:u.position,data:i==null?void 0:i.map(O=>O.label),formatter(O){return`{a|${or(O,u.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(O){return O.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},xAxis:[{type:"category",data:n,axisTick:{alignWithLabel:!0},splitLine:{show:h.hideSplitLines==="horizontal"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="y"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="y"||h.axisLabels==="none",formatter(O){return or(O,c.truncateLabelValue||14)}}}],yAxis:[{type:"value",position:d.axis,splitLine:{show:h.hideSplitLines==="vertical"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="x"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="x"||h.axisLabels==="none"}}],series:[{name:(T=i==null?void 0:i[0])==null?void 0:T.label,type:"bar",barWidth:"100%",data:(A=i==null?void 0:i[0])==null?void 0:A.data,label:{show:c.show,position:c.position},showBackground:p.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"}}]});break}case ye.funnel:{Object.assign(g,{...g,tooltip:{trigger:"item",formatter:h.showConversionRate?O=>{var P,j;let R=100;return O.dataIndex>0&&(R=(((P=a[O.dataIndex])==null?void 0:P.value)||0)/(((j=a[O.dataIndex-1])==null?void 0:j.value)||1)*100),`${O.name}: ${R.toFixed(0)}%`}:h.showLabelValues?"{b}: {c}":h.labelFormat||"{b}",backgroundColor:"black",textStyle:{color:"white"}},legend:{show:u.show,top:u.top,left:u.left,right:u.right,bottom:u.bottom,orient:u.position,data:a,formatter(O){return`{a|${or(O,u.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(O){return O.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},grid:{left:`${l.marginLeft}%`,bottom:`${l.marginBottom}%`,top:`${l.marginTop}%`,right:`${l.marginRight}%`,containLabel:!0},series:[{name:"Funnel",type:"funnel",left:"10%",top:60,bottom:60,width:"80%",height:"60%",min:0,max:100,minSize:"0%",maxSize:"100%",sort:"none",gap:3,label:{show:c.show,position:c.position,formatter:h.showConversionRate?O=>{var P,j;let R=100;return O.dataIndex>0&&(R=(((P=a[O.dataIndex])==null?void 0:P.value)||0)/(((j=a[O.dataIndex-1])==null?void 0:j.value)||1)*100),`${O.name}: ${R.toFixed(0)}%`}:h.showLabelValues?"{b}: {c}":h.labelFormat||"{b}"},labelLine:{length:10,lineStyle:{width:1,type:"solid"}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{fontSize:20}},data:a}]});break}case ye.gauge:{let O={};if(i!=null&&i.length){const B=(D=i[0])==null?void 0:D.data,F=[B[0]];if(B.length)for(let V=1;V<B.length-1;V++)F.push(F[V-1]-B[V]);F.push(B[B.length-1]),O={labels:n,datasets:[B,F]}}const R=Array.isArray(O)?O:[],P=R.reduce((B,F)=>B+F.value,0),j=Math.floor(P/R.length);Object.assign(g,{...g,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},grid:{left:`${l.marginLeft}%`,bottom:`${l.marginBottom}%`,top:`${l.marginTop}%`,right:`${l.marginRight}%`,containLabel:!0},legend:{show:u.show,top:u.top,left:u.left,right:u.right,bottom:u.bottom,orient:u.position,formatter(B){return`{a|${or(B,u.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(B){return B.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},series:[{type:"gauge",center:["50%","60%"],startAngle:200,endAngle:-20,min:0,max:j+100,splitNumber:12,itemStyle:{color:"blue"},progress:{show:!0,width:20},pointer:{show:!0},axisLine:{lineStyle:{width:30}},axisTick:{distance:-45,splitNumber:5,lineStyle:{width:2,color:"#999"}},splitLine:{distance:-52,length:14,lineStyle:{width:3,color:"#999"}},axisLabel:{distance:-8,color:"black",fontSize:10},anchor:{show:!1},data:[{value:j}]}]});break}case ye.sankey:{const O=[],R=[];if(o!=null&&o.length&&((C=o[0])==null?void 0:C[0])!==((S=o[1])==null?void 0:S[0])){[o[0],o[1]].map(j=>{j.map(B=>{O.includes(B)||O.push(B)})});for(let j=0;j<((M=o[0])==null?void 0:M.length);j+=1)R.push({source:o[0][j],target:o[1][j],value:o[2][j]})}Object.assign(g,{...g,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},tooltip:{trigger:"item",triggerOn:"mousemove",backgroundColor:"black",textStyle:{color:"white"}},grid:{left:`${l.marginLeft}%`,bottom:`${l.marginBottom}%`,top:`${l.marginTop}%`,right:`${l.marginRight}%`,containLabel:!0},series:{type:"sankey",layout:"none",emphasis:{focus:"adjacency"},data:O.map(P=>({name:P})),links:R,showBackground:p.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"}}});break}case ye.singleValue:{const O=s[0]&&p0e(s[0],h.numberFormatter);Object.assign(g,{settings:{fontSize:h.fontSize||30,subHeaderFontSize:h.subHeaderFontSize||14,subHeaderShow:h.subHeaderShow||!1,displayText:h.displayText||""},value:O});break}case ye.waterfall:{let O;if(i!=null&&i.length){const R=(L=i[0])==null?void 0:L.data,P=[R[0]];if(R.length)for(let j=1;j<R.length-1;j++)P.push(P[j-1]-R[j]);P.push(R[R.length-1]),O={labels:n,datasets:[R,P]}}Object.assign(g,{...g,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"},formatter(R){const P=R[1];return`${P.name}<br/>${P.value}`}},grid:{left:`${l.marginLeft}%`,bottom:`${l.marginBottom}%`,top:`${l.marginTop}%`,right:`${l.marginRight}%`,containLabel:!0},xAxis:{type:"category",data:O==null?void 0:O.labels,splitLine:{show:h.hideSplitLines==="horizontal"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="y"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="y"||h.axisLabels==="none",formatter(R){return or(R,c.truncateLabelValue||14)}}},yAxis:{type:"value",position:d.axis,splitLine:{show:h.hideSplitLines==="vertical"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="x"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="x"||h.axisLabels==="none"}},series:[{name:"Placeholder",type:"bar",stack:"Total",itemStyle:{borderColor:"transparent",color:"transparent"},emphasis:{itemStyle:{borderColor:"transparent",color:"transparent"}},data:O==null?void 0:O.datasets[1],showBackground:p.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"}},{name:"Life Cost",type:"bar",stack:"Total",label:{show:c.show,position:c.position},data:O==null?void 0:O.datasets[0]}]});break}case ye.table:{const O=[];if(i){const R=[],P=[];i.map(j=>{R.push(j.label),P.push(j.data)});for(let j=0;j<((N=P[0])==null?void 0:N.length);j+=1){const B={};for(let F=0;F<R.length;F+=1)B[R[F]]=P[F][j];O.push(B)}}Object.assign(g,{data:O,tableSettings:f});break}case ye.stepped:{const O=["start","middle","end"];let R=2;Object.assign(g,{...g,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"}},legend:{show:u.show,top:u.top,left:u.left,right:u.right,bottom:u.bottom,orient:u.position,data:i==null?void 0:i.map(P=>P.label),formatter(P){return`{a|${or(P,u.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(P){return P.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},grid:{left:`${l.marginLeft}%`,bottom:`${l.marginBottom}%`,top:`${l.marginTop}%`,right:`${l.marginRight}%`,containLabel:!0},xAxis:{type:"category",data:n,splitLine:{show:h.hideSplitLines==="horizontal"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="y"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="y"||h.axisLabels==="none",formatter(P){return or(P,c.truncateLabelValue||14)}}},yAxis:{type:"value",position:d.axis,splitLine:{show:h.hideSplitLines==="vertical"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="x"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="x"||h.axisLabels==="none"}},series:i==null?void 0:i.map(P=>(R===0?R=1:R===1?R=2:R=0,{name:P.label,type:"line",step:O[R],data:P.data,areaStyle:{},label:{show:c.show,position:c.position},showBackground:p.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"}}))});break}case ye.scatter:{Object.assign(g,{...g,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},grid:{left:`${l.marginLeft}%`,bottom:`${l.marginBottom}%`,top:`${l.marginTop}%`,right:`${l.marginRight}%`,containLabel:!0},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"},formatter:O=>`${O.map(R=>`${R.seriesName}: ${R.value}<br />`).join("")}`},xAxis:{type:"category",data:n,splitLine:{show:h.hideSplitLines==="horizontal"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="y"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="y"||h.axisLabels==="none",formatter(O){return or(O,c.truncateLabelValue||14)}}},yAxis:{type:"value",position:d.axis,splitLine:{show:h.hideSplitLines==="vertical"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="x"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="x"||h.axisLabels==="none"}},legend:{show:u.show,top:u.top,left:u.left,right:u.right,bottom:u.bottom,orient:u.position,data:i==null?void 0:i.map(O=>O.label),formatter(O){return`{a|${or(O,u.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(O){return O.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},series:i==null?void 0:i.map(O=>({symbolSize:10,data:O.data,type:"scatter",name:O.label,label:{show:c.show,position:c.position},showBackground:p.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"}}))});break}case ye.timeSeries:{if(!tT({data:t,timeStampKey:r.xAxis||"",valuekeys:r.yAxisList||[]}))break;Object.assign(g,{...g,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},grid:{left:`${l.marginLeft}%`,bottom:`${l.marginBottom}%`,top:`${l.marginTop}%`,right:`${l.marginRight}%`,containLabel:!0},axisLine:{show:h.hideAxisLines==="y"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="y"||h.axisLabels==="none"},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"}},xAxis:{type:"category",axisTick:{alignWithLabel:!0},axisLabel:{show:h.axisLabels==="y"||h.axisLabels==="none",interval:0,rotate:h.xRotation,hideOverlap:!0,formatter(O){return or(O,c.truncateLabelValue||14)}},splitLine:{show:h.hideSplitLines==="horizontal"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="y"||h.hideAxisLines==="none"}},yAxis:{type:"value",position:d.axis,splitLine:{show:h.hideSplitLines==="vertical"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="x"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="x"||h.axisLabels==="none"}},legend:{show:u.show,top:u.top,left:u.left,right:u.right,bottom:u.bottom,orient:u.position,data:r.yAxisList,formatter(O){return`{a|${or(O,u.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(O){return O.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},series:P5({dataArray:t,timeStampKey:r.xAxis||"",valuekeys:r.yAxisList||[],type:((E=v.seriesType[0])==null?void 0:E.type)||"bar",groupBy:((k=v.groupBySettings)==null?void 0:k.value)||"monthly",labelSettings:c,backGroundColor:p,customSettings:h})});break}}return g},ev=$.memo(({chartOptions:r,data:t,events:e,colors:n,config:i,className:a})=>{const o=$.useMemo(()=>v0e({chartOptions:r,data:t,colors:n}),[t,r,n]);return r.chartType===ye.singleValue?I.jsx(bye,{...i,value:o.value,settings:o.settings,className:a}):r.chartType===ye.table?I.jsx(ls,{...i,data:o.data,error:"",isLoading:!1,tableSettings:o.tableSettings,className:a}):I.jsx(Br,{style:{width:"100%",height:"100%"},...i,option:o,className:a,onEvents:e,notMerge:!0})}),j5=({isShow:r,onCancel:t,...e})=>I.jsx(zi,{isOpen:r,onClose:t,headerTitle:"Chart Preview",children:I.jsx("div",{className:KQ.fullscreen,children:I.jsx(ev,{...e})})}),us={button:"_button_1ecv1_1",menu:"_menu_1ecv1_7",menuContainer:"_menuContainer_1ecv1_13",buttonText:"_buttonText_1ecv1_19",buttonIcon:"_buttonIcon_1ecv1_25",filterName:"_filterName_1ecv1_31",filterDropdown:"_filterDropdown_1ecv1_37"},z5=r=>{const t=document.documentElement;r.colors&&Object.entries(r.colors).forEach(([e,n])=>{e&&n&&t.style.setProperty(`--databrainhq-plugin-color-${e}`,`${n}`)}),r.border&&Object.entries(r.border).forEach(([e,n])=>{e&&n&&t.style.setProperty(`--databrainhq-plugin-border-${e}`,`${n}`)}),r.shadow&&Object.entries(r.shadow).forEach(([e,n])=>{e&&n&&t.style.setProperty(`--databrainhq-plugin-shadow-${e}`,`${n}`)}),r.typography&&Object.entries(r.typography).forEach(([e,n])=>{e&&n&&t.style.setProperty(`--databrainhq-plugin-typography-${e}`,`${n}`)}),r.breakpoint&&Object.entries(r.breakpoint).forEach(([e,n])=>{e&&n&&t.style.setProperty(`--databrainhq-plugin-breakpoint-${e}`,`${n}`)})},F5=r=>Gw.includes(r.toLowerCase())?"number":Yw.includes(r.toLowerCase())||r.toLowerCase().includes("char")?"text":Zw.includes(r.toLowerCase())?"boolean":"text",B5=r=>{const t="data:text/csv;charset=utf-8,";if(!r.length)return t;const e=[],n=r[0],i=Object.keys(n);e.push(`S.NO,${i.join(",").toUpperCase()}`),r.forEach((s,l)=>{const c=Object.values(s).map(u=>{if(typeof u=="number")return u;try{if(u!=null&&u.includes(","))return`"${u}"`}catch{return u}return u});e.push(`${l+1},${c.join(",")}`)});const a=e.join(`
662
+ */const ci={CASE_SENSITIVE_EQUAL:7,EQUAL:6,STARTS_WITH:5,WORD_STARTS_WITH:4,CONTAINS:3,ACRONYM:2,MATCHES:1,NO_MATCH:0};function t0e(r,t,e){var n;if(e=e||{},e.threshold=(n=e.threshold)!=null?n:ci.MATCHES,!e.accessors){const o=N5(r,t,e);return{rankedValue:r,rank:o,accessorIndex:-1,accessorThreshold:e.threshold,passed:o>=e.threshold}}const i=a0e(r,e.accessors),a={rankedValue:r,rank:ci.NO_MATCH,accessorIndex:-1,accessorThreshold:e.threshold,passed:!1};for(let o=0;o<i.length;o++){const s=i[o];let l=N5(s.itemValue,t,e);const{minRanking:c,maxRanking:u,threshold:h=e.threshold}=s.attributes;l<c&&l>=ci.MATCHES?l=c:l>u&&(l=u),l=Math.min(l,u),l>=h&&l>a.rank&&(a.rank=l,a.passed=!0,a.accessorIndex=o,a.accessorThreshold=h,a.rankedValue=s.itemValue)}return a}function N5(r,t,e){return r=E5(r,e),t=E5(t,e),t.length>r.length?ci.NO_MATCH:r===t?ci.CASE_SENSITIVE_EQUAL:(r=r.toLowerCase(),t=t.toLowerCase(),r===t?ci.EQUAL:r.startsWith(t)?ci.STARTS_WITH:r.includes(` ${t}`)?ci.WORD_STARTS_WITH:r.includes(t)?ci.CONTAINS:t.length===1?ci.NO_MATCH:r0e(r).includes(t)?ci.ACRONYM:n0e(r,t))}function r0e(r){let t="";return r.split(" ").forEach(n=>{n.split("-").forEach(a=>{t+=a.substr(0,1)})}),t}function n0e(r,t){let e=0,n=0;function i(l,c,u){for(let h=u,f=c.length;h<f;h++)if(c[h]===l)return e+=1,h+1;return-1}function a(l){const c=1/l,u=e/t.length;return ci.MATCHES+u*c}const o=i(t[0],r,0);if(o<0)return ci.NO_MATCH;n=o;for(let l=1,c=t.length;l<c;l++){const u=t[l];if(n=i(u,r,n),!(n>-1))return ci.NO_MATCH}const s=n-o;return a(s)}function E5(r,t){let{keepDiacritics:e}=t;return r=`${r}`,e||(r=e0e(r)),r}function i0e(r,t){let e=t;typeof t=="object"&&(e=t.accessor);const n=e(r);return n==null?[]:Array.isArray(n)?n:[String(n)]}function a0e(r,t){const e=[];for(let n=0,i=t.length;n<i;n++){const a=t[n],o=o0e(a),s=i0e(r,a);for(let l=0,c=s.length;l<c;l++)e.push({itemValue:s[l],attributes:o})}return e}const k5={maxRanking:1/0,minRanking:-1/0};function o0e(r){return typeof r=="function"?k5:{...k5,...r}}const Et={"table-loader-container":"_table-loader-container_tdj5v_1",tableData:"_tableData_tdj5v_7",tableScroll:"_tableScroll_tdj5v_13",tableHeadCol:"_tableHeadCol_tdj5v_19",resizer:"_resizer_tdj5v_25",resizing:"_resizing_tdj5v_37",tableRow:"_tableRow_tdj5v_43",tableRowCol:"_tableRowCol_tdj5v_49",truncateText:"_truncateText_tdj5v_57",row:"_row_tdj5v_65",container:"_container_tdj5v_71",table:"_table_tdj5v_1",previewTable:"_previewTable_tdj5v_83",preview:"_preview_tdj5v_83",searchButton:"_searchButton_tdj5v_95",previewText:"_previewText_tdj5v_101",noData:"_noData_tdj5v_107",error:"_error_tdj5v_113",errorMsg:"_errorMsg_tdj5v_119",tableIcon:"_tableIcon_tdj5v_125",stripedRow:"_stripedRow_tdj5v_131",rowHover:"_rowHover_tdj5v_137",rightBorder:"_rightBorder_tdj5v_143",searchContainer:"_searchContainer_tdj5v_149",sortButton:"_sortButton_tdj5v_155",searchTab:"_searchTab_tdj5v_161",searchTabInput:"_searchTabInput_tdj5v_167",searchTabIcon:"_searchTabIcon_tdj5v_173",noDataHead:"_noDataHead_tdj5v_179",noDataBody:"_noDataBody_tdj5v_185",showSort:"_showSort_tdj5v_191",noSort:"_noSort_tdj5v_197",pagination:"_pagination_tdj5v_203",rowStyle:"_rowStyle_tdj5v_209",rowText:"_rowText_tdj5v_215",rowsDropdown:"_rowsDropdown_tdj5v_221",pageStyle:"_pageStyle_tdj5v_227",buttonContainer:"_buttonContainer_tdj5v_233",button:"_button_tdj5v_233",paginationWrapper:"_paginationWrapper_tdj5v_251",current:"_current_tdj5v_257",textTruncate:"_textTruncate_tdj5v_263"},s0e=({value:r,onChange:t,debounce:e=500,...n})=>{const[i,a]=$.useState(r);return $.useEffect(()=>{a(r)},[r]),$.useEffect(()=>{const o=setTimeout(()=>{t(i)},e);return()=>clearTimeout(o)},[e,t,i]),I.jsxs("div",{className:`${Et.searchTab} ${n.className||""}`,children:[I.jsx("input",{...n,value:i,onChange:o=>a(o.target.value),className:Et.searchTabInput}),i.toString().length?"":I.jsx(SL,{className:Et.searchTabIcon,color:"#C7C7C7",width:"30px",height:"30px"})]})},l0e="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MDAgNTAwIj48ZGVmcz48c3R5bGU+LmNscy0xe3N0cm9rZTojMTgyYzYwO30uY2xzLTEsLmNscy0ye2ZpbGw6bm9uZTtzdHJva2UtbGluZWNhcDpyb3VuZDtzdHJva2UtbGluZWpvaW46cm91bmQ7fS5jbHMtM3tmaWxsOiM1ODY1ZjY7b3BhY2l0eTouMTt9LmNscy00e2ZpbGw6I2YyZjNmNDt9LmNscy01e2ZpbGw6I2MxYzdjOTt9LmNscy02e2ZpbGw6IzE4MmM2MDt9LmNscy0ye3N0cm9rZTojNTg2NWY2O3N0cm9rZS13aWR0aDo0cHg7fTwvc3R5bGU+PC9kZWZzPjxwYXRoIGNsYXNzPSJjbHMtMyIgZD0ibTI3MS4xMSwxNzkuNzJsLS4wOSwyMC4zM3MuMTksNC4wNS4zOCw0LjUyLjc1LDEuODgsMS40MSwyLjM1LDEuMjcuOTksMi4yMSwxLjMyLDEuMTguNjEsMi42NC42MSwyMi42OC4wNSwyMi42OC4wNWwtMjkuMjItMjkuMThaIi8+PGxpbmUgY2xhc3M9ImNscy0xIiB4MT0iMjAzLjcxIiB5MT0iMjA4LjAxIiB4Mj0iMjM0LjkyIiB5Mj0iMjA4LjAxIi8+PGxpbmUgY2xhc3M9ImNscy0yIiB4MT0iMjAzLjcxIiB5MT0iMTk3LjM0IiB4Mj0iMjQ4LjA0IiB5Mj0iMTk3LjM0Ii8+PHJlY3Qg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k9IjI3Ny45NiIgd2lkdGg9IjguNDciIGhlaWdodD0iNCIvPjxyZWN0IGNsYXNzPSJjbHMtNCIgeD0iMjQyLjY5IiB5PSIyNzcuOTYiIHdpZHRoPSI4LjQ3IiBoZWlnaHQ9IjQiLz48cmVjdCBjbGFzcz0iY2xzLTQiIHg9IjI2MC42MiIgeT0iMjc3Ljk2IiB3aWR0aD0iOC40NyIgaGVpZ2h0PSI0Ii8+PHJlY3QgY2xhc3M9ImNscy00IiB4PSIyNzguODMiIHk9IjI3Ny45NiIgd2lkdGg9IjguNDciIGhlaWdodD0iNCIvPjwvZz48Zz48cmVjdCBjbGFzcz0iY2xzLTQiIHg9IjIwNi4xNyIgeT0iMjg2LjQzIiB3aWR0aD0iOC40NyIgaGVpZ2h0PSI0Ii8+PHJlY3QgY2xhc3M9ImNscy00IiB4PSIyMjQuMjMiIHk9IjI4Ni40MyIgd2lkdGg9IjguNDciIGhlaWdodD0iNCIvPjxyZWN0IGNsYXNzPSJjbHMtNCIgeD0iMjQyLjY5IiB5PSIyODYuNDMiIHdpZHRoPSI4LjQ3IiBoZWlnaHQ9IjQiLz48cmVjdCBjbGFzcz0iY2xzLTQiIHg9IjI2MC42MiIgeT0iMjg2LjQzIiB3aWR0aD0iOC40NyIgaGVpZ2h0PSI0Ii8+PHJlY3QgY2xhc3M9ImNscy00IiB4PSIyNzguODMiIHk9IjI4Ni40MyIgd2lkdGg9IjguNDciIGhlaWdodD0iNCIvPjwvZz48L3N2Zz4=",dl=r=>I.jsxs("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:[I.jsx("path",{fill:"currentColor",d:"M12 2A10 10 0 1 0 22 12A10 10 0 0 0 12 2Zm0 18a8 8 0 1 1 8-8A8 8 0 0 1 12 20Z",opacity:.5}),I.jsx("path",{fill:"currentColor",d:"M20 12h2A10 10 0 0 0 12 2V4A8 8 0 0 1 20 12Z",children:I.jsx("animateTransform",{attributeName:"transform",dur:"1s",from:"0 12 12",repeatCount:"indefinite",to:"360 12 12",type:"rotate"})})]}),u0e=r=>I.jsx("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...r,children:I.jsx("path",{fill:"currentColor",d:"m16 28l-7-7l1.41-1.41L16 25.17l5.59-5.58L23 21l-7 7zm0-24l7 7l-1.41 1.41L16 6.83l-5.59 5.58L9 11l7-7z"})}),c0e=r=>I.jsx("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...r,children:I.jsx("path",{fill:"currentColor",d:"m16 4l7 7l-1.4 1.4L16 6.8l-5.6 5.6L9 11z"})}),h0e=r=>I.jsx("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...r,children:I.jsx("path",{fill:"currentColor",d:"m16 28l-7-7l1.4-1.4l5.6 5.6l5.6-5.6L23 21z"})}),f0e=Bye(),ls=({data:r,isLoading:t,error:e,tableSettings:n,tableName:i,className:a="",onColumnSizingChange:o})=>{var C,S;const{divStyle:s,headerStyle:l}=$.useMemo(()=>{const M={width:"100%",height:(n==null?void 0:n.lineGap)==="small"?"1.5rem":"2.5rem",fontSize:(n==null?void 0:n.lineGap)==="small"?"0.7rem":"1rem",display:"flex",alignItems:"center",justifyContent:n!=null&&n.contentAlignment?`${n.contentAlignment}`:""},L={width:"100%",color:"#182c60",fontSize:(n==null?void 0:n.lineGap)==="small"?"0.7rem":"1rem",height:(n==null?void 0:n.lineGap)==="small"?"1.5rem":"2.5rem",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:"500"};return{divStyle:M,headerStyle:L}},[n==null?void 0:n.lineGap,n==null?void 0:n.contentAlignment]),[c,u]=$.useState([]),[h,f]=$.useState({}),[d,p]=$.useState({label:((C=ni.tableSettings)==null?void 0:C.defaultRowSize)||"10",value:((S=ni.tableSettings)==null?void 0:S.defaultRowSize)||"10"}),[v,g]=$.useState(n==null?void 0:n.columnSizing),[m,y]=$.useState(""),b=(M,L,N,E)=>{const k=t0e(M.getValue(L),N);return E({itemRank:k}),k.passed},[x,w]=$.useState({pageIndex:0,pageSize:10});$.useEffect(()=>{o==null||o(v)},[v]),$.useEffect(()=>{var N,E;if(!(n!=null&&n.defaultRowSize))return;const M=cg.find(k=>k.value===n.defaultRowSize),L={label:((N=ni.tableSettings)==null?void 0:N.defaultRowSize)||"10",value:((E=ni.tableSettings)==null?void 0:E.defaultRowSize)||"10"};p(M||L)},[n==null?void 0:n.defaultRowSize]);const _=$.useMemo(()=>{if(!r||!Array.isArray(r))return[];const{pageIndex:M,pageSize:L}=x;return r.slice(M*L,(M+1)*L)},[x,r,m]),T=$.useMemo(()=>Object.keys((r==null?void 0:r[0])||{}).map(M=>f0e.accessor(M,{header:()=>M,cell:L=>{const N=L.row.original[M];return typeof N=="object"?JSON.stringify(N):typeof N=="boolean"?N?"true":"false":N}})),[r==null?void 0:r[0]]),A=Xye({data:m?Array.isArray(r)?r:[]:_,columns:T,filterFns:{fuzzy:b},state:{sorting:c,globalFilter:m,pagination:x,...v?{columnSizing:v}:{}},enableGlobalFilter:!0,onRowSelectionChange:f,onSortingChange:u,globalFilterFn:b,getCoreRowModel:Vye(),getFilteredRowModel:Gye(),getSortedRowModel:Yye(),onGlobalFilterChange:y,onPaginationChange:w,manualPagination:!0,debugTable:!1,enableColumnResizing:!0,columnResizeMode:"onChange",onColumnSizingChange:g});$.useEffect(()=>{A.setPageSize(Number(d.value))},[d,A]);const D=$.useMemo(()=>{const{pageIndex:M,pageSize:L}=A.getState().pagination,N=m?A.getRowModel().rows.length:(r==null?void 0:r.length)||0,E=N===0?0:L*M+1,k=N<=L*(M+1)?N:L*(M+1);return{from:E,to:k,total:N}},[m,r,A.getState().pagination,A.getRowModel().rows.length]);return I.jsx("div",{className:`${Et.container} ${a}`,children:I.jsxs("div",{className:Et.previewTable,children:[n!=null&&n.enableTableSearch||n!=null&&n.showTableTitle?I.jsxs("div",{className:n.showTableTitle?Et.preview:Et.searchButton,children:[n.showTableTitle&&I.jsx(pe,{styleClass:"font-14c",variant:"h1",className:Et.previewText,children:i}),n.enableTableSearch&&I.jsx(s0e,{value:m,onChange:M=>y(String(M)),placeholder:"Search"})]}):null,I.jsxs("div",{className:Et.tableData,children:[t&&!(r!=null&&r.length)&&I.jsx("div",{className:Et["table-loader-container"],children:I.jsx(dl,{style:{width:"50px",height:"50px",color:"blue"}})}),!!(r!=null&&r.length)&&!t&&I.jsx("div",{className:Et.tableScroll,children:I.jsxs("table",{className:Et.table,children:[I.jsx("thead",{children:A.getHeaderGroups().map(M=>I.jsx("tr",{className:Et.row,children:M.headers.map(L=>I.jsxs("th",{className:Et.tableHeadCol,colSpan:L.colSpan,style:{width:L.getSize()},children:[I.jsx("button",{onMouseDown:L.getResizeHandler(),onTouchStart:L.getResizeHandler(),onDoubleClick:L.column.resetSize,className:`${Et.resizer} ${L.column.getIsResizing()?Et.resizing:""}`,type:"button",title:"Resize Column"}),n!=null&&n.enableSorting?I.jsxs("div",{className:L.column.getCanSort()?Et.sortButton:"",onClick:L.column.getToggleSortingHandler(),children:[L.isPlaceholder?null:I.jsx("div",{style:l,children:z0(L.column.columnDef.header,L.getContext())}),{asc:I.jsx(c0e,{color:"#182c60"}),desc:I.jsx(h0e,{color:"#182c60"})}[L.column.getIsSorted()]??I.jsx(u0e,{color:"#182c60"})]}):I.jsx(I.Fragment,{children:L.isPlaceholder?null:I.jsx("div",{style:l,children:I.jsx(pe,{variant:"p",styleClass:"custom",className:Et.truncateText,children:z0(L.column.columnDef.header,L.getContext())})})})]},L.id))},M.id))}),I.jsx("tbody",{children:(m?A.getRowModel().rows.slice(x.pageSize*x.pageIndex,x.pageSize*(1+x.pageIndex)):A.getRowModel().rows).map((M,L)=>I.jsx("tr",{className:`${Et.tableRow} ${n!=null&&n.showRowHover?Et.rowHover:""} ${n!=null&&n.enableStripedRows&&Number(L)%2!==0?Et.stripedRow:""}`,children:M.getVisibleCells().map(N=>I.jsxs("td",{className:`${Et.tableRowCol} ${n!=null&&n.hideVerticalDivider?"":Et.rightBorder}`,title:typeof N.getValue()=="object"?JSON.stringify(N.getValue()):N.getValue(),children:[!!n&&I.jsx("div",{style:s,children:I.jsx(pe,{variant:"p",styleClass:"custom",className:Et.truncateText,children:z0(N.column.columnDef.cell,N.getContext())})}),!n&&I.jsx("div",{style:{textAlign:"center",width:"100%"},children:z0(N.column.columnDef.cell,N.getContext())})]},N.id))},M.id))})]})}),!(r!=null&&r.length)&&!t&&!e.length&&I.jsxs("div",{className:Et.noData,children:[I.jsx("img",{src:l0e,alt:"no-data",width:"400px",height:"400px"}),I.jsx(pe,{styleClass:"font-14c",variant:"h1",className:Et.noDataHead,children:"No data tables queried"}),I.jsx(pe,{styleClass:"font-14",variant:"p",className:Et.noDataBody,children:"Type your query and input fields beside to generate results and explore data"})]}),e&&I.jsx("div",{className:Et.error,children:I.jsx(pe,{styleClass:"primary",className:Et.errorMsg,variant:"p",children:e})})]}),r&&!(n!=null&&n.disablePagination)&&I.jsxs("div",{className:Et.pagination,children:[I.jsx("div",{className:Et.rowStyle,children:I.jsx($r,{onChange:p,selectedOption:d,options:cg,labelVariant:"static",dropdownAbove:!0,buttonClass:Et.rowsDropdown})}),I.jsxs("span",{className:Et.pageStyle,children:[D.from,"-",D.to," of ",D.total]}),I.jsxs("div",{className:Et.buttonContainer,children:[I.jsx(xe,{variant:"custom",type:"button",className:Et.button,onClick:()=>A.previousPage(),isDisabled:D.from<=1,children:"Prev"}),I.jsx(xe,{variant:"custom",type:"button",className:Et.button,onClick:()=>A.nextPage(),isDisabled:D.to>=D.total,children:"Next"})]})]})]})})},O5=["rgb(56, 72, 211)","rgb(251, 208, 98)","rgb(234 88 12)","rgb(245 158 11)","rgb(234 179 8)","rgb(34 197 94)","rgb(4 120 87)","rgb(15 118 110)","rgb(8 145 178)","rgb(219 234 254)","rgb(30 58 138)","rgb(139 92 246)"],R5=({data:r,measure:t,sankeyValues:e,singleValue:n,step:i,xAxis:a,yAxisList:o})=>{const s=Array.isArray(r)?r.map(f=>a&&f[a]):[],l=o==null?void 0:o.map((f,d)=>({label:f,data:Array.isArray(r)?r.map(p=>p[o[d]]):[],borderColor:O5[d]})),c=Array.isArray(r)&&i&&t?r.map(f=>({value:f[t],name:f[i]})):[],u=e==null?void 0:e.map((f,d)=>Array.isArray(r)?r.map(p=>p[e[d]]):[]),h=Array.isArray(r)&&n?r.map(f=>f[n]):[];return{labels:s,datasets:l,funnelData:c,sankeyData:u,singleValueData:h}},d0e=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],P5=({dataArray:r,timeStampKey:t,type:e,valuekeys:n,groupBy:i,labelSettings:a,customSettings:o,backGroundColor:s})=>n.map(u=>r.sort((f,d)=>new Date(f[t]).getTime()-new Date(d[t]).getTime()).reduce((f,d)=>{const v={yearly:m=>m.getFullYear(),monthly:m=>{const y=m.getMonth(),b=m.getFullYear();return`${d0e[y]} - ${b}`},weekly:m=>{const y=new Date(m.getTime());return y.setDate(m.getDate()-m.getDay()),y.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})},daily:m=>`${m.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}`,quarterly:m=>{const y=m.getMonth(),b=Math.floor(y/3)+1,x=m.getFullYear();return`Q${b} ${x}`}}[i],g=v(new Date(d[t]));return f[g]||(f[g]=0),f[g]+=d[u],f},{})).map((u,h)=>({data:Object.entries(u),type:e==="area"?"line":e,name:n[h],label:{show:a.show,position:a.position},emphasis:{focus:"series"},...e==="area"?{areaStyle:{}}:{areaStyle:{opacity:0}},...e==="bar"?{barWidth:`${(o==null?void 0:o.barWidth)||0}%`,showBackground:s==null?void 0:s.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"},itemStyle:{borderRadius:o==null?void 0:o.barRadius}}:{}})),tT=({data:r,timeStampKey:t,valuekeys:e})=>!Array.isArray(r)||r.length<2?!1:r.every(n=>{const i=new Date(n[t]);return!Number.isNaN(i.getTime())&&e.every(a=>typeof n[a]=="number")}),or=(r,t)=>r.length>t?`${r.slice(0,t)}...`:r,$5=(r,t)=>{let e="";if(t)switch(parseInt(r,10).toString().length){case 1:case 2:case 3:e=r;break;case 4:e=`${r.toString().slice(0,1)}.${r.toString().slice(1,3)}k`;break;case 5:e=`${r.toString().slice(0,2)}.${r.toString().slice(2,4)}k`;break;case 6:e=`${r.toString().slice(0,3)}.${r.toString().slice(3,5)}k`;break;case 7:e=`${r.toString().slice(0,1)}.${r.toString().slice(1,3)}M`;break;case 8:e=`${r.toString().slice(0,2)}.${r.toString().slice(2,4)}M`;break;case 9:e=`${r.toString().slice(0,3)}.${r.toString().slice(3,5)}M`;break;case 10:e=`${r.toString().slice(0,1)}.${r.toString().slice(1,3)}B`;break}else switch(parseInt(r,10).toString().length){case 1:case 2:case 3:e=r;break;case 4:e=`${r.toString().slice(0,1)}k`;break;case 5:e=`${r.toString().slice(0,2)}k`;break;case 6:e=`${r.toString().slice(0,3)}k`;break;case 7:e=`${r.toString().slice(0,1)}M`;break;case 8:e=`${r.toString().slice(0,2)}M`;break;case 9:e=`${r.toString().slice(0,3)}M`;break;case 10:e=`${r.toString().slice(0,1)}B`;break}return e},p0e=(r,t)=>{const e=new Intl.NumberFormat;switch(t){case"original":return r;case"3s":case"adaptive":return $5(r,!0);case"percent":return`${r}%`;case"d":return parseInt(r,10).toLocaleString();case"1s":{let n=r.toString().slice(0,1);const i=Math.floor(Number(r));for(let o=1;o<i.toString().length;o+=1)n+=0;return $5(n,!1)}case"1f":{const n=Number(r).toFixed(1),i=e.format(n);return r.toString().includes(".")?i:`${i}.${Array(2).join("0")}`}case"2f":{const n=Number(r).toFixed(2),i=e.format(n);return r.toString().includes(".")?r.toString().split(".")[1].length>1?i:`${i}${Array(2).join("0")}`:`${i}.${Array(3).join("0")}`}case"3f":{const n=Number(r).toFixed(3),i=e.format(n);if(r.toString().includes(".")){const a=r.toString().split(".");return a[1].length>2?i:a[1].length===2?`${i}${Array(2).join("0")}`:`${i}${Array(3).join("0")}`}return`${i}.${Array(4).join("0")}`}case"+":return`+${e.format(r)}`;case"$":{const n=Number(r).toFixed(2),i=e.format(n);return r.toString().includes(".")?r.toString().split(".")[1].length>1?`$${i}`:`$${i}${Array(2).join("0")}`:`$${i}.${Array(3).join("0")}`}case"1%":{const n=Number(r)*100,i=Number(n).toFixed(1),a=e.format(i);return n.toString().includes(".")?`${a}%`:`${a}.${Array(2).join("0")}%`}case"2%":{const n=Number(r)*100,i=Number(n).toFixed(2),a=e.format(i);return n.toString().includes(".")?r.toString().split(".")[1].length>1?`${a}%`:`${a}.${Array(2).join("0")}`:`${a}.${Array(3).join("0")}%`}case"3%":{const n=r*100,i=Number(n).toFixed(3),a=e.format(i);return n.toString().includes(".")?r.toString().split(".")[1].length>1?`${a}%`:`${a}.${Array(3).join("0")}`:`${a}.${Array(4).join("0")}%`}case"ms1":{const n=Math.floor(Number(r)/1e3),i=Number(r)%1e3;return`${n}.${i.toString().slice(0,1)}s`}case"ms2":{const n=Math.floor(Number(r)/1e3),i=Math.floor(Number(r)%1e3),a=Number(r)-Math.floor(Number(r)),o=Math.floor(a*1e3),s=a*1e3-o,l=Math.floor(s*1e3);let c="";return n&&(c+=`${n}s `),i&&(c+=`${i}ms `),o&&(c+=`${o}µs`),l&&(c+=`${l}ns`),c}case"4r":return Math.floor(Math.round(Number(r)));default:return r}},v0e=({chartOptions:r,data:t=[],colors:e})=>{var m,y,b,x,w,_,T,A,D,C,S,M,L,N,E,k;const{labels:n,datasets:i,funnelData:a,sankeyData:o,singleValueData:s}=R5({data:t,measure:r.measure,step:r.step,xAxis:r.xAxis,yAxisList:r.yAxisList,singleValue:r.singleValue,sankeyValues:r.sankeyValues}),l={...ni.margins,...r.margins},c={...ni.labelSettings,...r.labelSettings},u={...ni.legendSettings,...r.legendSettings},h={...ni.customSettings,...r.customSettings},f={...ni.tableSettings,...r.tableSettings},d={...ni.axisSettings,...r.axisSettings},p={...ni.backGroundColor,...r.backGroundColor},v={...ni.timeSeriesSettings,seriesType:((m=r.yAxisList)==null?void 0:m.map(O=>({column:O,type:"bar"})))||[],...r.timeSeriesSettings},g={...e!=null&&e.length?{color:e}:{}};switch(r.chartType){case ye.line:{Object.assign(g,{...g,tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"line",lineStyle:{color:"rgba(0,0,0,0.2)",width:1,type:"solid"}}},grid:{left:`${l.marginLeft}%`,bottom:`${l.marginBottom}%`,top:`${l.marginTop}%`,right:`${l.marginRight}%`,containLabel:!0},toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},xAxis:{type:"category",boundaryGap:!1,data:n,splitLine:{show:h.hideSplitLines==="horizontal"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="y"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="y"||h.axisLabels==="none",formatter(O){return or(O,c.truncateLabelValue||14)}}},yAxis:{type:"value",position:d.axis,splitLine:{show:h.hideSplitLines==="vertical"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="x"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="x"||h.axisLabels==="none"}},legend:{show:u.show,top:u.top,left:u.left,right:u.right,bottom:u.bottom,orient:u.position,formatter(O){return`{a|${or(O,u.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(O){return O.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}},data:i==null?void 0:i.map(O=>O.label)},series:i==null?void 0:i.map(O=>({data:O.data,type:"line",name:O.label,label:{show:c.show,position:c.position},emphasis:{focus:"series"}}))});break}case ye.bar:{Object.assign(g,{...g,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"}},grid:{left:`${l.marginLeft}%`,bottom:`${l.marginBottom}%`,top:`${l.marginTop}%`,right:`${l.marginRight}%`,containLabel:!0},xAxis:{type:"category",data:n,axisTick:{alignWithLabel:!0},axisLabel:{show:h.axisLabels==="y"||h.axisLabels==="none",interval:0,rotate:h.xRotation,hideOverlap:!0,formatter(O){return or(O,c.truncateLabelValue||14)}},splitLine:{show:h.hideSplitLines==="horizontal"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="y"||h.hideAxisLines==="none"}},yAxis:{type:"value",position:d.axis,splitLine:{show:h.hideSplitLines==="vertical"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="x"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="x"||h.axisLabels==="none"}},legend:{data:i==null?void 0:i.map(O=>O.label),show:u.show,top:u.top,left:u.left,right:u.right,bottom:u.bottom,orient:u.position,formatter(O){return`{a|${or(O,u.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(O){return O.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},series:i==null?void 0:i.map(O=>({data:O.data,type:"bar",name:O.label,barWidth:`${h.barWidth||0}%`,label:{show:c.show,position:c.position},showBackground:p.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"},itemStyle:{borderRadius:h.barRadius}}))});break}case ye.stack:{const O=(()=>{if(!i||!h.showFullStacked)return;const R={};return i.forEach(P=>{const j=P.data.map((B,F)=>{const V=i.reduce((H,G)=>H+G.data[F],0);return(B/V*100).toFixed(2)});R[P.label]=j}),R})();Object.assign(g,{...g,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},grid:{left:`${l.marginLeft}%`,bottom:`${l.marginBottom}%`,top:`${l.marginTop}%`,right:`${l.marginRight}%`,containLabel:!0},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"},formatter:R=>`${R.map(P=>`${P.seriesName}: ${P.value}<br />`).join("")}`},xAxis:{type:"category",data:n,splitLine:{show:h.hideSplitLines==="horizontal"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="y"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="y"||h.axisLabels==="none",formatter(R){return or(R,c.truncateLabelValue||14)}}},yAxis:{type:"value",max:h.showFullStacked?100:void 0,position:d.axis,splitLine:{show:h.hideSplitLines==="vertical"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="x"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="x"||h.axisLabels==="none",formatter:"{value} %"}},legend:{show:u.show,top:u.top,left:u.left,right:u.right,bottom:u.bottom,orient:u.position,data:i==null?void 0:i.map(R=>R.label),formatter(R){return`{a|${or(R,u.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(R){return R.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},series:i==null?void 0:i.map(R=>({data:h.showFullStacked?O[R.label]:R.data,type:"bar",name:R.label,stack:"x",barWidth:`${h.barWidth}%`,emphasis:{focus:"series"},label:{show:c.show,position:c.position},showBackground:p.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"},itemStyle:{borderRadius:h.barRadius}}))});break}case ye.area:{i==null||i.map(O=>Object.assign(O,{fill:!0})),Object.assign(g,{...g,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"cross",label:{backgroundColor:"#6a7985"}}},legend:{show:u.show,top:u.top,left:u.left,right:u.right,bottom:u.bottom,orient:u.position,data:i==null?void 0:i.map(O=>O.label),formatter(O){return`{a|${or(O,u.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(O){return O.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},grid:{left:`${l.marginLeft}%`,bottom:`${l.marginBottom}%`,top:`${l.marginTop}%`,right:`${l.marginRight}%`,containLabel:!0},xAxis:[{type:"category",boundaryGap:!1,data:n,splitLine:{show:h.hideSplitLines==="horizontal"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="y"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="y"||h.axisLabels==="none",formatter(O){return or(O,c.truncateLabelValue||14)}}}],yAxis:[{type:"value",position:d.axis,splitLine:{show:h.hideSplitLines==="vertical"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="x"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="x"||h.axisLabels==="none"}}],series:i==null?void 0:i.map(O=>({data:O.data,type:"line",name:O.label,stack:"Total",areaStyle:{},emphasis:{focus:"series"},label:{show:c.show,position:c.position},showBackground:p.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"}}))});break}case ye.boxplot:{const O=[],R=[];i==null||i.map(P=>{O.push(P.data),R.push(P.label)}),Object.assign(g,{...g,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},title:[{text:"Box Plot",left:"center"}],legend:{show:u.show,top:u.top,left:u.left,right:u.right,bottom:u.bottom,orient:u.position,data:i==null?void 0:i.map(P=>P.label),formatter(P){return`{a|${or(P,u.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(P){return P.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},dataset:[{source:O},{transform:{type:"boxplot",config:{itemNameFormatter:"expr {value}"}}},{fromDatasetIndex:1,fromTransformResult:1}],tooltip:{trigger:"item",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"}},grid:{left:`${l.marginLeft}%`,bottom:`${l.marginBottom}%`,top:`${l.marginTop}%`,right:`${l.marginRight}%`,containLabel:!0},xAxis:{type:"category",boundaryGap:!0,nameGap:30,splitArea:{show:!1},splitLine:{show:h.hideSplitLines==="horizontal"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="y"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="y"||h.axisLabels==="none"}},yAxis:{type:"value",position:d.axis,splitArea:{show:!0},splitLine:{show:h.hideSplitLines==="vertical"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="x"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="x"||h.axisLabels==="none"}},series:[{name:"boxplot",type:"boxplot",datasetIndex:1},{name:"outlier",type:"scatter",datasetIndex:2}]});break}case ye.bubble:{const O=[],R=()=>{const j="0123456789ABCDEF";let B="#";for(let F=0;F<6;F+=1)B+=j[Math.floor(Math.random()*16)];return B};let P=8;i==null||i.map(j=>{const B=[];let F=0;const V=j.label;j.data.map(H=>{B.push([n[F],H,V]),F+=1}),O.push(B)}),Object.assign(g,{...g,tooltip:{backgroundColor:"black",textStyle:{color:"white"}},toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},legend:{show:u.show,top:u.top,left:u.left,right:u.right,bottom:u.bottom,orient:u.position,data:O.map(j=>j[0][2]),formatter(j){return`{a|${or(j,u.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(j){return j.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},grid:{left:`${l.marginLeft}%`,bottom:`${l.marginBottom}%`,top:`${l.marginTop}%`,right:`${l.marginRight}%`,containLabel:!0},xAxis:{splitLine:{show:h.hideSplitLines==="horizontal"||h.hideSplitLines==="none",lineStyle:{type:"dashed"}},axisLine:{show:h.hideAxisLines==="y"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="y"||h.axisLabels==="none",formatter(j){return or(j,c.truncateLabelValue||14)}}},yAxis:{position:d.axis,scale:!0,splitLine:{show:h.hideSplitLines==="vertical"||h.hideSplitLines==="none",lineStyle:{type:"dashed"}},axisLine:{show:h.hideAxisLines==="x"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="x"||h.axisLabels==="none"}},series:O.map(j=>{P+=3;const B=R();return{name:j[0][2],data:j.map(F=>({name:F[0],value:F[1]})),type:"scatter",symbolSize:P,emphasis:{focus:"series"},itemStyle:{color:B},label:{show:c.show,position:c.position}}})});break}case ye.combo:{const O=(y=r.yAxisList)==null?void 0:y.map((R,P)=>({type:P===0?"line":"bar",data:t.map(j=>j[R]),name:R,label:{show:c.show,position:c.position},showBackground:p.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"}}));Object.assign(g,{...g,grid:{left:`${l.marginLeft}%`,bottom:`${l.marginBottom}%`,top:`${l.marginTop}%`,right:`${l.marginRight}%`,containLabel:!0},toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"cross",crossStyle:{color:"#999"}}},legend:{show:u.show,top:u.top,left:u.left,right:u.right,bottom:u.bottom,orient:u.position,data:i==null?void 0:i.map(R=>R.label),formatter(R){return`{a|${or(R,u.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(R){return R.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},xAxis:[{type:"category",data:n,axisPointer:{type:"shadow"},splitLine:{show:h.hideSplitLines==="horizontal"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="y"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="y"||h.axisLabels==="none",formatter(R){return or(R,c.truncateLabelValue||14)}}}],yAxis:[{type:"value",interval:0,splitLine:{show:h.hideSplitLines==="vertical"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="x"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="x"||h.axisLabels==="none"}},{type:"value",interval:0,splitLine:{show:h.hideSplitLines==="vertical"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="x"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="x"||h.axisLabels==="none",formatter(R){return or(R,c.truncateLabelValue||14)}}}],series:O});break}case ye.pie:{const O=()=>({type:"pie",radius:"80%",data:(i==null?void 0:i.map((B,F)=>({value:B.data,name:n[F]||"undefined"})))||[],label:{show:!1},labelLine:{show:!1}}),R=()=>{let j=100;const B=[];return i==null||i.map(F=>{const V=[];let H=0;F.data.map(G=>{const Y={value:G,name:n[H]};V.push(Y),H+=1}),B.push([F.label,V])}),B.map(F=>(j-=20,{name:F[0],type:"pie",radius:`${j}%`,data:F[1],emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},label:{show:c.show,position:c.position},labelLine:{show:!1}}))},P=i!=null&&i.length&&((x=(b=i[0])==null?void 0:b.data)==null?void 0:x.length)>1?R():O();Object.assign(g,{...g,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},tooltip:{trigger:"item",backgroundColor:"black",textStyle:{color:"white"}},legend:{data:i!=null&&i.length&&((_=(w=i[0])==null?void 0:w.data)==null?void 0:_.length)>1||i==null?void 0:i[0],show:u.show,top:u.position==="horizontal"?"420px":u.top,left:u.left,right:u.right,bottom:u.bottom,orient:u.position,type:"scroll",formatter(j){return`{a|${or(j,u.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(j){return j.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},grid:{left:`${l.marginLeft}%`,bottom:`${l.marginBottom}%`,top:`${l.marginTop}%`,right:`${l.marginRight}%`,containLabel:!0},series:P});break}case ye.doughnut:{const O=()=>{const j=i==null?void 0:i.map((B,F)=>({value:B.data,name:n[F]||"undefined"}));return{type:"pie",radius:["30%","70%"],avoidLabelOverlap:!1,label:{show:c.show,position:c.position},data:j||[],labelLine:{show:!1}}},R=()=>{const j=[];let B=70,F=100;return i==null||i.map(V=>{const H=[];let G=0;V.data.map(Y=>{const J={value:Y,name:n[G]};H.push(J),G+=1}),j.push([V.label,H])}),j.map(V=>(B-=20,F-=20,{name:V[0],type:"pie",radius:[`${B}%`,`${F}%`],avoidLabelOverlap:!1,label:{show:c.show,position:c.position},data:V[1],labelLine:{show:!1}}))},P=n.length>1?R():O();Object.assign(g,{toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},tooltip:{trigger:"item",backgroundColor:"black",textStyle:{color:"white"}},legend:{data:n.length>1||i==null?void 0:i[0],show:u.show,top:u.position==="horizontal"?"420px":u.top,left:u.left,right:u.right,bottom:u.bottom,orient:u.position,type:"scroll",formatter(j){return`{a|${or(j,u.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(j){return j.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},grid:{left:`${l.marginLeft}%`,bottom:`${l.marginBottom}%`,top:`${l.marginTop}%`,right:`${l.marginRight}%`,containLabel:!0},series:P});break}case ye.row:{Object.assign(g,{...g,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"cross",label:{backgroundColor:"#6a7985"}}},legend:{show:u.show,top:u.top,left:u.left,right:u.right,bottom:u.bottom,orient:u.position,data:i==null?void 0:i.map(O=>O.label),formatter(O){return`{a|${or(O,u.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(O){return O.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},grid:{left:`${l.marginLeft}%`,bottom:`${l.marginBottom}%`,top:`${l.marginTop}%`,right:`${l.marginRight}%`,containLabel:!0},xAxis:{type:"value",boundaryGap:[0,.01],splitLine:{show:h.hideSplitLines==="horizontal"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="y"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="y"||h.axisLabels==="none"}},yAxis:{type:"category",data:n,splitLine:{show:h.hideSplitLines==="vertical"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="x"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="x"||h.axisLabels==="none",formatter(O){return or(O,c.truncateLabelValue||14)}}},series:i==null?void 0:i.map(O=>({data:O.data,type:"bar",name:O.label,barWidth:`${h.barWidth}%`,emphasis:{focus:"series"},label:{show:c.show,position:c.position},showBackground:p.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"},itemStyle:{borderRadius:h.barRadius}}))});break}case ye.histogram:{Object.assign(g,{...g,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"}},grid:{left:`${l.marginLeft}%`,bottom:`${l.marginBottom}%`,top:`${l.marginTop}%`,right:`${l.marginRight}%`,containLabel:!0},legend:{show:u.show,top:u.top,left:u.left,right:u.right,bottom:u.bottom,orient:u.position,data:i==null?void 0:i.map(O=>O.label),formatter(O){return`{a|${or(O,u.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(O){return O.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},xAxis:[{type:"category",data:n,axisTick:{alignWithLabel:!0},splitLine:{show:h.hideSplitLines==="horizontal"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="y"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="y"||h.axisLabels==="none",formatter(O){return or(O,c.truncateLabelValue||14)}}}],yAxis:[{type:"value",position:d.axis,splitLine:{show:h.hideSplitLines==="vertical"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="x"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="x"||h.axisLabels==="none"}}],series:[{name:(T=i==null?void 0:i[0])==null?void 0:T.label,type:"bar",barWidth:"100%",data:(A=i==null?void 0:i[0])==null?void 0:A.data,label:{show:c.show,position:c.position},showBackground:p.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"}}]});break}case ye.funnel:{Object.assign(g,{...g,tooltip:{trigger:"item",formatter:h.showConversionRate?O=>{var P,j;let R=100;return O.dataIndex>0&&(R=(((P=a[O.dataIndex])==null?void 0:P.value)||0)/(((j=a[O.dataIndex-1])==null?void 0:j.value)||1)*100),`${O.name}: ${R.toFixed(0)}%`}:h.showLabelValues?"{b}: {c}":h.labelFormat||"{b}",backgroundColor:"black",textStyle:{color:"white"}},legend:{show:u.show,top:u.top,left:u.left,right:u.right,bottom:u.bottom,orient:u.position,data:a,formatter(O){return`{a|${or(O,u.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(O){return O.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},grid:{left:`${l.marginLeft}%`,bottom:`${l.marginBottom}%`,top:`${l.marginTop}%`,right:`${l.marginRight}%`,containLabel:!0},series:[{name:"Funnel",type:"funnel",left:"10%",top:60,bottom:60,width:"80%",height:"60%",min:0,max:100,minSize:"0%",maxSize:"100%",sort:"none",gap:3,label:{show:c.show,position:c.position,formatter:h.showConversionRate?O=>{var P,j;let R=100;return O.dataIndex>0&&(R=(((P=a[O.dataIndex])==null?void 0:P.value)||0)/(((j=a[O.dataIndex-1])==null?void 0:j.value)||1)*100),`${O.name}: ${R.toFixed(0)}%`}:h.showLabelValues?"{b}: {c}":h.labelFormat||"{b}"},labelLine:{length:10,lineStyle:{width:1,type:"solid"}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{fontSize:20}},data:a}]});break}case ye.gauge:{let O={};if(i!=null&&i.length){const B=(D=i[0])==null?void 0:D.data,F=[B[0]];if(B.length)for(let V=1;V<B.length-1;V++)F.push(F[V-1]-B[V]);F.push(B[B.length-1]),O={labels:n,datasets:[B,F]}}const R=Array.isArray(O)?O:[],P=R.reduce((B,F)=>B+F.value,0),j=Math.floor(P/R.length);Object.assign(g,{...g,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},grid:{left:`${l.marginLeft}%`,bottom:`${l.marginBottom}%`,top:`${l.marginTop}%`,right:`${l.marginRight}%`,containLabel:!0},legend:{show:u.show,top:u.top,left:u.left,right:u.right,bottom:u.bottom,orient:u.position,formatter(B){return`{a|${or(B,u.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(B){return B.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},series:[{type:"gauge",center:["50%","60%"],startAngle:200,endAngle:-20,min:0,max:j+100,splitNumber:12,itemStyle:{color:"blue"},progress:{show:!0,width:20},pointer:{show:!0},axisLine:{lineStyle:{width:30}},axisTick:{distance:-45,splitNumber:5,lineStyle:{width:2,color:"#999"}},splitLine:{distance:-52,length:14,lineStyle:{width:3,color:"#999"}},axisLabel:{distance:-8,color:"black",fontSize:10},anchor:{show:!1},data:[{value:j}]}]});break}case ye.sankey:{const O=[],R=[];if(o!=null&&o.length&&((C=o[0])==null?void 0:C[0])!==((S=o[1])==null?void 0:S[0])){[o[0],o[1]].map(j=>{j.map(B=>{O.includes(B)||O.push(B)})});for(let j=0;j<((M=o[0])==null?void 0:M.length);j+=1)R.push({source:o[0][j],target:o[1][j],value:o[2][j]})}Object.assign(g,{...g,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},tooltip:{trigger:"item",triggerOn:"mousemove",backgroundColor:"black",textStyle:{color:"white"}},grid:{left:`${l.marginLeft}%`,bottom:`${l.marginBottom}%`,top:`${l.marginTop}%`,right:`${l.marginRight}%`,containLabel:!0},series:{type:"sankey",layout:"none",emphasis:{focus:"adjacency"},data:O.map(P=>({name:P})),links:R,showBackground:p.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"}}});break}case ye.singleValue:{const O=s[0]&&p0e(s[0],h.numberFormatter);Object.assign(g,{settings:{fontSize:h.fontSize||30,subHeaderFontSize:h.subHeaderFontSize||14,subHeaderShow:h.subHeaderShow||!1,displayText:h.displayText||""},value:O});break}case ye.waterfall:{let O;if(i!=null&&i.length){const R=(L=i[0])==null?void 0:L.data,P=[R[0]];if(R.length)for(let j=1;j<R.length-1;j++)P.push(P[j-1]-R[j]);P.push(R[R.length-1]),O={labels:n,datasets:[R,P]}}Object.assign(g,{...g,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"},formatter(R){const P=R[1];return`${P.name}<br/>${P.value}`}},grid:{left:`${l.marginLeft}%`,bottom:`${l.marginBottom}%`,top:`${l.marginTop}%`,right:`${l.marginRight}%`,containLabel:!0},xAxis:{type:"category",data:O==null?void 0:O.labels,splitLine:{show:h.hideSplitLines==="horizontal"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="y"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="y"||h.axisLabels==="none",formatter(R){return or(R,c.truncateLabelValue||14)}}},yAxis:{type:"value",position:d.axis,splitLine:{show:h.hideSplitLines==="vertical"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="x"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="x"||h.axisLabels==="none"}},series:[{name:"Placeholder",type:"bar",stack:"Total",itemStyle:{borderColor:"transparent",color:"transparent"},emphasis:{itemStyle:{borderColor:"transparent",color:"transparent"}},data:O==null?void 0:O.datasets[1],showBackground:p.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"}},{name:"Life Cost",type:"bar",stack:"Total",label:{show:c.show,position:c.position},data:O==null?void 0:O.datasets[0]}]});break}case ye.table:{const O=[];if(i){const R=[],P=[];i.map(j=>{R.push(j.label),P.push(j.data)});for(let j=0;j<((N=P[0])==null?void 0:N.length);j+=1){const B={};for(let F=0;F<R.length;F+=1)B[R[F]]=P[F][j];O.push(B)}}Object.assign(g,{data:O,tableSettings:f});break}case ye.stepped:{const O=["start","middle","end"];let R=2;Object.assign(g,{...g,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"}},legend:{show:u.show,top:u.top,left:u.left,right:u.right,bottom:u.bottom,orient:u.position,data:i==null?void 0:i.map(P=>P.label),formatter(P){return`{a|${or(P,u.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(P){return P.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},grid:{left:`${l.marginLeft}%`,bottom:`${l.marginBottom}%`,top:`${l.marginTop}%`,right:`${l.marginRight}%`,containLabel:!0},xAxis:{type:"category",data:n,splitLine:{show:h.hideSplitLines==="horizontal"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="y"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="y"||h.axisLabels==="none",formatter(P){return or(P,c.truncateLabelValue||14)}}},yAxis:{type:"value",position:d.axis,splitLine:{show:h.hideSplitLines==="vertical"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="x"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="x"||h.axisLabels==="none"}},series:i==null?void 0:i.map(P=>(R===0?R=1:R===1?R=2:R=0,{name:P.label,type:"line",step:O[R],data:P.data,areaStyle:{},label:{show:c.show,position:c.position},showBackground:p.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"}}))});break}case ye.scatter:{Object.assign(g,{...g,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},grid:{left:`${l.marginLeft}%`,bottom:`${l.marginBottom}%`,top:`${l.marginTop}%`,right:`${l.marginRight}%`,containLabel:!0},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"},formatter:O=>`${O.map(R=>`${R.seriesName}: ${R.value}<br />`).join("")}`},xAxis:{type:"category",data:n,splitLine:{show:h.hideSplitLines==="horizontal"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="y"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="y"||h.axisLabels==="none",formatter(O){return or(O,c.truncateLabelValue||14)}}},yAxis:{type:"value",position:d.axis,splitLine:{show:h.hideSplitLines==="vertical"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="x"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="x"||h.axisLabels==="none"}},legend:{show:u.show,top:u.top,left:u.left,right:u.right,bottom:u.bottom,orient:u.position,data:i==null?void 0:i.map(O=>O.label),formatter(O){return`{a|${or(O,u.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(O){return O.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},series:i==null?void 0:i.map(O=>({symbolSize:10,data:O.data,type:"scatter",name:O.label,label:{show:c.show,position:c.position},showBackground:p.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"}}))});break}case ye.timeSeries:{if(!tT({data:t,timeStampKey:r.xAxis||"",valuekeys:r.yAxisList||[]}))break;Object.assign(g,{...g,toolbox:{emphasis:{iconStyle:{borderColor:"#5865F6"}}},grid:{left:`${l.marginLeft}%`,bottom:`${l.marginBottom}%`,top:`${l.marginTop}%`,right:`${l.marginRight}%`,containLabel:!0},axisLine:{show:h.hideAxisLines==="y"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="y"||h.axisLabels==="none"},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"}},xAxis:{type:"category",axisTick:{alignWithLabel:!0},axisLabel:{show:h.axisLabels==="y"||h.axisLabels==="none",interval:0,rotate:h.xRotation,hideOverlap:!0,formatter(O){return or(O,c.truncateLabelValue||14)}},splitLine:{show:h.hideSplitLines==="horizontal"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="y"||h.hideAxisLines==="none"}},yAxis:{type:"value",position:d.axis,splitLine:{show:h.hideSplitLines==="vertical"||h.hideSplitLines==="none"},axisLine:{show:h.hideAxisLines==="x"||h.hideAxisLines==="none"},axisLabel:{show:h.axisLabels==="x"||h.axisLabels==="none"}},legend:{show:u.show,top:u.top,left:u.left,right:u.right,bottom:u.bottom,orient:u.position,data:r.yAxisList,formatter(O){return`{a|${or(O,u.truncateLegendValue||14)}}`},tooltip:{show:!0,formatter(O){return O.name}},textStyle:{rich:{a:{fontSize:12,lineHeight:20}}}},series:P5({dataArray:t,timeStampKey:r.xAxis||"",valuekeys:r.yAxisList||[],type:((E=v.seriesType[0])==null?void 0:E.type)||"bar",groupBy:((k=v.groupBySettings)==null?void 0:k.value)||"monthly",labelSettings:c,backGroundColor:p,customSettings:h})});break}}return g},ev=$.memo(({chartOptions:r,data:t,events:e,colors:n,config:i,className:a})=>{const o=$.useMemo(()=>v0e({chartOptions:r,data:t,colors:n}),[t,r,n]);return r.chartType===ye.singleValue?I.jsx(bye,{...i,value:o.value,settings:o.settings,className:a}):r.chartType===ye.table?I.jsx(ls,{...i,data:o.data,error:"",isLoading:!1,tableSettings:o.tableSettings,className:a}):I.jsx(Br,{style:{width:"100%",height:"100%"},...i,option:o,className:a,onEvents:e,notMerge:!0})}),j5=({isShow:r,onCancel:t,...e})=>I.jsx(zi,{isOpen:r,onClose:t,headerTitle:"Chart Preview",children:I.jsx("div",{className:KQ.fullscreen,children:I.jsx(ev,{...e})})}),us={button:"_button_1ecv1_1",menu:"_menu_1ecv1_7",menuContainer:"_menuContainer_1ecv1_13",buttonText:"_buttonText_1ecv1_19",buttonIcon:"_buttonIcon_1ecv1_25",filterName:"_filterName_1ecv1_31",filterDropdown:"_filterDropdown_1ecv1_37"},z5=r=>{const t=document.documentElement;r.colors&&Object.entries(r.colors).forEach(([e,n])=>{e&&n&&t.style.setProperty(`--databrainhq-plugin-color-${e}`,`${n}`)}),r.border&&Object.entries(r.border).forEach(([e,n])=>{e&&n&&t.style.setProperty(`--databrainhq-plugin-border-${e}`,`${n}`)}),r.shadow&&Object.entries(r.shadow).forEach(([e,n])=>{e&&n&&t.style.setProperty(`--databrainhq-plugin-shadow-${e}`,`${n}`)}),r.typography&&Object.entries(r.typography).forEach(([e,n])=>{e&&n&&t.style.setProperty(`--databrainhq-plugin-typography-${e}`,`${n}`)}),r.breakpoint&&Object.entries(r.breakpoint).forEach(([e,n])=>{e&&n&&t.style.setProperty(`--databrainhq-plugin-breakpoint-${e}`,`${n}`)})},F5=r=>Gw.includes(r.toLowerCase())?"number":Yw.includes(r.toLowerCase())||r.toLowerCase().includes("char")?"text":Zw.includes(r.toLowerCase())?"boolean":"text",B5=r=>{const t="data:text/csv;charset=utf-8,";if(!r.length)return t;const e=[],n=r[0],i=Object.keys(n);e.push(`S.NO,${i.join(",").toUpperCase()}`),r.forEach((s,l)=>{const c=Object.values(s).map(u=>{if(typeof u=="number")return u;try{if(u!=null&&u.includes(","))return`"${u}"`}catch{return u}return u});e.push(`${l+1},${c.join(",")}`)});const a=e.join(`
663
663
  `);return encodeURI(t+a)},g0e=Object.freeze(Object.defineProperty({__proto__:null,applyTheme:z5,colors:O5,getChartAttributes:R5,getFormattedDataType:F5,objectArrayToCsvString:B5},Symbol.toStringTag,{value:"Module"})),fa={container:"_container_1qflp_1",popover:"_popover_1qflp_9",button:"_button_1qflp_17",buttonOpen:"_buttonOpen_1qflp_25",menu:"_menu_1qflp_33",enter:"_enter_1qflp_41",enterFrom:"_enterFrom_1qflp_49",enterTo:"_enterTo_1qflp_57",leave:"_leave_1qflp_65",leaveFrom:"_leaveFrom_1qflp_73",leaveTo:"_leaveTo_1qflp_81",center:"_center_1qflp_89",top:"_top_1qflp_97",bottom:"_bottom_1qflp_105",left:"_left_1qflp_113",right:"_right_1qflp_121","left-top-end":"_left-top-end_1qflp_129","right-top-end":"_right-top-end_1qflp_137","left-bottom-end":"_left-bottom-end_1qflp_145","right-bottom-end":"_right-bottom-end_1qflp_153","top-left":"_top-left_1qflp_161","top-right":"_top-right_1qflp_169","bottom-left":"_bottom-left_1qflp_177","bottom-right":"_bottom-right_1qflp_185","left-top":"_left-top_1qflp_129","left-bottom":"_left-bottom_1qflp_145","right-top":"_right-top_1qflp_137","right-bottom":"_right-bottom_1qflp_153"},Fa=({className:r="",menuClass:t="",menuContainerClass:e="",buttonClass:n="",children:i,button:a,position:o="bottom",isDisabled:s})=>{const[l,c]=$.useState(!1),u=$.useRef(null);return zf({wrapRef:u,onOutsideClick:()=>c(!1)}),I.jsx(I.Fragment,{children:I.jsxs("div",{className:`${fa.container} ${r}`,ref:u,children:[I.jsx(xe,{className:`${n} ${l?fa.buttonOpen:""} ${fa.button}`,type:"button",variant:"custom",onClick:()=>!s&&c(h=>!h),children:a}),s?null:I.jsx("div",{className:`${fa.popover} ${fa[o]} ${e}`,children:I.jsx(kf,{as:"div",className:`${fa.menu} ${t}`,show:l,enter:fa.enter,enterFrom:fa.enterFrom,enterTo:fa.enterTo,leave:fa.leave,leaveFrom:fa.leaveFrom,leaveTo:fa.leaveTo,children:i})})]})})},rT=r=>["IN","NOT IN"].includes(r),F0=r=>["IS NULL","IS NOT NULL"].includes(r),m0e=({filter:r,onChange:t,isResetted:e,companyId:n,tableName:i,integrationId:a,integrationName:o})=>{const[s,l]=$.useState({value:"=",label:"Equal to (=)"}),[c,u]=$.useState({value:"",label:""}),[h,f]=$.useState([]),d=$.useMemo(()=>F5(r.dataType),[r.dataType]);return $.useEffect(()=>{!s.value||c.value!==""&&h.length||t({column:r.name,operator:s.value,value:F0(s.value)?null:c.value||h.map(p=>p.value)})},[s,c.value,h]),$.useEffect(()=>{e&&(l({label:"",value:""}),u({label:"",value:""}),f([]))},[e]),I.jsx(I.Fragment,{children:I.jsxs(Fa,{buttonClass:us.button,menuClass:us.menu,position:"bottom-left",menuContainerClass:us.menuContainer,button:I.jsxs(I.Fragment,{children:[I.jsxs("span",{className:us.buttonText,children:[I.jsx(Xw,{datatype:r.as||d}),r.name]}),I.jsx("span",{className:us.buttonIcon,children:I.jsx(Nc,{})})]}),children:[I.jsx(pe,{variant:"p",styleClass:"font-14",className:us.filterName,children:r.name}),I.jsx($r,{label:"Operator",labelVariant:"static",selectedOption:s,onChange:p=>l(p),options:Ww}),s.value&&!F0(s.value)?I.jsx(I.Fragment,{children:d==="boolean"?I.jsx($r,{options:[{value:"true",label:"TRUE"},{value:"false",label:"FALSE"}],selectedOption:c,onChange:u,label:"Filter Value",labelVariant:"static",className:us.filterDropdown}):I.jsx(I.Fragment,{children:rT(s.value)?I.jsx(Bf,{selectedOptions:h,onChange:f,filter:{tableName:i,columnName:r.name},companyId:n,isSearchEnabled:!0,label:"Filter Value",labelVariant:"static",className:us.filterDropdown,autoSelected:!1,integrationId:a,integrationName:o}):I.jsx(mg,{selectedOption:c,onChange:u,filter:{tableName:i,columnName:r.name},companyId:n,isSearchEnabled:!0,label:"Filter Value",labelVariant:"static",className:us.filterDropdown,autoSelected:!1,integrationId:a,integrationName:o})})}):null]})})},nt={container:"_container_1qgtw_1",form:"_form_1qgtw_7",filterHeader:"_filterHeader_1qgtw_23",titleContent:"_titleContent_1qgtw_29",title:"_title_1qgtw_29",buttons:"_buttons_1qgtw_41",apply:"_apply_1qgtw_47",applyIcon:"_applyIcon_1qgtw_53",reset:"_reset_1qgtw_59",filterFieldsContainer:"_filterFieldsContainer_1qgtw_67",filterFields:"_filterFields_1qgtw_67",filterContainer:"_filterContainer_1qgtw_91",AddFilter:"_AddFilter_1qgtw_97",filterDropdown:"_filterDropdown_1qgtw_103",filterDropdowns:"_filterDropdowns_1qgtw_111",noFilters:"_noFilters_1qgtw_111",gridColAndRow:"_gridColAndRow_1qgtw_127",gridCol1:"_gridCol1_1qgtw_135",gridCol2:"_gridCol2_1qgtw_143",gridCol3:"_gridCol3_1qgtw_151",filters:"_filters_1qgtw_159",filterItem:"_filterItem_1qgtw_165",filterItemOperator:"_filterItemOperator_1qgtw_171",remove:"_remove_1qgtw_177",filterCol:"_filterCol_1qgtw_183",filterText:"_filterText_1qgtw_189",smallText:"_smallText_1qgtw_195",numberFieldPopup:"_numberFieldPopup_1qgtw_203",numberField:"_numberField_1qgtw_203",numberFieldWrapper:"_numberFieldWrapper_1qgtw_219",numberFieldLabel:"_numberFieldLabel_1qgtw_227",numberFieldLabelText:"_numberFieldLabelText_1qgtw_235",numberFieldLabelSelectText:"_numberFieldLabelSelectText_1qgtw_243",numberFieldButtonClass:"_numberFieldButtonClass_1qgtw_251",numberFieldLabelMenuClass:"_numberFieldLabelMenuClass_1qgtw_259",numberFieldClearButton:"_numberFieldClearButton_1qgtw_267",numberFieldFooter:"_numberFieldFooter_1qgtw_275",checkedOption:"_checkedOption_1qgtw_283",option:"_option_1qgtw_291",addFilterMenu:"_addFilterMenu_1qgtw_299",appliedFilterTag:"_appliedFilterTag_1qgtw_307",appliedfilters:"_appliedfilters_1qgtw_315",textBold:"_textBold_1qgtw_323",filterButton:"_filterButton_1qgtw_331",filterBtnText:"_filterBtnText_1qgtw_339",filterLength:"_filterLength_1qgtw_347",addfilter:"_addfilter_1qgtw_355",alertContainer:"_alertContainer_1qgtw_363"},V5=({setAppliedFilters:r,column:t,defaultValues:e,className:n=""})=>{const[i,a]=$.useState(e||{min:0,max:1e6}),o=$.useRef(null),[s,l]=$.useState(e?`${i.min} AND ${i.max}`:"Select an option"),c=()=>{var h;a({min:0,max:1e6}),l("Select an option"),(h=o.current)==null||h.click(),r(f=>f.filter(d=>d.column!==t.name))},u=()=>{var h;r(f=>{const d={column:t.name,operator:"BETWEEN",value:`${i.min} AND ${i.max}`,as:t.as,defaultValues:i,filterType:t.isShowHorizontal?"horizontal":"global",isFilterApplied:!!t.isShowHorizontal},p=f.findIndex(g=>g.column===t.name);if(p===-1)return[...f,d];const v=[...f];return v[p]=d,v}),l(`Between ${i.min} to ${i.max}`),(h=o.current)==null||h.click()};return I.jsx(I.Fragment,{children:I.jsx(Fa,{menuClass:nt.numberFieldLabelMenuClass,button:I.jsxs("div",{className:nt.numberField,ref:o,children:[I.jsxs("div",{className:nt.numberFieldLabelText,children:[I.jsx(pe,{variant:"p",styleClass:"font-14",className:nt.numberFieldLabel,children:t.label||t.name}),I.jsx(pe,{variant:"p",styleClass:"font-14c",className:nt.numberFieldLabelSelectText,children:s})]}),I.jsx(Nc,{})]}),className:`${nt.numberFieldPopup} ${n}`,buttonClass:nt.numberFieldButtonClass,children:I.jsxs("div",{className:nt.numberFieldWrapper,children:[I.jsx(Je,{label:"minimum",type:"number",defaultValue:i.min,onChange:({target:{value:h}})=>{a(f=>({...f,min:Number(h)}))}}),I.jsx(Je,{label:"maximum",type:"number",defaultValue:i.max,onChange:({target:{value:h}})=>{a(f=>({...f,max:Number(h)}))}}),I.jsxs("div",{className:nt.numberFieldFooter,children:[I.jsx(xe,{type:"button",variant:"custom",className:nt.numberFieldClearButton,onClick:c,children:"Clear"}),I.jsx(xe,{variant:"primary",type:"button",size:"xs",onClick:u,children:"Save"})]})]})})})},y0e=({columnList:r,filterList:t,setFilterList:e})=>I.jsx(I.Fragment,{children:!!r.length&&I.jsx(Fa,{button:I.jsx(xe,{variant:"custom",type:"button",size:"small",className:nt.addfilter,children:I.jsx(Ke,{name:"plus-icon-2"})}),position:"bottom-left",children:I.jsx("div",{className:nt.addFilterMenu,children:r.map(n=>{const i=!!t.find(a=>a.name===n.name);return I.jsxs(xe,{variant:"secondary",onClick:()=>{const a=i?t.filter(o=>o.name!==n.name):[...t,n];e(a)},className:i?nt.checkedOption:nt.option,children:[i?I.jsx(JL,{}):I.jsx(gg,{}),n.label||n.name]})})})})});var nT={exports:{}},B0={exports:{}},tr={};/** @license React v16.13.1
664
664
  * react-is.production.min.js
665
665
  *