pennsieve-dashboard 0.1.1 → 0.1.2
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.
|
@@ -305,7 +305,7 @@ const nt = Xs("globalVars", () => {
|
|
|
305
305
|
for (const [i, s] of e)
|
|
306
306
|
t[i] = s;
|
|
307
307
|
return t;
|
|
308
|
-
}, ur = /* @__PURE__ */ Ne(hr, [["__scopeId", "data-v-
|
|
308
|
+
}, ur = /* @__PURE__ */ Ne(hr, [["__scopeId", "data-v-769ea864"]]), cr = { key: 0 }, dr = /* @__PURE__ */ ye({
|
|
309
309
|
inheritAttrs: !1,
|
|
310
310
|
__name: "TextWidget",
|
|
311
311
|
props: {
|
|
@@ -401,7 +401,7 @@ const nt = Xs("globalVars", () => {
|
|
|
401
401
|
], 64);
|
|
402
402
|
};
|
|
403
403
|
}
|
|
404
|
-
}), io = /* @__PURE__ */ Ne(dr, [["__scopeId", "data-v-
|
|
404
|
+
}), io = /* @__PURE__ */ Ne(dr, [["__scopeId", "data-v-4743c11f"]]);
|
|
405
405
|
function ni() {
|
|
406
406
|
return { async: !1, breaks: !1, extensions: null, gfm: !0, hooks: null, pedantic: !1, renderer: null, silent: !1, tokenizer: null, walkTokens: null };
|
|
407
407
|
}
|
|
@@ -4657,7 +4657,7 @@ const Rn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Sn = { class:
|
|
|
4657
4657
|
});
|
|
4658
4658
|
};
|
|
4659
4659
|
}
|
|
4660
|
-
}), zn = /* @__PURE__ */ Ne(Ln, [["__scopeId", "data-v-
|
|
4660
|
+
}), zn = /* @__PURE__ */ Ne(Ln, [["__scopeId", "data-v-f706b94f"]]), Nn = {
|
|
4661
4661
|
key: 0,
|
|
4662
4662
|
class: "content-header dash-header-visible stick-to-top tw-flex tw-flex-row tw-items-center tw-justify-between tw-h-10"
|
|
4663
4663
|
}, Mn = { class: "editing-div" }, In = { class: "tw-m-4 tw-leading-none tw-pl-1 widget-name" }, Hn = { class: "header-slot-icon" }, On = {
|
|
@@ -4734,7 +4734,7 @@ const Rn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Sn = { class:
|
|
|
4734
4734
|
]));
|
|
4735
4735
|
};
|
|
4736
4736
|
}
|
|
4737
|
-
}, Bn = /* @__PURE__ */ Ne($n, [["__scopeId", "data-v-
|
|
4737
|
+
}, Bn = /* @__PURE__ */ Ne($n, [["__scopeId", "data-v-4f4aa869"]]), Un = { class: "tw-flex" }, Fn = {
|
|
4738
4738
|
__name: "WidgetWrapper",
|
|
4739
4739
|
props: {
|
|
4740
4740
|
widgetID: {
|
|
@@ -5061,7 +5061,7 @@ const Rn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Sn = { class:
|
|
|
5061
5061
|
]);
|
|
5062
5062
|
};
|
|
5063
5063
|
}
|
|
5064
|
-
}), ro = /* @__PURE__ */ Ne(Zn, [["__scopeId", "data-v-
|
|
5064
|
+
}), ro = /* @__PURE__ */ Ne(Zn, [["__scopeId", "data-v-e3de89f1"]]);
|
|
5065
5065
|
export {
|
|
5066
5066
|
so as MarkdownWidget,
|
|
5067
5067
|
ro as PennsieveDashboard,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(V,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("vue"),require("pinia"),require("element-plus")):typeof define=="function"&&define.amd?define(["exports","vue","pinia","element-plus"],a):(V=typeof globalThis<"u"?globalThis:V||self,a(V["pennsieve-dashboard"]={},V.Vue,V.Pinia,V.ElementPlus))})(this,function(V,a,oe,mt){"use strict";var cn=Object.defineProperty;var dn=(V,a,oe)=>a in V?cn(V,a,{enumerable:!0,configurable:!0,writable:!0,value:oe}):V[a]=oe;var B=(V,a,oe)=>dn(V,typeof a!="symbol"?a+"":a,oe);/*! Element Plus Icons Vue v2.3.2 */var Ht;var ss=a.defineComponent({name:"CircleCloseFilled",__name:"circle-close-filled",setup(o){return(e,t)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"})]))}}),rs=ss,ns=a.defineComponent({name:"Close",__name:"close",setup(o){return(e,t)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),os=ns,ls=a.defineComponent({name:"Edit",__name:"edit",setup(o){return(e,t)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M832 512a32 32 0 1 1 64 0v352a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h352a32 32 0 0 1 0 64H192v640h640z"}),a.createElementVNode("path",{fill:"currentColor",d:"m469.952 554.24 52.8-7.552L847.104 222.4a32 32 0 1 0-45.248-45.248L477.44 501.44l-7.552 52.8zm422.4-422.4a96 96 0 0 1 0 135.808l-331.84 331.84a32 32 0 0 1-18.112 9.088L436.8 623.68a32 32 0 0 1-36.224-36.224l15.104-105.6a32 32 0 0 1 9.024-18.112l331.904-331.84a96 96 0 0 1 135.744 0z"})]))}}),Qt=ls,as=a.defineComponent({name:"Lock",__name:"lock",setup(o){return(e,t)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M224 448a32 32 0 0 0-32 32v384a32 32 0 0 0 32 32h576a32 32 0 0 0 32-32V480a32 32 0 0 0-32-32zm0-64h576a96 96 0 0 1 96 96v384a96 96 0 0 1-96 96H224a96 96 0 0 1-96-96V480a96 96 0 0 1 96-96"}),a.createElementVNode("path",{fill:"currentColor",d:"M512 544a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V576a32 32 0 0 1 32-32m192-160v-64a192 192 0 1 0-384 0v64zM512 64a256 256 0 0 1 256 256v128H256V320A256 256 0 0 1 512 64"})]))}}),hs=as,cs=a.defineComponent({name:"Unlock",__name:"unlock",setup(o){return(e,t)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M224 448a32 32 0 0 0-32 32v384a32 32 0 0 0 32 32h576a32 32 0 0 0 32-32V480a32 32 0 0 0-32-32zm0-64h576a96 96 0 0 1 96 96v384a96 96 0 0 1-96 96H224a96 96 0 0 1-96-96V480a96 96 0 0 1 96-96"}),a.createElementVNode("path",{fill:"currentColor",d:"M512 544a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V576a32 32 0 0 1 32-32m178.304-295.296A192.064 192.064 0 0 0 320 320v64h352l96 38.4V448H256V320a256 256 0 0 1 493.76-95.104z"})]))}}),ds=cs;const Ne=oe.defineStore("globalVars",()=>{const o=a.ref([]),e=a.ref({}),t="dashboard-globalVarsStore",i=a.ref(null),s=a.ref([]),r=a.ref([]),l=a.ref({}),n=a.reactive({});function d(S,v){n[S]=v}function h(S={}){for(const v of Object.keys(n))delete n[v];Object.assign(n,S)}const c=S=>{delete n[S],O()};function f(){for(const S of Object.keys(n))delete n[S]}function p(){return JSON.parse(JSON.stringify(n))}const _=S=>r.value.find(v=>v.id===S),x=(S,v)=>{s.value.push({name:S,value:v})},z=()=>{s.value=[]},H=S=>{const v=N(S);l.value=v},D=()=>l.value;function N(S){const v={};if(!S||typeof S!="object")return v;for(const[R,L]of Object.entries(S))if(L&&typeof L=="object"&&!(a.isRef(L)||a.isReactive(L))){const Y=Object.getPrototypeOf(L)===Object.prototype;v[R]=Y?{...L}:a.markRaw(L)}else v[R]=L;return v}const C=S=>{const v=r.value.find(R=>R.id===S);v&&(v.Props=v.Props||{},v.Props.locked=!v.Props.locked)},y=S=>S.map(v=>{const R=e.value[v.componentKey];return R?{...v,component:R}:null}).filter(v=>!!v);function w(){var v,R;return(((R=(v=i.value)==null?void 0:v.save)==null?void 0:R.call(v))??[]).map(L=>{const Y=r.value.find(Pt=>Pt.id===L.id);if(!Y||!Y.componentKey)return console.warn(`save: missing item or componentKey for id=${L==null?void 0:L.id}`),null;const{x:_e,y:ye,w:Ee,h:Ot}=L;return{id:Y.id,componentKey:Y.componentKey,componentName:Y.componentName,hideHeader:Y.hideHeader,Props:Y.Props??{},x:_e,y:ye,w:Ee,h:Ot}}).filter(L=>!!L)}const O=()=>{var v;const S={version:1,items:w(),filters:p()};((v=S.items)==null?void 0:v.length)<1||localStorage.setItem(t,JSON.stringify(S))},P=()=>{const S=localStorage.getItem(t);if(!S){r.value=o.value,h({});return}try{const v=JSON.parse(S);r.value=Array.isArray(v.items)?y(v.items):o.value,h(v.filters??{})}catch(v){console.error("Failed to parse globalVarsStore:",v),r.value=o.value,h({})}};return a.watch(n,()=>O(),{deep:!0}),{DASHBOARD_ITEMS:r,DefaultLayout:o,ComponentRegistry:e,optionsData:s,gridInstance:i,Services:l,Filters:n,setFilter:d,clearFilter:c,clearAllFilters:f,resetFilters:h,getDashItem:_,toggleWidgetLock:C,addOptionsDataItems:x,clearOptionsDataItems:z,saveToLocalStorage:O,loadFromLocalStorage:P,setOptionServices:H,getServices:D}}),us={class:"widget-settings-container"},ps={class:"widget-setting"},fs={class:"dialog-footer"},gs=a.defineComponent({__name:"TextWidgetSettings",props:{showDialog:{type:Boolean},reactiveSourceValue:{},manualEntryValue:{},hideHeaderValue:{type:Boolean}},emits:["close-dialog","update-text-var"],setup(o,{emit:e}){const t=Ne(),{optionsData:i}=oe.storeToRefs(t),s=e,r=o,l=a.computed({get:()=>r.showDialog,set:f=>{f||s("close-dialog")}}),n=a.ref(r.reactiveSourceValue??""),d=a.ref(r.manualEntryValue??""),h=a.ref(!!r.hideHeaderValue);a.watch(()=>r.reactiveSourceValue,f=>{n.value=f??""}),a.watch(()=>r.manualEntryValue,f=>{d.value=f??""},{immediate:!0}),a.watch(()=>r.hideHeaderValue,f=>{h.value=!!f});function c(){var x;const f=(n.value||"").trim(),p=f!=="",_=p?null:((x=d.value)==null?void 0:x.trim())||"";s("update-text-var",{reactiveSource:p?f:null,manualEdit:_,hideHeader:h.value}),l.value=!1}return(f,p)=>{const _=a.resolveComponent("el-option"),x=a.resolveComponent("el-select"),z=a.resolveComponent("el-input"),H=a.resolveComponent("el-checkbox"),D=a.resolveComponent("el-button"),N=a.resolveComponent("el-dialog");return a.openBlock(),a.createBlock(N,{class:"full-dialog-dashboard",modelValue:l.value,"onUpdate:modelValue":p[4]||(p[4]=C=>l.value=C),title:"Text Widget Settings","append-to-body":!0},{footer:a.withCtx(()=>[a.createElementVNode("div",fs,[a.createVNode(D,{class:"secondary",onClick:p[3]||(p[3]=C=>l.value=!1)},{default:a.withCtx(()=>[...p[8]||(p[8]=[a.createTextVNode("Cancel",-1)])]),_:1}),a.createVNode(D,{onClick:c},{default:a.withCtx(()=>[...p[9]||(p[9]=[a.createTextVNode("Save",-1)])]),_:1})])]),default:a.withCtx(()=>[a.createElementVNode("div",us,[a.createElementVNode("div",ps,[p[5]||(p[5]=a.createElementVNode("h4",null,"Select This Widget's Value",-1)),p[6]||(p[6]=a.createElementVNode("h5",null,"Select From Variables",-1)),a.createVNode(x,{modelValue:n.value,"onUpdate:modelValue":p[0]||(p[0]=C=>n.value=C),class:"text-settings-height"},{default:a.withCtx(()=>[(a.openBlock(),a.createBlock(_,{value:"",key:"__manual__",label:"Manual entry"})),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(i),C=>(a.openBlock(),a.createBlock(_,{key:C.name,label:C.name,value:C.name},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),p[7]||(p[7]=a.createElementVNode("h5",null,"Manual Entry",-1)),a.createVNode(z,{modelValue:d.value,"onUpdate:modelValue":p[1]||(p[1]=C=>d.value=C),class:"text-settings-height"},null,8,["modelValue"]),a.createVNode(H,{modelValue:h.value,"onUpdate:modelValue":p[2]||(p[2]=C=>h.value=C),label:"Hide Header"},null,8,["modelValue"])])])]),_:1},8,["modelValue"])}}}),we=(o,e)=>{const t=o.__vccOpts||o;for(const[i,s]of e)t[i]=s;return t},ms=we(gs,[["__scopeId","data-v-cd8e85a7"]]),_s={key:0},ys=we(a.defineComponent({inheritAttrs:!1,__name:"TextWidget",props:{displayText:{},bindedKey:{},widgetID:{},hideHeader:{type:Boolean}},setup(o){const e=Ne(),t=o;a.inject("dashboard:globalVars",null);const i=a.ref(t.displayText??"");a.watch(()=>t.displayText,D=>{i.value=D??""},{immediate:!0});const s=a.computed(()=>!!(t.bindedKey&&t.bindedKey.trim()!=="")),r=a.computed(()=>{var y;const D=(y=t.bindedKey)==null?void 0:y.trim();if(!D)return"—";const N=e.optionsData.find(w=>(w==null?void 0:w.name)===D),C=N==null?void 0:N.value;return Array.isArray(C)?C.join(", "):C&&typeof C=="object"?JSON.stringify(C):C??"—"}),l=a.ref("Text Widget"),n=a.shallowRef([{comp:Qt,event:_,tooltip:"open Text settings"}]),d=a.ref(!1),h=a.ref(null);function c(){var D,N;d.value=!0,(N=(D=h.value)==null?void 0:D.focus)==null||N.call(D)}function f(){d.value=!1}const p=a.ref(!1);function _(){p.value=!0}function x(){p.value=!1,e.saveToLocalStorage()}function z({manualEdit:D,reactiveSource:N,hideHeader:C}){const y=e.getDashItem(t.widgetID);y&&(y.hideHeader=C,N&&N.trim()!==""?(y.Props=y.Props||{},y.Props.bindedKey=N,y.Props.displayText=null,y.componentName=H(N)):(y.Props=y.Props||{},y.Props.bindedKey=null,y.Props.displayText=D??"",y.componentName=D??"Text"),e.saveToLocalStorage())}function H(D){return D?D.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/^./,N=>N.toUpperCase()):""}return(D,N)=>{const C=a.resolveComponent("el-input"),y=a.resolveDirective("click-out");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.renderSlot(D.$slots,"default",{widgetName:l.value,childIcons:n.value},void 0,!0),a.createElementVNode("div",a.mergeProps({class:"text-widget-wrap"},D.$attrs),[s.value?(a.openBlock(),a.createElementBlock("div",_s,[a.createElementVNode("h2",null,a.toDisplayString(r.value),1)])):a.withDirectives((a.openBlock(),a.createElementBlock("div",{key:1,onKeyup:a.withKeys(f,["enter"]),class:"tw-flex"},[a.withDirectives(a.createElementVNode("div",null,[a.createVNode(C,{ref_key:"textUserInput",ref:h,modelValue:i.value,"onUpdate:modelValue":N[0]||(N[0]=w=>i.value=w),onFocus:N[1]||(N[1]=w=>{var O,P;return(P=(O=w.target)==null?void 0:O.select)==null?void 0:P.call(O)})},null,8,["modelValue"])],512),[[a.vShow,d.value]]),a.withDirectives(a.createElementVNode("div",{onClick:N[2]||(N[2]=w=>c()),class:"tw-w-full tw-h-full"},[a.createElementVNode("h2",null,a.toDisplayString(i.value),1)],512),[[a.vShow,!d.value]])],32)),[[y,f]])],16),a.createVNode(ms,{"show-dialog":p.value,"reactive-source-value":t.bindedKey||"","manual-entry-value":i.value,"hide-header-value":t.hideHeader||!1,onCloseDialog:x,onUpdateTextVar:z},null,8,["show-dialog","reactive-source-value","manual-entry-value","hide-header-value"])],64)}}}),[["__scopeId","data-v-eaf38a2d"]]);function _t(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var be=_t();function Jt(o){be=o}var Le={exec:()=>null};function M(o,e=""){let t=typeof o=="string"?o:o.source,i={replace:(s,r)=>{let l=typeof r=="string"?r:r.source;return l=l.replace(Z.caret,"$1"),t=t.replace(s,l),i},getRegex:()=>new RegExp(t,e)};return i}var Z={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:o=>new RegExp(`^( {0,3}${o})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:o=>new RegExp(`^ {0,${Math.min(3,o-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:o=>new RegExp(`^ {0,${Math.min(3,o-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:o=>new RegExp(`^ {0,${Math.min(3,o-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:o=>new RegExp(`^ {0,${Math.min(3,o-1)}}#`),htmlBeginRegex:o=>new RegExp(`^ {0,${Math.min(3,o-1)}}<(?:[a-z].*>|!--)`,"i")},ws=/^(?:[ \t]*(?:\n|$))+/,bs=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,xs=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ze=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ks=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,yt=/(?:[*+-]|\d{1,9}[.)])/,ei=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ti=M(ei).replace(/bull/g,yt).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Es=M(ei).replace(/bull/g,yt).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),wt=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,vs=/^[^\n]+/,bt=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Ts=M(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",bt).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Rs=M(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,yt).getRegex(),je="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",xt=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Cs=M("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",xt).replace("tag",je).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ii=M(wt).replace("hr",ze).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",je).getRegex(),Ss=M(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ii).getRegex(),kt={blockquote:Ss,code:bs,def:Ts,fences:xs,heading:ks,hr:ze,html:Cs,lheading:ti,list:Rs,newline:ws,paragraph:ii,table:Le,text:vs},si=M("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ze).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",je).getRegex(),As={...kt,lheading:Es,table:si,paragraph:M(wt).replace("hr",ze).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",si).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",je).getRegex()},Ds={...kt,html:M(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",xt).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Le,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:M(wt).replace("hr",ze).replace("heading",` *#{1,6} *[^
|
|
1
|
+
(function(V,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("vue"),require("pinia"),require("element-plus")):typeof define=="function"&&define.amd?define(["exports","vue","pinia","element-plus"],a):(V=typeof globalThis<"u"?globalThis:V||self,a(V["pennsieve-dashboard"]={},V.Vue,V.Pinia,V.ElementPlus))})(this,function(V,a,oe,mt){"use strict";var cn=Object.defineProperty;var dn=(V,a,oe)=>a in V?cn(V,a,{enumerable:!0,configurable:!0,writable:!0,value:oe}):V[a]=oe;var B=(V,a,oe)=>dn(V,typeof a!="symbol"?a+"":a,oe);/*! Element Plus Icons Vue v2.3.2 */var Ht;var ss=a.defineComponent({name:"CircleCloseFilled",__name:"circle-close-filled",setup(o){return(e,t)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"})]))}}),rs=ss,ns=a.defineComponent({name:"Close",__name:"close",setup(o){return(e,t)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),os=ns,ls=a.defineComponent({name:"Edit",__name:"edit",setup(o){return(e,t)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M832 512a32 32 0 1 1 64 0v352a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h352a32 32 0 0 1 0 64H192v640h640z"}),a.createElementVNode("path",{fill:"currentColor",d:"m469.952 554.24 52.8-7.552L847.104 222.4a32 32 0 1 0-45.248-45.248L477.44 501.44l-7.552 52.8zm422.4-422.4a96 96 0 0 1 0 135.808l-331.84 331.84a32 32 0 0 1-18.112 9.088L436.8 623.68a32 32 0 0 1-36.224-36.224l15.104-105.6a32 32 0 0 1 9.024-18.112l331.904-331.84a96 96 0 0 1 135.744 0z"})]))}}),Qt=ls,as=a.defineComponent({name:"Lock",__name:"lock",setup(o){return(e,t)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M224 448a32 32 0 0 0-32 32v384a32 32 0 0 0 32 32h576a32 32 0 0 0 32-32V480a32 32 0 0 0-32-32zm0-64h576a96 96 0 0 1 96 96v384a96 96 0 0 1-96 96H224a96 96 0 0 1-96-96V480a96 96 0 0 1 96-96"}),a.createElementVNode("path",{fill:"currentColor",d:"M512 544a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V576a32 32 0 0 1 32-32m192-160v-64a192 192 0 1 0-384 0v64zM512 64a256 256 0 0 1 256 256v128H256V320A256 256 0 0 1 512 64"})]))}}),hs=as,cs=a.defineComponent({name:"Unlock",__name:"unlock",setup(o){return(e,t)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M224 448a32 32 0 0 0-32 32v384a32 32 0 0 0 32 32h576a32 32 0 0 0 32-32V480a32 32 0 0 0-32-32zm0-64h576a96 96 0 0 1 96 96v384a96 96 0 0 1-96 96H224a96 96 0 0 1-96-96V480a96 96 0 0 1 96-96"}),a.createElementVNode("path",{fill:"currentColor",d:"M512 544a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V576a32 32 0 0 1 32-32m178.304-295.296A192.064 192.064 0 0 0 320 320v64h352l96 38.4V448H256V320a256 256 0 0 1 493.76-95.104z"})]))}}),ds=cs;const Ne=oe.defineStore("globalVars",()=>{const o=a.ref([]),e=a.ref({}),t="dashboard-globalVarsStore",i=a.ref(null),s=a.ref([]),r=a.ref([]),l=a.ref({}),n=a.reactive({});function d(S,v){n[S]=v}function h(S={}){for(const v of Object.keys(n))delete n[v];Object.assign(n,S)}const c=S=>{delete n[S],O()};function f(){for(const S of Object.keys(n))delete n[S]}function p(){return JSON.parse(JSON.stringify(n))}const _=S=>r.value.find(v=>v.id===S),x=(S,v)=>{s.value.push({name:S,value:v})},z=()=>{s.value=[]},H=S=>{const v=N(S);l.value=v},D=()=>l.value;function N(S){const v={};if(!S||typeof S!="object")return v;for(const[R,L]of Object.entries(S))if(L&&typeof L=="object"&&!(a.isRef(L)||a.isReactive(L))){const Y=Object.getPrototypeOf(L)===Object.prototype;v[R]=Y?{...L}:a.markRaw(L)}else v[R]=L;return v}const C=S=>{const v=r.value.find(R=>R.id===S);v&&(v.Props=v.Props||{},v.Props.locked=!v.Props.locked)},y=S=>S.map(v=>{const R=e.value[v.componentKey];return R?{...v,component:R}:null}).filter(v=>!!v);function w(){var v,R;return(((R=(v=i.value)==null?void 0:v.save)==null?void 0:R.call(v))??[]).map(L=>{const Y=r.value.find(Pt=>Pt.id===L.id);if(!Y||!Y.componentKey)return console.warn(`save: missing item or componentKey for id=${L==null?void 0:L.id}`),null;const{x:_e,y:ye,w:Ee,h:Ot}=L;return{id:Y.id,componentKey:Y.componentKey,componentName:Y.componentName,hideHeader:Y.hideHeader,Props:Y.Props??{},x:_e,y:ye,w:Ee,h:Ot}}).filter(L=>!!L)}const O=()=>{var v;const S={version:1,items:w(),filters:p()};((v=S.items)==null?void 0:v.length)<1||localStorage.setItem(t,JSON.stringify(S))},P=()=>{const S=localStorage.getItem(t);if(!S){r.value=o.value,h({});return}try{const v=JSON.parse(S);r.value=Array.isArray(v.items)?y(v.items):o.value,h(v.filters??{})}catch(v){console.error("Failed to parse globalVarsStore:",v),r.value=o.value,h({})}};return a.watch(n,()=>O(),{deep:!0}),{DASHBOARD_ITEMS:r,DefaultLayout:o,ComponentRegistry:e,optionsData:s,gridInstance:i,Services:l,Filters:n,setFilter:d,clearFilter:c,clearAllFilters:f,resetFilters:h,getDashItem:_,toggleWidgetLock:C,addOptionsDataItems:x,clearOptionsDataItems:z,saveToLocalStorage:O,loadFromLocalStorage:P,setOptionServices:H,getServices:D}}),us={class:"widget-settings-container"},ps={class:"widget-setting"},fs={class:"dialog-footer"},gs=a.defineComponent({__name:"TextWidgetSettings",props:{showDialog:{type:Boolean},reactiveSourceValue:{},manualEntryValue:{},hideHeaderValue:{type:Boolean}},emits:["close-dialog","update-text-var"],setup(o,{emit:e}){const t=Ne(),{optionsData:i}=oe.storeToRefs(t),s=e,r=o,l=a.computed({get:()=>r.showDialog,set:f=>{f||s("close-dialog")}}),n=a.ref(r.reactiveSourceValue??""),d=a.ref(r.manualEntryValue??""),h=a.ref(!!r.hideHeaderValue);a.watch(()=>r.reactiveSourceValue,f=>{n.value=f??""}),a.watch(()=>r.manualEntryValue,f=>{d.value=f??""},{immediate:!0}),a.watch(()=>r.hideHeaderValue,f=>{h.value=!!f});function c(){var x;const f=(n.value||"").trim(),p=f!=="",_=p?null:((x=d.value)==null?void 0:x.trim())||"";s("update-text-var",{reactiveSource:p?f:null,manualEdit:_,hideHeader:h.value}),l.value=!1}return(f,p)=>{const _=a.resolveComponent("el-option"),x=a.resolveComponent("el-select"),z=a.resolveComponent("el-input"),H=a.resolveComponent("el-checkbox"),D=a.resolveComponent("el-button"),N=a.resolveComponent("el-dialog");return a.openBlock(),a.createBlock(N,{class:"full-dialog-dashboard",modelValue:l.value,"onUpdate:modelValue":p[4]||(p[4]=C=>l.value=C),title:"Text Widget Settings","append-to-body":!0},{footer:a.withCtx(()=>[a.createElementVNode("div",fs,[a.createVNode(D,{class:"secondary",onClick:p[3]||(p[3]=C=>l.value=!1)},{default:a.withCtx(()=>[...p[8]||(p[8]=[a.createTextVNode("Cancel",-1)])]),_:1}),a.createVNode(D,{onClick:c},{default:a.withCtx(()=>[...p[9]||(p[9]=[a.createTextVNode("Save",-1)])]),_:1})])]),default:a.withCtx(()=>[a.createElementVNode("div",us,[a.createElementVNode("div",ps,[p[5]||(p[5]=a.createElementVNode("h4",null,"Select This Widget's Value",-1)),p[6]||(p[6]=a.createElementVNode("h5",null,"Select From Variables",-1)),a.createVNode(x,{modelValue:n.value,"onUpdate:modelValue":p[0]||(p[0]=C=>n.value=C),class:"text-settings-height"},{default:a.withCtx(()=>[(a.openBlock(),a.createBlock(_,{value:"",key:"__manual__",label:"Manual entry"})),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(i),C=>(a.openBlock(),a.createBlock(_,{key:C.name,label:C.name,value:C.name},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),p[7]||(p[7]=a.createElementVNode("h5",null,"Manual Entry",-1)),a.createVNode(z,{modelValue:d.value,"onUpdate:modelValue":p[1]||(p[1]=C=>d.value=C),class:"text-settings-height"},null,8,["modelValue"]),a.createVNode(H,{modelValue:h.value,"onUpdate:modelValue":p[2]||(p[2]=C=>h.value=C),label:"Hide Header"},null,8,["modelValue"])])])]),_:1},8,["modelValue"])}}}),we=(o,e)=>{const t=o.__vccOpts||o;for(const[i,s]of e)t[i]=s;return t},ms=we(gs,[["__scopeId","data-v-769ea864"]]),_s={key:0},ys=we(a.defineComponent({inheritAttrs:!1,__name:"TextWidget",props:{displayText:{},bindedKey:{},widgetID:{},hideHeader:{type:Boolean}},setup(o){const e=Ne(),t=o;a.inject("dashboard:globalVars",null);const i=a.ref(t.displayText??"");a.watch(()=>t.displayText,D=>{i.value=D??""},{immediate:!0});const s=a.computed(()=>!!(t.bindedKey&&t.bindedKey.trim()!=="")),r=a.computed(()=>{var y;const D=(y=t.bindedKey)==null?void 0:y.trim();if(!D)return"—";const N=e.optionsData.find(w=>(w==null?void 0:w.name)===D),C=N==null?void 0:N.value;return Array.isArray(C)?C.join(", "):C&&typeof C=="object"?JSON.stringify(C):C??"—"}),l=a.ref("Text Widget"),n=a.shallowRef([{comp:Qt,event:_,tooltip:"open Text settings"}]),d=a.ref(!1),h=a.ref(null);function c(){var D,N;d.value=!0,(N=(D=h.value)==null?void 0:D.focus)==null||N.call(D)}function f(){d.value=!1}const p=a.ref(!1);function _(){p.value=!0}function x(){p.value=!1,e.saveToLocalStorage()}function z({manualEdit:D,reactiveSource:N,hideHeader:C}){const y=e.getDashItem(t.widgetID);y&&(y.hideHeader=C,N&&N.trim()!==""?(y.Props=y.Props||{},y.Props.bindedKey=N,y.Props.displayText=null,y.componentName=H(N)):(y.Props=y.Props||{},y.Props.bindedKey=null,y.Props.displayText=D??"",y.componentName=D??"Text"),e.saveToLocalStorage())}function H(D){return D?D.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/^./,N=>N.toUpperCase()):""}return(D,N)=>{const C=a.resolveComponent("el-input"),y=a.resolveDirective("click-out");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.renderSlot(D.$slots,"default",{widgetName:l.value,childIcons:n.value},void 0,!0),a.createElementVNode("div",a.mergeProps({class:"text-widget-wrap"},D.$attrs),[s.value?(a.openBlock(),a.createElementBlock("div",_s,[a.createElementVNode("h2",null,a.toDisplayString(r.value),1)])):a.withDirectives((a.openBlock(),a.createElementBlock("div",{key:1,onKeyup:a.withKeys(f,["enter"]),class:"tw-flex"},[a.withDirectives(a.createElementVNode("div",null,[a.createVNode(C,{ref_key:"textUserInput",ref:h,modelValue:i.value,"onUpdate:modelValue":N[0]||(N[0]=w=>i.value=w),onFocus:N[1]||(N[1]=w=>{var O,P;return(P=(O=w.target)==null?void 0:O.select)==null?void 0:P.call(O)})},null,8,["modelValue"])],512),[[a.vShow,d.value]]),a.withDirectives(a.createElementVNode("div",{onClick:N[2]||(N[2]=w=>c()),class:"tw-w-full tw-h-full"},[a.createElementVNode("h2",null,a.toDisplayString(i.value),1)],512),[[a.vShow,!d.value]])],32)),[[y,f]])],16),a.createVNode(ms,{"show-dialog":p.value,"reactive-source-value":t.bindedKey||"","manual-entry-value":i.value,"hide-header-value":t.hideHeader||!1,onCloseDialog:x,onUpdateTextVar:z},null,8,["show-dialog","reactive-source-value","manual-entry-value","hide-header-value"])],64)}}}),[["__scopeId","data-v-4743c11f"]]);function _t(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var be=_t();function Jt(o){be=o}var Le={exec:()=>null};function M(o,e=""){let t=typeof o=="string"?o:o.source,i={replace:(s,r)=>{let l=typeof r=="string"?r:r.source;return l=l.replace(Z.caret,"$1"),t=t.replace(s,l),i},getRegex:()=>new RegExp(t,e)};return i}var Z={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:o=>new RegExp(`^( {0,3}${o})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:o=>new RegExp(`^ {0,${Math.min(3,o-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:o=>new RegExp(`^ {0,${Math.min(3,o-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:o=>new RegExp(`^ {0,${Math.min(3,o-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:o=>new RegExp(`^ {0,${Math.min(3,o-1)}}#`),htmlBeginRegex:o=>new RegExp(`^ {0,${Math.min(3,o-1)}}<(?:[a-z].*>|!--)`,"i")},ws=/^(?:[ \t]*(?:\n|$))+/,bs=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,xs=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ze=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ks=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,yt=/(?:[*+-]|\d{1,9}[.)])/,ei=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ti=M(ei).replace(/bull/g,yt).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Es=M(ei).replace(/bull/g,yt).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),wt=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,vs=/^[^\n]+/,bt=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Ts=M(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",bt).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Rs=M(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,yt).getRegex(),je="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",xt=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Cs=M("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",xt).replace("tag",je).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ii=M(wt).replace("hr",ze).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",je).getRegex(),Ss=M(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ii).getRegex(),kt={blockquote:Ss,code:bs,def:Ts,fences:xs,heading:ks,hr:ze,html:Cs,lheading:ti,list:Rs,newline:ws,paragraph:ii,table:Le,text:vs},si=M("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ze).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",je).getRegex(),As={...kt,lheading:Es,table:si,paragraph:M(wt).replace("hr",ze).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",si).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",je).getRegex()},Ds={...kt,html:M(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",xt).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Le,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:M(wt).replace("hr",ze).replace("heading",` *#{1,6} *[^
|
|
2
2
|
]`).replace("lheading",ti).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ns=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ls=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ri=/^( {2,}|\\)\n(?!\s*$)/,zs=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ye=/[\p{P}\p{S}]/u,Et=/[\s\p{P}\p{S}]/u,ni=/[^\s\p{P}\p{S}]/u,Ms=M(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Et).getRegex(),oi=/(?!~)[\p{P}\p{S}]/u,Is=/(?!~)[\s\p{P}\p{S}]/u,Hs=/(?:[^\s\p{P}\p{S}]|~)/u,Os=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,li=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Ps=M(li,"u").replace(/punct/g,Ye).getRegex(),Bs=M(li,"u").replace(/punct/g,oi).getRegex(),ai="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",$s=M(ai,"gu").replace(/notPunctSpace/g,ni).replace(/punctSpace/g,Et).replace(/punct/g,Ye).getRegex(),Us=M(ai,"gu").replace(/notPunctSpace/g,Hs).replace(/punctSpace/g,Is).replace(/punct/g,oi).getRegex(),Fs=M("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,ni).replace(/punctSpace/g,Et).replace(/punct/g,Ye).getRegex(),Ws=M(/\\(punct)/,"gu").replace(/punct/g,Ye).getRegex(),Gs=M(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Vs=M(xt).replace("(?:-->|$)","-->").getRegex(),qs=M("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Vs).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Xe=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,js=M(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Xe).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),hi=M(/^!?\[(label)\]\[(ref)\]/).replace("label",Xe).replace("ref",bt).getRegex(),ci=M(/^!?\[(ref)\](?:\[\])?/).replace("ref",bt).getRegex(),Ys=M("reflink|nolink(?!\\()","g").replace("reflink",hi).replace("nolink",ci).getRegex(),vt={_backpedal:Le,anyPunctuation:Ws,autolink:Gs,blockSkip:Os,br:ri,code:Ls,del:Le,emStrongLDelim:Ps,emStrongRDelimAst:$s,emStrongRDelimUnd:Fs,escape:Ns,link:js,nolink:ci,punctuation:Ms,reflink:hi,reflinkSearch:Ys,tag:qs,text:zs,url:Le},Xs={...vt,link:M(/^!?\[(label)\]\((.*?)\)/).replace("label",Xe).getRegex(),reflink:M(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Xe).getRegex()},Tt={...vt,emStrongRDelimAst:Us,emStrongLDelim:Bs,url:M(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Ks={...Tt,br:M(ri).replace("{2,}","*").getRegex(),text:M(Tt.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ke={normal:kt,gfm:As,pedantic:Ds},Me={normal:vt,gfm:Tt,breaks:Ks,pedantic:Xs},Zs={"&":"&","<":"<",">":">",'"':""","'":"'"},di=o=>Zs[o];function le(o,e){if(e){if(Z.escapeTest.test(o))return o.replace(Z.escapeReplace,di)}else if(Z.escapeTestNoEncode.test(o))return o.replace(Z.escapeReplaceNoEncode,di);return o}function ui(o){try{o=encodeURI(o).replace(Z.percentDecode,"%")}catch{return null}return o}function pi(o,e){var r;let t=o.replace(Z.findPipe,(l,n,d)=>{let h=!1,c=n;for(;--c>=0&&d[c]==="\\";)h=!h;return h?"|":" |"}),i=t.split(Z.splitPipe),s=0;if(i[0].trim()||i.shift(),i.length>0&&!((r=i.at(-1))!=null&&r.trim())&&i.pop(),e)if(i.length>e)i.splice(e);else for(;i.length<e;)i.push("");for(;s<i.length;s++)i[s]=i[s].trim().replace(Z.slashPipe,"|");return i}function Ie(o,e,t){let i=o.length;if(i===0)return"";let s=0;for(;s<i&&o.charAt(i-s-1)===e;)s++;return o.slice(0,i-s)}function Qs(o,e){if(o.indexOf(e[1])===-1)return-1;let t=0;for(let i=0;i<o.length;i++)if(o[i]==="\\")i++;else if(o[i]===e[0])t++;else if(o[i]===e[1]&&(t--,t<0))return i;return t>0?-2:-1}function fi(o,e,t,i,s){let r=e.href,l=e.title||null,n=o[1].replace(s.other.outputLinkReplace,"$1");i.state.inLink=!0;let d={type:o[0].charAt(0)==="!"?"image":"link",raw:t,href:r,title:l,text:n,tokens:i.inlineTokens(n)};return i.state.inLink=!1,d}function Js(o,e,t){let i=o.match(t.other.indentCodeCompensation);if(i===null)return e;let s=i[1];return e.split(`
|
|
3
3
|
`).map(r=>{let l=r.match(t.other.beginningSpace);if(l===null)return r;let[n]=l;return n.length>=s.length?r.slice(s.length):r}).join(`
|
|
4
4
|
`)}var Ze=class{constructor(o){B(this,"options");B(this,"rules");B(this,"lexer");this.options=o||be}space(o){let e=this.rules.block.newline.exec(o);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(o){let e=this.rules.block.code.exec(o);if(e){let t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:Ie(t,`
|
|
@@ -66,4 +66,4 @@ Please report this to https://github.com/markedjs/marked.`,o){let i="<p>An error
|
|
|
66
66
|
* see root license https://github.com/gridstack/gridstack.js/tree/master/LICENSE
|
|
67
67
|
*/const q=new Dr;class T{static init(e={},t=".grid-stack"){let i=T.getGridElement(t);return i?(i.gridstack||(i.gridstack=new T(i,g.cloneDeep(e))),i.gridstack):(console.error(typeof t=="string"?'GridStack.initAll() no grid was found with selector "'+t+`" - element missing or wrong selector ?
|
|
68
68
|
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"){let i=[];return T.getGridElements(t).forEach(s=>{s.gridstack||(s.gridstack=new T(s,g.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 ?
|
|
69
|
-
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 l=i.gridstack;return t&&(l.opts={...l.opts,...t}),t.children!==void 0&&l.load(t.children),l}if(!e.classList.contains("grid-stack")||T.addRemoveCB)if(T.addRemoveCB)i=T.addRemoveCB(e,t,!0,!0);else{let l=document.implementation.createHTMLDocument("");l.body.innerHTML=`<div class="grid-stack ${t.class||""}"></div>`,i=l.body.children[0],e.appendChild(i)}return T.init(t,i)}static registerEngine(e){T.engineClass=e}get placeholder(){if(!this._placeholder){let e=document.createElement("div");e.className="placeholder-content",this.opts.placeholderText&&(e.innerHTML=this.opts.placeholderText),this._placeholder=document.createElement("div"),this._placeholder.classList.add(this.opts.placeholderClass,ie.itemClass,this.opts.itemClass),this.placeholder.appendChild(e)}return this._placeholder}constructor(e,t={}){var d,h;this._gsEventHandler={},this._extraDragRow=0,this.el=e,t=t||{},e.classList.contains("grid-stack")||this.el.classList.add("grid-stack"),t.row&&(t.minRow=t.maxRow=t.row,delete t.row);let i=g.toNumber(e.getAttribute("gs-row"));t.column==="auto"&&delete t.column,t.alwaysShowResizeHandle!==void 0&&(t._alwaysShowResizeHandle=t.alwaysShowResizeHandle);let s={...g.cloneDeep(ie),column:g.toNumber(e.getAttribute("gs-column"))||ie.column,minRow:i||g.toNumber(e.getAttribute("gs-min-row"))||ie.minRow,maxRow:i||g.toNumber(e.getAttribute("gs-max-row"))||ie.maxRow,staticGrid:g.toBool(e.getAttribute("gs-static"))||ie.staticGrid,draggable:{handle:(t.handleClass?"."+t.handleClass:t.handle?t.handle:"")||ie.draggable.handle},removableOptions:{accept:t.itemClass||ie.removableOptions.accept,decline:ie.removableOptions.decline}};e.getAttribute("gs-animate")&&(s.animate=g.toBool(e.getAttribute("gs-animate"))),this.opts=g.defaults(t,s),t=null,this._initMargin(),this.opts.column!==1&&!this.opts.disableOneColumnMode&&this._widthOrContainer()<=this.opts.oneColumnSize&&(this._prevColumn=this.getColumn(),this.opts.column=1),this.opts.rtl==="auto"&&(this.opts.rtl=e.style.direction==="rtl"),this.opts.rtl&&this.el.classList.add("grid-stack-rtl");const r=(d=this.el.parentElement)==null?void 0:d.parentElement;let l=r!=null&&r.classList.contains(ie.itemClass)?r.gridstackNode:void 0;l&&(l.subGrid=this,this.parentGridItem=l,this.el.classList.add("grid-stack-nested"),l.el.classList.add("grid-stack-sub-grid")),this._isAutoCellHeight=this.opts.cellHeight==="auto",this._isAutoCellHeight||this.opts.cellHeight==="initial"?this.cellHeight(void 0,!1):(typeof this.opts.cellHeight=="number"&&this.opts.cellHeightUnit&&this.opts.cellHeightUnit!==ie.cellHeightUnit&&(this.opts.cellHeight=this.opts.cellHeight+this.opts.cellHeightUnit,delete this.opts.cellHeightUnit),this.cellHeight(this.opts.cellHeight,!1)),this.opts.alwaysShowResizeHandle==="mobile"&&(this.opts.alwaysShowResizeHandle=ne),this._styleSheetClass="gs-id-"+ae._idSeq++,this.el.classList.add(this._styleSheetClass),this._setStaticClass();let n=this.opts.engineClass||T.engineClass||ae;if(this.engine=new n({column:this.getColumn(),float:this.opts.float,maxRow:this.opts.maxRow,onChange:c=>{let f=0;this.engine.nodes.forEach(p=>{f=Math.max(f,p.y+p.h)}),c.forEach(p=>{let _=p.el;_&&(p._removeDOM?(_&&_.remove(),delete p._removeDOM):this._writePosAttr(_,p))}),this._updateStyles(!1,f)}}),this.opts.auto&&(this.batchUpdate(),this.getGridItems().forEach(c=>this._prepareElement(c)),this.batchUpdate(!1)),this.opts.children){let c=this.opts.children;delete this.opts.children,c.length&&this.load(c)}this.setAnimation(this.opts.animate),this._updateStyles(),this.el.classList.add("gs-"+this.opts.column),this.opts.subGridDynamic&&!E.pauseDrag&&(E.pauseDrag=!0),((h=this.opts.draggable)==null?void 0:h.pause)!==void 0&&(E.pauseDrag=this.opts.draggable.pause),this._setupRemoveDrop(),this._setupAcceptWidget(),this._updateResizeEvent()}addWidget(e,t){function i(n){return n.el!==void 0||n.x!==void 0||n.y!==void 0||n.w!==void 0||n.h!==void 0||n.content!==void 0}let s,r;if(typeof e=="string"){let n=document.implementation.createHTMLDocument("");n.body.innerHTML=e,s=n.body.children[0]}else if(arguments.length===0||arguments.length===1&&i(e))if(r=t=e,r!=null&&r.el)s=r.el;else if(T.addRemoveCB)s=T.addRemoveCB(this.el,t,!0,!1);else{let n=(t==null?void 0:t.content)||"",d=document.implementation.createHTMLDocument("");d.body.innerHTML=`<div class="grid-stack-item ${this.opts.itemClass||""}"><div class="grid-stack-item-content">${n}</div></div>`,s=d.body.children[0]}else s=e;if(!s)return;if(r=s.gridstackNode,r&&s.parentElement===this.el&&this.engine.nodes.find(n=>n._id===r._id))return s;let l=this._readAttr(s);return t=g.cloneDeep(t)||{},g.defaults(t,l),r=this.engine.prepareNode(t),this._writeAttr(s,t),this._insertNotAppend?this.el.prepend(s):this.el.appendChild(s),this.makeWidget(s,t),s}makeSubGrid(e,t,i,s=!0){var _,x,z;let r=e.gridstackNode;if(r||(r=this.makeWidget(e).gridstackNode),(_=r.subGrid)!=null&&_.el)return r.subGrid;let l,n=this;for(;n&&!l;)l=(x=n.opts)==null?void 0:x.subGridOpts,n=(z=n.parentGridItem)==null?void 0:z.grid;t=g.cloneDeep({...l||{},children:void 0,...t||r.subGridOpts}),r.subGridOpts=t;let d;t.column==="auto"&&(d=!0,t.column=Math.max(r.w||1,(i==null?void 0:i.w)||1),t.disableOneColumnMode=!0);let h=r.el.querySelector(".grid-stack-item-content"),c,f;if(s){if(this._removeDD(r.el),f={...r,x:0,y:0},g.removeInternalForSave(f),delete f.subGridOpts,r.content&&(f.content=r.content,delete r.content),T.addRemoveCB)c=T.addRemoveCB(this.el,f,!0,!1);else{let H=document.implementation.createHTMLDocument("");H.body.innerHTML='<div class="grid-stack-item"></div>',c=H.body.children[0],c.appendChild(h),H.body.innerHTML='<div class="grid-stack-item-content"></div>',h=H.body.children[0],r.el.appendChild(h)}this._prepareDragDropByNode(r)}if(i){let H=d?t.column:r.w,D=r.h+i.h,N=r.el.style;N.transition="none",this.update(r.el,{w:H,h:D}),setTimeout(()=>N.transition=null)}let p=r.subGrid=T.addGrid(h,t);return i!=null&&i._moving&&(p._isTemp=!0),d&&(p._autoColumn=!0),s&&p.addWidget(c,f),i&&(i._moving?window.setTimeout(()=>g.simulateMouseEvent(i._event,"mouseenter",p.el),0):p.addWidget(r.el,r)),p}removeAsSubGrid(e){var i;let t=(i=this.parentGridItem)==null?void 0:i.grid;t&&(t.batchUpdate(),t.removeWidget(this.parentGridItem.el,!0,!0),this.engine.nodes.forEach(s=>{s.x+=this.parentGridItem.x,s.y+=this.parentGridItem.y,t.addWidget(s.el,s)}),t.batchUpdate(!1),this.parentGridItem&&delete this.parentGridItem.subGrid,delete this.parentGridItem,e&&window.setTimeout(()=>g.simulateMouseEvent(e._event,"mouseenter",t.el),0))}save(e=!0,t=!1,i=T.saveCB){let s=this.engine.save(e,i);if(s.forEach(r=>{var l;if(e&&r.el&&!r.subGrid&&!i){let n=r.el.querySelector(".grid-stack-item-content");r.content=n?n.innerHTML:void 0,r.content||delete r.content}else if(!e&&!i&&delete r.content,(l=r.subGrid)!=null&&l.el){const n=r.subGrid.save(e,t,i);r.subGridOpts=t?n:{children:n},delete r.subGrid}delete r.el}),t){let r=g.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",delete r.disableOneColumnMode);const l=r._alwaysShowResizeHandle;return delete r._alwaysShowResizeHandle,l!==void 0?r.alwaysShowResizeHandle=l:delete r.alwaysShowResizeHandle,g.removeInternalAndSame(r,ie),r.children=s,r}return s}load(e,t=T.addRemoveCB||!0){e=g.cloneDeep(e);const i=e.some(h=>h.x!==void 0||h.y!==void 0);i&&(e=g.sort(e,-1,this._prevColumn||this.getColumn())),this._insertNotAppend=i;const s=this.opts.column;this._prevColumn&&this._prevColumn!==s&&e.some(h=>(h.x||0)+h.w>s)&&(this._ignoreLayoutsNodeChange=!0,this.engine.cacheLayout(e,this._prevColumn,!0));const r=T.addRemoveCB;typeof t=="function"&&(T.addRemoveCB=t);let l=[];this.batchUpdate(),t&&[...this.engine.nodes].forEach(c=>{if(!c.id)return;g.find(e,c.id)||(T.addRemoveCB&&T.addRemoveCB(this.el,c,!1,!1),l.push(c),this.removeWidget(c.el,!0,!1))});let n=[];this.engine.nodes=this.engine.nodes.filter(h=>g.find(e,h.id)?(n.push(h),!1):!0);let d=!1;return e.forEach(h=>{var f;let c=g.find(n,h.id);if(c){if(g.shouldSizeToContent(c)&&(h.h=c.h),this.engine.nodeBoundFix(h),(h.autoPosition||h.x===void 0||h.y===void 0)&&(h.w=h.w||c.w,h.h=h.h||c.h,this.engine.findEmptyPosition(h)),d=d||h.w!==void 0&&h.w!==c.w,this.engine.nodes.push(c),g.samePos(c,h)&&this.moveNode(c,{...h,forceCollide:!0}),this.update(c.el,h),(f=h.subGridOpts)!=null&&f.children){let p=c.el.querySelector(".grid-stack");p&&p.gridstack&&(p.gridstack.load(h.subGridOpts.children),this._insertNotAppend=!0)}}else t&&this.addWidget(h)}),this.engine.removedNodes=l,this.doContentResize(d,!0),this.batchUpdate(!1),delete this._ignoreLayoutsNodeChange,delete this._insertNotAppend,r?T.addRemoveCB=r:delete T.addRemoveCB,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;let t=this.el.querySelector("."+this.opts.itemClass);if(t){let s=g.toNumber(t.getAttribute("gs-h"))||1;return Math.round(t.offsetHeight/s)}let 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){let s=-this.opts.marginRight-this.opts.marginLeft+this.opts.marginTop+this.opts.marginBottom;e=this.cellWidth()+s}let i=g.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.doContentResize(!1,!0),t&&this._updateStyles(!0),this)}cellWidth(){return this._widthOrContainer()/this.getColumn()}_widthOrContainer(){return this.el.clientWidth||this.el.parentElement.clientWidth||window.innerWidth}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;let i=this.getColumn();e===1&&!this.opts.disableOneColumnMode?this._prevColumn=i:delete this._prevColumn,this.el.classList.remove("gs-"+i),this.el.classList.add("gs-"+e),this.opts.column=this.engine.column=e;let s;return e===1&&this.opts.oneColumnModeDomSort&&(s=[],this.getGridItems().forEach(r=>{r.gridstackNode&&s.push(r.gridstackNode)}),s.length||(s=void 0)),this.engine.columnChanged(i,e,s,t),this._isAutoCellHeight&&this.cellHeight(),this.doContentResize(),this._ignoreLayoutsNodeChange=!0,this._triggerChangeEvent(),delete this._ignoreLayoutsNodeChange,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))}destroy(e=!0){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(),this.parentGridItem&&delete this.parentGridItem.subGrid,delete this.parentGridItem,delete this.opts,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){let i=this.el.getBoundingClientRect(),s;t?s={top:i.top+document.documentElement.scrollTop,left:i.left}:s={top:this.el.offsetTop,left:this.el.offsetLeft};let r=e.left-s.left,l=e.top-s.top,n=i.width/this.getColumn(),d=i.height/parseInt(this.el.getAttribute("gs-current-row"));return{x:Math.floor(r/n),y:Math.floor(l/d)}}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){let i=T.getElement(e);this._prepareElement(i,!0,t);const s=i.gridstackNode;return this._updateContainerHeight(),this.doContentResize(!1,!1,s),s.subGridOpts&&this.makeSubGrid(i,s.subGridOpts,void 0,!1),this._prevColumn&&this.opts.column===1&&(this._ignoreLayoutsNodeChange=!0),this._triggerAddEvent(),this._triggerChangeEvent(),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=>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.log("GridStack.on("+e+') event not supported, but you can still use $(".grid-stack").on(...) while jquery-ui is still used internally.'),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 T.getElements(e).forEach(s=>{if(s.parentElement&&s.parentElement!==this.el)return;let r=s.gridstackNode;r||(r=this.engine.nodes.find(l=>s===l.el)),r&&(T.addRemoveCB&&T.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}removeAll(e=!0){return this.engine.nodes.forEach(t=>{delete t.el.gridstackNode,this._removeDD(t.el)}),this.engine.removeAll(e),this._triggerRemoveEvent(),this}setAnimation(e){return e?this.el.classList.add("grid-stack-animate"):this.el.classList.remove("grid-stack-animate"),this}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");let i=arguments,s=1;return t={x:i[s++],y:i[s++],w:i[s++],h:i[s++]},this.update(e,t)}return T.getElements(e).forEach(i=>{var c;let s=i==null?void 0:i.gridstackNode;if(!s)return;let r=g.cloneDeep(t);this.engine.nodeBoundFix(r),delete r.autoPosition,delete r.id;let l=["x","y","w","h"],n;if(l.some(f=>r[f]!==void 0&&r[f]!==s[f])&&(n={},l.forEach(f=>{n[f]=r[f]!==void 0?r[f]:s[f],delete r[f]})),!n&&(r.minW||r.minH||r.maxW||r.maxH)&&(n={}),r.content!==void 0){const f=i.querySelector(".grid-stack-item-content");f&&f.innerHTML!==r.content&&(f.innerHTML=r.content,(c=s.subGrid)!=null&&c.el&&(f.appendChild(s.subGrid.el),s.subGrid.opts.styleInHead||s.subGrid._updateStyles(!0))),delete r.content}let d=!1,h=!1;for(const f in r)f[0]!=="_"&&s[f]!==r[f]&&(s[f]=r[f],d=!0,h=h||!this.opts.staticGrid&&(f==="noResize"||f==="noMove"||f==="locked"));g.sanitizeMinMax(s),n&&this.moveNode(s,n),(n||d)&&this._writeAttr(i,s),h&&this._prepareDragDropByNode(s)}),this}moveNode(e,t){this.engine.cleanNodes().beginUpdate(e).moveNode(e,t),this._updateContainerHeight(),this._triggerChangeEvent(),this.engine.endUpdate()}resizeToContent(e,t=!1){if(!e||(e.classList.remove("size-to-content-max"),!e.clientHeight))return;let i=e.gridstackNode;if(!i)return;const s=i.grid;if(!s||e.parentElement!==s.el)return;const r=s.getCellHeight();if(!r)return;let l=t&&i.h?i.h*r:e.clientHeight,n;if(i.resizeToContentParent&&(n=e.querySelector(i.resizeToContentParent)),n||(n=e.querySelector(T.resizeToContentParent)),!n)return;const d=e.clientHeight-n.clientHeight,h=t&&i.h?i.h*r-d:n.clientHeight;let c;if(i.subGrid)c=i.subGrid.getRow()*i.subGrid.getCellHeight();else{const _=n.firstElementChild;if(!_){console.log(`Error: resizeToContent() '${T.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);return}c=_.getBoundingClientRect().height||h}if(h===c)return;l+=c-h;let f=Math.ceil(l/r);const p=Number.isInteger(i.sizeToContent)?i.sizeToContent:0;p&&f>p&&(f=p,e.classList.add("size-to-content-max")),i.minH&&f<i.minH?f=i.minH:i.maxH&&f>i.maxH&&(f=i.maxH),f!==i.h&&(s._ignoreLayoutsNodeChange=!0,s.moveNode(i,{h:f}),delete s._ignoreLayoutsNodeChange)}resizeToContentCheck(e,t=!1){T.resizeToContentCB?T.resizeToContentCB(e,t):this.resizeToContent(e,t)}margin(e){if(!(typeof e=="string"&&e.split(" ").length>1)){let i=g.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");let t=arguments,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;let 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;return this.engine.batchMode?this:((e=this.engine.addedNodes)!=null&&e.length&&(this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(this.engine.addedNodes),this.engine.addedNodes.forEach(t=>{delete t._dirty}),this._triggerEvent("added",this.engine.addedNodes),this.engine.addedNodes=[]),this)}_triggerRemoveEvent(){var e;return this.engine.batchMode?this:((e=this.engine.removedNodes)!=null&&e.length&&(this._triggerEvent("removed",this.engine.removedNodes),this.engine.removedNodes=[]),this)}_triggerEvent(e,t){let i=t?new CustomEvent(e,{bubbles:!1,detail:t}):new Event(e);return this.el.dispatchEvent(i),this}_removeStylesheet(){return this._styles&&(g.removeStylesheet(this._styleSheetClass),delete this._styles),this}_updateStyles(e=!1,t){if(e&&this._removeStylesheet(),t||(t=this.getRow()),this._updateContainerHeight(),this.opts.cellHeight===0)return this;let i=this.opts.cellHeight,s=this.opts.cellHeightUnit,r=`.${this._styleSheetClass} > .${this.opts.itemClass}`;if(!this._styles){let l=this.opts.styleInHead?void 0:this.el.parentNode;if(this._styles=g.createStylesheet(this._styleSheetClass,l,{nonce:this.opts.nonce}),!this._styles)return this;this._styles._max=0,g.addCSSRule(this._styles,r,`height: ${i}${s}`);let n=this.opts.marginTop+this.opts.marginUnit,d=this.opts.marginBottom+this.opts.marginUnit,h=this.opts.marginRight+this.opts.marginUnit,c=this.opts.marginLeft+this.opts.marginUnit,f=`${r} > .grid-stack-item-content`,p=`.${this._styleSheetClass} > .grid-stack-placeholder > .placeholder-content`;g.addCSSRule(this._styles,f,`top: ${n}; right: ${h}; bottom: ${d}; left: ${c};`),g.addCSSRule(this._styles,p,`top: ${n}; right: ${h}; bottom: ${d}; left: ${c};`),g.addCSSRule(this._styles,`${r} > .ui-resizable-ne`,`right: ${h}`),g.addCSSRule(this._styles,`${r} > .ui-resizable-e`,`right: ${h}`),g.addCSSRule(this._styles,`${r} > .ui-resizable-se`,`right: ${h}; bottom: ${d}`),g.addCSSRule(this._styles,`${r} > .ui-resizable-nw`,`left: ${c}`),g.addCSSRule(this._styles,`${r} > .ui-resizable-w`,`left: ${c}`),g.addCSSRule(this._styles,`${r} > .ui-resizable-sw`,`left: ${c}; bottom: ${d}`)}if(t=t||this._styles._max,t>this._styles._max){let l=n=>i*n+s;for(let n=this._styles._max+1;n<=t;n++)g.addCSSRule(this._styles,`${r}[gs-y="${n}"]`,`top: ${l(n)}`),g.addCSSRule(this._styles,`${r}[gs-h="${n+1}"]`,`height: ${l(n+1)}`);this._styles._max=t}return this}_updateContainerHeight(){if(!this.engine||this.engine.batchMode)return this;const e=this.parentGridItem;let t=this.getRow()+this._extraDragRow;const i=this.opts.cellHeight,s=this.opts.cellHeightUnit;if(!i)return this;if(!e){const r=g.parseHeight(getComputedStyle(this.el).minHeight);if(r.h>0&&r.unit===s){const l=Math.floor(r.h/i);t<l&&(t=l)}}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&&g.shouldSizeToContent(e)&&e.grid.resizeToContentCheck(e.el),this}_prepareElement(e,t=!1,i){e.classList.add(this.opts.itemClass),i=i||this._readAttr(e),e.gridstackNode=i,i.el=e,i.grid=this;let s={...i};return i=this.engine.addNode(i,t),g.same(i,s)||this._writeAttr(e,i),g.shouldSizeToContent(i)&&e.classList.add("size-to-content"),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);let i={autoPosition:"gs-auto-position",noResize:"gs-no-resize",noMove:"gs-no-move",locked:"gs-locked",id:"gs-id"};for(const s in i)t[s]?e.setAttribute(i[s],String(t[s])):e.removeAttribute(i[s]);return this}_readAttr(e,t=!0){let i={};i.x=g.toNumber(e.getAttribute("gs-x")),i.y=g.toNumber(e.getAttribute("gs-y")),i.w=g.toNumber(e.getAttribute("gs-w")),i.h=g.toNumber(e.getAttribute("gs-h")),i.autoPosition=g.toBool(e.getAttribute("gs-auto-position")),i.noResize=g.toBool(e.getAttribute("gs-no-resize")),i.noMove=g.toBool(e.getAttribute("gs-no-move")),i.locked=g.toBool(e.getAttribute("gs-locked")),i.id=e.getAttribute("gs-id"),i.maxW=g.toNumber(e.getAttribute("gs-max-w")),i.minW=g.toNumber(e.getAttribute("gs-min-w")),i.maxH=g.toNumber(e.getAttribute("gs-max-h")),i.minH=g.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(){let 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(){var t;if(!((t=this.el)!=null&&t.clientWidth)||this.prevWidth===this.el.clientWidth)return;this.prevWidth=this.el.clientWidth,this.batchUpdate();let e=!1;if(this._autoColumn&&this.parentGridItem)this.opts.column!==this.parentGridItem.w&&(this.column(this.parentGridItem.w,"none"),e=!0);else{let i=!this.opts.disableOneColumnMode&&this.el.clientWidth<=this.opts.oneColumnSize||this.opts.column===1&&!this._prevColumn;this.opts.column===1!==i&&(this.column(i?1:this._prevColumn),e=!0)}return this._isAutoCellHeight&&this.cellHeight(),this.engine.nodes.forEach(i=>{i.subGrid&&i.subGrid.onResize()}),this._skipInitialResize||this.doContentResize(e),delete this._skipInitialResize,this.batchUpdate(!1),this}doContentResize(e=!0,t=!1,i=void 0){setTimeout(()=>{if(this.engine){if(i)g.shouldSizeToContent(i)&&this.resizeToContentCheck(i.el,t);else if(this.engine.nodes.some(s=>g.shouldSizeToContent(s))){const s=[...this.engine.nodes];this.batchUpdate(),s.forEach(r=>{g.shouldSizeToContent(r)&&this.resizeToContentCheck(r.el,t)}),this.batchUpdate(!1)}this._gsEventHandler.resizecontent&&this._gsEventHandler.resizecontent(null,i?[i]:this.engine.nodes)}},e?310:0)}_updateResizeEvent(e=!1){const t=!this.parentGridItem&&(this._isAutoCellHeight||this.opts.sizeToContent||!this.opts.disableOneColumnMode||this.engine.nodes.find(i=>i.sizeToContent));return!e&&t&&!this.resizeObserver?(this._sizeThrottle=g.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 g.getElement(e)}static getElements(e=".grid-stack-item"){return g.getElements(e)}static getGridElement(e){return T.getElement(e)}static getGridElements(e){return g.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=g.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=g.parseHeight(this.opts.marginTop),this.opts.marginTop=e.h,delete this.opts.margin),this.opts.marginBottom===void 0?this.opts.marginBottom=t:(e=g.parseHeight(this.opts.marginBottom),this.opts.marginBottom=e.h,delete this.opts.margin),this.opts.marginRight===void 0?this.opts.marginRight=t:(e=g.parseHeight(this.opts.marginRight),this.opts.marginRight=e.h,delete this.opts.margin),this.opts.marginLeft===void 0?this.opts.marginLeft=t:(e=g.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 q}static setupDragIn(e,t,i=document){(t==null?void 0:t.pause)!==void 0&&(E.pauseDrag=t.pause),t={...Cr,...t||{}};let s=typeof e=="string"?g.getElements(e,i):e;s.length&&(s==null||s.forEach(r=>{q.isDraggable(r)||q.dragIn(r,t)}))}movable(e,t){return this.opts.staticGrid?this:(T.getElements(e).forEach(i=>{let s=i.gridstackNode;s&&(t?delete s.noMove:s.noMove=!0,this._prepareDragDropByNode(s))}),this)}resizable(e,t){return this.opts.staticGrid?this:(T.getElements(e).forEach(i=>{let 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)}_removeDD(e){return q.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 q.droppable(this.el,"destroy"),this;let e,t,i=(s,r,l)=>{let n=r.gridstackNode;if(!n)return;l=l||r;let d=this.el.getBoundingClientRect(),{top:h,left:c}=l.getBoundingClientRect();c-=d.left,h-=d.top;let f={position:{top:h,left:c}};if(n._temporaryRemoved){if(n.x=Math.max(0,Math.round(c/t)),n.y=Math.max(0,Math.round(h/e)),delete n.autoPosition,this.engine.nodeBoundFix(n),!this.engine.willItFit(n)){if(n.autoPosition=!0,!this.engine.willItFit(n)){q.off(r,"drag");return}n._willFitPos&&(g.copyPos(n,n._willFitPos),delete n._willFitPos)}this._onStartMoving(l,s,f,n,t,e)}else this._dragOrResize(l,s,f,n,t,e)};return q.droppable(this.el,{accept:s=>{let r=s.gridstackNode;if((r==null?void 0:r.grid)===this)return!0;if(!this.opts.acceptWidgets)return!1;let l=!0;if(typeof this.opts.acceptWidgets=="function")l=this.opts.acceptWidgets(s);else{let n=this.opts.acceptWidgets===!0?".grid-stack-item":this.opts.acceptWidgets;l=s.matches(n)}if(l&&r&&this.opts.maxRow){let n={w:r.w,h:r.h,minW:r.minW,minH:r.minH};l=this.engine.willItFit(n)}return l}}).on(this.el,"dropover",(s,r,l)=>{let n=r.gridstackNode;if((n==null?void 0:n.grid)===this&&!n._temporaryRemoved)return!1;n!=null&&n.grid&&n.grid!==this&&!n._temporaryRemoved&&n.grid._leave(r,l),t=this.cellWidth(),e=this.getCellHeight(!0),n||(n=this._readAttr(r,!1)),n.grid||(n._isExternal=!0,r.gridstackNode=n),l=l||r;let d=n.w||Math.round(l.offsetWidth/t)||1,h=n.h||Math.round(l.offsetHeight/e)||1;return n.grid&&n.grid!==this?(r._gridstackNodeOrig||(r._gridstackNodeOrig=n),r.gridstackNode=n={...n,w:d,h,grid:this},delete n.x,delete n.y,this.engine.cleanupNode(n).nodeBoundFix(n),n._initDD=n._isExternal=n._temporaryRemoved=!0):(n.w=d,n.h=h,n._temporaryRemoved=!0),this._itemRemoving(n.el,!1),q.on(r,"drag",i),i(s,r,l),!1}).on(this.el,"dropout",(s,r,l)=>{let n=r.gridstackNode;return n&&(!n.grid||n.grid===this)&&(this._leave(r,l),this._isTemp&&this.removeAsSubGrid(n)),!1}).on(this.el,"drop",(s,r,l)=>{var f,p;let n=r.gridstackNode;if((n==null?void 0:n.grid)===this&&!n._isExternal)return!1;let d=!!this.placeholder.parentElement;this.placeholder.remove();let h=r._gridstackNodeOrig;if(delete r._gridstackNodeOrig,d&&(h!=null&&h.grid)&&h.grid!==this){let _=h.grid;_.engine.removeNodeFromLayoutCache(h),_.engine.removedNodes.push(h),_._triggerRemoveEvent()._triggerChangeEvent(),_.parentGridItem&&!_.engine.nodes.length&&_.opts.subGridDynamic&&_.removeAsSubGrid()}if(!n||(d&&(this.engine.cleanupNode(n),n.grid=this),delete n.grid._isTemp,q.off(r,"drag"),l!==r?(l.remove(),r.gridstackNode=h,d&&(r=r.cloneNode(!0))):(r.remove(),this._removeDD(r)),!d))return!1;r.gridstackNode=n,n.el=r;let c=(p=(f=n.subGrid)==null?void 0:f.el)==null?void 0:p.gridstack;return g.copyPos(n,this._readAttr(this.placeholder)),g.removePositioningStyles(r),this._writeAttr(r,n),r.classList.add(ie.itemClass,this.opts.itemClass),this.el.appendChild(r),c&&(c.parentGridItem=n,c.opts.styleInHead||c._updateStyles(!0)),this._prepareDragDropByNode(n),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),!1}),this}_itemRemoving(e,t){let i=e?e.gridstackNode:void 0;!i||!i.grid||e.classList.contains(this.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(!this.opts.staticGrid&&typeof this.opts.removable=="string"){let e=document.querySelector(this.opts.removable);if(!e)return this;q.isDroppable(e)||q.droppable(e,this.opts.removableOptions).on(e,"dropover",(t,i)=>this._itemRemoving(i,!0)).on(e,"dropout",(t,i)=>this._itemRemoving(i,!1))}return this}_prepareDragDropByNode(e){let t=e.el;const 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,l,n=(c,f)=>{this._gsEventHandler[c.type]&&this._gsEventHandler[c.type](c,c.target),r=this.cellWidth(),l=this.getCellHeight(!0),this._onStartMoving(t,c,f,e,r,l)},d=(c,f)=>{this._dragOrResize(t,c,f,e,r,l)},h=c=>{this.placeholder.remove(),delete e._moving,delete e._event,delete e._lastTried;let f=c.target;if(!(!f.gridstackNode||f.gridstackNode.grid!==this)){if(e.el=f,e._isAboutToRemove){let p=t.gridstackNode.grid;p._gsEventHandler[c.type]&&p._gsEventHandler[c.type](c,f),p.engine.nodes.push(e),p.removeWidget(t,!0,!0)}else g.removePositioningStyles(f),e._temporaryRemoved?(g.copyPos(e,e._orig),this._writePosAttr(f,e),this.engine.addNode(e)):this._writePosAttr(f,e),this._gsEventHandler[c.type]&&this._gsEventHandler[c.type](c,f);this._extraDragRow=0,this._updateContainerHeight(),this._triggerChangeEvent(),this.engine.endUpdate(),c.type==="resizestop"&&(Number.isInteger(e.sizeToContent)&&(e.sizeToContent=e.h),this.doContentResize(!1,!0,e))}};q.draggable(t,{start:n,stop:h,drag:d}).resizable(t,{start:n,stop:h,resize:d}),e._initDD=!0}return q.draggable(t,i?"disable":"enable").resizable(t,s?"disable":"enable"),this}_onStartMoving(e,t,i,s,r,l){this.engine.cleanNodes().beginUpdate(s),this._writePosAttr(this.placeholder,s),this.el.appendChild(this.placeholder),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,l,this.opts.marginTop,this.opts.marginRight,this.opts.marginBottom,this.opts.marginLeft),t.type==="resizestart"&&(q.resizable(e,"option","minWidth",r*(s.minW||1)).resizable(e,"option","minHeight",l*(s.minH||1)),s.maxW&&q.resizable(e,"option","maxWidth",r*s.maxW),s.maxH&&q.resizable(e,"option","maxHeight",l*s.maxH))}_dragOrResize(e,t,i,s,r,l){let n={...s._orig},d,h=this.opts.marginLeft,c=this.opts.marginRight,f=this.opts.marginTop,p=this.opts.marginBottom,_=Math.round(l*.1),x=Math.round(r*.1);if(h=Math.min(h,x),c=Math.min(c,x),f=Math.min(f,_),p=Math.min(p,_),t.type==="drag"){if(s._temporaryRemoved)return;let H=i.position.top-s._prevYPix;s._prevYPix=i.position.top,this.opts.draggable.scroll!==!1&&g.updateScrollPosition(e,i.position,H);let D=i.position.left+(i.position.left>s._lastUiPosition.left?-c:h),N=i.position.top+(i.position.top>s._lastUiPosition.top?-p:f);n.x=Math.round(D/r),n.y=Math.round(N/l);let C=this._extraDragRow;if(this.engine.collide(s,n)){let y=this.getRow(),w=Math.max(0,n.y+s.h-y);this.opts.maxRow&&y+w>this.opts.maxRow&&(w=Math.max(0,this.opts.maxRow-y)),this._extraDragRow=w}else this._extraDragRow=0;if(this._extraDragRow!==C&&this._updateContainerHeight(),s.x===n.x&&s.y===n.y)return}else if(t.type==="resize"){if(n.x<0||(g.updateScrollResize(t,e,l),n.w=Math.round((i.size.width-h)/r),n.h=Math.round((i.size.height-f)/l),s.w===n.w&&s.h===n.h)||s._lastTried&&s._lastTried.w===n.w&&s._lastTried.h===n.h)return;let H=i.position.left+h,D=i.position.top+f;n.x=Math.round(H/r),n.y=Math.round(D/l),d=!0}s._event=t,s._lastTried=n;let z={x:i.position.left+h,y:i.position.top+f,w:(i.size?i.size.width:s.w*r)-h-c,h:(i.size?i.size.height:s.h*l)-f-p};if(this.engine.moveNodeCheck(s,{...n,cellWidth:r,cellHeight:l,rect:z,resizing:d})){s._lastUiPosition=i.position,this.engine.cacheRects(r,l,f,c,p,h),delete s._skipDown,d&&s.subGrid&&s.subGrid.onResize(),this._extraDragRow=0,this._updateContainerHeight();let H=t.target;this._writePosAttr(H,s),this._gsEventHandler[t.type]&&this._gsEventHandler[t.type](t,H)}}_leave(e,t){let i=e.gridstackNode;i&&(q.off(e,"drag"),!i._temporaryRemoved&&(i._temporaryRemoved=!0,this.engine.removeNode(i),i.el=i._isExternal&&t?t:e,this.opts.removable===!0&&this._itemRemoving(e,!0),e._gridstackNodeOrig?(e.gridstackNode=e._gridstackNodeOrig,delete e._gridstackNodeOrig):i._isExternal&&(delete i.el,delete e.gridstackNode,this.engine.restoreInitial())))}commit(){return Rr(this,this.batchUpdate(!1),"commit","batchUpdate","5.2"),this}}T.resizeToContentParent=".grid-stack-item-content",T.Utils=g,T.Engine=ae,T.GDRev="9.5.1";const Nr={class:"tw-flex tw-flex-row tw-flex-wrap tw-gap-2"},Lr={class:"color-primary"},zr={class:"color-secondary"},Mr={key:1,class:"empty"},Ir={key:0,class:"clear-filter-div"},Hr=we(a.defineComponent({__name:"Filter",props:{order:{},exclude:{}},setup(o){const e=o,t=Ne(),i=a.computed(()=>({...t.Filters})),s=a.computed(()=>{const h=i.value;return Object.keys(h).map(c=>({key:c,value:h[c]})).filter(({value:c})=>!(c==null||typeof c=="string"&&c.trim()===""||Array.isArray(c)&&c.length===0))}),r=a.computed(()=>{var f;const h=new Set(e.exclude??[]),c=s.value.filter(p=>!h.has(p.key));if((f=e.order)!=null&&f.length){const p=new Map(e.order.map((_,x)=>[_,x]));c.sort((_,x)=>{const z=p.has(_.key)?p.get(_.key):Number.MAX_SAFE_INTEGER,H=p.has(x.key)?p.get(x.key):Number.MAX_SAFE_INTEGER;return z-H||_.key.localeCompare(x.key)})}else c.sort((p,_)=>p.key.localeCompare(_.key));return c});function l(h){return Array.isArray(h)?h.join(", "):h&&typeof h=="object"?JSON.stringify(h):String(h??"")}function n(h){const c=t;typeof c.clearFilter=="function"?c.clearFilter(h):typeof c.clearAllFilters=="function"?c.clearAllFilters(h):t.setFilter(h,void 0)}function d(){t.resetFilters({})}return(h,c)=>{const f=a.resolveComponent("el-icon"),p=a.resolveComponent("el-row");return a.openBlock(),a.createBlock(p,{class:"filter-wrapper tw-m-1",align:"middle",justify:"space-between"},{default:a.withCtx(()=>[a.createElementVNode("div",Nr,[r.value.length?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:0},a.renderList(r.value,_=>(a.openBlock(),a.createBlock(a.unref(mt.ElTag),{class:"color-background",key:_.key,closable:"",onClose:x=>n(_.key),effect:"dark",type:"info"},{default:a.withCtx(()=>[a.createElementVNode("b",Lr,a.toDisplayString(_.key)+": ",1),a.createElementVNode("span",zr,a.toDisplayString(l(_.value)),1)]),_:2},1032,["onClose"]))),128)):(a.openBlock(),a.createElementBlock("span",Mr,"No filters"))]),r.value.length?(a.openBlock(),a.createElementBlock("div",Ir,[a.createVNode(a.unref(mt.ElTooltip),{placement:"top-start",content:"Clear All Filters"},{default:a.withCtx(()=>[a.createVNode(f,{color:"#FFFF",onClick:d},{default:a.withCtx(()=>[a.createVNode(a.unref(rs))]),_:1})]),_:1})])):a.createCommentVNode("",!0)]),_:1})}}}),[["__scopeId","data-v-6ce6db0c"]]),Or={key:0,class:"content-header dash-header-visible stick-to-top tw-flex tw-flex-row tw-items-center tw-justify-between tw-h-10"},Pr={class:"editing-div"},Br={class:"tw-m-4 tw-leading-none tw-pl-1 widget-name"},$r={class:"header-slot-icon"},Ur={key:1,class:"dash-header-hide content-header"},Fr={class:"header-slot-icon"},Wr=we({__name:"DashHeader",props:{widgetName:{type:String,required:!0},widgetID:{type:String,required:!0},hideHeader:Boolean},setup(o){const e=Ne(),t=o,i=a.ref(null);a.watch(()=>t.widgetName,d=>{i.value=d},{immediate:!0});const s=a.ref(!1),r=a.ref(null);function l(){s.value=!0,r.value&&r.value.focus()}function n(){if(!s.value)return;s.value=!1;const d=e.getDashItem(t.widgetID);d.componentName=i}return(d,h)=>{const c=a.resolveComponent("el-input"),f=a.resolveDirective("click-out");return o.hideHeader?(a.openBlock(),a.createElementBlock("div",Ur,[a.createElementVNode("div",Fr,[a.renderSlot(d.$slots,"default",{},void 0,!0)])])):(a.openBlock(),a.createElementBlock("div",Or,[a.createElementVNode("div",null,[a.withDirectives((a.openBlock(),a.createElementBlock("div",{onKeyup:a.withKeys(n,["enter"]),class:"tw-flex"},[a.withDirectives(a.createElementVNode("div",Pr,[a.createVNode(c,{onFocus:h[0]||(h[0]=p=>p.target.select()),ref_key:"textUserInput",ref:r,modelValue:i.value,"onUpdate:modelValue":h[1]||(h[1]=p=>i.value=p)},null,8,["modelValue"])],512),[[a.vShow,s.value]]),a.withDirectives(a.createElementVNode("div",{onClick:h[2]||(h[2]=p=>l()),class:"visible-div"},[a.createElementVNode("div",Br,a.toDisplayString(i.value),1)],512),[[a.vShow,!s.value]])],32)),[[f,n]])]),a.createElementVNode("div",$r,[a.renderSlot(d.$slots,"default",{},void 0,!0)])]))}}},[["__scopeId","data-v-1e30b12b"]]),Gr={class:"tw-flex"},Vr=we({__name:"WidgetWrapper",props:{widgetID:{type:String,required:!0},staticMode:{type:Boolean,required:!0},componentTag:{required:!0},componentProperties:{type:Object},componentName:{type:String},hideWidgetsHeader:{type:Boolean},isLocked:{type:Boolean,default:!1}},emits:["removeWidget","toggle-lock"],setup(o,{emit:e}){const t=e,i=o;let s=a.ref(null);const r=a.ref(!1);a.watch(()=>i.isLocked,d=>{r.value=d},{immediate:!0});const l=a.ref(null);a.watch(()=>i.hideWidgetsHeader,d=>{l.value=d},{immediate:!0});function n(){t("toggle-lock",{id:i.widgetID,isLocked:r.value})}return(d,h)=>{const c=a.resolveComponent("el-icon");return a.openBlock(),a.createElementBlock("div",{ref_key:"instance",ref:s,class:a.normalizeClass(["grid-stack-item-content",{"locked-widget":o.isLocked}])},[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(o.componentTag),a.mergeProps({class:["widget-body",{"widget-body-no-head":l.value}],widgetID:o.widgetID,hideHeader:l.value},i.componentProperties,{style:{pointerEvents:r.value?"none":"auto"},isLocked:r.value}),{default:a.withCtx(f=>[f?(a.openBlock(),a.createBlock(Wr,{key:0,widgetName:i.componentName,widgetID:o.widgetID,staticMode:o.staticMode,hideHeader:l.value},{default:a.withCtx(()=>[a.createElementVNode("div",Gr,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(f.childIcons,p=>(a.openBlock(),a.createBlock(a.unref(mt.ElTooltip),{placement:"bottom-start"},{content:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(p.tooltip),1)]),default:a.withCtx(()=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(p.comp),{class:"tw-w-4 header-icon",onClick:p.event},null,8,["onClick"]))]),_:2},1024))),256)),a.createVNode(c,{class:"header-icon lock-toggle",onClick:h[0]||(h[0]=p=>n())},{default:a.withCtx(()=>[r.value?(a.openBlock(),a.createBlock(a.unref(hs),{key:0})):(a.openBlock(),a.createBlock(a.unref(ds),{key:1}))]),_:1}),!o.staticMode&&!o.isLocked?(a.openBlock(),a.createBlock(c,{key:0,class:"item-widget-button",onClick:h[1]||(h[1]=p=>d.$emit("removeWidget"))},{default:a.withCtx(()=>[a.createVNode(a.unref(os))]),_:1})):a.createCommentVNode("",!0)])]),_:2},1032,["widgetName","widgetID","staticMode","hideHeader"])):a.createCommentVNode("",!0)]),_:1},16,["class","widgetID","hideHeader","style","isLocked"]))],2)}}},[["__scopeId","data-v-a2daf4ac"]]),qr={class:"dashboard-app"},jr={key:0,class:"dash-header tw-max-h-screen tw-flex tw-flex-col"},Yr={class:"tw-float-left tw-m-1 button"},Xr={key:1,class:"tw-h-10 dash-header"},Kr={class:"tw-float-left tw-m-1"},Zr={class:"tw-m-4 tw-w-40"},Qr=["gs-x","gs-y","gs-w","gs-h","gs-id","id","props","gs-locked","gs-no-move","gs-no-resize"],Jr=we(a.defineComponent({__name:"Dashboard",props:{hideHeader:{},options:{}},setup(o){const e=o,t=Ne(),{DASHBOARD_ITEMS:i}=oe.storeToRefs(t),s={apiUrl:a.computed(()=>{var y;return(y=t.Services)==null?void 0:y.ApiUrl}),s3Url:a.computed(()=>{var y;return(y=t.Services)==null?void 0:y.s3Url}),filters:t.Filters,setFilter:t.setFilter,clearFilter:t.clearFilter,resetFilters:t.resetFilters};a.provide("dashboard:globalVars",s);let r=a.ref("Edit Grid");const{gridInstance:l}=oe.storeToRefs(t),n=a.ref(null);let d=a.ref(!0),h=0;const c=a.ref([]),{ComponentRegistry:f}=oe.storeToRefs(t),p=a.reactive({});a.onBeforeMount(()=>{var y;_(),t.loadFromLocalStorage(),h=((y=i.value)==null?void 0:y.length)+1}),a.onMounted(()=>{x(),z()});function _(){var y,w;t.DefaultLayout=(y=e.options)==null?void 0:y.defaultLayout,t.setOptionServices((w=e.options)==null?void 0:w.services)}function x(){const y={float:!0,column:12,cellHeight:"70px",minRow:12,margin:5,alwaysShowResizeHandle:!0,resizable:{handles:"e,se,s,sw,w,n"}};l.value=T.init(y),l.value.setStatic(d.value)}a.watch(()=>{var y;return(y=e.options)==null?void 0:y.availableWidgets},y=>{f.value={},c.value=[],y&&y.forEach((w,O)=>{let P,S;if(w&&typeof w=="object"&&"name"in w&&"component"in w)P=w.name,S=w.component;else if(w&&typeof w=="object"&&"name"in w&&"loader"in w)P=w.name,S=a.defineAsyncComponent(async()=>{const v=await w.loader();return v.default??v});else if(w&&(typeof w=="function"||typeof w=="object"))S=w,P=w.name||`Widget${O+1}`;else if(typeof w=="function")return;!P||!S||f.value[P]||(f.value[P]=S,c.value.push(P))})},{immediate:!0,deep:!0});function z(){const y=e.options.globalData;if(y){t.clearOptionsDataItems();for(const w in y)t.addOptionsDataItems(w,y[w])}}a.watch(()=>d.value,y=>{l.value.setStatic(y),r.value=y?"Edit Grid":"Save Grid"});function H(y){if(!y)return;const w=`${y}-${h}`,O={id:w,w:2,h:6,autoPosition:!0,component:f.value[y],componentKey:y,componentName:y,Props:{}};h++,i.value.push(O),a.nextTick(()=>{var P;(P=l.value)==null||P.makeWidget(`#${w}`)})}function D(y){var w=i.value.findIndex(P=>P.id==y);i.value.splice(w,1);const O=`#${y}`;l.value.removeWidget(O,!1)}function N({id:y,isLocked:w}){const O=p[y];O&&l.value&&l.value.update(O,{locked:!w,noMove:!w,noResize:!w}),t.toggleWidgetLock(y)}function C(){d.value=!d.value,d.value&&t.saveToLocalStorage()}return(y,w)=>{const O=a.resolveComponent("el-button"),P=a.resolveComponent("el-option"),S=a.resolveComponent("el-select"),v=a.resolveComponent("el-col");return a.openBlock(),a.createElementBlock("div",qr,[y.hideHeader?(a.openBlock(),a.createElementBlock("div",Xr,[w[2]||(w[2]=a.createTextVNode("x ",-1)),a.createElementVNode("span",Kr,[a.createVNode(O,{class:"edit-button",onClick:w[1]||(w[1]=R=>C())},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(a.unref(r)),1)]),_:1})])])):(a.openBlock(),a.createElementBlock("div",jr,[a.createElementVNode("span",Yr,[a.createVNode(O,{class:"edit-button",onClick:w[0]||(w[0]=R=>C())},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(a.unref(r)),1)]),_:1})]),a.createVNode(Hr)])),a.unref(d)?a.createCommentVNode("",!0):(a.openBlock(),a.createBlock(v,{key:2},{default:a.withCtx(()=>[a.createElementVNode("div",Zr,[a.createVNode(S,{placeholder:"Add New Widget"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(c.value,R=>(a.openBlock(),a.createBlock(P,{key:R,label:R,value:R,onClick:L=>H(R)},null,8,["label","value","onClick"]))),128))]),_:1})])]),_:1})),a.createElementVNode("div",{ref_key:"root",ref:n,class:"grid-stack tw-h-screen"},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(i),R=>{var L,Y,_e,ye;return a.openBlock(),a.createElementBlock("div",{class:"grid-stack-item",ref_for:!0,ref:Ee=>p[R.id]=Ee,"gs-x":R.x,"gs-y":R.y,"gs-w":R.w,"gs-h":R.h,"gs-id":R.id,id:R.id,key:R.id,props:R.Props,"gs-locked":(L=R.Props)==null?void 0:L.locked,"gs-no-move":(Y=R.Props)==null?void 0:Y.locked,"gs-no-resize":(_e=R.Props)==null?void 0:_e.locked},[a.createVNode(Vr,{widgetID:R.id,onRemoveWidget:Ee=>D(R.id),onToggleLock:N,"static-mode":a.unref(d),componentTag:R.component,componentProperties:R.Props,componentName:R.componentName,hideWidgetsHeader:R.hideHeader,"is-locked":(ye=R.Props)==null?void 0:ye.locked},null,8,["widgetID","onRemoveWidget","static-mode","componentTag","componentProperties","componentName","hideWidgetsHeader","is-locked"])],8,Qr)}),128))],512)])}}}),[["__scopeId","data-v-f42c459e"]]);V.MarkdownWidget=Tr,V.PennsieveDashboard=Jr,V.TextWidget=ys,Object.defineProperty(V,Symbol.toStringTag,{value:"Module"})});
|
|
69
|
+
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 l=i.gridstack;return t&&(l.opts={...l.opts,...t}),t.children!==void 0&&l.load(t.children),l}if(!e.classList.contains("grid-stack")||T.addRemoveCB)if(T.addRemoveCB)i=T.addRemoveCB(e,t,!0,!0);else{let l=document.implementation.createHTMLDocument("");l.body.innerHTML=`<div class="grid-stack ${t.class||""}"></div>`,i=l.body.children[0],e.appendChild(i)}return T.init(t,i)}static registerEngine(e){T.engineClass=e}get placeholder(){if(!this._placeholder){let e=document.createElement("div");e.className="placeholder-content",this.opts.placeholderText&&(e.innerHTML=this.opts.placeholderText),this._placeholder=document.createElement("div"),this._placeholder.classList.add(this.opts.placeholderClass,ie.itemClass,this.opts.itemClass),this.placeholder.appendChild(e)}return this._placeholder}constructor(e,t={}){var d,h;this._gsEventHandler={},this._extraDragRow=0,this.el=e,t=t||{},e.classList.contains("grid-stack")||this.el.classList.add("grid-stack"),t.row&&(t.minRow=t.maxRow=t.row,delete t.row);let i=g.toNumber(e.getAttribute("gs-row"));t.column==="auto"&&delete t.column,t.alwaysShowResizeHandle!==void 0&&(t._alwaysShowResizeHandle=t.alwaysShowResizeHandle);let s={...g.cloneDeep(ie),column:g.toNumber(e.getAttribute("gs-column"))||ie.column,minRow:i||g.toNumber(e.getAttribute("gs-min-row"))||ie.minRow,maxRow:i||g.toNumber(e.getAttribute("gs-max-row"))||ie.maxRow,staticGrid:g.toBool(e.getAttribute("gs-static"))||ie.staticGrid,draggable:{handle:(t.handleClass?"."+t.handleClass:t.handle?t.handle:"")||ie.draggable.handle},removableOptions:{accept:t.itemClass||ie.removableOptions.accept,decline:ie.removableOptions.decline}};e.getAttribute("gs-animate")&&(s.animate=g.toBool(e.getAttribute("gs-animate"))),this.opts=g.defaults(t,s),t=null,this._initMargin(),this.opts.column!==1&&!this.opts.disableOneColumnMode&&this._widthOrContainer()<=this.opts.oneColumnSize&&(this._prevColumn=this.getColumn(),this.opts.column=1),this.opts.rtl==="auto"&&(this.opts.rtl=e.style.direction==="rtl"),this.opts.rtl&&this.el.classList.add("grid-stack-rtl");const r=(d=this.el.parentElement)==null?void 0:d.parentElement;let l=r!=null&&r.classList.contains(ie.itemClass)?r.gridstackNode:void 0;l&&(l.subGrid=this,this.parentGridItem=l,this.el.classList.add("grid-stack-nested"),l.el.classList.add("grid-stack-sub-grid")),this._isAutoCellHeight=this.opts.cellHeight==="auto",this._isAutoCellHeight||this.opts.cellHeight==="initial"?this.cellHeight(void 0,!1):(typeof this.opts.cellHeight=="number"&&this.opts.cellHeightUnit&&this.opts.cellHeightUnit!==ie.cellHeightUnit&&(this.opts.cellHeight=this.opts.cellHeight+this.opts.cellHeightUnit,delete this.opts.cellHeightUnit),this.cellHeight(this.opts.cellHeight,!1)),this.opts.alwaysShowResizeHandle==="mobile"&&(this.opts.alwaysShowResizeHandle=ne),this._styleSheetClass="gs-id-"+ae._idSeq++,this.el.classList.add(this._styleSheetClass),this._setStaticClass();let n=this.opts.engineClass||T.engineClass||ae;if(this.engine=new n({column:this.getColumn(),float:this.opts.float,maxRow:this.opts.maxRow,onChange:c=>{let f=0;this.engine.nodes.forEach(p=>{f=Math.max(f,p.y+p.h)}),c.forEach(p=>{let _=p.el;_&&(p._removeDOM?(_&&_.remove(),delete p._removeDOM):this._writePosAttr(_,p))}),this._updateStyles(!1,f)}}),this.opts.auto&&(this.batchUpdate(),this.getGridItems().forEach(c=>this._prepareElement(c)),this.batchUpdate(!1)),this.opts.children){let c=this.opts.children;delete this.opts.children,c.length&&this.load(c)}this.setAnimation(this.opts.animate),this._updateStyles(),this.el.classList.add("gs-"+this.opts.column),this.opts.subGridDynamic&&!E.pauseDrag&&(E.pauseDrag=!0),((h=this.opts.draggable)==null?void 0:h.pause)!==void 0&&(E.pauseDrag=this.opts.draggable.pause),this._setupRemoveDrop(),this._setupAcceptWidget(),this._updateResizeEvent()}addWidget(e,t){function i(n){return n.el!==void 0||n.x!==void 0||n.y!==void 0||n.w!==void 0||n.h!==void 0||n.content!==void 0}let s,r;if(typeof e=="string"){let n=document.implementation.createHTMLDocument("");n.body.innerHTML=e,s=n.body.children[0]}else if(arguments.length===0||arguments.length===1&&i(e))if(r=t=e,r!=null&&r.el)s=r.el;else if(T.addRemoveCB)s=T.addRemoveCB(this.el,t,!0,!1);else{let n=(t==null?void 0:t.content)||"",d=document.implementation.createHTMLDocument("");d.body.innerHTML=`<div class="grid-stack-item ${this.opts.itemClass||""}"><div class="grid-stack-item-content">${n}</div></div>`,s=d.body.children[0]}else s=e;if(!s)return;if(r=s.gridstackNode,r&&s.parentElement===this.el&&this.engine.nodes.find(n=>n._id===r._id))return s;let l=this._readAttr(s);return t=g.cloneDeep(t)||{},g.defaults(t,l),r=this.engine.prepareNode(t),this._writeAttr(s,t),this._insertNotAppend?this.el.prepend(s):this.el.appendChild(s),this.makeWidget(s,t),s}makeSubGrid(e,t,i,s=!0){var _,x,z;let r=e.gridstackNode;if(r||(r=this.makeWidget(e).gridstackNode),(_=r.subGrid)!=null&&_.el)return r.subGrid;let l,n=this;for(;n&&!l;)l=(x=n.opts)==null?void 0:x.subGridOpts,n=(z=n.parentGridItem)==null?void 0:z.grid;t=g.cloneDeep({...l||{},children:void 0,...t||r.subGridOpts}),r.subGridOpts=t;let d;t.column==="auto"&&(d=!0,t.column=Math.max(r.w||1,(i==null?void 0:i.w)||1),t.disableOneColumnMode=!0);let h=r.el.querySelector(".grid-stack-item-content"),c,f;if(s){if(this._removeDD(r.el),f={...r,x:0,y:0},g.removeInternalForSave(f),delete f.subGridOpts,r.content&&(f.content=r.content,delete r.content),T.addRemoveCB)c=T.addRemoveCB(this.el,f,!0,!1);else{let H=document.implementation.createHTMLDocument("");H.body.innerHTML='<div class="grid-stack-item"></div>',c=H.body.children[0],c.appendChild(h),H.body.innerHTML='<div class="grid-stack-item-content"></div>',h=H.body.children[0],r.el.appendChild(h)}this._prepareDragDropByNode(r)}if(i){let H=d?t.column:r.w,D=r.h+i.h,N=r.el.style;N.transition="none",this.update(r.el,{w:H,h:D}),setTimeout(()=>N.transition=null)}let p=r.subGrid=T.addGrid(h,t);return i!=null&&i._moving&&(p._isTemp=!0),d&&(p._autoColumn=!0),s&&p.addWidget(c,f),i&&(i._moving?window.setTimeout(()=>g.simulateMouseEvent(i._event,"mouseenter",p.el),0):p.addWidget(r.el,r)),p}removeAsSubGrid(e){var i;let t=(i=this.parentGridItem)==null?void 0:i.grid;t&&(t.batchUpdate(),t.removeWidget(this.parentGridItem.el,!0,!0),this.engine.nodes.forEach(s=>{s.x+=this.parentGridItem.x,s.y+=this.parentGridItem.y,t.addWidget(s.el,s)}),t.batchUpdate(!1),this.parentGridItem&&delete this.parentGridItem.subGrid,delete this.parentGridItem,e&&window.setTimeout(()=>g.simulateMouseEvent(e._event,"mouseenter",t.el),0))}save(e=!0,t=!1,i=T.saveCB){let s=this.engine.save(e,i);if(s.forEach(r=>{var l;if(e&&r.el&&!r.subGrid&&!i){let n=r.el.querySelector(".grid-stack-item-content");r.content=n?n.innerHTML:void 0,r.content||delete r.content}else if(!e&&!i&&delete r.content,(l=r.subGrid)!=null&&l.el){const n=r.subGrid.save(e,t,i);r.subGridOpts=t?n:{children:n},delete r.subGrid}delete r.el}),t){let r=g.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",delete r.disableOneColumnMode);const l=r._alwaysShowResizeHandle;return delete r._alwaysShowResizeHandle,l!==void 0?r.alwaysShowResizeHandle=l:delete r.alwaysShowResizeHandle,g.removeInternalAndSame(r,ie),r.children=s,r}return s}load(e,t=T.addRemoveCB||!0){e=g.cloneDeep(e);const i=e.some(h=>h.x!==void 0||h.y!==void 0);i&&(e=g.sort(e,-1,this._prevColumn||this.getColumn())),this._insertNotAppend=i;const s=this.opts.column;this._prevColumn&&this._prevColumn!==s&&e.some(h=>(h.x||0)+h.w>s)&&(this._ignoreLayoutsNodeChange=!0,this.engine.cacheLayout(e,this._prevColumn,!0));const r=T.addRemoveCB;typeof t=="function"&&(T.addRemoveCB=t);let l=[];this.batchUpdate(),t&&[...this.engine.nodes].forEach(c=>{if(!c.id)return;g.find(e,c.id)||(T.addRemoveCB&&T.addRemoveCB(this.el,c,!1,!1),l.push(c),this.removeWidget(c.el,!0,!1))});let n=[];this.engine.nodes=this.engine.nodes.filter(h=>g.find(e,h.id)?(n.push(h),!1):!0);let d=!1;return e.forEach(h=>{var f;let c=g.find(n,h.id);if(c){if(g.shouldSizeToContent(c)&&(h.h=c.h),this.engine.nodeBoundFix(h),(h.autoPosition||h.x===void 0||h.y===void 0)&&(h.w=h.w||c.w,h.h=h.h||c.h,this.engine.findEmptyPosition(h)),d=d||h.w!==void 0&&h.w!==c.w,this.engine.nodes.push(c),g.samePos(c,h)&&this.moveNode(c,{...h,forceCollide:!0}),this.update(c.el,h),(f=h.subGridOpts)!=null&&f.children){let p=c.el.querySelector(".grid-stack");p&&p.gridstack&&(p.gridstack.load(h.subGridOpts.children),this._insertNotAppend=!0)}}else t&&this.addWidget(h)}),this.engine.removedNodes=l,this.doContentResize(d,!0),this.batchUpdate(!1),delete this._ignoreLayoutsNodeChange,delete this._insertNotAppend,r?T.addRemoveCB=r:delete T.addRemoveCB,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;let t=this.el.querySelector("."+this.opts.itemClass);if(t){let s=g.toNumber(t.getAttribute("gs-h"))||1;return Math.round(t.offsetHeight/s)}let 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){let s=-this.opts.marginRight-this.opts.marginLeft+this.opts.marginTop+this.opts.marginBottom;e=this.cellWidth()+s}let i=g.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.doContentResize(!1,!0),t&&this._updateStyles(!0),this)}cellWidth(){return this._widthOrContainer()/this.getColumn()}_widthOrContainer(){return this.el.clientWidth||this.el.parentElement.clientWidth||window.innerWidth}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;let i=this.getColumn();e===1&&!this.opts.disableOneColumnMode?this._prevColumn=i:delete this._prevColumn,this.el.classList.remove("gs-"+i),this.el.classList.add("gs-"+e),this.opts.column=this.engine.column=e;let s;return e===1&&this.opts.oneColumnModeDomSort&&(s=[],this.getGridItems().forEach(r=>{r.gridstackNode&&s.push(r.gridstackNode)}),s.length||(s=void 0)),this.engine.columnChanged(i,e,s,t),this._isAutoCellHeight&&this.cellHeight(),this.doContentResize(),this._ignoreLayoutsNodeChange=!0,this._triggerChangeEvent(),delete this._ignoreLayoutsNodeChange,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))}destroy(e=!0){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(),this.parentGridItem&&delete this.parentGridItem.subGrid,delete this.parentGridItem,delete this.opts,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){let i=this.el.getBoundingClientRect(),s;t?s={top:i.top+document.documentElement.scrollTop,left:i.left}:s={top:this.el.offsetTop,left:this.el.offsetLeft};let r=e.left-s.left,l=e.top-s.top,n=i.width/this.getColumn(),d=i.height/parseInt(this.el.getAttribute("gs-current-row"));return{x:Math.floor(r/n),y:Math.floor(l/d)}}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){let i=T.getElement(e);this._prepareElement(i,!0,t);const s=i.gridstackNode;return this._updateContainerHeight(),this.doContentResize(!1,!1,s),s.subGridOpts&&this.makeSubGrid(i,s.subGridOpts,void 0,!1),this._prevColumn&&this.opts.column===1&&(this._ignoreLayoutsNodeChange=!0),this._triggerAddEvent(),this._triggerChangeEvent(),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=>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.log("GridStack.on("+e+') event not supported, but you can still use $(".grid-stack").on(...) while jquery-ui is still used internally.'),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 T.getElements(e).forEach(s=>{if(s.parentElement&&s.parentElement!==this.el)return;let r=s.gridstackNode;r||(r=this.engine.nodes.find(l=>s===l.el)),r&&(T.addRemoveCB&&T.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}removeAll(e=!0){return this.engine.nodes.forEach(t=>{delete t.el.gridstackNode,this._removeDD(t.el)}),this.engine.removeAll(e),this._triggerRemoveEvent(),this}setAnimation(e){return e?this.el.classList.add("grid-stack-animate"):this.el.classList.remove("grid-stack-animate"),this}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");let i=arguments,s=1;return t={x:i[s++],y:i[s++],w:i[s++],h:i[s++]},this.update(e,t)}return T.getElements(e).forEach(i=>{var c;let s=i==null?void 0:i.gridstackNode;if(!s)return;let r=g.cloneDeep(t);this.engine.nodeBoundFix(r),delete r.autoPosition,delete r.id;let l=["x","y","w","h"],n;if(l.some(f=>r[f]!==void 0&&r[f]!==s[f])&&(n={},l.forEach(f=>{n[f]=r[f]!==void 0?r[f]:s[f],delete r[f]})),!n&&(r.minW||r.minH||r.maxW||r.maxH)&&(n={}),r.content!==void 0){const f=i.querySelector(".grid-stack-item-content");f&&f.innerHTML!==r.content&&(f.innerHTML=r.content,(c=s.subGrid)!=null&&c.el&&(f.appendChild(s.subGrid.el),s.subGrid.opts.styleInHead||s.subGrid._updateStyles(!0))),delete r.content}let d=!1,h=!1;for(const f in r)f[0]!=="_"&&s[f]!==r[f]&&(s[f]=r[f],d=!0,h=h||!this.opts.staticGrid&&(f==="noResize"||f==="noMove"||f==="locked"));g.sanitizeMinMax(s),n&&this.moveNode(s,n),(n||d)&&this._writeAttr(i,s),h&&this._prepareDragDropByNode(s)}),this}moveNode(e,t){this.engine.cleanNodes().beginUpdate(e).moveNode(e,t),this._updateContainerHeight(),this._triggerChangeEvent(),this.engine.endUpdate()}resizeToContent(e,t=!1){if(!e||(e.classList.remove("size-to-content-max"),!e.clientHeight))return;let i=e.gridstackNode;if(!i)return;const s=i.grid;if(!s||e.parentElement!==s.el)return;const r=s.getCellHeight();if(!r)return;let l=t&&i.h?i.h*r:e.clientHeight,n;if(i.resizeToContentParent&&(n=e.querySelector(i.resizeToContentParent)),n||(n=e.querySelector(T.resizeToContentParent)),!n)return;const d=e.clientHeight-n.clientHeight,h=t&&i.h?i.h*r-d:n.clientHeight;let c;if(i.subGrid)c=i.subGrid.getRow()*i.subGrid.getCellHeight();else{const _=n.firstElementChild;if(!_){console.log(`Error: resizeToContent() '${T.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);return}c=_.getBoundingClientRect().height||h}if(h===c)return;l+=c-h;let f=Math.ceil(l/r);const p=Number.isInteger(i.sizeToContent)?i.sizeToContent:0;p&&f>p&&(f=p,e.classList.add("size-to-content-max")),i.minH&&f<i.minH?f=i.minH:i.maxH&&f>i.maxH&&(f=i.maxH),f!==i.h&&(s._ignoreLayoutsNodeChange=!0,s.moveNode(i,{h:f}),delete s._ignoreLayoutsNodeChange)}resizeToContentCheck(e,t=!1){T.resizeToContentCB?T.resizeToContentCB(e,t):this.resizeToContent(e,t)}margin(e){if(!(typeof e=="string"&&e.split(" ").length>1)){let i=g.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");let t=arguments,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;let 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;return this.engine.batchMode?this:((e=this.engine.addedNodes)!=null&&e.length&&(this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(this.engine.addedNodes),this.engine.addedNodes.forEach(t=>{delete t._dirty}),this._triggerEvent("added",this.engine.addedNodes),this.engine.addedNodes=[]),this)}_triggerRemoveEvent(){var e;return this.engine.batchMode?this:((e=this.engine.removedNodes)!=null&&e.length&&(this._triggerEvent("removed",this.engine.removedNodes),this.engine.removedNodes=[]),this)}_triggerEvent(e,t){let i=t?new CustomEvent(e,{bubbles:!1,detail:t}):new Event(e);return this.el.dispatchEvent(i),this}_removeStylesheet(){return this._styles&&(g.removeStylesheet(this._styleSheetClass),delete this._styles),this}_updateStyles(e=!1,t){if(e&&this._removeStylesheet(),t||(t=this.getRow()),this._updateContainerHeight(),this.opts.cellHeight===0)return this;let i=this.opts.cellHeight,s=this.opts.cellHeightUnit,r=`.${this._styleSheetClass} > .${this.opts.itemClass}`;if(!this._styles){let l=this.opts.styleInHead?void 0:this.el.parentNode;if(this._styles=g.createStylesheet(this._styleSheetClass,l,{nonce:this.opts.nonce}),!this._styles)return this;this._styles._max=0,g.addCSSRule(this._styles,r,`height: ${i}${s}`);let n=this.opts.marginTop+this.opts.marginUnit,d=this.opts.marginBottom+this.opts.marginUnit,h=this.opts.marginRight+this.opts.marginUnit,c=this.opts.marginLeft+this.opts.marginUnit,f=`${r} > .grid-stack-item-content`,p=`.${this._styleSheetClass} > .grid-stack-placeholder > .placeholder-content`;g.addCSSRule(this._styles,f,`top: ${n}; right: ${h}; bottom: ${d}; left: ${c};`),g.addCSSRule(this._styles,p,`top: ${n}; right: ${h}; bottom: ${d}; left: ${c};`),g.addCSSRule(this._styles,`${r} > .ui-resizable-ne`,`right: ${h}`),g.addCSSRule(this._styles,`${r} > .ui-resizable-e`,`right: ${h}`),g.addCSSRule(this._styles,`${r} > .ui-resizable-se`,`right: ${h}; bottom: ${d}`),g.addCSSRule(this._styles,`${r} > .ui-resizable-nw`,`left: ${c}`),g.addCSSRule(this._styles,`${r} > .ui-resizable-w`,`left: ${c}`),g.addCSSRule(this._styles,`${r} > .ui-resizable-sw`,`left: ${c}; bottom: ${d}`)}if(t=t||this._styles._max,t>this._styles._max){let l=n=>i*n+s;for(let n=this._styles._max+1;n<=t;n++)g.addCSSRule(this._styles,`${r}[gs-y="${n}"]`,`top: ${l(n)}`),g.addCSSRule(this._styles,`${r}[gs-h="${n+1}"]`,`height: ${l(n+1)}`);this._styles._max=t}return this}_updateContainerHeight(){if(!this.engine||this.engine.batchMode)return this;const e=this.parentGridItem;let t=this.getRow()+this._extraDragRow;const i=this.opts.cellHeight,s=this.opts.cellHeightUnit;if(!i)return this;if(!e){const r=g.parseHeight(getComputedStyle(this.el).minHeight);if(r.h>0&&r.unit===s){const l=Math.floor(r.h/i);t<l&&(t=l)}}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&&g.shouldSizeToContent(e)&&e.grid.resizeToContentCheck(e.el),this}_prepareElement(e,t=!1,i){e.classList.add(this.opts.itemClass),i=i||this._readAttr(e),e.gridstackNode=i,i.el=e,i.grid=this;let s={...i};return i=this.engine.addNode(i,t),g.same(i,s)||this._writeAttr(e,i),g.shouldSizeToContent(i)&&e.classList.add("size-to-content"),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);let i={autoPosition:"gs-auto-position",noResize:"gs-no-resize",noMove:"gs-no-move",locked:"gs-locked",id:"gs-id"};for(const s in i)t[s]?e.setAttribute(i[s],String(t[s])):e.removeAttribute(i[s]);return this}_readAttr(e,t=!0){let i={};i.x=g.toNumber(e.getAttribute("gs-x")),i.y=g.toNumber(e.getAttribute("gs-y")),i.w=g.toNumber(e.getAttribute("gs-w")),i.h=g.toNumber(e.getAttribute("gs-h")),i.autoPosition=g.toBool(e.getAttribute("gs-auto-position")),i.noResize=g.toBool(e.getAttribute("gs-no-resize")),i.noMove=g.toBool(e.getAttribute("gs-no-move")),i.locked=g.toBool(e.getAttribute("gs-locked")),i.id=e.getAttribute("gs-id"),i.maxW=g.toNumber(e.getAttribute("gs-max-w")),i.minW=g.toNumber(e.getAttribute("gs-min-w")),i.maxH=g.toNumber(e.getAttribute("gs-max-h")),i.minH=g.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(){let 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(){var t;if(!((t=this.el)!=null&&t.clientWidth)||this.prevWidth===this.el.clientWidth)return;this.prevWidth=this.el.clientWidth,this.batchUpdate();let e=!1;if(this._autoColumn&&this.parentGridItem)this.opts.column!==this.parentGridItem.w&&(this.column(this.parentGridItem.w,"none"),e=!0);else{let i=!this.opts.disableOneColumnMode&&this.el.clientWidth<=this.opts.oneColumnSize||this.opts.column===1&&!this._prevColumn;this.opts.column===1!==i&&(this.column(i?1:this._prevColumn),e=!0)}return this._isAutoCellHeight&&this.cellHeight(),this.engine.nodes.forEach(i=>{i.subGrid&&i.subGrid.onResize()}),this._skipInitialResize||this.doContentResize(e),delete this._skipInitialResize,this.batchUpdate(!1),this}doContentResize(e=!0,t=!1,i=void 0){setTimeout(()=>{if(this.engine){if(i)g.shouldSizeToContent(i)&&this.resizeToContentCheck(i.el,t);else if(this.engine.nodes.some(s=>g.shouldSizeToContent(s))){const s=[...this.engine.nodes];this.batchUpdate(),s.forEach(r=>{g.shouldSizeToContent(r)&&this.resizeToContentCheck(r.el,t)}),this.batchUpdate(!1)}this._gsEventHandler.resizecontent&&this._gsEventHandler.resizecontent(null,i?[i]:this.engine.nodes)}},e?310:0)}_updateResizeEvent(e=!1){const t=!this.parentGridItem&&(this._isAutoCellHeight||this.opts.sizeToContent||!this.opts.disableOneColumnMode||this.engine.nodes.find(i=>i.sizeToContent));return!e&&t&&!this.resizeObserver?(this._sizeThrottle=g.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 g.getElement(e)}static getElements(e=".grid-stack-item"){return g.getElements(e)}static getGridElement(e){return T.getElement(e)}static getGridElements(e){return g.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=g.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=g.parseHeight(this.opts.marginTop),this.opts.marginTop=e.h,delete this.opts.margin),this.opts.marginBottom===void 0?this.opts.marginBottom=t:(e=g.parseHeight(this.opts.marginBottom),this.opts.marginBottom=e.h,delete this.opts.margin),this.opts.marginRight===void 0?this.opts.marginRight=t:(e=g.parseHeight(this.opts.marginRight),this.opts.marginRight=e.h,delete this.opts.margin),this.opts.marginLeft===void 0?this.opts.marginLeft=t:(e=g.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 q}static setupDragIn(e,t,i=document){(t==null?void 0:t.pause)!==void 0&&(E.pauseDrag=t.pause),t={...Cr,...t||{}};let s=typeof e=="string"?g.getElements(e,i):e;s.length&&(s==null||s.forEach(r=>{q.isDraggable(r)||q.dragIn(r,t)}))}movable(e,t){return this.opts.staticGrid?this:(T.getElements(e).forEach(i=>{let s=i.gridstackNode;s&&(t?delete s.noMove:s.noMove=!0,this._prepareDragDropByNode(s))}),this)}resizable(e,t){return this.opts.staticGrid?this:(T.getElements(e).forEach(i=>{let 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)}_removeDD(e){return q.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 q.droppable(this.el,"destroy"),this;let e,t,i=(s,r,l)=>{let n=r.gridstackNode;if(!n)return;l=l||r;let d=this.el.getBoundingClientRect(),{top:h,left:c}=l.getBoundingClientRect();c-=d.left,h-=d.top;let f={position:{top:h,left:c}};if(n._temporaryRemoved){if(n.x=Math.max(0,Math.round(c/t)),n.y=Math.max(0,Math.round(h/e)),delete n.autoPosition,this.engine.nodeBoundFix(n),!this.engine.willItFit(n)){if(n.autoPosition=!0,!this.engine.willItFit(n)){q.off(r,"drag");return}n._willFitPos&&(g.copyPos(n,n._willFitPos),delete n._willFitPos)}this._onStartMoving(l,s,f,n,t,e)}else this._dragOrResize(l,s,f,n,t,e)};return q.droppable(this.el,{accept:s=>{let r=s.gridstackNode;if((r==null?void 0:r.grid)===this)return!0;if(!this.opts.acceptWidgets)return!1;let l=!0;if(typeof this.opts.acceptWidgets=="function")l=this.opts.acceptWidgets(s);else{let n=this.opts.acceptWidgets===!0?".grid-stack-item":this.opts.acceptWidgets;l=s.matches(n)}if(l&&r&&this.opts.maxRow){let n={w:r.w,h:r.h,minW:r.minW,minH:r.minH};l=this.engine.willItFit(n)}return l}}).on(this.el,"dropover",(s,r,l)=>{let n=r.gridstackNode;if((n==null?void 0:n.grid)===this&&!n._temporaryRemoved)return!1;n!=null&&n.grid&&n.grid!==this&&!n._temporaryRemoved&&n.grid._leave(r,l),t=this.cellWidth(),e=this.getCellHeight(!0),n||(n=this._readAttr(r,!1)),n.grid||(n._isExternal=!0,r.gridstackNode=n),l=l||r;let d=n.w||Math.round(l.offsetWidth/t)||1,h=n.h||Math.round(l.offsetHeight/e)||1;return n.grid&&n.grid!==this?(r._gridstackNodeOrig||(r._gridstackNodeOrig=n),r.gridstackNode=n={...n,w:d,h,grid:this},delete n.x,delete n.y,this.engine.cleanupNode(n).nodeBoundFix(n),n._initDD=n._isExternal=n._temporaryRemoved=!0):(n.w=d,n.h=h,n._temporaryRemoved=!0),this._itemRemoving(n.el,!1),q.on(r,"drag",i),i(s,r,l),!1}).on(this.el,"dropout",(s,r,l)=>{let n=r.gridstackNode;return n&&(!n.grid||n.grid===this)&&(this._leave(r,l),this._isTemp&&this.removeAsSubGrid(n)),!1}).on(this.el,"drop",(s,r,l)=>{var f,p;let n=r.gridstackNode;if((n==null?void 0:n.grid)===this&&!n._isExternal)return!1;let d=!!this.placeholder.parentElement;this.placeholder.remove();let h=r._gridstackNodeOrig;if(delete r._gridstackNodeOrig,d&&(h!=null&&h.grid)&&h.grid!==this){let _=h.grid;_.engine.removeNodeFromLayoutCache(h),_.engine.removedNodes.push(h),_._triggerRemoveEvent()._triggerChangeEvent(),_.parentGridItem&&!_.engine.nodes.length&&_.opts.subGridDynamic&&_.removeAsSubGrid()}if(!n||(d&&(this.engine.cleanupNode(n),n.grid=this),delete n.grid._isTemp,q.off(r,"drag"),l!==r?(l.remove(),r.gridstackNode=h,d&&(r=r.cloneNode(!0))):(r.remove(),this._removeDD(r)),!d))return!1;r.gridstackNode=n,n.el=r;let c=(p=(f=n.subGrid)==null?void 0:f.el)==null?void 0:p.gridstack;return g.copyPos(n,this._readAttr(this.placeholder)),g.removePositioningStyles(r),this._writeAttr(r,n),r.classList.add(ie.itemClass,this.opts.itemClass),this.el.appendChild(r),c&&(c.parentGridItem=n,c.opts.styleInHead||c._updateStyles(!0)),this._prepareDragDropByNode(n),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),!1}),this}_itemRemoving(e,t){let i=e?e.gridstackNode:void 0;!i||!i.grid||e.classList.contains(this.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(!this.opts.staticGrid&&typeof this.opts.removable=="string"){let e=document.querySelector(this.opts.removable);if(!e)return this;q.isDroppable(e)||q.droppable(e,this.opts.removableOptions).on(e,"dropover",(t,i)=>this._itemRemoving(i,!0)).on(e,"dropout",(t,i)=>this._itemRemoving(i,!1))}return this}_prepareDragDropByNode(e){let t=e.el;const 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,l,n=(c,f)=>{this._gsEventHandler[c.type]&&this._gsEventHandler[c.type](c,c.target),r=this.cellWidth(),l=this.getCellHeight(!0),this._onStartMoving(t,c,f,e,r,l)},d=(c,f)=>{this._dragOrResize(t,c,f,e,r,l)},h=c=>{this.placeholder.remove(),delete e._moving,delete e._event,delete e._lastTried;let f=c.target;if(!(!f.gridstackNode||f.gridstackNode.grid!==this)){if(e.el=f,e._isAboutToRemove){let p=t.gridstackNode.grid;p._gsEventHandler[c.type]&&p._gsEventHandler[c.type](c,f),p.engine.nodes.push(e),p.removeWidget(t,!0,!0)}else g.removePositioningStyles(f),e._temporaryRemoved?(g.copyPos(e,e._orig),this._writePosAttr(f,e),this.engine.addNode(e)):this._writePosAttr(f,e),this._gsEventHandler[c.type]&&this._gsEventHandler[c.type](c,f);this._extraDragRow=0,this._updateContainerHeight(),this._triggerChangeEvent(),this.engine.endUpdate(),c.type==="resizestop"&&(Number.isInteger(e.sizeToContent)&&(e.sizeToContent=e.h),this.doContentResize(!1,!0,e))}};q.draggable(t,{start:n,stop:h,drag:d}).resizable(t,{start:n,stop:h,resize:d}),e._initDD=!0}return q.draggable(t,i?"disable":"enable").resizable(t,s?"disable":"enable"),this}_onStartMoving(e,t,i,s,r,l){this.engine.cleanNodes().beginUpdate(s),this._writePosAttr(this.placeholder,s),this.el.appendChild(this.placeholder),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,l,this.opts.marginTop,this.opts.marginRight,this.opts.marginBottom,this.opts.marginLeft),t.type==="resizestart"&&(q.resizable(e,"option","minWidth",r*(s.minW||1)).resizable(e,"option","minHeight",l*(s.minH||1)),s.maxW&&q.resizable(e,"option","maxWidth",r*s.maxW),s.maxH&&q.resizable(e,"option","maxHeight",l*s.maxH))}_dragOrResize(e,t,i,s,r,l){let n={...s._orig},d,h=this.opts.marginLeft,c=this.opts.marginRight,f=this.opts.marginTop,p=this.opts.marginBottom,_=Math.round(l*.1),x=Math.round(r*.1);if(h=Math.min(h,x),c=Math.min(c,x),f=Math.min(f,_),p=Math.min(p,_),t.type==="drag"){if(s._temporaryRemoved)return;let H=i.position.top-s._prevYPix;s._prevYPix=i.position.top,this.opts.draggable.scroll!==!1&&g.updateScrollPosition(e,i.position,H);let D=i.position.left+(i.position.left>s._lastUiPosition.left?-c:h),N=i.position.top+(i.position.top>s._lastUiPosition.top?-p:f);n.x=Math.round(D/r),n.y=Math.round(N/l);let C=this._extraDragRow;if(this.engine.collide(s,n)){let y=this.getRow(),w=Math.max(0,n.y+s.h-y);this.opts.maxRow&&y+w>this.opts.maxRow&&(w=Math.max(0,this.opts.maxRow-y)),this._extraDragRow=w}else this._extraDragRow=0;if(this._extraDragRow!==C&&this._updateContainerHeight(),s.x===n.x&&s.y===n.y)return}else if(t.type==="resize"){if(n.x<0||(g.updateScrollResize(t,e,l),n.w=Math.round((i.size.width-h)/r),n.h=Math.round((i.size.height-f)/l),s.w===n.w&&s.h===n.h)||s._lastTried&&s._lastTried.w===n.w&&s._lastTried.h===n.h)return;let H=i.position.left+h,D=i.position.top+f;n.x=Math.round(H/r),n.y=Math.round(D/l),d=!0}s._event=t,s._lastTried=n;let z={x:i.position.left+h,y:i.position.top+f,w:(i.size?i.size.width:s.w*r)-h-c,h:(i.size?i.size.height:s.h*l)-f-p};if(this.engine.moveNodeCheck(s,{...n,cellWidth:r,cellHeight:l,rect:z,resizing:d})){s._lastUiPosition=i.position,this.engine.cacheRects(r,l,f,c,p,h),delete s._skipDown,d&&s.subGrid&&s.subGrid.onResize(),this._extraDragRow=0,this._updateContainerHeight();let H=t.target;this._writePosAttr(H,s),this._gsEventHandler[t.type]&&this._gsEventHandler[t.type](t,H)}}_leave(e,t){let i=e.gridstackNode;i&&(q.off(e,"drag"),!i._temporaryRemoved&&(i._temporaryRemoved=!0,this.engine.removeNode(i),i.el=i._isExternal&&t?t:e,this.opts.removable===!0&&this._itemRemoving(e,!0),e._gridstackNodeOrig?(e.gridstackNode=e._gridstackNodeOrig,delete e._gridstackNodeOrig):i._isExternal&&(delete i.el,delete e.gridstackNode,this.engine.restoreInitial())))}commit(){return Rr(this,this.batchUpdate(!1),"commit","batchUpdate","5.2"),this}}T.resizeToContentParent=".grid-stack-item-content",T.Utils=g,T.Engine=ae,T.GDRev="9.5.1";const Nr={class:"tw-flex tw-flex-row tw-flex-wrap tw-gap-2"},Lr={class:"color-primary"},zr={class:"color-secondary"},Mr={key:1,class:"empty"},Ir={key:0,class:"clear-filter-div"},Hr=we(a.defineComponent({__name:"Filter",props:{order:{},exclude:{}},setup(o){const e=o,t=Ne(),i=a.computed(()=>({...t.Filters})),s=a.computed(()=>{const h=i.value;return Object.keys(h).map(c=>({key:c,value:h[c]})).filter(({value:c})=>!(c==null||typeof c=="string"&&c.trim()===""||Array.isArray(c)&&c.length===0))}),r=a.computed(()=>{var f;const h=new Set(e.exclude??[]),c=s.value.filter(p=>!h.has(p.key));if((f=e.order)!=null&&f.length){const p=new Map(e.order.map((_,x)=>[_,x]));c.sort((_,x)=>{const z=p.has(_.key)?p.get(_.key):Number.MAX_SAFE_INTEGER,H=p.has(x.key)?p.get(x.key):Number.MAX_SAFE_INTEGER;return z-H||_.key.localeCompare(x.key)})}else c.sort((p,_)=>p.key.localeCompare(_.key));return c});function l(h){return Array.isArray(h)?h.join(", "):h&&typeof h=="object"?JSON.stringify(h):String(h??"")}function n(h){const c=t;typeof c.clearFilter=="function"?c.clearFilter(h):typeof c.clearAllFilters=="function"?c.clearAllFilters(h):t.setFilter(h,void 0)}function d(){t.resetFilters({})}return(h,c)=>{const f=a.resolveComponent("el-icon"),p=a.resolveComponent("el-row");return a.openBlock(),a.createBlock(p,{class:"filter-wrapper tw-m-1",align:"middle",justify:"space-between"},{default:a.withCtx(()=>[a.createElementVNode("div",Nr,[r.value.length?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:0},a.renderList(r.value,_=>(a.openBlock(),a.createBlock(a.unref(mt.ElTag),{class:"color-background",key:_.key,closable:"",onClose:x=>n(_.key),effect:"dark",type:"info"},{default:a.withCtx(()=>[a.createElementVNode("b",Lr,a.toDisplayString(_.key)+": ",1),a.createElementVNode("span",zr,a.toDisplayString(l(_.value)),1)]),_:2},1032,["onClose"]))),128)):(a.openBlock(),a.createElementBlock("span",Mr,"No filters"))]),r.value.length?(a.openBlock(),a.createElementBlock("div",Ir,[a.createVNode(a.unref(mt.ElTooltip),{placement:"top-start",content:"Clear All Filters"},{default:a.withCtx(()=>[a.createVNode(f,{color:"#FFFF",onClick:d},{default:a.withCtx(()=>[a.createVNode(a.unref(rs))]),_:1})]),_:1})])):a.createCommentVNode("",!0)]),_:1})}}}),[["__scopeId","data-v-f706b94f"]]),Or={key:0,class:"content-header dash-header-visible stick-to-top tw-flex tw-flex-row tw-items-center tw-justify-between tw-h-10"},Pr={class:"editing-div"},Br={class:"tw-m-4 tw-leading-none tw-pl-1 widget-name"},$r={class:"header-slot-icon"},Ur={key:1,class:"dash-header-hide content-header"},Fr={class:"header-slot-icon"},Wr=we({__name:"DashHeader",props:{widgetName:{type:String,required:!0},widgetID:{type:String,required:!0},hideHeader:Boolean},setup(o){const e=Ne(),t=o,i=a.ref(null);a.watch(()=>t.widgetName,d=>{i.value=d},{immediate:!0});const s=a.ref(!1),r=a.ref(null);function l(){s.value=!0,r.value&&r.value.focus()}function n(){if(!s.value)return;s.value=!1;const d=e.getDashItem(t.widgetID);d.componentName=i}return(d,h)=>{const c=a.resolveComponent("el-input"),f=a.resolveDirective("click-out");return o.hideHeader?(a.openBlock(),a.createElementBlock("div",Ur,[a.createElementVNode("div",Fr,[a.renderSlot(d.$slots,"default",{},void 0,!0)])])):(a.openBlock(),a.createElementBlock("div",Or,[a.createElementVNode("div",null,[a.withDirectives((a.openBlock(),a.createElementBlock("div",{onKeyup:a.withKeys(n,["enter"]),class:"tw-flex"},[a.withDirectives(a.createElementVNode("div",Pr,[a.createVNode(c,{onFocus:h[0]||(h[0]=p=>p.target.select()),ref_key:"textUserInput",ref:r,modelValue:i.value,"onUpdate:modelValue":h[1]||(h[1]=p=>i.value=p)},null,8,["modelValue"])],512),[[a.vShow,s.value]]),a.withDirectives(a.createElementVNode("div",{onClick:h[2]||(h[2]=p=>l()),class:"visible-div"},[a.createElementVNode("div",Br,a.toDisplayString(i.value),1)],512),[[a.vShow,!s.value]])],32)),[[f,n]])]),a.createElementVNode("div",$r,[a.renderSlot(d.$slots,"default",{},void 0,!0)])]))}}},[["__scopeId","data-v-4f4aa869"]]),Gr={class:"tw-flex"},Vr=we({__name:"WidgetWrapper",props:{widgetID:{type:String,required:!0},staticMode:{type:Boolean,required:!0},componentTag:{required:!0},componentProperties:{type:Object},componentName:{type:String},hideWidgetsHeader:{type:Boolean},isLocked:{type:Boolean,default:!1}},emits:["removeWidget","toggle-lock"],setup(o,{emit:e}){const t=e,i=o;let s=a.ref(null);const r=a.ref(!1);a.watch(()=>i.isLocked,d=>{r.value=d},{immediate:!0});const l=a.ref(null);a.watch(()=>i.hideWidgetsHeader,d=>{l.value=d},{immediate:!0});function n(){t("toggle-lock",{id:i.widgetID,isLocked:r.value})}return(d,h)=>{const c=a.resolveComponent("el-icon");return a.openBlock(),a.createElementBlock("div",{ref_key:"instance",ref:s,class:a.normalizeClass(["grid-stack-item-content",{"locked-widget":o.isLocked}])},[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(o.componentTag),a.mergeProps({class:["widget-body",{"widget-body-no-head":l.value}],widgetID:o.widgetID,hideHeader:l.value},i.componentProperties,{style:{pointerEvents:r.value?"none":"auto"},isLocked:r.value}),{default:a.withCtx(f=>[f?(a.openBlock(),a.createBlock(Wr,{key:0,widgetName:i.componentName,widgetID:o.widgetID,staticMode:o.staticMode,hideHeader:l.value},{default:a.withCtx(()=>[a.createElementVNode("div",Gr,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(f.childIcons,p=>(a.openBlock(),a.createBlock(a.unref(mt.ElTooltip),{placement:"bottom-start"},{content:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(p.tooltip),1)]),default:a.withCtx(()=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(p.comp),{class:"tw-w-4 header-icon",onClick:p.event},null,8,["onClick"]))]),_:2},1024))),256)),a.createVNode(c,{class:"header-icon lock-toggle",onClick:h[0]||(h[0]=p=>n())},{default:a.withCtx(()=>[r.value?(a.openBlock(),a.createBlock(a.unref(hs),{key:0})):(a.openBlock(),a.createBlock(a.unref(ds),{key:1}))]),_:1}),!o.staticMode&&!o.isLocked?(a.openBlock(),a.createBlock(c,{key:0,class:"item-widget-button",onClick:h[1]||(h[1]=p=>d.$emit("removeWidget"))},{default:a.withCtx(()=>[a.createVNode(a.unref(os))]),_:1})):a.createCommentVNode("",!0)])]),_:2},1032,["widgetName","widgetID","staticMode","hideHeader"])):a.createCommentVNode("",!0)]),_:1},16,["class","widgetID","hideHeader","style","isLocked"]))],2)}}},[["__scopeId","data-v-a2daf4ac"]]),qr={class:"dashboard-app"},jr={key:0,class:"dash-header tw-max-h-screen tw-flex tw-flex-col"},Yr={class:"tw-float-left tw-m-1 button"},Xr={key:1,class:"tw-h-10 dash-header"},Kr={class:"tw-float-left tw-m-1"},Zr={class:"tw-m-4 tw-w-40"},Qr=["gs-x","gs-y","gs-w","gs-h","gs-id","id","props","gs-locked","gs-no-move","gs-no-resize"],Jr=we(a.defineComponent({__name:"Dashboard",props:{hideHeader:{},options:{}},setup(o){const e=o,t=Ne(),{DASHBOARD_ITEMS:i}=oe.storeToRefs(t),s={apiUrl:a.computed(()=>{var y;return(y=t.Services)==null?void 0:y.ApiUrl}),s3Url:a.computed(()=>{var y;return(y=t.Services)==null?void 0:y.s3Url}),filters:t.Filters,setFilter:t.setFilter,clearFilter:t.clearFilter,resetFilters:t.resetFilters};a.provide("dashboard:globalVars",s);let r=a.ref("Edit Grid");const{gridInstance:l}=oe.storeToRefs(t),n=a.ref(null);let d=a.ref(!0),h=0;const c=a.ref([]),{ComponentRegistry:f}=oe.storeToRefs(t),p=a.reactive({});a.onBeforeMount(()=>{var y;_(),t.loadFromLocalStorage(),h=((y=i.value)==null?void 0:y.length)+1}),a.onMounted(()=>{x(),z()});function _(){var y,w;t.DefaultLayout=(y=e.options)==null?void 0:y.defaultLayout,t.setOptionServices((w=e.options)==null?void 0:w.services)}function x(){const y={float:!0,column:12,cellHeight:"70px",minRow:12,margin:5,alwaysShowResizeHandle:!0,resizable:{handles:"e,se,s,sw,w,n"}};l.value=T.init(y),l.value.setStatic(d.value)}a.watch(()=>{var y;return(y=e.options)==null?void 0:y.availableWidgets},y=>{f.value={},c.value=[],y&&y.forEach((w,O)=>{let P,S;if(w&&typeof w=="object"&&"name"in w&&"component"in w)P=w.name,S=w.component;else if(w&&typeof w=="object"&&"name"in w&&"loader"in w)P=w.name,S=a.defineAsyncComponent(async()=>{const v=await w.loader();return v.default??v});else if(w&&(typeof w=="function"||typeof w=="object"))S=w,P=w.name||`Widget${O+1}`;else if(typeof w=="function")return;!P||!S||f.value[P]||(f.value[P]=S,c.value.push(P))})},{immediate:!0,deep:!0});function z(){const y=e.options.globalData;if(y){t.clearOptionsDataItems();for(const w in y)t.addOptionsDataItems(w,y[w])}}a.watch(()=>d.value,y=>{l.value.setStatic(y),r.value=y?"Edit Grid":"Save Grid"});function H(y){if(!y)return;const w=`${y}-${h}`,O={id:w,w:2,h:6,autoPosition:!0,component:f.value[y],componentKey:y,componentName:y,Props:{}};h++,i.value.push(O),a.nextTick(()=>{var P;(P=l.value)==null||P.makeWidget(`#${w}`)})}function D(y){var w=i.value.findIndex(P=>P.id==y);i.value.splice(w,1);const O=`#${y}`;l.value.removeWidget(O,!1)}function N({id:y,isLocked:w}){const O=p[y];O&&l.value&&l.value.update(O,{locked:!w,noMove:!w,noResize:!w}),t.toggleWidgetLock(y)}function C(){d.value=!d.value,d.value&&t.saveToLocalStorage()}return(y,w)=>{const O=a.resolveComponent("el-button"),P=a.resolveComponent("el-option"),S=a.resolveComponent("el-select"),v=a.resolveComponent("el-col");return a.openBlock(),a.createElementBlock("div",qr,[y.hideHeader?(a.openBlock(),a.createElementBlock("div",Xr,[w[2]||(w[2]=a.createTextVNode("x ",-1)),a.createElementVNode("span",Kr,[a.createVNode(O,{class:"edit-button",onClick:w[1]||(w[1]=R=>C())},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(a.unref(r)),1)]),_:1})])])):(a.openBlock(),a.createElementBlock("div",jr,[a.createElementVNode("span",Yr,[a.createVNode(O,{class:"edit-button",onClick:w[0]||(w[0]=R=>C())},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(a.unref(r)),1)]),_:1})]),a.createVNode(Hr)])),a.unref(d)?a.createCommentVNode("",!0):(a.openBlock(),a.createBlock(v,{key:2},{default:a.withCtx(()=>[a.createElementVNode("div",Zr,[a.createVNode(S,{placeholder:"Add New Widget"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(c.value,R=>(a.openBlock(),a.createBlock(P,{key:R,label:R,value:R,onClick:L=>H(R)},null,8,["label","value","onClick"]))),128))]),_:1})])]),_:1})),a.createElementVNode("div",{ref_key:"root",ref:n,class:"grid-stack tw-h-screen"},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(i),R=>{var L,Y,_e,ye;return a.openBlock(),a.createElementBlock("div",{class:"grid-stack-item",ref_for:!0,ref:Ee=>p[R.id]=Ee,"gs-x":R.x,"gs-y":R.y,"gs-w":R.w,"gs-h":R.h,"gs-id":R.id,id:R.id,key:R.id,props:R.Props,"gs-locked":(L=R.Props)==null?void 0:L.locked,"gs-no-move":(Y=R.Props)==null?void 0:Y.locked,"gs-no-resize":(_e=R.Props)==null?void 0:_e.locked},[a.createVNode(Vr,{widgetID:R.id,onRemoveWidget:Ee=>D(R.id),onToggleLock:N,"static-mode":a.unref(d),componentTag:R.component,componentProperties:R.Props,componentName:R.componentName,hideWidgetsHeader:R.hideHeader,"is-locked":(ye=R.Props)==null?void 0:ye.locked},null,8,["widgetID","onRemoveWidget","static-mode","componentTag","componentProperties","componentName","hideWidgetsHeader","is-locked"])],8,Qr)}),128))],512)])}}}),[["__scopeId","data-v-e3de89f1"]]);V.MarkdownWidget=Tr,V.PennsieveDashboard=Jr,V.TextWidget=ys,Object.defineProperty(V,Symbol.toStringTag,{value:"Module"})});
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.el-dialog__header[data-v-cd8e85a7]{color:#fff}.full-dialog-dashboard[data-v-cd8e85a7]{width:95%;height:95%;margin:2.5% auto 0}.widget-settings-container[data-v-cd8e85a7]{display:flex;flex-direction:column;gap:16px;font-family:Roboto,sans-serif;font-size:14px;color:var(--textDark)}.widget-setting[data-v-cd8e85a7]{display:flex;flex-direction:column;gap:8px}.widget-setting .text-settings-height[data-v-cd8e85a7]{--el-input-height: 42px}.dialog-footer[data-v-cd8e85a7]{display:flex;justify-content:flex-end;gap:10px}.el-button[data-v-cd8e85a7]{background-color:var(--el-color-primary);border-color:var(--el-color-primary-dark-2);color:#fff}.el-button[data-v-cd8e85a7]:hover{background-color:var(--el-color-primary-light-3);border-color:var(--el-color-primary-dark-2)}.text-widget-wrap[data-v-eaf38a2d]{margin:auto}.markdown-widget-wrap[data-v-b2d32c29]{max-width:none;width:100%;min-width:0;height:100%;display:flex;flex-direction:column;box-sizing:border-box;margin-left:5px}.markdown-input[data-v-b2d32c29],.markdown-output[data-v-b2d32c29]{flex:1 1 auto;width:100%;height:100%;min-height:0;box-sizing:border-box}.markdown-input[data-v-b2d32c29]{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.95rem;line-height:1.5;padding:.75rem;border:1px solid #ddd;border-radius:.5rem;resize:none}.markdown-output[data-v-b2d32c29]{overflow:auto}.markdown-output[data-v-b2d32c29] pre,.markdown-output[data-v-b2d32c29] code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.markdown-output[data-v-b2d32c29] h1{font-size:1.75rem;margin:1rem 0 .5rem}.markdown-output[data-v-b2d32c29] h2{font-size:1.5rem;margin:1rem 0 .5rem}.markdown-output[data-v-b2d32c29] p{margin:.5rem 0}.color-secondary[data-v-6ce6db0c]{color:var(--dash-secondary)}.color-primary[data-v-6ce6db0c]{color:var(--dash-text-medium)}.color-background[data-v-6ce6db0c]{background-color:var(--dash-background)}.filter-wrapper[data-v-6ce6db0c]{background-color:var(--dash-secondary);height:33px;padding:0 8px;justify-content:space-between;width:100%}.clear-filter-div[data-v-6ce6db0c]{width:33px;height:33px;margin-left:10px}.empty[data-v-6ce6db0c]{opacity:.8;color:#ddd}.content-header .visible-div[data-v-1e30b12b]{min-width:100px;height:40px}.content-header .editing-div[data-v-1e30b12b]{width:150px}.header-slot-icon[data-v-1e30b12b]{position:absolute;top:5px;right:5px}.dash-header-visible[data-v-1e30b12b]{min-height:40px}.stick-to-top[data-v-1e30b12b]{position:sticky;top:0;width:100%}[data-v-a2daf4ac] .content-header{z-index:3;width:100%;overflow:hidden}[data-v-a2daf4ac] .content-header h3{margin:10px}[data-v-a2daf4ac] .content-header .item-widget-button,[data-v-a2daf4ac] .content-header .close-button{cursor:pointer;margin-right:3px;width:20px;height:20px}[data-v-a2daf4ac] .widget-body{height:calc(100% - 40px)}[data-v-a2daf4ac] .widget-body-no-head{height:inherit}[data-v-a2daf4ac] .widget-body-no-head h2{margin:0}.grid-stack-item-content[data-v-a2daf4ac]{background-color:#fff;overflow:hidden;text-align:start;display:flex;flex-flow:column;transition:background .3s ease-in-out}.grid-stack-item-content[data-v-a2daf4ac]:hover{background:var(--dash-backgroundBlocked)}.grid-stack-item-content.locked-widget[data-v-a2daf4ac]{background-color:#f2f2f2}.grid-stack-item-content.locked-widget .lock-toggle[data-v-a2daf4ac]{opacity:1!important;transform:translateY(0)!important}.grid-stack-item-content .header-icon[data-v-a2daf4ac]{cursor:pointer;height:18px;opacity:0;transform:translateY(5px);transition:opacity .3s ease-in-out,transform .3s ease-in-out}.grid-stack-item-content:hover .header-icon[data-v-a2daf4ac]{opacity:1;transform:translateY(0)}[data-v-a2daf4ac] .fill{display:flex;justify-content:center;align-items:center}[data-v-a2daf4ac] .fill img{flex-shrink:1;width:100%}.icon-wrapper[data-v-a2daf4ac]{width:25px}.parent-div[data-v-a2daf4ac]{position:relative;display:inline-block;padding:20px;background:#f0f0f0;border-radius:8px;transition:background .3s ease-in-out}:root{--dash-background: #f6fcff;--dash-background2:#fbfdff;--dash-backgroundBlocked:#cedded;--dash-drop-shadow:0px -2px 4px rgba(7, 79, 124, .05), 0px 6px 10px rgba(7, 79, 124, .1);--dash-text-dark: #243d8e;--dash-text-medium:#546085;--dash-text-light:#d9e3ff;--dash-secondary:#24245b}.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;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTYuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjE2cHgiIGhlaWdodD0iMTZweCIgdmlld0JveD0iMCAwIDUxMS42MjYgNTExLjYyNyIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNTExLjYyNiA1MTEuNjI3OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxnPgoJPHBhdGggZD0iTTMyOC45MDYsNDAxLjk5NGgtMzYuNTUzVjEwOS42MzZoMzYuNTUzYzQuOTQ4LDAsOS4yMzYtMS44MDksMTIuODQ3LTUuNDI2YzMuNjEzLTMuNjE1LDUuNDIxLTcuODk4LDUuNDIxLTEyLjg0NSAgIGMwLTQuOTQ5LTEuODAxLTkuMjMxLTUuNDI4LTEyLjg1MWwtNzMuMDg3LTczLjA5QzI2NS4wNDQsMS44MDksMjYwLjc2LDAsMjU1LjgxMywwYy00Ljk0OCwwLTkuMjI5LDEuODA5LTEyLjg0Nyw1LjQyNCAgIGwtNzMuMDg4LDczLjA5Yy0zLjYxOCwzLjYxOS01LjQyNCw3LjkwMi01LjQyNCwxMi44NTFjMCw0Ljk0NiwxLjgwNyw5LjIyOSw1LjQyNCwxMi44NDVjMy42MTksMy42MTcsNy45MDEsNS40MjYsMTIuODUsNS40MjYgICBoMzYuNTQ1djI5Mi4zNThoLTM2LjU0MmMtNC45NTIsMC05LjIzNSwxLjgwOC0xMi44NSw1LjQyMWMtMy42MTcsMy42MjEtNS40MjQsNy45MDUtNS40MjQsMTIuODU0ICAgYzAsNC45NDUsMS44MDcsOS4yMjcsNS40MjQsMTIuODQ3bDczLjA4OSw3My4wODhjMy42MTcsMy42MTcsNy44OTgsNS40MjQsMTIuODQ3LDUuNDI0YzQuOTUsMCw5LjIzNC0xLjgwNywxMi44NDktNS40MjQgICBsNzMuMDg3LTczLjA4OGMzLjYxMy0zLjYyLDUuNDIxLTcuOTAxLDUuNDIxLTEyLjg0N2MwLTQuOTQ4LTEuODA4LTkuMjMyLTUuNDIxLTEyLjg1NCAgIEMzMzguMTQyLDQwMy44MDIsMzMzLjg1Nyw0MDEuOTk0LDMyOC45MDYsNDAxLjk5NHoiIGZpbGw9IiM2NjY2NjYiLz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K);background-repeat:no-repeat;background-position:center}.grid-stack-item>.ui-resizable-ne{transform:translateY(10px) rotate(45deg)}.grid-stack-item>.ui-resizable-sw{transform:rotate(45deg)}.grid-stack-item>.ui-resizable-nw{transform:translateY(10px) 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%}.el-dialog__title[data-v-f42c459e]{color:#fff}.grid-stack-item[data-v-f42c459e]{text-align:center;line-height:35px}.grid-stack-item .grid-stack-item-content[data-v-f42c459e]{overflow:hidden;border:solid var(--dash-text-light) 1px;border-radius:.2rem}.dashboard-app[data-v-f42c459e]{font-family:Roboto,sans-serif;font-size:14px;line-height:17px;background:var(--dash-background);color:var(--dash-text-dark)}.dashboard-app .edit-button[data-v-f42c459e]{background-color:var(--el-color-primary);border-color:var(--el-color-primary-dark-2);color:#fff}.dashboard-app .edit-button[data-v-f42c459e]:hover{color:var(--el-color-primary-dark-2);background-color:var(--el-color-primary-light-3);border-color:var(--el-color-primary-dark-2)}.dashboard-app .tw-flex{display:flex}.dashboard-app .tw-flex-row{flex-direction:row}.dashboard-app .tw-items-center{align-items:center}.dashboard-app .tw-justify-between{justify-content:space-between}.dashboard-app .tw-h-10{height:2.5rem}.dashboard-app .tw-m-1{margin:.25rem}.dashboard-app .tw-m-4{margin:1rem}.dashboard-app .tw-leading-none{line-height:1}.dashboard-app .tw-pl-1{padding-left:.25rem}.dashboard-app .tw-flex-wrap{flex-wrap:wrap}.dashboard-app .tw-gap-2{gap:.5rem}.dashboard-app .tw-max-h-screen{max-height:100vh}.dashboard-app .tw-h-screen{height:100vh}.dashboard-app .tw-float-left{float:left}.dashboard-app .tw-w-40{width:10rem}
|
|
1
|
+
.el-dialog__header[data-v-769ea864]{color:#fff}.full-dialog-dashboard[data-v-769ea864]{width:95%;height:95%;margin:2.5% auto 0}.widget-settings-container[data-v-769ea864]{display:flex;flex-direction:column;gap:16px;font-family:Roboto,sans-serif;font-size:14px;color:var(--textDark)}.widget-setting[data-v-769ea864]{display:flex;flex-direction:column;gap:8px}.widget-setting .text-settings-height[data-v-769ea864]{--el-input-height: 42px}.dialog-footer[data-v-769ea864]{display:flex;justify-content:flex-end;gap:10px}.el-button[data-v-769ea864]{background-color:var(--el-color-primary);border-color:var(--el-color-primary-dark-2);color:#fff}.el-button[data-v-769ea864]:hover{background-color:var(--el-color-primary-light-3);border-color:var(--el-color-primary-dark-2)}.text-widget-wrap[data-v-4743c11f]{margin:auto}.markdown-widget-wrap[data-v-b2d32c29]{max-width:none;width:100%;min-width:0;height:100%;display:flex;flex-direction:column;box-sizing:border-box;margin-left:5px}.markdown-input[data-v-b2d32c29],.markdown-output[data-v-b2d32c29]{flex:1 1 auto;width:100%;height:100%;min-height:0;box-sizing:border-box}.markdown-input[data-v-b2d32c29]{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.95rem;line-height:1.5;padding:.75rem;border:1px solid #ddd;border-radius:.5rem;resize:none}.markdown-output[data-v-b2d32c29]{overflow:auto}.markdown-output[data-v-b2d32c29] pre,.markdown-output[data-v-b2d32c29] code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.markdown-output[data-v-b2d32c29] h1{font-size:1.75rem;margin:1rem 0 .5rem}.markdown-output[data-v-b2d32c29] h2{font-size:1.5rem;margin:1rem 0 .5rem}.markdown-output[data-v-b2d32c29] p{margin:.5rem 0}.color-secondary[data-v-f706b94f]{color:var(--dash-secondary)}.color-primary[data-v-f706b94f]{color:var(--dash-text-medium)}.color-background[data-v-f706b94f]{background-color:var(--dash-background)}.filter-wrapper[data-v-f706b94f]{background-color:var(--dash-secondary);height:33px;padding:0 8px;justify-content:space-between;width:100%}.clear-filter-div[data-v-f706b94f]{width:33px;height:33px;margin-left:10px}.empty[data-v-f706b94f]{opacity:.8;color:#ddd}.content-header .visible-div[data-v-4f4aa869]{min-width:100px;height:40px}.content-header .editing-div[data-v-4f4aa869]{width:150px}.header-slot-icon[data-v-4f4aa869]{position:absolute;top:5px;right:5px}.dash-header-visible[data-v-4f4aa869]{min-height:40px}.stick-to-top[data-v-4f4aa869]{position:sticky;top:0;width:100%}[data-v-a2daf4ac] .content-header{z-index:3;width:100%;overflow:hidden}[data-v-a2daf4ac] .content-header h3{margin:10px}[data-v-a2daf4ac] .content-header .item-widget-button,[data-v-a2daf4ac] .content-header .close-button{cursor:pointer;margin-right:3px;width:20px;height:20px}[data-v-a2daf4ac] .widget-body{height:calc(100% - 40px)}[data-v-a2daf4ac] .widget-body-no-head{height:inherit}[data-v-a2daf4ac] .widget-body-no-head h2{margin:0}.grid-stack-item-content[data-v-a2daf4ac]{background-color:#fff;overflow:hidden;text-align:start;display:flex;flex-flow:column;transition:background .3s ease-in-out}.grid-stack-item-content[data-v-a2daf4ac]:hover{background:var(--dash-backgroundBlocked)}.grid-stack-item-content.locked-widget[data-v-a2daf4ac]{background-color:#f2f2f2}.grid-stack-item-content.locked-widget .lock-toggle[data-v-a2daf4ac]{opacity:1!important;transform:translateY(0)!important}.grid-stack-item-content .header-icon[data-v-a2daf4ac]{cursor:pointer;height:18px;opacity:0;transform:translateY(5px);transition:opacity .3s ease-in-out,transform .3s ease-in-out}.grid-stack-item-content:hover .header-icon[data-v-a2daf4ac]{opacity:1;transform:translateY(0)}[data-v-a2daf4ac] .fill{display:flex;justify-content:center;align-items:center}[data-v-a2daf4ac] .fill img{flex-shrink:1;width:100%}.icon-wrapper[data-v-a2daf4ac]{width:25px}.parent-div[data-v-a2daf4ac]{position:relative;display:inline-block;padding:20px;background:#f0f0f0;border-radius:8px;transition:background .3s ease-in-out}:root{--dash-background: #f6fcff;--dash-background2:#fbfdff;--dash-backgroundBlocked:#cedded;--dash-drop-shadow:0px -2px 4px rgba(7, 79, 124, .05), 0px 6px 10px rgba(7, 79, 124, .1);--dash-text-dark: #243d8e;--dash-text-medium:#546085;--dash-text-light:#d9e3ff;--dash-secondary:#24245b}.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;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTYuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjE2cHgiIGhlaWdodD0iMTZweCIgdmlld0JveD0iMCAwIDUxMS42MjYgNTExLjYyNyIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNTExLjYyNiA1MTEuNjI3OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxnPgoJPHBhdGggZD0iTTMyOC45MDYsNDAxLjk5NGgtMzYuNTUzVjEwOS42MzZoMzYuNTUzYzQuOTQ4LDAsOS4yMzYtMS44MDksMTIuODQ3LTUuNDI2YzMuNjEzLTMuNjE1LDUuNDIxLTcuODk4LDUuNDIxLTEyLjg0NSAgIGMwLTQuOTQ5LTEuODAxLTkuMjMxLTUuNDI4LTEyLjg1MWwtNzMuMDg3LTczLjA5QzI2NS4wNDQsMS44MDksMjYwLjc2LDAsMjU1LjgxMywwYy00Ljk0OCwwLTkuMjI5LDEuODA5LTEyLjg0Nyw1LjQyNCAgIGwtNzMuMDg4LDczLjA5Yy0zLjYxOCwzLjYxOS01LjQyNCw3LjkwMi01LjQyNCwxMi44NTFjMCw0Ljk0NiwxLjgwNyw5LjIyOSw1LjQyNCwxMi44NDVjMy42MTksMy42MTcsNy45MDEsNS40MjYsMTIuODUsNS40MjYgICBoMzYuNTQ1djI5Mi4zNThoLTM2LjU0MmMtNC45NTIsMC05LjIzNSwxLjgwOC0xMi44NSw1LjQyMWMtMy42MTcsMy42MjEtNS40MjQsNy45MDUtNS40MjQsMTIuODU0ICAgYzAsNC45NDUsMS44MDcsOS4yMjcsNS40MjQsMTIuODQ3bDczLjA4OSw3My4wODhjMy42MTcsMy42MTcsNy44OTgsNS40MjQsMTIuODQ3LDUuNDI0YzQuOTUsMCw5LjIzNC0xLjgwNywxMi44NDktNS40MjQgICBsNzMuMDg3LTczLjA4OGMzLjYxMy0zLjYyLDUuNDIxLTcuOTAxLDUuNDIxLTEyLjg0N2MwLTQuOTQ4LTEuODA4LTkuMjMyLTUuNDIxLTEyLjg1NCAgIEMzMzguMTQyLDQwMy44MDIsMzMzLjg1Nyw0MDEuOTk0LDMyOC45MDYsNDAxLjk5NHoiIGZpbGw9IiM2NjY2NjYiLz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K);background-repeat:no-repeat;background-position:center}.grid-stack-item>.ui-resizable-ne{transform:translateY(10px) rotate(45deg)}.grid-stack-item>.ui-resizable-sw{transform:rotate(45deg)}.grid-stack-item>.ui-resizable-nw{transform:translateY(10px) 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%}.el-dialog__title[data-v-e3de89f1]{color:#fff}.grid-stack-item[data-v-e3de89f1]{text-align:center;line-height:35px}.grid-stack-item .grid-stack-item-content[data-v-e3de89f1]{overflow:hidden;border:solid var(--dash-text-light) 1px;border-radius:.2rem}.dashboard-app[data-v-e3de89f1]{font-family:Roboto,sans-serif;font-size:14px;line-height:17px;background:var(--dash-background);color:var(--dash-text-dark)}.dashboard-app .edit-button[data-v-e3de89f1]{background-color:var(--el-color-primary);border-color:var(--el-color-primary-dark-2);color:#fff}.dashboard-app .edit-button[data-v-e3de89f1]:hover{color:var(--el-color-primary-dark-2);background-color:var(--el-color-primary-light-3);border-color:var(--el-color-primary-dark-2)}.dashboard-app .tw-flex{display:flex}.dashboard-app .tw-flex-row{flex-direction:row}.dashboard-app .tw-items-center{align-items:center}.dashboard-app .tw-justify-between{justify-content:space-between}.dashboard-app .tw-h-10{height:2.5rem}.dashboard-app .tw-m-1{margin:.25rem}.dashboard-app .tw-m-4{margin:1rem}.dashboard-app .tw-leading-none{line-height:1}.dashboard-app .tw-pl-1{padding-left:.25rem}.dashboard-app .tw-flex-wrap{flex-wrap:wrap}.dashboard-app .tw-gap-2{gap:.5rem}.dashboard-app .tw-max-h-screen{max-height:100vh}.dashboard-app .tw-h-screen{height:100vh}.dashboard-app .tw-float-left{float:left}.dashboard-app .tw-w-40{width:10rem}
|