(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[5296,6092],{89721:(e,t,n)=>{"use strict";n.d(t,{E:()=>o,z:()=>r});const r=()=>({type:"query",query:{params:["A","5m","now"]},reducer:{type:"avg",params:[]},evaluator:{type:"gt",params:[null]},operator:{type:"and"}}),o=async(e,t,n,r)=>{if(0===t.length)return"Could not find any metric queries";if(e&&e.length)return"Transformations are not supported in alert queries";let o=0,i=0;for(const e of t){const t=e.datasource||r,a=await n.get(t);a.meta.alerting?a.targetContainsTemplate&&a.targetContainsTemplate(e)&&i++:o++}return o===t.length?"The datasource does not support alerting queries":i===t.length?"Template variables are not supported in alert queries":""}},45513:(e,t,n)=>{"use strict";n.d(t,{F:()=>l});var r=n(77813),o=(n(76687),n(27668)),i=n(24301),a=n(52010);const s=["renderExpandedContent"];const l=e=>{let{renderExpandedContent:t}=e,n=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,s);const l=(0,o.wW)(d);return(0,a.jsx)(i.t,Object.assign({renderExpandedContent:t?(e,n,o)=>(0,a.jsxs)(a.Fragment,{children:[!(n===o.length-1)&&(0,a.jsx)("div",{className:(0,r.cx)(l.contentGuideline,l.guideline)}),t(e,n,o)]}):void 0,renderPrefixHeader:()=>(0,a.jsx)("div",{className:l.relative,children:(0,a.jsx)("div",{className:(0,r.cx)(l.headerGuideline,l.guideline)})}),renderPrefixCell:(e,t,n)=>(0,a.jsxs)("div",{className:l.relative,children:[(0,a.jsx)("div",{className:(0,r.cx)(l.topGuideline,l.guideline)}),!(t===n.length-1)&&(0,a.jsx)("div",{className:(0,r.cx)(l.bottomGuideline,l.guideline)})]})},n))},d=e=>({relative:r.css`
    position: relative;
    height: 100%;
  `,guideline:r.css`
    left: -19px;
    border-left: 1px solid ${e.colors.border.medium};
    position: absolute;

    ${e.breakpoints.down("md")} {
      display: none;
    }
  `,topGuideline:r.css`
    width: 18px;
    border-bottom: 1px solid ${e.colors.border.medium};
    top: 0;
    bottom: 50%;
  `,bottomGuideline:r.css`
    top: 50%;
    bottom: 0;
  `,contentGuideline:r.css`
    top: 0;
    bottom: 0;
    left: -49px !important;
  `,headerGuideline:r.css`
    top: -25px;
    bottom: 0;
  `})},75987:(e,t,n)=>{"use strict";n.d(t,{V:()=>a});n(76687);var r,o=n(39756),i=n(52010);const a=e=>{let{namespace:t,group:n}=e;return n?(0,i.jsxs)(i.Fragment,{children:[t," ",r||(r=(0,i.jsx)(o.J,{name:"angle-right"}))," ",n]}):(0,i.jsx)(i.Fragment,{children:t})}},48856:(e,t,n)=>{"use strict";n.d(t,{i:()=>I});var r=n(77813),o=n(76687),i=n(27668),a=n(56921),s=n(91298),l=n(73285),d=n(18077),c=n(24301),u=n(45513),p=n(78391),h=n(75987),g=n(25367),f=n(67273),m=n(33097),b=n(39756),y=n(93507),v=n(52010);function x(e){let{rule:t}=e;const n=(0,i.wW)(S),{exceedsLimit:r}=(0,o.useMemo)((()=>(0,y.f)(t.group.interval)),[t.group.interval]);return r?(0,v.jsx)(m.u,{theme:"error",content:(0,v.jsxs)("div",{children:["A minimum evaluation interval of"," ",(0,v.jsx)("span",{className:n.globalLimitValue,children:f.v.unifiedAlerting.minInterval})," has been configured in Grafana and will be used instead of the ",t.group.interval," interval configured for the Rule Group."]}),children:(0,v.jsx)(b.J,{name:"stopwatch-slash",className:n.icon})}):null}function S(e){return{globalLimitValue:r.css`
      font-weight: ${e.typography.fontWeightBold};
    `,icon:r.css`
      fill: ${e.colors.warning.text};
    `}}var w=n(11676),M=n(94528),k=n(75520),O=n(2291),j=n(26160),C=n(72578),z=n(15738);const P=e=>{let{rule:t}=e;const n=(0,i.wW)(W),{namespace:{rulesSource:r}}=t,o=Object.entries(t.annotations).filter((e=>{let[t,n]=e;return!!n.trim()}));return(0,v.jsxs)("div",{children:[(0,v.jsx)(k.f,{rule:t,rulesSource:r}),(0,v.jsxs)("div",{className:n.wrapper,children:[(0,v.jsxs)("div",{className:n.leftSide,children:[(0,v.jsx)(T,{rule:t}),!!t.labels&&!!Object.keys(t.labels).length&&(0,v.jsx)(M.C,{label:"Labels",horizontal:!0,children:(0,v.jsx)(w.s,{labels:t.labels})}),(0,v.jsx)(C.C,{rulesSource:r,rule:t,annotations:o}),(0,v.jsx)(O.J,{annotations:o})]}),(0,v.jsx)("div",{className:n.rightSide,children:(0,v.jsx)(j.C,{rulesSource:r,rule:t})})]}),(0,v.jsx)(z.M,{rule:t,itemsDisplayLimit:15})]})},T=e=>{let t,{rule:n}=e,r=n.group.interval;var o;(0,d.yF)(n.rulerRule)||(t=null===(o=n.rulerRule)||void 0===o?void 0:o.for);return(0,v.jsxs)(v.Fragment,{children:[r&&(0,v.jsxs)(M.C,{label:"Evaluate",horizontal:!0,children:["Every ",r]}),t&&(0,v.jsx)(M.C,{label:"For",horizontal:!0,children:t})]})},W=e=>({wrapper:r.css`
    display: flex;
    flex-direction: row;

    ${e.breakpoints.down("md")} {
      flex-direction: column;
    }
  `,leftSide:r.css`
    flex: 1;
  `,rightSide:r.css`
    ${e.breakpoints.up("md")} {
      padding-left: 90px;
      width: 300px;
    }
  `});var B,R=n(52238),D=n(24045);const I=e=>{let{rules:t,className:n,showGuidelines:s=!1,emptyMessage:l="No rules found.",showGroupColumn:d=!1,showSummaryColumn:p=!1}=e;const h=(0,i.wW)(E),g=(0,r.cx)(h.wrapper,n,{[h.wrapperMargin]:s}),f=(0,o.useMemo)((()=>t.map(((e,t)=>({id:`${e.namespace.name}-${e.group.name}-${e.name}-${t}`,data:e})))),[t]),m=A(p,d);if(!t.length)return(0,v.jsx)("div",{className:(0,r.cx)(g,h.emptyMessage),children:l});const b=s?u.F:c.t;return(0,v.jsx)("div",{className:g,"data-testid":"rules-table",children:(0,v.jsx)(b,{cols:m,isExpandable:!0,items:f,renderExpandedContent:e=>{let{data:t}=e;return(0,v.jsx)(P,{rule:t})},pagination:{itemsPerPage:a.gN},paginationStyles:h.pagination})})},E=e=>({wrapperMargin:r.css`
    ${e.breakpoints.up("md")} {
      margin-left: 36px;
    }
  `,emptyMessage:r.css`
    padding: ${e.spacing(1)};
  `,wrapper:r.css`
    width: auto;
    border-radius: ${e.shape.borderRadius()};
  `,pagination:r.css`
    display: flex;
    margin: 0;
    padding-top: ${e.spacing(1)};
    padding-bottom: ${e.spacing(.25)};
    justify-content: center;
    border-left: 1px solid ${e.colors.border.strong};
    border-right: 1px solid ${e.colors.border.strong};
    border-bottom: 1px solid ${e.colors.border.strong};
  `});function A(e,t){const{hasRuler:n,rulerRulesLoaded:r}=(0,s.h)();return(0,o.useMemo)((()=>{const o=[{id:"state",label:"State",renderCell:e=>{let{data:t}=e;const{namespace:o}=t,{rulesSource:i}=o,{promRule:a,rulerRule:s}=t,l=!(!(n(i)&&r(i)&&a)||s),d=!(!(n(i)&&r(i)&&s)||a);return(0,v.jsx)(D.p,{rule:t,isDeleting:l,isCreating:d})},size:"165px"},{id:"name",label:"Name",renderCell:e=>{let{data:t}=e;return t.name},size:5},{id:"provisioned",label:"",renderCell:e=>{let{data:t}=e;const n=t.rulerRule;if(!(0,d.Pc)(n))return null;return n.grafana_alert.provenance?B||(B=(0,v.jsx)(p.C0,{})):null},size:"100px"},{id:"warnings",label:"",renderCell:e=>{let{data:t}=e;return(0,v.jsx)(x,{rule:t})},size:"45px"},{id:"health",label:"Health",renderCell:e=>{let{data:{promRule:t,group:n}}=e;return t?(0,v.jsx)(R.V,{rule:t}):null},size:"75px"}];return e&&o.push({id:"summary",label:"Summary",renderCell:e=>{var t;let{data:n}=e;return(0,v.jsx)(g.Z,{input:null!==(t=n.annotations[l.q6.summary])&&void 0!==t?t:""})},size:5}),t&&o.push({id:"group",label:"Group",renderCell:e=>{let{data:t}=e;const{namespace:n,group:r}=t;return"default"===r.name?(0,v.jsx)(h.V,{namespace:n.name}):(0,v.jsx)(h.V,{namespace:n.name,group:r.name})},size:5}),o}),[n,r,e,t])}},91298:(e,t,n)=>{"use strict";n.d(t,{h:()=>a});var r=n(76687),o=n(11126),i=n(7566);function a(){const e=(0,i._)((e=>e.rulerRules));return{hasRuler:(0,r.useCallback)((t=>{var n;const r="string"==typeof t?t:t.name;return r===o.GC||!(null===(n=e[r])||void 0===n||!n.result)}),[e]),rulerRulesLoaded:(0,r.useCallback)((t=>{var n;const r=(0,o.EG)(t),i=null===(n=e[r])||void 0===n?void 0:n.result;return Boolean(i)}),[e])}}},32662:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DashboardPage:()=>Fa,UnthemedDashboardPage:()=>Na,default:()=>La,mapStateToProps:()=>Ia});var r=n(77813),o=n(76687),i=n(30415),a=n(88356),s=n(83272),l=n(28441),d=n(49622),c=n(67273),u=n(27668),p=n(29877),h=n(28781),g=n(74692),f=n(94843),m=n(66694),b=n(3276),y=n(71761),v=n(1166),x=n(352),S=n(80410),w=n(2127),M=n(76566),k=n(91724),O=n(35562),j=n(49997),C=n(52010);const z=e=>{let{initError:t}=e;const n=(0,u.yK)(P);return t?(0,C.jsx)("div",{className:n.dashboardLoading,children:(0,C.jsx)(O.b,{severity:x.F1.Error,title:t.message,children:(0,j.i)(t.error)})}):null},P=e=>({dashboardLoading:r.css`
      height: 60vh;
      display: flex;
      align-items: center;
      justify-content: center;
    `});var T,W=n(7053),B=n(55816),R=n(55312);const D=e=>{let{initPhase:t}=e;const n=(0,u.yK)(I);return(0,C.jsx)("div",{className:n.dashboardLoading,children:(0,C.jsx)("div",{className:n.dashboardLoadingText,children:(0,C.jsxs)(W.wc,{spacing:"md",children:[(0,C.jsxs)(W.Lh,{align:"center",justify:"center",spacing:"xs",children:[T||(T=(0,C.jsx)(B.$,{inline:!0}))," ",t]})," ",(0,C.jsx)(W.Lh,{align:"center",justify:"center",children:(0,C.jsx)(R.zx,{variant:"secondary",size:"md",icon:"repeat",onClick:()=>{d.E1.push("/")},children:"Cancel loading dashboard"})})]})})})},I=e=>{const t=r.keyframes`
    0% { opacity: 0%; }
    100% { opacity: 100%; }
  `;return{dashboardLoading:r.css`
      height: 60vh;
      display: flex;
      opacity: 0%;
      align-items: center;
      justify-content: center;
      animation: ${t} 0s step-end ${"0.5s"} 1 normal forwards;
    `,dashboardLoadingText:r.css`
      font-size: ${e.typography.size.lg};
    `}};var E,A,N,F=n(86832),L=n(63322),_=n(63672),$=n(33225),H=n(69369),G=n(68021),V=n(93308),U=n(99397),q=n(9120),J=n(39756),Z=n(79877),Q=n(60105),K=n(68528);const Y=e=>{let{panel:t,folderId:n,isUnsavedPrompt:r,onDismiss:i,onConfirm:a,onDiscard:s}=e;const[l,d]=(0,o.useState)(""),c=(0,G.Z)((async()=>{const e=await(0,Z.E8)(t.libraryPanel.uid);return e.length>0?e.map((e=>e.title)):[]}),[t.libraryPanel.uid]),[p,h]=(0,o.useState)([]);(0,V.Z)((()=>c.value?h(c.value.filter((e=>e.toLowerCase().includes(l.toLowerCase())))):h([])),300,[c.value,l]);const{saveLibraryPanel:g}=(0,K.E)(),f=(0,u.yK)(Q.J),m=(0,o.useCallback)((()=>{s()}),[s]),b=r?"Unsaved library panel changes":"Save library panel";return(0,C.jsx)(U.u,{title:b,icon:"save",onDismiss:i,isOpen:!0,children:(0,C.jsxs)("div",{children:[(0,C.jsxs)("p",{className:f.textInfo,children:["This update will affect ",(0,C.jsxs)("strong",{children:[t.libraryPanel.meta.connectedDashboards," ",1===t.libraryPanel.meta.connectedDashboards?"dashboard":"dashboards","."]}),"The following dashboards using the panel will be affected:"]}),(0,C.jsx)(q.I,{className:f.dashboardSearch,prefix:E||(E=(0,C.jsx)(J.J,{name:"search"})),placeholder:"Search affected dashboards",value:l,onChange:e=>d(e.currentTarget.value)}),c.loading?A||(A=(0,C.jsx)("p",{children:"Loading connected dashboards..."})):(0,C.jsxs)("table",{className:f.myTable,children:[N||(N=(0,C.jsx)("thead",{children:(0,C.jsx)("tr",{children:(0,C.jsx)("th",{children:"Dashboard name"})})})),(0,C.jsx)("tbody",{children:p.map(((e,t)=>(0,C.jsx)("tr",{children:(0,C.jsx)("td",{children:e})},`dashrow-${t}`)))})]}),(0,C.jsxs)(U.u.ButtonRow,{children:[(0,C.jsx)(R.zx,{variant:"secondary",onClick:i,fill:"outline",children:"Cancel"}),r&&(0,C.jsx)(R.zx,{variant:"destructive",onClick:m,children:"Discard"}),(0,C.jsx)(R.zx,{onClick:()=>{g(t,n).then((()=>{a()}))},children:"Update all"})]})]})})};var X=n(73659),ee=n(22814),te=n(55252),ne=n(77758),re=n(69672);function oe(){return async(e,t)=>{const{getPanel:n}=t().panelEditor;n().configRev=0,e((0,re.yi)(!0))}}function ie(e,t){var n;return(null===(n=t.libraryPanel)||void 0===n?void 0:n.uid)!==e.libraryPanel.uid||(!(!t.id||t.id!==e.id)||!!t.repeatPanelId)}function ae(){return async(e,t)=>{const n=t().dashboard.getModel(),{getPanel:r,getSourcePanel:o,shouldDiscardChanges:i}=t().panelEditor,a=r();if(n&&n.exitPanelEditor(),function(e){return e.hasChanged||e.hasSavedPanelEditChange||e.isAngularPlugin()}(a)&&!i){const t=a.getSaveModel(),r=o(),i=r.type!==a.type;if(e(function(e,t){return n=>{var r;if(void 0===(null===(r=e.libraryPanel)||void 0===r?void 0:r.uid)||!t)return;const o=e.getSaveModel();for(const r of t.panels){var i,a;if(ie(e,r))continue;r.restoreModel(Object.assign({},o,(0,F.pick)(r,"gridPos","id")));const t=(null===(i=r.plugin)||void 0===i?void 0:i.meta.id)!==(null===(a=e.plugin)||void 0===a?void 0:a.meta.id);if(r.plugin=e.plugin,r.configRev++,t){const e=r.key;r.generateNewKey(),n((0,ne.bc)({key:r.key,plugin:r.plugin,cleanUpKey:e}))}setTimeout((()=>{r.getQueryRunner().useLastResultFrom(e.getQueryRunner())}),20)}e.repeat&&setTimeout((()=>t.processRepeats()),20)}}(a,n)),r.restoreModel(t),r.configRev++,i){r.plugin=a.plugin;const t=r.key;r.generateNewKey(),await e((0,ne.bc)({key:r.key,plugin:a.plugin,cleanUpKey:t}))}setTimeout((()=>{r.getQueryRunner().useLastResultFrom(a.getQueryRunner()),r.render(),a.hasSavedPanelEditChange&&!a.hasChanged&&(r.configRev=0)}),20)}e((0,te.qj)(a.key)),e((0,re.my)())}}var se,le=n(81138);const de=e=>{let{dashboard:t,onSaveSuccess:n,onDiscard:o,onDismiss:i}=e;return(0,C.jsxs)(U.u,{isOpen:!0,title:"Unsaved changes",onDismiss:i,icon:"exclamation-triangle",className:r.css`
        width: 500px;
      `,children:[se||(se=(0,C.jsx)("h5",{children:"Do you want to save your changes?"})),(0,C.jsxs)(U.u.ButtonRow,{children:[(0,C.jsx)(R.zx,{variant:"secondary",onClick:i,fill:"outline",children:"Cancel"}),(0,C.jsx)(R.zx,{variant:"destructive",onClick:o,children:"Discard"}),(0,C.jsx)(le.i,{dashboard:t,onSaveSuccess:n})]})]})},ce=o.memo((e=>{let{dashboard:t}=e;const[n,r]=(0,o.useState)({original:null}),i=(0,x.I0)(),{original:a,originalPath:s}=n,{showModal:l,hideModal:c}=(0,o.useContext)(_.kr);(0,o.useEffect)((()=>{const e=setTimeout((()=>{const e=d.E1.getLocation().pathname,n=t.getSaveModelClone();r({originalPath:e,original:n})}),1e3),n=$.h.subscribe(S.Jd,(()=>{const e=t.getSaveModelClone();r({originalPath:s,original:e})}));return()=>{clearTimeout(e),n.unsubscribe()}}),[t,s]),(0,o.useEffect)((()=>{const e=e=>{pe(t,a)||ge(t,a)&&(e.preventDefault(),e.returnValue="")};return window.addEventListener("beforeunload",e),()=>window.removeEventListener("beforeunload",e)}),[t,a]);return(0,C.jsx)(L.NL,{when:!0,message:e=>{const o=t.panelInEdit,d=new URLSearchParams(e.search);return o&&o.libraryPanel&&o.hasChanged&&!d.has("editPanel")?(l(Y,{isUnsavedPrompt:!0,panel:t.panelInEdit,folderId:t.meta.folderId,onConfirm:()=>{c(),ue(e)},onDiscard:()=>{i(oe()),ue(e),c()},onDismiss:c}),!1):s!==e.pathname&&a?!!pe(t,a)||(!ge(t,a)||(l(de,{dashboard:t,onSaveSuccess:()=>{c(),ue(e)},onDiscard:()=>{r(Object.assign({},n,{original:null})),c(),ue(e)},onDismiss:c}),!1)):(o&&!d.has("editPanel")&&i(ae()),!0)}})}));function ue(e){e&&setTimeout((()=>d.E1.push(e)),10)}function pe(e,t){if(!t)return!0;if(!H.Vt.isSignedIn)return!0;if(!e||!e.meta)return!0;const{canSave:n,fromScript:r,fromFile:o}=e.meta;return!H.Vt.isEditor&&!n||(!n||r||o)}function he(e){const t=new X.f(e);t.expandRows();const n=t.getSaveModelClone();return n.time=0,n.refresh=0,n.schemaVersion=0,n.timezone=0,n.panels=[],(0,F.each)(n.getVariables(),(e=>{e.current=null,e.options=null,e.filters=null})),n}function ge(e,t){if(e.hasUnsavedChanges())return!0;const n=he(e.getSaveModelClone()),r=he(t),o=(0,F.find)(n.nav,{type:"timepicker"}),i=(0,F.find)(r.nav,{type:"timepicker"});o&&i&&(o.now=i.now);return JSON.stringify(n,null)!==JSON.stringify(r,null)}ce.displayName="DashboardPrompt";var fe=n(97757),me=n(34753),be=n(13232),ye=n(65677),ve=n(91996),xe=n(95129),Se=n(41963),we=n(93631),Me=n(88018),ke=n(69187),Oe=n(45550),je=n(62533),Ce=n(63352),ze=n(68964),Pe=n(46286),Te=n(22160),We=n.n(Te),Be=n(84738),Re=n(63469),De=n(34246),Ie=n(76892);function Ee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ae=n(33414),Ne=n(99183),Fe=n(97449);function Le(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}let _e,$e;!function(e){e[e.Support=0]="Support",e[e.Data=1]="Data"}(_e||(_e={})),function(e){e[e.PanelSnapshot=0]="PanelSnapshot",e[e.GithubComment=1]="GithubComment"}($e||($e={}));class He extends class{constructor(e){Ee(this,"subject",new De.x),Ee(this,"state",void 0),this.state=e,this.subject.next(e)}useState(){return function(e){const t=(0,Ie.N)();return(0,o.useEffect)((()=>{const n=e.subject.subscribe(t);return()=>n.unsubscribe()}),[e,t]),e.state}(this)}setState(e){this.state=Object.assign({},this.state,e),this.subject.next(this.state)}}{constructor(e){super({panel:e,panelTitle:e.replaceVariables(e.title,void 0,"text")||"Panel",currentTab:_e.Support,showMessage:$e.GithubComment,snapshotText:"",markdownText:"",randomize:{},snapshotUpdate:0,options:[{label:"GitHub comment",description:"Copy and paste this message into a GitHub issue or comment",value:$e.GithubComment},{label:"Panel support snapshot",description:"Dashboard JSON used to help troubleshoot visualization issues",value:$e.PanelSnapshot}]}),Le(this,"onCurrentTabChange",(e=>{this.setState({currentTab:e})})),Le(this,"onShowMessageChange",(e=>{this.setState({showMessage:e.value})})),Le(this,"onGetMarkdownForClipboard",(()=>{const{markdownText:e}=this.state,t=1.5*Math.pow(1024,2);return e.length>t?(this.setState({error:{title:"Copy to clipboard failed",message:"Snapshot is too large, consider download and attaching a file instead"}}),""):e})),Le(this,"onDownloadDashboard",(()=>{const{snapshotText:e,panelTitle:t}=this.state,n=new Blob([e],{type:"text/plain"}),r=`debug-${t}-${(0,Be.dq)(new Date)}.json.txt`;We()(n,r)})),Le(this,"onSetSnapshotText",(e=>{this.setState({snapshotText:e})})),Le(this,"onToggleRandomize",(e=>{const{randomize:t}=this.state;this.setState({randomize:Object.assign({},t,{[e]:!t[e]})})})),Le(this,"onPreviewDashboard",(()=>{const{snapshot:e}=this.state;e&&((0,Ne.$M)({meta:{},dashboard:e}),n.g.open(c.v.appUrl+"dashboard/new","_blank"))}))}async buildDebugDashboard(){var e;const{panel:t,randomize:n,snapshotUpdate:r,iframeLoading:o,currentTab:i}=this.state,a=await(0,Fe.$R)(t,n,(0,Ae.$t)().timeRange()),s=JSON.stringify(a,null,2),l=(0,Fe.S$)(t,s),d=(0,Re.zc)((0,Re.Cf)("bytes")(null!==(e=null==s?void 0:s.length)&&void 0!==e?e:0));o&&i===_e.Support&&(0,Ne.$M)({meta:{},dashboard:a}),this.setState({snapshot:a,snapshotText:s,markdownText:l,snapshotSize:d,snapshotUpdate:r+1})}subscribeToIframeLoadingMessage(){const e=e=>{"GrafanaAppInit"===e.data&&((0,Ne.$M)({meta:{},dashboard:this.state.snapshot}),this.setState({iframeLoading:!0}))};return window.addEventListener("message",e,!1),function(){window.removeEventListener("message",e)}}}var Ge,Ve,Ue,qe;function Je(e){let{panel:t,plugin:n,onClose:r}=e;const i=(0,u.wW)(Ze),a=(0,o.useMemo)((()=>new He(t)),[t]),{currentTab:s,loading:l,error:d,iframeLoading:p,options:h,showMessage:g,snapshotSize:f,markdownText:m,snapshotText:b,randomize:y,panelTitle:v,snapshotUpdate:x}=a.useState();if((0,o.useEffect)((()=>{a.buildDebugDashboard()}),[a,n,y]),(0,o.useEffect)((()=>a.subscribeToIframeLoadingMessage()),[a]),!n)return null;const S=[{label:"Snapshot",value:_e.Support},{label:"Data",value:_e.Data}];return(0,C.jsxs)(Se.d,{title:"Get help with this panel",width:"90%",onClose:r,expandable:!0,scrollableContent:!0,subtitle:(0,C.jsxs)(xe.Stack,{direction:"column",gap:1,children:[(0,C.jsxs)(xe.Stack,{direction:"row",gap:1,children:[(0,C.jsx)(we.a,{featureState:ve.CQ.beta}),Ge||(Ge=(0,C.jsxs)("a",{href:"https://grafana.com/docs/grafana/latest/troubleshooting/",target:"blank",className:"external-link",rel:"noopener noreferrer",children:["Troubleshooting docs ",(0,C.jsx)(J.J,{name:"external-link-alt"})]}))]}),Ve||(Ve=(0,C.jsx)("span",{className:"muted",children:"To request troubleshooting help, send a snapshot of this panel to Grafana Labs Technical Support. The snapshot contains query response data and panel settings."}))]}),tabs:(0,C.jsx)(Me.J,{children:S.map(((e,t)=>(0,C.jsx)(ke.O,{label:e.label,active:e.value===s,onChangeTab:()=>a.onCurrentTabChange(e.value)},`${e.value}-${t}`)))}),children:[l&&(Ue||(Ue=(0,C.jsx)(B.$,{}))),d&&(0,C.jsx)(O.b,{title:d.title,children:d.message}),s===_e.Data&&(0,C.jsxs)("div",{className:i.code,children:[(0,C.jsxs)("div",{className:i.opts,children:[(0,C.jsx)(Oe.g,{label:"Template",className:i.field,children:(0,C.jsx)(je.Ph,{options:h,value:g,onChange:a.onShowMessageChange})}),g===$e.GithubComment?(0,C.jsx)(Ce.m,{icon:"copy",getText:a.onGetMarkdownForClipboard,children:"Copy to clipboard"}):(0,C.jsxs)(R.zx,{icon:"download-alt",onClick:a.onDownloadDashboard,children:["Download (",f,")"]})]}),(0,C.jsx)(ye.Z,{disableWidth:!0,children:e=>{let{height:t}=e;return(0,C.jsx)(ze.p,{width:"100%",height:t,language:g===$e.GithubComment?"markdown":"json",showLineNumbers:!0,showMiniMap:!0,value:g===$e.GithubComment?m:b,readOnly:!1,onBlur:a.onSetSnapshotText})}})]}),s===_e.Support&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(Oe.g,{label:"Randomize data",description:"Modify the original data to hide sensitve information.  Note the lengths will stay the same, and duplicate values will be equal.",children:(0,C.jsxs)(W.Lh,{children:[(0,C.jsx)(Pe.x,{label:"Labels",id:"randomize-labels",showLabel:!0,value:Boolean(y.labels),onChange:()=>a.onToggleRandomize("labels")}),(0,C.jsx)(Pe.x,{label:"Field names",id:"randomize-field-names",showLabel:!0,value:Boolean(y.names),onChange:()=>a.onToggleRandomize("names")}),(0,C.jsx)(Pe.x,{label:"String values",id:"randomize-string-values",showLabel:!0,value:Boolean(y.values),onChange:()=>a.onToggleRandomize("values")})]})}),(0,C.jsx)(Oe.g,{label:"Support snapshot",description:`Panel: ${v}`,children:(0,C.jsxs)(xe.Stack,{children:[(0,C.jsxs)(R.zx,{icon:"download-alt",onClick:a.onDownloadDashboard,children:["Dashboard (",f,")"]}),(0,C.jsx)(Ce.m,{icon:"github",getText:a.onGetMarkdownForClipboard,title:"Copy a complete GitHub comment to the clipboard",children:"Copy to clipboard"}),(0,C.jsx)(R.zx,{onClick:a.onPreviewDashboard,variant:"secondary",title:"Open support snapshot dashboard in a new tab",children:"Preview"})]})}),(0,C.jsx)(ye.Z,{disableWidth:!0,children:e=>{let{height:t}=e;return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("iframe",{src:`${c.v.appUrl}dashboard/new?orgId=${H.Vt.user.orgId}&kiosk&${x}`,width:"100%",height:t-100,frameBorder:"0",style:{display:p?"block":"none",marginTop:16}}),!p&&(qe||(qe=(0,C.jsx)("div",{children:" "})))]})}})]})]})}const Ze=e=>({code:r.css`
    flex-grow: 1;
    height: 100%;
    overflow: scroll;
  `,field:r.css`
    width: 100%;
  `,opts:r.css`
    display: flex;
    display: flex;
    width: 100%;
    flex-grow: 0;
    align-items: center;
    justify-content: flex-end;

    button {
      margin-left: 8px;
    }
  `});var Qe=n(77212);const Ke=(e,t,n)=>{const r=(0,o.useRef)(),[i,a]=(0,o.useState)();return(0,o.useEffect)((()=>{let o=-1,i=0;return r.current=e.getQueryRunner().getData(t).subscribe({next:e=>{if(n){var t;if(o===e.structureRev){const e=Date.now();if(e-i<1e4)return;i=e}o=null!==(t=e.structureRev)&&void 0!==t?t:-1}a(e)}}),()=>{r.current&&r.current.unsubscribe()}}),[e,t.withFieldConfig,t.withTransforms]),{data:i,error:i&&i.error,isLoading:!i||i.state===Qe.Gu.Loading,hasSeries:!!i&&!!i.series}};var Ye,Xe=n(41243),et=n(71611),tt=n(44014),nt=n(55523),rt=n(51414),ot=n(2907);const it=e=>{var t;let{data:n,metadataDatasource:r}=e;return r&&null!==(t=r.components)&&void 0!==t&&t.MetadataInspector?(0,C.jsx)(r.components.MetadataInspector,{datasource:r,data:n.series}):Ye||(Ye=(0,C.jsx)(ot.cC,{id:"dashboard.inspect-meta.no-inspector"}))};var at=n(95506),st=n(94073);const lt=e=>{let{panel:t,plugin:n,dashboard:r,tabs:i,data:a,isDataLoading:s,dataOptions:l,metadataDatasource:d,defaultTab:c,onDataOptionsChange:u,onClose:p}=e;const[h,g]=(0,o.useState)(null!=c?c:me.q.Data);if(!n)return null;const f=null==a?void 0:a.error;let m=h;i.find((e=>e.value===h))||(m=me.q.JSON);const b=(0,et.J)().replace(t.title,t.scopedVars,"text")||"Panel",y=Xe.ag._({id:"dashboard.inspect.title",message:"Inspect: {panelTitle}",values:{panelTitle:b}});return(0,C.jsxs)(Se.d,{title:y,subtitle:a&&dt(a),width:"50%",onClose:p,expandable:!0,scrollableContent:!0,tabs:(0,C.jsx)(Me.J,{children:i.map(((e,t)=>(0,C.jsx)(ke.O,{label:e.label,active:e.value===m,onChangeTab:()=>g(e.value||me.q.Data)},`${e.value}-${t}`)))}),children:[m===me.q.Data&&(0,C.jsx)(tt.E,{panel:t,data:a&&a.series,isLoading:s,options:l,onOptionsChange:u,timeZone:r.timezone,app:ve.zj.Dashboard}),a&&m===me.q.Meta&&(0,C.jsx)(it,{data:a,metadataDatasource:d}),m===me.q.JSON&&(0,C.jsx)(rt.W,{panel:t,dashboard:r,data:a,onClose:p}),m===me.q.Error&&(0,C.jsx)(nt.l,{error:f}),a&&m===me.q.Stats&&(0,C.jsx)(at.f,{data:a,timeZone:r.getTimezone()}),a&&m===me.q.Query&&(0,C.jsx)(st.D,{panel:t,data:a.series,onRefreshQuery:()=>t.refresh()})]})};function dt(e){const{request:t}=e;if(!t)return"";const n=t.targets.length,r=t.endTime?t.endTime-t.startTime:0,o=(0,Re.zc)((0,Re.Cf)("ms")(r));return Xe.ag._({id:"dashboard.inspect.subtitle",message:"{queryCount} queries with total query time of {formatted}",values:{queryCount:n,formatted:o}})}var ct=n(38989),ut=n(2343),pt=n(47566);const ht=(0,i.connect)(((e,t)=>{const n=(0,be.i)(e,t.panel);return n?{plugin:n.plugin}:{plugin:null}}))((e=>{let{panel:t,dashboard:n,plugin:r}=e;const[i,a]=(0,o.useState)({withTransforms:!1,withFieldConfig:!0}),s=(0,L.TH)(),{data:l,isLoading:c,error:u}=Ke(t,i,!0),p=(e=>(0,ct.Z)((async()=>{var t;const n=(null==e||null===(t=e.request)||void 0===t?void 0:t.targets)||[];if(e&&e.series&&n.length)for(const t of e.series)if(t.meta&&t.meta.custom){var r;const e=await(0,ut.F)().get(n[0].datasource);if(e&&null!==(r=e.components)&&void 0!==r&&r.MetadataInspector)return e}}),[e]).value)(l),h=((e,t,n,r,i)=>(0,o.useMemo)((()=>{var o;const a=[];(0,pt.sY)(n)&&(a.push({label:Xe.ag._({id:"dashboard.inspect.data-tab",message:"Data"}),value:me.q.Data}),a.push({label:Xe.ag._({id:"dashboard.inspect.stats-tab",message:"Stats"}),value:me.q.Stats})),i&&a.push({label:Xe.ag._({id:"dashboard.inspect.meta-tab",message:"Meta Data"}),value:me.q.Meta}),a.push({label:Xe.ag._({id:"dashboard.inspect.json-tab",message:"JSON"}),value:me.q.JSON}),r&&r.message&&a.push({label:Xe.ag._({id:"dashboard.inspect.error-tab",message:"Error"}),value:me.q.Error});const s=window.grafanaPanelInspectActionSupplier;return s&&null!==(o=s.getActions(e))&&void 0!==o&&o.length&&a.push({label:Xe.ag._({id:"dashboard.inspect.actions-tab",message:"Actions"}),value:me.q.Actions}),t.meta.canEdit&&(0,pt.sY)(n)&&a.push({label:Xe.ag._({id:"dashboard.inspect.query-tab",message:"Query"}),value:me.q.Query}),a}),[e,n,i,t,r]))(t,n,r,u,p),g=new URLSearchParams(s.search).get("inspectTab"),f=()=>{d.E1.partial({inspect:null,inspectTab:null})};return r?g===me.q.Help?(0,C.jsx)(Je,{panel:t,plugin:r,onClose:f}):(0,C.jsx)(lt,{dashboard:n,panel:t,plugin:r,defaultTab:g,tabs:h,data:l,isDataLoading:c,dataOptions:i,onDataOptionsChange:a,metadataDatasource:p,onClose:f}):null}));var gt=n(18919),ft=n(81377),mt=n(4651),bt=n(86911),yt=n(21733),vt=n(20821),xt=n(6211),St=n(61240),wt=n.n(St),Mt=n(21564),kt=n.n(Mt),Ot=n(11972);function jt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ct(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function zt(e,t,n){return t&&Ct(e.prototype,t),n&&Ct(e,n),e}function Pt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Wt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Tt(Object(n),!0).forEach((function(t){Pt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Bt(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Dt(e,t)}function Rt(e){return Rt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Rt(e)}function Dt(e,t){return Dt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Dt(e,t)}function It(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function Et(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function At(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?Et(e):t}function Nt(e){return function(){var t,n=Rt(e);if(It()){var r=Rt(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return At(this,t)}}var Ft=function(e){Bt(n,e);var t=Nt(n);function n(){return jt(this,n),t.apply(this,arguments)}return zt(n,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.split,i=e.style,a=e.size,s=e.eleRef,l=["Pane",r,n],d={flex:1,position:"relative",outline:"none"};return void 0!==a&&("vertical"===r?d.width=a:(d.height=a,d.display="flex"),d.flex="none"),d=Object.assign({},d,i||{}),o.createElement("div",{ref:s,className:l.join(" "),style:d},t)}}]),n}(o.PureComponent);Ft.propTypes={className:wt().string.isRequired,children:wt().node.isRequired,size:wt().oneOfType([wt().string,wt().number]),split:wt().oneOf(["vertical","horizontal"]),style:kt(),eleRef:wt().func},Ft.defaultProps={};var Lt="Resizer",_t=function(e){Bt(n,e);var t=Nt(n);function n(){return jt(this,n),t.apply(this,arguments)}return zt(n,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.onClick,r=e.onDoubleClick,i=e.onMouseDown,a=e.onTouchEnd,s=e.onTouchStart,l=e.resizerClassName,d=e.split,c=e.style,u=[l,d,t];return o.createElement("span",{role:"presentation",className:u.join(" "),style:c,onMouseDown:function(e){return i(e)},onTouchStart:function(e){e.preventDefault(),s(e)},onTouchEnd:function(e){e.preventDefault(),a(e)},onClick:function(e){n&&(e.preventDefault(),n(e))},onDoubleClick:function(e){r&&(e.preventDefault(),r(e))}})}}]),n}(o.Component);function $t(e,t){if(e.selection)e.selection.empty();else try{t.getSelection().removeAllRanges()}catch(e){}}function Ht(e,t,n,r){if("number"==typeof r){var o="number"==typeof t?t:0,i="number"==typeof n&&n>=0?n:1/0;return Math.max(o,Math.min(i,r))}return void 0!==e?e:t}_t.propTypes={className:wt().string.isRequired,onClick:wt().func,onDoubleClick:wt().func,onMouseDown:wt().func.isRequired,onTouchStart:wt().func.isRequired,onTouchEnd:wt().func.isRequired,split:wt().oneOf(["vertical","horizontal"]),style:kt(),resizerClassName:wt().string.isRequired},_t.defaultProps={resizerClassName:Lt};var Gt=function(e){Bt(n,e);var t=Nt(n);function n(e){var r;jt(this,n),(r=t.call(this,e)).onMouseDown=r.onMouseDown.bind(Et(r)),r.onTouchStart=r.onTouchStart.bind(Et(r)),r.onMouseMove=r.onMouseMove.bind(Et(r)),r.onTouchMove=r.onTouchMove.bind(Et(r)),r.onMouseUp=r.onMouseUp.bind(Et(r));var o=e.size,i=e.defaultSize,a=e.minSize,s=e.maxSize,l=e.primary,d=void 0!==o?o:Ht(i,a,s,null);return r.state={active:!1,resized:!1,pane1Size:"first"===l?d:void 0,pane2Size:"second"===l?d:void 0,instanceProps:{size:o}},r}return zt(n,[{key:"componentDidMount",value:function(){document.addEventListener("mouseup",this.onMouseUp),document.addEventListener("mousemove",this.onMouseMove),document.addEventListener("touchmove",this.onTouchMove),this.setState(n.getSizeUpdate(this.props,this.state))}},{key:"componentWillUnmount",value:function(){document.removeEventListener("mouseup",this.onMouseUp),document.removeEventListener("mousemove",this.onMouseMove),document.removeEventListener("touchmove",this.onTouchMove)}},{key:"onMouseDown",value:function(e){var t=Object.assign({},e,{touches:[{clientX:e.clientX,clientY:e.clientY}]});this.onTouchStart(t)}},{key:"onTouchStart",value:function(e){var t=this.props,n=t.allowResize,r=t.onDragStarted,o=t.split;if(n){$t(document,window);var i="vertical"===o?e.touches[0].clientX:e.touches[0].clientY;"function"==typeof r&&r(),this.setState({active:!0,position:i})}}},{key:"onMouseMove",value:function(e){var t=Object.assign({},e,{touches:[{clientX:e.clientX,clientY:e.clientY}]});this.onTouchMove(t)}},{key:"onTouchMove",value:function(e){var t=this.props,n=t.allowResize,r=t.maxSize,o=t.minSize,i=t.onChange,a=t.split,s=t.step,l=this.state,d=l.active,c=l.position;if(n&&d){$t(document,window);var u="first"===this.props.primary,p=u?this.pane1:this.pane2,h=u?this.pane2:this.pane1;if(p){var g=p,f=h;if(g.getBoundingClientRect){var m=g.getBoundingClientRect().width,b=g.getBoundingClientRect().height,y="vertical"===a?m:b,v=c-("vertical"===a?e.touches[0].clientX:e.touches[0].clientY);if(s){if(Math.abs(v)<s)return;v=~~(v/s)*s}var x=u?v:-v;parseInt(window.getComputedStyle(g).order)>parseInt(window.getComputedStyle(f).order)&&(x=-x);var S=r;if(void 0!==r&&r<=0){var w=this.splitPane;S="vertical"===a?w.getBoundingClientRect().width+r:w.getBoundingClientRect().height+r}var M=y-x,k=c-v;M<o?M=o:void 0!==r&&M>S?M=S:this.setState({position:k,resized:!0}),i&&i(M),this.setState(Pt({draggedSize:M},u?"pane1Size":"pane2Size",M))}}}}},{key:"onMouseUp",value:function(){var e=this.props,t=e.allowResize,n=e.onDragFinished,r=this.state,o=r.active,i=r.draggedSize;t&&o&&("function"==typeof n&&n(i),this.setState({active:!1}))}},{key:"render",value:function(){var e=this,t=this.props,n=t.allowResize,r=t.children,i=t.className,a=t.onResizerClick,s=t.onResizerDoubleClick,l=t.paneClassName,d=t.pane1ClassName,c=t.pane2ClassName,u=t.paneStyle,p=t.pane1Style,h=t.pane2Style,g=t.resizerClassName,f=t.resizerStyle,m=t.split,b=t.style,y=this.state,v=y.pane1Size,x=y.pane2Size,S=n?"":"disabled",w=g?"".concat(g," ").concat(Lt):g,M=function(e){return o.Children.toArray(e).filter((function(e){return e}))}(r),k=Wt({display:"flex",flex:1,height:"100%",position:"absolute",outline:"none",overflow:"hidden",MozUserSelect:"text",WebkitUserSelect:"text",msUserSelect:"text",userSelect:"text"},b);"vertical"===m?Object.assign(k,{flexDirection:"row",left:0,right:0}):Object.assign(k,{bottom:0,flexDirection:"column",minHeight:"100%",top:0,width:"100%"});var O=["SplitPane",i,m,S],j=Wt({},u,{},p),C=Wt({},u,{},h),z=["Pane1",l,d].join(" "),P=["Pane2",l,c].join(" ");return o.createElement("div",{className:O.join(" "),ref:function(t){e.splitPane=t},style:k},o.createElement(Ft,{className:z,key:"pane1",eleRef:function(t){e.pane1=t},size:v,split:m,style:j},M[0]),o.createElement(_t,{className:S,onClick:a,onDoubleClick:s,onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,onTouchEnd:this.onMouseUp,key:"resizer",resizerClassName:w,split:m,style:f||{}}),o.createElement(Ft,{className:P,key:"pane2",eleRef:function(t){e.pane2=t},size:x,split:m,style:C},M[1]))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return n.getSizeUpdate(e,t)}},{key:"getSizeUpdate",value:function(e,t){var n={};if(t.instanceProps.size===e.size&&void 0!==e.size)return{};var r=void 0!==e.size?e.size:Ht(e.defaultSize,e.minSize,e.maxSize,t.draggedSize);void 0!==e.size&&(n.draggedSize=r);var o="first"===e.primary;return n[o?"pane1Size":"pane2Size"]=r,n[o?"pane2Size":"pane1Size"]=void 0,n.instanceProps={size:e.size},n}}]),n}(o.Component);Gt.propTypes={allowResize:wt().bool,children:wt().arrayOf(wt().node).isRequired,className:wt().string,primary:wt().oneOf(["first","second"]),minSize:wt().oneOfType([wt().string,wt().number]),maxSize:wt().oneOfType([wt().string,wt().number]),defaultSize:wt().oneOfType([wt().string,wt().number]),size:wt().oneOfType([wt().string,wt().number]),split:wt().oneOf(["vertical","horizontal"]),onDragStarted:wt().func,onDragFinished:wt().func,onChange:wt().func,onResizerClick:wt().func,onResizerDoubleClick:wt().func,style:kt(),resizerStyle:kt(),paneClassName:wt().string,pane1ClassName:wt().string,pane2ClassName:wt().string,paneStyle:kt(),pane1Style:kt(),pane2Style:kt(),resizerClassName:wt().string,step:wt().number},Gt.defaultProps={allowResize:!0,minSize:50,primary:"first",split:"vertical",paneClassName:"",pane1ClassName:"",pane2ClassName:""},(0,Ot.O)(Gt);const Vt=Gt;var Ut,qt=n(72e3);function Jt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){e[e.Right=0]="Right",e[e.Top=1]="Top"}(Ut||(Ut={}));class Zt extends o.PureComponent{constructor(){super(...arguments),Jt(this,"rafToken",(0,o.createRef)()),Jt(this,"updateSplitPaneSize",(()=>{void 0!==this.rafToken.current&&window.cancelAnimationFrame(this.rafToken.current),this.rafToken.current=window.requestAnimationFrame((()=>{this.forceUpdate()}))})),Jt(this,"onDragFinished",((e,t)=>{if(document.body.style.cursor="auto",!t)return;const{updateUiState:n}=this.props;e===Ut.Top?n({topPaneSize:t/window.innerHeight}):n({rightPaneSize:t/window.innerWidth})})),Jt(this,"onDragStarted",(()=>{document.body.style.cursor="row-resize"}))}componentDidMount(){window.addEventListener("resize",this.updateSplitPaneSize)}componentWillUnmount(){window.removeEventListener("resize",this.updateSplitPaneSize)}renderHorizontalSplit(){const{leftPaneComponents:e,uiState:t}=this.props,n=Qt(qt.vc.theme),r=t.topPaneSize>=1?t.topPaneSize:t.topPaneSize*window.innerHeight;return Array.isArray(e)?(0,C.jsx)(Vt,{split:"horizontal",maxSize:-200,primary:"first",size:r,pane2Style:{minHeight:0},resizerClassName:n.resizerH,onDragStarted:this.onDragStarted,onDragFinished:e=>this.onDragFinished(Ut.Top,e),children:e}):(0,C.jsx)("div",{className:n.singleLeftPane,children:e})}render(){const{rightPaneVisible:e,rightPaneComponents:t,uiState:n}=this.props,r=Qt(qt.vc.theme),o=n.rightPaneSize<=1?n.rightPaneSize*window.innerWidth:n.rightPaneSize;return e?(0,C.jsxs)(Vt,{split:"vertical",maxSize:-300,size:o,primary:"second",resizerClassName:r.resizerV,onDragStarted:()=>document.body.style.cursor="col-resize",onDragFinished:e=>this.onDragFinished(Ut.Right,e),children:[this.renderHorizontalSplit(),t]}):this.renderHorizontalSplit()}}Jt(Zt,"defaultProps",{rightPaneVisible:!0});const Qt=(0,vt.B)((e=>{const t=e.palette.blue95,n=e.spacing.md,o=r.css`
    position: relative;

    &::before {
      content: '';
      position: absolute;
      transition: 0.2s border-color ease-in-out;
    }

    &::after {
      background: ${e.colors.panelBorder};
      content: '';
      position: absolute;
      left: 50%;
      top: 50%;
      transition: 0.2s background ease-in-out;
      transform: translate(-50%, -50%);
      border-radius: 4px;
    }

    &:hover {
      &::before {
        border-color: ${t};
      }

      &::after {
        background: ${t};
      }
    }
  `;return{singleLeftPane:r.css`
      height: 100%;
      position: absolute;
      overflow: hidden;
      width: 100%;
    `,resizerV:(0,r.cx)(o,r.css`
        cursor: col-resize;
        width: ${n};

        &::before {
          border-right: 1px solid transparent;
          height: 100%;
          left: 50%;
          transform: translateX(-50%);
        }

        &::after {
          height: 200px;
          width: 4px;
        }
      `),resizerH:(0,r.cx)(o,r.css`
        height: ${n};
        cursor: row-resize;
        margin-left: ${n};

        &::before {
          border-top: 1px solid transparent;
          top: 50%;
          transform: translateY(-50%);
          width: 100%;
        }

        &::after {
          height: 4px;
          width: 200px;
        }
      `)}}));var Kt,Yt=n(31271),Xt=n(33097),en=n(13073),tn=n(97370);const nn=e=>{var t;const n=(0,o.useMemo)((()=>en.z.get(e.variable.type).picker),[e.variable]);return e.variable?(0,C.jsxs)("div",{className:"gf-form",children:[(0,C.jsx)(rn,{variable:e.variable}),e.variable.hide!==tn.bU.hideVariable&&n&&(0,C.jsx)(n,{variable:e.variable,readOnly:null!==(t=e.readOnly)&&void 0!==t&&t})]}):Kt||(Kt=(0,C.jsx)("div",{children:"Couldn't load variable"}))};function rn(e){let{variable:t}=e;const n=(0,o.useMemo)((()=>t.label||t.name),[t]);if(t.hide!==tn.bU.dontHide)return null;const r=`var-${t.id}`;return t.description?(0,C.jsx)(Xt.u,{content:t.description,placement:"bottom",children:(0,C.jsx)("label",{className:"gf-form-label gf-form-label--variable","data-testid":l.wl.pages.Dashboard.SubMenu.submenuItemLabels(n),htmlFor:r,children:n})}):(0,C.jsx)("label",{className:"gf-form-label gf-form-label--variable","data-testid":l.wl.pages.Dashboard.SubMenu.submenuItemLabels(n),htmlFor:r,children:n})}const on=e=>{let{variables:t,readOnly:n}=e;const[r,i]=(0,o.useState)([]);return(0,o.useEffect)((()=>{i(t.filter((e=>e.hide!==tn.bU.hideVariable)))}),[t]),0===r.length?null:(0,C.jsx)(C.Fragment,{children:r.map((e=>(0,C.jsx)("div",{className:"submenu-item gf-form-inline","data-testid":l.wl.pages.Dashboard.SubMenu.submenuItem,children:(0,C.jsx)(nn,{variable:e,readOnly:n})},e.id)))})};var an=n(18259),sn=n(80996),ln=n(49792),dn=n(76951),cn=n(11276),un=n(6040),pn=n(68104),hn=n(3357),gn=n(77230),fn=n(51926);function mn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const bn=(e,t)=>{var n;return{angularPanelComponent:null===(n=(0,be.i)(e,t.panel))||void 0===n?void 0:n.angularComponent}},yn={changePanelPlugin:te.Kc};(0,i.connect)(bn,yn);class vn extends o.PureComponent{constructor(e){super(e),mn(this,"element",void 0),mn(this,"angularOptions",void 0)}componentDidMount(){this.loadAngularOptions()}componentDidUpdate(e){this.props.plugin===e.plugin&&this.props.angularPanelComponent===e.angularPanelComponent||this.cleanUpAngularOptions(),this.loadAngularOptions()}componentWillUnmount(){this.cleanUpAngularOptions()}cleanUpAngularOptions(){this.angularOptions&&(this.angularOptions.destroy(),this.angularOptions=null)}loadAngularOptions(){const{panel:e,angularPanelComponent:t,changePanelPlugin:n}=this.props;if(!this.element||!t||this.angularOptions)return;const r=t.getScope();if(!r.$$childHead)return void setTimeout((()=>{this.forceUpdate()}));const o=r.$$childHead.ctrl;o.initEditMode(),o.onPluginTypeChange=t=>{n({panel:e,pluginId:t.id})};let i="";for(let e=0;e<o.editorTabs.length;e++){const t=o.editorTabs[e];t.isOpen=(a=t.title,s=0===e,ee.Z.getBool(`panel-edit-section-${a}`,s)),i+=`\n      <div class="panel-options-group" ng-cloak>\n        <div class="panel-options-group__header" ng-click="toggleOptionGroup(${e})" aria-label="${t.title} section">\n          <div class="panel-options-group__icon">\n            <icon name="ctrl.editorTabs[${e}].isOpen ? 'angle-down' : 'angle-right'"></icon>\n          </div>\n          <div class="panel-options-group__title">${t.title}</div>\n        </div>\n        <div class="panel-options-group__body" ng-if="ctrl.editorTabs[${e}].isOpen">\n          <panel-editor-tab editor-tab="ctrl.editorTabs[${e}]" ctrl="ctrl"></panel-editor-tab>\n        </div>\n      </div>\n      `}var a,s;const l=(0,fn.w)(),d={ctrl:o,toggleOptionGroup:e=>{const t=o.editorTabs[e];t.isOpen=!t.isOpen,function(e,t){ee.Z.set(`panel-edit-section-${e}`,t?"true":"false")}(t.title,t.isOpen)}};this.angularOptions=l.load(this.element,d,i),this.angularOptions.digest()}render(){return(0,C.jsx)("div",{ref:e=>this.element=e})}}const xn=(0,i.connect)(bn,yn)(vn);var Sn=n(94345),wn=n(78755),Mn=n(31843),kn=n(58574),On=n(73091),jn=n(82376),Cn=n.n(jn),zn=n(13627),Pn=n(50356),Tn=n(2338);const Wn=e=>{var t,n;let{property:o,context:i,registry:a,onChange:s,onRemove:l,isSystemOverride:d,searchQuery:c}=e;const p=(0,u.Fg)(),h=Bn(p),g=null==a?void 0:a.getIfExists(o.id);if(!g)return null;const f=Array.isArray(o.value)||o.id===wn.qb.Thresholds||o.id===wn.qb.Links||o.id===wn.qb.Mappings,m=null===(t=g.category)||void 0===t?void 0:t.filter((e=>e!==g.name));let b;const y=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return function(){let r=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return(0,C.jsxs)(W.Lh,{justify:"space-between",children:[(0,C.jsxs)(zn._,{category:m,description:e?g.description:void 0,children:[(0,C.jsx)(Cn(),{textToHighlight:g.name,searchWords:[c],highlightClassName:"search-fragment-highlight"}),!r&&t&&g.getItemsCount&&(0,C.jsx)(Pn.A,{value:g.getItemsCount(o.value)})]}),!d&&(n||(n=(0,C.jsx)("div",{children:(0,C.jsx)(Tn.h,{name:"times",onClick:l})})))]})}};return b=f?(0,C.jsx)(Sn.u,{id:g.name,renderTitle:y(!1,!0),className:r.css`
          padding-left: 0;
          padding-right: 0;
        `,isNested:!0,isOpenDefault:void 0!==o.value,children:(0,C.jsx)(g.override,{value:o.value,onChange:e=>{s(e)},item:g,context:i})}):(0,C.jsx)("div",{children:(0,C.jsx)(Oe.g,{label:y()(),description:g.description,children:(0,C.jsx)(g.override,{value:o.value,onChange:e=>{s(e)},item:g,context:i})})}),(0,C.jsx)("div",{className:(0,r.cx)(f&&h.collapsibleOverrideEditor,!f&&"dynamicConfigValueEditor--nonCollapsible"),children:b})},Bn=(0,vt.B)((e=>({collapsibleOverrideEditor:r.css`
      label: collapsibleOverrideEditor;
      & + .dynamicConfigValueEditor--nonCollapsible {
        margin-top: ${e.spacing.formSpacingBase}px;
      }
    `})));var Rn,Dn=n(55947),In=n(58871);const En=e=>{let{isExpanded:t,registry:n,matcherUi:r,overrideName:o,override:i,onOverrideRemove:a}=e;const s=(0,u.yK)(An),l=i.properties.map((e=>n.getIfExists(e.id))).filter((e=>!!e)).map((e=>null==e?void 0:e.name)).join(", "),d=r.optionsToLabel(i.matcher.options);return(0,C.jsxs)("div",{children:[(0,C.jsxs)(W.Lh,{justify:"space-between",children:[(0,C.jsx)("div",{children:o}),(0,C.jsx)(Tn.h,{name:"trash-alt",onClick:a,title:"Remove override"})]}),!t&&(0,C.jsx)("div",{className:s.overrideDetails,children:(0,C.jsxs)("div",{className:s.options,title:d,children:[d," ",Rn||(Rn=(0,C.jsx)(J.J,{name:"angle-right"}))," ",l]})})]})};En.displayName="OverrideTitle";const An=e=>({matcherUi:r.css`
      padding: ${e.spacing.sm};
    `,propertyPickerWrapper:r.css`
      margin-top: ${2*e.spacing.formSpacingBase}px;
    `,overrideDetails:r.css`
      font-size: ${e.typography.size.sm};
      color: ${e.colors.textWeak};
      font-weight: ${e.typography.weight.regular};
    `,options:r.css`
      overflow: hidden;
      padding-right: ${e.spacing.xl};
    `,unknownLabel:r.css`
      margin-bottom: 0;
    `});function Nn(e,t){var n,r;const o=[],i=e.panel.fieldConfig,a=e.plugin.fieldConfigRegistry,s=null!==(n=null===(r=e.data)||void 0===r?void 0:r.series)&&void 0!==n?n:[];if(a.isEmpty())return[];const l=(t,n)=>{let r=(0,F.cloneDeep)(i.overrides);r[t]=n,e.onFieldConfigsChange(Object.assign({},i,{overrides:r}))},d=t=>{let n=(0,F.cloneDeep)(i.overrides);n.splice(t,1),e.onFieldConfigsChange(Object.assign({},i,{overrides:n}))},c={data:s,getSuggestions:e=>(0,On.PW)(s,e),isOverride:!0};for(let n=0;n<i.overrides.length;n++){const r=i.overrides[n],s=`Override ${n+1}`,u=Mn.i.get(r.matcher.id),p=Fn(a),h=(0,wn.v3)(r),g=0===r.properties.length?1:0,f=new Dn.j({title:s,id:s,forceOpen:g,renderTitle:function(e){return(0,C.jsx)(En,{override:r,isExpanded:e,registry:a,overrideName:s,matcherUi:u,onOverrideRemove:()=>d(n)})}}),m=e=>{r.matcher.options=e,l(n,r)},b=(e,t)=>{const o=a.get(t.value),i={id:o.id,value:o.defaultValue};r.properties?e.properties.push(i):e.properties=[i],l(n,e)};f.addItem(new In.a({title:u.name,render:function(){var t,o;return(0,C.jsx)(u.component,{id:`${u.matcher.id}-${n}`,matcher:u.matcher,data:null!==(t=null===(o=e.data)||void 0===o?void 0:o.series)&&void 0!==t?t:[],options:r.matcher.options,onChange:m})}}));for(let e=0;e<r.properties.length;e++){const o=r.properties[e],i=a.getIfExists(o.id);if(!i)continue;const s=t=>{r.properties[e].value=t,l(n,r)},d=()=>{r.properties.splice(e,1),l(n,r)};f.addItem(new In.a({title:i.name,skipField:!0,render:function(){return(0,C.jsx)(Wn,{isSystemOverride:h,onChange:s,onRemove:d,property:o,registry:a,context:c,searchQuery:t},`${o.id}/${e}`)}}))}!h&&r.matcher.options&&f.addItem(new In.a({title:"----------",skipField:!0,render:function(){return(0,C.jsx)(kn.b,{label:"Add override property",variant:"secondary",isFullWidth:!0,icon:"plus",menuPlacement:"auto",options:p,onChange:e=>b(r,e)},"Add override property")}})),o.push(f)}return o.push(new Dn.j({title:"add button",id:"add button",customRender:function(){return(0,C.jsx)(Ln,{children:(0,C.jsx)(kn.b,{icon:"plus",label:"Add field override",variant:"secondary",menuPlacement:"auto",isFullWidth:!0,size:"md",options:Mn.i.list().filter((e=>!e.excludeFromPicker)).map((e=>({label:e.name,value:e.id,description:e.description}))),onChange:t=>(t=>{e.onFieldConfigsChange(Object.assign({},i,{overrides:[...i.overrides,{matcher:{id:t.value},properties:[]}]}))})(t)})},"Add override")}})),o}function Fn(e){return e.list().filter((e=>!e.hideFromOverrides)).map((e=>{let t=e.name;return e.category&&(t=[...e.category,e.name].join(" > ")),{label:t,value:e.id,description:e.description}}))}function Ln(e){let{children:t}=e;const n=(0,u.wW)(_n);return(0,C.jsx)("div",{className:n,children:t})}function _n(e){return(0,r.css)({borderTop:`1px solid ${e.colors.border.weak}`,padding:`${e.spacing(2)}`,display:"flex"})}const $n=e=>{var t;let{panel:n,formatDate:r}=e;const o=(0,u.yK)(Hn);return(0,ln.V)(n)?(0,C.jsxs)("div",{className:o.info,children:[(0,C.jsxs)("div",{className:o.libraryPanelInfo,children:[`Used on ${n.libraryPanel.meta.connectedDashboards} `,1===n.libraryPanel.meta.connectedDashboards?"dashboard":"dashboards"]}),(0,C.jsxs)("div",{className:o.libraryPanelInfo,children:["Last edited on ",null!==(t=null==r?void 0:r(n.libraryPanel.meta.updated,"L"))&&void 0!==t?t:n.libraryPanel.meta.updated," by",n.libraryPanel.meta.updatedBy.avatarUrl&&(0,C.jsx)("img",{width:"22",height:"22",className:o.userAvatar,src:n.libraryPanel.meta.updatedBy.avatarUrl,alt:`Avatar for ${n.libraryPanel.meta.updatedBy.name}`}),n.libraryPanel.meta.updatedBy.name]})]}):null},Hn=e=>({info:r.css`
      line-height: 1;
    `,libraryPanelInfo:r.css`
      color: ${e.colors.textSemiWeak};
      font-size: ${e.typography.size.sm};
    `,userAvatar:r.css`
      border-radius: 50%;
      box-sizing: content-box;
      width: 22px;
      height: 22px;
      padding-left: ${e.spacing.sm};
      padding-right: ${e.spacing.sm};
    `});function Gn(e){const{panel:t,onPanelConfigChange:n,dashboard:r}=e,o=new Dn.j({title:"Library panel options",id:"Library panel options",isOpenDefault:!0});return(0,ln.V)(t)&&o.addItem(new In.a({title:"Name",value:t.libraryPanel.name,popularRank:1,render:function(){return(0,C.jsx)(q.I,{id:"LibraryPanelFrameName",defaultValue:t.libraryPanel.name,onBlur:e=>n("libraryPanel",Object.assign({},t.libraryPanel,{name:e.currentTarget.value}))})}})).addItem(new In.a({title:"Information",render:function(){return(0,C.jsx)($n,{panel:t,formatDate:r.formatDate})}})),o}var Vn=n(50859),Un=n(15983);const qn=e=>{let{repeat:t,onChange:n,id:r}=e;const i=(0,x.v9)((e=>(0,dn.gt)((0,dn.S_)(e),e))),a=(0,o.useMemo)((()=>{const e=i.map((e=>({label:e.name,value:e.name})));return 0===e.length&&e.unshift({label:"No template variables found",value:null}),e.unshift({label:"Disable repeating",value:null}),e}),[i]),s=(0,o.useCallback)((e=>n(e.value)),[n]);return(0,C.jsx)(je.Ph,{inputId:r,value:t,onChange:s,options:a})};function Jn(e){var t;const{panel:n,onPanelConfigChange:r}=e;return new Dn.j({title:"Panel options",id:"Panel options",isOpenDefault:!0}).addItem(new In.a({title:"Title",value:n.title,popularRank:1,render:function(){return(0,C.jsx)(q.I,{id:"PanelFrameTitle",defaultValue:n.title,onBlur:e=>r("title",e.currentTarget.value)})}})).addItem(new In.a({title:"Description",description:n.description,value:n.description,render:function(){return(0,C.jsx)(Vn.K,{id:"description-text-area",defaultValue:n.description,onBlur:e=>r("description",e.currentTarget.value)})}})).addItem(new In.a({title:"Transparent background",render:function(){return(0,C.jsx)(Pe.r,{value:n.transparent,id:"transparent-background",onChange:e=>r("transparent",e.currentTarget.checked)})}})).addCategory(new Dn.j({title:"Panel links",id:"Panel links",isOpenDefault:!1,itemsCount:null===(t=n.links)||void 0===t?void 0:t.length}).addItem(new In.a({title:"Panel links",render:function(){return(0,C.jsx)(Un.d,{links:n.links,onChange:e=>r("links",e),getSuggestions:On.PR,data:[]})}}))).addCategory(new Dn.j({title:"Repeat options",id:"Repeat options",isOpenDefault:!1}).addItem(new In.a({title:"Repeat by variable",description:"Repeat this panel for each value in the selected variable. This is not visible while in edit mode. You need to go back to dashboard and then update the variable or reload the dashboard.",render:function(){return(0,C.jsx)(qn,{id:"repeat-by-variable-select",repeat:n.repeat,onChange:e=>{r("repeat",e)}})}})).addItem(new In.a({title:"Repeat direction",showIf:()=>!!n.repeat,render:function(){return(0,C.jsx)(ft.S,{options:[{label:"Horizontal",value:"h"},{label:"Vertical",value:"v"}],value:n.repeatDirection||"h",onChange:e=>r("repeatDirection",e)})}})).addItem(new In.a({title:"Max per row",showIf:()=>Boolean(n.repeat&&"h"===n.repeatDirection),render:function(){const e=[2,3,4,6,8,12].map((e=>({label:e.toString(),value:e})));return(0,C.jsx)(je.Ph,{options:e,value:n.maxPerRow,onChange:e=>r("maxPerRow",e.value)})}})))}var Zn=n(39620);class Qn{constructor(e,t){this.categories=e,this.overrides=t}search(e){const t=new RegExp(e,"i"),n=this.collectHits(this.categories,t,[]).sort(Kn).map((e=>e.item)),r=this.collectHits(this.overrides,t,[]).sort(Kn).map((e=>e.item));return{optionHits:n,overrideHits:this.buildOverrideHitCategories(r),totalCount:this.getAllOptionsCount(this.categories)}}collectHits(e,t,n){for(const r of e){const e=t.test(r.props.title);for(const o of r.items)t.test(o.props.title)?n.push({item:o,rank:1}):o.props.description&&t.test(o.props.description)?n.push({item:o,rank:2}):e&&n.push({item:o,rank:3});r.categories.length>0&&this.collectHits(r.categories,t,n)}return n}getAllOptionsCount(e){let t=0;for(const n of e)t+=n.items.length,n.categories.length>0&&(t+=this.getAllOptionsCount(n.categories));return t}buildOverrideHitCategories(e){const t={};for(const n of e){let e=t[n.parent.props.title];e||(e=t[n.parent.props.title]=new Dn.j(n.parent.props),e.addItem(n.parent.items[0])),e.items[0].props.title!==n.props.title&&e.addItem(n)}return Object.values(t)}}function Kn(e,t){return e.rank-t.rank}function Yn(e){const t=[];for(const n of e)for(const e of n.items)"Unit"===e.props.title&&(e.props.popularRank=2),"Min"===e.props.title&&(e.props.popularRank=3),"Max"===e.props.title&&(e.props.popularRank=4),"Display name"===e.props.title&&(e.props.popularRank=5),e.props.popularRank&&t.push(e);return t.sort(((e,t)=>e.props.popularRank-t.props.popularRank))}const Xn=e=>{const{plugin:t,dashboard:n,panel:r}=e,[i,a]=(0,o.useState)(""),[s,l]=(0,o.useState)(tr.All),d=(0,u.wW)(nr),[c,p,h]=(0,o.useMemo)((()=>[Jn(e),(0,Zn.AL)(e),Gn(e)]),[r.configRev,e.data,e.instanceState,i]),g=(0,o.useMemo)((()=>Nn(e,i)),[r.configRev,e.data,e.instanceState,i]),f=[],m=i.length>0,b=(0,o.useMemo)(er,[]),y=(0,ln.V)(r)?[h,c,...p]:[c,...p];if(m)f.push(function(e,t,n){const r=new Qn(e,t),{optionHits:o,totalCount:i,overrideHits:a}=r.search(n);return(0,C.jsxs)("div",{children:[(0,C.jsx)(Sn.u,{id:"Found options",title:`Matched ${o.length}/${i} options`,forceOpen:1,children:o.map((e=>e.render(n)))},"Normal options"),a.map((e=>e.render(n)))]},"search results")}(y,g,i)),e.plugin.angularPanelCtrl&&f.push((0,C.jsx)("div",{className:d.searchNotice,children:"This is an old visualization type that does not support searching all options."},"Search notice"));else switch(s){case tr.All:(0,ln.V)(r)&&f.push(h.render()),f.push(c.render()),e.plugin.angularPanelCtrl&&f.push((0,C.jsx)(xn,{plugin:t,dashboard:n,panel:r},"AngularOptions"));for(const e of p)f.push(e.render());for(const e of g)f.push(e.render());break;case tr.Overrides:for(const e of g)f.push(e.render());break;case tr.Recent:f.push((0,C.jsx)(Sn.u,{id:"Recent options",title:"Recent options",forceOpen:1,children:Yn(y).map((e=>e.render()))},"Recent options"))}const v=!m&&!t.fieldConfigRegistry.isEmpty();return(0,C.jsxs)("div",{className:d.wrapper,children:[(0,C.jsxs)("div",{className:d.formBox,children:[(0,C.jsx)("div",{className:d.formRow,children:(0,C.jsx)(hn.H,{width:0,value:i,onChange:a,placeholder:"Search options"})}),v&&(0,C.jsx)("div",{className:d.formRow,children:(0,C.jsx)(ft.S,{options:b,value:s,fullWidth:!0,onChange:l})})]}),(0,C.jsx)("div",{className:d.scrollWrapper,children:(0,C.jsx)(gn.$,{autoHeightMin:"100%",children:(0,C.jsx)("div",{className:d.mainBox,children:f})})})]})};function er(){return[{label:tr.All,value:tr.All},{label:tr.Overrides,value:tr.Overrides}]}let tr;!function(e){e.All="All",e.Overrides="Overrides",e.Recent="Recent"}(tr||(tr={}));const nr=e=>({wrapper:r.css`
    height: 100%;
    display: flex;
    flex-direction: column;
    flex: 1 1 0;

    .search-fragment-highlight {
      color: ${e.colors.warning.text};
      background: transparent;
    }
  `,searchBox:r.css`
    display: flex;
    flex-direction: column;
    min-height: 0;
  `,formRow:r.css`
    margin-bottom: ${e.spacing(1)};
  `,formBox:r.css`
    padding: ${e.spacing(1)};
    background: ${e.colors.background.primary};
    border: 1px solid ${e.components.panel.borderColor};
    border-top-left-radius: ${e.shape.borderRadius(1.5)};
    border-bottom: none;
  `,closeButton:r.css`
    margin-left: ${e.spacing(1)};
  `,searchHits:r.css`
    padding: ${e.spacing(1,1,0,1)};
  `,scrollWrapper:r.css`
    flex-grow: 1;
    min-height: 0;
  `,searchNotice:r.css`
    font-size: ${e.typography.size.sm};
    color: ${e.colors.text.secondary};
    padding: ${e.spacing(1)};
    text-align: center;
  `,mainBox:r.css`
    background: ${e.colors.background.primary};
    border: 1px solid ${e.components.panel.borderColor};
    border-top: none;
    flex-grow: 1;
  `});var rr=n(37263),or=n(50279);const ir=e=>t=>t.plugins.panels[e]||(0,or.X)(`Panel plugin not found (${e})`,!0),ar=e=>{let{panel:t}=e;const n=(0,u.yK)(sr),r=(0,x.I0)(),o=(0,x.v9)(ir(t.type)),i=(0,x.v9)((e=>e.panelEditor.ui.isPanelOptionsVisible)),a=(0,x.v9)((e=>e.panelEditor.isVizPickerOpen));return o?(0,C.jsx)("div",{className:n.wrapper,children:(0,C.jsxs)(rr.h,{children:[(0,C.jsx)(mt.h,{className:n.vizButton,tooltip:"Click to change visualization",imgSrc:o.meta.info.logos.small,isOpen:a,onClick:()=>{r((0,re.g_)(!a))},"aria-label":l.wl.components.PanelEditor.toggleVizPicker,variant:"canvas",fullWidth:!0,children:o.meta.name}),(0,C.jsx)(mt.h,{tooltip:i?"Close options pane":"Show options pane",icon:i?"angle-right":"angle-left",onClick:()=>{r((0,re.K9)({isPanelOptionsVisible:!i}))},variant:"canvas","aria-label":l.wl.components.PanelEditor.toggleVizOptions})]})}):null};ar.displayName="VisualizationTab";const sr=e=>({wrapper:r.css`
      display: flex;
      flex-direction: column;
    `,vizButton:r.css`
      text-align: left;
    `});var lr=n(27322),dr=n(56921),cr=n(50137),ur=n(11617),pr=n(89023),hr=n(97867);const gr=e=>{let{onConfirm:t,onDismiss:n,panel:r}=e;const o=(0,ln.V)(r),i=(o?"Changing":"Replace with")+" library panel",a=(o?"Changing":"Replacing with a")+" library panel will remove any changes since last save.";return(0,C.jsx)(hr.s,{onConfirm:t,onDismiss:n,confirmText:o?"Change":"Replace",title:i,body:a,dismissText:"Cancel",isOpen:!0})};var fr=n(61746);const mr=e=>{var t;let{panel:n,searchQuery:r}=e;const[i,a]=(0,o.useState)(!1),[s,l]=(0,o.useState)(void 0),[d,c]=(0,o.useState)([]),u=(0,o.useCallback)((e=>{c(e.map((e=>e.id)))}),[c]),p=(0,cr.h4)().getCurrent(),h=(0,x.I0)();return(0,C.jsxs)(W.wc,{spacing:"md",children:[!n.libraryPanel&&(0,C.jsx)(W.wc,{align:"center",children:(0,C.jsx)(R.zx,{icon:"plus",onClick:()=>a(!0),variant:"secondary",fullWidth:!0,children:"Create new library panel"})}),(0,C.jsx)(ur.j,{onChange:u}),(0,C.jsx)("div",{className:br.libraryPanelsView,children:(0,C.jsx)(fr.u,{currentPanelId:null===(t=n.libraryPanel)||void 0===t?void 0:t.uid,searchString:r,panelFilter:d,onClickCard:l,showSecondaryActions:!0})}),i&&(0,C.jsx)(pr.c,{panel:n,onDismiss:()=>a(!1),initialFolderId:null==p?void 0:p.meta.folderId,isOpen:i}),s&&(0,C.jsx)(gr,{panel:n,onDismiss:()=>l(void 0),onConfirm:async()=>{s&&(l(void 0),h((0,te.ih)(n,s)))}})]})},br={libraryPanelsView:r.css`
    width: 100%;
  `};var yr=n(23265),vr=n(32738);const xr=["timeseries","barchart","gauge","stat","piechart","bargauge","table","state-timeline","status-history","logs","candlestick"];var Sr=n(1474);function wr(e){var t,n;let{data:o,suggestion:i,onChange:a,width:s,showTitle:d}=e;const c=(0,u.wW)(Mr),{innerStyles:p,outerStyles:h,renderWidth:g,renderHeight:f}=function(e){const t=1.6,n=e*(1/t),r=350,o=r*(1/t),i=6;return{renderHeight:o,renderWidth:r,outerStyles:{width:e,height:n},innerStyles:{width:r,height:o,transform:`scale(${(e-2*i)/r}, ${(n-2*i)/o})`}}}(s),m=null!==(t=i.cardOptions)&&void 0!==t?t:{},b={"aria-label":i.name,className:c.vizBox,"data-testid":l.wl.components.VisualizationPreview.card(i.name),style:h,onClick:()=>{a({pluginId:i.pluginId,options:i.options,fieldConfig:i.fieldConfig})}};var y;if(m.imgSrc)return(0,C.jsx)(Xt.u,{content:null!==(y=i.description)&&void 0!==y?y:i.name,children:(0,C.jsxs)("button",Object.assign({},b,{className:(0,r.cx)(c.vizBox,c.imgBox),children:[(0,C.jsx)("div",{className:c.name,children:i.name}),(0,C.jsx)("img",{className:c.img,src:m.imgSrc,alt:i.name})]}))});let v=i;return null!==(n=i.cardOptions)&&void 0!==n&&n.previewModifier&&(v=(0,F.cloneDeep)(i),i.cardOptions.previewModifier(v)),(0,C.jsx)("button",Object.assign({},b,{children:(0,C.jsx)(Xt.u,{content:i.name,children:(0,C.jsxs)("div",{style:p,className:c.renderContainer,children:[(0,C.jsx)(Sr.$,{title:"",data:o,pluginId:i.pluginId,width:g,height:f,options:v.options,fieldConfig:v.fieldConfig}),(0,C.jsx)("div",{className:c.hoverPane})]})})}))}const Mr=e=>({hoverPane:(0,r.css)({position:"absolute",top:0,right:0,left:0,borderRadius:e.spacing(2),bottom:0}),vizBox:r.css`
      position: relative;
      background: none;
      border-radius: ${e.shape.borderRadius(1)};
      cursor: pointer;
      border: 1px solid ${e.colors.border.medium};

      transition: ${e.transitions.create(["background"],{duration:e.transitions.duration.short})};

      &:hover {
        background: ${e.colors.background.secondary};
      }
    `,imgBox:r.css`
      display: flex;
      flex-direction: column;
      height: 100%;

      justify-self: center;
      color: ${e.colors.text.primary};
      width: 100%;
      display: flex;

      justify-content: center;
      align-items: center;
      text-align: center;
    `,name:r.css`
      padding-bottom: ${e.spacing(.5)};
      margin-top: ${e.spacing(-1)};
      font-size: ${e.typography.bodySmall.fontSize};
      white-space: nowrap;
      overflow: hidden;
      color: ${e.colors.text.secondary};
      font-weight: ${e.typography.fontWeightMedium};
      text-overflow: ellipsis;
    `,img:r.css`
      max-width: ${e.spacing(8)};
      max-height: ${e.spacing(8)};
    `,renderContainer:r.css`
      position: absolute;
      transform-origin: left top;
      top: 6px;
      left: 6px;
    `});function kr(e){let{onChange:t,data:n,panel:r,searchQuery:o}=e;const i=(0,u.wW)(Or),{value:a}=(0,G.Z)((()=>async function(e,t){const n=new yr.mi(e,t);for(const e of xr){const t=(await(0,vr.Ub)(e)).getSuggestionsSupplier();t&&t.getSuggestionsForData(n)}const r=n.getList();if(0===n.dataSummary.fieldCount)for(const e of Object.values(c.v.panels))e.skipDataQuery&&!e.hideFromList&&r.push({name:e.name,pluginId:e.id,description:e.info.description,cardOptions:{imgSrc:e.info.logos.small}});return r.sort(((e,t)=>{var n,r;return(null!==(n=t.score)&&void 0!==n?n:yr._.OK)-(null!==(r=e.score)&&void 0!==r?r:yr._.OK)}))}(n,r)),[n,r]),[s,l]=(0,lr.Z)("VisualizationSuggestions.showTitle",!1),d=function(e,t){if(!e||!t)return t||[];const n=new RegExp(e,"i");return t.filter((e=>n.test(e.name)||n.test(e.pluginId)))}(o,a);return(0,C.jsx)(ye.Z,{disableHeight:!0,style:{width:"100%",height:"100%"},children:e=>{let{width:r}=e;if(!r)return null;const a=Math.floor(r/170),c=(r-8*(a-1))/a;return(0,C.jsxs)("div",{children:[(0,C.jsx)("div",{className:i.filterRow,children:(0,C.jsx)("div",{className:i.infoText,onClick:()=>l(!s),children:"Based on current data"})}),(0,C.jsxs)("div",{className:i.grid,style:{gridTemplateColumns:`repeat(auto-fill, ${c-1}px)`},children:[d.map(((e,r)=>(0,C.jsx)(wr,{data:n,suggestion:e,onChange:t,width:c,showTitle:s},r))),o&&0===d.length&&(0,C.jsx)("div",{className:i.infoText,children:"No results matched your query"})]})]})}})}const Or=e=>({heading:(0,r.css)(Object.assign({},e.typography.h5,{margin:e.spacing(0,.5,1)})),filterRow:(0,r.css)({display:"flex",flexDirection:"row",justifyContent:"space-around",alignItems:"center",paddingBottom:"8px"}),infoText:(0,r.css)({fontSize:e.typography.bodySmall.fontSize,color:e.colors.text.secondary,fontStyle:"italic"}),grid:(0,r.css)({display:"grid",gridGap:e.spacing(1),gridTemplateColumns:"repeat(auto-fill, 144px)",marginBottom:e.spacing(1),justifyContent:"space-evenly"})});var jr=n(27473),Cr=n(96029),zr=n(973);const Pr=e=>{let{isCurrent:t,plugin:n,onClick:r,disabled:o}=e;return(0,C.jsx)(zr.X,{title:n.name,plugin:n,description:n.info.description,onClick:r,isCurrent:t,disabled:o,showBadge:!0})};var Tr;function Wr(e){let{searchQuery:t,onChange:n,current:r,data:i}=e;const a=(0,u.wW)(Br),s=(0,o.useMemo)((()=>(0,Cr.x)()),[]),l=(0,o.useMemo)((()=>(0,Cr.r)(s,t,r)),[r,s,t]);return 0===l.length?Tr||(Tr=(0,C.jsx)(jr.K,{children:"Could not find anything matching your query"})):(0,C.jsx)("div",{className:a.grid,children:l.map(((e,t)=>(0,C.jsx)(Pr,{disabled:!1,isCurrent:e.id===r.id,plugin:e,onClick:t=>n({pluginId:e.id,withModKey:Boolean(t.metaKey||t.ctrlKey||t.altKey)})},e.id)))})}Pr.displayName="VizTypePickerPlugin";const Br=e=>({grid:r.css`
      max-width: 100%;
      display: grid;
      grid-gap: ${e.spacing(.5)};
    `,heading:(0,r.css)(Object.assign({},e.typography.h5,{margin:e.spacing(0,.5,1)}))});var Rr=n(32176);const Dr=e=>{let{panel:t,data:n}=e;const r=(0,x.v9)(ir(t.type)),[i,a]=(0,o.useState)(""),[s,d]=(0,lr.Z)(dr.FL,Rr.Ok.Visualizations),c=(0,x.I0)(),p=(0,u.yK)(Ir),h=(0,o.useRef)(null),g=(0,o.useCallback)((e=>{c((0,te.Kc)(Object.assign({panel:t},e))),e.withModKey||c((0,re.g_)(!1))}),[c,t]);if(!r)return null;const f=[{label:"Visualizations",value:Rr.Ok.Visualizations},{label:"Suggestions",value:Rr.Ok.Suggestions},{label:"Library panels",value:Rr.Ok.LibraryPanels,description:"Reusable panels you can share between multiple dashboards."}];return(0,C.jsxs)("div",{className:p.openWrapper,children:[(0,C.jsxs)("div",{className:p.formBox,children:[(0,C.jsxs)("div",{className:p.searchRow,children:[(0,C.jsx)(hn.H,{value:i,onChange:a,ref:h,autoFocus:!0,placeholder:"Search for..."}),(0,C.jsx)(R.zx,{title:"Close",variant:"secondary",icon:"angle-up",className:p.closeButton,"aria-label":l.wl.components.PanelEditor.toggleVizPicker,onClick:()=>{c((0,re.g_)(!1))}})]}),(0,C.jsx)(Oe.g,{className:p.customFieldMargin,children:(0,C.jsx)(ft.S,{options:f,value:s,onChange:d,fullWidth:!0})})]}),(0,C.jsx)("div",{className:p.scrollWrapper,children:(0,C.jsx)(gn.$,{autoHeightMin:"100%",children:(0,C.jsxs)("div",{className:p.scrollContent,children:[s===Rr.Ok.Visualizations&&(0,C.jsx)(Wr,{current:r.meta,onChange:g,searchQuery:i,data:n,onClose:()=>{}}),s===Rr.Ok.Suggestions&&(0,C.jsx)(kr,{current:r.meta,onChange:g,searchQuery:i,panel:t,data:n,onClose:()=>{}}),s===Rr.Ok.LibraryPanels&&(0,C.jsx)(mr,{searchQuery:i,panel:t},"Panel Library")]})})})]})};Dr.displayName="VisualizationSelectPane";const Ir=e=>({icon:r.css`
      color: ${e.palette.gray33};
    `,wrapper:r.css`
      display: flex;
      flex-direction: column;
      flex: 1 1 0;
      height: 100%;
    `,vizButton:r.css`
      text-align: left;
    `,scrollWrapper:r.css`
      flex-grow: 1;
      min-height: 0;
    `,scrollContent:r.css`
      padding: ${e.spacing.sm};
    `,openWrapper:r.css`
      display: flex;
      flex-direction: column;
      flex: 1 1 100%;
      height: 100%;
      background: ${e.colors.bg1};
      border: 1px solid ${e.colors.border1};
    `,searchRow:r.css`
      display: flex;
      margin-bottom: ${e.spacing.sm};
    `,closeButton:r.css`
      margin-left: ${e.spacing.sm};
    `,customFieldMargin:r.css`
      margin-bottom: ${e.spacing.sm};
    `,formBox:r.css`
      padding: ${e.spacing.sm};
      padding-bottom: 0;
    `}),Er=e=>{let{plugin:t,panel:n,onFieldConfigsChange:r,onPanelOptionsChanged:o,onPanelConfigChange:i,dashboard:a,instanceState:s}=e;const d=(0,u.yK)(Ar),c=(0,x.v9)((e=>e.panelEditor.isVizPickerOpen)),{data:p}=Ke(n,{withTransforms:!0,withFieldConfig:!1},!0);return(0,C.jsxs)("div",{className:d.wrapper,"aria-label":l.wl.components.PanelEditor.OptionsPane.content,children:[!c&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("div",{className:d.vizButtonWrapper,children:(0,C.jsx)(ar,{panel:n})}),(0,C.jsx)("div",{className:d.optionsWrapper,children:(0,C.jsx)(Xn,{panel:n,dashboard:a,plugin:t,instanceState:s,data:p,onFieldConfigsChange:r,onPanelOptionsChanged:o,onPanelConfigChange:i})})]}),c&&(0,C.jsx)(Dr,{panel:n,data:p})]})},Ar=e=>({wrapper:r.css`
      height: 100%;
      width: 100%;
      display: flex;
      flex: 1 1 0;
      flex-direction: column;
      padding: 0;
    `,optionsWrapper:r.css`
      flex-grow: 1;
      min-height: 0;
    `,vizButtonWrapper:r.css`
      padding: 0 ${e.spacing.md} ${e.spacing.md} 0;
    `,legacyOptions:r.css`
      label: legacy-options;
      .panel-options-grid {
        display: flex;
        flex-direction: column;
      }
      .panel-options-group {
        margin-bottom: 0;
      }
      .panel-options-group__body {
        padding: ${e.spacing.md} 0;
      }

      .section {
        display: block;
        margin: ${e.spacing.md} 0;

        &:first-child {
          margin-top: 0;
        }
      }
    `});var Nr=n(58709),Fr=n(87022),Lr=n(77149),_r=n(23185);function $r(e){let{width:t,height:n,panel:r,dashboard:i}=e;const{data:a}=Ke(r,{withTransforms:!0,withFieldConfig:!1},!1),[s,l]=(0,o.useState)({frameIndex:0,showHeader:!0,showTypeIcons:!0});return(0,o.useEffect)((()=>{const e=(0,Ae.$t)(),n=r.events.subscribe(Nr.U5,(()=>{const n=(0,Lr.W1)(r,e.timeRange());r.runAllPanelQueries({dashboardId:i.id,dashboardUID:i.uid,dashboardTimezone:i.getTimezone(),timeData:n,width:t})}));return()=>{n.unsubscribe()}}),[r,i,t]),a?(0,C.jsx)(Fr.fm,{width:t,height:n,padding:"none",children:(e,t)=>{var n;return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(_r.Z,{panel:r,error:null==a||null===(n=a.error)||void 0===n?void 0:n.message}),(0,C.jsx)(Sr.$,{title:"Raw data",pluginId:"table",width:e,height:t,data:a,options:s,onOptionsChange:l})]})}}):null}var Hr=n(93080),Gr=n(6102),Vr=n(38826),Ur=n(97726);function qr(e){let{message:t}=e;const n=(0,o.useCallback)((()=>{d.E1.partial({tab:Rr.Ip.Query})}),[]);return(0,C.jsx)(W.Ar,{justify:"center",style:{marginTop:"100px"},children:(0,C.jsxs)(W.wc,{spacing:"md",children:[(0,C.jsx)("h2",{children:t}),(0,C.jsx)("div",{children:(0,C.jsx)(R.zx,{size:"md",variant:"secondary",icon:"arrow-left",onClick:n,children:"Go back to Queries"})})]})})}var Jr,Zr,Qr=n(5205),Kr=n(47180),Yr=n(12159);function Xr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class eo extends o.PureComponent{constructor(){super(...arguments),Xr(this,"state",{stateHistoryItems:[]}),Xr(this,"clearHistory",(async()=>{const{dashboard:e,panelId:t,onRefresh:n}=this.props;await(0,Qr.i)().post("/api/annotations/mass-delete",{dashboardId:e.id,panelId:t}),this.setState({stateHistoryItems:[]}),n()}))}componentDidMount(){const{dashboard:e,panelId:t}=this.props;(0,Qr.i)().get(`/api/annotations?dashboardId=${e.id}&panelId=${t}&limit=50&type=alert`,{},`state-history-${e.id}-${t}`).then((t=>{const n=t.map((t=>({stateModel:Yr.Z.getStateDisplayModel(t.newState),time:e.formatDate(t.time,"MMM D, YYYY HH:mm:ss"),info:Yr.Z.getAlertAnnotationInfo(t)})));this.setState({stateHistoryItems:n})}))}render(){const{stateHistoryItems:e}=this.state;return(0,C.jsxs)("div",{children:[e.length>0&&(0,C.jsxs)("div",{className:"p-b-1",children:[Jr||(Jr=(0,C.jsx)("span",{className:"muted",children:"Last 50 state changes"})),(0,C.jsx)(Kr.p,{onConfirm:this.clearHistory,confirmVariant:"destructive",confirmText:"Clear",children:(0,C.jsx)(R.zx,{className:r.css`
                  direction: ltr;
                `,variant:"destructive",icon:"trash-alt",children:"Clear history"})})]}),(0,C.jsx)("ol",{className:"alert-rule-list",children:e.length>0?e.map(((e,t)=>(0,C.jsxs)("li",{className:"alert-rule-item",children:[(0,C.jsx)("div",{className:`alert-rule-item__icon ${e.stateModel.stateClass}`,children:(0,C.jsx)(J.J,{name:e.stateModel.iconClass,size:"xl"})}),(0,C.jsxs)("div",{className:"alert-rule-item__body",children:[(0,C.jsxs)("div",{className:"alert-rule-item__header",children:[(0,C.jsx)("p",{className:"alert-rule-item__name",children:e.alertName}),(0,C.jsx)("div",{className:"alert-rule-item__text",children:(0,C.jsx)("span",{className:`${e.stateModel.stateClass}`,children:e.stateModel.text})})]}),e.info]}),(0,C.jsx)("div",{className:"alert-rule-item__time",children:e.time})]},`${e.time}-${t}`))):Zr||(Zr=(0,C.jsx)("i",{children:"No state changes recorded"}))})]})}}const to=eo;var no,ro,oo,io=n(42384),ao=n(56993);function so(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class lo extends o.PureComponent{constructor(){super(...arguments),so(this,"state",{isLoading:!1,allNodesExpanded:null,testRuleResponse:{}}),so(this,"formattedJson",void 0),so(this,"clipboard",void 0),so(this,"setFormattedJson",(e=>{this.formattedJson=e})),so(this,"getTextForClipboard",(()=>JSON.stringify(this.formattedJson,null,2))),so(this,"onToggleExpand",(()=>{this.setState((e=>Object.assign({},e,{allNodesExpanded:!this.state.allNodesExpanded})))})),so(this,"getNrOfOpenNodes",(()=>null===this.state.allNodesExpanded?3:this.state.allNodesExpanded?20:1)),so(this,"renderExpandCollapse",(()=>{const{allNodesExpanded:e}=this.state,t=(0,C.jsxs)(C.Fragment,{children:[no||(no=(0,C.jsx)(J.J,{name:"minus-circle"}))," Collapse All"]}),n=(0,C.jsxs)(C.Fragment,{children:[ro||(ro=(0,C.jsx)(J.J,{name:"plus-circle"}))," Expand All"]});return e?t:n}))}componentDidMount(){this.testRule()}async testRule(){const{dashboard:e,panel:t}=this.props,n=e.getSaveModelClone();n.panels=n.panels.map((e=>e.id===t.id?t.getSaveModel():e));const r={dashboard:n,panelId:t.id};this.setState({isLoading:!0});const o=await(0,Qr.i)().post("/api/alerts/test",r);this.setState({isLoading:!1,testRuleResponse:o})}render(){const{testRuleResponse:e,isLoading:t}=this.state;if(!0===t)return oo||(oo=(0,C.jsx)(io.u,{text:"Evaluating rule"}));const n=this.getNrOfOpenNodes();return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("div",{className:"pull-right",children:(0,C.jsxs)(W.Lh,{spacing:"md",children:[(0,C.jsx)("div",{onClick:this.onToggleExpand,children:this.renderExpandCollapse()}),(0,C.jsx)(Ce.m,{getText:this.getTextForClipboard,icon:"copy",children:"Copy to Clipboard"})]})}),(0,C.jsx)(ao.g,{json:e,open:n,onDidRender:this.setFormattedJson})]})}}var co,uo=n(89721);function po(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class ho extends o.PureComponent{constructor(){super(...arguments),po(this,"element",void 0),po(this,"component",void 0),po(this,"panelCtrl",void 0),po(this,"state",{validationMessage:"",showStateHistory:!1,showDeleteConfirmation:!1,showTestRule:!1}),po(this,"onAngularPanelUpdated",(()=>{this.forceUpdate()})),po(this,"onAddAlert",(()=>{var e,t;null===(e=this.panelCtrl)||void 0===e||e._enableAlert(),null===(t=this.component)||void 0===t||t.digest(),this.forceUpdate()})),po(this,"onToggleModal",(e=>{const t=this.state[e];this.setState(Object.assign({},this.state,{[e]:!t}))})),po(this,"renderTestRule",(()=>{if(!this.state.showTestRule)return null;const{panel:e,dashboard:t}=this.props,n=()=>this.onToggleModal("showTestRule");return(0,C.jsx)(U.u,{isOpen:!0,icon:"bug",title:"Testing rule",onDismiss:n,onClickBackdrop:n,children:(0,C.jsx)(lo,{panel:e,dashboard:t})})})),po(this,"renderDeleteConfirmation",(()=>{if(!this.state.showDeleteConfirmation)return null;const{panel:e}=this.props,t=()=>this.onToggleModal("showDeleteConfirmation");return(0,C.jsx)(hr.s,{isOpen:!0,icon:"trash-alt",title:"Delete",body:co||(co=(0,C.jsxs)("div",{children:["Are you sure you want to delete this alert rule?",(0,C.jsx)("br",{}),(0,C.jsx)("small",{children:"You need to save dashboard for the delete to take effect."})]})),confirmText:"Delete alert",onDismiss:t,onConfirm:()=>{var n;delete e.alert,e.thresholds=[],this.panelCtrl&&(this.panelCtrl.alertState=null,this.panelCtrl.render()),null===(n=this.component)||void 0===n||n.digest(),t()}})})),po(this,"renderStateHistory",(()=>{if(!this.state.showStateHistory)return null;const{panel:e,dashboard:t}=this.props,n=()=>this.onToggleModal("showStateHistory");return(0,C.jsx)(U.u,{isOpen:!0,icon:"history",title:"State history",onDismiss:n,onClickBackdrop:n,children:(0,C.jsx)(to,{dashboard:t,panelId:e.id,onRefresh:()=>{var e;return null===(e=this.panelCtrl)||void 0===e?void 0:e.refresh()}})})}))}async componentDidMount(){c.v.angularSupportEnabled?(await Promise.all([n.e(1670),n.e(5718)]).then(n.bind(n,31131)),this.loadAlertTab()):alert("Angular support disabled, legacy alerting cannot function without angular support")}componentDidUpdate(e){this.loadAlertTab()}componentWillUnmount(){this.component&&this.component.destroy()}async loadAlertTab(){const{panel:e,angularPanelComponent:t}=this.props;if(!this.element||this.component)return;if(t){const e=t.getScope();if(!e.$$childHead)return void setTimeout((()=>{this.forceUpdate()}));this.panelCtrl=e.$$childHead.ctrl}else this.panelCtrl=this.getReactAlertPanelCtrl();const n=(0,fn.w)(),r={ctrl:this.panelCtrl};this.component=n.load(this.element,r,"<alert-tab />");const o=await(0,uo.E)(e.transformations,e.targets,(0,ut.F)(),e.datasource);o&&this.setState({validationMessage:o})}getReactAlertPanelCtrl(){return{panel:this.props.panel,events:new Vr.F,render:()=>{this.props.panel.render()}}}render(){const{alert:e,transformations:t}=this.props.panel,{validationMessage:n}=this.state,r=t&&t.length>0;if(!e&&n)return(0,C.jsx)(qr,{message:n});const o={title:"Panel has no alert rule defined",buttonIcon:"bell",onClick:this.onAddAlert,buttonTitle:"Create Alert"};return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(gn.$,{autoHeightMin:"100%",children:(0,C.jsx)(W.W2,{padding:"md",children:(0,C.jsxs)("div",{"aria-label":l.wl.components.AlertTab.content,children:[e&&r&&(0,C.jsx)(O.b,{severity:x.F1.Error,title:"Transformations are not supported in alert queries"}),(0,C.jsx)("div",{ref:e=>this.element=e}),e&&(0,C.jsxs)(W.Lh,{children:[(0,C.jsx)(R.zx,{onClick:()=>this.onToggleModal("showStateHistory"),variant:"secondary",children:"State history"}),(0,C.jsx)(R.zx,{onClick:()=>this.onToggleModal("showTestRule"),variant:"secondary",children:"Test rule"}),(0,C.jsx)(R.zx,{onClick:()=>this.onToggleModal("showDeleteConfirmation"),variant:"destructive",children:"Delete"})]}),!e&&!n&&(0,C.jsx)(Ur.Z,Object.assign({},o))]})})}),this.renderTestRule(),this.renderDeleteConfirmation(),this.renderStateHistory()]})}}const go=(0,i.connect)(((e,t)=>{var n;return{angularPanelComponent:null===(n=(0,be.i)(e,t.panel))||void 0===n?void 0:n.angularComponent}}),{})(ho);var fo,mo,bo=n(85994),yo=n(40295);const vo=e=>{let{dashboard:t,panel:n,className:r}=e;const o=(0,x.v9)((e=>e.templating)),i=(0,L.TH)(),{loading:a,value:s}=(0,G.Z)((()=>(0,yo.aR)(n,t)),[n,t,o]);if(a)return fo||(fo=(0,C.jsx)(R.zx,{disabled:!0,children:"Create alert rule from this panel"}));if(!s)return mo||(mo=(0,C.jsx)(O.b,{severity:"info",title:"No alerting capable query found",children:"Cannot create alerts from this panel because no query to an alerting capable datasource is found."}));const l=bo.Cj.renderUrl("alerting/new",{defaults:JSON.stringify(s),returnTo:i.pathname+i.search});return(0,C.jsx)(R.Qj,{icon:"bell",href:l,className:r,"data-testid":"create-alert-rule-button",children:"Create alert rule from this panel"})};var xo=n(48856),So=n(68175),wo=n(73285),Mo=n(11126),ko=n(27121),Oo=n(63373),jo=n(7566);function Co(e){var t,n;let{dashboard:r,panel:i,poll:a=!1}=e;const s=(0,x.I0)(),l=null!==(t=(0,jo._)((e=>e.promRules[Mo.GC])))&&void 0!==t?t:ko.oq,d=null!==(n=(0,jo._)((e=>e.rulerRules[Mo.GC])))&&void 0!==n?n:ko.oq;(0,o.useEffect)((()=>{const e=()=>{s((0,So.y6)({rulesSourceName:Mo.GC,filter:{dashboardUID:r.uid,panelId:i.id}})),s((0,So.UR)({rulesSourceName:Mo.GC,filter:{dashboardUID:r.uid,panelId:i.id}}))};if(e(),a){const t=setInterval(e,wo.p4);return()=>{clearInterval(t)}}return()=>{}}),[s,a,i.id,r.uid]);const c=l.loading||d.loading,u=[l.error,d.error].filter((e=>!!e)),p=(0,Oo.Zo)(Mo.GC);return{rules:(0,o.useMemo)((()=>p.flatMap((e=>e.groups)).flatMap((e=>e.rules)).filter((e=>e.annotations[wo.q6.dashboardUID]===r.uid&&e.annotations[wo.q6.panelID]===String(i.id)))),[p,r,i]),errors:u,loading:c}}var zo,Po,To,Wo=n(72721);const Bo=e=>({newButton:r.css`
    margin-top: ${e.spacing(3)};
  `,innerWrapper:r.css`
    padding: ${e.spacing(2)};
  `,noRulesWrapper:r.css`
    margin: ${e.spacing(2)};
    background-color: ${e.colors.background.secondary};
    padding: ${e.spacing(3)};
  `}),Ro=c.v.unifiedAlertingEnabled?e=>{let{dashboard:t,panel:n}=e;const r=(0,u.wW)(Bo),{errors:o,loading:i,rules:a}=Co({dashboard:t,panel:n,poll:!0}),s=(0,Wo.Bz)("grafana"),d=H.Vt.hasPermission(s.create),c=o.length?(0,C.jsx)(O.b,{title:"Errors loading rules",severity:"error",children:o.map(((e,t)=>(0,C.jsxs)("div",{children:["Failed to load Grafana rules state: ",e.message||"Unknown error."]},t)))}):null;return i&&!a.length?(0,C.jsxs)("div",{className:r.innerWrapper,children:[c,zo||(zo=(0,C.jsx)(io.u,{text:"Loading rules..."}))]}):a.length?(0,C.jsx)(gn.$,{autoHeightMin:"100%",children:(0,C.jsxs)("div",{className:r.innerWrapper,children:[c,(0,C.jsx)(xo.i,{rules:a}),!!t.meta.canSave&&d&&(0,C.jsx)(vo,{className:r.newButton,panel:n,dashboard:t})]})}):(0,C.jsxs)("div",{"aria-label":l.wl.components.PanelAlertTabContent.content,className:r.noRulesWrapper,children:[c,!!t.uid&&(0,C.jsxs)(C.Fragment,{children:[Po||(Po=(0,C.jsx)("p",{children:"There are no alert rules linked to this panel."})),!!t.meta.canSave&&d&&(0,C.jsx)(vo,{panel:n,dashboard:t})]}),!t.uid&&!!t.meta.canSave&&(To||(To=(0,C.jsx)(O.b,{severity:"info",title:"Dashboard not saved",children:"Dashboard must be saved before alerts can be added."})))]})}:go,Do=["panel","dashboard"];const Io=e=>{let{panel:t,dashboard:n}=e,r=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,Do);const{rules:o,loading:i}=Co({panel:t,dashboard:n});return(0,C.jsx)(ke.O,Object.assign({},r,{counter:i?null:o.length}))};var Eo=n(56618),Ao=n(30235),No=n(14350),Fo=n(3351),Lo=n(42805);const _o={[No.x.Transformations]:"https://grafana.com/docs/grafana/latest/panels/transformations",[No.x.FieldConfig]:"https://grafana.com/docs/grafana/latest/panels/field-configuration-options/",[No.x.FieldConfigOverrides]:"https://grafana.com/docs/grafana/latest/panels/field-configuration-options/#override-a-field"};var $o,Ho=n(4471),Go=n(20673),Vo=n(90325),Uo=n(72076),qo=n(2871),Jo=n(2670),Zo=n(57464);const Qo=e=>{let{debugMode:t,index:n,data:r,uiConfig:i,configs:a,onChange:s}=e;const d=(0,u.yK)(Ko),[c,p]=(0,o.useState)([]),[h,g]=(0,o.useState)([]),f=(0,o.useMemo)((()=>a[n]),[a,n]);(0,o.useEffect)((()=>{const e=a.slice(0,n).map((e=>e.transformation)),t=a.slice(n,n+1).map((e=>e.transformation)),o=(0,Zo.H)(e,r).subscribe(p),i=(0,Zo.H)(e,r).pipe((0,Jo.z)((e=>(0,Zo.H)(t,e)))).subscribe(g);return function(){o.unsubscribe(),i.unsubscribe()}}),[n,r,a]);const m=(0,o.useMemo)((()=>o.createElement(i.editor,{options:Object.assign({},i.transformation.defaultOptions,f.transformation.options),input:c,onChange:e=>{s(n,{id:f.transformation.id,options:e})}})),[i.editor,i.transformation.defaultOptions,f.transformation.options,f.transformation.id,c,s,n]);return(0,C.jsxs)("div",{className:d.editor,"aria-label":l.wl.components.TransformTab.transformationEditor(i.name),children:[m,t&&(0,C.jsxs)("div",{className:d.debugWrapper,"aria-label":l.wl.components.TransformTab.transformationEditorDebugger(i.name),children:[(0,C.jsxs)("div",{className:d.debug,children:[(0,C.jsx)("div",{className:d.debugTitle,children:"Transformation input data"}),(0,C.jsx)("div",{className:d.debugJson,children:(0,C.jsx)(ao.g,{json:c})})]}),(0,C.jsx)("div",{className:d.debugSeparator,children:$o||($o=(0,C.jsx)(J.J,{name:"arrow-right"}))}),(0,C.jsxs)("div",{className:d.debug,children:[(0,C.jsx)("div",{className:d.debugTitle,children:"Transformation output data"}),(0,C.jsx)("div",{className:d.debugJson,children:h&&(0,C.jsx)(ao.g,{json:h})})]})]})]})},Ko=e=>{const t=e.isLight?e.palette.gray85:e.palette.gray15;return{title:r.css`
      display: flex;
      padding: 4px 8px 4px 8px;
      position: relative;
      height: 35px;
      border-radius: 4px 4px 0 0;
      flex-wrap: nowrap;
      justify-content: space-between;
      align-items: center;
    `,name:r.css`
      font-weight: ${e.typography.weight.semibold};
      color: ${e.colors.textBlue};
    `,iconRow:r.css`
      display: flex;
    `,icon:r.css`
      background: transparent;
      border: none;
      box-shadow: none;
      cursor: pointer;
      color: ${e.colors.textWeak};
      margin-left: ${e.spacing.sm};
      &:hover {
        color: ${e.colors.text};
      }
    `,editor:r.css``,debugWrapper:r.css`
      display: flex;
      flex-direction: row;
    `,debugSeparator:r.css`
      width: 48px;
      min-height: 300px;
      display: flex;
      align-items: center;
      align-self: stretch;
      justify-content: center;
      margin: 0 ${e.spacing.xs};
      color: ${e.colors.textBlue};
    `,debugTitle:r.css`
      padding: ${e.spacing.sm} ${e.spacing.xxs};
      font-family: ${e.typography.fontFamily.monospace};
      font-size: ${e.typography.size.sm};
      color: ${e.colors.text};
      border-bottom: 1px solid ${t};
      flex-grow: 0;
      flex-shrink: 1;
    `,debug:r.css`
      margin-top: ${e.spacing.sm};
      padding: 0 ${e.spacing.sm} ${e.spacing.sm} ${e.spacing.sm};
      border: 1px solid ${t};
      background: ${e.isLight?e.palette.white:e.palette.gray05};
      border-radius: ${e.border.radius.sm};
      width: 100%;
      min-height: 300px;
      display: flex;
      flex-direction: column;
      align-self: stretch;
    `,debugJson:r.css`
      flex-grow: 1;
      height: 100%;
      overflow: hidden;
      padding: ${e.spacing.xs};
    `}},Yo=e=>{var t;let{onRemove:n,index:r,id:i,data:a,configs:s,uiConfig:l,onChange:d}=e;const[c,u]=(0,Go.Z)(!1),[p,h]=(0,Go.Z)(!1),g=s[r].transformation.disabled,f=(0,o.useCallback)((e=>{const t=s[e].transformation;d(e,Object.assign({},t,{disabled:!t.disabled||void 0}))}),[d,s]);return(0,C.jsxs)(qo.t,{id:i,index:r,title:l.name,draggable:!0,actions:e=>{let{isOpen:o}=e;return(0,C.jsxs)(W.Lh,{align:"center",width:"auto",children:[l.state&&(0,C.jsx)(Ho.u,{state:l.state}),t||(t=(0,C.jsx)(Uo.y,{title:"Show/hide transform help",icon:"info-circle",onClick:h,active:p})),(0,C.jsx)(Uo.y,{title:"Debug",disabled:!o,icon:"bug",onClick:u,active:c}),(0,C.jsx)(Uo.y,{title:"Disable/Enable transformation",icon:g?"eye-slash":"eye",onClick:()=>f(r),active:g}),(0,C.jsx)(Uo.y,{title:"Remove",icon:"trash-alt",onClick:()=>n(r)})]})},disabled:g,children:[p&&(0,C.jsx)(Vo.h,{markdown:Xo(l)}),(0,C.jsx)(Qo,{debugMode:c,index:r,data:a,configs:s,uiConfig:l,onChange:d})]})};function Xo(e){var t;return`\n${null!==(t=e.help)&&void 0!==t?t:e.description}\n\nGo the <a href="https://grafana.com/docs/grafana/latest/panels/transformations/?utm_source=grafana" target="_blank" rel="noreferrer">\ntransformation documentation\n</a> for more.\n`}const ei=e=>{let{data:t,onChange:n,onRemove:r,configs:o}=e;return(0,C.jsx)(C.Fragment,{children:o.map(((e,i)=>{const a=Ao.Z.getIfExists(e.transformation.id);return a?(0,C.jsx)(Yo,{index:i,id:`${e.id}`,data:t,configs:o,uiConfig:a,onRemove:r,onChange:n},`${e.id}`):null}))})};var ti,ni;function ri(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class oi extends o.PureComponent{constructor(e){super(e),ri(this,"subscription",void 0),ri(this,"onSearchChange",(e=>{this.setState({search:e.target.value})})),ri(this,"onSearchKeyDown",(e=>{if("Enter"===e.key){const{search:e}=this.state;if(e){const t=e.toLowerCase(),n=Ao.Z.list().filter((e=>(e.name+e.description).toLowerCase().indexOf(t)>=0));n.length>0&&this.onTransformationAdd({value:n[0].id})}}else 27===e.keyCode&&(this.setState({search:"",showPicker:!1}),e.stopPropagation())})),ri(this,"getTransformationNextId",(e=>{const{transformations:t}=this.state;let n=0;const r=t.filter((t=>t.id.startsWith(e))).map((e=>e.id));return 0!==r.length&&(n=Math.max(...r.map((e=>parseInt(e.match(/\d+/)[0],10))))+1),`${e}-${n}`})),ri(this,"onTransformationAdd",(e=>{const{transformations:t}=this.state,n=this.getTransformationNextId(e.value);this.setState({search:"",showPicker:!1}),this.onChange([...t,{id:n,transformation:{id:e.value,options:{}}}])})),ri(this,"onTransformationChange",((e,t)=>{const{transformations:n}=this.state,r=Array.from(n);r[e].transformation=t,this.onChange(r)})),ri(this,"onTransformationRemove",(e=>{const{transformations:t}=this.state,n=Array.from(t);n.splice(e,1),this.onChange(n)})),ri(this,"onDragEnd",(e=>{const{transformations:t}=this.state;if(!e||!e.destination)return;const n=e.source.index,r=e.destination.index;if(n===r)return;const o=Array.from(t),[i]=o.splice(n,1);o.splice(r,0,i),this.onChange(o)})),ri(this,"renderTransformationEditors",(()=>{const{data:e,transformations:t}=this.state;return(0,C.jsx)(Eo.Z5,{onDragEnd:this.onDragEnd,children:(0,C.jsx)(Eo.bK,{droppableId:"transformations-list",direction:"vertical",children:n=>(0,C.jsxs)("div",Object.assign({ref:n.innerRef},n.droppableProps,{children:[(0,C.jsx)(ei,{configs:t,data:e,onRemove:this.onTransformationRemove,onChange:this.onTransformationChange}),n.placeholder]}))})})}));const t=e.panel.transformations||[],n=this.buildTransformationIds(t);this.state={transformations:t.map(((e,t)=>({transformation:e,id:n[t]}))),data:[],search:""}}buildTransformationIds(e){const t={},n=[];for(let r=0;r<e.length;r++){const o=e[r];void 0===t[o.id]?t[o.id]=0:t[o.id]+=1,n.push(`${e[r].id}-${t[e[r].id]}`)}return n}componentDidMount(){this.subscription=this.props.panel.getQueryRunner().getData({withTransforms:!1,withFieldConfig:!1}).subscribe({next:e=>this.setState({data:e.series})})}componentWillUnmount(){this.subscription&&this.subscription.unsubscribe()}onChange(e){this.setState({transformations:e}),this.props.panel.setTransformations(e.map((e=>e.transformation)))}renderTransformsPicker(){const{transformations:e,search:t}=this.state;let n=null,r=Ao.Z.list().sort(((e,t)=>e.name>t.name?1:t.name>e.name?-1:0));if(t){const e=t.toLowerCase(),o=r.filter((t=>(t.name+t.description).toLowerCase().indexOf(e)>=0));n=(0,C.jsxs)(C.Fragment,{children:[o.length," / ",r.length,"   ",(0,C.jsx)(Tn.h,{name:"times",onClick:()=>{this.setState({search:""})}})]}),r=o}const o=!(null!=e&&e.length),i=o||this.state.showPicker;return n||!i||o||(n=(0,C.jsx)(Tn.h,{name:"times",onClick:()=>{this.setState({showPicker:!1})}})),(0,C.jsxs)(C.Fragment,{children:[o&&(0,C.jsx)(W.W2,{grow:1,children:(0,C.jsx)(Lo.G,{storageKey:"dashboard.components.TransformationEditor.featureInfoBox.isDismissed",defaultValue:!1,children:(e,t)=>{return e?null:(0,C.jsxs)(O.b,{title:"Transformations",severity:"info",onRemove:()=>{t(!0)},children:[ti||(ti=(0,C.jsxs)("p",{children:["Transformations allow you to join, calculate, re-order, hide, and rename your query results before they are visualized. ",(0,C.jsx)("br",{}),"Many transforms are not suitable if you're using the Graph visualization, as it currently only supports time series data. ",(0,C.jsx)("br",{}),"It can help to switch to the Table visualization to understand what a transformation is doing."," "]})),(0,C.jsx)("a",{href:(n=No.x.Transformations,_o[n]),className:"external-link",target:"_blank",rel:"noreferrer",children:"Read more"})]});var n}})}),i?(0,C.jsxs)(W.wc,{children:[(0,C.jsx)(q.I,{"aria-label":l.wl.components.Transforms.searchInput,value:null!=t?t:"",autoFocus:!o,placeholder:"Add transformation",onChange:this.onSearchChange,onKeyDown:this.onSearchKeyDown,suffix:n}),r.map((e=>(0,C.jsx)(ii,{transform:e,onClick:()=>{this.onTransformationAdd({value:e.id})}},e.name)))]}):(0,C.jsx)(R.zx,{icon:"plus",variant:"secondary",onClick:()=>{this.setState({showPicker:!0})},children:"Add transformation"})]})}render(){const{panel:{alert:e}}=this.props,{transformations:t}=this.state,n=t.length>0;return!n&&e?ni||(ni=(0,C.jsx)(qr,{message:"Transformations can't be used on a panel with existing alerts"})):(0,C.jsx)(gn.$,{autoHeightMin:"100%",children:(0,C.jsx)(W.W2,{padding:"md",children:(0,C.jsxs)("div",{"aria-label":l.wl.components.TransformTab.content,children:[n&&e?(0,C.jsx)(O.b,{severity:x.F1.Error,title:"Transformations can't be used on a panel with alerts"}):null,n&&this.renderTransformationEditors(),this.renderTransformsPicker()]})})})}}function ii(e){let{transform:t,onClick:n}=e;const r=(0,u.wW)(ai);return(0,C.jsxs)(Fo.Z,{className:r.card,"aria-label":l.wl.components.TransformTab.newTransform(t.name),onClick:n,children:[(0,C.jsx)(Fo.Z.Heading,{children:t.name}),(0,C.jsx)(Fo.Z.Description,{children:t.description}),t.state&&(0,C.jsx)(Fo.Z.Tags,{children:(0,C.jsx)(Ho.u,{state:t.state})})]})}const ai=e=>({card:r.css`
      margin: 0;
      padding: ${e.spacing(1)};
    `}),si=(0,u.Zz)(oi);var li=n(68786),di=n(48889),ci=n(75101);function ui(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class pi extends o.PureComponent{constructor(e){super(e),ui(this,"onRunQueries",(()=>{this.props.panel.refresh()})),ui(this,"onOpenQueryInspector",(()=>{d.E1.partial({inspect:this.props.panel.id,inspectTab:"query"})})),ui(this,"onOptionsChange",(e=>{var t;const{panel:n}=this.props;n.updateQueries(e),e.dataSource.uid!==(null===(t=n.datasource)||void 0===t?void 0:t.uid)&&setTimeout(this.onRunQueries,10),this.forceUpdate()}))}buildQueryOptions(e){var t,n;const r=null!==(t=e.datasource)&&void 0!==t?t:{default:!0},o=(0,di.ak)().getInstanceSettings(r);return{cacheTimeout:null!=o&&null!==(n=o.meta.queryOptions)&&void 0!==n&&n.cacheTimeout?e.cacheTimeout:void 0,dataSource:{default:null==o?void 0:o.isDefault,type:null==o?void 0:o.type,uid:null==o?void 0:o.uid},queries:e.targets,maxDataPoints:e.maxDataPoints,minInterval:e.interval,timeRange:{from:e.timeFrom,shift:e.timeShift,hide:e.hideTimeOverride}}}async componentDidMount(){const{panel:e}=this.props;if(!e.datasource){const t=(0,di.ak)().getInstanceSettings(null);e.datasource=(0,li.iU)(t),this.forceUpdate()}}render(){const{panel:e}=this.props;if(!e.datasource)return null;const t=this.buildQueryOptions(e);return(0,C.jsx)(ci.D,{options:t,queryRunner:e.getQueryRunner(),onRunQueries:this.onRunQueries,onOpenQueryInspector:this.onOpenQueryInspector,onOptionsChange:this.onOptionsChange})}}const hi=o.memo((e=>{let{panel:t,dashboard:n,tabs:r,onChangeTab:i}=e;const a=(0,Ie.N)(),s=(0,u.wW)(fi);(0,o.useEffect)((()=>{const e=new gt.w0;return e.add(t.events.subscribe(S.pO,a)),e.add(t.events.subscribe(S.Xw,a)),()=>e.unsubscribe()}),[t,n,a]);const l=r.find((e=>e.active));return 0===r.length?null:(0,C.jsxs)("div",{className:s.wrapper,children:[(0,C.jsx)(Me.J,{className:s.tabBar,hideBorder:!0,children:r.map((e=>e.id===Rr.Ip.Alert?function(e,t,n,r){if(!c.v.alertingEnabled&&!c.v.unifiedAlertingEnabled)return null;if(c.v.unifiedAlertingEnabled)return(0,C.jsx)(Io,{label:e.text,active:e.active,onChangeTab:()=>r(e),icon:(0,Hr.iJ)(e.icon),panel:t,dashboard:n},e.id);if(c.v.alertingEnabled)return(0,C.jsx)(ke.O,{label:e.text,active:e.active,onChangeTab:()=>r(e),icon:(0,Hr.iJ)(e.icon),counter:gi(t,e)},e.id);return null}(e,t,n,i):(0,C.jsx)(ke.O,{label:e.text,active:e.active,onChangeTab:()=>i(e),icon:(0,Hr.iJ)(e.icon),counter:gi(t,e)},e.id)))}),(0,C.jsxs)(Gr.I,{className:s.tabContent,children:[l.id===Rr.Ip.Query&&(0,C.jsx)(pi,{panel:t,queries:t.targets}),l.id===Rr.Ip.Alert&&(0,C.jsx)(Ro,{panel:t,dashboard:n}),l.id===Rr.Ip.Transform&&(0,C.jsx)(si,{panel:t})]})]})}));function gi(e,t){var n;switch(t.id){case Rr.Ip.Query:return e.targets.length;case Rr.Ip.Alert:return e.alert?1:0;case Rr.Ip.Transform:return(null!==(n=e.getTransformations())&&void 0!==n?n:[]).length}return null}hi.displayName="PanelEditorTabs";const fi=e=>({wrapper:r.css`
      display: flex;
      flex-direction: column;
      height: 100%;
    `,tabBar:r.css`
      padding-left: ${e.spacing(2)};
    `,tabContent:r.css`
      padding: 0;
      display: flex;
      flex-direction: column;
      flex-grow: 1;
      min-height: 0;
      background: ${e.colors.background.primary};
      border: 1px solid ${e.components.panel.borderColor};
      border-left: none;
      border-bottom: none;
      border-top-right-radius: ${e.shape.borderRadius(1.5)};
    `});const mi=(0,n(16360).Z)(((e,t)=>{var n;const r=[];if(!t)return r;let o=Rr.Ip.Visualize;if(t.meta.skipDataQuery)return[];t.meta.skipDataQuery||(o=Rr.Ip.Query,r.push({id:Rr.Ip.Query,text:"Query",icon:"database",active:!1}),r.push({id:Rr.Ip.Transform,text:"Transform",icon:"process",active:!1}));const{alertingEnabled:i,unifiedAlertingEnabled:a}=(0,qt.iE)(),s=H.Vt.hasPermission((0,Wo.Bz)(Mo.GC).read),l=i||a&&s,d="graph"===t.meta.id,c="timeseries"===t.meta.id;(l&&d||c)&&r.push({id:Rr.Ip.Alert,text:"Alert",icon:"bell",active:!1});return(null!==(n=r.find((t=>t.id===(e||o))))&&void 0!==n?n:r[0]).active=!0,r}));var bi;function yi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const vi={initPanelEditor:function(e,t){return async n=>{const r=t.initEditPanel(e);await n((0,te.JI)(r)),n((0,re.Hl)({panel:r,sourcePanel:e}))}},discardPanelChanges:oe,updatePanelEditorUIState:function(e){return(t,n)=>{const r=Object.assign({},n().panelEditor.ui,e);t((0,re.K9)(r));try{ee.Z.setObject(re.jy,r)}catch(e){console.error(e)}}},updateTimeZoneForSession:an.YT,toggleTableView:re.OT,notifyApp:p.$l},xi=(0,i.connect)(((e,t)=>{const n=e.panelEditor.getPanel(),r=(0,be.i)(e,n);return{panel:n,plugin:null==r?void 0:r.plugin,instanceState:null==r?void 0:r.instanceState,initDone:e.panelEditor.initDone,uiState:e.panelEditor.ui,tableViewEnabled:e.panelEditor.tableViewEnabled,variables:(0,dn.gt)(t.dashboard.uid,e)}}),vi);class Si extends o.PureComponent{constructor(){super(...arguments),yi(this,"eventSubs",void 0),yi(this,"state",{showSaveLibraryPanelModal:!1}),yi(this,"triggerForceUpdate",(()=>{this.forceUpdate()})),yi(this,"onBack",(()=>{d.E1.partial({editPanel:null,tab:null,showCategory:null})})),yi(this,"onDiscard",(()=>{this.props.discardPanelChanges(),this.onBack()})),yi(this,"onSaveDashboard",(()=>{Yt.h$.publish(new S.Dn({component:pn.d,props:{dashboard:this.props.dashboard}}))})),yi(this,"onSaveLibraryPanel",(async()=>{(0,ln.V)(this.props.panel)&&this.setState({showSaveLibraryPanelModal:!0})})),yi(this,"onChangeTab",(e=>{d.E1.partial({tab:e.id})})),yi(this,"onFieldConfigChange",(e=>{this.props.panel.updateFieldConfig(Object.assign({},e))})),yi(this,"onPanelOptionsChanged",(e=>{this.props.panel.updateOptions(e)})),yi(this,"onPanelConfigChanged",((e,t)=>{this.props.panel.setProperty(e,t),this.props.panel.render(),this.forceUpdate()})),yi(this,"onDisplayModeChange",(e=>{const{updatePanelEditorUIState:t}=this.props;this.props.tableViewEnabled&&this.props.toggleTableView(),t({mode:e})})),yi(this,"onToggleTableView",(()=>{this.props.toggleTableView()})),yi(this,"onTogglePanelOptions",(()=>{const{uiState:e,updatePanelEditorUIState:t}=this.props;t({isPanelOptionsVisible:!e.isPanelOptionsVisible})})),yi(this,"onGoBackToDashboard",(()=>{d.E1.partial({editPanel:null,tab:null,showCategory:null})})),yi(this,"onConfirmAndDismissLibarayPanelModel",(()=>{this.setState({showSaveLibraryPanelModal:!1})}))}componentDidMount(){this.props.initPanelEditor(this.props.sourcePanel,this.props.dashboard)}componentDidUpdate(){const{panel:e,initDone:t}=this.props;t&&!this.eventSubs&&(this.eventSubs=new gt.w0,this.eventSubs.add(e.events.subscribe(S.Wj,this.triggerForceUpdate)))}componentWillUnmount(){var e;null===(e=this.eventSubs)||void 0===e||e.unsubscribe()}renderPanel(e,t){const{dashboard:n,panel:r,uiState:o,tableViewEnabled:i,theme:a}=this.props;return(0,C.jsxs)("div",{className:e.mainPaneWrapper,children:[this.renderPanelToolbar(e),(0,C.jsx)("div",{className:e.panelWrapper,children:(0,C.jsx)(ye.Z,{children:s=>{let{width:l,height:d}=s;if(l<3||d<3)return null;if(t&&(d-=2*a.spacing.gridSize),i)return(0,C.jsx)($r,{width:l,height:d,panel:r,dashboard:n});const c=(0,pt.jF)(o.mode,l,d,r);return(0,C.jsx)("div",{className:e.centeringContainer,style:{width:l,height:d},children:(0,C.jsx)("div",{style:c,"data-panelid":r.id,children:(0,C.jsx)(cn.l,{stateKey:r.key,dashboard:n,panel:r,isEditing:!0,isViewing:!1,lazy:!1,width:c.width,height:c.height},r.key)})})}})})]},"panel")}renderPanelAndEditor(e){const{panel:t,dashboard:n,plugin:r,tab:o}=this.props,i=mi(o,r),a=0===i.length,s=this.renderPanel(e,a);return 0===i.length?s:[s,(0,C.jsx)("div",{className:e.tabsWrapper,"aria-label":l.wl.components.PanelEditor.DataPane.content,children:(0,C.jsx)(hi,{panel:t,dashboard:n,tabs:i,onChangeTab:this.onChangeTab},t.key)},"panel-editor-tabs")]}renderTemplateVariables(e){const{variables:t}=this.props;return t.length?(0,C.jsx)("div",{className:e.variablesWrapper,children:(0,C.jsx)(on,{variables:t})}):null}renderPanelToolbar(e){const{dashboard:t,uiState:n,variables:r,updateTimeZoneForSession:o,panel:i,tableViewEnabled:a}=this.props;return(0,C.jsx)("div",{className:e.panelToolbar,children:(0,C.jsxs)(W.Lh,{justify:r.length>0?"space-between":"flex-end",align:"flex-start",children:[this.renderTemplateVariables(e),(0,C.jsxs)(xe.Stack,{gap:1,children:[(0,C.jsx)(Pe.x,{label:"Table view",showLabel:!0,id:"table-view",value:a,onClick:this.onToggleTableView,"aria-label":l.wl.components.PanelEditor.toggleTableView}),(0,C.jsx)(ft.S,{value:n.mode,options:Rr.d7,onChange:this.onDisplayModeChange}),(0,C.jsx)(un.C,{dashboard:t,onChangeTimeZone:o,isOnCanvas:!0}),!n.isPanelOptionsVisible&&(0,C.jsx)(ar,{panel:i})]})]})})}renderEditorActions(){const e=c.v.featureToggles.topnav?"sm":"md";let t=[(0,C.jsx)(R.zx,{onClick:this.onDiscard,title:"Undo all changes",size:e,variant:"destructive",fill:"outline",children:"Discard"},"discard"),this.props.panel.libraryPanel?(0,C.jsx)(R.zx,{onClick:this.onSaveLibraryPanel,variant:"primary",size:e,title:"Apply changes and save library panel",children:"Save library panel"},"save-panel"):(0,C.jsx)(R.zx,{onClick:this.onSaveDashboard,title:"Apply changes and save dashboard",size:e,variant:"secondary",children:"Save"},"save"),(0,C.jsx)(R.zx,{onClick:this.onBack,variant:"primary",title:"Apply changes and go back to dashboard","data-testid":l.wl.components.PanelEditor.applyButton,size:e,children:"Apply"},"apply")];return this.props.panel.libraryPanel&&(t.splice(1,0,(0,C.jsx)(_.JY,{children:e=>{let{showModal:t,hideModal:n}=e;return(0,C.jsx)(mt.h,{onClick:()=>{t(sn.i,{onConfirm:()=>{this.props.panel.unlinkLibraryPanel(),this.forceUpdate()},onDismiss:n,isOpen:!0})},title:"Disconnects this panel from the library panel so that you can edit it regularly.",children:"Unlink"},"unlink")}},"unlink-controller")),t.pop()),t}renderOptionsPane(){const{plugin:e,dashboard:t,panel:n,instanceState:r}=this.props;return e?(0,C.jsx)(Er,{plugin:e,dashboard:t,panel:n,instanceState:r,onFieldConfigsChange:this.onFieldConfigChange,onPanelOptionsChanged:this.onPanelOptionsChanged,onPanelConfigChange:this.onPanelConfigChanged}):bi||(bi=(0,C.jsx)("div",{}))}renderToolbar(){return c.v.featureToggles.topnav?(0,C.jsx)(xt.A,{actions:(0,C.jsx)(bt.R,{alignment:"right",children:this.renderEditorActions()})}):(0,C.jsx)(yt.X,{title:this.props.dashboard.title,section:"Edit Panel",onGoBack:this.onGoBackToDashboard,children:this.renderEditorActions()})}render(){const{initDone:e,updatePanelEditorUIState:t,uiState:n,theme:r,sectionNav:o,pageNav:i,className:s}=this.props,d=Mi(r,this.props);return e?(0,C.jsx)(h.T,{navModel:o,pageNav:i,"aria-label":l.wl.components.PanelEditor.General.content,layout:a.Qz.Custom,toolbar:this.renderToolbar(),className:s,children:(0,C.jsxs)("div",{className:d.wrapper,children:[(0,C.jsx)("div",{className:d.verticalSplitPanesWrapper,children:(0,C.jsx)(Zt,{leftPaneComponents:this.renderPanelAndEditor(d),rightPaneComponents:this.renderOptionsPane(),uiState:n,updateUiState:t,rightPaneVisible:n.isPanelOptionsVisible})}),this.state.showSaveLibraryPanelModal&&(0,C.jsx)(Y,{panel:this.props.panel,folderId:this.props.dashboard.meta.folderId,onConfirm:this.onConfirmAndDismissLibarayPanelModel,onDiscard:this.onDiscard,onDismiss:this.onConfirmAndDismissLibarayPanelModel})]})}):null}}const wi=(0,u.HE)(xi(Si)),Mi=(0,vt.B)(((e,t)=>{const{uiState:n}=t,o=e.spacing(2);return{wrapper:(0,r.css)({width:"100%",flexGrow:1,minHeight:0,display:"flex",paddingTop:c.v.featureToggles.topnav?e.spacing(2):0}),verticalSplitPanesWrapper:r.css`
      display: flex;
      flex-direction: column;
      height: 100%;
      width: 100%;
      position: relative;
    `,mainPaneWrapper:r.css`
      display: flex;
      flex-direction: column;
      height: 100%;
      width: 100%;
      padding-right: ${n.isPanelOptionsVisible?0:o};
    `,variablesWrapper:r.css`
      label: variablesWrapper;
      display: flex;
      flex-grow: 1;
      flex-wrap: wrap;
      gap: ${e.spacing(1,2)};
    `,panelWrapper:r.css`
      flex: 1 1 0;
      min-height: 0;
      width: 100%;
      padding-left: ${o};
    `,tabsWrapper:r.css`
      height: 100%;
      width: 100%;
    `,panelToolbar:r.css`
      display: flex;
      padding: 0 0 ${o} ${o};
      justify-content: space-between;
      flex-wrap: wrap;
    `,toolbarLeft:r.css`
      padding-left: ${e.spacing(1)};
    `,centeringContainer:r.css`
      display: flex;
      justify-content: center;
      align-items: center;
      position: relative;
      flex-direction: column;
    `}}));var ki=n(8290);const Oi=function(){const e=(0,u.wW)(ji);return(0,C.jsx)("div",{className:e.footer,children:(0,C.jsx)("span",{className:e.logoText,children:(0,C.jsxs)("a",{href:"https://grafana.com/",target:"_blank",rel:"noreferrer noopener",children:["powered by Grafana ",(0,C.jsx)("img",{className:e.logoImg,src:"public/img/grafana_icon.svg"})]})})})},ji=e=>({footer:r.css`
    position: absolute;
    height: 30px;
    bottom: 0;
    width: 100%;
    background-color: ${ki.alpha(e.colors.background.canvas,.7)};
    text-align: right;
    font-size: ${e.typography.body.fontSize};
    z-index: ${e.zIndex.navbarFixed};
  `,logoText:r.css`
    margin-right: ${e.spacing(1)};
  `,logoImg:r.css`
    height: 100%;
    padding: ${e.spacing(.25,0,.5,0)};
  `});var Ci=n(23277),zi=n(50385),Pi=n(56998),Ti=n(71642);const Wi=e=>{let{annotation:t,events:n,onEnabledChanged:r}=e;const[i,a]=(0,o.useState)(!1),s=(0,u.wW)(Bi);return(0,o.useEffect)((()=>{const e=n.getStream(S.z).subscribe({next:e=>{e.payload===t&&a(!0)}}),r=n.getStream(S.RB).subscribe({next:e=>{e.payload===t&&a(!1)}});return()=>{e.unsubscribe(),r.unsubscribe()}})),(0,C.jsx)("div",{className:s.annotation,children:(0,C.jsxs)(Ci.Z,{children:[(0,C.jsx)(zi._,{label:t.name,disabled:i,children:(0,C.jsx)(Pe.x,{value:t.enable,onChange:()=>r(t),disabled:i})}),(0,C.jsx)("div",{className:s.indicator,children:(0,C.jsx)(Pi.T,{loading:i,onCancel:()=>(0,Ti.kt)().cancel(t)})})]})},t.name)};function Bi(e){return{annotation:r.css`
      display: inline-block;
      margin-right: ${e.spacing(1)};

      .fa-caret-down {
        font-size: 75%;
        padding-left: ${e.spacing(1)};
      }

      .gf-form-inline .gf-form {
        margin-bottom: 0;
      }
    `,indicator:r.css`
      align-self: center;
      padding: 0 ${e.spacing(.5)};
    `}}const Ri=e=>{let{annotations:t,onAnnotationChanged:n,events:r}=e;const[i,a]=(0,o.useState)([]);return(0,o.useEffect)((()=>{a(t.filter((e=>!0!==e.hide)))}),[t]),0===i.length?null:(0,C.jsx)(C.Fragment,{children:i.map((e=>(0,C.jsx)(Wi,{events:r,annotation:e,onEnabledChanged:n},e.name)))})};var Di=n(28465),Ii=n(93719),Ei=n(41214),Ai=n(75477);const Ni=["link","children"];const Fi=e=>{const{link:t,linkInfo:n}=e,i=(0,o.useRef)(null),[a,s]=(0,o.useState)("invisible"),[d,c]=(0,o.useState)(0),p=_i(e,d),h=(0,u.wW)($i);return(0,o.useLayoutEffect)((()=>{s(function(e){if(!e)return"invisible";const t=e.parentElement.getBoundingClientRect(),n=e.getBoundingClientRect();if(0===n.width)return"invisible";return t.left+n.width+10>window.innerWidth?"pull-left":"pull-right"}(i.current))}),[p]),t.asDropdown?(0,C.jsx)(Li,{link:t,"data-testid":l.wl.components.DashboardLinks.dropDown,children:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(mt.h,{onClick:()=>c(Date.now()),className:(0,r.cx)("gf-form-label gf-form-label--dashlink",h.button),"data-placement":"bottom","data-toggle":"dropdown","aria-expanded":!!d,"aria-controls":"dropdown-list","aria-haspopup":"menu",children:[(0,C.jsx)(J.J,{"aria-hidden":!0,name:"bars",className:h.iconMargin}),(0,C.jsx)("span",{children:n.title})]}),(0,C.jsx)("ul",{id:"dropdown-list",className:`dropdown-menu ${h.dropdown} ${a}`,role:"menu",ref:i,children:p.length>0&&p.map(((e,n)=>(0,C.jsx)("li",{role:"none",children:(0,C.jsx)("a",{role:"menuitem",href:e.url,target:t.targetBlank?"_blank":void 0,rel:"noreferrer","data-testid":l.wl.components.DashboardLinks.link,"aria-label":`${e.title} dashboard`,children:e.title})},`dashlinks-dropdown-item-${e.uid}-${n}`)))})]})},"dashlinks-dropdown"):(0,C.jsx)(C.Fragment,{children:p.length>0&&p.map(((e,n)=>(0,C.jsx)(Li,{link:t,"data-testid":l.wl.components.DashboardLinks.container,children:(0,C.jsxs)("a",{className:"gf-form-label gf-form-label--dashlink",href:e.url,target:t.targetBlank?"_blank":void 0,rel:"noreferrer","data-testid":l.wl.components.DashboardLinks.link,"aria-label":`${e.title} dashboard`,children:[(0,C.jsx)(J.J,{"aria-hidden":!0,name:"apps",style:{marginRight:"4px"}}),(0,C.jsx)("span",{children:e.title})]})},`dashlinks-list-item-${e.uid}-${n}`)))})},Li=e=>{const{link:t,children:n}=e,r=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,Ni);return(0,C.jsxs)("div",Object.assign({},r,{className:"gf-form",children:[t.tooltip&&(0,C.jsx)(Xt.u,{content:t.tooltip,children:n}),!t.tooltip&&(0,C.jsx)(C.Fragment,{children:n})]}))},_i=(e,t)=>{let{link:n,dashboardUID:r}=e;const{tags:o}=n,i=(0,G.Z)((()=>async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{getBackendSrv:Ai.i};const n=100;return await t.getBackendSrv().search({tag:e,limit:n})}(o)),[o,t]);return i.value?function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{getLinkSrv:On.Bq,sanitize:Ii.Nw,sanitizeUrl:Ii.Nm};return n.filter((t=>t.uid!==e)).map((e=>{const n=e.uid,o=r.sanitize(e.title),i=r.getLinkSrv().getLinkUrl(Object.assign({},t,{url:e.url}));return{uid:n,title:o,url:r.sanitizeUrl(i)}}))}(r,n,i.value):[]};function $i(e){return{iconMargin:(0,r.css)({marginRight:e.spacing(.5)}),dropdown:(0,r.css)({maxWidth:"max(30vw, 300px)",maxHeight:"70vh",overflowY:"auto",a:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}),button:(0,r.css)({color:e.colors.text.primary})}}const Hi=e=>{let{dashboard:t,links:n}=e;const r=(0,Ie.N)();return(0,Di.Z)((()=>{const e=t.events.subscribe(Nr.md,r);return()=>e.unsubscribe()})),n.length?(0,C.jsx)(C.Fragment,{children:n.map(((e,n)=>{const r=(0,On.Bq)().getAnchorInfo(e),o=`${e.title}-$${n}`;if("dashboards"===e.type)return(0,C.jsx)(Fi,{link:e,linkInfo:r,dashboardUID:t.uid},o);const i=Ei.xy[e.icon],a=(0,C.jsxs)("a",{className:"gf-form-label gf-form-label--dashlink",href:(0,Ii.Nm)(r.href),target:e.targetBlank?"_blank":void 0,rel:"noreferrer","data-testid":l.wl.components.DashboardLinks.link,children:[i&&(0,C.jsx)(J.J,{"aria-hidden":!0,name:i,style:{marginRight:"4px"}}),(0,C.jsx)("span",{children:r.title})]});return(0,C.jsx)("div",{className:"gf-form","data-testid":l.wl.components.DashboardLinks.container,children:e.tooltip?(0,C.jsx)(Xt.u,{content:r.tooltip,children:a}):a},o)}))}):null};var Gi;class Vi extends o.PureComponent{constructor(){var e,t,n;super(...arguments),n=e=>{for(let t=0;t<this.props.dashboard.annotations.list.length;t++){const n=this.props.dashboard.annotations.list[t];if(n.name===e.name){n.enable=!n.enable;break}}this.props.dashboard.startRefresh(),this.forceUpdate()},(t="onAnnotationStateChanged")in(e=this)?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}render(){var e;const{dashboard:t,variables:n,links:r,annotations:o}=this.props;if(!t.isSubMenuVisible())return null;const i=null!==(e=t.meta.isSnapshot)&&void 0!==e&&e;return(0,C.jsxs)("div",{className:"submenu-controls",children:[(0,C.jsx)("form",{"aria-label":"Template variables",className:Ui,children:(0,C.jsx)(on,{variables:n,readOnly:i})}),(0,C.jsx)(Ri,{annotations:o,onAnnotationChanged:this.onAnnotationStateChanged,events:t.events}),Gi||(Gi=(0,C.jsx)("div",{className:"gf-form gf-form--grow"})),t&&(0,C.jsx)(Hi,{dashboard:t,links:r})]})}}const Ui=r.css`
  display: flex;
  flex-wrap: wrap;
  display: contents;
`,qi=(0,i.connect)(((e,t)=>{const{uid:n}=t.dashboard,r=(0,dn.AE)(n,e);return{variables:(0,dn.IV)(n,r.variables)}}))(Vi);qi.displayName="SubMenu";var Ji,Zi,Qi=n(95696),Ki=n.n(Qi),Yi=n(84051),Xi=n.n(Yi),ea=n(32172),ta=n.n(ea),na=n(11263),ra=n(74118),oa=n(83448),ia=n(90793),aa=n(62411);const sa={addPanel:oa.tq},la=(0,i.connect)(void 0,sa)((e=>{let{panel:t,dashboard:n}=e;const[i,a]=(0,o.useState)(!1),s=(0,u.wW)(ca),c=(0,o.useMemo)((()=>(()=>{const e=(0,F.chain)(qt.ZP.panels).filter({hideFromList:!1}).map((e=>e)).value(),t=[],n=ee.Z.get(dr.zF);if(n){const r=JSON.parse(n),o=(0,F.find)(e,{id:r.type});if(o){const e=(0,F.cloneDeep)(o);e.name=r.title,e.sort=-1,e.defaults=r,t.push(e)}}return(0,F.sortBy)(t,"sort")})()),[]);return(0,C.jsx)("div",{className:s.wrapper,children:(0,C.jsxs)("div",{className:(0,r.cx)("panel-container",s.callToAction),children:[(0,C.jsx)(da,{onCancel:e=>{e.preventDefault(),n.removePanel(t)},onBack:i?()=>{a(!1)}:void 0,styles:s,children:i?"Add panel from panel library":"Add panel"}),i?(0,C.jsx)(ia.N,{onClick:e=>{const{gridPos:r}=t,o=Object.assign({},e.model,{gridPos:r,libraryPanel:(0,aa.Pi)(e)});n.addPanel(o),n.removePanel(t)},variant:ia.e.Tight,showPanelFilter:!0}):(0,C.jsxs)("div",{className:s.actionsWrapper,children:[(0,C.jsx)(ra.x,{icon:"file-blank","aria-label":l.wl.pages.AddDashboard.addNewPanel,onClick:()=>{(0,na.ff)("Create new panel"),(()=>{const{gridPos:e}=t,r={type:"timeseries",title:"Panel Title",gridPos:{x:e.x,y:e.y,w:e.w,h:e.h}};n.addPanel(r),n.removePanel(t),d.E1.partial({editPanel:r.id})})()},children:"Add a new panel"}),(0,C.jsx)(ra.x,{icon:"wrap-text","aria-label":l.wl.pages.AddDashboard.addNewRow,onClick:()=>{(0,na.ff)("Create new row"),n.addPanel({type:"row",title:"Row title",gridPos:{x:0,y:0}}),n.removePanel(t)},children:"Add a new row"}),(0,C.jsx)(ra.x,{icon:"book-open","aria-label":l.wl.pages.AddDashboard.addNewPanelLibrary,onClick:()=>{(0,na.ff)("Add a panel from the panel library"),a(!0)},children:"Add a panel from the panel library"}),1===c.length&&(0,C.jsx)(ra.x,{icon:"clipboard-alt","aria-label":l.wl.pages.AddDashboard.addNewPanelLibrary,onClick:()=>{(0,na.ff)("Paste panel from clipboard"),(e=>{const{gridPos:r}=t,o={type:e.id,title:"Panel Title",gridPos:{x:r.x,y:r.y,w:e.defaults.gridPos.w,h:e.defaults.gridPos.h}};e.defaults&&((0,F.defaults)(o,e.defaults),o.title=e.defaults.title,ee.Z.delete(dr.zF)),n.addPanel(o),n.removePanel(t)})(c[0])},children:"Paste panel from clipboard"})]})]})})})),da=e=>{let{children:t,onBack:n,onCancel:o,styles:i}=e;return(0,C.jsxs)("div",{className:(0,r.cx)(i.headerRow,"grid-drag-handle"),children:[n&&(0,C.jsx)("div",{className:i.backButton,children:(0,C.jsx)(Tn.h,{"aria-label":"Go back",name:"arrow-left",onClick:n,size:"xl"})}),!n&&(0,C.jsx)("div",{className:i.backButton,children:Ji||(Ji=(0,C.jsx)(J.J,{name:"panel-add",size:"md"}))}),t&&(0,C.jsx)("span",{children:t}),Zi||(Zi=(0,C.jsx)("div",{className:"flex-grow-1"})),(0,C.jsx)(Tn.h,{"aria-label":"Close 'Add Panel' widget",name:"times",onClick:o})]})},ca=e=>{const t=r.keyframes`
    0% {box-shadow: 0 0 0 2px ${e.colors.background.canvas}, 0 0 0px 4px ${e.colors.primary.main};}
    50% {box-shadow: 0 0 0 2px ${e.components.dashboard.background}, 0 0 0px 4px ${ta()(e.colors.primary.main).darken(20).toHexString()};}
    100% {box-shadow: 0 0 0 2px ${e.components.dashboard.background}, 0 0 0px 4px  ${e.colors.primary.main};}
  `;return{wrapper:r.css`
      height: 100%;
      padding-top: ${e.spacing(.5)};
    `,callToAction:r.css`
      overflow: hidden;
      outline: 2px dotted transparent;
      outline-offset: 2px;
      box-shadow: 0 0 0 2px black, 0 0 0px 4px #1f60c4;
      animation: ${t} 2s ease infinite;
    `,actionsWrapper:r.css`
      height: 100%;
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      column-gap: ${e.spacing(1)};
      row-gap: ${e.spacing(1)};
      padding: ${e.spacing(0,1,1,1)};

      // This is to make the last action full width (if by itself)
      & > div:nth-child(2n-1):nth-last-of-type(1) {
        grid-column: span 2;
      }
    `,headerRow:r.css`
      display: flex;
      align-items: center;
      height: 38px;
      flex-shrink: 0;
      width: 100%;
      font-size: ${e.typography.fontSize};
      font-weight: ${e.typography.fontWeightMedium};
      padding-left: ${e.spacing(1)};
      transition: background-color 0.1s ease-in-out;
      cursor: move;

      &:hover {
        background: ${e.colors.background.secondary};
      }
    `,backButton:r.css`
      display: flex;
      align-items: center;
      cursor: pointer;
      padding-left: ${e.spacing(.5)};
      width: ${e.spacing(4)};
    `,noMargin:r.css`
      margin: 0;
    `}};var ua,pa=n(56481);const ha=e=>{var t,n;let{repeat:r,title:i,onUpdate:a,onCancel:s}=e;const[l,d]=(0,o.useState)(r),c=(0,o.useCallback)((e=>d(e)),[d]);return(0,C.jsx)(pa.l,{defaultValues:{title:i},onSubmit:e=>{a(e.title,l)},children:e=>{let{register:r}=e;return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(Oe.g,{label:"Title",children:(0,C.jsx)(q.I,Object.assign({},r("title"),{type:"text"}))}),t||(t=(0,C.jsx)(Oe.g,{label:"Repeat for",children:(0,C.jsx)(qn,{repeat:l,onChange:c})})),n||(n=(0,C.jsxs)(U.u.ButtonRow,{children:[(0,C.jsx)(R.zx,{type:"button",variant:"secondary",onClick:s,fill:"outline",children:"Cancel"}),ua||(ua=(0,C.jsx)(R.zx,{type:"submit",children:"Update"}))]}))]})}})},ga=e=>{let{repeat:t,title:n,onDismiss:r,onUpdate:o}=e;const i=fa();return(0,C.jsx)(U.u,{isOpen:!0,title:"Row options",icon:"copy",onDismiss:r,className:i.modal,children:(0,C.jsx)(ha,{repeat:t,title:n,onCancel:r,onUpdate:o})})},fa=(0,vt.B)((()=>({modal:r.css`
      label: RowOptionsModal;
      width: 500px;
    `})));var ma;const ba=e=>{let{repeat:t,title:n,onUpdate:r}=e;const o=e=>(t,n)=>{r(t,n),e()};return(0,C.jsx)(_.JY,{children:e=>{let{showModal:r,hideModal:i}=e;return(0,C.jsx)("a",{className:"pointer",role:"button","aria-label":"Row options",onClick:()=>{r(ga,{title:n,repeat:t,onDismiss:i,onUpdate:o(i)})},children:ma||(ma=(0,C.jsx)(J.J,{name:"cog"}))})}})};var ya,va;function xa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}ba.displayName="RowOptionsButton";class Sa extends o.Component{constructor(){super(...arguments),xa(this,"sub",void 0),xa(this,"onVariableUpdated",(()=>{this.forceUpdate()})),xa(this,"onToggle",(()=>{this.props.dashboard.toggleRow(this.props.panel)})),xa(this,"onUpdate",((e,t)=>{this.props.panel.setProperty("title",e),this.props.panel.setProperty("repeat",null!=t?t:void 0),this.props.panel.render(),this.props.dashboard.processRepeats(),this.forceUpdate()})),xa(this,"onDelete",(()=>{$.Z.publish(new S.VJ({title:"Delete row",text:"Are you sure you want to remove this row and all its panels?",altActionText:"Delete row only",icon:"trash-alt",onConfirm:()=>{this.props.dashboard.removeRow(this.props.panel,!0)},onAltAction:()=>{this.props.dashboard.removeRow(this.props.panel,!1)}}))}))}componentDidMount(){this.sub=this.props.dashboard.events.subscribe(Nr.U5,this.onVariableUpdated)}componentWillUnmount(){this.sub&&this.sub.unsubscribe()}render(){const e=Ki()({"dashboard-row":!0,"dashboard-row--collapsed":this.props.panel.collapsed}),t=(0,et.J)().replace(this.props.panel.title,this.props.panel.scopedVars,"text"),n=this.props.panel.panels?this.props.panel.panels.length:0,r=1===n?"panel":"panels",o=!0===this.props.dashboard.meta.canEdit;return(0,C.jsxs)("div",{className:e,"data-testid":"dashboard-row-container",children:[(0,C.jsxs)("a",{className:"dashboard-row__title pointer","data-testid":l.wl.components.DashboardRow.title(t),onClick:this.onToggle,children:[(0,C.jsx)(J.J,{name:this.props.panel.collapsed?"angle-right":"angle-down"}),t,(0,C.jsxs)("span",{className:"dashboard-row__panel_count",children:["(",n," ",r,")"]})]}),o&&(0,C.jsxs)("div",{className:"dashboard-row__actions",children:[(0,C.jsx)(ba,{title:this.props.panel.title,repeat:this.props.panel.repeat,onUpdate:this.onUpdate}),(0,C.jsx)("a",{className:"pointer",onClick:this.onDelete,role:"button","aria-label":"Delete row",children:ya||(ya=(0,C.jsx)(J.J,{name:"trash-alt"}))})]}),!0===this.props.panel.collapsed&&(0,C.jsx)("div",{className:"dashboard-row__toggle-target",onClick:this.onToggle,children:" "}),o&&(va||(va=(0,C.jsx)("div",{"data-testid":"dashboard-row-drag",className:"dashboard-row__drag grid-drag-handle"})))]})}}const wa=["gridWidth","gridPos","isViewing","windowHeight","windowWidth"];function Ma(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ka={cleanAndRemoveMany:te.x},Oa=(0,i.connect)(null,ka);class ja extends o.PureComponent{constructor(e){super(e),Ma(this,"panelMap",{}),Ma(this,"eventSubs",new gt.w0),Ma(this,"windowHeight",1200),Ma(this,"windowWidth",1920),Ma(this,"gridWidth",0),Ma(this,"lastPanelBottom",0),Ma(this,"onLayoutChange",(e=>{for(const t of e)this.panelMap[t.i].updateGridPos(t,this.state.isLayoutInitialized);this.props.dashboard.sortPanelsByGridPos(),this.state.isLayoutInitialized||this.setState({isLayoutInitialized:!0})})),Ma(this,"triggerForceUpdate",(()=>{this.forceUpdate()})),Ma(this,"updateGridPos",((e,t)=>{this.panelMap[e.i].updateGridPos(e)})),Ma(this,"onResize",((e,t,n)=>{this.panelMap[n.i].updateGridPos(n)})),Ma(this,"onResizeStop",((e,t,n)=>{this.updateGridPos(n,e)})),Ma(this,"onDragStop",((e,t,n)=>{this.updateGridPos(n,e)})),this.state={isLayoutInitialized:!1}}componentDidMount(){const{dashboard:e}=this.props;this.eventSubs.add(e.events.subscribe(S._B,this.triggerForceUpdate))}componentWillUnmount(){this.eventSubs.unsubscribe(),this.props.cleanAndRemoveMany(Object.keys(this.panelMap))}buildLayout(){const e=[];this.panelMap={};for(const t of this.props.dashboard.panels){if(t.key||(t.key=`panel-${t.id}-${Date.now()}`),this.panelMap[t.key]=t,!t.gridPos){console.log("panel without gridpos");continue}const n={i:t.key,x:t.gridPos.x,y:t.gridPos.y,w:t.gridPos.w,h:t.gridPos.h};"row"===t.type&&(n.w=dr.cz,n.h=1,n.isResizable=!1,n.isDraggable=t.collapsed),e.push(n)}return e}getPanelScreenPos(e,t){let n=0;return n=t<c.v.theme2.breakpoints.values.md?this.lastPanelBottom+dr.hD:za(e.gridPos.y)+dr.hD,this.lastPanelBottom=n+za(e.gridPos.h),{top:n,bottom:this.lastPanelBottom}}renderPanels(e){const t=[];var n;(this.lastPanelBottom=0,this.gridWidth!==e)&&(this.windowHeight=null!==(n=window.innerHeight)&&void 0!==n?n:1e3,this.windowWidth=window.innerWidth,this.gridWidth=e);for(const n of this.props.dashboard.panels){const r=Ki()({"react-grid-item--fullscreen":n.isViewing});t.push((0,C.jsx)(Ca,{className:r,"data-panelid":n.id,gridPos:n.gridPos,gridWidth:e,windowHeight:this.windowHeight,windowWidth:this.windowWidth,isViewing:n.isViewing,children:(e,t)=>this.renderPanel(n,e,t)},n.key))}return t}renderPanel(e,t,n){return"row"===e.type?(0,C.jsx)(Sa,{panel:e,dashboard:this.props.dashboard},e.key):"add-panel"===e.type?(0,C.jsx)(la,{panel:e,dashboard:this.props.dashboard},e.key):(0,C.jsx)(cn.l,{stateKey:e.key,panel:e,dashboard:this.props.dashboard,isEditing:e.isEditing,isViewing:e.isViewing,width:t,height:n},e.key)}render(){const{dashboard:e}=this.props;return(0,C.jsx)("div",{style:{flex:"1 1 auto",display:this.props.editPanel?"none":void 0},children:(0,C.jsx)(ye.Z,{disableHeight:!0,children:t=>{let{width:n}=t;if(0===n)return null;const r=!(n<=769)&&e.meta.canEdit;return(0,C.jsx)("div",{style:{width:`${n}px`,height:"100%"},children:(0,C.jsx)(Xi(),{width:n,isDraggable:r,isResizable:e.meta.canEdit,containerPadding:[0,0],useCSSTransforms:!1,margin:[dr.hD,dr.hD],cols:dr.cz,rowHeight:dr.K3,draggableHandle:".grid-drag-handle",layout:this.buildLayout(),onDragStop:this.onDragStop,onResize:this.onResize,onResizeStop:this.onResizeStop,onLayoutChange:this.onLayoutChange,children:this.renderPanels(n)})})}})})}}const Ca=o.forwardRef(((e,t)=>{var n;const r=c.v.theme2;let o=100,i=100;const{gridWidth:a,gridPos:s,isViewing:l,windowHeight:d,windowWidth:u}=e,p=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,wa),h=null!==(n=e.style)&&void 0!==n?n:{};return l?(o=a,i=.85*d,h.height=i,h.width="100%"):u<r.breakpoints.values.md?(o=e.gridWidth,i=za(s.h),h.height=i,h.width="100%"):(o=parseFloat(e.style.width),i=parseFloat(e.style.height)),(0,C.jsx)("div",Object.assign({},p,{ref:t,children:[e.children[0](o,i),e.children.slice(1)]}))}));function za(e){return e*(dr.K3+dr.hD)-dr.hD}Ca.displayName="GridItemWithDimensions";const Pa=Oa(ja);var Ta,Wa,Ba=n(38069),Ra=n(32732);function Da(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ia=e=>({initPhase:e.dashboard.initPhase,initError:e.dashboard.initError,dashboard:e.dashboard.getModel(),navIndex:e.navIndex}),Ea={initDashboard:Ne.mV,cleanUpDashboardAndVariables:Ra.lw,notifyApp:p.$l,cancelVariables:w.wX,templateVarsChangedInUrl:w.xs},Aa=(0,i.connect)(Ia,Ea);class Na extends o.PureComponent{constructor(){super(...arguments),Da(this,"forceRouteReloadCounter",0),Da(this,"state",this.getCleanState()),Da(this,"updateLiveTimer",(()=>{var e;let t;null!==(e=this.props.dashboard)&&void 0!==e&&e.liveNow&&(t=(0,Ae.$t)().timeRange()),Ba.A.setLiveTimeRange(t)})),Da(this,"onAddPanel",(()=>{const{dashboard:e}=this.props;if(!e)return;if(e.panels.length>0&&"add-panel"===e.panels[0].type)return;for(const t of e.panelIterator())t.gridPos.y+=8;e.addPanel({type:"add-panel",gridPos:{x:0,y:0,w:12,h:8},title:"Panel Title"}),this.setState({updateScrollTop:0})})),Da(this,"setScrollRef",(e=>{this.setState({scrollElement:e})}))}getCleanState(){return{editPanel:null,viewPanel:null,showLoadingState:!1,panelNotFound:!1,editPanelAccessDenied:!1}}componentDidMount(){var e;this.initDashboard(),this.forceRouteReloadCounter=(null===(e=this.props.history.location.state)||void 0===e?void 0:e.routeReloadCounter)||0}componentWillUnmount(){this.closeDashboard()}closeDashboard(){this.props.cleanUpDashboardAndVariables(),this.setState(this.getCleanState())}initDashboard(){const{dashboard:e,isPublic:t,match:n,queryParams:r}=this.props;e&&this.closeDashboard(),this.props.initDashboard({urlSlug:n.params.slug,urlUid:n.params.uid,urlType:n.params.type,urlFolderId:r.folderId,panelType:r.panelType,routeName:this.props.route.routeName,fixUrl:!t,accessToken:n.params.accessToken,keybindingSrv:this.context.keybindings}),setTimeout(this.updateLiveTimer,250)}componentDidUpdate(e,t){var n;const{dashboard:r,match:o,templateVarsChangedInUrl:i}=this.props,a=null===(n=this.props.history.location.state)||void 0===n?void 0:n.routeReloadCounter;if(r){if(e.match.params.uid!==o.params.uid||void 0!==a&&this.forceRouteReloadCounter!==a)return this.initDashboard(),void(this.forceRouteReloadCounter=a);if(e.location.search!==this.props.location.search){const t=e.queryParams,n=this.props.queryParams;(null==n?void 0:n.from)===(null==t?void 0:t.from)&&(null==n?void 0:n.to)===(null==t?void 0:t.to)||((0,Ae.$t)().updateTimeRangeFromUrl(),this.updateLiveTimer()),null!=t&&t.refresh||null==n||!n.refresh||(0,Ae.$t)().setAutoRefresh(n.refresh);const o=(0,M.xT)(this.props.queryParams,e.queryParams);o&&i(r.uid,o)}var s,l;if(this.state.editPanel&&!t.editPanel)y.H.setEditingState(!0),null===(s=this.props.dashboard)||void 0===s||s.events.publish(new S.xF(this.state.editPanel.id));if(!this.state.editPanel&&t.editPanel)y.H.setEditingState(!1),null===(l=this.props.dashboard)||void 0===l||l.events.publish(new S.Yr(t.editPanel.id));this.state.editPanelAccessDenied&&(this.props.notifyApp((0,f.t_)("Permission to edit panel denied")),d.E1.partial({editPanel:null})),this.state.panelNotFound&&(this.props.notifyApp((0,f.t_)("Panel not found")),d.E1.partial({editPanel:null,viewPanel:null}))}}static getDerivedStateFromProps(e,t){const{dashboard:n,queryParams:r}=e,o=r.editPanel,i=r.viewPanel;if(!n)return t;const a=Object.assign({},t);if(!t.editPanel&&o){const e=n.getPanelByUrlId(o);var l;if(e)if(n.canEditPanel(e))a.editPanel=e,a.rememberScrollTop=null===(l=t.scrollElement)||void 0===l?void 0:l.scrollTop;else a.editPanelAccessDenied=!0;else a.panelNotFound=!0}else t.editPanel&&!o&&(a.editPanel=null,a.updateScrollTop=t.rememberScrollTop);if(!t.viewPanel&&i){const e=n.getPanelByUrlId(i);var d;if(e)n.initViewPanel(e),a.viewPanel=e,a.rememberScrollTop=null===(d=t.scrollElement)||void 0===d?void 0:d.scrollTop,a.updateScrollTop=0;else a.panelNotFound=!0}else t.viewPanel&&!i&&(n.exitViewPanel(t.viewPanel),a.viewPanel=null,a.updateScrollTop=t.rememberScrollTop);return(t.panelNotFound||t.editPanelAccessDenied&&!o)&&(a.panelNotFound=!1,a.editPanelAccessDenied=!1),function(e,t){var n;const{dashboard:r}=e;if(!r)return t;let o=t.pageNav,i=t.sectionNav;o&&r.title===o.text||(o={text:r.title,url:s.u.getUrlForPartial(e.history.location,{editview:null,editPanel:null,viewPanel:null})});const{folderTitle:a}=r.meta;a&&o&&(null===(n=o.parentItem)||void 0===n?void 0:n.text)!==a&&(o=Object.assign({},o,{parentItem:{text:a,url:`/dashboards/f/${r.meta.folderUid}`}}));if(e.route.routeName===x.vq.Path){i=(0,v.getRootContentNavModel)();const t=(0,v.getPageNavFromSlug)(e.match.params.slug);null!=t&&t.parentItem&&(t.parentItem=t.parentItem)}else i=(0,b.h)(e.navIndex,c.v.featureToggles.topnav?"dashboards/browse":"dashboards");(t.editPanel||t.viewPanel)&&(o=Object.assign({},o,{text:(t.editPanel?"Edit":"View")+" panel",parentItem:o}));if(t.pageNav===o&&t.sectionNav===i)return t;return Object.assign({},t,{pageNav:o,sectionNav:i})}(e,a)}getInspectPanel(){const{dashboard:e,queryParams:t}=this.props,n=t.inspect;if(!e||!n)return null;const r=e.getPanelById(parseInt(n,10));return r||null}render(){const{dashboard:e,initError:t,queryParams:n,isPublic:o}=this.props,{editPanel:i,viewPanel:s,updateScrollTop:d,pageNav:c,sectionNav:u}=this.state,p=o?x.UX.Full:(0,m.U)(this.props.queryParams);if(!e||!c||!u)return(0,C.jsx)(D,{initPhase:this.props.initPhase});const g=this.getInspectPanel(),f=!i&&!p&&!this.props.queryParams.editview,b=p!==x.UX.Full&&!n.editview&&(0,C.jsx)("header",{"data-testid":l.wl.pages.Dashboard.DashNav.navV2,children:(0,C.jsx)(k.t,{dashboard:e,title:e.title,folderTitle:e.meta.folderTitle,isFullscreen:!!s,onAddPanel:this.onAddPanel,kioskMode:p,hideTimePicker:e.timepicker.hidden})}),y=(0,r.cx)({"panel-in-fullscreen":Boolean(s),"page-hidden":Boolean(n.editview||i)});return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(h.T,{navModel:u,pageNav:c,layout:a.Qz.Canvas,toolbar:b,className:y,scrollRef:this.setScrollRef,scrollTop:d,children:[(0,C.jsx)(ce,{dashboard:e}),t&&(Ta||(Ta=(0,C.jsx)(z,{}))),f&&(0,C.jsx)("section",{"aria-label":l.wl.pages.Dashboard.SubMenu.submenu,children:(0,C.jsx)(qi,{dashboard:e,annotations:e.annotations.list,links:e.links})}),(0,C.jsx)(Pa,{dashboard:e,viewPanel:s,editPanel:i}),g&&(0,C.jsx)(ht,{dashboard:e,panel:g})]}),i&&(0,C.jsx)(wi,{dashboard:e,sourcePanel:i,tab:this.props.queryParams.tab,sectionNav:u,pageNav:c}),n.editview&&(0,C.jsx)(fe.D,{dashboard:e,editview:n.editview,pageNav:c,sectionNav:u}),o&&(Wa||(Wa=(0,C.jsx)(Oi,{})))]})}}Da(Na,"contextType",g.h);const Fa=(0,u.HE)(Na);Fa.displayName="DashboardPage";const La=Aa(Fa)},1166:(e,t,n)=>{"use strict";n.r(t),n.d(t,{StorageFolderPage:()=>f,default:()=>y,getPageNavFromSlug:()=>m,getRootContentNavModel:()=>b});n(76687);var r,o,i,a=n(68021),s=n(67273),l=n(3351),d=n(39756),c=n(55816),u=n(35562),p=n(28781),h=n(95670),g=n(52010);function f(e){var t;const n=null!==(t=e.match.params.slug)&&void 0!==t?t:"",f=(0,a.Z)((()=>(0,h.$)().list("content/"+n)),[n]),b=n.length>0?`g/${n}/`:"g/",y=m(n),v={main:{text:"C:"},node:{text:"Content",url:"/g"}};return(0,g.jsxs)(p.T,{navModel:v,pageNav:y,children:[!s.v.featureToggles.topnav&&(i||(i=(0,g.jsx)("div",{children:(0,g.jsx)(u.b,{title:"Enable the topnav feature toggle",children:"This page is designed assuming topnav is enabled"})}))),(()=>{if(f.value){return f.value.fields[0].values.toArray().map((e=>{let t=e;const n=t.indexOf(".")<0,r=!n&&t.endsWith(".json"),o=`${b}${t}`;return(0,g.jsxs)(l.Z,{href:n||r?o:void 0,children:[(0,g.jsx)(l.Z.Heading,{children:t}),(0,g.jsx)(l.Z.Figure,{children:(0,g.jsx)(d.J,{name:n?"folder":r?"gf-grid":"file-alt",size:"sm"})})]},t)}))}return f.loading?r||(r=(0,g.jsx)(c.$,{})):o||(o=(0,g.jsx)("div",{children:"?"}))})()]})}function m(e){const t=e.split("/");let n,r=[],o="g";for(let e=0;e<t.length;e++)o+=`/${t[e]}`,r.push({text:t[e],url:o,parentItem:n}),n=r[r.length-1];return n}function b(){return{main:{text:"C:"},node:{text:"Content",url:"/g"}}}const y=f},6554:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=p(n(76687)),i=p(n(17225)),a=n(61002),s=n(44628),l=n(61019),d=n(22343),c=n(8770),u=p(n(86355));function p(e){return e&&e.__esModule?e:{default:e}}function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function b(e,t){return b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},b(e,t)}function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=S(e);if(t){var o=S(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}function v(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return x(e)}function x(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function S(e){return S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},S(e)}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var M=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&b(e,t)}(c,e);var t,n,r,i=y(c);function c(){var e;f(this,c);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return w(x(e=i.call.apply(i,[this].concat(n))),"state",{resizing:null,dragging:null,className:""}),w(x(e),"elementRef",o.default.createRef()),w(x(e),"onDragStart",(function(t,n){var r=n.node,o=e.props,i=o.onDragStart,a=o.transformScale;if(i){var s={top:0,left:0},l=r.offsetParent;if(l){var c=l.getBoundingClientRect(),u=r.getBoundingClientRect(),p=u.left/a,h=c.left/a,g=u.top/a,f=c.top/a;s.left=p-h+l.scrollLeft,s.top=g-f+l.scrollTop,e.setState({dragging:s});var m=(0,d.calcXY)(e.getPositionParams(),s.top,s.left,e.props.w,e.props.h),b=m.x,y=m.y;return i.call(x(e),e.props.i,b,y,{e:t,node:r,newPosition:s})}}})),w(x(e),"onDrag",(function(t,n){var r=n.node,o=n.deltaX,i=n.deltaY,a=e.props.onDrag;if(a){if(!e.state.dragging)throw new Error("onDrag called before onDragStart.");var s=e.state.dragging.top+i,l=e.state.dragging.left+o,c=e.props,u=c.isBounded,p=c.i,h=c.w,g=c.h,f=c.containerWidth,m=e.getPositionParams();if(u){var b=r.offsetParent;if(b){var y=e.props,v=y.margin,S=y.rowHeight,w=b.clientHeight-(0,d.calcGridItemWHPx)(g,S,v[1]);s=(0,d.clamp)(s,0,w);var M=(0,d.calcGridColWidth)(m),k=f-(0,d.calcGridItemWHPx)(h,M,v[0]);l=(0,d.clamp)(l,0,k)}}var O={top:s,left:l};e.setState({dragging:O});var j=(0,d.calcXY)(m,s,l,h,g),C=j.x,z=j.y;return a.call(x(e),p,C,z,{e:t,node:r,newPosition:O})}})),w(x(e),"onDragStop",(function(t,n){var r=n.node,o=e.props.onDragStop;if(o){if(!e.state.dragging)throw new Error("onDragEnd called before onDragStart.");var i=e.props,a=i.w,s=i.h,l=i.i,c=e.state.dragging,u=c.left,p=c.top,h={top:p,left:u};e.setState({dragging:null});var g=(0,d.calcXY)(e.getPositionParams(),p,u,a,s),f=g.x,m=g.y;return o.call(x(e),l,f,m,{e:t,node:r,newPosition:h})}})),w(x(e),"onResizeStop",(function(t,n){e.onResizeHandler(t,n,"onResizeStop")})),w(x(e),"onResizeStart",(function(t,n){e.onResizeHandler(t,n,"onResizeStart")})),w(x(e),"onResize",(function(t,n){e.onResizeHandler(t,n,"onResize")})),e}return t=c,n=[{key:"shouldComponentUpdate",value:function(e,t){if(this.props.children!==e.children)return!0;if(this.props.droppingPosition!==e.droppingPosition)return!0;var n=(0,d.calcGridItemPosition)(this.getPositionParams(this.props),this.props.x,this.props.y,this.props.w,this.props.h,this.state),r=(0,d.calcGridItemPosition)(this.getPositionParams(e),e.x,e.y,e.w,e.h,t);return!(0,l.fastPositionEqual)(n,r)||this.props.useCSSTransforms!==e.useCSSTransforms}},{key:"componentDidMount",value:function(){this.moveDroppingItem({})}},{key:"componentDidUpdate",value:function(e){this.moveDroppingItem(e)}},{key:"moveDroppingItem",value:function(e){var t=this.props.droppingPosition;if(t){var n=this.elementRef.current;if(n){var r=e.droppingPosition||{left:0,top:0},o=this.state.dragging,i=o&&t.left!==r.left||t.top!==r.top;if(o){if(i){var a=t.left-o.left,s=t.top-o.top;this.onDrag(t.e,{node:n,deltaX:a,deltaY:s})}}else this.onDragStart(t.e,{node:n,deltaX:t.left,deltaY:t.top})}}}},{key:"getPositionParams",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;return{cols:e.cols,containerPadding:e.containerPadding,containerWidth:e.containerWidth,margin:e.margin,maxRows:e.maxRows,rowHeight:e.rowHeight}}},{key:"createStyle",value:function(e){var t,n=this.props,r=n.usePercentages,o=n.containerWidth;return n.useCSSTransforms?t=(0,l.setTransform)(e):(t=(0,l.setTopLeft)(e),r&&(t.left=(0,l.perc)(e.left/o),t.width=(0,l.perc)(e.width/o))),t}},{key:"mixinDraggable",value:function(e,t){return o.default.createElement(a.DraggableCore,{disabled:!t,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,handle:this.props.handle,cancel:".react-resizable-handle"+(this.props.cancel?","+this.props.cancel:""),scale:this.props.transformScale,nodeRef:this.elementRef},e)}},{key:"mixinResizable",value:function(e,t,n){var r=this.props,i=r.cols,a=r.x,l=r.minW,c=r.minH,u=r.maxW,p=r.maxH,h=r.transformScale,g=r.resizeHandles,f=r.resizeHandle,m=this.getPositionParams(),b=(0,d.calcGridItemPosition)(m,0,0,i-a,0).width,y=(0,d.calcGridItemPosition)(m,0,0,l,c),v=(0,d.calcGridItemPosition)(m,0,0,u,p),x=[y.width,y.height],S=[Math.min(v.width,b),Math.min(v.height,1/0)];return o.default.createElement(s.Resizable,{draggableOpts:{disabled:!n},className:n?void 0:"react-resizable-hide",width:t.width,height:t.height,minConstraints:x,maxConstraints:S,onResizeStop:this.onResizeStop,onResizeStart:this.onResizeStart,onResize:this.onResize,transformScale:h,resizeHandles:g,handle:f},e)}},{key:"onResizeHandler",value:function(e,t,n){var r=t.node,o=t.size,i=this.props[n];if(i){var a=this.props,s=a.cols,l=a.x,c=a.y,u=a.i,p=a.maxH,h=a.minH,g=this.props,f=g.minW,m=g.maxW,b=(0,d.calcWH)(this.getPositionParams(),o.width,o.height,l,c),y=b.w,v=b.h;f=Math.max(f,1),m=Math.min(m,s-l),y=(0,d.clamp)(y,f,m),v=(0,d.clamp)(v,h,p),this.setState({resizing:"onResizeStop"===n?null:o}),i.call(this,u,y,v,{e,node:r,size:o})}}},{key:"render",value:function(){var e=this.props,t=e.x,n=e.y,r=e.w,i=e.h,a=e.isDraggable,s=e.isResizable,l=e.droppingPosition,c=e.useCSSTransforms,p=(0,d.calcGridItemPosition)(this.getPositionParams(),t,n,r,i,this.state),h=o.default.Children.only(this.props.children),f=o.default.cloneElement(h,{ref:this.elementRef,className:(0,u.default)("react-grid-item",h.props.className,this.props.className,{static:this.props.static,resizing:Boolean(this.state.resizing),"react-draggable":a,"react-draggable-dragging":Boolean(this.state.dragging),dropping:Boolean(l),cssTransforms:c}),style:g(g(g({},this.props.style),h.props.style),this.createStyle(p))});return f=this.mixinResizable(f,p,s),f=this.mixinDraggable(f,a)}}],n&&m(t.prototype,n),r&&m(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(o.default.Component);t.default=M,w(M,"propTypes",{children:i.default.element,cols:i.default.number.isRequired,containerWidth:i.default.number.isRequired,rowHeight:i.default.number.isRequired,margin:i.default.array.isRequired,maxRows:i.default.number.isRequired,containerPadding:i.default.array.isRequired,x:i.default.number.isRequired,y:i.default.number.isRequired,w:i.default.number.isRequired,h:i.default.number.isRequired,minW:function(e,t){var n=e[t];return"number"!=typeof n?new Error("minWidth not Number"):n>e.w||n>e.maxW?new Error("minWidth larger than item width/maxWidth"):void 0},maxW:function(e,t){var n=e[t];return"number"!=typeof n?new Error("maxWidth not Number"):n<e.w||n<e.minW?new Error("maxWidth smaller than item width/minWidth"):void 0},minH:function(e,t){var n=e[t];return"number"!=typeof n?new Error("minHeight not Number"):n>e.h||n>e.maxH?new Error("minHeight larger than item height/maxHeight"):void 0},maxH:function(e,t){var n=e[t];return"number"!=typeof n?new Error("maxHeight not Number"):n<e.h||n<e.minH?new Error("maxHeight smaller than item height/minHeight"):void 0},i:i.default.string.isRequired,resizeHandles:c.resizeHandleAxesType,resizeHandle:c.resizeHandleType,onDragStop:i.default.func,onDragStart:i.default.func,onDrag:i.default.func,onResizeStop:i.default.func,onResizeStart:i.default.func,onResize:i.default.func,isDraggable:i.default.bool.isRequired,isResizable:i.default.bool.isRequired,isBounded:i.default.bool.isRequired,static:i.default.bool,useCSSTransforms:i.default.bool.isRequired,transformScale:i.default.number,className:i.default.string,handle:i.default.string,cancel:i.default.string,droppingPosition:i.default.shape({e:i.default.object.isRequired,left:i.default.number.isRequired,top:i.default.number.isRequired})}),w(M,"defaultProps",{className:"",cancel:"",handle:"",minH:1,minW:1,maxH:1/0,maxW:1/0,transformScale:1})},30643:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=i?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(o,a,s):o[a]=e[a]}o.default=e,n&&n.set(e,o);return o}(n(76687)),i=u(n(58711)),a=u(n(86355)),s=n(61019),l=n(22343),d=u(n(6554)),c=u(n(8770));function u(e){return e&&e.__esModule?e:{default:e}}function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}function h(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||b(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){j(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||b(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,t){if(e){if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function S(e,t){return S=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},S(e,t)}function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=O(e);if(t){var o=O(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return M(this,n)}}function M(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return k(e)}function k(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function O(e){return O=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},O(e)}function j(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var C="react-grid-layout",z=!1;try{z=/firefox/i.test(navigator.userAgent)}catch(e){}var P=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&S(e,t)}(u,e);var t,n,r,c=w(u);function u(){var e;v(this,u);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return j(k(e=c.call.apply(c,[this].concat(n))),"state",{activeDrag:null,layout:(0,s.synchronizeLayoutWithChildren)(e.props.layout,e.props.children,e.props.cols,(0,s.compactType)(e.props),e.props.allowOverlap),mounted:!1,oldDragItem:null,oldLayout:null,oldResizeItem:null,droppingDOMNode:null,children:[]}),j(k(e),"dragEnterCounter",0),j(k(e),"onDragStart",(function(t,n,r,o){var i=o.e,a=o.node,l=e.state.layout,d=(0,s.getLayoutItem)(l,t);if(d)return e.setState({oldDragItem:(0,s.cloneLayoutItem)(d),oldLayout:l}),e.props.onDragStart(l,d,d,null,i,a)})),j(k(e),"onDrag",(function(t,n,r,o){var i=o.e,a=o.node,l=e.state.oldDragItem,d=e.state.layout,c=e.props,u=c.cols,p=c.allowOverlap,h=c.preventCollision,g=(0,s.getLayoutItem)(d,t);if(g){var f={w:g.w,h:g.h,x:g.x,y:g.y,placeholder:!0,i:t};d=(0,s.moveElement)(d,g,n,r,!0,h,(0,s.compactType)(e.props),u,p),e.props.onDrag(d,l,g,f,i,a),e.setState({layout:p?d:(0,s.compact)(d,(0,s.compactType)(e.props),u),activeDrag:f})}})),j(k(e),"onDragStop",(function(t,n,r,o){var i=o.e,a=o.node;if(e.state.activeDrag){var l=e.state.oldDragItem,d=e.state.layout,c=e.props,u=c.cols,p=c.preventCollision,h=c.allowOverlap,g=(0,s.getLayoutItem)(d,t);if(g){d=(0,s.moveElement)(d,g,n,r,!0,p,(0,s.compactType)(e.props),u,h),e.props.onDragStop(d,l,g,null,i,a);var f=h?d:(0,s.compact)(d,(0,s.compactType)(e.props),u),m=e.state.oldLayout;e.setState({activeDrag:null,layout:f,oldDragItem:null,oldLayout:null}),e.onLayoutMaybeChanged(f,m)}}})),j(k(e),"onResizeStart",(function(t,n,r,o){var i=o.e,a=o.node,l=e.state.layout,d=(0,s.getLayoutItem)(l,t);d&&(e.setState({oldResizeItem:(0,s.cloneLayoutItem)(d),oldLayout:e.state.layout}),e.props.onResizeStart(l,d,d,null,i,a))})),j(k(e),"onResize",(function(t,n,r,o){var i=o.e,a=o.node,l=e.state,d=l.layout,c=l.oldResizeItem,u=e.props,p=u.cols,h=u.preventCollision,g=u.allowOverlap,b=(0,s.withLayoutItem)(d,t,(function(e){var t;if(h&&!g){var o=(0,s.getAllCollisions)(d,f(f({},e),{},{w:n,h:r})).filter((function(t){return t.i!==e.i}));if(t=o.length>0){var i=1/0,a=1/0;o.forEach((function(t){t.x>e.x&&(i=Math.min(i,t.x)),t.y>e.y&&(a=Math.min(a,t.y))})),Number.isFinite(i)&&(e.w=i-e.x),Number.isFinite(a)&&(e.h=a-e.y)}}return t||(e.w=n,e.h=r),e})),y=m(b,2),v=y[0],x=y[1];if(x){var S={w:x.w,h:x.h,x:x.x,y:x.y,static:!0,i:t};e.props.onResize(v,c,x,S,i,a),e.setState({layout:g?v:(0,s.compact)(v,(0,s.compactType)(e.props),p),activeDrag:S})}})),j(k(e),"onResizeStop",(function(t,n,r,o){var i=o.e,a=o.node,l=e.state,d=l.layout,c=l.oldResizeItem,u=e.props,p=u.cols,h=u.allowOverlap,g=(0,s.getLayoutItem)(d,t);e.props.onResizeStop(d,c,g,null,i,a);var f=h?d:(0,s.compact)(d,(0,s.compactType)(e.props),p),m=e.state.oldLayout;e.setState({activeDrag:null,layout:f,oldResizeItem:null,oldLayout:null}),e.onLayoutMaybeChanged(f,m)})),j(k(e),"onDragOver",(function(t){var n;if(t.preventDefault(),t.stopPropagation(),z&&(null===(n=t.nativeEvent.target)||void 0===n||!n.classList.contains(C)))return!1;var r=e.props,i=r.droppingItem,a=r.onDropDragOver,s=r.margin,d=r.cols,c=r.rowHeight,u=r.maxRows,p=r.width,g=r.containerPadding,m=r.transformScale,b=null==a?void 0:a(t);if(!1===b)return e.state.droppingDOMNode&&e.removeDroppingPlaceholder(),!1;var y=f(f({},i),b),v=e.state.layout,x=t.nativeEvent,S=x.layerX,w=x.layerY,M={left:S/m,top:w/m,e:t};if(e.state.droppingDOMNode){if(e.state.droppingPosition){var k=e.state.droppingPosition,O=k.left,j=k.top;(O!=S||j!=w)&&e.setState({droppingPosition:M})}}else{var P={cols:d,margin:s,maxRows:u,rowHeight:c,containerWidth:p,containerPadding:g||s},T=(0,l.calcXY)(P,w,S,y.w,y.h);e.setState({droppingDOMNode:o.createElement("div",{key:y.i}),droppingPosition:M,layout:[].concat(h(v),[f(f({},y),{},{x:T.x,y:T.y,static:!1,isDraggable:!0})])})}})),j(k(e),"removeDroppingPlaceholder",(function(){var t=e.props,n=t.droppingItem,r=t.cols,o=e.state.layout,i=(0,s.compact)(o.filter((function(e){return e.i!==n.i})),(0,s.compactType)(e.props),r);e.setState({layout:i,droppingDOMNode:null,activeDrag:null,droppingPosition:void 0})})),j(k(e),"onDragLeave",(function(t){t.preventDefault(),t.stopPropagation(),e.dragEnterCounter--,0===e.dragEnterCounter&&e.removeDroppingPlaceholder()})),j(k(e),"onDragEnter",(function(t){t.preventDefault(),t.stopPropagation(),e.dragEnterCounter++})),j(k(e),"onDrop",(function(t){t.preventDefault(),t.stopPropagation();var n=e.props.droppingItem,r=e.state.layout,o=r.find((function(e){return e.i===n.i}));e.dragEnterCounter=0,e.removeDroppingPlaceholder(),e.props.onDrop(r,o,t)})),e}return t=u,r=[{key:"getDerivedStateFromProps",value:function(e,t){var n;return t.activeDrag?null:((0,i.default)(e.layout,t.propsLayout)&&e.compactType===t.compactType?(0,s.childrenEqual)(e.children,t.children)||(n=t.layout):n=e.layout,n?{layout:(0,s.synchronizeLayoutWithChildren)(n,e.children,e.cols,(0,s.compactType)(e),e.allowOverlap),compactType:e.compactType,children:e.children,propsLayout:e.layout}:null)}}],(n=[{key:"componentDidMount",value:function(){this.setState({mounted:!0}),this.onLayoutMaybeChanged(this.state.layout,this.props.layout)}},{key:"shouldComponentUpdate",value:function(e,t){return this.props.children!==e.children||!(0,s.fastRGLPropsEqual)(this.props,e,i.default)||this.state.activeDrag!==t.activeDrag||this.state.mounted!==t.mounted||this.state.droppingPosition!==t.droppingPosition}},{key:"componentDidUpdate",value:function(e,t){if(!this.state.activeDrag){var n=this.state.layout,r=t.layout;this.onLayoutMaybeChanged(n,r)}}},{key:"containerHeight",value:function(){if(this.props.autoSize){var e=(0,s.bottom)(this.state.layout),t=this.props.containerPadding?this.props.containerPadding[1]:this.props.margin[1];return e*this.props.rowHeight+(e-1)*this.props.margin[1]+2*t+"px"}}},{key:"onLayoutMaybeChanged",value:function(e,t){t||(t=this.state.layout),(0,i.default)(t,e)||this.props.onLayoutChange(e)}},{key:"placeholder",value:function(){var e=this.state.activeDrag;if(!e)return null;var t=this.props,n=t.width,r=t.cols,i=t.margin,a=t.containerPadding,s=t.rowHeight,l=t.maxRows,c=t.useCSSTransforms,u=t.transformScale;return o.createElement(d.default,{w:e.w,h:e.h,x:e.x,y:e.y,i:e.i,className:"react-grid-placeholder",containerWidth:n,cols:r,margin:i,containerPadding:a||i,maxRows:l,rowHeight:s,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:c,transformScale:u},o.createElement("div",null))}},{key:"processGridItem",value:function(e,t){if(e&&e.key){var n=(0,s.getLayoutItem)(this.state.layout,String(e.key));if(!n)return null;var r=this.props,i=r.width,a=r.cols,l=r.margin,c=r.containerPadding,u=r.rowHeight,p=r.maxRows,h=r.isDraggable,g=r.isResizable,f=r.isBounded,m=r.useCSSTransforms,b=r.transformScale,y=r.draggableCancel,v=r.draggableHandle,x=r.resizeHandles,S=r.resizeHandle,w=this.state,M=w.mounted,k=w.droppingPosition,O="boolean"==typeof n.isDraggable?n.isDraggable:!n.static&&h,j="boolean"==typeof n.isResizable?n.isResizable:!n.static&&g,C=n.resizeHandles||x,z=O&&f&&!1!==n.isBounded;return o.createElement(d.default,{containerWidth:i,cols:a,margin:l,containerPadding:c||l,maxRows:p,rowHeight:u,cancel:y,handle:v,onDragStop:this.onDragStop,onDragStart:this.onDragStart,onDrag:this.onDrag,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,isDraggable:O,isResizable:j,isBounded:z,useCSSTransforms:m&&M,usePercentages:!M,transformScale:b,w:n.w,h:n.h,x:n.x,y:n.y,i:n.i,minH:n.minH,minW:n.minW,maxH:n.maxH,maxW:n.maxW,static:n.static,droppingPosition:t?k:void 0,resizeHandles:C,resizeHandle:S},e)}}},{key:"render",value:function(){var e=this,t=this.props,n=t.className,r=t.style,i=t.isDroppable,l=t.innerRef,d=(0,a.default)(C,n),c=f({height:this.containerHeight()},r);return o.createElement("div",{ref:l,className:d,style:c,onDrop:i?this.onDrop:s.noop,onDragLeave:i?this.onDragLeave:s.noop,onDragEnter:i?this.onDragEnter:s.noop,onDragOver:i?this.onDragOver:s.noop},o.Children.map(this.props.children,(function(t){return e.processGridItem(t)})),i&&this.state.droppingDOMNode&&this.processGridItem(this.state.droppingDOMNode,!0),this.placeholder())}}])&&x(t.prototype,n),r&&x(t,r),Object.defineProperty(t,"prototype",{writable:!1}),u}(o.Component);t.default=P,j(P,"displayName","ReactGridLayout"),j(P,"propTypes",c.default),j(P,"defaultProps",{autoSize:!0,cols:12,className:"",style:{},draggableHandle:"",draggableCancel:"",containerPadding:null,rowHeight:150,maxRows:1/0,layout:[],margin:[10,10],isBounded:!1,isDraggable:!0,isResizable:!0,allowOverlap:!1,isDroppable:!1,useCSSTransforms:!0,transformScale:1,verticalCompact:!0,compactType:"vertical",preventCollision:!1,droppingItem:{i:"__dropping-elem__",h:1,w:1},resizeHandles:["se"],onLayoutChange:s.noop,onDragStart:s.noop,onDrag:s.noop,onDragStop:s.noop,onResizeStart:s.noop,onResize:s.noop,onResizeStop:s.noop,onDrop:s.noop,onDropDragOver:s.noop})},8770:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resizeHandleType=t.resizeHandleAxesType=t.default=void 0;var r=i(n(17225)),o=i(n(76687));function i(e){return e&&e.__esModule?e:{default:e}}var a=r.default.arrayOf(r.default.oneOf(["s","w","e","n","sw","nw","se","ne"]));t.resizeHandleAxesType=a;var s=r.default.oneOfType([r.default.node,r.default.func]);t.resizeHandleType=s;var l={className:r.default.string,style:r.default.object,width:r.default.number,autoSize:r.default.bool,cols:r.default.number,draggableCancel:r.default.string,draggableHandle:r.default.string,verticalCompact:function(e){e.verticalCompact,0},compactType:r.default.oneOf(["vertical","horizontal"]),layout:function(e){var t=e.layout;void 0!==t&&n(61019).validateLayout(t,"layout")},margin:r.default.arrayOf(r.default.number),containerPadding:r.default.arrayOf(r.default.number),rowHeight:r.default.number,maxRows:r.default.number,isBounded:r.default.bool,isDraggable:r.default.bool,isResizable:r.default.bool,allowOverlap:r.default.bool,preventCollision:r.default.bool,useCSSTransforms:r.default.bool,transformScale:r.default.number,isDroppable:r.default.bool,resizeHandles:a,resizeHandle:s,onLayoutChange:r.default.func,onDragStart:r.default.func,onDrag:r.default.func,onDragStop:r.default.func,onResizeStart:r.default.func,onResize:r.default.func,onResizeStop:r.default.func,onDrop:r.default.func,droppingItem:r.default.shape({i:r.default.string.isRequired,w:r.default.number.isRequired,h:r.default.number.isRequired}),children:function(e,t){var n=e[t],r={};o.default.Children.forEach(n,(function(e){if(null!=(null==e?void 0:e.key)){if(r[e.key])throw new Error('Duplicate child key "'+e.key+'" found! This will cause problems in ReactGridLayout.');r[e.key]=!0}}))},innerRef:r.default.any};t.default=l},7772:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=i?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(o,a,s):o[a]=e[a]}o.default=e,n&&n.set(e,o);return o}(n(76687)),i=u(n(17225)),a=u(n(58711)),s=n(61019),l=n(1705),d=u(n(30643)),c=["breakpoint","breakpoints","cols","layouts","margin","containerPadding","onBreakpointChange","onLayoutChange","onWidthChange"];function u(e){return e&&e.__esModule?e:{default:e}}function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}function h(){return h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h.apply(this,arguments)}function g(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){k(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function v(e,t){return v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},v(e,t)}function x(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=M(e);if(t){var o=M(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return S(this,n)}}function S(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return w(e)}function w(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function M(e){return M=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},M(e)}function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var O=function(e){return Object.prototype.toString.call(e)};function j(e,t){return null==e?null:Array.isArray(e)?e:e[t]}var C=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}(u,e);var t,n,r,i=x(u);function u(){var e;b(this,u);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return k(w(e=i.call.apply(i,[this].concat(n))),"state",e.generateInitialState()),k(w(e),"onLayoutChange",(function(t){e.props.onLayoutChange(t,m(m({},e.props.layouts),{},k({},e.state.breakpoint,t)))})),e}return t=u,r=[{key:"getDerivedStateFromProps",value:function(e,t){if(!(0,a.default)(e.layouts,t.layouts)){var n=t.breakpoint,r=t.cols;return{layout:(0,l.findOrGenerateResponsiveLayout)(e.layouts,e.breakpoints,n,n,r,e.compactType),layouts:e.layouts}}return null}}],(n=[{key:"generateInitialState",value:function(){var e=this.props,t=e.width,n=e.breakpoints,r=e.layouts,o=e.cols,i=(0,l.getBreakpointFromWidth)(n,t),a=(0,l.getColsFromBreakpoint)(i,o),s=!1===this.props.verticalCompact?null:this.props.compactType;return{layout:(0,l.findOrGenerateResponsiveLayout)(r,n,i,i,a,s),breakpoint:i,cols:a}}},{key:"componentDidUpdate",value:function(e){this.props.width==e.width&&this.props.breakpoint===e.breakpoint&&(0,a.default)(this.props.breakpoints,e.breakpoints)&&(0,a.default)(this.props.cols,e.cols)||this.onWidthChange(e)}},{key:"onWidthChange",value:function(e){var t=this.props,n=t.breakpoints,r=t.cols,o=t.layouts,i=t.compactType,a=this.props.breakpoint||(0,l.getBreakpointFromWidth)(this.props.breakpoints,this.props.width),d=this.state.breakpoint,c=(0,l.getColsFromBreakpoint)(a,r),u=m({},o);if(d!==a||e.breakpoints!==n||e.cols!==r){d in u||(u[d]=(0,s.cloneLayout)(this.state.layout));var p=(0,l.findOrGenerateResponsiveLayout)(u,n,a,d,c,i);p=(0,s.synchronizeLayoutWithChildren)(p,this.props.children,c,i,this.props.allowOverlap),u[a]=p,this.props.onLayoutChange(p,u),this.props.onBreakpointChange(a,c),this.setState({breakpoint:a,layout:p,cols:c})}var h=j(this.props.margin,a),g=j(this.props.containerPadding,a);this.props.onWidthChange(this.props.width,h,c,g)}},{key:"render",value:function(){var e=this.props,t=(e.breakpoint,e.breakpoints,e.cols,e.layouts,e.margin),n=e.containerPadding,r=(e.onBreakpointChange,e.onLayoutChange,e.onWidthChange,g(e,c));return o.createElement(d.default,h({},r,{margin:j(t,this.state.breakpoint),containerPadding:j(n,this.state.breakpoint),onLayoutChange:this.onLayoutChange,layout:this.state.layout,cols:this.state.cols}))}}])&&y(t.prototype,n),r&&y(t,r),Object.defineProperty(t,"prototype",{writable:!1}),u}(o.Component);t.default=C,k(C,"propTypes",{breakpoint:i.default.string,breakpoints:i.default.object,allowOverlap:i.default.bool,cols:i.default.object,margin:i.default.oneOfType([i.default.array,i.default.object]),containerPadding:i.default.oneOfType([i.default.array,i.default.object]),layouts:function(e,t){if("[object Object]"!==O(e[t]))throw new Error("Layout property must be an object. Received: "+O(e[t]));Object.keys(e[t]).forEach((function(t){if(!(t in e.breakpoints))throw new Error("Each key in layouts must align with a key in breakpoints.");(0,s.validateLayout)(e.layouts[t],"layouts."+t)}))},width:i.default.number.isRequired,onBreakpointChange:i.default.func,onLayoutChange:i.default.func,onWidthChange:i.default.func}),k(C,"defaultProps",{breakpoints:{lg:1200,md:996,sm:768,xs:480,xxs:0},cols:{lg:12,md:10,sm:6,xs:4,xxs:2},containerPadding:{lg:null,md:null,sm:null,xs:null,xxs:null},layouts:{},margin:[10,10],allowOverlap:!1,onBreakpointChange:s.noop,onLayoutChange:s.noop,onWidthChange:s.noop})},22343:(e,t)=>{"use strict";function n(e){var t=e.margin,n=e.containerPadding,r=e.containerWidth,o=e.cols;return(r-t[0]*(o-1)-2*n[0])/o}function r(e,t,n){return Number.isFinite(e)?Math.round(t*e+Math.max(0,e-1)*n):e}function o(e,t,n){return Math.max(Math.min(e,n),t)}Object.defineProperty(t,"__esModule",{value:!0}),t.calcGridColWidth=n,t.calcGridItemPosition=function(e,t,o,i,a,s){var l=e.margin,d=e.containerPadding,c=e.rowHeight,u=n(e),p={};s&&s.resizing?(p.width=Math.round(s.resizing.width),p.height=Math.round(s.resizing.height)):(p.width=r(i,u,l[0]),p.height=r(a,c,l[1]));s&&s.dragging?(p.top=Math.round(s.dragging.top),p.left=Math.round(s.dragging.left)):(p.top=Math.round((c+l[1])*o+d[1]),p.left=Math.round((u+l[0])*t+d[0]));return p},t.calcGridItemWHPx=r,t.calcWH=function(e,t,r,i,a){var s=e.margin,l=e.maxRows,d=e.cols,c=e.rowHeight,u=n(e),p=Math.round((t+s[0])/(u+s[0])),h=Math.round((r+s[1])/(c+s[1]));return p=o(p,0,d-i),h=o(h,0,l-a),{w:p,h}},t.calcXY=function(e,t,r,i,a){var s=e.margin,l=e.cols,d=e.rowHeight,c=e.maxRows,u=n(e),p=Math.round((r-s[0])/(u+s[0])),h=Math.round((t-s[1])/(d+s[1]));return p=o(p,0,l-i),h=o(h,0,c-a),{x:p,y:h}},t.clamp=o},34783:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}t.default=function(e){var t;return t=function(t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(l,t);var n,r,i=(n=l,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=m(n);if(r){var o=m(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return g(this,e)});function l(){var e;u(this,l);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return b(f(e=i.call.apply(i,[this].concat(n))),"state",{width:1280}),b(f(e),"elementRef",o.createRef()),b(f(e),"mounted",!1),b(f(e),"onWindowResize",(function(){if(e.mounted){var t=e.elementRef.current;t instanceof HTMLElement&&t.offsetWidth&&e.setState({width:t.offsetWidth})}})),e}return function(e,t,n){t&&p(e.prototype,t);n&&p(e,n);Object.defineProperty(e,"prototype",{writable:!1})}(l,[{key:"componentDidMount",value:function(){this.mounted=!0,window.addEventListener("resize",this.onWindowResize),this.onWindowResize()}},{key:"componentWillUnmount",value:function(){this.mounted=!1,window.removeEventListener("resize",this.onWindowResize)}},{key:"render",value:function(){var t=this.props,n=t.measureBeforeMount,r=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,s);return n&&!this.mounted?o.createElement("div",{className:(0,a.default)(this.props.className,"react-grid-layout"),style:this.props.style,ref:this.elementRef}):o.createElement(e,c({innerRef:this.elementRef},r,this.state))}}]),l}(o.Component),b(t,"defaultProps",{measureBeforeMount:!1}),b(t,"propTypes",{measureBeforeMount:i.default.bool}),t};var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=i?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(o,a,s):o[a]=e[a]}o.default=e,n&&n.set(e,o);return o}(n(76687)),i=l(n(17225)),a=l(n(86355)),s=["measureBeforeMount"];function l(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(this,arguments)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},h(e,t)}function g(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return f(e)}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},58843:e=>{e.exports=function(e,t,n){return e===t||e.className===t.className&&n(e.style,t.style)&&e.width===t.width&&e.autoSize===t.autoSize&&e.cols===t.cols&&e.draggableCancel===t.draggableCancel&&e.draggableHandle===t.draggableHandle&&n(e.verticalCompact,t.verticalCompact)&&n(e.compactType,t.compactType)&&n(e.layout,t.layout)&&n(e.margin,t.margin)&&n(e.containerPadding,t.containerPadding)&&e.rowHeight===t.rowHeight&&e.maxRows===t.maxRows&&e.isBounded===t.isBounded&&e.isDraggable===t.isDraggable&&e.isResizable===t.isResizable&&e.allowOverlap===t.allowOverlap&&e.preventCollision===t.preventCollision&&e.useCSSTransforms===t.useCSSTransforms&&e.transformScale===t.transformScale&&e.isDroppable===t.isDroppable&&n(e.resizeHandles,t.resizeHandles)&&n(e.resizeHandle,t.resizeHandle)&&e.onLayoutChange===t.onLayoutChange&&e.onDragStart===t.onDragStart&&e.onDrag===t.onDrag&&e.onDragStop===t.onDragStop&&e.onResizeStart===t.onResizeStart&&e.onResize===t.onResize&&e.onResizeStop===t.onResizeStop&&e.onDrop===t.onDrop&&n(e.droppingItem,t.droppingItem)&&n(e.innerRef,t.innerRef)}},1705:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findOrGenerateResponsiveLayout=function(e,t,n,i,a,s){if(e[n])return(0,r.cloneLayout)(e[n]);for(var l=e[i],d=o(t),c=d.slice(d.indexOf(n)),u=0,p=c.length;u<p;u++){var h=c[u];if(e[h]){l=e[h];break}}return l=(0,r.cloneLayout)(l||[]),(0,r.compact)((0,r.correctBounds)(l,{cols:a}),s,a)},t.getBreakpointFromWidth=function(e,t){for(var n=o(e),r=n[0],i=1,a=n.length;i<a;i++){var s=n[i];t>e[s]&&(r=s)}return r},t.getColsFromBreakpoint=function(e,t){if(!t[e])throw new Error("ResponsiveReactGridLayout: `cols` entry for breakpoint "+e+" is missing!");return t[e]},t.sortBreakpoints=o;var r=n(61019);function o(e){return Object.keys(e).sort((function(t,n){return e[t]-e[n]}))}},61019:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bottom=d,t.childrenEqual=function(e,t){return(0,r.default)(o.default.Children.map(e,(function(e){return null==e?void 0:e.key})),o.default.Children.map(t,(function(e){return null==e?void 0:e.key})))},t.cloneLayout=c,t.cloneLayoutItem=p,t.collides=g,t.compact=f,t.compactItem=y,t.compactType=function(e){var t=e||{},n=t.verticalCompact,r=t.compactType;return!1===n?null:r},t.correctBounds=v,t.fastPositionEqual=function(e,t){return e.left===t.left&&e.top===t.top&&e.width===t.width&&e.height===t.height},t.fastRGLPropsEqual=void 0,t.getAllCollisions=w,t.getFirstCollision=S,t.getLayoutItem=x,t.getStatics=M,t.modifyLayout=u,t.moveElement=k,t.moveElementAwayFromCollision=O,t.noop=void 0,t.perc=function(e){return 100*e+"%"},t.setTopLeft=function(e){var t=e.top,n=e.left,r=e.width,o=e.height;return{top:"".concat(t,"px"),left:"".concat(n,"px"),width:"".concat(r,"px"),height:"".concat(o,"px"),position:"absolute"}},t.setTransform=function(e){var t=e.top,n=e.left,r=e.width,o=e.height,i="translate(".concat(n,"px,").concat(t,"px)");return{transform:i,WebkitTransform:i,MozTransform:i,msTransform:i,OTransform:i,width:"".concat(r,"px"),height:"".concat(o,"px"),position:"absolute"}},t.sortLayoutItems=j,t.sortLayoutItemsByColRow=z,t.sortLayoutItemsByRowCol=C,t.synchronizeLayoutWithChildren=function(e,t,n,r,i){e=e||[];var a=[];o.default.Children.forEach(t,(function(t){if(null!=(null==t?void 0:t.key)){var n=x(e,String(t.key));if(n)a.push(p(n));else{0;var r=t.props["data-grid"]||t.props._grid;r?a.push(p(s(s({},r),{},{i:t.key}))):a.push(p({w:1,h:1,x:0,y:d(a),i:String(t.key)}))}}}));var l=v(a,{cols:n});return i?l:f(l,r,n)},t.validateLayout=P,t.withLayoutItem=function(e,t,n){var r=x(e,t);return r?(r=n(p(r)),[e=u(e,r),r]):[e,null]};var r=i(n(58711)),o=i(n(76687));function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e){for(var t,n=0,r=0,o=e.length;r<o;r++)(t=e[r].y+e[r].h)>n&&(n=t);return n}function c(e){for(var t=Array(e.length),n=0,r=e.length;n<r;n++)t[n]=p(e[n]);return t}function u(e,t){for(var n=Array(e.length),r=0,o=e.length;r<o;r++)t.i===e[r].i?n[r]=t:n[r]=e[r];return n}function p(e){return{w:e.w,h:e.h,x:e.x,y:e.y,i:e.i,minW:e.minW,maxW:e.maxW,minH:e.minH,maxH:e.maxH,moved:Boolean(e.moved),static:Boolean(e.static),isDraggable:e.isDraggable,isResizable:e.isResizable,resizeHandles:e.resizeHandles,isBounded:e.isBounded}}var h=n(58843);function g(e,t){return e.i!==t.i&&(!(e.x+e.w<=t.x)&&(!(e.x>=t.x+t.w)&&(!(e.y+e.h<=t.y)&&!(e.y>=t.y+t.h))))}function f(e,t,n){for(var r=M(e),o=j(e,t),i=Array(e.length),a=0,s=o.length;a<s;a++){var l=p(o[a]);l.static||(l=y(r,l,t,n,o),r.push(l)),i[e.indexOf(o[a])]=l,l.moved=!1}return i}t.fastRGLPropsEqual=h;var m={x:"w",y:"h"};function b(e,t,n,r){var o=m[r];t[r]+=1;for(var i=e.map((function(e){return e.i})).indexOf(t.i)+1;i<e.length;i++){var a=e[i];if(!a.static){if(a.y>t.y+t.h)break;g(t,a)&&b(e,a,n+t[o],r)}}t[r]=n}function y(e,t,n,r,o){var i,a="horizontal"===n;if("vertical"===n)for(t.y=Math.min(d(e),t.y);t.y>0&&!S(e,t);)t.y--;else if(a)for(;t.x>0&&!S(e,t);)t.x--;for(;i=S(e,t);)a?b(o,t,i.x+i.w,"x"):b(o,t,i.y+i.h,"y"),a&&t.x+t.w>r&&(t.x=r-t.w,t.y++);return t.y=Math.max(t.y,0),t.x=Math.max(t.x,0),t}function v(e,t){for(var n=M(e),r=0,o=e.length;r<o;r++){var i=e[r];if(i.x+i.w>t.cols&&(i.x=t.cols-i.w),i.x<0&&(i.x=0,i.w=t.cols),i.static)for(;S(n,i);)i.y++;else n.push(i)}return e}function x(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n].i===t)return e[n]}function S(e,t){for(var n=0,r=e.length;n<r;n++)if(g(e[n],t))return e[n]}function w(e,t){return e.filter((function(e){return g(e,t)}))}function M(e){return e.filter((function(e){return e.static}))}function k(e,t,n,r,o,i,a,s,l){if(t.static&&!0!==t.isDraggable)return e;if(t.y===r&&t.x===n)return e;T("Moving element ".concat(t.i," to [").concat(String(n),",").concat(String(r),"] from [").concat(t.x,",").concat(t.y,"]"));var d=t.x,u=t.y;"number"==typeof n&&(t.x=n),"number"==typeof r&&(t.y=r),t.moved=!0;var p=j(e,a);("vertical"===a&&"number"==typeof r?u>=r:"horizontal"===a&&"number"==typeof n&&d>=n)&&(p=p.reverse());var h=w(p,t),g=h.length>0;if(g&&l)return c(e);if(g&&i)return T("Collision prevented on ".concat(t.i,", reverting.")),t.x=d,t.y=u,t.moved=!1,e;for(var f=0,m=h.length;f<m;f++){var b=h[f];T("Resolving collision between ".concat(t.i," at [").concat(t.x,",").concat(t.y,"] and ").concat(b.i," at [").concat(b.x,",").concat(b.y,"]")),b.moved||(e=b.static?O(e,b,t,o,a,s):O(e,t,b,o,a,s))}return e}function O(e,t,n,r,o,i){var a="horizontal"===o,s="horizontal"!==o,l=t.static;if(r){r=!1;var d={x:a?Math.max(t.x-n.w,0):n.x,y:s?Math.max(t.y-n.h,0):n.y,w:n.w,h:n.h,i:"-1"};if(!S(e,d))return T("Doing reverse collision on ".concat(n.i," up to [").concat(d.x,",").concat(d.y,"].")),k(e,n,a?d.x:void 0,s?d.y:void 0,r,l,o,i)}return k(e,n,a?n.x+1:void 0,s?n.y+1:void 0,r,l,o,i)}function j(e,t){return"horizontal"===t?z(e):"vertical"===t?C(e):e}function C(e){return e.slice(0).sort((function(e,t){return e.y>t.y||e.y===t.y&&e.x>t.x?1:e.y===t.y&&e.x===t.x?0:-1}))}function z(e){return e.slice(0).sort((function(e,t){return e.x>t.x||e.x===t.x&&e.y>t.y?1:-1}))}function P(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Layout",n=["x","y","w","h"];if(!Array.isArray(e))throw new Error(t+" must be an array!");for(var r=0,o=e.length;r<o;r++)for(var i=e[r],a=0;a<n.length;a++)if("number"!=typeof i[n[a]])throw new Error("ReactGridLayout: "+t+"["+r+"]."+n[a]+" must be a number!")}function T(){}t.noop=function(){}},84051:(e,t,n)=>{e.exports=n(30643).default,e.exports.utils=n(61019),e.exports.Responsive=n(7772).default,e.exports.Responsive.utils=n(1705),e.exports.WidthProvider=n(34783).default},58711:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",d="[object Error]",c="[object Function]",u="[object Map]",p="[object Number]",h="[object Object]",g="[object Promise]",f="[object RegExp]",m="[object Set]",b="[object String]",y="[object Symbol]",v="[object WeakMap]",x="[object ArrayBuffer]",S="[object DataView]",w=/^\[object .+?Constructor\]$/,M=/^(?:0|[1-9]\d*)$/,k={};k["[object Float32Array]"]=k["[object Float64Array]"]=k["[object Int8Array]"]=k["[object Int16Array]"]=k["[object Int32Array]"]=k["[object Uint8Array]"]=k["[object Uint8ClampedArray]"]=k["[object Uint16Array]"]=k["[object Uint32Array]"]=!0,k[i]=k[a]=k[x]=k[s]=k[S]=k[l]=k[d]=k[c]=k[u]=k[p]=k[h]=k[f]=k[m]=k[b]=k[v]=!1;var O="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,j="object"==typeof self&&self&&self.Object===Object&&self,C=O||j||Function("return this")(),z=t&&!t.nodeType&&t,P=z&&e&&!e.nodeType&&e,T=P&&P.exports===z,W=T&&O.process,B=function(){try{return W&&W.binding&&W.binding("util")}catch(e){}}(),R=B&&B.isTypedArray;function D(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function I(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function E(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var A,N,F,L=Array.prototype,_=Function.prototype,$=Object.prototype,H=C["__core-js_shared__"],G=_.toString,V=$.hasOwnProperty,U=(A=/[^.]+$/.exec(H&&H.keys&&H.keys.IE_PROTO||""))?"Symbol(src)_1."+A:"",q=$.toString,J=RegExp("^"+G.call(V).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Z=T?C.Buffer:void 0,Q=C.Symbol,K=C.Uint8Array,Y=$.propertyIsEnumerable,X=L.splice,ee=Q?Q.toStringTag:void 0,te=Object.getOwnPropertySymbols,ne=Z?Z.isBuffer:void 0,re=(N=Object.keys,F=Object,function(e){return N(F(e))}),oe=Be(C,"DataView"),ie=Be(C,"Map"),ae=Be(C,"Promise"),se=Be(C,"Set"),le=Be(C,"WeakMap"),de=Be(Object,"create"),ce=Ee(oe),ue=Ee(ie),pe=Ee(ae),he=Ee(se),ge=Ee(le),fe=Q?Q.prototype:void 0,me=fe?fe.valueOf:void 0;function be(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ye(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ve(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function xe(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new ve;++t<n;)this.add(e[t])}function Se(e){var t=this.__data__=new ye(e);this.size=t.size}function we(e,t){var n=Fe(e),r=!n&&Ne(e),o=!n&&!r&&Le(e),i=!n&&!r&&!o&&Ve(e),a=n||r||o||i,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=s.length;for(var d in e)!t&&!V.call(e,d)||a&&("length"==d||o&&("offset"==d||"parent"==d)||i&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||Ie(d,l))||s.push(d);return s}function Me(e,t){for(var n=e.length;n--;)if(Ae(e[n][0],t))return n;return-1}function ke(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":ee&&ee in Object(e)?function(e){var t=V.call(e,ee),n=e[ee];try{e[ee]=void 0;var r=!0}catch(e){}var o=q.call(e);r&&(t?e[ee]=n:delete e[ee]);return o}(e):function(e){return q.call(e)}(e)}function Oe(e){return Ge(e)&&ke(e)==i}function je(e,t,n,r,o){return e===t||(null==e||null==t||!Ge(e)&&!Ge(t)?e!=e&&t!=t:function(e,t,n,r,o,c){var g=Fe(e),v=Fe(t),w=g?a:De(e),M=v?a:De(t),k=(w=w==i?h:w)==h,O=(M=M==i?h:M)==h,j=w==M;if(j&&Le(e)){if(!Le(t))return!1;g=!0,k=!1}if(j&&!k)return c||(c=new Se),g||Ve(e)?Pe(e,t,n,r,o,c):function(e,t,n,r,o,i,a){switch(n){case S:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case x:return!(e.byteLength!=t.byteLength||!i(new K(e),new K(t)));case s:case l:case p:return Ae(+e,+t);case d:return e.name==t.name&&e.message==t.message;case f:case b:return e==t+"";case u:var c=I;case m:var h=1&r;if(c||(c=E),e.size!=t.size&&!h)return!1;var g=a.get(e);if(g)return g==t;r|=2,a.set(e,t);var v=Pe(c(e),c(t),r,o,i,a);return a.delete(e),v;case y:if(me)return me.call(e)==me.call(t)}return!1}(e,t,w,n,r,o,c);if(!(1&n)){var C=k&&V.call(e,"__wrapped__"),z=O&&V.call(t,"__wrapped__");if(C||z){var P=C?e.value():e,T=z?t.value():t;return c||(c=new Se),o(P,T,n,r,c)}}if(!j)return!1;return c||(c=new Se),function(e,t,n,r,o,i){var a=1&n,s=Te(e),l=s.length,d=Te(t).length;if(l!=d&&!a)return!1;var c=l;for(;c--;){var u=s[c];if(!(a?u in t:V.call(t,u)))return!1}var p=i.get(e);if(p&&i.get(t))return p==t;var h=!0;i.set(e,t),i.set(t,e);var g=a;for(;++c<l;){var f=e[u=s[c]],m=t[u];if(r)var b=a?r(m,f,u,t,e,i):r(f,m,u,e,t,i);if(!(void 0===b?f===m||o(f,m,n,r,i):b)){h=!1;break}g||(g="constructor"==u)}if(h&&!g){var y=e.constructor,v=t.constructor;y==v||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof v&&v instanceof v||(h=!1)}return i.delete(e),i.delete(t),h}(e,t,n,r,o,c)}(e,t,n,r,je,o))}function Ce(e){return!(!He(e)||function(e){return!!U&&U in e}(e))&&(_e(e)?J:w).test(Ee(e))}function ze(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||$,t!==r)return re(e);var t,n,r,o=[];for(var i in Object(e))V.call(e,i)&&"constructor"!=i&&o.push(i);return o}function Pe(e,t,n,r,o,i){var a=1&n,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var d=i.get(e);if(d&&i.get(t))return d==t;var c=-1,u=!0,p=2&n?new xe:void 0;for(i.set(e,t),i.set(t,e);++c<s;){var h=e[c],g=t[c];if(r)var f=a?r(g,h,c,t,e,i):r(h,g,c,e,t,i);if(void 0!==f){if(f)continue;u=!1;break}if(p){if(!D(t,(function(e,t){if(a=t,!p.has(a)&&(h===e||o(h,e,n,r,i)))return p.push(t);var a}))){u=!1;break}}else if(h!==g&&!o(h,g,n,r,i)){u=!1;break}}return i.delete(e),i.delete(t),u}function Te(e){return function(e,t,n){var r=t(e);return Fe(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,Ue,Re)}function We(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function Be(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Ce(n)?n:void 0}be.prototype.clear=function(){this.__data__=de?de(null):{},this.size=0},be.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},be.prototype.get=function(e){var t=this.__data__;if(de){var n=t[e];return n===r?void 0:n}return V.call(t,e)?t[e]:void 0},be.prototype.has=function(e){var t=this.__data__;return de?void 0!==t[e]:V.call(t,e)},be.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=de&&void 0===t?r:t,this},ye.prototype.clear=function(){this.__data__=[],this.size=0},ye.prototype.delete=function(e){var t=this.__data__,n=Me(t,e);return!(n<0)&&(n==t.length-1?t.pop():X.call(t,n,1),--this.size,!0)},ye.prototype.get=function(e){var t=this.__data__,n=Me(t,e);return n<0?void 0:t[n][1]},ye.prototype.has=function(e){return Me(this.__data__,e)>-1},ye.prototype.set=function(e,t){var n=this.__data__,r=Me(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},ve.prototype.clear=function(){this.size=0,this.__data__={hash:new be,map:new(ie||ye),string:new be}},ve.prototype.delete=function(e){var t=We(this,e).delete(e);return this.size-=t?1:0,t},ve.prototype.get=function(e){return We(this,e).get(e)},ve.prototype.has=function(e){return We(this,e).has(e)},ve.prototype.set=function(e,t){var n=We(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},xe.prototype.add=xe.prototype.push=function(e){return this.__data__.set(e,r),this},xe.prototype.has=function(e){return this.__data__.has(e)},Se.prototype.clear=function(){this.__data__=new ye,this.size=0},Se.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Se.prototype.get=function(e){return this.__data__.get(e)},Se.prototype.has=function(e){return this.__data__.has(e)},Se.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ye){var r=n.__data__;if(!ie||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ve(r)}return n.set(e,t),this.size=n.size,this};var Re=te?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}(te(e),(function(t){return Y.call(e,t)})))}:function(){return[]},De=ke;function Ie(e,t){return!!(t=null==t?o:t)&&("number"==typeof e||M.test(e))&&e>-1&&e%1==0&&e<t}function Ee(e){if(null!=e){try{return G.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ae(e,t){return e===t||e!=e&&t!=t}(oe&&De(new oe(new ArrayBuffer(1)))!=S||ie&&De(new ie)!=u||ae&&De(ae.resolve())!=g||se&&De(new se)!=m||le&&De(new le)!=v)&&(De=function(e){var t=ke(e),n=t==h?e.constructor:void 0,r=n?Ee(n):"";if(r)switch(r){case ce:return S;case ue:return u;case pe:return g;case he:return m;case ge:return v}return t});var Ne=Oe(function(){return arguments}())?Oe:function(e){return Ge(e)&&V.call(e,"callee")&&!Y.call(e,"callee")},Fe=Array.isArray;var Le=ne||function(){return!1};function _e(e){if(!He(e))return!1;var t=ke(e);return t==c||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function $e(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}function He(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ge(e){return null!=e&&"object"==typeof e}var Ve=R?function(e){return function(t){return e(t)}}(R):function(e){return Ge(e)&&$e(e.length)&&!!k[ke(e)]};function Ue(e){return null!=(t=e)&&$e(t.length)&&!_e(t)?we(e):ze(e);var t}e.exports=function(e,t){return je(e,t)}},45571:e=>{e.exports=["alignContent","MozAlignContent","WebkitAlignContent","MSAlignContent","OAlignContent","alignItems","MozAlignItems","WebkitAlignItems","MSAlignItems","OAlignItems","alignSelf","MozAlignSelf","WebkitAlignSelf","MSAlignSelf","OAlignSelf","all","MozAll","WebkitAll","MSAll","OAll","animation","MozAnimation","WebkitAnimation","MSAnimation","OAnimation","animationDelay","MozAnimationDelay","WebkitAnimationDelay","MSAnimationDelay","OAnimationDelay","animationDirection","MozAnimationDirection","WebkitAnimationDirection","MSAnimationDirection","OAnimationDirection","animationDuration","MozAnimationDuration","WebkitAnimationDuration","MSAnimationDuration","OAnimationDuration","animationFillMode","MozAnimationFillMode","WebkitAnimationFillMode","MSAnimationFillMode","OAnimationFillMode","animationIterationCount","MozAnimationIterationCount","WebkitAnimationIterationCount","MSAnimationIterationCount","OAnimationIterationCount","animationName","MozAnimationName","WebkitAnimationName","MSAnimationName","OAnimationName","animationPlayState","MozAnimationPlayState","WebkitAnimationPlayState","MSAnimationPlayState","OAnimationPlayState","animationTimingFunction","MozAnimationTimingFunction","WebkitAnimationTimingFunction","MSAnimationTimingFunction","OAnimationTimingFunction","backfaceVisibility","MozBackfaceVisibility","WebkitBackfaceVisibility","MSBackfaceVisibility","OBackfaceVisibility","background","MozBackground","WebkitBackground","MSBackground","OBackground","backgroundAttachment","MozBackgroundAttachment","WebkitBackgroundAttachment","MSBackgroundAttachment","OBackgroundAttachment","backgroundBlendMode","MozBackgroundBlendMode","WebkitBackgroundBlendMode","MSBackgroundBlendMode","OBackgroundBlendMode","backgroundClip","MozBackgroundClip","WebkitBackgroundClip","MSBackgroundClip","OBackgroundClip","backgroundColor","MozBackgroundColor","WebkitBackgroundColor","MSBackgroundColor","OBackgroundColor","backgroundImage","MozBackgroundImage","WebkitBackgroundImage","MSBackgroundImage","OBackgroundImage","backgroundOrigin","MozBackgroundOrigin","WebkitBackgroundOrigin","MSBackgroundOrigin","OBackgroundOrigin","backgroundPosition","MozBackgroundPosition","WebkitBackgroundPosition","MSBackgroundPosition","OBackgroundPosition","backgroundRepeat","MozBackgroundRepeat","WebkitBackgroundRepeat","MSBackgroundRepeat","OBackgroundRepeat","backgroundSize","MozBackgroundSize","WebkitBackgroundSize","MSBackgroundSize","OBackgroundSize","blockSize","MozBlockSize","WebkitBlockSize","MSBlockSize","OBlockSize","border","MozBorder","WebkitBorder","MSBorder","OBorder","borderBlockEnd","MozBorderBlockEnd","WebkitBorderBlockEnd","MSBorderBlockEnd","OBorderBlockEnd","borderBlockEndColor","MozBorderBlockEndColor","WebkitBorderBlockEndColor","MSBorderBlockEndColor","OBorderBlockEndColor","borderBlockEndStyle","MozBorderBlockEndStyle","WebkitBorderBlockEndStyle","MSBorderBlockEndStyle","OBorderBlockEndStyle","borderBlockEndWidth","MozBorderBlockEndWidth","WebkitBorderBlockEndWidth","MSBorderBlockEndWidth","OBorderBlockEndWidth","borderBlockStart","MozBorderBlockStart","WebkitBorderBlockStart","MSBorderBlockStart","OBorderBlockStart","borderBlockStartColor","MozBorderBlockStartColor","WebkitBorderBlockStartColor","MSBorderBlockStartColor","OBorderBlockStartColor","borderBlockStartStyle","MozBorderBlockStartStyle","WebkitBorderBlockStartStyle","MSBorderBlockStartStyle","OBorderBlockStartStyle","borderBlockStartWidth","MozBorderBlockStartWidth","WebkitBorderBlockStartWidth","MSBorderBlockStartWidth","OBorderBlockStartWidth","borderBottom","MozBorderBottom","WebkitBorderBottom","MSBorderBottom","OBorderBottom","borderBottomColor","MozBorderBottomColor","WebkitBorderBottomColor","MSBorderBottomColor","OBorderBottomColor","borderBottomLeftRadius","MozBorderBottomLeftRadius","WebkitBorderBottomLeftRadius","MSBorderBottomLeftRadius","OBorderBottomLeftRadius","borderBottomRightRadius","MozBorderBottomRightRadius","WebkitBorderBottomRightRadius","MSBorderBottomRightRadius","OBorderBottomRightRadius","borderBottomStyle","MozBorderBottomStyle","WebkitBorderBottomStyle","MSBorderBottomStyle","OBorderBottomStyle","borderBottomWidth","MozBorderBottomWidth","WebkitBorderBottomWidth","MSBorderBottomWidth","OBorderBottomWidth","borderCollapse","MozBorderCollapse","WebkitBorderCollapse","MSBorderCollapse","OBorderCollapse","borderColor","MozBorderColor","WebkitBorderColor","MSBorderColor","OBorderColor","borderImage","MozBorderImage","WebkitBorderImage","MSBorderImage","OBorderImage","borderImageOutset","MozBorderImageOutset","WebkitBorderImageOutset","MSBorderImageOutset","OBorderImageOutset","borderImageRepeat","MozBorderImageRepeat","WebkitBorderImageRepeat","MSBorderImageRepeat","OBorderImageRepeat","borderImageSlice","MozBorderImageSlice","WebkitBorderImageSlice","MSBorderImageSlice","OBorderImageSlice","borderImageSource","MozBorderImageSource","WebkitBorderImageSource","MSBorderImageSource","OBorderImageSource","borderImageWidth","MozBorderImageWidth","WebkitBorderImageWidth","MSBorderImageWidth","OBorderImageWidth","borderInlineEnd","MozBorderInlineEnd","WebkitBorderInlineEnd","MSBorderInlineEnd","OBorderInlineEnd","borderInlineEndColor","MozBorderInlineEndColor","WebkitBorderInlineEndColor","MSBorderInlineEndColor","OBorderInlineEndColor","borderInlineEndStyle","MozBorderInlineEndStyle","WebkitBorderInlineEndStyle","MSBorderInlineEndStyle","OBorderInlineEndStyle","borderInlineEndWidth","MozBorderInlineEndWidth","WebkitBorderInlineEndWidth","MSBorderInlineEndWidth","OBorderInlineEndWidth","borderInlineStart","MozBorderInlineStart","WebkitBorderInlineStart","MSBorderInlineStart","OBorderInlineStart","borderInlineStartColor","MozBorderInlineStartColor","WebkitBorderInlineStartColor","MSBorderInlineStartColor","OBorderInlineStartColor","borderInlineStartStyle","MozBorderInlineStartStyle","WebkitBorderInlineStartStyle","MSBorderInlineStartStyle","OBorderInlineStartStyle","borderInlineStartWidth","MozBorderInlineStartWidth","WebkitBorderInlineStartWidth","MSBorderInlineStartWidth","OBorderInlineStartWidth","borderLeft","MozBorderLeft","WebkitBorderLeft","MSBorderLeft","OBorderLeft","borderLeftColor","MozBorderLeftColor","WebkitBorderLeftColor","MSBorderLeftColor","OBorderLeftColor","borderLeftStyle","MozBorderLeftStyle","WebkitBorderLeftStyle","MSBorderLeftStyle","OBorderLeftStyle","borderLeftWidth","MozBorderLeftWidth","WebkitBorderLeftWidth","MSBorderLeftWidth","OBorderLeftWidth","borderRadius","MozBorderRadius","WebkitBorderRadius","MSBorderRadius","OBorderRadius","borderRight","MozBorderRight","WebkitBorderRight","MSBorderRight","OBorderRight","borderRightColor","MozBorderRightColor","WebkitBorderRightColor","MSBorderRightColor","OBorderRightColor","borderRightStyle","MozBorderRightStyle","WebkitBorderRightStyle","MSBorderRightStyle","OBorderRightStyle","borderRightWidth","MozBorderRightWidth","WebkitBorderRightWidth","MSBorderRightWidth","OBorderRightWidth","borderSpacing","MozBorderSpacing","WebkitBorderSpacing","MSBorderSpacing","OBorderSpacing","borderStyle","MozBorderStyle","WebkitBorderStyle","MSBorderStyle","OBorderStyle","borderTop","MozBorderTop","WebkitBorderTop","MSBorderTop","OBorderTop","borderTopColor","MozBorderTopColor","WebkitBorderTopColor","MSBorderTopColor","OBorderTopColor","borderTopLeftRadius","MozBorderTopLeftRadius","WebkitBorderTopLeftRadius","MSBorderTopLeftRadius","OBorderTopLeftRadius","borderTopRightRadius","MozBorderTopRightRadius","WebkitBorderTopRightRadius","MSBorderTopRightRadius","OBorderTopRightRadius","borderTopStyle","MozBorderTopStyle","WebkitBorderTopStyle","MSBorderTopStyle","OBorderTopStyle","borderTopWidth","MozBorderTopWidth","WebkitBorderTopWidth","MSBorderTopWidth","OBorderTopWidth","borderWidth","MozBorderWidth","WebkitBorderWidth","MSBorderWidth","OBorderWidth","bottom","MozBottom","WebkitBottom","MSBottom","OBottom","boxDecorationBreak","MozBoxDecorationBreak","WebkitBoxDecorationBreak","MSBoxDecorationBreak","OBoxDecorationBreak","boxShadow","MozBoxShadow","WebkitBoxShadow","MSBoxShadow","OBoxShadow","boxSizing","MozBoxSizing","WebkitBoxSizing","MSBoxSizing","OBoxSizing","breakAfter","MozBreakAfter","WebkitBreakAfter","MSBreakAfter","OBreakAfter","breakBefore","MozBreakBefore","WebkitBreakBefore","MSBreakBefore","OBreakBefore","breakInside","MozBreakInside","WebkitBreakInside","MSBreakInside","OBreakInside","captionSide","MozCaptionSide","WebkitCaptionSide","MSCaptionSide","OCaptionSide","caretColor","MozCaretColor","WebkitCaretColor","MSCaretColor","OCaretColor","ch","MozCh","WebkitCh","MSCh","OCh","clear","MozClear","WebkitClear","MSClear","OClear","clip","MozClip","WebkitClip","MSClip","OClip","clipPath","MozClipPath","WebkitClipPath","MSClipPath","OClipPath","cm","MozCm","WebkitCm","MSCm","OCm","color","MozColor","WebkitColor","MSColor","OColor","columnCount","MozColumnCount","WebkitColumnCount","MSColumnCount","OColumnCount","columnFill","MozColumnFill","WebkitColumnFill","MSColumnFill","OColumnFill","columnGap","MozColumnGap","WebkitColumnGap","MSColumnGap","OColumnGap","columnRule","MozColumnRule","WebkitColumnRule","MSColumnRule","OColumnRule","columnRuleColor","MozColumnRuleColor","WebkitColumnRuleColor","MSColumnRuleColor","OColumnRuleColor","columnRuleStyle","MozColumnRuleStyle","WebkitColumnRuleStyle","MSColumnRuleStyle","OColumnRuleStyle","columnRuleWidth","MozColumnRuleWidth","WebkitColumnRuleWidth","MSColumnRuleWidth","OColumnRuleWidth","columnSpan","MozColumnSpan","WebkitColumnSpan","MSColumnSpan","OColumnSpan","columnWidth","MozColumnWidth","WebkitColumnWidth","MSColumnWidth","OColumnWidth","columns","MozColumns","WebkitColumns","MSColumns","OColumns","content","MozContent","WebkitContent","MSContent","OContent","counterIncrement","MozCounterIncrement","WebkitCounterIncrement","MSCounterIncrement","OCounterIncrement","counterReset","MozCounterReset","WebkitCounterReset","MSCounterReset","OCounterReset","cursor","MozCursor","WebkitCursor","MSCursor","OCursor","deg","MozDeg","WebkitDeg","MSDeg","ODeg","direction","MozDirection","WebkitDirection","MSDirection","ODirection","display","MozDisplay","WebkitDisplay","MSDisplay","ODisplay","dpcm","MozDpcm","WebkitDpcm","MSDpcm","ODpcm","dpi","MozDpi","WebkitDpi","MSDpi","ODpi","dppx","MozDppx","WebkitDppx","MSDppx","ODppx","em","MozEm","WebkitEm","MSEm","OEm","emptyCells","MozEmptyCells","WebkitEmptyCells","MSEmptyCells","OEmptyCells","ex","MozEx","WebkitEx","MSEx","OEx","filter","MozFilter","WebkitFilter","MSFilter","OFilter","flexBasis","MozFlexBasis","WebkitFlexBasis","MSFlexBasis","OFlexBasis","flexDirection","MozFlexDirection","WebkitFlexDirection","MSFlexDirection","OFlexDirection","flexFlow","MozFlexFlow","WebkitFlexFlow","MSFlexFlow","OFlexFlow","flexGrow","MozFlexGrow","WebkitFlexGrow","MSFlexGrow","OFlexGrow","flexShrink","MozFlexShrink","WebkitFlexShrink","MSFlexShrink","OFlexShrink","flexWrap","MozFlexWrap","WebkitFlexWrap","MSFlexWrap","OFlexWrap","float","MozFloat","WebkitFloat","MSFloat","OFloat","font","MozFont","WebkitFont","MSFont","OFont","fontFamily","MozFontFamily","WebkitFontFamily","MSFontFamily","OFontFamily","fontFeatureSettings","MozFontFeatureSettings","WebkitFontFeatureSettings","MSFontFeatureSettings","OFontFeatureSettings","fontKerning","MozFontKerning","WebkitFontKerning","MSFontKerning","OFontKerning","fontLanguageOverride","MozFontLanguageOverride","WebkitFontLanguageOverride","MSFontLanguageOverride","OFontLanguageOverride","fontSize","MozFontSize","WebkitFontSize","MSFontSize","OFontSize","fontSizeAdjust","MozFontSizeAdjust","WebkitFontSizeAdjust","MSFontSizeAdjust","OFontSizeAdjust","fontStretch","MozFontStretch","WebkitFontStretch","MSFontStretch","OFontStretch","fontStyle","MozFontStyle","WebkitFontStyle","MSFontStyle","OFontStyle","fontSynthesis","MozFontSynthesis","WebkitFontSynthesis","MSFontSynthesis","OFontSynthesis","fontVariant","MozFontVariant","WebkitFontVariant","MSFontVariant","OFontVariant","fontVariantAlternates","MozFontVariantAlternates","WebkitFontVariantAlternates","MSFontVariantAlternates","OFontVariantAlternates","fontVariantCaps","MozFontVariantCaps","WebkitFontVariantCaps","MSFontVariantCaps","OFontVariantCaps","fontVariantEastAsian","MozFontVariantEastAsian","WebkitFontVariantEastAsian","MSFontVariantEastAsian","OFontVariantEastAsian","fontVariantLigatures","MozFontVariantLigatures","WebkitFontVariantLigatures","MSFontVariantLigatures","OFontVariantLigatures","fontVariantNumeric","MozFontVariantNumeric","WebkitFontVariantNumeric","MSFontVariantNumeric","OFontVariantNumeric","fontVariantPosition","MozFontVariantPosition","WebkitFontVariantPosition","MSFontVariantPosition","OFontVariantPosition","fontWeight","MozFontWeight","WebkitFontWeight","MSFontWeight","OFontWeight","fr","MozFr","WebkitFr","MSFr","OFr","grad","MozGrad","WebkitGrad","MSGrad","OGrad","grid","MozGrid","WebkitGrid","MSGrid","OGrid","gridArea","MozGridArea","WebkitGridArea","MSGridArea","OGridArea","gridAutoColumns","MozGridAutoColumns","WebkitGridAutoColumns","MSGridAutoColumns","OGridAutoColumns","gridAutoFlow","MozGridAutoFlow","WebkitGridAutoFlow","MSGridAutoFlow","OGridAutoFlow","gridAutoRows","MozGridAutoRows","WebkitGridAutoRows","MSGridAutoRows","OGridAutoRows","gridColumn","MozGridColumn","WebkitGridColumn","MSGridColumn","OGridColumn","gridColumnEnd","MozGridColumnEnd","WebkitGridColumnEnd","MSGridColumnEnd","OGridColumnEnd","gridColumnGap","MozGridColumnGap","WebkitGridColumnGap","MSGridColumnGap","OGridColumnGap","gridColumnStart","MozGridColumnStart","WebkitGridColumnStart","MSGridColumnStart","OGridColumnStart","gridGap","MozGridGap","WebkitGridGap","MSGridGap","OGridGap","gridRow","MozGridRow","WebkitGridRow","MSGridRow","OGridRow","gridRowEnd","MozGridRowEnd","WebkitGridRowEnd","MSGridRowEnd","OGridRowEnd","gridRowGap","MozGridRowGap","WebkitGridRowGap","MSGridRowGap","OGridRowGap","gridRowStart","MozGridRowStart","WebkitGridRowStart","MSGridRowStart","OGridRowStart","gridTemplate","MozGridTemplate","WebkitGridTemplate","MSGridTemplate","OGridTemplate","gridTemplateAreas","MozGridTemplateAreas","WebkitGridTemplateAreas","MSGridTemplateAreas","OGridTemplateAreas","gridTemplateColumns","MozGridTemplateColumns","WebkitGridTemplateColumns","MSGridTemplateColumns","OGridTemplateColumns","gridTemplateRows","MozGridTemplateRows","WebkitGridTemplateRows","MSGridTemplateRows","OGridTemplateRows","height","MozHeight","WebkitHeight","MSHeight","OHeight","hyphens","MozHyphens","WebkitHyphens","MSHyphens","OHyphens","hz","MozHz","WebkitHz","MSHz","OHz","imageOrientation","MozImageOrientation","WebkitImageOrientation","MSImageOrientation","OImageOrientation","imageRendering","MozImageRendering","WebkitImageRendering","MSImageRendering","OImageRendering","imageResolution","MozImageResolution","WebkitImageResolution","MSImageResolution","OImageResolution","imeMode","MozImeMode","WebkitImeMode","MSImeMode","OImeMode","in","MozIn","WebkitIn","MSIn","OIn","inherit","MozInherit","WebkitInherit","MSInherit","OInherit","initial","MozInitial","WebkitInitial","MSInitial","OInitial","inlineSize","MozInlineSize","WebkitInlineSize","MSInlineSize","OInlineSize","isolation","MozIsolation","WebkitIsolation","MSIsolation","OIsolation","justifyContent","MozJustifyContent","WebkitJustifyContent","MSJustifyContent","OJustifyContent","khz","MozKhz","WebkitKhz","MSKhz","OKhz","left","MozLeft","WebkitLeft","MSLeft","OLeft","letterSpacing","MozLetterSpacing","WebkitLetterSpacing","MSLetterSpacing","OLetterSpacing","lineBreak","MozLineBreak","WebkitLineBreak","MSLineBreak","OLineBreak","lineHeight","MozLineHeight","WebkitLineHeight","MSLineHeight","OLineHeight","listStyle","MozListStyle","WebkitListStyle","MSListStyle","OListStyle","listStyleImage","MozListStyleImage","WebkitListStyleImage","MSListStyleImage","OListStyleImage","listStylePosition","MozListStylePosition","WebkitListStylePosition","MSListStylePosition","OListStylePosition","listStyleType","MozListStyleType","WebkitListStyleType","MSListStyleType","OListStyleType","margin","MozMargin","WebkitMargin","MSMargin","OMargin","marginBlockEnd","MozMarginBlockEnd","WebkitMarginBlockEnd","MSMarginBlockEnd","OMarginBlockEnd","marginBlockStart","MozMarginBlockStart","WebkitMarginBlockStart","MSMarginBlockStart","OMarginBlockStart","marginBottom","MozMarginBottom","WebkitMarginBottom","MSMarginBottom","OMarginBottom","marginInlineEnd","MozMarginInlineEnd","WebkitMarginInlineEnd","MSMarginInlineEnd","OMarginInlineEnd","marginInlineStart","MozMarginInlineStart","WebkitMarginInlineStart","MSMarginInlineStart","OMarginInlineStart","marginLeft","MozMarginLeft","WebkitMarginLeft","MSMarginLeft","OMarginLeft","marginRight","MozMarginRight","WebkitMarginRight","MSMarginRight","OMarginRight","marginTop","MozMarginTop","WebkitMarginTop","MSMarginTop","OMarginTop","mask","MozMask","WebkitMask","MSMask","OMask","maskClip","MozMaskClip","WebkitMaskClip","MSMaskClip","OMaskClip","maskComposite","MozMaskComposite","WebkitMaskComposite","MSMaskComposite","OMaskComposite","maskImage","MozMaskImage","WebkitMaskImage","MSMaskImage","OMaskImage","maskMode","MozMaskMode","WebkitMaskMode","MSMaskMode","OMaskMode","maskOrigin","MozMaskOrigin","WebkitMaskOrigin","MSMaskOrigin","OMaskOrigin","maskPosition","MozMaskPosition","WebkitMaskPosition","MSMaskPosition","OMaskPosition","maskRepeat","MozMaskRepeat","WebkitMaskRepeat","MSMaskRepeat","OMaskRepeat","maskSize","MozMaskSize","WebkitMaskSize","MSMaskSize","OMaskSize","maskType","MozMaskType","WebkitMaskType","MSMaskType","OMaskType","maxHeight","MozMaxHeight","WebkitMaxHeight","MSMaxHeight","OMaxHeight","maxWidth","MozMaxWidth","WebkitMaxWidth","MSMaxWidth","OMaxWidth","minBlockSize","MozMinBlockSize","WebkitMinBlockSize","MSMinBlockSize","OMinBlockSize","minHeight","MozMinHeight","WebkitMinHeight","MSMinHeight","OMinHeight","minInlineSize","MozMinInlineSize","WebkitMinInlineSize","MSMinInlineSize","OMinInlineSize","minWidth","MozMinWidth","WebkitMinWidth","MSMinWidth","OMinWidth","mixBlendMode","MozMixBlendMode","WebkitMixBlendMode","MSMixBlendMode","OMixBlendMode","mm","MozMm","WebkitMm","MSMm","OMm","ms","MozMs","WebkitMs","MSMs","OMs","objectFit","MozObjectFit","WebkitObjectFit","MSObjectFit","OObjectFit","objectPosition","MozObjectPosition","WebkitObjectPosition","MSObjectPosition","OObjectPosition","offsetBlockEnd","MozOffsetBlockEnd","WebkitOffsetBlockEnd","MSOffsetBlockEnd","OOffsetBlockEnd","offsetBlockStart","MozOffsetBlockStart","WebkitOffsetBlockStart","MSOffsetBlockStart","OOffsetBlockStart","offsetInlineEnd","MozOffsetInlineEnd","WebkitOffsetInlineEnd","MSOffsetInlineEnd","OOffsetInlineEnd","offsetInlineStart","MozOffsetInlineStart","WebkitOffsetInlineStart","MSOffsetInlineStart","OOffsetInlineStart","opacity","MozOpacity","WebkitOpacity","MSOpacity","OOpacity","order","MozOrder","WebkitOrder","MSOrder","OOrder","orphans","MozOrphans","WebkitOrphans","MSOrphans","OOrphans","outline","MozOutline","WebkitOutline","MSOutline","OOutline","outlineColor","MozOutlineColor","WebkitOutlineColor","MSOutlineColor","OOutlineColor","outlineOffset","MozOutlineOffset","WebkitOutlineOffset","MSOutlineOffset","OOutlineOffset","outlineStyle","MozOutlineStyle","WebkitOutlineStyle","MSOutlineStyle","OOutlineStyle","outlineWidth","MozOutlineWidth","WebkitOutlineWidth","MSOutlineWidth","OOutlineWidth","overflow","MozOverflow","WebkitOverflow","MSOverflow","OOverflow","overflowWrap","MozOverflowWrap","WebkitOverflowWrap","MSOverflowWrap","OOverflowWrap","overflowX","MozOverflowX","WebkitOverflowX","MSOverflowX","OOverflowX","overflowY","MozOverflowY","WebkitOverflowY","MSOverflowY","OOverflowY","padding","MozPadding","WebkitPadding","MSPadding","OPadding","paddingBlockEnd","MozPaddingBlockEnd","WebkitPaddingBlockEnd","MSPaddingBlockEnd","OPaddingBlockEnd","paddingBlockStart","MozPaddingBlockStart","WebkitPaddingBlockStart","MSPaddingBlockStart","OPaddingBlockStart","paddingBottom","MozPaddingBottom","WebkitPaddingBottom","MSPaddingBottom","OPaddingBottom","paddingInlineEnd","MozPaddingInlineEnd","WebkitPaddingInlineEnd","MSPaddingInlineEnd","OPaddingInlineEnd","paddingInlineStart","MozPaddingInlineStart","WebkitPaddingInlineStart","MSPaddingInlineStart","OPaddingInlineStart","paddingLeft","MozPaddingLeft","WebkitPaddingLeft","MSPaddingLeft","OPaddingLeft","paddingRight","MozPaddingRight","WebkitPaddingRight","MSPaddingRight","OPaddingRight","paddingTop","MozPaddingTop","WebkitPaddingTop","MSPaddingTop","OPaddingTop","pageBreakAfter","MozPageBreakAfter","WebkitPageBreakAfter","MSPageBreakAfter","OPageBreakAfter","pageBreakBefore","MozPageBreakBefore","WebkitPageBreakBefore","MSPageBreakBefore","OPageBreakBefore","pageBreakInside","MozPageBreakInside","WebkitPageBreakInside","MSPageBreakInside","OPageBreakInside","pc","MozPc","WebkitPc","MSPc","OPc","perspective","MozPerspective","WebkitPerspective","MSPerspective","OPerspective","perspectiveOrigin","MozPerspectiveOrigin","WebkitPerspectiveOrigin","MSPerspectiveOrigin","OPerspectiveOrigin","pointerEvents","MozPointerEvents","WebkitPointerEvents","MSPointerEvents","OPointerEvents","position","MozPosition","WebkitPosition","MSPosition","OPosition","pt","MozPt","WebkitPt","MSPt","OPt","px","MozPx","WebkitPx","MSPx","OPx","q","MozQ","WebkitQ","MSQ","OQ","quotes","MozQuotes","WebkitQuotes","MSQuotes","OQuotes","rad","MozRad","WebkitRad","MSRad","ORad","rem","MozRem","WebkitRem","MSRem","ORem","resize","MozResize","WebkitResize","MSResize","OResize","revert","MozRevert","WebkitRevert","MSRevert","ORevert","right","MozRight","WebkitRight","MSRight","ORight","rubyAlign","MozRubyAlign","WebkitRubyAlign","MSRubyAlign","ORubyAlign","rubyMerge","MozRubyMerge","WebkitRubyMerge","MSRubyMerge","ORubyMerge","rubyPosition","MozRubyPosition","WebkitRubyPosition","MSRubyPosition","ORubyPosition","s","MozS","WebkitS","MSS","OS","scrollBehavior","MozScrollBehavior","WebkitScrollBehavior","MSScrollBehavior","OScrollBehavior","scrollSnapCoordinate","MozScrollSnapCoordinate","WebkitScrollSnapCoordinate","MSScrollSnapCoordinate","OScrollSnapCoordinate","scrollSnapDestination","MozScrollSnapDestination","WebkitScrollSnapDestination","MSScrollSnapDestination","OScrollSnapDestination","scrollSnapType","MozScrollSnapType","WebkitScrollSnapType","MSScrollSnapType","OScrollSnapType","shapeImageThreshold","MozShapeImageThreshold","WebkitShapeImageThreshold","MSShapeImageThreshold","OShapeImageThreshold","shapeMargin","MozShapeMargin","WebkitShapeMargin","MSShapeMargin","OShapeMargin","shapeOutside","MozShapeOutside","WebkitShapeOutside","MSShapeOutside","OShapeOutside","tabSize","MozTabSize","WebkitTabSize","MSTabSize","OTabSize","tableLayout","MozTableLayout","WebkitTableLayout","MSTableLayout","OTableLayout","textAlign","MozTextAlign","WebkitTextAlign","MSTextAlign","OTextAlign","textAlignLast","MozTextAlignLast","WebkitTextAlignLast","MSTextAlignLast","OTextAlignLast","textCombineUpright","MozTextCombineUpright","WebkitTextCombineUpright","MSTextCombineUpright","OTextCombineUpright","textDecoration","MozTextDecoration","WebkitTextDecoration","MSTextDecoration","OTextDecoration","textDecorationColor","MozTextDecorationColor","WebkitTextDecorationColor","MSTextDecorationColor","OTextDecorationColor","textDecorationLine","MozTextDecorationLine","WebkitTextDecorationLine","MSTextDecorationLine","OTextDecorationLine","textDecorationStyle","MozTextDecorationStyle","WebkitTextDecorationStyle","MSTextDecorationStyle","OTextDecorationStyle","textEmphasis","MozTextEmphasis","WebkitTextEmphasis","MSTextEmphasis","OTextEmphasis","textEmphasisColor","MozTextEmphasisColor","WebkitTextEmphasisColor","MSTextEmphasisColor","OTextEmphasisColor","textEmphasisPosition","MozTextEmphasisPosition","WebkitTextEmphasisPosition","MSTextEmphasisPosition","OTextEmphasisPosition","textEmphasisStyle","MozTextEmphasisStyle","WebkitTextEmphasisStyle","MSTextEmphasisStyle","OTextEmphasisStyle","textIndent","MozTextIndent","WebkitTextIndent","MSTextIndent","OTextIndent","textOrientation","MozTextOrientation","WebkitTextOrientation","MSTextOrientation","OTextOrientation","textOverflow","MozTextOverflow","WebkitTextOverflow","MSTextOverflow","OTextOverflow","textRendering","MozTextRendering","WebkitTextRendering","MSTextRendering","OTextRendering","textShadow","MozTextShadow","WebkitTextShadow","MSTextShadow","OTextShadow","textTransform","MozTextTransform","WebkitTextTransform","MSTextTransform","OTextTransform","textUnderlinePosition","MozTextUnderlinePosition","WebkitTextUnderlinePosition","MSTextUnderlinePosition","OTextUnderlinePosition","top","MozTop","WebkitTop","MSTop","OTop","touchAction","MozTouchAction","WebkitTouchAction","MSTouchAction","OTouchAction","transform","MozTransform","WebkitTransform","msTransform","OTransform","transformBox","MozTransformBox","WebkitTransformBox","MSTransformBox","OTransformBox","transformOrigin","MozTransformOrigin","WebkitTransformOrigin","MSTransformOrigin","OTransformOrigin","transformStyle","MozTransformStyle","WebkitTransformStyle","MSTransformStyle","OTransformStyle","transition","MozTransition","WebkitTransition","MSTransition","OTransition","transitionDelay","MozTransitionDelay","WebkitTransitionDelay","MSTransitionDelay","OTransitionDelay","transitionDuration","MozTransitionDuration","WebkitTransitionDuration","MSTransitionDuration","OTransitionDuration","transitionProperty","MozTransitionProperty","WebkitTransitionProperty","MSTransitionProperty","OTransitionProperty","transitionTimingFunction","MozTransitionTimingFunction","WebkitTransitionTimingFunction","MSTransitionTimingFunction","OTransitionTimingFunction","turn","MozTurn","WebkitTurn","MSTurn","OTurn","unicodeBidi","MozUnicodeBidi","WebkitUnicodeBidi","MSUnicodeBidi","OUnicodeBidi","unset","MozUnset","WebkitUnset","MSUnset","OUnset","verticalAlign","MozVerticalAlign","WebkitVerticalAlign","MSVerticalAlign","OVerticalAlign","vh","MozVh","WebkitVh","MSVh","OVh","visibility","MozVisibility","WebkitVisibility","MSVisibility","OVisibility","vmax","MozVmax","WebkitVmax","MSVmax","OVmax","vmin","MozVmin","WebkitVmin","MSVmin","OVmin","vw","MozVw","WebkitVw","MSVw","OVw","whiteSpace","MozWhiteSpace","WebkitWhiteSpace","MSWhiteSpace","OWhiteSpace","widows","MozWidows","WebkitWidows","MSWidows","OWidows","width","MozWidth","WebkitWidth","MSWidth","OWidth","willChange","MozWillChange","WebkitWillChange","MSWillChange","OWillChange","wordBreak","MozWordBreak","WebkitWordBreak","MSWordBreak","OWordBreak","wordSpacing","MozWordSpacing","WebkitWordSpacing","MSWordSpacing","OWordSpacing","wordWrap","MozWordWrap","WebkitWordWrap","MSWordWrap","OWordWrap","writingMode","MozWritingMode","WebkitWritingMode","MSWritingMode","OWritingMode","zIndex","MozZIndex","WebkitZIndex","MSZIndex","OZIndex","fontSize","MozFontSize","WebkitFontSize","MSFontSize","OFontSize","flex","MozFlex","WebkitFlex","MSFlex","OFlex","fr","MozFr","WebkitFr","MSFr","OFr","overflowScrolling","MozOverflowScrolling","WebkitOverflowScrolling","MSOverflowScrolling","OOverflowScrolling","userSelect","MozUserSelect","WebkitUserSelect","MSUserSelect","OUserSelect"]},21564:(e,t,n)=>{var r=n(45571),o=n(61240);e.exports=function(e,t,n){var o=e[t];if(o){var i=[];if(Object.keys(o).forEach((function(e){-1===r.indexOf(e)&&i.push(e)})),i.length)throw new Error("Prop "+t+" passed to "+n+". Has invalid keys "+i.join(", "))}},e.exports.isRequired=function(t,n,r){if(!t[n])throw new Error("Prop "+n+" passed to "+r+" is required");return e.exports(t,n,r)},e.exports.supportingArrays=o.oneOfType([o.arrayOf(e.exports),e.exports])}}]);
//# sourceMappingURL=DashboardPage.2287492068e7ca04d625.js.map