Files
quectel-rgmii-toolkit/ipk-source/sdxpinn-quecmanager/root/www/_next/static/chunks/6592-64b46edd0220361b.js
Cameron Thompson a3dd95ec30 Merge QuecManager beta into QuecManager
Sync beta and normal QuecManager versions
2025-07-01 19:35:56 -04:00

1 line
21 KiB
JavaScript

"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6592],{76592:(e,t,s)=>{s.r(t),s.d(t,{default:()=>v});var a=s(20475),r=s(20107),l=s(72167),n=s(35601),o=s(97818),d=s(32857),i=s(42541),c=s(49153),u=s(36760),m=s(76554),h=s(114),p=s(88926),f=s(44381);let x=(0,s(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)return"-";let t=e.match(/(\d+)/);if(!t)return e;let s=parseInt(t[1],10);return s>=1e3?"".concat(s/1e3).concat((e.includes("Gb"),"Gb/s")):"".concat(s).concat((e.includes("Mb"),"Mb/s"))},j=()=>{let[e,t]=(0,r.useState)({link_status:"Loading...",link_speed:"Loading...",auto_negotiation:"Loading..."}),[s,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?type=eth",{method:"GET",cache:"no-store",headers:{"Content-Type":"application/json"}});if(!e.ok)throw Error("Network response was not ok");let s=await e.json();t(s),n(!1)}catch(e){d("Failed to fetch Ethernet information"),n(!1)}})()},[]),o)?(0,a.jsxs)(l.Zp,{children:[(0,a.jsx)(l.aR,{children:(0,a.jsx)(l.ZB,{children:"Ethernet Information"})}),(0,a.jsx)(l.Wu,{className:"flex items-center justify-center",children:(0,a.jsx)("div",{className:"text-red-500",children:o})})]}):(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)(l.aR,{children:[(0,a.jsx)(l.ZB,{children:"Ethernet Information"}),(0,a.jsx)(l.BT,{children:"Shows the status of the Ethernet connection and its speed."})]}),(0,a.jsx)(l.Wu,{children:(0,a.jsxs)("div",{className:"grid lg:grid-cols-3 grid-cols-1 grid-flow-row gap-4 place-items-center",children:[(0,a.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:"yes"===e.link_status?(0,a.jsx)(x,{className:"size-full text-emerald-500 animate-pulse"}):(0,a.jsx)(x,{className:"size-full text-red-500 animate-pulse"})}),(0,a.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,a.jsxs)("div",{className:"grid gap-1",children:[(0,a.jsx)("span",{className:"text-sm text-muted-foreground",children:"Link Status"}),(0,a.jsx)("span",{className:"text-base font-bold",children:s?(0,a.jsx)(u.E,{className:"h-8 w-full"}):"yes"===e.link_status?"Active":"Inactive"})]}),(0,a.jsxs)("div",{className:"grid gap-1",children:[(0,a.jsx)("span",{className:"text-sm text-muted-foreground",children:"Link Speed"}),(0,a.jsx)("span",{className:"text-base font-bold",children:s?(0,a.jsx)(u.E,{className:"h-8 w-full"}):g(e.link_speed)})]}),(0,a.jsxs)("div",{className:"grid gap-1",children:[(0,a.jsx)("span",{className:"text-sm text-muted-foreground",children:"Auto-negotiation"}),(0,a.jsx)("span",{className:"text-base font-bold",children:s?(0,a.jsx)(u.E,{className:"h-8 w-full"}):"on"===e.auto_negotiation?"Active":"Inactive"})]})]})]})})]})},v=()=>{let{toast:e}=(0,d.dj)(),[t,s]=(0,r.useState)(!0),[x,g]=(0,r.useState)([]),[v,b]=(0,r.useState)(!1),[y,w]=(0,r.useState)(""),[N,P]=(0,r.useState)({passthrough:null,selectedMac:null,modemProtocol:null,dnsProxy:null}),[S,E]=(0,r.useState)({passthrough:null,selectedMac:null,modemProtocol:null,dnsProxy:null}),A={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:s}=e;if(s.includes("MPDN_rule")){let e=s.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(s.includes("usbnet")){let e=s.match(/usbnet",(\d)/);e&&(t.modemProtocol=({0:"rmnet",1:"ecm",2:"mbim",3:"rndis"})[e[1]])}s.includes("DHCPV4DNS")&&(s.includes('"enable"')?t.dnsProxy="enabled":s.includes('"disable"')&&(t.dnsProxy="disabled"))}),t},M=()=>{let e=[],t=Object.entries(S).reduce((e,t)=>{let[s,a]=t;return a!==N[s]&&(e[s]=a),e},{});if("passthrough"in t){if("disabled"===t.passthrough)e.push(A.passthrough.disabled.replace(";+QPOWD=1",""));else if(t.passthrough){let e=A.passthrough[t.passthrough](S.selectedMac);return"AT".concat(e.replace(";+QPOWD=1",""))}}if("modemProtocol"in t&&t.modemProtocol){let s=A.modemProtocol[t.modemProtocol];if(1===Object.keys(t).length)return"AT".concat(s.replace(";+QPOWD=1",""));e.push(s.replace(";+QPOWD=1",""))}if("dnsProxy"in t&&t.dnsProxy){let s=A.dnsProxy[t.dnsProxy];if(1===Object.keys(t).length)return"AT".concat(s);e.push(s)}return e.length>0?"AT".concat(e.join(";")):""},D=async()=>{try{var t,s;let a=await (0,p.a)("AT+QPOWD=1",!0);if((null===(t=a.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===(s=a.response)||void 0===s?void 0:s.raw_output)||"Failed to reboot device")}catch(t){e({variant:"destructive",title:"Error",description:"Failed to reboot device",action:(0,a.jsx)(h.A,{})})}},C=async()=>{try{let e=M();w(e),b(!0)}catch(t){e({variant:"destructive",title:"Error",description:"Failed to prepare settings",action:(0,a.jsx)(h.A,{})})}},R=async()=>{try{var t,s;let e=await (0,p.a)(y,!0);if((null===(t=e.response)||void 0===t?void 0:t.status)!=="success")throw Error((null===(s=e.response)||void 0===s?void 0:s.raw_output)||"Command execution failed");P({...S}),await D()}catch(t){e({variant:"destructive",title:"Error",description:"Failed to save settings",action:(0,a.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")]),[a,r]=await Promise.all([e.json(),t.json()]);g(a);let l=T(r);P(l),E(l),s(!1)}catch(t){s(!1),e({variant:"destructive",title:"Uh oh! Something went wrong.",description:"Failed to fetch connectivity settings",action:(0,a.jsx)(h.A,{})})}})()},[]),(0,a.jsxs)("div",{className:"grid gap-4",children:[(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)(l.aR,{children:[(0,a.jsx)(l.ZB,{children:"Connectivity Settings"}),(0,a.jsx)(l.BT,{children:"Configure your device's connectivity settings."})]}),(0,a.jsx)(l.Wu,{children:(0,a.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 grid-flow-row gap-6",children:[(0,a.jsxs)("div",{className:"grid w-full max-w-sm items-center gap-2",children:[(0,a.jsx)(c.J,{htmlFor:"passthrough",children:"IP Passthrough Mode"}),t?(0,a.jsx)(u.E,{className:"w-full h-8"}):(0,a.jsxs)(n.l6,{onValueChange:e=>E(t=>({...t,passthrough:e})),value:S.passthrough||void 0,children:[(0,a.jsx)(n.bq,{children:(0,a.jsx)(n.yv,{placeholder:"Select IP Passthrough Mode"})}),(0,a.jsx)(n.gC,{children:(0,a.jsxs)(n.s3,{children:[(0,a.jsx)(n.TR,{children:"Passthrough Mode"}),(0,a.jsx)(n.eb,{value:"disabled",children:"Disabled"}),(0,a.jsx)(n.eb,{value:"ETH",children:"ETH Passthrough Enabled"}),(0,a.jsx)(n.eb,{value:"USB",children:"USB Passthrough Enabled"})]})})]})]}),(0,a.jsxs)("div",{className:"grid w-full max-w-sm items-center gap-2",children:[(0,a.jsx)(c.J,{htmlFor:"mac",children:"Connected MAC"}),t?(0,a.jsx)(u.E,{className:"w-full h-8"}):(0,a.jsxs)(n.l6,{onValueChange:e=>E(t=>({...t,selectedMac:e})),value:S.selectedMac||void 0,disabled:!S.passthrough||"disabled"===S.passthrough,children:[(0,a.jsx)(n.bq,{children:(0,a.jsx)(n.yv,{placeholder:"Select Active MAC"})}),(0,a.jsx)(n.gC,{children:(0,a.jsxs)(n.s3,{children:[(0,a.jsx)(n.TR,{children:"Active MAC"}),x.map(e=>(0,a.jsx)(n.eb,{value:e.mac,children:"".concat(e.hostname," - ").concat(e.mac)},e.mac))]})})]})]}),(0,a.jsx)(m.w,{className:"lg:col-span-2 col-span-1 my-2"}),(0,a.jsxs)("div",{className:"grid w-full max-w-sm items-center gap-2",children:[(0,a.jsx)(c.J,{htmlFor:"modemProtocol",children:"USB Modem Protocol"}),t?(0,a.jsx)(u.E,{className:"w-full h-8"}):(0,a.jsxs)(n.l6,{onValueChange:e=>E(t=>({...t,modemProtocol:e})),value:S.modemProtocol||void 0,children:[(0,a.jsx)(n.bq,{children:(0,a.jsx)(n.yv,{placeholder:"Select USB Modem Protocol"})}),(0,a.jsx)(n.gC,{children:(0,a.jsxs)(n.s3,{children:[(0,a.jsx)(n.TR,{children:"USB Modem Protocol"}),(0,a.jsx)(n.eb,{value:"rmnet",children:"RMNET"}),(0,a.jsx)(n.eb,{value:"ecm",children:"ECM (Recommended)"}),(0,a.jsx)(n.eb,{value:"mbim",children:"MBIM"}),(0,a.jsx)(n.eb,{value:"rndis",children:"RNDIS"})]})})]})]}),(0,a.jsxs)("div",{className:"grid w-full max-w-sm items-center gap-2",children:[(0,a.jsx)(c.J,{htmlFor:"dnsProxy",children:"Onboard DNS Proxy Mode"}),t?(0,a.jsx)(u.E,{className:"w-full h-8"}):(0,a.jsxs)(n.l6,{onValueChange:e=>E(t=>({...t,dnsProxy:e})),value:S.dnsProxy||void 0,children:[(0,a.jsx)(n.bq,{children:(0,a.jsx)(n.yv,{placeholder:"Select DNS Proxy Mode"})}),(0,a.jsx)(n.gC,{children:(0,a.jsxs)(n.s3,{children:[(0,a.jsx)(n.TR,{children:"DNS Proxy Mode"}),(0,a.jsx)(n.eb,{value:"enabled",children:"Enabled"}),(0,a.jsx)(n.eb,{value:"disabled",children:"Disabled (Recommended for Passthrough)"})]})})]})]})]})}),(0,a.jsx)(l.wL,{className:"grid border-t py-4",children:(0,a.jsx)(i.$,{onClick:C,disabled:!Object.entries(S).some(e=>{let[t,s]=e;return s!==N[t]})||!(!S.passthrough||"disabled"===S.passthrough||S.selectedMac),children:"Save"})})]}),(0,a.jsx)(j,{}),(0,a.jsx)(o.Lt,{open:v,onOpenChange:b,children:(0,a.jsxs)(o.EO,{children:[(0,a.jsxs)(o.wd,{children:[(0,a.jsx)(o.r7,{children:"Reboot Required"}),(0,a.jsx)(o.$v,{children:"The changes you made require a device reboot to take effect. Would you like to reboot now?"})]}),(0,a.jsxs)(o.ck,{children:[(0,a.jsx)(o.Zr,{children:"Later"}),(0,a.jsxs)(o.Rx,{onClick:R,children:[(0,a.jsx)(f.A,{className:"w-4 h-4"}),"Save & Reboot Now"]})]})]})})]})}},114:(e,t,s)=>{s.d(t,{A:()=>n});var a=s(20475),r=s(42541),l=s(7197);let n=()=>(0,a.jsx)(r.$,{asChild:!0,variant:"outline",className:"ml-2",children:(0,a.jsxs)("a",{href:"https://github.com/iamromulan/quectel-rgmii-toolkit/tree/development-SDXPINN",children:[(0,a.jsx)(l.ERf,{className:"w-4 h-4 mr-2"}),"Get there!"]})})},97818:(e,t,s)=>{s.d(t,{$v:()=>x,EO:()=>m,Lt:()=>d,Rx:()=>g,Zr:()=>j,ck:()=>p,r7:()=>f,tv:()=>i,wd:()=>h});var a=s(20475),r=s(20107),l=s(50564),n=s(22250),o=s(42541);let d=l.bL,i=l.l9,c=l.ZL,u=r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.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",s),...r,ref:t})});u.displayName=l.hJ.displayName;let m=r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsxs)(c,{children:[(0,a.jsx)(u,{}),(0,a.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",s),...r})]})});m.displayName=l.UC.displayName;let h=e=>{let{className:t,...s}=e;return(0,a.jsx)("div",{className:(0,n.cn)("flex flex-col space-y-2 text-center sm:text-left",t),...s})};h.displayName="AlertDialogHeader";let p=e=>{let{className:t,...s}=e;return(0,a.jsx)("div",{className:(0,n.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...s})};p.displayName="AlertDialogFooter";let f=r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)(l.hE,{ref:t,className:(0,n.cn)("text-lg font-semibold",s),...r})});f.displayName=l.hE.displayName;let x=r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)(l.VY,{ref:t,className:(0,n.cn)("text-sm text-muted-foreground",s),...r})});x.displayName=l.VY.displayName;let g=r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)(l.rc,{ref:t,className:(0,n.cn)((0,o.r)(),s),...r})});g.displayName=l.rc.displayName;let j=r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)(l.ZD,{ref:t,className:(0,n.cn)((0,o.r)({variant:"outline"}),"mt-2 sm:mt-0",s),...r})});j.displayName=l.ZD.displayName},42541:(e,t,s)=>{s.d(t,{$:()=>i,r:()=>d});var a=s(20475),r=s(20107),l=s(61837),n=s(29395),o=s(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:s,variant:r,size:n,asChild:i=!1,...c}=e,u=i?l.DX:"button";return(0,a.jsx)(u,{className:(0,o.cn)(d({variant:r,size:n,className:s})),ref:t,...c})});i.displayName="Button"},72167:(e,t,s)=>{s.d(t,{BT:()=>i,Wu:()=>c,ZB:()=>d,Zp:()=>n,aR:()=>o,wL:()=>u});var a=s(20475),r=s(20107),l=s(22250);let n=r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)("div",{ref:t,className:(0,l.cn)("rounded-xl border bg-card text-card-foreground shadow",s),...r})});n.displayName="Card";let o=r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)("div",{ref:t,className:(0,l.cn)("flex flex-col space-y-1.5 p-6",s),...r})});o.displayName="CardHeader";let d=r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)("h3",{ref:t,className:(0,l.cn)("font-semibold leading-none tracking-tight",s),...r})});d.displayName="CardTitle";let i=r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)("p",{ref:t,className:(0,l.cn)("text-sm text-muted-foreground",s),...r})});i.displayName="CardDescription";let c=r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)("div",{ref:t,className:(0,l.cn)("p-6 pt-0",s),...r})});c.displayName="CardContent";let u=r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)("div",{ref:t,className:(0,l.cn)("flex items-center p-6 pt-0",s),...r})});u.displayName="CardFooter"},49153:(e,t,s)=>{s.d(t,{J:()=>i});var a=s(20475),r=s(20107),l=s(21840),n=s(29395),o=s(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:s,...r}=e;return(0,a.jsx)(l.b,{ref:t,className:(0,o.cn)(d(),s),...r})});i.displayName=l.b.displayName},35601:(e,t,s)=>{s.d(t,{TR:()=>f,bq:()=>u,eb:()=>x,gC:()=>p,l6:()=>d,s3:()=>i,yv:()=>c});var a=s(20475),r=s(20107),l=s(7197),n=s(95257),o=s(22250);let d=n.bL,i=n.YJ,c=n.WT,u=r.forwardRef((e,t)=>{let{className:s,children:r,...d}=e;return(0,a.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",s),...d,children:[r,(0,a.jsx)(n.In,{asChild:!0,children:(0,a.jsx)(l.TBE,{className:"h-4 w-4 opacity-50"})})]})});u.displayName=n.l9.displayName;let m=r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)(n.PP,{ref:t,className:(0,o.cn)("flex cursor-default items-center justify-center py-1",s),...r,children:(0,a.jsx)(l.Mtm,{})})});m.displayName=n.PP.displayName;let h=r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)(n.wn,{ref:t,className:(0,o.cn)("flex cursor-default items-center justify-center py-1",s),...r,children:(0,a.jsx)(l.D3D,{})})});h.displayName=n.wn.displayName;let p=r.forwardRef((e,t)=>{let{className:s,children:r,position:l="popper",...d}=e;return(0,a.jsx)(n.ZL,{children:(0,a.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",s),position:l,...d,children:[(0,a.jsx)(m,{}),(0,a.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,a.jsx)(h,{})]})})});p.displayName=n.UC.displayName;let f=r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)(n.JU,{ref:t,className:(0,o.cn)("px-2 py-1.5 text-sm font-semibold",s),...r})});f.displayName=n.JU.displayName;let x=r.forwardRef((e,t)=>{let{className:s,children:r,...d}=e;return(0,a.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",s),...d,children:[(0,a.jsx)("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,a.jsx)(n.VF,{children:(0,a.jsx)(l.Srz,{className:"h-4 w-4"})})}),(0,a.jsx)(n.p4,{children:r})]})});x.displayName=n.q7.displayName,r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)(n.wv,{ref:t,className:(0,o.cn)("-mx-1 my-1 h-px bg-muted",s),...r})}).displayName=n.wv.displayName},76554:(e,t,s)=>{s.d(t,{w:()=>o});var a=s(20475),r=s(20107),l=s(88853),n=s(22250);let o=r.forwardRef((e,t)=>{let{className:s,orientation:r="horizontal",decorative:o=!0,...d}=e;return(0,a.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]",s),...d})});o.displayName=l.b.displayName},36760:(e,t,s)=>{s.d(t,{E:()=>l});var a=s(20475),r=s(22250);function l(e){let{className:t,...s}=e;return(0,a.jsx)("div",{className:(0,r.cn)("animate-pulse rounded-md bg-primary/10",t),...s})}},32857:(e,t,s)=>{s.d(t,{dj:()=>m,oR:()=>u});var a=s(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:s}=t;return s?n(s):e.toasts.forEach(e=>{n(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===s||void 0===s?{...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,s=(r=(r+1)%Number.MAX_SAFE_INTEGER).toString(),a=()=>c({type:"DISMISS_TOAST",toastId:s});return c({type:"ADD_TOAST",toast:{...t,id:s,open:!0,onOpenChange:e=>{e||a()}}}),{id:s,dismiss:a,update:e=>c({type:"UPDATE_TOAST",toast:{...e,id:s}})}}function m(){let[e,t]=a.useState(i);return a.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,s)=>{s.d(t,{cn:()=>l});var a=s(64901),r=s(868);function l(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];return(0,r.QP)((0,a.$)(t))}},44381:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(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,s)=>{s.d(t,{a:()=>a});let a=async function(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:30;try{var a;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(s));let o=await fetch(n,{method:"GET",headers:{Accept:"application/json"},signal:AbortSignal.timeout(1e3*s+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===(a=d.response)||void 0===a?void 0:a.status)==="timeout")throw Error("AT command timed out after ".concat(s," seconds"));return d}catch(e){throw console.error("AT Command error:",e),e}}},88853:(e,t,s)=>{s.d(t,{b:()=>i});var a=s(20107),r=s(34544),l=s(20475),n="horizontal",o=["horizontal","vertical"],d=a.forwardRef((e,t)=>{let{decorative:s,orientation:a=n,...d}=e,i=o.includes(a)?a:n;return(0,l.jsx)(r.sG.div,{"data-orientation":i,...s?{role:"none"}:{"aria-orientation":"vertical"===i?i:void 0,role:"separator"},...d,ref:t})});d.displayName="Separator";var i=d}}]);