1 line
No EOL
8.2 KiB
JavaScript
1 line
No EOL
8.2 KiB
JavaScript
(()=>{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,__next_app__:()=>m,pages:()=>c,routeModule:()=>p,tree:()=>l});var r=s(65239),i=s(48088),a=s(88170),d=s.n(a),n=s(30893),o={};for(let e in n)0>["default","tree","pages","GlobalError","__next_app__","routeModule"].indexOf(e)&&(o[e]=()=>n[e]);s.d(t,o);let l={children:["",{children:["laser-toolkit",{children:["dpi-lpi-dpcm",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(s.bind(s,37417)),"/app/app/laser-toolkit/dpi-lpi-dpcm/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,c=["/app/app/laser-toolkit/dpi-lpi-dpcm/page.tsx"],m={require:s,loadChunk:()=>Promise.resolve()},p=new r.AppPageRouteModule({definition:{kind:i.RouteKind.APP_PAGE,page:"/laser-toolkit/dpi-lpi-dpcm/page",pathname:"/laser-toolkit/dpi-lpi-dpcm",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:l}})},47689:(e,t,s)=>{Promise.resolve().then(s.bind(s,1127))},55192:(e,t,s)=>{"use strict";s.d(t,{Wu:()=>l,ZB:()=>o,Zp:()=>d,aR:()=>n});var r=s(60687),i=s(43210),a=s(96241);let d=i.forwardRef(({className:e,...t},s)=>(0,r.jsx)("div",{ref:s,className:(0,a.cn)("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));d.displayName="Card";let n=i.forwardRef(({className:e,...t},s)=>(0,r.jsx)("div",{ref:s,className:(0,a.cn)("flex flex-col space-y-1.5 p-6",e),...t}));n.displayName="CardHeader";let o=i.forwardRef(({className:e,...t},s)=>(0,r.jsx)("div",{ref:s,className:(0,a.cn)("text-2xl font-semibold leading-none tracking-tight",e),...t}));o.displayName="CardTitle",i.forwardRef(({className:e,...t},s)=>(0,r.jsx)("div",{ref:s,className:(0,a.cn)("text-sm text-muted-foreground",e),...t})).displayName="CardDescription";let l=i.forwardRef(({className:e,...t},s)=>(0,r.jsx)("div",{ref:s,className:(0,a.cn)("p-6 pt-0",e),...t}));l.displayName="CardContent",i.forwardRef(({className:e,...t},s)=>(0,r.jsx)("div",{ref:s,className:(0,a.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:()=>a,metadata:()=>i});var r=s(37413);s(90061);let i={title:"LE-DB",description:"Laser Everything Community Database"};function a({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:()=>d});var r=s(60687),i=s(43210),a=s(96241);let d=i.forwardRef(({className:e,type:t="text",...s},i)=>(0,r.jsx)("input",{type:t,className:(0,a.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:i,...s}));d.displayName="Input"},82537:(e,t,s)=>{Promise.resolve().then(s.bind(s,37417))},90061:()=>{},96241:(e,t,s)=>{"use strict";s.d(t,{cn:()=>a});var r=s(49384),i=s(82348);function a(...e){return(0,i.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(38016));module.exports=r})(); |