1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,28756,e=>{"use strict";var t=e.i(43476),s=e.i(71645),a=e.i(22016),n=e.i(75254);let i=(0,n.default)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]),l=(0,n.default)("scroll-text",[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]),r=(0,n.default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function o({fonts:e}){let[n,o]=(0,s.useState)(()=>e.reduce((e,t)=>(e[t.id]={size:t.defaultSize,axes:Object.fromEntries(t.axes.map(e=>[e.key,e.defaultValue])),text:t.sampleText},e),{})),[d,c]=(0,s.useState)({}),[p,h]=(0,s.useState)(null),[m,x]=(0,s.useState)(null),[u,f]=(0,s.useState)([]),[g,b]=(0,s.useState)(!1),[v,w]=(0,s.useState)(""),[y,j]=(0,s.useState)(""),[N,k]=(0,s.useState)(!1),[z,S]=(0,s.useState)({type:"idle",message:""}),$=(0,s.useRef)({}),C=(0,s.useRef)(null),T=(0,s.useRef)(null),[M,P]=(0,s.useState)({left:0,width:0}),E=u.length,R=(0,s.useMemo)(()=>e.filter(e=>u.includes(e.id)).map(e=>e.fileName),[e,u]),H=(0,s.useMemo)(()=>e.filter(e=>u.includes(e.id)).map(e=>e.name).join(", "),[e,u]),O=(0,s.useMemo)(()=>e.map(e=>` 2@font-face { 3 font-family: "shop-font-${e.id}"; 4 src: url("/fonts/shop/${e.fileName}") format("truetype"); 5 font-weight: 400; 6 font-style: normal; 7 font-display: swap; 8} 9`).join("\n"),[e]);(0,s.useEffect)(()=>{if(!m)return;let e=$.current[m];e&&(e.focus(),e.setSelectionRange(e.value.length,e.value.length))},[m]),(0,s.useEffect)(()=>{let t=!1;return(async()=>{await Promise.all(e.map(async e=>{try{if(await document.fonts.load(`${e.defaultSize}px "shop-font-${e.id}"`,e.sampleText),t)return;c(t=>({...t,[e.id]:!0}))}catch{if(t)return;c(t=>({...t,[e.id]:!0}))}}))})(),()=>{t=!0}},[e]),(0,s.useEffect)(()=>{E||b(!1)},[E]),(0,s.useEffect)(()=>{let e=T.current;if(!e)return;let t=()=>{if(window.innerWidth<768)return void P({left:0,width:window.innerWidth});let t=e.getBoundingClientRect();P({left:t.left,width:t.width})};t();let s=new ResizeObserver(()=>{t()});return s.observe(e),window.addEventListener("resize",t),()=>{s.disconnect(),window.removeEventListener("resize",t)}},[]);let D=()=>{m&&($.current[m]?.blur(),x(e=>e===m?null:e))},V=e=>{f(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},B=()=>{b(!1)},F=async()=>{if(R.length&&v.trim()&&y.trim()){k(!0),S({type:"idle",message:""});try{let e=await fetch("/api/fonts/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:v,email:y,fileNames:R})});if(!e.ok){let t=await e.json().catch(()=>null);throw Error(t?.message??"ë©ì¼ ì ì¡ì ì¤í¨íìµëë¤.")}S({type:"success",message:"ë©ì¼ ì ì¡ ìë£"}),w(""),j("")}catch(e){S({type:"error",message:e instanceof Error?e.message:"ë©ì¼ ì ì¡ì ì¤í¨íìµëë¤."})}finally{k(!1)}}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("style",{children:O}),(0,t.jsx)("style",{children:` 10 .shop-slider { 11 -webkit-appearance: none; 12 appearance: none; 13 width: 100%; 14 min-width: 0; 15 background: transparent; 16 } 17 18 .shop-slider::-webkit-slider-runnable-track { 19 height: 1px; 20 background: var(--color-text-900); 21 border-radius: 9999px; 22 } 23 24 .shop-slider::-webkit-slider-thumb { 25 -webkit-appearance: none; 26 appearance: none; 27 width: 12px; 28 height: 12px; 29 border-radius: 9999px; 30 background: var(--color-text-900); 31 margin-top: -5.5px; 32 border: 0; 33 } 34 35 .shop-slider::-moz-range-track { 36 height: 1px; 37 background: var(--color-text-900); 38 border-radius: 9999px; 39 } 40 41 .shop-slider::-moz-range-thumb { 42 width: 12px; 43 height: 12px; 44 border-radius: 9999px; 45 background: var(--color-text-900); 46 border: 0; 47 } 48 49 .shop-slider::-moz-range-progress { 50 height: 1px; 51 background: var(--color-text-900); 52 } 53 54 .shop-slider::-ms-track { 55 height: 1px; 56 background: transparent; 57 border-color: transparent; 58 color: transparent; 59 } 60 61 .shop-slider::-ms-fill-lower, 62 .shop-slider::-ms-fill-upper { 63 background: var(--color-text-900); 64 } 65 66 .shop-slider::-ms-thumb { 67 width: 12px; 68 height: 12px; 69 border-radius: 9999px; 70 background: var(--color-text-900); 71 border: 0; 72 } 73 74 .shop-preview::selection, 75 .shop-preview *::selection { 76 background: var(--color-button-100); 77 color: var(--color-text-950) 78 } 79 `}),(0,t.jsx)("div",{ref:T,className:"flex flex-col w-full pb-72",children:e.map(e=>{let s=n[e.id],i=d[e.id],r=p===e.id||m===e.id,c=function(e){let t=Object.entries(e);if(t.length)return t.map(([e,t])=>`"${e}" ${t}`).join(", ")}(s.axes),f=u.includes(e.id);return(0,t.jsxs)("div",{id:e.id,className:"w-full border-t border-text-600 text-text-800 transition-all duration-300 pb-4",onMouseEnter:()=>h(e.id),onMouseLeave:()=>h(t=>t===e.id?null:t),onFocus:()=>h(e.id),onBlur:t=>{t.currentTarget.contains(t.relatedTarget)||h(t=>t===e.id?null:t)},children:[(0,t.jsx)("div",{className:"p-7 pb-0 flex flex-col gap-4 transition-all duration-300",children:(0,t.jsxs)("div",{className:"flex w-full flex-col gap-4 md:flex-row md:justify-between",children:[(0,t.jsxs)("div",{className:"flex flex-1 flex-col gap-4 md:flex-row md:items-start md:gap-6",children:[(0,t.jsxs)("div",{className:"flex w-full items-center justify-between gap-4 md:w-auto",children:[(0,t.jsxs)("div",{className:"flex gap-3 items-center text-text-900 w-32",children:[(0,t.jsx)("span",{className:"shrink-0 md:block text-sm",children:e.name}),(0,t.jsx)(a.default,{href:e.detailHref,className:"flex items-center gap-1",children:(0,t.jsx)(l,{size:14,className:"hover:opacity-50 transition-opacity"})})]}),(0,t.jsx)("div",{className:"flex shrink-0 items-start gap-4 transition-opacity duration-300 opacity-100 md:opacity-0 md:pointer-events-none",children:(0,t.jsxs)("label",{className:"flex items-center",children:[(0,t.jsx)("button",{className:"w-5 h-5 md:w-4 md:h-4 border",onPointerDown:D,onClick:()=>V(e.id),children:(0,t.jsx)("div",{className:`w-full h-full ${f?"bg-green-500":"bg-transparent"} transition-colors duration-300`})}),(0,t.jsx)("input",{type:"checkbox",checked:f,onPointerDown:D,onChange:()=>V(e.id),className:"hidden"})]})})]}),(0,t.jsxs)("div",{className:"flex flex-1 flex-col gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between w-full md:w-64 pr-10 md:pr-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-[11px] text-text-900",children:[(0,t.jsx)("span",{children:"size"}),(0,t.jsx)("span",{children:s.size})]}),(0,t.jsx)("div",{className:"w-2/3 flex items-center shrink-0 md:w-4
790 md:min-w-[12rem]",children:(0,t.jsx)("input",{type:"range",min:e.size.min,max:e.size.max,step:e.size.step,value:s.size,onPointerDown:D,onChange:t=>{var s,a;return s=e.id,a=Number(t.target.value),void o(e=>({...e,[s]:{...e[s],size:a}}))},className:"shop-slider"})})]}),e.axes.map(a=>(0,t.jsxs)("div",{className:`flex items-center justify-between md:w-64 pr-10 md:pr-0 transition-all duration-300 ${r?"md:max-h-12 md:opacity-100":"md:max-h-0 md:opacity-0 md:pointer-events-none"}`,children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-[11px] text-text-900",children:[(0,t.jsx)("span",{children:a.label}),(0,t.jsx)("span",{children:s.axes[a.key]})]}),(0,t.jsx)("div",{className:"w-2/3 flex items-center shrink-0 md:w-40 md:min-w-[12rem]",children:(0,t.jsx)("input",{type:"range",min:a.min,max:a.max,step:a.step,value:s.axes[a.key],onPointerDown:D,onChange:t=>{var s,n,i;return s=e.id,n=a.key,i=Number(t.target.value),void o(e=>({...e,[s]:{...e[s],axes:{...e[s].axes,[n]:i}}}))},className:"shop-slider"})})]},a.key))]})]}),(0,t.jsx)("div",{className:"hidden md:flex shrink-0 items-start gap-4 transition-opacity duration-300",children:(0,t.jsxs)("label",{className:"flex items-center",children:[(0,t.jsx)("button",{className:"w-5 h-5 md:w-4 md:h-4 border",onPointerDown:D,onClick:()=>V(e.id),children:(0,t.jsx)("div",{className:`w-full h-full ${f?"bg-green-500":"bg-transparent"} transition-colors duration-300`})}),(0,t.jsx)("input",{type:"checkbox",checked:f,onPointerDown:D,onChange:()=>V(e.id),className:"hidden"})]})})]})}),(0,t.jsx)("div",{className:"pl-7 pr-0 pb-7 pt-4",style:{minHeight:"1.2em"},children:i?m===e.id?(0,t.jsx)("textarea",{ref:t=>{$.current[e.id]=t},value:s.text,onChange:t=>{var s,a;return s=e.id,a=t.target.value,void o(e=>({...e,[s]:{...e[s],text:a}}))},onBlur:()=>x(t=>t===e.id?null:t),rows:1,className:"shop-preview w-full resize-none overflow-hidden whitespace-nowrap bg-transparent focus:outline-hidden text-text-950",style:{fontFamily:`shop-font-${e.id}`,fontSize:`${s.size}px`,lineHeight:1.2,height:"1.2em",fontVariationSettings:c}}):(0,t.jsx)("button",{type:"button",onClick:()=>x(e.id),className:"shop-preview w-full overflow-hidden whitespace-nowrap bg-transparent text-left select-text text-text-950",style:{fontFamily:`shop-font-${e.id}`,fontSize:`${s.size}px`,lineHeight:1.2,fontVariationSettings:c},children:s.text}):(0,t.jsx)("div",{className:"w-full h-full min-h-[1.2em] flex items-center justify-center text-sm text-text-700",children:"loading"})})]},e.id)})}),E>0?(0,t.jsx)("div",{className:"fixed bottom-0 pointer-events-none",style:{left:`${M.left}px`,width:`${M.width}px`},children:(0,t.jsxs)("div",{className:`pointer-events-auto w-full bg-green-500 rounded-t-3xl text-text-900 overflow-hidden transition-all duration-300 origin-bottom ${g?"max-h-[32rem] md:max-h-[28rem]":"max-h-16"} ${g?"hover:translate-y-0":"hover:translate-y-1"}`,onTouchStart:e=>{C.current=e.touches[0]?.clientY??null},onTouchEnd:e=>{if(!g||window.innerWidth>=768)return;let t=C.current,s=e.changedTouches[0]?.clientY;C.current=null,null!=t&&null!=s&&s-t>56&&B()},children:[(0,t.jsx)("button",{type:"button",onClick:()=>{g||(b(!0),S({type:"idle",message:""}))},className:`w-full transition-all duration-300 ${g?"pointer-events-none h-0 opacity-0":"h-16 px-6"}`,children:(0,t.jsxs)("div",{className:"w-full h-full flex items-center justify-center gap-2",children:[(0,t.jsx)(i,{size:18}),(0,t.jsxs)("span",{children:[E,"ê° ë¤ì´ë¡ë"]})]})}),(0,t.jsxs)("div",{className:`flex flex-col gap-5 px-6 pt-2 transition-all duration-300 overflow-y-auto ${g?"max-h-96 opacity-100 pb-8":"max-h-0 opacity-0 pointer-events-none p-0"}`,children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4 text-sm",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{className:"opacity-50",children:H}),(0,t.jsx)("span",{className:"text-[11px]",children:"cc by 4.0 ìì ë¡ê² ê³µì /ë³µì /ìì ê°ë¥, ì ìì íì"})]}),(0,t.jsx)("button",{type:"button",onClick:B,className:"shrink-0",children:(0,t.jsx)(r,{size:18,className:"hover:opacity-50 transition-opacity"})})]}),(0,t.jsx)("div",{className:"flex flex-col gap-2 pt-2",children:(0,t.jsx)("input",{id:"font-order-name",value:v,onCh
79ange:e=>w(e.target.value),className:"bg-transparent border-b border-text-900 pb-1 focus:outline-hidden",placeholder:"ì´ë¦"})}),(0,t.jsx)("div",{className:"flex flex-col gap-2 pb-2",children:(0,t.jsx)("input",{id:"font-order-email",type:"email",value:y,onChange:e=>j(e.target.value),className:"bg-transparent border-b border-text-900 pb-1 focus:outline-hidden",placeholder:"ì´ë©ì¼"})}),(0,t.jsxs)("div",{className:"flex gap-4 items-center",children:[(0,t.jsx)("button",{type:"button",onClick:F,disabled:N||!v.trim()||!y.trim(),className:"self-start bg-text-900 text-background font-semibold rounded-sm px-5 py-2 disabled:opacity-60 hover:opacity-50 transition-opacity",children:"ë¤ì´ë¡ë"}),"idle"!==z.type?(0,t.jsxs)("div",{className:"text-sm text-text-900",children:[z.message,"!"]}):null]})]})]})}):null]})}e.s(["default",()=>o],28756)},38773,e=>{e.v(t=>Promise.all(["static/chunks/6bd93f6cc68e87b3.js","static/chunks/8447f7c09173145e.js"].map(t=>e.l(t))).then(()=>t(38534)))},53102,e=>{e.v(t=>Promise.all(["static/chunks/b5cd3a03414e6f46.js"].map(t=>e.l(t))).then(()=>t(15850)))}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.