import{S as me}from"./index.038ad2a2.js";import{e as we,q as ye,_ as Ce}from"./index.3497f088.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{d as Ee,r as _e,o as be,bp as Be,bY as Ae,bU as Se,aU as Fe,bN as Te,bC as Ie,C as V,D as j,aI as E,aH as b,aM as M,G,u as Pe,aN as q,bw as jt,bx as qt,aK as nt,aJ as ot,aE as rt,n as Gt,b1 as De,ba as Ne,bX as Me,aZ as Ue,b8 as Re,bZ as Le,bA as ve,bD as ke,bM as Ve,bc as xe,bd as Oe}from"./arco.9e0714bc.js";import{e as ht,g as Qt,h as I,b as D,s as He}from"./serial.a589823e.js";import{u as ze}from"./loading.49a185db.js";import"./chart.494530f1.js";import"./vue.a2ece757.js";var W={},Je=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},te={},L={};let At;const Ye=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];L.getSymbolSize=function(n){if(!n)throw new Error('"version" cannot be null or undefined');if(n<1||n>40)throw new Error('"version" should be in range from 1 to 40');return n*4+17};L.getSymbolTotalCodewords=function(n){return Ye[n]};L.getBCHDigit=function(o){let n=0;for(;o!==0;)n++,o>>>=1;return n};L.setToSJISFunction=function(n){if(typeof n!="function")throw new Error('"toSJISFunc" is not a valid function.');At=n};L.isKanjiModeEnabled=function(){return typeof At<"u"};L.toSJIS=function(n){return At(n)};var lt={};(function(o){o.L={bit:1},o.M={bit:0},o.Q={bit:3},o.H={bit:2};function n(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.toLowerCase()){case"l":case"low":return o.L;case"m":case"medium":return o.M;case"q":case"quartile":return o.Q;case"h":case"high":return o.H;default:throw new Error("Unknown EC Level: "+i)}}o.isValid=function(e){return e&&typeof e.bit<"u"&&e.bit>=0&&e.bit<4},o.from=function(e,t){if(o.isValid(e))return e;try{return n(e)}catch{return t}}})(lt);function ee(){this.buffer=[],this.length=0}ee.prototype={get:function(o){const n=Math.floor(o/8);return(this.buffer[n]>>>7-o%8&1)===1},put:function(o,n){for(let i=0;i>>n-i-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(o){const n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),o&&(this.buffer[n]|=128>>>this.length%8),this.length++}};var Ke=ee;function X(o){if(!o||o<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=o,this.data=new Uint8Array(o*o),this.reservedBit=new Uint8Array(o*o)}X.prototype.set=function(o,n,i,e){const t=o*this.size+n;this.data[t]=i,e&&(this.reservedBit[t]=!0)};X.prototype.get=function(o,n){return this.data[o*this.size+n]};X.prototype.xor=function(o,n,i){this.data[o*this.size+n]^=i};X.prototype.isReserved=function(o,n){return this.reservedBit[o*this.size+n]};var $e=X,ne={};(function(o){const n=L.getSymbolSize;o.getRowColCoords=function(e){if(e===1)return[];const t=Math.floor(e/7)+2,r=n(e),a=r===145?26:Math.ceil((r-13)/(2*t-2))*2,u=[r-7];for(let s=1;s=0&&t<=7},o.from=function(t){return o.isValid(t)?parseInt(t,10):void 0},o.getPenaltyN1=function(t){const r=t.size;let a=0,u=0,s=0,h=null,p=null;for(let S=0;S=5&&(a+=n.N1+(u-5)),h=w,u=1),w=t.get(C,S),w===p?s++:(s>=5&&(a+=n.N1+(s-5)),p=w,s=1)}u>=5&&(a+=n.N1+(u-5)),s>=5&&(a+=n.N1+(s-5))}return a},o.getPenaltyN2=function(t){const r=t.size;let a=0;for(let u=0;u=10&&(u===1488||u===93)&&a++,s=s<<1&2047|t.get(p,h),p>=10&&(s===1488||s===93)&&a++}return a*n.N3},o.getPenaltyN4=function(t){let r=0;const a=t.data.length;for(let s=0;s=0;){const a=r[0];for(let s=0;s0){const r=new Uint8Array(this.degree);return r.set(e,t),r}return e};var qe=St,se={},O={},Ft={};Ft.isValid=function(n){return!isNaN(n)&&n>=1&&n<=40};var v={};const ue="[0-9]+",Ge="[A-Z $%*+\\-./:]+";let Z="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";Z=Z.replace(/u/g,"\\u");const Qe="(?:(?![A-Z0-9 $%*+\\-./:]|"+Z+`)(?:.|[\r ]))+`;v.KANJI=new RegExp(Z,"g");v.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");v.BYTE=new RegExp(Qe,"g");v.NUMERIC=new RegExp(ue,"g");v.ALPHANUMERIC=new RegExp(Ge,"g");const Ze=new RegExp("^"+Z+"$"),We=new RegExp("^"+ue+"$"),Xe=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");v.testKanji=function(n){return Ze.test(n)};v.testNumeric=function(n){return We.test(n)};v.testAlphanumeric=function(n){return Xe.test(n)};(function(o){const n=Ft,i=v;o.NUMERIC={id:"Numeric",bit:1<<0,ccBits:[10,12,14]},o.ALPHANUMERIC={id:"Alphanumeric",bit:1<<1,ccBits:[9,11,13]},o.BYTE={id:"Byte",bit:1<<2,ccBits:[8,16,16]},o.KANJI={id:"Kanji",bit:1<<3,ccBits:[8,10,12]},o.MIXED={bit:-1},o.getCharCountIndicator=function(r,a){if(!r.ccBits)throw new Error("Invalid mode: "+r);if(!n.isValid(a))throw new Error("Invalid version: "+a);return a>=1&&a<10?r.ccBits[0]:a<27?r.ccBits[1]:r.ccBits[2]},o.getBestModeForData=function(r){return i.testNumeric(r)?o.NUMERIC:i.testAlphanumeric(r)?o.ALPHANUMERIC:i.testKanji(r)?o.KANJI:o.BYTE},o.toString=function(r){if(r&&r.id)return r.id;throw new Error("Invalid mode")},o.isValid=function(r){return r&&r.bit&&r.ccBits};function e(t){if(typeof t!="string")throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return o.NUMERIC;case"alphanumeric":return o.ALPHANUMERIC;case"kanji":return o.KANJI;case"byte":return o.BYTE;default:throw new Error("Unknown mode: "+t)}}o.from=function(r,a){if(o.isValid(r))return r;try{return e(r)}catch{return a}}})(O);(function(o){const n=L,i=ct,e=lt,t=O,r=Ft,a=1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0,u=n.getBCHDigit(a);function s(C,w,_){for(let f=1;f<=40;f++)if(w<=o.getCapacity(f,_,C))return f}function h(C,w){return t.getCharCountIndicator(C,w)+4}function p(C,w){let _=0;return C.forEach(function(f){const d=h(f.mode,w);_+=d+f.getBitsLength()}),_}function S(C,w){for(let _=1;_<=40;_++)if(p(C,_)<=o.getCapacity(_,w,t.MIXED))return _}o.from=function(w,_){return r.isValid(w)?parseInt(w,10):_},o.getCapacity=function(w,_,f){if(!r.isValid(w))throw new Error("Invalid QR Code version");typeof f>"u"&&(f=t.BYTE);const d=n.getSymbolTotalCodewords(w),l=i.getTotalCodewordsCount(w,_),g=(d-l)*8;if(f===t.MIXED)return g;const c=g-h(f,w);switch(f){case t.NUMERIC:return Math.floor(c/10*3);case t.ALPHANUMERIC:return Math.floor(c/11*2);case t.KANJI:return Math.floor(c/13);case t.BYTE:default:return Math.floor(c/8)}},o.getBestVersionForData=function(w,_){let f;const d=e.from(_,e.M);if(Array.isArray(w)){if(w.length>1)return S(w,d);if(w.length===0)return 1;f=w[0]}else f=w;return s(f.mode,f.getLength(),d)},o.getEncodedBits=function(w){if(!r.isValid(w)||w<7)throw new Error("Invalid QR Code version");let _=w<<12;for(;n.getBCHDigit(_)-u>=0;)_^=a<=0;)t^=ce<0&&(e=this.data.substr(i),t=parseInt(e,10),n.put(t,r*3+1))};var nn=J;const on=O,pt=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function Y(o){this.mode=on.ALPHANUMERIC,this.data=o}Y.getBitsLength=function(n){return 11*Math.floor(n/2)+6*(n%2)};Y.prototype.getLength=function(){return this.data.length};Y.prototype.getBitsLength=function(){return Y.getBitsLength(this.data.length)};Y.prototype.write=function(n){let i;for(i=0;i+2<=this.data.length;i+=2){let e=pt.indexOf(this.data[i])*45;e+=pt.indexOf(this.data[i+1]),n.put(e,11)}this.data.length%2&&n.put(pt.indexOf(this.data[i]),6)};var rn=Y,an=function(n){for(var i=[],e=n.length,t=0;t=55296&&r<=56319&&e>t+1){var a=n.charCodeAt(t+1);a>=56320&&a<=57343&&(r=(r-55296)*1024+a-56320+65536,t+=1)}if(r<128){i.push(r);continue}if(r<2048){i.push(r>>6|192),i.push(r&63|128);continue}if(r<55296||r>=57344&&r<65536){i.push(r>>12|224),i.push(r>>6&63|128),i.push(r&63|128);continue}if(r>=65536&&r<=1114111){i.push(r>>18|240),i.push(r>>12&63|128),i.push(r>>6&63|128),i.push(r&63|128);continue}i.push(239,191,189)}return new Uint8Array(i).buffer};const sn=an,un=O;function K(o){this.mode=un.BYTE,typeof o=="string"&&(o=sn(o)),this.data=new Uint8Array(o)}K.getBitsLength=function(n){return n*8};K.prototype.getLength=function(){return this.data.length};K.prototype.getBitsLength=function(){return K.getBitsLength(this.data.length)};K.prototype.write=function(o){for(let n=0,i=this.data.length;n=33088&&i<=40956)i-=33088;else if(i>=57408&&i<=60351)i-=49472;else throw new Error("Invalid SJIS character: "+this.data[n]+` Make sure your charset is UTF-8`);i=(i>>>8&255)*192+(i&255),o.put(i,13)}};var fn=$,fe={exports:{}};(function(o){var n={single_source_shortest_paths:function(i,e,t){var r={},a={};a[e]=0;var u=n.PriorityQueue.make();u.push(e,0);for(var s,h,p,S,C,w,_,f,d;!u.empty();){s=u.pop(),h=s.value,S=s.cost,C=i[h]||{};for(p in C)C.hasOwnProperty(p)&&(w=C[p],_=S+w,f=a[p],d=typeof a[p]>"u",(d||f>_)&&(a[p]=_,u.push(p,_),r[p]=h))}if(typeof t<"u"&&typeof a[t]>"u"){var l=["Could not find a path from ",e," to ",t,"."].join("");throw new Error(l)}return r},extract_shortest_path_from_predecessor_list:function(i,e){for(var t=[],r=e;r;)t.push(r),i[r],r=i[r];return t.reverse(),t},find_path:function(i,e,t){var r=n.single_source_shortest_paths(i,e,t);return n.extract_shortest_path_from_predecessor_list(r,t)},PriorityQueue:{make:function(i){var e=n.PriorityQueue,t={},r;i=i||{};for(r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t.queue=[],t.sorter=i.sorter||e.default_sorter,t},default_sorter:function(i,e){return i.cost-e.cost},push:function(i,e){var t={value:i,cost:e};this.queue.push(t),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};o.exports=n})(fe);(function(o){const n=O,i=nn,e=rn,t=ln,r=fn,a=v,u=L,s=fe.exports;function h(l){return unescape(encodeURIComponent(l)).length}function p(l,g,c){const m=[];let A;for(;(A=l.exec(c))!==null;)m.push({data:A[0],index:A.index,mode:g,length:A[0].length});return m}function S(l){const g=p(a.NUMERIC,n.NUMERIC,l),c=p(a.ALPHANUMERIC,n.ALPHANUMERIC,l);let m,A;return u.isKanjiModeEnabled()?(m=p(a.BYTE,n.BYTE,l),A=p(a.KANJI,n.KANJI,l)):(m=p(a.BYTE_KANJI,n.BYTE,l),A=[]),g.concat(c,m,A).sort(function(F,T){return F.index-T.index}).map(function(F){return{data:F.data,mode:F.mode,length:F.length}})}function C(l,g){switch(g){case n.NUMERIC:return i.getBitsLength(l);case n.ALPHANUMERIC:return e.getBitsLength(l);case n.KANJI:return r.getBitsLength(l);case n.BYTE:return t.getBitsLength(l)}}function w(l){return l.reduce(function(g,c){const m=g.length-1>=0?g[g.length-1]:null;return m&&m.mode===c.mode?(g[g.length-1].data+=c.data,g):(g.push(c),g)},[])}function _(l){const g=[];for(let c=0;c=0&&u<=6&&(s===0||s===6)||s>=0&&s<=6&&(u===0||u===6)||u>=2&&u<=4&&s>=2&&s<=4?o.set(r+u,a+s,!0,!0):o.set(r+u,a+s,!1,!0))}}function _n(o){const n=o.size;for(let i=8;i>u&1)===1,o.set(t,r,a,!0),o.set(r,t,a,!0)}function yt(o,n,i){const e=o.size,t=yn.getEncodedBits(n,i);let r,a;for(r=0;r<15;r++)a=(t>>r&1)===1,r<6?o.set(r,8,a,!0):r<8?o.set(r+1,8,a,!0):o.set(e-15+r,8,a,!0),r<8?o.set(8,e-r-1,a,!0):r<9?o.set(8,15-r-1+1,a,!0):o.set(8,15-r-1,a,!0);o.set(e-8,8,1,!0)}function An(o,n){const i=o.size;let e=-1,t=i-1,r=7,a=0;for(let u=i-1;u>0;u-=2)for(u===6&&u--;;){for(let s=0;s<2;s++)if(!o.isReserved(t,u-s)){let h=!1;a>>r&1)===1),o.set(t,u-s,h),r--,r===-1&&(a++,r=7)}if(t+=e,t<0||i<=t){t-=e,e=-e;break}}}function Sn(o,n,i){const e=new gn;i.forEach(function(s){e.put(s.mode.bit,4),e.put(s.getLength(),Cn.getCharCountIndicator(s.mode,o)),s.write(e)});const t=ft.getSymbolTotalCodewords(o),r=bt.getTotalCodewordsCount(o,n),a=(t-r)*8;for(e.getLengthInBits()+4<=a&&e.put(0,4);e.getLengthInBits()%8!==0;)e.putBit(0);const u=(a-e.getLengthInBits())/8;for(let s=0;s=7&&Bn(s,n),An(s,a),isNaN(e)&&(e=_t.getBestMask(s,yt.bind(null,s,i))),_t.applyMask(e,s),yt(s,i,e),{modules:s,version:n,errorCorrectionLevel:i,maskPattern:e,segments:t}}te.create=function(n,i){if(typeof n>"u"||n==="")throw new Error("No input text");let e=mt.M,t,r;return typeof i<"u"&&(e=mt.from(i.errorCorrectionLevel,mt.M),t=ut.from(i.version),r=_t.from(i.maskPattern),i.toSJISFunc&&ft.setToSJISFunction(i.toSJISFunc)),Tn(n,t,e,r)};var ge={},Tt={};(function(o){function n(i){if(typeof i=="number"&&(i=i.toString()),typeof i!="string")throw new Error("Color should be defined as hex string");let e=i.slice().replace("#","").split("");if(e.length<3||e.length===5||e.length>8)throw new Error("Invalid hex color: "+i);(e.length===3||e.length===4)&&(e=Array.prototype.concat.apply([],e.map(function(r){return[r,r]}))),e.length===6&&e.push("F","F");const t=parseInt(e.join(""),16);return{r:t>>24&255,g:t>>16&255,b:t>>8&255,a:t&255,hex:"#"+e.slice(0,6).join("")}}o.getOptions=function(e){e||(e={}),e.color||(e.color={});const t=typeof e.margin>"u"||e.margin===null||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,a=e.scale||4;return{width:r,scale:r?4:a,margin:t,color:{dark:n(e.color.dark||"#000000ff"),light:n(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},o.getScale=function(e,t){return t.width&&t.width>=e+t.margin*2?t.width/(e+t.margin*2):t.scale},o.getImageWidth=function(e,t){const r=o.getScale(e,t);return Math.floor((e+t.margin*2)*r)},o.qrToImageData=function(e,t,r){const a=t.modules.size,u=t.modules.data,s=o.getScale(a,r),h=Math.floor((a+r.margin*2)*s),p=r.margin*s,S=[r.color.light,r.color.dark];for(let C=0;C=p&&w>=p&&C"u"&&(!a||!a.getContext)&&(s=a,a=void 0),a||(h=e()),s=n.getOptions(s);const p=n.getImageWidth(r.modules.size,s),S=h.getContext("2d"),C=S.createImageData(p,p);return n.qrToImageData(C.data,r,s),i(S,h,p),S.putImageData(C,0,0),h},o.renderToDataURL=function(r,a,u){let s=u;typeof s>"u"&&(!a||!a.getContext)&&(s=a,a=void 0),s||(s={});const h=o.render(r,a,s),p=s.type||"image/png",S=s.rendererOpts||{};return h.toDataURL(p,S.quality)}})(ge);var he={};const In=Tt;function Xt(o,n){const i=o.a/255,e=n+'="'+o.hex+'"';return i<1?e+" "+n+'-opacity="'+i.toFixed(2).slice(1)+'"':e}function Ct(o,n,i){let e=o+n;return typeof i<"u"&&(e+=" "+i),e}function Pn(o,n,i){let e="",t=0,r=!1,a=0;for(let u=0;u0&&s>0&&o[u-1]||(e+=r?Ct("M",s+i,.5+h+i):Ct("m",t,0),t=0,r=!1),s+1':"",h="',p='viewBox="0 0 '+u+" "+u+'"',C=''+s+h+` `;return typeof e=="function"&&e(null,C),C};const Dn=Je,Bt=te,pe=ge,Nn=he;function It(o,n,i,e,t){const r=[].slice.call(arguments,1),a=r.length,u=typeof r[a-1]=="function";if(!u&&!Dn())throw new Error("Callback required as last argument");if(u){if(a<2)throw new Error("Too few arguments provided");a===2?(t=i,i=n,n=e=void 0):a===3&&(n.getContext&&typeof t>"u"?(t=e,e=void 0):(t=e,e=i,i=n,n=void 0))}else{if(a<1)throw new Error("Too few arguments provided");return a===1?(i=n,n=e=void 0):a===2&&!n.getContext&&(e=i,i=n,n=void 0),new Promise(function(s,h){try{const p=Bt.create(i,e);s(o(p,n,e))}catch(p){h(p)}})}try{const s=Bt.create(i,e);t(null,o(s,n,e))}catch(s){t(s)}}W.create=Bt.create;W.toCanvas=It.bind(null,pe.render);W.toDataURL=It.bind(null,pe.renderToDataURL);W.toString=It.bind(null,function(o,n,i){return Nn.render(o,i)});const Mn=o=>(xe("data-v-636dbc84"),o=o(),Oe(),o),Un={class:"container"},Rn={style:{"text-align":"center"}},Ln=["src"],vn=Mn(()=>G("br",null,null,-1)),kn=["innerHTML"],Vn={name:"Sat"},xn=Ee({...Vn,setup(o){const{loading:n,setLoading:i}=ze(!0),e=we(),t=_e({uuid:"",qrcode:"",visible:!1,showHide:0,status:"\u70B9\u51FB\u5199\u5165\u6309\u94AE\u5199\u5165\u536B\u661F\u6570\u636E\u5230\u8BBE\u5907

",sat:"",satData:[],lng:0,lat:0,alt:0,tx:0,rx:0,txTone:0,rxTone:0,CTCSSOption:[67,69.3,71.9,74.4,77,79.7,82.5,85.4,88.5,91.5,94.8,97.4,100,103.5,107.2,110.9,114.8,118.8,123,127.3,131.8,136.5,141.3,146.2,151.4,156.7,159.8,162.2,165.5,167.9,171.3,173.8,177.3,179.9,183.5,186.2,189.9,192.8,196.6,199.5,203.5,206.5,210.7,218.1,225.7,229.1,233.6,241.8,250.3,254.1],pass:void 0,passOption:[],dt:"",timer:void 0,passCustom:void 0,dtCustom:void 0,freqDb:[]});be(async()=>{const f=await(await fetch("https://mirror.ghproxy.com/https://raw.githubusercontent.com/palewire/ham-satellite-database/main/data/amsat-active-frequencies.json")).text();t.freqDb=JSON.parse(f),t.timer=setInterval(()=>{t.dt=new Date().toLocaleString("zh-CN",{timeZone:"Asia/Shanghai"})},1e3)}),Be(()=>{try{clearInterval(t.timer)}catch{}});const r=async()=>{if(e.connectState!=!0){alert("\u8BF7\u5148\u8FDE\u63A5\u624B\u53F0\uFF01");return}i(!0),await ht(e.connectPort),await a(),await Qt(e.connectPort),i(!1)},a=async()=>{var l;const f=t.dtCustom?new Date(t.dtCustom):new Date,d=[...I(parseInt(f.getFullYear().toString().substring(2,4)).toString(16)),...I((f.getMonth()+1).toString(16)),...I(f.getDate().toString(16)),...I(f.getHours().toString(16)),...I(f.getMinutes().toString(16)),...I(f.getSeconds().toString(16))];await D(e.connectPort,11200,new Uint8Array(d),6,(l=e.configuration)==null?void 0:l.uart)},u=async f=>{const d=t.satData.find(l=>l.name==f);if(d&&d.path){t.status+="
\u536B\u661F\u53C2\u6570\uFF1A
",d.path.map(g=>{t.status+=g+"
"});let l=!1;t.freqDb.map(g=>{d.path[1].split(" ")[1]==g.norad_id&&g.mode.indexOf("FM")!=-1&&(console.log(g),l=!0,t.tx=g.uplink?parseFloat(g.uplink.split("/")[0]):0,t.rx=g.downlink?parseFloat(g.downlink.split("/")[0]):0,t.txTone=parseFloat([0,...t.CTCSSOption].reduce((c,m)=>g.mode.indexOf(m)!=-1?m:c)))}),l||(t.tx=0,t.rx=0,t.txTone=0,t.rxTone=0)}Gt(()=>{const l=document==null?void 0:document.getElementById("statusArea");l&&(l.scrollTop=l==null?void 0:l.scrollHeight)})};(async()=>{i(!0);const d=(await(await fetch("https://celestrak.org/NORAD/elements/amateur.txt")).text()).split(/\r?\n/),l=[];let g={};for(let c=0;c{i(!0),navigator.geolocation.getCurrentPosition(f=>{f.coords&&(t.lat=f.coords.latitude,t.lng=f.coords.longitude,f.coords.altitude&&(t.alt=f.coords.altitude))}),i(!1)};h();const p=async()=>{t.visible=!0,t.uuid=crypto.randomUUID(),t.qrcode=await W.toDataURL(location.origin+"/#/satloc?uuid="+t.uuid,{width:250}),console.log(t.uuid)},S=async()=>{const f=await(await fetch("https://k5.vicicode.com/api/lol",{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({func:1,uuid:t.uuid})})).json(),d=JSON.parse(f.cache);d.length>=3&&(t.lng=d[0],t.lat=d[1],t.alt=d[2])},C=async(f=0,d)=>{var l;await ht(e.connectPort);for(let g=f;g",Gt(()=>{const c=document==null?void 0:document.getElementById("statusArea");c&&(c.scrollTop=c==null?void 0:c.scrollHeight)});t.status=t.status+"\u5199\u5165\u8FDB\u5EA6\uFF1A100.0%
"},w=async()=>{if(!t.sat){alert("\u8BF7\u9009\u62E9\u536B\u661F\uFF01");return}i(!0);const f=await(await fetch("https://k5.vicicode.com/api/pass",{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({sat:t.sat,sat_line_1:t.satData.find(l=>l.name==t.sat).path[0],sat_line_2:t.satData.find(l=>l.name==t.sat).path[1],lat:t.lat,lng:t.lng,alt:t.alt})})).json(),d=[];for(let l=0;l0?g=[f.pass_times[l],f.departure_times[l]]:g=[f.pass_times[l],f.departure_times[l+1]],d.push(g)}catch{}d.length>0?t.pass=d[0][0]+"|"+d[0][1]:t.pass=void 0,t.passOption=d,i(!1)},_=async()=>{var y,Pt,Dt,Nt,Mt,Ut,Rt,Lt,vt,kt,Vt,xt,Ot,Ht,zt,Jt,Yt,Kt;if(e.connectState!=!0){alert("\u8BF7\u5148\u8FDE\u63A5\u624B\u53F0\uFF01");return}if(((y=e.configuration)==null?void 0:y.sat)!=!0){alert("\u56FA\u4EF6\u7248\u672C\u4E0D\u5339\u914D");return}if(!t.sat){alert("\u8BF7\u9009\u62E9\u536B\u661F\uFF01");return}if(t.passCustom&&(t.pass=t.passCustom[0]+"|"+t.passCustom[1]),!t.pass){alert("\u8BF7\u9009\u62E9\u8FC7\u5883\u65F6\u95F4\uFF01");return}i(!0);const f=await(await fetch("https://k5.vicicode.com/api/doppler",{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({sat:t.sat,sat_line_1:t.satData.find(z=>z.name==t.sat).path[0],sat_line_2:t.satData.find(z=>z.name==t.sat).path[1],lat:t.lat,lng:t.lng,alt:t.alt,tx:t.tx,rx:t.rx,pass_time:t.pass.split("|")[0],departure_time:t.pass.split("|")[1]})})).json(),d=t.sat,l=t.pass.split("|")[0],g=l.split("-")[0].substring(2,4),c=l.split("-")[1],m=l.split("-")[2].split(" ")[0],A=l.split(" ")[1].split(":")[0],B=l.split(" ")[1].split(":")[1],F=l.split(" ")[1].split(":")[2],T=t.pass.split("|")[1],N=T.split("-")[0].substring(2,4),U=T.split("-")[1],k=T.split("-")[2].split(" ")[0],H=T.split(" ")[1].split(":")[0],R=T.split(" ")[1].split(":")[1],gt=T.split(" ")[1].split(":")[2];await ht(e.connectPort);let P=new Uint8Array(10);P.set(He(d.trim()).subarray(0,9)),await D(e.connectPort,11168,P,10,(Pt=e.configuration)==null?void 0:Pt.uart),await D(e.connectPort,11178,I(parseInt(g).toString(16)).subarray(0,1),1,(Dt=e.configuration)==null?void 0:Dt.uart),await D(e.connectPort,11179,I(parseInt(c).toString(16)).subarray(0,1),1,(Nt=e.configuration)==null?void 0:Nt.uart),await D(e.connectPort,11180,I(parseInt(m).toString(16)).subarray(0,1),1,(Mt=e.configuration)==null?void 0:Mt.uart),await D(e.connectPort,11181,I(parseInt(A).toString(16)).subarray(0,1),1,(Ut=e.configuration)==null?void 0:Ut.uart),await D(e.connectPort,11182,I(parseInt(B).toString(16)).subarray(0,1),1,(Rt=e.configuration)==null?void 0:Rt.uart),await D(e.connectPort,11183,I(parseInt(F).toString(16)).subarray(0,1),1,(Lt=e.configuration)==null?void 0:Lt.uart),await D(e.connectPort,11184,I(parseInt(N).toString(16)).subarray(0,1),1,(vt=e.configuration)==null?void 0:vt.uart),await D(e.connectPort,11185,I(parseInt(U).toString(16)).subarray(0,1),1,(kt=e.configuration)==null?void 0:kt.uart),await D(e.connectPort,11186,I(parseInt(k).toString(16)).subarray(0,1),1,(Vt=e.configuration)==null?void 0:Vt.uart),await D(e.connectPort,11187,I(parseInt(H).toString(16)).subarray(0,1),1,(xt=e.configuration)==null?void 0:xt.uart),await D(e.connectPort,11188,I(parseInt(R).toString(16)).subarray(0,1),1,(Ot=e.configuration)==null?void 0:Ot.uart),await D(e.connectPort,11189,I(parseInt(gt).toString(16)).subarray(0,1),1,(Ht=e.configuration)==null?void 0:Ht.uart),P=new Uint8Array(2),P.set(I(((Date.parse(T)-Date.parse(l))/1e3).toString(16)).subarray(0,2)),await D(e.connectPort,11190,P,2,(zt=e.configuration)==null?void 0:zt.uart),P=new Uint8Array(2),t.txTone&&t.txTone>0&&P.set(I(parseInt((t.txTone*10).toFixed(0)).toString(16)).subarray(0,2)),await D(e.connectPort,11192,P,2,(Jt=e.configuration)==null?void 0:Jt.uart),P=new Uint8Array(2),t.rxTone&&t.rxTone>0&&P.set(I(parseInt((t.rxTone*10).toFixed(0)).toString(16)).subarray(0,2)),await D(e.connectPort,11194,P,2,(Yt=e.configuration)==null?void 0:Yt.uart),P=new Uint8Array(4),P.set(I(((Date.parse(l)-Date.parse("2000-01-01 00:00:00"))/1e3).toString(16)).subarray(0,4)),await D(e.connectPort,11196,P,4,(Kt=e.configuration)==null?void 0:Kt.uart);const tt=[];f.shift_array.filter((z,et)=>et%2===0).map(z=>{const et=new Uint8Array(4),$t=new Uint8Array(4);et.set(I(parseInt(((t.tx*1e6+z[0])/10).toFixed(0)).toString(16))),$t.set(I(parseInt(((t.rx*1e6+z[1])/10).toFixed(0)).toString(16))),tt.push(...et,...$t)}),P=new Uint8Array(7680),P.set(new Uint8Array(tt).subarray(0,7680)),await C(123392,P),await a(),await Qt(e.connectPort),i(!1)};return(f,d)=>{const l=De,g=ye,c=Ne,m=Ae,A=me,B=Me,F=Se,T=Fe,N=Ue,U=Re,k=Le,H=ve,R=Te,gt=Ie,P=ke,tt=Ve;return V(),j("div",Un,[E(l,{visible:t.visible,"onUpdate:visible":d[0]||(d[0]=y=>t.visible=y),onOk:S,"ok-text":"\u5DF2\u626B\u7801\u4E0A\u4F20"},{title:b(()=>[M(" \u624B\u673A\u626B\u7801\u83B7\u53D6\u7ECF\u7EAC\u5EA6 ")]),default:b(()=>[G("div",Rn,[G("img",{src:t.qrcode},null,8,Ln),vn,M(" \u4E0A\u4F20\u7ECF\u7EAC\u5EA6\u4FE1\u606F\u5C06\u88AB\u670D\u52A1\u5668\u7F13\u5B58\u5341\u5206\u949F ")])]),_:1},8,["visible"]),E(g,{items:["\u5C0F\u5DE5\u5177","\u536B\u661F\u5199\u5165"]}),E(tt,{gutter:20,align:"stretch"},{default:b(()=>[E(P,{span:24},{default:b(()=>[E(gt,{class:"general-card",title:"\u536B\u661F\u5199\u5165"},{default:b(()=>[E(R,{loading:Pe(n),style:{width:"100%"},tip:"\u6B63\u5728\u5904\u7406 ..."},{default:b(()=>[E(c,{"label-col-style":{width:"25%"},field:"dt",label:"\u6D4F\u89C8\u5668\u65F6\u95F4",onClick:d[1]||(d[1]=()=>{t.showHide+=1})},{default:b(()=>[M(q(t.dt),1)]),_:1}),jt(E(c,{"label-col-style":{width:"25%"},field:"dtCustom",label:"\u81EA\u5B9A\u4E49\u65F6\u95F4"},{default:b(()=>[G("div",null,[E(m,{style:{width:"220px",margin:"0 24px 24px 0"},"show-time":"","time-picker-props":{defaultValue:"00:00:00"},format:"YYYY-MM-DD HH:mm:ss",modelValue:t.dtCustom,"onUpdate:modelValue":d[2]||(d[2]=y=>t.dtCustom=y)},null,8,["modelValue"]),M(" \xA0\xA0"),E(A,{size:"small",theme:"success",onClick:r},{default:b(()=>[M("\u5199\u5165\u65F6\u95F4\u5230\u53F0\u7AD9")]),_:1})])]),_:1},512),[[qt,t.showHide>=5]]),E(c,{"label-col-style":{width:"25%"},field:"sat",label:"\u9009\u62E9\u536B\u661F"},{default:b(()=>[E(F,{modelValue:t.sat,"onUpdate:modelValue":d[3]||(d[3]=y=>t.sat=y),onChange:u,placeholder:"\u9009\u62E9\u536B\u661F ...","allow-search":"","allow-clear":""},{default:b(()=>[(V(!0),j(nt,null,ot(t.satData,y=>(V(),rt(B,{key:y.name,value:y.name},{default:b(()=>[M(q(y.name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),_:1}),E(c,{"label-col-style":{width:"25%"},field:"lng",label:"\u53F0\u7AD9\u7ECF\u5EA6"},{default:b(()=>[E(T,{precision:6,modelValue:t.lng,"onUpdate:modelValue":d[4]||(d[4]=y=>t.lng=y)},null,8,["modelValue"])]),_:1}),E(c,{"label-col-style":{width:"25%"},field:"lat",label:"\u53F0\u7AD9\u7EAC\u5EA6"},{default:b(()=>[E(T,{precision:6,modelValue:t.lat,"onUpdate:modelValue":d[5]||(d[5]=y=>t.lat=y)},null,8,["modelValue"])]),_:1}),E(c,{"label-col-style":{width:"25%"},field:"alt",label:"\u53F0\u7AD9\u6D77\u62D4"},{default:b(()=>[E(T,{precision:0,modelValue:t.alt,"onUpdate:modelValue":d[6]||(d[6]=y=>t.alt=y)},null,8,["modelValue"])]),_:1}),E(c,{"label-col-style":{width:"25%"},label:""},{default:b(()=>[E(U,null,{default:b(()=>[E(N,{onClick:h},{default:b(()=>[M("\u6D4F\u89C8\u5668\u83B7\u53D6\u7ECF\u7EAC\u5EA6")]),_:1}),E(N,{onClick:p},{default:b(()=>[M("\u624B\u673A\u626B\u7801\u83B7\u53D6\u7ECF\u7EAC\u5EA6")]),_:1}),E(N,{onClick:w},{default:b(()=>[M("\u83B7\u53D6\u536B\u661F\u8FC7\u5883\u65F6\u95F4")]),_:1})]),_:1})]),_:1}),E(c,{"label-col-style":{width:"25%"},field:"pass",label:"\u9009\u62E9\u8FC7\u5883\u65F6\u95F4"},{default:b(()=>[E(F,{modelValue:t.pass,"onUpdate:modelValue":d[7]||(d[7]=y=>t.pass=y),"allow-search":"","allow-clear":""},{default:b(()=>[(V(!0),j(nt,null,ot(t.passOption,y=>(V(),rt(B,{key:y[0]+"|"+y[1],value:y[0]+"|"+y[1]},{default:b(()=>[M(q(y[0]+" - "+y[1]),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),_:1}),jt(E(c,{"label-col-style":{width:"25%"},field:"passCustom",label:"\u81EA\u5B9A\u4E49\u8FC7\u5883\u65F6\u95F4"},{default:b(()=>[E(k,{style:{width:"360px",margin:"0 24px 24px 0"},"show-time":"","time-picker-props":{defaultValue:["00:00:00","00:00:00"]},format:"YYYY-MM-DD HH:mm:ss",modelValue:t.passCustom,"onUpdate:modelValue":d[8]||(d[8]=y=>t.passCustom=y)},null,8,["modelValue"])]),_:1},512),[[qt,t.showHide>=5]]),E(c,{"label-col-style":{width:"25%"},field:"tx",label:"\u4E0A\u884C\u9891\u7387"},{default:b(()=>[E(T,{precision:5,modelValue:t.tx,"onUpdate:modelValue":d[9]||(d[9]=y=>t.tx=y)},null,8,["modelValue"])]),_:1}),E(c,{"label-col-style":{width:"25%"},field:"txTone",label:"\u4E0A\u884C\u4E9A\u97F3"},{default:b(()=>[E(F,{modelValue:t.txTone,"onUpdate:modelValue":d[10]||(d[10]=y=>t.txTone=y),"allow-search":"","allow-clear":""},{default:b(()=>[E(B,{value:0},{default:b(()=>[M("\u5173\u95ED")]),_:1}),(V(!0),j(nt,null,ot(t.CTCSSOption,y=>(V(),rt(B,{key:y,value:y},{default:b(()=>[M(q(y.toFixed(1)),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),_:1}),E(c,{"label-col-style":{width:"25%"},field:"rx",label:"\u4E0B\u884C\u9891\u7387"},{default:b(()=>[E(T,{precision:5,modelValue:t.rx,"onUpdate:modelValue":d[11]||(d[11]=y=>t.rx=y)},null,8,["modelValue"])]),_:1}),E(c,{"label-col-style":{width:"25%"},field:"rxTone",label:"\u4E0B\u884C\u4E9A\u97F3"},{default:b(()=>[E(F,{modelValue:t.rxTone,"onUpdate:modelValue":d[12]||(d[12]=y=>t.rxTone=y),"allow-search":"","allow-clear":""},{default:b(()=>[E(B,{value:0},{default:b(()=>[M("\u5173\u95ED")]),_:1}),(V(!0),j(nt,null,ot(t.CTCSSOption,y=>(V(),rt(B,{key:y,value:y},{default:b(()=>[M(q(y.toFixed(1)),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),_:1}),E(c,{"label-col-style":{width:"25%"},label:""},{default:b(()=>[E(N,{onClick:_},{default:b(()=>[M("\u5199\u5165\u6570\u636E")]),_:1})]),_:1}),E(H),G("div",{id:"statusArea",style:{height:"20em","background-color":"azure",color:"silver",overflow:"auto",padding:"20px"},innerHTML:t.status},null,8,kn)]),_:1},8,["loading"])]),_:1})]),_:1})]),_:1})])}}});const oo=Ce(xn,[["__scopeId","data-v-636dbc84"]]);export{oo as default};