makearmy-app/.next/server/app/laser-toolkit/beam-spot-size/page.js
2025-09-22 10:37:53 -04:00

1 line
No EOL
8.4 KiB
JavaScript

(()=>{var e={};e.id=7542,e.ids=[7542],e.modules={3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:e=>{"use strict";e.exports=require("next/dist/server/app-render/action-async-storage.external.js")},23032:(e,t,s)=>{"use strict";s.d(t,{A:()=>i});var r=s(60687),a=s(85814),n=s.n(a);function i({title:e,subtitle:t,children:s}){return(0,r.jsxs)("div",{className:"mx-auto max-w-4xl px-4 py-8 space-y-6",children:[(0,r.jsxs)("header",{className:"flex items-start justify-between gap-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h1",{className:"text-2xl font-semibold",children:e}),t&&(0,r.jsx)("p",{className:"text-sm text-muted-foreground mt-1",children:t})]}),(0,r.jsx)(n(),{href:"https://makearmy.io",className:"rounded-lg px-3 py-2 border hover:bg-muted transition-colors text-sm",children:"Back to Main Menu"})]}),s]})}},29294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},29808:(e,t,s)=>{"use strict";s.r(t),s.d(t,{GlobalError:()=>i.a,__next_app__:()=>c,pages:()=>m,routeModule:()=>x,tree:()=>d});var r=s(65239),a=s(48088),n=s(88170),i=s.n(n),o=s(30893),l={};for(let e in o)0>["default","tree","pages","GlobalError","__next_app__","routeModule"].indexOf(e)&&(l[e]=()=>o[e]);s.d(t,l);let d={children:["",{children:["laser-toolkit",{children:["beam-spot-size",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(s.bind(s,47405)),"/app/app/laser-toolkit/beam-spot-size/page.tsx"]}]},{}]},{}]},{layout:[()=>Promise.resolve().then(s.bind(s,58014)),"/app/app/layout.tsx"],"not-found":[()=>Promise.resolve().then(s.t.bind(s,57398,23)),"next/dist/client/components/not-found-error"],forbidden:[()=>Promise.resolve().then(s.t.bind(s,89999,23)),"next/dist/client/components/forbidden-error"],unauthorized:[()=>Promise.resolve().then(s.t.bind(s,65284,23)),"next/dist/client/components/unauthorized-error"]}]}.children,m=["/app/app/laser-toolkit/beam-spot-size/page.tsx"],c={require:s,loadChunk:()=>Promise.resolve()},x=new r.AppPageRouteModule({definition:{kind:a.RouteKind.APP_PAGE,page:"/laser-toolkit/beam-spot-size/page",pathname:"/laser-toolkit/beam-spot-size",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:d}})},33873:e=>{"use strict";e.exports=require("path")},36319:()=>{},38707:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d});var r=s(60687),a=s(43210),n=s(23032),i=s(55192),o=s(68988);function l(e){let t=parseFloat(e);return Number.isFinite(t)?t:0}function d(){let[e,t]=(0,a.useState)("1064"),[s,d]=(0,a.useState)("160"),[m,c]=(0,a.useState)("6"),[x,u]=(0,a.useState)("1.3"),p=(0,a.useMemo)(()=>{let t=l(e)/1e3,r=l(s),a=l(m),n=Math.max(1,l(x));return t<=0||r<=0||a<=0?0:1.27*n*t*(r/a)},[e,s,m,x]),h=p/1e3;return(0,r.jsxs)(n.A,{title:"Beam Spot Size",children:[(0,r.jsxs)(i.Zp,{children:[(0,r.jsx)(i.aR,{children:(0,r.jsx)(i.ZB,{className:"text-base",children:"Inputs"})}),(0,r.jsxs)(i.Wu,{className:"grid gap-3 sm:grid-cols-4",children:[(0,r.jsxs)("label",{className:"text-[11px] sm:text-xs",children:[(0,r.jsx)("div",{className:"mb-1 text-muted-foreground",children:"Wavelength (nm)"}),(0,r.jsx)(o.p,{value:e,onChange:e=>t(e.target.value)}),(0,r.jsxs)("div",{className:"mt-1 text-[11px] text-muted-foreground space-x-2",children:[(0,r.jsx)("button",{type:"button",className:"underline",onClick:()=>t("1064"),children:"Fiber (1064 nm)"}),(0,r.jsx)("button",{type:"button",className:"underline",onClick:()=>t("10600"),children:"CO₂ (10600 nm)"})]})]}),(0,r.jsxs)("label",{className:"text-[11px] sm:text-xs",children:[(0,r.jsx)("div",{className:"mb-1 text-muted-foreground",children:"Focal length (mm)"}),(0,r.jsx)(o.p,{value:s,onChange:e=>d(e.target.value)})]}),(0,r.jsxs)("label",{className:"text-[11px] sm:text-xs",children:[(0,r.jsx)("div",{className:"mb-1 text-muted-foreground",children:"Beam \xd8 @ lens (mm)"}),(0,r.jsx)(o.p,{value:m,onChange:e=>c(e.target.value)})]}),(0,r.jsxs)("label",{className:"text-[11px] sm:text-xs",children:[(0,r.jsx)("div",{className:"mb-1 text-muted-foreground",children:"M\xb2"}),(0,r.jsx)(o.p,{value:x,onChange:e=>u(e.target.value)})]})]})]}),(0,r.jsxs)(i.Zp,{className:"mt-4",children:[(0,r.jsx)(i.aR,{children:(0,r.jsx)(i.ZB,{className:"text-base",children:"Result"})}),(0,r.jsxs)(i.Wu,{className:"grid gap-3 sm:grid-cols-2",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-sm text-muted-foreground",children:"Spot diameter"}),(0,r.jsxs)("div",{className:"text-lg",children:[h.toFixed(4)," mm"]}),(0,r.jsxs)("div",{className:"text-xs text-muted-foreground",children:[p.toFixed(2)," \xb5m"]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-sm text-muted-foreground",children:"Spot radius"}),(0,r.jsxs)("div",{className:"text-lg",children:[(h/2).toFixed(4)," mm"]}),(0,r.jsxs)("div",{className:"text-xs text-muted-foreground",children:[(p/2).toFixed(2)," \xb5m"]})]})]})]})]})}},47405:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});let r=(0,s(12907).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/app/app/laser-toolkit/beam-spot-size/page.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/app/app/laser-toolkit/beam-spot-size/page.tsx","default")},55192:(e,t,s)=>{"use strict";s.d(t,{Wu:()=>d,ZB:()=>l,Zp:()=>i,aR:()=>o});var r=s(60687),a=s(43210),n=s(96241);let i=a.forwardRef(({className:e,...t},s)=>(0,r.jsx)("div",{ref:s,className:(0,n.cn)("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));i.displayName="Card";let o=a.forwardRef(({className:e,...t},s)=>(0,r.jsx)("div",{ref:s,className:(0,n.cn)("flex flex-col space-y-1.5 p-6",e),...t}));o.displayName="CardHeader";let l=a.forwardRef(({className:e,...t},s)=>(0,r.jsx)("div",{ref:s,className:(0,n.cn)("text-2xl font-semibold leading-none tracking-tight",e),...t}));l.displayName="CardTitle",a.forwardRef(({className:e,...t},s)=>(0,r.jsx)("div",{ref:s,className:(0,n.cn)("text-sm text-muted-foreground",e),...t})).displayName="CardDescription";let d=a.forwardRef(({className:e,...t},s)=>(0,r.jsx)("div",{ref:s,className:(0,n.cn)("p-6 pt-0",e),...t}));d.displayName="CardContent",a.forwardRef(({className:e,...t},s)=>(0,r.jsx)("div",{ref:s,className:(0,n.cn)("flex items-center p-6 pt-0",e),...t})).displayName="CardFooter"},56444:(e,t,s)=>{Promise.resolve().then(s.t.bind(s,16444,23)),Promise.resolve().then(s.t.bind(s,16042,23)),Promise.resolve().then(s.t.bind(s,88170,23)),Promise.resolve().then(s.t.bind(s,49477,23)),Promise.resolve().then(s.t.bind(s,29345,23)),Promise.resolve().then(s.t.bind(s,12089,23)),Promise.resolve().then(s.t.bind(s,46577,23)),Promise.resolve().then(s.t.bind(s,31307,23))},58014:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>n,metadata:()=>a});var r=s(37413);s(90061);let a={title:"LE-DB",description:"Laser Everything Community Database"};function n({children:e}){return(0,r.jsx)("html",{lang:"en",className:"dark",children:(0,r.jsx)("body",{children:e})})}},63033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},66172:(e,t,s)=>{Promise.resolve().then(s.t.bind(s,86346,23)),Promise.resolve().then(s.t.bind(s,27924,23)),Promise.resolve().then(s.t.bind(s,35656,23)),Promise.resolve().then(s.t.bind(s,40099,23)),Promise.resolve().then(s.t.bind(s,38243,23)),Promise.resolve().then(s.t.bind(s,28827,23)),Promise.resolve().then(s.t.bind(s,62763,23)),Promise.resolve().then(s.t.bind(s,97173,23))},68988:(e,t,s)=>{"use strict";s.d(t,{p:()=>i});var r=s(60687),a=s(43210),n=s(96241);let i=a.forwardRef(({className:e,type:t="text",...s},a)=>(0,r.jsx)("input",{type:t,className:(0,n.cn)("flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm","shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium","placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring","disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,...s}));i.displayName="Input"},71781:(e,t,s)=>{Promise.resolve().then(s.bind(s,38707))},77861:(e,t,s)=>{Promise.resolve().then(s.bind(s,47405))},90061:()=>{},96241:(e,t,s)=>{"use strict";s.d(t,{cn:()=>n});var r=s(49384),a=s(82348);function n(...e){return(0,a.QP)((0,r.$)(e))}},96999:()=>{}};var t=require("../../../webpack-runtime.js");t.C(e);var s=e=>t(t.s=e),r=t.X(0,[7719,4825,5814,9069],()=>s(29808));module.exports=r})();