@kong-ui-public/dashboard-renderer 5.7.6 → 5.7.7

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.
@@ -1199,8 +1199,8 @@ const Ci = () => {
1199
1199
  },
1200
1200
  setup(u) {
1201
1201
  Ge((n) => ({
1202
- "7f0eb0fc": z(Ct),
1203
- "5399b6ae": r.value
1202
+ "2a38e79e": z(Ct),
1203
+ "4cc71de6": r.value
1204
1204
  }));
1205
1205
  const e = u, t = U(null), i = U(0), s = new ResizeObserver((n) => {
1206
1206
  window.requestAnimationFrame(() => {
@@ -1241,7 +1241,7 @@ const Ci = () => {
1241
1241
  ], 6))), 128))
1242
1242
  ], 512));
1243
1243
  }
1244
- }), Wi = /* @__PURE__ */ he(Gi, [["__scopeId", "data-v-b27ebb1a"]]);
1244
+ }), Wi = /* @__PURE__ */ he(Gi, [["__scopeId", "data-v-354b7177"]]);
1245
1245
  function Vi(u, e, t, i, s) {
1246
1246
  const r = (...o) => (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(u, o));
1247
1247
  return r.prototype = e.prototype, r;
@@ -4051,7 +4051,7 @@ const ji = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Qi = { cl
4051
4051
  ], 8, ji))), 128))
4052
4052
  ], 512));
4053
4053
  }
4054
- }), Ji = /* @__PURE__ */ he(Zi, [["__scopeId", "data-v-e4e1101d"]]), es = { class: "kong-ui-public-dashboard-renderer" }, ts = {
4054
+ }), Ji = /* @__PURE__ */ he(Zi, [["__scopeId", "data-v-a68d6821"]]), es = { class: "kong-ui-public-dashboard-renderer" }, ts = {
4055
4055
  key: 0,
4056
4056
  class: "tile-container slottable-tile"
4057
4057
  }, is = /* @__PURE__ */ W({
@@ -4183,7 +4183,7 @@ const ji = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Qi = { cl
4183
4183
  ]);
4184
4184
  };
4185
4185
  }
4186
- }), fs = /* @__PURE__ */ he(is, [["__scopeId", "data-v-0bb82daa"]]);
4186
+ }), fs = /* @__PURE__ */ he(is, [["__scopeId", "data-v-02eceaef"]]);
4187
4187
  export {
4188
4188
  ci as CP_ID_TOKEN,
4189
4189
  Ct as DASHBOARD_COLS,
@@ -1,4 +1,4 @@
1
- (function(E,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue"),require("@kong-ui-public/analytics-utilities"),require("@kong-ui-public/analytics-chart"),require("swrv"),require("axios"),require("@kong-ui-public/i18n"),require("@kong-ui-public/analytics-config-store"),require("@kong-ui-public/analytics-metric-provider"),require("@kong/icons")):typeof define=="function"&&define.amd?define(["exports","vue","@kong-ui-public/analytics-utilities","@kong-ui-public/analytics-chart","swrv","axios","@kong-ui-public/i18n","@kong-ui-public/analytics-config-store","@kong-ui-public/analytics-metric-provider","@kong/icons"],o):(E=typeof globalThis<"u"?globalThis:E||self,o(E["kong-ui-public-dashboard-renderer"]={},E.Vue,E["kong-ui-public-analytics-utilities"],E["kong-ui-public-analytics-chart"],E.swrv,E.axios,E["kong-ui-public-i18n"],E["kong-ui-public-analytics-config-store"],E["kong-ui-public-analytics-metric-provider"],E.KongIcons))})(this,function(E,o,D,K,ke,si,Ie,Be,Pe,qe){"use strict";var ti=Object.defineProperty;var at=E=>{throw TypeError(E)};var ii=(E,o,D)=>o in E?ti(E,o,{enumerable:!0,configurable:!0,writable:!0,value:D}):E[o]=D;var lt=(E,o,D)=>ii(E,typeof o!="symbol"?o+"":o,D),Oe=(E,o,D)=>o.has(E)||at("Cannot "+D);var v=(E,o,D)=>(Oe(E,o,"read from private field"),D?D.call(E):o.get(E)),L=(E,o,D)=>o.has(E)?at("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(E):o.set(E,D),H=(E,o,D,K)=>(Oe(E,o,"write to private field"),K?K.call(E,D):o.set(E,D),D),I=(E,o,D)=>(Oe(E,o,"access private method"),D);var ge=(E,o,D,K)=>({set _(ke){H(E,o,ke,D)},get _(){return v(E,o,K)}});var $,ie,se,Z,de,re,ce,F,ne,P,ue,G,oe,Y,fe,be,T,ht,dt,ct,ut,ft,Ce,Le,Me,xe,gt,Re;var $e=(f=>(f.VALIDATING="VALIDATING",f.VALIDATING_HAS_DATA="VALIDATING_HAS_DATA",f.PENDING="PENDING",f.SUCCESS="SUCCESS",f.SUCCESS_HAS_DATA="SUCCESS_HAS_DATA",f.ERROR="ERROR",f.STALE_IF_ERROR="STALE_IF_ERROR",f))($e||{});const mt=f=>{var e,t,i,s,r;return f?!!((e=Object.keys(f))!=null&&e.length||(t=f.data)!=null&&t.length||(s=(i=f.data)==null?void 0:i.data)!=null&&s.length||!((r=f.data)!=null&&r.data)&&typeof f.data=="object"&&Object.keys(f==null?void 0:f.data).length):!1};function pt(f=o.ref({}),e,t,i=mt){const s=o.ref("PENDING");return o.watchEffect(()=>{const r=i(f.value);if(f.value&&r&&t.value){s.value="VALIDATING_HAS_DATA";return}if(f.value&&t.value){s.value="VALIDATING";return}if(f.value&&e.value){s.value="STALE_IF_ERROR";return}if(f.value===void 0&&!e.value){s.value="PENDING";return}if(f.value&&!e.value&&r){s.value="SUCCESS_HAS_DATA";return}if(f.value&&!e.value){s.value="SUCCESS";return}f.value===void 0&&e&&(s.value="ERROR")}),{state:s,swrvState:$e}}const yt={renderer:{noQueryBridge:"No query bridge provided. Unable to render dashboard.",trendRange:{"24h":"Last 24-hour summary","7d":"Last 7-day summary","30d":"Last 30-day summary"},edit:"Edit",duplicateTile:"Duplicate",remove:"Remove",delete:"Delete"},queryDataProvider:{timeRangeExceeded:"The time range for this report is outside of your organization's data retention period"},csvExport:{defaultFilename:"Chart export",exportAsCsv:"Export as CSV"},jumpToExplore:"Explore"};function _t(){const f=Ie.createI18n("en-us",yt);return{i18n:f,i18nT:Ie.i18nTComponent(f)}}const ae=170,Te=6,Q="analytics-query-provider",De="{entity-id}",Fe="{cp-id}",Ge="{timeframe}",Ue=30*1e3;function vt(){const f=o.inject(Q);return{evaluateFeatureFlag:(t,i)=>f?f.evaluateFeatureFlagFn(t,i):i}}function wt(f){return f&&f.__esModule&&Object.prototype.hasOwnProperty.call(f,"default")?f.default:f}var We={exports:{}};(function(f){var e=Object.prototype.hasOwnProperty,t="~";function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(t=!1));function s(c,d,l){this.fn=c,this.context=d,this.once=l||!1}function r(c,d,l,h,g){if(typeof l!="function")throw new TypeError("The listener must be a function");var p=new s(l,h||c,g),y=t?t+d:d;return c._events[y]?c._events[y].fn?c._events[y]=[c._events[y],p]:c._events[y].push(p):(c._events[y]=p,c._eventsCount++),c}function a(c,d){--c._eventsCount===0?c._events=new i:delete c._events[d]}function n(){this._events=new i,this._eventsCount=0}n.prototype.eventNames=function(){var d=[],l,h;if(this._eventsCount===0)return d;for(h in l=this._events)e.call(l,h)&&d.push(t?h.slice(1):h);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(l)):d},n.prototype.listeners=function(d){var l=t?t+d:d,h=this._events[l];if(!h)return[];if(h.fn)return[h.fn];for(var g=0,p=h.length,y=new Array(p);g<p;g++)y[g]=h[g].fn;return y},n.prototype.listenerCount=function(d){var l=t?t+d:d,h=this._events[l];return h?h.fn?1:h.length:0},n.prototype.emit=function(d,l,h,g,p,y){var _=t?t+d:d;if(!this._events[_])return!1;var m=this._events[_],k=arguments.length,S,x;if(m.fn){switch(m.once&&this.removeListener(d,m.fn,void 0,!0),k){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,l),!0;case 3:return m.fn.call(m.context,l,h),!0;case 4:return m.fn.call(m.context,l,h,g),!0;case 5:return m.fn.call(m.context,l,h,g,p),!0;case 6:return m.fn.call(m.context,l,h,g,p,y),!0}for(x=1,S=new Array(k-1);x<k;x++)S[x-1]=arguments[x];m.fn.apply(m.context,S)}else{var O=m.length,N;for(x=0;x<O;x++)switch(m[x].once&&this.removeListener(d,m[x].fn,void 0,!0),k){case 1:m[x].fn.call(m[x].context);break;case 2:m[x].fn.call(m[x].context,l);break;case 3:m[x].fn.call(m[x].context,l,h);break;case 4:m[x].fn.call(m[x].context,l,h,g);break;default:if(!S)for(N=1,S=new Array(k-1);N<k;N++)S[N-1]=arguments[N];m[x].fn.apply(m[x].context,S)}}return!0},n.prototype.on=function(d,l,h){return r(this,d,l,h,!1)},n.prototype.once=function(d,l,h){return r(this,d,l,h,!0)},n.prototype.removeListener=function(d,l,h,g){var p=t?t+d:d;if(!this._events[p])return this;if(!l)return a(this,p),this;var y=this._events[p];if(y.fn)y.fn===l&&(!g||y.once)&&(!h||y.context===h)&&a(this,p);else{for(var _=0,m=[],k=y.length;_<k;_++)(y[_].fn!==l||g&&!y[_].once||h&&y[_].context!==h)&&m.push(y[_]);m.length?this._events[p]=m.length===1?m[0]:m:a(this,p)}return this},n.prototype.removeAllListeners=function(d){var l;return d?(l=t?t+d:d,this._events[l]&&a(this,l)):(this._events=new i,this._eventsCount=0),this},n.prototype.off=n.prototype.removeListener,n.prototype.addListener=n.prototype.on,n.prefixed=t,n.EventEmitter=n,f.exports=n})(We);var bt=We.exports;const Et=wt(bt);class Ve extends Error{constructor(e){super(e),this.name="TimeoutError"}}class Ct extends Error{constructor(e){super(),this.name="AbortError",this.message=e}}const Ke=f=>globalThis.DOMException===void 0?new Ct(f):new DOMException(f),Ye=f=>{const e=f.reason===void 0?Ke("This operation was aborted."):f.reason;return e instanceof Error?e:Ke(e)};function xt(f,e){const{milliseconds:t,fallback:i,message:s,customTimers:r={setTimeout,clearTimeout}}=e;let a,n;const d=new Promise((l,h)=>{if(typeof t!="number"||Math.sign(t)!==1)throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${t}\``);if(e.signal){const{signal:p}=e;p.aborted&&h(Ye(p)),n=()=>{h(Ye(p))},p.addEventListener("abort",n,{once:!0})}if(t===Number.POSITIVE_INFINITY){f.then(l,h);return}const g=new Ve;a=r.setTimeout.call(void 0,()=>{if(i){try{l(i())}catch(p){h(p)}return}typeof f.cancel=="function"&&f.cancel(),s===!1?l():s instanceof Error?h(s):(g.message=s??`Promise timed out after ${t} milliseconds`,h(g))},t),(async()=>{try{l(await f)}catch(p){h(p)}})()}).finally(()=>{d.clear(),n&&e.signal&&e.signal.removeEventListener("abort",n)});return d.clear=()=>{r.clearTimeout.call(void 0,a),a=void 0},d}function Rt(f,e,t){let i=0,s=f.length;for(;s>0;){const r=Math.trunc(s/2);let a=i+r;t(f[a],e)<=0?(i=++a,s-=r+1):s=r}return i}class kt{constructor(){L(this,$,[])}enqueue(e,t){t={priority:0,...t};const i={priority:t.priority,id:t.id,run:e};if(this.size===0||v(this,$)[this.size-1].priority>=t.priority){v(this,$).push(i);return}const s=Rt(v(this,$),i,(r,a)=>a.priority-r.priority);v(this,$).splice(s,0,i)}setPriority(e,t){const i=v(this,$).findIndex(r=>r.id===e);if(i===-1)throw new ReferenceError(`No promise function with the id "${e}" exists in the queue.`);const[s]=v(this,$).splice(i,1);this.enqueue(s.run,{priority:t,id:e})}dequeue(){const e=v(this,$).shift();return e==null?void 0:e.run}filter(e){return v(this,$).filter(t=>t.priority===e.priority).map(t=>t.run)}get size(){return v(this,$).length}}$=new WeakMap;class Tt extends Et{constructor(t){var i,s;super();L(this,T);L(this,ie);L(this,se);L(this,Z,0);L(this,de);L(this,re);L(this,ce,0);L(this,F);L(this,ne);L(this,P);L(this,ue);L(this,G,0);L(this,oe);L(this,Y);L(this,fe);L(this,be,1n);lt(this,"timeout");if(t={carryoverConcurrencyCount:!1,intervalCap:Number.POSITIVE_INFINITY,interval:0,concurrency:Number.POSITIVE_INFINITY,autoStart:!0,queueClass:kt,...t},!(typeof t.intervalCap=="number"&&t.intervalCap>=1))throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${((i=t.intervalCap)==null?void 0:i.toString())??""}\` (${typeof t.intervalCap})`);if(t.interval===void 0||!(Number.isFinite(t.interval)&&t.interval>=0))throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${((s=t.interval)==null?void 0:s.toString())??""}\` (${typeof t.interval})`);H(this,ie,t.carryoverConcurrencyCount),H(this,se,t.intervalCap===Number.POSITIVE_INFINITY||t.interval===0),H(this,de,t.intervalCap),H(this,re,t.interval),H(this,P,new t.queueClass),H(this,ue,t.queueClass),this.concurrency=t.concurrency,this.timeout=t.timeout,H(this,fe,t.throwOnTimeout===!0),H(this,Y,t.autoStart===!1)}get concurrency(){return v(this,oe)}set concurrency(t){if(!(typeof t=="number"&&t>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${t}\` (${typeof t})`);H(this,oe,t),I(this,T,xe).call(this)}setPriority(t,i){v(this,P).setPriority(t,i)}async add(t,i={}){return i.id??(i.id=(ge(this,be)._++).toString()),i={timeout:this.timeout,throwOnTimeout:v(this,fe),...i},new Promise((s,r)=>{v(this,P).enqueue(async()=>{var a;ge(this,G)._++,ge(this,Z)._++;try{(a=i.signal)==null||a.throwIfAborted();let n=t({signal:i.signal});i.timeout&&(n=xt(Promise.resolve(n),{milliseconds:i.timeout})),i.signal&&(n=Promise.race([n,I(this,T,gt).call(this,i.signal)]));const c=await n;s(c),this.emit("completed",c)}catch(n){if(n instanceof Ve&&!i.throwOnTimeout){s();return}r(n),this.emit("error",n)}finally{I(this,T,ct).call(this)}},i),this.emit("add"),I(this,T,Ce).call(this)})}async addAll(t,i){return Promise.all(t.map(async s=>this.add(s,i)))}start(){return v(this,Y)?(H(this,Y,!1),I(this,T,xe).call(this),this):this}pause(){H(this,Y,!0)}clear(){H(this,P,new(v(this,ue)))}async onEmpty(){v(this,P).size!==0&&await I(this,T,Re).call(this,"empty")}async onSizeLessThan(t){v(this,P).size<t||await I(this,T,Re).call(this,"next",()=>v(this,P).size<t)}async onIdle(){v(this,G)===0&&v(this,P).size===0||await I(this,T,Re).call(this,"idle")}get size(){return v(this,P).size}sizeBy(t){return v(this,P).filter(t).length}get pending(){return v(this,G)}get isPaused(){return v(this,Y)}}ie=new WeakMap,se=new WeakMap,Z=new WeakMap,de=new WeakMap,re=new WeakMap,ce=new WeakMap,F=new WeakMap,ne=new WeakMap,P=new WeakMap,ue=new WeakMap,G=new WeakMap,oe=new WeakMap,Y=new WeakMap,fe=new WeakMap,be=new WeakMap,T=new WeakSet,ht=function(){return v(this,se)||v(this,Z)<v(this,de)},dt=function(){return v(this,G)<v(this,oe)},ct=function(){ge(this,G)._--,I(this,T,Ce).call(this),this.emit("next")},ut=function(){I(this,T,Me).call(this),I(this,T,Le).call(this),H(this,ne,void 0)},ft=function(){const t=Date.now();if(v(this,F)===void 0){const i=v(this,ce)-t;if(i<0)H(this,Z,v(this,ie)?v(this,G):0);else return v(this,ne)===void 0&&H(this,ne,setTimeout(()=>{I(this,T,ut).call(this)},i)),!0}return!1},Ce=function(){if(v(this,P).size===0)return v(this,F)&&clearInterval(v(this,F)),H(this,F,void 0),this.emit("empty"),v(this,G)===0&&this.emit("idle"),!1;if(!v(this,Y)){const t=!v(this,T,ft);if(v(this,T,ht)&&v(this,T,dt)){const i=v(this,P).dequeue();return i?(this.emit("active"),i(),t&&I(this,T,Le).call(this),!0):!1}}return!1},Le=function(){v(this,se)||v(this,F)!==void 0||(H(this,F,setInterval(()=>{I(this,T,Me).call(this)},v(this,re))),H(this,ce,Date.now()+v(this,re)))},Me=function(){v(this,Z)===0&&v(this,G)===0&&v(this,F)&&(clearInterval(v(this,F)),H(this,F,void 0)),H(this,Z,v(this,ie)?v(this,G):0),I(this,T,xe).call(this)},xe=function(){for(;I(this,T,Ce).call(this););},gt=async function(t){return new Promise((i,s)=>{t.addEventListener("abort",()=>{s(t.reason)},{once:!0})})},Re=async function(t,i){return new Promise(s=>{const r=()=>{i&&!i()||(this.off(t,r),s())};this.on(t,r)})};const te={useI18n:_t,useEvaluateFeatureFlag:vt,useRequestQueue:()=>{const f=Be.useAnalyticsConfigStore(),e=o.inject(Q);if(!e)return;if(e.queryFnOverride){console.warn("Detected incorrect use of useRequestQueue. This composable should not be used in nested components. Please discuss with team-data or report an issue if you feel you have a use case.");return}const t=new Tt({carryoverConcurrencyCount:!0,concurrency:f.maxParallelRequests,interval:f.requestInterval,intervalCap:f.requestIntervalCap}),i={...e,queryFnOverride:!0,queryFn:(s,r)=>t.add(()=>e.queryFn(s,r),{throwOnTimeout:!0})};o.provide(Q,i)}},Ne=o.defineComponent({__name:"QueryDataProvider",props:{context:{},query:{},queryReady:{type:Boolean},refreshCounter:{}},emits:["chart-data","queryComplete"],setup(f,{emit:e}){const t=f,i=e,{i18n:s}=te.useI18n(),r=o.inject(Q),a=()=>t.queryReady&&r?JSON.stringify([t.query,t.context,t.refreshCounter]):null,n=new AbortController;o.onUnmounted(()=>{n.abort()});const c=(k,S,x)=>{const O=[];return S&&O.push(...S),O.push(...D.stripUnknownFilters(k,x)),O},{data:d,error:l,isValidating:h}=ke(a,async()=>{var k,S,x,O;try{let{datasource:N,...R}=t.query;N||(N="basic");const A=c(N,t.query.filters,t.context.filters);let z=t.query.time_range;z?z.tz||(z={...z,tz:t.context.tz}):z={...t.context.timeSpec,tz:t.context.tz};const M={datasource:N,query:{...R,time_range:z,filters:A}};return r==null?void 0:r.queryFn(M,n)}catch(N){y.value=((S=(k=N==null?void 0:N.response)==null?void 0:k.data)==null?void 0:S.message)==="Range not allowed for this tier"?s.t("queryDataProvider.timeRangeExceeded"):((O=(x=N==null?void 0:N.response)==null?void 0:x.data)==null?void 0:O.message)||(N==null?void 0:N.message)}finally{i("queryComplete")}},{refreshInterval:t.context.refreshInterval,revalidateOnFocus:!1}),{state:g,swrvState:p}=pt(d,l,h),y=o.ref(null),_=o.computed(()=>g.value===p.ERROR||!!y.value),m=o.computed(()=>!t.queryReady||g.value===p.PENDING);return o.watch(d,k=>{k&&i("chart-data",k)}),(k,S)=>{const x=o.resolveComponent("KSkeleton"),O=o.resolveComponent("KEmptyState");return m.value||!o.unref(d)&&!_.value?(o.openBlock(),o.createBlock(x,{key:0,class:"chart-skeleton",type:"table"})):_.value?(o.openBlock(),o.createBlock(O,{key:1,"action-button-visible":!1,"data-testid":"chart-empty-state","icon-variant":"error"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(y.value),1)]),_:1})):o.unref(d)?o.renderSlot(k.$slots,"default",{key:2,data:o.unref(d)}):o.createCommentVNode("",!0)}}}),Dt=o.defineComponent({__name:"SimpleChartRenderer",props:{query:{},context:{},queryReady:{type:Boolean},chartOptions:{},height:{},refreshCounter:{}},setup(f){o.useCssVars(i=>({"35a26ebf":`${i.height}px`}));const e=f,t=o.computed(()=>e.chartOptions.type==="single_value");return(i,s)=>(o.openBlock(),o.createBlock(Ne,{context:i.context,query:i.query,"query-ready":i.queryReady,"refresh-counter":i.refreshCounter},{default:o.withCtx(({data:r})=>[o.createElementVNode("div",{class:o.normalizeClass(["analytics-chart",{"single-value":t.value}])},[o.createVNode(o.unref(K.SimpleChart),{"chart-data":r,"chart-options":i.chartOptions,"synthetics-data-key":t.value?void 0:i.chartOptions.syntheticsDataKey},null,8,["chart-data","chart-options","synthetics-data-key"])],2)]),_:1},8,["context","query","query-ready","refresh-counter"]))}}),J=(f,e)=>{const t=f.__vccOpts||f;for(const[i,s]of e)t[i]=s;return t},je=J(Dt,[["__scopeId","data-v-65cc8607"]]),Nt={class:"analytics-chart"},ze=J(o.defineComponent({__name:"BaseAnalyticsChartRenderer",props:{query:{},context:{},queryReady:{type:Boolean},chartOptions:{},height:{},refreshCounter:{},extraProps:{}},emits:["edit-tile","chart-data","zoom-time-range"],setup(f,{emit:e}){const t=f,i=e,{i18n:s}=te.useI18n(),{evaluateFeatureFlag:r}=te.useEvaluateFeatureFlag(),a=r("explore-v4-fine-granularity",!1),n=o.computed(()=>({type:t.chartOptions.type,stacked:t.chartOptions.stacked??!1,chartDatasetColors:t.chartOptions.chartDatasetColors,threshold:t.chartOptions.threshold})),c=()=>{i("edit-tile")},d=l=>{i("chart-data",l)};return(l,h)=>{const g=o.resolveComponent("KDropdownItem");return o.openBlock(),o.createBlock(Ne,{context:l.context,query:l.query,"query-ready":l.queryReady,"refresh-counter":l.refreshCounter,onChartData:d},{default:o.withCtx(({data:p})=>[o.createElementVNode("div",Nt,[o.createVNode(o.unref(K.AnalyticsChart),o.mergeProps({"allow-csv-export":l.chartOptions.allowCsvExport,"chart-data":p,"chart-options":n.value,"legend-position":"bottom","show-menu":l.context.editable,"synthetics-data-key":l.chartOptions.syntheticsDataKey,"timeseries-zoom":o.unref(a)&&!l.query.time_range,"tooltip-title":""},l.extraProps,{onZoomTimeRange:h[0]||(h[0]=y=>i("zoom-time-range",y))}),o.createSlots({_:2},[l.context.editable?{name:"menu-items",fn:o.withCtx(()=>[o.createVNode(g,{onClick:c},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(s).t("renderer.edit")),1)]),_:1})]),key:"0"}:void 0]),1040,["allow-csv-export","chart-data","chart-options","show-menu","synthetics-data-key","timeseries-zoom"])])]),_:1},8,["context","query","query-ready","refresh-counter"])}}}),[["__scopeId","data-v-a9ee3db9"]]),Xe=o.defineComponent({__name:"BarChartRenderer",props:{query:{},context:{},queryReady:{type:Boolean},chartOptions:{},height:{},refreshCounter:{}},setup(f){return(e,t)=>(o.openBlock(),o.createBlock(ze,{"chart-options":e.chartOptions,context:e.context,"extra-props":{showAnnotations:!1},height:e.height,query:e.query,"query-ready":e.queryReady,"refresh-counter":e.refreshCounter},null,8,["chart-options","context","height","query","query-ready","refresh-counter"]))}}),Qe=o.defineComponent({__name:"TimeseriesChartRenderer",props:{query:{},context:{},queryReady:{type:Boolean},chartOptions:{},height:{},refreshCounter:{}},emits:["zoom-time-range"],setup(f,{emit:e}){const t=e;return(i,s)=>(o.openBlock(),o.createBlock(ze,{"chart-options":i.chartOptions,context:i.context,height:i.height,query:i.query,"query-ready":i.queryReady,"refresh-counter":i.refreshCounter,onZoomTimeRange:s[0]||(s[0]=r=>t("zoom-time-range",r))},null,8,["chart-options","context","height","query","query-ready","refresh-counter"]))}}),zt={class:"metric-card-tile-wrapper"},St=J(o.defineComponent({__name:"GoldenSignalsRenderer",props:{query:{},context:{},queryReady:{type:Boolean},chartOptions:{},height:{},refreshCounter:{}},setup(f){const e=f,t=o.computed(()=>{const s=e.context.timeSpec;if(s.type==="absolute")return new D.Timeframe({key:"custom",timeframeText:"custom",display:"custom",startCustom:s.start,endCustom:s.end,timeframeLength:()=>s.end.getTime()-s.start.getTime(),defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,allowedTiers:["free","plus","enterprise"]});const r=D.TimePeriods.get(s.time_range);if(!r)throw new Error("Unknown time range");return r}),i=o.computed(()=>{var r,a;const s=(r=e.query)==null?void 0:r.datasource;if(s&&s!=="advanced"&&s!=="basic")throw new Error(`Invalid datasource value: ${s}`);return{datasource:(a=e.query)==null?void 0:a.datasource,overrideTimeframe:t.value,tz:e.context.tz,additionalFilter:e.context.filters,longCardTitles:e.chartOptions.longCardTitles,percentileLatency:e.chartOptions.percentileLatency,refreshInterval:e.context.refreshInterval,queryReady:e.queryReady,refreshCounter:e.refreshCounter}});return(s,r)=>(o.openBlock(),o.createElementBlock("div",zt,[o.createVNode(o.unref(Pe.MetricsProvider),o.normalizeProps(o.guardReactiveProps(i.value)),{default:o.withCtx(()=>[o.createVNode(o.unref(Pe.MetricsConsumer))]),_:1},16)]))}}),[["__scopeId","data-v-20c4f411"]]),Ze="#6c7489",Je="20px",et="20px",At={class:"fallback-entity-link","data-testid":"entity-link-parent"},tt=o.defineComponent({__name:"FallbackEntityLink",props:{entityLinkData:{}},setup(f){return(e,t)=>(o.openBlock(),o.createElementBlock("div",At,o.toDisplayString(e.entityLinkData.label),1))}}),Ht=o.defineComponent({__name:"TopNTableRenderer",props:{query:{},context:{},queryReady:{type:Boolean},chartOptions:{},height:{},refreshCounter:{}},setup(f){const e=f,t=o.inject(Q),i=o.defineAsyncComponent(async()=>{if(t!=null&&t.fetchComponent)try{return await t.fetchComponent("EntityLink")}catch{return tt}return tt}),s=r=>{var a;if((a=e.chartOptions)!=null&&a.entityLink)if(r.id.includes(":")){const[n,c]=r.id.split(":");return e.chartOptions.entityLink.replace(Fe,n).replace(De,c)}else return e.chartOptions.entityLink.replace(De,r.id);return""};return(r,a)=>(o.openBlock(),o.createBlock(Ne,{context:r.context,query:r.query,"query-ready":r.queryReady,"refresh-counter":r.refreshCounter},{default:o.withCtx(({data:n})=>[o.createVNode(o.unref(K.TopNTable),{data:n,"synthetics-data-key":r.chartOptions.syntheticsDataKey},o.createSlots({_:2},[e.chartOptions.entityLink?{name:"name",fn:o.withCtx(({record:c})=>[o.createVNode(o.unref(i),{"entity-link-data":{id:c.id,label:c.name,deleted:c.deleted},"external-link":s(c)},null,8,["entity-link-data","external-link"])]),key:"0"}:void 0]),1032,["data","synthetics-data-key"])]),_:1},8,["context","query","query-ready","refresh-counter"]))}}),Ot=o.defineComponent({__name:"DonutChartRenderer",props:{query:{},context:{},queryReady:{type:Boolean},chartOptions:{},height:{},refreshCounter:{}},setup(f){return(e,t)=>(o.openBlock(),o.createBlock(ze,{"chart-options":e.chartOptions,context:e.context,height:e.height,query:e.query,"query-ready":e.queryReady,"refresh-counter":e.refreshCounter},null,8,["chart-options","context","height","query","query-ready","refresh-counter"]))}}),Lt=["data-testid"],Mt={key:0,class:"tile-header"},It=["data-testid"],Bt=["data-testid"],Pt={class:"delete-option"},qt=["data-testid"],$t=["data-testid"],Ft=J(o.defineComponent({__name:"DashboardTile",props:{definition:{},context:{},height:{default:ae},queryReady:{type:Boolean},refreshCounter:{},tileId:{}},emits:["edit-tile","duplicate-tile","remove-tile","zoom-time-range"],setup(f,{emit:e}){o.useCssVars(b=>({"3da384ac":`${b.height}px`}));const t=parseInt(et,10),i=f,s=e,r=o.inject(Q),{i18n:a}=te.useI18n(),n=o.ref(),c=o.ref(!1),d=o.ref(),l=o.ref(!1),h=o.ref("");o.onMounted(async()=>{var b;h.value=await((b=r==null?void 0:r.exploreBaseUrl)==null?void 0:b.call(r))??""}),o.watch(()=>i.definition,async()=>{await o.nextTick(),d.value&&(l.value=d.value.scrollWidth>d.value.clientWidth)},{immediate:!0,deep:!0});const g=o.computed(()=>{if(!h.value||!i.definition.query||!_.value)return"";const b=[...i.context.filters,...i.definition.query.filters??[]],j=i.definition.query.dimensions??[],X={filters:b,metrics:i.definition.query.metrics??[],dimensions:j,time_range:i.definition.query.time_range||i.context.timeSpec,granularity:i.definition.query.granularity||O.value},He=["advanced","ai"].includes(i.definition.query.datasource)?i.definition.query.datasource:"advanced";return`${h.value}?q=${JSON.stringify(X)}&d=${He}&c=${i.definition.chart.type}`}),p=o.computed(()=>a.t("csvExport.defaultFilename")),y=o.computed(()=>_.value&&(m.value||i.context.editable)||!!x.value),_=o.computed(()=>!["golden_signals","top_n","gauge"].includes(i.definition.chart.type)),m=o.computed(()=>!!g.value||"allowCsvExport"in i.definition.chart&&i.definition.chart.allowCsvExport||i.context.editable),k={timeseries_line:Qe,timeseries_bar:Qe,horizontal_bar:Xe,vertical_bar:Xe,gauge:je,donut:Ot,golden_signals:St,top_n:Ht,slottable:void 0,single_value:je},S=o.computed(()=>{const b=k[i.definition.chart.type];return b&&{component:b,rendererProps:{query:i.definition.query,context:i.context,queryReady:i.queryReady,chartOptions:i.definition.chart,height:i.height-t*2,refreshCounter:i.refreshCounter}}}),x=o.computed(()=>{var j;const b=(j=i.definition.query)==null?void 0:j.time_range;if((b==null?void 0:b.type)==="relative"){const X=D.TimePeriods.get(D.TIMEFRAME_LOOKUP[b.time_range]);return X?X.display:(console.warn("Did not recognize the given relative time range:",b.time_range),b.time_range)}else if((b==null?void 0:b.type)==="absolute"){const X=b.tz||"Etc/UTC";return`${D.formatTime(b.start,{short:!0,tz:X})} - ${D.formatTime(b.end,{short:!0,tz:X})}`}return null}),O=o.computed(()=>n.value?D.msToGranularity(n.value.meta.granularity_ms):void 0),N=()=>{s("edit-tile",i.definition)},R=()=>{s("duplicate-tile",i.definition)},A=()=>{s("remove-tile",i.definition)},z=b=>{n.value=b},M=b=>{c.value=b},ee=()=>{M(!0)};return(b,j)=>{const X=o.resolveComponent("KTooltip"),He=o.resolveComponent("KBadge"),Ee=o.resolveComponent("KDropdownItem"),ei=o.resolveComponent("KDropdown");return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["tile-boundary",{editable:b.context.editable}]),"data-testid":`tile-${b.tileId}`},[b.definition.chart.type!=="slottable"?(o.openBlock(),o.createElementBlock("div",Mt,[o.createVNode(X,{class:"title-tooltip",disabled:!l.value,"max-width":"500",text:b.definition.chart.chartTitle},{default:o.withCtx(()=>[o.createElementVNode("div",{ref_key:"titleRef",ref:d,class:"title"},o.toDisplayString(b.definition.chart.chartTitle),513)]),_:1},8,["disabled","text"]),y.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:"tile-actions","data-testid":`tile-actions-${b.tileId}`},[x.value?(o.openBlock(),o.createBlock(He,{key:0},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(x.value),1)]),_:1})):o.createCommentVNode("",!0),_.value&&b.context.editable?(o.openBlock(),o.createBlock(o.unref(qe.EditIcon),{key:1,class:"edit-icon",color:o.unref(Ze),"data-testid":`edit-tile-${b.tileId}`,size:o.unref(Je),onClick:N},null,8,["color","data-testid","size"])):o.createCommentVNode("",!0),_.value&&m.value?(o.openBlock(),o.createBlock(ei,{key:2,class:"dropdown","data-testid":`chart-action-menu-${b.tileId}`,"kpop-attributes":{placement:"bottom-end"}},{items:o.withCtx(()=>[g.value?(o.openBlock(),o.createBlock(Ee,{key:0,"data-testid":`chart-jump-to-explore-${b.tileId}`,item:{label:o.unref(a).t("jumpToExplore"),to:g.value}},null,8,["data-testid","item"])):o.createCommentVNode("",!0),!("allowCsvExport"in b.definition.chart)||b.definition.chart.allowCsvExport?(o.openBlock(),o.createBlock(Ee,{key:1,class:"chart-export-button","data-testid":`chart-csv-export-${b.tileId}`,onClick:j[0]||(j[0]=ot=>ee())},{default:o.withCtx(()=>[o.createElementVNode("span",{class:"chart-export-trigger","data-testid":`csv-export-button-${b.tileId}`},o.toDisplayString(o.unref(a).t("csvExport.exportAsCsv")),9,Bt)]),_:1},8,["data-testid"])):o.createCommentVNode("",!0),b.context.editable?(o.openBlock(),o.createBlock(Ee,{key:2,"data-testid":`duplicate-tile-${b.tileId}`,onClick:R},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(a).t("renderer.duplicateTile")),1)]),_:1},8,["data-testid"])):o.createCommentVNode("",!0),b.context.editable?(o.openBlock(),o.createBlock(Ee,{key:3,"data-testid":`remove-tile-${b.tileId}`,onClick:A},{default:o.withCtx(()=>[o.createElementVNode("span",Pt,o.toDisplayString(o.unref(a).t("renderer.delete")),1)]),_:1},8,["data-testid"])):o.createCommentVNode("",!0)]),default:o.withCtx(()=>[o.createVNode(o.unref(qe.MoreIcon),{class:"kebab-action-menu",color:o.unref(Ze),"data-testid":`kebab-action-menu-${b.tileId}`,size:o.unref(Je)},null,8,["color","data-testid","size"])]),_:1},8,["data-testid"])):o.createCommentVNode("",!0)],8,It)):"description"in b.definition.chart?(o.openBlock(),o.createElementBlock("div",{key:1,class:"header-description","data-testid":`tile-description-${b.tileId}`},o.toDisplayString(b.definition.chart.description),9,qt)):o.createCommentVNode("",!0),c.value?(o.openBlock(),o.createBlock(o.unref(K.CsvExportModal),{key:2,"chart-data":n.value,"data-testid":`csv-export-modal-${b.tileId}`,filename:p.value,onToggleModal:M},null,8,["chart-data","data-testid","filename"])):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:"tile-content","data-testid":`tile-content-${b.tileId}`},[S.value?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(S.value.component),o.mergeProps({key:0},S.value.rendererProps,{onChartData:z,onZoomTimeRange:j[1]||(j[1]=ot=>s("zoom-time-range",ot))}),null,16)):o.createCommentVNode("",!0)],8,$t)],10,Lt)}}}),[["__scopeId","data-v-4ddafde1"]]),Gt=(f,e)=>{let t=0;const i=new Map;e.forEach(r=>{const a=r.layout.position.row,n=i.get(a),c=r.layout.size.rows===1&&!!r.layout.size.fitToContent;t=Math.max(t,a+r.layout.size.rows),n===void 0?i.set(a,c):i.set(a,n&&c)});const s=[];for(let r=0;r<t;r++)i.get(r)?s.push("auto"):s.push(`${f}px`);return s},it=J(o.defineComponent({__name:"GridLayout",props:{tileHeight:{type:Number,required:!1,default:()=>ae},tiles:{type:Array,required:!0}},setup(f){o.useCssVars(n=>({"7f0eb0fc":o.unref(Te),"5399b6ae":r.value}));const e=f,t=o.ref(null),i=o.ref(0),s=new ResizeObserver(n=>{window.requestAnimationFrame(()=>{!Array.isArray(n)||!n.length||(i.value=n[0].contentRect.width)})});o.onMounted(()=>{t.value&&s.observe(t.value)}),o.onUnmounted(()=>{t.value&&s.unobserve(t.value)});const r=o.computed(()=>Gt(e.tileHeight,e.tiles).join(" ")),a=o.computed(()=>e.tiles.map((n,c)=>({key:`tile-${c}`,tile:n,style:{"grid-column-start":n.layout.position.col+1,"grid-column-end":n.layout.position.col+1+n.layout.size.cols,"grid-row-start":n.layout.position.row+1,"grid-row-end":n.layout.position.row+1+n.layout.size.rows}})));return(n,c)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"gridContainer",ref:t,class:"kong-ui-public-grid-layout"},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.value,d=>(o.openBlock(),o.createElementBlock("div",{key:d.key,class:o.normalizeClass(["grid-cell",{"empty-cell":!d.tile}]),style:o.normalizeStyle(d.style)},[o.renderSlot(n.$slots,"tile",{style:o.normalizeStyle(d.style),tile:d.tile},void 0,!0)],6))),128))],512))}}),[["__scopeId","data-v-b27ebb1a"]]);function Ut(f,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(f,a));return r.prototype=e.prototype,r}class u{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 createWidgetDivs(e,t){var a,n;const i=u.createDiv(["grid-stack-item",e]),s=u.createDiv(["grid-stack-item-content"],i);return t.lazyLoad||((n=(a=t.grid)==null?void 0:a.opts)==null?void 0:n.lazyLoad)&&t.lazyLoad!==!1?t.visibleObservable||(t.visibleObservable=new IntersectionObserver(([c])=>{var d;c.isIntersecting&&((d=t.visibleObservable)==null||d.disconnect(),delete t.visibleObservable,w.renderCB(s,t))}),window.setTimeout(()=>{var c;return(c=t.visibleObservable)==null?void 0:c.observe(i)})):w.renderCB(s,t),i}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 u.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&&(u.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,n=s.top,c=this.getScrollElement(e);if(c!==null){const d=c.scrollTop;s.top<0&&i<0?e.offsetHeight>r?c.scrollTop+=i:c.scrollTop+=Math.abs(n)>Math.abs(i)?i:n:i>0&&(e.offsetHeight>r?c.scrollTop+=i:c.scrollTop+=a>i?i:a),t.top+=c.scrollTop-d}}}static updateScrollResize(e,t,i){const s=this.getScrollElement(t),r=s.clientHeight,a=s===this.getScrollElement()?0:s.getBoundingClientRect().top,n=e.clientY-a,c=n<i,d=n>r-i;c?s.scrollBy({behavior:"smooth",top:n-i}):d&&s.scrollBy({behavior:"smooth",top:i-(r-n)})}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=u.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]=u.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=u.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=document.createEvent("MouseEvents");s.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,0,e.target),(i||e.target).dispatchEvent(s)}static getValuesFromTransformedElement(e){const t=document.createElement("div");u.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 W{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 n={nested:!0,pack:!1};let c=0;for(;i=i||this.collide(e,r,s.skip);){if(c++>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 l={...t,y:i.y+i.h,...n};d=this._loading&&u.samePos(e,l)?!0:this.moveNode(e,l),(i.locked||this._loading)&&d?u.copyPos(t,e):!i.locked&&d&&s.pack&&(this._packNodes(),t.y=i.y+i.h,u.copyPos(e,t)),a=a||d}else d=this.moveNode(i,{...i,y:t.y+t.h,skip:e,...n});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&&u.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&&u.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,n=.5;for(let c of i){if(c.locked||!c._rect)break;const d=c._rect;let l=Number.MAX_VALUE,h=Number.MAX_VALUE;s.y<d.y?l=(r.y+r.h-d.y)/d.h:s.y+s.h>d.y+d.h&&(l=(d.y+d.h-r.y)/d.h),s.x<d.x?h=(r.x+r.w-d.x)/d.w:s.x+s.w>d.x+d.w&&(h=(d.x+d.w-r.x)/d.w);const g=Math.min(h,l);g>n&&(n=g,a=c)}return t.collide=a,a}cacheRects(e,t,i,s,r,a){return this.nodes.forEach(n=>n._rect={y:n.y*t+i,x:n.x*e+a,w:n.w*e-a-s,h:n.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=u.isTouching(e,t)))return i();if(s!==!1){if(e.w===t.w&&e.x===t.x&&(s||(s=u.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=u.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,n,c)=>{let d;a.locked||(a.autoPosition=!0,e==="list"&&n&&(d=c[n-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=u.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??W._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 u.defaults(e,s),e.autoPosition||delete e.autoPosition,e.noResize||delete e.noResize,e.noMove||delete e.noMove,u.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||u.copyPos({},e);if(e.maxW&&e.w&&(e.w=Math.min(e.w,e.maxW)),e.maxH&&e.h&&(e.h=Math.min(e.h,e.maxH)),e.minW&&e.w&&e.minW<=this.column&&(e.w=Math.max(e.w,e.minW)),e.minH&&e.h&&(e.h=Math.max(e.h,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),u.samePos(e,i)||(e._dirty=!0),this}getDirtyNodes(e){return e?this.nodes.filter(t=>t._dirty&&!u.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=u.copyPos({},e),delete e._dirty}),this._hasLocked=this.nodes.some(e=>e.locked),this}restoreInitial(){return this.nodes.forEach(e=>{!e._orig||u.samePos(e,e._orig)||(u.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 n=r;!a;++n){const c=n%i,d=Math.floor(n/i);if(c+e.w>i)continue;const l={x:c,y:d,w:e.w,h:e.h};t.find(h=>u.isIntercepted(l,h))||((e.x!==c||e.y!==d)&&(e._dirty=!0),e.x=c,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 W({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 n=this.nodes.find(c=>c._id===a._id);n&&(u.copyPos(n,a),n._dirty=!0)}),this._notify(),!0):!1}willItFit(e){if(delete e._willFitPos,!this.maxRow)return!0;const t=new W({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=u.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,l;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=u.copyPos({},e,!0);if(u.copyPos(r,t),this.nodeBoundFix(r,s),u.copyPos(t,r),!t.forceCollide&&u.samePos(e,t))return!1;const a=u.copyPos({},e),n=this.collideAll(e,r,t.skip);let c=!0;if(n.length){const h=e._moving&&!t.nested;let g=h?this.directionCollideCoverage(e,t,n):n[0];if(h&&g&&((l=(d=e.grid)==null?void 0:d.opts)!=null&&l.subGridDynamic)&&!e.grid._isTemp){const p=u.areaIntercept(t.rect,g._rect),y=u.area(t.rect),_=u.area(g._rect);p/(y<_?y:_)>.8&&(g.grid.makeSubGrid(g.el,void 0,e),g=void 0)}g?c=!this._fixCollisions(e,r,g,t):(c=!1,i&&delete t.pack)}return c&&!u.samePos(e,r)&&(e._dirty=!0,u.copyPos(e,r)),t.pack&&this._packNodes()._notify(),!u.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(n=>{const c=s==null?void 0:s.find(l=>l._id===n._id),d={...n,...c||{}};u.removeInternalForSave(d,!e),t&&t(n,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(n=>n._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 n;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:u.sort(this.nodes,-1);if(t>e&&this._layouts){const c=this._layouts[t]||[],d=this._layouts.length-1;!c.length&&e!==d&&((n=this._layouts[d])!=null&&n.length)&&(e=d,this._layouts[d].forEach(l=>{const h=a.find(g=>g._id===l._id);h&&(!s&&!l.autoPosition&&(h.x=l.x??h.x,h.y=l.y??h.y),h.w=l.w??h.w,(l.x==null||l.y===void 0)&&(h.autoPosition=!0))})),c.forEach(l=>{const h=a.findIndex(g=>g._id===l._id);if(h!==-1){const g=a[h];if(s){g.w=l.w;return}(l.autoPosition||isNaN(l.x)||isNaN(l.y))&&this.findEmptyPosition(l,r),l.autoPosition||(g.x=l.x??g.x,g.y=l.y??g.y,g.w=l.w??g.w,r.push(g)),a.splice(h,1)}})}if(s)this.compact(i,!1);else{if(a.length)if(typeof i=="function")i(t,e,r,a);else{const c=s||i==="none"?1:t/e,d=i==="move"||i==="moveScale",l=i==="scale"||i==="moveScale";a.forEach(h=>{h.x=t===1?0:d?Math.round(h.x*c):Math.min(h.x,t-1),h.w=t===1||e===1?1:l?Math.round(h.w*c)||1:Math.min(h.w,t),r.push(h)}),a=[]}r=u.sort(r,-1),this._inColumnResize=!0,this.nodes=[],r.forEach(c=>{this.addNode(c,!1),delete c._orig})}return this.nodes.forEach(c=>delete c._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 n=r.id?this.nodes.find(c=>c.id===r.id):void 0;r._id=(n==null?void 0:n._id)??W._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??W._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}}W._idSeq=0;const q={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 C{}const U=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 V{}function me(f,e){if(f.touches.length>1)return;f.cancelable&&f.preventDefault();const t=f.changedTouches[0],i=document.createEvent("MouseEvents");i.initMouseEvent(e,!0,!0,window,1,t.screenX,t.screenY,t.clientX,t.clientY,!1,!1,!1,!1,0,null),f.target.dispatchEvent(i)}function st(f,e){f.cancelable&&f.preventDefault();const t=document.createEvent("MouseEvents");t.initMouseEvent(e,!0,!0,window,1,f.screenX,f.screenY,f.clientX,f.clientY,!1,!1,!1,!1,0,null),f.target.dispatchEvent(t)}function pe(f){V.touchHandled||(V.touchHandled=!0,me(f,"mousedown"))}function ye(f){V.touchHandled&&me(f,"mousemove")}function _e(f){if(!V.touchHandled)return;V.pointerLeaveTimeout&&(window.clearTimeout(V.pointerLeaveTimeout),delete V.pointerLeaveTimeout);const e=!!C.dragElement;me(f,"mouseup"),e||me(f,"click"),V.touchHandled=!1}function ve(f){f.pointerType!=="mouse"&&f.target.releasePointerCapture(f.pointerId)}function rt(f){C.dragElement&&f.pointerType!=="mouse"&&st(f,"mouseenter")}function nt(f){C.dragElement&&f.pointerType!=="mouse"&&(V.pointerLeaveTimeout=window.setTimeout(()=>{delete V.pointerLeaveTimeout,st(f,"mouseleave")},10))}class we{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(`${we.prefix}${this.dir}`),e.style.zIndex="100",e.style.userSelect="none",this.host.appendChild(this.el),this.el.addEventListener("mousedown",this._mouseDown),U&&(this.el.addEventListener("touchstart",pe),this.el.addEventListener("pointerdown",ve)),this}destroy(){return this.moving&&this._mouseUp(this.mouseDownEvent),this.el.removeEventListener("mousedown",this._mouseDown),U&&(this.el.removeEventListener("touchstart",pe),this.el.removeEventListener("pointerdown",ve)),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),U&&(this.el.addEventListener("touchmove",ye),this.el.addEventListener("touchend",_e)),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),U&&(this.el.removeEventListener("touchmove",ye),this.el.removeEventListener("touchend",_e)),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}}we.prefix="ui-resizable-";class Se{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 le extends Se{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),C.overResizeElement===this&&delete C.overResizeElement),this}_mouseOver(e){C.overResizeElement||C.dragElement||(C.overResizeElement=this,this.el.classList.remove("ui-resizable-autohide"))}_mouseOut(e){C.overResizeElement===this&&(delete C.overResizeElement,this.el.classList.add("ui-resizable-autohide"))}_setupHandlers(){return this.handlers=this.option.handles.split(",").map(e=>e.trim()).map(e=>new we(this.el,e,{start:t=>{this._resizeStart(t)},stop:t=>{this._resizeStop(t)},move:t=>{this._resizing(t,e)}})),this}_resizeStart(e){this.sizeToContent=u.shouldSizeToContent(this.el.gridstackNode,!0),this.originalRect=this.el.getBoundingClientRect(),this.scrollEl=u.getScrollElement(this.el),this.scrollY=this.scrollEl.scrollTop,this.scrolled=0,this.startEvent=e,this._setupHelper(),this._applyChange();const t=u.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=u.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=u.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=le._originStyleProp.map(i=>this.el.style[i]),this.parentOriginStylePosition=this.el.parentElement.style.position;const e=this.el.parentElement,t=u.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 le._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 n,c;t.indexOf("e")>-1?s.width+=r:t.indexOf("w")>-1&&(s.width-=r,s.left+=r,n=!0),t.indexOf("s")>-1?s.height+=a:t.indexOf("n")>-1&&(s.height-=a,s.top+=a,c=!0);const d=this._constrainSize(s.width,s.height,n,c);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,n=r.minWidth/this.rectScale.x||e,c=(s?r.maxHeightMoveUp:r.maxHeight)||Number.MAX_SAFE_INTEGER,d=r.minHeight/this.rectScale.y||t,l=Math.min(a,Math.max(n,e)),h=Math.min(c,Math.max(d,t));return{width:l,height:h}}_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}}le._originStyleProp=["width","height","position","left","top","opacity","zIndex"];const Wt='input,textarea,button,select,option,[contenteditable="true"],.ui-resizable-handle';class he extends Se{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),U&&(e.addEventListener("touchstart",pe),e.addEventListener("pointerdown",ve))}),this.el.classList.remove("ui-draggable-disabled"))}disable(e=!1){this.disabled!==!0&&(super.disable(),this.dragEls.forEach(t=>{t.removeEventListener("mousedown",this._mouseDown),U&&(t.removeEventListener("touchstart",pe),t.removeEventListener("pointerdown",ve))}),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(!C.mouseHandled)return e.button!==0||!this.dragEls.find(t=>t===e.target)&&e.target.closest(Wt)||this.option.cancel&&e.target.closest(this.option.cancel)||(this.mouseDownEvent=e,delete this.dragging,delete C.dragElement,delete C.dropElement,document.addEventListener("mousemove",this._mouseMove,{capture:!0,passive:!0}),document.addEventListener("mouseup",this._mouseUp,!0),U&&(e.currentTarget.addEventListener("touchmove",ye),e.currentTarget.addEventListener("touchend",_e)),e.preventDefault(),document.activeElement&&document.activeElement.blur(),C.mouseHandled=!0),!0}_callDrag(e){if(!this.dragging)return;const t=u.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),C.pauseDrag){const s=Number.isInteger(C.pauseDrag)?C.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,C.dragElement=this;const s=(i=this.el.gridstackNode)==null?void 0:i.grid;s?C.dropElement=s.el.ddElement.ddDroppable:delete C.dropElement,this.helper=this._createHelper(),this._setupHelperContainmentStyle(),this.dragTransform=u.getValuesFromTransformedElement(this.helperContainment),this.dragOffset=this._getDragOffset(e,this.el,this.helperContainment),this._setupHelperStyle(e);const r=u.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),U&&e.currentTarget&&(e.currentTarget.removeEventListener("touchmove",ye,!0),e.currentTarget.removeEventListener("touchend",_e,!0)),this.dragging){delete this.dragging,(t=this.el.gridstackNode)==null||delete t._origRotate,document.removeEventListener("keydown",this._keyEvent),((i=C.dropElement)==null?void 0:i.el)===this.el.parentElement&&delete C.dropElement,this.helperContainment.style.position=this.parentOriginStylePosition||null,this.helper!==this.el&&this.helper.remove(),this._removeHelperStyle();const s=u.initEvent(e,{target:this.el,type:"dragstop"});this.option.stop&&this.option.stop(s),this.triggerEvent("dragstop",s),C.dropElement&&C.dropElement.drop(e)}delete this.helper,delete this.mouseDownEvent,delete C.dragElement,delete C.dropElement,delete C.mouseHandled,e.preventDefault()}_keyEvent(e){var s,r;const t=this.el.gridstackNode,i=(t==null?void 0:t.grid)||((r=(s=C.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(!u.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",u.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=u.cloneNode(this.el)),document.body.contains(e)||u.appendTo(e,this.option.appendTo==="parent"?this.el.parentElement:this.option.appendTo),this.dragElementOriginStyle=he.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",he.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}}}}he.originStyleProp=["width","height","transform","transform-origin","transition","pointerEvents","position","left","top","minWidth","willChange"];class Vt extends Se{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),U&&(this.el.addEventListener("pointerenter",rt),this.el.addEventListener("pointerleave",nt)))}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),U&&(this.el.removeEventListener("pointerenter",rt),this.el.removeEventListener("pointerleave",nt)))}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(!C.dragElement||!this._canDrop(C.dragElement.el))return;e.preventDefault(),e.stopPropagation(),C.dropElement&&C.dropElement!==this&&C.dropElement._mouseLeave(e,!0),C.dropElement=this;const t=u.initEvent(e,{target:this.el,type:"dropover"});this.option.over&&this.option.over(t,this._ui(C.dragElement)),this.triggerEvent("dropover",t),this.el.classList.add("ui-droppable-over")}_mouseLeave(e,t=!1){var s;if(!C.dragElement||C.dropElement!==this)return;e.preventDefault(),e.stopPropagation();const i=u.initEvent(e,{target:this.el,type:"dropout"});if(this.option.out&&this.option.out(i,this._ui(C.dragElement)),this.triggerEvent("dropout",i),C.dropElement===this&&(delete C.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=u.initEvent(e,{target:this.el,type:"drop"});this.option.drop&&this.option.drop(t,this._ui(C.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 Ae{static init(e){return e.ddElement||(e.ddElement=new Ae(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 he(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 le(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 Vt(this.el,e),this}cleanDroppable(){return this.ddDroppable&&(this.ddDroppable.destroy(),delete this.ddDroppable),this}}class Kt{resizable(e,t,i,s){return this._getDDElements(e).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 n=r.el.gridstackNode.grid;let c=r.el.getAttribute("gs-resize-handles")||n.opts.resizable.handles||"e,s,se";c==="all"&&(c="n,e,s,w,se,sw,ne,nw");const d=!n.opts.alwaysShowResizeHandle;r.setupResizable({...n.opts.resizable,handles:c,autoHide:d,start:t.start,stop:t.stop,resize:t.resize})}}),this}draggable(e,t,i,s){return this._getDDElements(e).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).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,C.dragElement?C.dragElement.el:r.target,C.dragElement?C.dragElement.helper:null)})),this}off(e,t){return this._getDDElements(e).forEach(i=>i.off(t)),this}_getDDElements(e,t=!0){const i=u.getElements(e);if(!i.length)return[];const s=i.map(r=>r.ddElement||(t?Ae.init(r):null));return t||s.filter(r=>r),s}}/*!
1
+ (function(b,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue"),require("@kong-ui-public/analytics-utilities"),require("@kong-ui-public/analytics-chart"),require("swrv"),require("axios"),require("@kong-ui-public/i18n"),require("@kong-ui-public/analytics-config-store"),require("@kong-ui-public/analytics-metric-provider"),require("@kong/icons")):typeof define=="function"&&define.amd?define(["exports","vue","@kong-ui-public/analytics-utilities","@kong-ui-public/analytics-chart","swrv","axios","@kong-ui-public/i18n","@kong-ui-public/analytics-config-store","@kong-ui-public/analytics-metric-provider","@kong/icons"],o):(b=typeof globalThis<"u"?globalThis:b||self,o(b["kong-ui-public-dashboard-renderer"]={},b.Vue,b["kong-ui-public-analytics-utilities"],b["kong-ui-public-analytics-chart"],b.swrv,b.axios,b["kong-ui-public-i18n"],b["kong-ui-public-analytics-config-store"],b["kong-ui-public-analytics-metric-provider"],b.KongIcons))})(this,function(b,o,D,K,ke,si,Ie,Be,Pe,qe){"use strict";var ti=Object.defineProperty;var at=b=>{throw TypeError(b)};var ii=(b,o,D)=>o in b?ti(b,o,{enumerable:!0,configurable:!0,writable:!0,value:D}):b[o]=D;var lt=(b,o,D)=>ii(b,typeof o!="symbol"?o+"":o,D),Oe=(b,o,D)=>o.has(b)||at("Cannot "+D);var v=(b,o,D)=>(Oe(b,o,"read from private field"),D?D.call(b):o.get(b)),L=(b,o,D)=>o.has(b)?at("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(b):o.set(b,D),H=(b,o,D,K)=>(Oe(b,o,"write to private field"),K?K.call(b,D):o.set(b,D),D),I=(b,o,D)=>(Oe(b,o,"access private method"),D);var ge=(b,o,D,K)=>({set _(ke){H(b,o,ke,D)},get _(){return v(b,o,K)}});var $,ie,se,Z,de,re,ce,F,ne,P,ue,G,oe,Y,fe,Ee,T,ht,dt,ct,ut,ft,Ce,Le,Me,xe,gt,Re;var $e=(f=>(f.VALIDATING="VALIDATING",f.VALIDATING_HAS_DATA="VALIDATING_HAS_DATA",f.PENDING="PENDING",f.SUCCESS="SUCCESS",f.SUCCESS_HAS_DATA="SUCCESS_HAS_DATA",f.ERROR="ERROR",f.STALE_IF_ERROR="STALE_IF_ERROR",f))($e||{});const mt=f=>{var e,t,i,s,r;return f?!!((e=Object.keys(f))!=null&&e.length||(t=f.data)!=null&&t.length||(s=(i=f.data)==null?void 0:i.data)!=null&&s.length||!((r=f.data)!=null&&r.data)&&typeof f.data=="object"&&Object.keys(f==null?void 0:f.data).length):!1};function pt(f=o.ref({}),e,t,i=mt){const s=o.ref("PENDING");return o.watchEffect(()=>{const r=i(f.value);if(f.value&&r&&t.value){s.value="VALIDATING_HAS_DATA";return}if(f.value&&t.value){s.value="VALIDATING";return}if(f.value&&e.value){s.value="STALE_IF_ERROR";return}if(f.value===void 0&&!e.value){s.value="PENDING";return}if(f.value&&!e.value&&r){s.value="SUCCESS_HAS_DATA";return}if(f.value&&!e.value){s.value="SUCCESS";return}f.value===void 0&&e&&(s.value="ERROR")}),{state:s,swrvState:$e}}const yt={renderer:{noQueryBridge:"No query bridge provided. Unable to render dashboard.",trendRange:{"24h":"Last 24-hour summary","7d":"Last 7-day summary","30d":"Last 30-day summary"},edit:"Edit",duplicateTile:"Duplicate",remove:"Remove",delete:"Delete"},queryDataProvider:{timeRangeExceeded:"The time range for this report is outside of your organization's data retention period"},csvExport:{defaultFilename:"Chart export",exportAsCsv:"Export as CSV"},jumpToExplore:"Explore"};function _t(){const f=Ie.createI18n("en-us",yt);return{i18n:f,i18nT:Ie.i18nTComponent(f)}}const ae=170,Te=6,Q="analytics-query-provider",De="{entity-id}",Fe="{cp-id}",Ge="{timeframe}",Ue=30*1e3;function vt(){const f=o.inject(Q);return{evaluateFeatureFlag:(t,i)=>f?f.evaluateFeatureFlagFn(t,i):i}}function wt(f){return f&&f.__esModule&&Object.prototype.hasOwnProperty.call(f,"default")?f.default:f}var We={exports:{}};(function(f){var e=Object.prototype.hasOwnProperty,t="~";function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(t=!1));function s(c,d,l){this.fn=c,this.context=d,this.once=l||!1}function r(c,d,l,h,g){if(typeof l!="function")throw new TypeError("The listener must be a function");var p=new s(l,h||c,g),y=t?t+d:d;return c._events[y]?c._events[y].fn?c._events[y]=[c._events[y],p]:c._events[y].push(p):(c._events[y]=p,c._eventsCount++),c}function a(c,d){--c._eventsCount===0?c._events=new i:delete c._events[d]}function n(){this._events=new i,this._eventsCount=0}n.prototype.eventNames=function(){var d=[],l,h;if(this._eventsCount===0)return d;for(h in l=this._events)e.call(l,h)&&d.push(t?h.slice(1):h);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(l)):d},n.prototype.listeners=function(d){var l=t?t+d:d,h=this._events[l];if(!h)return[];if(h.fn)return[h.fn];for(var g=0,p=h.length,y=new Array(p);g<p;g++)y[g]=h[g].fn;return y},n.prototype.listenerCount=function(d){var l=t?t+d:d,h=this._events[l];return h?h.fn?1:h.length:0},n.prototype.emit=function(d,l,h,g,p,y){var _=t?t+d:d;if(!this._events[_])return!1;var m=this._events[_],k=arguments.length,S,x;if(m.fn){switch(m.once&&this.removeListener(d,m.fn,void 0,!0),k){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,l),!0;case 3:return m.fn.call(m.context,l,h),!0;case 4:return m.fn.call(m.context,l,h,g),!0;case 5:return m.fn.call(m.context,l,h,g,p),!0;case 6:return m.fn.call(m.context,l,h,g,p,y),!0}for(x=1,S=new Array(k-1);x<k;x++)S[x-1]=arguments[x];m.fn.apply(m.context,S)}else{var O=m.length,N;for(x=0;x<O;x++)switch(m[x].once&&this.removeListener(d,m[x].fn,void 0,!0),k){case 1:m[x].fn.call(m[x].context);break;case 2:m[x].fn.call(m[x].context,l);break;case 3:m[x].fn.call(m[x].context,l,h);break;case 4:m[x].fn.call(m[x].context,l,h,g);break;default:if(!S)for(N=1,S=new Array(k-1);N<k;N++)S[N-1]=arguments[N];m[x].fn.apply(m[x].context,S)}}return!0},n.prototype.on=function(d,l,h){return r(this,d,l,h,!1)},n.prototype.once=function(d,l,h){return r(this,d,l,h,!0)},n.prototype.removeListener=function(d,l,h,g){var p=t?t+d:d;if(!this._events[p])return this;if(!l)return a(this,p),this;var y=this._events[p];if(y.fn)y.fn===l&&(!g||y.once)&&(!h||y.context===h)&&a(this,p);else{for(var _=0,m=[],k=y.length;_<k;_++)(y[_].fn!==l||g&&!y[_].once||h&&y[_].context!==h)&&m.push(y[_]);m.length?this._events[p]=m.length===1?m[0]:m:a(this,p)}return this},n.prototype.removeAllListeners=function(d){var l;return d?(l=t?t+d:d,this._events[l]&&a(this,l)):(this._events=new i,this._eventsCount=0),this},n.prototype.off=n.prototype.removeListener,n.prototype.addListener=n.prototype.on,n.prefixed=t,n.EventEmitter=n,f.exports=n})(We);var Et=We.exports;const bt=wt(Et);class Ve extends Error{constructor(e){super(e),this.name="TimeoutError"}}class Ct extends Error{constructor(e){super(),this.name="AbortError",this.message=e}}const Ke=f=>globalThis.DOMException===void 0?new Ct(f):new DOMException(f),Ye=f=>{const e=f.reason===void 0?Ke("This operation was aborted."):f.reason;return e instanceof Error?e:Ke(e)};function xt(f,e){const{milliseconds:t,fallback:i,message:s,customTimers:r={setTimeout,clearTimeout}}=e;let a,n;const d=new Promise((l,h)=>{if(typeof t!="number"||Math.sign(t)!==1)throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${t}\``);if(e.signal){const{signal:p}=e;p.aborted&&h(Ye(p)),n=()=>{h(Ye(p))},p.addEventListener("abort",n,{once:!0})}if(t===Number.POSITIVE_INFINITY){f.then(l,h);return}const g=new Ve;a=r.setTimeout.call(void 0,()=>{if(i){try{l(i())}catch(p){h(p)}return}typeof f.cancel=="function"&&f.cancel(),s===!1?l():s instanceof Error?h(s):(g.message=s??`Promise timed out after ${t} milliseconds`,h(g))},t),(async()=>{try{l(await f)}catch(p){h(p)}})()}).finally(()=>{d.clear(),n&&e.signal&&e.signal.removeEventListener("abort",n)});return d.clear=()=>{r.clearTimeout.call(void 0,a),a=void 0},d}function Rt(f,e,t){let i=0,s=f.length;for(;s>0;){const r=Math.trunc(s/2);let a=i+r;t(f[a],e)<=0?(i=++a,s-=r+1):s=r}return i}class kt{constructor(){L(this,$,[])}enqueue(e,t){t={priority:0,...t};const i={priority:t.priority,id:t.id,run:e};if(this.size===0||v(this,$)[this.size-1].priority>=t.priority){v(this,$).push(i);return}const s=Rt(v(this,$),i,(r,a)=>a.priority-r.priority);v(this,$).splice(s,0,i)}setPriority(e,t){const i=v(this,$).findIndex(r=>r.id===e);if(i===-1)throw new ReferenceError(`No promise function with the id "${e}" exists in the queue.`);const[s]=v(this,$).splice(i,1);this.enqueue(s.run,{priority:t,id:e})}dequeue(){const e=v(this,$).shift();return e==null?void 0:e.run}filter(e){return v(this,$).filter(t=>t.priority===e.priority).map(t=>t.run)}get size(){return v(this,$).length}}$=new WeakMap;class Tt extends bt{constructor(t){var i,s;super();L(this,T);L(this,ie);L(this,se);L(this,Z,0);L(this,de);L(this,re);L(this,ce,0);L(this,F);L(this,ne);L(this,P);L(this,ue);L(this,G,0);L(this,oe);L(this,Y);L(this,fe);L(this,Ee,1n);lt(this,"timeout");if(t={carryoverConcurrencyCount:!1,intervalCap:Number.POSITIVE_INFINITY,interval:0,concurrency:Number.POSITIVE_INFINITY,autoStart:!0,queueClass:kt,...t},!(typeof t.intervalCap=="number"&&t.intervalCap>=1))throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${((i=t.intervalCap)==null?void 0:i.toString())??""}\` (${typeof t.intervalCap})`);if(t.interval===void 0||!(Number.isFinite(t.interval)&&t.interval>=0))throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${((s=t.interval)==null?void 0:s.toString())??""}\` (${typeof t.interval})`);H(this,ie,t.carryoverConcurrencyCount),H(this,se,t.intervalCap===Number.POSITIVE_INFINITY||t.interval===0),H(this,de,t.intervalCap),H(this,re,t.interval),H(this,P,new t.queueClass),H(this,ue,t.queueClass),this.concurrency=t.concurrency,this.timeout=t.timeout,H(this,fe,t.throwOnTimeout===!0),H(this,Y,t.autoStart===!1)}get concurrency(){return v(this,oe)}set concurrency(t){if(!(typeof t=="number"&&t>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${t}\` (${typeof t})`);H(this,oe,t),I(this,T,xe).call(this)}setPriority(t,i){v(this,P).setPriority(t,i)}async add(t,i={}){return i.id??(i.id=(ge(this,Ee)._++).toString()),i={timeout:this.timeout,throwOnTimeout:v(this,fe),...i},new Promise((s,r)=>{v(this,P).enqueue(async()=>{var a;ge(this,G)._++,ge(this,Z)._++;try{(a=i.signal)==null||a.throwIfAborted();let n=t({signal:i.signal});i.timeout&&(n=xt(Promise.resolve(n),{milliseconds:i.timeout})),i.signal&&(n=Promise.race([n,I(this,T,gt).call(this,i.signal)]));const c=await n;s(c),this.emit("completed",c)}catch(n){if(n instanceof Ve&&!i.throwOnTimeout){s();return}r(n),this.emit("error",n)}finally{I(this,T,ct).call(this)}},i),this.emit("add"),I(this,T,Ce).call(this)})}async addAll(t,i){return Promise.all(t.map(async s=>this.add(s,i)))}start(){return v(this,Y)?(H(this,Y,!1),I(this,T,xe).call(this),this):this}pause(){H(this,Y,!0)}clear(){H(this,P,new(v(this,ue)))}async onEmpty(){v(this,P).size!==0&&await I(this,T,Re).call(this,"empty")}async onSizeLessThan(t){v(this,P).size<t||await I(this,T,Re).call(this,"next",()=>v(this,P).size<t)}async onIdle(){v(this,G)===0&&v(this,P).size===0||await I(this,T,Re).call(this,"idle")}get size(){return v(this,P).size}sizeBy(t){return v(this,P).filter(t).length}get pending(){return v(this,G)}get isPaused(){return v(this,Y)}}ie=new WeakMap,se=new WeakMap,Z=new WeakMap,de=new WeakMap,re=new WeakMap,ce=new WeakMap,F=new WeakMap,ne=new WeakMap,P=new WeakMap,ue=new WeakMap,G=new WeakMap,oe=new WeakMap,Y=new WeakMap,fe=new WeakMap,Ee=new WeakMap,T=new WeakSet,ht=function(){return v(this,se)||v(this,Z)<v(this,de)},dt=function(){return v(this,G)<v(this,oe)},ct=function(){ge(this,G)._--,I(this,T,Ce).call(this),this.emit("next")},ut=function(){I(this,T,Me).call(this),I(this,T,Le).call(this),H(this,ne,void 0)},ft=function(){const t=Date.now();if(v(this,F)===void 0){const i=v(this,ce)-t;if(i<0)H(this,Z,v(this,ie)?v(this,G):0);else return v(this,ne)===void 0&&H(this,ne,setTimeout(()=>{I(this,T,ut).call(this)},i)),!0}return!1},Ce=function(){if(v(this,P).size===0)return v(this,F)&&clearInterval(v(this,F)),H(this,F,void 0),this.emit("empty"),v(this,G)===0&&this.emit("idle"),!1;if(!v(this,Y)){const t=!v(this,T,ft);if(v(this,T,ht)&&v(this,T,dt)){const i=v(this,P).dequeue();return i?(this.emit("active"),i(),t&&I(this,T,Le).call(this),!0):!1}}return!1},Le=function(){v(this,se)||v(this,F)!==void 0||(H(this,F,setInterval(()=>{I(this,T,Me).call(this)},v(this,re))),H(this,ce,Date.now()+v(this,re)))},Me=function(){v(this,Z)===0&&v(this,G)===0&&v(this,F)&&(clearInterval(v(this,F)),H(this,F,void 0)),H(this,Z,v(this,ie)?v(this,G):0),I(this,T,xe).call(this)},xe=function(){for(;I(this,T,Ce).call(this););},gt=async function(t){return new Promise((i,s)=>{t.addEventListener("abort",()=>{s(t.reason)},{once:!0})})},Re=async function(t,i){return new Promise(s=>{const r=()=>{i&&!i()||(this.off(t,r),s())};this.on(t,r)})};const te={useI18n:_t,useEvaluateFeatureFlag:vt,useRequestQueue:()=>{const f=Be.useAnalyticsConfigStore(),e=o.inject(Q);if(!e)return;if(e.queryFnOverride){console.warn("Detected incorrect use of useRequestQueue. This composable should not be used in nested components. Please discuss with team-data or report an issue if you feel you have a use case.");return}const t=new Tt({carryoverConcurrencyCount:!0,concurrency:f.maxParallelRequests,interval:f.requestInterval,intervalCap:f.requestIntervalCap}),i={...e,queryFnOverride:!0,queryFn:(s,r)=>t.add(()=>e.queryFn(s,r),{throwOnTimeout:!0})};o.provide(Q,i)}},Ne=o.defineComponent({__name:"QueryDataProvider",props:{context:{},query:{},queryReady:{type:Boolean},refreshCounter:{}},emits:["chart-data","queryComplete"],setup(f,{emit:e}){const t=f,i=e,{i18n:s}=te.useI18n(),r=o.inject(Q),a=()=>t.queryReady&&r?JSON.stringify([t.query,t.context,t.refreshCounter]):null,n=new AbortController;o.onUnmounted(()=>{n.abort()});const c=(k,S,x)=>{const O=[];return S&&O.push(...S),O.push(...D.stripUnknownFilters(k,x)),O},{data:d,error:l,isValidating:h}=ke(a,async()=>{var k,S,x,O;try{let{datasource:N,...R}=t.query;N||(N="basic");const A=c(N,t.query.filters,t.context.filters);let z=t.query.time_range;z?z.tz||(z={...z,tz:t.context.tz}):z={...t.context.timeSpec,tz:t.context.tz};const M={datasource:N,query:{...R,time_range:z,filters:A}};return r==null?void 0:r.queryFn(M,n)}catch(N){y.value=((S=(k=N==null?void 0:N.response)==null?void 0:k.data)==null?void 0:S.message)==="Range not allowed for this tier"?s.t("queryDataProvider.timeRangeExceeded"):((O=(x=N==null?void 0:N.response)==null?void 0:x.data)==null?void 0:O.message)||(N==null?void 0:N.message)}finally{i("queryComplete")}},{refreshInterval:t.context.refreshInterval,revalidateOnFocus:!1}),{state:g,swrvState:p}=pt(d,l,h),y=o.ref(null),_=o.computed(()=>g.value===p.ERROR||!!y.value),m=o.computed(()=>!t.queryReady||g.value===p.PENDING);return o.watch(d,k=>{k&&i("chart-data",k)}),(k,S)=>{const x=o.resolveComponent("KSkeleton"),O=o.resolveComponent("KEmptyState");return m.value||!o.unref(d)&&!_.value?(o.openBlock(),o.createBlock(x,{key:0,class:"chart-skeleton",type:"table"})):_.value?(o.openBlock(),o.createBlock(O,{key:1,"action-button-visible":!1,"data-testid":"chart-empty-state","icon-variant":"error"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(y.value),1)]),_:1})):o.unref(d)?o.renderSlot(k.$slots,"default",{key:2,data:o.unref(d)}):o.createCommentVNode("",!0)}}}),Dt=o.defineComponent({__name:"SimpleChartRenderer",props:{query:{},context:{},queryReady:{type:Boolean},chartOptions:{},height:{},refreshCounter:{}},setup(f){o.useCssVars(i=>({"35a26ebf":`${i.height}px`}));const e=f,t=o.computed(()=>e.chartOptions.type==="single_value");return(i,s)=>(o.openBlock(),o.createBlock(Ne,{context:i.context,query:i.query,"query-ready":i.queryReady,"refresh-counter":i.refreshCounter},{default:o.withCtx(({data:r})=>[o.createElementVNode("div",{class:o.normalizeClass(["analytics-chart",{"single-value":t.value}])},[o.createVNode(o.unref(K.SimpleChart),{"chart-data":r,"chart-options":i.chartOptions,"synthetics-data-key":t.value?void 0:i.chartOptions.syntheticsDataKey},null,8,["chart-data","chart-options","synthetics-data-key"])],2)]),_:1},8,["context","query","query-ready","refresh-counter"]))}}),J=(f,e)=>{const t=f.__vccOpts||f;for(const[i,s]of e)t[i]=s;return t},je=J(Dt,[["__scopeId","data-v-65cc8607"]]),Nt={class:"analytics-chart"},ze=J(o.defineComponent({__name:"BaseAnalyticsChartRenderer",props:{query:{},context:{},queryReady:{type:Boolean},chartOptions:{},height:{},refreshCounter:{},extraProps:{}},emits:["edit-tile","chart-data","zoom-time-range"],setup(f,{emit:e}){const t=f,i=e,{i18n:s}=te.useI18n(),{evaluateFeatureFlag:r}=te.useEvaluateFeatureFlag(),a=r("explore-v4-fine-granularity",!1),n=o.computed(()=>({type:t.chartOptions.type,stacked:t.chartOptions.stacked??!1,chartDatasetColors:t.chartOptions.chartDatasetColors,threshold:t.chartOptions.threshold})),c=()=>{i("edit-tile")},d=l=>{i("chart-data",l)};return(l,h)=>{const g=o.resolveComponent("KDropdownItem");return o.openBlock(),o.createBlock(Ne,{context:l.context,query:l.query,"query-ready":l.queryReady,"refresh-counter":l.refreshCounter,onChartData:d},{default:o.withCtx(({data:p})=>[o.createElementVNode("div",Nt,[o.createVNode(o.unref(K.AnalyticsChart),o.mergeProps({"allow-csv-export":l.chartOptions.allowCsvExport,"chart-data":p,"chart-options":n.value,"legend-position":"bottom","show-menu":l.context.editable,"synthetics-data-key":l.chartOptions.syntheticsDataKey,"timeseries-zoom":o.unref(a)&&!l.query.time_range,"tooltip-title":""},l.extraProps,{onZoomTimeRange:h[0]||(h[0]=y=>i("zoom-time-range",y))}),o.createSlots({_:2},[l.context.editable?{name:"menu-items",fn:o.withCtx(()=>[o.createVNode(g,{onClick:c},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(s).t("renderer.edit")),1)]),_:1})]),key:"0"}:void 0]),1040,["allow-csv-export","chart-data","chart-options","show-menu","synthetics-data-key","timeseries-zoom"])])]),_:1},8,["context","query","query-ready","refresh-counter"])}}}),[["__scopeId","data-v-a9ee3db9"]]),Xe=o.defineComponent({__name:"BarChartRenderer",props:{query:{},context:{},queryReady:{type:Boolean},chartOptions:{},height:{},refreshCounter:{}},setup(f){return(e,t)=>(o.openBlock(),o.createBlock(ze,{"chart-options":e.chartOptions,context:e.context,"extra-props":{showAnnotations:!1},height:e.height,query:e.query,"query-ready":e.queryReady,"refresh-counter":e.refreshCounter},null,8,["chart-options","context","height","query","query-ready","refresh-counter"]))}}),Qe=o.defineComponent({__name:"TimeseriesChartRenderer",props:{query:{},context:{},queryReady:{type:Boolean},chartOptions:{},height:{},refreshCounter:{}},emits:["zoom-time-range"],setup(f,{emit:e}){const t=e;return(i,s)=>(o.openBlock(),o.createBlock(ze,{"chart-options":i.chartOptions,context:i.context,height:i.height,query:i.query,"query-ready":i.queryReady,"refresh-counter":i.refreshCounter,onZoomTimeRange:s[0]||(s[0]=r=>t("zoom-time-range",r))},null,8,["chart-options","context","height","query","query-ready","refresh-counter"]))}}),zt={class:"metric-card-tile-wrapper"},St=J(o.defineComponent({__name:"GoldenSignalsRenderer",props:{query:{},context:{},queryReady:{type:Boolean},chartOptions:{},height:{},refreshCounter:{}},setup(f){const e=f,t=o.computed(()=>{const s=e.context.timeSpec;if(s.type==="absolute")return new D.Timeframe({key:"custom",timeframeText:"custom",display:"custom",startCustom:s.start,endCustom:s.end,timeframeLength:()=>s.end.getTime()-s.start.getTime(),defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,allowedTiers:["free","plus","enterprise"]});const r=D.TimePeriods.get(s.time_range);if(!r)throw new Error("Unknown time range");return r}),i=o.computed(()=>{var r,a;const s=(r=e.query)==null?void 0:r.datasource;if(s&&s!=="advanced"&&s!=="basic")throw new Error(`Invalid datasource value: ${s}`);return{datasource:(a=e.query)==null?void 0:a.datasource,overrideTimeframe:t.value,tz:e.context.tz,additionalFilter:e.context.filters,longCardTitles:e.chartOptions.longCardTitles,percentileLatency:e.chartOptions.percentileLatency,refreshInterval:e.context.refreshInterval,queryReady:e.queryReady,refreshCounter:e.refreshCounter}});return(s,r)=>(o.openBlock(),o.createElementBlock("div",zt,[o.createVNode(o.unref(Pe.MetricsProvider),o.normalizeProps(o.guardReactiveProps(i.value)),{default:o.withCtx(()=>[o.createVNode(o.unref(Pe.MetricsConsumer))]),_:1},16)]))}}),[["__scopeId","data-v-20c4f411"]]),Ze="#6c7489",Je="20px",et="20px",At={class:"fallback-entity-link","data-testid":"entity-link-parent"},tt=o.defineComponent({__name:"FallbackEntityLink",props:{entityLinkData:{}},setup(f){return(e,t)=>(o.openBlock(),o.createElementBlock("div",At,o.toDisplayString(e.entityLinkData.label),1))}}),Ht=o.defineComponent({__name:"TopNTableRenderer",props:{query:{},context:{},queryReady:{type:Boolean},chartOptions:{},height:{},refreshCounter:{}},setup(f){const e=f,t=o.inject(Q),i=o.defineAsyncComponent(async()=>{if(t!=null&&t.fetchComponent)try{return await t.fetchComponent("EntityLink")}catch{return tt}return tt}),s=r=>{var a;if((a=e.chartOptions)!=null&&a.entityLink)if(r.id.includes(":")){const[n,c]=r.id.split(":");return e.chartOptions.entityLink.replace(Fe,n).replace(De,c)}else return e.chartOptions.entityLink.replace(De,r.id);return""};return(r,a)=>(o.openBlock(),o.createBlock(Ne,{context:r.context,query:r.query,"query-ready":r.queryReady,"refresh-counter":r.refreshCounter},{default:o.withCtx(({data:n})=>[o.createVNode(o.unref(K.TopNTable),{data:n,"synthetics-data-key":r.chartOptions.syntheticsDataKey},o.createSlots({_:2},[e.chartOptions.entityLink?{name:"name",fn:o.withCtx(({record:c})=>[o.createVNode(o.unref(i),{"entity-link-data":{id:c.id,label:c.name,deleted:c.deleted},"external-link":s(c)},null,8,["entity-link-data","external-link"])]),key:"0"}:void 0]),1032,["data","synthetics-data-key"])]),_:1},8,["context","query","query-ready","refresh-counter"]))}}),Ot=o.defineComponent({__name:"DonutChartRenderer",props:{query:{},context:{},queryReady:{type:Boolean},chartOptions:{},height:{},refreshCounter:{}},setup(f){return(e,t)=>(o.openBlock(),o.createBlock(ze,{"chart-options":e.chartOptions,context:e.context,height:e.height,query:e.query,"query-ready":e.queryReady,"refresh-counter":e.refreshCounter},null,8,["chart-options","context","height","query","query-ready","refresh-counter"]))}}),Lt=["data-testid"],Mt={key:0,class:"tile-header"},It=["data-testid"],Bt=["data-testid"],Pt={class:"delete-option"},qt=["data-testid"],$t=["data-testid"],Ft=J(o.defineComponent({__name:"DashboardTile",props:{definition:{},context:{},height:{default:ae},queryReady:{type:Boolean},refreshCounter:{},tileId:{}},emits:["edit-tile","duplicate-tile","remove-tile","zoom-time-range"],setup(f,{emit:e}){o.useCssVars(E=>({"3da384ac":`${E.height}px`}));const t=parseInt(et,10),i=f,s=e,r=o.inject(Q),{i18n:a}=te.useI18n(),n=o.ref(),c=o.ref(!1),d=o.ref(),l=o.ref(!1),h=o.ref("");o.onMounted(async()=>{var E;h.value=await((E=r==null?void 0:r.exploreBaseUrl)==null?void 0:E.call(r))??""}),o.watch(()=>i.definition,async()=>{await o.nextTick(),d.value&&(l.value=d.value.scrollWidth>d.value.clientWidth)},{immediate:!0,deep:!0});const g=o.computed(()=>{if(!h.value||!i.definition.query||!_.value)return"";const E=[...i.context.filters,...i.definition.query.filters??[]],j=i.definition.query.dimensions??[],X={filters:E,metrics:i.definition.query.metrics??[],dimensions:j,time_range:i.definition.query.time_range||i.context.timeSpec,granularity:i.definition.query.granularity||O.value},He=["advanced","ai"].includes(i.definition.query.datasource)?i.definition.query.datasource:"advanced";return`${h.value}?q=${JSON.stringify(X)}&d=${He}&c=${i.definition.chart.type}`}),p=o.computed(()=>a.t("csvExport.defaultFilename")),y=o.computed(()=>_.value&&(m.value||i.context.editable)||!!x.value),_=o.computed(()=>!["golden_signals","top_n","gauge"].includes(i.definition.chart.type)),m=o.computed(()=>!!g.value||"allowCsvExport"in i.definition.chart&&i.definition.chart.allowCsvExport||i.context.editable),k={timeseries_line:Qe,timeseries_bar:Qe,horizontal_bar:Xe,vertical_bar:Xe,gauge:je,donut:Ot,golden_signals:St,top_n:Ht,slottable:void 0,single_value:je},S=o.computed(()=>{const E=k[i.definition.chart.type];return E&&{component:E,rendererProps:{query:i.definition.query,context:i.context,queryReady:i.queryReady,chartOptions:i.definition.chart,height:i.height-t*2,refreshCounter:i.refreshCounter}}}),x=o.computed(()=>{var j;const E=(j=i.definition.query)==null?void 0:j.time_range;if((E==null?void 0:E.type)==="relative"){const X=D.TimePeriods.get(D.TIMEFRAME_LOOKUP[E.time_range]);return X?X.display:(console.warn("Did not recognize the given relative time range:",E.time_range),E.time_range)}else if((E==null?void 0:E.type)==="absolute"){const X=E.tz||"Etc/UTC";return`${D.formatTime(E.start,{short:!0,tz:X})} - ${D.formatTime(E.end,{short:!0,tz:X})}`}return null}),O=o.computed(()=>n.value?D.msToGranularity(n.value.meta.granularity_ms):void 0),N=()=>{s("edit-tile",i.definition)},R=()=>{s("duplicate-tile",i.definition)},A=()=>{s("remove-tile",i.definition)},z=E=>{n.value=E},M=E=>{c.value=E},ee=()=>{M(!0)};return(E,j)=>{const X=o.resolveComponent("KTooltip"),He=o.resolveComponent("KBadge"),be=o.resolveComponent("KDropdownItem"),ei=o.resolveComponent("KDropdown");return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["tile-boundary",{editable:E.context.editable}]),"data-testid":`tile-${E.tileId}`},[E.definition.chart.type!=="slottable"?(o.openBlock(),o.createElementBlock("div",Mt,[o.createVNode(X,{class:"title-tooltip",disabled:!l.value,"max-width":"500",text:E.definition.chart.chartTitle},{default:o.withCtx(()=>[o.createElementVNode("div",{ref_key:"titleRef",ref:d,class:"title"},o.toDisplayString(E.definition.chart.chartTitle),513)]),_:1},8,["disabled","text"]),y.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:"tile-actions","data-testid":`tile-actions-${E.tileId}`},[x.value?(o.openBlock(),o.createBlock(He,{key:0},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(x.value),1)]),_:1})):o.createCommentVNode("",!0),_.value&&E.context.editable?(o.openBlock(),o.createBlock(o.unref(qe.EditIcon),{key:1,class:"edit-icon",color:o.unref(Ze),"data-testid":`edit-tile-${E.tileId}`,size:o.unref(Je),onClick:N},null,8,["color","data-testid","size"])):o.createCommentVNode("",!0),_.value&&m.value?(o.openBlock(),o.createBlock(ei,{key:2,class:"dropdown","data-testid":`chart-action-menu-${E.tileId}`,"kpop-attributes":{placement:"bottom-end"}},{items:o.withCtx(()=>[g.value?(o.openBlock(),o.createBlock(be,{key:0,"data-testid":`chart-jump-to-explore-${E.tileId}`,item:{label:o.unref(a).t("jumpToExplore"),to:g.value}},null,8,["data-testid","item"])):o.createCommentVNode("",!0),!("allowCsvExport"in E.definition.chart)||E.definition.chart.allowCsvExport?(o.openBlock(),o.createBlock(be,{key:1,class:"chart-export-button","data-testid":`chart-csv-export-${E.tileId}`,onClick:j[0]||(j[0]=ot=>ee())},{default:o.withCtx(()=>[o.createElementVNode("span",{class:"chart-export-trigger","data-testid":`csv-export-button-${E.tileId}`},o.toDisplayString(o.unref(a).t("csvExport.exportAsCsv")),9,Bt)]),_:1},8,["data-testid"])):o.createCommentVNode("",!0),E.context.editable?(o.openBlock(),o.createBlock(be,{key:2,"data-testid":`duplicate-tile-${E.tileId}`,onClick:R},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(a).t("renderer.duplicateTile")),1)]),_:1},8,["data-testid"])):o.createCommentVNode("",!0),E.context.editable?(o.openBlock(),o.createBlock(be,{key:3,"data-testid":`remove-tile-${E.tileId}`,onClick:A},{default:o.withCtx(()=>[o.createElementVNode("span",Pt,o.toDisplayString(o.unref(a).t("renderer.delete")),1)]),_:1},8,["data-testid"])):o.createCommentVNode("",!0)]),default:o.withCtx(()=>[o.createVNode(o.unref(qe.MoreIcon),{class:"kebab-action-menu",color:o.unref(Ze),"data-testid":`kebab-action-menu-${E.tileId}`,size:o.unref(Je)},null,8,["color","data-testid","size"])]),_:1},8,["data-testid"])):o.createCommentVNode("",!0)],8,It)):"description"in E.definition.chart?(o.openBlock(),o.createElementBlock("div",{key:1,class:"header-description","data-testid":`tile-description-${E.tileId}`},o.toDisplayString(E.definition.chart.description),9,qt)):o.createCommentVNode("",!0),c.value?(o.openBlock(),o.createBlock(o.unref(K.CsvExportModal),{key:2,"chart-data":n.value,"data-testid":`csv-export-modal-${E.tileId}`,filename:p.value,onToggleModal:M},null,8,["chart-data","data-testid","filename"])):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:"tile-content","data-testid":`tile-content-${E.tileId}`},[S.value?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(S.value.component),o.mergeProps({key:0},S.value.rendererProps,{onChartData:z,onZoomTimeRange:j[1]||(j[1]=ot=>s("zoom-time-range",ot))}),null,16)):o.createCommentVNode("",!0)],8,$t)],10,Lt)}}}),[["__scopeId","data-v-4ddafde1"]]),Gt=(f,e)=>{let t=0;const i=new Map;e.forEach(r=>{const a=r.layout.position.row,n=i.get(a),c=r.layout.size.rows===1&&!!r.layout.size.fitToContent;t=Math.max(t,a+r.layout.size.rows),n===void 0?i.set(a,c):i.set(a,n&&c)});const s=[];for(let r=0;r<t;r++)i.get(r)?s.push("auto"):s.push(`${f}px`);return s},it=J(o.defineComponent({__name:"GridLayout",props:{tileHeight:{type:Number,required:!1,default:()=>ae},tiles:{type:Array,required:!0}},setup(f){o.useCssVars(n=>({"2a38e79e":o.unref(Te),"4cc71de6":r.value}));const e=f,t=o.ref(null),i=o.ref(0),s=new ResizeObserver(n=>{window.requestAnimationFrame(()=>{!Array.isArray(n)||!n.length||(i.value=n[0].contentRect.width)})});o.onMounted(()=>{t.value&&s.observe(t.value)}),o.onUnmounted(()=>{t.value&&s.unobserve(t.value)});const r=o.computed(()=>Gt(e.tileHeight,e.tiles).join(" ")),a=o.computed(()=>e.tiles.map((n,c)=>({key:`tile-${c}`,tile:n,style:{"grid-column-start":n.layout.position.col+1,"grid-column-end":n.layout.position.col+1+n.layout.size.cols,"grid-row-start":n.layout.position.row+1,"grid-row-end":n.layout.position.row+1+n.layout.size.rows}})));return(n,c)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"gridContainer",ref:t,class:"kong-ui-public-grid-layout"},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.value,d=>(o.openBlock(),o.createElementBlock("div",{key:d.key,class:o.normalizeClass(["grid-cell",{"empty-cell":!d.tile}]),style:o.normalizeStyle(d.style)},[o.renderSlot(n.$slots,"tile",{style:o.normalizeStyle(d.style),tile:d.tile},void 0,!0)],6))),128))],512))}}),[["__scopeId","data-v-354b7177"]]);function Ut(f,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(f,a));return r.prototype=e.prototype,r}class u{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 createWidgetDivs(e,t){var a,n;const i=u.createDiv(["grid-stack-item",e]),s=u.createDiv(["grid-stack-item-content"],i);return t.lazyLoad||((n=(a=t.grid)==null?void 0:a.opts)==null?void 0:n.lazyLoad)&&t.lazyLoad!==!1?t.visibleObservable||(t.visibleObservable=new IntersectionObserver(([c])=>{var d;c.isIntersecting&&((d=t.visibleObservable)==null||d.disconnect(),delete t.visibleObservable,w.renderCB(s,t))}),window.setTimeout(()=>{var c;return(c=t.visibleObservable)==null?void 0:c.observe(i)})):w.renderCB(s,t),i}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 u.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&&(u.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,n=s.top,c=this.getScrollElement(e);if(c!==null){const d=c.scrollTop;s.top<0&&i<0?e.offsetHeight>r?c.scrollTop+=i:c.scrollTop+=Math.abs(n)>Math.abs(i)?i:n:i>0&&(e.offsetHeight>r?c.scrollTop+=i:c.scrollTop+=a>i?i:a),t.top+=c.scrollTop-d}}}static updateScrollResize(e,t,i){const s=this.getScrollElement(t),r=s.clientHeight,a=s===this.getScrollElement()?0:s.getBoundingClientRect().top,n=e.clientY-a,c=n<i,d=n>r-i;c?s.scrollBy({behavior:"smooth",top:n-i}):d&&s.scrollBy({behavior:"smooth",top:i-(r-n)})}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=u.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]=u.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=u.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=document.createEvent("MouseEvents");s.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,0,e.target),(i||e.target).dispatchEvent(s)}static getValuesFromTransformedElement(e){const t=document.createElement("div");u.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 W{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 n={nested:!0,pack:!1};let c=0;for(;i=i||this.collide(e,r,s.skip);){if(c++>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 l={...t,y:i.y+i.h,...n};d=this._loading&&u.samePos(e,l)?!0:this.moveNode(e,l),(i.locked||this._loading)&&d?u.copyPos(t,e):!i.locked&&d&&s.pack&&(this._packNodes(),t.y=i.y+i.h,u.copyPos(e,t)),a=a||d}else d=this.moveNode(i,{...i,y:t.y+t.h,skip:e,...n});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&&u.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&&u.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,n=.5;for(let c of i){if(c.locked||!c._rect)break;const d=c._rect;let l=Number.MAX_VALUE,h=Number.MAX_VALUE;s.y<d.y?l=(r.y+r.h-d.y)/d.h:s.y+s.h>d.y+d.h&&(l=(d.y+d.h-r.y)/d.h),s.x<d.x?h=(r.x+r.w-d.x)/d.w:s.x+s.w>d.x+d.w&&(h=(d.x+d.w-r.x)/d.w);const g=Math.min(h,l);g>n&&(n=g,a=c)}return t.collide=a,a}cacheRects(e,t,i,s,r,a){return this.nodes.forEach(n=>n._rect={y:n.y*t+i,x:n.x*e+a,w:n.w*e-a-s,h:n.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=u.isTouching(e,t)))return i();if(s!==!1){if(e.w===t.w&&e.x===t.x&&(s||(s=u.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=u.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,n,c)=>{let d;a.locked||(a.autoPosition=!0,e==="list"&&n&&(d=c[n-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=u.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??W._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 u.defaults(e,s),e.autoPosition||delete e.autoPosition,e.noResize||delete e.noResize,e.noMove||delete e.noMove,u.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||u.copyPos({},e);if(e.maxW&&e.w&&(e.w=Math.min(e.w,e.maxW)),e.maxH&&e.h&&(e.h=Math.min(e.h,e.maxH)),e.minW&&e.w&&e.minW<=this.column&&(e.w=Math.max(e.w,e.minW)),e.minH&&e.h&&(e.h=Math.max(e.h,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),u.samePos(e,i)||(e._dirty=!0),this}getDirtyNodes(e){return e?this.nodes.filter(t=>t._dirty&&!u.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=u.copyPos({},e),delete e._dirty}),this._hasLocked=this.nodes.some(e=>e.locked),this}restoreInitial(){return this.nodes.forEach(e=>{!e._orig||u.samePos(e,e._orig)||(u.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 n=r;!a;++n){const c=n%i,d=Math.floor(n/i);if(c+e.w>i)continue;const l={x:c,y:d,w:e.w,h:e.h};t.find(h=>u.isIntercepted(l,h))||((e.x!==c||e.y!==d)&&(e._dirty=!0),e.x=c,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 W({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 n=this.nodes.find(c=>c._id===a._id);n&&(u.copyPos(n,a),n._dirty=!0)}),this._notify(),!0):!1}willItFit(e){if(delete e._willFitPos,!this.maxRow)return!0;const t=new W({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=u.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,l;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=u.copyPos({},e,!0);if(u.copyPos(r,t),this.nodeBoundFix(r,s),u.copyPos(t,r),!t.forceCollide&&u.samePos(e,t))return!1;const a=u.copyPos({},e),n=this.collideAll(e,r,t.skip);let c=!0;if(n.length){const h=e._moving&&!t.nested;let g=h?this.directionCollideCoverage(e,t,n):n[0];if(h&&g&&((l=(d=e.grid)==null?void 0:d.opts)!=null&&l.subGridDynamic)&&!e.grid._isTemp){const p=u.areaIntercept(t.rect,g._rect),y=u.area(t.rect),_=u.area(g._rect);p/(y<_?y:_)>.8&&(g.grid.makeSubGrid(g.el,void 0,e),g=void 0)}g?c=!this._fixCollisions(e,r,g,t):(c=!1,i&&delete t.pack)}return c&&!u.samePos(e,r)&&(e._dirty=!0,u.copyPos(e,r)),t.pack&&this._packNodes()._notify(),!u.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(n=>{const c=s==null?void 0:s.find(l=>l._id===n._id),d={...n,...c||{}};u.removeInternalForSave(d,!e),t&&t(n,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(n=>n._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 n;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:u.sort(this.nodes,-1);if(t>e&&this._layouts){const c=this._layouts[t]||[],d=this._layouts.length-1;!c.length&&e!==d&&((n=this._layouts[d])!=null&&n.length)&&(e=d,this._layouts[d].forEach(l=>{const h=a.find(g=>g._id===l._id);h&&(!s&&!l.autoPosition&&(h.x=l.x??h.x,h.y=l.y??h.y),h.w=l.w??h.w,(l.x==null||l.y===void 0)&&(h.autoPosition=!0))})),c.forEach(l=>{const h=a.findIndex(g=>g._id===l._id);if(h!==-1){const g=a[h];if(s){g.w=l.w;return}(l.autoPosition||isNaN(l.x)||isNaN(l.y))&&this.findEmptyPosition(l,r),l.autoPosition||(g.x=l.x??g.x,g.y=l.y??g.y,g.w=l.w??g.w,r.push(g)),a.splice(h,1)}})}if(s)this.compact(i,!1);else{if(a.length)if(typeof i=="function")i(t,e,r,a);else{const c=s||i==="none"?1:t/e,d=i==="move"||i==="moveScale",l=i==="scale"||i==="moveScale";a.forEach(h=>{h.x=t===1?0:d?Math.round(h.x*c):Math.min(h.x,t-1),h.w=t===1||e===1?1:l?Math.round(h.w*c)||1:Math.min(h.w,t),r.push(h)}),a=[]}r=u.sort(r,-1),this._inColumnResize=!0,this.nodes=[],r.forEach(c=>{this.addNode(c,!1),delete c._orig})}return this.nodes.forEach(c=>delete c._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 n=r.id?this.nodes.find(c=>c.id===r.id):void 0;r._id=(n==null?void 0:n._id)??W._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??W._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}}W._idSeq=0;const q={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 C{}const U=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 V{}function me(f,e){if(f.touches.length>1)return;f.cancelable&&f.preventDefault();const t=f.changedTouches[0],i=document.createEvent("MouseEvents");i.initMouseEvent(e,!0,!0,window,1,t.screenX,t.screenY,t.clientX,t.clientY,!1,!1,!1,!1,0,null),f.target.dispatchEvent(i)}function st(f,e){f.cancelable&&f.preventDefault();const t=document.createEvent("MouseEvents");t.initMouseEvent(e,!0,!0,window,1,f.screenX,f.screenY,f.clientX,f.clientY,!1,!1,!1,!1,0,null),f.target.dispatchEvent(t)}function pe(f){V.touchHandled||(V.touchHandled=!0,me(f,"mousedown"))}function ye(f){V.touchHandled&&me(f,"mousemove")}function _e(f){if(!V.touchHandled)return;V.pointerLeaveTimeout&&(window.clearTimeout(V.pointerLeaveTimeout),delete V.pointerLeaveTimeout);const e=!!C.dragElement;me(f,"mouseup"),e||me(f,"click"),V.touchHandled=!1}function ve(f){f.pointerType!=="mouse"&&f.target.releasePointerCapture(f.pointerId)}function rt(f){C.dragElement&&f.pointerType!=="mouse"&&st(f,"mouseenter")}function nt(f){C.dragElement&&f.pointerType!=="mouse"&&(V.pointerLeaveTimeout=window.setTimeout(()=>{delete V.pointerLeaveTimeout,st(f,"mouseleave")},10))}class we{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(`${we.prefix}${this.dir}`),e.style.zIndex="100",e.style.userSelect="none",this.host.appendChild(this.el),this.el.addEventListener("mousedown",this._mouseDown),U&&(this.el.addEventListener("touchstart",pe),this.el.addEventListener("pointerdown",ve)),this}destroy(){return this.moving&&this._mouseUp(this.mouseDownEvent),this.el.removeEventListener("mousedown",this._mouseDown),U&&(this.el.removeEventListener("touchstart",pe),this.el.removeEventListener("pointerdown",ve)),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),U&&(this.el.addEventListener("touchmove",ye),this.el.addEventListener("touchend",_e)),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),U&&(this.el.removeEventListener("touchmove",ye),this.el.removeEventListener("touchend",_e)),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}}we.prefix="ui-resizable-";class Se{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 le extends Se{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),C.overResizeElement===this&&delete C.overResizeElement),this}_mouseOver(e){C.overResizeElement||C.dragElement||(C.overResizeElement=this,this.el.classList.remove("ui-resizable-autohide"))}_mouseOut(e){C.overResizeElement===this&&(delete C.overResizeElement,this.el.classList.add("ui-resizable-autohide"))}_setupHandlers(){return this.handlers=this.option.handles.split(",").map(e=>e.trim()).map(e=>new we(this.el,e,{start:t=>{this._resizeStart(t)},stop:t=>{this._resizeStop(t)},move:t=>{this._resizing(t,e)}})),this}_resizeStart(e){this.sizeToContent=u.shouldSizeToContent(this.el.gridstackNode,!0),this.originalRect=this.el.getBoundingClientRect(),this.scrollEl=u.getScrollElement(this.el),this.scrollY=this.scrollEl.scrollTop,this.scrolled=0,this.startEvent=e,this._setupHelper(),this._applyChange();const t=u.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=u.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=u.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=le._originStyleProp.map(i=>this.el.style[i]),this.parentOriginStylePosition=this.el.parentElement.style.position;const e=this.el.parentElement,t=u.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 le._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 n,c;t.indexOf("e")>-1?s.width+=r:t.indexOf("w")>-1&&(s.width-=r,s.left+=r,n=!0),t.indexOf("s")>-1?s.height+=a:t.indexOf("n")>-1&&(s.height-=a,s.top+=a,c=!0);const d=this._constrainSize(s.width,s.height,n,c);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,n=r.minWidth/this.rectScale.x||e,c=(s?r.maxHeightMoveUp:r.maxHeight)||Number.MAX_SAFE_INTEGER,d=r.minHeight/this.rectScale.y||t,l=Math.min(a,Math.max(n,e)),h=Math.min(c,Math.max(d,t));return{width:l,height:h}}_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}}le._originStyleProp=["width","height","position","left","top","opacity","zIndex"];const Wt='input,textarea,button,select,option,[contenteditable="true"],.ui-resizable-handle';class he extends Se{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),U&&(e.addEventListener("touchstart",pe),e.addEventListener("pointerdown",ve))}),this.el.classList.remove("ui-draggable-disabled"))}disable(e=!1){this.disabled!==!0&&(super.disable(),this.dragEls.forEach(t=>{t.removeEventListener("mousedown",this._mouseDown),U&&(t.removeEventListener("touchstart",pe),t.removeEventListener("pointerdown",ve))}),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(!C.mouseHandled)return e.button!==0||!this.dragEls.find(t=>t===e.target)&&e.target.closest(Wt)||this.option.cancel&&e.target.closest(this.option.cancel)||(this.mouseDownEvent=e,delete this.dragging,delete C.dragElement,delete C.dropElement,document.addEventListener("mousemove",this._mouseMove,{capture:!0,passive:!0}),document.addEventListener("mouseup",this._mouseUp,!0),U&&(e.currentTarget.addEventListener("touchmove",ye),e.currentTarget.addEventListener("touchend",_e)),e.preventDefault(),document.activeElement&&document.activeElement.blur(),C.mouseHandled=!0),!0}_callDrag(e){if(!this.dragging)return;const t=u.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),C.pauseDrag){const s=Number.isInteger(C.pauseDrag)?C.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,C.dragElement=this;const s=(i=this.el.gridstackNode)==null?void 0:i.grid;s?C.dropElement=s.el.ddElement.ddDroppable:delete C.dropElement,this.helper=this._createHelper(),this._setupHelperContainmentStyle(),this.dragTransform=u.getValuesFromTransformedElement(this.helperContainment),this.dragOffset=this._getDragOffset(e,this.el,this.helperContainment),this._setupHelperStyle(e);const r=u.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),U&&e.currentTarget&&(e.currentTarget.removeEventListener("touchmove",ye,!0),e.currentTarget.removeEventListener("touchend",_e,!0)),this.dragging){delete this.dragging,(t=this.el.gridstackNode)==null||delete t._origRotate,document.removeEventListener("keydown",this._keyEvent),((i=C.dropElement)==null?void 0:i.el)===this.el.parentElement&&delete C.dropElement,this.helperContainment.style.position=this.parentOriginStylePosition||null,this.helper!==this.el&&this.helper.remove(),this._removeHelperStyle();const s=u.initEvent(e,{target:this.el,type:"dragstop"});this.option.stop&&this.option.stop(s),this.triggerEvent("dragstop",s),C.dropElement&&C.dropElement.drop(e)}delete this.helper,delete this.mouseDownEvent,delete C.dragElement,delete C.dropElement,delete C.mouseHandled,e.preventDefault()}_keyEvent(e){var s,r;const t=this.el.gridstackNode,i=(t==null?void 0:t.grid)||((r=(s=C.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(!u.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",u.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=u.cloneNode(this.el)),document.body.contains(e)||u.appendTo(e,this.option.appendTo==="parent"?this.el.parentElement:this.option.appendTo),this.dragElementOriginStyle=he.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",he.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}}}}he.originStyleProp=["width","height","transform","transform-origin","transition","pointerEvents","position","left","top","minWidth","willChange"];class Vt extends Se{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),U&&(this.el.addEventListener("pointerenter",rt),this.el.addEventListener("pointerleave",nt)))}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),U&&(this.el.removeEventListener("pointerenter",rt),this.el.removeEventListener("pointerleave",nt)))}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(!C.dragElement||!this._canDrop(C.dragElement.el))return;e.preventDefault(),e.stopPropagation(),C.dropElement&&C.dropElement!==this&&C.dropElement._mouseLeave(e,!0),C.dropElement=this;const t=u.initEvent(e,{target:this.el,type:"dropover"});this.option.over&&this.option.over(t,this._ui(C.dragElement)),this.triggerEvent("dropover",t),this.el.classList.add("ui-droppable-over")}_mouseLeave(e,t=!1){var s;if(!C.dragElement||C.dropElement!==this)return;e.preventDefault(),e.stopPropagation();const i=u.initEvent(e,{target:this.el,type:"dropout"});if(this.option.out&&this.option.out(i,this._ui(C.dragElement)),this.triggerEvent("dropout",i),C.dropElement===this&&(delete C.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=u.initEvent(e,{target:this.el,type:"drop"});this.option.drop&&this.option.drop(t,this._ui(C.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 Ae{static init(e){return e.ddElement||(e.ddElement=new Ae(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 he(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 le(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 Vt(this.el,e),this}cleanDroppable(){return this.ddDroppable&&(this.ddDroppable.destroy(),delete this.ddDroppable),this}}class Kt{resizable(e,t,i,s){return this._getDDElements(e).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 n=r.el.gridstackNode.grid;let c=r.el.getAttribute("gs-resize-handles")||n.opts.resizable.handles||"e,s,se";c==="all"&&(c="n,e,s,w,se,sw,ne,nw");const d=!n.opts.alwaysShowResizeHandle;r.setupResizable({...n.opts.resizable,handles:c,autoHide:d,start:t.start,stop:t.stop,resize:t.resize})}}),this}draggable(e,t,i,s){return this._getDDElements(e).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).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,C.dragElement?C.dragElement.el:r.target,C.dragElement?C.dragElement.helper:null)})),this}off(e,t){return this._getDDElements(e).forEach(i=>i.off(t)),this}_getDDElements(e,t=!0){const i=u.getElements(e);if(!i.length)return[];const s=i.map(r=>r.ddElement||(t?Ae.init(r):null));return t||s.filter(r=>r),s}}/*!
2
2
  * GridStack 11.3.0
3
3
  * https://gridstackjs.com/
4
4
  *
@@ -6,4 +6,4 @@
6
6
  * see root license https://github.com/gridstack/gridstack.js/tree/master/LICENSE
7
7
  */const B=new Kt;class w{static init(e={},t=".grid-stack"){if(typeof document>"u")return null;const i=w.getGridElement(t);return i?(i.gridstack||(i.gridstack=new w(i,u.cloneDeep(e))),i.gridstack):(console.error(typeof t=="string"?'GridStack.initAll() no grid was found with selector "'+t+`" - element missing or wrong selector ?
8
8
  Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.`:"GridStack.init() no grid element was passed."),null)}static initAll(e={},t=".grid-stack"){const i=[];return typeof document>"u"||(w.getGridElements(t).forEach(s=>{s.gridstack||(s.gridstack=new w(s,u.cloneDeep(e))),i.push(s.gridstack)}),i.length===0&&console.error('GridStack.initAll() no grid was found with selector "'+t+`" - element missing or wrong selector ?
9
- Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.`)),i}static addGrid(e,t={}){if(!e)return null;let i=e;if(i.gridstack){const a=i.gridstack;return t&&(a.opts={...a.opts,...t}),t.children!==void 0&&a.load(t.children),a}return(!e.classList.contains("grid-stack")||w.addRemoveCB)&&(w.addRemoveCB?i=w.addRemoveCB(e,t,!0,!0):i=u.createDiv(["grid-stack",t.class],e)),w.init(t,i)}static registerEngine(e){w.engineClass=e}get placeholder(){if(!this._placeholder){this._placeholder=u.createDiv([this.opts.placeholderClass,q.itemClass,this.opts.itemClass]);const e=u.createDiv(["placeholder-content"],this._placeholder);this.opts.placeholderText&&(e.textContent=this.opts.placeholderText)}return this._placeholder}constructor(e,t={}){var h,g,p;this.el=e,this.opts=t,this.animationDelay=310,this._gsEventHandler={},this._extraDragRow=0,this.dragTransform={xScale:1,yScale:1,xOffset:0,yOffset:0},e.gridstack=this,this.opts=t=t||{},e.classList.contains("grid-stack")||this.el.classList.add("grid-stack"),t.row&&(t.minRow=t.maxRow=t.row,delete t.row);const i=u.toNumber(e.getAttribute("gs-row"));t.column==="auto"&&delete t.column,t.alwaysShowResizeHandle!==void 0&&(t._alwaysShowResizeHandle=t.alwaysShowResizeHandle);let s=(h=t.columnOpts)==null?void 0:h.breakpoints;const r=t;if(r.oneColumnModeDomSort&&(delete r.oneColumnModeDomSort,console.log("warning: Gridstack oneColumnModeDomSort no longer supported. Use GridStackOptions.columnOpts instead.")),r.oneColumnSize||r.disableOneColumnMode===!1){const y=r.oneColumnSize||768;delete r.oneColumnSize,delete r.disableOneColumnMode,t.columnOpts=t.columnOpts||{},s=t.columnOpts.breakpoints=t.columnOpts.breakpoints||[];let _=s.find(m=>m.c===1);_?_.w=y:(_={c:1,w:y},s.push(_,{c:12,w:y+1}))}const a=t.columnOpts;a&&(!a.columnWidth&&!((g=a.breakpoints)!=null&&g.length)?(delete t.columnOpts,s=void 0):a.columnMax=a.columnMax||12),(s==null?void 0:s.length)>1&&s.sort((y,_)=>(_.w||0)-(y.w||0));const n={...u.cloneDeep(q),column:u.toNumber(e.getAttribute("gs-column"))||q.column,minRow:i||u.toNumber(e.getAttribute("gs-min-row"))||q.minRow,maxRow:i||u.toNumber(e.getAttribute("gs-max-row"))||q.maxRow,staticGrid:u.toBool(e.getAttribute("gs-static"))||q.staticGrid,sizeToContent:u.toBool(e.getAttribute("gs-size-to-content"))||void 0,draggable:{handle:(t.handleClass?"."+t.handleClass:t.handle?t.handle:"")||q.draggable.handle},removableOptions:{accept:t.itemClass||q.removableOptions.accept,decline:q.removableOptions.decline}};e.getAttribute("gs-animate")&&(n.animate=u.toBool(e.getAttribute("gs-animate"))),t=u.defaults(t,n),this._initMargin(),this.checkDynamicColumn(),this.el.classList.add("gs-"+t.column),t.rtl==="auto"&&(t.rtl=e.style.direction==="rtl"),t.rtl&&this.el.classList.add("grid-stack-rtl");const c=this.el.closest("."+q.itemClass),d=c==null?void 0:c.gridstackNode;d&&(d.subGrid=this,this.parentGridNode=d,this.el.classList.add("grid-stack-nested"),d.el.classList.add("grid-stack-sub-grid")),this._isAutoCellHeight=t.cellHeight==="auto",this._isAutoCellHeight||t.cellHeight==="initial"?this.cellHeight(void 0,!1):(typeof t.cellHeight=="number"&&t.cellHeightUnit&&t.cellHeightUnit!==q.cellHeightUnit&&(t.cellHeight=t.cellHeight+t.cellHeightUnit,delete t.cellHeightUnit),this.cellHeight(t.cellHeight,!1)),t.alwaysShowResizeHandle==="mobile"&&(t.alwaysShowResizeHandle=U),this._styleSheetClass="gs-id-"+W._idSeq++,this.el.classList.add(this._styleSheetClass),this._setStaticClass();const l=t.engineClass||w.engineClass||W;if(this.engine=new l({column:this.getColumn(),float:t.float,maxRow:t.maxRow,onChange:y=>{let _=0;this.engine.nodes.forEach(m=>{_=Math.max(_,m.y+m.h)}),y.forEach(m=>{const k=m.el;k&&(m._removeDOM?(k&&k.remove(),delete m._removeDOM):this._writePosAttr(k,m))}),this._updateStyles(!1,_)}}),this._updateStyles(!1,0),t.auto&&(this.batchUpdate(),this.engine._loading=!0,this.getGridItems().forEach(y=>this._prepareElement(y)),delete this.engine._loading,this.batchUpdate(!1)),t.children){const y=t.children;delete t.children,y.length&&this.load(y)}this.setAnimation(),t.subGridDynamic&&!C.pauseDrag&&(C.pauseDrag=!0),((p=t.draggable)==null?void 0:p.pause)!==void 0&&(C.pauseDrag=t.draggable.pause),this._setupRemoveDrop(),this._setupAcceptWidget(),this._updateResizeEvent()}addWidget(e){if(typeof e=="string"){console.error("V11: GridStack.addWidget() does not support string anymore. see #2736");return}if(e.ELEMENT_NODE)return console.error("V11: GridStack.addWidget() does not support HTMLElement anymore. use makeWidget()"),this.makeWidget(e);let t,i=e;if(i.grid=this,i!=null&&i.el?t=i.el:w.addRemoveCB?t=w.addRemoveCB(this.el,e,!0,!1):t=u.createWidgetDivs(this.opts.itemClass,i),!t)return;if(i=t.gridstackNode,i&&t.parentElement===this.el&&this.engine.nodes.find(r=>r._id===i._id))return t;const s=this._readAttr(t);return u.defaults(e,s),this.engine.prepareNode(e),this.el.appendChild(t),this.makeWidget(t,e),t}makeSubGrid(e,t,i,s=!0){var p,y,_;let r=e.gridstackNode;if(r||(r=this.makeWidget(e).gridstackNode),(p=r.subGrid)!=null&&p.el)return r.subGrid;let a,n=this;for(;n&&!a;)a=(y=n.opts)==null?void 0:y.subGridOpts,n=(_=n.parentGridNode)==null?void 0:_.grid;t=u.cloneDeep({...this.opts,id:void 0,children:void 0,column:"auto",columnOpts:void 0,layout:"list",subGridOpts:void 0,...a||{},...t||r.subGridOpts||{}}),r.subGridOpts=t;let c;t.column==="auto"&&(c=!0,t.column=Math.max(r.w||1,(i==null?void 0:i.w)||1),delete t.columnOpts);let d=r.el.querySelector(".grid-stack-item-content"),l,h;if(s&&(this._removeDD(r.el),h={...r,x:0,y:0},u.removeInternalForSave(h),delete h.subGridOpts,r.content&&(h.content=r.content,delete r.content),w.addRemoveCB?l=w.addRemoveCB(this.el,h,!0,!1):(l=u.createDiv(["grid-stack-item"]),l.appendChild(d),d=u.createDiv(["grid-stack-item-content"],r.el)),this._prepareDragDropByNode(r)),i){const m=c?t.column:r.w,k=r.h+i.h,S=r.el.style;S.transition="none",this.update(r.el,{w:m,h:k}),setTimeout(()=>S.transition=null)}const g=r.subGrid=w.addGrid(d,t);return i!=null&&i._moving&&(g._isTemp=!0),c&&(g._autoColumn=!0),s&&g.makeWidget(l,h),i&&(i._moving?window.setTimeout(()=>u.simulateMouseEvent(i._event,"mouseenter",g.el),0):g.makeWidget(r.el,r)),this.resizeToContentCheck(!1,r),g}removeAsSubGrid(e){var i;const t=(i=this.parentGridNode)==null?void 0:i.grid;t&&(t.batchUpdate(),t.removeWidget(this.parentGridNode.el,!0,!0),this.engine.nodes.forEach(s=>{s.x+=this.parentGridNode.x,s.y+=this.parentGridNode.y,t.makeWidget(s.el,s)}),t.batchUpdate(!1),this.parentGridNode&&delete this.parentGridNode.subGrid,delete this.parentGridNode,e&&window.setTimeout(()=>u.simulateMouseEvent(e._event,"mouseenter",t.el),0))}save(e=!0,t=!1,i=w.saveCB){const s=this.engine.save(e,i);if(s.forEach(r=>{var a;if(e&&r.el&&!r.subGrid&&!i){const n=r.el.querySelector(".grid-stack-item-content");r.content=n==null?void 0:n.innerHTML,r.content||delete r.content}else if(!e&&!i&&delete r.content,(a=r.subGrid)!=null&&a.el){const n=r.subGrid.save(e,t,i);r.subGridOpts=t?n:{children:n},delete r.subGrid}delete r.el}),t){const r=u.cloneDeep(this.opts);r.marginBottom===r.marginTop&&r.marginRight===r.marginLeft&&r.marginTop===r.marginRight&&(r.margin=r.marginTop,delete r.marginTop,delete r.marginRight,delete r.marginBottom,delete r.marginLeft),r.rtl===(this.el.style.direction==="rtl")&&(r.rtl="auto"),this._isAutoCellHeight&&(r.cellHeight="auto"),this._autoColumn&&(r.column="auto");const a=r._alwaysShowResizeHandle;return delete r._alwaysShowResizeHandle,a!==void 0?r.alwaysShowResizeHandle=a:delete r.alwaysShowResizeHandle,u.removeInternalAndSame(r,q),r.children=s,r}return s}load(e,t=w.addRemoveCB||!0){var d;e=u.cloneDeep(e);const i=this.getColumn();e.forEach(l=>{l.w=l.w||1,l.h=l.h||1}),e=u.sort(e),this.engine.skipCacheUpdate=this._ignoreLayoutsNodeChange=!0;let s=0;e.forEach(l=>{s=Math.max(s,(l.x||0)+l.w)}),s>this.engine.defaultColumn&&(this.engine.defaultColumn=s),s>i&&this.engine.cacheLayout(e,s,!0);const r=w.addRemoveCB;typeof t=="function"&&(w.addRemoveCB=t);const a=[];this.batchUpdate();const n=!this.engine.nodes.length;n&&this.setAnimation(!1),!n&&t&&[...this.engine.nodes].forEach(h=>{if(!h.id)return;u.find(e,h.id)||(w.addRemoveCB&&w.addRemoveCB(this.el,h,!1,!1),a.push(h),this.removeWidget(h.el,!0,!1))}),this.engine._loading=!0;const c=[];return this.engine.nodes=this.engine.nodes.filter(l=>u.find(e,l.id)?(c.push(l),!1):!0),e.forEach(l=>{var g;const h=u.find(c,l.id);if(h){if(u.shouldSizeToContent(h)&&(l.h=h.h),this.engine.nodeBoundFix(l),(l.autoPosition||l.x===void 0||l.y===void 0)&&(l.w=l.w||h.w,l.h=l.h||h.h,this.engine.findEmptyPosition(l)),this.engine.nodes.push(h),u.samePos(h,l)&&this.engine.nodes.length>1&&(this.moveNode(h,{...l,forceCollide:!0}),u.copyPos(l,h)),this.update(h.el,l),(g=l.subGridOpts)!=null&&g.children){const p=h.el.querySelector(".grid-stack");p&&p.gridstack&&p.gridstack.load(l.subGridOpts.children)}}else t&&this.addWidget(l)}),delete this.engine._loading,this.engine.removedNodes=a,this.batchUpdate(!1),delete this._ignoreLayoutsNodeChange,delete this.engine.skipCacheUpdate,r?w.addRemoveCB=r:delete w.addRemoveCB,n&&((d=this.opts)!=null&&d.animate)&&this.setAnimation(this.opts.animate,!0),this}batchUpdate(e=!0){return this.engine.batchUpdate(e),e||(this._updateContainerHeight(),this._triggerRemoveEvent(),this._triggerAddEvent(),this._triggerChangeEvent()),this}getCellHeight(e=!1){if(this.opts.cellHeight&&this.opts.cellHeight!=="auto"&&(!e||!this.opts.cellHeightUnit||this.opts.cellHeightUnit==="px"))return this.opts.cellHeight;if(this.opts.cellHeightUnit==="rem")return this.opts.cellHeight*parseFloat(getComputedStyle(document.documentElement).fontSize);if(this.opts.cellHeightUnit==="em")return this.opts.cellHeight*parseFloat(getComputedStyle(this.el).fontSize);if(this.opts.cellHeightUnit==="cm")return this.opts.cellHeight*(96/2.54);if(this.opts.cellHeightUnit==="mm")return this.opts.cellHeight*(96/2.54)/10;const t=this.el.querySelector("."+this.opts.itemClass);if(t){const s=u.toNumber(t.getAttribute("gs-h"))||1;return Math.round(t.offsetHeight/s)}const i=parseInt(this.el.getAttribute("gs-current-row"));return i?Math.round(this.el.getBoundingClientRect().height/i):this.opts.cellHeight}cellHeight(e,t=!0){if(t&&e!==void 0&&this._isAutoCellHeight!==(e==="auto")&&(this._isAutoCellHeight=e==="auto",this._updateResizeEvent()),(e==="initial"||e==="auto")&&(e=void 0),e===void 0){const s=-this.opts.marginRight-this.opts.marginLeft+this.opts.marginTop+this.opts.marginBottom;e=this.cellWidth()+s}const i=u.parseHeight(e);return this.opts.cellHeightUnit===i.unit&&this.opts.cellHeight===i.h?this:(this.opts.cellHeightUnit=i.unit,this.opts.cellHeight=i.h,this.resizeToContentCheck(),t&&this._updateStyles(!0),this)}cellWidth(){return this._widthOrContainer()/this.getColumn()}_widthOrContainer(e=!1){var t;return e&&((t=this.opts.columnOpts)!=null&&t.breakpointForWindow)?window.innerWidth:this.el.clientWidth||this.el.parentElement.clientWidth||window.innerWidth}checkDynamicColumn(){var r,a;const e=this.opts.columnOpts;if(!e||!e.columnWidth&&!((r=e.breakpoints)!=null&&r.length))return!1;const t=this.getColumn();let i=t;const s=this._widthOrContainer(!0);if(e.columnWidth)i=Math.min(Math.round(s/e.columnWidth)||1,e.columnMax);else{i=e.columnMax;let n=0;for(;n<e.breakpoints.length&&s<=e.breakpoints[n].w;)i=e.breakpoints[n++].c||t}if(i!==t){const n=(a=e.breakpoints)==null?void 0:a.find(c=>c.c===i);return this.column(i,(n==null?void 0:n.layout)||e.layout),!0}return!1}compact(e="compact",t=!0){return this.engine.compact(e,t),this._triggerChangeEvent(),this}column(e,t="moveScale"){if(!e||e<1||this.opts.column===e)return this;const i=this.getColumn();return this.opts.column=e,this.engine?(this.engine.column=e,this.el.classList.remove("gs-"+i),this.el.classList.add("gs-"+e),this.engine.columnChanged(i,e,t),this._isAutoCellHeight&&this.cellHeight(),this.resizeToContentCheck(!0),this._ignoreLayoutsNodeChange=!0,this._triggerChangeEvent(),delete this._ignoreLayoutsNodeChange,this):this}getColumn(){return this.opts.column}getGridItems(){return Array.from(this.el.children).filter(e=>e.matches("."+this.opts.itemClass)&&!e.matches("."+this.opts.placeholderClass))}isIgnoreChangeCB(){return this._ignoreLayoutsNodeChange}destroy(e=!0){var t,i;if(this.el)return this.offAll(),this._updateResizeEvent(!0),this.setStatic(!0,!1),this.setAnimation(!1),e?this.el.parentNode.removeChild(this.el):(this.removeAll(e),this.el.classList.remove(this._styleSheetClass),this.el.removeAttribute("gs-current-row")),this._removeStylesheet(),(t=this.parentGridNode)==null||delete t.subGrid,delete this.parentGridNode,delete this.opts,(i=this._placeholder)==null||delete i.gridstackNode,delete this._placeholder,delete this.engine,delete this.el.gridstack,delete this.el,this}float(e){return this.opts.float!==e&&(this.opts.float=this.engine.float=e,this._triggerChangeEvent()),this}getFloat(){return this.engine.float}getCellFromPixel(e,t=!1){const i=this.el.getBoundingClientRect();let s;t?s={top:i.top+document.documentElement.scrollTop,left:i.left}:s={top:this.el.offsetTop,left:this.el.offsetLeft};const r=e.left-s.left,a=e.top-s.top,n=i.width/this.getColumn(),c=i.height/parseInt(this.el.getAttribute("gs-current-row"));return{x:Math.floor(r/n),y:Math.floor(a/c)}}getRow(){return Math.max(this.engine.getRow(),this.opts.minRow)}isAreaEmpty(e,t,i,s){return this.engine.isAreaEmpty(e,t,i,s)}makeWidget(e,t){const i=w.getElement(e);if(!i)return;i.parentElement||this.el.appendChild(i),this._prepareElement(i,!0,t);const s=i.gridstackNode;this._updateContainerHeight(),s.subGridOpts&&this.makeSubGrid(i,s.subGridOpts,void 0,!1);let r;return this.opts.column===1&&!this._ignoreLayoutsNodeChange&&(r=this._ignoreLayoutsNodeChange=!0),this._triggerAddEvent(),this._triggerChangeEvent(),r&&delete this._ignoreLayoutsNodeChange,i}on(e,t){return e.indexOf(" ")!==-1?(e.split(" ").forEach(s=>this.on(s,t)),this):(e==="change"||e==="added"||e==="removed"||e==="enable"||e==="disable"?(e==="enable"||e==="disable"?this._gsEventHandler[e]=s=>t(s):this._gsEventHandler[e]=s=>{s.detail&&t(s,s.detail)},this.el.addEventListener(e,this._gsEventHandler[e])):e==="drag"||e==="dragstart"||e==="dragstop"||e==="resizestart"||e==="resize"||e==="resizestop"||e==="dropped"||e==="resizecontent"?this._gsEventHandler[e]=t:console.error("GridStack.on("+e+") event not supported"),this)}off(e){return e.indexOf(" ")!==-1?(e.split(" ").forEach(i=>this.off(i)),this):((e==="change"||e==="added"||e==="removed"||e==="enable"||e==="disable")&&this._gsEventHandler[e]&&this.el.removeEventListener(e,this._gsEventHandler[e]),delete this._gsEventHandler[e],this)}offAll(){return Object.keys(this._gsEventHandler).forEach(e=>this.off(e)),this}removeWidget(e,t=!0,i=!0){return e?(w.getElements(e).forEach(s=>{if(s.parentElement&&s.parentElement!==this.el)return;let r=s.gridstackNode;r||(r=this.engine.nodes.find(a=>s===a.el)),r&&(t&&w.addRemoveCB&&w.addRemoveCB(this.el,r,!1,!1),delete s.gridstackNode,this._removeDD(s),this.engine.removeNode(r,t,i),t&&s.parentElement&&s.remove())}),i&&(this._triggerRemoveEvent(),this._triggerChangeEvent()),this):(console.error("Error: GridStack.removeWidget(undefined) called"),this)}removeAll(e=!0,t=!0){return this.engine.nodes.forEach(i=>{e&&w.addRemoveCB&&w.addRemoveCB(this.el,i,!1,!1),delete i.el.gridstackNode,this.opts.staticGrid||this._removeDD(i.el)}),this.engine.removeAll(e,t),t&&this._triggerRemoveEvent(),this}setAnimation(e=this.opts.animate,t){return t?setTimeout(()=>{this.opts&&this.setAnimation(e)}):e?this.el.classList.add("grid-stack-animate"):this.el.classList.remove("grid-stack-animate"),this}hasAnimationCSS(){return this.el.classList.contains("grid-stack-animate")}setStatic(e,t=!0,i=!0){return!!this.opts.staticGrid===e?this:(e?this.opts.staticGrid=!0:delete this.opts.staticGrid,this._setupRemoveDrop(),this._setupAcceptWidget(),this.engine.nodes.forEach(s=>{this._prepareDragDropByNode(s),s.subGrid&&i&&s.subGrid.setStatic(e,t,i)}),t&&this._setStaticClass(),this)}update(e,t){if(arguments.length>2){console.warn("gridstack.ts: `update(el, x, y, w, h)` is deprecated. Use `update(el, {x, w, content, ...})`. It will be removed soon");const i=arguments;let s=1;return t={x:i[s++],y:i[s++],w:i[s++],h:i[s++]},this.update(e,t)}return w.getElements(e).forEach(i=>{var l;const s=i==null?void 0:i.gridstackNode;if(!s)return;const r=u.cloneDeep(t);this.engine.nodeBoundFix(r),delete r.autoPosition;const a=["x","y","w","h"];let n;if(a.some(h=>r[h]!==void 0&&r[h]!==s[h])&&(n={},a.forEach(h=>{n[h]=r[h]!==void 0?r[h]:s[h],delete r[h]})),!n&&(r.minW||r.minH||r.maxW||r.maxH)&&(n={}),r.content!==void 0){const h=i.querySelector(".grid-stack-item-content");h&&h.textContent!==r.content&&(s.content=r.content,w.renderCB(h,r),(l=s.subGrid)!=null&&l.el&&(h.appendChild(s.subGrid.el),s.subGrid.opts.styleInHead||s.subGrid._updateStyles(!0))),delete r.content}let c=!1,d=!1;for(const h in r)h[0]!=="_"&&s[h]!==r[h]&&(s[h]=r[h],c=!0,d=d||!this.opts.staticGrid&&(h==="noResize"||h==="noMove"||h==="locked"));if(u.sanitizeMinMax(s),n){const h=n.w!==void 0&&n.w!==s.w;this.moveNode(s,n),h&&s.subGrid?s.subGrid.onResize(this.hasAnimationCSS()?s.w:void 0):this.resizeToContentCheck(h,s),delete s._orig}(n||c)&&this._writeAttr(i,s),d&&this._prepareDragDropByNode(s)}),this}moveNode(e,t){const i=e._updating;i||this.engine.cleanNodes().beginUpdate(e),this.engine.moveNode(e,t),this._updateContainerHeight(),i||(this._triggerChangeEvent(),this.engine.endUpdate())}resizeToContent(e){var g,p;if(!e||(e.classList.remove("size-to-content-max"),!e.clientHeight))return;const t=e.gridstackNode;if(!t)return;const i=t.grid;if(!i||e.parentElement!==i.el)return;const s=i.getCellHeight(!0);if(!s)return;let r=t.h?t.h*s:e.clientHeight,a;if(t.resizeToContentParent&&(a=e.querySelector(t.resizeToContentParent)),a||(a=e.querySelector(w.resizeToContentParent)),!a)return;const n=e.clientHeight-a.clientHeight,c=t.h?t.h*s-n:a.clientHeight;let d;if(t.subGrid){d=t.subGrid.getRow()*t.subGrid.getCellHeight(!0);const y=t.subGrid.el.getBoundingClientRect(),_=t.subGrid.el.parentElement.getBoundingClientRect();d+=y.top-_.top}else{if((p=(g=t.subGridOpts)==null?void 0:g.children)!=null&&p.length)return;{const y=a.firstElementChild;if(!y){console.error(`Error: GridStack.resizeToContent() widget id:${t.id} '${w.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);return}d=y.getBoundingClientRect().height||c}}if(c===d)return;r+=d-c;let l=Math.ceil(r/s);const h=Number.isInteger(t.sizeToContent)?t.sizeToContent:0;h&&l>h&&(l=h,e.classList.add("size-to-content-max")),t.minH&&l<t.minH?l=t.minH:t.maxH&&l>t.maxH&&(l=t.maxH),l!==t.h&&(i._ignoreLayoutsNodeChange=!0,i.moveNode(t,{h:l}),delete i._ignoreLayoutsNodeChange)}resizeToContentCBCheck(e){w.resizeToContentCB?w.resizeToContentCB(e):this.resizeToContent(e)}rotate(e,t){return w.getElements(e).forEach(i=>{const s=i.gridstackNode;if(!u.canBeRotated(s))return;const r={w:s.h,h:s.w,minH:s.minW,minW:s.minH,maxH:s.maxW,maxW:s.maxH};if(t){const n=t.left>0?Math.floor(t.left/this.cellWidth()):0,c=t.top>0?Math.floor(t.top/this.opts.cellHeight):0;r.x=s.x+n-(s.h-(c+1)),r.y=s.y+c-n}Object.keys(r).forEach(n=>{r[n]===void 0&&delete r[n]});const a=s._orig;this.update(i,r),s._orig=a}),this}margin(e){if(!(typeof e=="string"&&e.split(" ").length>1)){const i=u.parseHeight(e);if(this.opts.marginUnit===i.unit&&this.opts.margin===i.h)return}return this.opts.margin=e,this.opts.marginTop=this.opts.marginBottom=this.opts.marginLeft=this.opts.marginRight=void 0,this._initMargin(),this._updateStyles(!0),this}getMargin(){return this.opts.margin}willItFit(e){if(arguments.length>1){console.warn("gridstack.ts: `willItFit(x,y,w,h,autoPosition)` is deprecated. Use `willItFit({x, y,...})`. It will be removed soon");const t=arguments;let i=0,s={x:t[i++],y:t[i++],w:t[i++],h:t[i++],autoPosition:t[i++]};return this.willItFit(s)}return this.engine.willItFit(e)}_triggerChangeEvent(){if(this.engine.batchMode)return this;const e=this.engine.getDirtyNodes(!0);return e&&e.length&&(this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(e),this._triggerEvent("change",e)),this.engine.saveInitial(),this}_triggerAddEvent(){var e;if(this.engine.batchMode)return this;if((e=this.engine.addedNodes)!=null&&e.length){this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(this.engine.addedNodes),this.engine.addedNodes.forEach(i=>{delete i._dirty});const t=[...this.engine.addedNodes];this.engine.addedNodes=[],this._triggerEvent("added",t)}return this}_triggerRemoveEvent(){var e;if(this.engine.batchMode)return this;if((e=this.engine.removedNodes)!=null&&e.length){const t=[...this.engine.removedNodes];this.engine.removedNodes=[],this._triggerEvent("removed",t)}return this}_triggerEvent(e,t){const i=t?new CustomEvent(e,{bubbles:!1,detail:t}):new Event(e);return this.el.dispatchEvent(i),this}_removeStylesheet(){if(this._styles){const e=this.opts.styleInHead?void 0:this.el.parentNode;u.removeStylesheet(this._styleSheetClass,e),delete this._styles}return this}_updateStyles(e=!1,t){if(e&&this._removeStylesheet(),t===void 0&&(t=this.getRow()),this._updateContainerHeight(),this.opts.cellHeight===0)return this;const i=this.opts.cellHeight,s=this.opts.cellHeightUnit,r=`.${this._styleSheetClass} > .${this.opts.itemClass}`;if(!this._styles){const a=this.opts.styleInHead?void 0:this.el.parentNode;if(this._styles=u.createStylesheet(this._styleSheetClass,a,{nonce:this.opts.nonce}),!this._styles)return this;this._styles._max=0,u.addCSSRule(this._styles,r,`height: ${i}${s}`);const n=this.opts.marginTop+this.opts.marginUnit,c=this.opts.marginBottom+this.opts.marginUnit,d=this.opts.marginRight+this.opts.marginUnit,l=this.opts.marginLeft+this.opts.marginUnit,h=`${r} > .grid-stack-item-content`,g=`.${this._styleSheetClass} > .grid-stack-placeholder > .placeholder-content`;u.addCSSRule(this._styles,h,`top: ${n}; right: ${d}; bottom: ${c}; left: ${l};`),u.addCSSRule(this._styles,g,`top: ${n}; right: ${d}; bottom: ${c}; left: ${l};`),u.addCSSRule(this._styles,`${r} > .ui-resizable-n`,`top: ${n};`),u.addCSSRule(this._styles,`${r} > .ui-resizable-s`,`bottom: ${c}`),u.addCSSRule(this._styles,`${r} > .ui-resizable-ne`,`right: ${d}; top: ${n}`),u.addCSSRule(this._styles,`${r} > .ui-resizable-e`,`right: ${d}`),u.addCSSRule(this._styles,`${r} > .ui-resizable-se`,`right: ${d}; bottom: ${c}`),u.addCSSRule(this._styles,`${r} > .ui-resizable-nw`,`left: ${l}; top: ${n}`),u.addCSSRule(this._styles,`${r} > .ui-resizable-w`,`left: ${l}`),u.addCSSRule(this._styles,`${r} > .ui-resizable-sw`,`left: ${l}; bottom: ${c}`)}if(t=t||this._styles._max,t>this._styles._max){const a=n=>i*n+s;for(let n=this._styles._max+1;n<=t;n++)u.addCSSRule(this._styles,`${r}[gs-y="${n}"]`,`top: ${a(n)}`),u.addCSSRule(this._styles,`${r}[gs-h="${n+1}"]`,`height: ${a(n+1)}`);this._styles._max=t}return this}_updateContainerHeight(){if(!this.engine||this.engine.batchMode)return this;const e=this.parentGridNode;let t=this.getRow()+this._extraDragRow;const i=this.opts.cellHeight,s=this.opts.cellHeightUnit;if(!i)return this;if(!e){const r=u.parseHeight(getComputedStyle(this.el).minHeight);if(r.h>0&&r.unit===s){const a=Math.floor(r.h/i);t<a&&(t=a)}}return this.el.setAttribute("gs-current-row",String(t)),this.el.style.removeProperty("min-height"),this.el.style.removeProperty("height"),t&&(this.el.style[e?"minHeight":"height"]=t*i+s),e&&!e.grid.engine.batchMode&&u.shouldSizeToContent(e)&&e.grid.resizeToContentCBCheck(e.el),this}_prepareElement(e,t=!1,i){i=i||this._readAttr(e),e.gridstackNode=i,i.el=e,i.grid=this,i=this.engine.addNode(i,t),this._writeAttr(e,i),e.classList.add(q.itemClass,this.opts.itemClass);const s=u.shouldSizeToContent(i);return s?e.classList.add("size-to-content"):e.classList.remove("size-to-content"),s&&this.resizeToContentCheck(!1,i),this._prepareDragDropByNode(i),this}_writePosAttr(e,t){return t.x!==void 0&&t.x!==null&&e.setAttribute("gs-x",String(t.x)),t.y!==void 0&&t.y!==null&&e.setAttribute("gs-y",String(t.y)),t.w>1?e.setAttribute("gs-w",String(t.w)):e.removeAttribute("gs-w"),t.h>1?e.setAttribute("gs-h",String(t.h)):e.removeAttribute("gs-h"),this}_writeAttr(e,t){if(!t)return this;this._writePosAttr(e,t);const i={noResize:"gs-no-resize",noMove:"gs-no-move",locked:"gs-locked",id:"gs-id",sizeToContent:"gs-size-to-content"};for(const s in i)t[s]?e.setAttribute(i[s],String(t[s])):e.removeAttribute(i[s]);return this}_readAttr(e,t=!0){const i={};i.x=u.toNumber(e.getAttribute("gs-x")),i.y=u.toNumber(e.getAttribute("gs-y")),i.w=u.toNumber(e.getAttribute("gs-w")),i.h=u.toNumber(e.getAttribute("gs-h")),i.autoPosition=u.toBool(e.getAttribute("gs-auto-position")),i.noResize=u.toBool(e.getAttribute("gs-no-resize")),i.noMove=u.toBool(e.getAttribute("gs-no-move")),i.locked=u.toBool(e.getAttribute("gs-locked")),i.sizeToContent=u.toBool(e.getAttribute("gs-size-to-content")),i.id=e.getAttribute("gs-id"),i.maxW=u.toNumber(e.getAttribute("gs-max-w")),i.minW=u.toNumber(e.getAttribute("gs-min-w")),i.maxH=u.toNumber(e.getAttribute("gs-max-h")),i.minH=u.toNumber(e.getAttribute("gs-min-h")),t&&(i.w===1&&e.removeAttribute("gs-w"),i.h===1&&e.removeAttribute("gs-h"),i.maxW&&e.removeAttribute("gs-max-w"),i.minW&&e.removeAttribute("gs-min-w"),i.maxH&&e.removeAttribute("gs-max-h"),i.minH&&e.removeAttribute("gs-min-h"));for(const s in i){if(!i.hasOwnProperty(s))return;!i[s]&&i[s]!==0&&delete i[s]}return i}_setStaticClass(){const e=["grid-stack-static"];return this.opts.staticGrid?(this.el.classList.add(...e),this.el.setAttribute("gs-static","true")):(this.el.classList.remove(...e),this.el.removeAttribute("gs-static")),this}onResize(e=(t=>(t=this.el)==null?void 0:t.clientWidth)()){if(!e||this.prevWidth===e)return;this.prevWidth=e,this.batchUpdate();let i=!1;return this._autoColumn&&this.parentGridNode?this.opts.column!==this.parentGridNode.w&&(this.column(this.parentGridNode.w,this.opts.layout||"list"),i=!0):i=this.checkDynamicColumn(),this._isAutoCellHeight&&this.cellHeight(),this.engine.nodes.forEach(s=>{s.subGrid&&s.subGrid.onResize()}),this._skipInitialResize||this.resizeToContentCheck(i),delete this._skipInitialResize,this.batchUpdate(!1),this}resizeToContentCheck(e=!1,t=void 0){if(this.engine){if(e&&this.hasAnimationCSS())return setTimeout(()=>this.resizeToContentCheck(!1,t),this.animationDelay);if(t)u.shouldSizeToContent(t)&&this.resizeToContentCBCheck(t.el);else if(this.engine.nodes.some(i=>u.shouldSizeToContent(i))){const i=[...this.engine.nodes];this.batchUpdate(),i.forEach(s=>{u.shouldSizeToContent(s)&&this.resizeToContentCBCheck(s.el)}),this.batchUpdate(!1)}this._gsEventHandler.resizecontent&&this._gsEventHandler.resizecontent(null,t?[t]:this.engine.nodes)}}_updateResizeEvent(e=!1){const t=!this.parentGridNode&&(this._isAutoCellHeight||this.opts.sizeToContent||this.opts.columnOpts||this.engine.nodes.find(i=>i.sizeToContent));return!e&&t&&!this.resizeObserver?(this._sizeThrottle=u.throttle(()=>this.onResize(),this.opts.cellHeightThrottle),this.resizeObserver=new ResizeObserver(()=>this._sizeThrottle()),this.resizeObserver.observe(this.el),this._skipInitialResize=!0):(e||!t)&&this.resizeObserver&&(this.resizeObserver.disconnect(),delete this.resizeObserver,delete this._sizeThrottle),this}static getElement(e=".grid-stack-item"){return u.getElement(e)}static getElements(e=".grid-stack-item"){return u.getElements(e)}static getGridElement(e){return w.getElement(e)}static getGridElements(e){return u.getElements(e)}_initMargin(){let e,t=0,i=[];return typeof this.opts.margin=="string"&&(i=this.opts.margin.split(" ")),i.length===2?(this.opts.marginTop=this.opts.marginBottom=i[0],this.opts.marginLeft=this.opts.marginRight=i[1]):i.length===4?(this.opts.marginTop=i[0],this.opts.marginRight=i[1],this.opts.marginBottom=i[2],this.opts.marginLeft=i[3]):(e=u.parseHeight(this.opts.margin),this.opts.marginUnit=e.unit,t=this.opts.margin=e.h),this.opts.marginTop===void 0?this.opts.marginTop=t:(e=u.parseHeight(this.opts.marginTop),this.opts.marginTop=e.h,delete this.opts.margin),this.opts.marginBottom===void 0?this.opts.marginBottom=t:(e=u.parseHeight(this.opts.marginBottom),this.opts.marginBottom=e.h,delete this.opts.margin),this.opts.marginRight===void 0?this.opts.marginRight=t:(e=u.parseHeight(this.opts.marginRight),this.opts.marginRight=e.h,delete this.opts.margin),this.opts.marginLeft===void 0?this.opts.marginLeft=t:(e=u.parseHeight(this.opts.marginLeft),this.opts.marginLeft=e.h,delete this.opts.margin),this.opts.marginUnit=e.unit,this.opts.marginTop===this.opts.marginBottom&&this.opts.marginLeft===this.opts.marginRight&&this.opts.marginTop===this.opts.marginRight&&(this.opts.margin=this.opts.marginTop),this}static getDD(){return B}static setupDragIn(e,t,i,s=document){(t==null?void 0:t.pause)!==void 0&&(C.pauseDrag=t.pause),t={appendTo:"body",helper:"clone",...t||{}},(typeof e=="string"?u.getElements(e,s):e).forEach((a,n)=>{B.isDraggable(a)||B.dragIn(a,t),i!=null&&i[n]&&(a.gridstackNode=i[n])})}movable(e,t){return this.opts.staticGrid?this:(w.getElements(e).forEach(i=>{const s=i.gridstackNode;s&&(t?delete s.noMove:s.noMove=!0,this._prepareDragDropByNode(s))}),this)}resizable(e,t){return this.opts.staticGrid?this:(w.getElements(e).forEach(i=>{const s=i.gridstackNode;s&&(t?delete s.noResize:s.noResize=!0,this._prepareDragDropByNode(s))}),this)}disable(e=!0){if(!this.opts.staticGrid)return this.enableMove(!1,e),this.enableResize(!1,e),this._triggerEvent("disable"),this}enable(e=!0){if(!this.opts.staticGrid)return this.enableMove(!0,e),this.enableResize(!0,e),this._triggerEvent("enable"),this}enableMove(e,t=!0){return this.opts.staticGrid?this:(e?delete this.opts.disableDrag:this.opts.disableDrag=!0,this.engine.nodes.forEach(i=>{this._prepareDragDropByNode(i),i.subGrid&&t&&i.subGrid.enableMove(e,t)}),this)}enableResize(e,t=!0){return this.opts.staticGrid?this:(e?delete this.opts.disableResize:this.opts.disableResize=!0,this.engine.nodes.forEach(i=>{this._prepareDragDropByNode(i),i.subGrid&&t&&i.subGrid.enableResize(e,t)}),this)}cancelDrag(){var t;const e=(t=this._placeholder)==null?void 0:t.gridstackNode;e&&(e._isExternal?(e._isAboutToRemove=!0,this.engine.removeNode(e)):e._isAboutToRemove&&w._itemRemoving(e.el,!1),this.engine.restoreInitial())}_removeDD(e){return B.draggable(e,"destroy").resizable(e,"destroy"),e.gridstackNode&&delete e.gridstackNode._initDD,delete e.ddElement,this}_setupAcceptWidget(){if(this.opts.staticGrid||!this.opts.acceptWidgets&&!this.opts.removable)return B.droppable(this.el,"destroy"),this;let e,t;const i=(s,r,a)=>{var g;a=a||r;const n=a.gridstackNode;if(!n)return;if(!((g=n.grid)!=null&&g.el)){a.style.transform=`scale(${1/this.dragTransform.xScale},${1/this.dragTransform.yScale})`;const p=a.getBoundingClientRect();a.style.left=p.x+(this.dragTransform.xScale-1)*(s.clientX-p.x)/this.dragTransform.xScale+"px",a.style.top=p.y+(this.dragTransform.yScale-1)*(s.clientY-p.y)/this.dragTransform.yScale+"px",a.style.transformOrigin="0px 0px"}let{top:c,left:d}=a.getBoundingClientRect();const l=this.el.getBoundingClientRect();d-=l.left,c-=l.top;const h={position:{top:c*this.dragTransform.xScale,left:d*this.dragTransform.yScale}};if(n._temporaryRemoved){if(n.x=Math.max(0,Math.round(d/t)),n.y=Math.max(0,Math.round(c/e)),delete n.autoPosition,this.engine.nodeBoundFix(n),!this.engine.willItFit(n)){if(n.autoPosition=!0,!this.engine.willItFit(n)){B.off(r,"drag");return}n._willFitPos&&(u.copyPos(n,n._willFitPos),delete n._willFitPos)}this._onStartMoving(a,s,h,n,t,e)}else this._dragOrResize(a,s,h,n,t,e)};return B.droppable(this.el,{accept:s=>{const r=s.gridstackNode||this._readAttr(s,!1);if((r==null?void 0:r.grid)===this)return!0;if(!this.opts.acceptWidgets)return!1;let a=!0;if(typeof this.opts.acceptWidgets=="function")a=this.opts.acceptWidgets(s);else{const n=this.opts.acceptWidgets===!0?".grid-stack-item":this.opts.acceptWidgets;a=s.matches(n)}if(a&&r&&this.opts.maxRow){const n={w:r.w,h:r.h,minW:r.minW,minH:r.minH};a=this.engine.willItFit(n)}return a}}).on(this.el,"dropover",(s,r,a)=>{let n=(a==null?void 0:a.gridstackNode)||r.gridstackNode;if((n==null?void 0:n.grid)===this&&!n._temporaryRemoved)return!1;if(n!=null&&n.grid&&n.grid!==this&&!n._temporaryRemoved&&n.grid._leave(r,a),a=a||r,t=this.cellWidth(),e=this.getCellHeight(!0),!n){const l=a.getAttribute("data-gs-widget")||a.getAttribute("gridstacknode");if(l){try{n=JSON.parse(l)}catch{console.error("Gridstack dropover: Bad JSON format: ",l)}a.removeAttribute("data-gs-widget"),a.removeAttribute("gridstacknode")}n||(n=this._readAttr(a))}n.grid||(n.el||(n={...n}),n._isExternal=!0,a.gridstackNode=n);const c=n.w||Math.round(a.offsetWidth/t)||1,d=n.h||Math.round(a.offsetHeight/e)||1;return n.grid&&n.grid!==this?(r._gridstackNodeOrig||(r._gridstackNodeOrig=n),r.gridstackNode=n={...n,w:c,h:d,grid:this},delete n.x,delete n.y,this.engine.cleanupNode(n).nodeBoundFix(n),n._initDD=n._isExternal=n._temporaryRemoved=!0):(n.w=c,n.h=d,n._temporaryRemoved=!0),w._itemRemoving(n.el,!1),B.on(r,"drag",i),i(s,r,a),!1}).on(this.el,"dropout",(s,r,a)=>{const n=(a==null?void 0:a.gridstackNode)||r.gridstackNode;return n&&(!n.grid||n.grid===this)&&(this._leave(r,a),this._isTemp&&this.removeAsSubGrid(n)),!1}).on(this.el,"drop",(s,r,a)=>{var p,y,_;const n=(a==null?void 0:a.gridstackNode)||r.gridstackNode;if((n==null?void 0:n.grid)===this&&!n._isExternal)return!1;const c=!!this.placeholder.parentElement,d=r!==a;this.placeholder.remove(),delete this.placeholder.gridstackNode;const l=c&&this.opts.animate;l&&this.setAnimation(!1);const h=r._gridstackNodeOrig;if(delete r._gridstackNodeOrig,c&&(h!=null&&h.grid)&&h.grid!==this){const m=h.grid;m.engine.removeNodeFromLayoutCache(h),m.engine.removedNodes.push(h),m._triggerRemoveEvent()._triggerChangeEvent(),m.parentGridNode&&!m.engine.nodes.length&&m.opts.subGridDynamic&&m.removeAsSubGrid()}if(!n||(c&&(this.engine.cleanupNode(n),n.grid=this),(p=n.grid)==null||delete p._isTemp,B.off(r,"drag"),a!==r?(a.remove(),r=a):r.remove(),this._removeDD(r),!c))return!1;const g=(_=(y=n.subGrid)==null?void 0:y.el)==null?void 0:_.gridstack;return u.copyPos(n,this._readAttr(this.placeholder)),u.removePositioningStyles(r),d&&(n.content||n.subGridOpts||w.addRemoveCB)?(delete n.el,r=this.addWidget(n)):(this._prepareElement(r,!0,n),this.el.appendChild(r),this.resizeToContentCheck(!1,n),g&&(g.parentGridNode=n,g.opts.styleInHead||g._updateStyles(!0)),this._updateContainerHeight()),this.engine.addedNodes.push(n),this._triggerAddEvent(),this._triggerChangeEvent(),this.engine.endUpdate(),this._gsEventHandler.dropped&&this._gsEventHandler.dropped({...s,type:"dropped"},h&&h.grid?h:void 0,n),l&&this.setAnimation(this.opts.animate,!0),!1}),this}static _itemRemoving(e,t){if(!e)return;const i=e?e.gridstackNode:void 0;!(i!=null&&i.grid)||e.classList.contains(i.grid.opts.removableOptions.decline)||(t?i._isAboutToRemove=!0:delete i._isAboutToRemove,t?e.classList.add("grid-stack-item-removing"):e.classList.remove("grid-stack-item-removing"))}_setupRemoveDrop(){if(typeof this.opts.removable!="string")return this;const e=document.querySelector(this.opts.removable);return e?(!this.opts.staticGrid&&!B.isDroppable(e)&&B.droppable(e,this.opts.removableOptions).on(e,"dropover",(t,i)=>w._itemRemoving(i,!0)).on(e,"dropout",(t,i)=>w._itemRemoving(i,!1)),this):this}_prepareDragDropByNode(e){const t=e.el,i=e.noMove||this.opts.disableDrag,s=e.noResize||this.opts.disableResize;if(this.opts.staticGrid||i&&s)return e._initDD&&(this._removeDD(t),delete e._initDD),t.classList.add("ui-draggable-disabled","ui-resizable-disabled"),this;if(!e._initDD){let r,a;const n=(l,h)=>{this._gsEventHandler[l.type]&&this._gsEventHandler[l.type](l,l.target),r=this.cellWidth(),a=this.getCellHeight(!0),this._onStartMoving(t,l,h,e,r,a)},c=(l,h)=>{this._dragOrResize(t,l,h,e,r,a)},d=l=>{this.placeholder.remove(),delete this.placeholder.gridstackNode,delete e._moving,delete e._event,delete e._lastTried;const h=e.w!==e._orig.w,g=l.target;if(!(!g.gridstackNode||g.gridstackNode.grid!==this)){if(e.el=g,e._isAboutToRemove){const p=t.gridstackNode.grid;p._gsEventHandler[l.type]&&p._gsEventHandler[l.type](l,g),p.engine.nodes.push(e),p.removeWidget(t,!0,!0)}else u.removePositioningStyles(g),e._temporaryRemoved?(u.copyPos(e,e._orig),this._writePosAttr(g,e),this.engine.addNode(e)):this._writePosAttr(g,e),this._gsEventHandler[l.type]&&this._gsEventHandler[l.type](l,g);this._extraDragRow=0,this._updateContainerHeight(),this._triggerChangeEvent(),this.engine.endUpdate(),l.type==="resizestop"&&(Number.isInteger(e.sizeToContent)&&(e.sizeToContent=e.h),this.resizeToContentCheck(h,e))}};B.draggable(t,{start:n,stop:d,drag:c}).resizable(t,{start:n,stop:d,resize:c}),e._initDD=!0}return B.draggable(t,i?"disable":"enable").resizable(t,s?"disable":"enable"),this}_onStartMoving(e,t,i,s,r,a){var n;if(this.engine.cleanNodes().beginUpdate(s),this._writePosAttr(this.placeholder,s),this.el.appendChild(this.placeholder),this.placeholder.gridstackNode=s,(n=s.grid)!=null&&n.el)this.dragTransform=u.getValuesFromTransformedElement(e);else if(this.placeholder&&this.placeholder.closest(".grid-stack")){const c=this.placeholder.closest(".grid-stack");this.dragTransform=u.getValuesFromTransformedElement(c)}else this.dragTransform={xScale:1,xOffset:0,yScale:1,yOffset:0};if(s.el=this.placeholder,s._lastUiPosition=i.position,s._prevYPix=i.position.top,s._moving=t.type==="dragstart",delete s._lastTried,t.type==="dropover"&&s._temporaryRemoved&&(this.engine.addNode(s),s._moving=!0),this.engine.cacheRects(r,a,this.opts.marginTop,this.opts.marginRight,this.opts.marginBottom,this.opts.marginLeft),t.type==="resizestart"){const c=this.getColumn()-s.x,d=(this.opts.maxRow||Number.MAX_SAFE_INTEGER)-s.y;B.resizable(e,"option","minWidth",r*Math.min(s.minW||1,c)).resizable(e,"option","minHeight",a*Math.min(s.minH||1,d)).resizable(e,"option","maxWidth",r*Math.min(s.maxW||Number.MAX_SAFE_INTEGER,c)).resizable(e,"option","maxWidthMoveLeft",r*Math.min(s.maxW||Number.MAX_SAFE_INTEGER,s.x+s.w)).resizable(e,"option","maxHeight",a*Math.min(s.maxH||Number.MAX_SAFE_INTEGER,d)).resizable(e,"option","maxHeightMoveUp",a*Math.min(s.maxH||Number.MAX_SAFE_INTEGER,s.y+s.h))}}_dragOrResize(e,t,i,s,r,a){const n={...s._orig};let c,d=this.opts.marginLeft,l=this.opts.marginRight,h=this.opts.marginTop,g=this.opts.marginBottom;const p=Math.round(a*.1),y=Math.round(r*.1);if(d=Math.min(d,y),l=Math.min(l,y),h=Math.min(h,p),g=Math.min(g,p),t.type==="drag"){if(s._temporaryRemoved)return;const m=i.position.top-s._prevYPix;s._prevYPix=i.position.top,this.opts.draggable.scroll!==!1&&u.updateScrollPosition(e,i.position,m);const k=i.position.left+(i.position.left>s._lastUiPosition.left?-l:d),S=i.position.top+(i.position.top>s._lastUiPosition.top?-g:h);n.x=Math.round(k/r),n.y=Math.round(S/a);const x=this._extraDragRow;if(this.engine.collide(s,n)){const O=this.getRow();let N=Math.max(0,n.y+s.h-O);this.opts.maxRow&&O+N>this.opts.maxRow&&(N=Math.max(0,this.opts.maxRow-O)),this._extraDragRow=N}else this._extraDragRow=0;if(this._extraDragRow!==x&&this._updateContainerHeight(),s.x===n.x&&s.y===n.y)return}else if(t.type==="resize"){if(n.x<0||(u.updateScrollResize(t,e,a),n.w=Math.round((i.size.width-d)/r),n.h=Math.round((i.size.height-h)/a),s.w===n.w&&s.h===n.h)||s._lastTried&&s._lastTried.w===n.w&&s._lastTried.h===n.h)return;const m=i.position.left+d,k=i.position.top+h;n.x=Math.round(m/r),n.y=Math.round(k/a),c=!0}s._event=t,s._lastTried=n;const _={x:i.position.left+d,y:i.position.top+h,w:(i.size?i.size.width:s.w*r)-d-l,h:(i.size?i.size.height:s.h*a)-h-g};if(this.engine.moveNodeCheck(s,{...n,cellWidth:r,cellHeight:a,rect:_,resizing:c})){s._lastUiPosition=i.position,this.engine.cacheRects(r,a,h,l,g,d),delete s._skipDown,c&&s.subGrid&&s.subGrid.onResize(),this._extraDragRow=0,this._updateContainerHeight();const m=t.target;this._writePosAttr(m,s),this._gsEventHandler[t.type]&&this._gsEventHandler[t.type](t,m)}}_leave(e,t){t=t||e;const i=t.gridstackNode;i&&(t.style.transform=t.style.transformOrigin=null,B.off(e,"drag"),!i._temporaryRemoved&&(i._temporaryRemoved=!0,this.engine.removeNode(i),i.el=i._isExternal&&t?t:e,i._isExternal&&this.engine.cleanupNode(i),this.opts.removable===!0&&w._itemRemoving(e,!0),e._gridstackNodeOrig?(e.gridstackNode=e._gridstackNodeOrig,delete e._gridstackNodeOrig):i._isExternal&&this.engine.restoreInitial()))}commit(){return Ut(this,this.batchUpdate(!1),"commit","batchUpdate","5.2"),this}}w.renderCB=(f,e)=>{f&&(e!=null&&e.content)&&(f.textContent=e.content)},w.resizeToContentParent=".grid-stack-item-content",w.Utils=u,w.Engine=W,w.GDRev="11.3.0";const Yt=["data-id","data-testid","gs-h","gs-w","gs-x","gs-y"],jt={class:"grid-stack-item-content"},Xt=J(o.defineComponent({__name:"DraggableGridLayout",props:{tiles:{},tileHeight:{default:ae}},emits:["update-tiles"],setup(f,{expose:e,emit:t}){const i=f,s=t,r=o.ref(null),a=o.ref(new Map(i.tiles.map(p=>[`${p.id}`,p])));let n=null;const c=p=>`[data-id="${p}"]`,d=p=>p.map(y=>{var m;const _=a.value.get(`${(m=y.el)==null?void 0:m.getAttribute("data-id")}`);if(_)return{..._,layout:{position:{col:Number(y.x),row:Number(y.y)},size:{cols:Number(y.w),rows:Number(y.h)}}}}).filter(y=>y!==void 0),l=(p,y)=>{n&&(d(y).forEach(m=>{a.value.set(`${m.id}`,m)}),s("update-tiles",Array.from(a.value.values())))},h=(p,y)=>{y.forEach(_=>{var m;a.value.delete(`${(m=_.el)==null?void 0:m.getAttribute("data-id")}`)}),s("update-tiles",Array.from(a.value.values()))};o.onMounted(()=>{r.value&&(n=w.init({margin:10,column:Te,cellHeight:i.tileHeight,resizable:{handles:"se, sw"},handle:".tile-header"},r.value),n.on("change",l),n.on("added",l),n.on("removed",h))}),o.onUnmounted(()=>{n&&n.destroy(!1)});const g=p=>{if(n&&r.value){const y=r.value.querySelector(c(p));y&&n.removeWidget(y)}};return o.watch(()=>i.tiles.length,async(p,y)=>{if(p>y&&n){const _=i.tiles.slice(y);for(const m of _)a.value.set(`${m.id}`,m),await o.nextTick(),n.makeWidget(c(m.id),{autoPosition:!0,w:m.layout.size.cols,h:m.layout.size.rows})}}),o.watchEffect(()=>{i.tiles.forEach(p=>{a.value.set(`${p.id}`,p)})}),e({removeWidget:g}),(p,y)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"gridContainer",ref:r,class:"grid-stack"},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i.tiles,_=>(o.openBlock(),o.createElementBlock("div",{key:_.id,class:"grid-stack-item","data-id":`${_.id}`,"data-testid":`grid-stack-item-${_.id}`,"gs-h":_.layout.size.rows,"gs-lazy-load":!0,"gs-w":_.layout.size.cols,"gs-x":_.layout.position.col,"gs-y":_.layout.position.row},[o.createElementVNode("div",jt,[o.renderSlot(p.$slots,"tile",{tile:_},void 0,!0)])],8,Yt))),128))],512))}}),[["__scopeId","data-v-e4e1101d"]]),Qt={class:"kong-ui-public-dashboard-renderer"},Zt={key:0,class:"tile-container slottable-tile"},Jt=J(o.defineComponent({__name:"DashboardRenderer",props:o.mergeModels({context:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:o.mergeModels(["edit-tile","zoom-time-range"],["update:modelValue"]),setup(f,{expose:e,emit:t}){const i=f,s=t,r=o.useModel(f,"modelValue"),{i18n:a}=te.useI18n(),n=o.ref(0),c=o.ref(null),d=o.inject(Q);d||(console.warn("Analytics dashboards require a query bridge supplied via provide / inject."),console.warn("Please ensure your application has a query bridge provided under the key 'analytics-query-provider', as described in"),console.warn("https://github.com/Kong/public-ui-components/blob/main/packages/analytics/dashboard-renderer/README.md#requirements")),te.useRequestQueue();const l=Be.useAnalyticsConfigStore(),h=o.computed(()=>i.context.timeSpec?i.context.timeSpec:{type:"relative",time_range:l.defaultQueryTimeForOrg}),g=o.computed(()=>!!i.context.timeSpec||!l.loading),p=(R,A)=>{const z=R.layout.position.row-A.layout.position.row;return z!==0?z:R.layout.position.col-A.layout.position.col},y=o.computed(()=>r.value.tiles.map(R=>{var z;let A=R.definition;if("description"in A.chart){const M=(z=A.chart.description)==null?void 0:z.replace(Ge,()=>{const b=`renderer.trendRange.${h.value.type==="absolute"?"custom":h.value.time_range}`;return a.te(b)?a.t(b):""});A={...A,chart:{...A.chart,description:M}}}return i.context.editable&&!R.id&&console.warn("No id provided for tile. One will be generated automatically,","however tracking changes to this tile may not work as expected.",R),{layout:R.layout,meta:A,id:R.id??crypto.randomUUID()}})),_=o.computed(()=>{let{tz:R,refreshInterval:A,editable:z}=i.context;const M=[...i.context.filters??[],...r.value.global_filters??[]];return R||(R=new Intl.DateTimeFormat().resolvedOptions().timeZone),A===void 0&&(A=Ue),z===void 0&&(z=!1),{filters:M,tz:R,timeSpec:h.value,refreshInterval:A,editable:z}}),m=R=>{s("edit-tile",R)},k=R=>R.type==="slottable",S=R=>{const A=k(R.meta.chart)?{...R.meta.chart}:{...R.meta.chart,chartTitle:R.meta.chart.chartTitle?`Copy of ${R.meta.chart.chartTitle}`:""},z={id:crypto.randomUUID(),definition:{...R.meta,chart:A},layout:{position:{col:0,row:0},size:R.layout.size}};r.value.tiles.push(z)},x=R=>{c.value&&c.value.removeWidget(R.id)},O=()=>{n.value++},N=R=>{const A=R.map(z=>({id:z.id,layout:z.layout,definition:z.meta}));r.value.tiles=A.sort(p)};return e({refresh:O}),(R,A)=>{const z=o.resolveComponent("KAlert");return o.openBlock(),o.createElementBlock("div",Qt,[o.unref(d)?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(R.context.editable?Xt:it),{key:1,ref_key:"gridLayoutRef",ref:c,"tile-height":r.value.tileHeight,tiles:y.value,onUpdateTiles:N},{tile:o.withCtx(({tile:M})=>[M.meta.chart.type==="slottable"?(o.openBlock(),o.createElementBlock("div",Zt,[o.renderSlot(R.$slots,M.meta.chart.id,{},void 0,!0)])):(o.openBlock(),o.createBlock(Ft,{key:1,class:"tile-container",context:_.value,definition:M.meta,height:M.layout.size.rows*(r.value.tileHeight||o.unref(ae))+parseInt(o.unref(et),10),"query-ready":g.value,"refresh-counter":n.value,"tile-id":M.id,onDuplicateTile:ee=>S(M),onEditTile:ee=>m(M),onRemoveTile:ee=>x(M),onZoomTimeRange:A[0]||(A[0]=ee=>s("zoom-time-range",ee))},null,8,["context","definition","height","query-ready","refresh-counter","tile-id","onDuplicateTile","onEditTile","onRemoveTile"]))]),_:3},40,["tile-height","tiles"])):(o.openBlock(),o.createBlock(z,{key:0,appearance:"danger"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(a).t("renderer.noQueryBridge")),1)]),_:1}))])}}}),[["__scopeId","data-v-0bb82daa"]]);E.CP_ID_TOKEN=Fe,E.DASHBOARD_COLS=Te,E.DEFAULT_TILE_HEIGHT=ae,E.DEFAULT_TILE_REFRESH_INTERVAL_MS=Ue,E.DashboardRenderer=Jt,E.ENTITY_ID_TOKEN=De,E.GridLayout=it,E.INJECT_QUERY_PROVIDER=Q,E.TIMEFRAME_TOKEN=Ge,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})});
9
+ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.`)),i}static addGrid(e,t={}){if(!e)return null;let i=e;if(i.gridstack){const a=i.gridstack;return t&&(a.opts={...a.opts,...t}),t.children!==void 0&&a.load(t.children),a}return(!e.classList.contains("grid-stack")||w.addRemoveCB)&&(w.addRemoveCB?i=w.addRemoveCB(e,t,!0,!0):i=u.createDiv(["grid-stack",t.class],e)),w.init(t,i)}static registerEngine(e){w.engineClass=e}get placeholder(){if(!this._placeholder){this._placeholder=u.createDiv([this.opts.placeholderClass,q.itemClass,this.opts.itemClass]);const e=u.createDiv(["placeholder-content"],this._placeholder);this.opts.placeholderText&&(e.textContent=this.opts.placeholderText)}return this._placeholder}constructor(e,t={}){var h,g,p;this.el=e,this.opts=t,this.animationDelay=310,this._gsEventHandler={},this._extraDragRow=0,this.dragTransform={xScale:1,yScale:1,xOffset:0,yOffset:0},e.gridstack=this,this.opts=t=t||{},e.classList.contains("grid-stack")||this.el.classList.add("grid-stack"),t.row&&(t.minRow=t.maxRow=t.row,delete t.row);const i=u.toNumber(e.getAttribute("gs-row"));t.column==="auto"&&delete t.column,t.alwaysShowResizeHandle!==void 0&&(t._alwaysShowResizeHandle=t.alwaysShowResizeHandle);let s=(h=t.columnOpts)==null?void 0:h.breakpoints;const r=t;if(r.oneColumnModeDomSort&&(delete r.oneColumnModeDomSort,console.log("warning: Gridstack oneColumnModeDomSort no longer supported. Use GridStackOptions.columnOpts instead.")),r.oneColumnSize||r.disableOneColumnMode===!1){const y=r.oneColumnSize||768;delete r.oneColumnSize,delete r.disableOneColumnMode,t.columnOpts=t.columnOpts||{},s=t.columnOpts.breakpoints=t.columnOpts.breakpoints||[];let _=s.find(m=>m.c===1);_?_.w=y:(_={c:1,w:y},s.push(_,{c:12,w:y+1}))}const a=t.columnOpts;a&&(!a.columnWidth&&!((g=a.breakpoints)!=null&&g.length)?(delete t.columnOpts,s=void 0):a.columnMax=a.columnMax||12),(s==null?void 0:s.length)>1&&s.sort((y,_)=>(_.w||0)-(y.w||0));const n={...u.cloneDeep(q),column:u.toNumber(e.getAttribute("gs-column"))||q.column,minRow:i||u.toNumber(e.getAttribute("gs-min-row"))||q.minRow,maxRow:i||u.toNumber(e.getAttribute("gs-max-row"))||q.maxRow,staticGrid:u.toBool(e.getAttribute("gs-static"))||q.staticGrid,sizeToContent:u.toBool(e.getAttribute("gs-size-to-content"))||void 0,draggable:{handle:(t.handleClass?"."+t.handleClass:t.handle?t.handle:"")||q.draggable.handle},removableOptions:{accept:t.itemClass||q.removableOptions.accept,decline:q.removableOptions.decline}};e.getAttribute("gs-animate")&&(n.animate=u.toBool(e.getAttribute("gs-animate"))),t=u.defaults(t,n),this._initMargin(),this.checkDynamicColumn(),this.el.classList.add("gs-"+t.column),t.rtl==="auto"&&(t.rtl=e.style.direction==="rtl"),t.rtl&&this.el.classList.add("grid-stack-rtl");const c=this.el.closest("."+q.itemClass),d=c==null?void 0:c.gridstackNode;d&&(d.subGrid=this,this.parentGridNode=d,this.el.classList.add("grid-stack-nested"),d.el.classList.add("grid-stack-sub-grid")),this._isAutoCellHeight=t.cellHeight==="auto",this._isAutoCellHeight||t.cellHeight==="initial"?this.cellHeight(void 0,!1):(typeof t.cellHeight=="number"&&t.cellHeightUnit&&t.cellHeightUnit!==q.cellHeightUnit&&(t.cellHeight=t.cellHeight+t.cellHeightUnit,delete t.cellHeightUnit),this.cellHeight(t.cellHeight,!1)),t.alwaysShowResizeHandle==="mobile"&&(t.alwaysShowResizeHandle=U),this._styleSheetClass="gs-id-"+W._idSeq++,this.el.classList.add(this._styleSheetClass),this._setStaticClass();const l=t.engineClass||w.engineClass||W;if(this.engine=new l({column:this.getColumn(),float:t.float,maxRow:t.maxRow,onChange:y=>{let _=0;this.engine.nodes.forEach(m=>{_=Math.max(_,m.y+m.h)}),y.forEach(m=>{const k=m.el;k&&(m._removeDOM?(k&&k.remove(),delete m._removeDOM):this._writePosAttr(k,m))}),this._updateStyles(!1,_)}}),this._updateStyles(!1,0),t.auto&&(this.batchUpdate(),this.engine._loading=!0,this.getGridItems().forEach(y=>this._prepareElement(y)),delete this.engine._loading,this.batchUpdate(!1)),t.children){const y=t.children;delete t.children,y.length&&this.load(y)}this.setAnimation(),t.subGridDynamic&&!C.pauseDrag&&(C.pauseDrag=!0),((p=t.draggable)==null?void 0:p.pause)!==void 0&&(C.pauseDrag=t.draggable.pause),this._setupRemoveDrop(),this._setupAcceptWidget(),this._updateResizeEvent()}addWidget(e){if(typeof e=="string"){console.error("V11: GridStack.addWidget() does not support string anymore. see #2736");return}if(e.ELEMENT_NODE)return console.error("V11: GridStack.addWidget() does not support HTMLElement anymore. use makeWidget()"),this.makeWidget(e);let t,i=e;if(i.grid=this,i!=null&&i.el?t=i.el:w.addRemoveCB?t=w.addRemoveCB(this.el,e,!0,!1):t=u.createWidgetDivs(this.opts.itemClass,i),!t)return;if(i=t.gridstackNode,i&&t.parentElement===this.el&&this.engine.nodes.find(r=>r._id===i._id))return t;const s=this._readAttr(t);return u.defaults(e,s),this.engine.prepareNode(e),this.el.appendChild(t),this.makeWidget(t,e),t}makeSubGrid(e,t,i,s=!0){var p,y,_;let r=e.gridstackNode;if(r||(r=this.makeWidget(e).gridstackNode),(p=r.subGrid)!=null&&p.el)return r.subGrid;let a,n=this;for(;n&&!a;)a=(y=n.opts)==null?void 0:y.subGridOpts,n=(_=n.parentGridNode)==null?void 0:_.grid;t=u.cloneDeep({...this.opts,id:void 0,children:void 0,column:"auto",columnOpts:void 0,layout:"list",subGridOpts:void 0,...a||{},...t||r.subGridOpts||{}}),r.subGridOpts=t;let c;t.column==="auto"&&(c=!0,t.column=Math.max(r.w||1,(i==null?void 0:i.w)||1),delete t.columnOpts);let d=r.el.querySelector(".grid-stack-item-content"),l,h;if(s&&(this._removeDD(r.el),h={...r,x:0,y:0},u.removeInternalForSave(h),delete h.subGridOpts,r.content&&(h.content=r.content,delete r.content),w.addRemoveCB?l=w.addRemoveCB(this.el,h,!0,!1):(l=u.createDiv(["grid-stack-item"]),l.appendChild(d),d=u.createDiv(["grid-stack-item-content"],r.el)),this._prepareDragDropByNode(r)),i){const m=c?t.column:r.w,k=r.h+i.h,S=r.el.style;S.transition="none",this.update(r.el,{w:m,h:k}),setTimeout(()=>S.transition=null)}const g=r.subGrid=w.addGrid(d,t);return i!=null&&i._moving&&(g._isTemp=!0),c&&(g._autoColumn=!0),s&&g.makeWidget(l,h),i&&(i._moving?window.setTimeout(()=>u.simulateMouseEvent(i._event,"mouseenter",g.el),0):g.makeWidget(r.el,r)),this.resizeToContentCheck(!1,r),g}removeAsSubGrid(e){var i;const t=(i=this.parentGridNode)==null?void 0:i.grid;t&&(t.batchUpdate(),t.removeWidget(this.parentGridNode.el,!0,!0),this.engine.nodes.forEach(s=>{s.x+=this.parentGridNode.x,s.y+=this.parentGridNode.y,t.makeWidget(s.el,s)}),t.batchUpdate(!1),this.parentGridNode&&delete this.parentGridNode.subGrid,delete this.parentGridNode,e&&window.setTimeout(()=>u.simulateMouseEvent(e._event,"mouseenter",t.el),0))}save(e=!0,t=!1,i=w.saveCB){const s=this.engine.save(e,i);if(s.forEach(r=>{var a;if(e&&r.el&&!r.subGrid&&!i){const n=r.el.querySelector(".grid-stack-item-content");r.content=n==null?void 0:n.innerHTML,r.content||delete r.content}else if(!e&&!i&&delete r.content,(a=r.subGrid)!=null&&a.el){const n=r.subGrid.save(e,t,i);r.subGridOpts=t?n:{children:n},delete r.subGrid}delete r.el}),t){const r=u.cloneDeep(this.opts);r.marginBottom===r.marginTop&&r.marginRight===r.marginLeft&&r.marginTop===r.marginRight&&(r.margin=r.marginTop,delete r.marginTop,delete r.marginRight,delete r.marginBottom,delete r.marginLeft),r.rtl===(this.el.style.direction==="rtl")&&(r.rtl="auto"),this._isAutoCellHeight&&(r.cellHeight="auto"),this._autoColumn&&(r.column="auto");const a=r._alwaysShowResizeHandle;return delete r._alwaysShowResizeHandle,a!==void 0?r.alwaysShowResizeHandle=a:delete r.alwaysShowResizeHandle,u.removeInternalAndSame(r,q),r.children=s,r}return s}load(e,t=w.addRemoveCB||!0){var d;e=u.cloneDeep(e);const i=this.getColumn();e.forEach(l=>{l.w=l.w||1,l.h=l.h||1}),e=u.sort(e),this.engine.skipCacheUpdate=this._ignoreLayoutsNodeChange=!0;let s=0;e.forEach(l=>{s=Math.max(s,(l.x||0)+l.w)}),s>this.engine.defaultColumn&&(this.engine.defaultColumn=s),s>i&&this.engine.cacheLayout(e,s,!0);const r=w.addRemoveCB;typeof t=="function"&&(w.addRemoveCB=t);const a=[];this.batchUpdate();const n=!this.engine.nodes.length;n&&this.setAnimation(!1),!n&&t&&[...this.engine.nodes].forEach(h=>{if(!h.id)return;u.find(e,h.id)||(w.addRemoveCB&&w.addRemoveCB(this.el,h,!1,!1),a.push(h),this.removeWidget(h.el,!0,!1))}),this.engine._loading=!0;const c=[];return this.engine.nodes=this.engine.nodes.filter(l=>u.find(e,l.id)?(c.push(l),!1):!0),e.forEach(l=>{var g;const h=u.find(c,l.id);if(h){if(u.shouldSizeToContent(h)&&(l.h=h.h),this.engine.nodeBoundFix(l),(l.autoPosition||l.x===void 0||l.y===void 0)&&(l.w=l.w||h.w,l.h=l.h||h.h,this.engine.findEmptyPosition(l)),this.engine.nodes.push(h),u.samePos(h,l)&&this.engine.nodes.length>1&&(this.moveNode(h,{...l,forceCollide:!0}),u.copyPos(l,h)),this.update(h.el,l),(g=l.subGridOpts)!=null&&g.children){const p=h.el.querySelector(".grid-stack");p&&p.gridstack&&p.gridstack.load(l.subGridOpts.children)}}else t&&this.addWidget(l)}),delete this.engine._loading,this.engine.removedNodes=a,this.batchUpdate(!1),delete this._ignoreLayoutsNodeChange,delete this.engine.skipCacheUpdate,r?w.addRemoveCB=r:delete w.addRemoveCB,n&&((d=this.opts)!=null&&d.animate)&&this.setAnimation(this.opts.animate,!0),this}batchUpdate(e=!0){return this.engine.batchUpdate(e),e||(this._updateContainerHeight(),this._triggerRemoveEvent(),this._triggerAddEvent(),this._triggerChangeEvent()),this}getCellHeight(e=!1){if(this.opts.cellHeight&&this.opts.cellHeight!=="auto"&&(!e||!this.opts.cellHeightUnit||this.opts.cellHeightUnit==="px"))return this.opts.cellHeight;if(this.opts.cellHeightUnit==="rem")return this.opts.cellHeight*parseFloat(getComputedStyle(document.documentElement).fontSize);if(this.opts.cellHeightUnit==="em")return this.opts.cellHeight*parseFloat(getComputedStyle(this.el).fontSize);if(this.opts.cellHeightUnit==="cm")return this.opts.cellHeight*(96/2.54);if(this.opts.cellHeightUnit==="mm")return this.opts.cellHeight*(96/2.54)/10;const t=this.el.querySelector("."+this.opts.itemClass);if(t){const s=u.toNumber(t.getAttribute("gs-h"))||1;return Math.round(t.offsetHeight/s)}const i=parseInt(this.el.getAttribute("gs-current-row"));return i?Math.round(this.el.getBoundingClientRect().height/i):this.opts.cellHeight}cellHeight(e,t=!0){if(t&&e!==void 0&&this._isAutoCellHeight!==(e==="auto")&&(this._isAutoCellHeight=e==="auto",this._updateResizeEvent()),(e==="initial"||e==="auto")&&(e=void 0),e===void 0){const s=-this.opts.marginRight-this.opts.marginLeft+this.opts.marginTop+this.opts.marginBottom;e=this.cellWidth()+s}const i=u.parseHeight(e);return this.opts.cellHeightUnit===i.unit&&this.opts.cellHeight===i.h?this:(this.opts.cellHeightUnit=i.unit,this.opts.cellHeight=i.h,this.resizeToContentCheck(),t&&this._updateStyles(!0),this)}cellWidth(){return this._widthOrContainer()/this.getColumn()}_widthOrContainer(e=!1){var t;return e&&((t=this.opts.columnOpts)!=null&&t.breakpointForWindow)?window.innerWidth:this.el.clientWidth||this.el.parentElement.clientWidth||window.innerWidth}checkDynamicColumn(){var r,a;const e=this.opts.columnOpts;if(!e||!e.columnWidth&&!((r=e.breakpoints)!=null&&r.length))return!1;const t=this.getColumn();let i=t;const s=this._widthOrContainer(!0);if(e.columnWidth)i=Math.min(Math.round(s/e.columnWidth)||1,e.columnMax);else{i=e.columnMax;let n=0;for(;n<e.breakpoints.length&&s<=e.breakpoints[n].w;)i=e.breakpoints[n++].c||t}if(i!==t){const n=(a=e.breakpoints)==null?void 0:a.find(c=>c.c===i);return this.column(i,(n==null?void 0:n.layout)||e.layout),!0}return!1}compact(e="compact",t=!0){return this.engine.compact(e,t),this._triggerChangeEvent(),this}column(e,t="moveScale"){if(!e||e<1||this.opts.column===e)return this;const i=this.getColumn();return this.opts.column=e,this.engine?(this.engine.column=e,this.el.classList.remove("gs-"+i),this.el.classList.add("gs-"+e),this.engine.columnChanged(i,e,t),this._isAutoCellHeight&&this.cellHeight(),this.resizeToContentCheck(!0),this._ignoreLayoutsNodeChange=!0,this._triggerChangeEvent(),delete this._ignoreLayoutsNodeChange,this):this}getColumn(){return this.opts.column}getGridItems(){return Array.from(this.el.children).filter(e=>e.matches("."+this.opts.itemClass)&&!e.matches("."+this.opts.placeholderClass))}isIgnoreChangeCB(){return this._ignoreLayoutsNodeChange}destroy(e=!0){var t,i;if(this.el)return this.offAll(),this._updateResizeEvent(!0),this.setStatic(!0,!1),this.setAnimation(!1),e?this.el.parentNode.removeChild(this.el):(this.removeAll(e),this.el.classList.remove(this._styleSheetClass),this.el.removeAttribute("gs-current-row")),this._removeStylesheet(),(t=this.parentGridNode)==null||delete t.subGrid,delete this.parentGridNode,delete this.opts,(i=this._placeholder)==null||delete i.gridstackNode,delete this._placeholder,delete this.engine,delete this.el.gridstack,delete this.el,this}float(e){return this.opts.float!==e&&(this.opts.float=this.engine.float=e,this._triggerChangeEvent()),this}getFloat(){return this.engine.float}getCellFromPixel(e,t=!1){const i=this.el.getBoundingClientRect();let s;t?s={top:i.top+document.documentElement.scrollTop,left:i.left}:s={top:this.el.offsetTop,left:this.el.offsetLeft};const r=e.left-s.left,a=e.top-s.top,n=i.width/this.getColumn(),c=i.height/parseInt(this.el.getAttribute("gs-current-row"));return{x:Math.floor(r/n),y:Math.floor(a/c)}}getRow(){return Math.max(this.engine.getRow(),this.opts.minRow)}isAreaEmpty(e,t,i,s){return this.engine.isAreaEmpty(e,t,i,s)}makeWidget(e,t){const i=w.getElement(e);if(!i)return;i.parentElement||this.el.appendChild(i),this._prepareElement(i,!0,t);const s=i.gridstackNode;this._updateContainerHeight(),s.subGridOpts&&this.makeSubGrid(i,s.subGridOpts,void 0,!1);let r;return this.opts.column===1&&!this._ignoreLayoutsNodeChange&&(r=this._ignoreLayoutsNodeChange=!0),this._triggerAddEvent(),this._triggerChangeEvent(),r&&delete this._ignoreLayoutsNodeChange,i}on(e,t){return e.indexOf(" ")!==-1?(e.split(" ").forEach(s=>this.on(s,t)),this):(e==="change"||e==="added"||e==="removed"||e==="enable"||e==="disable"?(e==="enable"||e==="disable"?this._gsEventHandler[e]=s=>t(s):this._gsEventHandler[e]=s=>{s.detail&&t(s,s.detail)},this.el.addEventListener(e,this._gsEventHandler[e])):e==="drag"||e==="dragstart"||e==="dragstop"||e==="resizestart"||e==="resize"||e==="resizestop"||e==="dropped"||e==="resizecontent"?this._gsEventHandler[e]=t:console.error("GridStack.on("+e+") event not supported"),this)}off(e){return e.indexOf(" ")!==-1?(e.split(" ").forEach(i=>this.off(i)),this):((e==="change"||e==="added"||e==="removed"||e==="enable"||e==="disable")&&this._gsEventHandler[e]&&this.el.removeEventListener(e,this._gsEventHandler[e]),delete this._gsEventHandler[e],this)}offAll(){return Object.keys(this._gsEventHandler).forEach(e=>this.off(e)),this}removeWidget(e,t=!0,i=!0){return e?(w.getElements(e).forEach(s=>{if(s.parentElement&&s.parentElement!==this.el)return;let r=s.gridstackNode;r||(r=this.engine.nodes.find(a=>s===a.el)),r&&(t&&w.addRemoveCB&&w.addRemoveCB(this.el,r,!1,!1),delete s.gridstackNode,this._removeDD(s),this.engine.removeNode(r,t,i),t&&s.parentElement&&s.remove())}),i&&(this._triggerRemoveEvent(),this._triggerChangeEvent()),this):(console.error("Error: GridStack.removeWidget(undefined) called"),this)}removeAll(e=!0,t=!0){return this.engine.nodes.forEach(i=>{e&&w.addRemoveCB&&w.addRemoveCB(this.el,i,!1,!1),delete i.el.gridstackNode,this.opts.staticGrid||this._removeDD(i.el)}),this.engine.removeAll(e,t),t&&this._triggerRemoveEvent(),this}setAnimation(e=this.opts.animate,t){return t?setTimeout(()=>{this.opts&&this.setAnimation(e)}):e?this.el.classList.add("grid-stack-animate"):this.el.classList.remove("grid-stack-animate"),this}hasAnimationCSS(){return this.el.classList.contains("grid-stack-animate")}setStatic(e,t=!0,i=!0){return!!this.opts.staticGrid===e?this:(e?this.opts.staticGrid=!0:delete this.opts.staticGrid,this._setupRemoveDrop(),this._setupAcceptWidget(),this.engine.nodes.forEach(s=>{this._prepareDragDropByNode(s),s.subGrid&&i&&s.subGrid.setStatic(e,t,i)}),t&&this._setStaticClass(),this)}update(e,t){if(arguments.length>2){console.warn("gridstack.ts: `update(el, x, y, w, h)` is deprecated. Use `update(el, {x, w, content, ...})`. It will be removed soon");const i=arguments;let s=1;return t={x:i[s++],y:i[s++],w:i[s++],h:i[s++]},this.update(e,t)}return w.getElements(e).forEach(i=>{var l;const s=i==null?void 0:i.gridstackNode;if(!s)return;const r=u.cloneDeep(t);this.engine.nodeBoundFix(r),delete r.autoPosition;const a=["x","y","w","h"];let n;if(a.some(h=>r[h]!==void 0&&r[h]!==s[h])&&(n={},a.forEach(h=>{n[h]=r[h]!==void 0?r[h]:s[h],delete r[h]})),!n&&(r.minW||r.minH||r.maxW||r.maxH)&&(n={}),r.content!==void 0){const h=i.querySelector(".grid-stack-item-content");h&&h.textContent!==r.content&&(s.content=r.content,w.renderCB(h,r),(l=s.subGrid)!=null&&l.el&&(h.appendChild(s.subGrid.el),s.subGrid.opts.styleInHead||s.subGrid._updateStyles(!0))),delete r.content}let c=!1,d=!1;for(const h in r)h[0]!=="_"&&s[h]!==r[h]&&(s[h]=r[h],c=!0,d=d||!this.opts.staticGrid&&(h==="noResize"||h==="noMove"||h==="locked"));if(u.sanitizeMinMax(s),n){const h=n.w!==void 0&&n.w!==s.w;this.moveNode(s,n),h&&s.subGrid?s.subGrid.onResize(this.hasAnimationCSS()?s.w:void 0):this.resizeToContentCheck(h,s),delete s._orig}(n||c)&&this._writeAttr(i,s),d&&this._prepareDragDropByNode(s)}),this}moveNode(e,t){const i=e._updating;i||this.engine.cleanNodes().beginUpdate(e),this.engine.moveNode(e,t),this._updateContainerHeight(),i||(this._triggerChangeEvent(),this.engine.endUpdate())}resizeToContent(e){var g,p;if(!e||(e.classList.remove("size-to-content-max"),!e.clientHeight))return;const t=e.gridstackNode;if(!t)return;const i=t.grid;if(!i||e.parentElement!==i.el)return;const s=i.getCellHeight(!0);if(!s)return;let r=t.h?t.h*s:e.clientHeight,a;if(t.resizeToContentParent&&(a=e.querySelector(t.resizeToContentParent)),a||(a=e.querySelector(w.resizeToContentParent)),!a)return;const n=e.clientHeight-a.clientHeight,c=t.h?t.h*s-n:a.clientHeight;let d;if(t.subGrid){d=t.subGrid.getRow()*t.subGrid.getCellHeight(!0);const y=t.subGrid.el.getBoundingClientRect(),_=t.subGrid.el.parentElement.getBoundingClientRect();d+=y.top-_.top}else{if((p=(g=t.subGridOpts)==null?void 0:g.children)!=null&&p.length)return;{const y=a.firstElementChild;if(!y){console.error(`Error: GridStack.resizeToContent() widget id:${t.id} '${w.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);return}d=y.getBoundingClientRect().height||c}}if(c===d)return;r+=d-c;let l=Math.ceil(r/s);const h=Number.isInteger(t.sizeToContent)?t.sizeToContent:0;h&&l>h&&(l=h,e.classList.add("size-to-content-max")),t.minH&&l<t.minH?l=t.minH:t.maxH&&l>t.maxH&&(l=t.maxH),l!==t.h&&(i._ignoreLayoutsNodeChange=!0,i.moveNode(t,{h:l}),delete i._ignoreLayoutsNodeChange)}resizeToContentCBCheck(e){w.resizeToContentCB?w.resizeToContentCB(e):this.resizeToContent(e)}rotate(e,t){return w.getElements(e).forEach(i=>{const s=i.gridstackNode;if(!u.canBeRotated(s))return;const r={w:s.h,h:s.w,minH:s.minW,minW:s.minH,maxH:s.maxW,maxW:s.maxH};if(t){const n=t.left>0?Math.floor(t.left/this.cellWidth()):0,c=t.top>0?Math.floor(t.top/this.opts.cellHeight):0;r.x=s.x+n-(s.h-(c+1)),r.y=s.y+c-n}Object.keys(r).forEach(n=>{r[n]===void 0&&delete r[n]});const a=s._orig;this.update(i,r),s._orig=a}),this}margin(e){if(!(typeof e=="string"&&e.split(" ").length>1)){const i=u.parseHeight(e);if(this.opts.marginUnit===i.unit&&this.opts.margin===i.h)return}return this.opts.margin=e,this.opts.marginTop=this.opts.marginBottom=this.opts.marginLeft=this.opts.marginRight=void 0,this._initMargin(),this._updateStyles(!0),this}getMargin(){return this.opts.margin}willItFit(e){if(arguments.length>1){console.warn("gridstack.ts: `willItFit(x,y,w,h,autoPosition)` is deprecated. Use `willItFit({x, y,...})`. It will be removed soon");const t=arguments;let i=0,s={x:t[i++],y:t[i++],w:t[i++],h:t[i++],autoPosition:t[i++]};return this.willItFit(s)}return this.engine.willItFit(e)}_triggerChangeEvent(){if(this.engine.batchMode)return this;const e=this.engine.getDirtyNodes(!0);return e&&e.length&&(this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(e),this._triggerEvent("change",e)),this.engine.saveInitial(),this}_triggerAddEvent(){var e;if(this.engine.batchMode)return this;if((e=this.engine.addedNodes)!=null&&e.length){this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(this.engine.addedNodes),this.engine.addedNodes.forEach(i=>{delete i._dirty});const t=[...this.engine.addedNodes];this.engine.addedNodes=[],this._triggerEvent("added",t)}return this}_triggerRemoveEvent(){var e;if(this.engine.batchMode)return this;if((e=this.engine.removedNodes)!=null&&e.length){const t=[...this.engine.removedNodes];this.engine.removedNodes=[],this._triggerEvent("removed",t)}return this}_triggerEvent(e,t){const i=t?new CustomEvent(e,{bubbles:!1,detail:t}):new Event(e);return this.el.dispatchEvent(i),this}_removeStylesheet(){if(this._styles){const e=this.opts.styleInHead?void 0:this.el.parentNode;u.removeStylesheet(this._styleSheetClass,e),delete this._styles}return this}_updateStyles(e=!1,t){if(e&&this._removeStylesheet(),t===void 0&&(t=this.getRow()),this._updateContainerHeight(),this.opts.cellHeight===0)return this;const i=this.opts.cellHeight,s=this.opts.cellHeightUnit,r=`.${this._styleSheetClass} > .${this.opts.itemClass}`;if(!this._styles){const a=this.opts.styleInHead?void 0:this.el.parentNode;if(this._styles=u.createStylesheet(this._styleSheetClass,a,{nonce:this.opts.nonce}),!this._styles)return this;this._styles._max=0,u.addCSSRule(this._styles,r,`height: ${i}${s}`);const n=this.opts.marginTop+this.opts.marginUnit,c=this.opts.marginBottom+this.opts.marginUnit,d=this.opts.marginRight+this.opts.marginUnit,l=this.opts.marginLeft+this.opts.marginUnit,h=`${r} > .grid-stack-item-content`,g=`.${this._styleSheetClass} > .grid-stack-placeholder > .placeholder-content`;u.addCSSRule(this._styles,h,`top: ${n}; right: ${d}; bottom: ${c}; left: ${l};`),u.addCSSRule(this._styles,g,`top: ${n}; right: ${d}; bottom: ${c}; left: ${l};`),u.addCSSRule(this._styles,`${r} > .ui-resizable-n`,`top: ${n};`),u.addCSSRule(this._styles,`${r} > .ui-resizable-s`,`bottom: ${c}`),u.addCSSRule(this._styles,`${r} > .ui-resizable-ne`,`right: ${d}; top: ${n}`),u.addCSSRule(this._styles,`${r} > .ui-resizable-e`,`right: ${d}`),u.addCSSRule(this._styles,`${r} > .ui-resizable-se`,`right: ${d}; bottom: ${c}`),u.addCSSRule(this._styles,`${r} > .ui-resizable-nw`,`left: ${l}; top: ${n}`),u.addCSSRule(this._styles,`${r} > .ui-resizable-w`,`left: ${l}`),u.addCSSRule(this._styles,`${r} > .ui-resizable-sw`,`left: ${l}; bottom: ${c}`)}if(t=t||this._styles._max,t>this._styles._max){const a=n=>i*n+s;for(let n=this._styles._max+1;n<=t;n++)u.addCSSRule(this._styles,`${r}[gs-y="${n}"]`,`top: ${a(n)}`),u.addCSSRule(this._styles,`${r}[gs-h="${n+1}"]`,`height: ${a(n+1)}`);this._styles._max=t}return this}_updateContainerHeight(){if(!this.engine||this.engine.batchMode)return this;const e=this.parentGridNode;let t=this.getRow()+this._extraDragRow;const i=this.opts.cellHeight,s=this.opts.cellHeightUnit;if(!i)return this;if(!e){const r=u.parseHeight(getComputedStyle(this.el).minHeight);if(r.h>0&&r.unit===s){const a=Math.floor(r.h/i);t<a&&(t=a)}}return this.el.setAttribute("gs-current-row",String(t)),this.el.style.removeProperty("min-height"),this.el.style.removeProperty("height"),t&&(this.el.style[e?"minHeight":"height"]=t*i+s),e&&!e.grid.engine.batchMode&&u.shouldSizeToContent(e)&&e.grid.resizeToContentCBCheck(e.el),this}_prepareElement(e,t=!1,i){i=i||this._readAttr(e),e.gridstackNode=i,i.el=e,i.grid=this,i=this.engine.addNode(i,t),this._writeAttr(e,i),e.classList.add(q.itemClass,this.opts.itemClass);const s=u.shouldSizeToContent(i);return s?e.classList.add("size-to-content"):e.classList.remove("size-to-content"),s&&this.resizeToContentCheck(!1,i),this._prepareDragDropByNode(i),this}_writePosAttr(e,t){return t.x!==void 0&&t.x!==null&&e.setAttribute("gs-x",String(t.x)),t.y!==void 0&&t.y!==null&&e.setAttribute("gs-y",String(t.y)),t.w>1?e.setAttribute("gs-w",String(t.w)):e.removeAttribute("gs-w"),t.h>1?e.setAttribute("gs-h",String(t.h)):e.removeAttribute("gs-h"),this}_writeAttr(e,t){if(!t)return this;this._writePosAttr(e,t);const i={noResize:"gs-no-resize",noMove:"gs-no-move",locked:"gs-locked",id:"gs-id",sizeToContent:"gs-size-to-content"};for(const s in i)t[s]?e.setAttribute(i[s],String(t[s])):e.removeAttribute(i[s]);return this}_readAttr(e,t=!0){const i={};i.x=u.toNumber(e.getAttribute("gs-x")),i.y=u.toNumber(e.getAttribute("gs-y")),i.w=u.toNumber(e.getAttribute("gs-w")),i.h=u.toNumber(e.getAttribute("gs-h")),i.autoPosition=u.toBool(e.getAttribute("gs-auto-position")),i.noResize=u.toBool(e.getAttribute("gs-no-resize")),i.noMove=u.toBool(e.getAttribute("gs-no-move")),i.locked=u.toBool(e.getAttribute("gs-locked")),i.sizeToContent=u.toBool(e.getAttribute("gs-size-to-content")),i.id=e.getAttribute("gs-id"),i.maxW=u.toNumber(e.getAttribute("gs-max-w")),i.minW=u.toNumber(e.getAttribute("gs-min-w")),i.maxH=u.toNumber(e.getAttribute("gs-max-h")),i.minH=u.toNumber(e.getAttribute("gs-min-h")),t&&(i.w===1&&e.removeAttribute("gs-w"),i.h===1&&e.removeAttribute("gs-h"),i.maxW&&e.removeAttribute("gs-max-w"),i.minW&&e.removeAttribute("gs-min-w"),i.maxH&&e.removeAttribute("gs-max-h"),i.minH&&e.removeAttribute("gs-min-h"));for(const s in i){if(!i.hasOwnProperty(s))return;!i[s]&&i[s]!==0&&delete i[s]}return i}_setStaticClass(){const e=["grid-stack-static"];return this.opts.staticGrid?(this.el.classList.add(...e),this.el.setAttribute("gs-static","true")):(this.el.classList.remove(...e),this.el.removeAttribute("gs-static")),this}onResize(e=(t=>(t=this.el)==null?void 0:t.clientWidth)()){if(!e||this.prevWidth===e)return;this.prevWidth=e,this.batchUpdate();let i=!1;return this._autoColumn&&this.parentGridNode?this.opts.column!==this.parentGridNode.w&&(this.column(this.parentGridNode.w,this.opts.layout||"list"),i=!0):i=this.checkDynamicColumn(),this._isAutoCellHeight&&this.cellHeight(),this.engine.nodes.forEach(s=>{s.subGrid&&s.subGrid.onResize()}),this._skipInitialResize||this.resizeToContentCheck(i),delete this._skipInitialResize,this.batchUpdate(!1),this}resizeToContentCheck(e=!1,t=void 0){if(this.engine){if(e&&this.hasAnimationCSS())return setTimeout(()=>this.resizeToContentCheck(!1,t),this.animationDelay);if(t)u.shouldSizeToContent(t)&&this.resizeToContentCBCheck(t.el);else if(this.engine.nodes.some(i=>u.shouldSizeToContent(i))){const i=[...this.engine.nodes];this.batchUpdate(),i.forEach(s=>{u.shouldSizeToContent(s)&&this.resizeToContentCBCheck(s.el)}),this.batchUpdate(!1)}this._gsEventHandler.resizecontent&&this._gsEventHandler.resizecontent(null,t?[t]:this.engine.nodes)}}_updateResizeEvent(e=!1){const t=!this.parentGridNode&&(this._isAutoCellHeight||this.opts.sizeToContent||this.opts.columnOpts||this.engine.nodes.find(i=>i.sizeToContent));return!e&&t&&!this.resizeObserver?(this._sizeThrottle=u.throttle(()=>this.onResize(),this.opts.cellHeightThrottle),this.resizeObserver=new ResizeObserver(()=>this._sizeThrottle()),this.resizeObserver.observe(this.el),this._skipInitialResize=!0):(e||!t)&&this.resizeObserver&&(this.resizeObserver.disconnect(),delete this.resizeObserver,delete this._sizeThrottle),this}static getElement(e=".grid-stack-item"){return u.getElement(e)}static getElements(e=".grid-stack-item"){return u.getElements(e)}static getGridElement(e){return w.getElement(e)}static getGridElements(e){return u.getElements(e)}_initMargin(){let e,t=0,i=[];return typeof this.opts.margin=="string"&&(i=this.opts.margin.split(" ")),i.length===2?(this.opts.marginTop=this.opts.marginBottom=i[0],this.opts.marginLeft=this.opts.marginRight=i[1]):i.length===4?(this.opts.marginTop=i[0],this.opts.marginRight=i[1],this.opts.marginBottom=i[2],this.opts.marginLeft=i[3]):(e=u.parseHeight(this.opts.margin),this.opts.marginUnit=e.unit,t=this.opts.margin=e.h),this.opts.marginTop===void 0?this.opts.marginTop=t:(e=u.parseHeight(this.opts.marginTop),this.opts.marginTop=e.h,delete this.opts.margin),this.opts.marginBottom===void 0?this.opts.marginBottom=t:(e=u.parseHeight(this.opts.marginBottom),this.opts.marginBottom=e.h,delete this.opts.margin),this.opts.marginRight===void 0?this.opts.marginRight=t:(e=u.parseHeight(this.opts.marginRight),this.opts.marginRight=e.h,delete this.opts.margin),this.opts.marginLeft===void 0?this.opts.marginLeft=t:(e=u.parseHeight(this.opts.marginLeft),this.opts.marginLeft=e.h,delete this.opts.margin),this.opts.marginUnit=e.unit,this.opts.marginTop===this.opts.marginBottom&&this.opts.marginLeft===this.opts.marginRight&&this.opts.marginTop===this.opts.marginRight&&(this.opts.margin=this.opts.marginTop),this}static getDD(){return B}static setupDragIn(e,t,i,s=document){(t==null?void 0:t.pause)!==void 0&&(C.pauseDrag=t.pause),t={appendTo:"body",helper:"clone",...t||{}},(typeof e=="string"?u.getElements(e,s):e).forEach((a,n)=>{B.isDraggable(a)||B.dragIn(a,t),i!=null&&i[n]&&(a.gridstackNode=i[n])})}movable(e,t){return this.opts.staticGrid?this:(w.getElements(e).forEach(i=>{const s=i.gridstackNode;s&&(t?delete s.noMove:s.noMove=!0,this._prepareDragDropByNode(s))}),this)}resizable(e,t){return this.opts.staticGrid?this:(w.getElements(e).forEach(i=>{const s=i.gridstackNode;s&&(t?delete s.noResize:s.noResize=!0,this._prepareDragDropByNode(s))}),this)}disable(e=!0){if(!this.opts.staticGrid)return this.enableMove(!1,e),this.enableResize(!1,e),this._triggerEvent("disable"),this}enable(e=!0){if(!this.opts.staticGrid)return this.enableMove(!0,e),this.enableResize(!0,e),this._triggerEvent("enable"),this}enableMove(e,t=!0){return this.opts.staticGrid?this:(e?delete this.opts.disableDrag:this.opts.disableDrag=!0,this.engine.nodes.forEach(i=>{this._prepareDragDropByNode(i),i.subGrid&&t&&i.subGrid.enableMove(e,t)}),this)}enableResize(e,t=!0){return this.opts.staticGrid?this:(e?delete this.opts.disableResize:this.opts.disableResize=!0,this.engine.nodes.forEach(i=>{this._prepareDragDropByNode(i),i.subGrid&&t&&i.subGrid.enableResize(e,t)}),this)}cancelDrag(){var t;const e=(t=this._placeholder)==null?void 0:t.gridstackNode;e&&(e._isExternal?(e._isAboutToRemove=!0,this.engine.removeNode(e)):e._isAboutToRemove&&w._itemRemoving(e.el,!1),this.engine.restoreInitial())}_removeDD(e){return B.draggable(e,"destroy").resizable(e,"destroy"),e.gridstackNode&&delete e.gridstackNode._initDD,delete e.ddElement,this}_setupAcceptWidget(){if(this.opts.staticGrid||!this.opts.acceptWidgets&&!this.opts.removable)return B.droppable(this.el,"destroy"),this;let e,t;const i=(s,r,a)=>{var g;a=a||r;const n=a.gridstackNode;if(!n)return;if(!((g=n.grid)!=null&&g.el)){a.style.transform=`scale(${1/this.dragTransform.xScale},${1/this.dragTransform.yScale})`;const p=a.getBoundingClientRect();a.style.left=p.x+(this.dragTransform.xScale-1)*(s.clientX-p.x)/this.dragTransform.xScale+"px",a.style.top=p.y+(this.dragTransform.yScale-1)*(s.clientY-p.y)/this.dragTransform.yScale+"px",a.style.transformOrigin="0px 0px"}let{top:c,left:d}=a.getBoundingClientRect();const l=this.el.getBoundingClientRect();d-=l.left,c-=l.top;const h={position:{top:c*this.dragTransform.xScale,left:d*this.dragTransform.yScale}};if(n._temporaryRemoved){if(n.x=Math.max(0,Math.round(d/t)),n.y=Math.max(0,Math.round(c/e)),delete n.autoPosition,this.engine.nodeBoundFix(n),!this.engine.willItFit(n)){if(n.autoPosition=!0,!this.engine.willItFit(n)){B.off(r,"drag");return}n._willFitPos&&(u.copyPos(n,n._willFitPos),delete n._willFitPos)}this._onStartMoving(a,s,h,n,t,e)}else this._dragOrResize(a,s,h,n,t,e)};return B.droppable(this.el,{accept:s=>{const r=s.gridstackNode||this._readAttr(s,!1);if((r==null?void 0:r.grid)===this)return!0;if(!this.opts.acceptWidgets)return!1;let a=!0;if(typeof this.opts.acceptWidgets=="function")a=this.opts.acceptWidgets(s);else{const n=this.opts.acceptWidgets===!0?".grid-stack-item":this.opts.acceptWidgets;a=s.matches(n)}if(a&&r&&this.opts.maxRow){const n={w:r.w,h:r.h,minW:r.minW,minH:r.minH};a=this.engine.willItFit(n)}return a}}).on(this.el,"dropover",(s,r,a)=>{let n=(a==null?void 0:a.gridstackNode)||r.gridstackNode;if((n==null?void 0:n.grid)===this&&!n._temporaryRemoved)return!1;if(n!=null&&n.grid&&n.grid!==this&&!n._temporaryRemoved&&n.grid._leave(r,a),a=a||r,t=this.cellWidth(),e=this.getCellHeight(!0),!n){const l=a.getAttribute("data-gs-widget")||a.getAttribute("gridstacknode");if(l){try{n=JSON.parse(l)}catch{console.error("Gridstack dropover: Bad JSON format: ",l)}a.removeAttribute("data-gs-widget"),a.removeAttribute("gridstacknode")}n||(n=this._readAttr(a))}n.grid||(n.el||(n={...n}),n._isExternal=!0,a.gridstackNode=n);const c=n.w||Math.round(a.offsetWidth/t)||1,d=n.h||Math.round(a.offsetHeight/e)||1;return n.grid&&n.grid!==this?(r._gridstackNodeOrig||(r._gridstackNodeOrig=n),r.gridstackNode=n={...n,w:c,h:d,grid:this},delete n.x,delete n.y,this.engine.cleanupNode(n).nodeBoundFix(n),n._initDD=n._isExternal=n._temporaryRemoved=!0):(n.w=c,n.h=d,n._temporaryRemoved=!0),w._itemRemoving(n.el,!1),B.on(r,"drag",i),i(s,r,a),!1}).on(this.el,"dropout",(s,r,a)=>{const n=(a==null?void 0:a.gridstackNode)||r.gridstackNode;return n&&(!n.grid||n.grid===this)&&(this._leave(r,a),this._isTemp&&this.removeAsSubGrid(n)),!1}).on(this.el,"drop",(s,r,a)=>{var p,y,_;const n=(a==null?void 0:a.gridstackNode)||r.gridstackNode;if((n==null?void 0:n.grid)===this&&!n._isExternal)return!1;const c=!!this.placeholder.parentElement,d=r!==a;this.placeholder.remove(),delete this.placeholder.gridstackNode;const l=c&&this.opts.animate;l&&this.setAnimation(!1);const h=r._gridstackNodeOrig;if(delete r._gridstackNodeOrig,c&&(h!=null&&h.grid)&&h.grid!==this){const m=h.grid;m.engine.removeNodeFromLayoutCache(h),m.engine.removedNodes.push(h),m._triggerRemoveEvent()._triggerChangeEvent(),m.parentGridNode&&!m.engine.nodes.length&&m.opts.subGridDynamic&&m.removeAsSubGrid()}if(!n||(c&&(this.engine.cleanupNode(n),n.grid=this),(p=n.grid)==null||delete p._isTemp,B.off(r,"drag"),a!==r?(a.remove(),r=a):r.remove(),this._removeDD(r),!c))return!1;const g=(_=(y=n.subGrid)==null?void 0:y.el)==null?void 0:_.gridstack;return u.copyPos(n,this._readAttr(this.placeholder)),u.removePositioningStyles(r),d&&(n.content||n.subGridOpts||w.addRemoveCB)?(delete n.el,r=this.addWidget(n)):(this._prepareElement(r,!0,n),this.el.appendChild(r),this.resizeToContentCheck(!1,n),g&&(g.parentGridNode=n,g.opts.styleInHead||g._updateStyles(!0)),this._updateContainerHeight()),this.engine.addedNodes.push(n),this._triggerAddEvent(),this._triggerChangeEvent(),this.engine.endUpdate(),this._gsEventHandler.dropped&&this._gsEventHandler.dropped({...s,type:"dropped"},h&&h.grid?h:void 0,n),l&&this.setAnimation(this.opts.animate,!0),!1}),this}static _itemRemoving(e,t){if(!e)return;const i=e?e.gridstackNode:void 0;!(i!=null&&i.grid)||e.classList.contains(i.grid.opts.removableOptions.decline)||(t?i._isAboutToRemove=!0:delete i._isAboutToRemove,t?e.classList.add("grid-stack-item-removing"):e.classList.remove("grid-stack-item-removing"))}_setupRemoveDrop(){if(typeof this.opts.removable!="string")return this;const e=document.querySelector(this.opts.removable);return e?(!this.opts.staticGrid&&!B.isDroppable(e)&&B.droppable(e,this.opts.removableOptions).on(e,"dropover",(t,i)=>w._itemRemoving(i,!0)).on(e,"dropout",(t,i)=>w._itemRemoving(i,!1)),this):this}_prepareDragDropByNode(e){const t=e.el,i=e.noMove||this.opts.disableDrag,s=e.noResize||this.opts.disableResize;if(this.opts.staticGrid||i&&s)return e._initDD&&(this._removeDD(t),delete e._initDD),t.classList.add("ui-draggable-disabled","ui-resizable-disabled"),this;if(!e._initDD){let r,a;const n=(l,h)=>{this._gsEventHandler[l.type]&&this._gsEventHandler[l.type](l,l.target),r=this.cellWidth(),a=this.getCellHeight(!0),this._onStartMoving(t,l,h,e,r,a)},c=(l,h)=>{this._dragOrResize(t,l,h,e,r,a)},d=l=>{this.placeholder.remove(),delete this.placeholder.gridstackNode,delete e._moving,delete e._event,delete e._lastTried;const h=e.w!==e._orig.w,g=l.target;if(!(!g.gridstackNode||g.gridstackNode.grid!==this)){if(e.el=g,e._isAboutToRemove){const p=t.gridstackNode.grid;p._gsEventHandler[l.type]&&p._gsEventHandler[l.type](l,g),p.engine.nodes.push(e),p.removeWidget(t,!0,!0)}else u.removePositioningStyles(g),e._temporaryRemoved?(u.copyPos(e,e._orig),this._writePosAttr(g,e),this.engine.addNode(e)):this._writePosAttr(g,e),this._gsEventHandler[l.type]&&this._gsEventHandler[l.type](l,g);this._extraDragRow=0,this._updateContainerHeight(),this._triggerChangeEvent(),this.engine.endUpdate(),l.type==="resizestop"&&(Number.isInteger(e.sizeToContent)&&(e.sizeToContent=e.h),this.resizeToContentCheck(h,e))}};B.draggable(t,{start:n,stop:d,drag:c}).resizable(t,{start:n,stop:d,resize:c}),e._initDD=!0}return B.draggable(t,i?"disable":"enable").resizable(t,s?"disable":"enable"),this}_onStartMoving(e,t,i,s,r,a){var n;if(this.engine.cleanNodes().beginUpdate(s),this._writePosAttr(this.placeholder,s),this.el.appendChild(this.placeholder),this.placeholder.gridstackNode=s,(n=s.grid)!=null&&n.el)this.dragTransform=u.getValuesFromTransformedElement(e);else if(this.placeholder&&this.placeholder.closest(".grid-stack")){const c=this.placeholder.closest(".grid-stack");this.dragTransform=u.getValuesFromTransformedElement(c)}else this.dragTransform={xScale:1,xOffset:0,yScale:1,yOffset:0};if(s.el=this.placeholder,s._lastUiPosition=i.position,s._prevYPix=i.position.top,s._moving=t.type==="dragstart",delete s._lastTried,t.type==="dropover"&&s._temporaryRemoved&&(this.engine.addNode(s),s._moving=!0),this.engine.cacheRects(r,a,this.opts.marginTop,this.opts.marginRight,this.opts.marginBottom,this.opts.marginLeft),t.type==="resizestart"){const c=this.getColumn()-s.x,d=(this.opts.maxRow||Number.MAX_SAFE_INTEGER)-s.y;B.resizable(e,"option","minWidth",r*Math.min(s.minW||1,c)).resizable(e,"option","minHeight",a*Math.min(s.minH||1,d)).resizable(e,"option","maxWidth",r*Math.min(s.maxW||Number.MAX_SAFE_INTEGER,c)).resizable(e,"option","maxWidthMoveLeft",r*Math.min(s.maxW||Number.MAX_SAFE_INTEGER,s.x+s.w)).resizable(e,"option","maxHeight",a*Math.min(s.maxH||Number.MAX_SAFE_INTEGER,d)).resizable(e,"option","maxHeightMoveUp",a*Math.min(s.maxH||Number.MAX_SAFE_INTEGER,s.y+s.h))}}_dragOrResize(e,t,i,s,r,a){const n={...s._orig};let c,d=this.opts.marginLeft,l=this.opts.marginRight,h=this.opts.marginTop,g=this.opts.marginBottom;const p=Math.round(a*.1),y=Math.round(r*.1);if(d=Math.min(d,y),l=Math.min(l,y),h=Math.min(h,p),g=Math.min(g,p),t.type==="drag"){if(s._temporaryRemoved)return;const m=i.position.top-s._prevYPix;s._prevYPix=i.position.top,this.opts.draggable.scroll!==!1&&u.updateScrollPosition(e,i.position,m);const k=i.position.left+(i.position.left>s._lastUiPosition.left?-l:d),S=i.position.top+(i.position.top>s._lastUiPosition.top?-g:h);n.x=Math.round(k/r),n.y=Math.round(S/a);const x=this._extraDragRow;if(this.engine.collide(s,n)){const O=this.getRow();let N=Math.max(0,n.y+s.h-O);this.opts.maxRow&&O+N>this.opts.maxRow&&(N=Math.max(0,this.opts.maxRow-O)),this._extraDragRow=N}else this._extraDragRow=0;if(this._extraDragRow!==x&&this._updateContainerHeight(),s.x===n.x&&s.y===n.y)return}else if(t.type==="resize"){if(n.x<0||(u.updateScrollResize(t,e,a),n.w=Math.round((i.size.width-d)/r),n.h=Math.round((i.size.height-h)/a),s.w===n.w&&s.h===n.h)||s._lastTried&&s._lastTried.w===n.w&&s._lastTried.h===n.h)return;const m=i.position.left+d,k=i.position.top+h;n.x=Math.round(m/r),n.y=Math.round(k/a),c=!0}s._event=t,s._lastTried=n;const _={x:i.position.left+d,y:i.position.top+h,w:(i.size?i.size.width:s.w*r)-d-l,h:(i.size?i.size.height:s.h*a)-h-g};if(this.engine.moveNodeCheck(s,{...n,cellWidth:r,cellHeight:a,rect:_,resizing:c})){s._lastUiPosition=i.position,this.engine.cacheRects(r,a,h,l,g,d),delete s._skipDown,c&&s.subGrid&&s.subGrid.onResize(),this._extraDragRow=0,this._updateContainerHeight();const m=t.target;this._writePosAttr(m,s),this._gsEventHandler[t.type]&&this._gsEventHandler[t.type](t,m)}}_leave(e,t){t=t||e;const i=t.gridstackNode;i&&(t.style.transform=t.style.transformOrigin=null,B.off(e,"drag"),!i._temporaryRemoved&&(i._temporaryRemoved=!0,this.engine.removeNode(i),i.el=i._isExternal&&t?t:e,i._isExternal&&this.engine.cleanupNode(i),this.opts.removable===!0&&w._itemRemoving(e,!0),e._gridstackNodeOrig?(e.gridstackNode=e._gridstackNodeOrig,delete e._gridstackNodeOrig):i._isExternal&&this.engine.restoreInitial()))}commit(){return Ut(this,this.batchUpdate(!1),"commit","batchUpdate","5.2"),this}}w.renderCB=(f,e)=>{f&&(e!=null&&e.content)&&(f.textContent=e.content)},w.resizeToContentParent=".grid-stack-item-content",w.Utils=u,w.Engine=W,w.GDRev="11.3.0";const Yt=["data-id","data-testid","gs-h","gs-w","gs-x","gs-y"],jt={class:"grid-stack-item-content"},Xt=J(o.defineComponent({__name:"DraggableGridLayout",props:{tiles:{},tileHeight:{default:ae}},emits:["update-tiles"],setup(f,{expose:e,emit:t}){const i=f,s=t,r=o.ref(null),a=o.ref(new Map(i.tiles.map(p=>[`${p.id}`,p])));let n=null;const c=p=>`[data-id="${p}"]`,d=p=>p.map(y=>{var m;const _=a.value.get(`${(m=y.el)==null?void 0:m.getAttribute("data-id")}`);if(_)return{..._,layout:{position:{col:Number(y.x),row:Number(y.y)},size:{cols:Number(y.w),rows:Number(y.h)}}}}).filter(y=>y!==void 0),l=(p,y)=>{n&&(d(y).forEach(m=>{a.value.set(`${m.id}`,m)}),s("update-tiles",Array.from(a.value.values())))},h=(p,y)=>{y.forEach(_=>{var m;a.value.delete(`${(m=_.el)==null?void 0:m.getAttribute("data-id")}`)}),s("update-tiles",Array.from(a.value.values()))};o.onMounted(()=>{r.value&&(n=w.init({margin:10,column:Te,cellHeight:i.tileHeight,resizable:{handles:"se, sw"},handle:".tile-header"},r.value),n.on("change",l),n.on("added",l),n.on("removed",h))}),o.onUnmounted(()=>{n&&n.destroy(!1)});const g=p=>{if(n&&r.value){const y=r.value.querySelector(c(p));y&&n.removeWidget(y)}};return o.watch(()=>i.tiles.length,async(p,y)=>{if(p>y&&n){const _=i.tiles.slice(y);for(const m of _)a.value.set(`${m.id}`,m),await o.nextTick(),n.makeWidget(c(m.id),{autoPosition:!0,w:m.layout.size.cols,h:m.layout.size.rows})}}),o.watchEffect(()=>{i.tiles.forEach(p=>{a.value.set(`${p.id}`,p)})}),e({removeWidget:g}),(p,y)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"gridContainer",ref:r,class:"grid-stack"},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i.tiles,_=>(o.openBlock(),o.createElementBlock("div",{key:_.id,class:"grid-stack-item","data-id":`${_.id}`,"data-testid":`grid-stack-item-${_.id}`,"gs-h":_.layout.size.rows,"gs-lazy-load":!0,"gs-w":_.layout.size.cols,"gs-x":_.layout.position.col,"gs-y":_.layout.position.row},[o.createElementVNode("div",jt,[o.renderSlot(p.$slots,"tile",{tile:_},void 0,!0)])],8,Yt))),128))],512))}}),[["__scopeId","data-v-a68d6821"]]),Qt={class:"kong-ui-public-dashboard-renderer"},Zt={key:0,class:"tile-container slottable-tile"},Jt=J(o.defineComponent({__name:"DashboardRenderer",props:o.mergeModels({context:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:o.mergeModels(["edit-tile","zoom-time-range"],["update:modelValue"]),setup(f,{expose:e,emit:t}){const i=f,s=t,r=o.useModel(f,"modelValue"),{i18n:a}=te.useI18n(),n=o.ref(0),c=o.ref(null),d=o.inject(Q);d||(console.warn("Analytics dashboards require a query bridge supplied via provide / inject."),console.warn("Please ensure your application has a query bridge provided under the key 'analytics-query-provider', as described in"),console.warn("https://github.com/Kong/public-ui-components/blob/main/packages/analytics/dashboard-renderer/README.md#requirements")),te.useRequestQueue();const l=Be.useAnalyticsConfigStore(),h=o.computed(()=>i.context.timeSpec?i.context.timeSpec:{type:"relative",time_range:l.defaultQueryTimeForOrg}),g=o.computed(()=>!!i.context.timeSpec||!l.loading),p=(R,A)=>{const z=R.layout.position.row-A.layout.position.row;return z!==0?z:R.layout.position.col-A.layout.position.col},y=o.computed(()=>r.value.tiles.map(R=>{var z;let A=R.definition;if("description"in A.chart){const M=(z=A.chart.description)==null?void 0:z.replace(Ge,()=>{const E=`renderer.trendRange.${h.value.type==="absolute"?"custom":h.value.time_range}`;return a.te(E)?a.t(E):""});A={...A,chart:{...A.chart,description:M}}}return i.context.editable&&!R.id&&console.warn("No id provided for tile. One will be generated automatically,","however tracking changes to this tile may not work as expected.",R),{layout:R.layout,meta:A,id:R.id??crypto.randomUUID()}})),_=o.computed(()=>{let{tz:R,refreshInterval:A,editable:z}=i.context;const M=[...i.context.filters??[],...r.value.global_filters??[]];return R||(R=new Intl.DateTimeFormat().resolvedOptions().timeZone),A===void 0&&(A=Ue),z===void 0&&(z=!1),{filters:M,tz:R,timeSpec:h.value,refreshInterval:A,editable:z}}),m=R=>{s("edit-tile",R)},k=R=>R.type==="slottable",S=R=>{const A=k(R.meta.chart)?{...R.meta.chart}:{...R.meta.chart,chartTitle:R.meta.chart.chartTitle?`Copy of ${R.meta.chart.chartTitle}`:""},z={id:crypto.randomUUID(),definition:{...R.meta,chart:A},layout:{position:{col:0,row:0},size:R.layout.size}};r.value.tiles.push(z)},x=R=>{c.value&&c.value.removeWidget(R.id)},O=()=>{n.value++},N=R=>{const A=R.map(z=>({id:z.id,layout:z.layout,definition:z.meta}));r.value.tiles=A.sort(p)};return e({refresh:O}),(R,A)=>{const z=o.resolveComponent("KAlert");return o.openBlock(),o.createElementBlock("div",Qt,[o.unref(d)?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(R.context.editable?Xt:it),{key:1,ref_key:"gridLayoutRef",ref:c,"tile-height":r.value.tileHeight,tiles:y.value,onUpdateTiles:N},{tile:o.withCtx(({tile:M})=>[M.meta.chart.type==="slottable"?(o.openBlock(),o.createElementBlock("div",Zt,[o.renderSlot(R.$slots,M.meta.chart.id,{},void 0,!0)])):(o.openBlock(),o.createBlock(Ft,{key:1,class:"tile-container",context:_.value,definition:M.meta,height:M.layout.size.rows*(r.value.tileHeight||o.unref(ae))+parseInt(o.unref(et),10),"query-ready":g.value,"refresh-counter":n.value,"tile-id":M.id,onDuplicateTile:ee=>S(M),onEditTile:ee=>m(M),onRemoveTile:ee=>x(M),onZoomTimeRange:A[0]||(A[0]=ee=>s("zoom-time-range",ee))},null,8,["context","definition","height","query-ready","refresh-counter","tile-id","onDuplicateTile","onEditTile","onRemoveTile"]))]),_:3},40,["tile-height","tiles"])):(o.openBlock(),o.createBlock(z,{key:0,appearance:"danger"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(a).t("renderer.noQueryBridge")),1)]),_:1}))])}}}),[["__scopeId","data-v-02eceaef"]]);b.CP_ID_TOKEN=Fe,b.DASHBOARD_COLS=Te,b.DEFAULT_TILE_HEIGHT=ae,b.DEFAULT_TILE_REFRESH_INTERVAL_MS=Ue,b.DashboardRenderer=Jt,b.ENTITY_ID_TOKEN=De,b.GridLayout=it,b.INJECT_QUERY_PROVIDER=Q,b.TIMEFRAME_TOKEN=Ge,Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})});
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .locked[data-v-2d2e5fe6]{cursor:move}.tooltip-container[data-v-2d2e5fe6]{background-color:#fff;border-radius:4px;border-radius:var(--kui-border-radius-20, 4px);box-shadow:0 5px 15px #0000001f,0 5px 10px #0000003d;max-width:425px;min-width:250px;position:absolute;transition:all .2s cubic-bezier(.25,.8,.25,1);z-index:999}.tooltip-container .tooltip-title[data-v-2d2e5fe6]{border-bottom:1px solid #e0e4ea;border-bottom:var(--kui-border-width-10, 1px) solid var(--kui-color-border, #e0e4ea);display:flex;flex-direction:column;margin:6px;margin:var(--kui-space-30, 6px);min-height:24px;padding-bottom:6px;padding-bottom:var(--kui-space-30, 6px)}.tooltip-container .tooltip-title .title[data-v-2d2e5fe6]{font-size:14px;font-size:var(--kui-font-size-30, 14px);font-weight:600;font-weight:var(--kui-font-weight-semibold, 600)}.tooltip-container .tooltip-title .subtitle[data-v-2d2e5fe6]{font-size:12px;font-size:var(--kui-font-size-20, 12px);margin-top:6px;margin-top:var(--kui-space-30, 6px)}.tooltip-container .tooltip-title .drag-icon[data-v-2d2e5fe6]{margin-top:6px;margin-top:var(--kui-space-30, 6px);position:absolute;right:0;top:0}.tooltip-container .tooltip[data-v-2d2e5fe6]{list-style:none;margin:6px;margin:var(--kui-space-30, 6px);max-height:300px;min-width:250px;overflow-y:auto;overflow-y:var(--kui-space-auto, auto);padding-left:0;padding-left:var(--kui-space-0, 0px)}.tooltip-container .tooltip[data-v-2d2e5fe6]{-ms-overflow-style:thin;scrollbar-color:#e0e4ea transparent;scrollbar-color:var(--kui-color-background-disabled, #e0e4ea) var(--kui-color-background-transparent, transparent);scrollbar-width:auto}.tooltip-container .tooltip[data-v-2d2e5fe6] ::-webkit-scrollbar{width:40,8px;width:var(--kui-space, 40, 8px)}.tooltip-container .tooltip[data-v-2d2e5fe6] ::-webkit-scrollbar-track{background:transparent}.tooltip-container .tooltip[data-v-2d2e5fe6] ::-webkit-scrollbar-thumb{background-color:#e0e4ea;background-color:var(--kui-color-background-disabled, #e0e4ea);border-radius:10px;border-radius:var(--kui-border-radius-50, 10px)}.tooltip-container .tooltip li[data-v-2d2e5fe6]{align-items:center;display:flex;font-size:12px;font-size:var(--kui-font-size-20, 12px);line-height:20px;line-height:var(--kui-line-height-30, 20px)}.tooltip-container .tooltip .display-label[data-v-2d2e5fe6]{flex:1;max-width:75%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tooltip-container .tooltip .display-label.empty[data-v-2d2e5fe6]{font-style:italic}.tooltip-container .tooltip .display-value[data-v-2d2e5fe6]{margin-left:auto;margin-left:var(--kui-space-auto, auto);padding-left:8px;padding-left:var(--kui-space-40, 8px);white-space:nowrap}.tooltip-container .tooltip .square-marker[data-v-2d2e5fe6]{display:inline-flex;flex-direction:row;height:12px;margin-right:6px;margin-right:var(--kui-space-30, 6px);width:12px}.no-select{-webkit-user-select:none;user-select:none}.legend-container[data-v-afbe6cec]{display:flex;margin:6px 0 0;max-height:inherit;-ms-overflow-style:thin;overflow-x:hidden;overflow-y:auto;padding-left:0}.legend-container[data-v-afbe6cec]{-ms-overflow-style:thin;scrollbar-color:#e0e4ea transparent;scrollbar-color:var(--kui-color-background-disabled, #e0e4ea) var(--kui-color-background-transparent, transparent);scrollbar-width:auto}.legend-container[data-v-afbe6cec] ::-webkit-scrollbar{width:40,8px;width:var(--kui-space, 40, 8px)}.legend-container[data-v-afbe6cec] ::-webkit-scrollbar-track{background:transparent}.legend-container[data-v-afbe6cec] ::-webkit-scrollbar-thumb{background-color:#e0e4ea;background-color:var(--kui-color-background-disabled, #e0e4ea);border-radius:10px;border-radius:var(--kui-border-radius-50, 10px)}.legend-container.vertical[data-v-afbe6cec]{flex-direction:column;justify-content:flex-start;max-height:90%;max-width:15%;min-width:10%;padding-left:12px;row-gap:16px}.legend-container.vertical .truncate-label[data-v-afbe6cec]{max-width:12ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.legend-container.vertical li .legend[data-v-afbe6cec]{margin-top:4px}@media (max-width: 767px){.legend-container.vertical[data-v-afbe6cec]{column-gap:12px;display:grid;grid-template-columns:repeat(auto-fit,12ch);height:40px;justify-content:center;max-width:99%!important}.legend-container.vertical .sub-label[data-v-afbe6cec]{display:none}}.legend-container.horizontal[data-v-afbe6cec]{column-gap:12px;display:grid;height:var(--c25a8106);justify-content:center;width:99%}.legend-container.horizontal .truncate-label[data-v-afbe6cec]{max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.legend-container.horizontal li[data-v-afbe6cec]{align-items:center;margin:0}.legend-container.horizontal li .label[data-v-afbe6cec]{line-height:24px;padding-right:2px;white-space:nowrap}.legend-container li[data-v-afbe6cec]{align-items:start;cursor:pointer;display:flex;line-height:1}.legend-container li .square-marker[data-v-afbe6cec]{height:8px;margin:0 6px 0 0;width:8px}.legend-container li .label[data-v-afbe6cec]{font-size:12px}.legend-container li .sub-label[data-v-afbe6cec]{font-size:12px;line-height:16px;word-break:none}.legend-container li .strike-through[data-v-afbe6cec]{text-decoration:line-through}.legend-container li .empty[data-v-afbe6cec]{font-style:italic}.legend-container li .tooltip-content[data-v-afbe6cec]{max-width:40ch}.chart-parent[data-v-fa6ab642]{align-items:center;display:flex;height:inherit;justify-content:space-evenly;position:relative;width:inherit}.chart-parent.column[data-v-fa6ab642]{flex-direction:column}.chart-parent.column .chart-container[data-v-fa6ab642]{max-height:calc(100% - 48px);width:100%}.chart-parent.legend-row[data-v-fa6ab642]{flex-direction:row}.chart-parent.legend-row .chart-container[data-v-fa6ab642]{height:100%;width:90%}@media (max-width: 767px){.chart-parent.legend-row .chart-container[data-v-fa6ab642]{max-height:calc(100% - 48px)!important;width:100%!important}}@media (max-width: 767px){.chart-parent.legend-row[data-v-fa6ab642]{display:flex;flex-wrap:wrap}}.chart-parent .chart-container[data-v-fa6ab642]{flex:1 1 auto;position:relative}.chart-container[data-v-fa6ab642]{overflow:auto}.chart-container[data-v-fa6ab642]{-ms-overflow-style:thin;scrollbar-color:#e0e4ea transparent;scrollbar-color:var(--kui-color-background-disabled, #e0e4ea) var(--kui-color-background-transparent, transparent);scrollbar-width:auto}.chart-container[data-v-fa6ab642] ::-webkit-scrollbar{width:40,8px;width:var(--kui-space, 40, 8px)}.chart-container[data-v-fa6ab642] ::-webkit-scrollbar-track{background:transparent}.chart-container[data-v-fa6ab642] ::-webkit-scrollbar-thumb{background-color:#e0e4ea;background-color:var(--kui-color-background-disabled, #e0e4ea);border-radius:10px;border-radius:var(--kui-border-radius-50, 10px)}.chart-container .chart-body[data-v-fa6ab642]{height:100%}.chart-container[data-v-fa6ab642]::-webkit-scrollbar-track{background-color:#fff;background-color:var(--kui-color-background, #ffffff);border-radius:10px;border-radius:var(--kui-border-radius-50, 10px)}.chart-container[data-v-fa6ab642]::-webkit-scrollbar{width:10px}.chart-container[data-v-fa6ab642]::-webkit-scrollbar-thumb{background-color:#e0e4ea;background-color:var(--kui-color-background-disabled, #e0e4ea);border-radius:10px;border-radius:var(--kui-border-radius-50, 10px)}.axis[data-v-fa6ab642]{left:0;pointer-events:none;position:absolute;top:0;z-index:99}.axis-tooltip[data-v-fa6ab642]{background-color:#000933;background-color:var(--kui-color-background-inverse, #000933);border:none;border-radius:4px;border-radius:var(--kui-border-radius-20, 4px);color:#fff;color:var(--kui-color-text-inverse, #ffffff);max-width:40ch;padding:4px 8px;padding:var(--kui-space-20, 4px) var(--kui-space-40, 8px);position:absolute;width:max-content;z-index:100}.axis-tooltip .axis-tooltip-content[data-v-fa6ab642]{color:#fff;color:var(--kui-color-text-inverse, #ffffff);font-family:Inter,Roboto,Helvetica,sans-serif;font-family:var(--kui-font-family-text, "Inter", Roboto, Helvetica, sans-serif);font-size:12px;font-size:var(--kui-font-size-20, 12px);font-weight:500;font-weight:var(--kui-font-weight-medium, 500);line-height:16px;line-height:var(--kui-line-height-20, 16px)}.tooltip-boundary[data-v-fa6ab642]{height:100%;left:0;position:relative;top:0;width:100%}.chart-parent[data-v-6a59a92d]{align-items:center;display:flex;height:inherit;justify-content:space-evenly;position:relative;width:inherit}.chart-parent.column[data-v-6a59a92d]{flex-direction:column}.chart-parent.column .chart-container[data-v-6a59a92d]{max-height:calc(100% - 48px);width:100%}.chart-parent.legend-row[data-v-6a59a92d]{flex-direction:row}.chart-parent.legend-row .chart-container[data-v-6a59a92d]{height:100%;width:90%}@media (max-width: 767px){.chart-parent.legend-row .chart-container[data-v-6a59a92d]{max-height:calc(100% - 48px)!important;width:100%!important}}@media (max-width: 767px){.chart-parent.legend-row[data-v-6a59a92d]{display:flex;flex-wrap:wrap}}.chart-parent .chart-container[data-v-6a59a92d]{flex:1 1 auto;position:relative}.chart-parent[data-v-2aef1d50]{align-items:center;display:flex;height:inherit;justify-content:space-evenly;position:relative;width:inherit}.chart-parent.column[data-v-2aef1d50]{flex-direction:column}.chart-parent.column .chart-container[data-v-2aef1d50]{max-height:calc(100% - 48px);width:100%}.chart-parent.legend-row[data-v-2aef1d50]{flex-direction:row}.chart-parent.legend-row .chart-container[data-v-2aef1d50]{height:100%;width:90%}@media (max-width: 767px){.chart-parent.legend-row .chart-container[data-v-2aef1d50]{max-height:calc(100% - 48px)!important;width:100%!important}}@media (max-width: 767px){.chart-parent.legend-row[data-v-2aef1d50]{display:flex;flex-wrap:wrap}}.chart-parent .chart-container[data-v-2aef1d50]{flex:1 1 auto;position:relative}.analytics-chart-shell[data-v-5bb52986],.simple-chart-shell[data-v-5bb52986]{border-radius:4px;border-radius:var(--kui-border-radius-20, 4px);display:flex;flex-direction:column}.analytics-chart-shell .chart-empty-state[data-v-5bb52986],.simple-chart-shell .chart-empty-state[data-v-5bb52986]{display:flex;flex-direction:column;height:100%;justify-content:center}.analytics-chart-shell[data-v-5bb52986]{height:100%;position:relative;width:100%}.analytics-chart-shell .analytics-chart-parent[data-v-5bb52986]{height:inherit;width:inherit}.analytics-chart-shell .chart-empty-state[data-v-5bb52986]{padding:20px 0 16px;padding:var(--kui-space-70, 20px) var(--kui-space-0, 0px) var(--kui-space-60, 16px) var(--kui-space-0, 0px)}.analytics-chart-shell .chart-header[data-v-5bb52986]{align-items:center;display:flex;justify-content:flex-start;width:100%;z-index:999}.analytics-chart-shell .tooltip[data-v-5bb52986]{display:flex;margin-left:12px;margin-left:var(--kui-space-50, 12px);margin-top:2px;margin-top:var(--kui-space-10, 2px)}.analytics-chart-shell .tooltip .tooltip-content[data-v-5bb52986]{max-width:40vw}.chart-parent[data-v-4f4e5b76]{align-items:center;display:flex;height:inherit;justify-content:space-evenly;position:relative;width:inherit}.chart-parent.column[data-v-4f4e5b76]{flex-direction:column}.chart-parent.column .chart-container[data-v-4f4e5b76]{max-height:calc(100% - 48px);width:100%}.chart-parent.legend-row[data-v-4f4e5b76]{flex-direction:row}.chart-parent.legend-row .chart-container[data-v-4f4e5b76]{height:100%;width:90%}@media (max-width: 767px){.chart-parent.legend-row .chart-container[data-v-4f4e5b76]{max-height:calc(100% - 48px)!important;width:100%!important}}@media (max-width: 767px){.chart-parent.legend-row[data-v-4f4e5b76]{display:flex;flex-wrap:wrap}}.chart-parent .chart-container[data-v-4f4e5b76]{flex:1 1 auto;position:relative}.chart-parent[data-v-4f4e5b76]{height:auto;margin:0;margin:var(--kui-space-0, 0px);padding:0;padding:var(--kui-space-0, 0px);width:auto}.chart-parent .chart-container[data-v-4f4e5b76]{margin:0;margin:var(--kui-space-0, 0px);max-height:100px;max-width:100px;padding:0;padding:var(--kui-space-0, 0px)}.chart-parent .chart-totals-flex[data-v-4f4e5b76]{align-items:center;display:flex;flex-direction:column;height:100px;justify-content:center;padding:24px 0 0;padding:var(--kui-space-80, 24px) var(--kui-space-0, 0px) var(--kui-space-0, 0px);position:absolute;width:100px;z-index:2}.chart-parent .chart-totals-flex .metric-large[data-v-4f4e5b76]{font-size:20px;font-size:var(--kui-font-size-60, 20px);font-weight:500;font-weight:var(--kui-font-weight-medium, 500);line-height:28px;line-height:var(--kui-line-height-50, 28px)}.chart-parent .chart-totals-flex .metric-small[data-v-4f4e5b76]{color:#6c7489;color:var(--kui-color-text-neutral, #6c7489);font-size:10px;font-size:var(--kui-font-size-10, 10px);font-weight:400;font-weight:var(--kui-font-weight-regular, 400);line-height:12px;line-height:var(--kui-line-height-10, 12px)}.chart-parent[data-v-c25764ee]{align-items:center;display:flex;height:inherit;justify-content:space-evenly;position:relative;width:inherit}.chart-parent.column[data-v-c25764ee]{flex-direction:column}.chart-parent.column .chart-container[data-v-c25764ee]{max-height:calc(100% - 48px);width:100%}.chart-parent.legend-row[data-v-c25764ee]{flex-direction:row}.chart-parent.legend-row .chart-container[data-v-c25764ee]{height:100%;width:90%}@media (max-width: 767px){.chart-parent.legend-row .chart-container[data-v-c25764ee]{max-height:calc(100% - 48px)!important;width:100%!important}}@media (max-width: 767px){.chart-parent.legend-row[data-v-c25764ee]{display:flex;flex-wrap:wrap}}.chart-parent .chart-container[data-v-c25764ee]{flex:1 1 auto;position:relative}.chart-parent[data-v-c25764ee]{container-type:inline-size}.chart-parent .single-value-error[data-v-c25764ee] .empty-state-title{font-size:12px;font-size:var(--kui-font-size-20, 12px);line-height:16px;line-height:var(--kui-line-height-20, 16px);margin:0;margin:var(--kui-space-0, 0px)}.chart-parent .single-value-wrapper[data-v-c25764ee]{align-items:baseline;display:inline-flex}.chart-parent .single-value-wrapper .single-value[data-v-c25764ee]{color:#000933;font-size:24px;font-weight:700;line-height:36px}.chart-parent .single-value-wrapper .single-value-unit[data-v-c25764ee]{color:#000933;font-size:20px;font-weight:700;line-height:32px}@container (min-width: 300px){.chart-parent .single-value-wrapper .single-value[data-v-c25764ee]{font-size:48px;line-height:56px}.chart-parent .single-value-wrapper .single-value-unit[data-v-c25764ee]{font-size:40px;line-height:48px}}@container (min-width: 500px){.chart-parent .single-value-wrapper .single-value[data-v-c25764ee]{font-size:56px;line-height:64px}.chart-parent .single-value-wrapper .single-value-unit[data-v-c25764ee]{font-size:48px;line-height:56px}}@container (min-width: 700px){.chart-parent .single-value-wrapper .single-value[data-v-c25764ee]{font-size:64px;line-height:72px}.chart-parent .single-value-wrapper .single-value-unit[data-v-c25764ee]{font-size:56px;line-height:64px}}@container (min-width: 1000px){.chart-parent .single-value-wrapper .single-value[data-v-c25764ee]{font-size:80px;line-height:88px}.chart-parent .single-value-wrapper .single-value-unit[data-v-c25764ee]{font-size:64px;line-height:72px}}@container (min-width: 1200px){.chart-parent .single-value-wrapper .single-value[data-v-c25764ee]{font-size:96px;line-height:104px}.chart-parent .single-value-wrapper .single-value-unit[data-v-c25764ee]{font-size:80px;line-height:88px}}.analytics-chart-shell[data-v-471652c8],.simple-chart-shell[data-v-471652c8]{border-radius:4px;border-radius:var(--kui-border-radius-20, 4px);display:flex;flex-direction:column}.analytics-chart-shell .chart-empty-state[data-v-471652c8],.simple-chart-shell .chart-empty-state[data-v-471652c8]{display:flex;flex-direction:column;height:100%;justify-content:center}.simple-chart-shell[data-v-471652c8]{margin:0;margin:var(--kui-space-0, 0px);padding:0;padding:var(--kui-space-0, 0px);width:100%}.simple-chart-shell .chart-empty-state[data-v-471652c8]{display:flex;flex-direction:column;justify-content:center}.simple-chart-shell .chart-empty-state[data-v-471652c8] .empty-state-title{font-size:12px;font-size:var(--kui-font-size-20, 12px);line-height:16px;line-height:var(--kui-line-height-20, 16px);margin:0;margin:var(--kui-space-0, 0px)}.kong-ui-public-top-n-table[data-v-665e7735]{border:none!important;max-height:100%;padding:0!important}.kong-ui-public-top-n-table .top-n-card-description[data-v-665e7735]{color:#6c7489;font-size:12px;text-align:right}.kong-ui-public-top-n-table[data-v-665e7735] .k-card-actions{align-self:baseline;display:flex;line-height:22px}.kong-ui-public-top-n-table[data-v-665e7735] .card-content{overflow-y:auto}.kong-ui-public-top-n-table[data-v-665e7735] .card-content{-ms-overflow-style:thin;scrollbar-color:#e0e4ea transparent;scrollbar-color:var(--kui-color-background-disabled, #e0e4ea) var(--kui-color-background-transparent, transparent);scrollbar-width:auto}.kong-ui-public-top-n-table[data-v-665e7735] .card-content ::-webkit-scrollbar{width:40,8px;width:var(--kui-space, 40, 8px)}.kong-ui-public-top-n-table[data-v-665e7735] .card-content ::-webkit-scrollbar-track{background:transparent}.kong-ui-public-top-n-table[data-v-665e7735] .card-content ::-webkit-scrollbar-thumb{background-color:#e0e4ea;background-color:var(--kui-color-background-disabled, #e0e4ea);border-radius:10px;border-radius:var(--kui-border-radius-50, 10px)}.kong-ui-public-top-n-table .top-n-table[data-v-665e7735]{display:flex;flex-direction:column;max-height:100%;width:100%}.kong-ui-public-top-n-table .top-n-table .table-headings[data-v-665e7735]{flex-shrink:0;font-size:14px;font-weight:600;line-height:24px}.kong-ui-public-top-n-table .top-n-table .table-row[data-v-665e7735]{align-self:stretch;border-bottom:1px solid #e0e4ea;display:flex;justify-content:space-between}.kong-ui-public-top-n-table .top-n-table .table-row[data-v-665e7735]:last-of-type{border-bottom:none}.kong-ui-public-top-n-table .top-n-table .column-1[data-v-665e7735]{flex:1;padding:0 24px 12px 0}.kong-ui-public-top-n-table .top-n-table .column-2[data-v-665e7735]{flex:1;max-width:110px;padding:0 0 12px}.kong-ui-public-top-n-table .top-n-table .table-body[data-v-665e7735]{overflow-y:auto}.kong-ui-public-top-n-table .top-n-table .table-body .table-row[data-v-665e7735]:first-of-type{border-top:1px solid #e0e4ea}.kong-ui-public-top-n-table .top-n-table .table-body .column-1[data-v-665e7735],.kong-ui-public-top-n-table .top-n-table .table-body .column-2[data-v-665e7735]{padding-top:12px}.kong-ui-public-top-n-table .top-n-table .table-body .column-1[data-v-665e7735]{color:#3a3f51;font-size:14px}.kong-ui-public-top-n-table .top-n-table .table-body .column-1[data-v-665e7735] a{color:#0044f4;font-weight:700;text-decoration:none}.kong-ui-public-top-n-table.kong-card.border{border-radius:4px;padding:20px}.kong-ui-public-top-n-table.kong-card.border .k-card-header{align-items:baseline;margin-bottom:0!important}.kong-ui-public-top-n-table.kong-card.border .k-card-header .k-card-title{margin-bottom:16px}.kong-ui-public-top-n-table.kong-card.border .k-card-header .k-card-title h4{font-size:16px;font-weight:600}.kong-ui-public-csv-export-modal .modal-container{min-width:580px}.kong-ui-public-csv-export-modal .modal-container .selected-range{font-size:14px}.kong-ui-public-csv-export-modal .modal-container .text-muted{color:#00000073!important;font-size:14px}.kong-ui-public-csv-export-modal .modal-container .vitals-table{font-size:14px;margin-bottom:20px;margin-top:6px;width:100%}.kong-ui-public-csv-export-modal .modal-container .k-table thead{border-top:1px solid #e0e4ea;height:auto}.kong-ui-public-csv-export-modal .modal-container .modal-footer .vitals-report-export-button{display:inline-flex}.metricscard-tooltip,.trafficcard.active .metricscard-tooltip{pointer-events:all}.metricscard[data-v-b1513f6f]{display:flex;flex-direction:column;width:100%}@media (max-width: 767px){.metricscard[data-v-b1513f6f]{max-width:none;width:auto}}@media (min-width: 768px){.metricscard[data-v-b1513f6f]{height:100%;justify-content:space-evenly}.metricscard.sm[data-v-b1513f6f]:not(:last-child){border-right:1px solid #e0e4ea;border-right:var(--kui-border-width-10, 1px) solid var(--kui-color-border, #e0e4ea)}}.metricscard[data-v-b1513f6f]:hover{border:none;text-decoration:none}.metricscard-title[data-v-b1513f6f]{align-items:center;color:#000933;color:var(--kui-color-text, #000933);display:flex;flex-direction:row;font-size:14px;font-size:var(--kui-font-size-30, 14px);font-weight:500;font-weight:var(--kui-font-weight-medium, 500);line-height:16px;line-height:var(--kui-line-height-20, 16px);margin:0;margin:var(--kui-space-0, 0px)}.metricscard-title.sm[data-v-b1513f6f]{color:#52596e;color:var(--kui-color-text-neutral-strong, #52596e);font-size:12px;font-size:var(--kui-font-size-20, 12px);font-weight:600;font-weight:var(--kui-font-weight-semibold, 600)}.metricscard-title.md[data-v-b1513f6f]{font-size:14px;font-size:var(--kui-font-size-30, 14px);font-weight:600;font-weight:var(--kui-font-weight-semibold, 600)}.metricscard-title.lg[data-v-b1513f6f],.metricscard-title.xl[data-v-b1513f6f]{font-size:14px;font-size:var(--kui-font-size-30, 14px)}.metricscard-description[data-v-b1513f6f]{color:#afb7c5;color:var(--kui-color-text-disabled, #afb7c5);font-size:12px;font-size:var(--kui-font-size-20, 12px);line-height:16px;line-height:var(--kui-line-height-20, 16px);margin-top:8px;margin-top:var(--kui-space-40, 8px)}.metricscard-icon[data-v-b1513f6f]{margin-right:4px;margin-right:var(--kui-space-20, 4px)}.metricscard-value[data-v-b1513f6f]{color:#000933;color:var(--kui-color-text, #000933);display:flex;flex-direction:row;font-size:24px;font-size:var(--kui-font-size-70, 24px);font-weight:600;font-weight:var(--kui-font-weight-semibold, 600);justify-content:space-between;line-height:32px;line-height:var(--kui-line-height-60, 32px)}.metricscard-value.sm[data-v-b1513f6f]{font-size:14px;font-size:var(--kui-font-size-30, 14px);line-height:24px;line-height:var(--kui-line-height-40, 24px)}.metricscard-value.xl[data-v-b1513f6f]{font-size:48px;font-size:var(--kui-font-size-100, 48px)}.metricscard-valuetrend[data-v-b1513f6f]{display:flex;flex-direction:column;row-gap:12px;row-gap:var(--kui-space-50, 12px)}@media (max-width: 767px){.metricscard-valuetrend[data-v-b1513f6f]{row-gap:6px;row-gap:var(--kui-space-30, 6px)}}.metricscard-valuetrend.is-compact[data-v-b1513f6f]{align-items:center;flex-direction:row!important;justify-content:space-between;margin-top:0;margin-top:var(--kui-space-0, 0px)}.metricscard-trend[data-v-b1513f6f]{align-items:center;column-gap:8px;column-gap:var(--kui-space-40, 8px);display:flex}.metricscard-trend-change[data-v-b1513f6f]{align-items:center;border-radius:4px;border-radius:var(--kui-border-radius-20, 4px);display:flex;flex-direction:row;font-size:12px;font-size:var(--kui-font-size-20, 12px);font-weight:600;font-weight:var(--kui-font-weight-semibold, 600);padding:4px 8px;padding:var(--kui-space-20, 4px) var(--kui-space-40, 8px)}.metricscard-trend-change .kui-icon[data-v-b1513f6f]{margin-right:4px;margin-right:var(--kui-space-20, 4px)}.metricscard-trend-change.positive[data-v-b1513f6f]{background-color:#ecfffb;background-color:var(--kui-color-background-success-weakest, #ecfffb);color:#007d60;color:var(--kui-color-text-success, #007d60)}.metricscard-trend-change.negative[data-v-b1513f6f]{background-color:#ffe5e5;background-color:var(--kui-color-background-danger-weakest, #ffe5e5);color:#ad000e;color:var(--kui-color-text-danger-strong, #ad000e)}.metricscard-trend-change.neutral[data-v-b1513f6f]{background-color:#e0e4ea;background-color:var(--kui-color-background-neutral-weaker, #e0e4ea);color:#52596e;color:var(--kui-color-text-neutral-strong, #52596e)}.metricscard-trend-range[data-v-b1513f6f]{color:#000933;color:var(--kui-color-text, #000933);font-size:12px;font-size:var(--kui-font-size-20, 12px)}.metricscard-tooltip[data-v-b1513f6f]{display:inline-flex;margin:auto 0 auto 4px;margin:var(--kui-space-auto, auto) var(--kui-space-0, 0px) var(--kui-space-auto, auto) var(--kui-space-20, 4px);vertical-align:middle}.metricscard-error[data-v-b1513f6f]{align-items:center;color:#3a3f51;color:var(--kui-color-text-neutral-stronger, #3a3f51);display:flex;flex-direction:row;font-size:12px;font-size:var(--kui-font-size-20, 12px);margin-top:8px;margin-top:var(--kui-space-40, 8px)}.metricscard-error .kong-icon-warning[data-v-b1513f6f]{margin-right:12px;margin-right:var(--kui-space-50, 12px)}.metricscard.active .metricscard-tooltip[data-v-b1513f6f]{pointer-events:all}.loading-tabs[data-v-50eab68c]{display:flex;flex-direction:column}.loading-tabs-large[data-v-50eab68c]{padding:4px;row-gap:12px;width:240px}.loading-tabs-small[data-v-50eab68c]{padding:2px;row-gap:8px;width:120px}.loading-tabs-small .box[data-v-50eab68c]{height:12px}@media (max-width: 767px){.loading-tabs[data-v-50eab68c]{width:auto}}.kong-ui-public-metric-card-container[data-v-eac0ca04]{background-color:transparent;background-color:var(--kui-color-background-transparent, transparent);display:flex;flex-direction:column;justify-content:space-between;width:100%}.kong-ui-public-metric-card-container .container-title[data-v-eac0ca04]{align-items:center;display:flex;font-size:16px;font-size:var(--kui-font-size-40, 16px);font-weight:600;font-weight:var(--kui-font-weight-semibold, 600);justify-content:space-between;margin-bottom:12px;margin-bottom:var(--kui-space-50, 12px)}.kong-ui-public-metric-card-container .container-title .container-description[data-v-eac0ca04]{color:#6c7489;color:var(--kui-color-text-neutral, #6c7489);font-size:12px;font-size:var(--kui-font-size-20, 12px);font-weight:400;font-weight:var(--kui-font-weight-regular, 400)}.kong-ui-public-metric-card-container .cards-wrapper[data-v-eac0ca04]{display:flex;flex-direction:row;flex-grow:1;column-gap:24px;row-gap:16px}@media (max-width: 767px){.kong-ui-public-metric-card-container .cards-wrapper[data-v-eac0ca04]{column-gap:16px;row-gap:16px;flex-direction:column}}.kong-ui-public-metric-card-container.sm[data-v-eac0ca04]{column-gap:0;row-gap:0}.kong-ui-public-metric-card-container .error-display[data-v-eac0ca04]{align-items:center;display:flex;justify-content:center;margin:auto;margin:var(--kui-space-auto, auto)}.kong-ui-public-metric-card-container .error-display-icon[data-v-eac0ca04]{display:flex}.kong-ui-public-metric-card-container .error-display-message[data-v-eac0ca04]{color:#6c7489;color:var(--kui-color-text-neutral, #6c7489);font-size:14px;font-size:var(--kui-font-size-30, 14px);margin-left:12px;margin-left:var(--kui-space-50, 12px)}.analytics-chart[data-v-65cc8607]{display:flex;flex-direction:column;height:var(--35a26ebf);justify-content:center}.analytics-chart.single-value[data-v-65cc8607],.analytics-chart[data-v-a9ee3db9]{height:100%}@media (min-width: 767px){.metric-card-tile-wrapper[data-v-20c4f411]{align-items:center;display:flex;height:90%}}.metric-card-tile-wrapper[data-v-20c4f411] .kong-ui-public-metric-card-container{height:auto;max-height:100%}@media (min-width: 767px){.metric-card-tile-wrapper[data-v-20c4f411] .kong-ui-public-metric-card-container .metricscard:not(:last-of-type){border-right:1px solid #e0e4ea;border-right:var(--kui-border-width-10, 1px) solid var(--kui-color-border, #e0e4ea)}}.tile-boundary[data-v-4ddafde1]{display:flex;flex-direction:column;height:var(--3da384ac);overflow:hidden}.tile-boundary.editable:hover .tile-header[data-v-4ddafde1]{background:#f9fafb}.tile-boundary .tile-header[data-v-4ddafde1]{align-items:center;display:flex;justify-content:space-between;padding:12px 12px 8px;padding:var(--kui-space-50, 12px) var(--kui-space-50, 12px) var(--kui-space-40, 8px) var(--kui-space-50, 12px);right:0;width:100%}.tile-boundary .tile-header .title-tooltip[data-v-4ddafde1]{margin-right:4px;overflow:hidden}.tile-boundary .tile-header .title[data-v-4ddafde1]{font-weight:700;font-weight:var(--kui-font-weight-bold, 700);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tile-boundary .tile-header .tile-actions[data-v-4ddafde1]{display:flex;gap:6px;gap:var(--kui-space-30, 6px)}.tile-boundary .tile-header .tile-actions .edit-icon[data-v-4ddafde1]{cursor:pointer}.tile-boundary .tile-header .header-description[data-v-4ddafde1]{color:#6c7489;font-size:12px;text-align:right}.tile-boundary .tile-header .dropdown[data-v-4ddafde1]{display:flex;margin-left:auto;margin-left:var(--kui-space-auto, auto);margin-right:0;margin-right:var(--kui-space-0, 0px)}.tile-boundary .tile-header .dropdown .kebab-action-menu[data-v-4ddafde1]{cursor:pointer}.tile-boundary .tile-header .dropdown .delete-option[data-v-4ddafde1]{color:#d60027}.tile-boundary .tile-header .dropdown li.k-dropdown-item a[data-v-4ddafde1]{text-decoration:none}.tile-boundary .tile-header .dropdown a[data-v-4ddafde1]{color:#000933}.tile-boundary .tile-header .dropdown a[data-v-4ddafde1]:hover{color:#000933;text-decoration:none}.tile-boundary .tile-header .dropdown[data-v-4ddafde1]:hover{cursor:pointer}.tile-boundary .tile-content[data-v-4ddafde1]{flex-grow:1;margin:4px 16px 16px;margin:var(--kui-space-20, 4px) var(--kui-space-60, 16px) var(--kui-space-60, 16px) var(--kui-space-60, 16px);overflow:hidden}.kong-ui-public-grid-layout[data-v-b27ebb1a]{display:grid;gap:20px;gap:var(--kui-space-70, 20px);grid-template-columns:repeat(var(--7f0eb0fc),1fr);grid-template-rows:var(--5399b6ae);width:100%}@media (max-width: 768px){.kong-ui-public-grid-layout[data-v-b27ebb1a]{display:flex;flex-direction:column}.kong-ui-public-grid-layout .grid-cell[data-v-b27ebb1a]{height:auto!important;left:auto!important;position:relative;top:auto!important;transform:none!important;width:auto!important}.kong-ui-public-grid-layout .grid-cell[data-v-b27ebb1a]:not(:first-child){margin-top:20px;margin-top:var(--kui-space-70, 20px)}.kong-ui-public-grid-layout .empty-cell[data-v-b27ebb1a]{display:none}}.grid-stack{position:relative}.grid-stack-rtl{direction:ltr}.grid-stack-rtl>.grid-stack-item{direction:rtl}.grid-stack-placeholder>.placeholder-content{background-color:#0000001a;margin:0;position:absolute;width:auto;z-index:0!important}.grid-stack>.grid-stack-item{position:absolute;padding:0}.grid-stack>.grid-stack-item>.grid-stack-item-content{margin:0;position:absolute;width:auto;overflow-x:hidden;overflow-y:auto}.grid-stack>.grid-stack-item.size-to-content:not(.size-to-content-max)>.grid-stack-item-content{overflow-y:hidden}.grid-stack-item>.ui-resizable-handle{position:absolute;font-size:.1px;display:block;-ms-touch-action:none;touch-action:none}.grid-stack-item.ui-resizable-autohide>.ui-resizable-handle,.grid-stack-item.ui-resizable-disabled>.ui-resizable-handle{display:none}.grid-stack-item>.ui-resizable-ne,.grid-stack-item>.ui-resizable-nw,.grid-stack-item>.ui-resizable-se,.grid-stack-item>.ui-resizable-sw{background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="%23666" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 20 20"><path d="m10 3 2 2H8l2-2v14l-2-2h4l-2 2"/></svg>');background-repeat:no-repeat;background-position:center}.grid-stack-item>.ui-resizable-ne{transform:rotate(45deg)}.grid-stack-item>.ui-resizable-sw{transform:rotate(45deg)}.grid-stack-item>.ui-resizable-nw{transform:rotate(-45deg)}.grid-stack-item>.ui-resizable-se{transform:rotate(-45deg)}.grid-stack-item>.ui-resizable-nw{cursor:nw-resize;width:20px;height:20px;top:0}.grid-stack-item>.ui-resizable-n{cursor:n-resize;height:10px;top:0;left:25px;right:25px}.grid-stack-item>.ui-resizable-ne{cursor:ne-resize;width:20px;height:20px;top:0}.grid-stack-item>.ui-resizable-e{cursor:e-resize;width:10px;top:15px;bottom:15px}.grid-stack-item>.ui-resizable-se{cursor:se-resize;width:20px;height:20px}.grid-stack-item>.ui-resizable-s{cursor:s-resize;height:10px;left:25px;bottom:0;right:25px}.grid-stack-item>.ui-resizable-sw{cursor:sw-resize;width:20px;height:20px}.grid-stack-item>.ui-resizable-w{cursor:w-resize;width:10px;top:15px;bottom:15px}.grid-stack-item.ui-draggable-dragging>.ui-resizable-handle{display:none!important}.grid-stack-item.ui-draggable-dragging{will-change:left,top;cursor:move}.grid-stack-item.ui-resizable-resizing{will-change:width,height}.ui-draggable-dragging,.ui-resizable-resizing{z-index:10000}.ui-draggable-dragging>.grid-stack-item-content,.ui-resizable-resizing>.grid-stack-item-content{box-shadow:1px 4px 6px #0003;opacity:.8}.grid-stack-animate,.grid-stack-animate .grid-stack-item{transition:left .3s,top .3s,height .3s,width .3s}.grid-stack-animate .grid-stack-item.grid-stack-placeholder,.grid-stack-animate .grid-stack-item.ui-draggable-dragging,.grid-stack-animate .grid-stack-item.ui-resizable-resizing{transition:left 0s,top 0s,height 0s,width 0s}.grid-stack>.grid-stack-item[gs-y="0"]{top:0}.grid-stack>.grid-stack-item[gs-x="0"]{left:0}.gs-12>.grid-stack-item{width:8.333%}.gs-12>.grid-stack-item[gs-x="1"]{left:8.333%}.gs-12>.grid-stack-item[gs-w="2"]{width:16.667%}.gs-12>.grid-stack-item[gs-x="2"]{left:16.667%}.gs-12>.grid-stack-item[gs-w="3"]{width:25%}.gs-12>.grid-stack-item[gs-x="3"]{left:25%}.gs-12>.grid-stack-item[gs-w="4"]{width:33.333%}.gs-12>.grid-stack-item[gs-x="4"]{left:33.333%}.gs-12>.grid-stack-item[gs-w="5"]{width:41.667%}.gs-12>.grid-stack-item[gs-x="5"]{left:41.667%}.gs-12>.grid-stack-item[gs-w="6"]{width:50%}.gs-12>.grid-stack-item[gs-x="6"]{left:50%}.gs-12>.grid-stack-item[gs-w="7"]{width:58.333%}.gs-12>.grid-stack-item[gs-x="7"]{left:58.333%}.gs-12>.grid-stack-item[gs-w="8"]{width:66.667%}.gs-12>.grid-stack-item[gs-x="8"]{left:66.667%}.gs-12>.grid-stack-item[gs-w="9"]{width:75%}.gs-12>.grid-stack-item[gs-x="9"]{left:75%}.gs-12>.grid-stack-item[gs-w="10"]{width:83.333%}.gs-12>.grid-stack-item[gs-x="10"]{left:83.333%}.gs-12>.grid-stack-item[gs-w="11"]{width:91.667%}.gs-12>.grid-stack-item[gs-x="11"]{left:91.667%}.gs-12>.grid-stack-item[gs-w="12"]{width:100%}.gs-1>.grid-stack-item{width:100%}.gs-2>.grid-stack-item{width:50%}.gs-2>.grid-stack-item[gs-x="1"]{left:50%}.gs-2>.grid-stack-item[gs-w="2"]{width:100%}.gs-3>.grid-stack-item{width:33.333%}.gs-3>.grid-stack-item[gs-x="1"]{left:33.333%}.gs-3>.grid-stack-item[gs-w="2"]{width:66.667%}.gs-3>.grid-stack-item[gs-x="2"]{left:66.667%}.gs-3>.grid-stack-item[gs-w="3"]{width:100%}.gs-4>.grid-stack-item{width:25%}.gs-4>.grid-stack-item[gs-x="1"]{left:25%}.gs-4>.grid-stack-item[gs-w="2"]{width:50%}.gs-4>.grid-stack-item[gs-x="2"]{left:50%}.gs-4>.grid-stack-item[gs-w="3"]{width:75%}.gs-4>.grid-stack-item[gs-x="3"]{left:75%}.gs-4>.grid-stack-item[gs-w="4"]{width:100%}.gs-5>.grid-stack-item{width:20%}.gs-5>.grid-stack-item[gs-x="1"]{left:20%}.gs-5>.grid-stack-item[gs-w="2"]{width:40%}.gs-5>.grid-stack-item[gs-x="2"]{left:40%}.gs-5>.grid-stack-item[gs-w="3"]{width:60%}.gs-5>.grid-stack-item[gs-x="3"]{left:60%}.gs-5>.grid-stack-item[gs-w="4"]{width:80%}.gs-5>.grid-stack-item[gs-x="4"]{left:80%}.gs-5>.grid-stack-item[gs-w="5"]{width:100%}.gs-6>.grid-stack-item{width:16.667%}.gs-6>.grid-stack-item[gs-x="1"]{left:16.667%}.gs-6>.grid-stack-item[gs-w="2"]{width:33.333%}.gs-6>.grid-stack-item[gs-x="2"]{left:33.333%}.gs-6>.grid-stack-item[gs-w="3"]{width:50%}.gs-6>.grid-stack-item[gs-x="3"]{left:50%}.gs-6>.grid-stack-item[gs-w="4"]{width:66.667%}.gs-6>.grid-stack-item[gs-x="4"]{left:66.667%}.gs-6>.grid-stack-item[gs-w="5"]{width:83.333%}.gs-6>.grid-stack-item[gs-x="5"]{left:83.333%}.gs-6>.grid-stack-item[gs-w="6"]{width:100%}.gs-7>.grid-stack-item{width:14.286%}.gs-7>.grid-stack-item[gs-x="1"]{left:14.286%}.gs-7>.grid-stack-item[gs-w="2"]{width:28.571%}.gs-7>.grid-stack-item[gs-x="2"]{left:28.571%}.gs-7>.grid-stack-item[gs-w="3"]{width:42.857%}.gs-7>.grid-stack-item[gs-x="3"]{left:42.857%}.gs-7>.grid-stack-item[gs-w="4"]{width:57.143%}.gs-7>.grid-stack-item[gs-x="4"]{left:57.143%}.gs-7>.grid-stack-item[gs-w="5"]{width:71.429%}.gs-7>.grid-stack-item[gs-x="5"]{left:71.429%}.gs-7>.grid-stack-item[gs-w="6"]{width:85.714%}.gs-7>.grid-stack-item[gs-x="6"]{left:85.714%}.gs-7>.grid-stack-item[gs-w="7"]{width:100%}.gs-8>.grid-stack-item{width:12.5%}.gs-8>.grid-stack-item[gs-x="1"]{left:12.5%}.gs-8>.grid-stack-item[gs-w="2"]{width:25%}.gs-8>.grid-stack-item[gs-x="2"]{left:25%}.gs-8>.grid-stack-item[gs-w="3"]{width:37.5%}.gs-8>.grid-stack-item[gs-x="3"]{left:37.5%}.gs-8>.grid-stack-item[gs-w="4"]{width:50%}.gs-8>.grid-stack-item[gs-x="4"]{left:50%}.gs-8>.grid-stack-item[gs-w="5"]{width:62.5%}.gs-8>.grid-stack-item[gs-x="5"]{left:62.5%}.gs-8>.grid-stack-item[gs-w="6"]{width:75%}.gs-8>.grid-stack-item[gs-x="6"]{left:75%}.gs-8>.grid-stack-item[gs-w="7"]{width:87.5%}.gs-8>.grid-stack-item[gs-x="7"]{left:87.5%}.gs-8>.grid-stack-item[gs-w="8"]{width:100%}.gs-9>.grid-stack-item{width:11.111%}.gs-9>.grid-stack-item[gs-x="1"]{left:11.111%}.gs-9>.grid-stack-item[gs-w="2"]{width:22.222%}.gs-9>.grid-stack-item[gs-x="2"]{left:22.222%}.gs-9>.grid-stack-item[gs-w="3"]{width:33.333%}.gs-9>.grid-stack-item[gs-x="3"]{left:33.333%}.gs-9>.grid-stack-item[gs-w="4"]{width:44.444%}.gs-9>.grid-stack-item[gs-x="4"]{left:44.444%}.gs-9>.grid-stack-item[gs-w="5"]{width:55.556%}.gs-9>.grid-stack-item[gs-x="5"]{left:55.556%}.gs-9>.grid-stack-item[gs-w="6"]{width:66.667%}.gs-9>.grid-stack-item[gs-x="6"]{left:66.667%}.gs-9>.grid-stack-item[gs-w="7"]{width:77.778%}.gs-9>.grid-stack-item[gs-x="7"]{left:77.778%}.gs-9>.grid-stack-item[gs-w="8"]{width:88.889%}.gs-9>.grid-stack-item[gs-x="8"]{left:88.889%}.gs-9>.grid-stack-item[gs-w="9"]{width:100%}.gs-10>.grid-stack-item{width:10%}.gs-10>.grid-stack-item[gs-x="1"]{left:10%}.gs-10>.grid-stack-item[gs-w="2"]{width:20%}.gs-10>.grid-stack-item[gs-x="2"]{left:20%}.gs-10>.grid-stack-item[gs-w="3"]{width:30%}.gs-10>.grid-stack-item[gs-x="3"]{left:30%}.gs-10>.grid-stack-item[gs-w="4"]{width:40%}.gs-10>.grid-stack-item[gs-x="4"]{left:40%}.gs-10>.grid-stack-item[gs-w="5"]{width:50%}.gs-10>.grid-stack-item[gs-x="5"]{left:50%}.gs-10>.grid-stack-item[gs-w="6"]{width:60%}.gs-10>.grid-stack-item[gs-x="6"]{left:60%}.gs-10>.grid-stack-item[gs-w="7"]{width:70%}.gs-10>.grid-stack-item[gs-x="7"]{left:70%}.gs-10>.grid-stack-item[gs-w="8"]{width:80%}.gs-10>.grid-stack-item[gs-x="8"]{left:80%}.gs-10>.grid-stack-item[gs-w="9"]{width:90%}.gs-10>.grid-stack-item[gs-x="9"]{left:90%}.gs-10>.grid-stack-item[gs-w="10"]{width:100%}.gs-11>.grid-stack-item{width:9.091%}.gs-11>.grid-stack-item[gs-x="1"]{left:9.091%}.gs-11>.grid-stack-item[gs-w="2"]{width:18.182%}.gs-11>.grid-stack-item[gs-x="2"]{left:18.182%}.gs-11>.grid-stack-item[gs-w="3"]{width:27.273%}.gs-11>.grid-stack-item[gs-x="3"]{left:27.273%}.gs-11>.grid-stack-item[gs-w="4"]{width:36.364%}.gs-11>.grid-stack-item[gs-x="4"]{left:36.364%}.gs-11>.grid-stack-item[gs-w="5"]{width:45.455%}.gs-11>.grid-stack-item[gs-x="5"]{left:45.455%}.gs-11>.grid-stack-item[gs-w="6"]{width:54.545%}.gs-11>.grid-stack-item[gs-x="6"]{left:54.545%}.gs-11>.grid-stack-item[gs-w="7"]{width:63.636%}.gs-11>.grid-stack-item[gs-x="7"]{left:63.636%}.gs-11>.grid-stack-item[gs-w="8"]{width:72.727%}.gs-11>.grid-stack-item[gs-x="8"]{left:72.727%}.gs-11>.grid-stack-item[gs-w="9"]{width:81.818%}.gs-11>.grid-stack-item[gs-x="9"]{left:81.818%}.gs-11>.grid-stack-item[gs-w="10"]{width:90.909%}.gs-11>.grid-stack-item[gs-x="10"]{left:90.909%}.gs-11>.grid-stack-item[gs-w="11"]{width:100%}.grid-stack[data-v-e4e1101d]{margin:0 -10px}[data-v-e4e1101d] .tile-header{cursor:move}[data-v-e4e1101d] .ui-resizable-se{background-image:url("data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cmask%20id='mask0_4483_27853'%20style='mask-type:alpha'%20maskUnits='userSpaceOnUse'%20x='0'%20y='0'%20width='24'%20height='24'%3e%3crect%20width='24'%20height='24'%20transform='matrix(-1%200%200%201%2024%200)'%20fill='%23596177'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_4483_27853)'%3e%3cpath%20d='M19%2021V10H17V19H8V21H19ZM14%2016V5H12V14H3V16H14Z'%20fill='%23596177'/%3e%3c/g%3e%3c/svg%3e");background-size:16px 16px;cursor:se-resize;margin:1px;transform:rotate(0)}[data-v-e4e1101d] .ui-resizable-sw{background-image:url("data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cmask%20id='mask0_4483_27853'%20style='mask-type:alpha'%20maskUnits='userSpaceOnUse'%20x='0'%20y='0'%20width='24'%20height='24'%3e%3crect%20width='24'%20height='24'%20transform='matrix(-1%200%200%201%2024%200)'%20fill='%23596177'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_4483_27853)'%3e%3cpath%20d='M19%2021V10H17V19H8V21H19ZM14%2016V5H12V14H3V16H14Z'%20fill='%23596177'/%3e%3c/g%3e%3c/svg%3e");background-size:16px 16px;cursor:se-resize;margin:1px;transform:rotate(90deg)}.kong-ui-public-dashboard-renderer .tile-container[data-v-0bb82daa]{background:transparent;background:var(--kui-color-background-transparent, transparent);border:1px solid #e0e4ea;border:var(--kui-border-width-10, 1px) solid var(--kui-color-border, #e0e4ea);border-radius:4px;border-radius:var(--kui-border-radius-20, 4px);height:100%}.kong-ui-public-dashboard-renderer .tile-container.slottable-tile[data-v-0bb82daa]{padding:16px;padding:var(--kui-space-60, 16px)}
1
+ .locked[data-v-2d2e5fe6]{cursor:move}.tooltip-container[data-v-2d2e5fe6]{background-color:#fff;border-radius:4px;border-radius:var(--kui-border-radius-20, 4px);box-shadow:0 5px 15px #0000001f,0 5px 10px #0000003d;max-width:425px;min-width:250px;position:absolute;transition:all .2s cubic-bezier(.25,.8,.25,1);z-index:999}.tooltip-container .tooltip-title[data-v-2d2e5fe6]{border-bottom:1px solid #e0e4ea;border-bottom:var(--kui-border-width-10, 1px) solid var(--kui-color-border, #e0e4ea);display:flex;flex-direction:column;margin:6px;margin:var(--kui-space-30, 6px);min-height:24px;padding-bottom:6px;padding-bottom:var(--kui-space-30, 6px)}.tooltip-container .tooltip-title .title[data-v-2d2e5fe6]{font-size:14px;font-size:var(--kui-font-size-30, 14px);font-weight:600;font-weight:var(--kui-font-weight-semibold, 600)}.tooltip-container .tooltip-title .subtitle[data-v-2d2e5fe6]{font-size:12px;font-size:var(--kui-font-size-20, 12px);margin-top:6px;margin-top:var(--kui-space-30, 6px)}.tooltip-container .tooltip-title .drag-icon[data-v-2d2e5fe6]{margin-top:6px;margin-top:var(--kui-space-30, 6px);position:absolute;right:0;top:0}.tooltip-container .tooltip[data-v-2d2e5fe6]{list-style:none;margin:6px;margin:var(--kui-space-30, 6px);max-height:300px;min-width:250px;overflow-y:auto;overflow-y:var(--kui-space-auto, auto);padding-left:0;padding-left:var(--kui-space-0, 0px)}.tooltip-container .tooltip[data-v-2d2e5fe6]{-ms-overflow-style:thin;scrollbar-color:#e0e4ea transparent;scrollbar-color:var(--kui-color-background-disabled, #e0e4ea) var(--kui-color-background-transparent, transparent);scrollbar-width:auto}.tooltip-container .tooltip[data-v-2d2e5fe6] ::-webkit-scrollbar{width:40,8px;width:var(--kui-space, 40, 8px)}.tooltip-container .tooltip[data-v-2d2e5fe6] ::-webkit-scrollbar-track{background:transparent}.tooltip-container .tooltip[data-v-2d2e5fe6] ::-webkit-scrollbar-thumb{background-color:#e0e4ea;background-color:var(--kui-color-background-disabled, #e0e4ea);border-radius:10px;border-radius:var(--kui-border-radius-50, 10px)}.tooltip-container .tooltip li[data-v-2d2e5fe6]{align-items:center;display:flex;font-size:12px;font-size:var(--kui-font-size-20, 12px);line-height:20px;line-height:var(--kui-line-height-30, 20px)}.tooltip-container .tooltip .display-label[data-v-2d2e5fe6]{flex:1;max-width:75%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tooltip-container .tooltip .display-label.empty[data-v-2d2e5fe6]{font-style:italic}.tooltip-container .tooltip .display-value[data-v-2d2e5fe6]{margin-left:auto;margin-left:var(--kui-space-auto, auto);padding-left:8px;padding-left:var(--kui-space-40, 8px);white-space:nowrap}.tooltip-container .tooltip .square-marker[data-v-2d2e5fe6]{display:inline-flex;flex-direction:row;height:12px;margin-right:6px;margin-right:var(--kui-space-30, 6px);width:12px}.no-select{-webkit-user-select:none;user-select:none}.legend-container[data-v-afbe6cec]{display:flex;margin:6px 0 0;max-height:inherit;-ms-overflow-style:thin;overflow-x:hidden;overflow-y:auto;padding-left:0}.legend-container[data-v-afbe6cec]{-ms-overflow-style:thin;scrollbar-color:#e0e4ea transparent;scrollbar-color:var(--kui-color-background-disabled, #e0e4ea) var(--kui-color-background-transparent, transparent);scrollbar-width:auto}.legend-container[data-v-afbe6cec] ::-webkit-scrollbar{width:40,8px;width:var(--kui-space, 40, 8px)}.legend-container[data-v-afbe6cec] ::-webkit-scrollbar-track{background:transparent}.legend-container[data-v-afbe6cec] ::-webkit-scrollbar-thumb{background-color:#e0e4ea;background-color:var(--kui-color-background-disabled, #e0e4ea);border-radius:10px;border-radius:var(--kui-border-radius-50, 10px)}.legend-container.vertical[data-v-afbe6cec]{flex-direction:column;justify-content:flex-start;max-height:90%;max-width:15%;min-width:10%;padding-left:12px;row-gap:16px}.legend-container.vertical .truncate-label[data-v-afbe6cec]{max-width:12ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.legend-container.vertical li .legend[data-v-afbe6cec]{margin-top:4px}@media (max-width: 767px){.legend-container.vertical[data-v-afbe6cec]{column-gap:12px;display:grid;grid-template-columns:repeat(auto-fit,12ch);height:40px;justify-content:center;max-width:99%!important}.legend-container.vertical .sub-label[data-v-afbe6cec]{display:none}}.legend-container.horizontal[data-v-afbe6cec]{column-gap:12px;display:grid;height:var(--c25a8106);justify-content:center;width:99%}.legend-container.horizontal .truncate-label[data-v-afbe6cec]{max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.legend-container.horizontal li[data-v-afbe6cec]{align-items:center;margin:0}.legend-container.horizontal li .label[data-v-afbe6cec]{line-height:24px;padding-right:2px;white-space:nowrap}.legend-container li[data-v-afbe6cec]{align-items:start;cursor:pointer;display:flex;line-height:1}.legend-container li .square-marker[data-v-afbe6cec]{height:8px;margin:0 6px 0 0;width:8px}.legend-container li .label[data-v-afbe6cec]{font-size:12px}.legend-container li .sub-label[data-v-afbe6cec]{font-size:12px;line-height:16px;word-break:none}.legend-container li .strike-through[data-v-afbe6cec]{text-decoration:line-through}.legend-container li .empty[data-v-afbe6cec]{font-style:italic}.legend-container li .tooltip-content[data-v-afbe6cec]{max-width:40ch}.chart-parent[data-v-fa6ab642]{align-items:center;display:flex;height:inherit;justify-content:space-evenly;position:relative;width:inherit}.chart-parent.column[data-v-fa6ab642]{flex-direction:column}.chart-parent.column .chart-container[data-v-fa6ab642]{max-height:calc(100% - 48px);width:100%}.chart-parent.legend-row[data-v-fa6ab642]{flex-direction:row}.chart-parent.legend-row .chart-container[data-v-fa6ab642]{height:100%;width:90%}@media (max-width: 767px){.chart-parent.legend-row .chart-container[data-v-fa6ab642]{max-height:calc(100% - 48px)!important;width:100%!important}}@media (max-width: 767px){.chart-parent.legend-row[data-v-fa6ab642]{display:flex;flex-wrap:wrap}}.chart-parent .chart-container[data-v-fa6ab642]{flex:1 1 auto;position:relative}.chart-container[data-v-fa6ab642]{overflow:auto}.chart-container[data-v-fa6ab642]{-ms-overflow-style:thin;scrollbar-color:#e0e4ea transparent;scrollbar-color:var(--kui-color-background-disabled, #e0e4ea) var(--kui-color-background-transparent, transparent);scrollbar-width:auto}.chart-container[data-v-fa6ab642] ::-webkit-scrollbar{width:40,8px;width:var(--kui-space, 40, 8px)}.chart-container[data-v-fa6ab642] ::-webkit-scrollbar-track{background:transparent}.chart-container[data-v-fa6ab642] ::-webkit-scrollbar-thumb{background-color:#e0e4ea;background-color:var(--kui-color-background-disabled, #e0e4ea);border-radius:10px;border-radius:var(--kui-border-radius-50, 10px)}.chart-container .chart-body[data-v-fa6ab642]{height:100%}.chart-container[data-v-fa6ab642]::-webkit-scrollbar-track{background-color:#fff;background-color:var(--kui-color-background, #ffffff);border-radius:10px;border-radius:var(--kui-border-radius-50, 10px)}.chart-container[data-v-fa6ab642]::-webkit-scrollbar{width:10px}.chart-container[data-v-fa6ab642]::-webkit-scrollbar-thumb{background-color:#e0e4ea;background-color:var(--kui-color-background-disabled, #e0e4ea);border-radius:10px;border-radius:var(--kui-border-radius-50, 10px)}.axis[data-v-fa6ab642]{left:0;pointer-events:none;position:absolute;top:0;z-index:99}.axis-tooltip[data-v-fa6ab642]{background-color:#000933;background-color:var(--kui-color-background-inverse, #000933);border:none;border-radius:4px;border-radius:var(--kui-border-radius-20, 4px);color:#fff;color:var(--kui-color-text-inverse, #ffffff);max-width:40ch;padding:4px 8px;padding:var(--kui-space-20, 4px) var(--kui-space-40, 8px);position:absolute;width:max-content;z-index:100}.axis-tooltip .axis-tooltip-content[data-v-fa6ab642]{color:#fff;color:var(--kui-color-text-inverse, #ffffff);font-family:Inter,Roboto,Helvetica,sans-serif;font-family:var(--kui-font-family-text, "Inter", Roboto, Helvetica, sans-serif);font-size:12px;font-size:var(--kui-font-size-20, 12px);font-weight:500;font-weight:var(--kui-font-weight-medium, 500);line-height:16px;line-height:var(--kui-line-height-20, 16px)}.tooltip-boundary[data-v-fa6ab642]{height:100%;left:0;position:relative;top:0;width:100%}.chart-parent[data-v-6a59a92d]{align-items:center;display:flex;height:inherit;justify-content:space-evenly;position:relative;width:inherit}.chart-parent.column[data-v-6a59a92d]{flex-direction:column}.chart-parent.column .chart-container[data-v-6a59a92d]{max-height:calc(100% - 48px);width:100%}.chart-parent.legend-row[data-v-6a59a92d]{flex-direction:row}.chart-parent.legend-row .chart-container[data-v-6a59a92d]{height:100%;width:90%}@media (max-width: 767px){.chart-parent.legend-row .chart-container[data-v-6a59a92d]{max-height:calc(100% - 48px)!important;width:100%!important}}@media (max-width: 767px){.chart-parent.legend-row[data-v-6a59a92d]{display:flex;flex-wrap:wrap}}.chart-parent .chart-container[data-v-6a59a92d]{flex:1 1 auto;position:relative}.chart-parent[data-v-2aef1d50]{align-items:center;display:flex;height:inherit;justify-content:space-evenly;position:relative;width:inherit}.chart-parent.column[data-v-2aef1d50]{flex-direction:column}.chart-parent.column .chart-container[data-v-2aef1d50]{max-height:calc(100% - 48px);width:100%}.chart-parent.legend-row[data-v-2aef1d50]{flex-direction:row}.chart-parent.legend-row .chart-container[data-v-2aef1d50]{height:100%;width:90%}@media (max-width: 767px){.chart-parent.legend-row .chart-container[data-v-2aef1d50]{max-height:calc(100% - 48px)!important;width:100%!important}}@media (max-width: 767px){.chart-parent.legend-row[data-v-2aef1d50]{display:flex;flex-wrap:wrap}}.chart-parent .chart-container[data-v-2aef1d50]{flex:1 1 auto;position:relative}.analytics-chart-shell[data-v-5bb52986],.simple-chart-shell[data-v-5bb52986]{border-radius:4px;border-radius:var(--kui-border-radius-20, 4px);display:flex;flex-direction:column}.analytics-chart-shell .chart-empty-state[data-v-5bb52986],.simple-chart-shell .chart-empty-state[data-v-5bb52986]{display:flex;flex-direction:column;height:100%;justify-content:center}.analytics-chart-shell[data-v-5bb52986]{height:100%;position:relative;width:100%}.analytics-chart-shell .analytics-chart-parent[data-v-5bb52986]{height:inherit;width:inherit}.analytics-chart-shell .chart-empty-state[data-v-5bb52986]{padding:20px 0 16px;padding:var(--kui-space-70, 20px) var(--kui-space-0, 0px) var(--kui-space-60, 16px) var(--kui-space-0, 0px)}.analytics-chart-shell .chart-header[data-v-5bb52986]{align-items:center;display:flex;justify-content:flex-start;width:100%;z-index:999}.analytics-chart-shell .tooltip[data-v-5bb52986]{display:flex;margin-left:12px;margin-left:var(--kui-space-50, 12px);margin-top:2px;margin-top:var(--kui-space-10, 2px)}.analytics-chart-shell .tooltip .tooltip-content[data-v-5bb52986]{max-width:40vw}.chart-parent[data-v-4f4e5b76]{align-items:center;display:flex;height:inherit;justify-content:space-evenly;position:relative;width:inherit}.chart-parent.column[data-v-4f4e5b76]{flex-direction:column}.chart-parent.column .chart-container[data-v-4f4e5b76]{max-height:calc(100% - 48px);width:100%}.chart-parent.legend-row[data-v-4f4e5b76]{flex-direction:row}.chart-parent.legend-row .chart-container[data-v-4f4e5b76]{height:100%;width:90%}@media (max-width: 767px){.chart-parent.legend-row .chart-container[data-v-4f4e5b76]{max-height:calc(100% - 48px)!important;width:100%!important}}@media (max-width: 767px){.chart-parent.legend-row[data-v-4f4e5b76]{display:flex;flex-wrap:wrap}}.chart-parent .chart-container[data-v-4f4e5b76]{flex:1 1 auto;position:relative}.chart-parent[data-v-4f4e5b76]{height:auto;margin:0;margin:var(--kui-space-0, 0px);padding:0;padding:var(--kui-space-0, 0px);width:auto}.chart-parent .chart-container[data-v-4f4e5b76]{margin:0;margin:var(--kui-space-0, 0px);max-height:100px;max-width:100px;padding:0;padding:var(--kui-space-0, 0px)}.chart-parent .chart-totals-flex[data-v-4f4e5b76]{align-items:center;display:flex;flex-direction:column;height:100px;justify-content:center;padding:24px 0 0;padding:var(--kui-space-80, 24px) var(--kui-space-0, 0px) var(--kui-space-0, 0px);position:absolute;width:100px;z-index:2}.chart-parent .chart-totals-flex .metric-large[data-v-4f4e5b76]{font-size:20px;font-size:var(--kui-font-size-60, 20px);font-weight:500;font-weight:var(--kui-font-weight-medium, 500);line-height:28px;line-height:var(--kui-line-height-50, 28px)}.chart-parent .chart-totals-flex .metric-small[data-v-4f4e5b76]{color:#6c7489;color:var(--kui-color-text-neutral, #6c7489);font-size:10px;font-size:var(--kui-font-size-10, 10px);font-weight:400;font-weight:var(--kui-font-weight-regular, 400);line-height:12px;line-height:var(--kui-line-height-10, 12px)}.chart-parent[data-v-c25764ee]{align-items:center;display:flex;height:inherit;justify-content:space-evenly;position:relative;width:inherit}.chart-parent.column[data-v-c25764ee]{flex-direction:column}.chart-parent.column .chart-container[data-v-c25764ee]{max-height:calc(100% - 48px);width:100%}.chart-parent.legend-row[data-v-c25764ee]{flex-direction:row}.chart-parent.legend-row .chart-container[data-v-c25764ee]{height:100%;width:90%}@media (max-width: 767px){.chart-parent.legend-row .chart-container[data-v-c25764ee]{max-height:calc(100% - 48px)!important;width:100%!important}}@media (max-width: 767px){.chart-parent.legend-row[data-v-c25764ee]{display:flex;flex-wrap:wrap}}.chart-parent .chart-container[data-v-c25764ee]{flex:1 1 auto;position:relative}.chart-parent[data-v-c25764ee]{container-type:inline-size}.chart-parent .single-value-error[data-v-c25764ee] .empty-state-title{font-size:12px;font-size:var(--kui-font-size-20, 12px);line-height:16px;line-height:var(--kui-line-height-20, 16px);margin:0;margin:var(--kui-space-0, 0px)}.chart-parent .single-value-wrapper[data-v-c25764ee]{align-items:baseline;display:inline-flex}.chart-parent .single-value-wrapper .single-value[data-v-c25764ee]{color:#000933;font-size:24px;font-weight:700;line-height:36px}.chart-parent .single-value-wrapper .single-value-unit[data-v-c25764ee]{color:#000933;font-size:20px;font-weight:700;line-height:32px}@container (min-width: 300px){.chart-parent .single-value-wrapper .single-value[data-v-c25764ee]{font-size:48px;line-height:56px}.chart-parent .single-value-wrapper .single-value-unit[data-v-c25764ee]{font-size:40px;line-height:48px}}@container (min-width: 500px){.chart-parent .single-value-wrapper .single-value[data-v-c25764ee]{font-size:56px;line-height:64px}.chart-parent .single-value-wrapper .single-value-unit[data-v-c25764ee]{font-size:48px;line-height:56px}}@container (min-width: 700px){.chart-parent .single-value-wrapper .single-value[data-v-c25764ee]{font-size:64px;line-height:72px}.chart-parent .single-value-wrapper .single-value-unit[data-v-c25764ee]{font-size:56px;line-height:64px}}@container (min-width: 1000px){.chart-parent .single-value-wrapper .single-value[data-v-c25764ee]{font-size:80px;line-height:88px}.chart-parent .single-value-wrapper .single-value-unit[data-v-c25764ee]{font-size:64px;line-height:72px}}@container (min-width: 1200px){.chart-parent .single-value-wrapper .single-value[data-v-c25764ee]{font-size:96px;line-height:104px}.chart-parent .single-value-wrapper .single-value-unit[data-v-c25764ee]{font-size:80px;line-height:88px}}.analytics-chart-shell[data-v-471652c8],.simple-chart-shell[data-v-471652c8]{border-radius:4px;border-radius:var(--kui-border-radius-20, 4px);display:flex;flex-direction:column}.analytics-chart-shell .chart-empty-state[data-v-471652c8],.simple-chart-shell .chart-empty-state[data-v-471652c8]{display:flex;flex-direction:column;height:100%;justify-content:center}.simple-chart-shell[data-v-471652c8]{margin:0;margin:var(--kui-space-0, 0px);padding:0;padding:var(--kui-space-0, 0px);width:100%}.simple-chart-shell .chart-empty-state[data-v-471652c8]{display:flex;flex-direction:column;justify-content:center}.simple-chart-shell .chart-empty-state[data-v-471652c8] .empty-state-title{font-size:12px;font-size:var(--kui-font-size-20, 12px);line-height:16px;line-height:var(--kui-line-height-20, 16px);margin:0;margin:var(--kui-space-0, 0px)}.kong-ui-public-top-n-table[data-v-665e7735]{border:none!important;max-height:100%;padding:0!important}.kong-ui-public-top-n-table .top-n-card-description[data-v-665e7735]{color:#6c7489;font-size:12px;text-align:right}.kong-ui-public-top-n-table[data-v-665e7735] .k-card-actions{align-self:baseline;display:flex;line-height:22px}.kong-ui-public-top-n-table[data-v-665e7735] .card-content{overflow-y:auto}.kong-ui-public-top-n-table[data-v-665e7735] .card-content{-ms-overflow-style:thin;scrollbar-color:#e0e4ea transparent;scrollbar-color:var(--kui-color-background-disabled, #e0e4ea) var(--kui-color-background-transparent, transparent);scrollbar-width:auto}.kong-ui-public-top-n-table[data-v-665e7735] .card-content ::-webkit-scrollbar{width:40,8px;width:var(--kui-space, 40, 8px)}.kong-ui-public-top-n-table[data-v-665e7735] .card-content ::-webkit-scrollbar-track{background:transparent}.kong-ui-public-top-n-table[data-v-665e7735] .card-content ::-webkit-scrollbar-thumb{background-color:#e0e4ea;background-color:var(--kui-color-background-disabled, #e0e4ea);border-radius:10px;border-radius:var(--kui-border-radius-50, 10px)}.kong-ui-public-top-n-table .top-n-table[data-v-665e7735]{display:flex;flex-direction:column;max-height:100%;width:100%}.kong-ui-public-top-n-table .top-n-table .table-headings[data-v-665e7735]{flex-shrink:0;font-size:14px;font-weight:600;line-height:24px}.kong-ui-public-top-n-table .top-n-table .table-row[data-v-665e7735]{align-self:stretch;border-bottom:1px solid #e0e4ea;display:flex;justify-content:space-between}.kong-ui-public-top-n-table .top-n-table .table-row[data-v-665e7735]:last-of-type{border-bottom:none}.kong-ui-public-top-n-table .top-n-table .column-1[data-v-665e7735]{flex:1;padding:0 24px 12px 0}.kong-ui-public-top-n-table .top-n-table .column-2[data-v-665e7735]{flex:1;max-width:110px;padding:0 0 12px}.kong-ui-public-top-n-table .top-n-table .table-body[data-v-665e7735]{overflow-y:auto}.kong-ui-public-top-n-table .top-n-table .table-body .table-row[data-v-665e7735]:first-of-type{border-top:1px solid #e0e4ea}.kong-ui-public-top-n-table .top-n-table .table-body .column-1[data-v-665e7735],.kong-ui-public-top-n-table .top-n-table .table-body .column-2[data-v-665e7735]{padding-top:12px}.kong-ui-public-top-n-table .top-n-table .table-body .column-1[data-v-665e7735]{color:#3a3f51;font-size:14px}.kong-ui-public-top-n-table .top-n-table .table-body .column-1[data-v-665e7735] a{color:#0044f4;font-weight:700;text-decoration:none}.kong-ui-public-top-n-table.kong-card.border{border-radius:4px;padding:20px}.kong-ui-public-top-n-table.kong-card.border .k-card-header{align-items:baseline;margin-bottom:0!important}.kong-ui-public-top-n-table.kong-card.border .k-card-header .k-card-title{margin-bottom:16px}.kong-ui-public-top-n-table.kong-card.border .k-card-header .k-card-title h4{font-size:16px;font-weight:600}.kong-ui-public-csv-export-modal .modal-container{min-width:580px}.kong-ui-public-csv-export-modal .modal-container .selected-range{font-size:14px}.kong-ui-public-csv-export-modal .modal-container .text-muted{color:#00000073!important;font-size:14px}.kong-ui-public-csv-export-modal .modal-container .vitals-table{font-size:14px;margin-bottom:20px;margin-top:6px;width:100%}.kong-ui-public-csv-export-modal .modal-container .k-table thead{border-top:1px solid #e0e4ea;height:auto}.kong-ui-public-csv-export-modal .modal-container .modal-footer .vitals-report-export-button{display:inline-flex}.metricscard-tooltip,.trafficcard.active .metricscard-tooltip{pointer-events:all}.metricscard[data-v-b1513f6f]{display:flex;flex-direction:column;width:100%}@media (max-width: 767px){.metricscard[data-v-b1513f6f]{max-width:none;width:auto}}@media (min-width: 768px){.metricscard[data-v-b1513f6f]{height:100%;justify-content:space-evenly}.metricscard.sm[data-v-b1513f6f]:not(:last-child){border-right:1px solid #e0e4ea;border-right:var(--kui-border-width-10, 1px) solid var(--kui-color-border, #e0e4ea)}}.metricscard[data-v-b1513f6f]:hover{border:none;text-decoration:none}.metricscard-title[data-v-b1513f6f]{align-items:center;color:#000933;color:var(--kui-color-text, #000933);display:flex;flex-direction:row;font-size:14px;font-size:var(--kui-font-size-30, 14px);font-weight:500;font-weight:var(--kui-font-weight-medium, 500);line-height:16px;line-height:var(--kui-line-height-20, 16px);margin:0;margin:var(--kui-space-0, 0px)}.metricscard-title.sm[data-v-b1513f6f]{color:#52596e;color:var(--kui-color-text-neutral-strong, #52596e);font-size:12px;font-size:var(--kui-font-size-20, 12px);font-weight:600;font-weight:var(--kui-font-weight-semibold, 600)}.metricscard-title.md[data-v-b1513f6f]{font-size:14px;font-size:var(--kui-font-size-30, 14px);font-weight:600;font-weight:var(--kui-font-weight-semibold, 600)}.metricscard-title.lg[data-v-b1513f6f],.metricscard-title.xl[data-v-b1513f6f]{font-size:14px;font-size:var(--kui-font-size-30, 14px)}.metricscard-description[data-v-b1513f6f]{color:#afb7c5;color:var(--kui-color-text-disabled, #afb7c5);font-size:12px;font-size:var(--kui-font-size-20, 12px);line-height:16px;line-height:var(--kui-line-height-20, 16px);margin-top:8px;margin-top:var(--kui-space-40, 8px)}.metricscard-icon[data-v-b1513f6f]{margin-right:4px;margin-right:var(--kui-space-20, 4px)}.metricscard-value[data-v-b1513f6f]{color:#000933;color:var(--kui-color-text, #000933);display:flex;flex-direction:row;font-size:24px;font-size:var(--kui-font-size-70, 24px);font-weight:600;font-weight:var(--kui-font-weight-semibold, 600);justify-content:space-between;line-height:32px;line-height:var(--kui-line-height-60, 32px)}.metricscard-value.sm[data-v-b1513f6f]{font-size:14px;font-size:var(--kui-font-size-30, 14px);line-height:24px;line-height:var(--kui-line-height-40, 24px)}.metricscard-value.xl[data-v-b1513f6f]{font-size:48px;font-size:var(--kui-font-size-100, 48px)}.metricscard-valuetrend[data-v-b1513f6f]{display:flex;flex-direction:column;row-gap:12px;row-gap:var(--kui-space-50, 12px)}@media (max-width: 767px){.metricscard-valuetrend[data-v-b1513f6f]{row-gap:6px;row-gap:var(--kui-space-30, 6px)}}.metricscard-valuetrend.is-compact[data-v-b1513f6f]{align-items:center;flex-direction:row!important;justify-content:space-between;margin-top:0;margin-top:var(--kui-space-0, 0px)}.metricscard-trend[data-v-b1513f6f]{align-items:center;column-gap:8px;column-gap:var(--kui-space-40, 8px);display:flex}.metricscard-trend-change[data-v-b1513f6f]{align-items:center;border-radius:4px;border-radius:var(--kui-border-radius-20, 4px);display:flex;flex-direction:row;font-size:12px;font-size:var(--kui-font-size-20, 12px);font-weight:600;font-weight:var(--kui-font-weight-semibold, 600);padding:4px 8px;padding:var(--kui-space-20, 4px) var(--kui-space-40, 8px)}.metricscard-trend-change .kui-icon[data-v-b1513f6f]{margin-right:4px;margin-right:var(--kui-space-20, 4px)}.metricscard-trend-change.positive[data-v-b1513f6f]{background-color:#ecfffb;background-color:var(--kui-color-background-success-weakest, #ecfffb);color:#007d60;color:var(--kui-color-text-success, #007d60)}.metricscard-trend-change.negative[data-v-b1513f6f]{background-color:#ffe5e5;background-color:var(--kui-color-background-danger-weakest, #ffe5e5);color:#ad000e;color:var(--kui-color-text-danger-strong, #ad000e)}.metricscard-trend-change.neutral[data-v-b1513f6f]{background-color:#e0e4ea;background-color:var(--kui-color-background-neutral-weaker, #e0e4ea);color:#52596e;color:var(--kui-color-text-neutral-strong, #52596e)}.metricscard-trend-range[data-v-b1513f6f]{color:#000933;color:var(--kui-color-text, #000933);font-size:12px;font-size:var(--kui-font-size-20, 12px)}.metricscard-tooltip[data-v-b1513f6f]{display:inline-flex;margin:auto 0 auto 4px;margin:var(--kui-space-auto, auto) var(--kui-space-0, 0px) var(--kui-space-auto, auto) var(--kui-space-20, 4px);vertical-align:middle}.metricscard-error[data-v-b1513f6f]{align-items:center;color:#3a3f51;color:var(--kui-color-text-neutral-stronger, #3a3f51);display:flex;flex-direction:row;font-size:12px;font-size:var(--kui-font-size-20, 12px);margin-top:8px;margin-top:var(--kui-space-40, 8px)}.metricscard-error .kong-icon-warning[data-v-b1513f6f]{margin-right:12px;margin-right:var(--kui-space-50, 12px)}.metricscard.active .metricscard-tooltip[data-v-b1513f6f]{pointer-events:all}.loading-tabs[data-v-50eab68c]{display:flex;flex-direction:column}.loading-tabs-large[data-v-50eab68c]{padding:4px;row-gap:12px;width:240px}.loading-tabs-small[data-v-50eab68c]{padding:2px;row-gap:8px;width:120px}.loading-tabs-small .box[data-v-50eab68c]{height:12px}@media (max-width: 767px){.loading-tabs[data-v-50eab68c]{width:auto}}.kong-ui-public-metric-card-container[data-v-eac0ca04]{background-color:transparent;background-color:var(--kui-color-background-transparent, transparent);display:flex;flex-direction:column;justify-content:space-between;width:100%}.kong-ui-public-metric-card-container .container-title[data-v-eac0ca04]{align-items:center;display:flex;font-size:16px;font-size:var(--kui-font-size-40, 16px);font-weight:600;font-weight:var(--kui-font-weight-semibold, 600);justify-content:space-between;margin-bottom:12px;margin-bottom:var(--kui-space-50, 12px)}.kong-ui-public-metric-card-container .container-title .container-description[data-v-eac0ca04]{color:#6c7489;color:var(--kui-color-text-neutral, #6c7489);font-size:12px;font-size:var(--kui-font-size-20, 12px);font-weight:400;font-weight:var(--kui-font-weight-regular, 400)}.kong-ui-public-metric-card-container .cards-wrapper[data-v-eac0ca04]{display:flex;flex-direction:row;flex-grow:1;column-gap:24px;row-gap:16px}@media (max-width: 767px){.kong-ui-public-metric-card-container .cards-wrapper[data-v-eac0ca04]{column-gap:16px;row-gap:16px;flex-direction:column}}.kong-ui-public-metric-card-container.sm[data-v-eac0ca04]{column-gap:0;row-gap:0}.kong-ui-public-metric-card-container .error-display[data-v-eac0ca04]{align-items:center;display:flex;justify-content:center;margin:auto;margin:var(--kui-space-auto, auto)}.kong-ui-public-metric-card-container .error-display-icon[data-v-eac0ca04]{display:flex}.kong-ui-public-metric-card-container .error-display-message[data-v-eac0ca04]{color:#6c7489;color:var(--kui-color-text-neutral, #6c7489);font-size:14px;font-size:var(--kui-font-size-30, 14px);margin-left:12px;margin-left:var(--kui-space-50, 12px)}.analytics-chart[data-v-65cc8607]{display:flex;flex-direction:column;height:var(--35a26ebf);justify-content:center}.analytics-chart.single-value[data-v-65cc8607],.analytics-chart[data-v-a9ee3db9]{height:100%}@media (min-width: 767px){.metric-card-tile-wrapper[data-v-20c4f411]{align-items:center;display:flex;height:90%}}.metric-card-tile-wrapper[data-v-20c4f411] .kong-ui-public-metric-card-container{height:auto;max-height:100%}@media (min-width: 767px){.metric-card-tile-wrapper[data-v-20c4f411] .kong-ui-public-metric-card-container .metricscard:not(:last-of-type){border-right:1px solid #e0e4ea;border-right:var(--kui-border-width-10, 1px) solid var(--kui-color-border, #e0e4ea)}}.tile-boundary[data-v-4ddafde1]{display:flex;flex-direction:column;height:var(--3da384ac);overflow:hidden}.tile-boundary.editable:hover .tile-header[data-v-4ddafde1]{background:#f9fafb}.tile-boundary .tile-header[data-v-4ddafde1]{align-items:center;display:flex;justify-content:space-between;padding:12px 12px 8px;padding:var(--kui-space-50, 12px) var(--kui-space-50, 12px) var(--kui-space-40, 8px) var(--kui-space-50, 12px);right:0;width:100%}.tile-boundary .tile-header .title-tooltip[data-v-4ddafde1]{margin-right:4px;overflow:hidden}.tile-boundary .tile-header .title[data-v-4ddafde1]{font-weight:700;font-weight:var(--kui-font-weight-bold, 700);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tile-boundary .tile-header .tile-actions[data-v-4ddafde1]{display:flex;gap:6px;gap:var(--kui-space-30, 6px)}.tile-boundary .tile-header .tile-actions .edit-icon[data-v-4ddafde1]{cursor:pointer}.tile-boundary .tile-header .header-description[data-v-4ddafde1]{color:#6c7489;font-size:12px;text-align:right}.tile-boundary .tile-header .dropdown[data-v-4ddafde1]{display:flex;margin-left:auto;margin-left:var(--kui-space-auto, auto);margin-right:0;margin-right:var(--kui-space-0, 0px)}.tile-boundary .tile-header .dropdown .kebab-action-menu[data-v-4ddafde1]{cursor:pointer}.tile-boundary .tile-header .dropdown .delete-option[data-v-4ddafde1]{color:#d60027}.tile-boundary .tile-header .dropdown li.k-dropdown-item a[data-v-4ddafde1]{text-decoration:none}.tile-boundary .tile-header .dropdown a[data-v-4ddafde1]{color:#000933}.tile-boundary .tile-header .dropdown a[data-v-4ddafde1]:hover{color:#000933;text-decoration:none}.tile-boundary .tile-header .dropdown[data-v-4ddafde1]:hover{cursor:pointer}.tile-boundary .tile-content[data-v-4ddafde1]{flex-grow:1;margin:4px 16px 16px;margin:var(--kui-space-20, 4px) var(--kui-space-60, 16px) var(--kui-space-60, 16px) var(--kui-space-60, 16px);overflow:hidden}.kong-ui-public-grid-layout[data-v-354b7177]{display:grid;gap:20px;gap:var(--kui-space-70, 20px);grid-template-columns:repeat(var(--2a38e79e),1fr);grid-template-rows:var(--4cc71de6);width:100%}@media (max-width: 768px){.kong-ui-public-grid-layout[data-v-354b7177]{display:flex;flex-direction:column}.kong-ui-public-grid-layout .grid-cell[data-v-354b7177]{height:auto!important;left:auto!important;position:relative;top:auto!important;transform:none!important;width:auto!important}.kong-ui-public-grid-layout .grid-cell[data-v-354b7177]:not(:first-child){margin-top:20px;margin-top:var(--kui-space-70, 20px)}.kong-ui-public-grid-layout .empty-cell[data-v-354b7177]{display:none}}.grid-stack{position:relative}.grid-stack-rtl{direction:ltr}.grid-stack-rtl>.grid-stack-item{direction:rtl}.grid-stack-placeholder>.placeholder-content{background-color:#0000001a;margin:0;position:absolute;width:auto;z-index:0!important}.grid-stack>.grid-stack-item{position:absolute;padding:0}.grid-stack>.grid-stack-item>.grid-stack-item-content{margin:0;position:absolute;width:auto;overflow-x:hidden;overflow-y:auto}.grid-stack>.grid-stack-item.size-to-content:not(.size-to-content-max)>.grid-stack-item-content{overflow-y:hidden}.grid-stack-item>.ui-resizable-handle{position:absolute;font-size:.1px;display:block;-ms-touch-action:none;touch-action:none}.grid-stack-item.ui-resizable-autohide>.ui-resizable-handle,.grid-stack-item.ui-resizable-disabled>.ui-resizable-handle{display:none}.grid-stack-item>.ui-resizable-ne,.grid-stack-item>.ui-resizable-nw,.grid-stack-item>.ui-resizable-se,.grid-stack-item>.ui-resizable-sw{background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="%23666" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 20 20"><path d="m10 3 2 2H8l2-2v14l-2-2h4l-2 2"/></svg>');background-repeat:no-repeat;background-position:center}.grid-stack-item>.ui-resizable-ne{transform:rotate(45deg)}.grid-stack-item>.ui-resizable-sw{transform:rotate(45deg)}.grid-stack-item>.ui-resizable-nw{transform:rotate(-45deg)}.grid-stack-item>.ui-resizable-se{transform:rotate(-45deg)}.grid-stack-item>.ui-resizable-nw{cursor:nw-resize;width:20px;height:20px;top:0}.grid-stack-item>.ui-resizable-n{cursor:n-resize;height:10px;top:0;left:25px;right:25px}.grid-stack-item>.ui-resizable-ne{cursor:ne-resize;width:20px;height:20px;top:0}.grid-stack-item>.ui-resizable-e{cursor:e-resize;width:10px;top:15px;bottom:15px}.grid-stack-item>.ui-resizable-se{cursor:se-resize;width:20px;height:20px}.grid-stack-item>.ui-resizable-s{cursor:s-resize;height:10px;left:25px;bottom:0;right:25px}.grid-stack-item>.ui-resizable-sw{cursor:sw-resize;width:20px;height:20px}.grid-stack-item>.ui-resizable-w{cursor:w-resize;width:10px;top:15px;bottom:15px}.grid-stack-item.ui-draggable-dragging>.ui-resizable-handle{display:none!important}.grid-stack-item.ui-draggable-dragging{will-change:left,top;cursor:move}.grid-stack-item.ui-resizable-resizing{will-change:width,height}.ui-draggable-dragging,.ui-resizable-resizing{z-index:10000}.ui-draggable-dragging>.grid-stack-item-content,.ui-resizable-resizing>.grid-stack-item-content{box-shadow:1px 4px 6px #0003;opacity:.8}.grid-stack-animate,.grid-stack-animate .grid-stack-item{transition:left .3s,top .3s,height .3s,width .3s}.grid-stack-animate .grid-stack-item.grid-stack-placeholder,.grid-stack-animate .grid-stack-item.ui-draggable-dragging,.grid-stack-animate .grid-stack-item.ui-resizable-resizing{transition:left 0s,top 0s,height 0s,width 0s}.grid-stack>.grid-stack-item[gs-y="0"]{top:0}.grid-stack>.grid-stack-item[gs-x="0"]{left:0}.gs-12>.grid-stack-item{width:8.333%}.gs-12>.grid-stack-item[gs-x="1"]{left:8.333%}.gs-12>.grid-stack-item[gs-w="2"]{width:16.667%}.gs-12>.grid-stack-item[gs-x="2"]{left:16.667%}.gs-12>.grid-stack-item[gs-w="3"]{width:25%}.gs-12>.grid-stack-item[gs-x="3"]{left:25%}.gs-12>.grid-stack-item[gs-w="4"]{width:33.333%}.gs-12>.grid-stack-item[gs-x="4"]{left:33.333%}.gs-12>.grid-stack-item[gs-w="5"]{width:41.667%}.gs-12>.grid-stack-item[gs-x="5"]{left:41.667%}.gs-12>.grid-stack-item[gs-w="6"]{width:50%}.gs-12>.grid-stack-item[gs-x="6"]{left:50%}.gs-12>.grid-stack-item[gs-w="7"]{width:58.333%}.gs-12>.grid-stack-item[gs-x="7"]{left:58.333%}.gs-12>.grid-stack-item[gs-w="8"]{width:66.667%}.gs-12>.grid-stack-item[gs-x="8"]{left:66.667%}.gs-12>.grid-stack-item[gs-w="9"]{width:75%}.gs-12>.grid-stack-item[gs-x="9"]{left:75%}.gs-12>.grid-stack-item[gs-w="10"]{width:83.333%}.gs-12>.grid-stack-item[gs-x="10"]{left:83.333%}.gs-12>.grid-stack-item[gs-w="11"]{width:91.667%}.gs-12>.grid-stack-item[gs-x="11"]{left:91.667%}.gs-12>.grid-stack-item[gs-w="12"]{width:100%}.gs-1>.grid-stack-item{width:100%}.gs-2>.grid-stack-item{width:50%}.gs-2>.grid-stack-item[gs-x="1"]{left:50%}.gs-2>.grid-stack-item[gs-w="2"]{width:100%}.gs-3>.grid-stack-item{width:33.333%}.gs-3>.grid-stack-item[gs-x="1"]{left:33.333%}.gs-3>.grid-stack-item[gs-w="2"]{width:66.667%}.gs-3>.grid-stack-item[gs-x="2"]{left:66.667%}.gs-3>.grid-stack-item[gs-w="3"]{width:100%}.gs-4>.grid-stack-item{width:25%}.gs-4>.grid-stack-item[gs-x="1"]{left:25%}.gs-4>.grid-stack-item[gs-w="2"]{width:50%}.gs-4>.grid-stack-item[gs-x="2"]{left:50%}.gs-4>.grid-stack-item[gs-w="3"]{width:75%}.gs-4>.grid-stack-item[gs-x="3"]{left:75%}.gs-4>.grid-stack-item[gs-w="4"]{width:100%}.gs-5>.grid-stack-item{width:20%}.gs-5>.grid-stack-item[gs-x="1"]{left:20%}.gs-5>.grid-stack-item[gs-w="2"]{width:40%}.gs-5>.grid-stack-item[gs-x="2"]{left:40%}.gs-5>.grid-stack-item[gs-w="3"]{width:60%}.gs-5>.grid-stack-item[gs-x="3"]{left:60%}.gs-5>.grid-stack-item[gs-w="4"]{width:80%}.gs-5>.grid-stack-item[gs-x="4"]{left:80%}.gs-5>.grid-stack-item[gs-w="5"]{width:100%}.gs-6>.grid-stack-item{width:16.667%}.gs-6>.grid-stack-item[gs-x="1"]{left:16.667%}.gs-6>.grid-stack-item[gs-w="2"]{width:33.333%}.gs-6>.grid-stack-item[gs-x="2"]{left:33.333%}.gs-6>.grid-stack-item[gs-w="3"]{width:50%}.gs-6>.grid-stack-item[gs-x="3"]{left:50%}.gs-6>.grid-stack-item[gs-w="4"]{width:66.667%}.gs-6>.grid-stack-item[gs-x="4"]{left:66.667%}.gs-6>.grid-stack-item[gs-w="5"]{width:83.333%}.gs-6>.grid-stack-item[gs-x="5"]{left:83.333%}.gs-6>.grid-stack-item[gs-w="6"]{width:100%}.gs-7>.grid-stack-item{width:14.286%}.gs-7>.grid-stack-item[gs-x="1"]{left:14.286%}.gs-7>.grid-stack-item[gs-w="2"]{width:28.571%}.gs-7>.grid-stack-item[gs-x="2"]{left:28.571%}.gs-7>.grid-stack-item[gs-w="3"]{width:42.857%}.gs-7>.grid-stack-item[gs-x="3"]{left:42.857%}.gs-7>.grid-stack-item[gs-w="4"]{width:57.143%}.gs-7>.grid-stack-item[gs-x="4"]{left:57.143%}.gs-7>.grid-stack-item[gs-w="5"]{width:71.429%}.gs-7>.grid-stack-item[gs-x="5"]{left:71.429%}.gs-7>.grid-stack-item[gs-w="6"]{width:85.714%}.gs-7>.grid-stack-item[gs-x="6"]{left:85.714%}.gs-7>.grid-stack-item[gs-w="7"]{width:100%}.gs-8>.grid-stack-item{width:12.5%}.gs-8>.grid-stack-item[gs-x="1"]{left:12.5%}.gs-8>.grid-stack-item[gs-w="2"]{width:25%}.gs-8>.grid-stack-item[gs-x="2"]{left:25%}.gs-8>.grid-stack-item[gs-w="3"]{width:37.5%}.gs-8>.grid-stack-item[gs-x="3"]{left:37.5%}.gs-8>.grid-stack-item[gs-w="4"]{width:50%}.gs-8>.grid-stack-item[gs-x="4"]{left:50%}.gs-8>.grid-stack-item[gs-w="5"]{width:62.5%}.gs-8>.grid-stack-item[gs-x="5"]{left:62.5%}.gs-8>.grid-stack-item[gs-w="6"]{width:75%}.gs-8>.grid-stack-item[gs-x="6"]{left:75%}.gs-8>.grid-stack-item[gs-w="7"]{width:87.5%}.gs-8>.grid-stack-item[gs-x="7"]{left:87.5%}.gs-8>.grid-stack-item[gs-w="8"]{width:100%}.gs-9>.grid-stack-item{width:11.111%}.gs-9>.grid-stack-item[gs-x="1"]{left:11.111%}.gs-9>.grid-stack-item[gs-w="2"]{width:22.222%}.gs-9>.grid-stack-item[gs-x="2"]{left:22.222%}.gs-9>.grid-stack-item[gs-w="3"]{width:33.333%}.gs-9>.grid-stack-item[gs-x="3"]{left:33.333%}.gs-9>.grid-stack-item[gs-w="4"]{width:44.444%}.gs-9>.grid-stack-item[gs-x="4"]{left:44.444%}.gs-9>.grid-stack-item[gs-w="5"]{width:55.556%}.gs-9>.grid-stack-item[gs-x="5"]{left:55.556%}.gs-9>.grid-stack-item[gs-w="6"]{width:66.667%}.gs-9>.grid-stack-item[gs-x="6"]{left:66.667%}.gs-9>.grid-stack-item[gs-w="7"]{width:77.778%}.gs-9>.grid-stack-item[gs-x="7"]{left:77.778%}.gs-9>.grid-stack-item[gs-w="8"]{width:88.889%}.gs-9>.grid-stack-item[gs-x="8"]{left:88.889%}.gs-9>.grid-stack-item[gs-w="9"]{width:100%}.gs-10>.grid-stack-item{width:10%}.gs-10>.grid-stack-item[gs-x="1"]{left:10%}.gs-10>.grid-stack-item[gs-w="2"]{width:20%}.gs-10>.grid-stack-item[gs-x="2"]{left:20%}.gs-10>.grid-stack-item[gs-w="3"]{width:30%}.gs-10>.grid-stack-item[gs-x="3"]{left:30%}.gs-10>.grid-stack-item[gs-w="4"]{width:40%}.gs-10>.grid-stack-item[gs-x="4"]{left:40%}.gs-10>.grid-stack-item[gs-w="5"]{width:50%}.gs-10>.grid-stack-item[gs-x="5"]{left:50%}.gs-10>.grid-stack-item[gs-w="6"]{width:60%}.gs-10>.grid-stack-item[gs-x="6"]{left:60%}.gs-10>.grid-stack-item[gs-w="7"]{width:70%}.gs-10>.grid-stack-item[gs-x="7"]{left:70%}.gs-10>.grid-stack-item[gs-w="8"]{width:80%}.gs-10>.grid-stack-item[gs-x="8"]{left:80%}.gs-10>.grid-stack-item[gs-w="9"]{width:90%}.gs-10>.grid-stack-item[gs-x="9"]{left:90%}.gs-10>.grid-stack-item[gs-w="10"]{width:100%}.gs-11>.grid-stack-item{width:9.091%}.gs-11>.grid-stack-item[gs-x="1"]{left:9.091%}.gs-11>.grid-stack-item[gs-w="2"]{width:18.182%}.gs-11>.grid-stack-item[gs-x="2"]{left:18.182%}.gs-11>.grid-stack-item[gs-w="3"]{width:27.273%}.gs-11>.grid-stack-item[gs-x="3"]{left:27.273%}.gs-11>.grid-stack-item[gs-w="4"]{width:36.364%}.gs-11>.grid-stack-item[gs-x="4"]{left:36.364%}.gs-11>.grid-stack-item[gs-w="5"]{width:45.455%}.gs-11>.grid-stack-item[gs-x="5"]{left:45.455%}.gs-11>.grid-stack-item[gs-w="6"]{width:54.545%}.gs-11>.grid-stack-item[gs-x="6"]{left:54.545%}.gs-11>.grid-stack-item[gs-w="7"]{width:63.636%}.gs-11>.grid-stack-item[gs-x="7"]{left:63.636%}.gs-11>.grid-stack-item[gs-w="8"]{width:72.727%}.gs-11>.grid-stack-item[gs-x="8"]{left:72.727%}.gs-11>.grid-stack-item[gs-w="9"]{width:81.818%}.gs-11>.grid-stack-item[gs-x="9"]{left:81.818%}.gs-11>.grid-stack-item[gs-w="10"]{width:90.909%}.gs-11>.grid-stack-item[gs-x="10"]{left:90.909%}.gs-11>.grid-stack-item[gs-w="11"]{width:100%}.grid-stack[data-v-a68d6821]{margin:0 -10px}[data-v-a68d6821] .tile-header{cursor:move}[data-v-a68d6821] .ui-resizable-se{background-image:url("data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cmask%20id='mask0_4483_27853'%20style='mask-type:alpha'%20maskUnits='userSpaceOnUse'%20x='0'%20y='0'%20width='24'%20height='24'%3e%3crect%20width='24'%20height='24'%20transform='matrix(-1%200%200%201%2024%200)'%20fill='%23596177'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_4483_27853)'%3e%3cpath%20d='M19%2021V10H17V19H8V21H19ZM14%2016V5H12V14H3V16H14Z'%20fill='%23596177'/%3e%3c/g%3e%3c/svg%3e");background-size:16px 16px;cursor:se-resize;margin:1px;transform:rotate(0)}[data-v-a68d6821] .ui-resizable-sw{background-image:url("data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cmask%20id='mask0_4483_27853'%20style='mask-type:alpha'%20maskUnits='userSpaceOnUse'%20x='0'%20y='0'%20width='24'%20height='24'%3e%3crect%20width='24'%20height='24'%20transform='matrix(-1%200%200%201%2024%200)'%20fill='%23596177'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_4483_27853)'%3e%3cpath%20d='M19%2021V10H17V19H8V21H19ZM14%2016V5H12V14H3V16H14Z'%20fill='%23596177'/%3e%3c/g%3e%3c/svg%3e");background-size:16px 16px;cursor:se-resize;margin:1px;transform:rotate(90deg)}.kong-ui-public-dashboard-renderer .tile-container[data-v-02eceaef]{background:transparent;background:var(--kui-color-background-transparent, transparent);border:1px solid #e0e4ea;border:var(--kui-border-width-10, 1px) solid var(--kui-color-border, #e0e4ea);border-radius:4px;border-radius:var(--kui-border-radius-20, 4px);height:100%}.kong-ui-public-dashboard-renderer .tile-container.slottable-tile[data-v-02eceaef]{padding:16px;padding:var(--kui-space-60, 16px)}
@@ -3,13 +3,13 @@ import 'gridstack/dist/gridstack.min.css';
3
3
  import 'gridstack/dist/gridstack-extra.min.css';
4
4
  export type DraggableGridLayoutExpose<T> = {
5
5
  removeWidget: (id: number | string) => void;
6
- tiles: GridTile<T>[];
6
+ tiles: Array<GridTile<T>>;
7
7
  };
8
8
  declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
9
9
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
10
10
  readonly "onUpdate-tiles"?: ((tiles: GridTile<T>[]) => any) | undefined;
11
11
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate-tiles"> & {
12
- tiles: GridTile<T>[];
12
+ tiles: Array<GridTile<T>>;
13
13
  tileHeight?: number;
14
14
  }> & import("vue").PublicProps;
15
15
  expose(exposed: import("vue").ShallowUnwrapRef<{
@@ -21,7 +21,7 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
21
21
  tile: GridTile<T>;
22
22
  }): any;
23
23
  };
24
- emit: (e: "update-tiles", tiles: GridTile<T>[]) => void;
24
+ emit: (e: "update-tiles", tiles: Array<GridTile<T>>) => void;
25
25
  }>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
26
26
  [key: string]: any;
27
27
  }> & {
@@ -1 +1 @@
1
- {"version":3,"file":"DraggableGridLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/DraggableGridLayout.vue"],"names":[],"mappings":"AAkLA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAEzC,OAAO,kCAAkC,CAAA;AACzC,OAAO,wCAAwC,CAAA;AAE/C,MAAM,MAAM,yBAAyB,CAAC,CAAC,IAAI;IACzC,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI,CAAA;IAC3C,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAA;CACrB,CAAA;yBAGgB,CAAC,eACJ,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,cAClD,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,iBAC5F,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC;WA4LxD,mBAAmB,CAAC;;;eAxLrB,QAAQ,CAAC,CAAC,CAAC,EAAE;qBACP,MAAM;KAuLkE,CAAC,4BAA2B;oBAChG,OAAO,KAAK,EAAE,gBAAgB;2BAhHvB,MAAM,GAAG,MAAM;MAgH8B,GAAG,IAAI;WACpE,GAAG;;;;YA7Ba,GAAG;;cAtJvB,cAAc,SAAS,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAG,IAAI;;;;YAwLL,OAAO,CAAC,OAAO,WAAW,CAAC;;AAtMvE,wBAsM4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
1
+ {"version":3,"file":"DraggableGridLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/DraggableGridLayout.vue"],"names":[],"mappings":"AAkLA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAEzC,OAAO,kCAAkC,CAAA;AACzC,OAAO,wCAAwC,CAAA;AAE/C,MAAM,MAAM,yBAAyB,CAAC,CAAC,IAAI;IACzC,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI,CAAA;IAC3C,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;CAC1B,CAAA;yBAGgB,CAAC,eACJ,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,cAClD,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,iBAC5F,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC;WA4LxD,mBAAmB,CAAC;;;eAxLrB,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;qBACZ,MAAM;KAuLkE,CAAC,4BAA2B;oBAChG,OAAO,KAAK,EAAE,gBAAgB;2BAhHvB,MAAM,GAAG,MAAM;MAgH8B,GAAG,IAAI;WACpE,GAAG;;;;YA7Ba,GAAG;;cAtJvB,cAAc,SAAS,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAG,IAAI;;;;YAwLV,OAAO,CAAC,OAAO,WAAW,CAAC;;AAtMvE,wBAsM4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
@@ -1,3 +1,3 @@
1
1
  import type { GridTile } from '../../types';
2
- export declare const calculateRowDefs: (tileHeight: number, tiles: GridTile<unknown>[]) => string[];
2
+ export declare const calculateRowDefs: (tileHeight: number, tiles: Array<GridTile<unknown>>) => string[];
3
3
  //# sourceMappingURL=grid-utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"grid-utils.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/grid-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAE3C,eAAO,MAAM,gBAAgB,eAAgB,MAAM,SAAS,QAAQ,CAAC,OAAO,CAAC,EAAE,KAAG,MAAM,EA4BvF,CAAA"}
1
+ {"version":3,"file":"grid-utils.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/grid-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAE3C,eAAO,MAAM,gBAAgB,eAAgB,MAAM,SAAS,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,KAAG,MAAM,EA4B5F,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kong-ui-public/dashboard-renderer",
3
- "version": "5.7.6",
3
+ "version": "5.7.7",
4
4
  "type": "module",
5
5
  "main": "./dist/dashboard-renderer.umd.js",
6
6
  "module": "./dist/dashboard-renderer.es.js",
@@ -28,12 +28,12 @@
28
28
  "pinia": ">= 2.1.7 < 3",
29
29
  "swrv": "^1.0.4",
30
30
  "vue": "^3.5.13",
31
- "@kong-ui-public/analytics-chart": "^9.1.1",
32
- "@kong-ui-public/analytics-config-store": "^0.9.17",
33
- "@kong-ui-public/analytics-metric-provider": "^8.9.6",
34
- "@kong-ui-public/analytics-utilities": "^9.7.0",
35
- "@kong-ui-public/entities-shared": "^3.25.1",
36
- "@kong-ui-public/i18n": "^2.3.0",
31
+ "@kong-ui-public/analytics-metric-provider": "^8.9.7",
32
+ "@kong-ui-public/analytics-utilities": "^9.7.1",
33
+ "@kong-ui-public/analytics-chart": "^9.1.2",
34
+ "@kong-ui-public/analytics-config-store": "^0.9.18",
35
+ "@kong-ui-public/entities-shared": "^3.25.2",
36
+ "@kong-ui-public/i18n": "^2.3.1",
37
37
  "@kong-ui-public/sandbox-layout": "^2.1.75"
38
38
  },
39
39
  "repository": {
@@ -57,11 +57,11 @@
57
57
  "@kong/kongponents": "^9.34.2",
58
58
  "swrv": "^1.0.4",
59
59
  "vue": ">= 3.3.13 < 4",
60
- "@kong-ui-public/analytics-chart": "^9.1.1",
61
- "@kong-ui-public/analytics-config-store": "^0.9.17",
62
- "@kong-ui-public/analytics-utilities": "^9.7.0",
63
- "@kong-ui-public/analytics-metric-provider": "^8.9.6",
64
- "@kong-ui-public/i18n": "^2.3.0"
60
+ "@kong-ui-public/analytics-config-store": "^0.9.18",
61
+ "@kong-ui-public/analytics-metric-provider": "^8.9.7",
62
+ "@kong-ui-public/analytics-chart": "^9.1.2",
63
+ "@kong-ui-public/analytics-utilities": "^9.7.1",
64
+ "@kong-ui-public/i18n": "^2.3.1"
65
65
  },
66
66
  "dependencies": {
67
67
  "gridstack": "^11.3.0",