diff --git a/.github/actions/get-view/action.yml b/.github/actions/get-view/action.yml new file mode 100644 index 00000000..53427ad2 --- /dev/null +++ b/.github/actions/get-view/action.yml @@ -0,0 +1,9 @@ +name: pull view action +runs: + using: "composite" + steps: + - run: | + mkdir view && cd view && \ + wget https://github.com/metrico/qryn-view/releases/download/$TAG/dist.zip && \ + unzip -o dist.zip && rm dist.zip + shell: bash diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index 93940a96..797bd9fa 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -34,6 +34,10 @@ jobs: if: ${{ steps.checksecrets.outputs.secretspresent }} with: node-version: 18 + - name: build qryn-view + uses: ./.github/actions/get-view + env: + TAG: v3.3.2 - name: Publish to NPM if: ${{ steps.checksecrets.outputs.secretspresent }} continue-on-error: true @@ -65,6 +69,10 @@ jobs: fi env: SECRET: ${{ secrets.DOCKERHUB_TOKEN }} + - name: build qryn-view + uses: ./.github/actions/get-view + env: + TAG: v3.3.2 - name: Set up Docker QEMU if: ${{ steps.checkdocker.outputs.secretspresent }} uses: docker/setup-qemu-action@v3.0.0 @@ -136,6 +144,10 @@ jobs: fi env: SECRET: ${{ secrets.DOCKERHUB_TOKEN }} + - name: build qryn-view + uses: ./.github/actions/get-view + env: + TAG: v3.3.2 - name: Set up Docker QEMU if: ${{ steps.checkdocker.outputs.secretspresent }} uses: docker/setup-qemu-action@v3.0.0 diff --git a/.github/workflows/node-clickhouse.js.yml b/.github/workflows/node-clickhouse.js.yml index 6e272f4a..302a6710 100644 --- a/.github/workflows/node-clickhouse.js.yml +++ b/.github/workflows/node-clickhouse.js.yml @@ -41,6 +41,12 @@ jobs: with: node-version: ${{ matrix.node-version }} cache: 'npm' + - name: build qryn-view + uses: ./.github/actions/get-view + env: + TAG: v3.3.2 + - name: check if qryn-view pulled + run: pushd view && ls | grep assets && popd - run: npm install - run: npm run postinstall - run: git submodule init diff --git a/view/assets/AddOutlined-uQBKZQpc.js b/view/assets/AddOutlined-uQBKZQpc.js deleted file mode 100644 index e01a2e6a..00000000 --- a/view/assets/AddOutlined-uQBKZQpc.js +++ /dev/null @@ -1 +0,0 @@ -import{k as t,d as r,j as g,D as m,i as u}from"./index-DT4hshFp.js";import{B as f}from"./DeleteOutlineOutlined-wSqFpREd.js";import{r as h}from"./createSvgIcon-CA0imTcl.js";import{j as b}from"./reactDnd-BtpxPq0t.js";const B=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.shadow,";}}.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;}}"),w=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:26px;"),y=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;"),A=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;"),j=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;}}"),E=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;}"}),O=t("div",{target:"e1m1j6jk4"})({name:"e23o9g",styles:"padding:10px"}),P=t("div",{target:"e1m1j6jk3"})("margin:10px 0px;padding-bottom:10px;border-bottom:1px solid ",({theme:e})=>e.background,";"),T=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;}}"),q=t("div",{target:"e1m1j6jk1"})("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:26px;display:flex;&:hover{background:",({theme:e,disabled:a})=>a?e.neutral: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=""+new URL("metrics_icon-BLJDMBj5.png",import.meta.url).href,n=""+new URL("logs_icon-BKEwRlc4.png",import.meta.url).href,k=""+new URL("traces_icon-BqGoDW-P.png",import.meta.url).href,_={metrics_icon:v,logs_icon:n,traces_icon:k},U=({icon:e,style:a})=>r("img",{height:"20px",className:"logo",style:a,src:_[e]||n,alt:e}),F=e=>{const{value:a,label:o,onChange:d,locked:l,type:s,placeholder:p,error:x,labelWidth:c}=e;return g(j,{children:[r(w,{width:c||null,children:o}),r(y,{className:"ds-input",disabled:l,error:x||!1,onChange:d,type:s,value:m.sanitize(a),placeholder:p})]})},G=e=>a=>{a({type:"SET_DATA_SOURCES",dataSources:e})};var i={},S=u;Object.defineProperty(i,"__esModule",{value:!0});var D=i.default=void 0,N=S(h()),C=b;D=i.default=(0,N.default)((0,C.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"AddOutlined");export{M as D,F,j as I,w as L,B as P,T as S,A as T,E as a,P as b,O as c,D as d,U as e,q as f,G as s}; diff --git a/view/assets/App-CfSzliXK.js b/view/assets/App-CfSzliXK.js deleted file mode 100644 index bbb2afbc..00000000 --- a/view/assets/App-CfSzliXK.js +++ /dev/null @@ -1 +0,0 @@ -import{s as O,a as K,u as Q,c as Y,b as J,i as b,l as X,j as p,d as i,e as A,f as R,F as T,g as H,h as E,N as Z}from"./index-DT4hshFp.js";import{g as ee,d as te,M as v,s as re,a as I,n as P,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-CMlAJimI.js";import{r as x,R as pe}from"./react-B8DbRJ_3.js";import{r as S}from"./createSvgIcon-CA0imTcl.js";import{j as g}from"./reactDnd-BtpxPq0t.js";import{a as h,d as ue,m as V,q as N,u as y,L as $,O as he}from"./vendor-BVYYq__d.js";import"./reactSelect-FVq3QTPV.js";import"./memoize-CbKs8VX_.js";import"./PluginManagerFactory-BjqaVgvn.js";import"./DeleteOutlineOutlined-wSqFpREd.js";const ge=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],fe=e=>{const{absolute:t,children:r,classes:o,flexItem:l,light:s,orientation:d,textAlign:c,variant:a}=e;return J({root:["root",t&&"absolute",a,s&&"light",d==="vertical"&&"vertical",l&&"flexItem",r&&"withChildren",r&&d==="vertical"&&"withChildrenVertical",c==="right"&&d!=="vertical"&&"textAlignRight",c==="left"&&d!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",d==="vertical"&&"wrapperVertical"]},ee,o)},me=O("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})=>h({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})=>h({},e.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,"&::before, &::after":{content:'""',alignSelf:"center"}}),({theme:e,ownerState:t})=>h({},t.children&&t.orientation!=="vertical"&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`}}),({theme:e,ownerState:t})=>h({},t.children&&t.orientation==="vertical"&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`}}),({ownerState:e})=>h({},e.textAlign==="right"&&e.orientation!=="vertical"&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},e.textAlign==="left"&&e.orientation!=="vertical"&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),ve=O("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.wrapper,r.orientation==="vertical"&&t.wrapperVertical]}})(({theme:e,ownerState:t})=>h({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)`})),C=x.forwardRef(function(t,r){const o=Q({props:t,name:"MuiDivider"}),{absolute:l=!1,children:s,className:d,component:c=s?"div":"hr",flexItem:a=!1,light:f=!1,orientation:m="horizontal",role:u=c!=="hr"?"separator":void 0,textAlign:_="center",variant:n="fullWidth"}=o,G=ue(o,ge),w=h({},o,{absolute:l,component:c,flexItem:a,light:f,orientation:m,role:u,textAlign:_,variant:n}),z=fe(w);return g.jsx(me,h({as:c,className:Y(z.root,d),role:u,ref:r,ownerState:w},G,{children:s?g.jsx(ve,{className:z.wrapper,ownerState:w,children:s}):null}))});C.muiSkipListHighlight=!0;var M={},xe=b;Object.defineProperty(M,"__esModule",{value:!0});var B=M.default=void 0,be=xe(S()),Se=g;B=M.default=(0,be.default)((0,Se.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.4zm-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.5M12 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 8"}),"TravelExplore");var D={},$e=b;Object.defineProperty(D,"__esModule",{value:!0});var U=D.default=void 0,_e=$e(S()),we=g;U=D.default=(0,_e.default)((0,we.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 11"}),"Extension");var k={},ye=b;Object.defineProperty(k,"__esModule",{value:!0});var q=k.default=void 0,Ce=ye(S()),Re=g;q=k.default=(0,Ce.default)((0,Re.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-4m0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4"}),"PersonOutlineOutlined");var j={},Ne=b;Object.defineProperty(j,"__esModule",{value:!0});var W=j.default=void 0,Me=Ne(S()),De=g;W=j.default=(0,Me.default)((0,De.jsx)("path",{d:"M2 20h20v-4H2zm2-3h2v2H4zM2 4v4h20V4zm4 3H4V5h2zm-4 7h20v-4H2zm2-3h2v2H4z"}),"Storage");function ke(e){const{c:t}=e,r=V(),o=X(),{hash:l}=N(),s="Link Copied To Clipboard";function d(){r(re(!0)),setTimeout(()=>{var c;if(navigator!=null&&navigator.clipboard&&window.isSecureContext)(c=navigator==null?void 0:navigator.clipboard)==null||c.writeText(window.location.href).then(function(){const a=o.add(l,{data:{href:window.location.href},description:"From Shared URL"},10);r(I(a)),r(A({type:P.success,message:s}))},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((f,m)=>{const u=o.add(l,{data:window.location.href,description:"From Shared URL"},10);r(I(u)),document.execCommand("copy")?f():m(),a.remove(),r(A({type:P.success,message:s}))})}},200)}return p(v,{onClick:d,disabled:!1,style:{fontSize:"12px"},children:[" ",i(te,{fontSize:"small",className:t}),i("span",{children:"Copy Link"})]})}var L={},je=b;Object.defineProperty(L,"__esModule",{value:!0});var F=L.default=void 0,Le=je(S()),ze=g;F=L.default=(0,Le.default)((0,ze.jsx)("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu");const Ae=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}`}}),Ie=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 Pe(){const{key:e}=N(),t=y(n=>n.showDataSourceSetting),r=y(n=>n.currentUser.role),o=V(),l=R(),[s,d]=pe.useState(null),c=x.useMemo(()=>!!s,[s]),[a,f]=x.useState(r||"superAdmin");x.useEffect(()=>{f(r)},[r]),x.useEffect(()=>{u()},[e]);const m=n=>{n.stopPropagation(),n.preventDefault(),d(()=>n.currentTarget)},u=n=>{n==null||n.stopPropagation(),n==null||n.preventDefault(),d(()=>{})},_=()=>{u(),o(le(!0))};return p(T,{children:[i(ae,{sx:{display:"flex",alignItems:"center",textAlign:"center"},children:i(ie,{title:"Settings",children:i("button",{onClick:m,style:Ie(l),"aria-controls":c?"account-menu":void 0,"aria-haspopup":"true","aria-expanded":c?"true":void 0,children:i(F,{style:{width:"14px",height:"14px"}})})})}),p(oe,{id:"account-menu",anchorEl:s,open:c,onClose:u,onClick:m,PaperProps:{elevation:0,sx:Ae(l)},TransitionComponent:ne,transformOrigin:{horizontal:"right",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},children:[i(ke,{c:"icon"}),i(C,{}),p(v,{onClick:_,className:"item",children:[i(se,{className:"icon"})," General Settings"]}),i(C,{}),i($,{to:"",children:p(v,{className:"item",children:[i(B,{className:"icon"}),"Search"]})}),i($,{to:"/plugins",children:p(v,{className:"item",children:[i(U,{className:"icon"}),"Plugins"]})}),i($,{to:"/users",children:p(v,{className:"item",children:[i(q,{className:"icon"}),"Users"]})}),t&&(a==="admin"||a==="superAdmin")&&i($,{to:"datasources",children:p(v,{className:"item",children:[i(W,{className:"icon"}),"Datasources"]})})]})]})}const Oe=""+new URL("qryn-logo-Ch2-Iq6y.png",import.meta.url).href,Te=()=>{const r=N().pathname.split("/").map((o,l)=>o===""&&l===0?{name:"home",link:""}:{name:`/${o}`,link:o});return i(T,{children:r.map(({name:o,link:l},s)=>i("a",{href:l,className:"bread-link",children:o},s))})},He=e=>E("background:",e.shadow,";height:30px;padding:4px;display:flex;align-items:center;border-bottom:1px solid ",e.accentNeutral,";.logo-section{padding-top:4px;margin:0;.version{color:",e.contrast,";font-size:10px;margin-left:5px;margin-top:4px;}.path{color:",e.contrast,";margin-top:4px;margin-left:20px;flex:1;font-weight:bold;text-transform:uppercase;font-size:10px;letter-spacing:1px;.bread-link{cursor:pointer;&:hover{color:",e.primary,";}}}}",""),Ee=()=>{const e=R();return p("div",{className:H(He(e)),children:[p("div",{className:"logo-section",children:[i("img",{src:Oe,style:{height:"20px"},alt:"Qryn View",height:"20px",className:"logo"}),i("p",{className:"version",children:"3.1.0"}),i("p",{className:"path",children:i(Te,{})})]}),i(ce,{section:"Status Bar",localProps:e}),i(Pe,{})]})},Ve=Ee,Be=e=>E("background:",e.background,";display:flex;flex-direction:column;height:100vh;flex:1;","");function Ze(){const e=R(),t=y(r=>r.settingsDialogOpen);return p("div",{className:H(Be(e)),children:[i(Ve,{}),i(he,{}),i(Z,{}),i(de,{open:t})]})}export{Be as MainAppStyles,Ze as default}; diff --git a/view/assets/DataSources-DlyxrvND.js b/view/assets/DataSources-DlyxrvND.js deleted file mode 100644 index 9ab5b9cb..00000000 --- a/view/assets/DataSources-DlyxrvND.js +++ /dev/null @@ -1 +0,0 @@ -var Mt=Object.defineProperty;var Pt=(n,e,t)=>e in n?Mt(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var B=(n,e,t)=>Pt(n,typeof e!="symbol"?e+"":e,t);import{d as u,j as S,g as F,D as j,h as G,i as at,F as Pe,f as $e,Q as $t,k as Vt,e as Ut}from"./index-DT4hshFp.js";import{r as D}from"./react-B8DbRJ_3.js";import{m as ee,u as U,n as vt,s as Jt,L as Bt,v as Ft,w as qt,x as Ht,p as Wt,R as Yt}from"./vendor-BVYYq__d.js";import{D as Gt,L as Ge,I as Qe,d as Qt,S as Xt,a as le,F as H,s as $,b as Kt,c as it,T as en,e as yt,f as tn,P as nn}from"./AddOutlined-uQBKZQpc.js";import{d as _t,s as sn}from"./DeleteOutlineOutlined-wSqFpREd.js";import{S as Ue,r as ot}from"./createSvgIcon-CA0imTcl.js";import{j as ct}from"./reactDnd-BtpxPq0t.js";import{d as xt}from"./reactSelect-FVq3QTPV.js";import"./memoize-CbKs8VX_.js";const Se=n=>{const{value:e,onClick:t,primary:s,title:r,disabled:a}=n;return u(Gt,{disabled:a,title:r,onClick:t,primary:s,children:e})},rn=n=>G("display:flex;flex:",n?1:0,";",""),kt=({value:n,locked:e,onChange:t,opts:s,label:r,labelWidth:a,name:i,fullWidth:o,width:d})=>{const[c,h]=D.useState(""),E=D.useRef(null),R=D.useMemo(()=>typeof s[0]=="string"?s.map(y=>({value:y,name:y})):s,[s]);return D.useEffect(()=>{var I,f;const y=(I=R==null?void 0:R.find(v=>v.name===n))==null?void 0:I.value;y&&((f=E==null?void 0:E.current)==null?void 0:f.value)!==y&&(h(y),E.current.value=y)},[n]),S(Qe,{width:d,children:[(r==null?void 0:r.length)>0&&u(Ge,{width:a||null,children:r}),u("select",{ref:E,className:F(rn(o)),disabled:e,defaultValue:j.sanitize(c),onChange:y=>t(y,i),children:R==null?void 0:R.map((y,I)=>u("option",{value:j.sanitize(y.value),children:y.name},I))})]})},bt=n=>{const{value:e,onChange:t,locked:s,label:r}=n;return S(Qe,{children:[u(Ge,{children:r}),u(Ue,{disabled:s,size:"small",checked:e,onChange:t})]})};var dt={},an=at;Object.defineProperty(dt,"__esModule",{value:!0});var wt=dt.default=void 0,on=an(ot()),cn=ct;wt=dt.default=(0,on.default)((0,cn.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-8h3zM6 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-4z"}),"CachedOutlined");var lt={},dn=at;Object.defineProperty(lt,"__esModule",{value:!0});var St=lt.default=void 0,ln=dn(ot()),un=ct;St=lt.default=(0,ln.default)((0,un.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckCircle");const Tt=n=>e=>{e({type:"SET_IS_DATASOURCE_SAVED",isDsSaved:n})};var ut={},hn=at;Object.defineProperty(ut,"__esModule",{value:!0});var Ct=ut.default=void 0,fn=hn(ot()),pn=ct;Ct=ut.default=(0,fn.default)((0,pn.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 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"ErrorOutline");const Nt=G({name:"vtwnvy",styles:"height:12px!important;width:12px!important;color:white;margin:0px 4px"}),mn=n=>G("display:flex;align-items:center;background:",n.primary,";color:white;font-size:11px;padding:4px;border-radius:3px;margin-right:10px;cursor:pointer;span{margin-right:4px;font-weight:bold;}",""),gn=G({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;}"}),vn=G({name:"9hkg7e",styles:"display:flex;align-items:center;font-size:12px;&.loading-icon{height:14px;width:14px;}"}),yn=({setIsSaved:n})=>{const e=$e();return S("div",{className:F(mn(e)),onClick:t=>n(!1),children:[u(St,{className:F(Nt)})," ",u("span",{children:"Saved"})]})},ft=({errorText:n})=>S("div",{className:F(gn),children:[u(Ct,{className:F(Nt)})," ",u("span",{children:n})]});function Xe(n){const{onClickAdd:e,isAdd:t,title:s,isEditing:r,fieldErrors:a}=n,i=ee(),[o,d]=D.useState(!1);return D.useEffect(()=>(r&&(setTimeout(()=>{d(!0),i(Tt(!0))},800),d(!1)),d(!1),()=>{d(!1)}),[r]),S(Xt,{children:[s,S("div",{className:"edit-buttons",children:[r&&S("div",{className:vn,children:[u(wt,{style:{height:"13px",width:"13px"}})," ","Saving ..."]}),(a==null?void 0:a.protocol)&&u(ft,{errorText:"Insecure Mixed Content. Mixing HTTP and HTTPS is insecure and is not supported."}),(a==null?void 0:a.url)&&u(ft,{errorText:"Please complete API URL"}),o&&u(yn,{setIsSaved:d}),t&&u(Pe,{children:u(Qt,{fontSize:"small",style:{cursor:"pointer",display:"flex"},onClick:e})})]})]})}const _n=n=>{const e=ee(),t=U(y=>y.dataSources),[s,r]=D.useState(!1),{headers:a,id:i}=n,[o,d]=D.useState((n==null?void 0:n.cors)||!1),c=y=>{const I=y.target.checked,f=t.map(v=>(v.id===i&&(v.cors=I),v));d(()=>I),localStorage.setItem("dataSources",JSON.stringify(f)),e($(f))},h=(y,I,f)=>{r(()=>!0);const v=y.target.value,C=(t.find(A=>A.id===i).headers||[]).map(A=>(A.id===I&&(A[f]=v),A)),x=t.map(A=>(A.id===i&&(A.headers=[...C]),A));localStorage.setItem("dataSources",JSON.stringify(x)),e($(x)),setTimeout(()=>{r(()=>!1)},800)},E=y=>{y.preventDefault();const I=t==null?void 0:t.find(g=>g.id===i),f=I.headers,v=JSON.parse(JSON.stringify([...t]));if(a.length>0){const g={...f[f.length-1],id:vt()},k={...I,headers:[...I.headers,g]},C=v==null?void 0:v.map(x=>x.id===i?{...k}:x);localStorage.setItem("dataSources",JSON.stringify(C)),e($(C))}},R=(y,I)=>{const f=t==null?void 0:t.find(x=>x.id===i),g=[...a].filter(x=>x.id!==I),k={...f,headers:[...g]},C=t==null?void 0:t.map(x=>x.id===i?{...k}:x);localStorage.setItem("dataSources",JSON.stringify(C)),e($(C))};return u("div",{className:"",children:a&&S(Pe,{children:[u(Xe,{title:"Custom HTTP Headers",isEdit:!1,isAdd:!0,isEditing:s,onClickAdd:E}),S(le,{children:[u(Ge,{children:"Use CORS"})," ",u(Ue,{size:"small",checked:o,onChange:c})]}),a==null?void 0:a.map((y,I)=>u(le,{children:S(Qe,{children:[u(H,{label:"header",value:j.sanitize(y.header),onChange:f=>h(f,y.id,"header")}),u(H,{label:"value",value:j.sanitize(y.value),onChange:f=>h(f,y.id,"value")}),u(_t,{onClick:f=>R(f,y.id),style:{cursor:"pointer",marginLeft:"10px"},fontSize:"small"})]})},I))]})})};function xn(n){const e=Jt(),t=$e(),s=U(c=>c.urlLocation),r=ee(),{title:a}=n,i=U(c=>c.isDsSaved),o=D.useMemo(()=>i?"Save":"Back",[i]),d=()=>{let c=(s==null?void 0:s.length)>0;r(Tt(!1)),e((c||o==="Back")&&a!=="DataSources"?-1:"")};return S("div",{className:"ds-header",children:[u("div",{style:{display:"flex",alignItems:"center"},children:S("div",{style:{display:"flex",flexDirection:"column"},children:[S("div",{style:{display:"flex"},children:[u($t,{}),u("h1",{children:a})]}),S("p",{style:{color:t.contrast,fontSize:"10px",marginTop:"5px",marginLeft:"10px",opacity:".5"},children:["v","3.1.0"]})]})}),u(Se,{value:j.sanitize(o),onClick:d,editing:!0,primary:i})]})}const kn=n=>{const{id:e,name:t,regex:s,urlLabel:r,internalLink:a,linkType:i,locked:o,dataSourceId:d,fieldEditing:c}=n,h=ee(),E=U(g=>g.dataSources),R=D.useMemo(()=>E.map(g=>({name:g.name,value:g.id})),[E]),y=(g,k)=>{c();const C=JSON.parse(JSON.stringify(E)),J=C.find(N=>N.id===d).linkedFields.map(N=>N.id===e?{...N,[g]:k}:N);return C.map(N=>N.id===d?{...N,linkedFields:J}:N)},I=g=>{c();const k=JSON.parse(JSON.stringify(E)),A=k.find(N=>N.id===d).linkedFields.filter(N=>N.id!==e),J=k.map(N=>N.id===d?{...N,linkedFields:[...A]}:N);localStorage.setItem("dataSources",JSON.stringify(J)),h($(J))},f=(g,k)=>{c();const C=g.target.value,x=y(k,C);localStorage.setItem("dataSources",JSON.stringify(x)),h($(x))},v=(g,k)=>{c();const C=!!g.target.checked,x=y(k,C);localStorage.setItem("dataSources",JSON.stringify(x)),h($(x))};return S(Kt,{children:[S(le,{children:[u(H,{value:j.sanitize(t),label:"Name",onChange:g=>f(g,"name")}),u(H,{value:j.sanitize(s),label:"Regex",onChange:g=>f(g,"regex")}),u(H,{value:j.sanitize(r),label:"URL Label",onChange:g=>f(g,"urlLabel")}),u(_t,{onClick:I,fontSize:"small",style:{marginLeft:"10px",cursor:"pointer",display:o?"none":"inline-block"}})]}),S(le,{className:"internal",children:[u(bt,{value:a,label:"Internal Link",onChange:g=>v(g,"internalLink")}),u(kt,{label:"",value:j.sanitize(i),opts:R,selectType:"linkedField",onChange:g=>f(g,"linkID")})]})]})};class bn{constructor(){B(this,"id");B(this,"dataSource");B(this,"ds_id");B(this,"name");B(this,"regex");B(this,"query");B(this,"urlLabel");B(this,"url");B(this,"internalLink");B(this,"linkType");this.id=vt(),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:e,dataSource:t,ds_id:s,name:r,regex:a,query:i,urlLabel:o,url:d,internalLink:c,linkType:h}=this;return{id:e,dataSource:t,ds_id:s,name:r,regex:a,query:i,urlLabel:o,url:d,internalLink:c,linkType:h}}}const wn=n=>{const{linkedFields:e,name:t,id:s}=n,r=U(h=>h.dataSources),a=ee(),[i,o]=D.useState(!1),d=()=>{const h=new bn;h.dataSource=t,h.create();const R=[...JSON.parse(JSON.stringify(e)),{...h}],y=JSON.parse(JSON.stringify(r)),I=y==null?void 0:y.map(f=>f.id===s?{...f,linkedFields:R}:f);localStorage.setItem("dataSources",JSON.stringify(I)),a($(I))},c=()=>{o(()=>!0),setTimeout(()=>{o(()=>!1)},800)};return(e==null?void 0:e.length)>0?S(Pe,{children:[u(Xe,{title:"Linked Fields",isEdit:!0,isAdd:!0,onClickAdd:d,isEditing:i}),u(it,{children:e==null?void 0:e.map((h,E)=>u(kn,{...h,dataSourceId:s,locked:!1,fieldEditing:c},E))})]}):null};function Sn(n){const{value:e,label:t,onChange:s,placeholder:r}=n;return S(Qe,{children:[u(Ge,{children:t}),u(en,{className:"ds-input",onChange:s,placeholder:r,value:j.sanitize(e)})]})}function Tn(n){const{auth:e,id:t}=n,s=ee(),r=U(f=>f.dataSources),[a,i]=D.useState([]),[o,d]=D.useState(!1),c=D.useMemo(()=>{var f;return(f=Object.entries(e))==null?void 0:f.map(([v,g])=>({name:v,...g})).filter(v=>v.name!=="fields")},[e]),h=D.useMemo(()=>{var f;return(f=Object.entries(e))==null?void 0:f.map(([v,g])=>({name:v,...g})).find(v=>v.name==="fields")},[e]),E=(f,v)=>{const g=JSON.parse(JSON.stringify(e));g[v].value=f;const C=JSON.parse(JSON.stringify(r)).map(x=>x.id===t?{...x,auth:{...g}}:x);return localStorage.setItem("dataSources",JSON.stringify(C)),s($(C)),C};D.useEffect(()=>{var v,g;const f=(g=(v=c.filter(k=>k.form_type==="switch"&&!!(k!=null&&k.value)))==null?void 0:v.filter(k=>!!k.withFields))==null?void 0:g.map(k=>k.name);i(f)},[c,i]);const R=(f,v)=>{d(()=>!0);const g=f.target.value;E(g,v),setTimeout(()=>{d(()=>!1)},800)},y=(f,v)=>{d(()=>!0);const g=f.target.checked;E(g,v),setTimeout(()=>{d(()=>!1)},800)},I=(f,v,g)=>{var N;d(()=>!0);const k=f.target.value,C=JSON.parse(JSON.stringify(e)),x={...C,fields:{...C.fields,[g]:(N=C==null?void 0:C.fields[g])==null?void 0:N.map(z=>z.name===v?(z.value=k,{...z}):z)}},A=JSON.parse(JSON.stringify([...r])),J=A==null?void 0:A.map(z=>(z.id===t&&(z.auth=x),z));localStorage.setItem("dataSources",JSON.stringify(J)),s($(J)),setTimeout(()=>{d(()=>!1)},600)};return S(Pe,{children:[u(Xe,{title:"HTTP Auth Fields",isEditing:o,isEdit:!1,isAdd:!1}),S(it,{children:[c&&c.map((f,v)=>f.form_type==="select"?u(kt,{value:j.sanitize(f.value),name:j.sanitize(f.name),onChange:g=>R(g,f.name),locked:!1,opts:f.options,label:f.label},v):f.form_type==="switch"?u(bt,{label:f.label,value:f.value,onChange:g=>y(g,f.name)},v):null),u(le,{children:a&&a.map((f,v)=>{var g;return u(le,{children:h[f]&&((g=h[f])==null?void 0:g.map((k,C)=>k.form_type==="input"||k.form_type==="password"?u(H,{onChange:x=>I(x,k.name,f),type:k.form_type,value:j.sanitize(k.value),label:k.label,placeholder:k.placeholder},C):k.form_type==="textarea"?u(Sn,{onChange:x=>I(x,k.name,f),value:j.sanitize(k.value),label:k.label,placeholder:k.placeholder},C):null))},v)})})]})]})}const Cn=Vt("div",{target:"emiacor0"})("position:absolute;left:0;top:0;background:",({theme:n})=>n.background,";display:flex;flex-direction:culumn;justify-content:center;color:",({theme:n})=>n.contrast,";flex:1;height:100%;width:100%;.body-cont{max-width:1440px;padding:10px;margin:10px;border-radius:3px;flex:1;background:",({theme:n})=>n.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:n})=>n.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:n})=>n.contrast,";}small{font-size:12px;}.setting-icon{justify-self:flex-end;cursor:pointer;}.ds-settings{background:",({theme:n})=>n.shadow,";}}");function Nn(){const n=U(({dataSources:e})=>e);return(n==null?void 0:n.length)>0?u("div",{style:{margin:"10px"},children:n.map((e,t)=>{const{icon:s,id:r,name:a,type:i,url:o}=e;return u("div",{className:"ds-cont",children:u(Bt,{to:r,children:S("div",{className:"ds-item",children:[u(yt,{icon:s}),S("div",{className:"ds-text",children:[u("div",{className:"ds-type",children:a}),S("span",{children:[S("small",{children:[i," | "," "]}),u("small",{style:{userSelect:"all"},children:o})]})]})]})})},t)})}):u("div",{children:u("h1",{children:"No Data Sources Found."})})}const On=n=>{const{headers:e,id:t,linkedFields:s,name:r,url:a,cors:i}=n,o=ee(),d=U(({dataSources:v})=>v),[c,h]=D.useState({url:!1,protocol:!1}),E=(v,g)=>{let k=g;const C=JSON.parse(JSON.stringify(d));return C.forEach(x=>{x.id===t&&(x[v]=k)}),C},[R,y]=D.useState(!1),I=v=>{try{const g=window.location.protocol,k=new URL(v).protocol;return{value:g===k,error:""}}catch{return{value:!1,error:"url"}}},f=(v,g)=>{y(()=>!0);const k=v.target.value;if(g==="url"){const x=I(k);if((x==null?void 0:x.error)==="url"&&h(A=>({...A,url:!0})),!(x!=null&&x.value)&&(x==null?void 0:x.error)===""&&h(A=>({...A,protocol:!0})),(x==null?void 0:x.error)===""&&(x!=null&&x.value)){h(J=>({...J,protocol:!1,url:!1}));const A=E(g,k);localStorage.setItem("dataSources",JSON.stringify(A)),o($(A)),setTimeout(()=>{y(()=>!1)},800)}}const C=E(g,k);localStorage.setItem("dataSources",JSON.stringify(C)),o($(C)),setTimeout(()=>{y(()=>!1)},800)};return S(tn,{children:[u(Xe,{isEditing:R,isEdit:!0,isAdd:!1,title:"DataSource Settings",fieldErrors:c}),u(it,{children:S(le,{children:[u(H,{value:j.sanitize(r),label:"Name",onChange:v=>f(v,"name")}),u(H,{value:j.sanitize(a),label:"URL",error:c.url||c.protocol,onChange:v=>f(v,"url")})]})}),u(Tn,{...n}),u(_n,{cors:i,headers:e,id:t}),u(wn,{...n,linkedFields:s})]})},En=G({name:"9rq8lq",styles:"display:flex;align-items:center;justify-content:space-between;margin-right:20px"});function In(n,e,t){let s={},r=t&&t!==""&&e&&e!=="",a=r?`${btoa(e)}:${btoa(t)}`:"",i=JSON.parse(JSON.stringify(n));return r&&a&&(s.auth=a),s.url=i,JSON.stringify(s)}function Zn(n){const{url:e,auth:{basicAuth:t,fields:{basicAuth:[s,r]}}}=n,[a,i]=qt(["qryn-dev-cookie","qryn-settings"]),o=ee(),d=U(R=>R.dataSources),c=()=>{const R=[...d],y=JSON.parse(JSON.stringify(R)),I=y==null?void 0:y.map(f=>({...f,url:j.sanitize(e),auth:{...f.auth,basicAuth:{...f.auth.basicAuth,value:t.value},fields:{...f.auth.fields,basicAuth:[...f.auth.fields.basicAuth].map(v=>v.name==="user"?{...v,value:j.sanitize(s.value)}:v.name==="password"?{...v,value:j.sanitize(r.value)}:v)}}}));localStorage.setItem("dataSources",JSON.stringify(I)),o($(I)),o(Ut({type:"success",message:"Set same URL and Basic Auth for All Data Sources"}))};function h(){const R=new Date;new Date().setDate(R.getDate()+1);try{i("qryn-settings",In(e,s.value,r.value),{path:""})}catch(I){console.log(I)}}function E(){const{headers:R,id:y,name:I,linkedFields:f}=n,v=R==null?void 0:R.map(({header:x,value:A})=>({[x]:A})),k=`data:text/json;chatset=utf-8,${encodeURIComponent(JSON.stringify({id:y,name:I,headers:v,linkedFields:f}))}`,C=document.createElement("a");C.href=k,C.download=`${I}_${y}.json`,C.click()}return S("div",{className:"ds-cont",children:[S("div",{className:F(En),children:[u(Rn,{...n}),S("div",{style:{display:"flex",alignItems:"center"},children:[u(Se,{title:"Download Datasource settings as JSON",value:j.sanitize("Download JSON"),onClick:E,primary:!0}),u(Se,{title:"Set Cookie with name: qryn-settings",value:j.sanitize("Save Cookie"),onClick:h,primary:!0}),u(Se,{title:"Use same URL and Basic Auth for all Data Sources",value:j.sanitize("Use For All"),onClick:c,primary:!0})]})]}),u("div",{className:"ds-settings",children:u(On,{...n})})]})}const Rn=n=>{const{icon:e,name:t,type:s,url:r}=n;return S("div",{className:"ds-item",children:[u(yt,{icon:e}),S("div",{className:"ds-text",children:[u("div",{className:"ds-type",children:t}),S("small",{children:[j.sanitize(s)," | ",j.sanitize(r)]})]})]})};function An(){let{id:n}=Ft();const e=$e(),t=U(r=>r.dataSources),s=D.useMemo(()=>!t||t.length===0?{}:t.find(r=>r.id===n)||{},[n,t]);return u(xt,{theme:e,children:u(Cn,{children:S("div",{className:"body-cont",children:[u(xn,{title:"DataSource Settings",datasource:s}),u("div",{className:"datasource-body",children:u(Zn,{...s})})]})})})}var Z;(function(n){n.assertEqual=r=>r;function e(r){}n.assertIs=e;function t(r){throw new Error}n.assertNever=t,n.arrayToEnum=r=>{const a={};for(const i of r)a[i]=i;return a},n.getValidEnumValues=r=>{const a=n.objectKeys(r).filter(o=>typeof r[r[o]]!="number"),i={};for(const o of a)i[o]=r[o];return n.objectValues(i)},n.objectValues=r=>n.objectKeys(r).map(function(a){return r[a]}),n.objectKeys=typeof Object.keys=="function"?r=>Object.keys(r):r=>{const a=[];for(const i in r)Object.prototype.hasOwnProperty.call(r,i)&&a.push(i);return a},n.find=(r,a)=>{for(const i of r)if(a(i))return i},n.isInteger=typeof Number.isInteger=="function"?r=>Number.isInteger(r):r=>typeof r=="number"&&isFinite(r)&&Math.floor(r)===r;function s(r,a=" | "){return r.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}n.joinValues=s,n.jsonStringifyReplacer=(r,a)=>typeof a=="bigint"?a.toString():a})(Z||(Z={}));var tt;(function(n){n.mergeShapes=(e,t)=>({...e,...t})})(tt||(tt={}));const m=Z.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),re=n=>{switch(typeof n){case"undefined":return m.undefined;case"string":return m.string;case"number":return isNaN(n)?m.nan:m.number;case"boolean":return m.boolean;case"function":return m.function;case"bigint":return m.bigint;case"symbol":return m.symbol;case"object":return Array.isArray(n)?m.array:n===null?m.null:n.then&&typeof n.then=="function"&&n.catch&&typeof n.catch=="function"?m.promise:typeof Map<"u"&&n instanceof Map?m.map:typeof Set<"u"&&n instanceof Set?m.set:typeof Date<"u"&&n instanceof Date?m.date:m.object;default:return m.unknown}},l=Z.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),jn=n=>JSON.stringify(n,null,2).replace(/"([^"]+)":/g,"$1:");class V extends Error{constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(a){return a.message},s={_errors:[]},r=a=>{for(const i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(r);else if(i.code==="invalid_return_type")r(i.returnTypeError);else if(i.code==="invalid_arguments")r(i.argumentsError);else if(i.path.length===0)s._errors.push(t(i));else{let o=s,d=0;for(;dt.message){const t={},s=[];for(const r of this.issues)r.path.length>0?(t[r.path[0]]=t[r.path[0]]||[],t[r.path[0]].push(e(r))):s.push(e(r));return{formErrors:s,fieldErrors:t}}get formErrors(){return this.flatten()}}V.create=n=>new V(n);const ge=(n,e)=>{let t;switch(n.code){case l.invalid_type:n.received===m.undefined?t="Required":t=`Expected ${n.expected}, received ${n.received}`;break;case l.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(n.expected,Z.jsonStringifyReplacer)}`;break;case l.unrecognized_keys:t=`Unrecognized key(s) in object: ${Z.joinValues(n.keys,", ")}`;break;case l.invalid_union:t="Invalid input";break;case l.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${Z.joinValues(n.options)}`;break;case l.invalid_enum_value:t=`Invalid enum value. Expected ${Z.joinValues(n.options)}, received '${n.received}'`;break;case l.invalid_arguments:t="Invalid function arguments";break;case l.invalid_return_type:t="Invalid function return type";break;case l.invalid_date:t="Invalid date";break;case l.invalid_string:typeof n.validation=="object"?"includes"in n.validation?(t=`Invalid input: must include "${n.validation.includes}"`,typeof n.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${n.validation.position}`)):"startsWith"in n.validation?t=`Invalid input: must start with "${n.validation.startsWith}"`:"endsWith"in n.validation?t=`Invalid input: must end with "${n.validation.endsWith}"`:Z.assertNever(n.validation):n.validation!=="regex"?t=`Invalid ${n.validation}`:t="Invalid";break;case l.too_small:n.type==="array"?t=`Array must contain ${n.exact?"exactly":n.inclusive?"at least":"more than"} ${n.minimum} element(s)`:n.type==="string"?t=`String must contain ${n.exact?"exactly":n.inclusive?"at least":"over"} ${n.minimum} character(s)`:n.type==="number"?t=`Number must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${n.minimum}`:n.type==="date"?t=`Date must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(n.minimum))}`:t="Invalid input";break;case l.too_big:n.type==="array"?t=`Array must contain ${n.exact?"exactly":n.inclusive?"at most":"less than"} ${n.maximum} element(s)`:n.type==="string"?t=`String must contain ${n.exact?"exactly":n.inclusive?"at most":"under"} ${n.maximum} character(s)`:n.type==="number"?t=`Number must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="bigint"?t=`BigInt must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="date"?t=`Date must be ${n.exact?"exactly":n.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(n.maximum))}`:t="Invalid input";break;case l.custom:t="Invalid input";break;case l.invalid_intersection_types:t="Intersection results could not be merged";break;case l.not_multiple_of:t=`Number must be a multiple of ${n.multipleOf}`;break;case l.not_finite:t="Number must be finite";break;default:t=e.defaultError,Z.assertNever(n)}return{message:t}};let Ot=ge;function Dn(n){Ot=n}function Je(){return Ot}const Be=n=>{const{data:e,path:t,errorMaps:s,issueData:r}=n,a=[...t,...r.path||[]],i={...r,path:a};if(r.message!==void 0)return{...r,path:a,message:r.message};let o="";const d=s.filter(c=>!!c).slice().reverse();for(const c of d)o=c(i,{data:e,defaultError:o}).message;return{...r,path:a,message:o}},Ln=[];function p(n,e){const t=Je(),s=Be({issueData:e,data:n.data,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,t,t===ge?void 0:ge].filter(r=>!!r)});n.common.issues.push(s)}class M{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const s=[];for(const r of t){if(r.status==="aborted")return w;r.status==="dirty"&&e.dirty(),s.push(r.value)}return{status:e.value,value:s}}static async mergeObjectAsync(e,t){const s=[];for(const r of t){const a=await r.key,i=await r.value;s.push({key:a,value:i})}return M.mergeObjectSync(e,s)}static mergeObjectSync(e,t){const s={};for(const r of t){const{key:a,value:i}=r;if(a.status==="aborted"||i.status==="aborted")return w;a.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||r.alwaysSet)&&(s[a.value]=i.value)}return{status:e.value,value:s}}}const w=Object.freeze({status:"aborted"}),pe=n=>({status:"dirty",value:n}),P=n=>({status:"valid",value:n}),nt=n=>n.status==="aborted",st=n=>n.status==="dirty",Te=n=>n.status==="valid",Ce=n=>typeof Promise<"u"&&n instanceof Promise;function Fe(n,e,t,s){if(typeof e=="function"?n!==e||!s:!e.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(n)}function Et(n,e,t,s,r){if(typeof e=="function"?n!==e||!r:!e.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(n,t),t}var _;(function(n){n.errToObj=e=>typeof e=="string"?{message:e}:e||{},n.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(_||(_={}));var be,we;class X{constructor(e,t,s,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=s,this._key=r}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const pt=(n,e)=>{if(Te(e))return{success:!0,data:e.value};if(!n.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new V(n.common.issues);return this._error=t,this._error}}};function T(n){if(!n)return{};const{errorMap:e,invalid_type_error:t,required_error:s,description:r}=n;if(e&&(t||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:r}:{errorMap:(i,o)=>{var d,c;const{message:h}=n;return i.code==="invalid_enum_value"?{message:h??o.defaultError}:typeof o.data>"u"?{message:(d=h??s)!==null&&d!==void 0?d:o.defaultError}:i.code!=="invalid_type"?{message:o.defaultError}:{message:(c=h??t)!==null&&c!==void 0?c:o.defaultError}},description:r}}class O{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return re(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:re(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new M,ctx:{common:e.parent.common,data:e.data,parsedType:re(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(Ce(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const s=this.safeParse(e,t);if(s.success)return s.data;throw s.error}safeParse(e,t){var s;const r={common:{issues:[],async:(s=t==null?void 0:t.async)!==null&&s!==void 0?s:!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:re(e)},a=this._parseSync({data:e,path:r.path,parent:r});return pt(r,a)}async parseAsync(e,t){const s=await this.safeParseAsync(e,t);if(s.success)return s.data;throw s.error}async safeParseAsync(e,t){const s={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:re(e)},r=this._parse({data:e,path:s.path,parent:s}),a=await(Ce(r)?r:Promise.resolve(r));return pt(s,a)}refine(e,t){const s=r=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(r):t;return this._refinement((r,a)=>{const i=e(r),o=()=>a.addIssue({code:l.custom,...s(r)});return typeof Promise<"u"&&i instanceof Promise?i.then(d=>d?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,t){return this._refinement((s,r)=>e(s)?!0:(r.addIssue(typeof t=="function"?t(s,r):t),!1))}_refinement(e){return new Y({schema:this,typeName:b.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Q.create(this,this._def)}nullable(){return ce.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return W.create(this,this._def)}promise(){return ye.create(this,this._def)}or(e){return Ie.create([this,e],this._def)}and(e){return Ze.create(this,e,this._def)}transform(e){return new Y({...T(this._def),schema:this,typeName:b.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new Le({...T(this._def),innerType:this,defaultValue:t,typeName:b.ZodDefault})}brand(){return new ht({typeName:b.ZodBranded,type:this,...T(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new ze({...T(this._def),innerType:this,catchValue:t,typeName:b.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return Ve.create(this,e)}readonly(){return Me.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const zn=/^c[^\s-]{8,}$/i,Mn=/^[0-9a-z]+$/,Pn=/^[0-9A-HJKMNP-TV-Z]{26}$/,$n=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Vn=/^[a-z0-9_-]{21}$/i,Un=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Jn=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Bn="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let et;const Fn=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,qn=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Hn=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,It="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Wn=new RegExp(`^${It}$`);function Zt(n){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return n.precision?e=`${e}\\.\\d{${n.precision}}`:n.precision==null&&(e=`${e}(\\.\\d+)?`),e}function Yn(n){return new RegExp(`^${Zt(n)}$`)}function Rt(n){let e=`${It}T${Zt(n)}`;const t=[];return t.push(n.local?"Z?":"Z"),n.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function Gn(n,e){return!!((e==="v4"||!e)&&Fn.test(n)||(e==="v6"||!e)&&qn.test(n))}class q extends O{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==m.string){const a=this._getOrReturnCtx(e);return p(a,{code:l.invalid_type,expected:m.string,received:a.parsedType}),w}const s=new M;let r;for(const a of this._def.checks)if(a.kind==="min")e.data.lengtha.value&&(r=this._getOrReturnCtx(e,r),p(r,{code:l.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if(a.kind==="length"){const i=e.data.length>a.value,o=e.data.lengthe.test(r),{validation:t,code:l.invalid_string,..._.errToObj(s)})}_addCheck(e){return new q({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",..._.errToObj(e)})}url(e){return this._addCheck({kind:"url",..._.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",..._.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",..._.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",..._.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",..._.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",..._.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",..._.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",..._.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",..._.errToObj(e)})}datetime(e){var t,s;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(t=e==null?void 0:e.offset)!==null&&t!==void 0?t:!1,local:(s=e==null?void 0:e.local)!==null&&s!==void 0?s:!1,..._.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,..._.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",..._.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,..._.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,..._.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,..._.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,..._.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,..._.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,..._.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,..._.errToObj(t)})}nonempty(e){return this.min(1,_.errToObj(e))}trim(){return new q({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new q({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new q({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value{var e;return new q({checks:[],typeName:b.ZodString,coerce:(e=n==null?void 0:n.coerce)!==null&&e!==void 0?e:!1,...T(n)})};function Qn(n,e){const t=(n.toString().split(".")[1]||"").length,s=(e.toString().split(".")[1]||"").length,r=t>s?t:s,a=parseInt(n.toFixed(r).replace(".","")),i=parseInt(e.toFixed(r).replace(".",""));return a%i/Math.pow(10,r)}class ae extends O{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==m.number){const a=this._getOrReturnCtx(e);return p(a,{code:l.invalid_type,expected:m.number,received:a.parsedType}),w}let s;const r=new M;for(const a of this._def.checks)a.kind==="int"?Z.isInteger(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{code:l.invalid_type,expected:"integer",received:"float",message:a.message}),r.dirty()):a.kind==="min"?(a.inclusive?e.dataa.value:e.data>=a.value)&&(s=this._getOrReturnCtx(e,s),p(s,{code:l.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),r.dirty()):a.kind==="multipleOf"?Qn(e.data,a.value)!==0&&(s=this._getOrReturnCtx(e,s),p(s,{code:l.not_multiple_of,multipleOf:a.value,message:a.message}),r.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{code:l.not_finite,message:a.message}),r.dirty()):Z.assertNever(a);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,_.toString(t))}gt(e,t){return this.setLimit("min",e,!1,_.toString(t))}lte(e,t){return this.setLimit("max",e,!0,_.toString(t))}lt(e,t){return this.setLimit("max",e,!1,_.toString(t))}setLimit(e,t,s,r){return new ae({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:_.toString(r)}]})}_addCheck(e){return new ae({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:_.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:_.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:_.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:_.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:_.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:_.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:_.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:_.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:_.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuee.kind==="int"||e.kind==="multipleOf"&&Z.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(t===null||s.value>t)&&(t=s.value):s.kind==="max"&&(e===null||s.valuenew ae({checks:[],typeName:b.ZodNumber,coerce:(n==null?void 0:n.coerce)||!1,...T(n)});class ie extends O{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==m.bigint){const a=this._getOrReturnCtx(e);return p(a,{code:l.invalid_type,expected:m.bigint,received:a.parsedType}),w}let s;const r=new M;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?e.dataa.value:e.data>=a.value)&&(s=this._getOrReturnCtx(e,s),p(s,{code:l.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),r.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(s=this._getOrReturnCtx(e,s),p(s,{code:l.not_multiple_of,multipleOf:a.value,message:a.message}),r.dirty()):Z.assertNever(a);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,_.toString(t))}gt(e,t){return this.setLimit("min",e,!1,_.toString(t))}lte(e,t){return this.setLimit("max",e,!0,_.toString(t))}lt(e,t){return this.setLimit("max",e,!1,_.toString(t))}setLimit(e,t,s,r){return new ie({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:_.toString(r)}]})}_addCheck(e){return new ie({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:_.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:_.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:_.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:_.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:_.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value{var e;return new ie({checks:[],typeName:b.ZodBigInt,coerce:(e=n==null?void 0:n.coerce)!==null&&e!==void 0?e:!1,...T(n)})};class Ne extends O{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==m.boolean){const s=this._getOrReturnCtx(e);return p(s,{code:l.invalid_type,expected:m.boolean,received:s.parsedType}),w}return P(e.data)}}Ne.create=n=>new Ne({typeName:b.ZodBoolean,coerce:(n==null?void 0:n.coerce)||!1,...T(n)});class ue extends O{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==m.date){const a=this._getOrReturnCtx(e);return p(a,{code:l.invalid_type,expected:m.date,received:a.parsedType}),w}if(isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return p(a,{code:l.invalid_date}),w}const s=new M;let r;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()a.value&&(r=this._getOrReturnCtx(e,r),p(r,{code:l.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),s.dirty()):Z.assertNever(a);return{status:s.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ue({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:_.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:_.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew ue({checks:[],coerce:(n==null?void 0:n.coerce)||!1,typeName:b.ZodDate,...T(n)});class qe extends O{_parse(e){if(this._getType(e)!==m.symbol){const s=this._getOrReturnCtx(e);return p(s,{code:l.invalid_type,expected:m.symbol,received:s.parsedType}),w}return P(e.data)}}qe.create=n=>new qe({typeName:b.ZodSymbol,...T(n)});class Oe extends O{_parse(e){if(this._getType(e)!==m.undefined){const s=this._getOrReturnCtx(e);return p(s,{code:l.invalid_type,expected:m.undefined,received:s.parsedType}),w}return P(e.data)}}Oe.create=n=>new Oe({typeName:b.ZodUndefined,...T(n)});class Ee extends O{_parse(e){if(this._getType(e)!==m.null){const s=this._getOrReturnCtx(e);return p(s,{code:l.invalid_type,expected:m.null,received:s.parsedType}),w}return P(e.data)}}Ee.create=n=>new Ee({typeName:b.ZodNull,...T(n)});class ve extends O{constructor(){super(...arguments),this._any=!0}_parse(e){return P(e.data)}}ve.create=n=>new ve({typeName:b.ZodAny,...T(n)});class de extends O{constructor(){super(...arguments),this._unknown=!0}_parse(e){return P(e.data)}}de.create=n=>new de({typeName:b.ZodUnknown,...T(n)});class ne extends O{_parse(e){const t=this._getOrReturnCtx(e);return p(t,{code:l.invalid_type,expected:m.never,received:t.parsedType}),w}}ne.create=n=>new ne({typeName:b.ZodNever,...T(n)});class He extends O{_parse(e){if(this._getType(e)!==m.undefined){const s=this._getOrReturnCtx(e);return p(s,{code:l.invalid_type,expected:m.void,received:s.parsedType}),w}return P(e.data)}}He.create=n=>new He({typeName:b.ZodVoid,...T(n)});class W extends O{_parse(e){const{ctx:t,status:s}=this._processInputParams(e),r=this._def;if(t.parsedType!==m.array)return p(t,{code:l.invalid_type,expected:m.array,received:t.parsedType}),w;if(r.exactLength!==null){const i=t.data.length>r.exactLength.value,o=t.data.lengthr.maxLength.value&&(p(t,{code:l.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),s.dirty()),t.common.async)return Promise.all([...t.data].map((i,o)=>r.type._parseAsync(new X(t,i,t.path,o)))).then(i=>M.mergeArray(s,i));const a=[...t.data].map((i,o)=>r.type._parseSync(new X(t,i,t.path,o)));return M.mergeArray(s,a)}get element(){return this._def.type}min(e,t){return new W({...this._def,minLength:{value:e,message:_.toString(t)}})}max(e,t){return new W({...this._def,maxLength:{value:e,message:_.toString(t)}})}length(e,t){return new W({...this._def,exactLength:{value:e,message:_.toString(t)}})}nonempty(e){return this.min(1,e)}}W.create=(n,e)=>new W({type:n,minLength:null,maxLength:null,exactLength:null,typeName:b.ZodArray,...T(e)});function fe(n){if(n instanceof L){const e={};for(const t in n.shape){const s=n.shape[t];e[t]=Q.create(fe(s))}return new L({...n._def,shape:()=>e})}else return n instanceof W?new W({...n._def,type:fe(n.element)}):n instanceof Q?Q.create(fe(n.unwrap())):n instanceof ce?ce.create(fe(n.unwrap())):n instanceof K?K.create(n.items.map(e=>fe(e))):n}class L extends O{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=Z.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==m.object){const c=this._getOrReturnCtx(e);return p(c,{code:l.invalid_type,expected:m.object,received:c.parsedType}),w}const{status:s,ctx:r}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof ne&&this._def.unknownKeys==="strip"))for(const c in r.data)i.includes(c)||o.push(c);const d=[];for(const c of i){const h=a[c],E=r.data[c];d.push({key:{status:"valid",value:c},value:h._parse(new X(r,E,r.path,c)),alwaysSet:c in r.data})}if(this._def.catchall instanceof ne){const c=this._def.unknownKeys;if(c==="passthrough")for(const h of o)d.push({key:{status:"valid",value:h},value:{status:"valid",value:r.data[h]}});else if(c==="strict")o.length>0&&(p(r,{code:l.unrecognized_keys,keys:o}),s.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const h of o){const E=r.data[h];d.push({key:{status:"valid",value:h},value:c._parse(new X(r,E,r.path,h)),alwaysSet:h in r.data})}}return r.common.async?Promise.resolve().then(async()=>{const c=[];for(const h of d){const E=await h.key,R=await h.value;c.push({key:E,value:R,alwaysSet:h.alwaysSet})}return c}).then(c=>M.mergeObjectSync(s,c)):M.mergeObjectSync(s,d)}get shape(){return this._def.shape()}strict(e){return _.errToObj,new L({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,s)=>{var r,a,i,o;const d=(i=(a=(r=this._def).errorMap)===null||a===void 0?void 0:a.call(r,t,s).message)!==null&&i!==void 0?i:s.defaultError;return t.code==="unrecognized_keys"?{message:(o=_.errToObj(e).message)!==null&&o!==void 0?o:d}:{message:d}}}:{}})}strip(){return new L({...this._def,unknownKeys:"strip"})}passthrough(){return new L({...this._def,unknownKeys:"passthrough"})}extend(e){return new L({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new L({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:b.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new L({...this._def,catchall:e})}pick(e){const t={};return Z.objectKeys(e).forEach(s=>{e[s]&&this.shape[s]&&(t[s]=this.shape[s])}),new L({...this._def,shape:()=>t})}omit(e){const t={};return Z.objectKeys(this.shape).forEach(s=>{e[s]||(t[s]=this.shape[s])}),new L({...this._def,shape:()=>t})}deepPartial(){return fe(this)}partial(e){const t={};return Z.objectKeys(this.shape).forEach(s=>{const r=this.shape[s];e&&!e[s]?t[s]=r:t[s]=r.optional()}),new L({...this._def,shape:()=>t})}required(e){const t={};return Z.objectKeys(this.shape).forEach(s=>{if(e&&!e[s])t[s]=this.shape[s];else{let a=this.shape[s];for(;a instanceof Q;)a=a._def.innerType;t[s]=a}}),new L({...this._def,shape:()=>t})}keyof(){return At(Z.objectKeys(this.shape))}}L.create=(n,e)=>new L({shape:()=>n,unknownKeys:"strip",catchall:ne.create(),typeName:b.ZodObject,...T(e)});L.strictCreate=(n,e)=>new L({shape:()=>n,unknownKeys:"strict",catchall:ne.create(),typeName:b.ZodObject,...T(e)});L.lazycreate=(n,e)=>new L({shape:n,unknownKeys:"strip",catchall:ne.create(),typeName:b.ZodObject,...T(e)});class Ie extends O{_parse(e){const{ctx:t}=this._processInputParams(e),s=this._def.options;function r(a){for(const o of a)if(o.result.status==="valid")return o.result;for(const o of a)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const i=a.map(o=>new V(o.ctx.common.issues));return p(t,{code:l.invalid_union,unionErrors:i}),w}if(t.common.async)return Promise.all(s.map(async a=>{const i={...t,common:{...t.common,issues:[]},parent:null};return{result:await a._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(r);{let a;const i=[];for(const d of s){const c={...t,common:{...t.common,issues:[]},parent:null},h=d._parseSync({data:t.data,path:t.path,parent:c});if(h.status==="valid")return h;h.status==="dirty"&&!a&&(a={result:h,ctx:c}),c.common.issues.length&&i.push(c.common.issues)}if(a)return t.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(d=>new V(d));return p(t,{code:l.invalid_union,unionErrors:o}),w}}get options(){return this._def.options}}Ie.create=(n,e)=>new Ie({options:n,typeName:b.ZodUnion,...T(e)});const te=n=>n instanceof Ae?te(n.schema):n instanceof Y?te(n.innerType()):n instanceof je?[n.value]:n instanceof oe?n.options:n instanceof De?Z.objectValues(n.enum):n instanceof Le?te(n._def.innerType):n instanceof Oe?[void 0]:n instanceof Ee?[null]:n instanceof Q?[void 0,...te(n.unwrap())]:n instanceof ce?[null,...te(n.unwrap())]:n instanceof ht||n instanceof Me?te(n.unwrap()):n instanceof ze?te(n._def.innerType):[];class Ke extends O{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==m.object)return p(t,{code:l.invalid_type,expected:m.object,received:t.parsedType}),w;const s=this.discriminator,r=t.data[s],a=this.optionsMap.get(r);return a?t.common.async?a._parseAsync({data:t.data,path:t.path,parent:t}):a._parseSync({data:t.data,path:t.path,parent:t}):(p(t,{code:l.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),w)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,s){const r=new Map;for(const a of t){const i=te(a.shape[e]);if(!i.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const o of i){if(r.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);r.set(o,a)}}return new Ke({typeName:b.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:r,...T(s)})}}function rt(n,e){const t=re(n),s=re(e);if(n===e)return{valid:!0,data:n};if(t===m.object&&s===m.object){const r=Z.objectKeys(e),a=Z.objectKeys(n).filter(o=>r.indexOf(o)!==-1),i={...n,...e};for(const o of a){const d=rt(n[o],e[o]);if(!d.valid)return{valid:!1};i[o]=d.data}return{valid:!0,data:i}}else if(t===m.array&&s===m.array){if(n.length!==e.length)return{valid:!1};const r=[];for(let a=0;a{if(nt(a)||nt(i))return w;const o=rt(a.value,i.value);return o.valid?((st(a)||st(i))&&t.dirty(),{status:t.value,value:o.data}):(p(s,{code:l.invalid_intersection_types}),w)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([a,i])=>r(a,i)):r(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}Ze.create=(n,e,t)=>new Ze({left:n,right:e,typeName:b.ZodIntersection,...T(t)});class K extends O{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==m.array)return p(s,{code:l.invalid_type,expected:m.array,received:s.parsedType}),w;if(s.data.lengththis._def.items.length&&(p(s,{code:l.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const a=[...s.data].map((i,o)=>{const d=this._def.items[o]||this._def.rest;return d?d._parse(new X(s,i,s.path,o)):null}).filter(i=>!!i);return s.common.async?Promise.all(a).then(i=>M.mergeArray(t,i)):M.mergeArray(t,a)}get items(){return this._def.items}rest(e){return new K({...this._def,rest:e})}}K.create=(n,e)=>{if(!Array.isArray(n))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new K({items:n,typeName:b.ZodTuple,rest:null,...T(e)})};class Re extends O{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==m.object)return p(s,{code:l.invalid_type,expected:m.object,received:s.parsedType}),w;const r=[],a=this._def.keyType,i=this._def.valueType;for(const o in s.data)r.push({key:a._parse(new X(s,o,s.path,o)),value:i._parse(new X(s,s.data[o],s.path,o)),alwaysSet:o in s.data});return s.common.async?M.mergeObjectAsync(t,r):M.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(e,t,s){return t instanceof O?new Re({keyType:e,valueType:t,typeName:b.ZodRecord,...T(s)}):new Re({keyType:q.create(),valueType:e,typeName:b.ZodRecord,...T(t)})}}class We extends O{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==m.map)return p(s,{code:l.invalid_type,expected:m.map,received:s.parsedType}),w;const r=this._def.keyType,a=this._def.valueType,i=[...s.data.entries()].map(([o,d],c)=>({key:r._parse(new X(s,o,s.path,[c,"key"])),value:a._parse(new X(s,d,s.path,[c,"value"]))}));if(s.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const d of i){const c=await d.key,h=await d.value;if(c.status==="aborted"||h.status==="aborted")return w;(c.status==="dirty"||h.status==="dirty")&&t.dirty(),o.set(c.value,h.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const d of i){const c=d.key,h=d.value;if(c.status==="aborted"||h.status==="aborted")return w;(c.status==="dirty"||h.status==="dirty")&&t.dirty(),o.set(c.value,h.value)}return{status:t.value,value:o}}}}We.create=(n,e,t)=>new We({valueType:e,keyType:n,typeName:b.ZodMap,...T(t)});class he extends O{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==m.set)return p(s,{code:l.invalid_type,expected:m.set,received:s.parsedType}),w;const r=this._def;r.minSize!==null&&s.data.sizer.maxSize.value&&(p(s,{code:l.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());const a=this._def.valueType;function i(d){const c=new Set;for(const h of d){if(h.status==="aborted")return w;h.status==="dirty"&&t.dirty(),c.add(h.value)}return{status:t.value,value:c}}const o=[...s.data.values()].map((d,c)=>a._parse(new X(s,d,s.path,c)));return s.common.async?Promise.all(o).then(d=>i(d)):i(o)}min(e,t){return new he({...this._def,minSize:{value:e,message:_.toString(t)}})}max(e,t){return new he({...this._def,maxSize:{value:e,message:_.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}he.create=(n,e)=>new he({valueType:n,minSize:null,maxSize:null,typeName:b.ZodSet,...T(e)});class me extends O{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==m.function)return p(t,{code:l.invalid_type,expected:m.function,received:t.parsedType}),w;function s(o,d){return Be({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Je(),ge].filter(c=>!!c),issueData:{code:l.invalid_arguments,argumentsError:d}})}function r(o,d){return Be({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Je(),ge].filter(c=>!!c),issueData:{code:l.invalid_return_type,returnTypeError:d}})}const a={errorMap:t.common.contextualErrorMap},i=t.data;if(this._def.returns instanceof ye){const o=this;return P(async function(...d){const c=new V([]),h=await o._def.args.parseAsync(d,a).catch(y=>{throw c.addIssue(s(d,y)),c}),E=await Reflect.apply(i,this,h);return await o._def.returns._def.type.parseAsync(E,a).catch(y=>{throw c.addIssue(r(E,y)),c})})}else{const o=this;return P(function(...d){const c=o._def.args.safeParse(d,a);if(!c.success)throw new V([s(d,c.error)]);const h=Reflect.apply(i,this,c.data),E=o._def.returns.safeParse(h,a);if(!E.success)throw new V([r(h,E.error)]);return E.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new me({...this._def,args:K.create(e).rest(de.create())})}returns(e){return new me({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,s){return new me({args:e||K.create([]).rest(de.create()),returns:t||de.create(),typeName:b.ZodFunction,...T(s)})}}class Ae extends O{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}Ae.create=(n,e)=>new Ae({getter:n,typeName:b.ZodLazy,...T(e)});class je extends O{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return p(t,{received:t.data,code:l.invalid_literal,expected:this._def.value}),w}return{status:"valid",value:e.data}}get value(){return this._def.value}}je.create=(n,e)=>new je({value:n,typeName:b.ZodLiteral,...T(e)});function At(n,e){return new oe({values:n,typeName:b.ZodEnum,...T(e)})}class oe extends O{constructor(){super(...arguments),be.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),s=this._def.values;return p(t,{expected:Z.joinValues(s),received:t.parsedType,code:l.invalid_type}),w}if(Fe(this,be)||Et(this,be,new Set(this._def.values)),!Fe(this,be).has(e.data)){const t=this._getOrReturnCtx(e),s=this._def.values;return p(t,{received:t.data,code:l.invalid_enum_value,options:s}),w}return P(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return oe.create(e,{...this._def,...t})}exclude(e,t=this._def){return oe.create(this.options.filter(s=>!e.includes(s)),{...this._def,...t})}}be=new WeakMap;oe.create=At;class De extends O{constructor(){super(...arguments),we.set(this,void 0)}_parse(e){const t=Z.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==m.string&&s.parsedType!==m.number){const r=Z.objectValues(t);return p(s,{expected:Z.joinValues(r),received:s.parsedType,code:l.invalid_type}),w}if(Fe(this,we)||Et(this,we,new Set(Z.getValidEnumValues(this._def.values))),!Fe(this,we).has(e.data)){const r=Z.objectValues(t);return p(s,{received:s.data,code:l.invalid_enum_value,options:r}),w}return P(e.data)}get enum(){return this._def.values}}we=new WeakMap;De.create=(n,e)=>new De({values:n,typeName:b.ZodNativeEnum,...T(e)});class ye extends O{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==m.promise&&t.common.async===!1)return p(t,{code:l.invalid_type,expected:m.promise,received:t.parsedType}),w;const s=t.parsedType===m.promise?t.data:Promise.resolve(t.data);return P(s.then(r=>this._def.type.parseAsync(r,{path:t.path,errorMap:t.common.contextualErrorMap})))}}ye.create=(n,e)=>new ye({type:n,typeName:b.ZodPromise,...T(e)});class Y extends O{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===b.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:s}=this._processInputParams(e),r=this._def.effect||null,a={addIssue:i=>{p(s,i),i.fatal?t.abort():t.dirty()},get path(){return s.path}};if(a.addIssue=a.addIssue.bind(a),r.type==="preprocess"){const i=r.transform(s.data,a);if(s.common.async)return Promise.resolve(i).then(async o=>{if(t.value==="aborted")return w;const d=await this._def.schema._parseAsync({data:o,path:s.path,parent:s});return d.status==="aborted"?w:d.status==="dirty"||t.value==="dirty"?pe(d.value):d});{if(t.value==="aborted")return w;const o=this._def.schema._parseSync({data:i,path:s.path,parent:s});return o.status==="aborted"?w:o.status==="dirty"||t.value==="dirty"?pe(o.value):o}}if(r.type==="refinement"){const i=o=>{const d=r.refinement(o,a);if(s.common.async)return Promise.resolve(d);if(d instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(s.common.async===!1){const o=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return o.status==="aborted"?w:(o.status==="dirty"&&t.dirty(),i(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(o=>o.status==="aborted"?w:(o.status==="dirty"&&t.dirty(),i(o.value).then(()=>({status:t.value,value:o.value}))))}if(r.type==="transform")if(s.common.async===!1){const i=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!Te(i))return i;const o=r.transform(i.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(i=>Te(i)?Promise.resolve(r.transform(i.value,a)).then(o=>({status:t.value,value:o})):i);Z.assertNever(r)}}Y.create=(n,e,t)=>new Y({schema:n,typeName:b.ZodEffects,effect:e,...T(t)});Y.createWithPreprocess=(n,e,t)=>new Y({schema:e,effect:{type:"preprocess",transform:n},typeName:b.ZodEffects,...T(t)});class Q extends O{_parse(e){return this._getType(e)===m.undefined?P(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Q.create=(n,e)=>new Q({innerType:n,typeName:b.ZodOptional,...T(e)});class ce extends O{_parse(e){return this._getType(e)===m.null?P(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ce.create=(n,e)=>new ce({innerType:n,typeName:b.ZodNullable,...T(e)});class Le extends O{_parse(e){const{ctx:t}=this._processInputParams(e);let s=t.data;return t.parsedType===m.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}Le.create=(n,e)=>new Le({innerType:n,typeName:b.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...T(e)});class ze extends O{_parse(e){const{ctx:t}=this._processInputParams(e),s={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return Ce(r)?r.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new V(s.common.issues)},input:s.data})})):{status:"valid",value:r.status==="valid"?r.value:this._def.catchValue({get error(){return new V(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}ze.create=(n,e)=>new ze({innerType:n,typeName:b.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...T(e)});class Ye extends O{_parse(e){if(this._getType(e)!==m.nan){const s=this._getOrReturnCtx(e);return p(s,{code:l.invalid_type,expected:m.nan,received:s.parsedType}),w}return{status:"valid",value:e.data}}}Ye.create=n=>new Ye({typeName:b.ZodNaN,...T(n)});const Xn=Symbol("zod_brand");class ht extends O{_parse(e){const{ctx:t}=this._processInputParams(e),s=t.data;return this._def.type._parse({data:s,path:t.path,parent:t})}unwrap(){return this._def.type}}class Ve extends O{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return a.status==="aborted"?w:a.status==="dirty"?(t.dirty(),pe(a.value)):this._def.out._parseAsync({data:a.value,path:s.path,parent:s})})();{const r=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return r.status==="aborted"?w:r.status==="dirty"?(t.dirty(),{status:"dirty",value:r.value}):this._def.out._parseSync({data:r.value,path:s.path,parent:s})}}static create(e,t){return new Ve({in:e,out:t,typeName:b.ZodPipeline})}}class Me extends O{_parse(e){const t=this._def.innerType._parse(e),s=r=>(Te(r)&&(r.value=Object.freeze(r.value)),r);return Ce(t)?t.then(r=>s(r)):s(t)}unwrap(){return this._def.innerType}}Me.create=(n,e)=>new Me({innerType:n,typeName:b.ZodReadonly,...T(e)});function jt(n,e={},t){return n?ve.create().superRefine((s,r)=>{var a,i;if(!n(s)){const o=typeof e=="function"?e(s):typeof e=="string"?{message:e}:e,d=(i=(a=o.fatal)!==null&&a!==void 0?a:t)!==null&&i!==void 0?i:!0,c=typeof o=="string"?{message:o}:o;r.addIssue({code:"custom",...c,fatal:d})}}):ve.create()}const Kn={object:L.lazycreate};var b;(function(n){n.ZodString="ZodString",n.ZodNumber="ZodNumber",n.ZodNaN="ZodNaN",n.ZodBigInt="ZodBigInt",n.ZodBoolean="ZodBoolean",n.ZodDate="ZodDate",n.ZodSymbol="ZodSymbol",n.ZodUndefined="ZodUndefined",n.ZodNull="ZodNull",n.ZodAny="ZodAny",n.ZodUnknown="ZodUnknown",n.ZodNever="ZodNever",n.ZodVoid="ZodVoid",n.ZodArray="ZodArray",n.ZodObject="ZodObject",n.ZodUnion="ZodUnion",n.ZodDiscriminatedUnion="ZodDiscriminatedUnion",n.ZodIntersection="ZodIntersection",n.ZodTuple="ZodTuple",n.ZodRecord="ZodRecord",n.ZodMap="ZodMap",n.ZodSet="ZodSet",n.ZodFunction="ZodFunction",n.ZodLazy="ZodLazy",n.ZodLiteral="ZodLiteral",n.ZodEnum="ZodEnum",n.ZodEffects="ZodEffects",n.ZodNativeEnum="ZodNativeEnum",n.ZodOptional="ZodOptional",n.ZodNullable="ZodNullable",n.ZodDefault="ZodDefault",n.ZodCatch="ZodCatch",n.ZodPromise="ZodPromise",n.ZodBranded="ZodBranded",n.ZodPipeline="ZodPipeline",n.ZodReadonly="ZodReadonly"})(b||(b={}));const es=(n,e={message:`Input not instance of ${n.name}`})=>jt(t=>t instanceof n,e),Dt=q.create,Lt=ae.create,ts=Ye.create,ns=ie.create,zt=Ne.create,ss=ue.create,rs=qe.create,as=Oe.create,is=Ee.create,os=ve.create,cs=de.create,ds=ne.create,ls=He.create,us=W.create,hs=L.create,fs=L.strictCreate,ps=Ie.create,ms=Ke.create,gs=Ze.create,vs=K.create,ys=Re.create,_s=We.create,xs=he.create,ks=me.create,bs=Ae.create,ws=je.create,Ss=oe.create,Ts=De.create,Cs=ye.create,mt=Y.create,Ns=Q.create,Os=ce.create,Es=Y.createWithPreprocess,Is=Ve.create,Zs=()=>Dt().optional(),Rs=()=>Lt().optional(),As=()=>zt().optional(),js={string:n=>q.create({...n,coerce:!0}),number:n=>ae.create({...n,coerce:!0}),boolean:n=>Ne.create({...n,coerce:!0}),bigint:n=>ie.create({...n,coerce:!0}),date:n=>ue.create({...n,coerce:!0})},Ds=w;var Ls=Object.freeze({__proto__:null,defaultErrorMap:ge,setErrorMap:Dn,getErrorMap:Je,makeIssue:Be,EMPTY_PATH:Ln,addIssueToContext:p,ParseStatus:M,INVALID:w,DIRTY:pe,OK:P,isAborted:nt,isDirty:st,isValid:Te,isAsync:Ce,get util(){return Z},get objectUtil(){return tt},ZodParsedType:m,getParsedType:re,ZodType:O,datetimeRegex:Rt,ZodString:q,ZodNumber:ae,ZodBigInt:ie,ZodBoolean:Ne,ZodDate:ue,ZodSymbol:qe,ZodUndefined:Oe,ZodNull:Ee,ZodAny:ve,ZodUnknown:de,ZodNever:ne,ZodVoid:He,ZodArray:W,ZodObject:L,ZodUnion:Ie,ZodDiscriminatedUnion:Ke,ZodIntersection:Ze,ZodTuple:K,ZodRecord:Re,ZodMap:We,ZodSet:he,ZodFunction:me,ZodLazy:Ae,ZodLiteral:je,ZodEnum:oe,ZodNativeEnum:De,ZodPromise:ye,ZodEffects:Y,ZodTransformer:Y,ZodOptional:Q,ZodNullable:ce,ZodDefault:Le,ZodCatch:ze,ZodNaN:Ye,BRAND:Xn,ZodBranded:ht,ZodPipeline:Ve,ZodReadonly:Me,custom:jt,Schema:O,ZodSchema:O,late:Kn,get ZodFirstPartyTypeKind(){return b},coerce:js,any:os,array:us,bigint:ns,boolean:zt,date:ss,discriminatedUnion:ms,effect:mt,enum:Ss,function:ks,instanceof:es,intersection:gs,lazy:bs,literal:ws,map:_s,nan:ts,nativeEnum:Ts,never:ds,null:is,nullable:Os,number:Lt,object:hs,oboolean:As,onumber:Rs,optional:Ns,ostring:Zs,pipeline:Is,preprocess:Es,promise:Cs,record:ys,set:xs,strictObject:fs,string:Dt,symbol:rs,transformer:mt,tuple:vs,undefined:as,union:ps,unknown:cs,void:ls,NEVER:Ds,ZodIssueCode:l,quotelessJson:jn,ZodError:V});const zs=n=>G("display:flex;flex-direction:column;flex:1;flex-wrap:wrap;width:400px;border:1px solid ",n.accentNeutral,";padding:5px;border-radius:3px;margin-left:10px;",""),Ms=G({name:"1reekiy",styles:"display:flex;padding:4px 12px;font-size:14px;border-radius:4px;white-space:nowrap;align-items:center;justify-content:space-between"}),Ps=G({name:"t10jb8",styles:"margin:5px"}),$s=G({name:"1wnuhlc",styles:"margin-left:20px;display:flex;align-items:center;span{font-size:12px;}"}),Vs=G({name:"17moij0",styles:"align-items:center;width:100%;display:flex;margin-top:10px;justify-content:space-between;flex:1"}),Us=Ls.string().url(),gt=window.location.origin,Js=n=>{const[e,t]=D.useState(""),[s,r]=D.useState(""),[a,i]=D.useState(""),[o,d]=D.useState(!1),[c,h]=D.useState(!1),[E,R]=D.useState(!1),y=U(N=>N.dataSources),I=ee(),f="Save",v=$e(),g=(N="")=>{const z=N===""?e:N,se=JSON.parse(JSON.stringify(y)),_e=se==null?void 0:se.map(xe=>({...xe,url:z,auth:{...xe.auth,basicAuth:{...xe.auth.basicAuth,value:c},fields:{...xe.auth.fields,basicAuth:[...xe.auth.fields.basicAuth].map(ke=>ke.name==="user"?{...ke,value:s}:ke.name==="password"?{...ke,value:a}:ke)}}}));localStorage.setItem("dataSources",JSON.stringify(_e)),I($(_e))};D.useEffect(()=>{var N,z,se;e===""&&(((N=y[0])==null?void 0:N.url)===""&&((z=y[1])==null?void 0:z.url)===""?(t(gt),g(gt)):t((se=y[0])==null?void 0:se.url),d(!0),R(!0))},[e]);const k=N=>{var _e;const z=((_e=N==null?void 0:N.target)==null?void 0:_e.value)||"",se=Us.safeParse(z);R(()=>se.success),t(()=>z)},C=N=>{r(()=>N.target.value)},x=N=>{i(()=>N.target.value)},A=N=>{d(()=>N.target.checked)},J=N=>{h(()=>N.target.checked)};return S("div",{className:F(zs(v)),children:[S("div",{className:F(Ms),children:["Use one setting for all Data Sources",u(Ue,{checked:o,size:"small",onChange:A})]}),o&&S("div",{className:F(Ps),children:[u(H,{value:j.sanitize(e),label:"url",onChange:k,placeholder:window.location.origin}),c&&S(Pe,{children:[u(H,{value:j.sanitize(s),label:"user",onChange:C,placeholder:"default"}),u(H,{value:j.sanitize(a),label:"password",onChange:x,type:"password",placeholder:""})]}),S("div",{className:F(Vs),children:[S("div",{className:F($s),children:[u("span",{children:"Use Basic Auth"})," ",u(Ue,{checked:c,size:"small",onChange:J})," "]}),u(Se,{value:j.sanitize(f),disabled:!E,onClick:g,editing:!1,primary:E})]})]})]})};function er(n){const e=n.replace(/#/,""),t=decodeURIComponent(e),s=new URLSearchParams(t);for(let[r,a]of s)(r==="left"||r==="right")&&JSON.parse(a)}function tr(){const n=Ht.useMediaQuery({query:"(prefers-color-scheme: dark)"}),e=ee(),t=$e(),s=U(r=>r.autoTheme);return D.useEffect(()=>{if(s){const r=n?"dark":"light";e(sn(r)),localStorage.setItem("theme",JSON.stringify({theme:r,auto:s}))}},[n,s,e]),S(xt,{theme:t,children:[u(nn,{children:S("div",{className:"cont",children:[u(Nn,{}),u("div",{style:{display:"flex",flex:1},children:u("div",{style:{height:"40px"},children:u(Js,{})})})]})}),u(Yt,{children:u(Wt,{path:":id",element:u(An,{})})})]})}export{tr as default,er as getURlParams}; diff --git a/view/assets/DeleteOutlineOutlined-wSqFpREd.js b/view/assets/DeleteOutlineOutlined-wSqFpREd.js deleted file mode 100644 index 70833e75..00000000 --- a/view/assets/DeleteOutlineOutlined-wSqFpREd.js +++ /dev/null @@ -1 +0,0 @@ -import{k as a,i}from"./index-DT4hshFp.js";import{r as n}from"./createSvgIcon-CA0imTcl.js";import{j as o}from"./reactDnd-BtpxPq0t.js";const c=t=>r=>{r({type:"SET_THEME",theme:t})},h=a("button",{target:"e18y13m91"})({name:"hfqfih",styles:"padding:0px 8px;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=i;Object.defineProperty(e,"__esModule",{value:!0});var l=e.default=void 0,u=s(n()),p=o;l=e.default=(0,u.default)((0,p.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5-1-1h-5l-1 1H5v2h14V4z"}),"DeleteOutlineOutlined");export{h as B,l as d,c as s}; diff --git a/view/assets/Main-Bn0wyxVx.js b/view/assets/Main-Bn0wyxVx.js deleted file mode 100644 index 295e324c..00000000 --- a/view/assets/Main-Bn0wyxVx.js +++ /dev/null @@ -1,106 +0,0 @@ -import{m as bo,n as oo,s as qe,B as HO,r as jO,o as p2,a as kt,p as FO,u as po,c as tM,b as zo,q as VO,t as qM,v as no,D as Z1,w as t2,x as y1,d as O,g as P0,y as qc,z as fc,h as O0,i as m1,f as K0,j as P,k as h0,A as $O,I as Tb,P as Wc,F as q1,C as hc,l as gc,e as _2,E as UO,G as co,H as KO,J as GO}from"./index-DT4hshFp.js";import{a as D1,d as ro,m as _1,u as H0,q as Ue,y as eb,z as ot,A as zz,B as nz,D as Sb,E as xb,F as Xb,G as tb,I as QO,J as JO,K as xe,M as De,Q as io,S as YO,T as q2,U as ZO,V as Rc,W as mc,X as Oo,Y as Ot,Z as cz,$ as Lc,a0 as D2,n as F2,o as f2,a1 as ea,a2 as ta,a3 as Ma,a4 as ba,a5 as oa,a6 as pa,j as X2,a7 as za,x as W2,a8 as _t,a9 as rz,aa as iz,ab as na,ac as ca,ad as ra,ae as ao,af as ia,ag as Oz,w as az,s as Oa}from"./vendor-BVYYq__d.js";import{r as q,c as so,g as Ke,R as n2,e as aa,b as lt}from"./react-B8DbRJ_3.js";import{u as Ao,s as sa,f as Aa,T as x1,C as la,D as lo,h as uo,i as da,j as ua,k as qa,l as fa,m as Wa,o as ha,p as ga,E as Ra,q as qo,r as ma,t as Nc,v as vc,w as o1,b as La,x as pt,M as wb,y as Na,z as Bc,A as Xe,G as va,H as Ba,I as ya,J as Ta,K as we,L as Sa,R as yc,N as re,d as xa,O as Tc,Q as Sc,U as xc,V as fo,W as Rt,X as Xa,Y as wa,Z as Xc,_ as sz,n as J2,a as Kt,$ as wc,a0 as Ca,a1 as Ea,a2 as ka,a3 as _a,a4 as Ia,a5 as Da,a6 as Cc,a7 as Ec,a8 as kc,a9 as Cb,aa as _c,P as mt,ab as Pa,ac as Ha,ad as Az,S as ja,ae as Fa,af as lz}from"./consts-CMlAJimI.js";import{s as Ic,B as Wo}from"./DeleteOutlineOutlined-wSqFpREd.js";import{l as P1}from"./lodash-B09bLPdI.js";import{r as L1,S as dt}from"./createSvgIcon-CA0imTcl.js";import{j as t1,u as Va,b as $a,H as Ua,D as Ka}from"./reactDnd-BtpxPq0t.js";import{k as Dc,b as Pc,s as Ga,i as Qa,g as Ja,_ as Ya,d as f1,S as ho,e as Hc,j as Lt,f as jc}from"./reactSelect-FVq3QTPV.js";import{r as Za,f as dz,u as e3,g as t3,a as M3,b as b3,c as o3,d as p3,e as z3,h as n3,i as c3}from"./reactTable-CVWF-YKs.js";import{m as Ge,d as r3,a as i3,u as uz}from"./memoize-CbKs8VX_.js";import{w as O3,a as a3,T as s3,S as A3,E as l3,c as d3}from"./slate-D5uuGobT.js";import{F as It,d as Nt,s as MM,e as go}from"./AddOutlined-uQBKZQpc.js";import{P as u3,u as q3,L as Mb}from"./PluginManagerFactory-BjqaVgvn.js";import{s as f3}from"./actions-C1TUpiFF.js";const Ro=e=>t=>{t({type:"SET_START_TIME",start:e})},mo=e=>t=>{t({type:"SET_STOP_TIME",stop:e})},W3=e=>t=>{t({type:"SET_QUERY_STEP",step:e})},qz=e=>t=>{t({type:"SET_RANGE_OPEN",rangeOpen:e})},Lo=e=>t=>{t({type:"SET_TIME_RANGE_LABEL",label:e})},Fc=e=>t=>{t({type:"SET_QUERY_TIME",time:e})},Gt=e=>t=>{t({type:"SET_QUERY_HISTORY",queryHistory:e})},Vc=e=>t=>{t({type:"SET_HISTORY_OPEN",historyOpen:e})};function h3(e){return function(t){t({type:"SET_FROM_TIME",toTime:e})}}function g3(e){return function(t){t({type:"SET_TO_TIME"})}}const se=e=>t=>{t({type:"SET_IS_EMPTY_VIEW",isEmptyView:e})};function R3(e){return function(t){t({type:"SET_RESPONSE_TYPE",responseType:e})}}const Q1=e=>t=>{t({type:"SET_RIGHT_PANEL",right:e})},c2=e=>t=>{t({type:"SET_LEFT_PANEL",left:e})},fe=e=>t=>{t({type:"SET_RIGHT_DATAVIEW",rightDataView:e})},We=e=>t=>{t({type:"SET_LEFT_DATAVIEW",leftDataView:e})},m3=e=>t=>{t({type:"SET_SPLIT_VIEW",isSplit:e})};function L3(e){return oo("MuiButton",e)}const Dt=bo("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","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),N3=q.createContext({}),v3=q.createContext(void 0),B3=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],y3=e=>{const{color:t,disableElevation:M,fullWidth:b,size:o,variant:p,classes:n}=e,c={root:["root",p,`${p}${p2(t)}`,`size${p2(o)}`,`${p}Size${p2(o)}`,`color${p2(t)}`,M&&"disableElevation",b&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${p2(o)}`],endIcon:["icon","endIcon",`iconSize${p2(o)}`]},r=zo(c,L3,n);return D1({},n,r)},$c=e=>D1({},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}}),T3=qe(HO,{shouldForwardProp:e=>jO(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:M}=e;return[t.root,t[M.variant],t[`${M.variant}${p2(M.color)}`],t[`size${p2(M.size)}`],t[`${M.variant}Size${p2(M.size)}`],M.color==="inherit"&&t.colorInherit,M.disableElevation&&t.disableElevation,M.fullWidth&&t.fullWidth]}})(({theme:e,ownerState:t})=>{var M,b;const o=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 D1({},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":D1({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:kt(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})`:kt(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})`:kt(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":D1({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${Dt.focusVisible}`]:D1({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${Dt.disabled}`]:D1({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 ${kt(e.palette[t.color].main,.5)}`},t.variant==="contained"&&{color:e.vars?e.vars.palette.text.primary:(M=(b=e.palette).getContrastText)==null?void 0:M.call(b,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:o,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"},[`&.${Dt.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${Dt.disabled}`]:{boxShadow:"none"}}),S3=qe("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:M}=e;return[t.startIcon,t[`iconSize${p2(M.size)}`]]}})(({ownerState:e})=>D1({display:"inherit",marginRight:8,marginLeft:-4},e.size==="small"&&{marginLeft:-2},$c(e))),x3=qe("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:M}=e;return[t.endIcon,t[`iconSize${p2(M.size)}`]]}})(({ownerState:e})=>D1({display:"inherit",marginRight:-4,marginLeft:8},e.size==="small"&&{marginRight:-2},$c(e))),Uc=q.forwardRef(function(t,M){const b=q.useContext(N3),o=q.useContext(v3),p=FO(b,t),n=po({props:p,name:"MuiButton"}),{children:c,color:r="primary",component:A="button",className:a,disabled:l=!1,disableElevation:W=!1,disableFocusRipple:g=!1,endIcon:d,focusVisibleClassName:R,fullWidth:v=!1,size:m="medium",startIcon:h,type:T,variant:S="text"}=n,C=ro(n,B3),w=D1({},n,{color:r,component:A,disabled:l,disableElevation:W,disableFocusRipple:g,fullWidth:v,size:m,type:T,variant:S}),s=y3(w),L=h&&t1.jsx(S3,{className:s.startIcon,ownerState:w,children:h}),y=d&&t1.jsx(x3,{className:s.endIcon,ownerState:w,children:d}),E=o||"";return t1.jsxs(T3,D1({ownerState:w,className:tM(b.className,s.root,a,E),component:A,disabled:l,focusRipple:!g,focusVisibleClassName:tM(s.focusVisible,R),ref:M,type:T},C,{classes:s,children:[L,c,y]}))});function X3(e){return oo("MuiCircularProgress",e)}bo("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const w3=["className","color","disableShrink","size","style","thickness","value","variant"];let fM=e=>e,fz,Wz,hz,gz;const G2=44,C3=Dc(fz||(fz=fM` - 0% { - transform: rotate(0deg); - } - - 100% { - transform: rotate(360deg); - } -`)),E3=Dc(Wz||(Wz=fM` - 0% { - stroke-dasharray: 1px, 200px; - stroke-dashoffset: 0; - } - - 50% { - stroke-dasharray: 100px, 200px; - stroke-dashoffset: -15px; - } - - 100% { - stroke-dasharray: 100px, 200px; - stroke-dashoffset: -125px; - } -`)),k3=e=>{const{classes:t,variant:M,color:b,disableShrink:o}=e,p={root:["root",M,`color${p2(b)}`],svg:["svg"],circle:["circle",`circle${p2(M)}`,o&&"circleDisableShrink"]};return zo(p,X3,t)},_3=qe("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:M}=e;return[t.root,t[M.variant],t[`color${p2(M.color)}`]]}})(({ownerState:e,theme:t})=>D1({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"&&Pc(hz||(hz=fM` - animation: ${0} 1.4s linear infinite; - `),C3)),I3=qe("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),D3=qe("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:M}=e;return[t.circle,t[`circle${p2(M.variant)}`],M.disableShrink&&t.circleDisableShrink]}})(({ownerState:e,theme:t})=>D1({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&&Pc(gz||(gz=fM` - animation: ${0} 1.4s ease-in-out infinite; - `),E3)),P3=q.forwardRef(function(t,M){const b=po({props:t,name:"MuiCircularProgress"}),{className:o,color:p="primary",disableShrink:n=!1,size:c=40,style:r,thickness:A=3.6,value:a=0,variant:l="indeterminate"}=b,W=ro(b,w3),g=D1({},b,{color:p,disableShrink:n,size:c,thickness:A,value:a,variant:l}),d=k3(g),R={},v={},m={};if(l==="determinate"){const h=2*Math.PI*((G2-A)/2);R.strokeDasharray=h.toFixed(3),m["aria-valuenow"]=Math.round(a),R.strokeDashoffset=`${((100-a)/100*h).toFixed(3)}px`,v.transform="rotate(-90deg)"}return t1.jsx(_3,D1({className:tM(d.root,o),style:D1({width:c,height:c},v,r),ownerState:g,ref:M,role:"progressbar"},m,W,{children:t1.jsx(I3,{className:d.svg,ownerState:g,viewBox:`${G2/2} ${G2/2} ${G2} ${G2}`,children:t1.jsx(D3,{className:d.circle,style:R,ownerState:g,cx:G2,cy:G2,r:(G2-A)/2,fill:"none",strokeWidth:A})})}))}),Rz=q.createContext();function H3(e){return oo("MuiGrid",e)}const j3=[0,1,2,3,4,5,6,7,8,9,10],F3=["column-reverse","column","row-reverse","row"],V3=["nowrap","wrap-reverse","wrap"],zt=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],ut=bo("MuiGrid",["root","container","item","zeroMinWidth",...j3.map(e=>`spacing-xs-${e}`),...F3.map(e=>`direction-xs-${e}`),...V3.map(e=>`wrap-xs-${e}`),...zt.map(e=>`grid-xs-${e}`),...zt.map(e=>`grid-sm-${e}`),...zt.map(e=>`grid-md-${e}`),...zt.map(e=>`grid-lg-${e}`),...zt.map(e=>`grid-xl-${e}`)]),$3=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function Ee(e){const t=parseFloat(e);return`${t}${String(e).replace(String(t),"")||"px"}`}function U3({theme:e,ownerState:t}){let M;return e.breakpoints.keys.reduce((b,o)=>{let p={};if(t[o]&&(M=t[o]),!M)return b;if(M===!0)p={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if(M==="auto")p={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const n=qM({values:t.columns,breakpoints:e.breakpoints.values}),c=typeof n=="object"?n[o]:n;if(c==null)return b;const r=`${Math.round(M/c*1e8)/1e6}%`;let A={};if(t.container&&t.item&&t.columnSpacing!==0){const a=e.spacing(t.columnSpacing);if(a!=="0px"){const l=`calc(${r} + ${Ee(a)})`;A={flexBasis:l,maxWidth:l}}}p=D1({flexBasis:r,flexGrow:0,maxWidth:r},A)}return e.breakpoints.values[o]===0?Object.assign(b,p):b[e.breakpoints.up(o)]=p,b},{})}function K3({theme:e,ownerState:t}){const M=qM({values:t.direction,breakpoints:e.breakpoints.values});return no({theme:e},M,b=>{const o={flexDirection:b};return b.indexOf("column")===0&&(o[`& > .${ut.item}`]={maxWidth:"none"}),o})}function Kc({breakpoints:e,values:t}){let M="";Object.keys(t).forEach(o=>{M===""&&t[o]!==0&&(M=o)});const b=Object.keys(e).sort((o,p)=>e[o]-e[p]);return b.slice(0,b.indexOf(M))}function G3({theme:e,ownerState:t}){const{container:M,rowSpacing:b}=t;let o={};if(M&&b!==0){const p=qM({values:b,breakpoints:e.breakpoints.values});let n;typeof p=="object"&&(n=Kc({breakpoints:e.breakpoints.values,values:p})),o=no({theme:e},p,(c,r)=>{var A;const a=e.spacing(c);return a!=="0px"?{marginTop:`-${Ee(a)}`,[`& > .${ut.item}`]:{paddingTop:Ee(a)}}:(A=n)!=null&&A.includes(r)?{}:{marginTop:0,[`& > .${ut.item}`]:{paddingTop:0}}})}return o}function Q3({theme:e,ownerState:t}){const{container:M,columnSpacing:b}=t;let o={};if(M&&b!==0){const p=qM({values:b,breakpoints:e.breakpoints.values});let n;typeof p=="object"&&(n=Kc({breakpoints:e.breakpoints.values,values:p})),o=no({theme:e},p,(c,r)=>{var A;const a=e.spacing(c);return a!=="0px"?{width:`calc(100% + ${Ee(a)})`,marginLeft:`-${Ee(a)}`,[`& > .${ut.item}`]:{paddingLeft:Ee(a)}}:(A=n)!=null&&A.includes(r)?{}:{width:"100%",marginLeft:0,[`& > .${ut.item}`]:{paddingLeft:0}}})}return o}function J3(e,t,M={}){if(!e||e<=0)return[];if(typeof e=="string"&&!Number.isNaN(Number(e))||typeof e=="number")return[M[`spacing-xs-${String(e)}`]];const b=[];return t.forEach(o=>{const p=e[o];Number(p)>0&&b.push(M[`spacing-${o}-${String(p)}`])}),b}const Y3=qe("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:M}=e,{container:b,direction:o,item:p,spacing:n,wrap:c,zeroMinWidth:r,breakpoints:A}=M;let a=[];b&&(a=J3(n,A,t));const l=[];return A.forEach(W=>{const g=M[W];g&&l.push(t[`grid-${W}-${String(g)}`])}),[t.root,b&&t.container,p&&t.item,r&&t.zeroMinWidth,...a,o!=="row"&&t[`direction-xs-${String(o)}`],c!=="wrap"&&t[`wrap-xs-${String(c)}`],...l]}})(({ownerState:e})=>D1({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}),K3,G3,Q3,U3);function Z3(e,t){if(!e||e<=0)return[];if(typeof e=="string"&&!Number.isNaN(Number(e))||typeof e=="number")return[`spacing-xs-${String(e)}`];const M=[];return t.forEach(b=>{const o=e[b];if(Number(o)>0){const p=`spacing-${b}-${String(o)}`;M.push(p)}}),M}const es=e=>{const{classes:t,container:M,direction:b,item:o,spacing:p,wrap:n,zeroMinWidth:c,breakpoints:r}=e;let A=[];M&&(A=Z3(p,r));const a=[];r.forEach(W=>{const g=e[W];g&&a.push(`grid-${W}-${String(g)}`)});const l={root:["root",M&&"container",o&&"item",c&&"zeroMinWidth",...A,b!=="row"&&`direction-xs-${String(b)}`,n!=="wrap"&&`wrap-xs-${String(n)}`,...a]};return zo(l,H3,t)},z2=q.forwardRef(function(t,M){const b=po({props:t,name:"MuiGrid"}),{breakpoints:o}=Ao(),p=VO(b),{className:n,columns:c,columnSpacing:r,component:A="div",container:a=!1,direction:l="row",item:W=!1,rowSpacing:g,spacing:d=0,wrap:R="wrap",zeroMinWidth:v=!1}=p,m=ro(p,$3),h=g||d,T=r||d,S=q.useContext(Rz),C=a?c||12:S,w={},s=D1({},m);o.keys.forEach(E=>{m[E]!=null&&(w[E]=m[E],delete s[E])});const L=D1({},p,{columns:C,container:a,direction:l,item:W,rowSpacing:h,columnSpacing:T,wrap:R,zeroMinWidth:v,spacing:d},w,{breakpoints:o.keys}),y=es(L);return t1.jsx(Rz.Provider,{value:C,children:t1.jsx(Y3,D1({ownerState:L,className:tM(y.root,n),as:A,ref:M},s))})});const ts=e=>t=>{t({type:"SET_IS_EMBED",isEmbed:e})},Ms=e=>t=>{t({type:"SET_URL_LOCATION",urlLocation:e})},bs=e=>t=>{t({type:"SET_URL_QUERY_PARAMS",urlQueryParams:e})},Pe=e=>t=>{t({type:"SET_SPLIT_VIEW",isSplit:e})},Pt=["step","theme","time"],os=["label"],bb=["left","right"],Ht=["start","stop"],jt=["isSubmit","isSplit","autoTheme","isEmbed"];function ps(){const e=q.useMemo(()=>window.matchMedia("(prefers-color-scheme: light)").matches,[]),t=_1(),M=H0(({urlQueryParams:L})=>L),b=H0(({start:L})=>L),o=H0(({stop:L})=>L),p=H0(({label:L})=>L),n=H0(({from:L})=>L),c=H0(({to:L})=>L),r=H0(({step:L})=>L),A=H0(({isSubmit:L})=>L),a=H0(({isEmbed:L})=>L),l=H0(({time:L})=>L),W=H0(({left:L})=>L),g=H0(({right:L})=>L),d=H0(({theme:L})=>L),R=H0(({autoTheme:L})=>L),v=H0(({isSplit:L})=>L),[m,h]=q.useState(e?"light":d);q.useEffect(()=>{h(d)},[d]);const T={start:b,step:r,stop:o,label:p,from:n,to:c,time:l,isSubmit:A,isEmbed:a,theme:d,autoTheme:R,left:W,right:g,isSplit:v},S={start:Ro,step:W3,stop:mo,label:Lo,from:h3,to:g3,time:Fc,isSubmit:sa,isEmbed:ts,theme:Ic,left:c2,right:Q1,isSplit:Pe,autoTheme:Aa},C=L=>(L==null?void 0:L.getTime())+"000000",w=(L,y)=>{try{let E=JSON.parse(L);return E&&E!==void 0?E:y}catch{return y}},{hash:s}=Ue();q.useEffect(()=>{const L=new URLSearchParams(s.replace(/#/,""));if(s.length>0){const y=M;for(let[E,_]of L.entries())y[E]=_;Object.keys(y).length>0&&(t(bs({...M,startParams:y})),t(Ms(s)),Object.keys(y).forEach(E=>{if((Pt.includes(E)||os.includes(E))&&y[E]!=="")t(S[E](Z1.sanitize(y[E])));else if(E==="theme")t(S[E](Z1.sanitize(m)));else if(Ht.includes(E)&&y[E]!==""){const _=y[E]/1e6,I=new Date(t2(_).format("YYYY-MM-DDTHH:mm:ss.SSSZ"));t(S[E](I))}else if(jt.includes(E))try{const _=w(y[E],!1);t(S[E](_))}catch(_){console.log(_)}else if(bb.includes(E))try{const _=w(decodeURIComponent(y[E]),[]);(_==null?void 0:_.length)>0&&t(S[E](_))}catch(_){console.log(_)}}))}else Pt.concat(Ht).concat(jt).concat(bb).forEach(E=>{var _,I;if(Pt.includes(E))L.set(E,Z1.sanitize((_=T[E])==null?void 0:_.toString()));else if(E==="theme")L.set(E,Z1.sanitize(m.toString()));else if(Ht.includes(E)){const D=((I=T[E])==null?void 0:I.getTime())*1e6;L.set(E,Z1.sanitize(D.toString()))}else if(jt.includes(E))try{L.set(E,w(T[E],!1))}catch(D){console.log(D)}else if(bb.includes(E))try{const D=JSON.stringify(T[E]);L.set(E,D)}catch(D){console.log(D)}}),window.location.hash=`/search/#${L}`},[]),q.useEffect(()=>{if(s.length>0){const L=new URLSearchParams(s.replace(/#/,""));let y={};for(let[E,_]of L.entries())y[E]=_;Object.keys(T).forEach(E=>{if(Pt.includes(E)&&y[E]!==T[E]){const _=Z1.sanitize(T[E].toString().trim());L.set(E,_)}else if(Ht.includes(E)&&y[E]!==C(T[E])){const _=C(T[E]);L.set(E,Z1.sanitize(_))}else if(jt.includes(E)&&y[E]!==T[E])try{L.set(E,w(T[E],!1))}catch(_){console.error(_)}else if(E==="left"){const _=JSON.stringify(W);L.set("left",_)}else if(E==="right"){const _=JSON.stringify(g);L.set("right",_)}}),window.location.hash=`/search/#${L}`}},[T])}function zs(e,t,M){const{queryUrl:b,encodedQuery:o,limit:p,parsedTime:n,queryStep:c,direction:r,time:A}=t;return e==="metrics"||e==="logs"?M==="instant"?`${b}/query?query=${o}&limit=${p}&time=${A}&direction=${r}`:`${b}/query_range?query=${o}&limit=${p}${n}${c}&direction=${r}`:e==="flux"?`${b}`:e==="traces"?M==="trace-search"?`${b}${n}`:`${b}`:""}function ns(e,t,M){return zs(e,M,t)}function cs(e,t){var b;const M=((b=Object.keys(t))==null?void 0:b.length)>0?t:void 0;return e==="flux"?{method:"POST",headers:M||{Accept:"application/csv","Content-Type":"application/vnd.flux"}}:{method:"GET",headers:M||{"Content-Type":"application/json"}}}const rs=(e,t)=>Array.from({length:Math.ceil(e.length/t)},(M,b)=>e.slice(b*t,b*t+t)),ob=(...e)=>e.filter(t=>t).join(" "),is=e=>{const t=xb(QO(e)),M=Xb(JO(e)),b=[];for(let o=t;xe(o,M);)b.push(o),o=Sb(o,1);return b},Os=({dateStart:e},t)=>e&&De(t,e),as=({dateEnd:e},t)=>e&&De(t,e),ss=({dateStart:e,dateEnd:t},M)=>e&&t&&(io(M,{start:e,end:t})||De(M,e)||De(M,t)),As=({dateStart:e,dateEnd:t})=>e&&t?De(e,t):!1,WM=e=>No(new Date).find(t=>t.label===e),mz=(e,t)=>{if(e instanceof Date){const M=YO(e);if(q2(M))return M}if(e instanceof String){const M=ZO(e.toString());if(q2(M))return M}else return t},ls=(e,t)=>{var b,o;const M=Math.floor(t/2);return(o=(b=Array(t))==null?void 0:b.fill(0))==null?void 0:o.map((p,n)=>(e==null?void 0:e.getFullYear())-M+n)},Lz=(e,t)=>{const{dateStart:M,dateEnd:b,label:o}=e,{dateStart:p,dateEnd:n,label:c}=t;return o===c?!0:M&&p&&b&&n?cz(M,p)&&cz(b,n):!1},ds=(e,t,M)=>{let{dateStart:b,dateEnd:o}=e;if(b&&o){const p=Rc([b,t]),n=mc([o,M]);return[p,Oo(p,n)?Ot(p,1):n]}else return[b,o]},No=e=>[{label:"Last 5 minutes",dateStart:eb(e,-5),dateEnd:e},{label:"Last 15 minutes",dateStart:eb(e,-15),dateEnd:e},{label:"Last 30 minutes",dateStart:eb(e,-30),dateEnd:e},{label:"Last 1 hour",dateStart:ot(e,-1),dateEnd:e},{label:"Last 3 hours",dateStart:ot(e,-3),dateEnd:e},{label:"Last 6 hours",dateStart:ot(e,-6),dateEnd:e},{label:"Last 12 hours",dateStart:ot(e,-12),dateEnd:e},{label:"Last 24 hours",dateStart:ot(e,-24),dateEnd:e},{label:"Today",dateStart:zz(e),dateEnd:nz(e)},{label:"Yesterday",dateStart:zz(Sb(e,-1)),dateEnd:nz(Sb(e,-1))},{label:"This Week",dateStart:xb(e),dateEnd:Xb(e)},{label:"Last Week",dateStart:xb(tb(e,-1)),dateEnd:Xb(tb(e,-1))},{label:"Last 7 Days",dateStart:tb(e,-1),dateEnd:e}];No(new Date);function us(e){return e/1e6}function Z2(e){return new Date(e).getTime()+"000000"}function Ce(e){let t=new Date(e);return Math.round(t.getTime()/1e3)}const qs=e=>e||parseInt(new Date().getTime()+"000000"),fs=(e,t)=>{let M=WM(e);const{dateStart:b,dateEnd:o}=M;let p,n;return t==="metrics"?(p=Ce(b),n=Ce(o)):(p=parseInt(Z2(b)),n=parseInt(Z2(o))),{pStart:p,pStop:n,dateStart:b,dateEnd:o}};function vo(e,t,M){const{time:b,from:o,to:p}=y1.getState(),n=y1.getState()[M],c=n==null?void 0:n.find(S=>S.id===t),r=c.start,A=c.stop,a=qs(b),l=c.label,W=r,g=A;let d=0,R=0;if(WM(l)){const{pStart:S,pStop:C}=fs(l,e);e==="traces"?(d=Math.round(S/1e9),R=Math.round(C/1e9)):(d=S,R=C)}else e==="metrics"?(d=Ce(W),R=Ce(g)):e==="logs"?(d=parseInt(Z2(W)),R=parseInt(Z2(g))):e==="traces"?(d=Ce(W),R=Ce(g)):(d=parseInt(Z2(W)),R=parseInt(Z2(g)));const v="&start="+(o||d)+"&end="+(p||R),m=parseInt(o||d);return{tDiff:(parseInt(p||R)-m)/(e==="metrics"?1:1e6),time:a,parsedTime:v}}function Ws(e,t,M,b,o,p="",n,c,r,A,a){const l=y1.getState(),{isSplit:W}=l,g=W?2:1,d=window.innerWidth,{parsedTime:R,time:v}=vo(e,A,a),m=p;let h=0;r>0?h=r:h=d/Math.round(d/b*10/g),h===0&&(h=1);const T=`&step=${h}`,S=`${encodeURIComponent(t)}`;let C="";switch(e){case"logs":C=`${m}/loki/api/v1`;break;case"metrics":C=`${m}/api/v1`;break;case"flux":C=`${m}/api/v2/query`;break;case"traces":C=n==="trace-search"?`${c}`:`${m}/api/traces/${t}/json`;break;default:C=`${m}/loki/api/v1`}return{queryUrl:C,encodedQuery:S,parsedTime:R,time:v,queryStep:T,limit:M,direction:o,queryType:n}}async function Eb(e){e(se(!0))}function Gc(e){let t=[];try{for(let M of e){let b=Object.keys(M.metric);for(let o in b)t.includes(b[o])||t.push(b[o])}}catch(M){console.log(M)}return t}function kb(e){let t=[];try{for(let M of e){let b=Object.keys(M);for(let o of b)t.includes(o)||t.push(o)}}catch(M){console.log(M)}return t}function Qt(e,t="logs"){if(t==="flux"||t==="traces")try{return e}catch(M){console.log(M)}else{const M=Gc(e);try{let b=[];const o=e.length,p=M.length;for(let c=0;cc.time)}catch(b){console.log(b)}}}const hs={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"}}},gs=()=>y1.getState().theme==="light"?qc:fc,Rs=e=>O0("border:none;background:none;color:",e.primaryLight,";cursor:pointer;&:hover{text-decoration:underline;}","");Lc.addDefaultLocale(hs);function ms(e){return t2(parseInt(e.getValue()+"000")).format("YYYY-MM-DDTHH:mm:ss.SSZ")}function Ls(e){return e.getValue()+" ms"}function Ns(e){return new Lc("en-US").format(e.getValue()/1e6)}function vs(e,t){const M=y1.dispatch,b=y1.getState()[e.panel],o=y1.getState().right,p=window.innerWidth<=1013,n=b.find(A=>A.id===e.id);e.panel==="left"&&!p&&M(Pe(!0));let c=JSON.parse(JSON.stringify(o));const r=JSON.parse(JSON.stringify(n));try{const A={...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"};M(Q1([A])),M(x2("traces",t,"range",r.limit||100,"right",A.id,"backwards",e.dataSourceId,e.url))}catch(A){console.log(A)}}function Bs(e){return t2(e.getValue()).format("YYYY-MM-DDTHH:mm:ss.SSZ")}function ys(e,t="logs",M,b={}){var n,c;const o=(c=(n=y1.getState())==null?void 0:n[b.panel])==null?void 0:c.find(r=>r.id===b.id);o&&(b.dataSourceId=o.dataSourceId,b.url=o.dataSourceURL);const p=gs();return e.length>0&&t==="traces"?e==null?void 0:e.map(r=>r.accessorKey==="durationMs"?{header:"Duration Ms",accessorKey:r.accessorKey,cell:A=>Ls(A)}:r.accessorKey==="startTimeUnixNano"?{header:"Start Time",accessorKey:r.accessorKey,cell:A=>Ns(A)}:r.accessorKey==="traceID"||r.accessorKey==="traceId"?{header:"Trace Id",accessorKey:r.accessorKey,cell:A=>O("button",{onClick:a=>vs(b,A.getValue()),className:P0(Rs(p)),children:A.getValue()})}:r.accessorKey==="rootServiceName"?{header:"Service Name",accessorKey:r.accessorKey,cell:A=>A.getValue()}:r.accessorKey==="rootTraceName"?{header:"Trace Name",accessorKey:r.accessorKey,cell:A=>A.getValue()}:r):e.length>0&&t==="flux"?e==null?void 0:e.map(r=>r.accessorKey===M||r.accessorKey==="_time"?{header:"Time",accessorKey:r.accessorKey,cell:A=>Bs(A)}:r):e.length>0?[{header:"Time",accessorKey:"time",cell:r=>ms(r)},...e,{header:"Value",accessorKey:"value"}]:[]}function Jt(e,t="logs",M,b={}){const o=e==null?void 0:e.map(n=>({header:n,accessorKey:n,id:n,cell:c=>c.getValue()}));return ys(o,t,M,b)}function pb(e){return e==="left"?{state:"leftDataView",action:We}:{state:"rightDataView",action:fe}}function Qc(e){var a,l,W,g,d,R;const{result:t,debugMode:M,dispatch:b,panel:o,id:p,type:n,dsType:c,raw:r}=e;let A={panel:o,id:p,type:n};if(n==="traces")try{const v=kb(t),m=h=>{const T=h[0],S=Object.entries(T);if(S){const C=S.find(([w,s])=>D2(s));return(C==null?void 0:C[0])||null}};if(v.length>0){const h=m(t),S=Jt(v,n,h,{panel:o,id:p,type:n}),C=Qt(t,n),w={columnsData:S,dataRows:C,panel:o,id:p};if((S==null?void 0:S.length)>0&&(C==null?void 0:C.length)>0){const s={id:p,type:"vector",raw:r,dsType:c,data:{tableData:w},tableData:w,total:((a=w==null?void 0:w.dataRows)==null?void 0:a.length)||0},L=pb(o),{action:y,state:E}=L,_=(l=y1.getState())==null?void 0:l[E];if(_.some(I=>I.id===s.id)){let I=[];b(y([])),I=[..._.filter(G=>G.id!==s.id),{...s}],b(y(I))}else{let I=[..._,s];b(y(I))}}}}catch(v){console.log(v)}else if(n==="flux")try{const v=kb(t),m=h=>{const T=h[0],S=Object.entries(T);if(S){const C=S.find(([w,s])=>D2(s));return(C==null?void 0:C[0])||null}};if(v.length>0){const h=m(t),T=Jt(v,n,h,A),S=Qt(t,n),C={columnsData:T,dataRows:S,panel:o,id:p};if((T==null?void 0:T.length)>0&&(S==null?void 0:S.length)>0){const w={id:p,type:"vector",data:{tableData:C},raw:r,dsType:c,tableData:C,total:((W=C==null?void 0:C.dataRows)==null?void 0:W.length)||0},s=pb(o),{action:L,state:y}=s,E=(g=y1.getState())==null?void 0:g[y];if(E.some(_=>_.id===w.id)){let _=[];b(L([])),_=[...E.filter(D=>D.id!==w.id),{...w}],b(L(_))}else{let _=[...E,w];b(L(_))}}}}catch(v){console.log(v)}else try{const v=Gc(t);if(v.length>0){const m=Jt(v,n,null,A),h=Qt(t),T={columnsData:m,dataRows:h,panel:o,id:p};if(m.length>0&&h.length>0){const S={id:p,type:"vector",data:{tableData:T},raw:r,dsType:c,tableData:T||{},total:((d=T==null?void 0:T.dataRows)==null?void 0:d.length)||0},C=pb(o),{action:w,state:s}=C,L=(R=y1.getState())==null?void 0:R[s];if(L.some(y=>y.id===S.id)){let y=[];b(w([])),y=[...L.filter(_=>_.id!==S.id),{...S}],b(w(y))}else{let y=[...L,S];b(w(y))}}}}catch(v){M&&console.log("🚧 getData / getting an error from rendering vector type streams"),console.log(v)}}function Jc(e){return(e==null?void 0:e.map(t=>({...t,id:F2()})))||[]}function Ts(e){return t2(e.getValue()*1e3).format("YYYY-MM-DDTHH:mm:ss.SSZ")}function Ss(e){return e.map(({metric:t,values:M})=>({metric:JSON.stringify(t),rows:M.map(([b,o])=>({time:b,metric:JSON.stringify(t),value:o})),get rowsLength(){var b;return(b=this.rows)==null?void 0:b.length},get title(){return`'${this.metric}' (${this.rowsLength})`}}))}function xs(e){const t=[{header:"Time",accessorKey:"time",cell:p=>Ts(p)},{header:"Metric",accessorKey:"metric"},{header:"Value",accessorKey:"value"}],M=Ss(e);let b=[];for(let p of M)b.push(p.rows);const o=P1.sortBy(b.flat(),p=>p.time);return{columnsData:t,dataRows:o,total:o.length}}function Xs(e){return e==="left"?{state:"leftDataView",action:We}:{state:"rightDataView",action:fe}}function Nz(e){var l;const{result:t,debugMode:M,dispatch:b,panel:o,id:p,raw:n,dsType:c,isLogsVolume:r}=e,A=xs(t),a=Xs(o);try{const W=Jc(t),g={id:p,type:"matrix",tableData:A,data:W,dsType:c,raw:n,total:(W==null?void 0:W.length)||0},{action:d,state:R}=a,v=(l=y1.getState())==null?void 0:l[R];if(v.some(m=>m.id===g.id)){let m=[];if(r){m=[...v];let h=m.map(T=>T.id===p?{...T,logsVolumeData:W,total:W.length}:T);b(d([])),b(d(h))}else b(d([])),m=[...v.filter(T=>T.id!==g.id),{...g}],b(d(m))}else{let m=[...v,g];b(d(m))}}catch(W){M&&console.log("🚧 getData / getting an error from rendering matrix type streams"),console.log(W)}}const ws=e=>t=>{t({type:"SET_LOGS",logs:e})};function Cs(e){return t2(parseInt(e.getValue())/1e6).format("YYYY-MM-DDTHH:mm:ss.SSZ")}function Es(e){return e==null?void 0:e.map(({stream:t,values:M})=>({stream:`${JSON.stringify(t)}`,rows:M==null?void 0:M.map(([b,o])=>({time:b,stream:JSON.stringify(t),log:o})),get rowsLength(){var b;return((b=this==null?void 0:this.rows)==null?void 0:b.length)||0}}))}function vz(e){return O("span",{title:e.getValue(),children:e.getValue()})}function ks(e){const t=[{id:"time",header:"Time",accessorKey:"time",cell:p=>Cs(p)},{id:"stream",header:"Stream",accessorKey:"stream",cell:p=>vz(p)},{id:"log",accessorKey:"log",header:"Log",cell:p=>vz(p)}],M=Es(e),b=(M==null?void 0:M.length)||0;let o=[];if(b>0)for(let p of M)o.push(p.rows);return{columnsData:t,dataRows:P1.sortBy(o.flat(),p=>p.time),length:b}}function _s(e){return e==="left"?{state:"leftDataView",action:We}:{state:"rightDataView",action:fe}}function Bz(e){var h,T;const{result:t,raw:M,time:b,debugMode:o,queryType:p,panel:n,id:c,dispatch:r,dsType:A,direction:a,isLogsVolume:l}=e,W=Js(t,a),g=_s(n),d=ks(t),R=Yc(W,a);function v(S){return[].concat.apply([],S).filter(function(C,w,s){return s.indexOf(C)===w})}let m={id:c,type:"stream",tableData:{},data:[{}],raw:"[]",labels:[],total:0,isLogsVolume:l,dsType:A};if(R)try{Ks(r(ws(R||[]))).then(()=>{R.length===0&&(o&&console.log("🚧 getData / getting no messages sorted"),r(se(!0))),r(se(!1))});const S=Array.from(new Set(R==null?void 0:R.map(y=>Object.keys(y.tags)))),C=v(S);m={id:c,type:"stream",dsType:A,tableData:d,data:R,isLogsVolume:l,raw:M,labels:[...C],total:(R==null?void 0:R.length)||0};const{action:w,state:s}=g,L=(h=y1.getState())==null?void 0:h[s];if(L.some(y=>y.id===m.id)){let y=[];if(l){y=[...L];let E=y.map(_=>{var I;if(_.id===c){let D=[];return _!=null&&_.logsVolumeData&&((I=_.logsVolumeData)==null?void 0:I.length)>0&&(D=[..._.logsVolumeData]),{...{...m},logsVolumeData:D}}else return _});r(w([])),r(w(E))}else{let E=[];r(w([])),E=[...L.filter(I=>I.id!==m.id),{...m}],r(w(E))}}else{let y=[...L,m];r(w(y))}p==="instant"&&r(Fc(b))}catch(S){console.log(S)}else{const{action:S,state:C}=g,w=(T=y1.getState())==null?void 0:T[C];if(w.some(s=>s.id===m.id)){let s=[];r(S([])),s=[...(w==null?void 0:w.filter(y=>y.id!==m.id))||[],{...m}],r(S(s))}else{let s=[...w,m];r(S(s))}}}function Is(e){return e==="left"?{state:"leftDataView",action:We}:{state:"rightDataView",action:fe}}async function Ds(e){var a,l;const{result:t,debugMode:M,dispatch:b,panel:o,id:p,type:n,dsType:c,queryType:r,raw:A}=e;if(r==="trace-search")await Qc(e);else try{const W={id:p,type:n,dsType:c,tableData:{},data:t,raw:A,labels:[],open:!0,total:(a=t==null?void 0:t.resourceSpans)==null?void 0:a.length},g=Is(o),{action:d,state:R}=g,v=(l=y1.getState())==null?void 0:l[R];if(v.some(m=>m.id===W.id)){let m=[];b(d([])),m=[...v.filter(T=>T.id!==W.id),{...W}],b(d(m))}else{let m=[...v,W];b(d(m))}}catch(W){M&&console.log(" 🚧 getData / getting an error from rendering Traces type streams",W),console.log(W)}}function Ps(e){return t2(e.getValue()).format("YYYY-MM-DDTHH:mm:ss.SSZ")}function Hs(e){return[{metric:{__name__:"Flux"},values:e.map(M=>Object.values(M).map((b,o)=>isNaN(+b)?null:(b instanceof Date?b.getTime()/1e3:b)+(o===0?0:"")).filter(b=>!!b))}]}function js(e){return e.map(({metric:t,values:M})=>({metric:JSON.stringify(t),rows:M.map(([b,o])=>({time:b,metric:JSON.stringify(t),value:o})),get rowsLength(){var b;return(b=this.rows)==null?void 0:b.length},get title(){return`'${this.metric}' (${this.rowsLength})`}}))}function yz(e){return O("span",{title:e.getValue(),children:e.getValue()})}function Fs(e){const t=[{accessorKey:"time",header:()=>O("span",{children:"Time"}),cell:p=>Ps(p)},{header:"Metric",cell:p=>yz(p),accessorKey:"metric"},{header:"Value",accessorKey:"value",cell:p=>yz(p)}],M=js(e);let b=[];for(let p of M)b.push(p.rows);const o=P1.sortBy(b.flat(),p=>p.time);return{columnsData:t,dataRows:o,total:o.length}}function Vs(e){return e==="left"?{state:"leftDataView",action:We}:{state:"rightDataView",action:fe}}function $s(e){const{result:t,panel:M,id:b,type:o}=e,p={panel:M,id:b,type:o},n=kb(e.result),r=(W=>{const g=W[0],d=Object.entries(g);if(d){const R=d.find(([v,m])=>D2(m));return(R==null?void 0:R[0])||null}})(t),A=Jt(n,o,r,p),a=Qt(t,o),l={columnsData:A,dataRows:a,panel:M,id:b};if((A==null?void 0:A.length)>0&&(a==null?void 0:a.length)>0)return l}function Us(e){var a;let{result:t,debugMode:M,dispatch:b,panel:o,id:p,raw:n,dsType:c}=e;t=Hs(t);const r=Fs(t),A=Vs(o);try{const l=Jc(t),W=$s(e),d={id:p,type:"vector",tableData:r,data:{chartData:l,tableData:W},dsType:c,raw:n,total:(l==null?void 0:l.length)||0},{action:R,state:v}=A,m=(a=y1.getState())==null?void 0:a[v];if(m.some(h=>h.id===d.id)){let h=[];b(R([])),h=[...m.filter(S=>S.id!==d.id),{...d}],b(R(h))}else{let h=[...m,d];b(R(h))}}catch(l){M&&console.log("🚧 getData / getting an error from rendering Flux type streams"),console.error(l)}}const{debugMode:Bo}=y1.getState();async function Ks(e){return await e}function Yc(e,t){return t==="forward"?Gs(e):Qs(e)}function Gs(e){const t=performance.now(),M=e==null?void 0:e.sort((o,p)=>o.timestamp-p.timestamp),b=performance.now()-t;return Bo&&console.log("🚧 getData / sorting logs took: ",b," ms"),M}function Qs(e){const t=performance.now(),M=e==null?void 0:e.sort((o,p)=>p.timestamp-o.timestamp),b=performance.now()-t;return Bo&&console.log("🚧 getData / sorting logs took: ",b," ms"),M}function Js(e,t="backwards"){const M=performance.now();let b=[];e==null||e.forEach(p=>{p.values.forEach(([n,c],r)=>{b.push({type:"stream",timestamp:us(n),text:c,tags:p.stream||{},isShowTs:!0,isBuilder:!1,showLabels:!1,id:F2()})})});const o=performance.now()-M;return Bo&&console.log("🚧 getData / mapping logs took: ",o," ms"),Yc(b,t)}async function ye(e){const{type:t}=e;switch(t){case"streams":await Bz(e);break;case"vector":await Qc(e);break;case"matrix":await Nz(e);break;case"scalar":await Nz(e);break;case"flux":await Us(e);break;case"traces":await Ds(e);break;default:await Bz(e)}}var Zc={exports:{}};/* @license -Papa Parse -v5.4.1 -https://github.com/mholt/PapaParse -License: MIT -*/(function(e,t){(function(M,b){e.exports=b()})(so,function M(){var b=typeof self<"u"?self:typeof window<"u"?window:b!==void 0?b:{},o=!b.document&&!!b.postMessage,p=b.IS_PAPA_WORKER||!1,n={},c=0,r={parse:function(L,y){var E=(y=y||{}).dynamicTyping||!1;if(s(E)&&(y.dynamicTypingFunction=E,E={}),y.dynamicTyping=E,y.transform=!!s(y.transform)&&y.transform,y.worker&&r.WORKERS_SUPPORTED){var _=function(){if(!r.WORKERS_SUPPORTED)return!1;var D=(o0=b.URL||b.webkitURL||null,b0=M.toString(),r.BLOB_URL||(r.BLOB_URL=o0.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; ","(",b0,")();"],{type:"text/javascript"})))),G=new b.Worker(D),o0,b0;return G.onmessage=h,G.id=c++,n[G.id]=G}();return _.userStep=y.step,_.userChunk=y.chunk,_.userComplete=y.complete,_.userError=y.error,y.step=s(y.step),y.chunk=s(y.chunk),y.complete=s(y.complete),y.error=s(y.error),delete y.worker,void _.postMessage({input:L,config:y,workerId:_.id})}var I=null;return r.NODE_STREAM_INPUT,typeof L=="string"?(L=function(D){return D.charCodeAt(0)===65279?D.slice(1):D}(L),I=y.download?new l(y):new g(y)):L.readable===!0&&s(L.read)&&s(L.on)?I=new d(y):(b.File&&L instanceof File||L instanceof Object)&&(I=new W(y)),I.stream(L)},unparse:function(L,y){var E=!1,_=!0,I=",",D=`\r -`,G='"',o0=G+G,b0=!1,e0=null,g0=!1;(function(){if(typeof y=="object"){if(typeof y.delimiter!="string"||r.BAD_DELIMITERS.filter(function(q0){return y.delimiter.indexOf(q0)!==-1}).length||(I=y.delimiter),(typeof y.quotes=="boolean"||typeof y.quotes=="function"||Array.isArray(y.quotes))&&(E=y.quotes),typeof y.skipEmptyLines!="boolean"&&typeof y.skipEmptyLines!="string"||(b0=y.skipEmptyLines),typeof y.newline=="string"&&(D=y.newline),typeof y.quoteChar=="string"&&(G=y.quoteChar),typeof y.header=="boolean"&&(_=y.header),Array.isArray(y.columns)){if(y.columns.length===0)throw new Error("Option columns is empty");e0=y.columns}y.escapeChar!==void 0&&(o0=y.escapeChar+G),(typeof y.escapeFormulae=="boolean"||y.escapeFormulae instanceof RegExp)&&(g0=y.escapeFormulae instanceof RegExp?y.escapeFormulae:/^[=+\-@\t\r].*$/)}})();var Y=new RegExp(v(G),"g");if(typeof L=="string"&&(L=JSON.parse(L)),Array.isArray(L)){if(!L.length||Array.isArray(L[0]))return $0(null,L,b0);if(typeof L[0]=="object")return $0(e0||Object.keys(L[0]),L,b0)}else if(typeof L=="object")return typeof L.data=="string"&&(L.data=JSON.parse(L.data)),Array.isArray(L.data)&&(L.fields||(L.fields=L.meta&&L.meta.fields||e0),L.fields||(L.fields=Array.isArray(L.data[0])?L.fields:typeof L.data[0]=="object"?Object.keys(L.data[0]):[]),Array.isArray(L.data[0])||typeof L.data[0]=="object"||(L.data=[L.data])),$0(L.fields||[],L.data||[],b0);throw new Error("Unable to serialize unrecognized input");function $0(q0,x0,X0){var p0="";typeof q0=="string"&&(q0=JSON.parse(q0)),typeof x0=="string"&&(x0=JSON.parse(x0));var R0=Array.isArray(q0)&&0=this._config.preview;if(p)b.postMessage({results:D,workerId:r.WORKER_ID,finished:o0});else if(s(this._config.chunk)&&!E){if(this._config.chunk(D,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);D=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(D.data),this._completeResults.errors=this._completeResults.errors.concat(D.errors),this._completeResults.meta=D.meta),this._completed||!o0||!s(this._config.complete)||D&&D.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),o0||D&&D.meta.paused||this._nextChunk(),D}this._halted=!0},this._sendError=function(y){s(this._config.error)?this._config.error(y):p&&this._config.error&&b.postMessage({workerId:r.WORKER_ID,error:y,finished:!1})}}function l(L){var y;(L=L||{}).chunkSize||(L.chunkSize=r.RemoteChunkSize),a.call(this,L),this._nextChunk=o?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(E){this._input=E,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(y=new XMLHttpRequest,this._config.withCredentials&&(y.withCredentials=this._config.withCredentials),o||(y.onload=w(this._chunkLoaded,this),y.onerror=w(this._chunkError,this)),y.open(this._config.downloadRequestBody?"POST":"GET",this._input,!o),this._config.downloadRequestHeaders){var E=this._config.downloadRequestHeaders;for(var _ in E)y.setRequestHeader(_,E[_])}if(this._config.chunkSize){var I=this._start+this._config.chunkSize-1;y.setRequestHeader("Range","bytes="+this._start+"-"+I)}try{y.send(this._config.downloadRequestBody)}catch(D){this._chunkError(D.message)}o&&y.status===0&&this._chunkError()}},this._chunkLoaded=function(){y.readyState===4&&(y.status<200||400<=y.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:y.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(E){var _=E.getResponseHeader("Content-Range");return _===null?-1:parseInt(_.substring(_.lastIndexOf("/")+1))}(y),this.parseChunk(y.responseText)))},this._chunkError=function(E){var _=y.statusText||E;this._sendError(new Error(_))}}function W(L){var y,E;(L=L||{}).chunkSize||(L.chunkSize=r.LocalChunkSize),a.call(this,L);var _=typeof FileReader<"u";this.stream=function(I){this._input=I,E=I.slice||I.webkitSlice||I.mozSlice,_?((y=new FileReader).onload=w(this._chunkLoaded,this),y.onerror=w(this._chunkError,this)):y=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(I.target.result)},this._chunkError=function(){this._sendError(y.error)}}function g(L){var y;a.call(this,L=L||{}),this.stream=function(E){return y=E,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var E,_=this._config.chunkSize;return _?(E=y.substring(0,_),y=y.substring(_)):(E=y,y=""),this._finished=!y,this.parseChunk(E)}}}function d(L){a.call(this,L=L||{});var y=[],E=!0,_=!1;this.pause=function(){a.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){a.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(I){this._input=I,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){_&&y.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),y.length?this.parseChunk(y.shift()):E=!0},this._streamData=w(function(I){try{y.push(typeof I=="string"?I:I.toString(this._config.encoding)),E&&(E=!1,this._checkIsFinished(),this.parseChunk(y.shift()))}catch(D){this._streamError(D)}},this),this._streamError=w(function(I){this._streamCleanUp(),this._sendError(I)},this),this._streamEnd=w(function(){this._streamCleanUp(),_=!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 R(L){var y,E,_,I=Math.pow(2,53),D=-I,G=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,o0=/^((\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)))$/,b0=this,e0=0,g0=0,Y=!1,$0=!1,I0=[],q0={data:[],errors:[],meta:{}};if(s(L.step)){var x0=L.step;L.step=function(f0){if(q0=f0,R0())p0();else{if(p0(),q0.data.length===0)return;e0+=f0.data.length,L.preview&&e0>L.preview?E.abort():(q0.data=q0.data[0],x0(q0,b0))}}}function X0(f0){return L.skipEmptyLines==="greedy"?f0.join("").trim()==="":f0.length===1&&f0[0].length===0}function p0(){return q0&&_&&(d0("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+r.DefaultDelimiter+"'"),_=!1),L.skipEmptyLines&&(q0.data=q0.data.filter(function(f0){return!X0(f0)})),R0()&&function(){if(!q0)return;function f0(J0,Y0){s(L.transformHeader)&&(J0=L.transformHeader(J0,Y0)),I0.push(J0)}if(Array.isArray(q0.data[0])){for(var v0=0;R0()&&v0=I0.length?"__parsed_extra":I0[F]),L.transform&&(W0=L.transform(W0,z0)),W0=s0(z0,W0),z0==="__parsed_extra"?(c0[z0]=c0[z0]||[],c0[z0].push(W0)):c0[z0]=W0}return L.header&&(F>I0.length?d0("FieldMismatch","TooManyFields","Too many fields: expected "+I0.length+" fields but parsed "+F,g0+Y0):F=w0.length/2?`\r -`:"\r"}(f0,Y0)),_=!1,L.delimiter)s(L.delimiter)&&(L.delimiter=L.delimiter(f0),q0.meta.delimiter=L.delimiter);else{var F=function(z0,W0,E0,w0,c1){var p1,e1,m0,V0;c1=c1||[","," ","|",";",r.RECORD_SEP,r.UNIT_SEP];for(var z1=0;z1=G)return T1(!0)}else for(S0=e0,e0++;;){if((S0=Y.indexOf(y,S0+1))===-1)return I0||d0.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:s0.length,index:e0}),H1();if(S0===q0-1)return H1(Y.substring(e0,S0).replace(z1,y));if(y!==b0||Y[S0+1]!==b0){if(y===b0||S0===0||Y[S0-1]!==b0){m0!==-1&&m0=G)return T1(!0);break}d0.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:s0.length,index:e0}),S0++}}else S0++}return H1();function X1(N1){s0.push(N1),v0=e0}function U1(N1){var V1=0;if(N1!==-1){var s2=Y.substring(S0+1,N1);s2&&s2.trim()===""&&(V1=s2.length)}return V1}function H1(N1){return I0||(N1===void 0&&(N1=Y.substring(e0)),f0.push(N1),e0=q0,X1(f0),R0&&C1()),T1()}function B1(N1){e0=N1,X1(f0),f0=[],V0=Y.indexOf(_,e0)}function T1(N1){return{data:s0,errors:d0,meta:{delimiter:E,linebreak:_,aborted:g0,truncated:!!N1,cursor:v0+($0||0)}}}function C1(){D(T1()),s0=[],d0=[]}},this.abort=function(){g0=!0},this.getCharIndex=function(){return e0}}function h(L){var y=L.data,E=n[y.workerId],_=!1;if(y.error)E.userError(y.error,y.file);else if(y.results&&y.results.data){var I={abort:function(){_=!0,T(y.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:S,resume:S};if(s(E.userStep)){for(var D=0;D{const{time:n}=vo(e,b,M),{debugMode:c}=y1.getState(),r={result:{resourceSpans:[],result:[],length:0},raw:[],time:n,debugMode:c,dispatch:t,type:"traces",dsType:e,panel:M,id:b,ts:Date.now(),queryType:p,open:!0};ye(r)};async function Sz(e,t,M,b,o,p,n,c){var a,l,W,g,d,R,v,m,h,T,S,C,w,s,L,y,E,_,I;const{time:r}=vo(e,o,b),{debugMode:A}=y1.getState();if(e==="traces"){if(n==="trace-search"&&((l=(a=t==null?void 0:t.data)==null?void 0:a.traces)==null?void 0:l.length)>0){const D={result:t.data.traces||[],raw:t.data,time:r,debugMode:A,dispatch:M,dsType:e,type:e,panel:b,open:!0,id:o,ts:Date.now(),queryType:n};ye(D)}if(((g=(W=t==null?void 0:t.data)==null?void 0:W.resourceSpans)==null?void 0:g.length)>0){const D={result:(t==null?void 0:t.data)||[],raw:t==null?void 0:t.data,time:r,debugMode:A,dispatch:M,type:e,dsType:e,panel:b,open:!0,id:o,ts:Date.now(),queryType:n};ye(D)}}if(e==="flux"&&await eA(t==null?void 0:t.data).then(D=>{var G;if(((G=D==null?void 0:D.data)==null?void 0:G.length)>0){const o0={result:D.data||[],raw:D==null?void 0:D.data,time:r,debugMode:A,queryType:n,dispatch:M,dsType:e,type:e,panel:b,open:!0,id:o,ts:Date.now(),direction:p};ye(o0)}}),((R=(d=t==null?void 0:t.data)==null?void 0:d.streams)==null?void 0:R.length)===0){const D={result:[],raw:"[]",time:r,debugMode:A,queryType:n,dispatch:M,open:!0,type:"streams",dsType:e,panel:b,id:o,ts:Date.now(),direction:p,isLogsVolume:c};ye(D),M(se(!0))}if((v=t==null?void 0:t.data)!=null&&v.data){const D=(h=(m=t==null?void 0:t.data)==null?void 0:m.data)==null?void 0:h.result,G=(S=(T=t==null?void 0:t.data)==null?void 0:T.data)==null?void 0:S.resultType;let o0={hasStats:!1,statsData:{}};(w=(C=t==null?void 0:t.data)==null?void 0:C.data)!=null&&w.stats&&((y=Object.keys((L=(s=t==null?void 0:t.data)==null?void 0:s.data)==null?void 0:L.stats))==null?void 0:y.length)>0&&(o0={hasStats:!0,statsData:{...(_=(E=t==null?void 0:t.data)==null?void 0:E.data)==null?void 0:_.stats}});const b0=y1.getState()[b],e0=b0==null?void 0:b0.map(Y=>Y.id===o?{...Y,hasStats:(o0==null?void 0:o0.hasStats)||!1,statsData:(o0==null?void 0:o0.statsData)||{},open:!0}:Y);M(tA(b,e0)),M(R3(e));const g0={result:D,raw:(I=t==null?void 0:t.data)==null?void 0:I.data,time:r,debugMode:A,queryType:n,dispatch:M,type:G,dsType:e,open:!0,panel:b,id:o,ts:Date.now(),direction:p,isLogsVolume:c};ye(g0)}else Eb(M)}function MA(e){var o,p,n;const t=e.match(/\[(.*?)\]/gm),M=(t==null?void 0:t[0].replace(/\[\]']+/g,"").trim())||"";let b=0;if(Array.isArray(t)){const c=M.match(/^(?[0-9.]+)(?ns|us|ms|s|m|h)?$/),r=typeof((o=c==null?void 0:c.groups)==null?void 0:o.tnum)=="string"?parseInt((p=c==null?void 0:c.groups)==null?void 0:p.tnum):1,A=((n=c==null?void 0:c.groups)==null?void 0:n.trange)||"m";b=r/bA(A)}return b}function bA(e){const t=/^(ns|us|ms|s|m|h)$/,M={ns:1e9,us:1e6,s:1,m:.016666666666666666,h:.0002777777777777778},b=new Map(Object.entries(M));return t.test(e)&&typeof e=="string"?b.get(e)||1/60:b.get("m")||1/60}function xz(e,t){window.bosco.send(e,t)}function oA(e,t,M){if(e==="left")return t(c2(M));if(e==="right")return t(Q1(M))}function pA(e,t,M){return M(e==="left"?We(t):fe(t))}function zA(e,t,M){return[...e].map(b=>b.id===t?{...b,loading:M||!1}:b)}function x2(e,t,M,b,o,p,n="backwards",c="",r="",A=0,a=!1){var C,w,s,L,y,E;let l={url:"",requestHeaders:{},method:{value:""},headers:[],auth:{method:{value:"GET"},basicAuth:{value:!0},fields:{basicAuth:[{name:"user",value:""},{name:"password",value:""}]}},hasSettings:!1},W="",g="";if(c!==""){const _=y1.getState().dataSources,I=_.find(D=>D.id===c);if(I&&((C=Object.keys(I))==null?void 0:C.length)>0){const D=_.find(o0=>o0.id===c),G=l.url!==""?l.url:D.url;l={...D,url:G,hasSettings:!0}}if(((w=l==null?void 0:l.headers)==null?void 0:w.length)>0){let D={};for(let G of l.headers){const o0={[String(G.header)]:G.value};D={...D,...o0}}l.requestHeaders=D||{}}if((L=(s=l==null?void 0:l.auth)==null?void 0:s.basicAuth)!=null&&L.value){const D=(E=(y=l==null?void 0:l.auth)==null?void 0:y.fields)==null?void 0:E.basicAuth;for(let G of D)(G==null?void 0:G.name)==="user"&&(G.value,W=G.value),(G==null?void 0:G.name)==="password"&&(G.value,g=G.value);l.requestHeaders={...l.requestHeaders}}}const d=(_,I)=>{const D=y1.getState()[o];oA(o,_,zA(D,p,I))},{debugMode:R}=y1.getState(),v=cs(e,l.requestHeaders),m=MA(t),h=Ws(e,t,b,m,n,l.url||"",M,r,A,p,o),T=ns(e,M,h),S=(_,I)=>{var o0;const D=(o0=y1.getState())==null?void 0:o0[`${o}DataView`],G=D==null?void 0:D.find(b0=>b0.id===p);G&&(G.loading=_),pA(o,D,I)};return async function(_){var D,G,o0,b0;S(!0,_),d(_,!0);let I;if(r===""){M==="trace-search"&&Tz(e,_,o,p,n,M),d(_,!1);return}if(t===""&&M!=="trace-search"){e==="traces"&&Tz(e,_,o,p,n,M),d(_,!1);return}typeof I<"u"&&I.cancel("Cancelling the previous request"),I=f2.CancelToken.source(),v.cancelToken=I.token;try{(v==null?void 0:v.method)==="POST"?await((G=(D=f2)==null?void 0:D.post(T,t,v))==null?void 0:G.then(e0=>{Sz(e,e0,_,o,p,n,M)}).catch(e0=>{Eb(_),_(se(!0)),S(!1,_),R&&console.log("Error loading flux data",e0)}).finally(()=>{S(!1,_),d(_,!1)})):(v==null?void 0:v.method)==="GET"&&await((b0=(o0=f2)==null?void 0:o0.get(T,{auth:{username:W,password:g},...v}))==null?void 0:b0.then(e0=>{Sz(e,e0||{data:{data:[]}},_,o,p,n,M,a),R&&xz({level:"info",id:p,type:e,direction:n},p),d(_,!1)}).catch(e0=>{Eb(_),_(se(!0)),S(!1,_),d(_,!1),R&&(xz({level:"error",id:p,type:e,direction:n},p),console.log("getting an error from response: ",e0))}).finally(()=>{d(_,!1),S(!1,_)}))}catch(e0){d(_,!1),console.log(e0)}}}var yo={},nA=m1;Object.defineProperty(yo,"__esModule",{value:!0});var hM=yo.default=void 0,cA=nA(L1()),rA=t1;hM=yo.default=(0,cA.default)((0,rA.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5-1-1h-5l-1 1H5v2h14V4z"}),"DeleteOutline");var To={},iA=m1;Object.defineProperty(To,"__esModule",{value:!0});var So=To.default=void 0,OA=iA(L1()),aA=t1;So=To.default=(0,OA.default)((0,aA.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");var xo={},sA=m1;Object.defineProperty(xo,"__esModule",{value:!0});var er=xo.default=void 0,AA=sA(L1()),Xz=t1;er=xo.default=(0,AA.default)([(0,Xz.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 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"},"0"),(0,Xz.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"AccessTime");var Xo={},lA=m1;Object.defineProperty(Xo,"__esModule",{value:!0});var tr=Xo.default=void 0,dA=lA(L1()),uA=t1;tr=Xo.default=(0,dA.default)((0,uA.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-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z"}),"Launch");var wo={},qA=m1;Object.defineProperty(wo,"__esModule",{value:!0});var V2=wo.default=void 0,fA=qA(L1()),WA=t1;V2=wo.default=(0,fA.default)((0,WA.jsx)("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6z"}),"KeyboardArrowRight");var Co={},hA=m1;Object.defineProperty(Co,"__esModule",{value:!0});var Mr=Co.default=void 0,gA=hA(L1()),RA=t1;Mr=Co.default=(0,gA.default)((0,RA.jsx)("path",{d:"m15 3 2.3 2.3-2.89 2.87 1.42 1.42L18.7 6.7 21 9V3zM3 9l2.3-2.3 2.87 2.89 1.42-1.42L6.7 5.3 9 3H3zm6 12-2.3-2.3 2.89-2.87-1.42-1.42L5.3 17.3 3 15v6zm12-6-2.3 2.3-2.87-2.89-1.42 1.42 2.89 2.87L15 21h6z"}),"ZoomOutMap");var Eo={},mA=m1;Object.defineProperty(Eo,"__esModule",{value:!0});var br=Eo.default=void 0,LA=mA(L1()),NA=t1;br=Eo.default=(0,LA.default)((0,NA.jsx)("path",{d:"M9 9V3H7v2.59L3.91 2.5 2.5 3.91 5.59 7H3v2zm12 0V7h-2.59l3.09-3.09-1.41-1.41L17 5.59V3h-2v6zM3 15v2h2.59L2.5 20.09l1.41 1.41L7 18.41V21h2v-6zm12 0v6h2v-2.59l3.09 3.09 1.41-1.41L18.41 17H21v-2z"}),"ZoomInMap");var ko={},vA=m1;Object.defineProperty(ko,"__esModule",{value:!0});var He=ko.default=void 0,BA=vA(L1()),yA=t1;He=ko.default=(0,BA.default)((0,yA.jsx)("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDownOutlined");const TA=h0("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 wz({clearHistory:e,dialogType:t}){const[M,b]=q.useState(!1),o=K0(),p=()=>{b(!0)},n=()=>{b(!1)};function c(){e(),b(!1)}return O(ga,{theme:o,children:P("div",{children:[O(x1,{title:"Clear Query History",children:O(la,{onClick:p,children:"Clear History"})}),O(lo,{open:M,onClose:n,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",PaperProps:{classes:{root:uo}},children:P(TA,{children:[P(da,{id:"alert-dialog-title",children:["Are you sure you want to clear the ",t," ","History?"]}),O(ua,{children:P(qa,{id:"alert-dialog-description",children:["Click ‘Clear History’ to delete your"," ",t," history permanently"]})}),P(fa,{children:[O(Wa,{onClick:n,children:"Cancel"}),O(ha,{active:!0,onClick:c,autoFocus:!0,children:"Clear History"})]})]})})]})})}function or({message:e}){return O(Ra,{children:e})}function SA({onClose:e}){return O(ma,{onClick:e,children:O(qo,{style:{height:"16px",width:"16px"}})})}const pr=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(M=>{const[b,o]=e[M];t[b]=o}),t};function je(e){return Object.keys(e)}function _o(e,t){if(!e)throw new Error(t)}function Io(e,t){return t}const Do=e=>{const t=e.length;let M=0,b="";for(;Mo===t[p]).indexOf(!1)>=0)&&(b.current={v:e(),prevDeps:[...t]}),b.current.v}function XA(e){return e instanceof Object&&!("styles"in e)&&!("length"in e)&&!("__emotion_styles"in e)}const{createCssAndCx:wA}=(()=>{function e(M,b,o){const p=[],n=Ja(M,p,o);return p.length<2?o:n+b(p)}function t(M){const{cache:b}=M,o=(...n)=>{const c=Ga(n,b.registered);Qa(b,c,!1);const r=`${b.key}-${c.name}`;e:{const A=n[0];if(!XA(A))break e;Cz.saveClassNameCSSObjectMapping(b,r,A)}return r};return{css:o,cx:(...n)=>{const c=Do(n),r=Cz.fixClassName(b,c,o);return e(b.registered,o,r)}}}return{createCssAndCx:t}})();function zr(e){const{useCache:t}=e;function M(){const b=t(),{css:o,cx:p}=xA(()=>wA({cache:b}),[b]);return{css:o,cx:p}}return{useCssAndCx:M}}const Cz=(()=>{const e=new WeakMap;return{saveClassNameCSSObjectMapping:(t,M,b)=>{let o=e.get(t);o===void 0&&(o=new Map,e.set(t,o)),o.set(M,b)},fixClassName:(()=>{function t(M){let b=!1;return M.map(([o,p])=>{if(p===void 0)return o;let n;if(b)n={"&&":p};else{n=o;for(const c in p)if(c.startsWith("@media")){b=!0;break}}return n})}return(M,b,o)=>{const p=e.get(M);return Do(t(b.split(" ").map(n=>[n,p==null?void 0:p.get(n)])).map(n=>typeof n=="string"?n:o(n)))}})()}})();function Fe(e){if(!(e instanceof Object)||typeof e=="function")return e;const t=[];for(const M in e){const b=e[M],o=typeof b;if(!(o==="string"||o==="number"&&!isNaN(b)||o==="boolean"||b===void 0||b===null))return e;t.push(`${M}:${o}_${b}`)}return"xSqLiJdLMd9s"+t.join("|")}function Po(e,t,M){if(!(t instanceof Object))return e;const b={};return je(e).forEach(o=>b[o]=M(e[o],t[o])),je(t).forEach(o=>{if(o in e)return;const p=t[o];typeof p=="string"&&(b[o]=p)}),b}const nr=({classes:e,theme:t,muiStyleOverridesParams:M,css:b,cx:o,name:p})=>{var n,c;e:{if(p==="makeStyle no name"){p=void 0;break e}if(M!==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 A=q.useMemo(()=>{if(r===void 0)return;const a={};for(const l in r){const W=r[l];W instanceof Object&&(a[l]=b(typeof W=="function"?W(Object.assign({theme:t,ownerState:M==null?void 0:M.ownerState},M==null?void 0:M.props)):W))}return a},[r,Fe(M==null?void 0:M.props),Fe(M==null?void 0:M.ownerState),b]);return e=q.useMemo(()=>Po(e,A,o),[e,A,o]),{classes:e}};let CA=0;function cr(e){const{useTheme:t,cache:M}=e,{useCache:b}=rr({cacheProvidedAtInception:M}),{useCssAndCx:o}=zr({useCache:b});function p(c){const{name:r,uniqId:A=`${CA++}`}=c??{},a=typeof r!="object"?r:Object.keys(r)[0];return function(l){const W=typeof l=="function"?l:()=>l;return function(d,R){const v=t();let{css:m,cx:h}=o();const T=b();let S=q.useMemo(()=>{const C={},w=typeof Proxy<"u"&&new Proxy({},{get:(y,E)=>(typeof E=="symbol"&&_o(!1),C[E]=`${T.key}-${A}${a!==void 0?`-${a}`:""}-${E}-ref`)}),s=W(v,d,w||{}),L=pr(je(s).map(y=>{const E=s[y];return E.label||(E.label=`${a!==void 0?`${a}-`:""}${y}`),[y,`${m(E)}${Io(y,y in C)?` ${C[y]}`:""}`]}));return je(C).forEach(y=>{y in L||(L[y]=C[y])}),L},[T,m,h,v,Fe(d)]);{const C=R==null?void 0:R.props.classes;S=q.useMemo(()=>Po(S,C,h),[S,Fe(C),h])}{const C=nr({classes:S,css:m,cx:h,name:a??"makeStyle no name",idOfUseStyles:A,muiStyleOverridesParams:R,theme:v});C.classes!==void 0&&(S=C.classes),C.css!==void 0&&(m=C.css),C.cx!==void 0&&(h=C.cx)}return{classes:S,theme:v,css:m,cx:h}}}}function n(){const c=t(),{css:r,cx:A}=o();return{theme:c,css:r,cx:A}}return{makeStyles:p,useStyles:n}}const EA=q.createContext(void 0),{createUseCache:rr}=(()=>{function e(){return q.useContext(EA)}function t(M){const{cacheProvidedAtInception:b}=M;function o(){var p;const n=Ya(),c=e(),r=(p=b??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:o}}return{createUseCache:t}})();function Ez(e){return e.charAt(0).toUpperCase()+e.slice(1)}var kz=function(e,t){var M={};for(var b in e)Object.prototype.hasOwnProperty.call(e,b)&&t.indexOf(b)<0&&(M[b]=e[b]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,b=Object.getOwnPropertySymbols(e);o{const g=p,d=function(R){var{children:v}=R,m=kz(R,["children"]);return q.createElement(g,m,v)};return Object.defineProperty(d,"name",{value:Ez(g)}),d})():p,A=(()=>{{const{name:d}=c??{};if(d!==void 0)return typeof d!="object"?d:Object.keys(d)[0]}let g;e:{const d=r.displayName;if(typeof d!="string"||d==="")break e;g=d}e:{if(g!==void 0)break e;const d=r.name;if(typeof d!="string"||d==="")break e;g=d}if(g!==void 0)return g=g.replace(/\$/g,"usd"),g=g.replace(/\(/g,"_").replace(/\)/g,"_"),g=g.replace(/[^a-zA-Z0-9-_]/g,"_"),g})(),a=b(Object.assign(Object.assign({},c),{name:A}))(typeof n=="function"?(g,d,R)=>Iz(n(g,d,R)):Iz(n));function l(g){for(const d in g)if(d!=="root")return!0;return!1}const W=q.forwardRef(function(g,d){const{className:R,classes:v}=g,m=kz(g,["className","classes"]),{classes:h,cx:T}=a(g,{props:g}),S=T(h.root,R);return ir.set(h,Object.assign(Object.assign({},h),{root:S})),n2.createElement(r,Object.assign({ref:d,className:l(h)?R:S},typeof p=="string"?{}:{classes:h},m))});return A!==void 0&&(W.displayName=`${Ez(A)}WithStyles`,Object.defineProperty(W,"name",{value:W.displayName})),W}return o.getClasses=_A,{withStyles:o}}const ir=new WeakMap,_z="getClasses should only be used in conjunction with withStyles";function _A(e){const t=e.classes;if(t===void 0)throw new Error(_z);const M=ir.get(t);if(M===void 0)throw new Error(_z);return M}function Iz(e){const t={},M={};return Object.keys(e).forEach(b=>(b.startsWith("@media")?M:t)[b]=e[b]),Object.keys(M).forEach(b=>{const o=M[b];Object.keys(o).forEach(p=>{var n;return t[p]=Object.assign(Object.assign({},(n=t[p])!==null&&n!==void 0?n:{}),{[b]:o[p]})})}),t}const IA=!(typeof document=="object"&&typeof(document==null?void 0:document.getElementById)=="function")&&!(typeof jest<"u")&&!(typeof mocha<"u")&&!(typeof __vitest_worker__<"u");var DA=function(e,t){var M={};for(var b in e)Object.prototype.hasOwnProperty.call(e,b)&&t.indexOf(b)<0&&(M[b]=e[b]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,b=Object.getOwnPropertySymbols(e);o({classes:r,cx:A,css:a})),name:void 0,doesUseNestedSelectors:!1})}}let ar=0;const Y2=[];function Yt(e){const{useContext:t,useCache:M,useCssAndCx:b,usePlugin:o,name:p,doesUseNestedSelectors:n}=e;return{withParams:()=>Yt(Object.assign({},e)),withName:c=>Yt(Object.assign(Object.assign({},e),{name:typeof c!="object"?c:Object.keys(c)[0]})),withNestedSelectors:()=>Yt(Object.assign(Object.assign({},e),{doesUseNestedSelectors:!0})),create:c=>{const r=`x${ar++}`;if(p!==void 0)for(;;){const a=Y2.find(l=>l.name===p);if(a===void 0)break;Y2.splice(Y2.indexOf(a),1)}const A=typeof c=="function"?c:()=>c;return function(l){var W,g,d;const R=l??{},{classesOverrides:v}=R,m=DA(R,["classesOverrides"]),h=t(),{css:T,cx:S}=b(),C=M();let w=q.useMemo(()=>{const L={},y=A(Object.assign(Object.assign(Object.assign({},l),h),n?{classes:typeof Proxy>"u"?{}:new Proxy({},{get:(_,I)=>{if(typeof I=="symbol"&&_o(!1),IA&&p===void 0)throw new Error(["tss-react: In SSR setups, in order to use nested selectors, you must also give a unique name to the useStyle function.",'Solution: Use tss.withName("ComponentName").withNestedSelectors<...>()... to set a name.'].join(` -`));e:{if(p===void 0)break e;let D=Y2.find(G=>G.name===p&&G.idOfUseStyles===r);D===void 0&&(D={name:p,idOfUseStyles:r,nestedSelectorRuleNames:new Set},Y2.push(D)),D.nestedSelectorRuleNames.add(I)}e:{if(p===void 0||!(Y2.find(G=>G.name===p&&G.idOfUseStyles!==r&&G.nestedSelectorRuleNames.has(I))!==void 0))break e;throw new Error([`tss-react: There are in your codebase two different useStyles named "${p}" that`,`both use use the nested selector ${I}. -`,`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<...>()...'].join(" "))}return L[I]=`${C.key}-${p!==void 0?p:r}-${I}-ref`}})}:{})),E=pr(je(y).map(_=>{const I=y[_];return I.label||(I.label=`${p!==void 0?`${p}-`:""}${_}`),[_,`${T(I)}${Io(_,_ in L)?` ${L[_]}`:""}`]}));return je(L).forEach(_=>{_ in E||(E[_]=L[_])}),E},[C,T,S,Fe(l),...Object.values(h)]);w=q.useMemo(()=>Po(w,v,S),[w,Fe(v),S]);const s=o(Object.assign(Object.assign({classes:w,css:T,cx:S,idOfUseStyles:r,name:p},h),m));return Object.assign({classes:(W=s.classes)!==null&&W!==void 0?W:w,css:(g=s.css)!==null&&g!==void 0?g:T,cx:(d=s.cx)!==null&&d!==void 0?d:S},h)}}}}function PA(e){return Object.assign(Object.assign({},cr(e)),kA(e))}const{tss:HA}=Or({useContext:()=>({})});HA.create({});const{makeStyles:lN,withStyles:Ho}=PA({useTheme:Ao}),{tss:jA}=Or({useContext:function(){return{theme:Ao()}},usePlugin:nr});jA.create({});var jo={},FA=m1;Object.defineProperty(jo,"__esModule",{value:!0});var Fo=jo.default=void 0,VA=FA(L1()),$A=t1;Fo=jo.default=(0,VA.default)((0,$A.jsx)("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft");var Vo={},UA=m1;Object.defineProperty(Vo,"__esModule",{value:!0});var sr=Vo.default=void 0,KA=UA(L1()),GA=t1;sr=Vo.default=(0,KA.default)((0,GA.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight");const QA=["Jan","Feb","Mar","Apr","May","June","July","Aug","Sept","Oct","Nov","Dec"],JA=["Su","Mo","Tu","We","Th","Fr","Sa"],ne={FIRST_MONTH:Symbol("firstMonth"),SECOND_MONTH:Symbol("secondMonth")},_b="dateTimeRange",YA=y1.getState().theme,ZA={light:qc,dark:fc},Te=ZA[YA],el=()=>({iconContainer:{padding:5,color:Te.contrast},icon:{padding:10,color:Te.contrast,"&:hover":{color:Te.contrast,background:"none"}},selector:{color:Te.contrast,borderBottom:`1px solid ${Te.contrast}`}}),tl=()=>{const e=y1.getState().theme;return $O({palette:{mode:e,primary:{main:Te.contrast}}})},Dz=h0("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,";}"),Ml=({date:e,classes:t,setDate:M,nextDisabled:b,prevDisabled:o,onClickNext:p,onClickPrevious:n})=>{const c=K0(),r=a=>{M(Ma(e,parseInt(a.target.value)))},A=a=>{M(ba(e,parseInt(a.target.value)))};return O(Nc,{theme:c,children:P(z2,{container:!0,justifyContent:"space-between",alignItems:"center",style:{marginTop:"20px"},children:[O(z2,{item:!0,className:t.iconContainer,children:O(Tb,{disabled:o,onClick:n,children:O(Fo,{style:{color:o?c.lightContrast:c.contrast}})})}),O(z2,{item:!0,children:O(Dz,{value:ea(e),onChange:r,children:QA.map((a,l)=>O("option",{value:l,children:a},a))})}),O(z2,{item:!0,children:O(Dz,{value:ta(e),onChange:A,children:ls(e,30).map(a=>O("option",{className:"custom-option",value:a,children:a},a))})}),O(z2,{item:!0,className:t.iconContainer,children:O(Tb,{disabled:b,onClick:p,children:O(sr,{style:{color:b?c.lightContrast:c.contrast}})})})]})})},bl=Ho(Ml,el),ol=()=>({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"}}),pl=e=>{const{classes:t}=e;return O(f1,{theme:tl,children:O("div",{className:ob(t.buttonContainer,e.startOfRange&&t.leftBorderRadius,e.endOfRange&&t.rightBorderRadius,!e.disabled&&e.highlighted&&t.highlighted,e.disabled&&t.disabled),children:O(Tb,{className:ob(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(vc,{color:e.disabled?"text.secondary":"text.primary",className:ob(t.maxContrast,!e.disabled&&e.filled&&t.contrast,e.disabled&&t.inactive),variant:"body2",children:e.value})})})})},zl=Ho(pl,ol),Pz={Previous:-1,Next:1},nl=e=>({root:{width:260,background:e.background},weekDaysContainer:{marginTop:5,paddingLeft:30,paddingRight:30},daysContainer:{paddingLeft:15,paddingRight:15,marginTop:10,marginBottom:20}}),cl=e=>{const t=K0(),[M,b]=q.useState(t),{classes:o,helpers:p,handlers:n,value:c,dateRange:r,marker:A,setValue:a,minDate:l,maxDate:W}=e,[g,d]=e.navState;return q.useEffect(()=>{b(t)},[t,b]),O(f1,{theme:t,children:O(Wc,{square:!0,elevation:0,className:o.root,style:{background:t.background},children:P(z2,{container:!0,children:[O(bl,{date:c,setDate:a,nextDisabled:!d,prevDisabled:!g,onClickPrevious:()=>n.onMonthNavigate(A,Pz.Previous),onClickNext:()=>n.onMonthNavigate(A,Pz.Next)}),O(z2,{item:!0,container:!0,direction:"row",justifyContent:"space-between",className:o.weekDaysContainer,children:JA.map(R=>O("div",{style:{color:t.contrast,fontSize:"10px"},children:R},R))}),O(z2,{item:!0,container:!0,direction:"column",justifyContent:"space-between",className:o.daysContainer,children:rs(is(c),7).map((R,v)=>O(z2,{container:!0,direction:"row",justifyContent:"center",children:R.map(m=>{const h=Os(r,m),T=as(r,m),S=As(r),C=ss(r,m)||p.inHoverRange(m);return O(zl,{themeSelected:M,filled:h||T,outlined:oa(m),highlighted:C&&!S,disabled:!Oo(c,m)||!io(m,{start:l,end:W}),startOfRange:h&&!S,endOfRange:T&&!S,onClick:()=>n.onDayClick(m),onHover:()=>n.onDayHover(m),value:pa(m)},X2(m,"mm-dd-yyyy"))})},v))})]})})})},Le=Ho(cl,nl),rl=h0("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,";}}"),Hz=e=>{const t=K0();return O(f1,{theme:t,children:O(rl,{children:e.ranges.map((M,b)=>O("button",{onClick:()=>{e.setRange(M),e.onClose()},children:O("span",{style:{fontWeight:Lz(M,e.selectedRange)?"bold":"normal",color:Lz(M,e.selectedRange)?"orange":t.contrast,whiteSpace:"nowrap"},children:M.label})},b))})})};var $o={},il=m1;Object.defineProperty($o,"__esModule",{value:!0});var gM=$o.default=void 0,Ol=il(L1()),al=t1;gM=$o.default=(0,Ol.default)((0,al.jsx)("path",{d:"M6.23 20.23 8 22l10-10L8 2 6.23 3.77 14.46 12z"}),"ArrowForwardIos");var Uo={},sl=m1;Object.defineProperty(Uo,"__esModule",{value:!0});var Ib=Uo.default=void 0,Al=sl(L1()),ll=t1;Ib=Uo.default=(0,Al.default)((0,ll.jsx)("path",{d:"M9 11H7v2h2zm4 0h-2v2h2zm4 0h-2v2h2zm2-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-2m0 16H5V9h14z"}),"DateRange");const dl=h0("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,";}}}}"),ul=h0(Wo,{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,";}"),jz=h0(Wo,{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 Fz({getEditedStartDate:e,getEditedEndDate:t,handleStart:M,handleStop:b,onTimeRangeSet:o,setCalendarOpen:p,isFullCalendar:n,setStopCalendar:c,setStartCalendar:r,startCalendarOpen:A,stopCalendarOpen:a,isHorizontal:l,styles:W,isMobile:g}){const d=K0();function R(){n?p(m=>!m):(p(m=>!(m&&A)),c(()=>!1),r(m=>!m))}function v(){n?p(m=>!m):(p(m=>!(m&&a)),r(()=>!1),c(m=>!m))}return O(f1,{theme:d,children:P(dl,{isDisplay:W,children:[P("div",{className:"time-selectors",children:[O("span",{className:"label",children:"From"}),P("div",{className:"input-group",children:[O("input",{className:"date-time-ranged",value:o1(e()),onChange:m=>M(m,!1),onBlur:m=>M(m,!0)}),O(jz,{onClick:R,children:O(Ib,{style:{height:"16px",width:"16px"}})})]})]}),P("div",{className:"time-selectors",children:[O("span",{className:"label",children:"To"}),P("div",{className:"input-group",children:[O("input",{className:"date-time-ranged",value:o1(t()),onChange:m=>b(m,!1),onBlur:m=>b(m,!0)}),O(jz,{onClick:v,children:O(Ib,{style:{height:"16px",width:"16px"}})})]})]}),O(ul,{isHorizontal:l,isMobile:g,onClick:m=>{o(m)},children:"Apply Time Range"})]})})}const ql=h0("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;}"),fl=h0("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;}"),Wl=e=>{const{ranges:t,dateRange:M,minDate:b,maxDate:o,firstMonth:p,setFirstMonth:n,secondMonth:c,setSecondMonth:r,setDateRange:A,helpers:a,handlers:l}=e,W=K0(),[g,d]=q.useState(!1),R={label:"Last 5 minutes",dateStart:new Date(Date.now()-5*6e4),dateEnd:new Date(Date.now())},v=za(c,p)>=2,m={dateRange:M,minDate:b,maxDate:o,helpers:a,handlers:l},h=_1(),[T,S]=q.useState(M.dateStart),[C,w]=q.useState(M.dateEnd),[s,L]=q.useState(!0),[y]=q.useState(M.label)||R.label,E=W2.useMediaQuery({query:"(min-width: 1013px)"}),_=W2.useMediaQuery({query:"(max-width: 1013px)"}),I=W2.useMediaQuery({query:"(orientation: portrait)"}),D=H0(p0=>p0.isSplit),[G,o0]=q.useState(!1),[b0,e0]=q.useState(!1);q.useEffect(()=>{if(y){const p0=WM(y);S(p0.dateStart),w(p0.dateEnd)}},[w,S,y]);const g0=(p0,R0)=>{p0.preventDefault();const s0=new Date(p0.target.value);R0&&q2(s0)?w(s0):w(p0.target.value)},Y=(p0,R0)=>{p0.preventDefault();const s0=new Date(p0.target.value);R0&&q2(s0)?S(s0):S(p0.target.value)},$0=p0=>{p0.preventDefault();const R0=new Date(T),s0=new Date(C);D2(R0)&&!_t(M.dateStart,R0)&&(h(Ro(R0)),S(R0)),q2(s0)&&!_t(M.dateEnd,s0)&&(h(mo(s0)),w(s0));const d0=q2(s0)&&D2(R0),f0=xe(R0,s0),v0=!_t(M.dateStart,R0)||!_t(M.dateEnd,s0);d0&&f0&&v0?(h(Lo("")),A({dateStart:R0,dateEnd:s0}),I0({dateStart:R0,dateEnd:s0}),e.onClose(p0)):f0||console.log("Invalid time range")},I0=p0=>{localStorage.setItem(_b,JSON.stringify(p0))},q0=()=>q2(T)?X2(T,"yyy-MM-dd HH:mm:ss"):T,x0=()=>q2(C)?X2(C,"yyy-MM-dd HH:mm:ss"):typeof C<"u"?C:"",X0=()=>{L(p0=>!p0)};return O(f1,{theme:W,children:O(fl,{children:O(Wc,{className:"container",elevation:5,children:P(z2,{display:"flex",style:{flex:"1"},children:[g&&E&&P(z2,{container:!0,direction:"row",wrap:"nowrap",children:[O(Le,{...m,value:p,setValue:n,navState:[!0,v],marker:ne.FIRST_MONTH}),O("div",{className:"divider"}),O(Le,{...m,value:c,setValue:r,navState:[v,!0],marker:ne.SECOND_MONTH})]}),g&&!E&&!I&&!s&&!D&&P(z2,{container:!0,direction:"row",wrap:"nowrap",children:[G&&O(Le,{...m,value:p,setValue:n,navState:[!0,v],marker:ne.FIRST_MONTH}),b0&&O(Le,{...m,value:c,setValue:r,navState:[v,!0],marker:ne.SECOND_MONTH})]}),P(z2,{display:"flex",flex:1,children:[P("div",{style:{display:"flex",flexDirection:"column",flex:"1"},children:[_&&P(q1,{children:[O("div",{style:{maxHeight:I?"60vh":"50vh",overflowY:"auto",display:s?"flex":"none",flex:1,flexDirection:"column"},children:O(Hz,{selectedRange:M,isHorizontal:!I,ranges:t,setRange:A,onClose:e.onClose})}),O(Fz,{styles:!s,getEditedStartDate:q0,isHorizontal:!I,isMobile:!0,isFullCalendar:!1,getEditedEndDate:x0,handleStart:Y,handleStop:g0,onTimeRangeSet:$0,calendarOpen:g,stopCalendarOpen:b0,startCalendarOpen:G,setCalendarOpen:d,setStopCalendar:e0,setStartCalendar:o0}),_&&P(ql,{onClick:X0,theme:W,children:[O("span",{children:s?"Set Absolute Time":"Set Relative Time"}),O(gM,{className:O0({name:"rnnx2x",styles:"font-size:12px"})})]})]}),!_&&O(Fz,{styles:!0,isMobile:!1,isFullCalendar:!0,getEditedStartDate:q0,getEditedEndDate:x0,handleStart:Y,handleStop:g0,onTimeRangeSet:$0,calendarOpen:g,setCalendarOpen:d}),g&&_&&!s&&P(z2,{container:!0,direction:"row",wrap:"nowrap",children:[G&&O(Le,{...m,value:p,setValue:n,navState:[!0,v],marker:ne.FIRST_MONTH}),b0&&O(Le,{...m,value:c,setValue:r,navState:[v,!0],marker:ne.SECOND_MONTH})]})]}),O("div",{className:"divider"}),E&&O(z2,{style:{display:"flex",flex:1},children:O(Hz,{selectedRange:M,ranges:t,setRange:A,onClose:e.onClose})})]})]})})})})};function hl(){const e=_1(),t=q.useRef(null),M=o=>{o.key==="Escape"&&e(qz(!1))},b=o=>{t.current&&!t.current.contains(o.target)&&e(qz(!1))};return q.useEffect(()=>(document.addEventListener("keydown",M,!0),document.addEventListener("click",b,!0),()=>{document.removeEventListener("keydown",M,!0),document.removeEventListener("click",b,!0)})),{ref:t}}var Ko={},gl=m1;Object.defineProperty(Ko,"__esModule",{value:!0});var Ar=Ko.default=void 0,Rl=gl(L1()),ml=t1;Ar=Ko.default=(0,Rl.default)((0,ml.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 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8m.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z"}),"AccessTimeOutlined");var Go={},Ll=m1;Object.defineProperty(Go,"__esModule",{value:!0});var lr=Go.default=void 0,Nl=Ll(L1()),vl=t1;lr=Go.default=(0,Nl.default)((0,vl.jsx)("path",{d:"M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6z"}),"KeyboardArrowLeft");const Bl=h0("div",{target:"e13b6hz0"})({name:"12m2hdf",styles:'display:flex;flex-direction:column;justify-content:"center";padding:"3px";.time-span{text-align:center;}'});function yl({dateRange:e}){const t=K0();return O(f1,{theme:t,children:P(Bl,{children:[O("span",{className:"time-span",children:q2(e.dateStart)?X2(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)?X2(e.dateEnd,"yyyy/MM/dd HH:mm:ss"):typeof e.dateEnd<"u"?e.dateEnd:""})]})})}const nt=O0({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;}}"}),Tl=e=>{try{let t=localStorage.getItem(e);if(typeof t=="string"){let M=JSON.parse(t);if(M.dateStart&&M.dateEnd)return JSON.parse(t)}}catch(t){return console.log(t),{dateStart:"",dateEnd:""}}},Db=e=>O(La,{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}),Vz=["1m","5m","10m","30m","1h","3h","6h","12h","24h"];function Sl(e){const t=Date.now(),{id:M,minDate:b,maxDate:o,startTs:p,stopTs:n,label:c,onLabelChange:r,onStartChange:A,onStopChange:a,pickerOpen:l,onPickerOpen:W}=e,g=W2.useMediaQuery({query:"(max-width: 1013px)"}),d=H0(m0=>m0.isSplit),R=q.useMemo(()=>!g&&!d,[g,d]),v=K0(),m={label:"Last 5 minutes",dateStart:new Date(Date.now()-5*6e4),dateEnd:new Date(Date.now())},h=()=>{try{const m0=Tl(_b);if(!m0)return m;if((m0==null?void 0:m0.label)!==""&&typeof m0.label<"u"){const V0=WM(m0==null?void 0:m0.label);m0.dateStart=V0.dateStart,m0.dateEnd=V0.dateEnd}else m0.dateStart=new Date(m0.dateStart),m0.dateEnd=new Date(m0.dateEnd);return m0}catch{if(D2(p)&&D2(n))return{dateStart:p,dateEnd:n}}},T=mz(b,rz(t,-10)),S=mz(o,rz(t,10)),[C,w]=ds(h()||{},T,S),[s,L]=q.useState({...h()}),[y,E]=q.useState(),[_,I]=q.useState(C||t),[D,G]=q.useState(w||Ot(_,1)),o0=q.useMemo(()=>({dateStart:p,dateEnd:n,label:c}),[p,n,c]);q.useEffect(()=>{r(o0.label)},[o0.label]);const{dateStart:b0,dateEnd:e0}=s,{ref:g0}=hl(),Y=m0=>{xe(m0,D)&&I(m0)},$0=m0=>{iz(m0,_)&&G(m0)},I0=m0=>{let{label:V0,dateStart:z1,dateEnd:S0}=m0;z1&&S0&&(m0.label=V0,m0.dateStart=z1=Rc([z1,T]),m0.dateEnd=S0=mc([S0,S]),L(m0),q0(m0),v0(m0),I(z1),G(Oo(z1,S0)?Ot(z1,1):S0))},q0=m0=>{localStorage.setItem(_b,JSON.stringify(m0))},x0=m0=>{if(b0&&!e0&&!xe(m0,b0)){const V0={dateStart:b0,dateEnd:m0};v0(V0),q0(V0),L(V0),r(""),R0()}else L({dateStart:m0,dateEnd:void 0});E(m0)},X0=(m0,V0)=>{if(m0===ne.FIRST_MONTH){const z1=Ot(_,V0);xe(z1,D)&&I(z1)}else{const z1=Ot(D,V0);xe(_,z1)&&G(z1)}},p0=m0=>{b0&&!e0&&(!y||!De(m0,y))&&E(m0)},R0=(m0=null)=>{m0==null||m0.preventDefault(),W(!1)},d0={inHoverRange:m0=>b0&&!e0&&y&&iz(y,b0)&&io(m0,{start:b0,end:y})},f0={onDayClick:x0,onDayHover:p0,onMonthNavigate:X0};function v0(m0){const{dateStart:V0,dateEnd:z1,label:S0}=m0,a1=D2(V0),w1=D2(z1),X1=typeof S0<"u";a1&&A(V0),w1&&a(z1),X1&&r(S0)}const J0=m0=>{m0.preventDefault(),l===!0?R0(m0):W(!0)},Y0=(m0,V0="range")=>{const z1=m0==="backward"?ca:ra;let S0={years:0,months:0,days:0,hours:0,minutes:0,seconds:0};V0==="range"?S0=na({start:b0,end:e0}):V0.includes("d")?S0.days=parseInt(V0):V0.includes("h")?S0.hours=parseInt(V0):V0.includes("m")?S0.minutes=parseInt(V0):V0.includes("s")&&(S0.seconds=parseInt(V0));const a1=z1(b0,S0),w1=z1(e0,S0),X1={dateStart:a1,dateEnd:w1,label:""};L(X1),q0(X1),v0(X1)},[F,c0]=q.useState(null),z0=!!F,[W0,E0]=q.useState(null),w0=!!W0,c1=m0=>{c0(()=>m0.currentTarget)},p1=m0=>{E0(()=>m0.currentTarget)},e1=(m0,V0,z1)=>{c0(null),E0(null),V0&&z1&&Y0(V0,z1)};return P("div",{style:{display:"flex"},children:[R&&P(q1,{children:[O(pt,{onClick:()=>{Y0("backward")},side:"left",attachedside:"r",emptySide:"l",className:P0(nt),children:O(lr,{})}),O(pt,{onClick:c1,attachedside:"both",side:"central",size:"small",className:P0(nt),"aria-controls":z0?"backward-menu":void 0,"aria-haspopup":"true","aria-expanded":z0?"true":void 0,children:O(He,{})}),O(Db,{id:"backward-menu",anchorEl:F,open:z0,onClose:e1,qryntheme:v,children:Vz.map(m0=>O(wb,{sx:{"&.MuiMenuItem-root":{fontSize:12}},onClick:V0=>e1(V0,"backward",m0),children:m0},`${m0} l`))})]}),O(x1,{title:c?O(yl,{dateRange:s}):"",children:P(pt,{onClick:J0,className:P0(nt),side:R?"central":"individual",attachedside:"both",children:[O(Ar,{}),O("span",{children:c||(q2(s.dateStart)?X2(s.dateStart,"yyyy/MM/dd HH:mm:ss"):s.dateStart)+"-"+(q2(s.dateEnd)?X2(s.dateEnd,"yyyy/MM/dd HH:mm:ss"):typeof s.dateEnd<"u"?s.dateEnd:"")})]})}),R&&P(q1,{children:[O(pt,{onClick:p1,id:`forward-button-${M}`,size:"small",side:"central",className:P0(nt),"aria-controls":w0?`forward-menu${M}`:void 0,"aria-haspopup":"true","aria-expanded":w0?"true":void 0,children:O(He,{})}),O(Db,{id:`forward-menu-${M}`,anchorEl:W0,open:w0,onClose:e1,qryntheme:v,children:Vz.map(m0=>O(wb,{sx:{"&.MuiMenuItem-root":{fontSize:12}},onClick:V0=>e1(V0,"forward",m0),children:m0},`${m0} r`))}),O(pt,{onClick:()=>{Y0("forward")},side:"right",attachedside:"l",className:P0(nt),children:O(V2,{})})]}),l?O("div",{tabIndex:0,ref:g0,children:O(f1,{theme:v,children:O(Wl,{dateRange:s,minDate:T,maxDate:S,ranges:No(new Date),firstMonth:_,secondMonth:D,setFirstMonth:Y,setSecondMonth:$0,setDateRange:I0,helpers:d0,handlers:f0,onClose:R0})})}):null]})}const xl=Sl;function Xl(e){const{historyTabHeader:t,historyTab:M,starredHistoryTab:b,closeButton:o,linksTabHeader:p,linksTab:n,settingTab:c,settingTabHeader:r}=e;return P(Sa,{defaultValue:0,children:[P(Bc,{children:[P(Xe,{children:[O(va,{}),O("span",{children:"Queries"})]}),P(Xe,{children:[O(Ba,{}),O("span",{children:"Links"})]}),P(Xe,{children:[O(ya,{}),O("span",{children:"Starred"})]}),P(Xe,{children:[O(Ta,{}),O("span",{children:"Settings"})]}),o]}),P(we,{value:0,children:[t,M]}),P(we,{value:1,children:[p,n]}),O(we,{value:2,children:b}),P(we,{value:3,children:[r,c]})]})}function wl({pos:e,item:t,copyLink:M,handleDelete:b,handleStarLinkItem:o,handleSubmit:p,label:n}){var v;const[c,r]=q.useState(!1),{fromDate:A,toDate:a,type:l,url:W,queryInput:g,limit:d}=t,R=()=>{r(m=>!m)};return P(Ea,{open:c,children:[O(Cl,{pos:e,onOpen:c}),O("button",{className:"open-button",onClick:()=>{R()},children:c?O(br,{fontSize:"small"}):O(Mr,{fontSize:"small"})}),P("div",{className:"inline-params",children:[O(x1,{title:"API URL",children:P("span",{style:{display:"flex",alignItems:"center"},children:[O(wc,{fontSize:"small",style:{marginRight:"3px"}})," ",W]})}),P("span",{style:{whiteSpace:"nowrap"},children:["limit: ",d]}),P("span",{style:{whiteSpace:"nowrap"},children:["step: ",(v=t==null?void 0:t.params)==null?void 0:v.step]}),P("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:[" ",O(x1,{title:`${A} - ${a}`,children:O(er,{style:{marginRight:"3px",height:"14px",width:"14px"}})})," ",P(Ca,{children:[A," - ",a]})]})]}),P("div",{className:"block-params",children:[P("p",{children:[O("span",{className:"key",children:" Query:"})," ",O("span",{className:"value",children:g})," "]}),P("p",{children:[O("span",{className:"key",children:" API URL:"})," ",O("span",{className:"value",children:W})," "]}),P("p",{children:[O("span",{className:"key",children:" Data Source Type:"})," ",O("span",{className:"value",children:l})," "]}),P("p",{children:[O("span",{className:"key",children:"From: "})," ",O("span",{className:"value",children:A})," "]}),P("p",{children:[O("span",{className:"key",children:" To: "})," ",P("span",{className:"value",children:[" ",a]})," "]}),P("p",{children:[O("span",{className:"key",children:"Limit: "})," ",O("span",{className:"value",children:d})," "]}),P("p",{children:[O("span",{className:"key",children:" Step:"})," ",O("span",{className:"value",children:t.params.step})," "]})]}),O(El,{item:t,onOpen:c,copyLink:M,handleDelete:b,handleStarLinkItem:o,handleSubmit:p,label:n})]})}function Cl({pos:e,onOpen:t}){return O("div",{style:{display:t?"none":"flex",width:"30vw"},children:P(yc,{children:["Link ",e," "]})})}function El(e){const{item:t,onOpen:M,copyLink:b,handleDelete:o,handleStarLinkItem:p,handleSubmit:n,label:c}=e,r=K0(),[A,a]=q.useState(null),l=!!A,[W,g]=q.useState(!1);return P("div",{style:{display:"flex",flexDirection:M?"column-reverse":"row",justifyContent:"space-between",alignItems:"center"},children:[O(q1,{children:O(x1,{title:"Copy Link to Clipboard",placement:"right-end",children:P("span",{style:{display:"flex"},children:[O(re,{onClick:()=>b(t==null?void 0:t.data,"link",W),isActive:!0,style:{flex:1},className:"URL-COPY",attachedside:"r",children:O(wc,{style:{height:"14px",width:"14px"},fontSize:"small"})}),O(re,{attachedside:"l",onClick:m=>{a(()=>m.currentTarget),g(()=>W)},size:"small",className:"date-time-selector","aria-controls":l?"backward-menu":void 0,"aria-haspopup":"true","aria-expanded":l?"true":void 0,children:O(He,{fontSize:"small"})}),O(Db,{id:"backward-menu",anchorEl:A,open:l,onClose:()=>{a(null)},qryntheme:r,size:"small",children:O(wb,{style:{padding:"0 14px"},children:O(ka,{children:O(_a,{style:{padding:"0",marginRight:0,cursor:c?"default":"not-allowed"},checked:W,onChange:m=>{g(()=>!!m.target.checked)},control:O(Ia,{style:{paddingRight:"0px",marginRight:"3px"},sx:{"& .MuiSvgIcon-root":{fontSize:14}},disabled:!c}),label:O(vc,{style:{fontSize:"12px",color:r.contrast},children:"Relative time"})})})},"relativeTime")})]})})}),O(x1,{title:"Delete Query",children:O(re,{onClick:()=>o(t),children:O(hM,{style:{height:"14px",width:"14px"},fontSize:"small"})})}),O(x1,{title:"Star / Unstar Link",children:O(re,{onClick:()=>p(t),children:t.starred?O(So,{style:{height:"14px",width:"14px"},fontSize:"small"}):O(Tc,{style:{height:"14px",width:"14px"},fontSize:"small"})})}),O(x1,{title:"Search Logs from Query",children:P(Sc,{onClick:()=>n(t==null?void 0:t.data),children:[O(tr,{className:"open-icon",fontSize:"small"}),O("span",{className:"open-text",children:"Open In New Tab"})]})})]})}function Pb({queryHistory:e,copyQuery:t,handleDelete:M,handleStarItem:b,handleSubmit:o,filtered:p,emptyMessage:n,isStarred:c}){const[r,A]=q.useState([]);q.useEffect(()=>{A(e)},[]),q.useEffect(()=>{p.length>0&&A(p)},[p]),q.useEffect(()=>{A(e)},[e]);function a(l){let W="";if(typeof l=="string")try{W=JSON.parse(l).queryInput}catch{W=l}return W}return O(fo,{className:c?"starredCont":"",children:r.length>0?r==null?void 0:r.map((l,W)=>P(xc,{children:[O("span",{style:{color:"#666",paddingRight:"10px",width:"10px",display:"flex",alignItems:"center"},children:r.length-W}),O(x1,{title:l.data,children:P(yc,{children:[a(l.data)," "]})}),O("span",{children:X2(l.timestamp,"yyyy/MM/dd HH:mm:ss")}),P("div",{style:{display:"flex",alignItems:"center"},children:[O(x1,{title:"Copy Query to Clipboard",children:O(re,{onClick:()=>t(l.data),children:O(xa,{style:{height:"14px",width:"14px"},fontSize:"small"})})}),O(x1,{title:"Delete Query",children:O(re,{onClick:()=>M(l),children:O(hM,{style:{height:"14px",width:"14px"},fontSize:"small"})})}),O(x1,{title:"Star / Unstar Query",children:O(re,{onClick:()=>b(l),children:l.starred?O(So,{style:{height:"14px",width:"14px"},fontSize:"small"}):O(Tc,{style:{height:"14px",width:"14px"},fontSize:"small"})})}),O(x1,{title:"Search Logs from Query",children:P(Sc,{onClick:()=>o(l),children:[O(V2,{className:"open-icon"}),O("span",{className:"open-text",children:"Show Results"})]})})]})]},W)):O(or,{message:n})})}function dr({linksHistory:e,copyLink:t,handleDelete:M,handleStarLinkItem:b,handleSubmit:o,filtered:p,emptyMessage:n,isStarred:c,label:r}){const[A,a]=q.useState([]);return q.useEffect(()=>{a(e)},[]),q.useEffect(()=>{p.length>0&&a(p)},[p]),q.useEffect(()=>{a(e)},[e]),O(fo,{className:c?"starredCont":"",children:A.length>0?A==null?void 0:A.map((l,W)=>P(xc,{children:[O("span",{style:{paddingRight:"10px",color:"#666",width:"10px",display:"flex",alignItems:"center"},children:(A==null?void 0:A.length)-W}),O(wl,{pos:(A==null?void 0:A.length)-W,item:l,copyLink:t,handleDelete:M,handleStarLinkItem:b,handleSubmit:o,label:r})]},W)):O(or,{message:n})})}function kl({starredQueries:e,starredLinks:t,handleDeleteQuery:M,handleDeleteLink:b,handleStarItem:o,handleStarLinkItem:p,handleSubmitQuery:n,handleSubmitLink:c,filteredLinks:r,filteredQueries:A,setFilteredStarLink:a,setFilteredStarQuery:l,filterItems:W,emptyQueryMessage:g,emptyLinkMessage:d,copyQuery:R,label:v}){const[m,h]=q.useState([]),[T,S]=q.useState([]);return q.useEffect(()=>{h(e),S(t)},[]),q.useEffect(()=>{r.length>0&&S(r),A.length>0&&h(A)},[r,A]),q.useEffect(()=>{h(e),S(t)},[e,t]),P(Rt,{defaultValue:0,children:[P(Bc,{children:[O(Xe,{children:"Queries"}),O(Xe,{children:"Links"})]}),P(we,{value:0,children:[O(st,{searchQueriesText:"Queries",queryHistory:e,filterItems:W,setFilteredItems:l}),O(Pb,{queryHistory:m,copyQuery:R,handleDelete:M,handleStarItem:o,handleSubmit:n,filtered:A,emptyMessage:g,isStarred:!0})]}),P(we,{value:1,children:[O(st,{searchQueriesText:"Links",queryHistory:t,filterItems:W,setFilteredItems:a}),O(dr,{linksHistory:T,copyQuery:R,handleDelete:b,handleStarLinkItem:p,handleSubmit:c,filtered:r,emptyMessage:d,isStarred:!0,label:v})]})]})}function st({queryHistory:e,filterItems:t,setFilteredItems:M,searchQueriesText:b}){const[o,p]=q.useState("");function n(c){let r=c.target.value;p(r);const A=t(e,r);A.length>0?M(A):M([])}return O(Xc,{children:P("div",{style:{display:"flex",alignItems:"center"},children:[O(Xa,{}),O(wa,{type:"text",value:o1(o),onChange:n,placeholder:`Search ${b}`})," ",P("span",{style:{margin:"0px 4px"},children:["Total: ",e.length]})]})})}function _l({queryHistory:e,linksHistory:t}){return O(Xc,{children:P("div",{style:{display:"flex",alignItems:"center"},children:[P("span",{style:{margin:"0px 4px"},children:["Query History Rows: ",e==null?void 0:e.length]})," | ",P("span",{style:{margin:"0px 4px"},children:["Links History Rows: ",t==null?void 0:t.length]})]})})}function Il({clearHistory:e,clearLinksHistory:t}){return O(fo,{children:P("div",{style:{display:"flex"},children:[P(sz,{children:[O("div",{children:"Clear Query History"}),O("small",{children:"Delete all of your query history, permanently."}),O(wz,{dialogType:"Query",clearHistory:e})]}),P(sz,{children:[O("div",{children:"Clear Links History"}),O("small",{children:"Delete all of your links history, permanently."}),O(wz,{dialogType:"Links",clearHistory:t})]})]})})}const ur=()=>{const e="Link Copied To Clipboard",t=_1(),M=hc().historyStore(),b=gc(),o=H0(p0=>p0.queryHistory),p=H0(p0=>p0.linksHistory),n=H0(p0=>p0.historyOpen),c=K0(),[r,A]=q.useState([]),[a,l]=q.useState([]),[W,g]=q.useState([]),[d,R]=q.useState([]),[v,m]=q.useState([]),[h,T]=q.useState(!1),S=H0(p0=>p0.start),C=H0(p0=>p0.stop),w=H0(({label:p0})=>p0);function s(p0){const R0=M.remove(p0);t(Gt(R0)),t(_2({message:"Query deleted succesfully",type:J2.info}))}function L(p0){const R0=b.remove(p0);t(Kt(R0))}function y(p0){const R0={id:"",limit:100,panel:"left",queryInput:"",queryType:"range",direction:"forward"};let s0={};try{s0=JSON.parse(p0.data)}catch{s0={...R0}}const{id:d0,limit:f0,panel:v0,queryInput:J0,queryType:Y0,type:F,dataSourceId:c0,url:z0,direction:W0}=s0;let E0="",w0=0;if(J0.includes("$__interval")){const p1=(C.getTime()-S.getTime())/1e3/30,e1=+1 .toFixed(1),m0=p1/e1,V0=Math.round(m0*window.devicePixelRatio.toFixed(2));E0=J0.replace(/\[\$__interval\]/,`[${V0}s]`),w0=V0}else E0=J0;t(x2(F,E0,Y0,f0,v0,d0,W0||"forward",c0,z0,w0))}function E(p0){window.open(p0)}function _(p0,R0){return p0==null?void 0:p0.filter(s0=>s0.data.toLowerCase().includes(R0.toLowerCase()))}function I(p0){l(p0)}function D(p0){g(p0)}function G(p0){m(p0)}function o0(p0){R(p0)}q.useEffect(()=>{const p0=(o==null?void 0:o.filter(s0=>s0.starred))||[],R0=(p==null?void 0:p.filter(s0=>s0.starred))||[];T(R0),A(p0)},[o,p]);function b0(p0){const R0={...p0,starred:!p0.starred},s0=M.update(R0);t(Gt(s0)),R0.starred?t(_2({message:"Query starred succesfully",type:J2.success})):t(_2({message:"Query unstarred succesfully",type:J2.success}))}function e0(p0){const R0={...p0,starred:!p0.starred},s0=b.update(R0);t(Kt(s0)),R0.starred?t(_2({message:"Link starred succesfully",type:J2.success})):t(_2({message:"Link unstarred succesfully",type:J2.success}))}function g0(){t(_2({type:"success",message:e}))}function Y(p0){navigator.clipboard.writeText(p0).then(function(){g0()},function(R0){console.log("error on copy",R0)})}function $0(p0){let R0=document.createElement("textarea");return R0.value=p0,R0.style={position:"fixed",left:"-999999px",top:"-999999px"},document.body.appendChild(R0),R0.focus(),R0.select(),new Promise((s0,d0)=>{g0(),document.execCommand("copy")?s0():d0(),R0.remove()})}function I0(p0,R0="query",s0=!1){const d0=new URL(p0),{hash:f0}=d0,v0=new URLSearchParams(f0.replace(/#/,"")),J0=new URL(window.location.href);J0.hash=`#${v0.toString()}`;const Y0=R0==="query"?JSON.parse(p0).queryInput:s0&&w?J0:p0;setTimeout(()=>{navigator!=null&&navigator.clipboard&&window.isSecureContext?Y(Y0):$0(Y0)},200)}function q0(){t(Vc(!1))}function x0(){const p0=M.clean();t(Gt(p0)),(p0==null?void 0:p0.length)<1&&t(_2({message:"Query History cleared succesfully",type:J2.info}))}function X0(){const p0=b.clean();t(Kt(p0)),(p0==null?void 0:p0.length)<1&&t(_2({message:"Links History cleared succesfully",type:J2.info}))}return O(Nc,{theme:c,children:n&&O(Na,{anchor:"bottom",style:{maxHeight:"250px"},open:n,variant:"persistent",theme:c,children:O(Xl,{historyTabHeader:O(st,{searchQueriesText:"Queries",queryHistory:o,clearHistory:x0,filterItems:_,setFilteredItems:I}),historyTab:O(Pb,{queryHistory:o,copyQuery:I0,handleDelete:s,handleStarItem:b0,handleSubmit:y,filtered:a,emptyMessage:"There is no query history. Please execute some queries and you will see a history here."}),linksTabHeader:O(st,{searchQueriesText:"Links",queryHistory:p,filterItems:_,setFilteredItems:D}),linksTab:O(dr,{linksHistory:p,copyLink:I0,handleDelete:L,handleStarLinkItem:e0,handleSubmit:E,filtered:W,label:w,emptyMessage:"There is no links history. Please execute some queries and share links and you will see a history here."}),starredTabHeader:O(st,{searchQueriesText:"Queries",queryHistory:r,clearHistory:x0,filterItems:_,setFilteredItems:G}),starredTab:O(Pb,{queryHistory:r,copyQuery:I0,handleDelete:s,handleStarItem:b0,handleSubmit:y,filtered:v,emptyMessage:"Click the ‘Star’ icon to save queries and find them here to reuse again"}),starredHistoryTab:O(kl,{starredQueries:r,starredLinks:h,handleDeleteQuery:s,handleDeleteLink:L,handleStarItem:b0,handleStarLinkItem:e0,handleSubmitQuery:y,handleSubmitLink:E,filterItems:_,setFilteredStarLink:o0,setFilteredStarQuery:G,filteredQueries:v,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:I0,label:w}),settingTabHeader:O(_l,{queryHistory:o,linksHistory:p}),settingTab:O(Il,{clearHistory:x0,clearLinksHistory:X0}),closeButton:O(SA,{onClose:q0})})})})},Dl=({type:e,actualQuery:t,total:M,dataView:b})=>q.useMemo(()=>{var l;const p=(e==="matrix"||e==="flux")&&(t==null?void 0:t.tableView),n=e==="stream"&&(t==null?void 0:t.tableView);let c="",r="",A="",a="";if(p){const W=((l=b==null?void 0:b.tableData)==null?void 0:l.total)*25,g=W<330?W:330;c=`${g+25}px`,A=`${g}px`,r="fit-content",a="fit-content"}if(e==="vector"||n){const W=M*25,g=W<330?W:330;c=`${g+25}px`,A=`${g}px`,r="fit-content",a="fit-content"}if(e==="stream"&&!(t!=null&&t.tableView)){const g=M*25<350?"fit-content":"inherit";c=g,A=g,r="fit-content",a="fit-content"}return(e==="matrix"||e==="flux")&&!(t!=null&&t.tableView)&&(c="fit-content",A="400px",r="fit-content",a="fit-content"),{regularCont:c,regularView:A,maxCont:r,maxView:a}},[M,e,t==null?void 0:t.tableView]),Pl=({total:e,panelSize:t,dataView:M})=>{var p;let b=0;return M.type==="matrix"?b=(p=M==null?void 0:M.tableData)==null?void 0:p.total:b=e,q.useMemo(()=>{const n=b*25;return t==="max"?n:t==="min"?0:n<310?n:310},[t])},Hl=({panel:e,dataView:t})=>q.useMemo(()=>{let b={};return e&&t&&(b=e==null?void 0:e.find(o=>o.id===t.id)),b},[e,t]);function $z(e){const{name:t}=e;return O(q1,{children:t})}const jl=h0("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;"),Fl=h0("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;}"}),Vl=h0("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;padding:4px;padding-bottom:8px;span{margin:0px 3px;.exp{font-family:monospace;}}}"),Uz=h0("div",{target:"emosc6a2"})("margin:0px 2px;padding:2px;font-size:10px;border:1px solid ",({theme:e})=>e.accentNeutral,";border-radius:3px;"),$l=h0("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,";}"),Ul=h0("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 Qo={},Kl=m1;Object.defineProperty(Qo,"__esModule",{value:!0});var w2=Qo.default=void 0,Gl=Kl(L1()),Ql=t1;w2=Qo.default=(0,Gl.default)((0,Ql.jsx)("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown");const Jl=({labels:e})=>(e==null?void 0:e.length)>0?P("p",{children:["Labels:",e.map((t,M)=>O("span",{className:"label",children:t},M))]}):null,Yl=({idRef:e,expr:t,queryType:M})=>P(q1,{children:[O("h4",{children:e}),O("div",{children:O("p",{children:t})}),P("p",{children:["Query Type: ",M]})]}),Zl=({expr:e,idRef:t,labels:M,limit:b,queryType:o,total:p})=>{const n={idRef:t,expr:e,queryType:o},c={labels:M};return P(Ul,{children:[O(Yl,{...n}),O(Jl,{...c}),P("p",{children:["Limit: ",b]}),P("p",{children:["Total: ",p]})]})};function ed({expr:e,idRef:t,labels:M,queryType:b,limit:o,total:p,onClose:n,open:c}){const r=K0();return O(f1,{theme:r,children:O(lo,{open:c,onClose:n,PaperProps:{classes:{root:uo}},children:O(Zl,{expr:e,idRef:t,labels:M,queryType:b,limit:o,total:p})})})}function vt(e){var T;const{fixedSize:t}=e||{fixedSize:!1},M=W2.useMediaQuery({query:"(max-width: 1013px)"}),[b,o]=q.useState(!1),[p,n]=q.useState(!0),c=K0(),{actualQuery:r,dataView:A,type:a,total:l,setMinimize:W,setMaxHeight:g}=e,d=q.useMemo(()=>{const S=a==="matrix"&&(r==null?void 0:r.tableView),C=a==="stream"&&(r==null?void 0:r.tableView);if((a==="matrix"||a==="flux")&&!(r!=null&&r.tableView))return"Chart";if(a==="stream"&&!(r!=null&&r.tableView))return"Logs";if(a==="vector"||S||C)return"Table";if(a==="empty")return"No Results"},[a,r==null?void 0:r.tableView]),R=q.useCallback(()=>{p?(W(),n(!1)):(g(),n(!0))},[p,W,g]),v=q.useCallback(()=>{o(!0)},[]),m=q.useMemo(()=>{var S;return((S=A==null?void 0:A.labels)==null?void 0:S.join(" | "))||""},[A.labels]),h=q.useMemo(()=>{var S;if((S=A==null?void 0:A.labels)!=null&&S.length)if((A==null?void 0:A.labels.length)>4){const C=[...A.labels].slice(0,4);return P(q1,{children:[C.map((w,s)=>O(Uz,{children:O($z,{name:w,...e.theme})},s))," ","..."]})}else return O(q1,{children:A.labels.map((C,w)=>O(Uz,{children:O($z,{name:C,...e.theme})},w))})},[A.labels,e.theme]);if(r){const{idRef:S,expr:C,limit:w,queryType:s}=r;return O(f1,{theme:c,children:P(Vl,{children:[P("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:P("span",{children:[" ",O("span",{className:"exp",children:r==null?void 0:r.idRef})]})}),!M&&P(q1,{children:[P("span",{children:["limit:"," ",O("span",{className:"exp",children:r==null?void 0:r.limit})]}),P("span",{children:["count: ",O("span",{className:"exp",children:l})]})]}),((T=A==null?void 0:A.labels)==null?void 0:T.length)>0&&!M&&O("span",{children:P($l,{title:m,children:["labels:",h]})})]}),O("div",{className:"header-actions",children:!t&&P(q1,{children:[O(Da,{className:"header-icon",style:{fontSize:"12px"},onClick:v}),O(td,{isOpen:p,onClick:R})]})}),b&&O(ed,{labels:A.labels||[],limit:w,expr:C,queryType:s,idRef:S,open:b,total:l,onClose:L=>o(!1)})]})})}return null}const td=e=>{const{isOpen:t,onClick:M}=e;return t?O(w2,{className:"header-icon",onClick:M,style:{fontSize:"14px"}}):O(Fo,{className:"header-icon",onClick:M,style:{fontSize:"14px"}})};function Md(e){const t=K0(),{loading:M}=e;return M?null:O(f1,{theme:t,children:O(jl,{children:"Please adjust search parameters and click on ‘Show Results’ button"})})}const RM=h0("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;}"),P2=h0(Cb,{target:"e5pse6w3"})("width:100%;background:",({theme:e})=>e.shadow,";height:inherit;flex:1;"),Jo=h0(_c,{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;"),H2=h0(Cc,{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;}&.",Ec.selected,"{border-bottom:1px solid ",({theme:e})=>e.primary,";}&.",kc.disabled,"{opacity:0.5;cursor:not-allowed;}@media screen and (max-width: 360px){span{display:none;}padding:5px 20px;}");function bd(e){const{viewRef:t,panelSize:M,setStreamClose:b,setMinimize:o,setMaxHeight:p,actualQuery:n,total:c,loading:r}=e;return P(RM,{ref:t,size:M,vheight:"regular",children:[O(vt,{onClose:b,setMinimize:o,setMaxHeight:p,actualQuery:n,total:c,type:"empty",fixedSize:!0,...e}),O(Md,{loading:r})]})}const od=(e,t,M,b)=>{const o=Za(e.getValue(t),M);return b(o),o.passed},pd={cell:e=>e.getValue()},zd=(e,t)=>({updateData:(M,b,o)=>{t(),e(p=>p.map((n,c)=>c!==M?n:{...p[M],[b]:o}))}}),nd=e=>O0("color:",e.contrast,";background:",e.deep,";border:1px solid ",e.accentNeutral,";border-radius:3px;padding:3px 8px;font-size:12px;",""),bM=({value:e,onChange:t,debounce:M=500,theme:b,...o})=>{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)},M);return()=>clearTimeout(r)},[p]),O("input",{...o,className:P0(nd(b)),value:o1(String(p)),onChange:c})};var Yo={},cd=m1;Object.defineProperty(Yo,"__esModule",{value:!0});var qr=Yo.default=void 0,rd=cd(L1()),id=t1;qr=Yo.default=(0,rd.default)((0,id.jsx)("path",{d:"M15 9.86 18.03 12 15 14.14zm-9 0L9.03 12 6 14.14zM13 6v12l8.5-6zM4 6v12l8.5-6z"}),"FastForwardOutlined");var Zo={},Od=m1;Object.defineProperty(Zo,"__esModule",{value:!0});var fr=Zo.default=void 0,ad=Od(L1()),sd=t1;fr=Zo.default=(0,ad.default)((0,sd.jsx)("path",{d:"M18 9.86v4.28L14.97 12zm-9 0v4.28L5.97 12zM20 6l-8.5 6 8.5 6zm-9 0-8.5 6 8.5 6z"}),"FastRewindOutlined");var ep={},Ad=m1;Object.defineProperty(ep,"__esModule",{value:!0});var Wr=ep.default=void 0,ld=Ad(L1()),dd=t1;Wr=ep.default=(0,ld.default)((0,dd.jsx)("path",{d:"m6 18 8.5-6L6 6zm2-8.14L11.03 12 8 14.14zM16 6h2v12h-2z"}),"SkipNextOutlined");var tp={},ud=m1;Object.defineProperty(tp,"__esModule",{value:!0});var hr=tp.default=void 0,qd=ud(L1()),fd=t1;hr=tp.default=(0,qd.default)((0,fd.jsx)("path",{d:"M6 6h2v12H6zm3.5 6 8.5 6V6zm6.5 2.14L12.97 12 16 9.86z"}),"SkipPreviousOutlined");const Kz=O0({name:"rza2c4",styles:"display:flex;align-items:center;gap:1px"}),Gz=O0({name:"rnnx2x",styles:"font-size:12px"}),Wd=e=>O0("border-radius:3px;outline:none;border:1px solid ",e.accentNeutral,";background:",e.deep,";color:",e.contrast,";padding:3px 8px;margin:2px;width:70px;",""),hd=e=>O0("color:",e.contrast,";border:1px solid ",e.accentNeutral,";background:",e.deep,";padding:3px 8px 2px 8px;border-radius:3px;cursor:pointer;font-size:12px;",""),Ft=e=>O0("display:flex;align-items:center;border:1px solid ",e.accentNeutral,";color:",e.contrast,";background:",e.neutral,";cursor:pointer;","");function gd({hasNextPage:e,hasPreviousPage:t,nextPage:M,pageCount:b,pageIndex:o,pageSize:p,previousPage:n,setPageIndex:c,setPageSize:r,totalRows:A}){const a=K0();return P(q1,{children:[P("div",{style:{display:"flex",gap:"4px",alignItems:"center",flex:1,width:"100%",color:a.contrast,margin:"5px"},children:[O("button",{className:P0(Ft(a)),onClick:()=>c(0),disabled:!t,children:O(fr,{style:{height:"12px",width:"12px"}})}),O("button",{className:P0(Ft(a)),onClick:()=>n(),disabled:!t,children:O(hr,{style:{height:"12px",width:"12px"}})}),O("button",{className:P0(Ft(a)),onClick:()=>M(),disabled:!e,children:O(Wr,{style:{height:"12px",width:"12px"}})}),O("button",{className:P0(Ft(a)),onClick:()=>c(b-1),disabled:!e,children:O(qr,{style:{height:"12px",width:"12px"}})}),O("span",{className:P0(Kz,Gz),children:P("div",{children:["Page"," ",P("strong",{children:[o+1," of ",b]})]})}),P("span",{className:P0(Kz,Gz),children:["- Go to page:",O("input",{type:"number",defaultValue:o+1,onChange:l=>{const W=l.target.value?Number(l.target.value)-1:0;c(W)},className:P0(Wd(a))})]}),O("select",{className:P0(hd(a)),value:o1(String(p)),onChange:l=>{r(Number(l.target.value))},children:[10,20,30,40,50].map(l=>P("option",{value:o1(String(l)),children:["Show ",l," Rows"]},l))}),P("div",{style:{fontSize:"12px",marginLeft:"6px"},children:[" ","Total: ",A," Rows"]})]}),O("div",{className:"flex items-center gap-2"})]})}const Rd=({columnFilterValue:e,getFacetedMinMaxValues:t,setFilterValue:M})=>{var r,A;const b=K0(),o=(r=t())==null?void 0:r[0],p=Number(o??""),n=(A=t())==null?void 0:A[1],c=Number(n);return P("div",{children:[P("div",{style:{display:"flex",gap:"4px",alignItems:"center",justifyContent:"center"},children:[O(bM,{theme:b,type:"number",min:p,max:c,value:(e==null?void 0:e[0])??"",onChange:a=>M(l=>[a,l==null?void 0:l[1]]),placeholder:`Min ${o?`(${p})`:""}`,className:"w-24 border shadow rounded"}),O(bM,{theme:b,type:"number",min:p,max:c,value:(e==null?void 0:e[1])??"",onChange:a=>M(l=>[l==null?void 0:l[0],a]),placeholder:`Max ${n?`(${c})`:""}`,className:"w-24 border shadow rounded"})]}),O("div",{className:"h-1"})]})},md=({columnId:e,columnFilterValue:t,columnSize:M,setFilterValue:b,sortedUniqueValues:o})=>{const p=e+"list",n=K0();return P(q.Fragment,{children:[O("datalist",{id:p,children:o.slice(0,5e3).map(c=>O("option",{value:o1(c)},c))}),O(bM,{theme:n,type:"text",value:o1(t??""),onChange:c=>b(c),placeholder:`Search... (${M})`,className:"w-36 border shadow rounded",list:p}),O("div",{className:"h-1"})]})};function Ld({column:e,table:t}){var n;const M=(n=t.getPreFilteredRowModel().flatRows[0])==null?void 0:n.getValue(e.id),b=e.getFilterValue(),o=e.getFacetedUniqueValues(),p=q.useMemo(()=>typeof M=="number"?[]:Array.from(o.keys()).sort(),[o]);return typeof M=="number"?O(Rd,{columnFilterValue:b,getFacetedMinMaxValues:e.getFacetedMinMaxValues,setFilterValue:e.setFilterValue}):O(md,{columnId:e.id,columnFilterValue:o1(b),columnSize:o.size,setFilterValue:e.setFilterValue,sortedUniqueValues:p})}var Mp={},Nd=m1;Object.defineProperty(Mp,"__esModule",{value:!0});var gr=Mp.default=void 0,vd=Nd(L1()),Bd=t1;gr=Mp.default=(0,vd.default)((0,Bd.jsx)("path",{d:"M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z"}),"SortOutlined");var bp={},yd=m1;Object.defineProperty(bp,"__esModule",{value:!0});var Rr=bp.default=void 0,Td=yd(L1()),Sd=t1;Rr=bp.default=(0,Td.default)((0,Sd.jsx)("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"}),"KeyboardArrowUpOutlined");const xd=O0({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;}}"}),zb=(e,t)=>O0("height:14px!important;width:14px!important;color:",e,"!important;cursor:pointer;border:1px solid ",t,";border-radius:3px;padding:2px;","");function Xd(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 wd(e,t){return t==="left"?e.getLeftVisibleCells():t==="right"?e.getRightVisibleCells():t==="center"?e.getCenterVisibleCells():e.getVisibleCells()}function Cd({table:e,tableGroup:t,columnResizeMode:M}){const b=K0(),[o]=Xd(e,t);return O(f1,{theme:b,children:P("table",{style:{width:"100%"},children:[O("thead",{children:o.map(p=>O("tr",{children:p.headers.map(n=>P("th",{className:P0(xd),key:n.id,colSpan:n.colSpan,style:{width:n.getSize()},children:[" ",P("div",{style:{display:"flex",gap:"6px",alignItems:"center",fontSize:"13px"},children:[n.isPlaceholder?null:O(q1,{children:dz(n.column.columnDef.header,n.getContext())}),O("div",{onMouseDown:n.getResizeHandler(),onTouchStart:n.getResizeHandler(),className:`resizer ${n.column.getIsResizing()?"isResizing":""}`}),P("div",{style:{fontSize:"12px",display:"flex",alignItems:"center",gap:"6px"},children:[n.column.getCanFilter()?O("div",{children:O(Ld,{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(Rr,{className:P0(zb(b.contrast,b.accentNeutral))}),desc:O(He,{className:P0(zb(b.contrast,b.accentNeutral))})}[n.column.getIsSorted()]??O(gr,{className:P0(zb(b.contrast,b.accentNeutral))})})]})]})]}))},p.id))}),O("tbody",{children:e.getRowModel().rows.map(p=>O("tr",{children:wd(p,t).map(n=>O("td",{style:{width:n.column.getSize(),fontSize:"12px"},children:O(q1,{children:dz(n.column.columnDef.cell,n.getContext())})},n.id))},p.id))})]})})}function Ed(){const e=q.useRef(!0),t=e.current,M=q.useCallback(()=>{e.current=!1},[]);return q.useEffect(()=>{e.current=!0}),q.useMemo(()=>[!!t,M],[t,M])}const kd=h0("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 _d(e){var w;const t=q.useReducer(()=>({}),{})[1],{columns:M,data:b}=e,o=K0(),[p,n]=q.useState(b),c=()=>n(b),[r,A]=q.useState({}),[a,l]=q.useState([]),[W,g]=q.useState({}),[d,R]=q.useState([]),[v,m]=q.useState(""),[h,T]=Ed(),[S]=q.useState("onChange"),C=e3({data:p,columns:M,defaultColumn:pd,getCoreRowModel:t3(),getFilteredRowModel:M3(),getPaginationRowModel:b3(),getSortedRowModel:o3(),getGroupedRowModel:p3(),getFacetedRowModel:z3(),getFacetedUniqueValues:n3(),getFacetedMinMaxValues:c3(),onColumnFiltersChange:R,onGlobalFilterChange:m,globalFilterFn:od,autoResetPageIndex:h,enableColumnResizing:!0,columnResizeMode:S,onColumnVisibilityChange:A,onGroupingChange:l,onRowSelectionChange:g,meta:zd(n,T),state:{grouping:a,columnFilters:d,globalFilter:v,columnVisibility:r}});return q.useEffect(()=>{var s,L;((s=C.getState().columnFilters[0])==null?void 0:s.id)==="fullName"&&((L=C.getState().sorting[0])==null?void 0:L.id)!=="fullName"&&C.setSorting([{id:"fullName",desc:!1}])},[(w=C.getState().columnFilters[0])==null?void 0:w.id]),O(f1,{theme:o,children:P(kd,{theme:o,children:[P("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:C.getAllLeafColumns().map(s=>O("div",{children:P("label",{style:{display:"flex",alignItems:"center",color:o.contrast},children:[O("input",{type:"checkbox",checked:s.getIsVisible(),onChange:s.getToggleVisibilityHandler(),className:"mr-1"}),s.id]})},s.id))}),P("div",{style:{display:"flex",alignItems:"center",gap:"4px",fontSize:"14px",margin:"4px",color:o.contrast},children:["Search:",O(bM,{theme:o,style:{fontSize:"12px",padding:"3px 8px"},value:o1(v??""),onChange:s=>m(String(s)),placeholder:"Search all columns..."})]})]}),O("div",{style:{display:"flex"},children:O(Cd,{columnResizeMode:S,table:C,tableGroup:"center"})}),O("div",{style:{display:"flex"},children:O(gd,{getSelectedRowModel:C.getSelectedRowModel,hasNextPage:C.getCanNextPage(),hasPreviousPage:C.getCanPreviousPage(),nextPage:C.nextPage,pageCount:C.getPageCount(),pageIndex:C.getState().pagination.pageIndex,pageSize:C.getState().pagination.pageSize,previousPage:C.previousPage,refreshData:c,rerender:t,rowSelection:W,setPageIndex:C.setPageIndex,setPageSize:C.setPageSize,totalRows:C.getPrePaginationRowModel().rows.length})})]})})}const Id=h0("div",{target:"e19v7mv10"})("display:block;overflow:auto;&::-webkit-scrollbar{width:5px;height: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{}"),op=e=>{const{data:{columnsData:t,dataRows:M},actualQuery:b,height:o,size:p,width:n}=e,[c,r]=q.useState(t),[A,a]=q.useState(M);return q.useEffect(()=>{r(t)},[t]),q.useEffect(()=>{a(M)},[M]),O(Id,{children:t&&M&&O(_d,{actQuery:b,columns:c,width:n,data:A,height:o,size:p})})};function j2({id:e}){try{return JSON.parse(localStorage.getItem("tabsState")||`{[${e}]:0}`)}catch{return{[e]:0}}}var mr={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,M){e.exports=t.document?M(t,!0):function(b){if(!b.document)throw new Error("jQuery requires a window with a document");return M(b)}})(typeof window<"u"?window:so,function(t,M){var b=[],o=Object.getPrototypeOf,p=b.slice,n=b.flat?function(z){return b.flat.call(z)}:function(z){return b.concat.apply([],z)},c=b.push,r=b.indexOf,A={},a=A.toString,l=A.hasOwnProperty,W=l.toString,g=W.call(Object),d={},R=function(i){return typeof i=="function"&&typeof i.nodeType!="number"&&typeof i.item!="function"},v=function(i){return i!=null&&i===i.window},m=t.document,h={type:!0,src:!0,nonce:!0,noModule:!0};function T(z,i,u){u=u||m;var f,N,B=u.createElement("script");if(B.text=z,i)for(f in h)N=i[f]||i.getAttribute&&i.getAttribute(f),N&&B.setAttribute(f,N);u.head.appendChild(B).parentNode.removeChild(B)}function S(z){return z==null?z+"":typeof z=="object"||typeof z=="function"?A[a.call(z)]||"object":typeof z}var C="3.7.1",w=/HTML$/i,s=function(z,i){return new s.fn.init(z,i)};s.fn=s.prototype={jquery:C,constructor:s,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 i=s.merge(this.constructor(),z);return i.prevObject=this,i},each:function(z){return s.each(this,z)},map:function(z){return this.pushStack(s.map(this,function(i,u){return z.call(i,u,i)}))},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(s.grep(this,function(z,i){return(i+1)%2}))},odd:function(){return this.pushStack(s.grep(this,function(z,i){return i%2}))},eq:function(z){var i=this.length,u=+z+(z<0?i:0);return this.pushStack(u>=0&&u0&&i-1 in z}function y(z,i){return z.nodeName&&z.nodeName.toLowerCase()===i.toLowerCase()}var E=b.pop,_=b.sort,I=b.splice,D="[\\x20\\t\\r\\n\\f]",G=new RegExp("^"+D+"+|((?:^|[^\\\\])(?:\\\\.)*)"+D+"+$","g");s.contains=function(z,i){var u=i&&i.parentNode;return z===u||!!(u&&u.nodeType===1&&(z.contains?z.contains(u):z.compareDocumentPosition&&z.compareDocumentPosition(u)&16))};var o0=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function b0(z,i){return i?z==="\0"?"�":z.slice(0,-1)+"\\"+z.charCodeAt(z.length-1).toString(16)+" ":"\\"+z}s.escapeSelector=function(z){return(z+"").replace(o0,b0)};var e0=m,g0=c;(function(){var z,i,u,f,N,B=g0,X,Q,$,t0,l0,N0=s.expando,i0=0,C0=0,i1=Xt(),h1=Xt(),A1=Xt(),G1=Xt(),F1=function(j,Z){return j===Z&&(N=!0),0},N2="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",v2="(?:\\\\[\\da-fA-F]{1,6}"+D+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",u1="\\["+D+"*("+v2+")(?:"+D+"*([*^$|!~]?=)"+D+`*(?:'((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)"|(`+v2+"))|)"+D+"*\\]",oe=":("+v2+`)(?:\\((('((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|`+u1+")*)|.*)\\)|)",g1=new RegExp(D+"+","g"),E1=new RegExp("^"+D+"*,"+D+"*"),tt=new RegExp("^"+D+"*([>+~]|"+D+")"+D+"*"),UM=new RegExp(D+"|>"),B2=new RegExp(oe),Mt=new RegExp("^"+v2+"$"),y2={ID:new RegExp("^#("+v2+")"),CLASS:new RegExp("^\\.("+v2+")"),TAG:new RegExp("^("+v2+"|[*])"),ATTR:new RegExp("^"+u1),PSEUDO:new RegExp("^"+oe),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+D+"*(even|odd|(([+-]|)(\\d*)n|)"+D+"*(?:([+-]|)"+D+"*(\\d+)|))"+D+"*\\)|)","i"),bool:new RegExp("^(?:"+N2+")$","i"),needsContext:new RegExp("^"+D+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+D+"*((?:-\\d)?\\d*)"+D+"*\\)|)(?=[^-]|$)","i")},$2=/^(?:input|select|textarea|button)$/i,U2=/^h\d$/i,l2=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,KM=/[+~]/,C2=new RegExp("\\\\[\\da-fA-F]{1,6}"+D+"?|\\\\([^\\r\\n\\f])","g"),E2=function(j,Z){var r0="0x"+j.slice(1)-65536;return Z||(r0<0?String.fromCharCode(r0+65536):String.fromCharCode(r0>>10|55296,r0&1023|56320))},CO=function(){K2()},EO=Ct(function(j){return j.disabled===!0&&y(j,"fieldset")},{dir:"parentNode",next:"legend"});function kO(){try{return X.activeElement}catch{}}try{B.apply(b=p.call(e0.childNodes),e0.childNodes),b[e0.childNodes.length].nodeType}catch{B={apply:function(Z,r0){g0.apply(Z,p.call(r0))},call:function(Z){g0.apply(Z,p.call(arguments,1))}}}function v1(j,Z,r0,a0){var L0,j0,G0,M1,Q0,l1,r1,O1=Z&&Z.ownerDocument,d1=Z?Z.nodeType:9;if(r0=r0||[],typeof j!="string"||!j||d1!==1&&d1!==9&&d1!==11)return r0;if(!a0&&(K2(Z),Z=Z||X,$)){if(d1!==11&&(Q0=l2.exec(j)))if(L0=Q0[1]){if(d1===9)if(G0=Z.getElementById(L0)){if(G0.id===L0)return B.call(r0,G0),r0}else return r0;else if(O1&&(G0=O1.getElementById(L0))&&v1.contains(Z,G0)&&G0.id===L0)return B.call(r0,G0),r0}else{if(Q0[2])return B.apply(r0,Z.getElementsByTagName(j)),r0;if((L0=Q0[3])&&Z.getElementsByClassName)return B.apply(r0,Z.getElementsByClassName(L0)),r0}if(!G1[j+" "]&&(!t0||!t0.test(j))){if(r1=j,O1=Z,d1===1&&(UM.test(j)||tt.test(j))){for(O1=KM.test(j)&&GM(Z.parentNode)||Z,(O1!=Z||!d.scope)&&((M1=Z.getAttribute("id"))?M1=s.escapeSelector(M1):Z.setAttribute("id",M1=N0)),l1=bt(j),j0=l1.length;j0--;)l1[j0]=(M1?"#"+M1:":scope")+" "+wt(l1[j0]);r1=l1.join(",")}try{return B.apply(r0,O1.querySelectorAll(r1)),r0}catch{G1(j,!0)}finally{M1===N0&&Z.removeAttribute("id")}}}return pz(j.replace(G,"$1"),Z,r0,a0)}function Xt(){var j=[];function Z(r0,a0){return j.push(r0+" ")>i.cacheLength&&delete Z[j.shift()],Z[r0+" "]=a0}return Z}function g2(j){return j[N0]=!0,j}function Re(j){var Z=X.createElement("fieldset");try{return!!j(Z)}catch{return!1}finally{Z.parentNode&&Z.parentNode.removeChild(Z),Z=null}}function _O(j){return function(Z){return y(Z,"input")&&Z.type===j}}function IO(j){return function(Z){return(y(Z,"input")||y(Z,"button"))&&Z.type===j}}function bz(j){return function(Z){return"form"in Z?Z.parentNode&&Z.disabled===!1?"label"in Z?"label"in Z.parentNode?Z.parentNode.disabled===j:Z.disabled===j:Z.isDisabled===j||Z.isDisabled!==!j&&EO(Z)===j:Z.disabled===j:"label"in Z?Z.disabled===j:!1}}function pe(j){return g2(function(Z){return Z=+Z,g2(function(r0,a0){for(var L0,j0=j([],r0.length,Z),G0=j0.length;G0--;)r0[L0=j0[G0]]&&(r0[L0]=!(a0[L0]=r0[L0]))})})}function GM(j){return j&&typeof j.getElementsByTagName<"u"&&j}function K2(j){var Z,r0=j?j.ownerDocument||j:e0;return r0==X||r0.nodeType!==9||!r0.documentElement||(X=r0,Q=X.documentElement,$=!s.isXMLDoc(X),l0=Q.matches||Q.webkitMatchesSelector||Q.msMatchesSelector,Q.msMatchesSelector&&e0!=X&&(Z=X.defaultView)&&Z.top!==Z&&Z.addEventListener("unload",CO),d.getById=Re(function(a0){return Q.appendChild(a0).id=s.expando,!X.getElementsByName||!X.getElementsByName(s.expando).length}),d.disconnectedMatch=Re(function(a0){return l0.call(a0,"*")}),d.scope=Re(function(){return X.querySelectorAll(":scope")}),d.cssHas=Re(function(){try{return X.querySelector(":has(*,:jqfake)"),!1}catch{return!0}}),d.getById?(i.filter.ID=function(a0){var L0=a0.replace(C2,E2);return function(j0){return j0.getAttribute("id")===L0}},i.find.ID=function(a0,L0){if(typeof L0.getElementById<"u"&&$){var j0=L0.getElementById(a0);return j0?[j0]:[]}}):(i.filter.ID=function(a0){var L0=a0.replace(C2,E2);return function(j0){var G0=typeof j0.getAttributeNode<"u"&&j0.getAttributeNode("id");return G0&&G0.value===L0}},i.find.ID=function(a0,L0){if(typeof L0.getElementById<"u"&&$){var j0,G0,M1,Q0=L0.getElementById(a0);if(Q0){if(j0=Q0.getAttributeNode("id"),j0&&j0.value===a0)return[Q0];for(M1=L0.getElementsByName(a0),G0=0;Q0=M1[G0++];)if(j0=Q0.getAttributeNode("id"),j0&&j0.value===a0)return[Q0]}return[]}}),i.find.TAG=function(a0,L0){return typeof L0.getElementsByTagName<"u"?L0.getElementsByTagName(a0):L0.querySelectorAll(a0)},i.find.CLASS=function(a0,L0){if(typeof L0.getElementsByClassName<"u"&&$)return L0.getElementsByClassName(a0)},t0=[],Re(function(a0){var L0;Q.appendChild(a0).innerHTML="",a0.querySelectorAll("[selected]").length||t0.push("\\["+D+"*(?:value|"+N2+")"),a0.querySelectorAll("[id~="+N0+"-]").length||t0.push("~="),a0.querySelectorAll("a#"+N0+"+*").length||t0.push(".#.+[+~]"),a0.querySelectorAll(":checked").length||t0.push(":checked"),L0=X.createElement("input"),L0.setAttribute("type","hidden"),a0.appendChild(L0).setAttribute("name","D"),Q.appendChild(a0).disabled=!0,a0.querySelectorAll(":disabled").length!==2&&t0.push(":enabled",":disabled"),L0=X.createElement("input"),L0.setAttribute("name",""),a0.appendChild(L0),a0.querySelectorAll("[name='']").length||t0.push("\\["+D+"*name"+D+"*="+D+`*(?:''|"")`)}),d.cssHas||t0.push(":has"),t0=t0.length&&new RegExp(t0.join("|")),F1=function(a0,L0){if(a0===L0)return N=!0,0;var j0=!a0.compareDocumentPosition-!L0.compareDocumentPosition;return j0||(j0=(a0.ownerDocument||a0)==(L0.ownerDocument||L0)?a0.compareDocumentPosition(L0):1,j0&1||!d.sortDetached&&L0.compareDocumentPosition(a0)===j0?a0===X||a0.ownerDocument==e0&&v1.contains(e0,a0)?-1:L0===X||L0.ownerDocument==e0&&v1.contains(e0,L0)?1:f?r.call(f,a0)-r.call(f,L0):0:j0&4?-1:1)}),X}v1.matches=function(j,Z){return v1(j,null,null,Z)},v1.matchesSelector=function(j,Z){if(K2(j),$&&!G1[Z+" "]&&(!t0||!t0.test(Z)))try{var r0=l0.call(j,Z);if(r0||d.disconnectedMatch||j.document&&j.document.nodeType!==11)return r0}catch{G1(Z,!0)}return v1(Z,X,null,[j]).length>0},v1.contains=function(j,Z){return(j.ownerDocument||j)!=X&&K2(j),s.contains(j,Z)},v1.attr=function(j,Z){(j.ownerDocument||j)!=X&&K2(j);var r0=i.attrHandle[Z.toLowerCase()],a0=r0&&l.call(i.attrHandle,Z.toLowerCase())?r0(j,Z,!$):void 0;return a0!==void 0?a0:j.getAttribute(Z)},v1.error=function(j){throw new Error("Syntax error, unrecognized expression: "+j)},s.uniqueSort=function(j){var Z,r0=[],a0=0,L0=0;if(N=!d.sortStable,f=!d.sortStable&&p.call(j,0),_.call(j,F1),N){for(;Z=j[L0++];)Z===j[L0]&&(a0=r0.push(L0));for(;a0--;)I.call(j,r0[a0],1)}return f=null,j},s.fn.uniqueSort=function(){return this.pushStack(s.uniqueSort(p.apply(this)))},i=s.expr={cacheLength:50,createPseudo:g2,match:y2,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(j){return j[1]=j[1].replace(C2,E2),j[3]=(j[3]||j[4]||j[5]||"").replace(C2,E2),j[2]==="~="&&(j[3]=" "+j[3]+" "),j.slice(0,4)},CHILD:function(j){return j[1]=j[1].toLowerCase(),j[1].slice(0,3)==="nth"?(j[3]||v1.error(j[0]),j[4]=+(j[4]?j[5]+(j[6]||1):2*(j[3]==="even"||j[3]==="odd")),j[5]=+(j[7]+j[8]||j[3]==="odd")):j[3]&&v1.error(j[0]),j},PSEUDO:function(j){var Z,r0=!j[6]&&j[2];return y2.CHILD.test(j[0])?null:(j[3]?j[2]=j[4]||j[5]||"":r0&&B2.test(r0)&&(Z=bt(r0,!0))&&(Z=r0.indexOf(")",r0.length-Z)-r0.length)&&(j[0]=j[0].slice(0,Z),j[2]=r0.slice(0,Z)),j.slice(0,3))}},filter:{TAG:function(j){var Z=j.replace(C2,E2).toLowerCase();return j==="*"?function(){return!0}:function(r0){return y(r0,Z)}},CLASS:function(j){var Z=i1[j+" "];return Z||(Z=new RegExp("(^|"+D+")"+j+"("+D+"|$)"))&&i1(j,function(r0){return Z.test(typeof r0.className=="string"&&r0.className||typeof r0.getAttribute<"u"&&r0.getAttribute("class")||"")})},ATTR:function(j,Z,r0){return function(a0){var L0=v1.attr(a0,j);return L0==null?Z==="!=":Z?(L0+="",Z==="="?L0===r0:Z==="!="?L0!==r0:Z==="^="?r0&&L0.indexOf(r0)===0:Z==="*="?r0&&L0.indexOf(r0)>-1:Z==="$="?r0&&L0.slice(-r0.length)===r0:Z==="~="?(" "+L0.replace(g1," ")+" ").indexOf(r0)>-1:Z==="|="?L0===r0||L0.slice(0,r0.length+1)===r0+"-":!1):!0}},CHILD:function(j,Z,r0,a0,L0){var j0=j.slice(0,3)!=="nth",G0=j.slice(-4)!=="last",M1=Z==="of-type";return a0===1&&L0===0?function(Q0){return!!Q0.parentNode}:function(Q0,l1,r1){var O1,d1,n1,S1,i2,Y1=j0!==G0?"nextSibling":"previousSibling",d2=Q0.parentNode,T2=M1&&Q0.nodeName.toLowerCase(),me=!r1&&!M1,b2=!1;if(d2){if(j0){for(;Y1;){for(n1=Q0;n1=n1[Y1];)if(M1?y(n1,T2):n1.nodeType===1)return!1;i2=Y1=j==="only"&&!i2&&"nextSibling"}return!0}if(i2=[G0?d2.firstChild:d2.lastChild],G0&&me){for(d1=d2[N0]||(d2[N0]={}),O1=d1[j]||[],S1=O1[0]===i0&&O1[1],b2=S1&&O1[2],n1=S1&&d2.childNodes[S1];n1=++S1&&n1&&n1[Y1]||(b2=S1=0)||i2.pop();)if(n1.nodeType===1&&++b2&&n1===Q0){d1[j]=[i0,S1,b2];break}}else if(me&&(d1=Q0[N0]||(Q0[N0]={}),O1=d1[j]||[],S1=O1[0]===i0&&O1[1],b2=S1),b2===!1)for(;(n1=++S1&&n1&&n1[Y1]||(b2=S1=0)||i2.pop())&&!((M1?y(n1,T2):n1.nodeType===1)&&++b2&&(me&&(d1=n1[N0]||(n1[N0]={}),d1[j]=[i0,b2]),n1===Q0)););return b2-=L0,b2===a0||b2%a0===0&&b2/a0>=0}}},PSEUDO:function(j,Z){var r0,a0=i.pseudos[j]||i.setFilters[j.toLowerCase()]||v1.error("unsupported pseudo: "+j);return a0[N0]?a0(Z):a0.length>1?(r0=[j,j,"",Z],i.setFilters.hasOwnProperty(j.toLowerCase())?g2(function(L0,j0){for(var G0,M1=a0(L0,Z),Q0=M1.length;Q0--;)G0=r.call(L0,M1[Q0]),L0[G0]=!(j0[G0]=M1[Q0])}):function(L0){return a0(L0,0,r0)}):a0}},pseudos:{not:g2(function(j){var Z=[],r0=[],a0=ZM(j.replace(G,"$1"));return a0[N0]?g2(function(L0,j0,G0,M1){for(var Q0,l1=a0(L0,null,M1,[]),r1=L0.length;r1--;)(Q0=l1[r1])&&(L0[r1]=!(j0[r1]=Q0))}):function(L0,j0,G0){return Z[0]=L0,a0(Z,null,G0,r0),Z[0]=null,!r0.pop()}}),has:g2(function(j){return function(Z){return v1(j,Z).length>0}}),contains:g2(function(j){return j=j.replace(C2,E2),function(Z){return(Z.textContent||s.text(Z)).indexOf(j)>-1}}),lang:g2(function(j){return Mt.test(j||"")||v1.error("unsupported lang: "+j),j=j.replace(C2,E2).toLowerCase(),function(Z){var r0;do if(r0=$?Z.lang:Z.getAttribute("xml:lang")||Z.getAttribute("lang"))return r0=r0.toLowerCase(),r0===j||r0.indexOf(j+"-")===0;while((Z=Z.parentNode)&&Z.nodeType===1);return!1}}),target:function(j){var Z=t.location&&t.location.hash;return Z&&Z.slice(1)===j.id},root:function(j){return j===Q},focus:function(j){return j===kO()&&X.hasFocus()&&!!(j.type||j.href||~j.tabIndex)},enabled:bz(!1),disabled:bz(!0),checked:function(j){return y(j,"input")&&!!j.checked||y(j,"option")&&!!j.selected},selected:function(j){return j.parentNode&&j.parentNode.selectedIndex,j.selected===!0},empty:function(j){for(j=j.firstChild;j;j=j.nextSibling)if(j.nodeType<6)return!1;return!0},parent:function(j){return!i.pseudos.empty(j)},header:function(j){return U2.test(j.nodeName)},input:function(j){return $2.test(j.nodeName)},button:function(j){return y(j,"input")&&j.type==="button"||y(j,"button")},text:function(j){var Z;return y(j,"input")&&j.type==="text"&&((Z=j.getAttribute("type"))==null||Z.toLowerCase()==="text")},first:pe(function(){return[0]}),last:pe(function(j,Z){return[Z-1]}),eq:pe(function(j,Z,r0){return[r0<0?r0+Z:r0]}),even:pe(function(j,Z){for(var r0=0;r0Z?a0=Z:a0=r0;--a0>=0;)j.push(a0);return j}),gt:pe(function(j,Z,r0){for(var a0=r0<0?r0+Z:r0;++a01?function(Z,r0,a0){for(var L0=j.length;L0--;)if(!j[L0](Z,r0,a0))return!1;return!0}:j[0]}function DO(j,Z,r0){for(var a0=0,L0=Z.length;a0-1&&(G0[r1]=!(M1[r1]=d1))}}else n1=Et(n1===M1?n1.splice(Y1,n1.length):n1),L0?L0(null,M1,n1,l1):B.apply(M1,n1)})}function YM(j){for(var Z,r0,a0,L0=j.length,j0=i.relative[j[0].type],G0=j0||i.relative[" "],M1=j0?1:0,Q0=Ct(function(O1){return O1===Z},G0,!0),l1=Ct(function(O1){return r.call(Z,O1)>-1},G0,!0),r1=[function(O1,d1,n1){var S1=!j0&&(n1||d1!=u)||((Z=d1).nodeType?Q0(O1,d1,n1):l1(O1,d1,n1));return Z=null,S1}];M11&&QM(r1),M1>1&&wt(j.slice(0,M1-1).concat({value:j[M1-2].type===" "?"*":""})).replace(G,"$1"),r0,M10,a0=j.length>0,L0=function(j0,G0,M1,Q0,l1){var r1,O1,d1,n1=0,S1="0",i2=j0&&[],Y1=[],d2=u,T2=j0||a0&&i.find.TAG("*",l1),me=i0+=d2==null?1:Math.random()||.1,b2=T2.length;for(l1&&(u=G0==X||G0||l1);S1!==b2&&(r1=T2[S1])!=null;S1++){if(a0&&r1){for(O1=0,!G0&&r1.ownerDocument!=X&&(K2(r1),M1=!$);d1=j[O1++];)if(d1(r1,G0||X,M1)){B.call(Q0,r1);break}l1&&(i0=me)}r0&&((r1=!d1&&r1)&&n1--,j0&&i2.push(r1))}if(n1+=S1,r0&&S1!==n1){for(O1=0;d1=Z[O1++];)d1(i2,Y1,G0,M1);if(j0){if(n1>0)for(;S1--;)i2[S1]||Y1[S1]||(Y1[S1]=E.call(Q0));Y1=Et(Y1)}B.apply(Q0,Y1),l1&&!j0&&Y1.length>0&&n1+Z.length>1&&s.uniqueSort(Q0)}return l1&&(i0=me,u=d2),i2};return r0?g2(L0):L0}function ZM(j,Z){var r0,a0=[],L0=[],j0=A1[j+" "];if(!j0){for(Z||(Z=bt(j)),r0=Z.length;r0--;)j0=YM(Z[r0]),j0[N0]?a0.push(j0):L0.push(j0);j0=A1(j,PO(L0,a0)),j0.selector=j}return j0}function pz(j,Z,r0,a0){var L0,j0,G0,M1,Q0,l1=typeof j=="function"&&j,r1=!a0&&bt(j=l1.selector||j);if(r0=r0||[],r1.length===1){if(j0=r1[0]=r1[0].slice(0),j0.length>2&&(G0=j0[0]).type==="ID"&&Z.nodeType===9&&$&&i.relative[j0[1].type]){if(Z=(i.find.ID(G0.matches[0].replace(C2,E2),Z)||[])[0],Z)l1&&(Z=Z.parentNode);else return r0;j=j.slice(j0.shift().value.length)}for(L0=y2.needsContext.test(j)?0:j0.length;L0--&&(G0=j0[L0],!i.relative[M1=G0.type]);)if((Q0=i.find[M1])&&(a0=Q0(G0.matches[0].replace(C2,E2),KM.test(j0[0].type)&&GM(Z.parentNode)||Z))){if(j0.splice(L0,1),j=a0.length&&wt(j0),!j)return B.apply(r0,a0),r0;break}}return(l1||ZM(j,r1))(a0,Z,!$,r0,!Z||KM.test(j)&&GM(Z.parentNode)||Z),r0}d.sortStable=N0.split("").sort(F1).join("")===N0,K2(),d.sortDetached=Re(function(j){return j.compareDocumentPosition(X.createElement("fieldset"))&1}),s.find=v1,s.expr[":"]=s.expr.pseudos,s.unique=s.uniqueSort,v1.compile=ZM,v1.select=pz,v1.setDocument=K2,v1.tokenize=bt,v1.escape=s.escapeSelector,v1.getText=s.text,v1.isXML=s.isXMLDoc,v1.selectors=s.expr,v1.support=s.support,v1.uniqueSort=s.uniqueSort})();var Y=function(z,i,u){for(var f=[],N=u!==void 0;(z=z[i])&&z.nodeType!==9;)if(z.nodeType===1){if(N&&s(z).is(u))break;f.push(z)}return f},$0=function(z,i){for(var u=[];z;z=z.nextSibling)z.nodeType===1&&z!==i&&u.push(z);return u},I0=s.expr.match.needsContext,q0=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function x0(z,i,u){return R(i)?s.grep(z,function(f,N){return!!i.call(f,N,f)!==u}):i.nodeType?s.grep(z,function(f){return f===i!==u}):typeof i!="string"?s.grep(z,function(f){return r.call(i,f)>-1!==u}):s.filter(i,z,u)}s.filter=function(z,i,u){var f=i[0];return u&&(z=":not("+z+")"),i.length===1&&f.nodeType===1?s.find.matchesSelector(f,z)?[f]:[]:s.find.matches(z,s.grep(i,function(N){return N.nodeType===1}))},s.fn.extend({find:function(z){var i,u,f=this.length,N=this;if(typeof z!="string")return this.pushStack(s(z).filter(function(){for(i=0;i1?s.uniqueSort(u):u},filter:function(z){return this.pushStack(x0(this,z||[],!1))},not:function(z){return this.pushStack(x0(this,z||[],!0))},is:function(z){return!!x0(this,typeof z=="string"&&I0.test(z)?s(z):z||[],!1).length}});var X0,p0=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,R0=s.fn.init=function(z,i,u){var f,N;if(!z)return this;if(u=u||X0,typeof z=="string")if(z[0]==="<"&&z[z.length-1]===">"&&z.length>=3?f=[null,z,null]:f=p0.exec(z),f&&(f[1]||!i))if(f[1]){if(i=i instanceof s?i[0]:i,s.merge(this,s.parseHTML(f[1],i&&i.nodeType?i.ownerDocument||i:m,!0)),q0.test(f[1])&&s.isPlainObject(i))for(f in i)R(this[f])?this[f](i[f]):this.attr(f,i[f]);return this}else return N=m.getElementById(f[2]),N&&(this[0]=N,this.length=1),this;else return!i||i.jquery?(i||u).find(z):this.constructor(i).find(z);else{if(z.nodeType)return this[0]=z,this.length=1,this;if(R(z))return u.ready!==void 0?u.ready(z):z(s)}return s.makeArray(z,this)};R0.prototype=s.fn,X0=s(m);var s0=/^(?:parents|prev(?:Until|All))/,d0={children:!0,contents:!0,next:!0,prev:!0};s.fn.extend({has:function(z){var i=s(z,this),u=i.length;return this.filter(function(){for(var f=0;f-1:u.nodeType===1&&s.find.matchesSelector(u,z))){B.push(u);break}}return this.pushStack(B.length>1?s.uniqueSort(B):B)},index:function(z){return z?typeof z=="string"?r.call(s(z),this[0]):r.call(this,z.jquery?z[0]:z):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(z,i){return this.pushStack(s.uniqueSort(s.merge(this.get(),s(z,i))))},addBack:function(z){return this.add(z==null?this.prevObject:this.prevObject.filter(z))}});function f0(z,i){for(;(z=z[i])&&z.nodeType!==1;);return z}s.each({parent:function(z){var i=z.parentNode;return i&&i.nodeType!==11?i:null},parents:function(z){return Y(z,"parentNode")},parentsUntil:function(z,i,u){return Y(z,"parentNode",u)},next:function(z){return f0(z,"nextSibling")},prev:function(z){return f0(z,"previousSibling")},nextAll:function(z){return Y(z,"nextSibling")},prevAll:function(z){return Y(z,"previousSibling")},nextUntil:function(z,i,u){return Y(z,"nextSibling",u)},prevUntil:function(z,i,u){return Y(z,"previousSibling",u)},siblings:function(z){return $0((z.parentNode||{}).firstChild,z)},children:function(z){return $0(z.firstChild)},contents:function(z){return z.contentDocument!=null&&o(z.contentDocument)?z.contentDocument:(y(z,"template")&&(z=z.content||z),s.merge([],z.childNodes))}},function(z,i){s.fn[z]=function(u,f){var N=s.map(this,i,u);return z.slice(-5)!=="Until"&&(f=u),f&&typeof f=="string"&&(N=s.filter(f,N)),this.length>1&&(d0[z]||s.uniqueSort(N),s0.test(z)&&N.reverse()),this.pushStack(N)}});var v0=/[^\x20\t\r\n\f]+/g;function J0(z){var i={};return s.each(z.match(v0)||[],function(u,f){i[f]=!0}),i}s.Callbacks=function(z){z=typeof z=="string"?J0(z):s.extend({},z);var i,u,f,N,B=[],X=[],Q=-1,$=function(){for(N=N||z.once,f=i=!0;X.length;Q=-1)for(u=X.shift();++Q-1;)B.splice(i0,1),i0<=Q&&Q--}),this},has:function(l0){return l0?s.inArray(l0,B)>-1:B.length>0},empty:function(){return B&&(B=[]),this},disable:function(){return N=X=[],B=u="",this},disabled:function(){return!B},lock:function(){return N=X=[],!u&&!i&&(B=u=""),this},locked:function(){return!!N},fireWith:function(l0,N0){return N||(N0=N0||[],N0=[l0,N0.slice?N0.slice():N0],X.push(N0),i||$()),this},fire:function(){return t0.fireWith(this,arguments),this},fired:function(){return!!f}};return t0};function Y0(z){return z}function F(z){throw z}function c0(z,i,u,f){var N;try{z&&R(N=z.promise)?N.call(z).done(i).fail(u):z&&R(N=z.then)?N.call(z,i,u):i.apply(void 0,[z].slice(f))}catch(B){u.apply(void 0,[B])}}s.extend({Deferred:function(z){var i=[["notify","progress",s.Callbacks("memory"),s.Callbacks("memory"),2],["resolve","done",s.Callbacks("once memory"),s.Callbacks("once memory"),0,"resolved"],["reject","fail",s.Callbacks("once memory"),s.Callbacks("once memory"),1,"rejected"]],u="pending",f={state:function(){return u},always:function(){return N.done(arguments).fail(arguments),this},catch:function(B){return f.then(null,B)},pipe:function(){var B=arguments;return s.Deferred(function(X){s.each(i,function(Q,$){var t0=R(B[$[4]])&&B[$[4]];N[$[1]](function(){var l0=t0&&t0.apply(this,arguments);l0&&R(l0.promise)?l0.promise().progress(X.notify).done(X.resolve).fail(X.reject):X[$[0]+"With"](this,t0?[l0]:arguments)})}),B=null}).promise()},then:function(B,X,Q){var $=0;function t0(l0,N0,i0,C0){return function(){var i1=this,h1=arguments,A1=function(){var F1,N2;if(!(l0<$)){if(F1=i0.apply(i1,h1),F1===N0.promise())throw new TypeError("Thenable self-resolution");N2=F1&&(typeof F1=="object"||typeof F1=="function")&&F1.then,R(N2)?C0?N2.call(F1,t0($,N0,Y0,C0),t0($,N0,F,C0)):($++,N2.call(F1,t0($,N0,Y0,C0),t0($,N0,F,C0),t0($,N0,Y0,N0.notifyWith))):(i0!==Y0&&(i1=void 0,h1=[F1]),(C0||N0.resolveWith)(i1,h1))}},G1=C0?A1:function(){try{A1()}catch(F1){s.Deferred.exceptionHook&&s.Deferred.exceptionHook(F1,G1.error),l0+1>=$&&(i0!==F&&(i1=void 0,h1=[F1]),N0.rejectWith(i1,h1))}};l0?G1():(s.Deferred.getErrorHook?G1.error=s.Deferred.getErrorHook():s.Deferred.getStackHook&&(G1.error=s.Deferred.getStackHook()),t.setTimeout(G1))}}return s.Deferred(function(l0){i[0][3].add(t0(0,l0,R(Q)?Q:Y0,l0.notifyWith)),i[1][3].add(t0(0,l0,R(B)?B:Y0)),i[2][3].add(t0(0,l0,R(X)?X:F))}).promise()},promise:function(B){return B!=null?s.extend(B,f):f}},N={};return s.each(i,function(B,X){var Q=X[2],$=X[5];f[X[1]]=Q.add,$&&Q.add(function(){u=$},i[3-B][2].disable,i[3-B][3].disable,i[0][2].lock,i[0][3].lock),Q.add(X[3].fire),N[X[0]]=function(){return N[X[0]+"With"](this===N?void 0:this,arguments),this},N[X[0]+"With"]=Q.fireWith}),f.promise(N),z&&z.call(N,N),N},when:function(z){var i=arguments.length,u=i,f=Array(u),N=p.call(arguments),B=s.Deferred(),X=function(Q){return function($){f[Q]=this,N[Q]=arguments.length>1?p.call(arguments):$,--i||B.resolveWith(f,N)}};if(i<=1&&(c0(z,B.done(X(u)).resolve,B.reject,!i),B.state()==="pending"||R(N[u]&&N[u].then)))return B.then();for(;u--;)c0(N[u],X(u),B.reject);return B.promise()}});var z0=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;s.Deferred.exceptionHook=function(z,i){t.console&&t.console.warn&&z&&z0.test(z.name)&&t.console.warn("jQuery.Deferred exception: "+z.message,z.stack,i)},s.readyException=function(z){t.setTimeout(function(){throw z})};var W0=s.Deferred();s.fn.ready=function(z){return W0.then(z).catch(function(i){s.readyException(i)}),this},s.extend({isReady:!1,readyWait:1,ready:function(z){(z===!0?--s.readyWait:s.isReady)||(s.isReady=!0,!(z!==!0&&--s.readyWait>0)&&W0.resolveWith(m,[s]))}}),s.ready.then=W0.then;function E0(){m.removeEventListener("DOMContentLoaded",E0),t.removeEventListener("load",E0),s.ready()}m.readyState==="complete"||m.readyState!=="loading"&&!m.documentElement.doScroll?t.setTimeout(s.ready):(m.addEventListener("DOMContentLoaded",E0),t.addEventListener("load",E0));var w0=function(z,i,u,f,N,B,X){var Q=0,$=z.length,t0=u==null;if(S(u)==="object"){N=!0;for(Q in u)w0(z,i,Q,u[Q],!0,B,X)}else if(f!==void 0&&(N=!0,R(f)||(X=!0),t0&&(X?(i.call(z,f),i=null):(t0=i,i=function(l0,N0,i0){return t0.call(s(l0),i0)})),i))for(;Q<$;Q++)i(z[Q],u,X?f:f.call(z[Q],Q,i(z[Q],u)));return N?z:t0?i.call(z):$?i(z[0],u):B},c1=/^-ms-/,p1=/-([a-z])/g;function e1(z,i){return i.toUpperCase()}function m0(z){return z.replace(c1,"ms-").replace(p1,e1)}var V0=function(z){return z.nodeType===1||z.nodeType===9||!+z.nodeType};function z1(){this.expando=s.expando+z1.uid++}z1.uid=1,z1.prototype={cache:function(z){var i=z[this.expando];return i||(i={},V0(z)&&(z.nodeType?z[this.expando]=i:Object.defineProperty(z,this.expando,{value:i,configurable:!0}))),i},set:function(z,i,u){var f,N=this.cache(z);if(typeof i=="string")N[m0(i)]=u;else for(f in i)N[m0(f)]=i[f];return N},get:function(z,i){return i===void 0?this.cache(z):z[this.expando]&&z[this.expando][m0(i)]},access:function(z,i,u){return i===void 0||i&&typeof i=="string"&&u===void 0?this.get(z,i):(this.set(z,i,u),u!==void 0?u:i)},remove:function(z,i){var u,f=z[this.expando];if(f!==void 0){if(i!==void 0)for(Array.isArray(i)?i=i.map(m0):(i=m0(i),i=i in f?[i]:i.match(v0)||[]),u=i.length;u--;)delete f[i[u]];(i===void 0||s.isEmptyObject(f))&&(z.nodeType?z[this.expando]=void 0:delete z[this.expando])}},hasData:function(z){var i=z[this.expando];return i!==void 0&&!s.isEmptyObject(i)}};var S0=new z1,a1=new z1,w1=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,X1=/[A-Z]/g;function U1(z){return z==="true"?!0:z==="false"?!1:z==="null"?null:z===+z+""?+z:w1.test(z)?JSON.parse(z):z}function H1(z,i,u){var f;if(u===void 0&&z.nodeType===1)if(f="data-"+i.replace(X1,"-$&").toLowerCase(),u=z.getAttribute(f),typeof u=="string"){try{u=U1(u)}catch{}a1.set(z,i,u)}else u=void 0;return u}s.extend({hasData:function(z){return a1.hasData(z)||S0.hasData(z)},data:function(z,i,u){return a1.access(z,i,u)},removeData:function(z,i){a1.remove(z,i)},_data:function(z,i,u){return S0.access(z,i,u)},_removeData:function(z,i){S0.remove(z,i)}}),s.fn.extend({data:function(z,i){var u,f,N,B=this[0],X=B&&B.attributes;if(z===void 0){if(this.length&&(N=a1.get(B),B.nodeType===1&&!S0.get(B,"hasDataAttrs"))){for(u=X.length;u--;)X[u]&&(f=X[u].name,f.indexOf("data-")===0&&(f=m0(f.slice(5)),H1(B,f,N[f])));S0.set(B,"hasDataAttrs",!0)}return N}return typeof z=="object"?this.each(function(){a1.set(this,z)}):w0(this,function(Q){var $;if(B&&Q===void 0)return $=a1.get(B,z),$!==void 0||($=H1(B,z),$!==void 0)?$:void 0;this.each(function(){a1.set(this,z,Q)})},null,i,arguments.length>1,null,!0)},removeData:function(z){return this.each(function(){a1.remove(this,z)})}}),s.extend({queue:function(z,i,u){var f;if(z)return i=(i||"fx")+"queue",f=S0.get(z,i),u&&(!f||Array.isArray(u)?f=S0.access(z,i,s.makeArray(u)):f.push(u)),f||[]},dequeue:function(z,i){i=i||"fx";var u=s.queue(z,i),f=u.length,N=u.shift(),B=s._queueHooks(z,i),X=function(){s.dequeue(z,i)};N==="inprogress"&&(N=u.shift(),f--),N&&(i==="fx"&&u.unshift("inprogress"),delete B.stop,N.call(z,X,B)),!f&&B&&B.empty.fire()},_queueHooks:function(z,i){var u=i+"queueHooks";return S0.get(z,u)||S0.access(z,u,{empty:s.Callbacks("once memory").add(function(){S0.remove(z,[i+"queue",u])})})}}),s.fn.extend({queue:function(z,i){var u=2;return typeof z!="string"&&(i=z,z="fx",u--),arguments.length\x20\t\r\n\f]*)/i,M0=/^$|^module$|\/(?:java|ecma)script/i;(function(){var z=m.createDocumentFragment(),i=z.appendChild(m.createElement("div")),u=m.createElement("input");u.setAttribute("type","radio"),u.setAttribute("checked","checked"),u.setAttribute("name","t"),i.appendChild(u),d.checkClone=i.cloneNode(!0).cloneNode(!0).lastChild.checked,i.innerHTML="",d.noCloneChecked=!!i.cloneNode(!0).lastChild.defaultValue,i.innerHTML="",d.option=!!i.lastChild})();var J={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};J.tbody=J.tfoot=J.colgroup=J.caption=J.thead,J.th=J.td,d.option||(J.optgroup=J.option=[1,""]);function U(z,i){var u;return typeof z.getElementsByTagName<"u"?u=z.getElementsByTagName(i||"*"):typeof z.querySelectorAll<"u"?u=z.querySelectorAll(i||"*"):u=[],i===void 0||i&&y(z,i)?s.merge([z],u):u}function n0(z,i){for(var u=0,f=z.length;u-1){N&&N.push(B);continue}if(t0=V1(B),X=U(N0.appendChild(B),"script"),t0&&n0(X),u)for(l0=0;B=X[l0++];)M0.test(B.type||"")&&u.push(B)}return N0}var T0=/^([^.]*)(?:\.(.+)|)/;function F0(){return!0}function B0(){return!1}function _0(z,i,u,f,N,B){var X,Q;if(typeof i=="object"){typeof u!="string"&&(f=f||u,u=void 0);for(Q in i)_0(z,Q,u,f,i[Q],B);return z}if(f==null&&N==null?(N=u,f=u=void 0):N==null&&(typeof u=="string"?(N=f,f=void 0):(N=f,f=u,u=void 0)),N===!1)N=B0;else if(!N)return z;return B===1&&(X=N,N=function($){return s().off($),X.apply(this,arguments)},N.guid=X.guid||(X.guid=s.guid++)),z.each(function(){s.event.add(this,i,N,f,u)})}s.event={global:{},add:function(z,i,u,f,N){var B,X,Q,$,t0,l0,N0,i0,C0,i1,h1,A1=S0.get(z);if(V0(z))for(u.handler&&(B=u,u=B.handler,N=B.selector),N&&s.find.matchesSelector(N1,N),u.guid||(u.guid=s.guid++),($=A1.events)||($=A1.events=Object.create(null)),(X=A1.handle)||(X=A1.handle=function(G1){return typeof s<"u"&&s.event.triggered!==G1.type?s.event.dispatch.apply(z,arguments):void 0}),i=(i||"").match(v0)||[""],t0=i.length;t0--;)Q=T0.exec(i[t0])||[],C0=h1=Q[1],i1=(Q[2]||"").split(".").sort(),C0&&(N0=s.event.special[C0]||{},C0=(N?N0.delegateType:N0.bindType)||C0,N0=s.event.special[C0]||{},l0=s.extend({type:C0,origType:h1,data:f,handler:u,guid:u.guid,selector:N,needsContext:N&&s.expr.match.needsContext.test(N),namespace:i1.join(".")},B),(i0=$[C0])||(i0=$[C0]=[],i0.delegateCount=0,(!N0.setup||N0.setup.call(z,f,i1,X)===!1)&&z.addEventListener&&z.addEventListener(C0,X)),N0.add&&(N0.add.call(z,l0),l0.handler.guid||(l0.handler.guid=u.guid)),N?i0.splice(i0.delegateCount++,0,l0):i0.push(l0),s.event.global[C0]=!0)},remove:function(z,i,u,f,N){var B,X,Q,$,t0,l0,N0,i0,C0,i1,h1,A1=S0.hasData(z)&&S0.get(z);if(!(!A1||!($=A1.events))){for(i=(i||"").match(v0)||[""],t0=i.length;t0--;){if(Q=T0.exec(i[t0])||[],C0=h1=Q[1],i1=(Q[2]||"").split(".").sort(),!C0){for(C0 in $)s.event.remove(z,C0+i[t0],u,f,!0);continue}for(N0=s.event.special[C0]||{},C0=(f?N0.delegateType:N0.bindType)||C0,i0=$[C0]||[],Q=Q[2]&&new RegExp("(^|\\.)"+i1.join("\\.(?:.*\\.|)")+"(\\.|$)"),X=B=i0.length;B--;)l0=i0[B],(N||h1===l0.origType)&&(!u||u.guid===l0.guid)&&(!Q||Q.test(l0.namespace))&&(!f||f===l0.selector||f==="**"&&l0.selector)&&(i0.splice(B,1),l0.selector&&i0.delegateCount--,N0.remove&&N0.remove.call(z,l0));X&&!i0.length&&((!N0.teardown||N0.teardown.call(z,i1,A1.handle)===!1)&&s.removeEvent(z,C0,A1.handle),delete $[C0])}s.isEmptyObject($)&&S0.remove(z,"handle events")}},dispatch:function(z){var i,u,f,N,B,X,Q=new Array(arguments.length),$=s.event.fix(z),t0=(S0.get(this,"events")||Object.create(null))[$.type]||[],l0=s.event.special[$.type]||{};for(Q[0]=$,i=1;i=1)){for(;t0!==this;t0=t0.parentNode||this)if(t0.nodeType===1&&!(z.type==="click"&&t0.disabled===!0)){for(B=[],X={},u=0;u<$;u++)f=i[u],N=f.selector+" ",X[N]===void 0&&(X[N]=f.needsContext?s(N,this).index(t0)>-1:s.find(N,this,null,[t0]).length),X[N]&&B.push(f);B.length&&Q.push({elem:t0,handlers:B})}}return t0=this,$\s*$/g;function k0(z,i){return y(z,"table")&&y(i.nodeType!==11?i:i.firstChild,"tr")&&s(z).children("tbody")[0]||z}function U0(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,i){var u,f,N,B,X,Q,$;if(i.nodeType===1){if(S0.hasData(z)&&(B=S0.get(z),$=B.events,$)){S0.remove(i,"handle events");for(N in $)for(u=0,f=$[N].length;u1&&typeof C0=="string"&&!d.checkClone&&D0.test(C0))return z.each(function(h1){var A1=z.eq(h1);i1&&(i[0]=C0.call(this,h1,A1.html())),$1(A1,i,u,f)});if(N0&&(N=u0(i,z[0].ownerDocument,!1,z,f),B=N.firstChild,N.childNodes.length===1&&(N=B),B||f)){for(X=s.map(U(N,"script"),U0),Q=X.length;l00&&n0(X,!$&&U(z,"script")),Q},cleanData:function(z){for(var i,u,f,N=s.event.special,B=0;(u=z[B])!==void 0;B++)if(V0(u)){if(i=u[S0.expando]){if(i.events)for(f in i.events)N[f]?s.event.remove(u,f):s.removeEvent(u,f,i.handle);u[S0.expando]=void 0}u[a1.expando]&&(u[a1.expando]=void 0)}}}),s.fn.extend({detach:function(z){return M2(this,z,!0)},remove:function(z){return M2(this,z)},text:function(z){return w0(this,function(i){return i===void 0?s.text(this):this.empty().each(function(){(this.nodeType===1||this.nodeType===11||this.nodeType===9)&&(this.textContent=i)})},null,z,arguments.length)},append:function(){return $1(this,arguments,function(z){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var i=k0(this,z);i.appendChild(z)}})},prepend:function(){return $1(this,arguments,function(z){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var i=k0(this,z);i.insertBefore(z,i.firstChild)}})},before:function(){return $1(this,arguments,function(z){this.parentNode&&this.parentNode.insertBefore(z,this)})},after:function(){return $1(this,arguments,function(z){this.parentNode&&this.parentNode.insertBefore(z,this.nextSibling)})},empty:function(){for(var z,i=0;(z=this[i])!=null;i++)z.nodeType===1&&(s.cleanData(U(z,!1)),z.textContent="");return this},clone:function(z,i){return z=z??!1,i=i??z,this.map(function(){return s.clone(this,z,i)})},html:function(z){return w0(this,function(i){var u=this[0]||{},f=0,N=this.length;if(i===void 0&&u.nodeType===1)return u.innerHTML;if(typeof i=="string"&&!Z0.test(i)&&!J[(K.exec(i)||["",""])[1].toLowerCase()]){i=s.htmlPrefilter(i);try{for(;f=0&&($+=Math.max(0,Math.ceil(z["offset"+i[0].toUpperCase()+i.slice(1)]-B-$-Q-.5))||0),$+t0}function Fp(z,i,u){var f=Tt(z),N=!d.boxSizingReliable()||u,B=N&&s.css(z,"boxSizing",!1,f)==="border-box",X=B,Q=Je(z,i,f),$="offset"+i[0].toUpperCase()+i.slice(1);if(te.test(Q)){if(!u)return Q;Q="auto"}return(!d.boxSizingReliable()&&B||!d.reliableTrDimensions()&&y(z,"tr")||Q==="auto"||!parseFloat(Q)&&s.css(z,"display",!1,f)==="inline")&&z.getClientRects().length&&(B=s.css(z,"boxSizing",!1,f)==="border-box",X=$ in z,X&&(Q=z[$])),Q=parseFloat(Q)||0,Q+_M(z,i,u||(B?"border":"content"),X,f,Q)+"px"}s.extend({cssHooks:{opacity:{get:function(z,i){if(i){var u=Je(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,i,u,f){if(!(!z||z.nodeType===3||z.nodeType===8||!z.style)){var N,B,X,Q=m0(i),$=EM.test(i),t0=z.style;if($||(i=kM(Q)),X=s.cssHooks[i]||s.cssHooks[Q],u!==void 0){if(B=typeof u,B==="string"&&(N=T1.exec(u))&&N[1]&&(u=L2(z,i,N),B="number"),u==null||u!==u)return;B==="number"&&!$&&(u+=N&&N[3]||(s.cssNumber[Q]?"":"px")),!d.clearCloneStyle&&u===""&&i.indexOf("background")===0&&(t0[i]="inherit"),(!X||!("set"in X)||(u=X.set(z,u,f))!==void 0)&&($?t0.setProperty(i,u):t0[i]=u)}else return X&&"get"in X&&(N=X.get(z,!1,f))!==void 0?N:t0[i]}},css:function(z,i,u,f){var N,B,X,Q=m0(i),$=EM.test(i);return $||(i=kM(Q)),X=s.cssHooks[i]||s.cssHooks[Q],X&&"get"in X&&(N=X.get(z,!0,u)),N===void 0&&(N=Je(z,i,f)),N==="normal"&&i in Hp&&(N=Hp[i]),u===""||u?(B=parseFloat(N),u===!0||isFinite(B)?B||0:N):N}}),s.each(["height","width"],function(z,i){s.cssHooks[i]={get:function(u,f,N){if(f)return iO.test(s.css(u,"display"))&&(!u.getClientRects().length||!u.getBoundingClientRect().width)?kp(u,OO,function(){return Fp(u,i,N)}):Fp(u,i,N)},set:function(u,f,N){var B,X=Tt(u),Q=!d.scrollboxSize()&&X.position==="absolute",$=Q||N,t0=$&&s.css(u,"boxSizing",!1,X)==="border-box",l0=N?_M(u,i,N,t0,X):0;return t0&&Q&&(l0-=Math.ceil(u["offset"+i[0].toUpperCase()+i.slice(1)]-parseFloat(X[i])-_M(u,i,"border",!1,X)-.5)),l0&&(B=T1.exec(f))&&(B[3]||"px")!=="px"&&(u.style[i]=f,f=s.css(u,i)),jp(u,f,l0)}}}),s.cssHooks.marginLeft=_p(d.reliableMarginLeft,function(z,i){if(i)return(parseFloat(Je(z,"marginLeft"))||z.getBoundingClientRect().left-kp(z,{marginLeft:0},function(){return z.getBoundingClientRect().left}))+"px"}),s.each({margin:"",padding:"",border:"Width"},function(z,i){s.cssHooks[z+i]={expand:function(u){for(var f=0,N={},B=typeof u=="string"?u.split(" "):[u];f<4;f++)N[z+C1[f]+i]=B[f]||B[f-2]||B[0];return N}},z!=="margin"&&(s.cssHooks[z+i].set=jp)}),s.fn.extend({css:function(z,i){return w0(this,function(u,f,N){var B,X,Q={},$=0;if(Array.isArray(f)){for(B=Tt(u),X=f.length;$1)}});function r2(z,i,u,f,N){return new r2.prototype.init(z,i,u,f,N)}s.Tween=r2,r2.prototype={constructor:r2,init:function(z,i,u,f,N,B){this.elem=z,this.prop=u,this.easing=N||s.easing._default,this.options=i,this.start=this.now=this.cur(),this.end=f,this.unit=B||(s.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 i,u=r2.propHooks[this.prop];return this.options.duration?this.pos=i=s.easing[this.easing](z,this.options.duration*z,0,1,this.options.duration):this.pos=i=z,this.now=(this.end-this.start)*i+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 i;return z.elem.nodeType!==1||z.elem[z.prop]!=null&&z.elem.style[z.prop]==null?z.elem[z.prop]:(i=s.css(z.elem,z.prop,""),!i||i==="auto"?0:i)},set:function(z){s.fx.step[z.prop]?s.fx.step[z.prop](z):z.elem.nodeType===1&&(s.cssHooks[z.prop]||z.elem.style[kM(z.prop)]!=null)?s.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)}},s.easing={linear:function(z){return z},swing:function(z){return .5-Math.cos(z*Math.PI)/2},_default:"swing"},s.fx=r2.prototype.init,s.fx.step={};var ge,St,aO=/^(?:toggle|show|hide)$/,sO=/queueHooks$/;function IM(){St&&(m.hidden===!1&&t.requestAnimationFrame?t.requestAnimationFrame(IM):t.setTimeout(IM,s.fx.interval),s.fx.tick())}function Vp(){return t.setTimeout(function(){ge=void 0}),ge=Date.now()}function xt(z,i){var u,f=0,N={height:z};for(i=i?1:0;f<4;f+=2-i)u=C1[f],N["margin"+u]=N["padding"+u]=z;return i&&(N.opacity=N.width=z),N}function $p(z,i,u){for(var f,N=(h2.tweeners[i]||[]).concat(h2.tweeners["*"]),B=0,X=N.length;B1)},removeAttr:function(z){return this.each(function(){s.removeAttr(this,z)})}}),s.extend({attr:function(z,i,u){var f,N,B=z.nodeType;if(!(B===3||B===8||B===2)){if(typeof z.getAttribute>"u")return s.prop(z,i,u);if((B!==1||!s.isXMLDoc(z))&&(N=s.attrHooks[i.toLowerCase()]||(s.expr.match.bool.test(i)?Up:void 0)),u!==void 0){if(u===null){s.removeAttr(z,i);return}return N&&"set"in N&&(f=N.set(z,u,i))!==void 0?f:(z.setAttribute(i,u+""),u)}return N&&"get"in N&&(f=N.get(z,i))!==null?f:(f=s.find.attr(z,i),f??void 0)}},attrHooks:{type:{set:function(z,i){if(!d.radioValue&&i==="radio"&&y(z,"input")){var u=z.value;return z.setAttribute("type",i),u&&(z.value=u),i}}}},removeAttr:function(z,i){var u,f=0,N=i&&i.match(v0);if(N&&z.nodeType===1)for(;u=N[f++];)z.removeAttribute(u)}}),Up={set:function(z,i,u){return i===!1?s.removeAttr(z,u):z.setAttribute(u,u),u}},s.each(s.expr.match.bool.source.match(/\w+/g),function(z,i){var u=Ye[i]||s.find.attr;Ye[i]=function(f,N,B){var X,Q,$=N.toLowerCase();return B||(Q=Ye[$],Ye[$]=X,X=u(f,N,B)!=null?$:null,Ye[$]=Q),X}});var dO=/^(?:input|select|textarea|button)$/i,uO=/^(?:a|area)$/i;s.fn.extend({prop:function(z,i){return w0(this,s.prop,z,i,arguments.length>1)},removeProp:function(z){return this.each(function(){delete this[s.propFix[z]||z]})}}),s.extend({prop:function(z,i,u){var f,N,B=z.nodeType;if(!(B===3||B===8||B===2))return(B!==1||!s.isXMLDoc(z))&&(i=s.propFix[i]||i,N=s.propHooks[i]),u!==void 0?N&&"set"in N&&(f=N.set(z,u,i))!==void 0?f:z[i]=u:N&&"get"in N&&(f=N.get(z,i))!==null?f:z[i]},propHooks:{tabIndex:{get:function(z){var i=s.find.attr(z,"tabindex");return i?parseInt(i,10):dO.test(z.nodeName)||uO.test(z.nodeName)&&z.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),d.optSelected||(s.propHooks.selected={get:function(z){var i=z.parentNode;return i&&i.parentNode&&i.parentNode.selectedIndex,null},set:function(z){var i=z.parentNode;i&&(i.selectedIndex,i.parentNode&&i.parentNode.selectedIndex)}}),s.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){s.propFix[this.toLowerCase()]=this});function Me(z){var i=z.match(v0)||[];return i.join(" ")}function be(z){return z.getAttribute&&z.getAttribute("class")||""}function DM(z){return Array.isArray(z)?z:typeof z=="string"?z.match(v0)||[]:[]}s.fn.extend({addClass:function(z){var i,u,f,N,B,X;return R(z)?this.each(function(Q){s(this).addClass(z.call(this,Q,be(this)))}):(i=DM(z),i.length?this.each(function(){if(f=be(this),u=this.nodeType===1&&" "+Me(f)+" ",u){for(B=0;B-1;)u=u.replace(" "+N+" "," ");X=Me(u),f!==X&&this.setAttribute("class",X)}}):this):this.attr("class","")},toggleClass:function(z,i){var u,f,N,B,X=typeof z,Q=X==="string"||Array.isArray(z);return R(z)?this.each(function($){s(this).toggleClass(z.call(this,$,be(this),i),i)}):typeof i=="boolean"&&Q?i?this.addClass(z):this.removeClass(z):(u=DM(z),this.each(function(){if(Q)for(B=s(this),N=0;N-1)return!0;return!1}});var qO=/\r/g;s.fn.extend({val:function(z){var i,u,f,N=this[0];return arguments.length?(f=R(z),this.each(function(B){var X;this.nodeType===1&&(f?X=z.call(this,B,s(this).val()):X=z,X==null?X="":typeof X=="number"?X+="":Array.isArray(X)&&(X=s.map(X,function(Q){return Q==null?"":Q+""})),i=s.valHooks[this.type]||s.valHooks[this.nodeName.toLowerCase()],(!i||!("set"in i)||i.set(this,X,"value")===void 0)&&(this.value=X))})):N?(i=s.valHooks[N.type]||s.valHooks[N.nodeName.toLowerCase()],i&&"get"in i&&(u=i.get(N,"value"))!==void 0?u:(u=N.value,typeof u=="string"?u.replace(qO,""):u??"")):void 0}}),s.extend({valHooks:{option:{get:function(z){var i=s.find.attr(z,"value");return i??Me(s.text(z))}},select:{get:function(z){var i,u,f,N=z.options,B=z.selectedIndex,X=z.type==="select-one",Q=X?null:[],$=X?B+1:N.length;for(B<0?f=$:f=X?B:0;f<$;f++)if(u=N[f],(u.selected||f===B)&&!u.disabled&&(!u.parentNode.disabled||!y(u.parentNode,"optgroup"))){if(i=s(u).val(),X)return i;Q.push(i)}return Q},set:function(z,i){for(var u,f,N=z.options,B=s.makeArray(i),X=N.length;X--;)f=N[X],(f.selected=s.inArray(s.valHooks.option.get(f),B)>-1)&&(u=!0);return u||(z.selectedIndex=-1),B}}}}),s.each(["radio","checkbox"],function(){s.valHooks[this]={set:function(z,i){if(Array.isArray(i))return z.checked=s.inArray(s(z).val(),i)>-1}},d.checkOn||(s.valHooks[this].get=function(z){return z.getAttribute("value")===null?"on":z.value})});var Ze=t.location,Kp={guid:Date.now()},PM=/\?/;s.parseXML=function(z){var i,u;if(!z||typeof z!="string")return null;try{i=new t.DOMParser().parseFromString(z,"text/xml")}catch{}return u=i&&i.getElementsByTagName("parsererror")[0],(!i||u)&&s.error("Invalid XML: "+(u?s.map(u.childNodes,function(f){return f.textContent}).join(` -`):z)),i};var Gp=/^(?:focusinfocus|focusoutblur)$/,Qp=function(z){z.stopPropagation()};s.extend(s.event,{trigger:function(z,i,u,f){var N,B,X,Q,$,t0,l0,N0,i0=[u||m],C0=l.call(z,"type")?z.type:z,i1=l.call(z,"namespace")?z.namespace.split("."):[];if(B=N0=X=u=u||m,!(u.nodeType===3||u.nodeType===8)&&!Gp.test(C0+s.event.triggered)&&(C0.indexOf(".")>-1&&(i1=C0.split("."),C0=i1.shift(),i1.sort()),$=C0.indexOf(":")<0&&"on"+C0,z=z[s.expando]?z:new s.Event(C0,typeof z=="object"&&z),z.isTrigger=f?2:3,z.namespace=i1.join("."),z.rnamespace=z.namespace?new RegExp("(^|\\.)"+i1.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,z.result=void 0,z.target||(z.target=u),i=i==null?[z]:s.makeArray(i,[z]),l0=s.event.special[C0]||{},!(!f&&l0.trigger&&l0.trigger.apply(u,i)===!1))){if(!f&&!l0.noBubble&&!v(u)){for(Q=l0.delegateType||C0,Gp.test(Q+C0)||(B=B.parentNode);B;B=B.parentNode)i0.push(B),X=B;X===(u.ownerDocument||m)&&i0.push(X.defaultView||X.parentWindow||t)}for(N=0;(B=i0[N++])&&!z.isPropagationStopped();)N0=B,z.type=N>1?Q:l0.bindType||C0,t0=(S0.get(B,"events")||Object.create(null))[z.type]&&S0.get(B,"handle"),t0&&t0.apply(B,i),t0=$&&B[$],t0&&t0.apply&&V0(B)&&(z.result=t0.apply(B,i),z.result===!1&&z.preventDefault());return z.type=C0,!f&&!z.isDefaultPrevented()&&(!l0._default||l0._default.apply(i0.pop(),i)===!1)&&V0(u)&&$&&R(u[C0])&&!v(u)&&(X=u[$],X&&(u[$]=null),s.event.triggered=C0,z.isPropagationStopped()&&N0.addEventListener(C0,Qp),u[C0](),z.isPropagationStopped()&&N0.removeEventListener(C0,Qp),s.event.triggered=void 0,X&&(u[$]=X)),z.result}},simulate:function(z,i,u){var f=s.extend(new s.Event,u,{type:z,isSimulated:!0});s.event.trigger(f,null,i)}}),s.fn.extend({trigger:function(z,i){return this.each(function(){s.event.trigger(z,i,this)})},triggerHandler:function(z,i){var u=this[0];if(u)return s.event.trigger(z,i,u,!0)}});var fO=/\[\]$/,Jp=/\r?\n/g,WO=/^(?:submit|button|image|reset|file)$/i,hO=/^(?:input|select|textarea|keygen)/i;function HM(z,i,u,f){var N;if(Array.isArray(i))s.each(i,function(B,X){u||fO.test(z)?f(z,X):HM(z+"["+(typeof X=="object"&&X!=null?B:"")+"]",X,u,f)});else if(!u&&S(i)==="object")for(N in i)HM(z+"["+N+"]",i[N],u,f);else f(z,i)}s.param=function(z,i){var u,f=[],N=function(B,X){var Q=R(X)?X():X;f[f.length]=encodeURIComponent(B)+"="+encodeURIComponent(Q??"")};if(z==null)return"";if(Array.isArray(z)||z.jquery&&!s.isPlainObject(z))s.each(z,function(){N(this.name,this.value)});else for(u in z)HM(u,z[u],i,N);return f.join("&")},s.fn.extend({serialize:function(){return s.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var z=s.prop(this,"elements");return z?s.makeArray(z):this}).filter(function(){var z=this.type;return this.name&&!s(this).is(":disabled")&&hO.test(this.nodeName)&&!WO.test(z)&&(this.checked||!H.test(z))}).map(function(z,i){var u=s(this).val();return u==null?null:Array.isArray(u)?s.map(u,function(f){return{name:i.name,value:f.replace(Jp,`\r -`)}}):{name:i.name,value:u.replace(Jp,`\r -`)}}).get()}});var gO=/%20/g,RO=/#.*$/,mO=/([?&])_=[^&]*/,LO=/^(.*?):[ \t]*([^\r\n]*)$/mg,NO=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,vO=/^(?:GET|HEAD)$/,BO=/^\/\//,Yp={},jM={},Zp="*/".concat("*"),FM=m.createElement("a");FM.href=Ze.href;function ez(z){return function(i,u){typeof i!="string"&&(u=i,i="*");var f,N=0,B=i.toLowerCase().match(v0)||[];if(R(u))for(;f=B[N++];)f[0]==="+"?(f=f.slice(1)||"*",(z[f]=z[f]||[]).unshift(u)):(z[f]=z[f]||[]).push(u)}}function tz(z,i,u,f){var N={},B=z===jM;function X(Q){var $;return N[Q]=!0,s.each(z[Q]||[],function(t0,l0){var N0=l0(i,u,f);if(typeof N0=="string"&&!B&&!N[N0])return i.dataTypes.unshift(N0),X(N0),!1;if(B)return!($=N0)}),$}return X(i.dataTypes[0])||!N["*"]&&X("*")}function VM(z,i){var u,f,N=s.ajaxSettings.flatOptions||{};for(u in i)i[u]!==void 0&&((N[u]?z:f||(f={}))[u]=i[u]);return f&&s.extend(!0,z,f),z}function yO(z,i,u){for(var f,N,B,X,Q=z.contents,$=z.dataTypes;$[0]==="*";)$.shift(),f===void 0&&(f=z.mimeType||i.getResponseHeader("Content-Type"));if(f){for(N in Q)if(Q[N]&&Q[N].test(f)){$.unshift(N);break}}if($[0]in u)B=$[0];else{for(N in u){if(!$[0]||z.converters[N+" "+$[0]]){B=N;break}X||(X=N)}B=B||X}if(B)return B!==$[0]&&$.unshift(B),u[B]}function TO(z,i,u,f){var N,B,X,Q,$,t0={},l0=z.dataTypes.slice();if(l0[1])for(X in z.converters)t0[X.toLowerCase()]=z.converters[X];for(B=l0.shift();B;)if(z.responseFields[B]&&(u[z.responseFields[B]]=i),!$&&f&&z.dataFilter&&(i=z.dataFilter(i,z.dataType)),$=B,B=l0.shift(),B){if(B==="*")B=$;else if($!=="*"&&$!==B){if(X=t0[$+" "+B]||t0["* "+B],!X){for(N in t0)if(Q=N.split(" "),Q[1]===B&&(X=t0[$+" "+Q[0]]||t0["* "+Q[0]],X)){X===!0?X=t0[N]:t0[N]!==!0&&(B=Q[0],l0.unshift(Q[1]));break}}if(X!==!0)if(X&&z.throws)i=X(i);else try{i=X(i)}catch(N0){return{state:"parsererror",error:X?N0:"No conversion from "+$+" to "+B}}}}return{state:"success",data:i}}s.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ze.href,type:"GET",isLocal:NO.test(Ze.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Zp,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":s.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(z,i){return i?VM(VM(z,s.ajaxSettings),i):VM(s.ajaxSettings,z)},ajaxPrefilter:ez(Yp),ajaxTransport:ez(jM),ajax:function(z,i){typeof z=="object"&&(i=z,z=void 0),i=i||{};var u,f,N,B,X,Q,$,t0,l0,N0,i0=s.ajaxSetup({},i),C0=i0.context||i0,i1=i0.context&&(C0.nodeType||C0.jquery)?s(C0):s.event,h1=s.Deferred(),A1=s.Callbacks("once memory"),G1=i0.statusCode||{},F1={},N2={},v2="canceled",u1={readyState:0,getResponseHeader:function(g1){var E1;if($){if(!B)for(B={};E1=LO.exec(N);)B[E1[1].toLowerCase()+" "]=(B[E1[1].toLowerCase()+" "]||[]).concat(E1[2]);E1=B[g1.toLowerCase()+" "]}return E1==null?null:E1.join(", ")},getAllResponseHeaders:function(){return $?N:null},setRequestHeader:function(g1,E1){return $==null&&(g1=N2[g1.toLowerCase()]=N2[g1.toLowerCase()]||g1,F1[g1]=E1),this},overrideMimeType:function(g1){return $==null&&(i0.mimeType=g1),this},statusCode:function(g1){var E1;if(g1)if($)u1.always(g1[u1.status]);else for(E1 in g1)G1[E1]=[G1[E1],g1[E1]];return this},abort:function(g1){var E1=g1||v2;return u&&u.abort(E1),oe(0,E1),this}};if(h1.promise(u1),i0.url=((z||i0.url||Ze.href)+"").replace(BO,Ze.protocol+"//"),i0.type=i.method||i.type||i0.method||i0.type,i0.dataTypes=(i0.dataType||"*").toLowerCase().match(v0)||[""],i0.crossDomain==null){Q=m.createElement("a");try{Q.href=i0.url,Q.href=Q.href,i0.crossDomain=FM.protocol+"//"+FM.host!=Q.protocol+"//"+Q.host}catch{i0.crossDomain=!0}}if(i0.data&&i0.processData&&typeof i0.data!="string"&&(i0.data=s.param(i0.data,i0.traditional)),tz(Yp,i0,i,u1),$)return u1;t0=s.event&&i0.global,t0&&s.active++===0&&s.event.trigger("ajaxStart"),i0.type=i0.type.toUpperCase(),i0.hasContent=!vO.test(i0.type),f=i0.url.replace(RO,""),i0.hasContent?i0.data&&i0.processData&&(i0.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&(i0.data=i0.data.replace(gO,"+")):(N0=i0.url.slice(f.length),i0.data&&(i0.processData||typeof i0.data=="string")&&(f+=(PM.test(f)?"&":"?")+i0.data,delete i0.data),i0.cache===!1&&(f=f.replace(mO,"$1"),N0=(PM.test(f)?"&":"?")+"_="+Kp.guid+++N0),i0.url=f+N0),i0.ifModified&&(s.lastModified[f]&&u1.setRequestHeader("If-Modified-Since",s.lastModified[f]),s.etag[f]&&u1.setRequestHeader("If-None-Match",s.etag[f])),(i0.data&&i0.hasContent&&i0.contentType!==!1||i.contentType)&&u1.setRequestHeader("Content-Type",i0.contentType),u1.setRequestHeader("Accept",i0.dataTypes[0]&&i0.accepts[i0.dataTypes[0]]?i0.accepts[i0.dataTypes[0]]+(i0.dataTypes[0]!=="*"?", "+Zp+"; q=0.01":""):i0.accepts["*"]);for(l0 in i0.headers)u1.setRequestHeader(l0,i0.headers[l0]);if(i0.beforeSend&&(i0.beforeSend.call(C0,u1,i0)===!1||$))return u1.abort();if(v2="abort",A1.add(i0.complete),u1.done(i0.success),u1.fail(i0.error),u=tz(jM,i0,i,u1),!u)oe(-1,"No Transport");else{if(u1.readyState=1,t0&&i1.trigger("ajaxSend",[u1,i0]),$)return u1;i0.async&&i0.timeout>0&&(X=t.setTimeout(function(){u1.abort("timeout")},i0.timeout));try{$=!1,u.send(F1,oe)}catch(g1){if($)throw g1;oe(-1,g1)}}function oe(g1,E1,tt,UM){var B2,Mt,y2,$2,U2,l2=E1;$||($=!0,X&&t.clearTimeout(X),u=void 0,N=UM||"",u1.readyState=g1>0?4:0,B2=g1>=200&&g1<300||g1===304,tt&&($2=yO(i0,u1,tt)),!B2&&s.inArray("script",i0.dataTypes)>-1&&s.inArray("json",i0.dataTypes)<0&&(i0.converters["text script"]=function(){}),$2=TO(i0,$2,u1,B2),B2?(i0.ifModified&&(U2=u1.getResponseHeader("Last-Modified"),U2&&(s.lastModified[f]=U2),U2=u1.getResponseHeader("etag"),U2&&(s.etag[f]=U2)),g1===204||i0.type==="HEAD"?l2="nocontent":g1===304?l2="notmodified":(l2=$2.state,Mt=$2.data,y2=$2.error,B2=!y2)):(y2=l2,(g1||!l2)&&(l2="error",g1<0&&(g1=0))),u1.status=g1,u1.statusText=(E1||l2)+"",B2?h1.resolveWith(C0,[Mt,l2,u1]):h1.rejectWith(C0,[u1,l2,y2]),u1.statusCode(G1),G1=void 0,t0&&i1.trigger(B2?"ajaxSuccess":"ajaxError",[u1,i0,B2?Mt:y2]),A1.fireWith(C0,[u1,l2]),t0&&(i1.trigger("ajaxComplete",[u1,i0]),--s.active||s.event.trigger("ajaxStop")))}return u1},getJSON:function(z,i,u){return s.get(z,i,u,"json")},getScript:function(z,i){return s.get(z,void 0,i,"script")}}),s.each(["get","post"],function(z,i){s[i]=function(u,f,N,B){return R(f)&&(B=B||N,N=f,f=void 0),s.ajax(s.extend({url:u,type:i,dataType:B,data:f,success:N},s.isPlainObject(u)&&u))}}),s.ajaxPrefilter(function(z){var i;for(i in z.headers)i.toLowerCase()==="content-type"&&(z.contentType=z.headers[i]||"")}),s._evalUrl=function(z,i,u){return s.ajax({url:z,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(f){s.globalEval(f,i,u)}})},s.fn.extend({wrapAll:function(z){var i;return this[0]&&(R(z)&&(z=z.call(this[0])),i=s(z,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&i.insertBefore(this[0]),i.map(function(){for(var u=this;u.firstElementChild;)u=u.firstElementChild;return u}).append(this)),this},wrapInner:function(z){return R(z)?this.each(function(i){s(this).wrapInner(z.call(this,i))}):this.each(function(){var i=s(this),u=i.contents();u.length?u.wrapAll(z):i.append(z)})},wrap:function(z){var i=R(z);return this.each(function(u){s(this).wrapAll(i?z.call(this,u):z)})},unwrap:function(z){return this.parent(z).not("body").each(function(){s(this).replaceWith(this.childNodes)}),this}}),s.expr.pseudos.hidden=function(z){return!s.expr.pseudos.visible(z)},s.expr.pseudos.visible=function(z){return!!(z.offsetWidth||z.offsetHeight||z.getClientRects().length)},s.ajaxSettings.xhr=function(){try{return new t.XMLHttpRequest}catch{}};var SO={0:200,1223:204},et=s.ajaxSettings.xhr();d.cors=!!et&&"withCredentials"in et,d.ajax=et=!!et,s.ajaxTransport(function(z){var i,u;if(d.cors||et&&!z.crossDomain)return{send:function(f,N){var B,X=z.xhr();if(X.open(z.type,z.url,z.async,z.username,z.password),z.xhrFields)for(B in z.xhrFields)X[B]=z.xhrFields[B];z.mimeType&&X.overrideMimeType&&X.overrideMimeType(z.mimeType),!z.crossDomain&&!f["X-Requested-With"]&&(f["X-Requested-With"]="XMLHttpRequest");for(B in f)X.setRequestHeader(B,f[B]);i=function(Q){return function(){i&&(i=u=X.onload=X.onerror=X.onabort=X.ontimeout=X.onreadystatechange=null,Q==="abort"?X.abort():Q==="error"?typeof X.status!="number"?N(0,"error"):N(X.status,X.statusText):N(SO[X.status]||X.status,X.statusText,(X.responseType||"text")!=="text"||typeof X.responseText!="string"?{binary:X.response}:{text:X.responseText},X.getAllResponseHeaders()))}},X.onload=i(),u=X.onerror=X.ontimeout=i("error"),X.onabort!==void 0?X.onabort=u:X.onreadystatechange=function(){X.readyState===4&&t.setTimeout(function(){i&&u()})},i=i("abort");try{X.send(z.hasContent&&z.data||null)}catch(Q){if(i)throw Q}},abort:function(){i&&i()}}}),s.ajaxPrefilter(function(z){z.crossDomain&&(z.contents.script=!1)}),s.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 s.globalEval(z),z}}}),s.ajaxPrefilter("script",function(z){z.cache===void 0&&(z.cache=!1),z.crossDomain&&(z.type="GET")}),s.ajaxTransport("script",function(z){if(z.crossDomain||z.scriptAttrs){var i,u;return{send:function(f,N){i=s(" - - - - - - - - -
- - diff --git a/view/vite.svg b/view/vite.svg deleted file mode 100644 index e7b8dfb1..00000000 --- a/view/vite.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file