makearmy-app/.next/server/app/laser-toolkit/dpi-lpi-dpcm/page.js

1 line
8.2 KiB
JavaScript
Raw Normal View History

2025-09-22 10:37:53 -04:00
(()=>{var e={};e.id=5298,e.ids=[5298],e.modules={1127:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>l});var r=s(60687),i=s(43210),a=s(23032),d=s(55192),n=s(68988);function o(e){let t=parseFloat(e);return Number.isFinite(t)?t:0}function l(){let[e,t]=(0,i.useState)("300"),[s,l]=(0,i.useState)("300"),[c,m]=(0,i.useState)("118.11"),[p,x]=(0,i.useState)("dpi"),u=25.4/Math.max(1e-9,o(e)),h=25.4/Math.max(1e-9,o(s));return(0,r.jsxs)(a.A,{title:"DPI / LPI / DPCM Converter",children:[(0,r.jsxs)(d.Zp,{children:[(0,r.jsx)(d.aR,{children:(0,r.jsx)(d.ZB,{className:"text-base",children:"Values"})}),(0,r.jsxs)(d.Wu,{className:"grid gap-3 sm:grid-cols-3",children:[(0,r.jsxs)("label",{className:"text-[11px] sm:text-xs",children:[(0,r.jsx)("div",{className:"mb-1 text-muted-foreground",children:"DPI"}),(0,r.jsx)(n.p,{inputMode:"decimal",value:e,onChange:e=>{x("dpi"),t(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:"LPI"}),(0,r.jsx)(n.p,{inputMode:"decimal",value:s,onChange:e=>{x("lpi"),l(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:"DPCM"}),(0,r.jsx)(n.p,{inputMode:"decimal",value:c,onChange:e=>{x("dpcm"),m(e.target.value)}})]})]})]}),(0,r.jsxs)(d.Zp,{className:"mt-4",children:[(0,r.jsx)(d.aR,{children:(0,r.jsx)(d.ZB,{className:"text-base",children:"Derived spacing"})}),(0,r.jsxs)(d.Wu,{className:"grid gap-3 sm:grid-cols-3",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-sm text-muted-foreground",children:"Pixel/line gap from DPI"}),(0,r.jsxs)("div",{className:"text-lg",children:[u.toFixed(4)," mm"]}),(0,r.jsxs)("div",{className:"text-xs text-muted-foreground",children:[(1e3*u).toFixed(1)," \xb5m"]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-sm text-muted-foreground",children:"Line gap from LPI"}),(0,r.jsxs)("div",{className:"text-lg",children:[h.toFixed(4)," mm"]}),(0,r.jsxs)("div",{className:"text-xs text-muted-foreground",children:[(1e3*h).toFixed(1)," \xb5m"]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-sm text-muted-foreground",children:"Pixels/cm from DPCM"}),(0,r.jsxs)("div",{className:"text-lg",children:[o(c).toFixed(2)," px/cm"]}),(0,r.jsxs)("div",{className:"text-xs text-muted-foreground",children:[(2.54*o(c)).toFixed(2)," px/in"]})]})]})]})]})}},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:()=>d});var r=s(60687),i=s(85814),a=s.n(i);function d({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)(a(),{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")},33873:e=>{"use strict";e.exports=require("path")},36319:()=>{},37417:(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/dpi-lpi-dpcm/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/dpi-lpi-dpcm/page.tsx","default")},38016:(e,t,s)=>{"use strict";s.r(t),s.d(t,{GlobalError:()=>d.a,__n