1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,686247,e=>{"use strict";var t=e.i(466471),r=e.i(536355),a=e.i(526683);function s(e){let s,n,i,l,o=(0,r.c)(8);return o[0]!==e?({className:s,...n}=e,o[0]=e,o[1]=s,o[2]=n):(s=o[1],n=o[2]),o[3]!==s?(i=(0,a.cn)("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",s),o[3]=s,o[4]=i):i=o[4],o[5]!==n||o[6]!==i?(l=(0,t.jsx)("div",{"data-slot":"card",className:i,...n}),o[5]=n,o[6]=i,o[7]=l):l=o[7],l}function n(e){let s,n,i,l,o=(0,r.c)(8);return o[0]!==e?({className:s,...n}=e,o[0]=e,o[1]=s,o[2]=n):(s=o[1],n=o[2]),o[3]!==s?(i=(0,a.cn)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",s),o[3]=s,o[4]=i):i=o[4],o[5]!==n||o[6]!==i?(l=(0,t.jsx)("div",{"data-slot":"card-header",className:i,...n}),o[5]=n,o[6]=i,o[7]=l):l=o[7],l}function i(e){let s,n,i,l,o=(0,r.c)(8);return o[0]!==e?({className:s,...n}=e,o[0]=e,o[1]=s,o[2]=n):(s=o[1],n=o[2]),o[3]!==s?(i=(0,a.cn)("leading-none font-semibold",s),o[3]=s,o[4]=i):i=o[4],o[5]!==n||o[6]!==i?(l=(0,t.jsx)("div",{"data-slot":"card-title",className:i,...n}),o[5]=n,o[6]=i,o[7]=l):l=o[7],l}function l(e){let s,n,i,l,o=(0,r.c)(8);return o[0]!==e?({className:s,...n}=e,o[0]=e,o[1]=s,o[2]=n):(s=o[1],n=o[2]),o[3]!==s?(i=(0,a.cn)("text-muted-foreground text-sm",s),o[3]=s,o[4]=i):i=o[4],o[5]!==n||o[6]!==i?(l=(0,t.jsx)("div",{"data-slot":"card-description",className:i,...n}),o[5]=n,o[6]=i,o[7]=l):l=o[7],l}function o(e){let s,n,i,l,o=(0,r.c)(8);return o[0]!==e?({className:s,...n}=e,o[0]=e,o[1]=s,o[2]=n):(s=o[1],n=o[2]),o[3]!==s?(i=(0,a.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",s),o[3]=s,o[4]=i):i=o[4],o[5]!==n||o[6]!==i?(l=(0,t.jsx)("div",{"data-slot":"card-action",className:i,...n}),o[5]=n,o[6]=i,o[7]=l):l=o[7],l}function c(e){let s,n,i,l,o=(0,r.c)(8);return o[0]!==e?({className:s,...n}=e,o[0]=e,o[1]=s,o[2]=n):(s=o[1],n=o[2]),o[3]!==s?(i=(0,a.cn)("px-6",s),o[3]=s,o[4]=i):i=o[4],o[5]!==n||o[6]!==i?(l=(0,t.jsx)("div",{"data-slot":"card-content",className:i,...n}),o[5]=n,o[6]=i,o[7]=l):l=o[7],l}function d(e){let s,n,i,l,o=(0,r.c)(8);return o[0]!==e?({className:s,...n}=e,o[0]=e,o[1]=s,o[2]=n):(s=o[1],n=o[2]),o[3]!==s?(i=(0,a.cn)("flex items-center px-6 [.border-t]:pt-6",s),o[3]=s,o[4]=i):i=o[4],o[5]!==n||o[6]!==i?(l=(0,t.jsx)("div",{"data-slot":"card-footer",className:i,...n}),o[5]=n,o[6]=i,o[7]=l):l=o[7],l}e.s(["Card",()=>s,"CardAction",()=>o,"CardContent",()=>c,"CardDescription",()=>l,"CardFooter",()=>d,"CardHeader",()=>n,"CardTitle",()=>i])},532758,e=>{"use strict";var t=e.i(466471),r=e.i(536355);let a=[{id:"R01",styleLabel:"Skin Fade",styleSlug:"textured-skin-fade",beforeImg:"https://images.baldfade.net/roster/c1-before.webp",afterImg:"https://images.baldfade.net/roster/c1-after.webp"},{id:"R02",styleLabel:"Bald Fade",styleSlug:"high-bald-fade-carved-part",beforeImg:"https://images.baldfade.net/roster/c2-before.webp",afterImg:"https://images.baldfade.net/roster/c2-after.webp"},{id:"R03",styleLabel:"Taper Fade",styleSlug:"high-taper",beforeImg:"https://images.baldfade.net/roster/c3-before.webp",afterImg:"https://images.baldfade.net/roster/c3-after.webp"},{id:"R04",styleLabel:"Burst Fade",styleSlug:"burst-fade",beforeImg:"https://images.baldfade.net/roster/c4-before.webp",afterImg:"https://images.baldfade.net/roster/c4-after.webp"},{id:"R05",styleLabel:"Completely Bald",styleSlug:"bald",beforeImg:"https://images.baldfade.net/roster/c5-before.webp",afterImg:"https://images.baldfade.net/roster/c5-after.webp"},{id:"R06",styleLabel:"Mid Fade",styleSlug:"mid-skin-fade-side-part",beforeImg:"https://images.baldfade.net/roster/c6-before.webp",afterImg:"https://images.baldfade.net/roster/c6-after.webp"},{id:"R07",styleLabel:"High Fade",styleSlug:"high-skin-fade-texture",beforeImg:"https://images.baldfade.net/roster/c7-before.webp",afterImg:"https://images.baldfade.net/roster/c7-after.webp"},{id:"R08",styleLabel:"Low Fade",styleSlug:"low-skin-fade",beforeImg:"https://images.baldfade.net/roster/c8-before.webp",afterImg:"https://images.baldfade.net/roster/c8-after.webp"},{id:"R09",styleLabel:"Drop Fade",styleSlug:"smooth-drop-fade",beforeImg:"https://images.baldfade.net/roster/c9-before.webp",afterImg:"https://images.baldfade.net/roster/c9-after.webp"},{id:"R10",styleLabel:"Shadow Fade",styleSlug:"barely-there-fade",beforeImg:"https://images.baldfade.net/roster/c10-before.webp",afterImg:"https://images.baldfade.net/roster/c10-after.webp"},{id:"R11",styleLabel:"Crew Cut Fade",styleSlug:"french-crop-high-skin-fade",beforeImg:"https://images.baldfade.net/roster/c11-before.webp",afterImg:"https://images.baldfade.net/roster/c11-after.webp"},{id:"R12",styleLabel:"Buzz Cut Fade",styleSlug:"gentleman-buzz-fade",beforeImg:"https://images.baldfade.net/roster/c12-before.webp",afterImg:"https://images.baldfade.net/roster/c12-after.webp"}];function s(e){let a,s,n,i,l,o,c,d,h,u,m,f,p=(0,r.c)(40),{person:g,locale:x,onPickStyle:b,tryPath:y,tryAnchor:w,eager:v}=e,j="zh"===x;p[0]!==g.styleLabel?(a=(0,t.jsx)("div",{className:"absolute top-3 left-3 z-20 text-[10px] font-mono text-white/90 bg-black/70 backdrop-blur-sm px-2 py-1 border border-white/10 uppercase tracking-wider",children:g.styleLabel}),p[0]=g.styleLabel,p[1]=a):a=p[1];let _=j?"åå¾":"BEFORE";p[2]!==_?(s=(0,t.jsx)("span",{className:"block transition-opacity duration-500 opacity-100 group-hover:opacity-0",children:(0,t.jsx)("span",{className:"text-white/90 bg-black/70 border-white/10 px-2 py-1",children:_})}),p[2]=_,p[3]=s):s=p[3];let S=j?"åå¾":"AFTER";p[4]!==S?(n=(0,t.jsx)("span",{className:"absolute top-0 right-0 transition-opacity duration-500 opacity-0 group-hover:opacity-100",children:(0,t.jsx)("span",{className:"text-black bg-green-400 border-green-400 px-2 py-1",children:S})}),p[4]=S,p[5]=n):n=p[5],p[6]!==s||p[7]!==n?(i=(0,t.jsxs)("div",{className:"absolute top-3 right-3 z-20 text-[10px] font-mono font-bold px-2 py-1 border backdrop-blur-sm uppercase tracking-wider transition-all",children:[s,n]}),p[6]=s,p[7]=n,p[8]=i):i=p[8];let k=`${g.styleLabel} before â AI-generated example`,N=v?"eager":"lazy";p[9]!==g.beforeImg||p[10]!==k||p[11]!==N?(l=(0,t.jsx)("img",{src:g.beforeImg,alt:k,loading:N,className:"absolute inset-0 w-full h-full object-cover transition-all duration-700 opacity-100 group-hover:opacity-0"}),p[9]=g.beforeImg,p[10]=k,p[11]=N,p[12]=l):l=p[12];let F=`${g.styleLabel} after â AI-generated example`,R=v?"eager":"lazy";p[13]!==g.afterImg||p[14]!==F||p[15]!==R?(o=(0,t.jsx)("img",{src:g.afterImg,alt:F,loading:R,className:"absolute inset-0 w-full h-full object-cover transition-all duration-700 opacity-0 scale-105 group-hover:opacity-100 group-hover:scale-100"}),p[13]=g.afterImg,p[14]=F,p[15]=R,p[16]=o):o=p[16],p[17]===Symbol.for("react.memo_cache_sentinel")?(c=(0,t.jsx)("div",{className:"absolute inset-0 bg-gradient-to-b from-[#0047ff]/10 via-trans
1parent to-[#0047ff]/10 opacity-0 transition-opacity duration-500 group-hover:opacity-100"}),p[17]=c):c=p[17];let I=j?"è¯è¯è¿ä¸ªé£æ ¼":"Try this style";p[18]!==I?(d=(0,t.jsx)("span",{className:"font-mono text-[10px] uppercase tracking-wider text-[#0047ff]",children:I}),p[18]=I,p[19]=d):d=p[19],p[20]===Symbol.for("react.memo_cache_sentinel")?(h=(0,t.jsx)("span",{className:"text-[#0047ff]",children:"â"}),p[20]=h):h=p[20],p[21]!==d?(u=(0,t.jsxs)("div",{className:"absolute inset-x-0 bottom-0 z-20 flex items-center justify-center gap-2 bg-gradient-to-t from-black/85 to-transparent px-3 py-3 opacity-0 transition-opacity duration-300 group-hover:opacity-100",children:[d,h]}),p[21]=d,p[22]=u):u=p[22],p[23]!==a||p[24]!==o||p[25]!==u||p[26]!==i||p[27]!==l?(m=(0,t.jsxs)(t.Fragment,{children:[a,i,l,o,c,u]}),p[23]=a,p[24]=o,p[25]=u,p[26]=i,p[27]=l,p[28]=m):m=p[28];let C=m;if(b){let e,r;p[29]!==b||p[30]!==g.styleSlug?(e=()=>b(g.styleSlug),p[29]=b,p[30]=g.styleSlug,p[31]=e):e=p[31];let a=`${g.styleLabel} â try this style`;return p[32]!==C||p[33]!==e||p[34]!==a?(r=(0,t.jsx)("button",{type:"button",className:"group relative aspect-[3/4] overflow-hidden bg-gray-900 border border-white/5 cursor-pointer text-left w-full block",onClick:e,"aria-label":a,children:C}),p[32]=C,p[33]=e,p[34]=a,p[35]=r):r=p[35],r}let z=`${y}?style=${g.styleSlug}#${w}`,A=`${g.styleLabel} â try this style`;return p[36]!==C||p[37]!==z||p[38]!==A?(f=(0,t.jsx)("a",{href:z,className:"group relative aspect-[3/4] overflow-hidden bg-gray-900 border border-white/5 cursor-pointer text-left w-full block","aria-label":A,children:C}),p[36]=C,p[37]=z,p[38]=A,p[39]=f):f=p[39],f}function n(e){let n,i,l,o,c,d,h,u,m,f,p,g,x,b,y=(0,r.c)(38),{locale:w,onPickStyle:v,compact:j,tryPath:_,tryAnchor:S}=e,k=void 0!==j&&j,N=void 0===_?"/":_,F=void 0===S?"scan":S,R=`${k?"py-16":"py-32"} px-6 bg-[#050505] relative z-40 border-b border-white/10`,I=`flex flex-col md:flex-row justify-between items-start ${k?"mb-8 pb-6":"mb-16 pb-10"} border-b border-white/10`,C=`font-display ${k?"text-3xl md:text-5xl":"text-5xl md:text-7xl"} font-bold leading-none`;y[0]!==w?(n="zh"===w?(0,t.jsxs)(t.Fragment,{children:["ç¤ºä¾ææ",(0,t.jsx)("br",{}),(0,t.jsx)("span",{className:"text-gray-600",children:"EXAMPLE RESULTS"})]}):(0,t.jsxs)(t.Fragment,{children:["EXAMPLE",(0,t.jsx)("br",{}),(0,t.jsx)("span",{className:"text-gray-600",children:"RESULTS"})]}),y[0]=w,y[1]=n):n=y[1],y[2]!==C||y[3]!==n?(i=(0,t.jsx)("h2",{className:C,children:n}),y[2]=C,y[3]=n,y[4]=i):i=y[4];let z="zh"===w?"[ AI çæç¤ºä¾ ]":"[ AI-GENERATED EXAMPLES ]";y[5]!==z?(l=(0,t.jsx)("div",{className:"text-[#0047ff] mb-2",children:z}),y[5]=z,y[6]=l):l=y[6],y[7]!==w?(o="zh"===w?(0,t.jsxs)(t.Fragment,{children:["以ä¸ä¸º AI çæçåå对æ¯ç¤ºä¾ã",(0,t.jsx)("br",{}),"æ¬åæ¥çææã",(0,t.jsx)("br",{}),(0,t.jsx)("span",{className:"text-gray-600",children:"ç¹å»é£æ ¼ï¼ç¨ä½ çç
§çè¯è¯ã"})]}):(0,t.jsxs)(t.Fragment,{children:["AI-generated before & after examples.",(0,t.jsx)("br",{}),"Hover to reveal the after.",(0,t.jsx)("br",{}),(0,t.jsx)("span",{className:"text-gray-600",children:"Click a style to try it on your photo."})]}),y[7]=w,y[8]=o):o=y[8],y[9]!==l||y[10]!==o?(c=(0,t.jsxs)("div",{className:"mt-8 md:mt-0 max-w-sm text-gray-500 text-sm leading-relaxed font-mono md:text-right",children:[l,o]}),y[9]=l,y[10]=o,y[11]=c):c=y[11],y[12]!==c||y[13]!==I||y[14]!==i?(d=(0,t.jsxs)("div",{className:I,children:[i,c]}),y[12]=c,y[13]=I,y[14]=i,y[15]=d):d=y[15],y[16]!==k||y[17]!==w||y[18]!==v||y[19]!==F||y[20]!==N?(h=a.map((e,r)=>(0,t.jsx)(s,{person:e,idx:r,locale:w,onPickStyle:v,tryPath:N,tryAnchor:F,eager:!k&&r<4},e.id)),y[16]=k,y[17]=w,y[18]=v,y[19]=F,y[20]=N,y[21]=h):h=y[21],y[22]!==h?(u=(0,t.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-1",children:h}),y[22]=h,y[23]=u):u=y[23];let A=`${N}#${F}`;y[24]===Symbol.for("react.memo_cache_sentinel")?(m=(0,t.jsx)("span",{className:"w-1.5 h-1.5 bg-[#0047ff] group-hover:bg-white transition-colors"}),y[24]=m):m=y[24];let L="zh"===w?"ç«å³çææç形象":"Generate My Bald Look";return y[25]!==L?(f=(0,t.jsx)("span",{children:L}),y[25]=L,y[26]=f):f=y[26],y[27]===Symbol.for("react.memo_cache_sentinel")?(p=(0,t.jsx)("span",{children:"â"}),y[27]=p):p=y[27],y[28]!==A||y[29]!==f?(g=(0,t.jsx)("div",{className:"mt-8 pt-8 border-t border-white/5 flex justify-center",children:(0,t.jsxs)("a",{href:A,className:"group font-mono text-xs text-[#0047ff] hover:text-white transition-colors flex items-center gap-3",children:[m,f,p]})}),y[28]=A,y[29]=f,y[30]=g):g=y[30],y[31]!==d||y[32]!==u||y[33]!==g?(x=(0,t.jsxs)("div",{className:"max-w-[1600px] mx-auto",children:[d,u,g]}),y[31]=d,y[32]=u,y[33]=g,y[34]=x):x=y[34],y[35]!==x||y[36]!==R?(b=(0,t.jsx)("section",{id:"transformations",className:R,children:x}),y[35]=x,y[36]=R,y[37]=b):b=y[37],b}e.s(["default",()=>n])},249990,e=>{"use strict";let t=(0,e.i(889522).default)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["default",()=>t])},644204,e=>{"use strict";var t=e.i(249990);e.s(["Eye",()=>t.default])},699998,170378,e=>{"use strict";var t=e.i(889522);let r=(0,t.default)("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",ke
1y:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["default",()=>r],699998);let a=(0,t.default)("user-check",[["path",{d:"m16 11 2 2 4-4",key:"9rsbq5"}],["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]);e.s(["default",()=>a],170378)},212667,e=>{"use strict";let t=(0,e.i(889522).default)("image-off",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M10.41 10.41a2 2 0 1 1-2.83-2.83",key:"1bzlo9"}],["line",{x1:"13.5",x2:"6",y1:"13.5",y2:"21",key:"1q0aeu"}],["line",{x1:"18",x2:"21",y1:"12",y2:"15",key:"5mozeu"}],["path",{d:"M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59",key:"mmje98"}],["path",{d:"M21 15V5a2 2 0 0 0-2-2H9",key:"43el77"}]]);e.s(["default",()=>t])},245193,e=>{"use strict";let t=(0,e.i(889522).default)("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}
1],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]]);e.s(["default",()=>t])},550573,e=>{"use strict";var t=e.i(245193);e.s(["Sparkles",()=>t.default])},792978,e=>{"use strict";let t=(0,e.i(889522).default)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);e.s(["default",()=>t])},758028,e=>{"use strict";let t=(0,e.i(889522).default)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);e.s(["default",()=>t])},302232,e=>{"use strict";var t=e.i(758028);e.s(["Lock",()=>t.default])},812474,(e,t,r)=>{},238552,(e,t,r)=>{var a=e.i(90985);e.r(812474);var s=e.r(884702),n=s&&"object"==typeof s&&"default"in s?s:{default:s},i=void 0!==a.default&&a.default.env&&!0,l=function(e){return"[object String]"===Object.prototype.toString.call(e)},o=function(){function e(e){var t=void 0===e?{}:e,r=t.name,a=void 0===r?"stylesheet":r,s=t.optimizeForSpeed,n=void 0===s?i:s;c(l(a),"`name` must be a string"),this._name=a,this._deletedRulePlaceholder="#"+a+"-deleted-rule____{}",c("boolean"==typeof n,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=n,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0;var o="undefined"!=typeof window&&document.querySelector('meta[property="csp-nonce"]');this._nonce=o?o.getAttribute("content"):null}var t,r=e.prototype;return r.setOptimizeForSpeed=function(e){c("boolean"==typeof e,"`setOptimizeForSpeed` accepts a boolean"),c(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=e,this.inject()},r.isOptimizeForSpeed=function(){return this._optimizeForSpeed},r.inject=function(){var e=this;if(c(!this._injected,"sheet already injected"),this._injected=!0,"undefined"!=typeof window&&this._optimizeForSpeed){this._tags[0]=this.makeStyleTag(this._name),this._optimizeForSpeed="insertRule"in this.getSheet(),this._optimizeForSpeed||(i||console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode."),this.flush(),this._injected=!0);return}this._serverSheet={cssRules:[],insertRule:function(t,r){return"number"==typeof r?e._serverSheet.cssRules[r]={cssText:t}:e._serverSheet.cssRules.push({cssText:t}),r},deleteRule:function(t){e._serverSheet.cssRules[t]=null}}},r.getSheetForTag=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]},r.getSheet=function(){return this.getSheetForTag(this._tags[this._tags.length-1])},r.insertRule=function(e,t){if(c(l(e),"`insertRule` accepts only strings"),"undefined"==typeof window)return"number"!=typeof t&&(t=this._serverSheet.cssRules.length),this._serverSheet.insertRule(e,t),this._rulesCount++;if(this._optimizeForSpeed){var r=this.getSheet();"number"!=typeof t&&(t=r.cssRules.length);try{r.insertRule(e,t)}catch(t){return i||console.warn("StyleSheet: illegal rule: \n\n"+e+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),-1}}else{var a=this._tags[t];this._tags.push(this.makeStyleTag(this._name,e,a))}return this._rulesCount++},r.replaceRule=function(e,t){if(this._optimizeForSpeed||"undefined"==typeof window){var r="undefined"!=typeof window?this.getSheet():this._serverSheet;if(t.trim()||(t=this._deletedRulePlaceholder),!r.cssRules[e])return e;r.deleteRule(e);try{r.insertRule(t,e)}catch(a){i||console.warn("StyleSheet: illegal rule: \n\n"+t+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),r.insertRule(this._deletedRulePlaceholder,e)}}else{var a=this._tags[e];c(a,"old rule at index `"+e+"` not found"),a.textContent=t}return e},r.deleteRule=function(e){if("undefined"==typeof window)return void this._serverSheet.deleteRule(e);if(this._optimizeForSpeed)this.replaceRule(e,"");else{var t=this._tags[e];c(t,"rule at index `"+e+"` not found"),t.parentNode.removeChild(t),this._tags[e]=null}},r.flush=function(){this._injected=!1,this._rulesCount=0,"undefined"!=typeof window?(this._tags.forEac
1h(function(e){return e&&e.parentNode.removeChild(e)}),this._tags=[]):this._serverSheet.cssRules=[]},r.cssRules=function(){var e=this;return"undefined"==typeof window?this._serverSheet.cssRules:this._tags.reduce(function(t,r){return r?t=t.concat(Array.prototype.map.call(e.getSheetForTag(r).cssRules,function(t){return t.cssText===e._deletedRulePlaceholder?null:t})):t.push(null),t},[])},r.makeStyleTag=function(e,t,r){t&&c(l(t),"makeStyleTag accepts only strings as second parameter");var a=document.createElement("style");this._nonce&&a.setAttribute("nonce",this._nonce),a.type="text/css",a.setAttribute("data-"+e,""),t&&a.appendChild(document.createTextNode(t));var s=document.head||document.getElementsByTagName("head")[0];return r?s.insertBefore(a,r):s.appendChild(a),a},t=[{key:"length",get:function(){return this._rulesCount}}],function(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}(e.prototype,t),e}();function c(e,t){if(!e)throw Error("StyleSheet: "+t+".")}var d=function(e){for(var t=5381,r=e.length;r;)t=33*t^e.charCodeAt(--r);return t>>>0},h={};function u(e,t){if(!t)return"jsx-"+e;var r=String(t),a=e+r;return h[a]||(h[a]="jsx-"+d(e+"-"+r)),h[a]}function m(e,t){"undefined"==typeof window&&(t=t.replace(/\/style/gi,"\\/style"));var r=e+t;return h[r]||(h[r]=t.replace(/__jsx-style-dynamic-selector/g,e)),h[r]}var f=function(){function e(e){var t=void 0===e?{}:e,r=t.styleSheet,a=void 0===r?null:r,s=t.optimizeForSpeed,n=void 0!==s&&s;this._sheet=a||new o({name:"styled-jsx",optimizeForSpeed:n}),this._sheet.inject(),a&&"boolean"==typeof n&&(this._sheet.setOptimizeForSpeed(n),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer=void 0,this._indices={},this._instancesCounts={}}var t=e.prototype;return t.add=function(e){var t=this;void 0===this._optimizeForSpeed&&(this._optimizeForSpeed=Array.isArray(e.children),this._sheet.setOptimizeForSpeed(this._optimizeForSpeed),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),"undefined"==typeof window||this._fromServer||(this._fromServer=this.selectFromServer(),this._instancesCounts=Object.keys(this._fromServer).reduce(function(e,t){return e[t]=0,e},{}));var r=this.getIdAndRules(e),a=r.styleId,s=r.rules;if(a in this._instancesCounts){this._instancesCounts[a]+=1;return}var n=s.map(function(e){return t._sheet.insertRule(e)}).filter(function(e){return -1!==e});this._indices[a]=n,this._instancesCounts[a]=1},t.remove=function(e){var t=this,r=this.getIdAndRules(e).styleId;if(function(e,t){if(!e)throw Error("StyleSheetRegistry: "+t+".")}(r in this._instancesCounts,"styleId: `"+r+"` not found"),this._instancesCounts[r]-=1,this._instancesCounts[r]<1){var a=this._fromServer&&this._fromServer[r];a?(a.parentNode.removeChild(a),delete this._fromServer[r]):(this._indices[r].forEach(function(e){return t._sheet.deleteRule(e)}),delete this._indices[r]),delete this._instancesCounts[r]}},t.update=function(e,t){this.add(t),this.remove(e)},t.flush=function(){this._sheet.flush(),this._sheet.inject(),this._fromServer=void 0,this._indices={},this._instancesCounts={}},t.cssRules=function(){var e=this,t=this._fromServer?Object.keys(this._fromServer).map(function(t){return[t,e._fromServer[t]]}):[],r=this._sheet.cssRules();return t.concat(Object.keys(this._indices).map(function(t){return[t,e._indices[t].map(function(e){return r[e].cssText}).join(e._optimizeForSpeed?"":"\n")]}).filter(function(e){return!!e[1]}))},t.styles=function(e){var t,r;return t=this.cssRules(),void 0===(r=e)&&(r={}),t.map(function(e){var t=e[0],a=e[1];return n.default.createElement("style",{id:"__"+t,key:"__"+t,nonce:r.nonce?r.nonce:void 0,dangerouslySetInnerHTML:{__html:a}})})},t.getIdAndRules=function(e){var t=e.children,r=e.dynamic,a=e.id;if(r){var s=u(a,r);return{styleId:s,rules:Array.isArray(t)?t.map(function(e){return m(s,e)}):[m(s,t)]}}return{styleId:u(a),rules:Array.isArray(t)?t:[t]}},t.selectFromServer=function(){return Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]')).reduce(function(e,t){return e[t.id.slice(2)]=t,e},{})},e}(),p=s.createContext(null);function g(){return new f}function x(){return s.useContext(p)}p.displayName="StyleSheetContext";var b=n.default.useInsertionEffect||n.default.useLayoutEffect,y="undefined"!=typeof window?g():void 0;function w(e){var t=y||x();return t&&("undefined"==typeof window?t.add(e):b(function(){return t.add(e),function(){t.remove(e)}},[e.id,String(e.dynamic)])),null}w.dynamic=function(e){return e.map(function(e){return u(e[0],e[1])}).join(" ")},r.StyleRegistry=function(e){var t=e.registry,r=e.children,a=s.useContext(p),i=s.useState(function(){return a||t||g()})[0];return n.default.createElement(p.Provider,{value:i},r)},r.createStyleRegistry=g,r.style=w,r.useStyleRegistry=x},717555,(e,t,r)=>{t.exports=e.r(238552).style},822826,e=>{"use strict";var t=e.i(792978);e.s(["Zap",()=>t.default])},692235,e=>{"use strict";let t=(0,e.i(889522).default)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);e.s(["default",()=>t])},480870,e=>{"use strict";let t=(0,e.i(889522).default)("camera",[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);e.s(["default",()=>t])},817047,e=>{"use strict";let t=(0,e.i(889522).default)("shield-alert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",ke
1y:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);e.s(["default",()=>t])},194784,e=>{"use strict";var t=e.i(466471),r=e.i(536355),a=e.i(884702),s=e.i(692235),s=s,n=e.i(695859),i=e.i(480870),i=i,l=e.i(462297),o=e.i(302232),c=e.i(576076),d=e.i(918720),h=e.i(199978),u=e.i(526683);let m={1:{label:"Norwood I",gist:"Full, mature hairline. No measurable recession."},2:{label:"Norwood II",gist:"Slight temporal recession â typical mature adult hairline."},3:{label:"Norwood III",gist:"Clear temporal recession. First clinically classified stage of male pattern hair loss."},4:{label:"Norwood IV",gist:"Pronounced frontal & temporal recession. Hair band still present mid-scalp."},5:{label:"Norwood V",gist:"Frontal and crown areas thinning toward each other. Band narrowing."},6:{label:"Norwood VI",gist:"Frontal and crown zones merging. Limited remaining mid-scalp coverage."},7:{label:"Norwood VII",gist:"Only a horseshoe band of hair around the sides and back remains."}};function f(){let[r,s]=(0,a.useState)("idle"),[n,h]=(0,a.useState)(""),[m,f]=(0,a.useState)(""),[y,w]=(0,a.useState)(null),v=(0,a.useRef)(null),_=(0,a.useRef)({faceLandmarker:null,segmenter:null});(0,a.useEffect)(()=>()=>{m&&URL.revokeObjectURL(m)},[m]),(0,a.useEffect)(()=>{let e=console.error,t=[/^INFO:/,/^W\d{4}\s/,/^I\d{4}\s/,/Created TensorFlow Lite/,/Graph successfully started running/,/Feedback manager requires/,/SOFTMAX activation function/,/inference_feedback_manager\.cc/,/segmentation_postprocessor_gl\.cc/,/vision_wasm_internal/];return console.error=(...r)=>{let a="string"==typeof r[0]?r[0].trimStart():"";a&&t.some(e=>e.test(a))||e.apply(console,r)},()=>{console.error=e}},[]);let S=(0,a.useCallback)(async()=>{let t,r;if(_.current.faceLandmarker&&_.current.segmenter)return;let a=await e.A(269794),s=await a.FilesetResolver.forVisionTasks("https://cdn.jsdelivr.net/npm/@mediapipe/[email protected]/wasm"),n=e=>a.FaceLandmarker.createFromOptions(s,{baseOptions:{modelAssetPath:"https://storage.googleapis.com/mediapipe-models/face_landmarker/face_landmarker/float16/1/face_landmarker.task",delegate:e},runningMode:"IMAGE",numFaces:1}),i=e=>a.ImageSegmenter.createFromOptions(s,{baseOptions:{modelAssetPath:"https://storage.googleapis.com/mediapipe-models/image_segmenter/selfie_multiclass_256x256/float32/1/selfie_multiclass_256x256.tflite",delegate:e},runningMode:"IMAGE",outputCategoryMask:!0,outputConfidenceMasks:!1});try{[t,r]=await Promise.all([n("CPU"),i("CPU")])}catch(e){console.warn("[norwood] CPU delegate failed, trying GPU",e),[t,r]=await Promise.all([n("GPU"),i("GPU")])}_.current.faceLandmarker=t,_.current.segmenter=r},[]),k=(0,a.useCallback)(()=>{m&&URL.revokeObjectURL(m),f(""),w(null),h(""),s("idle"),v.current&&(v.current.value="")},[m]),N=(0,a.useCallback)(async e=>{try{var t;h(""),w(null);let r=URL.createObjectURL(e);m&&URL.revokeObjectURL(m),f(r),s("loading"),await S(),s("analyzing");let a=await (t=r,new Promise((e,r)=>{let a=new Image;a.crossOrigin="anonymous",a.onload=()=>e(a),a.onerror=()=>r(Error("Image failed to load.")),a.src=t})),n=await j(a,_.current.faceLandmarker,_.current.segmenter);console.log("[norwood] DONE â stage =",n.stage,"metrics =",n.metrics,"percentile =",n.percentile.toFixed(1)),w(n),s("result")}catch(e){console.error("[norwood] analysis failed",e),h(e?.message||"Could not analyze this photo."),s("error")}},[S,m]),F=(0,a.useCallback)(e=>{let t=e.target.files?.[0];t&&N(t)},[N]);return(0,t.jsx)("section",{id:"analyzer",className:"py-20 px-6 bg-[#050505] border-y border-white/10",children:(0,t.jsxs)("div",{className:"max-w-[1100px] mx-auto",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 justify-center mb-8",children:[(0,t.jsx)(o.Lock,{className:"w-4 h-4 text-[#0047FF]"}),(0,t.jsx)("span",{className:"font-mono text-xs text-gray-400 uppercase tracking-widest",children:"100% in your browser · photo never uploaded"})]}),(0,t.jsxs)("div",{className:"grid md:grid-cols-2 gap-10 items-start",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsx)("input",{ref:v,type:"file",accept:"image/jpeg,image/png,image/webp",className:"hidden",onChange:F}),(0,t.jsxs)("div",{className:"aspect-[4/5] border border-dashed border-white/15 rounded-lg overflow-hidden bg-[#0a0a0a] relative",children:[m?(0,t.jsx)("img",{src:m,alt:"Your uploaded photo",className:"w-full h-full object-contain"}):(0,t.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-gray-500 px-6 text-center",children:[(0,t.jsx)(i.default,{className:"w-10 h-10 mb-3 opacity-50"}),(0,t.jsx)("p",{className:"font-mono text-xs uppercase tracking-widest mb-1",children:"Front-facing photo"}),(0,t.jsx)("p",{className:"font-mono text-[11px] text-gray-600",children:"Hair in normal style · even lighting · forehead visible"})]}),("loading"===r||"analyzing"===r)&&(0,t.jsxs)("div",{className:"absolute inset-0 bg-black/70 backdrop-blur-sm flex flex-col items-center justify-center",children:[(0,t.jsx)(l.L
1oader2,{className:"w-8 h-8 animate-spin text-[#0047FF] mb-3"}),(0,t.jsx)("p",{className:"font-mono text-xs text-gray-300 uppercase tracking-widest",children:"loading"===r?"Downloading AI models · one-time":"Analyzing hairline"})]})]}),(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsxs)("button",{onClick:()=>v.current?.click(),disabled:"loading"===r||"analyzing"===r,className:(0,u.cn)("flex-1 inline-flex items-center justify-center gap-2 px-6 py-3 bg-[#0047FF] text-white font-bold uppercase tracking-wider hover:bg-[#0035CC] transition-colors rounded disabled:opacity-50 disabled:cursor-not-allowed text-sm"),children:[(0,t.jsx)(d.Upload,{className:"w-4 h-4"}),m?"Try Another":"Upload Photo"]}),m&&(0,t.jsxs)("button",{onClick:k,className:"inline-flex items-center justify-center gap-2 px-4 py-3 border border-white/15 text-gray-300 font-mono text-xs uppercase tracking-widest hover:bg-white/5 rounded",children:[(0,t.jsx)(c.RefreshCw,{className:"w-3.5 h-3.5"}),"Reset"]})]}),(0,t.jsx)("p",{className:"font-mono text-[11px] text-gray-600 leading-relaxed",children:"Tip: Hair pulled back / styled forward will skew the result. Use a relaxed, natural style. JPG · PNG · WebP up to ~10MB."})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-4 min-h-[400px]",children:["idle"===r&&(0,t.jsx)(p,{}),("loading"===r||"analyzing"===r)&&(0,t.jsx)(g,{}),"error"===r&&(0,t.jsx)(x,{message:n,onRetry:k}),"result"===r&&y&&(0,t.jsx)(b,{result:y})]})]})]})})}function p(){let e,a,s,n,i,l,o=(0,r.c)(6);return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("p",{className:"font-mono text-[11px] text-[#0047FF] uppercase tracking-widest mb-3",children:"How it works"}),o[0]=e):e=o[0],o[1]===Symbol.for("react.memo_cache_sentinel")?(a=(0,t.jsxs)("li",{className:"flex gap-3",children:[(0,t.jsx)("span",{className:"text-[#0047FF] font-bold",children:"01"}),(0,t.jsx)("span",{children:"FaceLandmarker locates 478 facial points to anchor the eyebrow line and chin."})]}),o[1]=a):a=o[1],o[2]===Symbol.for("react.memo_cache_sentinel")?(s=(0,t.jsxs)("li",{className:"flex gap-3",children:[(0,t.jsx)("span",{className:"text-[#0047FF] font-bold",children:"02"}),(0,t.jsx)("span",{children:"Image segmenter separates hair pixels from forehead skin."})]}),o[2]=s):s=o[2],o[3]===Symbol.for("react.memo_cache_sentinel")?(n=(0,t.jsxs)("li",{className:"flex gap-3",children:[(0,t.jsx)("span",{className:"text-[#0047FF] font-bold",children:"03"}),(0,t.jsx)("span",{children:"Geometric ratios â Norwood IâVII estimate + percentile vs adult baseline."})]}),o[3]=n):n=o[3],o[4]===Symbol.for("react.memo_cache_sentinel")?(i=(0,t.jsxs)("ol",{className:"space-y-3 font-mono text-xs text-gray-400",children:[a,s,n,(0,t.jsxs)("li",{className:"flex gap-3",children:[(0,t.jsx)("span",{className:"text-[#0047FF] font-bold",children:"04"}),(0,t.jsx)("span",{children:"Zero data ever leaves the browser. Refresh and it's gone."})]})]}),o[4]=i):i=o[4],o[5]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsxs)("div",{className:"border border-white/10 rounded-lg p-6 bg-[#0a0a0a]",children:[e,i,(0,t.jsx)("div",{className:"mt-6 pt-6 border-t border-white/10",children:(0,t.jsx)("p",{className:"font-mono text-[10px] text-gray-600 leading-relaxed",children:"DISCLAIMER · This is a self-screen tool, not a medical diagnosis. Front-facing photos can only reliably grade Norwood IâV; stages VIâVII require a top-down crown view."})})]}),o[5]=l):l=o[5],l}function g(){let e,a=(0,r.c)(1);return a[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("div",{className:"border border-white/10 rounded-lg p-6 bg-[#0a0a0a] flex items-center justify-center min-h-[300px]",children:(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)(l.Loader2,{className:"w-8 h-8 animate-spin text-[#0047FF] mb-4 mx-auto"}),(0,t.jsx)("p",{className:"font-mono text-xs text-gray-400 uppercase tracking-widest",children:"Crunching pixels locally"})]})}),a[0]=e):e=a[0],e}function x(e){let a,n,i,l,o,d,h=(0,r.c)(10),{message:u,onRetry:m}=e;return h[0]===Symbol.for("react.memo_cache_sentinel")?(a=(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,t.jsx)(s.default,{className:"w-4 h-4 text-red-400"}),(0,t.jsx)("p",{className:"font-mono text-xs text-red-300 uppercase tracking-widest",children:"Analysis failed"})]}),h[0]=a):a=h[0],h[1]!==u?(n=(0,t.jsx)("p",{className:"font-mono text-xs text-gray-400 leading-relaxed mb-4",children:u}),h[1]=u,h[2]=n):n=h[2],h[3]===Symbol.for("react.memo_cache_sentinel")?(i=(0,t.jsxs)("ul",{className:"font-mono text-[11px] text-gray-500 space-y-1 mb-5 leading-relaxed",children:[(0,t.jsx)("li",{children:"⢠Face must be clearly visible and front-facing"}),(0,t.jsx)("li",{children:"⢠Forehead can't be cropped out of the frame"}),(0,t.jsx)("li",{children:"⢠Strong shadows on the forehead reduce accuracy"})]}),h[3]=i):i=h[3],h[4]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsx)(c.RefreshCw,{className:"w-3.5 h-3.5"}),h[4]=l):l=h[4],h[5]!==m?(o=(0,t.jsxs)("button",{onClick:m,className:"inline-flex items-center gap-2 px-4 py-2 border border-white/15 text-gray-300 font-mono text-xs uppercase tracking-widest hover:bg-white/5 rounded",children:[l,"Try Again"]}),h[5]=m,h[6]=o):o=h[6],h[7]!==n||h[8]!==o?(d=(0,t.jsxs)("div",{className:"border border-red-500/30 rounded-lg p-6 bg-red-500/5",children:[a,n,i,o]}),h[7]=n,h[8]=o,h[9]=d):d=h[9],d}function b(e){var a,s;let i,l,o,c,d,u,m,f,p,g,x,b,j,_,S,k,N,F,R,I=(0,r.c)(44),{result:C}=e,z=100*v(C.metrics.foreheadHeightRatio/1.4,0,1),A=100*C.metrics.templeRecession,L=100*C.metrics.mPattern;I[0]===Symbol.for("react.memo_cache_sentinel")?(i=(0,t.jsx)("p",{className:"font-mono text-[11px] text-[#0047FF] uppercase tracking-widest mb-2",children:"Result"}),I[0]=i):i=I[0],I[1]!==C.label?(l=(0,t.jsx)("h3",{className:"font-display text-4xl font-bold mb-1",children:C.label}),I[1]=C.label,I[2]=l):l=I[2],I[3]!==C.gist?(o=(0,t.jsx)("p",{className:"font-mono text-xs text-gray-400 leading-relaxed mb-5",children:C.gist}),I[3]=C.gist,I[4]=o):o=I[4],I[5]===Symbol.for("react.memo_cache_sentinel")?(c=(0,t.jsx)("p",{className:"font-mono text-[10px] text-gray-500 uppercase tracking-widest mb-1",children:"Relative to adult baseline"}),I[5]=c):c=I[5],I[6]!==C.percentile?(d=(a=C.percentile)>=80?"top 20%":a>=60?"top 40%":a>=40?"middle band":a>=20?"lower 40%":"lower 20%",I[6]=C.percentile,I[7]=d):d=I[7],I[8]!==d?(u=(0,t.jsx)("span",{className:"text-[#0047FF] font-bold",children:d}),I[8]=d,I[9]=u):u=I[9],I[10]!==C.percentile?(m=(s=C.percentile)>=80?"denser frontal coverage than most adult men":s>=60?"above-average frontal coverage":s>=40?"roughly typical for adult men":s>=20?"visibly more recession than average":"significantly more recession than the average adult male",I[10]=C.percentile,I[11]=m):m=I[11],I[12]!==u||I[13]!==m?(f=(0,t.jsxs)("div",{className:"mb-5 p-4 rounded bg-black/30 border border-white/5",children:[c,(0,t.jsxs)("p",{className:"font-mono text-sm text-white leading-snug",children:["Your hairline sits in the"," ",u," ","for adult males â ",m,"."]})]}),I[12]=u,I[13]=m,I[14]=f):f=I[14],I[15]!==C.metrics.foreheadHeightRatio?(p=C.metrics.foreheadHeightRatio.toFixed(2),I[15]=C.metrics.foreheadHeightRatio,I[16]=p):p=I[16],I[17]!==z||I[18]!==p?(g=(0,t.jsx)(w,{label:"Forehead height",value:p,pct:z}),I[17]=z,I[18]=p,I[19]=g):g=I[19];let M=100*C.metrics.templeRecession;I[20]!==M?(x=M.toFixed(0),I[20]=M,I[21]=x):x=I[21];let P=`${x}%`;I[22]!==P||I[23]!==A?(b=(0,t.jsx)(w,{label:"Temple recession",value:P,pct:A}),I[22]=P,I[23]=A,I[24]=b):b=I[24];let E=100*C.metrics.mPattern;I[25]!==E?(j=E.toFixed(0),I[25]=E,I[26]=j):j=I[26];let T=`${j}%`;return I[27]!==L||I[28]!==T?(_=(0,t.jsx)(w,{label:"M-shape index",value:T,pct:L}),I[27]=L,I[28]=T,I[29]=_):_=I[29],I[30]!==g||I[31]!==b||I[32]!==_?(S=(0,t.jsxs)("div",{className:"space-y-3 mb-6",children:[g,b,_]}),I[30]=g,I[31]=b,I[32]=_,I[33]=S):S=I[33],I[34]!==C.notes?(k=C.notes.length>0&&(0,t.jsx)("ul",{className:"font-mono text-[11px] text-gray-500 space-y-1 mb-5 leading-relaxed",children:C.notes.map(y)}),I[34]=C.notes,I[35]=k):k=I[35],I[36]===Symbol.for("react.memo_cache_sentinel")?(N=(0,t.jsx)("p",{className:"font-mono text-[10px] text-gray-500 uppercase tracking-widest mb-3",children:"See what comes next"}),I[36]=N):N=I[36],I[37]===Symbol.for("react.memo_cache_sentinel")?(F=(0,t.jsxs)("div",{className:"pt-5 border-t border-white/10",children:[N,(0,t.jsxs)(h.Link,{href:"/bald-filter#generator",className:"w-full inline-flex items-center justify-center gap-2 px-5 py-3 bg-[#0047FF] text-white font-bold uppercase tracking-wider hover:bg-[#0035CC] transition-colors rounded text-sm",children:["Preview Yourself Bald",(0,t.jsx)(n.ArrowRight,{className:"w-4 h-4"})]}),(0,t.jsx)("p",{className:"font-mono text-[10px] text-gray-600 mt-2 text-center",children:"AI-generated HD photo · about a minute"})]}),I[37]=F):F=I[37],I[38]!==S||I[39]!==l||I[40]!==k||I[41]!==o||I[42]!==f?(R=(0,t.jsxs)("div",{className:"border border-[#0047FF]/40 rounded-lg p-6 bg-gradient-to-br from-[#0047FF]/10 to-transparent",children:[i,l,o,f,S,k,F]}),I[38]=S,I[39]=l,I[40]=k,I[41]=o,I[42]=f,I[43]=R):R=I[43],R}function y(e,r){return(0,t.jsxs)("li",{children:["⢠",e]},r)}function w(e){let a,s,n,i,l,o,c=(0,r.c)(14),{label:d,value:h,pct:u}=e;c[0]!==d?(a=(0,t.jsx)("span",{className:"font-mono text-[11px] text-gray-400 uppercase tracking-widest",children:d}),c[0]=d,c[1]=a):a=c[1],c[2]!==h?(s=(0,t.jsx)("span",{className:"font-mono text-[11px] text-white",children:h}),c[2]=h,c[3]=s):s=c[3],c[4]!==a||c[5]!==s?(n=(0,t.jsxs)("div",{className:"flex justify-between mb-1",children:[a,s]}),c[4]=a,c[5]=s,c[6]=n):n=c[6],c[7]!==u?(i=v(u,0,100),c[7]=u,c[8]=i):i=c[8];let m=`${i}%`;return c[9]!==m?(l=(0,t.jsx)("div",{className:"h-1.5 bg-white/5 rounded overflow-hidden",children:(0,t.jsx)("div",{className:"h-full bg-[#0047FF] transition-all duration-700",style:{width:m}})}
1),c[9]=m,c[10]=l):l=c[10],c[11]!==n||c[12]!==l?(o=(0,t.jsxs)("div",{children:[n,l]}),c[11]=n,c[12]=l,c[13]=o):o=c[13],o}function v(e,t,r){return Math.max(t,Math.min(r,e))}async function j(e,t,r){var a;let s,n;try{"function"==typeof e.decode&&await e.decode()}catch{}let i=e.naturalWidth,l=e.naturalHeight;if(!i||!l)throw Error("Image failed to decode. Try a JPG or PNG under 10MB.");let o=Math.min(1,1024/Math.max(i,l)),c=Math.round(i*o),d=Math.round(l*o),h=document.createElement("canvas");h.width=c,h.height=d;let u=h.getContext("2d",{willReadFrequently:!1});if(!u)throw Error("Browser canvas unavailable.");u.drawImage(e,0,0,c,d);let f=null;try{f=await createImageBitmap(h)}catch(e){console.warn("[norwood] createImageBitmap failed",e)}let p=[["imageElement",e],["bitmap",f],["canvas",h]].filter(([,e])=>e),g=null,x=null;for(let[e,r]of p)try{let a=t.detect(r);if(a){g=a,console.log("[norwood] faceLandmarker.detect succeeded with",e);break}}catch(t){console.warn("[norwood] faceLandmarker.detect failed with",e,t),x=t}if(!g){f&&f.close();let e=x?.message||x?.toString?.()||"unknown";throw Error(`FaceLandmarker.detect rejected all input types â ${e}`)}let b=g?.faceLandmarks;if(!b||0===b.length)throw f&&f.close(),Error("No face detected. Use a clear front-facing photo.");let y=b[0],w=null,j=null;for(let[e,t]of p)try{let a=r.segment(t);if(a){w=a,console.log("[norwood] segmenter.segment succeeded with",e);break}}catch(t){console.warn("[norwood] segmenter.segment failed with",e,t),j=t}if(!w){f&&f.close();let e=j?.message||j?.toString?.()||"unknown";throw Error(`ImageSegmenter.segment rejected all inputs â ${e}`)}let S=w.categoryMask;if(!S)throw f&&f.close(),Error("Segmentation unavailable on this device.");let k=S.width,N=S.height,F=S.getAsUint8Array();f&&f.close();let R=y[9],I=y[152],C=_(y[70],y[105],y[107]),z=_(y[336],y[334],y[300]),A=(C.y+z.y)/2,L=((C.x+z.x)/2+R.x)/2,M=I.y-A;if(M<=.05)throw Error("Face is tilted or partially out of frame.");let P=Math.round(L*k),E=Math.max(1,Math.round(.04*k)),T=Math.round(A*N),O=-1;for(let e=T;e>=0;e--){let t=0,r=0;for(let a=-E;a<=E;a++){let s=P+a;!(s<0)&&!(s>=k)&&(r++,1===F[e*k+s]&&t++)}if(r>0&&t/r>=.5){O=e;break}}let U=-1===O;U&&(O=0);let H=(T-O)/N/M,B=y[33],$=Math.abs(y[263].x-B.x);if($<=.05)throw Error("Face is rotated or partially out of frame.");let q=v(T,0,N-1),V=$*k/2,G=Math.round(L*k),D=e=>{for(let t=0;t<k;t++){let r=G+e*t;if(r<0||r>=k||1===F[q*k+r])return t}return k},X=v(((D(-1)+D(1))/2-V)/V,0,1),W=v(Math.round((L-.25*$)*k),0,k-1),Y=v(Math.round((L+.25*$)*k),0,k-1),J=e=>{for(let t=T;t>=0;t--)if(1===F[t*k+e])return t;return 0},K=v((T-(J(W)+J(Y))/2)/N/M-H,0,1)+.4*v(X,0,1),Z=v(K,0,1),Q=1;(Q=H<.5?1:H<.6?2:H<.75?3:H<.9?4:H<1.05?5:H<1.25?6:7)<=2&&X>.4&&(Q=Math.min(7,Q+1));let ee=v((1-(n=1/(1+.3275911*(s=Math.abs(a=(H-.55)/.18)/Math.sqrt(2))),.5*(1+(a<0?-1:1)*(1-((((1.061405429*n-1.453152027)*n+1.421413741)*n-.284496736)*n+.254829592)*n*Math.exp(-s*s)))))*100,0,100),et=[];return U&&et.push("Hairline sits outside the photo crop â true Norwood may be higher than shown."),Z>.55&&Q<=3&&et.push('Pattern leans M-shaped (Norwood-style "A" variant possible).'),Q>=5&&et.push("Frontal view alone undercounts crown loss â top-down photo recommended."),{stage:Q,label:m[Q].label,gist:m[Q].gist,metrics:{foreheadHeightRatio:H,templeRecession:X,mPattern:Z},percentile:ee,notes:et}}function _(...e){let t=e.length,r=0,a=0;for(let t of e)r+=t.x,a+=t.y;return{x:r/t,y:a/t}}e.s(["NorwoodAnalyzer",()=>f],194784)},721590,e=>{e.v(t=>Promise.all(["static/chunks/d0562bd392cf0e9c.js","static/chunks/a3d46db6d80b41ad.js"].map(t=>e.l(t))).then(()=>t(617299)))},639058,e=>{e.v(t=>Promise.all(["static/chunks/0504fde18e307c6f.js"].map(t=>e.l(t))).then(()=>t(389125)))},748180,e=>{e.v(t=>Promise.all(["static/chunks/62fa8bdfb251658b.js"].map(t=>e.l(t))).then(()=>t(167026)))},265477,e=>{e.v(t=>Promise.all(["static/chunks/01c72bf744e8486e.js"].map(t=>e.l(t))).then(()=>t(904534)))},389437,e=>{e.v(t=>Promise.all(["static/chunks/9c059f5b8f4e3fb4.js"].map(t=>e.l(t))).then(()=>t(634859)))},262283,e=>{e.v(t=>Promise.all(["static/chunks/f0669e6a8a027d44.js"].map(t=>e.l(t))).then(()=>t(987529)))},932140,e=>{e.v(t=>Promise.all(["static/chunks/199bf1c64ac2af7e.js"].map(t=>e.l(t))).then(()=>t(106159)))},269794,e=>{e.v(t=>Promise.all(["static/chunks/ac33491a8a05f369.js"].map(t=>e.l(t))).then(()=>t(926918)))}]);
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.