@kong-ui-public/dashboard-renderer 8.12.26 → 8.12.27
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/{GeoMapRenderer-B5lFMNrF.js → GeoMapRenderer-CAII3s7u.js} +1 -1
- package/dist/dashboard-renderer.es.js +1 -1
- package/dist/dashboard-renderer.umd.js +1 -1
- package/dist/{index-CDRYQGr1.js → index-CYAKF_Ri.js} +2 -2
- package/dist/types/components/DashboardRenderer.vue.d.ts +8 -8
- package/dist/types/components/DashboardTile.vue.d.ts +12 -12
- package/package.json +15 -15
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as q, ref as C, computed as c, openBlock as x, createBlock as g, withCtx as _, createVNode as E, unref as M } from "vue";
|
|
2
|
-
import { _ as O } from "./index-
|
|
2
|
+
import { _ as O } from "./index-CYAKF_Ri.js";
|
|
3
3
|
import { exploreResultToCountryMetrics as b, AnalyticsGeoMap as k } from "@kong-ui-public/analytics-geo-map";
|
|
4
4
|
import { COUNTRIES as B } from "@kong-ui-public/analytics-utilities";
|
|
5
5
|
const R = /* @__PURE__ */ q({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as a, D as R, a as T, b as s, c as L, d as I, E as e, F as D, e as N, G as S, I as r, T as A, f as F } from "./index-
|
|
1
|
+
import { C as a, D as R, a as T, b as s, c as L, d as I, E as e, F as D, e as N, G as S, I as r, T as A, f as F } from "./index-CYAKF_Ri.js";
|
|
2
2
|
export {
|
|
3
3
|
a as CP_ID_TOKEN,
|
|
4
4
|
R as DASHBOARD_COLS,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* pinia v3.0.4
|
|
3
3
|
* (c) 2025 Eduardo San Martin Morote
|
|
4
4
|
* @license MIT
|
|
5
|
-
*/const di=typeof window<"u";let gt;process.env.NODE_ENV;const pt=process.env.NODE_ENV!=="production"?Symbol("pinia"):Symbol();var yt;(function(l){l.direct="direct",l.patchObject="patch object",l.patchFunction="patch function"})(yt||(yt={})),process.env.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function xe(l){const e=n.toRaw(l),t={};for(const i in e){const s=e[i];s.effect?t[i]=n.computed({get:()=>l[i],set(r){l[i]=r}}):(n.isRef(s)||n.isReactive(s))&&(t[i]=n.toRef(l,i))}return t}const X=l=>(l==null?void 0:l.chart.type)==="table",hi=["basic","api_usage","llm_usage","agentic_usage","platform","platform_usage",void 0],ui=l=>hi.includes(l);function fi({queryBridge:l,context:e,definition:t,chartData:i}){const s=n.ref(""),r=n.ref(""),a=n.ref(void 0),o=n.ref(void 0),u=de.useAnalyticsConfigStore(),d=de.useDatasourceConfigStore(),{stripUnknownFilters:h,loading:c}=xe(d),f=n.computed(()=>X(t.value));n.onMounted(async()=>{var S,A;s.value=await((S=l==null?void 0:l.exploreBaseUrl)==null?void 0:S.call(l))??"",r.value=await((A=l==null?void 0:l.requestsBaseUrl)==null?void 0:A.call(l))??""});const g=n.computed(()=>u.analytics&&u.percentiles),p=n.computed(()=>{const S=t.value.chart.type;return["golden_signals","gauge"].includes(S)?!1:S==="top_n"?e.value.editable||e.value.showTileActions:!0}),_=n.computed(()=>r.value&&t.value.query&&!f.value&&t.value.query.datasource!=="llm_usage"&&!L.isPlatformDatasource(t.value.query.datasource)&&g.value&&!c.value),y=n.computed(()=>s.value&&t.value.query&&ui(t.value.query.datasource)&&g.value&&!c.value),R=n.computed(()=>i.value?L.msToGranularity(i.value.meta.granularity_ms):void 0),C=n.computed(()=>{var z;const S=t.value,A=[...e.value.filters,...S.query.filters??[]],U="metrics"in S.query?S.query.metrics:void 0,D=((z=S.query)==null?void 0:z.datasource)??"api_usage";return h.value({datasource:D,filters:A,queryFields:U})}),b=n.computed(()=>{if(!y.value||!p.value)return"";const S=t.value;if(X(S))return le({...S.query,filters:C.value});const A=S.query.time_range||e.value.timeSpec,U=$(A,C.value);return le(U)}),O=n.computed(()=>{if(!_.value||!p.value)return"";const S=C.value,A=t.value;if(X(A))return"";const U=j(A.query.time_range||e.value.timeSpec,S);return H(U)}),H=S=>_.value?`${r.value}?q=${JSON.stringify(S)}`:"",j=(S,A)=>{var z,M,q,W;const U=(M=(z=i.value)==null?void 0:z.meta)!=null&&M.start?new Date(i.value.meta.start):void 0,D=(W=(q=i.value)==null?void 0:q.meta)!=null&&W.end?new Date(i.value.meta.end):void 0;return{filter:A,timeframe:{timePeriodsKey:S.type==="relative"?S.time_range:"custom",start:S.type==="absolute"?U:void 0,end:S.type==="absolute"?D:void 0}}},Q=(S,A)=>({filter:A,timeframe:{timePeriodsKey:S.type==="relative"?S.time_range:"custom",start:S.type==="absolute"?S.start:void 0,end:S.type==="absolute"?S.end:void 0}}),$=(S,A)=>{const U=t.value;if(X(U))throw new Error("Cannot build a chart explore query for table chart definitions");const D=[...U.query.dimensions??[]],z=[...U.query.metrics??[]];return{filters:A,metrics:z,dimensions:D,time_range:S,granularity:U.query.granularity||R.value||void 0}},le=S=>{if(!y.value)return"";const A=t.value.query.datasource&&t.value.query.datasource!=="basic"?t.value.query.datasource:"api_usage";return`${s.value}?q=${JSON.stringify(S)}&d=${A}&c=${t.value.chart.type}`};return n.watch([_,y],([S,A])=>{S&&(a.value={href:""}),A&&(o.value={href:""})}),{exploreLinkKebabMenu:b,requestsLinkKebabMenu:O,canShowKebabMenu:p,canGenerateRequestsLink:_,canGenerateExploreLink:y,requestsLinkZoomActions:a,exploreLinkZoomActions:o,buildExploreQuery:$,buildRequestsQueryZoomActions:Q,buildExploreLink:le,buildRequestLink:H}}function mi(){const l=n.inject(re),e=de.useDatasourceConfigStore(),{stripUnknownFilters:t}=xe(e);let i=null;return n.onUnmounted(()=>{i==null||i.abort()}),{issueQuery:async(r,a,o)=>{if(!l)throw new Error("Query bridge is not defined");i==null||i.abort();const u=new AbortController;i=u,await e.isReady();const{datasource:d,limit:h,...c}=r,f=d||"basic",g=t.value({datasource:f,filters:[...r.filters??[],...a.filters],queryFields:r.metrics});let p=r.time_range;p?p.tz||(p={...p,tz:a.tz}):p={...a.timeSpec,tz:a.tz};const _={datasource:f,query:{...c,time_range:p,filters:g,limit:o??h}};return l.queryFn(_,u)}}}function gi({context:l,globalFilters:e=n.ref([]),isFullscreen:t=n.ref(!1),preview:i=n.ref(!1)}){const s=de.useAnalyticsConfigStore(),r=de.useDatasourceConfigStore(),{loading:a}=xe(s),{loading:o}=xe(r),u=n.computed(()=>l.value.timeSpec?l.value.timeSpec:{type:"relative",time_range:s.defaultQueryTimeForOrg}),d=n.computed(()=>{var R,C,b;let{tz:c,refreshInterval:f,editable:g,showTileActions:p}=l.value;const _=[...l.value.filters??[],...e.value];if(c||(c=new Intl.DateTimeFormat().resolvedOptions().timeZone),f===void 0&&(f=lt),t.value){let O=!1;if(u.value.type==="relative")O=["15m","1h","6h","12h","24h"].includes(u.value.time_range);else{const Q=u.value.start.getTime(),$=u.value.end.getTime();O=Math.abs($-Q)<=864e5}const H=new Date().getTime();u.value.type==="absolute"&&u.value.end.getTime()<H||u.value.type==="relative"&&["previous_week","previous_month"].includes(u.value.time_range)?f=0:O?f=ct:f=dt}(g===void 0||i.value)&&(g=!1),p===void 0&&(p=!0);const y=!i.value&&!!((b=(C=(R=n.getCurrentInstance())==null?void 0:R.vnode)==null?void 0:C.props)!=null&&b.onTileTimeRangeZoom);return{filters:_,tz:c,timeSpec:u.value,refreshInterval:f,editable:g,showTileActions:p&&!i.value,showTileZoomActions:!i.value,zoomable:y}}),h=n.computed(()=>!!l.value.timeSpec||!a.value&&!o.value);return{internalContext:d,queryReady:h}}const Z={useContextLinks:fi,useDashboardInternalContext:gi,useEvaluateFeatureFlag:ei,useI18n:Jt,useIssueQuery:mi,useRequestQueue:ci},Oe=n.defineComponent({__name:"QueryDataProvider",props:{context:{},limitOverride:{},query:{},queryReady:{type:Boolean},refreshCounter:{}},emits:["chart-data","query-complete"],setup(l,{emit:e}){const t=l,i=e,{i18n:s}=Z.useI18n(),{issueQuery:r}=Z.useIssueQuery(),a=n.inject(re),o=()=>t.queryReady&&a?JSON.stringify([t.query,t.context,t.refreshCounter]):null,{data:u,error:d,isValidating:h}=Qt(o,async()=>{const C=o();try{const b=await r(t.query,t.context,t.limitOverride);return o()!==C?void 0:(g.value=null,b)}catch(b){if(o()!==C)return;throw g.value=se.handleQueryError(b),b}finally{o()===C&&i("query-complete")}},{refreshInterval:t.context.refreshInterval,revalidateOnFocus:!1,shouldRetryOnError:!1}),{state:c,swrvState:f}=Xt(u,d,h),g=n.ref(null),p=n.computed(()=>c.value===f.ERROR||!!g.value),_=n.computed(()=>!t.queryReady||c.value===f.PENDING),y=n.ref(),R=n.computed(()=>u.value??(t.queryReady&&c.value===f.PENDING?y.value:void 0));return n.watch([()=>u.value,()=>c.value],([C,b])=>{C&&(b==="SUCCESS_HAS_DATA"||b==="SUCCESS")&&C!==y.value&&(y.value=C,i("chart-data",C))}),(C,b)=>{var j;const O=n.resolveComponent("KSkeleton"),H=n.resolveComponent("KEmptyState");return(_.value||!n.unref(u)&&!p.value)&&!R.value?(n.openBlock(),n.createBlock(O,{key:0,class:"chart-skeleton",type:"table"})):p.value&&!_.value?(n.openBlock(),n.createBlock(H,{key:1,"action-button-visible":!1,"data-testid":"chart-empty-state"},n.createSlots({icon:n.withCtx(()=>{var Q;return[((Q=g.value)==null?void 0:Q.type)==="forbidden"?(n.openBlock(),n.createBlock(n.unref(fe.VisibilityOffIcon),{key:0})):(n.openBlock(),n.createBlock(n.unref(fe.WarningOutlineIcon),{key:1}))]}),title:n.withCtx(()=>{var Q;return[n.createElementVNode("p",null,n.toDisplayString(((Q=g.value)==null?void 0:Q.message)||n.unref(s).t("renderer.unexpectedError")),1)]}),_:2},[(j=g.value)!=null&&j.details?{name:"default",fn:n.withCtx(()=>[n.createElementVNode("p",null,n.toDisplayString(g.value.details),1)]),key:"0"}:void 0]),1024)):R.value?n.renderSlot(C.$slots,"default",{key:2,data:R.value}):n.createCommentVNode("",!0)}}}),pi=n.defineComponent({__name:"SimpleChartRenderer",props:{query:{},context:{},queryReady:{type:Boolean},chartOptions:{},height:{},refreshCounter:{},requestsLink:{},exploreLink:{}},setup(l){const e=l,t=n.computed(()=>e.chartOptions.type==="single_value");return(i,s)=>(n.openBlock(),n.createBlock(Oe,{context:l.context,query:l.query,"query-ready":l.queryReady,"refresh-counter":l.refreshCounter},{default:n.withCtx(({data:r})=>[n.createElementVNode("div",{class:n.normalizeClass(["analytics-chart",{"single-value":t.value}]),style:n.normalizeStyle(t.value?void 0:{height:`${l.height}px`})},[n.createVNode(n.unref(se.SimpleChart),{"chart-data":r,"chart-options":l.chartOptions,"synthetics-data-key":t.value?void 0:l.chartOptions.synthetics_data_key},null,8,["chart-data","chart-options","synthetics-data-key"])],6)]),_:1},8,["context","query","query-ready","refresh-counter"]))}}),he=(l,e)=>{const t=l.__vccOpts||l;for(const[i,s]of e)t[i]=s;return t},_t=he(pi,[["__scopeId","data-v-2cbfac70"]]),yi={class:"analytics-chart"},je=he(n.defineComponent({__name:"BaseAnalyticsChartRenderer",props:{query:{},context:{},queryReady:{type:Boolean},chartOptions:{},height:{},refreshCounter:{},requestsLink:{},exploreLink:{},extraProps:{}},emits:["edit-tile","chart-data","zoom-time-range","view-requests","select-chart-range"],setup(l,{emit:e}){const t=l,i=e,{i18n:s}=Z.useI18n(),r=n.computed(()=>({type:t.chartOptions.type,stacked:t.chartOptions.stacked??!1,chartDatasetColors:t.chartOptions.chart_dataset_colors,threshold:t.chartOptions.threshold,hideTruncationWarning:t.query.limit!==void 0&&t.query.limit>0})),a=n.computed(()=>t.context.zoomable),o=()=>{i("edit-tile")},u=d=>{i("chart-data",d)};return(d,h)=>{const c=n.resolveComponent("KDropdownItem");return n.openBlock(),n.createBlock(Oe,{context:l.context,query:l.query,"query-ready":l.queryReady,"refresh-counter":l.refreshCounter,onChartData:u},{default:n.withCtx(({data:f})=>[n.createElementVNode("div",yi,[n.createVNode(n.unref(se.AnalyticsChart),n.mergeProps({"chart-data":f,"chart-options":r.value,"explore-link":l.exploreLink,"legend-position":"bottom","requests-link":l.requestsLink,"synthetics-data-key":l.chartOptions.synthetics_data_key,"timeseries-zoom":a.value,"tooltip-title":""},l.extraProps,{onSelectChartRange:h[0]||(h[0]=g=>i("select-chart-range",g)),onZoomTimeRange:h[1]||(h[1]=g=>i("zoom-time-range",g))}),n.createSlots({_:2},[l.context.editable?{name:"menu-items",fn:n.withCtx(()=>[n.createVNode(c,{onClick:o},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(s).t("renderer.edit")),1)]),_:1})]),key:"0"}:void 0]),1040,["chart-data","chart-options","explore-link","requests-link","synthetics-data-key","timeseries-zoom"])])]),_:1},8,["context","query","query-ready","refresh-counter"])}}}),[["__scopeId","data-v-e1e7f610"]]),bt=n.defineComponent({__name:"BarChartRenderer",props:{query:{},context:{},queryReady:{type:Boolean},chartOptions:{},height:{},refreshCounter:{},requestsLink:{},exploreLink:{}},setup(l){return(e,t)=>(n.openBlock(),n.createBlock(je,{"chart-options":l.chartOptions,context:l.context,"extra-props":{showAnnotations:!1},height:l.height,query:l.query,"query-ready":l.queryReady,"refresh-counter":l.refreshCounter},null,8,["chart-options","context","height","query","query-ready","refresh-counter"]))}}),vt=n.defineComponent({__name:"TimeseriesChartRenderer",props:{query:{},context:{},queryReady:{type:Boolean},chartOptions:{},height:{},refreshCounter:{},requestsLink:{},exploreLink:{}},emits:["zoom-time-range","select-chart-range"],setup(l,{emit:e}){const t=e;return(i,s)=>(n.openBlock(),n.createBlock(je,{"chart-options":l.chartOptions,context:l.context,"explore-link":l.exploreLink,height:l.height,query:l.query,"query-ready":l.queryReady,"refresh-counter":l.refreshCounter,"requests-link":l.requestsLink,onSelectChartRange:s[0]||(s[0]=r=>t("select-chart-range",r)),onZoomTimeRange:s[1]||(s[1]=r=>t("zoom-time-range",r))},null,8,["chart-options","context","explore-link","height","query","query-ready","refresh-counter","requests-link"]))}}),_i=he(n.defineComponent({__name:"GoldenSignalsRenderer",props:{query:{},context:{},queryReady:{type:Boolean},chartOptions:{},height:{},refreshCounter:{},requestsLink:{},exploreLink:{}},setup(l){const e=l,t=n.computed(()=>{var s,r;const i=(s=e.query)==null?void 0:s.datasource;if(i&&i!=="api_usage"&&i!=="basic")throw new Error(`Invalid datasource value: ${i}`);return{datasource:(r=e.query)==null?void 0:r.datasource,overrideTimeRange:e.context.timeSpec,additionalFilter:e.context.filters,longCardTitles:e.chartOptions.long_card_titles,percentileLatency:e.chartOptions.percentile_latency,refreshInterval:e.context.refreshInterval,queryReady:e.queryReady,refreshCounter:e.refreshCounter}});return(i,s)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["metric-card-tile-wrapper",{titled:!!e.chartOptions.chart_title}])},[n.createVNode(n.unref(Le.MetricsProvider),n.normalizeProps(n.guardReactiveProps(t.value)),{default:n.withCtx(()=>[n.createVNode(n.unref(Le.MetricsConsumer))]),_:1},16)],2))}}),[["__scopeId","data-v-b77f52b8"]]),bi={class:"fallback-entity-link","data-testid":"entity-link-parent"},wt=n.defineComponent({__name:"FallbackEntityLink",props:{entityLinkData:{}},setup(l){return(e,t)=>(n.openBlock(),n.createElementBlock("div",bi,n.toDisplayString(l.entityLinkData.label),1))}}),vi={key:0},wi={key:1},Ei=n.defineComponent({__name:"TopNTableRenderer",props:{query:{},context:{},queryReady:{type:Boolean},chartOptions:{},height:{},refreshCounter:{},requestsLink:{},exploreLink:{}},setup(l){const e=l,t=n.inject(re),i=n.defineAsyncComponent(async()=>{if(t!=null&&t.fetchComponent)try{return await t.fetchComponent("EntityLink")}catch{return wt}return wt}),s=n.computed(()=>!!e.chartOptions.entity_link||!!Object.keys(e.chartOptions.entity_links||{}).length),r=d=>{var c;const h=e.chartOptions.entity_links;return h&&(h[d]||((c=Object.entries(h).find(([f])=>f.toLowerCase()===d.toLowerCase()))==null?void 0:c[1]))||""},a=d=>{var c,f;const h=(f=(c=d.dimensions)==null?void 0:c[0])==null?void 0:f.dimension;return!h||h===d.dimension},o=d=>r(d.dimension)||a(d)&&e.chartOptions.entity_link||"",u=d=>{const h=o(d);if(h)if(d.id.includes(":")){const[c,f]=d.id.split(":");return h.replace(ot,c).replace(Ke,f)}else return h.replace(Ke,d.id);return""};return(d,h)=>(n.openBlock(),n.createBlock(Oe,{context:l.context,query:l.query,"query-ready":l.queryReady,"refresh-counter":l.refreshCounter},{default:n.withCtx(({data:c})=>[n.createVNode(n.unref(se.TopNTable),{data:c,"synthetics-data-key":l.chartOptions.synthetics_data_key},n.createSlots({_:2},[s.value?{name:"name",fn:n.withCtx(({record:f})=>[!f.isEmpty&&o(f)?(n.openBlock(),n.createBlock(n.unref(i),{key:0,"entity-link-data":{id:f.id,label:f.name,deleted:f.deleted},"external-link":u(f)},null,8,["entity-link-data","external-link"])):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[f.name==="empty"?(n.openBlock(),n.createElementBlock("i",vi,n.toDisplayString(f.name),1)):(n.openBlock(),n.createElementBlock("span",wi,n.toDisplayString(f.name),1))],64))]),key:"0"}:void 0]),1032,["data","synthetics-data-key"])]),_:1},8,["context","query","query-ready","refresh-counter"]))}}),xi=l=>l.records.map(e=>{const t={...e};return Object.entries(e).forEach(([i,s])=>{var a,o,u;if(s===null)return;const r=(u=(o=(a=l.meta.display)==null?void 0:a[i])==null?void 0:o[String(s)])==null?void 0:u.name;r&&(t[i]=r)}),t}),Et=({canTranslate:l,columns:e,translate:t})=>e.map(i=>{const s=`chartLabels.${i}`;return{key:i,label:l(s)?t(s):i}}),Ci={platform:Et,platform_usage:Et},xt=async({abortController:l,context:e,cursor:t,pageSize:i,query:s,onResponseColumns:r,stripUnknownFilters:a,tabularQueryFn:o})=>{var c;if(!o)throw new Error("AnalyticsBridge.tabularQueryFn is not defined");const u=s.query,d=a({datasource:"platform",filters:[...u.filters??[],...e.filters],queryFields:u.entity===void 0?void 0:[u.entity]}),h=await o({datasource:s.datasource,query:{columns:u.columns,cursor:t===void 0?u.cursor:String(t),entity:u.entity,filters:d,page_size:i}},l);return(c=h.meta.columns)!=null&&c.length&&(r==null||r(h.meta.columns)),{data:xi(h),cursor:h.meta.cursor,hasMore:!!h.meta.cursor}},ki={platform:xt,platform_usage:xt},Ri=he(n.defineComponent({__name:"TableDataGridRenderer",props:{query:{},context:{},queryReady:{type:Boolean},height:{},refreshCounter:{}},emits:["loading-change"],setup(l,{emit:e}){const t=l,i=e,s=n.inject(re),r=de.useDatasourceConfigStore(),{i18n:a}=Z.useI18n(),o=new AbortController,u=n.ref([]),d=n.ref(!1),h=n.computed(()=>t.height===void 0?void 0:{height:`${t.height}px`}),c=n.computed(()=>({datasource:t.query.datasource,query:{columns:t.query.columns,cursor:t.query.cursor,entity:t.query.entity,filters:t.query.filters,page_size:t.query.page_size}})),f=n.computed(()=>JSON.stringify({refreshCounter:t.refreshCounter,query:{columns:t.query.columns,datasource:t.query.datasource,entity:t.query.entity,filters:t.query.filters,page_size:t.query.page_size},context:{filters:t.context.filters,timeSpec:t.context.timeSpec,tz:t.context.tz}}));n.onUnmounted(()=>{o.abort()});const g=n.computed(()=>{var y;return Ci[t.query.datasource]({columns:(y=t.query.columns)!=null&&y.length?t.query.columns:u.value,translate:R=>a.t(R),canTranslate:R=>a.te(R)})}),p=n.computed(()=>async({cursor:y,pageSize:R})=>{try{await r.isReady();const C=ki[c.value.datasource];if(!C)throw new Error(`No table data grid fetcher found for datasource: ${c.value.datasource}`);const b=await C({abortController:o,context:t.context,cursor:y,pageSize:R,query:c.value,onResponseColumns:O=>{u.value=O},stripUnknownFilters:r.stripUnknownFilters,tabularQueryFn:s==null?void 0:s.tabularQueryFn});return d.value=!1,b}catch(C){throw d.value=!0,C}}),_=y=>{y.state==="error"&&(d.value=!0),i("loading-change",y.state==="loading")};return(y,R)=>{const C=n.resolveComponent("KSkeleton");return n.openBlock(),n.createElementBlock("div",{class:"table-data-grid-renderer",style:n.normalizeStyle(h.value)},[l.queryReady?(n.openBlock(),n.createBlock(n.unref(jt.TableDataGrid),{key:1,error:d.value,fetcher:p.value,headers:g.value,"page-size":l.query.page_size,"refresh-key":f.value,onState:_},null,8,["error","fetcher","headers","page-size","refresh-key"])):(n.openBlock(),n.createBlock(C,{key:0,"data-testid":"table-skeleton",type:"table"}))],4)}}}),[["__scopeId","data-v-c49ff2eb"]]),Ct="#6c7489",Ti="12px",kt="20px",Rt="32px",Tt="20px",Si=n.defineComponent({__name:"DonutChartRenderer",props:{query:{},context:{},queryReady:{type:Boolean},chartOptions:{},height:{},refreshCounter:{},requestsLink:{},exploreLink:{}},setup(l){return(e,t)=>(n.openBlock(),n.createBlock(je,{"chart-options":l.chartOptions,context:l.context,height:l.height,query:l.query,"query-ready":l.queryReady,"refresh-counter":l.refreshCounter},null,8,["chart-options","context","height","query","query-ready","refresh-counter"]))}}),Di=["data-testid"],zi={key:0,class:"tile-header"},Ni={class:"badge-container"},Li={class:"badge-text"},Ai={key:0},Oi=["data-testid"],Hi=["data-testid"],qi={class:"delete-option"},Ii=["data-testid"],Mi=["data-testid"],St=he(n.defineComponent({__name:"DashboardTile",props:n.mergeModels({context:{},definition:{},height:{default:pe},isFullscreen:{type:Boolean},hideActions:{type:Boolean,default:!1},hideZoomActions:{type:Boolean,default:!1},queryReady:{type:Boolean},showRefresh:{type:Boolean,default:!1},tileId:{},tileType:{default:"chart"}},{refreshCounter:{default:0},refreshCounterModifiers:{}}),emits:n.mergeModels(["chart-data","edit-tile","duplicate-tile","remove-tile","tile-time-range-zoom","tile-bounds-change"],["update:refreshCounter"]),setup(l,{expose:e,emit:t}){n.useCssVars(x=>({v0e0bc7ee:`${x.height}px`}));const i=parseInt(Tt,10),s=l,r=n.useModel(l,"refreshCounter"),a=()=>{C.value=!0,r.value++},o=t,u=n.defineAsyncComponent(()=>Promise.resolve().then(()=>is)),d=n.inject(re),h=de.useDatasourceConfigStore(),{stripUnknownFilters:c}=xe(h),{i18n:f}=Z.useI18n(),g=n.ref(),p=n.ref({status:"loading"}),_=n.ref(!1),y=n.ref(),R=n.ref(!1),C=n.ref(!0),b=n.computed(()=>s.definition.chart),O=n.computed(()=>"chart_title"in b.value?b.value.chart_title:void 0),H=n.computed(()=>"description"in b.value?b.value.description:void 0),j=n.computed(()=>b.value.type==="slottable"),Q=n.computed(()=>X(s.definition)?!1:!("allow_csv_export"in b.value)||b.value.allow_csv_export!==!1),{exploreLinkKebabMenu:$,requestsLinkKebabMenu:le,canShowKebabMenu:S,canGenerateRequestsLink:A,canGenerateExploreLink:U,requestsLinkZoomActions:D,exploreLinkZoomActions:z,buildExploreQuery:M,buildExploreLink:q,buildRequestLink:W,buildRequestsQueryZoomActions:Xe}=Z.useContextLinks({queryBridge:d,chartData:n.readonly(g),definition:n.toRef(s,"definition"),context:n.readonly(n.toRef(s,"context"))}),{issueQuery:Ze}=Z.useIssueQuery();n.watch(()=>s.definition,async(x,T)=>{await n.nextTick(),y.value&&(R.value=y.value.scrollWidth>y.value.clientWidth);try{JSON.stringify(x==null?void 0:x.query)!==JSON.stringify(T==null?void 0:T.query)&&(C.value=!0)}catch{}},{immediate:!0,deep:!0});const Fe=n.computed(()=>f.t("csvExport.defaultFilename")),Ge=n.computed(()=>!!$.value||Q.value||s.context.editable),me=n.computed(()=>!s.hideActions&&S.value&&Ge.value),ss=n.computed(()=>me.value&&Ge.value&&!s.isFullscreen),rs=n.computed(()=>b.value.type==="golden_signals"&&!!H.value),ns={timeseries_line:vt,timeseries_bar:vt,horizontal_bar:bt,vertical_bar:bt,gauge:_t,donut:Si,golden_signals:_i,top_n:Ei,table:Ri,slottable:void 0,single_value:_t,choropleth_map:u},os=n.computed(()=>{var x,T,B,F;return{...(x=ge.value)!=null&&x.rendererEvents.supportsRequests?{"select-chart-range":vs}:{},...(T=ge.value)!=null&&T.rendererEvents.supportsZoom?{"zoom-time-range":_s}:{},...(B=ge.value)!=null&&B.rendererEvents.supportsBounds?{"bounds-change":bs}:{},...(F=ge.value)!=null&&F.rendererEvents.supportsLoadingChange?{"loading-change":gs}:{}}}),ge=n.computed(()=>{var It,Mt,Bt;const x=s.definition,T=ns[x.chart.type],B=X(x),F=!!((It=T==null?void 0:T.emits)!=null&&It.includes("select-chart-range")),ze=!!((Mt=T==null?void 0:T.emits)!=null&&Mt.includes("zoom-time-range")),ce=x.chart.type==="choropleth_map",Ee=!!((Bt=T==null?void 0:T.emits)!=null&&Bt.includes("loading-change")),ws={query:x.query,context:s.context,queryReady:s.queryReady,height:s.height-i*2,refreshCounter:r.value},Es={chartOptions:x.chart,requestsLink:s.hideZoomActions?void 0:D.value,exploreLink:s.hideZoomActions?void 0:z.value};return T&&{component:T,rendererProps:{...ws,...B?{}:Es},rendererEvents:{supportsRequests:F,supportsZoom:ze,supportsBounds:ce,supportsLoadingChange:Ee}}}),Je=n.computed(()=>{var B;if(X(s.definition))return null;const x=s.definition.query,T=x==null?void 0:x.time_range;if(L.isPlatformDatasource(x==null?void 0:x.datasource)&&!((B=x.dimensions)!=null&&B.includes("time")))return f.t("renderer.as_of_today");if((T==null?void 0:T.type)==="relative"){const F=L.TimePeriods.get(L.TIMEFRAME_LOOKUP[T.time_range]);return F?F.display:(console.warn("Did not recognize the given relative time range:",T.time_range),T.time_range)}else if((T==null?void 0:T.type)==="absolute"){const F=T.tz||"Etc/UTC";return`${L.formatTime(T.start,{short:!0,tz:F})} - ${L.formatTime(T.end,{short:!0,tz:F})}`}return null}),At=n.computed(()=>j.value?!1:[!!O.value,ss.value,!!Je.value,rs.value,s.showRefresh].some(Boolean)),Ot=n.computed(()=>g.value?L.msToGranularity(g.value.meta.granularity_ms):void 0),as=n.computed(()=>["timeseries_line","timeseries_bar"].includes(b.value.type)),Ht=n.computed(()=>{if(X(s.definition)||!as.value||!s.queryReady||C.value)return!1;const x=s.definition.query.granularity;return!x||!Ot.value?!1:x!==Ot.value}),ls=n.computed(()=>{var B;const x=L.msToGranularity(((B=g.value)==null?void 0:B.meta.granularity_ms)??0)??"unknown",T=X(s.definition)?"unknown":s.definition.query.granularity??"unknown";return f.t("query_aged_out_warning",{currentGranularity:f.t(`granularities.${x}`),savedGranularity:f.t(`granularities.${T}`)})}),cs=n.computed(()=>{const x=s.definition,T=[...s.context.filters,...x.query.filters??[]],B="metrics"in x.query?x.query.metrics:void 0,F=x.query.datasource??"api_usage";return c.value({datasource:F,filters:T,queryFields:B})}),ds=()=>{o("edit-tile",s.definition)},hs=()=>{o("duplicate-tile",s.definition)},us=()=>{o("remove-tile",s.definition)},fs=x=>{g.value=x,C.value=!1,o("chart-data",x)},ms=()=>{C.value=!1},gs=x=>{C.value=x},ps=()=>{_.value=!1},qt=()=>{var B,F;const x=(B=s.definition.query.datasource)==null?void 0:B.startsWith("goap");return((F=d==null?void 0:d.staticConfig)==null?void 0:F.increaseCsvExportLimit)!==!1&&!x?Ze(s.definition.query,s.context,L.EXPORT_RECORD_LIMIT):g.value?Promise.resolve(g.value):new Promise(ze=>{const ce=n.watch(g,Ee=>{Ee&&(ze(Ee),ce())})})},ys=async()=>{_.value=!0,p.value={status:"loading"};try{const x=await qt();p.value={status:"success",chartData:x}}catch(x){p.value={status:"error",error:x}}},_s=x=>{const T={tileId:s.tileId.toString(),timeRange:x};o("tile-time-range-zoom",T)},bs=x=>{const T={tileId:s.tileId.toString(),bounds:x};o("tile-bounds-change",T)},vs=x=>{const T=cs.value,B=M(x,T);z.value=U.value?{href:q(B)}:void 0,D.value=A.value?{href:W(Xe(x,T))}:void 0};return e({getExportData:qt}),(x,T)=>{const B=n.resolveComponent("KTooltip"),F=n.resolveComponent("KBadge"),ze=n.resolveComponent("KButton"),ce=n.resolveComponent("KDropdownItem"),Ee=n.resolveComponent("KDropdown");return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["tile-boundary",{editable:l.context.editable,headless:!At.value}]),"data-testid":`tile-${l.tileId}`},[At.value&&!j.value?(n.openBlock(),n.createElementBlock("div",zi,[n.createVNode(B,{class:"title-tooltip",disabled:!R.value,"max-width":"500",text:O.value},{default:n.withCtx(()=>[n.createElementVNode("div",{ref_key:"titleRef",ref:y,class:"title"},n.toDisplayString(O.value),513)]),_:1},8,["disabled","text"]),n.createElementVNode("div",Ni,[Je.value?(n.openBlock(),n.createBlock(F,{key:0,"data-testid":"time-range-badge",tooltip:Ht.value?ls.value:void 0,"tooltip-attributes":{maxWidth:"320px"}},n.createSlots({default:n.withCtx(()=>[n.createElementVNode("span",Li,n.toDisplayString(Je.value),1)]),_:2},[Ht.value?{name:"icon",fn:n.withCtx(()=>[n.createVNode(n.unref(fe.WarningIcon),{size:`var(--kui-icon-size-20, ${n.unref(Ti)})`},null,8,["size"])]),key:"0"}:void 0]),1032,["tooltip"])):n.createCommentVNode("",!0)]),l.showRefresh?(n.openBlock(),n.createElementBlock("div",Ai,[n.createVNode(ze,{appearance:"secondary",class:"refresh-button","data-testid":`tile-refresh-button-${l.tileId}`,disabled:C.value,icon:"",size:"small",onClick:a},{default:n.withCtx(()=>[C.value?(n.openBlock(),n.createBlock(n.unref(fe.ProgressIcon),{key:0,role:"button",size:`var(--kui-icon-size-60, ${n.unref(Rt)})`,tabindex:"0"},null,8,["size"])):(n.openBlock(),n.createBlock(n.unref(fe.RefreshIcon),{key:1,role:"button",size:`var(--kui-icon-size-60, ${n.unref(Rt)})`,tabindex:"0"},null,8,["size"]))]),_:1},8,["data-testid","disabled"])])):n.createCommentVNode("",!0),me.value?(n.openBlock(),n.createElementBlock("div",{key:1,class:"tile-actions","data-testid":`tile-actions-${l.tileId}`},[me.value&&l.context.editable&&!l.isFullscreen?(n.openBlock(),n.createBlock(n.unref(fe.EditIcon),{key:0,class:"edit-icon",color:`var(--kui-color-text-neutral, ${n.unref(Ct)})`,"data-testid":`edit-tile-${l.tileId}`,size:`var(--kui-icon-size-40, ${n.unref(kt)})`,onClick:ds},null,8,["color","data-testid","size"])):n.createCommentVNode("",!0),me.value&&Ge.value&&!l.isFullscreen?(n.openBlock(),n.createBlock(Ee,{key:1,class:"dropdown","data-testid":`chart-action-menu-${l.tileId}`,"kpop-attributes":{placement:"bottom-end"}},{items:n.withCtx(()=>[n.unref($)?(n.openBlock(),n.createBlock(ce,{key:0,"data-testid":`chart-jump-to-explore-${l.tileId}`,item:{label:n.unref(f).t("jumpToExplore"),to:n.unref($)}},null,8,["data-testid","item"])):n.createCommentVNode("",!0),!n.unref(X)(l.definition)&&n.unref(le)?(n.openBlock(),n.createBlock(ce,{key:1,"data-testid":`chart-jump-to-requests-${l.tileId}`,item:{label:n.unref(f).t("jumpToRequests"),to:n.unref(le)}},null,8,["data-testid","item"])):n.createCommentVNode("",!0),Q.value?(n.openBlock(),n.createBlock(ce,{key:2,class:"chart-export-button","data-testid":`chart-csv-export-${l.tileId}`,onClick:ys},{default:n.withCtx(()=>[n.createElementVNode("span",{class:"chart-export-trigger","data-testid":`csv-export-button-${l.tileId}`},n.toDisplayString(n.unref(f).t("csvExport.exportAsCsv")),9,Hi)]),_:1},8,["data-testid"])):n.createCommentVNode("",!0),l.context.editable?(n.openBlock(),n.createBlock(ce,{key:3,"data-testid":`duplicate-tile-${l.tileId}`,onClick:hs},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(f).t("renderer.duplicateTile")),1)]),_:1},8,["data-testid"])):n.createCommentVNode("",!0),l.context.editable?(n.openBlock(),n.createBlock(ce,{key:4,"data-testid":`remove-tile-${l.tileId}`,onClick:us},{default:n.withCtx(()=>[n.createElementVNode("span",qi,n.toDisplayString(n.unref(f).t("renderer.delete")),1)]),_:1},8,["data-testid"])):n.createCommentVNode("",!0)]),default:n.withCtx(()=>[n.createVNode(n.unref(fe.MoreIcon),{class:"kebab-action-menu",color:`var(--kui-color-text-neutral, ${n.unref(Ct)})`,"data-testid":`kebab-action-menu-${l.tileId}`,size:`var(--kui-icon-size-40, ${n.unref(kt)})`},null,8,["color","data-testid","size"])]),_:1},8,["data-testid"])):n.createCommentVNode("",!0)],8,Oi)):H.value?(n.openBlock(),n.createElementBlock("div",{key:2,class:"header-description","data-testid":`tile-description-${l.tileId}`},n.toDisplayString(H.value),9,Ii)):n.createCommentVNode("",!0),_.value?(n.openBlock(),n.createBlock(n.unref(se.CsvExportModal),{key:3,"data-testid":`csv-export-modal-${l.tileId}`,"export-state":p.value,filename:Fe.value,onCloseModal:ps},null,8,["data-testid","export-state","filename"])):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0),n.createElementVNode("div",{class:n.normalizeClass(["tile-content",`type-${l.tileType}-${b.value.type}`]),"data-testid":`tile-content-${l.tileId}`},[ge.value?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(ge.value.component),n.mergeProps({key:0},ge.value.rendererProps,n.toHandlers(os.value),{onChartData:fs,onQueryComplete:ms}),null,16)):n.createCommentVNode("",!0)],10,Mi)],10,Di)}}}),[["__scopeId","data-v-11e7c65e"]]),Bi=(l,e)=>{let t=0;const i=new Map;e.forEach(r=>{const a=r.layout.position.row,o=i.get(a),u=r.layout.size.rows===1&&!!r.layout.size.fit_to_content;t=Math.max(t,a+r.layout.size.rows),o===void 0?i.set(a,u):i.set(a,o&&u)});const s=[];for(let r=0;r<t;r++)i.get(r)?s.push("auto"):s.push(`${l}px`);return s},Dt=he(n.defineComponent({__name:"GridLayout",props:{tileHeight:{type:Number,required:!1,default:()=>pe},columns:{type:Number,required:!1,default:()=>Ae},tiles:{type:Array,required:!0}},setup(l){n.useCssVars(o=>({v821fda82:e.columns,v0870d42d:r.value}));const e=l,t=n.ref(null),i=n.ref(0),s=new ResizeObserver(o=>{window.requestAnimationFrame(()=>{!Array.isArray(o)||!o.length||(i.value=o[0].contentRect.width)})});n.onMounted(()=>{t.value&&s.observe(t.value)}),n.onUnmounted(()=>{t.value&&s.unobserve(t.value)});const r=n.computed(()=>Bi(e.tileHeight,e.tiles).join(" ")),a=n.computed(()=>e.tiles.map((o,u)=>({key:`tile-${u}`,tile:o,style:{"grid-column-start":o.layout.position.col+1,"grid-column-end":o.layout.position.col+1+o.layout.size.cols,"grid-row-start":o.layout.position.row+1,"grid-row-end":o.layout.position.row+1+o.layout.size.rows}})));return(o,u)=>(n.openBlock(),n.createElementBlock("div",{ref_key:"gridContainer",ref:t,class:"kong-ui-public-grid-layout"},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(a.value,d=>(n.openBlock(),n.createElementBlock("div",{key:d.key,class:n.normalizeClass(["grid-cell",{"empty-cell":!d.tile}]),style:n.normalizeStyle(d.style)},[n.renderSlot(o.$slots,"tile",{style:n.normalizeStyle(d.style),tile:d.tile},void 0,!0)],6))),128))],512))}}),[["__scopeId","data-v-0271a8b9"]]);function Pi(l,e,t,i,s){const r=(...a)=>(console.warn("gridstack.js: Function `"+t+"` is deprecated in "+s+" and has been replaced with `"+i+"`. It will be **removed** in a future release"),e.apply(l,a));return r.prototype=e.prototype,r}class m{static getElements(e,t=document){if(typeof e=="string"){const i="getElementById"in t?t:void 0;if(i&&!isNaN(+e[0])){const r=i.getElementById(e);return r?[r]:[]}let s=t.querySelectorAll(e);return!s.length&&e[0]!=="."&&e[0]!=="#"&&(s=t.querySelectorAll("."+e),s.length||(s=t.querySelectorAll("#"+e))),Array.from(s)}return[e]}static getElement(e,t=document){if(typeof e=="string"){const i="getElementById"in t?t:void 0;if(!e.length)return null;if(i&&e[0]==="#")return i.getElementById(e.substring(1));if(e[0]==="#"||e[0]==="."||e[0]==="[")return t.querySelector(e);if(i&&!isNaN(+e[0]))return i.getElementById(e);let s=t.querySelector(e);return i&&!s&&(s=i.getElementById(e)),s||(s=t.querySelector("."+e)),s}return e}static lazyLoad(e){var t,i;return e.lazyLoad||((i=(t=e.grid)==null?void 0:t.opts)==null?void 0:i.lazyLoad)&&e.lazyLoad!==!1}static createDiv(e,t){const i=document.createElement("div");return e.forEach(s=>{s&&i.classList.add(s)}),t==null||t.appendChild(i),i}static shouldSizeToContent(e,t=!1){return(e==null?void 0:e.grid)&&(t?e.sizeToContent===!0||e.grid.opts.sizeToContent===!0&&e.sizeToContent===void 0:!!e.sizeToContent||e.grid.opts.sizeToContent&&e.sizeToContent!==!1)}static isIntercepted(e,t){return!(e.y>=t.y+t.h||e.y+e.h<=t.y||e.x+e.w<=t.x||e.x>=t.x+t.w)}static isTouching(e,t){return m.isIntercepted(e,{x:t.x-.5,y:t.y-.5,w:t.w+1,h:t.h+1})}static areaIntercept(e,t){const i=e.x>t.x?e.x:t.x,s=e.x+e.w<t.x+t.w?e.x+e.w:t.x+t.w;if(s<=i)return 0;const r=e.y>t.y?e.y:t.y,a=e.y+e.h<t.y+t.h?e.y+e.h:t.y+t.h;return a<=r?0:(s-i)*(a-r)}static area(e){return e.w*e.h}static sort(e,t=1){return e.sort((s,r)=>{const a=t*((s.y??1e4)-(r.y??1e4));return a===0?t*((s.x??1e4)-(r.x??1e4)):a})}static find(e,t){return t?e.find(i=>i.id===t):void 0}static createStylesheet(e,t,i){const s=document.createElement("style"),r=i==null?void 0:i.nonce;return r&&(s.nonce=r),s.setAttribute("type","text/css"),s.setAttribute("gs-style-id",e),s.styleSheet?s.styleSheet.cssText="":s.appendChild(document.createTextNode("")),t?t.insertBefore(s,t.firstChild):(t=document.getElementsByTagName("head")[0],t.appendChild(s)),s}static removeStylesheet(e,t){const s=(t||document).querySelector("STYLE[gs-style-id="+e+"]");s&&s.parentNode&&s.remove()}static addCSSRule(e,t,i){e.textContent+=`${t} { ${i} } `}static toBool(e){return typeof e=="boolean"?e:typeof e=="string"?(e=e.toLowerCase(),!(e===""||e==="no"||e==="false"||e==="0")):!!e}static toNumber(e){return e===null||e.length===0?void 0:Number(e)}static parseHeight(e){let t,i="px";if(typeof e=="string")if(e==="auto"||e==="")t=0;else{const s=e.match(/^(-[0-9]+\.[0-9]+|[0-9]*\.[0-9]+|-[0-9]+|[0-9]+)(px|em|rem|vh|vw|%|cm|mm)?$/);if(!s)throw new Error(`Invalid height val = ${e}`);i=s[2]||"px",t=parseFloat(s[1])}else t=e;return{h:t,unit:i}}static defaults(e,...t){return t.forEach(i=>{for(const s in i){if(!i.hasOwnProperty(s))return;e[s]===null||e[s]===void 0?e[s]=i[s]:typeof i[s]=="object"&&typeof e[s]=="object"&&this.defaults(e[s],i[s])}}),e}static same(e,t){if(typeof e!="object")return e==t;if(typeof e!=typeof t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const i in e)if(e[i]!==t[i])return!1;return!0}static copyPos(e,t,i=!1){return t.x!==void 0&&(e.x=t.x),t.y!==void 0&&(e.y=t.y),t.w!==void 0&&(e.w=t.w),t.h!==void 0&&(e.h=t.h),i&&(t.minW&&(e.minW=t.minW),t.minH&&(e.minH=t.minH),t.maxW&&(e.maxW=t.maxW),t.maxH&&(e.maxH=t.maxH)),e}static samePos(e,t){return e&&t&&e.x===t.x&&e.y===t.y&&(e.w||1)===(t.w||1)&&(e.h||1)===(t.h||1)}static sanitizeMinMax(e){e.minW||delete e.minW,e.minH||delete e.minH,e.maxW||delete e.maxW,e.maxH||delete e.maxH}static removeInternalAndSame(e,t){if(!(typeof e!="object"||typeof t!="object"))for(let i in e){const s=e[i],r=t[i];i[0]==="_"||s===r?delete e[i]:s&&typeof s=="object"&&r!==void 0&&(m.removeInternalAndSame(s,r),Object.keys(s).length||delete e[i])}}static removeInternalForSave(e,t=!0){for(let i in e)(i[0]==="_"||e[i]===null||e[i]===void 0)&&delete e[i];delete e.grid,t&&delete e.el,e.autoPosition||delete e.autoPosition,e.noResize||delete e.noResize,e.noMove||delete e.noMove,e.locked||delete e.locked,(e.w===1||e.w===e.minW)&&delete e.w,(e.h===1||e.h===e.minH)&&delete e.h}static throttle(e,t){let i=!1;return(...s)=>{i||(i=!0,setTimeout(()=>{e(...s),i=!1},t))}}static removePositioningStyles(e){const t=e.style;t.position&&t.removeProperty("position"),t.left&&t.removeProperty("left"),t.top&&t.removeProperty("top"),t.width&&t.removeProperty("width"),t.height&&t.removeProperty("height")}static getScrollElement(e){if(!e)return document.scrollingElement||document.documentElement;const t=getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowY)?e:this.getScrollElement(e.parentElement)}static updateScrollPosition(e,t,i){const s=e.getBoundingClientRect(),r=window.innerHeight||document.documentElement.clientHeight;if(s.top<0||s.bottom>r){const a=s.bottom-r,o=s.top,u=this.getScrollElement(e);if(u!==null){const d=u.scrollTop;s.top<0&&i<0?e.offsetHeight>r?u.scrollTop+=i:u.scrollTop+=Math.abs(o)>Math.abs(i)?i:o:i>0&&(e.offsetHeight>r?u.scrollTop+=i:u.scrollTop+=a>i?i:a),t.top+=u.scrollTop-d}}}static updateScrollResize(e,t,i){const s=this.getScrollElement(t),r=s.clientHeight,a=s===this.getScrollElement()?0:s.getBoundingClientRect().top,o=e.clientY-a,u=o<i,d=o>r-i;u?s.scrollBy({behavior:"smooth",top:o-i}):d&&s.scrollBy({behavior:"smooth",top:i-(r-o)})}static clone(e){return e==null||typeof e!="object"?e:e instanceof Array?[...e]:{...e}}static cloneDeep(e){const t=["parentGrid","el","grid","subGrid","engine"],i=m.clone(e);for(const s in i)i.hasOwnProperty(s)&&typeof i[s]=="object"&&s.substring(0,2)!=="__"&&!t.find(r=>r===s)&&(i[s]=m.cloneDeep(e[s]));return i}static cloneNode(e){const t=e.cloneNode(!0);return t.removeAttribute("id"),t}static appendTo(e,t){let i;typeof t=="string"?i=m.getElement(t):i=t,i&&i.appendChild(e)}static addElStyles(e,t){if(t instanceof Object)for(const i in t)t.hasOwnProperty(i)&&(Array.isArray(t[i])?t[i].forEach(s=>{e.style[i]=s}):e.style[i]=t[i])}static initEvent(e,t){const i={type:t.type},s={button:0,which:0,buttons:1,bubbles:!0,cancelable:!0,target:t.target?t.target:e.target};return["altKey","ctrlKey","metaKey","shiftKey"].forEach(r=>i[r]=e[r]),["pageX","pageY","clientX","clientY","screenX","screenY"].forEach(r=>i[r]=e[r]),{...i,...s}}static simulateMouseEvent(e,t,i){const s=e,r=new MouseEvent(t,{bubbles:!0,composed:!0,cancelable:!0,view:window,detail:1,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY,ctrlKey:s.ctrlKey??!1,altKey:s.altKey??!1,shiftKey:s.shiftKey??!1,metaKey:s.metaKey??!1,button:0,relatedTarget:e.target});(i||e.target).dispatchEvent(r)}static getValuesFromTransformedElement(e){const t=document.createElement("div");m.addElStyles(t,{opacity:"0",position:"fixed",top:"0px",left:"0px",width:"1px",height:"1px",zIndex:"-999999"}),e.appendChild(t);const i=t.getBoundingClientRect();return e.removeChild(t),t.remove(),{xScale:1/i.width,yScale:1/i.height,xOffset:i.left,yOffset:i.top}}static swap(e,t,i){if(!e)return;const s=e[t];e[t]=e[i],e[i]=s}static canBeRotated(e){var t;return!(!e||e.w===e.h||e.locked||e.noResize||(t=e.grid)!=null&&t.opts.disableResize||e.minW&&e.minW===e.maxW||e.minH&&e.minH===e.maxH)}}class ne{constructor(e={}){this.addedNodes=[],this.removedNodes=[],this.defaultColumn=12,this.column=e.column||this.defaultColumn,this.column>this.defaultColumn&&(this.defaultColumn=this.column),this.maxRow=e.maxRow,this._float=e.float,this.nodes=e.nodes||[],this.onChange=e.onChange}batchUpdate(e=!0,t=!0){return!!this.batchMode===e?this:(this.batchMode=e,e?(this._prevFloat=this._float,this._float=!0,this.cleanNodes(),this.saveInitial()):(this._float=this._prevFloat,delete this._prevFloat,t&&this._packNodes(),this._notify()),this)}_useEntireRowArea(e,t){return(!this.float||this.batchMode&&!this._prevFloat)&&!this._hasLocked&&(!e._moving||e._skipDown||t.y<=e.y)}_fixCollisions(e,t=e,i,s={}){if(this.sortNodes(-1),i=i||this.collide(e,t),!i)return!1;if(e._moving&&!s.nested&&!this.float&&this.swap(e,i))return!0;let r=t;!this._loading&&this._useEntireRowArea(e,t)&&(r={x:0,w:this.column,y:t.y,h:t.h},i=this.collide(e,r,s.skip));let a=!1;const o={nested:!0,pack:!1};let u=0;for(;i=i||this.collide(e,r,s.skip);){if(u++>this.nodes.length*2)throw new Error("Infinite collide check");let d;if(i.locked||this._loading||e._moving&&!e._skipDown&&t.y>e.y&&!this.float&&(!this.collide(i,{...i,y:e.y},e)||!this.collide(i,{...i,y:t.y-i.h},e))){e._skipDown=e._skipDown||t.y>e.y;const h={...t,y:i.y+i.h,...o};d=this._loading&&m.samePos(e,h)?!0:this.moveNode(e,h),(i.locked||this._loading)&&d?m.copyPos(t,e):!i.locked&&d&&s.pack&&(this._packNodes(),t.y=i.y+i.h,m.copyPos(e,t)),a=a||d}else d=this.moveNode(i,{...i,y:t.y+t.h,skip:e,...o});if(!d)return a;i=void 0}return a}collide(e,t=e,i){const s=e._id,r=i==null?void 0:i._id;return this.nodes.find(a=>a._id!==s&&a._id!==r&&m.isIntercepted(a,t))}collideAll(e,t=e,i){const s=e._id,r=i==null?void 0:i._id;return this.nodes.filter(a=>a._id!==s&&a._id!==r&&m.isIntercepted(a,t))}directionCollideCoverage(e,t,i){if(!t.rect||!e._rect)return;const s=e._rect,r={...t.rect};r.y>s.y?(r.h+=r.y-s.y,r.y=s.y):r.h+=s.y-r.y,r.x>s.x?(r.w+=r.x-s.x,r.x=s.x):r.w+=s.x-r.x;let a,o=.5;for(let u of i){if(u.locked||!u._rect)break;const d=u._rect;let h=Number.MAX_VALUE,c=Number.MAX_VALUE;s.y<d.y?h=(r.y+r.h-d.y)/d.h:s.y+s.h>d.y+d.h&&(h=(d.y+d.h-r.y)/d.h),s.x<d.x?c=(r.x+r.w-d.x)/d.w:s.x+s.w>d.x+d.w&&(c=(d.x+d.w-r.x)/d.w);const f=Math.min(c,h);f>o&&(o=f,a=u)}return t.collide=a,a}cacheRects(e,t,i,s,r,a){return this.nodes.forEach(o=>o._rect={y:o.y*t+i,x:o.x*e+a,w:o.w*e-a-s,h:o.h*t-i-r}),this}swap(e,t){if(!t||t.locked||!e||e.locked)return!1;function i(){const r=t.x,a=t.y;return t.x=e.x,t.y=e.y,e.h!=t.h?(e.x=r,e.y=t.y+t.h):e.w!=t.w?(e.x=t.x+t.w,e.y=a):(e.x=r,e.y=a),e._dirty=t._dirty=!0,!0}let s;if(e.w===t.w&&e.h===t.h&&(e.x===t.x||e.y===t.y)&&(s=m.isTouching(e,t)))return i();if(s!==!1){if(e.w===t.w&&e.x===t.x&&(s||(s=m.isTouching(e,t)))){if(t.y<e.y){const r=e;e=t,t=r}return i()}if(s!==!1){if(e.h===t.h&&e.y===t.y&&(s||(s=m.isTouching(e,t)))){if(t.x<e.x){const r=e;e=t,t=r}return i()}return!1}}}isAreaEmpty(e,t,i,s){const r={x:e||0,y:t||0,w:i||1,h:s||1};return!this.collide(r)}compact(e="compact",t=!0){if(this.nodes.length===0)return this;t&&this.sortNodes();const i=this.batchMode;i||this.batchUpdate();const s=this._inColumnResize;s||(this._inColumnResize=!0);const r=this.nodes;return this.nodes=[],r.forEach((a,o,u)=>{let d;a.locked||(a.autoPosition=!0,e==="list"&&o&&(d=u[o-1])),this.addNode(a,!1,d)}),s||delete this._inColumnResize,i||this.batchUpdate(!1),this}set float(e){this._float!==e&&(this._float=e||!1,e||this._packNodes()._notify())}get float(){return this._float||!1}sortNodes(e=1){return this.nodes=m.sort(this.nodes,e),this}_packNodes(){return this.batchMode?this:(this.sortNodes(),this.float?this.nodes.forEach(e=>{if(e._updating||e._orig===void 0||e.y===e._orig.y)return;let t=e.y;for(;t>e._orig.y;)--t,this.collide(e,{x:e.x,y:t,w:e.w,h:e.h})||(e._dirty=!0,e.y=t)}):this.nodes.forEach((e,t)=>{if(!e.locked)for(;e.y>0;){const i=t===0?0:e.y-1;if(!(t===0||!this.collide(e,{x:e.x,y:i,w:e.w,h:e.h})))break;e._dirty=e.y!==i,e.y=i}}),this)}prepareNode(e,t){e._id=e._id??ne._idSeq++;const i=e.id;if(i){let r=1;for(;this.nodes.find(a=>a.id===e.id&&a!==e);)e.id=i+"_"+r++}(e.x===void 0||e.y===void 0||e.x===null||e.y===null)&&(e.autoPosition=!0);const s={x:0,y:0,w:1,h:1};return m.defaults(e,s),e.autoPosition||delete e.autoPosition,e.noResize||delete e.noResize,e.noMove||delete e.noMove,m.sanitizeMinMax(e),typeof e.x=="string"&&(e.x=Number(e.x)),typeof e.y=="string"&&(e.y=Number(e.y)),typeof e.w=="string"&&(e.w=Number(e.w)),typeof e.h=="string"&&(e.h=Number(e.h)),isNaN(e.x)&&(e.x=s.x,e.autoPosition=!0),isNaN(e.y)&&(e.y=s.y,e.autoPosition=!0),isNaN(e.w)&&(e.w=s.w),isNaN(e.h)&&(e.h=s.h),this.nodeBoundFix(e,t),e}nodeBoundFix(e,t){const i=e._orig||m.copyPos({},e);if(e.maxW&&(e.w=Math.min(e.w||1,e.maxW)),e.maxH&&(e.h=Math.min(e.h||1,e.maxH)),e.minW&&(e.w=Math.max(e.w||1,e.minW)),e.minH&&(e.h=Math.max(e.h||1,e.minH)),(e.x||0)+(e.w||1)>this.column&&this.column<this.defaultColumn&&!this._inColumnResize&&!this.skipCacheUpdate&&e._id&&this.findCacheLayout(e,this.defaultColumn)===-1){const r={...e};r.autoPosition||r.x===void 0?(delete r.x,delete r.y):r.x=Math.min(this.defaultColumn-1,r.x),r.w=Math.min(this.defaultColumn,r.w||1),this.cacheOneLayout(r,this.defaultColumn)}return e.w>this.column?e.w=this.column:e.w<1&&(e.w=1),this.maxRow&&e.h>this.maxRow?e.h=this.maxRow:e.h<1&&(e.h=1),e.x<0&&(e.x=0),e.y<0&&(e.y=0),e.x+e.w>this.column&&(t?e.w=this.column-e.x:e.x=this.column-e.w),this.maxRow&&e.y+e.h>this.maxRow&&(t?e.h=this.maxRow-e.y:e.y=this.maxRow-e.h),m.samePos(e,i)||(e._dirty=!0),this}getDirtyNodes(e){return e?this.nodes.filter(t=>t._dirty&&!m.samePos(t,t._orig)):this.nodes.filter(t=>t._dirty)}_notify(e){if(this.batchMode||!this.onChange)return this;const t=(e||[]).concat(this.getDirtyNodes());return this.onChange(t),this}cleanNodes(){return this.batchMode?this:(this.nodes.forEach(e=>{delete e._dirty,delete e._lastTried}),this)}saveInitial(){return this.nodes.forEach(e=>{e._orig=m.copyPos({},e),delete e._dirty}),this._hasLocked=this.nodes.some(e=>e.locked),this}restoreInitial(){return this.nodes.forEach(e=>{!e._orig||m.samePos(e,e._orig)||(m.copyPos(e,e._orig),e._dirty=!0)}),this._notify(),this}findEmptyPosition(e,t=this.nodes,i=this.column,s){const r=s?s.y*i+(s.x+s.w):0;let a=!1;for(let o=r;!a;++o){const u=o%i,d=Math.floor(o/i);if(u+e.w>i)continue;const h={x:u,y:d,w:e.w,h:e.h};t.find(c=>m.isIntercepted(h,c))||((e.x!==u||e.y!==d)&&(e._dirty=!0),e.x=u,e.y=d,delete e.autoPosition,a=!0)}return a}addNode(e,t=!1,i){const s=this.nodes.find(a=>a._id===e._id);if(s)return s;this._inColumnResize?this.nodeBoundFix(e):this.prepareNode(e),delete e._temporaryRemoved,delete e._removeDOM;let r;return e.autoPosition&&this.findEmptyPosition(e,this.nodes,this.column,i)&&(delete e.autoPosition,r=!0),this.nodes.push(e),t&&this.addedNodes.push(e),r||this._fixCollisions(e),this.batchMode||this._packNodes()._notify(),e}removeNode(e,t=!0,i=!1){return this.nodes.find(s=>s._id===e._id)?(i&&this.removedNodes.push(e),t&&(e._removeDOM=!0),this.nodes=this.nodes.filter(s=>s._id!==e._id),e._isAboutToRemove||this._packNodes(),this._notify([e]),this):this}removeAll(e=!0,t=!0){if(delete this._layouts,!this.nodes.length)return this;e&&this.nodes.forEach(s=>s._removeDOM=!0);const i=this.nodes;return this.removedNodes=t?i:[],this.nodes=[],this._notify(i)}moveNodeCheck(e,t){if(!this.changedPosConstrain(e,t))return!1;if(t.pack=!0,!this.maxRow)return this.moveNode(e,t);let i;const s=new ne({column:this.column,float:this.float,nodes:this.nodes.map(a=>a._id===e._id?(i={...a},i):{...a})});if(!i)return!1;const r=s.moveNode(i,t)&&s.getRow()<=Math.max(this.getRow(),this.maxRow);if(!r&&!t.resizing&&t.collide){const a=t.collide.el.gridstackNode;if(this.swap(e,a))return this._notify(),!0}return r?(s.nodes.filter(a=>a._dirty).forEach(a=>{const o=this.nodes.find(u=>u._id===a._id);o&&(m.copyPos(o,a),o._dirty=!0)}),this._notify(),!0):!1}willItFit(e){if(delete e._willFitPos,!this.maxRow)return!0;const t=new ne({column:this.column,float:this.float,nodes:this.nodes.map(s=>({...s}))}),i={...e};return this.cleanupNode(i),delete i.el,delete i._id,delete i.content,delete i.grid,t.addNode(i),t.getRow()<=this.maxRow?(e._willFitPos=m.copyPos({},i),!0):!1}changedPosConstrain(e,t){return t.w=t.w||e.w,t.h=t.h||e.h,e.x!==t.x||e.y!==t.y?!0:(e.maxW&&(t.w=Math.min(t.w,e.maxW)),e.maxH&&(t.h=Math.min(t.h,e.maxH)),e.minW&&(t.w=Math.max(t.w,e.minW)),e.minH&&(t.h=Math.max(t.h,e.minH)),e.w!==t.w||e.h!==t.h)}moveNode(e,t){var d,h;if(!e||!t)return!1;let i;t.pack===void 0&&!this.batchMode&&(i=t.pack=!0),typeof t.x!="number"&&(t.x=e.x),typeof t.y!="number"&&(t.y=e.y),typeof t.w!="number"&&(t.w=e.w),typeof t.h!="number"&&(t.h=e.h);const s=e.w!==t.w||e.h!==t.h,r=m.copyPos({},e,!0);if(m.copyPos(r,t),this.nodeBoundFix(r,s),m.copyPos(t,r),!t.forceCollide&&m.samePos(e,t))return!1;const a=m.copyPos({},e),o=this.collideAll(e,r,t.skip);let u=!0;if(o.length){const c=e._moving&&!t.nested;let f=c?this.directionCollideCoverage(e,t,o):o[0];if(c&&f&&((h=(d=e.grid)==null?void 0:d.opts)!=null&&h.subGridDynamic)&&!e.grid._isTemp){const g=m.areaIntercept(t.rect,f._rect),p=m.area(t.rect),_=m.area(f._rect);g/(p<_?p:_)>.8&&(f.grid.makeSubGrid(f.el,void 0,e),f=void 0)}f?u=!this._fixCollisions(e,r,f,t):(u=!1,i&&delete t.pack)}return u&&!m.samePos(e,r)&&(e._dirty=!0,m.copyPos(e,r)),t.pack&&this._packNodes()._notify(),!m.samePos(e,a)}getRow(){return this.nodes.reduce((e,t)=>Math.max(e,t.y+t.h),0)}beginUpdate(e){return e._updating||(e._updating=!0,delete e._skipDown,this.batchMode||this.saveInitial()),this}endUpdate(){const e=this.nodes.find(t=>t._updating);return e&&(delete e._updating,delete e._skipDown),this}save(e=!0,t){var a;const i=(a=this._layouts)==null?void 0:a.length,s=i&&this.column!==i-1?this._layouts[i-1]:null,r=[];return this.sortNodes(),this.nodes.forEach(o=>{const u=s==null?void 0:s.find(h=>h._id===o._id),d={...o,...u||{}};m.removeInternalForSave(d,!e),t&&t(o,d),r.push(d)}),r}layoutsNodesChange(e){return!this._layouts||this._inColumnResize?this:(this._layouts.forEach((t,i)=>{if(!t||i===this.column)return this;if(i<this.column)this._layouts[i]=void 0;else{const s=i/this.column;e.forEach(r=>{if(!r._orig)return;const a=t.find(o=>o._id===r._id);a&&(a.y>=0&&r.y!==r._orig.y&&(a.y+=r.y-r._orig.y),r.x!==r._orig.x&&(a.x=Math.round(r.x*s)),r.w!==r._orig.w&&(a.w=Math.round(r.w*s)))})}}),this)}columnChanged(e,t,i="moveScale"){var o;if(!this.nodes.length||!t||e===t)return this;const s=i==="compact"||i==="list";s&&this.sortNodes(1),t<e&&this.cacheLayout(this.nodes,e),this.batchUpdate();let r=[],a=s?this.nodes:m.sort(this.nodes,-1);if(t>e&&this._layouts){const u=this._layouts[t]||[],d=this._layouts.length-1;!u.length&&e!==d&&((o=this._layouts[d])!=null&&o.length)&&(e=d,this._layouts[d].forEach(h=>{const c=a.find(f=>f._id===h._id);c&&(!s&&!h.autoPosition&&(c.x=h.x??c.x,c.y=h.y??c.y),c.w=h.w??c.w,(h.x==null||h.y===void 0)&&(c.autoPosition=!0))})),u.forEach(h=>{const c=a.findIndex(f=>f._id===h._id);if(c!==-1){const f=a[c];if(s){f.w=h.w;return}(h.autoPosition||isNaN(h.x)||isNaN(h.y))&&this.findEmptyPosition(h,r),h.autoPosition||(f.x=h.x??f.x,f.y=h.y??f.y,f.w=h.w??f.w,r.push(f)),a.splice(c,1)}})}if(s)this.compact(i,!1);else{if(a.length)if(typeof i=="function")i(t,e,r,a);else{const u=s||i==="none"?1:t/e,d=i==="move"||i==="moveScale",h=i==="scale"||i==="moveScale";a.forEach(c=>{c.x=t===1?0:d?Math.round(c.x*u):Math.min(c.x,t-1),c.w=t===1||e===1?1:h?Math.round(c.w*u)||1:Math.min(c.w,t),r.push(c)}),a=[]}r=m.sort(r,-1),this._inColumnResize=!0,this.nodes=[],r.forEach(u=>{this.addNode(u,!1),delete u._orig})}return this.nodes.forEach(u=>delete u._orig),this.batchUpdate(!1,!s),delete this._inColumnResize,this}cacheLayout(e,t,i=!1){const s=[];return e.forEach((r,a)=>{if(r._id===void 0){const o=r.id?this.nodes.find(u=>u.id===r.id):void 0;r._id=(o==null?void 0:o._id)??ne._idSeq++}s[a]={x:r.x,y:r.y,w:r.w,_id:r._id}}),this._layouts=i?[]:this._layouts||[],this._layouts[t]=s,this}cacheOneLayout(e,t){e._id=e._id??ne._idSeq++;const i={x:e.x,y:e.y,w:e.w,_id:e._id};(e.autoPosition||e.x===void 0)&&(delete i.x,delete i.y,e.autoPosition&&(i.autoPosition=!0)),this._layouts=this._layouts||[],this._layouts[t]=this._layouts[t]||[];const s=this.findCacheLayout(e,t);return s===-1?this._layouts[t].push(i):this._layouts[t][s]=i,this}findCacheLayout(e,t){var i,s;return((s=(i=this._layouts)==null?void 0:i[t])==null?void 0:s.findIndex(r=>r._id===e._id))??-1}removeNodeFromLayoutCache(e){if(this._layouts)for(let t=0;t<this._layouts.length;t++){const i=this.findCacheLayout(e,t);i!==-1&&this._layouts[t].splice(i,1)}}cleanupNode(e){for(const t in e)t[0]==="_"&&t!=="_id"&&delete e[t];return this}}ne._idSeq=0;const Y={alwaysShowResizeHandle:"mobile",animate:!0,auto:!0,cellHeight:"auto",cellHeightThrottle:100,cellHeightUnit:"px",column:12,draggable:{handle:".grid-stack-item-content",appendTo:"body",scroll:!0},handle:".grid-stack-item-content",itemClass:"grid-stack-item",margin:10,marginUnit:"px",maxRow:0,minRow:0,placeholderClass:"grid-stack-placeholder",placeholderText:"",removableOptions:{accept:"grid-stack-item",decline:"grid-stack-non-removable"},resizable:{handles:"se"},rtl:"auto"};class k{}const ie=typeof window<"u"&&typeof document<"u"&&("ontouchstart"in document||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0);class oe{}function He(l,e){l.touches.length>1||(l.cancelable&&l.preventDefault(),m.simulateMouseEvent(l.changedTouches[0],e))}function zt(l,e){l.cancelable&&l.preventDefault(),m.simulateMouseEvent(l,e)}function qe(l){oe.touchHandled||(oe.touchHandled=!0,He(l,"mousedown"))}function Ie(l){oe.touchHandled&&He(l,"mousemove")}function Me(l){if(!oe.touchHandled)return;oe.pointerLeaveTimeout&&(window.clearTimeout(oe.pointerLeaveTimeout),delete oe.pointerLeaveTimeout);const e=!!k.dragElement;He(l,"mouseup"),e||He(l,"click"),oe.touchHandled=!1}function Be(l){l.pointerType!=="mouse"&&l.target.releasePointerCapture(l.pointerId)}function Nt(l){k.dragElement&&l.pointerType!=="mouse"&&zt(l,"mouseenter")}function Lt(l){k.dragElement&&l.pointerType!=="mouse"&&(oe.pointerLeaveTimeout=window.setTimeout(()=>{delete oe.pointerLeaveTimeout,zt(l,"mouseleave")},10))}class Pe{constructor(e,t,i){this.host=e,this.dir=t,this.option=i,this.moving=!1,this._mouseDown=this._mouseDown.bind(this),this._mouseMove=this._mouseMove.bind(this),this._mouseUp=this._mouseUp.bind(this),this._keyEvent=this._keyEvent.bind(this),this._init()}_init(){const e=this.el=document.createElement("div");return e.classList.add("ui-resizable-handle"),e.classList.add(`${Pe.prefix}${this.dir}`),e.style.zIndex="100",e.style.userSelect="none",this.host.appendChild(this.el),this.el.addEventListener("mousedown",this._mouseDown),ie&&(this.el.addEventListener("touchstart",qe),this.el.addEventListener("pointerdown",Be)),this}destroy(){return this.moving&&this._mouseUp(this.mouseDownEvent),this.el.removeEventListener("mousedown",this._mouseDown),ie&&(this.el.removeEventListener("touchstart",qe),this.el.removeEventListener("pointerdown",Be)),this.host.removeChild(this.el),delete this.el,delete this.host,this}_mouseDown(e){this.mouseDownEvent=e,document.addEventListener("mousemove",this._mouseMove,{capture:!0,passive:!0}),document.addEventListener("mouseup",this._mouseUp,!0),ie&&(this.el.addEventListener("touchmove",Ie),this.el.addEventListener("touchend",Me)),e.stopPropagation(),e.preventDefault()}_mouseMove(e){const t=this.mouseDownEvent;this.moving?this._triggerEvent("move",e):Math.abs(e.x-t.x)+Math.abs(e.y-t.y)>2&&(this.moving=!0,this._triggerEvent("start",this.mouseDownEvent),this._triggerEvent("move",e),document.addEventListener("keydown",this._keyEvent)),e.stopPropagation()}_mouseUp(e){this.moving&&(this._triggerEvent("stop",e),document.removeEventListener("keydown",this._keyEvent)),document.removeEventListener("mousemove",this._mouseMove,!0),document.removeEventListener("mouseup",this._mouseUp,!0),ie&&(this.el.removeEventListener("touchmove",Ie),this.el.removeEventListener("touchend",Me)),delete this.moving,delete this.mouseDownEvent,e.stopPropagation(),e.preventDefault()}_keyEvent(e){var t,i;e.key==="Escape"&&((i=(t=this.host.gridstackNode)==null?void 0:t.grid)==null||i.engine.restoreInitial(),this._mouseUp(this.mouseDownEvent))}_triggerEvent(e,t){return this.option[e]&&this.option[e](t),this}}Pe.prefix="ui-resizable-";class Qe{constructor(){this._eventRegister={}}get disabled(){return this._disabled}on(e,t){this._eventRegister[e]=t}off(e){delete this._eventRegister[e]}enable(){this._disabled=!1}disable(){this._disabled=!0}destroy(){delete this._eventRegister}triggerEvent(e,t){if(!this.disabled&&this._eventRegister&&this._eventRegister[e])return this._eventRegister[e](t)}}class Ce extends Qe{constructor(e,t={}){super(),this.el=e,this.option=t,this.rectScale={x:1,y:1},this._ui=()=>{const s=this.el.parentElement.getBoundingClientRect(),r={width:this.originalRect.width,height:this.originalRect.height+this.scrolled,left:this.originalRect.left,top:this.originalRect.top-this.scrolled},a=this.temporalRect||r;return{position:{left:(a.left-s.left)*this.rectScale.x,top:(a.top-s.top)*this.rectScale.y},size:{width:a.width*this.rectScale.x,height:a.height*this.rectScale.y}}},this._mouseOver=this._mouseOver.bind(this),this._mouseOut=this._mouseOut.bind(this),this.enable(),this._setupAutoHide(this.option.autoHide),this._setupHandlers()}on(e,t){super.on(e,t)}off(e){super.off(e)}enable(){super.enable(),this.el.classList.remove("ui-resizable-disabled"),this._setupAutoHide(this.option.autoHide)}disable(){super.disable(),this.el.classList.add("ui-resizable-disabled"),this._setupAutoHide(!1)}destroy(){this._removeHandlers(),this._setupAutoHide(!1),delete this.el,super.destroy()}updateOption(e){const t=e.handles&&e.handles!==this.option.handles,i=e.autoHide&&e.autoHide!==this.option.autoHide;return Object.keys(e).forEach(s=>this.option[s]=e[s]),t&&(this._removeHandlers(),this._setupHandlers()),i&&this._setupAutoHide(this.option.autoHide),this}_setupAutoHide(e){return e?(this.el.classList.add("ui-resizable-autohide"),this.el.addEventListener("mouseover",this._mouseOver),this.el.addEventListener("mouseout",this._mouseOut)):(this.el.classList.remove("ui-resizable-autohide"),this.el.removeEventListener("mouseover",this._mouseOver),this.el.removeEventListener("mouseout",this._mouseOut),k.overResizeElement===this&&delete k.overResizeElement),this}_mouseOver(e){k.overResizeElement||k.dragElement||(k.overResizeElement=this,this.el.classList.remove("ui-resizable-autohide"))}_mouseOut(e){k.overResizeElement===this&&(delete k.overResizeElement,this.el.classList.add("ui-resizable-autohide"))}_setupHandlers(){return this.handlers=this.option.handles.split(",").map(e=>e.trim()).map(e=>new Pe(this.el,e,{start:t=>{this._resizeStart(t)},stop:t=>{this._resizeStop(t)},move:t=>{this._resizing(t,e)}})),this}_resizeStart(e){this.sizeToContent=m.shouldSizeToContent(this.el.gridstackNode,!0),this.originalRect=this.el.getBoundingClientRect(),this.scrollEl=m.getScrollElement(this.el),this.scrollY=this.scrollEl.scrollTop,this.scrolled=0,this.startEvent=e,this._setupHelper(),this._applyChange();const t=m.initEvent(e,{type:"resizestart",target:this.el});return this.option.start&&this.option.start(t,this._ui()),this.el.classList.add("ui-resizable-resizing"),this.triggerEvent("resizestart",t),this}_resizing(e,t){this.scrolled=this.scrollEl.scrollTop-this.scrollY,this.temporalRect=this._getChange(e,t),this._applyChange();const i=m.initEvent(e,{type:"resize",target:this.el});return this.option.resize&&this.option.resize(i,this._ui()),this.triggerEvent("resize",i),this}_resizeStop(e){const t=m.initEvent(e,{type:"resizestop",target:this.el});return this.option.stop&&this.option.stop(t),this.el.classList.remove("ui-resizable-resizing"),this.triggerEvent("resizestop",t),this._cleanHelper(),delete this.startEvent,delete this.originalRect,delete this.temporalRect,delete this.scrollY,delete this.scrolled,this}_setupHelper(){this.elOriginStyleVal=Ce._originStyleProp.map(i=>this.el.style[i]),this.parentOriginStylePosition=this.el.parentElement.style.position;const e=this.el.parentElement,t=m.getValuesFromTransformedElement(e);return this.rectScale={x:t.xScale,y:t.yScale},getComputedStyle(this.el.parentElement).position.match(/static/)&&(this.el.parentElement.style.position="relative"),this.el.style.position="absolute",this.el.style.opacity="0.8",this}_cleanHelper(){return Ce._originStyleProp.forEach((e,t)=>{this.el.style[e]=this.elOriginStyleVal[t]||null}),this.el.parentElement.style.position=this.parentOriginStylePosition||null,this}_getChange(e,t){const i=this.startEvent,s={width:this.originalRect.width,height:this.originalRect.height+this.scrolled,left:this.originalRect.left,top:this.originalRect.top-this.scrolled},r=e.clientX-i.clientX,a=this.sizeToContent?0:e.clientY-i.clientY;let o,u;t.indexOf("e")>-1?s.width+=r:t.indexOf("w")>-1&&(s.width-=r,s.left+=r,o=!0),t.indexOf("s")>-1?s.height+=a:t.indexOf("n")>-1&&(s.height-=a,s.top+=a,u=!0);const d=this._constrainSize(s.width,s.height,o,u);return Math.round(s.width)!==Math.round(d.width)&&(t.indexOf("w")>-1&&(s.left+=s.width-d.width),s.width=d.width),Math.round(s.height)!==Math.round(d.height)&&(t.indexOf("n")>-1&&(s.top+=s.height-d.height),s.height=d.height),s}_constrainSize(e,t,i,s){const r=this.option,a=(i?r.maxWidthMoveLeft:r.maxWidth)||Number.MAX_SAFE_INTEGER,o=r.minWidth/this.rectScale.x||e,u=(s?r.maxHeightMoveUp:r.maxHeight)||Number.MAX_SAFE_INTEGER,d=r.minHeight/this.rectScale.y||t,h=Math.min(a,Math.max(o,e)),c=Math.min(u,Math.max(d,t));return{width:h,height:c}}_applyChange(){let e={left:0,top:0,width:0,height:0};if(this.el.style.position==="absolute"){const t=this.el.parentElement,{left:i,top:s}=t.getBoundingClientRect();e={left:i,top:s,width:0,height:0}}return this.temporalRect?(Object.keys(this.temporalRect).forEach(t=>{const i=this.temporalRect[t],s=t==="width"||t==="left"?this.rectScale.x:t==="height"||t==="top"?this.rectScale.y:1;this.el.style[t]=(i-e[t])*s+"px"}),this):this}_removeHandlers(){return this.handlers.forEach(e=>e.destroy()),delete this.handlers,this}}Ce._originStyleProp=["width","height","position","left","top","opacity","zIndex"];const $i='input,textarea,button,select,option,[contenteditable="true"],.ui-resizable-handle';class ke extends Qe{constructor(e,t={}){var r;super(),this.el=e,this.option=t,this.dragTransform={xScale:1,yScale:1,xOffset:0,yOffset:0};const i=(r=t==null?void 0:t.handle)==null?void 0:r.substring(1),s=e.gridstackNode;this.dragEls=!i||e.classList.contains(i)?[e]:s!=null&&s.subGrid?[e.querySelector(t.handle)||e]:Array.from(e.querySelectorAll(t.handle)),this.dragEls.length===0&&(this.dragEls=[e]),this._mouseDown=this._mouseDown.bind(this),this._mouseMove=this._mouseMove.bind(this),this._mouseUp=this._mouseUp.bind(this),this._keyEvent=this._keyEvent.bind(this),this.enable()}on(e,t){super.on(e,t)}off(e){super.off(e)}enable(){this.disabled!==!1&&(super.enable(),this.dragEls.forEach(e=>{e.addEventListener("mousedown",this._mouseDown),ie&&(e.addEventListener("touchstart",qe),e.addEventListener("pointerdown",Be))}),this.el.classList.remove("ui-draggable-disabled"))}disable(e=!1){this.disabled!==!0&&(super.disable(),this.dragEls.forEach(t=>{t.removeEventListener("mousedown",this._mouseDown),ie&&(t.removeEventListener("touchstart",qe),t.removeEventListener("pointerdown",Be))}),e||this.el.classList.add("ui-draggable-disabled"))}destroy(){this.dragTimeout&&window.clearTimeout(this.dragTimeout),delete this.dragTimeout,this.mouseDownEvent&&this._mouseUp(this.mouseDownEvent),this.disable(!0),delete this.el,delete this.helper,delete this.option,super.destroy()}updateOption(e){return Object.keys(e).forEach(t=>this.option[t]=e[t]),this}_mouseDown(e){if(!k.mouseHandled)return e.button!==0||!this.dragEls.find(t=>t===e.target)&&e.target.closest($i)||this.option.cancel&&e.target.closest(this.option.cancel)||(this.mouseDownEvent=e,delete this.dragging,delete k.dragElement,delete k.dropElement,document.addEventListener("mousemove",this._mouseMove,{capture:!0,passive:!0}),document.addEventListener("mouseup",this._mouseUp,!0),ie&&(e.currentTarget.addEventListener("touchmove",Ie),e.currentTarget.addEventListener("touchend",Me)),e.preventDefault(),document.activeElement&&document.activeElement.blur(),k.mouseHandled=!0),!0}_callDrag(e){if(!this.dragging)return;const t=m.initEvent(e,{target:this.el,type:"drag"});this.option.drag&&this.option.drag(t,this.ui()),this.triggerEvent("drag",t)}_mouseMove(e){var i;const t=this.mouseDownEvent;if(this.lastDrag=e,this.dragging)if(this._dragFollow(e),k.pauseDrag){const s=Number.isInteger(k.pauseDrag)?k.pauseDrag:100;this.dragTimeout&&window.clearTimeout(this.dragTimeout),this.dragTimeout=window.setTimeout(()=>this._callDrag(e),s)}else this._callDrag(e);else if(Math.abs(e.x-t.x)+Math.abs(e.y-t.y)>3){this.dragging=!0,k.dragElement=this;const s=(i=this.el.gridstackNode)==null?void 0:i.grid;s?k.dropElement=s.el.ddElement.ddDroppable:delete k.dropElement,this.helper=this._createHelper(),this._setupHelperContainmentStyle(),this.dragTransform=m.getValuesFromTransformedElement(this.helperContainment),this.dragOffset=this._getDragOffset(e,this.el,this.helperContainment),this._setupHelperStyle(e);const r=m.initEvent(e,{target:this.el,type:"dragstart"});this.option.start&&this.option.start(r,this.ui()),this.triggerEvent("dragstart",r),document.addEventListener("keydown",this._keyEvent)}return!0}_mouseUp(e){var t,i;if(document.removeEventListener("mousemove",this._mouseMove,!0),document.removeEventListener("mouseup",this._mouseUp,!0),ie&&e.currentTarget&&(e.currentTarget.removeEventListener("touchmove",Ie,!0),e.currentTarget.removeEventListener("touchend",Me,!0)),this.dragging){delete this.dragging,(t=this.el.gridstackNode)==null||delete t._origRotate,document.removeEventListener("keydown",this._keyEvent),((i=k.dropElement)==null?void 0:i.el)===this.el.parentElement&&delete k.dropElement,this.helperContainment.style.position=this.parentOriginStylePosition||null,this.helper!==this.el&&this.helper.remove(),this._removeHelperStyle();const s=m.initEvent(e,{target:this.el,type:"dragstop"});this.option.stop&&this.option.stop(s),this.triggerEvent("dragstop",s),k.dropElement&&k.dropElement.drop(e)}delete this.helper,delete this.mouseDownEvent,delete k.dragElement,delete k.dropElement,delete k.mouseHandled,e.preventDefault()}_keyEvent(e){var s,r;const t=this.el.gridstackNode,i=(t==null?void 0:t.grid)||((r=(s=k.dropElement)==null?void 0:s.el)==null?void 0:r.gridstack);if(e.key==="Escape")t&&t._origRotate&&(t._orig=t._origRotate,delete t._origRotate),i==null||i.cancelDrag(),this._mouseUp(this.mouseDownEvent);else if(t&&i&&(e.key==="r"||e.key==="R")){if(!m.canBeRotated(t))return;t._origRotate=t._origRotate||{...t._orig},delete t._moving,i.setAnimation(!1).rotate(t.el,{top:-this.dragOffset.offsetTop,left:-this.dragOffset.offsetLeft}).setAnimation(),t._moving=!0,this.dragOffset=this._getDragOffset(this.lastDrag,t.el,this.helperContainment),this.helper.style.width=this.dragOffset.width+"px",this.helper.style.height=this.dragOffset.height+"px",m.swap(t._orig,"w","h"),delete t._rect,this._mouseMove(this.lastDrag)}}_createHelper(){let e=this.el;return typeof this.option.helper=="function"?e=this.option.helper(this.el):this.option.helper==="clone"&&(e=m.cloneNode(this.el)),e.parentElement||m.appendTo(e,this.option.appendTo==="parent"?this.el.parentElement:this.option.appendTo),this.dragElementOriginStyle=ke.originStyleProp.map(t=>this.el.style[t]),e}_setupHelperStyle(e){this.helper.classList.add("ui-draggable-dragging");const t=this.helper.style;return t.pointerEvents="none",t.width=this.dragOffset.width+"px",t.height=this.dragOffset.height+"px",t.willChange="left, top",t.position="fixed",this._dragFollow(e),t.transition="none",setTimeout(()=>{this.helper&&(t.transition=null)},0),this}_removeHelperStyle(){var t;this.helper.classList.remove("ui-draggable-dragging");const e=(t=this.helper)==null?void 0:t.gridstackNode;if(!(e!=null&&e._isAboutToRemove)&&this.dragElementOriginStyle){const i=this.helper,s=this.dragElementOriginStyle.transition||null;i.style.transition=this.dragElementOriginStyle.transition="none",ke.originStyleProp.forEach(r=>i.style[r]=this.dragElementOriginStyle[r]||null),setTimeout(()=>i.style.transition=s,50)}return delete this.dragElementOriginStyle,this}_dragFollow(e){const t={left:0,top:0},i=this.helper.style,s=this.dragOffset;i.left=(e.clientX+s.offsetLeft-t.left)*this.dragTransform.xScale+"px",i.top=(e.clientY+s.offsetTop-t.top)*this.dragTransform.yScale+"px"}_setupHelperContainmentStyle(){return this.helperContainment=this.helper.parentElement,this.helper.style.position!=="fixed"&&(this.parentOriginStylePosition=this.helperContainment.style.position,getComputedStyle(this.helperContainment).position.match(/static/)&&(this.helperContainment.style.position="relative")),this}_getDragOffset(e,t,i){let s=0,r=0;i&&(s=this.dragTransform.xOffset,r=this.dragTransform.yOffset);const a=t.getBoundingClientRect();return{left:a.left,top:a.top,offsetLeft:-e.clientX+a.left-s,offsetTop:-e.clientY+a.top-r,width:a.width*this.dragTransform.xScale,height:a.height*this.dragTransform.yScale}}ui(){const t=this.el.parentElement.getBoundingClientRect(),i=this.helper.getBoundingClientRect();return{position:{top:(i.top-t.top)*this.dragTransform.yScale,left:(i.left-t.left)*this.dragTransform.xScale}}}}ke.originStyleProp=["width","height","transform","transform-origin","transition","pointerEvents","position","left","top","minWidth","willChange"];class Fi extends Qe{constructor(e,t={}){super(),this.el=e,this.option=t,this._mouseEnter=this._mouseEnter.bind(this),this._mouseLeave=this._mouseLeave.bind(this),this.enable(),this._setupAccept()}on(e,t){super.on(e,t)}off(e){super.off(e)}enable(){this.disabled!==!1&&(super.enable(),this.el.classList.add("ui-droppable"),this.el.classList.remove("ui-droppable-disabled"),this.el.addEventListener("mouseenter",this._mouseEnter),this.el.addEventListener("mouseleave",this._mouseLeave),ie&&(this.el.addEventListener("pointerenter",Nt),this.el.addEventListener("pointerleave",Lt)))}disable(e=!1){this.disabled!==!0&&(super.disable(),this.el.classList.remove("ui-droppable"),e||this.el.classList.add("ui-droppable-disabled"),this.el.removeEventListener("mouseenter",this._mouseEnter),this.el.removeEventListener("mouseleave",this._mouseLeave),ie&&(this.el.removeEventListener("pointerenter",Nt),this.el.removeEventListener("pointerleave",Lt)))}destroy(){this.disable(!0),this.el.classList.remove("ui-droppable"),this.el.classList.remove("ui-droppable-disabled"),super.destroy()}updateOption(e){return Object.keys(e).forEach(t=>this.option[t]=e[t]),this._setupAccept(),this}_mouseEnter(e){if(!k.dragElement||!this._canDrop(k.dragElement.el))return;e.preventDefault(),e.stopPropagation(),k.dropElement&&k.dropElement!==this&&k.dropElement._mouseLeave(e,!0),k.dropElement=this;const t=m.initEvent(e,{target:this.el,type:"dropover"});this.option.over&&this.option.over(t,this._ui(k.dragElement)),this.triggerEvent("dropover",t),this.el.classList.add("ui-droppable-over")}_mouseLeave(e,t=!1){var s;if(!k.dragElement||k.dropElement!==this)return;e.preventDefault(),e.stopPropagation();const i=m.initEvent(e,{target:this.el,type:"dropout"});if(this.option.out&&this.option.out(i,this._ui(k.dragElement)),this.triggerEvent("dropout",i),k.dropElement===this&&(delete k.dropElement,!t)){let r,a=this.el.parentElement;for(;!r&&a;)r=(s=a.ddElement)==null?void 0:s.ddDroppable,a=a.parentElement;r&&r._mouseEnter(e)}}drop(e){e.preventDefault();const t=m.initEvent(e,{target:this.el,type:"drop"});this.option.drop&&this.option.drop(t,this._ui(k.dragElement)),this.triggerEvent("drop",t)}_canDrop(e){return e&&(!this.accept||this.accept(e))}_setupAccept(){return this.option.accept?(typeof this.option.accept=="string"?this.accept=e=>e.classList.contains(this.option.accept)||e.matches(this.option.accept):this.accept=this.option.accept,this):this}_ui(e){return{draggable:e.el,...e.ui()}}}class Ye{static init(e){return e.ddElement||(e.ddElement=new Ye(e)),e.ddElement}constructor(e){this.el=e}on(e,t){return this.ddDraggable&&["drag","dragstart","dragstop"].indexOf(e)>-1?this.ddDraggable.on(e,t):this.ddDroppable&&["drop","dropover","dropout"].indexOf(e)>-1?this.ddDroppable.on(e,t):this.ddResizable&&["resizestart","resize","resizestop"].indexOf(e)>-1&&this.ddResizable.on(e,t),this}off(e){return this.ddDraggable&&["drag","dragstart","dragstop"].indexOf(e)>-1?this.ddDraggable.off(e):this.ddDroppable&&["drop","dropover","dropout"].indexOf(e)>-1?this.ddDroppable.off(e):this.ddResizable&&["resizestart","resize","resizestop"].indexOf(e)>-1&&this.ddResizable.off(e),this}setupDraggable(e){return this.ddDraggable?this.ddDraggable.updateOption(e):this.ddDraggable=new ke(this.el,e),this}cleanDraggable(){return this.ddDraggable&&(this.ddDraggable.destroy(),delete this.ddDraggable),this}setupResizable(e){return this.ddResizable?this.ddResizable.updateOption(e):this.ddResizable=new Ce(this.el,e),this}cleanResizable(){return this.ddResizable&&(this.ddResizable.destroy(),delete this.ddResizable),this}setupDroppable(e){return this.ddDroppable?this.ddDroppable.updateOption(e):this.ddDroppable=new Fi(this.el,e),this}cleanDroppable(){return this.ddDroppable&&(this.ddDroppable.destroy(),delete this.ddDroppable),this}}class Gi{resizable(e,t,i,s){return this._getDDElements(e,t).forEach(r=>{if(t==="disable"||t==="enable")r.ddResizable&&r.ddResizable[t]();else if(t==="destroy")r.ddResizable&&r.cleanResizable();else if(t==="option")r.setupResizable({[i]:s});else{const o=r.el.gridstackNode.grid;let u=r.el.getAttribute("gs-resize-handles")||o.opts.resizable.handles||"e,s,se";u==="all"&&(u="n,e,s,w,se,sw,ne,nw");const d=!o.opts.alwaysShowResizeHandle;r.setupResizable({...o.opts.resizable,handles:u,autoHide:d,start:t.start,stop:t.stop,resize:t.resize})}}),this}draggable(e,t,i,s){return this._getDDElements(e,t).forEach(r=>{if(t==="disable"||t==="enable")r.ddDraggable&&r.ddDraggable[t]();else if(t==="destroy")r.ddDraggable&&r.cleanDraggable();else if(t==="option")r.setupDraggable({[i]:s});else{const a=r.el.gridstackNode.grid;r.setupDraggable({...a.opts.draggable,start:t.start,stop:t.stop,drag:t.drag})}}),this}dragIn(e,t){return this._getDDElements(e).forEach(i=>i.setupDraggable(t)),this}droppable(e,t,i,s){return typeof t.accept=="function"&&!t._accept&&(t._accept=t.accept,t.accept=r=>t._accept(r)),this._getDDElements(e,t).forEach(r=>{t==="disable"||t==="enable"?r.ddDroppable&&r.ddDroppable[t]():t==="destroy"?r.ddDroppable&&r.cleanDroppable():t==="option"?r.setupDroppable({[i]:s}):r.setupDroppable(t)}),this}isDroppable(e){var t;return!!((t=e==null?void 0:e.ddElement)!=null&&t.ddDroppable&&!e.ddElement.ddDroppable.disabled)}isDraggable(e){var t;return!!((t=e==null?void 0:e.ddElement)!=null&&t.ddDraggable&&!e.ddElement.ddDraggable.disabled)}isResizable(e){var t;return!!((t=e==null?void 0:e.ddElement)!=null&&t.ddResizable&&!e.ddElement.ddResizable.disabled)}on(e,t,i){return this._getDDElements(e).forEach(s=>s.on(t,r=>{i(r,k.dragElement?k.dragElement.el:r.target,k.dragElement?k.dragElement.helper:null)})),this}off(e,t){return this._getDDElements(e).forEach(i=>i.off(t)),this}_getDDElements(e,t){const i=e.gridstack||t!=="destroy"&&t!=="disable",s=m.getElements(e);return s.length?s.map(a=>a.ddElement||(i?Ye.init(a):null)).filter(a=>a):[]}}/*!
|
|
5
|
+
*/const di=typeof window<"u";let gt;process.env.NODE_ENV;const pt=process.env.NODE_ENV!=="production"?Symbol("pinia"):Symbol();var yt;(function(l){l.direct="direct",l.patchObject="patch object",l.patchFunction="patch function"})(yt||(yt={})),process.env.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function xe(l){const e=n.toRaw(l),t={};for(const i in e){const s=e[i];s.effect?t[i]=n.computed({get:()=>l[i],set(r){l[i]=r}}):(n.isRef(s)||n.isReactive(s))&&(t[i]=n.toRef(l,i))}return t}const X=l=>(l==null?void 0:l.chart.type)==="table",hi=["basic","api_usage","llm_usage","agentic_usage","platform","platform_usage",void 0],ui=l=>hi.includes(l);function fi({queryBridge:l,context:e,definition:t,chartData:i}){const s=n.ref(""),r=n.ref(""),a=n.ref(void 0),o=n.ref(void 0),u=de.useAnalyticsConfigStore(),d=de.useDatasourceConfigStore(),{stripUnknownFilters:h,loading:c}=xe(d),f=n.computed(()=>X(t.value));n.onMounted(async()=>{var S,A;s.value=await((S=l==null?void 0:l.exploreBaseUrl)==null?void 0:S.call(l))??"",r.value=await((A=l==null?void 0:l.requestsBaseUrl)==null?void 0:A.call(l))??""});const g=n.computed(()=>u.analytics&&u.percentiles),p=n.computed(()=>{const S=t.value.chart.type;return["golden_signals","gauge"].includes(S)?!1:S==="top_n"?e.value.editable||e.value.showTileActions:!0}),_=n.computed(()=>r.value&&t.value.query&&!f.value&&t.value.query.datasource!=="llm_usage"&&!L.isPlatformDatasource(t.value.query.datasource)&&g.value&&!c.value),y=n.computed(()=>s.value&&t.value.query&&ui(t.value.query.datasource)&&g.value&&!c.value),R=n.computed(()=>i.value?L.msToGranularity(i.value.meta.granularity_ms):void 0),C=n.computed(()=>{var z;const S=t.value,A=[...e.value.filters,...S.query.filters??[]],U="metrics"in S.query?S.query.metrics:void 0,D=((z=S.query)==null?void 0:z.datasource)??"api_usage";return h.value({datasource:D,filters:A,queryFields:U})}),b=n.computed(()=>{if(!y.value||!p.value)return"";const S=t.value;if(X(S))return le({...S.query,filters:C.value});const A=S.query.time_range||e.value.timeSpec,U=$(A,C.value);return le(U)}),O=n.computed(()=>{if(!_.value||!p.value)return"";const S=C.value,A=t.value;if(X(A))return"";const U=j(A.query.time_range||e.value.timeSpec,S);return H(U)}),H=S=>_.value?`${r.value}?q=${JSON.stringify(S)}`:"",j=(S,A)=>{var z,M,q,W;const U=(M=(z=i.value)==null?void 0:z.meta)!=null&&M.start?new Date(i.value.meta.start):void 0,D=(W=(q=i.value)==null?void 0:q.meta)!=null&&W.end?new Date(i.value.meta.end):void 0;return{filter:A,timeframe:{timePeriodsKey:S.type==="relative"?S.time_range:"custom",start:S.type==="absolute"?U:void 0,end:S.type==="absolute"?D:void 0}}},Q=(S,A)=>({filter:A,timeframe:{timePeriodsKey:S.type==="relative"?S.time_range:"custom",start:S.type==="absolute"?S.start:void 0,end:S.type==="absolute"?S.end:void 0}}),$=(S,A)=>{const U=t.value;if(X(U))throw new Error("Cannot build a chart explore query for table chart definitions");const D=[...U.query.dimensions??[]],z=[...U.query.metrics??[]];return{filters:A,metrics:z,dimensions:D,time_range:S,granularity:U.query.granularity||R.value||void 0}},le=S=>{if(!y.value)return"";const A=t.value.query.datasource&&t.value.query.datasource!=="basic"?t.value.query.datasource:"api_usage";return`${s.value}?q=${JSON.stringify(S)}&d=${A}&c=${t.value.chart.type}`};return n.watch([_,y],([S,A])=>{S&&(a.value={href:""}),A&&(o.value={href:""})}),{exploreLinkKebabMenu:b,requestsLinkKebabMenu:O,canShowKebabMenu:p,canGenerateRequestsLink:_,canGenerateExploreLink:y,requestsLinkZoomActions:a,exploreLinkZoomActions:o,buildExploreQuery:$,buildRequestsQueryZoomActions:Q,buildExploreLink:le,buildRequestLink:H}}function mi(){const l=n.inject(re),e=de.useDatasourceConfigStore(),{stripUnknownFilters:t}=xe(e);let i=null;return n.onUnmounted(()=>{i==null||i.abort()}),{issueQuery:async(r,a,o)=>{if(!l)throw new Error("Query bridge is not defined");i==null||i.abort();const u=new AbortController;i=u,await e.isReady();const{datasource:d,limit:h,...c}=r,f=d||"basic",g=t.value({datasource:f,filters:[...r.filters??[],...a.filters],queryFields:r.metrics});let p=r.time_range;p?p.tz||(p={...p,tz:a.tz}):p={...a.timeSpec,tz:a.tz};const _={datasource:f,query:{...c,time_range:p,filters:g,limit:o??h}};return l.queryFn(_,u)}}}function gi({context:l,globalFilters:e=n.ref([]),isFullscreen:t=n.ref(!1),preview:i=n.ref(!1)}){const s=de.useAnalyticsConfigStore(),r=de.useDatasourceConfigStore(),{loading:a}=xe(s),{loading:o}=xe(r),u=n.computed(()=>l.value.timeSpec?l.value.timeSpec:{type:"relative",time_range:s.defaultQueryTimeForOrg}),d=n.computed(()=>{var R,C,b;let{tz:c,refreshInterval:f,editable:g,showTileActions:p}=l.value;const _=[...l.value.filters??[],...e.value];if(c||(c=new Intl.DateTimeFormat().resolvedOptions().timeZone),f===void 0&&(f=lt),t.value){let O=!1;if(u.value.type==="relative")O=["15m","1h","6h","12h","24h"].includes(u.value.time_range);else{const Q=u.value.start.getTime(),$=u.value.end.getTime();O=Math.abs($-Q)<=864e5}const H=new Date().getTime();u.value.type==="absolute"&&u.value.end.getTime()<H||u.value.type==="relative"&&["previous_week","previous_month"].includes(u.value.time_range)?f=0:O?f=ct:f=dt}(g===void 0||i.value)&&(g=!1),p===void 0&&(p=!0);const y=!i.value&&!!((b=(C=(R=n.getCurrentInstance())==null?void 0:R.vnode)==null?void 0:C.props)!=null&&b.onTileTimeRangeZoom);return{filters:_,tz:c,timeSpec:u.value,refreshInterval:f,editable:g,showTileActions:p&&!i.value,showTileZoomActions:!i.value,zoomable:y}}),h=n.computed(()=>!!l.value.timeSpec||!a.value&&!o.value);return{internalContext:d,queryReady:h}}const Z={useContextLinks:fi,useDashboardInternalContext:gi,useEvaluateFeatureFlag:ei,useI18n:Jt,useIssueQuery:mi,useRequestQueue:ci},Oe=n.defineComponent({__name:"QueryDataProvider",props:{context:{},limitOverride:{},query:{},queryReady:{type:Boolean},refreshCounter:{}},emits:["chart-data","query-complete"],setup(l,{emit:e}){const t=l,i=e,{i18n:s}=Z.useI18n(),{issueQuery:r}=Z.useIssueQuery(),a=n.inject(re),o=()=>t.queryReady&&a?JSON.stringify([t.query,t.context,t.refreshCounter]):null,{data:u,error:d,isValidating:h}=Qt(o,async()=>{const C=o();try{const b=await r(t.query,t.context,t.limitOverride);return o()!==C?void 0:(g.value=null,b)}catch(b){if(o()!==C)return;throw g.value=se.handleQueryError(b),b}finally{o()===C&&i("query-complete")}},{refreshInterval:t.context.refreshInterval,revalidateOnFocus:!1,shouldRetryOnError:!1}),{state:c,swrvState:f}=Xt(u,d,h),g=n.ref(null),p=n.computed(()=>c.value===f.ERROR||!!g.value),_=n.computed(()=>!t.queryReady||c.value===f.PENDING),y=n.ref(),R=n.computed(()=>u.value??(t.queryReady&&c.value===f.PENDING?y.value:void 0));return n.watch([()=>u.value,()=>c.value],([C,b])=>{C&&(b==="SUCCESS_HAS_DATA"||b==="SUCCESS")&&C!==y.value&&(y.value=C,i("chart-data",C))}),(C,b)=>{var j;const O=n.resolveComponent("KSkeleton"),H=n.resolveComponent("KEmptyState");return(_.value||!n.unref(u)&&!p.value)&&!R.value?(n.openBlock(),n.createBlock(O,{key:0,class:"chart-skeleton",type:"table"})):p.value&&!_.value?(n.openBlock(),n.createBlock(H,{key:1,"action-button-visible":!1,"data-testid":"chart-empty-state"},n.createSlots({icon:n.withCtx(()=>{var Q;return[((Q=g.value)==null?void 0:Q.type)==="forbidden"?(n.openBlock(),n.createBlock(n.unref(fe.VisibilityOffIcon),{key:0})):(n.openBlock(),n.createBlock(n.unref(fe.WarningOutlineIcon),{key:1}))]}),title:n.withCtx(()=>{var Q;return[n.createElementVNode("p",null,n.toDisplayString(((Q=g.value)==null?void 0:Q.message)||n.unref(s).t("renderer.unexpectedError")),1)]}),_:2},[(j=g.value)!=null&&j.details?{name:"default",fn:n.withCtx(()=>[n.createElementVNode("p",null,n.toDisplayString(g.value.details),1)]),key:"0"}:void 0]),1024)):R.value?n.renderSlot(C.$slots,"default",{key:2,data:R.value}):n.createCommentVNode("",!0)}}}),pi=n.defineComponent({__name:"SimpleChartRenderer",props:{query:{},context:{},queryReady:{type:Boolean},chartOptions:{},height:{},refreshCounter:{},requestsLink:{},exploreLink:{}},setup(l){const e=l,t=n.computed(()=>e.chartOptions.type==="single_value");return(i,s)=>(n.openBlock(),n.createBlock(Oe,{context:l.context,query:l.query,"query-ready":l.queryReady,"refresh-counter":l.refreshCounter},{default:n.withCtx(({data:r})=>[n.createElementVNode("div",{class:n.normalizeClass(["analytics-chart",{"single-value":t.value}]),style:n.normalizeStyle(t.value?void 0:{height:`${l.height}px`})},[n.createVNode(n.unref(se.SimpleChart),{"chart-data":r,"chart-options":l.chartOptions,"synthetics-data-key":t.value?void 0:l.chartOptions.synthetics_data_key},null,8,["chart-data","chart-options","synthetics-data-key"])],6)]),_:1},8,["context","query","query-ready","refresh-counter"]))}}),he=(l,e)=>{const t=l.__vccOpts||l;for(const[i,s]of e)t[i]=s;return t},_t=he(pi,[["__scopeId","data-v-2cbfac70"]]),yi={class:"analytics-chart"},je=he(n.defineComponent({__name:"BaseAnalyticsChartRenderer",props:{query:{},context:{},queryReady:{type:Boolean},chartOptions:{},height:{},refreshCounter:{},requestsLink:{},exploreLink:{},extraProps:{}},emits:["edit-tile","chart-data","zoom-time-range","view-requests","select-chart-range"],setup(l,{emit:e}){const t=l,i=e,{i18n:s}=Z.useI18n(),r=n.computed(()=>({type:t.chartOptions.type,stacked:t.chartOptions.stacked??!1,chartDatasetColors:t.chartOptions.chart_dataset_colors,threshold:t.chartOptions.threshold,hideTruncationWarning:t.query.limit!==void 0&&t.query.limit>0})),a=n.computed(()=>t.context.zoomable),o=()=>{i("edit-tile")},u=d=>{i("chart-data",d)};return(d,h)=>{const c=n.resolveComponent("KDropdownItem");return n.openBlock(),n.createBlock(Oe,{context:l.context,query:l.query,"query-ready":l.queryReady,"refresh-counter":l.refreshCounter,onChartData:u},{default:n.withCtx(({data:f})=>[n.createElementVNode("div",yi,[n.createVNode(n.unref(se.AnalyticsChart),n.mergeProps({"chart-data":f,"chart-options":r.value,"explore-link":l.exploreLink,"legend-position":"bottom","requests-link":l.requestsLink,"synthetics-data-key":l.chartOptions.synthetics_data_key,"timeseries-zoom":a.value,"tooltip-title":""},l.extraProps,{onSelectChartRange:h[0]||(h[0]=g=>i("select-chart-range",g)),onZoomTimeRange:h[1]||(h[1]=g=>i("zoom-time-range",g))}),n.createSlots({_:2},[l.context.editable?{name:"menu-items",fn:n.withCtx(()=>[n.createVNode(c,{onClick:o},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(s).t("renderer.edit")),1)]),_:1})]),key:"0"}:void 0]),1040,["chart-data","chart-options","explore-link","requests-link","synthetics-data-key","timeseries-zoom"])])]),_:1},8,["context","query","query-ready","refresh-counter"])}}}),[["__scopeId","data-v-e1e7f610"]]),bt=n.defineComponent({__name:"BarChartRenderer",props:{query:{},context:{},queryReady:{type:Boolean},chartOptions:{},height:{},refreshCounter:{},requestsLink:{},exploreLink:{}},setup(l){return(e,t)=>(n.openBlock(),n.createBlock(je,{"chart-options":l.chartOptions,context:l.context,"extra-props":{showAnnotations:!1},height:l.height,query:l.query,"query-ready":l.queryReady,"refresh-counter":l.refreshCounter},null,8,["chart-options","context","height","query","query-ready","refresh-counter"]))}}),vt=n.defineComponent({__name:"TimeseriesChartRenderer",props:{query:{},context:{},queryReady:{type:Boolean},chartOptions:{},height:{},refreshCounter:{},requestsLink:{},exploreLink:{}},emits:["zoom-time-range","select-chart-range"],setup(l,{emit:e}){const t=e;return(i,s)=>(n.openBlock(),n.createBlock(je,{"chart-options":l.chartOptions,context:l.context,"explore-link":l.exploreLink,height:l.height,query:l.query,"query-ready":l.queryReady,"refresh-counter":l.refreshCounter,"requests-link":l.requestsLink,onSelectChartRange:s[0]||(s[0]=r=>t("select-chart-range",r)),onZoomTimeRange:s[1]||(s[1]=r=>t("zoom-time-range",r))},null,8,["chart-options","context","explore-link","height","query","query-ready","refresh-counter","requests-link"]))}}),_i=he(n.defineComponent({__name:"GoldenSignalsRenderer",props:{query:{},context:{},queryReady:{type:Boolean},chartOptions:{},height:{},refreshCounter:{},requestsLink:{},exploreLink:{}},setup(l){const e=l,t=n.computed(()=>{var s,r;const i=(s=e.query)==null?void 0:s.datasource;if(i&&i!=="api_usage"&&i!=="basic")throw new Error(`Invalid datasource value: ${i}`);return{datasource:(r=e.query)==null?void 0:r.datasource,overrideTimeRange:e.context.timeSpec,additionalFilter:e.context.filters,longCardTitles:e.chartOptions.long_card_titles,percentileLatency:e.chartOptions.percentile_latency,refreshInterval:e.context.refreshInterval,queryReady:e.queryReady,refreshCounter:e.refreshCounter}});return(i,s)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["metric-card-tile-wrapper",{titled:!!e.chartOptions.chart_title}])},[n.createVNode(n.unref(Le.MetricsProvider),n.normalizeProps(n.guardReactiveProps(t.value)),{default:n.withCtx(()=>[n.createVNode(n.unref(Le.MetricsConsumer))]),_:1},16)],2))}}),[["__scopeId","data-v-b77f52b8"]]),bi={class:"fallback-entity-link","data-testid":"entity-link-parent"},wt=n.defineComponent({__name:"FallbackEntityLink",props:{entityLinkData:{}},setup(l){return(e,t)=>(n.openBlock(),n.createElementBlock("div",bi,n.toDisplayString(l.entityLinkData.label),1))}}),vi={key:0},wi={key:1},Ei=n.defineComponent({__name:"TopNTableRenderer",props:{query:{},context:{},queryReady:{type:Boolean},chartOptions:{},height:{},refreshCounter:{},requestsLink:{},exploreLink:{}},setup(l){const e=l,t=n.inject(re),i=n.defineAsyncComponent(async()=>{if(t!=null&&t.fetchComponent)try{return await t.fetchComponent("EntityLink")}catch{return wt}return wt}),s=n.computed(()=>!!e.chartOptions.entity_link||!!Object.keys(e.chartOptions.entity_links||{}).length),r=d=>{var c;const h=e.chartOptions.entity_links;return h&&(h[d]||((c=Object.entries(h).find(([f])=>f.toLowerCase()===d.toLowerCase()))==null?void 0:c[1]))||""},a=d=>{var c,f;const h=(f=(c=d.dimensions)==null?void 0:c[0])==null?void 0:f.dimension;return!h||h===d.dimension},o=d=>r(d.dimension)||a(d)&&e.chartOptions.entity_link||"",u=d=>{const h=o(d);if(h)if(d.id.includes(":")){const[c,f]=d.id.split(":");return h.replace(ot,c).replace(Ke,f)}else return h.replace(Ke,d.id);return""};return(d,h)=>(n.openBlock(),n.createBlock(Oe,{context:l.context,query:l.query,"query-ready":l.queryReady,"refresh-counter":l.refreshCounter},{default:n.withCtx(({data:c})=>[n.createVNode(n.unref(se.TopNTable),{data:c,"synthetics-data-key":l.chartOptions.synthetics_data_key},n.createSlots({_:2},[s.value?{name:"name",fn:n.withCtx(({record:f})=>[!f.isEmpty&&o(f)?(n.openBlock(),n.createBlock(n.unref(i),{key:0,"entity-link-data":{id:f.id,label:f.name,deleted:f.deleted},"external-link":u(f)},null,8,["entity-link-data","external-link"])):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[f.name==="empty"?(n.openBlock(),n.createElementBlock("i",vi,n.toDisplayString(f.name),1)):(n.openBlock(),n.createElementBlock("span",wi,n.toDisplayString(f.name),1))],64))]),key:"0"}:void 0]),1032,["data","synthetics-data-key"])]),_:1},8,["context","query","query-ready","refresh-counter"]))}}),xi=l=>l.records.map(e=>{const t={...e};return Object.entries(e).forEach(([i,s])=>{var a,o,u;if(s===null)return;const r=(u=(o=(a=l.meta.display)==null?void 0:a[i])==null?void 0:o[String(s)])==null?void 0:u.name;r&&(t[i]=r)}),t}),Et=({canTranslate:l,columns:e,translate:t})=>e.map(i=>{const s=`chartLabels.${i}`;return{key:i,label:l(s)?t(s):i}}),Ci={platform:Et,platform_usage:Et},xt=async({abortController:l,context:e,cursor:t,pageSize:i,query:s,onResponseColumns:r,stripUnknownFilters:a,tabularQueryFn:o})=>{var c;if(!o)throw new Error("AnalyticsBridge.tabularQueryFn is not defined");const u=s.query,d=a({datasource:s.datasource,filters:[...u.filters??[],...e.filters],queryFields:u.entity===void 0?void 0:[u.entity]}),h=await o({datasource:s.datasource,query:{columns:u.columns,cursor:t===void 0?u.cursor:String(t),entity:u.entity,filters:d,page_size:i}},l);return(c=h.meta.columns)!=null&&c.length&&(r==null||r(h.meta.columns)),{data:xi(h),cursor:h.meta.cursor,hasMore:!!h.meta.cursor}},ki={platform:xt,platform_usage:xt},Ri=he(n.defineComponent({__name:"TableDataGridRenderer",props:{query:{},context:{},queryReady:{type:Boolean},height:{},refreshCounter:{}},emits:["loading-change"],setup(l,{emit:e}){const t=l,i=e,s=n.inject(re),r=de.useDatasourceConfigStore(),{i18n:a}=Z.useI18n(),o=new AbortController,u=n.ref([]),d=n.ref(!1),h=n.computed(()=>t.height===void 0?void 0:{height:`${t.height}px`}),c=n.computed(()=>({datasource:t.query.datasource,query:{columns:t.query.columns,cursor:t.query.cursor,entity:t.query.entity,filters:t.query.filters,page_size:t.query.page_size}})),f=n.computed(()=>JSON.stringify({refreshCounter:t.refreshCounter,query:{columns:t.query.columns,datasource:t.query.datasource,entity:t.query.entity,filters:t.query.filters,page_size:t.query.page_size},context:{filters:t.context.filters,timeSpec:t.context.timeSpec,tz:t.context.tz}}));n.onUnmounted(()=>{o.abort()});const g=n.computed(()=>{var y;return Ci[t.query.datasource]({columns:(y=t.query.columns)!=null&&y.length?t.query.columns:u.value,translate:R=>a.t(R),canTranslate:R=>a.te(R)})}),p=n.computed(()=>async({cursor:y,pageSize:R})=>{try{await r.isReady();const C=ki[c.value.datasource];if(!C)throw new Error(`No table data grid fetcher found for datasource: ${c.value.datasource}`);const b=await C({abortController:o,context:t.context,cursor:y,pageSize:R,query:c.value,onResponseColumns:O=>{u.value=O},stripUnknownFilters:r.stripUnknownFilters,tabularQueryFn:s==null?void 0:s.tabularQueryFn});return d.value=!1,b}catch(C){throw d.value=!0,C}}),_=y=>{y.state==="error"&&(d.value=!0),i("loading-change",y.state==="loading")};return(y,R)=>{const C=n.resolveComponent("KSkeleton");return n.openBlock(),n.createElementBlock("div",{class:"table-data-grid-renderer",style:n.normalizeStyle(h.value)},[l.queryReady?(n.openBlock(),n.createBlock(n.unref(jt.TableDataGrid),{key:1,error:d.value,fetcher:p.value,headers:g.value,"page-size":l.query.page_size,"refresh-key":f.value,onState:_},null,8,["error","fetcher","headers","page-size","refresh-key"])):(n.openBlock(),n.createBlock(C,{key:0,"data-testid":"table-skeleton",type:"table"}))],4)}}}),[["__scopeId","data-v-c49ff2eb"]]),Ct="#6c7489",Ti="12px",kt="20px",Rt="32px",Tt="20px",Si=n.defineComponent({__name:"DonutChartRenderer",props:{query:{},context:{},queryReady:{type:Boolean},chartOptions:{},height:{},refreshCounter:{},requestsLink:{},exploreLink:{}},setup(l){return(e,t)=>(n.openBlock(),n.createBlock(je,{"chart-options":l.chartOptions,context:l.context,height:l.height,query:l.query,"query-ready":l.queryReady,"refresh-counter":l.refreshCounter},null,8,["chart-options","context","height","query","query-ready","refresh-counter"]))}}),Di=["data-testid"],zi={key:0,class:"tile-header"},Ni={class:"badge-container"},Li={class:"badge-text"},Ai={key:0},Oi=["data-testid"],Hi=["data-testid"],qi={class:"delete-option"},Ii=["data-testid"],Mi=["data-testid"],St=he(n.defineComponent({__name:"DashboardTile",props:n.mergeModels({context:{},definition:{},height:{default:pe},isFullscreen:{type:Boolean},hideActions:{type:Boolean,default:!1},hideZoomActions:{type:Boolean,default:!1},queryReady:{type:Boolean},showRefresh:{type:Boolean,default:!1},tileId:{},tileType:{default:"chart"}},{refreshCounter:{default:0},refreshCounterModifiers:{}}),emits:n.mergeModels(["chart-data","edit-tile","duplicate-tile","remove-tile","tile-time-range-zoom","tile-bounds-change"],["update:refreshCounter"]),setup(l,{expose:e,emit:t}){n.useCssVars(x=>({v0e0bc7ee:`${x.height}px`}));const i=parseInt(Tt,10),s=l,r=n.useModel(l,"refreshCounter"),a=()=>{C.value=!0,r.value++},o=t,u=n.defineAsyncComponent(()=>Promise.resolve().then(()=>is)),d=n.inject(re),h=de.useDatasourceConfigStore(),{stripUnknownFilters:c}=xe(h),{i18n:f}=Z.useI18n(),g=n.ref(),p=n.ref({status:"loading"}),_=n.ref(!1),y=n.ref(),R=n.ref(!1),C=n.ref(!0),b=n.computed(()=>s.definition.chart),O=n.computed(()=>"chart_title"in b.value?b.value.chart_title:void 0),H=n.computed(()=>"description"in b.value?b.value.description:void 0),j=n.computed(()=>b.value.type==="slottable"),Q=n.computed(()=>X(s.definition)?!1:!("allow_csv_export"in b.value)||b.value.allow_csv_export!==!1),{exploreLinkKebabMenu:$,requestsLinkKebabMenu:le,canShowKebabMenu:S,canGenerateRequestsLink:A,canGenerateExploreLink:U,requestsLinkZoomActions:D,exploreLinkZoomActions:z,buildExploreQuery:M,buildExploreLink:q,buildRequestLink:W,buildRequestsQueryZoomActions:Xe}=Z.useContextLinks({queryBridge:d,chartData:n.readonly(g),definition:n.toRef(s,"definition"),context:n.readonly(n.toRef(s,"context"))}),{issueQuery:Ze}=Z.useIssueQuery();n.watch(()=>s.definition,async(x,T)=>{await n.nextTick(),y.value&&(R.value=y.value.scrollWidth>y.value.clientWidth);try{JSON.stringify(x==null?void 0:x.query)!==JSON.stringify(T==null?void 0:T.query)&&(C.value=!0)}catch{}},{immediate:!0,deep:!0});const Fe=n.computed(()=>f.t("csvExport.defaultFilename")),Ge=n.computed(()=>!!$.value||Q.value||s.context.editable),me=n.computed(()=>!s.hideActions&&S.value&&Ge.value),ss=n.computed(()=>me.value&&Ge.value&&!s.isFullscreen),rs=n.computed(()=>b.value.type==="golden_signals"&&!!H.value),ns={timeseries_line:vt,timeseries_bar:vt,horizontal_bar:bt,vertical_bar:bt,gauge:_t,donut:Si,golden_signals:_i,top_n:Ei,table:Ri,slottable:void 0,single_value:_t,choropleth_map:u},os=n.computed(()=>{var x,T,B,F;return{...(x=ge.value)!=null&&x.rendererEvents.supportsRequests?{"select-chart-range":vs}:{},...(T=ge.value)!=null&&T.rendererEvents.supportsZoom?{"zoom-time-range":_s}:{},...(B=ge.value)!=null&&B.rendererEvents.supportsBounds?{"bounds-change":bs}:{},...(F=ge.value)!=null&&F.rendererEvents.supportsLoadingChange?{"loading-change":gs}:{}}}),ge=n.computed(()=>{var It,Mt,Bt;const x=s.definition,T=ns[x.chart.type],B=X(x),F=!!((It=T==null?void 0:T.emits)!=null&&It.includes("select-chart-range")),ze=!!((Mt=T==null?void 0:T.emits)!=null&&Mt.includes("zoom-time-range")),ce=x.chart.type==="choropleth_map",Ee=!!((Bt=T==null?void 0:T.emits)!=null&&Bt.includes("loading-change")),ws={query:x.query,context:s.context,queryReady:s.queryReady,height:s.height-i*2,refreshCounter:r.value},Es={chartOptions:x.chart,requestsLink:s.hideZoomActions?void 0:D.value,exploreLink:s.hideZoomActions?void 0:z.value};return T&&{component:T,rendererProps:{...ws,...B?{}:Es},rendererEvents:{supportsRequests:F,supportsZoom:ze,supportsBounds:ce,supportsLoadingChange:Ee}}}),Je=n.computed(()=>{var B;if(X(s.definition))return null;const x=s.definition.query,T=x==null?void 0:x.time_range;if(L.isPlatformDatasource(x==null?void 0:x.datasource)&&!((B=x.dimensions)!=null&&B.includes("time")))return f.t("renderer.as_of_today");if((T==null?void 0:T.type)==="relative"){const F=L.TimePeriods.get(L.TIMEFRAME_LOOKUP[T.time_range]);return F?F.display:(console.warn("Did not recognize the given relative time range:",T.time_range),T.time_range)}else if((T==null?void 0:T.type)==="absolute"){const F=T.tz||"Etc/UTC";return`${L.formatTime(T.start,{short:!0,tz:F})} - ${L.formatTime(T.end,{short:!0,tz:F})}`}return null}),At=n.computed(()=>j.value?!1:[!!O.value,ss.value,!!Je.value,rs.value,s.showRefresh].some(Boolean)),Ot=n.computed(()=>g.value?L.msToGranularity(g.value.meta.granularity_ms):void 0),as=n.computed(()=>["timeseries_line","timeseries_bar"].includes(b.value.type)),Ht=n.computed(()=>{if(X(s.definition)||!as.value||!s.queryReady||C.value)return!1;const x=s.definition.query.granularity;return!x||!Ot.value?!1:x!==Ot.value}),ls=n.computed(()=>{var B;const x=L.msToGranularity(((B=g.value)==null?void 0:B.meta.granularity_ms)??0)??"unknown",T=X(s.definition)?"unknown":s.definition.query.granularity??"unknown";return f.t("query_aged_out_warning",{currentGranularity:f.t(`granularities.${x}`),savedGranularity:f.t(`granularities.${T}`)})}),cs=n.computed(()=>{const x=s.definition,T=[...s.context.filters,...x.query.filters??[]],B="metrics"in x.query?x.query.metrics:void 0,F=x.query.datasource??"api_usage";return c.value({datasource:F,filters:T,queryFields:B})}),ds=()=>{o("edit-tile",s.definition)},hs=()=>{o("duplicate-tile",s.definition)},us=()=>{o("remove-tile",s.definition)},fs=x=>{g.value=x,C.value=!1,o("chart-data",x)},ms=()=>{C.value=!1},gs=x=>{C.value=x},ps=()=>{_.value=!1},qt=()=>{var B,F;const x=(B=s.definition.query.datasource)==null?void 0:B.startsWith("goap");return((F=d==null?void 0:d.staticConfig)==null?void 0:F.increaseCsvExportLimit)!==!1&&!x?Ze(s.definition.query,s.context,L.EXPORT_RECORD_LIMIT):g.value?Promise.resolve(g.value):new Promise(ze=>{const ce=n.watch(g,Ee=>{Ee&&(ze(Ee),ce())})})},ys=async()=>{_.value=!0,p.value={status:"loading"};try{const x=await qt();p.value={status:"success",chartData:x}}catch(x){p.value={status:"error",error:x}}},_s=x=>{const T={tileId:s.tileId.toString(),timeRange:x};o("tile-time-range-zoom",T)},bs=x=>{const T={tileId:s.tileId.toString(),bounds:x};o("tile-bounds-change",T)},vs=x=>{const T=cs.value,B=M(x,T);z.value=U.value?{href:q(B)}:void 0,D.value=A.value?{href:W(Xe(x,T))}:void 0};return e({getExportData:qt}),(x,T)=>{const B=n.resolveComponent("KTooltip"),F=n.resolveComponent("KBadge"),ze=n.resolveComponent("KButton"),ce=n.resolveComponent("KDropdownItem"),Ee=n.resolveComponent("KDropdown");return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["tile-boundary",{editable:l.context.editable,headless:!At.value}]),"data-testid":`tile-${l.tileId}`},[At.value&&!j.value?(n.openBlock(),n.createElementBlock("div",zi,[n.createVNode(B,{class:"title-tooltip",disabled:!R.value,"max-width":"500",text:O.value},{default:n.withCtx(()=>[n.createElementVNode("div",{ref_key:"titleRef",ref:y,class:"title"},n.toDisplayString(O.value),513)]),_:1},8,["disabled","text"]),n.createElementVNode("div",Ni,[Je.value?(n.openBlock(),n.createBlock(F,{key:0,"data-testid":"time-range-badge",tooltip:Ht.value?ls.value:void 0,"tooltip-attributes":{maxWidth:"320px"}},n.createSlots({default:n.withCtx(()=>[n.createElementVNode("span",Li,n.toDisplayString(Je.value),1)]),_:2},[Ht.value?{name:"icon",fn:n.withCtx(()=>[n.createVNode(n.unref(fe.WarningIcon),{size:`var(--kui-icon-size-20, ${n.unref(Ti)})`},null,8,["size"])]),key:"0"}:void 0]),1032,["tooltip"])):n.createCommentVNode("",!0)]),l.showRefresh?(n.openBlock(),n.createElementBlock("div",Ai,[n.createVNode(ze,{appearance:"secondary",class:"refresh-button","data-testid":`tile-refresh-button-${l.tileId}`,disabled:C.value,icon:"",size:"small",onClick:a},{default:n.withCtx(()=>[C.value?(n.openBlock(),n.createBlock(n.unref(fe.ProgressIcon),{key:0,role:"button",size:`var(--kui-icon-size-60, ${n.unref(Rt)})`,tabindex:"0"},null,8,["size"])):(n.openBlock(),n.createBlock(n.unref(fe.RefreshIcon),{key:1,role:"button",size:`var(--kui-icon-size-60, ${n.unref(Rt)})`,tabindex:"0"},null,8,["size"]))]),_:1},8,["data-testid","disabled"])])):n.createCommentVNode("",!0),me.value?(n.openBlock(),n.createElementBlock("div",{key:1,class:"tile-actions","data-testid":`tile-actions-${l.tileId}`},[me.value&&l.context.editable&&!l.isFullscreen?(n.openBlock(),n.createBlock(n.unref(fe.EditIcon),{key:0,class:"edit-icon",color:`var(--kui-color-text-neutral, ${n.unref(Ct)})`,"data-testid":`edit-tile-${l.tileId}`,size:`var(--kui-icon-size-40, ${n.unref(kt)})`,onClick:ds},null,8,["color","data-testid","size"])):n.createCommentVNode("",!0),me.value&&Ge.value&&!l.isFullscreen?(n.openBlock(),n.createBlock(Ee,{key:1,class:"dropdown","data-testid":`chart-action-menu-${l.tileId}`,"kpop-attributes":{placement:"bottom-end"}},{items:n.withCtx(()=>[n.unref($)?(n.openBlock(),n.createBlock(ce,{key:0,"data-testid":`chart-jump-to-explore-${l.tileId}`,item:{label:n.unref(f).t("jumpToExplore"),to:n.unref($)}},null,8,["data-testid","item"])):n.createCommentVNode("",!0),!n.unref(X)(l.definition)&&n.unref(le)?(n.openBlock(),n.createBlock(ce,{key:1,"data-testid":`chart-jump-to-requests-${l.tileId}`,item:{label:n.unref(f).t("jumpToRequests"),to:n.unref(le)}},null,8,["data-testid","item"])):n.createCommentVNode("",!0),Q.value?(n.openBlock(),n.createBlock(ce,{key:2,class:"chart-export-button","data-testid":`chart-csv-export-${l.tileId}`,onClick:ys},{default:n.withCtx(()=>[n.createElementVNode("span",{class:"chart-export-trigger","data-testid":`csv-export-button-${l.tileId}`},n.toDisplayString(n.unref(f).t("csvExport.exportAsCsv")),9,Hi)]),_:1},8,["data-testid"])):n.createCommentVNode("",!0),l.context.editable?(n.openBlock(),n.createBlock(ce,{key:3,"data-testid":`duplicate-tile-${l.tileId}`,onClick:hs},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(f).t("renderer.duplicateTile")),1)]),_:1},8,["data-testid"])):n.createCommentVNode("",!0),l.context.editable?(n.openBlock(),n.createBlock(ce,{key:4,"data-testid":`remove-tile-${l.tileId}`,onClick:us},{default:n.withCtx(()=>[n.createElementVNode("span",qi,n.toDisplayString(n.unref(f).t("renderer.delete")),1)]),_:1},8,["data-testid"])):n.createCommentVNode("",!0)]),default:n.withCtx(()=>[n.createVNode(n.unref(fe.MoreIcon),{class:"kebab-action-menu",color:`var(--kui-color-text-neutral, ${n.unref(Ct)})`,"data-testid":`kebab-action-menu-${l.tileId}`,size:`var(--kui-icon-size-40, ${n.unref(kt)})`},null,8,["color","data-testid","size"])]),_:1},8,["data-testid"])):n.createCommentVNode("",!0)],8,Oi)):H.value?(n.openBlock(),n.createElementBlock("div",{key:2,class:"header-description","data-testid":`tile-description-${l.tileId}`},n.toDisplayString(H.value),9,Ii)):n.createCommentVNode("",!0),_.value?(n.openBlock(),n.createBlock(n.unref(se.CsvExportModal),{key:3,"data-testid":`csv-export-modal-${l.tileId}`,"export-state":p.value,filename:Fe.value,onCloseModal:ps},null,8,["data-testid","export-state","filename"])):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0),n.createElementVNode("div",{class:n.normalizeClass(["tile-content",`type-${l.tileType}-${b.value.type}`]),"data-testid":`tile-content-${l.tileId}`},[ge.value?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(ge.value.component),n.mergeProps({key:0},ge.value.rendererProps,n.toHandlers(os.value),{onChartData:fs,onQueryComplete:ms}),null,16)):n.createCommentVNode("",!0)],10,Mi)],10,Di)}}}),[["__scopeId","data-v-11e7c65e"]]),Bi=(l,e)=>{let t=0;const i=new Map;e.forEach(r=>{const a=r.layout.position.row,o=i.get(a),u=r.layout.size.rows===1&&!!r.layout.size.fit_to_content;t=Math.max(t,a+r.layout.size.rows),o===void 0?i.set(a,u):i.set(a,o&&u)});const s=[];for(let r=0;r<t;r++)i.get(r)?s.push("auto"):s.push(`${l}px`);return s},Dt=he(n.defineComponent({__name:"GridLayout",props:{tileHeight:{type:Number,required:!1,default:()=>pe},columns:{type:Number,required:!1,default:()=>Ae},tiles:{type:Array,required:!0}},setup(l){n.useCssVars(o=>({v821fda82:e.columns,v0870d42d:r.value}));const e=l,t=n.ref(null),i=n.ref(0),s=new ResizeObserver(o=>{window.requestAnimationFrame(()=>{!Array.isArray(o)||!o.length||(i.value=o[0].contentRect.width)})});n.onMounted(()=>{t.value&&s.observe(t.value)}),n.onUnmounted(()=>{t.value&&s.unobserve(t.value)});const r=n.computed(()=>Bi(e.tileHeight,e.tiles).join(" ")),a=n.computed(()=>e.tiles.map((o,u)=>({key:`tile-${u}`,tile:o,style:{"grid-column-start":o.layout.position.col+1,"grid-column-end":o.layout.position.col+1+o.layout.size.cols,"grid-row-start":o.layout.position.row+1,"grid-row-end":o.layout.position.row+1+o.layout.size.rows}})));return(o,u)=>(n.openBlock(),n.createElementBlock("div",{ref_key:"gridContainer",ref:t,class:"kong-ui-public-grid-layout"},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(a.value,d=>(n.openBlock(),n.createElementBlock("div",{key:d.key,class:n.normalizeClass(["grid-cell",{"empty-cell":!d.tile}]),style:n.normalizeStyle(d.style)},[n.renderSlot(o.$slots,"tile",{style:n.normalizeStyle(d.style),tile:d.tile},void 0,!0)],6))),128))],512))}}),[["__scopeId","data-v-0271a8b9"]]);function Pi(l,e,t,i,s){const r=(...a)=>(console.warn("gridstack.js: Function `"+t+"` is deprecated in "+s+" and has been replaced with `"+i+"`. It will be **removed** in a future release"),e.apply(l,a));return r.prototype=e.prototype,r}class m{static getElements(e,t=document){if(typeof e=="string"){const i="getElementById"in t?t:void 0;if(i&&!isNaN(+e[0])){const r=i.getElementById(e);return r?[r]:[]}let s=t.querySelectorAll(e);return!s.length&&e[0]!=="."&&e[0]!=="#"&&(s=t.querySelectorAll("."+e),s.length||(s=t.querySelectorAll("#"+e))),Array.from(s)}return[e]}static getElement(e,t=document){if(typeof e=="string"){const i="getElementById"in t?t:void 0;if(!e.length)return null;if(i&&e[0]==="#")return i.getElementById(e.substring(1));if(e[0]==="#"||e[0]==="."||e[0]==="[")return t.querySelector(e);if(i&&!isNaN(+e[0]))return i.getElementById(e);let s=t.querySelector(e);return i&&!s&&(s=i.getElementById(e)),s||(s=t.querySelector("."+e)),s}return e}static lazyLoad(e){var t,i;return e.lazyLoad||((i=(t=e.grid)==null?void 0:t.opts)==null?void 0:i.lazyLoad)&&e.lazyLoad!==!1}static createDiv(e,t){const i=document.createElement("div");return e.forEach(s=>{s&&i.classList.add(s)}),t==null||t.appendChild(i),i}static shouldSizeToContent(e,t=!1){return(e==null?void 0:e.grid)&&(t?e.sizeToContent===!0||e.grid.opts.sizeToContent===!0&&e.sizeToContent===void 0:!!e.sizeToContent||e.grid.opts.sizeToContent&&e.sizeToContent!==!1)}static isIntercepted(e,t){return!(e.y>=t.y+t.h||e.y+e.h<=t.y||e.x+e.w<=t.x||e.x>=t.x+t.w)}static isTouching(e,t){return m.isIntercepted(e,{x:t.x-.5,y:t.y-.5,w:t.w+1,h:t.h+1})}static areaIntercept(e,t){const i=e.x>t.x?e.x:t.x,s=e.x+e.w<t.x+t.w?e.x+e.w:t.x+t.w;if(s<=i)return 0;const r=e.y>t.y?e.y:t.y,a=e.y+e.h<t.y+t.h?e.y+e.h:t.y+t.h;return a<=r?0:(s-i)*(a-r)}static area(e){return e.w*e.h}static sort(e,t=1){return e.sort((s,r)=>{const a=t*((s.y??1e4)-(r.y??1e4));return a===0?t*((s.x??1e4)-(r.x??1e4)):a})}static find(e,t){return t?e.find(i=>i.id===t):void 0}static createStylesheet(e,t,i){const s=document.createElement("style"),r=i==null?void 0:i.nonce;return r&&(s.nonce=r),s.setAttribute("type","text/css"),s.setAttribute("gs-style-id",e),s.styleSheet?s.styleSheet.cssText="":s.appendChild(document.createTextNode("")),t?t.insertBefore(s,t.firstChild):(t=document.getElementsByTagName("head")[0],t.appendChild(s)),s}static removeStylesheet(e,t){const s=(t||document).querySelector("STYLE[gs-style-id="+e+"]");s&&s.parentNode&&s.remove()}static addCSSRule(e,t,i){e.textContent+=`${t} { ${i} } `}static toBool(e){return typeof e=="boolean"?e:typeof e=="string"?(e=e.toLowerCase(),!(e===""||e==="no"||e==="false"||e==="0")):!!e}static toNumber(e){return e===null||e.length===0?void 0:Number(e)}static parseHeight(e){let t,i="px";if(typeof e=="string")if(e==="auto"||e==="")t=0;else{const s=e.match(/^(-[0-9]+\.[0-9]+|[0-9]*\.[0-9]+|-[0-9]+|[0-9]+)(px|em|rem|vh|vw|%|cm|mm)?$/);if(!s)throw new Error(`Invalid height val = ${e}`);i=s[2]||"px",t=parseFloat(s[1])}else t=e;return{h:t,unit:i}}static defaults(e,...t){return t.forEach(i=>{for(const s in i){if(!i.hasOwnProperty(s))return;e[s]===null||e[s]===void 0?e[s]=i[s]:typeof i[s]=="object"&&typeof e[s]=="object"&&this.defaults(e[s],i[s])}}),e}static same(e,t){if(typeof e!="object")return e==t;if(typeof e!=typeof t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const i in e)if(e[i]!==t[i])return!1;return!0}static copyPos(e,t,i=!1){return t.x!==void 0&&(e.x=t.x),t.y!==void 0&&(e.y=t.y),t.w!==void 0&&(e.w=t.w),t.h!==void 0&&(e.h=t.h),i&&(t.minW&&(e.minW=t.minW),t.minH&&(e.minH=t.minH),t.maxW&&(e.maxW=t.maxW),t.maxH&&(e.maxH=t.maxH)),e}static samePos(e,t){return e&&t&&e.x===t.x&&e.y===t.y&&(e.w||1)===(t.w||1)&&(e.h||1)===(t.h||1)}static sanitizeMinMax(e){e.minW||delete e.minW,e.minH||delete e.minH,e.maxW||delete e.maxW,e.maxH||delete e.maxH}static removeInternalAndSame(e,t){if(!(typeof e!="object"||typeof t!="object"))for(let i in e){const s=e[i],r=t[i];i[0]==="_"||s===r?delete e[i]:s&&typeof s=="object"&&r!==void 0&&(m.removeInternalAndSame(s,r),Object.keys(s).length||delete e[i])}}static removeInternalForSave(e,t=!0){for(let i in e)(i[0]==="_"||e[i]===null||e[i]===void 0)&&delete e[i];delete e.grid,t&&delete e.el,e.autoPosition||delete e.autoPosition,e.noResize||delete e.noResize,e.noMove||delete e.noMove,e.locked||delete e.locked,(e.w===1||e.w===e.minW)&&delete e.w,(e.h===1||e.h===e.minH)&&delete e.h}static throttle(e,t){let i=!1;return(...s)=>{i||(i=!0,setTimeout(()=>{e(...s),i=!1},t))}}static removePositioningStyles(e){const t=e.style;t.position&&t.removeProperty("position"),t.left&&t.removeProperty("left"),t.top&&t.removeProperty("top"),t.width&&t.removeProperty("width"),t.height&&t.removeProperty("height")}static getScrollElement(e){if(!e)return document.scrollingElement||document.documentElement;const t=getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowY)?e:this.getScrollElement(e.parentElement)}static updateScrollPosition(e,t,i){const s=e.getBoundingClientRect(),r=window.innerHeight||document.documentElement.clientHeight;if(s.top<0||s.bottom>r){const a=s.bottom-r,o=s.top,u=this.getScrollElement(e);if(u!==null){const d=u.scrollTop;s.top<0&&i<0?e.offsetHeight>r?u.scrollTop+=i:u.scrollTop+=Math.abs(o)>Math.abs(i)?i:o:i>0&&(e.offsetHeight>r?u.scrollTop+=i:u.scrollTop+=a>i?i:a),t.top+=u.scrollTop-d}}}static updateScrollResize(e,t,i){const s=this.getScrollElement(t),r=s.clientHeight,a=s===this.getScrollElement()?0:s.getBoundingClientRect().top,o=e.clientY-a,u=o<i,d=o>r-i;u?s.scrollBy({behavior:"smooth",top:o-i}):d&&s.scrollBy({behavior:"smooth",top:i-(r-o)})}static clone(e){return e==null||typeof e!="object"?e:e instanceof Array?[...e]:{...e}}static cloneDeep(e){const t=["parentGrid","el","grid","subGrid","engine"],i=m.clone(e);for(const s in i)i.hasOwnProperty(s)&&typeof i[s]=="object"&&s.substring(0,2)!=="__"&&!t.find(r=>r===s)&&(i[s]=m.cloneDeep(e[s]));return i}static cloneNode(e){const t=e.cloneNode(!0);return t.removeAttribute("id"),t}static appendTo(e,t){let i;typeof t=="string"?i=m.getElement(t):i=t,i&&i.appendChild(e)}static addElStyles(e,t){if(t instanceof Object)for(const i in t)t.hasOwnProperty(i)&&(Array.isArray(t[i])?t[i].forEach(s=>{e.style[i]=s}):e.style[i]=t[i])}static initEvent(e,t){const i={type:t.type},s={button:0,which:0,buttons:1,bubbles:!0,cancelable:!0,target:t.target?t.target:e.target};return["altKey","ctrlKey","metaKey","shiftKey"].forEach(r=>i[r]=e[r]),["pageX","pageY","clientX","clientY","screenX","screenY"].forEach(r=>i[r]=e[r]),{...i,...s}}static simulateMouseEvent(e,t,i){const s=e,r=new MouseEvent(t,{bubbles:!0,composed:!0,cancelable:!0,view:window,detail:1,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY,ctrlKey:s.ctrlKey??!1,altKey:s.altKey??!1,shiftKey:s.shiftKey??!1,metaKey:s.metaKey??!1,button:0,relatedTarget:e.target});(i||e.target).dispatchEvent(r)}static getValuesFromTransformedElement(e){const t=document.createElement("div");m.addElStyles(t,{opacity:"0",position:"fixed",top:"0px",left:"0px",width:"1px",height:"1px",zIndex:"-999999"}),e.appendChild(t);const i=t.getBoundingClientRect();return e.removeChild(t),t.remove(),{xScale:1/i.width,yScale:1/i.height,xOffset:i.left,yOffset:i.top}}static swap(e,t,i){if(!e)return;const s=e[t];e[t]=e[i],e[i]=s}static canBeRotated(e){var t;return!(!e||e.w===e.h||e.locked||e.noResize||(t=e.grid)!=null&&t.opts.disableResize||e.minW&&e.minW===e.maxW||e.minH&&e.minH===e.maxH)}}class ne{constructor(e={}){this.addedNodes=[],this.removedNodes=[],this.defaultColumn=12,this.column=e.column||this.defaultColumn,this.column>this.defaultColumn&&(this.defaultColumn=this.column),this.maxRow=e.maxRow,this._float=e.float,this.nodes=e.nodes||[],this.onChange=e.onChange}batchUpdate(e=!0,t=!0){return!!this.batchMode===e?this:(this.batchMode=e,e?(this._prevFloat=this._float,this._float=!0,this.cleanNodes(),this.saveInitial()):(this._float=this._prevFloat,delete this._prevFloat,t&&this._packNodes(),this._notify()),this)}_useEntireRowArea(e,t){return(!this.float||this.batchMode&&!this._prevFloat)&&!this._hasLocked&&(!e._moving||e._skipDown||t.y<=e.y)}_fixCollisions(e,t=e,i,s={}){if(this.sortNodes(-1),i=i||this.collide(e,t),!i)return!1;if(e._moving&&!s.nested&&!this.float&&this.swap(e,i))return!0;let r=t;!this._loading&&this._useEntireRowArea(e,t)&&(r={x:0,w:this.column,y:t.y,h:t.h},i=this.collide(e,r,s.skip));let a=!1;const o={nested:!0,pack:!1};let u=0;for(;i=i||this.collide(e,r,s.skip);){if(u++>this.nodes.length*2)throw new Error("Infinite collide check");let d;if(i.locked||this._loading||e._moving&&!e._skipDown&&t.y>e.y&&!this.float&&(!this.collide(i,{...i,y:e.y},e)||!this.collide(i,{...i,y:t.y-i.h},e))){e._skipDown=e._skipDown||t.y>e.y;const h={...t,y:i.y+i.h,...o};d=this._loading&&m.samePos(e,h)?!0:this.moveNode(e,h),(i.locked||this._loading)&&d?m.copyPos(t,e):!i.locked&&d&&s.pack&&(this._packNodes(),t.y=i.y+i.h,m.copyPos(e,t)),a=a||d}else d=this.moveNode(i,{...i,y:t.y+t.h,skip:e,...o});if(!d)return a;i=void 0}return a}collide(e,t=e,i){const s=e._id,r=i==null?void 0:i._id;return this.nodes.find(a=>a._id!==s&&a._id!==r&&m.isIntercepted(a,t))}collideAll(e,t=e,i){const s=e._id,r=i==null?void 0:i._id;return this.nodes.filter(a=>a._id!==s&&a._id!==r&&m.isIntercepted(a,t))}directionCollideCoverage(e,t,i){if(!t.rect||!e._rect)return;const s=e._rect,r={...t.rect};r.y>s.y?(r.h+=r.y-s.y,r.y=s.y):r.h+=s.y-r.y,r.x>s.x?(r.w+=r.x-s.x,r.x=s.x):r.w+=s.x-r.x;let a,o=.5;for(let u of i){if(u.locked||!u._rect)break;const d=u._rect;let h=Number.MAX_VALUE,c=Number.MAX_VALUE;s.y<d.y?h=(r.y+r.h-d.y)/d.h:s.y+s.h>d.y+d.h&&(h=(d.y+d.h-r.y)/d.h),s.x<d.x?c=(r.x+r.w-d.x)/d.w:s.x+s.w>d.x+d.w&&(c=(d.x+d.w-r.x)/d.w);const f=Math.min(c,h);f>o&&(o=f,a=u)}return t.collide=a,a}cacheRects(e,t,i,s,r,a){return this.nodes.forEach(o=>o._rect={y:o.y*t+i,x:o.x*e+a,w:o.w*e-a-s,h:o.h*t-i-r}),this}swap(e,t){if(!t||t.locked||!e||e.locked)return!1;function i(){const r=t.x,a=t.y;return t.x=e.x,t.y=e.y,e.h!=t.h?(e.x=r,e.y=t.y+t.h):e.w!=t.w?(e.x=t.x+t.w,e.y=a):(e.x=r,e.y=a),e._dirty=t._dirty=!0,!0}let s;if(e.w===t.w&&e.h===t.h&&(e.x===t.x||e.y===t.y)&&(s=m.isTouching(e,t)))return i();if(s!==!1){if(e.w===t.w&&e.x===t.x&&(s||(s=m.isTouching(e,t)))){if(t.y<e.y){const r=e;e=t,t=r}return i()}if(s!==!1){if(e.h===t.h&&e.y===t.y&&(s||(s=m.isTouching(e,t)))){if(t.x<e.x){const r=e;e=t,t=r}return i()}return!1}}}isAreaEmpty(e,t,i,s){const r={x:e||0,y:t||0,w:i||1,h:s||1};return!this.collide(r)}compact(e="compact",t=!0){if(this.nodes.length===0)return this;t&&this.sortNodes();const i=this.batchMode;i||this.batchUpdate();const s=this._inColumnResize;s||(this._inColumnResize=!0);const r=this.nodes;return this.nodes=[],r.forEach((a,o,u)=>{let d;a.locked||(a.autoPosition=!0,e==="list"&&o&&(d=u[o-1])),this.addNode(a,!1,d)}),s||delete this._inColumnResize,i||this.batchUpdate(!1),this}set float(e){this._float!==e&&(this._float=e||!1,e||this._packNodes()._notify())}get float(){return this._float||!1}sortNodes(e=1){return this.nodes=m.sort(this.nodes,e),this}_packNodes(){return this.batchMode?this:(this.sortNodes(),this.float?this.nodes.forEach(e=>{if(e._updating||e._orig===void 0||e.y===e._orig.y)return;let t=e.y;for(;t>e._orig.y;)--t,this.collide(e,{x:e.x,y:t,w:e.w,h:e.h})||(e._dirty=!0,e.y=t)}):this.nodes.forEach((e,t)=>{if(!e.locked)for(;e.y>0;){const i=t===0?0:e.y-1;if(!(t===0||!this.collide(e,{x:e.x,y:i,w:e.w,h:e.h})))break;e._dirty=e.y!==i,e.y=i}}),this)}prepareNode(e,t){e._id=e._id??ne._idSeq++;const i=e.id;if(i){let r=1;for(;this.nodes.find(a=>a.id===e.id&&a!==e);)e.id=i+"_"+r++}(e.x===void 0||e.y===void 0||e.x===null||e.y===null)&&(e.autoPosition=!0);const s={x:0,y:0,w:1,h:1};return m.defaults(e,s),e.autoPosition||delete e.autoPosition,e.noResize||delete e.noResize,e.noMove||delete e.noMove,m.sanitizeMinMax(e),typeof e.x=="string"&&(e.x=Number(e.x)),typeof e.y=="string"&&(e.y=Number(e.y)),typeof e.w=="string"&&(e.w=Number(e.w)),typeof e.h=="string"&&(e.h=Number(e.h)),isNaN(e.x)&&(e.x=s.x,e.autoPosition=!0),isNaN(e.y)&&(e.y=s.y,e.autoPosition=!0),isNaN(e.w)&&(e.w=s.w),isNaN(e.h)&&(e.h=s.h),this.nodeBoundFix(e,t),e}nodeBoundFix(e,t){const i=e._orig||m.copyPos({},e);if(e.maxW&&(e.w=Math.min(e.w||1,e.maxW)),e.maxH&&(e.h=Math.min(e.h||1,e.maxH)),e.minW&&(e.w=Math.max(e.w||1,e.minW)),e.minH&&(e.h=Math.max(e.h||1,e.minH)),(e.x||0)+(e.w||1)>this.column&&this.column<this.defaultColumn&&!this._inColumnResize&&!this.skipCacheUpdate&&e._id&&this.findCacheLayout(e,this.defaultColumn)===-1){const r={...e};r.autoPosition||r.x===void 0?(delete r.x,delete r.y):r.x=Math.min(this.defaultColumn-1,r.x),r.w=Math.min(this.defaultColumn,r.w||1),this.cacheOneLayout(r,this.defaultColumn)}return e.w>this.column?e.w=this.column:e.w<1&&(e.w=1),this.maxRow&&e.h>this.maxRow?e.h=this.maxRow:e.h<1&&(e.h=1),e.x<0&&(e.x=0),e.y<0&&(e.y=0),e.x+e.w>this.column&&(t?e.w=this.column-e.x:e.x=this.column-e.w),this.maxRow&&e.y+e.h>this.maxRow&&(t?e.h=this.maxRow-e.y:e.y=this.maxRow-e.h),m.samePos(e,i)||(e._dirty=!0),this}getDirtyNodes(e){return e?this.nodes.filter(t=>t._dirty&&!m.samePos(t,t._orig)):this.nodes.filter(t=>t._dirty)}_notify(e){if(this.batchMode||!this.onChange)return this;const t=(e||[]).concat(this.getDirtyNodes());return this.onChange(t),this}cleanNodes(){return this.batchMode?this:(this.nodes.forEach(e=>{delete e._dirty,delete e._lastTried}),this)}saveInitial(){return this.nodes.forEach(e=>{e._orig=m.copyPos({},e),delete e._dirty}),this._hasLocked=this.nodes.some(e=>e.locked),this}restoreInitial(){return this.nodes.forEach(e=>{!e._orig||m.samePos(e,e._orig)||(m.copyPos(e,e._orig),e._dirty=!0)}),this._notify(),this}findEmptyPosition(e,t=this.nodes,i=this.column,s){const r=s?s.y*i+(s.x+s.w):0;let a=!1;for(let o=r;!a;++o){const u=o%i,d=Math.floor(o/i);if(u+e.w>i)continue;const h={x:u,y:d,w:e.w,h:e.h};t.find(c=>m.isIntercepted(h,c))||((e.x!==u||e.y!==d)&&(e._dirty=!0),e.x=u,e.y=d,delete e.autoPosition,a=!0)}return a}addNode(e,t=!1,i){const s=this.nodes.find(a=>a._id===e._id);if(s)return s;this._inColumnResize?this.nodeBoundFix(e):this.prepareNode(e),delete e._temporaryRemoved,delete e._removeDOM;let r;return e.autoPosition&&this.findEmptyPosition(e,this.nodes,this.column,i)&&(delete e.autoPosition,r=!0),this.nodes.push(e),t&&this.addedNodes.push(e),r||this._fixCollisions(e),this.batchMode||this._packNodes()._notify(),e}removeNode(e,t=!0,i=!1){return this.nodes.find(s=>s._id===e._id)?(i&&this.removedNodes.push(e),t&&(e._removeDOM=!0),this.nodes=this.nodes.filter(s=>s._id!==e._id),e._isAboutToRemove||this._packNodes(),this._notify([e]),this):this}removeAll(e=!0,t=!0){if(delete this._layouts,!this.nodes.length)return this;e&&this.nodes.forEach(s=>s._removeDOM=!0);const i=this.nodes;return this.removedNodes=t?i:[],this.nodes=[],this._notify(i)}moveNodeCheck(e,t){if(!this.changedPosConstrain(e,t))return!1;if(t.pack=!0,!this.maxRow)return this.moveNode(e,t);let i;const s=new ne({column:this.column,float:this.float,nodes:this.nodes.map(a=>a._id===e._id?(i={...a},i):{...a})});if(!i)return!1;const r=s.moveNode(i,t)&&s.getRow()<=Math.max(this.getRow(),this.maxRow);if(!r&&!t.resizing&&t.collide){const a=t.collide.el.gridstackNode;if(this.swap(e,a))return this._notify(),!0}return r?(s.nodes.filter(a=>a._dirty).forEach(a=>{const o=this.nodes.find(u=>u._id===a._id);o&&(m.copyPos(o,a),o._dirty=!0)}),this._notify(),!0):!1}willItFit(e){if(delete e._willFitPos,!this.maxRow)return!0;const t=new ne({column:this.column,float:this.float,nodes:this.nodes.map(s=>({...s}))}),i={...e};return this.cleanupNode(i),delete i.el,delete i._id,delete i.content,delete i.grid,t.addNode(i),t.getRow()<=this.maxRow?(e._willFitPos=m.copyPos({},i),!0):!1}changedPosConstrain(e,t){return t.w=t.w||e.w,t.h=t.h||e.h,e.x!==t.x||e.y!==t.y?!0:(e.maxW&&(t.w=Math.min(t.w,e.maxW)),e.maxH&&(t.h=Math.min(t.h,e.maxH)),e.minW&&(t.w=Math.max(t.w,e.minW)),e.minH&&(t.h=Math.max(t.h,e.minH)),e.w!==t.w||e.h!==t.h)}moveNode(e,t){var d,h;if(!e||!t)return!1;let i;t.pack===void 0&&!this.batchMode&&(i=t.pack=!0),typeof t.x!="number"&&(t.x=e.x),typeof t.y!="number"&&(t.y=e.y),typeof t.w!="number"&&(t.w=e.w),typeof t.h!="number"&&(t.h=e.h);const s=e.w!==t.w||e.h!==t.h,r=m.copyPos({},e,!0);if(m.copyPos(r,t),this.nodeBoundFix(r,s),m.copyPos(t,r),!t.forceCollide&&m.samePos(e,t))return!1;const a=m.copyPos({},e),o=this.collideAll(e,r,t.skip);let u=!0;if(o.length){const c=e._moving&&!t.nested;let f=c?this.directionCollideCoverage(e,t,o):o[0];if(c&&f&&((h=(d=e.grid)==null?void 0:d.opts)!=null&&h.subGridDynamic)&&!e.grid._isTemp){const g=m.areaIntercept(t.rect,f._rect),p=m.area(t.rect),_=m.area(f._rect);g/(p<_?p:_)>.8&&(f.grid.makeSubGrid(f.el,void 0,e),f=void 0)}f?u=!this._fixCollisions(e,r,f,t):(u=!1,i&&delete t.pack)}return u&&!m.samePos(e,r)&&(e._dirty=!0,m.copyPos(e,r)),t.pack&&this._packNodes()._notify(),!m.samePos(e,a)}getRow(){return this.nodes.reduce((e,t)=>Math.max(e,t.y+t.h),0)}beginUpdate(e){return e._updating||(e._updating=!0,delete e._skipDown,this.batchMode||this.saveInitial()),this}endUpdate(){const e=this.nodes.find(t=>t._updating);return e&&(delete e._updating,delete e._skipDown),this}save(e=!0,t){var a;const i=(a=this._layouts)==null?void 0:a.length,s=i&&this.column!==i-1?this._layouts[i-1]:null,r=[];return this.sortNodes(),this.nodes.forEach(o=>{const u=s==null?void 0:s.find(h=>h._id===o._id),d={...o,...u||{}};m.removeInternalForSave(d,!e),t&&t(o,d),r.push(d)}),r}layoutsNodesChange(e){return!this._layouts||this._inColumnResize?this:(this._layouts.forEach((t,i)=>{if(!t||i===this.column)return this;if(i<this.column)this._layouts[i]=void 0;else{const s=i/this.column;e.forEach(r=>{if(!r._orig)return;const a=t.find(o=>o._id===r._id);a&&(a.y>=0&&r.y!==r._orig.y&&(a.y+=r.y-r._orig.y),r.x!==r._orig.x&&(a.x=Math.round(r.x*s)),r.w!==r._orig.w&&(a.w=Math.round(r.w*s)))})}}),this)}columnChanged(e,t,i="moveScale"){var o;if(!this.nodes.length||!t||e===t)return this;const s=i==="compact"||i==="list";s&&this.sortNodes(1),t<e&&this.cacheLayout(this.nodes,e),this.batchUpdate();let r=[],a=s?this.nodes:m.sort(this.nodes,-1);if(t>e&&this._layouts){const u=this._layouts[t]||[],d=this._layouts.length-1;!u.length&&e!==d&&((o=this._layouts[d])!=null&&o.length)&&(e=d,this._layouts[d].forEach(h=>{const c=a.find(f=>f._id===h._id);c&&(!s&&!h.autoPosition&&(c.x=h.x??c.x,c.y=h.y??c.y),c.w=h.w??c.w,(h.x==null||h.y===void 0)&&(c.autoPosition=!0))})),u.forEach(h=>{const c=a.findIndex(f=>f._id===h._id);if(c!==-1){const f=a[c];if(s){f.w=h.w;return}(h.autoPosition||isNaN(h.x)||isNaN(h.y))&&this.findEmptyPosition(h,r),h.autoPosition||(f.x=h.x??f.x,f.y=h.y??f.y,f.w=h.w??f.w,r.push(f)),a.splice(c,1)}})}if(s)this.compact(i,!1);else{if(a.length)if(typeof i=="function")i(t,e,r,a);else{const u=s||i==="none"?1:t/e,d=i==="move"||i==="moveScale",h=i==="scale"||i==="moveScale";a.forEach(c=>{c.x=t===1?0:d?Math.round(c.x*u):Math.min(c.x,t-1),c.w=t===1||e===1?1:h?Math.round(c.w*u)||1:Math.min(c.w,t),r.push(c)}),a=[]}r=m.sort(r,-1),this._inColumnResize=!0,this.nodes=[],r.forEach(u=>{this.addNode(u,!1),delete u._orig})}return this.nodes.forEach(u=>delete u._orig),this.batchUpdate(!1,!s),delete this._inColumnResize,this}cacheLayout(e,t,i=!1){const s=[];return e.forEach((r,a)=>{if(r._id===void 0){const o=r.id?this.nodes.find(u=>u.id===r.id):void 0;r._id=(o==null?void 0:o._id)??ne._idSeq++}s[a]={x:r.x,y:r.y,w:r.w,_id:r._id}}),this._layouts=i?[]:this._layouts||[],this._layouts[t]=s,this}cacheOneLayout(e,t){e._id=e._id??ne._idSeq++;const i={x:e.x,y:e.y,w:e.w,_id:e._id};(e.autoPosition||e.x===void 0)&&(delete i.x,delete i.y,e.autoPosition&&(i.autoPosition=!0)),this._layouts=this._layouts||[],this._layouts[t]=this._layouts[t]||[];const s=this.findCacheLayout(e,t);return s===-1?this._layouts[t].push(i):this._layouts[t][s]=i,this}findCacheLayout(e,t){var i,s;return((s=(i=this._layouts)==null?void 0:i[t])==null?void 0:s.findIndex(r=>r._id===e._id))??-1}removeNodeFromLayoutCache(e){if(this._layouts)for(let t=0;t<this._layouts.length;t++){const i=this.findCacheLayout(e,t);i!==-1&&this._layouts[t].splice(i,1)}}cleanupNode(e){for(const t in e)t[0]==="_"&&t!=="_id"&&delete e[t];return this}}ne._idSeq=0;const Y={alwaysShowResizeHandle:"mobile",animate:!0,auto:!0,cellHeight:"auto",cellHeightThrottle:100,cellHeightUnit:"px",column:12,draggable:{handle:".grid-stack-item-content",appendTo:"body",scroll:!0},handle:".grid-stack-item-content",itemClass:"grid-stack-item",margin:10,marginUnit:"px",maxRow:0,minRow:0,placeholderClass:"grid-stack-placeholder",placeholderText:"",removableOptions:{accept:"grid-stack-item",decline:"grid-stack-non-removable"},resizable:{handles:"se"},rtl:"auto"};class k{}const ie=typeof window<"u"&&typeof document<"u"&&("ontouchstart"in document||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0);class oe{}function He(l,e){l.touches.length>1||(l.cancelable&&l.preventDefault(),m.simulateMouseEvent(l.changedTouches[0],e))}function zt(l,e){l.cancelable&&l.preventDefault(),m.simulateMouseEvent(l,e)}function qe(l){oe.touchHandled||(oe.touchHandled=!0,He(l,"mousedown"))}function Ie(l){oe.touchHandled&&He(l,"mousemove")}function Me(l){if(!oe.touchHandled)return;oe.pointerLeaveTimeout&&(window.clearTimeout(oe.pointerLeaveTimeout),delete oe.pointerLeaveTimeout);const e=!!k.dragElement;He(l,"mouseup"),e||He(l,"click"),oe.touchHandled=!1}function Be(l){l.pointerType!=="mouse"&&l.target.releasePointerCapture(l.pointerId)}function Nt(l){k.dragElement&&l.pointerType!=="mouse"&&zt(l,"mouseenter")}function Lt(l){k.dragElement&&l.pointerType!=="mouse"&&(oe.pointerLeaveTimeout=window.setTimeout(()=>{delete oe.pointerLeaveTimeout,zt(l,"mouseleave")},10))}class Pe{constructor(e,t,i){this.host=e,this.dir=t,this.option=i,this.moving=!1,this._mouseDown=this._mouseDown.bind(this),this._mouseMove=this._mouseMove.bind(this),this._mouseUp=this._mouseUp.bind(this),this._keyEvent=this._keyEvent.bind(this),this._init()}_init(){const e=this.el=document.createElement("div");return e.classList.add("ui-resizable-handle"),e.classList.add(`${Pe.prefix}${this.dir}`),e.style.zIndex="100",e.style.userSelect="none",this.host.appendChild(this.el),this.el.addEventListener("mousedown",this._mouseDown),ie&&(this.el.addEventListener("touchstart",qe),this.el.addEventListener("pointerdown",Be)),this}destroy(){return this.moving&&this._mouseUp(this.mouseDownEvent),this.el.removeEventListener("mousedown",this._mouseDown),ie&&(this.el.removeEventListener("touchstart",qe),this.el.removeEventListener("pointerdown",Be)),this.host.removeChild(this.el),delete this.el,delete this.host,this}_mouseDown(e){this.mouseDownEvent=e,document.addEventListener("mousemove",this._mouseMove,{capture:!0,passive:!0}),document.addEventListener("mouseup",this._mouseUp,!0),ie&&(this.el.addEventListener("touchmove",Ie),this.el.addEventListener("touchend",Me)),e.stopPropagation(),e.preventDefault()}_mouseMove(e){const t=this.mouseDownEvent;this.moving?this._triggerEvent("move",e):Math.abs(e.x-t.x)+Math.abs(e.y-t.y)>2&&(this.moving=!0,this._triggerEvent("start",this.mouseDownEvent),this._triggerEvent("move",e),document.addEventListener("keydown",this._keyEvent)),e.stopPropagation()}_mouseUp(e){this.moving&&(this._triggerEvent("stop",e),document.removeEventListener("keydown",this._keyEvent)),document.removeEventListener("mousemove",this._mouseMove,!0),document.removeEventListener("mouseup",this._mouseUp,!0),ie&&(this.el.removeEventListener("touchmove",Ie),this.el.removeEventListener("touchend",Me)),delete this.moving,delete this.mouseDownEvent,e.stopPropagation(),e.preventDefault()}_keyEvent(e){var t,i;e.key==="Escape"&&((i=(t=this.host.gridstackNode)==null?void 0:t.grid)==null||i.engine.restoreInitial(),this._mouseUp(this.mouseDownEvent))}_triggerEvent(e,t){return this.option[e]&&this.option[e](t),this}}Pe.prefix="ui-resizable-";class Qe{constructor(){this._eventRegister={}}get disabled(){return this._disabled}on(e,t){this._eventRegister[e]=t}off(e){delete this._eventRegister[e]}enable(){this._disabled=!1}disable(){this._disabled=!0}destroy(){delete this._eventRegister}triggerEvent(e,t){if(!this.disabled&&this._eventRegister&&this._eventRegister[e])return this._eventRegister[e](t)}}class Ce extends Qe{constructor(e,t={}){super(),this.el=e,this.option=t,this.rectScale={x:1,y:1},this._ui=()=>{const s=this.el.parentElement.getBoundingClientRect(),r={width:this.originalRect.width,height:this.originalRect.height+this.scrolled,left:this.originalRect.left,top:this.originalRect.top-this.scrolled},a=this.temporalRect||r;return{position:{left:(a.left-s.left)*this.rectScale.x,top:(a.top-s.top)*this.rectScale.y},size:{width:a.width*this.rectScale.x,height:a.height*this.rectScale.y}}},this._mouseOver=this._mouseOver.bind(this),this._mouseOut=this._mouseOut.bind(this),this.enable(),this._setupAutoHide(this.option.autoHide),this._setupHandlers()}on(e,t){super.on(e,t)}off(e){super.off(e)}enable(){super.enable(),this.el.classList.remove("ui-resizable-disabled"),this._setupAutoHide(this.option.autoHide)}disable(){super.disable(),this.el.classList.add("ui-resizable-disabled"),this._setupAutoHide(!1)}destroy(){this._removeHandlers(),this._setupAutoHide(!1),delete this.el,super.destroy()}updateOption(e){const t=e.handles&&e.handles!==this.option.handles,i=e.autoHide&&e.autoHide!==this.option.autoHide;return Object.keys(e).forEach(s=>this.option[s]=e[s]),t&&(this._removeHandlers(),this._setupHandlers()),i&&this._setupAutoHide(this.option.autoHide),this}_setupAutoHide(e){return e?(this.el.classList.add("ui-resizable-autohide"),this.el.addEventListener("mouseover",this._mouseOver),this.el.addEventListener("mouseout",this._mouseOut)):(this.el.classList.remove("ui-resizable-autohide"),this.el.removeEventListener("mouseover",this._mouseOver),this.el.removeEventListener("mouseout",this._mouseOut),k.overResizeElement===this&&delete k.overResizeElement),this}_mouseOver(e){k.overResizeElement||k.dragElement||(k.overResizeElement=this,this.el.classList.remove("ui-resizable-autohide"))}_mouseOut(e){k.overResizeElement===this&&(delete k.overResizeElement,this.el.classList.add("ui-resizable-autohide"))}_setupHandlers(){return this.handlers=this.option.handles.split(",").map(e=>e.trim()).map(e=>new Pe(this.el,e,{start:t=>{this._resizeStart(t)},stop:t=>{this._resizeStop(t)},move:t=>{this._resizing(t,e)}})),this}_resizeStart(e){this.sizeToContent=m.shouldSizeToContent(this.el.gridstackNode,!0),this.originalRect=this.el.getBoundingClientRect(),this.scrollEl=m.getScrollElement(this.el),this.scrollY=this.scrollEl.scrollTop,this.scrolled=0,this.startEvent=e,this._setupHelper(),this._applyChange();const t=m.initEvent(e,{type:"resizestart",target:this.el});return this.option.start&&this.option.start(t,this._ui()),this.el.classList.add("ui-resizable-resizing"),this.triggerEvent("resizestart",t),this}_resizing(e,t){this.scrolled=this.scrollEl.scrollTop-this.scrollY,this.temporalRect=this._getChange(e,t),this._applyChange();const i=m.initEvent(e,{type:"resize",target:this.el});return this.option.resize&&this.option.resize(i,this._ui()),this.triggerEvent("resize",i),this}_resizeStop(e){const t=m.initEvent(e,{type:"resizestop",target:this.el});return this.option.stop&&this.option.stop(t),this.el.classList.remove("ui-resizable-resizing"),this.triggerEvent("resizestop",t),this._cleanHelper(),delete this.startEvent,delete this.originalRect,delete this.temporalRect,delete this.scrollY,delete this.scrolled,this}_setupHelper(){this.elOriginStyleVal=Ce._originStyleProp.map(i=>this.el.style[i]),this.parentOriginStylePosition=this.el.parentElement.style.position;const e=this.el.parentElement,t=m.getValuesFromTransformedElement(e);return this.rectScale={x:t.xScale,y:t.yScale},getComputedStyle(this.el.parentElement).position.match(/static/)&&(this.el.parentElement.style.position="relative"),this.el.style.position="absolute",this.el.style.opacity="0.8",this}_cleanHelper(){return Ce._originStyleProp.forEach((e,t)=>{this.el.style[e]=this.elOriginStyleVal[t]||null}),this.el.parentElement.style.position=this.parentOriginStylePosition||null,this}_getChange(e,t){const i=this.startEvent,s={width:this.originalRect.width,height:this.originalRect.height+this.scrolled,left:this.originalRect.left,top:this.originalRect.top-this.scrolled},r=e.clientX-i.clientX,a=this.sizeToContent?0:e.clientY-i.clientY;let o,u;t.indexOf("e")>-1?s.width+=r:t.indexOf("w")>-1&&(s.width-=r,s.left+=r,o=!0),t.indexOf("s")>-1?s.height+=a:t.indexOf("n")>-1&&(s.height-=a,s.top+=a,u=!0);const d=this._constrainSize(s.width,s.height,o,u);return Math.round(s.width)!==Math.round(d.width)&&(t.indexOf("w")>-1&&(s.left+=s.width-d.width),s.width=d.width),Math.round(s.height)!==Math.round(d.height)&&(t.indexOf("n")>-1&&(s.top+=s.height-d.height),s.height=d.height),s}_constrainSize(e,t,i,s){const r=this.option,a=(i?r.maxWidthMoveLeft:r.maxWidth)||Number.MAX_SAFE_INTEGER,o=r.minWidth/this.rectScale.x||e,u=(s?r.maxHeightMoveUp:r.maxHeight)||Number.MAX_SAFE_INTEGER,d=r.minHeight/this.rectScale.y||t,h=Math.min(a,Math.max(o,e)),c=Math.min(u,Math.max(d,t));return{width:h,height:c}}_applyChange(){let e={left:0,top:0,width:0,height:0};if(this.el.style.position==="absolute"){const t=this.el.parentElement,{left:i,top:s}=t.getBoundingClientRect();e={left:i,top:s,width:0,height:0}}return this.temporalRect?(Object.keys(this.temporalRect).forEach(t=>{const i=this.temporalRect[t],s=t==="width"||t==="left"?this.rectScale.x:t==="height"||t==="top"?this.rectScale.y:1;this.el.style[t]=(i-e[t])*s+"px"}),this):this}_removeHandlers(){return this.handlers.forEach(e=>e.destroy()),delete this.handlers,this}}Ce._originStyleProp=["width","height","position","left","top","opacity","zIndex"];const $i='input,textarea,button,select,option,[contenteditable="true"],.ui-resizable-handle';class ke extends Qe{constructor(e,t={}){var r;super(),this.el=e,this.option=t,this.dragTransform={xScale:1,yScale:1,xOffset:0,yOffset:0};const i=(r=t==null?void 0:t.handle)==null?void 0:r.substring(1),s=e.gridstackNode;this.dragEls=!i||e.classList.contains(i)?[e]:s!=null&&s.subGrid?[e.querySelector(t.handle)||e]:Array.from(e.querySelectorAll(t.handle)),this.dragEls.length===0&&(this.dragEls=[e]),this._mouseDown=this._mouseDown.bind(this),this._mouseMove=this._mouseMove.bind(this),this._mouseUp=this._mouseUp.bind(this),this._keyEvent=this._keyEvent.bind(this),this.enable()}on(e,t){super.on(e,t)}off(e){super.off(e)}enable(){this.disabled!==!1&&(super.enable(),this.dragEls.forEach(e=>{e.addEventListener("mousedown",this._mouseDown),ie&&(e.addEventListener("touchstart",qe),e.addEventListener("pointerdown",Be))}),this.el.classList.remove("ui-draggable-disabled"))}disable(e=!1){this.disabled!==!0&&(super.disable(),this.dragEls.forEach(t=>{t.removeEventListener("mousedown",this._mouseDown),ie&&(t.removeEventListener("touchstart",qe),t.removeEventListener("pointerdown",Be))}),e||this.el.classList.add("ui-draggable-disabled"))}destroy(){this.dragTimeout&&window.clearTimeout(this.dragTimeout),delete this.dragTimeout,this.mouseDownEvent&&this._mouseUp(this.mouseDownEvent),this.disable(!0),delete this.el,delete this.helper,delete this.option,super.destroy()}updateOption(e){return Object.keys(e).forEach(t=>this.option[t]=e[t]),this}_mouseDown(e){if(!k.mouseHandled)return e.button!==0||!this.dragEls.find(t=>t===e.target)&&e.target.closest($i)||this.option.cancel&&e.target.closest(this.option.cancel)||(this.mouseDownEvent=e,delete this.dragging,delete k.dragElement,delete k.dropElement,document.addEventListener("mousemove",this._mouseMove,{capture:!0,passive:!0}),document.addEventListener("mouseup",this._mouseUp,!0),ie&&(e.currentTarget.addEventListener("touchmove",Ie),e.currentTarget.addEventListener("touchend",Me)),e.preventDefault(),document.activeElement&&document.activeElement.blur(),k.mouseHandled=!0),!0}_callDrag(e){if(!this.dragging)return;const t=m.initEvent(e,{target:this.el,type:"drag"});this.option.drag&&this.option.drag(t,this.ui()),this.triggerEvent("drag",t)}_mouseMove(e){var i;const t=this.mouseDownEvent;if(this.lastDrag=e,this.dragging)if(this._dragFollow(e),k.pauseDrag){const s=Number.isInteger(k.pauseDrag)?k.pauseDrag:100;this.dragTimeout&&window.clearTimeout(this.dragTimeout),this.dragTimeout=window.setTimeout(()=>this._callDrag(e),s)}else this._callDrag(e);else if(Math.abs(e.x-t.x)+Math.abs(e.y-t.y)>3){this.dragging=!0,k.dragElement=this;const s=(i=this.el.gridstackNode)==null?void 0:i.grid;s?k.dropElement=s.el.ddElement.ddDroppable:delete k.dropElement,this.helper=this._createHelper(),this._setupHelperContainmentStyle(),this.dragTransform=m.getValuesFromTransformedElement(this.helperContainment),this.dragOffset=this._getDragOffset(e,this.el,this.helperContainment),this._setupHelperStyle(e);const r=m.initEvent(e,{target:this.el,type:"dragstart"});this.option.start&&this.option.start(r,this.ui()),this.triggerEvent("dragstart",r),document.addEventListener("keydown",this._keyEvent)}return!0}_mouseUp(e){var t,i;if(document.removeEventListener("mousemove",this._mouseMove,!0),document.removeEventListener("mouseup",this._mouseUp,!0),ie&&e.currentTarget&&(e.currentTarget.removeEventListener("touchmove",Ie,!0),e.currentTarget.removeEventListener("touchend",Me,!0)),this.dragging){delete this.dragging,(t=this.el.gridstackNode)==null||delete t._origRotate,document.removeEventListener("keydown",this._keyEvent),((i=k.dropElement)==null?void 0:i.el)===this.el.parentElement&&delete k.dropElement,this.helperContainment.style.position=this.parentOriginStylePosition||null,this.helper!==this.el&&this.helper.remove(),this._removeHelperStyle();const s=m.initEvent(e,{target:this.el,type:"dragstop"});this.option.stop&&this.option.stop(s),this.triggerEvent("dragstop",s),k.dropElement&&k.dropElement.drop(e)}delete this.helper,delete this.mouseDownEvent,delete k.dragElement,delete k.dropElement,delete k.mouseHandled,e.preventDefault()}_keyEvent(e){var s,r;const t=this.el.gridstackNode,i=(t==null?void 0:t.grid)||((r=(s=k.dropElement)==null?void 0:s.el)==null?void 0:r.gridstack);if(e.key==="Escape")t&&t._origRotate&&(t._orig=t._origRotate,delete t._origRotate),i==null||i.cancelDrag(),this._mouseUp(this.mouseDownEvent);else if(t&&i&&(e.key==="r"||e.key==="R")){if(!m.canBeRotated(t))return;t._origRotate=t._origRotate||{...t._orig},delete t._moving,i.setAnimation(!1).rotate(t.el,{top:-this.dragOffset.offsetTop,left:-this.dragOffset.offsetLeft}).setAnimation(),t._moving=!0,this.dragOffset=this._getDragOffset(this.lastDrag,t.el,this.helperContainment),this.helper.style.width=this.dragOffset.width+"px",this.helper.style.height=this.dragOffset.height+"px",m.swap(t._orig,"w","h"),delete t._rect,this._mouseMove(this.lastDrag)}}_createHelper(){let e=this.el;return typeof this.option.helper=="function"?e=this.option.helper(this.el):this.option.helper==="clone"&&(e=m.cloneNode(this.el)),e.parentElement||m.appendTo(e,this.option.appendTo==="parent"?this.el.parentElement:this.option.appendTo),this.dragElementOriginStyle=ke.originStyleProp.map(t=>this.el.style[t]),e}_setupHelperStyle(e){this.helper.classList.add("ui-draggable-dragging");const t=this.helper.style;return t.pointerEvents="none",t.width=this.dragOffset.width+"px",t.height=this.dragOffset.height+"px",t.willChange="left, top",t.position="fixed",this._dragFollow(e),t.transition="none",setTimeout(()=>{this.helper&&(t.transition=null)},0),this}_removeHelperStyle(){var t;this.helper.classList.remove("ui-draggable-dragging");const e=(t=this.helper)==null?void 0:t.gridstackNode;if(!(e!=null&&e._isAboutToRemove)&&this.dragElementOriginStyle){const i=this.helper,s=this.dragElementOriginStyle.transition||null;i.style.transition=this.dragElementOriginStyle.transition="none",ke.originStyleProp.forEach(r=>i.style[r]=this.dragElementOriginStyle[r]||null),setTimeout(()=>i.style.transition=s,50)}return delete this.dragElementOriginStyle,this}_dragFollow(e){const t={left:0,top:0},i=this.helper.style,s=this.dragOffset;i.left=(e.clientX+s.offsetLeft-t.left)*this.dragTransform.xScale+"px",i.top=(e.clientY+s.offsetTop-t.top)*this.dragTransform.yScale+"px"}_setupHelperContainmentStyle(){return this.helperContainment=this.helper.parentElement,this.helper.style.position!=="fixed"&&(this.parentOriginStylePosition=this.helperContainment.style.position,getComputedStyle(this.helperContainment).position.match(/static/)&&(this.helperContainment.style.position="relative")),this}_getDragOffset(e,t,i){let s=0,r=0;i&&(s=this.dragTransform.xOffset,r=this.dragTransform.yOffset);const a=t.getBoundingClientRect();return{left:a.left,top:a.top,offsetLeft:-e.clientX+a.left-s,offsetTop:-e.clientY+a.top-r,width:a.width*this.dragTransform.xScale,height:a.height*this.dragTransform.yScale}}ui(){const t=this.el.parentElement.getBoundingClientRect(),i=this.helper.getBoundingClientRect();return{position:{top:(i.top-t.top)*this.dragTransform.yScale,left:(i.left-t.left)*this.dragTransform.xScale}}}}ke.originStyleProp=["width","height","transform","transform-origin","transition","pointerEvents","position","left","top","minWidth","willChange"];class Fi extends Qe{constructor(e,t={}){super(),this.el=e,this.option=t,this._mouseEnter=this._mouseEnter.bind(this),this._mouseLeave=this._mouseLeave.bind(this),this.enable(),this._setupAccept()}on(e,t){super.on(e,t)}off(e){super.off(e)}enable(){this.disabled!==!1&&(super.enable(),this.el.classList.add("ui-droppable"),this.el.classList.remove("ui-droppable-disabled"),this.el.addEventListener("mouseenter",this._mouseEnter),this.el.addEventListener("mouseleave",this._mouseLeave),ie&&(this.el.addEventListener("pointerenter",Nt),this.el.addEventListener("pointerleave",Lt)))}disable(e=!1){this.disabled!==!0&&(super.disable(),this.el.classList.remove("ui-droppable"),e||this.el.classList.add("ui-droppable-disabled"),this.el.removeEventListener("mouseenter",this._mouseEnter),this.el.removeEventListener("mouseleave",this._mouseLeave),ie&&(this.el.removeEventListener("pointerenter",Nt),this.el.removeEventListener("pointerleave",Lt)))}destroy(){this.disable(!0),this.el.classList.remove("ui-droppable"),this.el.classList.remove("ui-droppable-disabled"),super.destroy()}updateOption(e){return Object.keys(e).forEach(t=>this.option[t]=e[t]),this._setupAccept(),this}_mouseEnter(e){if(!k.dragElement||!this._canDrop(k.dragElement.el))return;e.preventDefault(),e.stopPropagation(),k.dropElement&&k.dropElement!==this&&k.dropElement._mouseLeave(e,!0),k.dropElement=this;const t=m.initEvent(e,{target:this.el,type:"dropover"});this.option.over&&this.option.over(t,this._ui(k.dragElement)),this.triggerEvent("dropover",t),this.el.classList.add("ui-droppable-over")}_mouseLeave(e,t=!1){var s;if(!k.dragElement||k.dropElement!==this)return;e.preventDefault(),e.stopPropagation();const i=m.initEvent(e,{target:this.el,type:"dropout"});if(this.option.out&&this.option.out(i,this._ui(k.dragElement)),this.triggerEvent("dropout",i),k.dropElement===this&&(delete k.dropElement,!t)){let r,a=this.el.parentElement;for(;!r&&a;)r=(s=a.ddElement)==null?void 0:s.ddDroppable,a=a.parentElement;r&&r._mouseEnter(e)}}drop(e){e.preventDefault();const t=m.initEvent(e,{target:this.el,type:"drop"});this.option.drop&&this.option.drop(t,this._ui(k.dragElement)),this.triggerEvent("drop",t)}_canDrop(e){return e&&(!this.accept||this.accept(e))}_setupAccept(){return this.option.accept?(typeof this.option.accept=="string"?this.accept=e=>e.classList.contains(this.option.accept)||e.matches(this.option.accept):this.accept=this.option.accept,this):this}_ui(e){return{draggable:e.el,...e.ui()}}}class Ye{static init(e){return e.ddElement||(e.ddElement=new Ye(e)),e.ddElement}constructor(e){this.el=e}on(e,t){return this.ddDraggable&&["drag","dragstart","dragstop"].indexOf(e)>-1?this.ddDraggable.on(e,t):this.ddDroppable&&["drop","dropover","dropout"].indexOf(e)>-1?this.ddDroppable.on(e,t):this.ddResizable&&["resizestart","resize","resizestop"].indexOf(e)>-1&&this.ddResizable.on(e,t),this}off(e){return this.ddDraggable&&["drag","dragstart","dragstop"].indexOf(e)>-1?this.ddDraggable.off(e):this.ddDroppable&&["drop","dropover","dropout"].indexOf(e)>-1?this.ddDroppable.off(e):this.ddResizable&&["resizestart","resize","resizestop"].indexOf(e)>-1&&this.ddResizable.off(e),this}setupDraggable(e){return this.ddDraggable?this.ddDraggable.updateOption(e):this.ddDraggable=new ke(this.el,e),this}cleanDraggable(){return this.ddDraggable&&(this.ddDraggable.destroy(),delete this.ddDraggable),this}setupResizable(e){return this.ddResizable?this.ddResizable.updateOption(e):this.ddResizable=new Ce(this.el,e),this}cleanResizable(){return this.ddResizable&&(this.ddResizable.destroy(),delete this.ddResizable),this}setupDroppable(e){return this.ddDroppable?this.ddDroppable.updateOption(e):this.ddDroppable=new Fi(this.el,e),this}cleanDroppable(){return this.ddDroppable&&(this.ddDroppable.destroy(),delete this.ddDroppable),this}}class Gi{resizable(e,t,i,s){return this._getDDElements(e,t).forEach(r=>{if(t==="disable"||t==="enable")r.ddResizable&&r.ddResizable[t]();else if(t==="destroy")r.ddResizable&&r.cleanResizable();else if(t==="option")r.setupResizable({[i]:s});else{const o=r.el.gridstackNode.grid;let u=r.el.getAttribute("gs-resize-handles")||o.opts.resizable.handles||"e,s,se";u==="all"&&(u="n,e,s,w,se,sw,ne,nw");const d=!o.opts.alwaysShowResizeHandle;r.setupResizable({...o.opts.resizable,handles:u,autoHide:d,start:t.start,stop:t.stop,resize:t.resize})}}),this}draggable(e,t,i,s){return this._getDDElements(e,t).forEach(r=>{if(t==="disable"||t==="enable")r.ddDraggable&&r.ddDraggable[t]();else if(t==="destroy")r.ddDraggable&&r.cleanDraggable();else if(t==="option")r.setupDraggable({[i]:s});else{const a=r.el.gridstackNode.grid;r.setupDraggable({...a.opts.draggable,start:t.start,stop:t.stop,drag:t.drag})}}),this}dragIn(e,t){return this._getDDElements(e).forEach(i=>i.setupDraggable(t)),this}droppable(e,t,i,s){return typeof t.accept=="function"&&!t._accept&&(t._accept=t.accept,t.accept=r=>t._accept(r)),this._getDDElements(e,t).forEach(r=>{t==="disable"||t==="enable"?r.ddDroppable&&r.ddDroppable[t]():t==="destroy"?r.ddDroppable&&r.cleanDroppable():t==="option"?r.setupDroppable({[i]:s}):r.setupDroppable(t)}),this}isDroppable(e){var t;return!!((t=e==null?void 0:e.ddElement)!=null&&t.ddDroppable&&!e.ddElement.ddDroppable.disabled)}isDraggable(e){var t;return!!((t=e==null?void 0:e.ddElement)!=null&&t.ddDraggable&&!e.ddElement.ddDraggable.disabled)}isResizable(e){var t;return!!((t=e==null?void 0:e.ddElement)!=null&&t.ddResizable&&!e.ddElement.ddResizable.disabled)}on(e,t,i){return this._getDDElements(e).forEach(s=>s.on(t,r=>{i(r,k.dragElement?k.dragElement.el:r.target,k.dragElement?k.dragElement.helper:null)})),this}off(e,t){return this._getDDElements(e).forEach(i=>i.off(t)),this}_getDDElements(e,t){const i=e.gridstack||t!=="destroy"&&t!=="disable",s=m.getElements(e);return s.length?s.map(a=>a.ddElement||(i?Ye.init(a):null)).filter(a=>a):[]}}/*!
|
|
6
6
|
* GridStack 11.5.1
|
|
7
7
|
* https://gridstackjs.com/
|
|
8
8
|
*
|
|
@@ -1251,7 +1251,7 @@ const ue = {
|
|
|
1251
1251
|
if (!n)
|
|
1252
1252
|
throw new Error("AnalyticsBridge.tabularQueryFn is not defined");
|
|
1253
1253
|
const d = s.query, u = a({
|
|
1254
|
-
datasource:
|
|
1254
|
+
datasource: s.datasource,
|
|
1255
1255
|
filters: [
|
|
1256
1256
|
...d.filters ?? [],
|
|
1257
1257
|
...e.filters
|
|
@@ -1419,7 +1419,7 @@ const ue = {
|
|
|
1419
1419
|
}));
|
|
1420
1420
|
const i = parseInt(yi, 10), s = o, r = ri(o, "refreshCounter"), a = () => {
|
|
1421
1421
|
R.value = !0, r.value++;
|
|
1422
|
-
}, n = t, d = si(() => import("./GeoMapRenderer-
|
|
1422
|
+
}, n = t, d = si(() => import("./GeoMapRenderer-CAII3s7u.js")), u = me(_e), h = Ue(), { stripUnknownFilters: l } = Ie(h), { i18n: f } = ue.useI18n(), g = A(), p = A({ status: "loading" }), y = A(!1), m = A(), T = A(!1), R = A(!0), v = w(() => s.definition.chart), I = w(() => "chart_title" in v.value ? v.value.chart_title : void 0), q = w(() => "description" in v.value ? v.value.description : void 0), te = w(() => v.value.type === "slottable"), ie = w(() => le(s.definition) ? !1 : !("allow_csv_export" in v.value) || v.value.allow_csv_export !== !1), {
|
|
1423
1423
|
exploreLinkKebabMenu: W,
|
|
1424
1424
|
requestsLinkKebabMenu: pe,
|
|
1425
1425
|
canShowKebabMenu: D,
|
|
@@ -168,7 +168,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
168
168
|
field: string;
|
|
169
169
|
operator: string;
|
|
170
170
|
})[] | undefined;
|
|
171
|
-
datasource: "
|
|
171
|
+
datasource: "platform_usage" | "platform";
|
|
172
172
|
};
|
|
173
173
|
chart: {
|
|
174
174
|
stacked?: boolean | undefined;
|
|
@@ -250,7 +250,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
250
250
|
columns?: string[] | undefined;
|
|
251
251
|
cursor?: string | undefined;
|
|
252
252
|
page_size?: number | undefined;
|
|
253
|
-
datasource: "
|
|
253
|
+
datasource: "platform_usage" | "platform";
|
|
254
254
|
};
|
|
255
255
|
chart: {
|
|
256
256
|
chart_title?: string | undefined;
|
|
@@ -406,7 +406,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
406
406
|
field: string;
|
|
407
407
|
operator: string;
|
|
408
408
|
})[] | undefined;
|
|
409
|
-
datasource: "
|
|
409
|
+
datasource: "platform_usage" | "platform";
|
|
410
410
|
};
|
|
411
411
|
chart: {
|
|
412
412
|
stacked?: boolean | undefined;
|
|
@@ -488,7 +488,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
488
488
|
columns?: string[] | undefined;
|
|
489
489
|
cursor?: string | undefined;
|
|
490
490
|
page_size?: number | undefined;
|
|
491
|
-
datasource: "
|
|
491
|
+
datasource: "platform_usage" | "platform";
|
|
492
492
|
};
|
|
493
493
|
chart: {
|
|
494
494
|
chart_title?: string | undefined;
|
|
@@ -632,7 +632,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
632
632
|
field: string;
|
|
633
633
|
operator: string;
|
|
634
634
|
})[] | undefined;
|
|
635
|
-
datasource: "
|
|
635
|
+
datasource: "platform_usage" | "platform";
|
|
636
636
|
};
|
|
637
637
|
chart: {
|
|
638
638
|
stacked?: boolean | undefined;
|
|
@@ -714,7 +714,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
714
714
|
columns?: string[] | undefined;
|
|
715
715
|
cursor?: string | undefined;
|
|
716
716
|
page_size?: number | undefined;
|
|
717
|
-
datasource: "
|
|
717
|
+
datasource: "platform_usage" | "platform";
|
|
718
718
|
};
|
|
719
719
|
chart: {
|
|
720
720
|
chart_title?: string | undefined;
|
|
@@ -872,7 +872,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
872
872
|
field: string;
|
|
873
873
|
operator: string;
|
|
874
874
|
})[] | undefined;
|
|
875
|
-
datasource: "
|
|
875
|
+
datasource: "platform_usage" | "platform";
|
|
876
876
|
};
|
|
877
877
|
chart: {
|
|
878
878
|
stacked?: boolean | undefined;
|
|
@@ -954,7 +954,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
954
954
|
columns?: string[] | undefined;
|
|
955
955
|
cursor?: string | undefined;
|
|
956
956
|
page_size?: number | undefined;
|
|
957
|
-
datasource: "
|
|
957
|
+
datasource: "platform_usage" | "platform";
|
|
958
958
|
};
|
|
959
959
|
chart: {
|
|
960
960
|
chart_title?: string | undefined;
|
|
@@ -159,7 +159,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
159
159
|
field: string;
|
|
160
160
|
operator: string;
|
|
161
161
|
})[] | undefined;
|
|
162
|
-
datasource: "
|
|
162
|
+
datasource: "platform_usage" | "platform";
|
|
163
163
|
};
|
|
164
164
|
chart: {
|
|
165
165
|
stacked?: boolean | undefined;
|
|
@@ -241,7 +241,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
241
241
|
columns?: string[] | undefined;
|
|
242
242
|
cursor?: string | undefined;
|
|
243
243
|
page_size?: number | undefined;
|
|
244
|
-
datasource: "
|
|
244
|
+
datasource: "platform_usage" | "platform";
|
|
245
245
|
};
|
|
246
246
|
chart: {
|
|
247
247
|
chart_title?: string | undefined;
|
|
@@ -383,7 +383,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
383
383
|
field: string;
|
|
384
384
|
operator: string;
|
|
385
385
|
})[] | undefined;
|
|
386
|
-
datasource: "
|
|
386
|
+
datasource: "platform_usage" | "platform";
|
|
387
387
|
};
|
|
388
388
|
chart: {
|
|
389
389
|
stacked?: boolean | undefined;
|
|
@@ -465,7 +465,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
465
465
|
columns?: string[] | undefined;
|
|
466
466
|
cursor?: string | undefined;
|
|
467
467
|
page_size?: number | undefined;
|
|
468
|
-
datasource: "
|
|
468
|
+
datasource: "platform_usage" | "platform";
|
|
469
469
|
};
|
|
470
470
|
chart: {
|
|
471
471
|
chart_title?: string | undefined;
|
|
@@ -607,7 +607,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
607
607
|
field: string;
|
|
608
608
|
operator: string;
|
|
609
609
|
})[] | undefined;
|
|
610
|
-
datasource: "
|
|
610
|
+
datasource: "platform_usage" | "platform";
|
|
611
611
|
};
|
|
612
612
|
chart: {
|
|
613
613
|
stacked?: boolean | undefined;
|
|
@@ -689,7 +689,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
689
689
|
columns?: string[] | undefined;
|
|
690
690
|
cursor?: string | undefined;
|
|
691
691
|
page_size?: number | undefined;
|
|
692
|
-
datasource: "
|
|
692
|
+
datasource: "platform_usage" | "platform";
|
|
693
693
|
};
|
|
694
694
|
chart: {
|
|
695
695
|
chart_title?: string | undefined;
|
|
@@ -835,7 +835,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
835
835
|
field: string;
|
|
836
836
|
operator: string;
|
|
837
837
|
})[] | undefined;
|
|
838
|
-
datasource: "
|
|
838
|
+
datasource: "platform_usage" | "platform";
|
|
839
839
|
};
|
|
840
840
|
chart: {
|
|
841
841
|
stacked?: boolean | undefined;
|
|
@@ -917,7 +917,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
917
917
|
columns?: string[] | undefined;
|
|
918
918
|
cursor?: string | undefined;
|
|
919
919
|
page_size?: number | undefined;
|
|
920
|
-
datasource: "
|
|
920
|
+
datasource: "platform_usage" | "platform";
|
|
921
921
|
};
|
|
922
922
|
chart: {
|
|
923
923
|
chart_title?: string | undefined;
|
|
@@ -1059,7 +1059,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
1059
1059
|
field: string;
|
|
1060
1060
|
operator: string;
|
|
1061
1061
|
})[] | undefined;
|
|
1062
|
-
datasource: "
|
|
1062
|
+
datasource: "platform_usage" | "platform";
|
|
1063
1063
|
};
|
|
1064
1064
|
chart: {
|
|
1065
1065
|
stacked?: boolean | undefined;
|
|
@@ -1141,7 +1141,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
1141
1141
|
columns?: string[] | undefined;
|
|
1142
1142
|
cursor?: string | undefined;
|
|
1143
1143
|
page_size?: number | undefined;
|
|
1144
|
-
datasource: "
|
|
1144
|
+
datasource: "platform_usage" | "platform";
|
|
1145
1145
|
};
|
|
1146
1146
|
chart: {
|
|
1147
1147
|
chart_title?: string | undefined;
|
|
@@ -1283,7 +1283,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
1283
1283
|
field: string;
|
|
1284
1284
|
operator: string;
|
|
1285
1285
|
})[] | undefined;
|
|
1286
|
-
datasource: "
|
|
1286
|
+
datasource: "platform_usage" | "platform";
|
|
1287
1287
|
};
|
|
1288
1288
|
chart: {
|
|
1289
1289
|
stacked?: boolean | undefined;
|
|
@@ -1365,7 +1365,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
1365
1365
|
columns?: string[] | undefined;
|
|
1366
1366
|
cursor?: string | undefined;
|
|
1367
1367
|
page_size?: number | undefined;
|
|
1368
|
-
datasource: "
|
|
1368
|
+
datasource: "platform_usage" | "platform";
|
|
1369
1369
|
};
|
|
1370
1370
|
chart: {
|
|
1371
1371
|
chart_title?: string | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kong-ui-public/dashboard-renderer",
|
|
3
|
-
"version": "8.12.
|
|
3
|
+
"version": "8.12.27",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/dashboard-renderer.umd.js",
|
|
6
6
|
"module": "./dist/dashboard-renderer.es.js",
|
|
@@ -29,15 +29,15 @@
|
|
|
29
29
|
"pinia": ">= 3.0.4 < 4",
|
|
30
30
|
"swrv": "^1.2.0",
|
|
31
31
|
"vue": "^3.5.35",
|
|
32
|
-
"@kong-ui-public/analytics-chart": "^10.19.
|
|
33
|
-
"@kong-ui-public/analytics-
|
|
34
|
-
"@kong-ui-public/analytics-
|
|
35
|
-
"@kong-ui-public/analytics-
|
|
36
|
-
"@kong-ui-public/analytics-utilities": "^12.20.1",
|
|
32
|
+
"@kong-ui-public/analytics-chart": "^10.19.12",
|
|
33
|
+
"@kong-ui-public/analytics-geo-map": "^1.5.51",
|
|
34
|
+
"@kong-ui-public/analytics-utilities": "^12.20.2",
|
|
35
|
+
"@kong-ui-public/analytics-config-store": "^1.3.34",
|
|
37
36
|
"@kong-ui-public/entities-shared": "^3.54.1",
|
|
38
37
|
"@kong-ui-public/i18n": "^2.4.6",
|
|
39
|
-
"@kong-ui-public/
|
|
40
|
-
"@kong-ui-public/table-data-grid": "^0.2.2"
|
|
38
|
+
"@kong-ui-public/analytics-metric-provider": "^11.4.8",
|
|
39
|
+
"@kong-ui-public/table-data-grid": "^0.2.2",
|
|
40
|
+
"@kong-ui-public/sandbox-layout": "^2.4.26"
|
|
41
41
|
},
|
|
42
42
|
"repository": {
|
|
43
43
|
"type": "git",
|
|
@@ -61,13 +61,13 @@
|
|
|
61
61
|
"@kong/kongponents": "^9.59.0",
|
|
62
62
|
"swrv": "^1.2.0",
|
|
63
63
|
"vue": ">= 3.3.13 < 4",
|
|
64
|
-
"@kong-ui-public/analytics-chart": "^10.19.
|
|
65
|
-
"@kong-ui-public/analytics-geo-map": "^1.5.
|
|
66
|
-
"@kong-ui-public/analytics-
|
|
67
|
-
"@kong-ui-public/analytics-
|
|
68
|
-
"@kong-ui-public/analytics-utilities": "^12.20.
|
|
69
|
-
"@kong-ui-public/
|
|
70
|
-
"@kong-ui-public/
|
|
64
|
+
"@kong-ui-public/analytics-chart": "^10.19.12",
|
|
65
|
+
"@kong-ui-public/analytics-geo-map": "^1.5.51",
|
|
66
|
+
"@kong-ui-public/analytics-config-store": "^1.3.34",
|
|
67
|
+
"@kong-ui-public/analytics-metric-provider": "^11.4.8",
|
|
68
|
+
"@kong-ui-public/analytics-utilities": "^12.20.2",
|
|
69
|
+
"@kong-ui-public/i18n": "^2.4.6",
|
|
70
|
+
"@kong-ui-public/table-data-grid": "^0.2.2"
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
73
|
"gridstack": "^11.5.1",
|