PageSourceSearch

https://eyeshapedetector.app/_next/static/chunks/app/%5Blang%5D/page-53dacd69551af6b0.js

js eyeshapedetector.app collected 2026-10-06 09:06:38 UTC 12,158 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[495],{7331:function(e,t,l){Promise.resolve().then(l.bind(l,9114))},9376:function(e,t,l){"use strict";var r=l(5475);l.o(r,"usePathname")&&l.d(t,{usePathname:function(){return r.usePathname}}),l.o(r,"useRouter")&&l.d(t,{useRouter:function(){return r.useRouter}})},7658:function(e,t,l){"use strict";let r,s;var a=this&&this.__createBinding||(Object.create?function(e,t,l,r){void 0===r&&(r=l);var s=Object.getOwnPropertyDescriptor(t,l);(!s||("get"in s?!t.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return t[l]}}),Object.defineProperty(e,r,s)}:function(e,t,l,r){void 0===r&&(r=l),e[r]=t[l]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var l in e)"default"!==l&&Object.prototype.hasOwnProperty.call(e,l)&&a(t,e,l);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.useTurnstile=t.Turnstile=void 0;let o=n(l(2265)),d="undefined"!=typeof globalThis?globalThis:window,c=void 0!==d.turnstile?"ready":"unloaded",u=new Promise((e,t)=>{s={resolve:e,reject:t},"ready"===c&&e(void 0)});{let e="cf__reactTurnstileOnLoad";r=()=>{if("unloaded"===c){c="loading",d[e]=()=>{s.resolve(),c="ready",delete d[e]};let t=`https://challenges.cloudflare.com/turnstile/v0/api.js?onload=${e}&render=explicit`,l=document.createElement("script");l.src=t,l.async=!0,l.addEventListener("error",()=>{s.reject("Failed to load Turnstile."),delete d[e]}),document.head.appendChild(l)}return u}}function m({id:e,className:t,style:l,sitekey:s,action:a,cData:i,theme:n,language:d,tabIndex:u,responseField:m,responseFieldName:h,size:x,fixedSize:f,retry:p,retryInterval:v,refreshExpired:g,appearance:b,execution:j,userRef:w,onVerify:y,onSuccess:N,onLoad:k,onError:I,onExpire:E,onTimeout:_,onAfterInteractive:A,onBeforeInteractive:O,onUnsupported:S}){let L=(0,o.useRef)(null),M=(0,o.useState)({onVerify:y,onSuccess:N,onLoad:k,onError:I,onExpire:E,onTimeout:_,onAfterInteractive:A,onBeforeInteractive:O,onUnsupported:S})[0],P=null!=w?w:L,R=f?{width:"compact"===x?"130px":"flexible"===x?"100%":"300px",height:"compact"===x?"120px":"65px",...l}:l;return(0,o.useEffect)(()=>{if(!P.current)return;let e=!1,t="";return(async()=>{var l,o,f;let w;if("ready"!==c)try{await r()}catch(e){null===(l=M.onError)||void 0===l||l.call(M,e);return}!e&&P.current&&(f=t=window.turnstile.render(P.current,{sitekey:s,action:a,cData:i,theme:n,language:d,tabindex:u,"response-field":m,"response-field-name":h,size:x,retry:p,"retry-interval":v,"refresh-expired":g,appearance:b,execution:j,callback:(e,t)=>{var l,r;null===(l=M.onVerify)||void 0===l||l.call(M,e,w),null===(r=M.onSuccess)||void 0===r||r.call(M,e,t,w)},"error-callback":e=>{var t;return null===(t=M.onError)||void 0===t?void 0:t.call(M,e,w)},"expired-callback":e=>{var t;return null===(t=M.onExpire)||void 0===t?void 0:t.call(M,e,w)},"timeout-callback":()=>{var e;return null===(e=M.onTimeout)||void 0===e?void 0:e.call(M,w)},"after-interactive-callback":()=>{var e;return null===(e=M.onAfterInteractive)||void 0===e?void 0:e.call(M,w)},"before-interactive-callback":()=>{var e;return null===(e=M.onBeforeInteractive)||void 0===e?void 0:e.call(M,w)},"unsupported-callback":()=>{var e;return null===(e=M.onUnsupported)||void 0===e?void 0:e.call(M,w)}}),w={execute:e=>window.turnstile.execute(f,e),reset:()=>window.turnstile.reset(f),getResponse:()=>window.turnstile.getResponse(f),isExpired:()=>window.turnstile.isExpired(f)},null===(o=M.onLoad)||void 0===o||o.call(M,t,w))})(),()=>{e=!0,t&&window.turnstile.remove(t)}},[s,a,i,n,d,u,m,h,x,p,v,g,b,j]),(0,o.useEffect)(()=>{M.onVerify=y,M.onSuccess=N,M.onLoad=k,M.onError=I,M.onExpire=E,M.onTimeout=_,M.onAfterInteractive=A,M.onBeforeInteractive=O,M.onUnsupported=S},[y,N,k,I,E,_,A,O,S]),o.default.createElement("div",{ref:P,id:e,className:t,style:R})}t.Turnstile=m,t.default=m,t.useTurnstile=function(){let[e,t]=(0,o.useState)(c);return(0,o.useEffect)(()=>{"ready"!==c&&u.then(()=>t(c))},[]),d.turnstile}},9114:function(e,t,l){"use strict";l.d(t,{ImageDetector:function(){return d}});var r=l(7437),s=l(2265),a=l(9376),i=l(7658),n=l.n(i),o=l(3448);function d(e){let{params:t,dict:l}
1=e,i=(0,a.useRouter)(),[d,c]=(0,s.useState)(!1),[u,m]=(0,s.useState)(""),[h,x]=(0,s.useState)(null),[f,p]=(0,s.useState)(null),v=async()=>{if(u){c(!0);try{let e=await fetch("/api/detector",{method:"POST",body:JSON.stringify({image:u,token:f,language:t.lang})}),l=await e.json();if(console.log(l),200!=l.code){alert(l.message);return}sessionStorage.removeItem("apiResult"),sessionStorage.setItem("apiResult",JSON.stringify(l));let r=sessionStorage.getItem("apiResult");console.log(r),"en"===t.lang?i.push("/result"):i.push("/zh/result")}catch(e){console.error("Error detector:",e)}finally{c(!1)}}};return(0,r.jsx)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:(0,r.jsx)("div",{className:"bg-white/90 backdrop-blur-sm rounded-3xl shadow-2xl border border-white/30 overflow-hidden transition-all duration-500 hover:shadow-3xl",children:(0,r.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 min-h-[700px]",children:[(0,r.jsx)("div",{className:"bg-gradient-to-br from-white to-slate-50/80 flex flex-col justify-center",children:(0,r.jsxs)("div",{className:"max-w-lg mx-auto w-full",children:[(0,r.jsxs)("div",{className:"mb-6",children:[(0,r.jsx)("div",{className:"text-2xl font-semibold text-gray-800 py-4",children:l.home.editImage.uploadPhoto}),(0,r.jsxs)("div",{className:"space-y-2 text-sm text-gray-600",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),(0,r.jsx)("span",{children:l.home.editImage.takeAPhoto})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),(0,r.jsx)("span",{children:l.home.editImage.ensureBothEyesAreVisible})]})]})]}),(0,r.jsx)("div",{className:"mb-6",children:(0,r.jsxs)("div",{className:"flex bg-gray-100 rounded-xl p-1",children:[(0,r.jsx)("a",{href:"#",className:"flex-1 py-2 px-4 rounded-lg text-sm font-medium transition-all duration-200 bg-white text-blue-600 shadow-sm",children:l.home.editImage.nav.upload}),(0,r.jsx)("a",{href:"en"===t.lang?"/camera":"/".concat(t.lang,"/camera"),className:"flex-1 py-2 px-4 rounded-lg text-sm font-medium transition-all duration-200",children:l.home.editImage.nav.camera})]})}),(0,r.jsx)("div",{className:"mb-6",children:u?(0,r.jsxs)("div",{className:"relative group",children:[(0,r.jsxs)("div",{className:"relative overflow-hidden rounded-2xl border-2 border-slate-200 shadow-lg",children:[(0,r.jsx)("img",{src:u,alt:"Uploaded preview",className:"w-full h-80 object-cover"}),(0,r.jsx)("div",{className:"absolute inset-0 bg-black/0 group-hover:bg-black/10 transition-all duration-300",children:(0,r.jsx)("button",{onClick:()=>{m(""),x(null)},className:"absolute top-3 right-3 bg-red-500/90 hover:bg-red-600 text-white p-2 rounded-full transition-all duration-300 hover:scale-110 shadow-lg",title:"Remove image",children:(0,r.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})})]}),(0,r.jsxs)("p",{className:"text-sm text-green-600 mt-3 text-center font-medium",children:["✓ ",l.home.editImage.photoUploadedSuccessfully]})]}):(0,r.jsxs)("div",{className:"relative group",children:[(0,r.jsx)("input",{type:"file",accept:"image/*",onChange:e=>{var t;let l=null===(t=e.target.files)||void 0===t?void 0:t[0];if(l){if(!l.type.startsWith("image/")){alert("Please select a valid image file");return}if(l.size>10485760){alert("File size must be less than 10MB");return}x(l);let e=new FileReader;e.onload=e=>{var t;m(null===(t=e.target)||void 0===t?void 0:t.result)},e.readAsDataURL(l)}},className:"absolute inset-0 w-full h-full opacity-0 cursor-pointer z-10",id:"image-upload"}),(0,r.jsx)("label",{htmlFor:"image-upload",className:"flex flex-col items-center justify-center w-full h-80 border-2 border-dashed border-slate-300 rounded-2xl bg-gradient-to-br from-slate-50 to-blue-50/30 hover:border-blue-400 hover:bg-blue-50/50 transition-all duration-300 cursor-pointer group",children:(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center p-8",children:[(0,r.jsx)("div",{className:"w-20 h-20 mb-4 text-slate-400 group-hover:text-blue-500 transition-colors duration-300",children:(0,r.jsx)("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",className:"w-full h-full",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})})}),(0,r.jsx)("p",{className:"text-xl font-semibold text-slate-600 group-hover:text-blue-600 mb-2",children:l.home.editImage.clickToUpload}),(0,r.jsx)("p",{className:"text-sm text-slate-500",children:l.home.editImage.pngJpgUpTo10M
1B})]})})]})}),(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)(n(),{sitekey:o.Q,onVerify:e=>p(e),theme:"auto",style:{transform:"scale(0.8)"}}),(0,r.jsxs)("button",{onClick:v,disabled:d||!u||!f,className:"group relative bg-gradient-to-r from-blue-600 to-indigo-600 text-white px-10 py-4 rounded-2xl font-semibold text-lg hover:from-blue-700 hover:to-indigo-700 disabled:opacity-50 disabled:cursor-not-allowed transition-all duration-300 shadow-xl hover:shadow-2xl hover:scale-105 disabled:hover:scale-100 disabled:hover:shadow-xl overflow-hidden w-full",children:[(0,r.jsx)("span",{className:"relative z-10 flex items-center justify-center gap-3",children:d?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"w-5 h-5 border-2 border-white/30 border-t-white rounded-full animate-spin"}),l.home.editImage.loading]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"})}),l.home.editImage.analyzeEyeShape]})}),(0,r.jsx)("div",{className:"absolute inset-0 bg-gradient-to-r from-blue-700 to-indigo-700 opacity-0 group-hover:opacity-100 transition-opacity duration-300"})]})]})]})}),(0,r.jsxs)("div",{className:"p-6 sm:p-8 lg:p-12 bg-gradient-to-br from-slate-50 to-blue-50/30 flex flex-col justify-center",children:[(0,r.jsxs)("div",{className:"text-center mb-6",children:[(0,r.jsx)("span",{className:"text-2xl font-semibold text-gray-800 mb-2",children:l.home.editImage.example}),(0,r.jsx)("p",{className:"text-gray-600",children:l.home.editImage.exampleDescription})]}),(0,r.jsx)("div",{className:"relative h-full max-h-96",children:(0,r.jsx)("img",{src:(t.lang,"/images/eye-shape-sample.png"),alt:"Eye shape sample",className:"w-full h-full object-contain rounded-2xl shadow-lg"})}),(0,r.jsxs)("div",{className:"mt-6 p-4 bg-blue-50 rounded-xl",children:[(0,r.jsxs)("span",{className:"font-semibold text-blue-800 mb-2",children:["\uD83D\uDCA1 ",l.home.editImage.tipsForBestResults,":"]}),(0,r.jsxs)("ul",{className:"text-sm text-blue-700 space-y-1",children:[(0,r.jsxs)("li",{children:["• ",l.home.editImage.useGoodLighting]}),(0,r.jsxs)("li",{children:["• ",l.home.editImage.keepYourEyesOpenAndRelaxed]}),(0,r.jsxs)("li",{children:["• ",l.home.editImage.lookDirectlyAtTheCamera]}),(0,r.jsxs)("li",{children:["• ",l.home.editImage.avoidHeavyMakeupOrGlasses]})]})]})]})]})})})}},3448:function(e,t,l){"use strict";l.d(t,{Q:function(){return a},cn:function(){return i}});var r=l(1994),s=l(3335);let a="0x4AAAAAAB6-emcL2P_C3yL5";function i(){for(var e=arguments.length,t=Array(e),l=0;l<e;l++)t[l]=arguments[l];return(0,s.m6)((0,r.W)(t))}}},function(e){e.O(0,[137,971,30,744],function(){return e(e.s=7331)}),_N_E=e.O()}]);

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.