@sisense/sdk-ui 2.4.1 → 2.5.0
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/ai.cjs +1 -1
- package/dist/ai.js +4 -4
- package/dist/analytics-composer.cjs +1 -1
- package/dist/analytics-composer.js +4 -4
- package/dist/{derive-chart-family-Cqw-HJq1.cjs → derive-chart-family-Cjjn5U5S.cjs} +83 -83
- package/dist/{derive-chart-family-woVAnbRi.js → derive-chart-family-ci86jmVk.js} +2117 -2116
- package/dist/{dimensions-oGJ_aWd5.cjs → dimensions-COtPNdpu.cjs} +1 -1
- package/dist/{dimensions-BHdLQaOB.js → dimensions-wzj4u0MX.js} +1 -1
- package/dist/index.cjs +17 -17
- package/dist/index.js +7119 -6835
- package/dist/index.umd.js +311 -311
- package/dist/packages/sdk-ui/src/analytics-composer/common/utils.d.ts +18 -0
- package/dist/packages/sdk-ui/src/api/types/dashboard-dto.d.ts +4 -0
- package/dist/packages/sdk-ui/src/app/client-application.d.ts +25 -6
- package/dist/packages/sdk-ui/src/chart/advanced-chart.d.ts +1 -1
- package/dist/packages/sdk-ui/src/chart-data-options/types.d.ts +8 -0
- package/dist/packages/sdk-ui/src/chart-data-options/utils.d.ts +8 -1
- package/dist/packages/sdk-ui/src/common/components/modal/index.d.ts +1 -1
- package/dist/packages/sdk-ui/src/common/components/modal/modal-context.d.ts +0 -6
- package/dist/packages/sdk-ui/src/common/hooks/use-modal.d.ts +14 -0
- package/dist/packages/sdk-ui/src/common/icons/jtd-jumpable-icon.d.ts +1 -0
- package/dist/packages/sdk-ui/src/dashboard/components/editable-layout/components/resizable-columns.d.ts +7 -3
- package/dist/packages/sdk-ui/src/dashboard/components/editable-layout/const.d.ts +2 -2
- package/dist/packages/sdk-ui/src/dashboard/components/editable-layout/helpers.d.ts +6 -0
- package/dist/packages/sdk-ui/src/dashboard/components/jtd-dashboard.d.ts +2 -2
- package/dist/packages/sdk-ui/src/dashboard/hooks/jtd/index.d.ts +5 -0
- package/dist/packages/sdk-ui/src/dashboard/hooks/jtd/jtd-filters.d.ts +95 -0
- package/dist/packages/sdk-ui/src/dashboard/hooks/jtd/jtd-handlers.d.ts +46 -0
- package/dist/packages/sdk-ui/src/dashboard/hooks/jtd/jtd-menu.d.ts +47 -0
- package/dist/packages/sdk-ui/src/dashboard/hooks/jtd/jtd-types.d.ts +93 -0
- package/dist/packages/sdk-ui/src/dashboard/hooks/jtd/jtd-widget-transforms.d.ts +48 -0
- package/dist/packages/sdk-ui/src/dashboard/hooks/use-jtd.d.ts +1 -92
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/utils.d.ts +8 -0
- package/dist/packages/sdk-ui/src/models/dashboard/types.d.ts +18 -2
- package/dist/packages/sdk-ui/src/pivot-table/formatters/header-cell-formatters/header-cell-value-formatter.d.ts +2 -2
- package/dist/packages/sdk-ui/src/translation/resources/en.d.ts +1 -0
- package/dist/packages/sdk-ui/src/translation/resources/index.d.ts +2 -0
- package/dist/packages/sdk-ui/src/utils/parseISOWithTimezoneCheck.d.ts +9 -0
- package/dist/packages/sdk-ui/src/widget-by-id/types.d.ts +9 -9
- package/dist/{use-common-filters-Br-CoziA.js → use-common-filters-BTk7vuUo.js} +3930 -3886
- package/dist/{use-common-filters-CCXbao1t.cjs → use-common-filters-Bf8KKBN2.cjs} +77 -77
- package/dist/{widget-composer-BCNu5BzM.js → widget-composer-BtqAxkpr.js} +110 -92
- package/dist/{widget-composer-DheWJukc.cjs → widget-composer-CJDaEkCY.cjs} +7 -7
- package/package.json +7 -7
package/dist/ai.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var Qt=Object.defineProperty,Vt=Object.defineProperties;var Ut=Object.getOwnPropertyDescriptors;var pe=Object.getOwnPropertySymbols;var We=Object.prototype.hasOwnProperty,Ze=Object.prototype.propertyIsEnumerable;var qe=(e,t,r)=>t in e?Qt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,S=(e,t)=>{for(var r in t||(t={}))We.call(t,r)&&qe(e,r,t[r]);if(pe)for(var r of pe(t))Ze.call(t,r)&&qe(e,r,t[r]);return e},L=(e,t)=>Vt(e,Ut(t));var ye=(e,t)=>{var r={};for(var o in e)We.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&pe)for(var o of pe(e))t.indexOf(o)<0&&Ze.call(e,o)&&(r[o]=e[o]);return r};var U=(e,t,r)=>new Promise((o,i)=>{var d=u=>{try{h(r.next(u))}catch(C){i(C)}},l=u=>{try{h(r.throw(u))}catch(C){i(C)}},h=u=>u.done?o(u.value):Promise.resolve(u.value).then(d,l);h((r=r.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./use-common-filters-CCXbao1t.cjs"),n=require("./derive-chart-family-Cqw-HJq1.cjs"),g=require("react"),ae=require("./widget-composer-DheWJukc.cjs"),re=require("react/jsx-runtime");function _t(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const q=_t(g);class Kt extends a.Subscribable{constructor(t,r){super(),this.client=t,this.setOptions(r),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var r;const o=this.options;this.options=this.client.defaultMutationOptions(t),a.shallowEqualObjects(o,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),(r=this.currentMutation)==null||r.setOptions(this.options)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.currentMutation)==null||t.removeObserver(this)}}onMutationUpdate(t){this.updateResult();const r={listeners:!0};t.type==="success"?r.onSuccess=!0:t.type==="error"&&(r.onError=!0),this.notify(r)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(t,r){return this.mutateOptions=r,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,L(S({},this.options),{variables:typeof t!="undefined"?t:this.options.variables})),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){const t=this.currentMutation?this.currentMutation.state:a.getDefaultState(),r=L(S({},t),{isLoading:t.status==="loading",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset});this.currentResult=r}notify(t){a.notifyManager.batch(()=>{if(this.mutateOptions&&this.hasListeners()){if(t.onSuccess){var r,o,i,d;(r=(o=this.mutateOptions).onSuccess)==null||r.call(o,this.currentResult.data,this.currentResult.variables,this.currentResult.context),(i=(d=this.mutateOptions).onSettled)==null||i.call(d,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)}else if(t.onError){var l,h,u,C;(l=(h=this.mutateOptions).onError)==null||l.call(h,this.currentResult.error,this.currentResult.variables,this.currentResult.context),(u=(C=this.mutateOptions).onSettled)==null||u.call(C,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}}t.listeners&&this.listeners.forEach(({listener:y})=>{y(this.currentResult)})})}}function Le(e,t,r){const o=a.parseMutationArgs(e,t),i=a.useQueryClient({context:o.context}),[d]=q.useState(()=>new Kt(i,o));q.useEffect(()=>{d.setOptions(o)},[d,o]);const l=a.useSyncExternalStore(q.useCallback(u=>d.subscribe(a.notifyManager.batchCalls(u)),[d]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),h=q.useCallback((u,C)=>{d.mutate(u,C).catch(Xt)},[d]);if(l.error&&a.shouldThrowError(d.options.useErrorBoundary,[l.error]))throw l.error;return L(S({},l),{mutate:h,mutateAsync:l.mutate})}function Xt(){}class nt{constructor(t,r=!1){this.volatile=r,this.getChatContexts=()=>U(this,null,function*(){return(yield this.httpClient.get("api/datasources//"))||[]}),this.getNlgInsights=o=>this.httpClient.post("api/v2/ai/nlg/queryResult",o),this.getQueryRecommendations=(o,i)=>this.httpClient.get(`api/v2/ai/recommendations/query/${o}/${i.numOfRecommendations}`),this.getNlqResult=(o,i)=>this.httpClient.post(`api/v2/ai/nlq/query/${o}`,i),this.setLlmConfig=o=>this.httpClient.post("api/v2/settings/ai/llmProvider",o).catch(i=>{console.error("Unable to set llm config",i)}),this.getAllChats=()=>U(this,null,function*(){return this.volatile?[]:this.httpClient.get("api/v2/ai/chats")}),this.getChatById=o=>this.httpClient.get(`api/v2/ai/chats/${o}`),this.createChat=(o,i)=>this.httpClient.post("api/v2/ai/chats",{sourceId:o,volatile:this.volatile,contextDetails:i}),this.postChat=(o,i)=>this.httpClient.post(`api/v2/ai/chats/${o}`,i),this.deleteChatHistory=o=>this.httpClient.delete(`api/v2/ai/chats/${o}/history`),this.sendFeedback=o=>this.httpClient.post("api/v2/ai/feedback",o),this.ai={getNlgInsights:this.getNlgInsights,getNlqResult:this.getNlqResult,getQueryRecommendations:this.getQueryRecommendations,setLlmConfig:this.setLlmConfig,sendFeedback:this.sendFeedback,chat:{getAll:this.getAllChats,getById:this.getChatById,create:this.createChat,post:this.postChat,clearHistory:this.deleteChatHistory}},this.httpClient=t}}const Jt=new a.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1,refetchOnMount:!1}}}),Pe=g.createContext(void 0),W=()=>g.useContext(Pe),Yt=({children:e,volatile:t})=>{const{app:r}=n.useSisenseContext(),o=g.useMemo(()=>r?new nt(r.httpClient,t):void 0,[r,t]);return n.jsx(Pe.Provider,{value:o,children:n.jsx(a.QueryClientProvider,{client:Jt,children:e})})},rt=g.createContext({}),en=()=>g.useContext(rt),ot=({children:e})=>{const[t,r]=g.useState({}),o=g.useCallback((l,h)=>{var u;return`${l}_${(u=h==null?void 0:h.dashboardId)!=null?u:""}`},[]),i=g.useCallback((l,h,u)=>{r(C=>L(S({},C),{[o(h,u)]:l}))},[o]),d=g.useCallback((l,h)=>t[o(l,h)],[t,o]);return n.jsx(rt.Provider,{value:{saveChatId:i,getChatId:d},children:e})};function tn({children:e,volatile:t}){return n.jsx(ot,{children:n.jsx(Yt,{volatile:t,children:e})})}function st(e){var t,r;if("jaql"in e)return e;{const o=n.convertJaqlDataSource(e.dataSource),{filters:i=[],relations:d}=n.getFilterListAndRelationsJaql(e.filters),{metadata:l,filterRelations:h}=n.getJaqlQueryPayload({dataSource:e.dataSource,attributes:(t=e.dimensions)!=null?t:[],measures:(r=e.measures)!=null?r:[],filters:i,filterRelations:d,highlights:[]},!0),u={jaql:{datasource:o,metadata:l,filterRelations:h}};return e.verbosity&&(u.verbosity=e.verbosity),u}}const fe=(e,t=!0)=>{const r=g.useMemo(()=>st(e),[e]),o=W(),{data:i,error:d,isError:l,isLoading:h,isSuccess:u,refetch:C}=a.useQuery({queryKey:["getNlgInsights",r,o],queryFn:()=>o==null?void 0:o.ai.getNlgInsights(r),select:y=>{var m;return(m=y==null?void 0:y.data)==null?void 0:m.answer},enabled:!!o&&t});return{isLoading:h,isError:l,isSuccess:u,data:i,error:d,refetch:g.useCallback(()=>{C()},[C])}},nn=e=>{const o=e,{enabled:t}=o,r=ye(o,["enabled"]);return fe(r,t)},rn=a.withTracking("useGetNlgInsights")(nn),it=["indicator","column","line","table","pie","bar"];function at(e){const{dataSource:t,query:r,chartTypes:o}=e;return{contextTitle:typeof t=="string"?t:t.title,request:{text:r,timezone:"UTC",chartTypes:o!=null?o:[...it]}}}const on=e=>{const{contextTitle:t,request:r}=at(e),o=W(),{isLoading:i,isError:d,isSuccess:l,data:h,error:u,refetch:C}=a.useQuery({queryKey:["getNlqResult",t,r,o],queryFn:()=>o==null?void 0:o.ai.getNlqResult(t,r),enabled:!!o&&e.enabled}),y=h?ae.toWidgetProps(h,{useCustomizedStyleOptions:e.enableAxisTitlesInWidgetProps||!1}):void 0;return{isLoading:i,isError:d,isSuccess:l,data:y,error:u,refetch:g.useCallback(()=>{C()},[C])}},sn=a.withTracking("useGetNlqResult")(on),lt=4,ct=e=>{const{contextTitle:t,count:r,enableAxisTitlesInWidgetProps:o,enabled:i}=e,d=W(),l=r!=null?r:lt,h=(i===void 0||i===!0)&&l>0,{isLoading:u,isError:C,isSuccess:y,data:m,error:s,refetch:p}=a.useQuery({queryKey:["getQueryRecommendations",t,l,d],queryFn:()=>d==null?void 0:d.ai.getQueryRecommendations(t,{numOfRecommendations:l}),enabled:!!d&&h}),c=g.useMemo(()=>m==null?void 0:m.map(x=>L(S({},x),{widgetProps:x.jaql?ae.toWidgetProps(x,{useCustomizedStyleOptions:o}):void 0})),[m,o]);return{isLoading:h?u:!1,isError:C,isSuccess:y,data:c!=null?c:void 0,error:s,refetch:g.useCallback(()=>{p()},[p])}},an=a.withTracking("useGetQueryRecommendations")(ct),dt=Object.freeze({enableFollowupQuestions:!1,enableHeader:!0,enableInsights:!0,numOfRecommendations:4,numOfRecentPrompts:5}),ut=g.createContext(S({},dt)),Q=()=>g.useContext(ut),ln=({children:e,value:t})=>{const{t:r}=n.useTranslation(),o=Object.entries(t).reduce((i,[d,l])=>(l!==void 0&&(i[d]=l),i),L(S({},dt),{inputPromptText:r("ai.config.inputPromptText"),welcomeText:r("ai.config.welcomeText"),suggestionsWelcomeText:r("ai.config.suggestionsWelcomeText")}));return n.jsx(ut.Provider,{value:o,children:e})},Ee="chatHistory",cn=e=>{const t=W(),{hideHistory:r}=Q();return a.useQuery({queryKey:[Ee,e,t],queryFn:()=>U(exports,null,function*(){if(!t||!e)return;if(r)return[];const o=yield t.ai.chat.getById(e);return o==null?void 0:o.chatHistory}),enabled:!!t&&!!e})},pt=e=>{const t=W(),r=a.useQueryClient();return Le({mutationFn:()=>U(exports,null,function*(){if(!(!t||!e))return t.ai.chat.clearHistory(e)}),onError:o=>{console.error("Error when clearing history:",o)},onSettled:()=>{e&&r.setQueriesData([Ee,e],[])}})},Ie=e=>{const{data:t,isLoading:r,isError:o}=cn(e),{mutate:i}=pt(e);return g.useEffect(()=>{o&&i()},[o,i]),{history:t,isLoading:r,isError:o}},dn=()=>{const e=W(),{data:t,isLoading:r,fetchStatus:o}=a.useQuery({queryKey:["getDataTopics",e],queryFn:()=>U(exports,null,function*(){if(e)return e.getChatContexts()}),enabled:!!e});return{data:t,isLoading:r,fetchStatus:o}},un=()=>{const e=W(),{data:t,isLoading:r}=a.useQuery({queryKey:["getAllChats",e],queryFn:()=>e==null?void 0:e.ai.chat.getAll(),enabled:!!e});return{data:t!=null?t:[],isLoading:r}},pn=(e,t,r)=>{const o=a.useQueryClient(),i=W(),d=Le({mutationFn:()=>U(exports,null,function*(){if(!(!i||!e))return i.ai.chat.create(e,r)}),onSuccess:()=>o.invalidateQueries(["getAllChats"])});return g.useEffect(()=>{t&&d.isIdle&&d.mutate()},[t,d]),d},hn=(e,t)=>{switch(e.responseType=e.responseType.toLowerCase(),e.responseType){case"nlq":return{content:JSON.stringify(e.data),role:"assistant",type:"nlq"};case"text":case"error":return{content:e.data.answer,role:"assistant"};default:throw Error(`${t}${JSON.stringify(e)}`)}},gn=(e,t)=>{const r=a.useQueryClient(),o=g.useCallback(u=>{e&&r.setQueriesData([Ee,e],C=>C&&[...C,u])},[r,e]),{t:i}=n.useTranslation(),d=W(),{mutate:l,isLoading:h}=Le({mutationFn:u=>U(exports,null,function*(){if(!(!d||!e))return d.ai.chat.post(e,{text:u,options:{enableFollowup:t}})}),onMutate:u=>{o({content:u,role:"user"})},onError:u=>{u instanceof Error&&(console.error("Error when sending message:",u.message),o({content:i(`ai.errors.${u.interpolationOptions.errorCode}`,{defaultValue:i("ai.errors.unexpectedChatResponse")}),role:"assistant"}))},onSuccess:u=>{if(!u)return;const C=i("ai.errors.unknownResponse");o(hn(u,C))}});return{mutate:l,isLoading:h}},Fe=(e,t,r=!1)=>{var y;const{data:o,isLoading:i}=un(),d=en(),l=d.getChatId(e,t)||((y=o.find(m=>{var s;return m.contextTitle===e&&((s=m.contextDetails)==null?void 0:s.dashboardId)===(t==null?void 0:t.dashboardId)}))==null?void 0:y.chatId),{isError:h,data:u,isSuccess:C}=pn(e,r&&!i&&!l,t);return g.useEffect(()=>{C&&u&&!l&&d.saveChatId(u.chatId,e,t)},[u,C,e,t,l,d]),{chatId:l,isLoading:i,isError:h}},ht=e=>g.useMemo(()=>{if(e!=null&&e.length){const t=e[e.length-1];if(Ne(t))return JSON.parse(t.content)}return null},[e]),Ne=e=>!!e&&"type"in e&&e.type==="nlq",Cn=e=>!!e&&"type"in e&&e.type==="text",gt=(e,t)=>{const{t:r}=n.useTranslation(),{enableFollowupQuestions:o}=Q(),{chatId:i,isError:d}=Fe(e,t,!0),[l,h]=g.useState(null),{history:u,isLoading:C,isError:y}=Ie(i);g.useEffect(()=>{d?h(new n.TranslatableError("ai.errors.chatUnavailable")):y&&h(new n.TranslatableError("ai.errors.fetchHistory"))},[d,y,r]);const{mutate:m,isLoading:s}=gn(i,o),p=ht(u);return{chatId:i,history:u!=null?u:[],lastNlqResponse:p,sendMessage:m,isAwaitingResponse:s,isLoading:C,lastError:l}},fn=({contextTitle:e,contextDetails:t})=>{const{chatId:r}=Fe(e,t),{history:o}=Ie(r);return ht(o)},xn=({contextTitle:e,contextDetails:t})=>{const{chatId:r}=Fe(e,t),{history:o}=Ie(r);return g.useMemo(()=>{if(o!=null&&o.length){const i=o.slice().reverse().find(Ne);if(i)return JSON.parse(i.content)}return null},[o])},mn=500,yn=500,bn=500,kn=900,vn=n.newStyled("div",{target:"e1ldv6710",label:"ChatFrame"})("box-sizing:border-box;position:relative;display:flex;flex-direction:column;border:1px solid #c6c9ce;border-radius:",({theme:e})=>e.aiChat.borderRadius,";background-color:",({theme:e})=>e.aiChat.backgroundColor,";overflow:hidden;min-width:",mn,"px;min-height:",yn,"px;width:",({width:e})=>e?Ge(e):`${bn}px`,";height:",({height:e})=>e?Ge(e):`${kn}px`,";",({theme:e})=>n.css`
|
|
1
|
+
"use strict";var Qt=Object.defineProperty,Vt=Object.defineProperties;var Ut=Object.getOwnPropertyDescriptors;var pe=Object.getOwnPropertySymbols;var We=Object.prototype.hasOwnProperty,Ze=Object.prototype.propertyIsEnumerable;var qe=(e,t,r)=>t in e?Qt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,S=(e,t)=>{for(var r in t||(t={}))We.call(t,r)&&qe(e,r,t[r]);if(pe)for(var r of pe(t))Ze.call(t,r)&&qe(e,r,t[r]);return e},L=(e,t)=>Vt(e,Ut(t));var ye=(e,t)=>{var r={};for(var o in e)We.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&pe)for(var o of pe(e))t.indexOf(o)<0&&Ze.call(e,o)&&(r[o]=e[o]);return r};var U=(e,t,r)=>new Promise((o,i)=>{var d=u=>{try{h(r.next(u))}catch(C){i(C)}},l=u=>{try{h(r.throw(u))}catch(C){i(C)}},h=u=>u.done?o(u.value):Promise.resolve(u.value).then(d,l);h((r=r.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./use-common-filters-Bf8KKBN2.cjs"),n=require("./derive-chart-family-Cjjn5U5S.cjs"),g=require("react"),ae=require("./widget-composer-CJDaEkCY.cjs"),re=require("react/jsx-runtime");function _t(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const q=_t(g);class Kt extends a.Subscribable{constructor(t,r){super(),this.client=t,this.setOptions(r),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var r;const o=this.options;this.options=this.client.defaultMutationOptions(t),a.shallowEqualObjects(o,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),(r=this.currentMutation)==null||r.setOptions(this.options)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.currentMutation)==null||t.removeObserver(this)}}onMutationUpdate(t){this.updateResult();const r={listeners:!0};t.type==="success"?r.onSuccess=!0:t.type==="error"&&(r.onError=!0),this.notify(r)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(t,r){return this.mutateOptions=r,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,L(S({},this.options),{variables:typeof t!="undefined"?t:this.options.variables})),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){const t=this.currentMutation?this.currentMutation.state:a.getDefaultState(),r=L(S({},t),{isLoading:t.status==="loading",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset});this.currentResult=r}notify(t){a.notifyManager.batch(()=>{if(this.mutateOptions&&this.hasListeners()){if(t.onSuccess){var r,o,i,d;(r=(o=this.mutateOptions).onSuccess)==null||r.call(o,this.currentResult.data,this.currentResult.variables,this.currentResult.context),(i=(d=this.mutateOptions).onSettled)==null||i.call(d,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)}else if(t.onError){var l,h,u,C;(l=(h=this.mutateOptions).onError)==null||l.call(h,this.currentResult.error,this.currentResult.variables,this.currentResult.context),(u=(C=this.mutateOptions).onSettled)==null||u.call(C,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}}t.listeners&&this.listeners.forEach(({listener:y})=>{y(this.currentResult)})})}}function Le(e,t,r){const o=a.parseMutationArgs(e,t),i=a.useQueryClient({context:o.context}),[d]=q.useState(()=>new Kt(i,o));q.useEffect(()=>{d.setOptions(o)},[d,o]);const l=a.useSyncExternalStore(q.useCallback(u=>d.subscribe(a.notifyManager.batchCalls(u)),[d]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),h=q.useCallback((u,C)=>{d.mutate(u,C).catch(Xt)},[d]);if(l.error&&a.shouldThrowError(d.options.useErrorBoundary,[l.error]))throw l.error;return L(S({},l),{mutate:h,mutateAsync:l.mutate})}function Xt(){}class nt{constructor(t,r=!1){this.volatile=r,this.getChatContexts=()=>U(this,null,function*(){return(yield this.httpClient.get("api/datasources//"))||[]}),this.getNlgInsights=o=>this.httpClient.post("api/v2/ai/nlg/queryResult",o),this.getQueryRecommendations=(o,i)=>this.httpClient.get(`api/v2/ai/recommendations/query/${o}/${i.numOfRecommendations}`),this.getNlqResult=(o,i)=>this.httpClient.post(`api/v2/ai/nlq/query/${o}`,i),this.setLlmConfig=o=>this.httpClient.post("api/v2/settings/ai/llmProvider",o).catch(i=>{console.error("Unable to set llm config",i)}),this.getAllChats=()=>U(this,null,function*(){return this.volatile?[]:this.httpClient.get("api/v2/ai/chats")}),this.getChatById=o=>this.httpClient.get(`api/v2/ai/chats/${o}`),this.createChat=(o,i)=>this.httpClient.post("api/v2/ai/chats",{sourceId:o,volatile:this.volatile,contextDetails:i}),this.postChat=(o,i)=>this.httpClient.post(`api/v2/ai/chats/${o}`,i),this.deleteChatHistory=o=>this.httpClient.delete(`api/v2/ai/chats/${o}/history`),this.sendFeedback=o=>this.httpClient.post("api/v2/ai/feedback",o),this.ai={getNlgInsights:this.getNlgInsights,getNlqResult:this.getNlqResult,getQueryRecommendations:this.getQueryRecommendations,setLlmConfig:this.setLlmConfig,sendFeedback:this.sendFeedback,chat:{getAll:this.getAllChats,getById:this.getChatById,create:this.createChat,post:this.postChat,clearHistory:this.deleteChatHistory}},this.httpClient=t}}const Jt=new a.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1,refetchOnMount:!1}}}),Pe=g.createContext(void 0),W=()=>g.useContext(Pe),Yt=({children:e,volatile:t})=>{const{app:r}=n.useSisenseContext(),o=g.useMemo(()=>r?new nt(r.httpClient,t):void 0,[r,t]);return n.jsx(Pe.Provider,{value:o,children:n.jsx(a.QueryClientProvider,{client:Jt,children:e})})},rt=g.createContext({}),en=()=>g.useContext(rt),ot=({children:e})=>{const[t,r]=g.useState({}),o=g.useCallback((l,h)=>{var u;return`${l}_${(u=h==null?void 0:h.dashboardId)!=null?u:""}`},[]),i=g.useCallback((l,h,u)=>{r(C=>L(S({},C),{[o(h,u)]:l}))},[o]),d=g.useCallback((l,h)=>t[o(l,h)],[t,o]);return n.jsx(rt.Provider,{value:{saveChatId:i,getChatId:d},children:e})};function tn({children:e,volatile:t}){return n.jsx(ot,{children:n.jsx(Yt,{volatile:t,children:e})})}function st(e){var t,r;if("jaql"in e)return e;{const o=n.convertJaqlDataSource(e.dataSource),{filters:i=[],relations:d}=n.getFilterListAndRelationsJaql(e.filters),{metadata:l,filterRelations:h}=n.getJaqlQueryPayload({dataSource:e.dataSource,attributes:(t=e.dimensions)!=null?t:[],measures:(r=e.measures)!=null?r:[],filters:i,filterRelations:d,highlights:[]},!0),u={jaql:{datasource:o,metadata:l,filterRelations:h}};return e.verbosity&&(u.verbosity=e.verbosity),u}}const fe=(e,t=!0)=>{const r=g.useMemo(()=>st(e),[e]),o=W(),{data:i,error:d,isError:l,isLoading:h,isSuccess:u,refetch:C}=a.useQuery({queryKey:["getNlgInsights",r,o],queryFn:()=>o==null?void 0:o.ai.getNlgInsights(r),select:y=>{var m;return(m=y==null?void 0:y.data)==null?void 0:m.answer},enabled:!!o&&t});return{isLoading:h,isError:l,isSuccess:u,data:i,error:d,refetch:g.useCallback(()=>{C()},[C])}},nn=e=>{const o=e,{enabled:t}=o,r=ye(o,["enabled"]);return fe(r,t)},rn=a.withTracking("useGetNlgInsights")(nn),it=["indicator","column","line","table","pie","bar"];function at(e){const{dataSource:t,query:r,chartTypes:o}=e;return{contextTitle:typeof t=="string"?t:t.title,request:{text:r,timezone:"UTC",chartTypes:o!=null?o:[...it]}}}const on=e=>{const{contextTitle:t,request:r}=at(e),o=W(),{isLoading:i,isError:d,isSuccess:l,data:h,error:u,refetch:C}=a.useQuery({queryKey:["getNlqResult",t,r,o],queryFn:()=>o==null?void 0:o.ai.getNlqResult(t,r),enabled:!!o&&e.enabled}),y=h?ae.toWidgetProps(h,{useCustomizedStyleOptions:e.enableAxisTitlesInWidgetProps||!1}):void 0;return{isLoading:i,isError:d,isSuccess:l,data:y,error:u,refetch:g.useCallback(()=>{C()},[C])}},sn=a.withTracking("useGetNlqResult")(on),lt=4,ct=e=>{const{contextTitle:t,count:r,enableAxisTitlesInWidgetProps:o,enabled:i}=e,d=W(),l=r!=null?r:lt,h=(i===void 0||i===!0)&&l>0,{isLoading:u,isError:C,isSuccess:y,data:m,error:s,refetch:p}=a.useQuery({queryKey:["getQueryRecommendations",t,l,d],queryFn:()=>d==null?void 0:d.ai.getQueryRecommendations(t,{numOfRecommendations:l}),enabled:!!d&&h}),c=g.useMemo(()=>m==null?void 0:m.map(x=>L(S({},x),{widgetProps:x.jaql?ae.toWidgetProps(x,{useCustomizedStyleOptions:o}):void 0})),[m,o]);return{isLoading:h?u:!1,isError:C,isSuccess:y,data:c!=null?c:void 0,error:s,refetch:g.useCallback(()=>{p()},[p])}},an=a.withTracking("useGetQueryRecommendations")(ct),dt=Object.freeze({enableFollowupQuestions:!1,enableHeader:!0,enableInsights:!0,numOfRecommendations:4,numOfRecentPrompts:5}),ut=g.createContext(S({},dt)),Q=()=>g.useContext(ut),ln=({children:e,value:t})=>{const{t:r}=n.useTranslation(),o=Object.entries(t).reduce((i,[d,l])=>(l!==void 0&&(i[d]=l),i),L(S({},dt),{inputPromptText:r("ai.config.inputPromptText"),welcomeText:r("ai.config.welcomeText"),suggestionsWelcomeText:r("ai.config.suggestionsWelcomeText")}));return n.jsx(ut.Provider,{value:o,children:e})},Ee="chatHistory",cn=e=>{const t=W(),{hideHistory:r}=Q();return a.useQuery({queryKey:[Ee,e,t],queryFn:()=>U(exports,null,function*(){if(!t||!e)return;if(r)return[];const o=yield t.ai.chat.getById(e);return o==null?void 0:o.chatHistory}),enabled:!!t&&!!e})},pt=e=>{const t=W(),r=a.useQueryClient();return Le({mutationFn:()=>U(exports,null,function*(){if(!(!t||!e))return t.ai.chat.clearHistory(e)}),onError:o=>{console.error("Error when clearing history:",o)},onSettled:()=>{e&&r.setQueriesData([Ee,e],[])}})},Ie=e=>{const{data:t,isLoading:r,isError:o}=cn(e),{mutate:i}=pt(e);return g.useEffect(()=>{o&&i()},[o,i]),{history:t,isLoading:r,isError:o}},dn=()=>{const e=W(),{data:t,isLoading:r,fetchStatus:o}=a.useQuery({queryKey:["getDataTopics",e],queryFn:()=>U(exports,null,function*(){if(e)return e.getChatContexts()}),enabled:!!e});return{data:t,isLoading:r,fetchStatus:o}},un=()=>{const e=W(),{data:t,isLoading:r}=a.useQuery({queryKey:["getAllChats",e],queryFn:()=>e==null?void 0:e.ai.chat.getAll(),enabled:!!e});return{data:t!=null?t:[],isLoading:r}},pn=(e,t,r)=>{const o=a.useQueryClient(),i=W(),d=Le({mutationFn:()=>U(exports,null,function*(){if(!(!i||!e))return i.ai.chat.create(e,r)}),onSuccess:()=>o.invalidateQueries(["getAllChats"])});return g.useEffect(()=>{t&&d.isIdle&&d.mutate()},[t,d]),d},hn=(e,t)=>{switch(e.responseType=e.responseType.toLowerCase(),e.responseType){case"nlq":return{content:JSON.stringify(e.data),role:"assistant",type:"nlq"};case"text":case"error":return{content:e.data.answer,role:"assistant"};default:throw Error(`${t}${JSON.stringify(e)}`)}},gn=(e,t)=>{const r=a.useQueryClient(),o=g.useCallback(u=>{e&&r.setQueriesData([Ee,e],C=>C&&[...C,u])},[r,e]),{t:i}=n.useTranslation(),d=W(),{mutate:l,isLoading:h}=Le({mutationFn:u=>U(exports,null,function*(){if(!(!d||!e))return d.ai.chat.post(e,{text:u,options:{enableFollowup:t}})}),onMutate:u=>{o({content:u,role:"user"})},onError:u=>{u instanceof Error&&(console.error("Error when sending message:",u.message),o({content:i(`ai.errors.${u.interpolationOptions.errorCode}`,{defaultValue:i("ai.errors.unexpectedChatResponse")}),role:"assistant"}))},onSuccess:u=>{if(!u)return;const C=i("ai.errors.unknownResponse");o(hn(u,C))}});return{mutate:l,isLoading:h}},Fe=(e,t,r=!1)=>{var y;const{data:o,isLoading:i}=un(),d=en(),l=d.getChatId(e,t)||((y=o.find(m=>{var s;return m.contextTitle===e&&((s=m.contextDetails)==null?void 0:s.dashboardId)===(t==null?void 0:t.dashboardId)}))==null?void 0:y.chatId),{isError:h,data:u,isSuccess:C}=pn(e,r&&!i&&!l,t);return g.useEffect(()=>{C&&u&&!l&&d.saveChatId(u.chatId,e,t)},[u,C,e,t,l,d]),{chatId:l,isLoading:i,isError:h}},ht=e=>g.useMemo(()=>{if(e!=null&&e.length){const t=e[e.length-1];if(Ne(t))return JSON.parse(t.content)}return null},[e]),Ne=e=>!!e&&"type"in e&&e.type==="nlq",Cn=e=>!!e&&"type"in e&&e.type==="text",gt=(e,t)=>{const{t:r}=n.useTranslation(),{enableFollowupQuestions:o}=Q(),{chatId:i,isError:d}=Fe(e,t,!0),[l,h]=g.useState(null),{history:u,isLoading:C,isError:y}=Ie(i);g.useEffect(()=>{d?h(new n.TranslatableError("ai.errors.chatUnavailable")):y&&h(new n.TranslatableError("ai.errors.fetchHistory"))},[d,y,r]);const{mutate:m,isLoading:s}=gn(i,o),p=ht(u);return{chatId:i,history:u!=null?u:[],lastNlqResponse:p,sendMessage:m,isAwaitingResponse:s,isLoading:C,lastError:l}},fn=({contextTitle:e,contextDetails:t})=>{const{chatId:r}=Fe(e,t),{history:o}=Ie(r);return ht(o)},xn=({contextTitle:e,contextDetails:t})=>{const{chatId:r}=Fe(e,t),{history:o}=Ie(r);return g.useMemo(()=>{if(o!=null&&o.length){const i=o.slice().reverse().find(Ne);if(i)return JSON.parse(i.content)}return null},[o])},mn=500,yn=500,bn=500,kn=900,vn=n.newStyled("div",{target:"e1ldv6710",label:"ChatFrame"})("box-sizing:border-box;position:relative;display:flex;flex-direction:column;border:1px solid #c6c9ce;border-radius:",({theme:e})=>e.aiChat.borderRadius,";background-color:",({theme:e})=>e.aiChat.backgroundColor,";overflow:hidden;min-width:",mn,"px;min-height:",yn,"px;width:",({width:e})=>e?Ge(e):`${bn}px`,";height:",({height:e})=>e?Ge(e):`${kn}px`,";",({theme:e})=>n.css`
|
|
2
2
|
font-size: ${e.aiChat.primaryFontSize[0]};
|
|
3
3
|
line-height: ${e.aiChat.primaryFontSize[1]};
|
|
4
4
|
`," border:",({theme:e})=>e.aiChat.border===!1?"none":e.aiChat.border,";");function Ge(e){return typeof e=="number"?`${e}px`:e}function wn({spin:e}){return n.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",className:`${e?"csdk-animate-spin":""}`,children:[n.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z",fill:"#262E3D",fillOpacity:"0.3"}),n.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20 12C20 16.4183 16.4183 20 12 20C11.2844 20 10.5908 19.906 9.93078 19.7298C9.96227 19.5889 9.97888 19.4423 9.97888 19.2918C9.97888 18.1873 9.08345 17.2918 7.97888 17.2918C6.87431 17.2918 5.97888 18.1873 5.97888 19.2918C5.97888 20.3964 6.87431 21.2918 7.97888 21.2918C8.56576 21.2918 9.0936 21.0391 9.45946 20.6364C10.2652 20.8731 11.1178 21 12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3V4C16.4183 4 20 7.58172 20 12Z",fill:"#22C3C3"})]})}function xe(){return n.jsx("div",{className:"csdk-m-auto","aria-label":"loading spinner",children:n.jsx(wn,{spin:!0})})}function jn({theme:e}){return n.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:n.jsx("path",{d:"M4 14L0 10L24 0L14 24L10 20L8.47667 16.9533L19 6.4L20 4.00001L17.6099 5L7.04354 15.5218L4 14Z",fill:e.aiChat.icons.color})})}function Sn({theme:e}){const t=e.aiChat.icons.color;return n.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"25",height:"25",viewBox:"0 0 25 25",fill:"none",children:[n.jsx("path",{d:"M21.4095 11.1195L12.5644 6.0459C12.3247 5.90841 12.0189 5.99143 11.8816 6.23128L10.764 8.18434C10.6275 8.42284 10.709 8.72678 10.9466 8.86491L19.7108 13.9614C19.9464 14.0984 20.2483 14.0215 20.3897 13.7884L21.5883 11.8125C21.734 11.5723 21.6532 11.2592 21.4095 11.1195Z",fill:t}),n.jsx("path",{d:"M18.7329 8.60735L16.1048 7.07819L19.6668 0.928042C19.8041 0.6909 20.1068 0.608502 20.3454 0.743288L22.156 1.7661C22.3992 1.90347 22.4827 2.21344 22.3414 2.45438L18.7329 8.60735Z",fill:t}),n.jsx("path",{d:"M19.8544 14.9048L10.3563 9.43067C10.2184 9.35116 10.0413 9.39515 9.95275 9.52746C7.03423 13.8862 4.07448 15.2337 3.18167 16.0938C3.09276 16.1794 3.08414 16.3141 3.1538 16.416C3.74961 17.2879 5.10497 18.4425 6.05628 19.2048C6.17328 19.2985 6.34145 19.2903 6.44961 19.1865L9.97994 15.7973L7.69329 20.1066C7.61954 20.2456 7.66674 20.4186 7.80041 20.5017C11.6152 22.8708 14.2978 24.0437 16.9604 24.4472C17.1542 24.4766 17.3191 24.3106 17.3033 24.1152C17.007 20.469 19.0807 16.6112 19.8544 14.9048Z",fill:t})]})}const Tn=n.newStyled("div",{target:"e1q6h1ze0",label:"Section"})("display:flex;flex-direction:column;row-gap:4px;"),Mn=n.newStyled("div",{target:"e1q6h1ze1",label:"SectionHeader"})("font-size:11px;line-height:18px;font-weight:300;color:",({theme:e})=>e.aiChat.dropup.headers.textColor,";cursor:pointer;padding:4px 12px;&:hover{background-color:",({theme:e})=>e.aiChat.dropup.headers.hover.backgroundColor,";}"),Rn=n.newStyled("div",{target:"e1q6h1ze2",label:"DropupItem"})("font-size:",({theme:e})=>e.aiChat.primaryFontSize[0],";line-height:",({theme:e})=>e.aiChat.primaryFontSize[1],";color:",({theme:e})=>e.aiChat.dropup.items.textColor,";cursor:pointer;padding:4px 12px;&:hover{background-color:",({theme:e})=>e.aiChat.dropup.items.hover.backgroundColor,";}");function Ln({title:e,items:t,onSelect:r,alwaysExpanded:o=!1}){const[i,d]=g.useState(!1),{themeSettings:l}=n.useThemeContext();return n.jsxs(Tn,{children:[n.jsx(Mn,{onClick:()=>d(h=>!h),theme:l,children:e.toUpperCase()}),(i||o)&&t.map((h,u)=>n.jsx(Rn,{onClick:()=>r(h),theme:l,children:h},u))]})}const Pn=n.newStyled("div",{target:"e10x5x4a0",label:"PopupContent"})("font-family:",({theme:e})=>e.typography.fontFamily,";font-size:",({theme:e})=>e.aiChat.primaryFontSize[0],";line-height:",({theme:e})=>e.aiChat.primaryFontSize[1],";background-color:",({theme:e})=>e.aiChat.dropup.backgroundColor,";border-radius:",({theme:e})=>e.aiChat.dropup.borderRadius,";box-shadow:",({theme:e})=>e.aiChat.dropup.boxShadow,";padding-top:8px;padding-bottom:8px;display:flex;flex-direction:column;row-gap:4px;"),En=n.newStyled("div",{target:"e10x5x4a1",label:"ErrorMessage"})("font-size:",({theme:e})=>e.aiChat.primaryFontSize[0],";line-height:",({theme:e})=>e.aiChat.primaryFontSize[1],";color:",({theme:e})=>e.aiChat.dropup.items.textColor,";padding:4px 12px;"),Se=e=>e.startsWith("/");function In({recentPrompts:e,suggestions:t,isLoading:r,onSelection:o,anchorEl:i,text:d,recommendationsError:l}){const u=[{title:"/recent searches",items:e,onSelect:o},{title:"/ai recommendations",items:t,onSelect:o}].filter(s=>s.title.slice(0,d.length)===d),{themeSettings:C}=n.useThemeContext(),{t:y}=n.useTranslation(),m=u.length===1;return n.jsx(a.Popper,{open:Se(d)&&u.length>0,anchorEl:i,placement:"top-start",modifiers:[{name:"offset",options:{offset:[0,4]}}],sx:{zIndex:3},children:n.jsxs(Pn,{style:{width:i==null?void 0:i.offsetWidth},theme:C,children:[r&&n.jsx(xe,{}),!r&&!l&&u.map(s=>n.jsx(Ln,L(S({},s),{alwaysExpanded:m}),s.title)),l&&n.jsx(En,{theme:C,children:y("ai.errors.recommendationsNotAvailable")})]})})}function le({title:e,placement:t="top",children:r}){const{themeSettings:o}=n.useThemeContext();return n.jsx(a.Tooltip,{title:e,placement:t,disableInteractive:!0,componentsProps:{tooltip:{sx:{bgcolor:o.aiChat.tooltips.backgroundColor,color:o.aiChat.tooltips.textColor,paddingX:"16px",paddingY:"12px",fontSize:"13px",fontFamily:o.typography.fontFamily,fontWeight:400,borderRadius:"4px",boxShadow:o.aiChat.tooltips.boxShadow}},arrow:{sx:{color:o.aiChat.tooltips.backgroundColor}}},arrow:!0,children:r})}const Fn=500,Nn=n.newStyled("div",{target:"e6iwkw10",label:"ChatInputContainer"})("display:flex;flex-direction:row;align-items:flex-end;justify-content:space-between;background-color:",({theme:e})=>e.aiChat.backgroundColor,";"),Bn=n.newStyled("button",{target:"e6iwkw11",label:"ClearHistoryButton"})("height:34px;background-color:inherit;cursor:pointer;border:none;"),On=n.newStyled("textarea",{target:"e6iwkw12",label:"TextInput"})("font-size:inherit;line-height:inherit;resize:none;overflow-y:auto;box-sizing:border-box;max-height:88px;width:100%;padding-top:7px;padding-bottom:7px;padding-left:16px;padding-right:16px;margin-left:10px;margin-right:10px;border-width:1px;border-color:rgb(38 46 61 / 0.15);border-radius:0.5rem;&:focus{outline:1px solid ",({theme:e})=>e.aiChat.input.focus.outlineColor,";}font-family:inherit;color:",({theme:e})=>e.aiChat.primaryTextColor,";background-color:",({theme:e})=>e.aiChat.input.backgroundColor,";"),Hn=n.newStyled("button",{target:"e6iwkw13",label:"SendMessageButton"})("height:34px;background-color:inherit;border-style:none;color:",({theme:e})=>e.aiChat.primaryTextColor,";",({disabled:e})=>e?n.css`
|
package/dist/ai.js
CHANGED
|
@@ -35,12 +35,12 @@ var ne = (e, t, n) => new Promise((r, a) => {
|
|
|
35
35
|
}, p = (d) => d.done ? r(d.value) : Promise.resolve(d.value).then(c, s);
|
|
36
36
|
p((n = n.apply(e, t)).next());
|
|
37
37
|
});
|
|
38
|
-
import {
|
|
39
|
-
import { P as Qn, t as o, _ as _n, k as Kn,
|
|
38
|
+
import { by as kn, bz as wn, bA as Tt, bB as Sn, bC as xe, bD as Mn, bE as Tn, bF as Ln, bc as Lt, bd as Rt, aQ as he, G as _e, aF as Et, aj as Rn, bG as En, al as In, v as Bn, x as Be, bH as Fn, bI as Nn, aq as de, bJ as It, ar as Hn, A as On, aT as Pn, bK as Dn, B as ge, q as De, bL as gt, P as f, t as $n, aG as Bt, b3 as An, aC as zn, bM as qn, ah as be, J as Wn, bN as Zn, bO as jn, M as Ft, bP as Gn, b6 as Vn, ba as Un } from "./use-common-filters-BTk7vuUo.js";
|
|
39
|
+
import { P as Qn, t as o, _ as _n, k as Kn, c2 as Jn, R as O, T as Ze, aU as v, b6 as $, a7 as w, U as L, F as G, a4 as Nt, ay as je, aD as Xn, c3 as Yn, c4 as er, a2 as tr, a3 as nr, n as rr } from "./derive-chart-family-ci86jmVk.js";
|
|
40
40
|
import * as K from "react";
|
|
41
41
|
import { createContext as Ke, useContext as Je, useMemo as Z, useState as D, useCallback as H, useEffect as ve, useRef as ue, useLayoutEffect as Ee, memo as or, forwardRef as ir } from "react";
|
|
42
|
-
import { t as Fe } from "./widget-composer-
|
|
43
|
-
import { w as X1 } from "./widget-composer-
|
|
42
|
+
import { t as Fe } from "./widget-composer-BtqAxkpr.js";
|
|
43
|
+
import { w as X1 } from "./widget-composer-BtqAxkpr.js";
|
|
44
44
|
import { jsx as Ce } from "react/jsx-runtime";
|
|
45
45
|
class ar extends kn {
|
|
46
46
|
constructor(t, n) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var Fn=Object.defineProperty,Kn=Object.defineProperties;var jn=Object.getOwnPropertyDescriptors;var Qe=Object.getOwnPropertySymbols;var as=Object.prototype.hasOwnProperty,ls=Object.prototype.propertyIsEnumerable;var kt=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e);var os=(e,t,s)=>t in e?Fn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,K=(e,t)=>{for(var s in t||(t={}))as.call(t,s)&&os(e,s,t[s]);if(Qe)for(var s of Qe(t))ls.call(t,s)&&os(e,s,t[s]);return e},J=(e,t)=>Kn(e,jn(t));var cs=(e,t)=>{var s={};for(var n in e)as.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(e!=null&&Qe)for(var n of Qe(e))t.indexOf(n)<0&&ls.call(e,n)&&(s[n]=e[n]);return s};var Ot=(e,t,s)=>new Promise((n,i)=>{var r=l=>{try{a(s.next(l))}catch(c){i(c)}},o=l=>{try{a(s.throw(l))}catch(c){i(c)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(r,o);a((s=s.apply(e,t)).next())}),qn=function(e,t){this[0]=e,this[1]=t};var d=e=>{var t=e[kt("asyncIterator")],s=!1,n,i={};return t==null?(t=e[kt("iterator")](),n=r=>i[r]=o=>t[r](o)):(t=t.call(e),n=r=>i[r]=o=>{if(s){if(s=!1,r==="throw")throw o;return o}return s=!0,{done:!1,value:new qn(new Promise(a=>{var l=t[r](o);if(!(l instanceof Object))throw TypeError("Object expected");a(l)}),1)}}),i[kt("iterator")]=()=>i,n("next"),"throw"in t?n("throw"):i.throw=r=>{throw r},"return"in t&&n("return"),i};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("./widget-composer-
|
|
1
|
+
"use strict";var Fn=Object.defineProperty,Kn=Object.defineProperties;var jn=Object.getOwnPropertyDescriptors;var Qe=Object.getOwnPropertySymbols;var as=Object.prototype.hasOwnProperty,ls=Object.prototype.propertyIsEnumerable;var kt=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e);var os=(e,t,s)=>t in e?Fn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,K=(e,t)=>{for(var s in t||(t={}))as.call(t,s)&&os(e,s,t[s]);if(Qe)for(var s of Qe(t))ls.call(t,s)&&os(e,s,t[s]);return e},J=(e,t)=>Kn(e,jn(t));var cs=(e,t)=>{var s={};for(var n in e)as.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(e!=null&&Qe)for(var n of Qe(e))t.indexOf(n)<0&&ls.call(e,n)&&(s[n]=e[n]);return s};var Ot=(e,t,s)=>new Promise((n,i)=>{var r=l=>{try{a(s.next(l))}catch(c){i(c)}},o=l=>{try{a(s.throw(l))}catch(c){i(c)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(r,o);a((s=s.apply(e,t)).next())}),qn=function(e,t){this[0]=e,this[1]=t};var d=e=>{var t=e[kt("asyncIterator")],s=!1,n,i={};return t==null?(t=e[kt("iterator")](),n=r=>i[r]=o=>t[r](o)):(t=t.call(e),n=r=>i[r]=o=>{if(s){if(s=!1,r==="throw")throw o;return o}return s=!0,{done:!1,value:new qn(new Promise(a=>{var l=t[r](o);if(!(l instanceof Object))throw TypeError("Object expected");a(l)}),1)}}),i[kt("iterator")]=()=>i,n("next"),"throw"in t?n("throw"):i.throw=r=>{throw r},"return"in t&&n("return"),i};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("./widget-composer-CJDaEkCY.cjs"),T=require("./derive-chart-family-Cjjn5U5S.cjs"),rt=require("./dimensions-COtPNdpu.cjs"),zt=Symbol.for("yaml.alias"),Mt=Symbol.for("yaml.document"),ee=Symbol.for("yaml.map"),Is=Symbol.for("yaml.pair"),Z=Symbol.for("yaml.scalar"),Ne=Symbol.for("yaml.seq"),Y=Symbol.for("yaml.node.type"),fe=e=>!!e&&typeof e=="object"&&e[Y]===zt,Te=e=>!!e&&typeof e=="object"&&e[Y]===Mt,Ie=e=>!!e&&typeof e=="object"&&e[Y]===ee,_=e=>!!e&&typeof e=="object"&&e[Y]===Is,L=e=>!!e&&typeof e=="object"&&e[Y]===Z,Ce=e=>!!e&&typeof e=="object"&&e[Y]===Ne;function D(e){if(e&&typeof e=="object")switch(e[Y]){case ee:case Ne:return!0}return!1}function B(e){if(e&&typeof e=="object")switch(e[Y]){case zt:case ee:case Z:case Ne:return!0}return!1}const zn=e=>(L(e)||D(e))&&!!e.anchor,U=Symbol("break visit"),Cs=Symbol("skip children"),H=Symbol("remove node");function te(e,t){const s=Ls(t);Te(e)?me(null,e.contents,s,Object.freeze([e]))===H&&(e.contents=null):me(null,e,s,Object.freeze([]))}te.BREAK=U;te.SKIP=Cs;te.REMOVE=H;function me(e,t,s,n){const i=_s(e,t,s,n);if(B(i)||_(i))return Ms(e,n,i),me(e,i,s,n);if(typeof i!="symbol"){if(D(t)){n=Object.freeze(n.concat(t));for(let r=0;r<t.items.length;++r){const o=me(r,t.items[r],s,n);if(typeof o=="number")r=o-1;else{if(o===U)return U;o===H&&(t.items.splice(r,1),r-=1)}}}else if(_(t)){n=Object.freeze(n.concat(t));const r=me("key",t.key,s,n);if(r===U)return U;r===H&&(t.key=null);const o=me("value",t.value,s,n);if(o===U)return U;o===H&&(t.value=null)}}return i}function ot(e,t){return Ot(this,null,function*(){const s=Ls(t);Te(e)?(yield ye(null,e.contents,s,Object.freeze([e])))===H&&(e.contents=null):yield ye(null,e,s,Object.freeze([]))})}ot.BREAK=U;ot.SKIP=Cs;ot.REMOVE=H;function ye(e,t,s,n){return Ot(this,null,function*(){const i=yield _s(e,t,s,n);if(B(i)||_(i))return Ms(e,n,i),ye(e,i,s,n);if(typeof i!="symbol"){if(D(t)){n=Object.freeze(n.concat(t));for(let r=0;r<t.items.length;++r){const o=yield ye(r,t.items[r],s,n);if(typeof o=="number")r=o-1;else{if(o===U)return U;o===H&&(t.items.splice(r,1),r-=1)}}}else if(_(t)){n=Object.freeze(n.concat(t));const r=yield ye("key",t.key,s,n);if(r===U)return U;r===H&&(t.key=null);const o=yield ye("value",t.value,s,n);if(o===U)return U;o===H&&(t.value=null)}}return i})}function Ls(e){return typeof e=="object"&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function _s(e,t,s,n){var i,r,o,a,l;if(typeof s=="function")return s(e,t,n);if(Ie(t))return(i=s.Map)==null?void 0:i.call(s,e,t,n);if(Ce(t))return(r=s.Seq)==null?void 0:r.call(s,e,t,n);if(_(t))return(o=s.Pair)==null?void 0:o.call(s,e,t,n);if(L(t))return(a=s.Scalar)==null?void 0:a.call(s,e,t,n);if(fe(t))return(l=s.Alias)==null?void 0:l.call(s,e,t,n)}function Ms(e,t,s){const n=t[t.length-1];if(D(n))n.items[e]=s;else if(_(n))e==="key"?n.key=s:n.value=s;else if(Te(n))n.contents=s;else{const i=fe(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}const Un={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},vn=e=>e.replace(/[!,[\]{}]/g,t=>Un[t]);class z{constructor(t,s){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},z.defaultYaml,t),this.tags=Object.assign({},z.defaultTags,s)}clone(){const t=new z(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){const t=new z(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:z.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},z.defaultTags);break}return t}add(t,s){this.atNextDocument&&(this.yaml={explicit:z.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},z.defaultTags),this.atNextDocument=!1);const n=t.trim().split(/[ \t]+/),i=n.shift();switch(i){case"%TAG":{if(n.length!==2&&(s(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;const[r,o]=n;return this.tags[r]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,n.length!==1)return s(0,"%YAML directive should contain exactly one part"),!1;const[r]=n;if(r==="1.1"||r==="1.2")return this.yaml.version=r,!0;{const o=/^\d+\.\d+$/.test(r);return s(6,`Unsupported YAML version ${r}`,o),!1}}default:return s(0,`Unknown directive ${i}`,!0),!1}}tagName(t,s){if(t==="!")return"!";if(t[0]!=="!")return s(`Not a valid tag: ${t}`),null;if(t[1]==="<"){const o=t.slice(2,-1);return o==="!"||o==="!!"?(s(`Verbatim tags aren't resolved, so ${t} is invalid.`),null):(t[t.length-1]!==">"&&s("Verbatim tags must end with a >"),o)}const[,n,i]=t.match(new RegExp("^(.*!)([^!]*)$","s"));i||s(`The ${t} tag has no suffix`);const r=this.tags[n];if(r)try{return r+decodeURIComponent(i)}catch(o){return s(String(o)),null}return n==="!"?t:(s(`Could not resolve tag: ${t}`),null)}tagString(t){for(const[s,n]of Object.entries(this.tags))if(t.startsWith(n))return s+vn(t.substring(n.length));return t[0]==="!"?t:`!<${t}>`}toString(t){const s=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags);let i;if(t&&n.length>0&&B(t.contents)){const r={};te(t.contents,(o,a)=>{B(a)&&a.tag&&(r[a.tag]=!0)}),i=Object.keys(r)}else i=[];for(const[r,o]of n)r==="!!"&&o==="tag:yaml.org,2002:"||(!t||i.some(a=>a.startsWith(o)))&&s.push(`%TAG ${r} ${o}`);return s.join(`
|
|
2
2
|
`)}}z.defaultYaml={explicit:!1,version:"1.2"};z.defaultTags={"!!":"tag:yaml.org,2002:"};function Ds(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const s=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(s)}return!0}function $s(e){const t=new Set;return te(e,{Value(s,n){n.anchor&&t.add(n.anchor)}}),t}function Ps(e,t){for(let s=1;;++s){const n=`${e}${s}`;if(!t.has(n))return n}}function Vn(e,t){const s=[],n=new Map;let i=null;return{onAnchor:r=>{s.push(r),i||(i=$s(e));const o=Ps(t,i);return i.add(o),o},setAnchors:()=>{for(const r of s){const o=n.get(r);if(typeof o=="object"&&o.anchor&&(L(o.node)||D(o.node)))o.node.anchor=o.anchor;else{const a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=r,a}}},sourceObjects:n}}function ge(e,t,s,n){if(n&&typeof n=="object")if(Array.isArray(n))for(let i=0,r=n.length;i<r;++i){const o=n[i],a=ge(e,n,String(i),o);a===void 0?delete n[i]:a!==o&&(n[i]=a)}else if(n instanceof Map)for(const i of Array.from(n.keys())){const r=n.get(i),o=ge(e,n,i,r);o===void 0?n.delete(i):o!==r&&n.set(i,o)}else if(n instanceof Set)for(const i of Array.from(n)){const r=ge(e,n,i,i);r===void 0?n.delete(i):r!==i&&(n.delete(i),n.add(r))}else for(const[i,r]of Object.entries(n)){const o=ge(e,n,i,r);o===void 0?delete n[i]:o!==r&&(n[i]=o)}return e.call(t,s,n)}function Q(e,t,s){if(Array.isArray(e))return e.map((n,i)=>Q(n,String(i),s));if(e&&typeof e.toJSON=="function"){if(!s||!zn(e))return e.toJSON(t,s);const n={aliasCount:0,count:1,res:void 0};s.anchors.set(e,n),s.onCreate=r=>{n.res=r,delete s.onCreate};const i=e.toJSON(t,s);return s.onCreate&&s.onCreate(i),i}return typeof e=="bigint"&&!(s!=null&&s.keep)?Number(e):e}class Ut{constructor(t){Object.defineProperty(this,Y,{value:t})}clone(){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(t.range=this.range.slice()),t}toJS(t,{mapAsMap:s,maxAliasCount:n,onAnchor:i,reviver:r}={}){if(!Te(t))throw new TypeError("A document argument is required");const o={anchors:new Map,doc:t,keep:!0,mapAsMap:s===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},a=Q(this,"",o);if(typeof i=="function")for(const{count:l,res:c}of o.anchors.values())i(c,l);return typeof r=="function"?ge(r,{"":a},"",a):a}}class at extends Ut{constructor(t){super(zt),this.source=t,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t){let s;return te(t,{Node:(n,i)=>{if(i===this)return te.BREAK;i.anchor===this.source&&(s=i)}}),s}toJSON(t,s){if(!s)return{source:this.source};const{anchors:n,doc:i,maxAliasCount:r}=s,o=this.resolve(i);if(!o){const l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let a=n.get(o);if(a||(Q(o,null,s),a=n.get(o)),!a||a.res===void 0){const l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(r>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=Ge(i,o,n)),a.count*a.aliasCount>r)){const l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}return a.res}toString(t,s,n){const i=`*${this.source}`;if(t){if(Ds(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){const r=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(r)}if(t.implicitKey)return`${i} `}return i}}function Ge(e,t,s){if(fe(t)){const n=t.resolve(e),i=s&&n&&s.get(n);return i?i.count*i.aliasCount:0}else if(D(t)){let n=0;for(const i of t.items){const r=Ge(e,i,s);r>n&&(n=r)}return n}else if(_(t)){const n=Ge(e,t.key,s),i=Ge(e,t.value,s);return Math.max(n,i)}return 1}const Bs=e=>!e||typeof e!="function"&&typeof e!="object";class A extends Ut{constructor(t){super(Z),this.value=t}toJSON(t,s){return s!=null&&s.keep?this.value:Q(this.value,t,s)}toString(){return String(this.value)}}A.BLOCK_FOLDED="BLOCK_FOLDED";A.BLOCK_LITERAL="BLOCK_LITERAL";A.PLAIN="PLAIN";A.QUOTE_DOUBLE="QUOTE_DOUBLE";A.QUOTE_SINGLE="QUOTE_SINGLE";const Qn="tag:yaml.org,2002:";function Yn(e,t,s){var n;if(t){const i=s.filter(o=>o.tag===t),r=(n=i.find(o=>!o.format))!=null?n:i[0];if(!r)throw new Error(`Tag ${t} not found`);return r}return s.find(i=>{var r;return((r=i.identify)==null?void 0:r.call(i,e))&&!i.format})}function Re(e,t,s){var u,p,y;if(Te(e)&&(e=e.contents),B(e))return e;if(_(e)){const m=(p=(u=s.schema[ee]).createNode)==null?void 0:p.call(u,s.schema,null,s);return m.items.push(e),m}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt!="undefined"&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:n,onAnchor:i,onTagObj:r,schema:o,sourceObjects:a}=s;let l;if(n&&e&&typeof e=="object"){if(l=a.get(e),l)return l.anchor||(l.anchor=i(e)),new at(l.anchor);l={anchor:null,node:null},a.set(e,l)}t!=null&&t.startsWith("!!")&&(t=Qn+t.slice(2));let c=Yn(e,t,o.tags);if(!c){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){const m=new A(e);return l&&(l.node=m),m}c=e instanceof Map?o[ee]:Symbol.iterator in Object(e)?o[Ne]:o[ee]}r&&(r(c),delete s.onTagObj);const h=c!=null&&c.createNode?c.createNode(s.schema,e,s):typeof((y=c==null?void 0:c.nodeClass)==null?void 0:y.from)=="function"?c.nodeClass.from(s.schema,e,s):new A(e);return t?h.tag=t:c.default||(h.tag=c.tag),l&&(l.node=h),h}function tt(e,t,s){let n=s;for(let i=t.length-1;i>=0;--i){const r=t[i];if(typeof r=="number"&&Number.isInteger(r)&&r>=0){const o=[];o[r]=n,n=o}else n=new Map([[r,n]])}return Re(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}const $e=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done;class Rs extends Ut{constructor(t,s){super(t),Object.defineProperty(this,"schema",{value:s,configurable:!0,enumerable:!1,writable:!0})}clone(t){const s=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return t&&(s.schema=t),s.items=s.items.map(n=>B(n)||_(n)?n.clone(t):n),this.range&&(s.range=this.range.slice()),s}addIn(t,s){if($e(t))this.add(s);else{const[n,...i]=t,r=this.get(n,!0);if(D(r))r.addIn(i,s);else if(r===void 0&&this.schema)this.set(n,tt(this.schema,i,s));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}deleteIn(t){const[s,...n]=t;if(n.length===0)return this.delete(s);const i=this.get(s,!0);if(D(i))return i.deleteIn(n);throw new Error(`Expected YAML collection at ${s}. Remaining path: ${n}`)}getIn(t,s){const[n,...i]=t,r=this.get(n,!0);return i.length===0?!s&&L(r)?r.value:r:D(r)?r.getIn(i,s):void 0}hasAllNullValues(t){return this.items.every(s=>{if(!_(s))return!1;const n=s.value;return n==null||t&&L(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(t){const[s,...n]=t;if(n.length===0)return this.has(s);const i=this.get(s,!0);return D(i)?i.hasIn(n):!1}setIn(t,s){const[n,...i]=t;if(i.length===0)this.set(n,s);else{const r=this.get(n,!0);if(D(r))r.setIn(i,s);else if(r===void 0&&this.schema)this.set(n,tt(this.schema,i,s));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}}const Jn=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function X(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const oe=(e,t,s)=>e.endsWith(`
|
|
3
3
|
`)?X(s,t):s.includes(`
|
|
4
4
|
`)?`
|
|
@@ -59,10 +59,10 @@ var d = (e) => {
|
|
|
59
59
|
throw r;
|
|
60
60
|
}, "return" in t && n("return"), i;
|
|
61
61
|
};
|
|
62
|
-
import { s as hi, E as ms, c as di, p as pi, v as mi, g as yi, a as rt, b as zt, d as Ut, e as Vt, f as vt, h as x, C as Je, i as gi, J as Bs } from "./widget-composer-
|
|
63
|
-
import { j as Ro, q as Ko, u as jo, o as qo, r as Fo, l as zo, m as Uo, k as Vo, n as vo, w as Jo } from "./widget-composer-
|
|
64
|
-
import { aP as Jt, aG as bi, bI as ys,
|
|
65
|
-
import { D as xs, b as Hs } from "./dimensions-
|
|
62
|
+
import { s as hi, E as ms, c as di, p as pi, v as mi, g as yi, a as rt, b as zt, d as Ut, e as Vt, f as vt, h as x, C as Je, i as gi, J as Bs } from "./widget-composer-BtqAxkpr.js";
|
|
63
|
+
import { j as Ro, q as Ko, u as jo, o as qo, r as Fo, l as zo, m as Uo, k as Vo, n as vo, w as Jo } from "./widget-composer-BtqAxkpr.js";
|
|
64
|
+
import { aP as Jt, aG as bi, bI as ys, cF as wi, dH as Si, ay as ki, b0 as Oi, dI as Ps, ap as Rs, dJ as Ks, dK as js, dL as qs, dM as Fs, a9 as zs, dN as Us, dO as Vs, dP as vs, dQ as Js, dR as Qs, dS as Ys, dT as Ws, dU as Gs, al as Ai } from "./derive-chart-family-ci86jmVk.js";
|
|
65
|
+
import { D as xs, b as Hs } from "./dimensions-wzj4u0MX.js";
|
|
66
66
|
const Qt = Symbol.for("yaml.alias"), $t = Symbol.for("yaml.document"), Z = Symbol.for("yaml.map"), Xs = Symbol.for("yaml.pair"), X = Symbol.for("yaml.scalar"), Ne = Symbol.for("yaml.seq"), v = Symbol.for("yaml.node.type"), ce = (e) => !!e && typeof e == "object" && e[v] === Qt, Ee = (e) => !!e && typeof e == "object" && e[v] === $t, Te = (e) => !!e && typeof e == "object" && e[v] === Z, C = (e) => !!e && typeof e == "object" && e[v] === Xs, I = (e) => !!e && typeof e == "object" && e[v] === X, Ie = (e) => !!e && typeof e == "object" && e[v] === Ne;
|
|
67
67
|
function _(e) {
|
|
68
68
|
if (e && typeof e == "object")
|