(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,90368,e=>{"use strict";var t,a,i,r,n,s,l,o;let c,d,u,m,h,p;(r=t||(t={})).Unimplemented="UNIMPLEMENTED",r.Unavailable="UNAVAILABLE";class g extends Error{constructor(e,t,a){super(e),this.message=e,this.code=t,this.data=a}}let b=(c=(s=n="u">typeof globalThis?globalThis:"u">typeof self?self:"u">typeof window?window:e.g).CapacitorCustomPlatform||null,u=(d=s.Capacitor||{}).Plugins=d.Plugins||{},m=()=>{var e,t;return null!==c?c.name:(null==s?void 0:s.androidBridge)?"android":(null==(t=null==(e=null==s?void 0:s.webkit)?void 0:e.messageHandlers)?void 0:t.bridge)?"ios":"web"},h=e=>{var t;return null==(t=d.PluginHeaders)?void 0:t.find(t=>t.name===e)},p=new Map,d.convertFileSrc||(d.convertFileSrc=e=>e),d.getPlatform=m,d.handleError=e=>s.console.error(e),d.isNativePlatform=()=>"web"!==m(),d.isPluginAvailable=e=>{let t=p.get(e);return!!((null==t?void 0:t.platforms.has(m()))||h(e))},d.registerPlugin=function(e){let a,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=p.get(e);if(r)return console.warn('Capacitor plugin "'.concat(e,'" already registered. Cannot register plugins twice.')),r.proxy;let n=m(),s=h(e),l=async()=>(!a&&n in i?a=a="function"==typeof i[n]?await i[n]():i[n]:null!==c&&!a&&"web"in i&&(a=a="function"==typeof i.web?await i.web():i.web),a),o=a=>{let i,r=function(){for(var r=arguments.length,o=Array(r),c=0;c{let l=((a,i)=>{var r,l;if(s){let t=null==s?void 0:s.methods.find(e=>i===e.name);if(t)if("promise"===t.rtype)return t=>d.nativePromise(e,i.toString(),t);else return(t,a)=>d.nativeCallback(e,i.toString(),t,a);if(a)return null==(r=a[i])?void 0:r.bind(a)}else if(a)return null==(l=a[i])?void 0:l.bind(a);else throw new g('"'.concat(e,'" plugin is not implemented on ').concat(n),t.Unimplemented)})(r,a);if(l){let e=l(...o);return i=null==e?void 0:e.remove,e}throw new g('"'.concat(e,".").concat(a,'()" is not implemented on ').concat(n),t.Unimplemented)});return"addListener"===a&&(u.remove=async()=>i()),u};return r.toString=()=>"".concat(a.toString(),"() { [capacitor code] }"),Object.defineProperty(r,"name",{value:a,writable:!1,configurable:!1}),r},b=o("addListener"),f=o("removeListener"),x=(e,t)=>{let a=b({eventName:e},t),i=async()=>{f({eventName:e,callbackId:await a},t)},r=new Promise(e=>a.then(()=>e({remove:i})));return r.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await i()},r},v=new Proxy({},{get(e,t){switch(t){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return s?x:b;case"removeListener":return f;default:return o(t)}}});return u[e]=v,p.set(e,{name:e,proxy:v,platforms:new Set([...Object.keys(i),...s?[n]:[]])}),v},d.Exception=g,d.DEBUG=!!d.DEBUG,d.isLoggingEnabled=!!d.isLoggingEnabled,n.Capacitor=d),f=b.registerPlugin;class x{addListener(e,t){let a=!1;this.listeners[e]||(this.listeners[e]=[],a=!0),this.listeners[e].push(t);let i=this.windowListeners[e];return i&&!i.registered&&this.addWindowListener(i),a&&this.sendRetainedArgumentsForEvent(e),Promise.resolve({remove:async()=>this.removeListener(e,t)})}async removeAllListeners(){for(let e in this.listeners={},this.windowListeners)this.removeWindowListener(this.windowListeners[e]);this.windowListeners={}}notifyListeners(e,t,a){let i=this.listeners[e];if(!i){if(a){let a=this.retainedEventArguments[e];a||(a=[]),a.push(t),this.retainedEventArguments[e]=a}return}i.forEach(e=>e(t))}hasListeners(e){var t;return!!(null==(t=this.listeners[e])?void 0:t.length)}registerWindowListener(e,t){this.windowListeners[t]={registered:!1,windowEventName:e,pluginEventName:t,handler:e=>{this.notifyListeners(t,e)}}}unimplemented(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"not implemented";return new b.Exception(e,t.Unimplemented)}unavailable(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"not available";return new b.Exception(e,t.Unavailable)}async removeListener(e,t){let a=this.listeners[e];if(!a)return;let i=a.indexOf(t);this.listeners[e].splice(i,1),this.listeners[e].length||this.removeWindowListener(this.windowListeners[e])}addWindowListener(e){window.addEventListener(e.windowEventName,e.handler),e.registered=!0}removeWindowListener(e){e&&(window.removeEventListener(e.windowEventName,e.handler),e.registered=!1)}sendRetainedArgumentsForEvent(e){let t=this.retainedEventArguments[e];t&&(delete this.retainedEventArguments[e],t.forEach(t=>{this.notifyListeners(e,t)}))}constructor(){this.listeners={},this.retainedEventArguments={},this.windowListeners={}}}let v=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);class w extends x{async getCookies(){let e=document.cookie,t={};return e.split(";").forEach(e=>{if(e.length<=0)return;let[a,i]=e.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");a=a.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent).trim(),i=i.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent).trim(),t[a]=i}),t}async setCookie(e){try{let t=v(e.key),a=v(e.value),i=e.expires?"; expires=".concat(e.expires.replace("expires=","")):"",r=(e.path||"/").replace("path=",""),n=null!=e.url&&e.url.length>0?"domain=".concat(e.url):"";document.cookie="".concat(t,"=").concat(a||"").concat(i,"; path=").concat(r,"; ").concat(n,";")}catch(e){return Promise.reject(e)}}async deleteCookie(e){try{document.cookie="".concat(e.key,"=; Max-Age=0")}catch(e){return Promise.reject(e)}}async clearCookies(){try{for(let e of document.cookie.split(";")||[])document.cookie=e.replace(/^ +/,"").replace(/=.*/,"=;expires=".concat(new Date().toUTCString(),";path=/"))}catch(e){return Promise.reject(e)}}async clearAllCookies(){try{await this.clearCookies()}catch(e){return Promise.reject(e)}}}f("CapacitorCookies",{web:()=>new w});let y=async e=>new Promise((t,a)=>{let i=new FileReader;i.onload=()=>{let e=i.result;t(e.indexOf(",")>=0?e.split(",")[1]:e)},i.onerror=e=>a(e),i.readAsDataURL(e)}),k=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.keys(e);return Object.keys(e).map(e=>e.toLocaleLowerCase()).reduce((a,i,r)=>(a[i]=e[t[r]],a),{})},j=function(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return e?Object.entries(e).reduce((e,a)=>{let i,r,[n,s]=a;return Array.isArray(s)?(r="",s.forEach(e=>{i=t?encodeURIComponent(e):e,r+="".concat(n,"=").concat(i,"&")}),r.slice(0,-1)):(i=t?encodeURIComponent(s):s,r="".concat(n,"=").concat(i)),"".concat(e,"&").concat(r)},"").substr(1):null},N=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=Object.assign({method:e.method||"GET",headers:e.headers},t),i=k(e.headers)["content-type"]||"";if("string"==typeof e.data)a.body=e.data;else if(i.includes("application/x-www-form-urlencoded")){let t=new URLSearchParams;for(let[a,i]of Object.entries(e.data||{}))t.set(a,i);a.body=t.toString()}else if(i.includes("multipart/form-data")||e.data instanceof FormData){let t=new FormData;if(e.data instanceof FormData)e.data.forEach((e,a)=>{t.append(a,e)});else for(let a of Object.keys(e.data))t.append(a,e.data[a]);a.body=t;let i=new Headers(a.headers);i.delete("content-type"),a.headers=i}else(i.includes("application/json")||"object"==typeof e.data)&&(a.body=JSON.stringify(e.data));return a};class C extends x{async request(e){let t,a,i=N(e,e.webFetchExtra),r=j(e.params,e.shouldEncodeUrlParams),n=r?"".concat(e.url,"?").concat(r):e.url,s=await fetch(n,i),l=s.headers.get("content-type")||"",{responseType:o="text"}=s.ok?e:{};switch(l.includes("application/json")&&(o="json"),o){case"arraybuffer":case"blob":a=await s.blob(),t=await y(a);break;case"json":t=await s.json();break;default:t=await s.text()}let c={};return s.headers.forEach((e,t)=>{c[t]=e}),{data:t,headers:c,status:s.status,url:s.url}}async get(e){return this.request(Object.assign(Object.assign({},e),{method:"GET"}))}async post(e){return this.request(Object.assign(Object.assign({},e),{method:"POST"}))}async put(e){return this.request(Object.assign(Object.assign({},e),{method:"PUT"}))}async patch(e){return this.request(Object.assign(Object.assign({},e),{method:"PATCH"}))}async delete(e){return this.request(Object.assign(Object.assign({},e),{method:"DELETE"}))}}f("CapacitorHttp",{web:()=>new C}),(l=a||(a={})).Dark="DARK",l.Light="LIGHT",l.Default="DEFAULT",(o=i||(i={})).StatusBar="StatusBar",o.NavigationBar="NavigationBar";class E extends x{async setStyle(){this.unavailable("not available for web")}async setAnimation(){this.unavailable("not available for web")}async show(){this.unavailable("not available for web")}async hide(){this.unavailable("not available for web")}}f("SystemBars",{web:()=>new E}),e.s(["Capacitor",()=>b,"CapacitorException",()=>g,"WebPlugin",()=>x,"buildRequestInit",()=>N,"registerPlugin",()=>f])},70887,e=>{"use strict";var t=e.i(1602),a=e.i(6308),i=e.i(26129),r=e.i(82094),n=e.i(27014),s=e.i(29073),l=e.i(59362),o=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,n)=>{let o=(0,s.createSlot)("Primitive.".concat(n)),c=r.forwardRef((e,r)=>{let{asChild:s}=e,c=(0,i._)(e,["asChild"]),d=s?o:n;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,l.jsx)(d,(0,a._)((0,t._)({},c),{ref:r}))});return c.displayName="Primitive.".concat(n),(0,a._)((0,t._)({},e),{[n]:c})},{});function c(e,t){e&&n.flushSync(()=>e.dispatchEvent(t))}e.s(["Primitive",()=>o,"dispatchDiscreteCustomEvent",()=>c])},50215,e=>{"use strict";var t=e.i(1602),a=e.i(26129),i=e.i(59362),r=e.i(29959);function n(e){let{className:n,type:s}=e,l=(0,a._)(e,["className","type"]);return(0,i.jsx)("input",(0,t._)({type:s,"data-slot":"input",className:(0,r.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",n)},l))}e.s(["Input",()=>n])},23649,e=>{"use strict";var t=e.i(1602),a=e.i(26129),i=e.i(59362),r=e.i(26355),n=e.i(23959),s=e.i(29959);let l=(0,r.cva)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function o(e){let{className:r,variant:o="default",size:c="default",asChild:d=!1}=e,u=(0,a._)(e,["className","variant","size","asChild"]),m=d?n.Slot.Root:"button";return(0,i.jsx)(m,(0,t._)({"data-slot":"button","data-variant":o,"data-size":c,className:(0,s.cn)(l({variant:o,size:c,className:r}))},u))}e.s(["Button",()=>o])},89282,50549,69686,9929,e=>{"use strict";function t(e,t){let{checkForDefaultPrevented:a=!0}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(i){if(null==e||e(i),!1===a||!i.defaultPrevented)return null==t?void 0:t(i)}}"u">typeof window&&window.document&&window.document.createElement,e.s(["composeEventHandlers",()=>t],89282);var a,i=e.i(1602),r=e.i(6308),n=e.i(26129),s=e.i(82094),l=e.i(59362);function o(e,t){let a=s.createContext(t),i=e=>{let{children:t}=e,i=(0,n._)(e,["children"]),r=s.useMemo(()=>i,Object.values(i));return(0,l.jsx)(a.Provider,{value:r,children:t})};return i.displayName=e+"Provider",[i,function(i){let r=s.useContext(a);if(r)return r;if(void 0!==t)return t;throw Error("`".concat(i,"` must be used within `").concat(e,"`"))}]}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],a=[],o=()=>{let t=a.map(e=>s.createContext(e));return function(a){let n=(null==a?void 0:a[e])||t;return s.useMemo(()=>({["__scope".concat(e)]:(0,r._)((0,i._)({},a),{[e]:n})}),[a,n])}};return o.scopeName=e,[function(t,i){let r=s.createContext(i),o=a.length;a=[...a,i];let c=t=>{var a;let{scope:i,children:c}=t,d=(0,n._)(t,["scope","children"]),u=(null==i||null==(a=i[e])?void 0:a[o])||r,m=s.useMemo(()=>d,Object.values(d));return(0,l.jsx)(u.Provider,{value:m,children:c})};return c.displayName=t+"Provider",[c,function(a,n){var l;let c=(null==n||null==(l=n[e])?void 0:l[o])||r,d=s.useContext(c);if(d)return d;if(void 0!==i)return i;throw Error("`".concat(a,"` must be used within `").concat(t,"`"))}]},function(){for(var e=arguments.length,t=Array(e),a=0;a{let e=t.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(t){let a=e.reduce((e,a)=>{let{useScope:r,scopeName:n}=a,s=r(t)["__scope".concat(n)];return(0,i._)({},e,s)},{});return s.useMemo(()=>({["__scope".concat(r.scopeName)]:a}),[a])}};return n.scopeName=r.scopeName,n}(o,...t)]}e.s(["createContext",()=>o,"createContextScope",()=>c],50549);var d=(null==(a=globalThis)?void 0:a.document)?s.useLayoutEffect:()=>{};e.s(["useLayoutEffect",()=>d],69686),s[" useEffectEvent ".trim().toString()],s[" useInsertionEffect ".trim().toString()];var u=s[" useInsertionEffect ".trim().toString()]||d;function m(e){let{prop:t,defaultProp:a,onChange:i=()=>{},caller:r}=e,[n,l,o]=function(e){let{defaultProp:t,onChange:a}=e,[i,r]=s.useState(t),n=s.useRef(i),l=s.useRef(a);return u(()=>{l.current=a},[a]),s.useEffect(()=>{if(n.current!==i){var e;null==(e=l.current)||e.call(l,i),n.current=i}},[i,n]),[i,r,l]}({defaultProp:a,onChange:i}),c=void 0!==t,d=c?t:n;{let e=s.useRef(void 0!==t);s.useEffect(()=>{let t=e.current;if(t!==c){let e=c?"controlled":"uncontrolled";console.warn("".concat(r," is changing from ").concat(t?"controlled":"uncontrolled"," to ").concat(e,". Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component."))}e.current=c},[c,r])}return[d,s.useCallback(e=>{if(c){let i="function"==typeof e?e(t):e;if(i!==t){var a;null==(a=o.current)||a.call(o,i)}}else l(e)},[c,t,l,o])]}Symbol("RADIX:SYNC_STATE"),e.s(["useControllableState",()=>m],9929)},35086,(e,t,a)=>{t.exports=e.r(20990)},99087,e=>{"use strict";let t=(0,e.i(60959).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(["Eye",()=>t],99087)},75811,13621,e=>{"use strict";var t=e.i(60959);let a=(0,t.default)("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);e.s(["EyeOff",()=>a],75811);let i=(0,t.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(["Lock",()=>i],13621)},9864,e=>{"use strict";var t=e.i(59362),a=e.i(82094),i=e.i(35086),r=e.i(78420),n=e.i(54437),s=e.i(87345),l=e.i(67122),o=e.i(99087),c=e.i(75811),d=e.i(13621),u=e.i(60959);let m=(0,u.default)("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]),h=(0,u.default)("fingerprint-pattern",[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]]);var p=e.i(23649),g=e.i(50215),b=e.i(79471),f=e.i(90368);let x=null,v=null;async function w(){return!!f.Capacitor.isNativePlatform()&&(x||(x=(await e.A(74261)).BiometricAuth),v||(v=(await e.A(73645)).Preferences),!0)}let y="biometric_credentials",k="biometric_enabled";async function j(){try{if(!await w())return!1;let e=await x.checkBiometry();return(null==e?void 0:e.isAvailable)===!0}catch(e){return console.warn("[Biometric] checkBiometry error:",e),!1}}async function N(){try{if(!await w())return!1;let{value:e}=await v.get({key:k});return"true"===e}catch(e){return!1}}async function C(){try{if(!await w())return!1;return await x.authenticate({reason:"Login ke Kost Annisa",cancelTitle:"Batal",allowDeviceCredential:!0}),!0}catch(e){return console.warn("[Biometric] authenticate error:",e),!1}}async function E(e){await w()&&(await v.set({key:y,value:JSON.stringify(e)}),await v.set({key:k,value:"true"}))}async function S(){try{if(!await w())return null;let{value:e}=await v.get({key:y});if(!e)return null;return JSON.parse(e)}catch(e){return null}}function L(e){let{onClose:i}=e,[r,o]=(0,a.useState)(""),[c,d]=(0,a.useState)(!1),[u,h]=(0,a.useState)(!1),f=async e=>{e.preventDefault(),d(!0);try{await n.api.forgotPassword(r),h(!0)}catch(e){s.toast.error("Gagal mengirim email. Coba lagi.")}finally{d(!1)}};return u?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(b.DialogHeader,{children:[(0,t.jsx)(b.DialogTitle,{className:"flex items-center gap-2",children:"✅ Email Terkirim"}),(0,t.jsxs)(b.DialogDescription,{children:["Jika email ",(0,t.jsx)("span",{className:"font-semibold",children:r})," terdaftar di sistem, link reset password sudah dikirim."]})]}),(0,t.jsxs)("div",{className:"rounded-lg bg-blue-50 border border-blue-100 p-4 text-sm text-blue-800 mt-2",children:[(0,t.jsx)("p",{className:"font-medium mb-1",children:"📧 Cek inbox email Anda:"}),(0,t.jsxs)("ol",{className:"list-decimal list-inside space-y-1 text-blue-700",children:[(0,t.jsxs)("li",{children:["Buka email dari ",(0,t.jsx)("strong",{children:"Kost Annisa"})]}),(0,t.jsxs)("li",{children:["Klik tombol ",(0,t.jsx)("strong",{children:'"Reset Password"'})]}),(0,t.jsx)("li",{children:"Masukkan password baru (berlaku 15 menit)"})]})]}),(0,t.jsx)(b.DialogFooter,{children:(0,t.jsx)(p.Button,{variant:"outline",onClick:i,children:"Tutup"})})]}):(0,t.jsxs)("form",{onSubmit:f,children:[(0,t.jsxs)(b.DialogHeader,{children:[(0,t.jsx)(b.DialogTitle,{children:"Lupa Password?"}),(0,t.jsx)(b.DialogDescription,{children:"Masukkan email akun Anda. Kami akan mengirim link untuk reset password."})]}),(0,t.jsx)("div",{className:"py-4",children:(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(m,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),(0,t.jsx)(g.Input,{type:"email",placeholder:"email@contoh.com",required:!0,value:r,onChange:e=>o(e.target.value),className:"pl-10"})]})}),(0,t.jsxs)(b.DialogFooter,{className:"gap-2",children:[(0,t.jsx)(p.Button,{type:"button",variant:"outline",onClick:i,children:"Batal"}),(0,t.jsxs)(p.Button,{type:"submit",disabled:c,children:[c&&(0,t.jsx)(l.Loader2,{className:"mr-2 h-4 w-4 animate-spin"}),"Kirim Link Reset"]})]})]})}function A(){let e=(0,i.useRouter)(),{setRole:u}=(0,r.useAppStore)(),[f,x]=(0,a.useState)(""),[v,w]=(0,a.useState)(""),[y,k]=(0,a.useState)(!1),[A,P]=(0,a.useState)(!1),[O,D]=(0,a.useState)(!1),[_,M]=(0,a.useState)(!1),[I,T]=(0,a.useState)(!1),[B,R]=(0,a.useState)(!1),[U,K]=(0,a.useState)(!1),[F,z]=(0,a.useState)(!1),[q,H]=(0,a.useState)(null);(0,a.useEffect)(()=>{let e=localStorage.getItem("remember_email");e&&(x(e),M(!0)),(async()=>{let e=await j();T(e),e&&R(await N())})()},[]);let J=(0,a.useCallback)(async function(t,a){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=await n.api.login({email:t,password:a});if(localStorage.setItem("auth_token",r.token),_?localStorage.setItem("remember_email",t):localStorage.removeItem("remember_email"),u(r.role),!i&&I&&!B){H({email:t,password:a}),z(!0);return}s.toast.success("Login berhasil!"),e.push("/dashboard")},[_,I,B,u,e]),W=async e=>{e.preventDefault(),P(!0);try{await J(f,v)}catch(e){s.toast.error(e.message||"Gagal login. Periksa email dan password.")}finally{P(!1)}},G=async()=>{K(!0);try{if(!await C())return void s.toast.error("Autentikasi sidik jari dibatalkan.");let t=await S();if(!t)return void s.toast.error("Kredensial tersimpan tidak ditemukan. Silakan login manual.");await J(t.email,t.password,!0),s.toast.success("Login berhasil!"),e.push("/dashboard")}catch(e){s.toast.error(e.message||"Login biometrik gagal. Silakan gunakan email & password.")}finally{K(!1)}},V=async()=>{q&&(await E(q),R(!0),s.toast.success("Sidik jari aktif! Login berikutnya cukup pakai sidik jari.")),z(!1),H(null),s.toast.success("Login berhasil!"),e.push("/dashboard")};return(0,t.jsxs)("div",{className:"flex min-h-screen w-full items-center justify-center relative overflow-hidden",children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-gradient-to-br from-slate-900 via-blue-950 to-indigo-950"}),(0,t.jsx)("div",{className:"absolute inset-0 opacity-30",style:{backgroundImage:"radial-gradient(circle at 25% 25%, rgba(59, 130, 246, 0.3) 0%, transparent 50%),\n radial-gradient(circle at 75% 75%, rgba(99, 102, 241, 0.3) 0%, transparent 50%)"}}),(0,t.jsx)("div",{className:"absolute top-20 left-20 w-72 h-72 bg-blue-500/10 rounded-full blur-3xl animate-pulse"}),(0,t.jsx)("div",{className:"absolute bottom-20 right-20 w-96 h-96 bg-indigo-500/10 rounded-full blur-3xl animate-pulse",style:{animationDelay:"1s"}}),(0,t.jsxs)("div",{className:"relative z-10 w-full max-w-md mx-4",children:[(0,t.jsxs)("div",{className:"text-center mb-8",children:[(0,t.jsx)("div",{className:"inline-flex items-center justify-center w-20 h-20 rounded-2xl bg-white/90 shadow-lg shadow-blue-500/25 mb-4 p-2",children:(0,t.jsx)("img",{src:"https://blogger.googleusercontent.com/img/a/AVvXsEiPO3Ehdp9v2r7JuQM9VTvIKbpwCv316_f7uxT_fS_3HR-ef7RFBDO2s1XX0H8DJM-urPA8HHFcRDakcxyIgQ21qKqlgATWhipN5IxJiMrEZO-JAOUXeoeZ26xp4Y3pkt8AUM-Hd4YCA5SLq7N7JkPQ8W6WnR2kcfbVLMlKOryK2dYihdQOMjgoTgXTT_YS",alt:"Kos Annisa",className:"w-full h-full object-contain"})}),(0,t.jsx)("h1",{className:"text-3xl font-bold text-white tracking-tight",children:"Kost Annisa"}),(0,t.jsx)("p",{className:"text-blue-200/60 mt-1 text-sm",children:"Sistem Manajemen Keuangan Kos"})]}),(0,t.jsxs)("div",{className:"backdrop-blur-xl bg-white/10 border border-white/20 rounded-2xl shadow-2xl p-8",children:[(0,t.jsxs)("form",{onSubmit:W,className:"space-y-5",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{htmlFor:"email",className:"text-sm font-medium text-blue-100",children:"Email"}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(m,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-blue-300/50"}),(0,t.jsx)(g.Input,{id:"email",type:"email",placeholder:"nama@email.com",required:!0,value:f,onChange:e=>x(e.target.value),className:"pl-10 bg-white/10 border-white/20 text-white placeholder:text-blue-200/30 focus:border-blue-400 focus:ring-blue-400/20 h-11 rounded-xl"})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{htmlFor:"password",className:"text-sm font-medium text-blue-100",children:"Password"}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(d.Lock,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-blue-300/50"}),(0,t.jsx)(g.Input,{id:"password",type:y?"text":"password",required:!0,placeholder:"••••••••",value:v,onChange:e=>w(e.target.value),className:"pl-10 pr-10 bg-white/10 border-white/20 text-white placeholder:text-blue-200/30 focus:border-blue-400 focus:ring-blue-400/20 h-11 rounded-xl"}),(0,t.jsx)("button",{type:"button",onClick:()=>k(!y),className:"absolute right-3 top-1/2 -translate-y-1/2 text-blue-300/50 hover:text-blue-200 transition-colors",children:y?(0,t.jsx)(c.EyeOff,{className:"w-4 h-4"}):(0,t.jsx)(o.Eye,{className:"w-4 h-4"})})]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer select-none",children:[(0,t.jsx)("input",{type:"checkbox",checked:_,onChange:e=>M(e.target.checked),className:"w-4 h-4 rounded border-white/30 bg-white/10 text-blue-500 focus:ring-blue-400/30 cursor-pointer"}),(0,t.jsx)("span",{className:"text-xs text-blue-200/70",children:"Ingat Saya"})]}),(0,t.jsx)("button",{type:"button",onClick:()=>D(!0),className:"text-xs text-blue-300/70 hover:text-blue-200 transition-colors",children:"Lupa password?"})]}),(0,t.jsx)(p.Button,{className:"w-full h-11 rounded-xl bg-gradient-to-r from-blue-600 to-indigo-600 hover:from-blue-500 hover:to-indigo-500 text-white font-semibold shadow-lg shadow-blue-600/25 transition-all duration-200 hover:shadow-blue-500/40 hover:scale-[1.02] active:scale-[0.98]",type:"submit",disabled:A,children:A?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.Loader2,{className:"mr-2 h-4 w-4 animate-spin"}),"Memverifikasi..."]}):"Masuk"})]}),I&&(0,t.jsx)("div",{className:"mt-4 pt-4 border-t border-white/10",children:B?(0,t.jsxs)("button",{type:"button",onClick:G,disabled:U,className:"w-full flex items-center justify-center gap-3 py-3 px-4 rounded-xl bg-white/5 border border-white/15 hover:bg-white/10 hover:border-white/25 transition-all duration-200 active:scale-[0.98] disabled:opacity-50",children:[U?(0,t.jsx)(l.Loader2,{className:"w-5 h-5 text-blue-300 animate-spin"}):(0,t.jsx)(h,{className:"w-5 h-5 text-blue-400"}),(0,t.jsx)("span",{className:"text-sm font-medium text-blue-100",children:U?"Memverifikasi...":"Login dengan Sidik Jari"})]}):(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2 py-2 text-blue-200/40",children:[(0,t.jsx)(h,{className:"w-4 h-4"}),(0,t.jsx)("span",{className:"text-xs",children:"Login manual dulu untuk mengaktifkan sidik jari"})]})})]}),(0,t.jsx)("p",{className:"text-center text-xs text-blue-200/30 mt-6",children:"© 2026 Kost Annisa · Sistem Internal"})]}),(0,t.jsx)(b.Dialog,{open:O,onOpenChange:D,children:(0,t.jsx)(b.DialogContent,{className:"sm:max-w-[400px]",children:(0,t.jsx)(L,{onClose:()=>D(!1)})})}),(0,t.jsx)(b.Dialog,{open:F,onOpenChange:()=>{},children:(0,t.jsxs)(b.DialogContent,{className:"sm:max-w-[380px]",children:[(0,t.jsxs)(b.DialogHeader,{children:[(0,t.jsxs)(b.DialogTitle,{className:"flex items-center gap-2",children:[(0,t.jsx)(h,{className:"w-5 h-5 text-blue-600"})," Aktifkan Sidik Jari?"]}),(0,t.jsx)(b.DialogDescription,{children:"Ingin login lebih cepat? Aktifkan login dengan sidik jari agar Anda tidak perlu mengetik email dan password lagi."})]}),(0,t.jsxs)("div",{className:"rounded-lg bg-blue-50 border border-blue-100 p-4 text-sm text-blue-800",children:[(0,t.jsx)("p",{className:"font-medium mb-1",children:"🔐 Keamanan:"}),(0,t.jsx)("p",{className:"text-blue-700 text-xs leading-relaxed",children:"Kredensial Anda disimpan secara aman di perangkat ini dan hanya bisa diakses setelah verifikasi sidik jari berhasil."})]}),(0,t.jsxs)(b.DialogFooter,{className:"gap-2",children:[(0,t.jsx)(p.Button,{variant:"outline",onClick:()=>{z(!1),H(null),s.toast.success("Login berhasil!"),e.push("/dashboard")},children:"Nanti Saja"}),(0,t.jsxs)(p.Button,{onClick:V,className:"bg-blue-600 hover:bg-blue-700",children:[(0,t.jsx)(h,{className:"w-4 h-4 mr-2"})," Ya, Aktifkan"]})]})]})})]})}e.s(["default",()=>A],9864)},74261,e=>{e.v(t=>Promise.all(["static/chunks/9d8248c9dfa656ee.js"].map(t=>e.l(t))).then(()=>t(94719)))},73645,e=>{e.v(t=>Promise.all(["static/chunks/2e76a45106fe24cb.js"].map(t=>e.l(t))).then(()=>t(99587)))}]);