Files
quectel-rgmii-toolkit/ipk-source/sdxpinn-quecmanager/root/www/_next/static/chunks/6592-ddf7c16d017c7999.js
Cameron Thompson 02dafc73ad Copy QuecManager beta to non-beta
QM BETA --> regular/non-beta
2025-08-31 02:17:49 -04:00

1 line
22 KiB
JavaScript

"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6592],{76592:(e,t,a)=>{a.r(t),a.d(t,{default:()=>v});var s=a(20475),r=a(20107),l=a(72167),n=a(35601),o=a(97818),d=a(32857),i=a(42541),c=a(49153),u=a(36760),m=a(76554),h=a(114),p=a(88926),f=a(44381);let x=(0,a(39997).A)("EthernetPort",[["path",{d:"m15 20 3-3h2a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h2l3 3z",key:"rbahqx"}],["path",{d:"M6 8v1",key:"1636ez"}],["path",{d:"M10 8v1",key:"1talb4"}],["path",{d:"M14 8v1",key:"1rsfgr"}],["path",{d:"M18 8v1",key:"gnkwox"}]]),g=e=>{if("Unknown!"===e||"Not Connected"===e||"Unknown"===e)return"Not Connected"===e?"Not Connected":"-";let t=e.match(/(\d+)/);if(!t)return e;let a=parseInt(t[1],10);return a>=1e3?"".concat(a/1e3).concat((e.includes("Gb"),"Gb/s")):"".concat(a).concat((e.includes("Mb"),"Mb/s"))},j=()=>{let[e,t]=(0,r.useState)({link_status:"Loading...",link_speed:"Loading...",auto_negotiation:"Loading...",connected:void 0}),[a,n]=(0,r.useState)(!0),[o,d]=(0,r.useState)(null);return((0,r.useEffect)(()=>{(async()=>{try{let e=await fetch("/cgi-bin/quecmanager/home/fetch_hw_details.sh",{method:"GET",cache:"no-store",headers:{"Content-Type":"application/json"}});if(!e.ok)throw Error("Network response was not ok");let a=await e.json();t(a),n(!1)}catch(e){d("Failed to fetch Ethernet information"),n(!1)}})()},[]),o)?(0,s.jsxs)(l.Zp,{children:[(0,s.jsx)(l.aR,{children:(0,s.jsx)(l.ZB,{children:"Ethernet Information"})}),(0,s.jsx)(l.Wu,{className:"flex items-center justify-center",children:(0,s.jsx)("div",{className:"text-red-500",children:o})})]}):(0,s.jsxs)(l.Zp,{children:[(0,s.jsxs)(l.aR,{children:[(0,s.jsx)(l.ZB,{children:"Ethernet Information"}),(0,s.jsx)(l.BT,{children:"Shows the status of the Ethernet connection and its speed."})]}),(0,s.jsx)(l.Wu,{children:(0,s.jsxs)("div",{className:"grid lg:grid-cols-3 grid-cols-1 grid-flow-row gap-4 place-items-center",children:[(0,s.jsx)("div",{className:"flex justify-center items-center rounded-full bg-gray-100 dark:bg-gray-800 w-36 h-36 lg:p-6 p-4",children:a?(0,s.jsx)(x,{className:"size-full text-gray-400 animate-pulse"}):!1===e.connected||"no"===e.link_status?(0,s.jsx)(x,{className:"size-full text-red-500"}):"yes"===e.link_status?(0,s.jsx)(x,{className:"size-full text-emerald-500 animate-pulse"}):(0,s.jsx)(x,{className:"size-full text-yellow-500"})}),(0,s.jsxs)("div",{className:"flex flex-row items-start justify-between gap-x-2 w-full lg:col-span-2 col-span-1 lg:px-4 px-1",children:[(0,s.jsxs)("div",{className:"grid gap-1",children:[(0,s.jsx)("span",{className:"text-sm text-muted-foreground",children:"Link Status"}),(0,s.jsx)("span",{className:"text-base font-bold",children:a?(0,s.jsx)(u.E,{className:"h-8 w-full"}):!1===e.connected?"Not Connected":"yes"===e.link_status?"Active":"no"===e.link_status?"Inactive":"Unknown"})]}),(0,s.jsxs)("div",{className:"grid gap-1",children:[(0,s.jsx)("span",{className:"text-sm text-muted-foreground",children:"Link Speed"}),(0,s.jsx)("span",{className:"text-base font-bold",children:a?(0,s.jsx)(u.E,{className:"h-8 w-full"}):g(e.link_speed)})]}),(0,s.jsxs)("div",{className:"grid gap-1",children:[(0,s.jsx)("span",{className:"text-sm text-muted-foreground",children:"Auto-negotiation"}),(0,s.jsx)("span",{className:"text-base font-bold",children:a?(0,s.jsx)(u.E,{className:"h-8 w-full"}):!1===e.connected?"Not Available":"on"===e.auto_negotiation?"Active":"off"===e.auto_negotiation?"Inactive":"Unknown"})]})]})]})})]})},v=()=>{let{toast:e}=(0,d.dj)(),[t,a]=(0,r.useState)(!0),[x,g]=(0,r.useState)([]),[v,b]=(0,r.useState)(!1),[y,N]=(0,r.useState)(""),[w,P]=(0,r.useState)({passthrough:null,selectedMac:null,modemProtocol:null,dnsProxy:null}),[S,A]=(0,r.useState)({passthrough:null,selectedMac:null,modemProtocol:null,dnsProxy:null}),E={passthrough:{disabled:'+QMAP="MPDN_rule",0;+QMAPWAC=1;+QPOWD=1',ETH:e=>'+QMAP="MPDN_rule",0,1,0,1,1,"'.concat(e,'";+QPOWD=1'),USB:e=>'+QMAP="MPDN_rule",0,1,0,3,1,"'.concat(e,'";+QPOWD=1')},modemProtocol:{rmnet:'+QCFG="usbnet",0;+QPOWD=1',ecm:'+QCFG="usbnet",1;+QPOWD=1',mbim:'+QCFG="usbnet",2;+QPOWD=1',rndis:'+QCFG="usbnet",3;+QPOWD=1'},dnsProxy:{enabled:'+QMAP="DHCPV4DNS","enable"',disabled:'+QMAP="DHCPV4DNS","disable"'}},T=e=>{let t={passthrough:null,selectedMac:null,modemProtocol:null,dnsProxy:null};return e.forEach(e=>{let{response:a}=e;if(a.includes("MPDN_rule")){let e=a.split("\n")[1];e.includes('MPDN_rule",0,1,0,1,1')?t.passthrough="ETH":e.includes('MPDN_rule",0,1,0,3,1')?t.passthrough="USB":e.includes('MPDN_rule",0,0,0,0,0')&&(t.passthrough="disabled")}if(a.includes("usbnet")){let e=a.match(/usbnet",(\d)/);e&&(t.modemProtocol=({0:"rmnet",1:"ecm",2:"mbim",3:"rndis"})[e[1]])}a.includes("DHCPV4DNS")&&(a.includes('"enable"')?t.dnsProxy="enabled":a.includes('"disable"')&&(t.dnsProxy="disabled"))}),t},M=()=>{let e=[],t=Object.entries(S).reduce((e,t)=>{let[a,s]=t;return s!==w[a]&&(e[a]=s),e},{});if("passthrough"in t){if("disabled"===t.passthrough)e.push(E.passthrough.disabled.replace(";+QPOWD=1",""));else if(t.passthrough){let e=E.passthrough[t.passthrough](S.selectedMac);return"AT".concat(e.replace(";+QPOWD=1",""))}}if("modemProtocol"in t&&t.modemProtocol){let a=E.modemProtocol[t.modemProtocol];if(1===Object.keys(t).length)return"AT".concat(a.replace(";+QPOWD=1",""));e.push(a.replace(";+QPOWD=1",""))}if("dnsProxy"in t&&t.dnsProxy){let a=E.dnsProxy[t.dnsProxy];if(1===Object.keys(t).length)return"AT".concat(a);e.push(a)}return e.length>0?"AT".concat(e.join(";")):""},C=async()=>{try{var t,a;let s=await (0,p.a)("AT+QPOWD=1",!0);if((null===(t=s.response)||void 0===t?void 0:t.status)==="success")e({title:"Success",description:"Settings saved and device is rebooting..."}),setTimeout(()=>{window.location.reload()},9e4);else throw Error((null===(a=s.response)||void 0===a?void 0:a.raw_output)||"Failed to reboot device")}catch(t){e({variant:"destructive",title:"Error",description:"Failed to reboot device",action:(0,s.jsx)(h.A,{})})}},D=async()=>{try{let e=M();N(e),b(!0)}catch(t){e({variant:"destructive",title:"Error",description:"Failed to prepare settings",action:(0,s.jsx)(h.A,{})})}},k=async()=>{try{var t,a;let e=await (0,p.a)(y,!0);if((null===(t=e.response)||void 0===t?void 0:t.status)!=="success")throw Error((null===(a=e.response)||void 0===a?void 0:a.raw_output)||"Command execution failed");P({...S}),await C()}catch(t){e({variant:"destructive",title:"Error",description:"Failed to save settings",action:(0,s.jsx)(h.A,{})})}};return(0,r.useEffect)(()=>{(async()=>{try{let[e,t]=await Promise.all([fetch("/cgi-bin/quecmanager/advance/fetch_macs.sh"),fetch("/cgi-bin/quecmanager/at_cmd/fetch_data.sh?set=4")]),[s,r]=await Promise.all([e.json(),t.json()]);g(s);let l=T(r);P(l),A(l),a(!1)}catch(t){a(!1),e({variant:"destructive",title:"Uh oh! Something went wrong.",description:"Failed to fetch connectivity settings",action:(0,s.jsx)(h.A,{})})}})()},[]),(0,s.jsxs)("div",{className:"grid gap-4",children:[(0,s.jsxs)(l.Zp,{children:[(0,s.jsxs)(l.aR,{children:[(0,s.jsx)(l.ZB,{children:"Connectivity Settings"}),(0,s.jsx)(l.BT,{children:"Configure your device's connectivity settings."})]}),(0,s.jsx)(l.Wu,{children:(0,s.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 grid-flow-row gap-6",children:[(0,s.jsxs)("div",{className:"grid w-full max-w-sm items-center gap-2",children:[(0,s.jsx)(c.J,{htmlFor:"passthrough",children:"IP Passthrough Mode"}),t?(0,s.jsx)(u.E,{className:"w-full h-8"}):(0,s.jsxs)(n.l6,{onValueChange:e=>A(t=>({...t,passthrough:e})),value:S.passthrough||void 0,children:[(0,s.jsx)(n.bq,{children:(0,s.jsx)(n.yv,{placeholder:"Select IP Passthrough Mode"})}),(0,s.jsx)(n.gC,{children:(0,s.jsxs)(n.s3,{children:[(0,s.jsx)(n.TR,{children:"Passthrough Mode"}),(0,s.jsx)(n.eb,{value:"disabled",children:"Disabled"}),(0,s.jsx)(n.eb,{value:"ETH",children:"ETH Passthrough Enabled"}),(0,s.jsx)(n.eb,{value:"USB",children:"USB Passthrough Enabled"})]})})]})]}),(0,s.jsxs)("div",{className:"grid w-full max-w-sm items-center gap-2",children:[(0,s.jsx)(c.J,{htmlFor:"mac",children:"Connected MAC"}),t?(0,s.jsx)(u.E,{className:"w-full h-8"}):(0,s.jsxs)(n.l6,{onValueChange:e=>A(t=>({...t,selectedMac:e})),value:S.selectedMac||void 0,disabled:!S.passthrough||"disabled"===S.passthrough,children:[(0,s.jsx)(n.bq,{children:(0,s.jsx)(n.yv,{placeholder:"Select Active MAC"})}),(0,s.jsx)(n.gC,{children:(0,s.jsxs)(n.s3,{children:[(0,s.jsx)(n.TR,{children:"Active MAC"}),x.map(e=>(0,s.jsx)(n.eb,{value:e.mac,children:"".concat(e.hostname," - ").concat(e.mac)},e.mac))]})})]})]}),(0,s.jsx)(m.Separator,{className:"lg:col-span-2 col-span-1 my-2"}),(0,s.jsxs)("div",{className:"grid w-full max-w-sm items-center gap-2",children:[(0,s.jsx)(c.J,{htmlFor:"modemProtocol",children:"USB Modem Protocol"}),t?(0,s.jsx)(u.E,{className:"w-full h-8"}):(0,s.jsxs)(n.l6,{onValueChange:e=>A(t=>({...t,modemProtocol:e})),value:S.modemProtocol||void 0,children:[(0,s.jsx)(n.bq,{children:(0,s.jsx)(n.yv,{placeholder:"Select USB Modem Protocol"})}),(0,s.jsx)(n.gC,{children:(0,s.jsxs)(n.s3,{children:[(0,s.jsx)(n.TR,{children:"USB Modem Protocol"}),(0,s.jsx)(n.eb,{value:"rmnet",children:"RMNET"}),(0,s.jsx)(n.eb,{value:"ecm",children:"ECM (Recommended)"}),(0,s.jsx)(n.eb,{value:"mbim",children:"MBIM"}),(0,s.jsx)(n.eb,{value:"rndis",children:"RNDIS"})]})})]})]}),(0,s.jsxs)("div",{className:"grid w-full max-w-sm items-center gap-2",children:[(0,s.jsx)(c.J,{htmlFor:"dnsProxy",children:"Onboard DNS Proxy Mode"}),t?(0,s.jsx)(u.E,{className:"w-full h-8"}):(0,s.jsxs)(n.l6,{onValueChange:e=>A(t=>({...t,dnsProxy:e})),value:S.dnsProxy||void 0,children:[(0,s.jsx)(n.bq,{children:(0,s.jsx)(n.yv,{placeholder:"Select DNS Proxy Mode"})}),(0,s.jsx)(n.gC,{children:(0,s.jsxs)(n.s3,{children:[(0,s.jsx)(n.TR,{children:"DNS Proxy Mode"}),(0,s.jsx)(n.eb,{value:"enabled",children:"Enabled"}),(0,s.jsx)(n.eb,{value:"disabled",children:"Disabled (Recommended for Passthrough)"})]})})]})]})]})}),(0,s.jsx)(l.wL,{className:"grid border-t py-4",children:(0,s.jsx)(i.$,{onClick:D,disabled:!Object.entries(S).some(e=>{let[t,a]=e;return a!==w[t]})||!(!S.passthrough||"disabled"===S.passthrough||S.selectedMac),children:"Save"})})]}),(0,s.jsx)(j,{}),(0,s.jsx)(o.Lt,{open:v,onOpenChange:b,children:(0,s.jsxs)(o.EO,{children:[(0,s.jsxs)(o.wd,{children:[(0,s.jsx)(o.r7,{children:"Reboot Required"}),(0,s.jsx)(o.$v,{children:"The changes you made require a device reboot to take effect. Would you like to reboot now?"})]}),(0,s.jsxs)(o.ck,{children:[(0,s.jsx)(o.Zr,{children:"Later"}),(0,s.jsxs)(o.Rx,{onClick:k,children:[(0,s.jsx)(f.A,{className:"w-4 h-4"}),"Save & Reboot Now"]})]})]})})]})}},114:(e,t,a)=>{a.d(t,{A:()=>n});var s=a(20475),r=a(42541),l=a(7197);let n=()=>(0,s.jsx)(r.$,{asChild:!0,variant:"outline",className:"ml-2",children:(0,s.jsxs)("a",{href:"https://github.com/iamromulan/quectel-rgmii-toolkit/tree/development-SDXPINN",children:[(0,s.jsx)(l.ERf,{className:"w-4 h-4 mr-2"}),"Get there!"]})})},97818:(e,t,a)=>{a.d(t,{$v:()=>x,EO:()=>m,Lt:()=>d,Rx:()=>g,Zr:()=>j,ck:()=>p,r7:()=>f,tv:()=>i,wd:()=>h});var s=a(20475),r=a(20107),l=a(50564),n=a(22250),o=a(42541);let d=l.bL,i=l.l9,c=l.ZL,u=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(l.hJ,{className:(0,n.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...r,ref:t})});u.displayName=l.hJ.displayName;let m=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsxs)(c,{children:[(0,s.jsx)(u,{}),(0,s.jsx)(l.UC,{ref:t,className:(0,n.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",a),...r})]})});m.displayName=l.UC.displayName;let h=e=>{let{className:t,...a}=e;return(0,s.jsx)("div",{className:(0,n.cn)("flex flex-col space-y-2 text-center sm:text-left",t),...a})};h.displayName="AlertDialogHeader";let p=e=>{let{className:t,...a}=e;return(0,s.jsx)("div",{className:(0,n.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...a})};p.displayName="AlertDialogFooter";let f=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(l.hE,{ref:t,className:(0,n.cn)("text-lg font-semibold",a),...r})});f.displayName=l.hE.displayName;let x=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(l.VY,{ref:t,className:(0,n.cn)("text-sm text-muted-foreground",a),...r})});x.displayName=l.VY.displayName;let g=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(l.rc,{ref:t,className:(0,n.cn)((0,o.r)(),a),...r})});g.displayName=l.rc.displayName;let j=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(l.ZD,{ref:t,className:(0,n.cn)((0,o.r)({variant:"outline"}),"mt-2 sm:mt-0",a),...r})});j.displayName=l.ZD.displayName},42541:(e,t,a)=>{a.d(t,{$:()=>i,r:()=>d});var s=a(20475),r=a(20107),l=a(61837),n=a(29395),o=a(22250);let d=(0,n.F)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),i=r.forwardRef((e,t)=>{let{className:a,variant:r,size:n,asChild:i=!1,...c}=e,u=i?l.DX:"button";return(0,s.jsx)(u,{className:(0,o.cn)(d({variant:r,size:n,className:a})),ref:t,...c})});i.displayName="Button"},72167:(e,t,a)=>{a.d(t,{BT:()=>i,Wu:()=>c,ZB:()=>d,Zp:()=>n,aR:()=>o,wL:()=>u});var s=a(20475),r=a(20107),l=a(22250);let n=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)("div",{ref:t,className:(0,l.cn)("rounded-xl border bg-card text-card-foreground shadow",a),...r})});n.displayName="Card";let o=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)("div",{ref:t,className:(0,l.cn)("flex flex-col space-y-1.5 p-6",a),...r})});o.displayName="CardHeader";let d=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)("h3",{ref:t,className:(0,l.cn)("font-semibold leading-none tracking-tight",a),...r})});d.displayName="CardTitle";let i=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)("p",{ref:t,className:(0,l.cn)("text-sm text-muted-foreground",a),...r})});i.displayName="CardDescription";let c=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)("div",{ref:t,className:(0,l.cn)("p-6 pt-0",a),...r})});c.displayName="CardContent";let u=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)("div",{ref:t,className:(0,l.cn)("flex items-center p-6 pt-0",a),...r})});u.displayName="CardFooter"},49153:(e,t,a)=>{a.d(t,{J:()=>i});var s=a(20475),r=a(20107),l=a(21840),n=a(29395),o=a(22250);let d=(0,n.F)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),i=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(l.b,{ref:t,className:(0,o.cn)(d(),a),...r})});i.displayName=l.b.displayName},35601:(e,t,a)=>{a.d(t,{TR:()=>f,bq:()=>u,eb:()=>x,gC:()=>p,l6:()=>d,s3:()=>i,yv:()=>c});var s=a(20475),r=a(20107),l=a(7197),n=a(95257),o=a(22250);let d=n.bL,i=n.YJ,c=n.WT,u=r.forwardRef((e,t)=>{let{className:a,children:r,...d}=e;return(0,s.jsxs)(n.l9,{ref:t,className:(0,o.cn)("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",a),...d,children:[r,(0,s.jsx)(n.In,{asChild:!0,children:(0,s.jsx)(l.TBE,{className:"h-4 w-4 opacity-50"})})]})});u.displayName=n.l9.displayName;let m=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(n.PP,{ref:t,className:(0,o.cn)("flex cursor-default items-center justify-center py-1",a),...r,children:(0,s.jsx)(l.Mtm,{})})});m.displayName=n.PP.displayName;let h=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(n.wn,{ref:t,className:(0,o.cn)("flex cursor-default items-center justify-center py-1",a),...r,children:(0,s.jsx)(l.D3D,{})})});h.displayName=n.wn.displayName;let p=r.forwardRef((e,t)=>{let{className:a,children:r,position:l="popper",...d}=e;return(0,s.jsx)(n.ZL,{children:(0,s.jsxs)(n.UC,{ref:t,className:(0,o.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===l&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",a),position:l,...d,children:[(0,s.jsx)(m,{}),(0,s.jsx)(n.LM,{className:(0,o.cn)("p-1","popper"===l&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:r}),(0,s.jsx)(h,{})]})})});p.displayName=n.UC.displayName;let f=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(n.JU,{ref:t,className:(0,o.cn)("px-2 py-1.5 text-sm font-semibold",a),...r})});f.displayName=n.JU.displayName;let x=r.forwardRef((e,t)=>{let{className:a,children:r,...d}=e;return(0,s.jsxs)(n.q7,{ref:t,className:(0,o.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),...d,children:[(0,s.jsx)("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,s.jsx)(n.VF,{children:(0,s.jsx)(l.Srz,{className:"h-4 w-4"})})}),(0,s.jsx)(n.p4,{children:r})]})});x.displayName=n.q7.displayName,r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(n.wv,{ref:t,className:(0,o.cn)("-mx-1 my-1 h-px bg-muted",a),...r})}).displayName=n.wv.displayName},76554:(e,t,a)=>{a.d(t,{Separator:()=>o});var s=a(20475),r=a(20107),l=a(88853),n=a(22250);let o=r.forwardRef((e,t)=>{let{className:a,orientation:r="horizontal",decorative:o=!0,...d}=e;return(0,s.jsx)(l.b,{ref:t,decorative:o,orientation:r,className:(0,n.cn)("shrink-0 bg-border","horizontal"===r?"h-[1px] w-full":"h-full w-[1px]",a),...d})});o.displayName=l.b.displayName},36760:(e,t,a)=>{a.d(t,{E:()=>l});var s=a(20475),r=a(22250);function l(e){let{className:t,...a}=e;return(0,s.jsx)("div",{className:(0,r.cn)("animate-pulse rounded-md bg-primary/10",t),...a})}},32857:(e,t,a)=>{a.d(t,{dj:()=>m,oR:()=>u});var s=a(20107);let r=0,l=new Map,n=e=>{if(l.has(e))return;let t=setTimeout(()=>{l.delete(e),c({type:"REMOVE_TOAST",toastId:e})},1e6);l.set(e,t)},o=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case"DISMISS_TOAST":{let{toastId:a}=t;return a?n(a):e.toasts.forEach(e=>{n(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===a||void 0===a?{...e,open:!1}:e)}}case"REMOVE_TOAST":if(void 0===t.toastId)return{...e,toasts:[]};return{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}},d=[],i={toasts:[]};function c(e){i=o(i,e),d.forEach(e=>{e(i)})}function u(e){let{...t}=e,a=(r=(r+1)%Number.MAX_SAFE_INTEGER).toString(),s=()=>c({type:"DISMISS_TOAST",toastId:a});return c({type:"ADD_TOAST",toast:{...t,id:a,open:!0,onOpenChange:e=>{e||s()}}}),{id:a,dismiss:s,update:e=>c({type:"UPDATE_TOAST",toast:{...e,id:a}})}}function m(){let[e,t]=s.useState(i);return s.useEffect(()=>(d.push(t),()=>{let e=d.indexOf(t);e>-1&&d.splice(e,1)}),[e]),{...e,toast:u,dismiss:e=>c({type:"DISMISS_TOAST",toastId:e})}}},22250:(e,t,a)=>{a.d(t,{cn:()=>l});var s=a(64901),r=a(868);function l(){for(var e=arguments.length,t=Array(e),a=0;a<e;a++)t[a]=arguments[a];return(0,r.QP)((0,s.$)(t))}},44381:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(39997).A)("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]])},88926:(e,t,a)=>{a.d(t,{a:()=>s});let s=async function(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:30;try{var s;let r=e.trim().toUpperCase().startsWith("AT")?e.trim():"AT".concat(e.trim()),l=encodeURIComponent(r),n="/cgi-bin/quecmanager/at_cmd/at_queue_client.sh?command=".concat(l);t&&(n+="&wait=1&timeout=".concat(a));let o=await fetch(n,{method:"GET",headers:{Accept:"application/json",Authorization:"".concat(localStorage.getItem("authToken"))},signal:AbortSignal.timeout(1e3*a+5e3)});if(!o.ok)throw Error("AT command failed with status: ".concat(o.status));let d=await o.json();if(d.error)throw Error("AT queue error: ".concat(d.error));if(t&&(null===(s=d.response)||void 0===s?void 0:s.status)==="timeout")throw Error("AT command timed out after ".concat(a," seconds"));return d}catch(e){throw console.error("AT Command error:",e),e}}},88853:(e,t,a)=>{a.d(t,{b:()=>i});var s=a(20107),r=a(34544),l=a(20475),n="horizontal",o=["horizontal","vertical"],d=s.forwardRef((e,t)=>{let{decorative:a,orientation:s=n,...d}=e,i=o.includes(s)?s:n;return(0,l.jsx)(r.sG.div,{"data-orientation":i,...a?{role:"none"}:{"aria-orientation":"vertical"===i?i:void 0,role:"separator"},...d,ref:t})});d.displayName="Separator";var i=d}}]);