diff --git a/assets/index-CI34HjPG.js b/assets/index-CI34HjPG.js new file mode 100644 index 0000000..b10342c --- /dev/null +++ b/assets/index-CI34HjPG.js @@ -0,0 +1 @@ +var Yl=Object.defineProperty;var Kl=(e,s,n)=>s in e?Yl(e,s,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[s]=n;var Ot=(e,s,n)=>(Kl(e,typeof s!="symbol"?s+"":s,n),n);(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))u(c);new MutationObserver(c=>{for(const d of c)if(d.type==="childList")for(const m of d.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&u(m)}).observe(document,{childList:!0,subtree:!0});function n(c){const d={};return c.integrity&&(d.integrity=c.integrity),c.referrerPolicy&&(d.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?d.credentials="include":c.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function u(c){if(c.ep)return;c.ep=!0;const d=n(c);fetch(c.href,d)}})();function Ie(){}function Rl(e){return e()}function Tl(){return Object.create(null)}function dt(e){e.forEach(Rl)}function Ol(e){return typeof e=="function"}function Fl(e,s){return e!=e?s==s:e!==s||e&&typeof e=="object"||typeof e=="function"}let wt;function jl(e,s){return e===s?!0:(wt||(wt=document.createElement("a")),wt.href=s,e===wt.href)}function Vl(e){return Object.keys(e).length===0}function l(e,s){e.appendChild(s)}function Gl(e,s,n){e.insertBefore(s,n||null)}function Q(e){e.parentNode&&e.parentNode.removeChild(e)}function o(e){return document.createElement(e)}function Bt(e){return document.createTextNode(e)}function r(){return Bt(" ")}function C(e,s,n,u){return e.addEventListener(s,n,u),()=>e.removeEventListener(s,n,u)}function t(e,s,n){n==null?e.removeAttribute(s):e.getAttribute(s)!==n&&e.setAttribute(s,n)}function f(e){return e===""?null:+e}function Xl(e){return Array.from(e.childNodes)}function Ft(e,s){s=""+s,e.data!==s&&(e.data=s)}function a(e,s){e.value=s??""}function Pl(e,s,n){for(let u=0;ue.indexOf(u)===-1?s.push(u):n.push(u)),n.forEach(u=>u()),He=s}const Lt=new Set;let ln;function Il(e,s){e&&e.i&&(Lt.delete(e),e.i(s))}function nn(e,s,n,u){if(e&&e.o){if(Lt.has(e))return;Lt.add(e),ln.c.push(()=>{Lt.delete(e),u&&(n&&e.d(1),u())}),e.o(s)}else u&&u()}function on(e){e&&e.c()}function zl(e,s,n){const{fragment:u,after_update:c}=e.$$;u&&u.m(s,n),Nt(()=>{const d=e.$$.on_mount.map(Rl).filter(Ol);e.$$.on_destroy?e.$$.on_destroy.push(...d):dt(d),e.$$.on_mount=[]}),c.forEach(Nt)}function Dl(e,s){const n=e.$$;n.fragment!==null&&(tn(n.after_update),dt(n.on_destroy),n.fragment&&n.fragment.d(s),n.on_destroy=n.fragment=null,n.ctx=[])}function sn(e,s){e.$$.dirty[0]===-1&&(Ge.push(e),$l(),e.$$.dirty.fill(0)),e.$$.dirty[s/31|0]|=1<{const B=G.length?G[0]:b;return h.ctx&&c(h.ctx[v],h.ctx[v]=B)&&(!h.skip_bound&&h.bound[v]&&h.bound[v](B),g&&sn(e,v)),b}):[],h.update(),g=!0,dt(h.before_update),h.fragment=u?u(h.ctx):!1,s.target){if(s.hydrate){const v=Xl(s.target);h.fragment&&h.fragment.l(v),v.forEach(Q)}else h.fragment&&h.fragment.c();s.intro&&Il(e.$$.fragment),zl(e,s.target,s.anchor),Hl()}ct(p)}class ql{constructor(){Ot(this,"$$");Ot(this,"$$set")}$destroy(){Dl(this,1),this.$destroy=Ie}$on(s,n){if(!Ol(n))return Ie;const u=this.$$.callbacks[s]||(this.$$.callbacks[s]=[]);return u.push(n),()=>{const c=u.indexOf(n);c!==-1&&u.splice(c,1)}}$set(s){this.$$set&&!Vl(s)&&(this.$$.skip_bound=!0,this.$$set(s),this.$$.skip_bound=!1)}}const rn="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(rn);function un(e){let s,n,u,c,d,m,k,p,h,g,v,b,G,B,S,ye,L,P,I,x,M,A,E,y,T,z,D,j,H,pt,$,he,mt,U,ht,ee,be,bt,R,_t,te,_e,vt,O,gt,ze,yt,w,F,Ct,W,It,ve,Ce,De,zt,le,Dt,we,We,Wt,ne,qt,qe,Yt,Ye,Be,Ke,Kt,oe,Vt,Ve,Xt,q,Le,Xe,Zt,se,Jt,Ne,Ze,Qt,re,xt,ke,Je,$t,Y,el,kt,tl,Ee,K,ll,V,Se,Qe,nl,ie,ol,Me,xe,sl,ue,rl,Te,$e,il,ae,ul,Et,al,N,X,cl,et,fl,ge,je,tt,dl,ce,pl,Pe,lt,ml,fe,hl,nt,bl,ot,Ae,st,_l,de,vl,rt,gl,Z,Ue,it,yl,pe,Cl,Re,ut,wl,me,Bl,Oe,at,Ll,J,Nl,St,kl,Mt,Tt,El,jt,Pt,Sl,At,Ut,Rt,Ml;return{c(){s=o("div"),n=o("div"),u=o("h2"),u.textContent="5G Link Budget",c=r(),d=o("div"),m=o("button"),m.textContent="Radio Configuration",k=r(),p=o("div"),h=o("div"),g=o("label"),g.textContent="Frequency Tx (MHz):",v=r(),b=o("input"),G=r(),B=o("div"),S=o("label"),S.textContent="RB count:",ye=r(),L=o("input"),P=r(),I=o("div"),x=r(),M=o("div"),A=o("label"),A.textContent="Select:",E=r(),y=o("select"),T=o("option"),T.textContent="0 - 15kHz",z=o("option"),z.textContent="1 - 30kHz",D=o("option"),D.textContent="2 - 60kHz",j=o("option"),j.textContent="3 - 120kHz",H=o("option"),H.textContent="4 - 240kHz",pt=r(),$=o("div"),he=o("label"),he.textContent="Numerolgy:",mt=r(),U=o("input"),ht=r(),ee=o("div"),be=o("label"),be.textContent="Subcarrie Spacing (kHz):",bt=r(),R=o("input"),_t=r(),te=o("div"),_e=o("label"),_e.textContent="Thermal Noise:",vt=r(),O=o("input"),gt=r(),ze=o("div"),yt=r(),w=o("div"),F=o("button"),F.textContent="NodeB",Ct=r(),W=o("h6"),W.textContent="Losses & Gains",It=r(),ve=o("div"),Ce=o("div"),De=o("label"),De.textContent="Tx Cable Loss (dB):",zt=r(),le=o("input"),Dt=r(),we=o("div"),We=o("label"),We.textContent="Tx Antenna Gain (dB):",Wt=r(),ne=o("input"),qt=r(),qe=o("h6"),qe.textContent="Tx",Yt=r(),Ye=o("div"),Be=o("div"),Ke=o("label"),Ke.textContent="Tx Power (dBm):",Kt=r(),oe=o("input"),Vt=r(),Ve=o("h6"),Ve.textContent="Rx",Xt=r(),q=o("div"),Le=o("div"),Xe=o("label"),Xe.textContent="Noise Figure (dB):",Zt=r(),se=o("input"),Jt=r(),Ne=o("div"),Ze=o("label"),Ze.textContent="SINR (dB):",Qt=r(),re=o("input"),xt=r(),ke=o("div"),Je=o("label"),Je.textContent="Receiver Sensitivity:",$t=r(),Y=o("input"),el=r(),kt=o("div"),tl=r(),Ee=o("div"),K=o("button"),K.textContent="Loss&Margins",ll=r(),V=o("div"),Se=o("div"),Qe=o("label"),Qe.textContent="Interference Margin (dB):",nl=r(),ie=o("input"),ol=r(),Me=o("div"),xe=o("label"),xe.textContent="Fading Margin (dB):",sl=r(),ue=o("input"),rl=r(),Te=o("div"),$e=o("label"),$e.textContent="Penetration Loss (dB):",il=r(),ae=o("input"),ul=r(),Et=o("div"),al=r(),N=o("div"),X=o("button"),X.textContent="UT",cl=r(),et=o("h6"),et.textContent="Losses & Gains",fl=r(),ge=o("div"),je=o("div"),tt=o("label"),tt.textContent="Tx Cable Loss (dB):",dl=r(),ce=o("input"),pl=r(),Pe=o("div"),lt=o("label"),lt.textContent="Tx Antenna Gain (dB):",ml=r(),fe=o("input"),hl=r(),nt=o("h6"),nt.textContent="Tx",bl=r(),ot=o("div"),Ae=o("div"),st=o("label"),st.textContent="Tx Power (dBm):",_l=r(),de=o("input"),vl=r(),rt=o("h6"),rt.textContent="Rx",gl=r(),Z=o("div"),Ue=o("div"),it=o("label"),it.textContent="Noise Figure (dB):",yl=r(),pe=o("input"),Cl=r(),Re=o("div"),ut=o("label"),ut.textContent="SINR (dB):",wl=r(),me=o("input"),Bl=r(),Oe=o("div"),at=o("label"),at.textContent="Receiver Sensitivity:",Ll=r(),J=o("input"),Nl=r(),St=o("div"),kl=r(),Mt=o("p"),Tt=Bt(e[20]),El=r(),jt=o("p"),Pt=Bt(e[21]),Sl=r(),At=o("p"),Ut=Bt(e[22]),t(m,"class","btn btn-outline-secondary custom-height col-3 svelte-l5y9p7"),t(m,"type","button"),t(m,"data-bs-toggle","collapse"),t(m,"data-bs-target","#channel"),t(m,"aria-expanded","false"),t(m,"aria-controls","collapseExample"),t(g,"for","centerFrequency"),t(g,"class","form-label"),t(b,"type","number"),t(b,"class","form-control"),t(h,"class","col-3"),t(S,"for","noRBs"),t(S,"class","form-label"),t(L,"type","number"),t(L,"class","form-control"),t(B,"class","col-3"),t(I,"class","col-6"),t(A,"for","numerology"),t(A,"class","form-label"),T.__value="0",a(T,T.__value),z.__value="1",a(z,z.__value),D.__value="2",a(D,D.__value),j.__value="3",a(j,j.__value),H.__value="3",a(H,H.__value),t(y,"class","form-select col-3"),t(y,"aria-label","Default select example"),e[18]===void 0&&Nt(()=>e[28].call(y)),t(M,"class","col-3"),t(he,"for","numerology"),t(he,"class","form-label"),t(U,"type","number"),t(U,"class","form-control"),U.disabled=!0,t($,"class","col-3"),t(be,"for","subCarrierSpacing"),t(be,"class","form-label"),t(R,"type","number"),t(R,"class","form-control"),R.disabled=!0,t(ee,"class","col-3"),t(_e,"for","thermalNoise"),t(_e,"class","form-label"),t(O,"type","number"),t(O,"class","form-control"),O.disabled=!0,t(te,"class","col-3"),t(p,"class","row collapse"),t(p,"id","channel"),t(d,"class","row"),t(ze,"class","w-100 mb-3"),t(F,"class","btn btn-outline-secondary custom-height col-3 svelte-l5y9p7"),t(F,"type","button"),t(F,"data-bs-toggle","collapse"),t(F,"data-bs-target","#nodeB"),t(F,"aria-expanded","false"),t(F,"aria-controls","collapseExample"),t(W,"class","collapse"),t(W,"id","nodeB"),t(De,"for","transmitCableLoss"),t(De,"class","form-label"),t(le,"type","number"),t(le,"class","form-control"),t(Ce,"class","col-3"),t(We,"for","transmitterGain"),t(We,"class","form-label"),t(ne,"type","number"),t(ne,"class","form-control"),t(we,"class","col-3"),t(ve,"class","row collapse"),t(ve,"id","nodeB"),t(qe,"class","collapse"),t(qe,"id","nodeB"),t(Ke,"for","transmitPower"),t(Ke,"class","form-label"),t(oe,"type","number"),t(oe,"class","form-control"),t(Be,"class","col-3"),t(Ye,"class","row collapse"),t(Ye,"id","nodeB"),t(Ve,"class","collapse"),t(Ve,"id","nodeB"),t(Xe,"for","noiseFigureNodeB"),t(Xe,"class","form-label"),t(se,"type","number"),t(se,"class","form-control"),t(Le,"class","col-3"),t(Ze,"for","sinrNodeB"),t(Ze,"class","form-label"),t(re,"type","number"),t(re,"class","form-control"),t(Ne,"class","col-3"),t(Je,"for","rxSensitivityNodeB"),t(Je,"class","form-label"),t(Y,"type","number"),t(Y,"class","form-control"),Y.disabled=!0,t(ke,"class","col-3"),t(q,"class","row collapse"),t(q,"id","nodeB"),t(w,"class","row"),t(kt,"class","w-100 mb-3"),t(K,"class","btn btn-outline-secondary custom-height col-3 svelte-l5y9p7"),t(K,"type","button"),t(K,"data-bs-toggle","collapse"),t(K,"data-bs-target","#losses"),t(K,"aria-expanded","false"),t(K,"aria-controls","collapseExample"),t(Qe,"for","interferenceMargin"),t(Qe,"class","form-label"),t(ie,"type","number"),t(ie,"class","form-control"),t(Se,"class","col-3"),t(xe,"for","fadingMargin"),t(xe,"class","form-label"),t(ue,"type","number"),t(ue,"class","form-control"),t(Me,"class","col-3"),t($e,"for","penetrationLoss"),t($e,"class","form-label"),t(ae,"type","number"),t(ae,"class","form-control"),t(Te,"class","col-3"),t(V,"class","row collapse"),t(V,"id","losses"),t(Ee,"class","row"),t(Et,"class","w-100 mb-3"),t(X,"class","btn btn-outline-secondary custom-height col-3 svelte-l5y9p7"),t(X,"type","button"),t(X,"data-bs-toggle","collapse"),t(X,"data-bs-target","#ueconf"),t(X,"aria-expanded","false"),t(X,"aria-controls","collapseExample"),t(et,"class","collapse"),t(et,"id","ueconf"),t(tt,"for","transmitCableLoss"),t(tt,"class","form-label"),t(ce,"type","number"),t(ce,"class","form-control"),t(je,"class","col-3"),t(lt,"for","transmitterGain"),t(lt,"class","form-label"),t(fe,"type","number"),t(fe,"class","form-control"),t(Pe,"class","col-3"),t(ge,"class","row collapse"),t(ge,"id","ueconf"),t(nt,"class","collapse"),t(nt,"id","ueconf"),t(st,"for","transmitPowerUT"),t(st,"class","form-label"),t(de,"type","number"),t(de,"class","form-control"),t(Ae,"class","col-3"),t(ot,"class","row collapse"),t(ot,"id","ueconf"),t(rt,"class","collapse"),t(rt,"id","ueconf"),t(it,"for","noiseFigureUE"),t(it,"class","form-label"),t(pe,"type","number"),t(pe,"class","form-control"),t(Ue,"class","col-3"),t(ut,"for","sinrUE"),t(ut,"class","form-label"),t(me,"type","number"),t(me,"class","form-control"),t(Re,"class","col-3"),t(at,"for","rxSensitivityUE"),t(at,"class","form-label"),t(J,"type","number"),t(J,"class","form-control"),J.disabled=!0,t(Oe,"class","col-3"),t(Z,"class","row collapse"),t(Z,"id","ueconf"),t(N,"class","row"),t(St,"class","w-100 mb-3"),t(n,"class","row"),t(s,"class","container")},m(i,_){Gl(i,s,_),l(s,n),l(n,u),l(n,c),l(n,d),l(d,m),l(d,k),l(d,p),l(p,h),l(h,g),l(h,v),l(h,b),a(b,e[11]),l(p,G),l(p,B),l(B,S),l(B,ye),l(B,L),a(L,e[12]),l(p,P),l(p,I),l(p,x),l(p,M),l(M,A),l(M,E),l(M,y),l(y,T),l(y,z),l(y,D),l(y,j),l(y,H),Pl(y,e[18],!0),l(p,pt),l(p,$),l($,he),l($,mt),l($,U),a(U,e[18]),l(p,ht),l(p,ee),l(ee,be),l(ee,bt),l(ee,R),a(R,e[19]),l(p,_t),l(p,te),l(te,_e),l(te,vt),l(te,O),a(O,e[13]),l(n,gt),l(n,ze),l(n,yt),l(n,w),l(w,F),l(w,Ct),l(w,W),l(w,It),l(w,ve),l(ve,Ce),l(Ce,De),l(Ce,zt),l(Ce,le),a(le,e[1]),l(ve,Dt),l(ve,we),l(we,We),l(we,Wt),l(we,ne),a(ne,e[2]),l(w,qt),l(w,qe),l(w,Yt),l(w,Ye),l(Ye,Be),l(Be,Ke),l(Be,Kt),l(Be,oe),a(oe,e[0]),l(w,Vt),l(w,Ve),l(w,Xt),l(w,q),l(q,Le),l(Le,Xe),l(Le,Zt),l(Le,se),a(se,e[16]),l(q,Jt),l(q,Ne),l(Ne,Ze),l(Ne,Qt),l(Ne,re),a(re,e[14]),l(q,xt),l(q,ke),l(ke,Je),l(ke,$t),l(ke,Y),a(Y,e[9]),l(n,el),l(n,kt),l(n,tl),l(n,Ee),l(Ee,K),l(Ee,ll),l(Ee,V),l(V,Se),l(Se,Qe),l(Se,nl),l(Se,ie),a(ie,e[6]),l(V,ol),l(V,Me),l(Me,xe),l(Me,sl),l(Me,ue),a(ue,e[7]),l(V,rl),l(V,Te),l(Te,$e),l(Te,il),l(Te,ae),a(ae,e[8]),l(n,ul),l(n,Et),l(n,al),l(n,N),l(N,X),l(N,cl),l(N,et),l(N,fl),l(N,ge),l(ge,je),l(je,tt),l(je,dl),l(je,ce),a(ce,e[4]),l(ge,pl),l(ge,Pe),l(Pe,lt),l(Pe,ml),l(Pe,fe),a(fe,e[5]),l(N,hl),l(N,nt),l(N,bl),l(N,ot),l(ot,Ae),l(Ae,st),l(Ae,_l),l(Ae,de),a(de,e[3]),l(N,vl),l(N,rt),l(N,gl),l(N,Z),l(Z,Ue),l(Ue,it),l(Ue,yl),l(Ue,pe),a(pe,e[17]),l(Z,Cl),l(Z,Re),l(Re,ut),l(Re,wl),l(Re,me),a(me,e[15]),l(Z,Bl),l(Z,Oe),l(Oe,at),l(Oe,Ll),l(Oe,J),a(J,e[10]),l(n,Nl),l(n,St),l(n,kl),l(n,Mt),l(Mt,Tt),l(n,El),l(n,jt),l(jt,Pt),l(n,Sl),l(n,At),l(At,Ut),Rt||(Ml=[C(b,"input",e[26]),C(L,"input",e[27]),C(y,"change",e[28]),C(U,"input",e[29]),C(R,"input",e[30]),C(O,"input",e[31]),C(le,"input",e[32]),C(ne,"input",e[33]),C(oe,"input",e[34]),C(se,"input",e[35]),C(re,"input",e[36]),C(Y,"input",e[37]),C(ie,"input",e[38]),C(ue,"input",e[39]),C(ae,"input",e[40]),C(ce,"input",e[41]),C(fe,"input",e[42]),C(de,"input",e[43]),C(pe,"input",e[44]),C(me,"input",e[45]),C(J,"input",e[46])],Rt=!0)},p(i,_){_[0]&2048&&f(b.value)!==i[11]&&a(b,i[11]),_[0]&4096&&f(L.value)!==i[12]&&a(L,i[12]),_[0]&262144&&Pl(y,i[18]),_[0]&262144&&f(U.value)!==i[18]&&a(U,i[18]),_[0]&524288&&f(R.value)!==i[19]&&a(R,i[19]),_[0]&8192&&f(O.value)!==i[13]&&a(O,i[13]),_[0]&2&&f(le.value)!==i[1]&&a(le,i[1]),_[0]&4&&f(ne.value)!==i[2]&&a(ne,i[2]),_[0]&1&&f(oe.value)!==i[0]&&a(oe,i[0]),_[0]&65536&&f(se.value)!==i[16]&&a(se,i[16]),_[0]&16384&&f(re.value)!==i[14]&&a(re,i[14]),_[0]&512&&f(Y.value)!==i[9]&&a(Y,i[9]),_[0]&64&&f(ie.value)!==i[6]&&a(ie,i[6]),_[0]&128&&f(ue.value)!==i[7]&&a(ue,i[7]),_[0]&256&&f(ae.value)!==i[8]&&a(ae,i[8]),_[0]&16&&f(ce.value)!==i[4]&&a(ce,i[4]),_[0]&32&&f(fe.value)!==i[5]&&a(fe,i[5]),_[0]&8&&f(de.value)!==i[3]&&a(de,i[3]),_[0]&131072&&f(pe.value)!==i[17]&&a(pe,i[17]),_[0]&32768&&f(me.value)!==i[15]&&a(me,i[15]),_[0]&1024&&f(J.value)!==i[10]&&a(J,i[10]),_[0]&1048576&&Ft(Tt,i[20]),_[0]&2097152&&Ft(Pt,i[21]),_[0]&4194304&&Ft(Ut,i[22])},i:Ie,o:Ie,d(i){i&&Q(s),Rt=!1,dt(Ml)}}}let an=10,cn=2;function fn(e,s){return Math.round(e*Math.pow(10,s))/Math.pow(10,s)}function dn(e,s,n){let u=27,c=2,d=15,m=23,k=0,p=0,h=100,g=10,v=6,b=15,G=-100,B=-100,S=-100,ye=3600,L=1,P=0,I=-6,x=-6,M=4,A=10,E="1",y=0,T=0,z="",D="",j=0,H=0;Ql(()=>{"serviceWorker"in navigator&&navigator.serviceWorker.register("/service-worker.js").then(W=>console.log("Service Worker registered",W)).catch(W=>console.log("Service Worker registration failed:",W))});function pt(){ye=f(this.value),n(11,ye)}function $(){L=f(this.value),n(12,L)}function he(){E=Zl(this),n(18,E)}function mt(){E=f(this.value),n(18,E)}function U(){y=f(this.value),n(19,y),n(18,E)}function ht(){P=f(this.value),n(13,P),n(19,y),n(12,L),n(18,E)}function ee(){c=f(this.value),n(1,c)}function be(){d=f(this.value),n(2,d)}function bt(){u=f(this.value),n(0,u)}function R(){M=f(this.value),n(16,M)}function _t(){I=f(this.value),n(14,I)}function te(){B=f(this.value),n(9,B),n(13,P),n(14,I),n(16,M),n(19,y),n(12,L),n(18,E)}function _e(){g=f(this.value),n(6,g)}function vt(){v=f(this.value),n(7,v)}function O(){b=f(this.value),n(8,b)}function gt(){k=f(this.value),n(4,k)}function ze(){p=f(this.value),n(5,p)}function yt(){m=f(this.value),n(3,m)}function w(){A=f(this.value),n(17,A)}function F(){x=f(this.value),n(15,x)}function Ct(){S=f(this.value),n(10,S),n(13,P),n(15,x),n(17,A),n(19,y),n(12,L),n(18,E)}return e.$$.update=()=>{e.$$.dirty[0]&262144&&n(19,y=15*Math.pow(2,E)),e.$$.dirty[0]&455&&n(23,h=u-c+d-g-v-b+an-cn-G),e.$$.dirty[0]&8390656,e.$$.dirty[0]&528384&&n(13,P=fn(-174+10*Math.log10(y*1e3*12*L),2)),e.$$.dirty[0]&90112&&n(9,B=P+I+M),e.$$.dirty[0]&172032&&n(10,S=P+x+A),e.$$.dirty[0]&1223&&n(24,T=u-c+d-v-g-S),e.$$.dirty[0]&16778439&&n(20,z=`MAPL DL = ${u} - ${c} + ${d} - ${v} - ${g} - ${S} = ${T}`),e.$$.dirty[0]&766&&n(25,j=m-k+p-v-g+d-c-B),e.$$.dirty[0]&33555198&&n(21,D=`MAPL UL = ${m} - ${k} + ${p} - ${v} - ${g} +${d} - ${c} - ${B} = ${j}`),e.$$.dirty[0]&50331648&&(T<=j?n(22,H=T):n(22,H=j))},[u,c,d,m,k,p,g,v,b,B,S,ye,L,P,I,x,M,A,E,y,z,D,H,h,T,j,pt,$,he,mt,U,ht,ee,be,bt,R,_t,te,_e,vt,O,gt,ze,yt,w,F,Ct]}class pn extends ql{constructor(s){super(),Wl(this,s,dn,un,Fl,{},null,[-1,-1])}}function mn(e){let s,n,u,c,d,m,k,p,h,g,v;return g=new pn({}),{c(){s=o("script"),s.innerHTML="",u=o("link"),c=o("link"),d=o("link"),m=o("script"),m.innerHTML="",p=o("link"),h=r(),on(g.$$.fragment),document.title="Link Budget App",jl(s.src,n="https://cdn.jsdelivr.net/npm/chart.js")||t(s,"src",n),t(u,"rel","stylesheet"),t(u,"href","https://fonts.googleapis.com/css?family=Roboto:300,400,500,600,700"),t(c,"rel","stylesheet"),t(c,"href","https://fonts.googleapis.com/css?family=Roboto+Mono"),t(d,"rel","stylesheet"),t(d,"href","https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css"),jl(m.src,k="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js")||t(m,"src",k),t(m,"integrity","sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz"),t(m,"crossorigin","anonymous"),t(p,"href","https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"),t(p,"rel","stylesheet"),t(p,"integrity","sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH"),t(p,"crossorigin","anonymous")},m(b,G){l(document.head,s),l(document.head,u),l(document.head,c),l(document.head,d),l(document.head,m),l(document.head,p),Gl(b,h,G),zl(g,b,G),v=!0},p:Ie,i(b){v||(Il(g.$$.fragment,b),v=!0)},o(b){nn(g.$$.fragment,b),v=!1},d(b){b&&Q(h),Q(s),Q(u),Q(c),Q(d),Q(m),Q(p),Dl(g,b)}}}class hn extends ql{constructor(s){super(),Wl(this,s,null,mn,Fl,{})}}new hn({target:document.getElementById("app")}); diff --git a/assets/index-DBVMGIiB.js b/assets/index-DBVMGIiB.js deleted file mode 100644 index 6dd6396..0000000 --- a/assets/index-DBVMGIiB.js +++ /dev/null @@ -1 +0,0 @@ -var En=Object.defineProperty;var Sn=(l,s,n)=>s in l?En(l,s,{enumerable:!0,configurable:!0,writable:!0,value:n}):l[s]=n;var sl=(l,s,n)=>(Sn(l,typeof s!="symbol"?s+"":s,n),n);(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))a(c);new MutationObserver(c=>{for(const d of c)if(d.type==="childList")for(const h of d.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&a(h)}).observe(document,{childList:!0,subtree:!0});function n(c){const d={};return c.integrity&&(d.integrity=c.integrity),c.referrerPolicy&&(d.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?d.credentials="include":c.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function a(c){if(c.ep)return;c.ep=!0;const d=n(c);fetch(c.href,d)}})();function Ve(){}function _n(l){return l()}function pn(){return Object.create(null)}function Bt(l){l.forEach(_n)}function gn(l){return typeof l=="function"}function yn(l,s){return l!=l?s==s:l!==s||l&&typeof l=="object"||typeof l=="function"}let It;function mn(l,s){return l===s?!0:(It||(It=document.createElement("a")),It.href=s,l===It.href)}function Tn(l){return Object.keys(l).length===0}function t(l,s){l.appendChild(s)}function Cn(l,s,n){l.insertBefore(s,n||null)}function te(l){l.parentNode&&l.parentNode.removeChild(l)}function o(l){return document.createElement(l)}function Ot(l){return document.createTextNode(l)}function r(){return Ot(" ")}function y(l,s,n,a){return l.addEventListener(s,n,a),()=>l.removeEventListener(s,n,a)}function e(l,s,n){n==null?l.removeAttribute(s):l.getAttribute(s)!==n&&l.setAttribute(s,n)}function f(l){return l===""?null:+l}function Pn(l){return Array.from(l.childNodes)}function rl(l,s){s=""+s,l.data!==s&&(l.data=s)}function u(l,s){l.value=s??""}function hn(l,s,n){for(let a=0;al.indexOf(a)===-1?s.push(a):n.push(a)),n.forEach(a=>a()),Ze=s}const Dt=new Set;let In;function Ln(l,s){l&&l.i&&(Dt.delete(l),l.i(s))}function On(l,s,n,a){if(l&&l.o){if(Dt.has(l))return;Dt.add(l),In.c.push(()=>{Dt.delete(l),a&&(n&&l.d(1),a())}),l.o(s)}else a&&a()}function Dn(l){l&&l.c()}function Bn(l,s,n){const{fragment:a,after_update:c}=l.$$;a&&a.m(s,n),zt(()=>{const d=l.$$.on_mount.map(_n).filter(gn);l.$$.on_destroy?l.$$.on_destroy.push(...d):Bt(d),l.$$.on_mount=[]}),c.forEach(zt)}function kn(l,s){const n=l.$$;n.fragment!==null&&(Gn(n.after_update),Bt(n.on_destroy),n.fragment&&n.fragment.d(s),n.on_destroy=n.fragment=null,n.ctx=[])}function zn(l,s){l.$$.dirty[0]===-1&&(Ke.push(l),Fn(),l.$$.dirty.fill(0)),l.$$.dirty[s/31|0]|=1<{const k=P.length?P[0]:b;return m.ctx&&c(m.ctx[v],m.ctx[v]=k)&&(!m.skip_bound&&m.bound[v]&&m.bound[v](k),g&&zn(l,v)),b}):[],m.update(),g=!0,Bt(m.before_update),m.fragment=a?a(m.ctx):!1,s.target){if(s.hydrate){const v=Pn(s.target);m.fragment&&m.fragment.l(v),v.forEach(te)}else m.fragment&&m.fragment.c();s.intro&&Ln(l.$$.fragment),Bn(l,s.target,s.anchor),wn()}wt(p)}class Mn{constructor(){sl(this,"$$");sl(this,"$$set")}$destroy(){kn(this,1),this.$destroy=Ve}$on(s,n){if(!gn(n))return Ve;const a=this.$$.callbacks[s]||(this.$$.callbacks[s]=[]);return a.push(n),()=>{const c=a.indexOf(n);c!==-1&&a.splice(c,1)}}$set(s){this.$$set&&!Tn(s)&&(this.$$.skip_bound=!0,this.$$set(s),this.$$.skip_bound=!1)}}const Wn="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Wn);function qn(l){let s,n,a,c,d,h,T,p,m,g,v,b,P,k,j,Xe,S,ye,U,D,M,F,le,C,A,L,E,z,Y,Je,W,Ce,kt,H,Nt,ne,we,Mt,G,Et,oe,Le,St,I,Tt,Qe,Pt,w,O,Rt,Be,jt,K,se,ke,At,q,Ut,B,R,Me,Z,fl,xe,dl,$e,Ee,et,pl,re,ml,tt,hl,V,Se,lt,bl,ie,vl,Te,nt,_l,ae,gl,Pe,ot,yl,X,Cl,Wt,wl,Re,J,Ll,Q,je,st,Bl,ue,kl,Ae,rt,Nl,ce,Ml,Ue,it,El,fe,Sl,qt,Tl,N,x,Pl,at,Rl,Ne,Fe,ut,jl,de,Al,He,ct,Ul,pe,Fl,ft,Hl,dt,Ge,pt,Gl,me,Il,mt,Ol,$,Ie,ht,Dl,he,zl,Oe,bt,Wl,be,ql,De,vt,Yl,ee,Kl,Yt,Zl,Kt,Zt,Vl,Vt,Xt,Xl,Jt,Jl,Qt,Ql,xt,xl,$t,$l,Ft,en,el,tn,ze,_t,ln,ve,nn,We,gt,on,_e,sn,qe,yt,rn,ge,an,tl,un,Ct,cn,Ht,ll,nl,fn,Gt,ol,dn;return{c(){s=o("div"),n=o("div"),a=o("h2"),a.textContent="5G Link Budget",c=r(),d=o("div"),h=o("button"),h.textContent="Radio Configuration",T=r(),p=o("div"),m=o("div"),g=o("label"),g.textContent="Frequency Tx (MHz):",v=r(),b=o("input"),P=r(),k=o("div"),j=o("label"),j.textContent="RB count:",Xe=r(),S=o("input"),ye=r(),U=o("div"),D=r(),M=o("div"),F=o("label"),F.textContent="Select:",le=r(),C=o("select"),A=o("option"),A.textContent="0 - 15kHz",L=o("option"),L.textContent="1 - 30kHz",E=o("option"),E.textContent="2 - 60kHz",z=o("option"),z.textContent="3 - 120kHz",Y=o("option"),Y.textContent="4 - 240kHz",Je=r(),W=o("div"),Ce=o("label"),Ce.textContent="Numerolgy:",kt=r(),H=o("input"),Nt=r(),ne=o("div"),we=o("label"),we.textContent="Subcarrie Spacing (kHz):",Mt=r(),G=o("input"),Et=r(),oe=o("div"),Le=o("label"),Le.textContent="Thermal Noise:",St=r(),I=o("input"),Tt=r(),Qe=o("div"),Pt=r(),w=o("div"),O=o("button"),O.textContent="NodeB",Rt=r(),Be=o("h6"),Be.textContent="Losses & Gains",jt=r(),K=o("div"),se=o("div"),ke=o("label"),ke.textContent="Tx Cable Loss (dB):",At=r(),q=o("input"),Ut=r(),B=o("div"),R=o("label"),R.textContent="Tx Antenna Gain (dB):",Me=r(),Z=o("input"),fl=r(),xe=o("h6"),xe.textContent="Tx",dl=r(),$e=o("div"),Ee=o("div"),et=o("label"),et.textContent="Tx Power (dBm):",pl=r(),re=o("input"),ml=r(),tt=o("h6"),tt.textContent="Rx",hl=r(),V=o("div"),Se=o("div"),lt=o("label"),lt.textContent="Noise Figure (dB):",bl=r(),ie=o("input"),vl=r(),Te=o("div"),nt=o("label"),nt.textContent="SINR (dB):",_l=r(),ae=o("input"),gl=r(),Pe=o("div"),ot=o("label"),ot.textContent="Receiver Sensitivity:",yl=r(),X=o("input"),Cl=r(),Wt=o("div"),wl=r(),Re=o("div"),J=o("button"),J.textContent="Loss&Margins",Ll=r(),Q=o("div"),je=o("div"),st=o("label"),st.textContent="Interference Margin (dB):",Bl=r(),ue=o("input"),kl=r(),Ae=o("div"),rt=o("label"),rt.textContent="Fading Margin (dB):",Nl=r(),ce=o("input"),Ml=r(),Ue=o("div"),it=o("label"),it.textContent="Penetration Loss (dB):",El=r(),fe=o("input"),Sl=r(),qt=o("div"),Tl=r(),N=o("div"),x=o("button"),x.textContent="UT",Pl=r(),at=o("h6"),at.textContent="Losses & Gains",Rl=r(),Ne=o("div"),Fe=o("div"),ut=o("label"),ut.textContent="Tx Cable Loss (dB):",jl=r(),de=o("input"),Al=r(),He=o("div"),ct=o("label"),ct.textContent="Tx Antenna Gain (dB):",Ul=r(),pe=o("input"),Fl=r(),ft=o("h6"),ft.textContent="Tx",Hl=r(),dt=o("div"),Ge=o("div"),pt=o("label"),pt.textContent="Tx Power (dBm):",Gl=r(),me=o("input"),Il=r(),mt=o("h6"),mt.textContent="Rx",Ol=r(),$=o("div"),Ie=o("div"),ht=o("label"),ht.textContent="Noise Figure (dB):",Dl=r(),he=o("input"),zl=r(),Oe=o("div"),bt=o("label"),bt.textContent="SINR (dB):",Wl=r(),be=o("input"),ql=r(),De=o("div"),vt=o("label"),vt.textContent="Receiver Sensitivity:",Yl=r(),ee=o("input"),Kl=r(),Yt=o("div"),Zl=r(),Kt=o("p"),Zt=Ot(l[23]),Vl=r(),Vt=o("p"),Xt=Ot(l[24]),Xl=r(),Jt=o("div"),Jl=r(),Qt=o("div"),Ql=r(),xt=o("div"),xl=r(),$t=o("div"),$l=r(),Ft=o("div"),Ft.innerHTML="

Results

",en=r(),el=o("div"),tn=r(),ze=o("div"),_t=o("label"),_t.textContent="Cell Radius (m):",ln=r(),ve=o("input"),nn=r(),We=o("div"),gt=o("label"),gt.textContent="Centre frequency Tx (MHz)",on=r(),_e=o("input"),sn=r(),qe=o("div"),yt=o("label"),yt.textContent="Max Path Loss (dB):",rn=r(),ge=o("input"),an=r(),tl=o("div"),un=r(),Ct=o("button"),Ct.textContent="Calculate Link Budget",cn=r(),Ht=o("div"),ll=o("p"),nl=Ot(l[21]),fn=r(),Gt=o("div"),Gt.innerHTML='',e(h,"class","btn btn-outline-secondary custom-height col-3 svelte-l5y9p7"),e(h,"type","button"),e(h,"data-bs-toggle","collapse"),e(h,"data-bs-target","#channel"),e(h,"aria-expanded","false"),e(h,"aria-controls","collapseExample"),e(g,"for","centerFrequency"),e(g,"class","form-label"),e(b,"type","number"),e(b,"class","form-control"),e(m,"class","col-3"),e(j,"for","noRBs"),e(j,"class","form-label"),e(S,"type","number"),e(S,"class","form-control"),e(k,"class","col-3"),e(U,"class","col-6"),e(F,"for","numerology"),e(F,"class","form-label"),A.__value="0",u(A,A.__value),L.__value="1",u(L,L.__value),E.__value="2",u(E,E.__value),z.__value="3",u(z,z.__value),Y.__value="3",u(Y,Y.__value),e(C,"class","form-select col-3"),e(C,"aria-label","Default select example"),l[19]===void 0&&zt(()=>l[30].call(C)),e(M,"class","col-3"),e(Ce,"for","numerology"),e(Ce,"class","form-label"),e(H,"type","number"),e(H,"class","form-control"),H.disabled=!0,e(W,"class","col-3"),e(we,"for","subCarrierSpacing"),e(we,"class","form-label"),e(G,"type","number"),e(G,"class","form-control"),G.disabled=!0,e(ne,"class","col-3"),e(Le,"for","thermalNoise"),e(Le,"class","form-label"),e(I,"type","number"),e(I,"class","form-control"),I.disabled=!0,e(oe,"class","col-3"),e(p,"class","row collapse"),e(p,"id","channel"),e(d,"class","row"),e(Qe,"class","w-100 mb-3"),e(O,"class","btn btn-outline-secondary custom-height col-3 svelte-l5y9p7"),e(O,"type","button"),e(O,"data-bs-toggle","collapse"),e(O,"data-bs-target","#nodeB"),e(O,"aria-expanded","false"),e(O,"aria-controls","collapseExample"),e(Be,"class","collapse"),e(Be,"id","nodeB"),e(ke,"for","transmitCableLoss"),e(ke,"class","form-label"),e(q,"type","number"),e(q,"class","form-control"),e(se,"class","col-3"),e(R,"for","transmitterGain"),e(R,"class","form-label"),e(Z,"type","number"),e(Z,"class","form-control"),e(B,"class","col-3"),e(K,"class","row collapse"),e(K,"id","nodeB"),e(xe,"class","collapse"),e(xe,"id","nodeB"),e(et,"for","transmitPower"),e(et,"class","form-label"),e(re,"type","number"),e(re,"class","form-control"),e(Ee,"class","col-3"),e($e,"class","row collapse"),e($e,"id","nodeB"),e(tt,"class","collapse"),e(tt,"id","nodeB"),e(lt,"for","noiseFigureNodeB"),e(lt,"class","form-label"),e(ie,"type","number"),e(ie,"class","form-control"),e(Se,"class","col-3"),e(nt,"for","sinrNodeB"),e(nt,"class","form-label"),e(ae,"type","number"),e(ae,"class","form-control"),e(Te,"class","col-3"),e(ot,"for","rxSensitivityNodeB"),e(ot,"class","form-label"),e(X,"type","number"),e(X,"class","form-control"),X.disabled=!0,e(Pe,"class","col-3"),e(V,"class","row collapse"),e(V,"id","nodeB"),e(w,"class","row"),e(Wt,"class","w-100 mb-3"),e(J,"class","btn btn-outline-secondary custom-height col-3 svelte-l5y9p7"),e(J,"type","button"),e(J,"data-bs-toggle","collapse"),e(J,"data-bs-target","#losses"),e(J,"aria-expanded","false"),e(J,"aria-controls","collapseExample"),e(st,"for","interferenceMargin"),e(st,"class","form-label"),e(ue,"type","number"),e(ue,"class","form-control"),e(je,"class","col-3"),e(rt,"for","fadingMargin"),e(rt,"class","form-label"),e(ce,"type","number"),e(ce,"class","form-control"),e(Ae,"class","col-3"),e(it,"for","penetrationLoss"),e(it,"class","form-label"),e(fe,"type","number"),e(fe,"class","form-control"),e(Ue,"class","col-3"),e(Q,"class","row collapse"),e(Q,"id","losses"),e(Re,"class","row"),e(qt,"class","w-100 mb-3"),e(x,"class","btn btn-outline-secondary custom-height col-3 svelte-l5y9p7"),e(x,"type","button"),e(x,"data-bs-toggle","collapse"),e(x,"data-bs-target","#ueconf"),e(x,"aria-expanded","false"),e(x,"aria-controls","collapseExample"),e(at,"class","collapse"),e(at,"id","ueconf"),e(ut,"for","transmitCableLoss"),e(ut,"class","form-label"),e(de,"type","number"),e(de,"class","form-control"),e(Fe,"class","col-3"),e(ct,"for","transmitterGain"),e(ct,"class","form-label"),e(pe,"type","number"),e(pe,"class","form-control"),e(He,"class","col-3"),e(Ne,"class","row collapse"),e(Ne,"id","ueconf"),e(ft,"class","collapse"),e(ft,"id","ueconf"),e(pt,"for","transmitPowerUT"),e(pt,"class","form-label"),e(me,"type","number"),e(me,"class","form-control"),e(Ge,"class","col-3"),e(dt,"class","row collapse"),e(dt,"id","ueconf"),e(mt,"class","collapse"),e(mt,"id","ueconf"),e(ht,"for","noiseFigureUE"),e(ht,"class","form-label"),e(he,"type","number"),e(he,"class","form-control"),e(Ie,"class","col-3"),e(bt,"for","sinrUE"),e(bt,"class","form-label"),e(be,"type","number"),e(be,"class","form-control"),e(Oe,"class","col-3"),e(vt,"for","rxSensitivityUE"),e(vt,"class","form-label"),e(ee,"type","number"),e(ee,"class","form-control"),ee.disabled=!0,e(De,"class","col-3"),e($,"class","row collapse"),e($,"id","ueconf"),e(N,"class","row"),e(Yt,"class","w-100 mb-3"),e(Jt,"class","w-100 mb-3"),e(Qt,"class","col"),e(xt,"class","col"),e($t,"class","w-100 mb-3"),e(Ft,"class","col-3"),e(el,"class","w-100 mb-3"),e(_t,"for","cellradius"),e(_t,"class","form-label"),e(ve,"type","number"),e(ve,"class","form-control"),e(ze,"class","col-3"),e(gt,"for","cftx"),e(gt,"class","form-label"),e(_e,"type","number"),e(_e,"class","form-control"),e(We,"class","col-3"),e(yt,"for","pathLoss"),e(yt,"class","form-label"),e(ge,"type","number"),e(ge,"class","form-control"),e(qe,"class","col-3"),e(n,"class","row"),e(tl,"class","row"),e(Ct,"class","btn btn-primary mt-3"),e(Ht,"class","result svelte-l5y9p7"),e(Gt,"class","chart-container svelte-l5y9p7"),e(s,"class","container")},m(i,_){Cn(i,s,_),t(s,n),t(n,a),t(n,c),t(n,d),t(d,h),t(d,T),t(d,p),t(p,m),t(m,g),t(m,v),t(m,b),u(b,l[12]),t(p,P),t(p,k),t(k,j),t(k,Xe),t(k,S),u(S,l[13]),t(p,ye),t(p,U),t(p,D),t(p,M),t(M,F),t(M,le),t(M,C),t(C,A),t(C,L),t(C,E),t(C,z),t(C,Y),hn(C,l[19],!0),t(p,Je),t(p,W),t(W,Ce),t(W,kt),t(W,H),u(H,l[19]),t(p,Nt),t(p,ne),t(ne,we),t(ne,Mt),t(ne,G),u(G,l[20]),t(p,Et),t(p,oe),t(oe,Le),t(oe,St),t(oe,I),u(I,l[14]),t(n,Tt),t(n,Qe),t(n,Pt),t(n,w),t(w,O),t(w,Rt),t(w,Be),t(w,jt),t(w,K),t(K,se),t(se,ke),t(se,At),t(se,q),u(q,l[1]),t(K,Ut),t(K,B),t(B,R),t(B,Me),t(B,Z),u(Z,l[2]),t(w,fl),t(w,xe),t(w,dl),t(w,$e),t($e,Ee),t(Ee,et),t(Ee,pl),t(Ee,re),u(re,l[0]),t(w,ml),t(w,tt),t(w,hl),t(w,V),t(V,Se),t(Se,lt),t(Se,bl),t(Se,ie),u(ie,l[17]),t(V,vl),t(V,Te),t(Te,nt),t(Te,_l),t(Te,ae),u(ae,l[15]),t(V,gl),t(V,Pe),t(Pe,ot),t(Pe,yl),t(Pe,X),u(X,l[10]),t(n,Cl),t(n,Wt),t(n,wl),t(n,Re),t(Re,J),t(Re,Ll),t(Re,Q),t(Q,je),t(je,st),t(je,Bl),t(je,ue),u(ue,l[7]),t(Q,kl),t(Q,Ae),t(Ae,rt),t(Ae,Nl),t(Ae,ce),u(ce,l[8]),t(Q,Ml),t(Q,Ue),t(Ue,it),t(Ue,El),t(Ue,fe),u(fe,l[9]),t(n,Sl),t(n,qt),t(n,Tl),t(n,N),t(N,x),t(N,Pl),t(N,at),t(N,Rl),t(N,Ne),t(Ne,Fe),t(Fe,ut),t(Fe,jl),t(Fe,de),u(de,l[4]),t(Ne,Al),t(Ne,He),t(He,ct),t(He,Ul),t(He,pe),u(pe,l[5]),t(N,Fl),t(N,ft),t(N,Hl),t(N,dt),t(dt,Ge),t(Ge,pt),t(Ge,Gl),t(Ge,me),u(me,l[3]),t(N,Il),t(N,mt),t(N,Ol),t(N,$),t($,Ie),t(Ie,ht),t(Ie,Dl),t(Ie,he),u(he,l[18]),t($,zl),t($,Oe),t(Oe,bt),t(Oe,Wl),t(Oe,be),u(be,l[16]),t($,ql),t($,De),t(De,vt),t(De,Yl),t(De,ee),u(ee,l[11]),t(n,Kl),t(n,Yt),t(n,Zl),t(n,Kt),t(Kt,Zt),t(n,Vl),t(n,Vt),t(Vt,Xt),t(n,Xl),t(n,Jt),t(n,Jl),t(n,Qt),t(n,Ql),t(n,xt),t(n,xl),t(n,$t),t(n,$l),t(n,Ft),t(n,en),t(n,el),t(n,tn),t(n,ze),t(ze,_t),t(ze,ln),t(ze,ve),u(ve,l[22]),t(n,nn),t(n,We),t(We,gt),t(We,on),t(We,_e),u(_e,l[12]),t(n,sn),t(n,qe),t(qe,yt),t(qe,rn),t(qe,ge),u(ge,l[6]),t(s,an),t(s,tl),t(s,un),t(s,Ct),t(s,cn),t(s,Ht),t(Ht,ll),t(ll,nl),t(s,fn),t(s,Gt),ol||(dn=[y(b,"input",l[28]),y(S,"input",l[29]),y(C,"change",l[30]),y(H,"input",l[31]),y(G,"input",l[32]),y(I,"input",l[33]),y(q,"input",l[34]),y(Z,"input",l[35]),y(re,"input",l[36]),y(ie,"input",l[37]),y(ae,"input",l[38]),y(X,"input",l[39]),y(ue,"input",l[40]),y(ce,"input",l[41]),y(fe,"input",l[42]),y(de,"input",l[43]),y(pe,"input",l[44]),y(me,"input",l[45]),y(he,"input",l[46]),y(be,"input",l[47]),y(ee,"input",l[48]),y(ve,"input",l[49]),y(_e,"input",l[50]),y(ge,"input",l[51]),y(Ct,"click",l[25])],ol=!0)},p(i,_){_[0]&4096&&f(b.value)!==i[12]&&u(b,i[12]),_[0]&8192&&f(S.value)!==i[13]&&u(S,i[13]),_[0]&524288&&hn(C,i[19]),_[0]&524288&&f(H.value)!==i[19]&&u(H,i[19]),_[0]&1048576&&f(G.value)!==i[20]&&u(G,i[20]),_[0]&16384&&f(I.value)!==i[14]&&u(I,i[14]),_[0]&2&&f(q.value)!==i[1]&&u(q,i[1]),_[0]&4&&f(Z.value)!==i[2]&&u(Z,i[2]),_[0]&1&&f(re.value)!==i[0]&&u(re,i[0]),_[0]&131072&&f(ie.value)!==i[17]&&u(ie,i[17]),_[0]&32768&&f(ae.value)!==i[15]&&u(ae,i[15]),_[0]&1024&&f(X.value)!==i[10]&&u(X,i[10]),_[0]&128&&f(ue.value)!==i[7]&&u(ue,i[7]),_[0]&256&&f(ce.value)!==i[8]&&u(ce,i[8]),_[0]&512&&f(fe.value)!==i[9]&&u(fe,i[9]),_[0]&16&&f(de.value)!==i[4]&&u(de,i[4]),_[0]&32&&f(pe.value)!==i[5]&&u(pe,i[5]),_[0]&8&&f(me.value)!==i[3]&&u(me,i[3]),_[0]&262144&&f(he.value)!==i[18]&&u(he,i[18]),_[0]&65536&&f(be.value)!==i[16]&&u(be,i[16]),_[0]&2048&&f(ee.value)!==i[11]&&u(ee,i[11]),_[0]&8388608&&rl(Zt,i[23]),_[0]&16777216&&rl(Xt,i[24]),_[0]&4194304&&f(ve.value)!==i[22]&&u(ve,i[22]),_[0]&4096&&f(_e.value)!==i[12]&&u(_e,i[12]),_[0]&64&&f(ge.value)!==i[6]&&u(ge,i[6]),_[0]&2097152&&rl(nl,i[21])},i:Ve,o:Ve,d(i){i&&te(s),ol=!1,Bt(dn)}}}let al=10,ul=2;function Yn(l,s){return Math.round(l*Math.pow(10,s))/Math.pow(10,s)}function Kn(l,s,n){let a=20,c=2,d=15,h=23,T=0,p=0,m=100,g=10,v=6,b=15,P=-100,k=-100,j=-100,Xe="",S=null,ye=500,U=3600,D=1,M=0,F=-6,le=-6,C=4,A=10,L="1",E=0,z=0,Y="",Je="",W=0;function Ce(B,R,Me){return Math.pow(10,(B-13.54-20*Math.log10(R/1e3)+.6*(Me-1.5))/39.08)}const kt=()=>{const B=a+d+al-m-c-ul-b+v-g-P;if(n(21,Xe=`Calculated Link Budget: ${B.toFixed(2)} dBm`),!S){const R=document.getElementById("pathLossChart").getContext("2d");S=new Chart(R,{type:"bar",data:{labels:[],datasets:[{label:"Link Budget Components (dBm)",data:[],backgroundColor:["rgba(54, 162, 235, 0.2)"],borderColor:["rgba(54, 162, 235, 1)"],borderWidth:1}]},options:{scales:{y:{beginAtZero:!0}}}})}H([{name:"Transmit Power",value:a},{name:"Transmit Cable Loss",value:-c},{name:"Transmitter Gain",value:d},{name:"Path Loss",value:-m},{name:"Fading Margin",value:v},{name:"Interference Margin",value:-g},{name:"Penetration Loss",value:-b},{name:"Receiver Gain",value:al},{name:"Receive Cable Loss",value:-ul}])};An(()=>{"serviceWorker"in navigator&&navigator.serviceWorker.register("/service-worker.js").then(B=>console.log("Service Worker registered",B)).catch(B=>console.log("Service Worker registration failed:",B))});function H(B){S.data.labels=B.map(R=>R.name),S.data.datasets.forEach(R=>{R.data=B.map(Me=>Me.value)}),S.update()}function Nt(){U=f(this.value),n(12,U)}function ne(){D=f(this.value),n(13,D)}function we(){L=Rn(this),n(19,L)}function Mt(){L=f(this.value),n(19,L)}function G(){E=f(this.value),n(20,E),n(19,L)}function Et(){M=f(this.value),n(14,M),n(20,E),n(13,D),n(19,L)}function oe(){c=f(this.value),n(1,c)}function Le(){d=f(this.value),n(2,d)}function St(){a=f(this.value),n(0,a)}function I(){C=f(this.value),n(17,C)}function Tt(){F=f(this.value),n(15,F)}function Qe(){k=f(this.value),n(10,k),n(14,M),n(15,F),n(17,C),n(20,E),n(13,D),n(19,L)}function Pt(){g=f(this.value),n(7,g)}function w(){v=f(this.value),n(8,v)}function O(){b=f(this.value),n(9,b)}function Rt(){T=f(this.value),n(4,T)}function Be(){p=f(this.value),n(5,p)}function jt(){h=f(this.value),n(3,h)}function K(){A=f(this.value),n(18,A)}function se(){le=f(this.value),n(16,le)}function ke(){j=f(this.value),n(11,j),n(14,M),n(16,le),n(18,A),n(20,E),n(13,D),n(19,L)}function At(){ye=f(this.value),n(22,ye),n(6,m),n(12,U),n(0,a),n(1,c),n(2,d),n(7,g),n(8,v),n(9,b),n(53,P)}function q(){U=f(this.value),n(12,U)}function Ut(){m=f(this.value),n(6,m),n(0,a),n(1,c),n(2,d),n(7,g),n(8,v),n(9,b),n(53,P)}return l.$$.update=()=>{l.$$.dirty[0]&524288&&n(20,E=15*Math.pow(2,L)),l.$$.dirty[0]&903&&n(6,m=a-c+d-g-v-b+al-ul-P),l.$$.dirty[0]&4160&&n(22,ye=Ce(m,U,1.5)),l.$$.dirty[0]&1056768&&n(14,M=Yn(-174+10*Math.log10(E*1e3*12*D),2)),l.$$.dirty[0]&180224&&n(10,k=M+F+C),l.$$.dirty[0]&344064&&n(11,j=M+le+A),l.$$.dirty[0]&2439&&n(26,z=a-c+d-v-g-j),l.$$.dirty[0]&67111303&&n(23,Y=`MAPL DL = ${a} - ${c} + ${d} - ${v} - ${g} - ${j} = ${z}`),l.$$.dirty[0]&1464&&n(27,W=h-T+p-v-g-k),l.$$.dirty[0]&134219192&&n(24,Je=`MAPL UL = ${h} - ${T} + ${p} - ${v} - ${g} - ${k} = ${W}`)},[a,c,d,h,T,p,m,g,v,b,k,j,U,D,M,F,le,C,A,L,E,Xe,ye,Y,Je,kt,z,W,Nt,ne,we,Mt,G,Et,oe,Le,St,I,Tt,Qe,Pt,w,O,Rt,Be,jt,K,se,ke,At,q,Ut]}class Zn extends Mn{constructor(s){super(),Nn(this,s,Kn,qn,yn,{},null,[-1,-1])}}function Vn(l){let s,n,a,c,d,h,T,p,m,g,v;return g=new Zn({}),{c(){s=o("script"),s.innerHTML="",a=o("link"),c=o("link"),d=o("link"),h=o("script"),h.innerHTML="",p=o("link"),m=r(),Dn(g.$$.fragment),document.title="Link Budget App",mn(s.src,n="https://cdn.jsdelivr.net/npm/chart.js")||e(s,"src",n),e(a,"rel","stylesheet"),e(a,"href","https://fonts.googleapis.com/css?family=Roboto:300,400,500,600,700"),e(c,"rel","stylesheet"),e(c,"href","https://fonts.googleapis.com/css?family=Roboto+Mono"),e(d,"rel","stylesheet"),e(d,"href","https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css"),mn(h.src,T="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js")||e(h,"src",T),e(h,"integrity","sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz"),e(h,"crossorigin","anonymous"),e(p,"href","https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"),e(p,"rel","stylesheet"),e(p,"integrity","sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH"),e(p,"crossorigin","anonymous")},m(b,P){t(document.head,s),t(document.head,a),t(document.head,c),t(document.head,d),t(document.head,h),t(document.head,p),Cn(b,m,P),Bn(g,b,P),v=!0},p:Ve,i(b){v||(Ln(g.$$.fragment,b),v=!0)},o(b){On(g.$$.fragment,b),v=!1},d(b){b&&te(m),te(s),te(a),te(c),te(d),te(h),te(p),kn(g,b)}}}class Xn extends Mn{constructor(s){super(),Nn(this,s,null,Vn,yn,{})}}new Xn({target:document.getElementById("app")}); diff --git a/assets/index-Bs3T3l0-.css b/assets/index-DRsP-b0T.css similarity index 84% rename from assets/index-Bs3T3l0-.css rename to assets/index-DRsP-b0T.css index 5cda341..702df08 100644 --- a/assets/index-Bs3T3l0-.css +++ b/assets/index-DRsP-b0T.css @@ -1 +1 @@ -:root{font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;display:flex;place-items:center;min-width:320px;min-height:100vh}h1{font-size:3.2em;line-height:1.1}.card{padding:2em}#app{max-width:1280px;margin:0 auto;padding:2rem;text-align:center}button{border-radius:8px;border:1px solid transparent;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;background-color:#1a1a1a;cursor:pointer;transition:border-color .25s}button:hover{border-color:#646cff}button:focus,button:focus-visible{outline:4px auto -webkit-focus-ring-color}@media (prefers-color-scheme: light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}button{background-color:#f9f9f9}}.result.svelte-l5y9p7,.chart-container.svelte-l5y9p7{margin-top:20px}.custom-height.svelte-l5y9p7{padding:0 15px;font-size:16px} +:root{font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;display:flex;place-items:center;min-width:320px;min-height:100vh}h1{font-size:3.2em;line-height:1.1}.card{padding:2em}#app{max-width:1280px;margin:0 auto;padding:2rem;text-align:center}button{border-radius:8px;border:1px solid transparent;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;background-color:#1a1a1a;cursor:pointer;transition:border-color .25s}button:hover{border-color:#646cff}button:focus,button:focus-visible{outline:4px auto -webkit-focus-ring-color}@media (prefers-color-scheme: light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}button{background-color:#f9f9f9}}.custom-height.svelte-l5y9p7{padding:0 15px;font-size:16px} diff --git a/index.html b/index.html index c163a08..b5b0c85 100644 --- a/index.html +++ b/index.html @@ -5,8 +5,8 @@ Vite + Svelte - - + +
diff --git a/sw.js b/sw.js index d1c6ddf..b0b9dcc 100644 --- a/sw.js +++ b/sw.js @@ -1 +1 @@ -if(!self.define){let e,i={};const s=(s,n)=>(s=new URL(s+".js",n).href,i[s]||new Promise((i=>{if("document"in self){const e=document.createElement("script");e.src=s,e.onload=i,document.head.appendChild(e)}else e=s,importScripts(s),i()})).then((()=>{let e=i[s];if(!e)throw new Error(`Module ${s} didn’t register its module`);return e})));self.define=(n,r)=>{const t=e||("document"in self?document.currentScript.src:"")||location.href;if(i[t])return;let c={};const o=e=>s(e,t),d={module:{uri:t},exports:c,require:o};i[t]=Promise.all(n.map((e=>d[e]||o(e)))).then((e=>(r(...e),c)))}}define(["./workbox-3e911b1d"],(function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"assets/index-Bs3T3l0-.css",revision:null},{url:"assets/index-DBVMGIiB.js",revision:null},{url:"index.html",revision:"ba923d497334f13ba33c7dd2369f9bdd"},{url:"registerSW.js",revision:"81c3067ca1c42492cf81dd05c4e6248a"},{url:"pwa-192x192.png",revision:"c4bcf67a56c4f86fe241b0785cc07d47"},{url:"pwa-512x512.png",revision:"60cd82ac7adf05d6f59e12db6ce51187"},{url:"manifest.webmanifest",revision:"e482db92ea0b376b600b2c2b587c35a7"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))})); +if(!self.define){let e,i={};const s=(s,n)=>(s=new URL(s+".js",n).href,i[s]||new Promise((i=>{if("document"in self){const e=document.createElement("script");e.src=s,e.onload=i,document.head.appendChild(e)}else e=s,importScripts(s),i()})).then((()=>{let e=i[s];if(!e)throw new Error(`Module ${s} didn’t register its module`);return e})));self.define=(n,r)=>{const t=e||("document"in self?document.currentScript.src:"")||location.href;if(i[t])return;let c={};const o=e=>s(e,t),l={module:{uri:t},exports:c,require:o};i[t]=Promise.all(n.map((e=>l[e]||o(e)))).then((e=>(r(...e),c)))}}define(["./workbox-3e911b1d"],(function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"assets/index-CI34HjPG.js",revision:null},{url:"assets/index-DRsP-b0T.css",revision:null},{url:"index.html",revision:"fc61402082ae26ea39ae3345eb08e828"},{url:"registerSW.js",revision:"81c3067ca1c42492cf81dd05c4e6248a"},{url:"pwa-192x192.png",revision:"c4bcf67a56c4f86fe241b0785cc07d47"},{url:"pwa-512x512.png",revision:"60cd82ac7adf05d6f59e12db6ce51187"},{url:"manifest.webmanifest",revision:"e482db92ea0b376b600b2c2b587c35a7"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))}));