import{f as M,b as P,g as _,d as S,p as Q,c as h,s as w,t as N,a as R,r as p}from"./CPWcrcMP.js";import{c as V,a as g,d as W,f as z,s as A}from"./DktbhmWA.js";import{i as E}from"./0jvM7PZf.js";import{I as D,h as T,r as X,a as Y,s as I}from"./CNDZS43m.js";import{b as Z}from"./CFyEX9sq.js";import{l as U,s as F,p as i}from"./DBypTyp2.js";import{i as $}from"./C0fAtm-M.js";import"./CvCfPjaJ.js";function ee(t,e){const o=U(e,["children","$$slots","$$events","$$legacy"]);/**
 * @license lucide-svelte v0.511.0 - ISC
 *
 * ISC License
 *
 * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
 *
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 *
 */const a=[["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"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242"}],["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"}],["path",{d:"m2 2 20 20"}]];D(t,F({name:"eye-off"},()=>o,{get iconNode(){return a},children:(n,c)=>{var s=V(),d=M(s);T(d,e,"default",{}),g(n,s)},$$slots:{default:!0}}))}function te(t,e){const o=U(e,["children","$$slots","$$events","$$legacy"]);/**
 * @license lucide-svelte v0.511.0 - ISC
 *
 * ISC License
 *
 * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
 *
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 *
 */const a=[["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"}],["circle",{cx:"12",cy:"12",r:"3"}]];D(t,F({name:"eye"},()=>o,{get iconNode(){return a},children:(n,c)=>{var s=V(),d=M(s);T(d,e,"default",{}),g(n,s)},$$slots:{default:!0}}))}let k=S("dark");const ae={get value(){return _(k)},update(){const t=localStorage.getItem("theme");t==="system"?P(k,window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",!0):t&&P(k,t,!0)}};ae.update();function se(t,e){P(e,!_(e))}function re(t,e,o,a,n,c,s,d,m){var f;e()?o($.password(e(),a(),n(),c(),s(),d())):o(""),(f=m.checkErrors)==null||f.call(m)}var ie=z('<p class="text-error text-sm mt-1"> </p>'),oe=z('<div class="block text-sm font-medium"> </div> <div><input class="grow bg-transparent focus:outline-none"/> <button type="button" class="btn btn-ghost btn-sm" tabindex="-1"><!></button></div> <!>',1);function he(t,e){Q(e,!0);let o=i(e,"password",15),a=i(e,"error",15),n=i(e,"header",3,"Password"),c=i(e,"placeholder",3,""),s=i(e,"disabled",3,!1),d=i(e,"minLength",3,10),m=i(e,"maxLength",3,512),f=i(e,"minUpper",3,1),j=i(e,"minDigits",3,1),q=i(e,"minSymbols",3,1),b=S(!1);var L=oe(),y=M(L),B=h(y,!0);p(y);var u=w(y,2),l=h(u);X(l),l.__input=[re,o,a,d,m,f,j,q,e];var v=w(l,2);v.__click=[se,b];var C=h(v);{var G=r=>{te(r,{})},H=r=>{ee(r,{})};E(C,r=>{_(b)?r(G):r(H,!1)})}p(v),p(u);var J=w(u,2);{var K=r=>{var x=ie(),O=h(x,!0);p(x),N(()=>A(O,a())),g(r,x)};E(J,r=>{a()&&r(K)})}N(()=>{A(B,n()),Y(u,1,`input input-bordered flex items-center gap-2 mt-1 ${a()?"input-error":""}`),I(l,"type",_(b)?"text":"password"),I(l,"placeholder",c()),l.disabled=s(),v.disabled=s()}),Z(l,o),g(t,L),R()}W(["input","click"]);export{ae as A,he as P};
