diff --git a/view/assets/AddOutlined-e29fe36c.js b/view/assets/AddOutlined-d979d573.js similarity index 95% rename from view/assets/AddOutlined-e29fe36c.js rename to view/assets/AddOutlined-d979d573.js index 719bb4f1..d6391ba9 100644 --- a/view/assets/AddOutlined-e29fe36c.js +++ b/view/assets/AddOutlined-d979d573.js @@ -1 +1 @@ -import{i as t,d as i,j as g,D as u}from"./index-89b5df7a.js";import{B as f}from"./DeleteOutlineOutlined-ca5edd1c.js";import{r as m,i as h}from"./createSvgIcon-2dba4d94.js";import{j as b}from"./reactDnd-30d7bbb0.js";const T=t("div",{target:"e1m1j6jk11"})("overflow-x:hidden;border-radius:3px;background:",({theme:e})=>e.background,";color:",({theme:e})=>e.contrast,";width:100%;height:100%;overflow-y:auto;display:flex;flex:1;flex-direction:column;height:100%;align-items:center;.cont{max-width:1440px;padding:10px;margin:10px;width:100%;background:",({theme:e})=>e.shadow,";display:flex;flex-direction:column;flex:1;overflow-x:hidden;}.ds-header{padding:10px;padding-bottom:20px;font-size:24px;display:flex;margin:10px;justify-content:space-between;align-items:center;padding-left:0px;.logo{margin-right:10px;}}.ds-cont{margin-bottom:10px;border:1px solid ",({theme:e})=>e.accentNeutral,";border-radius:3px;color:",({theme:e})=>e.contrast,";}.ds-item{padding:10px;border-radius:3px 3px 0px 0px;padding-bottom:14px;display:flex;color:",({theme:e})=>e.contrast,";.logo{padding:10px;padding-right:20px;padding-left:0px;}.ds-text{display:flex;flex-direction:column;flex:1;}.ds-type{font-size:18px;padding:10px;padding-left:0px;color:",({theme:e})=>e.contrast,";}small{font-size:12px;}.setting-icon{justify-self:flex-end;cursor:pointer;}.ds-settings{background:",({theme:e})=>e.background,";}}.plugins-cont{display:flex;flex:1;margin:0px 10px;flex-direction:column;padding:10px 20px;border:1px solid ",({theme:e})=>e.accentNeutral,";border-radius:3px;height:fit-content;.title{font-size:14px;padding:10px 0px;}}"),y=t("div",{target:"e1m1j6jk10"})("color:",({theme:e})=>e.contrast,";display:flex;align-items:center;font-size:12px;padding:0px 10px;white-space:nowrap;",e=>e.width!==null?`width:${e.width}px;`:""," border-radius:3px 0px 0px 3px;display:flex;align-items:center;height:28px;"),j=t("input",{target:"e1m1j6jk9"})("display:flex;flex:1;background:",({theme:e})=>e.deep,";color:",({theme:e})=>e.contrast,";border:1px solid ",e=>e.error?"#b62c14":e.theme.accentNeutral,";border-radius:3px;justify-self:flex-end;height:26px;padding-left:8px;"),E=t("textarea",{target:"e1m1j6jk8"})("display:flex;flex:1;background:",({theme:e})=>e.deep,";color:",({theme:e})=>e.contrast,";border:1px solid ",({theme:e})=>e.accentNeutral,";border-radius:3px;justify-self:flex-end;padding-left:8px;"),w=t("div",{target:"e1m1j6jk7"})("display:flex;flex-direction:row;margin-top:5px;align-items:center;",e=>e!=null&&e.width&&(e==null?void 0:e.width)==="normal"?"":"flex:1;","select{background:",({theme:e})=>e.deep,";color:",({theme:e})=>e.contrast,";border:1px solid ",({theme:e})=>e.accentNeutral,";border-radius:3px;font-size:12px;height:30px;display:flex;align-items:center;padding:1px 2px 1px 8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;option{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}}"),L=t("div",{target:"e1m1j6jk6"})({name:"1uek1ww",styles:"display:flex;margin:15px 0px;margin-left:14px;flex-wrap:wrap;align-items:center;flex:1;&.internal{max-width:400px;}"}),P=t("div",{target:"e1m1j6jk4"})({name:"e23o9g",styles:"padding:10px"}),q=t("div",{target:"e1m1j6jk3"})("margin:10px 0px;padding-bottom:10px;border-bottom:1px solid ",({theme:e})=>e.background,";"),B=t("div",{target:"e1m1j6jk2"})("padding:10px;border-bottom:1px solid ",({theme:e})=>e.shadow,";border-radius:3px;display:flex;flex:1;align-items:center;justify-content:space-between;.edit-buttons{display:flex;align-items:center;&:disabled{display:none;}}"),F=t("div",{target:"e1m1j6jk1"})("background:",({theme:e})=>e.deep,";padding:10px;border-radius:0px 0px 3px 3px;border-top:1px solid ",({theme:e})=>e.accentNeutral,";"),M=t(f,{target:"e1m1j6jk0"})("background:",e=>e.primary?e.theme.primary:e.theme.neutral,";border:1px solid ",({theme:e})=>e.accentNeutral,";color:",e=>e.primary?e.theme.maxContrast:e.theme.contrast,";margin-left:5px;transition:0.25s all;justify-content:center;padding:3px 12px;height:28px;display:flex;&:hover{background:",({theme:e})=>e.primaryLight,";color:",e=>e.primary?e.theme.contrast:e.theme.maxContrast,";}&:disabled{background:",({theme:e})=>e.neutral,";border:1px solid ",({theme:e})=>e.accentNeutral,";cursor:not-allowed;color:",({theme:e})=>e.contrast,";}@media screen and (max-width: 1070px){display:flex;margin:0;}"),v="/assets/metrics_icon-9cba0731.png",n="/assets/logs_icon-972f9506.png",k="/assets/traces_icon-a9ed0318.png",_={metrics_icon:v,logs_icon:n,traces_icon:k},G=({icon:e,style:a})=>i("img",{height:"40px",className:"logo",style:a,src:_[e]||n,alt:e}),H=e=>{const{value:a,label:d,onChange:o,locked:l,type:s,placeholder:p,error:x,labelWidth:c}=e;return g(w,{children:[i(y,{width:c||null,children:d}),i(j,{className:"ds-input",disabled:l,error:x||!1,onChange:o,type:s,value:u.sanitize(a),placeholder:p})]})},U=e=>a=>{a({type:"SET_DATA_SOURCES",dataSources:e})};var r={},S=h;Object.defineProperty(r,"__esModule",{value:!0});var N=r.default=void 0,C=S(m()),D=b,I=(0,C.default)((0,D.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"AddOutlined");N=r.default=I;export{M as D,H as F,w as I,y as L,T as P,B as S,E as T,L as a,q as b,P as c,N as d,G as e,F as f,U as s}; +import{i as t,d as i,j as g,D as u}from"./index-cb8d8b59.js";import{B as f}from"./DeleteOutlineOutlined-2068af5e.js";import{r as m,i as h}from"./createSvgIcon-b45af2a3.js";import{j as b}from"./reactDnd-72acd3f4.js";const T=t("div",{target:"e1m1j6jk11"})("overflow-x:hidden;border-radius:3px;background:",({theme:e})=>e.background,";color:",({theme:e})=>e.contrast,";width:100%;height:100%;overflow-y:auto;display:flex;flex:1;flex-direction:column;height:100%;align-items:center;.cont{max-width:1440px;padding:10px;margin:10px;width:100%;background:",({theme:e})=>e.shadow,";display:flex;flex-direction:column;flex:1;overflow-x:hidden;}.ds-header{padding:10px;padding-bottom:20px;font-size:24px;display:flex;margin:10px;justify-content:space-between;align-items:center;padding-left:0px;.logo{margin-right:10px;}}.ds-cont{margin-bottom:10px;border:1px solid ",({theme:e})=>e.accentNeutral,";border-radius:3px;color:",({theme:e})=>e.contrast,";}.ds-item{padding:10px;border-radius:3px 3px 0px 0px;padding-bottom:14px;display:flex;color:",({theme:e})=>e.contrast,";.logo{padding:10px;padding-right:20px;padding-left:0px;}.ds-text{display:flex;flex-direction:column;flex:1;}.ds-type{font-size:18px;padding:10px;padding-left:0px;color:",({theme:e})=>e.contrast,";}small{font-size:12px;}.setting-icon{justify-self:flex-end;cursor:pointer;}.ds-settings{background:",({theme:e})=>e.background,";}}.plugins-cont{display:flex;flex:1;margin:0px 10px;flex-direction:column;padding:10px 20px;border:1px solid ",({theme:e})=>e.accentNeutral,";border-radius:3px;height:fit-content;.title{font-size:14px;padding:10px 0px;}}"),y=t("div",{target:"e1m1j6jk10"})("color:",({theme:e})=>e.contrast,";display:flex;align-items:center;font-size:12px;padding:0px 10px;white-space:nowrap;",e=>e.width!==null?`width:${e.width}px;`:""," border-radius:3px 0px 0px 3px;display:flex;align-items:center;height:28px;"),j=t("input",{target:"e1m1j6jk9"})("display:flex;flex:1;background:",({theme:e})=>e.deep,";color:",({theme:e})=>e.contrast,";border:1px solid ",e=>e.error?"#b62c14":e.theme.accentNeutral,";border-radius:3px;justify-self:flex-end;height:26px;padding-left:8px;"),E=t("textarea",{target:"e1m1j6jk8"})("display:flex;flex:1;background:",({theme:e})=>e.deep,";color:",({theme:e})=>e.contrast,";border:1px solid ",({theme:e})=>e.accentNeutral,";border-radius:3px;justify-self:flex-end;padding-left:8px;"),w=t("div",{target:"e1m1j6jk7"})("display:flex;flex-direction:row;margin-top:5px;align-items:center;",e=>e!=null&&e.width&&(e==null?void 0:e.width)==="normal"?"":"flex:1;","select{background:",({theme:e})=>e.deep,";color:",({theme:e})=>e.contrast,";border:1px solid ",({theme:e})=>e.accentNeutral,";border-radius:3px;font-size:12px;height:30px;display:flex;align-items:center;padding:1px 2px 1px 8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;option{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}}"),L=t("div",{target:"e1m1j6jk6"})({name:"1uek1ww",styles:"display:flex;margin:15px 0px;margin-left:14px;flex-wrap:wrap;align-items:center;flex:1;&.internal{max-width:400px;}"}),P=t("div",{target:"e1m1j6jk4"})({name:"e23o9g",styles:"padding:10px"}),q=t("div",{target:"e1m1j6jk3"})("margin:10px 0px;padding-bottom:10px;border-bottom:1px solid ",({theme:e})=>e.background,";"),B=t("div",{target:"e1m1j6jk2"})("padding:10px;border-bottom:1px solid ",({theme:e})=>e.shadow,";border-radius:3px;display:flex;flex:1;align-items:center;justify-content:space-between;.edit-buttons{display:flex;align-items:center;&:disabled{display:none;}}"),F=t("div",{target:"e1m1j6jk1"})("background:",({theme:e})=>e.deep,";padding:10px;border-radius:0px 0px 3px 3px;border-top:1px solid ",({theme:e})=>e.accentNeutral,";"),M=t(f,{target:"e1m1j6jk0"})("background:",e=>e.primary?e.theme.primary:e.theme.neutral,";border:1px solid ",({theme:e})=>e.accentNeutral,";color:",e=>e.primary?e.theme.maxContrast:e.theme.contrast,";margin-left:5px;transition:0.25s all;justify-content:center;padding:3px 12px;height:28px;display:flex;&:hover{background:",({theme:e})=>e.primaryLight,";color:",e=>e.primary?e.theme.contrast:e.theme.maxContrast,";}&:disabled{background:",({theme:e})=>e.neutral,";border:1px solid ",({theme:e})=>e.accentNeutral,";cursor:not-allowed;color:",({theme:e})=>e.contrast,";}@media screen and (max-width: 1070px){display:flex;margin:0;}"),v="/assets/metrics_icon-9cba0731.png",n="/assets/logs_icon-972f9506.png",k="/assets/traces_icon-a9ed0318.png",_={metrics_icon:v,logs_icon:n,traces_icon:k},G=({icon:e,style:a})=>i("img",{height:"40px",className:"logo",style:a,src:_[e]||n,alt:e}),H=e=>{const{value:a,label:d,onChange:o,locked:l,type:s,placeholder:p,error:x,labelWidth:c}=e;return g(w,{children:[i(y,{width:c||null,children:d}),i(j,{className:"ds-input",disabled:l,error:x||!1,onChange:o,type:s,value:u.sanitize(a),placeholder:p})]})},U=e=>a=>{a({type:"SET_DATA_SOURCES",dataSources:e})};var r={},S=h;Object.defineProperty(r,"__esModule",{value:!0});var N=r.default=void 0,C=S(m()),D=b,I=(0,C.default)((0,D.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"AddOutlined");N=r.default=I;export{M as D,H as F,w as I,y as L,T as P,B as S,E as T,L as a,q as b,P as c,N as d,G as e,F as f,U as s}; diff --git a/view/assets/App-b0375afd.js b/view/assets/App-b0375afd.js new file mode 100644 index 00000000..7b9faf14 --- /dev/null +++ b/view/assets/App-b0375afd.js @@ -0,0 +1 @@ +import{s as I,a as K,u as Q,c as Y,b as J,l as X,j as p,d as i,e as D,f as w,F as H,g as O,h as P,N as Z}from"./index-cb8d8b59.js";import{g as ee,d as te,M as g,s as re,a as j,n as L,T as ie,B as ae,b as oe,F as ne,c as se,e as le,P as ce,S as de}from"./consts-e7fba829.js";import{r as _,R as pe}from"./react-432945ee.js";import{r as m,i as x}from"./createSvgIcon-b45af2a3.js";import{j as v}from"./reactDnd-72acd3f4.js";import{a as u,d as ue,m as T,u as C,L as $,q as he,O as ve}from"./vendor-6029fc34.js";import"./reactSelect-75171a09.js";import"./memoize-acaceb73.js";import"./PluginManagerFactory-a0a578f6.js";import"./DeleteOutlineOutlined-2068af5e.js";const fe=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],ge=e=>{const{absolute:t,children:r,classes:o,flexItem:n,light:l,orientation:s,textAlign:a,variant:h}=e;return J({root:["root",t&&"absolute",h,l&&"light",s==="vertical"&&"vertical",n&&"flexItem",r&&"withChildren",r&&s==="vertical"&&"withChildrenVertical",a==="right"&&s!=="vertical"&&"textAlignRight",a==="left"&&s!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",s==="vertical"&&"wrapperVertical"]},ee,o)},me=I("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.absolute&&t.absolute,t[r.variant],r.light&&t.light,r.orientation==="vertical"&&t.vertical,r.flexItem&&t.flexItem,r.children&&t.withChildren,r.children&&r.orientation==="vertical"&&t.withChildrenVertical,r.textAlign==="right"&&r.orientation!=="vertical"&&t.textAlignRight,r.textAlign==="left"&&r.orientation!=="vertical"&&t.textAlignLeft]}})(({theme:e,ownerState:t})=>u({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin"},t.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},t.light&&{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:K(e.palette.divider,.08)},t.variant==="inset"&&{marginLeft:72},t.variant==="middle"&&t.orientation==="horizontal"&&{marginLeft:e.spacing(2),marginRight:e.spacing(2)},t.variant==="middle"&&t.orientation==="vertical"&&{marginTop:e.spacing(1),marginBottom:e.spacing(1)},t.orientation==="vertical"&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},t.flexItem&&{alignSelf:"stretch",height:"auto"}),({ownerState:e})=>u({},e.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,"&::before, &::after":{content:'""',alignSelf:"center"}}),({theme:e,ownerState:t})=>u({},t.children&&t.orientation!=="vertical"&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`}}),({theme:e,ownerState:t})=>u({},t.children&&t.orientation==="vertical"&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`}}),({ownerState:e})=>u({},e.textAlign==="right"&&e.orientation!=="vertical"&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},e.textAlign==="left"&&e.orientation!=="vertical"&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),xe=I("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.wrapper,r.orientation==="vertical"&&t.wrapperVertical]}})(({theme:e,ownerState:t})=>u({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`},t.orientation==="vertical"&&{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`})),V=_.forwardRef(function(t,r){const o=Q({props:t,name:"MuiDivider"}),{absolute:n=!1,children:l,className:s,component:a=l?"div":"hr",flexItem:h=!1,light:f=!1,orientation:c="horizontal",role:b=a!=="hr"?"separator":void 0,textAlign:d="center",variant:F="fullWidth"}=o,G=ue(o,fe),S=u({},o,{absolute:n,component:a,flexItem:h,light:f,orientation:c,role:b,textAlign:d,variant:F}),z=ge(S);return v.jsx(me,u({as:a,className:Y(z.root,s),role:b,ref:r,ownerState:S},G,{children:l?v.jsx(xe,{className:z.wrapper,ownerState:S,children:l}):null}))});V.muiSkipListHighlight=!0;const A=V;var y={},be=x;Object.defineProperty(y,"__esModule",{value:!0});var E=y.default=void 0,$e=be(m()),_e=v,Se=(0,$e.default)((0,_e.jsx)("path",{d:"M19.3 16.9c.4-.7.7-1.5.7-2.4 0-2.5-2-4.5-4.5-4.5S11 12 11 14.5s2 4.5 4.5 4.5c.9 0 1.7-.3 2.4-.7l3.2 3.2 1.4-1.4-3.2-3.2zm-3.8.1c-1.4 0-2.5-1.1-2.5-2.5s1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5-1.1 2.5-2.5 2.5zM12 20v2C6.48 22 2 17.52 2 12S6.48 2 12 2c4.84 0 8.87 3.44 9.8 8h-2.07c-.64-2.46-2.4-4.47-4.73-5.41V5c0 1.1-.9 2-2 2h-2v2c0 .55-.45 1-1 1H8v2h2v3H9l-4.79-4.79C4.08 10.79 4 11.38 4 12c0 4.41 3.59 8 8 8z"}),"TravelExplore");E=y.default=Se;var N={},Ce=x;Object.defineProperty(N,"__esModule",{value:!0});var B=N.default=void 0,we=Ce(m()),ye=v,Ne=(0,we.default)((0,ye.jsx)("path",{d:"M20.5 11H19V7c0-1.1-.9-2-2-2h-4V3.5C13 2.12 11.88 1 10.5 1S8 2.12 8 3.5V5H4c-1.1 0-1.99.9-1.99 2v3.8H3.5c1.49 0 2.7 1.21 2.7 2.7s-1.21 2.7-2.7 2.7H2V20c0 1.1.9 2 2 2h3.8v-1.5c0-1.49 1.21-2.7 2.7-2.7 1.49 0 2.7 1.21 2.7 2.7V22H17c1.1 0 2-.9 2-2v-4h1.5c1.38 0 2.5-1.12 2.5-2.5S21.88 11 20.5 11z"}),"Extension");B=N.default=Ne;var R={},Re=x;Object.defineProperty(R,"__esModule",{value:!0});var U=R.default=void 0,Me=Re(m()),ke=v,ze=(0,Me.default)((0,ke.jsx)("path",{d:"M12 5.9c1.16 0 2.1.94 2.1 2.1s-.94 2.1-2.1 2.1S9.9 9.16 9.9 8s.94-2.1 2.1-2.1m0 9c2.97 0 6.1 1.46 6.1 2.1v1.1H5.9V17c0-.64 3.13-2.1 6.1-2.1M12 4C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4z"}),"PersonOutlineOutlined");U=R.default=ze;var M={},De=x;Object.defineProperty(M,"__esModule",{value:!0});var q=M.default=void 0,je=De(m()),Le=v,Ae=(0,je.default)((0,Le.jsx)("path",{d:"M2 20h20v-4H2v4zm2-3h2v2H4v-2zM2 4v4h20V4H2zm4 3H4V5h2v2zm-4 7h20v-4H2v4zm2-3h2v2H4v-2z"}),"Storage");q=M.default=Ae;function Ie(e){const{c:t}=e,r=T(),o=X(),n="Link Copied To Clipboard";function l(){r(re(!0)),setTimeout(()=>{var s;if(navigator!=null&&navigator.clipboard&&window.isSecureContext)(s=navigator==null?void 0:navigator.clipboard)==null||s.writeText(window.location.href).then(function(){const a=o.add({data:window.location.href,description:"From Shared URL"},10);r(j(a)),r(D({type:L.success,message:n}))},function(a){console.log("error on copy",a)});else{let a=document.createElement("textarea");return a.value=window.location.href,a.style.position="fixed",a.style.left="-999999px",a.style.top="-999999px",document.body.appendChild(a),a.focus(),a.select(),new Promise((h,f)=>{const c=o.add({data:window.location.href,description:"From Shared URL"},10);r(j(c)),document.execCommand("copy")?h():f(),a.remove(),r(D({type:L.success,message:n}))})}},200)}return p(g,{onClick:l,disabled:!1,style:{fontSize:"12px"},children:[" ",i(te,{fontSize:"small",className:t}),i("span",{children:"Copy Link"})]})}var k={},He=x;Object.defineProperty(k,"__esModule",{value:!0});var W=k.default=void 0,Oe=He(m()),Pe=v,Te=(0,Oe.default)((0,Pe.jsx)("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}),"Menu");W=k.default=Te;const Ve=e=>({color:`${e.contrast}`,overflow:"visible",fontSize:"12px",background:`${e.shadow}`,border:`1px solid ${e.accentNeutral}`,mt:1.5,"& .MuiAvatar-root":{width:32,height:32,ml:-.5,mr:1},"&:before":{content:'""',display:"block",position:"absolute",top:0,right:14,width:10,height:10,borderLeft:`1px solid ${e.accentNeutral}`,borderTop:`1px solid ${e.accentNeutral}`,bgcolor:`${e.shadow}`,transform:"translateY(-50%) rotate(45deg)",zIndex:0},"& .icon":{fontSize:"16px",marginRight:"4px",color:`${e.contrast}`},"& .item":{fontSize:"12px",color:`${e.contrast}`}}),Ee=e=>({display:"flex",justifyContent:"center",alignItems:"center",marginLeft:2,paddingLeft:0,cursor:"pointer",paddingRight:0,width:"30px",height:"30px",background:"none",borderRadius:"3px",color:`${e.accentNeutral}`,border:`1px solid ${e.accentNeutral}`});function Be(){const e=C(d=>d.showDataSourceSetting),t=C(d=>d.currentUser.role),r=T(),o=w(),[n,l]=pe.useState(null),s=_.useMemo(()=>!!n,[n]),[a,h]=_.useState(t||"superAdmin");_.useEffect(()=>{h(t)},[t]);const f=d=>{l(()=>d.currentTarget)},c=d=>{d.stopPropagation(),l(()=>{})},b=d=>{c(d),r(le(!0))};return p(H,{children:[i(ae,{sx:{display:"flex",alignItems:"center",textAlign:"center"},children:i(ie,{title:"Settings",children:i("button",{onClick:f,style:Ee(o),"aria-controls":s?"account-menu":void 0,"aria-haspopup":"true","aria-expanded":s?"true":void 0,children:i(W,{style:{width:"14px",height:"14px"}})})})}),p(oe,{id:"account-menu",anchorEl:n,open:s,onClose:c,onClick:c,PaperProps:{elevation:0,sx:Ve(o)},TransitionComponent:ne,transformOrigin:{horizontal:"right",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},children:[i(Ie,{c:"icon"}),i(A,{}),p(g,{onClick:b,className:"item",children:[i(se,{className:"icon"})," General Settings"]}),i(A,{}),i($,{to:"/",children:p(g,{className:"item",onClick:c,children:[i(E,{className:"icon"}),"Search"]})}),i($,{to:"/plugins",children:p(g,{className:"item",onClick:c,children:[i(B,{className:"icon"}),"Plugins"]})}),i($,{to:"/users",children:p(g,{className:"item",onClick:c,children:[i(U,{className:"icon"}),"Users"]})}),e&&(a==="admin"||a==="superAdmin")&&i($,{to:"datasources",children:p(g,{className:"item",onClick:c,children:[i(q,{className:"icon"}),"Datasources"]})})]})]})}const Ue="/assets/qryn-logo-cd0b42d9.png",qe=()=>{const r=he().pathname.split("/").map((o,n)=>o===""&&n===0?{name:"home",link:"/"}:{name:`/${o}`,link:o});return i(H,{children:r.map(({name:o,link:n},l)=>i("a",{href:n,className:"bread-link",children:o},l))})},We=e=>P("background:",e.shadow,";height:30px;padding:4px;display:flex;align-items:center;border-bottom:1px solid ",e.accentNeutral,";.logo-section{margin:0;.version{color:",e.contrast,";font-size:10px;margin-left:5px;}.path{color:",e.contrast,";margin-left:20px;flex:1;font-weight:bold;text-transform:uppercase;font-size:11px;letter-spacing:1px;.bread-link{cursor:pointer;&:hover{color:",e.primary,";}}}}",""),Fe=()=>{const e=w();return p("div",{className:O(We(e)),children:[p("div",{className:"logo-section",children:[i("img",{src:Ue,alt:"Qryn View",height:"24px",className:"logo"}),i("p",{className:"version",children:"0.25.1"}),i("p",{className:"path",children:i(qe,{})})]}),i(ce,{section:"Status Bar",localProps:e}),i(Be,{})]})},Ge=e=>P("background:",e.background,";display:flex;flex-direction:column;height:100vh;flex:1;","");function at(){const e=w(),t=C(r=>r.settingsDialogOpen);return p("div",{className:O(Ge(e)),children:[i(Fe,{}),i(ve,{}),i(Z,{}),i(de,{open:t})]})}export{Ge as MainAppStyles,at as default}; diff --git a/view/assets/App-ba4053c5.js b/view/assets/App-ba4053c5.js deleted file mode 100644 index e03bd4b5..00000000 --- a/view/assets/App-ba4053c5.js +++ /dev/null @@ -1 +0,0 @@ -import{s as I,a as K,u as Q,c as Y,b as J,l as X,j as p,d as i,e as D,f as w,F as H,g as O,h as P,N as Z}from"./index-89b5df7a.js";import{g as ee,d as te,M as g,s as re,a as j,n as L,T as ie,B as ae,b as oe,F as ne,c as se,e as le,P as ce,S as de}from"./consts-8bbad01d.js";import{r as _,R as pe}from"./react-5ef71a40.js";import{r as m,i as x}from"./createSvgIcon-2dba4d94.js";import{j as v}from"./reactDnd-30d7bbb0.js";import{a as u,d as ue,m as T,u as C,L as $,q as he,O as ve}from"./vendor-154e05f8.js";import"./reactSelect-0cdb4520.js";import"./memoize-ac76fba7.js";import"./moment-e9e012b5.js";import"./PluginManagerFactory-1bc064fa.js";import"./DeleteOutlineOutlined-ca5edd1c.js";const fe=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],ge=e=>{const{absolute:t,children:r,classes:o,flexItem:n,light:l,orientation:s,textAlign:a,variant:h}=e;return J({root:["root",t&&"absolute",h,l&&"light",s==="vertical"&&"vertical",n&&"flexItem",r&&"withChildren",r&&s==="vertical"&&"withChildrenVertical",a==="right"&&s!=="vertical"&&"textAlignRight",a==="left"&&s!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",s==="vertical"&&"wrapperVertical"]},ee,o)},me=I("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.absolute&&t.absolute,t[r.variant],r.light&&t.light,r.orientation==="vertical"&&t.vertical,r.flexItem&&t.flexItem,r.children&&t.withChildren,r.children&&r.orientation==="vertical"&&t.withChildrenVertical,r.textAlign==="right"&&r.orientation!=="vertical"&&t.textAlignRight,r.textAlign==="left"&&r.orientation!=="vertical"&&t.textAlignLeft]}})(({theme:e,ownerState:t})=>u({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin"},t.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},t.light&&{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:K(e.palette.divider,.08)},t.variant==="inset"&&{marginLeft:72},t.variant==="middle"&&t.orientation==="horizontal"&&{marginLeft:e.spacing(2),marginRight:e.spacing(2)},t.variant==="middle"&&t.orientation==="vertical"&&{marginTop:e.spacing(1),marginBottom:e.spacing(1)},t.orientation==="vertical"&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},t.flexItem&&{alignSelf:"stretch",height:"auto"}),({ownerState:e})=>u({},e.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,"&::before, &::after":{content:'""',alignSelf:"center"}}),({theme:e,ownerState:t})=>u({},t.children&&t.orientation!=="vertical"&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`}}),({theme:e,ownerState:t})=>u({},t.children&&t.orientation==="vertical"&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`}}),({ownerState:e})=>u({},e.textAlign==="right"&&e.orientation!=="vertical"&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},e.textAlign==="left"&&e.orientation!=="vertical"&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),xe=I("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.wrapper,r.orientation==="vertical"&&t.wrapperVertical]}})(({theme:e,ownerState:t})=>u({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`},t.orientation==="vertical"&&{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`})),V=_.forwardRef(function(t,r){const o=Q({props:t,name:"MuiDivider"}),{absolute:n=!1,children:l,className:s,component:a=l?"div":"hr",flexItem:h=!1,light:f=!1,orientation:c="horizontal",role:b=a!=="hr"?"separator":void 0,textAlign:d="center",variant:F="fullWidth"}=o,G=ue(o,fe),S=u({},o,{absolute:n,component:a,flexItem:h,light:f,orientation:c,role:b,textAlign:d,variant:F}),z=ge(S);return v.jsx(me,u({as:a,className:Y(z.root,s),role:b,ref:r,ownerState:S},G,{children:l?v.jsx(xe,{className:z.wrapper,ownerState:S,children:l}):null}))});V.muiSkipListHighlight=!0;const A=V;var y={},be=x;Object.defineProperty(y,"__esModule",{value:!0});var E=y.default=void 0,$e=be(m()),_e=v,Se=(0,$e.default)((0,_e.jsx)("path",{d:"M19.3 16.9c.4-.7.7-1.5.7-2.4 0-2.5-2-4.5-4.5-4.5S11 12 11 14.5s2 4.5 4.5 4.5c.9 0 1.7-.3 2.4-.7l3.2 3.2 1.4-1.4-3.2-3.2zm-3.8.1c-1.4 0-2.5-1.1-2.5-2.5s1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5-1.1 2.5-2.5 2.5zM12 20v2C6.48 22 2 17.52 2 12S6.48 2 12 2c4.84 0 8.87 3.44 9.8 8h-2.07c-.64-2.46-2.4-4.47-4.73-5.41V5c0 1.1-.9 2-2 2h-2v2c0 .55-.45 1-1 1H8v2h2v3H9l-4.79-4.79C4.08 10.79 4 11.38 4 12c0 4.41 3.59 8 8 8z"}),"TravelExplore");E=y.default=Se;var N={},Ce=x;Object.defineProperty(N,"__esModule",{value:!0});var B=N.default=void 0,we=Ce(m()),ye=v,Ne=(0,we.default)((0,ye.jsx)("path",{d:"M20.5 11H19V7c0-1.1-.9-2-2-2h-4V3.5C13 2.12 11.88 1 10.5 1S8 2.12 8 3.5V5H4c-1.1 0-1.99.9-1.99 2v3.8H3.5c1.49 0 2.7 1.21 2.7 2.7s-1.21 2.7-2.7 2.7H2V20c0 1.1.9 2 2 2h3.8v-1.5c0-1.49 1.21-2.7 2.7-2.7 1.49 0 2.7 1.21 2.7 2.7V22H17c1.1 0 2-.9 2-2v-4h1.5c1.38 0 2.5-1.12 2.5-2.5S21.88 11 20.5 11z"}),"Extension");B=N.default=Ne;var R={},Re=x;Object.defineProperty(R,"__esModule",{value:!0});var U=R.default=void 0,Me=Re(m()),ke=v,ze=(0,Me.default)((0,ke.jsx)("path",{d:"M12 5.9c1.16 0 2.1.94 2.1 2.1s-.94 2.1-2.1 2.1S9.9 9.16 9.9 8s.94-2.1 2.1-2.1m0 9c2.97 0 6.1 1.46 6.1 2.1v1.1H5.9V17c0-.64 3.13-2.1 6.1-2.1M12 4C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4z"}),"PersonOutlineOutlined");U=R.default=ze;var M={},De=x;Object.defineProperty(M,"__esModule",{value:!0});var q=M.default=void 0,je=De(m()),Le=v,Ae=(0,je.default)((0,Le.jsx)("path",{d:"M2 20h20v-4H2v4zm2-3h2v2H4v-2zM2 4v4h20V4H2zm4 3H4V5h2v2zm-4 7h20v-4H2v4zm2-3h2v2H4v-2z"}),"Storage");q=M.default=Ae;function Ie(e){const{c:t}=e,r=T(),o=X(),n="Link Copied To Clipboard";function l(){r(re(!0)),setTimeout(()=>{var s;if(navigator!=null&&navigator.clipboard&&window.isSecureContext)(s=navigator==null?void 0:navigator.clipboard)==null||s.writeText(window.location.href).then(function(){const a=o.add({data:window.location.href,description:"From Shared URL"},10);r(j(a)),r(D({type:L.success,message:n}))},function(a){console.log("error on copy",a)});else{let a=document.createElement("textarea");return a.value=window.location.href,a.style.position="fixed",a.style.left="-999999px",a.style.top="-999999px",document.body.appendChild(a),a.focus(),a.select(),new Promise((h,f)=>{const c=o.add({data:window.location.href,description:"From Shared URL"},10);r(j(c)),document.execCommand("copy")?h():f(),a.remove(),r(D({type:L.success,message:n}))})}},200)}return p(g,{onClick:l,disabled:!1,style:{fontSize:"12px"},children:[" ",i(te,{fontSize:"small",className:t}),i("span",{children:"Copy Link"})]})}var k={},He=x;Object.defineProperty(k,"__esModule",{value:!0});var W=k.default=void 0,Oe=He(m()),Pe=v,Te=(0,Oe.default)((0,Pe.jsx)("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}),"Menu");W=k.default=Te;const Ve=e=>({color:`${e.contrast}`,overflow:"visible",fontSize:"12px",background:`${e.shadow}`,border:`1px solid ${e.accentNeutral}`,mt:1.5,"& .MuiAvatar-root":{width:32,height:32,ml:-.5,mr:1},"&:before":{content:'""',display:"block",position:"absolute",top:0,right:14,width:10,height:10,borderLeft:`1px solid ${e.accentNeutral}`,borderTop:`1px solid ${e.accentNeutral}`,bgcolor:`${e.shadow}`,transform:"translateY(-50%) rotate(45deg)",zIndex:0},"& .icon":{fontSize:"16px",marginRight:"4px",color:`${e.contrast}`},"& .item":{fontSize:"12px",color:`${e.contrast}`}}),Ee=e=>({display:"flex",justifyContent:"center",alignItems:"center",marginLeft:2,paddingLeft:0,cursor:"pointer",paddingRight:0,width:"30px",height:"30px",background:"none",borderRadius:"3px",color:`${e.accentNeutral}`,border:`1px solid ${e.accentNeutral}`});function Be(){const e=C(d=>d.showDataSourceSetting),t=C(d=>d.currentUser.role),r=T(),o=w(),[n,l]=pe.useState(null),s=_.useMemo(()=>!!n,[n]),[a,h]=_.useState(t||"superAdmin");_.useEffect(()=>{h(t)},[t]);const f=d=>{l(()=>d.currentTarget)},c=d=>{d.stopPropagation(),l(()=>{})},b=d=>{c(d),r(le(!0))};return p(H,{children:[i(ae,{sx:{display:"flex",alignItems:"center",textAlign:"center"},children:i(ie,{title:"Settings",children:i("button",{onClick:f,style:Ee(o),"aria-controls":s?"account-menu":void 0,"aria-haspopup":"true","aria-expanded":s?"true":void 0,children:i(W,{style:{width:"14px",height:"14px"}})})})}),p(oe,{id:"account-menu",anchorEl:n,open:s,onClose:c,onClick:c,PaperProps:{elevation:0,sx:Ve(o)},TransitionComponent:ne,transformOrigin:{horizontal:"right",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},children:[i(Ie,{c:"icon"}),i(A,{}),p(g,{onClick:b,className:"item",children:[i(se,{className:"icon"})," General Settings"]}),i(A,{}),i($,{to:"/",children:p(g,{className:"item",onClick:c,children:[i(E,{className:"icon"}),"Search"]})}),i($,{to:"/plugins",children:p(g,{className:"item",onClick:c,children:[i(B,{className:"icon"}),"Plugins"]})}),i($,{to:"/users",children:p(g,{className:"item",onClick:c,children:[i(U,{className:"icon"}),"Users"]})}),e&&(a==="admin"||a==="superAdmin")&&i($,{to:"datasources",children:p(g,{className:"item",onClick:c,children:[i(q,{className:"icon"}),"Datasources"]})})]})]})}const Ue="/assets/qryn-logo-cd0b42d9.png",qe=()=>{const r=he().pathname.split("/").map((o,n)=>o===""&&n===0?{name:"home",link:"/"}:{name:`/${o}`,link:o});return i(H,{children:r.map(({name:o,link:n},l)=>i("a",{href:n,className:"bread-link",children:o},l))})},We=e=>P("background:",e.shadow,";height:30px;padding:4px;display:flex;align-items:center;border-bottom:1px solid ",e.accentNeutral,";.logo-section{margin:0;.version{color:",e.contrast,";font-size:10px;margin-left:5px;}.path{color:",e.contrast,";margin-left:20px;flex:1;font-weight:bold;text-transform:uppercase;font-size:11px;letter-spacing:1px;.bread-link{cursor:pointer;&:hover{color:",e.primary,";}}}}",""),Fe=()=>{const e=w();return p("div",{className:O(We(e)),children:[p("div",{className:"logo-section",children:[i("img",{src:Ue,alt:"Qryn View",height:"24px",className:"logo"}),i("p",{className:"version",children:"0.25.1"}),i("p",{className:"path",children:i(qe,{})})]}),i(ce,{section:"Status Bar",localProps:e}),i(Be,{})]})},Ge=e=>P("background:",e.background,";display:flex;flex-direction:column;height:100vh;flex:1;","");function ot(){const e=w(),t=C(r=>r.settingsDialogOpen);return p("div",{className:O(Ge(e)),children:[i(Fe,{}),i(ve,{}),i(Z,{}),i(de,{open:t})]})}export{Ge as MainAppStyles,ot as default}; diff --git a/view/assets/DataSources-df7c6cd8.js b/view/assets/DataSources-df7c6cd8.js new file mode 100644 index 00000000..5acfba2d --- /dev/null +++ b/view/assets/DataSources-df7c6cd8.js @@ -0,0 +1 @@ +var de=Object.defineProperty;var ue=(t,a,s)=>a in t?de(t,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[a]=s;var I=(t,a,s)=>(ue(t,typeof a!="symbol"?a+"":a,s),s);import{d as e,j as h,g as J,D as w,h as T,F as P,f as $,Q as he,i as pe,e as fe}from"./index-cb8d8b59.js";import{r as O}from"./react-432945ee.js";import{m as _,u as A,n as Z,r as ge,L as me,s as Se,v as ve,w as ye,p as xe,R as Ce}from"./vendor-6029fc34.js";import{D as ke,L as U,I as H,d as we,S as Ne,a as E,F,s as z,b as be,c as V,T as Oe,e as ee,f as De,P as Le}from"./AddOutlined-d979d573.js";import{d as te,s as ze}from"./DeleteOutlineOutlined-2068af5e.js";import{S as M,r as B,i as Q}from"./createSvgIcon-b45af2a3.js";import{j as G}from"./reactDnd-72acd3f4.js";import{b as ae}from"./reactSelect-75171a09.js";import"./memoize-acaceb73.js";const j=t=>{const{value:a,onClick:s,primary:c,title:l}=t;return e(ke,{title:l,onClick:s,primary:c,children:a})},Ae=t=>T("display:flex;flex:",t?1:0,";",""),ne=({value:t,locked:a,onChange:s,opts:c,label:l,labelWidth:f,name:S,fullWidth:C,width:v})=>{const[y,x]=O.useState(""),N=O.useRef(null),k=O.useMemo(()=>typeof c[0]=="string"?c.map(u=>({value:u,name:u})):c,[c]);return O.useEffect(()=>{var m,n;const u=(m=k==null?void 0:k.find(r=>r.name===t))==null?void 0:m.value;u&&((n=N==null?void 0:N.current)==null?void 0:n.value)!==u&&(x(u),N.current.value=u)},[t]),h(H,{width:v,children:[(l==null?void 0:l.length)>0&&e(U,{width:f||null,children:l}),e("select",{ref:N,className:J(Ae(C)),disabled:a,defaultValue:w.sanitize(y),onChange:u=>s(u,S),children:k==null?void 0:k.map((u,m)=>e("option",{value:w.sanitize(u.value),children:u.name},m))})]})},se=t=>{const{value:a,onChange:s,locked:c,label:l}=t;return h(H,{children:[e(U,{children:l}),e(M,{disabled:c,size:"small",checked:a,onChange:s})]})};var W={},Ie=Q;Object.defineProperty(W,"__esModule",{value:!0});var ie=W.default=void 0,Je=Ie(B()),Fe=G,Te=(0,Je.default)((0,Fe.jsx)("path",{d:"m19 8-4 4h3c0 3.31-2.69 6-6 6-1.01 0-1.97-.25-2.8-.7l-1.46 1.46C8.97 19.54 10.43 20 12 20c4.42 0 8-3.58 8-8h3l-4-4zM6 12c0-3.31 2.69-6 6-6 1.01 0 1.97.25 2.8.7l1.46-1.46C15.03 4.46 13.57 4 12 4c-4.42 0-8 3.58-8 8H1l4 4 4-4H6z"}),"CachedOutlined");ie=W.default=Te;var K={},_e=Q;Object.defineProperty(K,"__esModule",{value:!0});var re=K.default=void 0,Ee=_e(B()),Re=G,je=(0,Ee.default)((0,Re.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckCircle");re=K.default=je;const le=t=>a=>{a({type:"SET_IS_DATASOURCE_SAVED",isDsSaved:t})};var X={},Pe=Q;Object.defineProperty(X,"__esModule",{value:!0});var oe=X.default=void 0,$e=Pe(B()),Me=G,Ue=(0,$e.default)((0,Me.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline");oe=X.default=Ue;const ce=T({name:"vtwnvy",styles:"height:12px!important;width:12px!important;color:white;margin:0px 4px"}),He=t=>T("display:flex;align-items:center;background:",t.primary,";color:white;font-size:11px;padding:4px;border-radius:3px;margin-right:10px;cursor:pointer;span{margin-right:4px;font-weight:bold;}",""),qe=T({name:"1t9g6tg",styles:"display:flex;align-items:center;background:#b62c14;color:white;font-size:12px;padding:4px;border-radius:3px;margin-right:10px;cursor:pointer;span{margin-right:4px;font-weight:bold;}"}),Ve=T({name:"9hkg7e",styles:"display:flex;align-items:center;font-size:12px;&.loading-icon{height:14px;width:14px;}"}),Be=({setIsSaved:t})=>{const a=$();return h("div",{className:J(He(a)),onClick:s=>t(!1),children:[e(re,{className:J(ce)})," ",e("span",{children:"Saved"})]})},Y=({errorText:t})=>h("div",{className:J(qe),children:[e(oe,{className:J(ce)})," ",e("span",{children:t})]});function q(t){const{onClickAdd:a,isAdd:s,title:c,isEditing:l,fieldErrors:f}=t,S=_(),[C,v]=O.useState(!1);return O.useEffect(()=>(l&&(setTimeout(()=>{v(!0),S(le(!0))},800),v(!1)),v(!1),()=>{v(!1)}),[l]),h(Ne,{children:[c,h("div",{className:"edit-buttons",children:[l&&h("div",{className:Ve,children:[e(ie,{style:{height:"13px",width:"13px"}})," ","Saving ..."]}),(f==null?void 0:f.protocol)&&e(Y,{errorText:"Insecure Mixed Content. Mixing HTTP and HTTPS is insecure and is not supported."}),(f==null?void 0:f.url)&&e(Y,{errorText:"Please complete API URL"}),C&&e(Be,{setIsSaved:v}),s&&e(P,{children:e(we,{fontSize:"small",style:{cursor:"pointer",display:"flex"},onClick:a})})]})]})}const Qe=t=>{const a=_(),s=A(u=>u.dataSources),[c,l]=O.useState(!1),{headers:f,id:S}=t,[C,v]=O.useState((t==null?void 0:t.cors)||!1),y=u=>{const m=u.target.checked,n=s.map(r=>(r.id===S&&(r.cors=m),r));v(()=>m),localStorage.setItem("dataSources",JSON.stringify(n)),a(z(n))},x=(u,m,n)=>{l(()=>!0);const r=u.target.value,g=(s.find(p=>p.id===S).headers||[]).map(p=>(p.id===m&&(p[n]=r),p)),o=s.map(p=>(p.id===S&&(p.headers=[...g]),p));localStorage.setItem("dataSources",JSON.stringify(o)),a(z(o)),setTimeout(()=>{l(()=>!1)},800)},N=u=>{u.preventDefault();const m=s==null?void 0:s.find(i=>i.id===S),n=m.headers,r=JSON.parse(JSON.stringify([...s]));if(f.length>0){const i={...n[n.length-1],id:Z()},d={...m,headers:[...m.headers,i]},g=r==null?void 0:r.map(o=>o.id===S?{...d}:o);localStorage.setItem("dataSources",JSON.stringify(g)),a(z(g))}},k=(u,m)=>{const n=s==null?void 0:s.find(o=>o.id===S),i=[...f].filter(o=>o.id!==m),d={...n,headers:[...i]},g=s==null?void 0:s.map(o=>o.id===S?{...d}:o);localStorage.setItem("dataSources",JSON.stringify(g)),a(z(g))};return e("div",{className:"",children:f&&h(P,{children:[e(q,{title:"Custom HTTP Headers",isEdit:!1,isAdd:!0,isEditing:c,onClickAdd:N}),h(E,{children:[e(U,{children:"Use CORS"})," ",e(M,{size:"small",checked:C,onChange:y})]}),f==null?void 0:f.map((u,m)=>e(E,{children:h(H,{children:[e(F,{label:"header",value:w.sanitize(u.header),onChange:n=>x(n,u.id,"header")}),e(F,{label:"value",value:w.sanitize(u.value),onChange:n=>x(n,u.id,"value")}),e(te,{onClick:n=>k(n,u.id),style:{cursor:"pointer",marginLeft:"10px"},fontSize:"small"})]})},m))]})})};function Ge(t){console.log(t);const a=ge(),s=$(),c=A(y=>y.urlLocation),l=_(),{title:f}=t,S=A(y=>y.isDsSaved),C=O.useMemo(()=>S?"Save":"Back",[S]),v=()=>{let y=(c==null?void 0:c.length)>0;l(le(!1)),a((y||C==="Back")&&f!=="DataSources"?-1:"/")};return h("div",{className:"ds-header",children:[e("div",{style:{display:"flex",alignItems:"center"},children:h("div",{style:{display:"flex",flexDirection:"column"},children:[h("div",{style:{display:"flex"},children:[e(he,{}),e("h1",{children:f})]}),h("p",{style:{color:s.contrast,fontSize:"10px",marginTop:"5px",marginLeft:"10px",opacity:".5"},children:["v","0.25.1"]})]})}),e(j,{value:w.sanitize(C),onClick:v,editing:!0,primary:S})]})}const We=t=>{const{id:a,name:s,regex:c,urlLabel:l,internalLink:f,linkType:S,locked:C,dataSourceId:v,fieldEditing:y}=t,x=_(),N=A(i=>i.dataSources),k=O.useMemo(()=>N.map(i=>({name:i.name,value:i.id})),[N]),u=(i,d)=>{y();const g=JSON.parse(JSON.stringify(N)),L=g.find(b=>b.id===v).linkedFields.map(b=>b.id===a?{...b,[i]:d}:b);return g.map(b=>b.id===v?{...b,linkedFields:L}:b)},m=i=>{y();const d=JSON.parse(JSON.stringify(N)),p=d.find(b=>b.id===v).linkedFields.filter(b=>b.id!==a),L=d.map(b=>b.id===v?{...b,linkedFields:[...p]}:b);localStorage.setItem("dataSources",JSON.stringify(L)),x(z(L))},n=(i,d)=>{y();const g=i.target.value,o=u(d,g);localStorage.setItem("dataSources",JSON.stringify(o)),x(z(o))},r=(i,d)=>{y();const g=!!i.target.checked,o=u(d,g);localStorage.setItem("dataSources",JSON.stringify(o)),x(z(o))};return h(be,{children:[h(E,{children:[e(F,{value:w.sanitize(s),label:"Name",onChange:i=>n(i,"name")}),e(F,{value:w.sanitize(c),label:"Regex",onChange:i=>n(i,"regex")}),e(F,{value:w.sanitize(l),label:"URL Label",onChange:i=>n(i,"urlLabel")}),e(te,{onClick:m,fontSize:"small",style:{marginLeft:"10px",cursor:"pointer",display:C?"none":"inline-block"}})]}),h(E,{className:"internal",children:[e(se,{value:f,label:"Internal Link",onChange:i=>r(i,"internalLink")}),e(ne,{label:"",value:w.sanitize(S),opts:k,selectType:"linkedField",onChange:i=>n(i,"linkID")})]})]})};class Ke{constructor(){I(this,"id");I(this,"dataSource");I(this,"ds_id");I(this,"name");I(this,"regex");I(this,"query");I(this,"urlLabel");I(this,"url");I(this,"internalLink");I(this,"linkType");this.id=Z(),this.dataSource="Logs",this.ds_id="logs",this.name="traceID",this.regex='^.*?"traceID" ="(w+)".*$/',this.query="${__value.raw}",this.urlLabel="",this.url="",this.internalLink=!0,this.linkType="Traces"}create(){const{id:a,dataSource:s,ds_id:c,name:l,regex:f,query:S,urlLabel:C,url:v,internalLink:y,linkType:x}=this;return{id:a,dataSource:s,ds_id:c,name:l,regex:f,query:S,urlLabel:C,url:v,internalLink:y,linkType:x}}}const Xe=t=>{const{linkedFields:a,name:s,id:c}=t,l=A(x=>x.dataSources),f=_(),[S,C]=O.useState(!1),v=()=>{const x=new Ke;x.dataSource=s,x.create();const k=[...JSON.parse(JSON.stringify(a)),{...x}],u=JSON.parse(JSON.stringify(l)),m=u==null?void 0:u.map(n=>n.id===c?{...n,linkedFields:k}:n);localStorage.setItem("dataSources",JSON.stringify(m)),f(z(m))},y=()=>{C(()=>!0),setTimeout(()=>{C(()=>!1)},800)};return(a==null?void 0:a.length)>0?h(P,{children:[e(q,{title:"Linked Fields",isEdit:!0,isAdd:!0,onClickAdd:v,isEditing:S}),e(V,{children:a==null?void 0:a.map((x,N)=>e(We,{...x,dataSourceId:c,locked:!1,fieldEditing:y},N))})]}):null};function Ye(t){const{value:a,label:s,onChange:c,placeholder:l}=t;return h(H,{children:[e(U,{children:s}),e(Oe,{className:"ds-input",onChange:c,placeholder:l,value:w.sanitize(a)})]})}function Ze(t){const{auth:a,id:s}=t,c=_(),l=A(n=>n.dataSources),[f,S]=O.useState([]),[C,v]=O.useState(!1),y=O.useMemo(()=>{var n;return(n=Object.entries(a))==null?void 0:n.map(([r,i])=>({name:r,...i})).filter(r=>r.name!=="fields")},[a]),x=O.useMemo(()=>{var n;return(n=Object.entries(a))==null?void 0:n.map(([r,i])=>({name:r,...i})).find(r=>r.name==="fields")},[a]),N=(n,r)=>{const i=JSON.parse(JSON.stringify(a));i[r].value=n;const g=JSON.parse(JSON.stringify(l)).map(o=>o.id===s?{...o,auth:{...i}}:o);return localStorage.setItem("dataSources",JSON.stringify(g)),c(z(g)),g};O.useEffect(()=>{var r,i;const n=(i=(r=y.filter(d=>d.form_type==="switch"&&!!(d!=null&&d.value)))==null?void 0:r.filter(d=>!!d.withFields))==null?void 0:i.map(d=>d.name);S(n)},[y,S]);const k=(n,r)=>{v(()=>!0);const i=n.target.value;N(i,r),setTimeout(()=>{v(()=>!1)},800)},u=(n,r)=>{v(()=>!0);const i=n.target.checked;N(i,r),setTimeout(()=>{v(()=>!1)},800)},m=(n,r,i)=>{var b;v(()=>!0);const d=n.target.value,g=JSON.parse(JSON.stringify(a)),o={...g,fields:{...g.fields,[i]:(b=g==null?void 0:g.fields[i])==null?void 0:b.map(D=>D.name===r?(D.value=d,{...D}):D)}},p=JSON.parse(JSON.stringify([...l])),L=p==null?void 0:p.map(D=>(D.id===s&&(D.auth=o),D));localStorage.setItem("dataSources",JSON.stringify(L)),c(z(L)),setTimeout(()=>{v(()=>!1)},600)};return h(P,{children:[e(q,{title:"HTTP Auth Fields",isEditing:C,isEdit:!1,isAdd:!1}),h(V,{children:[y&&y.map((n,r)=>n.form_type==="select"?e(ne,{value:w.sanitize(n.value),name:w.sanitize(n.name),onChange:i=>k(i,n.name),locked:!1,opts:n.options,label:n.label},r):n.form_type==="switch"?e(se,{label:n.label,value:n.value,onChange:i=>u(i,n.name)},r):null),e(E,{children:f&&f.map((n,r)=>{var i;return e(E,{children:x[n]&&((i=x[n])==null?void 0:i.map((d,g)=>d.form_type==="input"||d.form_type==="password"?e(F,{onChange:o=>m(o,d.name,n),type:d.form_type,value:w.sanitize(d.value),label:d.label,placeholder:d.placeholder},g):d.form_type==="textarea"?e(Ye,{onChange:o=>m(o,d.name,n),value:w.sanitize(d.value),label:d.label,placeholder:d.placeholder},g):null))},r)})})]})]})}const et=pe("div",{target:"emiacor0"})("position:absolute;left:0;top:0;background:",({theme:t})=>t.background,";display:flex;flex-direction:culumn;justify-content:center;color:",({theme:t})=>t.contrast,";flex:1;height:100%;width:100%;.body-cont{max-width:1440px;padding:10px;margin:10px;border-radius:3px;flex:1;background:",({theme:t})=>t.shadow,";overflow-y:auto;overflow-x:hidden;}.ds-header{padding:10px;padding-bottom:20px;font-size:24px;flex:1;display:flex;width:100%;justify-content:space-between;align-items:center;padding-left:0px;.logo{margin-right:10px;}}.ds-cont{margin-bottom:10px;border:1px solid ",({theme:t})=>t.accentNeutral,";border-radius:3px;overflow-y:auto;}.ds-item{padding:10px;border-radius:3px 3px 0px 0px;padding-bottom:14px;display:flex;.logo{padding:10px;padding-right:20px;padding-left:0px;}.ds-text{display:flex;flex-direction:column;flex:1;}.ds-type{font-size:18px;padding:10px;padding-left:0px;color:",({theme:t})=>t.contrast,";}small{font-size:12px;}.setting-icon{justify-self:flex-end;cursor:pointer;}.ds-settings{background:",({theme:t})=>t.background,";}}");function tt(){const t=A(({dataSources:a})=>a);return(t==null?void 0:t.length)>0?e("div",{style:{margin:"10px"},children:t.map((a,s)=>{const{icon:c,id:l,name:f,type:S,url:C}=a;return e("div",{className:"ds-cont",children:e(me,{to:l,children:h("div",{className:"ds-item",children:[e(ee,{icon:c}),h("div",{className:"ds-text",children:[e("div",{className:"ds-type",children:f}),h("span",{children:[h("small",{children:[S," | "," "]}),e("small",{style:{userSelect:"all"},children:C})]})]})]})})},s)})}):e("div",{children:e("h1",{children:"No Data Sources Found."})})}const at=t=>{const{headers:a,id:s,linkedFields:c,name:l,url:f,cors:S}=t,C=_(),v=A(({dataSources:r})=>r),[y,x]=O.useState({url:!1,protocol:!1}),N=(r,i)=>{let d=i;r==="url"&&(d=i.replace(/\/$/,""));const g=JSON.parse(JSON.stringify(v));return g.forEach(o=>{o.id===s&&(o[r]=d)}),g},[k,u]=O.useState(!1),m=r=>{try{const i=window.location.protocol,d=new URL(r).protocol;return{value:i===d,error:""}}catch{return{value:!1,error:"url"}}},n=(r,i)=>{u(()=>!0);const d=r.target.value;if(i==="url"){const o=m(d);if((o==null?void 0:o.error)==="url"&&x(p=>({...p,url:!0})),!(o!=null&&o.value)&&(o==null?void 0:o.error)===""&&x(p=>({...p,protocol:!0})),(o==null?void 0:o.error)===""&&(o!=null&&o.value)){x(L=>({...L,protocol:!1,url:!1}));const p=N(i,d);localStorage.setItem("dataSources",JSON.stringify(p)),C(z(p)),setTimeout(()=>{u(()=>!1)},800)}}const g=N(i,d);localStorage.setItem("dataSources",JSON.stringify(g)),C(z(g)),setTimeout(()=>{u(()=>!1)},800)};return h(De,{children:[e(q,{isEditing:k,isEdit:!0,isAdd:!1,title:"DataSource Settings",fieldErrors:y}),e(V,{children:h(E,{children:[e(F,{value:w.sanitize(l),label:"Name",onChange:r=>n(r,"name")}),e(F,{value:w.sanitize(f),label:"URL",error:y.url||y.protocol,onChange:r=>n(r,"url")})]})}),e(Ze,{...t}),e(Qe,{cors:S,headers:a,id:s}),e(Xe,{...t,linkedFields:c})]})},nt=T({name:"9rq8lq",styles:"display:flex;align-items:center;justify-content:space-between;margin-right:20px"});function st(t,a,s){let c={},l=s&&s!==""&&a&&a!=="",f=l?`${btoa(a)}:${btoa(s)}`:"",S=JSON.parse(JSON.stringify(t));return l&&f&&(c.auth=f),c.url=S,JSON.stringify(c)}function it(t){const{url:a,auth:{basicAuth:s,fields:{basicAuth:[c,l]}}}=t,[f,S]=ve(["qryn-dev-cookie","qryn-settings"]),C=_(),v=A(k=>k.dataSources),y=()=>{const k=[...v],u=JSON.parse(JSON.stringify(k)),m=u==null?void 0:u.map(n=>({...n,url:w.sanitize(a),auth:{...n.auth,basicAuth:{...n.auth.basicAuth,value:s.value},fields:{...n.auth.fields,basicAuth:[...n.auth.fields.basicAuth].map(r=>r.name==="user"?{...r,value:w.sanitize(c.value)}:r.name==="password"?{...r,value:w.sanitize(l.value)}:r)}}}));localStorage.setItem("dataSources",JSON.stringify(m)),C(z(m)),C(fe({type:"success",message:"Set same URL and Basic Auth for All Data Sources"}))};function x(){const k=new Date;new Date().setDate(k.getDate()+1);try{S("qryn-settings",st(a,c.value,l.value),{path:"/"})}catch(m){console.log(m)}}function N(){const{headers:k,id:u,name:m,linkedFields:n}=t,r=k==null?void 0:k.map(({header:o,value:p})=>({[o]:p})),d=`data:text/json;chatset=utf-8,${encodeURIComponent(JSON.stringify({id:u,name:m,headers:r,linkedFields:n}))}`,g=document.createElement("a");g.href=d,g.download=`${m}_${u}.json`,g.click()}return h("div",{className:"ds-cont",children:[h("div",{className:J(nt),children:[e(rt,{...t}),h("div",{style:{display:"flex",alignItems:"center"},children:[e(j,{title:"Download Datasource settings as JSON",value:w.sanitize("Download JSON"),onClick:N,primary:!0}),e(j,{title:"Set Cookie with name: qryn-settings",value:w.sanitize("Save Cookie"),onClick:x,primary:!0}),e(j,{title:"Use same URL and Basic Auth for all Data Sources",value:w.sanitize("Use For All"),onClick:y,primary:!0})]})]}),e("div",{className:"ds-settings",children:e(at,{...t})})]})}const rt=t=>{const{icon:a,name:s,type:c,url:l}=t;return h("div",{className:"ds-item",children:[e(ee,{icon:a}),h("div",{className:"ds-text",children:[e("div",{className:"ds-type",children:s}),h("small",{children:[w.sanitize(c)," | ",w.sanitize(l)]})]})]})};function lt(){let{id:t}=Se();const a=$(),s=A(l=>l.dataSources),c=O.useMemo(()=>!s||s.length===0?{}:s.find(l=>l.id===t)||{},[t,s]);return e(ae,{theme:a,children:e(et,{children:h("div",{className:"body-cont",children:[e(Ge,{title:"DataSource Settings",datasource:c}),e("div",{className:"datasource-body",children:e(it,{...c})})]})})})}const ot=t=>T("display:flex;flex-direction:column;flex:1;flex-wrap:wrap;width:400px;border:1px solid ",t.accentNeutral,";padding:5px;border-radius:3px;margin-left:10px;",""),ct=T({name:"1reekiy",styles:"display:flex;padding:4px 12px;font-size:14px;border-radius:4px;white-space:nowrap;align-items:center;justify-content:space-between"}),dt=T({name:"t10jb8",styles:"margin:5px"}),ut=T({name:"1wnuhlc",styles:"margin-left:20px;display:flex;align-items:center;span{font-size:12px;}"}),ht=T({name:"17moij0",styles:"align-items:center;width:100%;display:flex;margin-top:10px;justify-content:space-between;flex:1"}),pt=t=>{const[a,s]=O.useState(""),[c,l]=O.useState(""),[f,S]=O.useState(""),[C,v]=O.useState(!1),[y,x]=O.useState(!1),N=A(p=>p.dataSources),k=_(),u="Save",m=$(),n=p=>{var D;const b=(((D=p==null?void 0:p.target)==null?void 0:D.value)||"").replace(/\/$/,"");s(()=>b)},r=p=>{l(()=>p.target.value)},i=p=>{S(()=>p.target.value)},d=p=>{v(()=>p.target.checked)},g=p=>{x(()=>p.target.checked)},o=p=>{const L=JSON.parse(JSON.stringify(N)),b=L==null?void 0:L.map(D=>({...D,url:a,auth:{...D.auth,basicAuth:{...D.auth.basicAuth,value:y},fields:{...D.auth.fields,basicAuth:[...D.auth.fields.basicAuth].map(R=>R.name==="user"?{...R,value:c}:R.name==="password"?{...R,value:f}:R)}}}));localStorage.setItem("dataSources",JSON.stringify(b)),k(z(b))};return h("div",{className:J(ot(m)),children:[h("div",{className:J(ct),children:["Use one setting for all Data Sources",e(M,{checked:C,size:"small",onChange:d})]}),C&&h("div",{className:J(dt),children:[e(F,{value:w.sanitize(a),label:"url",onChange:n,placeholder:"http://qryn.dev"}),y&&h(P,{children:[e(F,{value:w.sanitize(c),label:"user",onChange:r,placeholder:"default"}),e(F,{value:w.sanitize(f),label:"password",onChange:i,type:"password",placeholder:""})]}),h("div",{className:J(ht),children:[h("div",{className:J(ut),children:[e("span",{children:"Use Basic Auth"})," ",e(M,{checked:y,size:"small",onChange:g})," "]}),e(j,{value:w.sanitize(u),onClick:o,editing:!1,primary:!0})]})]})]})};function Nt(t){const a=t.replace(/#/,""),s=decodeURIComponent(a),c=new URLSearchParams(s);for(let[l,f]of c)(l==="left"||l==="right")&&JSON.parse(f)}function bt(){const t=ye.useMediaQuery({query:"(prefers-color-scheme: dark)"}),a=_(),s=$(),c=A(l=>l.autoTheme);return O.useEffect(()=>{if(c){const l=t?"dark":"light";a(ze(l)),localStorage.setItem("theme",JSON.stringify({theme:l,auto:c}))}},[t,c,a]),h(ae,{theme:s,children:[e(Le,{children:h("div",{className:"cont",children:[e(tt,{}),e("div",{style:{display:"flex",flex:1},children:e("div",{style:{height:"40px"},children:e(pt,{})})})]})}),e(Ce,{children:e(xe,{path:":id",element:e(lt,{})})})]})}export{bt as default,Nt as getURlParams}; diff --git a/view/assets/DataSources-fe659297.js b/view/assets/DataSources-fe659297.js deleted file mode 100644 index c0f86c71..00000000 --- a/view/assets/DataSources-fe659297.js +++ /dev/null @@ -1 +0,0 @@ -var de=Object.defineProperty;var ue=(t,a,s)=>a in t?de(t,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[a]=s;var I=(t,a,s)=>(ue(t,typeof a!="symbol"?a+"":a,s),s);import{d as e,j as h,g as J,D as w,h as T,F as P,f as $,Q as he,i as pe,e as fe}from"./index-89b5df7a.js";import{r as O}from"./react-5ef71a40.js";import{m as _,u as A,n as Z,r as ge,L as me,s as Se,v as ve,w as ye,p as xe,R as Ce}from"./vendor-154e05f8.js";import{D as ke,L as U,I as H,d as we,S as Ne,a as E,F,s as z,b as be,c as V,T as Oe,e as ee,f as De,P as Le}from"./AddOutlined-e29fe36c.js";import{d as te,s as ze}from"./DeleteOutlineOutlined-ca5edd1c.js";import{S as M,r as B,i as Q}from"./createSvgIcon-2dba4d94.js";import{j as G}from"./reactDnd-30d7bbb0.js";import{b as ae}from"./reactSelect-0cdb4520.js";import"./moment-e9e012b5.js";import"./memoize-ac76fba7.js";const j=t=>{const{value:a,onClick:s,primary:c,title:l}=t;return e(ke,{title:l,onClick:s,primary:c,children:a})},Ae=t=>T("display:flex;flex:",t?1:0,";",""),ne=({value:t,locked:a,onChange:s,opts:c,label:l,labelWidth:f,name:S,fullWidth:C,width:v})=>{const[y,x]=O.useState(""),N=O.useRef(null),k=O.useMemo(()=>typeof c[0]=="string"?c.map(u=>({value:u,name:u})):c,[c]);return O.useEffect(()=>{var m,n;const u=(m=k==null?void 0:k.find(r=>r.name===t))==null?void 0:m.value;u&&((n=N==null?void 0:N.current)==null?void 0:n.value)!==u&&(x(u),N.current.value=u)},[t]),h(H,{width:v,children:[(l==null?void 0:l.length)>0&&e(U,{width:f||null,children:l}),e("select",{ref:N,className:J(Ae(C)),disabled:a,defaultValue:w.sanitize(y),onChange:u=>s(u,S),children:k==null?void 0:k.map((u,m)=>e("option",{value:w.sanitize(u.value),children:u.name},m))})]})},se=t=>{const{value:a,onChange:s,locked:c,label:l}=t;return h(H,{children:[e(U,{children:l}),e(M,{disabled:c,size:"small",checked:a,onChange:s})]})};var W={},Ie=Q;Object.defineProperty(W,"__esModule",{value:!0});var ie=W.default=void 0,Je=Ie(B()),Fe=G,Te=(0,Je.default)((0,Fe.jsx)("path",{d:"m19 8-4 4h3c0 3.31-2.69 6-6 6-1.01 0-1.97-.25-2.8-.7l-1.46 1.46C8.97 19.54 10.43 20 12 20c4.42 0 8-3.58 8-8h3l-4-4zM6 12c0-3.31 2.69-6 6-6 1.01 0 1.97.25 2.8.7l1.46-1.46C15.03 4.46 13.57 4 12 4c-4.42 0-8 3.58-8 8H1l4 4 4-4H6z"}),"CachedOutlined");ie=W.default=Te;var K={},_e=Q;Object.defineProperty(K,"__esModule",{value:!0});var re=K.default=void 0,Ee=_e(B()),Re=G,je=(0,Ee.default)((0,Re.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckCircle");re=K.default=je;const le=t=>a=>{a({type:"SET_IS_DATASOURCE_SAVED",isDsSaved:t})};var X={},Pe=Q;Object.defineProperty(X,"__esModule",{value:!0});var oe=X.default=void 0,$e=Pe(B()),Me=G,Ue=(0,$e.default)((0,Me.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline");oe=X.default=Ue;const ce=T({name:"vtwnvy",styles:"height:12px!important;width:12px!important;color:white;margin:0px 4px"}),He=t=>T("display:flex;align-items:center;background:",t.primary,";color:white;font-size:11px;padding:4px;border-radius:3px;margin-right:10px;cursor:pointer;span{margin-right:4px;font-weight:bold;}",""),qe=T({name:"1t9g6tg",styles:"display:flex;align-items:center;background:#b62c14;color:white;font-size:12px;padding:4px;border-radius:3px;margin-right:10px;cursor:pointer;span{margin-right:4px;font-weight:bold;}"}),Ve=T({name:"9hkg7e",styles:"display:flex;align-items:center;font-size:12px;&.loading-icon{height:14px;width:14px;}"}),Be=({setIsSaved:t})=>{const a=$();return h("div",{className:J(He(a)),onClick:s=>t(!1),children:[e(re,{className:J(ce)})," ",e("span",{children:"Saved"})]})},Y=({errorText:t})=>h("div",{className:J(qe),children:[e(oe,{className:J(ce)})," ",e("span",{children:t})]});function q(t){const{onClickAdd:a,isAdd:s,title:c,isEditing:l,fieldErrors:f}=t,S=_(),[C,v]=O.useState(!1);return O.useEffect(()=>(l&&(setTimeout(()=>{v(!0),S(le(!0))},800),v(!1)),v(!1),()=>{v(!1)}),[l]),h(Ne,{children:[c,h("div",{className:"edit-buttons",children:[l&&h("div",{className:Ve,children:[e(ie,{style:{height:"13px",width:"13px"}})," ","Saving ..."]}),(f==null?void 0:f.protocol)&&e(Y,{errorText:"Insecure Mixed Content. Mixing HTTP and HTTPS is insecure and is not supported."}),(f==null?void 0:f.url)&&e(Y,{errorText:"Please complete API URL"}),C&&e(Be,{setIsSaved:v}),s&&e(P,{children:e(we,{fontSize:"small",style:{cursor:"pointer",display:"flex"},onClick:a})})]})]})}const Qe=t=>{const a=_(),s=A(u=>u.dataSources),[c,l]=O.useState(!1),{headers:f,id:S}=t,[C,v]=O.useState((t==null?void 0:t.cors)||!1),y=u=>{const m=u.target.checked,n=s.map(r=>(r.id===S&&(r.cors=m),r));v(()=>m),localStorage.setItem("dataSources",JSON.stringify(n)),a(z(n))},x=(u,m,n)=>{l(()=>!0);const r=u.target.value,g=(s.find(p=>p.id===S).headers||[]).map(p=>(p.id===m&&(p[n]=r),p)),o=s.map(p=>(p.id===S&&(p.headers=[...g]),p));localStorage.setItem("dataSources",JSON.stringify(o)),a(z(o)),setTimeout(()=>{l(()=>!1)},800)},N=u=>{u.preventDefault();const m=s==null?void 0:s.find(i=>i.id===S),n=m.headers,r=JSON.parse(JSON.stringify([...s]));if(f.length>0){const i={...n[n.length-1],id:Z()},d={...m,headers:[...m.headers,i]},g=r==null?void 0:r.map(o=>o.id===S?{...d}:o);localStorage.setItem("dataSources",JSON.stringify(g)),a(z(g))}},k=(u,m)=>{const n=s==null?void 0:s.find(o=>o.id===S),i=[...f].filter(o=>o.id!==m),d={...n,headers:[...i]},g=s==null?void 0:s.map(o=>o.id===S?{...d}:o);localStorage.setItem("dataSources",JSON.stringify(g)),a(z(g))};return e("div",{className:"",children:f&&h(P,{children:[e(q,{title:"Custom HTTP Headers",isEdit:!1,isAdd:!0,isEditing:c,onClickAdd:N}),h(E,{children:[e(U,{children:"Use CORS"})," ",e(M,{size:"small",checked:C,onChange:y})]}),f==null?void 0:f.map((u,m)=>e(E,{children:h(H,{children:[e(F,{label:"header",value:w.sanitize(u.header),onChange:n=>x(n,u.id,"header")}),e(F,{label:"value",value:w.sanitize(u.value),onChange:n=>x(n,u.id,"value")}),e(te,{onClick:n=>k(n,u.id),style:{cursor:"pointer",marginLeft:"10px"},fontSize:"small"})]})},m))]})})};function Ge(t){console.log(t);const a=ge(),s=$(),c=A(y=>y.urlLocation),l=_(),{title:f}=t,S=A(y=>y.isDsSaved),C=O.useMemo(()=>S?"Save":"Back",[S]),v=()=>{let y=(c==null?void 0:c.length)>0;l(le(!1)),a((y||C==="Back")&&f!=="DataSources"?-1:"/")};return h("div",{className:"ds-header",children:[e("div",{style:{display:"flex",alignItems:"center"},children:h("div",{style:{display:"flex",flexDirection:"column"},children:[h("div",{style:{display:"flex"},children:[e(he,{}),e("h1",{children:f})]}),h("p",{style:{color:s.contrast,fontSize:"10px",marginTop:"5px",marginLeft:"10px",opacity:".5"},children:["v","0.25.1"]})]})}),e(j,{value:w.sanitize(C),onClick:v,editing:!0,primary:S})]})}const We=t=>{const{id:a,name:s,regex:c,urlLabel:l,internalLink:f,linkType:S,locked:C,dataSourceId:v,fieldEditing:y}=t,x=_(),N=A(i=>i.dataSources),k=O.useMemo(()=>N.map(i=>({name:i.name,value:i.id})),[N]),u=(i,d)=>{y();const g=JSON.parse(JSON.stringify(N)),L=g.find(b=>b.id===v).linkedFields.map(b=>b.id===a?{...b,[i]:d}:b);return g.map(b=>b.id===v?{...b,linkedFields:L}:b)},m=i=>{y();const d=JSON.parse(JSON.stringify(N)),p=d.find(b=>b.id===v).linkedFields.filter(b=>b.id!==a),L=d.map(b=>b.id===v?{...b,linkedFields:[...p]}:b);localStorage.setItem("dataSources",JSON.stringify(L)),x(z(L))},n=(i,d)=>{y();const g=i.target.value,o=u(d,g);localStorage.setItem("dataSources",JSON.stringify(o)),x(z(o))},r=(i,d)=>{y();const g=!!i.target.checked,o=u(d,g);localStorage.setItem("dataSources",JSON.stringify(o)),x(z(o))};return h(be,{children:[h(E,{children:[e(F,{value:w.sanitize(s),label:"Name",onChange:i=>n(i,"name")}),e(F,{value:w.sanitize(c),label:"Regex",onChange:i=>n(i,"regex")}),e(F,{value:w.sanitize(l),label:"URL Label",onChange:i=>n(i,"urlLabel")}),e(te,{onClick:m,fontSize:"small",style:{marginLeft:"10px",cursor:"pointer",display:C?"none":"inline-block"}})]}),h(E,{className:"internal",children:[e(se,{value:f,label:"Internal Link",onChange:i=>r(i,"internalLink")}),e(ne,{label:"",value:w.sanitize(S),opts:k,selectType:"linkedField",onChange:i=>n(i,"linkID")})]})]})};class Ke{constructor(){I(this,"id");I(this,"dataSource");I(this,"ds_id");I(this,"name");I(this,"regex");I(this,"query");I(this,"urlLabel");I(this,"url");I(this,"internalLink");I(this,"linkType");this.id=Z(),this.dataSource="Logs",this.ds_id="logs",this.name="traceID",this.regex='^.*?"traceID" ="(w+)".*$/',this.query="${__value.raw}",this.urlLabel="",this.url="",this.internalLink=!0,this.linkType="Traces"}create(){const{id:a,dataSource:s,ds_id:c,name:l,regex:f,query:S,urlLabel:C,url:v,internalLink:y,linkType:x}=this;return{id:a,dataSource:s,ds_id:c,name:l,regex:f,query:S,urlLabel:C,url:v,internalLink:y,linkType:x}}}const Xe=t=>{const{linkedFields:a,name:s,id:c}=t,l=A(x=>x.dataSources),f=_(),[S,C]=O.useState(!1),v=()=>{const x=new Ke;x.dataSource=s,x.create();const k=[...JSON.parse(JSON.stringify(a)),{...x}],u=JSON.parse(JSON.stringify(l)),m=u==null?void 0:u.map(n=>n.id===c?{...n,linkedFields:k}:n);localStorage.setItem("dataSources",JSON.stringify(m)),f(z(m))},y=()=>{C(()=>!0),setTimeout(()=>{C(()=>!1)},800)};return(a==null?void 0:a.length)>0?h(P,{children:[e(q,{title:"Linked Fields",isEdit:!0,isAdd:!0,onClickAdd:v,isEditing:S}),e(V,{children:a==null?void 0:a.map((x,N)=>e(We,{...x,dataSourceId:c,locked:!1,fieldEditing:y},N))})]}):null};function Ye(t){const{value:a,label:s,onChange:c,placeholder:l}=t;return h(H,{children:[e(U,{children:s}),e(Oe,{className:"ds-input",onChange:c,placeholder:l,value:w.sanitize(a)})]})}function Ze(t){const{auth:a,id:s}=t,c=_(),l=A(n=>n.dataSources),[f,S]=O.useState([]),[C,v]=O.useState(!1),y=O.useMemo(()=>{var n;return(n=Object.entries(a))==null?void 0:n.map(([r,i])=>({name:r,...i})).filter(r=>r.name!=="fields")},[a]),x=O.useMemo(()=>{var n;return(n=Object.entries(a))==null?void 0:n.map(([r,i])=>({name:r,...i})).find(r=>r.name==="fields")},[a]),N=(n,r)=>{const i=JSON.parse(JSON.stringify(a));i[r].value=n;const g=JSON.parse(JSON.stringify(l)).map(o=>o.id===s?{...o,auth:{...i}}:o);return localStorage.setItem("dataSources",JSON.stringify(g)),c(z(g)),g};O.useEffect(()=>{var r,i;const n=(i=(r=y.filter(d=>d.form_type==="switch"&&!!(d!=null&&d.value)))==null?void 0:r.filter(d=>!!d.withFields))==null?void 0:i.map(d=>d.name);S(n)},[y,S]);const k=(n,r)=>{v(()=>!0);const i=n.target.value;N(i,r),setTimeout(()=>{v(()=>!1)},800)},u=(n,r)=>{v(()=>!0);const i=n.target.checked;N(i,r),setTimeout(()=>{v(()=>!1)},800)},m=(n,r,i)=>{var b;v(()=>!0);const d=n.target.value,g=JSON.parse(JSON.stringify(a)),o={...g,fields:{...g.fields,[i]:(b=g==null?void 0:g.fields[i])==null?void 0:b.map(D=>D.name===r?(D.value=d,{...D}):D)}},p=JSON.parse(JSON.stringify([...l])),L=p==null?void 0:p.map(D=>(D.id===s&&(D.auth=o),D));localStorage.setItem("dataSources",JSON.stringify(L)),c(z(L)),setTimeout(()=>{v(()=>!1)},600)};return h(P,{children:[e(q,{title:"HTTP Auth Fields",isEditing:C,isEdit:!1,isAdd:!1}),h(V,{children:[y&&y.map((n,r)=>n.form_type==="select"?e(ne,{value:w.sanitize(n.value),name:w.sanitize(n.name),onChange:i=>k(i,n.name),locked:!1,opts:n.options,label:n.label},r):n.form_type==="switch"?e(se,{label:n.label,value:n.value,onChange:i=>u(i,n.name)},r):null),e(E,{children:f&&f.map((n,r)=>{var i;return e(E,{children:x[n]&&((i=x[n])==null?void 0:i.map((d,g)=>d.form_type==="input"||d.form_type==="password"?e(F,{onChange:o=>m(o,d.name,n),type:d.form_type,value:w.sanitize(d.value),label:d.label,placeholder:d.placeholder},g):d.form_type==="textarea"?e(Ye,{onChange:o=>m(o,d.name,n),value:w.sanitize(d.value),label:d.label,placeholder:d.placeholder},g):null))},r)})})]})]})}const et=pe("div",{target:"emiacor0"})("position:absolute;left:0;top:0;background:",({theme:t})=>t.background,";display:flex;flex-direction:culumn;justify-content:center;color:",({theme:t})=>t.contrast,";flex:1;height:100%;width:100%;.body-cont{max-width:1440px;padding:10px;margin:10px;border-radius:3px;flex:1;background:",({theme:t})=>t.shadow,";overflow-y:auto;overflow-x:hidden;}.ds-header{padding:10px;padding-bottom:20px;font-size:24px;flex:1;display:flex;width:100%;justify-content:space-between;align-items:center;padding-left:0px;.logo{margin-right:10px;}}.ds-cont{margin-bottom:10px;border:1px solid ",({theme:t})=>t.accentNeutral,";border-radius:3px;overflow-y:auto;}.ds-item{padding:10px;border-radius:3px 3px 0px 0px;padding-bottom:14px;display:flex;.logo{padding:10px;padding-right:20px;padding-left:0px;}.ds-text{display:flex;flex-direction:column;flex:1;}.ds-type{font-size:18px;padding:10px;padding-left:0px;color:",({theme:t})=>t.contrast,";}small{font-size:12px;}.setting-icon{justify-self:flex-end;cursor:pointer;}.ds-settings{background:",({theme:t})=>t.background,";}}");function tt(){const t=A(({dataSources:a})=>a);return(t==null?void 0:t.length)>0?e("div",{style:{margin:"10px"},children:t.map((a,s)=>{const{icon:c,id:l,name:f,type:S,url:C}=a;return e("div",{className:"ds-cont",children:e(me,{to:l,children:h("div",{className:"ds-item",children:[e(ee,{icon:c}),h("div",{className:"ds-text",children:[e("div",{className:"ds-type",children:f}),h("span",{children:[h("small",{children:[S," | "," "]}),e("small",{style:{userSelect:"all"},children:C})]})]})]})})},s)})}):e("div",{children:e("h1",{children:"No Data Sources Found."})})}const at=t=>{const{headers:a,id:s,linkedFields:c,name:l,url:f,cors:S}=t,C=_(),v=A(({dataSources:r})=>r),[y,x]=O.useState({url:!1,protocol:!1}),N=(r,i)=>{let d=i;r==="url"&&(d=i.replace(/\/$/,""));const g=JSON.parse(JSON.stringify(v));return g.forEach(o=>{o.id===s&&(o[r]=d)}),g},[k,u]=O.useState(!1),m=r=>{try{const i=window.location.protocol,d=new URL(r).protocol;return{value:i===d,error:""}}catch{return{value:!1,error:"url"}}},n=(r,i)=>{u(()=>!0);const d=r.target.value;if(i==="url"){const o=m(d);if((o==null?void 0:o.error)==="url"&&x(p=>({...p,url:!0})),!(o!=null&&o.value)&&(o==null?void 0:o.error)===""&&x(p=>({...p,protocol:!0})),(o==null?void 0:o.error)===""&&(o!=null&&o.value)){x(L=>({...L,protocol:!1,url:!1}));const p=N(i,d);localStorage.setItem("dataSources",JSON.stringify(p)),C(z(p)),setTimeout(()=>{u(()=>!1)},800)}}const g=N(i,d);localStorage.setItem("dataSources",JSON.stringify(g)),C(z(g)),setTimeout(()=>{u(()=>!1)},800)};return h(De,{children:[e(q,{isEditing:k,isEdit:!0,isAdd:!1,title:"DataSource Settings",fieldErrors:y}),e(V,{children:h(E,{children:[e(F,{value:w.sanitize(l),label:"Name",onChange:r=>n(r,"name")}),e(F,{value:w.sanitize(f),label:"URL",error:y.url||y.protocol,onChange:r=>n(r,"url")})]})}),e(Ze,{...t}),e(Qe,{cors:S,headers:a,id:s}),e(Xe,{...t,linkedFields:c})]})},nt=T({name:"9rq8lq",styles:"display:flex;align-items:center;justify-content:space-between;margin-right:20px"});function st(t,a,s){let c={},l=s&&s!==""&&a&&a!=="",f=l?`${btoa(a)}:${btoa(s)}`:"",S=JSON.parse(JSON.stringify(t));return l&&f&&(c.auth=f),c.url=S,JSON.stringify(c)}function it(t){const{url:a,auth:{basicAuth:s,fields:{basicAuth:[c,l]}}}=t,[f,S]=ve(["qryn-dev-cookie","qryn-settings"]),C=_(),v=A(k=>k.dataSources),y=()=>{const k=[...v],u=JSON.parse(JSON.stringify(k)),m=u==null?void 0:u.map(n=>({...n,url:w.sanitize(a),auth:{...n.auth,basicAuth:{...n.auth.basicAuth,value:s.value},fields:{...n.auth.fields,basicAuth:[...n.auth.fields.basicAuth].map(r=>r.name==="user"?{...r,value:w.sanitize(c.value)}:r.name==="password"?{...r,value:w.sanitize(l.value)}:r)}}}));localStorage.setItem("dataSources",JSON.stringify(m)),C(z(m)),C(fe({type:"success",message:"Set same URL and Basic Auth for All Data Sources"}))};function x(){const k=new Date;new Date().setDate(k.getDate()+1);try{S("qryn-settings",st(a,c.value,l.value),{path:"/"})}catch(m){console.log(m)}}function N(){const{headers:k,id:u,name:m,linkedFields:n}=t,r=k==null?void 0:k.map(({header:o,value:p})=>({[o]:p})),d=`data:text/json;chatset=utf-8,${encodeURIComponent(JSON.stringify({id:u,name:m,headers:r,linkedFields:n}))}`,g=document.createElement("a");g.href=d,g.download=`${m}_${u}.json`,g.click()}return h("div",{className:"ds-cont",children:[h("div",{className:J(nt),children:[e(rt,{...t}),h("div",{style:{display:"flex",alignItems:"center"},children:[e(j,{title:"Download Datasource settings as JSON",value:w.sanitize("Download JSON"),onClick:N,primary:!0}),e(j,{title:"Set Cookie with name: qryn-settings",value:w.sanitize("Save Cookie"),onClick:x,primary:!0}),e(j,{title:"Use same URL and Basic Auth for all Data Sources",value:w.sanitize("Use For All"),onClick:y,primary:!0})]})]}),e("div",{className:"ds-settings",children:e(at,{...t})})]})}const rt=t=>{const{icon:a,name:s,type:c,url:l}=t;return h("div",{className:"ds-item",children:[e(ee,{icon:a}),h("div",{className:"ds-text",children:[e("div",{className:"ds-type",children:s}),h("small",{children:[w.sanitize(c)," | ",w.sanitize(l)]})]})]})};function lt(){let{id:t}=Se();const a=$(),s=A(l=>l.dataSources),c=O.useMemo(()=>!s||s.length===0?{}:s.find(l=>l.id===t)||{},[t,s]);return e(ae,{theme:a,children:e(et,{children:h("div",{className:"body-cont",children:[e(Ge,{title:"DataSource Settings",datasource:c}),e("div",{className:"datasource-body",children:e(it,{...c})})]})})})}const ot=t=>T("display:flex;flex-direction:column;flex:1;flex-wrap:wrap;width:400px;border:1px solid ",t.accentNeutral,";padding:5px;border-radius:3px;margin-left:10px;",""),ct=T({name:"1reekiy",styles:"display:flex;padding:4px 12px;font-size:14px;border-radius:4px;white-space:nowrap;align-items:center;justify-content:space-between"}),dt=T({name:"t10jb8",styles:"margin:5px"}),ut=T({name:"1wnuhlc",styles:"margin-left:20px;display:flex;align-items:center;span{font-size:12px;}"}),ht=T({name:"17moij0",styles:"align-items:center;width:100%;display:flex;margin-top:10px;justify-content:space-between;flex:1"}),pt=t=>{const[a,s]=O.useState(""),[c,l]=O.useState(""),[f,S]=O.useState(""),[C,v]=O.useState(!1),[y,x]=O.useState(!1),N=A(p=>p.dataSources),k=_(),u="Save",m=$(),n=p=>{var D;const b=(((D=p==null?void 0:p.target)==null?void 0:D.value)||"").replace(/\/$/,"");s(()=>b)},r=p=>{l(()=>p.target.value)},i=p=>{S(()=>p.target.value)},d=p=>{v(()=>p.target.checked)},g=p=>{x(()=>p.target.checked)},o=p=>{const L=JSON.parse(JSON.stringify(N)),b=L==null?void 0:L.map(D=>({...D,url:a,auth:{...D.auth,basicAuth:{...D.auth.basicAuth,value:y},fields:{...D.auth.fields,basicAuth:[...D.auth.fields.basicAuth].map(R=>R.name==="user"?{...R,value:c}:R.name==="password"?{...R,value:f}:R)}}}));localStorage.setItem("dataSources",JSON.stringify(b)),k(z(b))};return h("div",{className:J(ot(m)),children:[h("div",{className:J(ct),children:["Use one setting for all Data Sources",e(M,{checked:C,size:"small",onChange:d})]}),C&&h("div",{className:J(dt),children:[e(F,{value:w.sanitize(a),label:"url",onChange:n,placeholder:"http://qryn.dev"}),y&&h(P,{children:[e(F,{value:w.sanitize(c),label:"user",onChange:r,placeholder:"default"}),e(F,{value:w.sanitize(f),label:"password",onChange:i,type:"password",placeholder:""})]}),h("div",{className:J(ht),children:[h("div",{className:J(ut),children:[e("span",{children:"Use Basic Auth"})," ",e(M,{checked:y,size:"small",onChange:g})," "]}),e(j,{value:w.sanitize(u),onClick:o,editing:!1,primary:!0})]})]})]})};function bt(t){const a=t.replace(/#/,""),s=decodeURIComponent(a),c=new URLSearchParams(s);for(let[l,f]of c)(l==="left"||l==="right")&&JSON.parse(f)}function Ot(){const t=ye.useMediaQuery({query:"(prefers-color-scheme: dark)"}),a=_(),s=$(),c=A(l=>l.autoTheme);return O.useEffect(()=>{if(c){const l=t?"dark":"light";a(ze(l)),localStorage.setItem("theme",JSON.stringify({theme:l,auto:c}))}},[t,c,a]),h(ae,{theme:s,children:[e(Le,{children:h("div",{className:"cont",children:[e(tt,{}),e("div",{style:{display:"flex",flex:1},children:e("div",{style:{height:"40px"},children:e(pt,{})})})]})}),e(Ce,{children:e(xe,{path:":id",element:e(lt,{})})})]})}export{Ot as default,bt as getURlParams}; diff --git a/view/assets/DeleteOutlineOutlined-ca5edd1c.js b/view/assets/DeleteOutlineOutlined-2068af5e.js similarity index 73% rename from view/assets/DeleteOutlineOutlined-ca5edd1c.js rename to view/assets/DeleteOutlineOutlined-2068af5e.js index 3e43fb7a..02d20631 100644 --- a/view/assets/DeleteOutlineOutlined-ca5edd1c.js +++ b/view/assets/DeleteOutlineOutlined-2068af5e.js @@ -1 +1 @@ -import{i as a}from"./index-89b5df7a.js";import{r as i,i as n}from"./createSvgIcon-2dba4d94.js";import{j as o}from"./reactDnd-30d7bbb0.js";const v=t=>r=>{r({type:"SET_THEME",theme:t})},x=a("button",{target:"e18y13m91"})({name:"1cyd9nz",styles:"padding:3px 12px;font-size:12px;line-height:20px;cursor:pointer;user-select:none;border:none;border-radius:3px;font-weight:500;white-space:nowrap;display:flex;align-items:center"});var e={},s=n;Object.defineProperty(e,"__esModule",{value:!0});var l=e.default=void 0,u=s(i()),p=o,d=(0,u.default)((0,p.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM8 9h8v10H8V9zm7.5-5-1-1h-5l-1 1H5v2h14V4h-3.5z"}),"DeleteOutlineOutlined");l=e.default=d;export{x as B,l as d,v as s}; +import{i as a}from"./index-cb8d8b59.js";import{r as i,i as n}from"./createSvgIcon-b45af2a3.js";import{j as o}from"./reactDnd-72acd3f4.js";const v=t=>r=>{r({type:"SET_THEME",theme:t})},x=a("button",{target:"e18y13m91"})({name:"1cyd9nz",styles:"padding:3px 12px;font-size:12px;line-height:20px;cursor:pointer;user-select:none;border:none;border-radius:3px;font-weight:500;white-space:nowrap;display:flex;align-items:center"});var e={},s=n;Object.defineProperty(e,"__esModule",{value:!0});var l=e.default=void 0,u=s(i()),p=o,d=(0,u.default)((0,p.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM8 9h8v10H8V9zm7.5-5-1-1h-5l-1 1H5v2h14V4h-3.5z"}),"DeleteOutlineOutlined");l=e.default=d;export{x as B,l as d,v as s}; diff --git a/view/assets/Main-68e3709c.js b/view/assets/Main-68e3709c.js new file mode 100644 index 00000000..caf2c50d --- /dev/null +++ b/view/assets/Main-68e3709c.js @@ -0,0 +1,103 @@ +import{k as Fa,m as Va,n as $a,o as Rt,r as Oe,p as Ua,q as Ga,t as Ka,c as $2,v as oz,b as We,w as he,x as Ye,s as g2,B as Qa,y as lc,z as H1,a as ut,A as Ja,u as ge,C as zb,D as e2,E as o2,G as y1,d as O,g as D0,H as Ac,I as dc,h as i0,f as Q0,j as D,i as g0,J as Ya,K as EM,P as uc,F as q1,L as qc,l as fc,e as D2,M as Za,O as nb,R as eO,S as tO}from"./index-cb8d8b59.js";import{a as h1,d as Re,m as _1,u as w0,q as Ze,x as pM,y as it,z as Mz,A as bz,D as kM,E as _M,F as IM,G as zM,H as oO,I as MO,J as ke,K as Ve,M as cb,Q as bO,S as q2,T as pO,U as Wc,V as hc,W as rb,X as qt,Y as pz,Z as gc,$ as H2,n as U2,o as W2,a0 as zO,a1 as nO,a2 as cO,a3 as rO,a4 as iO,a5 as aO,j as C2,a6 as OO,w as h2,a7 as Vt,a8 as zz,a9 as nz,aa as sO,ab as lO,ac as AO,ad as ib,ae as dO,af as cz,v as rz,r as uO}from"./vendor-6029fc34.js";import{r as q,c as ab,g as et,R as n2,e as qO,b as mt}from"./react-432945ee.js";import{f as Rc,h as co,u as Ob,s as fO,i as WO,T as X1,C as hO,D as sb,j as lb,k as gO,l as RO,m as mO,o as LO,p as NO,q as vO,r as BO,E as yO,t as Ab,v as TO,w as mc,x as b1,b as SO,y as at,M as DM,z as xO,A as Lc,G as _e,H as XO,I as wO,J as CO,K as EO,L as Ie,N as kO,R as Nc,O as ae,d as _O,Q as vc,U as Bc,V as yc,W as db,X as St,Y as IO,Z as DO,_ as Tc,$ as iz,n as ee,a as to,a0 as Sc,a1 as PO,a2 as HO,a3 as jO,a4 as xc,a5 as Xc,a6 as wc,a7 as PM,a8 as Cc,P as xt,a9 as FO,aa as VO,ab as az,S as $O,ac as UO,ad as Oz}from"./consts-e7fba829.js";import{s as Ec,B as ub}from"./DeleteOutlineOutlined-2068af5e.js";import{l as D1}from"./lodash-fd695a79.js";import{a as GO,u as kc,r as L1,i as N1,S as f2}from"./createSvgIcon-b45af2a3.js";import{j as K0,u as KO,b as QO,H as JO,D as YO}from"./reactDnd-72acd3f4.js";import{k as _c,d as Ic,s as ZO,i as e3,g as t3,_ as o3,b as f1,S as qb,e as Dc,j as Xt,f as Pc}from"./reactSelect-75171a09.js";import{r as M3,f as sz,u as b3,g as p3,a as z3,b as n3,c as c3,d as r3,e as i3,h as a3,i as O3}from"./reactTable-9f941ddf.js";import{m as tt,d as s3,a as l3,u as lz}from"./memoize-acaceb73.js";import{w as A3,a as d3,T as u3,S as q3,E as f3,c as W3}from"./slate-25e47886.js";import{F as $t,d as wt,s as ro,e as fb}from"./AddOutlined-d979d573.js";import{P as h3,u as g3,L as Az}from"./PluginManagerFactory-a0a578f6.js";import{s as R3}from"./actions-2742fbfc.js";const Wb=e=>t=>{t({type:"SET_START_TIME",start:e})},hb=e=>t=>{t({type:"SET_STOP_TIME",stop:e})},m3=e=>t=>{t({type:"SET_QUERY_STEP",step:e})},dz=e=>t=>{t({type:"SET_RANGE_OPEN",rangeOpen:e})},gb=e=>t=>{t({type:"SET_TIME_RANGE_LABEL",label:e})},Hc=e=>t=>{t({type:"SET_QUERY_TIME",time:e})},oo=e=>t=>{t({type:"SET_QUERY_HISTORY",queryHistory:e})},jc=e=>t=>{t({type:"SET_HISTORY_OPEN",historyOpen:e})};function L3(e){return function(t){t({type:"SET_FROM_TIME",toTime:e})}}function N3(e){return function(t){t({type:"SET_TO_TIME"})}}const Ae=e=>t=>{t({type:"SET_IS_EMPTY_VIEW",isEmptyView:e})};function v3(e){return function(t){t({type:"SET_RESPONSE_TYPE",responseType:e})}}const J1=e=>t=>{t({type:"SET_RIGHT_PANEL",right:e})},c2=e=>t=>{t({type:"SET_LEFT_PANEL",left:e})},me=e=>t=>{t({type:"SET_RIGHT_DATAVIEW",rightDataView:e})},Le=e=>t=>{t({type:"SET_LEFT_DATAVIEW",leftDataView:e})},B3=e=>t=>{t({type:"SET_SPLIT_VIEW",isSplit:e})},y3=Fa(),T3=y3,S3=["component","direction","spacing","divider","children","className","useFlexGap"],x3=Va(),X3=T3("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function w3(e){return $a({props:e,name:"MuiStack",defaultTheme:x3})}function C3(e,t){const o=q.Children.toArray(e).filter(Boolean);return o.reduce((M,b,p)=>(M.push(b),p({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],k3=({ownerState:e,theme:t})=>{let o=h1({display:"flex",flexDirection:"column"},Rt({theme:t},Oe({values:e.direction,breakpoints:t.breakpoints.values}),M=>({flexDirection:M})));if(e.spacing){const M=Ua(t),b=Object.keys(t.breakpoints.values).reduce((r,s)=>((typeof e.spacing=="object"&&e.spacing[s]!=null||typeof e.direction=="object"&&e.direction[s]!=null)&&(r[s]=!0),r),{}),p=Oe({values:e.direction,base:b}),n=Oe({values:e.spacing,base:b});typeof p=="object"&&Object.keys(p).forEach((r,s,i)=>{if(!p[r]){const h=s>0?p[i[s-1]]:"column";p[r]=h}}),o=Ga(o,Rt({theme:t},n,(r,s)=>e.useFlexGap?{gap:oz(M,r)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${E3(s?p[s]:e.direction)}`]:oz(M,r)}}))}return o=Ka(t.breakpoints,o),o};function _3(e={}){const{createStyledComponent:t=X3,useThemeProps:o=w3,componentName:M="MuiStack"}=e,b=()=>We({root:["root"]},r=>he(M,r),{}),p=t(k3);return q.forwardRef(function(r,s){const i=o(r),A=Rc(i),{component:h="div",direction:g="column",spacing:d=0,divider:m,children:L,className:R,useFlexGap:W=!1}=A,S=Re(A,S3),N={direction:g,spacing:d,useFlexGap:W},x=b();return K0.jsx(p,h1({as:h,ownerState:N,ref:s,className:$2(x.root,R)},S,{children:m?C3(L,m):L}))})}function Fc({props:e,states:t,muiFormControl:o}){return t.reduce((M,b)=>(M[b]=e[b],o&&typeof e[b]>"u"&&(M[b]=o[b]),M),{})}function I3(e){return he("MuiButton",e)}const D3=Ye("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),Ut=D3,P3=q.createContext({}),H3=P3,j3=q.createContext(void 0),F3=j3,V3=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],$3=e=>{const{color:t,disableElevation:o,fullWidth:M,size:b,variant:p,classes:n}=e,c={root:["root",p,`${p}${H1(t)}`,`size${H1(b)}`,`${p}Size${H1(b)}`,t==="inherit"&&"colorInherit",o&&"disableElevation",M&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${H1(b)}`],endIcon:["endIcon",`iconSize${H1(b)}`]},r=We(c,I3,n);return h1({},n,r)},Vc=e=>h1({},e.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},e.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},e.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),U3=g2(Qa,{shouldForwardProp:e=>lc(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,t[o.variant],t[`${o.variant}${H1(o.color)}`],t[`size${H1(o.size)}`],t[`${o.variant}Size${H1(o.size)}`],o.color==="inherit"&&t.colorInherit,o.disableElevation&&t.disableElevation,o.fullWidth&&t.fullWidth]}})(({theme:e,ownerState:t})=>{var o,M;const b=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],p=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return h1({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":h1({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:ut(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="text"&&t.color!=="inherit"&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:ut(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="outlined"&&t.color!=="inherit"&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:ut(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="contained"&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:p,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},t.variant==="contained"&&t.color!=="inherit"&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":h1({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${Ut.focusVisible}`]:h1({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${Ut.disabled}`]:h1({color:(e.vars||e).palette.action.disabled},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},t.variant==="contained"&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},t.variant==="text"&&{padding:"6px 8px"},t.variant==="text"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main},t.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},t.variant==="outlined"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${ut(e.palette[t.color].main,.5)}`},t.variant==="contained"&&{color:e.vars?e.vars.palette.text.primary:(o=(M=e.palette).getContrastText)==null?void 0:o.call(M,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:b,boxShadow:(e.vars||e).shadows[2]},t.variant==="contained"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},t.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},t.size==="small"&&t.variant==="text"&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="text"&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="outlined"&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="outlined"&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="contained"&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="contained"&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})},({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${Ut.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${Ut.disabled}`]:{boxShadow:"none"}}),G3=g2("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.startIcon,t[`iconSize${H1(o.size)}`]]}})(({ownerState:e})=>h1({display:"inherit",marginRight:8,marginLeft:-4},e.size==="small"&&{marginLeft:-2},Vc(e))),K3=g2("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.endIcon,t[`iconSize${H1(o.size)}`]]}})(({ownerState:e})=>h1({display:"inherit",marginRight:-4,marginLeft:8},e.size==="small"&&{marginRight:-2},Vc(e))),Q3=q.forwardRef(function(t,o){const M=q.useContext(H3),b=q.useContext(F3),p=Ja(M,t),n=ge({props:p,name:"MuiButton"}),{children:c,color:r="primary",component:s="button",className:i,disabled:A=!1,disableElevation:h=!1,disableFocusRipple:g=!1,endIcon:d,focusVisibleClassName:m,fullWidth:L=!1,size:R="medium",startIcon:W,type:S,variant:N="text"}=n,x=Re(n,V3),w=h1({},n,{color:r,component:s,disabled:A,disableElevation:h,disableFocusRipple:g,fullWidth:L,size:R,type:S,variant:N}),l=$3(w),v=W&&K0.jsx(G3,{className:l.startIcon,ownerState:w,children:W}),B=d&&K0.jsx(K3,{className:l.endIcon,ownerState:w,children:d}),C=b||"";return K0.jsxs(U3,h1({ownerState:w,className:$2(M.className,l.root,i,C),component:s,disabled:A,focusRipple:!g,focusVisibleClassName:$2(l.focusVisible,m),ref:o,type:S},x,{classes:l,children:[v,c,B]}))}),$c=Q3,J3=zb(K0.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),Y3=zb(K0.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),Z3=zb(K0.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function es(e){return he("MuiCheckbox",e)}const ts=Ye("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),nM=ts,os=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],Ms=e=>{const{classes:t,indeterminate:o,color:M,size:b}=e,p={root:["root",o&&"indeterminate",`color${H1(M)}`,`size${H1(b)}`]},n=We(p,es,t);return h1({},t,n)},bs=g2(GO,{shouldForwardProp:e=>lc(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,o.indeterminate&&t.indeterminate,t[`size${H1(o.size)}`],o.color!=="default"&&t[`color${H1(o.color)}`]]}})(({theme:e,ownerState:t})=>h1({color:(e.vars||e).palette.text.secondary},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${t.color==="default"?e.vars.palette.action.activeChannel:e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:ut(t.color==="default"?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.color!=="default"&&{[`&.${nM.checked}, &.${nM.indeterminate}`]:{color:(e.vars||e).palette[t.color].main},[`&.${nM.disabled}`]:{color:(e.vars||e).palette.action.disabled}})),ps=K0.jsx(Y3,{}),zs=K0.jsx(J3,{}),ns=K0.jsx(Z3,{}),cs=q.forwardRef(function(t,o){var M,b;const p=ge({props:t,name:"MuiCheckbox"}),{checkedIcon:n=ps,color:c="primary",icon:r=zs,indeterminate:s=!1,indeterminateIcon:i=ns,inputProps:A,size:h="medium",className:g}=p,d=Re(p,os),m=s?i:r,L=s?i:n,R=h1({},p,{color:c,indeterminate:s,size:h}),W=Ms(R);return K0.jsx(bs,h1({type:"checkbox",inputProps:h1({"data-indeterminate":s},A),icon:q.cloneElement(m,{fontSize:(M=m.props.fontSize)!=null?M:h}),checkedIcon:q.cloneElement(L,{fontSize:(b=L.props.fontSize)!=null?b:h}),ownerState:R,ref:o,className:$2(W.root,g)},d,{classes:W}))}),rs=cs;function is(e){return he("MuiCircularProgress",e)}Ye("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const as=["className","color","disableShrink","size","style","thickness","value","variant"];let Ro=e=>e,uz,qz,fz,Wz;const Y2=44,Os=_c(uz||(uz=Ro` + 0% { + transform: rotate(0deg); + } + + 100% { + transform: rotate(360deg); + } +`)),ss=_c(qz||(qz=Ro` + 0% { + stroke-dasharray: 1px, 200px; + stroke-dashoffset: 0; + } + + 50% { + stroke-dasharray: 100px, 200px; + stroke-dashoffset: -15px; + } + + 100% { + stroke-dasharray: 100px, 200px; + stroke-dashoffset: -125px; + } +`)),ls=e=>{const{classes:t,variant:o,color:M,disableShrink:b}=e,p={root:["root",o,`color${H1(M)}`],svg:["svg"],circle:["circle",`circle${H1(o)}`,b&&"circleDisableShrink"]};return We(p,is,t)},As=g2("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,t[o.variant],t[`color${H1(o.color)}`]]}})(({ownerState:e,theme:t})=>h1({display:"inline-block"},e.variant==="determinate"&&{transition:t.transitions.create("transform")},e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].main}),({ownerState:e})=>e.variant==="indeterminate"&&Ic(fz||(fz=Ro` + animation: ${0} 1.4s linear infinite; + `),Os)),ds=g2("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),us=g2("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.circle,t[`circle${H1(o.variant)}`],o.disableShrink&&t.circleDisableShrink]}})(({ownerState:e,theme:t})=>h1({stroke:"currentColor"},e.variant==="determinate"&&{transition:t.transitions.create("stroke-dashoffset")},e.variant==="indeterminate"&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:e})=>e.variant==="indeterminate"&&!e.disableShrink&&Ic(Wz||(Wz=Ro` + animation: ${0} 1.4s ease-in-out infinite; + `),ss)),qs=q.forwardRef(function(t,o){const M=ge({props:t,name:"MuiCircularProgress"}),{className:b,color:p="primary",disableShrink:n=!1,size:c=40,style:r,thickness:s=3.6,value:i=0,variant:A="indeterminate"}=M,h=Re(M,as),g=h1({},M,{color:p,disableShrink:n,size:c,thickness:s,value:i,variant:A}),d=ls(g),m={},L={},R={};if(A==="determinate"){const W=2*Math.PI*((Y2-s)/2);m.strokeDasharray=W.toFixed(3),R["aria-valuenow"]=Math.round(i),m.strokeDashoffset=`${((100-i)/100*W).toFixed(3)}px`,L.transform="rotate(-90deg)"}return K0.jsx(As,h1({className:$2(d.root,b),style:h1({width:c,height:c},L,r),ownerState:g,ref:o,role:"progressbar"},R,h,{children:K0.jsx(ds,{className:d.svg,ownerState:g,viewBox:`${Y2/2} ${Y2/2} ${Y2} ${Y2}`,children:K0.jsx(us,{className:d.circle,style:m,ownerState:g,cx:Y2,cy:Y2,r:(Y2-s)/2,fill:"none",strokeWidth:s})})}))}),fs=qs,Ws=_3({createStyledComponent:g2("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>ge({props:e,name:"MuiStack"})}),hs=Ws;function gs(e){return he("MuiFormControlLabel",e)}const Rs=Ye("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),ft=Rs,ms=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],Ls=e=>{const{classes:t,disabled:o,labelPlacement:M,error:b,required:p}=e,n={root:["root",o&&"disabled",`labelPlacement${H1(M)}`,b&&"error",p&&"required"],label:["label",o&&"disabled"],asterisk:["asterisk",b&&"error"]};return We(n,gs,t)},Ns=g2("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[{[`& .${ft.label}`]:t.label},t.root,t[`labelPlacement${H1(o.labelPlacement)}`]]}})(({theme:e,ownerState:t})=>h1({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${ft.disabled}`]:{cursor:"default"}},t.labelPlacement==="start"&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},t.labelPlacement==="top"&&{flexDirection:"column-reverse",marginLeft:16},t.labelPlacement==="bottom"&&{flexDirection:"column",marginLeft:16},{[`& .${ft.label}`]:{[`&.${ft.disabled}`]:{color:(e.vars||e).palette.text.disabled}}})),vs=g2("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(({theme:e})=>({[`&.${ft.error}`]:{color:(e.vars||e).palette.error.main}})),Bs=q.forwardRef(function(t,o){var M,b;const p=ge({props:t,name:"MuiFormControlLabel"}),{className:n,componentsProps:c={},control:r,disabled:s,disableTypography:i,label:A,labelPlacement:h="end",required:g,slotProps:d={}}=p,m=Re(p,ms),L=kc(),R=(M=s??r.props.disabled)!=null?M:L==null?void 0:L.disabled,W=g??r.props.required,S={disabled:R,required:W};["checked","name","onChange","value","inputRef"].forEach(B=>{typeof r.props[B]>"u"&&typeof p[B]<"u"&&(S[B]=p[B])});const N=Fc({props:p,muiFormControl:L,states:["error"]}),x=h1({},p,{disabled:R,labelPlacement:h,required:W,error:N.error}),w=Ls(x),l=(b=d.typography)!=null?b:c.typography;let v=A;return v!=null&&v.type!==co&&!i&&(v=K0.jsx(co,h1({component:"span"},l,{className:$2(w.label,l==null?void 0:l.className),children:v}))),K0.jsxs(Ns,h1({className:$2(w.root,n),ownerState:x,ref:o},m,{children:[q.cloneElement(r,S),W?K0.jsxs(hs,{display:"block",children:[v,K0.jsxs(vs,{ownerState:x,"aria-hidden":!0,className:w.asterisk,children:[" ","*"]})]}):v]}))}),ys=Bs;function Ts(e){return he("MuiFormGroup",e)}Ye("MuiFormGroup",["root","row","error"]);const Ss=["className","row"],xs=e=>{const{classes:t,row:o,error:M}=e;return We({root:["root",o&&"row",M&&"error"]},Ts,t)},Xs=g2("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,o.row&&t.row]}})(({ownerState:e})=>h1({display:"flex",flexDirection:"column",flexWrap:"wrap"},e.row&&{flexDirection:"row"})),ws=q.forwardRef(function(t,o){const M=ge({props:t,name:"MuiFormGroup"}),{className:b,row:p=!1}=M,n=Re(M,Ss),c=kc(),r=Fc({props:M,muiFormControl:c,states:["error"]}),s=h1({},M,{row:p,error:r.error}),i=xs(s);return K0.jsx(Xs,h1({className:$2(i.root,b),ownerState:s,ref:o},n))}),Cs=ws,Es=q.createContext(),hz=Es;function ks(e){return he("MuiGrid",e)}const _s=[0,1,2,3,4,5,6,7,8,9,10],Is=["column-reverse","column","row-reverse","row"],Ds=["nowrap","wrap-reverse","wrap"],Ot=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],Lt=Ye("MuiGrid",["root","container","item","zeroMinWidth",..._s.map(e=>`spacing-xs-${e}`),...Is.map(e=>`direction-xs-${e}`),...Ds.map(e=>`wrap-xs-${e}`),...Ot.map(e=>`grid-xs-${e}`),...Ot.map(e=>`grid-sm-${e}`),...Ot.map(e=>`grid-md-${e}`),...Ot.map(e=>`grid-lg-${e}`),...Ot.map(e=>`grid-xl-${e}`)]),Ps=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function Pe(e){const t=parseFloat(e);return`${t}${String(e).replace(String(t),"")||"px"}`}function Hs({theme:e,ownerState:t}){let o;return e.breakpoints.keys.reduce((M,b)=>{let p={};if(t[b]&&(o=t[b]),!o)return M;if(o===!0)p={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if(o==="auto")p={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const n=Oe({values:t.columns,breakpoints:e.breakpoints.values}),c=typeof n=="object"?n[b]:n;if(c==null)return M;const r=`${Math.round(o/c*1e8)/1e6}%`;let s={};if(t.container&&t.item&&t.columnSpacing!==0){const i=e.spacing(t.columnSpacing);if(i!=="0px"){const A=`calc(${r} + ${Pe(i)})`;s={flexBasis:A,maxWidth:A}}}p=h1({flexBasis:r,flexGrow:0,maxWidth:r},s)}return e.breakpoints.values[b]===0?Object.assign(M,p):M[e.breakpoints.up(b)]=p,M},{})}function js({theme:e,ownerState:t}){const o=Oe({values:t.direction,breakpoints:e.breakpoints.values});return Rt({theme:e},o,M=>{const b={flexDirection:M};return M.indexOf("column")===0&&(b[`& > .${Lt.item}`]={maxWidth:"none"}),b})}function Uc({breakpoints:e,values:t}){let o="";Object.keys(t).forEach(b=>{o===""&&t[b]!==0&&(o=b)});const M=Object.keys(e).sort((b,p)=>e[b]-e[p]);return M.slice(0,M.indexOf(o))}function Fs({theme:e,ownerState:t}){const{container:o,rowSpacing:M}=t;let b={};if(o&&M!==0){const p=Oe({values:M,breakpoints:e.breakpoints.values});let n;typeof p=="object"&&(n=Uc({breakpoints:e.breakpoints.values,values:p})),b=Rt({theme:e},p,(c,r)=>{var s;const i=e.spacing(c);return i!=="0px"?{marginTop:`-${Pe(i)}`,[`& > .${Lt.item}`]:{paddingTop:Pe(i)}}:(s=n)!=null&&s.includes(r)?{}:{marginTop:0,[`& > .${Lt.item}`]:{paddingTop:0}}})}return b}function Vs({theme:e,ownerState:t}){const{container:o,columnSpacing:M}=t;let b={};if(o&&M!==0){const p=Oe({values:M,breakpoints:e.breakpoints.values});let n;typeof p=="object"&&(n=Uc({breakpoints:e.breakpoints.values,values:p})),b=Rt({theme:e},p,(c,r)=>{var s;const i=e.spacing(c);return i!=="0px"?{width:`calc(100% + ${Pe(i)})`,marginLeft:`-${Pe(i)}`,[`& > .${Lt.item}`]:{paddingLeft:Pe(i)}}:(s=n)!=null&&s.includes(r)?{}:{width:"100%",marginLeft:0,[`& > .${Lt.item}`]:{paddingLeft:0}}})}return b}function $s(e,t,o={}){if(!e||e<=0)return[];if(typeof e=="string"&&!Number.isNaN(Number(e))||typeof e=="number")return[o[`spacing-xs-${String(e)}`]];const M=[];return t.forEach(b=>{const p=e[b];Number(p)>0&&M.push(o[`spacing-${b}-${String(p)}`])}),M}const Us=g2("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e,{container:M,direction:b,item:p,spacing:n,wrap:c,zeroMinWidth:r,breakpoints:s}=o;let i=[];M&&(i=$s(n,s,t));const A=[];return s.forEach(h=>{const g=o[h];g&&A.push(t[`grid-${h}-${String(g)}`])}),[t.root,M&&t.container,p&&t.item,r&&t.zeroMinWidth,...i,b!=="row"&&t[`direction-xs-${String(b)}`],c!=="wrap"&&t[`wrap-xs-${String(c)}`],...A]}})(({ownerState:e})=>h1({boxSizing:"border-box"},e.container&&{display:"flex",flexWrap:"wrap",width:"100%"},e.item&&{margin:0},e.zeroMinWidth&&{minWidth:0},e.wrap!=="wrap"&&{flexWrap:e.wrap}),js,Fs,Vs,Hs);function Gs(e,t){if(!e||e<=0)return[];if(typeof e=="string"&&!Number.isNaN(Number(e))||typeof e=="number")return[`spacing-xs-${String(e)}`];const o=[];return t.forEach(M=>{const b=e[M];if(Number(b)>0){const p=`spacing-${M}-${String(b)}`;o.push(p)}}),o}const Ks=e=>{const{classes:t,container:o,direction:M,item:b,spacing:p,wrap:n,zeroMinWidth:c,breakpoints:r}=e;let s=[];o&&(s=Gs(p,r));const i=[];r.forEach(h=>{const g=e[h];g&&i.push(`grid-${h}-${String(g)}`)});const A={root:["root",o&&"container",b&&"item",c&&"zeroMinWidth",...s,M!=="row"&&`direction-xs-${String(M)}`,n!=="wrap"&&`wrap-xs-${String(n)}`,...i]};return We(A,ks,t)},Qs=q.forwardRef(function(t,o){const M=ge({props:t,name:"MuiGrid"}),{breakpoints:b}=Ob(),p=Rc(M),{className:n,columns:c,columnSpacing:r,component:s="div",container:i=!1,direction:A="row",item:h=!1,rowSpacing:g,spacing:d=0,wrap:m="wrap",zeroMinWidth:L=!1}=p,R=Re(p,Ps),W=g||d,S=r||d,N=q.useContext(hz),x=i?c||12:N,w={},l=h1({},R);b.keys.forEach(C=>{R[C]!=null&&(w[C]=R[C],delete l[C])});const v=h1({},p,{columns:x,container:i,direction:A,item:h,rowSpacing:W,columnSpacing:S,wrap:m,zeroMinWidth:L,spacing:d},w,{breakpoints:b.keys}),B=Ks(v);return K0.jsx(hz.Provider,{value:x,children:K0.jsx(Us,h1({ownerState:v,className:$2(B.root,n),as:s,ref:o},l))})}),z2=Qs;const Js=e=>t=>{t({type:"SET_IS_EMBED",isEmbed:e})},Ys=e=>t=>{t({type:"SET_URL_LOCATION",urlLocation:e})},Zs=e=>t=>{t({type:"SET_URL_QUERY_PARAMS",urlQueryParams:e})},$e=e=>t=>{t({type:"SET_SPLIT_VIEW",isSplit:e})},Gt=["step","theme","time"],el=["label"],cM=["left","right"],Kt=["start","stop"],Qt=["isSubmit","isSplit","autoTheme","isEmbed"];function tl(){const e=q.useMemo(()=>window.matchMedia("(prefers-color-scheme: light)").matches,[]),t=_1(),o=w0(({urlQueryParams:v})=>v),M=w0(({start:v})=>v),b=w0(({stop:v})=>v),p=w0(({label:v})=>v),n=w0(({from:v})=>v),c=w0(({to:v})=>v),r=w0(({step:v})=>v),s=w0(({isSubmit:v})=>v),i=w0(({isEmbed:v})=>v),A=w0(({time:v})=>v),h=w0(({left:v})=>v),g=w0(({right:v})=>v),d=w0(({theme:v})=>v),m=w0(({autoTheme:v})=>v),L=w0(({isSplit:v})=>v),[R,W]=q.useState(e?"light":d);q.useEffect(()=>{W(d)},[d]);const S={start:M,step:r,stop:b,label:p,from:n,to:c,time:A,isSubmit:s,isEmbed:i,theme:d,autoTheme:m,left:h,right:g,isSplit:L},N={start:Wb,step:m3,stop:hb,label:gb,from:L3,to:N3,time:Hc,isSubmit:fO,isEmbed:Js,theme:Ec,left:c2,right:J1,isSplit:$e,autoTheme:WO},x=v=>(v==null?void 0:v.getTime())+"000000",w=(v,B)=>{try{let C=JSON.parse(v);return C&&C!==void 0?C:B}catch{return B}},{hash:l}=Ze();q.useEffect(()=>{const v=new URLSearchParams(l.replace(/#/,""));if(l.length>0){const B=o;for(let[C,k]of v.entries())B[C]=k;Object.keys(B).length>0&&(t(Zs({...o,startParams:B})),t(Ys(l)),Object.keys(B).forEach(C=>{if((Gt.includes(C)||el.includes(C))&&B[C]!=="")t(N[C](e2.sanitize(B[C])));else if(C==="theme")t(N[C](e2.sanitize(R)));else if(Kt.includes(C)&&B[C]!==""){const k=B[C]/1e6,_=new Date(o2(k).format("YYYY-MM-DDTHH:mm:ss.SSSZ"));t(N[C](_))}else if(Qt.includes(C))try{const k=w(B[C],!1);t(N[C](k))}catch(k){console.log(k)}else if(cM.includes(C))try{const k=w(decodeURIComponent(B[C]),[]);(k==null?void 0:k.length)>0&&t(N[C](k))}catch(k){console.log(k)}}))}else Gt.concat(Kt).concat(Qt).concat(cM).forEach(C=>{var k,_;if(Gt.includes(C))v.set(C,e2.sanitize((k=S[C])==null?void 0:k.toString()));else if(C==="theme")v.set(C,e2.sanitize(R.toString()));else if(Kt.includes(C)){const I=((_=S[C])==null?void 0:_.getTime())*1e6;v.set(C,e2.sanitize(I.toString()))}else if(Qt.includes(C))try{v.set(C,w(S[C],!1))}catch(I){console.log(I)}else if(cM.includes(C))try{const I=JSON.stringify(S[C]);v.set(C,I)}catch(I){console.log(I)}}),window.location.hash=v},[]),q.useEffect(()=>{if(l.length>0){const v=new URLSearchParams(l.replace(/#/,""));let B={};for(let[C,k]of v.entries())B[C]=k;Object.keys(S).forEach(C=>{if(Gt.includes(C)&&B[C]!==S[C]){const k=e2.sanitize(S[C].toString().trim());v.set(C,k)}else if(Kt.includes(C)&&B[C]!==x(S[C])){const k=x(S[C]);v.set(C,e2.sanitize(k))}else if(Qt.includes(C)&&B[C]!==S[C])try{v.set(C,w(S[C],!1))}catch(k){console.error(k)}else if(C==="left"){const k=JSON.stringify(h);v.set("left",k)}else if(C==="right"){const k=JSON.stringify(g);v.set("right",k)}}),window.location.hash=v}},[S])}function ol(e,t,o){const{queryUrl:M,encodedQuery:b,limit:p,parsedTime:n,queryStep:c,direction:r,time:s}=t;return e==="metrics"||e==="logs"?o==="instant"?`${M}/query?query=${b}&limit=${p}&time=${s}&direction=${r}`:`${M}/query_range?query=${b}&limit=${p}${n}${c}&direction=${r}`:e==="flux"?`${M}`:e==="traces"?o==="trace-search"?`${M}${n}`:`${M}`:""}function Ml(e,t,o){return ol(e,o,t)}function bl(e,t){var M;const o=((M=Object.keys(t))==null?void 0:M.length)>0?t:void 0;return e==="flux"?{method:"POST",headers:o||{Accept:"application/csv","Content-Type":"application/vnd.flux"}}:{method:"GET",headers:o||{"Content-Type":"application/json"}}}const pl=(e,t)=>Array.from({length:Math.ceil(e.length/t)},(o,M)=>e.slice(M*t,M*t+t)),rM=(...e)=>e.filter(t=>t).join(" "),zl=e=>{const t=_M(oO(e)),o=IM(MO(e)),M=[];for(let b=t;ke(b,o);)M.push(b),b=kM(b,1);return M},nl=({dateStart:e},t)=>e&&Ve(t,e),cl=({dateEnd:e},t)=>e&&Ve(t,e),rl=({dateStart:e,dateEnd:t},o)=>e&&t&&(cb(o,{start:e,end:t})||Ve(o,e)||Ve(o,t)),il=({dateStart:e,dateEnd:t})=>e&&t?Ve(e,t):!1,mo=e=>Rb(new Date).find(t=>t.label===e),gz=(e,t)=>{if(e instanceof Date){const o=bO(e);if(q2(o))return o}if(e instanceof String){const o=pO(e.toString());if(q2(o))return o}else return t},al=(e,t)=>{var M,b;const o=Math.floor(t/2);return(b=(M=Array(t))==null?void 0:M.fill(0))==null?void 0:b.map((p,n)=>(e==null?void 0:e.getFullYear())-o+n)},Rz=(e,t)=>{const{dateStart:o,dateEnd:M,label:b}=e,{dateStart:p,dateEnd:n,label:c}=t;return b===c?!0:o&&p&&M&&n?pz(o,p)&&pz(M,n):!1},Ol=(e,t,o)=>{let{dateStart:M,dateEnd:b}=e;if(M&&b){const p=Wc([M,t]),n=hc([b,o]);return[p,rb(p,n)?qt(p,1):n]}else return[M,b]},Rb=e=>[{label:"Last 5 minutes",dateStart:pM(e,-5),dateEnd:e},{label:"Last 15 minutes",dateStart:pM(e,-15),dateEnd:e},{label:"Last 30 minutes",dateStart:pM(e,-30),dateEnd:e},{label:"Last 1 hour",dateStart:it(e,-1),dateEnd:e},{label:"Last 3 hours",dateStart:it(e,-3),dateEnd:e},{label:"Last 6 hours",dateStart:it(e,-6),dateEnd:e},{label:"Last 12 hours",dateStart:it(e,-12),dateEnd:e},{label:"Last 24 hours",dateStart:it(e,-24),dateEnd:e},{label:"Today",dateStart:Mz(e),dateEnd:bz(e)},{label:"Yesterday",dateStart:Mz(kM(e,-1)),dateEnd:bz(kM(e,-1))},{label:"This Week",dateStart:_M(e),dateEnd:IM(e)},{label:"Last Week",dateStart:_M(zM(e,-1)),dateEnd:IM(zM(e,-1))},{label:"Last 7 Days",dateStart:zM(e,-1),dateEnd:e}];Rb(new Date);function sl(e){return e/1e6}function te(e){return new Date(e).getTime()+"000000"}function De(e){let t=new Date(e);return Math.round(t.getTime()/1e3)}const ll=e=>e||parseInt(new Date().getTime()+"000000"),Al=(e,t)=>{let o=mo(e);const{dateStart:M,dateEnd:b}=o;let p,n;return t==="metrics"?(p=De(M),n=De(b)):(p=parseInt(te(M)),n=parseInt(te(b))),{pStart:p,pStop:n,dateStart:M,dateEnd:b}};function mb(e,t,o){const{time:M,from:b,to:p}=y1.getState(),n=y1.getState()[o],c=n==null?void 0:n.find(N=>N.id===t),r=c.start,s=c.stop,i=ll(M),A=c.label,h=r,g=s;let d=0,m=0;if(mo(A)){const{pStart:N,pStop:x}=Al(A,e);e==="traces"?(d=Math.round(N/1e9),m=Math.round(x/1e9)):(d=N,m=x)}else e==="metrics"?(d=De(h),m=De(g)):e==="logs"?(d=parseInt(te(h)),m=parseInt(te(g))):e==="traces"?(d=De(h),m=De(g)):(d=parseInt(te(h)),m=parseInt(te(g)));const L="&start="+(b||d)+"&end="+(p||m),R=parseInt(b||d);return{tDiff:(parseInt(p||m)-R)/(e==="metrics"?1:1e6),time:i,parsedTime:L}}function dl(e,t,o,M,b,p="",n,c,r,s,i){const A=y1.getState(),{isSplit:h}=A,g=h?2:1,d=window.innerWidth,{parsedTime:m,time:L}=mb(e,s,i),R=p;let W=0;r>0?W=r:W=d/Math.round(d/M*10/g),W===0&&(W=1);const S=`&step=${W}`,N=`${encodeURIComponent(t)}`;let x="";switch(e){case"logs":x=`${R}/loki/api/v1`;break;case"metrics":x=`${R}/api/v1`;break;case"flux":x=`${R}/api/v2/query`;break;case"traces":x=n==="trace-search"?`${c}`:`${R}/api/traces/${t}/json`;break;default:x=`${R}/loki/api/v1`}return{queryUrl:x,encodedQuery:N,parsedTime:m,time:L,queryStep:S,limit:o,direction:b,queryType:n}}async function HM(e){e(Ae(!0))}function Gc(e){let t=[];try{for(let o of e){let M=Object.keys(o.metric);for(let b in M)t.includes(M[b])||t.push(M[b])}}catch(o){console.log(o)}return t}function jM(e){let t=[];try{for(let o of e){let M=Object.keys(o);for(let b of M)t.includes(b)||t.push(b)}}catch(o){console.log(o)}return t}function Mo(e,t="logs"){if(t==="flux"||t==="traces")try{return e}catch(o){console.log(o)}else{const o=Gc(e);try{let M=[];const b=e.length,p=o.length;for(let c=0;cc.time)}catch(M){console.log(M)}}}const ul={locale:"en",long:{year:{previous:"last year",current:"this year",next:"next year",past:{one:"{0} year ago",other:"{0} years ago"},future:{one:"in {0} year",other:"in {0} years"}},quarter:{previous:"last quarter",current:"this quarter",next:"next quarter",past:{one:"{0} quarter ago",other:"{0} quarters ago"},future:{one:"in {0} quarter",other:"in {0} quarters"}},month:{previous:"last month",current:"this month",next:"next month",past:{one:"{0} month ago",other:"{0} months ago"},future:{one:"in {0} month",other:"in {0} months"}},week:{previous:"last week",current:"this week",next:"next week",past:{one:"{0} week ago",other:"{0} weeks ago"},future:{one:"in {0} week",other:"in {0} weeks"}},day:{previous:"yesterday",current:"today",next:"tomorrow",past:{one:"{0} day ago",other:"{0} days ago"},future:{one:"in {0} day",other:"in {0} days"}},hour:{current:"this hour",past:{one:"{0} hour ago",other:"{0} hours ago"},future:{one:"in {0} hour",other:"in {0} hours"}},minute:{current:"this minute",past:{one:"{0} minute ago",other:"{0} minutes ago"},future:{one:"in {0} minute",other:"in {0} minutes"}},second:{current:"now",past:{one:"{0} second ago",other:"{0} seconds ago"},future:{one:"in {0} second",other:"in {0} seconds"}}},short:{year:{previous:"last yr.",current:"this yr.",next:"next yr.",past:"{0} yr. ago",future:"in {0} yr."},quarter:{previous:"last qtr.",current:"this qtr.",next:"next qtr.",past:{one:"{0} qtr. ago",other:"{0} qtrs. ago"},future:{one:"in {0} qtr.",other:"in {0} qtrs."}},month:{previous:"last mo.",current:"this mo.",next:"next mo.",past:"{0} mo. ago",future:"in {0} mo."},week:{previous:"last wk.",current:"this wk.",next:"next wk.",past:"{0} wk. ago",future:"in {0} wk."},day:{previous:"yesterday",current:"today",next:"tomorrow",past:{one:"{0} day ago",other:"{0} days ago"},future:{one:"in {0} day",other:"in {0} days"}},hour:{current:"this hour",past:"{0} hr. ago",future:"in {0} hr."},minute:{current:"this minute",past:"{0} min. ago",future:"in {0} min."},second:{current:"now",past:"{0} sec. ago",future:"in {0} sec."}},narrow:{year:{previous:"last yr.",current:"this yr.",next:"next yr.",past:"{0}y ago",future:"in {0}y"},quarter:{previous:"last qtr.",current:"this qtr.",next:"next qtr.",past:"{0}q ago",future:"in {0}q"},month:{previous:"last mo.",current:"this mo.",next:"next mo.",past:"{0}mo ago",future:"in {0}mo"},week:{previous:"last wk.",current:"this wk.",next:"next wk.",past:"{0}w ago",future:"in {0}w"},day:{previous:"yesterday",current:"today",next:"tomorrow",past:"{0}d ago",future:"in {0}d"},hour:{current:"this hour",past:"{0}h ago",future:"in {0}h"},minute:{current:"this minute",past:"{0}m ago",future:"in {0}m"},second:{current:"now",past:"{0}s ago",future:"in {0}s"}},now:{now:{current:"now",future:"in a moment",past:"just now"}},mini:{year:"{0}yr",month:"{0}mo",week:"{0}wk",day:"{0}d",hour:"{0}h",minute:"{0}m",second:"{0}s",now:"now"},"short-time":{year:"{0} yr.",month:"{0} mo.",week:"{0} wk.",day:{one:"{0} day",other:"{0} days"},hour:"{0} hr.",minute:"{0} min.",second:"{0} sec."},"long-time":{year:{one:"{0} year",other:"{0} years"},month:{one:"{0} month",other:"{0} months"},week:{one:"{0} week",other:"{0} weeks"},day:{one:"{0} day",other:"{0} days"},hour:{one:"{0} hour",other:"{0} hours"},minute:{one:"{0} minute",other:"{0} minutes"},second:{one:"{0} second",other:"{0} seconds"}}},ql=()=>y1.getState().theme==="light"?Ac:dc,fl=e=>i0("border:none;background:none;color:",e.primaryLight,";cursor:pointer;&:hover{text-decoration:underline;}","");gc.addDefaultLocale(ul);function Wl(e){return o2(parseInt(e.getValue()+"000")).format("YYYY-MM-DDTHH:mm:ss.SSZ")}function hl(e){return e.getValue()+" ms"}function gl(e){return new gc("en-US").format(e.getValue()/1e6)}function Rl(e,t){const o=y1.dispatch,M=y1.getState()[e.panel],b=y1.getState().right,p=window.innerWidth<=1013,n=M.find(s=>s.id===e.id);e.panel==="left"&&!p&&o($e(!0));let c=JSON.parse(JSON.stringify(b));const r=JSON.parse(JSON.stringify(n));try{const s={...c[0],id:c[0].id,idRef:"Trace "+t,panel:"right",queryType:"range",dataSourceType:"traces",dataSourceId:e.dataSourceId,dataSourceURL:e.url,expr:t,limit:100,step:100,tableView:!1,chartView:!1,isShowTs:!1,isBuilder:!1,isLogsVolume:!1,browserOpen:!1,open:!0,labels:[],values:[],direction:"backwards"};o(J1([s])),o(w2("traces",t,"range",r.limit||100,"right",s.id,"backwards",e.dataSourceId,e.url))}catch(s){console.log(s)}}function ml(e){return o2(e.getValue()).format("YYYY-MM-DDTHH:mm:ss.SSZ")}function Ll(e,t="logs",o,M={}){var n,c;const b=(c=(n=y1.getState())==null?void 0:n[M.panel])==null?void 0:c.find(r=>r.id===M.id);b&&(M.dataSourceId=b.dataSourceId,M.url=b.dataSourceURL);const p=ql();return e.length>0&&t==="traces"?e==null?void 0:e.map(r=>r.accessorKey==="durationMs"?{header:"Duration Ms",accessorKey:r.accessorKey,cell:s=>hl(s)}:r.accessorKey==="startTimeUnixNano"?{header:"Start Time",accessorKey:r.accessorKey,cell:s=>gl(s)}:r.accessorKey==="traceID"||r.accessorKey==="traceId"?{header:"Trace Id",accessorKey:r.accessorKey,cell:s=>O("button",{onClick:i=>Rl(M,s.getValue()),className:D0(fl(p)),children:s.getValue()})}:r.accessorKey==="rootServiceName"?{header:"Service Name",accessorKey:r.accessorKey,cell:s=>s.getValue()}:r.accessorKey==="rootTraceName"?{header:"Trace Name",accessorKey:r.accessorKey,cell:s=>s.getValue()}:r):e.length>0&&t==="flux"?e==null?void 0:e.map(r=>r.accessorKey===o||r.accessorKey==="_time"?{header:"Time",accessorKey:r.accessorKey,cell:s=>ml(s)}:r):e.length>0?[{header:"Time",accessorKey:"time",cell:r=>Wl(r)},...e,{header:"Value",accessorKey:"value"}]:[]}function bo(e,t="logs",o,M={}){const b=e==null?void 0:e.map(n=>({header:n,accessorKey:n,id:n,cell:c=>c.getValue()}));return Ll(b,t,o,M)}function iM(e){return e==="left"?{state:"leftDataView",action:Le}:{state:"rightDataView",action:me}}function Kc(e){var i,A,h,g,d,m;const{result:t,debugMode:o,dispatch:M,panel:b,id:p,type:n,dsType:c,raw:r}=e;let s={panel:b,id:p,type:n};if(n==="traces")try{const L=jM(t),R=W=>{const S=W[0],N=Object.entries(S);if(N){const x=N.find(([w,l])=>H2(l));return(x==null?void 0:x[0])||null}};if(L.length>0){const W=R(t),N=bo(L,n,W,{panel:b,id:p,type:n}),x=Mo(t,n),w={columnsData:N,dataRows:x,panel:b,id:p};if((N==null?void 0:N.length)>0&&(x==null?void 0:x.length)>0){const l={id:p,type:"vector",raw:r,dsType:c,data:{tableData:w},tableData:w,total:((i=w==null?void 0:w.dataRows)==null?void 0:i.length)||0},v=iM(b),{action:B,state:C}=v,k=(A=y1.getState())==null?void 0:A[C];if(k.some(_=>_.id===l.id)){let _=[];M(B([])),_=[...k.filter(Q=>Q.id!==l.id),{...l}],M(B(_))}else{let _=[...k,l];M(B(_))}}}}catch(L){console.log(L)}else if(n==="flux")try{const L=jM(t),R=W=>{const S=W[0],N=Object.entries(S);if(N){const x=N.find(([w,l])=>H2(l));return(x==null?void 0:x[0])||null}};if(L.length>0){const W=R(t),S=bo(L,n,W,s),N=Mo(t,n),x={columnsData:S,dataRows:N,panel:b,id:p};if((S==null?void 0:S.length)>0&&(N==null?void 0:N.length)>0){const w={id:p,type:"vector",data:{tableData:x},raw:r,dsType:c,tableData:x,total:((h=x==null?void 0:x.dataRows)==null?void 0:h.length)||0},l=iM(b),{action:v,state:B}=l,C=(g=y1.getState())==null?void 0:g[B];if(C.some(k=>k.id===w.id)){let k=[];M(v([])),k=[...C.filter(I=>I.id!==w.id),{...w}],M(v(k))}else{let k=[...C,w];M(v(k))}}}}catch(L){console.log(L)}else try{const L=Gc(t);if(L.length>0){const R=bo(L,n,null,s),W=Mo(t),S={columnsData:R,dataRows:W,panel:b,id:p};if(R.length>0&&W.length>0){const N={id:p,type:"vector",data:{tableData:S},raw:r,dsType:c,tableData:S||{},total:((d=S==null?void 0:S.dataRows)==null?void 0:d.length)||0},x=iM(b),{action:w,state:l}=x,v=(m=y1.getState())==null?void 0:m[l];if(v.some(B=>B.id===N.id)){let B=[];M(w([])),B=[...v.filter(k=>k.id!==N.id),{...N}],M(w(B))}else{let B=[...v,N];M(w(B))}}}}catch(L){o&&console.log("🚧 getData / getting an error from rendering vector type streams"),console.log(L)}}function Qc(e){return(e==null?void 0:e.map(t=>({...t,id:U2()})))||[]}function Nl(e){return o2(e.getValue()*1e3).format("YYYY-MM-DDTHH:mm:ss.SSZ")}function vl(e){return e.map(({metric:t,values:o})=>({metric:JSON.stringify(t),rows:o.map(([M,b])=>({time:M,metric:JSON.stringify(t),value:b})),get rowsLength(){var M;return(M=this.rows)==null?void 0:M.length},get title(){return`'${this.metric}' (${this.rowsLength})`}}))}function Bl(e){const t=[{header:"Time",accessorKey:"time",cell:p=>Nl(p)},{header:"Metric",accessorKey:"metric"},{header:"Value",accessorKey:"value"}],o=vl(e);let M=[];for(let p of o)M.push(p.rows);const b=D1.sortBy(M.flat(),p=>p.time);return{columnsData:t,dataRows:b,total:b.length}}function yl(e){return e==="left"?{state:"leftDataView",action:Le}:{state:"rightDataView",action:me}}function mz(e){var A;const{result:t,debugMode:o,dispatch:M,panel:b,id:p,raw:n,dsType:c,isLogsVolume:r}=e,s=Bl(t),i=yl(b);try{const h=Qc(t),g={id:p,type:"matrix",tableData:s,data:h,dsType:c,raw:n,total:(h==null?void 0:h.length)||0},{action:d,state:m}=i,L=(A=y1.getState())==null?void 0:A[m];if(L.some(R=>R.id===g.id)){let R=[];if(r){R=[...L];let W=R.map(S=>S.id===p?{...S,logsVolumeData:h,total:h.length}:S);M(d([])),M(d(W))}else M(d([])),R=[...L.filter(S=>S.id!==g.id),{...g}],M(d(R))}else{let R=[...L,g];M(d(R))}}catch(h){o&&console.log("🚧 getData / getting an error from rendering matrix type streams"),console.log(h)}}const Tl=e=>t=>{t({type:"SET_LOGS",logs:e})};function Sl(e){return o2(parseInt(e.getValue())/1e6).format("YYYY-MM-DDTHH:mm:ss.SSZ")}function xl(e){return e==null?void 0:e.map(({stream:t,values:o})=>({stream:`${JSON.stringify(t)}`,rows:o==null?void 0:o.map(([M,b])=>({time:M,stream:JSON.stringify(t),log:b})),get rowsLength(){var M;return((M=this==null?void 0:this.rows)==null?void 0:M.length)||0}}))}function Lz(e){return O("span",{title:e.getValue(),children:e.getValue()})}function Xl(e){const t=[{id:"time",header:"Time",accessorKey:"time",cell:p=>Sl(p)},{id:"stream",header:"Stream",accessorKey:"stream",cell:p=>Lz(p)},{id:"log",accessorKey:"log",header:"Log",cell:p=>Lz(p)}],o=xl(e),M=(o==null?void 0:o.length)||0;let b=[];if(M>0)for(let p of o)b.push(p.rows);return{columnsData:t,dataRows:D1.sortBy(b.flat(),p=>p.time),length:M}}function wl(e){return e==="left"?{state:"leftDataView",action:Le}:{state:"rightDataView",action:me}}function Nz(e){var W,S;const{result:t,raw:o,time:M,debugMode:b,queryType:p,panel:n,id:c,dispatch:r,dsType:s,direction:i,isLogsVolume:A}=e,h=Ul(t,i),g=wl(n),d=Xl(t),m=Jc(h,i);function L(N){return[].concat.apply([],N).filter(function(x,w,l){return l.indexOf(x)===w})}let R={id:c,type:"stream",tableData:{},data:[{}],raw:"[]",labels:[],total:0,isLogsVolume:A,dsType:s};if(m)try{Fl(r(Tl(m||[]))).then(()=>{m.length===0&&(b&&console.log("🚧 getData / getting no messages sorted"),r(Ae(!0))),r(Ae(!1))});const N=Array.from(new Set(m==null?void 0:m.map(B=>Object.keys(B.tags)))),x=L(N);R={id:c,type:"stream",dsType:s,tableData:d,data:m,isLogsVolume:A,raw:o,labels:[...x],total:(m==null?void 0:m.length)||0};const{action:w,state:l}=g,v=(W=y1.getState())==null?void 0:W[l];if(v.some(B=>B.id===R.id)){let B=[];if(A){B=[...v];let C=B.map(k=>{var _;if(k.id===c){let I=[];return k!=null&&k.logsVolumeData&&((_=k.logsVolumeData)==null?void 0:_.length)>0&&(I=[...k.logsVolumeData]),{...{...R},logsVolumeData:I}}else return k});r(w([])),r(w(C))}else{let C=[];r(w([])),C=[...v.filter(_=>_.id!==R.id),{...R}],r(w(C))}}else{let B=[...v,R];r(w(B))}p==="instant"&&r(Hc(M))}catch(N){console.log(N)}else{const{action:N,state:x}=g,w=(S=y1.getState())==null?void 0:S[x];if(w.some(l=>l.id===R.id)){let l=[];r(N([])),l=[...(w==null?void 0:w.filter(B=>B.id!==R.id))||[],{...R}],r(N(l))}else{let l=[...w,R];r(N(l))}}}function Cl(e){return e==="left"?{state:"leftDataView",action:Le}:{state:"rightDataView",action:me}}async function El(e){var i,A;const{result:t,debugMode:o,dispatch:M,panel:b,id:p,type:n,dsType:c,queryType:r,raw:s}=e;if(r==="trace-search")await Kc(e);else try{const h={id:p,type:n,dsType:c,tableData:{},data:t,raw:s,labels:[],open:!0,total:(i=t==null?void 0:t.resourceSpans)==null?void 0:i.length},g=Cl(b),{action:d,state:m}=g,L=(A=y1.getState())==null?void 0:A[m];if(L.some(R=>R.id===h.id)){let R=[];M(d([])),R=[...L.filter(S=>S.id!==h.id),{...h}],M(d(R))}else{let R=[...L,h];M(d(R))}}catch(h){o&&console.log(" 🚧 getData / getting an error from rendering Traces type streams",h),console.log(h)}}function kl(e){return o2(e.getValue()).format("YYYY-MM-DDTHH:mm:ss.SSZ")}function _l(e){return[{metric:{__name__:"Flux"},values:e.map(o=>Object.values(o).map((M,b)=>isNaN(+M)?null:(M instanceof Date?M.getTime()/1e3:M)+(b===0?0:"")).filter(M=>!!M))}]}function Il(e){return e.map(({metric:t,values:o})=>({metric:JSON.stringify(t),rows:o.map(([M,b])=>({time:M,metric:JSON.stringify(t),value:b})),get rowsLength(){var M;return(M=this.rows)==null?void 0:M.length},get title(){return`'${this.metric}' (${this.rowsLength})`}}))}function vz(e){return O("span",{title:e.getValue(),children:e.getValue()})}function Dl(e){const t=[{accessorKey:"time",header:()=>O("span",{children:"Time"}),cell:p=>kl(p)},{header:"Metric",cell:p=>vz(p),accessorKey:"metric"},{header:"Value",accessorKey:"value",cell:p=>vz(p)}],o=Il(e);let M=[];for(let p of o)M.push(p.rows);const b=D1.sortBy(M.flat(),p=>p.time);return{columnsData:t,dataRows:b,total:b.length}}function Pl(e){return e==="left"?{state:"leftDataView",action:Le}:{state:"rightDataView",action:me}}function Hl(e){const{result:t,panel:o,id:M,type:b}=e,p={panel:o,id:M,type:b},n=jM(e.result),r=(h=>{const g=h[0],d=Object.entries(g);if(d){const m=d.find(([L,R])=>H2(R));return(m==null?void 0:m[0])||null}})(t),s=bo(n,b,r,p),i=Mo(t,b),A={columnsData:s,dataRows:i,panel:o,id:M};if((s==null?void 0:s.length)>0&&(i==null?void 0:i.length)>0)return A}function jl(e){var i;let{result:t,debugMode:o,dispatch:M,panel:b,id:p,raw:n,dsType:c}=e;t=_l(t);const r=Dl(t),s=Pl(b);try{const A=Qc(t),h=Hl(e),d={id:p,type:"vector",tableData:r,data:{chartData:A,tableData:h},dsType:c,raw:n,total:(A==null?void 0:A.length)||0},{action:m,state:L}=s,R=(i=y1.getState())==null?void 0:i[L];if(R.some(W=>W.id===d.id)){let W=[];M(m([])),W=[...R.filter(N=>N.id!==d.id),{...d}],M(m(W))}else{let W=[...R,d];M(m(W))}}catch(A){o&&console.log("🚧 getData / getting an error from rendering Flux type streams"),console.error(A)}}const{debugMode:Lb}=y1.getState();async function Fl(e){return await e}function Jc(e,t){return t==="forward"?Vl(e):$l(e)}function Vl(e){const t=performance.now(),o=e==null?void 0:e.sort((b,p)=>b.timestamp-p.timestamp),M=performance.now()-t;return Lb&&console.log("🚧 getData / sorting logs took: ",M," ms"),o}function $l(e){const t=performance.now(),o=e==null?void 0:e.sort((b,p)=>p.timestamp-b.timestamp),M=performance.now()-t;return Lb&&console.log("🚧 getData / sorting logs took: ",M," ms"),o}function Ul(e,t="backwards"){const o=performance.now();let M=[];e==null||e.forEach(p=>{p.values.forEach(([n,c],r)=>{M.push({type:"stream",timestamp:sl(n),text:c,tags:p.stream||{},isShowTs:!0,isBuilder:!1,showLabels:!1,id:U2()})})});const b=performance.now()-o;return Lb&&console.log("🚧 getData / mapping logs took: ",b," ms"),Jc(M,t)}async function we(e){const{type:t}=e;switch(t){case"streams":await Nz(e);break;case"vector":await Kc(e);break;case"matrix":await mz(e);break;case"scalar":await mz(e);break;case"flux":await jl(e);break;case"traces":await El(e);break;default:await Nz(e)}}var Yc={exports:{}};/* @license +Papa Parse +v5.4.1 +https://github.com/mholt/PapaParse +License: MIT +*/(function(e,t){(function(o,M){e.exports=M()})(ab,function o(){var M=typeof self<"u"?self:typeof window<"u"?window:M!==void 0?M:{},b=!M.document&&!!M.postMessage,p=M.IS_PAPA_WORKER||!1,n={},c=0,r={parse:function(v,B){var C=(B=B||{}).dynamicTyping||!1;if(l(C)&&(B.dynamicTypingFunction=C,C={}),B.dynamicTyping=C,B.transform=!!l(B.transform)&&B.transform,B.worker&&r.WORKERS_SUPPORTED){var k=function(){if(!r.WORKERS_SUPPORTED)return!1;var I=(z0=M.URL||M.webkitURL||null,s0=o.toString(),r.BLOB_URL||(r.BLOB_URL=z0.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",s0,")();"],{type:"text/javascript"})))),Q=new M.Worker(I),z0,s0;return Q.onmessage=W,Q.id=c++,n[Q.id]=Q}();return k.userStep=B.step,k.userChunk=B.chunk,k.userComplete=B.complete,k.userError=B.error,B.step=l(B.step),B.chunk=l(B.chunk),B.complete=l(B.complete),B.error=l(B.error),delete B.worker,void k.postMessage({input:v,config:B,workerId:k.id})}var _=null;return r.NODE_STREAM_INPUT,typeof v=="string"?(v=function(I){return I.charCodeAt(0)===65279?I.slice(1):I}(v),_=B.download?new A(B):new g(B)):v.readable===!0&&l(v.read)&&l(v.on)?_=new d(B):(M.File&&v instanceof File||v instanceof Object)&&(_=new h(B)),_.stream(v)},unparse:function(v,B){var C=!1,k=!0,_=",",I=`\r +`,Q='"',z0=Q+Q,s0=!1,M0=null,d0=!1;(function(){if(typeof B=="object"){if(typeof B.delimiter!="string"||r.BAD_DELIMITERS.filter(function(f0){return B.delimiter.indexOf(f0)!==-1}).length||(_=B.delimiter),(typeof B.quotes=="boolean"||typeof B.quotes=="function"||Array.isArray(B.quotes))&&(C=B.quotes),typeof B.skipEmptyLines!="boolean"&&typeof B.skipEmptyLines!="string"||(s0=B.skipEmptyLines),typeof B.newline=="string"&&(I=B.newline),typeof B.quoteChar=="string"&&(Q=B.quoteChar),typeof B.header=="boolean"&&(k=B.header),Array.isArray(B.columns)){if(B.columns.length===0)throw new Error("Option columns is empty");M0=B.columns}B.escapeChar!==void 0&&(z0=B.escapeChar+Q),(typeof B.escapeFormulae=="boolean"||B.escapeFormulae instanceof RegExp)&&(d0=B.escapeFormulae instanceof RegExp?B.escapeFormulae:/^[=+\-@\t\r].*$/)}})();var Y=new RegExp(L(Q),"g");if(typeof v=="string"&&(v=JSON.parse(v)),Array.isArray(v)){if(!v.length||Array.isArray(v[0]))return V0(null,v,s0);if(typeof v[0]=="object")return V0(M0||Object.keys(v[0]),v,s0)}else if(typeof v=="object")return typeof v.data=="string"&&(v.data=JSON.parse(v.data)),Array.isArray(v.data)&&(v.fields||(v.fields=v.meta&&v.meta.fields||M0),v.fields||(v.fields=Array.isArray(v.data[0])?v.fields:typeof v.data[0]=="object"?Object.keys(v.data[0]):[]),Array.isArray(v.data[0])||typeof v.data[0]=="object"||(v.data=[v.data])),V0(v.fields||[],v.data||[],s0);throw new Error("Unable to serialize unrecognized input");function V0(f0,T0,C0){var b0="";typeof f0=="string"&&(f0=JSON.parse(f0)),typeof T0=="string"&&(T0=JSON.parse(T0));var l0=Array.isArray(f0)&&0=this._config.preview;if(p)M.postMessage({results:I,workerId:r.WORKER_ID,finished:z0});else if(l(this._config.chunk)&&!C){if(this._config.chunk(I,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);I=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(I.data),this._completeResults.errors=this._completeResults.errors.concat(I.errors),this._completeResults.meta=I.meta),this._completed||!z0||!l(this._config.complete)||I&&I.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),z0||I&&I.meta.paused||this._nextChunk(),I}this._halted=!0},this._sendError=function(B){l(this._config.error)?this._config.error(B):p&&this._config.error&&M.postMessage({workerId:r.WORKER_ID,error:B,finished:!1})}}function A(v){var B;(v=v||{}).chunkSize||(v.chunkSize=r.RemoteChunkSize),i.call(this,v),this._nextChunk=b?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(C){this._input=C,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(B=new XMLHttpRequest,this._config.withCredentials&&(B.withCredentials=this._config.withCredentials),b||(B.onload=w(this._chunkLoaded,this),B.onerror=w(this._chunkError,this)),B.open(this._config.downloadRequestBody?"POST":"GET",this._input,!b),this._config.downloadRequestHeaders){var C=this._config.downloadRequestHeaders;for(var k in C)B.setRequestHeader(k,C[k])}if(this._config.chunkSize){var _=this._start+this._config.chunkSize-1;B.setRequestHeader("Range","bytes="+this._start+"-"+_)}try{B.send(this._config.downloadRequestBody)}catch(I){this._chunkError(I.message)}b&&B.status===0&&this._chunkError()}},this._chunkLoaded=function(){B.readyState===4&&(B.status<200||400<=B.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:B.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(C){var k=C.getResponseHeader("Content-Range");return k===null?-1:parseInt(k.substring(k.lastIndexOf("/")+1))}(B),this.parseChunk(B.responseText)))},this._chunkError=function(C){var k=B.statusText||C;this._sendError(new Error(k))}}function h(v){var B,C;(v=v||{}).chunkSize||(v.chunkSize=r.LocalChunkSize),i.call(this,v);var k=typeof FileReader<"u";this.stream=function(_){this._input=_,C=_.slice||_.webkitSlice||_.mozSlice,k?((B=new FileReader).onload=w(this._chunkLoaded,this),B.onerror=w(this._chunkError,this)):B=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(_.target.result)},this._chunkError=function(){this._sendError(B.error)}}function g(v){var B;i.call(this,v=v||{}),this.stream=function(C){return B=C,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var C,k=this._config.chunkSize;return k?(C=B.substring(0,k),B=B.substring(k)):(C=B,B=""),this._finished=!B,this.parseChunk(C)}}}function d(v){i.call(this,v=v||{});var B=[],C=!0,k=!1;this.pause=function(){i.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){i.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(_){this._input=_,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){k&&B.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),B.length?this.parseChunk(B.shift()):C=!0},this._streamData=w(function(_){try{B.push(typeof _=="string"?_:_.toString(this._config.encoding)),C&&(C=!1,this._checkIsFinished(),this.parseChunk(B.shift()))}catch(I){this._streamError(I)}},this),this._streamError=w(function(_){this._streamCleanUp(),this._sendError(_)},this),this._streamEnd=w(function(){this._streamCleanUp(),k=!0,this._streamData("")},this),this._streamCleanUp=w(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function m(v){var B,C,k,_=Math.pow(2,53),I=-_,Q=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,z0=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,s0=this,M0=0,d0=0,Y=!1,V0=!1,P0=[],f0={data:[],errors:[],meta:{}};if(l(v.step)){var T0=v.step;v.step=function(u0){if(f0=u0,l0())b0();else{if(b0(),f0.data.length===0)return;M0+=u0.data.length,v.preview&&M0>v.preview?C.abort():(f0.data=f0.data[0],T0(f0,s0))}}}function C0(u0){return v.skipEmptyLines==="greedy"?u0.join("").trim()==="":u0.length===1&&u0[0].length===0}function b0(){return f0&&k&&(R0("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+r.DefaultDelimiter+"'"),k=!1),v.skipEmptyLines&&(f0.data=f0.data.filter(function(u0){return!C0(u0)})),l0()&&function(){if(!f0)return;function u0(e1,G){l(v.transformHeader)&&(e1=v.transformHeader(e1,G)),P0.push(e1)}if(Array.isArray(f0.data[0])){for(var B0=0;l0()&&B0=P0.length?"__parsed_extra":P0[t0]),v.transform&&(x0=v.transform(x0,h0)),x0=m0(h0,x0),h0==="__parsed_extra"?(n0[h0]=n0[h0]||[],n0[h0].push(x0)):n0[h0]=x0}return v.header&&(t0>P0.length?R0("FieldMismatch","TooManyFields","Too many fields: expected "+P0.length+" fields but parsed "+t0,d0+G):t0=$0.length/2?`\r +`:"\r"}(u0,G)),k=!1,v.delimiter)l(v.delimiter)&&(v.delimiter=v.delimiter(u0),f0.meta.delimiter=v.delimiter);else{var t0=function(h0,x0,H0,$0,a1){var c1,S0,U0,Z0;a1=a1||[","," ","|",";",r.RECORD_SEP,r.UNIT_SEP];for(var z1=0;z1=Q)return S1(!0)}else for(X0=M0,M0++;;){if((X0=Y.indexOf(B,X0+1))===-1)return P0||R0.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:m0.length,index:M0}),P1();if(X0===f0-1)return P1(Y.substring(M0,X0).replace(z1,B));if(B!==s0||Y[X0+1]!==s0){if(B===s0||X0===0||Y[X0-1]!==s0){U0!==-1&&U0=Q)return S1(!0);break}R0.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:m0.length,index:M0}),X0++}}else X0++}return P1();function F1(v1){m0.push(v1),B0=M0}function G1(v1){var V1=0;if(v1!==-1){var R2=Y.substring(X0+1,v1);R2&&R2.trim()===""&&(V1=R2.length)}return V1}function P1(v1){return P0||(v1===void 0&&(v1=Y.substring(M0)),u0.push(v1),M0=f0,F1(u0),l0&&C1()),S1()}function T1(v1){M0=v1,F1(u0),u0=[],Z0=Y.indexOf(k,M0)}function S1(v1){return{data:m0,errors:R0,meta:{delimiter:C,linebreak:k,aborted:d0,truncated:!!v1,cursor:B0+(V0||0)}}}function C1(){I(S1()),m0=[],R0=[]}},this.abort=function(){d0=!0},this.getCharIndex=function(){return M0}}function W(v){var B=v.data,C=n[B.workerId],k=!1;if(B.error)C.userError(B.error,B.file);else if(B.results&&B.results.data){var _={abort:function(){k=!0,S(B.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:N,resume:N};if(l(C.userStep)){for(var I=0;I{const{time:n}=mb(e,M,o),{debugMode:c}=y1.getState(),r={result:{resourceSpans:[],result:[],length:0},raw:[],time:n,debugMode:c,dispatch:t,type:"traces",dsType:e,panel:o,id:M,ts:Date.now(),queryType:p,open:!0};we(r)};async function yz(e,t,o,M,b,p,n,c){var i,A,h,g,d,m,L,R,W,S,N,x,w,l,v,B,C,k,_;const{time:r}=mb(e,b,M),{debugMode:s}=y1.getState();if(e==="traces"){if(n==="trace-search"&&((A=(i=t==null?void 0:t.data)==null?void 0:i.traces)==null?void 0:A.length)>0){const I={result:t.data.traces||[],raw:t.data,time:r,debugMode:s,dispatch:o,dsType:e,type:e,panel:M,open:!0,id:b,ts:Date.now(),queryType:n};we(I)}if(((g=(h=t==null?void 0:t.data)==null?void 0:h.resourceSpans)==null?void 0:g.length)>0){const I={result:(t==null?void 0:t.data)||[],raw:t==null?void 0:t.data,time:r,debugMode:s,dispatch:o,type:e,dsType:e,panel:M,open:!0,id:b,ts:Date.now(),queryType:n};we(I)}}if(e==="flux"&&await Ql(t==null?void 0:t.data).then(I=>{var Q;if(((Q=I==null?void 0:I.data)==null?void 0:Q.length)>0){const z0={result:I.data||[],raw:I==null?void 0:I.data,time:r,debugMode:s,queryType:n,dispatch:o,dsType:e,type:e,panel:M,open:!0,id:b,ts:Date.now(),direction:p};we(z0)}}),((m=(d=t==null?void 0:t.data)==null?void 0:d.streams)==null?void 0:m.length)===0){const I={result:[],raw:"[]",time:r,debugMode:s,queryType:n,dispatch:o,open:!0,type:"streams",dsType:e,panel:M,id:b,ts:Date.now(),direction:p,isLogsVolume:c};we(I),o(Ae(!0))}if((L=t==null?void 0:t.data)!=null&&L.data){const I=(W=(R=t==null?void 0:t.data)==null?void 0:R.data)==null?void 0:W.result,Q=(N=(S=t==null?void 0:t.data)==null?void 0:S.data)==null?void 0:N.resultType;let z0={hasStats:!1,statsData:{}};(w=(x=t==null?void 0:t.data)==null?void 0:x.data)!=null&&w.stats&&((B=Object.keys((v=(l=t==null?void 0:t.data)==null?void 0:l.data)==null?void 0:v.stats))==null?void 0:B.length)>0&&(z0={hasStats:!0,statsData:{...(k=(C=t==null?void 0:t.data)==null?void 0:C.data)==null?void 0:k.stats}});const s0=y1.getState()[M],M0=s0==null?void 0:s0.map(Y=>Y.id===b?{...Y,hasStats:(z0==null?void 0:z0.hasStats)||!1,statsData:(z0==null?void 0:z0.statsData)||{},open:!0}:Y);o(Jl(M,M0)),o(v3(e));const d0={result:I,raw:(_=t==null?void 0:t.data)==null?void 0:_.data,time:r,debugMode:s,queryType:n,dispatch:o,type:Q,dsType:e,open:!0,panel:M,id:b,ts:Date.now(),direction:p,isLogsVolume:c};we(d0)}else HM(o)}function Yl(e){var b,p,n;const t=e.match(/\[(.*?)\]/gm),o=(t==null?void 0:t[0].replace(/\[\]']+/g,"").trim())||"";let M=0;if(Array.isArray(t)){const c=o.match(/^(?[0-9.]+)(?ns|us|ms|s|m|h)?$/),r=typeof((b=c==null?void 0:c.groups)==null?void 0:b.tnum)=="string"?parseInt((p=c==null?void 0:c.groups)==null?void 0:p.tnum):1,s=((n=c==null?void 0:c.groups)==null?void 0:n.trange)||"m";M=r/Zl(s)}return M}function Zl(e){const t=/^(ns|us|ms|s|m|h)$/,o={ns:1e9,us:1e6,s:1,m:.016666666666666666,h:.0002777777777777778},M=new Map(Object.entries(o));return t.test(e)&&typeof e=="string"?M.get(e)||1/60:M.get("m")||1/60}function Tz(e,t){window.bosco.send(e,t)}function eA(e,t,o){if(e==="left")return t(c2(o));if(e==="right")return t(J1(o))}function tA(e,t,o){return o(e==="left"?Le(t):me(t))}function oA(e,t,o){return[...e].map(M=>M.id===t?{...M,loading:o||!1}:M)}function w2(e,t,o,M,b,p,n="backwards",c="",r="",s=0,i=!1){var x,w,l,v,B,C;let A={url:"",requestHeaders:{},method:{value:""},headers:[],auth:{method:{value:"GET"},basicAuth:{value:!0},fields:{basicAuth:[{name:"user",value:""},{name:"password",value:""}]}},hasSettings:!1},h="",g="";if(c!==""){const k=y1.getState().dataSources,_=k.find(I=>I.id===c);if(_&&((x=Object.keys(_))==null?void 0:x.length)>0){const I=k.find(z0=>z0.id===c),Q=A.url!==""?A.url:I.url;A={...I,url:Q,hasSettings:!0}}if(((w=A==null?void 0:A.headers)==null?void 0:w.length)>0){let I={};for(let Q of A.headers){const z0={[String(Q.header)]:Q.value};I={...I,...z0}}A.requestHeaders=I||{}}if((v=(l=A==null?void 0:A.auth)==null?void 0:l.basicAuth)!=null&&v.value){const I=(C=(B=A==null?void 0:A.auth)==null?void 0:B.fields)==null?void 0:C.basicAuth;for(let Q of I)(Q==null?void 0:Q.name)==="user"&&(Q.value,h=Q.value),(Q==null?void 0:Q.name)==="password"&&(Q.value,g=Q.value);A.requestHeaders={...A.requestHeaders}}}const d=(k,_)=>{const I=y1.getState()[b];eA(b,k,oA(I,p,_))},{debugMode:m}=y1.getState(),L=bl(e,A.requestHeaders),R=Yl(t),W=dl(e,t,M,R,n,A.url||"",o,r,s,p,b),S=Ml(e,o,W),N=(k,_)=>{var z0;const I=(z0=y1.getState())==null?void 0:z0[`${b}DataView`],Q=I==null?void 0:I.find(s0=>s0.id===p);Q&&(Q.loading=k),tA(b,I,_)};return async function(k){var I,Q,z0,s0;N(!0,k),d(k,!0);let _;if(r===""){o==="trace-search"&&Bz(e,k,b,p,n,o),d(k,!1);return}if(t===""&&o!=="trace-search"){e==="traces"&&Bz(e,k,b,p,n,o),d(k,!1);return}typeof _<"u"&&_.cancel("Cancelling the previous request"),_=W2.CancelToken.source(),L.cancelToken=_.token;try{(L==null?void 0:L.method)==="POST"?await((Q=(I=W2)==null?void 0:I.post(S,t,L))==null?void 0:Q.then(M0=>{yz(e,M0,k,b,p,n,o)}).catch(M0=>{HM(k),k(Ae(!0)),N(!1,k),m&&console.log("Error loading flux data",M0)}).finally(()=>{N(!1,k),d(k,!1)})):(L==null?void 0:L.method)==="GET"&&await((s0=(z0=W2)==null?void 0:z0.get(S,{auth:{username:h,password:g},...L}))==null?void 0:s0.then(M0=>{yz(e,M0||{data:{data:[]}},k,b,p,n,o,i),m&&Tz({level:"info",id:p,type:e,direction:n},p),d(k,!1)}).catch(M0=>{HM(k),k(Ae(!0)),N(!1,k),d(k,!1),m&&(Tz({level:"error",id:p,type:e,direction:n},p),console.log("getting an error from response: ",M0))}).finally(()=>{d(k,!1),N(!1,k)}))}catch(M0){d(k,!1),console.log(M0)}}}var Nb={},MA=N1;Object.defineProperty(Nb,"__esModule",{value:!0});var Lo=Nb.default=void 0,bA=MA(L1()),pA=K0,zA=(0,bA.default)((0,pA.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM8 9h8v10H8V9zm7.5-5-1-1h-5l-1 1H5v2h14V4z"}),"DeleteOutline");Lo=Nb.default=zA;var vb={},nA=N1;Object.defineProperty(vb,"__esModule",{value:!0});var Bb=vb.default=void 0,cA=nA(L1()),rA=K0,iA=(0,cA.default)((0,rA.jsx)("path",{d:"M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"}),"Star");Bb=vb.default=iA;var yb={},aA=N1;Object.defineProperty(yb,"__esModule",{value:!0});var Zc=yb.default=void 0,OA=aA(L1()),Sz=K0,sA=(0,OA.default)([(0,Sz.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"},"0"),(0,Sz.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"AccessTime");Zc=yb.default=sA;var Tb={},lA=N1;Object.defineProperty(Tb,"__esModule",{value:!0});var er=Tb.default=void 0,AA=lA(L1()),dA=K0,uA=(0,AA.default)((0,dA.jsx)("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"}),"Launch");er=Tb.default=uA;var Sb={},qA=N1;Object.defineProperty(Sb,"__esModule",{value:!0});var G2=Sb.default=void 0,fA=qA(L1()),WA=K0,hA=(0,fA.default)((0,WA.jsx)("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"KeyboardArrowRight");G2=Sb.default=hA;var xb={},gA=N1;Object.defineProperty(xb,"__esModule",{value:!0});var tr=xb.default=void 0,RA=gA(L1()),mA=K0,LA=(0,RA.default)((0,mA.jsx)("path",{d:"m15 3 2.3 2.3-2.89 2.87 1.42 1.42L18.7 6.7 21 9V3h-6zM3 9l2.3-2.3 2.87 2.89 1.42-1.42L6.7 5.3 9 3H3v6zm6 12-2.3-2.3 2.89-2.87-1.42-1.42L5.3 17.3 3 15v6h6zm12-6-2.3 2.3-2.87-2.89-1.42 1.42 2.89 2.87L15 21h6v-6z"}),"ZoomOutMap");tr=xb.default=LA;var Xb={},NA=N1;Object.defineProperty(Xb,"__esModule",{value:!0});var or=Xb.default=void 0,vA=NA(L1()),BA=K0,yA=(0,vA.default)((0,BA.jsx)("path",{d:"M9 9V3H7v2.59L3.91 2.5 2.5 3.91 5.59 7H3v2h6zm12 0V7h-2.59l3.09-3.09-1.41-1.41L17 5.59V3h-2v6h6zM3 15v2h2.59L2.5 20.09l1.41 1.41L7 18.41V21h2v-6H3zm12 0v6h2v-2.59l3.09 3.09 1.41-1.41L18.41 17H21v-2h-6z"}),"ZoomInMap");or=Xb.default=yA;var wb={},TA=N1;Object.defineProperty(wb,"__esModule",{value:!0});var Ue=wb.default=void 0,SA=TA(L1()),xA=K0,XA=(0,SA.default)((0,xA.jsx)("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"}),"KeyboardArrowDownOutlined");Ue=wb.default=XA;const wA=g0("div",{target:"e13u74u10"})("background:",({theme:e})=>e.shadow,";#alert-dialog-title{color:",({theme:e})=>e.contrast,";}#alert-dialog-description{color:",({theme:e})=>e.lightContrast,";font-weight:normal;}");function xz({clearHistory:e,dialogType:t}){const[o,M]=q.useState(!1),b=Q0(),p=()=>{M(!0)},n=()=>{M(!1)};function c(){e(),M(!1)}return O(BO,{theme:b,children:D("div",{children:[O(X1,{title:"Clear Query History",children:O(hO,{onClick:p,children:"Clear History"})}),O(sb,{open:o,onClose:n,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",PaperProps:{classes:{root:lb}},children:D(wA,{children:[D(gO,{id:"alert-dialog-title",children:["Are you sure you want to clear the ",t," ","History?"]}),O(RO,{children:D(mO,{id:"alert-dialog-description",children:["Click ‘Clear History’ to delete your"," ",t," history permanently"]})}),D(LO,{children:[O(NO,{onClick:n,children:"Cancel"}),O(vO,{onClick:c,autoFocus:!0,children:"Clear History"})]})]})})]})})}function Mr({message:e}){return O(yO,{children:e})}function CA({onClose:e}){return O(TO,{onClick:e,children:O(Ab,{style:{height:"16px",width:"16px"}})})}const br=Object.fromEntries?Object.fromEntries:e=>{if(!e||!e[Symbol.iterator])throw new Error("Object.fromEntries() requires a single iterable argument");const t={};return Object.keys(e).forEach(o=>{const[M,b]=e[o];t[M]=b}),t};function Ge(e){return Object.keys(e)}function Cb(e,t){if(!e)throw new Error(t)}function Eb(e,t){return t}const kb=e=>{const t=e.length;let o=0,M="";for(;oM===t[b]).indexOf(!1)>=0)&&(o.current={v:e(),prevDeps:[...t]}),o.current.v}function kA(e){return e instanceof Object&&!("styles"in e)&&!("length"in e)&&!("__emotion_styles"in e)}const{createCssAndCx:_A}=(()=>{function e(o,M,b){const p=[],n=t3(o,p,b);return p.length<2?b:n+M(p)}function t(o){const{cache:M}=o,b=(...n)=>{const c=ZO(n,M.registered);e3(M,c,!1);const r=`${M.key}-${c.name}`;e:{const s=n[0];if(!kA(s))break e;Xz.saveClassNameCSSObjectMapping(M,r,s)}return r};return{css:b,cx:(...n)=>{const c=kb(n),r=Xz.fixClassName(M,c,b);return e(M.registered,b,r)}}}return{createCssAndCx:t}})();function pr(e){const{useCache:t}=e;function o(){const M=t(),{css:b,cx:p}=EA(()=>_A({cache:M}),[M]);return{css:b,cx:p}}return{useCssAndCx:o}}const Xz=(()=>{const e=new WeakMap;return{saveClassNameCSSObjectMapping:(t,o,M)=>{let b=e.get(t);b===void 0&&(b=new Map,e.set(t,b)),b.set(o,M)},fixClassName:(()=>{function t(o){let M=!1;return o.map(([b,p])=>{if(p===void 0)return b;let n;if(M)n={"&&":p};else{n=b;for(const c in p)if(c.startsWith("@media")){M=!0;break}}return n})}return(o,M,b)=>{const p=e.get(o);return kb(t(M.split(" ").map(n=>[n,p==null?void 0:p.get(n)])).map(n=>typeof n=="string"?n:b(n)))}})()}})();function Ke(e){if(!(e instanceof Object)||typeof e=="function")return e;const t=[];for(const o in e){const M=e[o],b=typeof M;if(!(b==="string"||b==="number"&&!isNaN(M)||b==="boolean"||M===void 0||M===null))return e;t.push(`${o}:${b}_${M}`)}return"xSqLiJdLMd9s"+t.join("|")}function _b(e,t,o){if(!(t instanceof Object))return e;const M={};return Ge(e).forEach(b=>M[b]=o(e[b],t[b])),Ge(t).forEach(b=>{if(b in e)return;const p=t[b];typeof p=="string"&&(M[b]=p)}),M}const zr=({classes:e,theme:t,muiStyleOverridesParams:o,css:M,cx:b,name:p})=>{var n,c;e:{if(p==="makeStyle no name"){p=void 0;break e}if(o!==void 0&&p===void 0)throw new Error("To use muiStyleOverridesParams, you must specify a name using .withName('MyComponent')")}let r;try{r=p===void 0?void 0:((c=(n=t.components)===null||n===void 0?void 0:n[p])===null||c===void 0?void 0:c.styleOverrides)||void 0}catch{}const s=q.useMemo(()=>{if(r===void 0)return;const i={};for(const A in r){const h=r[A];h instanceof Object&&(i[A]=M(typeof h=="function"?h(Object.assign({theme:t,ownerState:o==null?void 0:o.ownerState},o==null?void 0:o.props)):h))}return i},[r,Ke(o==null?void 0:o.props),Ke(o==null?void 0:o.ownerState),M]);return e=q.useMemo(()=>_b(e,s,b),[e,s,b]),{classes:e}};let IA=0;function nr(e){const{useTheme:t,cache:o}=e,{useCache:M}=cr({cacheProvidedAtInception:o}),{useCssAndCx:b}=pr({useCache:M});function p(c){const{name:r,uniqId:s=`${IA++}`}=c??{},i=typeof r!="object"?r:Object.keys(r)[0];return function(A){const h=typeof A=="function"?A:()=>A;return function(d,m){const L=t();let{css:R,cx:W}=b();const S=M();let N=q.useMemo(()=>{const x={},w=typeof Proxy<"u"&&new Proxy({},{get:(B,C)=>(typeof C=="symbol"&&Cb(!1),x[C]=`${S.key}-${s}${i!==void 0?`-${i}`:""}-${C}-ref`)}),l=h(L,d,w||{}),v=br(Ge(l).map(B=>{const C=l[B];return C.label||(C.label=`${i!==void 0?`${i}-`:""}${B}`),[B,`${R(C)}${Eb(B,B in x)?` ${x[B]}`:""}`]}));return Ge(x).forEach(B=>{B in v||(v[B]=x[B])}),v},[S,R,W,L,Ke(d)]);{const x=m==null?void 0:m.props.classes;N=q.useMemo(()=>_b(N,x,W),[N,Ke(x),W])}{const x=zr({classes:N,css:R,cx:W,name:i??"makeStyle no name",idOfUseStyles:s,muiStyleOverridesParams:m,theme:L});x.classes!==void 0&&(N=x.classes),x.css!==void 0&&(R=x.css),x.cx!==void 0&&(W=x.cx)}return{classes:N,theme:L,css:R,cx:W}}}}function n(){const c=t(),{css:r,cx:s}=b();return{theme:c,css:r,cx:s}}return{makeStyles:p,useStyles:n}}const DA=q.createContext(void 0),{createUseCache:cr}=(()=>{function e(){return q.useContext(DA)}function t(o){const{cacheProvidedAtInception:M}=o;function b(){var p;const n=o3(),c=e(),r=(p=M??c)!==null&&p!==void 0?p:n;if(r===null)throw new Error(["In order to get SSR working with tss-react you need to explicitly provide an Emotion cache.","MUI users be aware: This is not an error strictly related to tss-react, with or without tss-react,","MUI needs an Emotion cache to be provided for SSR to work.","Here is the MUI documentation related to SSR setup: https://mui.com/material-ui/guides/server-rendering/","TSS provides helper that makes the process of setting up SSR easier: https://docs.tss-react.dev/ssr"].join(` +`));return r}return{useCache:b}}return{createUseCache:t}})();function wz(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Cz=globalThis&&globalThis.__rest||function(e,t){var o={};for(var M in e)Object.prototype.hasOwnProperty.call(e,M)&&t.indexOf(M)<0&&(o[M]=e[M]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var b=0,M=Object.getOwnPropertySymbols(e);b{const g=p,d=function(m){var{children:L}=m,R=Cz(m,["children"]);return q.createElement(g,R,L)};return Object.defineProperty(d,"name",{value:wz(g)}),d})():p,s=(()=>{{const{name:g}=c??{};if(g!==void 0)return typeof g!="object"?g:Object.keys(g)[0]}{const g=r.displayName;if(typeof g=="string"&&g!=="")return g}{const{name:g}=r;if(g)return g.replace(/\$/g,"usd")}})(),i=M(Object.assign(Object.assign({},c),{name:s}))(typeof n=="function"?(g,d,m)=>kz(n(g,d,m)):kz(n));function A(g){for(const d in g)if(d!=="root")return!0;return!1}const h=q.forwardRef(function(g,d){const{className:m,classes:L}=g,R=Cz(g,["className","classes"]),{classes:W,cx:S}=i(g,{props:g}),N=S(W.root,m);return rr.set(W,Object.assign(Object.assign({},W),{root:N})),n2.createElement(r,Object.assign({ref:d,className:A(W)?m:N},typeof p=="string"?{}:{classes:W},R))});return s!==void 0&&(h.displayName=`${wz(s)}WithStyles`,Object.defineProperty(h,"name",{value:h.displayName})),h}return b.getClasses=HA,{withStyles:b}}const rr=new WeakMap,Ez="getClasses should only be used in conjunction with withStyles";function HA(e){const t=e.classes;if(t===void 0)throw new Error(Ez);const o=rr.get(t);if(o===void 0)throw new Error(Ez);return o}function kz(e){const t={},o={};return Object.keys(e).forEach(M=>(M.startsWith("@media")?o:t)[M]=e[M]),Object.keys(o).forEach(M=>{const b=o[M];Object.keys(b).forEach(p=>{var n;return t[p]=Object.assign(Object.assign({},(n=t[p])!==null&&n!==void 0?n:{}),{[M]:b[p]})})}),t}const jA=(()=>!(typeof document=="object"&&typeof(document==null?void 0:document.getElementById)=="function")&&!(typeof jest<"u")&&!(typeof mocha<"u")&&!(typeof __vitest_worker__<"u"))();var FA=globalThis&&globalThis.__rest||function(e,t){var o={};for(var M in e)Object.prototype.hasOwnProperty.call(e,M)&&t.indexOf(M)<0&&(o[M]=e[M]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var b=0,M=Object.getOwnPropertySymbols(e);b({classes:r,cx:s,css:i})),name:void 0,doesUseNestedSelectors:!1})}}let VA=0;const aM=[];function po(e){const{useContext:t,useCache:o,useCssAndCx:M,usePlugin:b,name:p,doesUseNestedSelectors:n}=e;return{withParams:()=>po(Object.assign({},e)),withName:c=>po(Object.assign(Object.assign({},e),{name:typeof c!="object"?c:Object.keys(c)[0]})),withNestedSelectors:()=>po(Object.assign(Object.assign({},e),{doesUseNestedSelectors:!0})),create:c=>{const r=`x${VA++}`,s=typeof c=="function"?c:()=>c;return function(A){var h,g,d;const m=A??{},{classesOverrides:L}=m,R=FA(m,["classesOverrides"]),W=t(),{css:S,cx:N}=M(),x=o();let w=q.useMemo(()=>{const v={},B=s(Object.assign(Object.assign(Object.assign({},A),W),n?{classes:typeof Proxy>"u"?{}:new Proxy({},{get:(k,_)=>{if(typeof _=="symbol"&&Cb(!1),jA){{let I=aM.find(Q=>Q.name===p&&Q.idOfUseStyles===r);I===void 0&&(I={name:p,idOfUseStyles:r,nestedSelectorRuleNames:new Set},aM.push(I)),I.nestedSelectorRuleNames.add(_)}if(aM.find(I=>I.name===p&&I.idOfUseStyles!==r&&I.nestedSelectorRuleNames.has(_))!==void 0)throw new Error([`tss-react: Duplicate nested selector "${_}" detected in ${p===void 0?`useStyles named "${p}"`:"anonymous useStyles function"}.`,"In SSR setups, this may lead to CSS class name collisions, causing nested selectors to target elements outside of the intended scope.",'Solution: Ensure each useStyles using nested selectors has a unique name. Use tss.withName("UniqueName").withNestedSelectors<...>()... to set a name.'].join(` +`))}return v[_]=`${x.key}-${r}${p!==void 0?`-${p}`:""}-${_}-ref`}})}:{})),C=br(Ge(B).map(k=>{const _=B[k];return _.label||(_.label=`${p!==void 0?`${p}-`:""}${k}`),[k,`${S(_)}${Eb(k,k in v)?` ${v[k]}`:""}`]}));return Ge(v).forEach(k=>{k in C||(C[k]=v[k])}),C},[x,S,N,Ke(A),...Object.values(W)]);w=q.useMemo(()=>_b(w,L,N),[w,Ke(L),N]);const l=b(Object.assign(Object.assign({classes:w,css:S,cx:N,idOfUseStyles:r,name:p},W),R));return Object.assign({classes:(h=l.classes)!==null&&h!==void 0?h:w,css:(g=l.css)!==null&&g!==void 0?g:S,cx:(d=l.cx)!==null&&d!==void 0?d:N},W)}}}}function $A(e){return Object.assign(Object.assign({},nr(e)),PA(e))}const{tss:UA}=ir({useContext:()=>({})});UA.create({});const{makeStyles:P7,withStyles:Ib}=$A({useTheme:Ob}),{tss:GA}=ir({useContext:function(){return{theme:Ob()}},usePlugin:zr});GA.create({});var Db={},KA=N1;Object.defineProperty(Db,"__esModule",{value:!0});var Pb=Db.default=void 0,QA=KA(L1()),JA=K0,YA=(0,QA.default)((0,JA.jsx)("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft");Pb=Db.default=YA;var Hb={},ZA=N1;Object.defineProperty(Hb,"__esModule",{value:!0});var ar=Hb.default=void 0,ed=ZA(L1()),td=K0,od=(0,ed.default)((0,td.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight");ar=Hb.default=od;const Md=["Jan","Feb","Mar","Apr","May","June","July","Aug","Sept","Oct","Nov","Dec"],bd=["Su","Mo","Tu","We","Th","Fr","Sa"],re={FIRST_MONTH:Symbol("firstMonth"),SECOND_MONTH:Symbol("secondMonth")},FM="dateTimeRange",pd=y1.getState().theme,zd={light:Ac,dark:dc},Ce=zd[pd],nd=()=>({iconContainer:{padding:5,color:Ce.contrast},icon:{padding:10,color:Ce.contrast,"&:hover":{color:Ce.contrast,background:"none"}},selector:{color:Ce.contrast,borderBottom:`1px solid ${Ce.contrast}`}}),cd=()=>{const e=y1.getState().theme;return Ya({palette:{mode:e,primary:{main:Ce.contrast}}})},_z=g0("select",{target:"etc1wzw0"})("cursor:pointer;position:relative;font-size:14px;color:",e=>e.theme.contrast,";background:",e=>e.theme.deep,";border:none;border-radius:3px;padding:4px 8px;line-height:20px;flex:1;&::-webkit-scrollbar{width:5px;background:",e=>e.theme.deep,";}&::-webkit-scrollbar-corner{background:transparent;}&::-webkit-scrollbar-thumb{border-radius:5px;background:",e=>e.theme.alphaPlusNeutral,";}"),rd=({date:e,classes:t,setDate:o,nextDisabled:M,prevDisabled:b,onClickNext:p,onClickPrevious:n})=>{const c=Q0(),r=i=>{o(cO(e,parseInt(i.target.value)))},s=i=>{o(rO(e,parseInt(i.target.value)))};return O(mc,{theme:c,children:D(z2,{container:!0,justifyContent:"space-between",alignItems:"center",style:{marginTop:"20px"},children:[O(z2,{item:!0,className:t.iconContainer,children:O(EM,{disabled:b,onClick:n,children:O(Pb,{style:{color:b?c.lightContrast:c.contrast}})})}),O(z2,{item:!0,children:O(_z,{value:zO(e),onChange:r,children:Md.map((i,A)=>O("option",{value:A,children:i},i))})}),O(z2,{item:!0,children:O(_z,{value:nO(e),onChange:s,children:al(e,30).map(i=>O("option",{className:"custom-option",value:i,children:i},i))})}),O(z2,{item:!0,className:t.iconContainer,children:O(EM,{disabled:M,onClick:p,children:O(ar,{style:{color:M?c.lightContrast:c.contrast}})})})]})})},id=Ib(rd,nd),ad=()=>({leftBorderRadius:{borderRadius:"50% 0 0 50%"},rightBorderRadius:{borderRadius:"0 50% 50% 0"},buttonContainer:{display:"flex"},button:{height:30,width:30,padding:0},inactive:{color:"gray"},outlined:{border:"1px solid #11abab"},maxContrast:{lineHeight:1.6,color:"primary"},filled:{"&:hover":{backgroundColor:"#11abab",color:"text.primary"},backgroundColor:"#11abab",color:"text.primary"},highlighted:{backgroundColor:"#14b8b852"},contrast:{color:"text.primary"}}),Od=e=>{const{classes:t}=e;return O(f1,{theme:cd,children:O("div",{className:rM(t.buttonContainer,e.startOfRange&&t.leftBorderRadius,e.endOfRange&&t.rightBorderRadius,!e.disabled&&e.highlighted&&t.highlighted,e.disabled&&t.disabled),children:O(EM,{className:rM(t.button,!e.disabled&&e.outlined&&t.outlined,!e.disabled&&e.filled&&t.filled),disabled:e.disabled,onClick:e.onClick,onMouseOver:e.onHover,children:O(co,{color:e.disabled?"text.secondary":"text.primary",className:rM(t.maxContrast,!e.disabled&&e.filled&&t.contrast,e.disabled&&t.inactive),variant:"body2",children:e.value})})})})},sd=Ib(Od,ad),Iz={Previous:-1,Next:1},ld=e=>({root:{width:260,background:e.background},weekDaysContainer:{marginTop:5,paddingLeft:30,paddingRight:30},daysContainer:{paddingLeft:15,paddingRight:15,marginTop:10,marginBottom:20}}),Ad=e=>{const t=Q0(),[o,M]=q.useState(t),{classes:b,helpers:p,handlers:n,value:c,dateRange:r,marker:s,setValue:i,minDate:A,maxDate:h}=e,[g,d]=e.navState;return q.useEffect(()=>{M(t)},[t,M]),O(f1,{theme:t,children:O(uc,{square:!0,elevation:0,className:b.root,style:{background:t.background},children:D(z2,{container:!0,children:[O(id,{date:c,setDate:i,nextDisabled:!d,prevDisabled:!g,onClickPrevious:()=>n.onMonthNavigate(s,Iz.Previous),onClickNext:()=>n.onMonthNavigate(s,Iz.Next)}),O(z2,{item:!0,container:!0,direction:"row",justifyContent:"space-between",className:b.weekDaysContainer,children:bd.map(m=>O("div",{style:{color:t.contrast,fontSize:"10px"},children:m},m))}),O(z2,{item:!0,container:!0,direction:"column",justifyContent:"space-between",className:b.daysContainer,children:pl(zl(c),7).map((m,L)=>O(z2,{container:!0,direction:"row",justifyContent:"center",children:m.map(R=>{const W=nl(r,R),S=cl(r,R),N=il(r),x=rl(r,R)||p.inHoverRange(R);return O(sd,{themeSelected:o,filled:W||S,outlined:iO(R),highlighted:x&&!N,disabled:!rb(c,R)||!cb(R,{start:A,end:h}),startOfRange:W&&!N,endOfRange:S&&!N,onClick:()=>n.onDayClick(R),onHover:()=>n.onDayHover(R),value:aO(R)},C2(R,"mm-dd-yyyy"))})},L))})]})})})},Te=Ib(Ad,ld),dd=g0("div",{target:"eb241j10"})("display:flex;flex-direction:column;padding:10px;max-height:250px;overflow-y:auto;flex:1;margin-top:10px;margin-bottom:10px;padding:5px;&::-webkit-scrollbar{width:5px;background:",e=>e.theme.lightNeutral,";}&::-webkit-scrollbar-corner{background:transparent;}&::-webkit-scrollbar-thumb{border-radius:5px;background:",e=>e.theme.neutral,";}button{background:none;text-align:left;border:none;padding:10px;line-height:1.5;border-radius:3px;font-size:12px;cursor:pointer;&:hover{background:",e=>e.theme.lightNeutral,";}}"),Dz=e=>{const t=Q0();return O(f1,{theme:t,children:O(dd,{children:e.ranges.map((o,M)=>O("button",{onClick:()=>{e.setRange(o),e.onClose()},children:O("span",{style:{fontWeight:Rz(o,e.selectedRange)?"bold":"normal",color:Rz(o,e.selectedRange)?"orange":t.contrast,whiteSpace:"nowrap"},children:o.label})},M))})})};var jb={},ud=N1;Object.defineProperty(jb,"__esModule",{value:!0});var No=jb.default=void 0,qd=ud(L1()),fd=K0,Wd=(0,qd.default)((0,fd.jsx)("path",{d:"M6.23 20.23 8 22l10-10L8 2 6.23 3.77 14.46 12z"}),"ArrowForwardIos");No=jb.default=Wd;var Fb={},hd=N1;Object.defineProperty(Fb,"__esModule",{value:!0});var VM=Fb.default=void 0,gd=hd(L1()),Rd=K0,md=(0,gd.default)((0,Rd.jsx)("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),"DateRange");VM=Fb.default=md;const Ld=g0("div",{target:"ebkgyot2"})("display:",e=>e.isDisplay?"flex":"none",";flex-direction:column;margin:20px;margin-top:30px;.time-selectors{display:",e=>e.isDisplay?"flex":"none",";flex-direction:column;margin-bottom:15px;.label{font-size:0.85em;color:",e=>e.theme.alphaNeutral,";width:50px;margin-left:5px;margin-bottom:5px;white-space:nowrap;}.input-group{display:flex;margin-bottom:20px;input{background:",e=>e.theme.deep,";color:",e=>e.theme.contrast,";}.date-time-ranged{font-size:14px;width:170px;line-height:20px;border:1px solid ",e=>e.theme.lightNeutral,";color:",e=>e.theme.contrast,";margin:0;padding:0px 8px;margin-right:5px;&:focus{border:1px solid ",e=>e.theme.neutral,";}}}}"),Nd=g0(ub,{target:"ebkgyot1"})("color:",e=>e.theme.maxContrast,";background:",e=>e.theme.primary,";padding:6px;justify-content:center;margin-top:10px;margin-bottom:10px;cursor:pointer;&:hover{background:",e=>e.theme.primaryLight,";}"),Pz=g0(ub,{target:"ebkgyot0"})("color:",e=>e.theme.contrast,";background:",e=>e.theme.neutral,";border:1px solid ",e=>e.theme.accentNeutral,";padding:8px;&:hover{background:",e=>e.theme.lightNeutral,";color:",e=>e.theme.contrast,";}");function Hz({getEditedStartDate:e,getEditedEndDate:t,handleStart:o,handleStop:M,onTimeRangeSet:b,setCalendarOpen:p,isFullCalendar:n,setStopCalendar:c,setStartCalendar:r,startCalendarOpen:s,stopCalendarOpen:i,isHorizontal:A,styles:h,isMobile:g}){const d=Q0();function m(){n?p(R=>!R):(p(R=>!(R&&s)),c(()=>!1),r(R=>!R))}function L(){n?p(R=>!R):(p(R=>!(R&&i)),r(()=>!1),c(R=>!R))}return O(f1,{theme:d,children:D(Ld,{isDisplay:h,children:[D("div",{className:"time-selectors",children:[O("span",{className:"label",children:"From"}),D("div",{className:"input-group",children:[O("input",{className:"date-time-ranged",value:b1(e()),onChange:R=>o(R,!1),onBlur:R=>o(R,!0)}),O(Pz,{onClick:m,children:O(VM,{style:{height:"16px",width:"16px"}})})]})]}),D("div",{className:"time-selectors",children:[O("span",{className:"label",children:"To"}),D("div",{className:"input-group",children:[O("input",{className:"date-time-ranged",value:b1(t()),onChange:R=>M(R,!1),onBlur:R=>M(R,!0)}),O(Pz,{onClick:L,children:O(VM,{style:{height:"16px",width:"16px"}})})]})]}),O(Nd,{isHorizontal:A,isMobile:g,onClick:R=>{b(R)},children:"Apply Time Range"})]})})}const vd=g0("button",{target:"e1opaqag1"})("padding:10px;border-radius:3px;color:",({theme:e})=>e.accent,";font-size:1em;border:none;background:none;display:flex;cursor:pointer;align-items:center;justify-content:center;margin-bottom:10px;&:hover{background:#11111155;}span{margin-right:4px;font-size:12px;}"),Bd=g0("div",{target:"e1opaqag0"})("position:absolute;.header{padding:10px;justify-content:space-between;}.headerItem{text-align:center;}.dateComplete{font-size:0.85em;}.divider{border-left:1px solid action;margin-bottom:20;}.container{position:relative;z-index:1000;right:75%;top:30px;display:flex;flex-direction:column;overflow-y:auto;background:",({theme:e})=>e.background,";}.applyButton{color:white;background:hsl(0, 0%, 31%);border:1px solid hsl(0, 0%, 31%);padding:6px 8px;border-radius:3px;margin-left:10px;cursor:pointer;}"),yd=e=>{const{ranges:t,dateRange:o,minDate:M,maxDate:b,firstMonth:p,setFirstMonth:n,secondMonth:c,setSecondMonth:r,setDateRange:s,helpers:i,handlers:A}=e,h=Q0(),[g,d]=q.useState(!1),m={label:"Last 5 minutes",dateStart:new Date(Date.now()-5*6e4),dateEnd:new Date(Date.now())},L=OO(c,p)>=2,R={dateRange:o,minDate:M,maxDate:b,helpers:i,handlers:A},W=_1(),[S,N]=q.useState(o.dateStart),[x,w]=q.useState(o.dateEnd),[l,v]=q.useState(!0),[B]=q.useState(o.label)||m.label,C=h2.useMediaQuery({query:"(min-width: 1013px)"}),k=h2.useMediaQuery({query:"(max-width: 1013px)"}),_=h2.useMediaQuery({query:"(orientation: portrait)"}),I=w0(b0=>b0.isSplit),[Q,z0]=q.useState(!1),[s0,M0]=q.useState(!1);q.useEffect(()=>{if(B){const b0=mo(B);N(b0.dateStart),w(b0.dateEnd)}},[w,N,B]);const d0=(b0,l0)=>{b0.preventDefault();const m0=new Date(b0.target.value);l0&&q2(m0)?w(m0):w(b0.target.value)},Y=(b0,l0)=>{b0.preventDefault();const m0=new Date(b0.target.value);l0&&q2(m0)?N(m0):N(b0.target.value)},V0=b0=>{b0.preventDefault();const l0=new Date(S),m0=new Date(x);H2(l0)&&!Vt(o.dateStart,l0)&&(W(Wb(l0)),N(l0)),q2(m0)&&!Vt(o.dateEnd,m0)&&(W(hb(m0)),w(m0));const R0=q2(m0)&&H2(l0),u0=ke(l0,m0),B0=!Vt(o.dateStart,l0)||!Vt(o.dateEnd,m0);R0&&u0&&B0?(W(gb("")),s({dateStart:l0,dateEnd:m0}),P0({dateStart:l0,dateEnd:m0}),e.onClose(b0)):u0||console.log("Invalid time range")},P0=b0=>{localStorage.setItem(FM,JSON.stringify(b0))},f0=()=>q2(S)?C2(S,"yyy-MM-dd HH:mm:ss"):S,T0=()=>q2(x)?C2(x,"yyy-MM-dd HH:mm:ss"):typeof x<"u"?x:"",C0=()=>{v(b0=>!b0)};return O(f1,{theme:h,children:O(Bd,{children:O(uc,{className:"container",elevation:5,children:D(z2,{display:"flex",style:{flex:"1"},children:[g&&C&&D(z2,{container:!0,direction:"row",wrap:"nowrap",children:[O(Te,{...R,value:p,setValue:n,navState:[!0,L],marker:re.FIRST_MONTH}),O("div",{className:"divider"}),O(Te,{...R,value:c,setValue:r,navState:[L,!0],marker:re.SECOND_MONTH})]}),g&&!C&&!_&&!l&&!I&&D(z2,{container:!0,direction:"row",wrap:"nowrap",children:[Q&&O(Te,{...R,value:p,setValue:n,navState:[!0,L],marker:re.FIRST_MONTH}),s0&&O(Te,{...R,value:c,setValue:r,navState:[L,!0],marker:re.SECOND_MONTH})]}),D(z2,{display:"flex",flex:1,children:[D("div",{style:{display:"flex",flexDirection:"column",flex:"1"},children:[k&&D(q1,{children:[O("div",{style:{maxHeight:_?"60vh":"50vh",overflowY:"auto",display:l?"flex":"none",flex:1,flexDirection:"column"},children:O(Dz,{selectedRange:o,isHorizontal:!_,ranges:t,setRange:s,onClose:e.onClose})}),O(Hz,{styles:!l,getEditedStartDate:f0,isHorizontal:!_,isMobile:!0,isFullCalendar:!1,getEditedEndDate:T0,handleStart:Y,handleStop:d0,onTimeRangeSet:V0,calendarOpen:g,stopCalendarOpen:s0,startCalendarOpen:Q,setCalendarOpen:d,setStopCalendar:M0,setStartCalendar:z0}),k&&D(vd,{onClick:C0,theme:h,children:[O("span",{children:l?"Set Absolute Time":"Set Relative Time"}),O(No,{className:i0({name:"rnnx2x",styles:"font-size:12px"})})]})]}),!k&&O(Hz,{styles:!0,isMobile:!1,isFullCalendar:!0,getEditedStartDate:f0,getEditedEndDate:T0,handleStart:Y,handleStop:d0,onTimeRangeSet:V0,calendarOpen:g,setCalendarOpen:d}),g&&k&&!l&&D(z2,{container:!0,direction:"row",wrap:"nowrap",children:[Q&&O(Te,{...R,value:p,setValue:n,navState:[!0,L],marker:re.FIRST_MONTH}),s0&&O(Te,{...R,value:c,setValue:r,navState:[L,!0],marker:re.SECOND_MONTH})]})]}),O("div",{className:"divider"}),C&&O(z2,{style:{display:"flex",flex:1},children:O(Dz,{selectedRange:o,ranges:t,setRange:s,onClose:e.onClose})})]})]})})})})};function Td(){const e=_1(),t=q.useRef(null),o=b=>{b.key==="Escape"&&e(dz(!1))},M=b=>{t.current&&!t.current.contains(b.target)&&e(dz(!1))};return q.useEffect(()=>(document.addEventListener("keydown",o,!0),document.addEventListener("click",M,!0),()=>{document.removeEventListener("keydown",o,!0),document.removeEventListener("click",M,!0)})),{ref:t}}var Vb={},Sd=N1;Object.defineProperty(Vb,"__esModule",{value:!0});var Or=Vb.default=void 0,xd=Sd(L1()),Xd=K0,wd=(0,xd.default)((0,Xd.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z"}),"AccessTimeOutlined");Or=Vb.default=wd;var $b={},Cd=N1;Object.defineProperty($b,"__esModule",{value:!0});var sr=$b.default=void 0,Ed=Cd(L1()),kd=K0,_d=(0,Ed.default)((0,kd.jsx)("path",{d:"M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"KeyboardArrowLeft");sr=$b.default=_d;const Id=g0("div",{target:"e13b6hz0"})({name:"12m2hdf",styles:'display:flex;flex-direction:column;justify-content:"center";padding:"3px";.time-span{text-align:center;}'});function Dd({dateRange:e}){const t=Q0();return O(f1,{theme:t,children:D(Id,{children:[O("span",{className:"time-span",children:q2(e.dateStart)?C2(e.dateStart,"yyyy/MM/dd HH:mm:ss"):e.dateStart}),O("span",{className:"time-span",children:"to"}),O("span",{className:"time-span",children:q2(e.dateEnd)?C2(e.dateEnd,"yyyy/MM/dd HH:mm:ss"):typeof e.dateEnd<"u"?e.dateEnd:""})]})})}const st=i0({name:"th2gus",styles:"svg{font-size:1.15em;margin:0px 2px;}.tooltip{background-color:red;display:flex;align-items:center;justify-items:center;}@media screen and (max-width: 1200px){font-size:1em;padding:8px;color:#ddd;line-height:1.5;svg{margin-right:0;}span{display:none;}}"}),Pd=e=>{try{let t=localStorage.getItem(e);if(typeof t=="string"){let o=JSON.parse(t);if(o.dateStart&&o.dateEnd)return JSON.parse(t)}}catch(t){return console.log(t),{dateStart:"",dateEnd:""}}},$M=e=>O(SO,{id:e.id,elevation:0,anchorOrigin:{vertical:"bottom",horizontal:"left"},PaperProps:{sx:{background:e.qryntheme.neutral,color:e.qryntheme.contrast}},transformOrigin:{vertical:"bottom",horizontal:"left"},...e}),jz=["1m","5m","10m","30m","1h","3h","6h","12h","24h"];function Hd(e){const t=Date.now(),{id:o,minDate:M,maxDate:b,startTs:p,stopTs:n,label:c,onLabelChange:r,onStartChange:s,onStopChange:i,pickerOpen:A,onPickerOpen:h}=e,g=h2.useMediaQuery({query:"(max-width: 1013px)"}),d=w0(S0=>S0.isSplit),m=Q0(),L={label:"Last 5 minutes",dateStart:new Date(Date.now()-5*6e4),dateEnd:new Date(Date.now())},R=()=>{try{const S0=Pd(FM);if(!S0)return L;if((S0==null?void 0:S0.label)!==""&&typeof S0.label<"u"){const U0=mo(S0==null?void 0:S0.label);S0.dateStart=U0.dateStart,S0.dateEnd=U0.dateEnd}else S0.dateStart=new Date(S0.dateStart),S0.dateEnd=new Date(S0.dateEnd);return S0}catch{if(H2(p)&&H2(n))return{dateStart:p,dateEnd:n}}},W=gz(M,zz(t,-10)),S=gz(b,zz(t,10)),[N,x]=Ol(R()||{},W,S),[w,l]=q.useState({...R()}),[v,B]=q.useState(),[C,k]=q.useState(N||t),[_,I]=q.useState(x||qt(C,1)),Q=q.useMemo(()=>({dateStart:p,dateEnd:n,label:c}),[p,n,c]);q.useEffect(()=>{r(Q.label)},[Q.label]);const{dateStart:z0,dateEnd:s0}=w,{ref:M0}=Td(),d0=S0=>{ke(S0,_)&&k(S0)},Y=S0=>{nz(S0,C)&&I(S0)},V0=S0=>{let{label:U0,dateStart:Z0,dateEnd:z1}=S0;Z0&&z1&&(S0.label=U0,S0.dateStart=Z0=Wc([Z0,W]),S0.dateEnd=z1=hc([z1,S]),l(S0),P0(S0),u0(S0),k(Z0),I(rb(Z0,z1)?qt(Z0,1):z1))},P0=S0=>{localStorage.setItem(FM,JSON.stringify(S0))},f0=S0=>{if(z0&&!s0&&!ke(S0,z0)){const U0={dateStart:z0,dateEnd:S0};u0(U0),P0(U0),l(U0),r(""),b0()}else l({dateStart:S0,dateEnd:void 0});B(S0)},T0=(S0,U0)=>{if(S0===re.FIRST_MONTH){const Z0=qt(C,U0);ke(Z0,_)&&k(Z0)}else{const Z0=qt(_,U0);ke(C,Z0)&&I(Z0)}},C0=S0=>{z0&&!s0&&(!v||!Ve(S0,v))&&B(S0)},b0=(S0=null)=>{S0==null||S0.preventDefault(),h(!1)},m0={inHoverRange:S0=>z0&&!s0&&v&&nz(v,z0)&&cb(S0,{start:z0,end:v})},R0={onDayClick:f0,onDayHover:C0,onMonthNavigate:T0};function u0(S0){const{dateStart:U0,dateEnd:Z0,label:z1}=S0,X0=H2(U0),O1=H2(Z0),w1=typeof z1<"u";X0&&s(U0),O1&&i(Z0),w1&&r(z1)}const B0=S0=>{S0.preventDefault(),A===!0?b0(S0):h(!0)},e1=(S0,U0="range")=>{const Z0=S0==="backward"?lO:AO;let z1={years:0,months:0,days:0,hours:0,minutes:0,seconds:0};U0==="range"?z1=sO({start:z0,end:s0}):U0.includes("d")?z1.days=parseInt(U0):U0.includes("h")?z1.hours=parseInt(U0):U0.includes("m")?z1.minutes=parseInt(U0):U0.includes("s")&&(z1.seconds=parseInt(U0));const X0=Z0(z0,z1),O1=Z0(s0,z1),w1={dateStart:X0,dateEnd:O1,label:""};l(w1),P0(w1),u0(w1)},[G,t0]=q.useState(null),n0=!!G,[h0,x0]=q.useState(null),H0=!!h0,$0=S0=>{t0(()=>S0.currentTarget)},a1=S0=>{x0(()=>S0.currentTarget)},c1=(S0,U0,Z0)=>{t0(null),x0(null),U0&&Z0&&e1(U0,Z0)};return D("div",{style:{display:"flex"},children:[!g&&!d&&D(q1,{children:[O(at,{onClick:()=>{e1("backward")},attachedside:"r",emptySide:"l",className:D0(st),children:O(sr,{})}),O(at,{onClick:$0,attachedside:"both",size:"small",className:D0(st),"aria-controls":n0?"backward-menu":void 0,"aria-haspopup":"true","aria-expanded":n0?"true":void 0,children:O(Ue,{})}),O($M,{id:"backward-menu",anchorEl:G,open:n0,onClose:c1,qryntheme:m,children:jz.map(S0=>O(DM,{sx:{"&.MuiMenuItem-root":{fontSize:12}},onClick:U0=>c1(U0,"backward",S0),children:S0},`${S0} l`))})]}),O(X1,{title:c?O(Dd,{dateRange:w}):"",children:D(at,{onClick:B0,className:D0(st),attachedside:"both",children:[O(Or,{}),O("span",{children:c||(q2(w.dateStart)?C2(w.dateStart,"yyyy/MM/dd HH:mm:ss"):w.dateStart)+"-"+(q2(w.dateEnd)?C2(w.dateEnd,"yyyy/MM/dd HH:mm:ss"):typeof w.dateEnd<"u"?w.dateEnd:"")})]})}),!g&&!d&&D(q1,{children:[O(at,{onClick:a1,id:`forward-button-${o}`,size:"small",className:D0(st),"aria-controls":H0?`forward-menu${o}`:void 0,"aria-haspopup":"true","aria-expanded":H0?"true":void 0,children:O(Ue,{})}),O($M,{id:`forward-menu-${o}`,anchorEl:h0,open:H0,onClose:c1,qryntheme:m,children:jz.map(S0=>O(DM,{sx:{"&.MuiMenuItem-root":{fontSize:12}},onClick:U0=>c1(U0,"forward",S0),children:S0},`${S0} r`))}),O(at,{onClick:()=>{e1("forward")},attachedside:"l",className:D0(st),children:O(G2,{})})]}),A?O("div",{tabIndex:0,ref:M0,children:O(f1,{theme:m,children:O(yd,{dateRange:w,minDate:W,maxDate:S,ranges:Rb(new Date),firstMonth:C,secondMonth:_,setFirstMonth:d0,setSecondMonth:Y,setDateRange:V0,helpers:m0,handlers:R0,onClose:b0})})}):null]})}const jd=Hd;function Fd(e){const{historyTabHeader:t,historyTab:o,starredHistoryTab:M,closeButton:b,linksTabHeader:p,linksTab:n,settingTab:c,settingTabHeader:r}=e;return D(kO,{defaultValue:0,children:[D(Lc,{children:[D(_e,{children:[O(XO,{}),O("span",{children:"Queries"})]}),D(_e,{children:[O(wO,{}),O("span",{children:"Links"})]}),D(_e,{children:[O(CO,{}),O("span",{children:"Starred"})]}),D(_e,{children:[O(EO,{}),O("span",{children:"Settings"})]}),b]}),D(Ie,{value:0,children:[t,o]}),D(Ie,{value:1,children:[p,n]}),O(Ie,{value:2,children:M}),D(Ie,{value:3,children:[r,c]})]})}function Vd({pos:e,item:t,copyLink:o,handleDelete:M,handleStarLinkItem:b,handleSubmit:p,label:n}){var L;const[c,r]=q.useState(!1),{fromDate:s,toDate:i,type:A,url:h,queryInput:g,limit:d}=t,m=()=>{r(R=>!R)};return D(HO,{open:c,children:[O($d,{pos:e,onOpen:c}),O("button",{className:"open-button",onClick:()=>{m()},children:c?O(or,{fontSize:"small"}):O(tr,{fontSize:"small"})}),D("div",{className:"inline-params",children:[O(X1,{title:"API URL",children:D("span",{style:{display:"flex",alignItems:"center"},children:[O(Sc,{fontSize:"small",style:{marginRight:"3px"}})," ",h]})}),D("span",{style:{whiteSpace:"nowrap"},children:["limit: ",d]}),D("span",{style:{whiteSpace:"nowrap"},children:["step: ",(L=t==null?void 0:t.params)==null?void 0:L.step]}),D("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:[" ",O(X1,{title:`${s} - ${i}`,children:O(Zc,{style:{marginRight:"3px",height:"14px",width:"14px"}})})," ",D(PO,{children:[s," - ",i]})]})]}),D("div",{className:"block-params",children:[D("p",{children:[O("span",{className:"key",children:" Query:"})," ",O("span",{className:"value",children:g})," "]}),D("p",{children:[O("span",{className:"key",children:" API URL:"})," ",O("span",{className:"value",children:h})," "]}),D("p",{children:[O("span",{className:"key",children:" Data Source Type:"})," ",O("span",{className:"value",children:A})," "]}),D("p",{children:[O("span",{className:"key",children:"From: "})," ",O("span",{className:"value",children:s})," "]}),D("p",{children:[O("span",{className:"key",children:" To: "})," ",D("span",{className:"value",children:[" ",i]})," "]}),D("p",{children:[O("span",{className:"key",children:"Limit: "})," ",O("span",{className:"value",children:d})," "]}),D("p",{children:[O("span",{className:"key",children:" Step:"})," ",O("span",{className:"value",children:t.params.step})," "]})]}),O(Ud,{item:t,onOpen:c,copyLink:o,handleDelete:M,handleStarLinkItem:b,handleSubmit:p,label:n})]})}function $d({pos:e,onOpen:t}){return O("div",{style:{display:t?"none":"flex",width:"30vw"},children:D(Nc,{children:["Link ",e," "]})})}function Ud(e){const{item:t,onOpen:o,copyLink:M,handleDelete:b,handleStarLinkItem:p,handleSubmit:n,label:c}=e,r=Q0(),[s,i]=q.useState(null),A=!!s,[h,g]=q.useState(!1);return D("div",{style:{display:"flex",flexDirection:o?"column-reverse":"row",justifyContent:"space-between",alignItems:"center"},children:[O(q1,{children:O(X1,{title:"Copy Link to Clipboard",placement:"right-end",children:D("span",{style:{display:"flex"},children:[O(ae,{onClick:()=>M(t==null?void 0:t.data,"link",h),isActive:!0,style:{flex:1},className:"URL-COPY",attachedside:"r",children:O(Sc,{style:{height:"14px",width:"14px"},fontSize:"small"})}),O(ae,{attachedside:"l",onClick:R=>{i(()=>R.currentTarget),g(()=>h)},size:"small",className:"date-time-selector","aria-controls":A?"backward-menu":void 0,"aria-haspopup":"true","aria-expanded":A?"true":void 0,children:O(Ue,{fontSize:"small"})}),O($M,{id:"backward-menu",anchorEl:s,open:A,onClose:()=>{i(null)},qryntheme:r,size:"small",children:O(DM,{style:{padding:"0 14px"},children:O(Cs,{children:O(ys,{style:{padding:"0",marginRight:0,cursor:c?"default":"not-allowed"},checked:h,onChange:R=>{g(()=>!!R.target.checked)},control:O(rs,{style:{paddingRight:"0px",marginRight:"3px"},sx:{"& .MuiSvgIcon-root":{fontSize:14}},disabled:!c}),label:O(co,{style:{fontSize:"12px",color:r.contrast},children:"Relative time"})})})},"relativeTime")})]})})}),O(X1,{title:"Delete Query",children:O(ae,{onClick:()=>b(t),children:O(Lo,{style:{height:"14px",width:"14px"},fontSize:"small"})})}),O(X1,{title:"Star / Unstar Link",children:O(ae,{onClick:()=>p(t),children:t.starred?O(Bb,{style:{height:"14px",width:"14px"},fontSize:"small"}):O(vc,{style:{height:"14px",width:"14px"},fontSize:"small"})})}),O(X1,{title:"Search Logs from Query",children:D(Bc,{onClick:()=>n(t==null?void 0:t.data),children:[O(er,{className:"open-icon",fontSize:"small"}),O("span",{className:"open-text",children:"Open In New Tab"})]})})]})}function UM({queryHistory:e,copyQuery:t,handleDelete:o,handleStarItem:M,handleSubmit:b,filtered:p,emptyMessage:n,isStarred:c}){const[r,s]=q.useState([]);q.useEffect(()=>{s(e)},[]),q.useEffect(()=>{p.length>0&&s(p)},[p]),q.useEffect(()=>{s(e)},[e]);function i(A){let h="";if(typeof A=="string")try{h=JSON.parse(A).queryInput}catch{h=A}return h}return O(db,{className:c?"starredCont":"",children:r.length>0?r==null?void 0:r.map((A,h)=>D(yc,{children:[O("span",{style:{color:"#666",paddingRight:"10px",width:"10px",display:"flex",alignItems:"center"},children:r.length-h}),O(X1,{title:A.data,children:D(Nc,{children:[i(A.data)," "]})}),O("span",{children:C2(A.timestamp,"yyyy/MM/dd HH:mm:ss")}),D("div",{style:{display:"flex",alignItems:"center"},children:[O(X1,{title:"Copy Query to Clipboard",children:O(ae,{onClick:()=>t(A.data),children:O(_O,{style:{height:"14px",width:"14px"},fontSize:"small"})})}),O(X1,{title:"Delete Query",children:O(ae,{onClick:()=>o(A),children:O(Lo,{style:{height:"14px",width:"14px"},fontSize:"small"})})}),O(X1,{title:"Star / Unstar Query",children:O(ae,{onClick:()=>M(A),children:A.starred?O(Bb,{style:{height:"14px",width:"14px"},fontSize:"small"}):O(vc,{style:{height:"14px",width:"14px"},fontSize:"small"})})}),O(X1,{title:"Search Logs from Query",children:D(Bc,{onClick:()=>b(A),children:[O(G2,{className:"open-icon"}),O("span",{className:"open-text",children:"Show Results"})]})})]})]},h)):O(Mr,{message:n})})}function lr({linksHistory:e,copyLink:t,handleDelete:o,handleStarLinkItem:M,handleSubmit:b,filtered:p,emptyMessage:n,isStarred:c,label:r}){const[s,i]=q.useState([]);return q.useEffect(()=>{i(e)},[]),q.useEffect(()=>{p.length>0&&i(p)},[p]),q.useEffect(()=>{i(e)},[e]),O(db,{className:c?"starredCont":"",children:s.length>0?s==null?void 0:s.map((A,h)=>D(yc,{children:[O("span",{style:{paddingRight:"10px",color:"#666",width:"10px",display:"flex",alignItems:"center"},children:(s==null?void 0:s.length)-h}),O(Vd,{pos:(s==null?void 0:s.length)-h,item:A,copyLink:t,handleDelete:o,handleStarLinkItem:M,handleSubmit:b,label:r})]},h)):O(Mr,{message:n})})}function Gd({starredQueries:e,starredLinks:t,handleDeleteQuery:o,handleDeleteLink:M,handleStarItem:b,handleStarLinkItem:p,handleSubmitQuery:n,handleSubmitLink:c,filteredLinks:r,filteredQueries:s,setFilteredStarLink:i,setFilteredStarQuery:A,filterItems:h,emptyQueryMessage:g,emptyLinkMessage:d,copyQuery:m,label:L}){const[R,W]=q.useState([]),[S,N]=q.useState([]);return q.useEffect(()=>{W(e),N(t)},[]),q.useEffect(()=>{r.length>0&&N(r),s.length>0&&W(s)},[r,s]),q.useEffect(()=>{W(e),N(t)},[e,t]),D(St,{defaultValue:0,children:[D(Lc,{children:[O(_e,{children:"Queries"}),O(_e,{children:"Links"})]}),D(Ie,{value:0,children:[O(ht,{searchQueriesText:"Queries",queryHistory:e,filterItems:h,setFilteredItems:A}),O(UM,{queryHistory:R,copyQuery:m,handleDelete:o,handleStarItem:b,handleSubmit:n,filtered:s,emptyMessage:g,isStarred:!0})]}),D(Ie,{value:1,children:[O(ht,{searchQueriesText:"Links",queryHistory:t,filterItems:h,setFilteredItems:i}),O(lr,{linksHistory:S,copyQuery:m,handleDelete:M,handleStarLinkItem:p,handleSubmit:c,filtered:r,emptyMessage:d,isStarred:!0,label:L})]})]})}function ht({queryHistory:e,filterItems:t,setFilteredItems:o,searchQueriesText:M}){const[b,p]=q.useState("");function n(c){let r=c.target.value;p(r);const s=t(e,r);s.length>0?o(s):o([])}return O(Tc,{children:D("div",{style:{display:"flex",alignItems:"center"},children:[O(IO,{}),O(DO,{type:"text",value:b1(b),onChange:n,placeholder:`Search ${M}`})," ",D("span",{style:{margin:"0px 4px"},children:["Total: ",e.length]})]})})}function Kd({queryHistory:e,linksHistory:t}){return O(Tc,{children:D("div",{style:{display:"flex",alignItems:"center"},children:[D("span",{style:{margin:"0px 4px"},children:["Query History Rows: ",e==null?void 0:e.length]})," | ",D("span",{style:{margin:"0px 4px"},children:["Links History Rows: ",t==null?void 0:t.length]})]})})}function Qd({clearHistory:e,clearLinksHistory:t}){return O(db,{children:D("div",{style:{display:"flex"},children:[D(iz,{children:[O("div",{children:"Clear Query History"}),O("small",{children:"Delete all of your query history, permanently."}),O(xz,{dialogType:"Query",clearHistory:e})]}),D(iz,{children:[O("div",{children:"Clear Links History"}),O("small",{children:"Delete all of your links history, permanently."}),O(xz,{dialogType:"Links",clearHistory:t})]})]})})}const Ar=()=>{const e="Link Copied To Clipboard",t=_1(),o=qc().historyStore(),M=fc(),b=w0(b0=>b0.queryHistory),p=w0(b0=>b0.linksHistory),n=w0(b0=>b0.historyOpen),c=Q0(),[r,s]=q.useState([]),[i,A]=q.useState([]),[h,g]=q.useState([]),[d,m]=q.useState([]),[L,R]=q.useState([]),[W,S]=q.useState(!1),N=w0(b0=>b0.start),x=w0(b0=>b0.stop),w=w0(({label:b0})=>b0);function l(b0){const l0=o.remove(b0);t(oo(l0)),t(D2({message:"Query deleted succesfully",type:ee.info}))}function v(b0){const l0=M.remove(b0);t(to(l0))}function B(b0){const l0={id:"",limit:100,panel:"left",queryInput:"",queryType:"range",direction:"forward"};let m0={};try{m0=JSON.parse(b0.data)}catch{m0={...l0}}const{id:R0,limit:u0,panel:B0,queryInput:e1,queryType:G,type:t0,dataSourceId:n0,url:h0,direction:x0}=m0;let H0="",$0=0;if(e1.includes("$__interval")){const c1=(x.getTime()-N.getTime())/1e3/30,S0=+1 .toFixed(1),U0=c1/S0,Z0=Math.round(U0*window.devicePixelRatio.toFixed(2));H0=e1.replace(/\[\$__interval\]/,`[${Z0}s]`),$0=Z0}else H0=e1;t(w2(t0,H0,G,u0,B0,R0,x0||"forward",n0,h0,$0))}function C(b0){window.open(b0)}function k(b0,l0){return b0==null?void 0:b0.filter(m0=>m0.data.toLowerCase().includes(l0.toLowerCase()))}function _(b0){A(b0)}function I(b0){g(b0)}function Q(b0){R(b0)}function z0(b0){m(b0)}q.useEffect(()=>{const b0=(b==null?void 0:b.filter(m0=>m0.starred))||[],l0=(p==null?void 0:p.filter(m0=>m0.starred))||[];S(l0),s(b0)},[b,p]);function s0(b0){const l0={...b0,starred:!b0.starred},m0=o.update(l0);t(oo(m0)),l0.starred?t(D2({message:"Query starred succesfully",type:ee.success})):t(D2({message:"Query unstarred succesfully",type:ee.success}))}function M0(b0){const l0={...b0,starred:!b0.starred},m0=M.update(l0);t(to(m0)),l0.starred?t(D2({message:"Link starred succesfully",type:ee.success})):t(D2({message:"Link unstarred succesfully",type:ee.success}))}function d0(){t(D2({type:"success",message:e}))}function Y(b0){navigator.clipboard.writeText(b0).then(function(){d0()},function(l0){console.log("error on copy",l0)})}function V0(b0){let l0=document.createElement("textarea");return l0.value=b0,l0.style={position:"fixed",left:"-999999px",top:"-999999px"},document.body.appendChild(l0),l0.focus(),l0.select(),new Promise((m0,R0)=>{d0(),document.execCommand("copy")?m0():R0(),l0.remove()})}function P0(b0,l0="query",m0=!1){const R0=new URL(b0),{hash:u0}=R0,B0=new URLSearchParams(u0.replace(/#/,""));B0.set("label",w);const e1=new URL(window.location.href);e1.hash=`#${B0.toString()}`;const G=l0==="query"?JSON.parse(b0).queryInput:m0&&w?e1:b0;setTimeout(()=>{navigator!=null&&navigator.clipboard&&window.isSecureContext?Y(G):V0(G)},200)}function f0(){t(jc(!1))}function T0(){const b0=o.clean();t(oo(b0)),(b0==null?void 0:b0.length)<1&&t(D2({message:"Query History cleared succesfully",type:ee.info}))}function C0(){const b0=M.clean();t(to(b0)),(b0==null?void 0:b0.length)<1&&t(D2({message:"Links History cleared succesfully",type:ee.info}))}return O(mc,{theme:c,children:n&&O(xO,{anchor:"bottom",style:{maxHeight:"250px"},open:n,variant:"persistent",theme:c,children:O(Fd,{historyTabHeader:O(ht,{searchQueriesText:"Queries",queryHistory:b,clearHistory:T0,filterItems:k,setFilteredItems:_}),historyTab:O(UM,{queryHistory:b,copyQuery:P0,handleDelete:l,handleStarItem:s0,handleSubmit:B,filtered:i,emptyMessage:"There is no query history. Please execute some queries and you will see a history here."}),linksTabHeader:O(ht,{searchQueriesText:"Links",queryHistory:p,filterItems:k,setFilteredItems:I}),linksTab:O(lr,{linksHistory:p,copyLink:P0,handleDelete:v,handleStarLinkItem:M0,handleSubmit:C,filtered:h,label:w,emptyMessage:"There is no links history. Please execute some queries and share links and you will see a history here."}),starredTabHeader:O(ht,{searchQueriesText:"Queries",queryHistory:r,clearHistory:T0,filterItems:k,setFilteredItems:Q}),starredTab:O(UM,{queryHistory:r,copyQuery:P0,handleDelete:l,handleStarItem:s0,handleSubmit:B,filtered:L,emptyMessage:"Click the ‘Star’ icon to save queries and find them here to reuse again"}),starredHistoryTab:O(Gd,{starredQueries:r,starredLinks:W,handleDeleteQuery:l,handleDeleteLink:v,handleStarItem:s0,handleStarLinkItem:M0,handleSubmitQuery:B,handleSubmitLink:C,filterItems:k,setFilteredStarLink:z0,setFilteredStarQuery:Q,filteredQueries:L,filteredLinks:d,emptyQueryMessage:"Click the 'Star' icon to save links and find them here to reuse again",emptyLinkMessage:"Click the 'Star' icon to save queries and find them here to reuse again",copyQuery:P0,label:w}),settingTabHeader:O(Kd,{queryHistory:b,linksHistory:p}),settingTab:O(Qd,{clearHistory:T0,clearLinksHistory:C0}),closeButton:O(CA,{onClose:f0})})})})},Jd=({type:e,actualQuery:t,total:o,dataView:M})=>q.useMemo(()=>{var A;const p=(e==="matrix"||e==="flux")&&(t==null?void 0:t.tableView),n=e==="stream"&&(t==null?void 0:t.tableView);let c="",r="",s="",i="";if(p){const h=((A=M==null?void 0:M.tableData)==null?void 0:A.total)*25,g=h<330?h:330;c=`${g+25}px`,s=`${g}px`,r="fit-content",i="fit-content"}if(e==="vector"||n){const h=o*25,g=h<330?h:330;c=`${g+25}px`,s=`${g}px`,r="fit-content",i="fit-content"}if(e==="stream"&&!(t!=null&&t.tableView)){const g=o*25<350?"fit-content":"inherit";c=g,s=g,r="fit-content",i="fit-content"}return(e==="matrix"||e==="flux")&&!(t!=null&&t.tableView)&&(c="fit-content",s="400px",r="fit-content",i="fit-content"),{regularCont:c,regularView:s,maxCont:r,maxView:i}},[o,e,t==null?void 0:t.tableView]),Yd=({total:e,panelSize:t,dataView:o})=>{var p;let M=0;return o.type==="matrix"?M=(p=o==null?void 0:o.tableData)==null?void 0:p.total:M=e,q.useMemo(()=>{const n=M*25;return t==="max"?n:t==="min"?0:n<310?n:310},[t])},Zd=({panel:e,dataView:t})=>q.useMemo(()=>{let M={};return e&&t&&(M=e==null?void 0:e.find(b=>b.id===t.id)),M},[e,t]);function Fz(e){const{name:t}=e;return O(q1,{children:t})}const eu=g0("div",{target:"emosc6a8"})("display:flex;align-items:center;justify-content:center;flex:1;height:100%;font-size:0.75em;letter-spacing:1px;padding:30px;color:",({theme:e})=>e.lightContrast,";background:",({theme:e})=>e.background,";text-align:center;"),tu=g0("div",{target:"emosc6a4"})({name:"c6g1h8",styles:"overflow-y:auto;margin:2px;display:flex;flex-direction:column;flex:1;max-height:100vh;&::-webkit-scrollbar{background:transparent;}::-webkit-scrollbar-corner{background:transparent;}&::-webkit-scrollbar-thumb{background:transparent;}"}),ou=g0("div",{target:"emosc6a3"})("display:flex;align-items:center;color:",({theme:e})=>e.contrast,";font-size:12px;.header-actions{justify-self:flex-end;.header-icon{padding:1px 2px;margin:0px 2px;border-radius:3px;cursor:pointer;color:",({theme:e})=>e.contrast,";&:hover{background:",({theme:e})=>e.neutral,";}}}.view-header-info{display:flex;flex:1;align-items:center;span{margin:0px 3px;.exp{font-family:monospace;}}}"),Vz=g0("div",{target:"emosc6a2"})("margin:0px 2px;padding:2px;font-size:10px;border:1px solid ",({theme:e})=>e.accentNeutral,";border-radius:3px;"),Mu=g0("div",{target:"emosc6a1"})("display:flex;align-items:center;margin:0px 12px;flex:1;max-width:450px;overflow-x:auto;&::-webkit-scrollbar{width:5px;height:5px;}&::-webkit-scrollbar-corner{background:transparent;}&::-webkit-scrollbar-thumb{border-radius:5px;background:",({theme:e})=>e.alphaPlusNeutral,";}"),bu=g0("div",{target:"emosc6a0"})("background:",({theme:e})=>e.shadow,";color:",({theme:e})=>e.contrast,";display:flex;flex-direction:column;padding:20px;div{width:100%;overflow-wrap:break-word;font-family:monospace;}p{padding:10px;font-size:12px;display:flex;flex:1;align-items:center;flex-wrap:wrap;span.label{background:",({theme:e})=>e.accentNeutral,";color:",({theme:e})=>e.shadow,";margin:2px;padding:2px;border-radius:2px;}}h4{margin-bottom:20px;padding-bottom:4px;border-bottom:1px solid ",({theme:e})=>e.accentNeutral,";}pre{font-family:monospace;}small{font-size:10px;}");var Ub={},pu=N1;Object.defineProperty(Ub,"__esModule",{value:!0});var E2=Ub.default=void 0,zu=pu(L1()),nu=K0,cu=(0,zu.default)((0,nu.jsx)("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"}),"KeyboardArrowDown");E2=Ub.default=cu;const ru=({labels:e})=>(e==null?void 0:e.length)>0?D("p",{children:["Labels:",e.map((t,o)=>O("span",{className:"label",children:t},o))]}):null,iu=({idRef:e,expr:t,queryType:o})=>D(q1,{children:[O("h4",{children:e}),O("div",{children:O("p",{children:t})}),D("p",{children:["Query Type: ",o]})]}),au=({expr:e,idRef:t,labels:o,limit:M,queryType:b,total:p})=>{const n={idRef:t,expr:e,queryType:b},c={labels:o};return D(bu,{children:[O(iu,{...n}),O(ru,{...c}),D("p",{children:["Limit: ",M]}),D("p",{children:["Total: ",p]})]})};function Ou({expr:e,idRef:t,labels:o,queryType:M,limit:b,total:p,onClose:n,open:c}){const r=Q0();return O(f1,{theme:r,children:O(sb,{open:c,onClose:n,PaperProps:{classes:{root:lb}},children:O(au,{expr:e,idRef:t,labels:o,queryType:M,limit:b,total:p})})})}function Ct(e){var S;const{fixedSize:t}=e||{fixedSize:!1},o=h2.useMediaQuery({query:"(max-width: 1013px)"}),[M,b]=q.useState(!1),[p,n]=q.useState(!0),c=Q0(),{actualQuery:r,dataView:s,type:i,total:A,setMinimize:h,setMaxHeight:g}=e,d=q.useMemo(()=>{const N=i==="matrix"&&(r==null?void 0:r.tableView),x=i==="stream"&&(r==null?void 0:r.tableView);if((i==="matrix"||i==="flux")&&!(r!=null&&r.tableView))return"Chart";if(i==="stream"&&!(r!=null&&r.tableView))return"Logs";if(i==="vector"||N||x)return"Table";if(i==="empty")return"No Results"},[i,r==null?void 0:r.tableView]),m=q.useCallback(()=>{p?(h(),n(!1)):(g(),n(!0))},[p,h,g]),L=q.useCallback(()=>{b(!0)},[]),R=q.useMemo(()=>{var N;return((N=s==null?void 0:s.labels)==null?void 0:N.join(" | "))||""},[s.labels]),W=q.useMemo(()=>{var N;if((N=s==null?void 0:s.labels)!=null&&N.length)if((s==null?void 0:s.labels.length)>4){const x=[...s.labels].slice(0,4);return D(q1,{children:[x.map((w,l)=>O(Vz,{children:O(Fz,{name:w,...e.theme})},l))," ","..."]})}else return O(q1,{children:s.labels.map((x,w)=>O(Vz,{children:O(Fz,{name:x,...e.theme})},w))})},[s.labels,e.theme]);if(r){const{idRef:N,expr:x,limit:w,queryType:l}=r;return O(f1,{theme:c,children:D(ou,{children:[D("div",{className:"view-header-info",children:[O("span",{children:O("span",{className:"exp",children:d})}),O(X1,{title:(r==null?void 0:r.expr)||"",children:D("span",{children:[" ",O("span",{className:"exp",children:r==null?void 0:r.idRef})]})}),!o&&D(q1,{children:[D("span",{children:["limit:"," ",O("span",{className:"exp",children:r==null?void 0:r.limit})]}),D("span",{children:["count: ",O("span",{className:"exp",children:A})]})]}),((S=s==null?void 0:s.labels)==null?void 0:S.length)>0&&!o&&O("span",{children:D(Mu,{title:R,children:["labels:",W]})})]}),O("div",{className:"header-actions",children:!t&&D(q1,{children:[O(jO,{className:"header-icon",style:{fontSize:"12px"},onClick:L}),O(su,{isOpen:p,onClick:m})]})}),M&&O(Ou,{labels:s.labels||[],limit:w,expr:x,queryType:l,idRef:N,open:M,total:A,onClose:v=>b(!1)})]})})}return null}const su=e=>{const{isOpen:t,onClick:o}=e;return t?O(E2,{className:"header-icon",onClick:o,style:{fontSize:"14px"}}):O(Pb,{className:"header-icon",onClick:o,style:{fontSize:"14px"}})};function lu(e){const t=Q0(),{loading:o}=e;return o?null:O(f1,{theme:t,children:O(eu,{children:"Please adjust search parameters and click on ‘Show Results’ button"})})}const vo=g0("div",{target:"e5pse6w4"})("margin:4px;padding:5px;margin-top:0px;border:1px solid ",({theme:e})=>e.accentNeutral,";border-radius:3px;display:flex;flex-direction:column;flex:",({size:e})=>e==="min"?0:1,";height:",e=>e.size==="regular"?e.vheight.regularCont:e.size==="max"?e.vheight.maxCont:"20px",";.view-content{height:",e=>e.size==="regular"?e.vheight.regularView:e.size==="max"?e.vheight.maxView:"0px",";display:",e=>e.size==="min"?"none":(e.size==="regular","flex"),";flex-direction:",e=>(e.size==="regular","column"),";flex:1;}"),j2=g0(PM,{target:"e5pse6w3"})("width:100%;background:",({theme:e})=>e.shadow,";height:inherit;flex:1;"),Gb=g0(Cc,{target:"e5pse6w1"})("min-width:320px;background:",({theme:e})=>e.shadow,";border-bottom:4px solid ",({theme:e})=>e.bgNeutral,";display:",({panelsize:e})=>e==="min"?"none":"flex",";align-items:center;align-content:space-between;"),F2=g0(wc,{target:"e5pse6w0"})("color:",({theme:e})=>e.contrast,";background:",({theme:e})=>e.neutral,";border:1px solid ",e=>e.theme.accentNeutral,";cursor:pointer;font-size:13px;background-color:transparent;padding:6px 10px;border:none;border-radius:3px 3px 0px 0px;display:flex;justify-content:center;align-items:center;border-bottom:1px solid transparent;transition:0.2s all;&:hover{background-color:",({theme:e})=>e.lightNeutral,";}&:focus{color:",({theme:e})=>e.contrast,";background:",({theme:e})=>e.neutral,";border-radius:3px 3px 0px 0px;outline-offset:2px;}&.",xc.selected,"{border-bottom:1px solid ",({theme:e})=>e.primary,";}&.",Xc.disabled,"{opacity:0.5;cursor:not-allowed;}@media screen and (max-width: 360px){span{display:none;}padding:5px 20px;}");function Au(e){const{viewRef:t,panelSize:o,setStreamClose:M,setMinimize:b,setMaxHeight:p,actualQuery:n,total:c,loading:r}=e;return D(vo,{ref:t,size:o,vheight:"regular",children:[O(Ct,{onClose:M,setMinimize:b,setMaxHeight:p,actualQuery:n,total:c,type:"empty",fixedSize:!0,...e}),O(lu,{loading:r})]})}const du=(e,t,o,M)=>{const b=M3(e.getValue(t),o);return M(b),b.passed},uu={cell:e=>e.getValue()},qu=(e,t)=>({updateData:(o,M,b)=>{t(),e(p=>p.map((n,c)=>c!==o?n:{...p[o],[M]:b}))}}),fu=e=>i0("color:",e.contrast,";background:",e.deep,";border:1px solid ",e.accentNeutral,";border-radius:3px;padding:3px 8px;font-size:12px;",""),io=({value:e,onChange:t,debounce:o=500,theme:M,...b})=>{const[p,n]=q.useState(e),c=r=>n(r.target.value);return q.useEffect(()=>{n(e)},[e]),q.useEffect(()=>{const r=setTimeout(()=>{t(p)},o);return()=>clearTimeout(r)},[p]),O("input",{...b,className:D0(fu(M)),value:b1(String(p)),onChange:c})};var Kb={},Wu=N1;Object.defineProperty(Kb,"__esModule",{value:!0});var dr=Kb.default=void 0,hu=Wu(L1()),gu=K0,Ru=(0,hu.default)((0,gu.jsx)("path",{d:"M15 9.86 18.03 12 15 14.14V9.86m-9 0L9.03 12 6 14.14V9.86M13 6v12l8.5-6L13 6zM4 6v12l8.5-6L4 6z"}),"FastForwardOutlined");dr=Kb.default=Ru;var Qb={},mu=N1;Object.defineProperty(Qb,"__esModule",{value:!0});var ur=Qb.default=void 0,Lu=mu(L1()),Nu=K0,vu=(0,Lu.default)((0,Nu.jsx)("path",{d:"M18 9.86v4.28L14.97 12 18 9.86m-9 0v4.28L5.97 12 9 9.86M20 6l-8.5 6 8.5 6V6zm-9 0-8.5 6 8.5 6V6z"}),"FastRewindOutlined");ur=Qb.default=vu;var Jb={},Bu=N1;Object.defineProperty(Jb,"__esModule",{value:!0});var qr=Jb.default=void 0,yu=Bu(L1()),Tu=K0,Su=(0,yu.default)((0,Tu.jsx)("path",{d:"m6 18 8.5-6L6 6v12zm2-8.14L11.03 12 8 14.14V9.86zM16 6h2v12h-2z"}),"SkipNextOutlined");qr=Jb.default=Su;var Yb={},xu=N1;Object.defineProperty(Yb,"__esModule",{value:!0});var fr=Yb.default=void 0,Xu=xu(L1()),wu=K0,Cu=(0,Xu.default)((0,wu.jsx)("path",{d:"M6 6h2v12H6zm3.5 6 8.5 6V6l-8.5 6zm6.5 2.14L12.97 12 16 9.86v4.28z"}),"SkipPreviousOutlined");fr=Yb.default=Cu;const $z=i0({name:"rza2c4",styles:"display:flex;align-items:center;gap:1px"}),Uz=i0({name:"rnnx2x",styles:"font-size:12px"}),Eu=e=>i0("border-radius:3px;outline:none;border:1px solid ",e.accentNeutral,";background:",e.deep,";color:",e.contrast,";padding:3px 8px;margin:2px;width:70px;",""),ku=e=>i0("color:",e.contrast,";border:1px solid ",e.accentNeutral,";background:",e.deep,";padding:3px 8px 2px 8px;border-radius:3px;cursor:pointer;font-size:12px;",""),Jt=e=>i0("display:flex;align-items:center;border:1px solid ",e.accentNeutral,";color:",e.contrast,";background:",e.neutral,";cursor:pointer;","");function _u({hasNextPage:e,hasPreviousPage:t,nextPage:o,pageCount:M,pageIndex:b,pageSize:p,previousPage:n,setPageIndex:c,setPageSize:r,totalRows:s}){const i=Q0();return D(q1,{children:[D("div",{style:{display:"flex",gap:"4px",alignItems:"center",flex:1,width:"100%",color:i.contrast,margin:"5px"},children:[O("button",{className:D0(Jt(i)),onClick:()=>c(0),disabled:!t,children:O(ur,{style:{height:"12px",width:"12px"}})}),O("button",{className:D0(Jt(i)),onClick:()=>n(),disabled:!t,children:O(fr,{style:{height:"12px",width:"12px"}})}),O("button",{className:D0(Jt(i)),onClick:()=>o(),disabled:!e,children:O(qr,{style:{height:"12px",width:"12px"}})}),O("button",{className:D0(Jt(i)),onClick:()=>c(M-1),disabled:!e,children:O(dr,{style:{height:"12px",width:"12px"}})}),O("span",{className:D0($z,Uz),children:D("div",{children:["Page"," ",D("strong",{children:[b+1," of ",M]})]})}),D("span",{className:D0($z,Uz),children:["- Go to page:",O("input",{type:"number",defaultValue:b+1,onChange:A=>{const h=A.target.value?Number(A.target.value)-1:0;c(h)},className:D0(Eu(i))})]}),O("select",{className:D0(ku(i)),value:b1(String(p)),onChange:A=>{r(Number(A.target.value))},children:[10,20,30,40,50].map(A=>D("option",{value:b1(String(A)),children:["Show ",A," Rows"]},A))}),D("div",{style:{fontSize:"12px",marginLeft:"6px"},children:[" ","Total: ",s," Rows"]})]}),O("div",{className:"flex items-center gap-2"})]})}const Iu=({columnFilterValue:e,getFacetedMinMaxValues:t,setFilterValue:o})=>{var r,s;const M=Q0(),b=(r=t())==null?void 0:r[0],p=Number(b??""),n=(s=t())==null?void 0:s[1],c=Number(n);return D("div",{children:[D("div",{style:{display:"flex",gap:"4px",alignItems:"center",justifyContent:"center"},children:[O(io,{theme:M,type:"number",min:p,max:c,value:(e==null?void 0:e[0])??"",onChange:i=>o(A=>[i,A==null?void 0:A[1]]),placeholder:`Min ${b?`(${p})`:""}`,className:"w-24 border shadow rounded"}),O(io,{theme:M,type:"number",min:p,max:c,value:(e==null?void 0:e[1])??"",onChange:i=>o(A=>[A==null?void 0:A[0],i]),placeholder:`Max ${n?`(${c})`:""}`,className:"w-24 border shadow rounded"})]}),O("div",{className:"h-1"})]})},Du=({columnId:e,columnFilterValue:t,columnSize:o,setFilterValue:M,sortedUniqueValues:b})=>{const p=e+"list",n=Q0();return D(q.Fragment,{children:[O("datalist",{id:p,children:b.slice(0,5e3).map(c=>O("option",{value:b1(c)},c))}),O(io,{theme:n,type:"text",value:b1(t??""),onChange:c=>M(c),placeholder:`Search... (${o})`,className:"w-36 border shadow rounded",list:p}),O("div",{className:"h-1"})]})};function Pu({column:e,table:t}){var n;const o=(n=t.getPreFilteredRowModel().flatRows[0])==null?void 0:n.getValue(e.id),M=e.getFilterValue(),b=e.getFacetedUniqueValues(),p=q.useMemo(()=>typeof o=="number"?[]:Array.from(b.keys()).sort(),[b]);return typeof o=="number"?O(Iu,{columnFilterValue:M,getFacetedMinMaxValues:e.getFacetedMinMaxValues,setFilterValue:e.setFilterValue}):O(Du,{columnId:e.id,columnFilterValue:b1(M),columnSize:b.size,setFilterValue:e.setFilterValue,sortedUniqueValues:p})}var Zb={},Hu=N1;Object.defineProperty(Zb,"__esModule",{value:!0});var Wr=Zb.default=void 0,ju=Hu(L1()),Fu=K0,Vu=(0,ju.default)((0,Fu.jsx)("path",{d:"M3 18h6v-2H3v2zM3 6v2h18V6H3zm0 7h12v-2H3v2z"}),"SortOutlined");Wr=Zb.default=Vu;var ep={},$u=N1;Object.defineProperty(ep,"__esModule",{value:!0});var hr=ep.default=void 0,Uu=$u(L1()),Gu=K0,Ku=(0,Uu.default)((0,Gu.jsx)("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6 1.41 1.41z"}),"KeyboardArrowUpOutlined");hr=ep.default=Ku;const Qu=i0({name:"1yit4u5",styles:"position:relative;&.resizer{position:absolute;left:0;top:0;height:100%;width:5px;cursor:col-resize;user-select:none;touch-action:none;&.isResizing{background:blue;opacity:1;}}"}),OM=(e,t)=>i0("height:14px!important;width:14px!important;color:",e,"!important;cursor:pointer;border:1px solid ",t,";border-radius:3px;padding:2px;","");function Ju(e,t){return t==="left"?[e.getLeftHeaderGroups(),e.getLeftFooterGroups()]:t==="right"?[e.getRightHeaderGroups(),e.getRightFooterGroups()]:t==="center"?[e.getCenterHeaderGroups(),e.getCenterFooterGroups()]:[e.getHeaderGroups(),e.getFooterGroups()]}function Yu(e,t){return t==="left"?e.getLeftVisibleCells():t==="right"?e.getRightVisibleCells():t==="center"?e.getCenterVisibleCells():e.getVisibleCells()}function Zu({table:e,tableGroup:t,columnResizeMode:o}){const M=Q0(),[b]=Ju(e,t);return O(f1,{theme:M,children:D("table",{style:{width:"100%"},children:[O("thead",{children:b.map(p=>O("tr",{children:p.headers.map(n=>D("th",{className:D0(Qu),key:n.id,colSpan:n.colSpan,style:{width:n.getSize()},children:[" ",D("div",{style:{display:"flex",gap:"6px",alignItems:"center",fontSize:"13px"},children:[n.isPlaceholder?null:O(q1,{children:sz(n.column.columnDef.header,n.getContext())}),O("div",{onMouseDown:n.getResizeHandler(),onTouchStart:n.getResizeHandler(),className:`resizer ${n.column.getIsResizing()?"isResizing":""}`}),D("div",{style:{fontSize:"12px",display:"flex",alignItems:"center",gap:"6px"},children:[n.column.getCanFilter()?O("div",{children:O(Pu,{column:n.column,table:e})}):null,O("button",{onClick:n.column.getToggleSortingHandler(),style:{border:"none",background:"none",display:"flex",alignItems:"center"},title:"Sort",className:n.column.getCanSort()?"cursor-pointer select-none":"",children:{asc:O(hr,{className:D0(OM(M.contrast,M.accentNeutral))}),desc:O(Ue,{className:D0(OM(M.contrast,M.accentNeutral))})}[n.column.getIsSorted()]??O(Wr,{className:D0(OM(M.contrast,M.accentNeutral))})})]})]})]}))},p.id))}),O("tbody",{children:e.getRowModel().rows.map(p=>O("tr",{children:Yu(p,t).map(n=>O("td",{style:{width:n.column.getSize(),fontSize:"12px"},children:O(q1,{children:sz(n.column.columnDef.cell,n.getContext())})},n.id))},p.id))})]})})}function eq(){const e=q.useRef(!0),t=e.current,o=q.useCallback(()=>{e.current=!1},[]);return q.useEffect(()=>{e.current=!0}),q.useMemo(()=>[!!t,o],[t,o])}const tq=g0("div",{target:"eptftt0"})("padding:5px;table{border-spacing:0;border:1px solid ",({theme:e})=>e.accentNeutral,";border-radius:4px;border-bottom:none;border-top:none;color:",({theme:e})=>e.contrast,";tr{:last-child{td{border-bottom:none;}}}th,td{margin:0;padding:0.45rem;border-bottom:1px solid ",({theme:e})=>e.accentNeutral,";border-right:1px solid ",({theme:e})=>e.accentNeutral,";:last-child{border-right:0;}}td{input{font-size:12px;padding:0;margin:0;border:0;}}}.pagination{padding:0.5rem;}");function oq(e){var w;const t=q.useReducer(()=>({}),{})[1],{columns:o,data:M}=e,b=Q0(),[p,n]=q.useState(M),c=()=>n(M),[r,s]=q.useState({}),[i,A]=q.useState([]),[h,g]=q.useState({}),[d,m]=q.useState([]),[L,R]=q.useState(""),[W,S]=eq(),[N]=q.useState("onChange"),x=b3({data:p,columns:o,defaultColumn:uu,getCoreRowModel:p3(),getFilteredRowModel:z3(),getPaginationRowModel:n3(),getSortedRowModel:c3(),getGroupedRowModel:r3(),getFacetedRowModel:i3(),getFacetedUniqueValues:a3(),getFacetedMinMaxValues:O3(),onColumnFiltersChange:m,onGlobalFilterChange:R,globalFilterFn:du,autoResetPageIndex:W,enableColumnResizing:!0,columnResizeMode:N,onColumnVisibilityChange:s,onGroupingChange:A,onRowSelectionChange:g,meta:qu(n,S),state:{grouping:i,columnFilters:d,globalFilter:L,columnVisibility:r}});return q.useEffect(()=>{var l,v;((l=x.getState().columnFilters[0])==null?void 0:l.id)==="fullName"&&((v=x.getState().sorting[0])==null?void 0:v.id)!=="fullName"&&x.setSorting([{id:"fullName",desc:!1}])},[(w=x.getState().columnFilters[0])==null?void 0:w.id]),O(f1,{theme:b,children:D(tq,{theme:b,children:[D("div",{style:{display:"flex",justifyContent:"space-between",margin:"4px",marginLeft:0},children:[O("div",{style:{display:"flex",fontSize:"14px",gap:"6px",margin:"4px",marginLeft:0},children:x.getAllLeafColumns().map(l=>O("div",{children:D("label",{style:{display:"flex",alignItems:"center",color:b.contrast},children:[O("input",{type:"checkbox",checked:l.getIsVisible(),onChange:l.getToggleVisibilityHandler(),className:"mr-1"}),l.id]})},l.id))}),D("div",{style:{display:"flex",alignItems:"center",gap:"4px",fontSize:"14px",margin:"4px",color:b.contrast},children:["Search:",O(io,{theme:b,style:{fontSize:"12px",padding:"3px 8px"},value:b1(L??""),onChange:l=>R(String(l)),placeholder:"Search all columns..."})]})]}),O("div",{style:{display:"flex"},children:O(Zu,{columnResizeMode:N,table:x,tableGroup:"center"})}),O("div",{style:{display:"flex"},children:O(_u,{getSelectedRowModel:x.getSelectedRowModel,hasNextPage:x.getCanNextPage(),hasPreviousPage:x.getCanPreviousPage(),nextPage:x.nextPage,pageCount:x.getPageCount(),pageIndex:x.getState().pagination.pageIndex,pageSize:x.getState().pagination.pageSize,previousPage:x.previousPage,refreshData:c,rerender:t,rowSelection:h,setPageIndex:x.setPageIndex,setPageSize:x.setPageSize,totalRows:x.getPrePaginationRowModel().rows.length})})]})})}const Mq=g0("div",{target:"e19v7mv10"})("display:block;overflow:auto;&::-webkit-scrollbar{width:5px;}&::-webkit-scrollbar-corner{background:transparent;}&::-webkit-scrollbar-thumb{border-radius:5px;background:",({theme:e})=>e.alphaPlusNeutral,";}.table{border-spacing:0;border-radius:4px;font-size:12px;color:",({theme:e})=>e.contrast,";&::-webkit-scrollbar{width:5px;}&::-webkit-scrollbar-corner{background:transparent;}&::-webkit-scrollbar-thumb{border-radius:5px;background:",({theme:e})=>e.alphaPlusNeutral,";}.tr{display:block;:last-child{.td{border-bottom:0;}}}.th{background:",({theme:e})=>e.lightNeutral,";border-bottom:none;padding:3px;:last-child{box-sizing:unset!important;}}.th,.td{display:block;flex:1;margin:0;justify-content:space-between;border-bottom:1px solid ",({theme:e})=>e.accentNeutral,";border-right:1px solid ",({theme:e})=>e.accentNeutral,";padding:3px;position:relative;white-space:nowrap;overflow:hidden;.show-add-labels{display:none;}&:hover{.show-add-labels{display:flex;align-items:center;}}:last-child{border-right:0;padding-right:0px;}.resizer{display:inline-block;background:",({theme:e})=>e.accentNeutral,";width:5px;height:100%;position:absolute;right:0;top:0;transform:translateX(50%);z-index:1;&.isResizing{background:red;}}}}.pagination{}"),tp=e=>{const{data:{columnsData:t,dataRows:o},actualQuery:M,height:b,size:p,width:n}=e,[c,r]=q.useState(t),[s,i]=q.useState(o);return q.useEffect(()=>{r(t)},[t]),q.useEffect(()=>{i(o)},[o]),O(Mq,{children:t&&o&&O(oq,{actQuery:M,columns:c,width:n,data:s,height:b,size:p})})};function V2({id:e}){try{return JSON.parse(localStorage.getItem("tabsState")||`{[${e}]:0}`)}catch{return{[e]:0}}}var gr={exports:{}};/*! + * jQuery JavaScript Library v3.7.1 + * https://jquery.com/ + * + * Copyright OpenJS Foundation and other contributors + * Released under the MIT license + * https://jquery.org/license + * + * Date: 2023-08-28T13:37Z + */(function(e){(function(t,o){e.exports=t.document?o(t,!0):function(M){if(!M.document)throw new Error("jQuery requires a window with a document");return o(M)}})(typeof window<"u"?window:ab,function(t,o){var M=[],b=Object.getPrototypeOf,p=M.slice,n=M.flat?function(z){return M.flat.call(z)}:function(z){return M.concat.apply([],z)},c=M.push,r=M.indexOf,s={},i=s.toString,A=s.hasOwnProperty,h=A.toString,g=h.call(Object),d={},m=function(a){return typeof a=="function"&&typeof a.nodeType!="number"&&typeof a.item!="function"},L=function(a){return a!=null&&a===a.window},R=t.document,W={type:!0,src:!0,nonce:!0,noModule:!0};function S(z,a,u){u=u||R;var f,y,T=u.createElement("script");if(T.text=z,a)for(f in W)y=a[f]||a.getAttribute&&a.getAttribute(f),y&&T.setAttribute(f,y);u.head.appendChild(T).parentNode.removeChild(T)}function N(z){return z==null?z+"":typeof z=="object"||typeof z=="function"?s[i.call(z)]||"object":typeof z}var x="3.7.1",w=/HTML$/i,l=function(z,a){return new l.fn.init(z,a)};l.fn=l.prototype={jquery:x,constructor:l,length:0,toArray:function(){return p.call(this)},get:function(z){return z==null?p.call(this):z<0?this[z+this.length]:this[z]},pushStack:function(z){var a=l.merge(this.constructor(),z);return a.prevObject=this,a},each:function(z){return l.each(this,z)},map:function(z){return this.pushStack(l.map(this,function(a,u){return z.call(a,u,a)}))},slice:function(){return this.pushStack(p.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(l.grep(this,function(z,a){return(a+1)%2}))},odd:function(){return this.pushStack(l.grep(this,function(z,a){return a%2}))},eq:function(z){var a=this.length,u=+z+(z<0?a:0);return this.pushStack(u>=0&&u0&&a-1 in z}function B(z,a){return z.nodeName&&z.nodeName.toLowerCase()===a.toLowerCase()}var C=M.pop,k=M.sort,_=M.splice,I="[\\x20\\t\\r\\n\\f]",Q=new RegExp("^"+I+"+|((?:^|[^\\\\])(?:\\\\.)*)"+I+"+$","g");l.contains=function(z,a){var u=a&&a.parentNode;return z===u||!!(u&&u.nodeType===1&&(z.contains?z.contains(u):z.compareDocumentPosition&&z.compareDocumentPosition(u)&16))};var z0=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function s0(z,a){return a?z==="\0"?"�":z.slice(0,-1)+"\\"+z.charCodeAt(z.length-1).toString(16)+" ":"\\"+z}l.escapeSelector=function(z){return(z+"").replace(z0,s0)};var M0=R,d0=c;(function(){var z,a,u,f,y,T=d0,X,K,U,o0,q0,N0=l.expando,r0=0,E0=0,r1=Pt(),g1=Pt(),l1=Pt(),Q1=Pt(),$1=function(H,Z){return H===Z&&(y=!0),0},B2="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",y2="(?:\\\\[\\da-fA-F]{1,6}"+I+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",u1="\\["+I+"*("+y2+")(?:"+I+"*([*^$|!~]?=)"+I+`*(?:'((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)"|(`+y2+"))|)"+I+"*\\]",ze=":("+y2+`)(?:\\((('((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|`+u1+")*)|.*)\\)|)",R1=new RegExp(I+"+","g"),E1=new RegExp("^"+I+"*,"+I+"*"),nt=new RegExp("^"+I+"*([>+~]|"+I+")"+I+"*"),Yo=new RegExp(I+"|>"),T2=new RegExp(ze),ct=new RegExp("^"+y2+"$"),S2={ID:new RegExp("^#("+y2+")"),CLASS:new RegExp("^\\.("+y2+")"),TAG:new RegExp("^("+y2+"|[*])"),ATTR:new RegExp("^"+u1),PSEUDO:new RegExp("^"+ze),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+I+"*(even|odd|(([+-]|)(\\d*)n|)"+I+"*(?:([+-]|)"+I+"*(\\d+)|))"+I+"*\\)|)","i"),bool:new RegExp("^(?:"+B2+")$","i"),needsContext:new RegExp("^"+I+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+I+"*((?:-\\d)?\\d*)"+I+"*\\)|)(?=[^-]|$)","i")},K2=/^(?:input|select|textarea|button)$/i,Q2=/^h\d$/i,A2=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Zo=/[+~]/,k2=new RegExp("\\\\[\\da-fA-F]{1,6}"+I+"?|\\\\([^\\r\\n\\f])","g"),_2=function(H,Z){var c0="0x"+H.slice(1)-65536;return Z||(c0<0?String.fromCharCode(c0+65536):String.fromCharCode(c0>>10|55296,c0&1023|56320))},ka=function(){J2()},_a=jt(function(H){return H.disabled===!0&&B(H,"fieldset")},{dir:"parentNode",next:"legend"});function Ia(){try{return X.activeElement}catch{}}try{T.apply(M=p.call(M0.childNodes),M0.childNodes),M[M0.childNodes.length].nodeType}catch{T={apply:function(Z,c0){d0.apply(Z,p.call(c0))},call:function(Z){d0.apply(Z,p.call(arguments,1))}}}function B1(H,Z,c0,O0){var L0,F0,J0,o1,Y0,A1,n1,i1=Z&&Z.ownerDocument,d1=Z?Z.nodeType:9;if(c0=c0||[],typeof H!="string"||!H||d1!==1&&d1!==9&&d1!==11)return c0;if(!O0&&(J2(Z),Z=Z||X,U)){if(d1!==11&&(Y0=A2.exec(H)))if(L0=Y0[1]){if(d1===9)if(J0=Z.getElementById(L0)){if(J0.id===L0)return T.call(c0,J0),c0}else return c0;else if(i1&&(J0=i1.getElementById(L0))&&B1.contains(Z,J0)&&J0.id===L0)return T.call(c0,J0),c0}else{if(Y0[2])return T.apply(c0,Z.getElementsByTagName(H)),c0;if((L0=Y0[3])&&Z.getElementsByClassName)return T.apply(c0,Z.getElementsByClassName(L0)),c0}if(!Q1[H+" "]&&(!o0||!o0.test(H))){if(n1=H,i1=Z,d1===1&&(Yo.test(H)||nt.test(H))){for(i1=Zo.test(H)&&eM(Z.parentNode)||Z,(i1!=Z||!d.scope)&&((o1=Z.getAttribute("id"))?o1=l.escapeSelector(o1):Z.setAttribute("id",o1=N0)),A1=rt(H),F0=A1.length;F0--;)A1[F0]=(o1?"#"+o1:":scope")+" "+Ht(A1[F0]);n1=A1.join(",")}try{return T.apply(c0,i1.querySelectorAll(n1)),c0}catch{Q1(H,!0)}finally{o1===N0&&Z.removeAttribute("id")}}}return tz(H.replace(Q,"$1"),Z,c0,O0)}function Pt(){var H=[];function Z(c0,O0){return H.push(c0+" ")>a.cacheLength&&delete Z[H.shift()],Z[c0+" "]=O0}return Z}function L2(H){return H[N0]=!0,H}function Be(H){var Z=X.createElement("fieldset");try{return!!H(Z)}catch{return!1}finally{Z.parentNode&&Z.parentNode.removeChild(Z),Z=null}}function Da(H){return function(Z){return B(Z,"input")&&Z.type===H}}function Pa(H){return function(Z){return(B(Z,"input")||B(Z,"button"))&&Z.type===H}}function Zp(H){return function(Z){return"form"in Z?Z.parentNode&&Z.disabled===!1?"label"in Z?"label"in Z.parentNode?Z.parentNode.disabled===H:Z.disabled===H:Z.isDisabled===H||Z.isDisabled!==!H&&_a(Z)===H:Z.disabled===H:"label"in Z?Z.disabled===H:!1}}function ne(H){return L2(function(Z){return Z=+Z,L2(function(c0,O0){for(var L0,F0=H([],c0.length,Z),J0=F0.length;J0--;)c0[L0=F0[J0]]&&(c0[L0]=!(O0[L0]=c0[L0]))})})}function eM(H){return H&&typeof H.getElementsByTagName<"u"&&H}function J2(H){var Z,c0=H?H.ownerDocument||H:M0;return c0==X||c0.nodeType!==9||!c0.documentElement||(X=c0,K=X.documentElement,U=!l.isXMLDoc(X),q0=K.matches||K.webkitMatchesSelector||K.msMatchesSelector,K.msMatchesSelector&&M0!=X&&(Z=X.defaultView)&&Z.top!==Z&&Z.addEventListener("unload",ka),d.getById=Be(function(O0){return K.appendChild(O0).id=l.expando,!X.getElementsByName||!X.getElementsByName(l.expando).length}),d.disconnectedMatch=Be(function(O0){return q0.call(O0,"*")}),d.scope=Be(function(){return X.querySelectorAll(":scope")}),d.cssHas=Be(function(){try{return X.querySelector(":has(*,:jqfake)"),!1}catch{return!0}}),d.getById?(a.filter.ID=function(O0){var L0=O0.replace(k2,_2);return function(F0){return F0.getAttribute("id")===L0}},a.find.ID=function(O0,L0){if(typeof L0.getElementById<"u"&&U){var F0=L0.getElementById(O0);return F0?[F0]:[]}}):(a.filter.ID=function(O0){var L0=O0.replace(k2,_2);return function(F0){var J0=typeof F0.getAttributeNode<"u"&&F0.getAttributeNode("id");return J0&&J0.value===L0}},a.find.ID=function(O0,L0){if(typeof L0.getElementById<"u"&&U){var F0,J0,o1,Y0=L0.getElementById(O0);if(Y0){if(F0=Y0.getAttributeNode("id"),F0&&F0.value===O0)return[Y0];for(o1=L0.getElementsByName(O0),J0=0;Y0=o1[J0++];)if(F0=Y0.getAttributeNode("id"),F0&&F0.value===O0)return[Y0]}return[]}}),a.find.TAG=function(O0,L0){return typeof L0.getElementsByTagName<"u"?L0.getElementsByTagName(O0):L0.querySelectorAll(O0)},a.find.CLASS=function(O0,L0){if(typeof L0.getElementsByClassName<"u"&&U)return L0.getElementsByClassName(O0)},o0=[],Be(function(O0){var L0;K.appendChild(O0).innerHTML="",O0.querySelectorAll("[selected]").length||o0.push("\\["+I+"*(?:value|"+B2+")"),O0.querySelectorAll("[id~="+N0+"-]").length||o0.push("~="),O0.querySelectorAll("a#"+N0+"+*").length||o0.push(".#.+[+~]"),O0.querySelectorAll(":checked").length||o0.push(":checked"),L0=X.createElement("input"),L0.setAttribute("type","hidden"),O0.appendChild(L0).setAttribute("name","D"),K.appendChild(O0).disabled=!0,O0.querySelectorAll(":disabled").length!==2&&o0.push(":enabled",":disabled"),L0=X.createElement("input"),L0.setAttribute("name",""),O0.appendChild(L0),O0.querySelectorAll("[name='']").length||o0.push("\\["+I+"*name"+I+"*="+I+`*(?:''|"")`)}),d.cssHas||o0.push(":has"),o0=o0.length&&new RegExp(o0.join("|")),$1=function(O0,L0){if(O0===L0)return y=!0,0;var F0=!O0.compareDocumentPosition-!L0.compareDocumentPosition;return F0||(F0=(O0.ownerDocument||O0)==(L0.ownerDocument||L0)?O0.compareDocumentPosition(L0):1,F0&1||!d.sortDetached&&L0.compareDocumentPosition(O0)===F0?O0===X||O0.ownerDocument==M0&&B1.contains(M0,O0)?-1:L0===X||L0.ownerDocument==M0&&B1.contains(M0,L0)?1:f?r.call(f,O0)-r.call(f,L0):0:F0&4?-1:1)}),X}B1.matches=function(H,Z){return B1(H,null,null,Z)},B1.matchesSelector=function(H,Z){if(J2(H),U&&!Q1[Z+" "]&&(!o0||!o0.test(Z)))try{var c0=q0.call(H,Z);if(c0||d.disconnectedMatch||H.document&&H.document.nodeType!==11)return c0}catch{Q1(Z,!0)}return B1(Z,X,null,[H]).length>0},B1.contains=function(H,Z){return(H.ownerDocument||H)!=X&&J2(H),l.contains(H,Z)},B1.attr=function(H,Z){(H.ownerDocument||H)!=X&&J2(H);var c0=a.attrHandle[Z.toLowerCase()],O0=c0&&A.call(a.attrHandle,Z.toLowerCase())?c0(H,Z,!U):void 0;return O0!==void 0?O0:H.getAttribute(Z)},B1.error=function(H){throw new Error("Syntax error, unrecognized expression: "+H)},l.uniqueSort=function(H){var Z,c0=[],O0=0,L0=0;if(y=!d.sortStable,f=!d.sortStable&&p.call(H,0),k.call(H,$1),y){for(;Z=H[L0++];)Z===H[L0]&&(O0=c0.push(L0));for(;O0--;)_.call(H,c0[O0],1)}return f=null,H},l.fn.uniqueSort=function(){return this.pushStack(l.uniqueSort(p.apply(this)))},a=l.expr={cacheLength:50,createPseudo:L2,match:S2,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(H){return H[1]=H[1].replace(k2,_2),H[3]=(H[3]||H[4]||H[5]||"").replace(k2,_2),H[2]==="~="&&(H[3]=" "+H[3]+" "),H.slice(0,4)},CHILD:function(H){return H[1]=H[1].toLowerCase(),H[1].slice(0,3)==="nth"?(H[3]||B1.error(H[0]),H[4]=+(H[4]?H[5]+(H[6]||1):2*(H[3]==="even"||H[3]==="odd")),H[5]=+(H[7]+H[8]||H[3]==="odd")):H[3]&&B1.error(H[0]),H},PSEUDO:function(H){var Z,c0=!H[6]&&H[2];return S2.CHILD.test(H[0])?null:(H[3]?H[2]=H[4]||H[5]||"":c0&&T2.test(c0)&&(Z=rt(c0,!0))&&(Z=c0.indexOf(")",c0.length-Z)-c0.length)&&(H[0]=H[0].slice(0,Z),H[2]=c0.slice(0,Z)),H.slice(0,3))}},filter:{TAG:function(H){var Z=H.replace(k2,_2).toLowerCase();return H==="*"?function(){return!0}:function(c0){return B(c0,Z)}},CLASS:function(H){var Z=r1[H+" "];return Z||(Z=new RegExp("(^|"+I+")"+H+"("+I+"|$)"))&&r1(H,function(c0){return Z.test(typeof c0.className=="string"&&c0.className||typeof c0.getAttribute<"u"&&c0.getAttribute("class")||"")})},ATTR:function(H,Z,c0){return function(O0){var L0=B1.attr(O0,H);return L0==null?Z==="!=":Z?(L0+="",Z==="="?L0===c0:Z==="!="?L0!==c0:Z==="^="?c0&&L0.indexOf(c0)===0:Z==="*="?c0&&L0.indexOf(c0)>-1:Z==="$="?c0&&L0.slice(-c0.length)===c0:Z==="~="?(" "+L0.replace(R1," ")+" ").indexOf(c0)>-1:Z==="|="?L0===c0||L0.slice(0,c0.length+1)===c0+"-":!1):!0}},CHILD:function(H,Z,c0,O0,L0){var F0=H.slice(0,3)!=="nth",J0=H.slice(-4)!=="last",o1=Z==="of-type";return O0===1&&L0===0?function(Y0){return!!Y0.parentNode}:function(Y0,A1,n1){var i1,d1,p1,x1,i2,Z1=F0!==J0?"nextSibling":"previousSibling",d2=Y0.parentNode,x2=o1&&Y0.nodeName.toLowerCase(),ye=!n1&&!o1,b2=!1;if(d2){if(F0){for(;Z1;){for(p1=Y0;p1=p1[Z1];)if(o1?B(p1,x2):p1.nodeType===1)return!1;i2=Z1=H==="only"&&!i2&&"nextSibling"}return!0}if(i2=[J0?d2.firstChild:d2.lastChild],J0&&ye){for(d1=d2[N0]||(d2[N0]={}),i1=d1[H]||[],x1=i1[0]===r0&&i1[1],b2=x1&&i1[2],p1=x1&&d2.childNodes[x1];p1=++x1&&p1&&p1[Z1]||(b2=x1=0)||i2.pop();)if(p1.nodeType===1&&++b2&&p1===Y0){d1[H]=[r0,x1,b2];break}}else if(ye&&(d1=Y0[N0]||(Y0[N0]={}),i1=d1[H]||[],x1=i1[0]===r0&&i1[1],b2=x1),b2===!1)for(;(p1=++x1&&p1&&p1[Z1]||(b2=x1=0)||i2.pop())&&!((o1?B(p1,x2):p1.nodeType===1)&&++b2&&(ye&&(d1=p1[N0]||(p1[N0]={}),d1[H]=[r0,b2]),p1===Y0)););return b2-=L0,b2===O0||b2%O0===0&&b2/O0>=0}}},PSEUDO:function(H,Z){var c0,O0=a.pseudos[H]||a.setFilters[H.toLowerCase()]||B1.error("unsupported pseudo: "+H);return O0[N0]?O0(Z):O0.length>1?(c0=[H,H,"",Z],a.setFilters.hasOwnProperty(H.toLowerCase())?L2(function(L0,F0){for(var J0,o1=O0(L0,Z),Y0=o1.length;Y0--;)J0=r.call(L0,o1[Y0]),L0[J0]=!(F0[J0]=o1[Y0])}):function(L0){return O0(L0,0,c0)}):O0}},pseudos:{not:L2(function(H){var Z=[],c0=[],O0=bM(H.replace(Q,"$1"));return O0[N0]?L2(function(L0,F0,J0,o1){for(var Y0,A1=O0(L0,null,o1,[]),n1=L0.length;n1--;)(Y0=A1[n1])&&(L0[n1]=!(F0[n1]=Y0))}):function(L0,F0,J0){return Z[0]=L0,O0(Z,null,J0,c0),Z[0]=null,!c0.pop()}}),has:L2(function(H){return function(Z){return B1(H,Z).length>0}}),contains:L2(function(H){return H=H.replace(k2,_2),function(Z){return(Z.textContent||l.text(Z)).indexOf(H)>-1}}),lang:L2(function(H){return ct.test(H||"")||B1.error("unsupported lang: "+H),H=H.replace(k2,_2).toLowerCase(),function(Z){var c0;do if(c0=U?Z.lang:Z.getAttribute("xml:lang")||Z.getAttribute("lang"))return c0=c0.toLowerCase(),c0===H||c0.indexOf(H+"-")===0;while((Z=Z.parentNode)&&Z.nodeType===1);return!1}}),target:function(H){var Z=t.location&&t.location.hash;return Z&&Z.slice(1)===H.id},root:function(H){return H===K},focus:function(H){return H===Ia()&&X.hasFocus()&&!!(H.type||H.href||~H.tabIndex)},enabled:Zp(!1),disabled:Zp(!0),checked:function(H){return B(H,"input")&&!!H.checked||B(H,"option")&&!!H.selected},selected:function(H){return H.parentNode&&H.parentNode.selectedIndex,H.selected===!0},empty:function(H){for(H=H.firstChild;H;H=H.nextSibling)if(H.nodeType<6)return!1;return!0},parent:function(H){return!a.pseudos.empty(H)},header:function(H){return Q2.test(H.nodeName)},input:function(H){return K2.test(H.nodeName)},button:function(H){return B(H,"input")&&H.type==="button"||B(H,"button")},text:function(H){var Z;return B(H,"input")&&H.type==="text"&&((Z=H.getAttribute("type"))==null||Z.toLowerCase()==="text")},first:ne(function(){return[0]}),last:ne(function(H,Z){return[Z-1]}),eq:ne(function(H,Z,c0){return[c0<0?c0+Z:c0]}),even:ne(function(H,Z){for(var c0=0;c0Z?O0=Z:O0=c0;--O0>=0;)H.push(O0);return H}),gt:ne(function(H,Z,c0){for(var O0=c0<0?c0+Z:c0;++O01?function(Z,c0,O0){for(var L0=H.length;L0--;)if(!H[L0](Z,c0,O0))return!1;return!0}:H[0]}function Ha(H,Z,c0){for(var O0=0,L0=Z.length;O0-1&&(J0[n1]=!(o1[n1]=d1))}}else p1=Ft(p1===o1?p1.splice(Z1,p1.length):p1),L0?L0(null,o1,p1,A1):T.apply(o1,p1)})}function MM(H){for(var Z,c0,O0,L0=H.length,F0=a.relative[H[0].type],J0=F0||a.relative[" "],o1=F0?1:0,Y0=jt(function(i1){return i1===Z},J0,!0),A1=jt(function(i1){return r.call(Z,i1)>-1},J0,!0),n1=[function(i1,d1,p1){var x1=!F0&&(p1||d1!=u)||((Z=d1).nodeType?Y0(i1,d1,p1):A1(i1,d1,p1));return Z=null,x1}];o11&&tM(n1),o1>1&&Ht(H.slice(0,o1-1).concat({value:H[o1-2].type===" "?"*":""})).replace(Q,"$1"),c0,o10,O0=H.length>0,L0=function(F0,J0,o1,Y0,A1){var n1,i1,d1,p1=0,x1="0",i2=F0&&[],Z1=[],d2=u,x2=F0||O0&&a.find.TAG("*",A1),ye=r0+=d2==null?1:Math.random()||.1,b2=x2.length;for(A1&&(u=J0==X||J0||A1);x1!==b2&&(n1=x2[x1])!=null;x1++){if(O0&&n1){for(i1=0,!J0&&n1.ownerDocument!=X&&(J2(n1),o1=!U);d1=H[i1++];)if(d1(n1,J0||X,o1)){T.call(Y0,n1);break}A1&&(r0=ye)}c0&&((n1=!d1&&n1)&&p1--,F0&&i2.push(n1))}if(p1+=x1,c0&&x1!==p1){for(i1=0;d1=Z[i1++];)d1(i2,Z1,J0,o1);if(F0){if(p1>0)for(;x1--;)i2[x1]||Z1[x1]||(Z1[x1]=C.call(Y0));Z1=Ft(Z1)}T.apply(Y0,Z1),A1&&!F0&&Z1.length>0&&p1+Z.length>1&&l.uniqueSort(Y0)}return A1&&(r0=ye,u=d2),i2};return c0?L2(L0):L0}function bM(H,Z){var c0,O0=[],L0=[],F0=l1[H+" "];if(!F0){for(Z||(Z=rt(H)),c0=Z.length;c0--;)F0=MM(Z[c0]),F0[N0]?O0.push(F0):L0.push(F0);F0=l1(H,ja(L0,O0)),F0.selector=H}return F0}function tz(H,Z,c0,O0){var L0,F0,J0,o1,Y0,A1=typeof H=="function"&&H,n1=!O0&&rt(H=A1.selector||H);if(c0=c0||[],n1.length===1){if(F0=n1[0]=n1[0].slice(0),F0.length>2&&(J0=F0[0]).type==="ID"&&Z.nodeType===9&&U&&a.relative[F0[1].type]){if(Z=(a.find.ID(J0.matches[0].replace(k2,_2),Z)||[])[0],Z)A1&&(Z=Z.parentNode);else return c0;H=H.slice(F0.shift().value.length)}for(L0=S2.needsContext.test(H)?0:F0.length;L0--&&(J0=F0[L0],!a.relative[o1=J0.type]);)if((Y0=a.find[o1])&&(O0=Y0(J0.matches[0].replace(k2,_2),Zo.test(F0[0].type)&&eM(Z.parentNode)||Z))){if(F0.splice(L0,1),H=O0.length&&Ht(F0),!H)return T.apply(c0,O0),c0;break}}return(A1||bM(H,n1))(O0,Z,!U,c0,!Z||Zo.test(H)&&eM(Z.parentNode)||Z),c0}d.sortStable=N0.split("").sort($1).join("")===N0,J2(),d.sortDetached=Be(function(H){return H.compareDocumentPosition(X.createElement("fieldset"))&1}),l.find=B1,l.expr[":"]=l.expr.pseudos,l.unique=l.uniqueSort,B1.compile=bM,B1.select=tz,B1.setDocument=J2,B1.tokenize=rt,B1.escape=l.escapeSelector,B1.getText=l.text,B1.isXML=l.isXMLDoc,B1.selectors=l.expr,B1.support=l.support,B1.uniqueSort=l.uniqueSort})();var Y=function(z,a,u){for(var f=[],y=u!==void 0;(z=z[a])&&z.nodeType!==9;)if(z.nodeType===1){if(y&&l(z).is(u))break;f.push(z)}return f},V0=function(z,a){for(var u=[];z;z=z.nextSibling)z.nodeType===1&&z!==a&&u.push(z);return u},P0=l.expr.match.needsContext,f0=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function T0(z,a,u){return m(a)?l.grep(z,function(f,y){return!!a.call(f,y,f)!==u}):a.nodeType?l.grep(z,function(f){return f===a!==u}):typeof a!="string"?l.grep(z,function(f){return r.call(a,f)>-1!==u}):l.filter(a,z,u)}l.filter=function(z,a,u){var f=a[0];return u&&(z=":not("+z+")"),a.length===1&&f.nodeType===1?l.find.matchesSelector(f,z)?[f]:[]:l.find.matches(z,l.grep(a,function(y){return y.nodeType===1}))},l.fn.extend({find:function(z){var a,u,f=this.length,y=this;if(typeof z!="string")return this.pushStack(l(z).filter(function(){for(a=0;a1?l.uniqueSort(u):u},filter:function(z){return this.pushStack(T0(this,z||[],!1))},not:function(z){return this.pushStack(T0(this,z||[],!0))},is:function(z){return!!T0(this,typeof z=="string"&&P0.test(z)?l(z):z||[],!1).length}});var C0,b0=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,l0=l.fn.init=function(z,a,u){var f,y;if(!z)return this;if(u=u||C0,typeof z=="string")if(z[0]==="<"&&z[z.length-1]===">"&&z.length>=3?f=[null,z,null]:f=b0.exec(z),f&&(f[1]||!a))if(f[1]){if(a=a instanceof l?a[0]:a,l.merge(this,l.parseHTML(f[1],a&&a.nodeType?a.ownerDocument||a:R,!0)),f0.test(f[1])&&l.isPlainObject(a))for(f in a)m(this[f])?this[f](a[f]):this.attr(f,a[f]);return this}else return y=R.getElementById(f[2]),y&&(this[0]=y,this.length=1),this;else return!a||a.jquery?(a||u).find(z):this.constructor(a).find(z);else{if(z.nodeType)return this[0]=z,this.length=1,this;if(m(z))return u.ready!==void 0?u.ready(z):z(l)}return l.makeArray(z,this)};l0.prototype=l.fn,C0=l(R);var m0=/^(?:parents|prev(?:Until|All))/,R0={children:!0,contents:!0,next:!0,prev:!0};l.fn.extend({has:function(z){var a=l(z,this),u=a.length;return this.filter(function(){for(var f=0;f-1:u.nodeType===1&&l.find.matchesSelector(u,z))){T.push(u);break}}return this.pushStack(T.length>1?l.uniqueSort(T):T)},index:function(z){return z?typeof z=="string"?r.call(l(z),this[0]):r.call(this,z.jquery?z[0]:z):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(z,a){return this.pushStack(l.uniqueSort(l.merge(this.get(),l(z,a))))},addBack:function(z){return this.add(z==null?this.prevObject:this.prevObject.filter(z))}});function u0(z,a){for(;(z=z[a])&&z.nodeType!==1;);return z}l.each({parent:function(z){var a=z.parentNode;return a&&a.nodeType!==11?a:null},parents:function(z){return Y(z,"parentNode")},parentsUntil:function(z,a,u){return Y(z,"parentNode",u)},next:function(z){return u0(z,"nextSibling")},prev:function(z){return u0(z,"previousSibling")},nextAll:function(z){return Y(z,"nextSibling")},prevAll:function(z){return Y(z,"previousSibling")},nextUntil:function(z,a,u){return Y(z,"nextSibling",u)},prevUntil:function(z,a,u){return Y(z,"previousSibling",u)},siblings:function(z){return V0((z.parentNode||{}).firstChild,z)},children:function(z){return V0(z.firstChild)},contents:function(z){return z.contentDocument!=null&&b(z.contentDocument)?z.contentDocument:(B(z,"template")&&(z=z.content||z),l.merge([],z.childNodes))}},function(z,a){l.fn[z]=function(u,f){var y=l.map(this,a,u);return z.slice(-5)!=="Until"&&(f=u),f&&typeof f=="string"&&(y=l.filter(f,y)),this.length>1&&(R0[z]||l.uniqueSort(y),m0.test(z)&&y.reverse()),this.pushStack(y)}});var B0=/[^\x20\t\r\n\f]+/g;function e1(z){var a={};return l.each(z.match(B0)||[],function(u,f){a[f]=!0}),a}l.Callbacks=function(z){z=typeof z=="string"?e1(z):l.extend({},z);var a,u,f,y,T=[],X=[],K=-1,U=function(){for(y=y||z.once,f=a=!0;X.length;K=-1)for(u=X.shift();++K-1;)T.splice(r0,1),r0<=K&&K--}),this},has:function(q0){return q0?l.inArray(q0,T)>-1:T.length>0},empty:function(){return T&&(T=[]),this},disable:function(){return y=X=[],T=u="",this},disabled:function(){return!T},lock:function(){return y=X=[],!u&&!a&&(T=u=""),this},locked:function(){return!!y},fireWith:function(q0,N0){return y||(N0=N0||[],N0=[q0,N0.slice?N0.slice():N0],X.push(N0),a||U()),this},fire:function(){return o0.fireWith(this,arguments),this},fired:function(){return!!f}};return o0};function G(z){return z}function t0(z){throw z}function n0(z,a,u,f){var y;try{z&&m(y=z.promise)?y.call(z).done(a).fail(u):z&&m(y=z.then)?y.call(z,a,u):a.apply(void 0,[z].slice(f))}catch(T){u.apply(void 0,[T])}}l.extend({Deferred:function(z){var a=[["notify","progress",l.Callbacks("memory"),l.Callbacks("memory"),2],["resolve","done",l.Callbacks("once memory"),l.Callbacks("once memory"),0,"resolved"],["reject","fail",l.Callbacks("once memory"),l.Callbacks("once memory"),1,"rejected"]],u="pending",f={state:function(){return u},always:function(){return y.done(arguments).fail(arguments),this},catch:function(T){return f.then(null,T)},pipe:function(){var T=arguments;return l.Deferred(function(X){l.each(a,function(K,U){var o0=m(T[U[4]])&&T[U[4]];y[U[1]](function(){var q0=o0&&o0.apply(this,arguments);q0&&m(q0.promise)?q0.promise().progress(X.notify).done(X.resolve).fail(X.reject):X[U[0]+"With"](this,o0?[q0]:arguments)})}),T=null}).promise()},then:function(T,X,K){var U=0;function o0(q0,N0,r0,E0){return function(){var r1=this,g1=arguments,l1=function(){var $1,B2;if(!(q0=U&&(r0!==t0&&(r1=void 0,g1=[$1]),N0.rejectWith(r1,g1))}};q0?Q1():(l.Deferred.getErrorHook?Q1.error=l.Deferred.getErrorHook():l.Deferred.getStackHook&&(Q1.error=l.Deferred.getStackHook()),t.setTimeout(Q1))}}return l.Deferred(function(q0){a[0][3].add(o0(0,q0,m(K)?K:G,q0.notifyWith)),a[1][3].add(o0(0,q0,m(T)?T:G)),a[2][3].add(o0(0,q0,m(X)?X:t0))}).promise()},promise:function(T){return T!=null?l.extend(T,f):f}},y={};return l.each(a,function(T,X){var K=X[2],U=X[5];f[X[1]]=K.add,U&&K.add(function(){u=U},a[3-T][2].disable,a[3-T][3].disable,a[0][2].lock,a[0][3].lock),K.add(X[3].fire),y[X[0]]=function(){return y[X[0]+"With"](this===y?void 0:this,arguments),this},y[X[0]+"With"]=K.fireWith}),f.promise(y),z&&z.call(y,y),y},when:function(z){var a=arguments.length,u=a,f=Array(u),y=p.call(arguments),T=l.Deferred(),X=function(K){return function(U){f[K]=this,y[K]=arguments.length>1?p.call(arguments):U,--a||T.resolveWith(f,y)}};if(a<=1&&(n0(z,T.done(X(u)).resolve,T.reject,!a),T.state()==="pending"||m(y[u]&&y[u].then)))return T.then();for(;u--;)n0(y[u],X(u),T.reject);return T.promise()}});var h0=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;l.Deferred.exceptionHook=function(z,a){t.console&&t.console.warn&&z&&h0.test(z.name)&&t.console.warn("jQuery.Deferred exception: "+z.message,z.stack,a)},l.readyException=function(z){t.setTimeout(function(){throw z})};var x0=l.Deferred();l.fn.ready=function(z){return x0.then(z).catch(function(a){l.readyException(a)}),this},l.extend({isReady:!1,readyWait:1,ready:function(z){(z===!0?--l.readyWait:l.isReady)||(l.isReady=!0,!(z!==!0&&--l.readyWait>0)&&x0.resolveWith(R,[l]))}}),l.ready.then=x0.then;function H0(){R.removeEventListener("DOMContentLoaded",H0),t.removeEventListener("load",H0),l.ready()}R.readyState==="complete"||R.readyState!=="loading"&&!R.documentElement.doScroll?t.setTimeout(l.ready):(R.addEventListener("DOMContentLoaded",H0),t.addEventListener("load",H0));var $0=function(z,a,u,f,y,T,X){var K=0,U=z.length,o0=u==null;if(N(u)==="object"){y=!0;for(K in u)$0(z,a,K,u[K],!0,T,X)}else if(f!==void 0&&(y=!0,m(f)||(X=!0),o0&&(X?(a.call(z,f),a=null):(o0=a,a=function(q0,N0,r0){return o0.call(l(q0),r0)})),a))for(;K1,null,!0)},removeData:function(z){return this.each(function(){O1.remove(this,z)})}}),l.extend({queue:function(z,a,u){var f;if(z)return a=(a||"fx")+"queue",f=X0.get(z,a),u&&(!f||Array.isArray(u)?f=X0.access(z,a,l.makeArray(u)):f.push(u)),f||[]},dequeue:function(z,a){a=a||"fx";var u=l.queue(z,a),f=u.length,y=u.shift(),T=l._queueHooks(z,a),X=function(){l.dequeue(z,a)};y==="inprogress"&&(y=u.shift(),f--),y&&(a==="fx"&&u.unshift("inprogress"),delete T.stop,y.call(z,X,T)),!f&&T&&T.empty.fire()},_queueHooks:function(z,a){var u=a+"queueHooks";return X0.get(z,u)||X0.access(z,u,{empty:l.Callbacks("once memory").add(function(){X0.remove(z,[a+"queue",u])})})}}),l.fn.extend({queue:function(z,a){var u=2;return typeof z!="string"&&(a=z,z="fx",u--),arguments.length\x20\t\r\n\f]*)/i,e0=/^$|^module$|\/(?:java|ecma)script/i;(function(){var z=R.createDocumentFragment(),a=z.appendChild(R.createElement("div")),u=R.createElement("input");u.setAttribute("type","radio"),u.setAttribute("checked","checked"),u.setAttribute("name","t"),a.appendChild(u),d.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",d.noCloneChecked=!!a.cloneNode(!0).lastChild.defaultValue,a.innerHTML="",d.option=!!a.lastChild})();var V={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};V.tbody=V.tfoot=V.colgroup=V.caption=V.thead,V.th=V.td,d.option||(V.optgroup=V.option=[1,""]);function F(z,a){var u;return typeof z.getElementsByTagName<"u"?u=z.getElementsByTagName(a||"*"):typeof z.querySelectorAll<"u"?u=z.querySelectorAll(a||"*"):u=[],a===void 0||a&&B(z,a)?l.merge([z],u):u}function p0(z,a){for(var u=0,f=z.length;u-1){y&&y.push(T);continue}if(o0=V1(T),X=F(N0.appendChild(T),"script"),o0&&p0(X),u)for(q0=0;T=X[q0++];)e0.test(T.type||"")&&u.push(T)}return N0}var W0=/^([^.]*)(?:\.(.+)|)/;function j0(){return!0}function v0(){return!1}function _0(z,a,u,f,y,T){var X,K;if(typeof a=="object"){typeof u!="string"&&(f=f||u,u=void 0);for(K in a)_0(z,K,u,f,a[K],T);return z}if(f==null&&y==null?(y=u,f=u=void 0):y==null&&(typeof u=="string"?(y=f,f=void 0):(y=f,f=u,u=void 0)),y===!1)y=v0;else if(!y)return z;return T===1&&(X=y,y=function(U){return l().off(U),X.apply(this,arguments)},y.guid=X.guid||(X.guid=l.guid++)),z.each(function(){l.event.add(this,a,y,f,u)})}l.event={global:{},add:function(z,a,u,f,y){var T,X,K,U,o0,q0,N0,r0,E0,r1,g1,l1=X0.get(z);if(Z0(z))for(u.handler&&(T=u,u=T.handler,y=T.selector),y&&l.find.matchesSelector(v1,y),u.guid||(u.guid=l.guid++),(U=l1.events)||(U=l1.events=Object.create(null)),(X=l1.handle)||(X=l1.handle=function(Q1){return typeof l<"u"&&l.event.triggered!==Q1.type?l.event.dispatch.apply(z,arguments):void 0}),a=(a||"").match(B0)||[""],o0=a.length;o0--;)K=W0.exec(a[o0])||[],E0=g1=K[1],r1=(K[2]||"").split(".").sort(),E0&&(N0=l.event.special[E0]||{},E0=(y?N0.delegateType:N0.bindType)||E0,N0=l.event.special[E0]||{},q0=l.extend({type:E0,origType:g1,data:f,handler:u,guid:u.guid,selector:y,needsContext:y&&l.expr.match.needsContext.test(y),namespace:r1.join(".")},T),(r0=U[E0])||(r0=U[E0]=[],r0.delegateCount=0,(!N0.setup||N0.setup.call(z,f,r1,X)===!1)&&z.addEventListener&&z.addEventListener(E0,X)),N0.add&&(N0.add.call(z,q0),q0.handler.guid||(q0.handler.guid=u.guid)),y?r0.splice(r0.delegateCount++,0,q0):r0.push(q0),l.event.global[E0]=!0)},remove:function(z,a,u,f,y){var T,X,K,U,o0,q0,N0,r0,E0,r1,g1,l1=X0.hasData(z)&&X0.get(z);if(!(!l1||!(U=l1.events))){for(a=(a||"").match(B0)||[""],o0=a.length;o0--;){if(K=W0.exec(a[o0])||[],E0=g1=K[1],r1=(K[2]||"").split(".").sort(),!E0){for(E0 in U)l.event.remove(z,E0+a[o0],u,f,!0);continue}for(N0=l.event.special[E0]||{},E0=(f?N0.delegateType:N0.bindType)||E0,r0=U[E0]||[],K=K[2]&&new RegExp("(^|\\.)"+r1.join("\\.(?:.*\\.|)")+"(\\.|$)"),X=T=r0.length;T--;)q0=r0[T],(y||g1===q0.origType)&&(!u||u.guid===q0.guid)&&(!K||K.test(q0.namespace))&&(!f||f===q0.selector||f==="**"&&q0.selector)&&(r0.splice(T,1),q0.selector&&r0.delegateCount--,N0.remove&&N0.remove.call(z,q0));X&&!r0.length&&((!N0.teardown||N0.teardown.call(z,r1,l1.handle)===!1)&&l.removeEvent(z,E0,l1.handle),delete U[E0])}l.isEmptyObject(U)&&X0.remove(z,"handle events")}},dispatch:function(z){var a,u,f,y,T,X,K=new Array(arguments.length),U=l.event.fix(z),o0=(X0.get(this,"events")||Object.create(null))[U.type]||[],q0=l.event.special[U.type]||{};for(K[0]=U,a=1;a=1)){for(;o0!==this;o0=o0.parentNode||this)if(o0.nodeType===1&&!(z.type==="click"&&o0.disabled===!0)){for(T=[],X={},u=0;u-1:l.find(y,this,null,[o0]).length),X[y]&&T.push(f);T.length&&K.push({elem:o0,handlers:T})}}return o0=this,U\s*$/g;function k0(z,a){return B(z,"table")&&B(a.nodeType!==11?a:a.firstChild,"tr")&&l(z).children("tbody")[0]||z}function G0(z){return z.type=(z.getAttribute("type")!==null)+"/"+z.type,z}function W1(z){return(z.type||"").slice(0,5)==="true/"?z.type=z.type.slice(5):z.removeAttribute("type"),z}function K1(z,a){var u,f,y,T,X,K,U;if(a.nodeType===1){if(X0.hasData(z)&&(T=X0.get(z),U=T.events,U)){X0.remove(a,"handle events");for(y in U)for(u=0,f=U[y].length;u1&&typeof E0=="string"&&!d.checkClone&&I0.test(E0))return z.each(function(g1){var l1=z.eq(g1);r1&&(a[0]=E0.call(this,g1,l1.html())),U1(l1,a,u,f)});if(N0&&(y=a0(a,z[0].ownerDocument,!1,z,f),T=y.firstChild,y.childNodes.length===1&&(y=T),T||f)){for(X=l.map(F(y,"script"),G0),K=X.length;q00&&p0(X,!U&&F(z,"script")),K},cleanData:function(z){for(var a,u,f,y=l.event.special,T=0;(u=z[T])!==void 0;T++)if(Z0(u)){if(a=u[X0.expando]){if(a.events)for(f in a.events)y[f]?l.event.remove(u,f):l.removeEvent(u,f,a.handle);u[X0.expando]=void 0}u[O1.expando]&&(u[O1.expando]=void 0)}}}),l.fn.extend({detach:function(z){return M2(this,z,!0)},remove:function(z){return M2(this,z)},text:function(z){return $0(this,function(a){return a===void 0?l.text(this):this.empty().each(function(){(this.nodeType===1||this.nodeType===11||this.nodeType===9)&&(this.textContent=a)})},null,z,arguments.length)},append:function(){return U1(this,arguments,function(z){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var a=k0(this,z);a.appendChild(z)}})},prepend:function(){return U1(this,arguments,function(z){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var a=k0(this,z);a.insertBefore(z,a.firstChild)}})},before:function(){return U1(this,arguments,function(z){this.parentNode&&this.parentNode.insertBefore(z,this)})},after:function(){return U1(this,arguments,function(z){this.parentNode&&this.parentNode.insertBefore(z,this.nextSibling)})},empty:function(){for(var z,a=0;(z=this[a])!=null;a++)z.nodeType===1&&(l.cleanData(F(z,!1)),z.textContent="");return this},clone:function(z,a){return z=z??!1,a=a??z,this.map(function(){return l.clone(this,z,a)})},html:function(z){return $0(this,function(a){var u=this[0]||{},f=0,y=this.length;if(a===void 0&&u.nodeType===1)return u.innerHTML;if(typeof a=="string"&&!t1.test(a)&&!V[(j.exec(a)||["",""])[1].toLowerCase()]){a=l.htmlPrefilter(a);try{for(;f=0&&(U+=Math.max(0,Math.ceil(z["offset"+a[0].toUpperCase()+a.slice(1)]-T-U-K-.5))||0),U+o0}function Dp(z,a,u){var f=_t(z),y=!d.boxSizingReliable()||u,T=y&&l.css(z,"boxSizing",!1,f)==="border-box",X=T,K=Mt(z,a,f),U="offset"+a[0].toUpperCase()+a.slice(1);if(Me.test(K)){if(!u)return K;K="auto"}return(!d.boxSizingReliable()&&T||!d.reliableTrDimensions()&&B(z,"tr")||K==="auto"||!parseFloat(K)&&l.css(z,"display",!1,f)==="inline")&&z.getClientRects().length&&(T=l.css(z,"boxSizing",!1,f)==="border-box",X=U in z,X&&(K=z[U])),K=parseFloat(K)||0,K+jo(z,a,u||(T?"border":"content"),X,f,K)+"px"}l.extend({cssHooks:{opacity:{get:function(z,a){if(a){var u=Mt(z,"opacity");return u===""?"1":u}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(z,a,u,f){if(!(!z||z.nodeType===3||z.nodeType===8||!z.style)){var y,T,X,K=U0(a),U=Po.test(a),o0=z.style;if(U||(a=Ho(K)),X=l.cssHooks[a]||l.cssHooks[K],u!==void 0){if(T=typeof u,T==="string"&&(y=S1.exec(u))&&y[1]&&(u=l2(z,a,y),T="number"),u==null||u!==u)return;T==="number"&&!U&&(u+=y&&y[3]||(l.cssNumber[K]?"":"px")),!d.clearCloneStyle&&u===""&&a.indexOf("background")===0&&(o0[a]="inherit"),(!X||!("set"in X)||(u=X.set(z,u,f))!==void 0)&&(U?o0.setProperty(a,u):o0[a]=u)}else return X&&"get"in X&&(y=X.get(z,!1,f))!==void 0?y:o0[a]}},css:function(z,a,u,f){var y,T,X,K=U0(a),U=Po.test(a);return U||(a=Ho(K)),X=l.cssHooks[a]||l.cssHooks[K],X&&"get"in X&&(y=X.get(z,!0,u)),y===void 0&&(y=Mt(z,a,f)),y==="normal"&&a in _p&&(y=_p[a]),u===""||u?(T=parseFloat(y),u===!0||isFinite(T)?T||0:y):y}}),l.each(["height","width"],function(z,a){l.cssHooks[a]={get:function(u,f,y){if(f)return Oa.test(l.css(u,"display"))&&(!u.getClientRects().length||!u.getBoundingClientRect().width)?Xp(u,sa,function(){return Dp(u,a,y)}):Dp(u,a,y)},set:function(u,f,y){var T,X=_t(u),K=!d.scrollboxSize()&&X.position==="absolute",U=K||y,o0=U&&l.css(u,"boxSizing",!1,X)==="border-box",q0=y?jo(u,a,y,o0,X):0;return o0&&K&&(q0-=Math.ceil(u["offset"+a[0].toUpperCase()+a.slice(1)]-parseFloat(X[a])-jo(u,a,"border",!1,X)-.5)),q0&&(T=S1.exec(f))&&(T[3]||"px")!=="px"&&(u.style[a]=f,f=l.css(u,a)),Ip(u,f,q0)}}}),l.cssHooks.marginLeft=wp(d.reliableMarginLeft,function(z,a){if(a)return(parseFloat(Mt(z,"marginLeft"))||z.getBoundingClientRect().left-Xp(z,{marginLeft:0},function(){return z.getBoundingClientRect().left}))+"px"}),l.each({margin:"",padding:"",border:"Width"},function(z,a){l.cssHooks[z+a]={expand:function(u){for(var f=0,y={},T=typeof u=="string"?u.split(" "):[u];f<4;f++)y[z+C1[f]+a]=T[f]||T[f-2]||T[0];return y}},z!=="margin"&&(l.cssHooks[z+a].set=Ip)}),l.fn.extend({css:function(z,a){return $0(this,function(u,f,y){var T,X,K={},U=0;if(Array.isArray(f)){for(T=_t(u),X=f.length;U1)}});function r2(z,a,u,f,y){return new r2.prototype.init(z,a,u,f,y)}l.Tween=r2,r2.prototype={constructor:r2,init:function(z,a,u,f,y,T){this.elem=z,this.prop=u,this.easing=y||l.easing._default,this.options=a,this.start=this.now=this.cur(),this.end=f,this.unit=T||(l.cssNumber[u]?"":"px")},cur:function(){var z=r2.propHooks[this.prop];return z&&z.get?z.get(this):r2.propHooks._default.get(this)},run:function(z){var a,u=r2.propHooks[this.prop];return this.options.duration?this.pos=a=l.easing[this.easing](z,this.options.duration*z,0,1,this.options.duration):this.pos=a=z,this.now=(this.end-this.start)*a+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),u&&u.set?u.set(this):r2.propHooks._default.set(this),this}},r2.prototype.init.prototype=r2.prototype,r2.propHooks={_default:{get:function(z){var a;return z.elem.nodeType!==1||z.elem[z.prop]!=null&&z.elem.style[z.prop]==null?z.elem[z.prop]:(a=l.css(z.elem,z.prop,""),!a||a==="auto"?0:a)},set:function(z){l.fx.step[z.prop]?l.fx.step[z.prop](z):z.elem.nodeType===1&&(l.cssHooks[z.prop]||z.elem.style[Ho(z.prop)]!=null)?l.style(z.elem,z.prop,z.now+z.unit):z.elem[z.prop]=z.now}}},r2.propHooks.scrollTop=r2.propHooks.scrollLeft={set:function(z){z.elem.nodeType&&z.elem.parentNode&&(z.elem[z.prop]=z.now)}},l.easing={linear:function(z){return z},swing:function(z){return .5-Math.cos(z*Math.PI)/2},_default:"swing"},l.fx=r2.prototype.init,l.fx.step={};var ve,It,la=/^(?:toggle|show|hide)$/,Aa=/queueHooks$/;function Fo(){It&&(R.hidden===!1&&t.requestAnimationFrame?t.requestAnimationFrame(Fo):t.setTimeout(Fo,l.fx.interval),l.fx.tick())}function Pp(){return t.setTimeout(function(){ve=void 0}),ve=Date.now()}function Dt(z,a){var u,f=0,y={height:z};for(a=a?1:0;f<4;f+=2-a)u=C1[f],y["margin"+u]=y["padding"+u]=z;return a&&(y.opacity=y.width=z),y}function Hp(z,a,u){for(var f,y=(m2.tweeners[a]||[]).concat(m2.tweeners["*"]),T=0,X=y.length;T1)},removeAttr:function(z){return this.each(function(){l.removeAttr(this,z)})}}),l.extend({attr:function(z,a,u){var f,y,T=z.nodeType;if(!(T===3||T===8||T===2)){if(typeof z.getAttribute>"u")return l.prop(z,a,u);if((T!==1||!l.isXMLDoc(z))&&(y=l.attrHooks[a.toLowerCase()]||(l.expr.match.bool.test(a)?jp:void 0)),u!==void 0){if(u===null){l.removeAttr(z,a);return}return y&&"set"in y&&(f=y.set(z,u,a))!==void 0?f:(z.setAttribute(a,u+""),u)}return y&&"get"in y&&(f=y.get(z,a))!==null?f:(f=l.find.attr(z,a),f??void 0)}},attrHooks:{type:{set:function(z,a){if(!d.radioValue&&a==="radio"&&B(z,"input")){var u=z.value;return z.setAttribute("type",a),u&&(z.value=u),a}}}},removeAttr:function(z,a){var u,f=0,y=a&&a.match(B0);if(y&&z.nodeType===1)for(;u=y[f++];)z.removeAttribute(u)}}),jp={set:function(z,a,u){return a===!1?l.removeAttr(z,u):z.setAttribute(u,u),u}},l.each(l.expr.match.bool.source.match(/\w+/g),function(z,a){var u=bt[a]||l.find.attr;bt[a]=function(f,y,T){var X,K,U=y.toLowerCase();return T||(K=bt[U],bt[U]=X,X=u(f,y,T)!=null?U:null,bt[U]=K),X}});var qa=/^(?:input|select|textarea|button)$/i,fa=/^(?:a|area)$/i;l.fn.extend({prop:function(z,a){return $0(this,l.prop,z,a,arguments.length>1)},removeProp:function(z){return this.each(function(){delete this[l.propFix[z]||z]})}}),l.extend({prop:function(z,a,u){var f,y,T=z.nodeType;if(!(T===3||T===8||T===2))return(T!==1||!l.isXMLDoc(z))&&(a=l.propFix[a]||a,y=l.propHooks[a]),u!==void 0?y&&"set"in y&&(f=y.set(z,u,a))!==void 0?f:z[a]=u:y&&"get"in y&&(f=y.get(z,a))!==null?f:z[a]},propHooks:{tabIndex:{get:function(z){var a=l.find.attr(z,"tabindex");return a?parseInt(a,10):qa.test(z.nodeName)||fa.test(z.nodeName)&&z.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),d.optSelected||(l.propHooks.selected={get:function(z){var a=z.parentNode;return a&&a.parentNode&&a.parentNode.selectedIndex,null},set:function(z){var a=z.parentNode;a&&(a.selectedIndex,a.parentNode&&a.parentNode.selectedIndex)}}),l.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){l.propFix[this.toLowerCase()]=this});function be(z){var a=z.match(B0)||[];return a.join(" ")}function pe(z){return z.getAttribute&&z.getAttribute("class")||""}function Vo(z){return Array.isArray(z)?z:typeof z=="string"?z.match(B0)||[]:[]}l.fn.extend({addClass:function(z){var a,u,f,y,T,X;return m(z)?this.each(function(K){l(this).addClass(z.call(this,K,pe(this)))}):(a=Vo(z),a.length?this.each(function(){if(f=pe(this),u=this.nodeType===1&&" "+be(f)+" ",u){for(T=0;T-1;)u=u.replace(" "+y+" "," ");X=be(u),f!==X&&this.setAttribute("class",X)}}):this):this.attr("class","")},toggleClass:function(z,a){var u,f,y,T,X=typeof z,K=X==="string"||Array.isArray(z);return m(z)?this.each(function(U){l(this).toggleClass(z.call(this,U,pe(this),a),a)}):typeof a=="boolean"&&K?a?this.addClass(z):this.removeClass(z):(u=Vo(z),this.each(function(){if(K)for(T=l(this),y=0;y-1)return!0;return!1}});var Wa=/\r/g;l.fn.extend({val:function(z){var a,u,f,y=this[0];return arguments.length?(f=m(z),this.each(function(T){var X;this.nodeType===1&&(f?X=z.call(this,T,l(this).val()):X=z,X==null?X="":typeof X=="number"?X+="":Array.isArray(X)&&(X=l.map(X,function(K){return K==null?"":K+""})),a=l.valHooks[this.type]||l.valHooks[this.nodeName.toLowerCase()],(!a||!("set"in a)||a.set(this,X,"value")===void 0)&&(this.value=X))})):y?(a=l.valHooks[y.type]||l.valHooks[y.nodeName.toLowerCase()],a&&"get"in a&&(u=a.get(y,"value"))!==void 0?u:(u=y.value,typeof u=="string"?u.replace(Wa,""):u??"")):void 0}}),l.extend({valHooks:{option:{get:function(z){var a=l.find.attr(z,"value");return a??be(l.text(z))}},select:{get:function(z){var a,u,f,y=z.options,T=z.selectedIndex,X=z.type==="select-one",K=X?null:[],U=X?T+1:y.length;for(T<0?f=U:f=X?T:0;f-1)&&(u=!0);return u||(z.selectedIndex=-1),T}}}}),l.each(["radio","checkbox"],function(){l.valHooks[this]={set:function(z,a){if(Array.isArray(a))return z.checked=l.inArray(l(z).val(),a)>-1}},d.checkOn||(l.valHooks[this].get=function(z){return z.getAttribute("value")===null?"on":z.value})});var pt=t.location,Fp={guid:Date.now()},$o=/\?/;l.parseXML=function(z){var a,u;if(!z||typeof z!="string")return null;try{a=new t.DOMParser().parseFromString(z,"text/xml")}catch{}return u=a&&a.getElementsByTagName("parsererror")[0],(!a||u)&&l.error("Invalid XML: "+(u?l.map(u.childNodes,function(f){return f.textContent}).join(` +`):z)),a};var Vp=/^(?:focusinfocus|focusoutblur)$/,$p=function(z){z.stopPropagation()};l.extend(l.event,{trigger:function(z,a,u,f){var y,T,X,K,U,o0,q0,N0,r0=[u||R],E0=A.call(z,"type")?z.type:z,r1=A.call(z,"namespace")?z.namespace.split("."):[];if(T=N0=X=u=u||R,!(u.nodeType===3||u.nodeType===8)&&!Vp.test(E0+l.event.triggered)&&(E0.indexOf(".")>-1&&(r1=E0.split("."),E0=r1.shift(),r1.sort()),U=E0.indexOf(":")<0&&"on"+E0,z=z[l.expando]?z:new l.Event(E0,typeof z=="object"&&z),z.isTrigger=f?2:3,z.namespace=r1.join("."),z.rnamespace=z.namespace?new RegExp("(^|\\.)"+r1.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,z.result=void 0,z.target||(z.target=u),a=a==null?[z]:l.makeArray(a,[z]),q0=l.event.special[E0]||{},!(!f&&q0.trigger&&q0.trigger.apply(u,a)===!1))){if(!f&&!q0.noBubble&&!L(u)){for(K=q0.delegateType||E0,Vp.test(K+E0)||(T=T.parentNode);T;T=T.parentNode)r0.push(T),X=T;X===(u.ownerDocument||R)&&r0.push(X.defaultView||X.parentWindow||t)}for(y=0;(T=r0[y++])&&!z.isPropagationStopped();)N0=T,z.type=y>1?K:q0.bindType||E0,o0=(X0.get(T,"events")||Object.create(null))[z.type]&&X0.get(T,"handle"),o0&&o0.apply(T,a),o0=U&&T[U],o0&&o0.apply&&Z0(T)&&(z.result=o0.apply(T,a),z.result===!1&&z.preventDefault());return z.type=E0,!f&&!z.isDefaultPrevented()&&(!q0._default||q0._default.apply(r0.pop(),a)===!1)&&Z0(u)&&U&&m(u[E0])&&!L(u)&&(X=u[U],X&&(u[U]=null),l.event.triggered=E0,z.isPropagationStopped()&&N0.addEventListener(E0,$p),u[E0](),z.isPropagationStopped()&&N0.removeEventListener(E0,$p),l.event.triggered=void 0,X&&(u[U]=X)),z.result}},simulate:function(z,a,u){var f=l.extend(new l.Event,u,{type:z,isSimulated:!0});l.event.trigger(f,null,a)}}),l.fn.extend({trigger:function(z,a){return this.each(function(){l.event.trigger(z,a,this)})},triggerHandler:function(z,a){var u=this[0];if(u)return l.event.trigger(z,a,u,!0)}});var ha=/\[\]$/,Up=/\r?\n/g,ga=/^(?:submit|button|image|reset|file)$/i,Ra=/^(?:input|select|textarea|keygen)/i;function Uo(z,a,u,f){var y;if(Array.isArray(a))l.each(a,function(T,X){u||ha.test(z)?f(z,X):Uo(z+"["+(typeof X=="object"&&X!=null?T:"")+"]",X,u,f)});else if(!u&&N(a)==="object")for(y in a)Uo(z+"["+y+"]",a[y],u,f);else f(z,a)}l.param=function(z,a){var u,f=[],y=function(T,X){var K=m(X)?X():X;f[f.length]=encodeURIComponent(T)+"="+encodeURIComponent(K??"")};if(z==null)return"";if(Array.isArray(z)||z.jquery&&!l.isPlainObject(z))l.each(z,function(){y(this.name,this.value)});else for(u in z)Uo(u,z[u],a,y);return f.join("&")},l.fn.extend({serialize:function(){return l.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var z=l.prop(this,"elements");return z?l.makeArray(z):this}).filter(function(){var z=this.type;return this.name&&!l(this).is(":disabled")&&Ra.test(this.nodeName)&&!ga.test(z)&&(this.checked||!J.test(z))}).map(function(z,a){var u=l(this).val();return u==null?null:Array.isArray(u)?l.map(u,function(f){return{name:a.name,value:f.replace(Up,`\r +`)}}):{name:a.name,value:u.replace(Up,`\r +`)}}).get()}});var ma=/%20/g,La=/#.*$/,Na=/([?&])_=[^&]*/,va=/^(.*?):[ \t]*([^\r\n]*)$/mg,Ba=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,ya=/^(?:GET|HEAD)$/,Ta=/^\/\//,Gp={},Go={},Kp="*/".concat("*"),Ko=R.createElement("a");Ko.href=pt.href;function Qp(z){return function(a,u){typeof a!="string"&&(u=a,a="*");var f,y=0,T=a.toLowerCase().match(B0)||[];if(m(u))for(;f=T[y++];)f[0]==="+"?(f=f.slice(1)||"*",(z[f]=z[f]||[]).unshift(u)):(z[f]=z[f]||[]).push(u)}}function Jp(z,a,u,f){var y={},T=z===Go;function X(K){var U;return y[K]=!0,l.each(z[K]||[],function(o0,q0){var N0=q0(a,u,f);if(typeof N0=="string"&&!T&&!y[N0])return a.dataTypes.unshift(N0),X(N0),!1;if(T)return!(U=N0)}),U}return X(a.dataTypes[0])||!y["*"]&&X("*")}function Qo(z,a){var u,f,y=l.ajaxSettings.flatOptions||{};for(u in a)a[u]!==void 0&&((y[u]?z:f||(f={}))[u]=a[u]);return f&&l.extend(!0,z,f),z}function Sa(z,a,u){for(var f,y,T,X,K=z.contents,U=z.dataTypes;U[0]==="*";)U.shift(),f===void 0&&(f=z.mimeType||a.getResponseHeader("Content-Type"));if(f){for(y in K)if(K[y]&&K[y].test(f)){U.unshift(y);break}}if(U[0]in u)T=U[0];else{for(y in u){if(!U[0]||z.converters[y+" "+U[0]]){T=y;break}X||(X=y)}T=T||X}if(T)return T!==U[0]&&U.unshift(T),u[T]}function xa(z,a,u,f){var y,T,X,K,U,o0={},q0=z.dataTypes.slice();if(q0[1])for(X in z.converters)o0[X.toLowerCase()]=z.converters[X];for(T=q0.shift();T;)if(z.responseFields[T]&&(u[z.responseFields[T]]=a),!U&&f&&z.dataFilter&&(a=z.dataFilter(a,z.dataType)),U=T,T=q0.shift(),T){if(T==="*")T=U;else if(U!=="*"&&U!==T){if(X=o0[U+" "+T]||o0["* "+T],!X){for(y in o0)if(K=y.split(" "),K[1]===T&&(X=o0[U+" "+K[0]]||o0["* "+K[0]],X)){X===!0?X=o0[y]:o0[y]!==!0&&(T=K[0],q0.unshift(K[1]));break}}if(X!==!0)if(X&&z.throws)a=X(a);else try{a=X(a)}catch(N0){return{state:"parsererror",error:X?N0:"No conversion from "+U+" to "+T}}}}return{state:"success",data:a}}l.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:pt.href,type:"GET",isLocal:Ba.test(pt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kp,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":l.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(z,a){return a?Qo(Qo(z,l.ajaxSettings),a):Qo(l.ajaxSettings,z)},ajaxPrefilter:Qp(Gp),ajaxTransport:Qp(Go),ajax:function(z,a){typeof z=="object"&&(a=z,z=void 0),a=a||{};var u,f,y,T,X,K,U,o0,q0,N0,r0=l.ajaxSetup({},a),E0=r0.context||r0,r1=r0.context&&(E0.nodeType||E0.jquery)?l(E0):l.event,g1=l.Deferred(),l1=l.Callbacks("once memory"),Q1=r0.statusCode||{},$1={},B2={},y2="canceled",u1={readyState:0,getResponseHeader:function(R1){var E1;if(U){if(!T)for(T={};E1=va.exec(y);)T[E1[1].toLowerCase()+" "]=(T[E1[1].toLowerCase()+" "]||[]).concat(E1[2]);E1=T[R1.toLowerCase()+" "]}return E1==null?null:E1.join(", ")},getAllResponseHeaders:function(){return U?y:null},setRequestHeader:function(R1,E1){return U==null&&(R1=B2[R1.toLowerCase()]=B2[R1.toLowerCase()]||R1,$1[R1]=E1),this},overrideMimeType:function(R1){return U==null&&(r0.mimeType=R1),this},statusCode:function(R1){var E1;if(R1)if(U)u1.always(R1[u1.status]);else for(E1 in R1)Q1[E1]=[Q1[E1],R1[E1]];return this},abort:function(R1){var E1=R1||y2;return u&&u.abort(E1),ze(0,E1),this}};if(g1.promise(u1),r0.url=((z||r0.url||pt.href)+"").replace(Ta,pt.protocol+"//"),r0.type=a.method||a.type||r0.method||r0.type,r0.dataTypes=(r0.dataType||"*").toLowerCase().match(B0)||[""],r0.crossDomain==null){K=R.createElement("a");try{K.href=r0.url,K.href=K.href,r0.crossDomain=Ko.protocol+"//"+Ko.host!=K.protocol+"//"+K.host}catch{r0.crossDomain=!0}}if(r0.data&&r0.processData&&typeof r0.data!="string"&&(r0.data=l.param(r0.data,r0.traditional)),Jp(Gp,r0,a,u1),U)return u1;o0=l.event&&r0.global,o0&&l.active++===0&&l.event.trigger("ajaxStart"),r0.type=r0.type.toUpperCase(),r0.hasContent=!ya.test(r0.type),f=r0.url.replace(La,""),r0.hasContent?r0.data&&r0.processData&&(r0.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&(r0.data=r0.data.replace(ma,"+")):(N0=r0.url.slice(f.length),r0.data&&(r0.processData||typeof r0.data=="string")&&(f+=($o.test(f)?"&":"?")+r0.data,delete r0.data),r0.cache===!1&&(f=f.replace(Na,"$1"),N0=($o.test(f)?"&":"?")+"_="+Fp.guid+++N0),r0.url=f+N0),r0.ifModified&&(l.lastModified[f]&&u1.setRequestHeader("If-Modified-Since",l.lastModified[f]),l.etag[f]&&u1.setRequestHeader("If-None-Match",l.etag[f])),(r0.data&&r0.hasContent&&r0.contentType!==!1||a.contentType)&&u1.setRequestHeader("Content-Type",r0.contentType),u1.setRequestHeader("Accept",r0.dataTypes[0]&&r0.accepts[r0.dataTypes[0]]?r0.accepts[r0.dataTypes[0]]+(r0.dataTypes[0]!=="*"?", "+Kp+"; q=0.01":""):r0.accepts["*"]);for(q0 in r0.headers)u1.setRequestHeader(q0,r0.headers[q0]);if(r0.beforeSend&&(r0.beforeSend.call(E0,u1,r0)===!1||U))return u1.abort();if(y2="abort",l1.add(r0.complete),u1.done(r0.success),u1.fail(r0.error),u=Jp(Go,r0,a,u1),!u)ze(-1,"No Transport");else{if(u1.readyState=1,o0&&r1.trigger("ajaxSend",[u1,r0]),U)return u1;r0.async&&r0.timeout>0&&(X=t.setTimeout(function(){u1.abort("timeout")},r0.timeout));try{U=!1,u.send($1,ze)}catch(R1){if(U)throw R1;ze(-1,R1)}}function ze(R1,E1,nt,Yo){var T2,ct,S2,K2,Q2,A2=E1;U||(U=!0,X&&t.clearTimeout(X),u=void 0,y=Yo||"",u1.readyState=R1>0?4:0,T2=R1>=200&&R1<300||R1===304,nt&&(K2=Sa(r0,u1,nt)),!T2&&l.inArray("script",r0.dataTypes)>-1&&l.inArray("json",r0.dataTypes)<0&&(r0.converters["text script"]=function(){}),K2=xa(r0,K2,u1,T2),T2?(r0.ifModified&&(Q2=u1.getResponseHeader("Last-Modified"),Q2&&(l.lastModified[f]=Q2),Q2=u1.getResponseHeader("etag"),Q2&&(l.etag[f]=Q2)),R1===204||r0.type==="HEAD"?A2="nocontent":R1===304?A2="notmodified":(A2=K2.state,ct=K2.data,S2=K2.error,T2=!S2)):(S2=A2,(R1||!A2)&&(A2="error",R1<0&&(R1=0))),u1.status=R1,u1.statusText=(E1||A2)+"",T2?g1.resolveWith(E0,[ct,A2,u1]):g1.rejectWith(E0,[u1,A2,S2]),u1.statusCode(Q1),Q1=void 0,o0&&r1.trigger(T2?"ajaxSuccess":"ajaxError",[u1,r0,T2?ct:S2]),l1.fireWith(E0,[u1,A2]),o0&&(r1.trigger("ajaxComplete",[u1,r0]),--l.active||l.event.trigger("ajaxStop")))}return u1},getJSON:function(z,a,u){return l.get(z,a,u,"json")},getScript:function(z,a){return l.get(z,void 0,a,"script")}}),l.each(["get","post"],function(z,a){l[a]=function(u,f,y,T){return m(f)&&(T=T||y,y=f,f=void 0),l.ajax(l.extend({url:u,type:a,dataType:T,data:f,success:y},l.isPlainObject(u)&&u))}}),l.ajaxPrefilter(function(z){var a;for(a in z.headers)a.toLowerCase()==="content-type"&&(z.contentType=z.headers[a]||"")}),l._evalUrl=function(z,a,u){return l.ajax({url:z,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(f){l.globalEval(f,a,u)}})},l.fn.extend({wrapAll:function(z){var a;return this[0]&&(m(z)&&(z=z.call(this[0])),a=l(z,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&a.insertBefore(this[0]),a.map(function(){for(var u=this;u.firstElementChild;)u=u.firstElementChild;return u}).append(this)),this},wrapInner:function(z){return m(z)?this.each(function(a){l(this).wrapInner(z.call(this,a))}):this.each(function(){var a=l(this),u=a.contents();u.length?u.wrapAll(z):a.append(z)})},wrap:function(z){var a=m(z);return this.each(function(u){l(this).wrapAll(a?z.call(this,u):z)})},unwrap:function(z){return this.parent(z).not("body").each(function(){l(this).replaceWith(this.childNodes)}),this}}),l.expr.pseudos.hidden=function(z){return!l.expr.pseudos.visible(z)},l.expr.pseudos.visible=function(z){return!!(z.offsetWidth||z.offsetHeight||z.getClientRects().length)},l.ajaxSettings.xhr=function(){try{return new t.XMLHttpRequest}catch{}};var Xa={0:200,1223:204},zt=l.ajaxSettings.xhr();d.cors=!!zt&&"withCredentials"in zt,d.ajax=zt=!!zt,l.ajaxTransport(function(z){var a,u;if(d.cors||zt&&!z.crossDomain)return{send:function(f,y){var T,X=z.xhr();if(X.open(z.type,z.url,z.async,z.username,z.password),z.xhrFields)for(T in z.xhrFields)X[T]=z.xhrFields[T];z.mimeType&&X.overrideMimeType&&X.overrideMimeType(z.mimeType),!z.crossDomain&&!f["X-Requested-With"]&&(f["X-Requested-With"]="XMLHttpRequest");for(T in f)X.setRequestHeader(T,f[T]);a=function(K){return function(){a&&(a=u=X.onload=X.onerror=X.onabort=X.ontimeout=X.onreadystatechange=null,K==="abort"?X.abort():K==="error"?typeof X.status!="number"?y(0,"error"):y(X.status,X.statusText):y(Xa[X.status]||X.status,X.statusText,(X.responseType||"text")!=="text"||typeof X.responseText!="string"?{binary:X.response}:{text:X.responseText},X.getAllResponseHeaders()))}},X.onload=a(),u=X.onerror=X.ontimeout=a("error"),X.onabort!==void 0?X.onabort=u:X.onreadystatechange=function(){X.readyState===4&&t.setTimeout(function(){a&&u()})},a=a("abort");try{X.send(z.hasContent&&z.data||null)}catch(K){if(a)throw K}},abort:function(){a&&a()}}}),l.ajaxPrefilter(function(z){z.crossDomain&&(z.contents.script=!1)}),l.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(z){return l.globalEval(z),z}}}),l.ajaxPrefilter("script",function(z){z.cache===void 0&&(z.cache=!1),z.crossDomain&&(z.type="GET")}),l.ajaxTransport("script",function(z){if(z.crossDomain||z.scriptAttrs){var a,u;return{send:function(f,y){a=l(" - - - - - - + + + + + +